version 3.37
parent
8e76436034
commit
4b2c33663f
|
@ -60,28 +60,25 @@ define('OFFICE_SERVER',"https://owa-box.vips100.com/op/view.aspx?src=");
|
|||
// https://view.officeapps.live.com/op/view.aspx?src=
|
||||
|
||||
|
||||
include_once(FUNCTION_DIR.'common.function.php');
|
||||
include(FUNCTION_DIR.'common.function.php');
|
||||
$config['app_startTime'] = mtime();
|
||||
include_once(FUNCTION_DIR.'web.function.php');
|
||||
include_once(FUNCTION_DIR.'file.function.php');
|
||||
include_once(CORER_DIR.'Application.class.php');
|
||||
include_once(CORER_DIR.'Controller.class.php');
|
||||
include_once(CORER_DIR.'Model.class.php');
|
||||
include_once(CLASS_DIR.'fileCache.class.php');
|
||||
include_once(CLASS_DIR.'mcrypt.class.php');
|
||||
include_once(CONTROLLER_DIR.'system_member.class.php');
|
||||
include_once(CONTROLLER_DIR.'system_group.class.php');
|
||||
include_once(CONTROLLER_DIR.'system_role.class.php');
|
||||
include_once(CONTROLLER_DIR.'util.php');
|
||||
include_once(BASIC_PATH.'config/setting.php');
|
||||
include_once(BASIC_PATH.'config/version.php');
|
||||
include(FUNCTION_DIR.'web.function.php');
|
||||
include(FUNCTION_DIR.'file.function.php');
|
||||
include(CORER_DIR.'Application.class.php');
|
||||
include(CORER_DIR.'Controller.class.php');
|
||||
include(CORER_DIR.'Model.class.php');
|
||||
include(CLASS_DIR.'fileCache.class.php');
|
||||
include(CLASS_DIR.'mcrypt.class.php');
|
||||
include(CONTROLLER_DIR.'system_member.class.php');
|
||||
include(CONTROLLER_DIR.'system_group.class.php');
|
||||
include(CONTROLLER_DIR.'system_role.class.php');
|
||||
include(CONTROLLER_DIR.'util.php');
|
||||
include(BASIC_PATH.'config/setting.php');
|
||||
include(BASIC_PATH.'config/version.php');
|
||||
|
||||
define('WEB_ROOT',get_webroot(BASIC_PATH));
|
||||
define('HOST',get_host().'/');
|
||||
define('APPHOST',HOST.str_replace(WEB_ROOT,'',BASIC_PATH));//程序根目录
|
||||
//数据地址定义。
|
||||
$config['pic_thumb'] = BASIC_PATH.'data/thumb/'; // 缩略图生成存放地址
|
||||
$config['cache_dir'] = BASIC_PATH.'data/cache/'; // 缓存文件地址
|
||||
|
||||
$config['app_charset'] = 'utf-8'; //该程序整体统一编码
|
||||
$config['settings']['static_path'] = "./static/"; //静态文件目录
|
||||
|
|
|
@ -81,7 +81,7 @@ class user extends Controller{
|
|||
private function login_success($user){
|
||||
$this->user = $user;
|
||||
if(!$user['path']){//服务器管理后立即生效
|
||||
$this->login($this->L['kod_version_error']);
|
||||
$this->login("Your 'path' is empty,please install again!");
|
||||
}else if($user['status'] == 0){
|
||||
$this->login($this->L['login_error_user_not_use']);
|
||||
}else if($user['role']==''){
|
||||
|
@ -275,7 +275,7 @@ class user extends Controller{
|
|||
$user = $sql->get($root);
|
||||
$user['password'] = md5($this->in['password']);
|
||||
$sql->set($root,$user);
|
||||
if( $user['path'] == '' && $user['create_time'] == ''){
|
||||
if($user['create_time'] == ''){
|
||||
$member = new system_member();
|
||||
$member->init_install();
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
<?php exit;?>{"1":{"group_id":1,"name":"public","parent_id":"","children":"","config":{"size_max":0,"size_use":0},"path":"","create_time":""}}
|
||||
<?php exit;?>{"1":{"group_id":1,"name":"public","parent_id":"","children":"","config":{"size_max":0,"size_use":0},"path":"public","create_time":""}}
|
|
@ -1 +1 @@
|
|||
<?php exit;?>{"1":{"user_id":"1","name":"admin","password":"21232f297a57a5a743894a0e4a801fc3","role":"1","config":{"size_max":1,"size_use":5369},"group_info":{"1":"write"},"path":"","status":1,"create_time":"","size_max":"1","last_login":""},"100":{"user_id":"100","name":"demo","password":"fe01ce2a7fbac8fafaed7c982a04e229","role":"2","config":{"size_max":5,"size_use":1048576},"group_info":{"1":"read"},"path":"","status":1,"last_login":"","create_time":""},"101":{"user_id":"101","name":"guest","password":"084e0343a0486ff05530df6c705c8bb4","role":"100","config":{"size_max":0.1,"size_use":1048576},"group_info":{"1":"read"},"path":"","status":1,"last_login":"","create_time":""}}
|
||||
<?php exit;?>{"1":{"user_id":"1","name":"admin","password":"21232f297a57a5a743894a0e4a801fc3","role":"1","config":{"size_max":1,"size_use":5369},"group_info":{"1":"write"},"path":"admin","status":1,"create_time":"","size_max":"1","last_login":""},"100":{"user_id":"100","name":"demo","password":"fe01ce2a7fbac8fafaed7c982a04e229","role":"2","config":{"size_max":5,"size_use":1048576},"group_info":{"1":"read"},"path":"demo","status":1,"last_login":"","create_time":""},"101":{"user_id":"101","name":"guest","password":"084e0343a0486ff05530df6c705c8bb4","role":"100","config":{"size_max":0.1,"size_use":1048576},"group_info":{"1":"read"},"path":"guest","status":1,"last_login":"","create_time":""}}
|
File diff suppressed because one or more lines are too long
|
@ -48,10 +48,12 @@ class Application {
|
|||
public function appRun($class,$function){
|
||||
$sub_dir = $this -> sub_dir ? $this -> sub_dir . '/' : '';
|
||||
$class_file = CONTROLLER_DIR . $sub_dir.$class.'.class.php';
|
||||
if (!is_file($class_file)) {
|
||||
if (!file_exists($class_file)) {
|
||||
show_tips($class.' controller not exists!');
|
||||
}
|
||||
require_once $class_file;
|
||||
if (!class_exists($class)) {
|
||||
include($class_file);
|
||||
}
|
||||
if (!class_exists($class)) {
|
||||
show_tips($class.' class not exists');
|
||||
}
|
||||
|
|
|
@ -11,13 +11,13 @@
|
|||
*/
|
||||
function _autoload($className){
|
||||
if (file_exists(CLASS_DIR . strtolower($className) . '.class.php')) {
|
||||
require_once(CLASS_DIR . strtolower($className) . '.class.php');
|
||||
include(CLASS_DIR . strtolower($className) . '.class.php');
|
||||
} else if (file_exists(CONTROLLER_DIR . strtolower($className) . '.class.php')) {
|
||||
require_once(CONTROLLER_DIR . strtolower($className) . '.class.php');
|
||||
include(CONTROLLER_DIR . strtolower($className) . '.class.php');
|
||||
} else if (file_exists(MODEl_DIR . strtolower($className) . '.class.php')) {
|
||||
require_once(MODEl_DIR . strtolower($className) . '.class.php');
|
||||
include(MODEl_DIR . strtolower($className) . '.class.php');
|
||||
} else {
|
||||
// error code;
|
||||
show_tips($className.' is not exist');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ function _autoload($className){
|
|||
function init_model($model_name){
|
||||
if (!class_exists($model_name.'Model')) {
|
||||
$model_file = MODEL_DIR.$model_name.'Model.class.php';
|
||||
require_once ($model_file);
|
||||
include($model_file);
|
||||
if(!is_file($model_file)){
|
||||
return false;
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ function init_controller($controller_name){
|
|||
if(!is_file($model_file)){
|
||||
return false;
|
||||
}
|
||||
require_once ($model_file);
|
||||
include($model_file);
|
||||
}
|
||||
$reflectionObj = new ReflectionClass($controller_name);
|
||||
$args = func_get_args();
|
||||
|
@ -60,7 +60,7 @@ function init_controller($controller_name){
|
|||
function load_class($class){
|
||||
$filename = CLASS_DIR.$class.'.class.php';
|
||||
if (file_exists($filename)) {
|
||||
require_once($filename);
|
||||
include($filename);
|
||||
}else{
|
||||
show_tips($filename.' is not exist');
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ function load_class($class){
|
|||
function load_function($function){
|
||||
$filename = FUNCTION_DIR.$function.'.function.php';
|
||||
if (file_exists($filename)) {
|
||||
require_once($filename);
|
||||
include($filename);
|
||||
}else{
|
||||
show_tips($filename.' is not exist');
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
|
||||
define('UPDATE_VERSION','');
|
||||
define('UPDATE_DEV',false);
|
||||
|
||||
if(UPDATE_DEV){
|
||||
define('THE_DATA_PATH',WEB_ROOT.'self/kod/3.23/data/');
|
||||
del_dir(THE_DATA_PATH);
|
||||
|
@ -10,6 +12,8 @@ if(UPDATE_DEV){
|
|||
}
|
||||
|
||||
function update_check(){
|
||||
unzip_repeat();//再次解压,避免windows部分主机解压失败问题
|
||||
|
||||
//from <=3.23 to last
|
||||
if( file_exists(THE_DATA_PATH.'system/member.php') &&
|
||||
!file_exists(THE_DATA_PATH.'system/system_member.php')){
|
||||
|
@ -31,6 +35,18 @@ function update_check(){
|
|||
update_clear();
|
||||
}
|
||||
|
||||
function unzip_repeat(){
|
||||
$zip_file = THE_DATA_PATH.'2.0-'.UPDATE_VERSION.'.zip';
|
||||
if(!file_exists($zip_file)){
|
||||
return;
|
||||
}
|
||||
$unzip_to = BASIC_PATH;
|
||||
load_class('pclzip');
|
||||
$zip = new PclZip($zip_file);
|
||||
$result = $zip->extract(PCLZIP_OPT_PATH,$unzip_to,
|
||||
PCLZIP_OPT_REPLACE_NEWER);
|
||||
}
|
||||
|
||||
|
||||
function update_clear(){
|
||||
//更新版本号
|
||||
|
@ -38,14 +54,16 @@ function update_clear(){
|
|||
if(file_exists($file)){
|
||||
updateToV330::init_system();
|
||||
}
|
||||
|
||||
del_file(THE_DATA_PATH.'system/group.php');
|
||||
del_file(THE_DATA_PATH.'system/member.php');
|
||||
del_file(BASIC_PATH.'readme.txt');
|
||||
del_file(THE_DATA_PATH.'2.0-3.23.zip');
|
||||
del_file(THE_DATA_PATH.'2.0-3.34.zip');
|
||||
del_file(THE_DATA_PATH.'2.0-3.35.zip');
|
||||
del_file(THE_DATA_PATH.'2.0-'.KOD_VERSION.'.zip');
|
||||
del_file(THE_DATA_PATH.'2.0-'.UPDATE_VERSION.'.zip');
|
||||
|
||||
del_file(BASIC_PATH.'readme.txt');
|
||||
del_file(BASIC_PATH.'controller/group.class.php');
|
||||
del_file(BASIC_PATH.'controller/member.class.php');
|
||||
|
||||
del_dir(THE_DATA_PATH.'i18n');
|
||||
del_dir(THE_DATA_PATH.'thumb');
|
||||
|
@ -195,7 +213,7 @@ class updateToV330{
|
|||
$item_path = iconv_system($group_path.$arr['path'].'/');
|
||||
mk_dir($item_path.'data');
|
||||
mk_dir($item_path.'recycle');
|
||||
if(file_exists($public)){
|
||||
if(file_exists($public)){//移动文件耗时操作;放最后;
|
||||
if(! @rename($public,$item_path.'home')){
|
||||
move_path($public,$item_path.'home');
|
||||
}
|
||||
|
|
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
|
@ -431,7 +431,7 @@ function download(data, strFileName, strMimeType) {
|
|||
}else{
|
||||
return navigator.msSaveBlob ? // IE10 can't do a[download], only Blobs:
|
||||
navigator.msSaveBlob(dataUrlToBlob(payload), fileName) :
|
||||
saver(payload) ; // everyone else can save dataURLs un-processed
|
||||
saveToData(payload) ; // everyone else can save dataURLs un-processed
|
||||
}
|
||||
}//end if dataURL passed?
|
||||
|
||||
|
@ -451,7 +451,7 @@ function download(data, strFileName, strMimeType) {
|
|||
return new myBlob([uiArr], {type: type});
|
||||
}
|
||||
|
||||
function saver(url, winMode){
|
||||
function saveToData(url, winMode){
|
||||
if ('download' in anchor) { //html5 A[download]
|
||||
anchor.href = url;
|
||||
anchor.setAttribute("download", fileName);
|
||||
|
@ -485,18 +485,15 @@ function download(data, strFileName, strMimeType) {
|
|||
return navigator.msSaveBlob(blob, fileName);
|
||||
}
|
||||
if(self.URL){
|
||||
saver(self.URL.createObjectURL(blob), true);
|
||||
saveToData(self.URL.createObjectURL(blob), true);
|
||||
}else{
|
||||
if(typeof blob === "string" || blob.constructor===toString ){
|
||||
try{
|
||||
return saver( "data:" + mimeType + ";base64," + self.btoa(blob) );
|
||||
}catch(y){
|
||||
return saver( "data:" + mimeType + "," + encodeURIComponent(blob) );
|
||||
}
|
||||
if( typeof(blob) === "string" ||
|
||||
blob.constructor===toString ){
|
||||
return saveToData("data:"+mimeType+";base64,"+window.btoa(blob));
|
||||
}
|
||||
reader=new FileReader();
|
||||
reader.onload=function(e){
|
||||
saver(this.result);
|
||||
saveToData(this.result);
|
||||
};
|
||||
reader.readAsDataURL(blob);
|
||||
}
|
||||
|
|
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
Loading…
Reference in New Issue