<?php
/**
* Product: Katyshop
* @version 0.3.2.1
* @author Catalin Hulea - hide@address.com
* @copyright Copyright (C) 2007 Catalin Hulea
* @license GNU General Public License version 3
* You can find a copy of GNU GPL v3 at this path: /docs/LICENSE
* @link https://sourceforge.net/projects/katyshop
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
?>
<html>
<head>
<title>Imagine</title>
<style>
img
{
margin: 0px;
}
a.window_close
{
display: block;
height: 20px;
font-family: verdana;
font-size: 10pt;
color: #ff0000;
background-color: #cae4ff;
}
a.window_close:hover
{
background-color: #a4c8ee;
}
</style>
<script language="javascript">
function resizeWindow(picture)
{
var diffX = picture.width - document.body.clientWidth + 5;
var diffY = picture.height - document.body.clientHeight + 25;
if(picture.width > (screen.availWidth - 100))
diffX -= picture.width - (screen.availWidth - 100);
if(picture.height > (screen.availHeight - 200))
diffY -= picture.height - (screen.availHeight - 200);
window.resizeBy(diffX, diffY);
//window.resizeTo(picture.width, picture.height);
}
function centerWindow()
{
var x = screen.availWidth - document.body.clientWidth;
var y = screen.availHeight - document.body.clientHeight;
x /= 2;
y /= 2;
y -= 100; // presume some toolbars
if(x < 0)
x = 0;
if(y < 0)
y = 0;
window.moveTo(x, y);
}
</script>
</head>
<body style="margin: 0px; padding: 0px; ">
<a href="javascript:window.close(); " class="window_close"><nobr>(X) close window</nobr></a>
<img src="<?php echo htmlspecialchars(@$_GET["img_src"]); ?>" onload="resizeWindow(this); centerWindow(); ">
</body>
</html>