Your IP : 216.73.217.79


Current Path : /var/www/cesa.co.za/members/saaceadmin/
Upload File :
Current File : /var/www/cesa.co.za/members/saaceadmin/top20users.phtml

<html>
<head>
<title>Site Info</title>
</head>
<body>
<h3>Top 20 users</h3>
<p>
List showing the top20 most logged in users ordered by the number of times they logged in.
</p>
<p>
Please note that this list does not show anyone with a email address that is part of the saace.co.za domain.
</p>
<?php
include('../inc/conf.inc');
include('../inc/db.inc');

$sql="SELECT 
user_login.contact_id AS cid, 
user_login.lastlogin AS lastlogin, 
user_login.logincount AS logincount, 
Contacts.ContactSurname AS surname, 
Contacts.ContactInitials AS initials, 
Contacts.ContactFirstName AS firstname, 
Contacts.ContactDesignation AS designation 
FROM user_login, Contacts WHERE user_login.contact_id = Contacts.ContactsID AND Contacts.PreferredEmail NOT LIKE '%saace.co.za%' AND Contacts.PreferredEmail NOT LIKE '%pdsg.co.za%' ORDER BY logincount DESC";
//echo $sql;
$result = mysql_query($sql);
?>
<table width="100%" cellspacing="0" cellpadding="0" border="1">
<tr><th>User</th><th>number of logins</th><th>last logged in</th></tr>
<?php
$PageCount = 0;
while($row=mysql_fetch_array($result)AND $PageCount < 20) {
$PageCount = $PageCount + 1;
	echo "<tr><td valign=\"top\">".$row["designation"]." ".$row["initials"]." (".$row["firstname"].") ".$row["surname"]."</td><td valign=\"top\">".$row["logincount"]."</td><td valign=\"top\">".$row["lastlogin"]."</td></tr>";
}
?>
</table>
<p><a href="">Back to SAACE Admin</a></p>
<?php
mysql_close($conxan);
?>
</body>
</html>