<!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=popbox}-->
<!--{include file=elements/header.js.html type=valid}-->
</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=Uuadv.adlist" class="nolink">接广告</a>
				<a href="index.php?r=Uuadv.harvestreport" class="link">收入查询</a>	
				<div style="float:right;width:360px;height:25px;"><span style="float:left;padding-top:6px;">优拓小贴士：</span>
					<script>
var marqueeContentt=new Array();   //滚动主题

marqueeContentt[0]= '<div style="height:25px;line-height:25px;"><a href="http://www.uudev.net/forum.php?mod=viewthread&tid=499&fromuid=15"  target="_blank"  style="TEXT-DECORATION:underline; color:#333333" > 同时投放多条广告可能影响广告效益哦!</a></div>';
marqueeContentt[1]= '<div style="height:25px;line-height:25px;"><a href="http://www.uudev.net/forum.php?mod=viewthread&tid=499&fromuid=15" target="_blank"  style="TEXT-DECORATION:underline; color:#333333" > 主推一两款广告一定是个不错的选择!</a></div>';
marqueeContentt[2]= '<div style="height:25px;line-height:25px;"><a href="http://www.uudev.net/forum.php?mod=viewthread&tid=499&fromuid=15" target="_blank"  style="TEXT-DECORATION:underline; color:#333333" > 投放到首页顶部的广告更能吸引眼球!</a></div>';
marqueeContentt[3]= '<div style="height:25px;line-height:25px;"><a href="http://www.uudev.net/forum.php?mod=viewthread&tid=499&fromuid=15" target="_blank"  style="TEXT-DECORATION:underline; color:#333333" > 专家讲述不同网站的广告投放技巧!</a></div>';

var marqueeIntervalt=new Array();  //定义一些常用而且要经常用到的变量
var marqueeIdt=0;
var marqueeDelayt=4000;
var marqueeHeightt=25;
var marqueeBoxt;
function initMarqueet() {
 var str=marqueeContentt[0];
 document.write('<div id="marqueeBoxt" style="overflow:hidden;height:'+marqueeHeightt+'px;" onmouseover="clearInterval(marqueeIntervalt[0])" onmouseout="marqueeIntervalt[0]=setInterval(\'startMarqueet()\',marqueeDelayt)"><div>'+str+'</div></div>');
 marqueeIdt++;
 marqueeBoxt = document.getElementById("marqueeBoxt");
 marqueeIntervalt[0]=setInterval("startMarqueet()",marqueeDelayt);
 }
function startMarqueet() {
 var str=marqueeContentt[marqueeIdt];
  marqueeIdt++;
 if(marqueeIdt>=marqueeContentt.length) marqueeIdt=0;
 if(marqueeBoxt.childNodes.length==1) {
	  var nextLine=document.createElement('DIV');
	  nextLine.innerHTML=str;
	  marqueeBoxt.appendChild(nextLine);
  }
 else {
	  marqueeBoxt.childNodes[0].innerHTML=str;
	  marqueeBoxt.appendChild(marqueeBoxt.childNodes[0]);
	  marqueeBoxt.scrollTop=0;
  }
 clearInterval(marqueeIntervalt[1]);
 marqueeIntervalt[1]=setInterval("scrollMarqueet()",2);
 }
function scrollMarqueet() {
	 marqueeBoxt.scrollTop++;
	 if(marqueeBoxt.scrollTop%marqueeHeightt==marqueeHeightt){
	  	clearInterval(marqueeIntervalt[1]);
	  }
}
initMarqueet();
</script>
				</div>		
			</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="Uuadv.adlist"/>
						<input type="hidden" id="ad_status" name="ad_status" value="<!--{$ad_status}-->"/>
						<input type="hidden" id="case_type" name="case_type" value="<!--{$case_type}-->"/>
					</form>	
					<div class="operation" style="height:31px;">
						<div style="float:right;padding:5px 20px;; background:#ccdfed;-moz-border-radius:20px;">您的广告顾问:QQ<a href="tencent://message/?uin=<!--{$qq}-->&Site=http://www.taogao.net&Menu=yes"><!--{$qq}--></a>
								<img border="0" src="http://wpa.qq.com/pa?p=1:<!--{$qq}-->:4">   昨日收入<!--{if $yesterday_income !=''}--><!--{$yesterday_income|string_format:"%.3f"}--><!--{else}-->0.000<!--{/if}-->元[<a href="index.php?r=Uuadv.harvestreport&begin_date=<!--{$yesterday_start_date}-->&end_date=<!--{$yesterday_end_date}-->">查看明细</a>]  本月收入<!--{if $month_income !=''}--><!--{$month_income|string_format:"%.3f"}--><!--{else}-->0.000<!--{/if}-->元[<a href="index.php?r=Uuadv.harvestreport&begin_date=<!--{$month_start_date}-->&end_date=<!--{$month_end_date}-->">查看明细</a>]  可结算收入<!--{if $balance !=''}--><!--{$balance|string_format:"%.3f"}--><!--{else}-->0.000<!--{/if}-->[<a href="javascript:toSettleAccount();">申请结算</a>] 
						<script>
function toBindUser(){
	var str = "<table width=\"100%\"><tr><td height=\"50px\" align=\"center\">";
	str += "<img src=\"images/ajax.gif\"/>绑定中，请稍候......";
	str += "</td></tr></table>";	
	$.popbox({title:"绑定优告账户", content:str});
	$.ajax({
		type: "get",
		url: "index.php?r=Uuadv.binduser",
		cache: false,
		dataType:'json',
		success: function(data){
			var str  = '<div style="background:#e2f0fd; margin:10px 0px; border:#aedcfe 1px solid;">';
				if(data.flag==0){
					str += '<div style="background:url(images/key.gif) 25px 15px no-repeat #e2f0fd; height:120px; padding-left:120px; padding-top:15px;">';
				}else{
					str += '<div style="background:url(images/key_open.gif) 25px 15px no-repeat #e2f0fd; height:120px; padding-left:120px; padding-top:15px;">';
				}
				str += '<span style="color:#985919;">'+data.msg+'</span><br>';
				str += '<br/>客服QQ:<a href="tencent://message/?uin='+data.qq+'&Site=http://www.taogao.net&Menu=yes">'+data.qq+'</a>';
				str += '</div></div>';
			$.popbox.setcontent({title:"绑定优告账户", content:str});
		}
	});	
}

function check_login(){
	var str = "<table width=\"100%\"><tr><td height=\"50px\" align=\"center\">";
	str += "<img src=\"images/ajax.gif\"/>";
	str += "</td></tr></table>";	
	$.popbox({title:"超级管理员身份验证", content:str});
	$.ajax({
		type: "get",
		url: "index.php?r=Uuadv.checklogin",
		cache: false,
		success: function(data){
			$.popbox.setcontent({title:"超级管理员身份验证", content:data});
		}
	});
}

function toSettleAccount(){
	$.popbox({title:"申请结算", content:popstr_search});
	$.ajax({
		type: "get",
		url: "index.php?r=Uuadv.to_settle_account",
		cache: false,
		success: function(data){
			$.popbox.setcontent({title:"申请结算", content:data});
		}
	});			
}

function checkBingingStatus(){
	$.popbox({title:"查询优告账户绑定结果", content:popstr_search});
	$.ajax({
		type: "get",
		url: "index.php?r=Uuadv.check_binding_status",
		cache: false,
		dataType:'json',
		success: function(data){
			var str  = '<div style="background:#e2f0fd; margin:10px 0px; border:#aedcfe 1px solid;">';
				if(data.flag==1){
					str += '<div style="background:url(images/key_open.gif) 25px 15px no-repeat #e2f0fd; height:120px; padding-left:120px; padding-top:15px;">';
				}else{
					str += '<div style="background:url(images/key.gif) 25px 15px no-repeat #e2f0fd; height:120px; padding-left:120px; padding-top:15px;">';
				}
				str += '<span style="color:#985919;">'+data.msg+'</span><br>';
				str += '<br/>客服QQ:<a href="tencent://message/?uin='+data.qq+'&Site=http://www.taogao.net&Menu=yes">'+data.qq+'</a>';
				str += '</div></div>';
			$.popbox.setcontent({title:"查询优告账户绑定结果", content:str});
			$("#firesbox_close").bind("click",function(){
				window.location.reload();
			});
		}
	});	
}
</script>
						</div>
						<div style=" float:left; width:33px; padding-top:5px;">
							<button type="button" class="but2font" onClick="multi_importad()">导入</button>
						</div>
						<br clear="all"/>
					</div>										
					<table class="tbl_list" width="100%" border="0" cellpadding="0" cellspacing="0">
						<tr class="thead">
							<td width="4%"><input type="checkbox" class="checkall"/></td>
							<td width="15%">广告图片</td>
							<td width="20%">广告名称</td>
							<td width="10%">广告单价(元)</td>
							<td width="15%">结算方式</td>
							<td width="10%">
								<select onChange="$('#case_type').val($(this).val());$('#searchForm').submit();">
									<option value="">广告类型</option>
									<option value="1" <!--{if $case_type eq 1}-->selected<!--{/if}-->>软件</option>
									<option value="2" <!--{if $case_type eq 2}-->selected<!--{/if}-->>游戏</option>
									<option value="99" <!--{if $case_type eq 99}-->selected<!--{/if}-->>其他</option>
								</select>
							</td>
							<td width="10%">
								<select onChange="$('#ad_status').val($(this).val());$('#searchForm').submit();">
									<option value="">状态</option>
									<option value="1" <!--{if $ad_status eq 1}-->selected<!--{/if}-->>已申请</option>
									<option value="2" <!--{if $ad_status eq 2}-->selected<!--{/if}-->>待审核</option>
									<option value="7" <!--{if $ad_status eq 7}-->selected<!--{/if}-->>已暂停</option>
									<option value="8" <!--{if $ad_status eq 8}-->selected<!--{/if}-->>审核未通过</option>																		
								</select>
							</td>
							<td width="15%">操作</td>
						</tr>
						<!--{foreach from=$adlist item=data name=foo}-->
						<tr onMouseOver="chgTrColor(this);" onMouseOut="chgTrColor(this);">
							<td width="5%"><!--{if $data.adApplyStatus==1&&$data.import_status eq 0}--><input type="checkbox" name="recordId" value="<!--{$data.id}-->"/><!--{/if}--></td>
							<td><a href="javascript:topshowDetail(adlist[<!--{$data.id}-->])"><img alt="" src="<!--{$data.imageUrl}-->" style="padding:2px;"></a></td>
							<td><a href="javascript:topshowDetail(adlist[<!--{$data.id}-->])"><!--{$data.adName}--></a></td>
							<td><!--{$data.exportPrice|string_format:"%.3f"}--></td>
							<td><!--{$data.balanceTypeName}--></td>
							<td>
								<!--{if $data.caseTypeId eq 1}-->软件<!--{/if}-->
								<!--{if $data.caseTypeId eq 2}-->游戏<!--{/if}-->
								<!--{if $data.caseTypeId eq 99}-->其他<!--{/if}-->
							</td>
							<td id="adApplyStatus">
								<!--{if $data.adApplyStatus eq 0}-->未申请<!--{/if}-->
								<!--{if $data.adApplyStatus eq 1}--><span style="color:#fff; background:green; padding:2px 4px;-moz-border-radius:8px;">已申请</span><!--{/if}-->
								<!--{if $data.adApplyStatus eq 2}--><span style="color:#fff; background:#ff9600; padding:2px 4px;-moz-border-radius:8px;">待审核..</span><!--{/if}-->
								<!--{if $data.adApplyStatus eq 7}--><span style="color:#fff; background:#ccc; padding:2px 4px;-moz-border-radius:8px;">已暂停</span><!--{/if}-->
								<!--{if $data.adApplyStatus eq 8}--><span style="color:#fff; background:red; padding:2px 4px;-moz-border-radius:8px;">审核未通过</span><!--{/if}-->
							</td>
							<td>
		<script>
			var o = {};
			o.id = <!--{$data.id}-->;
			o.adName = "<!--{$data.adName}-->";
			o.adLanguage = "<!--{$data.adLanguage}-->";
			o.adDescription = "<!--{$data.adDescription}-->";
			o.imageUrl = "<!--{$data.imageUrl}-->";
			o.exportPrice = "<!--{$data.exportPrice|string_format:'%.3f'}-->";
			o.balanceTypeName = "<!--{$data.balanceTypeName}-->";
			o.adApplyStatus = "<!--{$data.adApplyStatus}-->";
			o.caseTypeId = "<!--{$data.caseTypeId}-->";
			o.webMasterCheck = "<!--{$data.webMasterCheck}-->";
			o.memo = "<!--{$data.memo}-->";
			o.adLevel = '<!--{$data.adLevel}-->';
			o.appraise = "<!--{$data.appraise}-->";
			adlist[<!--{$data.id}-->] = o;
		</script>
								<a href="javascript:topshowDetail(adlist[<!--{$data.id}-->])">详情</a>&nbsp;&nbsp;
								<!--{if $data.adApplyStatus eq 1}-->
									<!--{if $data.import_status eq 0}-->
										<a href="javascript:topimportad('<!--{$data.id}-->')">导入</a>
										<!--{else}-->
										已导入
									<!--{/if}-->
								<!--{/if}-->
								<!--{if $data.adApplyStatus !=1}-->
									<!--{if $data.adApplyStatus eq 7||$data.adApplyStatus eq 2}-->
										申请
										<!--{else}-->
										<!--{if $data.webMasterCheck==0}-->
											<a href="javascript:topapplyAdWithoutAudit(<!--{$data.id}-->);">申请</a>
										<!--{/if}-->
										<!--{if $data.webMasterCheck !=0}-->
											<!--{if $web_master_check == 0}-->
												<a href="javascript:topauditSite(<!--{$data.id}-->);">申请</a>
											<!--{else}-->
												<!--{if $data.adApplyStatus eq 8}-->
													<a href="javascript:topapplyAdWithAudit(<!--{$data.id}-->);">重新申请</a>
													<!--{else}-->
													<a href="javascript:topapplyAdWithAudit(<!--{$data.id}-->);">申请</a>
												<!--{/if}-->
												
											<!--{/if}-->										
										<!--{/if}-->
									<!--{/if}-->
								<!--{/if}-->
							</td>
						</tr>
						<!--{foreachelse}-->
						<tr><td colspan="8">没有对应数据</td></tr>
						<!--{/foreach}-->
					</table>
					<div class="page"><!--{$pager}--></div>
				</div>
			</div>
		</div>
	</div>
</div>
</body>
<script>
	
function multi_importad()
{
	
	var item = $("[name=recordId]");
	var param = "";
	if (item.size() > 0) {
		item.each(function(){
			if ($(this).attr("checked") == true) {
				param += $(this).val();
				param += ",";
			}
		});
	}
	
	param = param.substr(0, param.lastIndexOf(","));
	if (param == "") {
		alert("请选择记录");
		return false;
	} else{
		if(confirm("确定导入广告吗 ？")){
			$.popbox({title:"导入广告", content:popstr_import});
			$.ajax({
				type: "get",
				url: "index.php?r=Uuadv.import_ad&ids="+param+"&pop_flag=1",
				dataType:"json",
				cache: false,
				timeout:10000,
				error : function(data) {
					var str = "<div style=\"margin:10px 0px;\">";
					str += '<div style="height:90px; padding-left:170px; padding-top:50px;">';
					str += "<span style=\"color:red;font-size:12px;font-weight:800;\">导入失败</span>";
					str += '</div></div>';		
					$.popbox.setcontent({title:"导入广告", content:str});
		  		},		
				success: function(data){
					var str = "";
					str = '<div style="margin:10px 0px;"><div style="height: 90px;padding-top: 10px;">';
						
					if (data.flag == 1) {
						if(data.count==1){
							str += '<fieldset style="border: 1px solid #FFCC33; padding: 10px 10px; -moz-border-radius: 8px 8px 8px 8px;margin-bottom:10px;"><legend style="color:#FF7800; font-size:14px;"><strong>赚钱第二步：导入广告</strong></legend><div style="line-height:24px; margin-top:10px;">你申请的广告已导入,现在只需要完成第三步操作，或者去“网站广告->广告内容管理”中设置投放到网站的具体位置，即可开始赚钱啦!<br>继续完成第三步:<br>立即去设置广告投放位置，开始赚钱! [<a href="index.php?r=Ad.setupad&ad_id='+data.ad_id+'">点此前往设置</a>]</div></fieldset>';
						}else{
							str += '<fieldset style="border: 1px solid #FFCC33; padding: 10px 10px; -moz-border-radius: 8px 8px 8px 8px;margin-bottom:10px;"><legend style="color:#FF7800; font-size:14px;"><strong>赚钱第二步：导入广告</strong></legend><div style="line-height:24px; margin-top:10px;">你申请的广告已导入,现在只需要完成第三步操作，或者去“网站广告->广告内容管理”中逐一设置投放到网站的具体位置，即可开始赚钱啦!<br>继续完成第三步:<br>立即去设置广告投放位置，开始赚钱! [<a class=\" \" href=\"index.php?r=Ad.adlist&menu_id=51\">点此前往设置</a>]</div></fieldset>';
						}
						
					}else{
						str += '<fieldset style="border: 1px solid #FFCC33; padding: 10px 10px; -moz-border-radius: 8px 8px 8px 8px;margin-bottom:10px;"><legend style="color:#FF7800; font-size:14px;"><strong>赚钱第二步：导入广告</strong></legend><div style="line-height:24px; margin-top:10px;">'+data.msg+'</div></fieldset';
					}
					
					
		
					str += '</div></div>';
					$.popbox.setcontent({title:"导入广告", content:str});
					$("#firesbox_close").bind("click",function(){
						window.location.reload();
					});			
				}
			});	
		}
	}
}

</script>
</html>