<!--#include file="../Include/Char.jsp" -->
<!--#include file="../Include/Conn.jsp" -->
<!--#include file="../Include/upload_5xsoft.inc" -->
<!--#include file="../Include/const.jsp" -->

<%
   if Request.Cookies("UserID") = "" THEN
     Response.Redirect("Login.jsp")
	 Response.End()
   end if
  
  m_CompanyID = Request.Cookies("companyid")  
  m_ployId = CheckStr(Request("PloyID"))
  IF CheckStr(Request("Type")) = "Delet" AND  m_ployId <> ""  THEN
      SQL="DELETE FROM CityCard_LeaguePloy WHERE F_ID="&m_ployId
      Conn.Execute SQL  
  END IF 
	  
 pgno=request("pageno")
 if pgno="" or pgno<0 then pgno=1
 response.Cookies("onepage1")=8	  
	  
 SET rs=server.createobject("adodb.recordset")
 SQL="SELECT * FROM  CityCard_LeaguePloy WHERE F_CompanyID ="&m_CompanyID &" Order by F_ID DESC"
 Rs.Open SQL,conn,1,1 
 
 if not rs.eof then
	   noterr = "OK"
	  rs.movefirst
	 
	   rs.pagesize=request.Cookies("onepage1")
	   maxpage=rs.pagecount
	   
	   if rs.recordcount>0 then
	      rs.movefirst
		  rs.absolutepage=cint(pgno)
		end if
	
		   preno=pgno-1
		   postno=pgno+1
	 
	end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=site_info(0)%>-商家管理系统</title>
<link href="../Include/Style.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>
<SCRIPT language=JavaScript src="../include/Popcalendar.js"></SCRIPT>
</head>

<body onLoad="MM_preloadImages('images/xf_link1b.gif','images/xf_link2b.gif','images/xf_link3b.gif','images/xf_link4b.gif','images/xf_link5b.gif','images/ly_b_2b.gif','images/ly_b_4b.gif','images/ly_b_1b.gif','images/ly_b_3b.gif','images/ly_b_5b.gif')">

<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr> 
    <td width="170" height="500" rowspan="2" valign="top" bgcolor="f5f5f5"> <!--#include file="Left.jsp" --> </td>
    <td width="10" rowspan="2" valign="top"></td>
    <td width="600" height="409" valign="top">
      <table width="600" border="1" cellpadding="0" cellspacing="5" bordercolor="e2e2e2" bgcolor="f5f5f5">
        <tr> 
          <td height="25" background="images/about_bj.gif" class="p4">&nbsp;<b>·</b><strong>活动信息管理　　<b><a href="Ploy_Send.jsp"><font color="#FF0000">活动发布</font></a></b> 
            </strong></td>
        </tr>
      </table>
      <table width="600" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="5"></td>
        </tr>
        <tr> 
          <td height="1" background="images/line.gif" ></td>
        </tr>
      </table>
      <br> 
      <table width="96%" border="0" align="center" cellpadding="3" cellspacing="1" bordercolor="#000000" bgcolor="#FFFFFF">
        <tr> 
          <td width="8%" align="center" bgcolor="f2f2f2"><strong>ID</strong></td>
          <td width="43%" bgcolor="f2f2f2"><strong>活动名称</strong></td>
          <td width="17%" align="center" bgcolor="f2f2f2"><strong>活动分类</strong></td>
          <td width="18%" align="center" bgcolor="f2f2f2"><strong>发布时间</strong></td>
          <td width="14%" align="center" bgcolor="f2f2f2"><strong>管理</strong></td>
        </tr>
        <tr> 
          <td height="1" colspan="5" bgcolor="#8C8C8C"></td>
        </tr>
        <%
j=0
i=0
do while not rs.eof and j<rs.pagesize
  recno=(pgno-1)*rs.pagesize+1
  i = i+1
 
  %>
        <tr> 
          <td align="center"><%=i%></td>
          <td><a target="_blank" href="../jubao/ShowPloy.jsp?id<%=rs("F_ID")%>" title='查看： <%=rs("F_Title")%>'><%=rs("F_Title")%></a></td>
          <td align="center">
		  <%
		  m_SQL = "SELECT * FROM CityCard_LeaguePloyclass where f_id="&rs("f_classid")
	      Set rst = conn.Execute(m_SQL)
		  if not rst.eof then
		  %>
		  <%=rst("f_value")%>
		  <%
		  end if 
		  rst.close
		  set rst=nothing
		  %>
		  </td>
          <td align="center"><font color="#999999"><%=datevalue(rs("F_Addtime"))%></font></td>
          <td align="center"><a href='#' onClick="MM_openBrWindow('ploy_update.jsp?PloyID=<%=rs("F_ID")%>','ployupdage','width=420,height=410')">修改</a>|<a href='?Type=Delet&PloyID=<%=rs("F_ID")%>' onClick="{if(confirm('确定删除选定的纪录吗?')){return true;}return false;}" >删除</a></td>
        </tr>
        <%
  j=j+1
  rs.movenext
  loop
%>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="39" align="center"><strong><b><a href="Ploy_Send.jsp"><font color="#FF0000">&gt;&gt; 
            发布活动信息 &lt;&lt;</font></a></b> </strong></td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td valign="top"><table width="96%" border="0" align="center" cellpadding="3" cellspacing="1">
        <tr>
          <td height="22" bgcolor="f2f2f2">　共找到 [ <font color=ff0000><%=rs.recordcount%></font> 
            ] 条信息 　 
            <%
	  response.write "<a href='?pageno=1' title='首页' > 首页 </a>"
	  if preno>0 then
	  Response.write "<a href='?pageno="&preno&"'title='上一页' >　上一页　</a>"
	else
     response.write "　上一页　" 
    end if
	
	if postno<=maxpage then
	  Response.write "<a href='?pageno="&postno&"' title='下一页' >　下一页　</a>"
	else
    response.write "　下一页　"
	end if
	Response.write "<a href='?pageno="&maxpage&"' title='末页'>　末页　</a>"
	%>
            　　<font color="#FFFFFF">第<font color="#FF0000"><%=pgno%></font></font>页/共 
            <font color=ff0000><%=maxpage%></font> 页</td>
        </tr>
      </table></td>
  </tr>
</table>

</body>
</html>
