<!--#include file="../inchuayuwebrlzywzhyweb/CONN.ASP"-->
<!--#include file="../inchuayuwebrlzywzhyweb/cls_huayuweb()^191563631.asp"-->
<link rel="stylesheet" type="text/css" href="../inchuayuwebrlzywzhyweb/style.css">

<script language="javascript" src="../js/input.js" type="text/javascript"></script>
<%
oa.chkadmin()
  dim title,dhclassid,dhrootid
 dim id
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("public")=int(request("public"))
	 rs("text1")=request.Form("pname")
	rs("hftime")=now()
	 rs("text3")=request.Form("Phone")
	 rs("text4")=request.Form("email")	
	  rs("ziduan")=""
	  for i=1 to 40
rs("ziduan")=rs("ziduan")&"##"&replace(request("biaoqian"&i),"##","&aelig;")

next 
	rs.update
	
    

set objfso=nothing
	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
  %>

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

<%
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_hf.asp">
    
    <tr bgcolor="#FFFFFF"> 
      <td width="144" align="right" bgcolor="#EBF2F9"><div align="right">类别：</div></td>
      <td width="683" 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 request("dhrootid")<>22 then%><%end if%><%if request("cid")=3 then%><%end if%>
    <tr >
      <td height="29" bgcolor="#EBF2F9"><div align="right">&nbsp;&nbsp;&nbsp;&nbsp;姓&nbsp;&nbsp;&nbsp;名：</div></td>
                                    <td width="683" height="30" align="left" bgcolor="#EBF2F9">&nbsp;&nbsp;&nbsp;
                                        <input name="pname" class="bian" id="姓名:"   style="border:#cccccc solid 1px" value="<%=rs("text1")%>" size="15"/>
&nbsp;      <span class="STYLE8">★您的称呼 </span></td>
    </tr>
                                  <tr >
                                    <td height="30" bgcolor="#EBF2F9"><div align="right">&nbsp;&nbsp;&nbsp;&nbsp;电&nbsp;&nbsp;&nbsp;话： </div></td>
                                    <td height="30" align="left" bgcolor="#EBF2F9">&nbsp;&nbsp;&nbsp;
                                        <input name="Phone" class="bian" id="电话:"  style="border:#cccccc solid 1px" value="<%=rs("text3")%>" size="15" />
                                    较紧急请留下联系电话，我们会酌情主动联系 </td>
                                  </tr>
                                  <tr >
                                    <td height="30" bgcolor="#EBF2F9"><div align="right">&nbsp;&nbsp;&nbsp;&nbsp;E-mail：</div></td>
                                    <td height="30" align="left" bgcolor="#EBF2F9">&nbsp;&nbsp;&nbsp;
                                        <input name="email" class="bian" id="E-mail:" style="border:#cccccc solid 1px" value="<%=rs("text4")%>" size="18" />
                                    请务必留下您的联系邮箱，有回复会邮件提醒 </td>
                                  </tr><tr bgcolor="#FFFFFF">
      <td align="right" bgcolor="#EBF2F9">选择标签：</td>
      <td align="left" bgcolor="#EBF2F9"><table width="98%" border="0" cellpadding="0" cellspacing="1" style="margin-top:5px;">
        <tr><%if rs("ziduan")<>"" then%><%ziduan=split(rs("ziduan"),"##")%><%end if%>
          <%
		set rf=oa.execute("select top 40  title,classid,id,DefaultPicUrl,Updatetime,jturl,zy from c_Article where  (classid=33 or classid in(select classid from classlist where ParentPath like '%0,33%'))  order by orderid,id desc")
		if not rf.eof and not rf.bof then
		b=0
		do while not rf.eof
		b=b+1%>
          <td width="16%" height="25" ><div align="center">
             
            <input name="biaoqian<%=b%>" type="checkbox" id="biaoqian<%=b%>" value="<%=rf("id")%>" <%if rs("ziduan")<>"" then%><%if ziduan(b)<>"" then%><%if int(ziduan(b))=rf("id") then%> checked="checked"<%end if%><%end if%><%end if%>/>  
            <%=rf("title")%>
             
          </div></td>
          <%if b mod 6=0 then%>
        </tr>
        <tr>
          <%end if%>
          <%rf.movenext
		loop
		end if
		rf.close
	%>
        </tr>
      </table></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" />
        </div></td>
    </tr>
   <%if request("dhrootid")<>22 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" cols="75" rows="10" ><%=rs("content")%></textarea> 
        </div>        </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td align="center" bgcolor="#EBF2F9">&nbsp;</td>
    </tr><tr >
      <td height="20" bgcolor="#EBF2F9"><div align="right">公　开：</div></td>
                                    <td height="20" bgcolor="#EBF2F9"><div align="left"> <INPUT type=radio <%if rs("public")=1 then%>CHECKED<%end if%> value=1 name=public> 是 
  <INPUT type=radio  <%if rs("public")=0 then%>CHECKED<%end if%> value=0 name=public> 否 　<B>选择不公开，则该信息仅管理员可查看（请留下具体联系方式）</B> </div></td>
                                  </tr><%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>
<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>

