diff -ru wwwcheck-0.41/init.inc.php wwwcheck-0.42/init.inc.php
--- wwwcheck-0.41/init.inc.php	2005-07-17 00:32:14.000000000 +0900
+++ wwwcheck-0.42/init.inc.php	2005-11-20 15:43:52.321995704 +0900
@@ -1,14 +1,14 @@
 <?php
 
 define( 'TOOL_NAME',    'wwwcheck.php' );
-define( 'TOOL_VERSION', '0.41' );
+define( 'TOOL_VERSION', '0.42' );
 
 umask( 0070 );
 ob_implicit_flush( 0 );
 ini_set( 'display_errors', 0 );
 
 $script_name = 'index.php';
-$web_dir     = dirname( $_SERVER['PHP_SELF'] ) . '/';
+$web_dir     = dirname( $_SERVER['SCRIPT_NAME'] ) . '/';
 $web_self    = $web_dir . ( ( $script_name === 'index.php' ) ? '' : $script_name );
 $self_dir    = dirname( __FILE__ ) . '/';
 $data_dir    = $self_dir . 'data/';
Only in wwwcheck-0.41/lib/baselib: daylog.inc.php
Only in wwwcheck-0.41/lib/baselib: detectencs
diff -ru wwwcheck-0.41/lib/command.inc.php wwwcheck-0.42/lib/command.inc.php
--- wwwcheck-0.41/lib/command.inc.php	2005-07-09 11:36:59.000000000 +0900
+++ wwwcheck-0.42/lib/command.inc.php	2005-11-20 16:00:16.540371768 +0900
@@ -145,6 +145,7 @@
 
 		// change items category from deleted category to no category.
 		@include( SELF_DIR . 'misc/debug/reset_category.php' );
+		reset_category( $id );
 
 		return array( $result ? 'INFO_DEL_CATEGORY' : 'ERROR_ADD_CATEGORY', $category );
 	}
diff -ru wwwcheck-0.41/misc/debug/conv_categories.php wwwcheck-0.42/misc/debug/conv_categories.php
--- wwwcheck-0.41/misc/debug/conv_categories.php	2005-02-26 23:08:20.000000000 +0900
+++ wwwcheck-0.42/misc/debug/conv_categories.php	2005-11-20 17:11:31.399494400 +0900
@@ -1,36 +0,0 @@
-<?php
-
-$path = dirname( __FILE__ ) . '/';
-
-require_once( $path . '../../init.inc.php' );
-
-class DebugItem extends Item
-{
-	// DEBUG
-	function convertCategory( $categories )
-	{
-		$num = array_search( $this->profile['category'], $categories );
-		$this->profile['category'] = $num;
-		$this->saveProperties();
-	}
-}
-
-
-$conf =& Config::getInstance();
-$categories = $conf->get( 'categories' );
-if ( is_array( $categories ) ) {
-	$categories = array_keys( $categories );
-}
-// $cate_file is defined in 'init.inc.php'.
-saveConfig( $cate_file, $categories );
-
-$reader =& Data::getReader( SAVE_HANDLE, $dummy = '' );
-$uris = $reader->getList();
-
-foreach ( $uris as $uri ) {
-	$item =& new DebugItem( $uri );
-	$item->convertCategory( $categories );
-	unset( $item );
-}
-
-?>
diff -ru wwwcheck-0.41/misc/debug/reset_category.php wwwcheck-0.42/misc/debug/reset_category.php
--- wwwcheck-0.41/misc/debug/reset_category.php	2005-02-26 23:08:20.000000000 +0900
+++ wwwcheck-0.42/misc/debug/reset_category.php	2005-11-20 17:10:39.043453728 +0900
@@ -1,15 +1,7 @@
 <?php
 
-if ( ! isset( $id ) ) {
-	return;
-}
-
-$path = dirname( __FILE__ ) . '/';
-require_once( $path . '../../init.inc.php' );
-
 class DebugItem extends Item
 {
-	// DEBUG
 	function resetCategory( $id )
 	{
 		if ( $this->profile['category'] === (string)$id ) {
@@ -19,13 +11,17 @@
 	}
 }
 
-$reader =& Data::getReader( SAVE_HANDLE, $dummy = '' );
-$uris = $reader->getList();
+function reset_category( $id )
+{
+	$reader =& Data::getReader( SAVE_HANDLE, $dummy = '' );
+	$uris = $reader->getList();
 
-foreach ( $uris as $uri ) {
-	$item =& new DebugItem( $uri );
-	$item->resetCategory( $id );
-	unset( $item );
+	foreach ( $uris as $uri ) {
+		$item =& new DebugItem( $uri );
+		$item->resetCategory( $id );
+		unset( $item );
+	}
+	return TRUE;
 }
 
 ?>
diff -ru wwwcheck-0.41/misc/debug/resetdiff.php wwwcheck-0.42/misc/debug/resetdiff.php
--- wwwcheck-0.41/misc/debug/resetdiff.php	2005-02-26 23:08:20.000000000 +0900
+++ wwwcheck-0.42/misc/debug/resetdiff.php	2005-11-20 16:02:52.547655056 +0900
@@ -1,16 +1,14 @@
 <?php
+// DEBUG
 
+/*
 $path = dirname( __FILE__ ) . '/';
-
 require_once( $path . '../../init.inc.php' );
 require_once( LIB_DIR .'command.inc.php' );
+*/
 
-/*
- *  差分を全て作り直します
- */
 class DebugItem extends Item
 {
-	// DEBUG
 	function resetDiff()
 	{
 		$diff = ( is_readable( $this->log_file ) && is_readable( $this->log_file . ".1" ) )
@@ -22,15 +20,16 @@
 	}
 }
 
-$reader =& Data::getReader( SAVE_HANDLE, $dummy = '' );
-$uris = $reader->getList();
+function reset_diff()
+{
+	$reader =& Data::getReader( SAVE_HANDLE, $dummy = '' );
+	$uris = $reader->getList();
 
-foreach ( $uris as $uri ) {
-	$item =& new DebugItem( $uri );
-	$item->resetDiff();
-	unset( $item );
+	foreach ( $uris as $uri ) {
+		$item =& new DebugItem( $uri );
+		$item->resetDiff();
+		unset( $item );
+	}
 }
 
-echo "終了しました。\n";
-
 ?>
diff -ru wwwcheck-0.41/view/parts_header.tpl.php wwwcheck-0.42/view/parts_header.tpl.php
--- wwwcheck-0.41/view/parts_header.tpl.php	2005-02-26 23:08:20.000000000 +0900
+++ wwwcheck-0.42/view/parts_header.tpl.php	2005-11-20 16:36:03.240023816 +0900
@@ -10,6 +10,7 @@
 if ( ! is_file( SELF_DIR . $css ) ) {
 	$css = 'css/default.css';
 }
+$css = dirname( $serv->get( 'SCRIPT_NAME' ) ) . '/' . $css;
 
 header( 'Content-Type: text/html; charset=' . $page_enc );
 
