📄 esoft.asp
字号:
<!--#include file="html.asp"-->
<!--#include file="data.asp"-->
<%
set rs=server.createobject("adodb.recordset")
sql="select * from soft where id="&request("id")
rs.open sql,conn,3,3
if request("edit")="" then
%>
<html><head><title>修改项目</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="oa.css" rel=stylesheet>
</head>
<BODY>
<Script Language="javaScript">
function validate()
{
if (document.myform.softname.value=="")
{
alert("项目名称不能为空");
document.myform.softname.focus();
return false ;
}
if (document.myform.wctime.value=="")
{
alert("完成日期不能为空");
document.myform.wctime.focus();
return false ;
}
if (document.myform.size.value=="")
{
alert("负责人不能为空");
document.myform.size.focus();
return false ;
}
if (document.myform.content.value=="")
{
alert("内容说明不能为空");
document.myform.content.focus();
return false ;
}
if (document.myform.url.value=="")
{
alert("文件连接不能为空");
document.myform.url.focus();
return false ;
}
}
</Script>
<form method="POST" action="esoft.asp" name=myform onSubmit='return validate()'>
<div align="center"><INPUT TYPE="hidden" name="id" value="<%=rs("id")%>">
<TABLE border=1 bordercolorlight='000000' bordercolordark=#ffffff cellspacing=0 cellpadding=0
width="400" align=center>
<TR>
<TD height=20 width=60> 项目名称</TD>
<TD height=20>
<INPUT name="softname"
size=20 class="txt" value="<%=rs("name")%>">
</TD>
</TR>
<TR>
<TD height=20 width=60> 开始日期</TD>
<TD height=20>
<INPUT name="kstime"
size=20 class="txt" value="<%=rs("time")%>">格式如:2003-07-07
</TD>
</TR>
<TR>
<TD height=20 width=60> 截止日期</TD>
<TD height=20>
<INPUT name="wctime"
size=20 class="txt" value="<%=rs("time2")%>">格式如:2003-07-07
</TD>
</TR>
<tr><TD height=20 width=60> 固定提醒</TD><TD height=20> 是<INPUT TYPE="radio" NAME="tx" value="true" <%if rs("tx1")=true then response.write " checked" end if%>> 否<INPUT TYPE="radio" name="tx" value="0" <%if rs("tx1")=0 then response.write " checked" end if%>>
<select name="tixi">
<option value="1" selected <%if rs("timetx")=1 then response.write " checked" end if%>>每天一次</option>
<option value="30" <%if rs("timetx")=30 then response.write " checked" end if%>>每月一次</option>
<option value="365" <%if rs("timetx")=365 then response.write " checked" end if%>>每年一次</option>
</select> </TD>
</tr>
<tr> <TD height=20 width=60> 自定提醒</TD>
<TD height=20> 是<INPUT TYPE="radio" NAME="txz" value="true" <%if rs("tx2")=true then response.write " checked" end if%>> 否<INPUT TYPE="radio" name="txz" value="0" <%if rs("tx2")=0 then response.write " checked" end if%>>
<INPUT name="tixiz"
size=5 class="txt" value="<%=rs("timetx")%>">天
</TD>
</tr>
<tr> <td bgcolor="#EFEFEF"> 到时提醒</td><td bgcolor="#FFFFFF"> 是<INPUT TYPE="radio" NAME="txs" value="true" <%if rs("tx")=true then response.write " checked" end if%>> 否<INPUT TYPE="radio" name="txs" value="0" <%if rs("tx")=0 then response.write " checked" end if%>>
<select name="year3"> <%for i=year(rs("daoshitime1")) to year(rs("daoshitime1"))+4%> <option value="<%=i%>"><%=i%></option>
<%next%> </select> 年 <select name="month3"> <%for i=1 to 12
j="0"&i
%> <option value="<%=right(j,2)%>" <%if i=month(rs("daoshitime1")) then response.write" selected"%>><%=right(j,2)%></option>
<%next%> </select> 月 <select name="day3"> <%for i=1 to 31
j="0"&i
%> <option value="<%=right(j,2)%>" <%if i=day(rs("daoshitime1")) then response.write" selected"%>><%=right(j,2)%></option>
<%next%> </select> 日
</td></tr>
<TR>
<TD height=20 width=60> 负责人员</TD>
<TD height=20>
<INPUT name="size"
size=20 class="txt" value="<%=rs("size")%>">
</TD>
</TR>
<TR>
<TD height=20 width=60>
<div align="center">内 容<BR><BR>说 明</div>
</TD>
<TD height=20>
<TEXTAREA cols=41 name="content" rows=6 class="txt" style="overflow:auto"><%=replace(replace(rs("content"),"<br>",chr(13))," "," ")%></TEXTAREA>
</TD>
</TR>
<TR>
<TD height=20 width=60>
<div align="center"> 是否重要</div>
</TD>
<TD height=20> 是<INPUT TYPE="radio" NAME="best" value="true"<%if rs("best")=true then response.write " checked" end if%>> 否<INPUT TYPE="radio" name="best" value="0" <%if rs("best")=0 then response.write " checked" end if%>>
</TD>
</TR>
<TR>
<TD height=20 width=60>
<div align="center">是否独享</div>
</TD>
<TD height=20> 是<INPUT TYPE="radio" NAME="dx" value="0"<%if rs("dx")=0 then response.write " checked" end if%>> 否<INPUT TYPE="radio" name="dx" value="true" <%if rs("dx")=true then response.write " checked" end if%>>
</TD>
</TR>
<tr>
<TD height=20 width=60> 提交表单</TD>
<td height="16"><input type="submit" value=" 提 交 " class="txt" name="edit"> <INPUT TYPE="reset" value=" 重 置 " class="txt"></td>
</tr></table>
</div></form></body></html>
<%else
gg=mid(request("wctime"),1,4)+mid(request("wctime"),6,2)+mid(request("wctime"),9,2)
rs("name") =htmlencode2(request("softname"))
rs("content") = htmlencode2(request("content"))
rs("url") =request("url")
rs("size")=request("size")
rs("time2")=request("wctime")
rs("time3")=request("kstime")
rs("best")=request("best")
rs("dx")=request("dx")
rs("remindtime")=gg
if request("tx")="true" then
rs("tx1") =request("tx")
rs("timetx") =request("tixi")
ss=Dateadd("d",rs("timetx"),rs("time"))
rs("daoshitime1")=ss
rs("daoshitime2")=cstr(year(rs("daoshitime1")))+right("0"+cstr(month(rs("daoshitime1"))),2)+right("0"+cstr(day(rs("daoshitime1"))),2)
end if
if request("txz")="true" then
rs("tx2") =request("txz")
rs("timetx") =request("tixiz")
ss=Dateadd("d",rs("timetx"),rs("time"))
rs("daoshitime1")=ss
rs("daoshitime2")=cstr(year(rs("daoshitime1")))+right("0"+cstr(month(rs("daoshitime1"))),2)+right("0"+cstr(day(rs("daoshitime1"))),2)
end if
if request("txs")="true" then
rs("daoshitime")=request("year3")&request("month3")&request("day3")
rs("tx")=request("txs")
end if
rs.update
%>
<LINK href="oa.css" rel=stylesheet>
<script language=javascript>
opener.location=opener.location
</script>
<BODY>
<TABLE border=1 bordercolorlight='000000' bordercolordark=#ffffff cellspacing=0 cellpadding=0 align=center>
<TR>
<TD>项目已经成功修改……<BR>
<P><P><A HREF="javascript:window.close()">关闭窗口</A></TD>
</TR>
</table>
<%
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -