本文整理汇总了PHP中TabController::getVariableTabs方法的典型用法代码示例。如果您正苦于以下问题:PHP TabController::getVariableTabs方法的具体用法?PHP TabController::getVariableTabs怎么用?PHP TabController::getVariableTabs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TabController
的用法示例。
在下文中一共展示了TabController::getVariableTabs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: RemindPasswordAction
function RemindPasswordAction()
{
$varTabs = array();
$request = Project::getRequest();
$this->_view->clearFlashMessages();
if ($request->remind) {
$userModel = new UserModel();
$noErrors = true;
$email = trim($request->email);
if (!$email) {
$this->_view->addFlashMessage(FM::ERROR, "Введите Email");
$noErrors = false;
} else {
$userModel->loadByEmail($email);
if (!$userModel->id) {
$this->_view->addFlashMessage(FM::ERROR, "Такой Email не регистрировался");
$noErrors = false;
}
}
if ($noErrors) {
$newPass = rand(111111, 9999999);
$salt = AppCrypt::generateSalt();
$userModel->salt = $salt;
$userModel->pass = AppCrypt::getHash($newPass, $salt);
$userModel->save();
$mailer = new PHPMailer();
$mailer->CharSet = "utf-8";
$mailer->From = "info@next24.ru";
$mailer->FromName = "Next24.ru";
$mailer->Subject = "Восстановление пароля в системе Next24.ru ";
$body = "Восстановление пароля в системе Next24.ru: <br>Логин: " . $userModel->login . " <br>Новый пароль: " . $newPass;
$alt_body = "Восстановление пароля в системе Next24.ru: \nЛогин: " . $userModel->login . " \nНовый пароль: " . $newPass;
$mailer->Body = $body;
$mailer->AltBody = $alt_body;
$mailer->AddAddress($email, $userModel->first_name . " " . $userModel->middle_name . " " . $userModel->last_name);
$mailer->Send();
$this->_view->addFlashMessage(FM::INFO, "На указанный Email был выслан новый пароль");
}
}
$varTabs[] = array('name' => "Напоминание пароля", 'title' => "Напоминание пароля", 'selected' => true, 'controller_name' => "User", 'action_name' => "RemindPassword");
$this->_view->assign('tab_list', TabController::getVariableTabs($varTabs));
// Show tabs
$this->_view->RemindPassword();
$this->_view->parse();
}