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

📄 pinglun_up.asp

📁 一套很早的多用户电子商务程序
💻 ASP
字号:
<%@ language="vbscript"%>
<%response.Expires = 0%>
<!--#include file="conn.asp"--><!--#include file="Check.asp"-->
<%
up=request.QueryString("up")
Product_name=request("Product_name")
pinglunid=request("pinglunid")
Product_id=request("Product_id")
if up="del" then
call del
else
call huifu
end if
sub del
	set rs=server.CreateObject("adodb.recordset")
	rs.open "select * from Product where Product_id='"&Product_id&"'",conn,1,3
			rs("pingji")=rs("pingji")-1
			rs("pingjizong")=rs("pingjizong")-request("pingji")
			rs.update
			rs.close
			set rs=nothing
			'删除评论
			conn.execute "delete * from shop_pinglun where pinglunid="&pinglunid
			response.redirect "PingLun.asp?Product_id="&Product_id&"&Product_name="&Product_name
	  rs.close:set rs=nothing
end sub
%>
<%sub huifu
set rs=server.createobject("adodb.recordset")
sql="select * from shop_pinglun where pinglunid="&pinglunid
rs.open sql,conn,3,3
	if request("Submit")="确 认" then
	rs("huifu")=HTMLEncode2(request.form("huifu"))
	rs.update
	response.redirect "PingLun.asp?Product_id="&Product_id&"&Product_name="&Product_name
	end if
%>
<html>
<head>
<STYLE>BODY {
	FONT-SIZE: 9pt
}
TD {
	FONT-SIZE: 9pt; LINE-HEIGHT: 150%
}
A {
	TEXT-DECORATION: none
}
A:hover {
	TEXT-DECORATION: underline
}
</STYLE>
<script language="javascript"></script>
<title>后台管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body background="../pic/user/bg.jpg" leftmargin="0" topmargin="0">
<form name="form1" method="post" action="pingLun_up.asp?up=huifu&pinglunid=<%=pinglunid%>">
  <table width="559" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr> 
      <td height="43"> 
        <div align="center"><font color="#0000FF"><strong>答复评论</strong></font></div></td>
    </tr>
    <tr> 
      <td ><div align="center">
          <textarea name="huifu" cols="60" rows="8"><%=rs("huifu")%></textarea>
        </div></td>
    </tr>
    <tr> 
      <td height="40"><div align="center">
          <input type="submit" name="Submit" value="确 认">
		  <input type="hidden" name="Product_id" value="<%=Product_id%>">
		  <input type="hidden" name="Product_name" value="<%=Product_name%>">
        </div></td>
    </tr>
  </table>
</form>
</body>
</html>
<%end sub%>
<%function HTMLEncode2(fString)
	'fString = Replace(fString, CHR(13), "")
	'fString = Replace(fString, CHR(10) & CHR(10), "</P><P>")
	'fString = Replace(fString, CHR(10), "<BR>")
    fString = replace(fString, ">", "&gt;")
    fString = replace(fString, "<", "&lt;")

    fString = Replace(fString, CHR(32), "<I></I>&nbsp;")
    fString = Replace(fString, CHR(9), "&nbsp;")
    fString = Replace(fString, CHR(34), "&quot;")
    fString = Replace(fString, CHR(39), "&#39;")
    fString = Replace(fString, CHR(13), "")
    fString = Replace(fString, CHR(10) & CHR(10), "</P><P> ")
    fString = Replace(fString, CHR(10), "<BR> ")
	HTMLEncode2 = fString
end function%>

⌨️ 快捷键说明

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