Файл: adultscript-2.0.3-pro/files/admin/modules/link/link.php
Строк: 51
<?php
defined('_VALID') or die('Restricted Access!');
class VModule_Admin_link
{
private $components = array(
'manage' => 1,
'add' => 1,
'edit' => 1,
'view' => 1,
'config' => 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/link/components/'.$component.'.php';
$component_class = 'VComponent_Admin_link_'.$component;
require $component_file;
$obj = new $component_class();
$obj->render();
} else {
die('Invalid admin link component!');
}
}
}