<!--#include file="../inchuayuwebrlzywzhyweb/CONN.ASP"-->
<!--#include file="../inchuayuwebrlzywzhyweb/cls_huayuweb()^191563631.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link rel="stylesheet" type="text/css" href="../inchuayuwebrlzywzhyweb/style.css">
<title>网站后台管理系统</title>
<style type="text/css">
<!--
.STYLE4 {color: #FF0000}
-->
</style>
</head>
<body style="margin:0px"><SCRIPT language=javascript1.2>
function showsubmenu(sid)
{
whichEl = eval("submenu" + sid);
if (whichEl.style.display == "none")
{
eval("submenu" + sid + ".style.display=\"\";");
document.getElementById('adv_show').value="";
}
else
{
eval("submenu" + sid + ".style.display=\"none\";");

document.getElementById('adv_show').value="http://";
}
}
</SCRIPT>
<script charset="utf-8" src="../hywebEditorrlzthyweb/kindeditor.js"></script>
<script charset="utf-8" src="../hywebEditorrlzthyweb/lang/zh_CN.js"></script>
<script charset="utf-8" src="../hywebEditorrlzthyweb/plugins/code/prettify.js"></script>
<script>
<!--

KindEditor.ready(function(K) {
			var editor = K.create('textarea[name="txtcontent"]', {
				cssPath : '../hywebEditorrlzthyweb/plugins/code/prettify.css',
				uploadJson : '../hywebEditorrlzthyweb/upload_json.asp',
				fileManagerJson : '../hywebEditorrlzthyweb/file_manager_json.asp',
				allowFileManager : true,
				filterMode : false,
			 afterBlur: function(){this.sync();}
			});
			prettyPrint();
		});
//-->
</script>

<%
oa.chkadmin()
 dim title,dhclassid,dhrootid
  dhrootid=request.QueryString("dhrootid")
  if dhrootid="" or not isnumeric(dhrootid)  then oa.msgshow("非法操作！")
  set rs=oa.execute("select top 1 classname,class_show,classid from classlist where rootid="&dhrootid&" order by orderid")
  title=rs(0)
  class_show=rs(1)
  fid=rs(2)
  rs.close

if oa.act="add" then
     if not isobject(conn) then ConnectionDatabase
     set rs=server.CreateObject("adodb.recordset")
     rs.open "select * from c_article",conn,1,3
	 rs.addnew()
	 rs("id")=oa.getid("c_article")
	 rs("ClassID")=request.Form("classid")	
	 rs("title")=request.Form("title")
	 rs("orderid")=request.Form("orderid")
	 rs("bestnew")=request.Form("bestnew")
	 rs("hot")=request.Form("hot")
	 rs("tj")=request.Form("tj")     
	 rs("defaultpicurl")=request.Form("picpath")
	 rs("zy")=request.Form("zy")
	 rs("content")=request.Form("txtcontent")
	 rs("link")=request.Form("link")
	 rs("text1")=request.Form("ly")
	 rs("text2")=request.Form("zz")
	 rs("text3")=request.Form("text3")
	 rs("text4")=request.Form("text4")
	 rs("qtpicUrl")=request("hw_pic")
	 rs("shipinUrl")=request("sppath")
	 if request.Form("stitle")<>"" then
	   rs("stitle")=request.Form("stitle")
	   else
	   rs("stitle")=request.Form("title")
	   end if
rs("skeywrods")=request.Form("skeywrods")
rs("scontent")=request.Form("scontent")
	 rs("updatetime")=date()
	 rs("hits")=0
	 rs("updatetime")=request.Form("updatetime")
	rs.update	



	response.Write("<script>if(confirm('信息发布成功！是否继续发布？')){location.href='admin_article_add.asp?dhrootid="&dhrootid&"'}else{location.href='admin_article_manage.asp?dhrootid="&dhrootid&"'}</script>")
	

end if
%>

<link href="../inchuayuwebrlzywzhyweb/Style.Css" rel="stylesheet" type="text/css">


<table width="98%" height="35" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#6298E1">
  <tr>
    <td align="center" style="color:white"><div align="left"><strong>&nbsp;<img src="../img/Explain.gif" width="18" height="18" align="absmiddle" />&nbsp;<%=title%>添加</strong></div></td>
  </tr>
</table>
<table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#6298E1">
  <form method="POST" name="myform" onSubmit="return CheckForm();" action="admin_article_add.asp?dhrootid=<%=dhrootid%>">
    
    <tr bgcolor="#FFFFFF"> 
      <td width="520" align="right" bgcolor="#EBF2F9">信息类别：</td>
      <td width="1090" align="left" bgcolor="#EBF2F9"> <select name="ClassID" id="ClassID">
          <%oa.article_Option "",dhrootid %>
      </select></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td align="right" bgcolor="#EBF2F9">信息名称：</td>
      <td align="left" bgcolor="#EBF2F9"><input name="title" type="text" class="wenbenkuang" id="title" size="30" maxlength="100">
      &nbsp;</td>
    </tr>
	<%if fid=0 then%><tr bgcolor="#FFFFFF"> 
      <td align="right" bgcolor="#EBF2F9">年龄要求：</td>
      <td align="left" bgcolor="#EBF2F9"><input name="ly" type="text" class="wenbenkuang" id="ly" size="15">
      &nbsp;&nbsp;&nbsp;性别要求：
      <label>
      <select name="zz" id="zz">
        <option value="男">男</option>
        <option value="女">女</option>
        <option value="不限" selected="selected">不限</option>
      </select>
      </label></td>
    </tr><tr bgcolor="#FFFFFF"> 
      <td align="right" bgcolor="#EBF2F9">学历：</td>
      <td align="left" bgcolor="#EBF2F9"><select name="text3" id="text3">
        <option value="初中以上">初中以上</option>
        <option value="中专/高中">中专/高中</option>
        <option value="专科">专科</option>
        <option value="本科">本科</option>
        <option value="博士/硕士">博士/硕士</option>
        <option value="学历不限" selected="selected">学历不限</option>
          </select>
      &nbsp;&nbsp;&nbsp;招聘人数：
      <input name="text4" type="text" class="wenbenkuang" id="text4" size="15" /></td>
    </tr><%end if%>
    <%if class_show<>"文章形式" and class_show<>"广告形式"   then%><%if fid=0 then%><tr bgcolor="#FFFFFF"> 
      <td align="right" bgcolor="#EBF2F9">型号：</td>
      <td align="left" bgcolor="#EBF2F9"><input name="ly" type="text" class="wenbenkuang" id="ly" size="15">        &nbsp;&nbsp;品牌：<input name="zz" type="text" class="wenbenkuang" id="zz" size="15" />
      &nbsp;&nbsp;价格：
      <input name="text3" type="text" class="wenbenkuang" id="text3" size="12" />
      元</td>
    </tr><%else%><tr bgcolor="#FFFFFF"> 
      <td align="right" bgcolor="#EBF2F9">来源：</td>
      <td align="left" bgcolor="#EBF2F9"><input name="ly" type="text" class="wenbenkuang" id="ly" size="15">
      &nbsp;&nbsp;&nbsp;作者：
      <input name="zz" type="text" class="wenbenkuang" id="zz" size="25" /></td>
    </tr><%end if%><%end if%>
<tr bgcolor="#FFFFFF">
      <td align="right" bgcolor="#EBF2F9">信息图片：</td>
      <td align="left" bgcolor="#EBF2F9"><input name="picpath" type="text" class="wenbenkuang"  id="picpath" size="30">
        <input type="button" name="Submit11" value="上传" onClick="if (myform.picpath.value!=''){alert('请删除文件后再进行上传')}else{window.open('upload_sp_huayuweb.asp','','status=no,scrollbars=no,top=20,left=110,width=300,height=130')}">
        <input type="button" name="Submit113" value="删除" onClick="window.open('../inchuayuwebrlzywzhyweb/upload.asp?formname=myform&editname=picpath&action=del&filepath='+myform.picpath.value,'','status=no,scrollbars=no,top=20,left=110,width=300,height=50')" />
      <input type="button" name="Submit112" value="浏览" onClick="open1('<%=webdir%>'+myform.picpath.value)"></td>
    </tr><%if class_show<>"广告形式" and class_show<>"文章形式" and class_show<>"列表形式"  then%><tr bgcolor="#FFFFFF" style="display:none">
      <td align="right" bgcolor="#EBF2F9">手机网站图片：</td>
      <td align="left" bgcolor="#EBF2F9"><input name="wappic" type="text" class="wenbenkuang"  id="wappic" size="30">
        <input type="button" name="Submit11" value="上传" onClick="if (myform.wappic.value!=''){alert('请删除文件后再进行上传')}else{window.open('upload_wappic_huayuweb.asp','','status=no,scrollbars=no,top=20,left=110,width=300,height=130')}">
        <input type="button" name="Submit113" value="删除" onClick="window.open('../inchuayuwebrlzywzhyweb/upload.asp?formname=myform&editname=wappic&action=del&filepath='+myform.wappic.value,'','status=no,scrollbars=no,top=20,left=110,width=300,height=50')" />
      <input type="button" name="Submit112" value="浏览" onClick="open1('<%=webdir%>'+myform.wappic.value)">
      <span class="STYLE4">(可为空，手机站默认web站图片)</span></td>
    </tr><%end if%><tr bgcolor="#FFFFFF">
      <td align="right" bgcolor="#EBF2F9">信息联接地址：</td>
      <td align="left" bgcolor="#EBF2F9">
        <input name="link" type="text" class="wenbenkuang" id="link" size="30"  />外链地址带上http://
       
        文章发布时间：
      <input name="updatetime" type="text" class="wenbenkuang" value="<%=date()%>" id="updatetime" size="9" /></td>
    </tr><tr bgcolor="#FFFFFF">
      <td align="right" bgcolor="#EBF2F9">排序：</td>
      <td align="left" bgcolor="#EBF2F9"><input name="orderid" type="text" class="wenbenkuang" id="orderid" onFocus="this.select()" value="100" size="5" />
        设为推荐：
        <select name="tj" id="tj">
        <option value="1">是</option>
        <option value="0" selected="selected">否</option>
      </select>
        设为热门
        ：
        <select name="bestnew" id="bestnew">
          <option value="1">是</option>
          <option value="0" selected="selected">否</option>
        </select>
        置顶：
        <select name="hot" id="hot">
          <option value="1">是</option>
          <option value="0" selected="selected">否</option>
      </select></td>
    </tr>
  <%if class_show<>"广告形式"   then%> <tr bgcolor="#FFFFFF">
      <td align="right" bgcolor="#EBF2F9">信息摘要：</td>
      <td align="left" bgcolor="#EBF2F9"><textarea name="zy" cols="75" rows="6" id="zy"></textarea></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="20" align="right" bgcolor="#EBF2F9">信息内容
        
      ：</td>
      <td rowspan="2" align="left" valign="top" bgcolor="#EBF2F9">
      <textarea name="txtcontent" style="display:none;width:700px;height:300px;"></textarea></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="270" align="center" bgcolor="#EBF2F9">&nbsp;</td>
    </tr> <%if class_show<>"文章形式"   then%><tr bgcolor="#FFFFFF"> 
      <td align="right" bgcolor="#EBF2F9">设置页面标题：</td>
      <td align="left" bgcolor="#EBF2F9"><input name="stitle" type="text" class="wenbenkuang" id="stitle" size="60">
      &nbsp;</td>
    </tr><tr bgcolor="#FFFFFF"> 
      <td align="right" bgcolor="#EBF2F9">设置页面关键字：</td>
      <td align="left" bgcolor="#EBF2F9"><input name="skeywrods" type="text" class="wenbenkuang" id="skeywrods" size="60">
      &nbsp;</td>
    </tr><tr bgcolor="#FFFFFF"> 
      <td align="right" bgcolor="#EBF2F9">设置页面描述：</td>
      <td align="left" bgcolor="#EBF2F9"><textarea name="scontent" cols="60" rows="4" class="wenbenkuang" id="scontent"></textarea>        
      &nbsp;</td>
    </tr><%end if%><%end if%>
    <tr bgcolor="#FFFFFF"> 
      <td colspan="2" align="center">
        <input name="action" type="hidden" id="action" value="add" />
      <input type="submit" name="Submit" value="提交" onClick="return CheckForm();">
      <input type="button" name="Submit2" value="返回" onClick="history.go(-1)" />
      <input name="cid" type="hidden" id="cid" value="<%=request("cid")%>"></td>
    </tr>
  </form>
</table>

<script language = "JavaScript">
function CheckForm()
{
  if (document.myform.ClassID.value=="")
  {
    alert("友情提示：文章所属栏目不能指定为含有子栏目的栏目！");
	document.myform.ClassID.focus();
	return false;
  }

  if (document.myform.title.value=="")
  {
    alert("友情提示：文章标题不能为空！");
	document.myform.title.focus();
	return false;
  }
  if(isunsignedInteger(document.myform.orderid.value) == false||document.myform.orderid.value==""){
		alert("友情提醒:排序需为正整数");
		document.myform.order.focus();
		
		return (false);
		}
  return true;  
}
</script>
<script language="javascript">
function open1(valu)
{
if (valu=="")
{
alert('您还没有上传图片');
}
else
{
window.open(valu,'','')
}
}
</script>

