Mini Shell
<?php
require_once("../config.php");
require_once("function-file.php");
require_once("function-menu.php");
cookiecheck();
if((!empty($_GET['action']))&&($_GET['action']=='extend')){
$stu_id=$_GET['stu_id'];
$end_date = date('Y-m-d', strtotime('+365 days'));
$conn->exec("update student_reg SET stu_status='1',end_date='$end_date' where stu_id='$stu_id'");
header("location:renew-subscription.php");
}?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Renew Subscription</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">Renew Subscription</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('renew-subscription-userdata-ajax.php');
});
$("#course_id").on('click',function(){
var course_id=$(this).val();
$.ajax({
type: 'post',
url: 'offline-userdata-ajax.php',
data: {'course_id':course_id},
success: function (data) {
$("#result").html(data);
}
});
});
</script>
</body>
</html>
Zerion Mini Shell 1.0