<?PHP
/* JAG Online -------------------------- 06/03/2004 ------------------ v1.31 [6.5~7.1] */
/*                                                                                     */
/*      ////////// //\\ \\\\\\\\\\       Created by Dashe at http://nsd.jagamarog.com  */
/*             // //  \\ \\                                                            */
/*            // //    \\ \\             Email Address:           dashe@jagamarog.com  */
/*           // /////\\\\\ \\   \\\\\                                                  */
/*          // //        \\ \\      \\                                                 */
/*         // //          \\ \\\\\\\\\\                                                */
/* /////////  a g a m a r o g . c o m   N u k e   S c r i p t   D e v e l o p m e n t  */
/*                                                                                     */     
/* Created By Dashe -> http://nsd.jagamarog.com                                        */ 
/*  تعريب ملتقى العرب  http://arabmultaqa.com                                                                                    */
/* ----------------------------------------------------------------------------------- */

/* DO NOT EDIT BELOW UNLESS YOU KNOW WHAT YOU ARE DOING ------------------------------ */

/* Start of content------------------------------------------------------------------- */
if (is_user($user))
	{
	/* Get PM Details ---------------------------------------------------------------- */
	$QP0 = "SELECT privmsgs_type 
			FROM ".$prefix."_bbprivmsgs
			WHERE privmsgs_to_userid = ".$userinfo['user_id']." AND (privmsgs_type = '1' OR privmsgs_type = '5')";
	$RP0 =  $db -> sql_query($QP0) or die("Bad QP0:".mysql_error());
	$PMNew = sql_num_rows($RP0);
	
	/* Geting Old PM's  ------------------------------------------------------------- */
	$QP1 = "SELECT privmsgs_type 
			FROM ".$prefix."_bbprivmsgs
			WHERE privmsgs_to_userid = ".$userinfo['user_id']." AND (privmsgs_type = '0')";
	$RP1 =  $db -> sql_query($QP1) or die("Bad QP1:".mysql_error());
	$PMOld = sql_num_rows($RP1);
	
	if($PMNew > 0) 	$mailnew = "<A HREF='modules.php?name=Private_Messages'><IMG SRC='images/blocks/JAG_Online_New_Mail.gif' BORDER='0' WIDTH='14' HEIGHT='10'></A>";
	else			$mailnew = "<IMG SRC='images/blank.gif' BORDER='0' WIDTH='14' HEIGHT='10'>";	

	$content .= "<TABLE WIDTH='100%' BORDER='0' CELLPADDING='0' CELLSPACING='0'>\n";
	$content .= "	<TR>\n";
	$content .= "		<TD ALIGN='right' VALIGN='TOP' COLSPAN='3' CLASS='boxcontent'>\n";
	$content .= "			<NOBR><B>"._PM_TITLE.":</B></NOBR></TD>\n";
	$content .= "	</TR>\n";
	$content .= "	<TR>\n";
	$content .= "		<TD ALIGN='right' VALIGN='MIDDLE' CLASS='boxcontent'>\n";
	$content .= "			<A HREF='modules.php?name=Private_Messages'>"._PM_NEW.": $PMNew </A></TD>\n";
	$content .= "		<TD ALIGN='right' VALIGN='MIDDLE' CLASS='boxcontent'>\n";
	$content .= "			$mailnew</TD>\n";
	$content .= "		<TD ALIGN='right' VALIGN='MIDDLE' CLASS='boxcontent'>\n";
	$content .= "			"._PM_OLD.": $PMOld</TD>\n";
	$content .= "	</TR>\n";
	
	$content .= "	<TR>\n";
	$content .= "		<TD ALIGN='right' VALIGN='TOP' COLSPAN='3'>\n";
	$content .= "			<IMG SRC='images/blank.gif' BORDER='0' WIDTH='100%' HEIGHT='10'></TD>\n";
	$content .= "	</TR>\n";	
	$content .= "</TABLE>\n";
	}	
?>
