<?php
	require_once 'admin/include/config.php';
	define("THIS_PAGE","index");
	if(!$hm_arr = get_seo(1)){
		$hm_title = $hm_key = $hm_des = hmcss_default_config(1);
	}
	else{
		$hm_title = $hm_arr[0][2];
		$hm_key = $hm_arr[0][3];
		$hm_des = $hm_arr[0][4];
	}
	$news_id = is_numeric(trim($_GET["news_id"])) ? trim($_GET["news_id"]) : 1;
	$filter[0] = array("0",$news_id,false);
	if(!$hm_arr = get_news($filter))
		show_err("系统中找不到该新闻");
	//取大分类
	$filter[0] = array("2",0,false);
	$type_b_arr = get_product_t($filter);
	//阅读次数加1
	mysql_query("update hmcss_news set news_hits = news_hits+1 where news_id=$news_id") or show_err("增加阅读次数出错");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $hm_title; ?></title>
<meta name="description" content="<?php echo $hm_des; ?>" />
<meta name="keywords" content="<?php echo $hm_key; ?>" />
<link rel="stylesheet" type="text/css" href="style.css" />
<style type="text/css">
#out{width:1000px; overflow:hidden; min-height:600px; height:auto; background-image:url(pics/bg/left_bg.gif); background-repeat:repeat-y;}
#right{width:800px; height:auto!important; min-height:600px; height:auto; float:left;}
.product_list{border:0px; height:auto;}
.product_list li{border-bottom:1px #CCC solid;}
.product_list img{margin:10px auto; float:none;}

/*滚动产品CSS样式*/
.rollBox{width:798px;overflow:hidden; margin:0px; padding:0px; float:left;}
.rollBox .LeftBotton{height:130px;width:8px;background:url(pics/job_mj_069.gif) no-repeat; margin:40px 2px 0px 0px;overflow:hidden;float:left;display:inline; cursor:pointer;}
.rollBox .RightBotton{height:130px;width:10px;background:url(pics/job_mj_069.gif) no-repeat -8px 0;overflow:hidden;float:left;display:inline;margin:40px 0px 0px 4px;cursor:pointer;}
.rollBox .Cont{width:774px;overflow:hidden;float:left;}
.rollBox .ScrCont{width:10000000px;}
.rollBox .Cont .pic{width:194px;float:left;text-align:center;}
.rollBox .Cont .pic img{padding:4px;background:#fff;border:1px solid #ccc;display:block;margin:0 auto;}
.rollBox .Cont .pic p{line-height:25px;color:#505050; margin:0px; padding:0px;}
.rollBox .Cont a:link,.rollBox .Cont a:visited{color:#626466;text-decoration:none;}
.rollBox .Cont a:hover{color:#f00;text-decoration:underline;}
.rollBox #List1,.rollBox #List2{float:left;}
/*滚动产品CSS样式结束*/
</style>
</head>

<body>
<?php require_once("top.php"); ?>
<div class="now_position"><span class="position_str">当前位置：<a href="index.php">首页</a>->新闻详情</span><span class="im_notice">
<marquee direction="left" scrolldelay="100" onmouseout="this.start()" onmouseover="this.stop()" style="width:400px;">
<?php hmcss_notice(); ?>
</marquee></span></div>
<div id="out">
<div id="left">
<?php
	if(!$type_b_arr){
		echo "<div class=\"type_out\">\n\r";
		echo "<div class=\"big_type\"><span class=\"type_left_arr\"></span>系统中暂无分类</div>\n\r";
		echo "</div>\n\r";
	}
	else{
		foreach($type_b_arr as $key => $val){
			echo "<div class=\"type_out\">\n\r";
			echo "<div class=\"big_type\"><span class=\"type_left_arr\"></span><a href=\"product_type.php?t_id=$val[0]\">$val[2]</a></div>\n\r";
			echo "<ul>\r\n";
			//查该大分类下的小分类
			$filter[0] = array("2",$val[0],false);
			if(!$type_s_arr = get_product_t($filter)){
				echo "<li class=\"small_type\">暂无子类</li>\r\n";
			}
			else
			{
				foreach($type_s_arr as $key_s => $val_s)
					echo "<li class=\"small_type\"><a href=\"product_type.php?t_id=$val_s[0]\">$val_s[2]</a></li>\r\n";
			}
			echo "</ul>\r\n";
			echo "</div>\n\r";
		}
	}
?>
</div>
<div id="right">
	<div class="product_list">
        <ul>
        	<li style="width:798px; font-size:18px; font-weight:bold; text-align:center;"><?php echo stripslashes($hm_arr[0][1]); ?></li>
            <li style="width:798px; text-align:center; height:30; line-height:30px;"><?php echo "发布时间：",$hm_arr[0][4],"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;阅读次数：",$hm_arr[0][6] ?></li>
            <li style="width:798px; padding:10px 0px; height:auto; line-height:25px; text-indent:0px; border-bottom:0px;">
<?php echo $hm_arr[0][2]; ?> 
            </li>
        </ul>
    </div>
</div>
</div>
</div>
<div id="foot"><?php unset($hm_arr,$filter,$t_arr); hmcss_foot(); ?></div>
</body>
</html>