Размер файла: 3.31Kb
<?php
// mod by Golem http://veplog.ru
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";
echo '<div class=tp> Изменение настроек</div><br>';
if ($provlog==$_SESSION['log'] && $provpar==md5($_SESSION['par']) && $_SESSION['log']!="" && md5($_SESSION['par'])!=""){
if(eregi("[^a-z0-9_+-]",$skins) || empty($skins)){ header ("Location: setting.php?isset=incorrect&".SID); exit;}
if(eregi("[^0-9]",$bookpostus) || $bookpostus>50 || empty($bookpostus)){ header ("Location: setting.php?isset=incorrect&".SID); exit;}
if(eregi("[^0-9]",$news) || $news>50 || empty($news)){ header ("Location: setting.php?isset=incorrect&".SID); exit;}
if(eregi("[^0-9]",$forumpost) || $forumpost>50 || empty($forumpost)){ header ("Location: setting.php?isset=incorrect&".SID); exit;}
if(eregi("[^0-9]",$forumtem) || $forumtem>50 || empty($forumtem)){ header ("Location: setting.php?isset=incorrect&".SID); exit;}
if(eregi("[^0-9]",$userlist) ||$userlist>50 || empty($userlist)){ header ("Location: setting.php?isset=incorrect&".SID); exit;}
if(eregi("[^0-9]",$chatpost) || $chatpost>50 || empty($chatpost)){ header ("Location: setting.php?isset=incorrect&".SID); exit;}
if(eregi("[^0-9]",$rewnew) || $rewnew>300 || empty($rewnew)){ header ("Location: setting.php?isset=incorrect&".SID); exit;}
if(eregi("[^0-9]",$prrivs) || $prrivs>50 || empty($prrivs)){ header ("Location: setting.php?isset=incorrect&".SID); exit;}
if(eregi("[^0-9+-]",$sdvig) || $sdvig===""){ header ("Location: setting.php?isset=incorrect&".SID); exit;}
if(!file_exists(BASEDIR."themes/$skins/index.php")){$skins="default";}
if(isset($_SESSION['my_themes']) && $_SESSION['my_themes']!=""){
$_SESSION['my_themes']="";
unset($_SESSION['my_themes']);
}
//------------------------------ Запись в профиль ----------------------------//
$ufile = file_get_contents(BASEDIR."local/profil/$log.prof");
$udata = explode(":||:",$ufile);
$udata[14]=$ip;
$udata[20]=check($skins);
$udata[21]=(int)$bookpostus;
$udata[22]=(int)$news;
$udata[23]=(int)$forumpost;
$udata[24]=(int)$forumtem;
$udata[25]=(int)$userlist;
$udata[26]=(int)$chatpost;
$udata[27]=(int)$rewnew;
$udata[30]=check($sdvig);
$udata[31]=(int)$times;
$udata[32]=(int)$prrivs;
$udata[45]=(int)$editavator;
$udata[55]=(int)$editperson;
$udata[66]=(int)$ipcontrol;
$udata[74]=(int)$udata74;
for ($u=0; $u<$config_userprofkey; $u++){
$utext.=$udata[$u].':||:';}
if($udata[0]!="" && $udata[1]!="" && $udata[4]!="" && $utext!=""){
$fp=fopen(BASEDIR."local/profil/$log.prof","a+");
flock($fp,LOCK_EX);
ftruncate($fp,0);
fputs($fp,$utext);
fflush($fp);
flock($fp,LOCK_UN);
fclose($fp);
unset($utext);
}
header ("Location: set.php?isset=editsetting&".SID); exit;
}else{
sleep(1);
header("Location:../pages/vhod.php");
exit();
}
echo'<br>[<a href="setting.php?'.SID.'">Вернуться</a>]<br>';
echo'[<a href="../index.php?'.SID.'">На главную</a>]';
include_once"../themes/$config_themes/foot.php";
?>