<%dbdns="../../"%>
<!--#include file="../../inc/conn.asp"-->
<!--#include file="../cook.asp"-->
<%if fla10<>1 then
response.write "<script>alert('操作权限出错，您没有权限操作些功能');history.go(-1);</Script>"
Response.End 
end if%>
<%
if request("action")="del" then
id=replace(request("id")," ","")
id=split(id,",")
for i=0 to UBound(id)
conn.execute("delete from dlxf_help where dlxf_id=" & id(i))
next
end if

%>
<script>
function CheckAll(form)  {
  for (var i=0;i<form.elements.length;i++)    {
    var e = form.elements[i];
    if (e.name != 'chkall')       e.checked = form.chkall.checked; 
   }
  }
</script>
<script>
function oa_tool1(){
window.parent.mm.rows="20,200,10,*";
}
</script>
<%=citycss%>
<body style="margin:5">
<table width="97%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolorlight="#6C90D1" bordercolordark="#FFFFFF">
<form name="form1" method="post" action="help.asp">
<tr align=center bgcolor=#D6DFF7><td height=25 align=center><input type="text" name="word">　　<input type="submit" name="Submit" value="帮助搜索">
　　<a href=help.asp?key=1>关闭</a>　<a href=help.asp?key=2>推荐</a>　<a href=help.asp>所有</a></td></tr>
</form>
</table>
<table width="97%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolorlight="#6C90D1" bordercolordark="#FFFFFF">
<form name="from1" method="post" action="help.asp?action=del">
<tr align=center bgcolor=#D6DFF7>
<%
if request("word")<>"" then
sql= "select * from dlxf_help where dlxf_helptit like'%"&request("word")&"%' or dlxf_help like'%"&request("word")&"%' order by dlxf_id desc"
elseif request("key")<>"" then
sql= "select * from dlxf_help where dlxf_key="&request("key")&" order by dlxf_id desc"
else
sql="select * from dlxf_help order by dlxf_id desc"
end if
set rs=server.createobject("adodb.recordset")                     
rs.open sql,conn,1,1                     
if rs.eof and rs.bof then                     
	response.write "暂无内容"
else  
'分页的实现 
listnum=23
Rs.pagesize=listnum
page=Request("page")
if (page-Rs.pagecount) > 0 then
page=Rs.pagecount
elseif page = "" or page < 1 then
page = 1
end if
Rs.absolutepage=page
'编号的实现
j=rs.recordcount
j=j-(page-1)*listnum
i=0
nn=request("page")
if nn="" then
n=0
else
nn=nn-1
n=listnum*nn
end if%>
 <td width="4%" height=20>编号</td>
 <td width=*>帮助名称<font color=red>(点击查看)</font></td>
 <td width="8%">状态</td>
 <td width="8%">操作</td>
 <td width="8%">修改</td>
 <td width="8%">选择</td>
</tr>
<%do while not rs.eof and i<listnum
n=n+1%>
<tr align=center height=22>
 <td><%=n%></td>
 <td align=left>&nbsp;<a href=# onclick="javascript:window.open('help_view.asp?id=<%=rs("dlxf_id")%>','_n','width=780,height=400,scrollbars=yes')"><%=rs("dlxf_helptit")%></a></td>
 <td><%if rs("dlxf_key")=1 then%><font color=red>关闭</font><%elseif rs("dlxf_key")=2 then%><font color=green>推荐</font><%else%>正常<%end if%></td>
 <td><a href=lx.asp?id=<%=rs("dlxf_id")%> onclick="oa_tool1()" target=top>操作</a></td>
 <td><a href=helpedit.asp?id=<%=rs("dlxf_id")%>&page=<%=request("page")%>>修改</a></td>
 <td><input type="checkbox" name="ID" value="<%=rs("dlxf_id")%>" style="border:0"></td>
</tr>
<%rs.movenext 
i=i+1 
j=j-1
loop%>
<tr>
<%filename="help.asp?word="&request("word")&"&key="&request("key")&""%>
<td colspan=10 align=right bgcolor=#6C90D1><%=Rs.recordcount%> 条帮助&nbsp;&nbsp;<%=listnum%> 条帮助/页&nbsp;&nbsp;共 <%=Rs.pagecount%> 页 
      <% if page=1 then %>
      <%else%>
      <a href=<%=filename%>><strong>|<<</strong></a>
      <a href=<%=filename%>&page=<%=page-1%>><strong><<</strong></a>
      <a href=<%=filename%>&page=<%=page-1%>><b>[<%=page-1%>]</b></a>
      <%end if%><% if Rs.pagecount=1 then %><%else%><b>[<%=page%>]</b><%end if%>
      <% if Rs.pagecount-page <> 0 then %>
      <a href=<%=filename%>&page=<%=page+1%>><b>[<%=page+1%>]</b></a>
      <a href=<%=filename%>&page=<%=page+1%>><strong>>></strong></a>
      <a href=<%=filename%>&page=<%=Rs.pagecount%>><strong>>>|</strong></a> 
	  <%end if%>　<input name="chkall" type="checkbox" id="chkall" value="select" onclick="CheckAll(this.form)" style="border:0">全选　<input type="submit" name="Submit" value="删 除">&nbsp;&nbsp;</td>
<%end if%></tr>
</form>
</table>
