<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
'****************************************************************
'**   版权所有：烈火工作室  演示网站http://www.strongfire.cn   **
'**   QQ:839225572   邮箱：strongfire2008@163.com              **
'**   非正版用户不得擅自非法修改用于商业用途！查出必究。       **
'****************************************************************
%>
<!--#include file="islogin.asp"-->
<!--#include file="Check_SqlIn.asp"-->
<!--#include file="admin_conn.asp"-->
<%
ClassName=Request.QueryString("ClassName")
%>
<html>
<head>
<LINK href="admin_Css.css" type=text/css rel=stylesheet>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>添加信息</title>
<script language="JavaScript">
<!--
function doChange(objText, objDrop){
		if (!objDrop) return;
		var str = objText.value;
		var arr = str.split("|");
		var nIndex = objDrop.selectedIndex;
		objDrop.length=1;
		for (var i=0; i<arr.length; i++){
			objDrop.options[objDrop.length] = new Option(arr[i], arr[i]);
		}
		objDrop.selectedIndex = nIndex;
	}

	function checkForm(){
	
		if (document.postart.ClassName.value=="") {
			alert("请选择类别！");
			document.postart.ClassName.focus();
			return false;
		}
		
		if (document.postart.txttitle.value.length == 0) {
			alert("请输入标题！");
			document.postart.txttitle.focus();
			return false;
		}
		
		
		if (eWebEditor.getHTML()==""){
			alert("信息内容不能为空！");
			return false;
		}
		
	    eWebEditor.remoteUpload("doSubmit()");
		return false;
	

	}
	function doSubmit(){
		document.postart.submit();
	}
	//-->
</script>
<style type="text/css">
<!--
.STYLE2 {color: #FF0000}
-->
</style>
</head>
<body>
<div align="center">
<form method="POST" action="AritcleAddSave.asp" name="postart" onSubmit="return checkForm()">

           
             <table border="0" align="center" cellspacing="1" class="list">
                <tr> 
                  <th colspan="3">添 加 信 息</th>
                </tr>
                
                
                
                <tr>
                  <td><div align="center">信息类别：</div></td>
                  <td width="88%" colspan="2">
				  <select name="ClassName" size="1" id="ClassName" >
            <option value="" selected>选择类别</option>
<%set rs=conn.execute("select * from class")
if rs.eof or rs.bof then
	response.write "<option value=''>没有分类</option>"
else
	do until rs.eof
%>
<option value="<%=rs("classname")%>" <%if rs("ClassName")=ClassName then%>selected<%end if%>><%=rs("ClassName")%></option> 
<%  rs.movenext
    loop
end if
rs.close
set rs = nothing
%>
          </select>
				  <span class="STYLE2">*</span> </td>
                </tr>
                <tr> 
                  <td width="12%" align="right"><div align="center">标&nbsp;&nbsp;&nbsp; 题：</div></td>
                  <td  colspan="2"><input name="txttitle" id=me type="TEXT" size=60>
                    <span class="STYLE2">*</span></td>
                </tr>
				
   
	
	<input type=hidden name=d_savepathfilename onChange="doChange(this,document.postart.picture)">
                <tr> 
                  <td width="12%" align="right" valign="top"  ><div align="center">关 键 字：</div></td>
                  <td colspan=2 ><input name="keywords" id="keywords" type="TEXT" size=60>
                    (如留空则关键字为:标题_网站名)</td>
                </tr>
                <tr>
                  <td >&nbsp;首页图片新闻：</td>
                  <td colspan=2 ><select name="picture" size="1">
                    <option value=''>无</option>
                  </select>
当编辑区有插入图片时，将自动填充此下拉框</td>
                </tr>
                
                <tr> 
                  <td height="25" colspan=3 align="center"> 
                    <textarea name="d_content" style="display:none"></textarea>
					<iframe ID="eWebEditor" src="../ewebeditor/ewebeditor.htm?id=d_content&style=coolblue&savepathfilename=d_savepathfilename" frameborder="0" scrolling="no" width="770" HEIGHT="420"></iframe></td>
                </tr>
                <tr> 
                  <td height="20" colspan=3 align=center > 
                    <input type="submit" value=" 添 加 "name="cmdok" >
                    &nbsp; 
                    <input type="reset" value=" 重 写 "name="cmdcancel" >
&nbsp;&nbsp;                  </td>
                </tr>
    </table>


</form>
</div>
