www.gusucode.com > 创想设计Flash相册 1.0源码程序 > Photo\admin\Add_xi_edit.asp
<%@language=vbscript codepage=936 %> <!--#include file="conn.asp"--> <!--#include file="session_admin.asp"--> <html> <head> <title>后台管理</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <link rel="stylesheet" href="Admin_Style.css"> <style type="text/css"> <!-- .style1 {color: #FF0000} --> </style> </head> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <% id = trim(request.QueryString("id")) action = trim(request.QueryString("action")) bg_1 = trim(request.Form("bg_1")) productname = trim(request.Form("productname")) productdetail = trim(request.Form("productdetail")) sql = "select * from menu where id="&id set rs = Server.CreateObject("ADODB.Recordset") rs.open sql,conn,3,2 if rs.eof and rs.bof then response.Write("<script>alert('参数错误!')</script>") response.Write("<script>location.href='Add_xi.asp'</script>") else if action="edit" then rs("title") = productname rs("intro") = productdetail if bg_1 <>"" then rs("picture") = bg_1 end if rs.update response.Write("<script>alert('修改成功!')</script>") response.Write("<script>location.href='Add_xi.asp'</script>") else %> <table cellpadding="0" cellspacing="1" border="0" width="100%" class="border" align=center> <tr align="center"> <td height=25 colspan=2 class="topbg"><strong>后台管理</strong> </tr> <tr> <td width="111" class="tdbg" height=23><strong>管理快捷方式:</strong></td> <td width="462" class="tdbg"> </td> </tr> </table> <table cellpadding="2" cellspacing="1" border="0" width="100%" class="border" align=center> <tr bgcolor="#FFFFFF"> <td colspan="5"><div align="center">菜谱修改</div></td> </tr> <form action="?action=edit&id=<%=rs("id")%>" method="post" name="canshu" id="canshu"> <tr> <td width="10%" height="25" align="right" bgcolor="#FFFFFF" class="fonthei">菜谱图片:</td> <td colspan="2" align="left" bgcolor="#FFFFFF"> <input name="bg" type="text" class="input" id="bg" size="15" value="<%=rs("picture")%>" disabled></td> <td width="15%" rowspan="3" align="left" bgcolor="#FFFFFF"> </td> </tr> <tr> <td height="25" align="right" bgcolor="#FFFFFF" class="fonthei">菜谱名称:</td> <td width="53%" align="left" bgcolor="#FFFFFF"><input name="productname" type="text" value="<%=rs("title")%>"></td> <td width="22%" align="center" bgcolor="#FFFFFF"> </td> </tr> <tr> <td height="25" align="right" bgcolor="#FFFFFF" class="fonthei">菜谱简介:</td> <td colspan="2" align="left" bgcolor="#FFFFFF"><textarea name="productdetail" cols="60" rows="5" ><%=rs("intro")%></textarea></td> </tr> <tr> <td height="25" colspan="4" align="right" bgcolor="#FFFFFF" class="fonthei"><div align="center"> <input type="submit" name="Submit" value="修 改"> <input type="reset" name="Submit" value="重 置"> </div></td> </tr> </form> </table> <%end if%> <%end if%> <!--#include file="Admin_fooder.asp"--> </body> </html>