<?php
if(!isset($GLOBALS['_vars'])) $GLOBALS['_vars'] = array(); 
$fields = array();
?><!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 $cfg_webname; ?> - 留言本</title>
<link href="<?php echo $cfg_templeturl; ?>/default/style/dedecms.css" rel="stylesheet" type="text/css" media="screen" />
<style>
	.lefttd {
		border-left:1px solid #dedede;
		border-right:1px solid #dedede;
	}
	.ltd {
		border-left:1px solid #dedede;
		border-right:1px solid #dedede;
		border-top:1px solid #dedede;
		border-bottom:1px dashed #dedede;
	}
	.msgtd {
		line-height:180%;
		border-right:1px solid #dedede;
		padding:5px;
		height:80px;
	}
	.timetd {
		border-right:1px solid #dedede;
		border-top:1px solid #dedede;
		border-bottom:1px dashed #dedede;
		padding-left:5px;
	}
	.bottomtd {
		border-right:1px solid #dedede;
		border-top:1px dashed #dedede;
		padding-left:5px;
	}
	.writetable td {
		padding: 5px;
	}
	.writetd {
		background:url(img/wbg.gif);
	}
	.pagetable {
		border:1px solid #dedede;
		margin-bottom:8px;
		background:#FBFEED;
	}
 .pagelistbox {
 	
 }
 .pagelistbox span{
 	  border:1px solid #dedede;
 	  padding:2px;
 	  margin-right:3px;
 	  background:#E8F9BF;
 }
 .pagelistbox a {
 	  border:1px solid #dedede;
 	  padding:2px;
 	  margin-right:3px;
 	  background:#E8F9BF;
 	  padding-left:5px;
 	  padding-right:5px;
 }
 .rebox {
   width:98%;
   padding:3px;
   border:1px solid #dedede;
 }
</style>
</head>
<body class="mapspage">
<div class="header">
<div class="top w960 center">
		<div class="title">在线留言
		</div><!-- /title -->
	</div><!-- /top -->
</div><!-- /header -->
<div class="w960 clear center mt1">
  <div class="sp-title">
  </div>
  <?php 
  $ntt=0;
  $bgcc = '#FBFEED';
  
$atts = array();
$atts['tagname'] = 'datalist';
$blockValue = $this->refObj->GetArcList($atts,$this->refObj,$fields); 
if(is_array($blockValue)){
foreach( $blockValue as $key=>$fields )
{
?>
    <table width='100%' border='0' align="center" cellpadding='0' cellspacing='0' style="<?php echo (($ntt==0) ? "background:{$bgcc}" : 'background:#ffffff'); ?>">
      <tr>
        <td width='160' align="center" bgcolor="#B5D2A2" class='ltd'>
        	<b><?php echo $fields['uname']; ?></b>
        </td>
      	<td height="26" bgcolor="#B5D2A2" class='timetd'>
      		主题：<?php echo $fields['title']; ?>
      	  &nbsp; &nbsp;&nbsp;&nbsp;
      	  <img height='16' src='guestbook/images/time.gif' width='16' /> 时间: <?php echo MyDate('m-d H:i',$fields['dtime']); ?>
      	</td>
      </tr>
      <tr>
      	<td width='160' rowspan='2' align="center" class='lefttd'>
        	<table width='160' border='0' align="center" cellpadding='1' cellspacing='2'>
          	<tr>
            	<td height="8" align="center"><?php echo GetIsCheck($fields['ischeck'],$fields['id'])?>
            	</td>
          	</tr>
          	<tr>
            	<td height="20">&nbsp;电话：<?php echo $fields['qq']?></td>
          	</tr>
          	<tr>
            	<td height="20">&nbsp;来自：<?php echo $fields['ip'] ?></td>
          	</tr>
        	</table>
        </td>
      	<td class='msgtd'><?php echo $fields['msg']; ?></td>
      </tr>
      <tr>
      	<td height="26" class="bottomtd">
      		<a href='mailto:<?php echo $fields["email"]?>'><img src='guestbook/images/mail.gif' border=0 width='16' height='16' />[邮件]</a> &nbsp;
      		<a href='http://<?php echo $fields['homepage']?>' target='_blank'><img src='guestbook/images/home.gif' border=0 width='16' height='16' />[主页]</a> &nbsp;
      		<a href='guestbook.php?action=admin&id=<?php echo $fields['id']; ?>'><img src='guestbook/images/quote.gif' border=0 height=16 width=16 />[回复/编辑]</a> &nbsp;
      		<?php if($g_isadmin) { ?>
      		<a href='guestbook.php?action=admin&id=<?php echo $fields['id']; ?>&job=del'><img src='guestbook/images/del.gif' border=0 height=16 width=16 />[删除]</a>
      	  <?php }  ?>
      	</td>
      </tr>
    </table>
    <?php if($ntt==0){$ntt=1;}else{ $ntt=0; } 
}
}?>
    
   <table border='0' cellpadding='0' cellspacing='0' width='100%' align='center' class='pagetable'>
     <tr>
        <td align="center" height='28'> <?php
$atts = array();
$atts['tagname'] = 'pagelist';
$atts['listsize'] = '5';
 echo $this->refObj->GetPageList($atts,$this->refObj,$fields); 
?>
 </td>
     </tr>
   </table>
   <br />
</div>



</div>
</body>
</html>