📄 special_list.asp
字号:
<%
Option Explicit
'----------------------------------------------------------------------------------
'本页:
' 资源特性列表页面
'说明:
'
'----------------------------------------------------------------------------------
%>
<!--#include file="inc/Config.class.asp"-->
<!--#include file="inc/DBControl.class.asp"-->
<!--#include file="inc/FunctionLib.class.asp"-->
<!--#include file="inc/Manager.class.asp"-->
<%
Dim Cfg, Db, FLib, Admin
Set Cfg = New Config
Set Db = New DBControl
Set FLib = New FunctionLib
Set Admin = New Manager
If Not Admin.Logined Then
FLib.Alert "对不起,你已经超时或未登录","./",1
Response.End
End If
If Not Admin.CheckPopedom("TSYS_GROUP2_RES_SPECIAL") Then
FLib.Alert "权限不足", "BACK", 0
Response.End
ENd If
Db.Open()
Dim sKey, sType, Parent, UrlInfo
sKey = FLib.SafeSql(Request("sKey"))
sType = FLib.SafeSql(Request("sType"))
Parent = FLib.SafeSql(Request("Parent"))
If Parent = "" Or Not IsNumeric(Parent) Then
Parent = 0
End If
FLib.SetCookie "SpecialList_Parent", Parent, DateAdd("m",10, NOW())
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="inc/style.css" type="text/css">
<SCRIPT LANGUAGE="JavaScript" src="inc/FunctionLib.js"></script>
<script src="inc/Tkl_PageList.js"></script>
<SCRIPT LANGUAGE="JavaScript">
<!--
function AddReco(Parent)
{
self.location.href = "Special_Mdy.asp?Work=AddReco&Parent=" + Parent;
}
function MdyReco(mId)
{
self.location.href = "Special_Mdy.asp?Work=MdyReco&rId=" + mId;
}
function DeleteReco(IdList)
{
if(IdList == "") return false;
if(confirm("是否确定要删除选中项?"))
{
self.location.href = "Special_Process.asp?Work=DeleteReco&IdList=" + IdList;
}else{
return false;
}
}
//-->
</SCRIPT>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="tabTitleBar"><%=FLib.Path_SpecialList(Parent, "?")%></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<form name="form1" method="post" action="">
<tr>
<td> <a href="javascript:AddReco('<%=Parent%>');void(0);" title="在当前位置增加">[增加资源特性]</a></td>
<td align="right">
<input type="hidden" name="Parent" value="<%=Parent%>">
<input type="text" name="sKey" size="20" value="<%=sKey%>" class="input_text">
<select name="sType" class="select_list">
<option value="0" selected> </option>
<option value="1">特性名称</option>
</select>
<input type="submit" name="Submit" value="提交" class="input_button">
</td>
</tr>
</form>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="2" class="tabBgColor">
<tr>
<td width="2%" class="tabHead" align="center"> </td>
<td align="center" class="tabHead" width="45%">特性名称</td>
<td width="16%" class="tabHead" align="center">创建者</td>
<td width="24%" class="tabHead" align="center">创建时间</td>
<td width="13%" class="tabHead" align="center">操作</td>
</tr>
<%
Dim Rs, Sql
Dim CurrPage, PageCount
Set Rs = Db.CreateRS()
Sql = Db.SqlTran(ExeSql())
Rs.PageSize = 20
Rs.CacheSize = Rs.PageSize
Rs.Open Sql, Db.Conn, 1, 1
PageCount = Rs.PageCount
If Request("CurrPage") = "" Then
CurrPage = 1
Else
CurrPage = Request("CurrPage")
End If
If Not(Rs.Eof And Rs.Bof) Then
Rs.AbsolutePage = CurrPage
End If
UrlInfo = "&Parent=" & Parent & "&sKey=" & sKey &"&sType=" & sType
Dim I, trClass
For I=1 To Rs.PageSize
If Rs.Eof Then
Exit For
End If
If I Mod 2 = 0 Then
trClass = "tabRow1"
Else
trClass = "tabRow2"
End if
%>
<tr class="<%=trClass%>">
<td width="2%" align="center" height="11">
<input type="checkbox" name="IdList" value="<%=Rs("id")%>" class="input_checkbox">
</td>
<td height="11" width="45%"><A HREF="?Parent=<%=Rs("id")%>"><%=Rs("title")%></A></td>
<td width="16%" align="center" height="11"><%=Rs("creator")%></td>
<td width="24%" align="center" height="11"><%=FormatDateTime(Rs("addtime"),2)%></td>
<td width="13%" align="center" height="11"> <a href="javascript:MdyReco('<%=Rs("id")%>');void(0);">编辑</a></td>
</tr>
<%
Rs.MoveNext
Next
If Rs.Eof And Rs.Bof Then%>
<tr>
<td colspan="5" align="center">暂无相关数据</td>
</tr>
<%End If%>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td width="17%"> <a href="javascript:SelectAllCheckBox('IdList');void(0);">[返选]</a>
<a href="javascript:DeleteReco(GetCheckBoxList('IdList'));void(0);">[删除]</a></td>
<td width="83%" align="right">
<script language="JavaScript">
<!--
var plb = new PageListBar('plb', <%=PageCount%>, <%=CurrPage%>, '<%=UrlInfo%>', 20);
document.write(plb);
//-->
</script>
</td>
</tr>
</table>
</body>
</html>
<%
'函数:处理Sql脚本
'返回:Sql
Function ExeSql()
Dim Sql, mWhere
Sql = "SELECT id, title, creator, addtime FROM Special_list WHERE {WHERE} ORDER BY show_order DESC,id ASC"
If sKey = "" Then
sType = "0"
End If
Select Case sType
Case "1"
mWhere = "title LIKE '%" & sKey & "%'"
Case Else
mWhere = "'1'='1'"
End Select
mWhere = mWhere & " AND Parent=" & Parent
Sql = Replace(Sql, "{WHERE}", mWhere)
ExeSql = Sql
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -