<?php
if(!defined('IN_DEMOSOSO')) {
	exit('this is wrong page,please back to homepage');
}
?>


<?php
 
	 	     //begin list---------------
         $pidcate= $curcatepidname;
          $cus_columnsv = ' '.cus_columnsfun($cus_columns);
           $cus_columnsv_bt = ' '.cus_columnsfun_bt($cus_columns);
        $dhtrigger = 'slick'.rand(1000,9999);
      //------------------
	 $sqlwhere = wherecatev($mainpidname,$curcatepidname);
		$sqlnode="select * from ".TABLE_NODE." where  $sqlwhere and sta_visible='y' and sta_noaccess='n' ".ANDLANGBH."   order by pos desc,dateedit desc ";

				// echo $sqlnode;
				$fenum = getnum($sqlnode);
				if($fenum==0) {
					echo NOARTICLE;
				$result = array();
				}
				else {
 
					$page_total=ceil($fenum/$maxline);
					// if($page>$page_total) $page=$page_total; //if have,then not jump in pager.php

					 if($page>$page_total) $page=$page_total;
					 if($page==0)   $page = 1;
					  
							$start=($page-1)*$maxline;
							if($start<0) $start=0;

 
								//$sqllist33="$sqlnode  limit $start,$maxline";
							 // echo $sqllist33;exit;
								//$result = getall($sqllist33);
								 $sqlarr = array( 
						                'excerpt'=>$cus_substrnum,
						                'start'=>$start,
						                'maxline'=>$maxline,
						                'order'=>'','where'=>''
						                );
								  
						              $result = getarr_node($curcatepidname,$sqlarr);

					 
	//--------------

					//echo $template;
 		//if(DMFABU=='n'){    //此代码仅测试时用。
			//if($mainpidname=='cate20150805_1125344029') {
				//  if(@$_COOKIE["cookievaluelist"]<>'')  $template = @$_COOKIE["cookievaluelist"];
			//}
        //}
         	 
			 
            if(substr($template,0,5)=='self_') $reqfile =    TPLCURROOT.'selfblock/catelist/'.$template;
           else  $reqfile = SYSBLOCKROOT.'catelist/'.$template;
            //echo $reqfile; exit;
             if(checkfile($reqfile)) require $reqfile;		 		 

	      }
		 require  SYSBLOCKROOT.'other/plugin_pager.php';

 //end list---------------
 