/** | @name | - efrm | | @params | - | | @return | - | | @description | - show the edit form confirmation msg | **/ function details($hash = null, $id = 0) { //perms $this->etc->check_permission('SEC_USER.VIEW'); //params log_message("INFO", "details() : info-params [ {$hash} : {$id} ]"); //calc-hash $hstatus = u_decrypt_hash($id, $hash); //invalid id if (!$hstatus) { //set status $this->etc->set_error_message($this->config->item('SECUSER_UPD_UNKNOWN_REC_MSG')); //fwd redirect(site_url("secuser/view")); return; } //get rec $gdata = $this->secuser_model->select_by_id(array('id' => $id)); //invalid id if (!$gdata['status']) { //set status $this->etc->set_error_message($this->config->item('SECUSER_UPD_UNKNOWN_REC_MSG')); //fwd redirect(site_url("secuser/view")); return; } $yesnolist = $this->config->item('LIST_YESNO'); $utypelist = $this->config->item('LIST_USERTYPE_ROOT'); $explist = $this->config->item('LIST_EXPIRY'); $actlist = $this->config->item('LIST_ACTIVE'); //set data $gdatax = $gdata; $gdatax['data']->usertype = $utypelist[$gdata['data']->usertype]; $gdatax['data']->can_change = $yesnolist[$gdata['data']->can_change]; $gdatax['data']->can_expired = $yesnolist[$gdata['data']->can_expired]; $gdatax['data']->flag_id = $actlist[$gdata['data']->flag_id]; $vdata['jData_Total'] = 0; $vdata['jData_Details'] = $gdatax['data']; $vdata['jData_Hidden'] = array('id' => $id, 'hash' => $hash, 'gdata' => $gdata['data']); //view $this->load->view('secuser.view.details.frm.php', $vdata); }
/** | @name | - eprof_proc | | @params | - | | @return | - | | @description | - show the edit form | **/ function eprof_proc() { //perms $this->etc->check_permission('USER.PROFILE.EDIT'); //get chk post $id = trim($this->input->get_post('id')); $hash = trim($this->input->get_post('hash')); //params log_message("INFO", "eprof_proc() : info-params [ {$hash} : {$id} ]"); //calc-hash $hstatus = u_decrypt_hash($id, $hash); //set data $vdata['jData_Total'] = 0; $vdata['jData'] = $gdata['data']; $vdata['jData_Hidden'] = array('id' => $id, 'hash' => $hash, 'email' => $gdata['data']->email); //invalid id if (!$hstatus) { //set status $vdata['error_message'] = $this->config->item('USER_UPD_PROFILE_UNKNOWN_REC_MSG'); log_message("INFO", "eprof_proc() : info [ DECRYPT FAILED ]"); //view $this->load->view('user.eprof.frm.php', $vdata); return; } //get rec $gdata = $this->user_model->select_by_id(array('id' => $id)); //invalid id if (!$gdata['status']) { //set status $vdata['error_message'] = $this->config->item('USER_UPD_PROFILE_UNKNOWN_REC_MSG'); log_message("INFO", "eprof_proc() : info [ NOT IN DB ]"); //view $this->load->view('user.eprof.frm.php', $vdata); return; } //set p-data $pdata = null; $pdata['email'] = $gdata['data']->email; $pdata['mobile'] = trim($this->input->get_post('mobile')); $pdata['name'] = trim($this->input->get_post('name')); $pdata['updated_by'] = $this->etc->get_created_by(); $pdata['id'] = $id; //upd8 it;-) $ddata = $this->user_model->update_profile($pdata); if ($ddata['status']) { //set status $this->etc->set_success_message($this->config->item('USER_UPD_PROFILE_OK_MSG')); } else { //set status $this->etc->set_error_message($this->config->item('USER_UPD_PROFILE_ERR_MSG')); } //fwd redirect(site_url('admin')); return; }
/** | @name | - dfrm_proc | | @params | - | | @return | - | | @description | - show the delete form confirmation msg | **/ function dfrm_proc() { //perms $this->etc->check_permission('CSV.DELETE'); //get chk post $id = trim($this->input->get_post('id')); $hash = trim($this->input->get_post('hash')); //params log_message("INFO", "dfrm_proc() : info-params [ {$hash} : {$id} ]"); //cancel? if ($this->input->get_post('submitCancel')) { //set status log_message("INFO", "dfrm_proc() : info [ CANCELLED ]"); //fwd redirect(site_url("csv/view")); return; } //calc-hash $hstatus = u_decrypt_hash($id, $hash); //invalid id if (!$hstatus) { //set status $this->etc->set_error_message($this->config->item('CSV_DEL_UNKNOWN_REC_MSG')); log_message("INFO", "dfrm_proc() : info [ DECRYPT FAILED ]"); //fwd redirect(site_url("csv/view")); return; } //get rec $gdata = $this->csv_mgmt_model->select_by_id(array('id' => $id)); //invalid id if (!$gdata['status']) { //set status $this->etc->set_error_message($this->config->item('CSV_DEL_UNKNOWN_REC_MSG')); log_message("INFO", "dfrm_proc() : info [ NOT IN DB ]"); //fwd redirect(site_url("csv/view")); return; } //delete it;-) $ddata = $this->csv_mgmt_model->delete(array('id' => $id)); if ($ddata['status']) { //set status $this->etc->set_success_message($this->config->item('CSV_DEL_OK_MSG')); } else { //set status $this->etc->set_error_message($this->config->item('CSV_DEL_UNKNOWN_REC_MSG')); } //fwd redirect(site_url("csv/view")); return; }
/** | @name | - efrm | | @params | - | | @return | - | | @description | - show the edit form confirmation msg | **/ function maplocdetails($hash = null, $id = 0) { //perms $this->etc->check_permission('LOCATION.MAP.VIEW.DETAILS'); //params log_message("INFO", "maploc() : info-params [ {$hash} : {$id} ]"); //calc-hash $hstatus = u_decrypt_hash($id, $hash); //invalid id if (!$hstatus) { //set status $this->etc->set_error_message($this->config->item('LOCATION_UPD_UNKNOWN_REC_MSG')); //fwd redirect(site_url("operator/view")); return; } //get rec $gdata = $this->secuser_model->select_by_id(array('id' => $id)); //invalid id if (!$gdata['status']) { //set status $this->etc->set_error_message($this->config->item('LOCATION_UPD_UNKNOWN_REC_MSG')); //fwd redirect(site_url("operator/view")); return; } //get the sub-operators $vdata['jData_Total'] = 0; $vdata['jData'] = $gdata['data']; $vdata['jData_location_list'] = $this->get_map_checklist($id); //view $this->load->view('location.map.details.frm.php', $vdata); }
/** | @name | - efrm | | @params | - | | @return | - | | @description | - show the edit form confirmation msg | **/ function details($hash = null, $id = 0) { //perms $this->etc->check_permission('OPERATOR.VIEW'); //params log_message("INFO", "details() : info-params [ {$hash} : {$id} ]"); //calc-hash $hstatus = u_decrypt_hash($id, $hash); //invalid id if (!$hstatus) { //set status $this->etc->set_error_message($this->config->item('OPERATOR_UPD_UNKNOWN_REC_MSG')); //fwd redirect(site_url("operator/view")); return; } //get rec $gdata = $this->operator_model->select_by_id(array('id' => $id)); //invalid id if (!$gdata['status']) { //set status $this->etc->set_error_message($this->config->item('OPERATOR_UPD_UNKNOWN_REC_MSG')); //fwd redirect(site_url("operator/view")); return; } //get the sub-operators $rdata = $this->operator_model->select_children(array('id' => $id)); //set data $vdata['jData_Title'] = strtoupper($gdata['data']->code); $vdata['jData_details_list'] = $rdata; $dmp = @var_export($rdata, true); log_message("INFO", "details() : info-params [ {$dmp};]"); //set data $vdata['jData_Total'] = 0; $vdata['jData'] = $gdata['data']; $vdata['jData_Hidden'] = array('id' => $id, 'hash' => $hash, 'code' => $gdata['data']->code); //view $this->load->view('operator.view.details.frm.php', $vdata); }