📄 addrelative.asp
字号:
<!--#include file="../inc/Secure.asp"-->
<!--#include file="../inc/connection.asp"-->
<!--#include file="../inc/def_color.asp"-->
<!--#include file="verson.asp"-->
<%
SelectDate=trim(request("SelectDate"))
if SelectDate="" then SelectDate=date()
StartTime=SelectDate
PlanID=trim(request("planid"))
LoginID=trim(session("LoginID"))
if LoginID="" then response.end
UserName=GetTableValue ("tblUser","Name","ID",LoginID)
if Request("cmdUp")<>"" then
Title=replace(trim(request("Title")),"'","''")
Body=replace(trim(request("Body")),"'","''")
if Title="" then errTitle="<img src='../images/error.gif' border=0 height=15 alt='必须输入该项'>"
if Body="" then errBody="<img src='../images/error.gif' border=0 height=15 alt='必须输入该项'>"
if title<>"" then
AddPlanRelative()
response.write "<h3><font FACE=Verdana>Event Added!(注释安排已经成功添加!)</font></h3><BR>谢谢!<BR><BR>"
response.write "<a href=plan.asp?SelectDate="&SelectDate&"><img src='../images/return.gif' border=0></a><BR>"
response.end
end if
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../css/main.css">
</head>
<body BGCOLOR="FFFFFF">
<p ALIGN="center">添加注释</p>
<form NAME="eventfrm" ACTION="<%=Request.ServerVariables("SCRIPT_NAME") %>" METHOD="POST">
<table CELLSPACING="1" CELLPADDING="1" border=0 WIDTH="100%" bgcolor="<%=bgcolor%>">
<tr>
<td VALIGN="TOP" ALIGN="LEFT" WIDTH="20%"><b>注释日期</b>
<font COLOR="RED">*</td>
<td VALIGN="TOP" ALIGN="LEFT" WIDTH="80%">
<input class="input" TYPE="TEXT" SIZE="12" MAXLENGTH="12" NAME="StartTime" value="<%=date()%>" readonly>
</td>
</tr>
<tr>
<td VALIGN="TOP" ALIGN="LEFT"><b>注释标题</b>
<font COLOR="RED"><i>*</i></td>
<td VALIGN="TOP" ALIGN="LEFT"><input class="input" TYPE="TEXT" SIZE="30" MAXLENGTH="40" NAME="Title" value="<%=Title%>">
<%=errTitle %></td>
</tr>
<tr>
<td VALIGN="TOP" ALIGN="LEFT"><b>注释内容</b>
<font COLOR="RED">*</td>
<td VALIGN="TOP" ALIGN="LEFT">
<textarea COLS="48" ROWS="5" NAME="Body" WRAP="PHYSICAL"><%=body%>
</textarea>
<%=errBody %>
</td>
</tr>
<INPUT TYPE="hidden" name="planid" value="<%=planid%>">
<tr bgcolor=#ffffff>
<td colspan=2 align=center>
<INPUT TYPE="submit" name="cmdUp" value="提 交" class=boldwhite>
<INPUT TYPE="reset" name="reset1" value="重 置" class=boldwhite>
</td>
</tr>
</table>
<BR>
</form>
<a href="plan.asp?selectdate=<%=selectdate%>"><img src="../images/return.gif" border=0></a>
</body>
</html>
<%
sub AddPlanRelative()
sql=" INSERT INTO tblPlanRelative(AddID, PlanID, Title,Body) VALUES(" & LoginID & _
","& PlanId & _
",'"& Title & _
"','"& Body & _
"');"
Conn.execute (sql)
end sub
Function GetTableValue(TableName,Field,ValueField,Value)
if TableName<>"" and Value<>"" then
Set RsTmp = Server.Createobject("Adodb.recordset")
strSql = "Select "& Field &" from "& TableName &" where "& ValueField &"='"& Value &"'"
Rstmp.open strSql,Conn,1,1
If not Rstmp.eof then
GetTableValue=trim(Rstmp(Field))
else
GetTableValue=""
end if
Rstmp.close
'set RsTmp = Nothing
else
GetTableValue=""
end if
End Function
%>
<!--#include file="../inc/connclose.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -