<?php
include_once("../include/main.inc.php");
?>

<html>
<head>
<title><?=$title;?></title>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META HTTP-EQUIV="imagetoolbar" CONTENT="no">
<script language="Javascript1.2">
function resizeOuterTo(w,h) {
	if (parseInt(navigator.appVersion)>3) {
		if (navigator.appName=="Netscape") {
			top.outerWidth=w;
			top.outerHeight=h;
		}
		else top.resizeTo(w,h);
	}
	var scr_w = screen.availWidth;
	var scr_h = screen.availHeight;
	
	x=(scr_w - w)/2;
	y=(scr_h - h)/2;
	self.moveTo(x,y)
}
</script>
</head>
<body style="margin:0px; padding:0px;">

<?php
if ( substr(strtolower($_GET['img']), -3) == "gif" or substr(strtolower($_GET['img']), -3) == "jpg" or substr(strtolower($_GET['img']), -4) == "jpeg" or substr(strtolower($_GET['img']), -3) == "png" or substr(strtolower($_GET['img']), -4) == "webp")  {
	$dimens=GetImageSize("".SITE_DIR_PATH."/uploaded-files/".$_GET['img']);
	$width=$dimens[0];
	$height=$dimens[1];
	if ($width > 550) {
		$width=550;
	}
	if ($height > 550) {
		$height=550;
	}
	?>
	<table align="center" width="100%">
	 <tr>
	  <td align=center><img name="zoomedimage" src="<?=site_url;?>/uploaded-files/<?=$_GET['img'];?>" alt="<?=$title;?>" title="<?=$title;?>" width="<?=$width;?>" height="<?=$height;?>"></td>
	 </tr>
	 <tr><td align="center"></td></tr>
	 <tr>
	  <td align=center><a href="javascript:window.close();"><img src="<?=admin_url?>close.png" style="height: 31px;" alt="Close your Popup Window" title="Close your Popup Window"></a></td>
	 </tr>
	</table>
	<?php 	
}
?>
</body>
</html>