本文整理汇总了PHP中Wizard::doModal方法的典型用法代码示例。如果您正苦于以下问题:PHP Wizard::doModal方法的具体用法?PHP Wizard::doModal怎么用?PHP Wizard::doModal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Wizard
的用法示例。
在下文中一共展示了Wizard::doModal方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: attemptLogin
//.........这里部分代码省略.........
}
$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;
}
$wizard->addPage('License', './modules/login/wizard/License.tpl', $phpeval, true, true);
}
if (!file_exists('modules/asp') || defined('CATS_TEST_MODE') && CATS_TEST_MODE) {
// On-site wizard pages
if (!LicenseUtility::isLicenseValid()) {
if (defined('LICENSE_KEY') && LICENSE_KEY == '') {
$template = 'Register.tpl';
$templateName = 'Register';
} else {
$template = 'Reregister.tpl';
$templateName = 'License Expired';
}
$wizard->addPage($templateName, './modules/login/wizard/' . $template, '', false, true);
}
}
// if logged in for the first time, change password
if (strtolower($username) == 'admin' && $password === DEFAULT_ADMIN_PASSWORD) {
$wizard->addPage('Password', './modules/login/wizard/Password.tpl', '', false, true);
}
// make user set an e-mail address
if (trim($_SESSION['CATS']->getEmail()) == '') {
$wizard->addPage('E-mail', './modules/login/wizard/Email.tpl', '', false, true);
}
// if no site name set, make user set site name
if ($accessLevel >= ACCESS_LEVEL_SA && $_SESSION['CATS']->getSiteName() === 'default_site') {
$wizard->addPage('Site', './modules/login/wizard/SiteName.tpl', '', false, true);
}
// CATS Hosted Wizard Pages
if (!eval(Hooks::get('ASP_WIZARD_PAGES'))) {
return;
}
if ($_SESSION['CATS']->isFirstTimeSetup()) {
$wizard->addPage('Setup Users', './modules/login/wizard/Users.tpl', '
$users = new Users($siteID);
$mp = $users->getAll();
$data = $users->getLicenseData();
$this->_template->assign(\'users\', $mp);
$this->_template->assign(\'totalUsers\', $data[\'totalUsers\']);
$this->_template->assign(\'userLicenses\', $data[\'userLicenses\']);
$this->_template->assign(\'accessLevels\', $users->getAccessLevels());
');
if (!eval(Hooks::get('ASP_WIZARD_IMPORT'))) {
return;
}
}
// The wizard will not display if no pages have been added.
$wizard->doModal();
/******************************* END NEW WIZARD *******************************************/
/* Session is logged in, do we need to send the user to the wizard?
* This should be done only on the first use, indicated by the
* admin user's password still being set to the default.
*/
/* If we have a specific page to go to, go there. */
/* These hooks are for important things, like disabling the site based on criteria. */
if (!eval(Hooks::get('LOGGED_IN'))) {
return;
}
if (isset($_GET['reloginVars'])) {
CATSUtility::transferRelativeURI($_GET['reloginVars']);
}
/* LOGGED_IN_MESSAGES hooks are only for messages which show up on initial login (warnings, etc) */
if (!eval(Hooks::get('LOGGED_IN_MESSAGES'))) {
return;
} else {
if ($accessLevel >= ACCESS_LEVEL_SA && $mailerSettingsRS['configured'] == '0') {
NewVersionCheck::checkForUpdate();
$this->_template->assign('inputType', 'conclusion');
$this->_template->assign('title', 'E-Mail Disabled');
$this->_template->assign('prompt', 'E-mail features are disabled. In order to enable e-mail features (such as e-mail notifications), please configure your e-mail settings by clicking on the Settings tab and then clicking on Administration.');
$this->_template->assign('action', $this->getAction());
$this->_template->assign('home', 'home');
$this->_template->display('./modules/settings/NewInstallWizard.tpl');
} else {
if (!eval(Hooks::get('LOGGED_IN_HOME_PAGE'))) {
return;
}
CATSUtility::transferRelativeURI('m=home');
}
}
}