📄 product_modify.asp
字号:
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
if session("AdminName")="" then
response.redirect "index.asp"
end if
%>
<!--#include file="inc/conn.inc"-->
<link href="admin_style.css" rel="stylesheet" type="text/css">
<%
set rs=server.createobject("adodb.recordset")
sql="select * from product"
rs.open sql,conn,1,3
act=request("act")
if act="upd" then
product_id=request("product_id")
product_title=request("product_title")
product_title_fan=request("product_title_fan")
product_title_en=request("product_title_en")
product_class_id=request("product_class_id")
img=request("img")
product_content=request("product_content")
product_content_fan=request("product_content_fan")
product_content_en=request("product_content_en")
rs("product_title")=product_title
rs("product_title_fan")=product_title_fan
rs("product_title_en")=product_title_en
rs("product_class_id")=product_class_id
rs("img")=img
rs("product_content")=product_content
rs("product_content_fan")=product_content_fan
rs("product_content_en")=product_content_en
rs.update
%>
<script language=javascript>
<!--
alert('修改成功!');
window.location="product_list.asp";
//-->
</script>
<%
response.end
end if
%>
<%
set res=server.createobject("adodb.recordset")
Sql="select * from product where product_id="&request("product_id")&""
res.open sql,conn,1,1
%>
<table width="100%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#326598" bordercolordark="#ffffff">
<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="?act=upd">
<INPUT name=upfile type=hidden onchange=return(OnUpFile()) value="<%=request("product_id")%>">
<INPUT name=upfile2 type=hidden onchange=return(OnUpFāile2()) value="">
<input type="hidden" name="product_id" value="<%=res("product_id")%>">
<tr background="image/tile_sub.gif">
<td height="28" colspan="3"> 修改新闻</td>
</tr>
<tr>
<td width="8%">* 标题:</td>
<td colspan="2"><input name="product_title" value="<%=res("product_title")%>" class="input" size="30">
繁体:<input name="product_title_fan" value="<%=res("product_title_fan")%>" class="input" size="30">
英文:<input name="product_title_en" value="<%=res("product_title_en")%>" class="input" size="30">
</td>
</tr>
<tr>
<td valign="top">* 分类:</td>
<td colspan="2"><select name="product_class_id" id="product_class_id" title="请选择类别">
<% set rs=server.createobject("adodb.recordset")
sql="select * from product_class"
rs.open sql,conn,1,1
do while not rs.eof
%>
<option value="<%=rs("product_class_id")%>" <%if res("product_class_id")=rs("product_class_id") then response.write "selected"%>><%=rs("product_class_z")%></option>
<% rs.movenext
loop
rs.close
set rs=nothing
%>
</select></td>
</tr>
<tr>
<td valign="top">* 图片:</td>
<td width="18%"><INPUT name=img value="<%=res("img")%>" class="input"></td>
<td width="74%"><iframe marginwidth=0 framespacing=0 marginheight=0 frameborder=0 width="350" height=25 src="picture.asp"></iframe></td>
</tr>
<tr>
<td valign="top"> </td>
<td colspan="2"><font color="#FF0000">修改图片,先删除前面图片名再从新上传;如无须修改图片请不要删除、上传!</font></td>
</tr>
<tr>
<td valign="top">* 内容:</td>
<td colspan="2"><textarea name="product_content" style="display:none"><%=res("product_content")%></textarea>
<IFRAME ID="eWebEditor1" SRC="eWebEditor/ewebeditor.asp?id=product_content&style=s_newssystem" FRAMEBORDER="0" SCROLLING="no" WIDTH="700" HEIGHT="300"></IFRAME></td>
</tr>
<tr>
<td valign="top">* 繁体:</td>
<td colspan="2"><textarea name="product_content_fan" style="display:none"><%=res("product_content_fan")%></textarea>
<IFRAME ID="eWebEditor1" SRC="eWebEditor/ewebeditor.asp?id=product_content_fan&style=s_newssystem" FRAMEBORDER="0" SCROLLING="no" WIDTH="700" HEIGHT="300"></IFRAME></td>
</tr>
<tr>
<td valign="top">* 英文:</td>
<td colspan="2"><textarea name="product_content_en" style="display:none"><%=res("product_content_en")%></textarea>
<IFRAME ID="eWebEditor1" SRC="eWebEditor/ewebeditor.asp?id=product_content_en&style=s_newssystem" FRAMEBORDER="0" SCROLLING="no" WIDTH="700" HEIGHT="300"></IFRAME></td>
</tr>
<tr align="center">
<td height="39" colspan="3"><input type="submit" name="Submit" value=" 提 交 " class="input">
<input type="reset" name="Submit2" value=" 重 置 " class="input"></td>
</tr>
</form>
</table>
<%
res.close
set res=nothing
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -