
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>[.$ourphp_adminfont.admintitle.]</title>
<link href="templates/images/ourphp_login.css" rel="stylesheet" type="text/css"> 
<script type="text/javascript" src="../../function/plugs/jquery/1.7.2/jquery-1.7.2.min.js"></script>
<script>
<!--
/*第一种形式 第二种形式 更换显示样式*/
function setTab(m,n){
 var tli=document.getElementById("menu"+m).getElementsByTagName("li");
 var mli=document.getElementById("main"+m).getElementsByTagName("ul");
 for(i=0;i<tli.length;i++){
  tli[i].className=i==n?"hover":"";
  mli[i].style.display=i==n?"block":"none";
 }
}
//-->
</script>

</head>

<body>
<div style="height:50px;"></div>
<div style="clear:both"></div>
<div id="tabs0">
 <ul class="menu0" id="menu0">
  <li onclick="setTab(0,0)" class="hover">Banner列表</li>
  <li onclick="setTab(0,1)">添加Banner</li>
 </ul>
 <div class="main" id="main0" style="border-top:2px #488fcd solid; clear:both;">
  <ul class="block">
	  <li>
		<div class="ourphp_newslist">
		<form id="form1" name="form1" method="POST" action="?ourphp_cms=bannergroup">
		        <table width="100%" border="0" cellpadding="10" class="ourphp_newslist">
                  <tr>
				  	<td width="5%" bgcolor="#EBEBEB"><div align="center">ID</div></td>
				  	<td width="10%" bgcolor="#EBEBEB">分组</td>
                    <td width="15%" bgcolor="#EBEBEB">图片</td>
					<td width="35%" bgcolor="#EBEBEB">标题</td>
                    <td width="25%" bgcolor="#EBEBEB">发布时间</td>
                    <td width="10%" bgcolor="#EBEBEB">操作</td>
                  </tr>
				  [.section loop=$banner name=op.]
                  <tr>
				  	<td><div align="center"><font style="background:#009933; color:#FFFFFF; padding:2px; text-align:center;">[.$banner[op].id.]<input type="hidden" value="[.$banner[op].id.]" name="bannerid[]"></font></div></td>
					<td>
						<select name="bannergroup[]">
						  <option value="0" [.if $banner[op].class == 0.]selected="selected"[./if.]>电脑端</option>
						  <option value="1" [.if $banner[op].class == 1.]selected="selected"[./if.]>手机端</option>
						  <option value="3" [.if $banner[op].class == 3.]selected="selected"[./if.]>3组</option>
						  <option value="4" [.if $banner[op].class == 4.]selected="selected"[./if.]>4组</option>
						  <option value="5" [.if $banner[op].class == 5.]selected="selected"[./if.]>5组</option>
						  <option value="6" [.if $banner[op].class == 6.]selected="selected"[./if.]>6组</option>
						  <option value="7" [.if $banner[op].class == 7.]selected="selected"[./if.]>7组</option>
						  <option value="8" [.if $banner[op].class == 8.]selected="selected"[./if.]>8组</option>
						  <option value="9" [.if $banner[op].class == 9.]selected="selected"[./if.]>9组</option>
						  <option value="10" [.if $banner[op].class == 10.]selected="selected"[./if.]>10组</option>
						</select>
					</td>
					<td><img src="[.if !$banner[op].img.]../../skin/noimage.png[.else.][.if strstr($banner[op].img,'http://') || strstr($banner[op].img,'https://').][.$banner[op].img.][.else.][.$webpath.][.$banner[op].img.][./if.][./if.]" border="0" width="150" height="80" /></td>
                    <td>
					<font style="background: #FF9900; color:#FFFFFF; padding:2px; text-align:center;">[.$banner[op].lang.]</font>
					&nbsp;&nbsp;[.$banner[op].title.]
					[.if $banner[op].class == 0.]
					&nbsp;&nbsp;<font style="background: #3581C7; color:#FFFFFF; padding:2px; text-align:center;">电脑</font>
					[.elseif $banner[op].class == 1.]
					&nbsp;&nbsp;<font style="background: #CC6666; color:#FFFFFF; padding:2px; text-align:center;">手机</font>
					[.else.]
					&nbsp;&nbsp;<font style="background: #226F10; color:#FFFFFF; padding:2px; text-align:center;">[.$banner[op].class.]组</font>
					[./if.]
					</td>
                    <td>[.$banner[op].time.]</td>
                    <td><a href="ourphp_bannerview.php?id=[.$banner[op].id.]">编辑</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="?ourphp_cms=del&id=[.$banner[op].id.]" onclick="javascript:return confirm('确认删除吗?')">删除</a></td>
                  </tr>
				  [.sectionelse.]
				  <tr>
                    <td colspan="6">[.$ourphp_access.]</td>
                  </tr>
				  [./section.]
				  
                  <tr>
                    <td colspan="6"><input type="submit" name="submit" value="设置分组" class="ourphp-anniu"/>
				  </tr>
				  <tr>
					<td colspan="6">[.$ourphppage.]</td>
                  </tr>
                </table>
		</form>
		</div>
	  </li>
  </ul>
  
  <ul>
	  <li>
		<form id="form1" name="form1" method="POST" action="?ourphp_cms=add" class="registerform">
		<table width="98%" border="0" cellpadding="5" cellspacing="0" bordercolor="#666666" style="border-collapse:collapse;" align="center">
		<tr>
		  	<td><div align="right">语言</div></td>
			<td>
			
			[.section loop=$langlist name=op.]
			<label><input name="OP_Bannerlang" type="radio" value="[.$langlist[op].lang.]" [.if $langlist[op].default.] checked="checked" [./if.] />[.$langlist[op].font.]&nbsp;&nbsp;</label>
			[./section.]	
			
			</td>
		  </tr>
		  <tr>
		  	<td><div align="right">标题</div></td>
			<td><input name="OP_Bannertitle" type="text" class="win" [.$ourphp_bgcolor.] datatype="*" nullmsg="标题是必填项!"/><font color=red> (*)</font></td>
		  </tr>
		  <tr>
		  	<td><div align="right">备注标题1</div></td>
			<td><input name="OP_Bannertext[]" type="text" class="win" /></td>
		  </tr>
		  <tr>
		  	<td><div align="right">备注标题2</div></td>
			<td><input name="OP_Bannertext[]" type="text" class="win" /></td>
		  </tr>
		  <tr>
		  	<td><div align="right">备注标题3</div></td>
			<td><input name="OP_Bannertext[]" type="text" class="win" /></td>
		  </tr>
		  <tr>
		  	<td><div align="right">图片</div></td>
			<td><input name="OP_Bannerimg" type="text" class="win" [.$ourphp_bgcolor.]  datatype="*" nullmsg="图片是必填项!" id="upload"/>&nbsp;
			<input type="button" id="image3" value="上传" style="width:100px; height:35px; line-height:35px; background:#0099CC; color:#FFFFFF; border:0px;" />
			[.include file="ourphp_editor.html".]
			<script>
			KindEditor.ready(function(K) {
				var editor = K.editor({
					allowFileManager : true
				});
				K('#image3').click(function() {
					editor.loadPlugin('image', function() {
						editor.plugin.imageDialog({
							showRemote : false,
							imageUrl : K('#upload').val(),
							clickFn : function(url, title, width, height, border, align) {
							
								var div = K('#J_imageView');
								div.html('');
								
								K('#upload').val(url);
								div.append('<img src="' + url + '" style="max-width:600px;border:0px;">');
								editor.hideDialog();
							}
						});
					});
				});
			});
		</script>										
			</td>
		  </tr>
		  <tr>
		  	<td><div align="right">外链地址</div></td>
			<td><input name="OP_Bannerurl" type="text" class="win" value="[.$ourphp_web.OP_Webhttp.][.$ourphp_web.OP_Weburl.]" [.$ourphp_bgcolor.]  datatype="*" nullmsg="链接地址是必填项!"/></td>
		  </tr>
		  <tr>
		  	<td><div align="right">显示位置</div></td>
			<td>
				<label><input name="OP_Bannerclass" type="radio" value="0" checked="checked" />&nbsp;电脑端</label>&nbsp;&nbsp;&nbsp;&nbsp;
				<label><input type="radio" name="OP_Bannerclass" value="1" />&nbsp;移动端</label>&nbsp;&nbsp;&nbsp;&nbsp;
				<label><input type="radio" name="OP_Bannerclass" value="3" />&nbsp;3组</label>&nbsp;&nbsp;&nbsp;&nbsp;
				<label><input type="radio" name="OP_Bannerclass" value="4" />&nbsp;4组</label>&nbsp;&nbsp;&nbsp;&nbsp;
				<label><input type="radio" name="OP_Bannerclass" value="5" />&nbsp;5组</label>&nbsp;&nbsp;&nbsp;&nbsp;
				<label><input type="radio" name="OP_Bannerclass" value="6" />&nbsp;6组</label>&nbsp;&nbsp;&nbsp;&nbsp;
				<label><input type="radio" name="OP_Bannerclass" value="7" />&nbsp;7组</label>&nbsp;&nbsp;&nbsp;&nbsp;
				<label><input type="radio" name="OP_Bannerclass" value="8" />&nbsp;8组</label>&nbsp;&nbsp;&nbsp;&nbsp;
				<label><input type="radio" name="OP_Bannerclass" value="9" />&nbsp;9组</label>&nbsp;&nbsp;&nbsp;&nbsp;
				<label><input type="radio" name="OP_Bannerclass" value="10" />&nbsp;10组</label>
			  
			</td>
		  </tr>
		  <tr><td></td><td>
		  <div id="J_imageView"></div>
		  </td></tr>
		   <tr>
		   	<td></td>
			<td><input type="submit" name="submit" value="提 交" class="ourphp-anniu"/></td>
		  </tr>
		</table>
		</form>
	  </li>
  </ul>
 </div>
</div>
[.include file="ourphp_foot.html".]
</body>
</html>