xg.asp
来自「一个关于房产的asp程序」· ASP 代码 · 共 192 行
ASP
192 行
<!--#include file="const.asp"-->
<!--#include file="check.asp"-->
<!--#include file="conn.asp"-->
<%'On Error Resume Next
set rs=server.createobject("adodb.recordset")
set rs=conn.execute("select title,kg,overtime from class where id="&request("id"))
title=rs("title")
kg=rs("kg")
overtime=cstr(rs("overtime"))
overtime=formatdatetime(overtime)
years=year(overtime)
months=month(overtime)
days=day(overtime)
hours=hour(overtime)
minutes=minute(overtime)
seconds=second(overtime)
rs.close
sql="select * from vote where class="&request("id")&" order by id"
rs.open sql,conn,3,1
dscount=rs.recordcount
'Response.Write Err.description
style=request("style")
%>
<head>
<link rel="stylesheet" type="text/css" href="STYLE.CSS">
<title></title>
</head>
<body bgcolor="#D5D5D5">
<div align="center">
<center>
<table bgcolor="#e8e8e8" border="0" width="600" bordercolorlight="#000000" cellspacing="0" cellpadding="0" bordercolordark="#FFFFFF" style="border-left: 2 solid #82C130; border-right: 2 solid #82C130" height="374">
<tr>
<td width="746" height="30" background="l1.gif">
<!--#include file="menu.asp"-->
</td>
</tr>
<tr>
<td width="744" height="349" valign="top">
<form method="POST" action="savevote.asp?id=xg&classid=<%=request("id")%>">
<div align="center">
<table border="0" width="70%" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td width="100%" colspan="2" height="18"></td>
</tr>
<tr>
<td width="100%" colspan="2" height="36">标题:<input type="text" name="title" size="38" style="BORDER-BOTTOM: #FFFFFF 1px double; BORDER-LEFT: #FFFFFF 1px double; BORDER-RIGHT: #FFFFFF 1px double; BORDER-TOP: #FFFFFF 1px double; BACKGROUND: #93CF43 COLOR: #000000; FONT-SIZE: 9pt" value="<%=title%>"></td>
</tr>
<tr>
<td width="100%" colspan="2" height="30">方式:<input type="radio" value="radio" name="style" <%if style="radio" then%>checked<%end if%>>单选
<input type="radio" value="checkbox" name="style" <%if style="checkbox" then%>checked<%end if%>>多选</td>
</tr>
<tr>
<td width="100%" colspan="2" height="30">状态:<input type="radio" name="kg" value="0"<%if kg=0 then%> checked<%end if%>>开 <input type="radio" name="kg" value="1"<%if kg=1 then%> checked<%end if%>>关</td>
</tr>
<tr>
<td width="100%" colspan="2" height="30">结束时间:<select size="1" name="years">
<option value="0"<%if cstr(years)="0" then%> selected<%end if%>>0</option>
<option value="2003"<%if cstr(years)="2003" then%> selected<%end if%>>2003</option>
<option value="2004"<%if cstr(years)="2004" then%> selected<%end if%>>2004</option>
<option value="2005"<%if cstr(years)="2005" then%> selected<%end if%>>2005</option>
<option value="2006"<%if cstr(years)="2006" then%> selected<%end if%>>2006</option>
</select>年<select size="1" name="months">
<option value="1"<%if cstr(months)="1" then%> selected<%end if%>>1</option>
<option value="2"<%if cstr(months)="2" then%> selected<%end if%>>2</option>
<option value="3"<%if cstr(months)="3" then%> selected<%end if%>>3</option>
<option value="4"<%if cstr(months)="4" then%> selected<%end if%>>4</option>
<option value="5"<%if cstr(months)="5" then%> selected<%end if%>>5</option>
<option value="6"<%if cstr(months)="6" then%> selected<%end if%>>6</option>
<option value="7"<%if cstr(months)="7" then%> selected<%end if%>>7</option>
<option value="8"<%if cstr(months)="8" then%> selected<%end if%>>8</option>
<option value="9"<%if cstr(months)="9" then%> selected<%end if%>>9</option>
<option value="10"<%if cstr(months)="10" then%> selected<%end if%>>10</option>
<option value="11"<%if cstr(months)="11" then%> selected<%end if%>>11</option>
<option value="12"<%if cstr(months)="12" then%> selected<%end if%>>12</option>
</select>月<select size="1" name="days">
<%for i=1 to 31
response.write "<option value='"&i&"'"
if cstr(days)=cstr(i) then
response.write " selected"
end if
response.write ">"&i&"</option>"
next%>
</select>日
<select size="1" name="hours">
<%for i=1 to 23
response.write "<option value='"&i&"'"
if cstr(hours)=cstr(i) then
response.write " selected"
end if
response.write ">"&i&"</option>"
next%>
</select>:<select size="1" name="minutes">
<option value="00">00</option>
<%for i=1 to 59
if i<10 then
response.write "<option value='0"&i&"'"
if cstr(minutes)=cstr(i) then
response.write " selected"
end if
response.write ">0"&i&"</option>"
else
response.write "<option value='"&i&"'"
if cstr(minutes)=cstr(i) then
response.write " selected"
end if
response.write">"&i&"</option>"
end if
next%>
</select>:<select size="1" name="seconds">
<option value="00">00</option>
<%for i=1 to 59
if i<10 then
response.write "<option value='0"&i&"'"
if cstr(seconds)=cstr(i) then
response.write " selected"
end if
response.write ">0"&i&"</option>"
else
response.write "<option value='"&i&"'"
if cstr(seconds)=cstr(i) then
response.write " selected"
end if
response.write">"&i&"</option>"
end if
next%>
</select></td>
</tr>
<%do while not rs.eof
%>
<tr>
<td width="56%" height="30">选择:<input type="text" name="xg" size="20" style="BORDER-BOTTOM: #FFFFFF 1px double; BORDER-LEFT: #FFFFFF 1px double; BORDER-RIGHT: #FFFFFF 1px double; BORDER-TOP: #FFFFFF 1px double; BACKGROUND: #93CF43 COLOR: #000000; FONT-SIZE: 9pt" value="<%=rs("vote")%>"></td>
<td width="44%" height="30"><INPUT TYPE="hidden" name="yc" value="<%=rs("id")%>">条行柱风格:<select name="color" style="font-size:12px" size="1">
<option value="poll.gif" selected>风格一</option>
<option value="poll1.gif">风格二</option>
<option value="poll2.gif">风格三</option>
<option value="poll3.gif">风格四</option>
<option value="poll4.gif">风格五</option>
<option value="poll5.gif">风格六</option>
<option value="poll6.gif">风格七</option>
<option value="poll7.gif">风格八</option>
<option value="poll8.gif">风格九</option>
<option value="poll9.gif">风格十</option>
<option value="poll10.gif">风格十一</option>
<option value="poll11.gif">风格十二</option>
</select></td>
</tr>
<%rs.movenext
loop
for i=1 to 4
%>
<tr>
<td width="56%" height="30">选择:<input type="text" name="xz" size="20" style="BORDER-BOTTOM: #FFFFFF 1px double; BORDER-LEFT: #FFFFFF 1px double; BORDER-RIGHT: #FFFFFF 1px double; BORDER-TOP: #FFFFFF 1px double; BACKGROUND: #93CF43 COLOR: #000000; FONT-SIZE: 9pt"></td>
<td width="44%" height="30">条行柱风格:<select name="color" style="font-size:12px" size="1">
<option value="poll.gif" selected>风格一</option>
<option value="poll1.gif">风格二</option>
<option value="poll2.gif">风格三</option>
<option value="poll3.gif">风格四</option>
<option value="poll4.gif">风格五</option>
<option value="poll5.gif">风格六</option>
<option value="poll6.gif">风格七</option>
<option value="poll7.gif">风格八</option>
<option value="poll8.gif">风格九</option>
<option value="poll9.gif">风格十</option>
<option value="poll10.gif">风格十一</option>
<option value="poll11.gif">风格十二</option>
</select></td>
</tr>
<%next%>
</table>
</div>
<p align="center"><input type="submit" value="提交" name="B1" style="BORDER-BOTTOM: #FFFFFF 1px double; BORDER-LEFT: #FFFFFF 1px double; BORDER-RIGHT: #FFFFFF 1px double; BORDER-TOP: #FFFFFF 1px double; BACKGROUND: #93CF43 COLOR: #000000; FONT-SIZE: 9pt"> <input type="reset" value="全部重写" name="B2" style="BORDER-BOTTOM: #FFFFFF 1px double; BORDER-LEFT: #FFFFFF 1px double; BORDER-RIGHT: #FFFFFF 1px double; BORDER-TOP: #FFFFFF 1px double; BACKGROUND: #93CF43 COLOR: #000000; FONT-SIZE: 9pt"></p>
</form>
</td>
</tr>
<tr>
<td width="746" height="18" background="l2.gif"></td>
</tr>
</table>
</center>
</div>
<p align="center"><font color="#FF0000">注意:结束时间的</font><font color="#0000FF">年份</font><font color="#FF0000">如果为</font><font color="#0000FF">0</font><font color="#FF0000">,则表示不限定投票结束时间。</font><%rs.close
set rs=nothing
conn.close
set conn=nothing
%></p>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?