View file adm_panel/settings_foto.php

File size: 1.97Kb
<?
include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
$temp_set=$set;
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
include_once '../sys/inc/adm_check.php';
include_once '../sys/inc/user.php';
user_access('adm_set_foto',null,'index.php?'.SID);
adm_check();
$set['title']='Настройки фотогалереи';
include_once '../sys/inc/thead.php';
title();
if (isset($_POST['save']))
{
$temp_set['max_upload_foto_x']=intval($_POST['max_upload_foto_x']);
$temp_set['max_upload_foto_y']=intval($_POST['max_upload_foto_y']);

if (save_settings($temp_set))
{
admin_log('Настройки','Фотогалерея','Изменение настроек фотогалереи');
msg('Настройки успешно приняты');
}
else
$err='Нет прав для изменения файла настроек';
}
err();
aut();

$smarty = new Smarty_conf();
$smarty->assign('form_title','Параметры галереи');
$smarty->assign('method','POST');
$smarty->assign('action',"?$passgen");
$elements=array();

$elements[]=array('type'=>'input_text', 'title'=>'Ширина фото (max)', 'br'=>1,
'info'=>array('name' => 'max_upload_foto_x','value'=>$temp_set['max_upload_foto_x']));
$elements[]=array('type'=>'input_text', 'title'=>'Высота фото (max)', 'br'=>1,
'info'=>array('name' => 'max_upload_foto_y','value'=>$temp_set['max_upload_foto_y']));

$elements[]=array('type'=>'submit', 'br'=>0, 'info'=>array('name'=>'save', 'value'=>'Применить')); // кнопка
$smarty->assign('el',$elements);
$smarty->display('input.form.tpl');


$smarty = new Smarty_conf();
$smarty->assign('menu_title','Навигация');
$menu=array();
$menu[]=array('.','Админка');
$smarty->assign('menu',$menu);
$smarty->display('links.path.tpl');
include_once '../sys/inc/tfoot.php';
?>