📄 view.cgi
字号:
$pollform = qq~<form action=poll.cgi method=POST>
<input type=hidden name=action value="poll"><input type=hidden name=forum value="$inforum"><input type=hidden name=threadname value="$intopic">
<table cellPadding=1 cellSpacing=0 width=$maxpolllength bgColor=$tablebordercolor><tr><td nowrap><table width=100% cellPadding=4 cellSpacing=0 bgColor=#f2f2f2>
<tr><td nowrap>$pollinput</td></tr>
<tr><td align=center nowrap><hr size=1 width=85%>$maxcanpoll<input type=submit name=results value="参加投票"></td></form></tr>
</table></td></tr></table>~;
$showpoll = "";
$pollnull = "";
if ($mymembercode eq "ad" || $mymembercode eq "smo" || $myinmembmod eq "yes")
{
$adminview = 1;
$maxpolllength = 550;
$adminviewcolspan = 3;
}
else
{
$adminview = 0;
$maxpolllength = 510;
$adminviewcolspan = 2;
}
$poll = qq~<table width=$maxpolllength>~;
if (open(FILE, "${lbdir}forum${inforum}/${intopic}.poll.cgi"))
{
@allpoll = <FILE>;
close(FILE);
$size = @allpoll;
}
else
{
$size = 0;
@allpoll = ();
}
if ($size > 0)
{
$size = 0;
@thispoll = ('0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0');
@pollname = ('','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','');
foreach (@allpoll)
{
$_ =~ s/[\a\f\n\e\0\r]//isg;
next if ($_ eq "");
my ($tmpinmembername, $tmpmyChoice) = split(/\t/, $_);
$tmpinmembername =~ s/^*!#&*//isg;
for ($i = 1; $i <= $j; $i++)
{
if ($i == $tmpmyChoice)
{
$thispoll[$i]++;
$TheHigest=$thispoll[$i] if ($thispoll[$i] >= $TheHigest);
$pollname[$i] = "$pollname[$i]$tmpinmembername\t";
$size++;
}
}
$showpoll = "true" if ($tmpinmembername eq $inmembername);
}
undef @allpoll;
}
if ($size > 0)
{
$poll .= $showsignature eq "yes" ? qq~<tr><td colspan=$adminviewcolspan><HR size=1 width=100%></td></tr><tr><td colspan=$adminviewcolspan>目前总共有 <font color=$fonthighlight><b>$size</b></font> 张投票,结果如下:<hr size=1 width=100%><br></td></tr>~ : qq~<tr><td colspan=$adminviewcolspan><hr size=1 width=100%></td></tr><tr><td colspan=$adminviewcolspan>目前共有 <font color=$fonthighlight><b>$size</b></font> 人参加投票,结果如下:<hr size=1 width=100%><br></td></tr>~;
for ($i = 1; $i <= $j; $i++)
{
if ($poll[$i] ne "")
{
my $mypoll = int($thispoll[$i] / $size * 1000) / 10;
my $width = int($mypoll / 100 * 160);
if ($adminview == 1)
{
undef @pollmanname;
$adminviewpoll = qq~</td><td nowarp><script language="JavaScript">function surfto(list) {var myindex1 = list.selectedIndex; var newwindow = list.options[myindex1].value; if (newwindow != "") {var msgwindow = window.open("profile.cgi?action=show&member=" + newwindow, "", "");}}</script><select OnChange="surfto(this);"><option>投票人名单 </option><option>----------</option>~;
@pollmanname = split(/\t/, $pollname[$i]);
$pollmanname = @pollmanname;
foreach (@pollmanname)
{
my $tempname = $uri_escape ne "no" ? uri_escape($_) : $_;
$adminviewpoll .= qq~<option value="$tempname">$_ </option>~;
}
$adminviewpoll .= "</select>";
$adminviewpoll = "</td><td nowarp>[没有人投票]" if ($pollmanname eq 0);
}
else
{
undef $adminviewpoll;
}
$ii = $i;
$ii = $ii - 40 if ($ii > 40);
$ii = $ii - 30 if ($ii > 30);
$ii = $ii - 20 if ($ii > 20);
$ii = $ii - 10 if ($ii > 10);
if ($thispoll[$i] >= $TheHigest)
{
$XA = "<font color=$fonthighlight><b><u>";
$XB = "</u></b></font>";
}
else
{
$XA = $XB = "";
}
$poll .= qq~<tr><td nowarp>$XA$poll[$i]$XB </td><td nowarp> <img src=$imagesurl/images/bar$ii.gif width=$width height=10> <b>$thispoll[$i]</b> 票数 $mypoll% $adminviewpoll</td></tr>~;
}
}
}
else
{
$poll .= qq~<tr><td colspan=2><hr size=1 width=100%></td></tr><tr><td colspan=2>没有人参加此投票,选项列表如下:<hr size=1 width=100%><br></td></tr>~;
for ($i = 1; $i <= $j; $i++)
{
$poll .= qq~<tr><td colspan=2>$poll[$i] </td></tr>~;
}
$pollnull = "true";
}
$poll .= "</td></tr><tr><td colspan=$adminviewcolspan><hr size=1 width=100%></td></tr></table>";
if ($threadstate eq "pollclosed" || $showpoll eq "true" || $inmembername eq "客人")
{
my $poll1 = "<font color=$fonthighlight>客人不能投票,请注册!</font>" if ($inmembername eq "客人");
$poll1 = "<font color=$fonthighlight>谢谢,你已经投过票了!</font>" if ($showpoll eq "true");
$poll1 = "<font color=$fonthighlight>对不起,此投票已经关闭!</font>" if ($threadstate eq "pollclosed");
$poll = "<br><br><font color=$fonthighlight>对不起,你必需先投票才可看结果!</font><br>" if ($PollHidden eq "yes" && $inmembername eq "客人");
$poll = "$poll$poll1";
}
else
{
if ($pollnull eq "true")
{
$poll = "$pollform<br><font color=$fonthighlight>目前暂时没有人投票!</font>";
}
else
{
$poll = "<br><font color=$fonthighlight>对不起,你必需先投票才可看结果!</font>" if ($PollHidden eq "yes" && $membername ne $inmembername);
$poll = "$pollform$poll";
}
}
$editgraphic = qq~<a href=editpoll.cgi?action=edit&forum=$inforum&topic=$intopic title="编辑这个投票"><img src=$imagesurl/images/edit.gif border=0 width=16 height=15 align=absmiddle>编辑</a>~;
$delgraphic = "";
$posticon = "";
}
}
else
{
if ($posticon eq "")
{
$posticon = int(rand(23));
$posticon = "0$posticon" if ($posticon < 10);
$posticon = "$posticon.gif";
}
$posticon = "<img src=$imagesurl/posticons/$posticon>";
}
}
else
{
$posticon = int(rand(23));
$posticon = "0$posticon" if ($posticon < 10);
$posticon = "<img src=$imagesurl/posticons/$posticon.gif>";
}
if ($poll ne "")
{
$post = $post . "<br>" . $poll;
$poll = "";
}
$forumgraphic = $boardlogo =~ /\.swf$/i ? qq~<param name=play value=true><param name=loop value=true><param name=quality value=high><embed src=$imagesurl/myimages/$boardlogo quality=high width=$fgwidth height=$fgheight pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"></embed>~ : "<img src=$imagesurl/myimages/$boardlogo border=0>";
print qq~
<html><head><title>$topictitle</title>
<meta http-equiv="Content-Type" Content="text/html; charset=gb2312">
<script language="JavaScript" src=$imagesurl/images/board.js></script>
<style>
body {font-size: 9pt; font-family: "MS Shell Dlg"}
p {font-size: 9pt; font-family: "MS Shell Dlg"}
select {font-size: 9pt; font-family: "MS Shell Dlg"}
td {font-size: 12px; font-family: "MS Shell Dlg"}
input {font-size: 9pt; font-family: 宋体}
textarea{font-size: 9pt; font-family: 宋体}
.input1 {border-right: #085d3f 1px solid; border-top: #085d3f 1px solid; border-left: #085d3f 1px solid; border-bottom: #085d3f 1px solid; background-color: white}
a {font-size: 9pt; text-transform: none; color: #000000; text-decoration: none}
a.lefta {font-size: 9pt; text-transform: none; color: #ffffff; text-decoration: none}
a.flink {font-size: 9pt; text-transform: none; color: #000000; text-decoration: none}
a.lefta:hover {color: #c0c0c0; text-decoration: none}
a:hover {color: red; text-decoration: none}
a:visited {text-decoration: none}
.smallsize {font-size: 9px; color: #d9d9d9; font-family: verdana}
li {font-size: 9pt; line-height: 15pt}
.tt2 {font-size: 9pt; line-height: 16pt}
.tt1 {font-size: 14px}
.tt3 {font-size: 9pt; line-heightT: 13pt}
a.hb {font-size: 9pt; color: #000000; line-height: 10pt}
a.tt1 {color: #000000; text-decoration: none}
</style>
<body background=$imagesurl/images/schedulebg.gif bgColor=#ffffff><a name=top></a>
<table width=750 border=0 cellSpacing=0 cellPadding=0 align=center>
<tr><td height=40 width=176 align=center>$forumgraphic</td><td height=40 colspan=2 align=right>$adscript</div></td></tr>
<tr align=right><td colspan=3>
<table border=1 cellSpacing=1 bordercolorlight=#49ade9 bordercolordark=#ffffff cellPadding=1 width=100%>
<tr bgColor=#caeaff><td colspan=7> </td></tr></table>
</td></tr>
</table>
<table height=100% cellSpacing=0 cellPadding=0 width=750 align=center border=0><tr>
<td valign=top align=center width=120>
<table height=100% cellSpacing=0 cellPadding=0 width=100% align=center border=0><tr>
<td valign=top width=1 bgColor=white></td>
<td valign=top align=center bgColor=#49ade9>
<table cellSpacing=0 cellPadding=0 width=100 align=center border=0>
<tr><td height=6></td></tr>
<tr><td style="color: white" align=center bgColor=#ffa200 height=18><b>本文章信息</b></td></tr>
<tr><td height=6></td></tr>
<tr><td OnMouseOver="this.style.background='#caeaff'; this.style.color='#000000'" OnMouseOut="this.style.background=''; this.style.color=''" align=center height=18><a class=lefta href=profile.cgi?action=show&member=$memberfilename>作 者 资 料</a></td></tr>
<tr><td OnMouseOver="this.style.background='#caeaff'; this.style.color='#000000'" OnMouseOut="this.style.background=''; this.style.color=''" align=center height=18><a class=lefta href=$homepage>作 者 主 页</a></td></tr>
<tr><td OnMouseOver="this.style.background='#caeaff'; this.style.color='#000000'" OnMouseOut="this.style.background=''; this.style.color=''" align=center height=18><a class=lefta href=fav.cgi?action=add&forum=$inforum&topic=$intopic>我 要 收 藏</a></td></tr>
<tr><td OnMouseOver="this.style.background='#caeaff'; this.style.color='#000000'" OnMouseOut="this.style.background=''; this.style.color=''" align=center height=18><a class=lefta href=pag.cgi?forum=$inforum&topic=$intopic>打 包 下 载</a></td></tr>
<tr><td OnMouseOver="this.style.background='#caeaff'; this.style.color='#000000'" OnMouseOut="this.style.background=''; this.style.color=''" align=center height=18><a class=lefta href=post.cgi?action=new&forum=$inforum>发 表 主 题</a></td></tr>
<tr><td OnMouseOver="this.style.background='#caeaff'; this.style.color='#000000'" OnMouseOut="this.style.background=''; this.style.color=''" align=center height=18><a class=lefta href=lbfriend.cgi?forum=$inforum&topic=$intopic>转 发 该 文</a></td></tr>
<tr><td height=6></td></tr>
</table>
</td>
<td valign=top width=1 bgColor=white></td>
</tr></table>
</td>
<td valign=top>
<table cellSpacing=0 cellPadding=0 width=100% border=0 style="table-layout: fixed"><tr>
<td width=22></td>
<td valign=top>
<table cellSpacing=0 cellPadding=0 width=100% border=0><tr><td width=100% bgColor=#49ade9 height=17><font color=#ffffff> >> <a href=leoboard.cgi><font color=#ffffff>$boardname</font></a>/<a href=forums.cgi?forum=$inforum><font color=#ffffff>$forumname</font></a>/<a href=topic.cgi?forum=$inforum&topic=$intopic><font color=#ffffff>$topictitle</font></a></font></td></tr></table>
<span style="font-size: 14px">
<br><center><b>$topictitle</b></center><br>
<span style="font-size: 9pt">(这条文章已经被阅读了 <font color=red>$threadviews</font> 次) 时间:$postdate 来源:$membername</span>
<br><br>$addme<br>$post<br>
</span><br><br>
<table cellSpacing=0 cellPadding=0 width=100% border=0>
<tr><td width=100% bgColor=#ffa200 height=18 align=center>[<a href=pag.cgi?forum=$inforum&topic=$intopic>打包下载</a>] [<a href=post.cgi?action=copy1&forum=$inforum&topic=$intopic&postno=1>引用该文</a>] [<a href=post.cgi?action=reply&forum=$inforum&topic=$intopic>发表评论</a>] [<a href=lbfriend.cgi?forum=$inforum&topic=$intopic>转寄该文</a>] [<a href="javascript:window.close();">关闭窗口</a>]</td></tr>
<tr><td width=100% height=18>此文章相关评论: </td></tr>~;
$hasadd = @threads - 1;
if ($hasadd == 0)
{
print qq~
<tr><td width=100% height=18>该文章还没有相关评论!(<a href=topic.cgi?forum=$inforum&topic=$intopic><font Color=#ffa200>点这儿论坛方式查看</font></a>) </td></tr>
</table>~;
}
else
{
print qq~
<tr><td width=100% height=18>该文章有<font color=red>$hasadd</font>个相关评论如下:(<a href=topic.cgi?forum=$inforum&topic=$intopic><font Color=#ffa200>点这儿论坛方式查看</font></a>)<br><hr size=1 width=100%></td></tr>
</table>
~;
}
$membercode = "no";
for ($i = 1; $i < @threads; $i++)
{
($membername, $topictitle, $postipaddresstemp, $showemoticons, $showsignature, $postdate, $post, $posticon) = split(/\t/, $threads[$i]);
$postdate = &dateformat($postdate + $addtimes);
$rn = $i + 1;
$addmefile = 0;
$rrn = $i;
my @files1 = grep(/^$inforum\_$intopic\_$rrn\./, @files11);
my $file1 = @files1;
if ($file1 > 0)
{
my $files1s = $files1[0];
($up_name, $up_ext) = split(/\./, $files1s);
$up_ext =~ tr/A-Z/a-z/;
$addmefile =1;
}
if ($addmefile == 1)
{
@fileinfo = stat("${imagesdir}usr/${inforum}/${up_name}.${up_ext}");
$filetype = "unknow";
$filetype = $up_ext if (-e "${imagesdir}icon/${up_ext}.gif");
$addme = $up_ext eq "gif" || $up_ext eq "jpg" || $up_ext eq "png" || $up_ext eq "bmp" ? qq~<img src=$imagesurl/icon/$filetype.gif border=0 width=16 height=16> 相关图片如下:<br><a href=$imagesurl/usr/$inforum/$up_name.$up_ext target=_blank><img src=$imagesurl/usr/$inforum/$up_name.$up_ext border=0 alt="按此在新窗口浏览图片" onload="javascript:if(this.width>screen.width-333) this.width=screen.width-333"></a><br><br>~ : qq~<font color=$fonthighlight>相关附件</font>:<a href=$imagesurl/usr/$inforum/$up_name.$up_ext target=_blank><img src=$imagesurl/icon/$filetype.gif border=0 width=16 height=16 alt="该主题有一个“$filetype”类型附件,点击下载"></a> (共 $fileinfo[7] 字节)<br><br>~;
}
else
{
$addme = "";
}
$inmembmod = $forummodnamestemp =~ /,$membername,/i ? "yes" : "no";
if ($idmbcodestate eq "on")
{
$post = &lbcode($post);
if ($post =~ /<blockquote><font face=宋体>代码/isg)
{
$post =~ s/\&\;/\&/ig;
$post =~ s/\<\;br\>\;/<br>/ig;
}
}
if ($emoticons eq "on" && $showemoticons eq "yes")
{
$post = &doemoticons($post);
$post = &smilecode($post);
}
$post = &postwordfilter($post) if ($dofilter eq "no" || $dofilter eq "all");
$memberfilename = $uri_escape eq "no" ? $membername : uri_escape($membername);
$memberfilename =~ s/ /\_/g;
$post =~ s/(<blockquote>)(.*?)(<hr noshade><\/blockquote>)//isg if ($post =~/<blockquote>/isg);
print qq~
<table style="table-layout: fixed" cellPadding=8 cellSpacing=1 border=0 width=100%>
<tr>
<td bgColor=#ffffff rowspan=2 valign=top width=20%><font color=#000000><b><a href=profile.cgi?action=show&member=$memberfilename target=_blank>$membername</a></b></font></td>
<td bgColor=#ffffff><font color=#000000><b>发表于: $postdate</b><br>$addme</td>
</tr>
<tr>
<td bgColor=#ffffff style="left: 0px; width: 100%; word-wrap: break-word">$post</td>
</tr>
<tr>
<td colspan=2 bgColor=#eeeeee align=right> <a href=#top><img src=$imagesurl/images/gotop.gif border=0 weight=15 height=15 align=absmiddle>顶部</a></td>
</tr>
</table>~;
}
print qq~
</td>
</tr></table></td></tr></table>
</td></tr>
</table>
<div align=center><table height=22 cellSpacing=0 cellPadding=0 width=721 border=0>
<tr><td colspan=2 width=987 height=20 align=center>
<script language="JavaScript"><!--
var correctwidth = 800;
var correctheight = 600;
if (screen.width != correctwidth || screen.height != correctheight) document.write("建议使用" + correctwidth + "×" + correctheight + "以上分辨率. 您当前的分辨率是:" + screen.width + "×" + screen.height+"。");
--></script>
</td></tr>
</table></div><br>
<center>$adfoot</center>
</body></html>~;
exit;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -