<?
include "mysqlcon.php";
include "functions.php";


// LOOP THROUGH GROUPS WITH MOBLOG ALLOWED
$groups = mysql_query("SELECT g_id FROM bhost_groups WHERE allow_moblogging='1'");
while($group = mysql_fetch_assoc($groups)) {

	// LOOP THROUGH USERS WITHIN THIS GROUP
	$users = mysql_query("SELECT u_id FROM bhost_users WHERE g_id='$group[g_id]'");
	while($user = mysql_fetch_assoc($users)) {

		// LOOP THROUGH THIS USER'S BLOGS, CHECK FOR WAITING MOBILE ENTRIES
		$weblogs = mysql_query("SELECT w_id FROM bhost_weblogs WHERE u_id='$user[u_id]' AND moblog_on='1'");
		while($weblog = mysql_fetch_assoc($weblogs)) {

			check_moblog($weblog[w_id]);

		}

	}

}




echo "
<b>Moblog Check Successful</b><br>
Time: ".date('l, F j, Y \a\t h:i:s A');




?>