<%@ codepage ="936" %>
 <% 
	data_path="../../" 'ACC连接数据库路径，对SQL无效
	numid="81"
	dir="../err.asp" 
  %>
  <!--#include file="../../conn/conn.asp"-->
<!--#include file="../../inc/safe.asp"-->
 <!--#include file="../rolecheck.asp"-->
 
<%
  
if request("id")="" then
Response.write("<script >alert('对不起！参数传递错误！');history.back(-1);</script>")
response.End()
end if

 id=Replace_Text(request("id"))
 
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>添加帮助信息</title>
<link rel="stylesheet" type="text/css" href="../css/style.css">
<style type="text/css">
<!--
.style1 {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="0" cellpadding="0" align=center class="tableBorder"> 
  <tr> 
     <th height=25 colspan="2" class="tableHeaderText">帮助信息管理 </th> 
  </tr> 
  <tr> 
     <td colspan="2"   height="20"><font color="#666666">温馨提示：
         ①类别直接与发布的信息相关联，删除类别可能会影响到以前发布的帮助信息。</font> </td> 
   </tr> 
  <tr> 
     <td width="10%" height=25 class="forumRowHighlight"> <B>操作选项</B></td> 
         <FORM name=searchForm action="index.asp" method=post onSubmit="javascript:if(doSearch()==false) return false;"><td class="forumRowHighlight">
       关键字：<input name="keywords" type="text" value="<%=keywords%>">
&nbsp;商机类别：
<select name="sortid" size="1">  
<%
set rs1=server.CreateObject("adodb.recordset")
sql1="select * from Yixiang_help_sort"
rs1.open sql1,conn,1,1
if not rs1.eof then
do while not rs1.eof
response.write "<option value='"&rs1("sortid")&"'>"&rs1("sort")&"</option>"&chr(13)+chr(10)
rs1.movenext
loop
rs1.close
end if
%>
</select> <input type="submit" value="立刻查找" id=submit name=submit>
         </td></form>
  </tr><Tr><td colspan="2" height="1"  bgcolor="#CCCCCC"></td></Tr>
  <tr>
    <td height=25 class="forumRowHighlight">&nbsp;</td>
	 <td class="forumRowHighlight"><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> 
</table>
<script language = "JavaScript"> 
sall=new Array();
<%
Dim i
i=0
set rs=server.CreateObject("adodb.recordset")
sql="select * from Yixiang_help_type"
rs.open sql,conn,1,1
if not rs.eof then
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
end if
%>
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>
<%
sql="select * from Yixiang_help where id="&id
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
set rs3=conn.execute("select Yixiang_help_type.*,Yixiang_help_sort.sort,Yixiang_help_sort.sortid as sortidd from Yixiang_help_type,Yixiang_help_sort where Yixiang_help_type.typeid="&rs("typeid")&" and Yixiang_help_sort.sortid=Yixiang_help_type.sortid")
 
%>

<TABLE width="100%" border="0" align=center cellpadding="0" cellspacing="1" class="tableBorder">
 <form method="POST" action="editsave.asp?LogName=126" name="form">
<input type="hidden" name="id" value="<%=rs("id")%>"> <tr> 
     <th height=25 colspan="2" class="tableHeaderText">修改商业信息</th> 
  </tr>
<TR ALIGN="center">
<TD>
  <TABLE width="100%" height="111" border="0" cellpadding="2" cellspacing="1" bordercolorlight="#CEE7FF" bordercolordark="#CEE7FF" style="border-collapse: collapse">
<TR> 
<TD width="170" align="right" class="Forumrow" height="12"><b>标题：</b></TD>
<TD height="12" class="Forumrow">&nbsp;<input name="showname" type="text" class="smallInput" id="showname" value="<%=rs("showname")%>" size="50" maxlength="25"> 
*</TD>
</TR>
<TR>
<TD width="170" align="right" height="9" class="Forumrow"><b>所属类别：</b></td>
<TD width="784" height="9" valign="middle" class="Forumrow">&nbsp;<select name="sortid" onChange="changeselect(document.form.sortid.options[document.form.sortid.selectedIndex].value)" size="1"> 
<%
set rs1=server.CreateObject("adodb.recordset")
sql1="select * from Yixiang_help_sort"
rs1.open sql1,conn,1,1
if not rs1.eof then
do while not rs1.eof
%>
 <option value='<%=rs1("sortid")%>' <%if rs1("sortid")=rs("sortid") then response.Write("selected")  end if%>><%=rs1("sort")%></option>
 <%
rs1.movenext
loop
rs1.close
end if
%>
                            
</select> 
<select name="typeid"> 
       <%
set rs4=server.CreateObject("adodb.recordset")
sql4="select * from Yixiang_help_type where sortid="&rs("sortid")
rs4.open sql4,conn,1,1
if not rs4.eof then 
do while not rs4.eof
%>
<option value='<%=rs4("typeid")%>' <%if rs4("typeid")=rs("typeid") then response.Write("selected") end if%> ><%=rs4("typename")%></option> 
<%
rs4.movenext
loop
rs4.close
set rs4=nothing
end if
rs3.close
set rs3=nothing

%>
                             
</select> *</TD>
</TR>
<TR>
  <TD align="right" height="4" class="Forumrow"><b>信息添加者：</b></td>
  <TD width="784" height="4" valign="middle" class="Forumrow">&nbsp;<input name="addname" type="text" class="smallInput" id="addname" value="<%=rs("addname")%>" size="50" maxlength="15"> 
  *</TD>
</TR>
<TR> 
<TD height="52" align="right" class="Forumrow"><b>信息内容：</b></TD>
<TD class="Forumrow">&nbsp;<textarea name="content" style="display:none"><%=replace(rs("content"),"<br>",chr(13))%></textarea><iframe ID="eWebEditor1" src="../../editor/ewebeditor.asp?id=content&style=standard&originalfilename=d_originalfilename &savefilename=d_savefilename &savepathfilename=d_savepathfilename" frameborder="0" scrolling="no" width="617" HEIGHT="450"></iframe></TD>
</TR>
<TR height="40">
<TD colspan="2" align="center" class="Forumrow" height="28"><input type="button" name="Submit" value=" 提　交  保  存" class="smallInput" onClick="check()">&nbsp;&nbsp;&nbsp;&nbsp;
<input type="reset" name="Submit2" value=" 重　填" class="smallInput">
</TR>
</TABLE></TD>
</TR></FORM>

</TABLE>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
<!--#include file="../copy.asp" -->