<!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>
function checkSubmit()
{
  if(document.form1.title.value=="")
  {
     document.form1.title.focus();
     alert("標題必須設定！");
     return false;
  }
}
</script>
</head>
<body background='images/allbg.gif' leftmargin='8' topmargin='8'>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#D6D6D6">
  <form action="mynews_add.php" method="post" name="form1" onSubmit="return checkSubmit();">
  <input type="hidden" name="dopost" value="save" />
  <tr>
      <td height="24" background="images/tbg.gif"> 
        <table width="99%" border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td><strong>&nbsp;站內新聞管理-&gt;增加消息</strong></td>
            <td align="right"> <a href="mynews_main.php"><img src="images/file_edit.gif" width="15" height="16" border="0"><u>返回管理頁</u></a> 
            </td>
          </tr>
        </table></td>
</tr>
<tr>
    <td height="127" align="center" bgcolor="#FFFFFF"> 
      <table width="98%" border="0" cellspacing="2" cellpadding="0">
          <tr> 
            <td height="20" colspan="2" align="left">　      說明：站內新聞是為了方便站長發佈站點公告而設置的一種小功能，由於要讀取包括text字段的信息，應定期刪除太舊的信息，否則可能會讓模板解析速度變慢。如果沒有選擇顯示頻道，則在這個頻道中使用這個標記時會被「所有位置...」的標記內容代替。</td>
          </tr>
          <tr> 
            <td height="20" colspan="2"  align="left">　 站內新聞調用代碼： {dede:mynews row='條數' titlelen='標題長度'}Innertext{/dede:mynews}，Innertext支持的字段為：[field:title 
              /],[field:writer /],[field:senddate /](時間),[field:body /]。 </td>
          </tr>
          <tr> 
            <td width="13%" height="30" align="right">標　題：</td>
            <td width="87%" align="left"> <input name="title" type="text" id="title" size="35" style="width:350"> 
            </td>
          </tr>
          <tr>
            <td height="30" align="right">顯示頻道：</td>
            <td align="left">
			  <select name="typeid" style="width:150">
                <option value="0" selected>所有位置...</option>
                <?php
			  $dsql->SetQuery("Select id,typename From #@__arctype where reid=0 order by sortrank desc");
			  $dsql->Execute();
			  while($row = $dsql->GetObject())
			  {
			     echo "<option value='".$row->id."'>".$row->typename."</option>\r\n";
			  }
			  ?>
              </select>
			  </td>
          </tr>
          <tr> 
            <td height="30" align="right">發言人：</td>
            <td  align="left">
            	<input name="writer" type="text" id="writer" value="<?php echo $cuserLogin->getUserName()?>" size="16" />            
           </td>
          </tr>
		  <tr> 
            <td height="30" align="right">日期：</td>
            <td  align="left"><input name="sdate" type="text" id="sdate" size="25" value="<?php echo GetDateTimeMk(time())?>" />
           </td>
          </tr>
          <tr> 
            <td height="172" valign="top" align="right">信息內容：</td>
            <td height="172"> 
              <?php
	GetEditor("body","",250,"Small");
	?>
            </td>
          </tr>
          <tr> 
            <td height="38">&nbsp;</td>
            <td>
            	<input type="submit" name="Submit" value="發佈新聞" class="coolbg np" />
            </td>
          </tr>
          <tr> 
            <td colspan="2">&nbsp;</td>
          </tr>
     </table>
    </td>
</tr>
</form>
</table>
</body>
</html>