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

📄 index.php

📁 小妖在线投票系统
💻 PHP
字号:
document.write("<html>");
document.write("<head>");
document.write("<title>投票</title>");
document.write("<link href='css.css' rel='stylesheet' type='text/css'>");
document.write("<meta http-equiv='Content' content='text/html; charset=gb2312'>");
document.write("</head>");
document.write("<body>");
<?php
$db=@mysql_connect("localhost","root","micronsky.net") or die("数据库连接失败");
mysql_select_db("vote",$db);
?>
document.write("<form method='post' action='votes.php'>");
document.write("<table border='1' cellpadding='2' cellspacing='0' bordercolordark='#f7f7f7' bordercolorlight='#cccccc' class='css'>");
document.write("<tr>");
document.write("<td bgcolor='#f7f7f7'>");
<?php
$lld=$_GET["id"];
if ($lld) {
$sql1="select types,title from title where id=$lld";
$result1=mysql_query($sql1,$db);
if ($myrow1=mysql_fetch_array($result1)) {
?>
document.write("<?php echo $myrow1['title']?>");
<?php
}
?>
document.write("</td>");
document.write("</tr>");

<?php
$sql="select * from vote where lid=$lld";
$result=mysql_query($sql,$db);
if ($myrow=mysql_fetch_array($result)) {
	do {
	?>
document.write("<tr>");
document.write("<td>");
<?php
		if ($myrow1["types"]=="1") {
	 ?>
document.write("<input type='radio' name='vcount' value='<?php echo $myrow['id']?>'><?php echo $myrow['info']?><input type='hidden' name='jump' value='<?php echo $lld?>'><input type='hidden' name='tys' value='<?php echo $myrow1['types']?>'></td>");
document.write("</tr>");

<?php
	}
			else {
		?>
document.write("<input type='checkbox' name='vcount[]' value='<?php echo $myrow['id']?>'><?php echo $myrow['info']?><input type='hidden' name='jump' value='<?php echo $lld?>'><input type='hidden' name='tys' value='<?php echo $myrow1['types']?>'>");
		<?php
		}
		?>
<?php
	}
	while ($myrow=mysql_fetch_array($result));
}
?>
document.write("<tr>");
document.write("<td colspan='2' bgcolor='#f7f7f7' align='center'><input type='submit' name='submit' value='投票' class='inputt'>&nbsp;&nbsp;<!--<input type='button' name='button' value='查看' class='inputt' onclick='location.href=view.php'>--><a href='view.php?id=<?php echo $lld?>' target='_blank'>查看</a>");

document.write("</td>");
document.write("</tr>");
document.write("</table>");
document.write("</form>");
<?php
}
?>
document.write("</body>");
document.write("</html>");

⌨️ 快捷键说明

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