コード例 #1
0
ファイル: dump_list.php プロジェクト: Satariall/izurit
            if (CModule::IncludeModule('clouds')) {
                $obBucket = new CCloudStorageBucket($BUCKET_ID);
                if ($obBucket->Init()) {
                    $url = 'arc_down_url=' . htmlspecialcharsbx($obBucket->GetFileSRC(array("URN" => $name)));
                }
            }
        } else {
            $url = 'local_arc_name=' . htmlspecialcharsbx($name);
        }
        if ($url) {
            echo '<script>document.location = "/restore.php?Step=1&' . $url . '";</script>';
        }
        die;
    } elseif ($_REQUEST['action'] == 'restore.php') {
        if (CModule::IncludeModule("compression")) {
            Ccompress::DisableCompression();
        }
        if ($contents = file_get_contents($f = DOCUMENT_ROOT . BX_ROOT . '/modules/main/admin/restore.php')) {
            header("Content-Type: application/octet-stream");
            header("Content-Length: " . CTar::strlen($contents));
            header("Content-Disposition: attachment; filename=\"restore.php\"");
            header("Expires: 0");
            header("Cache-Control: no-cache, must-revalidate");
            header("Pragma: no-cache");
            echo $contents;
        } else {
            CAdminMessage::ShowMessage(array("MESSAGE" => GetMessage("MAIN_DUMP_ERROR"), "DETAILS" => GetMessage("MAIN_DUMP_ERR_COPY_FILE") . htmlspecialcharsbx($f), "TYPE" => "ERROR", "HTML" => true));
        }
        die;
    }
}
コード例 #2
0
ファイル: add_message.php プロジェクト: Satariall/izurit
<?php

define("NO_KEEP_STATISTIC", true);
define("NO_AGENT_STATISTIC", true);
define("NO_LANG_FILES", true);
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php";
$path = str_replace(array("\\", "//"), "/", dirname(__FILE__) . "/lang/en/add_message.php");
@(include_once $path);
$path = str_replace(array("\\", "//"), "/", dirname(__FILE__) . "/lang/" . LANGUAGE_ID . "/add_message.php");
@(include_once $path);
if (CModule::IncludeModule("compression")) {
    Ccompress::Disable2048Spaces();
}
if (CModule::IncludeModule("socialnetwork")) {
    $aUserId = array();
    if (is_array($_REQUEST["user_id"])) {
        foreach ($_REQUEST["user_id"] as $id) {
            if (intval($id) > 0) {
                $aUserId[] = intval($id);
            }
        }
    } elseif (intval($_REQUEST["user_id"]) > 0) {
        $aUserId[] = IntVal($_REQUEST["user_id"]);
    }
    $aUserId = array_unique($aUserId);
    $mptr = Trim($_REQUEST["mptr"]);
    if (!$GLOBALS["USER"]->IsAuthorized()) {
        echo "*";
    } else {
        if (!check_bitrix_sessid()) {
            echo GetMessage("SONET_C50_ERR_PERMS") . ".";