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

📄 addproduct.asp

📁 基于IIS+ASP的
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="error.asp"-->
<%
'johnson code
user=session("user")
pwd=session("pwd")
chkuser user,pwd
pid=request("idd")
idd=request("pid")
icount=request("icount")
stat=int(request("state"))
'response.Write(icount)
'response.Write("--------")

 if request("title")="" then
      showerr  "产品名必须填写!","product.asp?idd="&idd&"pid"&pid
	  response.End()
 else
  if request("price")="" then
     showerr "价格必须填写!" ,"product.asp?idd="&idd&"pid"&pid
	  response.End()
  else
   dim nr
   dim title
   dim sj

   title=request.form("title")
			zde0=request.form("price")
   pd=request("pd")
   idno=request("idno")
   sj=now()
   if pd="" then
      sql="insert into product(title,addtime,class,state,zde0) values('"&title&"','"&sj&"',"&idd&","&stat&",'"&zde0&"')"
   else
      sql="update product set title='"&title&"', zde0='"&zde0&"',addtime='"&sj&"',state="&stat&",class="&idd&" where id="&idno 
   end if	  
   conn.execute sql  

  end if
  end if
   sql="select top 1 * from product order by id desc"
   set rs=conn.execute(sql)
 if pd="" then
     response.Redirect("productimage.asp?img=1&idno="&rs("id")&"&idd="&pid&"&pid="&idd)
 else
     showok "修改信息成功!","productlist.asp?idd="&pid&"&pid="&idd  'products
 end if
     rs.close
	 set rs=nothing
 	 conn.close
 set conn=nothing 
 %>

⌨️ 快捷键说明

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