\n";
print $msg;
mail('Webmaster@Apache-Server.Com',
'Apache-Server db access failure',
$msg);
}
}
else {
$msg = "\n";
print $msg;
mail('Webmaster@Apache-Server.Com', 'Apache-Server db access failure',
$msg);
}
?>
Apache-Server.Com Store
Apache-Server.Com Store
We've collected pointers to a bunch of Apache-related
items you can purchase online, such as books and T-shirts.
Clicking on any of the descriptions will take you to a
site where you can find out more, and purchase the item
if you like.
\n";
}
$count++;
echo " "
. HTMLentities($category)
. " \n";
}
if ($count) {
echo " \n";
}
$sql = "SELECT name, category, data, url, description, "
. "picture, picture_width, picture_height "
. "FROM item "
. "WHERE (visible != 0) "
. "ORDER BY category ASC, priority ASC, name ASC ";
$q = mysql_query($sql);
if (! $q) {
$msg = "\n";
mail('Webmaster@Apache-Server.Com', 'Apache-Server db access failure',
$msg);
print "Error! \n"
. "\n"
. "An error was encountered accessing the database.\n"
. "The problem has been reported to the Webmaster.\n"
. "Please send mail to Webmaster@Apache-Server.Com\n"
. "yourself if you would like to be notified when the problem\n"
. "has been fixed. Thanks for your patience!\n"
. "
\n";
}
else {
$last = "";
$row_open = 0;
while ($row = mysql_fetch_row($q)) {
list($name, $category, $data, $url, $desc,
$pic, $pic_width, $pic_height) = $row;
if ($category != $last) {
if ($last) {
if ($row_open) {
echo " \n";
}
echo " \n";
}
echo "\n \n\n \n"
. " \n";
$last = $category;
$sql = "SELECT COUNT(id) "
. "FROM item "
. "WHERE (visible != 0) "
. "AND (category = '" . AddSlashes($category) . "') ";
$q2 = mysql_query($sql);
list($nitems) = mysql_fetch_row($q2);
$item = 0;
}
$item++;
$rawname = $name = HTMLentities($name);
$link = $url;
if ($category == "Books") {
if (! $url) {
$url = "amazon";
}
if (! strstr($url, "://")) {
$link = "http://Apache-Server.Com/cgi-bin/title-redirect"
. "/$url//$data/";
}
$name = "$name ";
}
if (($nitems < 5)
|| (($nitems > 5) && ($item % 2))) {
echo " \n";
$row_open++;
}
echo " ";
if ($pic && $pic_width && $pic_height) {
echo " ";
}
else {
echo " ";
}
echo " \n"
. " \n"
. " \n"
. " $desc\n"
. "
\n"
. " \n";
if (($nitems < 5)
|| (($nitems > 5) && (! ($item % 2)))) {
echo " \n";
$row_open = 0;
}
}
if ($last) {
echo "
\n";
}
}
?>