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


PHP CFile::_GetImgParams方法代码示例

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


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

示例1:

pt; width: <?php 
echo $width;
?>
pt; background: <?php 
echo $background;
?>
">

<table class="header">
	<tr>
		<?php 
if (CSalePaySystemAction::GetParamValue("PATH_TO_LOGO", false)) {
    ?>
		<td style="padding-right: 5pt; ">
			<?php 
    $imgParams = CFile::_GetImgParams(CSalePaySystemAction::GetParamValue('PATH_TO_LOGO', false));
    ?>
			<?php 
    $imgWidth = $imgParams['WIDTH'] * 96 / (intval(CSalePaySystemAction::GetParamValue('LOGO_DPI', false)) ?: 96);
    ?>
			<img src="<?php 
    echo $imgParams['SRC'];
    ?>
" width="<?php 
    echo $imgWidth;
    ?>
" />
		</td>
		<?php 
}
?>
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:html.php

示例2: Show2Images

 function Show2Images($strImage1, $strImage2, $iMaxW = 0, $iMaxH = 0, $sParams = false, $sPopupTitle = false, $iSizeWHTTP = 0, $iSizeHHTTP = 0)
 {
     if (!($arImgParams = CFile::_GetImgParams($strImage1, $iSizeWHTTP, $iSizeHHTTP))) {
         return "";
     }
     $strImage1 = htmlspecialcharsbx($arImgParams["SRC"]);
     $intWidth = $arImgParams["WIDTH"];
     $intHeight = $arImgParams["HEIGHT"];
     $strAlt = $arImgParams["ALT"];
     if ($sParams == false) {
         $sParams = 'border="0" alt="' . htmlspecialcharsEx($strAlt) . '"';
     } elseif (!preg_match("/(^|\\s)alt\\s*=\\s*([\"']?)(.*?)(\\2)/is", $sParams)) {
         $sParams .= ' alt="' . htmlspecialcharsEx($strAlt) . '"';
     }
     if ($iMaxW > 0 && $iMaxH > 0 && ($intWidth > $iMaxW || $intHeight > $iMaxH)) {
         $coeff = $intWidth / $iMaxW > $intHeight / $iMaxH ? $intWidth / $iMaxW : $intHeight / $iMaxH;
         $iHeight = intval(roundEx($intHeight / $coeff));
         $iWidth = intval(roundEx($intWidth / $coeff));
     } else {
         $iHeight = $intHeight;
         $iWidth = $intWidth;
     }
     if ($arImgParams = CFile::_GetImgParams($strImage2, $iSizeWHTTP, $iSizeHHTTP)) {
         if ($sPopupTitle === false) {
             $sPopupTitle = GetMessage("FILE_ENLARGE");
         }
         $strImage2 = htmlspecialcharsbx($arImgParams["SRC"]);
         $intWidth2 = $arImgParams["WIDTH"];
         $intHeight2 = $arImgParams["HEIGHT"];
         $strAlt2 = $arImgParams["ALT"];
         CFile::OutputJSImgShw();
         $strReturn = "<a title=\"" . $sPopupTitle . "\" onclick=\"ImgShw('" . CUtil::addslashes($strImage2) . "','" . $intWidth2 . "','" . $intHeight2 . "', '" . CUtil::addslashes(htmlspecialcharsEx(htmlspecialcharsEx($strAlt2))) . "'); return false;\" href=\"" . $strImage2 . "\" target=_blank>" . "<img src=\"" . $strImage1 . "\" " . $sParams . " width=" . $iWidth . " height=" . $iHeight . " /></a>";
     } else {
         $strReturn = "<img src=\"" . $strImage1 . "\" " . $sParams . " width=" . $iWidth . " height=" . $iHeight . " />";
     }
     return $strReturn;
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:37,代码来源:file.php

示例3: count

     }
 }
 $arResult["Smiles"] = CBlogSmile::GetSmilesList();
 $arResult["SmilesCount"] = count($arSmileTmp["Smiles"]);
 $arResult["Images"] = array();
 if (!empty($arBlog) && ($arPost["ID"] > 0 || strlen($arResult["ERROR_MESSAGE"]) > 0)) {
     $arFilter = array("POST_ID" => $arParams["ID"], "BLOG_ID" => $arBlog["ID"], "IS_COMMENT" => "N");
     if ($arParams["ID"] == 0) {
         $arFilter["USER_ID"] = $arResult["UserID"];
     }
     $res = CBlogImage::GetList(array("ID" => "ASC"), $arFilter);
     while ($aImg = $res->Fetch()) {
         $aImgNew = CFile::ResizeImageGet($aImg["FILE_ID"], array("width" => 90, "height" => 90), BX_RESIZE_IMAGE_EXACT, true);
         $aImgNew["source"] = CFile::ResizeImageGet($aImg["FILE_ID"], array("width" => $arParams["IMAGE_MAX_WIDTH"], "height" => $arParams["IMAGE_MAX_HEIGHT"]), BX_RESIZE_IMAGE_PROPORTIONAL, true);
         $aImgNew["ID"] = $aImg["ID"];
         $aImgNew["params"] = CFile::_GetImgParams($aImg["FILE_ID"]);
         $aImgNew["fileName"] = substr($aImgNew["src"], strrpos($aImgNew["src"], "/") + 1);
         $aImgNew["fileShow"] = "<img src=\"" . $aImgNew["src"] . "\" width=\"" . $aImgNew["width"] . "\" height=\"" . $aImgNew["height"] . "\" border=\"0\" style=\"cursor:pointer\" onclick=\"InsertBlogImage_LHEPostFormId_blogPostForm('" . $aImg["ID"] . "', '" . $aImgNew["source"]['src'] . "', '" . $aImgNew["source"]['width'] . "');\" title=\"" . GetMessage("BLOG_P_INSERT") . "\">";
         $aImgNew["SRC"] = $aImgNew["source"]["src"];
         $aImgNew["FILE_NAME"] = $aImgNew["fileName"];
         $aImgNew["FILE_SIZE"] = $aImgNew["source"]["size"];
         $aImgNew["URL"] = $aImgNew["src"];
         $aImgNew["CONTENT_TYPE"] = "image/xyz";
         $aImgNew["THUMBNAIL"] = $aImgNew["src"];
         $aImgNew["DEL_URL"] = $APPLICATION->GetCurPageParam("del_image_id=" . $aImg["ID"] . "&" . bitrix_sessid_get(), array("sessid", "image_upload_frame", "image_upload", "do_upload", "del_image_id"));
         $arResult["Images"][] = $aImgNew;
     }
 }
 if (strpos($arResult["PostToShow"]["CATEGORY_ID"], ",") !== false) {
     $arResult["PostToShow"]["CATEGORY_ID"] = explode(",", trim($arResult["PostToShow"]["CATEGORY_ID"]));
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:component.php

示例4: header

             $arBlog = CBlog::GetByID($arPost["BLOG_ID"]);
         }
         CBlogPost::$arBlogPCCache[$arPost["BLOG_ID"]] = $arBlog;
     }
 }
 $strErrorMessage = '';
 if ($_POST["blog_upload_image_comment"] == "Y") {
     if ($_FILES["BLOG_UPLOAD_FILE"]["size"] > 0) {
         $arResult["imageUploadFrame"] = "Y";
         $APPLICATION->RestartBuffer();
         header("Pragma: no-cache");
         $arFields = array("MODULE_ID" => "blog", "BLOG_ID" => $arBlog["ID"], "POST_ID" => $arPost["ID"], "=TIMESTAMP_X" => $DB->GetNowFunction(), "TITLE" => "", "IMAGE_SIZE" => $_FILES["BLOG_UPLOAD_FILE"]["size"], "IS_COMMENT" => "Y", "URL" => $arBlog["URL"], "USER_ID" => IntVal($user_id));
         $arFields["FILE_ID"] = array_merge($_FILES["BLOG_UPLOAD_FILE"], array("MODULE_ID" => "blog", "del" => "Y"));
         if ($imgID = CBlogImage::Add($arFields)) {
             $aImg = CBlogImage::GetByID($imgID);
             $aImg["PARAMS"] = CFile::_GetImgParams($aImg["FILE_ID"]);
             $arResult["Image"] = array("ID" => $aImg["ID"], "SRC" => $aImg["PARAMS"]["SRC"], "WIDTH" => $aImg["PARAMS"]["WIDTH"], "HEIGHT" => $aImg["PARAMS"]["HEIGHT"]);
         } else {
             if ($ex = $APPLICATION->GetException()) {
                 $arResult["ERROR_MESSAGE"] = $ex->GetString();
             }
         }
         $this->IncludeComponentTemplate();
         return;
     }
 }
 if ($_POST["act"] != "edit") {
     if ($arResult["use_captcha"]) {
         include_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/classes/general/captcha.php";
         $captcha_code = $_POST["captcha_code"];
         $captcha_word = $_POST["captcha_word"];
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:component.php

示例5: join

>
<div style="margin: 0pt; padding: <?php 
echo join('pt ', $margin);
?>
pt; width: <?php 
echo $width;
?>
pt; background: <?php 
echo $background;
?>
">
<div style="margin: 0pt; padding: 0pt;">
	<?php 
$pathToLogo = CSalePaySystemAction::GetParamValue("PATH_TO_LOGO", false);
if ($pathToLogo) {
    $imgParams = CFile::_GetImgParams($pathToLogo);
    $imgWidth = $imgParams['WIDTH'] * 96 / (intval(CSalePaySystemAction::GetParamValue('LOGO_DPI', false)) ?: 96);
    ?>
<img src="<?php 
    echo $imgParams['SRC'];
    ?>
" width="<?php 
    echo $imgWidth;
    ?>
" /><?php 
}
unset($pathToLogo);
?>
</div>
<br>
<div style="margin: 0pt; padding: 0pt;">
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:html.php


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