| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 |
?> |
|---|
| 34 |
|
|---|
| 35 |
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> |
|---|
| 36 |
<html> |
|---|
| 37 |
<head> |
|---|
| 38 |
<title><?php echo @$_GET['title']; ?></title> |
|---|
| 39 |
|
|---|
| 40 |
<script language="Javascript"> |
|---|
| 41 |
<!-- |
|---|
| 42 |
// http://www.xs4all.nl/~ppk/js/winprop.html |
|---|
| 43 |
function CrossBrowserResizeInnerWindowTo(newWidth, newHeight) { |
|---|
| 44 |
if (self.innerWidth) { |
|---|
| 45 |
frameWidth = self.innerWidth; |
|---|
| 46 |
frameHeight = self.innerHeight; |
|---|
| 47 |
} else if (document.documentElement && document.documentElement.clientWidth) { |
|---|
| 48 |
frameWidth = document.documentElement.clientWidth; |
|---|
| 49 |
frameHeight = document.documentElement.clientHeight; |
|---|
| 50 |
} else if (document.body) { |
|---|
| 51 |
frameWidth = document.body.clientWidth; |
|---|
| 52 |
frameHeight = document.body.clientHeight; |
|---|
| 53 |
} else { |
|---|
| 54 |
return false; |
|---|
| 55 |
} |
|---|
| 56 |
if (document.layers) { |
|---|
| 57 |
newWidth -= (parent.outerWidth - parent.innerWidth); |
|---|
| 58 |
newHeight -= (parent.outerHeight - parent.innerHeight); |
|---|
| 59 |
} |
|---|
| 60 |
// original code |
|---|
| 61 |
//parent.window.resizeTo(newWidth, newHeight); |
|---|
| 62 |
|
|---|
| 63 |
// fixed code: James Heinrich, 20 Feb 2004 |
|---|
| 64 |
parent.window.resizeBy(newWidth - frameWidth, newHeight - frameHeight); |
|---|
| 65 |
|
|---|
| 66 |
return true; |
|---|
| 67 |
} |
|---|
| 68 |
// --> |
|---|
| 69 |
</script> |
|---|
| 70 |
</head> |
|---|
| 71 |
<body style="margin: 0px;"> |
|---|
| 72 |
<?php |
|---|
| 73 |
|
|---|
| 74 |
if (get_magic_quotes_gpc()) { |
|---|
| 75 |
$_GET['src'] = stripslashes($_GET['src']); |
|---|
| 76 |
} |
|---|
| 77 |
|
|---|
| 78 |
if ($imgdata = @getimagesize($_GET['src'])) { |
|---|
| 79 |
|
|---|
| 80 |
|
|---|
| 81 |
|
|---|
| 82 |
// check for maximum dimensions to allow no-scrollbar window |
|---|
| 83 |
echo '<script language="Javascript">'."\n"; |
|---|
| 84 |
echo 'if (((screen.width * 1.1) > '.$imgdata[0].') || ((screen.height * 1.1) > '.$imgdata[1].')) {'."\n"; |
|---|
| 85 |
|
|---|
| 86 |
echo 'document.writeln(\'<img src="'.$_GET['src'].'" border="0">\');'; |
|---|
| 87 |
echo 'CrossBrowserResizeInnerWindowTo('.$imgdata[0].', '.$imgdata[1].');'."\n"; |
|---|
| 88 |
echo '} else {'."\n"; |
|---|
| 89 |
|
|---|
| 90 |
echo 'document.writeln(\'<iframe width="100%" height="100%" marginheight="0" marginwidth="0" frameborder="0" scrolling="on" src="'.$_GET['src'].'">Your browser does not support the IFRAME tag. Please use one that does (IE, Firefox, etc).<br><img src="'.$_GET['src'].'"></iframe>\');'; |
|---|
| 91 |
echo '}'."\n"; |
|---|
| 92 |
echo '</script>'; |
|---|
| 93 |
|
|---|
| 94 |
} else { |
|---|
| 95 |
|
|---|
| 96 |
|
|---|
| 97 |
echo '<iframe width="100%" height="100%" marginheight="0" marginwidth="0" frameborder="0" scrolling="on" src="'.$_GET['src'].'"></iframe>'; |
|---|
| 98 |
|
|---|
| 99 |
} |
|---|
| 100 |
|
|---|
| 101 |
?> |
|---|
| 102 |
</body> |
|---|
| 103 |
</html> |
|---|