<?php
@session_start();
include('inc/conn.php');
include('checkstate.php');
include('inc/function.php');
 ?>
<!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>新闻资讯</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></div>
       </div>
    </div>
     <!-- left -->
     <div id="newsleft">
     <!-- wenzhang-->
       <div id="titles">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">热点新闻 <a href="newszixun.php?cateid=1">[滚动]</a>  <a href="newszixun.php?cateid=2">[国内]</a><a href="newszixun.php?cateid=3">[国际]</a></div>
         <ul class="top1">
<?php 

$sql="select * from news_news where cateid=1 and modtime like '%".$date."%' and length(title)>40 order by special desc limit 0,7";
$result=mysql_query($sql);  
while($rs=mysql_fetch_array($result)){
  if($rs['picurl']<>'' && $rs['special']==1){
    $pics=explode(";",$rs['picurl']); 	
	if(stristr($pics[0], 'http://') == FALSE) {
     $picstr="newsimage/".$pics[0];
    }else{ $picstr=$pics[0];} ?>              
  <li class="hotimg"><a href="newsdetail.php?id=<?php echo $rs[id] ?>"><img src="<?php echo $picstr ?>" width="210" height="180" /><?php echo utf8Substr($rs['title'],0,10); ?></a></li>
<?php }else { ?> 
              <li><a href="newsdetail.php?id=<?php echo $rs[id] ?>"><?php  echo  utf8Substr($rs['title'],0,19);  ?></a></li>
<?php } } ?>
       
        
         </ul>
         <ul class="top2">
<?php 
$sql="select * from news_news where cateid=2  and length(title)>30 order by modtime desc limit 0,10";
$result=mysql_query($sql);  
while($rs=mysql_fetch_array($result)){
  ?> 
              <li class="normal">* <a href="newsdetail.php?id=<?php echo $rs[id] ?>"><?php  echo  utf8Substr($rs['title'],0,15);  ?></a></li>
<?php } ?>
         </ul>
         </div>
         
         <div id="wether">
                <?php echo getday();  ?>
               <iframe src="http://m.weather.com.cn/m/p4/weather1.htm" width="200" height="220" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="No"></iframe>
      
         </div>
         
         <div id="nomal">
            <div class="tit"><a href="newszixun.php?cateid=4">财经频道</a></div>
            <ul>
<?php $sql="select * from news_news where cateid=4 order by addtime desc limit 0,11";
$result=mysql_query($sql);  
while($rs=mysql_fetch_array($result)){ ?>           
           <li><a href="newsdetail.php?id=<?php echo $rs[id] ?>"> <?php echo utf8Substr($rs['title'],0,22);  ?></a></li>
              <?php }  ?>
          </ul> 
         </div>
        
         <div id="nomal" style="margin-left:15px;">
            <div class="tit"><a href="newszixun.php?cateid=7">娱乐资讯</a></div>
            <ul>
<?php $sql="select * from news_news where cateid=7 order by addtime desc limit 0,11";
$result=mysql_query($sql);  
while($rs=mysql_fetch_array($result)){ ?>           
           <li><a href="newsdetail.php?id=<?php echo $rs[id] ?>">  <?php echo utf8Substr($rs['title'],0,22);  ?></a></li>
              <?php }  ?>
          </ul> 
         </div>
         
     </div>
    <div id="newsfoot">Copy Rright &copy; 2008-2009 ETW International </div>
</div>
<?php mysql_close();?>
</body>
</html>
