www.gusucode.com > 艺帆全站DIV+CSS体育用品公司网站源码 1.7.5源码程序 > i5808/xiugai_flash.asp
<!--#include file="../Conn.asp" --> <!--#include file="seeion.asp"--> <% id=request.QueryString("id") if id="" or not isnumeric(id) then Response.Write "<script>alert('参数错误!');history.go(-1);</script>" Response.End() end if exec="select * from flash where id="& id set rs=server.createobject("adodb.recordset") rs.open exec,conn,1,1 if rs.eof and rs.bof then Response.Write "<script>alert('参数不正确,ID值不存在!');history.go(-1);</script>" Response.End() end if %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" id="css" href="images/style.css"> <title>修改幻灯</title> <SCRIPT language=JavaScript src="../js/digital.js" type=text/javascript ></SCRIPT> </head> <body> <form name="add" method="post" action="updata_flash.asp"> <table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" > <tr> <td height="30" background="images/bg_list.gif"><div style="padding-left:10px; font-weight:bold; color:#0075a9">修改幻灯</div></td> </tr> <tr> <td bgcolor="#FFFFFF"><%if session("qx")=2 then%><table width="100%" border="0" align="center" cellpadding="5" cellspacing="0" > <tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#F1F5F8'" bgcolor="#F1F5F8" > <td height="28" width="16%" class="td">名称</td> <td width="84" colspan="2" class="td"> <input name="title" type="text" value="<%=rs("title")%>" size="30" /> <input name="id" type="hidden" value="<%=rs("id")%>" size="30" /></td> </tr> <tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#FFFFFF'" bgcolor="#FFFFFF"> <td height="30" class="td">图片地址</td> <td bgcolor="#FFFFFF" class="td"><input name="img" type="text" id="img" value="<%=rs("img")%>" size="30" maxlength="200" /></td> <td bgcolor="#FFFFFF" class="td"><iframe style="top:2px" id="UploadFiles" src="upload_Photo.asp?PhotoUrlID=0" frameborder="0" scrolling="No" width="320" height="25"></iframe></td> </tr> <tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#F1F5F8'" bgcolor="#F1F5F8"> <td height="25" width="16%" class="td">链接地址</td> <td colspan="2" class="td"><input name="link" type="text" value="<%=rs("link")%>" size="30" /> 空链接请用#号</td> </tr> <tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#FFFFFF'" bgcolor="#FFFFFF"> <td height="25" class="td">排序ID</td> <td colspan="2" class="td"><input name="px_id" type="text" value="<%=rs("px_id")%>" size="10" onKeyPress="event.returnValue=IsDigit();" /></td> </tr> <tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#F1F5F8'" bgcolor="#F1F5F8"> <td height="25" class="td"> </td> <td colspan="2" class="td"><input type="submit" name="button" id="button" value="确认修改" class="btn"/></td> </tr> </table> <%else%> <div style=" padding:20px;font-size:14px; color:#990000; font-weight:bold; text-align:center">您没有权限操作!</div> <%response.end end if%></td> </tr> </table></form> </body> </html> <% if Request.QueryString("add_flash")="ok" then set rs=server.createobject("adodb.recordset") sql="select title,link,img,px_id,tim from flash" rs.open sql,conn,1,3 title=request.form("title") link=request.form("link") img=request.form("img") px_id=request.form("px_id") if title="" then response.Write("<script language=javascript>alert('广告标题不能为空!');history.go(-1)</script>") response.end end if if link="" then response.Write("<script language=javascript>alert('链接地址不能为空!');history.go(-1)</script>") response.end end if if img="" then response.Write("<script language=javascript>alert('图片地址不能为空!');history.go(-1)</script>") response.end end if if px_id="" then response.Write("<script language=javascript>alert('排序ID不能为空!');history.go(-1)</script>") response.end end if IF not isNumeric(request("px_id")) then response.write("<script>alert(""排序ID必须为数字!""); history.go(-1);</script>") response.end end if rs.addnew rs("title")=title rs("link")=link rs("img")=img rs("px_id")=px_id rs.update rs.close set rs=nothing conn.close set rs=nothing Response.Write "<script>alert('广告添加成功!点击继续添加!');window.location.href='add_flash.asp';</script>" end if %>