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


PHP WizardServices::GetTemplates方法代码示例

本文整理汇总了PHP中WizardServices::GetTemplates方法的典型用法代码示例。如果您正苦于以下问题:PHP WizardServices::GetTemplates方法的具体用法?PHP WizardServices::GetTemplates怎么用?PHP WizardServices::GetTemplates使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WizardServices的用法示例。


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

示例1: ShowStep

 function ShowStep()
 {
     $wizard =& $this->GetWizard();
     $templatesPath = WizardServices::GetTemplatesPath($wizard->GetPath() . "/site");
     $arTemplates = WizardServices::GetTemplates($templatesPath);
     /*if (empty($arTemplates))
     		return;  */
     $arTemplateOrder = array();
     if (in_array("eshop_adapt", array_keys($arTemplates))) {
         $arTemplateOrder[] = "eshop_adapt_horizontal";
         //	$arTemplateOrder[] = "eshop_adapt_vertical";
     }
     if (in_array("eshop", array_keys($arTemplates))) {
         $arTemplateOrder[] = "eshop_horizontal";
         $arTemplateOrder[] = "eshop_vertical";
         $arTemplateOrder[] = "eshop_vertical_popup";
     }
     $defaultTemplateID = COption::GetOptionString("main", "wizard_template_id", "eshop_adapt_horizontal", $wizard->GetVar("siteID"));
     if (!in_array($defaultTemplateID, array("eshop_adapt_horizontal", "eshop_adapt_vertical", "eshop_vertical", "eshop_horizontal", "eshop_vertical_popup"))) {
         $defaultTemplateID = "eshop_adapt_horizontal";
     }
     $wizard->SetDefaultVar("wizTemplateID", $defaultTemplateID);
     $arTemplateInfo = array("eshop_adapt_horizontal" => array("NAME" => GetMessage("WIZ_TEMPLATE_ADAPT_HORIZONTAL"), "DESCRIPTION" => "", "PREVIEW" => $wizard->GetPath() . "/site/templates/eshop_adapt/images/" . LANGUAGE_ID . "/preview_horizontal.gif", "SCREENSHOT" => $wizard->GetPath() . "/site/templates/eshop_adapt/images/" . LANGUAGE_ID . "/screen_horizontal.gif"), "eshop_adapt_vertical" => array("NAME" => GetMessage("WIZ_TEMPLATE_ADAPT_VERTICAL"), "DESCRIPTION" => "", "PREVIEW" => $wizard->GetPath() . "/site/templates/eshop_adapt/images/" . LANGUAGE_ID . "/preview_vertical.gif", "SCREENSHOT" => $wizard->GetPath() . "/site/templates/eshop_adapt/images/" . LANGUAGE_ID . "/screen_vertical.gif"), "eshop_horizontal" => array("NAME" => GetMessage("WIZ_TEMPLATE_HORIZONTAL"), "DESCRIPTION" => "", "PREVIEW" => $wizard->GetPath() . "/site/templates/eshop/lang/" . LANGUAGE_ID . "/preview_horizontal.gif", "SCREENSHOT" => $wizard->GetPath() . "/site/templates/eshop/lang/" . LANGUAGE_ID . "/screen_horizontal.gif"), "eshop_vertical" => array("NAME" => GetMessage("WIZ_TEMPLATE_VERTICAL"), "DESCRIPTION" => "", "PREVIEW" => $wizard->GetPath() . "/site/templates/eshop/lang/" . LANGUAGE_ID . "/preview_vertical.gif", "SCREENSHOT" => $wizard->GetPath() . "/site/templates/eshop/lang/" . LANGUAGE_ID . "/screen_vertical.gif"), "eshop_vertical_popup" => array("NAME" => GetMessage("WIZ_TEMPLATE_VERTICAL_POPUP"), "DESCRIPTION" => "", "PREVIEW" => $wizard->GetPath() . "/site/templates/eshop/lang/" . LANGUAGE_ID . "/preview_vertical_popup.gif", "SCREENSHOT" => $wizard->GetPath() . "/site/templates/eshop/lang/" . LANGUAGE_ID . "/screen_vertical_popup.gif"));
     //	$this->content .= "<input type='hidden' value='eshop' name='templateID' id='templateID'>";//$this->ShowInputField('hidden', 'templateID', array("id" => "templateID", "value" => "eshop"));
     global $SHOWIMAGEFIRST;
     $SHOWIMAGEFIRST = true;
     $this->content .= '<div class="inst-template-list-block">';
     foreach ($arTemplateOrder as $templateID) {
         $arTemplate = $arTemplateInfo[$templateID];
         if (!$arTemplate) {
             continue;
         }
         $this->content .= '<div class="inst-template-description">';
         $this->content .= $this->ShowRadioField("wizTemplateID", $templateID, array("id" => $templateID, "class" => "inst-template-list-inp"));
         global $SHOWIMAGEFIRST;
         $SHOWIMAGEFIRST = true;
         if ($arTemplate["SCREENSHOT"] && $arTemplate["PREVIEW"]) {
             $this->content .= CFile::Show2Images($arTemplate["PREVIEW"], $arTemplate["SCREENSHOT"], 150, 150, ' class="inst-template-list-img"');
         } else {
             $this->content .= CFile::ShowImage($arTemplate["SCREENSHOT"], 150, 150, ' class="inst-template-list-img"', "", true);
         }
         $this->content .= '<label for="' . $templateID . '" class="inst-template-list-label">' . $arTemplate["NAME"] . "</label>";
         $this->content .= "</div>";
     }
     $this->content .= "</div>";
 }
开发者ID:Tsevmenko,项目名称:inpas,代码行数:46,代码来源:wizard.php

示例2: InstallService

 function InstallService($serviceID, $serviceStage)
 {
     $wizard =& $this->GetWizard();
     $siteID = WizardServices::GetCurrentSiteID($wizard->GetVar("siteID"));
     define("WIZARD_SITE_ID", $siteID);
     define("WIZARD_SITE_ROOT_PATH", $_SERVER["DOCUMENT_ROOT"]);
     $rsSites = CSite::GetByID($siteID);
     if ($arSite = $rsSites->Fetch()) {
         define("WIZARD_SITE_DIR", $arSite["DIR"]);
     } else {
         define("WIZARD_SITE_DIR", "/");
     }
     define("WIZARD_SITE_PATH", str_replace("//", "/", WIZARD_SITE_ROOT_PATH . "/" . WIZARD_SITE_DIR . "/"));
     $wizardPath = $wizard->GetPath();
     define("WIZARD_RELATIVE_PATH", $wizardPath);
     define("WIZARD_ABSOLUTE_PATH", $_SERVER["DOCUMENT_ROOT"] . $wizardPath);
     $templatesPath = WizardServices::GetTemplatesPath(WIZARD_RELATIVE_PATH . "/site");
     $arTemplates = WizardServices::GetTemplates($templatesPath);
     $templateID = $wizard->GetVar("templateID");
     define("WIZARD_TEMPLATE_ID", $templateID);
     define("WIZARD_TEMPLATE_RELATIVE_PATH", $templatesPath . "/" . WIZARD_TEMPLATE_ID);
     define("WIZARD_TEMPLATE_ABSOLUTE_PATH", $_SERVER["DOCUMENT_ROOT"] . WIZARD_TEMPLATE_RELATIVE_PATH);
     $themeID = $wizard->GetVar($templateID . "_themeID");
     $arThemes = WizardServices::GetThemes(WIZARD_TEMPLATE_RELATIVE_PATH . "/themes");
     define("WIZARD_THEME_ID", $themeID);
     define("WIZARD_THEME_RELATIVE_PATH", WIZARD_TEMPLATE_RELATIVE_PATH . "/themes/" . WIZARD_THEME_ID);
     define("WIZARD_THEME_ABSOLUTE_PATH", $_SERVER["DOCUMENT_ROOT"] . WIZARD_THEME_RELATIVE_PATH);
     $servicePath = WIZARD_RELATIVE_PATH . "/site/services/" . $serviceID;
     define("WIZARD_SERVICE_RELATIVE_PATH", $servicePath);
     define("WIZARD_SERVICE_ABSOLUTE_PATH", $_SERVER["DOCUMENT_ROOT"] . $servicePath);
     define("WIZARD_IS_RERUN", $_SERVER["PHP_SELF"] != "/index.php");
     define("WIZARD_SITE_LOGO", intval($wizard->GetVar("siteLogo")));
     define("WIZARD_INSTALL_DEMO_DATA", $wizard->GetVar("installDemoData") == "Y");
     define("WIZARD_REINSTALL_DATA", false);
     define("WIZARD_FIRST_INSTAL", $firstStep = COption::GetOptionString("main", "wizard_first" . substr($wizard->GetID(), 7) . "_" . $wizard->GetVar("siteID"), false, $wizard->GetVar("siteID")));
     $dbUsers = CGroup::GetList($by = "id", $order = "asc", array("ACTIVE" => "Y"));
     while ($arUser = $dbUsers->Fetch()) {
         define("WIZARD_" . $arUser["STRING_ID"] . "_GROUP", $arUser["ID"]);
     }
     if (!file_exists(WIZARD_SERVICE_ABSOLUTE_PATH . "/" . $serviceStage)) {
         return false;
     }
     if (LANGUAGE_ID != "en" && LANGUAGE_ID != "ru") {
         if (file_exists($fname = WIZARD_SERVICE_ABSOLUTE_PATH . "/lang/" . LangSubst(LANGUAGE_ID) . "/" . $serviceStage)) {
             __IncludeLang($fname, false, true);
         }
     }
     if (file_exists($fname = WIZARD_SERVICE_ABSOLUTE_PATH . "/lang/" . LANGUAGE_ID . "/" . $serviceStage)) {
         __IncludeLang($fname, false, true);
     }
     @set_time_limit(3600);
     global $DB, $DBType, $APPLICATION, $USER, $CACHE_MANAGER;
     include WIZARD_SERVICE_ABSOLUTE_PATH . "/" . $serviceStage;
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:54,代码来源:wizard.php

示例3: ShowStep

    function ShowStep()
    {
        $wizard =& $this->GetWizard();
        $templatesPath = WizardServices::GetTemplatesPath($wizard->GetPath() . "/site");
        $arTemplates = WizardServices::GetTemplates($templatesPath);
        /*if (empty($arTemplates))
        		return;  */
        $arTemplateOrder = array();
        $arT = array("youstore_default");
        if (in_array("youstore", array_keys($arTemplates))) {
            $arTemplateOrder = $arT;
        }
        $defaultTemplateID = COption::GetOptionString("main", "wizard_template_id", "youstore_default", $wizard->GetVar("siteID"));
        if (!in_array($defaultTemplateID, $arT)) {
            $defaultTemplateID = "youstore_();";
        }
        $wizard->SetDefaultVar("wizTemplateID", $defaultTemplateID);
        $arTemplateInfo = array();
        $arThemes = array("default");
        foreach ($arThemes as $templ) {
            $arTemplateInfo['youstore_' . $templ] = array("NAME" => GetMessage("WIZ_TEMPLATE_youstore_" . $templ), "DESCRIPTION" => "", "PREVIEW" => $wizard->GetPath() . "/images/ru/small/" . $templ . ".png", "SCREENSHOT" => $wizard->GetPath() . "/images/ru/big/" . $templ . ".png");
        }
        //	$this->content .= "<input type='hidden' value='youstore' name='templateID' id='templateID'>";//$this->ShowInputField('hidden', 'templateID', array("id" => "templateID", "value" => "youstore"));
        global $SHOWIMAGEFIRST;
        $SHOWIMAGEFIRST = true;
        $this->content .= '<div class="inst-template-list-block">';
        foreach ($arTemplateOrder as $templateID) {
            $arTemplate = $arTemplateInfo[$templateID];
            if (!$arTemplate) {
                continue;
            }
            $this->content .= '<div class="inst-template-description">';
            $this->content .= $this->ShowRadioField("wizTemplateID", $templateID, array("id" => $templateID, "class" => "inst-template-list-inp"));
            global $SHOWIMAGEFIRST;
            $SHOWIMAGEFIRST = true;
            if ($arTemplate["SCREENSHOT"] && $arTemplate["PREVIEW"]) {
                $this->content .= CFile::Show2Images($arTemplate["PREVIEW"], $arTemplate["SCREENSHOT"], 150, 150, ' class="inst-template-list-img"');
            } else {
                $this->content .= CFile::ShowImage($arTemplate["SCREENSHOT"], 150, 150, ' class="inst-template-list-img"', "", true);
            }
            $this->content .= '<label for="' . $templateID . '" class="inst-template-list-label">' . $arTemplate["NAME"] . "</label>";
            $this->content .= "</div>";
        }
        $this->content .= "</div>";
        $this->content .= '<script>
			function ImgShw(ID, width, height, alt)
			{
				var scroll = "no";
				var top=0, left=0;
				if(width > screen.width-10 || height > screen.height-28) scroll = "yes";
				if(height < screen.height-28) top = Math.floor((screen.height - height)/2-14);
				if(width < screen.width-10) left = Math.floor((screen.width - width)/2-5);
				width = Math.min(width, screen.width-10);
				height = Math.min(height, screen.height-28);
				var wnd = window.open("","","scrollbars="+scroll+",resizable=yes,width="+width+",height="+height+",left="+left+",top="+top);
				wnd.document.write(
					"<html><head>"+
						"<"+"script type=\\"text/javascript\\">"+
						"function KeyPress()"+
						"{"+
						"	if(window.event.keyCode == 27) "+
						"		window.close();"+
						"}"+
						"</"+"script>"+
						"<title></title></head>"+
						"<body topmargin=\\"0\\" leftmargin=\\"0\\" marginwidth=\\"0\\" marginheight=\\"0\\" onKeyPress=\\"KeyPress()\\">"+
						"<img src=\\""+ID+"\\" border=\\"0\\" alt=\\""+alt+"\\" />"+
						"</body></html>"
				);
				wnd.document.close();
			}
		</script>';
    }
开发者ID:sharapudinov,项目名称:lovestore.top,代码行数:73,代码来源:wizard.php

示例4: OnPostForm

 function OnPostForm()
 {
     $wizard =& $this->GetWizard();
     $serviceID = $wizard->GetVar("nextStep");
     $serviceStage = $wizard->GetVar("nextStepStage");
     if ($serviceID == "finish") {
         $wizard->SetCurrentStep("finish");
         return;
     }
     $defSiteName = GetMessage("wiz_site_default_name");
     if (GetMessage("wiz_site_name") != "") {
         $defSiteName = GetMessage("wiz_site_name");
     } elseif ($wizard->wizardName != "") {
         $defSiteName = $wizard->wizardName;
     }
     $res = false;
     $site_id = $wizard->GetVar("siteID");
     if ($site_id != "") {
         $db_res = CSite::GetList($by = "sort", $order = "desc", array("LID" => $site_id));
         if ($db_res) {
             $res = $db_res->Fetch();
         }
     }
     if ($wizard->GetVar("siteCreate") == "Y") {
         if (!$res) {
             $culture = CultureTable::getRow(array('filter' => array("=FORMAT_DATE" => LANGUAGE_ID == "en" ? "MM/DD/YYYY" : "DD.MM.YYYY", "=FORMAT_DATETIME" => LANGUAGE_ID == "en" ? "MM/DD/YYYY H:MI:SS T" : "DD.MM.YYYY HH:MI:SS", "=FORMAT_NAME" => CSite::GetDefaultNameFormat(), "=CHARSET" => defined("BX_UTF") ? "UTF-8" : (LANGUAGE_ID == "ru" ? "windows-1251" : "ISO-8859-1"))));
             if ($culture) {
                 $cultureId = $culture["ID"];
             } else {
                 $addResult = CultureTable::add(array("NAME" => $site_id, "CODE" => $site_id, "FORMAT_DATE" => LANGUAGE_ID == "en" ? "MM/DD/YYYY" : "DD.MM.YYYY", "FORMAT_DATETIME" => LANGUAGE_ID == "en" ? "MM/DD/YYYY H:MI:SS T" : "DD.MM.YYYY HH:MI:SS", "FORMAT_NAME" => CSite::GetDefaultNameFormat(), "CHARSET" => defined("BX_UTF") ? "UTF-8" : (LANGUAGE_ID == "ru" ? "windows-1251" : "ISO-8859-1")));
                 $cultureId = $addResult->getId();
             }
             $arFields = array("LID" => $site_id, "ACTIVE" => "Y", "SORT" => 100, "DEF" => "N", "NAME" => $defSiteName, "DIR" => $wizard->GetVar("siteFolder"), "SITE_NAME" => $defSiteName, "SERVER_NAME" => $_SERVER["SERVER_NAME"], "EMAIL" => COption::GetOptionString("main", "email_from"), "LANGUAGE_ID" => LANGUAGE_ID, "DOC_ROOT" => "", "CULTURE_ID" => $cultureId);
             $obSite = new CSite();
             $result = $obSite->Add($arFields);
             if (!$result) {
                 echo $obSite->LAST_ERROR;
                 die;
             }
         }
         $wizard->SetVar("siteCreate", "N");
     }
     $pattern = '/^(.*):(.*)\\((.*)\\)/';
     preg_match($pattern, $res["NAME"], $matches);
     if ($res && (count($matches) > 0 || $res["NAME"] == $site_id) && $site_id != "s1") {
         $templateID = $wizard->GetVar("templateID");
         $themeVarName = $templateID . "_themeID";
         $themeID = $wizard->GetVar($themeVarName);
         $templatesPath = WizardServices::GetTemplatesPath($wizard->GetPath() . "/site");
         $arTemplates = WizardServices::GetTemplates($templatesPath);
         $templatesPath = WizardServices::GetTemplatesPath($wizard->GetPath() . "/site");
         $arThemes = WizardServices::GetThemes($templatesPath . "/" . $templateID . "/themes", $templatesPath . "/" . $templateID);
         $siteNemNew = $defSiteName . ": " . $arTemplates[$templateID]["NAME"] . ' (' . $arThemes[$themeID]["NAME"] . ')';
         $obSite = new CSite();
         $obSite->Update($site_id, array("NAME" => $siteNemNew, "SITE_NAME" => $siteNemNew));
     } elseif ($res["NAME"] == GetMessage("MAIN_DEFAULT_SITE_NAME")) {
         $SiteNAME = $defSiteName . " (" . GetMessage("MAIN_DEFAULT_SITE_NAME") . ")";
         $obSite = new CSite();
         $obSite->Update($site_id, array("NAME" => $SiteNAME, "SITE_NAME" => $defSiteName));
     }
     CModule::IncludeModule('fileman');
     COption::SetOptionString("fileman", "different_set", "Y");
     $arMenuTypes = GetMenuTypes($site_id);
     if (count($arMenuTypes) == 0) {
         $arMenuTypes = array('left' => GetMessage("WIZ_MENU_LEFT"), 'top' => GetMessage("WIZ_MENU_TOP"), 'bottom' => GetMessage("WIZ_MENU_BOTTOM"));
     } else {
         if (!$arMenuTypes['left'] || $arMenuTypes['left'] == GetMessage("WIZ_MENU_LEFT_DEFAULT")) {
             $arMenuTypes['left'] = GetMessage("WIZ_MENU_LEFT");
         }
         if (!$arMenuTypes['top'] || $arMenuTypes['top'] == GetMessage("WIZ_MENU_TOP_DEFAULT")) {
             $arMenuTypes['top'] = GetMessage("WIZ_MENU_TOP");
         }
         if (!$arMenuTypes['bottom']) {
             $arMenuTypes['bottom'] = GetMessage("WIZ_MENU_BOTTOM");
         }
     }
     SetMenuTypes($arMenuTypes, $site_id);
     $arServices = WizardServices::GetServices($_SERVER["DOCUMENT_ROOT"] . $wizard->GetPath(), "/site/services/");
     $this->CorrectServices($arServices);
     if ($serviceStage == "skip") {
         $success = true;
     } else {
         $success = $this->InstallService($serviceID, $serviceStage);
     }
     if (!$this->repeatCurrentService) {
         list($nextService, $nextServiceStage, $stepsComplete, $status) = $this->GetNextStep($arServices, $serviceID, $serviceStage);
     }
     if ($nextService == "finish") {
         $response = "window.ajaxForm.StopAjax(); window.ajaxForm.SetStatus('100'); window.ajaxForm.Post('" . $nextService . "', '" . $nextServiceStage . "','" . $status . "');";
         COption::SetOptionString("main", "wizard_first" . substr($wizard->GetID(), 7) . "_" . $wizard->GetVar("siteID"), "Y", false);
     } else {
         $arServiceID = array_keys($arServices);
         $lastService = array_pop($arServiceID);
         $stepsCount = $arServices[$lastService]["POSITION"];
         if (array_key_exists("STAGES", $arServices[$lastService]) && is_array($arServices[$lastService])) {
             $stepsCount += count($arServices[$lastService]["STAGES"]) - 1;
         }
         $percent = round($stepsComplete / $stepsCount * 100);
         $response = "window.ajaxForm.SetStatus('" . $percent . "'); window.ajaxForm.Post('" . $nextService . "', '" . $nextServiceStage . "','" . $status . "');";
     }
//.........这里部分代码省略.........
开发者ID:spas-viktor,项目名称:books,代码行数:101,代码来源:wizard.php

示例5: ShowStep

	function ShowStep()
	{
		$wizard =& $this->GetWizard();
			

		$templatesPath = WizardServices::GetTemplatesPath($wizard->GetPath()."/site");
		$arTemplates = WizardServices::GetTemplates($templatesPath);
		/*if (empty($arTemplates))
			return;  */

		$arTemplateOrder = array();

		if (in_array("eshop_adapt", array_keys($arTemplates)))
		{
			$arTemplateOrder[] = "eshop_adapt_horizontal";
		}
		if (in_array("eshop", array_keys($arTemplates)))
		{
			$arTemplateOrder[] = "eshop_horizontal";
			$arTemplateOrder[] = "eshop_vertical";
			$arTemplateOrder[] = "eshop_vertical_popup";
		}

		$defaultTemplateID = COption::GetOptionString("main", "wizard_template_id", "eshop_adapt_horizontal", $wizard->GetVar("siteID"));
		if (!in_array($defaultTemplateID, array("eshop_adapt_horizontal", "eshop_vertical", "eshop_horizontal", "eshop_vertical_popup"))) $defaultTemplateID = "eshop_adapt_horizontal";
		$wizard->SetDefaultVar("wizTemplateID", $defaultTemplateID);

		$arTemplateInfo = array(
			"eshop_adapt_horizontal" => array(
				"NAME" => GetMessage("WIZ_TEMPLATE_ADAPT_HORIZONTAL"),
				"DESCRIPTION" => "",
				"PREVIEW" => $wizard->GetPath()."/site/templates/eshop_adapt/images/".LANGUAGE_ID."/preview_horizontal.gif",
				"SCREENSHOT" => $wizard->GetPath()."/site/templates/eshop_adapt/images/".LANGUAGE_ID."/screen_horizontal.gif",
			),
			"eshop_horizontal" => array(
				"NAME" => GetMessage("WIZ_TEMPLATE_HORIZONTAL"),
				"DESCRIPTION" => "",
				"PREVIEW" => $wizard->GetPath()."/site/templates/eshop/lang/".LANGUAGE_ID."/preview_horizontal.gif",
				"SCREENSHOT" => $wizard->GetPath()."/site/templates/eshop/lang/".LANGUAGE_ID."/screen_horizontal.gif",
			),
			"eshop_vertical" => array(
				"NAME" => GetMessage("WIZ_TEMPLATE_VERTICAL"),
				"DESCRIPTION" => "",
				"PREVIEW" => $wizard->GetPath()."/site/templates/eshop/lang/".LANGUAGE_ID."/preview_vertical.gif",
				"SCREENSHOT" => $wizard->GetPath()."/site/templates/eshop/lang/".LANGUAGE_ID."/screen_vertical.gif",
			),	
			"eshop_vertical_popup" => array(
				"NAME" => GetMessage("WIZ_TEMPLATE_VERTICAL_POPUP"),
				"DESCRIPTION" => "",
				"PREVIEW" => $wizard->GetPath()."/site/templates/eshop/lang/".LANGUAGE_ID."/preview_vertical_popup.gif",
				"SCREENSHOT" => $wizard->GetPath()."/site/templates/eshop/lang/".LANGUAGE_ID."/screen_vertical_popup.gif",
			),		
		);


	//	$this->content .= "<input type='hidden' value='eshop' name='templateID' id='templateID'>";//$this->ShowInputField('hidden', 'templateID', array("id" => "templateID", "value" => "eshop"));

		global $SHOWIMAGEFIRST;
		$SHOWIMAGEFIRST = true;

		$this->content .= '<div class="inst-template-list-block">';
		foreach ($arTemplateOrder as $templateID)
		{
			$arTemplate = $arTemplateInfo[$templateID];

			if (!$arTemplate)
				continue;

			$this->content .= '<div class="inst-template-description">';
			$this->content .= $this->ShowRadioField("wizTemplateID", $templateID, Array("id" => $templateID, "class" => "inst-template-list-inp"));

			global $SHOWIMAGEFIRST;
			$SHOWIMAGEFIRST = true;

			if ($arTemplate["SCREENSHOT"] && $arTemplate["PREVIEW"])
				$this->content .= CFile::Show2Images($arTemplate["PREVIEW"], $arTemplate["SCREENSHOT"], 150, 150, ' class="inst-template-list-img"');
			else
				$this->content .= CFile::ShowImage($arTemplate["SCREENSHOT"], 150, 150, ' class="inst-template-list-img"', "", true);

			$this->content .= '<label for="'.$templateID.'" class="inst-template-list-label">'.$arTemplate["NAME"]."</label>";
			$this->content .= "</div>";
		}

		$this->content .= "</div>";
		$this->content .= '<script>
			function ImgShw(ID, width, height, alt)
			{
				var scroll = "no";
				var top=0, left=0;
				if(width > screen.width-10 || height > screen.height-28) scroll = "yes";
				if(height < screen.height-28) top = Math.floor((screen.height - height)/2-14);
				if(width < screen.width-10) left = Math.floor((screen.width - width)/2-5);
				width = Math.min(width, screen.width-10);
				height = Math.min(height, screen.height-28);
				var wnd = window.open("","","scrollbars="+scroll+",resizable=yes,width="+width+",height="+height+",left="+left+",top="+top);
				wnd.document.write(
					"<html><head>"+
						"<"+"script type=\"text/javascript\">"+
						"function KeyPress()"+
						"{"+
//.........这里部分代码省略.........
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:101,代码来源:wizard.php

示例6: ShowStep

    function ShowStep()
    {
        $wizard =& $this->GetWizard();
        $templatesPath = WizardServices::GetTemplatesPath("/bitrix/modules/intranet/install");
        $arTemplates = WizardServices::GetTemplates($templatesPath, $wizard->GetPath());
        if (empty($arTemplates)) {
            return;
        }
        $arTemplateOrder = array("bitrix24", "light", "bright", "modern", "classic");
        $defaultTemplateID = COption::GetOptionString("main", "wizard_template_id", "", $wizard->GetVar("siteID"));
        if (strlen($defaultTemplateID) > 0 && array_key_exists($defaultTemplateID, $arTemplates)) {
            $wizard->SetDefaultVar("templateID", $defaultTemplateID);
        } else {
            $defaultTemplateID = "";
        }
        global $SHOWIMAGEFIRST;
        $SHOWIMAGEFIRST = true;
        $this->content .= '<table width="100%" cellspacing="4" cellpadding="8">';
        foreach ($arTemplateOrder as $templateID) {
            $arTemplate = $arTemplates[$templateID];
            if (!$arTemplate) {
                continue;
            }
            if ($defaultTemplateID == "") {
                $defaultTemplateID = $templateID;
                $wizard->SetDefaultVar("templateID", $defaultTemplateID);
            }
            $this->content .= "<tr>";
            $this->content .= '<td width="25">' . $this->ShowRadioField("templateID", $templateID, array("id" => $templateID)) . "</td>";
            global $SHOWIMAGEFIRST;
            $SHOWIMAGEFIRST = true;
            if ($arTemplate["SCREENSHOT"] && $arTemplate["PREVIEW"]) {
                $this->content .= '<td width="160" valign="top">' . CFile::Show2Images($arTemplate["PREVIEW"], $arTemplate["SCREENSHOT"], 150, 150, ' border="0"') . "</td>";
            } else {
                $this->content .= '<td width="160" valign="top">' . CFile::ShowImage($arTemplate["SCREENSHOT"], 150, 150, ' border="0"', "", true) . "</td>";
            }
            $this->content .= '<td valign="top"><label for="' . $templateID . '"><b>' . $arTemplate["NAME"] . "</b><p>" . $arTemplate["DESCRIPTION"] . "</p></label></td>";
            $this->content .= "</tr>";
            $this->content .= "<tr><td><br /></td></tr>";
        }
        $this->content .= "</table>";
        $this->content .= '<script>
			function ImgShw(ID, width, height, alt)
			{
				var scroll = "no";
				var top=0, left=0;
				if(width > screen.width-10 || height > screen.height-28) scroll = "yes";
				if(height < screen.height-28) top = Math.floor((screen.height - height)/2-14);
				if(width < screen.width-10) left = Math.floor((screen.width - width)/2-5);
				width = Math.min(width, screen.width-10);
				height = Math.min(height, screen.height-28);
				var wnd = window.open("","","scrollbars="+scroll+",resizable=yes,width="+width+",height="+height+",left="+left+",top="+top);
				wnd.document.write(
					"<html><head>"+
						"<"+"script type=\\"text/javascript\\">"+
						"function KeyPress()"+
						"{"+
						"	if(window.event.keyCode == 27) "+
						"		window.close();"+
						"}"+
						"</"+"script>"+
						"<title></title></head>"+
						"<body topmargin=\\"0\\" leftmargin=\\"0\\" marginwidth=\\"0\\" marginheight=\\"0\\" onKeyPress=\\"KeyPress()\\">"+
						"<img src=\\""+ID+"\\" border=\\"0\\" alt=\\""+alt+"\\" />"+
						"</body></html>"
				);
				wnd.document.close();
			}
		</script>';
    }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:70,代码来源:wizard.php


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