View file panel/welcome.php

File size: 2.3Kb
<?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";


if ($provlog==$_SESSION['log'] && $provpar==md5($_SESSION['par']) && $_SESSION['log']!="" && md5($_SESSION['par'])!="") {
if ($dostup==101 || $dostup==102){

//---------------------- Изменение приветствия  ------------------------------//
echo'<div class="tp">Блок приветствие</div>';



if($action=="edit"){
if($buffs!=""){
$buffs=check($buffs);	
$fp=fopen("../local/welcome.dat","a+");
flock($fp,LOCK_EX);
ftruncate($fp,0);
fputs ($fp,$buffs);
fflush($fp);
flock($fp,LOCK_UN);
fclose ($fp);

echo '<font color="#FF0000"><b>Блок приветствия успешно отредактирован!</b></font><br><br>';
}else{
echo'<font color="#FF0000"><b>Вы не написали текст приветствия!</b></font><br><br>';}
}


//---------------------- Форма ввода  ------------------------------//

$buff = file_get_contents("../local/welcome.dat");  

echo 'Приветствие:<br>';

if($config_themes!="wml"){
echo '<form method="post" action="welcome.php?action=edit&amp;'.SID.'">';	
echo '<textarea name="buffs" cols="35" rows="5">'.$buff.'</textarea><br>';
echo '<div align="left"><input value="Редактировать" type="submit"></form>';
}else{      
echo '<input name="buffs" value="'.$buff.'"/><br>'; 
echo '<anchor>Редактировать';
echo '<go href="welcome.php?action=edit&amp;'.SID.'" method="post">';
echo '<postfield name="buffs" value="$(buffs)"/>';
echo '</go></anchor><br>--------------------<br>';     
}

echo'<br><div class="btm">[<a href="index2.php?'.SID.'">В админку</a>]<br>';
echo'[<a href="../index.php?'.SID.'">На главную</a>]</div></div>';

} else {header ("Location: ../index.php?isset=404&".SID);}
} else {header ("Location: ../index.php?isset=404&".SID);}
include_once"../themes/$config_themes/foot.php";
?>