diff -urN W:\diff\theme_changer_025/modules/theme_changer/blocks/theme.php W:\diff\theme_changer_026/modules/theme_changer/blocks/theme.php
--- W:\diff\theme_changer_025/modules/theme_changer/blocks/theme.php	2005-02-26 13:42:16.000000000 +0900
+++ W:\diff\theme_changer_026/modules/theme_changer/blocks/theme.php	2005-09-03 11:58:13.515625000 +0900
@@ -58,7 +58,7 @@
 		$block['content'] .= ( $theme_sum > 1 ) ? sprintf(_MB_X_THEMES, $theme_sum) : _MB_X_THEME ;
 	}
 	$block['content'] .= '</div>';
-	if( isset( $_POST['meutema'] ) ){
+	if( isset( $_POST['holdtheme'] ) ){
 		$otema = $_POST['xoops_theme_select'];
 		$uid = $xoopsUser->getVar('uid');
 		$atualiza_tema =& xoops_gethandler('member');
diff -urN W:\diff\theme_changer_025/modules/theme_changer/include/theme_changer_patch.php W:\diff\theme_changer_026/modules/theme_changer/include/theme_changer_patch.php
--- W:\diff\theme_changer_025/modules/theme_changer/include/theme_changer_patch.php	1970-01-01 09:00:00.000000000 +0900
+++ W:\diff\theme_changer_026/modules/theme_changer/include/theme_changer_patch.php	2005-09-03 12:58:23.109375000 +0900
@@ -0,0 +1,73 @@
+<?php
+//  ------------------------------------------------------------------------ //
+//                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 //
+//  ------------------------------------------------------------------------ //
+//            This module; ThemeChanger Copyright (c) 2005 suin              //
+//                          <http://www.suin.jp>                             //
+//  ------------------------------------------------------------------------ //
+
+if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+
+if( !file_exists(XOOPS_CACHE_PATH."/theme_changer_routine.php") ){
+
+	global $xoopsModule, $xoopsDB, $xoopsConfig;
+	$id = 0;
+	$talbe = $xoopsDB->prefix("ctem_pagelink");
+	
+	if ( preg_replace( '/\/$/', '', $_SERVER['DOCUMENT_ROOT'] ).$_SERVER['SCRIPT_NAME'] == XOOPS_ROOT_PATH.'/index.php'){
+		$id = 1;
+		$talbe = $xoopsDB->prefix("ctem_pagelink");
+	}elseif ( is_object($xoopsModule) ){
+		$id = $xoopsModule->getVar('mid');
+		$talbe = $xoopsDB->prefix("ctem_link");
+		
+		$sql = "SELECT COUNT(*) FROM $talbe WHERE lid='$id'";
+		list($count) = $xoopsDB->fetchRow( $xoopsDB->query($sql) );
+		if( $count == 0 ){
+			$id = 0;
+			$talbe = $xoopsDB->prefix("ctem_pagelink");
+		}
+	}
+	$sql = "SELECT theme FROM $talbe WHERE lid='$id'";
+	$result = $xoopsDB->query($sql);
+	list($theme) = $xoopsDB->fetchRow($result);
+
+	$xoopsConfig['theme_set']=$theme;
+
+}else{
+	global $xoopsModule, $xoopsConfig;
+
+	$id = 0;
+
+	if ( preg_replace( '/\/$/', '', $_SERVER['DOCUMENT_ROOT'] ).$_SERVER['SCRIPT_NAME'] == XOOPS_ROOT_PATH.'/index.php'){
+		$id = 1;
+	}elseif( is_object($xoopsModule) ){
+		$id = $xoopsModule->getVar('mid');
+	}
+
+	require( XOOPS_CACHE_PATH."/theme_changer_routine.php" );
+
+	$xoopsConfig['theme_set']=$theme;
+}
+?>
diff -urN W:\diff\theme_changer_025/modules/theme_changer/xoops_version.php W:\diff\theme_changer_026/modules/theme_changer/xoops_version.php
--- W:\diff\theme_changer_025/modules/theme_changer/xoops_version.php	2005-03-24 09:20:22.000000000 +0900
+++ W:\diff\theme_changer_026/modules/theme_changer/xoops_version.php	2005-09-03 12:05:28.515625000 +0900
@@ -31,7 +31,7 @@
 $mydirname = basename( dirname( __FILE__ ) ) ;
 
 $modversion['name'] 	   = _MI_THEMEC_NAME;
-$modversion['version']	   = 2.5;
+$modversion['version']	   = 2.6;
 $modversion['description'] = _MI_THEMEC_DESC;
 $modversion['help']	   = "ReadMe-Japanese.htm";
 $modversion['author']	   = "suin<br /><a href=\"http://www.suin.jp/\">www.suin.jp</a>";
diff -urN W:\diff\theme_changer_025/themes/z_changeable_theme/themechanger.php W:\diff\theme_changer_026/themes/z_changeable_theme/themechanger.php
--- W:\diff\theme_changer_025/themes/z_changeable_theme/themechanger.php	2005-03-22 15:46:50.000000000 +0900
+++ W:\diff\theme_changer_026/themes/z_changeable_theme/themechanger.php	2005-09-03 12:55:21.406250000 +0900
@@ -33,7 +33,7 @@
 	$id = 0;
 	$talbe = $xoopsDB->prefix("ctem_pagelink");
 	
-	if ($_SERVER['DOCUMENT_ROOT'].$_SERVER['SCRIPT_NAME'] == XOOPS_ROOT_PATH.'/index.php'){
+	if ( preg_replace( '/\/$/', '', $_SERVER['DOCUMENT_ROOT'] ).$_SERVER['SCRIPT_NAME'] == XOOPS_ROOT_PATH.'/index.php'){
 		$id = 1;
 		$talbe = $xoopsDB->prefix("ctem_pagelink");
 	}elseif ( is_object($xoopsModule) ){
@@ -54,9 +54,10 @@
 	
 	if( $theme!=$dir && file_exists( XOOPS_THEME_PATH.'/'.$theme."/theme.html" ) ){
 		$myts =& MyTextSanitizer::getInstance();
+		$style = xoops_getcss($theme);
 		$this->assign('temaname', $theme.'/theme.html');
 		$this->assign('xoops_theme', $theme);
-		$this->assign('xoops_themecss', XOOPS_THEME_URL.'/'.$theme.'/style.css');
+		$this->assign('xoops_themecss', $style);
 		$this->assign('xoops_imageurl', XOOPS_THEME_URL.'/'.$theme.'/');
 		if( !empty( $title ) )    $this->assign('xoops_sitename', $myts->stripSlashesGPC($myts->htmlSpecialChars($title)) );
 		if( !empty( $subtitle ) ) $this->assign('xoops_pagetitle', $myts->stripSlashesGPC($myts->htmlSpecialChars($subtitle)) );
@@ -113,7 +114,7 @@
 
 	$id = 0;
 	
-	if ($_SERVER['DOCUMENT_ROOT'].$_SERVER['SCRIPT_NAME'] == XOOPS_ROOT_PATH.'/index.php'){
+	if ( preg_replace( '/\/$/', '', $_SERVER['DOCUMENT_ROOT'] ).$_SERVER['SCRIPT_NAME'] == XOOPS_ROOT_PATH.'/index.php'){
 		$id = 1;
 	}elseif( is_object($xoopsModule) ){
 		$id = $xoopsModule->getVar('mid');
@@ -122,15 +123,16 @@
 	require( XOOPS_CACHE_PATH."/theme_changer_routine.php" );
 
 	if( $theme!=$dir && file_exists( XOOPS_THEME_PATH.'/'.$theme."/theme.html" ) ){
+		$style = xoops_getcss($theme);
 		$this->assign('temaname', $theme.'/theme.html');
 		$this->assign('xoops_theme', $theme);
-		$this->assign('xoops_themecss', XOOPS_THEME_URL.'/'.$theme.'/style.css');
+		$this->assign('xoops_themecss', $style);
 		$this->assign('xoops_imageurl', XOOPS_THEME_URL.'/'.$theme.'/');
 		if( !empty( $title ) )    $this->assign('xoops_sitename', $title);
 		if( !empty( $subtitle ) ) $this->assign('xoops_pagetitle', $subtitle);
 		if( !empty( $metakey ) )  $this->assign('xoops_meta_keywords', $metakey);
 		if( !empty( $metadesc ) ) $this->assign('xoops_meta_description', $metadesc);
 	}
-}
 
+}
 ?>
\ No newline at end of file
