<!--#include file="conn.asp"-->
<!--#include file="check.asp"-->
<%
	useflag=4
%>
<!--#include file="flag.asp"-->
<!--#include file="../inc/char.asp"-->
<!--#include file="../inc/setup.asp"-->
<!--#include file="../inc/sql.asp"-->
<%
	end if
	action=ReplaceBadChar(Trim(Request.QueryString("action")))
	if action="add" then

		dname=ReplaceBadChar(Trim(Request.Form("dname")))
		dtype=ReplaceBadChar(Trim(Request.Form("dtype")))
		url=ReplaceBadChar(Trim(Request.Form("url")))
	
		Set rs = Server.CreateObject("ADODB.Recordset")
		sql="select * from vipjobzp"
		rs.Open sql,conn,2,3
		rs.addnew
		rs("dname")=dname
		rs("dtype")=dtype
		rs("url")=url
		rs("stime")=now()
		rs.update
		rs.close
		set rs=nothing
		response.write "<script language=javascript>alert('下载信息发布成功，现在为您返回！');window.location.reload('down_list.asp')</script>"
		response.End
	end if
%>
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>
<title>下载信息添加</title>
<link href='Include/Admin_Style.CSS' rel='stylesheet' type='text/css'>
<script language='JavaScript' src='Include/Common.js'></script>
<SCRIPT LANGUAGE="JavaScript">
<!--//
function check()
{
  if (register.dname.value=="") {
		alert("请输入下载名称！");
		register.dname.focus();		
		    return (false);
  }
  if (register.url.value=="") {
		alert("请输入文件地址！");
		register.url.focus();		
		    return (false);
  }
else
	return true;
}
//-->
</SCRIPT>
</head>
<body leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>
<table width='100%' height='28' border='0' cellpadding='0' cellspacing='1' bgcolor='#efefef'>
<tr>
<td align="center" class='sort'><font color='#990000'>发 布 下载信 息</font></td>
</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CDCDCD">
<form action='?Action=add' method='post' name='register' onSubmit="return check()">
<tr class="tdbg" onMouseOver="this.className='tdbgmouseover'" onMouseOut="this.className='tdbg'">
<td width="29%"  height='33' align='right' nowrap>下载名称：</td>
<td width="71%" height='33' nowrap>&nbsp;&nbsp;
  <INPUT SIZE="50" NAME="dname"> 
 *</td>
</tr>
<tr class="tdbg" onMouseOver="this.className='tdbgmouseover'" onMouseOut="this.className='tdbg'">
<td height='35' align='right' nowrap>所属类型：</td>
<td nowrap>
&nbsp;&nbsp;
<select name="dtype">
<option>文件所属类型</option>
<%
	set rs=conn.execute("Select * From [dtype] order by id desc")
	do while not rs.eof
	Response.Write("<option value='"&rs("id")&"' >├ "&rs("tname")&"</option>")
	rs.movenext
	loop
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
%>
</select>
  *</td>
</tr>
<tr class="tdbg" onMouseOver="this.className='tdbgmouseover'" onMouseOut="this.className='tdbg'">
<td height='34' align='right' nowrap>文件地址：</td>
<td nowrap>&nbsp;&nbsp;
<INPUT SIZE="50" NAME="url">
*  </td>
</tr>
<tr class="tdbg" onMouseOver="this.className='tdbgmouseover'" onMouseOut="this.className='tdbg'">
<td height='31' colspan="2" align='center' nowrap>
<input type="submit" value="发　布" name="button"></td>
</tr>
</form>
</table>
</body>
</html>