", ">", $strconv);
$strconv = str_replace("\n", "
", $strconv);
$strconv = str_replace("Ç", "Ç", $strconv);
$strconv = str_replace("ü", "ü", $strconv);
$strconv = str_replace("é", "é", $strconv);
$strconv = str_replace("â", "â", $strconv);
$strconv = str_replace("ä", "ä", $strconv);
$strconv = str_replace("à", "à", $strconv);
$strconv = str_replace("å", "å", $strconv);
$strconv = str_replace("ç", "ç", $strconv);
$strconv = str_replace("ê", "ê", $strconv);
$strconv = str_replace("ë", "ë", $strconv);
$strconv = str_replace("è", "è", $strconv);
$strconv = str_replace("ï", "ï", $strconv);
$strconv = str_replace("î", "î", $strconv);
$strconv = str_replace("ì", "ì", $strconv);
$strconv = str_replace("Ä", "Ä", $strconv);
$strconv = str_replace("Å", "Å", $strconv);
$strconv = str_replace("É", "É", $strconv);
$strconv = str_replace("æ", "æ", $strconv);
$strconv = str_replace("Æ", "Æ", $strconv);
$strconv = str_replace("ô", "ô", $strconv);
$strconv = str_replace("ö", "ö", $strconv);
$strconv = str_replace("ò", "ò", $strconv);
$strconv = str_replace("û", "û", $strconv);
$strconv = str_replace("ù", "ù", $strconv);
$strconv = str_replace("ÿ", "ÿ", $strconv);
$strconv = str_replace("Ö", "Ö", $strconv);
$strconv = str_replace("Ü", "Ü", $strconv);
$strconv = str_replace("|", "¦", $strconv);
$strconv = str_replace("á", "á", $strconv);
$strconv = str_replace("í", "í", $strconv);
$strconv = str_replace("ó", "ó", $strconv);
$strconv = str_replace("ú", "ú", $strconv);
$strconv = str_replace("ñ", "ñ", $strconv);
$strconv = str_replace("Ñ", "Ñ", $strconv);
$strconv = str_replace("¢", "¢", $strconv);
$strconv = str_replace("£", "£", $strconv);
$strconv = str_replace("¥", "¥", $strconv);
$strconv = str_replace("ƒ", "¡", $strconv);
$strconv = str_replace("ª", "ª", $strconv);
$strconv = str_replace("º", "º", $strconv);
$strconv = str_replace("¿", "¿", $strconv);
$strconv = str_replace("¬", "¬", $strconv);
$strconv = str_replace("½", "½", $strconv);
$strconv = str_replace("¼", "¼", $strconv);
$strconv = str_replace("¡", "¡", $strconv);
$strconv = str_replace("«", "«", $strconv);
$strconv = str_replace("»", "»", $strconv);
return ($strconv);
}
function SFormatting($strenc){
$strconv = $strenc;
$strconv = str_replace("<b>", "<B>", $strconv);
$strconv = str_replace("</b>", "</B>", $strconv);
$strconv = str_replace("<i>", "<I>", $strconv);
$strconv = str_replace("</i>", "</I>", $strconv);
$strconv = str_replace("<u>", "<U>", $strconv);
$strconv = str_replace("</u>", "</U>", $strconv);
$strconv = str_replace("<p>", "<BR>", $strconv);
$strconv = str_replace("</p>", "<BR>", $strconv);
$strconv = str_replace("<P>", "<BR>", $strconv);
$strconv = str_replace("</P>", "<BR>", $strconv);
$strconv = str_replace("<br>", "<BR>", $strconv);
$strconv = str_replace("<B>", "", $strconv);
$strconv = str_replace("</B>", "", $strconv);
$strconv = str_replace("<I>", "", $strconv);
$strconv = str_replace("</I>", "", $strconv);
$strconv = str_replace("<U>", "", $strconv);
$strconv = str_replace("</U>", "", $strconv);
$strconv = str_replace("<BR>", "
", $strconv);
return ($strconv);
}
function RemoveURLCodes($strenc){
$strconv = $strenc;
$strconv = str_replace("&", "", $strconv);
$strconv = str_replace("?", "", $strconv);
return ($strconv);
}
/*************************************************************/
/*************************************************************/
/*************************************************************/
/*************************************************************/
$headerfilename="./header.htm";
$footerfilename="./footer.htm";
$callthisaddress = "search.php3";
// $rowsperpage = 50;
$rowsperpage = 20;
$databestand="bn";
/*************************************************************/
/*************************************************************/
/*************************************************************/
/*************************************************************/
$relpath = "./";
$noheader = 0;
$xxxTitle = "Welcome to Burgersdijk-Niermans Auction House";
include($relpath . "common.php");
/*
$header = "";
$footer = "";
if($fd = fopen($headerfilename,"r")) {
while($rij = fgets($fd, 4096)) {
$header = $header . $rij;
}
fclose($fd);
} else {
$header = "
xxxTitle\n" .
"\n" .
"\n" .
"xxxTitle
\n";
}
$header = $header . "\n
\n";
$header = str_replace("xxxTitle", "", $header);
if($fd = fopen("$footerfilename","r")) {
while ($rij = fgets($fd, 4096)) {
$footer = $footer . $rij;
}
fclose($fd);
} else {
$footer = "Webdesign and maintenance by \n" .
"Rockingstone\n" .
"\n" .
"
\n";
}
$footer = "\n\n" . $footer;
if($Searchterm) {
$footer =
"
\n" .
"\n" .
"Back to search form\n" .
"
\n" .
"
\n" .
$footer;
}
echo("$header");
*/
$extrafooter = "";
if($Searchterm) {
$extrafooter =
"
\n" .
"\n" .
"Back to search form\n" .
"
\n" .
"
\n";
}
$Pg = (int)$Pg;
if($Pg <= 0) {
$Pg = 1;
}
$AuctionNumber = (int)$AuctionNumber;
$DetailItemNumber = (int)$DetailItemNumber;
trim($Searchterm);
$Searchterm = str_replace(",", " ", $Searchterm);
trim($Searchterm);
/*
require("connect_inc.php");
*/
require("connect.php");
$CurrentAuctionNumber = 0;
$zoekstring = "SELECT * FROM parameters WHERE ParameterName = 'CurrentAuctionNumber'";
if(!($queryresult = mysql_query($zoekstring, $sock))){
include($relpath . "close.php");
}
if($row = mysql_fetch_array($queryresult)) {
$CurrentAuctionNumber = (int)$row["ParameterValue"];
}
mysql_free_result($queryresult);
$Anouncement = "";
$zoekstring = "SELECT * FROM parameters WHERE ParameterName = 'Anouncement'";
if(!($queryresult = mysql_query($zoekstring, $sock))){
include($relpath . "close.php");
}
if($row = mysql_fetch_array($queryresult)) {
$Anouncement = $row["ParameterText"];
}
mysql_free_result($queryresult);
$SubAnouncement = "";
$zoekstring = "SELECT * FROM parameters WHERE ParameterName = 'SubAnouncement'";
if(!($queryresult = mysql_query($zoekstring, $sock))){
include($relpath . "close.php");
}
if($row = mysql_fetch_array($queryresult)) {
$SubAnouncement = $row["ParameterText"];
}
mysql_free_result($queryresult);
$AuctionName = "";
$AuctionDate = "";
$AuctionInfo = "";
$CategoryName = "";
$GroupName = "";
$SessionName = "";
if($AuctionNumber) {
$CategoryNumber = 0;
$zoekstring = "SELECT * FROM auctions WHERE AuctionNumber = $AuctionNumber";
if(!($queryresult = mysql_query($zoekstring, $sock))){
include($relpath . "close.php");
}
if($row = mysql_fetch_array($queryresult)) {
$AuctionName = $row["AuctionName"];
$AuctionDate = $row["DateText"];
$AuctionInfo = $row["InfoText"];
}
mysql_free_result($queryresult);
if($GroupNumber) {
$zoekstring = "SELECT * FROM groups WHERE AuctionNumber = $AuctionNumber AND GroupNumber = $GroupNumber";
if(!($queryresult = mysql_query($zoekstring, $sock))){
include($relpath . "close.php");
}
if($row = mysql_fetch_array($queryresult)) {
$pCategoryNumber = $row["CategoryNumber"];
$imin = $row["MinItemNumber"];
$imax = $row["MaxItemNumber"];
$SessionNumber = $row["SessionNumber"];
$zoekstring = "SELECT * FROM categories WHERE AuctionNumber = '" . $AuctionNumber . "' AND CategoryNumber = '" . $pCategoryNumber . "'";
if(!($catresult = mysql_query($zoekstring, $sock))){
include($relpath . "close.php");
}
if($catrow = mysql_fetch_array($catresult)) {
$pCategoryName = $catrow["CategoryName"];
}
mysql_free_result($catresult);
$GroupName = "$pCategoryName, item numbers $imin-$imax";
$zoekstring = "SELECT * FROM sessions WHERE AuctionNumber = $AuctionNumber AND SessionNumber = $SessionNumber";
if(!($catresult = mysql_query($zoekstring, $sock))){
include($relpath . "close.php");
}
if($catrow = mysql_fetch_array($catresult)) {
$SessionName = $catrow["SessionName"];
}
mysql_free_result($catresult);
}
mysql_free_result($queryresult);
}
} else {
$GroupNumber = 0;
}
if($CategoryNumber) {
$zoekstring = "SELECT * FROM categories WHERE AuctionNumber = '" . $AuctionNumber . "' AND CategoryNumber = '" . $CategoryNumber . "'";
if(!($queryresult = mysql_query($zoekstring, $sock))){
include($relpath . "close.php");
}
if($row = mysql_fetch_array($queryresult)) {
$CategoryName = $row["CategoryName"];
}
mysql_free_result($queryresult);
}
if($AuctionNumber) {
if($GroupNumber) {
} else {
}
} else {
echo("WELCOME TO OUR AUCTION HOUSE \n");
echo("
\n");
}
$zoekstring = "";
if($Searchterm) {
$and = "";
$zoekstring = "SELECT * from books WHERE ";
if($AuctionNumber) {
$zoekstring = $zoekstring . $and;
$zoekstring = $zoekstring . "AuctionNumber = $AuctionNumber";
$and = " AND ";
} else {
if((!($CategoryNumber)) && (!($CategoryNumber))) {
$zoekstring = $zoekstring . $and;
$zoekstring = $zoekstring . "AuctionNumber < $CurrentAuctionNumber";
$and = " AND ";
}
}
if($CategoryNumber) {
$zoekstring = $zoekstring . $and;
$zoekstring = $zoekstring . "CategoryNumber = $CategoryNumber";
$and = " AND ";
}
if($GroupNumber) {
$zoekstring = $zoekstring . $and;
$zoekstring = $zoekstring . "GroupNumber = $GroupNumber";
$and = " AND ";
}
if(strlen($Searchterm) > 0){
$orlist = explode(" ", $Searchterm);
$orcount = count($orlist);
if($orcount >= 2) {
$ori = 0;
$orc = 0;
while($ori <= ($orcount - 1)) {
$SSearchterm = $orlist[$ori];
if($SSearchterm) {
$SSearchterm = str_replace("\\", "\\\\", $SSearchterm);
$SSearchterm = str_replace("'", "\'", $SSearchterm);
if($orc) {
$zoekstring = $zoekstring . " AND ";
} else {
$zoekstring = $zoekstring . $and;
}
$zoekstring = $zoekstring .
"(Description LIKE '%$SSearchterm%' OR DescripRest LIKE '%$SSearchterm%' OR Note LIKE '%$SSearchterm%' OR NoteRest LIKE '%$SSearchterm%')";
$orc++;
}
$ori++;
}
if($orc) {
$and = " AND ";
}
} else {
$SSearchterm = str_replace("\\", "\\\\", $Searchterm);
$SSearchterm = str_replace("'", "\'", $SSearchterm);
$zoekstring = $zoekstring . $and .
"(Description LIKE '%$SSearchterm%' OR DescripRest LIKE '%$SSearchterm%' OR Note LIKE '%$SSearchterm%' OR NoteRest LIKE '%$SSearchterm%')";
$and = " AND ";
}
}
if(strlen($Searchterm) > 0){
$zoekstring = $zoekstring . " ORDER BY AuctionNumber,ItemNumber";
} else {
$zoekstring = $zoekstring . " ORDER BY ItemNumber";
}
} else {
if(($AuctionNumber) && ($GroupNumber)) {
$zoekstring = "SELECT * FROM books WHERE AuctionNumber = $AuctionNumber AND " .
"GroupNumber = $GroupNumber ORDER BY ItemNumber";
}
}
if($zoekstring != "") {
if($AuctionNumber) {
echo("\n");
if($AuctionNumber == $CurrentAuctionNumber) {
echo("COMING AUCTION
\n");
printf("%s\n", EscapeHTMLCodes(strtoupper($AuctionName)));
} else {
printf("AUCTION RESULTS FROM %s\n", EscapeHTMLCodes(strtoupper($AuctionName)));
}
if($SessionName != "") {
printf("
%s\n", EscapeHTMLCodes($SessionName));
}
if($GroupNumber) {
printf("
%s\n", EscapeHTMLCodes($GroupName));
}
echo("
\n");
if($AuctionNumber == $CurrentAuctionNumber) {
echo("Online bidding form\n");
}
}
} else {
if($AuctionNumber) {
if($GroupNumber) {
//this is taken of
} else {
if($view == "info") {
echo("\n");
if($AuctionNumber == $CurrentAuctionNumber) {
echo("COMING AUCTION
\n");
printf("%s\n", EscapeHTMLCodes(strtoupper($AuctionName)));
} else {
echo("RECENT AUCTION
\n");
printf("%s\n", EscapeHTMLCodes(strtoupper($AuctionName)));
}
echo("
\n");
} else {
if($DetailItemNumber >= 1) {
echo("\n");
if($AuctionNumber == $CurrentAuctionNumber) {
echo("COMING AUCTION
\n");
printf("%s\n", EscapeHTMLCodes(strtoupper($AuctionName)));
echo("
ITEM DETAIL PAGE\n");
} else {
printf("AUCTION RESULTS FROM %s\n", EscapeHTMLCodes(strtoupper($AuctionName)));
echo("
ITEM DETAIL PAGE\n");
}
echo("
\n");
echo("
<< Back to previous page
\n");
$zoekstring = "SELECT * from books WHERE AuctionNumber = " . $AuctionNumber . " AND ItemNumber = " . $DetailItemNumber;
if(!($queryresult = mysql_query($zoekstring, $sock))){
include($relpath . "close.php");
}
if($row = mysql_fetch_array($queryresult)) {
echo("\n");
echo("\n");
echo("| \n");
$imgfn = "";
$padbr = $row["ItemNumber"];
$padlen = strlen($padbr);
while($padlen < 5) {
$padbr = "0" . $padbr;
$padlen++;
}
$imgfn = "";
if($AuctionNumber) {
if(file_exists("../bnitemimages/" . $AuctionNumber . "-" . $padbr . ".jpg")) {
$imgfn = $AuctionNumber . "-" . $padbr . ".jpg";
}
}
$price1 = (string)$row["Price1"];
if(strlen($price1) >= 2) {
$price1 = substr($price1, 0, (strlen($price1) - 2));
}
$price1 = number_format((float)$price1,0,"",".");
$price2 = (string)$row["Price2"];
if(strlen($price2) >= 2) {
$price2 = substr($price2, 0, (strlen($price2) - 2));
}
$price2 = number_format((float)$price2,0,"",".");
$PriceSold = (string)$row["PriceSold"];
if(strlen($PriceSold) >= 2) {
$PriceSold = substr($PriceSold, 0, (strlen($PriceSold) - 2));
$PriceSold = number_format((float)$PriceSold,0,"",".");
} else {
$PriceSold = "";
}
printf("%s", EscapeHTMLCodes($row["ItemNumber"]));
echo(" | \n");
echo(" \n");
if((1 == 0) && ($imgfn != "")) {
echo(" \n");
}
echo(" | \n");
echo("\n");
printf("%s", str_replace("¶", "", EscapeHTMLCodes($row["Description"])));
printf("%s", str_replace("¶", "", EscapeHTMLCodes($row["DescripRest"])));
echo(" ");
if((int)$row["AuctionNumber"] < 313) {
echo("(Nlg. $price1 - Nlg. $price2)");
if($PriceSold != "") {
echo(" Nlg. $PriceSold");
}
} else if((int)$row["AuctionNumber"] < 315) {
if($price1 != 0) {
echo("(Nlg. $price1 - EUR $price2)");
} else {
echo("EUR $price2");
}
if($PriceSold != "") {
echo(" Nlg. $PriceSold");
}
} else {
if(($price1 != 0) && ($price2 != 0)) {
echo("(EUR $price1 - EUR $price2)");
} else if($price1 != 0) {
echo("EUR $price1");
} else if($price2 != 0) {
echo("EUR $price2");
}
if($PriceSold != "") {
echo(" EUR $PriceSold");
}
}
echo(" ");
if($row["Note"]) {
printf("¶ %s", str_replace("¶", "", EscapeHTMLCodes($row["Note"])));
printf("%s", str_replace("¶", "", EscapeHTMLCodes($row["NoteRest"])));
}
echo(" | \n");
echo("
\n");
echo("
\n");
if($imgfn != "") {
echo("
\n");
}
echo("
\n");
echo("
\n");
}
mysql_free_result($queryresult);
include($relpath . "close.php");
} else {
//display groups
//--------------
echo("\n");
if($AuctionNumber == $CurrentAuctionNumber) {
echo("COMING AUCTION
\n");
printf("%s\n", EscapeHTMLCodes(strtoupper($AuctionName)));
echo("
ORDER OF THE SALE\n");
} else {
printf("AUCTION RESULTS FROM %s\n", EscapeHTMLCodes(strtoupper($AuctionName)));
}
echo("
\n");
}
}
}
}
}
if(($AuctionNumber) || ($CategoryNumber)) {
echo("\n");
echo("\n");
echo("\n");
}
if($zoekstring != "") {
echo("\n");
if(!($queryresult = mysql_query($zoekstring, $sock))){
include($relpath . "close.php");
}
$hitsteller = mysql_num_rows($queryresult);
if($hitsteller == 0){
mysql_free_result($queryresult);
echo("Sorry, no titles found.\n");
include($relpath . "close.php");
}
if($Searchterm == "") {
$rowsperpage = 2000;
}
if($Searchterm != "") {
echo("Search result: $hitsteller title(s) found\n");
}
if(((($Pg - 1) * $rowsperpage) + 1) > $hitsteller) {
$Pg = (($hitsteller - 1) / $rowsperpage) + 1;
}
$firstrow = (($Pg - 1) * $rowsperpage) + 1;
if($firstrow > $hitsteller) {
$firstrow = 1;
}
$lastrow = $firstrow + $rowsperpage - 1;
if($lastrow > $hitsteller) {
$lastrow = $hitsteller;
}
if($Searchterm != "") {
echo("results: $firstrow - $lastrow\n");
}
echo("
\n");
$row = "dummy";
$currow = $firstrow - 1;
mysql_data_seek($queryresult, $currow);
while(($row) && ($currow < $lastrow)) {
$row = mysql_fetch_array($queryresult);
if($row){
$currow++;
if($currow <= $lastrow){
echo("\n");
echo("\n");
echo("| \n");
$imgfn = "";
$padbr = $row["ItemNumber"];
$padlen = strlen($padbr);
while($padlen < 5) {
$padbr = "0" . $padbr;
$padlen++;
}
$imgfn = "";
if($AuctionNumber) {
if(file_exists("../bnitemimages/" . $AuctionNumber . "-" . $padbr . ".jpg")) {
$imgfn = $AuctionNumber . "-" . $padbr . ".jpg";
}
}
$price1 = (string)$row["Price1"];
if(strlen($price1) >= 2) {
$price1 = substr($price1, 0, (strlen($price1) - 2));
}
$price1 = number_format((float)$price1,0,"",".");
$price2 = (string)$row["Price2"];
if(strlen($price2) >= 2) {
$price2 = substr($price2, 0, (strlen($price2) - 2));
}
$price2 = number_format((float)$price2,0,"",".");
$PriceSold = (string)$row["PriceSold"];
if(strlen($PriceSold) >= 2) {
$PriceSold = substr($PriceSold, 0, (strlen($PriceSold) - 2));
$PriceSold = number_format((float)$PriceSold,0,"",".");
} else {
$PriceSold = "";
}
printf("%s", EscapeHTMLCodes($row["ItemNumber"]));
echo(" | \n");
echo(" \n");
if($imgfn != "") {
echo(" \n");
}
echo(" | \n");
echo("\n");
printf("%s", str_replace("¶", "", EscapeHTMLCodes($row["Description"])));
printf("%s", str_replace("¶", "", EscapeHTMLCodes($row["DescripRest"])));
echo(" ");
if((int)$row["AuctionNumber"] < 313) {
echo("(Nlg. $price1 - Nlg. $price2)");
if($PriceSold != "") {
echo(" Nlg. $PriceSold");
}
} else if((int)$row["AuctionNumber"] < 315) {
if($price1 != 0) {
echo("(Nlg. $price1 - EUR $price2)");
} else {
echo("EUR $price2");
}
if($PriceSold != "") {
echo(" Nlg. $PriceSold");
}
} else {
if(($price1 != 0) && ($price2 != 0)) {
echo("(EUR $price1 - EUR $price2)");
} else if($price1 != 0) {
echo("EUR $price1");
} else if($price2 != 0) {
echo("EUR $price2");
}
if($PriceSold != "") {
echo(" EUR $PriceSold");
}
}
echo(" ");
if($row["Note"]) {
printf("¶ %s", str_replace("¶", "", EscapeHTMLCodes($row["Note"])));
printf("%s", str_replace("¶", "", EscapeHTMLCodes($row["NoteRest"])));
}
if($imgfn != "") {
echo("
Click here to view image \n");
}
echo(" | \n");
echo("
\n");
echo("
\n");
if(($Searchterm != "") && (!($GroupNumber))) {
$aucname = "";
$sssname = "";
$catname = "";
$auc = $AuctionNumber;
if(!($auc)) {
$auc = $row["AuctionNumber"];
$zoekstring = "SELECT * FROM auctions WHERE AuctionNumber = $auc";
if(!($aucresult = mysql_query($zoekstring, $sock))){
include($relpath . "close.php");
}
if($aucrow = mysql_fetch_array($aucresult)) {
$aucname = $aucrow["AuctionName"];
}
mysql_free_result($aucresult);
}
$grp = $row["GroupNumber"];
$zoekstring = "SELECT * FROM groups WHERE AuctionNumber = $auc AND GroupNumber = $grp";
if(!($grpresult = mysql_query($zoekstring, $sock))){
include($relpath . "close.php");
}
if($grprow = mysql_fetch_array($grpresult)) {
$sssion = $grprow["SessionNumber"];
$pCategoryNumber = $grprow["CategoryNumber"];
$imin = $grprow["MinItemNumber"];
$imax = $grprow["MaxItemNumber"];
$zoekstring = "SELECT * FROM categories WHERE AuctionNumber = '" . $auc . "' AND CategoryNumber = '" . $pCategoryNumber . "'";
if(!($catresult = mysql_query($zoekstring, $sock))){
include($relpath . "close.php");
}
if($catrow = mysql_fetch_array($catresult)) {
$catname = $catrow["CategoryName"];
}
mysql_free_result($catresult);
$zoekstring = "SELECT * FROM sessions WHERE AuctionNumber = $auc AND SessionNumber = $sssion";
if(!($sessionresult = mysql_query($zoekstring, $sock))){
include($relpath . "close.php");
}
if($sessionrow = mysql_fetch_array($sessionresult)) {
$sssname = $sessionrow["SessionName"];
}
mysql_free_result($sessionresult);
}
mysql_free_result($grpresult);
echo("");
if($sssname != "") {
printf("%s", EscapeHTMLCodes($sssname));
if($catname != "") {
echo(", ");
}
} else if($aucname != "") {
printf("%s", EscapeHTMLCodes($aucname));
if($catname != "") {
echo(", ");
}
}
if($catname != "") {
printf("%s", EscapeHTMLCodes($catname));
}
echo("");
}
echo("
\n");
} else {
break;
}
}
}
mysql_free_result($queryresult);
if($hitsteller > $rowsperpage) {
echo("
\n");
echo("\n");
$URLSearchterm = rawurlencode($Searchterm);
$pref = 1;
while((((($pref - 1) * $rowsperpage) + 1) <= $hitsteller) && ($pref <= 10)){
if($pref == $Pg) {
echo("$pref \n");
} else {
echo("" .
"$pref \n");
}
$pref++;
}
echo("\n");
echo("
\n");
}
if($AuctionNumber) {
if($GroupNumber) {
if($AuctionNumber == $CurrentAuctionNumber) {
echo("\n");
echo("back to order of the sale\n");
echo("\n");
}
}
}
} else {
if($AuctionNumber) {
if($GroupNumber) {
//this is taken care of above
} else {
if($view == "info") {
// printf("Date of sale: %s
", EscapeHTMLCodes($AuctionDate));
// echo("
\n");
printf("%s", EscapeHTMLCodes($AuctionInfo));
echo("
\n");
if($SubAnouncement != "") {
echo("
\n");
echo($SubAnouncement);
echo("
\n");
}
echo("
\n");
echo("Conditions of sale/Verkoopvoorwaarden
\n");
echo("(Credit Card Payment not accepted)
\n");
echo("
\n");
} else {
//display groups
//--------------
if($AuctionNumber == $CurrentAuctionNumber) {
echo("Online bidding form\n");
echo(" N.B. We sell approximately 200 items per hour
\n");
} else {
printf("%s
", EscapeHTMLCodes($AuctionInfo));
}
// $zoekstring = "SELECT * FROM groups WHERE AuctionNumber = $AuctionNumber ORDER BY GroupNumber";
$zoekstring = "SELECT * FROM groups WHERE AuctionNumber = $AuctionNumber ORDER BY MinItemNumber";
if(!($queryresult = mysql_query($zoekstring, $sock))){
include($relpath . "close.php");
}
$pLastSessionNumber = 0;
echo("\n");
while($row = mysql_fetch_array($queryresult)) {
$pGroupNumber = $row["GroupNumber"];
$pCategoryNumber = $row["CategoryNumber"];
$pSessionNumber = (int)$row["SessionNumber"];
$imin = $row["MinItemNumber"];
$imax = $row["MaxItemNumber"];
$zoekstring = "SELECT * FROM categories WHERE AuctionNumber = '" . $AuctionNumber . "' AND CategoryNumber = '" . $pCategoryNumber . "'";
if(!($catresult = mysql_query($zoekstring, $sock))){
include($relpath . "close.php");
}
if($catrow = mysql_fetch_array($catresult)) {
$pCategoryName = $catrow["CategoryName"];
}
mysql_free_result($catresult);
$pSessionName = "";
if($pSessionNumber != $pLastSessionNumber) {
$pLastSessionNumber = $pSessionNumber;
$zoekstring = "SELECT * FROM sessions WHERE AuctionNumber = $AuctionNumber AND " .
"SessionNumber = $pSessionNumber";
if(!($sessionresult = mysql_query($zoekstring, $sock))){
include($relpath . "close.php");
}
if($sessionrow = mysql_fetch_array($sessionresult)) {
$pSessionName = $sessionrow["SessionName"];
}
mysql_free_result($sessionresult);
}
if($pSessionName) {
echo("\n");
echo("\n");
printf(" %s
\n", EscapeHTMLCodes($pSessionName));
echo(" | \n");
echo("\n");
echo(" | \n");
echo("
\n");
}
echo("\n");
echo("| \n");
printf("%s\n", EscapeHTMLCodes($pCategoryName));
echo(" | \n");
echo("\n");
printf("%s-%s\n", $imin, $imax);
echo(" | \n");
echo("
\n");
}
echo("
");
mysql_free_result($queryresult);
}
}
} else {
if($CategoryNumber) {
//browse category
//............
} else {
//main page with auctions
//-----------------------
$zoekstring = "SELECT * FROM auctions WHERE AuctionNumber = $CurrentAuctionNumber";
if(!($queryresult = mysql_query($zoekstring, $sock))){
include($relpath . "close.php");
}
if($row = mysql_fetch_array($queryresult)) {
$pAuctionName = $row["AuctionName"];
$pDateText = $row["DateText"];
printf("We invite you to browse our " .
"coming auction which will take place on %s. You can either browse " .
"by catchword or by category. Enjoy your search!
\n", EscapeHTMLCodes($pDateText));
}
mysql_free_result($queryresult);
$zoekstring = "SELECT * FROM auctions WHERE AuctionNumber < $CurrentAuctionNumber ORDER BY AuctionNumber";
if(!($queryresult = mysql_query($zoekstring, $sock))){
include($relpath . "close.php");
}
$hitsteller = mysql_num_rows($queryresult);
if($hitsteller >= 1) {
if($Anouncement) {
echo("
\n");
printf("%s", SFormatting(EscapeHTMLCodes($Anouncement)));
echo("
\n");
}
echo("
\n");
echo("Browse our most recent auction catalogues including sale results:
\n");
while($row = mysql_fetch_array($queryresult)) {
$pAuctionNumber = $row["AuctionNumber"];
$pAuctionName = $row["AuctionName"];
printf("" .
"%s
\n", EscapeHTMLCodes($pAuctionName));
}
echo("\n");
}
mysql_free_result($queryresult);
$zoekstring = "SELECT * FROM auctions WHERE AuctionNumber > $CurrentAuctionNumber ORDER BY AuctionNumber";
if(!($queryresult = mysql_query($zoekstring, $sock))){
include($relpath . "close.php");
}
$hitsteller = mysql_num_rows($queryresult);
if($hitsteller >= 1) {
echo("
\n");
echo("View future auctions:
\n");
while($row = mysql_fetch_array($queryresult)) {
$pAuctionNumber = $row["AuctionNumber"];
$pAuctionName = $row["AuctionName"];
printf("" .
"%s
\n", EscapeHTMLCodes($pAuctionName));
}
}
mysql_free_result($queryresult);
}
}
}
include($relpath . "close.php");
?>