Index: branches/Ver3.0/xpressme_integration_kit/include/add_xpress_process.php
===================================================================
--- branches/Ver3.0/xpressme_integration_kit/include/add_xpress_process.php	(revision 734)
+++ branches/Ver3.0/xpressme_integration_kit/include/add_xpress_process.php	(revision 744)
@@ -111,11 +111,17 @@
 	}
 }
-
 require_once( dirname( __FILE__ ).'/request_url.php');
 require_once( dirname( __FILE__ ).'/memory_limit.php');
 
 $global_session = $_SESSION;
-
 if (is_xpress_index_page_call()){
+	require_once( dirname( __FILE__ ).'/wp_check.php');
+	if (!is_wpdb_installed()){
+		include $xoops_config->xoops_root_path ."/header.php";
+		echo "<h2>Wordpress has not been installed yet. </h2>";
+		include $xoops_config->xoops_root_path . '/footer.php';
+		exit();
+	}
+
 	//$_SERVER['REQUEST_METHOD'] = 'POST' is
 	//When notifying by a private message, Notification_reserve_send();
Index: branches/Ver3.0/xpressme_integration_kit/include/oninstall.php
===================================================================
--- branches/Ver3.0/xpressme_integration_kit/include/oninstall.php	(revision 734)
+++ branches/Ver3.0/xpressme_integration_kit/include/oninstall.php	(revision 744)
@@ -22,6 +22,9 @@
 {
 	// transations on module install
+	$mydirpath = dirname(dirname(__FILE__));
 
 	global $ret ; // TODO :-D
+	include_once XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/include/wp_installer.php' ;
+	include_once XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/include/xpress_templates_make.php' ;
 
 	// for Cube 2.1
@@ -39,22 +42,10 @@
 
 	if( defined( 'XOOPS_CUBE_LEGACY' ) ) {
-		$ret[] = "********************************* Install Log ********************************<br />";
+		$ret[] = "********************************* Template Install Log ********************************<br />";
 	} else {
-		$ret[] = '<h4 style="border-bottom: 1px dashed rgb(0, 0, 0); text-align: left; margin-bottom: 0px;">Install Log</h4>';
+		$ret[] = '<h4 style="border-bottom: 1px dashed rgb(0, 0, 0); text-align: left; margin-bottom: 0px;">Template Install Log</h4>';
     }
-
-//xpress
-	global $wpdb,$wp_rewrite, $wp_queries, $table_prefix, $wp_db_version, $wp_roles, $wp_query,$wp_embed;
-	global $xoops_config;
-		
-	define("WP_INSTALLING", true);
-	
-	$site_url= XOOPS_URL."/modules/".$mydirname;
-	$mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
-	$path = $mydirpath . '/';
-	$site_name = ucfirst($mydirname) . ' ' . _MI_XP2_NAME;
-	
-// permission and wordpress files check
-	require_once ($path . 'include/pre_check.php');
+    // permission and wordpress files check
+/*
 	if(! xp_permission_check($mydirname, $mydirpath)){
 		if( ! defined( 'XOOPS_CUBE_LEGACY' ) ) {
@@ -65,170 +56,17 @@
 		return false;
 	}
+*/
+	// make templates
+	$t_mess = xpress_templates_make($mid,$mydirname);
+	$ret = array_merge($ret,$t_mess);
 	
-// install WordPress
-	if (file_exists($path . 'wp-load.php')) {
-		require_once $path . 'wp-load.php';
+	if( defined( 'XOOPS_CUBE_LEGACY' ) ) {
+		$ret[] = "********************************* WordPress Install Log ********************************<br />";
 	} else {
-		require_once $path . 'wp-config.php';
-	}
-	include_once($mydirpath . '/wp-admin/upgrade-functions.php');
-	wp_cache_flush();
-	make_db_current_silent();
-	$ret[] = "The data base of wordpress was made by prefix $table_prefix.<br />";
-	
-	$option_desc = __('WordPress web address');
-	$wpdb->query("INSERT INTO $wpdb->options (blog_id, option_name,option_value, autoload) VALUES ('0', 'siteurl','$site_url', 'yes')");	
-	$wpdb->query("INSERT INTO $wpdb->options (blog_id, option_name,option_value, autoload) VALUES ('0', 'home','$site_url', 'yes')");
-
-	populate_options();
-	populate_roles();
-	
-// create XPressME table
-	$xp_prefix = preg_replace('/wordpress/','wp',$mydirname);
-	$views_table = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_views' ;
-
-	$charset_collate = '';
-	if ( version_compare(mysql_get_server_info(), '4.1.0', '>=') ) {
-		if ( ! empty($wpdb->charset) )
-			$charset_collate = "DEFAULT CHARACTER SET $wpdb->charset";
-		if ( ! empty($wpdb->collate) )
-			$charset_collate .= " COLLATE $wpdb->collate";
-	}
-	$views_queries ="CREATE TABLE $views_table (
-  		blog_id bigint(20) unsigned NOT NULL default '0',
-  		post_id bigint(20) unsigned NOT NULL default '0',
-  		post_views bigint(20) unsigned NOT NULL default '0',
-  		KEY post_id (post_id)
-		)$charset_collate;";
-	dbDelta($views_queries);
-	$ret[] = "$views_table table of XPressME was made.<br />";
-	
-	$d3forum_link = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_d3forum_link' ;
-	$views_queries ="CREATE TABLE $d3forum_link (
-  		comment_ID bigint(20) unsigned NOT NULL default '0',
-  		post_id int(10) unsigned NOT NULL default '0' ,
-  		wp_post_ID bigint(20) unsigned NOT NULL default '0',
-  		forum_id bigint(20) unsigned NOT NULL default '0',
-  		blog_id bigint(20) unsigned NOT NULL default '0',
-  		KEY post_id (post_id)
-		)$charset_collate;";
-	dbDelta($views_queries);
-	$ret[] = "$d3forum_link table of XPressME was made.<br />";
-	
-	$group_role = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_group_role' ;
-	$views_queries ="CREATE TABLE $group_role (
-  		groupid smallint(5) unsigned NOT NULL default '0',
-  		blog_id bigint(20) unsigned NOT NULL default '0',
-  		name varchar(50)  NOT NULL default '' ,
-  		description text  NOT NULL default '',
-  		group_type varchar(50)  NOT NULL default '' ,
-		role varchar(20)  NOT NULL default '' ,
-		login_all smallint(5) unsigned NOT NULL default '0' ,
-  		KEY groupid (groupid)
-		)$charset_collate;";
-	dbDelta($views_queries);
-	$ret[] = "$group_role table of XPressME was made.<br />";
-	
-	$notify_reserve = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_notify_reserve' ;
-	$queries ="CREATE TABLE $notify_reserve (
-  		notify_reserve_id bigint(20) NOT NULL AUTO_INCREMENT ,
-  		notify_reserve_status varchar(20)  NOT NULL default '' ,
-  		category text  NOT NULL default '',
-  		item_id bigint(20) unsigned NOT NULL default '0',
-		event varchar(20) NOT NULL default '',
-		extra_tags_arry longtext NOT NULL default '' ,
-		user_list_arry longtext NOT NULL default '' ,
-  		module_id smallint(5) unsigned NOT NULL default '0' ,
-  		omit_user_id varchar(20) NOT NULL default '' ,
-  		KEY notify_reserve_id (notify_reserve_id)
-		)TYPE=MyISAM";
-	dbDelta($queries);
-	$ret[] = "$notify_reserve table of XPressME was made.<br />";
-
-	$sql = "INSERT INTO $group_role (groupid, role) VALUES (1, 'administrator')";
-	$wpdb->query($sql);
-	
-// make templates
-	include_once XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/include/xpress_templates_make.php' ;
-	$t_mess = xpress_templates_make($mid,$mydirname);
-	
-// Admin User Data write
-	// Change uid field
-	$wpdb->query("ALTER TABLE $wpdb->posts CHANGE `post_author` `post_author` mediumint(8) NOT NULL DEFAULT '0'");
-	$user_name = is_object($GLOBALS["xoopsUser"])?$GLOBALS["xoopsUser"]->getVar("uname"):'admin';
-	$email = is_object($GLOBALS["xoopsUser"])?$GLOBALS["xoopsUser"]->getVar("email"):'foo@exsample.com';
-	$pass_md5 = is_object($GLOBALS["xoopsUser"])?$GLOBALS["xoopsUser"]->getVar("pass"):'';
-	
-	if (!function_exists('username_exists')){
-		require_once($mydirpath . '/wp-includes/registration-functions.php');
-	}
-	$user_id = username_exists($user_name);
-	if ( !$user_id ) {
-		$random_password = 'admin';
-		$user_id = wp_create_user($user_name, $random_password, $email);
-	} else {
-		$random_password = __('User already exists.  Password inherited.');
-	}
-
-	$user = new WP_User($user_id);
-	$user->set_role('administrator');
-	'User ' . $user_name . ' of the administrator was made.';
-	// over write xoops md5 password 
-	$sql = "UPDATE $wpdb->users SET user_pass ='$pass_md5' WHERE ID = $user_id";
-	$wpdb->query($sql);
-	$ret[] = 'The password of XOOPS was copied.<br />';
-	
-	
-// Set Default data
-	// make WordPress Default data	
-	if (function_exists('wp_install_defaults')){
-		wp_install_defaults($user_id);
-	} else {
-		wp_install_old_defaults($user_id);
-	}
-	
-	$ret[] = 'The first sample post & comment was written.<br />';
-	
-	// Rewrite Option for Xpress
-	$xoops_config_tbl = XOOPS_DB_PREFIX . '_config' ;
-	$sql = "SELECT conf_value FROM  $xoops_config_tbl WHERE `conf_name` = 'default_TZ'";
-	$xoops_default_TZ = $wpdb->get_var($sql);
-	update_option('gmt_offset', $xoops_default_TZ);	
-
-	if (WPLANG == 'ja_EUC') {
-		$setup_charset = 'EUC-JP';
-	} elseif(WPLANG == 'ja_SJIS') {
-		$setup_charset = 'Shift_JIS';
-	} else {
-		$setup_charset = 'UTF-8';
-	}
-	update_option("blog_charset", $setup_charset);
-
-	update_option('blogname', $site_name );	
-	update_option('blogdescription', 'WordPress for XOOPS');
-	update_option("admin_email", $GLOBALS["xoopsConfig"]['adminmail']);
-	update_option("ping_sites", "http://rpc.pingomatic.com/\nhttp://ping.xoopsforge.com/");
-	update_option("home", $site_url);
-	update_option("siteurl", $site_url);
-	update_option("what_to_show", "posts");
-	update_option('default_pingback_flag', 0);
-	$ret[] = 'The initial data was written in the data base of wordpress.<br />';
-	
-	update_option("template", "xpress_default");
-	update_option("stylesheet", "xpress_default");
-	$ret[] = 'The default theme of wordpress was set to xpress_default.<br />';
-//	update_option('uploads_use_yearmonth_folders', 1);
-	update_option('upload_path', 'wp-content/uploads');
-			
-// activate the xpressme plugin
-	require_once dirname( __FILE__ ).'/xpress_active_plugin.php';
-	if (xpress_pulugin_activation('xpressme/xpressme.php')){
-		$ret[] = 'The xpressme plug-in was activated.<br />';
-	} else {
-		$GLOBALS["err_log"][] =  '<span style="color:#ff0000;">failed in the activation of xpressme plug-in.</span><br />';
-		return false;
-	}
-
-	$ret = array_merge($ret,$t_mess);
+		$ret[] = '<h4 style="border-bottom: 1px dashed rgb(0, 0, 0); text-align: left; margin-bottom: 0px;">WordPress Install Log</h4>';
+    }
+	// wp install
+//	$i_mess = wp_installer($mydirname);
+//	$ret = array_merge($ret,$i_mess);
 
 	return true ;
@@ -254,5 +92,5 @@
 	if( is_array( @$GLOBALS["err_log"] ) ) {
 		foreach( $GLOBALS["err_log"] as $message ) {
-			$log->add( strip_tags($message)) ;
+			$log->add( strip_tags( $message ) ) ;
 		}
 	}
Index: branches/Ver3.0/xpressme_integration_kit/include/pre_check.php
===================================================================
--- branches/Ver3.0/xpressme_integration_kit/include/pre_check.php	(revision 734)
+++ 	(revision )
@@ -1,50 +1,0 @@
-<?php
-function xp_permission_check($mydirname , $mydirpath) {
-	global $ret ; // TODO :-D
-	// permission check
-
-    $error = false;
-	if( defined( 'XOOPS_CUBE_LEGACY' ) ) {
-		$GLOBALS["err_log"][] = "********************************* Error Log ********************************<br />";
-	} else {
-		$GLOBALS["err_log"][] = '<h4 style="border-bottom: 1px dashed rgb(0, 0, 0); text-align: left; margin-bottom: 0px;">Error Log</h4>';
-    }
-    
-    if (!file_exists($mydirpath . '/wp-settings.php')){
-		$GLOBALS["err_log"][] =  '<span style="color:#ff0000;">WordPress is not built in.</span><br />';
-		$error = true;
-	}
-    $check_files = array('/templates/', '/wp-content/');
-    foreach ($check_files as $check) {
-    	$check_file = $mydirpath . $check;
-        if (!is_dir($check_file)) {
-           if ( file_exists($check_file) ) {
-                @chmod($check_file, 0666);
-                if (! is_writeable($check_file)) {
-                    $GLOBALS["err_log"][] = "<span style=\"color:#ff0000;\">Permission Error $check_file is not writeable</span><br />";
-                    $error = true;
-				}
-            }
-        } else {
-            @chmod($check_file, 0777);
-            if (! is_writeable($check_file)) {
-                $GLOBALS["err_log"][] = "<span style=\"color:#ff0000;\">Permission Error $check_file directory is not writeable</span><br />";
-                $error = true;
-            } else {
-            	// Windows parmission check
-            	$src_file = __FILE__ ;
-				$newfile = $check_file . 'write_check.txt';
-				if (!copy($src_file, $newfile)) {
-                	$GLOBALS["err_log"][] = "<span style=\"color:#ff0000;\">Permission Error $check_file directory is not writeable</span><br />";
-                	$error = true;
-				} else {
-					unlink($newfile);
-				}
-			}
-        }
-    }
-    if($error) return false;
-    
-    return true;
-}
-?>
Index: branches/Ver3.0/xpressme_integration_kit/include/wp_check.php
===================================================================
--- branches/Ver3.0/xpressme_integration_kit/include/wp_check.php	(revision 744)
+++ branches/Ver3.0/xpressme_integration_kit/include/wp_check.php	(revision 744)
@@ -0,0 +1,11 @@
+<?php
+	function is_wpdb_installed(){
+		$mydirname = basename(dirname( dirname( __FILE__ ) )) ;
+		$prefix_mod = XOOPS_DB_PREFIX .'_' . preg_replace('/wordpress/','wp',$mydirname) . '_';
+		$xoopsDB =& Database::getInstance();
+		$sql = "SHOW TABLES LIKE '$prefix_mod%'";
+		if ($result = $xoopsDB->queryf($sql)){
+			if($xoopsDB->getRowsNum($result))  return true;
+		}
+		return false;
+	}
Index: branches/Ver3.0/xpressme_integration_kit/include/wp_installer.php
===================================================================
--- branches/Ver3.0/xpressme_integration_kit/include/wp_installer.php	(revision 744)
+++ branches/Ver3.0/xpressme_integration_kit/include/wp_installer.php	(revision 744)
@@ -0,0 +1,216 @@
+<?php
+function xp_permission_check($mydirname , $mydirpath) {
+	global $ret ; // TODO :-D
+	// permission check
+
+    $error = false;
+    
+    if (!file_exists($mydirpath . '/wp-settings.php')){
+		$error = true;
+	}
+    $check_files = array('/templates/', '/wp-content/');
+    foreach ($check_files as $check) {
+    	$check_file = $mydirpath . $check;
+        if (!is_dir($check_file)) {
+           if ( file_exists($check_file) ) {
+                @chmod($check_file, 0666);
+                if (! is_writeable($check_file)) {
+                    $GLOBALS["err_log"][] = "<span style=\"color:#ff0000;\">Permission Error $check_file is not writeable</span><br />";
+                    $error = true;
+				}
+            }
+        } else {
+            @chmod($check_file, 0777);
+            if (! is_writeable($check_file)) {
+                $GLOBALS["err_log"][] = "<span style=\"color:#ff0000;\">Permission Error $check_file directory is not writeable</span><br />";
+                $error = true;
+            } else {
+            	// Windows parmission check
+            	$src_file = __FILE__ ;
+				$newfile = $check_file . 'write_check.txt';
+				if (!@copy($src_file, $newfile)) {
+                	$GLOBALS["err_log"][] = "<span style=\"color:#ff0000;\">Permission Error $check_file directory is not writeable</span><br />";
+                	$error = true;
+				} else {
+					unlink($newfile);
+				}
+			}
+        }
+    }
+    if($error) return false;
+    
+    return true;
+}
+
+function wp_installer($mydirname ){
+	//xpress
+	global $wpdb,$wp_rewrite, $wp_queries, $table_prefix, $wp_db_version, $wp_roles, $wp_query,$wp_embed;
+	global $xoops_config;
+	$msgs = array();
+		
+	$site_url= XOOPS_URL."/modules/".$mydirname;
+	$mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
+	$path = $mydirpath . '/';
+	$site_name = ucfirst($mydirname) . ' ' . _MI_XP2_NAME;
+	
+	
+	// install WordPress
+	define("WP_INSTALLING", true);
+	require_once $path . 'wp-load.php';
+	include_once($mydirpath . '/wp-admin/upgrade-functions.php');
+	wp_cache_flush();
+	make_db_current_silent();
+	$msgs[] = "The data base of wordpress was made by prefix $table_prefix.<br />";
+	
+	$option_desc = __('WordPress web address');
+	$wpdb->query("INSERT INTO $wpdb->options (blog_id, option_name,option_value, autoload) VALUES ('0', 'siteurl','$site_url', 'yes')");	
+	$wpdb->query("INSERT INTO $wpdb->options (blog_id, option_name,option_value, autoload) VALUES ('0', 'home','$site_url', 'yes')");
+
+	populate_options();
+	populate_roles();
+	
+	// Admin User Data write
+	// Change uid field
+	$wpdb->query("ALTER TABLE $wpdb->posts CHANGE `post_author` `post_author` mediumint(8) NOT NULL DEFAULT '0'");
+	$user_name = is_object($GLOBALS["xoopsUser"])?$GLOBALS["xoopsUser"]->getVar("uname"):'admin';
+	$email = is_object($GLOBALS["xoopsUser"])?$GLOBALS["xoopsUser"]->getVar("email"):'foo@exsample.com';
+	$pass_md5 = is_object($GLOBALS["xoopsUser"])?$GLOBALS["xoopsUser"]->getVar("pass"):'';
+	
+	if (!function_exists('username_exists')){
+		require_once($mydirpath . '/wp-includes/registration-functions.php');
+	}
+	$user_id = username_exists($user_name);
+	if ( !$user_id ) {
+		$random_password = 'admin';
+		$user_id = wp_create_user($user_name, $random_password, $email);
+	} else {
+		$random_password = __('User already exists.  Password inherited.');
+	}
+
+	$user = new WP_User($user_id);
+	$user->set_role('administrator');
+	'User ' . $user_name . ' of the administrator was made.';
+	// over write xoops md5 password 
+	$sql = "UPDATE $wpdb->users SET user_pass ='$pass_md5' WHERE ID = $user_id";
+	$wpdb->query($sql);
+	$msgs[] = 'The password of XOOPS was copied.<br />';
+
+// Set Default data
+	// make WordPress Default data	
+	if (function_exists('wp_install_defaults')){
+		wp_install_defaults($user_id);
+	} else {
+		wp_install_old_defaults($user_id);
+	}
+	
+	$msgs[] = 'The first sample post & comment was written.<br />';
+	
+	// Rewrite Option for Xpress
+	$xoops_config_tbl = XOOPS_DB_PREFIX . '_config' ;
+	$sql = "SELECT conf_value FROM  $xoops_config_tbl WHERE `conf_name` = 'default_TZ'";
+	$xoops_default_TZ = $wpdb->get_var($sql);
+	update_option('gmt_offset', $xoops_default_TZ);	
+
+	if (WPLANG == 'ja_EUC') {
+		$setup_charset = 'EUC-JP';
+	} elseif(WPLANG == 'ja_SJIS') {
+		$setup_charset = 'Shift_JIS';
+	} else {
+		$setup_charset = 'UTF-8';
+	}
+	update_option("blog_charset", $setup_charset);
+
+	update_option('blogname', $site_name );	
+	update_option('blogdescription', 'WordPress for XOOPS');
+	update_option("admin_email", $GLOBALS["xoopsConfig"]['adminmail']);
+	update_option("ping_sites", "http://rpc.pingomatic.com/\nhttp://ping.xoopsforge.com/");
+	update_option("home", $site_url);
+	update_option("siteurl", $site_url);
+	update_option("what_to_show", "posts");
+	update_option('default_pingback_flag', 0);
+	$msgs[] = 'The initial data was written in the data base of wordpress.<br />';
+	
+	update_option("template", "xpress_default");
+	update_option("stylesheet", "xpress_default");
+	$msgs[] = 'The default theme of wordpress was set to xpress_default.<br />';
+//	update_option('uploads_use_yearmonth_folders', 1);
+	update_option('upload_path', 'wp-content/uploads');
+			
+// activate the xpressme plugin
+	require_once dirname( __FILE__ ).'/xpress_active_plugin.php';
+	if (xpress_pulugin_activation('xpressme/xpressme.php')){
+		$msgs[] = 'The xpressme plug-in was activated.<br />';
+	} else {
+		$GLOBALS["err_log"][] =  '<span style="color:#ff0000;">failed in the activation of xpressme plug-in.</span><br />';
+		return false;
+	}
+
+	
+	// create XPressME table
+	$xp_prefix = preg_replace('/wordpress/','wp',$mydirname);
+	$views_table = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_views' ;
+
+	$charset_collate = '';
+	if ( version_compare(mysql_get_server_info(), '4.1.0', '>=') ) {
+		if ( ! empty($wpdb->charset) )
+			$charset_collate = "DEFAULT CHARACTER SET $wpdb->charset";
+		if ( ! empty($wpdb->collate) )
+			$charset_collate .= " COLLATE $wpdb->collate";
+	}
+	$views_queries ="CREATE TABLE $views_table (
+  		blog_id bigint(20) unsigned NOT NULL default '0',
+  		post_id bigint(20) unsigned NOT NULL default '0',
+  		post_views bigint(20) unsigned NOT NULL default '0',
+  		KEY post_id (post_id)
+		)$charset_collate;";
+	dbDelta($views_queries);
+	$msgs[] = "$views_table table of XPressME was made.<br />";
+	
+	$d3forum_link = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_d3forum_link' ;
+	$views_queries ="CREATE TABLE $d3forum_link (
+  		comment_ID bigint(20) unsigned NOT NULL default '0',
+  		post_id int(10) unsigned NOT NULL default '0' ,
+  		wp_post_ID bigint(20) unsigned NOT NULL default '0',
+  		forum_id bigint(20) unsigned NOT NULL default '0',
+  		blog_id bigint(20) unsigned NOT NULL default '0',
+  		KEY post_id (post_id)
+		)$charset_collate;";
+	dbDelta($views_queries);
+	$msgs[] = "$d3forum_link table of XPressME was made.<br />";
+	
+	$group_role = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_group_role' ;
+	$views_queries ="CREATE TABLE $group_role (
+  		groupid smallint(5) unsigned NOT NULL default '0',
+  		blog_id bigint(20) unsigned NOT NULL default '0',
+  		name varchar(50)  NOT NULL default '' ,
+  		description text  NOT NULL default '',
+  		group_type varchar(50)  NOT NULL default '' ,
+		role varchar(20)  NOT NULL default '' ,
+		login_all smallint(5) unsigned NOT NULL default '0' ,
+  		KEY groupid (groupid)
+		)$charset_collate;";
+	dbDelta($views_queries);
+	$msgs[] = "$group_role table of XPressME was made.<br />";
+	$sql = "INSERT INTO $group_role (groupid, role) VALUES (1, 'administrator')";
+	$wpdb->query($sql);
+	
+	$notify_reserve = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_notify_reserve' ;
+	$queries ="CREATE TABLE $notify_reserve (
+  		notify_reserve_id bigint(20) NOT NULL AUTO_INCREMENT ,
+  		notify_reserve_status varchar(20)  NOT NULL default '' ,
+  		category text  NOT NULL default '',
+  		item_id bigint(20) unsigned NOT NULL default '0',
+		event varchar(20) NOT NULL default '',
+		extra_tags_arry longtext NOT NULL default '' ,
+		user_list_arry longtext NOT NULL default '' ,
+  		module_id smallint(5) unsigned NOT NULL default '0' ,
+  		omit_user_id varchar(20) NOT NULL default '' ,
+  		KEY notify_reserve_id (notify_reserve_id)
+		)TYPE=MyISAM";
+	dbDelta($queries);
+	$msgs[] = "$notify_reserve table of XPressME was made.<br />";
+
+	return $msgs ;
+}
+
+?>
