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; } } }