Şuanki Dizin: /home/wwwdreamtechnolo/public_html/uesmahilamahavidyalaya.org/old/admin/ |
Şuanki Dosya : /home/wwwdreamtechnolo/public_html/uesmahilamahavidyalaya.org/old/admin/time-table.php |
<?php require_once("lib/functions.php"); $db = new login_function(); $flag = 0; $actual_image_name=""; $success_msg = 0; $image_error = ""; $succ_flag = 0; $e_name_error = ""; $s_date = Date("d-m-Y"); $t_time = ""; $f_time = ""; $succ_flag = 0; $subject = ""; $e_name = ""; $exam_id = ""; if(!isset($_SESSION['current_login_admin'])) { header("Location:/admin/index.php"); } if(isset($_SESSION['current_login_admin'])) { $email = $_SESSION['current_login_admin']; } if(isset($_POST['add_btn'])) { $exam_id = $_POST['e_name']; $subject = $_POST['subject']; $s_date = $_POST['s_date']; $f_time = $_POST['f_time']; $t_time = $_POST['t_time']; if($e_name == 'Select Exam Name') { $e_name_error ="Please select Exam Name"; $flag = 1; } if($flag==0) { $e_name = $db->get_ex_name_from_id($exam_id); $db->add_time_table($e_name,$subject,$s_date,$f_time,$t_time,$exam_id); $succ_flag = 1 ; $e_name = ""; $subject = ""; $s_date = ""; $f_time = ""; $t_time = ""; } } if(isset($_GET['delete_id'])) { $del_id = $_GET['delete_id']; $db->delete_time_table($del_id); $success_msg = 2; } ?> <?php require_once('header.php'); ?> <link rel="stylesheet" href="/css/jquery-ui.css"> <script src="/js/jquery-1.12.4.js"></script> <script src="/js/jquery-ui.js"></script> <script> $( function() { $( "#datepicker" ).datepicker(); } ); </script> <div id="page-wrapper"> <div class="row"> <div class="col-lg-12"> <h1 class="page-header"> Time Table </h1> <?php if($succ_flag == 1) { ?> <div class="alert alert-success"> Saved Successfully. </div> <?php } ?> <?php if($success_msg == 2) { ?> <div class="alert alert-danger"> Deleted Successfully. </div> <?php } ?> </div> </div> <div class="row"> <div class="col-lg-12"> <div class="panel panel-default"> <div class="panel-heading"> Time Table </div> <div class="panel-body"> <div class="row"> <div class="col-lg-6"> <form role="form" method="post" enctype="multipart/form-data"> <div class="form-group"> <label> Select Exam Name </label> <select class="form-control" placeholder="Enter Department" name="e_name" required> <?php $e_name = $db->get_ex_name_from_id($exam_id); if($e_name != "") { ?> <option value="<?php echo $exam_id; ?>"> <?php echo $e_name; ?> </option> <?php } ?> <option value="Select Exam Name">Select Exam Name</option> <?php $report_details = $db->get_all_exam_time_table(); if(!empty($report_details)) { $counter =0; foreach($report_details as $record) { $id = $report_details[$counter][0]; $department = $report_details[$counter][1]; $semester = $report_details[$counter][2]; $exam_name = $report_details[$counter][3]; ?> <option value="<?php echo $id; ?>"><?php echo $exam_name; ?></option> <?php $counter++; } } ?> </select> <span style="color:red;"><?php echo $e_name_error; ?></span> </div> <div class="form-group"> <label> Date </label> <input type="text" class="form-control" placeholder="Enter Date" name="s_date" required id="datepicker" value="<?php echo $s_date; ?>"></textarea> </div> <div class="form-group"> <label> Subject </label> <input type="text" class="form-control" placeholder="Enter Subject" name="subject" required value="<?php echo $subject; ?>"></textarea> </div> <div class="form-group"> <label> From Time </label> <input type="text" class="form-control" placeholder="Enter From Time" name="f_time" value="<?php echo $f_time; ?>" required></textarea> </div> <div class="form-group"> <label> To Time </label> <input type="text" class="form-control" placeholder="Enter To Time" name="t_time" value="<?php echo $t_time; ?>" required></textarea> </div> <button type="submit" class="btn btn-success" name="add_btn">Submit</button> <br /><br /> </form> </div> <div class="row"> <div class="col-lg-12"> <div class="panel panel-default"> <div class="panel-heading"> Time Table Report </div> <!-- /.panel-heading --> <div class="panel-body"> <div class="table-responsive"> <table class="table table-striped table-bordered table-hover"> <thead> <tr> <th width="20">Sr. No</th> <th width="100">Exam Name</th> <th width="100">S Date</th> <th width="100">Subject</th> <th width="100">From Time</th> <th width="100">To Time</th> <!--<th width="50">Action</th>--> <th width="30">Action</th> </tr> </thead> <tbody> <?php $report_details = $db->get_all_time_table(); if(!empty($report_details)) { $counter =0; foreach($report_details as $record) { $id = $report_details[$counter][0]; $exam_name = $report_details[$counter][1]; $s_date = $report_details[$counter][2]; $subject = $report_details[$counter][3]; $from_time = $report_details[$counter][4]; $to_time = $report_details[$counter][5]; ?> <tr> <td><?php echo $counter+1; ?></td> <td><?php echo $exam_name; ?></td> <td><?php echo $s_date; ?></td> <td><?php echo $subject; ?></td> <td><?php echo $from_time; ?></td> <td><?php echo $to_time; ?></td> <!--<td><a href="/admin/edit-notice.php?up_id=<?php echo $id;?>">Edit</a></td>--> <td><a href="/admin/class-time-table.php?delete_id=<?php echo $id;?>" onclick="return confirm('Are you sure?');">Delete</a></td> </tr> <?php $counter ++; } }else { ?> <td colspan="7">No Data Found...</td> <?php } ?> </tbody> </table> </div> <!-- /.table-responsive --> </div> <!-- /.panel-body --> </div> <!-- /.panel --> </div> <!-- /.col-lg-6 --> </div> </div> </div> </div> </div> </div> </div> </div> </body> </html>
Linux 65-254-81-4.cprapid.com 5.14.0-284.11.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 9 05:49:00 EDT 2023 x86_64
Apache
65.254.81.4