function wfitem(wf $wf) { $this->header = 'Выйти'; if (wra_userscontext::isloged()) { @wra_userscontext::logout(); @wra_fbu::clearfbid(); @wra_vku::clearvkid(); if (!empty($_SERVER['HTTP_REFERER'])) { WRA::gotopage($_SERVER['HTTP_REFERER']); } else { // WRA::gotopage(WRA::base_url().'me'); WRA::gotopage(WRA::base_url()); } $wf->nicedie(); } }
function run() { $this->nofooter = true; $this->noheader = false; if (isset($_POST['admin_login'])) { $this->enter_try = -1; $isremember = false; if (isset($_POST['rememberme'])) { $isremember = true; } $login = addslashes($_POST['admin_login']); $pass = $_POST['admin_pass']; $this->enter_try = wra_userscontext::login($this->wf, $login, $pass, $isremember); } if (isset($_REQUEST['act'])) { // die($_REQUEST['act']); wra_userscontext::logout(); if (@$_REQUEST['backurl'] == 'index.php') { WRA::gotopage(''); $this->wf->nicedie(); } } if (wra_userscontext::isloged($this->wf)) { switch (@$_POST['returnurl']) { case 'admin': default: if (wra_userscontext::hasright('adminpage')) { WRA::gotopage(WRA::base_url() . 'admin'); $this->wf->nicedie(); } else { $this->enter_try = 3; } break; } } else { switch (@$_REQUEST['returnurl']) { case 'user': WRA::gotopage(WRA::base_url()); $this->wf->nicedie(); break; } } }
function run() { wra_userscontext::logout(); WRA::gotopage('../admin/login'); $this->wf->nicedie(); }