File size: 2.7Kb
<?
include "ini.php";
require_once"../template/start.php";
require_once"../template/regglobals.php";
require_once"../template/config.php";
require_once"../template/functions.php";
require_once"../template/antidos.php";
require_once"../template/cookies.php";
require_once"../template/gzip.php";
require_once"../template/header.php";
require_once"../template/referer.php";
include_once"../themes/$config_themes/index.php";
include_once"../template/isset.php";
$text = file("../local/profil/$log.prof");
if ($text!=""){
$udata = explode(":||:",$text[0]);
$provlog=trim($udata[0]);
$provpar=trim($udata[1]);
$privat=trim($udata[10]);}
//////////////////////////////////////////////////////////////////////////////////////
if (md5($_SESSION['par'])!==$provpar || $_SESSION['log']!==$provlog || $_SESSION['log']=="" || md5($_SESSION['par'])=="")
{header ("Location: index.php?".SID."");exit;}
//////////////////////////////////////////////////////////////////////////////////////
$kont=$_GET['kont'];
if (!file_exists("../local/datalove/prof/$log.prof")){header ("Location: reg.php?".SID."");exit;}
echo '<div class="tp"><img src="../images/lovers.png" alt="" /> Настройки</div><div class="body">';
$datalove=@file("../local/datalove/prof/$log.prof");
$datalove=explode(":||:", $datalove[0]);
if (isset($_GET['act']) && $_GET['act']=='set')
{
$datalove[11]=intval($_POST['kk']);
$datalove[19]=$_POST['dop_nadp'];
if ($datalove[11]=='0' && $datalove[11]=='')
{$datalove[11]='7';}
for ($i=0;$i<$k_vars;$i++ )
{
$ldata.="$datalove[$i]:||:";
}
$fp=fopen("../local/datalove/prof/$log.prof","w");
flock($fp,LOCK_EX);
fputs($fp,"$ldata");
fflush($fp);
flock($fp,LOCK_UN);
fclose($fp);
chmod ("../local/datalove/prof/$log.prof", 0666);
header("Location: index.php?set_ok&".SID."");
exit;
}
if ($datalove[19]=='on'){$check='checked';}else{$check='';}
echo "<form action=\"set.php?act=set&".SID."\" method=\"post\">";
echo "Пунктов на страницу:<br />\r\n";
echo "<input type=\"text\" maxlength=\"2\" name=\"kk\" size=\"2\" value=\"$datalove[11]\" /><br />\r\n";
echo "Доп. ссылки: <input type=\"checkbox\" name=\"dop_nadp\" $check /><br />\r\n";
echo "<br />\r\n";
echo "<input type=\"submit\" value=\"Изменить\" /><br />\r\n";
echo "</form>\r\n<br />\r\n";
echo "</div><div class='panel'>« <a href=\"kab.php?".SID."\">Личный кабинет</a><br />\r\n";
echo "« <a href=\"index.php?".SID."\" >Главная</a><br />\r\n";
echo "<div class='btm'><a href=\"../index.php?".SID."\">На главную</a></div>\r\n";
include_once"../themes/$config_themes/foot.php";
?>