<?
/*
| This file is part of the Igloo Weblog system.
| Igloo is available under the GNU General Public
| License. For details on the GNU General Public
| License, read the COPYING or the LICENSE file
| that you received with this distribution. If
| you did not receive one of these files with the
| distribution, you can find more information at
| http://www.gnu.org.
|
| Igloo is the creation of Brad Johnson. It is not
| based on any other works. Brad Johnson is the
| sole owner of the copyright, but he welcomes all
| to take the software, use it, modify it, change
| it, or to do whatever they can do with it under
| the provisions of the GNU General Public License.
|
| This software is provided as-is, with no warranty
| whatsoever. The author is not responsible for
| anything that may happen as a result of your
| using this software unless you have purchased an
| extended warranty. If you would like to
| purchase an extended warranty, please contact
| Brad Johnson via e-mail at hide@address.com
|
| This software may destroy your system, date your
| sister, drink your beer, eat the last of the
| potato chips, cause Democrats to get elected,
| kick your dog, burn your house, wreck your car,
| cause nuclear war, force you to kiss your
| grandmother, or make you eat brussel sprouts.
| You have been warned.
|
| If it breaks, you may feel free to keep both
| pieces.
*/
require "config.inc";
require "$config[private]/local.inc";
require "$config[private]/storyfun.inc";
common_header();
/*
* now that the requires and the header is out of the
* way, you can start writing!
* the first table row should start on col 26, fool!
*/
$Results = do_mysql_query("SELECT count(*) FROM stories WHERE topic=5")
or die("I could not SELECT FROM the database\n");
$Row = mysql_fetch_array($Results);
mysql_free_result($Results);
$count = $Row[0];
if ($count > 0) {
$Results = do_mysql_query("SELECT * FROM stories WHERE topic=5 LIMIT 10")
or die("I could not SELECT FROM the database\n");
while ($Row = mysql_fetch_array($Results)) {
display_story($Row[id]);
}
} else {
print "<tr>\n";
print " <td>\n";
print " There are currently no stories about software\n";
print " </td>\n";
print "</tr>\n";
}
common_footer();
?>