function ShowStep() { $wizard =& $this->GetWizard(); $siteLogo = $wizard->GetVar("siteLogo", true); $this->content .= '<div class="wizard-input-form">'; $this->content .= ' <div class="wizard-upload-img-block"> <div class="wizard-catalog-title">' . GetMessage("wiz_company_name") . '</div> ' . $this->ShowInputField('text', 'siteName', array("id" => "siteName", "class" => "wizard-field")) . ' </div>'; $this->content .= ' <div class="wizard-upload-img-block"> <div class="wizard-catalog-title">' . GetMessage("wiz_company_description") . '</div> ' . $this->ShowInputField('text', 'siteDescription', array("id" => "siteDescription", "class" => "wizard-field")) . ' </div>'; if ($wizard->GetVar("templateID") == "taby") { $this->content .= ' <div class="wizard-upload-img-block"> <div class="wizard-catalog-title">' . GetMessage("wiz_company_logo") . '</div> ' . CFile::ShowImage($siteLogo, 100, 100, "border=0 vspace=5") . '<br/>' . $this->ShowFileField("siteLogo", array("show_file_info" => "N", "id" => "siteLogo")) . ' </div>'; } $firstStep = COption::GetOptionString("main", "wizard_first" . substr($wizard->GetID(), 7) . "_" . $wizard->GetVar("siteID"), false, $wizard->GetVar("siteID")); $styleMeta = 'style="display:block"'; if ($firstStep == "Y") { $styleMeta = 'style="display:none"'; } $this->content .= ' <div id="bx_metadata" ' . $styleMeta . '><div class="wizard-input-form-block"> <div class="wizard-metadata-title">' . GetMessage("wiz_meta_data") . '</div> <div class="wizard-upload-img-block"> <label for="siteMetaDescription" class="wizard-input-title">' . GetMessage("wiz_meta_description") . '</label> ' . $this->ShowInputField("textarea", "siteMetaDescription", array("id" => "siteMetaDescription", "class" => "wizard-field", "rows" => "3")) . ' </div>'; $this->content .= ' <div class="wizard-upload-img-block"> <label for="siteMetaKeywords" class="wizard-input-title">' . GetMessage("wiz_meta_keywords") . '</label> ' . $this->ShowInputField('text', 'siteMetaKeywords', array("id" => "siteMetaKeywords", "class" => "wizard-field")) . ' </div> </div></div>'; if ($firstStep == "Y") { $this->content .= ' <div class="wizard-input-form-block">' . $this->ShowCheckboxField("installDemoData", "Y", array("id" => "installDemoData", "onClick" => "if(this.checked == true){document.getElementById('bx_metadata').style.display='block';}else{document.getElementById('bx_metadata').style.display='none';}")) . ' <label for="installDemoData">' . GetMessage("wiz_structure_data") . '</label> </div>'; } else { $this->content .= $this->ShowHiddenField("installDemoData", "Y"); } }
function ShowStep() { $wizard =& $this->GetWizard(); $siteLogo = $wizard->GetVar("siteLogo", true); $this->content .= '<table width="100%" cellspacing="0" cellpadding="0">'; $this->content .= '<tr><td>'; $this->content .= '<label for="site-logo">'.GetMessage("WIZ_COMPANY_LOGO").'</label><br />'; $this->content .= CFile::ShowImage($siteLogo, 209, 61, "border=0 vspace=15"); $this->content .= "<br />".$this->ShowFileField("siteLogo", Array("show_file_info" => "N", "id" => "site-logo")); $this->content .= '</tr></td>'; $this->content .= '<tr><td><br /><br /><br /></td></tr>'; $this->content .= '<tr><td>'; $this->content .= '<label for="site-slogan">'.GetMessage("WIZ_COMPANY_SLOGAN").'</label><br />'; $this->content .= $this->ShowInputField("textarea", "siteSlogan", Array("id" => "site-slogan", "style" => "width:100%", "rows"=>"3")); $this->content .= '</tr></td>'; $this->content .= '<tr><td><br /></td></tr>'; $this->content .= '<tr><td>'; $this->content .= '<label for="site-copy">'.GetMessage("WIZ_COMPANY_COPY").'</label><br />'; $this->content .= $this->ShowInputField("textarea", "siteCopy", Array("id" => "site-copy", "style" => "width:100%", "rows"=>"3")); $this->content .= '</tr></td>'; $this->content .= '<tr><td><br /></td></tr>'; $this->content .= '<tr><td style="padding-bottom:3px;">'; $this->content .= $this->ShowCheckboxField("installDemoData", "Y", (array("id" => "install-demo-data") + ($_SERVER["PHP_SELF"] == "/index.php" && empty($siteLogo) ? array() : array("checked" => false)))); $this->content .= '<label for="install-demo-data">'.GetMessage("wiz_structure_data").'</label><br />'; $this->content .= '</td></tr>'; $this->content .= '<tr><td> </td></tr>'; $this->content .= '</table>'; $formName = $wizard->GetFormName(); $installCaption = $this->GetNextCaption(); $nextCaption = GetMessage("NEXT_BUTTON"); }
function ShowStep() { $wizard =& $this->GetWizard(); $siteLogo = $wizard->GetVar("siteLogo", true); $this->content .= '<div class="wizard-upload-img-block"><div class="wizard-catalog-title">' . GetMessage("WIZ_COMPANY_LOGO") . '</div>'; $this->content .= CFile::ShowImage($siteLogo, 190, 70, "border=0 vspace=15"); $this->content .= "<br />" . $this->ShowFileField("siteLogo", array("show_file_info" => "N", "id" => "site-logo")) . '</div>'; $siteBanner = $wizard->GetVar("siteBanner", true); $this->content .= '<div class="wizard-upload-img-block"><div class="wizard-catalog-title">' . GetMessage("WIZ_SITE_BANNER") . '</div>'; $this->content .= CFile::ShowImage($siteBanner, 485, 175, "border=0 vspace=15"); $this->content .= "<br />" . $this->ShowFileField("siteBanner", array("show_file_info" => "N", "id" => "site-banner")) . '</div>'; $this->content .= '<div class="wizard-upload-img-block"><div class="wizard-catalog-title">' . GetMessage("WIZ_BANNER_TEXT") . '</div>'; $this->content .= $this->ShowInputField("textarea", "siteBannerText", array("id" => "site-text", "class" => "wizard-field", "rows" => "4")); $this->content .= '<img src="/bitrix/wizards/bitrix/corp_services/images/' . LANGUAGE_ID . '/banner_processed.png">' . '</div>'; $this->content .= '<div class="wizard-upload-img-block"><div class="wizard-catalog-title">' . GetMessage("WIZ_COMPANY_SLOGAN") . '</div>'; $this->content .= $this->ShowInputField("textarea", "siteSlogan", array("id" => "site-slogan", "class" => "wizard-field", "rows" => "3")) . '</div>'; $this->content .= '<div class="wizard-upload-img-block"><div class="wizard-catalog-title">' . GetMessage("WIZ_COMPANY_COPY") . '</div>'; $this->content .= $this->ShowInputField("textarea", "siteCopy", array("id" => "site-copy", "class" => "wizard-field", "rows" => "3")) . '</div>'; $firstStep = COption::GetOptionString("main", "wizard_first" . substr($wizard->GetID(), 7) . "_" . $wizard->GetVar("siteID"), false, $wizard->GetVar("siteID")); $styleMeta = 'style="display:block"'; if ($firstStep == "Y") { $styleMeta = 'style="display:none"'; } $this->content .= ' <div id="bx_metadata" ' . $styleMeta . '> <div class="wizard-input-form-block"> <div class="wizard-metadata-title">' . GetMessage("wiz_meta_data") . '</div> <div class="wizard-upload-img-block"> <label for="siteMetaDescription" class="wizard-input-title">' . GetMessage("wiz_meta_description") . '</label> ' . $this->ShowInputField("textarea", "siteMetaDescription", array("id" => "siteMetaDescription", "class" => "wizard-field", "rows" => "3")) . ' </div>'; $this->content .= ' <div class="wizard-upload-img-block"> <label for="siteMetaKeywords" class="wizard-input-title">' . GetMessage("wiz_meta_keywords") . '</label><br> ' . $this->ShowInputField('text', 'siteMetaKeywords', array("id" => "siteMetaKeywords", "class" => "wizard-field")) . ' </div> </div> </div>'; if ($firstStep == "Y") { $this->content .= $this->ShowCheckboxField("installDemoData", "Y", array("id" => "install-demo-data", "onClick" => "if(this.checked == true){document.getElementById('bx_metadata').style.display='block';}else{document.getElementById('bx_metadata').style.display='none';}")); $this->content .= '<label for="install-demo-data">' . GetMessage("wiz_structure_data") . '</label><br />'; } else { $this->content .= $this->ShowHiddenField("installDemoData", "Y"); } $formName = $wizard->GetFormName(); $installCaption = $this->GetNextCaption(); $nextCaption = GetMessage("NEXT_BUTTON"); }
public function executeComponent() { try { $this->checkParams($this->arParams); } catch (\Exception $e) { ShowError($e->getMessage()); return; } $stores = array(); $arStoreLocation = array("yandex_scale" => 11, "PLACEMARKS" => array()); foreach ($this->arParams["STORES_LIST"] as $storeId => $storeParams) { $stores[$storeParams["ID"]] = $storeParams; if (intval($storeParams["IMAGE_ID"]) > 0) { $arImage = CFile::GetFileArray($storeParams["IMAGE_ID"]); $imgValue = CFile::ShowImage($arImage, 115, 115, "border=0", "", false); $stores[$storeParams["ID"]]["IMAGE"] = $imgValue; $stores[$storeParams["ID"]]["IMAGE_URL"] = $arImage["SRC"]; } if (floatval($arStoreLocation["yandex_lat"]) <= 0) { $arStoreLocation["yandex_lat"] = $storeParams["GPS_N"]; } if (floatval($arStoreLocation["yandex_lon"]) <= 0) { $arStoreLocation["yandex_lon"] = $storeParams["GPS_S"]; } $arLocationTmp = array(); $arLocationTmp["ID"] = $storeParams["ID"]; if (strlen($storeParams["GPS_N"]) > 0) { $arLocationTmp["LAT"] = $storeParams["GPS_N"]; } if (strlen($storeParams["GPS_S"]) > 0) { $arLocationTmp["LON"] = $storeParams["GPS_S"]; } if (strlen($storeParams["TITLE"]) > 0) { $arLocationTmp["TEXT"] = $storeParams["TITLE"] . "\r\n" . $storeParams["DESCRIPTION"]; } $arStoreLocation["PLACEMARKS"][] = $arLocationTmp; } $this->arResult["LOCATION"] = serialize($arStoreLocation); $this->arResult["SHOW_IMAGES"] = isset($_REQUEST["showImages"]) && $_REQUEST["showImages"] == "Y"; $this->arResult["STORES"] = $stores; $this->includeComponentTemplate(); }
function ShowStep() { $wizard =& $this->GetWizard(); $siteLogo = $wizard->GetVar("siteLogo", true); $this->content .= '<div class="wizard-upload-img-block"><div class="wizard-catalog-title">' . GetMessage("WIZ_COMPANY_LOGO") . '</div>'; $this->content .= CFile::ShowImage($siteLogo, 209, 61, "border=0 vspace=15"); $this->content .= "<br />" . $this->ShowFileField("siteLogo", array("show_file_info" => "N", "id" => "site-logo")) . "</div>"; $this->content .= '<div class="wizard-upload-img-block"><div class="wizard-catalog-title">' . GetMessage("WIZ_COMPANY_NUMBER") . '</div>'; $this->content .= $this->ShowInputField("textarea", "siteNumber", array("id" => "site-slogan", "class" => "wizard-field", "rows" => "3")) . "</div>"; $this->content .= '<div class="wizard-upload-img-block"><div class="wizard-catalog-title">' . GetMessage("WIZ_COMPANY_ADDRESS") . '</div>'; $this->content .= $this->ShowInputField("textarea", "siteAddress", array("id" => "site-copy", "class" => "wizard-field", "rows" => "3")) . "</div>"; $firstStep = COption::GetOptionString("main", "wizard_first" . substr($wizard->GetID(), 7) . "_" . $wizard->GetVar("siteID"), false, $wizard->GetVar("siteID")); $styleMeta = 'style="display:block"'; if ($firstStep == "Y") { $styleMeta = 'style="display:none"'; } $this->content .= ' <div id="bx_metadata" ' . $styleMeta . '> <div class="wizard-input-form-block"> <div class="wizard-metadata-title">' . GetMessage("wiz_meta_data") . '</div> <div class="wizard-upload-img-block"> <label for="siteMetaDescription" class="wizard-input-title">' . GetMessage("wiz_meta_description") . '</label> ' . $this->ShowInputField("textarea", "siteMetaDescription", array("id" => "siteMetaDescription", "class" => "wizard-field", "rows" => "3")) . ' </div>'; $this->content .= ' <div class="wizard-upload-img-block"> <label for="siteMetaKeywords" class="wizard-input-title">' . GetMessage("wiz_meta_keywords") . '</label><br> ' . $this->ShowInputField('text', 'siteMetaKeywords', array("id" => "siteMetaKeywords", "class" => "wizard-field")) . ' </div> </div> </div>'; if ($firstStep == "Y") { $this->content .= $this->ShowCheckboxField("installDemoData", "Y", array("id" => "install-demo-data", "onClick" => "if(this.checked == true){document.getElementById('bx_metadata').style.display='block';}else{document.getElementById('bx_metadata').style.display='none';}")); $this->content .= '<label for="install-demo-data">' . GetMessage("wiz_structure_data") . '</label><br />'; } else { $this->content .= $this->ShowHiddenField("installDemoData", "Y"); } $formName = $wizard->GetFormName(); $installCaption = $this->GetNextCaption(); $nextCaption = GetMessage("NEXT_BUTTON"); }
$arResult['CURRENT_USER']['DEPARTMENT_TOP'] = CIntranetUtils::GetIBlockTopSection($arResult['CURRENT_USER']['UF_DEPARTMENT']); if (intval($arResult['DEPARTMENT']) == $arResult['CURRENT_USER']['DEPARTMENT_TOP']) { $arResult['ONLY_MINE'] = 'Y'; } } } $CACHE_MANAGER->RegisterTag('bx_user_intranet_info_' . $arResult['CURRENT_USER']['ID']); $CACHE_MANAGER->EndTagCache(); } if ($obUserCache->StartDataCache()) { $obUserCache->EndDataCache(array('CURRENT_USER' => $arResult['CURRENT_USER'], 'ONLY_MINE' => $arResult['ONLY_MINE'])); } foreach ($arResult['USERS'] as $key => $arUser) { if ($arUser['PERSONAL_PHOTO']) { $imageFile = CFile::GetFileArray($arUser['PERSONAL_PHOTO']); if ($imageFile !== false) { $arFileTmp = CFile::ResizeImageGet($imageFile, array("width" => 42, "height" => 42), BX_RESIZE_IMAGE_EXACT, true); } if ($arFileTmp && array_key_exists("src", $arFileTmp)) { $arUser["PERSONAL_PHOTO"] = CFile::ShowImage($arFileTmp["src"], 42, 42); } } $arResult['USERS'][$key] = $arUser; } $arResult["arUserField"] = array(); $arRes = $GLOBALS["USER_FIELD_MANAGER"]->GetUserFields("USER", 0, LANGUAGE_ID); if (!empty($arRes)) { foreach ($arRes as $key => $val) { $arResult["arUserField"][$key] = $val; } }
</tr> <?php } ?> <tr><td> </td></tr> <tr> <td><nobr><?php echo CSalePaySystemAction::GetParamValue("SELLER_ACC_POS", false); ?> </nobr></td> <td style="border-bottom: 1pt solid #000000; text-align: center; "> <?php if (!$blank && CSalePaySystemAction::GetParamValue("SELLER_ACC_SIGN", false)) { ?> <span style="position: relative; "> <?php echo CFile::ShowImage(CSalePaySystemAction::GetParamValue("SELLER_ACC_SIGN", false), 200, 50, 'style="position: absolute; margin-left: -75pt; bottom: 0pt; "'); ?> </span> <?php } ?> </td> </tr> <?php } ?> <?php } ?> </table>
$COUNT = false; } $ids = array(); $dbPosts = CBlogPost::GetList($SORT, $arFilter, false, $COUNT, $arSelectedFields); $p = new blogTextParser(false, $arParams["PATH_TO_SMILE"]); $itemCnt = 0; while ($arPost = $dbPosts->GetNext()) { if (IntVal($arPost["ATTACH_IMG"]) <= 0) { $dbImage = CBlogImage::GetList(array("ID" => "ASC"), array("BLOG_ID" => $arPost["BLOG_ID"], "POST_ID" => $arPost["ID"], "IS_COMMENT" => "N")); if ($arImage = $dbImage->Fetch()) { if ($file = CFile::ResizeImageGet($arImage["FILE_ID"], array("width" => $arParams["PREVIEW_WIDTH"], "height" => $arParams["PREVIEW_HEIGHT"]))) { $arPost["IMG"] = CFile::ShowImage($file["src"], false, false, 'align="left" hspace="2" vspace="2"'); } } } else { $arPost["IMG"] = CFile::ShowImage($arPost["ATTACH_IMG"], false, false, 'align="left" hspace="2" vspace="2"'); } $arTmp = $arPost; if ($arTmp["AUTHOR_ID"] == $arTmp["BLOG_OWNER_ID"]) { $arTmp["urlToBlog"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_BLOG"], array("blog" => $arPost["BLOG_URL"], "user_id" => $arPost["AUTHOR_ID"])); } else { if ($arParams["USE_SOCNET"] == "Y" && IntVal($arParams["SOCNET_GROUP_ID"]) > 0) { $arTmp["urlToBlog"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_USER"], array("user_id" => $arPost["AUTHOR_ID"])); } else { $arOwnerBlog = CBlog::GetByOwnerID($arTmp["AUTHOR_ID"], $arParams["GROUP_ID"]); if (!empty($arOwnerBlog)) { $arTmp["urlToBlog"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_BLOG"], array("blog" => $arOwnerBlog["URL"], "user_id" => $arOwnerBlog["OWNER_ID"], "group_id" => $arPost["BLOG_SOCNET_GROUP_ID"])); } else { $arTmp["urlToBlog"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_BLOG"], array("blog" => $arPost["BLOG_URL"], "user_id" => $arPost["AUTHOR_ID"], "group_id" => $arPost["BLOG_SOCNET_GROUP_ID"])); } }
function ShowAnswer($FIELD_SID) { global $USER; $out = ""; $arQuestion = $this->arQuestions[$FIELD_SID]; $arrResultAnswer = $this->arrVALUES[$arQuestion["ID"]]; if (is_array($arrResultAnswer)) { reset($arrResultAnswer); $count = count($arrResultAnswer); $i = 0; foreach ($arrResultAnswer as $key => $arrA) { $i++; if (strlen(trim($arrA["USER_TEXT"])) > 0) { if (intval($arrA["USER_FILE_ID"]) > 0) { if ($arrA["USER_FILE_IS_IMAGE"] == "Y" && $USER->IsAdmin()) { $out .= htmlspecialcharsbx($arrA["USER_TEXT"]) . "<br />"; } } else { $out .= TxtToHTML($arrA["USER_TEXT"], true, 50) . "<br />"; } } if (strlen(trim($arrA["ANSWER_TEXT"])) > 0) { $answer = "[<span class='form-anstext'>" . TxtToHTML($arrA["ANSWER_TEXT"], true, 50) . "</span>]"; if (strlen(trim($arrA["ANSWER_VALUE"])) > 0) { $answer .= " "; } else { $answer .= "<br />"; } $out .= $answer; } if ($this->arParams["SHOW_ANSWER_VALUE"] == "Y") { if (strlen(trim($arrA["ANSWER_VALUE"])) > 0) { $out .= "(<span class='form-ansvalue'>" . TxtToHTML($arrA["ANSWER_VALUE"], true, 50) . "</span>)<br />"; } } if (intval($arrA["USER_FILE_ID"]) > 0) { if ($arrA["USER_FILE_IS_IMAGE"] == "Y") { $out .= CFile::ShowImage($arrA["USER_FILE_ID"], 0, 0, "border=0", "", true); } else { $file_link = "/bitrix/tools/form_show_file.php?rid=" . $this->RESULT_ID . "&hash=" . $arrA["USER_FILE_HASH"] . "&lang=" . LANGUAGE_ID; $out .= "<a title=\"" . GetMessage("FORM_VIEW_FILE") . "\" target=\"_blank\" href=\"" . $file_link . "\">" . htmlspecialcharsbx($arrA["USER_FILE_NAME"]) . "</a><br />("; $a = array("b", "Kb", "Mb", "Gb"); $pos = 0; $size = $arrA["USER_FILE_SIZE"]; while ($size >= 1024) { $size /= 1024; $pos++; } $out .= round($size, 2) . " " . $a[$pos]; $out .= ")<br />[ <a title=\"" . str_replace("#FILE_NAME#", $arrA["USER_FILE_NAME"], GetMessage("FORM_DOWNLOAD_FILE")) . "\" href=\"" . $file_link . "&action=download\">" . GetMessage("FORM_DOWNLOAD") . "</a> ]"; } //endif; } //endif; } //endforeach; } //endif; return $out; }
if (is_array($str_IMAGE_ID)) { $str_IMAGE_ID = 0; } $str_IMAGE_ID = intval($str_IMAGE_ID); ?> <tr> <td><?php echo GetMessage("FORM_IMAGE"); ?> </td> <td><?php echo CFile::InputFile("IMAGE_ID", 20, $str_IMAGE_ID); if ($str_IMAGE_ID > 0) { ?> <br /><?php echo CFile::ShowImage($str_IMAGE_ID, 200, 200, "border=0", "", true); } ?> </td> </tr> <?php if (COption::GetOptionString("form", "USE_HTML_EDIT") == "Y" && CModule::IncludeModule("fileman")) { ?> <tr> <td align="center" colspan="2"><?php CFileMan::AddHTMLEditorFrame("TITLE", $str_TITLE, "TITLE_TYPE", $str_TITLE_TYPE, 400); ?> </td> </tr> <?php } else {
"></td> </tr> <tr> <td valign="top"><?php echo GetMessage('blog_INTERESTS'); ?> </td> <td><textarea class="typearea" name="blog_INTERESTS" rows="3" cols="35"><?php echo $str_blog_INTERESTS; ?> </textarea></td> </tr> <tr class="adm-detail-file-row"> <td><?php echo GetMessage("blog_AVATAR"); ?> </td> <td><?php echo CFile::InputFile("blog_AVATAR", 20, $str_blog_AVATAR); if (IntVal($str_blog_AVATAR) > 0) { ?> <div class="adm-detail-file-image"><?php echo CFile::ShowImage($str_blog_AVATAR, 150, 150, "border=0", "", true); ?> </div><?php } ?> </td> </tr> <?php }
<td width="40%"><?php echo GetMessage('SPS_LOGOTIP'); ?> </td> <td width="60%"> <div><input type="file" name="LOGOTIP_<?php echo $arPersonType["ID"]; ?> "></div> <?php if ($arPaySystemAction["LOGOTIP"] > 0) { ?> <br> <?php $arLogotip = CFile::GetFileArray($arPaySystemAction["LOGOTIP"]); echo CFile::ShowImage($arLogotip, 150, 150, "border=0", "", false); ?> <div style="margin-top:10px;"> <input type="checkbox" name="LOGOTIP_<?php echo $arPersonType["ID"]; ?> _del" value="Y" id="LOGOTIP_<?php echo $arPersonType["ID"]; ?> _del" > <label for="LOGOTIP_<?php echo $arPersonType["ID"]; ?> _del"><?php echo GetMessage("SPS_LOGOTIP_DEL"); ?>
$bDeal = !$CCrmPerms->HavePerm('DEAL', BX_CRM_PERM_NONE, 'WRITE'); $arResult['PERM_DEAL'] = $bDeal; $bQuote = !$CCrmContact->cPerms->HavePerm('QUOTE', BX_CRM_PERM_NONE, 'ADD'); $arResult['PERM_QUOTE'] = $bQuote; $bInvoice = !$CCrmPerms->HavePerm('INVOICE', BX_CRM_PERM_NONE, 'ADD'); $arResult['PERM_INVOICE'] = $bInvoice; $now = time() + CTimeZone::GetOffset(); foreach ($arResult['CONTACT'] as &$arContact) { if (!empty($arContact['PHOTO'])) { if ($isInExportMode) { if ($arFile = CFile::GetFileArray($arContact['PHOTO'])) { $arContact['PHOTO'] = CHTTP::URN2URI($arFile["SRC"]); } } else { $arFileTmp = CFile::ResizeImageGet($arContact['PHOTO'], array('width' => 50, 'height' => 50), BX_RESIZE_IMAGE_PROPORTIONAL, false); $arContact['PHOTO'] = CFile::ShowImage($arFileTmp['src'], 50, 50, 'border=0'); } } $arContact['PATH_TO_COMPANY_SHOW'] = CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_COMPANY_SHOW'], array('company_id' => $arContact['COMPANY_ID'])); if ($bDeal) { $arContact['PATH_TO_DEAL_EDIT'] = CHTTP::urlAddParams(CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_DEAL_EDIT'], array('deal_id' => 0)), array('contact_id' => $arContact['ID'], 'company_id' => $arContact['COMPANY_ID'])); } $arContact['PATH_TO_CONTACT_SHOW'] = CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_CONTACT_SHOW'], array('contact_id' => $arContact['ID'])); $arContact['PATH_TO_CONTACT_EDIT'] = CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_CONTACT_EDIT'], array('contact_id' => $arContact['ID'])); $arContact['PATH_TO_CONTACT_COPY'] = CHTTP::urlAddParams(CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_CONTACT_EDIT'], array('contact_id' => $arContact['ID'])), array('copy' => 1)); $arContact['PATH_TO_CONTACT_DELETE'] = CHTTP::urlAddParams($bInternal ? $APPLICATION->GetCurPage() : $arParams['PATH_TO_CONTACT_LIST'], array('action_' . $arResult['GRID_ID'] => 'delete', 'ID' => $arContact['ID'], 'sessid' => $arResult['SESSION_ID'])); $arContact['PATH_TO_USER_PROFILE'] = CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_USER_PROFILE'], array('user_id' => $arContact['ASSIGNED_BY'])); $arContact['CONTACT_FORMATTED_NAME'] = CUser::FormatName(\Bitrix\Crm\Format\PersonNameFormatter::getFormat(), array('LOGIN' => '', 'NAME' => $arContact['NAME'], 'LAST_NAME' => $arContact['LAST_NAME'], 'SECOND_NAME' => $arContact['SECOND_NAME']), false, false); $typeID = isset($arContact['TYPE_ID']) ? $arContact['TYPE_ID'] : ''; $arContact['CONTACT_TYPE_NAME'] = isset($arResult['TYPE_LIST'][$typeID]) ? $arResult['TYPE_LIST'][$typeID] : $typeID; $arContact['PATH_TO_USER_CREATOR'] = CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_USER_PROFILE'], array('user_id' => $arContact['CREATED_BY']));
?> "> <?php echo $arProperty["TITLE"]; ?> </a><br /> <?php } ?> <?php if (isset($arProperty["IMAGE_ID"]) && !empty($arProperty["IMAGE_ID"])) { ?> <span class="schedule"><?php echo GetMessage('S_IMAGE'); ?> <?php echo CFile::ShowImage($arProperty["IMAGE_ID"], 200, 200, "border=0", "", true); ?> </span><br /> <?php } ?> <?php if (isset($arProperty["PHONE"])) { ?> <span class="tel"><?php echo GetMessage('S_PHONE'); ?> <?php echo $arProperty["PHONE"]; ?> </span><br />
</div> <div class="photo-detail"> <div class="photo-detail-inner-image"> <noindex><a rel="nofollow" href="<?php echo $arResult["SLIDE_SHOW"]; ?> " title="<?php echo htmlspecialchars($arResult["ELEMENT"]["~NAME"]); ?> "> <div class="photo-photo"> <div class="photo-img"><?php echo CFile::ShowImage($arResult["ELEMENT"]["PICTURE"]["SRC"], $arParams["THUMBS_SIZE"], $arParams["THUMBS_SIZE"], "border=\"0\" vspace=\"0\" hspace=\"0\" alt=\"" . $arResult["ELEMENT"]["CODE"] . "\""); ?> </div> </div> </a></noindex> <?php $ii = $arResult["ELEMENT"]["CURRENT"]["NO"] - 1; ?> <div id="photo_navigation" class="photo-detail-inner-navigation"> <table cellpadding="5" cellspacing="0" border="0"><tr><td> <?php if (!empty($arResult["ELEMENTS_LIST"][$ii - 1]["DETAIL_PAGE_URL"])) { ?> <a href="<?php echo $arResult["ELEMENTS_LIST"][$ii - 1]["DETAIL_PAGE_URL"]; ?>
if (IntVal($arComment["AUTHOR_ID"]) > 0) { if (empty($arResult["USER_CACHE"][$arComment["AUTHOR_ID"]])) { $arUsrTmp = array(); $arUsrTmp["urlToAuthor"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_USER"], array("user_id" => $arComment["AUTHOR_ID"])); $arUsrTmp["BlogUser"] = CBlogUser::GetByID($arComment["AUTHOR_ID"], BLOG_BY_USER_ID); $arUsrTmp["BlogUser"] = CBlogTools::htmlspecialcharsExArray($arUsrTmp["BlogUser"]); $dbUser = CUser::GetByID($arComment["AUTHOR_ID"]); $arUsrTmp["arUser"] = $dbUser->GetNext(); $arUsrTmp["AuthorName"] = CBlogUser::GetUserName($arUsrTmp["BlogUser"]["ALIAS"], $arUsrTmp["arUser"]["NAME"], $arUsrTmp["arUser"]["LAST_NAME"], $arUsrTmp["arUser"]["LOGIN"]); if (IntVal($arUsrTmp["BlogUser"]["AVATAR"]) > 0) { $arUsrTmp["AVATAR_file"] = CFile::ResizeImageGet($arUsrTmp["BlogUser"]["AVATAR"], array("width" => 30, "height" => 30), BX_RESIZE_IMAGE_EXACT, false); } elseif ($arResult["bSoNet"] && IntVal($arUsrTmp["arUser"]["PERSONAL_PHOTO"]) > 0) { $arUsrTmp["AVATAR_file"] = CFile::ResizeImageGet($arUsrTmp["arUser"]["PERSONAL_PHOTO"], array("width" => 30, "height" => 30), BX_RESIZE_IMAGE_EXACT, false); } if ($arUsrTmp["AVATAR_file"] !== false) { $arUsrTmp["AVATAR_img"] = CFile::ShowImage($arUsrTmp["AVATAR_file"]["src"], 30, 30, "border=0 align='right'"); } $arUsrTmp["Blog"] = CBlog::GetByOwnerID(IntVal($arComment["AUTHOR_ID"]), $arParams["GROUP_ID"]); if ($arUsrTmp["AUTHOR_ID"] == $arUsrTmp["AUTHOR_ID"]) { $arUsrTmp["AuthorIsPostAuthor"] = "Y"; } $arResult["USER_CACHE"][$arComment["AUTHOR_ID"]] = $arUsrTmp; } $arComment["urlToAuthor"] = $arResult["USER_CACHE"][$arComment["AUTHOR_ID"]]["urlToAuthor"]; $arComment["BlogUser"] = $arResult["USER_CACHE"][$arComment["AUTHOR_ID"]]["BlogUser"]; $arComment["arUser"] = $arResult["USER_CACHE"][$arComment["AUTHOR_ID"]]["arUser"]; $arComment["AuthorName"] = $arResult["USER_CACHE"][$arComment["AUTHOR_ID"]]["AuthorName"]; $arComment["AVATAR_file"] = $arResult["USER_CACHE"][$arComment["AUTHOR_ID"]]["AVATAR_file"]; $arComment["AVATAR_img"] = $arResult["USER_CACHE"][$arComment["AUTHOR_ID"]]["AVATAR_img"]; $arComment["Blog"] = $arResult["USER_CACHE"][$arComment["AUTHOR_ID"]]["Blog"]; $arComment["AuthorIsPostAuthor"] = $arResult["USER_CACHE"][$arComment["AUTHOR_ID"]]["AuthorIsPostAuthor"];
:</td> <td valign="top"><input type="text" size="10" name="bp_sort" value="<?php echo intval($arResult["Data"]["Sort"]); ?> "></td> </tr> <tr> <td valign="top" align="right"><?php echo GetMessage("BPWC_WNCT_ICON"); ?> :</td> <td valign="top"> <input type="file" name="bp_image"> <?php if ($arResult["Data"]["Image"] > 0) { echo "<br/><br/>" . CFile::ShowImage($arResult["Data"]["Image"], 150, 150, "border=0", false, true); } ?> </td> </tr> <tr> <td valign="top" align="right"><?php echo GetMessage("BPWC_WNCT_EADD"); ?> :</td> <td valign="top"><input type="text" size="40" name="bp_element_add" value="<?php echo htmlspecialcharsbx($arResult["Data"]["ElementAdd"]); ?> "></td> </tr> <tr>
function ShowStep() { $wizard =& $this->GetWizard(); $templateID = $wizard->GetVar("templateID"); $templatesPath = WizardServices::GetTemplatesPath($wizard->GetPath() . "/site"); $arThemes = WizardServices::GetThemes($templatesPath . "/" . $templateID . "/themes"); if (empty($arThemes)) { return; } $themeVarName = $templateID . "_themeID"; $ThemeID = $wizard->GetVar($templateID . "_themeID"); if (isset($ThemeID) && array_key_exists($ThemeID, $arThemes)) { $defaultThemeID = $ThemeID; $wizard->SetDefaultVar($themeVarName, $ThemeID); } else { $defaultThemeID = COption::GetOptionString("main", "wizard_" . $templateID . "_theme_id", "", $wizard->GetVar("siteID")); if (!(strlen($defaultThemeID) > 0 && array_key_exists($defaultThemeID, $arThemes))) { $defaultThemeID = COption::GetOptionString("main", "wizard_" . $templateID . "_theme_id", ""); if (strlen($defaultThemeID) > 0 && array_key_exists($defaultThemeID, $arThemes)) { $wizard->SetDefaultVar($themeVarName, $defaultThemeID); } else { $defaultThemeID = ""; } } } $this->content = '<script type="text/javascript"> function SelectTheme(element, solutionId, imageUrl) { var container = document.getElementById("solutions-container"); var anchors = container.getElementsByTagName("SPAN"); for (var i = 0; i < anchors.length; i++) { if (anchors[i].parentNode == container) anchors[i].className = "inst-template-color"; } element.className = "inst-template-color inst-template-color-selected"; var hidden = document.getElementById("selected-solution"); if (!hidden) { hidden = document.createElement("INPUT"); hidden.type = "hidden" hidden.id = "selected-solution"; hidden.name = "selected-solution"; container.appendChild(hidden); } hidden.value = solutionId; var preview = document.getElementById("solution-preview"); if (!imageUrl) preview.style.display = "none"; else { document.getElementById("solution-preview-image").src = imageUrl; preview.style.display = ""; } } </script>' . '<div id="html_container">' . '<div class="inst-template-color-block" id="solutions-container">'; $ii = 0; $arDefaultTheme = array(); foreach ($arThemes as $themeID => $arTheme) { if ($defaultThemeID == "") { $defaultThemeID = $themeID; $wizard->SetDefaultVar($themeVarName, $defaultThemeID); } if ($defaultThemeID == $themeID) { $arDefaultTheme = $arTheme; } $ii++; $this->content .= ' <span class="inst-template-color' . ($defaultThemeID == $themeID ? " inst-template-color-selected" : "") . '" ondblclick="SubmitForm(\'next\');" onclick="SelectTheme(this, \'' . $themeID . '\', \'' . $arTheme["SCREENSHOT"] . '\');"> <span class="inst-templ-color-img">' . CFile::ShowImage($arTheme["PREVIEW"], 70, 70, ' border="0" class="solution-image"') . '</span> <span class="inst-templ-color-name">' . $ii . '. ' . $arTheme["NAME"] . '</span> </span>'; } $this->content .= $this->ShowHiddenField($themeVarName, $defaultThemeID, array("id" => "selected-solution")); $this->content .= '</div>' . '<div id="solution-preview">' . '<b class="r3"></b><b class="r1"></b><b class="r1"></b>' . '<div class="solution-inner-item">' . CFile::ShowImage($arDefaultTheme["SCREENSHOT"], 450, 450, ' border="0" id="solution-preview-image"') . '</div>' . '<b class="r1"></b><b class="r1"></b><b class="r3"></b>' . '</div>' . '</div>'; }
$res["AUTHOR_ID"] = intVal($res["AUTHOR_ID"]); $res["AUTHOR_NAME"] = $parser->wrap_long_words($res["AUTHOR_NAME"]); if ($res["AUTHOR_ID"] <= 0) { // Status list($res["AUTHOR_STATUS_CODE"], $res["AUTHOR_STATUS"]) = ForumGetUserForumStatus(0); } else { if (!array_key_exists($res["AUTHOR_ID"], $UserInfo)) { $perm = CForumNew::GetUserPermission($res["FORUM_ID"], CUser::GetUserGroup($res["AUTHOR_ID"])); $arUser = array("Perms" => $perm, "Rank" => $perm <= "Q" ? CForumUser::GetUserRank($res["AUTHOR_ID"], LANGUAGE_ID) : "", "Points" => !empty($res["POINTS"]) ? array("POINTS" => $res["POINTS"], "DATE_UPDATE" => $res["DATE_UPDATE"]) : false); $arUData = array(); // Status list($arUData["AUTHOR_STATUS_CODE"], $arUData["AUTHOR_STATUS"]) = ForumGetUserForumStatus($res["AUTHOR_ID"], $arUser["Perms"], $arUser); // Avatar if (!empty($res["AVATAR"])) { $arUData["AVATAR"] = array("ID" => $res["~AVATAR"], "FILE" => CFile::GetFileArray($res["~AVATAR"])); $arUData["AVATAR"]["HTML"] = CFile::ShowImage($arUData["AVATAR"]["FILE"], COption::GetOptionString("forum", "avatar_max_width", 90), COption::GetOptionString("forum", "avatar_max_height", 90), "border=\"0\"", "", true); } // Voting $arUData["VOTING"] = "N"; if (COption::GetOptionString("forum", "SHOW_VOTES", "Y") == "Y" && $USER->IsAuthorized() && ($GLOBALS["APPLICATION"]->GetGroupRight("forum") >= "W" || $USER->GetID() != $res["AUTHOR_ID"])) { $bUnVote = $arUser["Points"]; $bVote = !$arUser["Points"] ? $arResult["USER"]["RANK"]["VOTES"] : intval($arUser["Points"]["POINTS"]) < intval($arResult["USER"]["RANK"]["VOTES"]); $bVote = $bVote ? $bVote : $GLOBALS["APPLICATION"]->GetGroupRight("forum") >= "W"; $arUData["VOTING"] = $bVote ? "VOTE" : ($bUnVote ? "UNVOTE" : "N"); } // data $arUData["DATE_REG"] = CForumFormat::DateFormat($arParams["DATE_FORMAT"], MakeTimeStamp($res["DATE_REG"], CSite::GetDateFormat())); // Another data $arUData["DESCRIPTION"] = $parser->wrap_long_words($res["DESCRIPTION"]); if (!empty($res["SIGNATURE"])) { $arUData["SIGNATURE"] = $parser->convert($res["~SIGNATURE"], array_merge($arAllow, array("SMILES" => "N")));
} ?> </select> <?php } break; case 'file': $arDefParams = array("iMaxW" => 150, "iMaxH" => 150, "sParams" => "border=0", "strImageUrl" => "", "bPopup" => true, "sPopupTitle" => false, "size" => 20); foreach ($arDefParams as $k => $v) { if (!array_key_exists($k, $field["params"])) { $field["params"][$k] = $v; } } echo CFile::InputFile($field["id"], $field["params"]["size"], $val); if ($val != '') { echo '<br>' . CFile::ShowImage($val, $field["params"]["iMaxW"], $field["params"]["iMaxH"], $field["params"]["sParams"], $field["params"]["strImageUrl"], $field["params"]["bPopup"], $field["params"]["sPopupTitle"]); } break; case 'date': $APPLICATION->IncludeComponent("bitrix:main.calendar", "", array("SHOW_INPUT" => "Y", "INPUT_NAME" => $field["id"], "INPUT_VALUE" => $val, "INPUT_ADDITIONAL_ATTR" => $params, "SHOW_TIME" => 'Y'), $component, array("HIDE_ICONS" => true)); break; case 'crm_activity_list': $componentData = isset($field['componentData']) ? $field['componentData'] : array(); $APPLICATION->IncludeComponent('bitrix:crm.activity.list', isset($componentData['template']) ? $componentData['template'] : '', isset($componentData['params']) ? $componentData['params'] : array(), false, array('HIDE_ICONS' => 'Y', 'ACTIVE_COMPONENT' => 'Y')); break; default: ?> <input type="text" name="<?php echo $field["id"]; ?> " value="<?php
function InitImage($imageID, $imageWidth, $imageHeight = 0, $type = BX_RESIZE_IMAGE_PROPORTIONAL) { $imageFile = false; $imageImg = ""; if (($imageWidth = intval($imageWidth)) <= 0) { $imageWidth = 100; } if (($imageHeight = intval($imageHeight)) <= 0) { $imageHeight = $imageWidth; } $imageID = intval($imageID); if ($imageID > 0) { $imageFile = CFile::GetFileArray($imageID); if ($imageFile !== false) { $arFileTmp = CFile::ResizeImageGet($imageFile, array("width" => $imageWidth, "height" => $imageHeight), $type, false); $imageImg = CFile::ShowImage($arFileTmp["src"], $imageWidth, $imageHeight, "border=0", ""); } } return array("FILE" => $imageFile, "CACHE" => $arFileTmp, "IMG" => $imageImg); }
function ShowFile($iFileID, $max_file_size = 0, $iMaxW = 0, $iMaxH = 0, $bPopup = false, $sParams = false, $sPopupTitle = false, $iSizeWHTTP = 0, $iSizeHHTTP = 0) { $strResult = ""; $arFile = CFile::GetFileArray($iFileID); if ($arFile) { $max_file_size = intval($max_file_size); if ($max_file_size <= 0) { $max_file_size = 1000000000; } $ct = $arFile["CONTENT_TYPE"]; if ($max_file_size >= $arFile["FILE_SIZE"] && (substr($ct, 0, 6) == "video/" || substr($ct, 0, 6) == "audio/")) { $strResult = '<OBJECT ID="WMP64" WIDTH="' . ($iMaxW > 0 ? $iMaxW : '250') . '" HEIGHT="' . (substr($ct, 0, 6) == "audio/" ? '45' : ($iMaxH > 0 ? $iMaxH : '220')) . '" CLASSID="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject"> ' . '<PARAM NAME="AutoStart" VALUE="false"> ' . '<PARAM NAME="ShowDisplay" VALUE="false">' . '<PARAM NAME="ShowControls" VALUE="true" >' . '<PARAM NAME="ShowStatusBar" VALUE="0">' . '<PARAM NAME="FileName" VALUE="' . $arFile["SRC"] . '"> ' . '</OBJECT>'; } elseif ($max_file_size >= $arFile["FILE_SIZE"] && substr($ct, 0, 6) == "image/") { $strResult = CFile::ShowImage($arFile, $iMaxW, $iMaxH, $sParams, "", $bPopup, $sPopupTitle, $iSizeWHTTP, $iSizeHHTTP); } else { $strResult = ' [ <a href="' . $arFile["SRC"] . '" title="' . GetMessage("FILE_FILE_DOWNLOAD") . '">' . GetMessage("FILE_DOWNLOAD") . '</a> ] '; } } return $strResult; }
/** * <p>Вывод изображения, прикрепленного к описанию формы</p> * * * @param $string Необязательный параметр. Значение по умолчанию - "border=\"0\"". * * @param mixed $sAlign = "" Необязательный параметр. * * @param int $iMaxW = 0 Расположение изображения относительно текста. Может принимать * одно из четырех значений - <code>LEFT</code>, <code>CENTER</code>, <code>RIGHT</code> * (регистр не имеет значения) или пустое. Необязательный параметр. * * @param int $iMaxH = 0 Максимальная ширина изображения. Если ширина картинки больше iMaxW, * то она будет пропорционально смаштабирована.<br> Необязательный. * По умолчанию - "0" - без ограничений. * * @param string $bPopup = "N" Максимальная высота изображения. Если высота картинки больше iMaxH, * то она будет пропорционально смаштабирована.<br> Необязательный. * По умолчанию - "0" - без ограничений. * * @param string $strPopupTitle = "" Открывать ли при клике на изображении дополнительное popup окно с * увеличенным изображением.<br> Необязательный. Должен приниметь * одно из двух значений - "Y" или "N" (с учётом регистра). По умолчанию - * "N" (до версии 5.1.2 - "false"). * * @param string $sHSpace = "" Текст всплывающей подсказки на изображении (только если <i>bPopup</i> = * "Y")<br> Необязательный. По умолчанию выводится фраза "Нажмите чтобы * увеличить" на языке страницы (до версии 5.1.2 значение по умолчанию - * "false"). * * @param string $sVSpace = "" Устанавливает вертикальный отступ картинки от окружающего * текста в пикселях.<br> Необязательный. По умолчанию - "0" - без * отступа. * * @param string $sBorder = "" Устанавливает горизонтальный отступ картинки от окружающего * текста в пикселях.<br> Необязательный. По умолчанию - "0" - без * отступа. * * @return string <p>Возвращает HTML-код для вставки изображения в формы</p> <a * name="examples"></a><h4>Использование</h4> <pre class="syntax"> <?=$FORM->ShowFormImage("CENTER", * 250, 250, "Y", GetMessage("FORM_ENLARGE"), 0, 0)?> </pre> * * <h4>See Also</h4> * <menu> <li><a href="http://dev.1c-bitrix.ru/api_help/form/classes/cformoutput/index.php">Класс CFormOutput</a></li> * <li><a href="http://dev.1c-bitrix.ru/api_help/main/reference/cfile/showimage.php">CFile::ShowImage</a></li> <li><a * href="http://dev.1c-bitrix.ru/api_help/form/classes/cformoutput/showformdescription.php">CFormOutput::ShowFormDescription</a></li> * <li><a * href="http://dev.1c-bitrix.ru/api_help/form/classes/cformoutput/showformtitle.php">CFormOutput::ShowFormTitle</a></li> * <li><a * href="http://dev.1c-bitrix.ru/api_help/form/classes/cformoutput/isformimage.php">CFormOutput::isFormImage</a></li> * </menu></b<br><br> * * * @static * @link http://dev.1c-bitrix.ru/api_help/form/classes/cformoutput/showformimage.php * @author Bitrix */ public function ShowFormImage($sAlign = "", $iMaxW = "", $iMaxH = "", $bPopup = "N", $strPopupTitle = "", $sHSpace = "", $sVSpace = "", $sBorder = "") { if ($this->isFormImage()) { $arImageParams = array(); if (strlen($sAlign) > 0) { $arImageParams[] = sprintf("align=\"%s\"", $sAlign); } if (strlen($sHSpace) > 0) { $arImageParams[] = sprintf("hspace=\"%s\"", $sHSpace); } if (strlen($sVSpace) > 0) { $arImageParams[] = sprintf("vspace=\"%s\"", $sVSpace); } if (strlen($sBorder) > 0) { $arImageParams[] = sprintf("border=\"%s\"", $sBorder); } else { $arImageParams[] = "border=\"0\""; } if (strlen($strPopupTitle) <= 0) { $strPopupTitle = false; } if (strlen($this->__form_image_cache) <= 0) { $this->__form_image_cache = CFile::ShowImage($this->arForm["IMAGE_ID"], $iMaxW, $iMaxH, implode(" ", $arImageParams), $strImageUrl, $bPopup == "Y", $strPopupTitle); } $ret = $this->__form_image_cache; if (strtoupper($sAlign) == "CENTER") { $ret = "<div align=\"center\">" . $ret . "</div>"; } $this->__form_image_cache = $ret; return $ret; } }
$dbUser = CUser::GetByID($arPost["AUTHOR_ID"]); $arResult["arUser"] = $dbUser->GetNext(); $arResult["AuthorName"] = CBlogUser::GetUserName($arResult["BlogUser"]["ALIAS"], $arResult["arUser"]["NAME"], $arResult["arUser"]["LAST_NAME"], $arResult["arUser"]["LOGIN"]); if ($arResult["PostPerm"] > BLOG_PERMS_MODERATE || $arResult["PostPerm"] >= BLOG_PERMS_PREMODERATE && $arPost["AUTHOR_ID"] == $arResult["USER_ID"]) { $arResult["urlToEdit"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_POST_EDIT"], array("blog" => $arBlog["URL"], "post_id" => $arPost["ID"], "user_id" => $arParams["USER_ID"])); } if ($arResult["PostPerm"] >= BLOG_PERMS_MODERATE) { $arResult["urlToHide"] = htmlspecialcharsex($APPLICATION->GetCurPageParam("hide=Y", array("del_id", "sessid", "success", "hide", "delete"))); } if ($arResult["PostPerm"] >= BLOG_PERMS_FULL) { $arResult["urlToDelete"] = htmlspecialcharsex($APPLICATION->GetCurPageParam("delete=Y", array("sessid", "delete", "hide"))); } $arResult["BlogUser"]["AVATAR_file"] = CFile::GetFileArray($arResult["BlogUser"]["AVATAR"]); if ($arResult["BlogUser"]["AVATAR_file"] !== false) { $arResult["BlogUser"]["Avatar_resized"] = CFile::ResizeImageGet($arResult["BlogUser"]["AVATAR_file"], array("width" => 100, "height" => 100), BX_RESIZE_IMAGE_EXACT, false); $arResult["BlogUser"]["AVATAR_img"] = CFile::ShowImage($arResult["BlogUser"]["Avatar_resized"]["src"], 100, 100, "border=0 align='right'"); } if (strlen($arPost["CATEGORY_ID"]) > 0) { $arCategory = explode(",", $arPost["CATEGORY_ID"]); foreach ($arCategory as $v) { if (IntVal($v) > 0) { $arCatTmp = CBlogTools::htmlspecialcharsExArray(CBlogCategory::GetByID($v)); $arCatTmp["urlToCategory"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_BLOG_CATEGORY"], array("blog" => $arBlog["URL"], "category_id" => $v, "user_id" => $arParams["USER_ID"])); $arResult["Category"][] = $arCatTmp; } } } if ($arParams["SEO_USE"] == "D") { $arResult["Post"]["SEO_TITLE"] = $arPost["TITLE"]; $arResult["Post"]["SEO_DESCRIPTION"] = $p->killAllTags($arPost["~DETAIL_TEXT"]); $arResult["Post"]["SEO_TAGS"] = "";
<? echo CFile::ShowImage($photoID, 770, 300); ?> </div> <? $first = false; endforeach ?> </div> <!-- Carousel nav --> <a class="carousel-control left" href="#myCarousel" data-slide="prev">‹</a> <a class="carousel-control right" href="#myCarousel" data-slide="next">›</a> </div> <script> jQuery(document).ready(function ($) { jQuery('#myCarousel').carousel({ interval: 5000 }); }); </script> <? else: ?> <? if (count($photos['PROPERTY_PHOTOS_VALUE']) > 0) { foreach ($photos['PROPERTY_PHOTOS_VALUE'] as $photoID) $path = $photoID; } elseif ($photos['DETAIL_PICTURE'] > 0) { $path = $photos['DETAIL_PICTURE']; } elseif ($photos['PREVIEW_PICTURE'] > 0) { $path = $photos['PREVIEW_PICTURE']; } else { $path = SITE_TEMPLATE_PATH . '/images/no-photo.jpg'; } ?> <div id="myCarousel" style="text-align: center"> <? echo CFile::ShowImage($path, 770, 300); ?> </div> <?endif; ?>
function showImageOrDownloadLink($fileId, $orderId = 0, $arSize = array("WIDTH" => 90, "HEIGHT" => 90)) { $resultHTML = ""; $arFile = CFile::GetFileArray($fileId); if ($arFile) { $is_image = CFile::IsImage($arFile["FILE_NAME"], $arFile["CONTENT_TYPE"]); if ($is_image) $resultHTML = CFile::ShowImage($arFile["ID"], $arSize["WIDTH"], $arSize["HEIGHT"], "border=0", "", true); else $resultHTML = "<a href=\"sale_order_detail.php?ID=".$orderId."&download=Y&file_id=".$arFile["ID"]."&".bitrix_sessid_get()."\">".$arFile["ORIGINAL_NAME"]."</a>"; } return $resultHTML; }
function AddFileField($id, $label, $value, $arParams=array(), $required=false) { $arDefParams = array("iMaxW"=>150, "iMaxH"=>150, "sParams"=>"border=0", "strImageUrl"=>"", "bPopup"=>true, "sPopupTitle"=>false); foreach($arDefParams as $key=>$val) if(!array_key_exists($key, $arParams)) $arParams[$key] = $val; $html = CFile::InputFile($id, 20, $value); if($value <> '') $html .= '<div class="adm-detail-file-image">'.CFile::ShowImage($value, $arParams["iMaxW"], $arParams["iMaxH"], $arParams["sParams"], $arParams["strImageUrl"], $arParams["bPopup"], $arParams["sPopupTitle"])."</div>"; $this->tabs[$this->tabIndex]["FIELDS"][$id] = array( "id" => $id, "required" => $required, "content" => $label, "html" => '<td width="40%">'.($required? '<span class="adm-required-field">'.$this->GetCustomLabelHTML($id, $label).'</span>': $this->GetCustomLabelHTML($id, $label)).'</td><td>'.$html.'</td>', "valign" => "top", "rowClass" => "adm-detail-file-row" ); }
<?php foreach ($arResult["ITEMS"] as $cell => $arElement) { ?> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="200" align="left" valign="top" class="new"> <?php if (is_array($arElement["PREVIEW_PICTURE"])) { ?> <?php echo CFile::ShowImage($arElement["PREVIEW_PICTURE"]["SRC"], 156, 97, "border=0", $arElement["DETAIL_PAGE_URL"]); ?> <?php } ?> <br /> <a href="<?php echo $arElement["DETAIL_PAGE_URL"]; ?> "><?php echo $arElement["NAME"]; ?> </td> <td valign="top" class="bottext"><?php
$arResult['ELEMENT_PREVIEW']['DETAIL_TEXT'] = $CWikiParser->Clear($arResult['ELEMENT_PREVIEW']['DETAIL_TEXT']); $arResult['ELEMENT']['TAGS'] = htmlspecialcharsbx($_POST['TAGS']); $arResult['ELEMENT']['~TAGS'] = htmlspecialcharsbx($_POST['TAGS']); } } } // obtain a list of pictures page $arResult['IMAGES'] = array(); if (!empty($arResult['ELEMENT']['IMAGES'])) { foreach ($arResult['ELEMENT']['IMAGES'] as $_imgID) { $rsFile = CFile::GetByID($_imgID); $arFile = $rsFile->Fetch(); $aImg = array(); $aImg['ID'] = $_imgID; $aImg['ORIGINAL_NAME'] = $arFile['ORIGINAL_NAME']; $aImg['FILE_SHOW'] = CFile::ShowImage($_imgID, 100, 100, "id=\"{$_imgID}\" border=\"0\" style=\"cursor:pointer;\" onclick=\"doInsert('[File:" . CUtil::JSEscape(htmlspecialcharsbx($arFile['ORIGINAL_NAME'])) . "]','',false, '{$_imgID}')\" title='" . GetMessage('WIKI_IMAGE_INSERT') . "'"); $arResult['IMAGES'][] = $aImg; } } include_once $_SERVER['DOCUMENT_ROOT'] . '/bitrix/components/bitrix/wiki/include/nav.php'; $arResult['PATH_TO_POST_EDIT'] = CHTTP::urlAddParams(CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_POST_EDIT'], array('wiki_name' => urlencode($arParams['ELEMENT_NAME']), 'group_id' => CWikiSocnet::$iSocNetId)), $arParams['IN_COMPLEX'] == 'Y' && $arParams['SEF_MODE'] == 'N' ? array($arParams['OPER_VAR'] => $arResult['WIKI_oper']) : array()); $arResult['~PATH_TO_POST_EDIT'] = urldecode($arResult['PATH_TO_POST_EDIT']); //because it can change the page name, and hence the path for the parameter "Action" in tag "Form" if (strpos(POST_FORM_ACTION_URI, 'SEF_APPLICATION_CUR_PAGE_URL=') !== false) { $arResult['PATH_TO_POST_EDIT_SUBMIT'] = CHTTP::urlAddParams(CHTTP::urlDeleteParams(POST_FORM_ACTION_URI, array('SEF_APPLICATION_CUR_PAGE_URL')), array('SEF_APPLICATION_CUR_PAGE_URL' => urlencode($arResult['~PATH_TO_POST_EDIT']))); } else { $arResult['PATH_TO_POST_EDIT_SUBMIT'] = $arResult['PATH_TO_POST_EDIT']; } $sCatName = ''; $arResult["IS_CATEGORY_PAGE"] = CWikiUtils::IsCategoryPage($arResult['ELEMENT']['NAME_LOCALIZE'], $sCatName); }
} if ($arParams["SHOW_BLOG_WITHOUT_POSTS"] != "Y") { $arFilter[">LAST_POST_ID"] = 0; } $dbBlog = CBlog::GetList($SORT, $arFilter, false, array("nPageSize" => $arParams["BLOG_COUNT"], "bShowAll" => false), $arSelectFields); $arResult["NAV_STRING"] = $dbBlog->GetPageNavString(GetMessage("B_B_GR_TITLE"), $arParams["NAV_TEMPLATE"], false, $component); $arResult["BLOG"] = array(); while ($arBlog = $dbBlog->GetNext()) { $arBlog["urlToPost"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_POST"], array("blog" => $arBlog["URL"], "post_id" => $arBlog["LAST_POST_ID"], "user_id" => $arBlog["OWNER_ID"])); $arBlog["urlToBlog"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_BLOG"], array("blog" => $arBlog["URL"], "user_id" => $arBlog["OWNER_ID"])); $arBlog["urlToAuthor"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_USER"], array("user_id" => $arBlog["OWNER_ID"])); $arBlog["AuthorName"] = CBlogUser::GetUserName($arBlog["BLOG_USER_ALIAS"], $arBlog["OWNER_NAME"], $arBlog["OWNER_LAST_NAME"], $arBlog["OWNER_LOGIN"]); $arBlog["BLOG_USER_AVATAR_ARRAY"] = CFile::GetFileArray($arBlog["BLOG_USER_AVATAR"]); if ($arBlog["BLOG_USER_AVATAR_ARRAY"] !== false) { $arBlog["Avatar_resized"] = CFile::ResizeImageGet($arBlog["BLOG_USER_AVATAR_ARRAY"], array("width" => 100, "height" => 100), BX_RESIZE_IMAGE_EXACT, false); $arBlog["BLOG_USER_AVATAR_IMG"] = CFile::ShowImage($arBlog["Avatar_resized"]["src"], 100, 100, 'align="right"'); } $arBlog["LAST_POST_DATE_FORMATED"] = FormatDate($arParams["DATE_TIME_FORMAT"], MakeTimeStamp($arBlog["LAST_POST_DATE"], CSite::GetDateFormat("FULL"))); $arResult["BLOG"][] = $arBlog; } if ($arParams["CACHE_TIME"] > 0) { $cache->EndDataCache(array("templateCachedData" => $this->GetTemplateCachedData(), "arResult" => $arResult)); } } } else { $arResult["FATAL_ERROR"] = GetMessage("B_B_GR_NO_GROUP"); CHTTP::SetStatus("404 Not Found"); } } else { $arResult["FATAL_ERROR"] = GetMessage("B_B_GR_NO_GROUP"); CHTTP::SetStatus("404 Not Found");