AVE.CMS v3.28
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.5 KiB

8 years ago
<?php
7 years ago
/**
* AVE.cms
*
* @package AVE.cms
* @version 3.x
* @filesource
* @copyright © 2007-2014 AVE.cms, http://www.ave-cms.ru
*
* @license GPL v.2
*/
8 years ago
7 years ago
if (! defined('ACP'))
{
header('Location:index.php');
exit;
}
8 years ago
7 years ago
check_permission_acp('db_actions');
8 years ago
7 years ago
$AVE_Template->config_load(BASE_DIR . '/admin/lang/' . $_SESSION['admin_language'] . '/dbactions.txt', 'db');
8 years ago
7 years ago
require (BASE_DIR . '/class/class.dbdump.php');
8 years ago
7 years ago
$AVE_DB_Service = new AVE_DB_Service;
if (!empty($_REQUEST['action']))
8 years ago
{
7 years ago
switch ($_REQUEST['action'])
{
case 'optimize':
$AVE_DB_Service->databaseTableOptimize();
break;
8 years ago
7 years ago
case 'repair':
$AVE_DB_Service->databaseTableRepair();
break;
8 years ago
7 years ago
case 'dump_top':
$AVE_DB_Service->databaseDumpExport(1);
exit;
8 years ago
7 years ago
case 'dump':
$AVE_DB_Service->databaseDumpExport();
exit;
8 years ago
7 years ago
case 'restore':
7 years ago
$AVE_DB_Service->databaseDumpImport(BASE_DIR . '/tmp/backup/');
7 years ago
break;
8 years ago
7 years ago
case 'download':
$AVE_DB_Service->databaseDumpFileSave($_REQUEST['file']);
break;
8 years ago
7 years ago
case 'restorefile':
$AVE_DB_Service->databaseDumpFileImport($_REQUEST['file']);
break;
8 years ago
7 years ago
case 'deletefile':
$AVE_DB_Service->databaseDumpFileDelete($_REQUEST['file']);
break;
}
8 years ago
}
7 years ago
$AVE_Template->assign('db_size', get_mysql_size());
$AVE_Template->assign('files', $AVE_DB_Service->databaseFilesGet());
$AVE_Template->assign('tables', $AVE_DB_Service->databaseTableGet());
$AVE_Template->assign('content', $AVE_Template->fetch('dbactions/actions.tpl'));
8 years ago
?>