<?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 The Script For The Block ---------------------------------------------------- */
	$content .= "<TABLE WIDTH='100%' BORDER='0' CELLPADDING=0' CELLSPACING='0'>\n";
	$content .= "	<TR>\n";
	$content .= "		<TD ALIGN='right' VALIGN='MIDDLE' CLASS='boxcontent'>\n";
	$content .= "			<NOBR><B>"._MEMB_TITLE.":</B></NOBR></TD>\n";
	$content .= "	</TR>\n";
	$content .= "	<TR>\n";
	$content .= "		<TD ALIGN='right' VALIGN='MIDDLE'>\n";
	$content .= "			<TABLE WIDTH='100%' BORDER='0' CELLPADDING='0' CELLSPACING='0'>\n";

if ($OnlineCfg[show_memb_newt] == 1)
	{
	/* Geting New Members for Today Value -------------------------------------------- */
	$Today 		= getdate();
	$TodayMonth	= $Today['month'];
	$TodayDay 	= $Today['mday'];
	$TodayYear	= $Today['year'];
	$TodayDate 	= "%".$TodayMonth[0].$TodayMonth[1].$TodayMonth[2]."%".$TodayDay."%".$TodayYear."%";
	
	$QM0 = "SELECT COUNT(user_id) AS userCount 
			FROM ".$user_prefix."_users
			WHERE user_regdate LIKE '$TodayDate'";
	$RM0 =  $db -> sql_query($QM0) or die("Bad QM0:".mysql_error());
	number_format(list($MembersToday) = sql_fetch_row($RM0));
			
	$content .= "				<TR>\n";
	$content .= "					<TD ALIGN='right'  	VALIGN='MIDDLE' CLASS='boxcontent'>\n";
	$content .= "						"._MEMB_NEW_T.":</TD>\n";
	$content .= "					<TD ALIGN='RIGHT' 	VALIGN='MIDDLE' CLASS='boxcontent'>\n";
	$content .= "						$MembersToday</TD>\n";
	$content .= "				</TR>\n";
	}
	
if ($OnlineCfg[show_memb_newy] == 1)
	{
	/* Geting New Members for Yesterday Value ---------------------------------------- */
	$chk_months = array ("".CHKDATE_JAN_."", "".CHKDATE_FEB_."");
	
	$YesterDay 	= $TodayDay - 1;
	$YesterDate	= "%".$TodayMonth[0].$TodayMonth[1].$TodayMonth[2]."%".$YesterDay."%".$TodayYear."%";
	
	$QM1 = "SELECT COUNT(user_id) AS userCount 
			FROM ".$user_prefix."_users
			WHERE user_regdate LIKE '$YesterDate'";
	$RM1 =  $db -> sql_query($QM1) or die("Bad QM1:".mysql_error());
	number_format(list($MembersYester) = sql_fetch_row($RM1));
	
	$content .= "				<TR>\n";
	$content .= "					<TD ALIGN='right'  	VALIGN='MIDDLE' CLASS='boxcontent'>\n";
	$content .= "						"._MEMB_NEW_Y.":</TD>\n";
	$content .= "					<TD ALIGN='RIGHT' 	VALIGN='MIDDLE' CLASS='boxcontent'>\n";
	$content .= "						$MembersYester</TD>\n";
	$content .= "				</TR>\n";
	}

if ($OnlineCfg[show_memb_total] == 1)
	{
	/* Geting Total Numer of Members ------------------------------------------------- */
	$QM2 = "SELECT user_id 
			FROM ".$user_prefix."_users";
	$RM2 =  $db -> sql_query($QM2) or die("Bad QM2:".mysql_error());
	number_format($MembersTotal = sql_num_rows($RM2));
	
	$content .= "				<TR>\n";
	$content .= "					<TD ALIGN='right'  	VALIGN='MIDDLE' CLASS='boxcontent'>\n";
	$content .= "						"._MEMB_TOTAL.":</TD>\n";
	$content .= "					<TD ALIGN='RIGHT' 	VALIGN='MIDDLE' CLASS='boxcontent'>\n";
	$content .= "						$MembersTotal</TD>\n";
	$content .= "				</TR>\n";
	}

if ($OnlineCfg[show_memb_latest] == 1)
	{	
	$content .= "				<TR>\n";
	$content .= "					<TD ALIGN='right'  	VALIGN='MIDDLE' CLASS='boxcontent' COLSPAN='2'>\n";
	$content .= "						"._MEMB_LATEST.":</TD>\n";
	$content .= "				</TR>\n";
	$content .= "				<TR>\n";
		
	/* Geting Last Registered Member -------------------------------------------------- */
	$QM3 = "SELECT user_id, username 
			FROM ".$user_prefix."_users 
			ORDER BY user_id DESC 
			LIMIT 0,$OnlineCfg[show_memb_latest_num]";
	$RM3 =  $db -> sql_query($QM3) or die("Bad QM3:".mysql_error());
	
	if ($OnlineCfg[show_memb_latest_num] == 1)
		{
		$Latest = $db -> sql_fetchrow($RM3);

		$content .= "					<TD ALIGN='right' 	VALIGN='MIDDLE' CLASS='boxcontent' COLSPAN='2'>\n";
		$content .= "						&nbsp;&nbsp;-> <A HREF='modules.php?name=Forums&file=profile&mode=viewprofile&u=$Latest[user_id]'>$Latest[username]</A>";
		}
	else
		{
		$content .= "					<TD ALIGN='RIGHT' 	VALIGN='MIDDLE' CLASS='boxcontent' COLSPAN='2'>\n";
		$content .= "						<MARQUEE CLASS='small' BEHAVIOR='SCROLL' ALIGN='CENTER' VALIGN='BOTTOM' DIRECTION='right' WIDTH='100%' HEIGHT='10' SCROLLAMOUNT='2' SCROLLDELAY='1' ONMOUSEOVER='this.stop()' ONMOUSEOUT='this.start()'>\n";
		
		$i = 0;
		while ($Latest = $db -> sql_fetchrow($RM3))
			{
			$i++;
			if ($i == $OnlineCfg[show_memb_latest_num])	$content .= "<A HREF='modules.php?name=Forums&file=profile&mode=viewprofile&u=$Latest[user_id]' CLASS='blockmenu'>$Latest[username].</A>";
			else										$content .= "<A HREF='modules.php?name=Forums&file=profile&mode=viewprofile&u=$Latest[user_id]' CLASS='blockmenu'>$Latest[username],</A>&nbsp;";
			}
			
		$content .= "						</MARQUEE>\n";
		}

	$content .= "					</TD>\n";
	$content .= "				</TR>\n";
	}	
	
	$content .= "			</TABLE>\n";
	$content .= "		</TD>\n";
	$content .= "	</TR>\n";
	$content .= "	<TR>\n";
	$content .= "		<TD ALIGN='right' VALIGN='TOP'>\n";
	$content .= "			<IMG SRC='images/blank.gif' BORDER='0' WIDTH='100%' HEIGHT='10'></TD>\n";
	$content .= "	</TR>\n";
	$content .= "</TABLE>\n";	
?>
