84 lines
1.8 KiB
PHP
84 lines
1.8 KiB
PHP
<?php
|
|
|
|
class LpController extends Controller
|
|
{
|
|
static $points = 0;
|
|
static $authors = 0;
|
|
static $followers = 6215;
|
|
static $routes = 951;
|
|
|
|
|
|
public function __construct()
|
|
{
|
|
self::$layout = 'layouts/lp.php';
|
|
self::addScript('/js/jquery-2.1.0.min.js');
|
|
self::addScript('/js/jquery-ui-1.10.4.custom.min.js');
|
|
self::addScript('/js/bootstrap.min.js');
|
|
self::addScript('/js/lp.js?ver=' . App::getConfig('version'));
|
|
self::addStyle('/css/bootstrap.min.css');
|
|
self::addStyle('/css/bootstrap-theme.min.css');
|
|
self::addStyle('/css/lp.css?ver=' . App::getConfig('version'));
|
|
|
|
self::$points = Point::model()->getCount(array('where' => '`status` = "published"'));
|
|
self::$authors = User::model()->getCount();
|
|
}
|
|
|
|
public function actionSend()
|
|
{
|
|
$msg = '';
|
|
|
|
if ($_REQUEST) {
|
|
foreach ($_REQUEST as $key => $value) {
|
|
$msg .= $key. ': '.$value."\n";
|
|
}
|
|
}
|
|
|
|
if ($msg) {
|
|
Alarmer::send($msg);
|
|
} else {
|
|
App::error404();
|
|
}
|
|
|
|
die('OK');
|
|
}
|
|
|
|
public function actionIndex()
|
|
{
|
|
self::render('/lp/index.php', array(
|
|
'points' => self::$points,
|
|
'authors' => self::$authors,
|
|
'followers' => self::$followers,
|
|
'routes' => self::$routes,
|
|
));
|
|
}
|
|
|
|
public function actionExcursion()
|
|
{
|
|
self::render('/lp/excursion.php', array(
|
|
'points' => self::$points,
|
|
'authors' => self::$authors,
|
|
'followers' => self::$followers,
|
|
'routes' => self::$routes,
|
|
));
|
|
}
|
|
|
|
public function actionHotels()
|
|
{
|
|
self::render('/lp/hotels.php', array(
|
|
'points' => self::$points,
|
|
'authors' => self::$authors,
|
|
'followers' => self::$followers,
|
|
'routes' => self::$routes,
|
|
));
|
|
}
|
|
|
|
public function actionCafe()
|
|
{
|
|
self::render('/lp/cafe.php', array(
|
|
'points' => self::$points,
|
|
'authors' => self::$authors,
|
|
'followers' => self::$followers,
|
|
'routes' => self::$routes,
|
|
));
|
|
}
|
|
} |