%@ LANGUAGE="VBSCRIPT" %>
<%
DbPath = SERVER.MapPath("../database/topboy-2002.mdb")
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DbPath
%>
<%
if request("browsdopage") <> "" then
if isnumeric(request("browsdopage")) = false then
response.write"
"
Response.write " 您好,页码请您填写数字!"
Response.write "请按此返回..."
Response.end
end if
end if
result=Instr(1,request.ServerVariables("http_referer"),request.servervariables("http_host"),1)
if result = 0 or result = null then
response.redirect "manager-login.asp"
end if
if session("sid") <> "top" then
response.redirect "manager-login.asp"
end if
session("baseadd") = request.ServerVariables("http_referer")
set rs=server.createobject("adodb.recordset")
sql="select * from topboy_product where productname like '%"&request("bname")&"%' order by id DESC"
rs.open sql,conn,adOpenkeyset,adlockoptimistic,adcmdtext
If request("imagemodi.x") <> "" Then
count = rs.recordcount
for j=1 to count
i = request("hidden")
productname = request("productname"&j)
price = cstr(request("price"&j))
iprice = cstr(request("iprice"&j))
freight = cstr(request("freight"&j))
h = request("hidden"&j)
id = trim(ccur(h))
' response.write id
' response.write j
' response.end
sqltext="update topboy_product set productname = '"& productname &"',price = '"& price &"',iprice = '"& iprice &"',freight = '"& freight &"' where ccur(id) = "& id &""
' response.write sqltext
' response.end
conn.execute sqltext
rs.movenext
next
response.redirect session("baseadd")
else
%>
|
||||||||||
所选数据已经删除,按此返回...
<%
i=request("hidden")
For p = 1 To i
if request("name"&p) <> "" then
sql="delete FROM topboy_product WHERE id = "& request("name"&p) &""
' response.write sql
' response.write "
"
' response.write request("name"&p)
' response.end
conn.Execute sql
end if
Next
end if
end if
end if
%>