예제 #1
0
* LiveZilla intern.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;
}
define("LOGIN", $_POST[POST_INTERN_SERVER_ACTION] == INTERN_ACTION_LOGIN);
define("LOGOFF", isset($_POST[POST_INTERN_USER_STATUS]) && $_POST[POST_INTERN_USER_STATUS] == USER_STATUS_OFFLINE);
define("DB_ACCESS_REQUIRED", DB_CONNECTION && !empty($_POST[POST_INTERN_GET_MANAGEMENT]));
define("NO_CLIPPING", LOGIN || isset($_POST["p_ext_u"]) && $_POST["p_ext_u"] == XML_CLIP_NULL);
define("SERVERSETUP", Server::IsServerSetup());
define("MANAGEMENT", !empty($_POST[POST_INTERN_GET_MANAGEMENT]) && SERVERSETUP);
Server::InitDataBlock(array("INTERNAL", "GROUPS", "VISITOR", "FILTERS", "INPUTS", "DBCONFIG"));
require LIVEZILLA_PATH . "_lib/objects.internal.inc.php";
OperatorRequest::Validate();
if (OperatorRequest::IsValidated()) {
    CacheManager::GetDataUpdateTimes();
    if ($_POST[POST_INTERN_SERVER_ACTION] == INTERN_ACTION_LISTEN || $_POST[POST_INTERN_SERVER_ACTION] == INTERN_ACTION_LOGIN) {
        Server::$Operators[CALLER_SYSTEM_ID]->SaveMobileParameters();
        OperatorRequest::Listen();
        if (STATS_ACTIVE && !LOGIN) {
            Server::$Statistic->ProcessAction(ST_ACTION_LOG_STATUS, array(Server::$Operators[CALLER_SYSTEM_ID]));
        }
    } else {
        if ($_POST[POST_INTERN_SERVER_ACTION] == INTERN_ACTION_SEND_FILE) {
            OperatorRequest::UploadFile();
 static function Execute($_log, $_sql, $_serversetup = false, &$_errorCode = -1)
 {
     if (!DB_CONNECTION && !(Server::IsServerSetup() && !empty(DBManager::$Provider))) {
         Logging::DatabaseLog("Query without connection: " . $_sql . " " . serialize(debug_backtrace()));
         return false;
     }
     SystemTime::GetExecutionTime();
     $result = DBManager::$Connector->Query($_log, $_sql, $_errorCode);
     return $result;
 }
예제 #3
0
* Copyright 2015 LiveZilla GmbH
* All rights reserved.
* LiveZilla is a registered trademark.
* 
* Improper changes to this file may cause critical errors.
***************************************************************************************/
define("IN_LIVEZILLA", true);
define("SAFE_MODE", @ini_get('safe_mode'));
define("LIVEZILLA_PATH", "./");
@error_reporting(E_ALL);
require LIVEZILLA_PATH . "_definitions/definitions.inc.php";
require LIVEZILLA_PATH . "_definitions/definitions.protocol.inc.php";
require LIVEZILLA_PATH . "_lib/functions.global.inc.php";
require LIVEZILLA_PATH . "_lib/objects.devices.inc.php";
define("ACCESSTIME", SystemTime::GetRuntime());
if (Server::IsServerSetup()) {
    CacheManager::Flush();
}
Server::DefineURL(FILE_SERVER_FILE);
Operator::PrepareConnection();
require LIVEZILLA_PATH . "_definitions/definitions.dynamic.inc.php";
Server::InitDataProvider();
Server::SetTimeLimit(Server::$Configuration->File["timeout_clients"]);
@ini_set('session.use_cookies', '0');
if (DEBUG_MODE) {
    @ini_set('display_errors', '1');
}
@set_error_handler("handleError");
header("Access-Control-Allow-Origin: *");
$getRequest = Communication::GetParameterAlias("rqst");
if (isset($_POST[POST_INTERN_REQUEST]) || !empty($getRequest)) {