Exemple #1
0
 private function displayLogin()
 {
     if (GWF_Session::isLoggedIn()) {
         return '';
     }
     $formhash = '_username_password_bind_ip';
     $formhash = GWF_Password::getToken($formhash);
     $username = $this->module->lang('th_user_name');
     $password = $this->module->lang('th_password');
     $bind_ip = $this->module->lang('th_bind_ip');
     $register = $this->module->lang('menu_register');
     $forgot = $this->module->lang('btn_forgot_pw');
     $login = $this->module->lang('btn_login');
     $box = '<form action="' . GWF_WEB_ROOT . 'login" method="post" id="wc_toplogin">' . PHP_EOL . '<div><img src="' . GWF_WEB_ROOT . 'tpl/wc4/img/icon_user.gif" title="' . $username . '" alt="' . $username . ':" />&nbsp;<input type="text" name="username" value="" /></div>' . PHP_EOL . '<div><img src="' . GWF_WEB_ROOT . 'tpl/wc4/img/icon_pass.gif" title="' . $password . '" alt="' . $password . ':" />&nbsp;<input type="password" name="password" value="" /></div>' . PHP_EOL . '<div class="le">' . $bind_ip . '&nbsp;<input type="checkbox" name="bind_ip" checked="checked" /></div>' . PHP_EOL . '<div class="le"><input type="submit" name="login" value="' . $login . '" /></div>' . PHP_EOL . '<div><a href="' . GWF_WEB_ROOT . 'register">' . $register . '</a>&nbsp;&nbsp;&nbsp;<a href="' . GWF_WEB_ROOT . 'recovery">' . $forgot . '</a></div>' . PHP_EOL . '</form>' . PHP_EOL;
     //			'</div>'.PHP_EOL;
     return $this->sidebox($this->module->lang('ft_signup') . $this->getHideButton(), $box);
 }
Exemple #2
0
 public static function displayHeaderLoginBROKEN(Module_WeChall $module)
 {
     if (GWF_User::isLoggedIn() || !GWF_Session::haveCookies()) {
         return '';
     }
     if (false === ($mod_login = GWF_Module::loadModuleDB('Login', false, true))) {
         return '';
     }
     $formhash = GWF_Password::getToken('_username_password_bind_ip_login');
     return '<form action="' . GWF_WEB_ROOT . 'login" method="post" id="wc_toplogin">' . '<div>' . GWF_CSRF::hiddenForm($formhash) . '</div>' . '<div>' . $mod_login->lang('th_username') . ' <input type="text" name="username" value="" />' . '</div>' . '<div>' . $mod_login->lang('th_password') . ' <input type="password" name="password" value="" />' . '</div>' . '<div>' . $mod_login->lang('th_bind_ip') . ' <input type="checkbox" name="bind_ip" checked="checked" />' . '<input type="submit" name="login" value="' . $mod_login->lang('btn_login') . '" />' . '</div>' . '</form>';
 }
Exemple #3
0
 public function getToken()
 {
     return GWF_Password::getToken($this->getVar('thread_title') . $this->getVar('thread_lastdate'));
 }
Exemple #4
0
 public function getToken()
 {
     return GWF_Password::getToken($this->getVar('post_date') . $this->getVar('post_title'));
 }