<{include file="index/header.html"}>
<div class="cnav"><a href="javascript:;" class="back">广告编辑</a></div> 
<style type="text/css">
.adbox{ width:250px; height:180px; margin:0 10px 10px 0; border:1px solid #ddd; float:left; }
.adbox .name{ width:100%; border-bottom:1px solid #ddd; padding:10px 0; float:left; }
.adbox .name span{ padding:2px 0 0 10px; font-size:14px; float:left; }
.adbox .edit{ float:right; } 
.adbox .con{ width:250px; height:80px; padding:10px 0; border-bottom:1px solid #ddd; float:left; }
.adbox .con img{ max-width:230px; max-height:80px; }
.adbox .time{ width:240px; padding:7px 0 10px 10px; float:left; }

.adbox a.add{ width:250px; height:160px; text-align:center; line-height:180px; font-size:16px; float:left; }

.adname{ width:100%; background:#f8f8f8; padding:10px 0; margin:0 0 10px 0; float:left; }
.adname .xx{ padding:0 30px 0 10px; float:left; }
</style>
<div class="adname">
	<div class="xx">广告位名称：<{$row.name}></div>
	<div class="xx">调取别名：<{$row.alias}></div> 
</div>
<div class="main">
	<{if $data.list}>
		<{foreach item=i from=$data.list}>
			<div class="adbox">
				<div class="name">
					<span><{$i.name}></span>
					<div class="edit">
						<a href="javascript:;" data-id="<{$i.id}>" class="del">删除</a>
						<a href="javascritp:;" onClick="edit('广告编辑', '<{$__ADMIN__}>ad/ad_edit?id=<{$i.id}>&pid=<{$row.id}>')" class="edit">编辑</a> 
					</div> 	
				</div>
				<div class="con">
					<{if $i.type == '2'}>
						<img src="<{$__IMG__}><{$i.content|img_size:100x0}>"/>
					<{else}> 
						<{$i.content}>
					<{/if}>
				</div>
				<div class="time">
					<{$i.start_time}> -- <{$i.end_time}>
				</div>
			</div>
		<{/foreach}>
	<{/if}>
	<div class="adbox"><a class="add" href="javascript:;" onClick="edit('广告位添加', '<{$__ADMIN__}>ad/ad_edit?pid=<{$row.id}>')">添加广告</a></div>
</div>
<{include file="index/footer.html"}> 
<script type="text/javascript">
_delete(ADMIN+'ad/ad_del');
function edit(name,url){  
	dialog_page(name, url, 550); 
} 
</script>