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.

191 lines
4.3 KiB

7 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
*/
if (!defined('ACP'))
{
header('Location:index.php');
exit;
}
global $AVE_Template;
require(BASE_DIR . '/class/class.docs.php');
require(BASE_DIR . '/class/class.settings.php');
$AVE_Settings = new AVE_Settings;
$AVE_Document = new AVE_Document;
$AVE_Template->config_load(BASE_DIR . '/admin/lang/' . $_SESSION['admin_language'] . '/settings.txt','settings');
switch($_REQUEST['action'])
{
case '':
switch ($_REQUEST['sub'])
7 years ago
{
7 years ago
case '':
if(check_permission_acp('gen_settings'))
{
$AVE_Settings->settingsShow();
break;
}
7 years ago
7 years ago
case 'case':
if(check_permission_acp('gen_settings_more'))
{
$AVE_Settings->settingsCase();
break;
7 years ago
}
7 years ago
case 'save':
if (isset($_REQUEST['more'])) {
if(check_permission_acp('gen_settings_more')) $AVE_Settings->settingsCase();
} else {
if(check_permission_acp('gen_settings')) $AVE_Settings->settingsSave();
}
break;
case 'countries':
if(check_permission_acp('gen_settings_countries'))
7 years ago
{
7 years ago
if (isset($_REQUEST['save']) && $_REQUEST['save'] == 1)
{
$AVE_Settings->settingsCountriesSave();
7 years ago
7 years ago
header('Location:index.php?do=settings&sub=countries&cp=' . SESSION);
exit;
}
$AVE_Settings->settingsCountriesList();
break;
7 years ago
}
7 years ago
case 'language':
if(check_permission_acp('gen_settings_languages'))
{
if(isset($_REQUEST['func'])){
switch($_REQUEST['func'])
{
case 'default':
if(isset($_REQUEST['Id'])){
$exists=$AVE_DB->Query("SELECT Id FROM ".PREFIX."_settings_lang WHERE Id=".(int)$_REQUEST['Id'])->GetCell();
if($exists){
$AVE_DB->Query("UPDATE ".PREFIX."_settings_lang SET lang_default=0");
$AVE_DB->Query("UPDATE ".PREFIX."_settings_lang SET lang_default=1 WHERE Id=".(int)$_REQUEST['Id']." LIMIT 1");
}
7 years ago
}
7 years ago
header('Location:index.php?do=settings&sub=language&cp=' . SESSION);
exit;
case 'on':
if(isset($_REQUEST['Id'])){
$AVE_DB->Query("UPDATE ".PREFIX."_settings_lang SET lang_status=1 WHERE Id=".(int)$_REQUEST['Id']);
}
header('Location:index.php?do=settings&sub=language&cp=' . SESSION);
exit;
case 'off':
if(isset($_REQUEST['Id'])){
$AVE_DB->Query("UPDATE ".PREFIX."_settings_lang SET lang_status=0 WHERE Id=".(int)$_REQUEST['Id']);
}
header('Location:index.php?do=settings&sub=language&cp=' . SESSION);
exit;
case 'save':
$AVE_Settings->settingsLanguageEditSave();
exit;
}
}
else
{
$AVE_Settings->settingsLanguageList();
break;
7 years ago
}
}
7 years ago
case 'editlang':
if (check_permission_acp('gen_settings_languages'))
7 years ago
{
7 years ago
$AVE_Settings->settingsLanguageEdit();
7 years ago
break;
}
7 years ago
case 'clearcache':
if (check_permission_acp('cache_clear'))
{
$AVE_Template->CacheClear();
exit;
}
7 years ago
7 years ago
case 'clearthumb':
if (check_permission_acp('cache_thumb'))
{
$AVE_Template->ThumbnailsClear();
exit;
}
7 years ago
7 years ago
case 'clearrevision':
if (check_permission_acp('document_revisions'))
{
$AVE_Document->documentsRevisionsClear();
exit;
}
7 years ago
7 years ago
case 'clearcounter':
if (check_permission_acp('gen_settings'))
{
$AVE_Document->documentCounterClear();
exit;
}
7 years ago
7 years ago
case 'showcache':
cacheShow();
exit;
7 years ago
case 'showcountdocs':
$rubric_id = isset($_REQUEST['rubric_id']) ? $_REQUEST['rubric_id'] : null;
countDocuments($rubric_id);
exit;
7 years ago
}
7 years ago
break;
//-- v3.2
case 'paginations':
$AVE_Settings->settingsPaginationsList();
break;
case 'new_paginations':
$AVE_Settings->settingsPaginationsNew();
break;
case 'edit_paginations':
$AVE_Settings->settingsPaginationsEdit();
break;
case 'save_paginations':
$AVE_Settings->settingsPaginationsSave();
break;
case 'del_paginations':
$AVE_Settings->settingsPaginationsDel();
break;
//-- v3.2
//-- v3.24
case 'robots':
$AVE_Settings->editRobots();
break;
case 'custom':
$AVE_Settings->editCustom();
break;
//-- v3.24
}
7 years ago
?>