<?php
include"verx.php";
if($wap=="html"){
if($anekdot=="") {
print 'Ошибка!<br/>Вы не написали анекдота!<br/><a href="dob.php?wap='.$wap.'&url='.$url.'&rek='.$rek.'">Ещё раз</a>'; include "niz.php"; exit;}}
else
{
if($anekdot=="") {
print 'Ошибка!<br/>Вы не написали анекдота!<br/><a href="dob.php?wap='.$wap.'&url='.$url.'&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.'&url='.$url.'&rek='.$rek.'">Добавить ещё</a><br/>
<a href="index.php?wap='.$wap.'&url='.$url.'&rek='.$rek.'">К анекдотам</a>';
if($wap=="html")
{print '<div class="news">xHTML + <a href="index.php?wap=wml&rek='.$rek.'&url='.$url.'">WML</a><br/>© <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&url='.$url.'&rek='.$rek.'">xHTML</a><br/>© <a href="http://'.$url.'">'.$url.'</a><br/><img src="http://'.$rek.'" alt=""/></small><br/></p></card></wml>';}
?>