Файл: foot_set.php
Строк: 207
<?
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';
include_once 'sys/inc/db_connect.php';
include_once 'sys/inc/ipua.php';
include_once 'sys/inc/fnc.php';
include_once 'sys/inc/user.php';
only_reg();
$set['title']='настройки нижней навигации';
include_once 'sys/inc/thead.php';
title();
if (isset($_POST['save'])){
if (isset($_POST['nav1']) && ($_POST['nav1']==1 || $_POST['nav1']==0))
{
$user['nav1']=intval($_POST['nav1']);
mysql_query("UPDATE `user` SET `nav1` = '$user[nav1]' WHERE `id` = '$user[id]' LIMIT 1");
}
else{$user['nav1']=0;mysql_query("UPDATE `user` SET `nav1` = '0' WHERE `id` = '$user[id]' LIMIT 1");}
if (isset($_POST['nav2']) && ($_POST['nav2']==1 || $_POST['nav2']==0))
{
$user['nav2']=intval($_POST['nav2']);
mysql_query("UPDATE `user` SET `nav2` = '$user[nav2]' WHERE `id` = '$user[id]' LIMIT 1");
}
else{$user['nav2']=0;mysql_query("UPDATE `user` SET `nav2` = '0' WHERE `id` = '$user[id]' LIMIT 1");}
if (isset($_POST['nav3']) && ($_POST['nav3']==1 || $_POST['nav3']==0)){$user['nav3']=intval($_POST['nav3']);mysql_query("UPDATE `user` SET `nav3` = '$user[nav3]' WHERE `id` = '$user[id]' LIMIT 1");}else{$user['nav3']=0;mysql_query("UPDATE `user` SET `nav3` = '0' WHERE `id` = '$user[id]' LIMIT 1");}
if (isset($_POST['nav4']) && ($_POST['nav4']==1 || $_POST['nav4']==0)){$user['nav4']=intval($_POST['nav4']);mysql_query("UPDATE `user` SET `nav4` = '$user[nav4]' WHERE `id` = '$user[id]' LIMIT 1");}else{$user['nav4']=0;mysql_query("UPDATE `user` SET `link4` = '0' WHERE `id` = '$user[id]' LIMIT 1");}
if (isset($_POST['nav5']) && ($_POST['nav5']==1 || $_POST['nav5']==0)){$user['nav5']=intval($_POST['nav5']);mysql_query("UPDATE `user` SET `nav5` = '$user[nav5]' WHERE `id` = '$user[id]' LIMIT 1");}else{$user['nav5']=0;mysql_query("UPDATE `user` SET `nav5` = '0' WHERE `id` = '$user[id]' LIMIT 1");}
if (isset($_POST['nav6']) && ($_POST['nav6']==1 || $_POST['nav6']==0)){$user['nav6']=intval($_POST['nav6']);mysql_query("UPDATE `user` SET `nav6` = '$user[nav6]' WHERE `id` = '$user[id]' LIMIT 1");}else{$user['nav6']=0;mysql_query("UPDATE `user` SET `nav6` = '0' WHERE `id` = '$user[id]' LIMIT 1");}
if (isset($_POST['nav7']) && ($_POST['nav7']==1 || $_POST['nav7']==0)){$user['nav7']=intval($_POST['nav7']);mysql_query("UPDATE `user` SET `nav7` = '$user[nav7]' WHERE `id` = '$user[id]' LIMIT 1");}else{$user['nav7']=0;mysql_query("UPDATE `user` SET `nav7` = '0' WHERE `id` = '$user[id]' LIMIT 1");}
if (isset($_POST['nav8']) && ($_POST['nav8']==1 || $_POST['nav8']==0)){$user['nav8']=intval($_POST['nav8']);mysql_query("UPDATE `user` SET `nav8` = '$user[nav8]' WHERE `id` = '$user[id]' LIMIT 1");}else{$user['nav8']=0;mysql_query("UPDATE `user` SET `nav8` = '0' WHERE `id` = '$user[id]' LIMIT 1");}
if (isset($_POST['nav9']) && ($_POST['nav9']==1 || $_POST['nav9']==0)){$user['nav9']=intval($_POST['nav9']);mysql_query("UPDATE `user` SET `nav9` = '$user[nav9]' WHERE `id` = '$user[id]' LIMIT 1");}else{$user['nav9']=0;mysql_query("UPDATE `user` SET `nav9` = '0' WHERE `id` = '$user[id]' LIMIT 1");}
if (isset($_POST['nav10']) && ($_POST['nav10']==1 || $_POST['nav10']==0)){$user['nav10']=intval($_POST['nav10']);mysql_query("UPDATE `user` SET `nav10` = '$user[nav10]' WHERE `id` = '$user[id]' LIMIT 1");}else{$user['nav10']=0;mysql_query("UPDATE `user` SET `nav10` = '0' WHERE `id` = '$user[id]' LIMIT 1");}
if (!isset($err))msg('региональные данные успешно изменены');
}
err();
aut();
echo "<form method='post' action='?$passgen'>n";
echo 'укажите ссылки которые будут отоброжаться в нижней навигации<br/>';
echo "<label><input type='checkbox' name='nav1'".($user['nav1']?" checked='checked'":null)." value='1' /> ваш сайт</label><br />n";
echo "<label><input type='checkbox' name='nav2'".($user['nav2']?" checked='checked'":null)." value='1' /> форум</label><br />n";
echo "<label><input type='checkbox' name='nav3'".($user['nav3']?" checked='checked'":null)." value='1' /> чат</label><br />n";
echo "<label><input type='checkbox' name='nav4'".($user['nav4']?" checked='checked'":null)." value='1' /> гостевая</label><br />n";
echo "<label><input type='checkbox' name='nav5'".($user['nav5']?" checked='checked'":null)." value='1' /> зона обмена</label><br />n";
echo "<label><input type='checkbox' name='nav6'".($user['nav6']?" checked='checked'":null)." value='1' /> знакомства</label><br />n";
echo "<label><input type='checkbox' name='nav7'".($user['nav7']?" checked='checked'":null)." value='1' /> фотоальбомы</label><br />n";
echo "<label><input type='checkbox' name='nav8'".($user['nav8']?" checked='checked'":null)." value='1' /> дневники</label><br />n";
echo "<label><input type='checkbox' name='nav9'".($user['nav9']?" checked='checked'":null)." value='1' /> сообщества</label><br />n";
echo "<label><input type='checkbox' name='nav10'".($user['nav10']?" checked='checked'":null)." value='1' /> Развлечения</label><br />n";
echo "<input type='submit' name='save' value='OK' />n";
echo "</form>n";
echo "<div class=foot><a href=/info.php><назад</a></div>";
include_once 'sys/inc/tfoot.php';?>