Just the entire page? All right.
Code:
<?php require_once('Connections/mysqlconnection.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
mysql_select_db($database_mysqlconnection, $mysqlconnection);
$query_orderquery = "SELECT building.adress, bygning.zipcode, customer.name, order.worktype, order.status, order.notes, order.date FROM building, customer, order WHERE building.buildingid=order.buildingid AND customer.customerid=order.customerid ORDER BY order.date ASC";
$orderquery = mysql_query($query_orderquery, $mysqlconnection) or die(mysql_error());
$row_orderquery = mysql_fetch_assoc($orderquery);
$totalRows_orderquery = mysql_num_rows($orderquery);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/sidemal.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Taktekkerservice AS</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
<style type="text/css">
<!--
.style1 {font-family: Arial, Helvetica, sans-serif}
-->
</style>
</head>
<body>
<table width="1000" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"><span class="style1">Header</span></td>
</tr>
<tr>
<td valign="top"><span class="style1">Buttons</span></td>
</tr>
<tr>
<td valign="top"><!-- InstanceBeginEditable name="content" -->
<p class="style1">Overview over all the orders that have been completed:</p>
<p class="style1"> </p>
<table border="1" align="center" cellpadding="5" cellspacing="5">
<tr>
<td><span class="style1"><strong>The building's adress</strong></span></td>
<td><span class="style1"><strong>Zip code</strong></span></td>
<td><span class="style1"><strong>Customer's name</strong></span></td>
<td><span class="style1"><strong>Type of work</strong></span></td>
<td><span class="style1"><strong>Status</strong></span></td>
<td><span class="style1"><strong>Notes</strong></span></td>
<td><span class="style1"><strong>Date</strong></span></td>
</tr>
<?php do { ?>
<tr>
<td><span class="style1"><?php echo $row_orderquery['adress']; ?></span></td>
<td><span class="style1"><?php echo $row_orderquery['zipcode']; ?></span></td>
<td><span class="style1"><?php echo $row_orderquery['name']; ?></span></td>
<td><span class="style1"><?php echo $row_orderquery['worktype']; ?></span></td>
<td><span class="style1"><?php echo $row_orderquery['status']; ?></span></td>
<td><span class="style1"><?php echo $row_orderquery['notes']; ?></span></td>
<td><span class="style1"><?php echo $row_orderquery['date']; ?></span></td>
</tr>
<?php } while ($row_orderquery = mysql_fetch_assoc($orderquery)); ?>
</table>
<p align="center" class="style1">Total number of orders completed: <?php echo $totalRows_orderquery ?> </p>
<!-- InstanceEndEditable --></td>
</tr>
</table>
</body>
<!-- InstanceEnd --></html>
<?php
mysql_free_result($orderquery);
?>
Bookmarks