<?php
//cate列表页生成 1299 temp_index  {ls_newslist} ， 1-2 中选一个，另一个用注释即可

	$hmnewsstyle=$funcnews['newstype']; //1 列表， 2 图文， 3 图标题
	$headerurl=$catenews['headerurl'];
	$catefile = $articletplcate==""?str_replace(".",$catenews['ID'].".",$articletplfunc):$articletplcate;//中类 typeurl不存在，大类typeurl+中类ID
	$cateurl1=funccatear1($functionName,$cateName); // 
	$catefile=$cateurl1==">1"?$catefile:$cateurl1; //1篇跳到详细
	$catefile=$headerurl==""?$catefile:$headerurl; //headerurl优先显示，添加，修改程序还没有
	if(strpos($catenews['detail'], "<img") !== false){
		$newsImgStr=getStrbyTag("<img ","/>",$catenews['detail']);
		$imgHeight=getStrbyTag('height="','" ',$newsImgStr,false);
		$imgWidth=getStrbyTag('width="','" ',$newsImgStr,false);
		$newsImg=getStrbyTag('src="','" ',$newsImgStr);
		$newsImg = str_replace('../','',$newsImg);
	}else{
		$newsImg=" src=\"images/demo.jpg\" width=\"\" height=\"144\" "; 	
	}

	switch($hmnewsstyle){
		case 2: //2 默认图
			$midocate.="<div class=\"col-lg-12 col-md-12 col-sm-12 col-xs-12 help_a1\">
		<div class=\"bbj\"><div id=\"hyl\"><a href=\"".$catefile."\"><img ".$newsImg." /></a>
				</div>
			<div id=\"hyr\">
				<h4><a href=\"".$catefile."\">".$cateName." </a></h4>
					<p><a href=\"".$catefile."\">".mb_substr(strip_tags($catenews['brief']),0,500, 'utf-8')."</a></p>
					</div></div></div>";
		break;
		
		case 3: //3 图-标题竖排
			  $midocate .= "<div class=\"col-lg-6 col-md-6 col-sm-12 col-xs-12 a1\">
  <div class=\"bbj\"><div id=\"hyl\"><a href=\"".$catefile."\"><img ".$newsImg." /></a>
		  <h4><a href=\"".$catefile."\">".$cateName." </a></h4>
				  </div></div></div>";
		break;
		
		default: //1 标题列表
			$midocate.="<li><span>(".$catenews['date'].")</span><a href=\"".$catefile."\"><translate>".$cateName."</translate></a></li>";
	}
				
?>
