Ejemplo n.º 1
0
function b_system_waiting_show()
{
    global $xoopsDB, $xoopsUser;
    $block = array();
    $block['title'] = _MB_SYSTEM_WCNT;
    $block['content'] = "";
    if (XoopsModule::moduleExists("news")) {
        $result = $xoopsDB->query("SELECT COUNT(*) FROM " . $xoopsDB->prefix("stories") . " WHERE published=0");
        if ($result) {
            list($num) = $xoopsDB->fetchRow($result);
            $block['content'] .= "<strong><big>&middot;</big></strong>&nbsp;<a href='" . XOOPS_URL . "/modules/news/admin/index.php?op=newarticle'>" . _MB_SYSTEM_SUBMS . "</a>: {$num}<br />\n";
        }
    }
    if (XoopsModule::moduleExists("mylinks")) {
        $result = $xoopsDB->query("SELECT COUNT(*) FROM " . $xoopsDB->prefix("mylinks_links") . " WHERE status=0");
        if ($result) {
            list($num) = $xoopsDB->fetchRow($result);
            $block['content'] .= "<strong><big>&middot;</big></strong>&nbsp;<a href='" . XOOPS_URL . "/modules/mylinks/admin/index.php?op=listNewLinks'>" . _MB_SYSTEM_WLNKS . "</a>: {$num}<br />\n";
        }
        $result = $xoopsDB->query("SELECT COUNT(*) FROM " . $xoopsDB->prefix("mylinks_broken") . "");
        if ($result) {
            list($totalbrokenlinks) = $xoopsDB->fetchRow($result);
            $block['content'] .= "<strong><big>&middot;</big></strong>&nbsp;<a href='" . XOOPS_URL . "/modules/mylinks/admin/index.php?op=listBrokenLinks'>" . _MB_SYSTEM_BLNK . "</a>: {$totalbrokenlinks}<br />\n";
        }
        $result = $xoopsDB->query("SELECT COUNT(*) FROM " . $xoopsDB->prefix("mylinks_mod") . "");
        if ($result) {
            list($totalmodrequests) = $xoopsDB->fetchRow($result);
            $block['content'] .= "<strong><big>&middot;</big></strong>&nbsp;<a href='" . XOOPS_URL . "/modules/mylinks/admin/index.php?op=listModReq'>" . _MB_SYSTEM_MLNKS . "</a>: {$totalmodrequests}<br />\n";
        }
    }
    if (XoopsModule::moduleExists("mydownloads")) {
        $result = $xoopsDB->query("SELECT COUNT(*) FROM " . $xoopsDB->prefix("mydownloads_downloads") . " WHERE status=0");
        if ($result) {
            list($num) = $xoopsDB->fetchRow($result);
            $block['content'] .= "<strong><big>&middot;</big></strong>&nbsp;<a href='" . XOOPS_URL . "/modules/mydownloads/admin/index.php?op=listNewDownloads'>" . _MB_SYSTEM_WDLS . "</a>: {$num}<br />\n";
        }
        $result = $xoopsDB->query("SELECT COUNT(*) FROM " . $xoopsDB->prefix("mydownloads_broken") . "");
        if ($result) {
            list($totalbrokenfiles) = $xoopsDB->fetchRow($result);
            $block['content'] .= "<strong><big>&middot;</big></strong>&nbsp;<a href='" . XOOPS_URL . "/modules/mydownloads/admin/index.php?op=listBrokenDownloads'>" . _MB_SYSTEM_BFLS . "</a>: {$totalbrokenfiles}<br />\n";
        }
        $result = $xoopsDB->query("SELECT COUNT(*) FROM " . $xoopsDB->prefix("mydownloads_mod") . "");
        if ($result) {
            list($totalmodrequests) = $xoopsDB->fetchRow($result);
            $block['content'] .= "<strong><big>&middot;</big></strong>&nbsp;<a href='" . XOOPS_URL . "/modules/mydownloads/admin/index.php?op=listModReq'>" . _MB_SYSTEM_MFLS . "</a>: {$totalmodrequests}<br />\n";
        }
    }
    if (XoopsModule::moduleExists("tutorials")) {
        $result = $xoopsDB->query("SELECT COUNT(*) FROM " . $xoopsDB->prefix("tutorials") . " WHERE status=0");
        if ($result) {
            list($num) = $xoopsDB->fetchRow($result);
            $block['content'] .= "<strong><big>&middot;</big></strong>&nbsp;<a href='" . XOOPS_URL . "/modules/tutorials/admin/index.php'>" . _MB_SYSTEM_WTLS . "</a>: {$num}<br />\n";
        }
    }
    return $block;
}