<!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;广告数据报表
				</div>
			</div>
			<div class="tabcontent">
				<a href="index.php?r=Ad.adlist&menu_id=51" class="link">广告内容管理</a>
				<a href="index.php?r=Ad.report&menu_id=51" class="nolink">广告数据报表</a>
			</div>
			<div id="secrightContent">
				<div class="tableContent2">
					<form id="searchForm" action="index.php" method="get" onsubmit="setDisabled(':button',window.document);">
						<input type="hidden" name="r" value="Ad.report"/>
						<div class="searchbar">
							报表时间&nbsp;<input type="text" class="date" id="begin_date" name="begin_date" value="<!--{$begin_date}-->"/>-<input type="text" class="date" id="end_date" name="end_date" value="<!--{$end_date}-->"/>
							&nbsp;广告名称&nbsp;<select name="ad_id">
								<option value="">全部</option>
								<!--{foreach from=$adlist item=ad}-->
									<option value="<!--{$ad.id}-->" <!--{if $ad.id == $ad_id}-->selected<!--{/if}-->><!--{$ad.ad_name}--></option>
								<!--{/foreach}-->
							</select>
							&nbsp;查看方式
							<select name="search_type">
								<option value="1" <!--{if $search_type == 1}-->selected<!--{/if}-->>按广告</option>
								<option value="2" <!--{if $search_type == 2}-->selected<!--{/if}-->>按日期</option>
							</select>
							&nbsp;<button type="submit" class="but2font">查询</button>
						</div>
					</form>
					<!--{if $search_type == 1}-->
					<table class="tbl_list" width="100%" border="0" cellpadding="0" cellspacing="0">
						<tr class="thead">
							<td width="20%">广告ID</td>
							<td width="40%">广告名称</td>
							<td width="40%">点击量</td>
						</tr>
						<!--{foreach from=$datalist item=data}-->
						<tr onmouseover="chgTrColor(this)" onmouseout="chgTrColor(this)">
							<td><!--{$data.id}--></td>
							<td><!--{$data.ad_name}--></td>
							<td><!--{$data.pv}--></td>
						</tr>
						<!--{foreachelse}-->
						<tr><td colspan="3">暂无数据</td></tr>
						<!--{/foreach}-->
					</table>
					<!--{elseif $search_type == 2}-->
					<table class="tbl_list" width="100%" border="0" cellpadding="0" cellspacing="0">
						<tr class="thead">
							<td width="50%">日期</td>
							<td width="50%">点击量</td>
						</tr>
						<!--{foreach from=$datalist item=data}-->
						<tr onmouseover="chgTrColor(this)" onmouseout="chgTrColor(this)">
							<td><!--{$data.report_day}--></td>
							<td><!--{$data.pv}--></td>
						</tr>
						<!--{foreachelse}-->
						<tr><td colspan="2">暂无数据</td></tr>
						<!--{/foreach}-->
					</table>
					<!--{/if}-->
					<div class="page"><!--{$pager}--></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>