⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 templateedit.asp

📁 OFFICE办公自动化
💻 ASP
字号:
<%
'功能:编辑模板
%>
<!--#include file="../inc/Secure.asp"-->
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/Const.asp"-->
<%
  Response.buffer=true
  stype=request("type") '报表类别
  mScriptName="TemplateEdit.asp"
  mServerName="../inc/OfficeServer.asp"
  mClientName="iWebOffice2003.ocx#version=6,4,0,4"
  mHttpUrl="http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")
  mHttpUrl=Left(mHttpUrl,Len(mHttpUrl)-Len(mScriptName))
  mServerUrl=mHttpUrl & mServerName
  mClientUrl=mHttpUrl & mClientName

  mRecordID=Request("RecordID")
  mFileType=Request("FileType")
  mEditType="1"
  mUserName="Administrator"


  '取得模式
  if ( mEditType="") then
    mEditType="1"		' 0 显示  1 起草 2 批改 3 审核
  end if

  '取得类型
  if ( mFileType="") then
    mFileType=".doc"	' 默认为.doc文档
  end if

  '取得用户名
  if (mUserName="") then
    mUserName="匿名用户"
  end if

  session("UserName")=mUserName

  '取得编号
  if ( mRecordID="") then
     mRecordID=""	'编号为空
  end if


  mSql="Select * From tbioaOffice_Template Where RecordID='"+ mRecordID + "'"
  Set TbMainRs=Server.CreateObject("ADODB.RecordSet")
  TbMainRs.Open mSql,oconn,1,3
  If Not TbMainRs.Eof then
        mRecordID=TbMainRs("RecordID")
        mFileName=TbMainRs("FileName")
        mFileType=TbMainRs("FileType")
        mDescript=TbMainRs("Descript")
        mLCBH=TbMainRs("LCBH")
'  else
'	'取得唯一值(mRecordID)
'        mRecordID=Session.SessionID&minute(now())&Second(now())	'保存的是文档的编号,通过该编号,可以在里找到所有属于这条纪录的文档
'	mFileName="报表模版"+mFileType
'        mFileType=mFileType
'	mDescript="发文报表模版"
  end if
  TbMainRs.Close
  Set TbMainRs=Nothing

%>
<html>
<head>
<title>iWebOffice2003</title>
<link rel='stylesheet' type='text/css' href='../css/main.css'>
<script src="../js/iweboffice_template_func.js" type="text/javascript"></script>
<script language=javascript>
function Load(){
  try{
  webform.WebOffice.WebUrl="<%=mServerUrl%>";
  webform.WebOffice.RecordID="<%=mRecordID%>";
  webform.WebOffice.Template="<%=mRecordID%>";
  webform.WebOffice.FileName="<%=mFileName%>";
  webform.WebOffice.FileType="<%=mFileType%>";
  webform.WebOffice.EditType="<%=mEditType%>";
  webform.WebOffice.UserName="<%=mUserName%>";
  webform.WebOffice.WebOpen();  	//打开该文档
  StatusMsg(webform.WebOffice.Status);
  }catch(e){}
}
</script>
</head>
<body bgcolor="#ffffff" onload="Load()" onunload="UnLoad()">

<form name="webform" method="post" action="TemplateSave.asp" onsubmit="return SaveDocument();">
  <input type=hidden name=RecordID value="<%=mRecordID%>">
  <input name="type" type="hidden" id="type" value="<%=stype%>">
  <table border=0  cellspacing='1' cellpadding='2' width=100% height=100% align=center class=tab>
    <tr>
      <td class="TdTop2" width="100%" colspan=2 nowrap>模版名:<input type=text name=FileName value="<%=mFileName%>" class="input">
        说明:<input type=text name=Descript value="<%=mDescript%>" class="input" >
        指定流程:
              <select name="LCBH">
                <option value='0'>自定义流程</option>
                <%
		set Rstmp=server.createobject("adodb.recordset")
		str = "select * from tbioaOffice_Flow_TemplateName order by LCBH"
		Rstmp.open str,oConn,1,1
		while not Rstmp.eof
			if Rstmp("LCBH")=mLCBH then
			  response.write "<option value="&Rstmp("LCBH")&" selected>"&server.htmlencode(trim(Rstmp("LCMC"))) & vbcrlf
			else
			  'response.write "<option value="&Rstmp("LCBH")&">"&server.htmlencode(trim(Rstmp("LCMC"))) & vbcrlf
			end if
			Rstmp.MoveNext
		wend
		Rstmp.close
		set Rstmp=nothing
                %>
              </select>
      </td>
    </tr>
    <tr>
      <td colspan=2 class="TD1">操作:
            <input name="submit" type=submit value="  保存  " class=button0 >
	<%if ( mFileType=".doc") then%>
            <!--input type=button value="标签管理"  onclick="WebOpenBookMarks()" class=button0-->
	<%end if%>
            <!--input name="reset" type=reset value="  清除  " class=button0-->
            <!--input name="button4" type=button onClick="LoadBookmarks()" value="  填充模板  " class=button0-->
            <input name="button3" type=button onClick="window.close()" value="  关闭  " class=button0 >
            <br>
            <font color="#FF0000">注意:只有选择《保存》后,所做的操作才有效! </font>
      </td>
    </tr>
    <tr>
      <!--td align=right valign=top  class="TDTitleStyle" width=64>内容</td-->
      <td colspan=2 class="TD1" height=100%>
            <table border=0 cellspacing='0' cellpadding='0' width='100%' height='100%' >
            <tr>
              <td height="28">
                <iframe id="toolbar" src="../inc/toolbar_template.asp" frameBorder="0" width="100%" height="28" marginHeight="0" marginWidth="0" scrolling="no"></iframe>
              </td>
            </tr>
            <tr>
              <td bgcolor=menu >
                <OBJECT id="WebOffice" width="100%" height="100%" classid="clsid:23739A7E-5741-4D1C-88D5-D50B18F7C347" codebase="<%=mClientUrl%>" >
                </OBJECT>
              </td>
            </tr>
            <tr>
              <td bgcolor=menu height='20'>
    		<div id=StatusBar>状态栏</div>
              </td>
            </tr>
            </table>
      </td>
    </tr>
  </table>

</form>

</body>
</html>

<%'释放对象变量
<!--#include file="../inc/conn_close.asp"-->
%> 

⌨️ 快捷键说明

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