Location: PHPKode > projects > MJGUEST > mjguest/guestbook.js.php
<?php

header('Content-Type: text/javascript');

$_SERVER['SCRIPT_NAME'] = !empty($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME'] : $_SERVER['PHP_SELF'];
$DIR_ROOT = dirname($_SERVER['SCRIPT_NAME']);
$DIR_ROOT = ($DIR_ROOT == '/' or $DIR_ROOT == '\\'/*'*/) ? '' : $DIR_ROOT;

?>

	/*
	+---------------------------------------------------------------
	|
	|	MJGUEST
	|	============================================================
	|	Copyright (c) 2002-2008 Giacomo "mdsjack" Menni
	|	Terms of agreement and support at www.mdsjack.bo.it
	|
	+---------------------------------------------------------------
	|	[ INTERFACE MODULE ]
	|	Javascript popup opener
	+---------------------------------------------------------------
	*/

var popup_width = 570;
var popup_height = 580;
var mjguest_popup = null;

function guestbook(flash)
{
	mjguest_popup = window.open('<?php echo $DIR_ROOT ?>/mjguest.php', 'mjguest', 'width='+popup_width+'px,height='+popup_height+'px,top='+((screen.availHeight/2)-(popup_height/2))+'px,left='+((screen.availWidth/2)-(popup_width/2))+'px,directories=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0', false);
	
	if (mjguest_popup != null) mjguest_popup.focus();
	
	if (!flash) return false;
}

<?php if(!empty($_GET['link'])): /* retrocompatibility */ ?>
document.write('<a href="javascript:guestbook()">' + '<?php echo $_GET['link']?>' + '</a>');
<?php endif; ?>
Return current item: MJGUEST