Example #1
0
 /**
 	| @name
 	|      - fmt_jason_data_map
 	|
 	| @params
 	|      - 
 	|
 	| @return
 	|      - 
 	|
 	| @description
 	|      - jason-data formatter
 	|
 	**/
 function fmt_jason_data_map($role_list = null, $page = 1, $total = 0, $draw = 1)
 {
     //init jason-data
     $jres = "{  \"draw\": {$draw},\n\t\t\t    \"recordsTotal\"   : {$total},\n          \t\t    \"recordsFiltered\": {$total},\n\t\t\t    \"data\": [\n\t\t\t   ";
     //more
     foreach ($role_list as $kk => $vv) {
         $mhash = u_encrypt_hash($vv->id);
         //delete
         $seq = array('secuser', 'dmap', @rawurlencode($mhash), @rawurlencode("{$vv->id}"));
         $dhref = '<a class="btn btn-primary btn-xs" href="' . site_url($seq) . '">Delete</a>';
         $hrefs = "&nbsp;{$dhref}";
         $yesnolist = $this->config->item('LIST_YESNO');
         $utypelist = $this->config->item('LIST_USERTYPE');
         $explist = $this->config->item('LIST_EXPIRY');
         //delete
         $jres .= '     [ ' . '"' . addslashes($vv->id) . '",' . '"' . addslashes($vv->user_name) . '",' . '"' . addslashes($vv->operator_name) . '",' . '"' . addslashes($vv->dateadd) . '",' . '"' . addslashes($hrefs) . '" ' . "],\n";
         $dmp = @var_export($vv, true);
         log_message("INFO", "fmt_jason_data_map() : info [ {$dmp} ] ");
     }
     //trim
     $jres = substr($jres, 0, strlen($jres) - 2);
     $jres .= "\n]}\n";
     //tracing ;-)
     log_message("INFO", "fmt_jason_data_map() : info [ {$jres} ] ");
     //give it back
     return $jres;
 }
| status msgs here ;-)
*/
include_once 'msg.php';
?>
			<!--//status//-->
            <div class="row">
                <div class="col-lg-12">
                  
			<div class="form-group">
			<table class="table table-hover">
			    <tbody>
			    <tr>
				<td width="120">
					<div class="list-group">
					<?php 
$mhash = u_encrypt_hash($jData->user_id);
//reset
$seq = array('secuser', 'details', @rawurlencode($mhash), @rawurlencode("{$jData->user_id}"));
?>
					<a href="<?php 
echo site_url($seq);
?>
" class="list-group-item list-group-item-warning">
					Location List(s) of &raquo;&raquo <?php 
echo $jData->username;
?>
</a>
					<?php 
$ctr = 0;
foreach ($jData_location_list as $kk => $vv) {
    $ctr++;
Example #3
0
 /**
 	| @name
 	|      - chpass
 	|
 	| @params
 	|      - 
 	|
 	| @return
 	|      - 
 	|
 	| @description
 	|      - show the change pwd form
 	|
 	**/
 function chpass()
 {
     //perms
     $this->etc->check_permission('USER.CHANGE.PASS');
     //get uid
     $uid = $this->etc->get_id();
     $email = $this->etc->get_email();
     $hash = u_encrypt_hash($uid);
     //get rec
     $gdata = $this->user_model->select_by_id(array('id' => $uid));
     //invalid id
     if (!$gdata['status']) {
         //set status
         $this->etc->set_error_message($this->config->item('CHANGE_PWD_ERR_NO_DATA'));
         //fwd
         redirect(site_url('admin'));
         return;
     }
     $vdata['jData_Total'] = 0;
     $vdata['jData'] = $gdata['data'];
     $vdata['jData_Hidden'] = array('id' => $uid, 'hash' => $hash, 'email' => $email);
     //view
     $this->load->view('user.chpass.frm.php', $vdata);
 }
Example #4
0
 /**
 	| @name
 	|      - fmt_jason_data
 	|
 	| @params
 	|      - 
 	|
 	| @return
 	|      - 
 	|
 	| @description
 	|      - jason-data formatter
 	|
 	**/
 function fmt_jason_data($role_list = null, $page = 1, $total = 0, $draw = 1)
 {
     //init jason-data
     $jres = "{  \"draw\": {$draw},\n\t\t\t    \"recordsTotal\"   : {$total},\n          \t\t    \"recordsFiltered\": {$total},\n\t\t\t    \"data\": [\n\t\t\t   ";
     //more
     foreach ($role_list as $kk => $vv) {
         //get the sub-Locations
         $sub_oper = $this->operator_model->select_operators(array('id' => $vv->id));
         $sub_chld = $this->operator_model->select_children(array('id' => $vv->id));
         $mhash = u_encrypt_hash($vv->id);
         //edit
         $seq = array('location', 'efrm', @rawurlencode($mhash), @rawurlencode("{$vv->id}"));
         $ehref = '<a class="btn btn-primary btn-xs" href="' . site_url($seq) . '">Edit</a>';
         $seq = array('location', 'dfrm', @rawurlencode($mhash), @rawurlencode("{$vv->id}"));
         $dhref = '<a class="btn btn-primary btn-xs" href="' . site_url($seq) . '">Delete</a>';
         $hrefs = $ehref . "&nbsp;&nbsp;" . $dhref;
         $parntX = @count($sub_oper);
         $parnt = sprintf("<span class=\"glyphicon glyphicon-user\">&nbsp; %d</span>", $parntX);
         $seq = array('location', 'details', @rawurlencode($mhash), @rawurlencode("{$vv->id}"));
         $chldsX = @count($sub_chld);
         $dhref = '<a class="btn btn-primary btn-xs" href="' . site_url($seq) . "\">{$chldsX}</a>";
         if ($chldsX <= 0) {
             $dhref = $chldsX;
         }
         $chlds = sprintf("<span class=\"glyphicon glyphicon-cog\">&nbsp; {$dhref}</span>", $chldsX);
         //delete
         $jres .= '     [ ' . '"' . addslashes($vv->code) . '",' . '"' . addslashes($vv->description) . '",' . '"' . addslashes($vv->moperator_code) . '",' . '"' . addslashes($vv->dateadd) . '",' . '"' . addslashes($hrefs) . '" ' . "],\n";
     }
     //trim
     $jres = substr($jres, 0, strlen($jres) - 2);
     $jres .= "\n]}\n";
     //tracing ;-)
     log_message("INFO", "fmt_jason_data() : info [ {$jres} ] ");
     //give it back
     return $jres;
 }
Example #5
0
 /**
 	| @name
 	|      - fmt_jason_data_traffic
 	|
 	| @params
 	|      - 
 	|
 	| @return
 	|      - 
 	|
 	| @description
 	|      - jason-data formatter
 	|
 	**/
 function fmt_jason_data_traffic($role_list = null, $page = 1, $total = 0, $draw = 1)
 {
     $parsestats = $this->config->item('LIST_PARSECSV');
     //init jason-data
     $jres = "{  \"draw\": {$draw},\n\t\t\t    \"recordsTotal\" : {$total},\n          \t\t    \"recordsFiltered\": {$total},\n\t\t\t    \"data\": [\n\t\t\t   ";
     //more
     foreach ($role_list as $kk => $vv) {
         $mhash = u_encrypt_hash($vv->trafficrecap_id);
         //delete
         $jres .= '     [ ' . '"' . addslashes($vv->trafficrecap_id) . '",' . '"' . addslashes($vv->operator_code) . '",' . '"' . addslashes($vv->traffic_code) . '",' . '"' . addslashes($vv->job_id) . '",' . '"' . addslashes($vv->station_code) . '",' . '"' . addslashes($vv->dateshift) . '",' . '"' . addslashes($vv->shift_code) . '",' . '"' . addslashes($vv->user_code) . '",' . '"' . addslashes($vv->created_dt) . '" ' . "],\n";
     }
     //trim
     $jres = substr($jres, 0, strlen($jres) - 2);
     $jres .= "\n]}\n";
     //tracing ;-)
     log_message("INFO", "fmt_jason_data_traffic() : info [ {$jres} ] ");
     //give it back
     return $jres;
 }
Example #6
0
 /**
 	| @name
 	|      - fmt_jason_data
 	|
 	| @params
 	|      - 
 	|
 	| @return
 	|      - 
 	|
 	| @description
 	|      - jason-data formatter
 	|
 	**/
 function fmt_jason_data($role_list = null, $page = 1, $total = 0, $draw = 1)
 {
     //init jason-data
     $jres = "{  \"draw\": {$draw},\n\t\t\t    \"recordsTotal\" : {$total},\n          \t\t    \"recordsFiltered\": {$total},\n\t\t\t    \"data\": [\n\t\t\t   ";
     //more
     foreach ($role_list as $kk => $vv) {
         $mhash = u_encrypt_hash($vv->id);
         //edit
         $seq = array('csv', 'efrm', @rawurlencode($mhash), @rawurlencode("{$vv->id}"));
         $ehref = '<a class="btn btn-primary btn-xs" href="' . site_url($seq) . '">Edit</a>';
         $seq = array('csv', 'dfrm', @rawurlencode($mhash), @rawurlencode("{$vv->id}"));
         $dhref = '<a class="btn btn-primary btn-xs" href="' . site_url($seq) . '">Delete</a>';
         $hrefs = "&nbsp;" . $dhref;
         //delete
         $jres .= '     [ ' . '"' . addslashes($vv->csv_file) . '",' . '"' . addslashes($vv->description) . '",' . '"' . addslashes($vv->csv_hash) . '",' . '"' . addslashes($vv->dateadd) . '",' . '"' . addslashes($hrefs) . '" ' . "],\n";
     }
     //trim
     $jres = substr($jres, 0, strlen($jres) - 2);
     $jres .= "\n]}\n";
     //tracing ;-)
     log_message("INFO", "fmt_jason_data() : info [ {$jres} ] ");
     //give it back
     return $jres;
 }
Example #7
0
 /**
 	| @name
 	|      - pls_remember_me
 	|
 	| @params
 	|      - 
 	|
 	| @return
 	|      - 
 	|
 	| @description
 	|      - 
 	|
 	**/
 function pls_remember_meX()
 {
     //get the value ;-)
     $cook = u_remember_me_get();
     if (strlen($cook)) {
         //decrypt it ;-)
         $email = u_remember_me_decrypt($cook);
         //get info
         $udata = $this->CI->secuser_model->select_by_name(array('name' => $email));
         $dmp = @var_export($udata, true);
         log_message('DEBUG', "pls_remember_meX() : info [ {$dmp} ]");
         //validate details ;-)
         if ($udata['status'] > 0) {
             //set data
             $user_sess_data = array('sess_user_email' => $udata['data']->username, 'sess_user_id' => $udata['data']->user_id, 'sess_user_name' => $udata['data']->username, 'sess_user_type' => $udata['data']->usertype, 'sess_role_id' => $udata['data']->usertype, 'sess_user_is_expired' => $udata['data']->expired, 'sess_user_logged' => 1, 'sess_user_trial' => $udata['data']->trial, 'sess_user_fieldtrial' => $udata['data']->fieldtrial, 'sess_user_loginnumber' => $udata['data']->loginnumber, 'sess_user_expire_dt' => $udata['data']->expire_dt, 'sess_user_can_change' => $udata['data']->can_change, 'sess_user_can_expired' => $udata['data']->can_expired, 'sess_user_mhash' => u_encrypt_hash($udata['data']->user_id));
             $this->CI->session->set_userdata($user_sess_data);
         }
     }
 }