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

	$hmnewsstyle=1; //1 列表， 2 图文， 3 图标题
	$newsname=    $suffix_str2;

	if(strpos($news_rows['newsText'], "<img") !== false){
		$newsImgStr=getStrbyTag("<img ","/>",$news_rows['newsText']);
		$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=\"".$newsshowFolders."/".$newsname.$news_rows['ID'].".html\"><img ".$newsImg." /></a>
				</div>
			<div id=\"hyr\">
				<h4><a href=\"".$newsshowFolders."/".$newsname.$news_rows['ID'].".html\">".$news_rows['newsTitle']." </a></h4>
					<p><a href=\"".$newsshowFolders."/".$newsname.$news_rows['ID'].".html\">".mb_substr(strip_tags($news_rows['newsText']),0,500, 'utf-8')."</a></p>
					</div></div></div>";
		break;

		case 3: //3 图-标题竖排
			  $mido .= "<div class=\"col-lg-6 col-md-6 col-sm-12 col-xs-12 a1\">
  <div class=\"bbj\"><div id=\"hyl\"><a href=\"".$newsshowFolders."/".$newsname.$news_rows['ID'].".html\"><img ".$newsImg." /></a>
		  <h4><a href=\"".$newsshowFolders."/".$newsname.$news_rows['ID'].".html\">".$news_rows['newsTitle']." </a></h4>
				  </div></div></div>";
		break;

		default: //1 标题列表
			$mido.="<div style=\"padding-left:15px; padding-top:10px;\">
			<img src='images/ico2.jpg' border='0'>
			<a href=\"".$newsshowFolders."/".$newsname.$news_rows['ID'].".html\"><translate>".$news_rows['newsTitle']."</translate></a>
			<span>(".$news_rows['newsDate'].")</span>
			</div>";
	}
?>


