📄 index.php
字号:
<?php
require('../../class/connect.php');
include('../../class/config.php');
include('../../class/class.php');
include('../../class/db_sql.php');
$link=db_connect();
$empire=new mysqlquery();
$classid=(int)$_GET['classid'];
$id=(int)$_GET['id'];
if(empty($id)||empty($classid)||!$class_r[$classid]['tbname'])
{
printerror("NotVote","history.go(-1)",9);
}
$infor=$empire->fetch1("select id,votenum,title from {$dbtbpre}ecms_".$class_r[$classid]['tbname']." where id='$id' and classid='$classid'");
if(empty($infor['id']))
{
printerror("NotVote","history.go(-1)",9);
}
$r=$empire->fetch1("select id,title,votetext,voteclass from {$dbtbpre}enewsinfovote where id='$id' and classid='$classid' limit 1");
if(empty($r['id'])||empty($r['votetext']))
{
printerror("NotVote","history.go(-1)",9);
}
if(empty($r['title']))
{
$r['title']=$infor['title'];
}
db_close();
$empire=null;
$r_exp="\r\n";
$f_exp="::::::";
if($r['voteclass'])
{
$voteclass="多选";
}
else
{
$voteclass="单选";
}
?>
<title><?=$infor[title]?></title>
<link href="../../data/images/qcss.css" rel="stylesheet" type="text/css">
<table width="100%" border="0" cellpadding="3" cellspacing="1" class="tableborder">
<tr class="header">
<td height="25">标题:<?=$r[title]?> (<?=$voteclass?>)</td>
</tr>
<tr>
<td bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<?php
//取得行
$r_r=explode($r_exp,$r[votetext]);
$count=count($r_r);
for($i=0;$i<$count;$i++)
{
$f_r=explode($f_exp,$r_r[$i]);
if($infor['votenum'])
{
$width=number_format(($f_r[1]/$infor['votenum'])*100,2);
}
else
{
$width=0;
}
?>
<tr height=24>
<td width="48%">
<img src="../../data/images/msgnav.gif" width="5" height="5">
<?=$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>
<?php
}
?>
</table></td>
</tr>
<tr>
<td><table width="100%" border="0" align="right" cellpadding="3" cellspacing="1">
<tr>
<td> 共 <b><?=$infor['votenum']?></b> 票</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 + -