[xoops-cvslog 3443] CVS update: xoops2jp/html/modules/base/preload

Back to archive index

NobuNobu nobun****@users*****
2006年 7月 8日 (土) 11:20:44 JST


Index: xoops2jp/html/modules/base/preload/Wating.class.php
diff -u /dev/null xoops2jp/html/modules/base/preload/Wating.class.php:1.1.2.1
--- /dev/null	Sat Jul  8 11:20:44 2006
+++ xoops2jp/html/modules/base/preload/Wating.class.php	Sat Jul  8 11:20:43 2006
@@ -0,0 +1,90 @@
+<?php
+
+if (!defined('XOOPS_ROOT_PATH')) exit();
+
+class Base_Wating extends XCube_ActionFilter {
+    function preBlockFilter()
+    {
+        $this->mController->mRoot->mDelegateManager->add('Legacyblock.Wating.Show',array(&$this,"callbackWatingShow"));
+    }
+    
+    function callbackWatingShow(&$modules) {
+        $xoopsDB =& Database::getInstance();
+        // for News Module
+        $module_handler =& xoops_gethandler('module');
+        if ($module_handler->getCount(new Criteria('dirname', 'news'))) {
+            $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("stories")." WHERE published=0");
+            if ( $result ) {
+                $blockVal = array();
+                $blockVal['adminlink'] = XOOPS_URL."/modules/news/admin/index.php?op=newarticle";
+                list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result);
+                $blockVal['lang_linkname'] = _MB_BASE_SUBMS;
+                $modules = $blockVal;
+            }
+        }
+        // for MyLinks Module
+        if ($module_handler->getCount(new Criteria('dirname', 'mylinks'))) {
+            $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mylinks_links")." WHERE status=0");
+            if ( $result ) {
+                $blockVal = array();
+                $blockVal['adminlink'] = XOOPS_URL."/modules/mylinks/admin/index.php?op=listNewLinks";
+                list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result);
+                $blockVal['lang_linkname'] = _MB_BASE_WLNKS;
+                $modules[] = $blockVal;
+            }
+            $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mylinks_broken"));
+            if ( $result ) {
+                $blockVal = array();
+                $blockVal['adminlink'] = XOOPS_URL."/modules/mylinks/admin/index.php?op=listBrokenLinks";
+                list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result);
+                $blockVal['lang_linkname'] = _MB_BASE_BLNK;
+                $modules[] = $blockVal;
+            }
+            $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mylinks_mod"));
+            if ( $result ) {
+                $blockVal = array();
+                $blockVal['adminlink'] = XOOPS_URL."/modules/mylinks/admin/index.php?op=listModReq";
+                list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result);
+                $blockVal['lang_linkname'] = _MB_BASE_MLNKS;
+                $modules[] = $blockVal;
+            }
+        }
+        // for MyDownloads Modules
+        if ($module_handler->getCount(new Criteria('dirname', 'mydownloads'))) {
+            $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mydownloads_downloads")." WHERE status=0");
+            if ( $result ) {
+                $blockVal = array();
+                $blockVal['adminlink'] = XOOPS_URL."/modules/mydownloads/admin/index.php?op=listNewDownloads";
+                list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result);
+                $blockVal['lang_linkname'] = _MB_BASE_WDLS;
+                $modules[] = $blockVal;
+            }
+            $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mydownloads_broken")."");
+            if ( $result ) {
+                $blockVal = array();
+                $blockVal['adminlink'] = XOOPS_URL."/modules/mydownloads/admin/index.php?op=listBrokenDownloads";
+                list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result);
+                $blockVal['lang_linkname'] = _MB_BASE_BFLS;
+                $modules[] = $blockVal;
+            }
+            $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mydownloads_mod")."");
+            if ( $result ) {
+                $blockVal = array();
+                $blockVal['adminlink'] = XOOPS_URL."/modules/mydownloads/admin/index.php?op=listModReq";
+                list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result);
+                $blockVal['lang_linkname'] = _MB_BASE_MFLS;
+                $modules[] = $blockVal;
+            }
+        }
+        // for Comments
+        $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("xoopscomments")." WHERE com_status=1");
+        if ( $result ) {
+            $blockVal = array();
+            $blockVal['adminlink'] = XOOPS_URL."/modules/system/admin.php?module=0&amp;status=1&amp;fct=comments";
+            list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result);
+            $blockVal['lang_linkname'] =_MB_BASE_COMPEND;
+            $modules[] = $blockVal;
+        }
+    }
+}
+?>


xoops-cvslog メーリングリストの案内
Back to archive index