ok
Direktori : /proc/self/root/home2/selectio/www/bharath/application/views/admin/staff/ |
Current File : //proc/self/root/home2/selectio/www/bharath/application/views/admin/staff/stfnaac.php |
<?php $currency_symbol = $this->customlib->getSchoolCurrencyFormat(); ?> <style type="text/css"> </style> <div class="content-wrapper" style="min-height: 946px;"> <!-- Main content --> <section class="content"> <div class="row"> <div class="col-md-12"> <div class="box box-primary"> <div class="box-header with-border"> <h3 class="box-title"><i class="fa fa-search"></i> <?php echo 'NAAC'; ?></h3> <div class="box-tools pull-right"> <?php if ($this->rbac->hasPrivilege('staff', 'can_view')) { ?> <a href="<?php echo site_url('admin/staffnaac/exportformat')?>"> <button class="btn btn-primary btn-sm"><i class="fa fa-download"></i> <?php echo 'Download Sample NAAC File'; ?></button> </a></b><small class="pull-right"><a href="#addnaac" onclick="addNaac()" role="button" class="btn btn-primary btn-sm checkbox-toggle pull-right edit_setting" data-loading-text="<i class='fa fa-circle-o-notch fa-spin'></i> Processing"><?php echo 'Add NAAC'; ?></a></small> <?php } ?> </div> </div> <div class="box-body"> <?php if ($this->session->flashdata('msg')) { ?> <?php echo $this->session->flashdata('msg') ?> <?php } ?> <div class="row"> <div class="col-md-6"> <div class="row"> <?php if ($this->rbac->hasPrivilege('can_see_other_users_profile', 'can_view')) { ?> <form role="form" action="<?php echo site_url('admin/staffnaac') ?>" method="post" class=""> <?php echo $this->customlib->getCSRF(); ?> <div class="col-sm-12"> <div class="form-group"> <label for="teacher"><?php echo $this->lang->line('teachers'); ?><small class="req"> *</small></label> <select class="form-control" name="teacher" id="teacher"> <option value="all"><?php echo 'Select All' ?></option> <?php if (!empty($staff_list)) { foreach ($staff_list as $staff_key => $staff_value) { ?> <option value="<?php echo $staff_value['id']; ?>"><?php echo $staff_value["name"] . " " . $staff_value["surname"] . " (" . $staff_value['employee_id'] . ")"; ?></option> <?php } } ?> </select> </div> </div> <div class="col-sm-12"> <div class="form-group"> <button type="submit" name="search" value="search_filter" class="btn btn-primary btn-sm pull-right checkbox-toggle"><i class="fa fa-search"></i> <?php echo $this->lang->line('search'); ?></button> </div> </div> </form><?php } ?> </div> </div> <!--<div class="col-md-6"> <div class="row"> <form role="form" action="<?php //echo site_url('admin/staffnaac') ?>" method="post" class=""> <?php //echo $this->customlib->getCSRF(); ?> <div class="col-sm-12"> <div class="form-group"> <label><?php //echo $this->lang->line('search_by_keyword'); ?></label> <input type="text" name="search_text" class="form-control" value="<?php //echo set_value('search_text');?>" placeholder="<?php //echo $this->lang->line('search_by_staff'); ?>"> </div> </div> <div class="col-sm-12"> <div class="form-group"> <button type="submit" name="search" value="search_full" class="btn btn-primary pull-right btn-sm checkbox-toggle"><i class="fa fa-search"></i> <?php //echo $this->lang->line('search'); ?></button> </div> </div> </form> </div> </div>--> </div> </div> <?php if (isset($resultlist)) { ?> <div class="box-header ptbnull"></div> <div class="nav-tabs-custom border0"> <ul class="nav nav-tabs"> <li class="active"><a href="#tab_1" data-toggle="tab" aria-expanded="false"><i class="fa fa-newspaper-o"></i> <?php echo $this->lang->line('card'); ?> <?php echo $this->lang->line('view'); ?></a></li> <li class=""><a href="#tab_2" data-toggle="tab" aria-expanded="true"><i class="fa fa-list"></i> <?php echo $this->lang->line('list'); ?> <?php echo $this->lang->line('view'); ?></a></li> </ul> <div class="tab-content"> <div class="tab-pane table-responsive no-padding" id="tab_2"> <table class="table table-striped table-bordered table-hover example" cellspacing="0" > <thead> <tr> <th><?php echo 'Staff_Name'; ?></th> <th><?php echo 'Tittle'; ?></th> <th><?php echo 'File Loacation'; ?></th> <th><?php echo 'Created At'; ?></th> </tr> </thead> <tbody> <?php if (empty($resultlist)) { } else { $count = 1; foreach ($resultlist as $staff) { //if ($this->rbac->hasPrivilege('can_see_other_users_profile', 'can_view')) { ?> <tr> <td><?php echo $staff['staffname']; ?></td> <td> <a href="<?php echo base_url(); ?>admin/staffnaac/download/<?php echo $staff['file_location']; ?>"><?php echo $staff['title']; ?> </a> </td> <td><?php echo $staff['file_location']; ?></td> <td><?php echo $staff['created_at']; ?></td> </tr> <?php $count++; //} } } ?> </tbody> </table> </div> <div class="tab-pane active" id="tab_1"> <div class="mediarow"> <div class="row"> <?php if (empty($resultlist)) { ?> <div class="alert alert-info"><?php echo $this->lang->line('no_record_found'); ?></div> <?php } else { $count = 1; //if ($this->rbac->hasPrivilege('can_see_other_users_profile', 'can_view')) { foreach ($resultlist as $staff) { ?> <div class="col-lg-3 col-md-4 col-sm-6 img_div_modal"> <div class="staffinfo-box"> <div class="staffleft-box"> <?php if (!empty($staff["image"])) { $image = $staff["image"]; } else { $image = "no_image.png"; } ?> <img src="<?php echo base_url() . "uploads/staff_images/" . $image ?>" /> </div> <div class="staffleft-content"> <h5><span data-toggle="tooltip" title="<?php echo $this->lang->line('name'); ?>" data-loading-text="<i class='fa fa-circle-o-notch fa-spin'></i> Processing"><?php echo $staff["staffname"]; ?></span></h5> <p><font data-toggle="tooltip" title="<?php echo "Tittle"; ?>" data-loading-text="<i class='fa fa-circle-o-notch fa-spin'></i> Processing"><?php echo $staff["title"] ?></font></p> <p><font data-toggle="tooltip" title="<?php echo "File Location"; ?>" data-loading-text="<i class='fa fa-circle-o-notch fa-spin'></i> Processing"><?php echo $staff["file_location"] ?></font></p> </div> <div class="overlay3"> <div class="stafficons"> <a title="<?php echo $this->lang->line('download'); ?>" href="<?php echo base_url(); ?>admin/staffnaac/download/<?php echo $staff['file_location']; ?>"><i class="fa fa-navicon"></i></a> </div> </div> </div> </div><!--./col-md-3--> <?php } //}else{ ?> <!--<div class="alert alert-info"><?php //echo $this->lang->line('no_record_found'); ?></div>--> <?php //} } ?> </div><!--./row--> </div> <!--./mediarow--> </div> </div> </div> </div> </div> <?php }else{ ?> <div class="alert alert-info"><?php echo $this->lang->line('no_record_found'); ?></div> <?php } ?> </div> </section> </div> <div id="addnaac" class="modal fade " role="dialog"> <div class="modal-dialog modal-dialog2 modal-lg"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title"><?php echo $this->lang->line('add'); ?> <?php echo $this->lang->line('details'); ?></h4> </div> <div class="modal-body"> <div class="row"> <form role="form" id="addnaac_form" method="post" enctype="multipart/form-data" action=""> <div class="form-group col-xs-12 col-sm-12 col-md-12 col-lg-6"> <label> <?php echo 'Staff'; ?></label><small class="req"> *</small> <div id="naactypeddl"> <?php if ($this->rbac->hasPrivilege('can_see_other_users_profile', 'can_view')) { ?> <select class="form-control" name="teacher" id="teacher"> <option value=""><?php echo 'Select' ?></option> <?php if (!empty($staff_list)) { foreach ($staff_list as $staff_key => $staff_value) { ?> <option value="<?php echo $staff_value['id']; ?>"><?php echo $staff_value["name"] . " " . $staff_value["surname"] . " (" . $staff_value['employee_id'] . ")"; ?></option> <?php } } ?> </select><?php }else{ if(isset($loggedin_staff)){ if (empty($loggedin_staff)) { } else { ?> <input type="text" readonly class="form-control" id="teacher_name" name="teacher_name" value="<?php echo $loggedin_staff["name"];?>" > <input type="hidden" readonly class="form-control" id="teacher" name="teacher" value="<?php echo $loggedin_staff["id"];?>" > <?php } }else{ ?> <?php }?> <?php }?> </div> <span class="text-danger"><?php echo form_error('teacher'); ?></span> </div> <div class="form-group col-xs-12 col-sm-12 col-md-12 col-lg-6 "> <label><?php echo 'Tittle'; ?></label> <div id="tittleadd" > <input class="form-control" type="text" id="tittle" name="tittle" value="" ></div> </div> <div class="form-group col-xs-12 col-sm-12 col-md-12 col-lg-12"> <label><?php echo $this->lang->line('attach_document'); ?></label> <input type="file" id="file" name="userfile" class="filestyle form-control"> <input type="hidden" id="filename" name="filename"> </div> <div class="clearfix"></div> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> <button type="submit" class="btn btn-primary submit_addNaac pull-right" data-loading-text="<i class='fa fa-circle-o-notch fa-spin'></i> Processing"> <?php echo $this->lang->line('save'); ?></button> <input type="reset" name="resetbutton" id="resetbutton" style="display:none"> <button type="button" style="display: none;" id="clearform" onclick="clearForm(this.form)" class="btn btn-primary submit_addNaac pull-right" data-loading-text="<i class='fa fa-circle-o-notch fa-spin'></i> Processing"> <?php echo $this->lang->line('clear'); ?></button> </div> </form> </div> </div> </div> </div> </div> <script type="text/javascript"> function addNaac() { $('#addnaac').modal({ show: true, backdrop: 'static', keyboard: false }); } function clearForm(oForm) { var elements = oForm.elements; for (i = 0; i < elements.length; i++) { field_type = elements[i].type.toLowerCase(); switch (field_type) { case "text": case "password": case "hidden": elements[i].value = ""; break; case "select-one": case "select-multi": elements[i].selectedIndex = ""; break; default: break; } } } $(document).ready(function (e) { $("#addnaac_form").on('submit', (function (e) { e.preventDefault(); $.ajax({ url: "<?php echo site_url("admin/staffnaac/add_staff_naac") ?>", type: "POST", data: new FormData(this), dataType: 'json', contentType: false, cache: false, processData: false, success: function (data) { if (data.status == "fail") { var message = ""; $.each(data.error, function (index, value) { message += value; }); errorMsg(message); } else { successMsg(data.message); window.location.reload(true); } } }); })); }); function getSectionByClass(class_id, section_id) { if (class_id != "" && section_id != "") { $('#section_id').html(""); var base_url = '<?php echo base_url() ?>'; var div_data = '<option value=""><?php echo $this->lang->line('select'); ?></option>'; $.ajax({ type: "GET", url: base_url + "sections/getByClass", data: {'class_id': class_id}, dataType: "json", success: function (data) { $.each(data, function (i, obj) { var sel = ""; if (section_id == obj.section_id) { sel = "selected"; } div_data += "<option value=" + obj.section_id + " " + sel + ">" + obj.section + "</option>"; }); $('#section_id').append(div_data); } }); } } $(document).ready(function () { var class_id = $('#class_id').val(); var section_id = '<?php echo set_value('section_id') ?>'; getSectionByClass(class_id, section_id); $(document).on('change', '#class_id', function (e) { $('#section_id').html(""); var class_id = $(this).val(); var base_url = '<?php echo base_url() ?>'; var div_data = '<option value=""><?php echo $this->lang->line('select'); ?></option>'; $.ajax({ type: "GET", url: base_url + "sections/getByClass", data: {'class_id': class_id}, dataType: "json", success: function (data) { $.each(data, function (i, obj) { div_data += "<option value=" + obj.section_id + ">" + obj.section + "</option>"; }); $('#section_id').append(div_data); } }); }); }); </script>