<!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>广告管理 {#$LA_poweredby#} -  Powered by GV32.COM</title>
<link rel="stylesheet" type="text/css" href="{#$base_weburl#}/templates/adminsys/css/list.css" />
<script language="javascript">
	function submitFun()
	{
		var idad_name 			= document.getElementById('ad_name');
		var idad_mediatype 		= document.getElementById('ad_mediatype');
		var idadp_id 			= document.getElementById('adp_id');
		var idad_starttime 		= document.getElementById('ad_starttime');
		var idad_endtime 		= document.getElementById('ad_endtime');
		var idad_link 			= document.getElementById('ad_link');

		var idsuggestionInfo 	= document.getElementById('suggestionInfo');

		if(idad_name.value=='')
		{
			idsuggestionInfo.innerHTML = ' 提 示：广告名称不能为空！请输入！';
			idad_name.focus();
			return false;
		}else if(idad_mediatype.value=='')
		{
			idsuggestionInfo.innerHTML = ' 提 示：类型不能为空！请输入！';
			idad_mediatype.focus();
			return false;
		}else if(idadp_id.value=='')
		{
			idsuggestionInfo.innerHTML = ' 提 示：位置不能为空！请输入！';
			idadp_id.focus();
			return false;
		}else if(idad_starttime.value=='')
		{
			idsuggestionInfo.innerHTML = ' 提 示：开始时间不能为空！请输入！';
			idad_starttime.focus();
			return false;
		}else if(idad_endtime.value=='')
		{
			idsuggestionInfo.innerHTML = ' 提 示：结束时间不能为空！请输入！';
			idad_endtime.focus();
			return false;
		}else if(idad_link.value=='')
		{
			idsuggestionInfo.innerHTML = ' 提 示：链接地址不能为空！请输入！';
			idad_link.focus();
			return false;
		}
		
		
		document.formSub.action='{#$base_weburl#}/adminsys/index.php?load=ad&act=addinfo';
		document.formSub.target="_self"
		document.formSub.submit();
		
	}
	//index.php?load=uploadfile&act=upload&upLoadName=upfile&getUrl=art_pic
	function upLoadFile()
	{
		document.formSub.target="hidden_frame"
		document.formSub.action='{#$employee_weburl#}/index.php?load=uploadfile&act=upload&upLoadName=upfile&getUrl=ad_code&isMark=0';
		document.formSub.submit(); 
		document.getElementById("lodingdiv").style.display="";
		document.getElementById("lodingdiv").innerHTML="<img src=\"{#$webroot_url#}/upload/sys/loading2.gif\" />文件正上传，请稍候...";

	}
	
	
	function hiddenLoding()
	{
		document.getElementById("lodingdiv").style.display="none";
		document.getElementById("lodingdiv").innerHTML="";
		document.getElementById("ad_code").value="";
		document.getElementById("upfile").value="";
	}
	
	
</script>

</head>
<body>

<table  cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr><td><table cellpadding="0" cellspacing="0" border="0" style="width:100%; color:#000000; font-weight:normal; background-color:#3EC3EF;"  >
  <tr>
    <td>&nbsp;<a href="{#$base_weburl#}/adminsys/index.php?load=ad&act=infolist" ><img src="{#$base_weburl#}/upload/sys/h.gif"  width="15" border="0">广告列表</a> |添加广告</td>
    <td>&nbsp;</td>
    <td align="right"><a href="http://help.gv32.com/type_ad-add.html" target="_blank" title="点击-在线帮助"><img src="{#$base_weburl#}/images/sys/adminhelp.png"  width="21" border="0" alt="点击-在线帮助"></a>&nbsp;&nbsp;</td>
  </tr>
</table>
</td></tr>

<tr><td>
<div class="list">
<form action="{#$base_weburl#}/adminsys/index.php?load=ad&act=addinfo" method="post"  enctype="multipart/form-data" name="formSub">
<table cellpadding="0" cellspacing="1" border="0" style="width:100%" class="tableborder">
<tr>
<th colspan="2">添加广告</th>
</tr>

<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';" >
<td class="td"><strong>广告名称：</strong></td>
<td class="tdd"><input name="ad_name" id="ad_name" value="" type="text"  style="width:250px;" ></td>
</tr>
<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';" >
<td class="td"><strong>媒介类型：</strong></td>
<td class="tdd"><select   name="ad_mediatype" id="ad_mediatype"  style="width:250px;" >
{#foreach key=mtkey item=mtitem from=$_LANG.admediatypeArray#}
<option value="{#$mtkey#}" >{#$mtitem#}</option>
{#/foreach#}
</select></td>
</tr>


<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';" >
<td class="td"><strong>广告位置：</strong></td>
<td class="tdd">
<select   name="adp_id" id="adp_id"  style="width:250px;" >
{#foreach key=apkey item=apitem from=$apInfo#}
<option value="{#$apitem.adp_id#}" >{#$apitem.adp_name#}</option>
{#/foreach#}
</select></td>
</tr>

<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';" >
<td class="td"><strong>开始日期：</strong></td>
<td class="tdd"><input name="ad_starttime" id="ad_starttime" value="" type="text" style="width:250px;"></td>
</tr>

<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';" >
<td class="td"><strong>结束日期：</strong></td>
<td class="tdd"><input name="ad_endtime" id="ad_endtime" value="" type="text" style="width:250px;"></td>
</tr>

<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';" >
<td class="td"><strong>链接地址：</strong></td>
<td class="tdd"><input name="ad_link" id="ad_link" value="" type="text" style="width:250px;"></td>
</tr>



<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';" >
<td class="td"><strong>上传广告图片：</strong></td>
<td class="tdd">      
<input type="file" id="upfile" name="upfile" style="width:450">&nbsp;<input name="but" type="button" value="上传文件"  onclick="upLoadFile(this)">
<iframe name='hidden_frame' id="hidden_frame" style="border:none; background-color:#00CCCC;" scrolling="no" width="0" height="0" ></iframe>
<div id="lodingdiv" style=" display:none;width:380px;" ><img src="{#$base_weburl#}/upload/sys/loading2.gif" />文件正上传中，请稍候...</div>
</td>
</tr>

<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';" >
<td class="td"><strong>图片/FLASH地址：</strong></td>
<td class="tdd"><input type="text"  name="ad_code" id="ad_code" value="" /></td>
</tr>

<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';" >
<td class="td"><strong>是否开启：</strong></td>
<td class="tdd"> <input type="radio" name="ad_enabled" value="1"  checked="true"  />开启&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="ad_enabled" value="2"  />关闭 </td>
</tr>

<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';" >
<td class="td"><strong>广告联系人：</strong></td>
<td class="tdd"><input name="ad_linkman" id="ad_linkman" value="" type="text" style="width:250px;"></td>
</tr>

<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';" >
<td class="td"><strong>联系Email：</strong></td>
<td class="tdd"><input name="ad_linkemail" id="ad_linkemail" value="" type="text" style="width:250px;"></td>
</tr>

<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';" >
<td class="td"><strong>联系电话：</strong></td>
<td class="tdd"><input name="ad_linkphone" id="ad_linkphone" value="" type="text" style="width:250px;"></td>
</tr>


<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';" >
<td colspan="2"  class="tdcenter"><div id="suggestionInfo">&nbsp;</div></td>
</tr>

<tr bgcolor="#f3f3f3" onMouseOut="this.bgColor='#f3f3f3';"; onMouseOver="this.bgColor='#C3E2FF';" >
<td colspan="2"  class="tdcenter"> <input name="buttsubmit" id="buttsubmit" type="button" value="添 加"  onclick="submitFun(this)"  ></td>
</tr>
</table>
</form>
</div>

</td></tr>
<tr><td></td></tr>
</table>
 
	
</body>
</html>