コード例 #1
0
ファイル: files_input.php プロジェクト: mrdeadmouse/u136006
 function OnPrepareComments()
 {
     $arResult =& $this->component->arResult;
     $arParams =& $this->component->arParams;
     $arMessages =& $arResult['MESSAGES'];
     $arResult['FILES'] = array();
     if (!empty($arMessages)) {
         $res = array_keys($arMessages);
         $arFilter = array("FORUM_ID" => $arParams["FORUM_ID"], "TOPIC_ID" => $arResult["FORUM_TOPIC_ID"], "APPROVED_AND_MINE" => $GLOBALS["USER"]->GetId(), ">MESSAGE_ID" => intVal(min($res)) - 1, "<MESSAGE_ID" => intVal(max($res)) + 1);
         if ($arResult["USER"]["RIGHTS"]["MODERATE"] == "Y") {
             unset($arFilter["APPROVED_AND_MINE"]);
         }
         $db_files = CForumFiles::GetList(array("MESSAGE_ID" => "ASC"), $arFilter);
         if ($db_files && ($res = $db_files->Fetch())) {
             do {
                 $res["SRC"] = CFile::GetFileSRC($res);
                 if ($arMessages[$res["MESSAGE_ID"]]["~ATTACH_IMG"] == $res["FILE_ID"]) {
                     // attach for custom
                     $arMessages[$res["MESSAGE_ID"]]["~ATTACH_FILE"] = $res;
                     $arMessages[$res["MESSAGE_ID"]]["ATTACH_IMG"] = CFile::ShowFile($res["FILE_ID"], 0, $this->imageSize, $this->imageSize, true, "border=0", false);
                     $arMessages[$res["MESSAGE_ID"]]["ATTACH_FILE"] = $arMessages[$res["MESSAGE_ID"]]["ATTACH_IMG"];
                 }
                 $arMessages[$res["MESSAGE_ID"]]["FILES"][$res["FILE_ID"]] = $res;
                 $arResult['FILES'][$res["FILE_ID"]] = $res;
             } while ($res = $db_files->Fetch());
         }
     }
 }
コード例 #2
0
 function addTableFileCell($intPropID, $arPropInfo)
 {
     static $maxImageSize = null;
     if (null === $maxImageSize) {
         $maxImageSize = array("W" => COption::GetOptionString("iblock", "list_image_size"), "H" => COption::GetOptionString("iblock", "list_image_size"));
     }
     if (!array_key_exists('UF_FILE', $arPropInfo)) {
         return '';
     }
     $arPropInfo["UF_FILE"] = intval($arPropInfo["UF_FILE"]);
     if (!CModule::IncludeModule('fileman')) {
         return '';
     }
     $strShowFile = '';
     if (0 < $arPropInfo["UF_FILE"]) {
         $strShowFile = CFile::ShowFile($arPropInfo["UF_FILE"], 0, $maxImageSize['W'], $maxImageSize['H'], false);
         if ('' !== $strShowFile) {
             $strShowFile .= '<br>';
         }
     }
     return $strShowFile . CFile::InputFile("PROPERTY_DIRECTORY_VALUES[{$intPropID}][FILE]", 20, $arPropInfo["UF_FILE"], false, 0, "IMAGE", "", 0, "class=typeinput", "", true, false);
 }
コード例 #3
0
ファイル: class.php プロジェクト: akniyev/itprom_dobrohost
 /**
  * Function gets order properties from database
  * @param mixed[] $cached Cached data taken from obtainDataCachedStructure()
  * @return void
  */
 protected function obtainProps(&$cached)
 {
     if (empty($this->dbResult["ID"])) {
         return;
     }
     $props = array();
     $dbOrderProps = CSaleOrderPropsValue::GetOrderProps($this->dbResult["ID"]);
     $iGroup = -1;
     while ($arOrderProps = $dbOrderProps->GetNext()) {
         if (empty($this->arParams["PROP_" . $this->dbResult["PERSON_TYPE_ID"]]) || !in_array($arOrderProps["ORDER_PROPS_ID"], $this->arParams["PROP_" . $this->dbResult["PERSON_TYPE_ID"]])) {
             if ($arOrderProps["ACTIVE"] == "Y" && $arOrderProps["UTIL"] == "N") {
                 $arOrderPropsTmp = $arOrderProps;
                 if ($iGroup != intval($arOrderProps["PROPS_GROUP_ID"])) {
                     $arOrderPropsTmp["SHOW_GROUP_NAME"] = "Y";
                     $iGroup = intval($arOrderProps["PROPS_GROUP_ID"]);
                 }
                 if ($arOrderProps["TYPE"] == "SELECT" || $arOrderProps["TYPE"] == "RADIO") {
                     $arVal = CSaleOrderPropsVariant::GetByValue($arOrderProps["ORDER_PROPS_ID"], $arOrderProps["VALUE"]);
                     $arOrderPropsTmp["VALUE"] = htmlspecialcharsEx($arVal["NAME"]);
                 } elseif ($arOrderProps["TYPE"] == "MULTISELECT") {
                     $arOrderPropsTmp["VALUE"] = "";
                     $curVal = explode(",", $arOrderProps["VALUE"]);
                     for ($i = 0, $intCount = count($curVal); $i < $intCount; $i++) {
                         $arVal = CSaleOrderPropsVariant::GetByValue($arOrderProps["ORDER_PROPS_ID"], $curVal[$i]);
                         if ($i > 0) {
                             $arOrderPropsTmp["VALUE"] .= ", ";
                         }
                         $arOrderPropsTmp["VALUE"] .= htmlspecialcharsEx($arVal["NAME"]);
                     }
                 } elseif ($arOrderProps["TYPE"] == "LOCATION") {
                     $locationName = "";
                     if (CSaleLocation::isLocationProMigrated()) {
                         $locationName = Location\Admin\LocationHelper::getLocationStringById($arOrderProps["VALUE"]);
                     } else {
                         $arVal = CSaleLocation::GetByID($arOrderProps["VALUE"], LANGUAGE_ID);
                         $locationName .= !strlen($arVal["COUNTRY_NAME"]) ? "" : $arVal["COUNTRY_NAME"];
                         if (strlen($arVal["COUNTRY_NAME"]) && strlen($arVal["REGION_NAME"])) {
                             $locationName .= " - " . $arVal["REGION_NAME"];
                         } elseif (strlen($arVal["REGION_NAME"])) {
                             $locationName .= $arVal["REGION_NAME"];
                         }
                         if (strlen($arVal["COUNTRY_NAME"]) || strlen($arVal["REGION_NAME"])) {
                             $locationName .= " - " . $arVal["CITY_NAME"];
                         } elseif (strlen($arVal["CITY_NAME"])) {
                             $locationName .= $arVal["CITY_NAME"];
                         }
                     }
                     $arOrderPropsTmp["VALUE"] = $locationName;
                 } elseif ($arOrderProps["TYPE"] == "FILE") {
                     if (strpos($arOrderProps["VALUE"], ",") !== false) {
                         $fileValue = "";
                         $values = explode(",", $arOrderProps["VALUE"]);
                         if (self::isNonemptyArray($values)) {
                             foreach ($values as $fileId) {
                                 $fileValue .= CFile::ShowFile(trim($fileId), 0, 90, 90, true) . "<br/>";
                             }
                         }
                         $arOrderPropsTmp["VALUE"] = $fileValue;
                     } else {
                         $arOrderPropsTmp["VALUE"] = CFile::ShowFile($arOrderProps["VALUE"], 0, 90, 90, true);
                     }
                 }
                 $props[] = $arOrderPropsTmp;
             }
         }
     }
     $cached["ORDER_PROPS"] = $props;
 }
コード例 #4
0
 $bNeedLoop = $bBreakLoop = false;
 if ($db_files && ($res = $db_files->Fetch())) {
     $bNeedLoop = true;
 } elseif ($bNeedFirstMessage) {
     $db_files = CForumFiles::GetList(array("MESSAGE_ID" => "ASC"), array("MESSAGE_ID" => $arResult["MESSAGE_FIRST"]["ID"]));
     if ($db_files && ($res = $db_files->Fetch())) {
         $bNeedLoop = $bBreakLoop = true;
     }
 }
 while ($bNeedLoop) {
     do {
         $res["SRC"] = CFile::GetFileSRC($res["FILE_NAME"]);
         if ($arResult["MESSAGE_LIST"][$res["MESSAGE_ID"]]["~ATTACH_IMG"] == $res["FILE_ID"]) {
             // attach for custom
             $arResult["MESSAGE_LIST"][$res["MESSAGE_ID"]]["~ATTACH_FILE"] = $res;
             $arResult["MESSAGE_LIST"][$res["MESSAGE_ID"]]["ATTACH_FILE"] = $arResult["MESSAGE_LIST"][$res["MESSAGE_ID"]]["ATTACH_IMG"] = CFile::ShowFile($res["FILE_ID"], 0, $arParams["IMAGE_SIZE"], $arParams["IMAGE_SIZE"], true, "border=0", false);
         }
         if ($arResult["MESSAGE_FIRST"]["ID"] == $res["MESSAGE_ID"]) {
             $arResult["MESSAGE_FIRST"]["FILES"][$res["FILE_ID"]] = $res;
             if (!$bNeedFirstMessage) {
                 $arResult["MESSAGE_LIST"][$res["MESSAGE_ID"]]["FILES"][$res["FILE_ID"]] = $res;
             }
         } else {
             $arResult["MESSAGE_LIST"][$res["MESSAGE_ID"]]["FILES"][$res["FILE_ID"]] = $res;
         }
         $arResult["FILES"][$res["FILE_ID"]] = $res;
     } while ($res = $db_files->Fetch());
     $bNeedLoop = false;
     if ($bNeedFirstMessage && !$bBreakLoop) {
         $db_files = CForumFiles::GetList(array("MESSAGE_ID" => "ASC"), array("MESSAGE_ID" => $arResult["MESSAGE_FIRST"]["ID"]));
         if ($db_files && ($res = $db_files->Fetch())) {
コード例 #5
0
ファイル: component.php プロジェクト: akniyev/arteva.ru
				$arFilter["APPROVED"] = "Y";
			$arFilterProps = $arFilter;
			if (min($res) > 1)
				$arFilterProps[">ID"] = $arFilter[">MESSAGE_ID"] = intval(min($res) - 1);
			$arFilterProps["<ID"] = $arFilter["<MESSAGE_ID"] = intval(max($res) + 1);
			$db_files = CForumFiles::GetList(array("MESSAGE_ID" => "ASC"), $arFilter);
			if ($db_files && $res = $db_files->Fetch())
			{
				do
				{
					$res["SRC"] = CFile::GetFileSRC($res);
					if ($arMessages[$res["MESSAGE_ID"]]["~ATTACH_IMG"] == $res["FILE_ID"])
					{
					// attach for custom
						$arMessages[$res["MESSAGE_ID"]]["~ATTACH_FILE"] = $res;
						$arMessages[$res["MESSAGE_ID"]]["ATTACH_IMG"] = CFile::ShowFile($res["FILE_ID"], 0,
							$arParams["IMAGE_SIZE"], $arParams["IMAGE_SIZE"], true, "border=0", false);
						$arMessages[$res["MESSAGE_ID"]]["ATTACH_FILE"] = $arMessages[$res["MESSAGE_ID"]]["ATTACH_IMG"];
					}
					$arMessages[$res["MESSAGE_ID"]]["FILES"][$res["FILE_ID"]] = $res;
					$arResult["FILES"][$res["FILE_ID"]] = $res;
				}while ($res = $db_files->Fetch());
			}
			if (!empty($arParams["USER_FIELDS"]))
			{
				$db_props = CForumMessage::GetList(array("ID" => "ASC"), $arFilterProps, false, 0, array("SELECT" => $arParams["USER_FIELDS"]));
				while ($db_props && ($res = $db_props->Fetch()))
				{
					$arMessages[$res["ID"]]["PROPS"] = array_intersect_key($res, array_flip($arParams["USER_FIELDS"]));
				}
			}
			/************** Message info ***************************************/
コード例 #6
0
 function GetAdminListEditHTMLMulty($arUserField, $arHtmlControl)
 {
     //TODO edit mode
     $result = "&nbsp;";
     foreach ($arHtmlControl["VALUE"] as $value) {
         $result .= CFile::ShowFile($value, $arUserField["SETTINGS"]["MAX_SHOW_SIZE"], $arUserField["SETTINGS"]["LIST_WIDTH"], $arUserField["SETTINGS"]["LIST_HEIGHT"], true) . "<br>";
     }
     return $result;
 }
コード例 #7
0
 	);*/
 list($dbRecordsList, $dbRecordsList1) = CBPVirtualDocument::GetList(array(), array("ID" => $arParams["BP_ID"], "IBLOCK_ID" => $arParams["BLOCK_ID"], "CHECK_BP_VIRTUAL_PERMISSIONS" => "read"), false, false, $arSelectFields);
 if ($arRecord = $dbRecordsList->GetNext()) {
     $arKeys = array_keys($arRecord);
     foreach ($arKeys as $key) {
         if ($arDocumentFields[$key]["BaseType"] == "file") {
             $ar = $arRecord[$key];
             if (!is_array($ar)) {
                 $ar = array($ar);
             }
             $arRecord[$key] = "";
             foreach ($ar as $v) {
                 if (strlen($arRecord[$key]) > 0) {
                     $arRecord[$key] .= " ";
                 }
                 $arRecord[$key] .= CFile::ShowFile($v, 100000, 300, 300, true);
             }
         }
         if (is_array($arRecord[$key])) {
             $ar = $arRecord[$key];
             $arRecord[$key] = "";
             foreach ($ar as $val) {
                 if (strlen($arRecord[$key]) > 0) {
                     $arRecord[$key] .= ", ";
                 }
                 $arRecord[$key] .= $val;
             }
         }
         if (CheckDateTime($arRecord[$key])) {
             $arRecord[$key] = FormatDateFromDB($arRecord[$key]);
         }
コード例 #8
0
             $str .= "<b>" . (strlen($arStr1[$k]) > 0 ? $arStr1[$k] : GetMessage("IBEL_A_BP_PROC")) . "</b>:<br />" . $v . "<br />";
         }
         $row->AddViewField("BIZPROC", $str);
     }
 }
 $boolIBlockElementAdd = CIBlockSectionRights::UserHasRightTo($intSubIBlockID, $find_section_section, "section_element_bind");
 $availQuantityTrace = COption::GetOptionString("catalog", "default_quantity_trace", 'N');
 $arQuantityTrace = array("D" => GetMessage("IBEL_DEFAULT_VALUE") . " (" . ($availQuantityTrace == 'Y' ? GetMessage("IBEL_YES_VALUE") : GetMessage("IBEL_NO_VALUE")) . ")", "Y" => GetMessage("IBEL_YES_VALUE"), "N" => GetMessage("IBEL_NO_VALUE"));
 $arElementOps = CIBlockElementRights::UserHasRightTo($intSubIBlockID, array_keys($arRows), "", CIBlockRights::RETURN_OPERATIONS);
 foreach ($arRows as $f_ID => $row) {
     $edit_url = '/bitrix/admin/iblock_subelement_edit.php?WF=Y&type=' . urlencode($strSubIBlockType) . '&IBLOCK_ID=' . $intSubIBlockID . '&lang=' . LANGUAGE_ID . '&PRODUCT_ID=' . $ID . '&ID=' . $row->arRes['orig']['ID'] . '&TMP_ID=' . $strSubTMP_ID . $sThisSectionUrl;
     if (array_key_exists("PREVIEW_PICTURE", $arSelectedFieldsMap)) {
         $row->AddViewField("PREVIEW_PICTURE", CFile::ShowFile($row->arRes['PREVIEW_PICTURE'], 100000, 50, 50, true));
     }
     if (array_key_exists("DETAIL_PICTURE", $arSelectedFieldsMap)) {
         $row->AddViewField("DETAIL_PICTURE", CFile::ShowFile($row->arRes['DETAIL_PICTURE'], 100000, 50, 50, true));
     }
     if (array_key_exists("PREVIEW_TEXT", $arSelectedFieldsMap)) {
         $row->AddViewField("PREVIEW_TEXT", $row->arRes["PREVIEW_TEXT_TYPE"] == "text" ? htmlspecialcharsex($row->arRes["PREVIEW_TEXT"]) : HTMLToTxt($row->arRes["PREVIEW_TEXT"]));
     }
     if (array_key_exists("DETAIL_TEXT", $arSelectedFieldsMap)) {
         $row->AddViewField("DETAIL_TEXT", $row->arRes["DETAIL_TEXT_TYPE"] == "text" ? htmlspecialcharsex($row->arRes["DETAIL_TEXT"]) : HTMLToTxt($row->arRes["DETAIL_TEXT"]));
     }
     if (isset($arElementOps[$f_ID]) && isset($arElementOps[$f_ID]["element_edit"])) {
         if (isset($arElementOps[$f_ID]) && isset($arElementOps[$f_ID]["element_edit_price"])) {
             if (isset($row->arRes['price']) && is_array($row->arRes['price'])) {
                 foreach ($row->arRes['price'] as $price_id => $sHTML) {
                     $row->AddEditField($price_id, $sHTML);
                 }
             }
         }
コード例 #9
0
ファイル: component.php プロジェクト: Satariall/izurit
        $arResult["MESSAGE"]["FILES"] = array();
        $db_res = CForumFiles::GetList(array(), array("MESSAGE_ID" => $arResult["MESSAGE"]["ID"]));
        if ($db_res && ($res = $db_res->GetNext())) {
            do {
                $res["SRC"] = CFile::GetFileSRC($res);
                $arResult["MESSAGE"]["FILES"][$res["FILE_ID"]] = $res;
            } while ($res = $db_res->GetNext());
        }
        $res = $arResult["MESSAGE"];
        $res["POST_MESSAGE_TEXT"] = COption::GetOptionString("forum", "FILTER", "Y") == "Y" ? $res["~POST_MESSAGE_FILTER"] : $res["~POST_MESSAGE"];
        $res["POST_MESSAGE_TEXT"] = $parser->convert($res["POST_MESSAGE_TEXT"], $arAllow, "html", $res["FILES"]);
        $res["FILES_PARSED"] = $parser->arFilesIDParsed;
        //				************************message attach img****************************************
        $res["ATTACH_IMG"] = "";
        if (intVal($res["~ATTACH_IMG"]) > 0 && in_array($arResult["FORUM"]["ALLOW_UPLOAD"], array("Y", "A", "F"))) {
            $res["ATTACH_IMG"] = CFile::ShowFile($res["~ATTACH_IMG"], 0, 300, 300, true, "border=0", false);
        }
        if (!empty($res["EDITOR_ID"])) {
            $res["EDITOR_LINK"] = CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_PROFILE_VIEW"], array("UID" => $res["EDITOR_ID"]));
        }
        if (strLen(trim($res["EDIT_DATE"])) > 0) {
            $res["EDIT_DATE"] = CForumFormat::DateFormat($arParams["DATE_TIME_FORMAT"], MakeTimeStamp($res["EDIT_DATE"], CSite::GetDateFormat()));
        }
        $arResult["MESSAGE"] = $res;
    }
}
/************** Navigation *****************************************/
if (intVal($arResult["FORUM"]["FORUM_GROUP_ID"]) > 0) {
    $PARENT_ID = intVal($arResult["FORUM"]["FORUM_GROUP_ID"]);
    while ($PARENT_ID > 0) {
        $res = $arResult["GROUPS"][$PARENT_ID];
コード例 #10
0
ファイル: component.php プロジェクト: spas-viktor/books
         $topics[$res["TOPIC_ID"]]["MESSAGES"][$res["ID"]] = $res;
         $arResult["MESSAGE_LIST"][$res["ID"]] = $res;
     } while ($res = $db_res->GetNext());
 }
 /************** Attach files ***************************************/
 if (!empty($arResult["MESSAGE_LIST"])) {
     $arFilter = array("@FILE_MESSAGE_ID" => array_keys($arResult["MESSAGE_LIST"]));
     $db_files = CForumFiles::GetList(array("MESSAGE_ID" => "ASC"), $arFilter);
     if ($db_files && ($res = $db_files->Fetch())) {
         do {
             $res["SRC"] = CFile::GetFileSRC($res);
             if ($arResult["MESSAGE_LIST"][$res["MESSAGE_ID"]]["~ATTACH_IMG"] == $res["FILE_ID"]) {
                 $res["TOPIC_ID"] = $arResult["MESSAGE_LIST"][$res["MESSAGE_ID"]]["TOPIC_ID"];
                 $res["FORUM_ID"] = $arResult["MESSAGE_LIST"][$res["MESSAGE_ID"]]["FORUM_ID"];
                 // attach for custom
                 $topics[$res["TOPIC_ID"]]["MESSAGES"][$res["MESSAGE_ID"]]["ATTACH_IMG"] = CFile::ShowFile($res["FILE_ID"], 0, $arParams["IMAGE_SIZE"], $arParams["IMAGE_SIZE"], true, "border=0", false);
                 $topics[$res["TOPIC_ID"]]["MESSAGES"][$res["MESSAGE_ID"]]["~ATTACH_FILE"] = $res;
             }
             $topics[$res["TOPIC_ID"]]["MESSAGES"][$res["MESSAGE_ID"]]["FILES"][$res["FILE_ID"]] = $res;
             $arResult["FILES"][$res["FILE_ID"]] = $res;
         } while ($res = $db_files->Fetch());
     }
     if (!empty($arParams["USER_FIELDS"])) {
         $db_props = CForumMessage::GetList(array("ID" => "ASC"), array("@ID" => array_keys($arResult["MESSAGE_LIST"])), false, 0, array("SELECT" => $arParams["USER_FIELDS"]));
         while ($db_props && ($res = $db_props->Fetch())) {
             $props = array_intersect_key($res, array_flip($arParams["USER_FIELDS"]));
             $arResult["MESSAGE_LIST"][$res["ID"]]["PROPS"] = $topics[$res["TOPIC_ID"]]["MESSAGES"][$res["ID"]]["PROPS"] = $props;
             $arResult["MESSAGE_LIST"][$res["ID"]]["ALLOW"] = array_merge($arResult["MESSAGE_LIST"][$res["ID"]]["ALLOW"], array("USERFIELDS" => $props));
         }
     }
     /************** Message info ***************************************/
コード例 #11
0
        function PrintMessages($mass, $arUser)
        {
            global $USER;
            $parser = new textParser(LANGUAGE_ID);
            ?>
<table width="100%" border="0" cellspacing="0" cellpadding="5"><?php 
            if (count($mass) <= 0) {
                ?>
<tr><td class="forumtitle" colspan="2">
				<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr valign="top">
					<td width="99%" class="forumtitletext"><b><?php 
                echo GetMessage("LU_NONE_MESSAGE");
                ?>
</b></td>
				</tr></table></td></tr><?php 
            } else {
                foreach ($mass as $arForum) {
                    $strPerms = ForumCurrUserPermissions($arForum["ID"]);
                    if ($strPerms < "E" || $arForum["ACTIVE"] != "Y") {
                        continue;
                    }
                    ?>
<tr><td colspan="2"><font style="font-size:4px;">&nbsp;<br></font></td></tr><?php 
                    ?>
<tr><td class="forumtitle" colspan="2">
						<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr valign="top">
							<td width="99%" class="forumtitletext"><?php 
                    echo GetMessage("FL_FORUM");
                    ?>
 <a href="list.php?FID=<?php 
                    echo $arForum["ID"];
                    ?>
"><b><?php 
                    echo $arForum["NAME"];
                    ?>
</b></a></td>
							<td nowrap width="1%" align="right" class="forumtitletext"><?php 
                    echo GetMessage("LU_USER_POSTS_ON_FORUM");
                    ?>
: <?php 
                    echo $arForum["NUM_POSTS_ALL"];
                    ?>
</td>
						</tr></table></td></tr><?php 
                    ?>
<tr><td colspan="2"><font style="font-size:4px;">&nbsp;<br></font></td></tr><?php 
                    foreach ($arForum["TOPIC"] as $arTopic) {
                        if ($strPerms < "Q" && $arTopic["APPROVED"] != "Y") {
                            continue;
                        }
                        ?>
<tr><td class="forumtitle" colspan="2">
							<table width="100%" border="0" cellspacing="0" cellpadding="0" background="red">
								<tr valign="top">
									<?php 
                        if (strlen($arTopic["IMAGE"]) > 0) {
                            ?>
										<td width="0%"><img src="/bitrix/images/forum/icon/<?php 
                            echo $arTopic["IMAGE"];
                            ?>
" alt="<?php 
                            echo $arTopic["IMAGE_DESCR"];
                            ?>
" border="0" width="15" height="15" vspace="0"><br></td>
										<td class="forumtitletext" width="0%">&nbsp;</td>
									<?php 
                        }
                        ?>
		
									<td class="forumtitletext" width="99%"><font class="forumtitletext">
										<?php 
                        echo GetMessage("FR_TOPIC");
                        ?>
 &laquo;<a href="read.php?FID=<?php 
                        echo $arForum["ID"];
                        ?>
&TID=<?php 
                        echo $arTopic["ID"];
                        ?>
&UID=<?php 
                        echo $arUser["USER_ID"];
                        ?>
"><b><?php 
                        echo htmlspecialcharsEx($arTopic["TITLE"]);
                        ?>
</b><?php 
                        if (strlen($arTopic["DESCRIPTION"]) > 0) {
                            echo ", " . htmlspecialcharsEx($arTopic["DESCRIPTION"]);
                        }
                        ?>
</a >&raquo;  
										<?php 
                        echo GetMessage("FR_ON_FORUM");
                        ?>
 <a href="list.php?FID=<?php 
                        echo $arForum["ID"];
                        ?>
"><b><?php 
                        echo $arForum["NAME"];
                        ?>
</b></a></font></td>
									<td nowrap width="1%" align="right" valign="middle" class="forumtitletext"><?php 
                        echo GetMessage("FR_ON_VIEWS");
                        ?>
 <?php 
                        echo $arTopic["VIEWS"];
                        ?>
<br>
									<?php 
                        echo GetMessage("LU_USER_POSTS_ON_TOPIC");
                        ?>
: <?php 
                        echo $arTopic["COUNT_MESSAGE"];
                        ?>
</td>
								</tr>
							</table>
						</td></tr><?php 
                        ?>
<tr><td colspan="2"><font style="font-size:4px;">&nbsp;<br></font></td></tr><?php 
                        foreach ($arTopic["MESSAGE"] as $arMessage) {
                            if ($strPerms < "Q" && $arMessage["APPROVED"] != "Y") {
                                continue;
                            }
                            ?>
<tr valign="top" class="forumbody">
						<td align="left" rowspan="2" width="140" class="forumbrd" style="border-right:none;">
							<a name="message<?php 
                            echo $arMessage["ID"];
                            ?>
"></a>
							<font class="forumbodytext"><b><?php 
                            echo htmlspecialcharsEx($arMessage["AUTHOR_NAME"]);
                            ?>
</b>
							<br><font class=\"forumheadcolor\"><?php 
                            echo htmlSpecialCharsEx($arForum["USER_PERM_STR"]);
                            ?>
</font>
							<br>
							<?php 
                            if (strlen($arUser["AVATAR"]) > 0) {
                                ?>
								<a href="view_profile.php?UID=<?php 
                                echo $arUser["USER_ID"];
                                ?>
&FID=<?php 
                                echo $arForum["ID"];
                                ?>
&TID=<?php 
                                echo $arTopic["ID"];
                                ?>
&MID=<?php 
                                echo $arMessage["ID"];
                                ?>
" title="<?php 
                                echo GetMessage("FR_AUTHOR_PROFILE");
                                ?>
"><?php 
                                echo CFile::ShowImage($arUser["AVATAR"], 90, 90, "border=0 vspace=5", "", true);
                                ?>
</a><br>
							<?php 
                            }
                            ?>
							<?php 
                            if (strlen($arUser["DESCRIPTION"]) > 0) {
                                ?>
								<i><?php 
                                echo htmlspecialcharsEx($arUser["DESCRIPTION"]);
                                ?>
</i><br>
							<?php 
                            }
                            ?>
							<font style="font-size:8px;">&nbsp;<br></font>
							<?php 
                            if (IntVal($arUser["NUM_POSTS"]) > 0) {
                                ?>
								<font class="forumheadcolor"><?php 
                                echo GetMessage("FR_NUM_MESS");
                                ?>
</font> <?php 
                                echo $arUser["NUM_POSTS"];
                                ?>
<br>
							<?php 
                            }
                            ?>
							<?php 
                            if (strlen($arUser["DATE_REG"]) > 0) {
                                ?>
								<font class="forumheadcolor"><?php 
                                echo GetMessage("FR_DATE_REGISTER");
                                ?>
</font> <?php 
                                echo $arUser["DATE_REG"];
                                ?>
<br>
							<?php 
                            }
                            ?>
							</font>
						</td>
						<td class="forumbrd forumbrd1" style="border-bottom:none;">
							<table border="0" cellspacing="0" cellpadding="0" width="100%">
								<tr><td width="100%"><font class="forumbodytext"><font class="forumheadcolor"><?php 
                            echo GetMessage("FR_DATE_CREATE");
                            ?>
</font><nobr><?php 
                            echo $arMessage["POST_DATE"];
                            ?>
</nobr><br></font></td></tr></table>
							<font style="font-size:5px;">&nbsp;<br></font>
							<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td class="forumhr"><img src="/bitrix/images/1.gif" width="1" height="1" alt=""></td></tr></table>
							<font style="font-size:8px;">&nbsp;<br></font>
							<font class="forumbodytext">
							<?php 
                            $arForum["ALLOW"]["SMILES"] = $arForum["ALLOW_SMILES"];
                            if ($arMessage["USE_SMILES"] != "Y") {
                                $arForum["ALLOW"]["SMILES"] = "N";
                            }
                            if (COption::GetOptionString("forum", "FILTER", "Y") == "Y" || COption::GetOptionString("forum", "MESSAGE_HTML", "Y") == "Y") {
                                $message = $arMessage["POST_MESSAGE_HTML"];
                            } else {
                                $message = $arMessage["POST_MESSAGE"];
                            }
                            if (COption::GetOptionString("forum", "MESSAGE_HTML", "Y") == "N") {
                                $message = $parser->convert($message, $arAllow);
                            }
                            echo $message;
                            if (IntVal($arMessage["ATTACH_IMG"]) > 0) {
                                echo "<br><br>";
                                if ($arForum["ALLOW_UPLOAD"] == "Y" || $arForum["ALLOW_UPLOAD"] == "F" || $arForum["ALLOW_UPLOAD"] == "A") {
                                    echo CFile::ShowFile($arMessage["ATTACH_IMG"], 0, 300, 300, true, "border=0", false);
                                }
                            }
                            if (strlen($arUser["SIGNATURE"]) > 0) {
                                echo "<br><br><font class=\"forumsigntext\">";
                                $arForum["ALLOW"]["SMILES"] = "N";
                                echo $parser->convert($arUser["SIGNATURE"], $arForum["ALLOW"]);
                                echo "</font>";
                            }
                            ?>
							</font>
						</td>
					</tr>
					<tr>
						<td valign="bottom" class="forumbody forumbrd forumbrd1" style="border-top:none;">
							<table width="100%" border="0" cellspacing="0" cellpadding="0">
								<tr><td class="forumhr"><img src="/bitrix/images/1.gif" width="1" height="1" alt=""></td></tr></table>
							<font style="font-size:5px;">&nbsp;<br></font>
							<table width="100%" border="0" cellspacing="0" cellpadding="0">
								<tr valign="top">
									<td>
										<table border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td nowrap class="forummessbutton"><a href="view_profile.php?UID=<?php 
                            echo $arMessage["AUTHOR_ID"];
                            ?>
&FID=<?php 
                            echo $arForum["ID"];
                            ?>
&TID=<?php 
                            echo $arTopic["ID"];
                            ?>
&MID=<?php 
                            echo $arMessage["ID"];
                            ?>
" title="<?php 
                            echo GetMessage("FR_AUTHOR_PROFILE");
                            ?>
" class="forummessbuttontext"><?php 
                            echo GetMessage("FR_PROFILE");
                            ?>
</a></td>
												<td><div class="forummessbuttonsep"></div></td>
												<?php 
                            if (strlen($arUser["EMAIL"]) > 0) {
                                ?>
													<td nowrap class="forummessbutton"><a href="send_message.php?TYPE=MAIL&UID=<?php 
                                echo $arMessage["AUTHOR_ID"];
                                ?>
" title="<?php 
                                echo GetMessage("FR_EMAIL_AUTHOR");
                                ?>
" class="forummessbuttontext">E-Mail</a></td>
													<td><div class="forummessbuttonsep"></div></td>
												<?php 
                            }
                            ?>
												<?php 
                            if (strLen($arUser["PERSONAL_ICQ"]) > 0 && COption::GetOptionString("forum", "SHOW_ICQ_CONTACT", "N") == "Y") {
                                ?>
													<td nowrap class="forummessbutton"><a href="send_message.php?TYPE=ICQ&UID=<?php 
                                echo $arMessage["AUTHOR_ID"];
                                ?>
" title="<?php 
                                echo GetMessage("FR_ICQ_AUTHOR");
                                ?>
" class="forummessbuttontext">ICQ</a></td>
													<td><div class="forummessbuttonsep"></div></td>
												<?php 
                            }
                            ?>
												<?php 
                            if ($USER->IsAuthorized()) {
                                ?>
													<td nowrap class="forummessbutton"><a href="pm_message.php?mode=new&USER_ID=<?php 
                                echo $arMessage["AUTHOR_ID"];
                                ?>
" title="<?php 
                                echo GetMessage("FR_PRIVATE_MESSAGE");
                                ?>
"  class="forummessbuttontext">P-Mess</a></td>
													<td><div class="forummessbuttonsep"></div></td>
												<?php 
                            }
                            ?>
												<?php 
                            ?>
</tr>
										</table>
										<?php 
                            if (ForumCurrUserPermissions($arForum["ID"]) >= "Q" || $arTopic["LAST_TOPIC_MESSAGE"] == IntVal($arMessage["ID"]) && $USER->IsAuthorized() && IntVal($ar_Message["AUTHOR_ID"]) == IntVal($USER->GetParam("USER_ID")) || $arTopic["USER_PERM_DELETE"]) {
                                ?>
											<font style="font-size:4px;">&nbsp;<br></font>
											<table border="0" cellspacing="0" cellpadding="0">
												<tr>
													<?php 
                                if ($arMessage["APPROVED"] == "Y" && ForumCurrUserPermissions($arForum["ID"]) >= "Q") {
                                    ?>
														<td nowrap class="forummessbutton"><a href="read.php?FID=<?php 
                                    echo $arForum["ID"];
                                    ?>
&TID=<?php 
                                    echo $arTopic["ID"];
                                    ?>
&MID=<?php 
                                    echo $arMessage["ID"];
                                    ?>
&ACTION=HIDE&<?php 
                                    echo bitrix_sessid_get();
                                    ?>
" title="<?php 
                                    echo GetMessage("FR_HIDE_MESS");
                                    ?>
" class="forummessbuttontext"><?php 
                                    echo GetMessage("FR_HIDE");
                                    ?>
</a></td>
														<td><div class="forummessbuttonsep"></div></td>
													<?php 
                                } elseif (ForumCurrUserPermissions($arForum["ID"]) >= "Q") {
                                    ?>
														<td nowrap class="forummessbutton"><a href="read.php?FID=<?php 
                                    echo $arForum["ID"];
                                    ?>
&TID=<?php 
                                    echo $arTopic["ID"];
                                    ?>
&MID=<?php 
                                    echo $arMessage["ID"];
                                    ?>
&ACTION=SHOW&<?php 
                                    echo bitrix_sessid_get();
                                    ?>
" title="<?php 
                                    echo GetMessage("FR_SHOW_MESS");
                                    ?>
" class="forummessbuttontext"><i><b><?php 
                                    echo GetMessage("FR_SHOW");
                                    ?>
</b></i></a></td>
														<td><div class="forummessbuttonsep"></div></td>
													<?php 
                                }
                                ?>
													<?php 
                                if (ForumCurrUserPermissions($arForum["ID"]) >= "U" || $arTopic["LAST_TOPIC_MESSAGE"] == IntVal($arMessage["ID"]) && $USER->IsAuthorized() && IntVal($arMessage["AUTHOR_ID"]) == IntVal($USER->GetParam("USER_ID"))) {
                                    ?>
														<td nowrap class="forummessbutton"><a href="new_topic.php?FID=<?php 
                                    echo $arForum["ID"];
                                    ?>
&TID=<?php 
                                    echo $arTopic["ID"];
                                    ?>
&MID=<?php 
                                    echo $arMessage["ID"];
                                    ?>
&MESSAGE_TYPE=EDIT" title="<?php 
                                    echo GetMessage("FR_EDIT_MESS");
                                    ?>
" class="forummessbuttontext"><?php 
                                    echo GetMessage("FR_EDIT");
                                    ?>
</a></td>
														<td><div class="forummessbuttonsep"></div></td>
													<?php 
                                }
                                ?>
													<?php 
                                if ($arTopic["USER_PERM_DELETE"]) {
                                    ?>
														<td nowrap class="forummessbutton"><a href="read.php?FID=<?php 
                                    echo $arForum["ID"];
                                    ?>
&TID=<?php 
                                    echo $arTopic["ID"];
                                    ?>
&MID=<?php 
                                    echo $arMessage["ID"];
                                    ?>
&ACTION=DEL&<?php 
                                    echo bitrix_sessid_get();
                                    ?>
" title="<?php 
                                    echo GetMessage("FR_DELETE_MESS");
                                    ?>
" class="forummessbuttontext"><?php 
                                    echo GetMessage("FR_DELETE");
                                    ?>
</a></td>
														<td><div class="forummessbuttonsep"></div></td>
														<?php 
                                    if (IntVal($arMessage["AUTHOR_ID"]) > 0 && CModule::IncludeModule("support")) {
                                        ?>
															<td nowrap class="forummessbutton"><a href="read.php?FID=<?php 
                                        echo $arForum["ID"];
                                        ?>
&TID=<?php 
                                        echo $arTopic["ID"];
                                        ?>
&MID=<?php 
                                        echo $arMessage["ID"];
                                        ?>
&ACTION=FORUM_MESSAGE2SUPPORT&<?php 
                                        echo bitrix_sessid_get();
                                        ?>
" title="<?php 
                                        echo GetMessage("FR_MOVE2SUPPORT");
                                        ?>
" class="forummessbuttontext"><?php 
                                        echo GetMessage("FR_2SUPPORT");
                                        ?>
</a></td>
															<td><div class="forummessbuttonsep"></div></td>
														<?php 
                                    }
                                    ?>
													<?php 
                                }
                                ?>
													</font>
												</tr>
											</table>
										<?php 
                            }
                            ?>
									</td>
									<td align="right">
										<table border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td nowrap class="forummessbutton" style="padding-left:2px; padding-right:2px;"><a href="javascript:scroll(0,0);" title="<?php 
                            echo GetMessage("FR_2TOP");
                            ?>
" class="forummessbuttontext"><?php 
                            echo GetMessage("FR_TOP");
                            ?>
</a></td>
										  </tr>
										</table>
									</td>
								</tr>
							</table>
						</td>
					</tr><?php 
                            ?>
<tr><td colspan="2"><font style="font-size:4px;">&nbsp;<br></font></td></tr><?php 
                        }
                    }
                }
            }
            ?>
</table><?php 
        }
コード例 #12
0
         }
         $row->AddViewField("PROPERTY_" . $aProp['ID'], $PropV);
     } elseif ($aProp['PROPERTY_TYPE'] == 'E') {
         if ($t = GetElementName($arRes["PROPERTY_" . $aProp['ID']])) {
             $row->AddViewField("PROPERTY_" . $aProp['ID'], $t['NAME'] . ' [<a href="' . htmlspecialcharsbx(CIBlock::GetAdminElementEditLink($t['IBLOCK_ID'], $t['ID'])) . '" title="' . GetMessage("IBLOCK_ELSEARCH_ELEMENT_EDIT") . '">' . $t['ID'] . '</a>]');
         }
     }
 } else {
     $v = '';
     $arPropMultVal = array();
     $arPropMultValID = array();
     $dbPVals = CIBlockElement::GetProperty($IBLOCK_ID, $arRes["ID"], $xxord, $xxby, array("ID" => $aProp['ID']));
     while ($arPVals = $dbPVals->Fetch()) {
         $res = '';
         if ($aProp['PROPERTY_TYPE'] == 'F') {
             $res = CFile::ShowFile($arPVals['VALUE'], 100000, 50, 50, true);
         } elseif ($aProp['PROPERTY_TYPE'] == 'G') {
             $t = CIBlockSection::GetByID($arPVals['VALUE']);
             if ($t = $t->GetNext()) {
                 $res = $t['NAME'] . ' [<a href="' . htmlspecialcharsbx(CIBlock::GetAdminSectionEditLink($t['IBLOCK_ID'], $t['ID'])) . '" title="' . GetMessage("IBLOCK_ELSEARCH_SECTION_EDIT") . '">' . $t['ID'] . '</a>]';
             }
         } elseif ($aProp['PROPERTY_TYPE'] == 'E') {
             if ($t = GetElementName($arPVals['VALUE'])) {
                 $res = $t['NAME'] . ' [<a href="' . htmlspecialcharsbx(CIBlock::GetAdminElementEditLink($t['IBLOCK_ID'], $t['ID'])) . '" title="' . GetMessage("IBLOCK_ELSEARCH_ELEMENT_EDIT") . '">' . $t['ID'] . '</a>]';
             }
         } else {
             $res = htmlspecialcharsex($arPVals['VALUE_ENUM'] ? $arPVals['VALUE_ENUM'] : $arPVals['VALUE']);
         }
         $v .= ($v != '' ? ' / ' : '') . $res;
         $arPropMultVal[] = $arPVals['VALUE_ENUM'] ? $arPVals['VALUE_ENUM'] : $arPVals['VALUE'];
         $arPropMultValID[$arPVals['PROPERTY_VALUE_ID']] = $arPVals['VALUE'];
コード例 #13
0
        if ($arMessage["USE_SMILES"] != "Y") {
            $arAllow["SMILES"] = "N";
        }
        if (COption::GetOptionString("forum", "FILTER", "Y") == "Y" || COption::GetOptionString("forum", "MESSAGE_HTML", "Y") == "Y") {
            $message = $arMessage["POST_MESSAGE_HTML"];
        } else {
            $message = $arMessage["POST_MESSAGE"];
        }
        if (COption::GetOptionString("forum", "MESSAGE_HTML", "Y") == "N") {
            $message = $parser->convert($message, $arAllow);
        }
        echo $message;
        if (IntVal($arMessage["ATTACH_IMG"]) > 0) {
            echo "<br><br>";
            if ($arForum["ALLOW_UPLOAD"] == "Y" || $arForum["ALLOW_UPLOAD"] == "F" || $arForum["ALLOW_UPLOAD"] == "A") {
                echo CFile::ShowFile($arMessage["ATTACH_IMG"], 0, 300, 300, true, "border=0", false);
            }
        }
        if (strlen($arMessage["SIGNATURE"]) > 0) {
            $arAllow["SMILES"] = "N";
            ?>
<br><br><font class="forumsigntext"><?php 
            echo $parser->convert($arMessage["SIGNATURE"], $arAllow);
            ?>
</font><?php 
        }
        ?>
				</font>
			</td>
		</tr>
		<tr>
コード例 #14
0
        }
        ?>
		</font>
	</td>
	<td width="100%">
		<font class="forumbodytext">
		<?php 
        $arAllow["SMILES"] = $arForum["ALLOW_SMILES"];
        if ($ar_Message["USE_SMILES"] != "Y") {
            $arAllow["SMILES"] = "N";
        }
        echo $parser->convert($ar_Message["POST_MESSAGE"], $arAllow);
        if (IntVal($ar_Message["ATTACH_IMG"]) > 0) {
            echo "<br>";
            if ($arForum["ALLOW_UPLOAD"] == "Y" || $arForum["ALLOW_UPLOAD"] == "F" || $arForum["ALLOW_UPLOAD"] == "A") {
                echo CFile::ShowFile($ar_Message["ATTACH_IMG"], 0, 400, 400, false, "border=0", false);
            }
        }
        if (strlen($ar_Message["SIGNATURE"]) > 0) {
            echo "<br><br>";
            $arAllow["SMILES"] = "N";
            echo $parser->convert($ar_Message["SIGNATURE"], $arAllow);
        }
        ?>
		</font>
	</td>
  </tr>
  <tr class="forumhead">
	<td><font class="forumbodytext">
		<small><b>Создано</b> <nobr><?php 
        echo $ar_Message["POST_DATE"];
コード例 #15
0
ファイル: template.php プロジェクト: mrdeadmouse/u136006
 function __ShowFileFieldTmp($name, $multiple, $key, $value, $form_name, $arParams)
 {
     echo CFile::InputFile($name . ($multiple ? '[' . $key . ']' : ''), 40, $value, false, 0, "");
     if (IntVal($value) > 0) {
         echo "<br>";
         echo CFile::ShowFile($value, 5000000, 300, 300, true) . "<br>";
     }
 }