📄 worklogedit.asp
字号:
<!--#include file="conn.asp" -->
<%
if request.Form("submit")="修改" then
id =request("id")
if id="" and not isnumeric(id) then
id=0
end if
sql="select * from [summary] where id="&ID
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,3
rs("title")=request("title")
rs("summary")=TxtShift(request("summary"))
rs("plan")=TxtShift(request("plan"))
rs("loginID")=session("loginID")
rs("IP")=getIP()
rs.update
rs.close
%>
<script>
alert("修改成功");
location.href="worklog.asp";
</script>
<%
response.end
end if
id =request("id")
if id="" and not isnumeric(id) then
id=0
end if
sql="select * from [summary] where id="&ID
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
%>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<TITLE>办公自动化系统</TITLE>
<link href="skins/css/main.css" rel="stylesheet" type="text/css" />
</head>
<body>
<%
if not rs.eof then
if formatdatetime(now,vbshortdate)=formatdatetime(rs("insertTime"),vbshortdate) then
if session("loginID")=rs("loginID") then
%>
<table border="0" cellpadding="3" cellspacing="1" width="100%" align=center>
<form action="" method=post>
<tr>
<th colspan="2">修改工作日志</th>
</tr>
<tr>
<td width=20% class="td2">日志标题:</td>
<td width=80% class=td1 colspan=5><input name="title" type=text id="title" size=45 value="<%=rs("title")%>"></td>
</tr>
<tr>
<td width="20%" height="23" class="td2">今日工作总结:</td>
<td width="80%" class=td1><textarea name="summary" cols="45" rows="6" id="summary"><%=ReTxtShift(rs("summary"))%></textarea></td>
</tr>
<tr>
<td width="20%" height="23" class="td2">明日工作计划:</td>
<td width="80%" class=td1><textarea name="plan" cols="45" rows="6" id="plan"><%=ReTxtShift(rs("plan"))%></textarea></td>
</tr>
<tr>
<th style="text-align:center;" colspan="2"><input name="submit" type=submit class="button" value="修改"></th>
</tr>
</form>
</table>
<%
else
response.Write("无权修改非本人工作日志")
end if
else
response.Write("已过期")
end if
end if
rs.close
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -