本文整理汇总了PHP中Server::IsAvailable方法的典型用法代码示例。如果您正苦于以下问题:PHP Server::IsAvailable方法的具体用法?PHP Server::IsAvailable怎么用?PHP Server::IsAvailable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server
的用法示例。
在下文中一共展示了Server::IsAvailable方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: buildLoginErrorField
function buildLoginErrorField($error = "", $addition = "")
{
if (!Server::IsAvailable()) {
return LocalizationManager::$TranslationStrings["client_error_deactivated"];
}
if (!DB_CONNECTION || !empty(Server::$Configuration->File["gl_stmo"])) {
return LocalizationManager::$TranslationStrings["client_error_unavailable"];
}
if (IS_FILTERED && !FILTER_ALLOW_CHATS && !FILTER_ALLOW_TICKETS) {
$error = LocalizationManager::$TranslationStrings["client_error_unavailable"];
if (isset(DataManager::$Filters->Message) && strlen(DataManager::$Filters->Message) > 0) {
$addition = "<br><br>" . DataManager::$Filters->Message;
}
}
return $error . $addition;
}
示例2: PrepareConnection
static function PrepareConnection()
{
if (!empty($_GET["iau"])) {
$_POST[POST_INTERN_AUTHENTICATION_USER] = base64_decode($_GET["iau"]);
$_POST[POST_INTERN_AUTHENTICATION_TOKEN] = base64_decode($_GET["iat"]);
$_POST[POST_INTERN_FILE_TYPE] = base64_decode($_GET["ift"]);
$_POST[POST_INTERN_REQUEST] = base64_decode($_GET["r"]);
$_POST[POST_INTERN_SERVER_ACTION] = base64_decode($_GET["isa"]);
$_POST[POST_INTERN_AUTHENTICATION_CLIENT_SYSTEM_ID] = base64_decode($_GET["li"]);
}
if (isset($_POST[POST_INTERN_REQUEST]) && $_POST[POST_INTERN_REQUEST] == CALLER_TYPE_INTERNAL) {
Server::$Response = new Response();
if (!isset($_POST[POST_INTERN_ADMINISTRATE])) {
header("Content-Type: text/xml; charset=UTF-8");
if (!Server::IsAvailable() && $_POST[POST_INTERN_SERVER_ACTION] == INTERN_ACTION_LOGIN && !isset($_POST[POST_INTERN_ACCESSTEST])) {
Server::$Response->SetValidationError(LOGIN_REPLY_DEACTIVATED);
exit(Server::$Response->GetXML());
}
}
}
}
示例3: strpos
<?php
/****************************************************************************************
* LiveZilla track.php
*
* Copyright 2015 LiveZilla GmbH
* All rights reserved
* LiveZilla is a registered trademark.
*
* Improper changes to this file may cause critical errors.
***************************************************************************************/
if (!defined("IN_LIVEZILLA")) {
die;
}
require LIVEZILLA_PATH . "_lib/functions.tracking.inc.php";
if (!Server::IsAvailable()) {
VisitorMonitoring::Abort(2);
}
define("JAVASCRIPT", !(isset($_GET[GET_TRACK_OUTPUT_TYPE]) && $_GET[GET_TRACK_OUTPUT_TYPE] == "nojcrpt") && strpos($_SERVER["QUERY_STRING"], "nojcrpt") === false);
if (!empty($_GET[GET_TRACK_USERID])) {
define("CALLER_BROWSER_ID", Visitor::IDValidate(Communication::GetParameter(GET_TRACK_BROWSERID, "")));
define("CALLER_USER_ID", Visitor::IDValidate(Communication::GetParameter(GET_TRACK_USERID, "")));
} else {
if (!Is::Null(Cookie::Get("userid"))) {
define("CALLER_BROWSER_ID", Visitor::IDValidate());
define("CALLER_USER_ID", Visitor::IDValidate(Cookie::Get("userid")));
}
}
if (!defined("CALLER_USER_ID")) {
if (!JAVASCRIPT) {
define("CALLER_USER_ID", substr(md5(Communication::GetIP()), 0, USER_ID_LENGTH));
示例4: Listen
static function Listen()
{
OperatorRequest::Process();
if (!SERVERSETUP && !LOGIN && Server::$Operators[CALLER_SYSTEM_ID]->Status == USER_STATUS_OFFLINE) {
return;
}
Server::$Response->XML = "<listen disabled=\"" . base64_encode(Server::IsAvailable(false) ? "0" : "1") . "\" h=\"<!--gl_all-->\" " . (isset($_POST[POST_INTERN_XMLCLIP_HASH_EXECUTION_TIME]) ? "ex_time=\"<!--execution_time-->\"" : "") . ">\r\n";
Server::$Response->Typing = "";
if (Server::$Response->Login != null) {
Server::$Response->XML .= Server::$Response->Login;
}
OperatorRequest::Build();
processPosts();
if (($hash = substr(md5(Server::$Response->Typing), 0, 5)) != @$_POST["p_gl_t"] && strlen(Server::$Response->Typing) > 0) {
Server::$Response->XML .= "<gl_typ h=\"" . base64_encode($hash) . "\">\r\n" . Server::$Response->Typing . "</gl_typ>\r\n";
}
Server::$Response->XML .= Server::$Response->Events . "\r\n";
if (($hash = substr(md5(Server::$Response->Exceptions), 0, 5)) != @$_POST["p_gl_e"] && strlen(Server::$Response->Exceptions) > 0) {
Server::$Response->XML .= "<gl_e h=\"" . base64_encode($hash) . "\">\r\n" . Server::$Response->Exceptions . "</gl_e>\r\n";
}
if (($hash = substr(md5(Server::$Response->Internals), 0, 5)) != @$_POST["p_int_r"] && strlen(Server::$Response->Internals) > 0) {
Server::$Response->XML .= "<int_r h=\"" . base64_encode($hash) . "\">\r\n" . Server::$Response->Internals . "</int_r>\r\n";
}
if (($hash = substr(md5(Server::$Response->Groups), 0, 5)) != @$_POST["p_int_d"] && strlen(Server::$Response->Groups) > 0) {
Server::$Response->XML .= "<int_d h=\"" . base64_encode($hash) . "\">\r\n" . Server::$Response->Groups . "</int_d>\r\n";
}
if (($hash = substr(md5(Server::$Response->Actions), 0, 5)) != @$_POST["p_int_ev"]) {
Server::$Response->XML .= "<int_ac h=\"" . base64_encode($hash) . "\">\r\n" . Server::$Response->Actions . "</int_ac>\r\n";
}
if (($hash = substr(md5(Server::$Response->InternalVcards), 0, 5)) != @$_POST["p_int_v"]) {
Server::$Response->XML .= "<int_v h=\"" . base64_encode($hash) . "\">\r\n" . Server::$Response->InternalVcards . "</int_v>\r\n";
}
if (($hash = substr(md5(Server::$Response->InternalWebcamPictures), 0, 5)) != @$_POST["p_int_wp"]) {
Server::$Response->XML .= "<int_wp h=\"" . base64_encode($hash) . "\">\r\n" . Server::$Response->InternalWebcamPictures . "</int_wp>\r\n";
}
if (!empty(Server::$Response->Tracking) && ($hash = substr(md5(Server::$Response->Tracking), 0, 5)) != @$_POST["p_ext_u"]) {
Server::$Response->XML .= "<ext_u h=\"" . base64_encode($hash) . "\">\r\n" . Server::$Response->Tracking . "</ext_u>\r\n";
}
if (($hash = substr(md5(Server::$Response->Forwards), 0, 5)) != @$_POST["p_ext_f"]) {
Server::$Response->XML .= "<ext_f h=\"" . base64_encode($hash) . "\">\r\n" . Server::$Response->Forwards . "</ext_f>\r\n";
}
if (($hash = substr(md5(Server::$Response->ChatVouchers), 0, 5)) != @$_POST["p_ext_ct"]) {
Server::$Response->XML .= "<ext_ct h=\"" . base64_encode($hash) . "\">\r\n" . Server::$Response->ChatVouchers . "</ext_ct>\r\n";
}
if (Server::$Response->Archive != null) {
Server::$Response->XML .= "<ext_c>\r\n" . Server::$Response->Archive . "</ext_c>\r\n";
}
if (Server::$Response->Resources != null) {
Server::$Response->XML .= "<ext_res>\r\n" . Server::$Response->Resources . "</ext_res>\r\n";
}
if (Server::$Response->Feedbacks != null) {
Server::$Response->XML .= "<ext_fb>\r\n" . Server::$Response->Feedbacks . "</ext_fb>\r\n";
}
if (Server::$Response->Filters != null) {
Server::$Response->XML .= "<ext_b h=\"" . base64_encode($hash) . "\">\r\n" . Server::$Response->Filters . "</ext_b>\r\n";
}
if (!empty(Server::$Response->Reports)) {
Server::$Response->XML .= Server::$Response->Reports;
}
Server::$Response->XML .= Server::$Response->Messages . "\r\n";
if (strlen(Server::$Response->Authentications) > 0) {
Server::$Response->XML .= "<gl_auths>\r\n" . Server::$Response->Authentications . "\r\n</gl_auths>\r\n";
}
if (strlen(Server::$Response->Posts) > 0) {
Server::$Response->XML .= "<usr_p>\r\n" . Server::$Response->Posts . "</usr_p>\r\n";
}
if (isset($_POST[POST_INTERN_ACCESSTEST])) {
Server::$Response->XML .= "<permission>" . base64_encode(OperatorRequest::GetPermissions()) . "</permission>";
}
if (SERVERSETUP || LOGIN || Server::$Operators[CALLER_SYSTEM_ID]->LastActive <= @filemtime(FILE_CONFIG)) {
Server::$Response->XML .= OperatorRequest::GetConfig();
}
Server::$Response->XML .= "</listen>";
}