<!--#include file="logout.asp" -->
<!--#include file="../conn.asp" -->
<%
nclass=request("class")



%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
<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 doCheck(){

		if (document.myform.title.value==""){
			alert("作品名称不能为空！");
			document.myform.title.focus();
			return false;
		}
				if (document.myform.newstype.value==""){
			alert("请选择作品分类！");
			document.myform.newstype.focus();
			return false;
		}
		// getHTML()为eWebEditor自带的接口函数，功能为取编辑区的内容
		if (eWebEditor1.getHTML()==""){
			alert("简介内容不能为空！");
			
			return false;
		}

	}
	</Script>
<link href="admin_style.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="100%"><table width="100%"  border="0" cellpadding="0" cellspacing="0" background="images/main_bg_top.gif">
      <tr>
        <td width="4%" align="left"><img src="images/main_left_top.gif" width="26" height="36"></td>
        <td width="92%" valign="bottom" background="images/main_bg_top.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="10"></td>
          </tr>
          <tr>
            <td height="25"><div align="center" class="bai_font"> 发 布 作 品</div></td>
          </tr>
        </table></td>
        <td width="4%" align="right"><img src="images/main_right_top.gif" width="26" height="36"></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="500" valign="top" class="lb"><form action="save.asp?action=addzp" method="post" name="myform" id="myform" onSubmit="return doCheck();">
      <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr bgcolor="#f4f4f4">
          <td width="18%" height="22" align="right">作品名称：</td>
          <td width="82%"><input name="title" type="text" id="title"></td>
        </tr>
        <tr>
          <td height="22" align="right">作品分类：</td>
          <td>
		  <select name="newstype" id="newstype">
		  <option >=请选择=</option>"
		  <%
		  set rs=conn.execute("select * from smallclass where bigclassid=2 order by s_order asc")
		  if rs.eof then
		  response.Write "<option value='0'>请添加分类</option>"
		  else
		  do while not rs.eof 
		  %>
            <option value="<%=rs("smallclassname")%>" <%if rs("smallclassname")=nclass then response.Write "selected"%>><%=rs("smallclassname")%></option>
	
			<%
			rs.movenext
			loop
		 end if
		 rs.close
		 set rs=nothing
			%>
          </select>
		  <input name="bigclassid" type="hidden" id="bigclassid" value="2"></td>
        </tr>
        <tr>
          <td height="22" align="right" bgcolor="#F4F4F4"><% '取源文件名 %>
	<input type=hidden name=d_originalfilename>
	<% '取保存的方件名，如果不要带路径的填充下拉框，可以在下面的表单项加入onchange事件 %>
	<input type=hidden name=d_savefilename>
	<% '取保存的文件名（带路径），使用带路径的填充下拉框 %>
	<input type=hidden name=d_savepathfilename onChange="doChange(this,document.myform.d_picture)">

	缩 略 图：</td>
          <td bgcolor="#F4F4F4"><select name="d_picture" size=1><option value=''>无</option></select> 
          当编辑区有照片时，将自动填充此下拉框</td>
        </tr>
        <tr>
          <td height="22" align="right">作品介绍：</td>
          <td><textarea name="content" style="display:none"></textarea>
<IFRAME ID="eWebEditor1" SRC="eWebEditor/ewebeditor.asp?id=content&style=s_blue&originalfilename=d_originalfilename&savefilename=d_savefilename&savepathfilename=d_savepathfilename"  FRAMEBORDER="0" SCROLLING="no" WIDTH="550" HEIGHT="350"></IFRAME></td>
        </tr>
        <tr bgcolor="#f4f4f4">
          <td height="22" align="right"><input type="reset" name="Submit" value="重置">
            &nbsp;&nbsp;&nbsp;</td>
          <td>&nbsp;&nbsp;&nbsp;
            <input type="submit" name="Submit2" value="提交"></td>
        </tr>
      </table>
    </form>
    </td>
  </tr>
  <tr>
    <td><table width="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="#275BCB">
      <tr>
        <td width="6%"><img src="images/main_left_btm.gif" width="38" height="25"></td>
        <td width="88%" bgcolor="#275BCB" class="style1">&nbsp;</td>
        <td width="6%" align="right"><img src="images/main_right_btm.gif" width="38" height="25"></td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>
