<!--#include file="conn.asp"-->
<!--#include file="adminset.asp"-->
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆！');window.location.href='login.asp';</script>"
response.End
end if
if session("flag")>1 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限！</b></font></div>"
response.End
end if
if qx7<>1 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限！</b></font></div>"
response.End
end if
%>
<%
NewsID=request("id")
if NewsID="" then
%>
<script language=javascript>
history.back()
alert("请输入您要修改的文章ID！")
</script>
<%
Response.End
end if

set rs=server.CreateObject ("ADODB.RecordSet")
rs.Source="select * From shop_zhuanti where NewsID=" & NewsID
rs.Open rs.source,conn,1,1

if rs.recordcount=0 then
%>
<script language=javascript>
history.back()
alert("非法文章ID，请确认NewsID不超出当前范围！")
</script>
<%
Response.End
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>网软志成在线购物系统</title>
<link href="../css.css" rel="stylesheet" type="text/css">
<script language="javascript">

function checkdata()
{
if (form1.title.value=="")
	{
	  alert("对不起，请输入文章标题！")
	  form1.title.focus()
	  return false
	 }

}
</script>


<script src="edit.js" type="text/javascript"></script>
<%dim count
set rs222=server.createobject("adodb.recordset")
rs222.open "select * from shop_zhuanti_class2 order by px ",conn,1,1

set rs2=server.createobject("adodb.recordset")
rs2.open "select * from shop_zhuanti_class3 order by px ",conn,1,1
%>
<script language = "JavaScript">
var onecount;
var threecount;
onecount=0;
threecount=0

subcat3=new Array();
<%
   count = 0
   do while not rs2.eof 
%>
subcat3[<%=count%>] = new Array("<%= trim(rs2("classname"))%>","<%= rs2("classid2")%>","<%= rs2("id")%>");
<%
        count = count + 1
        rs2.movenext
        loop
        rs2.close
%>
threecount=<%=count%>;

subcat = new Array();
<%
   count = 0
   do while not rs222.eof 
%>
subcat[<%=count%>] = new Array("<%= trim(rs222("classname"))%>","<%= rs222("classid1")%>","<%= rs222("id")%>");
<%
        count = count + 1
        rs222.movenext
        loop
        rs222.close
%>
		
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.form1.nclassid.length = 0; 
    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
             document.form1.nclassid.options[document.form1.nclassid.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
		if(document.form1.nclassid.length!=0){
     changelocation3(document.form1.nclassid.options[document.form1.nclassid.selectedIndex].value) 
	 }else{
	 document.form1.xclassid.length=0
	 }      
    }    
    
function changelocation3(locationid)
    {
    document.form1.xclassid.length = 0; 

    var locationid=locationid;
    var i;
    for (i=0;i < threecount; i++)
        {
            if (subcat3[i][1] == locationid)
            { 
             document.form1.xclassid.options[document.form1.xclassid.length] = new Option(subcat3[i][0], subcat3[i][2]);
            }        
        }
        
    } 
//-->
</script>
<style type="text/css">
<!--
.style2 {color: #FF0000}
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
}
-->
</style>
</head>

<body >
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="1%" height="28">&nbsp;</td>
    <td width="99%"><table width="100%" border="0" cellspacing="0" cellpadding="5">
      <tr>
        <td width="77%" height="27" style="font-size:14px;color:#ffffff">&nbsp;<strong><font color="#000000">网软志成购物后台管理系统 &gt;&gt; 专题管理 &gt;&gt; 专题文章修改 </font></strong></td>
        <td width="23%" style="font-size:14px;color:#ffffff"><span class="style2">* 为必添项目</span></td>
      </tr>
      
    </table></td>
  </tr>
</table>
<form name="form1" method="post" action="zhuanti_edit_save.asp" OnSubmit="return checkdata()" onReset="return ResetForm();">
  <center>
  <table border="0" width="95%" cellspacing="1" cellpadding="3" style="border-collapse: collapse" align=center bgcolor="#999999">
      <tr align="center" bgcolor="#cccccc"> 
        <td height="30" colspan="4" valign="middle" class="TableBody2"> <b> 修 改 专 题 文 章(该文章ID为：<%=NewsID%>)</b></td>
      </tr>
      <tr bgcolor="#F3F3F3"> 
        <td width="171" align="right" valign="middle" bgcolor="#F3F3F3" class="TableBody1"><div align="right">文章标题：</div></td>
        <td width="743" colspan="3" class="TableBody1"> <span style='cursor:hand' title='缩短对话框' onClick='if (me.size>10)me.size=me.size-2'>-</span> 
          <input name="title" id=me type="TEXT" size=35 maxlength=100 class="wenbenkuang"  onMouseOver="window.status='在这里输入要添加的文章标题，必填';return true;" onMouseOut="window.status='';return true;" title='在这里输入要添加的文章标题，必填' value="<%=rs("title")%>"> 
          <span style='cursor:hand' title='加长对话框' onClick='if (me.size<102)me.size=me.size+2'>+</span> 
        <font color="#FF0000">*</font></td>
      </tr>
      <tr bgcolor="#F3F3F3">
        <td align="right" valign="middle" bgcolor="#F3F3F3" class="TableBody1">标题设置：</td>
        <td colspan="3" class="TableBody1"><SELECT size=1 id=title_color class="wenbenkuang" name=title_color LANGUAGE=javascript onChange="return title_color_onchange()" style="width:55">
            <OPTION value="0" selected>颜色</OPTION>
            <OPTION <%if rs("titlecolor")="#003399" then%>selected<%end if%> value="#000000" style="background-color:#003399"></OPTION>
            <OPTION <%if rs("titlecolor")="#000000" then%>selected<%end if%> value="#000000" style="background-color:#000000"></OPTION>
            <OPTION <%if rs("titlecolor")="#FFFFFF" then%>selected<%end if%> value="#FFFFFF" style="background-color:#FFFFFF"></OPTION>
            <OPTION <%if rs("titlecolor")="#008000" then%>selected<%end if%> value="#008000" style="background-color:#008000"></OPTION>
            <OPTION <%if rs("titlecolor")="#800000" then%>selected<%end if%> value="#800000" style="background-color:#800000"></OPTION>
            <OPTION <%if rs("titlecolor")="#808000" then%>selected<%end if%> value="#808000" style="background-color:#808000"></OPTION>
            <OPTION <%if rs("titlecolor")="#000080" then%>selected<%end if%> value="#000080" style="background-color:#000080"></OPTION>
            <OPTION <%if rs("titlecolor")="#800080" then%>selected<%end if%> value="#800080" style="background-color:#800080"></OPTION>
            <OPTION <%if rs("titlecolor")="#808080" then%>selected<%end if%> value="#808080" style="background-color:#808080"></OPTION>
            <OPTION <%if rs("titlecolor")="#FFFF00" then%>selected<%end if%> value="#FFFF00" style="background-color:#FFFF00"></OPTION>
            <OPTION <%if rs("titlecolor")="#00FF00" then%>selected<%end if%> value="#00FF00" style="background-color:#00FF00"></OPTION>
            <OPTION <%if rs("titlecolor")="#00FFFF" then%>selected<%end if%> value="#00FFFF" style="background-color:#00FFFF"></OPTION>
            <OPTION <%if rs("titlecolor")="#FF00FF" then%>selected<%end if%> value="#FF00FF" style="background-color:#FF00FF"></OPTION>
            <OPTION <%if rs("titlecolor")="#FF0000" then%>selected<%end if%> value="#FF0000" style="background-color:#FF0000"></OPTION>
            <OPTION <%if rs("titlecolor")="#0000FF" then%>selected<%end if%> value="#0000FF" style="background-color:#0000FF"></OPTION>
            <OPTION <%if rs("titlecolor")="#008080" then%>selected<%end if%> value="#008080" style="background-color:#008080"></OPTION>
          </SELECT>
          <SELECT size=1 id=title_size class="wenbenkuang" name=title_size LANGUAGE=javascript onChange="return title_size_onchange()" style="width:55">
            <OPTION value="0">大小</OPTION>
            <OPTION <%if rs("titlesize")=1 then%>selected<%end if%> value="1">1(8px)</OPTION>
            <OPTION <%if rs("titlesize")=2 then%>selected<%end if%> value="2">2(10px)</OPTION>
            <OPTION <%if rs("titlesize")=3 then%>selected<%end if%> value="3">3(12px)</OPTION>
            <OPTION <%if rs("titlesize")=4 then%>selected<%end if%> value="4">4(14px)</OPTION>
            <OPTION <%if rs("titlesize")=5 then%>selected<%end if%> value="5">5(18px)</OPTION>
            <OPTION <%if rs("titlesize")=6 then%>selected<%end if%> value="6">6(24px)</OPTION>
            <OPTION <%if rs("titlesize")=7 then%>selected<%end if%> value="7">7(36px)</OPTION>
          </SELECT>
          <SELECT size=1 id=title_type class="wenbenkuang" name=title_type LANGUAGE=javascript onChange="return title_type_onchange()" style="width:55">
            <OPTION value="0">类型</OPTION>
            <OPTION <%if rs("titletype")="0" then%>selected<%end if%> value="0">普通</OPTION>
            <OPTION <%if rs("titletype")="b" then%>selected<%end if%> value="b">加粗</OPTION>
            <OPTION <%if rs("titletype")="i" then%>selected<%end if%> value="i">倾斜</OPTION>
            <OPTION <%if rs("titletype")="u" then%>selected<%end if%> value="u">下划线</OPTION>
            <OPTION <%if rs("titletype")="1" then%>selected<%end if%> value="1">加粗倾斜</OPTION>
          </SELECT>
          <SELECT size=1 id=title_face class="wenbenkuang" name=title_face LANGUAGE=javascript onChange="return title_face_onchange()" style="width:55">
            <OPTION value="0">字体</OPTION>
            <option <%if rs("titleface")="宋体" then%>selected<%end if%> value="宋体">宋体</option>
            <option <%if rs("titleface")="楷体_GB2312" then%>selected<%end if%> value="楷体_GB2312">楷体</option>
            <option <%if rs("titleface")="新宋体" then%>selected<%end if%> value="新宋体">新宋体</option>
            <option <%if rs("titleface")="黑体" then%>selected<%end if%> value="黑体">黑体</option>
            <option <%if rs("titleface")="隶书" then%>selected<%end if%> value="隶书">隶书</option>
            <option <%if rs("titleface")="幼圆" then%>selected<%end if%> value="幼圆">幼圆</option>
          </SELECT>
          <img src="images/FIELDSET.gif" onClick="insertbr('<br>')" title="添加换行" style='cursor:hand'> </td>
      </tr>
      <tr bgcolor="#F3F3F3"> 
        <td align="right" valign="middle" class="TableBody1">选择分类：</td>
        <td width="743" colspan="3" class="TableBody1"><span style="PADDING-LEFT: 6px">大类:
            <%set rsdl=server.CreateObject("adodb.recordset")
        rsdl.open "select * from shop_zhuanti_class order by px",conn,1,1
	if rsdl.eof and rsdl.bof then
	response.write "请先添加栏目。"
	response.end
	else
%>
            <select name="anclassid" size="1" id="anclassid" onChange="changelocation(document.form1.anclassid.options[document.form1.anclassid.selectedIndex].value)">
              <%      dim selclass
         selclass=rsdl("id")
        
        do while not rsdl.eof
	anclassid=rs("classid")
	  response.write  "<option value="&rsdl("id")
  if anclassid=rsdl("id") then 
  response.write " selected "
  selclass=rsdl("id")
   end if
  response.write ">"&trim(rsdl("classname"))&"</option>"    
        rsdl.movenext
        loop
	end if
        rsdl.close
%>
            </select>
&nbsp;&nbsp; 小类：
<select name="nclassid" size="1" id="nclassid" onChange="changelocation3(document.form1.nclassid.options[document.form1.nclassid.selectedIndex].value)">
  <%set rsxl=server.CreateObject("adodb.recordset")
		rsxl.open "select * from shop_zhuanti_class2 where classid1="&selclass,conn,1,1
if not(rsxl.eof and rsxl.bof) then
%>
  <% 
                                 dim selclass3
 				 selclass3=rsxl("id")
do while not rsxl.eof
nclassid=rs("classid2")
  response.write  "<option value="&rsxl("id")
  if nclassid=rsxl("id") then
   response.write " selected "
    selclass3=rsxl("id")
  end if
  response.write ">"&trim(rsxl("classname"))&"</option>"  
rsxl.movenext
loop
end if
        rsxl.close
        set rsxl = nothing
        
%>
</select>
<font color="#FF0000">&nbsp;&nbsp;&nbsp; </font> 子类：
<select name="xclassid">
  <%if selclass3="" then
		selclass3=0
		end if
		set rszl=server.CreateObject("adodb.recordset")
		rszl.open "select * from shop_zhuanti_class3 where classid2="&selclass3,conn,1,1
if not(rszl.eof and rszl.bof) then
do while not rszl.eof
xclassid=rs("classid3")%>
  <option value="<%=rszl("id")%>"<%if xclassid=rszl("id") then %> selected <%end if %> ><%=rszl("classname")%></option>
  <% rszl.movenext
loop


end if
        rszl.close
        set rszl= nothing
%>
</select>
*(必填字段)</span></td>
      </tr>
      <tr bgcolor="#F3F3F3">
        <td align="right" valign="middle" class="TableBody1">发 布 人：</td>
        <td width="743" colspan="3" class="TableBody1"><input name="iname" type="text" class="wenbenkuang" id="iname" value="<%=rs("iname")%>" size="30"></td>
      </tr>
      <tr bgcolor="#F3F3F3"> 
        <td align="right" valign="top" bgcolor="#F3F3F3" class="TableBody1">文章内容：<br> 
        <font color="#FF0000">*</font></td>
        <td width="743" colspan="3" valign="top" class="TableBody1"><IFRAME ID="eWebEditor" SRC="eweb/ewebeditor.htm?id=content&style=yellow" FRAMEBORDER="0" SCROLLING="no" WIDTH="650" HEIGHT="350"></IFRAME></td>
      </tr>
      <tr bgcolor="#F3F3F3">
        <td align="right" valign="top" bgcolor="#F3F3F3" class="TableBody1">相关选项：</td>
        <td width="743" colspan="3" valign="top" class="TableBody1"><input name="ipic" type="checkbox" id="ipic" value="0" <%if rs("ipic")=0 then%>checked<%end if%>>
是否图片新闻
  <input name="itop" type="checkbox" id="itop" value="0" <%if rs("itop")=0 then%>checked<%end if%>>
是否置顶新闻
<input name="itj" type="checkbox" id="itj" value="0" <%if rs("itj")=0 then%>checked<%end if%>>
是否推荐新闻
<input name="iuser" type="checkbox" id="iuser" value="0" <%if rs("iuser")=0 then%>checked<%end if%>>
是否游客可见</td>
      </tr>
      <tr align="center" bgcolor="#F3F3F3"> 
        <td colspan="4" height="30" class="TableBody2"> <input type="submit" value="确 认 修 改" name="Submit" class="go-wenbenkuang" >&nbsp;&nbsp;&nbsp;
             <input type="button" value=" 返 回 " onClick="javascript:history.go(-1)" class="go-wenbenkuang"> 
          
          <input type="hidden" name="Content" value="<%		  
		  set rs=server.createobject("adodb.recordset")
sql="select Content From shop_zhuanti where newsid="&newsid
rs.open sql,conn,1,1
 response.Write(replace(rs("Content"),"""","&quot;"))
		  %>"> <input type="hidden" name="linkaddress" value="<%=request.servervariables("http_referer")%>"> 
        <input type="hidden" name="newsid" value="<%=NewsID%>"> </td>
      </tr>
    </table>
  </center>
</form>
<!--#include file="copyright.asp"-->
<p>&nbsp;</p>
<p>&nbsp;</p>
</body>
</html>