word.aspx~RFd95b11.TMP
上传用户:tiancihang
上传日期:2014-03-12
资源大小:21387k
文件大小:12k
- <%@ Page Language="VB" %>
- <%
- Dim conn, dbpath
- conn = Server.CreateObject("ADODB.Connection")
- dbpath = Server.MapPath("demodata/soademo.mdb")
- conn.open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbpath)
- %>
- <%
- Dim BaseUrl, ServerIP, mScriptName, mHttpUrl
- mScriptName = "word.aspx"
- mHttpUrl = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")
- BaseUrl = Left(mHttpUrl, Len(mHttpUrl) - Len(mScriptName))
- ServerIP = Request.ServerVariables("HTTP_HOST")
- %>
- <%
- Dim rs, fileName, fileSubject
- rs = Server.CreateObject("ADODB.RecordSet")
- Dim strsql
- '********************************************************************
- ' 读数据库相关操作
- strsql = "select * from word" & " where ID=" & Request.QueryString(1)
- rs.open(strsql, conn, 1, 1)
- If rs.RecordCount > 0 Then
- fileName = rs.Fields("FileName").Value
- fileSubject = rs.Fields("Subject").Value
- End If
- rs.Close()
- conn.Close()
- ' 释放数据库连接对象
- rs = Nothing
- conn = Nothing
-
- Randomize()
- Dim menubarColor
- menubarColor = Int((3 * Rnd()) + 1)
- If menubarColor = 1 Then
- menubarColor = 51448
- Else
- If menubarColor = 2 Then
- menubarColor = 1083135
- Else
- menubarColor = 5292104
- End If
- End If
- %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <script language =vbscript runat="server">
-
- </script>
- <HTML>
- <HEAD runat =server>
- <TITLE>SOAOffice网络文档控件 在线演示</TITLE>
- <META http-equiv="Content-Type" content="text/html; charset=gb2312">
- <META content="SOAOffice网络文档控件,OFFICE文档在线编辑、在线保存的完美解决方案。强制痕迹保留,手写批注,全文批注,手写签名电子盖章(电子印章,电子签章,电子签名),word留痕,公文留痕,web文档控件,数字签名,支持全部OFFICE菜单,打印预览,手工批注,集成,开发,创建OA系统的必选中间件!联系电话:010-62969896"
- name="description">
- <META content="SOAOffice,网络文档控件,痕迹保留,强制痕迹保留,全文批注,手写批注,OFFICE文档,电子印章,手写签名,word留痕,留痕,公文留痕,在线编辑,在线保存,办公自动化,OA,电子签名,数字签名,手工批注,打印预览" name="keywords">
- <script language="javascript">
- var BaseUrl = "<%=BaseUrl%>";
- </script>
- <SCRIPT LANGUAGE="javascript" type="text/javascript" src="images/control.js"></SCRIPT>
- <LINK href="images/template.css" type="text/css" rel="Stylesheet">
- <LINK href="images/css.css" type="text/css" rel="Stylesheet">
- <LINK href="images/css(1).css" type="text/css" rel="stylesheet">
- <META content="MSHTML 6.00.2800.1498" name="GENERATOR">
- </HEAD>
- <BODY bgColor="#ffffff" leftMargin="0" topMargin="0" onload="soaOpen();window.focus();"
- onunload="soaClose();">
- <script language="javascript">
- var bDocOpen = false;
-
- function soaOpen()
- {
- try {
- formData.SOAOfficeCtrl.UserMenuCaption = "自定义菜单(&N)";
- formData.SOAOfficeCtrl.AppendMenuItem(1, "显示痕迹(&S)", false);
- formData.SOAOfficeCtrl.AppendMenuItem(2, "隐藏痕迹(&H)", false);
- formData.SOAOfficeCtrl.AppendMenuItem(3, "-");
- formData.SOAOfficeCtrl.AppendMenuItem(4, "显示标题(&T)");
- formData.SOAOfficeCtrl.AppendMenuItem(5, "-");
- formData.SOAOfficeCtrl.AppendMenuItem(6, "全文手写批注(&D)");
- formData.SOAOfficeCtrl.AppendMenuItem(7, "插入印章(&I)");
- formData.SOAOfficeCtrl.AppendMenuItem(8, "接受所有修订(&A)", false);
- formData.SOAOfficeCtrl.AppendMenuItem(9, "-");
- formData.SOAOfficeCtrl.AppendMenuItem(10, "分层显示手写批注(&G)");
- formData.SOAOfficeCtrl.SaveDocURL = "SaveDoc.asp";
- formData.SOAOfficeCtrl.WebOpen( "<%=fileName%>",2,"<%=Request.QueryString(2)%>");
- return true;
- }
- catch (e)
- {
- var ErrorMsg = '未定义的意外错误。';
- alert(e.description);
- WEBWORD_OBJECT.innerHTML="<div align=center><b><font color=red>文档加载失败,错误信息:"+e.description+"</font></b></div>";
- return false;
- }
- }
- function soaClose()
- {
- try {
- if (bDocOpen)
- formData.SOAOfficeCtrl.Close();
- return true;
- }
- catch (e)
- {
- alert("关闭文档失败!n错误信息:"+e.message);
- return false;
- }
- }
- //文档另存为Html,并发布到web服务器
- function SaveAsHtml()
- {
- try {
- alert("绿色版没有提供另存HTML的功能。");
- //formData.SOAOfficeCtrl.WebSaveAsHtml();
- }
- catch (e)
- {
- alert("保存为Html失败!n错误信息:" + e.message);
- }
- }
- </script>
- <SCRIPT language="JavaScript" event="OnDocumentOpened(str, obj)" for="SOAOfficeCtrl">
- bDocOpen = true;
- </SCRIPT>
- <SCRIPT language="JavaScript" event="OnDocumentClosed()" for="SOAOfficeCtrl">
- bDocOpen = false;
- </SCRIPT>
- <SCRIPT language="JavaScript" event="OnUserMenuClick(index, caption)" for="SOAOfficeCtrl">
- if(index == 1) soaShowTrack(true);
- if(index == 2) soaShowTrack(false);
- if(index == 4) alert("该菜单的标题是:"+caption);
- if(index == 6) soaStartHandDraw();
- if(index == 7) soaInsertSeal();
- if(index == 8) soaAcceptAllRevisions();
- if(index == 10) soaShowHandDrawDispBar();
- </SCRIPT>
- <form name="formData" method="post" action="UploadDoc.asp?Type=word&ID=<%=Request.QueryString(1)%>" id="formData">
-
-
- <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0 height=23 >
- <tr>
- <td bgcolor="#FF6600" height="2"></td>
- <td bgcolor="#FF6600" height="2"></td>
- <td bgcolor="#FF6600" height="2"></td>
- </tr>
- </table>
- <table cellSpacing=0 cellPadding=0 width="100%" border=0 >
- <tr>
- <td height="4"></td>
- </tr>
- </table>
- <TABLE height="10" cellSpacing="0" cellPadding="0" width="100%" border="0" bgcolor="">
- <TBODY>
- <TR>
- <TD width="10" height ="10" align="left" > <IMG src="images/img_blanklogo_1.gif" width="10" height="10"></TD>
- <TD width="98%" background="images/img_blanklogo_2.gif" align="center"></TD>
- <TD width="10" align="right"><IMG src="images/img_blanklogo_3.gif" width="10" height="10"></TD>
- </TR>
- </TBODY>
- </TABLE>
- <TABLE height="21" cellSpacing="0" cellPadding="0" width="100%" border="0" bgcolor="#EEEEEE">
- <TBODY>
- <TR>
- <td width="6" bgcolor="#FFFFFF"> </td>
- <TD style="font-size:9pt" width=140 nowrap> 文档功能菜单
- </TD>
- <TD><SPAN class="ltsep">|</SPAN></TD>
- <TD style="font-size:9pt" width=177 nowrap> 当前操作模式:<font color="#FF0000">修改无痕迹</font></TD>
- <TD><SPAN class="ltsep">|</SPAN></TD>
- <TD style="font-size:9pt" width="100%"> 文档主题:<input name="inputSubject" class=thinInput type="text" value="<%=fileSubject%>"><font color="#FF0000"> 双击控件标题栏最大化运行</font></TD>
- <td width="5" bgcolor="#FFFFFF"> </td>
- </TR>
- </TBODY>
- </TABLE>
- <TABLE cellSpacing="0" cellPadding="0" width="100%" border="0">
- <TBODY>
- <TR vAlign="top">
- <TD style="OVERFLOW-X: hidden" width="10" height="100%" bgcolor="#FFFFFF"> </TD>
- <TD style="OVERFLOW-X: hidden" width="144" height="100%">
- <DIV class="mnpMenuTop" id="mnpMenuTop" style="OVERFLOW-X: hidden; WIDTH: 144px">
- <DIV class="mnpMenuRow" >
- 部分功能列表 </DIV>
- <DIV class="menuItem" >
- <A disabled>显示痕迹</A></DIV>
- <DIV class="menuItem" >
- <A disabled>隐藏痕迹</A></DIV>
- <DIV class="menuItem" >
- <A disabled>接受所有修订</A></DIV>
- <DIV class="menuItem" >
- <A disabled>列举所有痕迹内容</A></DIV>
- <DIV class=mnpMenuBorder style="WIDTH: 141px"></DIV>
- <DIV class="menuItem" >
- <A href="javascript:soaStartHandDraw();">全文手写批注[<font color="#993300">绘图</font>]</A></DIV>
- <DIV class="menuItem" >
- <A href="javascript:soaInsertSeal();">插入印章</A></DIV>
- <DIV class="menuItem" >
- <A href="javascript:soaInsertLocalSeal();">插入本地印章</A></DIV>
- <DIV class="menuItem" >
- <A href="javascript:soaInsertSignature();">插入手写签名</A></DIV>
- <DIV class="menuItem" >
- <A href="javascript:soaValidateSeal();">验证印章/签名</A></DIV>
- <DIV class="menuItem" >
- <A href="javascript:soaCanCopy(false);">禁止复制/拷贝</A></DIV>
- <DIV class="menuItem" >
- <A href="javascript:soaCanCopy(true);">允许复制/拷贝</A></DIV>
- <DIV class=mnpMenuBorder style="WIDTH: 141px"></DIV>
- <DIV class="menuItem" >
- <A href="javascript:InsertWebImage();">插入Web图片</A></DIV>
- <DIV class="menuItem" >
- <A href="javascript:OpenImageDialog();">插入本地图片</A></DIV>
- <DIV class="menuItem" >
- <A href="javascript:soaSave();">直接保存文档</A></DIV>
- <DIV class="menuItem" >
- <A href="javascript:soaSubmitSave();">提交页面保存文档</A></DIV>
- <DIV class="menuItem" >
- <A href="javascript:SaveAsHtml();">另存Html到服务器</A></DIV>
- <DIV class=mnpMenuBorder style="WIDTH: 141px"></DIV>
- <DIV class="menuItem" >
- <A href="javascript:InsertVBATemplate();">VBA套红</A></DIV>
- <DIV class="menuItem" >
- <A href="javascript:ApplyFileTemplate();">模板套红</A></DIV>
- <DIV class="menuItem" >
- <A disabled>切换标题栏</A></DIV>
- <DIV class="menuItem" >
- <A href="javascript:ToggleMenubar();">切换菜单栏</A></DIV>
- <DIV class="menuItem" >
- <A href="javascript:ToggleToolbars();">切换工具栏</A></DIV>
- <DIV class="menuItem" >
- <A href="javascript:DocPageSetup();">页面设置</A></DIV>
- <DIV class="menuItem" >
- <A href="javascript:EnablePrint(false);">禁止打印</A></DIV>
- <DIV class="menuItem" >
- <A href="javascript:EnablePrint(true);">允许打印</A></DIV>
- <DIV class="menuItem" >
- <A href="javascript:EnableSave(false);">禁止保存</A></DIV>
- <DIV class="menuItem" >
- <A href="javascript:EnableSave(true);">允许保存</A></DIV>
- <DIV class="menuItem" >
- <A href="javascript:EnableSaveAs(false);">禁止另存</A></DIV>
- <DIV class="menuItem" >
- <A href="javascript:EnableSaveAs(true);">允许另存</A></DIV>
- <DIV class="menuItem" >
- <A href="javascript:WordToText();">获取文档Txt正文</A></DIV>
- <DIV class="menuItem" >
- <A href="javascript:DisableDragAndDrop();">禁止/允许WORD拖曳</A></DIV>
- <DIV class="mnpMenuBorder" style="MARGIN-BOTTOM: 0px; WIDTH: 143px"></DIV>
- </DIV>
- </TD>
- <TD width="100%">
- <TABLE cellSpacing="0" cellPadding="0" width="100%" border="0">
- <TBODY>
- <TR vAlign="top" align="left">
- <td height="655"><SPAN id="WEBWORD_OBJECT">
- <OBJECT id="SOAOfficeCtrl" codeBase="<%=BaseUrl%>SOAOffice.ocx#version=3,1,1,0" height="100%"
- width="100%" classid="clsid:BBD0982A-63C3-4105-B7AF-5FF3E2649082" data="">
- <param name="Server" value="<%=ServerIP%>">
- <param name="ServerPort" value="4357">
- <param name="BorderStyle" value="0">
- <param name="TitleBarColor" value="16777215">
- <param name="TitlebarTextColor" value="0">
- <param name="MenubarColor" value="<%=menubarColor%>">
- <param name="MenubarStyle" value="<%=Int((6 * Rnd()) + 1)%>">
- <SPAN STYLE="color:red">未能载入SOAOfficeCtrl文档控件。请在安装控件的提示对话框里确认安装,才能使用本控件的功能。</SPAN>
- </OBJECT>
- </SPAN></td>
- </TR>
- </TBODY>
- </TABLE>
- </TD>
- <TD style="OVERFLOW-X: hidden" width="10" height="100%" bgcolor="#FFFFFF"> </TD>
- </TR>
- </TBODY>
- </TABLE>
- <TABLE height="12" cellSpacing="0" cellPadding="0" width="100%" border="0" bgcolor="">
- <TBODY>
- <TR>
- <TD width="12" height ="12" background="images/img_blanklogo_14.gif" align="left" ></TD>
- <TD width="98%" background="images/img_blanklogo_15.gif" align="center"></TD>
- <TD width="12" background="images/img_blanklogo_16.gif" align="right"></TD>
- </TR>
- </TBODY>
- </TABLE>
- <hr width="90%" size=1 color=black>
- </form>
- </BODY>
- </HTML>