if ($_GET['groupid']) { $list->group_id = $_GET['groupid']; } if ($_GET['page']) { $list->current_page = $_GET['page']; } if (isset($_GET['letter'])) { $list->current_letter = $_GET['letter']; } if (isset($_GET['limit'])) { $list->max_entries = $_GET['limit']; } // Set group name (group_id defaults to 0 if not provided) $list->group_name(); // ** RETRIEVE CONTACT LIST BY GROUP ** $r_contact = $list->retrieve($_SESSION['username']); $username = $_SESSION['username']; echo "<center><IMG SRC='images/title.png' WIDTH=570 HEIGHT=90 ALT='' BORDER=0></IMG></center>"; echo "<center><form action='list.php' method='get'>\n\t<input type='submit' value='Go Back' />\n\t</form></center>"; echo "<table id='history'>\n\t\t\t\t\t<tr>\n\t\t\t<th>Full Name</th>\n\t\t\t<th>User Name</th>\n\t\t\t<th>User Type</th>\n\t\t\t<th>Total SMS Sent</th>\n\t\t\t</tr>"; $conn = mysql_connect($db_hostname, $db_username, $db_password); mysql_select_db("adbook", $conn); $sql_users = "SELECT fullname, username, usertype FROM users"; $result_users = mysql_query($sql_users); while ($user = mysql_fetch_assoc($result_users)) { $sql = "SELECT COUNT(*) FROM report WHERE sender = '" . $user['username'] . "'"; $result = mysql_query($sql); while ($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>" . $user['fullname'] . "</td>"; echo "<td>" . $user['username'] . "</td>";