Index: trunk/admin/install.php =================================================================== diff -u -r64 -r66 --- trunk/admin/install.php (.../install.php) (revision 64) +++ trunk/admin/install.php (.../install.php) (revision 66) @@ -3,7 +3,8 @@ //$new_version = '1.0.2'; -define("GET_LICENSE_URL", "http://www.intechnic.com/myaccount/license.php"); +//define("GET_LICENSE_URL", "http://www.in-portal.net/licensing/license.php"); +define("GET_LICENSE_URL", "http://maris.prod.intechnic.lv/in-business/license.php"); define('BACKUP_NAME', 'dump(.*).txt'); // how backup dump files are named $general_error = ''; @@ -14,8 +15,6 @@ $install_type = $_GET['install_type']; } -$force_finish = isset($_REQUEST['ff']) ? true : false; - $pathtoroot = ""; if(!strlen($pathtoroot)) { @@ -131,16 +130,6 @@ $configs[3] = "in-portal:configure_categories"; $mods[3] = "In-Portal"; - -// simulate rootURL variable: begin - $rootURL = 'http://'.dirname($_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']); - $tmp = explode('/', $rootURL); - if( $tmp[ count($tmp) - 1 ] == $admin) unset( $tmp[ count($tmp) - 1 ] ); - $rootURL = implode('/', $tmp).'/'; - unset($tmp); - //echo "RU: $rootURL
"; -// simulate rootURL variable: end - if(strlen($g_DBType)>0 && strlen($state)>0 && $state !="dbinfo" && $state !="db_config_save") { require_once($pathtoroot."kernel/startup.php"); @@ -171,7 +160,7 @@ } require_once($pathtoroot.$admin."/install/inst_ado.php"); -$helpURL = $rootURL.$admin.'/help/install_help.php?destform=popup&help_usage=install'; + ?> @@ -195,34 +184,10 @@ function Continue() { document.iform1.submit(); } - - function CreatePopup(window_name, url, width, height) - { - // creates a popup window & returns it - if(url == null && typeof(url) == 'undefined' ) url = ''; - if(width == null && typeof(width) == 'undefined' ) width = 750; - if(height == null && typeof(height) == 'undefined' ) height = 400; - - - return window.open(url,window_name,'width='+width+',height='+height+',status=yes,resizable=yes,menubar=no,scrollbars=yes,toolbar=no'); - } - - function ShowHelp(section) - { - var frm = document.getElementById('help_form'); - - frm.section.value = section; - frm.method = 'POST'; - CreatePopup('HelpPopup','/help/blank.html'); // , null, 600); - frm.target = 'HelpPopup'; - frm.submit(); - } - -
"> @@ -429,7 +394,6 @@ $sql = "SELECT Name, Version FROM ".$g_TablePrefix."Modules"; $rs = $ado->Execute($sql); - $i = 0; while ($rs && !$rs->EOF) { $p = strtolower($rs->fields['Name']); // $modules .= strtolower($rs->fields['Name']).','; @@ -461,22 +425,12 @@ if ($rs1->fields['count'] == 0 && str_replace('.', '', $file) > str_replace('.', '', $rs->fields['Version'])) { //$sql = "SELECT Version FROM ".$g_TablePrefix."Modules WHERE Name = '".$p."'"; //$rs2 = $ado->Execute($sql); - if ($Modules[$i-1] == $rs->fields['Name']) { - $Texts[$i-1] = $rs->fields['Name']." (".$rs->fields['Version']." ".prompt_language("la_to")." ".$file.")"; - //$Modules[] = $rs->fields['Name']; - $i--; - } - else { - $Texts[$i] = $rs->fields['Name']." (".$rs->fields['Version']." ".prompt_language("la_to")." ".$file.")"; - $Modules[$i] = $rs->fields['Name']; - } - - $i++; - } + $Texts[] = $rs->fields['Name']." (".$rs->fields['Version']." ".prompt_language("la_to")." ".$file.")"; + $Modules[] = $rs->fields['Name']; + } } - } + } } - $rs->MoveNext(); } @@ -543,17 +497,10 @@ } } } - - $state = 'languagepack_upgrade'; } -} - -// upgrade language pack -if($state=='languagepack_upgrade') -{ - $state = 'lang_install_init'; - $_POST['lang'][] = 'english.lang'; - $force_finish = true; + + $state = "finish"; + $include_file = "install/install_finish.php"; } if($state=="db_reconfig_save") @@ -1309,7 +1256,7 @@ if($Status==0) { - $Offset = $objLanguages->ReadImportTable($PhraseTable, 1,"0,1,2", $force_finish ? false : true, 200,$Offset); + $Offset = $objLanguages->ReadImportTable($PhraseTable, 1,"0,1,2",TRUE,200,$Offset); if($Offset>=$Total) { $Offset=0; @@ -1323,9 +1270,7 @@ $next_step = $_GET['next_step']; } - if($force_finish == true) $next_step = 3; $NextUrl = $_SERVER['PHP_SELF']."?Offset=$Offset&Status=$Status&state=lang_install&next_step=$next_step&install_type=$install_type"; - if($force_finish == true) $NextUrl .= '&ff=1'; $include_file = "install/lang_run.php"; } else @@ -1334,7 +1279,7 @@ $objMessageList = new clsEmailMessageList(); - $Offset = $objMessageList->ReadImportTable($EventTable, $force_finish ? false : true,100,$Offset); + $Offset = $objMessageList->ReadImportTable($EventTable,TRUE,100,$Offset); if($Offset>$Total) { @@ -1344,30 +1289,14 @@ else if ($_GET['next_step']) { $next_step = $_GET['next_step']; } - if($force_finish == true) $next_step = 3; $NextUrl = $_SERVER['PHP_SELF']."?Offset=$Offset&Status=$Status&State=lang_install&next_step=$next_step&install_type=$install_type"; - if($force_finish == true) $NextUrl .= '&ff=1'; $include_file = "install/lang_run.php"; } else - { - if( !$force_finish ) - { - $state = 'lang_default'; - } - else - { - $_POST['next_step'] = 4; - $state = 'finish'; - $include_file = "install/install_finish.php"; - } - } + $state="lang_default"; } } - - - if($state=="lang_default_set") { // phpinfo(INFO_VARIABLES); @@ -1511,12 +1440,24 @@ if(substr($state,0,10)=="postconfig") { + $ado = GetADODBConnection(); + $p = explode("_",$state); $step = $p[1]; if ($_POST['Site_Path'] != '') { - //echo "ok
"; - $rfile = @fopen(GET_LICENSE_URL."?url=".base64_encode($_SERVER['SERVER_NAME'].$_POST['Site_Path'])."&domain=".md5($_SERVER['SERVER_NAME']), "r"); + $sql = "SELECT Name, Version FROM ".$g_TablePrefix."Modules"; + $rs = $ado->Execute($sql); + + $modules_str = ''; + while ($rs && !$rs->EOF) { + $modules_str .= $rs->fields['Name'].' ('.$rs->fields['Version'].'),'; + $rs->MoveNext(); + } + + $modules_str = substr($modules_str, 0, strlen($modules_str) - 1); + + $rfile = @fopen(GET_LICENSE_URL."?url=".base64_encode($_SERVER['SERVER_NAME'].$_POST['Site_Path'])."&modules=".base64_encode($modules_str)."&domain=".md5($_SERVER['SERVER_NAME']), "r"); if (!$rfile) { $get_license_error = "Unable to connect to the Intechnic server! Please try again later!"; $state = "postconfig_1"; @@ -1861,8 +1802,7 @@
  1. class="current">License Verification
  2. class="current">Select Modules to Upgrade -
  3. class="current">Language Pack Upgrade -
  4. class="current">Finish +
  5. class="current">Finish