<%@language=vbscript codepage=936 %>
<!--#include file="conn.asp"-->
<!--#include file="admin.asp"-->
<!--#include file="Inc/Function.asp"-->
<%
'Conn.Execute ("update News set Ok=True,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.myform.SmallClassName.length = 1; 
    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
                document.myform.SmallClassName.options[document.myform.SmallClassName.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
    }    

</script>
<!-- #include file="Inc/Head.asp" -->

<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td align="center" valign="top">
	<form method="POST" name="myform" onSubmit="return CheckForm();" action="News_Save.asp?action=Add" target="_self">
	  <table width="750" border="0" cellpadding="4" cellspacing="1" class="table_southidc">
        <tr bgcolor="#A4B6D7">
          <td height="30" colspan="3" align="center" class="back_southidc"><b>增 加 新 闻</b></td>
        </tr>
        <tr>
          <td height="22" align="right" bgcolor="#ECF5FF"><font color="#FF0000">*</font>新闻标题：</td>
          <td colspan="2" bgcolor="#ECF5FF"><input name="title" type="text" class="input" size="50"></td>
        </tr>
        <tr >
          <td width="150" height="36" align="right" bgcolor="#ECF5FF">备注/副标题：</td>
          <td height="36" colspan="2" bgcolor="#ECF5FF"><textarea name="title_fu" cols="80" rows="5" class="input" id="title_fu"></textarea></td>
        </tr>
        <tr id=ChannelType1 >
          <td height="36" align="right" bgcolor="#ECF5FF"><span class="TableRow2005">图片上传：</span></td>
          <td height="36" colspan="2" bgcolor="#ECF5FF"><table width="521" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td height="25" align="center"><span class="TableRow2005">
                <input name="PicOpen" type="radio"  onClick="ChannelType1.style.display='none'; ChannelType2.style.display='';" value="1" >
              </span></td>
              <td ><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td height="3"></td>
                  </tr>
              </table>                
                <font color="#FF0000">开启　　此处用于首页图片调用可根据需要选定开启。如果不需要可不必开启！</font></td>
            </tr>
          </table></td>
        </tr>
        <tr id=ChannelType2 style="display:none">
          <td height="22" align="right" bgcolor="#ECF5FF"><span class="TableRow2005">
            图片上传：</span></td>
          <td width="300" align="center" valign="middle" bgcolor="#ECF5FF"><span class="TableRow2005">
关闭<input name="PicOpen" type="radio"  onClick="ChannelType1.style.display='';     ChannelType2.style.display='none';" value="2">
          </span>
            <input name="DefaultPicUrl" type="text" id="DefaultPicUrl" size="30" maxlength="50">
                <input name="PhotoSize6" type="text" id="PhotoSize6" size="8" readonly style="display:none " ></td>
          <td width="310" align="center" valign="middle" bgcolor="#ECF5FF"><iframe id="UploadFiles" src="Upfile/upload_Photo.asp?PhotoUrlID=6" frameborder=0 scrolling=no width="270" height="22"></iframe></td>
        </tr>
        <tr>
          <td height="22" align="right" bgcolor="#ECF5FF"><font color="#FF0000">*</font>新闻类别：</td>
          <td colspan="2" bgcolor="#ECF5FF"><strong>
            <%		
        sql = "select * from BigClass_New"
        rs.open sql,conn,1,1
		if rs.eof and rs.bof then
			response.write "请先添加栏目。"
		else
		%>
            <select name="BigClassName" onChange="changelocation(document.myform.BigClassName.options[document.myform.BigClassName.selectedIndex].value)" size="1">
              <option selected value="<%=trim(rs("BigClassName"))%>"><%=trim(rs("BigClassName"))%></option>
              <%
			dim selclass
		    selclass=rs("BigClassName")
        	rs.movenext
		    do while not rs.eof
			%>
              <option value="<%=trim(rs("BigClassName"))%>"><%=trim(rs("BigClassName"))%></option>
              <%
		        rs.movenext
    	    loop
		end if
        rs.close
			%>
            </select>
            <select name="SmallClassName">
              <option value="" selected>不指定小类</option>
              <%
			sql="select * from SmallClass_New where BigClassName='" & selclass & "'"
			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
			%>
              <%
			ranNum=int(9*rnd)+10
			iddata=month(now)&day(now)&hour(now)&minute(now)&second(now)&ranNum
			%>
            </select>
          </strong></td>
        </tr>
        <tr>
          <td align="right" bgcolor="#ECF5FF"><font color="#FF0000">*</font>新闻内容：<br>
            <br>
            <br>
            请使用标准字体<br>
            （宋体）</td>
          <td colspan="2" bgcolor="#ECF5FF"><input type="hidden" name="content" value="">
              <iframe ID="eWebEditor1" src="Southidceditor/ewebeditor.asp?id=content&style=southidc" frameborder="0" scrolling="no" width="600" HEIGHT="450"></iframe></td>
        </tr>
        <tr>
          <td height="22" align="right" bgcolor="#ECF5FF"><font color="#FF0000">*</font>(信息发布员)：</td>
          <td colspan="2" bgcolor="#ECF5FF"><input name="user" type="text" class="input" value="<%=session("AdminName")%>" size="30"></td>
        </tr>
        <tr>
          <td height="22" align="right" bgcolor="#ECF5FF">信息作者：</td>
          <td colspan="2" bgcolor="#ECF5FF">
		  <INPUT name="author" id="author" value="本站" maxLength="50">
            <SELECT onChange="author.value=this.value;" name="font">
              <OPTION value="" selected>选择作者</OPTION>
              <OPTION value="<%=session("AdminName")%>"><%=session("AdminName")%></OPTION>
              <OPTION value="本站">本站</OPTION>
			  <OPTION value="佚名">佚名</OPTION>
              <OPTION value="不详">不详</OPTION>
              <OPTION value="未知">未知</OPTION>
            </SELECT></td>
          </tr>
        <tr>
          <td height="22" align="right" bgcolor="#ECF5FF">信息来源：</td>
          <td colspan="2" bgcolor="#ECF5FF"><INPUT name="ComeFrom" id="ComeFrom" value="汉唐书画网" size="45" maxLength="100">
            <SELECT onChange="ComeFrom.value=this.value;" name="select">
              <OPTION value="" selected>选择来源</OPTION>
              <OPTION value="本站整理">本站整理</OPTION>			  
              <OPTION value="本站原创">本站原创</OPTION>
              <OPTION value="不详">不详</OPTION>
              <OPTION value="转载">转载</OPTION>
            </SELECT></td>
        </tr>
        <tr>
          <td height="22" align="right" bgcolor="#ECF5FF"><span class="TableRow2005">浏览等级</span>：</td>
          <td colspan="2" bgcolor="#ECF5FF"><span class="TableRow2005">
            <SELECT name=UserGroup>
              <OPTION value=999>管理员</OPTION>
              <OPTION value=0 selected>匿名用户</OPTION>
              <OPTION value=1>普通会员</OPTION>
              <OPTION value=2>高级会员</OPTION>
              <OPTION value=3>VIP 会员</OPTION>
            </SELECT>　
            　　　　　　　　　　</span><span class="TableRow2005">初始点击数：
              <input name="Hits" type="text" class="input" id="Hits" value="0" size="8" maxlength="10">
          </span></td>
          </tr>
        <tr>
          <td height="22" align="right" bgcolor="#ECF5FF">立即发布：</td>
          <td colspan="2" bgcolor="#ECF5FF"><input name="ok" type="checkbox" id="ok" value="yes" checked >
            是 <font color="#0000FF">（否则审核后才能发布。）</font><span style="color: #ECF5FF">ok</span></td>
        </tr>
        <tr>
          <td height="22" align="right" bgcolor="#ECF5FF">是否推荐：</td>
          <td colspan="2" bgcolor="#ECF5FF"><input name="tuijian" type="checkbox" id="tuijian" value="yes" >
            是<font color="#0000FF"> （如果选中的话将在首页作为推荐法显示）</font><span style="color: #ECF5FF">tuijia</span></td>
        </tr>
        <tr>
          <td height="22" align="right" bgcolor="#ECF5FF">是否头条：</td>
          <td colspan="2" bgcolor="#ECF5FF"><input name="top" type="checkbox" id="top" value="yes" >
            是<font color="#0000FF"> （如果选中的话将在首页头条显示）</font><span style="color: #ECF5FF">top</span></td>
        </tr>
        <tr>
          <td height="22" align="right" bgcolor="#ECF5FF">是否评论：</td>
          <td colspan="2" bgcolor="#ECF5FF"><input name="pl" type="checkbox" id="pl" value="yes" >
是<font color="#0000FF"> （如果选中的话将开启评论）</font><span style="color: #ECF5FF">pl</span></td>
        </tr>
        <tr>
          <td height="22" align="right" bgcolor="#ECF5FF">录入时间：</td>
          <td colspan="2" bgcolor="#ECF5FF"><input name="AddDate" type="text" id="AddDate" value="<%=now()%>" maxlength="50">
            当前时间为：<%=now()%> 注意不要改变格式。</td>
        </tr>
        <tr bgcolor="#E3E3E3">
          <td height="22" colspan="3" align="right" bgcolor="#ECF5FF"><div align="center">
            <input type="submit" name="Submit" value="　　提交信息　　" class="input">　              
 <input  name="Add" type="reset"  id="Add" value="撤消">
          </div></td>
        </tr>
      </table>
	  </form>
    </td>
  </tr>
</table>
<!-- #include file="Inc/Foot.asp" -->
