📄 hyfw_d_03_04.asp
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--#include file="function/m_conn.asp"-->
<%
if len(session("login_name"))=0 then
%>
<script language="javascript">
alert("您没有权限访问,请登陆!")
window.location="index.asp"
</script>
<%
end if
if request.QueryString("id")<>"" then
id=request.QueryString("id")
end if
%>
<%
if request.Form("method")="submit" then
artid=request.Form("artid")
proname=request.Form("proname")
cataid=request.Form("cataid")
Introducev=request.Form("Introducev")
postcode=request.Form("postcode")
image=request.Form("image")
set rs=server.CreateObject("adodb.recordset")
if artid="" then '增加记录
sqlo="select * from Products"
rs.open sqlo,conn,3,3
rs.addnew
rs("proname")=proname
rs("cataid")=cataid
rs("Introducev")=Introducev
rs("postcode")=postcode
rs("image")=image
rs.update
rs.close
set rs=nothing
'response.Redirect("hyfw_list.asp")
%>
<script language="javascript">
alert("添加成功!")
window.location="hyfw_list.asp"
</script>
<%
else
sqpl="select * from Products where proid="&artid&""
rs.open sqpl,conn,3,3
rs("proname")=proname
rs("cataid")=cataid
rs("Introducev")=Introducev
rs("postcode")=postcode
rs("image")=image
rs.update
rs.close
set rs=nothing
'response.Redirect("hyfw_d_03_04.asp")
%>
<script language="javascript">
alert("修改成功!")
window.location="hyfw_list.asp"
</script>
<%
end if
end if
%>
<!--#include file="../../config.asp"--><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=ZXLCompanyStr%>后台管理服务在线</title>
<link href="RLimages/user.css" rel="stylesheet" type="text/css">
</head>
<body>
<table cellpadding="0" cellspacing="1">
<form name="addpro" method="post" action="hyfw_d_03_04.asp">
<%
if id<>"" then
set oRst=server.CreateObject("adodb.recordset")
SQL1="SELECT * FROM Products where proid="&id&""
oRst.open sql1,conn,1,1,1
if oRst.EOF AND oRst.BOF Then
Response.Write("<div class=""b-12"">暂时没有数据</div>")
Else
proname=oRst("proname")
cataid=oRst("cataid")
Introducev=oRst("Introducev")
postcode=oRst("postcode")
image=oRst("image")
oRst.close
set oRst=nothing
end if
end if
%>
<tr bgcolor="#C3E7F9">
<td width="174" height="25" align="center" valign="middle" bgcolor="#F0F4FB" class="b-12">所需积分:</td>
<td width="806" height="25" bgcolor="#F0F4FB"><select name="cataid" id="cataid">
<option value="0">请选择积分范围</option>
<%
set iRs=server.CreateObject("adodb.recordset")
sql2="select * from procata order by pro_id"
iRs.open sql2,conn,1,1
do while not iRs.eof
%>
<option value="<%=iRs("cata_name")%>" <%if iRs("cata_name")=cataid then response.Write "selected"%>><%=iRs("cata_name")%></option>
<%
iRs.movenext
loop
iRs.close
set iRs=nothing
%>
</select> <font color="#ff0000"> *</font> 请先进入积分设置里添加相应积分范围</td>
</tr>
<tr bgcolor="#C3E7F9">
<td height="25" align="center" valign="middle" bgcolor="#F0F4FB" class="b-12">奖品名称:</td>
<td height="25" bgcolor="#F0F4FB"><input name="proname" type="text" id="proname" value="<%=proname%>" maxlength="50"></td>
</tr>
<tr bgcolor="#C3E7F9">
<td height="25" align="center" bgcolor="#F0F4FB" class="b-12" vvalign="middle">奖品介绍:</td>
<td height="25" bgcolor="#F0F4FB"><textarea name="Introducev" cols="30" rows="5" id="Introducev"><%=Introducev%></textarea>
</td>
</tr>
<tr bgcolor="#C3E7F9">
<td height="25" align="center" valign="middle" bgcolor="#F0F4FB" class="b-12">邮寄代号:</td>
<td height="25" bgcolor="#F0F4FB"><input name="postcode" type="text" id="postcode" value="<%=postcode%>" maxlength="20"></td>
</tr>
<tr bgcolor="#C3E7F9">
<td height="25" align="center" valign="middle" bgcolor="#F0F4FB" class="b-12"><a href="../upload/<%=image%>" target="_blank">奖品图片</a>:</td>
<td height="25" bgcolor="#F0F4FB"><input name="image" type="text" id="image" value="<%=image%>" maxlength="50" readonly>
<a href="#" onClick="MyWindow=window.open('js/upload.asp?formname=addpro&editname=image&uppath=../../upload/&filelx=jpg','MyWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=420,height=150');"><img src="RLimages/img.gif" width="20" height="20" border="0" align="absBottom" class="coolButton"></a></td>
</tr>
<tr bgcolor="#C3E7F9">
<td height="40" colspan="2" align="center" bgcolor="#F0F4FB"> <%=id%><input name="artid" type="hidden" id="artid" value="<%=id%>">
<input name="method" type="hidden" id="method" value="submit">
<input type="submit" value=" 确 定 " name="cmdok"> <input type="reset" value=" 重 填 " name="cmdReset"></td>
</tr></form>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -