word.aspx
上传用户:tiancihang
上传日期:2014-03-12
资源大小:21387k
文件大小:8k
- <%@ Page Language="VB" AspCompat ="true" %>
- <%
- 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("ID")
- 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" 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 = "退出(&Q)";
- formData.SOAOfficeCtrl.Caption="E-TONG 在线编辑工具";
- formData.SOAOfficeCtrl.AppendMenuItem(1, "退出", true);
- // 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.aspx?id="+<%=Request.QueryString("ID")%>;
- //formData.SOAOfficeCtrl.WebOpen( "<%=fileName%>",2,"<%=Request.QueryString(0)%>");
- //formData.SOAOfficeCtrl.WebOpen( "<%=fileName%>",2,""',"");
- formData.SOAOfficeCtrl.WebOpen( "test.doc",2,"xiazhou");
- 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" id="formData">
- <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 cellSpacing="0" cellPadding="0" width="100%" border="0">
- <TBODY>
- <TR vAlign="top">
- <TD width="100%">
- <TABLE cellSpacing="0" cellPadding="0" width="100%" border="0">
- <TBODY>
- <TR vAlign="top" align="left">
- <td height=655 align=center><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="SaveDocURL" value="saveDoc.aspx?id="+<%=Request.QueryString("ID")%> />
- <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>
-
- <tbody>
- <tr>
- <td align=center style="height: 5px"><input type =button value ="保存" /></td>
- </tr>
- </tbody>
- </TABLE>
- </form>
- </BODY>
- </HTML>