?? edit.asp
字號:
<%response.expires=0%>
<%Response.Buffer=true%>
<!-- #include file="../conn_lr.asp"-->
<!-- #include file="../css.asp"-->
<%
oabusyname=session("oabusyname")
oabusyusername=session("oabusyusername")
oabusyuserdept=session("oabusyuserdept")
oabusyuserlevel=session("oabusyuserlevel")
session("id")=session("oabusyname")
if oabusyusername="" then
response.write("<script language=""javascript"">")
response.write("window.top.location.href='../../default.asp';")
response.write("</script>")
response.end
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
.css0 {<%=Session("vinputtext")%> }
SELECT { font-size:12px}
</style>
<script language="JavaScript">
<!--
function CountTime()
{ //計算計劃起止日期腳本
var t= document.all.submitinput.fromYear.value +'-';
t=t + document.all.submitinput.fromMonth.value + '-';
t=t + document.all.submitinput.fromDay.value
document.all.submitinput.vtime.value=t;
}
function oninput()
{
var aa;
aa=Composition.document.body.innerHTML;
document.submitinput.vtext.value=aa;
CountTime()
rphtml('vtitle');
if (MM_validateForm('vtitle','','R','vtext','','R'))document.submitinput.submit();
}
function writeit()
{
Composition.document.body.innerHTML=document.t.texta.value;
document.submitinput.vtitle.focus();
}
//-->
</script>
<link rel="stylesheet" href="../editor/editor.asp" type="text/css">
<% '定義變量
dim toYear,toMonth,toDay,vtext,title,image
dim Number ' 當前操作記錄號
dim opFlag ' 操作標志('cmdAddNew'/'cmdEdit'/'cmdSee')
'過濾錯誤
on error resume next
'獲取輸入參數:記錄號和操作標志
Number=request("Number")
if Number="" then Number="0"
Number=Cint(Number)
opFlag=request("opFlag")
'創建記錄訪問對象
Set rs = Server.CreateObject("ADODB.Recordset")
'初始化參數
if opFlag<>"cmdAddNew" then
'打開記錄源,并定位到輸入參數決定的記錄號
rs.Open Session("SQL"),Session("conn"),1,3
rs.move number
'日期顯示變量
temptime = "" & rs("vtime")
fromYear = mid(temptime,1,4)
fromMonth = mid(temptime,6,2)
fromDay = mid(temptime,9,2)
toYear = mid(temptime,14,4)
toMonth = mid(temptime,19,2)
toDay = mid(temptime,22,2)
vtext=rs("vtext")
title="編輯事件"
else
'日期顯示變量
temptime = date()
fromYear = year(temptime)
fromMonth = right("0" & month(temptime),2)
fromDay = right("0" & day(temptime),2)
toYear = fromYear
toMonth = right("0" &( month(temptime)+1),2)
toDay = fromDay
vtext="<BLOCKQUOTE style='MARGIN-RIGHT: 0px'><P><STRONG><FONT color=#2d3d7d face=宋體 ></FONT></STRONG> </P><P><STRONG><FONT color=#2d3d7d face=宋體 >事件名稱:</FONT></STRONG></P><STRONG><FONT color=#2d3d7d face=宋體 >事件人物:</FONT></STRONG></P><P><STRONG><FONT color=#2d3d7d face=宋體 >事件內容:</FONT></STRONG></P><P><FONT color=#2d3d7d face=宋體 ><STRONG>事件結果:</STRONG></FONT></P></BLOCKQUOTE>"
title="編輯事件"
end if
image="../images/rizhi.gif"
%>
</head>
<!-- #Include file="../inc/css.asp" -->
<body leftmargin="0" topmargin="0" onLoad="javascript:InitDocument();writeit();">
<form name="submitinput" action="save.asp?opFlag=<%=(opFlag & "&Number=" & Number)%>" method="post" >
<!-- #Include file="../inc/title.asp" -->
<input type=hidden name="vtext" id="事件內容">
<table border="0" class=vtext cellspacing="1" align="center" width="95%" cellpadding="0" bgcolor="<%=Session("vtablebordercolor")%>" >
<tr bgcolor="<%=Session("vtabletitlebackcolor")%>" align="left">
<td height="30" width="13%" align="center"><b>事件日期</b></td>
<td height="30" width="87%">
<select size=1 name=fromYear>
<option value="<%=fromYear%>" selected><%=fromYear%></option>
<script language=javascript>
for(i=1900;i<2050;i++)
{
document.write("<option value="+i+">"+i+"</option>");
}
</script>
</select>
年
<select size=1 name=fromMonth>
<option value="<%=fromMonth%>" selected><%=fromMonth%></option>
<script language=javascript>
for(i=1;i<13;i++)
{
t=i.toString()
if( i<10 ) t="0" + t
document.write("<option value="+ t+">"+ t + "</option>");
}
</script>
</select>
月
<select class=p9 size=1 name=fromDay>
<option value="<%=fromDay%>" selected><%=fromDay%></option>
<script language=javascript>
for(i=1;i<32;i++)
{
t=i.toString()
if( i<10 ) t="0" + t
document.write("<option value="+ t+">"+ t + "</option>");
}
</script>
</select>
日 </td>
</tr>
<tr align="left" bgcolor="<%=Session("vtabletitlebackcolor")%>">
<td height="30" width="13%" align="center"> <b>事件標題</b></td>
<td height="30" bgcolor="<%=Session("vcolcolor")%>" width="87%"><b>
<input type="text" onKeyDown=gonext("Composition") maxlength="50" name="vtitle" size="40" class="css0" id="事件標題" style=" width=100%; height:20px;border:none" value="<%=replace(rs("vtitle"),"<br>",chr(13))%>">
</b></td>
</tr>
<tr align="left" bgcolor="<%=Session("vtabletitlebackcolor")%>">
<td colspan=2>
<!-- #include file="../editor/edit.html" -->
</td>
</tr>
</table>
<p align=center>
<button class=vinputbutton style="height=24" onClick=oninput()><img src="../images/save.gif" align="absmiddle"> 保存</button>
<button class=vinputbutton name="Submit6" style="height=24" onClick=javascript:history.go(-2);><img src="../images/back.gif" align="absmiddle"> 返回</button>
<input type="hidden" name="vtime" size="13" class=css0 value="<%=rs("vtime")%>">
</p>
</form>
<form name=t style="display:none">
<blockquote>
<p>
<textarea name=texta style="visibility: hidden" rows=1 cols=1><%=vtext%></textarea>
</p>
</blockquote>
</form>
<%
rs.close
set rs=nothing
%>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -