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

📄 ad_changehw.asp

📁 商品订单管理:商品分类管理 添加与修改商品 管理订单 投诉订单 反馈信息 商品留言管理 管理网站用户:管理用户 管理后台管理员 新闻公告管理:新闻添加(支持图片新闻) 修改删除 首页公告设置 网站常规
💻 ASP
字号:
<!--#include file="conn.asp"-->
<%
if session("admin_name")="" then
    response.redirect "ad_login.asp"
end if
set rs=server.createobject("adodb.recordset")
%><head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<link href=img/css.css rel=STYLESHEET type=text/css>
</head>
<%
dim hw_id ,hw_name,hw_cash,hw_pic,hw_date,sort_id,hw_content,hw_content2,he_views,he_buys,chubsh,zhuang,hw_sn,company,yeshu,kaiben,isbn,pifa,daili,data
set rs=server.createobject("adodb.recordset")
sql="select * from hw where hw_id="&request("hw_id") 
rs.open sql,conn,1,1
      hw_id=rs("hw_id")
      hw_name=rs("hw_name")
      hw_cash=rs("hw_cash")
      hw_pic=rs("hw_pic")
      hw_date=rs("hw_date")
hw_sn=rs("hw_sn")
      sort_id=rs("sort_id")
Nsort_id=rs("Nsort_id")
tuijian=rs("tuijian")
      hw_content=rs("hw_content")
	  hw_content2=rs("hw_content2")

        hw_content=replace(hw_content,"&nbsp;"," ")
        hw_content=replace(hw_content,"<Br>",chr(13)&chr(10)) 
		
        hw_content2=replace(hw_content2,"&nbsp;"," ")
        hw_content2=replace(hw_content2,"<Br>",chr(13)&chr(10))

      hw_views=rs("hw_views")
      hw_buys=rs("hw_buys")
      chubsh=rs("chubsh")
      zhuang=rs("zhuang")
      hw_sn=rs("hw_sn")
      company=rs("company")
      yeshu=rs("yeshu")
      kaiben=rs("kaiben")
      isbn=rs("isbn")
pifa=rs("pifa")
daili=rs("daili")
data=rs("data")
rs.close
%>
<%
if request("action")="save" then
    hw_name=request("hw_name")
    hw_content=request("hw_content")
	hw_content2=request("hw_content2")
    hw_cash=request("hw_cash")
    hw_pic=request("hw_pic")
	chubsh=request("chubsh")
	zhuang=request("zhuang")
	yeshu=request("yeshu")
	isbn=request("isbn")
    sort_id=request("sort_id")
Nsort_id=request("Nsort_id")
tuijian=request("tuijian")
    company=request("company")
   pifa=request("pifa")
daili=request("daili")
hw_sn=request("hw_sn")
data=request("data")
kaiben=request("kaiben")
    if not(isnumeric(hw_cash)) then
        errmsg="<br>"+"<li>Not number price"
        founderr=true
    end if
    if hw_name="" then
        errmsg=errmsg+"<br>"+"<li>Not null Name"
        founderr=true
    end if
    if hw_content="" then
        errmsg=errmsg+"<Br>"+"<li>Not null detail"
        founderr=true
    end if
    if sort_id="" then
        errmsg=errmsg+"<br>"+"<li>Not null Sort"
        founderr=true
    end if
   
    
    if hw_pic="" then hw_pic="img/noimage.gif"
    
    if founderr=true then
        response.write errmsg
        response.write "<br>"
        response.write "<a href=ad_addhw.asp>Back</a>"
        response.end
    else
        
        
        hw_content=server.htmlencode(hw_content)
        hw_content=replace(hw_content," ","&nbsp;")
        hw_content=replace(hw_content,chr(13)&chr(10),"<Br>") 
		
		hw_content2=server.htmlencode(hw_content2)
        hw_content2=replace(hw_content2," ","&nbsp;")
        hw_content2=replace(hw_content2,chr(13)&chr(10),"<Br>")
        
        hw_pic=server.htmlencode(hw_pic)    
        
        sql="select * from hw where hw_id="&request("hw_id")
        rs.open sql,conn,3,3
        rs("hw_name")=hw_name
        rs("hw_content")=hw_content
		rs("hw_content2")=hw_content2
        rs("hw_cash")=hw_cash
        rs("sort_id")=sort_id
       rs("company")=company
       rs("daili")=daili
       rs("pifa")=pifa
       rs("hw_sn")=hw_sn
	   rs("chubsh")=chubsh
	   rs("kaiben")=kaiben
	   rs("yeshu")=yeshu
	   rs("data")=data
	   rs("isbn")=isbn
	   rs("zhuang")=zhuang
        rs("hw_pic")=hw_pic
rs("Nsort_id")=Nsort_id
rs("tuijian")=tuijian
        rs.update
    end if
    response.write "OK!"
    response.write "<br>"
    response.write "<a href=ad_delhw.asp>Back</a>"
    rs.close
    

else
%>


  
<form name="form1" method="post" action="ad_changehw.asp?hw_id=<%=hw_id%>&action=save">
<table width="500" border="0" cellspacing="0" cellpadding="0" align="center" height="100" bgcolor="F5EFE7">
  <tr> 
    <td height="175"> 
    
        <table border="0" width="100%" cellspacing="1">
          <tr> 
            <td colspan="2"><font color="#FF0000">Product Name</font> 
              <input type="text" name="hw_name" size="20" class=input value="<%=hw_name%>">
              <font color="#FF0000"> &nbsp;&nbsp;&nbsp;&nbsp; 1st-Sort </font> 
              <select class="smallSel" name="sort_id" size="1">
                <%
	dim rs,sql
	dim content,sel
	sort_id=request("sort_id")
	Nsort_id=request("Nsort_id")
 	set rs=server.createobject("adodb.recordset")
  	sql="select * from sort"
 	rs.open sql,conn,1,1
	if rs.eof and rs.bof then
		response.write "Not record."
	else
	do while not rs.eof
        if sort_id=cstr(rs("sort_id")) then
               sel="selected"
        else
               sel=""
        end if	
	response.write "<option " & sel & " value='"+CStr(rs("sort_ID"))+"' name=sort_id>"+rs("sort_name")+"</option>"+chr(13)+chr(10)
	rs.movenext
    	loop
	end if
	rs.close
%>
              </select>
              &nbsp;&nbsp;<font color="#FF0000">2st-Sort </font>: 
              <select name="Nsort_id" size="1">
                <%
  	sql="select * from Nsort"
 	rs.open sql,conn,1,1
	if rs.eof and rs.bof then
		response.write "Not record."
	else
        do while not rs.eof
        if Nsort_id=cstr(rs("Nsort_id")) then
               sel="selected"
        else
               sel=""
        end if	
        response.write "<option " & sel & " value='" +  Cstr(rs("Nsort_id")) + "'>" + rs("Nsort_name") + "</option>"
        rs.MoveNext
        Loop
	end if
        rs.close
%>
              </select>
              ** </td>
          </tr>
          <tr> 
            <td colspan="2"><font color="#FF0000">Market Price</font> 
              <input type="text" name="pifa" size="7" class=input value="<%=pifa%>">
              RMB <font color="#FF0000">&nbsp;&nbsp;&nbsp;&nbsp;Member Price</font> 
              <input type="text" name="hw_cash" size="7" class=input value="<%=hw_cash%>">
              RMB <font color="#FF0000">&nbsp;&nbsp;&nbsp;&nbsp;VIP Price </font> 
              <input type="text" name="daili" size="7" class=input value="<%=daili%>">
              RMB </td>
          </tr>
          <tr> 
            <td height="5" colspan="2"> 
              <hr noshade size="1">
            </td>
          </tr>
          <tr> 
            <td width="25%"><font color="#000000">Isbn</font> 
              Isbn<input type="text" name="hw_sn" size="10" class=input value="<%=hw_sn%>">
            </td>
            <td width="75%"><font color="#000000">Company</font> 
              <input type="text" name="chubsh" size="30" class=input value="<%=chubsh%>">
            </td>
          </tr>
          <tr> 
            <td width="25%"><font color="#000000">Size</font> 
              <input type="text" name="yeshu" size="10" class=input value="<%=yeshu%>">
            </td>
            <td width="75%"><font color="#000000">Production Date</font> 
              <input type="text" name="data" size="24" class=input value="<%=data%>">
              eg:2002-10-10</td>
          </tr>
          <tr> 
            <td width="25%"><font color="#000000">Color</font> 
              <input type="text" name="kaiben" size="10" class=input value="<%=kaiben%>">
            </td>
            <td width="75%"><font color="#000000">Points</font> 
              <input type="text" name="isbn" size="30" class=input value="<%=isbn%>">
            </td>
          </tr>
          <tr> 
            <td height="5" colspan="2"> 
              <hr noshade size="1">
            </td>
          </tr>
          <tr> 
            <td colspan="2"> <font color="#000000">Packing</font> 
              <input type="text" name="zhuang" size="30" class=input value="<%=zhuang%>">
            </td>
          </tr>
          <tr> 
            <td colspan="2"><font color="#FF0000">Brief Introduction</font></td>
          </tr>
          <tr> 
            <td valign="top" colspan="2">
            <textarea rows="3" name="hw_content" cols="50" class=input><%
            hw_content=replace(hw_content,"<br>",chr(13))
            hw_content=replace(hw_content,"&nbsp;"," ")    
            response.write hw_content%></textarea>
            </td>
          </tr>
          <tr> 
            <td valign="top" colspan="2"><font color="#FF0000">Introduction</font></td>
          </tr>
          <tr> 
            <td valign="top" colspan="2"> 
              <textarea rows="10" name="hw_content2" cols="50" class=input><%
            hw_content2=replace(hw_content2,"<br>",chr(13))
            hw_content2=replace(hw_content2,"&nbsp;"," ")    
            response.write hw_content2%></textarea>
            </td>
          </tr>
          <tr> 
            <td colspan="2"> <font color="#FF0000">Photo:</font> 
              <input type="text" name="hw_pic" size="46" class=input value="<%=hw_pic%>"></td>
          </tr>
          <tr> 
            <td colspan="2" height="24">Recommend or not 
              <input type="radio" name="tuijian" value="-1">
              Yes 
              <input type="radio" name="tuijian" value="0" checked>
              No</td>
          </tr>
          <tr align="center"> 
            <td colspan="2"> 
              <input type="submit" name="Submit" value="Change">
            </td>
          </tr>
        </table>

    </td>
  </tr>
</table>      </form>

     <%
end if
set rs=nothing
conn.close
set conn=nothing
%>

⌨️ 快捷键说明

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