require("util.php3");
DoTitle("Administration Functions - Delete Auctioneer");
$sql = new MySQL_class;
$sql->Create("churchil_demo");
/* If we've got any data handed in via CGI, then delete
* the specified locations from the database. Do a bit
* of error checking, just in case, ya know? Make sure
* that the user isn't deleting any auctioneers that
* have currently listed auctions.
*/
if ($DelNeer) {
echo ("
\n");
$id = current($DelNeer);
do {
$name = $sql->QueryItem("select Name from Auctioneers where ID = $id");
/* Before deleteing this item, make sure that no current
* Auctions are depending on it for Directions, etc.
*/
$sql->Query("select ID from Auctions where Auctioneer = $id");
if ($sql->rows != 0) {
echo("\n");
echo("- Unable to delete Auctioneer: $name. $num Auctions listed with that auctioneer.\n");
echo("
\n");
} else {
$sql->Delete("delete from Auctioneers where ID = $id");
echo("- Deleted: $name\n");
}
} while ($id = next($DelNeer));
echo ("
\n");
}
?>
include("footer.php3");
?>