public function passwordrescueAction()
 {
     $secret = Request::get('secret', '');
     if (User::isLogged() == true) {
         $this->IndexAction();
     } elseif ($secret == '') {
         Site::Message('Неверная ссылка');
         $this->Route();
     } else {
         User::LoginByCookie($secret);
         setcookie('userid', $secret, time() + 360000, '/');
         if (User::isLogged() == true) {
             $this->Render('setpass');
         } else {
             Site::Message('Неверная ссылка');
             $this->Route();
         }
     }
 }
Example #2
0
<?php

#---Define--
mb_internal_encoding("UTF-8");
define('ROOT', dirname(__FILE__) . '/../');
#Default Page
define('default_page', 'main');
#Admin_login
define('admin_login', '*****@*****.**');
#Автозагрузчики
include ROOT . 'classes/_autoload.php';
include ROOT . 'models/_autoload.php';
include ROOT . 'controllers/_autoload.php';
#Подключение библиотеки SQL
SQL::connect(include ROOT . 'config/db.php');
#User Init
User::LoginByCookie(Request::cookie('userid', ''));
#QueryStringload
Request::Load();
#WebSite Init
$controller = mb_strtolower(Request::GetPart(0, default_page));
$action = Request::GetPart(1, 'index');
//if (!User::isLogged()) $controller = 'login';
#Загрузка шаблонизатора
Site::$home = 'http://localhost/promspace/';
Site::$template = 'main';
Site::$title = 'PromSpace - Вся промышленность России';
Site::$keywords = 'Вся промышленность России, Предприятия России, Компании России';
Site::Show($controller, $action);