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

Размер файла: 3.1Kb
<?php
 ##############################################################################
##                                                                            ##
##                                  P C M S                                   ##
##    Движок на файлах                                                        ##
##    Скрипт распространяется бесплатно!                                      ##
##    Запрещается продавать его и вносить изменения в код!                    ##
##                                                                            ##
##    Автор скрипта: Proton (http://wap-svoboda.com                           ##
##    Создан в ноябре 2009 года.                                              ##
##                                                                            ##
 ##############################################################################
 
$path=$_SERVER['DOCUMENT_ROOT'];
include $path.'/config.php';
include $path.'/functions.php';
if ($status=='Admin') {
if (empty($_POST)) {
$file=@file_get_contents($path.'/data/foot.dat');
$arr=explode('||',$file);
$code=@htmlspecialchars($arr['0']);
$code2=@htmlspecialchars($arr['1']);
$code3=@htmlspecialchars($arr['2']);
$rows=3;
$rows2=2;
$rows3=2;
echo head_tags('Баннеры').'
<div class="t1">
<div class="t2">
<div class="t3">
<div class="tcs">
<div class="t2">
<div class="bg1">
<form method="post">
Основной код:<br />
<textarea name="code" cols="25" rows="'.$rows.'">'.$code.'</textarea><br />
Ниже (код на главной):<br />
<textarea name="code2" cols="25" rows="'.$rows2.'">'.$code2.'</textarea><br />
Код на остальных страницах:<br />
<textarea name="code3" cols="25" rows="'.$rows3.'">'.$code3.'</textarea><br />
<input type="submit" value="Сохранить" />
</form>
</div></div></div>
</div></div></div>
<div class="t1">
<div class="t2">
<div class="t3">
<div class="t4">
<div class="tcs">
<div class="bg3">
<a href="/index.php">Главная</a><br />
</div> 
</div>
</div>
</div>
</div>
</div>
'.foot_tags($timestart);
} else {
$code=@stripslashes(trim($_POST['code']));
$code=str_replace('||','II',$code);
$code=str_replace(array("\r\n","\n","
","\r"),"\n",$code);
$code2=@stripslashes(trim($_POST['code2']));
$code2=str_replace('||','II',$code2);
$code2=str_replace(array("\r\n","\n","
","\r"),"\n",$code2);
$code3=@stripslashes(trim($_POST['code3']));
$code3=str_replace('||','II',$code3);
$code3=str_replace(array("\r\n","\n","
","\r"),"\n",$code3);
$code=preg_replace('|\<script\>(.*)\<\/script\>|i','',$code);
$code2=preg_replace('|\<script\>(.*)\<\/script\>|i','',$code2);
$code3=preg_replace('|\<script\>(.*)\<\/script\>|i','',$code3);
if (@file_put_contents($path.'/data/foot.dat',"$code||$code2||$code3")) {
$_SESSION['text']='Реклама сохранена!<br />';
} else {
$_SESSION['text']='Реклама не сохранена!<br />';
}
header("location: index.php?".SID);
}}
?>