Просмотр файла wap_gb/reply.php

Размер файла: 1.47Kb
<?php
include'login.php';
include'functions.php';
$zag='Опции';
include'head.php';
include'del_ip.php';


if($id==$admin){
if(!empty($mess)){
if(file_exists($mdir.'/'.$mess.'.mess')){

$file=file($mdir.'/'.$mess.'.mess');
$file=explode('#',$file[0]);


if(empty($act)){
print'<input name="reply'.$time.'" maxlength="100"/><br/>
<small>
<anchor>Ответить
<go href="reply.php?id='.$id.'&amp;ps='.$ps.'&amp;mess='.$mess.'&amp;act=reply" method="post">
<postfield name="reply" value="$(reply'.$time.')"/>
</go>
</anchor>
</small>
';} else {


if(!empty($reply)){
if(strlen(utf2cyr($reply))<=100){

$reply=htmlspecialchars(stripslashes($reply));
$reply=trim(ereg_replace('#(#)*','<br/>',$reply));

$file[2]=$reply;
$imp=implode('#',$file);

$fp=fopen($mdir.'/'.$mess.'.mess','w');
fputs($fp,$imp);
fclose($fp);

print'<small>Ответ успешно добавлен</small>';


} else {print 'Слишком большой ответ. Сократите!';}
} else {print '<small>Отсутствует сообщение!</small>';}


}


} else {print '<small>Сообщения не существует!</small>';}
} else {print '<small>Введите сообщение!</small>';}
} else {print '<small>У вас недостаточно прав!</small>';}


print'
<small><br/>-----<br/>
&lt;-<a href="./?id='.$id.'&amp;ps='.$ps.'">Гостевая</a><br/>
&lt;--<a href="../">Главная</a></small>';

print $endwml;
?>