<?
/*
| 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]/adminfun.inc";
common_header();
if ($psid) {
$Results = do_mysql_query("SELECT * FROM pending_stories WHERE id='$psid'")
or die("I could not SELECT FROM the database\n");
$Row = mysql_fetch_array($Results);
mysql_free_result($Results);
print "<tr>\n";
print " <th>\n";
print " $Row[headline]\n";
print " </th>\n";
print "</tr>\n";
print "<tr>\n";
print " <td>\n";
print " <blockquote>$Row[story]</blockquote>\n";
print " </td>\n";
print "</tr>\n";
print "<tr>\n";
print " <td>\n";
print " \n";
print " </td>\n";
print "</tr>\n";
print "<tr>\n";
print " <td>\n";
print " <a href=\"/new_stories.php\">\n";
print " Return to the story queue\n";
print " </a>\n";
print " </td>\n";
print "</tr>\n";
} else {
$Results = do_mysql_query("SELECT count(*) FROM pending_stories")
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) {
print "<tr>\n";
print " <td>\n";
print " The current number of stories in the queue is $count.\n";
print " </td>\n";
print "</tr>\n";
$Results = do_mysql_query("SELECT * FROM pending_stories")
or die("I could not SELECT FROM the database\n");
while ($Row = mysql_fetch_array($Results)) {
$user = get_user_info($Row[poster]);
print "<tr>\n";
print " <td>\n";
print " <a href=\"/new_stories.php?psid=$Row[id]\">\n";
print " $Row[headline] -- Submitted by $user[nickname]\n";
print " </a>\n";
print " </td>\n";
print "</tr>\n";
}
} else {
print "<tr>\n";
print " <td>\n";
print " There are currently no stories in the queue.\n";
print " </td>\n";
print "</tr>\n";
}
}
common_footer();
?>