version 3.41 release

pull/135/head 3.41
warlee 2017-03-06 19:28:24 +08:00
parent 981cfa2fe6
commit f84274b9c3
82 changed files with 429 additions and 375 deletions

View File

@ -1,14 +1,24 @@
### ver3.39 `2017/3/2` ### ver3.41 `2017/3/5`
----- -----
#### update: #### update:
- 右键菜单图标优化 - 右键菜单图标优化
- 移动端打开html直接浏览 - 移动端打开html直接浏览
- 远程下载优化,不受限于服务器的超时设置,支持断点续传(需要下载的url支持)
- 为安全考虑,仅支持分享自己的文档;分享其他目录进行提示!
- 分片上传优化成0.8M
- 群组目录;群组分享目录;管理员或有权限访问读写权限统一处理
#### fix bug #### fix bug
- 部分windows服务器数据写入失败问题解决 - 部分windows服务器数据写入失败问题解决
- 分享分享过期判断处理 - 分享分享过期判断处理
- office预览弹出层打开。 - office预览弹出层打开。
- 编辑器编码识别优化 - 编辑器编码识别优化
- 树目录删除文件提示文字信息有误问题
- 修复右键菜单修改排序字段,排序方式时会有数据不完整情况。
- 登陆界面忘记密码对话框挡住问题
- 编辑器编码自动识别,编辑并保存兼容更多编码。
- ie部分显示兼容问题优化
- 旧版本3.22版本windows服务器下升级不成功问题优化
### ver3.38 `2017/3/1` ### ver3.38 `2017/3/1`

View File

@ -21,7 +21,7 @@ if(GLOBAL_DEBUG){
define('STATIC_JS','app'); //app define('STATIC_JS','app'); //app
define('STATIC_LESS','css');//css define('STATIC_LESS','css');//css
@ini_set("display_errors","on");//on off @ini_set("display_errors","on");//on off
@error_reporting(E_ERROR|E_PARSE);// 0 @error_reporting(E_ERROR|E_PARSE|E_WARNING);// 0
} }
header("Content-type: text/html; charset=utf-8"); header("Content-type: text/html; charset=utf-8");

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "وضع لوحة المفاتيح", "keyboard_type" => "وضع لوحة المفاتيح",
"font_family" => "الخطوط", "font_family" => "الخطوط",
"code_mode" => "تسليط الضوء على تركيب", "code_mode" => "تسليط الضوء على تركيب",
"path_can_not_action" => "الدليل لا يدعم هذه العملية!", "path_can_not_action" => "يدعم فقط مشاركة الوثائق الخاصة بك!",
"wap_page_pc" => "نسخة الكمبيوتر", "wap_page_pc" => "نسخة الكمبيوتر",
"wap_page_phone" => "متحرك", "wap_page_phone" => "متحرك",
"image_size" => "أبعاد الصورة", "image_size" => "أبعاد الصورة",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "клавиатура Mode", "keyboard_type" => "клавиатура Mode",
"font_family" => "Fonts", "font_family" => "Fonts",
"code_mode" => "Оцветяване на синтаксиса", "code_mode" => "Оцветяване на синтаксиса",
"path_can_not_action" => "Директорията не поддържа тази операция!", "path_can_not_action" => "Поддържа споделят само собствените си документи!",
"wap_page_pc" => "PC версия", "wap_page_pc" => "PC версия",
"wap_page_phone" => "подвижен", "wap_page_phone" => "подвижен",
"image_size" => "размери на изображението", "image_size" => "размери на изображението",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "কীবোর্ড মোড", "keyboard_type" => "কীবোর্ড মোড",
"font_family" => "ফন্ট", "font_family" => "ফন্ট",
"code_mode" => "সিনট্যাক্স হাইলাইটিং", "code_mode" => "সিনট্যাক্স হাইলাইটিং",
"path_can_not_action" => "এই অপারেশন সমর্থন করে না!", "path_can_not_action" => "শুধুমাত্র আপনার নিজের নথি ভাগ সমর্থন!",
"wap_page_pc" => "পিসি সংস্করণ", "wap_page_pc" => "পিসি সংস্করণ",
"wap_page_phone" => "মোবাইল", "wap_page_phone" => "মোবাইল",
"image_size" => "চিত্র মাত্রা", "image_size" => "চিত্র মাত্রা",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "La manera de teclat", "keyboard_type" => "La manera de teclat",
"font_family" => "fonts", "font_family" => "fonts",
"code_mode" => "El ressaltat de sintaxi", "code_mode" => "El ressaltat de sintaxi",
"path_can_not_action" => "El directori no és compatible amb aquesta operació!", "path_can_not_action" => "Només admet compartir els seus propis documents!",
"wap_page_pc" => "versió PC", "wap_page_pc" => "versió PC",
"wap_page_phone" => "mòbil", "wap_page_phone" => "mòbil",
"image_size" => "dimensions de la imatge", "image_size" => "dimensions de la imatge",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "Režim klávesnice", "keyboard_type" => "Režim klávesnice",
"font_family" => "Fonty", "font_family" => "Fonty",
"code_mode" => "zvýrazňování syntaxe", "code_mode" => "zvýrazňování syntaxe",
"path_can_not_action" => "Adresář nepodporuje tuto operaci!", "path_can_not_action" => "Podporuje sdílet pouze své vlastní dokumenty!",
"wap_page_pc" => "PC verze", "wap_page_pc" => "PC verze",
"wap_page_phone" => "mobilní", "wap_page_phone" => "mobilní",
"image_size" => "rozměry obrázku", "image_size" => "rozměry obrázku",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "Keyboard-tilstand", "keyboard_type" => "Keyboard-tilstand",
"font_family" => "Fonts", "font_family" => "Fonts",
"code_mode" => "Syntaks fremhævning", "code_mode" => "Syntaks fremhævning",
"path_can_not_action" => "Mappen understøtter ikke denne handling!", "path_can_not_action" => "Understøtter kun dele dine egne dokumenter!",
"wap_page_pc" => "PC version", "wap_page_pc" => "PC version",
"wap_page_phone" => "Mobil", "wap_page_phone" => "Mobil",
"image_size" => "Billede dimensioner", "image_size" => "Billede dimensioner",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "Keyboard-Modus", "keyboard_type" => "Keyboard-Modus",
"font_family" => "Schriftarten", "font_family" => "Schriftarten",
"code_mode" => "Syntax-Hervorhebung", "code_mode" => "Syntax-Hervorhebung",
"path_can_not_action" => "Das Verzeichnis nicht unterstützt diese Operation!", "path_can_not_action" => "Unterstützt nur Ihre eigenen Dokumente zu teilen!",
"wap_page_pc" => "PC Version", "wap_page_pc" => "PC Version",
"wap_page_phone" => "Mobile", "wap_page_phone" => "Mobile",
"image_size" => "Bildmaße", "image_size" => "Bildmaße",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "Λειτουργία πληκτρολογίου", "keyboard_type" => "Λειτουργία πληκτρολογίου",
"font_family" => "γραμματοσειρές", "font_family" => "γραμματοσειρές",
"code_mode" => "τονισμό σύνταξης", "code_mode" => "τονισμό σύνταξης",
"path_can_not_action" => "Ο κατάλογος δεν υποστηρίζει αυτή τη λειτουργία!", "path_can_not_action" => "Υποστηρίζει μοιράζονται μόνο τα δικά σας έγγραφα!",
"wap_page_pc" => "PC Έκδοση", "wap_page_pc" => "PC Έκδοση",
"wap_page_phone" => "κινητός", "wap_page_phone" => "κινητός",
"image_size" => "διαστάσεις εικόνας", "image_size" => "διαστάσεις εικόνας",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "Keyboard", "keyboard_type" => "Keyboard",
"font_family" => "Font", "font_family" => "Font",
"code_mode" => "Syntax highlighter", "code_mode" => "Syntax highlighter",
"path_can_not_action" => "The directory does not support this operation!", "path_can_not_action" => "Only support sharing your own documents!",
"wap_page_pc" => "PC", "wap_page_pc" => "PC",
"wap_page_phone" => "Phone", "wap_page_phone" => "Phone",
"image_size" => "Image size", "image_size" => "Image size",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "El modo de teclado", "keyboard_type" => "El modo de teclado",
"font_family" => "Fuentes", "font_family" => "Fuentes",
"code_mode" => "El resaltado de sintaxis", "code_mode" => "El resaltado de sintaxis",
"path_can_not_action" => "El directorio no es compatible con esta operación!", "path_can_not_action" => "Sólo admite compartir sus propios documentos!",
"wap_page_pc" => "Versión PC", "wap_page_pc" => "Versión PC",
"wap_page_phone" => "móvil", "wap_page_phone" => "móvil",
"image_size" => "dimensiones de la imagen", "image_size" => "dimensiones de la imagen",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "Klaviatuur režiim", "keyboard_type" => "Klaviatuur režiim",
"font_family" => "fondid", "font_family" => "fondid",
"code_mode" => "Süntaksi esiletõstmine", "code_mode" => "Süntaksi esiletõstmine",
"path_can_not_action" => "Kataloog ei toeta seda toimingut!", "path_can_not_action" => "Toetab ainult jagada oma dokumente!",
"wap_page_pc" => "PC versiooni", "wap_page_pc" => "PC versiooni",
"wap_page_phone" => "mobiilne", "wap_page_phone" => "mobiilne",
"image_size" => "Pilt mõõtmed", "image_size" => "Pilt mõõtmed",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "حالت صفحه کلید", "keyboard_type" => "حالت صفحه کلید",
"font_family" => "فونت", "font_family" => "فونت",
"code_mode" => "نحو برجسته", "code_mode" => "نحو برجسته",
"path_can_not_action" => "دایرکتوری این عملیات را پشتیبانی نمی کند!", "path_can_not_action" => "پشتیبانی تنها اسناد خود را به اشتراک بگذارید!",
"wap_page_pc" => "PC نسخه", "wap_page_pc" => "PC نسخه",
"wap_page_phone" => "سیار", "wap_page_phone" => "سیار",
"image_size" => "ابعاد تصویر", "image_size" => "ابعاد تصویر",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "näppäimistötilaan", "keyboard_type" => "näppäimistötilaan",
"font_family" => "Fontti", "font_family" => "Fontti",
"code_mode" => "syntaksin korostus", "code_mode" => "syntaksin korostus",
"path_can_not_action" => "Hakemistoa ei tue tätä toimintaa!", "path_can_not_action" => "Tukee vain jakaa omia asiakirjoja!",
"wap_page_pc" => "PC versio", "wap_page_pc" => "PC versio",
"wap_page_phone" => "mobile", "wap_page_phone" => "mobile",
"image_size" => "kuvan mitat", "image_size" => "kuvan mitat",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "Keyboard Mode", "keyboard_type" => "Keyboard Mode",
"font_family" => "Polices", "font_family" => "Polices",
"code_mode" => "La coloration syntaxique", "code_mode" => "La coloration syntaxique",
"path_can_not_action" => "Le répertoire ne supporte pas cette opération!", "path_can_not_action" => "Prise en charge seulement partager vos propres documents!",
"wap_page_pc" => "PC Version", "wap_page_pc" => "PC Version",
"wap_page_phone" => "mobile", "wap_page_phone" => "mobile",
"image_size" => "Dimensions de l'image", "image_size" => "Dimensions de l'image",
@ -269,7 +269,7 @@ return array(
"others" => "autre", "others" => "autre",
"open_with" => "ouvert", "open_with" => "ouvert",
"close" => "proche", "close" => "proche",
"close_all" => "Fermer toutes les", "close_all" => "Fermez toutes les",
"close_left" => "Fermer l'onglet gauche", "close_left" => "Fermer l'onglet gauche",
"close_right" => "Fermer les onglets sur la droite", "close_right" => "Fermer les onglets sur la droite",
"close_others" => "Fermer Autres", "close_others" => "Fermer Autres",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "Modo de teclado", "keyboard_type" => "Modo de teclado",
"font_family" => "fontes", "font_family" => "fontes",
"code_mode" => "destaque de sintaxe", "code_mode" => "destaque de sintaxe",
"path_can_not_action" => "O directorio non soporta esta operación!", "path_can_not_action" => "Soporta só compartir os seus propios documentos!",
"wap_page_pc" => "Versión para PC", "wap_page_pc" => "Versión para PC",
"wap_page_phone" => "móbil", "wap_page_phone" => "móbil",
"image_size" => "dimensións da imaxe", "image_size" => "dimensións da imaxe",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "कीबोर्ड मोड", "keyboard_type" => "कीबोर्ड मोड",
"font_family" => "फ़ॉन्ट्स", "font_family" => "फ़ॉन्ट्स",
"code_mode" => "सिंटेक्स हाइलाइटिंग", "code_mode" => "सिंटेक्स हाइलाइटिंग",
"path_can_not_action" => "निर्देशिका इस आपरेशन का समर्थन नहीं करता है!", "path_can_not_action" => "केवल अपने खुद के दस्तावेजों का हिस्सा समर्थन करता है!",
"wap_page_pc" => "पीसी संस्करण", "wap_page_pc" => "पीसी संस्करण",
"wap_page_phone" => "मोबाइल", "wap_page_phone" => "मोबाइल",
"image_size" => "छवि आयाम", "image_size" => "छवि आयाम",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "Način tipkovnica", "keyboard_type" => "Način tipkovnica",
"font_family" => "Fontovi", "font_family" => "Fontovi",
"code_mode" => "sintakse", "code_mode" => "sintakse",
"path_can_not_action" => "Katalog ne podržava ovu operaciju!", "path_can_not_action" => "Podržava samo dijeliti svoje dokumente!",
"wap_page_pc" => "PC verzija", "wap_page_pc" => "PC verzija",
"wap_page_phone" => "mobilan", "wap_page_phone" => "mobilan",
"image_size" => "dimenzije slike", "image_size" => "dimenzije slike",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "Keyboard Mode", "keyboard_type" => "Keyboard Mode",
"font_family" => "betűtípusok", "font_family" => "betűtípusok",
"code_mode" => "szintaxis kiemelés", "code_mode" => "szintaxis kiemelés",
"path_can_not_action" => "A könyvtár nem támogatja ezt a műveletet!", "path_can_not_action" => "Támogatja csak megoszthatja saját dokumentumait!",
"wap_page_pc" => "PC verzió", "wap_page_pc" => "PC verzió",
"wap_page_phone" => "mozgó", "wap_page_phone" => "mozgó",
"image_size" => "A kép mérete", "image_size" => "A kép mérete",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "Keyboard Modus", "keyboard_type" => "Keyboard Modus",
"font_family" => "font", "font_family" => "font",
"code_mode" => "sintaks", "code_mode" => "sintaks",
"path_can_not_action" => "direktori tidak mendukung operasi ini!", "path_can_not_action" => "Hanya mendukung berbagi dokumen Anda sendiri!",
"wap_page_pc" => "Versi PC", "wap_page_pc" => "Versi PC",
"wap_page_phone" => "mobil", "wap_page_phone" => "mobil",
"image_size" => "dimensi gambar", "image_size" => "dimensi gambar",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "Keyboard Mode", "keyboard_type" => "Keyboard Mode",
"font_family" => "Caratteri", "font_family" => "Caratteri",
"code_mode" => "L'evidenziazione della sintassi", "code_mode" => "L'evidenziazione della sintassi",
"path_can_not_action" => "La directory non supporta questa operazione!", "path_can_not_action" => "Supporta solo condividere i propri documenti!",
"wap_page_pc" => "Versione PC", "wap_page_pc" => "Versione PC",
"wap_page_phone" => "mobile", "wap_page_phone" => "mobile",
"image_size" => "dimensione immagine", "image_size" => "dimensione immagine",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "キーボードモード", "keyboard_type" => "キーボードモード",
"font_family" => "フォント", "font_family" => "フォント",
"code_mode" => "構文強調表示", "code_mode" => "構文強調表示",
"path_can_not_action" => "ディレクトリには、この操作をサポートしていません", "path_can_not_action" => "サポートする唯一の独自のドキュメントを共有",
"wap_page_pc" => "PC版", "wap_page_pc" => "PC版",
"wap_page_phone" => "モバイル", "wap_page_phone" => "モバイル",
"image_size" => "画像サイズ", "image_size" => "画像サイズ",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "키보드 모드", "keyboard_type" => "키보드 모드",
"font_family" => "글꼴", "font_family" => "글꼴",
"code_mode" => "구문 강조", "code_mode" => "구문 강조",
"path_can_not_action" => "디렉토리는이 작업을 지원하지 않습니다!", "path_can_not_action" => "단지 자신의 문서를 공유 지원합니다!",
"wap_page_pc" => "PC 버전", "wap_page_pc" => "PC 버전",
"wap_page_phone" => "모바일", "wap_page_phone" => "모바일",
"image_size" => "이미지 크기", "image_size" => "이미지 크기",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "Klaviatūros režimas", "keyboard_type" => "Klaviatūros režimas",
"font_family" => "Šriftai", "font_family" => "Šriftai",
"code_mode" => "sintaksės išryškinimas", "code_mode" => "sintaksės išryškinimas",
"path_can_not_action" => "Katalogas nepalaiko šią operaciją!", "path_can_not_action" => "Palaiko pasidalinti tik savo dokumentus!",
"wap_page_pc" => "PC versija", "wap_page_pc" => "PC versija",
"wap_page_phone" => "mobilus", "wap_page_phone" => "mobilus",
"image_size" => "vaizdo matmenys", "image_size" => "vaizdo matmenys",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "keyboard Mode", "keyboard_type" => "keyboard Mode",
"font_family" => "fonts", "font_family" => "fonts",
"code_mode" => "syntax highlighting", "code_mode" => "syntax highlighting",
"path_can_not_action" => "De map biedt geen ondersteuning voor deze operatie!", "path_can_not_action" => "Ondersteunt alleen je eigen documenten te delen!",
"wap_page_pc" => "PC Version", "wap_page_pc" => "PC Version",
"wap_page_phone" => "mobiel", "wap_page_phone" => "mobiel",
"image_size" => "afbeelding afmetingen", "image_size" => "afbeelding afmetingen",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "Keyboard Mode", "keyboard_type" => "Keyboard Mode",
"font_family" => "Fonts", "font_family" => "Fonts",
"code_mode" => "syntax highlighting", "code_mode" => "syntax highlighting",
"path_can_not_action" => "Katalogen støtter ikke denne operasjonen!", "path_can_not_action" => "Støtter bare dele dine egne dokumenter!",
"wap_page_pc" => "PC versjon", "wap_page_pc" => "PC versjon",
"wap_page_phone" => "Mobile", "wap_page_phone" => "Mobile",
"image_size" => "bilde~~POS=TRUNC dimensjoner", "image_size" => "bilde~~POS=TRUNC dimensjoner",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "Tryb klawiatury", "keyboard_type" => "Tryb klawiatury",
"font_family" => "Czcionki", "font_family" => "Czcionki",
"code_mode" => "podświetlanie składni", "code_mode" => "podświetlanie składni",
"path_can_not_action" => "Katalog nie obsługuje tej operacji!", "path_can_not_action" => "Obsługuje dzielić tylko swoje dokumenty!",
"wap_page_pc" => "Wersja PC", "wap_page_pc" => "Wersja PC",
"wap_page_phone" => "przenośny", "wap_page_phone" => "przenośny",
"image_size" => "wymiary obrazu", "image_size" => "wymiary obrazu",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "Modo de teclado", "keyboard_type" => "Modo de teclado",
"font_family" => "fontes", "font_family" => "fontes",
"code_mode" => "destaque de sintaxe", "code_mode" => "destaque de sintaxe",
"path_can_not_action" => "O diretório não suporta esta operação!", "path_can_not_action" => "Suporta apenas partilhar os seus próprios documentos!",
"wap_page_pc" => "Versão para PC", "wap_page_pc" => "Versão para PC",
"wap_page_phone" => "móvel", "wap_page_phone" => "móvel",
"image_size" => "dimensões da imagem", "image_size" => "dimensões da imagem",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "Mod tastatură", "keyboard_type" => "Mod tastatură",
"font_family" => "Fonturi", "font_family" => "Fonturi",
"code_mode" => "syntax highlighting", "code_mode" => "syntax highlighting",
"path_can_not_action" => "Directorul nu acceptă această operațiune!", "path_can_not_action" => "Sprijină accesul numai propriile documente!",
"wap_page_pc" => "Versiune pentru PC", "wap_page_pc" => "Versiune pentru PC",
"wap_page_phone" => "mobil", "wap_page_phone" => "mobil",
"image_size" => "dimensiuni imagine", "image_size" => "dimensiuni imagine",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "Режим клавиатуры", "keyboard_type" => "Режим клавиатуры",
"font_family" => "шрифты", "font_family" => "шрифты",
"code_mode" => "подсветка синтаксиса", "code_mode" => "подсветка синтаксиса",
"path_can_not_action" => "Каталог не поддерживает эту операцию!", "path_can_not_action" => "Поддержка только поделиться своими собственными документами!",
"wap_page_pc" => "PC Версия", "wap_page_pc" => "PC Версия",
"wap_page_phone" => "мобильный", "wap_page_phone" => "мобильный",
"image_size" => "размеры изображения", "image_size" => "размеры изображения",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "යතුරු පුවරුව ප්රකාරය", "keyboard_type" => "යතුරු පුවරුව ප්රකාරය",
"font_family" => "සිංහල ෆොන්ට්", "font_family" => "සිංහල ෆොන්ට්",
"code_mode" => "වාග් රීතිය අවධාරණය", "code_mode" => "වාග් රීතිය අවධාරණය",
"path_can_not_action" => "බහලුම මෙම මෙහෙයුම සඳහා පහසුකම් සපයන්නේ නැත!", "path_can_not_action" => "සහාය දක්වයි පමණක් ඔබේ ම ලිපි ලේඛන හුවමාරු කරන්න!",
"wap_page_pc" => "පළාත් සභා අනුවාදය", "wap_page_pc" => "පළාත් සභා අනුවාදය",
"wap_page_phone" => "ජංගම", "wap_page_phone" => "ජංගම",
"image_size" => "රූප මාන", "image_size" => "රූප මාන",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "režim klávesnice", "keyboard_type" => "režim klávesnice",
"font_family" => "fonty", "font_family" => "fonty",
"code_mode" => "zvýrazňovanie syntaxe", "code_mode" => "zvýrazňovanie syntaxe",
"path_can_not_action" => "Adresár nepodporuje túto operáciu!", "path_can_not_action" => "Podporuje zdieľať iba svoje vlastné dokumenty!",
"wap_page_pc" => "PC verzia", "wap_page_pc" => "PC verzia",
"wap_page_phone" => "mobilné", "wap_page_phone" => "mobilné",
"image_size" => "rozmery obrázku", "image_size" => "rozmery obrázku",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "Način tipkovnica", "keyboard_type" => "Način tipkovnica",
"font_family" => "pisave", "font_family" => "pisave",
"code_mode" => "sintakso poudarjanje", "code_mode" => "sintakso poudarjanje",
"path_can_not_action" => "Imenik ne podpira te operacije!", "path_can_not_action" => "Podpira deliti le svoje dokumente!",
"wap_page_pc" => "PC različica", "wap_page_pc" => "PC različica",
"wap_page_phone" => "Mobile", "wap_page_phone" => "Mobile",
"image_size" => "mere slike", "image_size" => "mere slike",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "тастатура режим", "keyboard_type" => "тастатура режим",
"font_family" => "фонтс", "font_family" => "фонтс",
"code_mode" => "истицање синтаксе", "code_mode" => "истицање синтаксе",
"path_can_not_action" => "Директоријум не подржава ову операцију!", "path_can_not_action" => "Подржава деле само своје документе!",
"wap_page_pc" => "ПЦ верзија", "wap_page_pc" => "ПЦ верзија",
"wap_page_phone" => "мобиле", "wap_page_phone" => "мобиле",
"image_size" => "slika димензије", "image_size" => "slika димензије",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "tangentbordsläge", "keyboard_type" => "tangentbordsläge",
"font_family" => "typsnitt", "font_family" => "typsnitt",
"code_mode" => "syntaxmarkering", "code_mode" => "syntaxmarkering",
"path_can_not_action" => "Katalogen stöder inte den här åtgärden!", "path_can_not_action" => "Stöder bara dela dina egna dokument!",
"wap_page_pc" => "PC version", "wap_page_pc" => "PC version",
"wap_page_phone" => "mobil", "wap_page_phone" => "mobil",
"image_size" => "bildens dimensioner", "image_size" => "bildens dimensioner",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "விசைப்பலகை முறை", "keyboard_type" => "விசைப்பலகை முறை",
"font_family" => "எழுத்துருக்கள்", "font_family" => "எழுத்துருக்கள்",
"code_mode" => "தொடரியல் தனிப்படுத்தல்", "code_mode" => "தொடரியல் தனிப்படுத்தல்",
"path_can_not_action" => "அடைவு இந்த அறுவை சிகிச்சை ஆதரிக்கவில்லை!", "path_can_not_action" => "உங்கள் சொந்த ஆவணங்களை பகிர்ந்து ஆதரிக்கிறது!",
"wap_page_pc" => "PC பதிப்பு", "wap_page_pc" => "PC பதிப்பு",
"wap_page_phone" => "மொபைல்", "wap_page_phone" => "மொபைல்",
"image_size" => "பட அளவுகள்", "image_size" => "பட அளவுகள்",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "โหมดแป้นพิมพ์", "keyboard_type" => "โหมดแป้นพิมพ์",
"font_family" => "แบบอักษร", "font_family" => "แบบอักษร",
"code_mode" => "เน้นไวยากรณ์", "code_mode" => "เน้นไวยากรณ์",
"path_can_not_action" => "ไดเรกทอรีไม่สนับสนุนการดำเนินการนี้!", "path_can_not_action" => "สนับสนุนเฉพาะแบ่งปันเอกสารของคุณเอง!",
"wap_page_pc" => "เวอร์ชันพีซี", "wap_page_pc" => "เวอร์ชันพีซี",
"wap_page_phone" => "โทรศัพท์มือถือ", "wap_page_phone" => "โทรศัพท์มือถือ",
"image_size" => "ขนาดภาพ", "image_size" => "ขนาดภาพ",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "klavye Modu", "keyboard_type" => "klavye Modu",
"font_family" => "Yazı tipleri", "font_family" => "Yazı tipleri",
"code_mode" => "dizim", "code_mode" => "dizim",
"path_can_not_action" => "Dizin bu işlemi desteklemiyor!", "path_can_not_action" => "Sadece kendi belgeleri paylaşmak Destekler!",
"wap_page_pc" => "PC Sürümü", "wap_page_pc" => "PC Sürümü",
"wap_page_phone" => "hareketli", "wap_page_phone" => "hareketli",
"image_size" => "Resim boyutları", "image_size" => "Resim boyutları",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "режим клавіатури", "keyboard_type" => "режим клавіатури",
"font_family" => "шрифти", "font_family" => "шрифти",
"code_mode" => "підсвічування синтаксису", "code_mode" => "підсвічування синтаксису",
"path_can_not_action" => "Каталог не підтримує цю операцію!", "path_can_not_action" => "Підтримка тільки поділитися своїми власними документами!",
"wap_page_pc" => "PC Версія", "wap_page_pc" => "PC Версія",
"wap_page_phone" => "мобільний", "wap_page_phone" => "мобільний",
"image_size" => "розміри зображення", "image_size" => "розміри зображення",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "klaviatura Mode", "keyboard_type" => "klaviatura Mode",
"font_family" => "Fonts", "font_family" => "Fonts",
"code_mode" => "sintaksisi rang", "code_mode" => "sintaksisi rang",
"path_can_not_action" => "katalog, bu operatsiyani qo'llab-quvvatlamaydi!", "path_can_not_action" => "faqat o'z hujjatlarni almashish qo'llab-quvvatlaydi!",
"wap_page_pc" => "Kompyuter Version", "wap_page_pc" => "Kompyuter Version",
"wap_page_phone" => "ko'chma", "wap_page_phone" => "ko'chma",
"image_size" => "Image o'lchamlari", "image_size" => "Image o'lchamlari",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "Bàn phím Chế độ", "keyboard_type" => "Bàn phím Chế độ",
"font_family" => "Fonts", "font_family" => "Fonts",
"code_mode" => "cú pháp tô sáng", "code_mode" => "cú pháp tô sáng",
"path_can_not_action" => "Các thư mục không hỗ trợ hoạt động này!", "path_can_not_action" => "Chỉ hỗ trợ chia sẻ tài liệu của riêng bạn!",
"wap_page_pc" => "PC Version", "wap_page_pc" => "PC Version",
"wap_page_phone" => "di động", "wap_page_phone" => "di động",
"image_size" => "Kích thước hình ảnh", "image_size" => "Kích thước hình ảnh",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "键盘模式", "keyboard_type" => "键盘模式",
"font_family" => "字体", "font_family" => "字体",
"code_mode" => "高亮语法", "code_mode" => "高亮语法",
"path_can_not_action" => "该目录不支持此操作!", "path_can_not_action" => "仅支持分享您自己的文档!",
"wap_page_pc" => "电脑版", "wap_page_pc" => "电脑版",
"wap_page_phone" => "手机版", "wap_page_phone" => "手机版",
"image_size" => "图片尺寸", "image_size" => "图片尺寸",

View File

@ -44,7 +44,7 @@ return array(
"keyboard_type" => "鍵盤模式", "keyboard_type" => "鍵盤模式",
"font_family" => "字體", "font_family" => "字體",
"code_mode" => "高亮語法", "code_mode" => "高亮語法",
"path_can_not_action" => "該目錄不支持此操作!", "path_can_not_action" => "僅支持分享您自己的文檔!",
"wap_page_pc" => "電腦版", "wap_page_pc" => "電腦版",
"wap_page_phone" => "手機版", "wap_page_phone" => "手機版",
"image_size" => "圖片尺寸", "image_size" => "圖片尺寸",

View File

@ -10,7 +10,7 @@
$config['settings'] = array( $config['settings'] = array(
'download_url_time' => 0, //下载地址生效时间按秒计算0代表不限制默认不限制 'download_url_time' => 0, //下载地址生效时间按秒计算0代表不限制默认不限制
'api_login_tonken' => '', //设定则认为开启服务端api通信登陆同时作为加密密匙 'api_login_tonken' => '', //设定则认为开启服务端api通信登陆同时作为加密密匙
'updload_chunk_size'=> 1024*1024, //1M;分片上传大小设定不设定则用post_max_size;有时会受nginx的post_size限制 'updload_chunk_size'=> 1024*1024*0.8,//0.8M;分片上传大小设定
'param_rewrite' => false, 'param_rewrite' => false,
); );

View File

@ -1,2 +1,2 @@
<?php <?php
define('KOD_VERSION','3.39'); define('KOD_VERSION','3.41');

View File

@ -1018,6 +1018,7 @@ class explorer extends Controller{
if (isset($_SESSION[$uuid])){ if (isset($_SESSION[$uuid])){
$info = $_SESSION[$uuid]; $info = $_SESSION[$uuid];
$result = array( $result = array(
'support_range' => $info['support_range'],
'uuid' => $this->in['uuid'], 'uuid' => $this->in['uuid'],
'length' => (int)$info['length'], 'length' => (int)$info['length'],
'name' => $info['name'], 'name' => $info['name'],
@ -1026,12 +1027,14 @@ class explorer extends Controller{
); );
show_json($result); show_json($result);
}else{ }else{
show_json('',false); show_json('uuid_not_set',false);
} }
}else if($this->in['type'] == 'remove'){//取消下载;文件被删掉则自动停止 }else if($this->in['type'] == 'remove'){//取消下载;文件被删掉则自动停止
del_file($_SESSION[$uuid]['path']); $the_file = str_replace('.downloading','',$_SESSION[$uuid]['path']);
del_file($the_file.'.downloading');
del_file($the_file.'.download.cfg');
unset($_SESSION[$uuid]); unset($_SESSION[$uuid]);
show_json('',false); show_json('remove_success',false);
} }
//下载 //下载
$save_path = _DIR($this->in['save_path']); $save_path = _DIR($this->in['save_path']);
@ -1045,30 +1048,29 @@ class explorer extends Controller{
} }
$save_path = $save_path.$header['name']; $save_path = $save_path.$header['name'];
if (!checkExt($save_path)){//不允许的扩展名 if (!checkExt($save_path)){//不允许的扩展名
$save_path = _DIR($this->in['save_path']).date('-h:i:s').'.txt'; $save_path = _DIR($this->in['save_path']).date('-h:i:s').'.dat';
} }
space_size_use_check(); space_size_use_check();
$save_path = get_filename_auto(iconv_system($save_path),'',$this->config['user']['file_repeat']); $save_path = get_filename_auto(iconv_system($save_path),'',$this->config['user']['file_repeat']);
$save_path_temp = $save_path.'.downloading'; $save_path_temp = $save_path.'.downloading';
session_start(); session_start();
$_SESSION[$uuid] = array( $_SESSION[$uuid] = array(
'support_range' => $header['support_range'],
'length'=> $header['length'], 'length'=> $header['length'],
'path' => $save_path_temp, 'path' => $save_path_temp,
'name' => get_path_this($save_path) 'name' => get_path_this($save_path)
); );
session_write_close(); session_write_close();
if (file_download_this($url,$save_path_temp,$header['length'])){
load_class("downloader");
$result = downloader::start($url,$save_path);
session_start();unset($_SESSION[$uuid]);session_write_close(); session_start();unset($_SESSION[$uuid]);session_write_close();
if (move_path($save_path_temp,$save_path)) {//下载完后重命名 if($result['code']){
$name = get_path_this(iconv_app($save_path)); $name = get_path_this(iconv_app($save_path));
space_size_use_change($save_path);//使用的空间增加 space_size_use_change($save_path);//使用的空间增加
show_json($this->L['download_success'],true,_DIR_OUT(iconv_app($save_path)) ); show_json($this->L['download_success'],true,_DIR_OUT(iconv_app($save_path)) );
}else{ }else{
show_json($this->L['download_error_create'],false); show_json($result['data'],false);
}
}else{
session_start();unset($_SESSION[$uuid]);session_write_close();
show_json($this->L['download_error_create'],false);
} }
} }
@ -1419,6 +1421,11 @@ class explorer extends Controller{
$list['info']['id'] = $GLOBALS['path_id']; $list['info']['id'] = $GLOBALS['path_id'];
$user = system_member::get_info($GLOBALS['path_id']); $user = system_member::get_info($GLOBALS['path_id']);
$list['info']['name'] = $user['name']; $list['info']['name'] = $user['name'];
//自己的分享子目录
if($GLOBALS['path_id'] == $this->user["user_id"]){
$list['info']['role'] = "owner";
}
if($GLOBALS['is_root']){ if($GLOBALS['is_root']){
$list['info']['admin_real_path'] = USER_PATH.$user['path'].'/home/'; $list['info']['admin_real_path'] = USER_PATH.$user['path'].'/home/';
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,79 +1,138 @@
<?php <?php
/** /*
* User: djunny * @link http://www.kalcaddle.com/
* Date: 2016-04-29 * @author warlee | e-mail:kalcaddle@qq.com
* Mail: 199962760@qq.com * @copyright warlee 2014.(Shanghai)Co.,Ltd
* * @license http://kalcaddle.com/tools/licenses/license.txt
* downloader::get('http://dzs.aqtxt.com/files/11/23636/201604230358308081.rar', 'test.rar')
*/ */
class downloader { class downloader {
/** static function start($url, $save_file,$headers = array(),$timeout = 10) {
* download file to local path $data_file = $save_file . '.download.cfg';
* $save_temp = $save_file . '.downloading';
* @param $url
* @param $save_file //if not support range
* @param int $speed $file_header = url_header($url);
* @param array $headers $url = $file_header['url'];
* @param int $timeout
* @return bool //show_json(get_headers("http://sabre.io/",true));
* @throws Exception if(!$file_header['support_range'] ||
*/ $file_header['length']<=0){
static function get($url, $save_file, $speed = 10240, $headers = array(), $timeout = 20) { unlink($save_temp);
$url_info = self::parse_url($url); unlink($save_file);
if (!$url_info['host']) { return self::file_download_this($url,$save_file,$file_header['length']);
throw new Exception('Url is Invalid');
} }
// default header // default header
$url_info = self::parse_url($url);
if (!$url_info) {
return array('code'=>false,'data'=>'url_error');
}
$def_headers = array( $def_headers = array(
'Accept' => '*/*', 'Accept' => '*/*',
'User-Agent' => 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)', 'User-Agent' => 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)',
'Accept-Encoding' => 'gzip, deflate',
'Host' => $url_info['host'], 'Host' => $url_info['host'],
'Connection' => 'Close', 'Connection' => 'Close',
'Accept-Language' => 'zh-cn', 'Accept-Language' => 'zh-cn',
); );
// merge heade
$headers = array_merge($def_headers, $headers); $headers = array_merge($def_headers, $headers);
// get content length
$content_length = self::get_content_size($url_info['host'], $url_info['port'], $url_info['request'], $headers, $timeout);
// content length not exist $exists_length = is_file($save_temp) ? filesize($save_temp) : 0;
if (!$content_length) { $content_length = intval($file_header['length']);
throw new Exception('Content-Length is Not Exists'); if( file_exists($save_temp) &&
time() - filemtime($save_temp) < 3) {//has Changed in 3s,is downloading
return array('code'=>false,'data'=>'downloading');
}
$exists_data = array();
if(is_file($data_file)){
$temp_data = file_get_contents($data_file);
$exists_data = json_decode($temp_data, 1);
} }
// get exists length
$exists_length = is_file($save_file) ? filesize($save_file) : 0;
// get tmp data file
$data_file = $save_file . '.data';
// get tmp data
$exists_data = is_file($data_file) ? json_decode(file_get_contents($data_file), 1) : array();
// check file is valid // check file is valid
if ($exists_length == $content_length) { if ($exists_length == $content_length) {
$exists_data && @unlink($data_file); $exists_data && @unlink($data_file);
return true; 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);
@unlink($data_file);
return array('code'=>true,'data'=>'exist');
}
// check file is expire // check file is expire
if ($exists_data['length'] != $content_length || $exists_length > $content_length) { if ($exists_data['length'] != $content_length) {
$exists_data = array( $exists_data = array('length' => $content_length);
'length' => $content_length,
);
} }
if($exists_length > $content_length){
@unlink($save_temp);
}
// write exists data // write exists data
file_put_contents($data_file, json_encode($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);
}
return $download_status;
}
try { // fopen then download
$download_status = self::download_content($url_info['host'], $url_info['port'], $url_info['request'], $save_file, $content_length, $exists_length, $speed, $headers, $timeout); static function file_download_this($from, $file_name,$header_size=0){
if ($download_status) { @set_time_limit(0);
$file_temp = $file_name.'.downloading';
if ($fp = @fopen ($from, "rb")){
if(!$download_fp = @fopen($file_temp, "wb")){
return array('code'=>false,'data'=>'open_downloading_error');
}
while(!feof($fp)){
if(!file_exists($file_temp)){//删除目标文件;则终止下载
fclose($download_fp);
return array('code'=>false,'data'=>'stoped');
}
//对于部分fp不结束的通过文件大小判断
clearstatcache();
if( $header_size>0 &&
$header_size==get_filesize(iconv_system($file_temp))
){
break;
}
fwrite($download_fp, fread($fp, 1024 * 8 ), 1024 * 8);
}
//下载完成,重命名临时文件到目标文件
fclose($download_fp);
fclose($fp);
if(!rename($file_temp,$file_name)){
unlink($file_name);
return rename($file_temp,$file_name);
}
return array('code'=>true,'data'=>'success');
}else{
return array('code'=>false,'data'=>'url_open_error');
}
}
static function move_file($from,$to,$data_file){
$res = @rename($from,$to);
if(!$res){
@unlink($to);
@rename($from,$to);
}
@unlink($data_file); @unlink($data_file);
} }
} catch (Exception $e) {
throw new Exception($e->getMessage());
}
return true;
}
/** /**
* parse url * parse url
@ -91,16 +150,7 @@ class downloader {
return $url_info; return $url_info;
} }
/** static function download_content($host, $port, $url_path, $save_file, $content_length, $range_start,&$headers, $timeout) {
* download content by chunk
*
* @param $host
* @param $port
* @param $url_path
* @param $headers
* @param $timeout
*/
static function download_content($host, $port, $url_path, $save_file, $content_length, $range_start, $speed, &$headers, $timeout) {
$request = self::build_header('GET', $url_path, $headers, $range_start); $request = self::build_header('GET', $url_path, $headers, $range_start);
$fsocket = @fsockopen($host, $port, $errno, $errstr, $timeout); $fsocket = @fsockopen($host, $port, $errno, $errstr, $timeout);
stream_set_blocking($fsocket, TRUE); stream_set_blocking($fsocket, TRUE);
@ -108,12 +158,23 @@ class downloader {
fwrite($fsocket, $request); fwrite($fsocket, $request);
$status = stream_get_meta_data($fsocket); $status = stream_get_meta_data($fsocket);
if ($status['timed_out']) { if ($status['timed_out']) {
throw new Exception('Socket Connect Timeout'); return array('code'=>false,'data'=>'socket_connect_timeout');
} }
$is_header_end = 0; $is_header_end = 0;
$total_size = $range_start; $total_size = $range_start;
$file_fp = fopen($save_file, 'a+'); $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)) { while (!feof($fsocket)) {
if(!file_exists($save_file)){
flock($file_fp, LOCK_UN);
fclose($fsocket);
fclose($file_fp);
return array('code'=>false,'data'=>'stoped');
}
if (!$is_header_end) { if (!$is_header_end) {
$line = @fgets($fsocket); $line = @fgets($fsocket);
if (in_array($line, array("\n", "\r\n"))) { if (in_array($line, array("\n", "\r\n"))) {
@ -121,74 +182,26 @@ class downloader {
} }
continue; continue;
} }
$resp = fread($fsocket, $speed);
$resp = fread($fsocket, 10240);
$read_length = strlen($resp); $read_length = strlen($resp);
if ($resp === false || $content_length < $total_size + $read_length) { if ($resp === false || $content_length < $total_size + $read_length) {
flock($file_fp, LOCK_UN);
fclose($fsocket); fclose($fsocket);
fclose($file_fp); fclose($file_fp);
throw new Exception('Socket I/O Error Or File Was Changed'); return array('code'=>false,'data'=>'socket_error');
} }
$total_size += $read_length; $total_size += $read_length;
fputs($file_fp, $resp); fputs($file_fp, $resp);
// check file end
if ($content_length == $total_size) { if ($content_length == $total_size) {
break; break;
} }
//sleep(1);
//break;
} }
flock($file_fp, LOCK_UN);
fclose($fsocket); fclose($fsocket);
fclose($file_fp); fclose($file_fp);
return true; return array('code'=>true,'data'=>'success');
}
/**
* get content length
*
* @param $host
* @param $port
* @param $url_path
* @param $headers
* @param $timeout
* @return int
*/
static function get_content_size($host, $port, $url_path, &$headers, $timeout) {
$request = self::build_header('HEAD', $url_path, $headers);
$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);
$length = 0;
if ($status['timed_out']) {
return 0;
}
while (!feof($fsocket)) {
$line = @fgets($fsocket);
if (in_array($line, array("\n", "\r\n"))) {
break;
}
$line = strtolower($line);
// get location
if (substr($line, 0, 9) == 'location:') {
$location = trim(substr($line, 9));
$url_info = self::parse_url($location);
if (!$url_info['host']) {
return 0;
}
fclose($fsocket);
return self::get_content_size($url_info['host'], $url_info['port'], $url_info['request'], $headers, $timeout);
}
// get content length
if (strpos($line, 'content-length:') !== false) {
list(, $length) = explode('content-length:', $line);
$length = (int)trim($length);
}
}
fclose($fsocket);
return $length;
} }
/** /**
@ -210,7 +223,6 @@ class downloader {
$out .= "Range: bytes={$range_start}-\r\n"; $out .= "Range: bytes={$range_start}-\r\n";
} }
$out .= "\r\n"; $out .= "\r\n";
return $out; return $out;
} }
} }

View File

@ -941,19 +941,20 @@ function file_put_out($file,$download=false){
*/ */
function file_download_this($from, $file_name,$header_size=0){ function file_download_this($from, $file_name,$header_size=0){
@set_time_limit(0); @set_time_limit(0);
$file_temp = $file_name.'.downloading';
if ($fp = @fopen ($from, "rb")){ if ($fp = @fopen ($from, "rb")){
if(!$download_fp = @fopen($file_name, "wb")){ if(!$download_fp = @fopen($file_temp, "wb")){
return false; return false;
} }
while(!feof($fp)){ while(!feof($fp)){
if(!file_exists($file_name)){//删除目标文件;则终止下载 if(!file_exists($file_temp)){//删除目标文件;则终止下载
fclose($download_fp); fclose($download_fp);
return false; return false;
} }
//对于部分fp不结束的通过文件大小判断 //对于部分fp不结束的通过文件大小判断
clearstatcache(); clearstatcache();
if( $header_size>0 && if( $header_size>0 &&
$header_size==get_filesize(iconv_system($file_name)) $header_size==get_filesize(iconv_system($file_temp))
){ ){
break; break;
} }
@ -962,6 +963,10 @@ function file_download_this($from, $file_name,$header_size=0){
//下载完成,重命名临时文件到目标文件 //下载完成,重命名临时文件到目标文件
fclose($download_fp); fclose($download_fp);
fclose($fp); fclose($fp);
if(!rename($file_temp,$file_name)){
unlink($file_name);
return rename($file_temp,$file_name);
}
return true; return true;
}else{ }else{
return false; return false;

View File

@ -91,6 +91,17 @@ function url_header($url){
$length = $header['Content-Length']; $length = $header['Content-Length'];
} }
} }
//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];
}
}
if(isset($header['Content-Disposition'])){ if(isset($header['Content-Disposition'])){
if(is_array($header['Content-Disposition'])){ if(is_array($header['Content-Disposition'])){
$dis = array_pop($header['Content-Disposition']); $dis = array_pop($header['Content-Disposition']);
@ -111,13 +122,19 @@ function url_header($url){
$name = $header['X-OutFileName']; $name = $header['X-OutFileName'];
} }
if(!$name){ if(!$name){
$name = get_path_this($url); $name = get_path_this($file_url);
if (stripos($name,'?')) $name = substr($name,0,stripos($name,'?')); if (stripos($name,'?')) $name = substr($name,0,stripos($name,'?'));
if (!$name) $name = 'index.html'; if (!$name) $name = 'index.html';
} }
$name = rawurldecode($name); $name = rawurldecode($name);
$name = str_replace(array('/','\\'),'-',$name);//safe; $name = str_replace(array('/','\\'),'-',$name);//safe;
return array('length'=>$length,'name'=>$name); $support_range = isset($header["Accept-Ranges"])?true:false;
return array(
'url' => $file_url,
'length' => $length,
'name' => $name,
'support_range' =>$support_range
);
} }

View File

@ -21,7 +21,7 @@ function update_check(){
update_clear(); update_clear();
} }
//from [3.30~3.35] to last //from [3.30~3.35]
$system_file = THE_DATA_PATH.'system/system_setting.php'; $system_file = THE_DATA_PATH.'system/system_setting.php';
$system_data = fileCache::load($system_file); $system_data = fileCache::load($system_file);
if( file_exists($system_file) && if( file_exists($system_file) &&
@ -59,6 +59,9 @@ function update_clear(){
del_file(THE_DATA_PATH.'2.0-3.23.zip'); del_file(THE_DATA_PATH.'2.0-3.23.zip');
del_file(THE_DATA_PATH.'2.0-3.34.zip'); del_file(THE_DATA_PATH.'2.0-3.34.zip');
del_file(THE_DATA_PATH.'2.0-3.35.zip'); del_file(THE_DATA_PATH.'2.0-3.35.zip');
del_file(THE_DATA_PATH.'2.0-3.37.zip');
del_file(THE_DATA_PATH.'2.0-3.38.zip');
del_file(THE_DATA_PATH.'2.0-3.39.zip');
del_file(THE_DATA_PATH.'2.0-'.UPDATE_VERSION.'.zip'); del_file(THE_DATA_PATH.'2.0-'.UPDATE_VERSION.'.zip');
del_file(BASIC_PATH.'readme.txt'); del_file(BASIC_PATH.'readme.txt');

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@ input,button {font-family:"Helvetica Neue","Helvetica","Microsoft Yahei","微软
width:428px;border-radius:4px;padding-bottom: 30px; width:428px;border-radius:4px;padding-bottom: 30px;
background: rgba(255,255,255,0.9);background: #fff \9; background: rgba(255,255,255,0.9);background: #fff \9;
position:absolute;top:46%;left:50%;margin-top:-209px;margin-left: -214px; position:absolute;top:46%;left:50%;margin-top:-209px;margin-left: -214px;
z-index: 999; z-index: 100;
} }
a{text-decoration:none;color: #adf;} a{text-decoration:none;color: #adf;}
.background{ .background{

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long