gusucode.com > 爱美尔女性商城源码 1.0源码程序 > admintouch/edithelp.asp
<!--#include file="conn.asp"--> <%if session("bjxadmin")="" then response.Write "<script LANGUAGE='javascript'>alert('网络超时或者您还没有登录请登录');window.location.href='login.asp';</script>" response.End else if session("flag")>2 then response.Write "<p align=center><font color=red>您没有此项目管理权限!</font></p>" response.End end if end if id=request("id") if request.QueryString("action")="save" then set rs=server.CreateObject("adodb.recordset") rs.open "select * from T_help where id="&id,conn,1,3 rs("titles")=trim(request("titles")) rs("anclassid")=trim(request("anclassid")) rs("nclassid")=trim(request("nclassid")) Content=Request.Form("Content") '将里面的链接换成本地链接 aa="http://"&Request.ServerVariables("server_name")&Request.ServerVariables("path_info") aa= mid(aa,1,len(aa)-17) '16=admin/addnews.asp rs("Content")=content rs.update rs.close set rs=nothing session("content")="" response.write "<script language=javascript>alert('修改成功!');window.location.href='managehelp.asp';</script>" response.End end if %> <html><head><title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <script language="javascript"> <!-- function checkdata() { if (document.myform.titles.value=="") { alert("对不起,请输入主题!") document.myform.titles.focus() return false } } //--> </script> <%dim count set rs=server.createobject("adodb.recordset") rs.open "select * FROM BJX_class2 where typeid=3 order by Nclassidorder ",conn,1,1%> <script language = "JavaScript"> var onecount; onecount=0; subcat = new Array(); <% count = 0 do while not rs.eof %> subcat[<%=count%>] = new Array("<%= trim(rs("Nclass"))%>","<%= rs("anclassid")%>","<%= rs("Nclassid")%>"); <% count = count + 1 rs.movenext loop rs.close %> onecount=<%=count%>; function changelocation(locationid) { document.myform.Nclassid.length = 0; var locationid=locationid; var i; for (i=0;i < onecount; i++) { if (subcat[i][1] == locationid) { //这句不是很理解 document.myform.Nclassid.options[document.myform.Nclassid.length] = new Option(subcat[i][0], subcat[i][2]); } } } </script> <link href="images/css.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- .style1 { color: #FFFFFF; font-weight: bold; } --> </style> </head> <body> <table class="tableBorder" width="90%" border="0" align="center" cellpadding="0" cellspacing="1" > <tr> <td align="center" background="images/admin_bg_1.gif" height="25"><span class="style1">修改帮助中心</span></td> </tr> <tr> <td valign="top"> <table width="100%" border="0" align="center" cellpadding="5" cellspacing="1"> <form name="myform" method="post" action="edithelp.asp?action=save&id=<%=id%>" onSubmit="return checkdata()" onReset="return ResetForm();"> <%dim rs1 set rs1=server.CreateObject("adodb.recordset") rs1.open "select * from T_Help where id="&id,conn,1,1%> <tr > <td width="20%" align="right">标题:</td> <td style="PADDING-LEFT: 10px"> <input name="titles" type="text" id="titles" size="50" value="<%=rs1("titles")%>"></td> </tr> <tr > <td width="20%" align="right">选择分类:</td> <td>大类: <% rs.open "select * FROM BJX_class1 where typeid=3 order by anclassidorder",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.myform.anclassid.options[document.myform.anclassid.selectedIndex].value)"> <% do while not rs.eof %> <option value="<%=rs("anclassid")%>" <%if rs1("anclassid")=rs("anclassid") then%>selected<%end if%>><%=trim(rs("anclass"))%></option> <% rs.movenext loop end if rs.close %> </select> 小类: <select name="Nclassid"> <%rs.open "select * FROM BJX_class2 where anclassid="&rs1("anclassid") ,conn,1,1 do while not rs.eof%> <option value="<%=rs("NclassID")%>" <%if rs1("nclassid")=rs("nclassid") then%>selected<%end if%>><%=rs("Nclass")%></option> <% rs.movenext loop rs.close set rs = nothing %> </select></td> </tr> <tr > <td align="right" valign="top">内容:</td> <td style="PADDING-LEFT: 10px"> <IFRAME ID="ewebeditor1" SRC="../webedit/ewebeditor.asp?id=Content&style=s_coolblue1" FRAMEBORDER="0" SCROLLING="no" WIDTH="600" HEIGHT="380"></IFRAME> <textarea name="Content" id="Content" style="display:none"><%=rs1("Content")%></textarea> </td> </tr> <tr > <td height="30"></td> <td height="30" style="PADDING-LEFT: 10px"> <input type="submit" name="Submit" value="提交发表" > <input onClick="ClearReset()" type=reset name="Clear" value="重新填写"> </td> </tr> </form> </table> </td> </tr> </table> <% rs1.close set rs1=nothing %> <!--#include file="bjxfoot.asp"--> </body> </html>