<?php
require("session_check.php");	
$version_url="../doc/version.txt";
$whole_version=file_get_contents($version_url);
	//数据表定义区
	$t_users=$tablePreStr."users";
	$t_groups=$tablePreStr."groups";
	$t_blog=$tablePreStr."blog";
	$t_online=$tablePreStr."online";
	$t_album=$tablePreStr."album";
	$t_photo=$tablePreStr."photo";
	$t_g_subject=$tablePreStr."group_subject";
	$t_affair=$tablePreStr."recent_affair";
	$t_message=$tablePreStr."msgboard";

	//语言包引入
	$f_langpackage=new foundationlp;

	$dbo = new dbex;
	dbtarget('w',$dbServs);

	$sql="select count(*) from $t_users";
	$users_num=$dbo->getRow($sql);

	$sql="select count(*) from $t_groups";
	$groups_num=$dbo->getRow($sql);

	$sql="select count(*) from $t_blog";
	$blogs_num=$dbo->getRow($sql);

	$sql="select count(*) from $t_online";
	$online_num=$dbo->getRow($sql);

	$sql="select count(*) from $t_album";
	$album_num=$dbo->getRow($sql);

	$sql="select count(*) from $t_photo";
	$photo_num=$dbo->getRow($sql);

	$sql="select count(*) from $t_g_subject";
	$subject_num=$dbo->getRow($sql);

	$sql="select count(*) from $t_affair";
	$affair_num=$dbo->getRow($sql);

	$sql="select count(*) from $t_message";
	$message_num=$dbo->getRow($sql);

	$sql="select VERSION()";
	$db_version=$dbo->getRow($sql);

?>
<html>
<head>
<title>后台管理统计</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="css/right.css">
</head>
<body>

<div class="container">
	<div class="rs_head"><?php echo $f_langpackage->f_wel_back?></div>
</div>
	<table class='main main_left'>
		<tr>
			<td><?php echo $f_langpackage->f_set?></td>
		</tr>
	</table>

<div class="container">
	<div class="rs_head"><?php echo $f_langpackage->f_data_num?></div>
</div>
	<table class='main main_left'>
		<tr>
			<td> <a href="member_list.php?order_by=user_id&order_sc=asc"><?php echo $f_langpackage->f_people_num?> ：<?php echo $users_num[0];?></a></td>
			<td> <a href="group_list.php?order_by=group_id&order_sc=asc"><?php echo $f_langpackage->f_group_num?>：<?php echo $groups_num[0];?></a></td>
		</tr>
		<tr>
			<td> <a href="album_list.php?orderby=album_id&ordersc=asc"><?php echo $f_langpackage->f_album_num?> ：<?php echo $album_num[0];?></a></td>
			<td> <a href="photo_list.php?orderby=photo_id&ordersc=asc"><?php echo $f_langpackage->f_photo_num?>：<?php echo $photo_num[0];?></a></td>
		</tr>
		<tr>
			<td> <a href="blog_list.php?order_by=log_id&order_sc=asc"><?php echo $f_langpackage->f_blog_num?>：<?php echo $blogs_num[0];?></a></td>
			<td> <a href="member_list.php?order_by=user_id&order_sc=asc&online=1"><?php echo $f_langpackage->f_online_num?> ：<?php echo $online_num[0];?></a></td>
		</tr>
		<tr>
			<td> <a href="subject_list.php?order_by=subject_id&order_sc=asc"><?php echo $f_langpackage->f_subject_num?> ：<?php echo $subject_num[0];?></a></td>
			<td> <a href="affair_list.php?order_by=id&order_sc=asc"><?php echo $f_langpackage->f_affair_num?> ：<?php echo $affair_num[0];?></a></td>
		</tr>
		<tr>
			<td> <a href="msgboard_list.php?orderby=mess_id&ordersc=asc"><?php echo $f_langpackage->f_mess_num?> ：<?php echo $message_num[0];?></a></td>
		</tr>
	</table>

<div class="container">
	<div class="rs_head"><?php echo $f_langpackage->f_new_official?></div>
</div>
	<table class='main main_left'>
		<tr>
			<th><?php echo $f_langpackage->f_new_official?>：</th>
		</tr>
		<tr>
			<td> <?php echo str_replace("{url}",'<a href="http://www.jooyea.net" target="_blank">',$f_langpackage->f_wel_web)?></a> </td>
		</tr>

		<tr>
			<th><?php echo $f_langpackage->f_skill_serve?>：</th>
		</tr>
		<tr>
			<td>
				<a href="http://tech.jooyea.com/bbs" target="_blank"><?php echo $f_langpackage->f_official_bbs?></a> &nbsp|&nbsp
				<a href="http://tech.jooyea.com/download.php" target="_blank"><?php echo $f_langpackage->f_new_edition?></a>
			</td>
		</tr>

	</table>

<div class="container">
	<div class="rs_head"><?php echo $f_langpackage->f_Program_db_edition?></div>
</div>

	<table class='main main_left'>

		<tr>
			<td> <?php echo $f_langpackage->f_OS?>：<?php echo PHP_OS;?> </td>
		</tr>
		<tr>
			<td> <?php echo $f_langpackage->f_sever_edition?>：<?php echo $_SERVER['SERVER_SOFTWARE'];?> </td>
		</tr>
		<tr>
			<td> <?php echo $f_langpackage->f_db_edition?>：<?php echo $db_version[0];?> </td>
		</tr>
		<tr>
			<td> <?php echo $f_langpackage->f_sns_edition?>：<?php echo $whole_version;?></td>
		</tr>

	</table>

<div class="container">
	<div class="rs_head"><?php echo $f_langpackage->f_team?></div>
</div>
	<table class='main main_left'>

		<tr>
			<td> <?php echo $f_langpackage->f_copyright?> </td>
		</tr>

		<tr>
			<td> <?php echo $f_langpackage->f_ceo?>  ：erysin </td>
		</tr>

		<tr>
			<td> <?php echo $f_langpackage->f_team?>：nswe ，Cain ，bevin ，Jack ，宗阳</td>
		</tr>

		<tr>
			<td> <?php echo $f_langpackage->f_art?>：Eric，Mike </td>
		</tr>

		<tr>
			<td> <?php echo $f_langpackage->f_web?>：<a href="http://www.jooyea.net" target="_blank">http://www.jooyea.net</a></td>
		</tr>

	</table>


</body>
</html>