<%@ codepage=936%>
<!--#include file="include/check_admin.asp"-->
<%
Check_Power("0101,")
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>修改内容</title>
<link rel="stylesheet" type="text/css" href="images/css.css">
<!--#include file="../conn/conn.asp" -->
<%
zxt_news_id=Clng(Trim(Request("zxt_news_id")))
function err_msg(err_msg_str)
	Response.Write("<script language=""javascript"">alert('"&err_msg_str&"');history.go(-1);</script>")
	response.end
end function

cmd=Request("cmd")
Select Case cmd
	Case "edit":
		Sql="Update zxt_news Set "
		Sql=Sql&"zxt_news_title='"&Replace(Request.Form("zxt_news_title"),"'","''")&"', "
		
		if Language<>"" then 
			Sql=Sql&"zxt_news_title_en='"&Replace(Request.Form("zxt_news_title_en"),"'","''")&"', "
			
			Sql=Sql&"zxt_news_content_en='"&Replace(Request.Form("zxt_news_content_en"),"'","''")&"', "
		end if
		
		Sql=Sql&"zxt_news_class="&CLng(Request.Form("zxt_news_class"))&", "
		if zxt_news_class<0 then
			err_msg "没有选定栏目，添加失败！"
		end if
		Sql=Sql&"zxt_news_order="&CLng(Request.Form("zxt_news_order"))&", "
		Sql=Sql&"zxt_news_time='"&Replace(Request.Form("zxt_news_time"),"'","''")&"', "
		Sql=Sql&"zxt_news_content='"&Replace(Request.Form("zxt_news_content"),"'","''")&"', "
		if Replace(Session("zxt_news_pic"),"'","''")<>"" then Sql=Sql&"zxt_news_pic='"&Replace(Session("zxt_news_pic"),"'","''")&"', "
		if CLng(Request.Form("zxt_news_elite"))=1 then
			Sql=Sql&"zxt_news_elite=1, "
		else
			Sql=Sql&"zxt_news_elite=0, "
		end if
		if CLng(Request.Form("zxt_news_user"))=1 then
			Sql=Sql&"zxt_news_user=1, "
		else
			Sql=Sql&"zxt_news_user=0, "
		end if
		
		if CLng(Request.Form("zxt_news_passed"))=1 then
			Sql=Sql&"zxt_news_passed=1, "
		else
			Sql=Sql&"zxt_news_passed=0, "
		end if
		if CLng(Request.Form("zxt_news_top"))=1 then
			Sql=Sql&"zxt_news_top=1, "
		else
			Sql=Sql&"zxt_news_top=0, "
		end if
		Sql=Sql&"zxt_news_hits="&CLng(Request.Form("zxt_news_hits"))&" "
		Sql=Sql&"where zxt_news_id="&zxt_news_id
		zxt_Conn.Execute(Sql)
		Response.Write("<script language=""javascript"">if(confirm(""修改成功!是否继续修改？\n确定则继续修改，取消返回列表。"")){window.location.href='news_edit.asp?zxt_news_id="&zxt_news_id&"&zxt_news_class_title="&Trim(Request.Form("zxt_news_class_title"))&"';}else{window.location.href='news_manage.asp?zxt_news_id="&Trim(Request.Form("zxt_news_id"))&"&zxt_news_class_title="&Trim(Request.Form("zxt_news_class_title"))&"';}</script>")
	Case Else:
End Select
Set Rs=zxt_Conn.Execute("Select * From zxt_news where zxt_news_id="&zxt_news_id)
%>
<!--#include file="../fckeditor_txj/fckeditor.asp"-->
</head>
<body>

<br>
<table width="95%" align="center" cellpadding="0" cellspacing="0">
  <!--DWLayoutTable-->
  <tr>
    <td height="100"><form action="?cmd=edit&zxt_news_id=<%=rs("zxt_news_id")%>" method="post">
  <table border="0" cellspacing="1" cellpadding="2" style="border-collapse: collapse" width="100%" bgcolor="#D8D8D8" align="center">
    <tr> 
      <td height="23" colspan="4" bgcolor="#6e9dd1"> 
        <div align="center"><b>修改内容</b></div>      </td>
    </tr>
    <tr> 
      <td width="11%" align="right" bgcolor="#FFFFFF">标题：</td>
      <td colspan="3" align="left" bgcolor="#FFFFFF"><input name="zxt_news_title" type="text" id="zxt_news_title" value="<%=rs("zxt_news_title")%>" size="40">
        <span class="red">*</span>&nbsp;&nbsp;&nbsp;&nbsp;会员信息<input name="zxt_news_user" type="checkbox" id="zxt_news_user" value="1" <%if rs("zxt_news_user")=1 then Response.Write("checked") end if%>></td>
      </tr>
<%if Language<>"" then%>	
    <tr> 
      <td width="11%" align="right" bgcolor="#FFFFFF">标题：<br>
        (<%= Language %>版) </td>
      <td colspan="3" align="left" bgcolor="#FFFFFF"><input name="zxt_news_title_en" type="text" id="zxt_news_title_en" value="<%=rs("zxt_news_title_en")%>" size="40"></td>
      </tr>
<%end if%>	  
    <tr> 
      <td width="11%" align="right" bgcolor="#FFFFFF">所属栏目：</td>
      <td width="39%" align="left" bgcolor="#FFFFFF">&nbsp;<%=Trim(Request("zxt_news_class_title"))%>&nbsp;<span class="red">*
          <input name="zxt_news_class" type="hidden" id="zxt_news_class" value="<%=rs("zxt_news_class")%>">
          <input name="zxt_news_class_title" type="hidden" id="zxt_news_class_title" value="<%=Trim(Request("zxt_news_class_title"))%>">
      </span></td>
      <td width="10%" align="right" bgcolor="#FFFFFF">发布时间：</td>
      <td width="40%" align="left" bgcolor="#FFFFFF"><input name="zxt_news_time" type="text" id="zxt_news_time" value="<%=rs("zxt_news_time")%>" size="20"></td>
    </tr>
    <tr> 
      <td width="11%" align="right" bgcolor="#FFFFFF">图片：</td>
      <td align="left" bgcolor="#FFFFFF"><iframe name="pic" frameborder=0 width=100% height=25 scrolling=no src=../nUpload_ProductPic.asp?pic=zxt_news_pic></iframe><%if trim(rs("zxt_news_pic"))<>"" then Response.Write("<a href=../"&rs("zxt_news_pic")&"  target=_blank>查看上传文件?</a> <a href=delpic.asp?id="&rs("zxt_news_id")&" target=_blank>删除</a>")end if%></td>
      <td align="right" bgcolor="#FFFFFF">排序：</td>
      <td align="left" bgcolor="#FFFFFF"><input name="zxt_news_order" type="text" id="zxt_news_order" value="<%=rs("zxt_news_order")%>" size="6">        
      <span class="red">#</span>&nbsp;值越大，内容越排前</td>
    </tr>
    <tr> 
      <td align="right" bgcolor="#FFFFFF">详细内容：</td>
      <td colspan="3" align="center" bgcolor="#FFFFFF">
	  	<% 
		Dim oFCKeditor
		Set oFCKeditor = New FCKeditor
		oFCKeditor.BasePath = "../fckeditor_txj/"   //设置编辑器的路径，我站点根目录下的一个目录
		oFCKeditor.ToolbarSet = "Default"
		oFCKeditor.Width = "100%"
		oFCKeditor.Height = "300"
		oFCKeditor.Value = rs("zxt_news_content") //这个是给编辑器初始值

		oFCKeditor.Create "zxt_news_content" //以后编辑器里的内容都是由这个logbody取得，命名由你定
		
		%>	  </td>
      </tr>
<%if Language<>"" then%>	
    <tr> 
      <td align="right" bgcolor="#FFFFFF">详细内容：<br>
        (<%= Language %>版)</td>
      <td colspan="3" align="center" bgcolor="#FFFFFF">
	  	<% 
		Dim Ver_oFCKeditor
		Set Ver_oFCKeditor = New FCKeditor
		Ver_oFCKeditor.BasePath = "../fckeditor_txj/"   //设置编辑器的路径，我站点根目录下的一个目录
		Ver_oFCKeditor.ToolbarSet = "Default"
		Ver_oFCKeditor.Width = "100%"
		Ver_oFCKeditor.Height = "300"
		Ver_oFCKeditor.Value = rs("zxt_news_content_en") //这个是给编辑器初始值

		Ver_oFCKeditor.Create "zxt_news_content_en" //以后编辑器里的内容都是由这个logbody取得，命名由你定
		
		%>	  </td>
      </tr>
<%end if%>
    <tr> 
      <td width="11%" align="right" bgcolor="#FFFFFF">&nbsp;</td>
      <td colspan="3" align="left" bgcolor="#FFFFFF">审核
        <input name="zxt_news_passed" type="checkbox" id="zxt_news_passed" value="1" <%if rs("zxt_news_passed")=1 then Response.Write("checked") end if%>>
        &nbsp;&nbsp;&nbsp;首页显示
        <input name="zxt_news_elite" type="checkbox" id="zxt_news_elite" value="1" <%if rs("zxt_news_elite")=1 then Response.Write("checked") end if%>>
        &nbsp;&nbsp;&nbsp;栏目推荐
          <input name="zxt_news_top" type="checkbox" id="zxt_news_top" value="1" <%if rs("zxt_news_top")=1 then Response.Write("checked") end if%>>
          &nbsp;&nbsp;点击次数
          <input name="zxt_news_hits" type="text" id="zxt_news_hits" value="<%=rs("zxt_news_hits")%>" size="8"></td>
    </tr>
    <tr> 
      <td colspan="4" align="center" bgcolor="#FFFFFF">&nbsp;</td>
      </tr>
    <tr> 
      <td colspan="4" bgcolor="#F4F4F4"> 
        <p align="center"> 
          <input name="b1" type="submit" class="btn" value="确认修改">
          &nbsp;&nbsp; 
          <input name="b2" type="reset" class="btn" value="全部还原">
        </p>      </td>
    </tr>
  </table>
</form></td>
  </tr>
</table>
<table class="helpbox" width="95%" align="center" cellpadding="5" cellspacing="0">
  <!--DWLayoutTable-->
  <tr>
    <td>1、&quot;<span class="red">*</span>&quot;的为必填内容，请按实际需要填写内容。<br>
      2、新闻类的内容可以只填标题、详细内容即可。<br>
      3、产品类的内容请按需要填写。</td>
  </tr>
</table>
<br>
</body>
</html>
