PCBMod.asp 4.3 KB

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