Location: PHPKode > projects > phpCAMALEO > show_pop.php
<?php 
/***************************************************************************
 *	show_pop.php?[img={image path}][text={text path}]
 *
 *	begin		: October 2006
 *	version		: 23 October 2006
 *	copyright	: (C) 2006 grandolini.net
 *
 *	generic image/text pop display manager
 *
 ***************************************************************************/
include('Session.php'); 
if($cat_name=='' && $_GET[img]) { $cat_name=$_GET[img]; }
if($cat_name=='' && $_GET[text]) { $cat_name=$_GET[text]; } ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
	<title><?=$cat_name?></title>
	<link rel="stylesheet" type="text/css" href="skins/<?=$_SESSION[misc][skin]?>/MAIN.CSS">
	<?php
	switch($_SESSION[browser])
	{
		case 'FF': ?><link rel="stylesheet" href="skins/<?=$_SESSION[misc][skin]?>/MAIN_FF.CSS" type="text/css" /><?php break;
		case 'IE': ?><link rel="stylesheet" href="skins/<?=$_SESSION[misc][skin]?>/MAIN_IE.CSS" type="text/css" /><?php break;
	}
 	echo "\n\n";
	?>
	<script type="text/javascript" src="common/js/fun2inc.js"></script>
</head>
<body onload="javascript=window.focus();" style="margin:0px;"><?php
if(isset($_GET[img]))
{
	?><div align="center">
		<img src="<?=$_GET[img]?>" alt="<?=$_GET[img]?>" style="border:2px solid;" /><br />
		<img src="img/trasp.gif" width="100%" height="5px" /><br />
		<input class="button_sml" type="button" onclick="javascript:window.close();" value="<?=W_CLOSE?>">
	</div><?php
}
if(isset($_GET[text]))
{
	?>
		<div style="margin:10px;"><?=$tmp=file_get_contents($_GET[text]); ?></div>
		<img src="img/trasp.gif" width="100%" height="5px" /><br />
		<div align="center" style="margin:0 0 10px 0;"><input class="button_sml" type="button" onclick="javascript:window.close();" value="<?=W_CLOSE?>">
	</div><?php
}
?><script type="text/javascript">
	var top=getCookie('makePopup.top'); left=getCookie('makePopup.left'); 
	var w=getCookie('makePopup.w'); h=getCookie('makePopup.h'); 
	if(top!='undefined' && top!=null)	{ window.moveTo(left,top); }
	if(w!='undefined' && top!=null)		{ window.resizeTo(w,h); }
	//
	//	how to get the window top/left position to be saved in a cookie? 
	//
	deleteCookie('makePopup.top');
	deleteCookie('makePopup.left');
</script>
</body>
</html>
Return current item: phpCAMALEO