<?php
@session_start();
include('inc/conn.php');
include('checkstate.php');
include('inc/function.php');
$cateid=$_GET['cateid'];
$cate=sql_select('select * from news_category where id='.$cateid);
 ?>
<!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" />
<meta name="robots" content="noindex,nofllow">
<title><?php echo $cate[0][2];  ?></title>
<link rel="stylesheet" type="text/css" href="css/css.css" />
<link rel="stylesheet" type="text/css" href="css/css2.css" />


</head>

<body>
<div id="main">
    <div id="top">
        <?php include('header2.php');  ?>
       <div id="logo">
       <div id="menu">
          <ul><li><a href="manage.php">系统首页</a></li>
         <li class="current"><a href="news.php">新闻</a></li>
          <li><a href="commontools.php">工具箱</a></li>
       </ul><iframe style=" float:right" width='350' height='30' marginwidth='0' marginheight='0' hspace='0' vspace='0' frameborder='0' scrolling='No' src='http://m.weather.com.cn/m/p3/weather1.htm' name="I6"></iframe></div>
       </div>
    </div>
     <!-- left -->
     <div id="newsleft">
     <!-- wenzhang-->
       <div id="titles">ETW国际导读  &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp; etw国际</div>
        <div id="artbody">
          <ul>
<?php $sql="select * from etw_html  order by id asc";
$result=mysql_query($sql);  
while($rs=mysql_fetch_array($result)){ ?>           
           <li><a href="<?php echo $rs[url] ?>"> <?php echo $rs['title'];  ?></a></li>
              <?php }  ?>
          </ul> 
        </div>
        <!-- gongju -->
       <div id="titles">一周点击排行  &nbsp;  &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp; etw国际</div>
        <div id="artbody">
          <ul><?php 
$date=date("Y-m-d",time());
 $date2=date("Y-m-d",(time()-7*24*60*60));
$sql="select * from news_news where  modtime<'".$date."' and modtime>'".$date2."' order by counts desc limit 0,10";
$result=mysql_query($sql);  
$i=1;
while($rs=mysql_fetch_array($result)){ ?>           
           <li><a href="newsdetail.php?id=<?php echo $rs[id] ?>"><span><?php echo $rs[counts]."次"; ?></span> <img src="images/<?php echo $i;  ?>.gif" /> <?php echo utf8Substr($rs['title'],0,13);  ?></a></li>
              <?php $i++; }  ?></ul>
        </div>
        
     </div>
    <!-- right --> 
  <div id="newsright">
      <div id="middle"><div id="titles"><?php echo $cate[0][2];  ?></div>
      <ul>
<?php 

$sql="select * from news_news where cateid=".$cateid." order by addtime desc limit 0,30";
$result=mysql_query($sql);  
while($rs=mysql_fetch_array($result)){ ?>           
           <li><a href="newsdetail.php?id=<?php echo $rs[id] ?>"> <?php echo $rs['title']." ( ".substr($rs[addtime],0,10).")"; ?></a></li>
              <?php }  ?>
</ul>
      </div>
      <!--<div id="rightdiv"><p>精彩图库</p>
      <ul>
      <?php // $sql="select * from news_news where cateid=6 order by counts desc";
//$result=mysql_query($sql);  
//while($rs=mysql_fetch_array($result)){   $pics=explode(";",$rs['picurl']);  ?>
      <li><img src="newsimage/<?php // echo $pics[0] ?>"  width="160" /><br /><?php // echo $rs['title']; ?></li><?php // } ?></ul>
      </div>-->
  </div>
    <div id="newsfoot">Copy Rright &copy; 2008-2009 ETW International<?php if( @$_SESSION["username"]<>''){?>
<input type="hidden" id="onlineu" value="<?php echo $_SESSION["username"] ?>" />
<script type="text/javascript" src="js/onlinelisten.js"></script>
<script type="text/javascript">
window.setInterval(onlinemessage,30000);
</script>
<?php } ?></div> 
</div>
<?php mysql_close();?>
</body>
</html>
