⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 view.php

📁 小妖在线投票系统
💻 PHP
字号:
<html>
<head>
<title>查看</title>
<link href="css.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<?php
$lld=$_GET["id"];
$db=@mysql_connect("localhost","root","micronsky.net") or die("数据库连接失败");
mysql_select_db("vote",$db);
?>
<table border="0" width="96%" cellpadding="2" cellspacing="0" bordercolordark="#f7f7f7" bordercolorlight="#cccccc" class="css">
<tr>
<?php
if ($lld) {
$sql3="select sum(vcount) as msum from vote where lid=$lld";
$result3=mysql_query($sql3,$db);
if ($myrow3=mysql_fetch_array($result3)) {
	$msum=$myrow3["msum"];
}


$sql1="select title from title where id=$lld";
$result1=mysql_query($sql1,$db);
if ($myrow1=mysql_fetch_array($result1)) {
	?>
<td colspan="4" align="center"><font size="3" color="#336699"><b><?php echo $myrow1["title"]?></b></font><br>目前共有<font color="#ff0000"><?php echo $msum?></font>人参予了投票</td>
<?php
}
	?>
</tr>
<?php
		$sql2="select * from vote where lid=$lld";
	$result2=mysql_query($sql2,$db);
	if ($myrow2=mysql_fetch_array($result2)) {
		do {
		?>
<tr>
<td>
<?php echo $myrow2["info"]?>
</td>
<td>
<img src="vb1.gif" border="0" width="<?php echo ($myrow2["vcount"]/$msum)*50?>" height="10">
</td>
<td><font color="#999999">
<?php echo $myrow2["vcount"]?>票</font>
</td>
<td><font color="#999999">
<?php echo number_format($myrow2["vcount"]/$msum,2)*100?>%</font>
</td>
</tr>
<?php
		}
		while ($myrow2=mysql_fetch_array($result2));
	}
}
?>
<tr>
<td colspan="4" bgcolor="#f7f7f7" height="30" align="center">小妖在线投票系统</td>
</tr>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -