public function execute($dataContainer) { //no direct access defined('_AEXEC') or die("Access denied"); require_once 'AdminCardInfoProcessing.php'; require_once 'AdminCardInfoInterface.php'; $interface = $dataContainer->getInterface(); $cardInfoInterface = new AdminCardInfoInterface($this->relPath); $cardInfoProcessing = new AdminCardInfoProcessing($cardInfoInterface); if ('POST' == $_SERVER['REQUEST_METHOD'] && isset($_POST['card_ID'])) { $uid = $cardInfoProcessing->CheckCard($_POST['card_ID']); $userData = $cardInfoProcessing->GetUserData($uid); $cardInfoInterface->ShowCardInfo($userData, $_POST['card_ID']); } else { if (isset($_GET['lostcard'])) { TableMng::query(sprintf("UPDATE BabeskCards SET lost=1 WHERE cardnumber = '%s'", $_GET['lostcard'])); $interface->dieMsg("Karte wurde verloren gemeldet!"); $uid = $cardInfoProcessing->CheckCard($_GET['lostcard']); $userData = $cardInfoProcessing->GetUserData($uid); $cardInfoInterface->ShowCardInfo($userData, $_GET['lostcard']); } else { $cardInfoInterface->CardId(); } } }
public function execute($dataContainer) { //no direct access defined('_AEXEC') or die("Access denied"); parent::entryPoint($dataContainer); parent::initSmartyVariables(); require_once 'AdminCardInfoProcessing.php'; require_once 'AdminCardInfoInterface.php'; $cardInfoInterface = new AdminCardInfoInterface($this->relPath); $cardInfoProcessing = new AdminCardInfoProcessing($cardInfoInterface); if ('POST' == $_SERVER['REQUEST_METHOD'] && isset($_POST['card_ID'])) { $this->cardinfoDisplay($_POST['card_ID']); $uid = $cardInfoProcessing->CheckCard($_POST['card_ID']); $userData = $this->getUserData($uid); $this->_smarty->assign('cardID', $_POST['card_ID']); $this->_smarty->assign('name', $userData['name']); $this->_smarty->assign('forename', $userData['forename']); $this->_smarty->assign('class', $userData['class']); $this->_smarty->assign('locked', $userData['locked']); $this->displayTpl('result.tpl'); } else { $this->displayTpl('form.tpl'); } }