Beispiel #1
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 
        }
Beispiel #2
0
        ?>
, <?php 
        echo htmlspecialcharsEx($arTopic["DESCRIPTION"]);
        ?>
						<?php 
    }
    ?>
&raquo;
							<?php 
    echo GetMessage("FR_ON_FORUM");
    ?>
 <a href="list.php?FID=<?php 
    echo $arForum["ID"];
    ?>
"><b><?php 
    echo htmlSpecialCharsEx($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"];
    ?>
</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
	<font style="font-size:4px;">&nbsp;<br></font>