<%
if Request.Cookies("admindj")="3" then
   Response.Write "<BR><BR><BR><BR><center>权限不足，你没有此功能的管理权限"
   Response.end
end if
%>
<!--#include file = admin_chk.asp -->
<!--#include file = admin_conn.asp -->
<!--#include file = titleb.asp -->
<html>

<head>
<!--#include file = language.asp -->
<STYLE type="text/css">
<!--
a:link       {text-decoration: none; font-family: AdobeSm; color: #000000 }
a:visited    {text-decoration: none; color: #000000 }
A:hover      {COLOR: green; FONT-FAMILY: "宋体,MingLiU"; TEXT-DECORATION: underline}
body         {font-size: 9pt; font-family: 宋体,MingLiU, Arial;color: #000000}
TD           {FONT-SIZE: 9pt; FONT-FAMILY: "宋体,MingLiU, Arial";color: #000000;table-layout:fixed;word-break:break-all}
p            {FONT-SIZE: 9pt; FONT-FAMILY: "宋体,MingLiU, Arial";color: #000000}
input        {FONT-SIZE: 9pt; FONT-FAMILY: "宋体,MingLiU, Arial";color: #000000}
body         {margin-top: 0; margin-bottom: 0;margin-left:0;margin-right:0; color: #000000}
select       {FONT-SIZE: 9PT;}
option       {FONT-SIZE: 9pt;}
textarea     {FONT-SIZE: 9pt;}
-->
</STYLE>
</head>

<body bgcolor="#ffffff">
　<p align="center">投稿页面：<a target="_blank" href="utg.asp">utg.asp</a>　　<a href="admin_mb_tg.asp">页顶页尾的模版管理</a>　　　<a href="admin_tg_config.asp">投稿相关设置</a><br>
</p>
<div align="center">
	<table border="1" cellpadding="3" cellspacing="0" width="700" id="table1" style="border-collapse: collapse" bordercolor="#C0C0C0">
		<tr>
			<td background="images/topBar_bg.gif" align="center" width="216"><b>
			栏目和标题</b></td>
			<td background="images/topBar_bg.gif" align="center" width="182"><b>
			用　　户</b></td>
			<td background="images/topBar_bg.gif" align="center" width="145"><b>
			投稿时间</b></td>
			<td background="images/topBar_bg.gif" align="center" width="130"><b>
			操　　作</b></td>
		</tr>
		<%
		delid=trim(request("delid"))
		
		if delid<>"" then conn.Execute "delete from [usertougao] where ID="&CInt(delid)
		
		Set rs = Server.CreateObject("ADODB.RecordSet")
		rs.Open "select * from [UserTouGao] order by id desc",conn,1,1
		
		if rs.recordcount<>0 then 
		
		page=int(request("page"))
		rs.PageSize=20
		pagecount=rs.pagesize
		if page<=0 then page=1
		if request("page")="" then page=1
		rs.AbsolutePage=page
		
		for i=1 to pagecount
		
			lmid=""
			lmid=rs("lmid")
			if lmid="" then lmid=0

		%>
		<tr>
			<td width="216">
				<%
					if lmid="" then lmid=0
					set rslm = Server.CreateObject("ADODB.RecordSet")
					rslm.Open "select * from [lm] where id="&lmid&" order by id desc",conn,1,1
					if rslm.recordcount<>0 then
						Response.Write rslm("lm")&rslm("lm2")&rslm("lm3")
					end if
					rslm.close
					set rslm=nothing
				%>
			<font color="#0000FF">(<%=rs("id")%>)</font><%=titleb(rs("title"),30)%></td>
			<td width="182"><%=rs("adduser")%>&nbsp;<a href=# onclick='window.open("admin_ip.asp?iP=<%=rs("ip")%>","newsplview","width=380,height=200,top=190,left=150,scrollbars=no" )'>(查看IP和来源)</a></td>
			<td width="145" align=center><%=rs("addtime")%></td>
			<td width="130" align=center><a href="admin_news_add.asp?tgid=<%=rs("id")%>&tglm=<%=lmid%>&page=<%=page%>">查看审查</a>　<a onclick='{if(confirm("您确定删除吗?此操作将不能恢复!")){return true;}return false;}' href=<%=request.servervariables("URL")%>?delid=<%=rs("id")%>>删除</a></td>
		</tr>
		
		<%
		 rs.movenext
		 if rs.eof then exit for
		 next
		 
		 else
		 	Response.Write "<tr><td colspan=4>　暂无信息</td></tr>"
		 
		 end if
		%>
	</table>
</div>
<br>
<center>
<%if rs.recordcount<>0 then
  if page>1 then
    response.write "<a href="&request.servervariables("URL")&"?page=1>首页</a>　"
    response.write "<a href="&request.servervariables("URL")&"?page="&page-1&">上一页</a>　"
  end if
  if page<rs.pagecount then
    response.write "<a href="&request.servervariables("URL")&"?page="&page+1&">下一页</a>　"
    response.write "<a href="&request.servervariables("URL")&"?page="&rs.pagecount&">尾页</a>　"
  end if
    response.write "共"&rs.recordcount&"条　每页显示"&pagecount&"条　共"&rs.pagecount&"页　"
  %>
  <script language="JavaScript">
  <!--
  function FP_jumpMenu(el,frm,sel) {//v1.0
    var href=el.options[el.selectedIndex].value; if(sel) el.selectedIndex=0;
    if('_new'==frm) open(href); else eval(frm+".location='"+href+"'");
    }
    // -->
  </script>
  <select size="1" onchange="FP_jumpMenu(this,'window',false)" id="id1" name="D1" style="font-size: 9pt; border-style: solid; border-width: 1px">
   <%for i=1 to rs.pagecount%>
   <option value="<%=request.servervariables("URL")%>?page=<%=i%>" <%if page=i then response.write "selected"%> style="font-size: 9pt">第<%=i%>页</option>
    <%next%>
   </select>
<%end if%>
</center>
</body>

</html>

<%
rs.close:set rs=nothing
conn.close:set conn=nothing
%>