View file file/loads/prew.php

File size: 1.69Kb
<?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");
@$file = $_GET["img"];
@$name = $_GET["nm"];
@$br = $_GET["br"];
  if(preg_match("[http]",$file)) exit("Sorry");
  if(preg_match("[%]",$file)) exit("Sorry");
  if(preg_match("[http]",$name)) exit("Sorry");
  if(preg_match("[%]",$name)) exit("Sorry");
$sz = GetImageSize($file); 
$weigth = $sz[0]; 
$height = $sz[1];
echo '<small><b>Разрешение: '.$weigth.'x'.$height.' px</b></small><br />';
 echo '<small><b>Особый размер:</b></small><br />
	   <a href="pre.php?img='.$file.'&nm='.$name.'&h=132&w=132"><small><b>132x132</b></small></a><br />
	   <a href="pre.php?img='.$file.'&nm='.$name.'&h=132&w=176"><small><b>132x176</b></small></a><br />
	   <a href="pre.php?img='.$file.'&nm='.$name.'&h=176&w=220"><small><b>176x220</b></small></a><br />
	   <a href="pre.php?img='.$file.'&nm='.$name.'&w=240&h=320"><small><b>320x240</b></small></a><br />
	   <small><b>Другой размер*:</b></small><br />
	   <form action="pr.php" method="GET">
	   <input type="text" name="w" size="3">x<input type="text" name="h"size="3"> px.
	   <input type="hidden" name="img" value="'.$file.'">
	   <input type="submit" value="Ok">
	   </form>
	   *<small>Качество хуже.</small>';
	   echo '<hr><small><a href="index.php?a='.str_replace('..','',$br).'">К разделам</a></small>';
include('../../foot.php');
?>