Просмотр файла admin/banner.php

Размер файла: 1.58Kb
<?
/*

Автор: SaDiEv
Сайт: comwap.ru
Пример работы: comwap.ru/top

Страница: admin/banner.php
Назначение: добавление рекламы

*/

Error_Reporting(E_ALL & ~E_NOTICE); Error_Reporting (ERROR | WARNING);
extract($HTTP_GET_VARS); extract($HTTP_POST_VARS); extract($HTTP_COOKIE_VARS); extract($HTTP_SERVER_VARS); extract($HTTP_SESSION_VARS);
//сессии
session_name("SESID"); session_start();
// подключаем настройки
include "../config/sis.php";
include "../config/other.php";
$TITLES = "добавление рекламы";
$banner=$_GET['banner'];
if($brodilka==wap){include "../theme/".$wap_theme."/head.php";}
else {include "../theme/".$web_theme."/head.php";}
if($_SESSION['pass']==$password)

{
if($banner=="")
{
echo'
<form action="?banner=new" method="post">
html код рекламы<br>
<input type="text" cols=20 rows=5 name="text"><br>
<input type="submit" value="Сохранить"></form>';
}
if($banner=="new")
{
$text=$_POST['text'];
$text = str_replace('"',"'",$text);
$opn=fopen("../dat/baner.dat","w");
fwrite($opn,''.$text.'<a href="http://'.$_SERVER['HTTP_HOST'].'/'.$top.'index.php?cid=1"><img src="http://'.$_SERVER['HTTP_HOST'].'/'.$top.'img.php?id=1" alt="">');
fclose($opn);
echo 'Добавлено!';
}
}
else
{
echo"Ошибка!<br></div>";
}
echo "</div>";
include "dat/baner.dat";
print "<div id='foot'><center>$autor<center></div>";
if($brodilka==wap){include "../theme/".$wap_theme."/foot.php";}
else {include "../theme/".$web_theme."/foot.php";}
?>