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

	$hmnewsstyle=$catenews['newstype']; //1 列表， 2 图文， 3 图标题
	$headerurl=$catenews['headerurl'];
	$cateName11=$cateName;$cateName="article"; //换
	include("inc/switchShowPage.php");
	$cateName=$cateName11;
	$arhref=$showFolders."/".$s_show.$news_rows['ID'].".html";
	$articlefile=trim($news_rows['downloadName']);
	if($functionName=="Download" && trim($news_rows['articleText'])==""&& $articlefile!="") $arhref=$downloadFolders."/".$articlefile; //没内容有下载
	
	$arhref=$headerurl==""?$arhref:$headerurl;	//headerurl优先显示
	if(strpos($news_rows['articleText'], "<img") !== false){
		$newsImgStr=getStrbyTag("<img ","/>",$news_rows['articleText']);
		$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 默认图
			$mido.="<div class=\"col-lg-12 col-md-12 col-sm-12 col-xs-12 help_a1\">
		<div class=\"bbj\"><div id=\"hyl\"><a href=\"".$arhref."\"><img ".$newsImg." /></a>
				</div>
			<div id=\"hyr\">
				<h4><a href=\"".$arhref."\">".$news_rows['articleTitle']." </a></h4>
					<p><a href=\"".$arhref."\">".mb_substr(strip_tags($news_rows['articleText']),0,500, 'utf-8')."</a></p>
					</div></div></div>";
		break;
		
		case 3: //3 图-标题竖排
			  $mido .= "<div class=\"col-lg-3 col-md-3 col-sm-3 col-xs-6 a1\">
  <div class=\"bbj\"><div id=\"hysl\"><div id=\"hyimg\"><a href=\"".$arhref."\"><img ".$newsImg." /></a></div>
		  <h4><a href=\"".$arhref."\">".$news_rows['articleTitle']." </a></h4>
				  </div></div></div>";
		break;
		
		default: //1 标题列表
			$mido.="<li><span>(".$news_rows['articleDate'].")</span><a href=\"".$arhref."\"><translate>".$news_rows['articleTitle']."</translate></a></li>";
		 
		
	}
		

?>
