_docOpts = $docOpts; parent::Auth($DBObj); } function checkLogin() { parent::checkLogin(); if (isset($this->_docOpts['access'])){ $accessDeny = true; $userArr = $this->getData(); foreach ($this->_docOpts['access'] as $access) { if ($userArr['type'] == $access['type']){ $accessDeny = false; return true; } } if ($accessDeny) { $this->notLogedIn(); } } return true; } function getLoginForm(&$Doc) { if ($this->isFocusLogin){ $Doc->addItemProp('initFuncs', "function(){ document.getElementsByName('login')[0].focus(); }"); } require_once 'class/Form/Form.class.php'; $form = new Form($Doc, 'sssssssssss', null, null, null, array('class' => 'admin_login_form')); $form->addFormRule(array(&$this, 'login')); $form->setTitle(''); require_once('class/Session.php'); $login = Form::createElement('text', 'login', 'Username:', array('class' => 'inp_login', 'value' => Session::getData(CURR_PAGE, 'login') ) ); $form->addElement($login); $form->setCancelType(FORM_CBT_RESET); $password =& Form::createElement('password', 'password', 'Password:', array('class' => 'inp_login')); $form->style_pref = 'login_'; $form->addElement($password); $password->setValue(''); $action = Form::createElement('hidden', 'action', 'login'); $form->addElement($action); $form->cancelTitle = 'Reset'; $form->submitTitle = 'Login'; return $form; } } ?>