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

📄 maillist.asp

📁 人民医院眼科全站
💻 ASP
字号:
<!-- #include file="../include/bkconn.asp" -->
<!--#include file="checkUser.asp"-->
<%
dim rs
dim sql
dim mailListSort
dim page,maxPerPage
maxPerPage=10 '每页显示的记录数
mailListSort=Request("sort")
if mailListSort<>"" then
	mailListSort=cInt(mailListSort)
else
	mailListSort=2
end if
page=Request("page")
if (page="" or isempty(page)) then page=1
thisUrl="mailList.asp?true=1"
session("adminOldUrl")=thisUrl&"&page="&page
set rs=server.createobject("adodb.recordset")
sql="select * from mailList where 1=1"
if mailListSort<>2 then
	sql=sql&" and mailListSort="&mailListSort
end if
sql=sql&" order by id desc"
rs.open sql,conn,1,1
rs.pagesize=MaxPerPage
%>
<html>
<head>
<title>邮件列表管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language=Javascript>
<!--
function jumpTo(i){
if(i==1){
	this.document.location="<%=thisUrl%>";}
if(i==2){
	this.document.location="<%=thisUrl%>&page=<%=page-1%>";}
if(i==3){
	this.document.location="<%=thisUrl%>&page=<%=page+1%>";}
if(i==4){
	this.document.location="<%=thisUrl%>&page=<%=rs.pageCount%>";}
}

function check_all(form)
  {
  for (var i=0;i<form.elements.length;i++)
    {
    var e = form.elements[i];
    if (e.name != 'chkall')
       e.checked = form.chkall.checked;
    }
  }
  
function del_check(form)
{
	if(confirm("确实要删除选中的项吗?")==1){
		form.action="saveMailListDel.asp"
		form.submit()
	}
}

function setFocus(){
	add_new.email.focus();
}
-->
</script>
<link rel="stylesheet" href="../main.css" type="text/css">
</head>
<body bgcolor="#9CC7EF" text="#000000" leftmargin="0" topmargin="2" marginwidth="0" marginheight="0" onload="setFocus()">
<div align="center"><br>
  邮件列表管理<br>
</div>
<table width="98%" border="1" bordercolordark=#9CC7EF bordercolorlight=#145AA0 cellspacing="0" cellpadding="2" align="center">
<form name="form1">
    <tr bgcolor="#73B2EF"> 
      <td colspan=4 height="28"> 
        <div align="right"> 
          <select name="sort" onChange="window.location='mailList.asp?sort='+form1.sort.value">
            <option value="">---全  部---</option>
<%if mailListSort="1" then %>
          <option value="1" selected>主动申请者</option>
<%else %>
          <option value="1">主动申请者</option>
<%end if %>
<%if mailListSort="0" then %>
          <option value="0" selected>被动添加者</option>
<%else %>
          <option value="0">被动添加者</option>
<%end if %>
        </select>&nbsp;
      </div>
    </td>
  </tr>
  <tr> 
    <td width="7%" height="24"> </td>
    <td height="24" width="29%"> 
      <div align="center">Email</div>
    </td>
    <td height="24" width="24%"> 
      <div align="center">姓名</div>
    </td>
    <td width="40%"> 
      <div align="center">备注</div>
    </td>
  </tr>
  <%
dim i
i=1
if not (rs.eof or err) then rs.move (page-1)*maxPerPage
do while not (rs.eof or err)
%>
  <tr> 
    <td width="7%" height="19"> 
      <div align="right"> 
        <input type="checkbox" name="check_id" value=<%=rs("id")%>>
      </div>
    </td>
    <td width="29%" height="19"><%=rs("email")%>&nbsp; </td>
    <td width="24%" height="19"><%=rs("name")%>&nbsp; </td>
    <td width="40%" height="19"><%=rs("remark")%>&nbsp; </td>
  </tr>
  <%
i=i+1
if i>maxPerpage then exit do
rs.movenext
loop
%>
    <tr bgcolor="#74B0ED"> 
      <td colspan=4> 
        <div align="right"> 
        <input type="checkbox" name="chkall" value="on" onClick="check_all(this.form)">
        选中所有 
          <input type="button" name="Submit2" value="删除选中者" onClick="del_check(this.form)">
          &nbsp; 共<%=rs.recordCount%>项 第<%=page%>/<%=rs.pageCount%>页         <%if page>1 then%>
        <input type="button" name="Submit3" value="首页" onClick="Javascript:jumpTo(1)">
          <input type="button" name="Submit4" value="上页" onClick="Javascript:jumpTo(2)">
        <%else%>
        <input type="button" name="Submit3" value="首页" disabled>
          <input type="button" name="Submit4" value="上页" disabled>
        <%end if
if rs.recordCount>page*maxPerPage then%>
          <input type="button" name="Submit5" value="下页" onClick="Javascript:jumpTo(3)">
          <input type="button" name="Submit6" value="末页" onClick="Javascript:jumpTo(4)">
        <%else%>
          <input type="button" name="Submit5" value="下页" disabled>
          <input type="button" name="Submit6" value="末页" disabled>
          <%end if%>
        </div>
    </td>
  </tr>
  </form>
</table>
<table width="98%" border="1" bordercolordark=#9CC7EF bordercolorlight=#145AA0 cellspacing="0" cellpadding="2" align="center">
  <form name="add_new" action="saveMailListAdd.asp" method="post">
    <tr> 
      <td width=27%> 
        <div align="center">EMail</div>
      </td>
      <td width="17%"> 
        <div align="center">姓名</div>
      </td>
      <td width="43%"> 
        <div align="center">备注</div>
      </td>
      <td width="13%">  
        <div align="center"></div>
      </td>
    </tr>
    <tr> 
      <td width="27%"> 
        <p> 
          <input type="text" name="email" size="26" >
        </p>
      </td>
      <td width="17%"> 
        <input type="text" name="name" size="14">
      </td>
      <td width="43%"> 
        <input type="text" name="remark" size="26">
      </td>
      <td width="13%"> 
        <input type="submit" name="Submit5" value="增加">
      </td>
    </tr>
    <tr bgcolor="#73B2EF"> 
      <td colspan=4 height="28"> 
        <div align="center">&nbsp;</div>
      </td>
    </tr>
  </form>
</table>
</body>
</html>

⌨️ 快捷键说明

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