Просмотр файла add.php

Размер файла: 2.02Kb
<?php
include"verx.php";
if($wap=="html"){
if($anekdot=="") {
print 'Ошибка!<br/>Вы не написали анекдота!<br/><a href="dob.php?wap='.$wap.'&amp;url='.$url.'&amp;rek='.$rek.'">Ещё раз</a>'; include "niz.php"; exit;}}
else
{
if($anekdot=="") {
print 'Ошибка!<br/>Вы не написали анекдота!<br/><a href="dob.php?wap='.$wap.'&amp;url='.$url.'&amp;rek='.$rek.'">Ещё раз</a>'; include "niz.php"; exit;}}
$text="$anekdot";
$text=str_replace("\r"," ",$text);
$text=str_replace("\r\n"," ",$text);
$text=str_replace("\n"," ",$text);
$text=str_replace(".ru"," ",$text);
$text=str_replace(".net"," ",$text);
$text=str_replace(".com"," ",$text);
$text=str_replace(".wen.ru"," ",$text);
$text=str_replace(".RU"," ",$text);
$text=str_replace(".NET"," ",$text);
$text=str_replace(".WEN"," ",$text);
$text=str_replace("WAP"," ",$text);
$text=str_replace("wap"," ",$text);
$text=str_replace("http://"," ",$text);
$text=str_replace("aleks","SIMWAP.RU",$text);
$text=htmlspecialchars(stripslashes($text));
$open=fopen("anekdot_base.dat","a+");
fwrite($open,"|||$text\r\n");
fclose($open);
$kom=@file("anekdot_base.dat");
$total=count($kom);
print '
Спасибо,ваш анекдот добавлен в базу анекдотов ,он уже показывается!<br/>Анекдотов стало '.$total.'<br/>
<a href="dob.php?wap='.$wap.'&amp;url='.$url.'&amp;rek='.$rek.'">Добавить ещё</a><br/>
<a href="index.php?wap='.$wap.'&amp;url='.$url.'&amp;rek='.$rek.'">К анекдотам</a>';

if($wap=="html")
{print '<div class="news">xHTML + <a href="index.php?wap=wml&amp;rek='.$rek.'&amp;url='.$url.'">WML</a><br/>&#169; <a href="http://'.$url.'">'.$url.'</a><br/><img src="http://'.$rek.'" alt=""/><br/></div></div></body></html>';}
else
{print '<br/>WML + <a href="index.php?wap=html&amp;url='.$url.'&amp;rek='.$rek.'">xHTML</a><br/>&#169; <a href="http://'.$url.'">'.$url.'</a><br/><img src="http://'.$rek.'" alt=""/></small><br/></p></card></wml>';}

?>