📄 index.php
字号:
<?
require("../../class/connect.php");
include("../../class/q_functions.php");
include("../../class/db_sql.php");
$link=db_connect();
$empire=new mysqlquery();
$voteid=(int)$_GET['voteid'];
if(empty($voteid))
{printerror("ErrorUrl","history.go(-1)");}
$r=$empire->fetch1("select voteid,title,votenum,votetext,voteclass,addtime from phome_enewsvote where voteid='$voteid'");
db_close();
$empire=null;
if(empty($r[voteid]))
{printerror("ErrorUrl","history.go(-1)");}
$r_exp="\r\n";
$f_exp="::::::";
if($r[voteclass])
{$voteclass="多选";}
else
{$voteclass="单选";}
?>
<title>投票:<?=$r[title]?></title>
<link href="../../data/images/css.css" rel="stylesheet" type="text/css">
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#4791C5">
<tr>
<td height="25"><font color="#FFFFFF">标题:<b><?=$r[title]?></b> (<?=$voteclass?>)</font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="1" cellpadding="3">
<?
//取得行
$r_r=explode($r_exp,$r[votetext]);
for($i=0;$i<count($r_r);$i++)
{
$f_r=explode($f_exp,$r_r[$i]);
if($r[votenum])
{
$width=number_format(($f_r[1]/$r[votenum])*100,2);
}
else
{$width=0;}
?>
<tr height=24>
<td width="48%"><b>.</b>
<?=$f_r[0]?>
</td>
<td width="10%"><div align="center"><?=$f_r[1]?>票</div></td>
<td width="42%"><img src="../../data/images/showvote.gif" width="<?=$width?>" height="6" border=0>
<?=$width?>%
</td>
</tr>
<?
}
?>
</table></td>
</tr>
<tr>
<td><table width="95%" border="0" align="right" cellpadding="3" cellspacing="1">
<tr>
<td><font color="#FFFFFF">发布时间:<?=$r[addtime]?>, 共 <b><?=$r[votenum]?></b> 票</font></td>
</tr>
</table></td>
</tr>
</table>
<br>
<br>
<br>
<center><input type=button name=button value=关闭 onclick="self.window.close();"></center>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -