Server IP : 2a02:4780:3:1493:0:3736:a38e:7 / Your IP : 216.73.216.139 Web Server : LiteSpeed System : Linux sg-nme-web1393.main-hosting.eu 4.18.0-553.40.1.lve.el8.x86_64 #1 SMP Wed Feb 12 18:54:57 UTC 2025 x86_64 User : u926327694 ( 926327694) PHP Version : 7.4.33 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u926327694/domains/smsoft.in/public_html/mda/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php $page_title = 'Bulk Assign Subject To Student'; include 'header.php'; ?> <div class="content-wrapper"> <section class="content mt-4"> <div class="container-fluid"> <div class="row"> <div class="col-md-12"> <?php include('alert-msg.php'); ?> <div class="card card-primary"> <div class="card-header"> <h3 class="card-title"><?php echo $page_title; ?></h3> </div> <form action="bulk-assign-subject.php" method="POST" enctype="multipart/form-data"> <div class="card-body"> <div class="row"> <div class="col-md-4"> <div class="form-group"> <label>Class</label> <select class="form-control select2" name="class"> <option value="">--All--</option> <?php $sel_class=mysqli_query($con,"SELECT DISTINCT Class FROM `DimStudent_Table` Where Class != ''"); while($row_class=mysqli_fetch_array($sel_class)) { ?> <option value="<?php echo $row_class['Class']; ?>"><?php echo $row_class['Class']; ?></option> <?php } ?> </select> </div> </div> <div class="col-md-4"> <div class="form-group"> <label>Division</label> <select class="form-control select2" name="division"> <option value="">--All--</option> <?php $sel_division=mysqli_query($con,"SELECT DISTINCT Division FROM `DimStudent_Table` where Division != ''"); while($row_division=mysqli_fetch_array($sel_division)) { ?> <option value="<?php echo $row_division['Division']; ?>"><?php echo $row_division['Division']; ?></option> <?php } ?> </select> </div> </div> <div class="col-md-4"> <div class="form-group"> <label>Combination</label> <select class="form-control select2" name="combination"> <option value="">--All--</option> <?php $sel_class=mysqli_query($con,"SELECT DISTINCT Combination FROM `DimStudent_Table` Where Combination != ''"); while($row_class=mysqli_fetch_array($sel_class)) { ?> <option value="<?php echo $row_class['Combination']; ?>"><?php echo $row_class['Combination']; ?></option> <?php } ?> </select> </div> </div> <div class="col-md-4"> <div class="form-group"> <label>Course</label> <select class="form-control select2" name="course"> <option value="">--All--</option> <?php $sel_class=mysqli_query($con,"SELECT DISTINCT Course FROM `DimStudent_Table` Where Course != ''"); while($row_class=mysqli_fetch_array($sel_class)) { ?> <option value="<?php echo $row_class['Course']; ?>"><?php echo $row_class['Course']; ?></option> <?php } ?> </select> </div> </div> <div class="col-md-4"> <div class="form-group"> <label>Search</label> <input type="text" class="form-control" name="search" /> </div> </div> </div> <button type="submit" class="btn btn-primary" name="btnSubmit">Search</button> </div> </form> </div> <?php if(isset($_POST['btnSubmit'])) { $class = $_POST['class'] ?? ''; $division = $_POST['division'] ?? ''; $combination = $_POST['combination'] ?? ''; $course = $_POST['course'] ?? ''; $search = $_POST['search'] ?? ''; ?> <div class="card card-primary"> <div class="card-header"> <h3 class="card-title"><?php echo $page_title; ?></h3> </div> <div class="card-body"> <form action="bulk-assign-subject-submit.php" method="POST"> <div class="row"> <div class="col-md-12"> <div class="row"> <div class="col-lg-4"> <div class="form-group"> <label>View / Update Field</label> <select class="form-control" name="subjects[]" multiple size="5" required> <?php $sel_teacher=mysqli_query($con,"SELECT Subject_ID, Subject_Name FROM `DimSubject_Table` where Subject_ID != '' AND Subject_Name != ''"); while($row_teacher=mysqli_fetch_array($sel_teacher)) { ?> <option value="<?php echo $row_teacher['Subject_ID']; ?>"><?php echo $row_teacher['Subject_Name']; ?> (<?php echo $row_teacher['Subject_ID']; ?>)</option> <?php } ?> </select> </div> </div> </div> <button type="submit" class="btn btn-primary" name="btnSubmit" onclick="return confirm('Are you sure you want to assign subject to selected student?')">Assign Subject</button> <button type="submit" class="btn btn-danger" name="btnRemove" onclick="return confirm('Are you sure you want to remove subject to selected student?')">Remove Subject</button> <div class="table-responsive mt-4" style="width:100%; clear:both;"> <table width="100%" class="table table-striped table-bordered table-hover" id="data_table"> <thead> <tr> <th><input type="checkbox" id="select_all" checked/></th> <th>Student ID</th> <th>Name</th> <th>Year</th> <th>Roll Number</th> <th>Class/Division</th> <th>Combination</th> <th>Course</th> </tr> </thead> <tbody> <?php $query = "SELECT * FROM `DimStudent_Table` where (`Class`='$class' OR '$class' = '') and (`Division`='$division' OR '$division' = '') and (`Combination`='$combination' OR '$combination' = '') and (`Course`='$course' OR '$course' = '') and (`Student_ID` LIKE '%$search%' OR `Name` LIKE '%$search%' OR `Roll_Number` LIKE '%$search%' OR `Combination` LIKE '%$search%' OR `Course` LIKE '%$search%' OR `Place` LIKE '%$search%' OR '$search' = '')"; $result = mysqli_query($con,$query); $count = 1; while($row = mysqli_fetch_array($result) ) { $id = $row['Student_ID']; ?> <tr class="odd gradeX"> <td><input type="checkbox" class="chk_receipt" name="students[]" value="<?php echo $id; ?>" checked/></td> <td><?php echo $id; ?></td> <td><?php echo $row['Name']; ?></td> <td><?php echo $row['Year']; ?></td> <td><?php echo $row['Roll_Number']; ?></td> <td><?php echo $row['Class']; ?>/<?php echo $row['Division']; ?></td> <td><?php echo $row['Combination']; ?></td> <td><?php echo $row['Course']; ?></td> </tr> <?php $count ++; } ?> </tbody> </table> </div> <button type="submit" class="btn btn-primary" name="btnSubmit" onclick="return confirm('Are you sure you want to assign subject to selected student?')">Assign Subject</button> <button type="submit" class="btn btn-danger" name="btnRemove" onclick="return confirm('Are you sure you want to remove subject to selected student?')">Remove Subject</button> </div> </div> </form> </div> </div> <?php } ?> </div> </div> </div> </section> </div> <?php include 'footer.php'; ?> <script> $("#select_all").change(function(){ var status = $(this).prop("checked"); $('.chk_receipt').each(function(){ $(this).prop("checked",status); if(status) { $(this).parents("span").addClass("checked"); } else { $(this).parents("span").removeClass("checked"); } }); }); $('.chk_receipt').change(function(){ if($(this).prop("checked") == false){ $("#select_all").prop("checked",false); $("#select_all").parents("span").removeClass("checked"); } if ($('.chk_receipt:checked').length ==$('.chk_receipt').length ){ $("#select_all").prop("checked",true); $("#select_all").parents("span").addClass("checked"); } }); </script>