Location: PHPKode > projects > Helpdesk Over Web > how/sysmgmt/sysusers.php

// Purpose : Allows Users to login.

// Include Configuration File
require_once ('../includes/config.inc'); 

// Set the page title and include the HTML header.
$page_title = 'Helpdesk Over Web - System Users';
include ('../includes/header.html');

// Connect to Database
require_once ('../includes/mysql_connect.php');
// Execute query to retrieve user details.
$sql = 'SELECT `HOWLogin`,`Tel`,`Email`,`FullName`,`Role` FROM `systemusers` WHERE 1 ORDER BY `HOWLogin` ASC LIMIT 0, 30;';
$records = range(1, 500);
$result = mysql_query($sql)
   or die("Invalid query: " . mysql_error());
$num_rows = mysql_num_rows($result);

// Output query results in a table.
echo ("<H1>System Users</H1><H3>User Management</H3><P>Click a Login name to view/amend the user profile.</P>");
echo ("<TABLE WIDTH='600'><TR><TD WIDTH='75'><b>Login</b></TD><TD width='125'><b>Email</b></TD><TD WIDTH='75'><b>Name</b></TD><TD><B>Role</b></TD></TR>");
while($i = mysql_fetch_row($result)) { 
	echo ("<TR>");
	echo ("<TD><A HREF='userdetail.php?selecteduser=$i[0]'>$i[0]</TD>");
	echo ("<TD><A HREF='MAILTO:$i[2]'>$i[2]</A></TD>");
	echo ("<TD>$i[3]</A></TD>");
	echo ("<TD>$i[4]</A></TD>");
echo ("</TABLE>");

// Echo total number of users to screen.
echo ("<P><BR><B>Total Users: </B> $num_rows</P>");
echo ("<H4><A HREF='newuser.php'>Create New User</A></H4>");
echo "<P>[ <A HREF='../index.php'>Main Menu</A> ]</P>";
// Include standard HTML footer
include ('../includes/footer.html');
Return current item: Helpdesk Over Web