コード例 #1
0
ファイル: login.php プロジェクト: hongweipeng/screen
<?php

require '../include/init.inc.php';
$user_name = $password = $remember = $verify_code = '';
extract($_POST, EXTR_IF_EXISTS);
if (Common::isPost()) {
    //	去掉验证码 if(strtolower($verify_code) != strtolower($_SESSION['osa_verify_code'])){
    if (0) {
        OSAdmin::alert("error", ErrorMessage::VERIFY_CODE_WRONG);
    } else {
        /*允许99帐号登录*/
        $user_info = false;
        if (Account99u::verifyUser($user_name, $password)) {
            $user_info = User::getUserByName($user_name);
        } else {
            $user_info = User::checkPassword($user_name, $password);
        }
        if ($user_info) {
            if ($user_info['status'] == 1) {
                User::loginDoSomething($user_info['user_id']);
                if ($remember) {
                    $encrypted = OSAEncrypt::encrypt($user_info['user_id']);
                    User::setCookieRemember(urlencode($encrypted), 30);
                }
                $ip = Common::getIp();
                SysLog::addLog($user_name, 'LOGIN', 'User', UserSession::getUserId(), json_encode(array("IP" => $ip)));
                Common::jumpUrl('panel/index.php');
            } else {
                OSAdmin::alert("error", ErrorMessage::BE_PAUSED);
            }
        } else {
コード例 #2
0
 /**
  * 初始化类
  */
 public static function init($url)
 {
     self::$soapClient = new SoapClient($url);
 }