예제 #1
0
 function dologout()
 {
     member::cleancookie();
 }
예제 #2
0
     $iCMS->iPrint("usercp/register.htm", "register");
     break;
 case 'agreement':
     $iCMS->assign('config', array('agreement' => str_replace("\n", "<br />", $iCMS->config['agreement'])));
     $iCMS->iPrint("usercp/agreement.htm", "agreement");
     break;
 case 'login':
     if (member::checklogin(true)) {
         _header($iCMS->config['usercpURL']);
     }
     $iCMS->assign('config', array('seccode' => $iCMS->config['userseccode']));
     $iCMS->assign('forward', __REF__);
     $iCMS->iPrint("usercp/login.htm", "login");
     break;
 case 'logout':
     member::cleancookie();
     break;
 default:
     require_once iPATH . 'include/UI.class.php';
     $action = $_POST['action'];
     //$forward= $_POST['forward'];
     if ($action == 'register') {
         ckseccode($_POST['seccode'], 'U') && javascript::json('seccode', 'error:seccode');
         $username = dhtmlspecialchars($_POST['username']);
         !preg_match("/^([\\w\\.-]+)@([a-zA-Z0-9-]+)(\\.[a-zA-Z\\.]+)\$/i", $username) && javascript::json('username', 'register:emailerror');
         iCMS_DB::getValue("SELECT uid FROM `#iCMS@__members` where `username`='{$username}'") && javascript::json('username', 'register:emailusr');
         $password = md5(trim($_POST['password']));
         $pwdrepeat = md5(trim($_POST['pwdrepeat']));
         $password != $pwdrepeat && javascript::json('pwdrepeat', 'register:different');
         $nickname = dhtmlspecialchars($_POST['nickname']);
         cstrlen($nickname) > 12 && javascript::json(0, 'register:nicknamelong');