Location: PHPKode > projects > raSMP > rasmp/admin/popup.php
<?php

/*******************************************************************

 Name		: raSMP 2.0
 Copyright	: 2002, Adam Alkins
 Website	: http://www.rasmp.com
 email		: hide@address.com

 $Id: popup.php,v 1.3 2003/03/16 18:26:44 rasadam Exp $: 

*******************************************************************/

/*******************************************************************

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 2 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, write to the 
Free Software Foundation Inc., 59 Temple Place, Suite 330,
Boston, MA  02111-1307  USA

*******************************************************************/

/*

Your all purpose popup for the Admin Panel

*/

define('RASMP',true);
define('RASMP_ADMIN',true);
define('SCRIPT_PATH','../');
include SCRIPT_PATH.'common/extension.inc';
include SCRIPT_PATH.'common/admin_common.'.FILE_EXT;

global $user_data;

switch($_GET['mode'])
{
	case 'messages':
		if(check_auth('messages',0))
		{
			if($user_data['message_popup']==1)
			{
				$query = "UPDATE ".ACCOUNTS_TABLE." SET message_popup = 0 WHERE user_id = ".$user_data['user_id'];
				db_query($query, 'Could not update popup column');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>New Message Received</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script language="javascript" type="text/javascript">
<!--
function jump_to_inbox()
{
	opener.document.location.href = "<?php echo attach_sid(SCRIPT_PATH.ADMIN_PATH."messages.".FILE_EXT."?mode=viewfolder&f=1"); ?>";
	window.close();
}
//-->
</script>
</head>

<body bgcolor="#006699" text="#FFFFFF" link="#F1EFAB" vlink="#F1EFAB" alink="#F1EFAB">
<table width="100%" border="1" cellpadding="10" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#0099CC">
  <tr>
    <td><div align="center">
        <p><font color="#FFFFFF" size="3">You have received a new message. Click 
          <a href="<?php echo attach_sid(SCRIPT_PATH.ADMIN_PATH."messages.".FILE_EXT."?mode=viewfolder&f=1"); ?>" onclick="jump_to_inbox();return false;" target="_new">Here</a> to visit your inbox.</font></p>
        <p><font color="#FFFFFF" size="2">(<a href="javascript:window.close();">close this window</a>)</font></p>
      </div></td>
  </tr>
</table>
<div align="center"><font size="2">Powered by raSMP <?php echo RASMP_VERSION; ?></font></div>
</body>
</html>
<?php
			}
		}
}

die;

?>
Return current item: raSMP