📄 showpost.pl
字号:
$Post.= "$OnlineMessage";
}else{
$Post.= "<b>发言人:".$PostInfo[1]."</b>";
}
$Post.= "</font>".
"</td>".
&Td("","","","","RIGHT","","","","");
if (($ShowIP eq "YES")||(($ShowIP eq "YESAdmin")&&(($Group eq "administrator")))) {
$Post.= &Font($FontFace,$MenuTextSize,$MenuTextColor).
"HOST/IP: ".$PostInfo[6].
"</font>";
}
$Post.= "</td>".
"</tr>".
"</table>".
"</td>".
"</tr>".
&CBTable();
###############################################################################
for (my ($i)=2;$i<=$#POST_DATA;$i++) {
@MemberInfo=();
@PostInfo=&DecodeDBOutput($POST_DATA[$i]);
if ($PostInfo[2]) {
@MemberInfo=&GetMemberData($PostInfo[2]);
open(GROUP,"$MembersPath/Groups.db")||&CGIError("Couldn't open/read the Groups.db file<br>\nPath: $MembersPath<br>\nReason : $!");
flock(GROUP,1) if ($FLock);
while (<GROUP>) {
@Group=&DecodeDBOutput($_);
if ($MemberInfo[3] eq $Group[0]) {
$Status=$Group[1];
last;
}
}
close(GROUP);
}
$Rank="";
($MemberInfo23[0], $MemberInfo23[1]) = split(/\|\^\|/, $MemberInfo[23]);
open(GROUP,"$MembersPath/$MemberInfo[3].rank")||&CGIError("Couldn't open/read the $MemberInfo[0] $MemberInfo[3].rank file<br>\nPath: $MembersPath<br>\nReason : $!");
flock(GROUP,1) if ($FLock);
while (<GROUP>) {
@Group=&DecodeDBOutput($_);
if ($MemberInfo23[0] eq $Group[0]) {
$Rank=$Group[1];
last;
}
}
close(GROUP);
$OnlineMessage="<font color=purple> 断线中!</font>";
open(ONLINE,"$Online_DIRECTORY/Online.Data")||&CGIError("Couldn't open/read the $Online_DIRECTORY/Online.Data file<br>\nPath: $DBPath/UserData<br>\nReason : $!");
flock(ONLINE,1) if ($ONLINE);
while (<ONLINE>){
@Online=&DecodeDBOutput($_);
if ($MemberInfo[0] eq $Online[0]){
$OnlineMessage="<font color=blue> 在线中!</font>";
last;
}
}
close(ONLINE);
if ($Cookies{"B_".$in{'Board'}."_TIME"}<$PostInfo[5]) {
$MNewIcon=&Image("$URLImages/SmallNew.gif","","","","","0","新内容");
}else{
$MNewIcon=&Image("$URLImages/SmallMessage.gif","","","","","0",$PostInfo[0]);
}
$Replies.= "<p>".
&BTable($TableWidth,$TableAlign,"0","0",$TableCellSpacing,$TableCellPadding,$TableBorderColor,"","").
&Tr("","",$HeaderBGColor).
&Td("","","","","","","","","").
&Table("100%","CENTER","0","0","","").
&Tr("","","").
&Td("10","","","","","","","","").
$MNewIcon.
"</td>".
&Td("50%","","","","","","","","").
&Font($FontFace,$HeaderTextSize,$HeaderTextColor).
"<b>".$PostInfo[0]." (编辑了 ".$PostInfo[8]." 次)</b> ".
"</font>".
"</td>".
&Td("50%","","","","RIGHT","","","","").
&Font($FontFace,$MenuTextSize,$MenuTextColor).
&GetDate($PostInfo[5],$MenuTextColor,$MenuTextColor,$MenuTextSize,$MenuTextSize).
"</font>".
"</td>".
"</tr>".
"</table>".
"</td>".
"</tr>";
if (($PostInfo[2])||($Group eq "administrator")||($Group eq $BoardInfo[4])) {
$Replies.= &Tr("","",$MenuBGColor).
&Td("","","","","","","","","").
&Table("100%","CENTER","0","0","","").
&Tr("","","").
&Td("","","","","","","","","");
if ($PostInfo[2]) {
$Replies.= &Link("UltraBoard.$Ext?Action=ShowProfile&ID=$PostInfo[2]&Board=$in{'Board'}&Idle=$in{'Idle'}&Sort=$in{'Sort'}&Order=$in{'Order'}&Page=$in{'Page'}&Session=$SessionID","Profile","",
"显示 $MemberInfo[1] ($MemberInfo[0]) 的个人信息").
$imgProfile.
"</a>";
$Replies.= $imgSperater.&Link("UltraBoard.pl?Action=SendMessage&ReName=$MemberInfo[0]&Ref=$in{'Action'}&Category=$in{'Category'}&Board=$in{'Board'}&Post=$in{'Post'}&ID=$in{'ID'}&Idle=$in{'Idle'}&Sort=$in{'Sort'}&Order=$in{'Order'}&Page=$in{'Page'}&Session=$SessionID","","",
"即刻在线传呼 $MemberInfo[1] ").
$imgICQ."<font color=7E7E03>“".$MemberInfo[1]."”</font>".
"</a>";
}
if (($MemberInfo[17] ne "")&&($PostInfo[2])) {
$Replies.= $imgSperater.&Link("mailto:$MemberInfo[4]","","",
"给 $MemberInfo[1] 发送电子邮件").
$imgEmail.
"</a>";
}
if ((($Group ne "administrator")&&($Group ne $BoardInfo[4]))&&($UserName eq $PostInfo[2])&&($PostInfo[2])&&(!$Closed)) {
$Replies.= $imgSperater.&Link("UltraBoard.$Ext?Action=ModifyReply&Post=$in{'Post'}&Board=$in{'Board'}&ID=".($i-1)."&Idle=$in{'Idle'}&Sort=$in{'Sort'}&Order=$in{'Order'}&Page=$in{'Page'}&Session=$SessionID","","",
"编辑 ($PostInfo[0])").
$imgModify.
"</a>";
}
$Replies.= "</td>".
&Td("","","","","RIGHT","","","","");
if (($Group eq "administrator")||($Group eq $BoardInfo[4])) {
$Replies.= &Link("UltraBoard.$Ext?Action=ModifyReply&Post=$in{'Post'}&Board=$in{'Board'}&ID=".($i-1)."&Idle=$in{'Idle'}&Sort=$in{'Sort'}&Order=$in{'Order'}&Page=$in{'Page'}&Session=$SessionID","","",
"编辑 ($PostInfo[0])").
$imgModify.
"</a>".$imgSperater;
}
if (($Group eq "administrator")||($Group eq $BoardInfo[4])) {
$Replies.= &Link("UltraBoard.$Ext?Action=DoRemoveMessages&Post=$in{'Post'}&ID=".($i-1)."&Board=$in{'Board'}&Idle=$in{'Idle'}&Sort=$in{'Sort'}&Order=$in{'Order'}&Page=$in{'Page'}&Session=$SessionID","","",
"删除 ($PostInfo[0])").
$imgRemove.
"</a>";
}
$Replies.= "</td>".
"</tr>".
"</table>".
"</td>".
"</tr>";
}
$Replies.= &Tr("","",$RowOddBGColor).
&Td("","","","","","","","","").
&Table("100%","CENTER","5","5","","").
&Tr("","","").
# &Td("","","","","","MIDDLE","","","").
# &Font($FontFace,$TextSize,$TextColor).
# $PostInfo[7];
"<td height=60>".
&Font($FontFace,$TextSize,$TextColor).
"<span style=\"letter-spacing: 2\">".
$PostInfo[7];
if ($UseSignatures and $PostInfo[4] and $MemberInfo[15]) {
$Replies.= "<hr>".
$MemberInfo[15];
}
$Replies.= "</font>".
"</td>".
"</tr>".
"</table>".
"</td>".
"</tr>".
&Tr("","",$MenuBGColor).
&Td("","","","","","","","","").
&Table("100%","CENTER","0","0","","").
&Tr("","","").
&Td("","","","","","","","","").
&Font($FontFace,$HeaderTextSize,$TextColor2);
if ($PostInfo[2]) {
$Replies.= "发言人:<font color=800000>[ ";
if ($MemberInfo[22] eq "male"){
$Replies.= "</font><font color=navy>".$Status.$Rank."</font><font color=red>*</font><font color=smalt>".$MemberInfo[1]."</font><font color=800000> ]</font>";
}
elsif ($MemberInfo[22] eq "female"){
$Replies.= "</font><font color=navy>".$Status.$Rank."</font><font color=red>*</font><font color=claret>".$MemberInfo[1]."</font><font color=800000> ]</font>";
}
elsif (!($MemberInfo[22])){
$Replies.= "</font><font color=navy>".$Status.$Rank."</font><font color=red>*</font><font color=blue>".$MemberInfo[1]."</font><font color=800000> ]</font>";
}
$Replies.= "$OnlineMessage";
}else{
$Replies.= "<b>发言人:".$PostInfo[1]."</b>";
}
$Replies.= "</font>".
"</td>".
&Td("","","","","RIGHT","","","","");
if (($ShowIP eq "YES")||(($ShowIP eq "YESAdmin")&&(($Group eq "administrator")))) {
$Replies.= &Font($FontFace,$MenuTextSize,$MenuTextColor).
"HOST/IP: ".$PostInfo[6].
"</font>";
}
$Replies.= "</td>".
"</tr>".
"</table>".
"</td>".
"</tr>".
&CBTable();
}
###############################################################################
open(CATEGORY,"$DBPath/$BoardInfo[3].cat")||&CGIError("Couldn't open/read the $BoardInfo[3].cat file<br>\nPath: $DBPath<br>\nReason : $!");
flock(CATEGORY,1) if ($FLock);
$CATEGORY_DATA=<CATEGORY>;
@CategoryInfo=&DecodeDBOutput($CATEGORY_DATA);
close(CATEGORY);
$HTML.= "<p>".&BTable($TableWidth,$TableAlign,"0","0",$TableCellSpacing,$TableCellPadding,$TableBorderColor,"","").
&Tr("","",$CategoryBGColor).
&Td("","","","","","","","","").
"<span style=font:9pt>你现在的位置:</span>".
&Font($FontFace,$CategoryNameTextSize,$CategoryTextColor).
&Link("UltraBoard.$Ext?Session=$SessionID","","",
"返回 $UBName").
"<font color=black><u>江湖入口</u>".
"</a>";
if ($UseCategory) {
$HTML.= " -=> ".
&Link("UltraBoard.$Ext?Action=ShowCategory&Category=$CategoryInfo[0]&Idle=$in{'Idle'}&Sort=$in{'Sort'}&Order=$in{'Order'}&Page=$in{'Page'}&Session=$SessionID","","",
"显示 ($CategoryInfo[1])").
"<font color=black><u>$CategoryInfo[1]</u>".
"</a>";
}
$HTML.= " -=> ".
&Link("UltraBoard.$Ext?Action=ShowBoard&Board=$in{'Board'}&Idle=$in{'Idle'}&Sort=$in{'Sort'}&Order=$in{'Order'}&Page=$in{'Page'}&Session=$SessionID","","",
"返回 $BoardInfo[1]").
"<font color=black><u>$BoardInfo[1]</u>".
"</a>".
"</font>".
"</td>".
"</tr>".
&Tr("","",$MenuBGColor).
&Td("","","","","","","","","").
&Table("100%","CENTER","0","0","","").
&Tr("","","").
&Td("10","","","","","","","","").
$MessageIcon.
"</td>".
&Td("100%","","","","","","","","").
&Font($FontFace,$TextSize,$TextColor)." ".
"<b>".$FirstMember."</b> 发表的文章 -[ <font color=red>".$Topic."</font> ]-"." 已经被点击了:<font color=green>".$TotalShow."</font> 次".
"</font>".
"</td>".
"</tr>".
"</table>".
"</td>".
"</tr>".
#发贴子的位置调整开始
&Tr("","",$RowOddBGColor).
&Td("","","","","","","","","");
#开始
if ((($in{'Action'} eq "ShowBoard")||($in{'Action'} eq "ShowPost"))&&($in{'Board'})) {
if ((!defined ($MemberStatus))||($MemberStatus ne "ReadOnly")) {
# $HTML.= &Link("UltraBoard.$Ext?Action=NewPost&Post=$in{'Post'}&Board=$in{'Board'}&Idle=$in{'Idle'}&Sort=$in{'Sort'}&Order=$in{'Order'}&Page=$in{'Page'}&Session=$SessionID","","",
# "粘贴新讨论").$imgPost."</a>";
$HTML.= &Link("UltraBoard.$Ext?Action=NewReply&Post=$in{'Post'}&Board=$in{'Board'}&Idle=$in{'Idle'}&Sort=$in{'Sort'}&Order=$in{'Order'}&Page=$in{'Page'}&Session=$SessionID","","",
"回复此讨论").$imgReply."</a>".$imgSperater if (($in{'Post'})&&(!$Closed));
}
}
$HTML.= $imgSperater if ($Closed);
if (($in{'Action'} eq "ShowPost")&&($in{'Board'})&&($in{'Post'})) {
$HTML.= &Link("UltraBoard.$Ext?Action=PrintableTopic&Post=$in{'Post'}&Board=$in{'Board'}&Idle=$in{'Idle'}&Sort=$in{'Sort'}&Order=$in{'Order'}&Page=$in{'Page'}&Session=$SessionID","","",
"显示此讨论的打印文本").$imgPrint."</a>";
$HTML.= $imgSperater.&Link("UltraBoard.$Ext?Action=ForwardTopic&Post=$in{'Post'}&Board=$in{'Board'}&Idle=$in{'Idle'}&Sort=$in{'Sort'}&Order=$in{'Order'}&Page=$in{'Page'}&Session=$SessionID","","",
"转发给朋友").$imgForward."</a>" if ($EmailFunction);
}
#结束
"</td>".
"</tr>";
#发贴子的位置调整结束
if ($TopicDes ne "") {
$HTML.= &Tr("","",$RowOddBGColor).
&Td("","","","","","","","","").
&Font($FontFace,$CategoryDesTextSize,$CategoryTextColor).
$TopicDes.
"</font>".
"</td>".
"</tr>";
}
$HTML.= "</table></td></tr></table>".
"<p>".
$Post.
$Replies.
"<p>".
&BTable($TableWidth,$TableAlign,"0","0",$TableCellSpacing,$TableCellPadding,$TableBorderColor,"","").
&Tr("","",$MenuBGColor).
&Td("","","","","RIGHT","","","","").
&Table("100%","CENTER","0","0","","").
&Tr("","","");
if (($Group eq "administrator")||($Group eq $BoardInfo[4])) {
$HTML.= &Td("","","","","","","","","").
&Link("UltraBoard.$Ext?Action=DoRemoveMessages&Post=$in{'Post'}&Board=$in{'Board'}&Idle=$in{'Idle'}&Sort=$in{'Sort'}&Order=$in{'Order'}&Page=$in{'Page'}&Session=$SessionID","","",
"删除 ($Topic)").
$imgRemoveThread.
"</a>".$imgSperater;
if ($Closed) {
$HTML.= &Link("UltraBoard.$Ext?Action=DoCloseThread&Type=Open&Post=$in{'Post'}&Board=$in{'Board'}&Idle=$in{'Idle'}&Sort=$in{'Sort'}&Order=$in{'Order'}&Page=$in{'Page'}&Session=$SessionID","","",
"打开 ($Topic)").
$imgOpenThread.
"</a>";
}else{
$HTML.= &Link("UltraBoard.$Ext?Action=DoCloseThread&Type=Close&Post=$in{'Post'}&Board=$in{'Board'}&Idle=$in{'Idle'}&Sort=$in{'Sort'}&Order=$in{'Order'}&Page=$in{'Page'}&Session=$SessionID","","",
"关闭 ($Topic)").
$imgCloseThread.
"</a>";
}
$HTML.= "</td>";
}
$HTML.= &Td("","","","","RIGHT","","","","");
if ((!defined ($MemberStatus))||($MemberStatus ne "ReadOnly")) {
# $HTML.= &Link("UltraBoard.$Ext?Action=NewPost&Board=$in{'Board'}&Idle=$in{'Idle'}&Sort=$in{'Sort'}&Order=$in{'Order'}&Page=$in{'Page'}&Session=$SessionID","","","粘贴新讨论").$imgPost."</a>";
$HTML.= &Link("UltraBoard.$Ext?Action=NewReply&Post=$in{'Post'}&Board=$in{'Board'}&Idle=$in{'Idle'}&Sort=$in{'Sort'}&Order=$in{'Order'}&Page=$in{'Page'}&Session=$SessionID","","","回复此讨论").$imgReply."</a>".$imgSperater if (!$Closed);
}
$HTML.= $imgSperater if ($Closed);
$HTML.= &Link("UltraBoard.$Ext?Action=PrintableTopic&Post=$in{'Post'}&Board=$in{'Board'}&Idle=$in{'Idle'}&Sort=$in{'Sort'}&Order=$in{'Order'}&Page=$in{'Page'}&Session=$SessionID","","","显示此讨论的打印文本").$imgPrint."</a>";
$HTML.= $imgSperater.&Link("UltraBoard.$Ext?Action=ForwardTopic&Post=$in{'Post'}&Board=$in{'Board'}&Idle=$in{'Idle'}&Sort=$in{'Sort'}&Order=$in{'Order'}&Page=$in{'Page'}&Session=$SessionID","","","发送给朋友").$imgForward."</a>" if ($EmailFunction);
$HTML.= "</td>".
"</tr>".
"</table>".
"</td>".
"</tr>".
&Tr("","",$MenuBGColor).
&Td("","","","","","","","","").
&PrintVersion("YES").
"</td>".
"</tr>".
"</table></td></tr></table>".
&GetBoardList();
&PrintTheme("$UBName - $Topic",$HTML);
exit;
}
###############################################################################
1;# End of ShowPost Function
###############################################################################
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -