本文整理汇总了PHP中Wizard::addPage方法的典型用法代码示例。如果您正苦于以下问题:PHP Wizard::addPage方法的具体用法?PHP Wizard::addPage怎么用?PHP Wizard::addPage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Wizard
的用法示例。
在下文中一共展示了Wizard::addPage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: attemptLogin
private function attemptLogin()
{
//FIXME: getTrimmedInput()!
if (isset($_POST['siteName'])) {
$siteName = $_POST['siteName'];
} else {
$siteName = '';
}
if (!isset($_POST['username']) || !isset($_POST['password'])) {
$message = 'Invalid username or password.';
if (isset($_GET['reloginVars'])) {
$this->_template->assign('reloginVars', urlencode($_GET['reloginVars']));
} else {
$this->_template->assign('reloginVars', '');
}
$site = new Site(-1);
$rs = $site->getSiteByUnixName($siteName);
if (isset($rs['name'])) {
$siteNameFull = $rs['name'];
} else {
$siteNameFull = $siteName;
}
$this->_template->assign('aspMode', false);
if (!eval(Hooks::get('LOGIN_NO_CREDENTIALS'))) {
return;
}
$this->_template->assign('message', $message);
$this->_template->assign('messageSuccess', false);
$this->_template->assign('siteName', $siteName);
$this->_template->assign('siteNameFull', $siteNameFull);
$this->_template->assign('dateString', date('l, F jS, Y'));
if (ModuleUtility::moduleExists("asp")) {
$this->_template->display('./modules/asp/AspLogin.tpl');
} else {
$this->_template->display('./modules/login/Login.tpl');
}
return;
}
$username = $this->getTrimmedInput('username', $_POST);
$password = $this->getTrimmedInput('password', $_POST);
if (strpos($username, '@') !== false) {
$siteName = '';
}
if ($siteName != '') {
$site = new Site(-1);
$rs = $site->getSiteByUnixName($siteName);
if (isset($rs['siteID'])) {
$username .= '@' . $rs['siteID'];
}
}
/* Make a blind attempt at logging the user in. */
$_SESSION['CATS']->processLogin($username, $password);
/* If unsuccessful, take the user back to the login page. */
if (!$_SESSION['CATS']->isLoggedIn()) {
$message = $_SESSION['CATS']->getLoginError();
if (isset($_GET['reloginVars'])) {
$this->_template->assign('reloginVars', urlencode($_GET['reloginVars']));
} else {
$this->_template->assign('reloginVars', '');
}
$site = new Site(-1);
$rs = $site->getSiteByUnixName($siteName);
if (isset($rs['name'])) {
$siteNameFull = $rs['name'];
} else {
$siteNameFull = $siteName;
}
$this->_template->assign('aspMode', false);
if (!eval(Hooks::get('LOGIN_UNSUCCESSFUL'))) {
return;
}
$this->_template->assign('message', $message);
$this->_template->assign('messageSuccess', false);
$this->_template->assign('siteName', $siteName);
$this->_template->assign('siteNameFull', $siteNameFull);
$this->_template->assign('dateString', date('l, F jS, Y'));
if (ModuleUtility::moduleExists("asp")) {
$this->_template->display('./modules/asp/AspLogin.tpl');
} else {
$this->_template->display('./modules/login/Login.tpl');
}
return;
}
$systemInfoDb = new SystemInfo();
$accessLevel = $_SESSION['CATS']->getAccessLevel();
$mailerSettings = new MailerSettings($_SESSION['CATS']->getSiteID());
$mailerSettingsRS = $mailerSettings->getAll();
/***************************** BEGIN NEW WIZARD *****************************************/
/**
* Improved setup wizard using the Wizard library. If the user succeeds,
* all old-style wizards will no longer be shown.
*/
$wizard = new Wizard(CATSUtility::getIndexName() . '?m=home', './js/wizardIntro.js');
if ($_SESSION['CATS']->isFirstTimeSetup()) {
$wizard->addPage('Welcome!', './modules/login/wizard/Intro.tpl', '', false, true);
}
if (!$_SESSION['CATS']->isAgreedToLicense()) {
$phpeval = '';
if (!eval(Hooks::get('LICENSE_TERMS'))) {
return;
//.........这里部分代码省略.........