<?php
//print_r( $_SESSION );
include_once( ROOT . 'lib/biz.function.php' );
include_once( ROOT . 'lib/discuz.function.php' );
$modules = get_active_modules();
?>
<br/>
<table border="0" width="98%" id="table1" cellspacing="0" cellpadding="0" height="40" align="center">
	<tr>
		<td valign="top">
		<?php
		
		$i = 0;
		$j = 0;
		
		$tline[$i][] = '<a href="./">首  页</a>';
		$i++;

		if( count( $modules ) > 0 ) 
		{
			foreach( $modules as $module )
			{
				$tline[$i][] = '<a href="./?u=' . $module['dy_module_en_name'] . '">' . $module['dy_module_name'] . '</a>'; 
				$aline[] = '<a href="./?u=my_' . $module['dy_module_en_name'] . '">' . $module['dy_module_action'] . '</a>';  
			}
			$i++;
		}

		if( is_login() )
		{
			$tline[$i][] = '<a href="?a=people&uid=' . $_SESSION['dy_uid'] . '">我的' . _conf( 'WEB_SITE_NAME' ) . '</a>';
		}

		if( count( $aline ) > 0 )
		{
			foreach( $aline as $l )
			{
				$tline[$i][] = $l;
			}

			$i++;
		}

		if( isset( $_SESSION['dy_city'] ) && !is_empty($_SESSION['dy_city']) )
		{
			$tline[$i][] = '<a href="?a=location&city=' . $_SESSION['dy_city'] .'">同  城</a>';
		}
		else
		{
			$tline[$i][] = '<a href="?a=location">同  城</a>';
		}

		if( _conf( 'DZ_ON' ) )
		{
			$tline[$i][] = '<a href="' . _conf('DZ_INDEX_URL') . 'webii.php" target="_blank">论  坛</a>';
		}

		$i++;

		if( !is_login() )
		{
			$tline[$i][] = '<a href="./?a=register">快速注册</a>';
		}
		else
		{
			$tline[$i][] = '<a href="?a=riki&tag=invite">邀 请</a>';
		}

		if( is_admin() )
		{
			$tline[$i][] = '<a href="?a=admin" target="_blank">管 理</a> ';
			if( $c = get_suggest_num_by_status( 1 ) > 0 ) $tline[$i][] = '<a href="?a=admin_content_refactory&status=1" target="_blank"><font color=red>' . $c . '个Suggest开启中...</font></a>';
			
			
		}

		foreach( $tline as $line )
		{
			$ls[] = join( ' · ' , $line );
		}

		echo join( ' | ' , $ls );

		?>
		<br><br><br><span class="title_2"><?php echo $title ?></span>&nbsp;&nbsp;&nbsp;<span class="gact"><a href="?a=to_admin&forward=<?php echo urlencode( get_page_url() ) ?>">&gt; 对这个页面我有话要说！</a></span>
		</td>
		<td rowspan="2" valign="bottom">
		<p align="right">
		<a href="<?php echo _conf('WEB_SITE_ROOT_URL');  ?>"><img border="0" src="<?php echo _conf( 'WEB_SITE_LOGO_URL' )?>"  vspace="8" hspace="20"></a><br/>
		<?php if( !is_login() ): ?>
		你好，请 <a href="?a=login">登录</a> 或 <a href="?a=register">注册</a>
		<?php else: ?>
		<a href="?a=login" style="color: #999999;">我不是<?php echo $_SESSION['dy_nickname'] ?></a>　　　<a href="?a=riki&tag=help"><?php echo _conf( 'WEB_SITE_NAME' ) ?>指南</a>  · <?php echo $_SESSION['dy_nickname'] ?>的<a href="?a=settings">设置</a>
		<?php if( _conf( 'DZ_ON' ) && is_login() ): ?>
		· <a href="<?php echo _conf('DZ_INDEX_URL') ?>webii.php?forward=pm.php" target="_blank">站内邮件<?php  $pm_num = get_user_discuz_pm() ; if( $pm_num > 0) : ?>(<?php echo $pm_num ?>)<?php endif; ?></a>
		<?php endif; ?>
		· <a href="?a=logout">退出</a>
		<?php endif; ?>
		</td>
	</tr>
	</table>
	<table border="0" width="98%" cellspacing="0" cellpadding="0" align="center">
	<tr>
		<td valign="top">
		</td>
		<td align="right" valign="top">
		</td>
	</tr>
</table>
<hr align="left" color="#eff1f2" noShade SIZE="1">
	