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

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


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

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


if(empty($act)){
print'<input name="post'.$time.'" value="'.$file[1].'" maxlength="200"/><br/>
<small>
<anchor>Сохранить
<go href="edit.php?id='.$id.'&amp;ps='.$ps.'&amp;mess='.$mess.'&amp;act=edit" method="post">
<postfield name="post" value="$(post'.$time.')"/>
</go>
</anchor>
</small>
';} else {


if(!empty($post)){
if(strlen(utf2cyr($post))<=200){

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

$file[1]=substr($post,0,200);
$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;
?>