public function getData(){ ///Validate if the user has been loggen in if (parent::allowAccess()){ echo $this->TransactionModel->get_data_paged(); } else{ //Deny Hacking Access parent::destroySession(); } }
function index(){ ///Validate if the user has been loggen in if (parent::allowAccess()){ parent::prepareHTMLData("Panel de Control", "Panel de Control - Transacciones Recientes (10 min.)", array("<script src='js/ConredPack/Conred_IndexView.js.php'></script>")); ///Load Content $this->template->write_view('content', 'Index/IndexView'); $this->template->render(); } else{ //Deny Hacking Access parent::destroySession(); } }
function getBalance(){ ///Validate if the user has been loggen in if (parent::allowAccess()){ $webUserDTO = $this->session->userdata('webUserDTO'); sleep(1); //Ejemplo para Carga de Datos Ajax $balance = number_format($this->UserModel->get_balance($webUserDTO->userID), 2, ',', '.'); include('./www/staticForms/GetBalanceForm.php'); } else{ //Deny Hacking Access parent::destroySession(); } }
public function getUpdateForm($user_id = null){ ///Validate if the user has been loggen in if (parent::allowAccess()){ $userData = $this->UserModel->get_user($user_id); //En este archivo PHP (usado como Template), se encuentran mapeados los campos //Con la variable $userData include('./www/staticForms/UserUpdateForm.php'); } else{ //Deny Hacking Access parent::destroySession(); } }
function updateMessageStatus($messageID = null){ ///Validate if the user has been loggen in if (parent::allowAccess()){ $webUserDTO = $this->session->userdata('webUserDTO'); //Set User Message as Read $userSetMessageRead = $this->InboxModel->set_message_read($webUserDTO->userID, $messageID); //Update Message Unread Counter echo $this->updateMessagesCounter(); } else{ //Deny Hacking Access parent::destroySession(); } }
function decodeBase24Trx(){ ///Validate if the user has been loggen in if (parent::allowAccess()){ $totalXML = ''; $msg_arrT = ''; //Form Data $msg_arr = $this->input->get('decoder_trx'); $bytes_shifted = $this->input->get('decoder_bytes'); /*//Con espacios en modo HEX $msg_arr = explode(" ", $msg_arr); for($i=$bytes_shifted; $i < count($msg_arr); $i++){ $msg_arrT .= $msg_arr[$i]; if ($i != count($msg_arr) - 1) $msg_arrT .= " "; } */ ///Execute Path $exePath = $this->config->item('Base24Decoder_path'); //Execute Transaction Decoder exec( $exePath . " " . "\"" . $msg_arr . "\"" . " " . "\"" . $bytes_shifted . "\"", $decoderRes); if (count($decoderRes) > 1){ foreach($decoderRes as $key => $val){ if (strlen($val) > 1) $totalXML .= str_replace("#", "<", $val) . chr(13); } } else { $totalXML = $decoderRes[0]; } include('./www/staticForms/DecoderBASE24ResponseForm.php'); } else{ //Deny Hacking Access parent::destroySession(); } }
public function changePWDAccount(){ $message1 = ""; $message2 = ""; ///Validate if the user has been loggen in if (parent::allowAccess()){ $webUserDTO = $this->session->userdata('webUserDTO'); $status = $this->UserModel->update_user_password($webUserDTO->userID); if ($status == 1){ $message1 = "Clave de usuario actualizada."; $this->saveLog($message1, $message2); echo "OK"; } else if ($status == 0){ $message1 = "Error actualizando clave de usuario."; $this->saveLog($message1, $message2); echo "Error actualizando clave. Clave actual errónea"; } else if ($status == 2){ $message1 = "Error actualizando clave de usuario."; $this->saveLog($message1, $message2); echo "Error actualizando clave. Clave utilizada anteriormente, por favor ingrese una clave diferente."; } } else{ //Deny Hacking Access parent::destroySession(); } }
function logout(){ //Close Session DB $webUserDTO = $this->session->userdata('webUserDTO'); if ($webUserDTO != null){ $LoginID = $webUserDTO->loginID; $this->LoginModel->close_session($LoginID); //Save Session Start in Log $this->AuditModel->validate_object_by_method($webUserDTO->userID, 'Session', 'End', $webUserDTO->sessionID); } //Destroy Session And Redirect parent::destroySession(); }