version 4.2 release

pull/212/head 4.2
warlee 2017-09-11 23:46:06 +08:00
parent edfed0c318
commit 8c6069c2e3
109 changed files with 335 additions and 287 deletions

View File

@ -1,3 +1,19 @@
### ver4.2 `2017/9/11`
-----
#### update:
- https服务器兼容性调整优化
- 管理员查看群组;进入真实目录优化
- 导航子菜单加入,插件支持添加自定义菜单
#### fix bug
- 安全及性能优化
- 移动端
- 去除鼠标提示title
- 点击菜单事件优化
- 移动端视频文件图标问题
- 导航菜单加入
### ver4.1 `2017/9/5`
-----

View File

@ -9,16 +9,36 @@ class SSO{
$sessionPath = $basicPath.'data/session/';
if(file_exists($basicPath.'define.php')){
include($basicPath.'define.php');
$sessionPath = DATA_PATH;
$sessionPath = DATA_PATH.'session/';
}
if(!file_exists($sessionPath)){
mkdir($sessionPath);
}
$sessionSavePath = @session_save_path();
@session_write_close();
@session_name($sessionName);
@session_save_path($sessionPath);
if( class_exists('SaeStorage') ||
defined('SAE_APPNAME') ||
defined('SESSION_PATH_DEFAULT') ||
@ini_get('session.save_handler') != 'files' ||
isset($_SERVER['HTTP_APPNAME']) ){
//sae 关闭自定义session路径
}else{
@session_save_path($sessionPath);//session path
}
@session_id($sessionID);
@session_start();
$_SESSION['kodSSO'] = true;
@session_write_close();
unset($_SESSION);
@session_start();
if(!$_SESSION['kodSSO']){
@session_save_path($sessionSavePath);//session path
@session_start();
$_SESSION['kodSSO'] = true;
@session_write_close();
}
//echo '<pre>';var_dump($_SESSION);echo '</pre>';exit;
return $_SESSION;
}

View File

@ -53,11 +53,9 @@ class app extends Controller{
*/
public function userApp() {
$path = _DIR($this->in['path']);
if (isset($this->in['action']) &&
$this->in['action'] == 'add'){
if(get_path_ext($path) != 'oexe'){
$path .= '.oexe';
}
if (!checkExt($path)) {
show_json(LNG('error'));exit;
}

View File

@ -13,11 +13,6 @@ class desktop extends Controller{
}
public function index() {
$wap = is_wap() && (!isset($_COOKIE['forceWap']) || $_COOKIE['forceWap'] == '1');
if($wap){
header("location:./index.php?explorer");
exit;
}
$desktopApps = include(DATA_PATH.'system/desktop_app.php');
$wall = $this->config['user']['wall'];
if(strlen($wall)<3){

View File

@ -47,7 +47,9 @@ class editor extends Controller{
public function fileGet(){
if(isset($this->in['fileUrl'])){
$pass = $this->config['settingSystem']['systemPassword'];
$urlInfo = parse_url_query($this->in['fileUrl']);
$fileUrl = _DIR_CLEAR($this->in['fileUrl']);
$fileUrl = str_replace(':/','://',$fileUrl);
$urlInfo = parse_url_query($fileUrl);
if( isset($urlInfo['fid']) &&
strlen(Mcrypt::decode($urlInfo['fid'],$pass)) != 0
){
@ -58,7 +60,7 @@ class editor extends Controller{
}
}else{
$displayName = rawurldecode($urlInfo['name']);
$filepath = $this->in['fileUrl'].'&accessToken='.access_token_get();
$filepath = $fileUrl.'&accessToken='.access_token_get();
}
}else{
$displayName = rawurldecode($this->in['filename']);

View File

@ -141,8 +141,7 @@ class explorer extends Controller{
$ext = get_path_ext($new);
$tplFile = $tplPath.'newfile.'.$ext;
if(file_exists($tplFile)){
$content = file_get_contents($tplFile);
file_put_contents($new,$content);
copy_dir($tplFile,$new);
}
}
Hook::trigger("explorer.mkfileAfter",$new);
@ -170,7 +169,7 @@ class explorer extends Controller{
public function pathRname(){
$rnameTo=_DIR($this->in['rnameTo']);
if (file_exist_case($rnameTo)) {
if (file_exists_case($rnameTo)) {
show_json(LNG('name_isexists'),false);
}
Hook::trigger("explorer.pathRnameBefore",$this->path,$rnameTo);

View File

@ -490,22 +490,24 @@ class share extends Controller{
// 获取文件数据
public function fileGet(){
if(isset($this->in['fileUrl'])){
if(isset($this->in['fileUrl'])){ //http
$displayName = $this->in['name'];
$filepath = $this->in['fileUrl'];
$filepath = _DIR_CLEAR($this->in['fileUrl']);
$filepath = str_replace(':/','://',$filepath);
}else{
$displayName = _DIR_CLEAR(rawurldecode($this->in['filename']));
$filepath= $this->sharePath.iconv_system($displayName);
if (!file_exists($filepath)){
show_json(LNG('not_exists'),false);
}
if (!path_readable($filepath)){
show_json(LNG('no_permission_read'),false);
}
if (filesize($filepath) >= 1024*1024*20){
show_json(LNG('edit_too_big'),false);
}
if (!file_exists($filepath)){
show_json(LNG('not_exists'),false);
}
}
$fileContents=file_get_contents($filepath);//文件内容
$charset=get_charset($fileContents);
if ($charset!='' &&

View File

@ -527,7 +527,7 @@ class user extends Controller{
$this->initAuth();
if(in_array(ST,$this->notCheckST)) return;//不需要判断的控制器
if(in_array(ACT,$this->notCheckACT)) return;//不需要判断的action
if(in_array(ST.'.'.ACT,$this->notCheckApp)) return;//不需要判断的对应入口
if(in_array(ST.'.'.ACT,$this->notCheckApp)) return;//不需要判断的对应入口
if (!array_key_exists(ST,$this->config['roleSetting']) ) return;
if (!in_array(ACT,$this->config['roleSetting'][ST])) return;//输出处理过的权限
$this->_checkCSRF();

File diff suppressed because one or more lines are too long

View File

@ -49,7 +49,7 @@ class Application {
$subDir = $this -> subDir ? $this -> subDir . '/' : '';
$classFile = CONTROLLER_DIR . $subDir.$class.'.class.php';
$className = $class;//.'Controller'
if (!file_exists($classFile)) {
if (!file_exists_case($classFile)) {
show_tips($class.' controller not exists!');
}
if (!class_exists($className)) {
@ -85,8 +85,21 @@ class Application {
$URI = $GLOBALS['in']['URLremote'];
if (!isset($URI[0]) || $URI[0] == '') $URI[0] = $this->defaultController;
if (!isset($URI[1]) || $URI[1] == '') $URI[1] = $this->defaultAction;
define('ST',$URI[0]);
define('ACT',$URI[1]);
//需要校验权限的方法,统一大小写敏感;处理需要权限的方法
$roleSetting = $GLOBALS['config']['roleSetting'];
$st = $URI[0];
$act = $URI[1];
if (array_key_exists($st,$roleSetting) ){
if( !in_array($act,$roleSetting[$st]) &&
in_array_not_case($act,$roleSetting[$st])
){
show_tips($act.' action not exists!');
}
}
define('ST',$st);
define('ACT',$act);
//自动加载运行类。
$this->autorun();
$this->appRun(ST,ACT);

View File

@ -117,6 +117,11 @@ function filter_html($html){
return preg_replace($find,$replace,$html);
}
function in_array_not_case($needle, $haystack) {
return in_array(strtolower($needle),array_map('strtolower',$haystack));
}
/**
* 将obj深度转化成array
*

View File

@ -127,13 +127,13 @@ function get_filesize($path){
}
//文件是否存在,区分文件大小写
function file_exist_case( $fileName){
function file_exists_case( $fileName){
if(file_exists($fileName) === false){
return false;
}
$status = false;
$directoryName = dirname( $fileName );
$fileArray = glob( $directoryName . '/*', GLOB_NOSORT );
$fileArray = glob( $directoryName . '/*', GLOB_NOSORT);
if ( preg_match( "/\\\|\//", $fileName) ){
$array = preg_split("/\\\|\//", $fileName);
$fileName = $array[ count( $array ) -1 ];
@ -148,6 +148,7 @@ function file_exist_case( $fileName){
return $status;
}
function path_readable($path){
$result = intval(is_readable($path));
if($result){

View File

@ -2,10 +2,6 @@
//扩展名权限判断 有权限则返回1 不是true
function checkExt($file){
// $ext = get_path_ext($file);
// if($ext == 'php' || $ext == 'txt') return 0;
// return 1;
if (strstr($file,'<') || strstr($file,'>') || $file=='') {
return 0;
}

View File

@ -545,7 +545,7 @@ function url_header($url){
$result = array(
'url' => $fileUrl,
'length' => $length,
'name' => $name,
'name' => trim($name,'"'),
'supportRange' =>$supportRange && ($length!=0),
'all' => $header,
);

File diff suppressed because one or more lines are too long

View File

@ -99,6 +99,7 @@ class KodArchive {
$result[$i]['filename'] = str_replace(array('../','..\\'),"_",$result[$i]['filename']);
if($output){
$result[$i]['filename'] = iconv_to($result[$i]['filename'],$charset,'utf-8');
unset($result[$i]['stored_filename']);
}
}
return array('code'=>true,'data'=>$result);

View File

@ -75,6 +75,12 @@ class PluginBase{
final function filePath($path){
if(substr($path,0,4) == 'http'){
if(file_exists($path)){
show_tips('must be url;');
}
$path = _DIR_CLEAR($path);
$path = str_replace(':/','://',$path);
$cacheName = md5($path.'kodcloud').'.'.get_path_ext($path);
$cacheFile = TEMP_PATH.$this->pluginName.'/files/'.$cacheName;
mk_dir(get_path_father($cacheFile));

View File

@ -9,35 +9,49 @@
><i class="font-icon icon-reorder"></i></button>
<div class="top-left collapse" id="top-menu-left">
<a href="./" class="topbar-menu title">
<?php
<?php
$config = $GLOBALS['config'];
$html = '<a href="./" class="topbar-menu title">';
$subMenu = '';
$isWap = is_wap();
if(substr(LNG('kod_name'),0,4) == '<img'){
echo LNG('kod_name');
$html .= LNG('kod_name').'</a>';
}else{
echo '<i class="icon-cloud"></i>'.LNG('kod_name');
$html .= '<i class="icon-cloud"></i>'.LNG('kod_name').'</a>';
}
foreach ($config['settingSystem']['menu'] as $key=>$value) {
if ($value['use']!='1') continue;
$has = ST==$value['name']?'this':'';
$target = " target='".$value['target']."'" ;
$name = $value['name'];
if(LNG('ui_'.$name) != 'ui_'.$name){
$name = "<i class='font-icon menu-".$value['name']."'></i><span>".LNG('ui_'.$name).'</span>';
}
if($value['icon']){
$name = $value['icon'].'<span>'.LNG($value['name']).'</span>';
}
if($value['subMenu'] && !$isWap){
$subMenu .= "<li><a class='topbar-menu-sub ".$has."' href='".urldecode($value['url'])."'"
.$target.">".urldecode($name)."</a></li>";
}else{
$html .= "<a class='topbar-menu ".$has."' href='".urldecode($value['url'])."'"
.$target.">".urldecode($name)."</a>";
}
}
echo $html;
?>
</a>
<?php
foreach ($config['settingSystem']['menu'] as $key=>$value) {
if ($value['use']!='1') continue;
$has = ST==$value['name']?'this':'';
$target = " target='".$value['target']."'" ;
$name = $value['name'];
if(LNG('ui_'.$name) != 'ui_'.$name){
$name = "<i class='font-icon menu-".$value['name']."'></i>".LNG('ui_'.$name);
}
if($value['icon']){
$name = $value['icon'].LNG($value['name']);
}
if($value['display']){
$name = $value['display'];
}
echo "<a class='topbar-menu ".$has."' href='".urldecode($value['url'])."'"
.$target.">".urldecode($name)."</a>";
}
?>
<?php if($subMenu){?>
<div class="menu-group fl">
<a class="topbar-menu" id="topbar-submenu"
data-toggle="dropdown" href="javascript:void(0);" title="<?php echo LNG('menu_sub_menu');?>">
<i class="icon-th-large"></i>
</a>
<ul class="dropdown-menu topbar-submenu pull-left animated menuShow" role="menu" aria-labelledby="topbar-submenu">
<?php echo $subMenu;?>
</ul>
</div>
<?php } ?>
</div>
<div class="top-right">
<?php if(!isset($config['settings']['language'])){ ?>

View File

@ -14,7 +14,39 @@
<div class="frame-main">
<div class="panel-mask"></div>
<div class="frame-header">
<div class="tool tool-menu-left"><i class="font-icon icon-reorder"></i></div>
<div class="tool tool-menu-left">
<div class="menu"><i class="font-icon icon-reorder"></i></div>
</div>
<?php
$config = $GLOBALS['config'];
$subMenu = '';
foreach ($config['settingSystem']['menu'] as $key=>$value) {
if ($value['use']!='1') continue;
$has = ST==$value['name']?'this':'';
$target = " target='".$value['target']."'" ;
$name = $value['name'];
if(LNG('ui_'.$name) != 'ui_'.$name){
$name = "<i class='font-icon menu-".$value['name']."'></i><span>".LNG('ui_'.$name).'</span>';
}
if($value['icon']){
$name = $value['icon'].'<span>'.LNG($value['name']).'</span>';
}
$subMenu .= "<li><a class='topbar-menu-sub ".$has."' href='".urldecode($value['url'])."'"
.$target.">".urldecode($name)."</a></li>";
}
?>
<?php if($subMenu){?>
<div class="menu-group fl tool tool-submenu">
<div class="topbar-menu" id="topbar-submenu" data-toggle="dropdown">
<i class="icon-th-large"></i>
</div>
<ul class="dropdown-menu topbar-submenu pull-left animated menuShow" role="menu" aria-labelledby="topbar-submenu">
<?php echo $subMenu;?>
</ul>
</div>
<?php } ?>
<div class="title"><?php echo LNG('kod_name');?></div>
<div class="menu-group">
<div class="btn-list-icon"><i class="font-icon icon-th"></i></div>

File diff suppressed because one or more lines are too long

View File

@ -259,6 +259,7 @@ return array(
"menu_move_up" => "فوق",
"menu_move_del" => "حذف",
"menu_open_window" => "فتح نافذة جديدة",
"menu_sub_menu" => "القائمة الفرعية",
"url_path" => "الموقع الالكترونى",
"url_path_desc" => "الموقع الالكترونى أو رمز شبيبة",
"no_permission_read" => "لم يكن لديك إذن لقراءة!",

View File

@ -259,6 +259,7 @@ return array(
"menu_move_up" => "нагоре",
"menu_move_del" => "изтривам",
"menu_open_window" => "Отваряне на нов прозорец",
"menu_sub_menu" => "Подменю",
"url_path" => "URL адрес",
"url_path_desc" => "URL адрес или JS код",
"no_permission_read" => "Вие нямате разрешение да чете!",

View File

@ -259,6 +259,7 @@ return array(
"menu_move_up" => "আপ",
"menu_move_del" => "মুছুন",
"menu_open_window" => "একটি নতুন উইন্ডোতে খুলুন",
"menu_sub_menu" => "সাবমেনু",
"url_path" => "URL ঠিকানা",
"url_path_desc" => "URL ঠিকানা বা JS কোড",
"no_permission_read" => "আপনি পড়ার অনুমতি আছে না!",

View File

@ -259,6 +259,7 @@ return array(
"menu_move_up" => "fins",
"menu_move_del" => "esborrar",
"menu_open_window" => "Obrir una nova finestra",
"menu_sub_menu" => "Submenú",
"url_path" => "l'adreça URL",
"url_path_desc" => "l'adreça URL o el codi js",
"no_permission_read" => "Vostè no té permís per llegir!",

Binary file not shown.

Binary file not shown.

View File

@ -259,6 +259,7 @@ return array(
"menu_move_up" => "nach oben",
"menu_move_del" => "löschen",
"menu_open_window" => "Öffnen Sie ein neues Fenster",
"menu_sub_menu" => "Untermenü",
"url_path" => "uRL-Adresse",
"url_path_desc" => "URL-Adresse oder js Code",
"no_permission_read" => "Sie haben keine Berechtigung zum Lesen!",

View File

@ -259,6 +259,7 @@ return array(
"menu_move_up" => "επάνω",
"menu_move_del" => "Διαγραφή",
"menu_open_window" => "Ανοίξτε ένα νέο παράθυρο",
"menu_sub_menu" => "Υπομενού",
"url_path" => "url διεύθυνση",
"url_path_desc" => "url διεύθυνση ή JS κώδικα",
"no_permission_read" => "Δεν έχετε άδεια για να διαβάσετε!",

View File

@ -259,6 +259,7 @@ return array(
"menu_move_up" => "Up",
"menu_move_del" => "Remove",
"menu_open_window" => "New window",
"menu_sub_menu" => "Submenu",
"url_path" => "Url link",
"url_path_desc" => "Url or javascript",
"no_permission_read" => "Does not have read permissions",

View File

@ -259,6 +259,7 @@ return array(
"menu_move_up" => "hasta",
"menu_move_del" => "borrar",
"menu_open_window" => "Abrir una nueva ventana",
"menu_sub_menu" => "Submenú",
"url_path" => "la dirección URL",
"url_path_desc" => "la dirección URL o el código js",
"no_permission_read" => "Usted no tiene permiso para leer!",

Binary file not shown.

View File

@ -259,6 +259,7 @@ return array(
"menu_move_up" => "بالا",
"menu_move_del" => "حذف کردن",
"menu_open_window" => "باز کردن پنجره جدید",
"menu_sub_menu" => "زیر منو",
"url_path" => "آدرس URL",
"url_path_desc" => "آدرس URL و یا کد JS",
"no_permission_read" => "شما اجازه خواندن ندارد!",

Binary file not shown.

View File

@ -259,6 +259,7 @@ return array(
"menu_move_up" => "en haut",
"menu_move_del" => "effacer",
"menu_open_window" => "Ouvrez une nouvelle fenêtre",
"menu_sub_menu" => "Sous-menu",
"url_path" => "adresse url",
"url_path_desc" => "adresse URL ou un code js",
"no_permission_read" => "Vous n'êtes pas autorisé à lire!",

Binary file not shown.

View File

@ -259,6 +259,7 @@ return array(
"menu_move_up" => "ऊपर",
"menu_move_del" => "मिटाना",
"menu_open_window" => "एक नया विंडो खोलें",
"menu_sub_menu" => "सबमेनू",
"url_path" => "यूआरएल पता",
"url_path_desc" => "यूआरएल एड्रेस या जे एस कोड",
"no_permission_read" => "आप पढ़ने के लिए अनुमति नहीं है!",

Binary file not shown.

View File

@ -259,6 +259,7 @@ return array(
"menu_move_up" => "fel",
"menu_move_del" => "töröl",
"menu_open_window" => "Új ablak megnyitása",
"menu_sub_menu" => "almenü",
"url_path" => "url címe",
"url_path_desc" => "url cím vagy js kód",
"no_permission_read" => "Nem jogosultsága olvasni!",

Binary file not shown.

View File

@ -259,6 +259,7 @@ return array(
"menu_move_up" => "su",
"menu_move_del" => "cancellare",
"menu_open_window" => "Aprire una nuova finestra",
"menu_sub_menu" => "sottomenu",
"url_path" => "indirizzo URL",
"url_path_desc" => "indirizzo URL o il codice js",
"no_permission_read" => "Non si ha il permesso di leggere!",

View File

@ -259,6 +259,7 @@ return array(
"menu_move_up" => "アップ",
"menu_move_del" => "削除",
"menu_open_window" => "新しいウィンドウを開きます。",
"menu_sub_menu" => "サブメニュー",
"url_path" => "URLアドレス",
"url_path_desc" => "URLアドレスまたはjsのコード",
"no_permission_read" => "あなたは読み取り権限を持っていません!",

Binary file not shown.

View File

@ -259,6 +259,7 @@ return array(
"menu_move_up" => "į viršų",
"menu_move_del" => "panaikinti",
"menu_open_window" => "Atidaryti naują langą",
"menu_sub_menu" => "Submeniu",
"url_path" => "URL adresas",
"url_path_desc" => "URL adresas arba JS kodas",
"no_permission_read" => "Jūs neturite leidimo skaityti!",

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -259,6 +259,7 @@ return array(
"menu_move_up" => "para cima",
"menu_move_del" => "excluir",
"menu_open_window" => "Abra uma nova janela",
"menu_sub_menu" => "Submenu",
"url_path" => "endereço de url",
"url_path_desc" => "endereço URL ou o código js",
"no_permission_read" => "Você não tem permissão para ler!",

View File

@ -259,6 +259,7 @@ return array(
"menu_move_up" => "sus",
"menu_move_del" => "șterge",
"menu_open_window" => "Deschide o fereastră nouă",
"menu_sub_menu" => "submeniu",
"url_path" => "adresă URL-ul",
"url_path_desc" => "adresă URL-ul sau codul js",
"no_permission_read" => "Nu aveți permisiunea de a citi!",

View File

@ -259,6 +259,7 @@ return array(
"menu_move_up" => "вверх",
"menu_move_del" => "удалять",
"menu_open_window" => "Открыть новое окно",
"menu_sub_menu" => "Подменю",
"url_path" => "URL-адрес",
"url_path_desc" => "URL-адрес или JS-код",
"no_permission_read" => "У вас нет разрешения на чтение!",

View File

@ -259,6 +259,7 @@ return array(
"menu_move_up" => "දක්වා",
"menu_move_del" => "Delete",
"menu_open_window" => "නව කවුළුවක විවෘත කරන්න",
"menu_sub_menu" => "උපමෙනු",
"url_path" => "url එක ලිපිනය",
"url_path_desc" => "url එක ලිපිනය හෝ JS කේතය",
"no_permission_read" => "ඔබ කියවා කිරීමට අවසර නැත!",

Binary file not shown.

Binary file not shown.

View File

@ -259,6 +259,7 @@ return array(
"menu_move_up" => "горе",
"menu_move_del" => "избрисати",
"menu_open_window" => "Отвори нови прозор",
"menu_sub_menu" => "Подмени",
"url_path" => "uRL адреса",
"url_path_desc" => "УРЛ адреса или ЈС код",
"no_permission_read" => "Немате дозволе за читање!",

Binary file not shown.

View File

@ -259,6 +259,7 @@ return array(
"menu_move_up" => "அப்",
"menu_move_del" => "நீக்கு",
"menu_open_window" => "புதிய சாளரத்தை திறக்கவும்",
"menu_sub_menu" => "துணைமெனு",
"url_path" => "URL முகவரியை",
"url_path_desc" => "URL முகவரியை அல்லது JS குறியீடு",
"no_permission_read" => "நீங்கள் படிக்க அனுமதி இல்லை!",

View File

@ -259,6 +259,7 @@ return array(
"menu_move_up" => "ขึ้น",
"menu_move_del" => "ลบ",
"menu_open_window" => "เปิดหน้าต่างใหม่",
"menu_sub_menu" => "เมนูย่อย",
"url_path" => "ที่อยู่ URL",
"url_path_desc" => "ที่อยู่ URL หรือรหัส JS",
"no_permission_read" => "คุณไม่ได้รับอนุญาตให้อ่าน!",

Binary file not shown.

View File

@ -259,6 +259,7 @@ return array(
"menu_move_up" => "вгору",
"menu_move_del" => "видаляти",
"menu_open_window" => "Відкрити нове вікно",
"menu_sub_menu" => "Підменю",
"url_path" => "URL-адресу",
"url_path_desc" => "URL-адресу або JS-код",
"no_permission_read" => "У вас немає дозволу на читання!",

Binary file not shown.

View File

@ -259,6 +259,7 @@ return array(
"menu_move_up" => "up",
"menu_move_del" => "xóa bỏ",
"menu_open_window" => "Mở một cửa sổ mới",
"menu_sub_menu" => "Submenu",
"url_path" => "địa chỉ url",
"url_path_desc" => "địa chỉ url hoặc mã js",
"no_permission_read" => "Bạn không có quyền để đọc!",

View File

@ -259,6 +259,7 @@ return array(
"menu_move_up" => "上移",
"menu_move_del" => "删除",
"menu_open_window" => "新窗口打开",
"menu_sub_menu" => "子菜单",
"url_path" => "url地址",
"url_path_desc" => "url地址或js代码",
"no_permission_read" => "您没有读取权限!",

View File

@ -259,6 +259,7 @@ return array(
"menu_move_up" => "上移",
"menu_move_del" => "刪除",
"menu_open_window" => "新窗口打開",
"menu_sub_menu" => "子菜單",
"url_path" => "url地址",
"url_path_desc" => "url地址或js代碼",
"no_permission_read" => "您没有读取权限!",

View File

@ -6,7 +6,7 @@
* @license http://kodcloud.com/tools/license/license.txt
*/
//配置数据,可在setting_user.php中更改覆盖
//配置数据,可在setting_user.php中添加变量覆盖,升级后不会被替换
$config['settings'] = array(
'downloadUrlTime' => 0, //下载地址生效时间按秒计算0代表不限制
'apiLoginTonken' => '', //设定则认为开启服务端api通信登陆同时作为加密密匙
@ -14,7 +14,7 @@ $config['settings'] = array(
'paramRewrite' => false, //开启url 去除? 直接跟参数
'pluginServer' => "https://api.kodcloud.com/?",
'staticPath' => "./static/", //静态文件目录
'staticPath' => "./static/", //静态文件目录,可以配置到cdn;
'pluginHost' => PLUGIN_HOST //静态文件目录
);
$config['settings']['appType'] = array(
@ -164,7 +164,7 @@ $config['roleSetting'] = array(
'systemMember' => array('get','add','edit','doAction'),
'systemGroup' => array('get','add','del','edit'),
'systemRole' => array('add','del','edit','roleGroupAction'),
//不开放此功能【避免扩展名修改,导致系统安全问题】
//不开放此功能【避免扩展名修改,导致系统安全问题】
'pluginApp' => array('index','appList','changeStatus','setConfig','unInstall')
);

View File

@ -1,2 +1,2 @@
<?php
define('KOD_VERSION','4.1');
define('KOD_VERSION','4.2');

File diff suppressed because one or more lines are too long

View File

@ -10,10 +10,11 @@ class adminerPlugin extends PluginBase{
}
public function addMenu(){
navbar_menu_add(array(
'name' => 'adminer',
'display' => $this->appIcon().'Adminer',
'name' => 'Adminer',
'icon' => $this->appIcon(),
'url' => $this->pluginApi,
'target' => '_blank',
'subMenu' => '1',
'use' => '1'
));
}

View File

@ -1,32 +0,0 @@
<?php
class googleDocsPlugin extends PluginBase{
function __construct(){
parent::__construct();
}
public function regiest(){
$this->hookRegiest(array(
'user.commonJs.insert' => 'googleDocsPlugin.echoJs'
));
}
public function echoJs($st,$act){
if($this->isFileExtence($st,$act)){
$this->echoFile('static/main.js');
}
}
public function index(){
if(substr($this->in['path'],0,4) == 'http'){
$path = $fileUrl = $this->in['path'];
}else{
$path = _DIR($this->in['path']);
$fileUrl = _make_file_proxy($path);
if (!file_exists($path)) {
show_tips(LNG('not_exists'));
}
}
$config = $this->getConfig();
$api = "https://docs.google.com/viewer?url=";
header('Location: '.$api.urlencode($fileUrl));
}
}

View File

@ -1,7 +0,0 @@
<?php
return array(
"googleDocs.meta.name" => "Google Docs View",
"googleDocs.meta.title" => "Google Docs View",
"googleDocs.meta.desc" => "Google Docs is an online office software that includes online documents, forms, and presentations; third-party document previews can be provided by passing in a file address.
<br/><br/><b> Description: </b>, <br/>the address of the preview server must have the office where the server can access kod (the kod server must be outside the network)",
);

View File

@ -1,7 +0,0 @@
<?php
return array(
"googleDocs.meta.name" => "Google文档预览",
"googleDocs.meta.title" => "Google文档预览",
"googleDocs.meta.desc" => "Google Docs是一套在线办公软件包括在线文档、表格和演示文稿;可以通过传入文件地址的方式提供第三方文档预览.
<br/><br/><h4>说明:</h4>预览服务器的地址必须要office所在服务器能访问到kod(kod服务器必须要在外网)"
);

View File

@ -1,37 +0,0 @@
{
"id":"googleDocs",
"name":"{{LNG.googleDocs.meta.name}}",
"title":"{{LNG.googleDocs.meta.title}}",
"version":"1.1",
"category":"file",
"source":{
"icon":"{{pluginHost}}static/images/icon.png"
},
"description":"{{LNG.googleDocs.meta.desc}}",
"auther":{
"copyright":"kodcloud",
"homePage":"http://kodcloud.com"
},
"configItem":{
"pluginAuth":{
"type":"userSelect",
"value":"all:1",
"display":"{{LNG.Plugin.config.auth}}",
"desc":"{{LNG.Plugin.config.authDesc}}",
"require":1
},
"fileExt":{
"type":"tags",
"display":"{{LNG.Plugin.Config.fileExt}}",
"desc":"{{LNG.Plugin.Config.fileExtDesc}}",
"value":"doc,docx,rtf,xls,xlsx,wps,ppt,pptx,pps,.odt,ods,odp,ott,ots,otp,dxf,ps,eps,xps,psd,tif,tiff,bmp,svg,pages,ai,ttf",
},
"fileSort":{
"type":"number",
"display":"{{LNG.Plugin.Config.fileSort}}",
"desc":"{{LNG.Plugin.Config.fileSortDesc}}",
"value":-1,
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

View File

@ -1,13 +0,0 @@
kodReady.push(function(){
kodApp.add({
name:"googleDocs",
title:"{{LNG.googleDocs.meta.name}}",
ext:"{{config.fileExt}}",
sort:"{{config.fileSort}}",
icon:'{{pluginHost}}static/images/icon.png',
callback:function(path,ext){
var url = '{{pluginApi}}&path='+core.pathCommon(path);
window.open(url);//不支持对话框打开
}
});
});

View File

@ -6,9 +6,9 @@ return array(
"officeLive.Config.apiServer" => "Server Api",
"officeLive.Config.apiServerDesc" => "<br/><br/>The address of the preview server must be accessible by the server where the server can access kods can use third party services, or Microsoft's official interface <br/> (Kod server must be in the external network, and the need for domain name access)
<div class = 'grayy 8'> https://preview.tita.com/op/view.aspx?src= </div>
<div class = 'grayy 8'> https://owa-box.vips100.com/op/view.aspx?src= </div>
<div class = 'grayy 8'> https://docview.mingdao.com/op/view.aspx?src= </div>
<div class = 'grayy 8'> https://preview.tita.com/op/view.aspx?src= </div>
<div class = 'grayy 8'> https://view.officeapps.live.com/op/view.aspx?src= </div>
Users can build their own; <a href='http://kodcloud.com/office.html' target='_blank'> learn more </a>"
);

View File

@ -6,9 +6,9 @@ return array(
"officeLive.Config.apiServer" => "服务器接口",
"officeLive.Config.apiServerDesc" => "<br/><br/>预览服务器的地址必须要office所在服务器能访问到kod<br/>可以使用第三方的服务,或微软官方的接口<br/>(kod服务器必须要在外网,且需要域名访问)<br/><br/>
<div class='grey-8'>https://preview.tita.com/op/view.aspx?src=</div>
<div class='grey-8'>https://owa-box.vips100.com/op/view.aspx?src=</div>
<div class='grey-8'>https://docview.mingdao.com/op/view.aspx?src=</div>
<div class='grey-8'>https://preview.tita.com/op/view.aspx?src=</div>
<div class='grey-8'>https://view.officeapps.live.com/op/view.aspx?src=</div><br/>
内网的用户,可以自己搭建;<a href='http://kodcloud.com/office.html' target='_blank'>了解详情</a>"
);

View File

@ -2,7 +2,7 @@
"id":"officeLive",
"name":"{{LNG.officeLive.meta.name}}",
"title":"{{LNG.officeLive.meta.title}}",
"version":"1.1",
"version":"1.2",
"category":"file",
"source":{
"icon":"{{pluginHost}}static/images/icon.png"
@ -40,12 +40,11 @@
},
"apiServer":{
"type":"input",
"value":"https://preview.tita.com/op/view.aspx?src=",
"value":"https://owa-box.vips100.com/op/view.aspx?src=",
"display":"{{LNG.officeLive.Config.apiServer}}",
"desc":"{{LNG.officeLive.Config.apiServerDesc}}",
"require":1
},
"sep1001":"<hr/>",
"fileExt":{
"type":"tags",

View File

@ -15,17 +15,20 @@ class zipViewPlugin extends PluginBase{
$download = isset($this->in['download'])?true:false;
KodArchive::filePreview($path,$this->in['index'],$download,$this->in['name']);
}else{
$cacheFile = TEMP_PATH.'zipView/'.hash_path($path).'.info';
$cacheFile = TEMP_PATH.'zipView/'.hash_path($path).'.log';
if(file_exists($cacheFile)){
$data = json_decode(file_get_contents($cacheFile),true);
show_json($data);
}
mk_dir(get_path_father($cacheFile));
$result = KodArchive::listContent($path);
if($result['code']){
file_put_contents($cacheFile,json_encode($result['data']));
$data = json_encode($result['data']);
if($result['code'] && $data){
file_put_contents($cacheFile,$data);
show_json($result['data'],$result['code']);
}else{
show_json($result['data'],false);
}
show_json($result['data'],$result['code']);
}
}
public function echoJs($st,$act){

View File

@ -2,7 +2,7 @@
"id":"zipView",
"name":"{{LNG.Plugin.default.zipView}}",
"title":"",
"version":"1.2",
"version":"1.3",
"source":{
"icon":"{{pluginHost}}static/images/icon.png",
"screenshoot":[

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More