<%dbs="../"%>
<!--#include file="../inc/config.asp"-->
<!--#include file="uccook.asp"-->
<!--#include file="uc.asp"-->
<%
id=request.QueryString("id")
if request("act")<>"edit" then
if id="" or IsNumeric(id)<>true then
	response.write"请输入正确的ID号！"
	response.end
end if
set rs=Server.CreateObject("Adodb.Recordset")
	sql="select * from H_news where ID="&id&""
	rs.open sql,conn,1,1
	if rs.eof then
	response.Write "系统错误非法操作"
	response.End()
	else
	H_newssort=rs("H_newssort")
	H_title=rs("H_title")
	H_char=rs("H_char")
	H_ren=rs("H_ren")
	H_pic=rs("H_pic")
	Rdate=rs("Rdate")
	tuijian=rs("tuijian")
	end if
	rs.close
	end if
%>
<%
'判断 用户是否开通请客功能

if request("act")="edit" then
H_newssort=Replace(Replace(Left(request.Form("H_newssort"),5),"<","["),">","]")
H_title=Replace(Replace(Left(request.Form("H_title"),200),"<","["),">","]")
H_char=Left(request.Form("H_char"),2000)
H_pic=Replace(Replace(Left(request.Form("H_pic"),200),"<","["),">","]")
H_ren=Replace(Replace(Left(request.Form("H_ren"),200),"<","["),">","]")
tuijian=Replace(Replace(Left(request.Form("tuijian"),5),"<","["),">","]")
H_char=replace(H_char,"table","表格")
H_char=replace(H_char,"TABLE","表格")
H_char=replace(H_char,"<tr","表格")
H_char=replace(H_char,"<td","表格")
H_char=replace(H_char,"</tr","表格")
H_char=replace(H_char,"</td","表格")
if newssort="" then
newssort=0
end if
if H_title="" then
response.Write "<script >alert('提示：\n\n对不起，请填写标题！...');history.back(-1);</script>"
response.End()
end if
if H_char="" then
response.Write "<script >alert('提示：\n\n对不起，请填写产品内容！...');history.back(-1);</script>"
response.End()
end if
''开始写入数据
set rs=Server.CreateObject("Adodb.Recordset")
	sql="select * from H_news where id="&request.QueryString("id")&""
	rs.open sql,conn,1,3
	'rs.addnew
	rs("H_newssort")=H_newssort
	rs("H_title")=H_title
	rs("H_char")=H_char
	rs("H_ren")=H_ren
	rs("H_pic")=H_pic
	rs("tuijian")=tuijian
	'rs("RDate")=now()
	rs.update
	rs.close
	set rs=nothing	
	response.Write "<script >alert('提示：\n\n修改成功,立即返回...');location.href='news_master.asp';</script>"
	response.End()
	end if
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<title><%=W_title%>,会员中心</title>

<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="style.css" type=text/css rel=stylesheet>
<Script Language=JavaScript>
function doChange(objText, objDrop){
	if (!objDrop) return;
	var str = objText.value;
	var arr = str.split("|");
	objDrop.length=0;
	for (var i=0; i<arr.length; i++){
		objDrop.options[i] = new Option(arr[i], arr[i]);
	}
}
</Script>
<SCRIPT language=javascript src="images/jquery.js" 
type=text/javascript></SCRIPT>

<SCRIPT language=javascript src="images/function.js" 
type=text/javascript></SCRIPT>

<SCRIPT language=javascript type=text/javascript>
<!--


/*
function AddnewType()
*/
-->
</SCRIPT>

<META content="MSHTML 6.00.3790.4426" name=GENERATOR>
</HEAD>
<BODY><!--用户中心头部-->
<!--#include file="top.asp"-->
<table width="960" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td width="150" valign="top"><!--#include file="left.asp"--></td>
        <td width="810" align="right" valign="top"><table width="800" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td width="20" align="center"><img src="images/ico_4.gif" width="12" height="12"></td>
                <td height="30" align="left"><a href="index.asp" target="_self">用户中心</a> <span class="uc_huise">&gt; 发布信息</span></td>
            </tr>
            <tr>
                <td height="1" colspan="2" bgcolor="#EEEEEE"></td>
          </tr>
        </table>
            <table width="600" height="5" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td></td>
                </tr>
            </table>
			<form name="form" action="news_edit.asp?act=edit&id=<%=id%>" method="post"  target="_self">
			<input name="H_Industry" type="text" value="<%=xid%>" style="display:none">
            <table width="800" border="0" cellpadding="0" cellspacing="1" bgcolor="#EEEEEE">
    <tr>
        <td height="28" colspan="2" bgcolor="#FFFFFF" class="uc_huise">发布产品</td>
        </tr>
    <tr>
        <td width="80" height="28" bgcolor="#FFFFFF" class="uc_huise">产品分类：</td>
        <td width="717" height="13" bgcolor="#FFFFFF" class="uc_huise">
		<%
		set rs=Server.CreateObject("Adodb.Recordset")
	sql="select * from H_newssort order by h_px desc"
	rs.open sql,conn,1,1
	if rs.eof then
	response.Write "请<a href=newssort.asp target=_self>增加分类</a>"
	else
		%>
		<select name="H_newssort" id="H_newssort">
		 <option value="<%=H_newssort%>" selected>不改变分类</option>
		<%
	do while not rs.eof 
		%>
		  <option value="<%=rs("ID")%>"><%=rs("H_name")%></option>
		
				<%
				rs.movenext 
				loop
				rs.close
				%>		
			  </select>
				<a href="newssort.asp" target="_self" class="fc_green">管理分类</a>
				<%end if%>						</td>
    </tr>
    <tr>
      <td width="80" height="30" bgcolor="#FFFFFF" class="uc_huise">文章来源：</td>
      <td height="0" bgcolor="#FFFFFF" class="uc_huise"><input name="H_ren" type="text" id="H_ren" value="<%=H_ren%>"></td>
    </tr>
    <tr>
      <td width="80" height="30" bgcolor="#FFFFFF" class="uc_huise">新闻位置：</td>
      <td height="1" bgcolor="#FFFFFF" class="uc_huise"><input name="tuijian" type="radio" value="1" <%if tuijian=1 then%> checked<%end if%>>
        普通推荐
          <input type="radio" name="tuijian" value="2" <%if tuijian=2 then%> checked<%end if%>>
          图片新闻
          <input type="radio" name="tuijian" value="3" <%if tuijian=3 then%> checked<%end if%>>
          头条新闻
          <input type="radio" name="tuijian" value="4" <%if tuijian=4 then%> checked<%end if%>>
          头条附带
          <input type="radio" name="tuijian" value="0" <%if tuijian=0 then%> checked<%end if%>>
          普通新闻</td>
    </tr>
    <tr>
        <td height="28" bgcolor="#FFFFFF" class="uc_huise"><span style="padding-right: 18px;">标</span> 题：</td>
        <td height="28" bgcolor="#FFFFFF" class="uc_huise"><input name="H_title" type="text" id="H_title" value="<%=H_title%>" size="60"></td>
    </tr>
    <tr>
        <td height="13" bgcolor="#FFFFFF" class="uc_huise">日志内容：</td>
        <td height="13" bgcolor="#FFFFFF" class="uc_huise"> <textarea name="H_char" style="display:none"><%=H_char%></textarea> 
					  <IFRAME ID="eWebEditor1" src="../redit/ewebeditor.htm?id=H_char&style=mail&originalfilename=myText1" frameborder="0" scrolling="no" width="550" height="350"></IFRAME></td>
    </tr>
    <tr>
      <td height="28" bgcolor="#FFFFFF" class="uc_huise">首页图片</td>
      <td height="14" bgcolor="#FFFFFF" class="uc_huise"><input name="H_pic" type=text id=myText1 style="width:200px" onChange="doChange(this,myDrop1)" value="<%=H_pic%>" ></td>
    </tr>
    <tr>
        <td height="28" colspan="2" align="center" bgcolor="#FFFFFF"><input name="Submit" type="submit" class="biao" value="立即发布"></td>
        </tr>
</table>
	        
			</form>
		</td>
    </tr>
</table>
<!--#include file="end.asp"-->

</BODY></HTML>
