Размер файла: 3.47Kb
<?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";
include_once"../template/isset.php";
if ($provlog==$_SESSION['log'] && $provpar==md5($_SESSION['par']) && $_SESSION['log']!="" && md5($_SESSION['par'])!="") {
if ($dostup==101 || $dostup==102 || $dostup==103){
//4,26,27,28,129,130 настройки форума
echo '<div class="tp">Конфигурация</div><div class=body>';
echo '<form method="post" action="forumset.php?'.SID.'">';
echo 'Сообщений в форуме на стр.:<br><input name="conf_set26" maxlength="2" value="'.$con_data[26].'" /><br>';
echo 'Тем в форуме на стр.:<br><input name="conf_set27" maxlength="2" value="'.$con_data[27].'" /><br>';
echo 'Кол-во тем в форуме сохраняется:<br><input name="conf_set28" maxlength="4" value="'.$con_data[28].'" /><br>';
echo 'Объявление на форуме: <br>Да';
if($con_data[129]=="1"){
echo '<input name="conf_set129" type="radio" value="1" checked>';} else {echo '<input name="conf_set129" type="radio" value="1" />';}
echo ' ';
if($con_data[129]=="0"){
echo '<input name="conf_set129" type="radio" value="0" checked>';} else {echo '<input name="conf_set129" type="radio" value="0" />';}
echo 'Нет<br>';
echo 'Реклама на форуме: <br>Да';
if($con_data[130]=="1"){
echo '<input name="conf_set130" type="radio" value="1" checked>';} else {echo '<input name="conf_set130" type="radio" value="1" />';}
echo ' ';
if($con_data[130]=="0"){
echo '<input name="conf_set130" type="radio" value="0" checked>';} else {echo '<input name="conf_set130" type="radio" value="0" />';}
echo 'Нет<br>';
echo '<input value="Изменить" type="submit" /></form></div>';
echo '<div class=btm>» <a href="forummain.php?'.SID.'">Вернуться</a><br>';
//---------------------- Изменение в форуме------------------------------//
if($conf_set26!="" && $conf_set27!="" && $conf_set28!="" && $conf_set129!="" && $conf_set130!=""){
$ufile = file_get_contents(BASEDIR."local/config.dat");
$udata = explode("|",$ufile);
$udata[26]=(int)$conf_set26;
$udata[27]=(int)$conf_set27;
$udata[28]=(int)$conf_set28;
$udata[129]=(int)$conf_set129;
$udata[130]=(int)$conf_set130;
for ($u=0; $u<$config_configkeys; $u++){
$utext.=$udata[$u].'|';}
if(!empty($udata[8]) && !empty($udata[9])){
$fp=fopen(BASEDIR."local/config.dat","a+");
flock($fp,LOCK_EX);
ftruncate($fp,0);
fputs($fp,$utext);
fflush($fp);
flock($fp,LOCK_UN);
fclose($fp);
unset($utext);
header ("Location: forummain.php?isset=mp_yesset&".SID);
}else{header ("Location: forummain.php?action=setfour&isset=mp_nosset&".SID);}
}
echo'» <a href="index.php?'.SID.'">В админку</a><br>';
echo'» <a href="../index.php?'.SID.'">На главную</a></div>';
} else {header ("Location: ../index.php?isset=404&".SID);}
} else {header ("Location: ../index.php?isset=404&".SID);}
include_once"../themes/$config_themes/foot.php";
?>