<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<%dim id,i
id=request.QueryString("id")
if not isnumeric(id) then 
response.write"<script>alert(""非法访问!"");location.href=""../index.asp"";</script>"
response.end
else
if not isinteger(id) then
response.write"<script>alert(""非法访问!"");location.href=""../index.asp"";</script>"
else
set rs_shjia=server.CreateObject("adodb.recordset")
strshjia="select * from shjia where shjiaid="&id
rs_shjia.open strshjia,conn,1,1
if rs_shjia.bof and rs_shjia.eof then
response.write"<script>alert(""非法访问!"");location.href=""../index.asp"";</script>"
else
shjname=rs_shjia("name")
shjianame=rs_shjia("username")
shjiaid=rs_shjia("shjiaid")
lx=rs_shjia("lx")
end if
end if
end if
%>
  <%
  if lx=0 then
  response.write "<font color=red>&nbsp对不起，您是目前是免费用户，不能使用此项功能！请马上升级成为<a href=../gbook.asp>C型用户</a></font>"
  end if
    if lx=1 or lx=2 then
  %>
<html><head><title>添加投票</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../images/css.css" rel=stylesheet>
<SCRIPT language="JavaScript" type="text/javascript">
function IsDigit()
{
  return ((event.keyCode >= 48) && (event.keyCode <= 57));
}
</script>
</head>
<body>
<table class="tableBorder" width="90%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<form method="POST" action="voteSave.asp?shjiaid=<%=rs_shjia("shjiaid")%>">
<tr> 
<td colspan="4" align="center" background="../images/admin_bg_1.gif"><b><font color="#ffffff">添加新的投票</font></b></td>
</tr>
<tr bgcolor="#E8F1FF"> 
<td width="20%" align="right">投票主题：</td>
<td width="80%"> 
<input type="text" name="Title" size="40" style="font-family: 宋体; font-size: 9pt"></td>
</tr>
<%for i=1 to 8%>
<tr bgcolor="#E8F1FF"> 
<td align="right">选 项 <%=i%>：</td>
<td> 
<input type="text" name="select<%=i%>" size="25" style="font-family: 宋体; font-size: 9pt">
票 数：<input type="text" name="answer<%=i%>" size="5" value="0" style="font-family: 宋体; font-size: 9pt" onKeyPress="event.returnValue=IsDigit();" ></td>
</tr>
<%next%>
<tr bgcolor="#E8F1FF">
<td></td>
<td>
<input type="hidden" value="add" name="act">
<input type="submit" value=" 添 加 " name="cmdok" style="font-family: 宋体; font-size: 9pt">&nbsp;
<input type="reset" value=" 取 消 "  name="cmdcancel" style="font-family: 宋体; font-size: 9pt">
<input type="button" value=" 返 回 " onclick="javascript:history.go(-1)" style="font-family: 宋体; font-size: 9pt">&nbsp;
</td>
</tr>
</form>
</table>
</body></html>
<%end if%>