<?php 
defined('IN_HS') or exit('Access Denied');
include admintpl('header');
?>
<?=$menu?>
<script type="text/javascript" src="<?=HS_PATH?>include/js/MyCalendar.js"></script> 
<script type="text/javascript">
function ruselinkurl(){
	if($('islink').checked==true){
		$('linkurl').disabled=false;
	}else{
		$('linkurl').disabled=true;
	}
}

function doCheck(){
	if ($F('title')=="") {
		alert("请输入标题");
		$('title').focus();
		return false;
	}
	<?php if($MOD['editor_mode']!='editor') echo "clipboardData.setData('text',FCKeditorAPI.GetInstance('content').GetXHTML());";?>

	return true;
}

</script>

<table width="100%" height="25" border="0" cellpadding="3" cellspacing="0" class="tableborder">
  <tr>
    <td class="tablerow"> <img src="<?=HS_PATH?>admin/skin/images/pos.gif" align="absmiddle" alt="当前位置" > 当前位置：<a href="?mod=<?=$mod?>&file=<?=$file?>&action=main&channelid=<?=$channelid?>">文章首页</a> &gt;&gt; <a href="?mod=<?=$mod?>&file=<?=$file?>&action=add&catid=<?=$catid?>&channelid=<?=$channelid?>">添加文章</a> &gt;&gt; <?=$CAT['catname']?> &gt;&gt; </td>
  </tr>
</table>

<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td height="10"> </td>
</tr>
</table>



<form action="?mod=<?=$mod?>&file=<?=$file?>&action=add&channelid=<?=$channelid?>&dosubmit=1" method="post" name="myform" onsubmit="return doCheck();">
<input type="hidden" name="article[username]" value="<?=$_username?>" />
<table cellpadding="2" cellspacing="1" class="tableborder" width="100%">
  <tbody>
    <tr> 
      <td width="20%" class="tablerow">所属栏目</td>
      <td class="tablerow"><?=$this_category?></td>
    </tr>
    <tr> 
      <td class="tablerow">标题</td>
      <td class="tablerow"><?=$style_edit?> <input name="article[title]" type="text" id="title" size="44" maxlength="100" class="inputtitle" value="<?=$title?>"> <font color="#FF0000">*</font>  </td>
    </tr>


<input name="article[author]" type="hidden" id="author" size="40" maxlength="30" value="管理员">
<input name="article[copyfrom]" type="hidden" id="copyfrom" value="本站" size="40">

<tr> 
<td class="tablerow">文章内容<input name="save_remotepic" type="hidden" value="1" checked="checked" ></td>
      <td class="tablerow">
    <textarea name="article[content]" id="content"  cols="80" rows="25"><?=$content?></textarea><?=editor("content", $MOD['editor_mode'],600,300)?>

    </td>
    </tr>
	<tr> 
      <td class="tablerow">转向链接</td>
      <td class="tablerow">
       <input type="text" name="article[linkurl]" id="linkurl"  size="50" maxlength="255"<? if(!$islink) { ?>disabled<? } ?> value="<? if($islink) { ?><?=$linkurl?><? } ?>"><input name="article[islink]" type="checkbox" class="checkbox_style" id="islink" value="1" onclick="ruselinkurl();" <? if($islink) { ?>checked<? } ?>><font color="#FF0000">转向链接</font>
	   <br/><font color="#FF0000">如果使用转向链接则点击标题就直接跳转而内容设置无效</font>
     </td>
    </tr>
    <tr> 
      <td class="tablerow">推荐位置</td>
      <td class="tablerow">
<?=$position?>
      </td>
	  </tr>


    <tr> 
      <td class="tablerow">文章状态</td>
      <td class="tablerow">

<input name="article[status]" type="radio" value="3" checked class="radio_style"> 已通过&nbsp;
<input name="article[status]" type="radio" value="0" class="radio_style"> 草稿&nbsp;


	  
	  </td>
	  </tr>
	<tr> 
      <td class="tablerow">添加日期</td>
      <td class="tablerow"><?=date_select('article[addtime]', $addtime,'%Y-%m-%d %H:%M:%S')?></td>
    </tr>
</tbody>
</table>
<table width="100%" height="40" align="center" cellpadding="2" cellspacing="1" >
  <tr>
    <td width="18%"><input type="hidden" name="article[ishtml]" value="0">
	<div style='display:none'><?=$php_urlrule?></div>
	</td>
    <td>
	<input type="submit" class="btn" value=" 确定 " />
	&nbsp;&nbsp;&nbsp;&nbsp;
    <input type="reset" class="btn" value=" 清除 " />
	</td>
  </tr>
</table>
  </form>
</body>
</html>