Модуль импорта v2.26.0 (Light версия)
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.
 
 

74 lines
2.0 KiB

<?php
/**
* AVE.cms - Модуль Импорта
*
* @package AVE.cms
* @subpackage module_import
* @filesource
*/
if(!defined('BASE_DIR')) exit;
/**
* Админка
*/
if (defined('ACP') && (isset($_REQUEST['moduleaction'])))
{
// класс
require_once(BASE_DIR . '/modules/import/class.import.php');
$import = new ModuleImport;
// папка с шаблонами
$import->tpl_dir = BASE_DIR . '/modules/import/templates/';
// ланги
$AVE_Template->config_load(BASE_DIR . '/modules/import/lang/' . $_SESSION['admin_language'] . '.txt', 'admin');
$AVE_Template->assign('config_vars', $AVE_Template->get_config_vars());
$header_list = 'Location:index.php?do=modules&action=modedit&mod=import&moduleaction=1&cp=' . SESSION . '&page=' . $_REQUEST['page'];
switch($_REQUEST['moduleaction'])
{
case '1':
$import->importsList();
break;
case 'edit':
$import->importEdit((int)$_REQUEST['import_id']);
break;
case 'copy':
$import_id = $import->importCopy((int)$_REQUEST['import_id']);
header('Location:index.php?do=modules&action=modedit&mod=import&moduleaction=edit&import_id=' . $import_id . '&cp=' . SESSION);
exit;
case 'save':
$import_id = $import->importSave((int)$_REQUEST['import_id']);
if (! $_REQUEST['import_id'])
header('Location:index.php?do=modules&action=modedit&mod=import&moduleaction=edit&import_id=' . $import_id . '&cp=' . SESSION);
else
header($header_list);
exit;
case 'delete':
$import->importDelete((int)$_REQUEST['import_id']);
header($header_list);
exit;
case 'tags':
$import_id = (int)$_REQUEST['import_id'];
$import->importRun($import_id, true);
header('Location:index.php?do=modules&action=modedit&mod=import&moduleaction=edit&import_id=' . $import_id . '&cp=' . SESSION);
exit;
case 'run':
$import_id = (int)$_REQUEST['import_id'];
$import->importRun($import_id);
header('Location:index.php?do=modules&action=modedit&mod=import&moduleaction=edit&import_id=' . $import_id . '&cp=' . SESSION);
exit;
}
}