Location: PHPKode > projects > Helpdesk Over Web > how/calls/browseall.php
<?php
// Call Log Browse Page

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

// Set Page Title and Include HTML Header
$page_title = 'HOW - Call Log Browse';
include_once('../includes/header.html');

echo '<H1>Call Log</H1>';

// Connect to Database
require_once ('../includes/mysql_connect.php');

// Query the database.
$query = "SELECT * FROM calls WHERE CallStatus != 'Closed%' ORDER BY date desc,time desc, severity;";		
$records = range(1, 500);
$result = mysql_query($query)
   or die("Invalid query: " . mysql_error());
$num_rows = mysql_num_rows($result);
echo '<H3>Browsing Call Log - All Entries</H3>';
if($num_rows == 0)
	{
	echo "<H4>Sorry - No Entries Found</H4>";
	echo ("<P><B><A HREF='javascript:history.back()'>Back to Previous Page</A></B></P>");
	}
else {
echo '<p>Click on a call identifier to view further details.</P>';
echo ("<TABLE WIDTH='700'><TR><TD><b>Call ID</b></TD><TD><b>Date</b></TD><TD><b>Time</b></TD><TD><b>User</b></TD><TD><b>Category</b></TD><TD><b>Severity</b></TD><TD><b>Engineer</b></TD></TR>");
while($i = mysql_fetch_row($result)) { 
	echo ("<TR>");
	echo ("<TD><A HREF='editcall.php?callid=$i[0]'>$i[0]</A></TD>");
	echo ("<TD>$i[1]</TD>");
	echo ("<TD>$i[2]</TD>");
	echo ("<TD>$i[3]</TD>");
	echo ("<TD>$i[8]</TD>");
	echo ("<TD>$i[7]</TD>");	
	echo ("<TD>$i[10]</TD>");	
	}
echo ("</TABLE>");
echo ("<P><P><B>Total Entries: </B> $num_rows</P>");
}
echo ("<H5>[ <A HREF='calladmin.php'>Call Administration Menu</A> ]</H5>");
echo ("<H5>[ <A HREF='../index.php'>Main System Menu</A> ]</H5>");

// Include HTML footer.
include_once('../includes/footer.html');
?>
Return current item: Helpdesk Over Web