<%
option explicit
response.buffer=true	
%>
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/Conn_User.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/function.asp"-->
<!--#include file="inc/ubbcode.asp"-->
<!--#include file="inc/admin_code_article.asp"-->

<%
if CheckUserLogined()=False then
	response.Redirect "User_Login.asp"
end if
dim ClassID,SpecialID
dim SkinID,LayoutID,SkinCount,LayoutCount,ClassMaster,BrowsePurview,AddPurview
ClassID=session("ClassID")
SpecialID=session("SpecialID")
if ClassID="" then
	ClassID=0
else
	ClassID=Clng(ClassID)
end if
if SpecialID="" then
	SpecialID=0
else
	SpecialID=Clng(SpecialID)
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<title>发表日志</title>
<style type="text/css">
BODY {
	scrollbar-face-color:#DDDDDD;
	scrollbar-highlight-color: #cccccc;
	scrollbar-shadow-color: #CCCCCC;
	scrollbar-3dlight-color: #F5F5F5;
	scrollbar-darkshadow-color: #F5F5F5;
	scrollbar-track-color: #F0F0F0;
	scrollbar-arrow-color: #FFFFFF;
	margin-left: 10px;
	margin-top: 10px;
	margin-right: 10px;
	margin-bottom: 10px;
}
</style>
<link rel="stylesheet" type="text/css" href="new/css.css">
<script language = "JavaScript">
function AddItem(strFileName){
  document.myform.IncludePic.checked=true;
  document.myform.DefaultPicUrl.value=strFileName;


}
function CheckForm()
{
  if (editor.EditMode.checked==true)
	  document.myform.Content.value=editor.HtmlEdit.document.body.innerText;
  else
	  document.myform.Content.value=editor.HtmlEdit.document.body.innerHTML; 

  if (document.myform.ClassID.value=="")
  {
    alert("文章所属栏目不能指定为含有子栏目的栏目！");
	document.myform.ClassID.focus();
	return false;
  }
  if (document.myform.ClassID.value=="0")
  {
    alert("文章所属栏目不能指定为外部栏目！");
	document.myform.ClassID.focus();
	return false;
  }
  if (document.myform.ClassID.value=="-1")
  {
    alert("你没有在此栏目发表文章的权限，请选择其他栏目！");
	document.myform.ClassID.focus();
	return false;
  }

  if (document.myform.Title.value=="")
  {
    alert("文章标题不能为空！");
	document.myform.Title.focus();
	return false;
  }
  if (document.myform.Key.value=="")
  {
    alert("关键字不能为空！");
	document.myform.Key.focus();
	return false;
  }
  if (document.myform.Content.value=="")
  {
    alert("文章内容不能为空！");
	editor.HtmlEdit.focus();
	return false;
  }
  if (document.myform.Content.value.length>655360)
  {
    alert("文章内容太长，超出了ACCESS数据库的限制（64K）！建议将文章分成几部分录入。");
	editor.HtmlEdit.focus();
	return false;
  }
  return true;  
}
</script>

</head>

<body >
<form method="POST" name="myform" onSubmit="return CheckForm();" action="User_ArticleSave.asp" target="_self">

	<table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="1" height="1"></td>
        <td height="1" bgcolor="#BCBCBC"></td>
        <td width="1" height="1"></td>
      </tr>
      <tr>
        <td bgcolor="#BCBCBC"></td>
        <td height="25" align="center" bgcolor="fafafa"><strong>---&nbsp;发表日志&nbsp;---</strong></td>
        <td bgcolor="#BCBCBC"></td>
      </tr>
    </table>
	<table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC">
          
		  <tr bgcolor="#FFFFFF" class="tdbg"> 
            <td align="center"><table width="405" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="49" align="center"><strong>标题：</strong></td>
                <td><select name='ClassID' class="ifd">
                  <%call Admin_ShowClass_Option(4,ClassID)%>
                </select>
                  
                  <input name="Title" type="text" id="Title" value="" size="37" maxlength="255" class="ifd">
				  </td><td>
                  <select name="TitleFontColor" id="TitleFontColor" class="ifd">
                    <option value="" selected>颜色</option>
                    <OPTION value="">默认</OPTION>
                    <OPTION value="#000000" style="background-color:#000000"></OPTION>
                    <OPTION value="#FFFFFF" style="background-color:#FFFFFF"></OPTION>
                    <OPTION value="#008000" style="background-color:#008000"></OPTION>
                    <OPTION value="#800000" style="background-color:#800000"></OPTION>
                    <OPTION value="#808000" style="background-color:#808000"></OPTION>
                    <OPTION value="#000080" style="background-color:#000080"></OPTION>
                    <OPTION value="#800080" style="background-color:#800080"></OPTION>
                    <OPTION value="#808080" style="background-color:#808080"></OPTION>
                    <OPTION value="#FFFF00" style="background-color:#FFFF00"></OPTION>
                    <OPTION value="#00FF00" style="background-color:#00FF00"></OPTION>
                    <OPTION value="#00FFFF" style="background-color:#00FFFF"></OPTION>
                    <OPTION value="#FF00FF" style="background-color:#FF00FF"></OPTION>
                    <OPTION value="#FF0000" style="background-color:#FF0000"></OPTION>
                    <OPTION value="#0000FF" style="background-color:#0000FF"></OPTION>
                    <OPTION value="#008080" style="background-color:#008080"></OPTION>
                  </select>
                  <input name="Key" type="hidden"
           id="Key" value="isky" size="50" maxlength="255">
                  </td>
              </tr>
                        </table>              </td>
          </tr>
          <tr bgcolor="#FFFFFF" class="tdbg"> 
            <td align="left" valign="middle">            
              <table width="100%"  border="0" cellspacing="0" cellpadding="2">
                <tr>
                  <td align="center"><textarea name="Content" style="display:none"></textarea> 
                    <iframe ID="editor" src="editors.asp" frameborder=0 scrolling=no width="405" height="330" class=4></iframe>	</td>
                </tr>
              </table>   	        </td>
          </tr>

          <tr align="center" bgcolor="#FFFFFF"> 
            <td height="50">

<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center"><img onclick=a() align=absmiddle src="gif/1.gif" width="35" height="35" alt="图片" border="0"></td>
    <td align="center"><img onclick=a() align=absmiddle src="gif/2.gif" width="35" height="35" alt="图片" border="0"></td>
    <td align="center"><img onclick=a() align=absmiddle src="gif/3.gif" width="35" height="35" alt="图片" border="0"></td>
    <td align="center"><img onclick=a() align=absmiddle src="gif/4.gif" width="35" height="35" alt="图片" border="0"></td>
    <td align="center"><img onclick=a() align=absmiddle src="gif/5.gif" width="35" height="35" alt="图片" border="0"></td>
    <td align="center"><img onclick=a() align=absmiddle src="gif/6.gif" width="35" height="35" alt="图片" border="0"></td>
    <td align="center"><img onclick=a() align=absmiddle src="gif/7.gif" width="35" height="35" alt="图片" border="0"></td>
    <td align="center"><img onclick=a() align=absmiddle src="gif/8.gif" width="35" height="35" alt="图片" border="0"></td>
    <td align="center"><img onclick=a() align=absmiddle src="gif/9.gif" width="35" height="35" alt="图片" border="0"></td>
    <td align="center"><img onclick=a() align=absmiddle src="gif/10.gif" width="35" height="35" alt="图片" border="0"></td>
  </tr>
  <tr>
    <td align="center"><input name="magic" type="radio" value="1" checked></td>
    <td align="center"><input type="radio" name="magic" value="2"></td>
    <td align="center"><input type="radio" name="magic" value="3"></td>
    <td align="center"><input type="radio" name="magic" value="4"></td>
    <td align="center"><input type="radio" name="magic" value="5"></td>
    <td align="center"><input type="radio" name="magic" value="6"></td>
    <td align="center"><input type="radio" name="magic" value="7"></td>
    <td align="center"><input type="radio" name="magic" value="8"></td>
    <td align="center"><input type="radio" name="magic" value="9"></td>
    <td align="center"><input type="radio" name="magic" value="10"></td>
  </tr>
</table></td>
          </tr>
          <tr align="center" bgcolor="#FFFFFF">
            <td><%dim trs
	  set trs=conn.execute("select SkinID from Skin where IsDefault=True")
	  %>
              <input name="SkinID" type="hidden" id="SkinID2" value="非常视觉">
			  <input name="IncludePic" type="hidden" id="IncludePic">
			  <input name="DefaultPicUrl" type="hidden" id="DefaultPicUrl">
			  <input name="UploadFiles" type="hidden" id="UploadFiles">
              <%
	  set trs=conn.execute("select LayoutID from Layout where IsDefault=True and LayoutType=3")
	  %>
              <input name="LayoutID" type="hidden" id="LayoutID2" value="<%=trs(0)%>">
              <input name="Action" type="hidden" id="Action2" value="Add">
              <input name="Add" type="submit"  id="Add2" value=" 添 加 " onClick="document.myform.action='User_ArticleSave.asp';document.myform.target='_self';"></td>
          </tr>
  </table> 

</form>
</body>
</html>
