<!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=<?php echo $cfg_soft_lang; ?>">
<title>增加自定義標記</title>
<link href='css/base.css' rel='stylesheet' type='text/css'>
<script type="text/javascript" src="js/calendar/calendar.js"></script>
<script language="javascript">
function checkSubmit()
{
	if(document.form1.tagname.value=="")
	{
		alert("標記名稱不能為空！");
		document.form1.tagname.focus();
		return false;
	}
}
</script>
</head>
<body background='images/allbg.gif' leftmargin='8' topmargin='8'>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#cfcfcf">
<tr>
  <td height="19" background="images/tbg.gif"  style="padding-left:10px;"><b><a href="mytag_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="mytag_add.php" method="post" enctype="multipart/form-data" name="form1" onSubmit="return checkSubmit()">
          <input type='hidden' name='dopost' value='save' />
          <tr> 
            <td height="25" colspan="3">自定義標記的調用方法：<br/>
              {dede:mytag name='標記名稱' ismake='是否含板塊代碼（yes 或 no）' typeid='欄目ID'/} 
              <br/>
              1、name 標記名稱，該項是必須的屬性，以下 2、3是可選屬性；<br/>
              2、ismake 默認是 no 表示設定的純HTML代碼， yes 表示含板塊標記的代碼；<br/>
              3、typeid 表示所屬欄目的ID，默認為 0 ，表示所有欄目通用的顯示內容，在列表和文檔模板中，typeid默認是這個列表或文檔本身的欄目ＩＤ。</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>";
			?>
            </td>
          </tr>
          <tr> 
            <td height="25" align="center">標記名稱：</td>
            <td colspan="2"><input name="tagname" type="text" id="tagname" /></td>
          </tr>
          <tr> 
            <td height="25" align="center">時間限制：</td>
            <td colspan="2"><input name="timeset" type="radio" value="0" checked='1' />
              永不過期 
              <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?>" />
                <script language="javascript" type="text/javascript">
						Calendar.setup({
							inputField     :    "starttime",
							ifFormat       :    "%Y-%m-%d %H:%M",
							showsTime      :    true,
							timeFormat     :    "24"
						});
				 </script>
            </td>
          </tr>
          <tr> 
            <td height="25" align="center">結束時間：</td>
            <td colspan="2">
            	<input name="endtime" type="text" id="endtime" value="<?php echo $endDay?>" />
                <script language="javascript" type="text/javascript">
						    Calendar.setup({
							inputField     :    "endtime",
							ifFormat       :    "%Y-%m-%d %H:%M",
							showsTime      :    true,
							timeFormat     :    "24"
						});
				 </script>
            </td>
          </tr>
          <tr> 
            <td height="80" align="center">正常顯示內容：</td>
            <td width="76%">
            	<textarea name="normbody" 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" 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="image" src="images/button_ok.gif" width="60" height="22" border="0" class='np' />
            </td>
          </tr>
        </form>
      </table>
	 </td>
</tr>
</table>
</body>
</html>