www.gusucode.com > Tatter Tools 0.961 SE GB2312 简体中文版 > upload/admin/statistics.php

    <?
	include("../inc_global.php");
	include("../inc_function.php");
	check_authority();

	if ($mode == "icount") {
		put_query("update t3_".$dbid."_setting set icount = '$icount'");
		?>
		<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312">
<meta name="keywords" content="TT,TatterTools,Skin,php">
<meta name="description" content="Meyu,梦游,华人中文网">
<meta name="generator" content="TatterTools中文BLOG">
<meta name="MSSmartTagsPreventParsing" content="TRUE">
<meta http-equiv="MSThemeCompatible" content="Yes">
</head>
		<script type="text/javascript">
			alert('来访者统计数据初始化完毕,全部的来访者数据将被清空!\t');
			location.href = 'statistics.php';
		</script>
		<?
		exit;
	}

	$row_color = "#F0F8FA";

	admin_header("");
?>

<form method="post" name="stat" action="<?=$PHP_SELF?>">
<input type="hidden" name="mode" value="icount">

	<table cellpadding="0" cellspacing="0"><tr>
	<td width="452" style="padding:10 5 5 5" valign="top">

	<!-- 傈眉 墨款飘 -->

		<table width="100%"><tr>
		<td width="24" align="right"><img src="../images/num_23.gif" height="17" alt=""></td>
		<td width="9"><img src="../images/ver_01.gif" width="9" height="17" alt=""></td>
		<td><img src="../images/cap_23.gif" height="17" alt=""></td>
		</tr></table>

	<? print_content_line(); ?>

		<table class="content_back1" cellpadding="0" cellspacing="5" width="100%" style="background-color:#F0F0F0"><tr>
		<td bgcolor="#FFFFFF" style="padding-bottom:3">

		<?
			$sql = "select sum(count) from t3_".$dbid."_count";
			list ($sum) = mysql_fetch_array(mysql_query($sql));
		?>

			<table cellpadding="0" cellspacing="0" width="100%" style="margin-top:5"><tr>
			<td width="90" align="right" style="padding-top:2">统计IP总数 ::&nbsp;</td>
			<td align="right" style="font-size:20pt; font-weight:bold; font-family:arial; padding-right:63; line-height:140%"><?=set_comma($sum+$p_icount)?></td>
			</tr></table>

		<? input_block() ?>

			<table cellpadding="0" cellspacing="0" width="100%" style="margin:8 0 4 0"><tr>
			<td width="90" align="right" style="padding-top:2">初始化数值 ::&nbsp;</td>
			<td align="right"><input class="text" type="text" name="icount" value="<?=$p_icount?>" maxlength="10" style="width:107; text-align:right;"></td>
			<td width="60" style="padding-left:5"><img class="ib" width="53" height="17" src="../images/b_set.gif" onclick="stat.submit();" alt=""></td>
			</tr></table>

		</td>
		</tr></table>

		<table cellpadding="0" cellspacing="0" width="100%"><tr>
		<td width="225" valign="top" style="padding:18 0 5 0">

		<!-- 岿喊 烹拌 -->

			<table width="100%" style="margin-bottom:3"><tr>
			<td width="24" align="right"><img src="../images/num_21.gif" height="17" alt=""></td>
			<td width="9"><img src="../images/ver_01.gif" width="9" height="17" alt=""></td>
			<td><img src="../images/cap_21.gif" height="17" alt=""></td>
			</tr></table>

		<? print_content_line(); ?>

			<table class="content_back1" cellpadding="0" cellspacing="5" width="100%" style="background-color:#F0F0F0"><tr>
			<td bgcolor="#FFFFFF">

				<table cellspacing="0" width="100%">
				<?
					if (!$set_date) $set_date = date("Ym");

					$first = true;
					$sql = "select substring(set_date,1,6) month_set, sum(count) from t3_".$dbid."_count group by month_set order by month_set desc";
					// print $sql;
					$result = @mysql_query($sql);

					while(list($month_set, $count, $set_ip) = @mysql_fetch_array($result)) {
						if ($first) $first = false;
						else { ?><tr><td colspan="4" height="1" style="padding:0; background-image:url('../images/dot_width2.gif')"></td></tr><? }

						?>
						<tr class="ib" onmouseover="this.style.backgroundColor='<?=$row_color?>'" onmouseout="this.style.backgroundColor='#FFFFFF'" onclick="location.href='<?=$PHP_SELF?>?set_date=<?=$month_set?>';">
						<td class="rowdate" align="right" width="47"><?=substr($month_set,0,4)?>年 </td>
						<td class="rowdate" align="right" width="38"><?=intval(substr($month_set,4,2))?>月 |</td>
						<td class="rowdate" align="right" style="padding-right:5;padding-bottom:5"><?=$count?></td>
						<td width="56"><? if ($set_date == $month_set) { ?><img src="../images/b_set.gif" width="53" height="17" alt=""><? } ?></td>
						</tr>
						<?
					}
				?>
				</table>

			</td>
			</tr></table>

		</td>
		<td valign="top" style="padding:18 0 5 5">

		<!-- 老喊 烹拌 -->

			<table width="100%" style="margin-bottom:3"><tr>
			<td width="24" align="right"><img src="../images/num_22.gif" height="17" alt=""></td>
			<td width="9"><img src="../images/ver_01.gif" width="9" height="17" alt=""></td>
			<td><img src="../images/cap_22.gif" height="17" alt=""></td>
			</tr></table>

		<? print_content_line(); ?>

			<table class="content_back1" cellpadding="0" cellspacing="5" width="100%" style="background-color:#F0F0F0"><tr>
			<td bgcolor="#FFFFFF" style="padding-bottom:3">
			<?
				unset($d_set);

				$year = substr($set_date,0,4);
				$month = substr($set_date,4,2);
				$ld = date("t", mktime(0, 0, 0, $month, 1, $year));

				$sql = "
					select
						set_date, count
					from
						t3_".$dbid."_count
					where
						substring(set_date,1,6) = '$set_date'
					order by set_date asc
				";
				$result = @mysql_query($sql);
				$first = true;
				while(list($day_set, $count) = @mysql_fetch_array($result)) $d_set[$day_set] = $count;
			?>

				<table width="100%" cellpadding="0">
				<?
					for($i=$ld; $i>0; $i--) {

						if ($first) $first = false;
						else { ?><tr><td colspan="4" height="1" style="padding:0; background-image:url('../images/dot_width2.gif')"></td></tr><? }

						$wd = date("w", mktime(0, 0, 0, $month, $i, $year));

						unset($set_color);
						if ($wd == 0) $set_color = "color:#AA0000";
						if ($wd == 6) $set_color = "color:#000099";

						?>
						<tr>
						<td class="rowdate" height="15" align="right" width="44"><?=$year?>年 </td>
						<td class="rowdate" align="right" width="30"><?=$month?>月 </td>
						<td class="rowdate" align="right" width="38"><?=$i?>日 |</td>
						<td class="rowdate" align="right" style="padding-right:5;<?=$set_color?>"><?=$d_set[$year.$month.sprintf("%02d", $i)]?></td>
						</tr>
						<?
					}
				?>
				</table>

			</td>
			</tr></table>

		</td>
		</tr></table>

	</td>
	<td width="265" valign="top" style="padding:7 0 0 0">

	<!-- 府欺矾 鉴困 -->

		<table width="100%" style="margin-bottom:3"><tr>
		<td width="44" align="right"><img src="../images/num_add.gif" height="17" alt=""></td>
		<td width="9"><img src="../images/ver_01.gif" width="9" height="17" alt=""></td>
		<td><img src="../images/cap_add5.gif" height="17" alt=""></td>
		<td align="right" style="padding:0 2 2 0"><img class="ib" src="../images/b_more.gif" width="53" height="17" onclick="location.href='statistics_rank.php'" alt=""></td>
		</tr></table>

	<? print_content_line(); ?>

		<table class="content_back1" cellpadding="0" cellspacing="5" width="100%" style="background-color:#F0F0F0"><tr>
		<td bgcolor="#FFFFFF">

			<table width="100%" cellspacing="0">
			<?
				$sql = "select cnt, host from t3_".$dbid."_referstat order by cnt desc limit 0, 40";
				// print $sql;
				$result = @mysql_query($sql);

				$first = true; $i = 0; $pi = 1; $pcnt = 0;
				while(list($cnt, $host) = @mysql_fetch_array($result)) {

					if ($pcnt != $cnt) { $pcnt = $cnt; $i += $pi; $pi = 1; }
					else $pi++;

					if ($first) $first = false;
					else { ?><tr><td colspan="4" height="1" style="padding:0; background-image:url('../images/dot_width2.gif')"></td></tr><? }

					?>
					<tr class="ib" onmouseover="this.style.backgroundColor='<?=$row_color?>'" onmouseout="this.style.backgroundColor='#FFFFFF'" onclick="window.open('http://<?=$host?>');">
					<td class="rowdate" style="padding:4 0 4 8;color:#305090"><font color="black"><?=$i?>.</font> <?=$host?> <font size="1">(<?=$cnt?>)</font></td>
					</tr>
					<?
				}
			?>
			</table>

		</td>
		</tr></table>

	</td>
	<td width="265" valign="top" style="padding:7 0 0 5">

	<!-- 府欺矾 肺弊 -->

		<table width="100%" style="margin-bottom:3"><tr>
		<td width="44" align="right"><img src="../images/num_add.gif" height="17" alt=""></td>
		<td width="9"><img src="../images/ver_01.gif" width="9" height="17" alt=""></td>
		<td><img src="../images/cap_add4.gif" height="17" alt=""></td>
		<td align="right" style="padding:0 2 2 0"><img class="ib" src="../images/b_more.gif" width="53" height="17" onclick="location.href='statistics_log.php'" alt=""></td>
		</tr></table>

	<? print_content_line(); ?>

		<table class="content_back1" cellpadding="0" cellspacing="5" width="100%" style="background-color:#F0F0F0"><tr>
		<td bgcolor="#FFFFFF">

			<table width="100%" cellspacing="0">
			<?
				$sql = "select host, regdate from t3_".$dbid."_referlog order by no desc limit 0, 40";
				// print $sql;
				$result = @mysql_query($sql);
				$first = true;
				while(list($host, $regdate) = @mysql_fetch_array($result)) {

					if ($first) $first = false;
					else { ?><tr><td colspan="4" height="1" style="padding:0; background-image:url('../images/dot_width2.gif')"></td></tr><? }

					?>
					<tr class="ib" onmouseover="this.style.backgroundColor='<?=$row_color?>'" onmouseout="this.style.backgroundColor='#FFFFFF'" onclick="window.open('http://<?=$host?>');">
					<td class="rowdate" style="padding:4 0 4 8;color:#305090"><font color="black"><?=get_timevalue0($regdate, 1)?> | </font> <?=$host?></td>
					</tr>
					<?
				}
			?>
			</table>

		</td>
		</tr></table>

	</td>
	</tr></table>

	<center>
	<table style="margin:20 0 0 0"><tr>
	<td><img src="../images/sc.gif" width="16" height="16" alt=""></td>
	<td style="padding:2 0 0 2"><a href="#" onclick="layer_toggle(document.getElementById('sc1')); return false;">本页快捷键列表</a></td>
	</tr></table>

	<div id="sc1" style="display:none;padding:10 5 5 15">
	<table><tr><td>
			<span class="sc" style="padding:1 4 2 4;">A</span> - 网志列表
			&nbsp; <span class="sc" style="padding:1 4 2 4;">S</span> - 下一页
			&nbsp; <span class="sc" style="padding:1 4 2 4;">Q</span> - 不退出返回首页
			<div style="margin:10 0 0 0"></div>
			<span class="sc" style="padding:1 4 2 5;">R</span> - 传送引用的第一页
			&nbsp; <span class="sc" style="padding:1 5 2 5;">T</span> - 收藏文章
			&nbsp; <span class="sc" style="padding:1 5 2 5;">F</span> - 未读的文章
			&nbsp; <span class="sc" style="padding:1 4 2 4;">G</span> - 脚本的文章
	</td></tr></table>
	</div>
	</center>

</form>

<script type="text/javascript">

	function shortcut_onkeydown(evt) {
		evt = get_event(evt);
		if ((set_key = evt.keyCode) && chk_event_tag_name(evt) && !(evt.altKey || evt.ctrlKey)) {
			if (set_key == '70') document.location.href='reader.php?nr=1';
			else if (set_key == '71') document.location.href='reader.php?sc=1';
			else if (set_key == '82') parent.location.href='reader.php';
			else if (set_key == '84') parent.location.href='reader.php?rc=1';
			else if (set_key == '81') parent.location.href='../index.php';
		}
	}

	document.onkeydown = shortcut_onkeydown;

</script>

<? admin_footer("") ?>