<!--#include file="conn.asp"-->
<!--#include file="check.asp"-->
<!--#include file="../inc/setup.asp"-->
<!--#include file="../inc/char.asp"-->
<!--#include file="../inc/sql.asp"-->
<%
	end if
	useflag=1
%>
<!--#include file="flag.asp"-->
<%
	pid=int(Request.Cookies("admin_person_id"))
	action=Request("action")
	url=Request("url")
	id=Request("id")
	if action="del" then
		sql="delete from swf_photo where id ="&id&""
		conn.Execute sql
		call del(""&url&"")
		response.write"<SCRIPT language=JavaScript>alert('大头贴信息已经被删除成功，现在正为您返回，请稍等');"
		response.write"window.location.href = 'Swf_photo_list.asp'"&" </script>"
		response.end
	end if
	
	if action="tj" then
		sql="update swf_photo set tj=1 where id ="&id&""
		conn.Execute sql
		response.write"<SCRIPT language=JavaScript>alert('大头贴信息推荐成功，现在正为您返回，请稍等');"
		response.write"window.location.href = 'Swf_photo_list.asp'"&" </script>"
		response.end
	end if
	
	if action="notj" then
		sql="update swf_photo set tj=0 where id ="&id&""
		conn.Execute sql
		response.write"<SCRIPT language=JavaScript>alert('大头贴信息推荐成功，现在正为您返回，请稍等');"
		response.write"window.location.href = 'Swf_photo_list.asp'"&" </script>"
		response.end
	end if
	
	if action="sh" then
		sql="update swf_photo set zhuangtai=1 where id ="&id&""
		conn.Execute sql
		response.write"<SCRIPT language=JavaScript>alert('大头贴信息审核成功，现在正为您返回，请稍等');"
		response.write"window.location.href = 'Swf_photo_list.asp'"&" </script>"
		response.end
	end if
	
	if action="nosh" then
		sql="update swf_photo set zhuangtai=0 where id ="&id&""
		conn.Execute sql
		response.write"<SCRIPT language=JavaScript>alert('大头贴信息取消审核成功，现在正为您返回，请稍等');"
		response.write"window.location.href = 'Swf_photo_list.asp'"&" </script>"
		response.end
	end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
<link href='Include/Admin_Style.CSS' rel='stylesheet' type='text/css'>
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="js/lightbox.js"></script>
<script src='Include/Common.js'></script>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="sortbutton">
<tr>    
<td width="27%" height="23" align="center" valign="middle">贴纸管理
<td width="73%" align="center" valign="middle"><table width="100%" border="0">
<form name="form" method="get">
<input name="action" type="hidden" value="search" />
        <tr>
          <td width="19%">
		  <Input maxLength=30 name="uname" value="主题名称" onMouseOver="if(this.value=='主题名称'){this.value=''}" title="主题名称">
		  </td>
          <td width="63%"><input class="button" type="submit" value="提交条件"></td>
        </tr>
</form>
</table>
</tr>
</table>
<table width="100%" style="MARGIN-TOP: 3px" border="0" align="center" cellspacing="1" cellpadding="1"  class="Border">
<tr height="25" align="center" class='title'>
	<td width='6%' nowrap>编号</td>
	<td width="12%" nowrap>标题</td>
	<td width="7%" nowrap><span class="style8">缩略图</span></td>
	<td width="20%" nowrap><span class="style8">简短说明</span></td>
	<td width="16%" nowrap>拍照时间</td>
	<td width="10%" nowrap>所属会员</td>
	<td width="8%" nowrap>是否被推荐</td>
	<td width="9%" nowrap>审核状态</td>
	<td width="12%" nowrap>操作</td>
  </tr>
<%
	searchtype=""
	
	if Trim(Request.QueryString("action"))="search" and Trim(Request.QueryString("uname"))<>"" and Trim(Request.QueryString("uname"))<>"主题名称" then
		
		searchtype=" and swf_photo.title like '%"&Trim(Request.QueryString("uname"))&"%'"
	
	end if

	dim i,intPage,page,pre,last,filepath'定义变量
	set rs = server.CreateObject("adodb.recordset")'创建对象
	sql="select swf_photo.*,person.iname,person.id pid from swf_photo,person where swf_photo.User_id=person.id "&searchtype&" order by swf_photo.id desc"'定义SQL语句
	rs.PageSize = 13 '这里设定每页显示的记录数
	rs.CursorLocation = 3
	rs.Open sql,conn,0,2,1 '这里执行你查询SQL并获得结果记录集
	pre = true
	last = true
	page = trim(Request.QueryString("page"))'变量是跳转页面时的值

	if len(page) = 0 then
		intpage = 1
		pre = false
	else
		if cint(page) =< 1 then
			intpage = 1
			pre = false
		else
			if cint(page) >= rs.PageCount then
				intpage = rs.PageCount
				last = false
			else
				intpage = cint(page)
			end if
		end if
	end if
	if not rs.eof then
		rs.AbsolutePage = intpage
	end if
	if rs.eof then
		response.Write "<tr><td colspan=9><div align=center><font size=3 color=red><b>没有该贴纸信息，请查询后再重试</b></font></div></td></tr>"
		response.End
	else
	for i=1 to rs.PageSize
	if rs.EOF or rs.BOF then exit for
%>
<tr height="25" align=center class='tdbg' onMouseOver="this.className='tdbgmouseover'" onMouseOut="this.className='tdbg'">
	<td><%= rs("id")%></td>
	<td height="30" align="center"><a href="../view_flash.asp?id=<%= rs("id") %>" target="_blank" title="浏览该贴纸的详细信息？"><%= left(rs("title"),7) %></a></td>
	<td align="center"><a href="<%= rs("PicURL") %>" rel="lightbox"><img src="<%= rs("PicURL") %>" height="23" width="33" border="0" alt="放大大头贴?"></a></td>
	<td align="center"><%= left(rs("Intro"),7) %></td>
	<td align="center"><%=rs("AddDate")%></td>
	<td align="center"><a href="../view_person.asp?id=<%= rs("pid") %>" target="_blank" title="浏览 <%=rs("iname")%> 的详细简历信息"><%=rs("iname")%></a></td>
	<td align="center"><% if rs("tj")=0 then Response.Write("<a href='?action=tj&id="&rs("id")&"' title='该为推荐状态?'>未推荐</a>")%><% if rs("tj")=1 then Response.Write("<a href='?action=notj&id="&rs("id")&"'><font color='red' title='该为非推荐状态?'>已推荐</font></a>")%></td>
	<td align="center"><% if rs("zhuangtai")=0 then Response.Write("<a href='?action=sh&id="&rs("id")&"' title='该为审核状态?'><font color='red'>未审核</font></a>")%><% if rs("zhuangtai")=1 then Response.Write("<a href='?action=nosh&id="&rs("id")&"' title='该为非审核状态?'>已审核</a>")%></td>
	<td align="center"><a href="?action=del&id=<%= rs("id") %>&url=<%= rs("PicURL") %>" title="删除该记录?" onclick='{if(confirm("删除后将无法恢复，您真的要删除么？")){return true;}return false;}'><img src="../person/images/button_15.gif" width="46" height="20" border="0" style="cursor:hand"></a></td>
  </tr>
<%
	rs.movenext
	next
	End If
%>
<tr>
<td colspan=9>
<table width="99%" border="0" align="center" cellpadding="2" cellspacing="2" borderColorLight=#808080 borderColorDark=#ffffff>
<tr>
<%if rs.pagecount > 0 then%>
<td width="13%" align="left">当前页<%=intpage%>/<%=rs.PageCount%></td>
<%else%>
<td width="41%" align="left">当前页0/0</td><%end if%>
<td width="46%" align="right"> <a href="?page=1&action=<%= Trim(Request.QueryString("action")) %>&Keyword=<%= Trim(Request.QueryString("Keyword")) %>">首页</a>|
<%if pre then%>
<a href="?page=<%=intpage -1%>&action=<%= Trim(Request.QueryString("action")) %>&Keyword=<%= Trim(Request.QueryString("Keyword")) %>">上页</a>| <%end if%>
<%if last then%>
<a href="?page=<%=intpage +1%>&action=<%= Trim(Request.QueryString("action")) %>&Keyword=<%= Trim(Request.QueryString("Keyword")) %>">下页</a> |<%end if%>
<a href="?page=<%=rs.PageCount%>&action=<%= Trim(Request.QueryString("action")) %>&Keyword=<%= Trim(Request.QueryString("Keyword")) %>">尾页</a>|转到第
<select name="sel_page" onchange=javascript:location.href=this.options[this.selectedIndex].value>
<%
	for i = 1 to rs.PageCount
	if i = intpage then
%>
<option value="?page=<%=i%>&action=<%= Trim(Request.QueryString("action")) %>&Keyword=<%= Trim(Request.QueryString("Keyword")) %>" selected><%=i%></option>
<%else%> 
<option value="?page=<%=i%>&action=<%= Trim(Request.QueryString("action")) %>&Keyword=<%= Trim(Request.QueryString("Keyword")) %>"><%=i%></option>
<%
	end if
	next
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
%>
</select>页</font></td>
</tr>
</table></td>
</tr>
<tr>
	<td  class='tdbg' onMouseOver="this.className='tdbgmouseover'" onMouseOut="this.className='tdbg'" colspan=9 align=right>	</td>
</tr>
</table>
</BODY>
</html>