View file admin_list/setting_down.php

File size: 2.02Kb
<?php
define('SHCMS', true);
include_once'../system/inc/basic_settings.php';
$shcmsengine['title'] = 'SHCMS Engine Настройки загрузки файлов.';
include_once'../template/head.php';
registrat();
$adminka ->admin();

if($_POST['submit']) {
    $submit = $_POST['submit'];
}
if(isset($submit)) {
if($_POST['down']) {
    $down = $_POST['down'];
}
if($_POST['down_counts']) {
    $down_counts = $_POST['down_counts'];
}

$settings_shcms['down_list'] = (isset ($down) && $down);
$settings_shcms['down_count'] = (isset ($down_counts) && $down_counts);
$ok_mysq = mysql_query("UPDATE `settings_shcms` SET `down_list` = '$down',`down_count` = '$down_counts'");
if($ok_mysq == true)
{
echo '<div class="actshcms">Изминение успешно сохранены</div>';
	header("Refresh: 1; url=?");
	include_once'../template/foot.php';
	exit();
}
else
{
echo '<div class="errors">Настройки не сохранены</div>';
	header("Refresh: 1; url=?");
	include_once'../template/foot.php';
	exit();
}
}

echo '<form method="post" action="?">';

 echo "Скачивание файлов с сервера:<br />\n<select name='down'>\n";
          
	echo '<option value="0"' . ($settings_shcms['down_list'] == 0? ' selected="selected">' : '>') .'Да</option>';	  
	echo '<option value="1"' . ($settings_shcms['down_list'] == 1? ' selected="selected">' : '>') .'Нет</option>';
				   
            
        echo '</select><br/>';
	 echo "Включить счетчик скачиваний файла:<br />\n<select name='down_counts'>\n";
          
	echo '<option value="0"' . ($settings_shcms['down_count'] == 0? ' selected="selected">' : '>') .'Да</option>';	  
	echo '<option value="1"' . ($settings_shcms['down_count'] == 1? ' selected="selected">' : '>') .'Нет</option>';
				   
            
        echo '</select><br/>';




echo '<input type="submit" name="submit" value="Сохранить"></form>';










	include_once'../template/foot.php';
?>