<!--#include file="../../Inc/conn.asp"-->
<!--#include file="../admin.asp"-->
<!-- #include file="../Inc/Head.asp" -->
<script language = "JavaScript">
function CheckForm()
{

	if (document.myform.title.value.length == 0) {
		alert("信息标题没有填写.");
		document.myform.title.focus();
		return false;
	}
		if (document.myform.Author.value.length == 0) {
		alert("信息发布人没有填写");
		document.myform.Author.focus();
		return false;
	}
		if (document.myform.ComeFrom.value.length == 0) {
		alert("信息来源没有填写");
		document.myform.ComeFrom.focus();
		return false;
	}	
	if (eWebEditor1.eWebEditor.document.body.innerHTML == ''){
		alert("信息内容不能为空！");
		eWebEditor1.eWebEditor.focus();
		return false;
	}
	return true;
}

function SetDropDownPic(url){
	document.myform.UploadFiles.value=document.myform.UploadFiles.value + url +"|";
	document.myform.IncludePic.value="1";
}
</script>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="table_southidc">
  <form name="myform" method="post" action="News_save2.asp" onSubmit="return CheckForm();">
    <tr>
      <td height="30" colspan="3" align="center" class="blod">增加信息</td>
    </tr>
    <tr bgcolor="#ECF5FF">
      <td width="153" height="25" align="center">信息标题：</td>
      <td colspan="2"><input name="title" type="text" class="input" size="30"></td>
    </tr>
    <tr bgcolor="#ECF5FF">
      <td height="25" align="center">信息类别：</td>
      <td colspan="2">
	  <%
	  	set rs=server.createobject("adodb.recordset")
	  	BigClassID=strToNum(Request("BigClassID"))
        sql = "select * from BigClass_New Where 1=1"
		If BigClassID<>0 Then
			sql=sql&" and BigClassID="&BigClassID
		End If
        rs.open sql,conn,1,1
		if rs.eof and rs.bof then
			response.write "请先添加栏目。"
		else
		%>
        <select name="BigClass" size="1" id="BigClass">
		<%
		do while not rs.eof
		%>
          <option value="<%=trim(rs("BigClassID"))%>"><%=trim(rs("BigClassName"))%></option>
		<%
		 rs.movenext
		 loop
		%>
        </select>
		<%
		end if
        rs.close
		%>
          <%
		  	SmallClassID=strToNum(Request("SmallClassID"))
			sql="select * from SmallClass_New where 1=1"
			If BigClassID<>0 Then
				sql=sql&" and BigClassID="&BigClassID
			End If
			If SmallClassID<>0 Then
				sql=sql&" and SmallClassID="&SmallClassID
			End If
			rs.open sql,conn,1,1
			if not(rs.eof and rs.bof) then
			%>
			<select name="SmallClass" id="SmallClass">
			<%
			do while not rs.eof
			%>
          	<option value="<%=rs("SmallClassID")%>"><%=rs("SmallClassName")%></option>
			<%
			rs.movenext
			loop
			%>
			</select>
          <%
			end if
		  	rs.close
			%>
        </td>
    </tr>
    <tr bgcolor="#ECF5FF">
      <td height="25" align="center">发 布 人：</td>
      <td colspan="2"><input name="Author" type="text" id="auther" value="本站">
        <span class="TableRow1">
        <select name=font2 onChange="Author.value=this.value;">
          <option selected value="">选择作者</option>
          <option value='佚名'>佚名</option>
          <option value='本站'>本站</option>
          <option value='不详'>不详</option>
          <option value='未知'>未知</option>
          <option value='admin'>admin</option>
        </select>
      </span></td>
    </tr>
    <tr bgcolor="#ECF5FF">
      <td height="25" align="center">信息来源：</td>
      <td colspan="2"><input name="ComeFrom" type="text" id="ComeFrom" value="网络">
        <span class="TableRow1">
        <select name=font1 onChange="ComeFrom.value=this.value;">
          <option selected value="">选择来源</option>
          <option value='本站原创'>本站原创</option>
          <option value='本站整理'>本站整理</option>
          <option value='不详'>不详</option>
          <option value='转载'>转载</option>
        </select>
      </span></td>
    </tr>
    <tr bgcolor="#ECF5FF">
      <td height="25" align="center" valign="top">信息内容：</td>
      <td colspan="2" valign="top"><iframe id="eWebEditor1" src="../editor/ewebeditor.asp?id=content&amp;style=s_coolblue" frameborder="0" scrolling="No" width="600" height="370"></iframe>
      <textarea name="content" id='content' style="display:none"></textarea>
      </td>
    </tr>
    <tr>
      <td height="30" align="center" bgcolor="#ECF5FF"><span class="tr_southidc">首页图片：</span></td>
      <td width="298" height="30" bgcolor="#ECF5FF"><span class="tr_southidc">
        <input name="DefaultPicUrl" type="text" id="DefaultPicUrl" value="images/Nopic.jpg" size="30" maxlength="120" />
      </span></td>
      <td width="495" bgcolor="#ECF5FF"><span class="tr_southidc">
        <input type="button" name="Submit22" value="直接从上传图片中选择" onClick="window.open('../SelectPic.asp','','status=no,scrollbars=yes,top=300,left=200,width=396,height=254');" />
        <input name="Submit222" type="button" value="上传图片"  onClick="window.open('../../inc/mx_upload_flash.asp?formname=myform&editname=DefaultPicUrl&uppath=UploadFiles/Arcitle&filelx=jpg','','status=no,scrollbars=no,top=300,left=200,width=420,height=136')">
      </span></td>
    </tr>
    <tr>
      <td height="30" align="center" bgcolor="#ECF5FF"><span class="tr_southidc">是否推荐：</span></td>
      <td height="30" colspan="2" align="left" bgcolor="#ECF5FF"><input name="Elite" type="checkbox" id="Passed" value="yes">是<font color="#0000FF">（如果选中的话将在首页做为图片信息显示）</font></td>
    </tr>
    <tr>
      <td height="30" align="center" bgcolor="#ECF5FF"><span class="tr_southidc">时间：</span></td>
      <td height="30" colspan="2" align="left" bgcolor="#ECF5FF"><span class="tr_southidc">
        <input name="PostTime" type="text" id="PostTime" value="<%=Now()%>" size="30" maxlength="120" />
        为了避免出错尽量不要改动
      </span></td>
    </tr>
    <tr>
      <td height="30" colspan="3" align="center" bgcolor="#ECF5FF"><input type="submit" name="Submit" value="确认添加" class="input">
        
        &nbsp;
        <input type="button" name="Submit2" value="返回上一页" class="input" onClick="history.go(-1);">
        <input name="Act" type="hidden" id="Act" value="Add">        <input name="UploadFiles" type="hidden" id="UploadFiles" />
        <span class="tr_southidc">
        <input name="IncludePic" type="hidden" id="IncludePic" value="0" />
        </span></td>
    </tr>
  </form>
</table>
<!-- #include file="../Inc/Foot.asp" -->