EVOLUTION-NINJA
Edit File: enrolled_students.php
<?php echo view('includes/faculty_header'); ?> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('public/assets/css/jquery-ui.css'); ?>" /> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('public/assets/jqgrid/css/ui.jqgrid.css'); ?>" /> <!-- <link rel="stylesheet" type="text/css" href="<?php //echo base_url('public/assets/sumoselect/sumoselect.css'); ?>"/> <script type="text/javascript" src="<?php //echo base_url('public/assets/sumoselect/jquery.sumoselect.min.js'); ?>"></script> --> <script type="text/ecmascript" src="<?php echo base_url('public/assets/jqgrid/js/jquery.jqGrid.min.js'); ?>"></script> <script type="text/ecmascript" src="<?php echo base_url('public/assets/jqgrid/js/i18n/grid.locale-en.js'); ?>"></script> <script src="<?php echo base_url('public/assets/js/jquery-ui.js'); ?>" type="text/javascript"></script> <div id="page-wrapper"> <div class="row my_header"> <h3 style="padding-bottom:10px;border-bottom:2px dashed #468662;margin-bottom:20px; font-weight: bold;">ENROLLED USERS</h3> <a href="javascript:history.back()" class="btn btn-primary" style="float:right; margin-right: 50px;">Back</a> <div class="row table-responsive" style="margin:1%"> <!-- <table class="table table-bordered"> <thead class="thead-dark"> <tr> <th scope="col">#</th> <th scope="col">User Name</th> <th scope="col">Phone</th> <th scope="col">Email</th> <th scope="col">Subjects</th> <th scope="col">Session</th> <th scope="col">Course Name</th> <th scope="col">Course Price</th> <th scope="col">Enrolled On</th> </tr> </thead> <tbody id="facult_tbody"> <?php //if($result != '') { $i = 1; foreach ($result as $value) { ?> <tr> <th scope="row"><?php //echo $i; ?></th> <td><?php //echo $value['user_name']; ?></td> <td><?php //echo $value['phone_number']; ?></td> <td><?php //echo $value['email']; ?></td> <td><?php //echo $value['subjects']; ?></td> <td><?php //echo $value['session_type']; ?></td> <td><?php //echo $value['course_title']; ?></td> <td><?php //echo $value['course_price'].'/-'; ?></td> <td><?php //echo $value['created_at']; ?></td> </tr> <?php //$i = $i+1; }} ?> </tbody> </table> --> <div id="jaytab" style="margin-top:3%" class="grid"> <table id="list2"></table> <div id="pager2"></div> <div id="dialogSelectRow" title="Warning" style="display:none"> <p>Please select row</p> </div> </div> </div> </div> </div> <!-- /#page-wrapper --> <?php echo view('includes/faculty_footer'); ?> <script> $(document).ready(function() { CallGrid(); function CallGrid(access_rights_global, access_result_global) { jQuery("#list2").jqGrid({ url: "<?php echo site_url('get_enrolled_students') ?>", mtype: "get", datatype: "json", colNames: ['SI', 'User Name', 'Email', 'Subjects', 'Session', 'Course Name', 'Course Price', 'Enrolled On'], colModel: [{ name: 'id', index: 'id', width: 10, hidden: true, editable: false, key: true }, { name: 'user_name', index: 'user_name', editable: false, width: 30 }, { name: 'email', index: 'email', editable: false, width: 50 }, { name: 'subjects', index: 'subjects', editable: false, width: 40 }, { name: 'session_type', index: "session_type", editable: false, width: 18 }, { name: 'course_title', index: 'course_title', editable: false, width: 35 }, { name: 'course_price', index: 'course_price', editable: false, width: 35 }, { name: 'created_at', index: 'created_at', editable: false, width: 45 }, ], rowNum: 20, rowTotal: 2000, rowList: [20, 30, 50, 100, 500, 1000, 2000], rownumbers: true, //rownumWidth: 60, pager: "#pager2", sortname: 'id', viewrecords: true, gridview: true, autowidth: true, sortorder: "asc", shrinkToFit: true, loadonce: true, caption: "User List", }); $("#list2").jqGrid("setLabel", "rn", "SL"); $("#list2").jqGrid('filterToolbar', { searchOperators: false, stringResult: true, searchOnEnter: false, defaultSearch: "cn" }); //for multisearch code,remove if not required $("#list2").jqGrid('navGrid', '#pager2', { edit: false, add: false, del: false, search: false, refreshstate: "current" }, {}, {}, {}, { sopt: ['eq', 'ne', 'lt', 'gt', 'cn', 'bw', 'ew'], closeOnEscape: true, multipleSearch: true, closeAfterSearch: true, closeAfterDelete: true, closeAfterEdit: true }, ); } }); </script> <style> #page-wrapper{ background-image: url(public/assets/website_assets/images/banner.png); background-size:cover; } @media only screen and (min-width:320px) and (max-width:640px) { .my_header { padding-left: 10px; padding-right: 10px; } } @media only screen and (min-width:641px) and (max-width:991px) {} @media only screen and (min-width:992px) and (max-width:1258px) {} #FrmGrid_list2 { width: 100% !important; } .ui-jqdialog .ui-jqdialog-titlebar { height: 29px !important; background-color: #001a00; color: white; padding-left: 10px; } .fm-button { height: 21px !important; padding: 1px; margin-right: 10px !important; height: 21px !important; width: 43%; margin-top: -7px !important; } .ui-jqdialog-content td.navButton { padding-top: 12px !important; } .ui-jqgrid .ui-jqgrid-titlebar { height: 27px !important; /*background:#1e7ad7 !important;*/ color: white !important; } .ui-jqgrid-bdiv { height: auto !important; } .ui-widget-overlay { z-index: 0 !important; } /* .ui-widget-header { background: #1e7ad7 !important; } */ .ui-jqgrid-hdiv ui-state-default { /* width: 873px !important; */ cursor: default !important } ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight { border: 1px solid #fed22f; background: #ffe45c; } .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { font-weight: bold; color: black; } /* .ui-jqgrid .ui-jqgrid-bdiv { overflow-y: scroll; overflow-x: scroll ; } .ui-jqgrid-htable{ width: 100% !important; } #list2{ width: 100% !important; } */ #jaytab { width: 100% !important; overflow-x: scroll !important; } @media only screen and (min-width:320px) and (max-width:640px) { #jaytab { width: auto !important; overflow-x: scroll !important; } .ui-jqgrid ui-widget ui-widget-content ui-corner-all { width: 900px !important; } .ui-jqgrid-view { width: 900px !important; } .ui-jqgrid-hdiv { width: 900px !important; } .ui-jqgrid-htable { width: 900px !important; } .ui-jqgrid-bdiv { width: 900px !important; } #list2 { width: 900px !important; } #pager2 { width: 900px !important; } } @media only screen and (min-width:641px) and (max-width:991px) { #jaytab { width: auto !important; overflow-x: scroll !important; } .ui-jqgrid ui-widget ui-widget-content ui-corner-all { width: 900px !important; } .ui-jqgrid-view { width: 900px !important; } .ui-jqgrid-hdiv { width: 900px !important; } .ui-jqgrid-htable { width: 900px !important; } .ui-jqgrid-bdiv { width: 900px !important; } #list2 { width: 900px !important; } #pager2 { width: 900px !important; } } </style>