Mini Shell

Direktori : /proc/self/root/proc/self/root/home/rizant5/www/admin/
Upload File :
Current File : //proc/self/root/proc/self/root/home/rizant5/www/admin/trial-user.php

<?php 
require_once("../config.php");
require_once("function-file.php");
require_once("function-menu.php");
cookiecheck();
if((!empty($_GET['action']))&&($_GET['action']=='active')){
  $stu_id=$_GET['stu_id'];
  // $conn->exec("update student_reg SET stu_status='1',start_date=now() where stu_id='$stu_id'");
  $conn->exec("update student_reg SET stu_status='1',start_date=now(),end_date=date_add(now(), INTERVAL 1 YEAR) where stu_id='$stu_id'");
  header("location:trial-user.php");
}
if((!empty($_GET['action']))&&($_GET['action']=='deactive')){
  $stu_id=$_GET['stu_id'];
  $conn->exec("update student_reg SET stu_status='0' where stu_id='$stu_id'");
  header("location:trial-user.php");
}
if((!empty($_GET['action']))&&($_GET['action']=='halt')){
  $stu_id=$_GET['stu_id'];
  $conn->exec("update student_reg SET stu_status='0' where stu_id='$stu_id'");
  header("location:trial-user.php");
}
if((!empty($_GET['action']))&&($_GET['action']=='resume')){
  $stu_id=$_GET['stu_id'];
  $conn->exec("update student_reg SET stu_status='1' where stu_id='$stu_id'");
  header("location:trial-user.php");
}
if((!empty($_GET['action']))&&($_GET['action']=='delete')){
  $stu_id=$_GET['stu_id'];
  $conn->exec("delete from student_reg where stu_id='$stu_id'");
  header("location:trial-user.php");
}?>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Trial Users</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <?php  cssfile();datatablecss();?>
  </head>
  <body class="hold-transition skin-blue layout-top-nav">
    <!-- Site wrapper -->
    <div class="wrapper">
<?php headermenu();?>
      <!-- =============================================== -->
      <!-- Content Wrapper. Contains page content -->
      <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <!-- Main content -->
        <div class="col-sm-12">
        <section class="content">
          <!-- Default box -->
          <div class="box">
            <div class="box-header with-border">
                <div style='float:left'><h3 class="box-title">Trial Users</h3></div>
                <div style='float:left;margin-left:10%;'><select id="course_id" class="form-control" required>
                                <option value=''>--Filter By Course Name</option>
                                <?php $data=$conn->prepare("select * from courses");
                                    $data->execute();$result=$data->fetchall();
        foreach($result as $row){echo"<option value='$row[course_id]'>$row[course_name]</option>";}?>
                            </select></div>
            </div>
            <div class="box-body">
                <div id="result"></div>
            </div><!-- /.box-body -->
          </div><!-- /.box -->
        </section><!-- /.content -->
        </div>
      </div></div><!-- /.content-wrapper -->
      <?php footer();?>
    </div><!-- ./wrapper -->
   <?php jsfile();datatablejs();?>
    <script>
        $(document).ready(function(){
            $("#result").load('trial-userdata-ajax.php');
        });
        $("#course_id").on('click',function(){
           var course_id=$(this).val(); 
            $.ajax({
            type: 'post',
            url: 'trial-userdata-ajax.php',
            data: {'course_id':course_id},
            success: function (data) {
                $("#result").html(data);
              }
            });
        });
    </script>
   
  </body>
</html>

Zerion Mini Shell 1.0