Файл: adultscript-2.0.3-pro/files/admin/modules/content/content.php
Строк: 65
<?php
defined('_VALID') or die('Restricted Access!');
class VModule_Admin_content
{
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/content/components/'.$component.'.php';
$component_class = 'VComponent_Admin_content_'.$component;
if (file_exists($component_file) && is_file($component_file)) {
require $component_file;
} else {
die('Failed to load admin content component ('.$component.')!');
}
$obj = new $component_class();
$obj->render();
} else {
die('Invalid admin content component specified!');
}
}
}
?>