?? mail_template_list.asp
字號:
<%
'OA 表單生成器1.0
'功能:郵件模板列表
'參數:request("page")=int #當前頁碼; request.form("Search")=chr #上次查詢條件
%>
<!--#include file="../inc/Secure.asp"-->
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/Const.asp"-->
<%
'response.buffer=false
'------------------------------------------------設置參數
LoginID=trim(session("LoginID")) : if LoginID="" then LoginID=0 '當前用戶ID
maxmessage=15 '每頁顯示記錄數
currentpage=request("page") '當前頁碼
Search=request("Search") '上次查詢條件
'------------------------------------------------
'------------------------------------------------取記錄
'分頁取記錄 (返回rs對象)
'rs.recordcount 為記錄總數
'rs.PageSize 為本頁記錄數
'
table="tbioaMail_template" '表名
'接受查詢參數
'查尋條件
if Search="" then
Search="WHERE "
Search=Search & "1=1"'可查看所有人錄入的記錄
'Search=Search & "userid="&LoginID'只能查看自己錄入的記錄
END if
set rs=Server.CreateObject("ADODB.RecordSet")
sql="select * from " & table & " " & Search & " order by ID desc"
rs.open sql,oConn,1,1
Showpage=SearchPaging(rs,maxmessage,currentpage,Search)
'------------------------------------------------
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/main.css" type=text/css>
<title>main</title>
</head>
<body topmargin="10" leftmargin="10">
<!--#include file="mail_template_menu.html"-->
<hr width="100%" size=1 color="#000000">
<%=Showpage%>
<br><br>
<%
if rs.RecordCount=0 then
response.write "<BR><BR>暫時為空!"
else
%>
<table width="400" cellspacing="1" cellpadding="2" class="tab">
<tr>
<td class="tdTop">模板標題</td>
<td class="tdTop" colspan="3" width="150">相關操作</td>
</tr>
<%for i = 0 to rs.PageSize-1
If rs.EOF Then Exit For
if i mod 2 = 0 then td_class="td1" else td_class="td2"
%>
<tr>
<td class="<%=td_class%>"><%=HtmlOut(rs("title"))%></td>
<td class="<%=td_class%>" width="50">
<img border="0" src="../images/icon_show.gif" align="left">
<a href="mail_template_show.asp?id=<%=rs("ID")%>">查看</a>
</td>
<td class="<%=td_class%>" width="50">
<img border="0" src="../images/icon_edit.gif" align="left">
<a href="javascript:GoURL('mail_template_edit.asp?id=<%=rs("ID")%>&page=<%=currentpage%>')">編輯</a>
</td>
<td class="<%=td_class%>" width="50">
<img border="0" src="../images/icon_dele.gif" align="left">
<a href="javascript:GoURL('mail_template_dele.asp?id=<%=rs("ID")%>&page=<%=currentpage%>')" onClick="return confirm('確定要刪除該條記錄嗎?\n該操作不可恢復!')">刪除</a>
</td>
</tr>
<%
rs.MoveNext
next
%>
</table>
<%
end if
rs.close
%>
</body>
</html>
<%'釋放對象變量
oConn.close
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -