File size: 1.77Kb
<?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";require_once"../../template/isset.php";$time=time();$file=check($file);if ($_SESSION['log']!="" && md5($_SESSION['par'])!="" && md5($_SESSION['par'])==$provpar && $_SESSION['log']==$provlog ) {if ($dostup==101 && $log==$config_nikname){ echo'<div class=tp>Ред главной города</div><div class=body>';if(!isset($action)){$opis=file("../../local/datamain/siti.dat");$count=count($opis);echo '<div class=b>';for ($i = 0; $i < $count; $i++){$al.=$opis[$i];}echo '<form action="edit.php?action=editfile&'.SID.'" name="form" method="POST">';echo '<textarea cols="110" rows="20" name="fil">'.$al.'</textarea>';echo '<br><input type="submit" value="Редактировать"></form></div>';}if($action=="editfile"){if($fil!=""){$fp = fopen("../../local/datamain/siti.dat","a+");flock ($fp,LOCK_EX);ftruncate($fp,0);fputs($fp,$fil);fflush ($fp);flock ($fp,LOCK_UN);fclose($fp);chmod ("../../local/datamain/siti.dat", 0666);}header ("Location: setting.php?isset=mp_editfiles&".SID);}} else {header ("Location: ../index.php?error&".SID);}} else {header ("Location: ../index.php?error&".SID);}
echo'</div><div class="btm">» <a href="../index.php?'.SID.'">В город</a><br>';
echo'» <a href="setting.php?">Настройки</a><br>';
echo'» <a href="../../index.php?'.SID.'">На главную</a></div>';
include_once "../../themes/$config_themes/foot.php";
?>