当前位置: 首页>>代码示例>>PHP>>正文


PHP IncludeAJAX函数代码示例

本文整理汇总了PHP中IncludeAJAX函数的典型用法代码示例。如果您正苦于以下问题:PHP IncludeAJAX函数的具体用法?PHP IncludeAJAX怎么用?PHP IncludeAJAX使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了IncludeAJAX函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: CurrencyFormat

    }
    if (intval($calcResult->getPacksCount()) > 0) {
        $result["PACKS_COUNT"] = $calcResult->getPacksCount();
    }
    if ($calcResult->isSuccess() && CModule::IncludeModule('currency')) {
        $result["VALUE_FORMATTED"] = CurrencyFormat($calcResult->getPrice(), $arParams["CURRENCY"]);
    } elseif ($calcResult->isNextStep() && strlen($calcResult->getTmpData()) > 0) {
        $result["TEMP"] = CUtil::JSEscape($calcResult->getTmpData());
    }
    $arResult["RESULT"] = $result;
} else {
    $arParams["STEP"] = 0;
    $arResult["B_ADMIN"] = defined("ADMIN_SECTION") && ADMIN_SECTION === true ? "Y" : "N";
    if ($arResult["B_ADMIN"] != "Y") {
        $folderPath = "";
        IncludeAJAX();
        if ($this->InitComponentTemplate()) {
            $template = $this->GetTemplate();
            if ($template) {
                $folderPath = $template->GetFolder();
            }
        }
        if (strlen($folderPath) <= 0) {
            $folderPath = $this->GetPath() . '/templates/' . (strlen($componentTemplate) > 0 ? $componentTemplate : '.default');
        }
        $APPLICATION->AddHeadScript($folderPath . '/proceed.js');
    } elseif ($arParams["STEP"] == 0) {
        $arResult["PATH"] = $this->GetPath() . '/templates/' . (strlen($componentTemplate) > 0 ? $componentTemplate : '.default') . '/';
    }
}
$arTmpParams = array("STEP" => intval($arParams["STEP"]) + 1, "DELIVERY_ID" => $arParams["DELIVERY_ID"], "DELIVERY" => $arParams["DELIVERY"], "PROFILE" => $arParams["PROFILE"], "WEIGHT" => doubleval($arParams["ORDER_WEIGHT"]), "PRICE" => doubleval($arParams["ORDER_PRICE"]), "LOCATION" => intval($arParams["LOCATION_TO"]), "LOCATION_ZIP" => $arParams['LOCATION_ZIP'], "CURRENCY" => $arParams["CURRENCY"], "INPUT_NAME" => $arParams["INPUT_NAME"], "TEMP" => $arParams["~TEMP"], "ITEMS" => $arParams["ITEMS"], "EXTRA_PARAMS_CALLBACK" => $arParams["EXTRA_PARAMS_CALLBACK"], "ORDER_DATA" => $arParams["ORDER_DATA"]);
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:31,代码来源:component.php

示例2: GetLayout

    function GetLayout()
    {
        $wizard = $this->GetWizard();
        $formName = htmlspecialcharsbx($wizard->GetFormName());
        CUtil::InitJSCore(array("ajax"));
        $adminScript = CAdminPage::ShowScript();
        $charset = LANG_CHARSET;
        $wizardName = htmlspecialcharsEx($wizard->GetWizardName());
        $nextButtonID = htmlspecialcharsbx($wizard->GetNextButtonID());
        $prevButtonID = htmlspecialcharsbx($wizard->GetPrevButtonID());
        $cancelButtonID = htmlspecialcharsbx($wizard->GetCancelButtonID());
        $finishButtonID = htmlspecialcharsbx($wizard->GetFinishButtonID());
        IncludeAJAX();
        $ajaxScripts = $GLOBALS["APPLICATION"]->GetHeadStrings();
        $ajaxScripts .= $GLOBALS["APPLICATION"]->GetHeadScripts();
        $obStep = $wizard->GetCurrentStep();
        $arErrors = $obStep->GetErrors();
        $strError = $strJsError = "";
        if (count($arErrors) > 0) {
            foreach ($arErrors as $arError) {
                $strError .= $arError[0] . "<br />";
                if ($arError[1] !== false) {
                    $strJsError .= ($strJsError != "" ? ", " : "") . "{'name':'" . CUtil::addslashes($wizard->GetRealName($arError[1])) . "', 'title':'" . CUtil::addslashes(htmlspecialcharsback($arError[0])) . "'}";
                }
            }
            if (strlen($strError) > 0) {
                $strError = '<div id="step_error">' . $strError . "</div>";
            }
            $strJsError = '
			<script type="text/javascript">
				ShowWarnings([' . $strJsError . ']);
			</script>';
        }
        $stepTitle = $obStep->GetTitle();
        $stepSubTitle = $obStep->GetSubTitle();
        $autoSubmit = "";
        if ($obStep->IsAutoSubmit()) {
            $autoSubmit = 'setTimeout("AutoSubmit();", 500);';
        }
        $alertText = GetMessageJS("MAIN_WIZARD_WANT_TO_CANCEL");
        $loadingText = GetMessageJS("MAIN_WIZARD_WAIT_WINDOW_TEXT");
        $package = $wizard->GetPackage();
        return <<<HTML
<!DOCTYPE html>
<html id="bx-admin-prefix">
<head>
\t<head>
\t\t<title>{$wizardName}</title>
\t\t<meta http-equiv="X-UA-Compatible" content="IE=edge">
\t\t<meta http-equiv="Content-Type" content="text/html; charset={$charset}">
\t\t{$ajaxScripts}
\t\t<style type="text/css">
\t\t\tbody
\t\t\t{
\t\t\t\tmargin:0;
\t\t\t\tpadding:0;
\t\t\t\tfont-size: 13px;
\t\t\t\tfont-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
\t\t\t}
\t\t\ttable {font-size:100%;}
\t\t\tform {margin:0; padding:0; }

\t\t\ta {
\t\t\t\tcolor: #2675D7;
\t\t\t\ttext-decoration: underline;
\t\t\t}


\t\t\t.step-content {
\t\t\t\tborder: solid 1px #DCE7ED;
\t\t\t\tbackground-color: #F5F9F9;
\t\t\t\theight: 347px;
\t\t\t\toverflow: auto;
\t\t\t}

\t\t\t.step-header {
\t\t\t\tborder-bottom: 1px solid #DCE7ED;
\t\t\t\tfont-size: 12px;
\t\t\t\tpadding: 6px 30px 9px 9px;
\t\t\t\tmargin-bottom: 12px;
\t\t\t}

\t\t\t.step-title { font-size: 16px; }
\t\t\t.step-subtitle { font-size: 13px; }

\t\t\t.step-body {
\t\t\t\tpadding: 0 10px;
\t\t\t}

\t\t\t.step-buttons
\t\t\t{
\t\t\t\tpadding-top: 12px;
\t\t\t\tpadding-left: 2px;
\t\t\t}

\t\t\t.step-buttons input {
\t\t\t\t-webkit-border-radius: 4px;
\t\t\t\tborder-radius: 4px;
\t\t\t\tborder:none;
\t\t\t\tborder-top:1px solid #fff;
//.........这里部分代码省略.........
开发者ID:Satariall,项目名称:izurit,代码行数:101,代码来源:wizard.php

示例3: GetLayout

    function GetLayout()
    {
        $wizard = $this->GetWizard();
        $formName = htmlspecialcharsbx($wizard->GetFormName());
        $adminScript = CAdminPage::ShowScript();
        $charset = LANG_CHARSET;
        $wizardName = htmlspecialcharsEx($wizard->GetWizardName());
        $nextButtonID = htmlspecialcharsbx($wizard->GetNextButtonID());
        $prevButtonID = htmlspecialcharsbx($wizard->GetPrevButtonID());
        $cancelButtonID = htmlspecialcharsbx($wizard->GetCancelButtonID());
        $finishButtonID = htmlspecialcharsbx($wizard->GetFinishButtonID());
        IncludeAJAX();
        $ajaxScripts = $GLOBALS["APPLICATION"]->GetHeadStrings();
        $ajaxScripts .= $GLOBALS["APPLICATION"]->GetHeadScripts();
        $obStep = $wizard->GetCurrentStep();
        $arErrors = $obStep->GetErrors();
        $strError = $strJsError = "";
        if (count($arErrors) > 0) {
            foreach ($arErrors as $arError) {
                $strError .= $arError[0] . "<br />";
                if ($arError[1] !== false) {
                    $strJsError .= ($strJsError != "" ? ", " : "") . "{'name':'" . CUtil::addslashes($wizard->GetRealName($arError[1])) . "', 'title':'" . CUtil::addslashes(htmlspecialcharsback($arError[0])) . "'}";
                }
            }
            if (strlen($strError) > 0) {
                $strError = '<div id="step_error">' . $strError . "</div>";
            }
            $strJsError = '
			<script type="text/javascript">
				ShowWarnings([' . $strJsError . ']);
			</script>';
        }
        $stepTitle = $obStep->GetTitle();
        $stepSubTitle = $obStep->GetSubTitle();
        $autoSubmit = "";
        if ($obStep->IsAutoSubmit()) {
            $autoSubmit = 'setTimeout("AutoSubmit();", 500);';
        }
        $alertText = GetMessage("MAIN_WIZARD_WANT_TO_CANCEL");
        $loadingText = GetMessage("MAIN_WIZARD_WAIT_WINDOW_TEXT");
        $package = $wizard->GetPackage();
        if ($package !== null) {
            $wizardPath = $package->GetPath();
            $arDescription = $package->GetDescription();
            $masterIcon = "";
            if (isset($arDescription["ICON"]) && strlen($arDescription["ICON"]) > 0) {
                $masterIcon = ' style="background-image:url(' . $wizardPath . '/' . $arDescription["ICON"] . ')"';
            }
        }
        $themeID = ADMIN_THEME_ID;
        return <<<HTML
<html>
\t<head>
\t\t<title>{$wizardName}</title>
\t\t<meta http-equiv="Content-Type" content="text/html; charset={$charset}">
\t\t{$ajaxScripts}
\t\t<style type="text/css">
\t\t\tbody
\t\t\t{
\t\t\t\tmargin:0;
\t\t\t\tpadding:0;
\t\t\t\tbackground-color: #DDE8F1;
\t\t\t\tfont-family:Verdana,Arial,helvetica,sans-serif;
\t\t\t\tfont-size:75%;
\t\t\t}
\t\t\ttable {font-size:100%;}
\t\t\tform {margin:0;}

\t\t\t#border-box
\t\t\t{
\t\t\t\tmargin:2px 2px 0 2px;
\t\t\t\tborder:1px solid #A9BBC8;
\t\t\t}

\t\t\t#step_info
\t\t\t{
\t\t\t\theight:45px;
\t\t\t\tpadding:8px 30px 8px 55px;
\t\t\t\tborder-bottom:1px solid #ccc;
\t\t\t\tbox-sizing:border-box;
\t\t\t\t-moz-box-sizing:border-box;
\t\t\t\toverflow:hidden;
\t\t\t\tbackground:#F2F5F9 url(/bitrix/themes/{$themeID}/images/wizard/wizard.gif) 10px center no-repeat;

\t\t\t}

\t\t\t#step_title
\t\t\t{
\t\t\t\tfont-weight:bold;
\t\t\t}

\t\t\t#step_description
\t\t\t{
\t\t\t\tfont-size:95%;
\t\t\t\tmargin-left:10px;
\t\t\t}

\t\t\t#step_content
\t\t\t{
\t\t\t\tpadding:20px 20px;
//.........这里部分代码省略.........
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:101,代码来源:wizard.php


注:本文中的IncludeAJAX函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。