%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
<?php include APPPATH.'views/admin/includes/header.php';?> <div id="content-wrapper"> <div class="container-fluid"> <!-- Breadcrumbs--> <ol class="breadcrumb"> <li class="breadcrumb-item"> <a href="<?php echo site_url('admin/Dashboard'); ?>">Dashboard</a> </li> <li class="breadcrumb-item active">Role Manager</li> </ol> <!-- DataTables Example --> <div class="card mb-3 fomr-news1"> <div class="card-header card-header-new"> <h3><i class="fas fa-cog"></i> Role Manager </h3></div> <form method="post" name="role_manager"> <div class="row" data-select2-id="7" style="margin-top:20px;"> <div id="response_message_div"></div> <div class="col-xl-12" data-select2-id="6"> <div class="form-group m-form__group col-xl-5" data-select2-id="5" style="text-align:center;"> <label class="col-form-label">Select School<span class="text-danger">*</span> :</label> <div class="select" data-select2-id="4"> <select class="form-control" name="school_filter" id="school_filter"> <option value="">Select School</option> <?php foreach($schoolArray as $row) { ?> <option value="<?=$row['id']?>" <?php if($row['id']==$_POST['school_filter']) { echo 'selected'; }?>><?php echo $row['school_name'].'('.$row['school_code'].')'; ?></option> <?php } ?> </select> </div> </div> </div> </div> </form> </div> <div class="card-body table-body-new"> <div class="table-responsive"> <!---- Success Message ----> <?php //if ($this->session->flashdata('success')) { ?> <p style="color:green; font-size:18px;" id="response_message_div"><?php echo $this->session->flashdata('success'); ?></p> </div> <?php //} ?> <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0"> <thead> <tr> <th>Sr. No.</th> <th>Name</th> <th>Username</th> <th>Assigned Mentees</th> <th>Role</th> <th>Manage Mentor</th> </tr> </thead> <tbody> <?php if(count($userArray)) : $cnt=1; foreach ($userArray as $row) : ?> <tr> <td><?php echo htmlentities($cnt);?></td> <td><?php echo htmlentities($row['first_name'])?></td> <td><?php echo htmlentities($row['userName'])?></td> <td><?php echo $menteesArray[$row['id']]['mentees_count']?></td> <td><span id="rid_<?=$row['id']?>"><?php echo $roleArray[$row['role_id']]['role_name']?></span></td> <td><?php foreach($roleArray as $val){ if($val['id']>1) { ?><p><input type="checkbox" name="assign_role" id="assign_role" value="<?=$val['id']?>" onclick="return assignRole('<?=$row['id']?>','<?=$val['id']?>')" <?php if($row['role_id']==$val['id']) { echo 'checked'; }?> /> <?=$val['role_name']?> </p><?php } } ?></td> </tr> <?php $cnt++; endforeach; else : ?> <tr> <td colspan="6">No data available in table</td> </tr> <?php endif; ?> <div class="loading-div" style=" z-index: 30001;opacity: 0.8;position: fixed;top: 50%;left: 50%;transform: translate(-50%, -50%);display:none;"> <p><img width="100" src="<?=base_url('assests/imgs/loading.gif')?>"></p> </div> </tbody> </table> </div> </div> </div> <!-- /.container-fluid --> <!-- Sticky Footer --> <?php include APPPATH.'views/admin/includes/footer.php';?> <script src="<?php echo base_url(); ?>assets/js/jquery-3.0.0.js"></script> <script type='text/javascript'> function assignRole(mid,rid) { $('.loading-div').show(); $.ajax({ url:'<?= base_url('admin/managerole/setajaxrecord') ?>', method: 'post', data: {mentor_id: mid, role_id: rid}, dataType: 'json', success: function(response){ // Add options $('#response_message_div').html('Role changed successfully.'); $('.loading-div').hide(); $.each(response,function(i,value){ $('#rid_'+mid).html(''); $('#rid_'+mid).html(value); //window.setTimeout(function() { window.location.href = '<?= base_url('admin/managerole') ?>'; }, 2000); } ); return false; } }); } $(document).ready(function(){ $('#school_filter').change(function(){ this.form.submit(); }) }); </script>