<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset={sys_charset}">
<title>link edit</title>
<link href="{adminStylePath}style/common.css" rel="stylesheet" type="text/css">
<link href="{adminStylePath}style/jqModal.css" type="text/css" rel="stylesheet">
<LINK href="{adminStylePath}style/calendar.css" type="text/css" rel="stylesheet">
<script language="javascript" src="{adminStylePath}js/validate.js"></script>
<script language="javascript" src="{adminStylePath}js/calendar.js"></script>
<script language="javascript" src="{adminStylePath}js/calendar-setup.js"></script>
<script language="javascript" src="{adminStylePath}js/calendar-en.js"></script>
<script language="javascript" src="{adminStylePath}js/jquery.js"></script>
<script language="javascript" src="{adminStylePath}js/jqModal.js"></script>
<script language="javascript" src="{adminStylePath}js/jqModal.init.js"></script>
<script language="javascript" src="{adminStylePath}js/common.js"></script>
<script language="javascript">
function doEvent()
{
	submitsSelect("save","ad_edit.php?act=save");
}
function showChannel(tmptype)
{
	if(tmptype==1) document.getElementById('edit_channel').style.display="none";
	else document.getElementById('edit_channel').style.display="";

}

</script>
</head>

<body onkeypress = "thisKeyPress(event,'doEvent()')">
<table class="nav_table" cellpadding="0" cellspacing="0">	
	<tr>
		<td class="nav_td">{menu_nav}</td>
	</tr>	
</table>
<table class="toolbar_table" cellpadding="0" cellspacing="0">
	<tr>
		<td class="toolbar_td">{toolbar}</td>
	</tr>
</table>
<div class="line_space"><img src="{adminStylePath}images/blank.gif"></div>
<table cellpadding="0" cellspacing="0" class="edit_tb">
  
  <form name="editForm" method="post" action="" >
  	<input type="hidden" name="selectid" id="selectValue" value="{selectid}">
    <input type="hidden" name="selectValue" id="selectValue" value="{selectid}">
    <tr> 
      <td width="20%" class="edit_td_txt" >板块位置[广告位]:</td>
      <td width="80%"  class="edit_td_input">
      	<input type="text" name="layout_id_show" id="layout_id_show" class="input_text" value="{layout_title}" require="false" dataType="LimitB" min="0" max="255"  msg="不能为空">
      	<input type="hidden" name="layout_id" id="layout_id" value="{layout_id}">
      	<input type="button" name="btn_select" id="btn_select" value="选择..."  onclick="openSelectWin('../mod_template/template_layout_select.php?type=1')" >
      </td>
    </tr> 
    <tr> 
      <td width="20%"  class="edit_td_txt">广告名称:</td>
      <td width="80%"  class="edit_td_input">
      	<input type="text" name="title" class="input_text" size="40" value="{title}" dataType="LimitB" min="1" max="255"  msg="[1,255]个字符之内">
      </td>
    </tr>
    <tr> 
    	<td colspan="2" width="100%">
    		<table cellpadding="0" cellspacing="0" width="100%" border="0">	
					<tr>
						<td width="20%"  class="edit_td_txt">开始时间:</td>
			      <td width="20%"  class="edit_td_input">
			      	<input type="text" name="starttime" id="starttime" class="input_text" value="{starttime}">
			      	<script>
								function catcalc(cal)
								{
									document.getElementById("starttime").value = cal.date.print("%Y-%m-%d %H:%M:%S");
								}
								Calendar.setup({
									inputField: "starttime",
									ifFormat:"%Y-%m-%d %H:%M:%S",
									onUpdate:catcalc,
									showsTime:true
								});
							</script>
			      </td>
						<td width="20%"  class="edit_td_txt">结束时间:</td>
			      <td class="edit_td_input">
			      	<input type="text" name="endtime" id="endtime" class="input_text" value="{endtime}">
			      	<script>
								function catcalc(cal)
								{
									document.getElementById("endtime").value = cal.date.print("%Y-%m-%d %H:%M:%S");
								}
								Calendar.setup({
									inputField: "endtime",
									ifFormat:"%Y-%m-%d %H:%M:%S",
									onUpdate:catcalc,
									showsTime:true
								});
							</script>
			      </td>	      
					</tr>	
				</table>
    	</td>
    </tr>  
    <tr> 
      <td width="20%"  class="edit_td_txt">正常显示内容:</td>
      <td width="80%"  class="edit_td_input">
      	<textarea name="content_open" class="input_textarea" rows="6" style="width:90%" >{content_open}</textarea>
      </td>
    </tr> 
    <tr> 
      <td width="20%"  class="edit_td_txt">停止显示内容:</td>
      <td width="80%"  class="edit_td_input">
      	<textarea name="content_stop" class="input_textarea" rows="6" style="width:90%" >{content_stop}</textarea>
      </td>
    </tr> 
    <tr> 
      <td width="20%"  class="edit_td_txt">投放人:</td>
      <td width="80%"  class="edit_td_input">
      	<input type="text" name="username" id="username" class="input_text" value="{username}" onClick="openSelectWin('../mod_user/user_select.php')">
	      <input type="hidden" name="uid" id="uid" value="{uid}">
      </td>
    </tr> 
    <tr> 
      <td width="20%"  class="edit_td_txt">频道分类:</td>
      <td width="80%"  class="edit_td_input">
      	<input type="radio" name="channel_type" id="channel_type_1" value="1" {channel_checked_1} onClick="showChannel(1)">所有&nbsp;
      	<input type="radio" name="channel_type" id="channel_type_2" value="2" {channel_checked_2} onClick="showChannel(2)">选择
      </td>
    </tr> 
	<tr id="edit_channel" style="display:{channel_display}"> 
        <td width="20%"  class="edit_td_txt"></td>
		<td width="80%"  class="edit_td_input">
		<input type="text" name="channel_id" id="channel_id" class="input_text" size="30" value="{channel_id}" require="false" dataType="LimitB" min="0" max="255"  msg="不能为空">
        <input type="button" class="btn_jqm" name="btn_select_channel_id" id="btn_select_channel_id" title="选择频道" value="选择..." onClick="openChannelSelect('channel_id','multiselect','all')" >
		</td> 
    </tr> 
    <tr style="display:{style_display}"> 
      <td width="20%" class="edit_td_txt">标 记:</td>
      <td width="80%"  class="edit_td_input">{flag}</td>
    </tr>
    <tr> 
    	<td colspan="2" width="100%">
    		<table cellpadding="0" cellspacing="0" width="100%" border="0">	
					<tr>
						<td width="20%" class="edit_td_txt">添加日期:</td>
      			<td width="20%" class="edit_td_input">
	      			{addtime}
      			</td>
						<td width="20%" class="edit_td_txt">IP:</td>
			      <td class="edit_td_input">
			      	{ip}
			      </td>		      
					</tr>	
				</table>
    	</td>
    </tr>
  </form>
</table>

<div id="modalWindow" class="jqmWindow">
<div id="jqmTitle">
<button class="jqmClose">X</button>
<span id="jqmTitleText">选择频道</span>
</div>
<iframe id="jqmContent" src=""></iframe>
</div>

</body>
</html>

