coverexcel.asp
资源名称:shop2.rar [点击查看]
上传用户:btntkt
上传日期:2021-04-16
资源大小:5296k
文件大小:3k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
DOS
- <!--#include file="conn.asp"-->
- <%
- dim cls
- if session("admin")="" then
- Response.Redirect("admin.asp")
- else
- if session("flag")<>"0" then
- cls = Instr(session("flag"), "excel")
- if cls <= 0 then
- %>
- <script language="javascript">
- if (confirm("您的操作权限不够,系统拒绝你的访问,请点确定返回,或者点取消退出重新登录"))
- location.href="login.asp";
- else
- location.href="index.asp";
- </script>
- <%
- end if
- end if
- end if
- %>
- <html>
- <head>
- <title></title>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <link href="Images/style.css" rel="stylesheet" type="text/css">
- </head>
- <body>
- <%
- set rs=server.createobject("adodb.recordset")
- sql="select bookid,bookname,pingpai,bookchuban,yeshu,isbn,bookpic,shichangjia,huiyuanjia,vipjia,bestbook,tejiabook,newsbook,kucun,adddate,grade,chima,yanse from products order by adddate desc "
- rs.open sql,conn,1,1
- %>
- <br>
- <td height="107" bgcolor="#DEE7FF">
- <table width="95%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#6396D6">
- <tr align="center" bgcolor="#C7D3E6">
- <td width="11%" bgcolor="#7B9AE7" height="25"><font color="#FFFFFF">商品ID</font></td>
- <td width="20%" bgcolor="#7B9AE7"><font color="#FFFFFF">商品名称</font></td>
- <td width="21%" bgcolor="#7B9AE7"><font color="#FFFFFF">所属品牌</font></td>
- <%
- if not rs.eof then
- %>
- <td width="17%" bgcolor="#7B9AE7"><font color="#FFFFFF">商品编号</font></td>
- <%
- else
- %>
- <td width="17%" bgcolor="#7B9AE7"><font color="#FFFFFF">商品单位</font></td>
- <%
- end if
- %>
- <td width="14%" bgcolor="#7B9AE7"><font color="#FFFFFF">添加日期</font></td>
- </tr>
- <%
- while not rs.eof
- %>
- <tr bgcolor="#FFFFFF">
- <td width="11%" align="center" bgcolor="#DEE7FF"><%=rs(0)%></td>
- <td width="20%" height="22" bgcolor="#DEE7FF"><a href="editproduct.asp?id=<%=rs(0)%>"><%=rs(1)%></a></td>
- <td width="21%" height="22" align="center" bgcolor="#DEE7FF"><%=rs(2)%></td>
- <td width="17%" align="center" bgcolor="#DEE7FF"><%=rs(15)%></td>
- <td width="14%" align="center" bgcolor="#DEE7FF"><%=rs(14)%></td>
- </tr>
- <%
- rs.movenext
- wend
- set rs=nothing
- %>
- <tr bgcolor="#FFFFFF">
- <td height="22" colspan="6" bgcolor="#DEE7FF"> <div align="center">
- <input type="button" name="Submit4" value="打 印" onClick="javascript:window.print()">
- <input type="button" name="Submit" value="导入EXCEL" onClick="javascript:openexcel();">
- <font color="red"><span id="excelfile" ></span></font></div></td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <br>
- </body>
- </html>
- <script>
- function openexcel(){
- window.open("toexcel.asp?sql=<%=sql%>");
- }
- </script>
English
