| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- <%Session.CodePage=65001%>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>BdeCMS网站后台管理登陆</title>
- <meta name="Keywords" content="网站后台管理系统,网站内容管理系统,asp网站后台管理系统,西安网站建设,西安网络公司" />
- <link rel="stylesheet" type="text/css" href="../bdcommx/css.css">
- </head>
- <!--#include file="../bdcommx/connxyz.asp"-->
- <!--#include file="../bdcommx/jsall.asp"-->
- <%call log_chk()%>
- <body>
- <%
- if request("myact")="mod" then
- dim theName,oldName,theX,theClass,thenote,picpath
- theX=trim(request("theX"))
- theName=trim(request("thename"))
- oldName=trim(request("oldname"))
- theClass=trim(request("theclass"))
- theOrd=trim(request("theOrd"))
- thenote=request("thenote")
- picpath=request("picpath")
- if theName="" then
- call backurl("类名不能为空!")
- end if
- '-----------------------避免重复
- if theName<>oldName then
- Set rs=Server.Createobject("Adodb.Recordset")
- sql="select * from nsclass where ns_name='"&theName&"'"
- rs.open sql,conn,1,3
- if not rs.eof and not rs.bof then
- call backurl("该类名已存在!")
- rs.close
- set rs=nothing
- end if
- end if
- '-----------------------开始修改
- Set rs=Server.Createobject("Adodb.Recordset")
- sql="select * from nsclass where ns_id="&theX&""
- rs.open sql,conn,1,3
- if rs.eof then
- call backurl("容错是个好习惯!")
- else
- rs("ns_name")=theName
- rs("nb_id")=theClass
- if theOrd<>"" then
- rs("ns_order")=theOrd
- end if
- rs("ns_wtime")=now()
- rs("ns_note")=thenote
- rs("Fileurl")=picpath
- rs.update
- rs.close
- set rs=nothing
- end if
- '----------------------------因为牵涉到大类ID的修改,所以相关新闻也要跟这修改
- conn.execute("update bdnews set nb_id="&theClass&" where ns_id="&theX&"")
- conn.close
- set conn=nothing
- response.Redirect("NCMag.asp")
- end if%>
- <table width="100%" height="42" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td width="4%" height="42" align="center" background="../images/top_bg2.jpg"><img src="../images/dian.gif" width="10" height="10" /></td>
- <td width="96%" background="../images/top_bg2.jpg" class="hui12">后台管理:>> 小类修改</td>
- </tr>
- </table>
- <br />
- <%theX=trim(request("theX"))
- Set rssmall=Server.Createobject("Adodb.Recordset")
- sql="select * from nsclass where ns_id="&theX&""
- rssmall.open sql,conn,1,3
- if not rssmall.eof and not rssmall.bof then
- Set rsbig=Server.Createobject("Adodb.Recordset")
- sql="select * from nbclass where nb_id="&rssmall("nb_id")&""
- rsbig.open sql,conn,1,3
- if not rsbig.eof then
- TheB=rsbig("nb_name")
- rsbig.close
- set rsbig=nothing
- end if%>
- <table width="750" border="0" align="center" cellpadding="0" cellspacing="1" class="tab_bdr">
- <form id="form1" name="form1" method="post" action="?myact=mod">
- <tr>
- <td align="center" class="tb_bg" colspan="2">小类修改</td>
- </tr>
- <tr>
- <td width="117" height="26" align="center" class="NcB_bg">小类名称</td>
- <td width="628" class="NcB_bg"><input name="thename" type="text" id="thename" value="<%=rssmall("ns_name")%>" />
- <input name="theX" type="hidden" id="theX" value="<%=rssmall("ns_id")%>" />
- <input name="oldname" type="hidden" id="oldname" value="<%=rssmall("ns_name")%>" /></td>
- </tr>
- <tr>
- <td height="26" align="center" class="NcB_bg"><span class="NcB_bg">所属类别</span></td>
- <td height="26" class="NcB_bg"><%=Clachg(0)%></td>
- </tr>
- <tr>
- <td height="26" align="center" class="NcB_bg">排 序</td>
- <td height="26" class="NcB_bg"><input name="theOrd" type="text" id="theOrd" onKeyUp="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" value="<%=rssmall("ns_order")%>" size="4" maxlength="4"/></td>
- </tr><tr>
- <td height="26" align="center" class="NcB_bg">简 介</td>
- <td height="26" class="NcB_bg"><textarea name="thenote" cols="50" rows="8" id="thenote"><%=rssmall("ns_note")%></textarea></td>
- </tr><tr>
- <td height="26" align="center" class="NcB_bg">上传图片
- <input name="picpath" type="hidden" id="picpath" value="<%=rssmall("fileurl")%>" size="50" /></td>
- <td height="26" class="NcB_bg"><iframe id="UploadFiles" src="../fileup/upload1.asp" frameborder="0" scrolling="No" width="450" height="25"> </iframe></td>
- </tr>
- <tr>
- <td height="26" class="NcB_bg"> </td>
- <td height="26" class="NcB_bg"><input type="submit" name="Submit" value="修改" />
- <input type="reset" name="Submit2" value="重置" /></td>
- </tr>
- </form>
- </table>
- <%rssmall.close
- set rssmall=nothing
- end if%>
- </body>
- </html>
|