Файл: adultscript-2.0.3-pro/files/admin/modules/frontpage/frontpage.php
Строк: 58
<?php
defined('_VALID') or die('Restricted Access!');
class VModule_Admin_frontpage
{
private $components = array(
'config' => 1
);
public function __construct()
{
}
public function render()
{
$component = VUri::request(1);
if (isset($this->components[$component]) &&
$this->components[$component] === 1) {
$component_file = ADMIN_DIR.'/modules/frontpage/components/'.$component.'.php';
$component_class = 'VComponent_Admin_frontpage_'.$component;
try {
require $component_file;
$component = new $component_class();
$component->render();
} catch (Exception $e) {
throw new VException($e);
}
} else {
throw new VException('Invalid admin frontpage component specified!');
}
}
}