Index: branches/Ver3.0/xpressme_integration_kit/admin/index.php
===================================================================
--- branches/Ver3.0/xpressme_integration_kit/admin/index.php	(revision 735)
+++ branches/Ver3.0/xpressme_integration_kit/admin/index.php	(revision 744)
@@ -774,5 +774,5 @@
 $mydirpath = dirname( dirname( __FILE__ ) ) ;
 //require_once($mydirpath.'/wp-config.php');
-	
+
 require_once '../../../include/cp_header.php' ;
 //require_once '../include/gtickets.php' ;
@@ -795,41 +795,66 @@
 	exit ;
 }
+include_once $mydirpath .'/include/wp_check.php' ;
 
 // beggining of Output
 xoops_cp_header();
-include( './mymenu.php' ) ;
-
-echo "
-	<style type=\"text/css\">
-	label,text {
-		display: block;
-		float: left;
-		margin-bottom: 2px;
-	}
-	label {
-		text-align: right;
-		width: 200px;
-		padding-right: 20px;
-	}
-	br {
-		clear: left;
-	}
-	</style>
-";
-
-if (!empty($_POST['submit_report'])) $report = true; else $report = false;
-xpress_sys_info($report);
-xpress_config_from_xoops_view($report);
-xpress_active_plugin_list($report);
-xpress_block_state($report);
-xpress_block_options($report);
-xpress_group_role_state($report);
-admin_check_user_meta_prefix($report);
-xpress_state($report);
-echo '<form method="POST">'."\n";
-echo '<input type="submit" name="submit_report" value="' . _AM_XP2_SYS_REPORT .' " />'.'&emsp;';
-echo '<input type="submit" name="submit_normal" value="' . _AM_XP2_SYS_NORMAL .' " />'."<br />\n";
-echo "</form>\n";
-
+if(is_wpdb_installed()){
+	include( './mymenu.php' ) ;
+
+	echo "
+		<style type=\"text/css\">
+		label,text {
+			display: block;
+			float: left;
+			margin-bottom: 2px;
+		}
+		label {
+			text-align: right;
+			width: 200px;
+			padding-right: 20px;
+		}
+		br {
+			clear: left;
+		}
+		</style>
+	";
+	if (!empty($_POST['submit_report'])) $report = true; else $report = false;
+	xpress_sys_info($report);
+	xpress_config_from_xoops_view($report);
+	xpress_active_plugin_list($report);
+	xpress_block_state($report);
+	xpress_block_options($report);
+	xpress_group_role_state($report);
+	admin_check_user_meta_prefix($report);
+	xpress_state($report);
+	echo '<form method="POST">'."\n";
+	echo '<input type="submit" name="submit_report" value="' . _AM_XP2_SYS_REPORT .' " />'.'&emsp;';
+	echo '<input type="submit" name="submit_normal" value="' . _AM_XP2_SYS_NORMAL .' " />'."<br />\n";
+	echo "</form>\n";
+} else {
+
+	include_once $mydirpath .'/include/wp_installer.php' ;
+	if (!empty($_POST['submit_install'])) {
+		$i_mess = wp_installer($mydirname);
+		foreach( $i_mess as $message ) {
+			echo $message ;
+		}
+
+	} else {
+		echo '<font size="5" color="#ff0000">'. _AM_XP2_NO_WP. '</font><br /><br />';
+
+		if (xp_permission_check($mydirname , $mydirpath)){
+			echo '<form method="POST">'."\n";
+			echo '<input type="submit" name="submit_install" value="' . _AM_XP2_WP_INSTALL .' " />'.'&emsp;';
+			echo "</form>\n";
+		} else {
+			include_once $mydirpath .'/admin/help/wp_install_help.php' ;
+			wp_install_guide();
+			echo '<form method="POST">'."\n";
+			echo '<input type="submit" name="submit_recheck" value="' . _AM_XP2_WP_RE_CHK .' " />'.'&emsp;';
+			echo "</form>\n";
+		}
+	}
+}
 xoops_cp_footer();
 
