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

Back to archive index

Minahito minah****@users*****
2006年 11月 7日 (火) 17:04:31 JST


Index: xoops2jp/html/modules/base/preload/index.html
diff -u xoops2jp/html/modules/base/preload/index.html:1.1.2.1 xoops2jp/html/modules/base/preload/index.html:removed
--- xoops2jp/html/modules/base/preload/index.html:1.1.2.1	Mon Mar 27 11:41:46 2006
+++ xoops2jp/html/modules/base/preload/index.html	Tue Nov  7 17:04:31 2006
@@ -1 +0,0 @@
- <script>history.go(-1);</script>
\ No newline at end of file
Index: xoops2jp/html/modules/base/preload/Wating.class.php
diff -u xoops2jp/html/modules/base/preload/Wating.class.php:1.1.2.2.2.1 xoops2jp/html/modules/base/preload/Wating.class.php:removed
--- xoops2jp/html/modules/base/preload/Wating.class.php:1.1.2.2.2.1	Thu Oct 12 21:53:14 2006
+++ xoops2jp/html/modules/base/preload/Wating.class.php	Tue Nov  7 17:04:31 2006
@@ -1,90 +0,0 @@
-<?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/base/admin/index.php?action=CommentList&amp;com_modid=0&amp;com_status=1";
-            list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result);
-            $blockVal['lang_linkname'] =_MB_BASE_COMPEND;
-            $modules[] = $blockVal;
-        }
-    }
-}
-?>
Index: xoops2jp/html/modules/base/preload/IPbanningFilter.class.php
diff -u xoops2jp/html/modules/base/preload/IPbanningFilter.class.php:1.1.2.2.2.1 xoops2jp/html/modules/base/preload/IPbanningFilter.class.php:removed
--- xoops2jp/html/modules/base/preload/IPbanningFilter.class.php:1.1.2.2.2.1	Sun Oct  8 21:15:23 2006
+++ xoops2jp/html/modules/base/preload/IPbanningFilter.class.php	Tue Nov  7 17:04:31 2006
@@ -1,29 +0,0 @@
-<?php
-/**
- * @package Legacy
- * @version $Id: IPbanningFilter.class.php,v 1.1.2.2.2.1 2006/10/08 12:15:23 nobunobu Exp $
- */
-
-if (!defined('XOOPS_ROOT_PATH')) exit();
-
-/**
- * This burns the access from the specific IP address, which is specified at
- * the preference.
- */
-class Base_IPbanningFilter extends XCube_ActionFilter
-{
-	function preBlockFilter()
-	{
-		if ($this->mRoot->mContext->getXoopsConfig('enable_badips')) {
-			if (isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR']) {
-				foreach ($this->mController->mConfig['bad_ips'] as $bi) {
-					if(!empty($bi) && strstr($_SERVER['REMOTE_ADDR'], $bi)!==false) {
-						die();
-					}
-				}
-			}
-		}
-	}
-}
-
-?>
\ No newline at end of file
Index: xoops2jp/html/modules/base/preload/IndexRedirector.class.php
diff -u xoops2jp/html/modules/base/preload/IndexRedirector.class.php:1.1.2.1.2.1 xoops2jp/html/modules/base/preload/IndexRedirector.class.php:removed
--- xoops2jp/html/modules/base/preload/IndexRedirector.class.php:1.1.2.1.2.1	Thu Oct  5 19:18:13 2006
+++ xoops2jp/html/modules/base/preload/IndexRedirector.class.php	Tue Nov  7 17:04:31 2006
@@ -1,28 +0,0 @@
-<?php
-/**
- * @version $Id$
- */
-
-if (!defined('XOOPS_ROOT_PATH')) exit();
-
-class Base_IndexRedirector extends XCube_ActionFilter
-{
-	function preBlockFilter()
-	{
-		$this->mController->mRoot->mDelegateManager->add("Legacypage.Top.Access", array(&$this, "redirect"));
-	}
-
-	function redirect()
-	{
-		$startPage = $this->mRoot->mContext->getXoopsConfig('startpage');
-		if ($startPage != null && $startPage != "--") {
-			$handler =& xoops_gethandler('module');
-			$module =& $handler->get($startPage);
-			if (is_object($module)) {
-				$this->mController->executeForward(XOOPS_URL . '/modules/' . $module->getShow('dirname') . '/');
-			}
-		}
-	}
-}
-
-?>
\ No newline at end of file
Index: xoops2jp/html/modules/base/preload/ThemeSelect.class.php
diff -u xoops2jp/html/modules/base/preload/ThemeSelect.class.php:1.1.2.8.2.2 xoops2jp/html/modules/base/preload/ThemeSelect.class.php:removed
--- xoops2jp/html/modules/base/preload/ThemeSelect.class.php:1.1.2.8.2.2	Thu Oct  5 19:18:12 2006
+++ xoops2jp/html/modules/base/preload/ThemeSelect.class.php	Tue Nov  7 17:04:31 2006
@@ -1,72 +0,0 @@
-<?php
-/**
- * @package Legacy
- * @version $Id: ThemeSelect.class.php,v 1.1.2.8.2.2 2006/10/05 10:18:12 minahito Exp $
- */
-
-if (!defined('XOOPS_ROOT_PATH')) exit();
-
-/**
- * Theme select mechanism is that base knows the method to change themes
- * without RenderSystem. So this class uses delegate to check whether the
- * specified theme is selectable. Functions should be added to this delegate in
- * constructor, because the delegate is called in preBlockFilter().
- */
-class Base_ThemeSelect extends XCube_ActionFilter
-{
-	/**
-	 * @var XCube_Delegate
-	 */
-	var $mIsSelectableTheme = null;
-	
-	function Base_ThemeSelect(&$controller)
-	{
-		//
-		// TODO remove
-		//
-		parent::XCube_ActionFilter($controller);
-		$this->mIsSelectableTheme =& new XCube_Delegate();
-		$this->mIsSelectableTheme->register('Base_ThemeSelect.IsSelectableTheme');
-		
-		$controller->mSetupUser->add(array(&$this, 'doChangeTheme'));
-	}
-	
-	function preBlockFilter()
-	{
-		$this->mController->mRoot->mDelegateManager->add("Site.CheckLogin.Success", "Base_ThemeSelect::callbackCheckLoginSuccess");
-	}
-	
-	/**
-	 * Because this process needs sessions, this functions is added to
-	 * SiteLogin event.
-	 * 
-	 * @param XoopsUser $xoopsUser Must parameter, because this is added to login event.
-	 */
-	function doChangeTheme(&$principal, &$controller, &$context)
-	{
-		if (!empty($_POST['xoops_theme_select']) && $this->_isSelectableTheme($_POST['xoops_theme_select'])) {
-			$this->mController->setTheme($_POST['xoops_theme_select']);
-			$_SESSION['xoopsUserTheme'] = $_POST['xoops_theme_select'];
-		} elseif (!empty($_SESSION['xoopsUserTheme']) && $this->_isSelectableTheme($_SESSION['xoopsUserTheme'])) {
-			$this->mController->setTheme($_SESSION['xoopsUserTheme']);
-		}
-	}
-
-	function callbackCheckLoginSuccess(&$xoopsUser)
-	{
-		//
-		// Check Theme and set it to session.
-		//
-		$userTheme = $xoopsUser->get('theme');
-		if (is_array($userTheme) && in_array($userTheme, $this->mRoot->mContext->getXoopsConfig('theme_set_allowed'))) {
-			$_SESSION['xoopsUserTheme'] = $userTheme;
-		}
-	}
-	
-	function _isSelectableTheme($theme_name)
-	{
-		return in_array($theme_name, $this->mRoot->mContext->getXoopsConfig('theme_set_allowed'));
-	}
-}
-
-?>
\ No newline at end of file


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