<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--#include file="conn.asp"-->
<!--#include file="admin.asp"-->
<!-- #include file="Inc/Head.asp" -->
<%
bigclassname=request.querystring("bigclassname")
dim rs
dim sql
dim count
set rs=server.createobject("adodb.recordset")
sql = "select * from SmallClass_New order by SmallClassID asc"
rs.open sql,conn,1,1
%>
<script language = "JavaScript">
var onecount;
subcat = new Array();
        <%
        count = 0
        do while not rs.eof 
        %>
subcat[<%=count%>] = new Array("<%= trim(rs("SmallClassName"))%>","<%= trim(rs("BigClassName"))%>","<%= trim(rs("SmallClassName"))%>");
        <%
        count = count + 1
        rs.movenext
        loop
        rs.close
        %>
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.addNEWS.SmallClassName.length = 1; 
    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
                document.addNEWS.SmallClassName.options[document.addNEWS.SmallClassName.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
    }    

function CheckForm()
{
     document.addNEWS.cnWords.value = document.frames.cnEditBox.getHTML(true);     
     document.addNEWS.imageNum.value = document.frames.cnEditBox.document.all("editImageNum").value;
     document.addNEWS.editFirstImageName.value = document.frames.cnEditBox.document.all("editFirstImageName").value;

	if (document.addNEWS.title.value.length == 0) {
		alert("专题标题没有填写.");
		document.addNEWS.title.focus();
		return false;
	}
	if (document.addNEWS.remark.value.length == 0) {
		alert("专题内容提要没有填写.");
		document.addNEWS.remark.focus();
		return false;
	}
	if (document.addNEWS.user.value.length == 0) {
		alert("专题来源没有填写.");
		document.addNEWS.user.focus();
		return false;
	}
	return true;
}
</script>

<Script Language=JavaScript>
//获取上传文件的文件名
function doChange(objText, objDrop){
	if (!objDrop) return;
	var str = objText.value;
	var arr = str.split("|");
	objDrop.length=0;
	for (var i=0; i<arr.length; i++){
		objDrop.options[i] = new Option(arr[i], arr[i]);
	}
}
</Script>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="150" align="center" valign="top" bgcolor="#A0CCD8"><!-- #include file="info_left.asp" --></td>
    <td align="center" valign="top"><table width="100%" height="0"  border="0" cellpadding="5" cellspacing="0">
      <tr>
        <td height="24" background="image/usercenter_3.jpg">
          <div align="center"><span style="font-weight: bold"><font color="#FFFFFF">添 加 动 态 信 息</font></span>  </div></td>
      </tr>
    </table>
	  </p>
	  <table width="90%" border="1" align="center" cellpadding="0" cellspacing="2">
        <form name="addNEWS" method="post" action="addinfo_NEWS_ok.asp" onSubmit="return CheckForm();">
   
   <tr> 
            <td height="18"> 
              <table width="100%" class="border" border="0" cellspacing="1"  cellpadding="0" style="word-break:break-all">
                <tr > 
                  <td width="14%" height="26"> 
                    <div align="left"><font color="#FF0000">*</font>是否为图片新闻：</div></td>
                  <td width="44%" > <font color="#FF0000"> 
                    <div class="Btn" LANGUAGE="javascript" onclick="pic()"> <font color="#FF0000"> 
                      <input name="FileName2" type="text" id="FileName2" size="45" value="如果不是首页的图片新闻，请不要在此项中输入！">
                      </font></div>
                    </font></td>
                  <td width="19%" ><div align="left"><font color="#FF0000"><a href="editor_InsertPic1.asp"><img src="../images/upload1.gif" border="0" class="Ico" ></a></font></div></td>
                  <td width="23%" >请将图片分辨率设为300X225</td>
                </tr>
              </table></td>
          </tr>
    <tr> 
            <td height="25"><font color="#FF0000"> &nbsp;*</font>标 题： 
              <input name="title" type="text" class="input" size="53" maxlength="200">
        </td>
    </tr>
    <tr> 
            <td height="25"><font color="#FF0000"> &nbsp;*</font>类 别： 
              <select name="SmallClassName">
                <%
			sql="select * from SmallClass_New where BigClassName='" & bigclassname & "'"
			rs.open sql,conn,1,1
			if not(rs.eof and rs.bof) then
			%>
                <option value="<%=rs("SmallClassName")%>"><%=rs("SmallClassName")%></option>
                <% rs.movenext
				do while not rs.eof%>
                <option value="<%=rs("SmallClassName")%>"><%=rs("SmallClassName")%></option>
                <%
			    	rs.movenext
				loop
			end if
	        rs.close
			%>
              </select>
              &nbsp;&nbsp;注：类别为“简介类”的只能是一条记录！如果增加多条默认为最近一条</td>
    </tr>
    <tr> 
      <td height="25" valign="top"><font color="#FF0000"><br>
              &nbsp;*</font>内 容： 
              <table width="90%" align="right" >
          <tr>
            <td>       <input type="hidden" name="newscontent" />
              <iframe id="newscontent" src="htmledit/ewebeditor.asp?id=newscontent&amp;style=standard&savefilename=FileName" frameborder="0" scrolling="no" width="90%" height="400"></iframe>			  </td>
          </tr>
        </table>
 </td>
    </tr>
   <tr > 
            <td height="25"><div align="left"><font color="#FF0000">*</font>添加人： 
                <input name="author" type="text" class="input" id="author" value="<%=session("ewsname")%>" size="31" maxlength="50" readonly>
                &nbsp; </div></td>
          </tr>
    <tr>
      <td height="25">&nbsp;
        <input name="pic" type="checkbox"  value="Yes">
该信息有无图片：如果在上面内容中插入了图片，请选择此项。
<input type=hidden name="bigclassname" value="<%=bigclassname%>">
</td>
    </tr>
    <tr> 
      <td height="30" align="center"> 
        <input type="submit" name="Submit" value="保 存" class="input">　　
        <input type="reset" name="Submit2" value="重 写" class="input">        </td>
    </tr>
  </form>
</table>
</td>
  </tr>
</table>
<!-- #include file="Inc/Foot.asp" -->