OK, here's the main chunk of code from orderlist.php, which is written for osCommerce. Can anyone give a go at Zenning it for me?
I'm pretty sure it's just a few lines. Thanks!
PHP Code:
ob_start();
require('includes/application_top.php');
require(DIR_WS_CLASSES . 'currencies.php');
$currencies = new currencies();
include(DIR_WS_CLASSES . 'order.php');
$order_status = $select_order_status;
$display_order_status = $order_status;
if ($order_status == "")
{
$order_status = 1;
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title><?php echo TITLE . ' - ' . OL_TITLE ?></title>
<link rel="stylesheet" type="text/css" href="orderlist-styles.css" media="all" >
</head>
<body>
<h1><?php echo OL_HEAD; ?></h1><br>
<script language="javascript">
<!--
document.write(Date());
-->
</script>
<h2>
<?php
$query_status = "SELECT * FROM `orders_status` where `orders_status_id` = $order_status AND language_id = $languages_id";
$status_result = tep_db_query($query_status);
while ($row4 = tep_db_fetch_array($status_result))
{
echo "(";
$orders_status_name = $row4['orders_status_name'];
echo $orders_status_name;
echo ")";
}
// FORM THAT LETS YOU SELECT WHICH ORDER STATUS TO DISPLAY
?>
</h2>
<form name="orderstatus" method="post" action="<?php echo $PHP_SELF?>">
<?php
$query_status = "SELECT * FROM `orders_status` WHERE language_id = $languages_id";
$status_result = tep_db_query($query_status);
echo OL_SELECT_STATUS . " ";
echo "<select name=\"select_order_status\">";
echo "<option value=></option>";
while ($row3 = tep_db_fetch_array($status_result))
{
echo "<option value=";
echo $row3['orders_status_id'];
echo ">";
echo $row3['orders_status_name'];
echo "</option><br>";
}
echo "</select>";
?>
<input type="submit" name="Submit" value="<?php echo OL_SUBMIT; ?>"> <input type="button" value="<?php echo OL_PRINT; ?>" onClick="window.print()" />
</form>
<TABLE width="100%" align=center cellSpacing=1 cellPadding=1 border=1>
<TBODY>
<TR class="headers">
<TD align="center" width="5%">
<?php echo OL_ORDERNR; ?>
</TD>
<TD align="center" width="10%">
<?php echo OL_DATE; ?>
</TD>
<TD width="15%">
<?php echo OL_NAME; ?>
</TD>
<td width="25%">Products</td>
<TD width="45%">
<?php echo OL_DETAILS; ?>
</TD>
</TR>
<?php
$query1 = "SELECT * FROM `orders` WHERE orders_status = $order_status ORDER BY orders_id ";
$result = tep_db_query($query1);
while ($row = tep_db_fetch_array($result)) {
$ordernummer = $row['orders_id'];
?>
<TR><span font size="6">
<TD align="center" width="5%">
<?php echo $ordernummer; ?>
</TD>
<TD width="10%"> </TD>
<TD width="15%">
<?php echo $row{'delivery_name'}; ?><br>
<?php echo $row{'delivery_street_address'}; ?>
<br>
<?php echo $row{'delivery_city'}; ?>
 
<?php echo $row{'delivery_state'}; ?>
 
<?php echo $row{'delivery_postcode'}; ?>
<br>
<?php echo $row{'customers_email_address'}; ?>
</TD>
<TD width="25%">
<?php
$order = new order($ordernummer);
for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
?>
<br>
O <?php echo $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name']; ?>
<?php
}
?>
</TD>
</span></TR>
<?php
}
?>
</table>
</body>
</html>
<?php
ob_end_flush();
?>