<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><?php echo _conf( 'WEB_SITE_SEO_TOP_WORD' ) ?><?php echo $top_title = $title = $item['([$dy_module_content_title])']; ?> - <?php echo _conf( 'WEB_SITE_NAME' ) ?></title>
<meta name="keywords" content="<?php echo _conf( 'WEB_SITE_SEO_META_KEYWORD' ) ?>">
<meta name="description" content="<?php echo _conf( 'WEB_SITE_SEO_META_DESCRIP' ) ?>">
<?php echo _conf('WEB_SITE_SEO_HEADER_CODE'); ?>
<link href="res/css/douya.css" rel="stylesheet" type="text/css">
</head>

<body>

<?php  
	include_once( ROOT . 'res/tpl/header.tpl.html' );
?>
<table border="0" width="98%" id="table1" cellspacing="5" cellpadding="5" height="400px" align="center">
	<tr>
		<td valign="top" class="hline">
		<!-- main -->
		([$template_content])
		 <?php if( is_login() ): ?>
	 <div align="right"><br/><span class="gact" style="float:right;">&gt; <a href="?u=([$dy_module_en_name])_modify&id=<?php echo $item['id'] ?>">增改([$dy_module_content])资料</a></span><br/></div>
	 <?php if( is_admin() || $item['dy_uid'] == $_SESSION['dy_uid']  ): ?>
	 <div align="right"><br/><span class="gact" style="float:right;">&gt; <a href="?u=([$dy_module_en_name])_delete&id=<?php echo $item['id'] ?>">删除([$dy_module_content])资料</a></span><br/></div><?php endif; ?>
	 <?php endif; ?>
	 <h2><?php echo _conf('WEB_SITE_NAME') ?>成员将其标记为　· · · · · ·　
    </h2>
    <div class="indent"><span style="line-height:200%;border-bottom:1px dotted #DDDDDD">
        <?php 
		$tags = get_tags_from_tagstring( $item['dy_tags'] );
		foreach( $tags as $t ): ?>
		<a href="?a=([$dy_module_en_name])_list&tag=<?php echo $t ;?>"><?php echo $t ?></a>&nbsp;&nbsp;
		<?php endforeach; ?>　
    </span></div><br/>
		<!-- 评论 -->
		<h3><?php echo _conf( 'WEB_SITE_NAME' ) ?>成员的评论 (<?php echo $review_count; ?>条)</h3><div class="indent"><span class="pl">看完欢迎点击“有用”或“没用"，一起决定这些评论的排列次序。</span>
		<?php foreach( $reviews as $review ):		?>
		<p class="ul"></p>
		<?php if( $r = get_percent_of_review_rate( $review['id'] )): ?>
		<p class="pl"><?php echo $r ?>的人觉得此评论有用:</p>
		<?php endif; ?>
		<p><a href="?a=review_display&id=<?php echo $review['id'] ?>" class="m"><?php echo $review['dy_title'] ?></a></p>
      <span class="pl">
    <a href="?a=people&uid=<?php echo $review['dy_uid'] ?>"><?php echo $review['dy_nickname'] ?></a><?php if( $review['dy_city'] > 0 ) : ?>(<a href="?a=location&city=<?php echo $review['dy_city'] ?>"><?php echo get_city_name_by_code( $review['dy_city'] ) ?></a>)<?php endif; ?>  
        </span>    <span title="<?php $rt = get_rate_type(  ); echo $rt[$review['dy_rate']] ?>">&nbsp;&nbsp<img src="res/img/<?php echo $review['dy_rate']; ?>stars.gif"/></span><br clear="all"/><br/>
    <a href="?a=people&uid=<?php echo $review['dy_uid'] ?>" title="<?php echo $review['dy_nickname'] ?>"><img border="0" hspace="15" vspace="10" src="<?php echo show_user_icon( $review['dy_uid'] ) ?>" align="left"></a><?php 
	if( is_long_content( $review['dy_content'] , 500 ) )
	{
		echo show_short_content( $review['dy_content'] , 500 ). '(<a href="?a=review_display&id=' . $review['id'] . '">全文</a>)';
	}
	else
	{
		echo $review['dy_content']; 
	}
	?>   <?php if( (is_login() && $review['dy_uid'] == $_SESSION['dy_uid'] ) || is_admin() ) : ?>
	 <div align="right"><span class="gact" style="float:right;">&gt; <a href="?a=review_modify&id=<?php echo $review['id'] ?>">修改</a> &nbsp;&nbsp;&nbsp;&gt; <a href="?a=review_delete&id=<?php echo $review['id'] ?>">删除</a></span></div>
	 <?php endif; ?><p/> 　　    
<br/>　　    
<br/>　　<br clear="all"/><br/><p class="pl"><?php echo date("Y-m-d H:i") ?>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href="?a=review_display&id=<?php echo $review['id'] ?>"><?php if( $review['dy_reply_count'] > 0 ) echo $review['dy_reply_count']; ?>回应</a>&nbsp;&nbsp;&nbsp;
    
        |&nbsp;&nbsp;&nbsp;此评论对你&nbsp;
        <span class="act"><a href="?a=review_vote&vote=down&mid=([$module_id])&id=<?php echo $review['id'] ?>">没用</a></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="act"><a href="?a=review_vote&mid=([$module_id])&vote=up&id=<?php echo $review['id'] ?>">有用</a></span>
        </p><br/>
		<?php endforeach; ?>
		<br/><br/><span class="act"><a href="?a=review_add&ua=([$dy_module_en_name])&mid=([$module_id])&title=<?php echo urlencode($item['([$dy_module_content_title])']) ?>&id=<?php echo $item['id'] ?>">我来评论这篇文章</a></span>
		</td>
		<td width="300px" class=top>
		<!-- right -->
		<div align="center"><form name="search_bar" id="search_bar" method="GET"><table align="center" class="info_box" cellspacing="5" cellpadding="5"><tr><td class="sbjtd">
    <p align="center" class="pl">
	<input name="search_text" type="text" size="24" maxlength="72"" value="" id="page_focus"/>
    <input name="search_submit" class="butt" type="submit" value="搜索"/><br/>
	<?php 
	if( $modules = get_active_modules())
	{
		foreach( $modules as $module )
		{
			$html[] = '<input name="u" type="radio" value="' . $module['dy_module_en_name'] . '_list">' . $module['dy_module_content'] ;	
		}
		echo join( '&nbsp; &nbsp;' , $html );
	}
	?>
     </p></td></tr></table></form></div>
    <br/>
	<?php if( is_login() ):	?>
	<h2>这([$dy_module_content])我　· · · · · · </h2>
	<div class="indent"><p>
	([foreach from=$dy_module_action item=item])
	<?php  $txt = get_vote_txt( ([$module_id]) , $item['id'] , $_SESSION['dy_uid']  );
	if( $txt == '([$item])' ):
	?>
	([$item])&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <?php else: ?>
	<span class="act"><a href="?a=vote&ua=([$dy_module_en_name])&mid=([$module_id])&id=<?php echo $item['id']; ?>&status=([$item])">([$item])</a></span>
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	<?php endif; ?>
	([/foreach])
	</p></div><br/>
     <?php endif; ?>
			<h2>我来评价/评价汇总　· · · · · ·　
    </h2>
    <div class="indent">
	<?php 
	include_once( ROOT . 'meta/core.meta.php' );
	$data = get_rate_data( ([$module_id]) , $item['id']  ) ;
	$my_rate = get_my_rate_data( ([$module_id]) , $item['id'] , $_SESSION['dy_uid']  );
	$rate_txt = get_rate_type();
	?>
	<?php for( $i = 5 ; $i >=1 ; $i-- ){ ?>
	<?php if( $i == $my_rate ): ?>
	<?php echo $rate_txt[$i] ?> <img src="res/img/<?php echo $i ?>stars.gif" border="0"><span class=explain><?php if(  is_array_key( $i , $data ) ) echo '  ' . $data[$i] . '  '; ?> -- 我的评价 --</span><br/>
	<?php else: ?>
	<a href="?a=rate&r=<?php echo $i ?>&mid=([$module_id])&id=<?php echo $item['id']; ?>"><?php echo $rate_txt[$i] ?></a> <a href="?a=rate&r=<?php echo $i ?>&mid=([$module_id])&id=<?php echo $item['id']; ?>"><img src="res/img/<?php echo $i ?>stars.gif" border="0"></a> <span class=explain><?php if( is_array_key( $i , $data ) ) echo '  ' . $data[$i] . '  '; ?> <br/>
	<?php endif; ?>
	<?php } ?>
	</div>
	<br/>
	
	<h2>谁([$dy_module_action_default])这([$dy_module_content])?</h2>
	<?php 
	include_once( ROOT . 'meta/city.meta.php' );
	$data = array_chunk(get_vote_info_by_status( ([$module_id]) , $item['id'] , '([$dy_module_action_default])' ) , 3 ); 
	?>
<table class="ptable" cellspacing="5" cellpadding="5" border="0">
<?php foreach(  $data as $member_line): ?>
<tr>
<?php foreach( $member_line as $m ): ?>
<td style="vertical-align: top"><a href="?a=people&uid=<?php echo $m['dy_uid'] ?>"><img src="<?php echo show_user_icon( $m['dy_uid'] ) ?>" class="m_sub_img" border="0" /><br/><?php echo $m['dy_nickname'] ?></a>
<?php if( !is_empty($m['dy_city']) && $m['dy_city'] > 0 )
{
	echo '<br/>(<a href="?a=location&city=' . $m['dy_city'] . '">' . get_city_name_by_code($m['dy_city']) . '</a>)';
} 
?></td>
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
</table><br clear="all"/><?php $c = get_vote_txt_count( ([$module_id]) , $item['id'] , '([$dy_module_action_default])' ); 
if( $c > 6 ) :
?>
<p class="pl">&gt; <a href="?a=vote_search&mid=([$module_id])&cid=<?php echo $item['id'] ?>&staus=<?php echo urlencode( '([$dy_module_action_default])' ) ?>">... 和其他 <?php echo ( $c-6 ) ?>人([$dy_module_action_default])</a></p>
<?php endif; ?>		
		</td>
	</tr>
</table>
<?php  
	include_once( ROOT . 'res/tpl/footer.tpl.html' );
?>
</body>

</html>