Пример #1
0
    if ($bNeedCreatePicture) {
        $arParams["RETURN_DATA"] = <<<HTML
<a href="{$img["~src"]}" target="_blank">{$arParams["RETURN_DATA"]}</a>
HTML;
    }
} elseif ($arParams['MODE'] == 'SHOW2IMAGES') {
    $arParams["RETURN_DATA"] = <<<HTML
<img src="{$img["src"]}" {$props}
\tdata-bx-viewer="image"
\tdata-bx-src="{$img["~src"]}"
\tdata-bx-download="{$img["src_download"]}"
\tdata-bx-width="{$img["~width"]}"
\tdata-bx-height="{$img["~height"]}"
\tdata-bx-title="{$arParams["IMG_NAME"]}"
\tdata-bx-size="{$arParams["IMG_SIZE"]}" />
HTML;
} else {
    CUtil::InitJSCore();
    do {
        $id = "popup_" . rand();
    } while (ForumGetEntity($id) !== false);
    $arParams["RETURN_DATA"] = <<<HTML
<img src="{$img["~src"]}" id="{$id}" border="0" {$props} data-bx-viewer="image" data-bx-src="{$img["~src"]}" />
HTML;
}
$arParams["RETURN_DATA"] = str_replace(array("\n", "\t", "  "), " ", $arParams["RETURN_DATA"]);
if ($arParams["RETURN"] == "Y") {
    $this->__component->arParams["RETURN_DATA"] = $arParams["RETURN_DATA"];
} else {
    echo $arParams["RETURN_DATA"];
}
Пример #2
0
			</td>
		</tr>
	</tbody>
<?php 
if ($iNumber < $iCount || $iCount == 0) {
    ?>
</table><!--MSG_END_<?php 
    echo $res["ID"];
    ?>
-->
<?php 
}
?>
<script type="text/javascript">
<?php 
if ($arRes["USER"]["PERMISSION"] >= "Q" && ForumGetEntity($templateFolder) === false) {
    ?>
;(function(window){
if (window.SelectPost) return;
BX.message({cdm: '<?php 
    echo GetMessageJS("F_DELETE_MESSAGES_CONFIRM");
    ?>
', cdt: '<?php 
    echo GetMessageJS("F_DELETE_TOPIC_CONFIRM");
    ?>
'});
window.SelectPost = function(table)
{
	if (table == null) { return; }
	if(table.className.match(/forum-post-selected/)) {table.className = table.className.replace(/\s*forum-post-selected/gi, '');}
	else {table.className += ' forum-post-selected';}
Пример #3
0
<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
if (CModule::IncludeModule("forum")) {
    $arResult["data"] = $arParams["~DATA"];
    $arResult["head"] = $arParams["~HEAD"];
    do {
        $arResult["id"] = "id_" . rand();
    } while (ForumGetEntity($arResult["id"]) !== false);
    $arParams["RETURN_DATA"] = "";
    $result = $this->IncludeComponentTemplate();
    if (!empty($arParams["RETURN_DATA"])) {
        return $arParams["RETURN_DATA"];
    }
}