本文整理汇总了PHP中TxtToHTML函数的典型用法代码示例。如果您正苦于以下问题:PHP TxtToHTML函数的具体用法?PHP TxtToHTML怎么用?PHP TxtToHTML使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了TxtToHTML函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: TxtToHTML
if (intval($f_USERS_ONLINE)>0)
{
$ID_HTML .= '<img src="/bitrix/images/1.gif" width="1" height="3"><br>
<nobr>('.GetMessage("SUP_ONLINE").' - <span class="supportrequired">'.intval($f_USERS_ONLINE).'</span>)</nobr>';
}
$row->AddViewField("LAMP", '<div class="lamp-'.str_replace("_","-",$f_LAMP).'" title="'.$lamp_alt.'"></div>'.$ID_HTML);
$TITLE_HTML = (strlen(trim($f_TITLE))<=0) ? " " : TxtToHTML($f_TITLE, true, 30);
$TITLE_HTML .= "<br>";
if (($bADS) && strlen(trim($f_SUPPORT_COMMENTS))>0)
$TITLE_HTML .= '<br><img src="/bitrix/images/1.gif" width="1" height="5" border="0" alt=""><br>[ '.TxtToHTML($f_SUPPORT_COMMENTS, true, 30).' ]';
$row->AddViewField("TITLE", $TITLE_HTML);
$row->AddViewField("SITE_ID", Support_GetSiteInfo($f_SITE_ID));
$DATE_CREATE_HTML = "";
if ($bADS)
{
if (intval($f_PROBLEM_TIME)>0)
{
$str = "";
$days = intval($f_PROBLEM_TIME/1440);
if ($days>0)
{
$str .= $days." ".GetMessage("SUP_DAYS")." ";
示例2: intval
$arParams["MESSAGES_PER_PAGE"] = intval($arParams["MESSAGES_PER_PAGE"]) <= 0 ? 20 : intval($arParams["MESSAGES_PER_PAGE"]);
$arFilter = array("TICKET_ID" => $arParams["ID"], "TICKET_ID_EXACT_MATCH" => "Y", "IS_MESSAGE" => "Y");
CPageOption::SetOptionString("main", "nav_page_in_session", "N");
//sort config
$order = $arParams["MESSAGE_SORT_ORDER"];
$rsMessage = CTicket::GetMessageList($by, $order, $arFilter, $is_filtered, $check_rights = "Y", $get_user_name = "N");
$rsMessage->NavStart($arParams["MESSAGES_PER_PAGE"]);
$arResult["NAV_STRING"] = $rsMessage->GetPageNavString(GetMessage("SUP_PAGES"));
$arResult["NAV_RESULT"] = $rsMessage;
while ($arMessage = $rsMessage->GetNext()) {
if (array_key_exists($arMessage["ID"], $arMessagesFiles)) {
$arFiles["FILES"] = $arMessagesFiles[$arMessage["ID"]];
} else {
$arFiles["FILES"] = array();
}
$arMessage["MESSAGE"] = TxtToHTML($arMessage["~MESSAGE"], $bMakeUrls = true, $iMaxStringLen = $arParams["MESSAGE_MAX_LENGTH"], $QUOTE_ENABLED = "Y", $NOT_CONVERT_AMPERSAND = "N", $CODE_ENABLED = "Y", $BIU_ENABLED = "Y", $quote_table_class = "support-quote-table", $quote_head_class = "support-quote-head", $quote_body_class = "support-quote-body", $code_table_class = "support-code-table", $code_head_class = "support-code-head", $code_body_class = "support-code-body", $code_textarea_class = "support-code-textarea", $link_class = "");
$arResult["MESSAGES"][] = $arMessage + $arFiles + _GetUserInfo($arMessage["OWNER_USER_ID"], "OWNER") + _GetUserInfo($arMessage["CREATED_USER_ID"], "CREATED") + _GetUserInfo($arMessage["MODIFIED_USER_ID"], "MODIFIED_BY");
}
//Online
CTicket::UpdateOnline($arParams["ID"], $USER->GetID());
$rsOnline = CTicket::GetOnline($arParams["ID"]);
while ($arOnline = $rsOnline->GetNext()) {
$arResult["ONLINE"][] = $arOnline;
}
$ticketSite = $arTicket["SITE_ID"];
$ticketSla = $arTicket["SLA_ID"];
} else {
$ticketSite = SITE_ID;
$ticketSla = CTicketSLA::GetForUser();
$arResult["DICTIONARY"]["CRITICALITY_DEFAULT"] = CTicketDictionary::GetDefault("K", $ticketSite);
$arResult["DICTIONARY"]["CATEGORY_DEFAULT"] = CTicketDictionary::GetDefault("C", $ticketSite);
示例3: TxtToHTML
} else {
$out .= TxtToHTML($arrAns["USER_TEXT"], true, 50) . "<br />";
}
}
if (strlen(trim($arrAns["ANSWER_TEXT"])) > 0) {
$answer = "[<span class='form-anstext'>" . TxtToHTML($arrAns["ANSWER_TEXT"], true, 50) . "</span>]";
if (strlen(trim($arrAns["ANSWER_VALUE"])) > 0) {
$answer .= " ";
} else {
$answer .= "<br />";
}
$out .= $answer;
}
if ($arParams["SHOW_ANSWER_VALUE"] == "Y") {
if (strlen(trim($arrAns["ANSWER_VALUE"])) > 0) {
$out .= "(<span class='form-ansvalue'>" . TxtToHTML($arrAns["ANSWER_VALUE"], true, 50) . "</span>)<br />";
}
}
if (intval($arrAns["USER_FILE_ID"]) > 0) {
if ($arrAns["USER_FILE_IS_IMAGE"] == "Y") {
$out .= CFile::ShowImage($arrAns["USER_FILE_ID"], 0, 0, "border=0", "", true);
} else {
$file_link = "/bitrix/tools/form_show_file.php?rid=" . $arParams["RESULT_ID"] . "&hash=" . $arrAns["USER_FILE_HASH"] . "&lang=" . LANGUAGE_ID;
$out .= "<a title=\"" . GetMessage("FORM_VIEW_FILE") . "\" target=\"_blank\" href=\"" . $file_link . "\">" . htmlspecialcharsbx($arrAns["USER_FILE_NAME"]) . "</a><br />(";
$out .= CFile::FormatSize($arrAns["USER_FILE_SIZE"]);
$out .= ")<br />[ <a title=\"" . str_replace("#FILE_NAME#", $arrAns["USER_FILE_NAME"], GetMessage("FORM_DOWNLOAD_FILE")) . "\" href=\"" . $file_link . "&action=download\">" . GetMessage("FORM_DOWNLOAD") . "</a> ]";
}
//endif;
}
//endif;
}
示例4: _ConvReplies
</tr>
<?php
function _ConvReplies($str1, $str2)
{
$str2 = str_replace('\\"', '"', $str2);
if (substr_count($str1, ">") % 2 == 1) {
$clr = "#770000";
} else {
$clr = "#CC9933";
}
return '<font color="' . $clr . '">' . $str1 . $str2 . '';
}
?>
<tr>
<td colspan="2" style="background:white; padding: 15px;"><font style="font-family:Courier New, Arial, Helvetica, sans-serif; font-size:12px; color: #000000; text-decoration:none;"><?php
echo preg_replace("'(^|\r\n)[\\s]*([A-Za-z]*(>)+)([^\r\n]+)'e", "_ConvReplies('\\2', '\\4')", TxtToHTML($dbr_arr["BODY"]));
?>
</td>
</tr>
<?php
if ($dbr_arr["ATTACHMENTS"] > 0) {
$dbr_attach = CMailAttachment::GetList(array("NAME" => "ASC", "ID" => "ASC"), array("MESSAGE_ID" => $dbr_arr["ID"]));
?>
<tr>
<td><?php
echo GetMessage("MAIL_MSG_VIEW_ATTACHMENTS");
?>
</td>
<td>
<?php
while ($dbr_attach_arr = $dbr_attach->GetNext()) {
示例5: _ConvReplies
</tr>
<?php
function _ConvReplies($str1, $str2)
{
$str2 = str_replace('\\"', '"', $str2);
if (substr_count($str1, ">") % 2 == 1) {
$clr = "#770000";
} else {
$clr = "#CC9933";
}
return '<font color="' . $clr . '">' . $str1 . $str2 . '';
}
?>
<tr>
<td colspan="2" style="background:white; padding: 15px;"><?php
echo preg_replace_callback("'(^|\r\n)[\\s]*([A-Za-z]*(>)+)([^\r\n]+)'", create_function('$m', "return _ConvReplies(\$m[2], \$m[4]);"), TxtToHTML($dbr_arr["BODY"]));
?>
</td>
</tr>
<?php
if ($dbr_arr["ATTACHMENTS"] > 0) {
$dbr_attach = CMailAttachment::GetList(array("NAME" => "ASC", "ID" => "ASC"), array("MESSAGE_ID" => $dbr_arr["ID"]));
?>
<tr>
<td><?php
echo GetMessage("MAIL_MSG_VIEW_ATTACHMENTS");
?>
</td>
<td>
<?php
while ($dbr_attach_arr = $dbr_attach->GetNext()) {
示例6: _ConvReplies
<td><?=nl2br(htmlspecialcharsbx($dbr_arr["HEADER"]))?>
</td>
</tr>
<?
function _ConvReplies($str1, $str2)
{
$str2 = str_replace('\"', '"', $str2);
if(substr_count($str1, ">")%2 == 1)
$clr = "#770000";
else
$clr = "#CC9933";
return '<font color="'.$clr.'">'.$str1.$str2.'';
}
?>
<tr>
<td colspan="2" style="background:white; padding: 15px;"><?=preg_replace("'(^|\r\n)[\s]*([A-Za-z]*(>)+)([^\r\n]+)'e", "_ConvReplies('\\2', '\\4')", TxtToHTML($dbr_arr["BODY"]))?></td>
</tr>
<?
if($dbr_arr["ATTACHMENTS"]>0):
$dbr_attach = CMailAttachment::GetList(Array("NAME"=>"ASC", "ID"=>"ASC"), Array("MESSAGE_ID"=>$dbr_arr["ID"]));
?>
<tr>
<td><?echo GetMessage("MAIL_MSG_VIEW_ATTACHMENTS")?></td>
<td>
<?while($dbr_attach_arr = $dbr_attach->GetNext()):?>
<a target="_blank" href="mail_attachment_view.php?lang=<?=LANG?>&ID=<?=$dbr_attach_arr["ID"]?>"><?=(strlen($dbr_attach_arr["FILE_NAME"])>0?$dbr_attach_arr["FILE_NAME"]:GetMessage("MAIL_MSG_VIEW_NNM"))?></a> (<?
echo CFile::FormatSize($dbr_attach_arr["FILE_SIZE"]);
?>)<br>
<?endwhile?>
</td>
示例7: TxtToHTML
}
} else {
$txt .= TxtToHTML($arrA["USER_TEXT"], true, 100) . "<br>";
}
}
if (strlen(trim($arrA["ANSWER_TEXT"])) > 0) {
$answer = "[" . TxtToHTML($arrA["ANSWER_TEXT"], true, 100) . "]";
if (strlen(trim($arrA["ANSWER_VALUE"])) > 0) {
$answer .= " ";
} else {
$answer .= "<br>";
}
$txt .= $answer;
}
if (strlen(trim($arrA["ANSWER_VALUE"])) > 0) {
$txt .= "(" . TxtToHTML($arrA["ANSWER_VALUE"], true, 100) . ")<br>";
}
if (intval($arrA["USER_FILE_ID"]) > 0) {
if ($arrA["USER_FILE_IS_IMAGE"] == "Y") {
$txt .= CFile::ShowImage($arrA["USER_FILE_ID"], 0, 0, "border=0", "", true);
} else {
$txt .= "<a title=\"" . GetMessage("FORM_VIEW_FILE") . "\" href=\"/bitrix/tools/form_show_file.php?rid={$f_ID}&hash={$arrA['USER_FILE_HASH']}&lang=" . LANGUAGE_ID . "\">" . htmlspecialcharsbx($arrA["USER_FILE_NAME"]) . "</a><br>(";
$txt .= CFile::FormatSize($arrA["USER_FILE_SIZE"]);
$txt .= ")<br>[ <a title=\"" . str_replace("#FILE_NAME#", $arrA["USER_FILE_NAME"], GetMessage("FORM_DOWNLOAD_FILE")) . "\" href=\"/bitrix/tools/form_show_file.php?rid={$f_ID}&hash={$arrA['USER_FILE_HASH']}&lang=" . LANGUAGE_ID . "&action=download\">" . GetMessage("FORM_DOWNLOAD") . "</a> ]";
}
}
$row->AddViewField($arrA['SID'], $txt);
}
}
$arrRESULT_PERMISSION = CFormResult::GetPermissions($f_ID, $v);
$arActions = array();
示例8: foreach
}
if (is_array($arResult["arrAnswers"])) {
foreach ($arResult["arrAnswers"] as $res_key => $arrResult) {
foreach ($arrResult as $q_key => $arAnswers) {
foreach ($arAnswers as $a_key => $arrA) {
if (strlen(trim($arrA["USER_TEXT"])) > 0) {
$arrA["USER_TEXT"] = intval($arrA["USER_FILE_ID"]) > 0 ? htmlspecialcharsbx($arrA["USER_TEXT"]) : TxtToHTML($arrA["USER_TEXT"], true, 100);
}
if (strlen(trim($arrA["USER_DATE"])) > 0) {
$arrA["USER_TEXT"] = $DB->FormatDate($arrA["USER_DATE"], FORMAT_DATETIME, FORMAT_DATE);
}
if (strlen(trim($arrA["ANSWER_TEXT"])) > 0) {
$arrA["ANSWER_TEXT"] = TxtToHTML($arrA["ANSWER_TEXT"], true, 100);
}
if (strlen(trim($arrA["ANSWER_VALUE"])) > 0) {
$arrA["ANSWER_VALUE"] = TxtToHTML($arrA["ANSWER_VALUE"], true, 100);
}
if (intval($arrA["USER_FILE_ID"]) > 0) {
if ($arrA["USER_FILE_IS_IMAGE"] == "Y") {
$arrA["USER_FILE_IMAGE_CODE"] = CFile::ShowImage($arrA["USER_FILE_ID"], 0, 0, "border=0", "", true);
} else {
$arrA["USER_FILE_NAME"] = htmlspecialcharsbx($arrA["USER_FILE_NAME"]);
$arrA["USER_FILE_SIZE_TEXT"] = CFile::FormatSize($arrA["USER_FILE_SIZE"]);
}
}
$arResult["arrAnswers"][$res_key][$q_key][$a_key] = $arrA;
}
}
}
} else {
$arResult["arrAnswers"] = array();
示例9: array_merge
$arFilterFields = array_merge($FilterArr, array_values($arrExactMatch));
$lAdmin->InitFilter($arFilterFields);
InitBVarFromArr($arrExactMatch);
AdminListCheckDate($lAdmin, array("find_date1" => $find_date1, "find_date2" => $find_date2));
$arFilter = array("ID" => $find_id, "URL" => $find_url, "SITE_ID" => $find_site_id, "URL_404" => $find_url_404, "SEARCHER" => $find_searcher, "SEARCHER_ID" => $find_searcher_id, "DATE1" => $find_date1, "DATE2" => $find_date2, "IP" => $find_ip, "USER_AGENT" => $find_user_agent);
$arFilter = array_merge($arFilter, array_convert_name_2_value($arrExactMatch));
$rsData = CSearcherHit::GetList($by, $order, $arFilter, $is_filtered);
$rsData = new CAdminResult($rsData, $sTableID);
$rsData->NavStart();
$lAdmin->NavText($rsData->GetNavPrint(GetMessage("STAT_HIT_PAGES")));
$lAdmin->AddHeaders(array(array("id" => "ID", "content" => "ID", "sort" => "s_id", "default" => true), array("id" => "DATE_HIT", "content" => GetMessage("STAT_DATE"), "sort" => "s_date_hit", "default" => true), array("id" => "SEARCHER_ID", "content" => GetMessage("STAT_SEARCHER"), "sort" => "s_searcher_id", "default" => true), array("id" => "USER_AGENT", "content" => GetMessage("STAT_USER_AGENT"), "sort" => "s_user_agent", "default" => true), array("id" => "IP", "content" => GetMessage("STAT_IP"), "sort" => "s_ip", "default" => true), array("id" => "SITE_ID", "content" => GetMessage("STAT_PAGE"), "sort" => "s_url", "default" => true)));
while ($arRes = $rsData->NavNext(true, "f_")) {
$row =& $lAdmin->AddRow($f_ID, $arRes);
$txt = "[<a title=\"" . GetMessage("STAT_SRCH_LIST") . "\" href=\"searcher_list.php?lang=" . LANGUAGE_ID . "&find_id={$f_SEARCHER_ID}&find_id_exact_match=Y&set_filter=Y\">{$f_SEARCHER_ID}</a>] {$f_SEARCHER_NAME}";
$row->AddViewField("SEARCHER_ID", $txt);
$row->AddViewField("USER_AGENT", TxtToHTML($f_USER_AGENT));
$arr = explode(".", $f_IP);
$txt = GetWhoisLink($f_IP) . " [<a title=\"" . GetMessage("STAT_ADD_TO_STOPLIST_TITLE") . "\" href=\"stoplist_edit.php?lang=" . LANGUAGE_ID . "&net1={$arr['0']}&net2={$arr['1']}&net3={$arr['2']}&net4={$arr['3']}\">" . GetMessage("STAT_STOP") . "</a>]";
$row->AddViewField("IP", $txt);
$row->AddViewField("SITE_ID", '[' . $arSites[$f_SITE_ID] . '] ' . StatAdminListFormatURL($arRes["URL"], array("title" => GetMessage("STAT_LINK_OPEN"), "new_window" => false, "max_display_chars" => "default", "chars_per_line" => "default", "kill_sessid" => $STAT_RIGHT < "W")));
}
$lAdmin->AddFooter(array(array("title" => GetMessage("MAIN_ADMIN_LIST_SELECTED"), "value" => $rsData->SelectedRowsCount())));
$lAdmin->AddAdminContextMenu();
$lAdmin->CheckListMode();
$APPLICATION->SetTitle(GetMessage("STAT_RECORDS_LIST", array("#STATISTIC_DAYS#" => COption::GetOptionString("statistic", "SEARCHER_HIT_DAYS"))));
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
?>
<a name="tb"></a>
<form name="form1" method="GET" action="<?php
echo $APPLICATION->GetCurPage();
?>
示例10: SetStatus
public static function SetStatus($DOCUMENT_ID, $STATUS_ID, $OLD_STATUS_ID, $history = true)
{
$err_mess = CAllWorkflow::err_mess() . "<br>Function: SetStatus<br>Line: ";
global $DB, $APPLICATION, $USER, $strError;
//$arMsg = Array();
$DOCUMENT_ID = intval($DOCUMENT_ID);
$STATUS_ID = intval($STATUS_ID);
$OLD_STATUS_ID = intval($OLD_STATUS_ID);
if ($STATUS_ID == 1) {
// get all files associated with the document
$files = CWorkflow::GetFileList($DOCUMENT_ID);
while ($file = $files->Fetch()) {
$path = $file["FILENAME"];
$DOC_ROOT = CSite::GetSiteDocRoot($file["SITE_ID"]);
$pathto = $DOC_ROOT . $path;
$pathfrom = CWorkflow::GetTempDir() . $file["TEMP_FILENAME"];
if ($USER->CanDoFileOperation('fm_edit_in_workflow', array($file["SITE_ID"], $path)) && $USER->CanDoFileOperation('fm_edit_existent_file', array($file["SITE_ID"], $path)) && $USER->CanDoFileOperation('fm_create_new_file', array($file["SITE_ID"], $path))) {
if (!copy($pathfrom, $pathto)) {
$str = GetMessage("FLOW_CAN_NOT_WRITE_FILE", array("#FILENAME#" => $path));
$strError .= $str . "<br>";
}
} else {
$str = GetMessage("FLOW_ACCESS_DENIED_FOR_FILE_WRITE", array("#FILENAME#" => $path));
$strError .= $str . "<br>";
}
}
// still good
if (strlen($strError) <= 0) {
// publish the document
$y = CWorkflow::GetByID($DOCUMENT_ID);
$yr = $y->Fetch();
if ($USER->CanDoFileOperation('fm_edit_in_workflow', array($yr["SITE_ID"], $yr["FILENAME"])) && $USER->CanDoFileOperation('fm_edit_existent_file', array($yr["SITE_ID"], $yr["FILENAME"])) && $USER->CanDoFileOperation('fm_create_new_file', array($yr["SITE_ID"], $yr["FILENAME"]))) {
// save file
$prolog = $yr["PROLOG"];
if (strlen($prolog) > 0) {
$title = $yr["TITLE"];
$prolog = SetPrologTitle($prolog, $title);
}
$content = $yr["BODY_TYPE"] == "text" ? TxtToHTML($yr["BODY"]) : $yr["BODY"];
$content = WFToPath($content);
$epilog = $yr["EPILOG"];
$filesrc = $prolog . $content . $epilog;
global $BX_WORKFLOW_PUBLISHED_PATH, $BX_WORKFLOW_PUBLISHED_SITE;
$BX_WORKFLOW_PUBLISHED_PATH = $yr["FILENAME"];
$BX_WORKFLOW_PUBLISHED_SITE = $yr["SITE_ID"];
$DOC_ROOT = CSite::GetSiteDocRoot($yr["SITE_ID"]);
$APPLICATION->SaveFileContent($DOC_ROOT . $yr["FILENAME"], $filesrc);
$BX_WORKFLOW_PUBLISHED_PATH = "";
$BX_WORKFLOW_PUBLISHED_SITE = "";
} else {
// throw error
$str = GetMessage("FLOW_ACCESS_DENIED_FOLDER", array("#FILENAME#" => $yr["FILENAME"]));
$strError .= GetMessage("FLOW_ERROR") . htmlspecialcharsbx($str) . "<br>";
}
}
}
if (strlen($strError) <= 0) {
// update db
$arFields = array("DATE_MODIFY" => $DB->GetNowFunction(), "MODIFIED_BY" => $USER->GetID(), "STATUS_ID" => intval($STATUS_ID));
$DB->Update("b_workflow_document", $arFields, "WHERE ID='" . $DOCUMENT_ID . "'", $err_mess . __LINE__);
if ($history === true) {
$LOG_ID = CWorkflow::SetHistory($DOCUMENT_ID);
CWorkflow::SetMove($DOCUMENT_ID, $STATUS_ID, $OLD_STATUS_ID, $LOG_ID);
}
} else {
$strError = GetMessage("FLOW_DOCUMENT_NOT_PUBLISHED") . "<br>" . $strError;
}
CWorkflow::CleanUpPublished();
}
示例11: GetHTML
//.........这里部分代码省略.........
if (strlen(trim($arBanner["URL"])) > 0) {
$param = CAdvBanner::PrepareHTML($arBanner["URL"], $arBanner);
$param = CAdvBanner::GetRedirectURL($param, $arBanner);
$url = $param;
$arParams[] = "flash_link=" . urlencode($param);
if (strlen(trim($arBanner["URL_TARGET"])) > 0) {
$arParams[] = "flash_target=" . urlencode($arBanner["URL_TARGET"]);
$a_target = ' target="' . htmlspecialcharsbx($arBanner["URL_TARGET"]) . '" ';
}
}
if (strlen(trim($arBanner["IMAGE_ALT"])) > 0) {
$alt = CAdvBanner::PrepareHTML($arBanner["IMAGE_ALT"], $arBanner);
$arParams[] = "flash_alt=" . urlencode($alt);
$a_title = " title=\"" . htmlspecialcharsbx($alt) . "\" ";
}
if (count($arParams) > 0) {
$param = "?" . implode("&", $arParams);
}
if ($arBanner["FLASH_TRANSPARENT"] == '') {
$arBanner["FLASH_TRANSPARENT"] = 'transparent';
}
if ($arBanner["FLASH_JS"] != 'Y') {
$strReturn = '<div style="width: ' . $arImage["WIDTH"] . 'px; height: ' . $arImage["HEIGHT"] . 'px; padding:0; margin:0">';
if (strlen(trim($arBanner["URL"])) > 0 && $arBanner["NO_URL_IN_FLASH"] == "Y") {
$strReturn .= ($bNoIndex ? '<noindex>' : '') . '<div style="position:absolute; z-index:100;"><a href="' . $url . '"' . $a_target . $a_title . ($bNoIndex ? ' rel="nofollow"' : '') . '><img src="/bitrix/images/1.gif" width="' . $arImage["WIDTH"] . '" height="' . $arImage["HEIGHT"] . '" style="border:0;" alt="' . htmlspecialcharsEx($alt) . '" /></a></div>' . ($bNoIndex ? '</noindex>' : '');
}
$strReturn .= '<OBJECT
classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
id="banner_' . $arBanner["ID"] . '"
WIDTH="' . $arImage["WIDTH"] . '"
HEIGHT="' . $arImage["HEIGHT"] . '">
<PARAM NAME="movie" VALUE="' . $path . $param . '" />
<PARAM NAME="quality" VALUE="high" />
<PARAM NAME="bgcolor" VALUE="#FFFFFF" />
<PARAM NAME="wmode" VALUE="' . $arBanner["FLASH_TRANSPARENT"] . '" />
<EMBED
src="' . $path . $param . '"
quality="high"
bgcolor="#FFFFFF"
wmode="' . $arBanner["FLASH_TRANSPARENT"] . '"
WIDTH="' . $arImage["WIDTH"] . '"
HEIGHT="' . $arImage["HEIGHT"] . '"
NAME="banner"
TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
</EMBED>
</OBJECT></div>';
} else {
$strReturn = "";
static $bScript = null;
if ($bScript === null) {
$bScript = true;
$strReturn .= '<script type="text/javascript" src="' . CUtil::GetAdditionalFileURL('/bitrix/js/advertising/flash.js') . '"></script>';
}
$altImgPath = '';
$arAltImage = CFile::GetFileArray($arBanner["FLASH_IMAGE"]);
if ($arAltImage) {
$altImgPath = $arAltImage["SRC"];
}
$test_id = 'id' . RandString(10);
$strReturn .= '<div id="' . $test_id . '" style="width: ' . $arImage["WIDTH"] . 'px; height: ' . $arImage["HEIGHT"] . 'px; padding:0; margin:0;">';
$altHref = '';
if (trim($arBanner["URL"]) != '') {
if ($arBanner["NO_URL_IN_FLASH"] == "Y") {
$strReturn .= ($bNoIndex ? '<noindex>' : '') . '<div style="position:absolute; z-index:100;"><a href="' . $url . '"' . $a_target . $a_title . ($bNoIndex ? ' rel="nofollow"' : '') . '><img src="/bitrix/images/1.gif" width="' . $arImage["WIDTH"] . '" height="' . $arImage["HEIGHT"] . '" style="border:0;" alt="' . htmlspecialcharsEx($alt) . '" /></a></div>' . ($bNoIndex ? '</noindex>' : '');
} else {
$altHref = $url;
}
}
$strReturn .= '</div>';
$strReturn .= '<script type="text/javascript">bx_adv_includeFlash("' . $test_id . '", "' . CUtil::JSEscape($path . $param) . '", "' . $arImage["WIDTH"] . '", "' . $arImage["HEIGHT"] . '", "' . $arBanner["FLASH_TRANSPARENT"] . '", "' . CUtil::JSEscape($altImgPath) . '", ' . (intval($arBanner["FLASH_VER"]) <= 0 ? 'null' : intval($arBanner["FLASH_VER"])) . ', "' . CUtil::JSEscape($altHref) . '", "' . CUtil::JSEscape(htmlspecialcharsbx($arBanner["URL_TARGET"])) . '", "' . CUtil::JSEscape(htmlspecialcharsbx($alt)) . '");</script>';
}
break;
default:
$alt = CAdvBanner::PrepareHTML(trim($arBanner["IMAGE_ALT"]), $arBanner);
$strImage = "<img alt=\"" . htmlspecialcharsEx($alt) . "\" title=\"" . htmlspecialcharsEx($alt) . "\" src=\"" . $path . "\" width=\"" . $arImage["WIDTH"] . "\" height=\"" . $arImage["HEIGHT"] . "\" style=\"border:0;\" />";
if (strlen(trim($arBanner["URL"])) > 0) {
$url = $arBanner["URL"];
$url = CAdvBanner::PrepareHTML($url, $arBanner);
$url = CAdvBanner::GetRedirectURL($url, $arBanner);
$target = strlen(trim($arBanner["URL_TARGET"])) > 0 ? " target=\"" . $arBanner["URL_TARGET"] . "\" " : "";
$strReturn = ($bNoIndex ? '<noindex>' : '') . "<a href=\"" . $url . "\"" . $target . ($bNoIndex ? ' rel="nofollow"' : '') . ">" . $strImage . "</a>" . ($bNoIndex ? '</noindex>' : '');
} else {
$strReturn .= $strImage;
}
break;
}
}
}
if ($arBanner["CODE"] != '') {
$code = $arBanner["CODE"];
if ($arBanner["CODE_TYPE"] == "text") {
$code = TxtToHTML($code);
}
$code = CAdvBanner::PrepareHTML($code, $arBanner);
$strReturn .= CAdvBanner::ReplaceURL($code, $arBanner);
}
return $strReturn;
}
示例12: TxtToHTML
?>
<?php
if ($isEditMode) {
?>
<tr>
<td colspan="2" align="center"><textarea style="width:85%" name="ADMIN_COMMENTS" rows="7" wrap="VIRTUAL"><?php
echo $str_ADMIN_COMMENTS;
?>
</textarea></td>
</tr>
<?php
} else {
?>
<tr>
<td colspan="2"><?php
echo TxtToHTML($str_ADMIN_COMMENTS);
?>
</td>
</tr>
<?php
}
?>
<?php
}
?>
<?php
$disable = true;
if ($isEditMode || $isEditRightsMode) {
$disable = false;
}
示例13: GetMessage
</td>
</tr>
<tr>
<td valign="top"><?php
echo GetMessage("AD_DESCRIPTION");
?>
</td>
<td><?php
if ($isEditMode) {
?>
<textarea cols="45" name="DESCRIPTION" rows="8" maxlength="2000"><?php
echo $str_DESCRIPTION;
?>
</textarea><?php
} else {
echo TxtToHTML($str_DESCRIPTION);
}
?>
</td>
</tr>
<?php
$disable = true;
if (($isAdmin || $isDemo) && $isEditMode) {
$disable = false;
}
$tabControl->Buttons(array("disabled" => $disable, "back_url" => "adv_type_list.php?lang=" . LANGUAGE_ID));
$tabControl->End();
?>
</form>
<?php
示例14: TxtToHTML
$quote_table_class = "quotetable";
$code_table_class = "codetable";
if ($arM["IS_HIDDEN"] == "Y") {
$quote_head_class = "tdhiddenquotehead";
$quote_body_class = "tdhiddenquote";
$code_head_class = "tdhiddencodehead";
$code_body_class = "tdhiddencodebody";
$code_textarea_class = "codehiddentextarea";
} else {
$quote_head_class = "tdquotehead";
$quote_body_class = "tdquote";
$code_head_class = "tdcodehead";
$code_body_class = "tdcodebody";
$code_textarea_class = "codetextarea";
}
echo TxtToHTML($arM["MESSAGE"], true, 70, "Y", "N", "Y", "Y", $quote_table_class, $quote_head_class, $quote_body_class, $code_table_class, $code_head_class, $code_body_class, $code_textarea_class);
}
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<?php
}
?>
<tr>
示例15: ShowAnswer
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;
}