Index: /trunk/xpressme_integration_kit/include/add_xpress_process.php
===================================================================
--- /trunk/xpressme_integration_kit/include/add_xpress_process.php	(revision 547)
+++ /trunk/xpressme_integration_kit/include/add_xpress_process.php	(revision 548)
@@ -11,4 +11,14 @@
 	
 	if (is_xpress_index_page_call()){
+		
+		if (!empty($_POST['submit_url_change'])) {
+			if (!empty($_POST['site_url_set'])) {
+				update_option('siteurl' , $_POST['site_url_set']);
+			}
+			if (!empty($_POST['home_url_set'])) {
+				update_option('home' , $_POST['home_url_set']);
+			}
+		}
+
 		$siteurl = get_option('siteurl');
 		$home = get_option('home');
@@ -24,15 +34,47 @@
 		}
 		$guess_url .= $blog_sub_path;
-
-		if(strcmp($siteurl,$module_url.$blog_sub_path) !== 0) {
+		$xoops_module_url = $module_url.$blog_sub_path;
+		
+		$site_url_error =  false;
+		if(strcmp($siteurl,$guess_url) !== 0) {
 			if (!@fclose(@fopen($siteurl . '/xoops_version.php', "r"))){
-				update_option('siteurl' , $module_url.$blog_sub_path);
+				$site_url_error = true;
 			}
 		}
+		$home_url_error = false;
+		if(strcmp($guess_url,$home) !== 0) {
+			$home_url_error = true;
+		}
+		if ($site_url_error || $home_url_error){
+			include $xoops_config->xoops_root_path ."/header.php";
+			$form = '<form method="post" action="' . $_SERVER["REQUEST_URI"] . '">'."\n";
+			$form .= '<table cellspacing="1" cellpadding="1" border="0">';
+			$form .= '<tbody>';
+			if ($site_url_error){
+				$site_url_error_log = sprintf('Can not access WordPress Site URL(%s)',$siteurl);
+				$form .= '<tr><td colspan="3"><font color="red"><b>' . $site_url_error_log . '</b></font></td></tr>';
+				$form .= '<tr>';
+				$form .= '<td width="16">&nbsp;</td>';
+				$form .= '<td width="64">Site URL</td>';
+				$form .= '<td><input name="site_url_set" type="text" size="64" maxlength="200" value="'  . $guess_url . '" /></td>';
+				$form .= '</tr>';
 
-		if(strcmp($guess_url,$home) !== 0) {
-			if (@fclose(@fopen($guess_url . '/xoops_version.php', "r"))){
-				update_option('home' , $guess_url);
 			}
+			if ($home_url_error){
+				if ($site_url_error) $form .= '<tr><td colspan="3">&nbsp;</td></tr>';;
+				$home_url_error_log = sprintf('WordPress Home URL(%s) is different from access URL. ',$home);
+				$form .= '<tr><td colspan="3"><font color="red"><b>' . $home_url_error_log . '</b></font></td></tr>';
+				$form .= '<tr>';
+				$form .= '<td width="16">&nbsp;</td>';
+				$form .= '<td width="64">Home URL</td>';
+				$form .= '<td><input name="home_url_set" type="text" size="64" maxlength="200" value="'  . $guess_url . '" /></td>';
+				$form .= '</tr>';
+			}
+			$form .= '</tbody>';
+			$form .= '</table><br />';
+			$form .= '<input type="submit" value= "Setting" name="submit_url_change" />' ."\n";
+			echo $form;
+			include $xoops_config->xoops_root_path . '/footer.php';
+			exit();
 		}
 	}
@@ -54,5 +96,6 @@
 	//When it is not possible to connect it correctly at site home URL on the WordPress side, 
 	//URL is corrected based on accessed URL. 
-	safe_site_url();
+	global $xoopsUserIsAdmin;
+	if ($xoopsUserIsAdmin) safe_site_url();
 
 	if (!is_object($xoopsUser)){	// before login auth cookie clear
