public function __construct()
 {
     $this->error = new ErrorCase();
     //-------读取配置文件
     $incFileContents = file_get_contents(ROOT . "comm/inc.php");
     $this->inc = json_decode($incFileContents);
     if (empty($this->inc)) {
         $this->error->showError("20001");
     }
     if (empty($_SESSION['QC_userData'])) {
         self::$data = array();
     } else {
         self::$data = $_SESSION['QC_userData'];
     }
 }
Beispiel #2
0
 public function __construct()
 {
     $this->error = new ErrorCase();
     //-------读取配置文件
     $incFileContents = (include dirname(dirname(__FILE__)) . "/Oauth/comm/inc.php");
     $this->inc = (object) $incFileContents;
     if (empty($this->inc)) {
         $this->error->showError("20001");
     }
     if (empty($_SESSION['QC_userData'])) {
         self::$data = array();
     } else {
         self::$data = $_SESSION['QC_userData'];
     }
 }
Beispiel #3
0
    public function __construct(){
        $this->error = new ErrorCase();

                        $incFileContents = file_get_contents(DATA_PATH.'ulogin.qq.php');
        $this->inc = json_decode($incFileContents);
        if(empty($this->inc)){
            $this->error->showError("20001");
        }

        if(empty($_SESSION['QC_userData'])){
            self::$data = array();
        }else{
            self::$data = $_SESSION['QC_userData'];
        }
    }
 public function __construct()
 {
     $this->error = new ErrorCase();
     //-------读取配置文件
     $incFileContents = file_get_contents(APP_ROOT_PATH . "public/qqv2_inc.php");
     $this->inc = json_decode($incFileContents);
     if (empty($this->inc)) {
         $this->error->showError("20001");
     }
     if (!es_session::is_set('QC_userData')) {
         self::$data = array();
     } else {
         self::$data = es_session::get('QC_userData');
     }
 }
Beispiel #5
0
 public function __construct()
 {
     $this->error = new ErrorCase();
     //-------读取配置文件
     $incFileContents = file(ROOT . "comm/inc.php");
     $incFileContents = $incFileContents[1];
     $this->inc = json_decode($incFileContents);
     if (empty($this->inc)) {
         $this->error->showError("20001");
     }
     if (empty(Yii::app()->session['QC_userData'])) {
         self::$data = array();
     } else {
         self::$data = Yii::app()->session['QC_userData'];
     }
 }
Beispiel #6
0
 public function __construct()
 {
     $this->error = new ErrorCase();
     //-------读取配置文件
     $incFileContents = file(SITES_PATH . '/' . SITE_PATH . "/inc.php");
     $incFileContents = $incFileContents[1];
     $this->inc = json_decode($incFileContents);
     if (empty($this->inc)) {
         $this->error->showError("20001");
     }
     if (empty($_SESSION['QC_userData'])) {
         self::$data = array();
     } else {
         self::$data = $_SESSION['QC_userData'];
     }
 }
Beispiel #7
0
 public function __construct()
 {
     global $_G;
     $this->error = new ErrorCase();
     $tmp = array('appid' => $_G[setting][qq_appid], 'appkey' => $_G[setting][qq_appkey], 'host' => $_G[host], 'callback' => $_G[siteurl], 'scope' => "all", 'errorReport' => true, 'storageType' => 'file');
     $incFileContents = json_encode($tmp);
     $this->inc = json_decode($incFileContents);
     if (empty($this->inc)) {
         $this->error->showError("20001");
     }
     if (empty($_SESSION['QC_userData'])) {
         self::$data = array();
     } else {
         self::$data =& $_SESSION['QC_userData'];
     }
 }
Beispiel #8
0
 public function __construct()
 {
     $this->error = new ErrorCase();
     //-------读取配置文件
     $incFileContents = file(ROOT . "comm/inc.php");
     $incFileContents = $incFileContents[1];
     $incFileContents = preg_replace(array('/__APPID__/', '/__APPKEY__/', '/__CALLBACK__/'), array(Q_APPID, Q_APPKEY, Q_CALLBACK), $incFileContents);
     $this->inc = json_decode($incFileContents);
     if (empty($this->inc)) {
         $this->error->showError("20001");
     }
     if (empty($_SESSION['QC_userData'])) {
         self::$data = array();
     } else {
         self::$data = $_SESSION['QC_userData'];
     }
 }
Beispiel #9
0
 public function __construct($inc)
 {
     Hybrid_Logger::debug("Construct QQ Recorder");
     $this->error = new ErrorCase();
     //-------读取配置文件
     //$incFileContents = file(ROOT."comm/inc.php");
     //$incFileContents = $incFileContents[1];
     //$this->inc = json_decode($incFileContents);
     $this->inc = $inc;
     if (empty($this->inc)) {
         $this->error->showError("20001");
     }
     if (empty($_SESSION['QC_userData'])) {
         self::$data = array();
     } else {
         self::$data = $_SESSION['QC_userData'];
     }
 }
Beispiel #10
0
 public function __construct()
 {
     $this->error = new ErrorCase();
     //-------读取配置文件
     //$incFileContents = file(ROOT."comm/inc.php");
     //$incFileContents = $incFileContents[1];
     //$this->inc = json_decode($incFileContents);
     $arr = array('appid' => QQ_LOGIN_APPID, 'appkey' => QQ_LOGIN_APPKEY, 'callback' => QQ_CALLBACK_URI, 'scope' => 'get_user_info,add_share,list_album,add_album,upload_pic,add_topic,add_one_blog,add_weibo,check_page_fans,add_t,add_pic_t,del_t,get_repost_list,get_info,get_other_info,get_fanslist,get_idolist,add_idol,del_idol,get_tenpay_addr', 'errorReport' => 1, 'storageType' => 'file', 'host' => 'localhost', 'user' => 'root', 'password' => 'root', 'database' => 'test');
     $one = json_encode($arr);
     $this->inc = json_decode($one);
     if (empty($this->inc)) {
         $this->error->showError("20001");
     }
     if (empty($_SESSION['QC_userData'])) {
         self::$data = array();
     } else {
         self::$data = $_SESSION['QC_userData'];
     }
 }
Beispiel #11
0
 public function __construct()
 {
     $this->error = new ErrorCase();
     //-------读取配置文件
     $incFileContents = file_get_contents(ROOT . "comm/inc.php");
     $this->inc = json_decode($incFileContents);
     $config = System::load_app_config("connect", "qq");
     $this->inc->appid = $config['id'];
     $this->inc->appkey = $config['key'];
     $this->inc->callback = WEB_PATH . '/api/qqlogin/callback/';
     $this->inc->scope = "get_user_info";
     if (empty($this->inc)) {
         $this->error->showError("20001");
     }
     if (empty($_SESSION['QC_userData'])) {
         self::$data = array();
     } else {
         self::$data = $_SESSION['QC_userData'];
     }
 }
 public function __construct()
 {
     $this->error = new ErrorCase();
     //-------读取配置文件
     //$incFileContents = file(ROOT."comm/inc.php");
     //$incFileContents = $incFileContents[1];
     include_once ROOT . "../../common/common.php";
     include ROOT . 'config.php';
     $json = '{"appid":"' . $config['appid'] . '","appkey":"' . $config['appkey'] . '","callback":"' . $config['callback'] . '",';
     $json .= '"scope":"get_user_info,add_share,list_album,add_album,upload_pic,add_topic,add_one_blog,add_weibo,check_page_fans,add_t,add_pic_t,del_t,get_repost_list,get_info,get_other_info,get_fanslist,get_idolist,add_idol,del_idol,get_tenpay_addr","errorReport":true,"storageType":"file","host":"localhost","user":"******","password":"******","database":"test"}';
     $this->inc = json_decode($json);
     if (empty($this->inc)) {
         $this->error->showError("20001");
     }
     if (empty($_SESSION['QC_userData'])) {
         self::$data = array();
     } else {
         self::$data = $_SESSION['QC_userData'];
     }
 }
 public function __construct()
 {
     global $tsMySqlCache;
     $this->error = new ErrorCase();
     //-------读取配置文件
     //$incFileContents = file_get_contents(ROOT."comm/inc.php");
     $arrQQ = fileRead('data/plugins_pubs_qq.php');
     if ($arrQQ == '') {
         $arrQQ = $tsMySqlCache->get('plugins_pubs_qq');
     }
     $callback = urlencode($arrQQ['siteurl'] . 'index.php?app=pubs&ac=plugin&plugin=qq&in=callback');
     $incFileContents = '{"appid":"' . $arrQQ['appid'] . '","appkey":"' . $arrQQ['appkey'] . '","callback":"' . $callback . '","scope":"get_user_info,add_share,list_album,add_album,upload_pic,add_topic,add_one_blog,add_weibo,check_page_fans,add_t,add_pic_t,del_t,get_repost_list,get_info,get_other_info,get_fanslist,get_idolist,add_idol,del_idol,get_tenpay_addr","errorReport":true,"storageType":"file","host":"localhost","user":"******","password":"******","database":"test"}';
     $this->inc = json_decode($incFileContents);
     if (empty($this->inc)) {
         $this->error->showError("20001");
     }
     if (empty($_SESSION['QC_userData'])) {
         self::$data = array();
     } else {
         self::$data = $_SESSION['QC_userData'];
     }
 }