From 4216b5f90616ee17e4d7690706d5b701c7eec355 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Tue, 18 May 2004 12:13:51 +0000 Subject: [PATCH] Add unpublished articles to account page. Add skeleton faq page. --- www/account.php | 44 +++++++++++++++++++++++++++++++++++++++++--- www/faq.php | 20 ++++++++++++++++++++ 2 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 www/faq.php diff --git a/www/account.php b/www/account.php index 4e062b0..137f54d 100644 --- a/www/account.php +++ b/www/account.php @@ -1,6 +1,6 @@ New/Pending Articles:\n"); - print("

No new/pending articles found.

\n"); + $result = db_query("SELECT * FROM article WHERE is_published = 0 " + ."ORDER BY modify_date"); + $count = db_count($result); + + if ($count == 0) + print("

No new/pending articles found.

\n"); + else + { + html_start_table(array("Id", "Title", "Last Updated")); + + while ($row = db_next($result)) + { + $id = $row['id']; + $title = htmlspecialchars($row['title'], ENT_QUOTES); + $abstract = htmlspecialchars($row['abstract'], ENT_QUOTES); + $date = date("M d, Y", $row['modify_date']); + + html_start_row(); + + print("$id" + ."$title" + ."$date"); + + html_end_row(); + + html_start_row(); + + print("$abstract"); + + html_end_row(); + } + + html_end_table(); + } + + db_free($result); print("

New/Pending STRs:

\n"); @@ -145,6 +183,6 @@ switch ($op) // -// End of "$Id: account.php,v 1.2 2004/05/18 01:39:00 mike Exp $". +// End of "$Id: account.php,v 1.3 2004/05/18 12:13:51 mike Exp $". // ?> diff --git a/www/faq.php b/www/faq.php new file mode 100644 index 0000000..cbed5eb --- /dev/null +++ b/www/faq.php @@ -0,0 +1,20 @@ +