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

📄 default.asp

📁 亿众购物系统 一套设计完善、高效的web商城解决方案
💻 ASP
字号:
<!--#include file="../Session.asp"-->
<% 
function judge(a,b)
  dim res 
  if instr(a,b)>0 then
   res ="checked"
  end if
  judge = res
end function
%>
<% 
function judges(a,b)
  dim ress 
  if (a=b) then
   ress ="selected"
  end if
  judges = ress
end function
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../../css/site.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="0">
  <tr align="center"> 
    <td height="50" colspan="6" class="tdstyle"><font color="#000000" size="3"><strong>精品图片</strong></font></td>
  </tr>
  <tr align="center"> 
    <td width="8%" height="25" class="tdstyle"><strong>编 号</strong></td>
    <td width="30%" class="tdstyle"><strong>图片地址</strong></td>
    <td width="30%" class="tdstyle"><strong>图片连接</strong></td>
    <td width="12%" class="tdstyle"><strong>显示页面</strong></td>
    <td width="10%" class="tdstyle"><strong>修 改</strong></td>
    <td width="10%" class="tdstyle"><strong>删 除</strong></td>
  </tr>
  <%Set rs = Server.CreateObject("ADODB.Recordset")
  sql="select * from SecondPic order by id desc"
  rs.open sql,conn,0,1
   do while not rs.eof%>
  <form name="form1" method="post" action="?Act=a">
    <tr> 
      <td height="20" align="center" class="tdstyle"><%=rs("id")%> <input name="id" type="hidden" id="id" value="<%=rs("id")%>"></td>
      <td class="tdstyle"> 
        <input name="Pic" type="text" class="input1" id="Pic" value="<%=rs("Pic")%>" size="25"></td>
      <td class="tdstyle"> <strong> 
        <input name="url" type="text" class="input1" id="url" value="<%=rs("url")%>" size="25">
        </strong></td>
      <td align="center" class="tdstyle"> 
        <%places=rs("BigId")%> 
        <select name="BigId" class="input1" id="BigId">
          <option value="0" <%=judges(places,"0")%>>默认(所有分类)</option>
          <%Set rs2 = Server.CreateObject("ADODB.Recordset")
		  sql="select * from BigClass order by BigId"
		  rs2.open sql,conn,0,1
		  do while not rs2.eof%>
          <option value="<%=rs2("BigId")%>"  <%=judges(places,rs2("BigId"))%>><%=rs2("BCName")%></option>
          <%rs2.movenext
		  loop
		  %>
        </select>
		</td>
      <td align="center" class="tdstyle">
	  <input name="Submit" type="submit" class="button2" value="修 改"></td>
      <td align="center" class="tdstyle">
	  <input name="Submit2" type="button" class="button2" value="删 除" onclick="if(confirm('您确定要删除吗?')) location.href='Default.asp?Act=c&id=<%=rs("id")%>'"></td>
    </tr>
  </form>
  <%rs.movenext
  loop%>
</table>

<form action="?Act=b" method="post" name="form" id="form">
  <table width="100%" border="0" align="center" cellpadding="1" cellspacing="0">
    <tr align="center"> 
      <td height="50" colspan="2" class="tdstyle"><font color="#000000" size="3"><strong>添加新图片</strong></font></td>
    </tr>
    <tr> 
      <td width="20%" align="right" class="tdstyle">图片地址:</td>
      <td width="80%" class="tdstyle"> 
        <input name="Pic" type="text" class="input1" id="Pic" size="25">
      </td>
    </tr>
    <tr> 
      <td align="right" class="tdstyle">上传图片:</td>
      <td class="tdstyle">  <iframe name="ad" frameborder=0 width=100% height=25 scrolling=no src=Up.asp></iframe></td>
    </tr>
    <tr> 
      <td align="right" class="tdstyle">图片连接:</td>
      <td class="tdstyle"> <input name="url" type="text" class="input1" id="url" size="25"></td>
    </tr>
    <tr> 
      <td align="right" class="tdstyle">显示页面:</td>
	  <td class="tdstyle"> 
        <select name="BigId" class="input1" id="BigId">
          <option value="0" selected>默认(所有分类)</option>
          <%Set rs2 = Server.CreateObject("ADODB.Recordset")
		  sql="select * from BigClass order by BigId"
		  rs2.open sql,conn,0,1
		  do while not rs2.eof%>
          <option value="<%=rs2("BigId")%>"><%=rs2("BCName")%></option>
          <%rs2.movenext
		  loop%>
        </select>注意:每个页面的图片总长度必须为746像素,否则会影响页面美观! 
		</td>
    </tr>
    <tr> 
      <td height="30" colspan="2" align="center" class="tdstyle"> <input name="Submit3" type="submit" class="button" value="提 交"> </td>
    </tr>
  </table>
</form>
<br><br>
<% Select case request("Act")
   case "a"
        conn.execute("Update SecondPic set Pic = '"&request("Pic")&"',url = '"&request("Url")&"',BigId = "&request("BigId")&" where id="&request("id")&"")
	    Response.redirect "Default.asp"
   case "b"
	    conn.execute("Insert into SecondPic(Pic,Url,BigId)values('"&request("Pic")&"','"&request("Url")&"',"&request("BigId")&")")
	    Response.redirect "Default.asp"
   case "c"
   conn.execute("Delete From SecondPic where id="&request("id")&"")
	    Response.redirect "Default.asp"
End Select
 %>
</body>
</html>

⌨️ 快捷键说明

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