<?php session_start(); include("../conn/conn.php");
if($_SESSION[admin_user]==true and $_SESSION[admin_pass]==true){
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>投票主题管理</title>
</head>

<body>
<table width="572" border="2" cellpadding="2" cellspacing="2" bordercolor="#FFFFFF" bgcolor="#FDAE2B">
  <tr>
    <td bgcolor="#FFFFFF"><table width="560" border="0" cellpadding="0" cellspacing="0">
<form name="form1" method="post" action="vote_subject_manage_ok.php" enctype="multipart/form-data">

  <tr bgcolor="#167BE3">
    <td width="126" height="30" align="right" bgcolor="#F4F2F3"><span class="style1">主题：</span></td>
    <td width="258" bgcolor="#F4F2F3"><input name="tb_vote_subject_name" type="text" id="tb_vote_subject_name" size="25" ></td>
    <td width="166" bgcolor="#F4F2F3">&nbsp;</td>
  </tr>
  <tr>
    <td height="49" align="right" class="style1">说明：</td>
    <td colspan="2"><textarea name="tb_vote_subject_text" cols="55" rows="5" id="tb_vote_subject_text"></textarea></td>
    </tr>
  <tr>
    <td height="30">&nbsp;</td>
    <td><input type="submit" name="Submit3" value="提交主题"></td>
    <td>&nbsp;</td>
  </tr>
</form>
</table></td>
  </tr>
</table>
<table width="572" border="0" cellpadding="0" cellspacing="0">
  <tr bgcolor="#CEE74A">
    <td width="318" height="25" align="center" class="style1">投票主题</td>
    <td width="138" height="30">&nbsp;</td>
    <td width="316" class="style1">删除主题</td>
  </tr>
  <?php 
  $query=mysql_query("select * from tb_vote_subject");
  while($row=mysql_fetch_array($query)){
  $rows2=$row[tb_vote_subject_name];
  ?>
  <tr>
    <td height="29" colspan="2" background="../images/bg_20.gif">&nbsp;&nbsp;<a href="vote_subject_manages.php?vote_subjectes=<?php echo $row[tb_vote_subject_name];?>" class="style2"><?php echo $row[tb_vote_subject_name];?></a> </td>
    <td background="../images/bg_201.gif" class="style2">&nbsp;&nbsp;<a href="delete_vote_subject.php?vote_subject=<?php echo $row[tb_vote_subject_name];?>">删除</a></td>
  </tr>
  <?php }?>
</table>
</body>
</html>
<?php }else{
	echo "<script>alert('您没有正确登录！');window.location.href='admin_enter.php';</script>";
}?>