403Webshell
Server IP : 210.245.233.93  /  Your IP : 216.73.216.226
Web Server : Apache/2.2.15 (CentOS)
System : Linux webserver2.onesolution.com.hk 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : exec, shell_exec, system, passthru, popen, proc_open, pcntl_exec
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/(Del)pathways.org.hk/MIS20140127/old20140314/LeaveApplication/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/(Del)pathways.org.hk/MIS20140127/old20140314/LeaveApplication/LeaveIndex.php
<?php
include_once '../include/DBConnect.php';
date_default_timezone_set("Hongkong");
$today = date("Y-m-d");
?>


<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <?php require_once '../include/head.php'; ?>
        <?php require_once '../include/checkuser.php'; ?>
        <?php require_once '../include/Nav_bar.php'; ?>
        <script>
            $(document).ready(function() {
                $('div input').height(20);
                $('.date-picker').datetimepicker({pickTime: false});
                $("#myselect").select2({
                    placeholder: "Select a Name",
                    minimumInputLength: 2,
                    allowClear: true
                });
            });


        </script>
    </head>
    <body>
        <div class="text-right">
            <ul class="breadcrumb">
                <!--<li><a href="#">Master</a> <span class="divider">&gt;</span></li>-->
<!--                <li><a href="index.php">Staff</a> <span class="divider">&gt;</span></li>-->
                <li class="active">Leave Application</li>
            </ul>
        </div>

        <div class="container-fluid pathways-container">
            <!--<a class="btn pull-right" <?= ($name != "") ? 'href="historyfrom.php?root_id=' . $RootID . '&action=Insert"' : 'disabled="disabled"' ?> ><i class="icon-plus"></i>Add</a>-->
            <h2>Leave Application</h2>

            <div class="pathways-search">
                <form id="search_form" class="form-inline" action="" method="">
                    <div class="pathways-inline-block">
                        Search by Name:
                        <select id="myselect" style="width:300px">
                            <option value=""></option>

                        </select>
                    </div>
                    <div class="pathways-inline-block">
                        Type:
                        <select id="search_campus" style="width:150px" name="search[campus]">
                            <option value="A">All</option>
                            <option value="Student">Student</option>
                            <option value="Staff">Staff</option>
                        </select>
                    </div>
                    <div class="pathways-inline-block">
                        <input type="hidden" id="Staff_ID"  name="search[Staff_ID]" value="0" />
                        <button type="submit" class="btn" style="margin-left:30px">GO</button>
                    </div>
                </form>
            </div>

            <form id="form" action="" method="post">
                <div class="pathways-inline-block" style="width:100%" >
                    <div class="pathways-inline-block"style="width:100%"  >
                        <h3>Staff <a class="btn pull-right" href="Staff_App_Form.php"><i class="icon-plus"></i>Add</a></h3>
                    </div>
                    <table class="table table-striped table-bordered table-hover table-condensed" style="width:100%" >
                        <thead>
                            <tr>
    <!--                            <th style="min-width:130px; width:50px">View</th>-->
                                <th style="min-width:50px; width:50px;width:10%">Edit</th>
                                <th style="width:10%" >Date</th>
                                <th style="width:10%" >Name</th>
                                <th style="width:15%" >duration</th>
    <!--                            <th>AdminEdit</th>-->
                            </tr>
                        </thead>
                        <tbody>
                            <tr class="success">
                                <td>
                                    <div class="btn-group" data-toggle="buttons">
                                        <a href="Staff_App_Form.php" class="btn">Edit</a>
                                        <a href="Staff_Approve.php?pass=1" class="btn"><!--<i class="icon-pencil"></i>-->Approve</a>
                                    </div>
                                </td>
                                <td>
                                    <?php print '<b>' . $today . '</b>'; ?>
                                </td>
                                <td>
                                    Staff_Name
                                </td>
                                <td>
                                    <?php print '<b>' . $today . '</b>'; ?>
                                    <br>
                                        (09:00-13:00)
                                </td>
                            </tr>
<!--                            <tr class="info">
                                <td>
                                    <div class="btn-group" data-toggle="buttons">
                                        <a href="Staff_App_Form.php" class="btn">Edit</a>
                                        <a href="Staff_Approve.php" class="btn"><i class="icon-pencil"></i>Approve</a>
                                    </div>
                                </td>
                                <td>
                            <?php print '<b>' . $today . '</b>'; ?>
                                </td>
                                <td>
                                    Staff_Name
                                </td>
                                <td>
                            <?php print '<b>' . $today . '</b>'; ?>
                                    <br>
                                        (09:00-13:00)
                                </td>
                            </tr>-->
                            <?php
                            $query = 'SELECT lapp.*,CONCAT( last_name,  " ", first_name,  "(", ch_name,  ")" ) AS name FROM leave_app lapp,staff s WHERE `stu_linking_id` = "-1" AND lapp.staff_id !="-1" AND s.deleted = 0 AND lapp.deleted = 0 AND s.root_id = lapp.staff_id order by lapp.`leave_id`';
                            $result = $dbh->prepare($query);
                            $result->execute();
                            $staffs_Leave_Record = $result->fetchAll();
                            $displayStatusColor = "";
                            foreach ($staffs_Leave_Record as $staffLRecord) {
                                //var_dump($staffLRecord);
                                $pass = 0;
                                //Set which color have to display in each tr
                                $SeachLeaveID = $staffLRecord['leave_id'];
                                $query = "SELECT * FROM `leave_lesson` WHERE `leave_id` = '$SeachLeaveID' AND `actived` = '1' AND `deleted` = '0'";
                                $result = $dbh->prepare($query);
                                $result->execute();
                                $staffs_Leave_Lesson_Record = $result->fetchAll();
                                if ($staffLRecord['is_approved']) {
                                    //$displayStatusColor = "warning";
                                    if ($staffs_Leave_Lesson_Record) {
                                        $displayStatusColor = "warning";
                                        //var_dump($staffs_Leave_Lesson_Record);
                                    } else {
                                        $displayStatusColor = "success";
                                        $pass = 1;
                                    }
                                } else {
                                    $displayStatusColor = "error";
                                }
                                ?>
                                <tr class="<?= $displayStatusColor ?>">
                                    <td>
                                        <div class="btn-group" data-toggle="buttons">
                                            <a href="Staff_App_Form.php" class="btn">Edit</a>
                                            <a href="Staff_Approve.php?pass=<?= $pass ?>" class="btn"><!--<i class="icon-pencil"></i>-->Approve</a>
                                        </div>
                                    </td>
                                    <td>
                                        <?php print '<b>' . substr($staffLRecord['createdate'], 0, 10) . '</b>'; ?>
                                    </td>
                                    <td>
                                        <?php print '<b>' . $staffLRecord['name'] . '</b>'; ?>
                                    </td>
                                    <td>
                                        <?php
                                        $get_Sdate = date_create($staffLRecord['start_date']);
                                        $get_Edate = date_create($staffLRecord['end_date']);
                                        if (date_format($get_Sdate, 'Y-m-d') != date_format($get_Edate, 'Y-m-d')) {
                                            print '<b>' . date_format($get_Sdate, 'Y-m-d (H:i)') . '</b>';
                                            print '<br>TO<br>';
                                            print '<b>' . date_format($get_Edate, 'Y-m-d (H:i)') . '</b>';
                                        } else {
                                            print '<b>' . date_format($get_Sdate, 'Y-m-d') . '</b>';
                                            print '<br>';
                                            print '(' . date_format($get_Sdate, 'H:i') . '-' . date_format($get_Edate, 'H:i') . ')';
                                        }
                                        ?>
                                    </td>
                                </tr>
                            <?php } ?>
                        </tbody>
                    </table>
                </div>
                <div class="pathways-inline-block" style="width:100%" >
                    <div class="pathways-inline-block"style="width:100%"  >
                        <h3>Student<a class="btn pull-right" href="Student_App_Form.php"><i class="icon-plus"></i>Add</a></h3>
                    </div>


                    <table class="table table-striped table-bordered table-hover table-condensed" style="width:100%" >
                        <thead>
                            <tr>
    <!--                            <th style="min-width:130px; width:50px">View</th>-->
                                <th style="min-width:50px; width:50px;width:10%">Edit</th>
                                <th style="width:10%" >Date</th>
                                <th style="width:10%" >Name</th>
                                <th style="width:15%" >duration</th>
    <!--                            <th>AdminEdit</th>-->
                            </tr>
                        </thead>
                        <tbody>
                            <tr class="error">
                                <td>
                                    <div class="btn-group" data-toggle="buttons">
                                        <a href="Student_App_Form.php" class="btn">Edit</a>
                                        <a href="Student_Approve.php" class="btn"><!--<i class="icon-pencil"></i>-->Approve</a>
                                    </div>
                                </td>
                                <td>
                                    <?php print '<b>' . $today . '</b>'; ?>
                                </td>
                                <td>
                                    Student_Name
                                </td>
                                <td>    
                                    <?php print '<b>' . $today . '</b>'; ?>
                                    <br>
                                        (Whole Day)
                                </td>
                            </tr>

                            <tr class="warning" >
                                <td>
                                    <div class="btn-group" data-toggle="buttons">
                                        <a href="Student_App_Form.php" class="btn">Edit</a>
                                        <a href="Student_Approve.php" class="btn"><!--<i class="icon-pencil"></i>-->Approve</a>
                                    </div>
                                </td>
                                <td>
                                    <?php print '<b>' . $today . '</b>'; ?>
                                </td>
                                <td>
                                    Student_Name
                                </td>
                                <td>    
                                    <?php print '<b>' . $today . '</b>'; ?>
                                    <br>
                                        (Whole Day)
                                </td>
                            </tr>

                        </tbody>
                    </table>
                </div>
            </form>
        </div>
    </body>
</html>   

Youez - 2016 - github.com/yon3zu
LinuXploit