📄 diary_edit.asp
字号:
<!--#include file="../article/inc/articlechar.inc"-->
<%
Dim DiaryID,DiaryTopic,DiaryMood,DiaryWeather,DiaryBody
AccountID= Session("u_id")
If Request.QueryString("Mod") = "Edit" Then
DiaryID = cint(Request.QueryString("ID"))
Set Rs = Server.CreateObject("ADODB.RecordSet")
SQLStr = "Select Topic,Weather,Mood,Body From diary Where ID = " & DiaryID & " And AccountID = " & Session("u_id")
Rs.open SQLStr,conn,1,1
If Rs.Eof Then
Response.Write "没有权限或者该日记已经被删除"
Response.End
End If
DiaryTopic = Rs("Topic")
DiaryMood = Rs("Mood")
DiaryWeather = Rs("Weather")
DiaryBody = Rs("Body")
DiaryBody=replace(DiaryBody,"<br>",chr(13))
DiaryBody=replace(DiaryBody," "," ")
Else
DiaryTopic = ""
DiaryMood = ""
DiaryWeather = ""
DiaryBody = ""
End If
%>
<Script Language="Javascript" Src="inc/JS_CheckForm.asp">
</script>
<script Language="JavaScript">
<!--
function submitonce(theform){
if (document.all||document.getElementById){
//screen thru every element in the form, and hunt down "submit" and "reset"
for (i=0;i<theform.length;i++){
var tempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
tempobj.disabled=true}
}
}
function CheckAll()
{
//检查非空
if (!CheckEmpty(theForm.Topic, "日记标题")) return false;
if (!CheckEmpty(theForm.Weather, "天气")) return false;
if (!CheckEmpty(theForm.Mood, "心情")) return false;
if (!CheckEmpty(theForm.Body, "日记内容")) return false;
//全部通过
submitonce(theForm)
return true;
}
-->
</script>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="100%" background="images/bg2.gif">
<tr>
<td height="1" colspan=3 bgcolor="#E32D3F"></td>
</tr>
<tr>
<td colspan="3" height="30" class="titletext">
心情日记</td>
</tr>
<tr>
<td height="1" colspan=3 background="images/hline.gif"></td>
</tr>
<tr>
<td>
<div align="center">
<table border="0" cellpadding="0" width="100%" height=100% bordercolor="#FFECEC" cellspacing="0">
<form name=theForm method="POST" onsubmit="return(CheckAll());" action="H_Diary_EditDo.asp?ID=<%=DiaryID%>&AccountID=<%=AccountID%>&Mod=<%=Request.QueryString("Mod")%>">
<tr>
<td colspan="3" height=30>
标题:<input type="text" name="Topic" size="50" value = "<%=DiaryTopic%>" class="put" maxlength="50"></td>
</tr>
<tr>
<td height=30></td>
<td>天气:<input type="text" name="Weather" size="20" value = "<%=DiaryWeather%>" class="put" maxlength="20"> </td>
<td>心情:<input type="text" name="Mood" size="20" value = "<%=DiaryMood%>" class="put" maxlength="20"></td>
</tr>
<tr>
<td height=100% bordercolorlight="#FF9900" bordercolordark="#FF9900" colspan="3">
<table border="0" cellpadding="2" width="100%" height="100%">
<tr>
<td width="100%" valign=top align=center>
<textarea rows="12" name="Body" cols="54" class="put"><%=DiaryBody%></textarea>
<input type="submit" value=" 提交 " name="B1" class="put1"> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3" height=5>
<p align="center"></td>
</tr>
</table>
</form>
</div>
</td>
<td height="1" background="images/vline.gif"></td>
<td width="150" valign=top align="center"><img src=images/home_index_diary.jpg width=150 height=150>
<p> <a href=list_diary.asp?AccountID=<%=AccountID%>>日记首页</a><br>
<br>
</td>
</tr>
<tr>
<td bgcolor="#FF9900" colspan="3" height="1" background="images/hline.gif"></td>
</tr>
</table>
</div>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -