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


PHP CFile::Show2Images方法代码示例

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


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

示例1: ShowStep

 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>";
 }
开发者ID:Satariall,项目名称:izurit,代码行数:43,代码来源:select_steps.php

示例2: ShowStep

 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>";
 }
开发者ID:Satariall,项目名称:izurit,代码行数:38,代码来源: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: CopyDirFiles

                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 . "')");
开发者ID:spas-viktor,项目名称:books,代码行数:31,代码来源:template_admin.php

示例5: DisplayFile

    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;
            ?>
"),
//.........这里部分代码省略.........
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:101,代码来源:file_input.php

示例6:

            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') {
开发者ID:dayAlone,项目名称:MyQube,代码行数:31,代码来源:template.php

示例7: 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

示例8: while

$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);
	}
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:30,代码来源:template_admin.php

示例9: ShowStep

 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>";
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:36,代码来源:wizard.php

示例10: ShowStep

    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";
//.........这里部分代码省略.........
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:101,代码来源:wizard.php

示例11: ShowStep

 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>';
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:40,代码来源:wizard.php

示例12: ShowStep

	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>";
	}
开发者ID:ASDAFF,项目名称:open_bx,代码行数:58,代码来源:wizard_site_steps.php

示例13: CopyDirFiles

                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"));
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:template_admin.php

示例14: ShowStep

    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>';
    }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:67,代码来源:wizard.php


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