还是不行啊
我把代码做了精简贴出来,无论怎么的都不写入,用response.write""每项(共六项)都能显示出正确的结果!
response.write""&user&"、"&bfdate&"、"&pos&"、"&pic&"、"&cause&"、"&bfuser&""
<!--#include file="Admin_check.asp"-->
<%On Error Resume Next
Select Case Request.querystring("Action")
case"setp"
dim js1,prname,jzrs,jname,jid,jzname,jzid,jzpic,jzpicurl,jz1,jz2,jz3,jz4,jz5,jz6,jz7,jz8,jz9,jz10,jzdata,i,jzpicurl1
%>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#F4F6FC" width="100%">
<%prname=replace(request.form("setpname"),"'","''")
if prname="" then%>
<form action="adminright_jzsetp.asp?action=setp" method="POST"><br><br>
<tr>
<td class=td2 width="100%" bgcolor="#F4F6FC" height="28">
<p style="margin: 4">用户奖章设置</p></td></tr>
<td width="100%" height="28"><P style="MARGIN: 5px">请输入用户名:<input type="text" name="setpname" size="20"></p><P style="MARGIN: 5px"><input type="submit" value=" 确 定 " name="B1"> <input type="reset" value=" 重 置 " name="B2"></p></td></tr>
</form>
<%
else
set js1=conn.execute("select [jzdata] from [KK_user] where name='"&prname&"'")
if not js1.eof then
%>
<form action="adminright_jzsetp.asp?action=savepr" method="post">
<tr>
<td colspan=10 align="center">
你给?<font color="#FF00FF"><%=prname%></font>?<select size=1 name="pos">
<option value="颁发">颁发</option>
<option value="摘除">摘除</option>
</select>
了一枚<select size=1 name="jzwhy">
<%
set jzrs=conn.execute("select jzname,jzid from KK_jzdata")
response.write "<option value=0>请选择勋章</option>"
do while not jzrs.eof
jzname=jzrs("Jzname")
response.write "<option value="&jzrs("Jzid")
response.write ">"&jzname&"</option>"
jzrs.movenext
loop
jzrs.close
set jzrs=nothing
%>
</select>
勋章,执行理由是:<input type="text" name="upwhy" size=50></td>
</tr>
<tr><td colspan="10" align="center">
<input name="submit" type=submit value="更 新"><input size=45 name="picurl" type=hidden value="<%=jzpic%>">
<input size=45 name="jid" type=hidden value="<%=jid%>"><input size=45 name="prname" type=hidden value="<%=prname%>"></td></tr>
</form>
<%
else
call Alert("·该用户不存在!·返回重新填写")
end if
end if%>
</table>
<%
case"savepr"
'将事件写入数据库
dim pos,pic,bfdate,cause,user,bfuser,ttrs
bfdate=now()
pos=Request.Form("pos")
pic=Request.Form("jzwhy")
cause=Request.Form("upwhy")
user=Request.Form("prname")
bfuser=bbs94kk.myname
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath("Data/tttooe.asp")
set ttrs=server.CreateObject("adodb.recordset")
sql="select * from KK_jzlog"
ttrs.open sql,conn,1,3
ttrs.addnew
ttrs("jz_pos")=pos
ttrs("jz_level")=pic
ttrs("jz_date")=bfdate
ttrs("jz_why")=cause
ttrs("jz_owner")=user
ttrs("jz_user")=bfuser
ttrs.update
set ttrs=nothing
conn.close
set conn=nothing
call alert("·更新用户奖章成功。")
%>
<%
Sub Alert(message)
message = replace(message,"'","\'")
Response.Write ("<script LANGUAGE='javascript'>alert('" & message & "');window.location.href='adminright_jzsetp.asp?action=setp';</script>")
Response.End
End Sub
end select%>
[[it] 本帖最后由 thbwn 于 2008-2-21 22:17 编辑 [/it]]