Index: trunk/admin/install.php =================================================================== diff -u -r120 -r137 --- trunk/admin/install.php (.../install.php) (revision 120) +++ trunk/admin/install.php (.../install.php) (revision 137) @@ -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.intechnic.com/myaccount/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 = ''; @@ -108,7 +109,7 @@ { foreach($section as $key => $value) { - $key = "g_".$key; + $key = "g_".str_replace('-', '', $key); global $$key; $$key = $value; } @@ -125,7 +126,7 @@ set_ini_value("Database", "DBUser", ""); set_ini_value("Database", "DBUserPassword", ""); set_ini_value("Database", "DBName", ""); - set_ini_value("Modules", "In-Portal", ""); + set_ini_value("Module Versions", "In-Portal", ""); save_values(); } } @@ -318,8 +319,8 @@ } if($installed) - { - $state="reinstall"; + { + $state="reinstall"; } else { $state="dbinfo"; @@ -352,7 +353,11 @@ } else { - $rfile = @fopen(GET_LICENSE_URL."?login=".md5($_POST['UserName'])."&password=".md5($_POST['UserPass'])."&action=check&license_code=".base64_encode($g_LicenseCode)."&version=".str_replace('.', '', GetMaxPortalVersion($pathtoroot.$admin))."&domain=".base64_encode($_SERVER['SERVER_NAME']), "r"); + $act = ''; + if (str_replace('.', '', $g_InPortal) >= 105) { + $act = 'check'; + } + $rfile = @fopen(GET_LICENSE_URL."?login=".md5($_POST['UserName'])."&password=".md5($_POST['UserPass'])."&action=$act&license_code=".base64_encode($g_LicenseCode)."&version=".str_replace('.', '', GetMaxPortalVersion($pathtoroot.$admin))."&domain=".base64_encode($_SERVER['SERVER_NAME']), "r"); if (!$rfile) { $LoggedIn = false; } @@ -558,7 +563,7 @@ if(file_exists($filename)) { RunSQLFile($ado, $filename); - set_ini_value("Modules", $p, $try_version); + set_ini_value("Module Versions", $p, $try_version); save_values(); } } @@ -1075,7 +1080,7 @@ $sql = "SELECT Version FROM ".$g_TablePrefix."Modules WHERE Name = 'In-Portal'"; $rs = $ado->Execute($sql); - set_ini_value("Modules", "In-Portal", $rs->fields['Version']); + set_ini_value("Module Versions", "In-Portal", $rs->fields['Version']); save_values(); require_once $pathtoroot.'kernel/include/tag-class.php'; @@ -1469,7 +1474,7 @@ if(file_exists($filename)) { RunSQLFile($ado, $filename); - set_ini_value("Modules", $p, $try_version); + set_ini_value("Module Versions", $p, $try_version); save_values(); } }