[SOLVED] Parse Error
Posted: Sun Jul 04, 2004 1:05 pm
I cant find the blasted error
Code: Select all
<?
session_start();
if(!session_is_registered("client_id"))
{
header("Location: auth.php");
exit;
}
?>
<html>
<head><title="WDAccounts By TZN"></head>
<link rel="stylesheet" href="includes/style.css" type="text/css">
<body bgcolor="#FFFFFF">
<!--BEGIN CLIENT MODE-->
<?
if ($client_login !== 'admin')
{
?>
<table width="100%"><tr><td width="100%" bgcolor="#bbddff">
<h2>Hello <b>
<? echo $client_name ?>
</b> </h2><br>
<center><font size=4 face=verdana>Welcome to Your Online Account Manager</font><br><br></center>
</tr></td><tr><td width="100%" height="2" bgcolor="#000000"></td></tr></table><br>
<font face=arial size=3><b>Invoice Manager</b></font>
<table>
<?
include "includes/dbconnect.php";
include ("includes/date.php");
$result = mysql_query("SELECT * FROM invoices WHERE clientid = '$client_id' ORDER BY $param",$db);
if (!$param) {
$result = mysql_query("SELECT * FROM invoices WHERE clientid = '$client_id' ORDER BY id",$db);
}
echo "<p><table border=1 cellspacing=0 cellpadding=2 bordercolor=#eeeeee width=400>";
echo "<tr align=top><td><b><a href='main.php?param=id'>Invoice number</a></b></td><td><b><a href='main.php?param=domain'>Domain</a></b></td><td><b><a href='main.php?param=date'>Date</a></b></td><td><b><a href='main.php?param=total'>Total</a></b></td><td><b><a href='main.php?param=status'>Status</a></b></td><td> </td></tr>";
while ($row = mysql_fetch_array($result))
{
$id = $row["id"];
$domain = $row["domain"];
$date = $row["date"];
$dateshow = fixDate($date);
$total = $row["total"];
$status = $row["status"];
if ($alternate == "1") {
$color = "#ffffff";
$alternate = "2";
}
else {
$color = "#efefef";
$alternate = "1";
}
}
echo "<tr valign=top bgcolor=$color><td>$id</td><td>$dateshow</td><td>$total</td><td>$status</td><td>[ <a href='invoice.php?id=$id'>view</a> ]</td></tr>";
?>
</table>
<br><br><br>
<font face=arial size=3><b>Status Manager</b></font>
<?
include "includes/dbconnect.php";
include ("includes/date.php");
$result = mysql_query("SELECT * FROM projects WHERE clientid = '$client_id' ORDER BY $param",$db);
if (!$param) {
$result = mysql_query("SELECT * FROM projects WHERE clientid = '$client_id' ORDER BY id",$db);
}
echo "<p><table border=1 cellspacing=0 cellpadding=2 bordercolor=#eeeeee width=400>";
echo "<tr align=top><td><b><a href='main.php?param=id'>Project number</a></b></td><td><b><a href='main.php?param=date'>Date</a></b></td><td><b><a href='main.php?param=details'>Update</a></b></td><td> </td></tr>";
while ($row = mysql_fetch_array($result))
{
$projectid = $row["id"];
$date = $row["date"];
$dateshow = fixDate($date);
$details = $row["details"];
if ($alternate == "1") {
$color = "#ffffff";
$alternate = "2";
}
else {
$color = "#efefef";
$alternate = "1";
}
echo "</table>";
}
?>
<? //IT SAYS THE PARSE ERROR IS AROUND HERE
elseif ($client_login == 'admin')
{
?>
<center><font size=4 face=verdana>Welcome to Your Online Administration Panel</font><br><br></center>
<?
include "includes/dbconnect.php";
include ("includes/date.php");
$result = mysql_query("SELECT * FROM invoices ORDER BY $param",$db);
if (!$param) {
$result = mysql_query("SELECT * FROM invoices ORDER BY id",$db);
}
echo "<p><table border=1 cellspacing=0 cellpadding=2 bordercolor=#eeeeee width=400>";
echo "<tr align=top><td><b><a href='main.php?param=id'>Invoice number</a></b></td><td><b><a href='main.php?param=date'>Date</a></b></td><td><b><a href='main.php?param=clientid'>Client</a></b></td><td><b><a href='main.php?param=domain'>Domain</a></b></td><td><b><a href='main.php?param=total'>Total</a></b></td><td><b><a href='main.php?param=status'>Status</a></b></td><td> </td></tr>";
while ($row = mysql_fetch_array($result))
{
$id = $row["id"];
$date = $row["date"];
$dateshow = fixDate($date);
$clientid = $row["clientid"];
$domain = $row["domain"];
$clientfind = mysql_query("SELECT title FROM clients WHERE clientid = '$clientid'",$db);
$clienttitle = mysql_result($clientfind,0);
$total = $row["total"];
$status = $row["status"];
if ($alternate == "1") {
$color = "#ffffff";
$alternate = "2";
}
else {
$color = "#efefef";
$alternate = "1";
}
echo "<tr valign=top bgcolor=$color><td>$id</td><td>$clienttitle</td><td>$dateshow</td><td>$total</td><td>$status</td>";
if ($status == 'pending') {
echo "<td>[ <a href='invoiceadmin.php?id=$id'>view / change status</a> ]</td>";
}
else {
echo "<td>[ <a href='invoiceadmin.php?id=$id'>view</a> ]</td>";
}
echo "<td>[ <a href='editinvoice.php?id=$id'>edit</a> ]</td><td>[ <a href='deleteinvoice.php?id=$id' onClick="return confirm('Are you sure?')">delete</a> ]</td></tr>";
}
echo "</table>";
echo "<p><a href='editinvoice.php'>Invoice Administration</a> | <a href='clients.php'>Client Administration</a>";
} //END ADMIN MODE
?>
<p><a href="logout.php">Logout</a></p>
<?
include "includes/footer.inc";
?>
</body>
</html>