View file mch-db_dv3.1/dl/prew.php

File size: 2.04Kb
<?php
 include './lite/header.inc.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];
 $ck = @file_get_contents("./ck/$cf.dat");
   if($ck == '') $ck = 0;
echo '<small>предпросмотр <font color="#3B678D">'.$name.'</font>:</small>
<br />
<img src="pr.php?img='.$file.'&h=90&w=80"/><br />';
 $sz = filesize($file);
 $sz = round($sz/1024,1);
$t = filectime($file);
echo '<small><b>Оригинальное разрешение рисунка: <a href="'.$file.'">'.$weigth.'x'.$height.'</a> px</b></small><br />
<small><b>Вес: '.$sz.' kb</b></small><br />
<small><b>Добавлен: '.date("d.m.y",$t).'</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><font color="blue">[<500x500]</font></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>
	  ';
@include 'ocen.php';
echo '<hr><small>Скопировать адрес:</small>
<br />
<input tupe="text" value="http://mch-x.net/dl/'.$file.'"
<br />';

	   echo '<hr><small><a href="index.php?a='.str_replace('..','',$br).'">К разделам</a></small>';
include('./lite/footer.inc.php');
?>