This commit is contained in:
小胡
2023-08-29 19:49:05 +08:00
Unverified
parent 6fae833ba3
commit d64bb5b48a
31 changed files with 0 additions and 1483 deletions

View File

@@ -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.

View File

@@ -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然后选择提交。

View File

@@ -1,44 +0,0 @@
<?php
/*
* 应用卸载程序示例
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
* @license https://www.oaooa.com/licenses/
*
* @link https://www.oaooa.com
* @author zyx(zyx@oaooa.com)
*/
if (!defined('IN_DZZ') && !defined('IN_ADMIN')) {
exit('Access Denied');
}
$op="admin";
Hook::listen('adminlogin');
$navtitle="onlyoffice配置";
$app=C::t('app_market')->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();
}

View File

@@ -1,20 +0,0 @@
<?php
namespace dzz\onlyoffice\classes;
use \core as C;
use \DB as DB;
use \IO as IO;
class filter{
//private $exts=array('pdf','doc','docx','ppt','pptx','xls','xlsx');
public function run(&$data,$extra){
$app=C::t('app_market')->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;
}
}
}

View File

@@ -1,119 +0,0 @@
<?php
namespace dzz\onlyoffice\classes;
use \core as C;
use \DB as DB;
use \IO as IO;
require_once libfile('class/xml');
class thumb{
// private $exts=array('txt','html','css','');
public function run(&$fileurls, $path){
$meta=IO::getMeta($path);
$meta['stream']=IO::getFileUri($path);
$app=C::t('app_market')->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');
}
}

View File

@@ -1,6 +0,0 @@
<?php
return array(
'allow_robot'=>false,
'about'=>array('name_en'=>'onlyoffice',
'version'=>'小胡版 1.24'),
);

View File

@@ -1,76 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<root>
<item id="Title"><![CDATA[Dzz! app]]></item>
<item id="Version"><![CDATA[2.0]]></item>
<item id="Time"><![CDATA[2020-11-20 13:51]]></item>
<item id="From"><![CDATA[乐云网络 (http://www.dzzoffice.com/)]]></item>
<item id="Data">
<item id="app">
<item id="appname"><![CDATA[onlyoffice]]></item>
<item id="appico"><![CDATA[data:image/png;base64,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
Jw3PiD1p+BBNXV1iVNbdNwAAAABJRU5ErkJggg==
]]></item>
<item id="appdesc"><![CDATA[]]></item>
<item id="appurl"><![CDATA[{dzzscript}?mod=onlyoffice]]></item>
<item id="appadminurl"><![CDATA[{dzzscript}?mod=onlyoffice&op=admin]]></item>
<item id="noticeurl"><![CDATA[]]></item>
<item id="disp"><![CDATA[0]]></item>
<item id="vendor"><![CDATA[小胡版]]></item>
<item id="haveflash"><![CDATA[0]]></item>
<item id="isshow"><![CDATA[1]]></item>
<item id="havetask"><![CDATA[1]]></item>
<item id="hideInMarket"><![CDATA[0]]></item>
<item id="feature"><![CDATA[]]></item>
<item id="fileext"><![CDATA[doc,docx,docm,dot,docxf,dotx,dotm,odt,fodt,ott,rtf,txt,html,htm,mht,xml,pdf,djvu,fb2,epub,xps,oxps,oform,xls,xlsx,xlsm,xlsb,xlt,xltx,xltm,ods,fods,ots,csv,pps,ppsx,ppsm,ppt,pptx,pptm,pot,potx,potm,odp,fodp,otp]]></item>
<item id="group"><![CDATA[0]]></item>
<item id="position"><![CDATA[1]]></item>
<item id="system"><![CDATA[0]]></item>
<item id="notdelete"><![CDATA[1]]></item>
<item id="open"><![CDATA[1]]></item>
<item id="nodup"><![CDATA[0]]></item>
<item id="identifier"><![CDATA[onlyoffice]]></item>
<item id="app_path"><![CDATA[dzz]]></item>
<item id="version"><![CDATA[1.24]]></item>
<item id="upgrade_version"><![CDATA[]]></item>
<item id="check_upgrade_time"><![CDATA[20230824]]></item>
<item id="extra">
<item id="enablefile"><![CDATA[enable.php]]></item>
</item>
<item id="mid"><![CDATA[0]]></item>
</item>
<item id="hooks">
<item id="thumbnail" priority="0" description=""><![CDATA[dzz\onlyoffice\classes\thumb]]></item>
<item id="filter_resource_rid" priority="0" description=""><![CDATA[dzz\onlyoffice\classes\filter]]></item>
<item id="createafter_addindex" priority="0" description=""><![CDATA[dzz\onlyoffice\classes\filter]]></item>
</item>
</item>
</root>

View File

@@ -1,17 +0,0 @@
<?php
/* @authorcode codestrings
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
* @license https://www.oaooa.com/licenses/
*
* @link https://www.oaooa.com
* @author zyx(zyx@oaooa.com)
*/
if (!defined('IN_DZZ') || !defined('IN_ADMIN')) {
exit('Access Denied');
}
if( !isset($apparray['app']['extra']['DocumentUrl']) || !$apparray['app']['extra']['DocumentUrl'] ){
showmessage('onlyoffice_enable_failed' );
exit;
}
$finish = true;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 695 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

View File

@@ -1,252 +0,0 @@
<?php
/*
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
* @license https://www.oaooa.com/licenses/
*
* @link https://www.oaooa.com
* @author zyx(zyx@oaooa.com)
*/
if(!defined('IN_DZZ')) {
exit('Access Denied');
}
$path=dzzdecode(rawurldecode($_GET['path']));
if($_GET['do']=='savefile'){
$result["error"] = 0;
if (($body_stream = file_get_contents("php://input"))===FALSE){
echo "Bad Request";
}
$data = json_decode($body_stream, TRUE);
$uid=intval(dzzdecode($_GET['token']));
$user=getuserbyuid($uid);
include libfile('function/user','','user');
setloginstatus($user,0);
if ($data["status"] == 2 || $data['status']==6){
$downloadUri = $data["url"];
$new_data = curl_file_get_contents($downloadUri);
if(empty($new_data)){
//runlog('onlyoffice',' file_get_contents('.$downloadUri.') failure');
echo "Bad Response";
}else{
$path=dzzdecode($_GET['path']);
$re=IO::setFileContent($path,$new_data,true,true);
if($re['error']){
//runlog('onlyoffice',$re['error']);
exit($re['error']);
}
}
}
echo "{\"error\":0}";
}elseif($_GET['path']){
$app=C::t('app_market')->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/");
}
?>

View File

@@ -1,7 +0,0 @@
<?php
namespace Firebase\JWT;
class BeforeValidException extends \UnexpectedValueException
{
}

View File

@@ -1,7 +0,0 @@
<?php
namespace Firebase\JWT;
class ExpiredException extends \UnexpectedValueException
{
}

View File

@@ -1,370 +0,0 @@
<?php
namespace Firebase\JWT;
use \DomainException;
use \InvalidArgumentException;
use \UnexpectedValueException;
use \DateTime;
/**
* JSON Web Token implementation, based on this spec:
* http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-06
*
* PHP version 5
*
* @category Authentication
* @package Authentication_JWT
* @author Neuman Vong <neuman@twilio.com>
* @author Anant Narayanan <anant@php.net>
* @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);
}
}

View File

@@ -1,7 +0,0 @@
<?php
namespace Firebase\JWT;
class SignatureInvalidException extends \UnexpectedValueException
{
}

View File

@@ -1,17 +0,0 @@
<?php
$lang = array
(
'appname'=>'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',
);

View File

@@ -1,17 +0,0 @@
<?php
$lang = array
(
'appname'=>'文档编辑',
'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',
);

View File

@@ -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

View File

@@ -1,239 +0,0 @@
<!--{template common/header_simple_start}-->
<script type="text/javascript" src="static/js/jquery.textareaexplander.js?{VERHASH}"></script>
<script src="admin/scripts/admin.js?{VERHASH}"></script>
<style>
#cpform{
margin-top: 15px;
}
</style>
<!--{template common/header_simple_end}-->
<!--{template common/commer_header}-->
<div class="bs-container clearfix">
<div class="bs-left-container clearfix">
<!--{template left}-->
</div>
<div class="left-drager">
<div class="left-drager-op">
<div class="left-drager-sub"></div>
</div>
</div>
<div class="bs-main-container clearfix">
<div class="main-content">
<form id="cpform" action="{MOD_URL}&op=admin" class="form-horizontal" method="post" name="cpform">
<input type="hidden" value="{FORMHASH}" name="formhash">
<input type="hidden" name="confirmsubmit" value="true" />
<div class="row mb-3">
<label class="col-sm-2" for="app_key">{lang input_onlyoffice_url}</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="app_key" name="app_key" autocomplete="off" value="{$app[extra][DocumentUrl]}" required="true">
<span class="help-block">{lang input_onlyoffice_url_notice}</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2" for="exts">{lang thumbnail_exts}</label>
<div class="col-sm-10">
<textarea type="textarea" class="form-control" cols="3" id="exts" name="exts" autocomplete="off">{$app[extra]['exts']}</textarea>
<span class="help-block">{lang thumbnail_exts_tips}</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2" for="token">{lang key}</label>
<div class="col-sm-10">
<textarea type="textarea" class="form-control" cols="3" id="token" name="token" autocomplete="off">{$app[extra]['token']}</textarea>
<span class="help-block">{lang Leave blank to indicate that no key is required}</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">回调程序处理方式</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="callback1" name="callback" value="1" <!--{if $app[extra]['callback']==1}-->checked="chcked"<!--{/if}-->>
<label class="form-check-label" for="callback1">方案一</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="callback2" name="callback" value="2" <!--{if $app[extra]['callback']==2}-->checked="chcked"<!--{/if}-->>
<label class="form-check-label" for="callback2">方案二</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="callback3" name="callback" value="3" <!--{if $app[extra]['callback']==3}-->checked="chcked"<!--{/if}-->>
<label class="form-check-label" for="callback3">方案三</label>
</div>
<span class="help-block">方案一最后一个用户关闭所编辑的文档后保存到dzz上。默认方案</span>
<span class="help-block">方案二方案一和每次保存时都会保存到dzz上。例如单击保存按钮和自动强制保存时</span>
<span class="help-block">方案三方案一和自动强制保存时都会保存到dzz上。自行配置自动强制保存的间隔时间</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang head}</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="toubu1" name="toubu" <!--{if $app[extra]['toubu']=='1'}-->checked="checked"<!--{/if}--> value="1">
<label class="form-check-label" for="toubu1">{lang show}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="toubu2" name="toubu" <!--{if $app[extra]['toubu']=='0'}-->checked="checked"<!--{/if}--> value="0">
<label class="form-check-label" for="toubu2">{lang no_show}</label>
</div>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">过滤器</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="modifyFilter1" name="modifyFilter" <!--{if $app[extra]['modifyFilter']=='1'}-->checked="checked"<!--{/if}--> value="1">
<label class="form-check-label" for="modifyFilter1">{lang yes}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="modifyFilter2" name="modifyFilter" <!--{if $app[extra]['modifyFilter']=='0'}-->checked="checked"<!--{/if}--> value="0">
<label class="form-check-label" for="modifyFilter2">{lang no}</label>
</div>
<span class="help-block">是否可以全局应用影响所有其他用户或仅适用于当前用户。如果用户具有编辑权限,则仅对电子表格编辑器可用。无配置默认为开启。当开启时,会影响筛选功能。</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">自动保存</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="autosave1" name="autosave" <!--{if $app[extra]['autosave']=='1'}-->checked="checked"<!--{/if}--> value="1">
<label class="form-check-label" for="autosave1">开启</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="autosave2" name="autosave" <!--{if $app[extra]['autosave']=='0'}-->checked="checked"<!--{/if}--> value="0">
<label class="form-check-label" for="autosave2">关闭</label>
</div>
<span class="help-block">无配置默认为关闭。</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">聊天</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="chat1" name="chat" <!--{if $app[extra]['chat']=='1'}-->checked="checked"<!--{/if}--> value="1">
<label class="form-check-label" for="chat1">{lang yes}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="chat2" name="chat" <!--{if $app[extra]['chat']=='0'}-->checked="checked"<!--{/if}--> value="0">
<label class="form-check-label" for="chat2">{lang no}</label>
</div>
<span class="help-block">是否开启聊天功能,无配置默认为开启。</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">菜单栏</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="compactHeader1" name="compactHeader" <!--{if $app[extra]['compactHeader']=='1'}-->checked="checked"<!--{/if}--> value="1">
<label class="form-check-label" for="compactHeader1">{lang yes}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="compactHeader2" name="compactHeader" <!--{if $app[extra]['compactHeader']=='0'}-->checked="checked"<!--{/if}--> value="0">
<label class="form-check-label" for="compactHeader2">{lang no}</label>
</div>
<span class="help-block">是否将菜单栏放在在徽标旁边使界面更加紧凑。无配置默认为否。</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">顶部工具栏</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="compactToolbar1" name="compactToolbar" <!--{if $app[extra]['compactToolbar']=='1'}-->checked="checked"<!--{/if}--> value="1">
<label class="form-check-label" for="compactToolbar1">紧凑</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="compactToolbar2" name="compactToolbar" <!--{if $app[extra]['compactToolbar']=='0'}-->checked="checked"<!--{/if}--> value="0">
<label class="form-check-label" for="compactToolbar2">展开</label>
</div>
<span class="help-block">展开还是紧凑顶部工具栏。展开后多余菜单将在右侧折叠点击显示。无配置默认为紧凑。</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">注释/批注菜单</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="comments1" name="comments" <!--{if $app[extra]['comments']=='1'}-->checked="checked"<!--{/if}--> value="1">
<label class="form-check-label" for="comments1">{lang yes}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="comments2" name="comments" <!--{if $app[extra]['comments']=='0'}-->checked="checked"<!--{/if}--> value="0">
<label class="form-check-label" for="comments2">隐藏</label>
</div>
<span class="help-block">显示还是隐藏“注释”菜单按钮;请注意,如果您隐藏“评论”按钮,则相应的评论功能将仅可用于查看,评论的添加和编辑将不可用。无配置默认为隐藏。</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">宏设置</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="macros1" name="macros" <!--{if $app[extra]['macros']=='1'}-->checked="checked"<!--{/if}--> value="1">
<label class="form-check-label" for="macros1">{lang yes}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="macros2" name="macros" <!--{if $app[extra]['macros']=='0'}-->checked="checked"<!--{/if}--> value="0">
<label class="form-check-label" for="macros2">{lang no}</label>
</div>
<span class="help-block">是否可以运行文档宏以及可用的宏设置。无配置默认为否。</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">运行文档宏</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="macrosMode1" name="macrosMode" <!--{if $app[extra]['macrosMode']=='1'}-->checked="checked"<!--{/if}--> value="1">
<label class="form-check-label" for="macrosMode1">根本不运行</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="macrosMode2" name="macrosMode" <!--{if $app[extra]['macrosMode']=='2'}-->checked="checked"<!--{/if}--> value="2">
<label class="form-check-label" for="macrosMode2">自动运行所有宏</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="macrosMode3" name="macrosMode" <!--{if $app[extra]['macrosMode']=='0'}-->checked="checked"<!--{/if}--> value="0">
<label class="form-check-label" for="macrosMode3">警告宏并请求允许运行</label>
</div>
<span class="help-block">是否将运行文档宏。无配置默认为警告宏并请求允许运行。</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">插件</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="plugins1" name="plugins" <!--{if $app[extra]['plugins']=='1'}-->checked="checked"<!--{/if}--> value="1">
<label class="form-check-label" for="plugins1">{lang yes}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="plugins2" name="plugins" <!--{if $app[extra]['plugins']=='0'}-->checked="checked"<!--{/if}--> value="0">
<label class="form-check-label" for="plugins2">{lang no}</label>
</div>
<span class="help-block">是否将启动插件并可用。无配置默认为关闭。</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">工具栏选项卡样式</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="toolbarNoTabs1" name="toolbarNoTabs" <!--{if $app[extra]['toolbarNoTabs']=='1'}-->checked="checked"<!--{/if}--> value="1">
<label class="form-check-label" for="toolbarNoTabs1">{lang yes}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="toolbarNoTabs2" name="toolbarNoTabs" <!--{if $app[extra]['toolbarNoTabs']=='0'}-->checked="checked"<!--{/if}--> value="0">
<label class="form-check-label" for="toolbarNoTabs2">{lang no}</label>
</div>
<span class="help-block">是否突出显示顶部工具栏选项卡样式。无配置默认为否。</span>
</div>
</div>
<dl>
<input class="btn btn-primary" id="submit_editsubmit" name="settingsubmit" value="{lang submit}" type="submit">
</dl>
</form>
</div>
</div>
</div>
<script type="text/javascript">
jQuery(document).ready(function(e) {
jQuery('input[required]').on('blur', function() {
if(this.value == '') { jQuery(this).addClass('input-error') } else { jQuery(this).removeClass('input-error'); }
});
});
</script>
<!--{template common/footer_simple}-->

View File

@@ -1,3 +0,0 @@
<a class="leftTopmenu navbar-brand" onclick="_header.leftTopmenu(this)">
<div class="gb_fc"><span class="dzz dzz-menu"></span></div>
{lang appname}</a>

View File

@@ -1,22 +0,0 @@
<!--{template common/header_simple_start}-->
<script type="text/javascript" src="$onlyDocumentUrl"></script>
<!--{template common/header_simple_end}-->
<style>
html,body{
height:100%;
overflow:hidden;
}
</style>
<div id="placeholder" style="width:100%;height:100%;overflow:auto"></div>
<script type="text/javascript">
var сonnectEditor = function () {
config = <!--{eval echo json_encode($config);}-->;
docEditor = new DocsAPI.DocEditor("placeholder", config);
};
if (window.addEventListener) {
window.addEventListener("load", сonnectEditor);
} else if (window.attachEvent) {
window.attachEvent("load", сonnectEditor);
}
</script>
<!--{template common/footer_simple}-->

View File

@@ -1,4 +0,0 @@
<ul class="nav-stacked nav-pills">
<li class="nav-item"><a <!--{if $op=="admin" }--> class="nav-link active"<!--{/if}-->hidefocus="true" href="{BASESCRIPT}?mod={MOD_NAME}&op=admin">{lang setting}</a></li>
</ul>

View File

@@ -1,30 +0,0 @@
<!--{template common/header_simple_start}-->
<script type="text/javascript" src="$onlyDocumentUrl"></script>
<!--{template common/header_simple_end}-->
<style>
html,body{
height:100%;
overflow:hidden;
}
iframe{
border-radius: var(--radius);
}
</style>
<!--{template commer_header}-->
<div class="bs-container clearfix">
<div class="bs-main-container clearfix">
<div id="placeholder" style="width:100%;height:100%;overflow:auto"></div>
<script type="text/javascript">
var сonnectEditor = function () {
config = <!--{eval echo json_encode($config);}-->;
docEditor = new DocsAPI.DocEditor("placeholder", config);
};
if (window.addEventListener) {
window.addEventListener("load", сonnectEditor);
} else if (window.attachEvent) {
window.attachEvent("load", сonnectEditor);
}
</script>
</div>
</div>
<!--{template common/footer_simple}-->