<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><title><!--{$UUDEV_PAGE_TITLE}--></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!--{include file=elements/header.css.html}-->
<!--{include file=elements/header.js.html type=common}-->
<!--{include file=elements/header.js.html type=date}-->
</head>
<body>
<div id="outside">
	<!--{include file=frame/top.html}-->
	<div id="mainareaContent">
		<!--{include file=frame/left.html}-->
		<div id="rightContent">
			<div id="topContent">
				<div class="sitmap">
					<span class="r"><!--{include file="elements/uuadvad.html"}--></span>模块管理&nbsp;&gt;&nbsp;友链模块&nbsp;&gt;&nbsp;内容管理&nbsp;&gt;&nbsp;<!--{$friend_site.friend_site_name}--> 友链报表
				</div>
			</div>
			<div class="tabcontent">
				<a href="index.php?r=FriendSite.friendsitelist" class="nolink">内管管理</a>
				<a href="index.php?r=SiteSet.friendsiteset" class="link">属性设置</a>
				<a href="index.php?r=FriendSite.friendsiteListLayout" class="link">列表页布局</a>
					<a href="index.php?r=FriendSite.friendsitePageLayout" class="link">内容页布局</a>
					<a href="index.php?r=FriendSite.realtimereport" class="link">实时数据分析</a>
			</div>
			<div id="secrightContent">
				<div class="tableContent2">
					<form name="searchForm" action="index.php" method="get" onSubmit="setDisabled('button', window.document);">
						<input type="hidden" name="r" value="FriendSite.reportlist"/>
						<input type="hidden" name="friend_site_id" value="<!--{$friend_site_id}-->"/>
						<input type="hidden" name="returnParams" value="<!--{$returnParams}-->"/>
						<input type="hidden" id="orderby" name="orderby" value="<!--{$orderby}-->"/>
						<div class="searchbar">
							报表日期：从&nbsp;<input type="text" class="date" id="begin_date" name="begin_date" value="<!--{$begin_date}-->"/>&nbsp;到&nbsp;<input type="text" class="date" id="end_date" name="end_date" value="<!--{$end_date}-->"/>
							&nbsp;<button type="submit" class="but2font">查询</button>
						</div>
					</form>
					<div class="operation">
						<button type="button" class="but4font" onClick="if(confirm('确定清零？')){location.href='index.php?r=FriendSite.clear&friend_site_id=<!--{$friend_site_id}-->&returnParams=<!--{$reportlistReturnParams}-->'}">数据清零</button>
						<button type="button" class="but2font" onClick="window.location.href='index.php?<!--{$returnParams}-->'">返回</button>
					</div>
					<table class="tbl_list" width="100%" border="0" cellpadding="0" cellspacing="0">
						<tr class="thead">
							<td width="5%">序号</td>
							<td width="15%">
								<!--{if $orderby eq report_day0}-->
								<a onClick="$('#orderby').val('report_day1');document.forms['searchForm'].submit();">日期↑</a>
								<!--{elseif $orderby eq report_day1}-->
								<a onClick="$('#orderby').val('report_day0');document.forms['searchForm'].submit();">日期↓</a>
								<!--{else}-->
								<a onClick="$('#orderby').val('report_day1');document.forms['searchForm'].submit();">日期</a><!--{/if}-->
							</td>
							<td width="15%">
								<!--{if $orderby eq in_pv0}-->
								<a onClick="$('#orderby').val('in_pv1');document.forms['searchForm'].submit();">链入点击pv↑</a>
								<!--{elseif $orderby eq in_pv1}-->
								<a onClick="$('#orderby').val('in_pv0');document.forms['searchForm'].submit();">链入点击pv↓</a>
								<!--{else}-->
								<a onClick="$('#orderby').val('in_pv1');document.forms['searchForm'].submit();">链入点击pv</a><!--{/if}-->
							</td>
							<td width="15%">
								<!--{if $orderby eq site_pv0}-->
								<a onClick="$('#orderby').val('site_pv1');document.forms['searchForm'].submit();">链入页面PV↑</a>
								<!--{elseif $orderby eq site_pv1}-->
								<a onClick="$('#orderby').val('site_pv0');document.forms['searchForm'].submit();">链入页面PV↓</a>
								<!--{else}-->
								<a onClick="$('#orderby').val('site_pv1');document.forms['searchForm'].submit();">链入页面PV</a><!--{/if}-->
							</td>
							<td width="15%">
								<!--{if $orderby eq out_pv0}-->
								<a onClick="$('#orderby').val('out_pv1');document.forms['searchForm'].submit();">链出点击PV↑</a>
								<!--{elseif $orderby eq out_pv1}-->
								<a onClick="$('#orderby').val('out_pv0');document.forms['searchForm'].submit();">链出点击PV↓</a>
								<!--{else}-->
								<a onClick="$('#orderby').val('out_pv1');document.forms['searchForm'].submit();">链出点击PV</a><!--{/if}-->
							</td>
							<td width="15%">赚取点击PV</td>
							<td width="15%">用户质量</td>
						</tr>
						<!--{foreach from=$datalist item=item name=list}-->
						<tr onMouseOver="chgTrColor(this)" onMouseOut="chgTrColor(this)">
							<td><!--{$smarty.foreach.list.index+1}--></td>
							<td><!--{$item.report_day}--></td>
							<td><!--{$item.in_pv}--></td>
							<td><!--{$item.site_pv}--></td>
							<td><!--{$item.out_pv}--></td>
							<td><!--{$item.in_pv-$item.out_pv}--></td>
							<td><!--{if $item.in_pv != 0}--><!--{$item.site_pv/$item.in_pv|round:2}--><!--{else}--><!--{$item.in_pv}--><!--{/if}--></td>
						</tr>
						<!--{foreachelse}-->
							<tr><td colspan="7">没有对应数据</td></tr>
						<!--{/foreach}-->
						<tr onMouseOver="chgTrColor(this)" onMouseOut="chgTrColor(this)">
							<td colspan="2" class="center">总量</td>
							<td><!--{$in_pv_all}--></td>
							<td><!--{$site_pv_all}--></td>
							<td><!--{$out_pv_all}--></td>
							<td><!--{$in_pv_all-$out_pv_all}--></td>
							<td><!--{if $in_pv_all != 0}--><!--{$site_pv_all/$in_pv_all|round:2}--><!--{else}-->0<!--{/if}--></td>
						</tr>
					</table>
					<div class="operation">
						<button type="button" class="but4font" onClick="if(confirm('确定清零？')){location.href='index.php?r=FriendSite.clear&friend_site_id=<!--{$friend_site_id}-->&returnParams=<!--{$reportlistReturnParams}-->'}">数据清零</button>
						<button type="button" class="but2font" onClick="window.location.href='index.php?<!--{$returnParams}-->'">返回</button>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
</body>
<script>
function customRange(input){
	return {
		minDate : (input.id == "end_date" ? $("#begin_date").datepicker("getDate") : null),
		maxDate : (input.id == "begin_date" ? $("#end_date").datepicker("getDate") : null)
	}
}
$("#begin_date, #end_date").datepicker({
    beforeShow : customRange, buttonImageOnly : false
});
</script>
</html>