Location: PHPKode > projects > O - OpenSource GroupWare > osgw/admin/select_user.php
<?php
/**************************************************************************
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   @Authors:	Ryan Thompson(hide@address.com)
***************************************************************************/
 
 //DEPRECATED 
 //NOT UPDATE FOR ENGINE (v0.2.5 - 28-Nov-03)

$sql = "SELECT * FROM o_users,o_tracker,o_user_security WHERE o_users.user_id=o_tracker.user_id 
	AND o_users.user_id=o_user_security.user_id";
$db->query($sql);
 
?>
<h1 class="input_header">Select User</h1>
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td class="list_header" width="75">User</td>
<td class="list_header" width="150">Email Address</td>
<td class="list_header" width="200">Last Login</td>
<td class="list_header" width="200">Last Active</td>
<td class="list_header" width="30">Status</td>
</tr>
<?php
while($db->fetch_results())
{
	if($class == "list_light")
	{
		$class = "list_dark";
	} else {
		$class = "list_light";
	}
		
	echo "<tr>";
	
	
	echo "<td class=\"$class\">";
	$link = "/admin?x=". $_GET['x'] ."&s=eu&u=". $db->record['user_id'];
	$title = $db->record['username'];

	echo $O->create_link($link, $title, $class);
	echo "</td>";
	
	echo "<td class=\"$class\"><a href=\"mailto:". $db->record['email'] ."\" class=\"$class\">". $db->record['email'] ."</a>";
	echo "<td class=\"$class\">\n";
	if(!is_null($db->record['last_login']))
	{
		echo date($O->date->short_date . ' - '. $O->date->time,$db->record['last_login']);
	} else {
		echo "Never";
	}

	echo "</td>";
	echo "<td class=\"$class\">". date($O->date->short_date . ' - '. $O->date->time ,$db->record['last_action_time']) ."</td>";
	
	if(!is_null($db->record['disabled']))
	{
		$disabled = "Disabled";
		$tmp = $class;
		$class = "red";
	} else {
		$disabled = "Active";
		$tmp = $class;
		
	}
	echo "<td class=\"$class\">$disabled</td>";
	$class = $tmp;
	echo "</tr>";
	
	

}
 
 ?>
 </table>
Return current item: O - OpenSource GroupWare