Размер файла: 2.11Kb
<?php
require_once"../template/start.php";
require_once"../template/regglobals.php";
require_once"../template/config.php";
require_once"../template/functions.php";
require_once"../template/maincore.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";
$text = file("../local/profil/$log.prof");
if ($text!=""){
$udata = explode(":||:",$text[0]);
$provlog=trim($udata[0]);
$provpar=trim($udata[1]);
$dostup=trim($udata[7]);
$privat=trim($udata[10]);}
if (!$_SESSION['log']=="" && !md5($_SESSION['par'])=="" && md5($_SESSION['par'])==$provpar && $_SESSION['log']==$provlog ) {
if ($dostup==101 || $dostup==102){
echo'<img src="../images/img/menu.gif" alt=""> <b>Блок приветствие</b><br>';
if($act=="edit")
{
$fp=fopen("../local/welcome.dat","a+");
flock($fp,LOCK_EX);
ftruncate($fp,0);
fputs ($fp,$buffs);
fflush($fp);
flock($fp,LOCK_UN);
fclose ($fp);
chmod ($fp, 0666);
chmod ("../local/welcome.dat", 0666);
echo"<br>Блок успешно отредактирован!<br><br>";
echo'<img src="../images/img/back.gif" alt=""> <a href="welcome.php?'.SID.'">Назад</a><br>';
}
else
{
$fi = fopen("../local/welcome.dat","a+");
if(!fi) { echo("Ошибка открытия файла"); }
else
{
$buff = fread ($fi,100000);
echo '<br><b>Приветствие:</b>';
echo '<form method="post" action="welcome.php?act=edit">';
echo '<textarea name="buffs" width=60%>'.$buff.'</textarea><br>';
echo '<input value="Редактировать" name="do" type="submit"></form><br>';
}
}
echo'<img src="../images/img/panel.gif" alt=""> <a href="index.php?'.SID.'">В админку</a><br>';
echo'<img src="../images/img/homepage.gif" alt=""> <a href="../index.php?'.SID.'">На главную</a><br>';
} else {header ("Location: ../index.php?error&".SID);}
} else {header ("Location: ../index.php?error&".SID);}
include_once"../themes/$config_themes/foot.php";
?>