?? changehw.asp
字號:
<% @ LANGUAGE="VBSCRIPT" %>
<%
if session("admin_name")="" then response.end
%>
<!--#include file="../inc/adconn.asp"-->
<!--#include file="../css.asp"-->
<%
dim hw_id ,hw_name,hw_cash,hw_pic,hw_date,sort_id,hw_content,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_pic2=rs("hw_pic2")
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_views=rs("hw_views")
hw_buys=rs("hw_buys")
chubsh=rs("chubsh")
zhuang=rs("zhuang")
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_cash=request("hw_cash")
'hw_pic=request("hw_pic")
'hw_pic2=request("hw_pic2")
hw_pic=request("upfile")
hw_pic2=request("upfile2")
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>圖書的價格應該為數字"
founderr=true
end if
if hw_name="" then
errmsg=errmsg+"<br>"+"<li>圖書名稱不能為空"
founderr=true
end if
if hw_content="" then
errmsg=errmsg+"<Br>"+"<li>圖書介紹不能為空"
founderr=true
end if
if sort_id="" then
errmsg=errmsg+"<bār>"+"<li>圖書類別不能為空"
founderr=true
end if
if founderr=true then
response.write errmsg
response.write "<br>"
response.write "<a href=addhw.asp>返回</a>"
response.end
else
hw_pic=server.htmlencode(hw_pic)
set rs=server.createobject("adodb.recordset")
sql="select * from hw where hw_id="&request("hw_id")
rs.open sql,conn,3,3
if hw_pic="" then hw_pic=rs("hw_pic")
if hw_pic2="" then hw_pic2=rs("hw_pic2")
rs("hw_name")=hw_name
rs("hw_content")=hw_content
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("hw_pic2")=hw_pic2
rs("Nsort_id")=Nsort_id
rs("tuijian")=tuijian
rs.update
end if
response.write "商品修改成功!"
response.write "<br>"
response.write "<a href=delhw.asp>返回</a>"
rs.close
else
%>
<SCRIPT language=javascript>
var upfile_obj;
var upfile_obj2;
function OnUpFile()
{
upfile_obj.src=upfile_obj.lowsrc;
upfile_obj.src=document.forms["form1"].upfile.value;
}
function OnUpFile2()
{
upfile_obj2.src=upfile_obj2.lowsrc;
upfile_obj2.src=document.forms["form1"].upfile2.value;
}
</SCRIPT>
<form name="form1" method="post" action="changehw.asp?hw_id=<%=hw_id%>&action=save">
<INPUT name=upfile type=hidden onchange=return(OnUpFile()) value="">
<INPUT name=upfile2 type=hidden onchange=return(OnUpFāile2()) value="">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Language" content="zh-cn">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<TABLE cellSpacing=1 cellPadding=0 width="540" align=center bgColor=#999999 border=0>
<TBODY>
<TR>
<TD width="735" bgcolor="f0f0f0" id=maintitleback>
<TABLE cellSpacing=0 cellPadding=3 width="100%" border=0>
<TBODY>
<TR>
<TD width="10"><IMG height=9 src="../../images/pics/nav_m.gif" width=8
border=0></TD>
<TD height="30" valign="bottom" id=maintitle>產品管理 ->產品修改 -><b>所有選項都必須填寫</b></TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
<TR>
<TD id=mainbg>
<TABLE cellSpacing=1 cellPadding=4 width="100%" border=0 height="351">
<TBODY>
<TR>
<TD height="30" noWrap background=../images/pics/tile_sub.gif id=titlemedium> <div align="center"><font color="#FFFFFF">產品分類</font></div></TD>
<TD height="30" noWrap background=../images/pics/tile_sub.gif id=titlemedium> <div align="center">
<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>
<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>
</div></TD>
<TD height="30" align=middle noWrap
background=../images/pics/tile_sub.gif id=titlemedium> <div align="center"><font color="#FFFFFF">產品名稱</font></div></TD>
<TD height="30" align=left noWrap
background=../images/pics/tile_sub.gif id=titlemedium> <p>
<input type="text" name="hw_name" size="20" class=input value="<%=hw_name%>">
</p></TD>
</TR>
<!TR>
<tr>
<TD bgColor=#ffffff height="30"> <div align="center"><font color="#FF0000">產品原價</font></div></TD>
<TD width=122 height="30" align=left bgColor=#ffffff> <font color=#333333>
<input type="text" name="pifa" size="10" class=input value="<%=pifa%>">
元</font></TD>
<TD align=middle bgColor=#ffffff height="30"> </TD>
<TD height="30" align="left" bgColor=#ffffff> </TD>
</TR>
<TR>
<TD height="30" align="center" bgColor=#ffffff>型號</TD>
<TD height="30" align=left bgColor=#ffffff>
<input type="text" name="chubsh" size="12" class=input value="<%=chubsh%>">
<div align="center"></div></TD>
<TD align=middle bgColor=#ffffff height="30"> <div align="center">成 份</div></TD>
<TD height="30" align="left" bgColor=#ffffff>
<input type="text" name="kaiben" size="10" class=input value="<%=kaiben%>">
</TD>
</TR>
<TR>
<TD align=middle bgColor=#ffffff height="30"> <div align="center">尺寸</div></TD>
<TD height="30" align="left" bgColor=#ffffff>
<input name="hw_sn" type="text" class=input id="hw_sn" style="FONT-SIZE: 12px; WIDTH: 110px" value="<%=hw_sn%>" size="9">
</TD>
<TD align=center bgColor=#ffffff height="30">聯系人</TD>
<TD height="30" align="left" bgColor=#ffffff>
<input name="isbn" type="text" class=input id="isbn" style="FONT-SIZE: 12px; WIDTH: 110px" value="<%=isbn%>" size="9"></TD>
</TR>
<TR>
<TD bgColor=#ffffff height="30"> <font color="#FF0000">產品簡介</font></TD>
<TD height="30" colspan="3" align=center bgColor=#ffffff>
<textarea name="hw_Content" style="display:none"><%=Server.HTMLEncode(trim(hw_content))%></textarea><IFRAME ID="eWebEditor1" SRC="../eWebEditor/ewebeditor.asp?id=hw_content&style=standard_coolblue" FRAMEBORDER="0" SCROLLING="no" WIDTH="550" HEIGHT="350"></IFRAME></TD>
</TR>
<TR>
<TD height="33" colspan="4" bgColor=#ffffff><table width="100%" border="0" cellspacing="0">
<tr>
<td>產品圖片:
<iframe name="ad" frameborder=0 width=100% height=50 scrolling=no src=upload.asp></iframe></td>
</tr>
</table></TD>
</TR>
<TR>
<TD height="30" colspan="4" bgColor=#ffffff> <div align="center">
<input type="radio" name="tuijian" value="-1">推薦此產品
<input type="radio" name="tuijian" value="0" checked>不推薦</div></TD>
</TR>
<TR>
<TD height="30" colspan="4" bgColor=#ffffff> <div align="center"><img src="../../images/pics/seperator.gif" width="359" height="1"></div></TD>
</TR>
<TR bgcolor="f0f0f0">
<TD height="30" colSpan=4 id=mainfoot>
<div align="center">
<table width="30%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="25"> <div align="center">
<input name=submit2 type=image src="../images/pics/s_button000.gif" alt=進入 align=absMiddle width="45" height="20" cache tppabs="">
</div>
</td>
</tr>
</table>
</div></TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
</TBODY>
</TABLE>
</form>
<%
end if
set rs=nothing
conn.close
set conn=nothing
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -