<table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="1" cellpadding="5">

<form action="admin.php?action=doaddBlog"  method="post" name="input"  onsubmit="return checkform(this);">

<tr id="cat">
	<td class="tblhead" colspan="2"><b>添加日志</b></td>
</tr>
<tr  class='listbg' >
	<td valign="top"><b>选择类别</b><br></td>
	<td>
	<select name="class" >
	<?php
		$classes = $DB->query("SELECT * FROM `".$mysql_prefix."class`");
		while($classRe = $DB->fetch_array($classes))
		{
			echo "<option value='".$classRe['id']."'>".$classRe['classname']."</option>\n";
		}
	?>
	</select>
</td></tr>
<tr  class='listbg' nowrap>
	<td><b>标题</b><br>日志的标题</td>
	<td><input class="formfield" type="text" name="name" size="35" maxlength="200" value="" ></td>
</tr>

<tr  class='listbg' nowrap>
	<td><b>关键词扩展</b><br>针对搜索引擎的标题扩展</td>
	<td><input class="formfield" type="text" name="subname" size="35" maxlength="200" value="" ></td>
</tr>


<?php

//显示 editor
if ($config['editor'] == "html_fckeditor")
{
	echo "<tr class=listbg ><td colspan=2>";
	$oFCKeditor = new FCKeditor('message') ;
	$oFCKeditor->BasePath = 'FCKeditor/';
	$sBasePath = dirname($_SERVER['PHP_SELF']);
	$oFCKeditor->Config['SkinPath'] = $sBasePath.'/FCKeditor/editor/skins/silver/';
	$oFCKeditor->Value = '';
	$oFCKeditor->Height = '400' ;
	$oFCKeditor->Create() ;
	echo "</td></tr>";
}
else if ($config['editor'] == "html_sina")
{
	echo "<tr class=listbg ><td colspan=2>";
	echo '<textarea name="message" id="content" style="display:none"></textarea>';
	echo '<iframe src="sinaeditor/editor.htm?id=content&ReadCookie=0" frameBorder="0" marginHeight="0" marginWidth="0" scrolling="No" width="621" height="457"></iframe>';
	echo "</td></tr>";
}
else if ($config['editor'] == "ubb_oblog" || !$config['editor'])
{
	$FORM->editor(array("text" => "内容","note" => "日志的内容，使用UBB格式的编码","value"=>""));
}

if($makehtml)
{
?>
<tr  class='listbg' nowrap>
<td><b>静态文件名</b><br>默认以日志的ID命名</td>
<td><input class="formfield" type="text" name="filename" size="35" maxlength="50" >.<?php echo $extraname;?></td>
</tr>
<?php
}
?>
<tr    class='listbg' nowrap>
	<td><b>Trackback URL</b><br>Trackback 引用地址，没有请留空</td>
	<td><input class="formfield" type="text" name="trackbackUrl" size="35" maxlength="200" value="" ></td>
</tr>
<tr    class='listbg' nowrap>
	<td><b>发表时间</b><br>修改日志的发表时间(服务器所在时区)</td>
<td><input type='text' name='year' size='4' value="<?php echo $nowtime['year'];?>" maxlength='4' class="formfield"> 年 -
 <input type='text' name='month' size='2' value="<?php echo $nowtime['month'];?>" maxlength='2' class="formfield"> 月 -
 <input type='text' name='day' size='2' value="<?php echo $nowtime['day'];?>" maxlength='2' class="formfield"> 日 - 
 <input type='text' name='hour' size='2' value="<?php echo $nowtime['hour'];?>" maxlength='2' class="formfield"> 时 - 
 <input type='text' name='minute' size='2' value="<?php echo $nowtime['minute'];?>" maxlength='2' class="formfield"> 分  - 
 <input type='text' name='second' size='2' value="<?php echo $nowtime['second'];?>" maxlength='2' class="formfield"> 秒</td>
</tr>


<tr  class='onlyalt listbg' nowrap>
<td><b>附件上传</b><br>请选择您要上传的附件</td>
<td><IFRAME src="upload.php?action=upload_form&editor=<?php echo $config['editor'];?>" frameBorder=0 width="100%" scrolling=no height=23  allowTransparency="true" noresize></IFRAME></td>
</tr>

<tr   class='listbg' >
	<td valign="top"><b>是否置顶</b><br></td>
	<td><input type=checkbox name="top" value='1' class='checkbox' />
</td></tr>
<tr  class="onlyalt listbg">
	<td valign="top"><b>允许评论</b><br></td>
	<td><input type=checkbox name="remark"  value='1' checked class='checkbox'  />
</td></tr>

<?php
if ($config['editor'] >= "htm" && $config['editor'] <= "htmz")
{
	echo "<input type=hidden name=ishtml value='1' /> ";
}
else
{
?>
<tr   class='listbg' >
	<td valign="top"><b>允许表情</b><br></td>
	<td><input type=checkbox name="allow_face"  value='1' checked  class='checkbox'   />
</td></tr>
<?php
}
?>
<tr  class="onlyalt listbg">
	<td valign="top"><b>保存草稿</b><br></td>
	<td><input type=checkbox  name="draft" value='1'  class='checkbox'  />
</td></tr>
<tr>
<td colspan="2" align="center">
 <input class="button" accesskey="y" type="submit" name="submit" value="提交" >
 <input class="button" accesskey="r" type="reset" name="" value="重置" >
</td></tr>
</form>
</table></td>
</tr>
</table>
<script>
function checkform(f)
{
	if (!f.name.value)
	{
		alert("请输入标题!");
		return false;
	}
	return true;
}
</script>