<?php
@session_start();
include('inc/conn.php');
include('checkstate.php');
include('inc/function.php');
include('fun/funcount.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><?php echo $info['company'];  ?> - 问题与建议 - ETW 国际客户之窗</title>
<link rel="stylesheet" type="text/css" href="css/css.css" />


</head>

<body>
<div id="main">
    <div id="top">
        <?php include('header.php');  ?>
       <div id="logo">
       <div id="menu">
          <ul><li class="current"><a href="manage.php">系统首页</a></li>
         <li><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 -->
     <?php include('left.php');?>
     
     <div id="right">
         <p class="title"><strong>ETW 国际服务中心</strong> &gt;&gt; 问题与建议 </p>      
         <div id="con">
         <div class="suggests">
         
<?php 
$count=sql_select("select count(*) from etw_suggest where userid=".$_SESSION['guestid']);
$pages= ceil($count[0][0]/5);
$page=$_GET['page'];
if($page==''){$page=1;$start=0; }else{ $start=($page-1)*5; }
$sql="select * from etw_suggest where userid=".$_SESSION['guestid']." order by addtime desc limit ".$start.",5";
      $result=mysql_query($sql);
	  while($row=mysql_fetch_array($result)){  ?>
           <ul><li class="titles"><span>发表于：<?php echo date('y-m-d H:i',$row['addtime']);  ?></span>  类型：<?php echo $row['abouts'] ?> </li>
           <li><?php echo $row['suggest'];  ?></li>
      <?php if($row['etwreply']<>''){ ?>
           <li>ETW 回复：<?php echo $row['etwreply'] ?><br /><span><?php echo date('y-m-d H:i',$row['replytime']);  ?></span></li><?php }  ?>
           </ul>
	<?php   } ?>
    </div>
    <div id="page"><?php if($page==1){ echo "首页 | 上一页";}else { echo "<a href='suggestion.php?page=1'>首页</a> | <a href='suggestion.php?page=".($page-1)."'>上一页</a>"; } 
		  if($page==$pages){echo " | 下一页 | 尾页 &nbsp; (第".$page."页/共".$pages."页)";}else{ echo "| <a href='suggestion.php?page=".($page+1)."'>下一页</a> | <a href='suggestion.php?page=".$pages."'>尾页</a> &nbsp; (第".$page."页/共".$pages."页)"; }
		   ?></div>
         </div>
     </div>
     <div id="footer"> 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>
<script type="text/javascript" src="js/opencommon.js"></script>
<?php mysql_close(); ?>
</body>
</html>