[xoops-cvslog 699] CVS update: xoops2jp/html/modules/base/class/common

Zurück zum Archiv-Index

Minahito minah****@users*****
2005年 10月 27日 (木) 20:03:43 JST


Index: xoops2jp/html/modules/base/class/common/ModulePreProc.class.php
diff -u xoops2jp/html/modules/base/class/common/ModulePreProc.class.php:1.1.4.3 xoops2jp/html/modules/base/class/common/ModulePreProc.class.php:removed
--- xoops2jp/html/modules/base/class/common/ModulePreProc.class.php:1.1.4.3	Tue Oct 25 19:58:47 2005
+++ xoops2jp/html/modules/base/class/common/ModulePreProc.class.php	Thu Oct 27 20:03:43 2005
@@ -1,143 +0,0 @@
-<?php
-// $Id: ModulePreProc.class.php,v 1.1.4.3 2005/10/25 10:58:47 minahito Exp $
-//  ------------------------------------------------------------------------ //
-//                XOOPS - PHP Content Management System                      //
-//                    Copyright (c) 2000 XOOPS.org                           //
-//                       <http://www.xoops.org/>                             //
-//  ------------------------------------------------------------------------ //
-//  This program is free software; you can redistribute it and/or modify     //
-//  it under the terms of the GNU General Public License as published by     //
-//  the Free Software Foundation; either version 2 of the License, or        //
-//  (at your option) any later version.                                      //
-//                                                                           //
-//  You may not change or alter any portion of this comment or credits       //
-//  of supporting developers from this source code or any supporting         //
-//  source code which is considered copyrighted (c) material of the          //
-//  original comment or credit authors.                                      //
-//                                                                           //
-//  This program is distributed in the hope that it will be useful,          //
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
-//  GNU General Public License for more details.                             //
-//                                                                           //
-//  You should have received a copy of the GNU General Public License        //
-//  along with this program; if not, write to the Free Software              //
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
-//  ------------------------------------------------------------------------ //
-
-class ModulePreProc
-{
-	var $mXoopsUser;
-	var $mXoopsModule;
-	var $mXoopsConfig;
-
-	function ModulePreProc(&$xoopsUser,&$xoopsConfig)
-	{
-		$this->mXoopsUser=&$xoopsUser;
-		$this->mXoopsConfig=&$xoopsConfig;
-	}
-
-	/**
-	is Module process ?
-	*/
-	function isExecute()
-	{
-		return file_exists('./xoops_version.php');
-	}
-
-	function fetchDirname()
-	{
-	    $url_arr = explode('/',strstr($_SERVER['REQUEST_URI'],'/modules/'));
-	    return $url_arr[2];
-	}
-
-	function &fetchModuleObject()
-	{
-		if(!is_object($this->mXoopsModule)) {
-		    $module_handler =& xoops_gethandler('module');
-		    $this->mXoopsModule = $module_handler->getByDirname($this->fetchDirname());
-		}
-	    return $this->mXoopsModule;
-	}
-	
-	function &getModuleObject()
-	{
-		return $this->mXoopsModule;
-	}
-	
-	function processErrorModuleNotExist()
-	{
-        require_once XOOPS_ROOT_PATH."/header.php";
-        echo "<h4>"._MODULENOEXIST."</h4>";
-        require_once XOOPS_ROOT_PATH."/footer.php";
-        exit();
-	}
-	
-	function execute()
-	{
-		$this->fetchModuleObject();
-
-		if(!is_object($this->mXoopsModule) || !$this->mXoopsModule->getVar('isactive'))
-			$this->processErrorModuleNotExist();
-
-		$this->checkPermission();
-		$this->loadMessageCatalog($this->mXoopsConfig['language']);
-
-		//-----------------------
-		// Set to global variable
-		//-----------------------
-		$GLOBALS['xoopsUserIsAdmin']=$this->isModuleAdmin();
-		$GLOBALS['xoopsModule']=&$this->getModuleObject();
-		$GLOBALS['xoopsModuleConfig']=&$this->getModuleConfig();
-	}
-
-	function checkPermission()
-	{
-		$moduleperm_handler =& xoops_gethandler('groupperm');
-
-		if(is_object($this->mXoopsUser)) {
-			$groups=$this->mXoopsUser->getGroups();
-		}
-		else {
-			$groups=XOOPS_GROUP_ANONYMOUS;
-		}
-		
-		if (!$moduleperm_handler->checkRight('module_read', $this->mXoopsModule->getVar('mid'), $groups)) {
-			/// @todo We need measures to an infinite loop
-			XCubeUtils::redirectHeader(XOOPS_URL,1,_NOPERM);
-		}
-	}
-
-	function isModuleAdmin()
-	{
-		$adminFlag=false;
-		if(is_object($this->mXoopsUser))
-			$adminFlag = $this->mXoopsUser->isAdmin($this->mXoopsModule->getVar('mid'));
-
-		return $adminFlag;
-	}
-	
-	function loadMessageCatalog($language)
-	{
-		// load message catalog of modules.
-		if ( file_exists(XOOPS_ROOT_PATH."/modules/".$this->mXoopsModule->getVar('dirname')."/language/".$language."/main.php") ) {
-			require_once XOOPS_ROOT_PATH."/modules/".$this->mXoopsModule->getVar('dirname')."/language/".$language."/main.php";
-		} else {
-			if ( file_exists(XOOPS_ROOT_PATH."/modules/".$this->mXoopsModule->getVar('dirname')."/language/english/main.php") ) {
-				require_once XOOPS_ROOT_PATH."/modules/".$this->mXoopsModule->getVar('dirname')."/language/english/main.php";
-			}
-		}
-	}
-	
-	function &getModuleConfig()
-	{
-		$ret=null;
-		if ($this->mXoopsModule->getVar('hasconfig') == 1 || $this->mXoopsModule->getVar('hascomments') == 1 || $this->mXoopsModule->getVar( 'hasnotification' ) == 1) {
-			$configHandler =& xoops_gethandler('config');
-			$ret=& $configHandler->getConfigsByCat(0, $this->mXoopsModule->getVar('mid'));
-		}
-		return $ret;
-	}
-}
-
-?>
\ No newline at end of file
Index: xoops2jp/html/modules/base/class/common/SiteCloseProc.class.php
diff -u xoops2jp/html/modules/base/class/common/SiteCloseProc.class.php:1.1.4.2 xoops2jp/html/modules/base/class/common/SiteCloseProc.class.php:removed
--- xoops2jp/html/modules/base/class/common/SiteCloseProc.class.php:1.1.4.2	Sun Oct 23 16:03:25 2005
+++ xoops2jp/html/modules/base/class/common/SiteCloseProc.class.php	Thu Oct 27 20:03:43 2005
@@ -1,72 +0,0 @@
-<?php
-// $Id: SiteCloseProc.class.php,v 1.1.4.2 2005/10/23 07:03:25 minahito Exp $
-//  ------------------------------------------------------------------------ //
-//                XOOPS - PHP Content Management System                      //
-//                    Copyright (c) 2000 XOOPS.org                           //
-//                       <http://www.xoops.org/>                             //
-//  ------------------------------------------------------------------------ //
-//  This program is free software; you can redistribute it and/or modify     //
-//  it under the terms of the GNU General Public License as published by     //
-//  the Free Software Foundation; either version 2 of the License, or        //
-//  (at your option) any later version.                                      //
-//                                                                           //
-//  You may not change or alter any portion of this comment or credits       //
-//  of supporting developers from this source code or any supporting         //
-//  source code which is considered copyrighted (c) material of the          //
-//  original comment or credit authors.                                      //
-//                                                                           //
-//  This program is distributed in the hope that it will be useful,          //
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
-//  GNU General Public License for more details.                             //
-//                                                                           //
-//  You should have received a copy of the GNU General Public License        //
-//  along with this program; if not, write to the Free Software              //
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
-//  ------------------------------------------------------------------------ //
-
-class SiteCloseProc
-{
-	var $mXoopsUser;
-	var $mXoopsConfig;
-	
-	function SiteCloseProc(&$xoopsUser,&$xoopsConfig)
-	{
-		$this->mXoopsUser=&$xoopsUser;
-		$this->mXoopsConfig=&$xoopsConfig;
-	}
-	
-	function isExecute()
-	{
-		return ($this->mXoopsConfig['closesite']==1);
-	}
-	
-	function execute()
-	{
-	    $accessAllowFlag = false;
-
-		if(is_object($this->mXoopsUser)) {
-			foreach ($this->mXoopsUser->getGroups() as $group) {
-				if (in_array($group, $this->mXoopsConfig['closesite_okgrp']) || XOOPS_GROUP_ADMIN == $group) {
-					$allowed = true;
-					break;
-				}
-			}
-		}
-		elseif(!empty($_POST['xoops_login'])) {
-	        require_once XOOPS_ROOT_PATH.'/include/checklogin.php';
-	        exit();
-	    }
-
-	    if (!$accessAllowFlag) {
-	        include_once XOOPS_ROOT_PATH.'/class/template.php';
-	        $xoopsTpl = new XoopsTpl();
-	        $xoopsTpl->assign(array('xoops_sitename' => htmlspecialchars($this->mXoopsConfig['sitename']), 'xoops_themecss' => xoops_getcss(), 'xoops_imageurl' => XOOPS_THEME_URL.'/'.$this->mXoopsConfig['theme_set'].'/', 'lang_login' => _LOGIN, 'lang_username' => _USERNAME, 'lang_password' => _PASSWORD, 'lang_siteclosemsg' => $this->mXoopsConfig['closesite_text']));
-	        $xoopsTpl->xoops_setCaching(1);
-	        $xoopsTpl->display('db:system_siteclosed.html');
-	        exit();
-	    }
-	}
-}
-
-?>
\ No newline at end of file
Index: xoops2jp/html/modules/base/class/common/ThemeSelectProc.class.php
diff -u xoops2jp/html/modules/base/class/common/ThemeSelectProc.class.php:1.1.4.1 xoops2jp/html/modules/base/class/common/ThemeSelectProc.class.php:removed
--- xoops2jp/html/modules/base/class/common/ThemeSelectProc.class.php:1.1.4.1	Wed Oct 19 17:01:05 2005
+++ xoops2jp/html/modules/base/class/common/ThemeSelectProc.class.php	Thu Oct 27 20:03:43 2005
@@ -1,55 +0,0 @@
-<?php
-// $Id: ThemeSelectProc.class.php,v 1.1.4.1 2005/10/19 08:01:05 minahito Exp $
-//  ------------------------------------------------------------------------ //
-//                XOOPS - PHP Content Management System                      //
-//                    Copyright (c) 2000 XOOPS.org                           //
-//                       <http://www.xoops.org/>                             //
-//  ------------------------------------------------------------------------ //
-//  This program is free software; you can redistribute it and/or modify     //
-//  it under the terms of the GNU General Public License as published by     //
-//  the Free Software Foundation; either version 2 of the License, or        //
-//  (at your option) any later version.                                      //
-//                                                                           //
-//  You may not change or alter any portion of this comment or credits       //
-//  of supporting developers from this source code or any supporting         //
-//  source code which is considered copyrighted (c) material of the          //
-//  original comment or credit authors.                                      //
-//                                                                           //
-//  This program is distributed in the hope that it will be useful,          //
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
-//  GNU General Public License for more details.                             //
-//                                                                           //
-//  You should have received a copy of the GNU General Public License        //
-//  along with this program; if not, write to the Free Software              //
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
-//  ------------------------------------------------------------------------ //
-
-class ThemeSelectProc
-{
-	var $mXoopsUser;
-	var $mXoopsConfig;
-	
-	function ThemeSelectProc(&$xoopsUser,&$xoopsConfig)
-	{
-		$this->mXoopsUser=&$xoopsUser;
-		$this->mXoopsConfig=&$xoopsConfig;
-	}
-
-	function isExecute()
-	{
-		return true;
-	}
-	
-	function execute()
-	{
-		if (!empty($_POST['xoops_theme_select']) && in_array($_POST['xoops_theme_select'], $this->mXoopsConfig['theme_set_allowed'])) {
-			$this->mXoopsConfig['theme_set'] = $_POST['xoops_theme_select'];
-			$_SESSION['xoopsUserTheme'] = $_POST['xoops_theme_select'];
-		} elseif (!empty($_SESSION['xoopsUserTheme']) && in_array($_SESSION['xoopsUserTheme'], $this->mXoopsConfig['theme_set_allowed'])) {
-			$this->mXoopsConfig['theme_set'] = $_SESSION['xoopsUserTheme'];
-		}
-	}
-}
-
-?>
\ No newline at end of file


xoops-cvslog メーリングリストの案内
Zurück zum Archiv-Index