|
@@ -127,7 +127,7 @@ class EventsController extends Controller {
|
|
$type = array(1,4,6,7);
|
|
$type = array(1,4,6,7);
|
|
if (in_array($info['type'], $type)) {
|
|
if (in_array($info['type'], $type)) {
|
|
$info['prize'] = 1;
|
|
$info['prize'] = 1;
|
|
- $info['authorize'] = true;
|
|
+
|
|
} else {
|
|
} else {
|
|
$info['top_data'] = 1;
|
|
$info['top_data'] = 1;
|
|
}
|
|
}
|
|
@@ -137,7 +137,7 @@ class EventsController extends Controller {
|
|
$authorize = $info['authorize'];
|
|
$authorize = $info['authorize'];
|
|
if ($authorize) {
|
|
if ($authorize) {
|
|
if($ckLogin==true){
|
|
if($ckLogin==true){
|
|
-
|
|
+ $info['login'] = 2;
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -441,6 +441,22 @@ class EventsController extends Controller {
|
|
$arr ['sign'] = $this->createSign ( $arr );
|
|
$arr ['sign'] = $this->createSign ( $arr );
|
|
$passport_url .= '&sign=' . $arr ['sign'];
|
|
$passport_url .= '&sign=' . $arr ['sign'];
|
|
$passport_url .= '&cas_uid=' . $uid;
|
|
$passport_url .= '&cas_uid=' . $uid;
|
|
|
|
+
|
|
|
|
+ $this->setOutput('applogin', 2);
|
|
|
|
+ $weixin = $this->checkIsFromWeixin();
|
|
|
|
+ if (!$weixin) {
|
|
|
|
+ $tokenid = Request::g('tokenid');
|
|
|
|
+ if (!$tokenid) {
|
|
|
|
+ $tokenid = Request::g('tokenId');
|
|
|
|
+ }
|
|
|
|
+ if ($tokenid) {
|
|
|
|
+
|
|
|
|
+ $passport_url .= '&tokenid=' . $tokenid;
|
|
|
|
+ } else {
|
|
|
|
+
|
|
|
|
+ $this->setOutput('applogin', 1);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
return $passport_url;
|
|
return $passport_url;
|
|
}
|
|
}
|
|
@@ -526,23 +542,38 @@ class EventsController extends Controller {
|
|
$sign2 = $this->createSign ( $params );
|
|
$sign2 = $this->createSign ( $params );
|
|
return ($sign2 == $sign);
|
|
return ($sign2 == $sign);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ public function checkIsFromWeixin($title) {
|
|
|
|
+ $state = false;
|
|
|
|
+ $user_agent = $_SERVER ['HTTP_USER_AGENT'];
|
|
|
|
+ if (preg_match ( '/MicroMessenger/i', $user_agent )) {
|
|
|
|
+ $state = true;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return $state;
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
*
|
|
*
|
|
* @param string $title
|
|
* @param string $title
|
|
*/
|
|
*/
|
|
public function checkIsFromMobile($title) {
|
|
public function checkIsFromMobile($title) {
|
|
- return true;
|
|
+
|
|
- if (Request::get ( 'kif_debug' ) == '@kimiss') {
|
|
+ if (Request::get ( 'debugs' ) == 'rabin') {
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
$isMobile = false;
|
|
$isMobile = false;
|
|
$user_agent = $_SERVER ['HTTP_USER_AGENT'];
|
|
$user_agent = $_SERVER ['HTTP_USER_AGENT'];
|
|
|
|
+
|
|
if (preg_match ( '/MicroMessenger|Mobile/i', $user_agent )) {
|
|
if (preg_match ( '/MicroMessenger|Mobile/i', $user_agent )) {
|
|
$isMobile = true;
|
|
$isMobile = true;
|
|
}
|
|
}
|
|
|
|
+ */
|
|
|
|
+ if (preg_match ( '/MicroMessenger/i', $user_agent )) {
|
|
|
|
+ $isMobile = true;
|
|
|
|
+ }
|
|
|
|
|
|
if (! $isMobile) {
|
|
if (! $isMobile) {
|
|
include_once Config::getInstance ()->get ( 'App_Path' ) . DS . 'include/phpqrcode/phpqrcode.php';
|
|
include_once Config::getInstance ()->get ( 'App_Path' ) . DS . 'include/phpqrcode/phpqrcode.php';
|