<!--#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")>2 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
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><%=redcaff%>　添加专题文章</title>

<script language="javascript">
<!--
function checkdata()
{
if (document.form1.title.value=="")
	{
	  alert("对不起，请输入文章标题！")
	  document.form1.title.focus()
	  return false
	 }


}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>
<script  language="JavaScript">
<!-- Hide from older browsers...

//Function to format text in the text box
function FormatText(command, option){
	
  	frames.message.document.execCommand(command, true, option);
  	frames.message.focus();
}

//Function to add image
function AddImage(){	
	imagePath = prompt('请输入图片地址', 'http://');				
	
	if ((imagePath != null) && (imagePath != "")){					
		frames.message.document.execCommand('InsertImage', false, imagePath);
  		frames.message.focus();
	}
	frames.message.focus();			
}

//Function to clear form
function ResetForm(){

	if (window.confirm('确认要清空对话框内容?')){
	 	frames.message.document.body.innerHTML = ''; 
	 	return true;
	 } 
	 return false;		
}

//Function to open pop up window
function openWin(theURL,winName,features) {
  	window.open(theURL,winName,features);
}

function setMode(newMode)
{
  bTextMode = newMode;
  var cont;
  if (bTextMode) {
    cleanHtml();
    cleanHtml();

    cont=message.document.body.innerHTML;
    message.document.body.innerText=cont;
  } else {
    cont=message.document.body.innerText;
    message.document.body.innerHTML=cont;
  }
  message.focus();
}

function cleanHtml()
{
  var fonts = message.document.body.all.tags("FONT");
  var curr;
  for (var i = fonts.length - 1; i >= 0; i--) {
    curr = fonts[i];
    if (curr.style.backgroundColor == "#ffffff") curr.outerHTML	= curr.innerHTML;
  }

}

// -->
</script>
<script language="JavaScript">

function help()
{
    var helpmess;
    helpmess="---------------填写帮助---------------\r\n\r\n"+
         "1.请不要发表有危险性的脚本。\r\n\r\n"+
         "2.如果要书写源代码，请选中\r\n\r\n"+
         "　查看HTML源代码书写.\r\n\r\n"+
         "3.需要你自己运行,才能看效果.\r\n\r\n"+
         "4.如果书写js，尽量不要在这儿书写.\r\n\r\n";
    alert(helpmess);
}
</script>
<script src="edit.js" type="text/javascript"></script>
<%dim count
set rs=server.createobject("adodb.recordset")
rs.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 rs.eof 
%>
subcat[<%=count%>] = new Array("<%= trim(rs("classname"))%>","<%= rs("classid1")%>","<%= rs("id")%>");
<%
        count = count + 1
        rs.movenext
        loop
        rs.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>
<link href="../css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.STYLE1 {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="STYLE1">* 为必添项目</span></td>
      </tr>
    </table></td>
  </tr>
</table>
<form name="form1" method="post" action="zhuanti_add_save.asp" OnSubmit="return checkdata()" >
  <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"> <b class="unnamed2">添 加 
          专 题 文 章</b></td>
      </tr>
      <tr bgcolor="#F3F3F3"> 
        <td width="178" align="right"  valign="middle" bgcolor="#F3F3F3"><div align="right">文章标题：</div></td>
        <td width="736" colspan="3" > <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='在这里输入要添加的文章标题，必填'> 
          <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">标题设置：</td>
        <td colspan="3" ><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 value="#003399" style="background-color:#000000"></OPTION>
            <OPTION value="#000000" style="background-color:#000000"></OPTION>
            <OPTION value="#FFFFFF" style="background-color:#FFFFFF"></OPTION>
            <OPTION value="#008000" style="background-color:#008000"></OPTION>
            <OPTION value="#800000" style="background-color:#800000"></OPTION>
            <OPTION value="#808000" style="background-color:#808000"></OPTION>
            <OPTION value="#000080" style="background-color:#000080"></OPTION>
            <OPTION value="#800080" style="background-color:#800080"></OPTION>
            <OPTION value="#808080" style="background-color:#808080"></OPTION>
            <OPTION value="#FFFF00" style="background-color:#FFFF00"></OPTION>
            <OPTION value="#00FF00" style="background-color:#00FF00"></OPTION>
            <OPTION value="#00FFFF" style="background-color:#00FFFF"></OPTION>
            <OPTION value="#FF00FF" style="background-color:#FF00FF"></OPTION>
            <OPTION value="#FF0000" style="background-color:#FF0000"></OPTION>
            <OPTION value="#0000FF" style="background-color:#0000FF"></OPTION>
            <OPTION value="#008080" style="background-color:#008080"></OPTION>
          </SELECT>
          <SELECT size=1 class="wenbenkuang" id=title_size name=title_size LANGUAGE=javascript onChange="return title_size_onchange()" style="width:55">
            <OPTION value="0" selected>大小</OPTION>
            <OPTION value="1">1(8px)</OPTION>
            <OPTION value="2">2(10px)</OPTION>
            <OPTION value="3">3(12px)</OPTION>
            <OPTION value="4">4(14px)</OPTION>
            <OPTION value="5">5(18px)</OPTION>
            <OPTION value="6">6(24px)</OPTION>
            <OPTION value="7">7(36px)</OPTION>
          </SELECT>
          <SELECT size=1 class="wenbenkuang" id=title_type name=title_type LANGUAGE=javascript onChange="return title_type_onchange()" style="width:55">
            <OPTION value="0" selected>类型</OPTION>
            <OPTION value="0">普通</OPTION>
            <OPTION value="b">加粗</OPTION>
            <OPTION value="i">倾斜</OPTION>
            <OPTION value="u">下划线</OPTION>
            <OPTION 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" selected>字体</OPTION>
            <option value="宋体">宋体</option>
            <option value="楷体_GB2312">楷体</option>
            <option value="新宋体">新宋体</option>
            <option value="黑体">黑体</option>
            <option value="隶书">隶书</option>
            <option 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">选择分类：</td>
        <td width="736" colspan="3" > 
          大类:
      <%set rs=server.CreateObject("adodb.recordset")
        rs.open "select * from shop_zhuanti_class order by px",conn,1,1
	if rs.eof and rs.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=rs("id")
        
        do while not rs.eof

  response.write  "<option value="&rs("id")
  if anclassid=rs("id") then response.write " selected "
  response.write ">"&trim(rs("classname"))&"</option>"    
        rs.movenext
        loop
	end if
        rs.close
%>
      </select>
      &nbsp;&nbsp; 小类：
      <select name="nclassid" size="1" id="nclassid" onChange="changelocation3(document.form1.nclassid.options[document.form1.nclassid.selectedIndex].value)">
        <%set rs=server.CreateObject("adodb.recordset")
		rs.open "select * from shop_zhuanti_class2 where classid1="&selclass,conn,1,1
if not(rs.eof and rs.bof) then
%>
        <% 
                                 dim selclass3
 				 selclass3=rs("id")
do while not rs.eof
  response.write  "<option value="&rs("id")
  if nclassid=rs("id") then response.write " selected "
  response.write ">"&trim(rs("classname"))&"</option>"  
rs.movenext
loop
end if
        rs.close
        set rs = nothing
        
%>
      </select>
      <font color="#FF0000">&nbsp;&nbsp;&nbsp; </font> 子类：
      <select name="xclassid">
	  
        <%if selclass3="" then
		selclass3=0
		end if
		set rs2=server.CreateObject("adodb.recordset")
		rs2.open "select * from shop_zhuanti_class3 where classid2="&selclass3,conn,1,1
if not(rs2.eof and rs2.bof) then
do while not rs2.eof%>
        <option value="<%=rs2("id")%>"<%if xclassid=rs2("id") then %> selected <%end if %> ><%=rs2("classname")%></option>
        <% rs2.movenext
loop


end if
        rs2.close
        set rs2= nothing
%>
      </select></td>
      </tr>
      <tr bgcolor="#F3F3F3">
        <td align="right"  valign="middle">发 布 人：</td>
        <td width="736" colspan="3" ><input name="iname" type="text" class="wenbenkuang" id="iname" value="<%=session("admin")%>" size="30"></td>
      </tr>
      <tr bgcolor="#F3F3F3"> 
        <td align="right" valign="top" bgcolor="#F3F3F3"  >文章内容：<br> 
        <font color="#FF0000">*</font></td>
        <td width="736" colspan="3" valign="top" ><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"  >相关选项：</td>
        <td width="736" colspan="3" valign="top" ><input name="ipic" type="checkbox" id="ipic" value="0">
          是否图片新闻
            <input name="itop" type="checkbox" id="itop" value="0">
          是否置顶新闻
          <input name="itj" type="checkbox" id="itj" value="0">
          是否推荐新闻
          <input name="iuser" type="checkbox" id="itop3" value="0" checked>
          是否游客可见</td>
      </tr>
      <tr align="center" bgcolor="#F3F3F3"> 
        <td height="30" colspan="4" >&nbsp;&nbsp; <input type="submit" value="确 认 添 加" name="Submit" class="go-wenbenkuang" > 
          &nbsp;
          <input name="button" type="button" class="go-wenbenkuang" onClick="javascript:history.go(-1)" value=" 返 回 ">
          <input type="hidden" name="Content" value=""> </td>
      </tr>
    </table>
  </center>
</form>
<!--#include file="copyright.asp"-->
</body>
</html>