<!--#include file="../include/config.asp"-->
<!--#include file="../include/conn.asp"-->
<!--#include file="inc/check.asp"-->
<!--#include file="inc/function.asp"-->	
<!--#include file="inc/Cls_ShowoPage.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>后台-单页内容管理-powered by jiruinet.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="author" content="jiruinet@qq.com,企业建站,极瑞企业网站系统" />
<meta name="robots" content="index,follow" />
<meta name="description" content="<%=site_title%>,极瑞企业网站系统,powered by jiruinet.com"/>
<meta name="keywords" content="<%=site_title%>后台管理,极瑞企业网站系统"/>
<link rel="stylesheet" type="text/css" href="css/admin.css" media="screen" />
<script type="text/javascript">
function CheckAll(form)
{if (addform.submitAllSearch.checked == true)
	{
	   for (var i=0;i<form.elements.length;i++)
	   {
		  var e = form.elements[i];
		  e.checked = true;
	   }
	}
	else
	{
	   for (var i=0;i<form.elements.length;i++)
	   {
		  var e = form.elements[i];
		  e.checked = false;
	   }
	} 
}
</script>
</head>
<%
Dim cid
cid=request.querystring("cid")
'============================删除单页内容
If request.querystring("action")="del" Then 
	id=request.querystring("id")
	If IsNumeric(id)=false Then response.redirect "about.asp"
	set rs=server.createobject("adodb.recordset")
	sql="select * from "&jrcms_DB_Pre&"jieshao where id ="& id
	rs.open sql,conn,1,3
	If Not rs.eof And Not rs.bof Then 
	rs.delete
	rs.update
	End If 
	rs.close
	Set rs=Nothing 
	Set sql=Nothing 
	Call html_allabout(0,0,0)
	Response.Write("<Script>alert('删除单页内容成功');location.href="""&request.servervariables("HTTP_REFERER")&""";</Script> ")
End If 
'============================删除单页内容结束

'============================批量删除单页内容
If request.form("do")="删 除" Then 
	id=request.Form("selectid")
	If id="" Then response.redirect "about.asp"
	set rs=server.createobject("adodb.recordset")
	sql="select * from "&jrcms_DB_Pre&"jieshao where id in ("& id &")"
	rs.open sql,conn,1,3
	Do While Not rs.eof And Not rs.bof 
	rs.delete
	rs.update
	rs.movenext
	Loop 
	rs.close
	Set rs=Nothing 
	Set sql=Nothing
	Call html_allabout(0,0,0)
	Response.Write("<Script>alert('删除单页内容成功');location.href="""&request.servervariables("HTTP_REFERER")&""";</Script> ")
	response.End()
ElseIf request.Form("do")="静态生成" Then 
	response.write "静态生成"
End If 
'============================批量删除单页内容结束
%>
<body>
<div id="wrap">
<div class="header">
	<div class="top">
		<div class="logo"></div>
		<div class="right">
			<div class="admin"><%=myadminuser%> <a href="passwords.asp">修改密码</a> |&nbsp; <a href="login.asp?action=out"> 退出</a></div>
			<div class="clear"></div>
			<div class="top_ico">
			<ul>
				<li><a href="../" target="_blank">浏览网站</a></li>
				<li><a href="http://www.jiruinet.com/" target="_blank">帮助信息</a></li>
			</ul>
			</div>
		</div>
		<div class="clear"></div>
	</div>
	<div class="menu">
		<ul>
		<%Call menu(3)%>
		</ul>
	</div>
</div>
<div class="main">
	<div class="left">
	<h2>单页内容管理</h2>
		<ul>
			<%If cid=0 Then current="class=""current"""%>
			<li><a href="about_edit.asp" title="" >添加介绍</a></li>
			
			<li><a href="about.asp" title="" <%=current%>>单页管理</a></li>
			
			<li><a href="about_class.asp" title="">单页分类管理</a></li>
			<%
			set rs=server.createobject("adodb.recordset")
			sql="select * from "&jrcms_DB_Pre&"jieshao_class order by id"
			rs.open sql,conn,1,1
			If Not rs.bof Then 
			class_id_count=rs("id")
			End If 

			Do While Not rs.eof And Not rs.bof
			current=""
			If rs("id")=Int(request.querystring("cid")) Then current="current"
			response.write "<li class="""&current&" about""><a href=""about.asp?cid="&rs("id")&""" title="""">"&Left(rs("class"),8)&"</a></li>"
			rs.movenext
			If Not rs.eof Then 
			class_id_count=class_id_count&","&rs("id")
			End If 
			Loop 
			rs.close
			Set rs=Nothing 
			Set sql=Nothing 
			%>
		</ul>
	</div>
	<div class="right">
	<h2>单页内容管理</h2>
	<div class="contents">
	<form  method="post"  action="about.asp"  id="addform" name="addform" onSubmit="return check_file('login')">
		<table class="list">
		<tr>
			<th width="40">选择</th><th width="160">单页标题</th><th>类别</th><!--th width="200">页面路径</th--><th width="70">发布日期</th><th width="40">编辑</th><!--th width="40">静态</th--><th width="40">删除</th>
		</tr>
		<%
		Dim ors
		Set ors=new Cls_ShowoPage	
		If class_id_count<>"" Then 
		tiaojian="class_id in (" & class_id_count&") "
		End If 
		If (cid<>"" and IsNumeric(cid)=true) Then 
		tiaojian=tiaojian & "and class_id = "&cid
		End If 
		With ors
			.Conn=conn	
			.DbType="AC"
			.RecType=0
			.RecSql=0
			.RecTerm=1
			.CookieName="recac"	
			.Order=0
			.PageSize=20
			.JsUrl="js/"
			.Sql="id,title,time,class_id,html$"&jrcms_DB_Pre&"jieshao$"&tiaojian&"$class_id$id" '字段,表,条件(不需要where),排序(不需要需要ORDER BY),主键ID
		End With
		iRecCount=ors.RecCount()'记录总数
		iRs=ors.ResultSet()		'返回ResultSet
		If iRecCount<1 Then%>
		<tr> 
			<td colspan="8" align="center">暂无记录</td>    
		</tr>
		<%
		Else     
		For i=0 To Ubound(iRs,2)
		'classname="公司介绍"
		'filename=mainmenu1
		set rs=server.createobject("adodb.recordset")
		sql="select * from "&jrcms_DB_Pre&"jieshao_class where id = "& iRs(3,i)
		rs.open sql,conn,1,3
		If Not rs.eof And Not rs.bof Then 
		classname=rs("class")
		filename=rs("file")
		End If 
		rs.close
		Set rs=Nothing 
		Set sql=Nothing
		%>
		<tr class="noclick" onmouseover="this.className='onclick'" onmouseout="this.className='noclick'">
			<td align="center"><input type="checkbox" name="selectid" value="<%=iRs(0,i)%>" /></td>
			<td style="padding:8px;"><a href="../<%=filename&"?id="&iRs(0,i)%>" target="_blank"><%=Left(iRs(1,i),30)%></a></td>
			<td><%=classname%></td>
			<!--td style="color:#666"><%=filename&iRs(4,i)%></td-->
			<td style="color:#bbb"><%=Format_Time(iRs(2,i),2)%></td>
			<td class="edit"><a href="about_edit.asp?id=<%=iRs(0,i)%>" title="编辑"></a></td>
			<!--td class="edit"><a href="" title="重新生成" style="background:url('img/small_ico.gif') 0px -275px no-repeat;"></a></td-->
			<td class="edit"><a href="about.asp?action=del&id=<%=iRs(0,i)%>" title="删除" style="background:url('img/small_ico.gif') 3px -243px no-repeat;" onClick="{if(confirm('该操作无法恢复，确定要删除么？')){return true;}return false;}"></a></td>
		</tr>
		<%
		Next 
		End If 
		%>
		</table>
		<div style="margin-top:8px;padding-left:20px;font-size:12px;">
		<input onClick='CheckAll(this.form)' type='checkbox' id='submitAllSearch' name="submitAllSearch" value='selectall'> <input class="submit" name="do" onmouseover="this.className='submit2'" onmouseout="this.className='submit'" type="submit"  value="删 除" style="margin-left:22px;font-size:12px;" onClick="{if(confirm('确定要将选中的内容全部删除么')){return true;}return false;}"> </div>
		<div class="clear"></div>
	</form>
	<div style="float:right;margin-bottom:8px;padding-right:10px;;"><%ors.ShowPage()%></div>
	<div class="clear"></div>

	</div>
	</div>
	<div class="clear"></div>
</div>
 <div id="else" class="clearfix">

 </div>
</div>
<div class="bottom" id="footer">
	<div class="content">
		<div class="left"><%=Soft_Name%></div>
		<div class="right"><%=Email%></div>
		<div class="clear"></div>
	</div>
</div>
</body>
</html>
