Şuanki Dizin: /home/wwwdreamtechnolo/public_html/uesmahilamahavidyalaya.org/admin/ |
Şuanki Dosya : /home/wwwdreamtechnolo/public_html/uesmahilamahavidyalaya.org/admin/class-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; $department_error = ""; $department = ""; $semester = ""; $semester_error = ""; $s_date = Date("d-m-Y"); $description = ""; $succ_flag = 0; $division_error = ""; $division = ""; $division_error = ""; $days_error = ""; $days = ""; $subject = ""; $periods = ""; $departments = ""; $semesters = ""; 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'])) { $department = $_POST['department']; $semester = $_POST['semster']; $division = $_POST['division']; $days = $_POST['days']; $subject = $_POST['subject']; $periods = $_POST['periods']; if($department == 'Select Department') { $department_error ="Please select Department"; $flag = 1; } if($semester == 'Select Semester') { $semester_error = "Please select Semester"; $flag = 1; } if($division == 'Select Division') { $division_error = "Please select Division"; $flag = 1; } if($days == 'Select Days') { $days_error = "Please select Days"; $flag = 1; } if($flag==0) { $db->add_class_time_table($department,$semester,$division,$days,$subject,$periods); $succ_flag = 1 ; $department = ""; $semester = ""; $division = ""; $days = ""; $subject = ""; $periods = ""; } } if(isset($_GET['delete_id'])) { $del_id = $_GET['delete_id']; $db->delete_class_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"> Class 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"> Class 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 Department </label> <select class="form-control" name="department"> <?php if($department != "") { ?> <option value="<?php echo $department; ?>"> <?php echo $department; ?> </option> <?php } ?> <option value="Select Department">Select Department</option> <?php $report_details = $db->get_all_department(); if(!empty($report_details)) { $counter =0; foreach($report_details as $record) { $id = $report_details[$counter][0]; $department_name= $report_details[$counter][1]; ?> <option value="<?php echo $department_name; ?>"><?php echo $department_name; ?></option> <?php $counter++; } } ?> </select> <span style="color:red;"><?php echo $department_error; ?></span> </div> <div class="form-group"> <label> Select Semester </label> <select class="form-control" name="semster"> <?php if($semester != "") { ?> <option value="<?php echo $semester; ?>"> <?php echo $semester; ?> </option> <?php } ?> <option value="Select Semester">Select Semester</option> <?php $report_details = $db->get_all_semester(); if(!empty($report_details)) { $counter =0; foreach($report_details as $record) { $id = $report_details[$counter][0]; $semester_name = $report_details[$counter][1]; ?> <option value="<?php echo $semester_name; ?>"><?php echo $semester_name; ?></option> <?php $counter++; } } ?> </select> <span style="color:red;"><?php echo $semester_error; ?></span> </div> <div class="form-group"> <label> Select Division </label> <select class="form-control" name="division"> <?php if($division != "") { ?> <option value="<?php echo $division; ?>"> <?php echo $division; ?> </option> <?php } ?> <option value="Select Division">Select Division</option> <?php $report_details = $db->get_all_section(); if(!empty($report_details)) { $counter =0; foreach($report_details as $record) { $id = $report_details[$counter][0]; $division_name = $report_details[$counter][1]; ?> <option value="<?php echo $division_name; ?>"><?php echo $division_name; ?></option> <?php $counter++; } } ?> </select> <span style="color:red;"><?php echo $division_error; ?></span> </div> <div class="form-group"> <label> Day </label> <select class="form-control" name="days" required> <?php if($days != "") { ?> <option value="<?php echo $days; ?>"> <?php echo $days; ?> </option> <?php } ?> <option value="Select Days">Select Days</option> <option value="Monday"> Monday </option> <option value="Tuesday"> Tuesday </option> <option value="Wednesday"> Wednesday </option> <option value="Thursday"> Thursday </option> <option value="Friday"> Friday </option> <option value="Saturday"> Saturday </option> <option value="Sunday"> Sunday </option> </select> <span style="color:red;"><?php echo $days_error; ?></span> </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> Time / Periods </label> <input type="text" class="form-control" placeholder="Enter Time / Periods" name="periods" value="<?php echo $periods; ?>" required></textarea> </div> <button type="submit" class="btn btn-success" name="add_btn">Submit</button> <br /><br /> </form> </div> <div class="row"> <?php if(isset($_POST['search_btn'])) { $departments = $_POST['department']; $semesters = $_POST['semster']; } ?> <form method="post"> <div class="col-lg-12"> <div class="col-lg-3"> <select class="form-control" name="department"> <?php if($department != "") { ?> <option value="<?php echo $department; ?>"> <?php echo $department; ?> </option> <?php } ?> <option value="Select Department">Select Department</option> <?php $report_details = $db->get_all_department(); if(!empty($report_details)) { $counter =0; foreach($report_details as $record) { $id = $report_details[$counter][0]; $department_name= $report_details[$counter][1]; ?> <option value="<?php echo $department_name; ?>"><?php echo $department_name; ?></option> <?php $counter++; } } ?> </select> </div> <div class="col-lg-3"> <select class="form-control" name="semster"> <?php if($semester != "") { ?> <option value="<?php echo $semester; ?>"> <?php echo $semester; ?> </option> <?php } ?> <option value="Select Semester">Select Semester</option> <?php $report_details = $db->get_all_semester(); if(!empty($report_details)) { $counter =0; foreach($report_details as $record) { $id = $report_details[$counter][0]; $semester_name = $report_details[$counter][1]; ?> <option value="<?php echo $semester_name; ?>"><?php echo $semester_name; ?></option> <?php $counter++; } } ?> </select> </div> <div class="col-lg-3"> <button type="submit" class="btn btn-success" name="search_btn"> Search </button><br /> </div> </form> <div class="col-lg-12"> <br /><br /> <div class="panel panel-default"> <div class="panel-heading"> Class 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">Department</th> <th width="100">Semester</th> <th width="100">Division</th> <th width="100">Days</th> <th width="200">Subject</th> <th width="200">Time / Periods</th> <!--<th width="50">Action</th>--> <th width="50">Action</th> </tr> </thead> <tbody> <?php $report_details = $db->get_all_class_time_table($departments,$semesters); 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]; $division = $report_details[$counter][3]; $days = $report_details[$counter][4]; $subject = $report_details[$counter][5]; $periods = $report_details[$counter][6]; ?> <tr> <td><?php echo $counter+1; ?></td> <td><?php echo $department; ?></td> <td><?php echo $semester; ?></td> <td><?php echo $division; ?></td> <td><?php echo $days; ?></td> <td><?php echo $subject; ?></td> <td><?php echo $periods; ?></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