// Include the header file
include ("../../include/header.php");
// get data connection
require("../../include/sqlcon.php");
$sql = new MySQL_class;
$sql->Create("triumphstag_db");
$sql1 = new MySQL_class;
$sql1->Create("triumphstag_db");
$time =time();
$date1=(time() - 2592000);
if ("" == $order) {
$order ="altpartno";
}
// set up search form
//
$sql->Query("SELECT partnumber, description from stagdatapartsindex where id ='$indexid'");
$sql->Fetch($i);
$partnumber = $sql->data[0];
$description= $sql->data[1];
echo(" Alternatives for Part Number : $partnumber
");
echo(" Description : $description ");
//
echo("");
echo("");
//set table headings
echo("Alternative Part Number | ");
echo("Description | ");
echo("Added By |
\n");
$sql->Query("Select id,altpartno, altdesc, name from stagdataaltparts where indexid = '$indexid' order by '$order'");
for ($i = 0; $i < $sql->rows; $i++) {
$sql->Fetch($i);
$altid = $sql->data[0];
$altpartno = $sql->data[1];
$altdesc = $sql->data[2];
$name = $sql->data[3];
$altid1=urlencode($altid);
$description1 = urlencode ($description);
$partnumber1 = urlencode($partnumber);
//assemble each row of the table
//check row colour and alternate
if (1==$rowcolour){
$bgcolour="bgcolor='#FFFFFF' bordercolor='#FFFFFF'";
$rowcolour=0;
} else {
$bgcolour="bgcolor='#F4F4F4' bordercolor='#F4F4F4'";
$rowcolour=1;
}
//assemble the table
echo("$altpartno | ");
echo("$altdesc | ");
echo("$name |
");
}
echo("
\n");
echo("
");
?>