NCBMod.asp 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <%Session.CodePage=65001%>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5. <title>BdeCMS网站后台管理登陆</title>
  6. <meta name="Keywords" content="网站后台管理系统,网站内容管理系统,asp网站后台管理系统,西安网站建设,西安网络公司" />
  7. <link rel="stylesheet" type="text/css" href="../bdcommx/css.css">
  8. </head>
  9. <!--#include file="../bdcommx/connxyz.asp"-->
  10. <%call log_chk()%>
  11. <body>
  12. <%
  13. if request("myact")="mod" then
  14. dim theName,oldName,theX,theOrd,thenote,picpath
  15. theX=trim(request("theX"))
  16. theName=trim(request("thename"))
  17. oldName=trim(request("oldname"))
  18. theOrd=trim(request("theOrd"))
  19. thenote=request("thenote")
  20. picpath=request("picpath")
  21. if theName="" then
  22. call backurl("类名不能为空!")
  23. end if
  24. '-------------------------------------------------类名是否存在
  25. if theName<>oldName then
  26. Set rs=Server.Createobject("Adodb.Recordset")
  27. sql="select * from nbclass where nb_name='"&theName&"'"
  28. rs.open sql,conn,1,3
  29. if not rs.eof then
  30. call backurl("该类名已存在!")
  31. end if
  32. rs.close
  33. set rs=nothing
  34. end if
  35. '-------------------------------------------------'修改写
  36. Set rs=Server.Createobject("Adodb.Recordset")
  37. sql="select * from nbclass where nb_id="&theX&""
  38. rs.open sql,conn,1,3
  39. if rs.eof then
  40. call backurl("容错是个好习惯!")
  41. else
  42. rs("nb_name")=theName
  43. rs("nb_wtime")=now()
  44. if theOrd<>"" then
  45. rs("nb_order")=theOrd
  46. end if
  47. rs("nb_note")=thenote
  48. rs("Fileurl")=picpath
  49. rs.update
  50. rs.close
  51. end if
  52. set rs=nothing
  53. call GoUrl("NCBMod.asp?thex="&thex&"","修改成功!")
  54. end if
  55. %>
  56. <table width="100%" height="42" border="0" cellpadding="0" cellspacing="0">
  57. <tr>
  58. <td width="4%" height="42" align="center" background="../images/top_bg2.jpg"><img src="../images/dian.gif" width="10" height="10" /></td>
  59. <td width="96%" background="../images/top_bg2.jpg" class="hui12">后台管理:&gt;&gt; 大类修改</td>
  60. </tr>
  61. </table>
  62. <br />
  63. <%
  64. theX=trim(request("theX"))
  65. Set rsbig=Server.Createobject("Adodb.Recordset")
  66. sql="select * from nbclass where nb_id="&theX&""
  67. rsbig.open sql,conn,1,3
  68. if not rsbig.eof and not rsbig.bof then
  69. %><table width="750" border="0" align="center" cellpadding="0" cellspacing="1" class="tab_bdr">
  70. <form id="form1" name="form1" method="post" action="?myact=mod"><tr>
  71. <td width="71%" align="center" class="tb_bg" colspan="2">大类修改</td>
  72. </tr>
  73. <tr>
  74. <td height="26" align="center" class="NcB_bg">大类名称</td>
  75. <td width="71%" class="NcB_bg">
  76. <input name="thename" type="text" id="thename" value="<%=rsbig("nb_name")%>" />
  77. <input name="oldName" type="hidden" id="oldName" value="<%=rsbig("nb_name")%>"/></td>
  78. </tr>
  79. <tr>
  80. <td height="26" align="center" class="NcB_bg">排  序</td>
  81. <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="<%=rsbig("nb_order")%>" size="4" maxlength="4"/>
  82. <input type="hidden" name="theX" value="<%=rsbig("nb_id")%>"/></td>
  83. </tr>
  84. <tr>
  85. <td height="26" align="center" class="NcB_bg">简  介</td>
  86. <td height="26" class="NcB_bg"><textarea name="thenote" cols="50" rows="8" id="thenote"><%=rsbig("nb_note")%></textarea></td>
  87. </tr><tr>
  88. <td height="26" align="center" class="NcB_bg">上传图片
  89. <input name="picpath" type="hidden" id="picpath" value="<%=rsbig("Fileurl")%>" size="50" readonly="false"/></td>
  90. <td height="26" class="NcB_bg"><iframe id="UploadFiles" src="../fileup/upload1.asp" frameborder="0" scrolling="No" width="450" height="25"> </iframe></td>
  91. </tr>
  92. <tr>
  93. <td height="26" class="NcB_bg">&nbsp;</td>
  94. <td height="26" class="NcB_bg">
  95. <input type="submit" name="Submit" value="修改" />
  96. <input type="reset" name="Submit2" value="重置" /> </td>
  97. </tr></form>
  98. </table>
  99. <%rsbig.close
  100. set rsbig=nothing
  101. end if%>
  102. </body>
  103. </html>