if(!stristr($_SERVER['HTTP_HOST'], 'xav69.com')){ $model->where(['and', ['<>', 'tag', ''], ['=', 'status', 1]]); }else{ $model->where(['<>', 'tag', '']); } switch(true){ case (isset($params['tag'])): //$item = urldecode($params['tag']); $item = trim(urldecode($params['origin_id'])); $item = Yii::t('video', $item, [], 'ja-JP'); //目前先用原文查詢 #短片用的是逗號,所以可以用find_in_set查詢 //$model->where(['like', 'tag', $item]); if($item == 'Taiwan'){ $tag_check = ['台灣', '台灣妹', 'SWAG']; $where_case = ['or']; foreach($tag_check as $key1 => $value1){ array_push($where_case, ['like', 'tag', $value1]);
$model->where(['<>', 'tag', '']); } switch(true){ case (isset($params['tag'])): //$item = urldecode($params['tag']); $item = trim(urldecode($params['origin_id'])); $item = Yii::t('video', $item, [], 'ja-JP'); //目前先用原文查詢 #短片用的是逗號,所以可以用find_in_set查詢 //$model->where(['like', 'tag', $item]); if($item == 'Taiwan'){ $tag_check = ['台灣', '台灣妹', 'SWAG'];
$args = $this->controller->bindActionParams($this, $params); Yii::debug('Running action: ' . get_class($this->controller) . '::' . $this->actionMethod . '()', __METHOD__); if (Yii::$app->requestedParams === null) { Yii::$app->requestedParams = $args; } return call_user_func_array([$this->controller, $this->actionMethod], $args); } }
} $result = null; if ($runAction && $this->beforeAction($action)) { // run the action $result = $action->runWithParams($params); $result = $this->afterAction($action, $result); // call afterAction on modules foreach ($modules as $module) { /* @var $module Module */
$parts = $this->createController($route); if (is_array($parts)) { /* @var $controller Controller */ list($controller, $actionID) = $parts; $oldController = Yii::$app->controller; Yii::$app->controller = $controller; $result = $controller->runAction($actionID, $params); if ($oldController !== null) { Yii::$app->controller = $oldController; } return $result; }
$params = $this->catchAll; unset($params[0]); } try { Yii::debug("Route requested: '$route'", __METHOD__); $this->requestedRoute = $route; $result = $this->runAction($route, $params); if ($result instanceof Response) { return $result; } $response = $this->getResponse(); if ($result !== null) {
{ try { $this->state = self::STATE_BEFORE_REQUEST; $this->trigger(self::EVENT_BEFORE_REQUEST); $this->state = self::STATE_HANDLING_REQUEST; $response = $this->handleRequest($this->getRequest()); $this->state = self::STATE_AFTER_REQUEST; $this->trigger(self::EVENT_AFTER_REQUEST); $this->state = self::STATE_SENDING_RESPONSE; $response->send();
echo '請先設定預設語系!'; exit; } if(isset($_COOKIE['language'])){ $config['language'] = $_COOKIE['language']; } (new yii\web\Application($config))->run();
$_GET = [ 'tag' => '%E6%9D%B1%E5%8D%97%E4%BA%9E', 'utm_source' => 'siaowriter', 'utm_medium' => 'ju', 'utm_campaign' => 'utmtest', ]; $_SESSION = [ '__flash' => [], ];