parent
005c0dc053
commit
7a27034ca6
18
ChangeLog.md
18
ChangeLog.md
|
@ -1,9 +1,13 @@
|
|||
|
||||
文件名特殊符号处理:\ / : * ? " < > |
|
||||
设置壁纸图片检测:url header 检测必须是图片
|
||||
去掉title 权限内容,属性中权限信息;
|
||||
onlyoffice编辑提示保存时,连接跳转到35;
|
||||
psd 分享单独文件可以预览;分享文件夹中psd无法预览
|
||||
|
||||
### ver4.45 `2021/04/07`
|
||||
- 更新检测文件多种引入方式;
|
||||
- php7.4,php8兼容
|
||||
- x-senffile 下载加速支持
|
||||
- 对话框打开url; https协议不同时新窗口打开;
|
||||
- 上传合并优化加速处理;
|
||||
- 解压 构造漏洞修复;
|
||||
后端加密方式优化
|
||||
|
||||
### ver4.40 `2019/3/21`
|
||||
-----
|
||||
|
@ -838,7 +842,7 @@ psd 分享单独文件可以预览;分享文件夹中psd无法预览
|
|||
- 新建office文档;office文档预览(所有支持的列表);内网实现预览(服务端转换——pdf)
|
||||
- 虚拟目录多选操作右键菜单:收藏夹;我所在的组、全部组;我的共享
|
||||
- 虚拟目录选中(多选)快捷键操作:屏蔽删除、复制、剪切、重命名
|
||||
- 文件图标排列时,高度自适应,文件名最高四行文字
;(桌面特殊处理);拖动到指定文件夹放大效果
|
||||
- 文件图标排列时,高度自适应,文件名最高四行文字;(桌面特殊处理);拖动到指定文件夹放大效果
|
||||
- xxs问题优化:文件名特殊处理,对应地址栏、树目录、重命名展示、分享等展示的地方统一做处理
|
||||
- 新建文件,重命名文件;(icon,自动高度后 优化;图标和列表模式)
|
||||
- 不同类型目录之间切换:单选、多选;右键菜单还原(目录、回收站、分享目录、收藏夹、所有群组、我的群组等)
|
||||
|
@ -1007,7 +1011,7 @@ psd 分享单独文件可以预览;分享文件夹中psd无法预览
|
|||
- 全局字体调整;用em作单位
|
||||
- 各种错误提示优化,更好的兼容php各种环境;
|
||||
- 首次登陆目录不可写提示,登陆页面多语言选择
|
||||
- 登陆页面密码找回提示;管理员密码快速找回;
|
||||
- 登陆页面密码找回提示;管理员密码快速找回;
|
||||
- 验证码复杂性增强
|
||||
- 没有GD库则【关闭验证码;图片直接输出-不生成缩略图】
|
||||
- 登陆:ajax方式(成功&失败)[失败原因码——验证码:换图片;输入框焦点设置]
|
||||
|
|
|
@ -119,7 +119,7 @@ class app extends Controller{
|
|||
|
||||
public function getUrlTitle(){
|
||||
$html = curl_get_contents($this->in['url']);
|
||||
$result = match($html,"<title>(.*)<\/title>");
|
||||
$result = match_text($html,"<title>(.*)<\/title>");
|
||||
if (strlen($result)>50) {
|
||||
$result = mb_substr($result,0,50,'utf-8');
|
||||
}
|
||||
|
|
|
@ -89,7 +89,11 @@ class explorer extends Controller{
|
|||
unset($data['downloadPath']);
|
||||
}
|
||||
if($data['size'] < 100*1024|| isset($this->in['getMd5'])){//100kb
|
||||
$data['fileMd5'] = @md5_file($file);
|
||||
if($data['size'] <= 1024*1024*100){
|
||||
$data['fileMd5'] = @md5_file($file);
|
||||
}else{
|
||||
$data['fileMd5'] = "---";
|
||||
}
|
||||
}else{
|
||||
$data['fileMd5'] = "...";
|
||||
}
|
||||
|
@ -948,7 +952,7 @@ class explorer extends Controller{
|
|||
}
|
||||
}
|
||||
}
|
||||
$zipFile = $this->zip($userTemp,rand_string(9).'-',fasle);//下载文件夹删除;不检测和记录空间变更
|
||||
$zipFile = $this->zip($userTemp,rand_string(9).'-',false);//下载文件夹删除;不检测和记录空间变更
|
||||
show_json(LNG('zip_success'),true,get_path_this($zipFile));
|
||||
}
|
||||
public function zip($zipPath='',$namePre = "",$checkSpaceChange = true){
|
||||
|
@ -998,7 +1002,7 @@ class explorer extends Controller{
|
|||
$info = LNG('zip_success').LNG('size').":".size_format(filesize($zipname));
|
||||
show_json($info,true,_DIR_OUT(iconv_app($zipname)) );
|
||||
}else{
|
||||
show_json(LNG.error,false);
|
||||
show_json(LNG('error'),false);
|
||||
}
|
||||
}else{
|
||||
return iconv_app($zipname);
|
||||
|
@ -1272,13 +1276,6 @@ class explorer extends Controller{
|
|||
$GLOBALS['kodPathAuthCheck'] = true;//组权限发生变更。导致访问groupPath 无权限退出问题
|
||||
foreach($favList as $key => $val){
|
||||
$thePath = _DIR($val['path']);
|
||||
$hasChildren = path_haschildren($thePath,$checkFile);
|
||||
if( !isset($val['type'])){
|
||||
$val['type'] = 'folder';
|
||||
}
|
||||
if( $val['type'] == 'folder' && $val['ext'] != 'tree-fav'){
|
||||
$hasChildren = true;
|
||||
}
|
||||
$cell = array(
|
||||
'name' => $val['name'],
|
||||
'ext' => $val['ext'],
|
||||
|
|
|
@ -89,7 +89,7 @@ class setting extends Controller{
|
|||
}
|
||||
show_json(LNG('success'),true);
|
||||
}
|
||||
private function clearSession(){
|
||||
private function _clearSession(){
|
||||
del_dir(KOD_SESSION);
|
||||
}
|
||||
private function _clearCache(){
|
||||
|
|
|
@ -15,7 +15,7 @@ class share extends Controller{
|
|||
parent::__construct();
|
||||
$auth = systemRole::getInfo(1);//经过role检测
|
||||
|
||||
$arrNotCheck = array('commonJs');
|
||||
$arrNotCheck = array('commonJs','manifest','manifestJS');
|
||||
if(substr($this->in['fileUrl'],0,4) == 'http'){
|
||||
$arrNotCheck[] = 'fileGet';
|
||||
}
|
||||
|
@ -278,7 +278,24 @@ class share extends Controller{
|
|||
}
|
||||
echo 'LNG='.$lang.';G.useTime='.$useTime.';';
|
||||
}
|
||||
|
||||
//chrome安装: 必须https;serviceWorker引入处理;manifest配置; [manifest.json配置目录同sw.js引入];
|
||||
public function manifest(){
|
||||
$json = file_get_contents(BASIC_PATH.'static/others/app/manifest.json');
|
||||
$name = stristr(I18n::getType(),'zh') ? '可道云':'kodExplorer';
|
||||
$static = STATIC_PATH == './static/' ? APP_HOST.'static/':STATIC_PATH;
|
||||
$assign = array(
|
||||
"{{name}}" => $name,
|
||||
"{{appDesc}}" => LNG('common.copyright.name'),
|
||||
"{{static}}" => $static,
|
||||
);
|
||||
$json = str_replace(array_keys($assign),array_values($assign),$json);
|
||||
header("Content-Type: application/javascript; charset=utf-8");
|
||||
echo $json;
|
||||
}
|
||||
public function manifestJS(){
|
||||
header("Content-Type: application/javascript; charset=utf-8");
|
||||
echo file_get_contents(BASIC_PATH.'static/others/app/sw.js');
|
||||
}
|
||||
|
||||
|
||||
//========ajax function============
|
||||
|
|
|
@ -28,7 +28,7 @@ class user extends Controller{
|
|||
$this->notCheckST = array('share','debug');
|
||||
$this->notCheckACT = array(
|
||||
'loginFirst','login','logout','loginSubmit',
|
||||
'checkCode','publicLink','qrcode','sso');
|
||||
'checkCode','publicLink','qrcode','sso','appConfig');
|
||||
|
||||
$this->notCheckApp = array();//'pluginApp.to'
|
||||
if(!$this->user){
|
||||
|
@ -42,6 +42,7 @@ class user extends Controller{
|
|||
|
||||
public function bindHook(){
|
||||
$this->loadModel('Plugin')->init();
|
||||
$this->bindCheckPassword();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -154,6 +155,42 @@ class user extends Controller{
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function _loginCheckPassword($user,$password){
|
||||
if($this->checkPassword($password)) return;
|
||||
if($user['role'] == '1'){ // 管理员,提示修改;
|
||||
if(isset($_SESSION['adminPasswordTips'])) return;
|
||||
@session_start();
|
||||
$_SESSION['adminPasswordTips']= 1;
|
||||
@session_write_close();
|
||||
show_tips("安全提示:<br/><br/>密码长度必须大于6,同时包含英文和数字;<br/>强烈建议登陆后修改密码!",false);
|
||||
}
|
||||
show_tips("密码长度必须大于6,同时包含英文和数字;<br/>请联系管理员修改后再试!",false);
|
||||
}
|
||||
private function checkPassword($password){
|
||||
if(INSTALL_CHANNEL =='hikvision.com'){
|
||||
$this->config['settingSystemDefault']['passwordCheck'] = '1';
|
||||
}
|
||||
if($this->config['settingSystemDefault']['passwordCheck'] == '0') return true;
|
||||
|
||||
$hasNumber = preg_match('/\d/',$password);
|
||||
$hasChar = preg_match('/[A-Za-z]/',$password);
|
||||
if( strlen($password) >= 6 && $hasNumber && $hasChar) return true;
|
||||
return false;
|
||||
}
|
||||
private function bindCheckPassword(){
|
||||
$action = strtolower(ST.'.'.ACT);
|
||||
$check = array(
|
||||
'user.changepassword' => 'passwordNew',
|
||||
'systemmember.edit' => 'password',
|
||||
'systemmember.add' => 'password',
|
||||
);
|
||||
if(!isset($check[$action])) return;
|
||||
|
||||
$password = $this->in[$check[$action]];
|
||||
if($this->checkPassword($password)) return;
|
||||
show_json("密码长度必须大于6,同时包含英文和数字;<br/>请联系管理员修改后再试!",false);
|
||||
}
|
||||
|
||||
/**
|
||||
* 共享kod登陆并跳转
|
||||
|
@ -443,6 +480,7 @@ class user extends Controller{
|
|||
}
|
||||
|
||||
//首次登陆,初始化app 没有最后登录时间
|
||||
$this->_loginCheckPassword($user,$password);
|
||||
$this->_loginSuccess($user);//登陆成功
|
||||
if(!$user['lastLogin']){
|
||||
$app = init_controller('app');
|
||||
|
@ -606,7 +644,7 @@ class user extends Controller{
|
|||
ob_get_clean();
|
||||
QRcode::png($this->in['url']);
|
||||
}else{
|
||||
header('location: http://qr.topscan.com/api.php?text='.rawurlencode($url));
|
||||
header('location: https://demo.kodcloud.com/?user/view/qrcode&url='.rawurlencode($url));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -348,24 +348,6 @@ function array_try($array, $callback){
|
|||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// 求多个数组的并集
|
||||
function array_union(){
|
||||
$argsCount = func_num_args();
|
||||
if ($argsCount < 2) {
|
||||
return false;
|
||||
} else if (2 === $argsCount) {
|
||||
list($arr1, $arr2) = func_get_args();
|
||||
|
||||
while ((list($k, $v) = each($arr2))) {
|
||||
if (!in_array($v, $arr1)) $arr1[] = $v;
|
||||
}
|
||||
return $arr1;
|
||||
} else { // 三个以上的数组合并
|
||||
$arg_list = func_get_args();
|
||||
$all = call_user_func_array('array_union', $arg_list);
|
||||
return array_union($arg_list[0], $all);
|
||||
}
|
||||
}
|
||||
// 取出数组中第n项
|
||||
function array_get_index($arr,$index){
|
||||
|
@ -446,7 +428,7 @@ function fatalErrorHandler(){
|
|||
}
|
||||
|
||||
function show_tips($message,$url= '', $time = 3,$title = '',$exit = true){
|
||||
ob_get_clean();
|
||||
ob_get_clean();$time=500;
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
$goto = "content='$time;url=$url'";
|
||||
$info = "{$time}s 后自动跳转, <a href='$url'>立即跳转</a>";
|
||||
|
@ -669,9 +651,9 @@ function show_json($data,$code = true,$info=''){
|
|||
|
||||
function show_trace(){
|
||||
echo '<pre>';
|
||||
var_dump(func_get_args());
|
||||
var_dump(json_encode(func_get_args()));
|
||||
echo '<hr/>';
|
||||
echo get_caller_info();
|
||||
print_r(get_caller_info());
|
||||
echo '</pre>';
|
||||
exit;
|
||||
}
|
||||
|
@ -759,7 +741,7 @@ function html2txt($document){
|
|||
}
|
||||
|
||||
// 获取内容第一条
|
||||
function match($content, $preg){
|
||||
function match_text($content, $preg){
|
||||
$preg = "/" . $preg . "/isU";
|
||||
preg_match($preg, $content, $result);
|
||||
return $result[1];
|
||||
|
@ -912,25 +894,12 @@ function dump(){call_user_func('pr',func_get_args());}
|
|||
function debug_out(){call_user_func('pr',func_get_args());}
|
||||
|
||||
/**
|
||||
* 取$from~$to范围内的随机数
|
||||
*
|
||||
* @param $from 下限
|
||||
* @param $to 上限
|
||||
* @return unknown_type
|
||||
* 取$from~$to范围内的随机数,包含$from,$to;
|
||||
*/
|
||||
function rand_from_to($from, $to){
|
||||
$size = $to - $from; //数值区间
|
||||
$max = 30000; //最大
|
||||
if ($size < $max) {
|
||||
return $from + mt_rand(0, $size);
|
||||
} else {
|
||||
if ($size % $max) {
|
||||
return $from + random_from_to(0, $size / $max) * $max + mt_rand(0, $size % $max);
|
||||
} else {
|
||||
return $from + random_from_to(0, $size / $max) * $max + mt_rand(0, $max);
|
||||
}
|
||||
}
|
||||
}
|
||||
return mt_rand($from,$to);
|
||||
// return $from + mt_rand(0, $to - $from);
|
||||
}
|
||||
|
||||
/**
|
||||
* 产生随机字串,可用来自动生成密码 默认长度6位 字母和数字混合
|
||||
|
@ -1028,7 +997,7 @@ function des_encode($key, $text){
|
|||
return base64_encode($encrypted);
|
||||
}
|
||||
function pkcs5_unpad($text){
|
||||
$pad = ord($text{strlen($text)-1});
|
||||
$pad = ord($text[strlen($text)-1]);
|
||||
if ($pad > strlen($text)) return $text;
|
||||
if (strspn($text, chr($pad), strlen($text) - $pad) != $pad) return $text;
|
||||
return substr($text, 0, -1 * $pad);
|
||||
|
|
|
@ -80,51 +80,50 @@ function path_filter($path){
|
|||
//filesize 解决大于2G 大小问题
|
||||
//http://stackoverflow.com/questions/5501451/php-x86-how-to-get-filesize-of-2-gb-file-without-external-program
|
||||
function get_filesize($path){
|
||||
$result = false;
|
||||
$fp = fopen($path,"r");
|
||||
if(! $fp = fopen($path,"r")) return $result;
|
||||
if(PHP_INT_SIZE >= 8 ){ //64bit
|
||||
$result = (float)(abs(sprintf("%u",@filesize($path))));
|
||||
return (float)(abs(sprintf("%u",@filesize($path))));
|
||||
}
|
||||
|
||||
$fp = fopen($path,"r");
|
||||
if(!$fp) return $result;
|
||||
if (fseek($fp, 0, SEEK_END) === 0) {
|
||||
$result = 0.0;
|
||||
$step = 0x7FFFFFFF;
|
||||
while ($step > 0) {
|
||||
if (fseek($fp, - $step, SEEK_CUR) === 0) {
|
||||
$result += floatval($step);
|
||||
} else {
|
||||
$step >>= 1;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if (fseek($fp, 0, SEEK_END) === 0) {
|
||||
$result = 0.0;
|
||||
$step = 0x7FFFFFFF;
|
||||
while ($step > 0) {
|
||||
if (fseek($fp, - $step, SEEK_CUR) === 0) {
|
||||
$result += floatval($step);
|
||||
} else {
|
||||
$step >>= 1;
|
||||
}
|
||||
static $iswin;
|
||||
if (!isset($iswin)) {
|
||||
$iswin = (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN');
|
||||
}
|
||||
static $exec_works;
|
||||
if (!isset($exec_works)) {
|
||||
$exec_works = (function_exists('exec') && !ini_get('safe_mode') && @exec('echo EXEC') == 'EXEC');
|
||||
}
|
||||
if ($iswin && class_exists("COM")) {
|
||||
try {
|
||||
$fsobj = new COM('Scripting.FileSystemObject');
|
||||
$f = $fsobj->GetFile( realpath($path) );
|
||||
$size = $f->Size;
|
||||
} catch (Exception $e) {
|
||||
$size = null;
|
||||
}
|
||||
if (is_numeric($size)) {
|
||||
$result = $size;
|
||||
}
|
||||
}else if ($exec_works){
|
||||
$cmd = ($iswin) ? "for %F in (\"$path\") do @echo %~zF" : "stat -c%s \"$path\"";
|
||||
@exec($cmd, $output);
|
||||
if (is_array($output) && is_numeric($size = trim(implode("\n", $output)))) {
|
||||
$result = $size;
|
||||
}
|
||||
}else{
|
||||
static $iswin;
|
||||
if (!isset($iswin)) {
|
||||
$iswin = (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN');
|
||||
}
|
||||
static $exec_works;
|
||||
if (!isset($exec_works)) {
|
||||
$exec_works = (function_exists('exec') && !ini_get('safe_mode') && @exec('echo EXEC') == 'EXEC');
|
||||
}
|
||||
if ($iswin && class_exists("COM")) {
|
||||
try {
|
||||
$fsobj = new COM('Scripting.FileSystemObject');
|
||||
$f = $fsobj->GetFile( realpath($path) );
|
||||
$size = $f->Size;
|
||||
} catch (Exception $e) {
|
||||
$size = null;
|
||||
}
|
||||
if (is_numeric($size)) {
|
||||
$result = $size;
|
||||
}
|
||||
}else if ($exec_works){
|
||||
$cmd = ($iswin) ? "for %F in (\"$path\") do @echo %~zF" : "stat -c%s \"$path\"";
|
||||
@exec($cmd, $output);
|
||||
if (is_array($output) && is_numeric($size = trim(implode("\n", $output)))) {
|
||||
$result = $size;
|
||||
}
|
||||
}else{
|
||||
$result = filesize($path);
|
||||
}
|
||||
$result = filesize($path);
|
||||
}
|
||||
}
|
||||
fclose($fp);
|
||||
|
@ -424,10 +423,12 @@ function path_haschildren($dir,$checkFile=false){
|
|||
$fullpath = $dir.$file;
|
||||
if ($checkFile) {//有子目录或者文件都说明有子内容
|
||||
if(@is_file($fullpath) || is_dir($fullpath.'/')){
|
||||
closedir($dh);
|
||||
return true;
|
||||
}
|
||||
}else{//只检查有没有文件
|
||||
if(@is_dir($fullpath.'/')){//解决部分主机报错问题
|
||||
closedir($dh);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -599,7 +600,7 @@ function move_path($source,$dest,$repeat_add='',$repeat_type='replace'){
|
|||
$file_success += move_file($f,$path,$repeat_add,$repeat_type);
|
||||
}
|
||||
foreach($dirs as $f){
|
||||
rmdir($f);
|
||||
@rmdir($f);
|
||||
}
|
||||
@rmdir($source);
|
||||
if($file_success == count($files)){
|
||||
|
@ -1038,23 +1039,26 @@ function file_put_out($file,$download=-1,$downFilename=false){
|
|||
header("X-Powered-By: kodExplorer.");
|
||||
header("X-FileSize: ".$file_size);
|
||||
|
||||
//调用webserver下载
|
||||
$server = strtolower($_SERVER['SERVER_SOFTWARE']);
|
||||
if($server && $GLOBALS['config']['settings']['httpSendFile']){
|
||||
if(strstr($server,'nginx')){//nginx
|
||||
header('X-Accel-Redirect: '.$file);
|
||||
}else{ //apache Lighttpd Cherokee
|
||||
header("X-Sendfile: ".$file);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
//远程路径不支持断点续传;打开zip内部文件
|
||||
if(!file_exists($file)){
|
||||
header('HTTP/1.1 200 OK');
|
||||
header('Content-Length: '.($end+1));
|
||||
return;
|
||||
}
|
||||
|
||||
//调用webserver下载
|
||||
$server = strtolower($_SERVER['SERVER_SOFTWARE']);
|
||||
if($server && $GLOBALS['config']['settings']['httpSendFile']){
|
||||
if(strstr($server,'nginx')){//nginx
|
||||
header("X-Accel-Redirect: ".$file);
|
||||
}else if(strstr($server,'apache')){ //apache
|
||||
header('X-Sendfile: '.$file);
|
||||
}else if(strstr($server,'http')){//light http
|
||||
header( "X-LIGHTTPD-send-file: " . $file);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
header("Accept-Ranges: bytes");
|
||||
if (isset($_SERVER['HTTP_RANGE'])){
|
||||
if (preg_match('/bytes=\h*(\d+)-(\d*)[\D.*]?/i', $_SERVER['HTTP_RANGE'], $matches)){
|
||||
|
|
|
@ -59,16 +59,19 @@ function zip_pre_name($fileName,$toCharset=false){
|
|||
return $result;
|
||||
}
|
||||
|
||||
//解压缩文件名检测
|
||||
function unzip_filter_ext($name){
|
||||
$add = '.txt';
|
||||
if(checkExt($name)){//允许
|
||||
if( checkExt($name) &&
|
||||
!stristr($name,'user.ini') &&
|
||||
!stristr($name,'.htaccess')
|
||||
){//允许
|
||||
return $name;
|
||||
}
|
||||
return $name.$add;
|
||||
}
|
||||
//解压到kod,文件名处理;识别编码并转换到当前系统编码
|
||||
function unzip_pre_name($fileName){
|
||||
$fileName = str_replace(array('../','..\\',''),'',$fileName);
|
||||
if (!function_exists('iconv')){
|
||||
return unzip_filter_ext($fileName);
|
||||
}
|
||||
|
@ -226,7 +229,7 @@ function file_upload_size(){
|
|||
}
|
||||
|
||||
function check_list_dir(){
|
||||
$url = APP_HOST.'lib/core/';
|
||||
$url = APP_HOST.'app/core/';
|
||||
$find = "Application.class.php";
|
||||
|
||||
@ini_set('default_socket_timeout',1);
|
||||
|
@ -275,7 +278,7 @@ function php_env_check(){
|
|||
function check_cache(){
|
||||
//检查是否更新失效
|
||||
$content = file_get_contents(BASIC_PATH.'config/version.php');
|
||||
$result = match($content,"'KOD_VERSION','(.*)'");
|
||||
$result = match_text($content,"'KOD_VERSION','(.*)'");
|
||||
if($result != KOD_VERSION){
|
||||
show_tips("您服务器开启了php缓存,文件更新尚未生效;
|
||||
请关闭缓存,或稍后1分钟刷新页面再试!
|
||||
|
|
|
@ -153,7 +153,7 @@ class Services_JSON
|
|||
return mb_convert_encoding($utf16, 'UTF-8', 'UTF-16');
|
||||
}
|
||||
|
||||
$bytes = (ord($utf16{0}) << 8) | ord($utf16{1});
|
||||
$bytes = (ord($utf16[0]) << 8) | ord($utf16[1]);
|
||||
|
||||
switch(true) {
|
||||
case ((0x7F & $bytes) == $bytes):
|
||||
|
@ -206,17 +206,17 @@ class Services_JSON
|
|||
case 2:
|
||||
// return a UTF-16 character from a 2-byte UTF-8 char
|
||||
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
return chr(0x07 & (ord($utf8{0}) >> 2))
|
||||
. chr((0xC0 & (ord($utf8{0}) << 6))
|
||||
| (0x3F & ord($utf8{1})));
|
||||
return chr(0x07 & (ord($utf8[0]) >> 2))
|
||||
. chr((0xC0 & (ord($utf8[0]) << 6))
|
||||
| (0x3F & ord($utf8[1])));
|
||||
|
||||
case 3:
|
||||
// return a UTF-16 character from a 3-byte UTF-8 char
|
||||
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
return chr((0xF0 & (ord($utf8{0}) << 4))
|
||||
| (0x0F & (ord($utf8{1}) >> 2)))
|
||||
. chr((0xC0 & (ord($utf8{1}) << 6))
|
||||
| (0x7F & ord($utf8{2})));
|
||||
return chr((0xF0 & (ord($utf8[0]) << 4))
|
||||
| (0x0F & (ord($utf8[1]) >> 2)))
|
||||
. chr((0xC0 & (ord($utf8[1]) << 6))
|
||||
| (0x7F & ord($utf8[2])));
|
||||
}
|
||||
|
||||
// ignoring UTF-32 for now, sorry
|
||||
|
@ -609,7 +609,7 @@ class Services_JSON
|
|||
} elseif (preg_match('/^\[.*\]$/s', $str) || preg_match('/^\{.*\}$/s', $str)) {
|
||||
// array, or object notation
|
||||
|
||||
if ($str{0} == '[') {
|
||||
if ($str[0]== '[') {
|
||||
$stk = array(SERVICES_JSON_IN_ARR);
|
||||
$arr = array();
|
||||
} else {
|
||||
|
|
|
@ -663,7 +663,8 @@ function parse_url_query($url){
|
|||
$params = array();
|
||||
foreach ($queryParts as $param) {
|
||||
$item = explode('=', $param);
|
||||
$params[$item[0]] = $item[1];
|
||||
$key = $item[0]; unset($item[0]);
|
||||
$params[$key] = implode('=', $item);
|
||||
}
|
||||
return $params;
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ class PluginBase{
|
|||
if(!is_array($systemConfig['pluginList'])){
|
||||
$systemConfig['pluginList'] = array();
|
||||
}
|
||||
if(is_array($systemConfig['pluginList'][$name])){
|
||||
if(is_array($systemConfig['pluginList'][$id])){
|
||||
$systemConfig['pluginList'][$id]['regiest'] = $array;
|
||||
}else{
|
||||
$systemConfig['pluginList'][$id] = array(
|
||||
|
|
|
@ -43,5 +43,6 @@
|
|||
[ /^(.*\.(?:css|js))(.*)$/i,'$1$2?ver='+G.version]
|
||||
]
|
||||
});
|
||||
if(navigator.serviceWorker){navigator.serviceWorker.register('./?share/manifestJS');}
|
||||
</script>
|
||||
<?php Hook::trigger('templateCommonFooter');?>
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
<link href="<?php echo STATIC_PATH;?>images/common/ico.png?ver=<?php echo KOD_VERSION;?>" rel="icon" type="image/x-icon">
|
||||
<link href="<?php echo STATIC_PATH;?>style/common.css?ver=<?php echo KOD_VERSION;?>" rel="stylesheet"/>
|
||||
<link href="./static/style/font-awesome/css/font-awesome.css?ver=<?php echo KOD_VERSION;?>" rel="stylesheet">
|
||||
<link href="./?share/manifest" rel="manifest" />
|
||||
<!--[if IE 7]>
|
||||
<link rel="stylesheet" href="./static/style/font-awesome/css/font-awesome-ie7.css">
|
||||
<![endif]-->
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
}
|
||||
$login_info = str_replace(array("{0}","{1}","{2}"),array('admin','demo/demo','guest/guest'),LNG('install_user_default'));
|
||||
echo LNG('install_login'),'<br/>'.$login_info.'</div>';
|
||||
echo '<div class="inputs admin-password"><input type="password" placeholder="'.LNG('login_root_password').'" autocomplete="off"/></div><div class="inputs admin-password-repeat"><input type="password" placeholder="'.LNG('login_root_password_repeat').'" autocomplete="off"/></div>';
|
||||
echo '<div class="inputs admin-password"><input type="password" placeholder="'.LNG('login_root_password').'"/></div><div class="inputs admin-password-repeat"><input type="password" placeholder="'.LNG('login_root_password_repeat').'"/></div>';
|
||||
echo '<div class="guest"><a href="javascript:void(0);" class="start">'.$login.'</a></div>';
|
||||
?>
|
||||
</div>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<div class='info'><?php echo LNG('copyright_contact');?></div>
|
||||
</div>
|
||||
<div class="form" style="padding: 10px 20px;">
|
||||
<div class="inputs admin-password"><input type="text" placeholder="LICENSE KEY" autocomplete="off"/></div>
|
||||
<div class="inputs admin-password"><input type="text" placeholder="LICENSE KEY"/></div>
|
||||
<a href="javascript:void(0);" class="LICENSE_SUBMIT btn btn-primary">注册授权</a>
|
||||
<div class="links">
|
||||
<a href="./index.php?user/versionInstall&reset=1" class="btn btn-link license-use-free"><?php echo LNG('use_free');?></a>
|
||||
|
|
|
@ -43,11 +43,12 @@
|
|||
<i class="font-icon icon-key"></i>
|
||||
<input id="password" name='password' type="password" placeholder="<?php echo LNG('password');?>"
|
||||
required autocomplete="on" disabled/>
|
||||
<input type='hidden' name='csrfLogin' value="<?php echo $_SESSION['csrfLogin'];?>"/>
|
||||
</div>
|
||||
<?php if(need_check_code()){?>
|
||||
<div class='check-code'>
|
||||
<i class="font-icon icon-unlock-alt"></i>
|
||||
<input name='checkCode' class="check-code" type="text" placeholder="<?php echo LNG('login_code');?>" required autocomplete="off"/>
|
||||
<input name='checkCode' class="check-code" type="text" placeholder="<?php echo LNG('login_code');?>" required/>
|
||||
<img src='./index.php?user/checkCode' onclick="this.src='./index.php?user/checkCode'" />
|
||||
</div>
|
||||
<?php }?>
|
||||
|
|
|
@ -26,12 +26,13 @@
|
|||
<i class="font-icon icon-key"></i>
|
||||
<input id="password" name='password' type="password" placeholder="<?php echo LNG('password');?>"
|
||||
required disabled/>
|
||||
<input type='hidden' name='csrfLogin' value="<?php echo $_SESSION['csrfLogin'];?>"/>
|
||||
</div>
|
||||
|
||||
<?php if(need_check_code()){?>
|
||||
<div class='check-code'>
|
||||
<i class="font-icon icon-unlock-alt"></i>
|
||||
<input name='checkCode' class="check-code" type="text" placeholder="<?php echo LNG('login_code');?>" required autocomplete="off"/>
|
||||
<input name='checkCode' class="check-code" type="text" placeholder="<?php echo LNG('login_code');?>" required/>
|
||||
<img src='./index.php?user/checkCode' onclick="this.src='./index.php?user/checkCode'" />
|
||||
</div>
|
||||
<?php }?>
|
||||
|
|
|
@ -18,12 +18,12 @@ if(GLOBAL_DEBUG){
|
|||
define('STATIC_JS','_dev'); //_dev||app
|
||||
define('STATIC_LESS','less');//less||css
|
||||
@ini_set("display_errors","on");
|
||||
@error_reporting(E_ALL^E_NOTICE);//
|
||||
@error_reporting(E_ALL^E_NOTICE^E_WARNING^E_DEPRECATED);//
|
||||
}else{
|
||||
define('STATIC_JS','app'); //app
|
||||
define('STATIC_LESS','css');//css
|
||||
@ini_set("display_errors","on");//on off
|
||||
@error_reporting(E_ALL^E_NOTICE^E_WARNING);// 0
|
||||
@error_reporting(E_ALL^E_NOTICE^E_WARNING^E_DEPRECATED);// 0
|
||||
}
|
||||
|
||||
//header('HTTP/1.1 200 Ok');//兼容部分lightHttp服务器环境; php5.1以下会输出异常;暂屏蔽
|
||||
|
@ -38,13 +38,13 @@ define('FUNCTION_DIR', LIB_DIR .'function/'); //函数库目录
|
|||
define('CLASS_DIR', LIB_DIR .'kod/'); //工具类目录
|
||||
define('CORER_DIR', LIB_DIR .'core/'); //核心目录
|
||||
define('SDK_DIR', LIB_DIR .'sdks/'); //
|
||||
define('DEFAULT_PERRMISSIONS',0755); //新建文件、解压文件默认权限,777 部分虚拟主机限制了777
|
||||
define('DEFAULT_PERRMISSIONS',0755); //新建文件、解压文件默认权限,777 部分虚拟主机限制了777;
|
||||
|
||||
/*
|
||||
* 可以数据目录;移到web目录之外,可以使程序更安全, 就不用限制用户的扩展名权限了;
|
||||
* 1. 需要先将data文件夹移到别的地方 例如将data文件夹拷贝到D:/
|
||||
* 2. 在config文件夹下新建define.php 新增一行 <?php define('DATA_PATH','D:/data/');
|
||||
* 注意:路径不能写错;其次php需要有权限访问移动后的目录(设置了防跨站需要关闭)
|
||||
* 注意:路径不能写错;其次php需要有权限访问移动后的目录(设置了防跨站需要关闭) 路径结尾/斜杠绝对不能缺少
|
||||
*/
|
||||
if(file_exists(BASIC_PATH.'config/define.php')){
|
||||
include(BASIC_PATH.'config/define.php');
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
<?php
|
||||
return array(
|
||||
"path_api_select_file" => "Bitte wählen Sie die Datei ...",
|
||||
"path_api_select_folder" => "Bitte wählen Sie einen Ordner ...",
|
||||
"path_api_select_image" => "Bitte wählen Sie ein Bild ...",
|
||||
"path_api_select_file" => "Bitte wählen Sie eine Datei aus. ...",
|
||||
"path_api_select_folder" => "Bitte wählen Sie einen Ordner aus...",
|
||||
"path_api_select_image" => "Bitte wählen Sie ein Bild aus...",
|
||||
"share_can_upload" => "Upload zulassen",
|
||||
"move_error" => "Verschieben fehlgeschlagen",
|
||||
"setting_basic" => "Grundeinstellungen",
|
||||
"setting_user_sound_open" => "Open Sound",
|
||||
"setting_user_animate_open" => "Animation öffnen",
|
||||
"recycle_open_if" => "Öffnen Sie den Papierkorb",
|
||||
"recycle_open" => "geöffnet",
|
||||
"setting_user_sound_open" => "Soundeinstellungen öffnen",
|
||||
"setting_user_animate_open" => "Animationseinstellungen öffnen",
|
||||
"recycle_open_if" => "Papierkorb öffnen",
|
||||
"recycle_open" => "geöfnet",
|
||||
"setting_user_recycle_desc" => "Nach dem Löschen wird die physikalische Löschung gelöscht",
|
||||
"setting_user_animate_desc" => "Fenster offen und andere Animation",
|
||||
"setting_user_sound_desc" => "Betriebsgeräusch",
|
||||
"setting_user_imageThumb" => "Bild thumbnails",
|
||||
"setting_user_imageThumb" => "Bildvorschau",
|
||||
"setting_user_imageThumb_desc" => "Bessere Browser-Erfahrung nach dem Öffnen",
|
||||
"setting_user_fileSelect" => "Öffnen Sie die Datei icon check",
|
||||
"setting_user_fileSelect_desc" => "Dateisymbol linke Schlüsselprüfung, Rechtsklick-Menü-Shortcut-Eintrag",
|
||||
"qrcode" => "URL QR-Code",
|
||||
"qrcode" => "QR-Code",
|
||||
"theme_mac" => "Mac minimalistisch weiß",
|
||||
"theme_win7" => "Windows 7",
|
||||
"theme_win10" => "Windows 10",
|
||||
|
@ -30,24 +30,24 @@ return array(
|
|||
"theme_alpha_image_sun" => "Bright - Sunset",
|
||||
"theme_alpha_image_sky" => "Symphony - Blue Sky",
|
||||
"theme_diy" => "<b>Benutzerdefinierte</b>",
|
||||
"theme_diy_title" => "Benutzerdefinierte Design-Einstellungen",
|
||||
"theme_diy_title" => "DIY Design-Einstellungen",
|
||||
"theme_diy_background" => "Hintergrund",
|
||||
"theme_diy_image" => "Bild",
|
||||
"theme_diy_color_blur" => "Farbverlauf",
|
||||
"theme_diy_image_blur" => "Bildunschärfe",
|
||||
"theme_diy_image_url" => "Fotos Adresse",
|
||||
"theme_diy_color_start" => "Ab Farbe",
|
||||
"theme_diy_color_end" => "End Farbe",
|
||||
"theme_diy_image_url" => "Link zum Foto",
|
||||
"theme_diy_color_start" => "Farbe 1",
|
||||
"theme_diy_color_end" => "Farbe 2",
|
||||
"theme_diy_color_radius" => "Steigungswinkel",
|
||||
"system_role_admin_set" => "Administratoren haben alle Rechte, ohne Einstellung!",
|
||||
"login_error_user_not_use" => "Benutzer wurde deaktiviert! Bitte kontaktieren Sie den Administrator",
|
||||
"login_error_kod_version" => "Versionskonflikt",
|
||||
"login_error_kod_version" => "Versionsfehler",
|
||||
"login_error_role" => "Anzeigeberechtigungen Gruppe nicht existiert, wenden Sie sich bitte an den Administrator",
|
||||
"no_permission_group" => "Sie sind nicht in dieser Gruppe!",
|
||||
"no_permission_write" => "Das Verzeichnis hat keine Schreibberechtigung",
|
||||
"no_permission_write" => "Sie haben keine Schreibberechtigung für dieses Verzeichnis",
|
||||
"user" => "Benutzer",
|
||||
"save_as" => "speichern unter",
|
||||
"check_update" => "Aktualisierung",
|
||||
"save_as" => "Speichern unter...",
|
||||
"check_update" => "Update",
|
||||
"keyboard_type" => "Keyboard-Modus",
|
||||
"font_family" => "Schriftarten",
|
||||
"code_mode" => "Syntax-Hervorhebung",
|
||||
|
@ -59,36 +59,36 @@ return array(
|
|||
"no_permission_action" => "Sie haben diese Berechtigung nicht, wenden Sie sich bitte an den Administrator!",
|
||||
"path_is_root_tips" => "Es ist gekommen, um das Root-Verzeichnis!",
|
||||
"kod_group" => "Organisation",
|
||||
"my_kod_group" => "Ich bin in der Abteilung",
|
||||
"my_kod_group" => "Ich bin in der Organisation",
|
||||
"space_tips_default" => "(GB) 0 keine Begrenzung",
|
||||
"space_tips_full" => "Ohne Einschränkung",
|
||||
"space_size" => "Raum",
|
||||
"space_size_use" => "Die Nutzung des Raumes",
|
||||
"space_is_full" => "Es ist nicht mehr genug Platz, bitte kontaktieren Sie den Administrator!",
|
||||
"space_size" => "Speicherplatz",
|
||||
"space_size_use" => "Die Nutzung des Speicherplatzes",
|
||||
"space_is_full" => "Es ist nicht mehr genug Speicherplatz verfügbar, bitte kontaktieren Sie einen Administrator!",
|
||||
"system_open_true_path" => "Erfolgreich im Dateimanager geöffnet!",
|
||||
"group_role_error" => "Rollenberechtigungsfehler (keine Berechtigungseinstellungen)",
|
||||
"group_role_error_admin" => "Unzureichende Berechtigungen",
|
||||
"group_role_error" => "Rollenberechtigungsfehler",
|
||||
"group_role_error_admin" => "Fehlende Berechtigung!",
|
||||
"markdown_content" => "Inhaltsverzeichnis",
|
||||
"system_group" => "Benutzer und Abteilungen",
|
||||
"system_group_edit" => "Abteilungsleitung",
|
||||
"system_group" => "Benutzer und Gruppen",
|
||||
"system_group_edit" => "Gruppen",
|
||||
"system_group_role" => "Rollenidentität",
|
||||
"system_group_create" => "Neue Abteilung",
|
||||
"system_group_name" => "Abteilungsname",
|
||||
"system_group_father" => "Übergeordnete Abteilung",
|
||||
"system_group_add" => "Unterabteilung hinzufügen",
|
||||
"system_group_remove" => "Entfernen Sie die Abteilung",
|
||||
"system_group_remove_tips" => "Sind Sie sicher, die Abteilung zu löschen?<br/>Nachdem das Löschen des Teils des Benutzers entfernt wurde, wird der Teilsektor in den Wurzelbereich verschoben",
|
||||
"system_group_select" => "Wählen Sie Abteilung",
|
||||
"system_group_create" => "Neue Gruppe",
|
||||
"system_group_name" => "Gruppenname",
|
||||
"system_group_father" => "Übergeordnete Gruppe",
|
||||
"system_group_add" => "Untergruppe hinzufügen",
|
||||
"system_group_remove" => "Gruppe entfernen",
|
||||
"system_group_remove_tips" => "Sind Sie sich sicher, ob sie die Gruppe löschen wollen?<br/>Nachdem das Löschen des Teils des Benutzers entfernt wurde, wird der Teilsektor in den Wurzelbereich verschoben",
|
||||
"system_group_select" => "Wählen Sie eine Gruppe",
|
||||
"system_group_select_result" => "Die Mitglieder werden in den folgenden Sektoren gehören",
|
||||
"system_role_admin_tips" => "Hinweise: Systemadministratoren sind nicht zur Steuerung berechtigt",
|
||||
"system_member_action" => "Benutzerverwaltung",
|
||||
"system_member_add" => "Neuer Benutzer",
|
||||
"system_member_role" => "Berechtigungsrollen",
|
||||
"system_member_role_select" => "wählen",
|
||||
"system_member_role_select" => "Auswählen",
|
||||
"system_member_password_tips" => "Füllen Sie nicht nicht geändert",
|
||||
"system_set_home_path" => "Benutzerdefinierte Katalog",
|
||||
"system_set_home_path_tips" => "Das Standardverzeichnis ist leer",
|
||||
"system_member_group" => "Wo die Abteilung",
|
||||
"system_member_group" => "Wo die Gruppe",
|
||||
"system_member_group_edit" => "Redaktion",
|
||||
"system_member_remove" => "Benutzer löschen",
|
||||
"system_member_remove_tips" => "Bestätigen Sie Benutzer löschen?<br/>, nachdem Sie das Benutzerverzeichnis zu entfernen wird vollständig gelöscht",
|
||||
|
@ -99,19 +99,19 @@ return array(
|
|||
"system_member_use" => "ermöglichen",
|
||||
"system_member_unuse" => "Deaktivieren",
|
||||
"system_member_space" => "Legen Sie die Größe des Benutzerbereichs fest ",
|
||||
"system_member_space_tips" => " Legen Sie die Größe des Benutzerbereichs fest ",
|
||||
"system_member_space_number" => " Muss eine Nummer sein!",
|
||||
"system_member_space_tips" => "Legen Sie die Größe des Benutzerbereichs fest ",
|
||||
"system_member_space_number" => "Muss eine Nummer sein!",
|
||||
"system_member_group_config" => "Chargeneinstellungsabteilung",
|
||||
"system_member_group_remove" => "Aus der Abteilung entfernt",
|
||||
"system_member_group_insert" => "Zur Abteilung hinzufügen",
|
||||
"system_member_group_reset" => "Setzen Sie die Abteilung zurück",
|
||||
"system_member_group_error" => "Abteilungsfehler",
|
||||
"system_member_group_remove" => "Aus der Gruppe entfernt",
|
||||
"system_member_group_insert" => "Zur Gruppe hinzufügen",
|
||||
"system_member_group_reset" => "Setzen Sie die Gruppe zurück",
|
||||
"system_member_group_error" => "Gruppenfehler",
|
||||
"system_group_action" => "Abteilungsleitung",
|
||||
"system_role_add" => "In Rollenidentität",
|
||||
"system_role_read" => "Read-only",
|
||||
"system_role_write" => "Kann lesen und schreiben",
|
||||
"system_setting_root_path" => "root-Zugriff",
|
||||
"system_setting_root_path_desc" => "Nur ein Systemadministrator alle Verzeichnisse zugreifen, andere Rechte Benutzergruppen können nur ihre eigenen Benutzerverzeichnis sehen. Wenn Sie ein- oder ausschalten zu anderen Verzeichnissen Zugriff<br/>Administrator möchten, können Sie die PHP open_basedir anti-Cross-Site-Parameter ändern,<a href=\"https://www.google.com.hk/search?&q=php+open_basedir\" target=\"_ |