<?php require_once('../../include/class.inc.php'); ?>
<?php
if($_POST[vote]=="yes")
{
	$v_name=htmlspecialchars($_POST["VoteName"]);
	$v_class=htmlspecialchars($_POST["class"]);
if($v_name!="" && $v_class!="") {
	
	$sql="insert into voteclass(VoteName,class) value('$v_name','$v_class')";
//	echo $sql;
//exit;
	$result=$my->data_work($sql);
	if($result){
	echo ("<script type='text/javascript'>alert('添加主题成功！！');location.href='vote_class.php';</script>");
	}
	else{
	echo ("<script type='text/javascript'>alert('添加主题失败！！');location.href='vote_class.php';</script>");
	}
	exit();
	}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link rel="stylesheet" href="../inc/css.css" type="text/css" />
<title>无标题文档</title>
<style type="text/css">
<!--
.STYLE5 {color: #FFFFFF; font-weight: bold; }
.STYLE6 {color: #FF0000}
-->
</style>
</head>

<body>
<form method="post" name="form1" action="add_class.php">
  <table width="1052" border="0" align="center" cellpadding="2" cellspacing="1" bordercolor="#799AE1" class="tableBorder">
    <tbody>
      <tr bgcolor="#CCCCCC">
        <td height="20" colspan="2" bgcolor="#4455aa"><div align="center" class="STYLE5">
            <div align="left">添加投票分类</div>
        </div></td>
      </tr>
      <tr bgcolor="#DEE5FA">
        <td align="center" class="txlrow"><div align="center">主题</div></td>
        <td align="center" class="txlrow"><div align="left">
            <input name="VoteName" type="text" id="VoteName" size="40" />
            <input name="vote" type="hidden" value="yes" />
            <span class="STYLE6">*</span></div></td>
      </tr>
      <tr bgcolor="#DEE5FA">
        <td align="center" class="txlrow"><div align="center">选项</div></td>
        <td width="943" align="center" class="txlrow"><div align="left">
          <input type="radio" name="class" checked="checked" id="radio" value="radio" />&nbsp;单选
		  <input type="radio" name="class" id="radio" value="checkbox" />&nbsp;多选
</td>
      </tr>

      <tr bgcolor="#DEE5FA">
        <td align="center" class="txlrow">&nbsp;</td>
        <td align="center" class="txlrow"><div align="left">
            <input type="submit" name="button2" id="button2" value="提交" />
            <input type="reset" name="button" id="button" value="重置" />
        </div></td>
      </tr>
    </tbody>
  </table>
</form>

</body>
</html>
