コード例 #1
0
ファイル: pbrf_templates.php プロジェクト: ASDAFF/bitrix-pbrf
        echo LANGUAGE_ID;
        echo $_GET["return_url"] ? "&return_url=" . urlencode($_GET["return_url"]) : "";
        echo $_GET["slug"] ? "&slug=" . urlencode($_GET["slug"]) : "";
        ?>
" enctype="multipart/form-data" name="editform">
<?php 
        $aTabs = array(array("DIV" => $blank["slug"], "TAB" => $blank["name"], "ICON" => "main_user_edit", "TITLE" => $blank["name"]));
        $tabControl = new CAdminTabControl("tabControl", $aTabs, true, true);
        $tabControl->Begin();
        $tabControl->BeginNextTab();
        $data = array();
        if ($_SERVER["REQUEST_METHOD"] == "POST" && (isset($_POST["save"]) || isset($_POST["apply"]))) {
            CPBRFTemplates::setTemplates($_GET["slug"], $_POST);
            $data = $_POST;
        } else {
            $data = CPBRFTemplates::getTemplates($_GET["slug"]);
        }
        $test = iconv("windows-1251", "utf-8", "Печаль");
        $test2 = iconv("utf-8", "windows-1251", $test);
        //подключаем шаблон нужного бланка
        $GLOBALS["blank"] = $data;
        require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/pbrf/blanks/" . $_GET["slug"] . ".php";
        ?>
		
<?php 
        $tabControl->Buttons(array("back_url" => $_GET["return_url"] ? $_GET["return_url"] : "pbrf_templates.php?lang=" . LANGUAGE_ID));
        ?>

		<input type="hidden" name="debug" value="<?php 
        echo htmlspecialcharsbx($_REQUEST["debug"]);
        ?>
コード例 #2
0
ファイル: pbrf_order.php プロジェクト: ASDAFF/bitrix-pbrf
     }
     if ($blank["slug"] == "f113f117") {
         $api_result = CF113F117::getPDF($data, $templates, $order["PRICE"], $order["PRICE"]);
     }
     if (isset($api_result->error)) {
         echo CAdminMessage::ShowMessage(array("DETAILS" => GetMessage('PBRF_ERROR_API') . $api_result->message));
     } else {
         if ($api_result == null) {
             echo CAdminMessage::ShowMessage(array("DETAILS" => GetMessage('PBRF_ERROR_UNKNOWN')));
         } else {
             CPBRFPdf::setUrlPdf($_GET["order"], $_GET["blank"], $api_result);
         }
     }
 }
 if ($blank["slug"] == "f112" || $blank["slug"] == "f113") {
     $templates = CPBRFTemplates::getTemplates($blank["slug"]);
     $data = array("fio" => $fio, "country" => $country, "address" => $address, "zip" => $zip);
     if ($blank["slug"] == "f112") {
         $api_result = CF112::getPDF($data, $templates, $order["PRICE"]);
     }
     if ($blank["slug"] == "f113") {
         $api_result = CF113::getPDF($data, $templates, $order["PRICE"]);
     }
     if (isset($api_result->error)) {
         echo CAdminMessage::ShowMessage(array("DETAILS" => GetMessage('PBRF_ERROR_API') . $api_result->message));
     } else {
         if ($api_result == null) {
             echo CAdminMessage::ShowMessage(array("DETAILS" => GetMessage('PBRF_ERROR_UNKNOWN')));
         } else {
             CPBRFPdf::setUrlPdf($_GET["order"], $_GET["blank"], $api_result);
         }