📄 modify_dish.asp
字号:
<!--#INCLUDE FILE="articleCHAR.INC" -->
<%
if Session("user_id")="" then
response.write "请您先<a href=entry.asp>登录</a>!"
response.end
end if
dim rs
set rs = server.Createobject("ADODB.recordset")
rs.open "Select * from t_dish where dish_id="& request("id") &"",Application("Connect_String"),3,2
if request("B1") = "提交" then
if request("dish_title")="" then
response.write "标题不允许为空"
response.end
end if
rs.update
rs("dish_title")=htmlencode2(request("dish_title"))
rs("dish_use1")=htmlencode2(request("dish_use1"))
rs("dish_use2")=htmlencode2(request("dish_use2"))
if request("img")<>"no" then rs("dish_image").appendchunk session("imgdata")
rs("dish_date")=now()
rs.update
Response.Write "<br><br><center>操作成功!是否继续增加?"
Response.write "<br><br><center><input type=button value="" 是 "" onclick=location.href=""input_dish_img.asp""> <input type=button value="" 否 "" onclick=location.href=""admin.asp"">"
Response.end
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>珠海宾馆管理系统</title>
<link rel=stylesheet type=text/css href=../style.css>
</head>
<body>
<div align="center">
<center>
<form method="POST" action="modify_dish.asp?id=<%=request("id")%><%if request("img")="no" then%>&img=<%=request("img")%><%end if%>">
<table border="0" cellpadding="2">
<tr>
<td valign="top" rowspan="3"><%if request("img")="no" then%><img border="0" src="ShowImage.asp?id=<%=request("id")%>"><%else%><img src=getimg.asp><%end if%></td>
<td valign="top">标题:</td>
<td><input type="text" name="dish_title" size="41" value="<%if rs("dish_title") <> "" then
tempstr=replace(rs("dish_title"),"<br>",chr(13))
tempstr=replace(tempstr," "," ")
response.write tempstr
end if%>"></td>
</tr>
<tr>
<td valign="top">特点:</td>
<td><textarea rows="4" name="dish_use1" cols="40"><%if rs("dish_use2") <> "" then
tempstr=replace(rs("dish_use2"),"<br>",chr(13))
tempstr=replace(tempstr," "," ")
response.write tempstr
end if%></textarea></td>
</tr>
<tr>
<td valign="top">功效:</td>
<td><textarea rows="3" name="dish_use2" cols="40"><%if rs("dish_use2") <> "" then
tempstr=replace(rs("dish_use2"),"<br>",chr(13))
tempstr=replace(tempstr," "," ")
response.write tempstr
end if%></textarea></td>
</tr>
<tr>
<td colspan="3">
<p align="center"><input type="submit" value="提交" name="B1"><input type="reset" value="重写" name="B2"><input type=button value="返回" onclick=location.href="admin.asp"></td>
</tr>
</table>
</form>
</center>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -