本文整理汇总了PHP中sockets::IsGoldKey方法的典型用法代码示例。如果您正苦于以下问题:PHP sockets::IsGoldKey方法的具体用法?PHP sockets::IsGoldKey怎么用?PHP sockets::IsGoldKey使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sockets
的用法示例。
在下文中一共展示了sockets::IsGoldKey方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: register_lic
function register_lic()
{
ini_set('html_errors', 0);
ini_set('display_errors', 1);
ini_set('error_reporting', E_ALL);
$sock = new sockets();
$unix = new unix();
$ini = new Bs_IniHandler();
$function_ghost = base64_decode("Y2hlY2tsaWNlbnNlLmJpbg==");
$error1 = base64_decode("e2dlbmVyaWNfaHR0cF9lcnJvcn0=");
$textGhost = base64_decode("Q29ycG9yYXRlIExpY2Vuc2UgZXhwaXJlZCAtIHJldHVybiBiYWNrIHRvIENvbW11bml0eSBsaWNlbnNl");
$verifailed = base64_decode("Q29ycG9yYXRlIExpY2Vuc2UgZXhwaXJlZCAtIHJldHVybiBiYWNrIHRvIENvbW11bml0eSBsaWNlbnNl");
$licexpir = base64_decode("e2xpY2Vuc2VfZXhwaXJlZH0=");
$line_ghost = base64_decode("MTA4NDM=");
$datas = $sock->GET_INFO("ArticaProxySettings");
$squidbin = $unix->LOCATE_SQUID_BIN();
$php = $unix->LOCATE_PHP5_BIN();
$ArticaProxyServerEnabled = null;
if (trim($datas) != null) {
$ini->loadString($datas);
$ArticaProxyServerEnabled = $ini->_params["PROXY"]["ArticaProxyServerEnabled"];
if ($ArticaProxyServerEnabled == 1) {
$ArticaProxyServerEnabled == "yes";
}
}
echo "Use a Proxy server: {$ArticaProxyServerEnabled}\n";
$WORKDIR = base64_decode("L3Vzci9sb2NhbC9zaGFyZS9hcnRpY2E=");
$WORKFILE = base64_decode('LmxpYw==');
$WORKPATH = "{$WORKDIR}/{$WORKFILE}";
$nohup = $unix->find_program("nohup");
if ($GLOBALS["VERBOSE"]) {
echo __FUNCTION__ . "::" . __LINE__ . "\n";
}
$pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".pid";
$cachetime = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".time";
$pid = @file_get_contents($pidfile);
if ($unix->process_exists($pid)) {
build_progress("License information: Already executed PID:{$pid}, die()", 100);
die;
}
build_progress("Building informations...", 10);
$EnableRemoteStatisticsAppliance = $sock->GET_INFO("EnableRemoteStatisticsAppliance");
if (!is_numeric($EnableRemoteStatisticsAppliance)) {
$EnableRemoteStatisticsAppliance = 0;
}
$cmdADD = null;
if ($EnableRemoteStatisticsAppliance == 1) {
$cmdADD = "{$nohup} " . $unix->LOCATE_PHP5_BIN() . " " . dirname(__FILE__) . "/exec.netagent.php >/dev/null 2>&1 &";
}
$WizardSavedSettings = unserialize(base64_decode($sock->GET_INFO("WizardSavedSettings")));
if ($GLOBALS["VERBOSE"]) {
echo __FUNCTION__ . "::" . __LINE__ . "\n";
}
$LicenseInfos = unserialize(base64_decode($sock->GET_INFO("LicenseInfos")));
if (!isset($LicenseInfos["COMPANY"])) {
$LicenseInfos["COMPANY"] = null;
}
if (!isset($LicenseInfos["GoldKey"])) {
$LicenseInfos["GoldKey"] = null;
}
if (!isset($LicenseInfos["REGISTER"])) {
$LicenseInfos["REGISTER"] = null;
}
if (!isset($LicenseInfos["GoldKey"])) {
$LicenseInfos["GoldKey"] = null;
}
if (!isset($WizardSavedSettings["GoldKey"])) {
$WizardSavedSettings["GoldKey"] = null;
}
$LicenseInfos["STATS_APPLIANCE"] = 0;
$LicenseInfos["COMPANY"] = str_replace("%uFFFD", "é", $LicenseInfos["COMPANY"]);
if ($WizardSavedSettings["GoldKey"] != null) {
if ($sock->IsGoldKey($WizardSavedSettings["GoldKey"])) {
if ($LicenseInfos["GoldKey"] == null) {
echo "Gold Key: {$WizardSavedSettings["GoldKey"]}\n";
$LicenseInfos["GoldKey"] = $WizardSavedSettings["GoldKey"];
}
}
}
build_progress("Check information {$LicenseInfos["COMPANY"]}", 20);
if ($GLOBALS["VERBOSE"]) {
echo __FUNCTION__ . "::" . __LINE__ . "\n";
}
$uuid = $unix->GetUniqueID();
build_progress("Check information {$uuid}", 30);
echo " *************** \n\n UUID : {$uuid} \n\n ***************\n";
if ($uuid == null) {
build_progress("No system ID !", 110);
return;
}
if (!is_numeric($LicenseInfos["REGISTER"])) {
echo "License information: server is not registered\n";
}
if ($LicenseInfos["REGISTER"] != 1) {
echo "License information: server is not registered\n";
register();
build_progress("License information: server is not registered", 110);
echo "Please, restart again...";
die;
}
//.........这里部分代码省略.........
示例2: WizardExecute
//.........这里部分代码省略.........
}
if (!$INTEL_CELERON) {
if ($CPU_NUMBERS < 2) {
@file_put_contents("/etc/artica-postfix/settings/Daemons/EnableIntelCeleron", 1);
@file_put_contents("/etc/artica-postfix/settings/Daemons/SquidPerformance", 3);
writeprogress(25, "CPUs:{$CPU_NUMBERS} = Intel Celeron mode....");
shell_exec("{$php5} /usr/share/artica-postfix/exec.intel.celeron.php");
$INTEL_CELERON = true;
}
}
if (!$INTEL_CELERON) {
if ($CPU_NUMBERS < 3) {
@file_put_contents("/etc/artica-postfix/settings/Daemons/SquidPerformance", 2);
writeprogress(25, "CPUs:{$CPU_NUMBERS} = {features}: {no_statistics}");
sleep(1);
}
}
writeprogress(26, "{creating_services}");
shell_exec("{$nohup} {$php5} /usr/share/artica-postfix/exec.initslapd.php --force >/dev/null 2>&1 &");
if (is_file($squidbin)) {
writeprogress(27, "{RestartingProxyStatisticsDatabase}");
shell_exec("/etc/init.d/squid-db restart >>{$DEBUG_LOG} 2>&1");
}
$cyrus = $unix->LOCATE_CYRUS_DAEMON();
if (is_file($cyrus)) {
writeprogress(28, "{restarting_service} SaslAuthd Daemon");
shell_exec("/etc/init.d/saslauthd restart");
writeprogress(29, "{restarting_service} Cyrus IMAP Daemon");
shell_exec("/etc/init.d/cyrus-imapd restart");
writeprogress(30, "{restarting_service} Postfix Daemon");
shell_exec("/etc/init.d/postfix restart");
}
if (isset($savedsettings["GoldKey"])) {
if (!$sock->IsGoldKey($savedsettings["GoldKey"])) {
unset($savedsettings["GoldKey"]);
}
}
if (isset($savedsettings["GoldKey"])) {
if ($sock->IsGoldKey($savedsettings["GoldKey"])) {
$WORKDIR = base64_decode("L3Vzci9sb2NhbC9zaGFyZS9hcnRpY2E=");
$WORKFILE = base64_decode('LmxpYw==');
$WORKPATH = "{$WORKDIR}/{$WORKFILE}";
@file_put_contents($WORKPATH, "TRUE");
$LicenseInfos = unserialize(base64_decode($sock->GET_INFO("LicenseInfos")));
$LicenseInfos["UUID"] = $savedsettings["UUID_FIRST"];
$LicenseInfos["TIME"] = time();
$sock->SaveConfigFile(base64_encode(serialize($LicenseInfos)), "LicenseInfos");
writeprogress(31, "{register_license}");
shell_exec("{$php5} /usr/share/artica-postfix/exec.web-community-filter.php --register >/dev/null 2>&1");
writeprogress(32, "{saving_license}");
shell_exec("{$php5} /usr/share/artica-postfix/exec.web-community-filter.php --register-lic >/dev/null 2>&1");
}
}
$ldap = new clladp();
writeprogress(40, "{building_organization} {$savedsettings["organization"]}");
if (!$ldap->AddOrganization($savedsettings["organization"])) {
debug_logs("Building organization failed {$ldap->ldap_last_error}");
sleep(2);
if (!$ldap->AddOrganization($savedsettings["organization"])) {
debug_logs("Building organization failed 2/2 {$ldap->ldap_last_error}");
}
}
sleep(2);
writeprogress(40, "{creating_domain} {$savedsettings["smtp_domainname"]}");
if (!$ldap->AddDomainEntity($savedsettings["organization"], $savedsettings["smtp_domainname"])) {
debug_logs("AddDomainEntity failed {$ldap->ldap_last_error}");
示例3: register_lic
function register_lic()
{
ini_set('html_errors', 0);
ini_set('display_errors', 1);
ini_set('error_reporting', E_ALL);
$sock = new sockets();
$unix = new unix();
$WORKDIR = base64_decode("L3Vzci9sb2NhbC9zaGFyZS9hcnRpY2E=");
$WORKFILE = base64_decode('LmxpYw==');
$WORKPATH = "{$WORKDIR}/{$WORKFILE}";
$nohup = $unix->find_program("nohup");
if ($GLOBALS["VERBOSE"]) {
echo __FUNCTION__ . "::" . __LINE__ . "\n";
}
$pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".pid";
$cachetime = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".time";
$pid = @file_get_contents($pidfile);
if ($unix->process_exists($pid)) {
build_progress("License information: Already executed PID:{$pid}, die()", 100);
die;
}
build_progress("Building informations...", 10);
$EnableRemoteStatisticsAppliance = $sock->GET_INFO("EnableRemoteStatisticsAppliance");
if (!is_numeric($EnableRemoteStatisticsAppliance)) {
$EnableRemoteStatisticsAppliance = 0;
}
$cmdADD = null;
if ($EnableRemoteStatisticsAppliance == 1) {
$cmdADD = "{$nohup} " . $unix->LOCATE_PHP5_BIN() . " " . dirname(__FILE__) . "/exec.netagent.php >/dev/null 2>&1 &";
}
$WizardSavedSettings = unserialize(base64_decode($sock->GET_INFO("WizardSavedSettings")));
if ($GLOBALS["VERBOSE"]) {
echo __FUNCTION__ . "::" . __LINE__ . "\n";
}
$LicenseInfos = unserialize(base64_decode($sock->GET_INFO("LicenseInfos")));
if (!isset($LicenseInfos["GoldKey"])) {
$LicenseInfos["GoldKey"] = null;
}
$LicenseInfos["COMPANY"] = str_replace("%uFFFD", "é", $LicenseInfos["COMPANY"]);
if ($WizardSavedSettings["GoldKey"] != null) {
if ($sock->IsGoldKey($WizardSavedSettings["GoldKey"])) {
if ($LicenseInfos["GoldKey"] == null) {
echo "Gold Key: {$WizardSavedSettings["GoldKey"]}\n";
$LicenseInfos["GoldKey"] = $WizardSavedSettings["GoldKey"];
}
}
}
build_progress("Check information {$LicenseInfos["COMPANY"]}", 20);
if ($GLOBALS["VERBOSE"]) {
echo __FUNCTION__ . "::" . __LINE__ . "\n";
}
$uuid = $unix->GetUniqueID();
build_progress("Check information {$uuid}", 30);
echo " *************** \n\n UUID : {$uuid} \n\n ***************\n";
if ($uuid == null) {
build_progress("No system ID !", 110);
return;
}
if (!is_numeric($LicenseInfos["REGISTER"])) {
echo "License information: server is not registered\n";
}
if ($LicenseInfos["REGISTER"] != 1) {
echo "License information: server is not registered\n";
build_progress("License information: server is not registered", 110);
die;
}
$LicenseInfos["UUID"] = $uuid;
//if($GLOBALS["VERBOSE"]){$curl->parms["VERBOSE"]="yes";}
if ($GLOBALS["VERBOSE"]) {
echo __FUNCTION__ . "::" . __LINE__ . "\n";
}
if (!isset($LicenseInfos["license_number"])) {
$LicenseInfos["license_number"] = null;
}
if ($LicenseInfos["license_number"] == "--") {
$LicenseInfos["license_number"] = null;
}
if (strpos($LicenseInfos["license_number"], "(") > 0) {
$LicenseInfos["license_number"] = null;
}
echo "License number:{$LicenseInfos["license_number"]}\n";
@mkdir($WORKDIR, 640, true);
if (isset($LicenseInfos["UNLOCKLIC"])) {
if (strlen($LicenseInfos["UNLOCKLIC"]) > 4) {
if (isset($LicenseInfos["license_number"])) {
if (strlen($LicenseInfos["license_number"]) > 4) {
$manulic = aef00vh567($uuid) . "-" . aef00vh567($LicenseInfos["license_number"]);
if ($manulic == $LicenseInfos["UNLOCKLIC"]) {
@file_put_contents($WORKPATH, "TRUE");
$LicenseInfos["license_status"] = "{license_active}";
$LicenseInfos["TIME"] = time();
$sock->SaveConfigFile(base64_encode(serialize($LicenseInfos)), "LicenseInfos");
if ($cmdADD != null) {
shell_exec($cmdADD);
}
build_progress("{license_active}", 80);
CheckLic($LicenseInfos, $WizardSavedSettings);
return;
}
}
//.........这里部分代码省略.........