【php开源代码栏目提醒】:网学会员,鉴于大家对php开源代码十分关注,论文会员在此为大家搜集整理了“voteAdminDel.php”一文,供大家参考学习!
<?php require_once('Connections/connVoteSystem.php'); ?>
<?php
$colname_voteSummary = "1";
if (isset($_GET['vote_id'])) {
$colname_voteSummary = (get_magic_quotes_gpc()) ? $_GET['vote_id'] : addslashes($_GET['vote_id']);
}
mysql_select_db($database_connVoteSystem, $connVoteSystem);
$query_voteSummary = sprintf("SELECT SUM(vote_count) AS voteSUM,MAX(vote_count) AS voteMAX FROM voteitem WHERE vote_id = %s", $colname_voteSummary);
$voteSummary = mysql_query($query_voteSummary, $connVoteSystem) or die(mysql_error());
$row_voteSummary = mysql_fetch_assoc($voteSummary);
$totalRows_voteSummary = mysql_num_rows($voteSummary);
$voteSUM_RecVoteShow = "1";
if (isset($row_voteSummary['voteSUM'])) {
$voteSUM_RecVoteShow = (get_magic_quotes_gpc()) ? $row_voteSummary['voteSUM'] : addslashes($row_voteSummary['voteSUM']);
}
$sendID_RecVoteShow = "1";
if (isset($_GET['vote_id'])) {
$sendID_RecVoteShow = (get_magic_quotes_gpc()) ? $_GET['vote_id'] : addslashes($_GET['vote_id']);
}
mysql_select_db($database_connVoteSystem, $connVoteSystem);
$query_RecVoteShow = sprintf("SELECT votemain.vote_id,votemain.vote_name,voteitem.voteitem_id,voteitem.vote_item,voteitem.vote_count,(voteitem.vote_count/%s*200) AS votePercent FROM votemain INNER JOIN voteitem ON votemain.vote_id = voteitem.vote_id WHERE votemain.vote_id = %s", $voteSUM_RecVoteShow,$sendID_RecVoteShow);
$RecVoteShow =
mysql_query($query_RecVoteShow, $connVoteSystem) or die(my
sql_error());
$row_RecVoteShow = mysql_fetch_assoc($RecVoteShow);
$totalRows_RecVoteShow = mysql_num_rows($RecVoteShow);
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>投票
系统</title>
<script language="JavaScript" type="text/
JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
</head>
<body>
<table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
<tr valign="top">
<td style="background-attachment: fixed;background-image: url(images/vote_r9_c8_1.gif);background-repeat: no-repeat;background-position: right bottom;"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="102" valign="top"> </td>
<td align="center"><table width="100%" border="0" cellpadding="4" cellspacing="0">
<tr>
<td><font size="2"><img src="images/arrow-3.gif" width="10" height="10"> <strong>删除投票活动</strong></font></td>
</tr>
<tr>
<td><font color="#000099" size="2"><a href="voteAdmin.php">主画面</a> > 浏览投票情况</font></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="4" cellspacing="0">
<tr>
<td align="center" valign="top"><table width="100%" border="0" cellpadding="4" cellspacing="0" bgcolor="#EEEEEE">
<tr>
<td align="center"><font color="#000099" size="2"><strong><font color="#990000" size="3"><?php echo $row_RecVoteShow['vote_name']; ?></font></strong></font></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="4">
<?php do { ?>
<tr valign="baseline">
<td width="10" height="25"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><img src="images/arrow-2.gif" width="10" height="12" align="absmiddle"> </font></td>
<td><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $row_RecVoteShow['vote_item']; ?> </font></td>
<td width="220" height="25"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><img src="images/bar_g_h.gif" width="<?php echo $row_RecVoteShow['votePercent']; ?>" height="10" align="absmiddle"> <font color="#FF0000"><?php echo $row_RecVoteShow['vote_count']; ?></font></font></td>
</tr>
<?php } while ($row_RecVoteShow = mysql_fetch_assoc($RecVoteShow)); ?>
</table>
<table width="100%" border="0" cellpadding="4" cellspacing="0" bgcolor="#EEEEEE">
<tr>
<td align="right"><font color="#000099" size="-1">总票数</font><font size="-1">:<font color="#FF0000"><?php echo $row_voteSummary['voteSUM']; ?></font>,最高票数:<font color="#FF0000"><?php echo $row_voteSummary['voteMAX']; ?></font></font></td>
</tr>
<tr>
<td align="center"><form action="function_del.p