<%@ codepage ="936" %>
<!--#include file="../../conn/conn.asp" -->
<!--#include file="../../Inc/Commoncode.asp" -->
<!--#include file="../../FCKeditor/fckeditor.asp" -->
<!--#include file="../checkvalid.asp" -->
<%sUploadDir=UpFilesPath("Help")
If Not FRAdminLevel(804) Then
	Call ErrorMsg()
End If%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>添加帮助信息</title>
<link href="../css/style<%=sk%>.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../inc/input.js"></script>
<style type="text/css">
<!--
.style1 {font-weight: bold}
.style11 {color: #0066CC;
	font-weight: bold;
}
-->
</style>
</head>
<script LANGUAGE="JavaScript">
function check()
{
if (document.form.showname.value=="")
{
alert("请输入标题！")
document.form.showname.focus()
document.form.showname.select()
return
}
if (document.form.sortid.value=="")
{
alert("请选择所属类别！")
document.form.sortid.focus()
return
}
if (document.form.addname.value=="")
{
alert("请输入添加者！")
document.form.addname.focus()
document.form.addname.select()
return
}
document.form.submit()
}
</script><table width="98%" border="0" cellspacing="1" cellpadding="2" align=center class="tableBorder"> 
  <tr> 
     <th height=25 colspan="2" class="tableHeaderText">帮助信息管理 </th> 
  </tr> 
  <tr>
    <td colspan="2"><font color="ff6600"><b class="style11">　管理选项</b></font>： <a href="index.asp">管理帮助信息</a> | <a href="addhelp.asp">添加帮助信息</a> | <a href="sort.asp">管理帮助类别</a> | <a href="Admin_Class_Ok.asp?action=add_help_sort">添加帮助类别</a> |   [<a href="javascript:location.reload()">刷新页面</a>] </td>
  </tr>
  <tr> 
     <td colspan="2"><p><B>注意</B>：<BR> 
    ①类别直接与发布的信息相关联，删除类别可能会影响到以前发布的帮助信息。<BR> </td> 
  </tr> 
  <tr> 
     <td width="10%" height=25> <B>操作选项</B></td> 
         <FORM name=searchForm action="index.asp" method=post onSubmit="javascript:if(doSearch()==false) return false;"><td>
       关键字：
           <input name="keywords" type="text" value="<%=keywords%>">
&nbsp;帮助类别：
<select name="sortid" size="1">  
<%
set rs1=conn.execute("select * from JOB_help_sort")
do while not rs1.eof
response.write "<option value='"&rs1("sortid")&"'>"&rs1("sort")&"</option>"&chr(13)+chr(10)
rs1.movenext
loop
rs1.close
%>
</select> <input type="submit" value="立刻查找" id=submit name=submit>
         </td></form>
  </tr>
</table>
<script language = "JavaScript"> 
sall=new Array();
<%
Dim i
i=0
set rs=conn.execute("select * from JOB_help_type")
do while not rs.eof
%>
sall[<%=i%>]=new Array("<%=rs("typename")%>","<%=rs("sortid")%>","<%=rs("typeid")%>");
<%
i=i+1
rs.movenext
loop
rs.close
set rs=nothing
%>
function changeselect(selvalue)  
   { 
      document.form.typeid.length=0;  
      var selvalue=selvalue;
      var i;
      for(i=0;i<sall.length;i++) 
	{
	    if(sall[i][1]==selvalue) 
      		{
  	var newOption1=new Option(sall[i][0],sall[i][2]);
	document.all.typeid.add(newOption1);
		}
	}
}
</script>
<TABLE width="100%" border="0" align=center cellpadding="0" cellspacing="1" class="tableBorder mt6">
<form method="POST" action="savehelp.asp" name="form">
<tr> 
   <th height=25 colspan="2" class="tableHeaderText">添加帮助信息</th> 
</tr>
<TR> 
<TD width="170" align="right" height="12"><b>标题：</b></TD>
<TD height="12">&nbsp;
  <input name="showname" type="text" class="smallInput" id="showname" size="50"> 
*</TD>
</TR>
<TR>
<TD width="170" align="right" height="9"><b>所属类别：</b></td>
<TD width="784" height="9" valign="middle">&nbsp;
  <select name="sortid" onChange="changeselect(document.form.sortid.options[document.form.sortid.selectedIndex].value)" size="1"> 
<option selected value="">--请选择大类--</option> 
<%
set rs1=conn.execute("select * from JOB_help_sort")
do while not rs1.eof
response.write "<option value='"&rs1("sortid")&"'>"&rs1("sort")&"</option>"&chr(13)+chr(10)
rs1.movenext
loop
rs1.close
%>
</select> 
<select name="typeid"> 
<option selected value="">--请选择子类--</option> 
</select> *</TD>
</TR>
<TR>
  <TD align="right" height="4"><b>信息添加者：</b></td>
  <TD width="784" height="4" valign="middle">&nbsp;
    <input name="addname" type="text" class="smallInput" id="addname" value="<%=webname%>信息中心" size="50"> 
  *</TD>
</TR>
<TR> 
<TD height="52" align="right"><b>信息内容：</b></TD>
<TD>&nbsp;
  <!--<textarea name="content" style="display:none"></textarea>--><% 
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath = InstallDir&FR_HR_Editor '设置编辑器的路径，我站点根目录下的一个目录
oFCKeditor.ToolbarSet = "Default"
oFCKeditor.Config("SkinPath") = InstallDir&FR_HR_Editor&"editor/skins/silver/"
oFCKeditor.Width = "100%"
oFCKeditor.Height = "400"
oFCKeditor.Value = "" '这个是给编辑器初始值
oFCKeditor.Create "content" '以后编辑器里的内容都是由这个logbody取得，命名由你定
%></TD>
</TR>
<TR height="40">
<TD colspan="2" align="center" height="28"><input type="button" name="Submit" value=" 提　交  保  存" class="inputs" onClick="check()">
  &nbsp;&nbsp;&nbsp;&nbsp;
<input type="reset" name="Submit2" value=" 重　填" class="inputs">
</TR>
</FORM>
</TABLE>
<!--#include file="../inc/copy.asp" -->