function __construct($searchtext, $expandTable = null) { parent::__construct(); $this->searchtext = trim($searchtext); $this->expand = $expandTable !== null; $this->expandTable = $expandTable; M_Office::$dsp = '__defaut/ajaxindex'; }
public function loginForm($table) { $form = new MyQuickForm('loginform', 'POST', M_Office_Util::getQueryParams(array(), array(), false), '_self', null, true); $authDO = DB_DataObject::factory($table); $authDO->prepareForLogin(false, false); $authFB = MyFB::create($authDO); $authFB->useForm($form); $authFB->getForm(); if ($form->validate()) { M_Office_Util::refresh($_SERVER['REQUEST_URI']); } M_Office::$dsp = 'login'; $this->assign('loginForm', $form); }
public function fetch() { try { $tpl = Mreg::get('tpl'); $tpl->concat('adminTitle', ' :: ' . $this->getOption('adminTitle')); if (self::isAjaxRequest()) { M_Office::$dsp = '__defaut/ajaxindex'; $vars = $tpl->getVars(); $action = $vars['__action']; if (!is_array($action)) { $tpl->assign('__action', array($action . '.bloc', $action)); } } $tables = $this->getGlobalOption('searchInTables', 'frontendhome'); if (array_key_exists('flashmessages', $_SESSION)) { $tpl->assign('messages', $_SESSION['flashmessages']); } if (count($tables) == 0) { $tpl->assign('showlivesearch', false); } else { $tpl->assign('showlivesearch', true); } return $tpl->fetch(M_Office::$dsp); } catch (Exception $e) { M_Office::$dsp = '__defaut/error'; $tpl->assign('message', $e->getMessage()); $tpl->assign('error', $e); return $tpl->fetch(M_Office::$dsp); } }