Файл: adultscript-2.0.3-pro/files/admin/modules/email/email.php
Строк: 56
<?php
defined('_VALID') or die('Restricted Access!');
class VModule_Admin_email
{
private $components = array(
'manage' => 1,
'add' => 1,
'edit' => 1,
'send' => 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/email/components/'.$component.'.php';
$component_class = 'VComponent_Admin_email_'.$component;
if (file_exists($component_file) && is_file($component_file)) {
require $component_file;
} else {
die('Failed to load admin email component ('.$component.')!');
}
$obj = new $component_class();
$obj->render();
} else {
die('Invalid admin email component specified!');
}
}
}
?>