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

📄 upproductclass.asp

📁 OA最新破解2008版 全新 破解 希望大家用着舒服
💻 ASP
字号:
<!--#include file="../../conn/dbconn2.asp"-->
<!--#include file="../../inc/safe.asp"-->
<!--#include file="../../inc/config.asp"-->
<%
  Response.Buffer = true
  Response.ExpiresAbsolute=now()-1
  Response.Expires=0
  Response.CacheControl="no-cache"
%>
<%
'if Not ChkPost then 
'response.redirect ("../../login/chklogin.asp?login=4")
'response.end
'end if

if session("flag")<>1 then 
response.Redirect("../../login/login1.asp")
response.end
end if
%>
<%
cmd=Replace_Text(request("cmd"))

if cmd="add" then
bigclassname=Replace_Text(request.form("bigclassname"))
if bigclassname="" then
response.write"<SCRIPT language=JavaScript>alert('输入的内容不能为空!');"
response.write"this.location.href='addclass.asp';</SCRIPT>"
response.end
end if
set rs=server.createobject("adodb.recordset")
sql="select * from productclass where gsid="&session("id")&" and bigclassname='"&bigclassname&"'"
rs.open sql,conn,1,3
if not (rs.eof and rs.bof) then
response.write"<SCRIPT language=JavaScript>alert('对不起,已存在此产品系列!');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end 
else
rs.addnew
rs("gsid")=session("id")
rs("bigclassname")=bigclassname
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write"<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>"
response.write"<meta HTTP-EQUIV=refresh Content='1;url=addclass.asp'>"
response.write"<table border=0 cellspacing=0 width=100% cellpadding=0 height=418>"
response.write"<tr><td valign='middle' align='center'>"
response.write"<b>恭喜您,该产品系列名称已经添加成功!<a href='addclass.asp'>返回</a></b>"
response.write"</td></tr></table>"
end if
end if

if cmd="del" then
if Chkrequest(request("bigclassid")) then
bigclassid=request("bigclassid")
else
response.write"<SCRIPT language=JavaScript>alert('提交的参数非法,请返回!');"
response.write"this.location.href='addclass.asp';</SCRIPT>"
response.end 
end if
conn.execute("delete from productclass where bigclassid="&bigclassid&" and gsid="&session("id")&"")
conn.execute("delete from productclass_1 where bigclassid="&bigclassid&" and gsid="&session("id")&"")
set rs=conn.execute("select picture from productshow where bigclassid="&bigclassid&" and gsid="&session("id")&"")
if not(rs.eof and rs.bof) then
set fs=server.CreateObject("scripting.filesystemobject")
do while not rs.eof
filepath=newspic&rs("picture")
filepath=server.MapPath(filepath)
if fs.FileExists(filepath) and rs("picture")<>"nopicture.gif" then
     fs.DeleteFile filepath,true
end if
rs.movenext
loop
set fs=nothing
end if
rs.close
set rs=nothing
conn.execute("delete from productshow where bigclassid="&bigclassid&" and gsid="&session("id")&"")
conn.close
set conn=nothing
response.write"<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>"
response.write"<meta HTTP-EQUIV=refresh Content='1;url=addclass.asp'>"
response.write"<table border=0 cellspacing=0 width=100% cellpadding=0 height=418>"
response.write"<tr><td valign='middle' align='center'>"
response.write"<b>该产品系列已经删除成功!<a href='addclass.asp'>返回</a></b>"
response.write"</td></tr></table>"
end if 

if cmd="up" then
if Chkrequest(request("bigclassid")) then
bigclassid=request("bigclassid")
else
response.write"<SCRIPT language=JavaScript>alert('提交的参数非法,请返回!');"
response.write"this.location.href='addclass.asp';</SCRIPT>"
response.end 
end if
bigclassname=Replace_Text(request.form("bigclassname"))
if bigclassname="" then
response.write"<SCRIPT language=JavaScript>alert('输入的内容不能为空!');"
response.write"this.location.href='addclass.asp';</SCRIPT>"
response.end
end if
set rs1=server.createobject("adodb.recordset")
sql1="select * from productclass where gsid="&session("id")&" and bigclassname='"&bigclassname&"' and bigclassid<>"&bigclassid&""
rs1.open sql1,conn,1,3
if not rs1.eof then
response.write"<SCRIPT language=JavaScript>alert('对不起,和已存在产品系列同名!');"
response.write"this.location.href='addclass.asp';</SCRIPT>"
response.end 
else
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from productclass where bigclassid="&bigclassid&" and gsid="&session("id")&""
rs.open sql,conn,1,3
rs("bigclassname")=bigclassname
rs.update
rs.close
set rs=nothing
rs1.close
set rs1=nothing
conn.close
set conn=nothing
response.write"<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>"
response.write"<meta HTTP-EQUIV=refresh Content='1;url=addclass.asp'>"
response.write"<table border=0 cellspacing=0 width=100% cellpadding=0 height=418>"
response.write"<tr><td valign='middle' align='center'>"
response.write"<b>恭喜您,该产品系列名称已经修改成功!<a href='addclass.asp'>返回</a></b>"
response.write"</td></tr></table>"
end if
end if
%>

⌨️ 快捷键说明

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