www.gusucode.com > 水族产品用品经营类企业网站asp源代码程序 > admin/admin_news_edit.asp
<!--#INCLUDE VIRTUAL="/comm.asp"--> <% id=request("id") if id="" then response.Write("<body background='../image/admin_bj.gif'>") %> <form name="form1" method="post" action="admin_news_edit.asp"> 修改产品的id: <input name="id" type="text" id="id"> <input type="submit" name="Submit" value="修改"> </form> <form action="admin_news_edit_del.asp" method="post" name="form2" id="form2"> 删除产品的id: <input name="id" type="text" id="id"> <input type="submit" name="Submit" value="删除"> </form> <script language="JavaScript" type="text/JavaScript"> document.form1.id.focus();</script> <% else if session("admin")="" then session("backurl")="admin_news_edit.asp?id=" & id response.Redirect("admin_login.asp") end if if mycheckchar(id,"0123456789")="#nosafe#" then response.Redirect("/error.asp?p=id非纯数字") Set conn = Server.CreateObject("ADODB.Connection") conn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("/db/db.mdb") Set rs = Server.CreateObject("ADODB.Recordset") sql="select * from content where id=" & id rs.open sql,conn,1,2 if rs.eof then response.Redirect("/error.asp?p=id不存在") %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>∷∷</title> <link href="/css.css" rel="stylesheet" type="text/css"> </head> <script language="JavaScript" type="text/JavaScript" src="/comm.js"></script> <body background="../image/admin_bj.gif"> <table border="0" cellpadding="5" cellspacing="0" class="w4"> <tr align="left" valign="top"> <td align="center" valign="middle" bgcolor="#999999" class="w_redtext"><font color="#FFFFFF"><strong>修改</strong></font></td> </tr> </table> <table border="0" cellpadding="0" cellspacing="1" bgcolor="#333333"> <tr> <td bgcolor="#FFFFFF"> <form name="form1" method="post" action="admin_news_edit_cl.asp" onSubmit="return zdcl()"> <table border="0" cellpadding="5" cellspacing="2" class="w4"> <tr align="left" valign="top" bgcolor="#E2E2E2"> <td bgcolor="#E2E2E2" class="w_redtext">分类: <input name="sort1_" type="hidden" id="sort1_" value="<%=rs("sort1") %>"><input name="sort2_" type="hidden" id="sort2_" value="<%=rs("sort2") %>"></td> <td> <select name="sort1" id="sort1" onChange="sort2_x()"> </select> <select name="sort2" id="sort2"> </select><input name="sort_txt" type="checkbox" id="sort_txt" value="1" <%if rs("sort_txt")=true then response.Write("checked") %>>目录介绍 <input name="myindex" type="checkbox" id="myindex" value="1" <%if rs("myindex")=true then response.Write("checked") %>>首页显示<script language="JavaScript" type="text/JavaScript"> for(var i=1;i<sz_sort1.length;i++){ newoption = new Option(sz_sort1[i],i); document.form1.sort1.options[i-1]=newoption; } function sort2_x() { j=document.form1.sort1.value; document.form1.sort2.length=0; for(var i=1;i<=sz_sort2[j*100];i++){ newoption = new Option(sz_sort2[j*100+i],i); document.form1.sort2.options[i]=newoption; } } document.form1.sort1.options[document.form1.sort1_.value-1].selected=true; sort2_x(); if(document.form1.sort2_.value!=0){document.form1.sort2.options[document.form1.sort2_.value].selected=true;} </script> </td> </tr> <tr align="left" valign="top" bgcolor="#E2E2E2"> <td class="w_redtext"><input name="id" type="hidden" id="id" value="<%=id %>"> 名称:</td> <td><input name="title" type="text" id="title" value="<%=rs("title") %>" size="93" maxlength="120"></td> </tr> <tr align="left" valign="top" bgcolor="#E2E2E2"> <td class="w_redtext">说明: </td> <td><textarea name="text" cols="93" rows="25" id="text"><%=rs("text") %></textarea></td> </tr> <tr align="left" valign="top" bgcolor="#E2E2E2"> <td>时间:</td> <td><input name="time" type="text" id="time" value="<%=rs("time") %>"> 格式:2004-2-25(不填写即为今天的日期)</td> </tr> <tr align="left" valign="top" bgcolor="#E2E2E2"> <td>来源:</td> <td><input name="from" type="text" id="from" value="<%=rs("from") %>"></td> </tr> <tr align="left" valign="top" bgcolor="#E2E2E2"> <td>点击数:</td> <td><input name="caller" type="text" id="caller" value="<%=rs("caller") %>"> </td> </tr> <tr align="left" valign="top" bgcolor="#E2E2E2"> <td>缩略图:</td> <td class="ww5"><input name="image" type="text" id="image" value="<%=rs("image") %>" maxlength="120"> <a href="javascript:add_image('form1.image')">上传图片</a> </td> </tr> <tr align="left" valign="top" bgcolor="#E2E2E2"> <td>大图:</td> <td class="ww5"><input name="images" type="text" id="images" value="<%=rs("images") %>" maxlength="120"> <a href="javascript:add_image('form1.images')">上传图片</a> </td> </tr> <tr align="left" valign="top" bgcolor="#E2E2E2"> <td> </td> <td><input type="submit" name="Submit" value="提交"> <input type="reset" name="Submit2" value="重置"> <input name="Submit4" type="button" id="Submit4" onClick="mytext_all(text)" value="整理"> (<input name="checkbox" type="checkbox" value="checkbox" checked> 提交时自动整理)</td> </tr> </table> </form> </td> </tr> </table> </body> </html> <% end if %>