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

📄 templateadd.asp

📁 OFFICE办公自动化
💻 ASP
字号:
<%
'功能:添加模板
%>

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

<%
Response.buffer=true
'------------------------------------------------设置参数
LoginID=trim(session("LoginID")) : if LoginID="" then LoginID=0 '当前用户ID
Stype=request("type"):if Stype="" then Stype=0 '当前栏目

'------------------------------------------------


  '取得模式
  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
 mUserName=session("username")
'  session("UserName")=mUserName

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

  mScriptName="TemplateAdd.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"
%>

<%
        mRecordID=Session.SessionID&minute(now())&Second(now())	'保存的是文档的编号,通过该编号,可以在里找到所有属于这条纪录的文档
	mFileName="报表模版"+mFileType
        mFileType=mFileType
	mDescript="发文报表模版"
%>

<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);
//  webform.WebOffice.WebToolsVisible('Visual Basic',true);
//  webform.WebOffice.WebToolsEnable('Standard',109,true);
//webform.WebOffice.WebObject.Application.Dialogs(109).Show();
//webform.WebOffice.WebObject.CommandBars("Visual Basic").Visible = true;
  }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' selected>自定义流程</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
			'response.write "<option value="&Rstmp("LCBH")&">"&server.htmlencode(trim(Rstmp("LCMC"))) & vbcrlf
			Rstmp.MoveNext
		wend
		Rstmp.close
		set Rstmp=nothing
                %>
              </select>
      </td>
    </tr>
    <tr>
      <td colspan=2 class="TD1">操作:
    	<input type=submit value="  保存  " class=button0>
	<%if ( mFileType=".doc") then%>
            <!--input type=button value="标签管理"  onclick="WebOpenBookMarks()" class=button0-->
	<%end if%>
            <!--input type=reset value="  清除  " class=button0-->
    	    <input type=button value="  关闭  " onclick="window.close()" class=button0> <br>
            <font color="#FF0000">注意:只有选择《保存》后,所做的操作才有效! </font>
      </td>
    </tr>
    <tr>
      <!--td align=right valign=top  class="td1" width=64>内容</td-->
      <td colspan=2 class="TD1" height=100%>
            <table border=0 cellspacing='1' cellpadding='2' 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 + -