谢谢帮助,不过运行不了
<%
if shenfen="1" or shenfen="3" then
if Not post_chk() Then
response.write"<script>alert('禁止从外部站点提交数据! ');location.replace('index.asp')</script>"
else
if request("action")="cj" then
set rs=server.createobject("adodb.recordset")
sqltext="select * from baoxiu where id=" & request("id")
rs.open sqltext,conn,3,3
if rs.eof then
response.write "没有找到数据"
else
dim iNull,i
iNull=false
For i=0 To 9
if i=0 Then
if rs("wxry")="" Then
iNull=true
end if
else
if rs("wxry"&i)="" Then
iNull=true
end if
end if
'更新记录到数据库
rs("wxry"&i)=realname
rs.update
rs.close
conn.close
response.redirect "weixiu.asp?action=sl1&bxid="&request("bxid")&"&wxly="&request("wxly")&"&wxfk=2"
end if
if request("action")="sl" then
set rs=server.createobject("adodb.recordset")
sqltext="select * from baoxiu where id=" & request("id")
rs.open sqltext,conn,3,3
'更新记录到数据库
rs("wxry")=realname
rs("weixiu")=request("wxfk")
rs("sfjr")=request("sfjr")
rs("wxtime")=now()
rs.update
rs.close
conn.close
response.redirect "weixiu.asp?action=sl1&bxid="&request("bxid")&"&wxly="&request("wxly")&"&wxfk=2"
end if
if request("action")="sl1" then
set rs2=server.createobject("adodb.recordset")
sqltext2="select * from jilu"
rs2.open sqltext2,conn,3,3
'更新记录到数据库
rs2.addnew
rs2("wxry")=realname
rs2("bxid")=request("bxid")
rs2("wxfk")=request("wxfk")
rs2("weixiu")=request("wxfk")
if request("wxly")="" then
rs2("wxly")="正在维修中,请耐心等待"
else
rs2("wxly")=request("wxly")
end if
rs2("wxtime")=now()
rs2.update
rs2.close
conn.close
response.write"<script>alert('受理成功! ');location.replace('index.asp?T=shouli')</script>"
end if
if request("action")="ok" then
set rs=server.createobject("adodb.recordset")
sqltext="select * from baoxiu where id=" & request("id")
rs.open sqltext,conn,3,3
'更新记录到数据库
rs("wxry")=realname
rs("weixiu")=request("wxfk")
rs("wxtime")=now()
rs("tjtime")=date()
rs.update
rs.close
conn.close
response.redirect "weixiu.asp?action=ok1&bxid="&request("bxid")&"&wxfk=1"
end if
if request("action")="ok1" then
set rs2=server.createobject("adodb.recordset")
sqltext2="select * from jilu"
rs2.open sqltext2,conn,3,3
'更新记录到数据库
rs2.addnew
rs2("wxry")=realname
rs2("bxid")=request("bxid")
rs2("wxfk")=request("wxfk")
rs2("weixiu")=request("wxfk")
rs2("wxtime")=now()
rs2.update
rs2.close
conn.close
response.write"<script>alert('维修成功! ');location.replace('index.asp?T=shouli')</script>"
end if
if request("action")="fq" then
if request("wxly")="" then
response.write "<script language=JavaScript>" & chr(13) & "alert('请输入放弃原因!');" & "history.back()" & "</script>"
response.End
end if
set rs=server.createobject("adodb.recordset")
sqltext="select * from baoxiu where id=" & request("id")
rs.open sqltext,conn,3,3
'更新记录到数据库
rs("weixiu")=request("wxfk")
rs("wxtime")=now()
rs.update
rs.close
conn.close
response.redirect "weixiu.asp?action=fq1&bxid="&request("bxid")&"&wxly="&request("wxly")&"&wxfk=0"
end if
if request("action")="fq1" then
set rs2=server.createobject("adodb.recordset")
sqltext2="select * from jilu"
rs2.open sqltext2,conn,3,3
'更新记录到数据库
rs2.addnew
rs2("wxry")=realname
rs2("bxid")=request("bxid")
rs2("wxfk")=request("wxfk")
rs2("weixiu")=request("wxfk")
rs2("wxly")=request("wxly")
rs2("wxtime")=now()
rs2.update
rs2.close
conn.close
response.write"<script>alert('成功放弃维修! ');location.replace('index.asp?T=shouli')</script>"
end if
end if
else
response.write"<script>alert('对不起,您没有权限! ');location.replace('index.asp')</script>"
end if
%>