<!--#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">
<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></head>
<body style="margin:0px">
<%
oa.chkadmin()
  dim title,dhclassid,dhrootid
 dim id
   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
id=oa.sqlrequest("id")
if id="" or not isnumeric(id) then oa.msgshow("非法操作！")
if oa.act="add" then
     if not isobject(conn) then ConnectionDatabase
     set rs=server.CreateObject("adodb.recordset")
     rs.open "select * from c_article where id="&id,conn,1,3
	 if rs.eof then oa.msgshow("非法操作！")
	 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("qtpicUrl")=request("hw_pic")
	 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("shipinUrl")=request("sppath")
	 rs("text1")=request.Form("ly")
	 rs("text2")=request.Form("zz")
	 rs("text3")=request.Form("text3")
	 rs("text4")=request.Form("text4")

	 rs("updatetime")=date()
	 rs("updatetime")=request.Form("updatetime")	 
	rs.update

	oa.msgshowurl "信息修改成功！",oa.sqlrequest("tmpstr")
end if



  dhrootid=oa.sqlrequest("dhrootid")
  if dhrootid="" or not isnumeric(dhrootid)  then oa.msgshow("非法操作！")
  set rs=oa.execute("select top 1 classname from classlist where rootid="&dhrootid&" order by rootid,orderid")
  title=rs("classname")
  rs.close
  %>


<%
set rs=oa.execute("select * from c_article where id="&id)
if rs.eof then oa.msgshow("非法操作！")
%>


<table width="98%" height="21" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#6298E1">
  <tr>
    <td height="35" 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_mod.asp?dhrootid=<%=request("dhrootid")%>">
    
    <tr bgcolor="#FFFFFF"> 
      <td width="454" align="right" bgcolor="#EBF2F9"><div align="right">信息类别：</div></td>
      <td width="1156" bgcolor="#EBF2F9"> 
        <div align="left">
          <select name="ClassID" id="ClassID">
            <%oa.article_Option rs("classid"),dhrootid %>
          </select>
          <input name="id" type="hidden" id="id" value="<%=id%>" />
      </div></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td align="right" bgcolor="#EBF2F9">        <div align="right">信息名称：</div></td>
      <td bgcolor="#EBF2F9">
        <div align="left">
          <input name="title" type="text" class="wenbenkuang" id="title" size="30" value="<%=rs("title")%>">
      &nbsp;</div></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" value="<%=rs("text1")%>" size="15">
      &nbsp;&nbsp;&nbsp;性别要求：
      <label>
      <select name="zz" id="zz">
        <option value="男"  <%if rs("text2")="男" then%> selected="selected"<%end if%>>男</option>
        <option value="女" <%if rs("text2")="女" then%> selected="selected"<%end if%>>女</option>
        <option value="不限" <%if rs("text2")="不限" then%> selected="selected"<%end if%>>不限</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="初中以上" <%if rs("text3")="初中以上" then%> selected="selected"<%end if%>>初中以上</option>
        <option value="中专/高中" <%if rs("text3")="中专/高中" then%> selected="selected"<%end if%>>中专/高中</option>
        <option value="专科"  <%if rs("text3")="专科" then%> selected="selected"<%end if%>>专科</option>
        <option value="本科"  <%if rs("text3")="本科" then%> selected="selected"<%end if%>>本科</option>
        <option value="博士/硕士"  <%if rs("text3")="博士/硕士" then%> selected="selected"<%end if%>>博士/硕士</option>
        <option value="学历不限"  <%if rs("text3")="学历不限" then%> selected="selected"<%end if%>>学历不限</option>
          </select>
      &nbsp;&nbsp;&nbsp;招聘人数：
      <input name="text4" type="text" class="wenbenkuang" id="text4" value="<%=rs("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" value="<%=rs("text1")%>" size="15">        
      &nbsp;&nbsp;品牌：<input name="zz" type="text" class="wenbenkuang" id="zz" value="<%=rs("text2")%>" size="15" />
      &nbsp;&nbsp;价格：
      <input name="text3" type="text" class="wenbenkuang" id="text3" value="<%=rs("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" value="<%=rs("text1")%>" size="15">
      &nbsp;&nbsp;&nbsp;作者：
      <input name="zz" type="text" class="wenbenkuang" id="zz" value="<%=rs("text2")%>" size="25" /></td>
    </tr> <%end if%><%end if%>
  <tr bgcolor="#FFFFFF">
      <td align="right" bgcolor="#EBF2F9"><div align="right">信息图片：</div></td>
      <td bgcolor="#EBF2F9">
        <div align="left">
          <input name="picpath" type="text" value="<%=rs("defaultpicurl")%>" class="wenbenkuang" readonly="ture" 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)">
        </div></td>
    </tr><tr bgcolor="#FFFFFF">
      <td align="right" bgcolor="#EBF2F9"><div align="right">信息联接地址：</div></td>
      <td align="left" bgcolor="#EBF2F9">
        <div align="left">
          <script src="../js/selectdata.js" type="text/javascript"></script>
          <input name="link" type="text" class="wenbenkuang" id="link" value="<%=rs("link")%>" size="30">
        文章发布时间：
        <input name="updatetime" type="text" class="wenbenkuang" value="<%=rs("updatetime")%>" id="updatetime" size="9" />
        </div></td>
    </tr><tr bgcolor="#FFFFFF">
      <td align="right" bgcolor="#EBF2F9"><div align="right">排序：</div></td>
      <td align="left" bgcolor="#EBF2F9">
        <div align="left">
          <input name="orderid" type="text" class="wenbenkuang" id="orderid" onfocus="this.select()" value="<%=rs("orderid")%>" size="5" />
        设为推荐：
        <select name="tj" id="tj">
          <option value="1" <% if rs("tj")=1 then response.write "selected='selected'"%>>是</option>
          <option value="0" <% if rs("tj")=0 then response.write "selected='selected'"%>>否</option>
        </select>
        设为热门：
        <select name="bestnew" id="bestnew">
              <option value="1" <% if rs("bestnew")=1 then response.write "selected='selected'"%>>是</option>
              <option value="0" <% if rs("bestnew")=0 then response.write "selected='selected'"%>>否</option>
          </select>
        置顶：
        <select name="hot" id="hot">
              <option value="1" <% if rs("hot")=1 then response.write "selected='selected'"%>>是</option>
              <option value="0" <% if rs("hot")=0 then response.write "selected='selected'"%>>否</option>
          </select>
        </div></td>
    </tr>

 <%if  class_show<>"广告形式"   then%> <tr bgcolor="#FFFFFF">
      <td align="right" bgcolor="#EBF2F9"><div align="right">信息摘要：</div></td>
      <td bgcolor="#EBF2F9">
        <div align="left">
          <textarea name="zy" cols="75" rows="6" id="zy"><%=rs("zy")%>
        </textarea>
        </div></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="20" align="right" bgcolor="#EBF2F9">        <div align="right">信息内容
      ：</div></td>
      <td rowspan="2" valign="top" bgcolor="#EBF2F9">
        <div align="left">
   <textarea name="txtcontent" style="display:none;width:700px;height:300px;"><%=rs("content")%></textarea>
        </div>     </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" value="<%=rs("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" value="<%=rs("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"><%=rs("scontent")%></textarea>        
      &nbsp;</td>
    </tr><%end if%><%end if%>
    <tr bgcolor="#FFFFFF"> 
      <td colspan="2" align="center" bgcolor="#EBF2F9"><input name="cid" type="hidden" id="cid" value="<%=request("cid")%>" />
      <input name="tmpstr" type="hidden" id="tmpstr" value="<%=oa.tmpstr%>" /><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)" /></td>
    </tr>
  </form>
</table>
</body></html>
<script language = "JavaScript">
function isNumber(string) {
    if (string =="") string = "0";
    valid = '-0123456789x';
    for (var i=0; i< string.length; i++) {
        if (valid.indexOf(string.charAt(i)) == -1) {
            return false;
        }
    }
    return true;
}
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>

