} var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端 // 判断是否是微信里打开,是的话需要验证授权 var URL = window.location.href; URL = encodeURIComponent(URL); var _need_login = parseInt("<?php echo $_smarty_tpl->tpl_vars['need_login']->value;?> ") //微信授权入口 function wechatIdentifiy() { //先验证是否需要进行授权,需要则调用后台接口处理 $.ajax({ url : "<?php echo $_smarty_tpl->tpl_vars['php_url']->value;?> /frontend/web/index.php?r=home/status", type : "post", dataType: "json",
// 判断是否是微信里打开,是的话需要验证授权 var URL = window.location.href; URL = encodeURIComponent(URL); var _need_login = parseInt("<?php echo $_smarty_tpl->tpl_vars['need_login']->value;?> ") //微信授权入口 function wechatIdentifiy() { //先验证是否需要进行授权,需要则调用后台接口处理 $.ajax({ url : "<?php echo $_smarty_tpl->tpl_vars['php_url']->value;?>
// render compiled or saved template code // if (! isset($_template->_cache['capture_stack'])) { $_template->_cache['capture_stack'] = array(); } $_saved_capture_level = count($_template->_cache['capture_stack']); $unifunc($_template); // any unclosed {capture} tags ? if ($_saved_capture_level != count($_template->_cache['capture_stack'])) { $_template->capture_error(); } if (isset($_template->smarty->security_policy)) { $_template->smarty->security_policy->exitTemplate();
if (! $this->processed) { $this->process($_template); } if (isset($_template->cached)) { $_template->cached->file_dependency = array_merge($_template->cached->file_dependency, $this->file_dependency); } $this->getRenderedTemplateCode($_template); if ($_template->caching && $this->has_nocache_code) { $_template->cached->hashes[$this->nocache_hash] = true; } if (isset($_template->parent) && $_template->parent->_objType == 2 && ! empty($_template->tpl_function)) { $_template->parent->tpl_function = array_merge($_template->parent->tpl_function, $_template->tpl_function); }
} elseif ($this->source->handler->uncompiled) { $this->source->render($this); } else { if (! isset($this->compiled)) { $this->loadCompiled(); } $this->compiled->render($this); } // display or fetch if ($display) { if ($this->caching && $this->smarty->cache_modified_check) { $this->smarty->ext->_cachemodify->cacheModifiedCheck($this->cached, $this, isset($content) ? $content : ob_get_clean());
$parent->cached->hashes[$tpl->compiled->nocache_hash] = true; } } else { if (isset($tpl->compiled)) { $tpl->compiled->render($tpl); } else { $tpl->render(); } } if ($scopePtr) { if ($scope == Smarty::SCOPE_GLOBAL) { Smarty::$global_tpl_vars = $tpl->tpl_vars; $tpl->smarty->config_vars = $tpl->config_vars;
),false)) { function content_5d6a809909c189_83285605 ($_smarty_tpl) { ?> <!DOCTYPE html> <html> <head> <?php $_smarty_tpl->smarty->ext->_subtemplate->render($_smarty_tpl, "file:include/common_live.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false); ?> </head> <!--视频播放页--> <body id="video" data-share="<?php echo $_smarty_tpl->tpl_vars['share']->value;?> ">
// render compiled or saved template code // if (! isset($_template->_cache['capture_stack'])) { $_template->_cache['capture_stack'] = array(); } $_saved_capture_level = count($_template->_cache['capture_stack']); $unifunc($_template); // any unclosed {capture} tags ? if ($_saved_capture_level != count($_template->_cache['capture_stack'])) { $_template->capture_error(); } if (isset($_template->smarty->security_policy)) { $_template->smarty->security_policy->exitTemplate();
if (! $this->processed) { $this->process($_template); } if (isset($_template->cached)) { $_template->cached->file_dependency = array_merge($_template->cached->file_dependency, $this->file_dependency); } $this->getRenderedTemplateCode($_template); if ($_template->caching && $this->has_nocache_code) { $_template->cached->hashes[$this->nocache_hash] = true; } if (isset($_template->parent) && $_template->parent->_objType == 2 && ! empty($_template->tpl_function)) { $_template->parent->tpl_function = array_merge($_template->parent->tpl_function, $_template->tpl_function); }
} elseif ($this->source->handler->uncompiled) { $this->source->render($this); } else { if (! isset($this->compiled)) { $this->loadCompiled(); } $this->compiled->render($this); } // display or fetch if ($display) { if ($this->caching && $this->smarty->cache_modified_check) { $this->smarty->ext->_cachemodify->cacheModifiedCheck($this->cached, $this, isset($content) ? $content : ob_get_clean());
} else { ob_start(); $template->_mergeVars(); if (! empty(Smarty::$global_tpl_vars)) { $template->tpl_vars = array_merge(Smarty::$global_tpl_vars, $template->tpl_vars); } $result = $template->render(false, $function); } if (isset($_smarty_old_error_level)) { error_reporting($_smarty_old_error_level); } return $result; } catch (Exception $e) {
* @throws Exception * @throws SmartyException * @return string rendered template output */ public function fetch($template = null, $cache_id = null, $compile_id = null, $parent = null) { $result = $this->_execute($template, $cache_id, $compile_id, $parent, 0); return $result === null ? ob_get_clean() : $result; } /** * displays a Smarty template *
// Make Yii params available as smarty config variables $template->config_vars = Yii::$app->params; $template->assign('app', \Yii::$app); $template->assign('this', $view); return $template->fetch(); } /** * Resolves Yii alias into file path * * @param string $type
if (is_array($this->renderers[$ext]) || is_string($this->renderers[$ext])) { $this->renderers[$ext] = Yii::createObject($this->renderers[$ext]); } /* @var $renderer ViewRenderer */ $renderer = $this->renderers[$ext]; $output = $renderer->render($this, $viewFile, $params); } else { $output = $this->renderPhpFile($viewFile, $params); } $this->afterRender($viewFile, $params, $output);
* @throws InvalidParamException if the view cannot be resolved or the view file does not exist. * @see renderFile() */ public function render($view, $params = [], $context = null) { $viewFile = $this->findViewFile($view, $context); return $this->renderFile($viewFile, $params, $context); } /** * Finds the view file based on the given view name. * * @param string $view
* @return string */ public function display($view, $params = []) { $params = array_merge($params, $this->tpl_vars); return $this->getView()->render($view, $params, $this); } /** * Renders a view file. * * @param string $file
$desc = str_replace($s, '', $desc); $img = $activityModel['picture']; $share = "{title:'$title',desc:'$desc',imgUrl:'$img'}"; } $this->assign(['res' => $live, 'id' => $id, 'share' => $share]); return $this->display('video.html'); } /**
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); Yii::$app->controller = $oldController; return $result; } else { $id = $this->getUniqueId(); throw new InvalidRouteException('Unable to resolve the request "' . ($id === '' ? $route : $id . '/' . $route) . '".');
$params = $this->catchAll; unset($params[0]); } try { Yii::trace("Route requested: '$route'", __METHOD__); $this->requestedRoute = $route; $result = $this->runAction($route, $params); if ($result instanceof Response) { return $result; } else { $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();
require(__DIR__ . '/../../common/config/main.php'), require(__DIR__ . '/../../common/config/main-local.php'), require(__DIR__ . '/../config/main.php'), require(__DIR__ . '/../config/main-local.php')); $application = new yii\web\Application($config); $application->run();
$_GET = [ 'r' => 'live/video-jump', 'activity_id' => '50', 'id' => '565', ];