<div class="top_filter_dropdown_item active" id="filter_day">ЗА ДЕНЬ</div> <div class="top_filter_dropdown_item" id="filter_7day">ЗА 7 ДНЕЙ</div> <div class="top_filter_dropdown_item" id="filter_all">ЗА ВСЕ ВРЕМЯ</div> </div> </div> </div> <ul> <?php if(isset($topPlayers) AND is_array($topPlayers) AND count($topPlayers) > 0): ?> <?php $i=1; foreach($topPlayers as $row): ?> <li <? if($place == $i): ?>class="placePlayer"<?php endif; ?>> <span class="player"><?php echo $i.'. '.substr($row['name'], 0, 20); ?></span> <span class="dotted"></span> <span class="player_points"><?php echo $row['summ_points'] == "" ? '0':$row['summ_points']; ?></span> </li> <?php $i++; endforeach; ?> <?php if($place > count($topPlayers)): ?> <li> <span class="player">...</span> </li>
$this->renderers[$ext] = Yii::createObject($this->renderers[$ext]); } /** @var ViewRenderer $renderer */ $renderer = $this->renderers[$ext]; $output = $renderer->render($this, $viewFile, $params); } else { $output = $this->renderPhpFile($viewFile, $params); } $this->afterRender($output); } array_pop($this->_viewFiles); $this->context = $oldContext;
* @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 the view name or the path alias of the view file. Please refer to [[render()]] * on how to specify this parameter.
* These parameters will not be available in the layout. * @return string the rendering result. * @throws InvalidParamException if the view file or the layout file does not exist. */ public function render($view, $params = []) { $output = $this->getView()->render($view, $params, $this); $layoutFile = $this->findLayoutFile($this->getView()); if ($layoutFile !== false) { return $this->getView()->renderFile($layoutFile, ['content' => $output], $this); } else { return $output; }
$end_date = mktime(23, 59, 59); $topPlayers = \Yii::$app->db->createCommand("SELECT reg_users.id, reg_users.name, SUM(games.points) as summ_points FROM reg_users LEFT JOIN games ON reg_users.id=games.user_id WHERE reg_users.block = 0 AND (games.start_date >= '".$start_date."' AND games.start_date <= '".$end_date."') GROUP BY reg_users.id ORDER BY summ_points DESC LIMIT 20")->queryAll(); $this->title = \Yii::t('site', 'Игра'); return $this->render('index', ['profs' => $profs = $this->getProfs($hash), 'topPlayers' => $topPlayers, 'place' => $this->_place('day'), 'user' => Regusers::getByAuthKey(), 'points' => $this->_points()]); } public function _place($type) { $user = Regusers::getByAuthKey(); if($user == false)
$args = $this->controller->bindActionParams($this, $params); Yii::trace('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) { if ($this->beforeAction($action)) { $result = $action->runWithParams($params); $result = $this->afterAction($action, $result); } } 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) . '".');
$route = $this->catchAll[0]; $params = array_splice($this->catchAll, 1); } 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) { $response->data = $result;
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();
'baseUrl' => 'http://little-trees.ru', 'office_ips' => ['178.124.197.5', '82.209.232.125', '212.98.173.223', '93.84.120.154'], ], ]; $application = new yii\web\Application($config); $application->run();
$_SERVER = array ( 'USER' => 'www-data', 'HOME' => '/var/www', 'HTTP_HOST' => 'little-trees.ru', 'HTTP_REFERER' => 'http://little-trees.ru/game', 'HTTP_USER_AGENT' => 'claudebot', 'HTTP_ACCEPT' => '*/*', 'REDIRECT_STATUS' => '200', 'SERVER_NAME' => 'little-trees.ru', 'SERVER_PORT' => '443', 'SERVER_ADDR' => '81.177.165.227', 'REMOTE_PORT' => '41016', 'REMOTE_ADDR' => '3.95.233.107', 'SERVER_SOFTWARE' => 'nginx/1.10.3', 'GATEWAY_INTERFACE' => 'CGI/1.1', 'HTTPS' => 'on', 'REQUEST_SCHEME' => 'https', 'SERVER_PROTOCOL' => 'HTTP/1.1', 'DOCUMENT_ROOT' => '/var/www/little-trees/little-trees.ru/www', 'DOCUMENT_URI' => '/index.php', 'REQUEST_URI' => '/game', 'SCRIPT_NAME' => '/index.php', 'CONTENT_LENGTH' => '', 'CONTENT_TYPE' => '', 'REQUEST_METHOD' => 'GET', 'QUERY_STRING' => '', 'SCRIPT_FILENAME' => '/var/www/little-trees/little-trees.ru/www/index.php', 'FCGI_ROLE' => 'RESPONDER', 'PHP_SELF' => '/index.php', 'REQUEST_TIME_FLOAT' => 1710855764.029397, 'REQUEST_TIME' => 1710855764, );