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

📄 admin_xgbook.asp

📁 在线报价程序V0.1 免费版: 1、后台添加产品 2、后台分类 3、后台添加友情连接 4、会员管理 5、客户留言 6、在线订单 7、捆绑了《忠网广告管理系统》 8、公告发布、管理 管理员:admin
💻 ASP
字号:
<!--#include file="conn.asp"-->
<%
set rs=server.CreateObject("ADODB.recordset")
rs.open "index",conn,3,3
name=rs("name")
rs.close
set rs=nothing
%>
<title><%=name%>购物--管理系统</title>
<link rel="stylesheet" href="style.css" type="text/css">
<meta NAME=GENERATOR Content=""Microsoft FrontPage 4.0"" CHARSET=GB2312>
<BODY leftmargin="0" bottommargin="0" rightmargin="0" topmargin="0" marginheight="0" marginwidth="0">
<%
if request("action")="xg" then

   server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
   server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
   if mid(server_v1,8,len(server_v2))<>server_v2 then
	  response.write "<script language=JavaScript>{window.location='error.asp'}</script>"
	  response.end
   end if
   
   set rs=server.CreateObject("ADODB.recordset")
   sql="select * from gys where http='"&request("http")&"'"
   rs.open sql,conn,3,3
   zzs=rs("zzs")
   rs.close
   set rs=nothing

   set rs=server.CreateObject("ADODB.recordset")
   sql="select * from products where id="&request("id")
   rs.open sql,conn,3,3
   if rs.eof and rs.bof then
     response.write "<script language=JavaScript>{window.location='error.asp'}</script>"
     response.end
   else
     rs("zlb")=request("zlb")
	 rs("name")=request("name")
	 rs("typed")=request("typed")
	 rs("zzs")=zzs
	 rs("http")=request("http")
	 rs("jiage")=request("jiage")
	 if request("tjjg")<>"" then
	 rs("tjjg")=request("tjjg")
	 end if
	 rs("kucun")=request("kucun")
	 rs("zhongl")=request("zhongl")
	 if instr(1,request("image"),"pic/")>=1  then
	 rs("image")=request("image")
	 else
	 rs("image")="pic/"&request("image")
	 end if
	 rs("content")=request("content")
	 rs("canshu")=request("canshu")
	 rs("qita")=request("qita")
	 rs("meiti")=request("meiti")
	 rs("qudong")=request("qudong")
	 rs.update
	 item=rs("item")
	 rs.close
	 set rs=nothing
   set rs=server.CreateObject("ADODB.recordset")
   sql="select * from pic where item='"&item&"' and image='"&request("images")&"'"
   rs.open sql,conn,3,3
     if instr(1,request("image"),"pic/")>=1  then
	 rs("image")=request("image")
	 else
	 rs("image")="pic/"&request("image")
	 end if
	 rs.update
	 response.write "<script language=JavaScript>{window.alert('商品信息修改成功!');window.location='admin_xgbook.asp?id="&request("id")&"'}</script>"
	 response.end
     rs.close
     set rs=nothing
   end if
end if
%>
<%
if request("action")="tejia" then

   set rs=server.CreateObject("ADODB.recordset")
   sql="select * from products where id="&request("id")
   rs.open sql,conn,3,3
   rs("tejia")=True
   rs.update
   response.write "<script language=JavaScript>{window.alert('特价商品处理完毕!');window.location='admin_xgbook.asp?id="&request("id")&"'}</script>"
   response.end
   rs.close
   set rs=nothing

end if
%>
<%
if request("action")="qxtj" then

   set rs=server.CreateObject("ADODB.recordset")
   sql="select * from products where id="&request("id")
   rs.open sql,conn,3,3
   rs("tejia")=False
   rs.update
   response.write "<script language=JavaScript>{window.alert('特价商品取消完毕!');window.location='admin_xgbook.asp?id="&request("id")&"'}</script>"
   response.end
   rs.close
   set rs=nothing

end if
%>
<br>
<%
set rs=server.CreateObject("ADODB.recordset")
sql="select * from products where id="&request("id")
rs.open sql,conn,3,3
if rs.eof and rs.bof then
   response.write "<script language=JavaScript>{window.location='error.asp'}</script>"
   response.end
else
%>
<script language="JAVAScript">
function check_copy()
{
  document.xgbook.http.value = document.xgbook.zzs.value;
}
</script>
<table width="95%" border="0" cellspacing="1" cellpadding="3" align="center" class="tableBorder">
<%if rs("tejia")=True then%>
<input type="button" style="CURSOR:hand" onclick="window.location='admin_xgbook.asp?action=qxtj&id=<%=rs("id")%>'" value="取消特价商品">
<%else%>
<input type="button" style="CURSOR:hand" onclick="window.location='admin_xgbook.asp?action=tejia&id=<%=rs("id")%>'" value="做为特价商品">
<%end if%>
<input type="button" style="CURSOR:hand" onclick="window.location='admin_pic.asp?item=<%=rs("item")%>'" value="上传商品图片">
<form action="admin_xgbook.asp?action=xg" method="post" name="xgbook">
  <tr> 
    <th width="100%" colspan="2" height="25">商品信息管理</th>
  </tr>
    <tr> 
    <td width="30%" height="25" class="forumrow">商品类别</td>
    <td width="70%" height="25" class="forumrow">
	大类:
	<%if rs("cp")=1 then%>IT产品<%else%>OA产品<%end if%>
	中类:
	<%set rs1=server.CreateObject("ADODB.recordset")
	sql="select * from lb where id="&rs("lb")
    rs1.open sql,conn,3,3%>
	<%=rs1("lb")%>
	<%rs1.close
	set rs1=nothing%>
	小类:
    <%set rs1=server.CreateObject("ADODB.recordset")
	sql="select * from zlb where lid="&rs("lb")
    rs1.open sql,conn,3,3%>
	  <select name="zlb">
	  <%do while not rs1.eof%>
      <option value="<%=rs1("id")%>" <%if rs1("id")=cstr(rs("zlb")) then%>selected<%end if%>><%=rs1("zlb")%></option>
	  <%
	  rs1.movenext
	  loop
	  rs1.close
	  set rs1=nothing
	  %>
      </select>
    </td>
  </tr>
  <tr> 
    <td width="30%" height="25" class="forumrow">商品编号</td>
    <td width="70%" height="25" class="forumrow"><font color="#ff0000"><%=rs("item")%></font></td>
    <input type="hidden" name="id" value="<%=rs("id")%>">
  </tr>
  <tr> 
    <td width="30%" height="25" class="forumrow">商品名称</td>
    <td width="70%" height="25" class="forumrow">
      <input name="name" size="40" value="<%=rs("name")%>" maxlength="50">
    </td>
  </tr>
  <tr>
    <td width="30%" height="25" class="forumrow">商品型号</td>
    <td width="70%" class="forumrow"> 
      <input name="typed" size="40" value="<%=rs("typed")%>" maxlength="50">
	</td>
  </tr>
  <tr>
    <td width="30%" height="25" class="forumrow">制 造 商</td>
    <td width="70%" class="forumrow"> 
     <%
	  set rs1=server.CreateObject("ADODB.recordset")
	  sql="select * from gys order by id"
	  rs1.open sql,conn,3,3
	  %>
      <select name="zzs" onchange="check_copy()">
	  <%do while not rs1.eof%>
      <option value="<%=rs1("http")%>" <%if rs("zzs")=rs1("zzs") then%>selected<%end if%>><%=rs1("zzs")%></option>
	  <%rs1.movenext
	  loop
	  rs1.close
	  set rs1=nothing
	  %>
      </select>
    </td>
  </tr>
  <tr>
    <td width="30%" height="25" class="forumrow">制造商网址</td>
    <td width="70%" class="forumrow"> 
      <input name="http" size="40" value="<%=rs("http")%>" maxlength="50">
    </td>
  </tr>
  <tr>
    <td width="30%" height="13" class="forumrow">商品价格</td>
    <td width="70%" class="forumrow"> 
      <input name="jiage" size="40" value="<%=rs("jiage")%>" maxlength="30">
    </td>
  </tr>
  <tr>
    <td width="30%" height="12" class="forumrow">特价价格</td>
    <td width="70%" class="forumrow"> 
      <input name="tjjg" size="40" value="<%=rs("tjjg")%>" maxlength="30"></td>
  </tr>
  <%if rs("tejia")=True then%>
  <%end if%>
  <tr>
    <td width="30%" height="25" class="forumrow">商品重量</td>
    <td width="70%" class="forumrow">
      <input name="zhongl" size="40" value="<%=rs("zhongl")%>" maxlength="20">
    </td>
  </tr>
  <tr>
    <td width="30%" height="25" class="forumrow">首页图片</td>
    <td width="70%" class="forumrow">
	<%if rs("image")="pic/none.gif" then%>
	<input name="image" size="40" value="<%if session("pic")="" then%>none.gif<%else%><%=session("pic")%><%end if%>"> 
    <a href="upload.asp?url=admin_xgbook.asp?id=<%=request("id")%>"><font color="#ff0000"> (图片上传)</font></a>
	<%else%>
      <input name="image" size="40" value="<%=rs("image")%>">
	<%end if%>
	<input type="hidden" name="images" value="<%=rs("image")%>">
    </td>
  </tr>
  <tr>
    <td width="30%" height="25" class="forumrow"><font color="#000000"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
	产 品 性 能 指 标</b></font></td>
    <td width="70%" class="forumrow" rowspan="4">
	<span style="cursor: hand;color:blue;font-size: 9pt" onClick="window.open('htmledit/editor.html','HTMLEditor','width=544,height=300,resizable=0,scrollbars=0,menubar=0,status=0');" Language="javascript">HTML 编辑器</span>
	<br>
      <textarea name="content" cols="107" rows="48"><%=rs("content")%></textarea>
     </td>
  </tr>
  <tr>
    <td width="30%" height="25" class="forumrow"> </td>
  </tr>
  <tr>
    <td width="30%" height="25" class="forumrow"> </td>
  </tr>
  <tr>
    <td width="30%" height="25" class="forumrow"> </td>
  </tr>
  <tr>
    <td width="30%" height="25" class="forumrow">联系方式</td>
    <td width="70%" class="forumrow">
      <textarea name="qudong" cols="40" rows="5"><%=rs("qudong")%></textarea>
    </td>
  </tr>
  <tr> 
    <td height="15" colspan="2" class="forumrow"> 
      <input type="submit" style="CURSOR:hand" value="修  改">
    </td>
  </tr>
 </form>
</table><br>
<%
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>

⌨️ 快捷键说明

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