You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
1.7 KiB
64 lines
1.7 KiB
<?php |
|
|
|
/** |
|
* AVE.cms - Модуль Публикатор документов |
|
* |
|
* @package AVE.cms |
|
* @subpackage module_EditDoc |
|
* @filesource |
|
*/ |
|
|
|
if (! defined('BASE_DIR')) |
|
exit; |
|
|
|
//======================================================= |
|
// Вызов модуля по тегу |
|
//======================================================= |
|
function mod_editdoc($id) |
|
{ |
|
global $AVE_DB, $AVE_Core, $AVE_Template; |
|
|
|
if (! (is_file(BASE_DIR . '/modules/editdoc/class/editdoc.php') && @require_once(BASE_DIR . '/modules/editdoc/class/editdoc.php'))) |
|
module_error(); |
|
|
|
echo Editdoc::EditDocDo($id); |
|
} |
|
|
|
|
|
//======================================================= |
|
// Управление модулем в Панели управления |
|
//======================================================= |
|
if (defined('ACP') && !empty($_REQUEST['moduleaction'])) |
|
{ |
|
if (! (is_file(BASE_DIR . '/modules/editdoc/class/editdoc.php') && @require_once(BASE_DIR . '/modules/editdoc/class/editdoc.php'))) |
|
module_error(); |
|
|
|
$tpl_dir = BASE_DIR . '/modules/editdoc/templates/'; |
|
$lang_file = BASE_DIR . '/modules/editdoc/lang/' . $_SESSION['user_language'] . '.txt'; |
|
|
|
$AVE_Template->config_load($lang_file, 'admin'); |
|
|
|
switch ($_REQUEST['moduleaction']) |
|
{ |
|
case '1': |
|
Editdoc::EditDocList($tpl_dir); |
|
break; |
|
|
|
case 'del': |
|
Editdoc::EditDocDelete($_REQUEST['id']); |
|
break; |
|
|
|
case 'new': |
|
Editdoc::EditDocNew($tpl_dir); |
|
break; |
|
|
|
case 'edit': |
|
Editdoc::EditDocEdit(isset($_REQUEST['id']) ? $_REQUEST['id'] : null, $tpl_dir); |
|
break; |
|
|
|
case 'saveedit': |
|
Editdoc::EditDocSave(isset($_REQUEST['id']) ? $_REQUEST['id'] : null); |
|
break; |
|
} |
|
} |
|
?>
|