1、附录2系统核心功能代码摘录附录2: E时代安全电子文档系统V2.0部分核心功能代码摘录开发平台:Windows Server 2008+VS2012+SQL2005+IISDocView.htm var s = ; s += ; s += ; s += ; document.write(s); / 在装载完Weboffice(执行.) / 控件后执行 WebOffice1_NotifyCtrlReady方法 / WebOffice1_NotifyCtrlReady(); var webObj; function getUrlParam(name) var reg = new RegExp(|&
2、)+ name +=(&*)(&|$); /构造一个含有目标参数的正则表达式对象 var r = window.location.search.substr(1).match(reg); /匹配目标参数 if (r!=null) return unescape(r2); return null; /返回参数值 $(document).ready(function() var file = decodeURIComponent(getUrlParam(fileurl); var filename = file.replace(/.*(/|)/, ); var fileExt = (/./.exe
3、c(filename) ? /.+$/.exec(filename.toLowerCase() : ; if (.doc.xls.ppt.docx.xlsx.pptx.wps.dps.et.pdf.indexOf(fileExt) -1) WebOffice1_NotifyCtrlReady(file,fileExt); if (.jpg.png.bmp.gif.indexOf(fileExt) -1) / alert(图片预览); document.write(800)this.width=800; /); if (.txt.cs.py.indexOf(fileExt) -1) /alert
4、(文本文件预览); window.location.href = file; /$(#txtView).html( window.location.href = file); ); function WebOffice1_NotifyCtrlReady(file,fileExt) document.all.WebOffice1.ReadOnly = false; webObj = document.getElementById(WebOffice1); webObj. HideMenuAction(5,0);/激活设置 webObj.ShowToolBar = false; / 新建文档 we
5、bObj.LoadOriginalFile(file,fileExt); webObj.ProtectDoc(1, 1, etimes20112); webObj.SetSecurity(0x01); / 禁打印 webObj.SetSecurity(0x02); / 禁保存 webObj.SetSecurity(0x04); / 禁复制 webObj.SetToolBarButton2(Menu Bar,1,0); / 隐藏office2003文件菜单 webObj.SetToolBarButton2(Menu Bar,2,0); / 隐藏office2003编辑菜单 webObj.SetT
6、oolBarButton2(Standard,1,0); / 隐藏office2003新建按钮 webObj.SetToolBarButton2(Standard,2,0); / 隐藏office2003打开按钮 webObj.SetToolBarButton2(Menu Bar,1,8); / 隐藏菜单 webObj.SetToolBarButton2(Standard,1,8); / 隐藏常用工具栏 webObj.SetToolBarButton2(Formatting,1,8); / 隐藏格式工具栏 webObj.HideMenuItem(0x01 + 0x8000); webObj.H
7、ideMenuItem(0x02 + 0x8000); webObj.HideMenuItem(0x04 + 0x8000); webObj.HideMenuAction(1,0x100000+0x200000+0x400000+0x800000+0x1000000+0x2000000+0x4000000+0x8000000+0x10000000); webObj. HideMenuAction(5,0);/激活设置 webObj.ShowToolBar = false; function WebOffice1_NotifyWordEvent(eventname) if (eventname
8、= DocumentBeforeSave) document.all.WebOffice1.lContinue = 0; alert(此文档已经禁止保存); else if (eventname = DocumentBeforePrint) document.all.WebOffice1.lContinue = 0; alert(此文档已经禁止打印); else if (eventname = WindowSelectionChange) document.all.WebOffice1.lContinue = 0; else if (eventname = DocumentBeforeClos
9、e) document.all.WebOffice1.lContinue = 0; function CloseWord() webObj.CloseDoc(0); / 页面关闭时操作 $(window).unload(function() try var webObj = document.getElementById(WebOffice1); webObj.Close(); catch (e) ); loading.PlusInHelper.htm 安全插件 html, body margin: 0; padding: 0; font-size: 14px; line-height: 1.
10、4; color: #777676; font-family: Microsoft YaHei , Segoe UI ,Verdana,SimSun,Arial,Sans-Serif; color: #22436C !important; p padding-left: 20px; padding-right: 20px; ul padding-left: 20px; padding-right: 20px; $(function () $.get(logic/RegisterHandler.ashx?f=GetCopyright&num= + Math.random(), null, fun
11、ction (data) if (data != & data != null) $(.Copyright).html(data); else alert(连接服务器超时); ); ); 安全插件下载 安全插件 插件下载说明: 第一步:请先下载安全小助手。 第二步:请下载Flash插件下载。 第三步:请下载文件压缩工具(winrar)。 注意: 1.如果您在进行第一步的过程中出错请先下载MSVC2008安装包并安装,然后再进行第一步操作。 2.如果您的系统是windows2000,您必须先安装windows2000安全小助手支持补丁,然后再进行第一步操作。 安全小助手下载: 手动
12、安装版: 安全小助手安装版 描述:当您有待审批文档时,该工具将会在桌面右下角即时弹出对话框进行提示。 Flash插件下载: install_flash_player_11_active_x_32bit (windows 32位系统) install_flash_player_10_active_x(windows 64位系统) 文件压缩工具(winrar)下载: 文件压缩工具.zip windows2000安全小助手补丁下载
13、: windows2000安全小助手补丁.zip MSVC2008安装包下载: MSVC2008安装包.zip TimeExplain.htm html, body margin: 0; padding: 0; font-size: 14px; line-height: 1.4; color: #777676; font-family: Microsoft YaHei , Segoe UI ,Verdana,SimSun,Arial,Sans-Serif; color: #22436C !important; $(function () $.get(logic/RegisterHandler.ashx?f=GetCopyright&num= + Math.random(), null, function (data) if (data != & data != null) $(.Copyright).html(data); else alert(连接服务器超时); ); ); 很抱歉,您的产品升级时间已到,如对该产品满意,或者想继续使用请联系系统供应商。
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1