当前位置: 首页>>代码示例>>PHP>>正文


PHP XoopsModule::moduleExists方法代码示例

本文整理汇总了PHP中XoopsModule::moduleExists方法的典型用法代码示例。如果您正苦于以下问题:PHP XoopsModule::moduleExists方法的具体用法?PHP XoopsModule::moduleExists怎么用?PHP XoopsModule::moduleExists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在XoopsModule的用法示例。


在下文中一共展示了XoopsModule::moduleExists方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: b_system_waiting_show

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;
}
开发者ID:carriercomm,项目名称:WebMail,代码行数:56,代码来源:system_blocks.php


注:本文中的XoopsModule::moduleExists方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。