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

📄 xiugai_vote.asp

📁 投票网站
💻 ASP
字号:
<!--#include file="Conn.asp" -->
<!--#include file="page.asp" -->
<!--#include file="seeion.asp" -->
<!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" />
<title>投票管理</title>
<LINK href="images/style.css" type=text/css rel=stylesheet>
<script>
if(window.name != "bencalie"){
    location.reload();
    window.name = "bencalie";
}
else{
    window.name = "";
}
</script>
</head>
<body>
<% 
exec="select * from fl where id="& request.QueryString("id")  
set rc=server.createobject("adodb.recordset") 
rc.open exec,conn,1,1 
%>
<% 
exec="select * from vote where id="& request.QueryString("id") 
set rs=server.createobject("adodb.recordset") 
rs.open exec,conn,1,1 
%>
<table width="800" border="0" align="center" cellpadding="6" cellspacing="1">
  <tr>
    <td><a href="admin_index.asp">后台首页</a> <a href="LoginOut.asp">安全退出系统</a></td>
  </tr>
</table>
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="28" bgcolor="#990000"><span style=" width:760px; background-color:#990000; font-size:14px; font-weight:bold; color:#FFFFFF; padding:6px;">※ 新增投票 ※</span></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellpadding="6" cellspacing="1">
    <form action="add_vote.asp" method="post"  name="myform"/>
      <tr>
        <td width="16%">姓名:</td>
        <td width="84%"><label>
          <input name="name" type="text" class="input" size="30" />
        <input name="fl"  type="hidden" class="input" size="30" value="<%=rc("id")%>" /></label></td>
      </tr>
      <tr>
        <td>上传相片:</td>
        <td><label>
          <iframe src="uploadindex.asp?sort=img" frameborder="0" width="400" height="30" scrolling="No" marginwidth="0"></iframe>
        </label></td>
      </tr>
      <tr>
        <td>相片地址:</td>
        <td><input name="img" type="text" class="input" size="40" /></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td><label>
          <input type="submit" name="button" id="button" value="提交数据" class="btn"/>
        </label></td>
      </tr>
    </table></td>
  </tr></form>
</table>
<br />
<table width="800" border="0" align="center" cellpadding="0" cellspacing="1">
  <tr>
    <td height="28" bgcolor="#990000"><span style=" width:760px; background-color:#990000; font-size:14px; font-weight:bold; color:#FFFFFF; padding:6px;">※ <%=rc("fl")%> ※</span></td>
  </tr>
  <tr>
    <td></td>
  </tr>
  
  <tr>
    <td> 
<%	
set rs=server.createobject("adodb.recordset") 
exec="select * from [vote] where fl="& request.QueryString("id") &" order by id desc  " 
rs.open exec,conn,1,1 
if rs.eof then
response.Write "&nbsp;暂无投票内容!"
else
rs.PageSize =20 '每页记录条数
iCount=rs.RecordCount '记录总数
iPageSize=rs.PageSize
maxpage=rs.PageCount 
page=request("page")
if Not IsNumeric(page) or page="" then
page=1
else
page=cint(page)
end if
if page<1 then
page=1
elseif  page>maxpage then
page=maxpage
end if
rs.AbsolutePage=Page
if page=maxpage then
x=iCount-(maxpage-1)*iPageSize
else
x=iPageSize
end if	
%>
<% 
for i=1 to rs.pagesize 
j=i 
if j mod 2=0 then 
bg="#F7F7F7" 
else 
bg="#FFFFFF" 
end if 
%> 
<tr bgcolor=<%=bg%>> 
<td> 
<table width="100%" border="0" cellpadding="5" cellspacing="0" bgcolor="#F7F7F7">

 <tr>
    <td width="9%" bgcolor="#EBEBEB"><div align="center">姓名</div></td>
    <td width="20%"><a href="<%=rs("img")%>" target="_blank"><%=rs("name")%></a></td>
    <td width="11%" bgcolor="#EBEBEB"><div align="center">当前票数</div></td>
    <td width="43%"><%=rs("piaoshu")%> 票</td>
    <td width="17%"><div align="center">
      <input type="button" name="Submit" value="删除当前记录" onclick="javascript:if(confirm('确定删除此投票?删除后不可恢复!')){window.location.href='del_vote.asp?id=<%=rs("id")%>';}else{history.go(0);}"  class="btn"/>
    </div></td>
  </tr>
</table>
<% 
rs.movenext 
if rs.eof then exit for 
next 
%> 
<%
end if
%></td>
  </tr>
<tr bgcolor=<%=bg%>>
  <td height="28"><%'以下显示分页
 call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>")
rs.close
set rs=nothing
%></td>
</tr>
</table>

<br />
<table width="800" border="0" align="center" cellpadding="6" cellspacing="1">
  <tr>
    <td bgcolor="#990000"><div align="center"><span style=" width:760px;background-color:#990000; font-size:12px;  color:#FFFFFF; padding:6px;">程序作者:咬牙棒 QQ:310151921 更多原创小程序请登陆:w78.net.cn </span></div></td>
  </tr>
</table>
<br />
</body>
</html>

⌨️ 快捷键说明

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