From 4ffd2190bfe71847fb19f3338c63ba5f3abe86f8 Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Tue, 9 Nov 2004 22:33:54 +0000 Subject: [PATCH] Show the number of applications that are in the submission queue next to the "View app queue" link so admins don't have to view the queue to see if there is anything that needs to be processed. --- include/sidebar_admin.php | 2 +- include/util.php | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/include/sidebar_admin.php b/include/sidebar_admin.php index 6915859..b8034ad 100644 --- a/include/sidebar_admin.php +++ b/include/sidebar_admin.php @@ -17,7 +17,7 @@ function global_admin_menu() { $g->addmisc(" "); $g->add("List Users", $apidb_root."admin/"); - $g->add("View App Queue", $apidb_root."admin/adminAppQueue.php"); + $g->add("View App Queue (".getQueuedAppCount().")", $apidb_root."admin/adminAppQueue.php"); $g->done(); diff --git a/include/util.php b/include/util.php index 582f266..7fb03e5 100644 --- a/include/util.php +++ b/include/util.php @@ -171,4 +171,13 @@ function get_xml_tag ($file, $mode = null) } } +/* get the number of applications in the appQueue table */ +function getQueuedAppCount() +{ + $qstring = "SELECT count(*) as queued_apps FROM appQueue"; + $result = mysql_query($qstring); + $ob = mysql_fetch_object($result); + return $ob->queued_apps; +} + ?>