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.

70 lines
1.4 KiB

4 years ago
<?php
/**
* AVE.cms - Модуль Консоль
*
* @package AVE.cms
* @subpackage module_Console
* @since 1.0
* @filesource
*/
if (! defined('BASE_DIR'))
exit;
//=======================================================
// The control module in the admin panel
//=======================================================
if (
defined('ACP')
&& (isset($_REQUEST['moduleaction']) && !empty($_REQUEST['moduleaction']))
&& (isset($_REQUEST['mod']) && $_REQUEST['mod'] == 'snippets')
)
{
require_once(BASE_DIR . '/modules/snippets/class/snippets.php');
new Snippets;
Snippets::$tpl_dir = BASE_DIR . '/modules/snippets/admin/';
Snippets::$fragmentdir = BASE_DIR . '/modules/snippets/data/';
Snippets::$fragmentfile = 'fragment.php';
$lang_file = BASE_DIR . '/modules/snippets/lang/' . $_SESSION['admin_language'] . '.txt';
$AVE_Template->config_load($lang_file, 'admin');
//-- Actions
switch ($_REQUEST['moduleaction'])
{
case '1':
Snippets::show();
break;
case 'execute':
Snippets::fragmentExecute();
break;
case 'insert':
Snippets::fragmentInsert();
break;
case 'new':
Snippets::fragmentNew();
break;
case 'save':
Snippets::fragmentSave();
break;
case 'delete':
Snippets::fragmentDelete();
break;
case 'fragments':
Snippets::fragmentsShow();
break;
}
}
?>