<!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=gb2312'>
<title>增加广告</title>
<link href="css_body.css" rel="stylesheet" type="text/css" />
<script language="javascript">
function checkSubmit()
{
	if(document.form1.tagname.value=="")
	{
		alert("广告标识不能为空！");
		document.form1.tagname.focus();
		return false;
	}
}
</script>
</head>
<body>
<div class="bodytitle">
	<div class="bodytitleleft"></div>
	<div class="bodytitletxt">辅助插件</div>
</div>
<table width="96%" border="0" cellpadding="1" cellspacing="1" align="center" class="tbtitle" style="background:#E2F5BC;">
<tr>
    <td height="19" bgcolor="#EDF9D5">&nbsp;<b><a href="ad_main.php"><u>广告管理</u></a></b>&gt;&gt;增加广告位置</td>
</tr>
<tr>
    <td height="200" bgcolor="#FFFFFF" valign="top">
	<table width="100%" border="0" cellspacing="4" cellpadding="4">
        <form action="ad_add.php" method="post" name="form1" onSubmit="return checkSubmit()">
          <input type='hidden' name='dopost' value='save'>
          <tr> 
            <td height="25" colspan="3">广告代码的调用方法：{dede:myad name='广告位标识'/} </td>
          </tr>
          <tr> 
            <td height="25" align="center">广告位标识：</td>
            <td colspan="2"><input name="tagname" type="text" id="tagname">
              （使用英文或数字表示的简洁标识）</td>
          </tr>
          <tr> 
            <td width="15%" height="25" align="center">广告投放范围：</td>
            <td colspan="2"> 
              <?php 
           	$tl = new TypeLink(0);
           	$typeOptions = $tl->GetOptionArray(0,0,0);
            echo "<select name='typeid' style='width:300'>\r\n";
            echo "<option value='0' selected>投放在没有同名标识的所有栏目</option>\r\n";
            echo $typeOptions;
            echo "</select>";
			$tl->Close();
			?>
              <br>
              （如果在所选栏目找不到指定标识的广告内容，系统会自动搜索父栏目）</td>
          </tr>
          <tr> 
            <td height="25" align="center">广告位名称：</td>
            <td colspan="2"><input name="adname" type="text" id="adname" size="30"></td>
          </tr>
          <tr> 
            <td height="25" align="center">时间限制：</td>
            <td colspan="2">
            	<input name="timeset" type="radio"  value="0" checked>
              永不过期 
              <input type="radio" name="timeset"  value="1">
              在设内时间内有效
            </td>
          </tr>
          <tr> 
            <td height="25" align="center">开始时间：</td>
            <td colspan="2"><input name="starttime" type="text" id="starttime" value="<?php echo $startDay?>"></td>
          </tr>
          <tr> 
            <td height="25" align="center">结束时间：</td>
            <td colspan="2"><input name="endtime" type="text" id="endtime" value="<?php echo $endDay?>"></td>
          </tr>
          <tr> 
            <td height="80" align="center">正常显示内容：</td>
            <td width="76%"> 
             <textarea name="normbody" rows="6" id="normbody" style="width:80%;height:100"></textarea>
            </td>
            <td width="9%">&nbsp;</td>
          </tr>
          <tr> 
            <td height="80" align="center">过期显示内容：</td>
            <td> 
             <textarea name="expbody" rows="6" id="expbody" style="width:80%;height:100"></textarea>
            </td>
            <td>&nbsp;</td>
          </tr>
          <tr> 
            <td height="53" align="center">&nbsp;</td>
            <td colspan="2"><input name="imageField" type="submit" class="inputbut" value="提交"></td>
          </tr>
        </form>
      </table>
	 </td>
</tr>
</table>
</body>
</html> 