<style type="text/css">
*{ margin:0; padding:0;}

.tables tr{background-color:expression('#F8F8F8,#EFEFEF'.split(',')[rowIndex%2]); line-height:20px; padding:10px;}
.tables tr.gren{ background:#E8EFF5; height:35px; line-height:30px; font-size:14px;}
table{ width:100%; text-align:center; font-size:12px; margin-top:15px; border-collapse:collapse;}
td{ padding:10px 0;}
.ee{ background: url(images/email1.gif)  no-repeat center left; padding-left:10px;}
.red{ color:#FF0000}
</style>
<table cellpadding="0" cellspacing="0" class="tables">
  <tr class="gren">
    <th width="60" scope="col">序号</th>
    <th width="84" scope="col">类型</th>
    <th width="340" scope="col">主题</th>
    <th width="218" scope="col">E-mail</th>
    <th width="108" scope="col">询盘时间</th>    
    <th width="139" scope="col">回复时间/次数</th>
    <th width="71" scope="col">语言</th>
    <th width="101" scope="col">状态</th>
  </tr>
<?php

	//$sql="select max(id) as id,yid,title,contacter,email,language,senddate,reply,translate,replycounts,readed,max(childuserid) as childuserid from etw_onlines where ".$where."  usernameid=".$_SESSION['guestid'].$wherechild." and isdelete=0 and readed=1 group by title,contacter,email,address,content order by senddate desc limit ".$start.",".$muns;
	 $sql="select * from etw_onlines where ".$where." id in(".$id.") and  readed=1 order by senddate desc limit ".$start.",".$muns;
	$result=mysql_query($sql);
	$i=1;
    while($rs=mysql_fetch_array($result)){
	   $isread=$rs['readed'];
	if($isread==1){
	if($rs['language']=='no'){  continue; }
 ?>
  <tr>
   <td><p class="ee"><?php echo $i ; ?></p></td>
   <td><?php if($rs['yid']=='-1'){ echo "邮件"; }else{ echo "留言询盘"; } ?></td>
    <td><a href="inquirydetail.php?id=<?php echo  $rs['id']; ?>" title="<?php echo "子帐户：".getchildemail($rs['childuserid']); ?>"><?php echo  $rs['title']; ?></a></td>
    <td><?php echo  $rs['email']; ?></td>
    <td><?php echo  substr($rs['senddate'],0,10); ?></td>
    <td><?php if($rs['reply']==0){if($rs['translate']==0){ echo "未回复"; }else{ echo  date('y-m-d',$rs['translate']);}}else{
	 echo  date('y-m-d',$rs['reply']);} echo "/<font color='#0000ff'>".$rs['replycounts']."</font>";  ?></td>
    <td><?php echo  getlanguage($rs['language']); ?></td>
    <td><?php echo translatestatus($rs['id']);  ?></td>
    
  </tr>
<?php  }else{  ?>
  <tr ><!--style="font-weight:bold;"-->
   <td><p class="ee"><?php echo $i ; ?></p></td>
   <td><?php if($rs['yid']=='-1'){ echo "邮件"; }else{ echo "留言询盘"; } ?></td>
    <td><a href="inquirydetail.php?id=<?php echo  $rs['id']; ?>"  title="<?php echo "子帐户：".getchildemail($rs['childuserid']); ?>"><?php echo  $rs['title']; ?></a></td>
    <td><?php echo  $rs['email']; ?></td>
    <td><?php echo  substr($rs['senddate'],0,10); ?></td>
    <td><?php if($rs['reply']==0){if($rs['translate']==0){ echo "未回复"; }else{ echo  date('y-m-d',$rs['translate']);}}else{
	 echo  date('y-m-d',$rs['reply']); } echo "/<font color='#0000ff'>".$rs['replycounts']."</font>";   ?></td>
    <td><?php echo  getlanguage($rs['language']); ?></td>
    <td><?php echo translatestatus($rs['id']);  ?></td>
    
  </tr>

<?php } $i++; }  ?>
</table>

