当前位置: 首页>>代码示例>>PHP>>正文


PHP TabController::getVariableTabs方法代码示例

本文整理汇总了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();
 }
开发者ID:amanai,项目名称:next24,代码行数:45,代码来源:UserController.php


注:本文中的TabController::getVariableTabs方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。