示例#1
0
 function ShowStep()
 {
     $wizard =& $this->GetWizard();
     $templateID = $wizard->GetSiteTemplateID();
     $themePath = DemoSiteUtil::GetTemplatesPath($wizard->GetPath()) . "/" . $templateID . "/themes";
     $arThemes = DemoSiteUtil::GetThemes($_SERVER["DOCUMENT_ROOT"] . $themePath);
     $this->content .= '<table cellspacing="0" cellpadding="2" width="540"><tr>';
     $colsNumber = 3;
     $counter = 1;
     $cellSize = count($arThemes);
     foreach ($arThemes as $arTheme) {
         $path = $themePath . "/" . $arTheme["ID"];
         $this->content .= '<td valign="top" style="padding-bottom:0px;" width="33%">';
         if ($arTheme["SCREENSHOT"] && $arTheme["PREVIEW"]) {
             $this->content .= CFile::Show2Images($path . "/preview.gif", $path . "/screen.gif", 150, 150, ' border="0"') . "<br />";
         } else {
             $this->content .= CFile::ShowImage($path . "/screen.gif", 150, 150, ' border="0"', "", true) . "<br />";
         }
         $themeVarName = $templateID . "_themeID";
         if (isset($arTheme["DEFAULT"]) && $arTheme["DEFAULT"] == "Y") {
             $wizard->SetDefaultVar($themeVarName, $arTheme["ID"]);
         }
         $this->content .= '<table><tr><td valign="top">';
         $this->content .= $this->ShowRadioField($themeVarName, $arTheme["ID"], array("id" => $arTheme["ID"]));
         $this->content .= '</td><td>';
         $this->content .= '<label for="' . $arTheme["ID"] . '">';
         $this->content .= $arTheme["NAME"];
         $this->content .= '</label>';
         $this->content .= '</td></tr></table>';
         $this->content .= "</td>";
         //Close table cells
         if (!($counter % $colsNumber) && $cellSize != $counter) {
             $this->content .= "</tr><tr>";
         }
         if ($cellSize == $counter && $cellSize % $colsNumber > 0) {
             for ($a = 1; $a <= $colsNumber - $cellSize % $colsNumber; $a++) {
                 $this->content .= "<td>&nbsp;</td>";
             }
         }
         $counter++;
     }
     $this->content .= "</tr></table>";
 }
示例#2
0
 function ShowStep()
 {
     $wizard =& $this->GetWizard();
     $templatesPath = WizardServices::GetTemplatesPath($wizard->GetPath() . "/site");
     $arTemplates = WizardServices::GetTemplates($templatesPath);
     $arTemplateOrder = array();
     if (in_array("eshop_bootstrap", array_keys($arTemplates))) {
         $arTemplateOrder[] = "eshop_bootstrap";
     }
     $defaultTemplateID = COption::GetOptionString("main", "wizard_template_id", "eshop_bootstrap", $wizard->GetVar("siteID"));
     if (!in_array($defaultTemplateID, array("eshop_bootstrap"))) {
         $defaultTemplateID = "eshop_bootstrap";
     }
     $wizard->SetDefaultVar("wizTemplateID", $defaultTemplateID);
     $arTemplateInfo = array("eshop_bootstrap" => array("NAME" => GetMessage("WIZ_TEMPLATE_ADAPT_HORIZONTAL"), "DESCRIPTION" => "", "PREVIEW" => $wizard->GetPath() . "/site/templates/eshop_bootstrap/images/" . LANGUAGE_ID . "/preview_horizontal.gif", "SCREENSHOT" => $wizard->GetPath() . "/site/templates/eshop_bootstrap/images/" . LANGUAGE_ID . "/screen_horizontal.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>";
 }
示例#3
0
    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>';
    }
示例#4
0
                CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . $from, $_SERVER["DOCUMENT_ROOT"] . $to, false, true);
                break;
        }
    }
}
/** @global string $by */
/** @global string $order */
$rsData = CSiteTemplate::GetList(array($by => $order), array(), array("ID", "NAME", "DESCRIPTION", "SCREENSHOT", "SORT"));
$rsData = new CAdminResult($rsData, $sTableID);
$rsData->NavStart();
$lAdmin->NavText($rsData->GetNavPrint(GetMessage("PAGES"), false));
$lAdmin->AddHeaders(array(array("id" => "SCREENSHOT", "content" => GetMessage("site_templ_edit_screen"), "default" => true), array("id" => "ID", "content" => "ID", "sort" => "id", "default" => true), array("id" => "NAME", "content" => GetMessage('MAIN_T_ADMIN_NAME'), "sort" => "name", "default" => true), array("id" => "DESCRIPTION", "content" => GetMessage('MAIN_T_ADMIN_DESCRIPTION'), "sort" => "description", "default" => true), array("id" => "SORT", "content" => GetMessage("site_templ_edit_sort"), "sort" => "sort", "default" => true)));
while ($arRes = $rsData->NavNext(true, "f_")) {
    $u_ID = urlencode($f_ID);
    $row =& $lAdmin->AddRow($f_ID, $arRes, "template_edit.php?ID=" . $u_ID, GetMessage("MAIN_EDIT_TITLE"));
    $row->AddViewField("SCREENSHOT", $f_SCREENSHOT != '' ? CFile::Show2Images($f_PREVIEW != '' ? $f_PREVIEW : $f_SCREENSHOT, $f_SCREENSHOT, 130, 100, "border=0") : '');
    $row->AddViewField("ID", '<a href="template_edit.php?lang=' . LANGUAGE_ID . '&amp;ID=' . $u_ID . '" title="' . GetMessage("MAIN_EDIT_TITLE") . '">' . $f_ID . '</a>');
    if ($edit_php) {
        $row->AddInputField("NAME");
        $row->AddInputField("DESCRIPTION");
        $row->AddInputField("SORT");
    } else {
        $row->AddViewField("NAME", $f_NAME);
        $row->AddViewField("DESCRIPTION", $f_DESCRIPTION);
        $row->AddViewField("SORT", $f_SORT);
    }
    $arActions = array();
    $arActions[] = array("ICON" => "edit", "TEXT" => $USER->CanDoOperation('edit_other_settings') || $USER->CanDoOperation('lpa_template_edit') ? GetMessage("MAIN_ADMIN_MENU_EDIT") : GetMessage("MAIN_ADMIN_MENU_VIEW"), "ACTION" => $lAdmin->ActionRedirect("template_edit.php?ID=" . $u_ID));
    if ($edit_php) {
        $arActions[] = array("ICON" => "copy", "TEXT" => GetMessage("MAIN_ADMIN_MENU_COPY"), "ACTION" => $lAdmin->ActionDoGroup($u_ID, "copy"));
        $arActions[] = array("ICON" => "export", "TEXT" => GetMessage("MAIN_ADMIN_LIST_EXPORT"), "ACTION" => "exportData('" . $u_ID . "')");
示例#5
0
    private static function DisplayFile($arFile = array(), $ind = 0)
    {
        $hintId = self::$jsId . '_file_disp_' . $ind;
        $bNotFound = $arFile['FILE_NOT_FOUND'];
        // Hint
        $hint = '';
        if (!$bNotFound) {
            $sImagePath = isset($arFile["PATH"]) ? $arFile["PATH"] : $arFile["SRC"];
            $descName = isset($arFile['DESC_NAME']) ? $arFile['DESC_NAME'] : self::$descInputName;
            if ($arFile['FORMATED_SIZE'] != '') {
                $hint .= '<span class="adm-input-file-hint-row">' . GetMessage('ADM_FILE_INFO_SIZE') . ':&nbsp;&nbsp;' . $arFile['FORMATED_SIZE'] . '</span>';
            }
            if ($arFile['IS_IMAGE']) {
                $hint .= '<span class="adm-input-file-hint-row">' . GetMessage('ADM_FILE_INFO_DIM') . ':&nbsp;&nbsp;' . $arFile['WIDTH'] . 'x' . $arFile['HEIGHT'] . '</span>';
            }
            if ($sImagePath != '') {
                $hint .= '<span class="adm-input-file-hint-row">' . GetMessage('ADM_FILE_INFO_LINK') . ':&nbsp;&nbsp;<a href="' . $sImagePath . '">' . $sImagePath . '</a></span>';
            }
            if (!self::$bShowDescInput && $arFile['DESCRIPTION'] != "") {
                $hint .= '<span class="adm-input-file-hint-row">' . GetMessage('ADM_FILE_DESCRIPTION') . ':&nbsp;&nbsp;' . htmlspecialcharsbx($arFile['DESCRIPTION']) . '</span>';
            }
        }
        ?>
<span class="adm-input-file-exist-cont" id="<?php 
        echo self::$jsId;
        ?>
_file_cont_<?php 
        echo $ind;
        ?>
">
		<div class="adm-input-file-ex-wrap<?php 
        if (self::$bMultiple) {
            echo ' adm-input-cont-bordered';
        }
        ?>
">
		<?php 
        if ($bNotFound) {
            ?>
			<span id="<?php 
            echo self::$jsId . '_file_404_' . $ind;
            ?>
" class="adm-input-file-not-found">
			<?php 
            echo GetMessage('ADM_FILE_NOT_FOUND');
            ?>
			</span>
			<?php 
        } elseif ($arFile['IS_IMAGE']) {
            $file = CFile::ResizeImageGet($arFile['ID'], array('width' => self::$maxPreviewWidth, 'height' => self::$maxPreviewHeight), BX_RESIZE_IMAGE_PROPORTIONAL, true);
            ?>
			<span id="<?php 
            echo $hintId;
            ?>
" class="adm-input-file-preview" style="<?php 
            if (self::$minPreviewWidth > 0) {
                echo 'min-width: ' . self::$minPreviewWidth . 'px;';
            }
            ?>
 <?php 
            if (self::$minPreviewHeight > 0) {
                echo 'min-height:' . self::$minPreviewHeight . 'px;';
            }
            ?>
">
				<?php 
            echo CFile::Show2Images($file['src'], $arFile['SRC'], self::$maxPreviewWidth, self::$maxPreviewHeight);
            ?>
				<div id="<?php 
            echo self::$jsId . '_file_del_lbl_' . $ind;
            ?>
" class="adm-input-file-del-lbl"><?php 
            echo GetMessage('ADM_FILE_DELETED_TITLE');
            ?>
</div>
			</span>
			<?php 
        } else {
            $val = !empty($arFile['FILE_NAME']) ? $arFile['FILE_NAME'] : $sImagePath;
            ?>
			<a id="<?php 
            echo $hintId;
            ?>
" href="<?php 
            echo htmlspecialcharsbx($arFile['SRC']);
            ?>
" class="adm-input-file-name"><?php 
            echo htmlspecialcharsbx($val);
            ?>
</a>
			<?php 
        }
        if ($hint != '') {
            ?>
		<script type="text/javascript">
			new top.BX.CHint({
				parent: top.BX("<?php 
            echo $hintId;
            ?>
"),
				show_timeout: 10,
				hide_timeout: 200,
				dx: 2,
				preventHide: true,
				min_width: 250,
				hint: '<?php 
            echo CUtil::JSEscape($hint);
            ?>
'
			});
		</script>
			<?php 
        }
        if (!self::$bViewMode) {
            self::ShowOpenerMenuHtml(self::$jsId . '_menu_' . $ind, $ind);
        }
        if (!$bNotFound && self::$bShowDescInput) {
            ?>
			<div id="<?php 
            echo self::$jsId . '_file_desc_' . $ind;
            ?>
" class="adm-input-file-desc-inp-cont" <?php 
            if ($arFile['DESCRIPTION'] == "") {
                echo 'style="display: none;"';
            }
            ?>
>
				<input name="<?php 
            echo $descName;
            ?>
" class="adm-input" type="text" value="<?php 
            echo htmlspecialcharsbx($arFile['DESCRIPTION']);
            ?>
" size="<?php 
            echo self::$inputSize;
            ?>
" placeholder="<?php 
            echo GetMessage("ADM_FILE_DESC");
            ?>
" <?php 
            if (self::$bViewMode) {
                echo ' disabled="disabled"';
            }
            ?>
>
			</div>
			<?php 
        }
        ?>
		</div>
		</span>
		<?php 
    }
示例#6
0

<?php 
// additional photos
$LINE_ELEMENT_COUNT = 3;
// number of elements in a row
if (count($arResult["MORE_PHOTO"]) > 0) {
    ?>
		<center><a name="more_photo">Дополнительные фотографии</a></center><br />
                <?php 
    foreach ($arResult["MORE_PHOTO"] as $PHOTO) {
        ?>


<?php 
        echo CFile::Show2Images($PHOTO["SRC"], $PHOTO["SRC"], 100, 50);
        ?>
			
                  
		<?php 
    }
    ?>
	<?php 
}
?>

<br class="brspace">
	<?php 
if (is_array($arResult["SECTION"])) {
    ?>
		<br /><a href="<?php 
示例#7
0
            echo $COMMENT['USER']['EXTERNAL_AUTH_ID'];
            ?>
" target="_blank"><span class="login"><?php 
            echo $COMMENT['USER']['NAME'] . ' ' . $COMMENT['USER']['LAST_NAME'];
            ?>
</span></a>
				</div>
				<div class="text" style="margin:7px 40px; color:#404040;"><?php 
            echo $COMMENT['TEXT'];
            ?>
 
					<?php 
            if ($COMMENT['FILE']) {
                ?>
						<span class="comment-img"><?php 
                echo CFile::Show2Images($COMMENT['PREVIEW_PICTURE'], $COMMENT['FILE']['ID'], 50, 50, "style='margin-left: -5px; margin-top: -5px;'");
                ?>
</span>
					<?php 
            }
            ?>
</div>
				<?php 
            if ($arResult['CAN_COMMENT'] == 'Y') {
                ?>
				<div class="otvet" id="reply_to_<?php 
                echo $COMMENT['ID'];
                ?>
">
					<?php 
                if ($arResult['SHOW_DATE'] == 'Y') {
示例#8
0
                    $n = 1;
                    $cell = 0;
                    while ($obElement = $rsElements->GetNextElement()) {
                        $cell++;
                        $arElement = $obElement->GetFields();
                        $image1 = intval($arElement["PREVIEW_PICTURE"]) <= 0 ? $arElement["DETAIL_PICTURE"] : $arElement["PREVIEW_PICTURE"];
                        $image2 = intval($arElement["DETAIL_PICTURE"]) <= 0 ? $arElement["PREVIEW_PICTURE"] : $arElement["DETAIL_PICTURE"];
                        ?>
				<td valign="top" width="<?php 
                        echo 100 / $LINE_ELEMENT_COUNT;
                        ?>
%">
					<table cellpadding="2" cellspacing="0" border="0">
						<tr>
							<td valign="top"><?php 
                        echo CFile::Show2Images($image1, $image2, 150, 150, "hspace='0' vspace='0' border='0' title='" . $arElement["NAME"] . "'", true);
                        ?>
</td>
						</tr>
						<tr>
							<td valign="top"><font class="text"><a href="<?php 
                        echo $arElement["DETAIL_PAGE_URL"];
                        ?>
"><?php 
                        echo $arElement["NAME"];
                        ?>
</a></font></td>
						</tr>
					</table></td>
					<?php 
                        if ($n % $LINE_ELEMENT_COUNT == 0) {
示例#9
0
	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()"+
						"{"+
						"	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>';
	}
示例#10
0
$lAdmin->NavText($rsData->GetNavPrint(GetMessage("PAGES"), false));

$lAdmin->AddHeaders(array(
	array("id"=>"SCREENSHOT", "content"=>GetMessage("site_templ_edit_screen"), "default"=>true),
	array("id"=>"ID", "content"=>"ID", "sort"=>"id", "default"=>true),
	array("id"=>"NAME", "content"=>GetMessage('MAIN_T_ADMIN_NAME'), "sort"=>"name", "default"=>true),
	array("id"=>"DESCRIPTION", "content"=>GetMessage('MAIN_T_ADMIN_DESCRIPTION'), "sort"=>"description", "default"=>true),
	array("id"=>"SORT", "content"=>GetMessage("site_templ_edit_sort"), "sort"=>"sort", "default"=>true),
));

while($arRes = $rsData->NavNext(true, "f_"))
{
	$u_ID = urlencode($f_ID);
	$row =& $lAdmin->AddRow($f_ID, $arRes, "template_edit.php?ID=".$u_ID, GetMessage("MAIN_EDIT_TITLE"));

	$row->AddViewField("SCREENSHOT", ($f_SCREENSHOT <> ''? CFile::Show2Images(($f_PREVIEW <> ''? $f_PREVIEW:$f_SCREENSHOT), $f_SCREENSHOT, 130, 100, "border=0") : ''));
	$row->AddViewField("ID", '<a href="template_edit.php?lang='.LANGUAGE_ID.'&amp;ID='.$u_ID.'" title="'.GetMessage("MAIN_EDIT_TITLE").'">'.$f_ID.'</a>');

	if ($edit_php)
	{
		$row->AddInputField("NAME");
		$row->AddInputField("DESCRIPTION");
		$row->AddInputField("SORT");
	}
	else
	{
		$row->AddViewField("NAME", $f_NAME);
		$row->AddViewField("DESCRIPTION", $f_DESCRIPTION);
		$row->AddViewField("SORT", $f_SORT);
	}
示例#11
0
                            echo GetMessage("BLOG_BLOG_BLOG_DEL_MES");
                            ?>
"></a>
									</td>
								<?php 
                        }
                        ?>
							</tr>
						<tr>
								<td colspan="3" style="padding-left:10px; padding-right:10px; padding-top:5px; padding-bottom:5px;"><font class="blogtext"><?php 
                        echo CFile::ShowImage($BlogUser["AVATAR"], 100, 100, "align='right'");
                        echo $text;
                        ?>
								<?php 
                        if (IntVal($arPost["ATTACH_IMG"]) > 0) {
                            echo CFile::Show2Images($arPost["ATTACH_IMG"], $arPost["ATTACH_IMG"], 300, 300, 'align="right" title="' . GetMessage("B_B_MES_FULL_SIZE") . '" border="0"');
                        }
                        ?>
</font><br clear="all">
								<?php 
                        if (IntVal($arPost["CATEGORY_ID"]) > 0) {
                            ?>

									<table width="100%" cellspacing="0" cellpadding="0" border="0" class="blogpostdate">
									<tr>
										<td style="padding-top:8px;padding-bottom:5px;"><div style="height:1px; overflow:hidden; background-color:#C7D2D5;"></div></td>
									</tr>
									<tr>
										<td align="left">						
											<?php 
                            $arCategory = CBlogCategory::GetByID($arPost["CATEGORY_ID"]);
示例#12
0
 function ShowStep()
 {
     $wizard =& $this->GetWizard();
     $templateID = $wizard->GetVar("templateID");
     $templatesPath = CExtranetWizardServices::GetTemplatesPath($wizard->GetPath() . "/site");
     $arThemes = CExtranetWizardServices::GetThemes($templatesPath . "/" . $templateID . "/themes");
     if (empty($arThemes)) {
         return;
     }
     $themeVarName = $templateID . "_themeID";
     $defaultThemeID = COption::GetOptionString("main", "wizard_" . $templateID . "_theme_id_extranet", "");
     if (strlen($defaultThemeID) > 0 && array_key_exists($defaultThemeID, $arThemes)) {
         $wizard->SetDefaultVar($themeVarName, $defaultThemeID);
     } else {
         $defaultThemeID = "red";
         $wizard->SetDefaultVar($themeVarName, $defaultThemeID);
     }
     $this->content .= '<table width="100%" cellspacing="4" cellpadding="8">';
     foreach ($arThemes as $themeID => $arTheme) {
         if ($defaultThemeID == "") {
             $defaultThemeID = $themeID;
             $wizard->SetDefaultVar($themeVarName, $defaultThemeID);
         }
         $this->content .= "<tr>";
         $this->content .= "<td>" . $this->ShowRadioField($themeVarName, $themeID, array("id" => $themeVarName . "_" . $themeID)) . "</td>";
         if ($arTheme["SCREENSHOT"] && $arTheme["PREVIEW"]) {
             $this->content .= '<td valign="top">' . CFile::Show2Images($arTheme["PREVIEW"], $arTheme["SCREENSHOT"], 150, 150, ' border="0"') . "</td>";
         } else {
             $this->content .= '<td valign="top">' . CFile::ShowImage($arTheme["SCREENSHOT"], 150, 150, ' border="0"', "", true) . "</td>";
         }
         $this->content .= '<td valign="top" width="100%"><label for="' . $themeVarName . "_" . $themeID . '"><b>' . $arTheme["NAME"] . "</b><br />" . $arTheme["DESCRIPTION"] . "</label></td>";
         $this->content .= "</tr>";
         $this->content .= "<tr><td><br /></td></tr>";
     }
     $this->content .= "</table>";
 }
示例#13
0
    function ShowStep()
    {
        $wizard =& $this->GetWizard();
        $this->content .= '
			<div class="wizard-input-form-block">
				<div class="wizard-catalog-title">' . GetMessage("WIZ_STEP_CT") . '</div>
				<div class="wizard-catalog-form">
					<div class="wizard-catalog-form-item">
						' . $this->ShowCheckboxField("catalogSmartFilter", "Y", array("id" => "catalog-filter")) . ' <label for="catalog-filter">' . GetMessage("WIZ_CATALOG_FILTER") . '</label><br />' . ' <p>' . GetMessage("WIZ_CATALOG_FILTER_DESCR") . '</p>
					</div>
					<div class="wizard-catalog-form-item">
						' . $this->ShowCheckboxField("catalogCompare", "Y", array("id" => "catalog-compare")) . ' <label for="catalog-compare">' . GetMessage("WIZ_CATALOG_COMPARE") . '</label><br />' . ' <p>' . GetMessage("WIZ_CATALOG_COMPARE_DESCR") . '</p>
					</div>
					<div class="wizard-catalog-form-item">
						' . $this->ShowCheckboxField("catalogSubscribe", "Y", array("id" => "catalog-suscribe")) . ' <label for="catalog-suscribe">' . GetMessage("WIZ_CATALOG_SUBSCRIBE") . '</label><br />' . ' <p>' . GetMessage("WIZ_CATALOG_SUBSCRIBE_DESCR") . '</p>
					</div>
					<div class="wizard-catalog-form-item">
						' . $this->ShowSelectField("catalogElementCount", array("15" => "15", "25" => "25", "50" => "50")) . ' <label for="catalogElementCount">' . GetMessage("WIZ_CATALOG_COUNT") . '</label><br />
					</div>
				</div>
			</div>';
        $this->content .= '
			<div class="wizard-input-form-block">
				<div class="wizard-catalog-title">' . GetMessage("WIZ_CATALOG_VIEW") . '</div>
				<div class="wizard-input-form-block-content">';
        $arCatalogViews = array("bar" => array("NAME" => GetMessage("WIZ_CATALOG_VIEW_BAR"), "DESCRIPTION" => GetMessage("WIZ_CATALOG_VIEW_BAR_DESCR"), "PREVIEW" => $wizard->GetPath() . "/images/" . LANGUAGE_ID . "/view-bar-small.png", "SCREENSHOT" => $wizard->GetPath() . "/images/" . LANGUAGE_ID . "/view-bar.png"), "list" => array("NAME" => GetMessage("WIZ_CATALOG_VIEW_LIST"), "DESCRIPTION" => GetMessage("WIZ_CATALOG_VIEW_LIST_DESCR"), "PREVIEW" => $wizard->GetPath() . "/images/" . LANGUAGE_ID . "/view-list-small.png", "SCREENSHOT" => $wizard->GetPath() . "/images/" . LANGUAGE_ID . "/view-list.png"), "price_list" => array("NAME" => GetMessage("WIZ_CATALOG_VIEW_PRICE_LIST"), "DESCRIPTION" => GetMessage("WIZ_CATALOG_VIEW_PRICE_LIST_DESCR"), "PREVIEW" => $wizard->GetPath() . "/images/" . LANGUAGE_ID . "/view-price-list-small.png", "SCREENSHOT" => $wizard->GetPath() . "/images/" . LANGUAGE_ID . "/view-price-list.png"));
        global $SHOWIMAGEFIRST;
        $SHOWIMAGEFIRST = true;
        $this->content .= '<div class="wizard-list-view-block ">';
        foreach ($arCatalogViews as $catalogViewID => $catalogView) {
            $this->content .= '<span class="wizard-list-view">';
            $this->content .= '
			<span class="wizard-list-view-top">
				' . $this->ShowRadioField("catalogView", $catalogViewID, array("id" => $catalogViewID)) . '
				<label for="' . $catalogViewID . '">' . $catalogView["NAME"] . '</label>
			</span>';
            if ($catalogView["SCREENSHOT"] && $catalogView["PREVIEW"]) {
                $this->content .= CFile::Show2Images($catalogView["PREVIEW"], $catalogView["SCREENSHOT"], 100, 100, '');
            } else {
                $this->content .= CFile::ShowImage($catalogView["SCREENSHOT"], 100, 100, '', "", true);
            }
            $this->content .= '<span class="wizard-list-view-description">' . $catalogView["DESCRIPTION"] . '</span>';
            $this->content .= '</span>';
        }
        $this->content .= "</div>";
        $this->content .= '</div>
		</div>';
        $this->content .= '
			<div class="wizard-input-form-block">
				<div class="wizard-catalog-title">' . GetMessage("WIZ_CATALOG_DETAIL_DESCR") . '</div>
				<div>
					<div class="wizard-catalog-form-item">
						' . $this->ShowRadioField("catalogDetailDescr", "list", array("id" => "catalog-detail-list")) . '<label for="catalog-detail-list">' . GetMessage("WIZ_CATALOG_DETAIL_DESCR_LIST") . '</label>' . '<p>' . GetMessage("WIZ_CATALOG_DETAIL_DESCR_LIST_DESCR") . '</p>
					</div>
					<div class="wizard-catalog-form-item">
						' . $this->ShowRadioField("catalogDetailDescr", "tabs", array("id" => "catalog-detail-tabs")) . '<label for="catalog-detail-tabs">' . GetMessage("WIZ_CATALOG_DETAIL_DESCR_TABS") . '</label>' . '<p>' . GetMessage("WIZ_CATALOG_DETAIL_DESCR_TABS_DESCR") . '</p>
					</div>
				</div>
			</div>';
        $this->content .= '
			<div class="wizard-input-form-block">
				<div class="wizard-catalog-title">' . GetMessage("WIZ_CATALOG_DETAIL_SKU") . '</div>
				<div>
					<div class="wizard-catalog-form-item">
						' . $this->ShowRadioField("catalogDetailSku", "select", array("id" => "catalog-sku-select")) . '<label for="catalog-sku-select">' . GetMessage("WIZ_CATALOG_DETAIL_SKU_SELECT") . '</label><br />' . '<p>' . GetMessage("WIZ_CATALOG_DETAIL_SKU_SELECT_DESCR") . '</p>
					</div>
					<div class="wizard-catalog-form-item">
						' . $this->ShowRadioField("catalogDetailSku", "list", array("id" => "catalog-sku-list")) . '<label for="catalog-sku-list">' . GetMessage("WIZ_CATALOG_DETAIL_SKU_LIST") . '</label><br />' . '<p>' . GetMessage("WIZ_CATALOG_DETAIL_SKU_LIST_DESCR") . '</p>
					</div>
				</div>
			</div>';
        $this->content .= '
			<div class="wizard-input-form-block">
				<div class="wizard-catalog-title">' . GetMessage("WIZ_CATALOG_USE_STORE_CONTROL") . '</div>
				<div>
					<div class="wizard-catalog-form-item">
						' . $this->ShowCheckboxField("useStoreControl", "Y", array("id" => "use-store-control")) . '<label for="use-store-control">' . GetMessage("WIZ_STORE_CONTROL") . '</label>
					</div>';
        $arConditions = array("O" => GetMessage("SALE_PRODUCT_RESERVE_1_ORDER"), "P" => GetMessage("SALE_PRODUCT_RESERVE_2_PAYMENT"), "D" => GetMessage("SALE_PRODUCT_RESERVE_3_DELIVERY"), "S" => GetMessage("SALE_PRODUCT_RESERVE_4_DEDUCTION"));
        foreach ($arConditions as $conditionID => $conditionName) {
            $arReserveConditions[$conditionID] = $conditionName;
        }
        $this->content .= '
			<div class="wizard-catalog-form-item">' . $this->ShowSelectField("productReserveCondition", $arReserveConditions) . '<label>' . GetMessage("SALE_PRODUCT_RESERVE_CONDITION") . '</label>
			</div>';
        $this->content .= '</div>
			</div>';
        $this->content .= '
			<div class="wizard-input-form-block">
				<div class="wizard-catalog-title">' . GetMessage("WIZ_CATALOG_USE_IDEA") . '</div>
				<div>
					<div class="wizard-catalog-form-item">
						' . $this->ShowCheckboxField("useIdea", "Y", array("id" => "use-idea")) . '<label for="use-idea">' . GetMessage("WIZ_CATALOG_IDEA") . '</label>
					</div>
				</div>
			</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>';
    }
示例#14
0
 function ShowStep()
 {
     $wizard =& $this->GetWizard();
     $templatesPath = WizardServices::GetTemplatesPath($wizard->GetPath() . "/site");
     $arTemplates = WizardServices::GetTemplates($templatesPath);
     if (empty($arTemplates)) {
         return;
     }
     $templateID = $wizard->GetVar("templateID");
     if (isset($templateID) && array_key_exists($templateID, $arTemplates)) {
         $defaultTemplateID = $templateID;
         $wizard->SetDefaultVar("templateID", $templateID);
     } else {
         $defaultTemplateID = COption::GetOptionString("main", "wizard_template_id", "", $wizard->GetVar("siteID"));
         if (!(strlen($defaultTemplateID) > 0 && array_key_exists($defaultTemplateID, $arTemplates))) {
             if (strlen($defaultTemplateID) > 0 && array_key_exists($defaultTemplateID, $arTemplates)) {
                 $wizard->SetDefaultVar("templateID", $defaultTemplateID);
             } else {
                 $defaultTemplateID = "";
             }
         }
     }
     $this->content .= '<div id="solutions-container" class="inst-template-list-block">';
     foreach ($arTemplates as $templateID => $arTemplate) {
         if ($defaultTemplateID == "") {
             $defaultTemplateID = $templateID;
             $wizard->SetDefaultVar("templateID", $defaultTemplateID);
         }
         $this->content .= '<div class="inst-template-description">';
         $this->content .= $this->ShowRadioField("templateID", $templateID, array("id" => $templateID, "class" => "inst-template-list-inp"));
         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"] . '<p>' . $arTemplate["DESCRIPTION"] . '</p></label>';
         $this->content .= "</div>";
     }
     $this->content .= '</div>';
 }
示例#15
0
	function ShowStep()
	{
		$package = $this->package;
		$wizard = $this->GetWizard();

		$arTemplates = $package->GetTemplates(
			Array(
				"SITE_ID" => $package->siteID,
				"GROUP_ID" => $package->groupID
			)
		);

		if (empty($arTemplates))
			return;

		$this->content .= '<table cellspacing="0" cellpadding="2" width="100%"><tr>';

		$colsNumber = 3;
		$counter = 1;
		$cellSize = count($arTemplates);

		foreach ($arTemplates as $arTemplate)
		{
			if (isset($arTemplate["DEFAULT"]))
				$wizard->SetDefaultVar("__templateID", $arTemplate["ID"]);

			$this->content .= '<td valign="top" style="padding-bottom:15px;" width="33%">';

			if ($arTemplate["SCREENSHOT"] && $arTemplate["PREVIEW"])
				$this->content .= CFile::Show2Images($arTemplate["PREVIEW"], $arTemplate["SCREENSHOT"], 150, 150, ' border="0"')."<br />";
			else
				$this->content .= CFile::ShowImage($arTemplate["SCREENSHOT"], 150, 150, ' border="0"', "", true)."<br />";

			$this->content .= '<table><tr><td valign="top">';
			$this->content .= $this->ShowRadioField("__templateID", $arTemplate["ID"], Array("id" => $arTemplate["ID"]));
			$this->content .= '</td><td>';
			$this->content .= '<label for="'.htmlspecialcharsbx($arTemplate["ID"]).'">'.$arTemplate["NAME"].'</label></td></tr>';
			$this->content .= '</table>';

			$this->content .= (strlen($arTemplate["DESCRIPTION"]) > 0 ? "<br />".$arTemplate["DESCRIPTION"] : "").'';

			$this->content .= "</td>";

			//Close table cells
			if (!($counter % $colsNumber) && $cellSize != $counter)
				$this->content .= "</tr><tr>";

			if ($cellSize == $counter && ($cellSize % $colsNumber)>0)
			{
				for ($a=1;$a<=($colsNumber - ($cellSize % $colsNumber) );$a++)
					$this->content .= "<td>&nbsp;</td>";
			}

			$counter++;
		}

		$this->content .= "</tr></table>";
	}
                break;
            case "copy":
                CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/templates/" . $ID, $_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/templates/" . ($ID == ".default" ? "default" : $ID) . "_copy", false, true);
                break;
        }
    }
}
$rsData = CSiteTemplate::GetList();
$rsData = new CAdminResult($rsData, $sTableID);
$rsData->NavStart();
$lAdmin->NavText($rsData->GetNavPrint(GetMessage("PAGES"), false));
$lAdmin->AddHeaders(array(array("id" => "ID", "content" => "ID", "sort" => "id", "default" => true), array("id" => "NAME", "content" => GetMessage('MAIN_T_ADMIN_NAME'), "default" => true), array("id" => "DESCRIPTION", "content" => GetMessage('MAIN_T_ADMIN_DESCRIPTION'), "default" => true)));
while ($arRes = $rsData->NavNext(true, "f_")) {
    $u_ID = urlencode($f_ID);
    $row =& $lAdmin->AddRow($f_ID, $arRes, "template_edit.php?ID=" . $u_ID, GetMessage("MAIN_EDIT_TITLE"));
    $row->AddViewField("ID", '<a href="template_edit.php?lang=' . LANGUAGE_ID . '&amp;ID=' . $u_ID . '" title="' . GetMessage("MAIN_EDIT_TITLE") . '">' . $f_ID . '</a>' . ($f_SCREENSHOT != '' ? CFile::Show2Images($f_PREVIEW != '' ? $f_PREVIEW : $f_SCREENSHOT, $f_SCREENSHOT, 130, 100, "hspace=0 vspace=4 border=0 align=left") : ''));
    if ($edit_php) {
        $row->AddInputField("NAME");
        $row->AddInputField("DESCRIPTION");
    } else {
        $row->AddViewField("NAME", $f_NAME);
        $row->AddViewField("DESCRIPTION", $f_DESCRIPTION);
    }
    $arActions = array();
    $arActions[] = array("ICON" => "edit", "TEXT" => $USER->CanDoOperation('edit_other_settings') || $USER->CanDoOperation('lpa_template_edit') ? GetMessage("MAIN_ADMIN_MENU_EDIT") : GetMessage("MAIN_ADMIN_MENU_VIEW"), "ACTION" => $lAdmin->ActionRedirect("template_edit.php?ID=" . $u_ID));
    if ($edit_php) {
        $arActions[] = array("ICON" => "copy", "TEXT" => GetMessage("MAIN_ADMIN_MENU_COPY"), "ACTION" => $lAdmin->ActionDoGroup($u_ID, "copy"));
        $arActions[] = array("ICON" => "export", "TEXT" => GetMessage("MAIN_ADMIN_LIST_EXPORT"), "ACTION" => "exportData('" . $u_ID . "')");
        if ($edit_php && $f_DEFAULT != "Y") {
            $arActions[] = array("SEPARATOR" => true);
            $arActions[] = array("ICON" => "delete", "TEXT" => GetMessage("MAIN_T_ADMIN_DEL"), "ACTION" => "if(confirm('" . GetMessage('MAIN_T_ADMIN_DEL_CONF') . "')) " . $lAdmin->ActionDoGroup($u_ID, "delete"));
示例#17
0
    function ShowStep()
    {
        $wizard =& $this->GetWizard();
        $templateID = $wizard->GetVar("templateID");
        $templatesPath = WizardServices::GetTemplatesPath("/bitrix/modules/intranet/install");
        $arThemes = WizardServices::GetThemes($templatesPath . "/" . $templateID . "/themes", $wizard->GetPath(), $templateID);
        if (empty($arThemes)) {
            return;
        }
        $themeVarName = $templateID . "_themeID";
        $defaultThemeID = COption::GetOptionString("main", "wizard_" . $templateID . "_theme_id", "", $wizard->GetVar("siteID"));
        if (strlen($defaultThemeID) > 0 && array_key_exists($defaultThemeID, $arThemes)) {
            $wizard->SetDefaultVar($themeVarName, $defaultThemeID);
        } else {
            $defaultThemeID = "";
        }
        global $SHOWIMAGEFIRST;
        $SHOWIMAGEFIRST = true;
        $this->content .= '<table width="100%" cellspacing="4" cellpadding="8">';
        foreach ($arThemes as $themeID => $arTheme) {
            if ($defaultThemeID == "") {
                $defaultThemeID = $themeID;
                $wizard->SetDefaultVar($themeVarName, $defaultThemeID);
            }
            $this->content .= "<tr>";
            $this->content .= "<td width=\"25\">" . $this->ShowRadioField($themeVarName, $themeID, array("id" => $themeVarName . "_" . $themeID)) . "</td>";
            global $SHOWIMAGEFIRST;
            $SHOWIMAGEFIRST = true;
            if ($arTheme["SCREENSHOT"] && $arTheme["PREVIEW"]) {
                $this->content .= '<td valign="top" width="160">' . CFile::Show2Images($arTheme["PREVIEW"], $arTheme["SCREENSHOT"], 150, 150, ' border="0"') . "</td>";
            } else {
                $this->content .= '<td valign="top" width="160">' . CFile::ShowImage($arTheme["SCREENSHOT"], 150, 150, ' border="0"', "", true) . "</td>";
            }
            $this->content .= '<td valign="top"><label for="' . $themeVarName . "_" . $themeID . '"><b>' . $arTheme["NAME"] . "</b><p>" . $arTheme["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>';
    }