From d64bb5b48a6c28677f12f5000d9e4b1595b4f7b0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=B0=8F=E8=83=A1?= <3203164629@qq.com>
Date: Tue, 29 Aug 2023 19:49:05 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96UI?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
dzz/onlyoffice/LICENSE | 201 ----------
dzz/onlyoffice/README.md | 11 -
dzz/onlyoffice/admin.php | 44 ---
dzz/onlyoffice/classes/filter.php | 20 -
dzz/onlyoffice/classes/index.htm | 0
dzz/onlyoffice/classes/thumb.php | 119 ------
dzz/onlyoffice/config/config.php | 6 -
dzz/onlyoffice/config/index.htm | 0
dzz/onlyoffice/dzz_app_onlyoffice.xml | 76 ----
dzz/onlyoffice/enable.php | 17 -
dzz/onlyoffice/images/index.htm | 0
dzz/onlyoffice/images/loading.gif | Bin 695 -> 0 bytes
dzz/onlyoffice/images/onlyoffice54.png | Bin 1738 -> 0 bytes
dzz/onlyoffice/images/onlyofficelogo.png | Bin 4623 -> 0 bytes
dzz/onlyoffice/index.htm | 0
dzz/onlyoffice/index.php | 252 ------------
dzz/onlyoffice/jwt/BeforeValidException.php | 7 -
dzz/onlyoffice/jwt/ExpiredException.php | 7 -
dzz/onlyoffice/jwt/JWT.php | 370 ------------------
.../jwt/SignatureInvalidException.php | 7 -
dzz/onlyoffice/language/en-US/index.htm | 0
dzz/onlyoffice/language/en-US/lang.php | 17 -
dzz/onlyoffice/language/index.htm | 0
dzz/onlyoffice/language/zh-cn/index.htm | 0
dzz/onlyoffice/language/zh-cn/lang.php | 17 -
dzz/onlyoffice/onlyoffice.md5 | 14 -
dzz/onlyoffice/template/admin.htm | 239 -----------
dzz/onlyoffice/template/header_left.htm | 3 -
dzz/onlyoffice/template/index.htm | 22 --
dzz/onlyoffice/template/left.htm | 4 -
dzz/onlyoffice/template/main.htm | 30 --
31 files changed, 1483 deletions(-)
delete mode 100644 dzz/onlyoffice/LICENSE
delete mode 100644 dzz/onlyoffice/README.md
delete mode 100644 dzz/onlyoffice/admin.php
delete mode 100644 dzz/onlyoffice/classes/filter.php
delete mode 100644 dzz/onlyoffice/classes/index.htm
delete mode 100644 dzz/onlyoffice/classes/thumb.php
delete mode 100644 dzz/onlyoffice/config/config.php
delete mode 100644 dzz/onlyoffice/config/index.htm
delete mode 100644 dzz/onlyoffice/dzz_app_onlyoffice.xml
delete mode 100644 dzz/onlyoffice/enable.php
delete mode 100644 dzz/onlyoffice/images/index.htm
delete mode 100644 dzz/onlyoffice/images/loading.gif
delete mode 100644 dzz/onlyoffice/images/onlyoffice54.png
delete mode 100644 dzz/onlyoffice/images/onlyofficelogo.png
delete mode 100644 dzz/onlyoffice/index.htm
delete mode 100644 dzz/onlyoffice/index.php
delete mode 100644 dzz/onlyoffice/jwt/BeforeValidException.php
delete mode 100644 dzz/onlyoffice/jwt/ExpiredException.php
delete mode 100644 dzz/onlyoffice/jwt/JWT.php
delete mode 100644 dzz/onlyoffice/jwt/SignatureInvalidException.php
delete mode 100644 dzz/onlyoffice/language/en-US/index.htm
delete mode 100644 dzz/onlyoffice/language/en-US/lang.php
delete mode 100644 dzz/onlyoffice/language/index.htm
delete mode 100644 dzz/onlyoffice/language/zh-cn/index.htm
delete mode 100644 dzz/onlyoffice/language/zh-cn/lang.php
delete mode 100644 dzz/onlyoffice/onlyoffice.md5
delete mode 100644 dzz/onlyoffice/template/admin.htm
delete mode 100644 dzz/onlyoffice/template/header_left.htm
delete mode 100644 dzz/onlyoffice/template/index.htm
delete mode 100644 dzz/onlyoffice/template/left.htm
delete mode 100644 dzz/onlyoffice/template/main.htm
diff --git a/dzz/onlyoffice/LICENSE b/dzz/onlyoffice/LICENSE
deleted file mode 100644
index 261eeb9..0000000
--- a/dzz/onlyoffice/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/dzz/onlyoffice/README.md b/dzz/onlyoffice/README.md
deleted file mode 100644
index 4d69a0d..0000000
--- a/dzz/onlyoffice/README.md
+++ /dev/null
@@ -1,11 +0,0 @@
-### 官方网站:http://dzzoffice.com
-### 官方演示地址:http://demo.dzzoffice.com
-### 【金山文档】 Dzzoffice笔记 https://kdocs.cn/l/cauBSADFYYE2
-### DzzOffice小胡版安装和升级onlyoffice插件说明:
-**重点:小胡版插件基于dzzoffice小胡版编辑,其他版本不确定兼容性。**
-
-1. 下载解压后,将onlyoffice文件夹放在网站dzz\下(如果该目录下已有相同文件夹请先删除在放);
-
-2. 升级的用户在系统工具中清理缓存即可;
-
-3. 安装的用户,在应用市场右下角选择导入,选择导入文件,导入文件是文件夹下的dzz_app_onlyoffice.xml,然后选择提交。
\ No newline at end of file
diff --git a/dzz/onlyoffice/admin.php b/dzz/onlyoffice/admin.php
deleted file mode 100644
index c9ab474..0000000
--- a/dzz/onlyoffice/admin.php
+++ /dev/null
@@ -1,44 +0,0 @@
-fetch_by_identifier('onlyoffice','dzz');
-$app['extra'] && $app['extra']=unserialize($app['extra']);
-if (!submitcheck('confirmsubmit')) {
- include_once template('admin');
-} else {
- if ( $_GET['app_key'] ) {
- $extra =$app['extra'];
- $extra["DocumentUrl"]=$_GET['app_key'];
- $extra["exts"]=$_GET['exts']?trim($_GET['exts']):'';
- $extra["token"]=$_GET['token'];
- $extra["callback"]=$_GET['callback'];
- $extra["toubu"]=$_GET['toubu'];
- $extra["modifyFilter"]=$_GET['modifyFilter'];
- $extra["autosave"]=$_GET['autosave'];
- $extra["chat"]=$_GET['chat'];
- $extra["compactHeader"]=$_GET['compactHeader'];
- $extra["compactToolbar"]=$_GET['compactToolbar'];
- $extra["comments"]=$_GET['comments'];
- $extra["macros"]=$_GET['macros'];
- $extra["macrosMode"]=$_GET['macrosMode'];
- $extra["plugins"]=$_GET['plugins'];
- $extra["toolbarNoTabs"]=$_GET['toolbarNoTabs'];
- C::t("app_market")->update($app['appid'],array("extra"=> serialize($extra)));
- showmessage('save_success', $_GET['refer']?$_GET['refer']:dreferer(), array(), array('alert' => 'right'));
- } else {
- showmessage('onlyoffice_url_setfailed');
- }
- exit();
-}
diff --git a/dzz/onlyoffice/classes/filter.php b/dzz/onlyoffice/classes/filter.php
deleted file mode 100644
index 689051f..0000000
--- a/dzz/onlyoffice/classes/filter.php
+++ /dev/null
@@ -1,20 +0,0 @@
-fetch_by_identifier('onlyoffice','dzz');
- $app['extra']=unserialize($app['extra']);
- $exts=explode(',',$app['extra']['exts']);
- if($data['size']<1) return;
- if(!in_array($data['ext'],$exts)){
- return;
- }else{
- $data['img']='index.php?mod=io&op=thumbnail&size=small&path='.$data['dpath'].'&t='.VERHASH;
- }
- }
-}
\ No newline at end of file
diff --git a/dzz/onlyoffice/classes/index.htm b/dzz/onlyoffice/classes/index.htm
deleted file mode 100644
index e69de29..0000000
diff --git a/dzz/onlyoffice/classes/thumb.php b/dzz/onlyoffice/classes/thumb.php
deleted file mode 100644
index dc84484..0000000
--- a/dzz/onlyoffice/classes/thumb.php
+++ /dev/null
@@ -1,119 +0,0 @@
-fetch_by_identifier('onlyoffice','dzz');
- $app['extra']=unserialize($app['extra']);
- $exts=explode(',',$app['extra']['exts']);
- if($meta['size']<1) return;
- if(!in_array($meta['ext'],$exts)){
- return;
- }else{
-
- if($url=$this->getThumb($meta,993,1043)){
- if($info=getimagesize($url)){
- $attr=array('imageWidth'=>$info[0],'imageHeight'=>$info[1]);
- C::t('resources_attr')->update_by_skey($meta[rid],0,$attr);
-
- $fileurls['fileurl']=$url;
- $fileurls['filedir']=$url;
- }
-
- }
- }
- }
- function textEncode($data){
- $mime=\dzz_mime::get_type($data['ext']);
- list($pre)=explode('/',$mime);
- if($pre!='text') return $data['stream'];
-
- $str = IO::getFileContent($data['path']);
- require_once DZZ_ROOT . './dzz/class/class_encode.php';
- $p = new \Encode_Core();
- $code = $p -> get_encoding($str);
- if ($code!=CHARSET)
- $str = diconv($str, $code, CHARSET);
- $cachekey=md5($meta[$path]).$data['ext'];
- $file=getglobal('setting/attachdir').'./'.$cachekey;
- if(file_put_contents($file,$str)){
- $data['stream']=getglobal('siteurl').getglobal('setting/attachurl').'/'.$cachekey;
- }
- return $data['stream'];
-
-
- }
- function getThumb($data,$width=993,$height=1043){
- $stream=$this->textEncode($data);
- $post_data = '{ "async":false,
- "filetype": "'.$data['ext'].'",
- "key": "'.$data['path'].'_'.$data['md5'].'",
- "outputtype": "png",
- "thumbnail": {
- "aspect": 1,
- "first": true,
- "height": '.$width.',
- "width": '.$height.'
- },
- "title": "'.$data['name'].'",
- "url": "'.$stream.'"
- }';
- $conversion_url=$this->getCUrl();
- $ret = ($this->getConvertUrl($conversion_url, $post_data));
- if($url=$ret['FileUrl']){
- return $url;
- }
- return false;
- }
- private function getCUrl(){
- global $_SERVER;
- $app=C::t('app_market')->fetch_by_identifier('onlyoffice','dzz');
- $app['extra']=unserialize($app['extra']);
- $host=explode(':',$_SERVER['HTTP_HOST']);
- $onlyDocumentUrl=str_replace(array('localhost','127.0.0.1'),$host[0],$app['extra']['DocumentUrl']);
- $onlyDocumentUrl=rtrim(str_replace('web-apps/apps/api/documents/api.js','',$onlyDocumentUrl),'/').'/ConvertService.ashx';
- return $onlyDocumentUrl;
-
- }
- public function getConvertUrl($posturl, $post_data) {
- //CURLOPT_URL 是指提交到哪里?相当于表单里的“action”指定的路径
- //$url = "http://local.jumei.com/DemoIndex/curl_pos/";
- //$posturl.='?'.http_build_query($post_data);
- $ch = curl_init();
- // 设置变量
- curl_setopt($ch, CURLOPT_URL, $posturl);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- //执行结果是否被返回,0是返回,1是不返回
- //curl_setopt($ch, CURLOPT_HEADER, 0);//参数设置,是否显示头部信息,1为显示,0为不显示
-
- //伪造网页来源地址,伪造来自百度的表单提交
- //curl_setopt($ch, CURLOPT_REFERER, '');
-
- //表单数据,是正规的表单设置值为非0
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
- curl_setopt($ch, CURLOPT_TIMEOUT, 300);
- //设置curl执行超时时间最大是多少
-
- //使用数组提供post数据时,CURL组件大概是为了兼容@filename这种上传文件的写法,
- //默认把content_type设为了multipart/form-data。虽然对于大多数web服务器并
- //没有影响,但是还是有少部分服务器不兼容。本文得出的结论是,在没有需要上传文件的
- //情况下,尽量对post提交的数据进行http_build_query,然后发送出去,能实现更好的兼容性,更小的请求数据包。
- curl_setopt($ch, CURLOPT_POSTFIELDS, ($post_data));
-
- //执行并获取结果
- if (!$r = curl_exec($ch)) {
- return ( array('error' => curl_error($ch)));
- }
- curl_close($ch);
- return $ret=xml2array($r,true,'utf-8');
- }
-}
\ No newline at end of file
diff --git a/dzz/onlyoffice/config/config.php b/dzz/onlyoffice/config/config.php
deleted file mode 100644
index 6bc39bd..0000000
--- a/dzz/onlyoffice/config/config.php
+++ /dev/null
@@ -1,6 +0,0 @@
-false,
- 'about'=>array('name_en'=>'onlyoffice',
- 'version'=>'小胡版 1.24'),
-);
\ No newline at end of file
diff --git a/dzz/onlyoffice/config/index.htm b/dzz/onlyoffice/config/index.htm
deleted file mode 100644
index e69de29..0000000
diff --git a/dzz/onlyoffice/dzz_app_onlyoffice.xml b/dzz/onlyoffice/dzz_app_onlyoffice.xml
deleted file mode 100644
index 96102d4..0000000
--- a/dzz/onlyoffice/dzz_app_onlyoffice.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/dzz/onlyoffice/enable.php b/dzz/onlyoffice/enable.php
deleted file mode 100644
index 5de3af1..0000000
--- a/dzz/onlyoffice/enable.php
+++ /dev/null
@@ -1,17 +0,0 @@
-Foi
o?P`RzKmTPXip}}TxV66HKK{w)x)~&`pu1QWRUb;~0*1FW0Jj0&qyPW_
diff --git a/dzz/onlyoffice/images/onlyoffice54.png b/dzz/onlyoffice/images/onlyoffice54.png
deleted file mode 100644
index f0efed1d1081cf5775b01a5067f4d2795063f09f..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 1738
zcmV;*1~vJKP)Z@^iFInM4)lW5Ml028
z7AXOSz}`AKvkqcSpc9;0YiOrQJ~jK~Q?)YAL#zdKywqG#Lua85{2b_!YcK}Jt2R=F
zSR3dCr+S6DtDp|t<{`lWD-c|kSdE-eCrI@*YiJqSy&}adX-Ur_Rs*`hsZ;!Z)Myte
zCfDLNG6Z
z+9}MNihDu4DybtLTg{DTX2Xe<`@2QPV+3pmM_*F!aUp1sm{~uYm22t<%b5EV*!E&a
zQdjUuETlnfX2Zxd#v9sZoZg_FgDe{Vg
zqw%SKe0duf6@B3|Mc1kpD}=|Vr(!pv%!^n
zuZ_vWw-Iw3^AErA_fvVRL>^t>CJ#x(SMI&m2jc9dcUvwuG|iQ|e*y-nnGFr%@WC|-
zna8Jo%#xAESsJTTgi_33S9|19K;l3BUQ?o@e1w-qPKf^W?p9pL>=bh6$&7(r3R7RE
zv3VQK8hM0$KpvwlG8QdzC%HepyH(5H-+J9UHG)$dI^5Z2I6x)6H|pf;l_x
zxsivHZ%D2u`F2Htbsp}g_JG48|9PMl{N;MZb^$P(C1$hX%(9h;LE)H#yVRFlN4Pdp
z6~}zEms<-8LjB3~zsaI<%SIkM!C&c1t}9%pBEfUPY#JAY(q+o8a{QJ@9{zG8a+kL^
z{B!B0@Nq6OZTRQLk-riLcc}qv1L-&4`5yq^{>3K%_|C6hEbVNmAN$}3U&pdZzRY9GFSI4!lT=?}fX;-Ojg8sRY&N+5<39sz%7+9AB;+^pXNZu*
z%WvH|)y67^IW3?gADYE`eEsde_T{7a-8VLyxuJ2*xwV%gl$uTZhV5N@^F1)@;=@sJ
zkdiy)r4DtL(O4U^9$0-&6A5yCg^>L5``4P1Zmw)e&C;1o`>($JhuE@79h>#QT9iBK
zF}NYpKp`5>)7T5shTv+Es
z_hU)@m*2XRp87I}SQq2=@&b;xNQ%^#kK(_5_eNcEZQ;I!v{|r83qrfE{B%FD>7I7@#7PSTE
znFu+|NU>SpvMgRyZW(i*00}N^O6nljK4;%5!V)vvC7Z;{lwQS;jeu==-$&{pwcsNN
zt;`b4`Zk>;t5mCU+mZs?^3e`bm;6Xz?F7v%#%yTWq|z4ZJojT`;Ff$C0Bz(t()kW`
zEH?;ynDxmf>3P~($BpKgJj@y3LtAn^Rwa1M!dW(1`I4^;>%Lr%frfl^Lt!IPxWwYL
zk;+Fq@}U9TqQcGPJY3Y@Arc@dTt!Fv|NCjfM$Bwz)8#B&6_kclPXnIXzZ^Xy_N3t%
gu_q1Bh&^fe5KUcOVpP`MHvj+t07*qoM6N<$f|#04b^rhX
diff --git a/dzz/onlyoffice/images/onlyofficelogo.png b/dzz/onlyoffice/images/onlyofficelogo.png
deleted file mode 100644
index 9f595e8e981d765d91f0cf2d79b0d72af0f17044..0000000000000000000000000000000000000000
GIT binary patch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-RfpB%~Sqmd-^Tt9W_5&$-owWspk=Tg!NU1
z85X^`y?goQhmg%IhjoM7Z9)2Pd*>-qGrI>oH4OFk8t-}-8cUy66N3dltn>G{_**Y=
zF*m4^=xsQ*xkeaQ`lMqTe>#1();n2HnmhQ-PpjYUM~is3p>u;*>s(FwK3pSzN9MvS
z)>}MpP8l2eJz`Y19SnFLyJHb#2P--2VJn$TmhOmAl&%w-a-C%Fgzm)k0=J|Ul9=e6DO3E|rgqIl(%72Fg@cg8#`M5lvBe+LASlP7^?)~=ZoS#+Q$L3-VCf`GW10`|P(TVDhvK0LS
zArB#mW7_7{rAnRp&%yd|Ao27EObE=!y1QB*0JZ2?1xXC!=8mTwBxYwGG{bIEmru
zYCYQpa}y4`#~!p2Jz6t;Ev*N>bH`Uh-}eFrca6i<0K0&xqIU+a0cp;u4`~@H%(>~*
z092Ql6JayzDXW@=!po7OH0nP4`J5#SufUkTu$_!iC`Jnl-?!Np?W2pM!#;UJy)$)R
oeCHn#6C+j|^Y0BC1=2#(=*{xEVt+j3*Do3aT~kE4wqxXf0Oe?1iU0rr
diff --git a/dzz/onlyoffice/index.htm b/dzz/onlyoffice/index.htm
deleted file mode 100644
index e69de29..0000000
diff --git a/dzz/onlyoffice/index.php b/dzz/onlyoffice/index.php
deleted file mode 100644
index 2f93409..0000000
--- a/dzz/onlyoffice/index.php
+++ /dev/null
@@ -1,252 +0,0 @@
-fetch_by_identifier('onlyoffice','dzz');
- $app['extra']=unserialize($app['extra']);
- $onlyDocumentUrl=rtrim(str_replace('web-apps/apps/api/documents/api.js','',$app['extra']['DocumentUrl']),'/').'/web-apps/apps/api/documents/api.js';
- $host=explode(':',$_SERVER['HTTP_HOST']);
- $onlyDocumentUrl=str_replace(array('localhost','127.0.0.1'),$host[0],$onlyDocumentUrl);
- if(empty($onlyDocumentUrl)) showmessage('onlyoffice_enable_failed');
- $dzzofficeurl=$_G['siteurl'];
- $docexts=array("doc", "docx", "docm","dot", "docxf","dotx", "dotm","odt", "fodt", "ott", "rtf", "txt","html", "htm", "mht", "xml","pdf", "djvu", "fb2", "epub", "xps", "oxps", "oform");
- $sheetexts=array("xls", "xlsx", "xlsm", "xlsb","xlt", "xltx", "xltm","ods", "fods", "ots", "csv");
- $showexts=array("pps", "ppsx", "ppsm","ppt", "pptx", "pptm","pot", "potx", "potm","odp", "fodp", "otp");
-
- $meta=IO::getMeta($path);
- if($meta['error']) showmessage($meta['error']);
- $navtitle=$meta['name'];
- if(in_array($meta['ext'],$docexts)){
- $documentType='word';
- }elseif(in_array($meta['ext'],$sheetexts)){
- $documentType='cell';
- }elseif(in_array($meta['ext'],$showexts)){
- $documentType='slide';
- }else{
- $documentType='word';
- }
-
- if(!perm_check::checkperm('edit',$meta)){
- $mode='view';
- $perm_edit=false;
- }else{
- $mode='edit';
- $perm_edit=true;
- }
- if(!perm_check::checkperm('download',$meta)){
- $perm_download=false;
- $perm_print=false;
- }else{
- $perm_download=true;
- $perm_print=true;
- }
- if(!perm_check::checkperm('copy',$meta)){
- $perm_copy=false;
- }else{
- $perm_copy=true;
- }
- if(helper_browser::ismobile()){
- $type="mobile";
- }else{
- $type="desktop";
- }
- if($meta['title']){
- $title=$meta['title'];
- }else{
- $title=$meta['name'];
- }
- if($app['extra']['modifyFilter']){
- $modifyFilter=true;
- }else{
- $modifyFilter=false;
- }
- if($app['extra']['autosave']){
- $autosave=true;
- }else{
- $autosave=false;
- }
- if($app['extra']['chat']){
- $chat=true;
- }else{
- $chat=false;
- }
- if($app['extra']['compactHeader']){
- $compactHeader=true;
- }else{
- $compactHeader=false;
- }
- if($app['extra']['compactToolbar']){
- $compactToolbar=true;
- }else{
- $compactToolbar=false;
- }
- if($app['extra']['comments']){
- $comments=true;
- }else{
- $comments=false;
- }
- if($app['extra']['macros']){
- $macros=true;
- }else{
- $macros=false;
- }
- if($app['extra']['macrosMode']=="1"){
- $macrosMode='disable';
- }elseif($app['extra']['macrosMode']=="2"){
- $macrosMode='enable';
- }else{
- $macrosMode='warn';
- }
- if($app['extra']['plugins']){
- $plugins=true;
- }else{
- $plugins=false;
- }
- if($app['extra']['toolbarNoTabs']){
- $toolbarNoTabs=true;
- }else{
- $toolbarNoTabs=false;
- }
- if($app['extra']['callback']=='2'){
- $forcesavetype='1';
- $forcesave=true;
- }elseif($app['extra']['callback']=='3'){
- $forcesavetype='2';
- $forcesave=true;
- }else{
- $forcesavetype='0';
- $forcesave=false;
- }
- $stream=IO::getFileUri($path);
- $saveurl=$dzzofficeurl.DZZSCRIPT.'?mod=onlyoffice&do=savefile&path='.dzzencode($path).'&token='.dzzencode($_G['uid']);
- function GenerateRevisionId($expected_key) {
- if (strlen($expected_key) > 20) $expected_key = crc32( $expected_key);
- $key = preg_replace("[^0-9-.a-zA-Z_=]", "_", $expected_key);
- $key = substr($key, 0, min(array(strlen($key), 20)));
- return $key;
- }
- if($meta['ext']=='oform'){
- $name=$_G['username'];
- $time=TIMESTAMP;
- $key=md5(''.$name.''.''.$time.'');
- }else{
- $key=$_GET['path'].'_'.$meta['md5'];
- }
- $Key=GenerateRevisionId($key);
- $config = [
- "type" => $type,
- "documentType" => $documentType,
- "document" => [
- "title" => $title,
- "url" => $stream,
- "fileType" => $meta['ext'],
- "key" => $Key,
- "permissions" => [
- "comment" => true,
- "copy" => $perm_copy,
- "download" => $perm_download,
- "edit" => $perm_edit,
- "print" => $perm_print,
- "fillForms" => true,
- "modifyFilter" => $modifyFilter,
- "modifyContentControl" => true,
- "review" => true
- ]
- ],
- "forcesavetype" => $forcesavetype,
- "editorConfig" => [
- "mode" => $mode,
- "lang" => $_G['language'],
- "callbackUrl" => $saveurl,
- "createUrl" => '',
- "user" => [
- "id" => $_G['uid'],
- "name" => $_G['username']
- ],
- "customization" => [
- "about" => true,
- "feedback" => false,
- "chat"=>$chat,
- "comments"=>$comments,
- "goback"=>false,
- "compactHeader"=>$compactHeader,
- "compactToolbar"=>$compactToolbar,
- "macros"=>$macros,
- "macrosMode"=>$macrosMode,
- "plugins"=>$plugins,
- "leftMenu"=>true,
- "rightMenu"=>false,
- "toolbar"=>true,
- "header"=>false,
- "autosave"=>$autosave,
- "showReviewChanges"=>true,
- "forcesave"=>$forcesave,
- "toolbarNoTabs"=>$toolbarNoTabs,
- "help"=>false,
- ]
- ]
- ];
- require_once( dirname(__FILE__) . '/jwt/BeforeValidException.php' );
- require_once( dirname(__FILE__) . '/jwt/ExpiredException.php' );
- require_once( dirname(__FILE__) . '/jwt/SignatureInvalidException.php' );
- require_once( dirname(__FILE__) . '/jwt/JWT.php' );
- $GLOBALS['DOC_SERV_JWT_SECRET'] = $app['extra']["token"];
- function isJwtEnabled() {
- return !empty($GLOBALS['DOC_SERV_JWT_SECRET']);
- }
- function jwtEncode($payload) {
- return \Firebase\JWT\JWT::encode($payload, $GLOBALS["DOC_SERV_JWT_SECRET"]);
- }
- if (isJwtEnabled()) {
- $config["token"] = jwtEncode($config);
- }
- if ($app['extra']['toubu']) {
- include_once template('main');
- }else{
- include_once template('index');
- }
-}else{
- $app=C::t('app_market')->fetch_by_identifier('onlyoffice','dzz');
- $app['extra']=unserialize($app['extra']);
- $src=$app['extra']['DocumentUrl'];
- @header("Location: $src/example/");
-}
-?>
diff --git a/dzz/onlyoffice/jwt/BeforeValidException.php b/dzz/onlyoffice/jwt/BeforeValidException.php
deleted file mode 100644
index a6ee2f7..0000000
--- a/dzz/onlyoffice/jwt/BeforeValidException.php
+++ /dev/null
@@ -1,7 +0,0 @@
-
- * @author Anant Narayanan
- * @license http://opensource.org/licenses/BSD-3-Clause 3-clause BSD
- * @link https://github.com/firebase/php-jwt
- */
-class JWT
-{
-
- /**
- * When checking nbf, iat or expiration times,
- * we want to provide some extra leeway time to
- * account for clock skew.
- */
- public static $leeway = 0;
-
- /**
- * Allow the current timestamp to be specified.
- * Useful for fixing a value within unit testing.
- *
- * Will default to PHP time() value if null.
- */
- public static $timestamp = null;
-
- public static $supported_algs = array(
- 'HS256' => array('hash_hmac', 'SHA256'),
- 'HS512' => array('hash_hmac', 'SHA512'),
- 'HS384' => array('hash_hmac', 'SHA384'),
- 'RS256' => array('openssl', 'SHA256'),
- );
-
- /**
- * Decodes a JWT string into a PHP object.
- *
- * @param string $jwt The JWT
- * @param string|array $key The key, or map of keys.
- * If the algorithm used is asymmetric, this is the public key
- * @param array $allowed_algs List of supported verification algorithms
- * Supported algorithms are 'HS256', 'HS384', 'HS512' and 'RS256'
- *
- * @return object The JWT's payload as a PHP object
- *
- * @throws UnexpectedValueException Provided JWT was invalid
- * @throws SignatureInvalidException Provided JWT was invalid because the signature verification failed
- * @throws BeforeValidException Provided JWT is trying to be used before it's eligible as defined by 'nbf'
- * @throws BeforeValidException Provided JWT is trying to be used before it's been created as defined by 'iat'
- * @throws ExpiredException Provided JWT has since expired, as defined by the 'exp' claim
- *
- * @uses jsonDecode
- * @uses urlsafeB64Decode
- */
- public static function decode($jwt, $key, $allowed_algs = array())
- {
- $timestamp = is_null(static::$timestamp) ? time() : static::$timestamp;
-
- if (empty($key)) {
- throw new InvalidArgumentException('Key may not be empty');
- }
- if (!is_array($allowed_algs)) {
- throw new InvalidArgumentException('Algorithm not allowed');
- }
- $tks = explode('.', $jwt);
- if (count($tks) != 3) {
- throw new UnexpectedValueException('Wrong number of segments');
- }
- list($headb64, $bodyb64, $cryptob64) = $tks;
- if (null === ($header = static::jsonDecode(static::urlsafeB64Decode($headb64)))) {
- throw new UnexpectedValueException('Invalid header encoding');
- }
- if (null === $payload = static::jsonDecode(static::urlsafeB64Decode($bodyb64))) {
- throw new UnexpectedValueException('Invalid claims encoding');
- }
- $sig = static::urlsafeB64Decode($cryptob64);
-
- if (empty($header->alg)) {
- throw new UnexpectedValueException('Empty algorithm');
- }
- if (empty(static::$supported_algs[$header->alg])) {
- throw new UnexpectedValueException('Algorithm not supported');
- }
- if (!in_array($header->alg, $allowed_algs)) {
- throw new UnexpectedValueException('Algorithm not allowed');
- }
- if (is_array($key) || $key instanceof \ArrayAccess) {
- if (isset($header->kid)) {
- $key = $key[$header->kid];
- } else {
- throw new UnexpectedValueException('"kid" empty, unable to lookup correct key');
- }
- }
-
- // Check the signature
- if (!static::verify("$headb64.$bodyb64", $sig, $key, $header->alg)) {
- throw new SignatureInvalidException('Signature verification failed');
- }
-
- // Check if the nbf if it is defined. This is the time that the
- // token can actually be used. If it's not yet that time, abort.
- if (isset($payload->nbf) && $payload->nbf > ($timestamp + static::$leeway)) {
- throw new BeforeValidException(
- 'Cannot handle token prior to ' . date(DateTime::ISO8601, $payload->nbf)
- );
- }
-
- // Check that this token has been created before 'now'. This prevents
- // using tokens that have been created for later use (and haven't
- // correctly used the nbf claim).
- if (isset($payload->iat) && $payload->iat > ($timestamp + static::$leeway)) {
- throw new BeforeValidException(
- 'Cannot handle token prior to ' . date(DateTime::ISO8601, $payload->iat)
- );
- }
-
- // Check if this token has expired.
- if (isset($payload->exp) && ($timestamp - static::$leeway) >= $payload->exp) {
- throw new ExpiredException('Expired token');
- }
-
- return $payload;
- }
-
- /**
- * Converts and signs a PHP object or array into a JWT string.
- *
- * @param object|array $payload PHP object or array
- * @param string $key The secret key.
- * If the algorithm used is asymmetric, this is the private key
- * @param string $alg The signing algorithm.
- * Supported algorithms are 'HS256', 'HS384', 'HS512' and 'RS256'
- * @param mixed $keyId
- * @param array $head An array with header elements to attach
- *
- * @return string A signed JWT
- *
- * @uses jsonEncode
- * @uses urlsafeB64Encode
- */
- public static function encode($payload, $key, $alg = 'HS256', $keyId = null, $head = null)
- {
- $header = array('typ' => 'JWT', 'alg' => $alg);
- if ($keyId !== null) {
- $header['kid'] = $keyId;
- }
- if ( isset($head) && is_array($head) ) {
- $header = array_merge($head, $header);
- }
- $segments = array();
- $segments[] = static::urlsafeB64Encode(static::jsonEncode($header));
- $segments[] = static::urlsafeB64Encode(static::jsonEncode($payload));
- $signing_input = implode('.', $segments);
-
- $signature = static::sign($signing_input, $key, $alg);
- $segments[] = static::urlsafeB64Encode($signature);
-
- return implode('.', $segments);
- }
-
- /**
- * Sign a string with a given key and algorithm.
- *
- * @param string $msg The message to sign
- * @param string|resource $key The secret key
- * @param string $alg The signing algorithm.
- * Supported algorithms are 'HS256', 'HS384', 'HS512' and 'RS256'
- *
- * @return string An encrypted message
- *
- * @throws DomainException Unsupported algorithm was specified
- */
- public static function sign($msg, $key, $alg = 'HS256')
- {
- if (empty(static::$supported_algs[$alg])) {
- throw new DomainException('Algorithm not supported');
- }
- list($function, $algorithm) = static::$supported_algs[$alg];
- switch($function) {
- case 'hash_hmac':
- return hash_hmac($algorithm, $msg, $key, true);
- case 'openssl':
- $signature = '';
- $success = openssl_sign($msg, $signature, $key, $algorithm);
- if (!$success) {
- throw new DomainException("OpenSSL unable to sign data");
- } else {
- return $signature;
- }
- }
- }
-
- /**
- * Verify a signature with the message, key and method. Not all methods
- * are symmetric, so we must have a separate verify and sign method.
- *
- * @param string $msg The original message (header and body)
- * @param string $signature The original signature
- * @param string|resource $key For HS*, a string key works. for RS*, must be a resource of an openssl public key
- * @param string $alg The algorithm
- *
- * @return bool
- *
- * @throws DomainException Invalid Algorithm or OpenSSL failure
- */
- private static function verify($msg, $signature, $key, $alg)
- {
- if (empty(static::$supported_algs[$alg])) {
- throw new DomainException('Algorithm not supported');
- }
-
- list($function, $algorithm) = static::$supported_algs[$alg];
- switch($function) {
- case 'openssl':
- $success = openssl_verify($msg, $signature, $key, $algorithm);
- if (!$success) {
- throw new DomainException("OpenSSL unable to verify data: " . openssl_error_string());
- } else {
- return $signature;
- }
- case 'hash_hmac':
- default:
- $hash = hash_hmac($algorithm, $msg, $key, true);
- if (function_exists('hash_equals')) {
- return hash_equals($signature, $hash);
- }
- $len = min(static::safeStrlen($signature), static::safeStrlen($hash));
-
- $status = 0;
- for ($i = 0; $i < $len; $i++) {
- $status |= (ord($signature[$i]) ^ ord($hash[$i]));
- }
- $status |= (static::safeStrlen($signature) ^ static::safeStrlen($hash));
-
- return ($status === 0);
- }
- }
-
- /**
- * Decode a JSON string into a PHP object.
- *
- * @param string $input JSON string
- *
- * @return object Object representation of JSON string
- *
- * @throws DomainException Provided string was invalid JSON
- */
- public static function jsonDecode($input)
- {
- if (version_compare(PHP_VERSION, '5.4.0', '>=') && !(defined('JSON_C_VERSION') && PHP_INT_SIZE > 4)) {
- /** In PHP >=5.4.0, json_decode() accepts an options parameter, that allows you
- * to specify that large ints (like Steam Transaction IDs) should be treated as
- * strings, rather than the PHP default behaviour of converting them to floats.
- */
- $obj = json_decode($input, false, 512, JSON_BIGINT_AS_STRING);
- } else {
- /** Not all servers will support that, however, so for older versions we must
- * manually detect large ints in the JSON string and quote them (thus converting
- *them to strings) before decoding, hence the preg_replace() call.
- */
- $max_int_length = strlen((string) PHP_INT_MAX) - 1;
- $json_without_bigints = preg_replace('/:\s*(-?\d{'.$max_int_length.',})/', ': "$1"', $input);
- $obj = json_decode($json_without_bigints);
- }
-
- if (function_exists('json_last_error') && $errno = json_last_error()) {
- static::handleJsonError($errno);
- } elseif ($obj === null && $input !== 'null') {
- throw new DomainException('Null result with non-null input');
- }
- return $obj;
- }
-
- /**
- * Encode a PHP object into a JSON string.
- *
- * @param object|array $input A PHP object or array
- *
- * @return string JSON representation of the PHP object or array
- *
- * @throws DomainException Provided object could not be encoded to valid JSON
- */
- public static function jsonEncode($input)
- {
- $json = json_encode($input);
- if (function_exists('json_last_error') && $errno = json_last_error()) {
- static::handleJsonError($errno);
- } elseif ($json === 'null' && $input !== null) {
- throw new DomainException('Null result with non-null input');
- }
- return $json;
- }
-
- /**
- * Decode a string with URL-safe Base64.
- *
- * @param string $input A Base64 encoded string
- *
- * @return string A decoded string
- */
- public static function urlsafeB64Decode($input)
- {
- $remainder = strlen($input) % 4;
- if ($remainder) {
- $padlen = 4 - $remainder;
- $input .= str_repeat('=', $padlen);
- }
- return base64_decode(strtr($input, '-_', '+/'));
- }
-
- /**
- * Encode a string with URL-safe Base64.
- *
- * @param string $input The string you want encoded
- *
- * @return string The base64 encode of what you passed in
- */
- public static function urlsafeB64Encode($input)
- {
- return str_replace('=', '', strtr(base64_encode($input), '+/', '-_'));
- }
-
- /**
- * Helper method to create a JSON error.
- *
- * @param int $errno An error number from json_last_error()
- *
- * @return void
- */
- private static function handleJsonError($errno)
- {
- $messages = array(
- JSON_ERROR_DEPTH => 'Maximum stack depth exceeded',
- JSON_ERROR_CTRL_CHAR => 'Unexpected control character found',
- JSON_ERROR_SYNTAX => 'Syntax error, malformed JSON'
- );
- throw new DomainException(
- isset($messages[$errno])
- ? $messages[$errno]
- : 'Unknown JSON error: ' . $errno
- );
- }
-
- /**
- * Get the number of bytes in cryptographic strings.
- *
- * @param string
- *
- * @return int
- */
- private static function safeStrlen($str)
- {
- if (function_exists('mb_strlen')) {
- return mb_strlen($str, '8bit');
- }
- return strlen($str);
- }
-}
diff --git a/dzz/onlyoffice/jwt/SignatureInvalidException.php b/dzz/onlyoffice/jwt/SignatureInvalidException.php
deleted file mode 100644
index 27332b2..0000000
--- a/dzz/onlyoffice/jwt/SignatureInvalidException.php
+++ /dev/null
@@ -1,7 +0,0 @@
-'Document Edit',
- 'setting'=>'Setting',
- 'key'=>'key',
- 'Leave blank to indicate that no key is required'=>'Leave blank to indicate that no key is required',
- 'You can leave it blank, which indicates the address of this website'=>'You can leave it blank, which indicates the address of this website',
- 'head'=>'head',
- 'input_onlyoffice_url'=>'Enter OnlyOffice Document Server API address Enter OnlyOffice Document Server API address',
- 'input_onlyoffice_url_notice'=>'Enter the API address of your onlyoffice Document Server, for example, http://192.168.0.2:90/, based on your document server', 'input_dzzoffice_url'=>'Enter the address of the file server (dzzoffice server)',
- 'input_dzzoffice_url_notice'=>'Fill in your file server address, such as http://dzzoffice.com:90/, fill in according to your dzzoffice server address, blank using the current address. tips: Set the Intranet address to improve file transfer speed',
- 'onlyoffice_enable_failed'=>'OnlyOffice Document Server API address is not specified',
- 'onlyoffice_url_setfailed'=>'The OnlyOffice Document Server API address cannot be empty, and the update fails',
- 'thumbnail_exts'=>'Thumbnail suffix list',
- 'thumbnail_exts_tips'=>'Supports the creation of a thumbnail suffix list, in lowercase letters. Multiple commas in English, such as PDF, doc, docx, PPT, PPTX, XLS, XLSX',
-);
\ No newline at end of file
diff --git a/dzz/onlyoffice/language/index.htm b/dzz/onlyoffice/language/index.htm
deleted file mode 100644
index e69de29..0000000
diff --git a/dzz/onlyoffice/language/zh-cn/index.htm b/dzz/onlyoffice/language/zh-cn/index.htm
deleted file mode 100644
index e69de29..0000000
diff --git a/dzz/onlyoffice/language/zh-cn/lang.php b/dzz/onlyoffice/language/zh-cn/lang.php
deleted file mode 100644
index 662b614..0000000
--- a/dzz/onlyoffice/language/zh-cn/lang.php
+++ /dev/null
@@ -1,17 +0,0 @@
-'文档编辑',
- 'setting'=>'设置',
- 'key'=>' 密钥',
- 'Leave blank to indicate that no key is required'=>'留空表示无需密钥',
- 'You can leave it blank, which indicates the address of this website'=>'可留空,留空表示为本站地址',
- 'head'=>'头部',
- 'input_onlyoffice_url'=>'请输入OnlyOffice Document Server API地址',
- 'input_onlyoffice_url_notice'=>'填写您的onlyoffice Document Server API地址,如:http://192.168.0.2:90/ 根据你的文档服务器填写', 'input_dzzoffice_url'=>'请输入文件服务器(dzzoffice服务器)地址',
- 'input_dzzoffice_url_notice'=>'填写您的文件服务器地址,如:http://dzzoffice.com:90/,根据你的dzzoffice服务器地址填写,留空使用当前地址。tips:设置内网地址可以提高文件传输速度',
- 'onlyoffice_enable_failed'=>'OnlyOffice Document Server API地址未设置',
- 'onlyoffice_url_setfailed'=>'OnlyOffice Document Server API地址不能为空,更新失败',
- 'thumbnail_exts'=>'缩略图后缀列表',
- 'thumbnail_exts_tips'=>'支持生成缩略图的后缀列表,用小写字母。多个用英文逗号隔开,如:pdf,doc,docx,ppt,pptx,xls,xlsx',
-);
\ No newline at end of file
diff --git a/dzz/onlyoffice/onlyoffice.md5 b/dzz/onlyoffice/onlyoffice.md5
deleted file mode 100644
index c3c15d6..0000000
--- a/dzz/onlyoffice/onlyoffice.md5
+++ /dev/null
@@ -1,14 +0,0 @@
-84fef3b0329d06976b731f99ab4796ac *./admin.php
-c7564b649b9e1ceefe6fc366e68c7a79 *classes/filter.php
-b00df56449cf57f92a627fdc348b7ab6 *classes/thumb.php
-0d7988b722f02c59eb3ca6df3f87187a *./dzz_app_onlyoffice.xml
-deb67af3e38c4c2862139285add048bc *./enable.php
-648ad2f7eea95a9b5491dcd2203b2f54 *images/loading.gif
-c2b43b8e7c8d3dd1ebb8246e12c4a55e *images/onlyoffice54.png
-6c07a15737e0a5c8355a7521d500896d *images/onlyofficelogo.png
-1c4e847e0e788648ddf40e1ad64071b2 *./index.php
-bfcf9258e93e16082a8b534bf71282c6 *language/zh-cn/lang.php
-0314330837c01935da23105d46d28693 *template/admin.htm
-fed2a795285b8047337deac7fc912bf2 *template/header_left.htm
-888c9216b68295df4a541d9ef2a74ab3 *template/left.htm
-ba65af59c57c2728e8b4d00f0a14bb9a *template/main.htm
diff --git a/dzz/onlyoffice/template/admin.htm b/dzz/onlyoffice/template/admin.htm
deleted file mode 100644
index 3834e48..0000000
--- a/dzz/onlyoffice/template/admin.htm
+++ /dev/null
@@ -1,239 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/dzz/onlyoffice/template/header_left.htm b/dzz/onlyoffice/template/header_left.htm
deleted file mode 100644
index de65290..0000000
--- a/dzz/onlyoffice/template/header_left.htm
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-{lang appname}
\ No newline at end of file
diff --git a/dzz/onlyoffice/template/index.htm b/dzz/onlyoffice/template/index.htm
deleted file mode 100644
index 8114bd6..0000000
--- a/dzz/onlyoffice/template/index.htm
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/dzz/onlyoffice/template/left.htm b/dzz/onlyoffice/template/left.htm
deleted file mode 100644
index 05ad236..0000000
--- a/dzz/onlyoffice/template/left.htm
+++ /dev/null
@@ -1,4 +0,0 @@
-
-