<?php
// 本文档自动生成，仅供测试运行
require "indexAction.class.php";
class cultureAction extends IndexAction
{
    public function index() {
	      $this->nav();
          $this->assign("NewsId",c("0.newid"));
		  $pdf = M("pdf");
		  $maps["del"] = array("eq","0");
		   import("@.ORG.Page");       //导入分页类
		  $count = $pdf->where($maps)->count();    //计算总数
	      $p = new Page ( $count, 30 );
		  $data = $pdf->limit($p->firstRow.','.$p->listRows)->where($maps)->order("times desc")->findall();
		  $j=0;
	      $n=0;
	     for($i=0;$i<30;$i++)
	   {
	     while($j != 10)
		 {
		  //申请新节点
		  $temp[$j] = array();
		  for($k=0;$k<3;$k++)
		  {
		    if(!empty($data[$n]))
			{
		      array_push($temp[$j],$data[$n]);
			}
		
			$n++;
		  }
		  $j++;
		 }
	   }
		
		  $p->setConfig('header','个电子报刊');
	      $page = $p->show ();            //分页的导航条的输出变量
	      $this->assign("page", $page);
		  $this->assign("data",$temp);
		  $this->assign("CategoryName","湖南安装报");
		  
		  //获取网址跟魔力
		  $this->assign("host",$_SERVER['HTTP_HOST']);
          $this->friendship();
		  $this->display();
    }

	
}
?>