File manager - Edit - /home/wwwroot/camplus.hk/master.camplus.hk/public_html/application/modules/leave_sub/views/substitution.php
Back
<!-- BEGIN DATATABLE SCRIPTS --> <link href="<?php echo base_url(); ?>assets/custom/datatables/datatables.min.css" rel="stylesheet" > <script src="<?php echo base_url(); ?>assets/custom/datatables/datatables.min.js"></script> <script src="<?php echo base_url(); ?>assets/global/plugins/datatables/plugins/bootstrap/datatables.bootstrap.js"></script> <script src="<?php echo base_url(); ?>assets/custom/js/camplus-datatable.js"></script> <!-- END DATATABLE SCRIPTS --> <!-- BEGIN FILEINPUT SCRIPTS --> <link href="<?php echo base_url(); ?>assets/global/plugins/bootstrap-fileinput/bootstrap-fileinput.css" rel="stylesheet" > <script src="<?php echo base_url(); ?>assets/global/plugins/bootstrap-fileinput/bootstrap-fileinput.js"></script> <!-- END FILEINPUT SCRIPTS --> <div class="portlet light bordered"> <div class="portlet-title"> <div class="caption"> <i class="icon-doc font-dark"></i> <span class="bold"><?php echo $pagetitle; ?></span> </div> </div> <div class="portlet-body"> <table class="table table-striped table-bordered table-hover dataTable" id="data_table"> <thead> <tr> <th><?php echo $this->lang->line('date'); ?></th> <th><?php echo $this->lang->line('user'); ?></th> <th><?php echo $this->lang->line('lesson'); ?></th> <th><?php echo $this->lang->line('venue'); ?></th> <th><?php echo $this->lang->line('marks'); ?></th> <th><?php echo $this->lang->line('status'); ?></th> <th><?php echo $this->lang->line('actions'); ?></th> </tr> </thead> <tbody> <!-- load variables from controller --> <?php foreach($mysubstitution as $key => $value): ?> <tr class="odd gradeX"> <td><?php echo $value['date'];?></td> <td><?php echo allUsers($value['leave_uid'],1); ?></td> <td><?php echo $value['c_title'].' '.$value['name_eng'] . ' (' . $value['time_from'] .'-' . $value['time_to'] . ')'?></td> <td><?php echo $value['v_title']; ?></td> <td><?php echo explode(';',$value['marks'])[0]; ?></td> <td> <?php if($value['status']=='Pending'){?><span class="label label-sm label-warning">Pending <span> <?php } else if($value['status']=='Confirmed'){?> <span class="label label-sm label-success"> Confirmed <span> <?php } else{?> <span class="label label-sm label-danger"> Cancelled <span> <?php } ?> </td> <td> <?php if($value['status']!='Confirmed'){?> <a class="btn btn-xs blue actionModal" data-action="Confirm" data-status="Confirmed" data-id="<?php echo $value['id']; ?>" data-toggle="modal" href="#actionModal" > <i class="fa fa-check"></i> <?php echo $this->lang->line('confirmed'); ?> </a> <?php }?> <a class="btn btn-xs red actionModal" data-action="Cancel" data-status="Cancelled" data-id="<?php echo $value['id'];?>" data-toggle="modal" href="#actionModal" > <i class="fa fa-close"></i> <?php echo $this->lang->line('cancel'); ?> </a> </td> </tr> <?php endforeach; ?> </tbody> </table> </div> </div> <div id="addModal" class="modal fade" tabindex="-1" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <form method="post" action="<?php echo base_url(); ?>xxxxxx/xxxxxx/add" class="createxxxxxxForm"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button> <h4 class="modal-title"><?php echo $this->lang->line('create'); ?> <?php echo $pagetitle; ?></h4> </div> <div class="modal-body"> <div class="scroller" style="height:300px" data-always-visible="1" data-rail-visible="1"> <div class="form-group"> <label class="control-label"><?php echo $this->lang->line('xxxxxx'); ?><span class="required">*</span></label> <input type="text" name="xxxxxx" class="form-control" required> </div> <div class="form-group"> <label class="control-label"><?php echo $this->lang->line('xxxxxx'); ?></label> <select class="select2" name="xxxxxx"> <option value="">Select Special Venue</option> <?php foreach ($examples as $key => $example) { ?> <option value="<?php echo $example['id']?>"><?php echo $example['title']?></option> <?php } ?> </select> </div> <div class="form-group"> <label class="mt-checkbox mt-checkbox-single mt-checkbox-outline"> <input type="checkbox" value="1" name="status" class="form-control" checked> <?php echo $this->lang->line('enable'); ?> <span></span> </label> </div> </div> </div> <div class="modal-footer"> <button type="button" data-dismiss="modal" class="btn default"><?php echo $this->lang->line('close'); ?></button> <input type="submit" class="btn green" value="<?php echo $this->lang->line('create'); ?>"> </div> </form> </div> </div> </div> <div id="editModal" class="modal fade" tabindex="-1" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <form method="post" action="" class="editxxxxxxForm"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button> <h4 class="modal-title"><?php echo $this->lang->line('edit'); ?> <?php echo $pagetitle; ?></h4> </div> <div class="modal-body"> <div class="scroller" style="height:300px" data-always-visible="1" data-rail-visible="1"> <div class="form-group"> <label class="control-label"><?php echo $this->lang->line('xxxxxx'); ?><span class="required">*</span></label> <input type="text" name="xxxxxx" class="form-control" required> </div> <div class="form-group"> <label class="control-label"><?php echo $this->lang->line('xxxxxx'); ?></label> <select class="select2" name="xxxxxx"> <option value="">Select Special Venue</option> <?php foreach ($examples as $key => $example) { ?> <option value="<?php echo $example['id']?>"><?php echo $example['title']?></option> <?php } ?> </select> </div> <div class="form-group"> <label class="mt-checkbox mt-checkbox-single mt-checkbox-outline"> <input type="checkbox" value="1" name="status" class="form-control" checked> <?php echo $this->lang->line('enable'); ?> <span></span> </label> </div> </div> </div> <div class="modal-footer"> <button type="button" data-dismiss="modal" class="btn default"><?php echo $this->lang->line('close'); ?></button> <input type="submit" class="btn green" value="<?php echo $this->lang->line('edit'); ?>"> </div> </form> </div> </div> </div> <div id="actionModal" class="modal fade" tabindex="-1" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button> <h4 class="modal-title"><span class="actionEventTitle"></span> <?php echo $pagetitle; ?></h4> </div> <div class="modal-body"> <h4><?php echo $this->lang->line('are_you_sure'); ?></h4> </div> <div class="modal-footer"> <button type="button" data-dismiss="modal" class="btn default"><?php echo $this->lang->line('close'); ?></button> <a href="" type="button" class="btn default green confirmAction"><?php echo $this->lang->line('yes'); ?></a> </div> </div> </div> </div> <div id="importModal" class="modal fade" tabindex="-1" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button> <h4 class="modal-title"><?php echo $this->lang->line('import'); ?> <?php echo $pagetitle; ?></h4> </div> <form method="post" action="<?php echo base_url(); ?>xxxxxx/xxxxxx/import/" enctype="multipart/form-data"> <div class="modal-body"> <div class="scroller" style="height:50px" data-always-visible="1"> <div class="fileinput fileinput-new" data-provides="fileinput" style="padding: 10px;"> <div class="input-group input-large"> <div class="form-control uneditable-input input-fixed input-medium" data-trigger="fileinput"> <i class="fa fa-file"></i> <span class="fileinput-filename"></span> </div> <span class="input-group-addon btn default btn-file"> <span class="fileinput-new"><?php echo $this->lang->line('select_file'); ?></span> <span class="fileinput-exists"><?php echo $this->lang->line('change'); ?></span> <input type="file" name="xxxxxx" required> </span> <a href="javascript:;" class="input-group-addon btn red fileinput-exists" data-dismiss="fileinput"><?php echo $this->lang->line('remove'); ?></a> </div> </div> </div> </div> <div class="modal-footer"> <button type="button" data-dismiss="modal" class="btn default"><?php echo $this->lang->line('close'); ?></button> <button type="submit" class="btn default green" data-action=""><?php echo $this->lang->line('import'); ?></button> </div> </form> </div> </div> </div> <script> $(document).ready(function(){ initTable(); $(document).on('click','.actionModal',function(){ $('#actionModal span.actionEventTitle').html($(this).attr('data-action')); //$('#actionModal span.actionEvent').html($(this).attr('data-action')); $('a.confirmAction').attr('href', BASE_URL + 'leave_sub/substitution/action/' + $(this).attr('data-id') +'/'+$(this).attr('data-status')); }); $(document).on('click','.editxxxxxx',function(){ var id = $(this).attr('data-id'); $.ajax({ type: "POST", url: BASE_URL + "xxxxxx/xxxxxx/get/" + $(this).attr('data-id'), dataType: "json", success: function(data) { console.log($('#editModal select[name=xxxxxx]')); $('#editModal input[name=xxxxxx]').val(data['xxxxxx']); $('#editModal select[name=xxxxxx]').val(data['xxxxxx']).change(); if(data['xxxxxx']==1){ $('#editModal input[name=xxxxxx]').attr('checked','checked'); $('#editModal input[name=xxxxxx]').parent().addClass('checked'); } $('#editModal').modal('show'); $('.editxxxxxxForm').attr('action',BASE_URL+'xxxxxx/xxxxxx/edit/'+id); $('.editxxxxxxForm').validate(); } }); }); }); </script>
| ver. 1.4 |
Github
|
.
| PHP 7.2.34 | Generation time: 0.18 |
proxy
|
phpinfo
|
Settings