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.
77 lines
2.1 KiB
77 lines
2.1 KiB
<?php |
|
|
|
/** |
|
* AVE.cms - Модуль Публикатор документов |
|
* |
|
* @package AVE.cms |
|
* @subpackage module_EditDoc |
|
* @filesource |
|
*/ |
|
|
|
if(!defined('BASE_DIR')) exit; |
|
|
|
if (defined('ACP')) |
|
{ |
|
$modul['ModuleName'] = "Публикатор документов"; |
|
$modul['ModuleSysName'] = "editdoc"; |
|
$modul['ModuleVersion'] = "1.0.2"; |
|
$modul['ModuleDescription'] = "Данный модуль предназначен для создания форм ввода и редактирования документов на сайте"; |
|
$modul['ModuleAutor'] = "Ave.cms Team"; |
|
$modul['ModuleCopyright'] = "© 2012 Ave-cms.ru"; |
|
$modul['ModuleIsFunction'] = 1; |
|
$modul['ModuleTemplate'] = 0; |
|
$modul['ModuleAdminEdit'] = 1; |
|
$modul['ModuleFunction'] = "mod_editdoc"; |
|
$modul['ModuleTag'] = '[mod_editdoc:XXX]'; |
|
$modul['ModuleTagLink'] = null; |
|
$modul['ModuleAveTag'] = '#\\\[mod_editdoc:(\\\d+)]#'; |
|
$modul['ModulePHPTag'] = "<?php mod_editdoc(''$1''); ?>"; |
|
} |
|
|
|
|
|
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); |
|
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; |
|
} |
|
} |
|
|
|
?>
|