PCSmod.asp 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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. <!--#include file="../bdcommx/jsall.asp"-->
  13. <%call log_chk()%>
  14. <body>
  15. <%
  16. if request("myact")="mod" then
  17. dim theName,oldName,theX,theClass,thenote,picpath
  18. theX=trim(request("theX"))
  19. theName=trim(request("thename"))
  20. oldName=trim(request("oldname"))
  21. theClass=trim(request("theclass"))
  22. theOrd=trim(request("theOrd"))
  23. thenote=request("thenote")
  24. picpath=request("picpath")
  25. if theName="" then
  26. call backurl("类名不能为空!")
  27. end if
  28. '-----------------------避免重复
  29. ' if theName<>oldName then
  30. ' Set rs=Server.Createobject("Adodb.Recordset")
  31. ' sql="select * from csclass where cs_name='"&theName&"'"
  32. ' rs.open sql,conn,1,3
  33. ' if not rs.eof and not rs.bof then
  34. ' call backurl("该类名已存在!")
  35. ' rs.close
  36. ' set rs=nothing
  37. ' end if
  38. ' end if
  39. '-----------------------开始修改
  40. Set rs=Server.Createobject("Adodb.Recordset")
  41. sql="select * from csclass where cs_id="&theX&""
  42. rs.open sql,conn,1,3
  43. if rs.eof then
  44. call backurl("容错是个好习惯!")
  45. else
  46. rs("cs_name")=theName
  47. rs("cb_id")=theClass
  48. if theOrd<>"" then
  49. rs("cs_order")=theOrd
  50. end if
  51. rs("cs_wtime")=now()
  52. rs("cs_note")=thenote
  53. rs("Fileurl")=picpath
  54. rs.update
  55. rs.close
  56. set rs=nothing
  57. end if
  58. '----------------------------因为牵涉到大类ID的修改,所以相关新闻也要跟这修改
  59. conn.execute("update bdcp set cb_id="&theClass&" where cs_id="&theX&"")
  60. conn.close
  61. set conn=nothing
  62. response.Redirect("PCMag.asp")
  63. end if
  64. %>
  65. <table width="100%" height="42" border="0" cellpadding="0" cellspacing="0">
  66. <tr>
  67. <td width="4%" height="42" align="center" background="../images/top_bg2.jpg"><img src="../images/dian.gif" width="10" height="10" /></td>
  68. <td width="96%" background="../images/top_bg2.jpg" class="hui12">后台管理:&gt;&gt; 小类修改</td>
  69. </tr>
  70. </table>
  71. <br />
  72. <%
  73. theX=trim(request("theX"))
  74. Set rssmall=Server.Createobject("Adodb.Recordset")
  75. sql="select * from csclass where cs_id="&theX&""
  76. rssmall.open sql,conn,1,3
  77. if not rssmall.eof and not rssmall.bof then
  78. Set rsbig=Server.Createobject("Adodb.Recordset")
  79. sql="select * from cbclass where cb_id="&rssmall("cb_id")&""
  80. rsbig.open sql,conn,1,3
  81. if not rsbig.eof then
  82. TheB=rsbig("cb_name")
  83. rsbig.close
  84. set rsbig=nothing
  85. end if
  86. %><table width="750" border="0" align="center" cellpadding="0" cellspacing="1" class="tab_bdr">
  87. <form id="form1" name="form1" method="post" action="?myact=mod">
  88. <tr>
  89. <td align="center" class="tb_bg" colspan="2">小类修改</td>
  90. </tr>
  91. <tr>
  92. <td width="117" height="26" align="center" class="NcB_bg">小类名称</td>
  93. <td width="628" class="NcB_bg"><input name="thename" type="text" id="thename" value="<%=rssmall("cs_name")%>" />
  94. <input name="theX" type="hidden" id="theX" value="<%=rssmall("cs_id")%>" />
  95. <input name="oldname" type="hidden" id="oldname" value="<%=rssmall("cs_name")%>" /></td>
  96. </tr>
  97. <tr>
  98. <td height="26" align="center" class="NcB_bg"><span class="NcB_bg">所属类别</span></td>
  99. <td height="26" class="NcB_bg"><%=Clachg(1)%></td>
  100. </tr>
  101. <tr>
  102. <td height="26" align="center" class="NcB_bg">排  序</td>
  103. <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("cs_order")%>" size="4" maxlength="4"/></td>
  104. </tr><tr>
  105. <td height="26" align="center" class="NcB_bg">简  介</td>
  106. <td height="26" class="NcB_bg"><textarea name="thenote" cols="50" rows="8" id="thenote"><%=rssmall("cs_note")%></textarea></td>
  107. </tr><tr>
  108. <td height="26" align="center" class="NcB_bg">上传图片
  109. <input name="picpath" type="hidden" id="picpath" value="<%=rssmall("fileurl")%>" size="50" /></td>
  110. <td height="26" class="NcB_bg"><iframe id="UploadFiles" src="../fileup/upload1.asp" frameborder="0" scrolling="No" width="450" height="25"> </iframe></td>
  111. </tr>
  112. <tr>
  113. <td height="26" class="NcB_bg">&nbsp;</td>
  114. <td height="26" class="NcB_bg"><input type="submit" name="Submit" value="修改" />
  115. <input type="reset" name="Submit2" value="重置" /> </td>
  116. </tr>
  117. </form>
  118. </table>
  119. <%rssmall.close
  120. set rssmall=nothing
  121. end if%>
  122. </body>
  123. </html>