Вход Регистрация
Файл: umor/anekdot/anekdot.php
Строк: 81
<?
include_once '../../sys/inc/start.php';
include_once 
'../../sys/inc/compress.php';
include_once 
'../../sys/inc/sess.php';
include_once 
'../../sys/inc/home.php';
include_once 
'../../sys/inc/settings.php';
include_once 
'../../sys/inc/db_connect.php';
include_once 
'../../sys/inc/ipua.php';
include_once 
'../../sys/inc/fnc.php';
include_once 
'../../sys/inc/user.php';
include_once 
'../../sys/inc/thead.php';
title();
err();
aut();
if (!
$set['web'])



error_reporting(7);
$action=$_GET['action'];
echo 
'<div class=a><center>Анекдоты</center>';
if(
$action==False){$action="anekdot";}
if(
$action=="anekdot"){
$file=@file("base.dat");
if(!
$file){echo'Анекдотов нет! Напиши свой и он появится в базе анекдотов!';}
$rand=rand(0,count($file)-1);
echo 
'<div class="title1"><center>'.$file[$rand].'</center>';


}

#####################################
if($action=="add"){
$anekdot=substr($_POST['anekdot'],0,1024);
$anekdot=htmlspecialchars($anekdot);
if(
eregi("http",$anekdot)){echo"Это не место для рекламы!";
require_once (
"incfiles/end.php");
exit;
}
if(
$anekdot==""){echo'<div class="alarm"><center>анекдот пустой!!!</center></div>';
echo
"<center><a href="anekdot.php">К анекдотам</center></div>";
include_once 
'../sys/inc/tfoot.php';
exit;
}
$open=fopen("base.dat","a+");
if(
fwrite($open,$anekdot."rn")){echo"Анекдот успешно добавлен! =)";
}else{echo
"Произошла ошибка при добавлении анекдота!";}
fclose($open);

}
echo
"<center><a href="anekdot.php">дальше</center></div>";

include_once 
'../../sys/inc/tfoot.php';
?>
Онлайн: 1
Реклама