ok

Mini Shell

Direktori : /proc/self/root/proc/self/root/home/ngwcolle/public_html/mis/admin/
Upload File :
Current File : //proc/self/root/proc/self/root/home/ngwcolle/public_html/mis/admin/miscprint.php

<?php
include('includes/dbconnection.php');
require("vendor/fpdf186/fpdf.php");
// check_login();
error_reporting(E_ALL);
$id = $_GET['pid'];
// $id = 33;
$memoletteno = array();
$memodate = array();
$sql = "select * from tblletter where id=$id";
$query = $dbh->prepare($sql);
$query->execute();
$results = $query->fetchAll(PDO::FETCH_OBJ);
$cnt = 1;
if ($query->rowCount() > 0) {
    foreach ($results as $result) {
?>
        <style>
            * {
                font-family: "Calibri", "Times New Roman", Times, serif;
                font-size: 14;
                font-weight: 600;
            }

            p {
                font-family: "Calibri", "Times New Roman", Times, serif;
                font-size: 16;
                font-weight: 600;
            }

            .button {
                background-color: #4CAF50;
                /* Green */
                border: none;
                color: white;
                padding: 8px 16px;
                text-align: center;
                text-decoration: none;
                display: inline-block;
                font-size: 16px;
                margin: 3px 1px;
                transition-duration: 0.4s;
                cursor: pointer;
            }

            .button1 {
                background-color: white;
                color: black;
                border: 2px solid #4CAF50;
            }

            .button1:hover {
                background-color: #4CAF50;
                color: white;
            }

            .button2 {
                background-color: white;
                color: black;
                border: 2px solid #008CBA;
            }

            .button2:hover {
                background-color: #008CBA;
                color: white;
            }

            .button3 {
                background-color: white;
                color: black;
                border: 2px solid #f44336;
            }

            .button3:hover {
                background-color: #f44336;
                color: white;
            }

            .button4 {
                background-color: white;
                color: black;
                border: 2px solid #e7e7e7;
            }

            .button4:hover {
                background-color: #e7e7e7;
            }

            .button5 {
                background-color: white;
                color: black;
                border: 2px solid #555555;
            }

            .button5:hover {
                background-color: #555555;
                color: white;
            }
        </style>
        <div style="text-align:center;">
            <button onclick="printDiv('printableArea')" class="button button1">&#128438; Print</button>
            <button onclick="window.close();" id="myButton" class="button button3">&#x2716; Close</button>
        </div>
        <div id="printableArea">
            <table width="100%">
                <tbody>

                    <tr>
                        <td colspan="2" align="center">
                            <img src="img/logo/ngwc.jpeg" alt="manoj">
                            <hr style="padding:0px;margin:0px;">
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            <p style="font-size: 18px;padding:0px;margin:0px;">No: <?php echo htmlentities($result->letterno); ?> /NGWC</p>
                        </td>
                        <td>
                            <p style="font-size: 18px;padding:0px;margin:0px;">&emsp;Date: <?php echo date("d-m-Y", strtotime($result->issuedate)); ?></p>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <div style="text-align:center;">
                                <p style="margin:0;font-size: 18px;">
                                    <?php echo strtoupper($result->subject); ?></p>
                            </div>
                        </td>
                    </tr>
                   
                        <td colspan="2">
                            <div style="text-indent:50px;text-align:justify;margin-left:50px">
                                <p style="text-indent:50px;">
                                    <?php echo $result->content; ?></p>
                            <?php }
                        if (!empty($result->enclosure)) { ?>
                                <p>Encl: <?php echo $result->enclosure; ?></p>
                            <?php } ?>
                            </div>
                            <div style="text-align:right;margin-top:30px;">
                                <p style="margin: 0;padding:0;margin-right:40px;">Your's faithfully</p>
                                <p style="margin: 0;padding:0;margin-right:60px;margin-top:50px;">Principal</p>
                                <p style="margin: 0;padding:0">Model Degree COllege,Nayagarh</p>
                            </div>
                        </td>
                    </tr>

                    <?php
                    $sql1 = "select * from tblissueregister where documentno=$id";
                    $query1 = $dbh->prepare($sql1);
                    $query1->execute();
                    // $results1 = $query1->fetchAll(PDO::FETCH_OBJ);
                    while ($row = $query1->fetch(PDO::FETCH_ASSOC)) {
                        $resultarray[] = $row;
                    }
                    if (!empty($result->memo_1)) { ?>
                        <tr>

                            <td colspan="2">Memo No:<?php echo $resultarray[0]['despatchno']; ?> /Date: <?php echo date("d-m-Y", strtotime($resultarray[0]['date'])); ?>
                                <div style="text-indent:50px;text-align:justify;margin-left:50px;padding:0px;">
                                    <p style="text-indent:50px;margin:0;">Copy forewarded to
                                        <?php echo $result->memo_1; ?> for information.</p>
                                </div>
                                <div style="text-align:right;margin-top:25px;">
                                    <p style="margin: 0;padding:0;margin-right:60px;">Principal</p>
                                    <p style="margin: 0;padding:0">Model Degree COllege,Nayagarh</p>
                                </div>
                            </td>
                        </tr><?php }
                            if (!empty($result->memo2)) { ?>
                        <tr>
                            <td colspan="2">Memo No:<?php echo $resultarray[1]['despatchno']; ?> /Date: <?php echo date("d-m-Y", strtotime($resultarray[1]['date'])); ?>
                                <div style="text-indent:50px;text-align:justify;margin-left:50px;padding:0px;">
                                    <p style="text-indent:50px;margin:0;">Copy forewarded to
                                        <?php echo $result->memo2; ?> for information. </p>
                                </div>
                                <div style="text-align:right;margin-top:25px;">
                                    <p style="margin: 0;padding:0;margin-right:60px;">Principal</p>
                                    <p style="margin: 0;padding:0">Model Degree COllege,Nayagarh</p>
                                </div>
                            </td>
                        </tr>
                    <?php }
                            if (!empty($result->memo3)) { ?>
                        <tr>
                            <td colspan="2">Memo No:<?php echo $resultarray[2]['despatchno']; ?> /Date: <?php echo date("d-m-Y", strtotime($resultarray[2]['date'])); ?>
                                <div style="text-indent:50px;text-align:justify;margin-left:50px;padding:0px;">
                                    <p style="text-indent:50px;margin:0;">Copy forewarded to
                                        <?php echo $result->memo3; ?> for information.</p>
                                </div>
                                <div style="text-align:right;margin-top:25px;">
                                    <p style="margin: 0;padding:0;margin-right:60px;">Principal</p>
                                    <p style="margin: 0;padding:0">Model Degree COllege,Nayagarh</p>
                                </div>
                            </td>
                        </tr>
                    <?php }
                            if (!empty($result->memo4)) { ?>
                        <tr>
                            <td colspan="2">Memo No:<?php echo $resultarray[3]['despatchno']; ?> /Date: <?php echo date("d-m-Y", strtotime($resultarray[3]['date'])); ?>
                                <div style="text-indent:50px;text-align:justify;margin-left:50px;padding:0px;">
                                    <p style="text-indent:50px;margin:0;">Copy forewarded to
                                        <?php echo $result->memo4; ?> for information.</p>
                                </div>
                                <div style="text-align:right;margin-top:25px;">
                                    <p style="margin: 0;padding:0;margin-right:60px;">Principal</p>
                                    <p style="margin: 0;padding:0">Model Degree COllege,Nayagarh</p>
                                </div>
                            </td>
                        </tr>
                    <?php }
                            if (!empty($result->memo5)) { ?>
                        <tr>
                            <td colspan="2">Memo No:<?php echo $resultarray[4]['despatchno']; ?> /Date: <?php echo date("d-m-Y", strtotime($resultarray[4]['date'])); ?>
                                <div style="text-indent:50px;text-align:justify;margin-left:50px;padding:0px;">
                                    <p style="text-indent:50px;margin:0;">Copy forewarded to
                                        <?php echo $result->memo5; ?> for information.</p>
                                </div>
                                <div style="text-align:right;margin-top:25px;">
                                    <p style="margin: 0;padding:0;margin-right:60px;">Principal</p>
                                    <p style="margin: 0;padding:0">Model Degree COllege,Nayagarh</p>
                                </div>
                            </td>
                        </tr>
                <?php

                            }
                        } ?>
                </tbody>
            </table>
        </div>
        <script src="vendor/jquery/jquery.min.js"></script>
        <script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
        <script src="vendor/jquery-easing/jquery.easing.min.js"></script>
        <script src="js/ruang-admin.min.js"></script>
        <!-- Page level plugins -->
        <script src="vendor/datatables/jquery.dataTables.min.js"></script>
        <script src="vendor/datatables/dataTables.bootstrap4.min.js"></script>
        <script type="text/javascript">
            function printDiv(divName) {
                var printContents = document.getElementById(divName).innerHTML;
                var originalContents = document.body.innerHTML;

                document.body.innerHTML = printContents;

                window.print();

                document.body.innerHTML = originalContents;
            }
        </script>

Zerion Mini Shell 1.0