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