meetingbook_edit.asp

来自「OFFICE办公自动化」· ASP 代码 · 共 238 行

ASP
238
字号
<%
'OA 表单生成器1.0
'功能:增加会议纪要
'参数:request.form("addedit_subed")="true"#表单提交;
%>

<!--#include file="../inc/Secure.asp"-->
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/Const.asp"-->

<%
'response.buffer=false
'------------------------------------------------设置参数
LoginID=trim(session("LoginID")) : if LoginID="" then LoginID=0 '当前用户ID
currentpage=request("page") : if currentpage="" then currentpage=1 '当前页码
Search=request("Search") '上次查询条件
pid=request("id") '记录ID
'------------------------------------------------
'------------------------------------------------增加记录
table="tbioaMeetingReg" '表名
if request.form("addedit_subed")="true" then 
'表单提交后

	'接受录入参数
	input_booksubject=Request.Form("input_booksubject")'纪要主题
	input_bookbody=Request.Form("input_bookbody")'纪要内容
	input_bookdate=Request.Form("input_bookdate")'上次整理日期
	input_bookmod=Request.Form("input_bookmod")'查询范围


	'添加时使用的字段
	field1=array("booksubject","bookbody","bookdate","bookmod")
	value1=array(input_booksubject,input_bookbody,date(),input_bookmod)

	sql="UPDATE " & table & " SET "
	for i=0 to ubound(field1)
		sql = sql & field1(i) & "='" & replace(value1(i),"'","''") & "'" 
		if i <> ubound(field1) then sql=sql & ","  else  sql=sql & " where id=" & pid 
	next
	oConn.Execute sql
	
	word="<p>会议纪要修改成功!</p><p><img border=0 src=../images/icon_show.gif align=left width=16 height=16><a href=javascript:GoURL('MeetingBook_list.asp?page="&currentpage&"')>返回列表</a>"
else'--------------------------------------------取记录
	set rs=Server.CreateObject("ADODB.RecordSet")
	sql="select * from " & table & " where ID="&pid
	rs.open sql,oConn,1,1

	'显示字段变量
	if (isnull(rs("id"))) then show_id="无" else show_id=Server.HTMLEncode(rs("id"))
	if (isnull(rs("sdate"))) then show_sdate="无" else show_sdate=Server.HTMLEncode(rs("sdate"))
	if (isnull(rs("userid"))) then show_userid="无" else show_userid=Server.HTMLEncode(rs("userid"))
	if (isnull(rs("name"))) then show_name="无" else show_name=Server.HTMLEncode(rs("name"))
	if (isnull(rs("subject"))) then show_subject="无" else show_subject=Server.HTMLEncode(rs("subject"))
	if (isnull(rs("startime"))) then show_startime="无" else show_startime=Server.HTMLEncode(rs("startime"))
	if (isnull(rs("endtime"))) then show_endtime="无" else show_endtime=Server.HTMLEncode(rs("endtime"))
	if (isnull(rs("manager"))) then show_manager="无" else show_manager=Server.HTMLEncode(rs("manager"))
	if (isnull(rs("booker"))) then show_booker="无" else show_booker=Server.HTMLEncode(rs("booker"))
	if (isnull(rs("member"))) then show_member="无" else show_member=Server.HTMLEncode(rs("member"))
	if (isnull(rs("caption"))) then show_caption="无" else show_caption=Server.HTMLEncode(rs("caption"))
	if (isnull(rs("areamod"))) then show_areamod="无" else show_areamod=Server.HTMLEncode(rs("areamod"))
	if (isnull(rs("roomid"))) then show_roomid="无" else show_roomid=Server.HTMLEncode(rs("roomid"))
	if (isnull(rs("area"))) then show_area="无" else show_area=Server.HTMLEncode(rs("area"))
	if (isnull(rs("booksubject"))) then show_booksubject="无" else show_booksubject=Server.HTMLEncode(rs("booksubject"))
	if (isnull(rs("bookbody"))) then show_bookbody="无" else show_bookbody=Server.HTMLEncode(rs("bookbody"))
	if (isnull(rs("bookdate"))) then show_bookdate="无" else show_bookdate=Server.HTMLEncode(rs("bookdate"))
	if (isnull(rs("bookmod"))) then show_bookmod="无" else show_bookmod=Server.HTMLEncode(rs("bookmod"))

end if
'------------------------------------------------
%>


<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/main.css" type=text/css>
<title>main</title>
<script src="../js/Popup.js"></script>
<script src="../js/front_chec.js"></script>
<script src="../js/user_select.js"></script>
<script language="JavaScript">
<!--
 function require(form){
	1==1;
 }
-->
</script>
</head>

<body topmargin="10" leftmargin="10">

<!--#include file="MeetingBook_menu.html"-->

<hr width="100%" size=1 color="#000000">
<br>
<%=SearchScrip(Search)%>
<div align="center">
<table width="500" cellspacing="1" cellpadding="2" class="tab">
  <tr>
    <td width="100%" class="tdTop">
      <table border="0" width="100%" cellspacing="0" cellpadding="0">
        <tr>
          <td class="tdTop">
            <p align="left"><img border="0" src="../images/icon_title.gif" align="left">编辑会议纪要</p>
          </td>
          <td width="90" class="tdTop">
            <p align="left"><img border="0" src="../images/icon_return.gif" align="left">  
            <a href=javascript:GoURL('MeetingBook_list.asp?page=<%=currentpage%>') class="linkTop">返回列表</a>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td width="25%" class="td1">
    
    <% if request.form("addedit_subed")="true" then %>
      <table border="0" width="100%" cellspacing="10" cellpadding="0">
        <tr>
          <td width="36%">
            <p align="right"><img border="0" src="../images/edit.gif" width="32" height="32">
          </td>
          <td width="64%"><p> </p>
            <%=word%>
          </td>
        </tr>
        <tr>
          <td width="100%" colspan="2">
          </td>
        </tr>
      </table> 
    <% else %>
    <form name="eventfrm" method="POST" action="" onSubmit="return require(this)">
      <input type=hidden name="addedit_subed" value="true">
      <table border="0" width="500" cellspacing="10" cellpadding="0">
        <tr>
          <td width="88" align="right" valign="top" nowrap>纪要主题:</td>
          <td width="392" nowrap colspan="3"><input type="text" name="input_booksubject" value="<%=show_booksubject%>" size="40" maxlength="250" class="input">
          </td>
        </tr>
        <tr>
          <td width="88" align="right" valign="top" nowrap height="15">纪要内容:</td>
          <td width="392" nowrap colspan="3" height="15">
            <textarea name="input_bookbody" rows="5" cols="47" class="textarea"><%=show_bookbody%></textarea>
          </td>
        </tr>
        <tr>
          <td width="88" align="right" nowrap height="40">查询范围:</td>
	  <td nowrap>
		<select name=input_bookmod>
			<option value="0" <%=selected("0",show_bookmod)%>>参与人、书记员</option>
			<option value="1" <%=selected("1",show_bookmod)%>>全部人员</option>
		</select>
          </td>
          <td align="right" nowrap>上次整理日期:
          </td>
          <td nowrap><input TYPE="TEXT" SIZE="12" MAXLENGTH="12" NAME="input_bookdate" value="<%=show_bookdate%>" class="inputreadonly" readonly>
          </td>
        </tr>
        <tr>
          <td width="492" colspan="4">
           <input type="submit" value="确定" name="B1" class="button0" onmouseout=className="button0" onmouseover=className="button1"> <input type="reset" value="全部重写" name="B2" class="button0" onmouseout=className="button0" onmouseover=className="button1">
          </td>
        </tr>
      </table>
    <hr width="100%" size=1 color="#000000">
      <table border="0" width="500" cellspacing="10" cellpadding="0">
        <tr>
          <td width="88" align="right" valign="top" nowrap>会议名称:</td>
          <td width="392" nowrap colspan="3"><input type="text" name="input_name" value="<%=show_name%>" size="49" maxlength="250" class="inputreadonly" readonly>   
          </td>
        </tr>
        <tr>
          <td width="88" align="right" valign="top" nowrap>会议主题:</td>
          <td width="392" nowrap colspan="3"><input type="text" name="input_subject" value="<%=show_subject%>" size="49" maxlength="250" class="inputreadonly" readonly>
          </td>
        </tr>
        <tr>
          <td width="88" align="right" valign="top" nowrap>开始时间:</td>
          <td nowrap><input TYPE="TEXT" SIZE="12" MAXLENGTH="12" NAME="input_startime" value="<%=show_startime%>" class="inputreadonly" readonly>
          </td>
          <td nowrap align="right">结束时间:
          </td>
          <td nowrap><input TYPE="TEXT" SIZE="12" MAXLENGTH="12" NAME="input_endtime" value="<%=show_endtime%>" class="inputreadonly" readonly> 
          </td>
        </tr>
        <tr>
          <td width="88" align="right" valign="top" nowrap>会议主持:</td>
          <td nowrap><input type="text" name="input_manager" value="<%=show_manager%>" size="19" maxlength="250" class="inputreadonly" readonly>
          </td>
          <td nowrap align="right">书记员:
          </td>
          <td nowrap>
            <input type="text" name="input_booker_name" value="<%=getusername(show_booker)%>" size="12" maxlength="250" class="inputreadonly" readonly>
          </td>
        </tr>
        <tr>
          <td width="88" align="right" valign="top" nowrap>参与人:</td>
          <td width="392" nowrap colspan="3">
            <input type="text" name="input_member_name" value="<%=getusernames(show_member,",")%>" size="48" maxlength="250" class="inputreadonly" readonly>
          </td>
        </tr>
        <tr>
          <td width="88" align="right" valign="top" nowrap>会议说明:</td>
          <td width="392" nowrap colspan="3"><textarea name="input_caption" rows="5" cols="47" class="textarea" readonly><%=show_caption%></textarea>
          </td>
        </tr>
        <tr>
          <td width="88" align="right" nowrap>会议地点:</td>
          <td width="392" nowrap colspan="3">
		<table><tr><td>
		<input type="text" name="input_member_name" value="<%=show_areamod%> —" size="5" maxlength="250" class="inputreadonly" readonly>
		<td>
		<input type="text" name="input_area" value="<%=show_area%>" size="39" maxlength="250" class="inputreadonly" readonly <%if show_areamod="内部" then response.write "style='display:none'"%>>
		<input type="text" name="input_roomid" value="<%=HtmlOut(GetTableValue("tbioaMeetingRoom","name","id",rs("roomid")))%>" size="39" maxlength="250" class="inputreadonly" readonly <%if show_areamod="外部" then response.write "style='display:none'"%>>
		</tr></table>
          </td>
        </tr>
      </table>
    </form>
    <% end if %>
    
    </td>
  </tr>
  <tr>
    <td width="25%" class="tdBottom">
    </td>
  </tr>
</table>
</div>
</body>

</html>

<%'释放对象变量
oConn.close
%> 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?