<div id="topOutside">
	<div id="topbg">
		<div class="uulogo">
			<a href="http://www.uudev.com" target="_blank" alt=""><img src="images/uulogo.jpg" alt="优拓建站系统后台" /></a>
		</div>
		<div id="help">
			<div class="username">
				<span class="helloword"><!--{$welcome_str}-->:</span>&nbsp;<a href="index.php?r=User.update&userId=<!--{$user.id}-->&returnParams=<!--{$returnParams}-->"><!--{$user.login_name}--></a>&nbsp;<span class="date">今天<!--{$date_str}--></span>
			</div>
			<div class="setNav">
				<!--{if !empty($UTQQ)}-->你的专属支持 <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=<!--{$UTQQ}-->&site=qq&menu=yes"><img border="0" src="http://wpa.qq.com/pa?p=2:<!--{$UTQQ}-->:42" alt="点击这里给我发消息" title="点击这里给我发消息"></a><!--{/if}-->
				<a href="http://www.uudev.com/help/index.htm"  target="_blank">帮助</a> | <a href="http://www.uudev.com/contact.jsp" target="_blank">客服</a> | <a href="javascript:showmap()">地图</a> | <a href="index.php?r=user.out">退出</a>
				
			</div>
			
			
				<div style="padding-left:560px;padding-top:20px;">
				<script>
var topadlist = new Array();

var adlist = new Array();
<!--{if !empty($showAd)}-->
var marqueeContent=new Array();   //滚动主题

<!--{foreach from=$showAd key=key item=list}-->
var topo = {};
topo.id = <!--{$list.id}-->;
topo.adName = "<!--{$list.adName}-->";
topo.adLanguage = "<!--{$list.adLanguage}-->";
topo.adDescription = "<!--{$list.adDescription}-->";
topo.imageUrl = "<!--{$list.imageUrl}-->";
topo.exportPrice = "<!--{$list.exportPrice|string_format:'%.3f'}-->";
topo.balanceTypeName = "<!--{$list.balanceTypeName}-->";
topo.adApplyStatus = "<!--{$list.adApplyStatus}-->";
topo.caseTypeId = "<!--{$list.caseTypeId}-->";
topo.webMasterCheck = "<!--{$list.webMasterCheck}-->";
topo.memo = "<!--{$list.memo}-->";
topo.adLevel = '<!--{$list.adLevel}-->';
topo.appraise = "<!--{$list.appraise}-->";
topadlist[<!--{$list.id}-->] = topo;
marqueeContent[<!--{$key}-->]= '<img src="images/laba.gif"  align="absmiddle" >热门推荐：<!--{$list.adName}--> <a href="#" style="TEXT-DECORATION:none" onclick="topshowDetail(topadlist[<!--{$list.id}-->]);"> >>马上申请，开始赚钱吧！</a>';
<!--{/foreach}-->
var marqueeInterval=new Array();  //定义一些常用而且要经常用到的变量
var marqueeId=0;
var marqueeDelay=4000;
var marqueeHeight=18;
var marqueeBox;
function initMarquee() {
 var str=marqueeContent[0];
 document.write('<div id="marqueeBox" style="overflow:hidden;height:'+marqueeHeight+'px;" onmouseover="clearInterval(marqueeInterval[0])" onmouseout="marqueeInterval[0]=setInterval(\'startMarquee()\',marqueeDelay)"><div>'+str+'</div></div>');
 marqueeId++;
 marqueeBox = document.getElementById("marqueeBox");
 marqueeInterval[0]=setInterval("startMarquee()",marqueeDelay);
 }
function startMarquee() {
 var str=marqueeContent[marqueeId];
  marqueeId++;
 if(marqueeId>=marqueeContent.length) marqueeId=0;
 if(marqueeBox.childNodes.length==1) {
	  var nextLine=document.createElement('DIV');
	  nextLine.innerHTML=str;
	  marqueeBox.appendChild(nextLine);
  }
 else {
	  marqueeBox.childNodes[0].innerHTML=str;
	  marqueeBox.appendChild(marqueeBox.childNodes[0]);
	  marqueeBox.scrollTop=0;
  }
 clearInterval(marqueeInterval[1]);
 marqueeInterval[1]=setInterval("scrollMarquee()",2);
 }
function scrollMarquee() {
	 marqueeBox.scrollTop++;
	 if(marqueeBox.scrollTop%marqueeHeight==marqueeHeight){
	  	clearInterval(marqueeInterval[1]);
	  }
}
initMarquee();
<!--{/if}-->
function topauditSite(adId)
{
	$.popbox({title:"申请该广告需要先通过站点域名备案号审核，请先上传您的备案号", content:popstr_search});
	$.ajax({
		type: "get",
		url: "index.php?r=Uuadv.audit_site&adId="+adId,
		cache: false,
		timeout:50000,
		success: function(data){
			$.popbox.setcontent({title:"申请该广告需要先通过站点域名备案号审核，请先上传您的备案号", content:data,height:320});
		}
	});
}

function showAdNews(title,content,date)
{
	var str = "<table class=\"tbl_edit\" width=\"96%\" style=\"margin:auto\" ><tr>";
	str += "<td style=\"color:#cccccc\" >"+title+"</td>";
	str += "</tr><tr>";	

	
	
	str += "<td style=\"color:#666666;\">"+content+"</td>"
	str += "</tr><tr>";
	str += "</table>";
	$.popbox({title:"广告上下线通知！", content:str,height:340});
}

function topimportad(adId)
{
	$.popbox({title:"导入广告", content:popstr_import});
	$.ajax({
		type: "get",
		url: "index.php?r=Uuadv.import_ad&ids="+adId+"&pop_flag=1",
		dataType:"json",
		cache: false,
		timeout:10000,
		success: function(data){
			var str = "";
			str = '<div style="margin:10px 0px;"><div style="height: 90px;padding-top: 10px;">';
				
			if(data.flag==1){
					str += '<fieldset style="border: 1px solid #0092ff; padding: 10px 10px; -moz-border-radius: 8px 8px 8px 8px;margin-bottom:10px;"><legend style="color:#0092ff; 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 #0092ff; padding: 10px 10px; -moz-border-radius: 8px 8px 8px 8px;margin-bottom:10px;"><legend style="color:#0092ff; font-size:14px;"><strong>赚钱第二步：导入广告</strong></legend><div style="line-height:24px; margin-top:10px;">广告导入失败！</div></fieldset>';
			}

			str += '</div></div>';
			$.popbox.setcontent({title:"导入广告", content:str,height:320});
			$("#firesbox_close").bind("click",function(){
				window.location.reload();
			});			
		}
	});	
}

function topapplyAdWithoutAudit(adId)
{
	$.popbox({title:"申请广告", content:popstr_apply});
	$.ajax({
		type: "get",
		url: "index.php?r=Uuadv.applyad&adId="+adId,
		cache: false,
		dataType: "json",
		timeout:50000,
		success: function(data){
			var str = "";
			str = '<div style="margin:10px 0px;"><div style="height: 90px;padding-top: 10px;">';
			if(data.flag==1){
					str += '<fieldset style="border: 1px solid #0092ff; padding: 10px 10px; -moz-border-radius: 8px 8px 8px 8px;margin-bottom:10px;"><legend style="color:#0092ff; font-size:14px;"><strong>赚钱第一步: 申请广告</strong></legend><div style="line-height:24px; margin-top:10px;">你已成功申请该广告，马上去完成赚钱第二步：导入广告<br>赚钱第二步：导入广告<br>立即将该广告导入到网站.<a href="javascript:topimportad('+adId+')">点此导入</a></div></fieldset>';
				}else{
					str += '<fieldset style="border: 1px solid #0092ff; padding: 10px 10px; -moz-border-radius: 8px 8px 8px 8px;margin-bottom:10px;"><legend style="color:#0092ff; font-size:14px;"><strong>赚钱第一步: 申请广告</strong></legend><div style="line-height:24px; margin-top:10px;">广告申请失败！</div></fieldset>';
			}
			str += '</div></div>';
			$.popbox.setcontent({title:"申请广告", content:str,height:320});
			$("#firesbox_close").bind("click",function(){
				window.location.reload();
			});			
		}
	});		
}
function topapplyAdWithAudit(adId)
	{	
		$.popbox({title:"申请广告", content:popstr_apply});
		$.ajax({
			type: "GET",
			url: "index.php",
			cache:false,
			data: "r=Uuadv.applyad&adId="+adId,
			timeout:50000,
			dataType:'json',			
			success: function(data){
				var str = "";
				str = '<div style="margin:10px 0px;"><div style="height: 90px;padding-top: 10px;">';
				if(data.flag==1){
					str += '<fieldset style="border: 1px solid #0092ff; padding: 10px 10px; -moz-border-radius: 8px 8px 8px 8px;margin-bottom:10px;"><legend style="color:#0092ff; font-size:14px;"><strong>赚钱第一步: 申请广告</strong></legend><div style="line-height:24px; margin-top:10px;">你已成功提交申请，广告正在审核中。请耐心等待1-2个工作日！<br/>温馨提示：审核通过后你只需完成以下两个步骤即可开始赚钱之旅啦！</div></fieldset><div style="line-height:26px; color:#333333">→赚钱第二步：导入广告<br/>→赚钱第三步：投放广告</div>';
				}else{
					str += '<fieldset style="border: 1px solid #0092ff; padding: 10px 10px; -moz-border-radius: 8px 8px 8px 8px;margin-bottom:10px;"><legend style="color:#0092ff; font-size:14px;"><strong>赚钱第一步: 申请广告</strong></legend><div style="line-height:24px; margin-top:10px;">广告申请失败！</div></fieldset>';
				}
				str += '</div></div>';
				$.popbox.setcontent({title:"申请广告", content:str,height:320});
				$("#firesbox_close").bind("click",function(){
					window.location.reload();
				});
			}
		});		
}


function topshowDetail(obj)
{
	var str = "<table class=\"tbl_edit\" width=\"96%\" style=\"margin:auto\" ><tr>";
	
	str += "<td style=\"color:#666666;\" width=\"15%\"></td>"
	str += "<td style=\"color:#666666\" width=\"85%\" colspan=\"3\"><img src='"+obj.imageUrl+"' style=\"padding:2px;border:1px #e3f1fc solid;\"></td>";
	str += "</tr><tr>";
	
	str += "<td style=\"color:#666666;\" width=\"15%\">广告名称：</td>"
	str += "<td style=\"color:#333333\"><b>"+obj.adName+"</b></td>";
	str += "<td style=\"color:#666666;\" width=\"15%\">推荐等级：</td>"
	str += "<td style=\"color:#cccccc\" >"+obj.adLevel+"</td>";
	str += "</tr><tr>";	

	str += "<td style=\"color:#666666;\" width=\"15%\">广告单价：</td>"
	str += "<td style=\"color:#cd0000;font-size:15px;\" ><b>"+obj.exportPrice+"元</b></td>";
	str += "<td style=\"color:#666666;\" width=\"15%\">结算方式：</td>"
	str += "<td style=\"color:#333333\" >"+obj.balanceTypeName+"</td>";
	str += "</tr><tr>";
	
	str += "<td style=\"color:#666666;\">推荐广告语：</td>"
	str += "<td style=\"color:#333333\" colspan=\"3\">"+obj.adLanguage+"</td>";
	str += "</tr><tr>";
	
	str += "<td style=\"color:#666666;\" >广告评语：</td>"
	str += "<td style=\"color:#666666\"  colspan=\"3\">"+obj.appraise+"</td>";

	str += "</tr><tr>";
	
	str += "<td style=\"color:#666666;\">广告简介：</td>"
	str += "<td style=\"color:#333333\" colspan=\"3\">"+obj.adDescription+"</td>";
	str += "</tr><tr>";
	if(obj.adApplyStatus>0){
		str += "<td style=\"color:#666666\"></td>"
		str += "<td style=\"color:#666666\" colspan=\"3\">";
		if(obj.adApplyStatus==1){
			str += "<span style=\"color:#fff; background:green; padding:2px 4px;-moz-border-radius:8px;\">已申请</span>";
		}else if(obj.adApplyStatus==2){
			str += "<span style=\"color:#fff; background:#ff9600; padding:2px 4px;-moz-border-radius:8px;\">正在审核,请稍后..</span>";
		}else if(obj.adApplyStatus==7){
			str += "已暂停";
		}else if(obj.adApplyStatus==8){
			str += "<span style=\"color:#fff; background:red; padding:2px 4px;-moz-border-radius:8px;\"><blink>审核未通过</blink></span>";
		}
		str += "</td>";
		str += "</tr><tr>";
	}else{
		str += "<td style=\"color:#666666\"></td>"
		if(obj.webMasterCheck == 0){
			str += "<td style=\"color:#666666\" colspan=\"3\"><a href='javascript:topapplyAdWithoutAudit("+obj.id+");' style='cursor:pointer; background:url(images/moreadd.png) no-repeat; border:none; width:132px; height:29px; color:#000000; line-height:25px; display:block;text-align:left;text-decoration:none;text-shadow: 0 1px 0 #fdcb8c;padding-left:35px;' onMouseOver=\"this.style.backgroundImage='url(images/moreadd-on.png)'\" onMouseOut=\"this.style.backgroundImage='url(images/moreadd.png)'\">马上申请,开始赚钱吧!</a></td>";
		}else{
			<!--{if $ICP==1}-->
			str += "<td style=\"color:#666666\" colspan=\"3\"><a href='javascript:topapplyAdWithAudit("+obj.id+");' style='cursor:pointer; background:url(images/moreadd.png) no-repeat; border:none; width:132px; height:29px; color:#000000; line-height:25px; display:block;text-align:left;text-decoration:none;text-shadow: 0 1px 0 #fdcb8c;padding-left:35px;' onMouseOver=\"this.style.backgroundImage='url(images/moreadd-on.png)'\" onMouseOut=\"this.style.backgroundImage='url(images/moreadd.png)'\">马上申请,开始赚钱吧!</a></td>";
			<!--{else}-->
			str += "<td style=\"color:#666666\" colspan=\"3\"><a href='javascript:topauditSite("+obj.id+");' style='cursor:pointer; background:url(images/moreadd.png) no-repeat; border:none; width:132px; height:29px; color:#000000; line-height:25px; display:block;text-align:left;text-decoration:none;text-shadow: 0 1px 0 #fdcb8c;padding-left:35px;' onMouseOver=\"this.style.backgroundImage='url(images/moreadd-on.png)'\" onMouseOut=\"this.style.backgroundImage='url(images/moreadd.png)'\">马上申请,开始赚钱吧!</a></td>";
			<!--{/if}-->
		}
		
		str += "</tr><tr>";
	}
	
	
	str += "</table>";
	$.popbox({title:"广告详情", content:str,height:340});
}

</script>
</div>
				
			
		</div>
		<div id="nav">
			<!--{foreach from=$sysmenu item=item}-->
				<!--{if $item.parent_id == null}--><a href="<!--{$item.menu_url}-->" <!--{if $item.id == $top_menu_id}-->class="linkon"<!--{else}-->class="linkoff"<!--{/if}-->><!--{$item.menu_name}--></a><!--{/if}-->
			<!--{/foreach}-->
			<a id="init_sytem_first" href="#" style=" float:right;  background:url(images/icon22.gif) -3px -1282px no-repeat; width:84px; height:24px;color:#333333; font-size:13px; text-decoration:none; line-height:24px; text-align:left; margin-top:3px; text-indent:25px; margin-right:5px;">建站向导</a>
			<div style="clear:both; width:1px; height:0px; overflow:hidden;"></div>
		</div>
	</div>
</div>
<div class="hidden" id="menumap">
	<div class="map">
	<!--{foreach from=$sysmenu item=item name=mapmenu}-->
		<!--{if $item.parent_id == null}--><!--{if $smarty.foreach.mapmenu.index > 0}--></div><!--{/if}--><div><a href="<!--{$item.menu_url}-->"><!--{$item.menu_name}--></a><br/><!--{/if}-->
		<!--{foreach from=$sysmenu item=data}-->
			<!--{if $data.parent_id == $item.id}--><a href="<!--{$data.menu_url}-->&menu_id=<!--{$data.id}-->"><!--{$data.menu_name}--></a><!--{/if}-->
		<!--{/foreach}-->
	<!--{/foreach}-->
	</div>
	</div>
</div>