virt2/api/code/settings.php

22 lines
797 B
PHP
Raw Permalink Normal View History

<?php
if ($_SESSION['dostup']!=='a' && $_SESSION['dostup']!=='e')header( 'Location: /403/' );
@mkdir (MYDIR . '/img/logo', 0700);
@mkdir (MYDIR . '/img/favicon', 0700);
if ($_POST['ok']){
$db->update_xml('settings', 1, $_POST);
header( 'Location: /settings/' );
}
//собираем настройки....
unset($a);
$a['mod'] = 'global';
$db -> get_val( 'settings', $a, 'xml' );
$xml = $db -> result;
require_once MYDIR . '/api/php/parsexml.php';
$parce -> make_massiv ( $xml );
$arr = $parce -> res;
foreach ( $arr as $key => $value ) $settings[$key] = $value;
//Получаем список шаблонов....
include_once(MYDIR . '/api/php/list_dir.php');
$templates_list=list_dir(MYDIR . '/api/templates/other');
$smarty->assign('templates_list', $templates_list);
?>