Skip to content

Commit 18838ef

Browse files
committed
2.0beta
1 parent 70e0eb7 commit 18838ef

File tree

3,714 files changed

+641321
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,714 files changed

+641321
-0
lines changed

.htaccess

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<IfModule mod_rewrite.c>
2+
Options +FollowSymlinks
3+
RewriteEngine On
4+
RewriteCond %{REQUEST_FILENAME} !-d
5+
RewriteCond %{REQUEST_FILENAME} !-f
6+
7+
RewriteRule ^wopi\/files\/(\w+)\/contents(.*)$ core/api/wopi/index.php?action=contents&path=$1&$2 [QSA,PT,L]
8+
RewriteRule ^wopi\/files\/(\w+)\/(lock|unlock)(.*)$ core/api/wopi/index.php?action=$2&path=$1&$3 [QSA,PT,L]
9+
RewriteRule ^wopi\/files\/(\w+)(.*)$ core/api/wopi/index.php?path=$1&$2 [QSA,PT,L]
10+
RewriteRule ^wopi\/files\/(.*)$ core/api/wopi/index.php?$1 [QSA,PT,L]
11+
12+
13+
</IfModule>

INSTALL.md

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
2+
### DzzOffice2.0 程序简介
3+
4+
Dzzoffice是一套开源办公套件,适用于企业、团队搭建自己的 类似“Google企业应用套件”、“微软Office365”的企业协同办公平台。套件由多个工具组成,包含但不限于如:
5+
6+
**网盘:** 企业、团队文件集中管理。主要体现的功能是支持企业部门的组织架构建立共享目录,也支持组的方式灵活建立共享目录。支持文件标签,多版本,评论,详细的目录权限等协作功能。
7+
8+
**文档:** 在线 Word 文档协作工具。前端做了一套模板管理,用于企业添加自己的常用文档模板,如空白合同。后端支持 office online server,onlyoffice,collaboraoffice 来实现文档预览与协同编辑。
9+
10+
**表格:** 在线 Excel 协作工具。同上
11+
12+
**演示文稿:** 在线 PPT 文档浏览、编辑工具。同上
13+
14+
**记录:** 多人参与协作的记录本,主要体现协作记录内容。
15+
16+
**新闻:** 文章系统,可用于企业新闻,通知等用途
17+
18+
**通讯录:** 企业人员联系方式查询
19+
20+
**文集:** 通过树形目录有序管理文档。支持 Markdown 编辑,支持导入导出 txt,epub、mobi、azw3
21+
22+
**相册:** 企业,团队图片管理
23+
24+
**任务板:** 任务管理、团队协作
25+
26+
**讨论板:** 内部论坛设置
27+
28+
**表单:** 表单,问卷工具
29+
30+
企业根据需要可以只使用一款工具,也可以多款工具组合使用。例如团队需要一个任务管理工具,可以只安装一个任务板,登陆系统会直接进入任务板工具,没有其他工具的干扰。如果多个工具组合使用,可以设置默认登陆到哪个工具里。
31+
32+
33+
### DzzOffice的下载及技术支持
34+
35+
1. 官方网站:http://www.dzzoffice.com
36+
2. github地址:https://github.com/zyx0814/dzzoffice
37+
3. https://gitee.com/zyx0814/dzzoffice
38+
39+
40+
### DzzOffice安装方法
41+
42+
1. 上传文件到服务器。
43+
44+
2. 设置目录属性(windows 服务器可忽略这一步)
45+
以下这些目录需要可读写权限
46+
./config
47+
./data 含子目录
48+
49+
3. 执行安装脚本 /install/
50+
请在浏览器中运行 install 程序,即访问 http://您的域名/install/
51+
52+
4. 参照页面提示,进行安装,直至安装完毕。
53+
54+
5. 在开始面板中打开“管理”“系统工具”应用,更新系统缓存。
55+
56+
### DzzOffice首次安装配置说明
57+
58+
1. 程序安装后,默认会进入管理应用,先打开系统工具 更新系统缓存。
59+
60+
2. 打开 应用市场 ,在线安装所需应用,安装完成后在已安装里面启用需要的应用。
61+
62+
3. 进入 管理 -> 系统设置内,设置默认首页,平台名称、平台logo等。
63+
64+
4. 点击导航头部右侧 开始菜单,查看各个应用是否正常。

admin.php

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
/*
3+
* @copyright Leyun internet Technology(Shanghai)Co.,Ltd
4+
* @license http://www.dzzoffice.com/licenses/license.txt
5+
* @package DzzOffice
6+
* @link http://www.dzzoffice.com
7+
* @author zyx([email protected])
8+
*/
9+
define('IN_ADMIN', TRUE);
10+
define('NOROBOT', TRUE);
11+
define('ADMINSCRIPT', basename(__FILE__));
12+
define('BASESCRIPT', basename(__FILE__));
13+
define('CURSCRIPT', 'admin');
14+
define('APPTYPEID', 0);
15+
16+
require './core/adminstart.php';
17+
18+
19+

admin/appmarket/appupgrade.php

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<?php
2+
/*
3+
* @copyright Leyun internet Technology(Shanghai)Co.,Ltd
4+
* @license http://www.dzzoffice.com/licenses/license.txt
5+
* @package DzzOffice
6+
* @link http://www.dzzoffice.com
7+
* @author zyx([email protected])
8+
*/
9+
if (!defined('IN_DZZ') || !defined('IN_ADMIN')) {
10+
exit('Access Denied');
11+
}
12+
$navtitle=lang('upgrade').' - '.lang('appname');
13+
include libfile('function/organization');
14+
$op=$_GET['op'];
15+
16+
//获取所有标签top50;
17+
//$tags = DB::fetch_all("SELECT * FROM %t WHERE hot>0 ORDER BY HOT DESC limit 50", array('app_tag'),'appid');
18+
19+
$keyword = trim($_GET['keyword']);
20+
$tagid = intval($_GET['tagid']);
21+
$group = intval($_GET['group']);
22+
$page = empty($_GET['page']) ? 1 : intval($_GET['page']);
23+
$perpage = 20;
24+
$gets = array('mod' => 'appmarket', 'keyword' => $keyword, 'tagid' => $tagid, 'group' => $group);
25+
$theurl = BASESCRIPT . "?" . url_implode($gets);
26+
$refer = urlencode($theurl . '&page=' . $page);
27+
28+
$order = 'ORDER BY disp';
29+
$start = ($page - 1) * $perpage;
30+
$apps = array();
31+
if ($keyword) {
32+
if ($count = DB::result_first("SELECT COUNT(*) FROM " . DB::table('app_market') . " WHERE upgrade_version!='' and available>0 and appname like '%$keyword%' or vendor like '%$keyword%'")) {
33+
$apps = DB::fetch_all("SELECT * FROM " . DB::table('app_market') . " WHERE upgrade_version!='' and available>0 and appname like '%$keyword%' or vendor like '%$keyword%' $order limit $start,$perpage");
34+
$multi = multi($count, $perpage, $page, $theurl, 'pull-right');
35+
}
36+
} elseif ($tagid) {
37+
$appids = C::t('app_relative') -> fetch_appids_by_tagid($tagid);
38+
if ($count = DB::result_first("SELECT COUNT(*) FROM " . DB::table('app_market') . " WHERE upgrade_version!='' and available>0 and appid IN (" . dimplode($appids) . ") $sql")) {
39+
$apps = DB::fetch_all("SELECT * FROM " . DB::table('app_market') . " WHERE upgrade_version!='' and available>0 and appid IN (" . dimplode($appids) . ") $sql $order limit $start,$perpage");
40+
$multi = multi($count, $perpage, $page, $theurl, 'pull-right');
41+
}
42+
} else {
43+
$sql = " and upgrade_version!='' and available>0";
44+
if ($group) {
45+
$sql = " and upgrade_version!='' and `group` = '{$group}'";
46+
}
47+
if ($count = DB::result_first("SELECT COUNT(*) FROM " . DB::table('app_market') . " WHERE 1 $sql")) {
48+
$apps = DB::fetch_all("SELECT * FROM " . DB::table('app_market') . " WHERE 1 $sql $order limit $start,$perpage");
49+
$multi = multi($count, $perpage, $page, $theurl);
50+
}
51+
}
52+
53+
$list = array();
54+
$grouptitle = array('0' => lang('all'), '-1' => lang('visitors_visible'), '1' => lang('members_available'), '2' => lang('section_administrators_available'), '3' => lang('system_administrators_available'));
55+
foreach ($apps as $value) {
56+
$value['tags'] = C::t('app_relative') -> fetch_all_by_appid($value['appid']);
57+
if ($value['appico'] != 'dzz/images/default/icodefault.png' && !preg_match("/^(http|ftp|https|mms)\:\/\/(.+?)/i", $value['appico'])) {
58+
$value['appico'] = $_G['setting']['attachurl'] . $value['appico'];
59+
}
60+
$value['appurl'] = replace_canshu($value['appurl']);
61+
$value['grouptitle'] = $grouptitle[$value['group']];
62+
$value['department'] = getDepartmentByAppid($value['appid']);
63+
$value['upgrade_version'] = unserialize($value['upgrade_version']);
64+
$list[] = $value;
65+
}
66+
include template('upgrade');
67+
?>

admin/appmarket/check_upgrade.php

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<?php
2+
/*
3+
* 检测应用更新
4+
* @copyright Leyun internet Technology(Shanghai)Co.,Ltd
5+
* @license http://www.dzzoffice.com/licenses/license.txt
6+
* @package DzzOffice
7+
* @link http://www.dzzoffice.com
8+
* @author qchlian([email protected])
9+
*/
10+
if(!defined('IN_DZZ')) {
11+
exit('Access Denied');
12+
}
13+
14+
include_once DZZ_ROOT . './core/core_version.php';
15+
require_once libfile('function/admin');
16+
include_once libfile('function/cache');
17+
$map=array();
18+
$today = dgmdate(TIMESTAMP,'Ymd');
19+
$map["available"]=1;
20+
$applist = C::tp_t('app_market')->where($map)->select();
21+
22+
$return = array("sum"=>0);
23+
$num=0;
24+
if( $applist ){
25+
$dzz_upgrade = new dzz_upgrade_app();
26+
$appinfo=array();
27+
$appinfo["mysqlversion"] = helper_dbtool::dbversion();
28+
$appinfo["phpversion"] = PHP_VERSION ;
29+
$appinfo["dzzversion"] = CORE_VERSION;
30+
foreach($applist as $k=>$v ){
31+
if(empty($v['app_path'])) $v['app_path']='dzz';
32+
$savedata=array();
33+
if( $v["mid"]>0){//云端检测
34+
if( $v["upgrade_version"] ){
35+
$num++;
36+
}else{
37+
if( $v["mid"]==80 ){
38+
//根据当前版本查询是否需要更新
39+
$info=array_merge($v,$appinfo);
40+
$response = $dzz_upgrade->check_upgrade_byversion( $info );
41+
if($response && $response["status"]==1 ) {
42+
$map=array(
43+
"upgrade_version"=>serialize($response["data"]),
44+
"check_upgrade_time"=>dgmdate(TIMESTAMP,'Ymd')
45+
);
46+
$re=C::tp_t('app_market')->where("appid=".$v['appid'])->save( $map );
47+
$num++;
48+
}
49+
}
50+
}
51+
}else{//本地检测
52+
$file = DZZ_ROOT . './'.$v['app_path'].'/' . $v['identifier'] . '/dzz_app_' . $v['identifier'] . '.xml';
53+
if ( file_exists($file) ) {
54+
$importtxt = @implode('', file($file));
55+
$apparray = getimportdata('Dzz! app',0,0,$importtxt);
56+
if($apparray["app"]["version"]>$v["version"]){
57+
$num++;
58+
$savedata=array( "upgrade_version"=>serialize($apparray["app"]), "check_upgrade_time"=>$today );
59+
$re= C::tp_t('app_market')->where("appid=".$v["appid"])->save( $savedata );
60+
}
61+
}
62+
}
63+
}
64+
}
65+
$return["sum"]=$num;
66+
exit( json_encode( $return ) );
67+
?>

admin/appmarket/cloudappmarket.php

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<?php
2+
/*
3+
* @copyright Leyun internet Technology(Shanghai)Co.,Ltd
4+
* @license http://www.dzzoffice.com/licenses/license.txt
5+
* @package DzzOffice
6+
* @link http://www.dzzoffice.com
7+
* @author zyx([email protected])
8+
*/
9+
10+
if (!defined('IN_DZZ') || !defined('IN_ADMIN')) {
11+
exit('Access Denied');
12+
}
13+
$navtitle=lang('appname');
14+
include libfile('function/organization');
15+
$op='cloudappmarket';
16+
$cloudurl = APP_CHECK_URL."index.php";
17+
$url=APP_CHECK_URL."market/app/list";//$cloudurl."?mod=dzzmarket&op=index_ajax";
18+
$type=empty($_GET['type'])?1:intval($_GET['type']);
19+
$page = empty($_GET['page'])?1:intval($_GET['page']);
20+
$keyword=trim($_GET['keyword']);
21+
$classid=intval($_GET['classid']);
22+
$post_data = array("siteuniqueid"=>$_G["setting"]["siteuniqueid"],"page"=>$page,"type"=>1 );
23+
$json = curlcloudappmarket($url,$post_data);
24+
$json = json_decode($json,true);
25+
$list=array();
26+
$total=0;
27+
if( $json["status"]==1){
28+
$list = $json["data"]["list"];
29+
$total = $json["data"]["total"];
30+
$perpage = $json["data"]["perpage"];
31+
//$perpage =1;
32+
$theurl = BASESCRIPT."?mod=".MOD_NAME."&op=cloudappmarket";
33+
$multi=multi($total, $perpage, $page, $theurl);
34+
}
35+
//print_r($list);exit;
36+
$local_applist=C::tp_t("app_market")->select();
37+
if( $list ){
38+
foreach($list as $k=>$v){
39+
$list[$k]["local_appinfo"]=array();
40+
$list[$k]["baseinfo"]=base64_encode( serialize($v) );
41+
if( $v["identifier"] ){
42+
foreach($local_applist as $k2=>$v3){
43+
if($v["identifier"]==$v3["identifier"]){
44+
$list[$k]["local_appinfo"]=$v3;
45+
break;
46+
}
47+
}
48+
}
49+
}
50+
}
51+
include template('cloudappmarket');
52+
exit;
53+
function curlcloudappmarket( $url="",$post_data="", $token="" ){
54+
$curl = curl_init();
55+
curl_setopt($curl, CURLOPT_URL, $url);
56+
curl_setopt($curl, CURLOPT_HEADER, 0);
57+
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
58+
curl_setopt($curl, CURLOPT_POST, 1);
59+
curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
60+
$response = curl_exec($curl);
61+
$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
62+
$errorno = curl_errno($curl);
63+
if ($errorno) {
64+
return($errorno);
65+
}
66+
return($response);
67+
}
68+
?>

0 commit comments

Comments
 (0)