whoami7 - Manager
:
/
proc
/
self
/
root
/
home
/
papecmvm
/
public_html
/
application
/
views
/
webapp
/
Upload File:
files >> //proc/self/root/home/papecmvm/public_html/application/views/webapp/office.php
<?php require_once(APPPATH.'views/webapp/header.php');?> <?php require_once(APPPATH.'views/webapp/menu.php');?> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <h1> <?php if(!empty($customer)){echo $customer;}else{echo 'Office';} ?> </h1> <ol class="breadcrumb"> <li><a href="<?php echo site_url('webapp/welcome')?>"><i class="fa fa-dashboard"></i> Dashboard</a></li> <li class="active"><?php if(!empty($customer)){echo $customer;}else{echo 'Office';} ?></li> </ol> </section> <!-- Main content --> <section class="content"> <?php $attributes = array('id' => 'formid'); echo form_open("",$attributes); ?> <!-- /.row --> <div class="row"> <div class="col-xs-12"> <div class="box box-primary"> <div class="box-header"> <div class="text-left"> <!---<button class="btn btn-danger" id='deletedata' type="button"><i class="fa fa-trash"></i> Trash </button>--> <?php if(empty($customer)){ ?> <a href="<?php echo base_url(); ?>webapp/people/add_user" class="btn btn-primary"> Add User </a> <?php } ?> </div> </div><!-- /.box-header --> <?php //if($userdata[0]['type'] == 'admin'){ ?> <div class="box-body"> <?php if($this->session->flashdata('msg')){ echo $this->session->flashdata('msg'); } ?> <?php //echo "<pre>"; print_r($userdata); echo "</pre>"; ?> <?php if(!empty($customer && $_SESSION['reg_info'][0]['type'] == 'admin') || !empty($customer && $_SESSION['reg_info'][0]['type'] == 'superadmin')){ ?> <div class="row"> <div class="col-sm-5"> <label class="pull-right"> <input id="search_c" type="search" class="form-control input-sm" placeholder="Search AdCust"> </label> </div> <div class="col-sm-5"> <select class="form-control" name="TeamLeader" id="TeamLeader" onchange="setLeader($(this))"> <option value="">--Select Team Leader Name--</option> <?php foreach ($Team_Leader as $k => $v) { ?> <option value="<?php echo $v['rid']; ?>"><?php echo $v['name']; ?></option> <?php } ?> </select> </div> <div class="col-sm-2"> <button class="btn btn-info" type="button" onclick="assignto_test()">SAVE</button> </div> </div> <?php } else if(!empty($customer) && $_SESSION['reg_info'][0]['type'] == 'team_leader'){ ?> <label class="pull-right"> <input id="search_cust_team" type="search" class="form-control input-sm" placeholder="Search Team"> </label> <?php } else { ?> <label class="pull-right"> <input id="search" type="search" class="form-control input-sm" placeholder="Search AdOffice"> </label> <?php } ?> <?php if(!empty($customer && $_SESSION['reg_info'][0]['type'] == 'admin') || !empty($customer && $_SESSION['reg_info'][0]['type'] == 'superadmin')){ ?> <div class="row" style="margin-top: 1rem;margin-bottom: 1rem;"> <div class="col-sm-12"> <a href="<?php echo base_url(); ?>webapp/people/customer" class="btn btn-primary">All Customer <span class="badge"><?php echo $All_Customer; ?></span></a> <a href="<?php echo base_url(); ?>webapp/people/EmailVerified" class="btn btn-success">Email Verified <span class="badge"><?php echo $EmailVerified; ?></span></a> <a href="<?php echo base_url(); ?>webapp/people/EmailPending" class="btn btn-danger">Email Pending <span class="badge"><?php echo $EmailPending; ?></span></a> <a href="<?php echo base_url(); ?>webapp/people/PaymentDone" class="btn btn-success">Payment Done <span class="badge"><?php echo $PaymentDone; ?></span></a> <a href="<?php echo base_url(); ?>webapp/people/PaymentPending" class="btn btn-danger">Payment Pending <span class="badge"><?php echo $PaymentPending; ?></span></a> <?php /*<button class="btn btn-primary" type="button">All Customer <span class="badge"><?php echo $All_Customer; ?></span></button> <button onclick="EmailVerified()" class="btn btn-success" type="button">Email Verified <span class="badge"><?php echo $EmailVerified; ?></span></button> <button class="btn btn-danger" type="button">Email Pending <span class="badge"><?php echo $EmailPending; ?></span></button> <button class="btn btn-success" type="button">Payment Done <span class="badge"><?php echo $PaymentDone; ?></span></button> <button class="btn btn-danger" type="button">Payment Pending <span class="badge"><?php echo $PaymentPending; ?></span></button>*/ ?> </div> </div> <?php } ?> <table id="" class="table table-bordered table-striped"> <thead> <tr> <?php if(!empty($customer && $_SESSION['reg_info'][0]['type'] == 'admin') || !empty($customer && $_SESSION['reg_info'][0]['type'] == 'superadmin')){ ?><th>#</th><?php } ?> <th>Name</th> <?php if($type == 'customer' && $_SESSION['reg_info'][0]['type'] == 'admin' || $type == 'customer' && $_SESSION['reg_info'][0]['type'] == 'superadmin'){ ?> <th>Team Leader Name</th> <?php } ?> <th>Email</th> <th>Username</th> <th>Mobile</th> <?php if($_SESSION['reg_info'][0]['type'] != 'team_leader'){ ?><th>Email Status</th><?php } ?> <?php if($type == 'customer' && $_SESSION['reg_info'][0]['type'] != 'team_leader'){ ?><th>Payment Status</th> <?php } ?> <th>Action</th> </tr> </thead> <tbody class="my_search"> <?php foreach($data as $key) { $encrypted_id = $this->model->encryptdata($key['rid']); ?> <tr> <?php if(!empty($customer && $_SESSION['reg_info'][0]['type'] == 'admin') || !empty($customer && $_SESSION['reg_info'][0]['type'] == 'superadmin')){ ?> <td> <input type="checkbox" class="customrid" onchange="setrids()" name="rid[]" value="<?=$key['rid']?>" /> </td> <?php } ?> <td class="text-capitalize"><a href="<?php echo base_url().'webapp/people/view/'.$encrypted_id; ?>"><?php echo $key['name']; ?></a><br> <span class="text-danger"> <?php if($key['type'] == 'team_leader'){ echo "Team Leader"; }elseif($key['type'] == 'office_user'){ echo "Office User"; }elseif($key['type'] == 'admin'){ echo "Admin"; }elseif($key['type'] == 'superadmin'){ echo "Super Admin"; } ?> </span> </td> <?php if($type == 'customer' && $_SESSION['reg_info'][0]['type'] == 'admin' || $type == 'customer' && $_SESSION['reg_info'][0]['type'] == 'superadmin'){ ?> <td><?php echo $key['leadername']; ?></td> <?php } ?> <td><?php echo $key['email']; ?></td> <td><?php echo $key['username']; ?></td> <td><?php echo $key['mobile']; ?></td> <?php if($key['status'] == '0'){ $click = "order_status(".$key["rid"]." , '0' )"; $os = '<span style="cursor:pointer" title="Click here to Verified" onclick="'.$click.'" class="badge bg-red">Pending</span>'; }else{ $os = '<span class="badge bg-green">Verified</span>'; } ?> <?php if($_SESSION['reg_info'][0]['type'] != 'team_leader'){ ?> <td><?php echo $os; ?> <?php /*if($key['status'] == '0'){ ?> <a href="<?php echo base_url().'webapp/people/deactive/'.$encrypted_id; ?>" data-toggle="tooltip" data-placement="top" title="Click here to Verified" aria-hidden="true"><span class="btn badge bg-red">Pending</span></a> <?php }else{ ?> <span class="badge bg-green">Verified</span> <?php }*/ ?> </td> <?php } ?> <?php if($type == 'customer' && $_SESSION['reg_info'][0]['type'] != 'team_leader'){ ?> <td> <?php if($key['payment_status'] == '1'){echo'<span class="badge bg-green">Done</span>';}else{ echo '<span class="badge bg-red">Pending</span>';} ?> </td> <?php } ?> <td> <a href="<?php echo base_url().'webapp/people/updateUser/'.$encrypted_id ?>" class="btn btn-primary"><i class="fa fa-pencil-square-o"></i></a> <?php if($key['type'] != 'admin' && $_SESSION['reg_info'][0]['type'] != 'team_leader'){ if($key['payment_status'] == '1'){ ?> <a href="<?php echo base_url().'webapp/people/deactive/'.$encrypted_id; ?>" class="btn btn-danger" data-toggle="tooltip" data-placement="top" title="Click here to deactive" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i></a> <?php }else{ ?> <a href="<?php echo base_url().'webapp/people/active/'.$encrypted_id; ?>" class="btn btn-success" data-toggle="tooltip" data-placement="top" title="click here to active" aria-hidden="true"><i class="fa fa-check" aria-hidden="true"></i></a> <?php } ?> <?php }elseif($_SESSION['reg_info'][0]['type'] == 'superadmin'){ if($key['payment_status'] == '1'){ ?> <a href="<?php echo base_url().'webapp/people/deactive/'.$encrypted_id; ?>" class="btn btn-danger" data-toggle="tooltip" data-placement="top" title="Click here to deactive" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i></a> <?php }else{ ?> <a href="<?php echo base_url().'webapp/people/active/'.$encrypted_id; ?>" class="btn btn-success" data-toggle="tooltip" data-placement="top" title="click here to active" aria-hidden="true"><i class="fa fa-check" aria-hidden="true"></i></a> <?php } ?> <?php } ?> </td> </tr> <?php } ?> </tbody> </table> <span class="page"> <?php echo $this->pagination->create_links(); ?> </span> </div><!-- /.box-body --> <?php //} ?> </div><!-- /.box --> </div> </div> <!-- /.row --> <?php echo form_close(); ?> </section><!-- /.content --> </div><!-- /.content-wrapper --> <div id="loadingDiv" style="display:none"> <div> <h7>Please wait...</h7> </div> </div> <script> function EmailVerified(){ alert('Emailverify'); var controller = 'webapp/people'; var base_url = '<?php echo site_url(); ?>'; $('#loadingDiv').show(); $.ajax({ 'url' : base_url + controller + '/EmailVerified', 'type' : 'POST', 'success' : function(data){ $('.my_search').html(data); } }); } function order_status(id, status){ //alert('hi'); var controller = 'webapp/people'; var base_url = '<?php echo site_url(); ?>'; var myclass = '.'+status+'_'+id; NProgress.start(); $.ajax({ 'url' : base_url + controller + '/orderStatus/'+id+'/'+status, 'type' : 'POST', 'dataType': "json", 'success' : function(data){ var html = data.html; var new_sts = data.new_sts; $('.'+status+'_'+id).html(html); $('.'+status+'_'+id).toggleClass(status+'_'+id+' '+new_sts+'_'+id); NProgress.done(); toastr.success("Customer Successfully Verified", "Success"); //location.reload(); setTimeout(function(){ location.reload() }, 1000); return true; } }); } </script> <script type="text/javascript"> $(document).on('keyup', '#search', function(e) { $(".page").hide(); var search = $(this).val(); var controller = 'webapp/people'; var base_url = '<?php echo site_url(); ?>'; $('#loadingDiv').show(); $.ajax({ 'url' : base_url + controller + '/search', 'type' : 'POST', 'data' : {'src':search}, 'success' : function(data){ if(search==''){ $('.my_search').html(''); default_office(); $(".page").show(); $('#loadingDiv').hide(); }else{ console.log(data); $('.my_search').html(data); $('#loadingDiv').hide(); } } }); }); function default_office(){ var controller = 'webapp/people'; var base_url = '<?php echo site_url(); ?>'; $('#loadingDiv').show(); $.ajax({ 'url' : base_url + controller + '/json_office_rec', 'type' : 'POST', 'success' : function(data){ $('.my_search').html(data); } }); } </script> <script type="text/javascript"> $(document).on('keyup', '#search_c', function(e) { $(".page").hide(); var search = $(this).val(); var controller = 'webapp/people'; var base_url = '<?php echo site_url(); ?>'; $('#loadingDiv').show(); $.ajax({ 'url' : base_url + controller + '/search_cust', 'type' : 'POST', 'data' : {'src':search}, 'success' : function(data){ if(search==''){ $('.my_search').html(''); default_cust(); $(".page").show(); $('#loadingDiv').hide(); }else{ console.log(data); $('.my_search').html(data); $('#loadingDiv').hide(); } } }); }); function default_cust(){ var controller = 'webapp/people'; var base_url = '<?php echo site_url(); ?>'; $('#loadingDiv').show(); $.ajax({ 'url' : base_url + controller + '/json_cust_rec', 'type' : 'POST', 'success' : function(data){ $('.my_search').html(data); } }); } </script> <script type="text/javascript"> $(document).on('keyup', '#search_cust_team', function(e) { $(".page").hide(); var search = $(this).val(); var controller = 'webapp/people'; var base_url = '<?php echo site_url(); ?>'; $('#loadingDiv').show(); $.ajax({ 'url' : base_url + controller + '/search_cust_team', 'type' : 'POST', 'data' : {'src':search}, 'success' : function(data){ if(search==''){ $('.my_search').html(''); default_cust_team(); $(".page").show(); $('#loadingDiv').hide(); }else{ console.log(data); $('.my_search').html(data); $('#loadingDiv').hide(); } } }); }); function default_cust_team(){ var controller = 'webapp/people'; var base_url = '<?php echo site_url(); ?>'; $('#loadingDiv').show(); $.ajax({ 'url' : base_url + controller + '/json_cust_team_rec', 'type' : 'POST', 'success' : function(data){ $('.my_search').html(data); } }); } </script> <script> function setrids(){ customobj.setridslogic() } function setLeader(obj){ customobj.setLeader(obj.val()) } const customobj = { assignto : '' , rids : [], setLeader : function(id){ this.assignto = id }, setridslogic : function(){ let temp = [] ; $(".customrid").each((i,v)=>{ if(document.getElementsByClassName('customrid')[i].checked){ temp.push(document.getElementsByClassName('customrid')[i].value) } }) this.rids = temp ; } } ; function assignto_test(){ var base_url = '<?php echo base_url("webapp/people"); ?>'; var redirURL = '<?php echo base_url("webapp/people/customer") ?>'; $.ajax({ 'url' : base_url + '/assignto', 'type' : 'POST', 'dataType' : 'json', 'data' :customobj , 'success' : function(result){ if (result.status == 'success') { toastr.success(result.message); //window.location.replace(redirURL); /*if(result.not_assigned.length > 0){ toastr.success(`${result.message} not assigned name is ${result.not_assigned_name}`); }else{ toastr.success(`${result.message}`); }*/ }else{ //alert(result.message); toastr.error(result.message); } } }); } </script> <?php require_once(APPPATH.'views/webapp/footer.php');?>
Copyright ©2021 || Defacer Indonesia