<!--#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
	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 User_id="&pid&" and id ="&id&""
		conn.Execute sql
		call del(""&url&"")
		response.write"<SCRIPT language=JavaScript>alert('大头贴信息已经被删除成功，现在正为您返回，请稍等');"
		response.write"window.location.href = 'flash_photo_list.asp'"&" </script>"
		response.end
	end if
%>
<html>
<HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<TITLE><%=homename%>-个人会员</TITLE>
<LINK href="../company/images/css.css" type=text/css rel=stylesheet>
<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
<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>
</HEAD>
<BODY>
<TABLE width="768" border=0 align="center" cellPadding=10 cellSpacing=0 borderColor="#111111" style="BORDER-COLLAPSE: collapse">
  <TBODY>
    <TR>
      <TD width="96%" valign="top">
		<TABLE width=95% border=0 align="center" cellPadding=0 cellSpacing=1 bgColor="#0EBDF6">
          <TBODY>
            <TR>
              <TD bgColor="#ffffff">
			  <br>
			  <table width="95%" height="27"  border="0" align="center" cellpadding="0" cellspacing="0">
                <TR>
                  <TD width=125 background="images/bt_left_bj.gif" height=27>&nbsp;&nbsp;<IMG src="images/dot1.gif" align=absMiddle>&nbsp; <STRONG class=bt_white><font color="#FFFFFF">贴纸管理</font></STRONG></TD>
                  <TD width=80 background="images/bt_mid_bj.gif"><IMG src="images/bt_mid.gif" ></TD>
                  <TD width=416 background="images/bt_mid_bj.gif">&nbsp;</TD>
                  <TD align=right width=53><IMG height=27 src="images/bt_more.gif" width=53 border=0></TD>
                </TR>
              </table>
                <BR>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td align="center">
					<table width="95%"  border="0" align="center" cellpadding="0" cellspacing="2" style="border:1 solid #cccccc;">
                        <tr bgcolor="#FFF2D0">
                          <td width="87" height="31" align="center" bgcolor="#EBF6FC">标题</td>
                          <td width="56" align="center" bgcolor="#EBF6FC"><span class="style8">缩略图</span></td>
                          <td align="center" bgcolor="#EBF6FC"><span class="style8">简短说明</span></td>
                          <td width="158" align="center" bgcolor="#EBF6FC">拍照时间</td>
                          <td width="112" align="center" bgcolor="#EBF6FC">是否被推荐</td>
                          <td width="61" align="center" bgcolor="#EBF6FC">审核状态</td>
                          <td width="48" align="center" bgcolor="#EBF6FC">操作</td>
                        </tr>
<%
	dim i,intPage,page,pre,last,filepath'定义变量
	set rs = server.CreateObject("adodb.recordset")'创建对象
	sql="select * from swf_photo where User_id="&pid&" order by id desc"'定义SQL语句
	rs.PageSize = 10 '这里设定每页显示的记录数
	rs.CursorLocation = 3
	rs.Open sql,conn,0,2,1 '这里执行你查询SQL并获得结果记录集
	if rs.eof and rs.bof then
%>
		<tr style="cursor:hand" backgroundColor='FFFFFF'>
        <td height="30" colspan="7" align="center"><font color="#990000">您 暂 未 拍 照 到 贴 纸</font></td>
        </tr>
<%
	else
		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
		for i=1 to rs.PageSize
		if rs.EOF or rs.BOF then exit for
%>
	<tr style="cursor:hand" onMouseOver="this.style.backgroundColor='F0F0F0'" onMouseOut ="this.style.backgroundColor='FFFFFF'">
		<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 width="134" align="center"><%= left(rs("Intro"),7) %></td>
		<td align="center"><%=rs("AddDate")%></td>
		<td align="center"><% if rs("tj")=0 then Response.Write("未推荐")%><% if rs("tj")=1 then Response.Write("<font color='red'>已推荐</font>")%></td>
		<td align="center"><% if rs("zhuangtai")=0 then Response.Write("<font color='red'>未审核</font>")%><% if rs("zhuangtai")=1 then Response.Write("已审核")%></td>
	    <td align="center"><a href="?action=del&id=<%= rs("id") %>&url=<%= rs("PicURL") %>" title="删除该记录?" onclick='{if(confirm("删除后将无法恢复，您真的要删除么？")){return true;}return false;}'><img src="images/button_15.gif" width="46" height="20" border="0" style="cursor:hand"></a></td>
	</tr>
<%
		rs.movenext
		next
	end if
%>
  </table>
	<table width="95%" 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="35%" align="left">当前页0/0</td>
		<%end if%>
		<td width="52%" align="right"> <a href="?page=1">首页</a>|
		<%if pre then%>
		<a href="?page=<%=intpage -1%>">上页</a>| <%end if%>
		<%if last then%>
		<a href="?page=<%=intpage +1%>">下页</a> |<%end if%>
		<a href="?page=<%=rs.PageCount%>">尾页</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%>" selected><%=i%></option>
		<%else%> 
		<option value="?page=<%=i%>"><%=i%></option>
		<%
			end if
			next
		%>
		</select>页
		</td>
		</tr>
	</table>
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="0">
          <tr>
            <td align="center"><img src="images/button_15.gif" width="46" height="20" style="cursor:hand"></td>
            <td align="left"> 记录一经删除，相应的贴纸也被删除，不可再恢复，请慎用！！！</td>
          </tr>
        </table></td>
                    </tr>
                </table>
              </TD></TR>
          </TBODY>
        </TABLE>
        <br>
      </TD>
    </TR>
  </TBODY>
</TABLE>
<%
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
%>
</BODY>
</html>