?? edit.asp
字號:
<!--#include file="../includes/db.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>WebOffice</title>
<%
call insureID()
if session("POSITION_ID")>3 then
call noRight()
end if
%>
<script language="JavaScript">
function validate(){
var Title = document.FormAdd.Title.value;
var Content = document.FormAdd.Content.value;
if ( Title==""){
alert("標題不能為空!");
return false;
}
if (Content==""){
alert("內容不能為空!");
return false;
}
}
</script>
</head>
<body>
<center>
<table border="0" width="100%" height="50" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"></td>
</tr>
</table>
<%
dim NOTICE_TITLE
dim NOTCIE_CONTENT
dim NOTICE_ID
NOTICE_ID=request("NOTICE_ID")
if NOTICE_ID="" then
call trigErr()
end if
sql="SELECT * " _
&"FROM Notice WHERE (NOTICE_ID = "&request("NOTICE_ID")&") "
call openDB()
rs.open sql,conn,1,1
if rs.eof then
call closeDB()
call trigErr()
end if
NOTICE_TITLE=rs("NOTICE_TITLE")
NOTICE_CONTENT=rs("NOTICE_CONTENT")
NOTICE_TITLE=replaceBack(NOTICE_TITLE)
NOTICE_CONTENT=replaceBack(NOTICE_CONTENT)
call closeDB()
%>
<form method="POST" name="FormAdd" action="save.asp?action=Edit&Notice_id=<%=request("NOTICE_ID")%>" onSubmit="return validate()">
<table width="75%" border="0" cellpadding="0" cellspacing="1" bgcolor="#5A8BCE">
<tr>
<td width="65%" bgcolor="#E6F7FF" height="35" align=center><b><font color="#000000">編輯資訊</font></b></td>
</tr>
</table>
<table width="75%" border="0" cellpadding="0" cellspacing="1" bordercolorlight="#EFEFEF" bordercolordark="#FCFCFC" bgcolor="#5A8BCE">
<tr>
<td width="20%" bgcolor="#FCFCFC" align=right>標 題:</td>
<td width="55%" bgcolor="#FCFCFC"> <input type="text" name="Title" size="61"
value="<%=NOTICE_TITLE%>">
</td>
</tr>
<tr>
<td width="20%" valign="top" bgcolor="#FCFCFC" align=right>內 容:</td>
<td width="55%" bgcolor="#FCFCFC"> <textarea rows="15" name="Content" cols="60" wrap="VIRTUAL">
<%=NOTICE_CONTENT%>
</textarea>
</td>
</tr>
<td width="20%" height="30" bgcolor="#FCFCFC" align=right>發布者:</td>
<td width="55%" height="30" bgcolor="#FCFCFC">
<%
response.write " "&session("NAME")
if session("POSITION_ID")=1 then
response.write " 審核 "
response.write "<input type=""checkbox"" name=""Comfirmed"" value=""YES"">"
end if
%>
</td>
<tr>
<td width="75%" height="50" colspan="2" bgcolor="#EFEFEF" align="center">
<input type="submit" value="添 加" name="Submit" class="buttonface">
<input type="reset" value="清 除" name="Clear" class="buttonface">
</td>
</tr>
</table>
</form>
</center>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -