Просмотр файла file/loads/about.php

Размер файла: 1.92Kb
<?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();
require ("../../mysql.php");
require ("../../config.php");
require ("../../themes/$themes.php");
 include 'constant.php';
  include_once 'id.php';
 @$cf = $_GET["cf"];
 @$lf = $_GET["lf"];
 @$size = $_GET["sz"];
 @$br = $_GET["br"];
   if(preg_match("[http]",$lf)) exit(ERROR_MESAGE);
     if(preg_match("[\.\.]",$lf)) exit(ERROR_MESAGE);
	    if(preg_match("[http]",$cf)) exit(ERROR_MESAGE);
     if(preg_match("[\.\.]",$cf)) exit(ERROR_MESAGE);
 $cf = str_replace('http://','',$_GET["cf"]);
 $lf = str_replace('http://','',$_GET["lf"]);
  $lf = str_replace('http','',$_GET["lf"]);
 $cf = str_replace('http','',$_GET["cf"]);
  $cf = str_replace('..','',$cf);
 $cf = str_replace('/','',$cf);
 $sz = filesize($lf);
 $sz = round($sz/1024,1);
 $t = filectime($lf);
 $op = @file_get_contents("./about/$cf.txt");
 $ck = @file_get_contents("./ck/$cf.dat");
 $ckz = @file_get_contents("./ds/$cf.sc");
  if($ck == '') $ck = 0;
 if(empty($op)) $op = 'Отсутствует';
 echo '<small>Файл: <a href="'.$lf.'">'.$cf.'</a><br />
         Вес: '.htmlspecialchars($sz).' kb <br />
		 Дата загрузки: '.date("d.m.y",$t).'<br />
		 Скачан: '.$ckz.' раз <br />';

		 if(file_exists('scr/'.$cf.'.png')) {
		   echo "Скриншот:<br /><img src=\"scr/$cf.png\" alt\"\" /><br />"; }
 echo '	 Описание:<br /> '.htmlspecialchars($op).'<br />
		 <a href="comm.php?cf='.$cf.'&lf='.$lf.'&br='.str_replace('..','',$br).'">Комментарии</a></small>'; echo ' <small>['.htmlspecialchars($ck).']</small>';
		 echo '<hr><small><a href="index.php?a='.str_replace('..','',$br).'">К разделам</a></small>';
include('../../foot.php');
?>