Файл: adultscript-2.0.3-pro/files/mobile/components/static.php
Строк: 33
<?php
defined('_VALID') or die('Restricted Access!');
class VComponent_mobile_static extends VMobile
{
public function __construct()
{
parent::__construct();
}
public function render()
{
$name = VUri::request(1);
$namem = $name.'-mobile';
$cache_id = 'static_'.$namem;
if (!$static = $this->cache->get($cache_id, 86400)) {
$this->db->query("SELECT name, title, content, meta_title, meta_desc, meta_keys
FROM #__static
WHERE name = '".$this->db->escape($namem)."'
LIMIT 1");
if ($this->db->affected_rows()) {
$static = $this->db->fetch_assoc();
$this->cache->store($cache_id, $static, 86400);
} else {
$this->notfound('Invalid static page!');
}
}
$this->tpl->menu = 'video';
$this->tpl->meta_title = $static['meta_title'];
$this->tpl->meta_desc = $static['meta_desc'];
$this->tpl->meta_keys = $static['meta_keys'];
$this->tpl->canonical = BASE_URL.'/static/'.$name.'/';
$this->tpl->title = $static['title'];
$this->tpl->content = $static['content'];
$this->tpl->load(array('header', 'static', 'footer'));
$this->tpl->display();
}
}