} else { if ($retval) $display["hostid"] = $retval; } } // If we cannot determine hostid, show error message if (!$display["hostid"]) $display["hostid"] = _("<div style='color:red;'>Cannot determine zend host id. Please run zendid binary tool manually.</div>"); if (is_array($display["hostid"])) $display["hostid"] = $display["hostid"][0]; // Read licence file if (function_exists("zend_loader_file_licensed")) { $display["lic_info"] = zend_loader_file_licensed(); } // License expire date if ($_SESSION["license_check_result"]) { $license_check_result = unserialize($_SESSION["license_check_result"]); $display["expire_date"] = date("Y-m-d", $license_check_result->expire_date); } require_once ("src/append.inc.php"); ?>
<?php $registered_to = "Klaus Spithost"; set_time_limit(0); require_once dirname(__FILE__) . '/../src/prepend.inc.php'; if (function_exists("zend_loader_file_licensed") && zend_loader_file_encoded()) { $lic = zend_loader_file_licensed(); if (strtolower($lic["Registered-To"]) != strtolower($registered_to)) { die("Script is not registered to {$lic["Registered-To"]}\n\n"); } } $good_phone_format = "+[cc]-[1-4]-[4-10]"; if (CONFIG::$PHONE_FORMAT != $good_phone_format) { die("`phone_format` configured in EPP-DRS is not understood by import algorithm. \nPlease, use {$good_phone_format}\n\n"); } // Read arguments for ($i = 1; $i < $argc; $i += 2) { $arg = $argv[$i]; if ($arg == "--module") { $module = $argv[$i + 1]; } else { if ($arg == "--userid") { $userid = $argv[$i + 1]; } else { if ($arg == "--in") { $in = $argv[$i + 1]; } } } } // Check required arguments
require_once (SRC_PATH."/observers/interface.IGlobalObserver.php"); require_once (MODULES_PATH."/registries/interface.IRegistryModule.php"); require_once (MODULES_PATH."/registries/interface.IRegistryTransport.php"); require_once (MODULES_PATH."/registries/observers/interface.IRegistryObserver.php"); /** /* A code specific to zencoded release * Get license flags to check against them further during loading */ if (function_exists("zend_loader_file_licensed") && zend_loader_file_encoded()) { // Get license flags $lic_flags = @zend_loader_file_licensed(); if (!$lic_flags) throw new LicensingException("Cannot retrieve license flags. Make sure that you have correct license installed."); else { CONTEXTS::$SECURITY_CONTEXT = SECURITY_CONTEXT::ZENDED; EnumFactory::CookEnumFromArray("LICENSE_FLAGS", $lic_flags); unset($lic_flags); } } else { // Include development version (all enabled). require_once("{$srcpath}/types/enum.LICENSE_FLAGS.php"); CONTEXTS::$SECURITY_CONTEXT = SECURITY_CONTEXT::OPENSOURCE; }
if ($_POST) { if ($post_login == CONFIG::$LOGIN && $Crypto->Hash($post_pass) == CONFIG::$PASS) { $sault = $Crypto->Sault(); $_SESSION["sault"] = "$sault"; $_SESSION["uid"] = ""; $_SESSION["admin_hash"] = $Crypto->Hash($post_login.":".$Crypto->Hash($post_pass).":$sault"); // License check if (CONTEXTS::$SECURITY_CONTEXT == SECURITY_CONTEXT::ZENDED) { // Detect license version $lic_info = zend_loader_file_licensed(); $license_uuid = $lic_info[ZendLicense::X_LICENSE_ID]; if ($license_uuid) // New type. Check license { try { Log::Log("Check license", E_USER_NOTICE); $license_service = new RestClient(LICENSE_SERVICE_URL); $license_service->SetInterface("PublicLicenseService"); $chk_result = $license_service->CheckLicense($license_uuid); $_SESSION["license_check_result"] = serialize($chk_result); } catch (Exception $e) { Log::Log("License check failed. {$e->getMessage()}", E_USER_NOTICE); }