?? photoedit.asp
字號:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="session.asp" -->
<!--#include file="conn.asp" -->
<%
if request.Form("method")="submit" then
phototitle=trim(request.Form("phototitle"))
photocomment=trim(request.Form("photocomment"))
photoid=trim(request.Form("id"))
set rs1=server.CreateObject("adodb.recordset")
sql1="select * from photo where photoid="&photoid
rs1.open sql1,conn,3,3
rs1("phototitle")=phototitle
rs1("photocomment")=photocomment
rs1.update
rs1.close
set rs1=nothing
response.Redirect("photo.asp")
end if
photoid=request.QueryString("id")
'response.Write(photoid)
set rs=server.CreateObject("adodb.recordset")
sql="select * from photo where photoid="&photoid
rs.open sql,conn,1,1
phototitle=trim(rs("phototitle"))
photocomment=trim(rs("photocomment"))
photoid=trim(rs("photoid"))
formPath="upload"
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=classname%>同學(xué)錄</title>
<link href="css/class.css" type=text/css rel=stylesheet>
<script language="JavaScript">
<!--
function checkform(){
if (document.form1.phototitle.value.length==0){
alert("圖片標題不能為空!");
document.form1.phototitle.focus();
return false;
}
if (document.form1.photocomment.value.length>200) {
alert("您發(fā)表的留言大于所規(guī)定字數(shù)!");
document.form1.photocomment.focus();
return false;
}
return true
}
//-->
</script>
</head>
<body background="images/1.GIF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="776" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3"><img src="images/top_t.gif" width="776" height="43"></td>
</tr>
<tr>
<td width="138"><img src="images/top_l.gif" width="138" height="39"></td>
<td width="584" bgcolor="#666B52"> </td>
<td width="54"><img src="images/top_r.gif" width="54" height="39"></td>
</tr>
<tr>
<td colspan="3"><table width="776" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="120" valign="top" background="images/left_x.gif"><img src="images/left_img.gif" width="120" height="480"></td>
<td valign="top" bgcolor="#F2F2EA"> <div align="center">
<!--#include file="top.asp" -->
</div>
<table width="618" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> <div align="center"><br>
<!--#include file="left.asp" -->
</div>
</td>
<td width="10"> </td>
<td width="418" valign="top"><table width="400" border="0" align="center" cellpadding="2" class="font1">
<tr>
<td width="459">你的位置><a href="index.asp"><%=classname%>同學(xué)錄</a>>編輯圖片</td>
<td width="27"> </td>
</tr>
</table>
<div align="center">
<table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><table width="400" border="0" cellpadding="0" cellspacing="0" background="images/gnymtbz.gif">
<tr>
<td width="135"><img src="images/tpsc.gif" width="135" height="36"></td>
<td> </td>
<td width="100"><img src="images/gnymtyb.gif" width="100" height="36"></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="400" border="0" cellpadding="0" cellspacing="0" background="images/n_bk.gif">
<tr>
<td align="center"><form action="photoedit.asp" method="post" name="form1" onSubmit="return checkform()">
<table width="400" border="0" align="center" cellpadding="2" cellspacing="1">
<tr>
<td width="96"> </td>
<td width="293"><div align="left"><img src="<%=formPath%>/<%=rs("photoname")%>" width="150" height="150" border="0"></div></td>
</tr>
<tr>
<td><div align="right">標題:</div></td>
<td><input name="phototitle" type="text" height="20"id="phototitle" value="<%=rs("phototitle")%>" size="36"></td>
</tr>
<tr>
<td valign="top"> <div align="right">說明:</div></td>
<td><textarea name="photocomment" cols="40" rows="7" id="textarea3"><%=rs("photocomment")%></textarea></td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input name="method" type="hidden" id="method" value="submit">
<input name="id" type="hidden" id="id" value="<%=photoid%>">
<input name="Submit3" type="submit" value="更新">
<input type="reset" name="Submit22" value="重置">
</div></td>
</tr>
</table>
</form></td>
</tr>
</table></td>
</tr>
<tr>
<td><img src="images/n_foot.gif" width="400" height="10"></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
<td width="38" valign="top" background="images/right_b.gif"><img src="images/right_b.gif" width="38" height="5"></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="3"><img src="images/z_f.gif" width="776" height="26"></td>
</tr>
</table>
<div align="center"></div>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -