<?php
//v1.0.4 www.bcoos.net 2006/10 GPL
//v1.3 www.exoops.info 2006/03 
// $Id: waiting.inc.php,v 1.2 2004/03/20 18:35:12 greyhead Exp $
// ------------------------------------------------------------------------- //
//               E-Xoops: Content Management for the Masses                  //
//                       < http://www.e-xoops.com >                          //
// ------------------------------------------------------------------------- //
// Original Author: Half-Dead
// Author Website : http://www.e-xoops.com
// License Type   : LGPL: See /manual/LICENSES/LGPL.txt
// ------------------------------------------------------------------------- //
// Passed on      : My Downloads
// New module name: My Sections
// Version        : 1.1
// Modified by    : Faisal
// Website        : < http://www.a-xoops.com >
// Email          : info@a-xoops.com
// ------------------------------------------------------------------------- //
//---------------------------------------------------------------------------------------//
/**
* Description
*
* @param type $var description
* @return type description
*/
function mysections_waiting() {
global $db,$bcoosConfig;
$count   = 0;
$waiting = array();
$result = $db->query("SELECT COUNT(*) FROM ".$db->prefix("mysections_articles")." WHERE status=0");
if ($result) {
        list($num) = $db->fetchRow($result);
        $num = intval($num);
        if ($num > 0) {
                $waiting[$count]['image'] = XOOPS_URL."/images/icons/".$bcoosConfig['iconset']."menu_pointer.gif";
                $waiting[$count]['link']  = XOOPS_URL."/modules/mysections/admin/index.php?op=listNewDownloads";
                $waiting[$count]['text']  = _MB_MYSECTIONS_WDLS;
                $waiting[$count]['count'] = $num;
                $count++;
        }
}
$result = $db->query("SELECT COUNT(*) FROM ".$db->prefix("mysections_broken")."");
if ($result) {
        list($num) = $db->fetchRow($result);
        $num = intval($num);
        if ($num > 0) {
                $waiting[$count]['image'] = XOOPS_URL."/images/icons/".$bcoosConfig['iconset']."menu_pointer.gif";
                $waiting[$count]['link']  = XOOPS_URL."/modules/mysections/admin/index.php?op=listBrokenDownloads";
                $waiting[$count]['text']  = _MB_MYSECTIONS_BFLS;
                $waiting[$count]['count'] = $num;
                $count++;
        }
}
$result = $db->query("SELECT COUNT(*) FROM ".$db->prefix("mysections_mod")."");
if ($result) {
        list($num) = $db->fetchRow($result);
        $num = intval($num);
        if ($num > 0) {
                $waiting[$count]['image'] = XOOPS_URL."/images/icons/".$bcoosConfig['iconset']."menu_pointer.gif";
                $waiting[$count]['link']  = XOOPS_URL."/modules/mysections/admin/index.php?op=listModReq";
                $waiting[$count]['text']  = _MB_MYSECTIONS_MFLS;
                $waiting[$count]['count'] = $num;
                $count++;
        }
}
return $waiting;
}
?>