Файл: adultscript-2.0.3-pro/files/mobile/components/search.php
Строк: 44
<?php
defined('_VALID') or die('Restricted Access!');
class VComponent_mobile_search extends VMobile
{
public function __construct()
{
parent::__construct();
}
public function render()
{
$types = array('video' => 1, 'photo' => 1, 'pornstar' => 1, 'community' => 1);
$type = (VUri::request(1)) ? VUri::request(1) : 'xxx';
if (!isset($types[$type])) {
$this->notfound();
}
$parent_file = $type.'.php';
$component_file = $type.'_search.php';
$component_class = 'VComponent_mobile_'.$type.'_search';
if ($type == 'community') {
$component_file = 'community.php';
$component_class = 'VComponent_mobile_community';
}
try {
if ($type != 'community') {
require $parent_file;
}
require $component_file;
$obj = new $component_class();
$obj->render();
} catch (Exception $e) {
throw new VException($e);
}
}
}