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

📄 jingcai.asp

📁 一套很早的多用户电子商务程序
💻 ASP
字号:
<%@ language="vbscript"%>
<%response.Expires = 0%>
<!--#include file="conn.asp"-->
<!--#include file="check.asp"-->
<%
set rs=server.createobject("adodb.recordset")				   				
%>
<html>
<head>
<STYLE>BODY {
	FONT-SIZE: 10pt
}
TD {
	FONT-SIZE: 10pt; 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">
<%
up=request("up")
select case up
case "news_up"
   call news_up
case "news_add"
   call news_add
case "jingcai_add_save"
   call jingcai_add_save
case "jingcai_up"
   call jingcai_up
case "jingcai_up_save"
   call jingcai_up_save
case "jingcai_del"
   call jingcai_del
case else
   call jingcai_show
end select
%>
<%sub jingcai_show%>
<div align="center"> <br>
  <strong><font color="#0000FF">管理精彩店铺</font></strong> (<a href="?up=news_add">添加精彩店铺</a>)<br>
    </div>
<table width="634" border="1" align="center" cellpadding="0" cellspacing="0" bordercolorlight="#0000FF" bordercolordark="#FFFFFF">
  <tr bgcolor="#00CCFF"> 
    <td width="84"> 
      <div align="center">连接网店名称</div></td>
    <td width="164"> 
      <div align="center">连接网站logo图片</div></td>
    <td width="284"><div align="center">连接URL地址</div></td>
    <td width="92"> 
      <div align="center">操  作</div></td>
  </tr>
  <%
sqltext="select * from jingcai order by id desc"
rs.open sqltext,conn,1,1
if rs.eof then
response.write "<tr><td colspan=4><div align=center>你还没有添加精彩店铺</div></td></tr>"
else
do while not (rs.eof or rs.bof)
%>
  <tr> 
    <td>&nbsp;<img src="../IMAGES/we3.gif" width="12" height="12"> <%=rs("l_name")%></td>
    <td><div align="center"><img src="<%=rs("l_pic")%>"  border="0"></div></td>
    <td>&nbsp;<a href="<%=rs("l_url")%>" target="_blank"><%=rs("l_url")%></a></td>
    <td><div align="center"><a href="?up=jingcai_up&id=<%=rs("id")%>">修改</a> | <a href="?up=jingcai_del&id=<%=rs("id")%>" onClick="return confirm('你确认删除该条精彩店铺吗?')">删除</a></div></td>
  </tr>
  <%
rs.movenext
loop
end if
%>
</table>
<br>
 
<%end sub%>
<%sub news_add%>
<form name="form1" method="post" action="?up=jingcai_add_save">
  <table width="446" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr> 
      <td height="44" colspan="2"><div align="center"><strong><font color="#0000FF">添加精彩店铺</font></strong> 
          (<a href="jingcai.asp">管理精彩店铺</a>)</div></td>
    </tr>
    <tr> 
      <td height="29"><div align="center">连接网店名称:</div></td>
      <td><input name="l_name" type="text" size="20"></td>
    </tr>
    <tr> 
      <td width="122" height="33"><div align="center">连接logo图片:</div></td>
      <td width="324"><input name="l_pic" type="text" size="20">
         <a href="#" onClick="window.open('../upload_pic.asp?FM_name=form1&editname=l_pic&filepath=IMAGES','','status=yes,scrollbars=no,top=20,left=110,width=420,height=165')"><font color="#0000FF">上传图片</font></a></td>
    </tr>
    <tr> 
      <td height="29"><div align="center">连接url地址:</div></td>
      <td><input name="l_url" type="text" value="http://" size="40"></td>
    </tr>
    <tr> 
      <td height="35" colspan="2"> <div align="center"> 
          <input type="submit" name="Submit" value="确认添加">
        </div></td>
    </tr>
    <tr> 
      <td colspan="2">&nbsp;</td>
    </tr>
  </table>
</form>

<%end sub%>
<%sub jingcai_up
sqltext="select * from jingcai where id="&request("id")
rs.open sqltext,conn,1,1
if rs.eof then
response.write "此条精彩店铺已被删除或无存在"
else
%>

<form name="form1" method="post" action="?up=jingcai_up_save&id=<%=rs("id")%>">
  <table width="446" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr> 
      <td height="44" colspan="2"><div align="center"><strong><font color="#0000FF">修改精彩店铺</font></strong> 
          (<a href="jingcai.asp">管理精彩店铺</a>)</div></td>
    </tr>
    <tr> 
      <td height="29"><div align="center">连接网店名称:</div></td>
      <td><input name="l_name" type="text" value="<%=rs("l_name")%>" size="20"></td>
    </tr>
    <tr> 
      <td width="122" height="33"><div align="center">连接logo图片:</div></td>
      <td width="324"><input name="l_pic" type="text" value="<%=rs("l_pic")%>" size="20">
         <a href="#" onClick="window.open('../upload_pic.asp?FM_name=form1&editname=l_pic&filepath=IMAGES','','status=yes,scrollbars=no,top=20,left=110,width=420,height=165')"><font color="#0000FF">上传图片</font></a></td>
    </tr>
    <tr> 
      <td height="29"><div align="center">连接url地址:</div></td>
      <td><input name="l_url" type="text" value="<%=rs("l_url")%>" size="40"></td>
    </tr>
    <tr> 
      <td height="35" colspan="2"> <div align="center"> 
          <input type="submit" name="Submit" value="确认修改">
        </div></td>
    </tr>
    <tr> 
      <td colspan="2">&nbsp;</td>
    </tr>
  </table>
</form>

<%
end if
end sub%>
<%
sub jingcai_add_save
call checkfrom
sqltext="select * from jingcai "
rs.open sqltext,conn,3,3
rs.addnew
rs("l_name")=request.form("l_name")
rs("l_pic")=request.form("l_pic")
rs("l_url")=request.form("l_url")
rs("shop_name")=P_shop
rs.update
response.write"<script>alert('精彩店铺添加成功!');window.location.href='link.asp'</script>"
end sub
sub checkfrom
if request.form("l_name")="" then
Response.Write ("<script>alert('对不起!精彩店铺网站名称为空!');javascript:history.back(1)</script>")
elseif request.form("l_pic")="" then
Response.Write ("<script>alert('对不起!连接logo图片不能为空!');javascript:history.back(1)</script>")
elseif request.form("l_url")="" then
Response.Write ("<script>alert('对不起!连接url地址不能为空!');javascript:history.back(1)</script>")
response.end()
end if
end sub
%>

<%
sub jingcai_up_save
call checkfrom
sqltext="select * from jingcai "
rs.open sqltext,conn,3,3
rs("l_name")=request.form("l_name")
rs("l_pic")=request.form("l_pic")
rs("l_url")=request.form("l_url")
rs.update
response.write"<script>alert('精彩店铺修改成功!');window.location.href='jingcai.asp'</script>"
end sub
%>
<%
sub jingcai_del
conn.execute "delete * from link where shop_name='"&jingcai_up&"'and id="&request("id")
response.write"<script>alert('成功删除了一条精彩店铺!');window.location.href='jingcai.asp'</script>"
end sub
%>

</body>
</html>

⌨️ 快捷键说明

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