From 6d4db4fab3448bf84d170d64745311a3388462a5 Mon Sep 17 00:00:00 2001 From: zyx0814 Date: Sat, 26 May 2018 11:10:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=88=B0=202.01?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 58 +- UPDATE.md | 62 + admin/appmarket/check_upgrade.php | 4 +- admin/appmarket/cloudappmarket.php | 26 + admin/appmarket/cp.php | 7 +- admin/appmarket/dzz_app_appmarket.xml | 2 +- .../appmarket/function/function_appmarket.php | 53 + admin/appmarket/install_app_ajax.php | 73 +- admin/appmarket/template/cloudappmarket.htm | 4 +- admin/appmarket/template/extopen.htm | 3 +- admin/appmarket/template/index.htm | 42 +- admin/appmarket/template/upgrade.htm | 12 +- admin/appmarket/upgrade_app_ajax.php | 81 +- admin/cloud/add.php | 45 + admin/cloud/dzz_app_cloud.xml | 1284 ++ admin/cloud/edit.php | 127 + admin/cloud/images/connect.css | 44 + admin/cloud/index.php | 60 + admin/cloud/language/zh-cn/lang.php | 5 + admin/cloud/movetool.php | 66 + admin/cloud/movetool_run.php | 64 + admin/cloud/oauth.php | 33 + admin/cloud/router.php | 47 + admin/cloud/routeredit.php | 39 + admin/cloud/space.php | 59 + admin/cloud/spaceadd.php | 22 + admin/cloud/template/add.htm | 90 + admin/cloud/template/cloud.htm | 94 + admin/cloud/template/edit.htm | 262 + admin/cloud/template/header_left.htm | 8 + admin/cloud/template/left.htm | 10 + admin/cloud/template/movetool.htm | 143 + admin/cloud/template/movetool_run.htm | 179 + admin/cloud/template/oauth_ALIOSS.htm | 155 + admin/cloud/template/oauth_disk.htm | 92 + admin/cloud/template/oauth_ftp.htm | 110 + admin/cloud/template/oauth_qiniu.htm | 99 + admin/cloud/template/right_header.htm | 10 + admin/cloud/template/router.htm | 103 + admin/cloud/template/routeredit.htm | 111 + admin/cloud/template/space.htm | 97 + admin/cloud/template/spaceadd.htm | 85 + admin/filemanage/dzz_app_filemanage.xml | 2 +- admin/function/function_admin.php | 2 +- admin/language/zh-cn/lang.php | 3 +- admin/login/login.php | 2 + admin/member/dzz_app_member.xml | 1293 ++ admin/member/images/icons_24.png | Bin 0 -> 7124 bytes admin/member/images/member.css | 94 + admin/member/images/themes/default/32px.png | Bin 0 -> 3121 bytes admin/member/images/themes/default/40px.png | Bin 0 -> 1037 bytes .../images/themes/default/organization.png | Bin 0 -> 903 bytes admin/member/images/themes/default/style.css | 917 + .../images/themes/default/style.min.css | 1 + .../member/images/themes/default/throbber.gif | Bin 0 -> 1720 bytes admin/member/images/themes/default/user.png | Bin 0 -> 599 bytes admin/member/index.php | 38 + .../member/language/zh-cn/lang.php | 15 +- admin/member/profileset.php | 167 + admin/member/scripts/orguser.js | 173 + admin/member/template/left.htm | 30 + admin/member/template/profile.htm | 99 + admin/member/template/profileset.htm | 176 + admin/member/template/profileset_edit.htm | 252 + admin/member/template/verify.htm | 294 + admin/member/template/verifyset.htm | 117 + admin/member/template/verifyset_edit.htm | 187 + admin/member/verify.php | 350 + admin/member/verifyset.php | 154 + admin/orguser/ajax.php | 1 + admin/orguser/edituser.php | 98 +- admin/orguser/export.php | 2 +- admin/orguser/export_tmpl.php | 2 +- admin/orguser/images/orguser.css | 5 + admin/orguser/import.php | 26 +- admin/orguser/scripts/orguser.js | 51 +- admin/orguser/template/detail_org.htm | 35 +- admin/orguser/template/edituser.htm | 2 +- admin/orguser/template/import_guide.htm | 2 +- admin/orguser/template/tree.htm | 9 +- admin/setting/language/zh-cn/lang.php | 2 +- admin/setting/template/main.htm | 8 +- admin/share/index.php | 2 +- admin/share/template/left.htm | 4 +- admin/system/dzz_app_system.xml | 2 +- admin/system/index.php | 3 +- admin/system/systemupgrade.php | 37 +- admin/system/template/database.htm | 12 +- admin/system/template/left.htm | 2 +- admin/system/template/updatecache.htm | 8 +- admin/system/template/upgrade.htm | 4 +- admin/systemlog/dzz_app_systemlog.xml | 2 +- config/config_default.php | 8 +- core/api/oss_sdk/conf.inc.php | 2 +- core/api/qiniu/conf.php | 14 +- core/api/wopi/wopi.php | 19 +- core/class/class_image.php | 42 +- core/class/class_template.php | 46 +- core/class/dzz/Tpdb.php | 6 +- core/class/dzz/Tpsqli.php | 4 +- core/class/dzz/config.php | 23 +- core/class/dzz/dzz_app.php | 3 + core/class/dzz/dzz_ftp.php | 2 +- core/class/dzz/dzz_io.php | 63 +- core/class/dzz/dzz_notification.php | 4 +- core/class/dzz/dzz_sftp.php | 415 + core/class/dzz/dzz_upgrade.php | 15 +- core/class/dzz/dzz_upgrade_app.php | 34 + core/class/dzz/route.php | 2 +- core/class/helper/helper_browser.php | 363 +- core/class/helper/helper_config.php | 77 + core/class/helper/helper_page.php | 6 +- core/class/io/io_ALIOSS.php | 20 +- core/class/io/io_OneDrive.php | 16 +- core/class/io/io_baiduPCS.php | 15 +- core/class/io/io_disk.php | 44 +- core/class/io/io_dzz.php | 779 +- core/class/io/io_ftp.php | 1871 +- core/class/io/io_qiniu.php | 12 +- core/class/io/io_remote.php | 1 - core/class/perm/perm_FileSPerm.php | 4 +- core/class/perm/perm_check.php | 2 +- core/class/table/table_connect_disk.php | 2 +- core/class/table/table_connect_ftp.php | 2 +- core/class/table/table_connect_onedrive.php | 2 +- core/class/table/table_connect_pan.php | 2 +- core/class/table/table_connect_storage.php | 2 +- core/class/table/table_feed_at.php | 47 - core/class/table/table_feed_attach.php | 132 - core/class/table/table_feed_collection.php | 45 - core/class/table/table_feed_post.php | 47 - core/class/table/table_feed_reply.php | 45 - core/class/table/table_feed_thread.php | 64 - core/class/table/table_folder.php | 534 +- core/class/table/table_local_storage.php | 7 +- core/class/table/table_market.php | 43 - core/class/table/table_market_field.php | 70 - core/class/table/table_organization.php | 80 +- core/class/table/table_organization_job.php | 18 + core/class/table/table_organization_user.php | 85 +- core/class/table/table_resources.php | 1157 +- core/class/table/table_resources_attr.php | 3 + .../class/table/table_resources_clipboard.php | 21 +- core/class/table/table_resources_event.php | 403 +- core/class/table/table_resources_path.php | 17 +- core/class/table/table_resources_recyle.php | 27 +- core/class/table/table_resources_version.php | 51 +- core/class/table/table_shares.php | 8 +- core/class/table/table_shorturl.php | 4 + core/class/table/table_user.php | 4 +- core/core_version.php | 4 +- core/cron/cron_check_app_version.php | 61 - .../cron_clean_copys0_attachment_by_month.php | 2 +- core/cron/cron_getAtoken_by_Rtoken_week.php | 34 + core/function/function_core.php | 263 +- core/function/function_filesock.php | 6 +- core/function/function_message.php | 2 +- core/language/zh-cn/lang.php | 19 +- core/template/default/common/about.htm | 2 +- core/template/default/common/footer.htm | 8 +- .../template/default/common/footer_simple.htm | 11 +- .../template/default/common/header_common.htm | 2 +- core/template/default/common/header_end.htm | 2 +- .../template/default/common/header_reload.htm | 3 +- .../default/common/header_simple_end.htm | 1 - .../default/common/header_simple_start.htm | 10 +- core/template/default/common/header_start.htm | 6 + core/template/default/common/mobile_about.htm | 104 + .../default/common/mobile_simple_end.htm | 5 + .../default/common/mobile_simple_start.htm | 21 + .../default/common/share_password.htm | 42 - core/template/default/common/shares_list.htm | 277 - .../default/common/shares_password.htm | 50 - core/template/default/common/showmessage.htm | 2 +- .../201712/21/103805dczcm89b0gi8i9gc.png | Bin 0 -> 71545 bytes data/avatar/camera.swf | Bin 0 -> 79736 bytes data/avatar/locale.xml | 109 + data/avatar/noavatar_big.gif | Bin 0 -> 2612 bytes data/avatar/noavatar_middle.gif | Bin 0 -> 1873 bytes data/avatar/noavatar_small.gif | Bin 0 -> 1214 bytes dzz/appmanagement/dzz_app_appmanagement.xml | 2 +- dzz/appmanagement/images/main.css | 65 + dzz/appmanagement/template/main.htm | 2 +- dzz/attach/action_upload.php | 4 +- dzz/attach/controller.php | 20 +- dzz/class/class_oss.php | 253 - dzz/comment/ajax.php | 7 +- dzz/comment/dzz_app_comment.xml | 2 +- dzz/comment/images/comment.css | 28 +- dzz/comment/saveto.php | 2 +- dzz/comment/scripts/comment.js | 9 +- dzz/comment/template/ajax.htm | 30 +- dzz/comment/template/publish_form.htm | 2 +- dzz/comment/template/reply_form.htm | 4 +- dzz/comment/template/reply_item.htm | 10 +- dzz/comment/template/thread_item.htm | 22 +- dzz/config/config.php | 2 +- dzz/connect/addcloud.php | 29 + dzz/connect/ajax.php | 163 + dzz/connect/images/ALIOSS.png | Bin 0 -> 14689 bytes dzz/connect/images/JSS.png | Bin 0 -> 11180 bytes dzz/connect/images/baiduPCS.png | Bin 0 -> 12698 bytes dzz/connect/images/checkbox.png | Bin 0 -> 223 bytes dzz/connect/images/connect.css | 44 + dzz/connect/images/dropbox.png | Bin 0 -> 10060 bytes dzz/connect/images/ftp.png | Bin 0 -> 8745 bytes dzz/connect/images/home.png | Bin 0 -> 9776 bytes dzz/connect/images/icons48.png | Bin 0 -> 237707 bytes dzz/connect/images/selected_folder.png | Bin 0 -> 482 bytes dzz/connect/images/webdav.png | Bin 0 -> 11365 bytes dzz/connect/index.php | 184 + dzz/connect/language/zh-cn/lang.php | 63 + .../connect/oauth.php | 18 +- dzz/connect/scripts/mycloud.js | 159 + dzz/connect/template/addcloud.htm | 77 + dzz/connect/template/connect_index.htm | 68 + dzz/connect/template/oauth.htm | 16 + dzz/connect/template/oauth_ALIOSS.htm | 159 + dzz/connect/template/oauth_JSS.htm | 103 + dzz/connect/template/oauth_disk.htm | 82 + dzz/connect/template/oauth_ftp.htm | 103 + dzz/connect/template/oauth_qiniu.htm | 105 + dzz/dzzvote/dzz_app_dzzvote.xml | 2 +- dzz/index/images/gitee.png | Bin 0 -> 1315 bytes dzz/index/images/github.png | Bin 0 -> 1560 bytes dzz/index/images/qqwpa.png | Bin 0 -> 1448 bytes dzz/index/index.php | 8 +- dzz/index/language/zh-cn/lang.php | 17 + dzz/index/template/main.htm | 112 + dzz/io/download.php | 4 +- dzz/io/thumbnail.php | 6 +- dzz/language/zh-cn/lang.php | 24 +- dzz/shares/ajax.php | 69 +- dzz/shares/images/folder.css | 6 +- dzz/shares/images/mobile/password.css | 127 + dzz/shares/index.php | 277 +- dzz/shares/language/zh-cn/lang.php | 6 + dzz/shares/save.php | 18 +- dzz/shares/scripts/mobile/appevent.js | 214 + dzz/shares/scripts/mobile/share.js | 170 + dzz/shares/template/header_right.htm | 4 +- dzz/shares/template/header_search.htm | 19 + dzz/shares/template/list.htm | 1140 +- dzz/shares/template/mobile/list.htm | 120 + dzz/shares/template/mobile/list_item.htm | 45 + dzz/shares/template/mobile/share_password.htm | 39 + dzz/shares/template/password.htm | 86 + dzz/shares/template/share_password.htm | 18 + dzz/system/at.php | 18 +- dzz/system/css/file_detailed.css | 2010 ++ .../css/filelist_detaillist/images/index.htm | 0 .../filelist_detaillist/images/sort_asc.gif | Bin 0 -> 830 bytes .../filelist_detaillist/images/sort_desc.gif | Bin 0 -> 833 bytes .../filelist_detaillist/images/treeshow.png | Bin 0 -> 1247 bytes dzz/system/css/filelist_detaillist/index.htm | 0 dzz/system/css/filelist_detaillist/style.css | 267 + dzz/system/css/filelist_detaillist/thumb.jpg | Bin 0 -> 2593 bytes .../filelist_middleicon/images/checkbox.png | Bin 0 -> 223 bytes .../css/filelist_middleicon/images/index.htm | 0 .../images/link_small_bg.png | Bin 0 -> 2758 bytes .../css/filelist_middleicon/images/ops.png | Bin 0 -> 46276 bytes .../css/filelist_middleicon/images/play.png | Bin 0 -> 752 bytes .../css/filelist_middleicon/images/saveto.png | Bin 0 -> 656 bytes .../filelist_middleicon/images/selected.png | Bin 0 -> 479 bytes .../images/selected_folder.png | Bin 0 -> 482 bytes .../css/filelist_middleicon/images/share.png | Bin 0 -> 524 bytes .../css/filelist_middleicon/images/share1.png | Bin 0 -> 806 bytes .../css/filelist_middleicon/images/share2.png | Bin 0 -> 853 bytes .../css/filelist_middleicon/images/share3.png | Bin 0 -> 524 bytes .../filelist_middleicon/images/shortcut.png | Bin 0 -> 10895 bytes .../css/filelist_middleicon/images/tips_1.png | Bin 0 -> 1053 bytes .../css/filelist_middleicon/images/tips_2.png | Bin 0 -> 1109 bytes .../css/filelist_middleicon/images/tips_3.png | Bin 0 -> 1118 bytes .../css/filelist_middleicon/images/tips_4.png | Bin 0 -> 1109 bytes .../filelist_middleicon/images/tishibg.png | Bin 0 -> 7373 bytes .../filelist_middleicon/images/user100.png | Bin 0 -> 8223 bytes .../css/filelist_middleicon/images/user50.png | Bin 0 -> 3307 bytes .../filelist_middleicon/images/video100.png | Bin 0 -> 5340 bytes .../filelist_middleicon/images/video50.png | Bin 0 -> 2494 bytes dzz/system/css/filelist_middleicon/index.htm | 0 dzz/system/css/filelist_middleicon/style.css | 494 + dzz/system/css/mobile/mobile_member.css | 405 + dzz/system/css/rightmenu.css | 39 + dzz/system/css/rightmenu/images/icons.gif | Bin 0 -> 10344 bytes dzz/system/css/rightmenu/images/icons.png | Bin 0 -> 31363 bytes dzz/system/css/rightmenu/images/index.htm | 0 dzz/system/css/rightmenu/images/menu.gif | Bin 0 -> 834 bytes .../css/rightmenu/images/menu_downarrow.png | Bin 0 -> 173 bytes .../css/rightmenu/images/menu_rightarrow.png | Bin 0 -> 3617 bytes dzz/system/css/rightmenu/images/menu_sep.png | Bin 0 -> 92 bytes .../rightmenu/images/menu_split_downarrow.png | Bin 0 -> 185 bytes dzz/system/css/rightmenu/index.htm | 0 dzz/system/css/rightmenu/style.css | 343 + dzz/system/css/select-file.css | 592 + dzz/system/filelist.php | 290 + dzz/system/fileselection.php | 57 + dzz/system/fileselection/ajax.php | 267 + dzz/system/fileselection/dzzcp.php | 249 + dzz/system/fileselection/explorerfile.php | 166 + dzz/system/fileselection/file.php | 45 + dzz/system/fileselection/json.php | 136 + dzz/system/fileselection/listcontent.php | 8 + dzz/system/fileselection/listtree.php | 242 + dzz/system/fileselection/save.php | 19 + dzz/system/filewindow.php | 33 + .../function/function_filerouterule.php | 53 + dzz/system/images/checkbox-box.png | Bin 0 -> 1163 bytes dzz/system/images/checkbox-check.png | Bin 0 -> 1044 bytes dzz/system/language/zh-cn/lang.php | 13 +- dzz/system/mobile_selectuser.php | 114 + dzz/system/mobilefileselection.php | 55 + dzz/system/mobilefileselection/ajax.php | 30 + dzz/system/mobilefileselection/file.php | 183 + dzz/system/mobilefileselection/group.php | 64 + dzz/system/mobilefileselection/home.php | 29 + dzz/system/mobilefileselection/json.php | 137 + dzz/system/mobilefileselection/listtree.php | 9 + dzz/system/mobilefileselection/save.php | 7 + dzz/system/mobilefileselection/search.php | 12 + dzz/system/mobilefileselection/searchfile.php | 171 + dzz/system/notification.php | 4 +- dzz/system/scripts/_hotkey.js | 120 + dzz/system/scripts/_perm.js | 214 + dzz/system/scripts/_select.js | 428 + dzz/system/scripts/contextmenu.js | 453 + dzz/system/scripts/explorer.js | 538 + dzz/system/scripts/filemanage.js | 1266 ++ dzz/system/scripts/mobile/appevent.js | 214 + dzz/system/scripts/mobile/explorer.js | 3 + dzz/system/scripts/mobile/file_keep.js | 305 + dzz/system/scripts/select-file.js | 1665 ++ dzz/system/scripts/selorguser.js | 2 +- dzz/system/scripts/uplodfile.js | 213 + dzz/system/selectfile.php | 31 + dzz/system/selorguser.php | 18 +- dzz/system/template/app_ajax.htm | 4 +- dzz/system/template/filelist.htm | 345 + dzz/system/template/fileselection/ajax.htm | 263 + dzz/system/template/fileselection/content.htm | 27 + dzz/system/template/fileselection/index.htm | 144 + .../template/fileselection/listcontent.htm | 345 + .../fileselection/right_contextmenu.htm | 194 + .../template_file_detaillist.htm | 76 + .../template_file_detaillist_cat.htm | 80 + .../template_file_middleicon.htm | 42 + dzz/system/template/mobile_commer_header.htm | 10 + dzz/system/template/mobile_selectuser.htm | 247 + .../mobilefileselection/commer_header.htm | 16 + .../template/mobilefileselection/filelist.htm | 92 + .../mobilefileselection/flie_select.htm | 373 + .../mobilefileselection/footer_menu.htm | 78 + .../template/mobilefileselection/group.htm | 45 + .../template/mobilefileselection/index.htm | 162 + .../mobilefileselection/index_content.htm | 53 + .../template/mobilefileselection/search.htm | 148 + .../mobilefileselection/searchfile.htm | 37 + dzz/system/template/notification.htm | 2 +- dzz/system/template/orgtree.htm | 13 +- dzz/system/template/selectfile.htm | 23 + dzz/system/template/selorguser.htm | 1 + .../ueditor/dialogs/emotion/emotion.html | 12 +- .../third-party/dzzattach/dzzattach.css | 57 +- .../third-party/dzzattach/dzzattach.js | 37 +- htaccess_default.txt | 12 + install/data/install.sql | 4 +- install/data/install_data.sql | 8 +- install/include/install_var.php | 10 +- install/index.php | 1 + install/update.php | 775 + misc/movetospace.php | 7 +- misc/sendwx.php | 7 +- misc/setunrun.php | 1 - oauth.php | 1 - share.php | 63 +- short.php | 2 +- static/bootstrap/css/bootstrap.min.css | 18 +- static/css/app_manage.css | 34 +- static/css/common.css | 9 +- static/css/mabile_common.css | 104 + static/dzzicon/fonts/dzz.eot | Bin 25656 -> 29164 bytes static/dzzicon/fonts/dzz.svg | 371 +- static/dzzicon/fonts/dzz.ttf | Bin 25508 -> 29000 bytes static/dzzicon/fonts/dzz.woff | Bin 25584 -> 29076 bytes static/dzzicon/icon.css | 261 +- static/dzzthumb/jquery.dzzthumb.css | 2 +- static/image/common/rank1.png | Bin 0 -> 1245 bytes static/image/common/rank2.png | Bin 0 -> 1266 bytes static/image/common/rank3.png | Bin 0 -> 1271 bytes static/jquery/jquery-ui.js | 16617 ++++++++++++++++ static/jquery_weui/.project | 17 + static/jquery_weui/css/jquery-weui.min.css | 6 + static/jquery_weui/css/weui.min.css | 5 + static/jquery_weui/js/clipboard.min.js | 7 + static/jquery_weui/js/iscroll.js | 2122 ++ static/jquery_weui/js/jquery-weui.min.js | 13 + static/jquery_weui/js/navbarscroll.js | 89 + static/jquery_weui/js/swiper.min.js | 17 + static/js/ZeroClipboard/ZeroClipboard.js | 1031 + static/js/ZeroClipboard/ZeroClipboard.min.js | 9 + static/js/ZeroClipboard/ZeroClipboard.swf | Bin 0 -> 2157 bytes static/js/common.js | 13 +- static/js/header.js | 7 +- static/js/input_field.js | 6 +- static/js/jquery.leftDrager.js | 11 +- static/js/jstree.min.js | 13 +- static/js/uploadPreview.js | 97 + static/popbox/jquery.popbox.js | 3 +- static/popbox/popbox.css | 6 + user/function/function_user.php | 8 +- user/login/images/login_single1.css | 49 +- user/login/images/login_single2.css | 48 +- user/login/images/login_single3.css | 19 +- user/login/logging/login.php | 21 +- user/login/template/login_single1.htm | 3 + user/login/template/login_single2.htm | 3 + user/login/template/login_single3.htm | 3 + user/login/template/login_single4.htm | 75 + user/profile/template/editpass.htm | 2 +- user/scripts/register.js | 2 +- user/space/about.php | 7 +- user/space/template/navmenu.htm | 9 +- 421 files changed, 52285 insertions(+), 5603 deletions(-) create mode 100644 UPDATE.md create mode 100644 admin/appmarket/function/function_appmarket.php create mode 100644 admin/cloud/add.php create mode 100644 admin/cloud/dzz_app_cloud.xml create mode 100644 admin/cloud/edit.php create mode 100644 admin/cloud/images/connect.css create mode 100644 admin/cloud/index.php create mode 100644 admin/cloud/language/zh-cn/lang.php create mode 100644 admin/cloud/movetool.php create mode 100644 admin/cloud/movetool_run.php create mode 100644 admin/cloud/oauth.php create mode 100644 admin/cloud/router.php create mode 100644 admin/cloud/routeredit.php create mode 100644 admin/cloud/space.php create mode 100644 admin/cloud/spaceadd.php create mode 100644 admin/cloud/template/add.htm create mode 100644 admin/cloud/template/cloud.htm create mode 100644 admin/cloud/template/edit.htm create mode 100644 admin/cloud/template/header_left.htm create mode 100644 admin/cloud/template/left.htm create mode 100644 admin/cloud/template/movetool.htm create mode 100644 admin/cloud/template/movetool_run.htm create mode 100644 admin/cloud/template/oauth_ALIOSS.htm create mode 100644 admin/cloud/template/oauth_disk.htm create mode 100644 admin/cloud/template/oauth_ftp.htm create mode 100644 admin/cloud/template/oauth_qiniu.htm create mode 100644 admin/cloud/template/right_header.htm create mode 100644 admin/cloud/template/router.htm create mode 100644 admin/cloud/template/routeredit.htm create mode 100644 admin/cloud/template/space.htm create mode 100644 admin/cloud/template/spaceadd.htm create mode 100644 admin/member/dzz_app_member.xml create mode 100644 admin/member/images/icons_24.png create mode 100644 admin/member/images/member.css create mode 100644 admin/member/images/themes/default/32px.png create mode 100644 admin/member/images/themes/default/40px.png create mode 100644 admin/member/images/themes/default/organization.png create mode 100644 admin/member/images/themes/default/style.css create mode 100644 admin/member/images/themes/default/style.min.css create mode 100644 admin/member/images/themes/default/throbber.gif create mode 100644 admin/member/images/themes/default/user.png create mode 100644 admin/member/index.php rename core/class/table/table_market_class.php => admin/member/language/zh-cn/lang.php (62%) create mode 100644 admin/member/profileset.php create mode 100644 admin/member/scripts/orguser.js create mode 100644 admin/member/template/left.htm create mode 100644 admin/member/template/profile.htm create mode 100644 admin/member/template/profileset.htm create mode 100644 admin/member/template/profileset_edit.htm create mode 100644 admin/member/template/verify.htm create mode 100644 admin/member/template/verifyset.htm create mode 100644 admin/member/template/verifyset_edit.htm create mode 100644 admin/member/verify.php create mode 100644 admin/member/verifyset.php create mode 100644 core/class/dzz/dzz_sftp.php create mode 100644 core/class/helper/helper_config.php delete mode 100644 core/class/table/table_feed_at.php delete mode 100644 core/class/table/table_feed_attach.php delete mode 100644 core/class/table/table_feed_collection.php delete mode 100644 core/class/table/table_feed_post.php delete mode 100644 core/class/table/table_feed_reply.php delete mode 100644 core/class/table/table_feed_thread.php delete mode 100644 core/class/table/table_market.php delete mode 100644 core/class/table/table_market_field.php delete mode 100644 core/cron/cron_check_app_version.php create mode 100644 core/cron/cron_getAtoken_by_Rtoken_week.php create mode 100644 core/template/default/common/mobile_about.htm create mode 100644 core/template/default/common/mobile_simple_end.htm create mode 100644 core/template/default/common/mobile_simple_start.htm delete mode 100644 core/template/default/common/share_password.htm delete mode 100644 core/template/default/common/shares_list.htm delete mode 100644 core/template/default/common/shares_password.htm create mode 100644 data/attachment/appico/201712/21/103805dczcm89b0gi8i9gc.png create mode 100644 data/avatar/camera.swf create mode 100644 data/avatar/locale.xml create mode 100644 data/avatar/noavatar_big.gif create mode 100644 data/avatar/noavatar_middle.gif create mode 100644 data/avatar/noavatar_small.gif delete mode 100644 dzz/class/class_oss.php create mode 100644 dzz/connect/addcloud.php create mode 100644 dzz/connect/ajax.php create mode 100644 dzz/connect/images/ALIOSS.png create mode 100644 dzz/connect/images/JSS.png create mode 100644 dzz/connect/images/baiduPCS.png create mode 100644 dzz/connect/images/checkbox.png create mode 100644 dzz/connect/images/connect.css create mode 100644 dzz/connect/images/dropbox.png create mode 100644 dzz/connect/images/ftp.png create mode 100644 dzz/connect/images/home.png create mode 100644 dzz/connect/images/icons48.png create mode 100644 dzz/connect/images/selected_folder.png create mode 100644 dzz/connect/images/webdav.png create mode 100644 dzz/connect/index.php create mode 100644 dzz/connect/language/zh-cn/lang.php rename core/class/table/table_market_developer.php => dzz/connect/oauth.php (50%) create mode 100644 dzz/connect/scripts/mycloud.js create mode 100644 dzz/connect/template/addcloud.htm create mode 100644 dzz/connect/template/connect_index.htm create mode 100644 dzz/connect/template/oauth.htm create mode 100644 dzz/connect/template/oauth_ALIOSS.htm create mode 100644 dzz/connect/template/oauth_JSS.htm create mode 100644 dzz/connect/template/oauth_disk.htm create mode 100644 dzz/connect/template/oauth_ftp.htm create mode 100644 dzz/connect/template/oauth_qiniu.htm create mode 100644 dzz/index/images/gitee.png create mode 100644 dzz/index/images/github.png create mode 100644 dzz/index/images/qqwpa.png create mode 100644 dzz/index/language/zh-cn/lang.php create mode 100644 dzz/index/template/main.htm create mode 100644 dzz/shares/images/mobile/password.css create mode 100644 dzz/shares/scripts/mobile/appevent.js create mode 100644 dzz/shares/scripts/mobile/share.js create mode 100644 dzz/shares/template/header_search.htm create mode 100644 dzz/shares/template/mobile/list.htm create mode 100644 dzz/shares/template/mobile/list_item.htm create mode 100644 dzz/shares/template/mobile/share_password.htm create mode 100644 dzz/shares/template/password.htm create mode 100644 dzz/shares/template/share_password.htm create mode 100644 dzz/system/css/file_detailed.css create mode 100644 dzz/system/css/filelist_detaillist/images/index.htm create mode 100644 dzz/system/css/filelist_detaillist/images/sort_asc.gif create mode 100644 dzz/system/css/filelist_detaillist/images/sort_desc.gif create mode 100644 dzz/system/css/filelist_detaillist/images/treeshow.png create mode 100644 dzz/system/css/filelist_detaillist/index.htm create mode 100644 dzz/system/css/filelist_detaillist/style.css create mode 100644 dzz/system/css/filelist_detaillist/thumb.jpg create mode 100644 dzz/system/css/filelist_middleicon/images/checkbox.png create mode 100644 dzz/system/css/filelist_middleicon/images/index.htm create mode 100644 dzz/system/css/filelist_middleicon/images/link_small_bg.png create mode 100644 dzz/system/css/filelist_middleicon/images/ops.png create mode 100644 dzz/system/css/filelist_middleicon/images/play.png create mode 100644 dzz/system/css/filelist_middleicon/images/saveto.png create mode 100644 dzz/system/css/filelist_middleicon/images/selected.png create mode 100644 dzz/system/css/filelist_middleicon/images/selected_folder.png create mode 100644 dzz/system/css/filelist_middleicon/images/share.png create mode 100644 dzz/system/css/filelist_middleicon/images/share1.png create mode 100644 dzz/system/css/filelist_middleicon/images/share2.png create mode 100644 dzz/system/css/filelist_middleicon/images/share3.png create mode 100644 dzz/system/css/filelist_middleicon/images/shortcut.png create mode 100644 dzz/system/css/filelist_middleicon/images/tips_1.png create mode 100644 dzz/system/css/filelist_middleicon/images/tips_2.png create mode 100644 dzz/system/css/filelist_middleicon/images/tips_3.png create mode 100644 dzz/system/css/filelist_middleicon/images/tips_4.png create mode 100644 dzz/system/css/filelist_middleicon/images/tishibg.png create mode 100644 dzz/system/css/filelist_middleicon/images/user100.png create mode 100644 dzz/system/css/filelist_middleicon/images/user50.png create mode 100644 dzz/system/css/filelist_middleicon/images/video100.png create mode 100644 dzz/system/css/filelist_middleicon/images/video50.png create mode 100644 dzz/system/css/filelist_middleicon/index.htm create mode 100644 dzz/system/css/filelist_middleicon/style.css create mode 100644 dzz/system/css/mobile/mobile_member.css create mode 100644 dzz/system/css/rightmenu.css create mode 100644 dzz/system/css/rightmenu/images/icons.gif create mode 100644 dzz/system/css/rightmenu/images/icons.png create mode 100644 dzz/system/css/rightmenu/images/index.htm create mode 100644 dzz/system/css/rightmenu/images/menu.gif create mode 100644 dzz/system/css/rightmenu/images/menu_downarrow.png create mode 100644 dzz/system/css/rightmenu/images/menu_rightarrow.png create mode 100644 dzz/system/css/rightmenu/images/menu_sep.png create mode 100644 dzz/system/css/rightmenu/images/menu_split_downarrow.png create mode 100644 dzz/system/css/rightmenu/index.htm create mode 100644 dzz/system/css/rightmenu/style.css create mode 100644 dzz/system/css/select-file.css create mode 100644 dzz/system/filelist.php create mode 100644 dzz/system/fileselection.php create mode 100644 dzz/system/fileselection/ajax.php create mode 100644 dzz/system/fileselection/dzzcp.php create mode 100644 dzz/system/fileselection/explorerfile.php create mode 100644 dzz/system/fileselection/file.php create mode 100644 dzz/system/fileselection/json.php create mode 100644 dzz/system/fileselection/listcontent.php create mode 100644 dzz/system/fileselection/listtree.php create mode 100644 dzz/system/fileselection/save.php create mode 100644 dzz/system/filewindow.php create mode 100644 dzz/system/function/function_filerouterule.php create mode 100644 dzz/system/images/checkbox-box.png create mode 100644 dzz/system/images/checkbox-check.png create mode 100644 dzz/system/mobile_selectuser.php create mode 100644 dzz/system/mobilefileselection.php create mode 100644 dzz/system/mobilefileselection/ajax.php create mode 100644 dzz/system/mobilefileselection/file.php create mode 100644 dzz/system/mobilefileselection/group.php create mode 100644 dzz/system/mobilefileselection/home.php create mode 100644 dzz/system/mobilefileselection/json.php create mode 100644 dzz/system/mobilefileselection/listtree.php create mode 100644 dzz/system/mobilefileselection/save.php create mode 100644 dzz/system/mobilefileselection/search.php create mode 100644 dzz/system/mobilefileselection/searchfile.php create mode 100644 dzz/system/scripts/_hotkey.js create mode 100644 dzz/system/scripts/_perm.js create mode 100644 dzz/system/scripts/_select.js create mode 100644 dzz/system/scripts/contextmenu.js create mode 100644 dzz/system/scripts/explorer.js create mode 100644 dzz/system/scripts/filemanage.js create mode 100644 dzz/system/scripts/mobile/appevent.js create mode 100644 dzz/system/scripts/mobile/explorer.js create mode 100644 dzz/system/scripts/mobile/file_keep.js create mode 100644 dzz/system/scripts/select-file.js create mode 100644 dzz/system/scripts/uplodfile.js create mode 100644 dzz/system/selectfile.php create mode 100644 dzz/system/template/filelist.htm create mode 100644 dzz/system/template/fileselection/ajax.htm create mode 100644 dzz/system/template/fileselection/content.htm create mode 100644 dzz/system/template/fileselection/index.htm create mode 100644 dzz/system/template/fileselection/listcontent.htm create mode 100644 dzz/system/template/fileselection/right_contextmenu.htm create mode 100644 dzz/system/template/fileselection/template_file_detaillist.htm create mode 100644 dzz/system/template/fileselection/template_file_detaillist_cat.htm create mode 100644 dzz/system/template/fileselection/template_file_middleicon.htm create mode 100644 dzz/system/template/mobile_commer_header.htm create mode 100644 dzz/system/template/mobile_selectuser.htm create mode 100644 dzz/system/template/mobilefileselection/commer_header.htm create mode 100644 dzz/system/template/mobilefileselection/filelist.htm create mode 100644 dzz/system/template/mobilefileselection/flie_select.htm create mode 100644 dzz/system/template/mobilefileselection/footer_menu.htm create mode 100644 dzz/system/template/mobilefileselection/group.htm create mode 100644 dzz/system/template/mobilefileselection/index.htm create mode 100644 dzz/system/template/mobilefileselection/index_content.htm create mode 100644 dzz/system/template/mobilefileselection/search.htm create mode 100644 dzz/system/template/mobilefileselection/searchfile.htm create mode 100644 dzz/system/template/selectfile.htm create mode 100644 htaccess_default.txt create mode 100644 install/update.php create mode 100644 static/css/mabile_common.css create mode 100644 static/image/common/rank1.png create mode 100644 static/image/common/rank2.png create mode 100644 static/image/common/rank3.png create mode 100644 static/jquery/jquery-ui.js create mode 100644 static/jquery_weui/.project create mode 100644 static/jquery_weui/css/jquery-weui.min.css create mode 100644 static/jquery_weui/css/weui.min.css create mode 100644 static/jquery_weui/js/clipboard.min.js create mode 100644 static/jquery_weui/js/iscroll.js create mode 100644 static/jquery_weui/js/jquery-weui.min.js create mode 100644 static/jquery_weui/js/navbarscroll.js create mode 100644 static/jquery_weui/js/swiper.min.js create mode 100644 static/js/ZeroClipboard/ZeroClipboard.js create mode 100644 static/js/ZeroClipboard/ZeroClipboard.min.js create mode 100644 static/js/ZeroClipboard/ZeroClipboard.swf create mode 100644 static/js/uploadPreview.js create mode 100644 user/login/template/login_single4.htm diff --git a/README.md b/README.md index 4610894..ae7bd94 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ ### 官方网站:http://dzzoffice.com ### 演示地址:http://demo.dzzoffice.com -### Docker部署: [点我传送](https://github.com/n3uz/dzzoffice/blob/master/docker/README.MD) ### DzzOffice 介绍: @@ -34,4 +33,59 @@ 企业根据需要可以只使用一款工具,也可以多款工具组合使用。例如团队需要一个任务管理工具,可以只安装一个任务板,登陆系统会直接进入任务板工具,没有其他工具的干扰。如果多个工具组合使用,可以设置默认登陆到哪个工具里。 -除了以上自己开发了一些工具,套件里还集成了大量的其他开源工具,如网盘里用到的在线压缩、解压,各类媒体文件预览,各类文档预览与编辑的支持,是各类开源程序的综合利用。 \ No newline at end of file +除了以上自己开发了一些工具,套件里还集成了大量的其他开源工具,如网盘里用到的在线压缩、解压,各类媒体文件预览,各类文档预览与编辑的支持,是各类开源程序的综合利用。 + +### DzzOffice2.01主要更新内容 + +1. 增加 云设置和管理 ,支持阿里云存储、七牛云存储、FTP/SFTP、本地磁盘等存储方式; + +2. 增加 用户资料管理 ,支持自定义用户资料项,资料审核、认证和审核; + +3. 修改应用市场应用在线安装方式,提高应用下载速度; + +4. 增加伪静态支持,可以通过应用“伪静态管理”灵活配置各个页面的伪静态规则; + +5. 机构和用户管理 优化添加部门管理员的体验; + +6. 导入导出用户功能优化调整; + +7. 部分页面移动端适配; + +8. 增加首次安装引导页,引导管理员首次能正确配置系统; + +9. 开放讨论板应用(可在应用市场内在线安装); + +10. 开放任务板应用(可在应用市场内在线安装); + +11. 其他功能完善、及beta版反馈问题的修复; + + +### DzzOffice在线更新方法 + +1. 进入您原来的系统,关闭您的站点。进行数据备份; + +2. 备份文件(如果有程序文件或风格文件的改动); + +3. 进入 管理 -> 系统工具 -> 在线更新,按提示完成更新任务; + +4. 系统工具 -> 更新系统缓存; + +5. 系统设置 -> 打开站点。 + +### DzzOffice离线更新方法 + +1. 进入您原来的系统,关闭您的站点。进行数据备份; + +2. 备份文件(如果有程序文件或风格文件的改动); + +3. 下载并解压缩最新版的程序包; + +4. 程序包解压缩后,并且将文件上传到网站根目录覆盖; + +5. 访问 http://您的域名/install/update.php。 + +6. 按照程序提示,直至所有升级完毕。删除install/update.php 程序,以免被恶意利用。 + +7. 进入管理员桌面,更新缓存。 + +8. 系统设置 -> 打开站点。 diff --git a/UPDATE.md b/UPDATE.md new file mode 100644 index 0000000..38412a8 --- /dev/null +++ b/UPDATE.md @@ -0,0 +1,62 @@ + + +### DzzOffice的下载及技术支持 + +1. 官方网站: http://www.dzzoffice.com +2. github地址:https://github.com/zyx0814/dzzoffice +3. 码云地址: https://gitee.com/zyx0814/dzzoffice + +### DzzOffice2.01主要更新内容 + +1. 增加 云设置和管理 ,支持阿里云存储、七牛云存储、FTP/SFTP、本地磁盘等存储方式; + +2. 增加 用户资料管理 ,支持自定义用户资料项,资料审核、认证和审核; + +3. 修改应用市场应用在线安装方式,提高应用下载速度; + +4. 增加伪静态支持,可以通过应用“伪静态管理”灵活配置各个页面的伪静态规则; + +5. 机构和用户管理 优化添加部门管理员的体验; + +6. 导入导出用户功能优化调整; + +7. 部分页面移动端适配; + +8. 增加首次安装引导页,引导管理员首次能正确配置系统; + +9. 开放讨论板应用(可在应用市场内在线安装); + +10. 开放任务板应用(可在应用市场内在线安装); + +11. 其他功能完善、及beta版反馈问题的修复; + + +### DzzOffice在线更新方法 + +1. 进入您原来的系统,关闭您的站点。进行数据备份; + +2. 备份文件(如果有程序文件或风格文件的改动); + +3. 进入 管理 -> 系统工具 -> 在线更新,按提示完成更新任务; + +4. 系统工具 -> 更新系统缓存; + +5. 系统设置 -> 打开站点。 + +### DzzOffice离线更新方法 + +1. 进入您原来的系统,关闭您的站点。进行数据备份; + +2. 备份文件(如果有程序文件或风格文件的改动); + +3. 下载并解压缩最新版的程序包; + +4. 程序包解压缩后,并且将文件上传到网站根目录覆盖; + +5. 访问 http://您的域名/install/update.php。 + +6. 按照程序提示,直至所有升级完毕。删除install/update.php 程序,以免被恶意利用。 + +7. 进入管理员桌面,更新缓存。 + +8. 系统设置 -> 打开站点。 diff --git a/admin/appmarket/check_upgrade.php b/admin/appmarket/check_upgrade.php index d084da5..1892717 100644 --- a/admin/appmarket/check_upgrade.php +++ b/admin/appmarket/check_upgrade.php @@ -34,7 +34,7 @@ if( $applist ){ if( $v["upgrade_version"] ){ $num++; }else{ - if( $v["mid"]==80 ){ + //if( $v["mid"]==80 ){ //根据当前版本查询是否需要更新 $info=array_merge($v,$appinfo); $response = $dzz_upgrade->check_upgrade_byversion( $info ); @@ -46,7 +46,7 @@ if( $applist ){ $re=C::t('app_market')->update($v['appid'],$map);//C::tp_t('app_market')->where("appid=".$v['appid'])->save( $map ); $num++; } - } + //} } }else{//本地检测 $file = DZZ_ROOT . './'.$v['app_path'].'/' . $v['identifier'] . '/dzz_app_' . $v['identifier'] . '.xml'; diff --git a/admin/appmarket/cloudappmarket.php b/admin/appmarket/cloudappmarket.php index 15a181a..b0e500c 100644 --- a/admin/appmarket/cloudappmarket.php +++ b/admin/appmarket/cloudappmarket.php @@ -10,6 +10,7 @@ if (!defined('IN_DZZ') || !defined('IN_ADMIN')) { exit('Access Denied'); } +//define('DZZ_OUTPUTED', 1); $navtitle=lang('appname'); include libfile('function/organization'); $op='cloudappmarket'; @@ -65,4 +66,29 @@ function curlcloudappmarket( $url="",$post_data="", $token="" ){ } return($response); } + +function striplinks($document) +{ + preg_match_all("'<\s*a\s.*?href\s*=\s* # find ]+)) # if quote found, match up to next matching + # quote, otherwise match up to next space + 'isx", $document, $links); + + + // catenate the non-empty matches from the conditional subpattern + + while (list($key, $val) = each($links[2])) { + if (!empty($val)) + $match[] = $val; + } + + while (list($key, $val) = each($links[3])) { + if (!empty($val)) + $match[] = $val; + } + + // return the links + return $match; +} ?> diff --git a/admin/appmarket/cp.php b/admin/appmarket/cp.php index ccc8a3a..583d328 100644 --- a/admin/appmarket/cp.php +++ b/admin/appmarket/cp.php @@ -76,7 +76,7 @@ elseif ($do == 'import') {//导入应用 if ($apparray['app']['identifier']) { if(empty($apparray['app']['app_path'])) $apparray['app']['app_path']='dzz'; if (!is_dir(DZZ_ROOT . './'.$apparray['app']['app_path'].'/' . $apparray['app']['identifier'])) { - showmessage('list_cp_Application_directory_exist',array('app_path'=>$app['app_path'],'identifier'=>$app['identifier'])); + showmessage(lang('list_cp_Application_directory_exist',array('app_path'=>$app['app_path'],'identifier'=>$app['identifier']))); } $extra = $apparray['app']['extra']; $filename = $extra['installfile']; @@ -255,7 +255,7 @@ elseif ($do == 'uninstall') {//卸载应用 if (!empty($apparray['app']['extra']['uninstallfile']) && preg_match('/^[\w\.]+$/', $apparray['app']['extra']['uninstallfile'])) { $filename = $entrydir . '/' . $apparray['app']['extra']['uninstallfile']; if (file_exists($filename)) { - $confirm_uninstall_url= MOD_URL.'&op=cp&do=uninstall_confirm&appid='.$appid.'&refer='.urlencode($refer); + $confirm_uninstall_url= outputurl( $_G['siteurl'].MOD_URL.'&op=cp&do=uninstall_confirm&appid='.$appid.'&refer='.urlencode($refer) ); @include $filename; } else { $finish = TRUE; @@ -271,6 +271,9 @@ elseif ($do == 'uninstall') {//卸载应用 if ($finish) { C::t('app_market') -> delete_by_appid($appid); cron_delete($app); + //删除安装临时文件 + $temp_install=DZZ_ROOT.'./data/update/app/'.$app['app_path'].'/'.$app['identifier']; + removedirectory($temp_install); writelog('otherlog', "卸载应用 ".$app['appname']); showmessage($msg, ADMINSCRIPT . '?mod=appmarket', array(), array('alert' => 'right')); } diff --git a/admin/appmarket/dzz_app_appmarket.xml b/admin/appmarket/dzz_app_appmarket.xml index a7fb602..c51a52b 100644 --- a/admin/appmarket/dzz_app_appmarket.xml +++ b/admin/appmarket/dzz_app_appmarket.xml @@ -1255,7 +1255,7 @@ GoAGoAFoABqABqABaAAagAagAWgAGoAG8L+seLyPK1YBDHscwLBVAD1sfaDpVtmQ+DMHEI2Ep4B2 D0LYANolfmuDYDQSHgSOAc+AZZd3fFniPCZxpxSf/vO0ngZzW/4NAGb7tdo8MPIcAAAAAElFTkSu QmCC ]]> - + diff --git a/admin/appmarket/function/function_appmarket.php b/admin/appmarket/function/function_appmarket.php new file mode 100644 index 0000000..e431245 --- /dev/null +++ b/admin/appmarket/function/function_appmarket.php @@ -0,0 +1,53 @@ + diff --git a/admin/appmarket/install_app_ajax.php b/admin/appmarket/install_app_ajax.php index e4ba70f..578fd8e 100644 --- a/admin/appmarket/install_app_ajax.php +++ b/admin/appmarket/install_app_ajax.php @@ -9,11 +9,12 @@ if (!defined('IN_DZZ') || !defined('IN_ADMIN')) { exit('Access Denied'); } -error_reporting(E_ALL); + @set_time_limit(0); include_once DZZ_ROOT . './core/core_version.php'; include_once libfile('function/admin'); -include_once libfile('function/cache'); +include_once libfile('function/cache'); +include_once libfile('function/appmarket'); $step = intval($_GET['step']); $op = $_GET['op']; $step = $step ? $step : 1; @@ -139,7 +140,7 @@ elseif($operation == 'cross' || $operation == 'patch'){ exit(json_encode($return)); exit(); } - + $step = intval($_REQUEST['step']); $step = $step ? $step : 1; @@ -155,24 +156,15 @@ elseif($operation == 'cross' || $operation == 'patch'){ $upgrade_version = unserialize($appinfo["upgrade_version"]); $upgradeinfo = $upgrade_version[$operation]; $appinfo["upgradeinfo"]=$upgradeinfo;*/ - + $dzz_upgrade = new dzz_upgrade_app(); if($step != 5) { - $updatefilelist = $dzz_upgrade->fetch_installfile_list( $baseinfo ); - - if(empty($updatefilelist)) { - $return["status"]=0; - $return["msg"]= lang('app_upgrade_none', array('upgradeurl' => upgradeinformation_app(-1))); - exit(json_encode($return)); - } - $updatemd5filelist = $updatefilelist['md5']; - $updatefilelist = $updatefilelist['file']; + //$updatefilelist = $dzz_upgrade->fetch_installfile_list( $baseinfo ); $theurl = ADMINSCRIPT . '?mod=appmarket&op=install_app_ajax&operation=' . $operation .'&locale=' . $locale . '&charset=' . $charset; } - if($step == 1) { - $linkurl=$theurl. '&step=2'; - $updatefilelist=$updatefilelist ; + if($step == 1) { + $linkurl=$theurl. '&step=2'; $return["percent"]=15; $return["second"]=1; $return["url"]=$linkurl; @@ -183,32 +175,43 @@ elseif($operation == 'cross' || $operation == 'patch'){ } elseif($step == 2) { + //start 下载zip.md5 + $updatefilelist = $dzz_upgrade->fetch_installapp_zip( $baseinfo ); + if(empty($updatefilelist)) { + $return["status"]=0; + $return["msg"]= lang('app_upgrade_none', array('upgradeurl' => upgradeinformation_app(-1))); + exit(json_encode($return)); + } + $updatemd5filelist = $updatefilelist['md5']; + $updatefilelist = $updatefilelist['file']; + //end + $return["msg"]=lang("app_upgrade_downloading"); $return["step"]=2; $percent = 60; $fileseq = intval($_GET['fileseq']); $fileseq = $fileseq ? $fileseq : 1; - //$position = intval($_GET['position']); - //$position = $position ? $position : 0; - //$offset = 1000 * 1024; - + $position = intval($_GET['position']); + $position = $position ? $position : 0; + $offset = 1024 * 1024; + $packagesize = $baseinfo["packagesize"]; if($fileseq > count($updatefilelist)) { $linkurl = $theurl.'&step=3'; $percent = 100; $return["step"]=3; $return["msg"]= lang('app_upgrade_download_complete', array('upgradeurl' => upgradeinformation_app(6))); } else { - $downloadstatus = $dzz_upgrade->download_file($baseinfo, $updatefilelist[$fileseq-1], '', $updatemd5filelist[$fileseq-1]);//, $position, $offset); + $downloadstatus = $dzz_upgrade->download_file($baseinfo, $updatefilelist[$fileseq-1], '', $updatemd5filelist[$fileseq-1] , $position, $offset); if($downloadstatus == 1) { $linkurl = $theurl.'&step=2&fileseq='.$fileseq.'&position='.($position+$offset); - $percent = 60+sprintf("%2d", 40 * $fileseq/count($updatefilelist)); + $percent = 60+ sprintf("%2d", 40 * $position/$packagesize);//60+sprintf("%2d", 40 * $fileseq/count($updatefilelist)); $file = $updatefilelist[$fileseq-1]; } elseif($downloadstatus == 2) { $linkurl = $theurl.'&step=2&fileseq='.($fileseq+1); - $percent = 60+sprintf("%2d", 40 * $fileseq/count($updatefilelist)); + $percent = 60+ sprintf("%2d", 40 * $position/$packagesize);//60+sprintf("%2d", 40 * $fileseq/count($updatefilelist)); $file = $updatefilelist[$fileseq-1]; - } else { + } else { $return["status"]=0; $return["msg"]= lang('app_upgrade_downloading_error', array('file' => $updatefilelist[$fileseq-1], 'upgradeurl'=>upgradeinformation_app(-3) )) ; exit(json_encode($return)); @@ -228,19 +231,37 @@ elseif($operation == 'cross' || $operation == 'patch'){ $return["second"]=1; $return["msg"]= lang("app_upgrade_check_download_complete"); $return["step"]=3; - //此处应检查验证是否下载完毕所有更新文件 + //此处应下载压缩包内文件的md5文件 + $updatefilelist = $dzz_upgrade->fetch_installfile_list( $baseinfo ); + if(empty($updatefilelist)) { + $return["status"]=0; + $return["msg"]= lang('app_upgrade_none', array('upgradeurl' => upgradeinformation_app(-1))); + exit(json_encode($return)); + } + //解压压缩包 + $zippath= DZZ_ROOT . 'data/update/app/'.$baseinfo["app_path"].'/'.$baseinfo["identifier"].'/'.$baseinfo['version'].'/'; + $zipfile=$zippath.$baseinfo["identifier"].".zip"; + $md5file =$zippath.$baseinfo["identifier"].".md5.dzz"; + dzzunzip($zipfile,$zippath,$md5file); + $linkurl = $theurl.'&step=4'; $return["url"]=$linkurl; exit(json_encode($return)); exit; } - elseif($step==4){ + elseif($step==4){ $return["percent"]=80; $return["second"]=1; $return["msg"]= lang("app_upgrade_installing"); $return["step"]=4; + //start 下载更新文件的.md5 + $updatefilelist = $dzz_upgrade->fetch_installfile_list( $baseinfo ); + $updatefilelist = $updatefilelist['file']; + //end + + $confirm = $_GET['confirm']; if (!$confirm) { $checkupdatefilelist = $updatefilelist; diff --git a/admin/appmarket/template/cloudappmarket.htm b/admin/appmarket/template/cloudappmarket.htm index 65ca4c3..f0c79fd 100644 --- a/admin/appmarket/template/cloudappmarket.htm +++ b/admin/appmarket/template/cloudappmarket.htm @@ -196,7 +196,7 @@ } function start_check_install(url,mid,data){ - jQuery.post({ + jQuery.ajax({ type:'post', async: true, url:url, @@ -300,7 +300,7 @@ } function start_check_upgrade(url,mid){ - jQuery.post({ + jQuery.ajax({ type:'post', async: true, url:url, diff --git a/admin/appmarket/template/extopen.htm b/admin/appmarket/template/extopen.htm index 479cf0b..2d795a1 100644 --- a/admin/appmarket/template/extopen.htm +++ b/admin/appmarket/template/extopen.htm @@ -126,7 +126,8 @@ if( jQuery(obj).hasClass("isdefault1") ){ return false; } - jQuery.post({ + jQuery.ajax({ + type:'post', url:'{MOD_URL}&op=extopen', data:{'extid':extid ,'do':'setdefault'}, success:function(json){ diff --git a/admin/appmarket/template/index.htm b/admin/appmarket/template/index.htm index 35ca62f..eecf77c 100644 --- a/admin/appmarket/template/index.htm +++ b/admin/appmarket/template/index.htm @@ -103,7 +103,7 @@
@@ -123,7 +123,7 @@
- + - + + + +
-
+ @@ -158,8 +158,11 @@ @@ -192,22 +195,25 @@ @@ -224,7 +230,7 @@ "; + include template('common/footer'); + exit(); + } + }catch(Exception $e){ + $attach['error']=$e->getMessage(); + include template('common/header_common'); + echo ""; + include template('common/footer'); + exit(); + } + }else{ + //完成; + include template('common/header_common'); + echo ""; + include template('common/footer'); + exit(); + } + + +?> diff --git a/admin/cloud/oauth.php b/admin/cloud/oauth.php new file mode 100644 index 0000000..b8cf3db --- /dev/null +++ b/admin/cloud/oauth.php @@ -0,0 +1,33 @@ +getBucketList($id,$key); + + if($re){ + echo json_encode($re); + }else{ + echo json_encode(array()); + } + exit(); +}else{ + IO::authorize($bz); + exit(); +} +?> diff --git a/admin/cloud/router.php b/admin/cloud/router.php new file mode 100644 index 0000000..46dd47c --- /dev/null +++ b/admin/cloud/router.php @@ -0,0 +1,47 @@ + $value){ + if(in_array($routerid,$delete)) continue; + $setarr=array( + 'priority'=>intval($_GET['priority'][$routerid]), + 'available'=>intval($_GET['available'][$routerid]), + ); + if(!empty($value)) $setarr['name']=$value; + C::t('local_router')->update($routerid,$setarr); + } + C::t('local_router')->delete($delete); + showmessage('do_success',dreferer()); +}else{ + + $storage=array(); + foreach(C::t('local_storage')->fetch_all_orderby_disp() as $key=>$value){ + $value['fusesize']=formatsize($value['usesize']); + if($value['totalsize']) $value['ftotalsize']=formatsize($value['totalsize']); + else $value['ftotalsize']=lang('unlimited'); + $storage[$value['remoteid']]=$value; + } + $list=array(); + foreach(C::t('local_router')->fetch_all_orderby_priority() as $value){ + $value['position']=$storage[$value['remoteid']]['name']; + $value['bz_available']=$storage[$value['remoteid']]['available']; + $value['bz']=$storage[$value['remoteid']]['bz']; + $list[$value['routerid']]=$value; + } +} +include template('router'); + + +?> diff --git a/admin/cloud/routeredit.php b/admin/cloud/routeredit.php new file mode 100644 index 0000000..e1a9dbf --- /dev/null +++ b/admin/cloud/routeredit.php @@ -0,0 +1,39 @@ +update($routerid,$router); + }else{ + $router['dateline']=TIMESTAMP; + C::t('local_router')->insert($router); + } + + showmessage('do_success',BASESCRIPT.'?mod=cloud&op=router'); +}else{ + $routerid=intval($_GET['routerid']); + $router=C::t('local_router')->fetch_by_routerid($routerid); + $spaces=C::t('local_storage')->fetch_all_orderby_disp(); + $navtitle=lang('routing_management').' - '.lang('add_routing'); + include template('routeredit'); +} +?> diff --git a/admin/cloud/space.php b/admin/cloud/space.php new file mode 100644 index 0000000..c80b1e5 --- /dev/null +++ b/admin/cloud/space.php @@ -0,0 +1,59 @@ +update_sizecount_by_remoteid($remoteid)){ + $arr['fusesize']=formatsize($arr['usesize']); + if ($arr['totalsize']) + $arr['ftotalsize'] = formatsize($arr['totalsize']); + else + $arr['ftotalsize'] = lang('unlimited'); + } + echo json_encode($arr); + exit(); +}elseif($_GET['do']=='delete'){ + $remoteid=intval($_GET['remoteid']); + $re=C::t('local_storage')->delete_by_remoteid($remoteid); + if($re['error']) showmessage($re['error'],dreferer()); + showmessage('do_success',dreferer()); +}else{ + if(submitcheck('cloudsubmit')){ + $isdefault=intval($_GET['isdefault']); + foreach($_GET['name'] as $remoteid => $value){ + $setarr=array( + 'disp'=>intval($_GET['disp'][$remoteid]), + 'isdefault'=>($remoteid==$isdefault)?1:0 + ); + if(!empty($value)) $setarr['name']=getstr($value); + C::t('local_storage')->update($remoteid,$setarr); + } + showmessage('do_success',dreferer()); + }else{ + $list=array(); + foreach(C::t('local_storage')->fetch_all_orderby_disp() as $key=>$value){ + + if($arr=C::t('local_storage')->update_sizecount_by_remoteid($value['remoteid'])){ + $value['fusesize']=formatsize($value['usesize']); + if ($value['totalsize']) + $value['ftotalsize'] = formatsize($value['totalsize']); + else + $value['ftotalsize'] = lang('unlimited'); + } + + $list[]=$value; + } + } + include template('space'); +} +?> diff --git a/admin/cloud/spaceadd.php b/admin/cloud/spaceadd.php new file mode 100644 index 0000000..6d68aa9 --- /dev/null +++ b/admin/cloud/spaceadd.php @@ -0,0 +1,22 @@ +fetch_all_by_available() as $value){ + //if($value['type']!='storage' && $value['type']!='ftp') continue; //限制只有云存储 ftp才能使用 + $list[$value['type']]['list'][]=$value; + $list[$value['type']]['header'] = lang('cloud_type_' . $value['type']); +} +include template("spaceadd"); +?> diff --git a/admin/cloud/template/add.htm b/admin/cloud/template/add.htm new file mode 100644 index 0000000..25b1e2e --- /dev/null +++ b/admin/cloud/template/add.htm @@ -0,0 +1,90 @@ + + + + + +
+
+ +
+
+
+
+ +
+ + + +
+
{lang name}:
+
+ +
+
+
+
{lang designator}:
+
+ +
    + {lang cloud_add_designator_text} +
+
+
+
+
{lang type}:
+
+ + + +
+
+ + + +
+
+
+ + + diff --git a/admin/cloud/template/cloud.htm b/admin/cloud/template/cloud.htm new file mode 100644 index 0000000..6ff5a03 --- /dev/null +++ b/admin/cloud/template/cloud.htm @@ -0,0 +1,94 @@ + + + + + + +
+
+ +
+
+ +
+
+ +
+
+ + +
+

- $value[appname] - (设置) + + $value[appname] + + $value[appname] +

{eval echo $value['appdesc']?$value['appdesc']:lang('none');}
@@ -168,7 +171,7 @@
- {lang edit} - {lang export} + + 设置 + + {lang edit} + + - {lang close} + {lang close} - {lang enable} - {lang uninstall} + {lang enable} + {lang uninstall} - {lang enable} + {lang enable} - - + {lang export}
+ + + + + + + + + + + + + + + + + + + + + + + +
{lang sort}{lang name}{lang designator}{lang type}{lang available}{lang set}
+ + + + + + + $value[bz]{echo lang('cloud_type_'.$value[type])} + + + + 0}-->checked disabled > $value[warning] + + {lang set} + + + {lang delete} + +
+ +
+
+ +
+
+ +
{lang board_message}
+
    + {lang cloud_cloud_board_message_text} +
+
+
+ + + + + + \ No newline at end of file diff --git a/admin/cloud/template/edit.htm b/admin/cloud/template/edit.htm new file mode 100644 index 0000000..ce8b26c --- /dev/null +++ b/admin/cloud/template/edit.htm @@ -0,0 +1,262 @@ + + + + + + +
+
+ +
+
+
+
+ +
+ +
+
+
+ + +
+
{lang name}:
+
+ +
+
+
+
{lang designator}:
+
+ +
+
+
    + {lang cloud_edit_designator_text} +
+
+
+ +
+
+ +
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
{lang name}{lang username}{lang add_time}
$value[cloudname]$value[username] $value[dateline]
+  {lang del}     + + $multi
+
+ +
+ + +
+
{lang name}:
+
+ +
+
+
+
{lang whether_allow_users_add}:
+
+ + + + + + +
    + +
  • $cloud[warning]
  • + + +
  • {lang cloud_edit_enabled_name}
  • + +
  • {lang cloud_edit_enabled_cloud}
  • + +
+
+
+
+
{lang designator}:
+
+ +
+
+
+
{lang root_directory}:
+
+ +
    + {lang cloud_add_root_directory_text} +
+
+
+
+
API Key:
+
+ +
    + {lang cloud_add_API_KEY_text} +
+
+
+
+
Secret Key
+
+ +
    + {lang cloud_add_Secret_KEY_text} +
+
+
+
+
{lang cloud_add_data_table_name}
+
+ +
    + {lang cloud_add_data_table_name_text} +
+
+
+ +
+ +
+ +
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
{lang name}{lang username}{lang add_time}
$value[cloudname]$value[username] $value[dateline]
+  {lang del}    + + $multi
+
+ +
+ + +
+
{lang name}:
+
+ + {lang name}
+
+
+
{lang whether_allow_users_add}:
+
+ + + + + + +
    + +
  • $cloud[warning]
  • + + +
  • {lang cloud_edit_enabled_name}
  • + +
  • {lang cloud_edit_enabled_cloud}
  • + + +
+
+
+
+
{lang designator}:
+
+ +
    + {lang cloud_edit_designator_text} +
+
+
+ +
+ +
+ +
+
+ + + \ No newline at end of file diff --git a/admin/cloud/template/header_left.htm b/admin/cloud/template/header_left.htm new file mode 100644 index 0000000..16ef1d0 --- /dev/null +++ b/admin/cloud/template/header_left.htm @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/admin/cloud/template/left.htm b/admin/cloud/template/left.htm new file mode 100644 index 0000000..140a7ca --- /dev/null +++ b/admin/cloud/template/left.htm @@ -0,0 +1,10 @@ + + + diff --git a/admin/cloud/template/movetool.htm b/admin/cloud/template/movetool.htm new file mode 100644 index 0000000..ce3c4f4 --- /dev/null +++ b/admin/cloud/template/movetool.htm @@ -0,0 +1,143 @@ + + + + + + +
+
+ +
+
+
+
+
+ +
+
+
+ + +
+
{lang target_location}:
+
+ +
    +
  • {lang cloud_movetool_designator_text}
  • +
+
+
+
+
{lang original_location}:
+
+ +
    +
  • {lang cloud_movetool_designator_text}
  • +
+
+
+
+
{lang filtrate_condition} 
+
+ + +
+
+
+
+ +
{lang board_message}
+
    + {lang cloud_movetool_board_message_text} +
+
+
+
+
+ + + diff --git a/admin/cloud/template/movetool_run.htm b/admin/cloud/template/movetool_run.htm new file mode 100644 index 0000000..09e603e --- /dev/null +++ b/admin/cloud/template/movetool_run.htm @@ -0,0 +1,179 @@ + + + + + + +
+
+ +
+
+
+
+
+ +
+
+
+

+ +     + +    

+ +
+
+
+ +
{lang board_message}
+
    + {lang cloud_movetool_board_message_text1} +
+
+
+
+
+
+ + + + \ No newline at end of file diff --git a/admin/cloud/template/oauth_ALIOSS.htm b/admin/cloud/template/oauth_ALIOSS.htm new file mode 100644 index 0000000..9a91fe5 --- /dev/null +++ b/admin/cloud/template/oauth_ALIOSS.htm @@ -0,0 +1,155 @@ + + + + + + +
+
+ +
+
+
+
+
+
+
+ +
+
+ +
+ + + +
+ + + + {lang oauth_ALIOSS_ALY_storage}Access Key ID + +
+
+ + + + + {lang oauth_ALIOSS_ALY_storage}Access Key Secret +
+
+ + + + {lang oauth_ALIOSS_bucket} +
+ +
+ + +
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/admin/cloud/template/oauth_disk.htm b/admin/cloud/template/oauth_disk.htm new file mode 100644 index 0000000..bcedbf4 --- /dev/null +++ b/admin/cloud/template/oauth_disk.htm @@ -0,0 +1,92 @@ + + + + + + +
+
+ +
+
+
+
+ + +
+
+ + + +
+ + + +
+
+ + + {lang disk_dir_tip} + +
+ +
+ + + + {lang disk_encode_tip} + +
+ + + + +
+ + +
+
+ +
+
+
+ + + \ No newline at end of file diff --git a/admin/cloud/template/oauth_ftp.htm b/admin/cloud/template/oauth_ftp.htm new file mode 100644 index 0000000..3781d60 --- /dev/null +++ b/admin/cloud/template/oauth_ftp.htm @@ -0,0 +1,110 @@ + + + + + + +
+
+ +
+
+
+
+
+
+
+ +
+
+ + + +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + + {lang oauth_ftp_encode_set}
+ + +
+ + + + +
+ +
+ + + + +
+
+ + +
+
+
+
+
+ + + \ No newline at end of file diff --git a/admin/cloud/template/oauth_qiniu.htm b/admin/cloud/template/oauth_qiniu.htm new file mode 100644 index 0000000..02d6df7 --- /dev/null +++ b/admin/cloud/template/oauth_qiniu.htm @@ -0,0 +1,99 @@ + + + + + + +
+
+ +
+
+
+
+ +
+ +
+ + + +
+ + + + {lang oauth_qinniu_storage} AK +
+
+ + + + {lang oauth_qinniu_storage} SK +
+
+ + + + {lang oauth_qinniu_manage_bucket} +
+
+ + + + {lang oauth_qinniu_storage_bucket} +
+
+ +
+ + + +
+ +
+
+ + +
+
+
+
+
+ + + + diff --git a/admin/cloud/template/right_header.htm b/admin/cloud/template/right_header.htm new file mode 100644 index 0000000..10d7323 --- /dev/null +++ b/admin/cloud/template/right_header.htm @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/admin/cloud/template/router.htm b/admin/cloud/template/router.htm new file mode 100644 index 0000000..c094d5e --- /dev/null +++ b/admin/cloud/template/router.htm @@ -0,0 +1,103 @@ + + + + + + + +
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
 {lang priority}{lang name}{lang use_storage}{lang routing_rule}{lang enable}{lang edit}
$value[position] + + {lang router_routing_failure} + $value[drouter]0}-->checked> 
+  {lang del}    + + {lang add_routing} + +
+
+
+
+ +
{lang board_message}
+
    + {lang router_board_message_text} +
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/admin/cloud/template/routeredit.htm b/admin/cloud/template/routeredit.htm new file mode 100644 index 0000000..f37a458 --- /dev/null +++ b/admin/cloud/template/routeredit.htm @@ -0,0 +1,111 @@ + + + + + + +
+
+ +
+
+
+
+
+
+
+ +
+
+ + + +
+
{lang routing_name}:
+
+ +
+
+
+
{lang priority}:
+
+ +
+
+
+
{lang storage_location}:
+
+ +
    +
  • {lang cloud_movetool_designator_text}
  • +
+
+
+
+
{lang file_type}:
+
+ +
+
+ {lang photograph_class} +    word{lang type_attach} +    excel{lang type_attach} +    ppt{lang type_attach} +    {lang video_typename_attach}    {lang text_class} +
+
+
    + {lang cloud_movetool_file_type_text} +
+
+
+
+
{lang file_size}:
+
+
{lang typename_attach_lt} + + M
+
AND
+
{lang typename_attach_gt} + + M
+
+
+
    + {lang cloud_movetool_file_size_text} +
+
+
+ +
+
+
+
+ + + \ No newline at end of file diff --git a/admin/cloud/template/space.htm b/admin/cloud/template/space.htm new file mode 100644 index 0000000..5a27fba --- /dev/null +++ b/admin/cloud/template/space.htm @@ -0,0 +1,97 @@ + + + + + + +
+
+ +
+
+
+
+
+ + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
{lang sort}{lang storage_location}{lang default}{lang used_surplus} 
$value[fusesize] / $value[ftotalsize] + + {lang space_storage_failure} + +
0}-->style="display:none"class="text-danger" href="{BASESCRIPT}?mod=cloud&op=space&do=delete&remoteid=$value[remoteid]" onclick="if(confirm('{lang space_del_storage}')){return true;}else{return false}" >{lang delete}
{lang add_storage_location} +
+
+
+
+ +
{lang board_message}
+
    + {lang space_board_message_text} +
+
+
+
+
+
+ + + diff --git a/admin/cloud/template/spaceadd.htm b/admin/cloud/template/spaceadd.htm new file mode 100644 index 0000000..a3d3022 --- /dev/null +++ b/admin/cloud/template/spaceadd.htm @@ -0,0 +1,85 @@ + + + + + + +
+
+ +
+
+
+
+
+
+
+ +
+
+ +

$value[header]

+
    + +
  • +
    +
    $value1[name]
    +
    +
  • + +
+ +
+
+
+
+ + + \ No newline at end of file diff --git a/admin/filemanage/dzz_app_filemanage.xml b/admin/filemanage/dzz_app_filemanage.xml index f6b7b5c..d0c549e 100644 --- a/admin/filemanage/dzz_app_filemanage.xml +++ b/admin/filemanage/dzz_app_filemanage.xml @@ -1257,7 +1257,7 @@ AAiAAAjA0ceJaY9cOQAbHgBslgMw5wHATDkAL4CtFBe/Crw+NUAUBrscfYz4PYXFrwGdURj89xmQ KWXvsNKmERgG7gJXqeCmpQrHvn1uzQMTURj8KXZCRjZPSx9Q3fFvAHpKcdrrHql1AAAAAElFTkSu QmCC ]]> - + diff --git a/admin/function/function_admin.php b/admin/function/function_admin.php index 0cc7890..f9e9b83 100644 --- a/admin/function/function_admin.php +++ b/admin/function/function_admin.php @@ -274,7 +274,7 @@ function upgradeinformation($status = 0) { foreach($update as $key => $value) { $data .= $key.'='.rawurlencode($value).'&'; } - $upgradeurl = 'ht'.'tp:/'.'/dev'.'.'.'d'.'zzo'.'ffice.'.'c'.'om/upg'.'rade'.'.p'.'hp?'.'os=d'.'zzoff'.'ice&update='.rawurlencode(base64_encode($data)).'×tamp='.TIMESTAMP; + $upgradeurl = APP_CHECK_URL."market/system/upgrade/".rawurlencode(base64_encode($data))."/".TIMESTAMP; return ''; } diff --git a/admin/language/zh-cn/lang.php b/admin/language/zh-cn/lang.php index 15682e3..39fed16 100644 --- a/admin/language/zh-cn/lang.php +++ b/admin/language/zh-cn/lang.php @@ -874,6 +874,7 @@ $lang = array // admin/orguser/detail_org.html 'export_excl'=>'导出此部门的所有用户到excl文件', 'detail_org_no_enable'=>'如不启用,下级所有部门中将不能使用共享目录;启用后,企业盘才会显示共享目录。', + 'detail_org_explorerapp_enable'=>'开启后,可在网盘等应用中能够使用该机构或部门的目录。', 'detail_org_enable'=>'启用后,企业盘机构下才会显示此部门的共享目录。', 'detail_org_creation'=>'创建快捷方式后,所属成员桌面默认都会有相应快捷方式。', 'group_org_no_enable'=>'开启后,资源管理器会显示该机构群组选项。', @@ -912,7 +913,7 @@ $lang = array
  • 3、表中“邮箱”、“用户名”字段中的信息必须是唯一的,不可重复。如果邮箱为空,系统导入时将随机生成邮箱地址。
  • 4、多级部门创建:方法1:表中添加多列“所属部门”,从左到右分别为一级部门、二级部门、三级部门,顺序排列,系统会根据从左到右的原则,依次创建部门、下级部门、下下级部门等。方法2:表格中使用单列,上下级部门使用“/”来分割(例如:小学/一年级/一班)。
  • 5、导入用户只能按机构导入,多个机构需要分批导入。
  • -
  • 6、表中“用户密码”字段可为空,管理员在导入时能够为用户批量设置统一的密码。用户使用统一密码登录后可自行修改。
  • +
  • 6、表中“登录密码”字段可为空,管理员在导入时能够为用户批量设置统一的密码。用户使用统一密码登录后可自行修改。
  • 7、导入界面中有“增量”、“覆盖”两种导入方式。增量方式为:遇到相同用户,只会增加用户缺少的字段信息,原有信息不变。(例如:系统中已有用户A,密码为123。在批量导入表格中,也有用户A,导入时设置了统一密码为abc。导入完成后,其他用户的密码都为abc,原用户A还是保持他的原有密码,即123。)覆盖导入:将系统中原有的用户信息完全替换为表格中的信息。
  • 8、若需导入的人员较多,建议先做一个少量人员的测试表,测试无误后,再使用增量方式导入所有用户。
  • ', diff --git a/admin/login/login.php b/admin/login/login.php index d360c15..304a97f 100644 --- a/admin/login/login.php +++ b/admin/login/login.php @@ -60,6 +60,7 @@ if ($this -> cpaccess == -3) { html_login_footer(); function html_login_header($form = true) { + global $_G; $uid = getglobal('uid'); $charset = CHARSET; $lang = &lang(); @@ -71,6 +72,7 @@ function html_login_header($form = true) { $title + diff --git a/admin/member/dzz_app_member.xml b/admin/member/dzz_app_member.xml new file mode 100644 index 0000000..e4d77ed --- /dev/null +++ b/admin/member/dzz_app_member.xml @@ -0,0 +1,1293 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/admin/member/images/icons_24.png b/admin/member/images/icons_24.png new file mode 100644 index 0000000000000000000000000000000000000000..af6285eb34bb8f64cd7500628abc1e3d2c3d98c0 GIT binary patch literal 7124 zcmV;_8!P0AP)000W>0fLJSS^xk57IZ~ebVG7wVRUJ4ZXi@?ZDjy3HZL(V zFEKPsuAy820010xMObuGZ)S9NVRB^vL1b@YWgtdra%FdKa%*!SLsK^Byt0e{02?ex zL_t(|ob8)=d{x!8$G`iWbEn)SHv=Id%wYymKn4{N6_BEB)iSis)Ss0HkMa5Q7R6qqmK~biJnLr2x$Ux@g&i9^S@AtgoV)h= z?X}k4Yp=cbj!;T*n1m1j%=r8M_kb(toYs8w{eI`4;I|`mSgvt`->;Z7G8fxX9X=Ym zVD*;9i6;}@o$o1y}uyJn)S(J&AiiBlz^^zJju7?jp2+CTltDn9&Z~h4ZoTSb6CX=tW)MEf2 zt*b=<;kd;|>ns2waf`K)BuYxMGu`}rbQVcR;n4+~8j^1TCk8;k(145Bh;HoI+sd@F z^8r}4v5rf|rrtj-uH(!>StzC0y{DPSH??*UarKfKbyV818rTv?fo&^nOJdq7-eccw zTOpOgvK$^5*A1l<_pNK>{t4ZX3LYtL>Rba|6MVccL{n`TY@3o@4Im&Iiczw=0Z6^? z-VZp6WZYtBOFY$G1*NTtlpIv&0O3%Q3Bz3MQGUvHH#2ZlHUKr%5eD{6y&tNHQkd^Y zII#JtkbQJL*y(d0+I zQvJ^z$i|O$;PtzY#FIoYhBuH#i}@VC`9V+48#I8e4LgaNX#n`$G0w~z&R2W(GXLv1 zD(fDW&FL%P7$;k{qNfXbpVb#TW-@r<5C%^ig4^%KS5U?^7wZfw%3?#~3L27)+)(rg zHxxZWL$Z+#jVl;dl*RY~K@RL&d_-mk00H1inMiZ%9n6!o-(lFG0Bfp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;`pA&Y1qcAcI;}PvO2V7#zj4M z?%G|8mWW%*?=z56y|L=6gEAa3bzM(6Ow+`XQ>c<{4J`O1$^0d8Ra_g@ACxWXY-o_uSHlpIqCM zPro(^g^ymlbsUMN346sC`}K9j)tfGy-2Ekw&p~2K{fx7J07BvM=nUwWy{2Sa?esLC ztLN~+-7HYLQlJUJmYq#B1r;@QCT1eel!@I_<4=LEYtGi4^~O^#ZV1H^*6f|TgOxqH z2Q-vY`Wa(qqiNvv7+O_LD3+P-T2Z{YZfYW77mOU9=NP&sHC%Hv_xfI zPFlA_+Z6r=Me&x}V%w27A3PY`+_!f? zce{1RqFt>YqJKC~dgVQ~_Y1Xi!l0-~|&7mcQ^WpIm8; literal 0 HcmV?d00001 diff --git a/admin/member/images/member.css b/admin/member/images/member.css new file mode 100644 index 0000000..7485881 --- /dev/null +++ b/admin/member/images/member.css @@ -0,0 +1,94 @@ +.jstree-root{ + padding:5px 0 0 10px; + line-height:24px; +} +.classtree-topbar{ + position:relative; + bottom:0px; + left:0px; + background:#F7F7F7; + border-bottom:1px solid #D2D2D2; + border-top:1px solid #FFF; + padding:7px 10px 3px 10px; +} + +.classtree-topbar a{ + display:inline-block; + margin:0px 5px; + width:24px; + height:24px; + background-image:url(icons_24.png); + _filter: Alpha(opacity=70); + opacity: 0.7; +} +.classtree-topbar .newdir{ + background-position:0 0; +} +.classtree-topbar .newdir_1{ + background-position:0 -24px; +} +.classtree-topbar .newdoc{ + background-position:0 -48px; +} +.classtree-topbar .import{ + background-position:0 -72px; +} +.classtree-topbar .search{ + background-position:0 -96px; +} +.classtree-topbar .guide{ + background-position:0 -120px; +} +.classtree-topbar a:hover{ + _filter: Alpha(opacity=100); + opacity: 1; +} +.classtree-topbar a:active{ + +} + +.classtree-search{ + position:absolute; + left:1px; + top:2px; + display:none; +} +.classtree-search .form-control{ + padding:5px 40px 5px 5px; +} +.classtree-search .form-control:focus{ + box-shadow:none; +} +.classtree-search .search{ + position:absolute; + right:28px; + top:8px; +} +.classtree-search .delete{ + position:absolute; + right:8px; + top:8px; +} +/*重定义图标*/ +.jstree-default a i{ + _filter: Alpha(opacity=80); + opacity: 0.8; +} + +.jstree-default .jstree-anchor>.jstree-themeicon { + background-image:url(icons.png); + width:24px;height:24px;margin:4px 0; +} + .jstree-open .jstree-anchor>.jstree-icon-book{ + background-position:-4px -24px; +} + .jstree-closed .jstree-anchor>.jstree-icon-book{ + background-position:-4px 0; +} + +.jstree-leaf .jstree-anchor>.jstree-icon-book{ + background-position:-4px 0; +} +.jstree-node .jstree-anchor>.jstree-icon-file{ + background-position:-4px -48px; +} diff --git a/admin/member/images/themes/default/32px.png b/admin/member/images/themes/default/32px.png new file mode 100644 index 0000000000000000000000000000000000000000..15327152481789306eadef88393cd1c748dc31a7 GIT binary patch literal 3121 zcmd7U`8U-69tZG`S&Ttp2wAdCqGXM%-z>#gDk)iGP*Pd5FU3%4q{tQ_Lo{TYq8P+T z5f#GN%GeTPjAdk><<7nLm-{E&_xqgZdpqwR-se2d>%6h{=dAYeOYs8$u+JKG+5rG~ zOu2J3ADEkN*=|w*00!*sE}h{nU5gzdXvqoyFfcHHKp@!$I+1Y6afnM?O0B%x~Mb|(c2l@8#hDXMUCqv2rKqy4I z6@l2QsK7&^+`G<=>TiUFIV{dwI6NXUP9q(8;688n@#F0Z3P+RG9BWO&y3Wd_@m4~i zfQ#s{=Yr)R(0o!-H6PzfW~NXatPBR*Sl{p>ntc@%+{n!IZL)@WiKq143Tt=C{~6=) z#wLv%lr|8&bp85}we>p*iFp^7MIWDf2;?yUERGkpN=p-*^qJcXSy}1Q($eY58ypU2 zX^F0^tjuPzD1|<|%hQfdZrn#9^MUR8Vb&(u-6wc+W0SQ_Ut_FIPEJu57WNp_sV|SW z=$*NFxy7lDy0rjEkH9@092{C5XjuQ%{CA?0I`X2sF1DfgdM_zs;v3#Fz#<_LySlof zSHrtCH&jL}+g+Yoq|u)Lx!yb5F+DRA77=^=C7@ji>@gOud^)P}3b-?ZYFJC{+pKl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psu$Hv@8;>zTt+7$`u~2m9z0|)7cfv+3PCBtFeuy&wye3rS%AWA~lN4 q$a=%VWn+k|UtiDv&>%>!2^rk(D6aNK_^-%!; literal 0 HcmV?d00001 diff --git a/admin/member/images/themes/default/40px.png b/admin/member/images/themes/default/40px.png new file mode 100644 index 0000000000000000000000000000000000000000..9e76db4f7653a672e9231560ad74697b9fd78b76 GIT binary patch literal 1037 zcmeAS@N?(olHy`uVBq!ia0vp^9~c-IConMsS#Ni+z6VmA0X`wFK>E_9OUA~==d!~T zfE=chAirP+`QNh-oMm8O-stJ#7*cWT?JUPhj}>@aJ6Ef5_f5FE#?rOV;Q0wni$gMv zuKIWWPuaX-E`v}m=hc$%@=o4Rt^G6l9e-KyIo>TYFlm=9`!St$-(B7hkKfzW9K3B) zbM&`O4fDIpADDkwbH_7i%{s90rPj#>i#X>L-Mu<#Wd_sYE3vviW#Tr3#VY@-xgoe> zm)obGEvgFpcZGd=xtJ*+?(XqP)fJ2z>~;&Ew3T6eaC5Fl+C!Nj_Ro`cCN5?vIs8nu zSh%h9f2Z-uJByjV9h~p^Ozh;nbE?Lti}RUIo;h}7wu8}T)pCpT2PS$=8Nm7 zhu(APNzK9fk^4OOE;gwgImkUx=dMKi3n7-s4v_FH9=?mUK2zGtE@sP5Rz2Wb^3r+J zmEE0cfsvQ)yIh{J;!caep-q==_;R&7IfuX8u(NEUpTupQZHLk_e8NtpJo5Q=F)hY- znx(~?4Tt%xfkZs}f5QXQ&6#VKPRm?)ub$!lipcH+9Sd&z6}~a=x!ktM1yj$^SKUV~jsx=*GSOyxydXnz1bXelL|OO1#7mx@>tCD0oq8 zhxpp2Y8Yj;LwIeo^+hN(pJR4g?kt1Li#O>AUH)W}%X4|!78T}TDJ9MT=E+x9uMItG zx~%APWb3(*q}-!(Z*V2 zQ-=sqDc->y+CmTY(GqNqx{3Da~E;;?f=iM8=?Ap}zRCtF>d8DTf*Tbky5`Dj0 zw?6sN)XlL@Mf>3;k81}{-vSbXy(zMDCS;$qlF&G76n5w>TM*ywySq+tW`FO07np1P z{rerIn<~>SEw*w7u)8a?Sa9k`ID1Ska9FuNIP{R_exnAdzO${bQa=1NnEvL<&0?Wt zoN;r$+`OcuYn~G*EN-=KPM5b%_=%%O=WZ5Aiat0?eC5K#+{rh*3fp{hfYBLvSq2gY zz<~HKZDXLXRFN{<<->^$oew64PC4K_S*x-ATLcq-?@ksuInI=V+u0938hWryPkyxQ zL2l)_1A?lI2c%TbpGs`6XF5~+{FU&x*u-EalVx$vm&~V1M=vy<8WCJ*ev@nR!i|xd zlRJ%Xy89M`!u+3J0o-0-1b8PL{A~~mmVpRYWdCQF>wP+M!K%wLz^u&R>FVdQ&MBb@ E0P-W^1ONa4 literal 0 HcmV?d00001 diff --git a/admin/member/images/themes/default/organization.png b/admin/member/images/themes/default/organization.png new file mode 100644 index 0000000000000000000000000000000000000000..5f51e34a11bca2f772822a995ed06fe18a753e1a GIT binary patch literal 903 zcmV;219<$2P)3iVG# zjS_-bU9>I&Zd_^wH{BGZ8y6L%3l}a5MMcC4ZUnboSWzgJw(7=;ZPe5XZ9}MOlO~-` zrZagn@6EgS9v9L~6?)g_d^lgYf|>EKxBruieyN~lPhV}Funr^%Jx$`&#s@DSy+1<_ z-3D;2)qni#^^Jp}qAz_V78QwgDa4aA$1m*r=E5rd2beo?$^Sn%J6XKb8Q9l*#=WQ@ zZgo>z-{_lNzuiv0ICOgP001Zem_GLN9soOwN6x*QJ8m#w0k8mWl>>Dw$!u?SYTLfU zdv`phrO4j@eu>Wix*Bf*&AxeKEg8&>M*1UWykM9^W;n+Xz9LyB`l=G?S7vsWWT>SW zk3Hl1x!nSYu##Ecb1$>6<<^a7NxmD3Bpf?1r1s@Zt=a2;{L^w@3Xxt}OH@z^#TH-~ z4gdzm*?Q5VlW#wV@BVCVK2i<6NbBi~+6nUT-m?C3%*90CB${e+34XHFe_n!jFHPa4%oRts9reR|RE8jIYU z({)cva!ak07q7O4fD&*5fMc+)NIX@KM;BJQ?cKE~9xwWeEpsW5m>Lb0FG-dHY24s} z1R;b4fKU_PXs1fObGE}^9}uYkphBhoSl#5~=l@PfAisP&QDOCg1PKfPU|<;&u{St# z=-KS#@9Ue5(MXTSo_y)UU(BPGP`&kh-S;H9h1G=qy3*uf0to{E%*>u7F;$JmCP#vH zqY@M*ioS+pj .jstree-children { + display: block; +} +.jstree .jstree-closed > .jstree-children, +.jstree .jstree-leaf > .jstree-children { + display: none; +} +.jstree-anchor > .jstree-themeicon { + margin-right: 2px; +} +.jstree-no-icons .jstree-themeicon, +.jstree-anchor > .jstree-themeicon-hidden { + display: none; +} +.jstree-rtl .jstree-anchor { + padding: 0 1px 0 4px; +} +.jstree-rtl .jstree-anchor > .jstree-themeicon { + margin-left: 2px; + margin-right: 0; +} +.jstree-rtl .jstree-node { + margin-left: 0; +} +.jstree-rtl .jstree-container-ul > .jstree-node { + margin-right: 0; +} +.jstree-wholerow-ul { + position: relative; + display: inline-block; + min-width: 100%; +} +.jstree-wholerow-ul .jstree-anchor, +.jstree-wholerow-ul .jstree-icon { + position: relative; +} +.jstree-wholerow-ul .jstree-wholerow { + width: 100%; + cursor: pointer; + position: absolute; + left: 0; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.vakata-context { + display: none; + z-index:10000; +} +.vakata-context, +.vakata-context ul { + margin: 0; + padding: 2px; + position: absolute; + background: #f5f5f5; + border: 1px solid #979797; + -moz-box-shadow: 5px 5px 4px -4px #666666; + -webkit-box-shadow: 2px 2px 2px #999999; + box-shadow: 2px 2px 2px #999999; +} +.vakata-context ul { + list-style: none; + left: 100%; + margin-top: -2.7em; + margin-left: -4px; +} +.vakata-context .vakata-context-right ul { + left: auto; + right: 100%; + margin-left: auto; + margin-right: -4px; +} +.vakata-context li { + list-style: none; + display: inline; +} +.vakata-context li > a { + display: block; + padding: 0 2em 0 2em; + text-decoration: none; + width: auto; + color: black; + white-space: nowrap; + line-height: 2.4em; + -moz-text-shadow: 1px 1px 0 white; + -webkit-text-shadow: 1px 1px 0 white; + text-shadow: 1px 1px 0 white; + -moz-border-radius: 1px; + -webkit-border-radius: 1px; + border-radius: 1px; +} +.vakata-context li > a:hover { + position: relative; + background-color: #e8eff7; + -moz-box-shadow: 0 0 2px #0a6aa1; + -webkit-box-shadow: 0 0 2px #0a6aa1; + box-shadow: 0 0 2px #0a6aa1; +} +.vakata-context li > a.vakata-context-parent { + background-image: url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw=="); + background-position: right center; + background-repeat: no-repeat; +} +.vakata-context li > a:focus { + outline: 0; +} +.vakata-context .vakata-context-hover > a { + position: relative; + background-color: #e8eff7; + -moz-box-shadow: 0 0 2px #0a6aa1; + -webkit-box-shadow: 0 0 2px #0a6aa1; + box-shadow: 0 0 2px #0a6aa1; +} +.vakata-context .vakata-context-separator a, +.vakata-context .vakata-context-separator a:hover { + background: white; + border: 0; + border-top: 1px solid #e2e3e3; + height: 1px; + min-height: 1px; + max-height: 1px; + padding: 0; + margin: 0 0 0 2.4em; + border-left: 1px solid #e0e0e0; + -moz-text-shadow: 0 0 0 transparent; + -webkit-text-shadow: 0 0 0 transparent; + text-shadow: 0 0 0 transparent; + -moz-box-shadow: 0 0 0 transparent; + -webkit-box-shadow: 0 0 0 transparent; + box-shadow: 0 0 0 transparent; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; +} +.vakata-context .vakata-contextmenu-disabled a, +.vakata-context .vakata-contextmenu-disabled a:hover { + color: silver; + background-color: transparent; + border: 0; + box-shadow: 0 0 0; +} +.vakata-context li > a > i { + text-decoration: none; + display: inline-block; + width: 2.4em; + height: 2.4em; + background: transparent; + margin: 0 0 0 -2em; + vertical-align: top; + text-align: center; + line-height: 2.4em; +} +.vakata-context li > a > i:empty { + width: 2.4em; + line-height: 2.4em; +} +.vakata-context li > a .vakata-contextmenu-sep { + display: inline-block; + width: 1px; + height: 2.4em; + background: white; + margin: 0 0.5em 0 0; + border-left: 1px solid #e2e3e3; +} +.vakata-context .vakata-contextmenu-shortcut { + font-size: 0.8em; + color: silver; + opacity: 0.5; + display: none; +} +.vakata-context-rtl ul { + left: auto; + right: 100%; + margin-left: auto; + margin-right: -4px; +} +.vakata-context-rtl li > a.vakata-context-parent { + background-image: url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7"); + background-position: left center; + background-repeat: no-repeat; +} +.vakata-context-rtl .vakata-context-separator > a { + margin: 0 2.4em 0 0; + border-left: 0; + border-right: 1px solid #e2e3e3; +} +.vakata-context-rtl .vakata-context-left ul { + right: auto; + left: 100%; + margin-left: -4px; + margin-right: auto; +} +.vakata-context-rtl li > a > i { + margin: 0 -2em 0 0; +} +.vakata-context-rtl li > a .vakata-contextmenu-sep { + margin: 0 0 0 0.5em; + border-left-color: white; + background: #e2e3e3; +} +#jstree-marker { + position: absolute; + top: 0; + left: 0; + margin: 0; + padding: 0; + border-right: 0; + border-top: 5px solid transparent; + border-bottom: 5px solid transparent; + border-left: 5px solid; + width: 0; + height: 0; + font-size: 0; + line-height: 0; +} +#jstree-dnd { + line-height: 16px; + margin: 0; + padding: 4px; +} +#jstree-dnd .jstree-icon, +#jstree-dnd .jstree-copy { + display: inline-block; + text-decoration: none; + margin: 0 2px 0 0; + padding: 0; + width: 16px; + height: 16px; +} +#jstree-dnd .jstree-ok { + background: green; +} +#jstree-dnd .jstree-er { + background: red; +} +#jstree-dnd .jstree-copy { + margin: 0 2px 0 2px; +} +.jstree-default .jstree-node, +.jstree-default .jstree-icon { + background-repeat: no-repeat; + background-color: transparent; +} +.jstree-default .jstree-anchor, +.jstree-default .jstree-wholerow { + transition: background-color 0.15s, box-shadow 0.15s; +} +.jstree-default .jstree-hovered { + background: #e7f4f9; + border-radius: 2px; + box-shadow: inset 0 0 1px #ccc; +} +.jstree-default .jstree-clicked { + background: #beebff; + border-radius: 2px; + box-shadow: inset 0 0 1px #999; +} +.jstree-default .jstree-no-icons .jstree-anchor > .jstree-themeicon { + display: none; +} +.jstree-default .jstree-disabled { + background: transparent; + color: #666; +} +.jstree-default .jstree-disabled.jstree-hovered { + background: transparent; + box-shadow: none; +} +.jstree-default .jstree-disabled.jstree-clicked { + background: #efefef; +} +.jstree-default .jstree-disabled > .jstree-icon { + opacity: 0.8; + filter: url("data:image/svg+xml;utf8,#jstree-grayscale"); + /* Firefox 10+ */ + filter: gray; + /* IE6-9 */ + -webkit-filter: grayscale(100%); + /* Chrome 19+ & Safari 6+ */ +} +.jstree-default .jstree-search { + font-style: italic; + color: #8b0000; + font-weight: bold; +} +.jstree-default .jstree-no-checkboxes .jstree-checkbox { + display: none !important; +} +.jstree-default.jstree-checkbox-no-clicked .jstree-clicked { + background: transparent; + box-shadow: none; +} +.jstree-default.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered { + background: #e7f4f9; +} +.jstree-default.jstree-checkbox-no-clicked > .jstree-wholerow-ul .jstree-wholerow-clicked { + background: transparent; +} +.jstree-default.jstree-checkbox-no-clicked > .jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered { + background: #e7f4f9; +} +#jstree-dnd.jstree-default .jstree-ok, +#jstree-dnd.jstree-default .jstree-er { + background-image: url("32px.png"); + background-repeat: no-repeat; + background-color: transparent; +} +#jstree-dnd.jstree-default i { + background: transparent; + width: 16px; + height: 16px; +} +#jstree-dnd.jstree-default .jstree-ok { + background-position: -9px -71px; +} +#jstree-dnd.jstree-default .jstree-er { + background-position: -39px -71px; +} +.jstree-default > .jstree-striped { + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==") left top repeat; +} +.jstree-default > .jstree-wholerow-ul .jstree-hovered, +.jstree-default > .jstree-wholerow-ul .jstree-clicked { + background: transparent; + box-shadow: none; + border-radius: 0; +} +.jstree-default .jstree-wholerow { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} +.jstree-default .jstree-wholerow-hovered { + background: #e7f4f9; +} +.jstree-default .jstree-wholerow-clicked { + background: #beebff; + background: -moz-linear-gradient(top, #beebff 0%, #a8e4ff 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #beebff), color-stop(100%, #a8e4ff)); + background: -webkit-linear-gradient(top, #beebff 0%, #a8e4ff 100%); + background: -o-linear-gradient(top, #beebff 0%, #a8e4ff 100%); + background: -ms-linear-gradient(top, #beebff 0%, #a8e4ff 100%); + background: linear-gradient(to bottom, #beebff 0%, #a8e4ff 100%); + /*filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='@color1', endColorstr='@color2',GradientType=0 );*/ +} +.jstree-default .jstree-node { + min-height: 24px; + line-height: 24px; + margin-left: 24px; + min-width: 24px; +} +.jstree-default .jstree-anchor { + line-height: 24px; + height: 24px; +} +.jstree-default .jstree-icon { + width: 24px; + height: 24px; + line-height: 24px; +} +.jstree-default .jstree-icon:empty { + width: 24px; + height: 24px; + line-height: 24px; +} +.jstree-default.jstree-rtl .jstree-node { + margin-right: 24px; +} +.jstree-default .jstree-wholerow { + height: 24px; +} +.jstree-default .jstree-node, +.jstree-default .jstree-icon { + background-image: url("32px.png"); +} +.jstree-default .jstree-node { + background-position: -292px -4px; + background-repeat: repeat-y; +} +.jstree-default .jstree-last { + background: transparent; +} +.jstree-default .jstree-open > .jstree-ocl { + background-position: -132px -4px; +} +.jstree-default .jstree-closed > .jstree-ocl { + background-position: -100px -4px; +} +.jstree-default .jstree-leaf > .jstree-ocl { + background-position: -68px -4px; +} +.jstree-default .jstree-anchor > .jstree-themeicon { + background-position: -260px -4px; +} +.jstree-default > .jstree-no-dots .jstree-node, +.jstree-default > .jstree-no-dots .jstree-leaf > .jstree-ocl { + background: transparent; +} +.jstree-default > .jstree-no-dots .jstree-open > .jstree-ocl { + background-position: -36px -4px; +} +.jstree-default > .jstree-no-dots .jstree-closed > .jstree-ocl { + background-position: -4px -4px; +} +.jstree-default .jstree-disabled { + background: transparent; +} +.jstree-default .jstree-disabled.jstree-hovered { + background: transparent; +} +.jstree-default .jstree-disabled.jstree-clicked { + background: #efefef; +} +.jstree-default .jstree-checkbox { + background-position: -164px -4px; +} +.jstree-default .jstree-checkbox:hover { + background-position: -164px -36px; +} +.jstree-default .jstree-clicked > .jstree-checkbox { + background-position: -228px -4px; +} +.jstree-default .jstree-clicked > .jstree-checkbox:hover { + background-position: -228px -36px; +} +.jstree-default .jstree-anchor > .jstree-undetermined { + background-position: -196px -4px; +} +.jstree-default .jstree-anchor > .jstree-undetermined:hover { + background-position: -196px -36px; +} +.jstree-default > .jstree-striped { + background-size: auto 48px; +} +.jstree-default.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg=="); + background-position: 100% 1px; + background-repeat: repeat-y; +} +.jstree-default.jstree-rtl .jstree-last { + background: transparent; +} +.jstree-default.jstree-rtl .jstree-open > .jstree-ocl { + background-position: -132px -36px; +} +.jstree-default.jstree-rtl .jstree-closed > .jstree-ocl { + background-position: -100px -36px; +} +.jstree-default.jstree-rtl .jstree-leaf > .jstree-ocl { + background-position: -68px -36px; +} +.jstree-default.jstree-rtl > .jstree-no-dots .jstree-node, +.jstree-default.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl { + background: transparent; +} +.jstree-default.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl { + background-position: -36px -36px; +} +.jstree-default.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl { + background-position: -4px -36px; +} +.jstree-default .jstree-themeicon-custom { + background-color: transparent; + background-image: none; +} +.jstree-default > .jstree-container-ul .jstree-loading > .jstree-ocl { + background: url("throbber.gif") center center no-repeat; +} +.jstree-default.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg=="); +} +.jstree-default.jstree-rtl .jstree-last { + background: transparent; +} +.jstree-default-small .jstree-node { + min-height: 18px; + line-height: 18px; + margin-left: 18px; + min-width: 18px; +} +.jstree-default-small .jstree-anchor { + line-height: 18px; + height: 18px; +} +.jstree-default-small .jstree-icon { + width: 18px; + height: 18px; + line-height: 18px; +} +.jstree-default-small .jstree-icon:empty { + width: 18px; + height: 18px; + line-height: 18px; +} +.jstree-default-small.jstree-rtl .jstree-node { + margin-right: 18px; +} +.jstree-default-small .jstree-wholerow { + height: 18px; +} +.jstree-default-small .jstree-node, +.jstree-default-small .jstree-icon { + background-image: url("32px.png"); +} +.jstree-default-small .jstree-node { + background-position: -295px -7px; + background-repeat: repeat-y; +} +.jstree-default-small .jstree-last { + background: transparent; +} +.jstree-default-small .jstree-open > .jstree-ocl { + background-position: -135px -7px; +} +.jstree-default-small .jstree-closed > .jstree-ocl { + background-position: -103px -7px; +} +.jstree-default-small .jstree-leaf > .jstree-ocl { + background-position: -71px -7px; +} +.jstree-default-small .jstree-anchor > .jstree-themeicon { + background-position: -263px -7px; +} +.jstree-default-small > .jstree-no-dots .jstree-node, +.jstree-default-small > .jstree-no-dots .jstree-leaf > .jstree-ocl { + background: transparent; +} +.jstree-default-small > .jstree-no-dots .jstree-open > .jstree-ocl { + background-position: -39px -7px; +} +.jstree-default-small > .jstree-no-dots .jstree-closed > .jstree-ocl { + background-position: -7px -7px; +} +.jstree-default-small .jstree-disabled { + background: transparent; +} +.jstree-default-small .jstree-disabled.jstree-hovered { + background: transparent; +} +.jstree-default-small .jstree-disabled.jstree-clicked { + background: #efefef; +} +.jstree-default-small .jstree-checkbox { + background-position: -167px -7px; +} +.jstree-default-small .jstree-checkbox:hover { + background-position: -167px -39px; +} +.jstree-default-small .jstree-clicked > .jstree-checkbox { + background-position: -231px -7px; +} +.jstree-default-small .jstree-clicked > .jstree-checkbox:hover { + background-position: -231px -39px; +} +.jstree-default-small .jstree-anchor > .jstree-undetermined { + background-position: -199px -7px; +} +.jstree-default-small .jstree-anchor > .jstree-undetermined:hover { + background-position: -199px -39px; +} +.jstree-default-small > .jstree-striped { + background-size: auto 36px; +} +.jstree-default-small.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg=="); + background-position: 100% 1px; + background-repeat: repeat-y; +} +.jstree-default-small.jstree-rtl .jstree-last { + background: transparent; +} +.jstree-default-small.jstree-rtl .jstree-open > .jstree-ocl { + background-position: -135px -39px; +} +.jstree-default-small.jstree-rtl .jstree-closed > .jstree-ocl { + background-position: -103px -39px; +} +.jstree-default-small.jstree-rtl .jstree-leaf > .jstree-ocl { + background-position: -71px -39px; +} +.jstree-default-small.jstree-rtl > .jstree-no-dots .jstree-node, +.jstree-default-small.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl { + background: transparent; +} +.jstree-default-small.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl { + background-position: -39px -39px; +} +.jstree-default-small.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl { + background-position: -7px -39px; +} +.jstree-default-small .jstree-themeicon-custom { + background-color: transparent; + background-image: none; +} +.jstree-default-small > .jstree-container-ul .jstree-loading > .jstree-ocl { + background: url("throbber.gif") center center no-repeat; +} +.jstree-default-small.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg=="); +} +.jstree-default-small.jstree-rtl .jstree-last { + background: transparent; +} +.jstree-default-large .jstree-node { + min-height: 32px; + line-height: 32px; + margin-left: 32px; + min-width: 32px; +} +.jstree-default-large .jstree-anchor { + line-height: 32px; + height: 32px; +} +.jstree-default-large .jstree-icon { + width: 32px; + height: 32px; + line-height: 32px; +} +.jstree-default-large .jstree-icon:empty { + width: 32px; + height: 32px; + line-height: 32px; +} +.jstree-default-large.jstree-rtl .jstree-node { + margin-right: 32px; +} +.jstree-default-large .jstree-wholerow { + height: 32px; +} +.jstree-default-large .jstree-node, +.jstree-default-large .jstree-icon { + background-image: url("32px.png"); +} +.jstree-default-large .jstree-node { + background-position: -288px 0px; + background-repeat: repeat-y; +} +.jstree-default-large .jstree-last { + background: transparent; +} +.jstree-default-large .jstree-open > .jstree-ocl { + background-position: -128px 0px; +} +.jstree-default-large .jstree-closed > .jstree-ocl { + background-position: -96px 0px; +} +.jstree-default-large .jstree-leaf > .jstree-ocl { + background-position: -64px 0px; +} +.jstree-default-large .jstree-anchor > .jstree-themeicon { + background-position: -256px 0px; +} +.jstree-default-large > .jstree-no-dots .jstree-node, +.jstree-default-large > .jstree-no-dots .jstree-leaf > .jstree-ocl { + background: transparent; +} +.jstree-default-large > .jstree-no-dots .jstree-open > .jstree-ocl { + background-position: -32px 0px; +} +.jstree-default-large > .jstree-no-dots .jstree-closed > .jstree-ocl { + background-position: 0px 0px; +} +.jstree-default-large .jstree-disabled { + background: transparent; +} +.jstree-default-large .jstree-disabled.jstree-hovered { + background: transparent; +} +.jstree-default-large .jstree-disabled.jstree-clicked { + background: #efefef; +} +.jstree-default-large .jstree-checkbox { + background-position: -160px 0px; +} +.jstree-default-large .jstree-checkbox:hover { + background-position: -160px -32px; +} +.jstree-default-large .jstree-clicked > .jstree-checkbox { + background-position: -224px 0px; +} +.jstree-default-large .jstree-clicked > .jstree-checkbox:hover { + background-position: -224px -32px; +} +.jstree-default-large .jstree-anchor > .jstree-undetermined { + background-position: -192px 0px; +} +.jstree-default-large .jstree-anchor > .jstree-undetermined:hover { + background-position: -192px -32px; +} +.jstree-default-large > .jstree-striped { + background-size: auto 64px; +} +.jstree-default-large.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg=="); + background-position: 100% 1px; + background-repeat: repeat-y; +} +.jstree-default-large.jstree-rtl .jstree-last { + background: transparent; +} +.jstree-default-large.jstree-rtl .jstree-open > .jstree-ocl { + background-position: -128px -32px; +} +.jstree-default-large.jstree-rtl .jstree-closed > .jstree-ocl { + background-position: -96px -32px; +} +.jstree-default-large.jstree-rtl .jstree-leaf > .jstree-ocl { + background-position: -64px -32px; +} +.jstree-default-large.jstree-rtl > .jstree-no-dots .jstree-node, +.jstree-default-large.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl { + background: transparent; +} +.jstree-default-large.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl { + background-position: -32px -32px; +} +.jstree-default-large.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl { + background-position: 0px -32px; +} +.jstree-default-large .jstree-themeicon-custom { + background-color: transparent; + background-image: none; +} +.jstree-default-large > .jstree-container-ul .jstree-loading > .jstree-ocl { + background: url("throbber.gif") center center no-repeat; +} +.jstree-default-large.jstree-rtl .jstree-node { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg=="); +} +.jstree-default-large.jstree-rtl .jstree-last { + background: transparent; +} +@media (max-width: 768px) { + .jstree-default-responsive { + /* + .jstree-open > .jstree-ocl, + .jstree-closed > .jstree-ocl { border-radius:20px; background-color:white; } + */ + } + .jstree-default-responsive .jstree-icon { + background-image: url("40px.png"); + } + .jstree-default-responsive .jstree-node, + .jstree-default-responsive .jstree-leaf > .jstree-ocl { + background: transparent; + } + .jstree-default-responsive .jstree-node { + min-height: 40px; + line-height: 40px; + margin-left: 40px; + min-width: 40px; + white-space: nowrap; + } + .jstree-default-responsive .jstree-anchor { + line-height: 40px; + height: 40px; + } + .jstree-default-responsive .jstree-icon, + .jstree-default-responsive .jstree-icon:empty { + width: 40px; + height: 40px; + line-height: 40px; + } + .jstree-default-responsive > .jstree-container-ul > .jstree-node { + margin-left: 0; + } + .jstree-default-responsive.jstree-rtl .jstree-node { + margin-left: 0; + margin-right: 40px; + } + .jstree-default-responsive.jstree-rtl .jstree-container-ul > .jstree-node { + margin-right: 0; + } + .jstree-default-responsive .jstree-ocl, + .jstree-default-responsive .jstree-themeicon, + .jstree-default-responsive .jstree-checkbox { + background-size: 120px 200px; + } + .jstree-default-responsive .jstree-leaf > .jstree-ocl { + background: transparent; + } + .jstree-default-responsive .jstree-open > .jstree-ocl { + background-position: 0 0px !important; + } + .jstree-default-responsive .jstree-closed > .jstree-ocl { + background-position: 0 -40px !important; + } + .jstree-default-responsive.jstree-rtl .jstree-closed > .jstree-ocl { + background-position: -40px 0px !important; + } + .jstree-default-responsive .jstree-anchor > .jstree-themeicon { + background-position: -40px -40px; + } + .jstree-default-responsive .jstree-checkbox, + .jstree-default-responsive .jstree-checkbox:hover { + background-position: -40px -80px; + } + .jstree-default-responsive .jstree-clicked > .jstree-checkbox, + .jstree-default-responsive .jstree-clicked > .jstree-checkbox:hover { + background-position: 0 -80px; + } + .jstree-default-responsive .jstree-anchor > .jstree-undetermined, + .jstree-default-responsive .jstree-anchor > .jstree-undetermined:hover { + background-position: 0 -120px; + } + .jstree-default-responsive .jstree-anchor { + font-weight: bold; + font-size: 1.1em; + text-shadow: 1px 1px white; + } + .jstree-default-responsive > .jstree-striped { + background: transparent; + } + .jstree-default-responsive .jstree-wholerow { + border-top: 1px solid rgba(255, 255, 255, 0.7); + border-bottom: 1px solid rgba(64, 64, 64, 0.2); + background: #ebebeb; + height: 40px; + } + .jstree-default-responsive .jstree-wholerow-hovered { + background: #e7f4f9; + } + .jstree-default-responsive .jstree-wholerow-clicked { + background: #beebff; + } + .jstree-default-responsive .jstree-children .jstree-last > .jstree-wholerow { + box-shadow: inset 0 -6px 3px -5px #666666; + } + .jstree-default-responsive .jstree-children .jstree-open > .jstree-wholerow { + box-shadow: inset 0 6px 3px -5px #666666; + border-top: 0; + } + .jstree-default-responsive .jstree-children .jstree-open + .jstree-open { + box-shadow: none; + } + .jstree-default-responsive .jstree-node, + .jstree-default-responsive .jstree-icon, + .jstree-default-responsive .jstree-node > .jstree-ocl, + .jstree-default-responsive .jstree-themeicon, + .jstree-default-responsive .jstree-checkbox { + background-image: url("40px.png"); + background-size: 120px 200px; + } + .jstree-default-responsive .jstree-node { + background-position: -80px 0; + background-repeat: repeat-y; + } + .jstree-default-responsive .jstree-last { + background: transparent; + } + .jstree-default-responsive .jstree-leaf > .jstree-ocl { + background-position: -40px -120px; + } + .jstree-default-responsive .jstree-last > .jstree-ocl { + background-position: -40px -160px; + } + .jstree-default-responsive .jstree-themeicon-custom { + background-color: transparent; + background-image: none; + } +} +.jstree-default > .jstree-container-ul > .jstree-node { + margin-left: 0; + margin-right: 0; +} diff --git a/admin/member/images/themes/default/style.min.css b/admin/member/images/themes/default/style.min.css new file mode 100644 index 0000000..e628897 --- /dev/null +++ b/admin/member/images/themes/default/style.min.css @@ -0,0 +1 @@ +.jstree-node,.jstree-children,.jstree-container-ul{display:block;margin:0;padding:0;list-style-type:none;list-style-image:none}.jstree-node{white-space:nowrap}.jstree-anchor{display:inline-block;color:#000;white-space:nowrap;padding:0 4px 0 1px;margin:0;vertical-align:top}.jstree-anchor:focus{outline:0}.jstree-anchor,.jstree-anchor:link,.jstree-anchor:visited,.jstree-anchor:hover,.jstree-anchor:active{text-decoration:none;color:inherit}.jstree-icon{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-icon:empty{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-ocl{cursor:pointer}.jstree .jstree-open>.jstree-children{display:block}.jstree .jstree-closed>.jstree-children,.jstree .jstree-leaf>.jstree-children{display:none}.jstree-anchor>.jstree-themeicon{margin-right:2px}.jstree-no-icons .jstree-themeicon,.jstree-anchor>.jstree-themeicon-hidden{display:none}.jstree-rtl .jstree-anchor{padding:0 1px 0 4px}.jstree-rtl .jstree-anchor>.jstree-themeicon{margin-left:2px;margin-right:0}.jstree-rtl .jstree-node{margin-left:0}.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-wholerow-ul{position:relative;display:inline-block;min-width:100%}.jstree-wholerow-ul .jstree-anchor,.jstree-wholerow-ul .jstree-icon{position:relative}.jstree-wholerow-ul .jstree-wholerow{width:100%;cursor:pointer;position:absolute;left:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vakata-context{display:none;z-index:2222}.vakata-context,.vakata-context ul{margin:0;padding:2px;position:absolute;background:#f5f5f5;border:1px solid #979797;-moz-box-shadow:5px 5px 4px -4px #666;-webkit-box-shadow:2px 2px 2px #999;box-shadow:2px 2px 2px #999}.vakata-context ul{list-style:none;left:100%;margin-top:-2.7em;margin-left:-4px}.vakata-context .vakata-context-right ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context li{list-style:none;display:inline}.vakata-context li>a{display:block;padding:0 2em;text-decoration:none;width:auto;color:#000;white-space:nowrap;line-height:2.4em;-moz-text-shadow:1px 1px 0 #fff;-webkit-text-shadow:1px 1px 0 #fff;text-shadow:1px 1px 0 #fff;-moz-border-radius:1px;-webkit-border-radius:1px;border-radius:1px}.vakata-context li>a:hover{position:relative;background-color:#e8eff7;-moz-box-shadow:0 0 2px #0a6aa1;-webkit-box-shadow:0 0 2px #0a6aa1;box-shadow:0 0 2px #0a6aa1}.vakata-context li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==);background-position:right center;background-repeat:no-repeat}.vakata-context li>a:focus{outline:0}.vakata-context .vakata-context-hover>a{position:relative;background-color:#e8eff7;-moz-box-shadow:0 0 2px #0a6aa1;-webkit-box-shadow:0 0 2px #0a6aa1;box-shadow:0 0 2px #0a6aa1}.vakata-context .vakata-context-separator a,.vakata-context .vakata-context-separator a:hover{background:#fff;border:0;border-top:1px solid #e2e3e3;height:1px;min-height:1px;max-height:1px;padding:0;margin:0 0 0 2.4em;border-left:1px solid #e0e0e0;-moz-text-shadow:0 0 0 transparent;-webkit-text-shadow:0 0 0 transparent;text-shadow:0 0 0 transparent;-moz-box-shadow:0 0 0 transparent;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.vakata-context .vakata-contextmenu-disabled a,.vakata-context .vakata-contextmenu-disabled a:hover{color:silver;background-color:transparent;border:0;box-shadow:0 0 0}.vakata-context li>a>i{text-decoration:none;display:inline-block;width:2.4em;height:2.4em;background:0 0;margin:0 0 0 -2em;vertical-align:top;text-align:center;line-height:2.4em}.vakata-context li>a>i:empty{width:2.4em;line-height:2.4em}.vakata-context li>a .vakata-contextmenu-sep{display:inline-block;width:1px;height:2.4em;background:#fff;margin:0 .5em 0 0;border-left:1px solid #e2e3e3}.vakata-context .vakata-contextmenu-shortcut{font-size:.8em;color:silver;opacity:.5;display:none}.vakata-context-rtl ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context-rtl li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7);background-position:left center;background-repeat:no-repeat}.vakata-context-rtl .vakata-context-separator>a{margin:0 2.4em 0 0;border-left:0;border-right:1px solid #e2e3e3}.vakata-context-rtl .vakata-context-left ul{right:auto;left:100%;margin-left:-4px;margin-right:auto}.vakata-context-rtl li>a>i{margin:0 -2em 0 0}.vakata-context-rtl li>a .vakata-contextmenu-sep{margin:0 0 0 .5em;border-left-color:#fff;background:#e2e3e3}#jstree-marker{position:absolute;top:0;left:0;margin:0;padding:0;border-right:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid;width:0;height:0;font-size:0;line-height:0}#jstree-dnd{line-height:16px;margin:0;padding:4px}#jstree-dnd .jstree-icon,#jstree-dnd .jstree-copy{display:inline-block;text-decoration:none;margin:0 2px 0 0;padding:0;width:16px;height:16px}#jstree-dnd .jstree-ok{background:green}#jstree-dnd .jstree-er{background:red}#jstree-dnd .jstree-copy{margin:0 2px}.jstree-default .jstree-node,.jstree-default .jstree-icon{background-repeat:no-repeat;background-color:transparent}.jstree-default .jstree-anchor,.jstree-default .jstree-wholerow{transition:background-color .15s,box-shadow .15s}.jstree-default .jstree-hovered{background:#e7f4f9;border-radius:2px;box-shadow:inset 0 0 1px #ccc}.jstree-default .jstree-clicked{background:#beebff;border-radius:2px;box-shadow:inset 0 0 1px #999}.jstree-default .jstree-no-icons .jstree-anchor>.jstree-themeicon{display:none}.jstree-default .jstree-disabled{background:0 0;color:#666}.jstree-default .jstree-disabled.jstree-hovered{background:0 0;box-shadow:none}.jstree-default .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default .jstree-disabled>.jstree-icon{opacity:.8;filter:url("data:image/svg+xml;utf8,#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default .jstree-search{font-style:italic;color:#8b0000;font-weight:700}.jstree-default .jstree-no-checkboxes .jstree-checkbox{display:none!important}.jstree-default.jstree-checkbox-no-clicked .jstree-clicked{background:0 0;box-shadow:none}.jstree-default.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered{background:#e7f4f9}.jstree-default.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked{background:0 0}.jstree-default.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered{background:#e7f4f9}#jstree-dnd.jstree-default .jstree-ok,#jstree-dnd.jstree-default .jstree-er{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default i{background:0 0;width:16px;height:16px}#jstree-dnd.jstree-default .jstree-ok{background-position:-9px -71px}#jstree-dnd.jstree-default .jstree-er{background-position:-39px -71px}.jstree-default>.jstree-striped{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==) left top repeat}.jstree-default>.jstree-wholerow-ul .jstree-hovered,.jstree-default>.jstree-wholerow-ul .jstree-clicked{background:0 0;box-shadow:none;border-radius:0}.jstree-default .jstree-wholerow{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.jstree-default .jstree-wholerow-hovered{background:#e7f4f9}.jstree-default .jstree-wholerow-clicked{background:#beebff;background:-moz-linear-gradient(top,#beebff 0,#a8e4ff 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#beebff),color-stop(100%,#a8e4ff));background:-webkit-linear-gradient(top,#beebff 0,#a8e4ff 100%);background:-o-linear-gradient(top,#beebff 0,#a8e4ff 100%);background:-ms-linear-gradient(top,#beebff 0,#a8e4ff 100%);background:linear-gradient(to bottom,#beebff 0,#a8e4ff 100%)}.jstree-default .jstree-node{min-height:24px;line-height:24px;margin-left:24px;min-width:24px}.jstree-default .jstree-anchor{line-height:24px;height:24px}.jstree-default .jstree-icon{width:24px;height:24px;line-height:24px}.jstree-default .jstree-icon:empty{width:24px;height:24px;line-height:24px}.jstree-default.jstree-rtl .jstree-node{margin-right:24px}.jstree-default .jstree-wholerow{height:24px}.jstree-default .jstree-node,.jstree-default .jstree-icon{background-image:url(32px.png)}.jstree-default .jstree-node{background-position:-292px -4px;background-repeat:repeat-y}.jstree-default .jstree-last{background:0 0}.jstree-default .jstree-open>.jstree-ocl{background-position:-132px -4px}.jstree-default .jstree-closed>.jstree-ocl{background-position:-100px -4px}.jstree-default .jstree-leaf>.jstree-ocl{background-position:-68px -4px}.jstree-default .jstree-anchor>.jstree-themeicon{background-position:-260px -4px}.jstree-default>.jstree-no-dots .jstree-node,.jstree-default>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -4px}.jstree-default>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -4px}.jstree-default .jstree-disabled{background:0 0}.jstree-default .jstree-disabled.jstree-hovered{background:0 0}.jstree-default .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default .jstree-checkbox{background-position:-164px -4px}.jstree-default .jstree-checkbox:hover{background-position:-164px -36px}.jstree-default .jstree-clicked>.jstree-checkbox{background-position:-228px -4px}.jstree-default .jstree-clicked>.jstree-checkbox:hover{background-position:-228px -36px}.jstree-default .jstree-anchor>.jstree-undetermined{background-position:-196px -4px}.jstree-default .jstree-anchor>.jstree-undetermined:hover{background-position:-196px -36px}.jstree-default>.jstree-striped{background-size:auto 48px}.jstree-default.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default.jstree-rtl .jstree-last{background:0 0}.jstree-default.jstree-rtl .jstree-open>.jstree-ocl{background-position:-132px -36px}.jstree-default.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-100px -36px}.jstree-default.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-68px -36px}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -36px}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -36px}.jstree-default .jstree-themeicon-custom{background-color:transparent;background-image:none}.jstree-default>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==)}.jstree-default.jstree-rtl .jstree-last{background:0 0}.jstree-default-small .jstree-node{min-height:18px;line-height:18px;margin-left:18px;min-width:18px}.jstree-default-small .jstree-anchor{line-height:18px;height:18px}.jstree-default-small .jstree-icon{width:18px;height:18px;line-height:18px}.jstree-default-small .jstree-icon:empty{width:18px;height:18px;line-height:18px}.jstree-default-small.jstree-rtl .jstree-node{margin-right:18px}.jstree-default-small .jstree-wholerow{height:18px}.jstree-default-small .jstree-node,.jstree-default-small .jstree-icon{background-image:url(32px.png)}.jstree-default-small .jstree-node{background-position:-295px -7px;background-repeat:repeat-y}.jstree-default-small .jstree-last{background:0 0}.jstree-default-small .jstree-open>.jstree-ocl{background-position:-135px -7px}.jstree-default-small .jstree-closed>.jstree-ocl{background-position:-103px -7px}.jstree-default-small .jstree-leaf>.jstree-ocl{background-position:-71px -7px}.jstree-default-small .jstree-anchor>.jstree-themeicon{background-position:-263px -7px}.jstree-default-small>.jstree-no-dots .jstree-node,.jstree-default-small>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-small>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -7px}.jstree-default-small>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -7px}.jstree-default-small .jstree-disabled{background:0 0}.jstree-default-small .jstree-disabled.jstree-hovered{background:0 0}.jstree-default-small .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-small .jstree-checkbox{background-position:-167px -7px}.jstree-default-small .jstree-checkbox:hover{background-position:-167px -39px}.jstree-default-small .jstree-clicked>.jstree-checkbox{background-position:-231px -7px}.jstree-default-small .jstree-clicked>.jstree-checkbox:hover{background-position:-231px -39px}.jstree-default-small .jstree-anchor>.jstree-undetermined{background-position:-199px -7px}.jstree-default-small .jstree-anchor>.jstree-undetermined:hover{background-position:-199px -39px}.jstree-default-small>.jstree-striped{background-size:auto 36px}.jstree-default-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default-small.jstree-rtl .jstree-last{background:0 0}.jstree-default-small.jstree-rtl .jstree-open>.jstree-ocl{background-position:-135px -39px}.jstree-default-small.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-103px -39px}.jstree-default-small.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-71px -39px}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -39px}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -39px}.jstree-default-small .jstree-themeicon-custom{background-color:transparent;background-image:none}.jstree-default-small>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==)}.jstree-default-small.jstree-rtl .jstree-last{background:0 0}.jstree-default-large .jstree-node{min-height:32px;line-height:32px;margin-left:32px;min-width:32px}.jstree-default-large .jstree-anchor{line-height:32px;height:32px}.jstree-default-large .jstree-icon{width:32px;height:32px;line-height:32px}.jstree-default-large .jstree-icon:empty{width:32px;height:32px;line-height:32px}.jstree-default-large.jstree-rtl .jstree-node{margin-right:32px}.jstree-default-large .jstree-wholerow{height:32px}.jstree-default-large .jstree-node,.jstree-default-large .jstree-icon{background-image:url(32px.png)}.jstree-default-large .jstree-node{background-position:-288px 0;background-repeat:repeat-y}.jstree-default-large .jstree-last{background:0 0}.jstree-default-large .jstree-open>.jstree-ocl{background-position:-128px 0}.jstree-default-large .jstree-closed>.jstree-ocl{background-position:-96px 0}.jstree-default-large .jstree-leaf>.jstree-ocl{background-position:-64px 0}.jstree-default-large .jstree-anchor>.jstree-themeicon{background-position:-256px 0}.jstree-default-large>.jstree-no-dots .jstree-node,.jstree-default-large>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-large>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px 0}.jstree-default-large>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 0}.jstree-default-large .jstree-disabled{background:0 0}.jstree-default-large .jstree-disabled.jstree-hovered{background:0 0}.jstree-default-large .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-large .jstree-checkbox{background-position:-160px 0}.jstree-default-large .jstree-checkbox:hover{background-position:-160px -32px}.jstree-default-large .jstree-clicked>.jstree-checkbox{background-position:-224px 0}.jstree-default-large .jstree-clicked>.jstree-checkbox:hover{background-position:-224px -32px}.jstree-default-large .jstree-anchor>.jstree-undetermined{background-position:-192px 0}.jstree-default-large .jstree-anchor>.jstree-undetermined:hover{background-position:-192px -32px}.jstree-default-large>.jstree-striped{background-size:auto 64px}.jstree-default-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default-large.jstree-rtl .jstree-last{background:0 0}.jstree-default-large.jstree-rtl .jstree-open>.jstree-ocl{background-position:-128px -32px}.jstree-default-large.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-96px -32px}.jstree-default-large.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-64px -32px}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px -32px}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 -32px}.jstree-default-large .jstree-themeicon-custom{background-color:transparent;background-image:none}.jstree-default-large>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==)}.jstree-default-large.jstree-rtl .jstree-last{background:0 0}@media (max-width:768px){.jstree-default-responsive .jstree-icon{background-image:url(40px.png)}.jstree-default-responsive .jstree-node,.jstree-default-responsive .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-responsive .jstree-node{min-height:40px;line-height:40px;margin-left:40px;min-width:40px;white-space:nowrap}.jstree-default-responsive .jstree-anchor{line-height:40px;height:40px}.jstree-default-responsive .jstree-icon,.jstree-default-responsive .jstree-icon:empty{width:40px;height:40px;line-height:40px}.jstree-default-responsive>.jstree-container-ul>.jstree-node{margin-left:0}.jstree-default-responsive.jstree-rtl .jstree-node{margin-left:0;margin-right:40px}.jstree-default-responsive.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-default-responsive .jstree-ocl,.jstree-default-responsive .jstree-themeicon,.jstree-default-responsive .jstree-checkbox{background-size:120px 200px}.jstree-default-responsive .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-responsive .jstree-open>.jstree-ocl{background-position:0 0!important}.jstree-default-responsive .jstree-closed>.jstree-ocl{background-position:0 -40px!important}.jstree-default-responsive.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-40px 0!important}.jstree-default-responsive .jstree-anchor>.jstree-themeicon{background-position:-40px -40px}.jstree-default-responsive .jstree-checkbox,.jstree-default-responsive .jstree-checkbox:hover{background-position:-40px -80px}.jstree-default-responsive .jstree-clicked>.jstree-checkbox,.jstree-default-responsive .jstree-clicked>.jstree-checkbox:hover{background-position:0 -80px}.jstree-default-responsive .jstree-anchor>.jstree-undetermined,.jstree-default-responsive .jstree-anchor>.jstree-undetermined:hover{background-position:0 -120px}.jstree-default-responsive .jstree-anchor{font-weight:700;font-size:1.1em;text-shadow:1px 1px #fff}.jstree-default-responsive>.jstree-striped{background:0 0}.jstree-default-responsive .jstree-wholerow{border-top:1px solid rgba(255,255,255,.7);border-bottom:1px solid rgba(64,64,64,.2);background:#ebebeb;height:40px}.jstree-default-responsive .jstree-wholerow-hovered{background:#e7f4f9}.jstree-default-responsive .jstree-wholerow-clicked{background:#beebff}.jstree-default-responsive .jstree-children .jstree-last>.jstree-wholerow{box-shadow:inset 0 -6px 3px -5px #666}.jstree-default-responsive .jstree-children .jstree-open>.jstree-wholerow{box-shadow:inset 0 6px 3px -5px #666;border-top:0}.jstree-default-responsive .jstree-children .jstree-open+.jstree-open{box-shadow:none}.jstree-default-responsive .jstree-node,.jstree-default-responsive .jstree-icon,.jstree-default-responsive .jstree-node>.jstree-ocl,.jstree-default-responsive .jstree-themeicon,.jstree-default-responsive .jstree-checkbox{background-image:url(40px.png);background-size:120px 200px}.jstree-default-responsive .jstree-node{background-position:-80px 0;background-repeat:repeat-y}.jstree-default-responsive .jstree-last{background:0 0}.jstree-default-responsive .jstree-leaf>.jstree-ocl{background-position:-40px -120px}.jstree-default-responsive .jstree-last>.jstree-ocl{background-position:-40px -160px}.jstree-default-responsive .jstree-themeicon-custom{background-color:transparent;background-image:none}}.jstree-default>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0} \ No newline at end of file diff --git a/admin/member/images/themes/default/throbber.gif b/admin/member/images/themes/default/throbber.gif new file mode 100644 index 0000000000000000000000000000000000000000..1b5b2fde42f8ea14e6981339196a9d62b681d79e GIT binary patch literal 1720 zcmZ|OYfMvT7zgm4p2O+ea@rnBg#)OxTPX)YQxLES+gfgxVz~&+f}$;m6s%Hi3W%nq zP@z^qrV}=TNF%FL8K5q@MN>cp#S0pVI*qHSli{|&j8i`-D~lhy5AU}p`Tz2N-e*-( zqBu&8Q*g>F3T19?Zf0i2Y&JU_j>N>onwlC4g`!j{1p>jzlP51;yvXHpJ32ZL1c{7{ z)MzyPIro%=%#1i`T0+<|5ezw}`5%1a$_msK1)F#~iYhcbb+NiiTcX~ytZ3Wj5(@tv zLT5OqLY&VTiBl*@DK5jOqAQC<V}_H8&J8*d!6F|8^P+>r!@8gG==_FR|TOFO5N ztmi!uPli+Ln$x?H-gK%V=cf&)%tK3Ubl`;)j){YK#AZm_($yDbHN+iIVb4-MA(|Tn z%Y=0Su-m75IE?%N1|!SEl|tuKXsXZNj2Z=vp;+=jlJSZD2EODW0H`sM#)b0zgDU0)5!Grr5zO1 zNgN^!L7)EBFUC+Zhm%Mr7yC91@!CieHdPd#!o7Jn^!!TMrU0vgH)|h-!|2wozJKmj z`G&1Z^{+00Fi|SEx@=o?UTI)xo@>T@7i7MZAqTYCMc0JP{oZJEdWye2L~bM45otrq zk@}$q6%b*2<$_YGZVC^6PBqU&pG6rtOM!WN;+E;i3EB*=+K0j60WC&J{7x}V=Ak(w<1X>er- zV`_bHI~Y%5hQkS?_Lf?1C-Yh;suT(z!ZdS6NOH8>FGetNtnE-ngIxI9OKM9M!nq|ao z@ByV)WU%+EiuxlBZ=#rs_ZnY%+O^bXr2P8_g2l~7Z8221w?Uyx%!zc@?f!tWxz6{`xAWPUyeq1Vbvuj7m$3Dh(PTY04bw^_A zwRr|LuoC34N#A1;?zXdaId|wW$kzq2e~Uqdrq=@A0^DlGO4UM zzCO9@&t7@ohLX-t)ftJ| z)q;&?w?;l@^4Pc`;x3vPJ8(itFdKg3;$nap8V7O~;L775>pjUjnIyS=0%4f;&$i;^ q^<`2=x-x(uk2YUU2h;2jemskO_4rHker(fp%-3)*J{?==X zS$i2-JrlZ#-@kp&)RVJh5aknOc>MYt!^2l+82Gt38H^O|z;fv7Sp0w#NiVJ>x|K4t_ZkMT}WWezD;{%3scP=4p0YYw0VFpW0dj@u9&df`9 zPcXn@1MGr~ZksekDfOAAI+hGiUSDOv2js={84jM?!|?3&gSZ)`M;3!!@crwzOchxT zhN};bFc1Ql?jK;#QZQh+``{WVQNaz+ef;(+!EJ?|6K#=F@T2wFo}MA{OZ0C z6BAMT89sda1l9vL02qMNAKiUgEiA>uz{tdiSM$Gr{~6vr`vTU35{>rJ{JqdD%t^oj lp!7Wb;L?v}APzu)0RYtF'用户资料管理' + +); - $this->_table = 'market_class'; - $this->_pk = 'classid'; - - parent::__construct(); - } -} ?> diff --git a/admin/member/profileset.php b/admin/member/profileset.php new file mode 100644 index 0000000..15bb94f --- /dev/null +++ b/admin/member/profileset.php @@ -0,0 +1,167 @@ + '/^((\\(?\\d{3,4}\\)?)|(\\d{3,4}-)?)\\d{7,8}$/', + 'mobile' => '/^(\+)?(86)?0?1\\d{10}$/', + 'zipcode' => '/^\\d{5,6}$/', + 'revenue' => '/^\\d+$/', + 'height' => '/^\\d{1,3}$/', + 'weight' => '/^\\d{1,3}$/', + 'qq' => '/^[1-9]*[1-9][0-9]*$/' +); +$fieldid = $_GET['fieldid'] ? $_GET['fieldid'] : ''; +$do=$_GET['do'] ? $_GET['do'] : ''; +if($do=='delete'){ + C::t('user_profile_setting')->delete_by_fieldid($fieldid); + require_once libfile('function/cache'); + updatecache(array('profilesetting', 'fields_required', 'fields_optional', 'fields_register', 'setting')); + showmessage('data_del_success',dreferer(),array(),array('alert'=>'right')); + +}elseif($fieldid) { + $_G['setting']['privacy'] = !empty($_G['setting']['privacy']) ? $_G['setting']['privacy'] : array(); + $_G['setting']['privacy'] = is_array($_G['setting']['privacy']) ? $_G['setting']['privacy'] : dunserialize($_G['setting']['privacy']); + $field = C::t('user_profile_setting')->fetch($fieldid); + $fixedfields1 = array('uid', 'constellation', 'zodiac'); + $fixedfields2 = array('gender', 'birthday','department'); + $field['isfixed1'] = in_array($fieldid, $fixedfields1); + $field['isfixed2'] = $field['isfixed1'] || in_array($fieldid, $fixedfields2); + //$field['customable'] = preg_match('/^field[1-8]$/i', $fieldid); + $field['validate'] = $field['validate'] ? $field['validate'] : ($profilevalidate[$fieldid]?$profilevalidate[$fieldid]:''); + if(!submitcheck('editsubmit')) { + + $checkLanguage = checkLanguage(); + include template('profileset_edit'); + exit(); + } else { + + $setarr = array( + 'invisible' => intval($_POST['invisible']), + 'showincard' => intval($_POST['showincard']), + 'showinregister' => intval($_POST['showinregister']), + 'allowsearch' => intval($_POST['allowsearch']), + 'displayorder' => intval($_POST['displayorder']) + ); + if(!$field['isfixed2']) { + $_POST['title'] = dhtmlspecialchars(trim($_POST['title'])); + if(empty($_POST['title'])) { + showmessage('data_name_empty', ADMINSCRIPT.'?mod=member&op=profileset&fieldid='.$fieldid, array(),array('alert'=>'error')); + } + $setarr['title'] = $_POST['title']; + $setarr['description'] = dhtmlspecialchars(trim($_POST['description'])); + } + if(!$field['isfixed1']) { + $setarr['required'] = intval($_POST['required']); + $setarr['available'] = intval($_POST['available']); + $setarr['unchangeable'] = intval($_POST['unchangeable']); + $setarr['needverify'] = intval($_POST['needverify']); + } + if(!$field['isfixed2']) { + $setarr['formtype'] = $fieldid == 'realname' ? 'text' : strtolower(trim($_POST['formtype'])); + $setarr['size'] = intval($_POST['size']); + if($_POST['choices']) { + $_POST['choices'] = trim($_POST['choices']); + $ops = explode("\n", $_POST['choices']); + $parts = array(); + foreach ($ops as $op) { + $parts[] = dhtmlspecialchars(trim($op)); + } + $_POST['choices'] = implode("\n", $parts); + } + $setarr['choices'] = $_POST['choices']; + if($_POST['validate'] && $_POST['validate'] != $profilevalidate[$fieldid]) { + $setarr['validate'] = $_POST['validate']; + } elseif(empty($_POST['validate'])) { + $setarr['validate'] = ''; + } + } + //print_r($setarr);exit($fieldid); + C::t('user_profile_setting')->update($fieldid, $setarr); + if($_GET['fieldid'] == 'birthday') { + C::t('user_profile_setting')->update('birthmonth', $setarr); + C::t('user_profile_setting')->update('birthyear', $setarr); + } + + + require_once libfile('function/cache'); + if(!isset($_G['setting']['privacy']['profile']) || $_G['setting']['privacy']['profile'][$fieldid] != $_POST['privacy']) { + $_G['setting']['privacy']['profile'][$fieldid] = intval($_POST['privacy']); + C::t('setting')->update('privacy', $_G['setting']['privacy']); + } + updatecache(array('profilesetting','fields_required', 'fields_optional', 'fields_register', 'setting')); + + showmessage('subscriber_data_edit_success', ADMINSCRIPT.'?mod=member&op=profileset', array(),array('alert'=>'right')); + } +}else { + + if(!submitcheck('ordersubmit')) { + $list = array(); + foreach(C::t('user_profile_setting')->range() as $fieldid => $value) { + $list[$fieldid] = array( + 'title'=>$value['title'], + 'displayorder'=>$value['displayorder'], + 'available'=>$value['available'], + 'invisible'=>$value['invisible'], + 'showincard'=>$value['showincard'], + 'showinregister'=>$value['showinregister'], + 'customable'=>$value['customable']); + } + + unset($list['birthyear']); + unset($list['birthmonth']); + + $fieldid=''; + + } else { + foreach($_GET['displayorder'] as $fieldid => $value) { + $setarr = array( + 'displayorder' => intval($value), + 'invisible' => intval($_GET['invisible'][$fieldid]) ? 0 : 1, + 'available' => intval($_GET['available'][$fieldid]), + 'showincard' => intval($_GET['showincard'][$fieldid]), + 'showinregister' => intval($_GET['showinregister'][$fieldid]), + ); + C::t('user_profile_setting')->update($fieldid, $setarr); + + if($fieldid == 'birthday') { + C::t('user_profile_setting')->update('birthmonth', $setarr); + C::t('user_profile_setting')->update('birthyear', $setarr); + + } + } + foreach($_GET['add']['displayorder'] as $key => $value) { + $setarr = array( + 'displayorder' => intval($value), + 'invisible' => intval($_GET['add']['invisible'][$key]) ? 0 : 1, + 'available' => intval($_GET['add']['available'][$key]), + 'showincard' => intval($_GET['add']['showincard'][$key]), + 'showinregister' => intval($_GET['add']['showinregister'][$key]), + 'title'=>dhtmlspecialchars($_GET['add']['title'][$key]), + 'fieldid'=>dhtmlspecialchars($_GET['add']['fieldid'][$key]) + ); + if(empty($setarr['title']) || empty($setarr['fieldid'])) continue; + if(DB::result_first("select COUNT(*) from %t where fieldid=%s",array('user_profile_setting',$settarr['fieldid']))){ + continue; + } + C::t('user_profile_setting')->insert($setarr); + + } + require_once libfile('function/cache'); + updatecache(array('profilesetting', 'fields_required', 'fields_optional', 'fields_register', 'setting')); + showmessage('subscriber_data_item_edit_success',dreferer(),array(),array('alert'=>'right')); + } +} + + +include template('profileset'); + +?> diff --git a/admin/member/scripts/orguser.js b/admin/member/scripts/orguser.js new file mode 100644 index 0000000..2a48dde --- /dev/null +++ b/admin/member/scripts/orguser.js @@ -0,0 +1,173 @@ +/* + * @copyright Leyun internet Technology(Shanghai)Co.,Ltd + * @license http://www.dzzoffice.com/licenses/license.txt + * @package DzzOffice + * @link http://www.dzzoffice.com + * @author zyx(zyx@dzz.cc) + */ + + +function delDepart(obj){ + jQuery(obj).parent().parent().remove(); +} + +var tpml_index=0; +function addorgsel(){ + jQuery('#selorg_container').append(' '); + tpml_index++; +} + +function selJob(obj){ + var jobid=jQuery(obj).attr('_jobid'); + var li=jQuery(obj).parent().parent().parent(); + var html=obj.innerHTML; + li.find('.dropdown-toggle').attr('_jobid',jobid).find('span').html(html); + li.find('input').val(jobid); +} +function selDepart(obj){ + var orgid=jQuery(obj).val(); + var li=jQuery(obj).parent(); + li.parent().find('.job .dropdown-menu').load('admin.php?mod=member&op=ajax&do=getjobs&orgid='+orgid,function(html){ + + if(li.parent().find('.job .dropdown-menu li').length>1) li.parent().find('.job .dropdown-toggle').trigger('click'); + }); + li.parent().find('.job .dropdown-toggle').attr('_jobid',0).find('span').html(__lang.none); + li.parent().find('.job input').val('0'); +} +function errormessage(id, msg,passlevel) { + if($(id)) { + msg = !msg ? '' : msg; + if(msg == 'succeed') { + msg = ''; + jQuery('#suc_' + id).addClass('p_right'); + } else if(msg !== '') { + jQuery('#suc_' + id).removeClass('p_right'); + } + jQuery('#chk_' + id).find('kbd').html(msg); + if(msg && !passlevel) jQuery('#'+id).parent().parent().addClass('has-warning'); + else jQuery('#'+id).parent().parent().removeClass('has-warning'); + } +} + +function checkemail(id) { + errormessage(id); + var email = trim($(id).value); + if($(id).parentNode.className.match(/ p_right/) && (email == '' || email == lastemail ) || email == lastemail) { + return; + } + if(email.match(/<|"/ig)) { + errormessage(id, __lang.Email_sensitivity); + return; + } + + var x = new Ajax(); + jQuery('#suc_' + id).removeClass('p_right'); + x.get('user.php?mod=ajax&inajax=yes&infloat=register&handlekey=register&ajaxmenu=1&action=checkemail&email=' + email, function(s) { + s=s.replace(//i,''); + errormessage(id, s); + }); +} +function checknick(id) { + errormessage(id); + var username = trim($(id).value); + if($('chk_' + id).parentNode.className.match(/ p_right/) && (username == '' || username == lastusername) || username == lastusername) { + return; + } + if(username.match(/<|"/ig)) { + errormessage(id, __lang.profile_nickname_illegal); + return; + } + if(username){ + var unlen = username.replace(/[^\x00-\xff]/g, "**").length; + if(unlen < 3 || unlen > 30) { + errormessage(id, unlen < 3 ? __lang.username_character : __lang.username_character); + return; + } + var x = new Ajax(); + jQuery('#suc_' + id).removeClass('p_right'); + x.get('user.php?mod=ajax&inajax=yes&infloat=register&handlekey=register&ajaxmenu=1&action=checkusername&username=' + encodeURI(username), function(s) { + s=s.replace(//i,''); + errormessage(id, s); + }); + } +} +function checkPwdComplexity(firstObj, secondObj, modify) { + modifypwd = modify || false; + firstObj.onblur = function () { + if(firstObj.value == '') { + var pwmsg = !modifypwd ? __lang.register_password_tips : __lang.js_change_password; + if(pwlength > 0) { + pwmsg += ','+__lang.register_password_length_tips1+pwlength+__lang.register_password_length_tips2; + } + if(!modifypwd) errormessage(firstObj.id, pwmsg); + }else{ + errormessage(firstObj.id, !modifypwd ? 'succeed' : __lang.js_change_password); + } + checkpassword(firstObj.id, secondObj.id); + }; + firstObj.onkeyup = function () { + if(pwlength == 0 || $(firstObj.id).value.length >= pwlength) { + var passlevels = new Array('',__lang.weak,__lang.center,_lang.strong); + var passlevel = checkstrongpw(firstObj.id); + + errormessage(firstObj.id, ''+__lang.intension+':'+passlevels[passlevel]+'','passlevel'); + } + }; + secondObj.onblur = function () { + if(secondObj.value == '') { + if(!modifypwd) errormessage(secondObj.id, !modifypwd ?'succeed' :__lang.register_repassword_tips); + } + checkpassword(firstObj.id, secondObj.id); + }; +} + +function checkpassword(id1, id2) { + if(!$(id1).value && !$(id2).value) { + //return; + } + if(pwlength > 0) { + if($(id1).value.length < pwlength) { + errormessage(id1, __lang.password_too_short+pwlength+__lang.register_password_length_tips2); + return; + } + } + if(strongpw) { + var strongpw_error = false, j = 0; + var strongpw_str = new Array(); + for(var i in strongpw) { + if(strongpw[i] === 1 && !$(id1).value.match(/\d+/g)) { + strongpw_error = true; + strongpw_str[j] = __lang.strongpw_1; + j++; + } + if(strongpw[i] === 2 && !$(id1).value.match(/[a-z]+/g)) { + strongpw_error = true; + strongpw_str[j] = __lang.strongpw_2; + j++; + } + if(strongpw[i] === 3 && !$(id1).value.match(/[A-Z]+/g)) { + strongpw_error = true; + strongpw_str[j] = __lang.strongpw_3; + j++; + } + if(strongpw[i] === 4 && !$(id1).value.match(/[^A-Za-z0-9]+/g)) { + strongpw_error = true; + strongpw_str[j] = __lang.strongpw_4; + j++; + } + } + if(strongpw_error) { + errormessage(id1, __lang.password_weak +strongpw_str.join(',')); + return; + } + } + errormessage(id2); + if($(id1).value != $(id2).value) { + errormessage(id2, __lang.profile_passwd_notmatch); + } else { + if(modifypwd) errormessage(id1, 'succeed' ); + errormessage(id2, 'succeed' ); + + } +} + diff --git a/admin/member/template/left.htm b/admin/member/template/left.htm new file mode 100644 index 0000000..7331dc2 --- /dev/null +++ b/admin/member/template/left.htm @@ -0,0 +1,30 @@ + \ No newline at end of file diff --git a/admin/member/template/profile.htm b/admin/member/template/profile.htm new file mode 100644 index 0000000..50e8c78 --- /dev/null +++ b/admin/member/template/profile.htm @@ -0,0 +1,99 @@ + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + +
    + + +
    +
    +
    + + + + +
    + +
    +

    $space[username]

    +
    +
    + + +
    + +
    + $htmls[$key] +
    +
    + + +
    + +
    + +
    +
    +
    +
    +
    +
    + + + + + \ No newline at end of file diff --git a/admin/member/template/profileset.htm b/admin/member/template/profileset.htm new file mode 100644 index 0000000..4f439fa --- /dev/null +++ b/admin/member/template/profileset.htm @@ -0,0 +1,176 @@ + + + + + + + +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + +
    + + + + + + + + + + + + + +
    {lang sort}{lang identifier}{lang name}{lang enable}{lang data_show}{lang business_card_show}{lang registration_page_display}{lang operation}
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    $fieldid$value[title] checked="checked"value="1">checked="checked"value="1">checked="checked"value="1">checked="checked"value="1"> + +      + + +
    + +
    +
    +
    +
    +
    + + + + \ No newline at end of file diff --git a/admin/member/template/profileset_edit.htm b/admin/member/template/profileset_edit.htm new file mode 100644 index 0000000..b5172b9 --- /dev/null +++ b/admin/member/template/profileset_edit.htm @@ -0,0 +1,252 @@ + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    + + + + + +
    + + disabled="disabled" + /> +
    +
    + + disabled="disabled" + /> +
    + + +
    + +
    + + + + + + + + + +
    +
    +
    style="display:none"> + + + {lang profileset_edit_delete} +
    +
    style="display:none"> + + + {lang profileset_edit_value}:
    {lang beijing}
    {lang shanghai}
    +
    +
    style="display:none"> + + + {lang profileset_edit_edit} +
    + + +
    + +
    + + +
    +
    + + +
    + +
    + + +
    +
    +
    + +
    + + +
    +
    +
    + +
    + + +
    +
    +
    + +
    + + +
    + {lang profileset_edit_hide} +
    + +
    + +
    + + + + + +
    + +
    +
    + +
    + + +
    +
    +
    + +
    + + +
    +
    +
    + +
    + + +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    +
    + + + + + + \ No newline at end of file diff --git a/admin/member/template/verify.htm b/admin/member/template/verify.htm new file mode 100644 index 0000000..22f79a7 --- /dev/null +++ b/admin/member/template/verify.htm @@ -0,0 +1,294 @@ + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    {lang user_name}*UID:
    {lang members_verify_dateline}:      ~      +
    {lang result_ranking}: + + + + + + + + + + +
      +    *{lang fuzzy_search}
    +
    + +
    +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {lang username}{lang members_verify_dateline}{lang members_verify_info}
    $value[username]$value[dateline]$value[fieldstr]
    + +   + {lang all_validate}   + {lang select_all_refuse}   + {lang cancel_select} + $multi +
    {lang username}{lang members_verify_info}
    $value[opstr]$value[username]$value[fieldstr]
    +   + {lang select_all_export}   + {lang select_all_refuse}   + {lang all_export} + $multi +
    +
    +
    +
    +
    + + + + + + \ No newline at end of file diff --git a/admin/member/template/verifyset.htm b/admin/member/template/verifyset.htm new file mode 100644 index 0000000..f1ff5b3 --- /dev/null +++ b/admin/member/template/verifyset.htm @@ -0,0 +1,117 @@ + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
      + {lang verifyset_members_verify_text} +
    +
    +
    +
    + + + + + + + + + + + {eval $value=$_G['setting']['verify'][$i]} + + + + + + + + + + + +
    {lang enable}{lang authentication_code}{lang members_verify_title}{lang edit}
    checked="checked"value="1" />verify{$i} + + $value[title] + + +   + + + + + +
    + +
    + +
    +
    +
    +
    + + + + \ No newline at end of file diff --git a/admin/member/template/verifyset_edit.htm b/admin/member/template/verifyset_edit.htm new file mode 100644 index 0000000..2122629 --- /dev/null +++ b/admin/member/template/verifyset_edit.htm @@ -0,0 +1,187 @@ + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    + + + +
    +
    {lang members_verify_title}:
    +
    + disabled="disabled"> + +
    +
    +
    +
    {lang members_verify_synopsis}:
    +
    + + {lang verifyset_verify_synopsis_text} +
    +
    +
    +
    {lang members_verify_enable}:
    +
    + + +
    +
    +
    +
    {lang members_verify_icon}:
    +
    + + +
    +
    style="display:none"> +
    +
    {lang members_unverify_icon}:
    +
    + + + + + +
    +
    + + +
    + +
    +
    $unverifyiconhtml
    +
    +
    +
    +
    +
    {lang members_verify_icon}:
    +
    + + + + + +
    +
    + + +
    + +
    +
    $verificonhtml
    +
    + +
    +
    +
    +
    +
    +
    {lang choosable_data}:
    +
    + + + +
    +
    + {lang verifyset_choosable_data_text} +
    +
    +
    +
    {lang members_verify_group}:
    +
    + + {lang verifyset_verify_group_text} +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    + + + + \ No newline at end of file diff --git a/admin/member/verify.php b/admin/member/verify.php new file mode 100644 index 0000000..28192bc --- /dev/null +++ b/admin/member/verify.php @@ -0,0 +1,350 @@ + 1); +$op=$_GET['op']; +//判断管理权限 +if ($vid) { + if ($vid == 1) { + if ($_G['member']['grid'] != 4 && $_G['adminid'] != 1) + showmessage('contact_administrator1'); + } else { + if ($_G['adminid'] != 1) + showmessage('contact_administrator2'); + } +} else { + if ($_G['member']['grid'] != 5 && $_G['adminid'] != 1) + showmessage('contact_administrator3'); +} +if ($anchor != 'pass') { + $_GET['verifytype'] = $vid; +} else { + $_GET['verify' . $vid] = 1; + $_GET['orderby'] = 'uid'; +} +if (!submitcheck('verifysubmit', true)) { + $navtitle = $vid ? $_G['setting']['verify'][$vid]['title'] : lang('members_verify_profile'); + + $thurl = ADMINSCRIPT . '?mod=member&op=verify&anchor=' . $anchor . '&vid=' . $vid; + if ($anchor == 'refusal') { + $_GET['flag'] = -1; + } elseif ($anchor == 'authstr') { + $_GET['flag'] = 0; + } + $intkeys = array('uid', 'verifytype', 'flag', 'verify1', 'verify2', 'verify3', 'verify4', 'verify5', 'verify6', 'verify7'); + $strkeys = array(); + $randkeys = array(); + $likekeys = array('username'); + $results = getwheres($intkeys, $strkeys, $randkeys, $likekeys, 'v.'); + foreach ($likekeys as $k) { + $_GET[$k] = dhtmlspecialchars($_GET[$k]); + } + $thurl .= '&' . implode('&', $results['urls']); + $wherearr = $results['wherearr']; + if ($_GET['dateline1']) { + $wherearr[] = "v.dateline >= '" . strtotime($_GET['dateline1']) . "'"; + $thurl .= '&dateline1=' . $_GET['dateline1']; + } + if ($_GET['dateline2']) { + $wherearr[] = "v.dateline <= '" . strtotime($_GET['dateline2']) . "'"; + $thurl .= '&dateline2=' . $_GET['dateline2']; + } + + $wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr); + + $orders = getorders(array('dateline', 'uid'), 'dateline', 'v.'); + $ordersql = $orders['sql']; + if ($orders['urls']) + $thurl .= '&' . implode('&', $orders['urls']); + $orderby = array($_GET['orderby'] => ' selected'); + $ordersc = array($_GET['ordersc'] => ' selected'); + + $orders = in_array($_G['orderby'], array('dateline', 'uid')) ? $_G['orderby'] : 'dateline'; + $ordersc = in_array(strtolower($_GET['ordersc']), array('asc', 'desc')) ? $_GET['ordersc'] : 'desc'; + + $perpage = empty($_GET['perpage']) ? 0 : intval($_GET['perpage']); + if (!in_array($perpage, array(10, 20, 50, 100))) + $perpage = 10; + $perpages = array($perpage => ' selected'); + $thurl .= '&perpage=' . $perpage; + + $page = empty($_GET['page']) ? 1 : intval($_GET['page']); + if ($page < 1) + $page = 1; + $start = ($page - 1) * $perpage; + + $multi = ''; + if ($anchor != 'pass') { + $count = C::t('user_verify_info') -> count_by_search($_GET['uid'], $vid, $_GET['flag'], $_GET['username'], strtotime($_GET['dateline1']), strtotime($_GET['dateline2'])); + } else { + $wheresql = (!empty($_GET['username']) ? str_replace('v.username', 'm.username', $wheresql) : $wheresql) . ' AND v.uid=m.uid '; + $count = C::t('user_verify') -> count_by_search($_GET['uid'], $vid, $_GET['username']); + } + if ($count) { + + if ($anchor != 'pass') { + $verifyusers = C::t('user_verify_info') -> fetch_all_search($_GET['uid'], $vid, $_GET['flag'], $_GET['username'], strtotime($_GET['dateline1']), strtotime($_GET['dateline2']), $orders, $start, $perpage, $ordersc); + } else { + $verifyusers = C::t('user_verify') -> fetch_all_search($_GET['uid'], $vid, $_GET['username'], 'v.uid', $start, $perpage, $ordersc); + $verifyuids = array_keys($verifyusers); + $profiles = C::t('user_profile1') -> fetch_all($verifyuids, false, 0); + } + $list = array(); + foreach ($verifyusers as $uid => $value) { + if ($anchor == 'pass') { + $value = array_merge($value, $profiles[$uid]); + } + $value['username'] = '

    ' . $value['username'] . '
    '; + if ($anchor != 'pass') { + $fields = $anchor != 'pass' ? dunserialize($value['field']) : $_G['setting']['verify'][$vid]['field']; + $value['verifytype'] = $value['verifytype'] ? $_G['setting']['verify'][$value['verifytype']]['title'] : lang('members_verify_profile'); + $fieldstr = ''; + $i = 0; + $fieldstr .= '' . ($anchor == 'authstr' ? '' : '') . ''; + $i++; + + foreach ($fields as $key => $field) { + if (in_array($key, array('constellation', 'zodiac', 'birthyear', 'birthmonth'))) { + continue; + } + if ($_G['cache']['profilesetting'][$key]['formtype'] == 'file') { + if ($field) { + $field = ''; + } else { + $field = lang('members_verify_pic_removed'); + } + } elseif (in_array($key, array('gender', 'birthday', 'department'))) { + + $field = profile_show($key, $fields); + } + $fieldstr .= '' . ($anchor == 'authstr' ? '' : '') . ''; + $i++; + } + $opstr = ""; + + if ($anchor == 'authstr') { + $opstr .= ""; + } elseif ($anchor == 'refusal') { + $opstr .= ""; + } + + $fieldstr .= "
    ' . lang('refuse') . '' . lang('members_verify_fieldid') . '' . lang('members_verify_newvalue') . '
    ' . $_G['cache']['profilesetting'][$key]['title'] . ':' . $field . '
    $opstr
    "; + $value['fieldstr'] = $fieldstr; + $value['dateline'] = dgmdate($value['dateline'], 'u'); + $list[$uid] = $value; + // = array($value['username'], $verifytype, dgmdate($value['dateline'], 'dt'), $fieldstr); + //showtablerow("id=\"mod_$value[vid]_row\" verifyid=\"$value[vid]\"", $cssarr, $valuearr); + } else { + $fields = $_G['setting']['verify'][$vid]['field']; + $value['verifytype'] = $vid ? $_G['setting']['verify'][$vid]['title'] : lang('members_verify_profile'); + + $fieldstr = ''; + $fieldstr .= ''; + + foreach ($fields as $key => $field) { + if (!in_array($key, array('constellation', 'zodiac', 'birthyear', 'birthmonth'))) { + if (in_array($key, array('gender', 'birthday', 'department'))) { + $value[$field] = profile_show($key, $value); + } + if ($_G['cache']['profilesetting'][$key]['formtype'] == 'file') { + if ($value[$field]) { + $value[$field] = ''; + } else { + $value[$field] = lang('members_verify_pic_removed'); + } + } + $fieldstr .= ''; + } + } + $fieldstr .= "
    ' . lang('members_verify_fieldid') . '' . lang('members_verify_newvalue') . '
    ' . $_G['cache']['profilesetting'][$key]['title'] . ':' . $value[$field] . '
    "; + $value['fieldstr'] = $fieldstr; + $opstr = "
    "; + $value['opstr'] = $opstr; + $value['dateline'] = dgmdate($value['dateline'], 'u'); + $list[$uid] = $value; + //showtablerow("id=\"mod_$value[uid]_row\"", $cssarr, $valuearr); + } + } + $multi = multi($count, $perpage, $page, $thurl, 'pull-right'); + } + +} else { + if ($anchor == 'pass') { + $verifyuids = array(); + + foreach ($_GET['verify'] as $uid => $type) { + if ($type == 'export') { + $verifyuids['export'][] = $uid; + } elseif ($type == 'refusal') { + $verifyuids['refusal'][] = $uid; + //发送通知 + $notevars = array('from_id' => 0, 'from_idtype' => '', 'author' => $_G['username'], 'authorid' => $_G['uid'], 'url' => 'user.php?mod=profile&vid=' . $vid, 'profile' => $fieldtitle, 'dataline' => dgmdate(TIMESTAMP), 'title' => $vid ? $_G['setting']['verify'][$vid]['title'] : lang('members_verify_profile'), 'reason' => $_GET['reason'][$value['vid']], ); + + $action = 'user_profile_pass_refusal'; + $type = 'user_profile_pass_refusal_' . $vid; + + dzz_notification::notification_add($uid, $type, $action, $notevars, 1); + } + } + if (is_array($verifyuids['refusal']) && !empty($verifyuids['refusal'])) { + C::t('user_verify') -> update($verifyuids['refusal'], array("verify$vid" => '0')); + if ($vid == 1) + C::t('user') -> update($uid, array('grid' => '0')); + } + if (is_array($verifyuids['export']) && !empty($verifyuids['export']) || empty($verifyuids['refusal'])) { + $uids = array(); + if (is_array($verifyuids['export']) && !empty($verifyuids['export'])) { + $uids = $verifyuids['export']; + } + $fields = $_G['setting']['verify'][$vid]['field']; + $fields = array_reverse($fields); + $fields['username'] = 'username'; + $fields = array_reverse($fields); + $title = $verifylist = ''; + $showtitle = true; + $verifyusers = C::t('user_verify') -> fetch_all_by_vid($vid, 1, $uids); + $verifyuids = array_keys($verifyusers); + $members = C::t('user') -> fetch_all($verifyuids, false, 0); + $profiles = C::t('user_profile1') -> fetch_all($verifyuids, false, 0); + foreach ($verifyusers as $uid => $value) { + $value = array_merge($value, $members[$uid], $profiles[$uid]); + $str = $common = ''; + foreach ($fields as $key => $field) { + if (in_array($key, array('constellation', 'zodiac', 'birthyear', 'birthmonth', 'birthprovince', 'birthdist', 'birthcommunity', 'resideprovince', 'residedist', 'residecommunity'))) { + continue; + } + if ($showtitle) { + $title .= $common . ($key == 'username' ? lang('username') : $_G['cache']['profilesetting'][$key]['title']); + } + if (in_array($key, array('gender', 'birthday', 'department'))) { + $value[$field] = profile_show($key, $value); + } + $str .= $common . $value[$field]; + $common = "\t"; + } + $verifylist .= $str . "\n"; + $showtitle = false; + } + $verifylist = $title . "\n" . $verifylist; + $filename = date('Ymd', TIMESTAMP) . '.xls'; + + define('FOOTERDISABLED', true); + ob_end_clean(); + header("Content-type:application/vnd.ms-excel"); + header('Content-Encoding: none'); + header('Content-Disposition: attachment; filename=' . $filename); + header('Pragma: no-cache'); + header('Expires: 0'); + if ($_G['charset'] != 'gbk') { + $verifylist = diconv($verifylist, $_G['charset'], 'GBK'); + } + echo $verifylist; + exit(); + } else { + showmessage('members_verify_succeed', ADMINSCRIPT . '?mod=member&op=verify&vid=' . $vid . '&anchor=pass', array(), array('alert' => 'right')); + } + } else { + $vids = array(); + $single = intval($_GET['singleverify']); + $verifyflag = empty($_GET['verify']) ? false : true; + if ($verifyflag) { + if ($single) { + $_GET['verify'] = array($single => $_GET['verify'][$single]); + } + foreach ($_GET['verify'] as $id => $type) { + $vids[] = $id; + } + + $verifysetting = $_G['setting']['verify']; + $verify = $refusal = array(); + foreach (C::t('user_verify_info')->fetch_all($vids) as $value) { + if (in_array($_GET['verify'][$value['vid']], array('refusal', 'validate'))) { + $fields = dunserialize($value['field']); + $verifysetting = $_G['setting']['verify'][$value['verifytype']]; + + if ($_GET['verify'][$value['vid']] == 'refusal') { + $refusalfields = !empty($_GET['refusal'][$value['vid']]) ? $_GET['refusal'][$value['vid']] : $verifysetting['field']; + $fieldtitle = $common = ''; + $deleteverifyimg = false; + foreach ($refusalfields as $key => $field) { + $fieldtitle .= $common . $_G['cache']['profilesetting'][$field]['title']; + $common = ','; + if ($_G['cache']['profilesetting'][$field]['formtype'] == 'file') { + $deleteverifyimg = true; + @unlink(getglobal('setting/attachdir') . $fields[$key]); + $fields[$field] = ''; + } + } + if ($deleteverifyimg) { + C::t('user_verify_info') -> update($value['vid'], array('field' => serialize($fields))); + } + if ($value['verifytype']) { + $verify["verify"]['-1'][] = $value['uid']; + } + $verify['flag'][] = $value['vid']; + //发送通知 + $notevars = array('from_id' => 0, 'from_idtype' => '', 'author' => $_G['username'], 'authorid' => $_G['uid'], 'url' => 'user.php?mod=profile&vid=' . $vid, 'profile' => $fieldtitle, 'dataline' => dgmdate(TIMESTAMP), 'title' => $vid ? $_G['setting']['verify'][$vid]['title'] : lang('members_verify_profile'), 'reason' => $_GET['reason'][$value['vid']], ); + + $action = 'user_profile_moderate_refusal'; + $type = 'user_profile_moderate_refusal_' . $vid; + + } else { + C::t('user_profile1') -> update(intval($value['uid']), $fields); + if ($fields['department']) {//含有department时审核通过后,把此用户加入相应的部门 + C::t('organization_user') -> insert($value['uid'], $fields['department']); + } + $verify['delete'][] = $value['vid']; + if ($value['verifytype']) { + $verify["verify"]['1'][] = $value['uid']; + } + //发送通知 + $notevars = array('from_id' => 0, 'from_idtype' => '', 'author' => $_G['username'], 'authorid' => $_G['uid'], 'url' => 'user.php?mod=profile&vid=' . $vid, 'dataline' => dgmdate(TIMESTAMP), 'title' => $vid ? $_G['setting']['verify'][$vid]['title'] : lang('members_verify_profile'), ); + + $action = 'user_profile_moderate_pass'; + $type = 'user_profile_moderate_pass_' . $vid; + + } + dzz_notification::notification_add($value['uid'], $type, $action, $notevars, 1); + } + } + if ($vid && !empty($verify["verify"])) { + foreach ($verify["verify"] as $flag => $uids) { + $flag = intval($flag); + C::t('user_verify') -> update($uids, array("verify$vid" => $flag)); + if ($vid == 1) + C::t('user') -> update($uids, array('grid' => 6)); + } + } + + if (!empty($verify['delete'])) { + C::t('user_verify_info') -> delete($verify['delete']); + } + + if (!empty($verify['flag'])) { + C::t('user_verify_info') -> update($verify['flag'], array('flag' => '-1')); + } + } + if ($single) { + echo ""; + } else { + showmessage('members_verify_succeed', ADMINSCRIPT . '?mod=member&op=verify&vid=' . $vid . '&anchor=' . $_GET['anchor'], array(), array('alert' => 'right')); + } + } +} + +include template('verify'); +?> diff --git a/admin/member/verifyset.php b/admin/member/verifyset.php new file mode 100644 index 0000000..f435c97 --- /dev/null +++ b/admin/member/verifyset.php @@ -0,0 +1,154 @@ +'.lang('del1').' '; + } + $unverifyiconhtml = ''; + if ($verifyarr['unverifyicon']) { + $unverifyiconurl = parse_url($verifyarr['unverifyicon']); + + $prefix = !$unverifyiconurl['host'] && strpos($verifyarr['unverifyicon'], $_G['setting']['attachurl']) === false ? $_G['setting']['attachurl'] : ''; + $unverifyiconhtml = ' '; + } + + $fieldarr = C::t('user_profile_setting') -> fetch_all_by_available(1); + unset($fieldarr['birthyear']); + unset($fieldarr['birthmonth']); + unset($fieldarr['zodiac']); + unset($fieldarr['constellation']); + $groupselect = array(); + $usergroups = C::t('usergroup') -> fetch_all_not(array(6, 7)); + } else { + foreach ($_G['setting']['verify'] as $key => $value) { + $_G['setting']['verify'][$key]['icon'] = str_replace($_G['setting']['attachurl'], '', $value['icon']); + $_G['setting']['verify'][$key]['unverifyicon'] = str_replace($_G['setting']['attachurl'], '', $value['unverifyicon']); + } + $verifynew = getgpc('verify'); + $verifynew['readonly'] = $_G['setting']['verify'][$vid]['readonly']; + if ($vid == 1) { + $verifynew['title'] = $_G['setting']['verify'][$vid]['title']; + } + if ($verifynew['available'] == 1 && !trim($verifynew['title'])) { + showmessage('members_verify_title_empty', dreferer()); + } + if ($icon = getverifyicon('iconnew', 'common/verify/' . $vid . '/verify_icon.jpg')) + $verifynew['icon'] = $icon; + else + $verifynew['icon'] = $_G['setting']['verify'][$vid]['icon']; + if ($uicon = getverifyicon('unverifyiconnew', 'common/verify/' . $vid . '/unverify_icon.jpg')) + $verifynew['unverifyicon'] = $uicon; + else + $verifynew['unverifyicon'] = $_G['setting']['verify'][$vid]['unverifyicon']; + if ($_GET['deleteicon']) { + $verifynew['icon'] = delverifyicon($verifyarr['icon']); + } + if ($_GET['delunverifyicon']) { + $verifynew['unverifyicon'] = delverifyicon($verifyarr['unverifyicon']); + } + + if (!empty($verifynew['field']['birthday'])) { + $verifynew['field']['birthyear'] = 'birthyear'; + $verifynew['field']['birthmonth'] = 'birthmonth'; + } + + $verifynew['groupid'] = !empty($verifynew['groupid']) && is_array($verifynew['groupid']) ? $verifynew['groupid'] : array(); + $_G['setting']['verify'][$vid] = $verifynew; + $_G['setting']['verify']['enabled'] = false; + for ($i = 1; $i < 8; $i++) { + if ($_G['setting']['verify'][$i]['available'] && !$_G['setting']['verify']['enabled']) { + $_G['setting']['verify']['enabled'] = true; + } + if ($_G['setting']['verify'][$i]['icon']) { + $icon_url = parse_url($_G['setting']['verify'][$i]['icon']); + } + $_G['setting']['verify'][$i]['icon'] = !$icon_url['host'] ? str_replace($_G['setting']['attachurl'], '', $_G['setting']['verify'][$i]['icon']) : $_G['setting']['verify'][$i]['icon']; + } + C::t('setting') -> update('verify', $_G['setting']['verify']); + + updatecache(array('setting')); + showmessage('members_verify_save_success', ADMINSCRIPT . '?mod=member&op=verifyset', array(), array('alert' => 'right')); + } + include template('verifyset_edit'); +} else { + if (!submitcheck('verifysubmit')) { + for ($i = 1; $i < 8; $i++) { + $url = parse_url($_G['setting']['verify'][$i]['icon']); + if (!$url['host'] && $_G['setting']['verify'][$i]['icon'] && strpos($_G['setting']['verify'][$i]['icon'], $_G['setting']['attachurl']) === false) { + $_G['setting']['verify'][$i]['icon'] = $_G['setting']['attachurl'] . $_G['setting']['verify'][$i]['icon']; + } + + } + + } else { + $settingnew = getgpc('settingnew'); + $enabled = false; + foreach ($settingnew['verify'] as $key => $value) { + if ($value['available'] && !$value['title']) { + showmessage('members_verify_title_empty', dreferer()); + } + if ($value['available']) { + $enabled = true; + } + $_G['setting']['verify'][$key]['available'] = intval($value['available']); + $_G['setting']['verify'][$key]['title'] = $value['title']; + } + $_G['setting']['verify']['enabled'] = $enabled; + C::t('setting') -> update('verify', $_G['setting']['verify']); + updatecache(array('setting')); + + showmessage('members_verify_success', dreferer(), array(), array('alert' => 'right')); + } + include template('verifyset'); +} +function getverifyicon($iconkey = 'iconnew', $target) { + global $_G, $_GET, $_FILES; + + if ($_FILES[$iconkey]) { + $iconnew = uploadtolocal($_FILES[$iconkey], 'common', $target); + } elseif ($_GET['' . $iconkey]) { + $icon_url = parse_url($_GET['' . $iconkey]); + if ($icon_url['host']) + $iconnew = imagetolocal($_GET['' . $iconkey], 'common', $target); + else + $iconnew = $_GET['' . $iconkey]; + } else { + $iconnew = ''; + } + return $iconnew; +} + +function delverifyicon($icon) { + global $_G; + + $valueparse = parse_url($icon); + if (!isset($valueparse['host']) && preg_match('/^' . preg_quote($_G['setting']['attachurl'], '/') . '/', $icon)) { + @unlink($icon); + } + return ''; +} +?> diff --git a/admin/orguser/ajax.php b/admin/orguser/ajax.php index cb09eac..a46057f 100644 --- a/admin/orguser/ajax.php +++ b/admin/orguser/ajax.php @@ -345,6 +345,7 @@ if ($do == 'upload') {//上传图片文件 if ($setarr['id'] = C::t('organization_admin') -> insert(intval($_GET['uid']), $orgid)) { $user = getuserbyuid($setarr['uid']); $setarr['username'] = $user['username']; + $setarr['avatar']=avatar_block($setarr['uid']); exit(json_encode($setarr)); } else { exit(json_encode(array('error' => lang('add_administrator_unsuccess')))); diff --git a/admin/orguser/edituser.php b/admin/orguser/edituser.php index 569137c..3d04dca 100644 --- a/admin/orguser/edituser.php +++ b/admin/orguser/edituser.php @@ -36,16 +36,24 @@ if ($do == 'add') { } if (!$orgids && $_G['adminid'] != 1) showmessage('no_parallelism_jurisdiction'); + //用户名验证 $username = trim($_GET['username']); - $usernamelen = dstrlen($_GET['username']); - if ($usernamelen < 3) { - showmessage('profile_username_tooshort'); - } elseif ($usernamelen > 30) { - showmessage('profile_username_toolong'); - } - $censorexp = '/^(' . str_replace(array('\\*', "\r\n", ' '), array('.*', '|', ''), preg_quote(($_G['setting']['censoruser'] = trim($_G['setting']['censoruser'])), '/')) . ')$/i'; - if ($_G['setting']['censoruser'] && @preg_match($censorexp, $username)) { - showmessage('profile_username_protect'); + if ($username) { + $usernamelen = dstrlen($_GET['username']); + if ($usernamelen < 3) { + showmessage('profile_username_tooshort'); + } elseif ($usernamelen > 30) { + showmessage('profile_username_toolong'); + } + if ($_G['setting']['censoruser'] && @preg_match($censorexp, $username)) { + showmessage('profile_username_protect'); + } + //如果输入用户名,检查用户名不能重复 + + if (C::t('user') -> fetch_by_username($username)) { + showmessage('user_registered_retry'); + } + } $user_extra = array(); //如果输入手机号码,检查手机号码不能重复 @@ -70,25 +78,7 @@ if ($do == 'add') { } $user_extra['weixinid'] = $weixinid; } - //用户名验证 - $nickname = trim($_GET['nickname']); - if ($nickname) { - $nicknamelen = dstrlen($_GET['nickname']); - if ($nicknamelen < 3) { - showmessage('profile_nickname_tooshort'); - } elseif ($nicknamelen > 30) { - showmessage('profile_nickname_toolong'); - } - if ($_G['setting']['censoruser'] && @preg_match($censorexp, $nickname)) { - showmessage('profile_username_protect'); - } - //如果输入用户名,检查用户名不能重复 - - if (C::t('user') -> fetch_by_nickname($nickname)) { - showmessage('user_registered_retry'); - } - - } + //邮箱验证部分 $email = strtolower(trim($_GET['email'])); @@ -115,11 +105,11 @@ if ($do == 'add') { } if ($uid <= 0) { if ($uid == -1) { - showmessage('profile_nickname_illegal'); + showmessage('profile_username_illegal'); } elseif ($uid == -2) { - showmessage('profile_nickname_protect'); + showmessage('profile_username_protect'); } elseif ($uid == -3) { - showmessage('profile_nickname_duplicate'); + showmessage('profile_username_duplicate'); } elseif ($uid == -4) { showmessage('profile_email_illegal'); } elseif ($uid == -5) { @@ -153,7 +143,7 @@ if ($do == 'add') { C::t('organization_user') -> replace_orgid_by_uid($uid, $orgids); //处理上司职位; C::t('organization_upjob') -> insert_by_uid($uid, intval($_GET['upjobid'])); - + Hook::listen('syntoline_user',$uid);//注册绑定到钉钉部门表 if ($_GET['sendmail']) { $email_password_message = lang('email_password_message', array('sitename' => $_G['setting']['sitename'], 'siteurl' => $_G['siteurl'], 'email' => $_GET['email'], 'password' => $_GET['password'])); @@ -214,7 +204,11 @@ if ($do == 'add') { showmessage('edit_user_success', ADMINSCRIPT . '?mod=orguser#user_' . $uid, array()); } + + + //用户名验证 $username = trim($_GET['username']); + $usernamelen = dstrlen($_GET['username']); if ($usernamelen < 3) { showmessage('profile_username_tooshort'); @@ -223,33 +217,17 @@ if ($do == 'add') { } elseif (!check_username(addslashes(trim(stripslashes($username))))) { showmessage('profile_username_illegal'); } - $censorexp = '/^(' . str_replace(array('\\*', "\r\n", ' '), array('.*', '|', ''), preg_quote(($_G['setting']['censoruser'] = trim($_G['setting']['censoruser'])), '/')) . ')$/i'; - if ($_G['setting']['censoruser'] && @preg_match($censorexp, $username)) { - showmessage('profile_username_protect'); - } - //用户名验证 - $nickname = trim($_GET['nickname']); - if ($nickname) { - $nicknamelen = dstrlen($_GET['nickname']); - if ($nicknamelen < 3) { - showmessage('profile_nickname_tooshort'); - } elseif ($nicknamelen > 30) { - showmessage('profile_nickname_toolong'); - } elseif (!check_username(addslashes(trim(stripslashes($nickname))))) { - showmessage('profile_nickname_illegal'); + //如果输入用户名,检查用户名不能重复 + if ($username != $user['username']) { + if (C::t('user') -> fetch_by_username($username)) { + showmessage('user_registered_retry'); } - - //如果输入用户名,检查用户名不能重复 - if ($nickname != $user['nickname']) { - if (C::t('user') -> fetch_by_nickname($nickname)) { - showmessage('user_registered_retry'); - } - if ($_G['setting']['censoruser'] && @preg_match($censorexp, $nickname)) { - showmessage('profile_username_protect'); - } + if ($_G['setting']['censoruser'] && @preg_match($censorexp, $username)) { + showmessage('profile_username_protect'); } } + //如果输入手机号码,检查手机号码不能重复 $phone = trim($_GET['phone']); @@ -279,7 +257,7 @@ if ($do == 'add') { } elseif (!check_emailaccess($email)) { showmessage('profile_email_domain_illegal', '', array(), array('handle' => false)); } - if ($email != $user['email']) { + if ($email != strtolower($user['email'])) { //邮箱不能重复 if (C::t('user') -> fetch_by_email($email)) { showmessage('email_registered_retry'); @@ -301,13 +279,13 @@ if ($do == 'add') { $password = $_GET['password']; if ($password) { $salt = substr(uniqid(rand()), -6); - $setarr = array('salt' => $salt, 'password' => md5(md5($password) . $salt), 'username' => $username, 'nickname' => $nickname, 'phone' => $phone, 'weixinid' => $weixinid, 'secques' => '', 'email' => $email, 'status' => intval($_GET['status'])); + $setarr = array('salt' => $salt, 'password' => md5(md5($password) . $salt), 'username' => $username, 'phone' => $phone, 'weixinid' => $weixinid, 'secques' => '', 'email' => $email, 'status' => intval($_GET['status'])); } else { - $setarr = array('username' => $username, 'email' => $email, 'nickname' => $nickname, 'phone' => $phone, 'weixinid' => $weixinid, 'status' => intval($_GET['status'])); + $setarr = array('username' => $username, 'email' => $email, 'phone' => $phone, 'weixinid' => $weixinid, 'status' => intval($_GET['status'])); } C::t('user') -> update($uid, $setarr); - wx_updateUser($uid); + //处理管理员 C::t('user') -> setAdministror($uid, intval($_GET['groupid'])); //处理额外空间和用户空间 @@ -325,8 +303,8 @@ if ($do == 'add') { //处理上司职位; C::t('organization_upjob') -> insert_by_uid($uid, intval($_GET['upjobid'])); + Hook::listen('syntoline_user',$uid);//注册绑定到钉钉部门表 showmessage('edit_user_success', ADMINSCRIPT . '?mod=orguser#user_' . $uid, array()); - } else { require_once libfile('function/organization'); diff --git a/admin/orguser/export.php b/admin/orguser/export.php index f9e346b..5264a1c 100644 --- a/admin/orguser/export.php +++ b/admin/orguser/export.php @@ -12,7 +12,7 @@ if(!defined('IN_DZZ') || !defined('IN_ADMIN')) { require_once libfile('function/organization'); require_once DZZ_ROOT.'./core/class/class_PHPExcel.php'; if($_G['adminid']!=1) showmessage('system_administrator_export',dreferer()); - $h0=array('username'=>lang('compellation'),'email'=>lang('email'),'nickname'=>lang('username'),'birth'=>lang('date_birth'),'gender'=>lang('gender'),'mobile'=>lang('cellphone'),'weixinid'=>lang('weixin'),'orgname'=>lang('category_department'),'job'=>lang('department_position')); + $h0=array('username'=>lang('compellation'),'email'=>lang('email'),'birth'=>lang('date_birth'),'gender'=>lang('gender'),'mobile'=>lang('cellphone'),'weixinid'=>lang('weixin'),'orgname'=>lang('category_department'),'job'=>lang('department_position')); $h1=getProfileForImport(); $h0=array_merge($h0,$h1); $orgid=intval($_GET['orgid']); diff --git a/admin/orguser/export_tmpl.php b/admin/orguser/export_tmpl.php index 573d68a..17847bb 100644 --- a/admin/orguser/export_tmpl.php +++ b/admin/orguser/export_tmpl.php @@ -9,7 +9,7 @@ if(!defined('IN_DZZ') || !defined('IN_ADMIN')) { exit('Access Denied'); } - $h0=array('username'=>lang('compellation'),'email'=>lang('email'),'nickname'=>lang('username'),'password'=>lang('user_login_password'),'birth'=>lang('date_birth'),'gender'=>lang('gender'),'mobile'=>lang('cellphone'),'weixinid'=>lang('weixin'),'orgname'=>lang('category_department'),'job'=>lang('department_position')); + $h0=array('username'=>lang('compellation'),'email'=>lang('email'),'password'=>lang('user_login_password'),'birth'=>lang('date_birth'),'gender'=>lang('gender'),'mobile'=>lang('cellphone'),'weixinid'=>lang('weixin'),'orgname'=>lang('category_department'),'job'=>lang('department_position')); $h1=getProfileForImport(); $h0=array_merge($h0,$h1); $title=lang('bulk_import_user_template'); diff --git a/admin/orguser/images/orguser.css b/admin/orguser/images/orguser.css index 39fc611..e952e5c 100644 --- a/admin/orguser/images/orguser.css +++ b/admin/orguser/images/orguser.css @@ -141,6 +141,11 @@ .moderators-container .user-item-avatar .avatar-face{ width:90px;height:90px;margin:5px +}.moderators-container .user-item-avatar .avatar-face .Topcarousel { + width:90px;height:90px; + font-size:40px; + line-height: 90px + } .moderators-container .user-item-avatar img{ width:100%; diff --git a/admin/orguser/import.php b/admin/orguser/import.php index 8c87e83..731bd5c 100644 --- a/admin/orguser/import.php +++ b/admin/orguser/import.php @@ -16,10 +16,7 @@ if($do=='importing'){ //判断邮箱是否存在 require_once libfile('function/user','','user'); $email=trim($_GET['email']); - $_GET['nickname']=addslashes(trim(stripslashes(trim($_GET['nickname'])))); $_GET['username']=addslashes(trim(stripslashes(trim($_GET['username'])))); - - $_GET['nickname']=str_replace('...','',getstr($_GET['nickname'],30)); $_GET['username']=str_replace('...','',getstr($_GET['username'],30)); $_GET['password']=empty($_GET['password'])?trim($_GET['pswdefault']):trim($_GET['password']); @@ -38,17 +35,13 @@ if($do=='importing'){ $exist=0; //检查用户是否已经存在 - if(($user=C::t('user')->fetch_by_email($email)) || ($_GET['nickname'] && ($user=C::t('user')->fetch_by_nickname($_GET['nickname'])))){//用户已经存在时 + if(($user=C::t('user')->fetch_by_email($email)) || ($user=C::t('user')->fetch_by_username($_GET['username']))){//用户已经存在时 $uid=$user['uid']; $exist=1; if($isfounder=C::t('user')->checkfounder($user)) $isappend=1;//创始人不支持覆盖导入 if($isappend){//增量添加,如果原先没有nickname,增加 $appendfield=array(); - if($_GET['nickname'] && empty($user['nickname'])){ - if(check_username($_GET['nickname']) && !C::t('user')->fetch_by_nickname($_GET['nickname'])){ - $appendfield['nickname']=$_GET['nickname']; - } - } + if($_GET['mobile'] && empty($user['phone'])){ if(!preg_match("/^\d+$/",$_GET['mobile'])){ exit(json_encode(array('error'=>lang('phone_number_illegal')))); @@ -76,11 +69,7 @@ if($do=='importing'){ 'password'=>md5(md5($_GET['password']).$salt), 'salt'=>$salt ); - if($_GET['nickname']){ - if($_GET['nickname']!=$user['nickname'] && check_username($_GET['nickname']) && !C::t('user')->fetch_by_nickname($_GET['nickname'])){ - $setarr['nickname']=$_GET['nickname']; - } - } + if($_GET['mobile'] && $_GET['mobile']!=$user['phone']){ if(!preg_match("/^\d+$/",$_GET['mobile'])){ exit(json_encode(array('error'=>lang('phone_number_illegal')))); @@ -117,13 +106,8 @@ if($do=='importing'){ }else{ //新添用户 if(!check_username($_GET['username'])) exit(json_encode(array('error'=>lang('user_name_sensitive')))); - if($_GET['nickname']){ - if(check_username($_GET['nickname']) && !C::t('user')->fetch_by_nickname($_GET['nickname'])){ - }else{ - $_GET['nickname']=''; - } - } - $user=uc_add_user($_GET['username'], $_GET['password'], $email, $_GET['nickname']); + + $user=uc_add_user($_GET['username'], $_GET['password'], $email); $uid=$user['uid']; if($uid<1) exit(json_encode(array('error'=>lang('import_failure')))); diff --git a/admin/orguser/scripts/orguser.js b/admin/orguser/scripts/orguser.js index 7264afb..698fa18 100644 --- a/admin/orguser/scripts/orguser.js +++ b/admin/orguser/scripts/orguser.js @@ -13,7 +13,7 @@ function checkAdminLogin(str){ } } function show_guide(){ - jQuery('#orguser_container').load(ajaxurl+'&do=guide',function(){ + jQuery('#orguser_container').load(ajaxurl+'do=guide',function(){ location.hash=''; }); } @@ -36,7 +36,7 @@ function selJob(obj){ function selDepart(obj){ var orgid=jQuery(obj).val(); var li=jQuery(obj).parent(); - li.parent().find('.job .dropdown-menu').load(ajaxurl+'&do=getjobs&orgid='+orgid,function(html){ + li.parent().find('.job .dropdown-menu').load(ajaxurl+'do=getjobs&orgid='+orgid,function(html){ if(checkAdminLogin(html)){ location.reload(); } @@ -63,6 +63,7 @@ function errormessage(id, msg,passlevel) { function checkemail(id) { errormessage(id); var email = trim(jQuery('#'+id).val()); + email=email.toLowerCase(); if(jQuery('#'+id).parent()[0].className.match(/ p_right/) && (email == '' || email == lastemail ) || email == lastemail) { return; } @@ -220,7 +221,7 @@ function jstree_search(val){ } function jstree_create_organization(){ var inst = jQuery("#classtree").jstree(true); - jQuery.post(ajaxurl+'&do=create',{'forgid':0,'t':new Date().getTime()},function(json){ + jQuery.post(ajaxurl+'do=create',{'forgid':0,'t':new Date().getTime()},function(json){ if(!json || json.error){ showmessage(json.error,'danger',3000,1); }else if(json.orgid>0){ @@ -248,7 +249,7 @@ function jstree_create_dir(){ return true; } var inst = jQuery("#classtree").jstree(true); - jQuery.post(ajaxurl+'&do=create',{'forgid':obj.id,'t':new Date().getTime()},function(json){ + jQuery.post(ajaxurl+'do=create',{'forgid':obj.id,'t':new Date().getTime()},function(json){ if(!json || json.error){ showmessage(json.error,'danger',3000,1); }else if(json.orgid>0){ @@ -294,7 +295,7 @@ function showDetail(id,idtype,ajaxdo,orgid){ //console..log(hash); urladd+='&t='+new Date().getTime() - jQuery('#orguser_container').load(baseurl+'&op=view&id='+id+'&idtype='+idtype+urladd,function(html){ + jQuery('#orguser_container').load(baseurl+'op=view&id='+id+'&idtype='+idtype+urladd,function(html){ if(checkAdminLogin(html)){ location.reload(); } @@ -332,7 +333,7 @@ function job_save(jobid,orgid){ el.find('.edit').addClass('hide'); return; } - jQuery.post(ajaxurl+'&do=jobedit',{'name':name,'jobid':jobid,'orgid':orgid,'t':new Date().getTime()},function(json){ + jQuery.post(ajaxurl+'do=jobedit',{'name':name,'jobid':jobid,'orgid':orgid,'t':new Date().getTime()},function(json){ if(json.error){ el.find('.job-name').html(oname).removeClass('hide'); el.find('.edit').addClass('hide'); @@ -364,7 +365,7 @@ function job_cancel_add_editor(orgid){ } function job_del(jobid,orgid){ var el=jQuery('#job_'+jobid); - jQuery.post(ajaxurl+'&do=jobdel',{'jobid':jobid,'orgid':orgid,'t':new Date().getTime()},function(json){ + jQuery.post(ajaxurl+'do=jobdel',{'jobid':jobid,'orgid':orgid,'t':new Date().getTime()},function(json){ if(json.error){ showmessage(json.error,'danger',3000,1); }else if(json.jobid>0){ @@ -380,7 +381,7 @@ function job_add(orgid){ newtodo.find('.new-job-text').focus(); return; } - jQuery.post(ajaxurl+'&do=jobadd',{'name':name,'orgid':orgid,'t':new Date().getTime()},function(json){ + jQuery.post(ajaxurl+'do=jobadd',{'name':name,'orgid':orgid,'t':new Date().getTime()},function(json){ if(json.jobid>0){ appendjob(json); @@ -404,6 +405,20 @@ function appendjob(json){ html+=''; jQuery('.jobs .new-job').before(html); } +function callback_moderators(ids,data,orgid){ + console.log(ids);console.log(orgid); + //删除不在选择列表内的用户 + jQuery('.moderators-container .user-item').each(function(){ + var uid=jQuery(this).attr('uid'); + if(jQuery.inArray(uid,ids)===-1){ + jQuery(this).find('.delete').trigger('click'); + } + }); + for(var i=0;i'; + html+=' '+json.avatar; html+=' '; html+=' '; html+='

    '+json.username+'

    '; @@ -433,7 +448,7 @@ function appendModerator(json){ jQuery('#moderators_container_'+json.orgid+' .moderators-acceptor').after(html); } function moderator_del(id,orgid,obj){ - jQuery.post(ajaxurl+'&do=moderator_del',{'orgid':orgid,'id':id,'t':new Date().getTime()},function(json){ + jQuery.post(ajaxurl+'do=moderator_del',{'orgid':orgid,'id':id,'t':new Date().getTime()},function(json){ if(json.error) showmessage(json.error,'danger',3000,1); else{ jQuery(obj).parent().remove(); @@ -443,7 +458,7 @@ function moderator_del(id,orgid,obj){ } function folder_available(available,orgid){ - jQuery.post(ajaxurl+'&do=folder_available',{'orgid':orgid,'available':available,'t':new Date().getTime()},function(json){ + jQuery.post(ajaxurl+'do=folder_available',{'orgid':orgid,'available':available,'t':new Date().getTime()},function(json){ if(json.error){ showmessage(json.error,'danger',3000,1); }else{ @@ -458,7 +473,7 @@ function folder_available(available,orgid){ },'json'); } function group_on(on,orgid){ - jQuery.post(ajaxurl+'&do=group_on',{'orgid':orgid,'available':on,'t':new Date().getTime()},function(json){ + jQuery.post(ajaxurl+'do=group_on',{'orgid':orgid,'available':on,'t':new Date().getTime()},function(json){ if(json.error){ showmessage(json.error,'danger',3000,1); }else{ @@ -471,12 +486,12 @@ function group_on(on,orgid){ },'json'); } function folder_indesk(indesk,orgid){ - jQuery.post(ajaxurl+'&do=folder_indesk',{'orgid':orgid,'indesk':indesk,'t':new Date().getTime()},function(json){ + jQuery.post(ajaxurl+'do=folder_indesk',{'orgid':orgid,'indesk':indesk,'t':new Date().getTime()},function(json){ if(json.error) showmessage(json.error,'danger',3000,1); },'json'); } function set_org_logo(orgid,aid){ - jQuery.post(ajaxurl+'&do=set_org_logo',{'orgid':orgid,'aid':aid},function(json){ + jQuery.post(ajaxurl+'do=set_org_logo',{'orgid':orgid,'aid':aid},function(json){ if(json.error) showmessage(json.error,'danger',3000,1); },'json'); } @@ -488,7 +503,7 @@ function set_org_logo(orgid,aid){ function set_org_orgname(orgid,obj){ var oldname=jQuery(obj).data('oldname'); console.log(oldname); - jQuery.post(ajaxurl+'&do=set_org_orgname',{'orgid':orgid,'orgname':obj.value},function(json){ + jQuery.post(ajaxurl+'do=set_org_orgname',{'orgid':orgid,'orgname':obj.value},function(json){ if(json.error){ obj.value=oldname; showmessage(json.error,'danger',3000,1); @@ -501,14 +516,14 @@ function set_org_orgname(orgid,obj){ },'json'); } function set_org_desc(orgid,desc){ - jQuery.post(ajaxurl+'&do=set_org_desc',{'orgid':orgid,'desc':desc},function(json){ + jQuery.post(ajaxurl+'do=set_org_desc',{'orgid':orgid,'desc':desc},function(json){ if(json.error){ showmessage(json.error,'danger',3000,1); } },'json'); } function folder_maxspacesize(obj,orgid){ - jQuery.post(ajaxurl+'&do=folder_maxspacesize',{'orgid':orgid,'maxspacesize':obj.value,'t':new Date().getTime()},function(json){ + jQuery.post(ajaxurl+'do=folder_maxspacesize',{'orgid':orgid,'maxspacesize':obj.value,'t':new Date().getTime()},function(json){ if(json.error){ obj.value=json.val; showmessage(json.error,'danger',3000,1); diff --git a/admin/orguser/template/detail_org.htm b/admin/orguser/template/detail_org.htm index 290a6a4..232254c 100644 --- a/admin/orguser/template/detail_org.htm +++ b/admin/orguser/template/detail_org.htm @@ -6,6 +6,7 @@ background-color: #e6e6e6; overflow:visible; padding:4px; + max-width:750px; } .progress-relative .progress-cover { position: absolute; @@ -65,6 +66,7 @@
    +
    {lang shared_directory_set}
    0}-->checked="checked" onclick="folder_available(1,'$orgid');" /> @@ -75,7 +77,7 @@
    - {lang detail_org_no_enable} + {lang detail_org_explorerapp_enable} {lang detail_org_enable} @@ -94,20 +96,20 @@
    -
    +checked="checked" onclick="group_on(1,'$orgid');" /> -
    checked="checked" onclick="group_on(0,'$orgid');" />
    +
    0}–>checked="checked"<!–{/if}–> onclick="group_on(1,'$orgid');" />
    +
    - + <!–{if $org['forgid']<1}–> {lang group_org_no_enable} - + <!–{else}–> {lang group_org_enable} - + <!–{/if}–>
    -
    + -->
    @@ -125,7 +127,7 @@ {lang org_space_assign_tips} -
    +
    {lang space_use_department}{lang space_use_org}
    @@ -142,8 +144,7 @@
    -
    - +
    {lang position_management}
    @@ -199,7 +200,7 @@
    - + {eval echo avatar_block($value[uid]);}

    $value[username]

    @@ -235,6 +236,14 @@ return false; } + jQuery(document).on('click','.moderators-acceptor',function(){ + var ids=[]; + jQuery('.moderators-container .user-item').each(function(){ + ids.push(jQuery(this).attr('uid')); + }); + showWindow('moderators','index.php?mod=system&op=selorguser&stype=2&multiple=1&callback=callback_moderators&token=$orgid&ids='+ids.join(','),'get',0) + + }); jQuery(document).on('click','.headinput-checkbox',function(){ if(jQuery(this).prop("checked")){ jQuery(this).closest('.head-portrait').siblings('.head-portrait').find('.headinput-checkbox').prop('checked',false).parents('.head-checkbox').removeClass('hover'); @@ -243,7 +252,7 @@ jQuery(this).parents('.head-portrait').find('.head-checkbox').removeClass('hover'); } - }) + }); function upload_bgphoto(obj,fact) { 'use strict'; jQuery(obj).fileupload({ diff --git a/admin/orguser/template/edituser.htm b/admin/orguser/template/edituser.htm index 5c0d962..580268a 100644 --- a/admin/orguser/template/edituser.htm +++ b/admin/orguser/template/edituser.htm @@ -227,7 +227,7 @@ var orgsel_html = jQuery('#nav').html(); var lastusername = '{$user[username]}', lastpassword = '', - lastemail = '{$user[email]}', + lastemail = '{eval echo strtolower($user[email])}', lastinvitecode = '', stmp = new Array(), modifypwd = true; diff --git a/admin/orguser/template/import_guide.htm b/admin/orguser/template/import_guide.htm index e0408e6..2171ed5 100644 --- a/admin/orguser/template/import_guide.htm +++ b/admin/orguser/template/import_guide.htm @@ -46,7 +46,7 @@
    - +
    {lang inport_guide_layout}
    diff --git a/admin/orguser/template/tree.htm b/admin/orguser/template/tree.htm index 61c6864..69d8e17 100644 --- a/admin/orguser/template/tree.htm +++ b/admin/orguser/template/tree.htm @@ -17,8 +17,8 @@ +

    {lang update_cache_succeed}

    diff --git a/admin/system/template/upgrade.htm b/admin/system/template/upgrade.htm index bff4d78..c75b506 100644 --- a/admin/system/template/upgrade.htm +++ b/admin/system/template/upgrade.htm @@ -56,7 +56,7 @@ @@ -143,7 +143,7 @@     {lang founder_upgrade_normal}   $v - +     {lang founder_upgrade_new}   $v diff --git a/admin/systemlog/dzz_app_systemlog.xml b/admin/systemlog/dzz_app_systemlog.xml index 09d78cf..5d95b77 100644 --- a/admin/systemlog/dzz_app_systemlog.xml +++ b/admin/systemlog/dzz_app_systemlog.xml @@ -1249,7 +1249,7 @@ l8I9rb4ZiiEQAUQAEcCySIITuJKyXadxsFEAzKh9zJSm9MUQiAAigAigUZLgHoylbNe2RgLQgb0x BCKACCACaCYAP5vMz+9JAYw3GYCXSQE8bDIAj5ICuIWpJnF+CrcTAahWyt/Qr3aKo5FlEv3Bn7/K QmeGOnBe7TvAPFY3SMKbxGPcrFbKX/6l3BYPT8d1QGvL7wEAjzN1sBVUpBcAAAAASUVORK5CYII= ]]> - + diff --git a/config/config_default.php b/config/config_default.php index 5afa2f7..1fde2fb 100644 --- a/config/config_default.php +++ b/config/config_default.php @@ -18,7 +18,7 @@ $_config = array(); * $_config['db']['2']['dbhost'] = 'localhost'; * ... */ -$_config['db'][1]['dbhost'] = 'localhost';//支持直接加端口如:127.0.0.1:3306或使用UNix socket 如:/tmp/mysql.sock +$_config['db'][1]['dbhost'] = 'localhost';//支持三种直接加端口如:127.0.0.1:3306或使用UNix socket 如:/tmp/mysql.sock $_config['db'][1]['dbuser'] = 'root'; $_config['db'][1]['dbpw'] = 'root'; $_config['db'][1]['dbcharset'] = 'utf8'; @@ -184,10 +184,10 @@ $_config['security']['querysafe']['afullnote'] = 0; $_config['admincp']['founder'] = '1'; // 站点创始人:拥有站点管理后台的最高权限,每个站点可以设置 1名或多名创始人 // 可以使用uid,也可以使用用户名;多个创始人之间请使用逗号“,”分开; -$_config['admincp']['checkip'] = 1; // 后台管理操作是否验证管理员的 IP, 1=是[安全], 0=否。仅在管理员无法登陆后台时设置 0。 -$_config['admincp']['runquery'] = 1; // 是否允许后台运行 SQL 语句 1=是 0=否[安全] +$_config['admincp']['checkip'] = 1; // 后台管理操作是否验证管理员的 IP, 1=是[安全], 0=否。仅在管理员无法登录后台时设置 0。 +$_config['admincp']['runquery'] = 0; // 是否允许后台运行 SQL 语句 1=是 0=否[安全] $_config['admincp']['dbimport'] = 0; // 是否允许后台恢复网站数据 1=是 0=否[安全] -$_config['userlogin']['checkip'] = 1; //用户登录错误验证ip,对于同一ip同时使用时建议设置为0,否则当有一位用户登录错误次数超过5次,该ip被锁定15分钟,导致其他的同IP用户无法登陆; +$_config['userlogin']['checkip'] = 1; //用户登录错误验证ip,对于同一ip同时使用时建议设置为0,否则当有一位用户登录错误次数超过5次,该ip被锁定15分钟,导致其他的同IP用户无法登录; //$_config['system_os'] = 'linux'; //windows,linux,mac,系统会自动判断 //$_config['system_charset']='utf-8'; //操作系统编码,不设置系统将根据操作系统类型来判断linux:utf-8;windows:gbk; diff --git a/core/api/oss_sdk/conf.inc.php b/core/api/oss_sdk/conf.inc.php index 0f4561a..89086eb 100644 --- a/core/api/oss_sdk/conf.inc.php +++ b/core/api/oss_sdk/conf.inc.php @@ -11,7 +11,7 @@ define('OSS_ACCESS_KEY', ''); define('ALI_LOG', FALSE); //自定义日志路径,如果没有设置,则使用系统默认路径,在./logs/ -//define('ALI_LOG_PATH',''); +define('ALI_LOG_PATH',DZZ_ROOT.DATA_NAME.BS.'log'); //是否显示LOG输出 define('ALI_DISPLAY_LOG', FALSE); diff --git a/core/api/qiniu/conf.php b/core/api/qiniu/conf.php index 4e9a63a..64c7073 100644 --- a/core/api/qiniu/conf.php +++ b/core/api/qiniu/conf.php @@ -10,30 +10,36 @@ global $QINIU_SECRET_KEY; global $HOSTS; $SDK_VER = "6.1.9"; $HOSTS=array( - 'huadong'=>array('title'=>'华东', + 'z0'=>array('title'=>'华东', 'up_http'=>'http://upload.qiniu.com', 'up_https'=>'https://up.qbox.me', 'io_http'=>'http://iovip.qbox.me', 'io_https'=>'https://iovip.qbox.me' ) - ,'huabei'=>array('title'=>'华北', + ,'z1'=>array('title'=>'华北', 'up_http'=>'http://upload-z1.qiniu.com', 'up_https'=>'https://up-z1.qbox.me', 'io_http'=>'http://iovip-z1.qbox.me', 'io_https'=>'https://iovip-z1.qbox.me' ) - ,'huanan'=>array('title'=>'华南', + ,'z2'=>array('title'=>'华南', 'up_http'=>'http://upload-z2.qiniu.com', 'up_https'=>'https://up-z2.qbox.me', 'io_http'=>'http://iovip-z2.qbox.me', 'io_https'=>'https://iovip-z2.qbox.me' ) - ,'beimei'=>array('title'=>'北美', + ,'na0'=>array('title'=>'北美', 'up_http'=>'http://upload-na0.qiniu.com', 'up_https'=>'https://up-na0.qbox.me', 'io_http'=>'http://iovip-na0.qbox.me', 'io_https'=>'https://iovip-na0.qbox.me' ) + ,'as0'=>array('title'=>'东南亚', + 'up_http'=>'http://up-as0.qiniup.com', + 'up_https'=>'https://up-as0.qbox.me', + 'io_http'=>'http://iovip-as0.qbox.me', + 'io_https'=>'https://iovip-as0.qbox.me' + ) ); $QINIU_UP_HOST = 'http://upload.qiniu.com'; diff --git a/core/api/wopi/wopi.php b/core/api/wopi/wopi.php index 96d5f64..a3ccaf7 100644 --- a/core/api/wopi/wopi.php +++ b/core/api/wopi/wopi.php @@ -200,23 +200,30 @@ class Wopi $urlsrc=$discovery['actions'][$action][$fileExtension]; $parts = parse_url($ooServerURL); - if ($parts['scheme']=='HTTPS') { + if (strtolower($parts['scheme'])=='https') { + + $webSocketProtocol = "wss://"; + } else { + + $webSocketProtocol = "ws://"; + } + $protocol=$_SERVER['SERVER_PROTOCOL']; + $parts = parse_url($ooServerURL); + if (strtolower($parts['scheme'])=='https') { $protocol = "https"; $webSocketProtocol = "wss://"; } else { $protocol = "http"; $webSocketProtocol = "ws://"; } - if (isset($_SERVER['HTTP_HOST'])) { - $hostName = $_SERVER['HTTP_HOST']; - } + $webSocket = sprintf("%s%s%s",$webSocketProtocol,$parts['host'],isset($parts['port']) ? ":" . $parts['port'] : ""); - $fileUrl = urlencode($protocol . "://" . $hostName . "/wopi/files/" . $fileID); + $fileUrl = urlencode(getglobal('siteurl'). "wopi/files/" . $fileID); $requestUrl = preg_replace("/<.*>/", "", $urlsrc); $requestUrl = $requestUrl . str_replace('{1}', $guid, $wopi_url_temlpate); $requestUrl = str_replace("{0}", $fileUrl, $requestUrl).'&ui=zh-CN&rs=zh-CN'; - $wopiSrc=$protocol . "://" . $hostName . "/wopi/files/$fileID?access_token=$guid&ui=zh-CN&rs=zh-CN"; + $wopiSrc=getglobal('siteurl'). "wopi/files/$fileID?access_token=$guid&ui=zh-CN&rs=zh-CN"; $ret=array( 'fileID'=>$fileID, 'protocol'=>$protocol, diff --git a/core/class/class_image.php b/core/class/class_image.php index 6c24f66..d7bb09b 100644 --- a/core/class/class_image.php +++ b/core/class/class_image.php @@ -75,37 +75,13 @@ class image { if($dstwidth < 0 || $dstheight < 0) { return $this->returncode(false); } - //获取源图相关值 - $imginfo = @getimagesize($source); - - //原图像大小比列 - $yratio = $imginfo[0]/$imginfo[1]; - //目标图片大小比列 - $oratio = $dstwidth/$dstheight; - - if ($oratio > $yratio) { - $new_height = $dstwidth/$yratio; - $new_width = $dstwidth; - } else { - $new_width = $dstheight*$yratio; - $new_height = $dstheight; - } - if(!$srcx){ - $mid_x = $new_width/2; - $srcx = ($mid_x -($dstwidth/2)); - } - if(!$srcy){ - $mid_y = $new_height/2; - $srcy = ($mid_y -($dstheight/2)); - } - $this->param['dstwidth'] = intval($new_width); - $this->param['dstheight'] = intval($new_height); - $this->param['width'] = intval($dstwidth); - $this->param['height'] = intval($dstheight); + $this->param['dstwidth'] = intval($dstwidth); + $this->param['dstheight'] = intval($dstheight); $this->param['srcx'] = intval($srcx); $this->param['srcy'] = intval($srcy); - $this->param['srcwidth'] = intval($imginfo[0]); - $this->param['srcheight'] = intval($imginfo[1]); + $this->param['srcwidth'] = intval($srcwidth ? $srcwidth : $dstwidth); + $this->param['srcheight'] = intval($srcheight ? $srcheight : $dstheight); + $return = !$this->libmethod ? $this->Cropper_GD() : $this->Cropper_IM(); return $this->sleep($return); } @@ -420,13 +396,9 @@ class image { return $image; } $newimage = imagecreatetruecolor($this->param['dstwidth'], $this->param['dstheight']); - imagecopyresampled($newimage, $image, 0, 0, 0, 0, $this->param['dstwidth'], $this->param['dstheight'], $this->param['srcwidth'], $this->param['srcheight']); - $thumb = imagecreatetruecolor($this->param['width'], $this->param['height']); - - imagecopyresampled($thumb, $newimage, 0, 0, $this->param['srcx'], $this->param['srcy'], $this->param['width'], $this->param['height'], $this->param['width'], $this->param['height']); - ImageJpeg($thumb, $this->target, 100); + imagecopyresampled($newimage, $image, 0, 0, $this->param['srcx'], $this->param['srcy'], $this->param['dstwidth'], $this->param['dstheight'], $this->param['srcwidth'], $this->param['srcheight']); + ImageJpeg($newimage, $this->target, 100); imagedestroy($newimage); - imagedestroy($thumb); imagedestroy($image); return true; } diff --git a/core/class/class_template.php b/core/class/class_template.php index e447592..9d0abaa 100644 --- a/core/class/class_template.php +++ b/core/class/class_template.php @@ -151,7 +151,7 @@ class template { $template = preg_replace("/\<\!\-\-\{(.+?)\}\-\-\>/s", "{\\1}", $template); // js的lang替换 - $template = preg_replace_callback("/]+?src=\"(.+?)\".*?>[\s\S]*?/i", array($this, 'parse_template_callback_javascript'), $template); + $template = preg_replace_callback("/]+?src=\"(.+?)\".*?>[\s\S]*?/is", array($this, 'parse_template_callback_javascript'), $template); // 模版lang替换 $template = preg_replace_callback("/\{lang\s+(.+?)\}/is", array($this, 'parse_template_callback_languagevar_1'), $template); // 模版__lang替换 @@ -202,7 +202,7 @@ class template { } function parse_template_callback_javascript($matches) { - return $this -> loadjstemplate($matches[1]); + return $this -> loadjstemplate($matches); } function parse_template_callback_hook($matches){ @@ -306,7 +306,7 @@ class template { } function parse_template_callback_stripscriptamp_12($matches) { - return $this -> stripscriptamp($matches[1], $matches[2]); + return $this -> stripscriptamp($matches); } function parse_template_callback_stripblock_12($matches) { @@ -323,7 +323,9 @@ class template { return $jsonencode; } - function loadjstemplate($parameter) { + function loadjstemplate($matches) { + global $_G; + $parameter = $matches[1]; $paramet = trim($parameter,"\0"); $parameter = preg_replace_callback('/\{(.+?)\}/i',function($m){ $defineds = get_defined_constants(); @@ -335,7 +337,14 @@ class template { $src = preg_replace('/\?.*/i', '', $src); $jsname = str_replace('.','_',basename($src,'.js')); $content = @file_get_contents($src); - if(!$content) return ''; + $return .= preg_replace_callback("/]+?)src=\"(.+?)\"(.*?)>[\s\S]*?/is",function($m){ + return ''; + },$matches[0]); + unset($_G['template_paramet_replace_value']); + return $return; } - return '"; + function stripscriptamp($matches) { + global $_G; + $_G['template_extra-replace_val'] = str_replace('\\"', '"', $matches[2]); + $_G['template_src_replace_val'] = str_replace('&', '&', $matches[1]); + $return = preg_replace_callback("/\]*?)src=\"(.+?)\"(.*?)\>\s*\<\/script\>/is",function($match){ + return ""; + },$matches[0]); + unset($_G['template_extra-replace_val']); + unset($_G['template_src_replace_val']); + return $return; } function stripblock($var, $s) { diff --git a/core/class/dzz/Tpdb.php b/core/class/dzz/Tpdb.php index 961073b..69f7fa3 100644 --- a/core/class/dzz/Tpdb.php +++ b/core/class/dzz/Tpdb.php @@ -433,7 +433,8 @@ class Tpdb { }else{ // 查询字段的安全过滤 if(!preg_match('/^[A-Z_\|\&\-.a-z0-9\(\)\,]+$/',trim($key))){ - E(L('_EXPRESS_ERROR_').':'.$key); + //E(L('_EXPRESS_ERROR_').':'.$key); + echo '表达式错误:'.$key;exit; } // 多条件支持 $multi = is_array($val) && isset($val['_multi']); @@ -502,7 +503,8 @@ class Tpdb { $data = is_string($val[1])? explode(',',$val[1]):$val[1]; $whereStr .= ' ('.$key.' '.strtoupper($val[0]).' '.$this->parseValue($data[0]).' AND '.$this->parseValue($data[1]).' )'; }else{ - E(L('_EXPRESS_ERROR_').':'.$val[0]); + //E(L('_EXPRESS_ERROR_').':'.$val[0]); + echo '表达式错误:'.$key;exit; } }else { $count = count($val); diff --git a/core/class/dzz/Tpsqli.php b/core/class/dzz/Tpsqli.php index 9d735be..f7e5171 100644 --- a/core/class/dzz/Tpsqli.php +++ b/core/class/dzz/Tpsqli.php @@ -30,7 +30,9 @@ class Tpsqli extends Tpdb{ if ( !isset($this->linkID[$linkNum]) ) { if(empty($config)) $config = $this->config; $this->linkID[$linkNum] = new \mysqli($config['hostname'],$config['username'],$config['password'],$config['database'],$config['hostport']?intval($config['hostport']):3306); - if (mysqli_connect_errno()) E(mysqli_connect_error()); + if (mysqli_connect_errno()){ + echo "数据库连接错误";exit;//E(mysqli_connect_error()); + } $dbVersion = $this->linkID[$linkNum]->server_version; // 设置数据库编码 diff --git a/core/class/dzz/config.php b/core/class/dzz/config.php index 8148f43..0034b12 100644 --- a/core/class/dzz/config.php +++ b/core/class/dzz/config.php @@ -14,12 +14,11 @@ class Config{ define('APP_URL','index.php'); //默认应用配置 $default_mod_file=DZZ_ROOT.'./data/cache/default_mod.php'; - if(@file_exists($default_mod_file)){ + if(CURSCRIPT == 'dzz' && @file_exists($default_mod_file)){ $default_mod_config = require_once $default_mod_file; $_config = array_merge($_config,$default_mod_config); } //应用配置 - if(@file_exists(DZZ_ROOT.CURSCRIPT.BS.CONFIG_NAME.BS.CONFIG_NAME.EXT)){ $app_config = require_once DZZ_ROOT.CURSCRIPT.BS.CONFIG_NAME.BS.CONFIG_NAME.EXT; if(isset($app_config['db']) ){ @@ -27,34 +26,24 @@ class Config{ } $_config = array_merge($_config,$app_config); } - $mod = isset($param[MOULD]) ? $param[MOULD]:$_config['default_mod']; + if(!empty($mod)){ - if(strpos(strtolower($mod),':')!==false) { - $patharr = explode(':', $mod); - $modvar = true; - foreach ($patharr as $path) { - if (!preg_match("/\w+/i", $path)) $modvar = false; - } if($modvar) define('CURMODULE',str_replace(':', '/', $mod)); - }else{ - if(CURSCRIPT == 'dzz' && $mod == 'index'){ - + /* if(CURSCRIPT == 'dzz' && $mod == 'index'){ define('CURMODULE',CURSCRIPT); $modconfig = DZZ_ROOT.CURMODULE.BS.CONFIG_NAME.BS.CONFIG_NAME.EXT; - - }else{ - + }else{*/ define('CURMODULE',$mod); $modconfig = DZZ_ROOT.APP_PATH.BS.CURMODULE.BS.CONFIG_NAME.BS.CONFIG_NAME.EXT; - } + // } } if(@file_exists($modconfig)){ //模块配置 @@ -64,9 +53,7 @@ class Config{ } //配置合并 if(is_array($mod_config)){ - $_config = array_merge($_config,$mod_config); - } } diff --git a/core/class/dzz/dzz_app.php b/core/class/dzz/dzz_app.php index d190ba0..ec675c5 100644 --- a/core/class/dzz/dzz_app.php +++ b/core/class/dzz/dzz_app.php @@ -272,6 +272,9 @@ class dzz_app extends dzz_base{ system_error('config_notfound'); } } + //设置默认语言; + setglobal('language',$_config['output']['language']); + //系统编码配置 if (strtoupper(substr(PHP_OS, 0,3)) === 'WIN') { $config['system_os']='windows'; diff --git a/core/class/dzz/dzz_ftp.php b/core/class/dzz/dzz_ftp.php index acabfcf..8f7968b 100644 --- a/core/class/dzz/dzz_ftp.php +++ b/core/class/dzz/dzz_ftp.php @@ -36,7 +36,7 @@ class dzz_ftp if(empty($this->config['on']) || empty($this->config['host'])) { $this->set_error(FTP_ERR_CONFIG_OFF); } else { - $this->func = $this->config['ssl'] && function_exists('ftp_ssl_connect') ? 'ftp_ssl_connect' : 'ftp_connect'; + $this->func = /*$this->config['ssl'] &&*/ function_exists('ssh2_connect') ? 'ssh2_connect' : 'ftp_connect'; if($this->func == 'ftp_connect' && !function_exists('ftp_connect')) { $this->set_error(FTP_ERR_SERVER_DISABLED); } else { diff --git a/core/class/dzz/dzz_io.php b/core/class/dzz/dzz_io.php index 87f8056..ecbce1f 100644 --- a/core/class/dzz/dzz_io.php +++ b/core/class/dzz/dzz_io.php @@ -74,16 +74,18 @@ class dzz_io function output_thumb($file,$mine='image/JPEG'){//根据文件地址,输出图像流 global $_G; $last_modified_time = filemtime($file); - $etag = md5_file($file); - header("Last-Modified: " . gmdate("D, d M Y H:i:s", $last_modified_time) . " GMT"); - header("Etag: $etag"); - - if (@strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) == $last_modified_time || - trim($_SERVER['HTTP_IF_NONE_MATCH']) == $etag - ) { - header("HTTP/1.1 304 Not Modified"); - exit; + if($last_modified_time){ + $etag = md5_file($file); + header("Last-Modified: " . gmdate("D, d M Y H:i:s", $last_modified_time) . " GMT"); + header("Etag: $etag"); + if (@strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) == $last_modified_time || + trim($_SERVER['HTTP_IF_NONE_MATCH']) == $etag + ) { + header("HTTP/1.1 304 Not Modified"); + exit; + } } + /*if(!$last_modified_time) $last_modified_time = TIMESTAMP;*/ @header('cache-control:public'); header('Content-Type: '.$mine); @ob_end_clean(); @@ -94,9 +96,9 @@ class dzz_io exit(); } //获取缩略图 - function getThumb($path,$width,$height,$original,$returnurl=false,$srcx = 0,$srcy=0){ + function getThumb($path,$width,$height,$original,$returnurl=false,$thumbtype = 1){ $path=self::clean($path); - if($io=self::initIO($path)) return $io->getThumb($path,$width,$height,$original,$returnurl,$srcx,$srcy); + if($io=self::initIO($path)) return $io->getThumb($path,$width,$height,$original,$returnurl,$thumbtype); } /* *通过icosdata获取folderdata数据 @@ -168,10 +170,10 @@ class dzz_io //$tbz:目标api; //返回: //$icosdata数组; - function CopyTo($opath,$path,$iscopy=0,$force = false){ + function CopyTo($opath,$path,$iscopy=0){ $path=self::clean($path); $opath=self::clean($opath); - if($io=self::initIO($opath)) return $io->CopyTo($opath,$path,$iscopy,$force); + if($io=self::initIO($opath)) return $io->CopyTo($opath,$path,$iscopy); else return false; } @@ -197,7 +199,7 @@ class dzz_io if($data['icoid']==$data['newdata']['icoid']){ $data['newdata']['move']=1; }else{ - $arr=IO::Delete($data['path'],true,$force); + $arr=IO::Delete($data['path']); if($arr['icoid']) $data['delete']=1; else $data['success']=$arr['error']; } @@ -208,20 +210,19 @@ class dzz_io //添加目录 //$fname:目录名称; //$path:目录位置路径,如果是本地,$path 为pfid - //$force:如果为true,忽略权限验证直接执行,默认为false - function CreateFolder($path,$fname,$perm=0,$force=false,$params=array(),$ondup='newcopy'){ + function CreateFolder($path,$fname,$perm=0,$params=array(),$ondup='newcopy'){ $path=self::clean($path);//11 $fname=self::name_filter($fname); - if($io=self::initIO($path)) return $io->CreateFolder($path,$fname,$perm,$force,$params,$ondup); + if($io=self::initIO($path)) return $io->CreateFolder($path,$fname,$perm,$params,$ondup); else return false; } //添加多层目录 //$fid:父级目录id; //$path:目录位置路径,如aaa/bbb/ccc - function CreateFolderByPath($path,$fid,$bz='dzz',$force = false,$params=array()){ + function CreateFolderByPath($path,$fid,$bz='dzz',$params=array()){ $path=self::clean($path); if($io=self::initIO($bz)) { - return $io->CreateFolderByPath($path,$fid,$force,$params); + return $io->CreateFolderByPath($path,$fid,$params); } else return false; } @@ -255,18 +256,18 @@ class dzz_io //覆盖文件内容 //$data:文件的信息数组 //返回我文件data; - function setFileContent($path,$data,$force=false){ + function setFileContent($path,$data,$force=false,$nocover = true){ $path=self::clean($path); - if($io=self::initIO($path)) return $io->setFileContent($path,$data,$force); + if($io=self::initIO($path)) return $io->setFileContent($path,$data,$force,$nocover); else return false; } //分片上传文件; //$path: 路径 - function multiUpload($file,$path,$filename,$force = false,$attach=array(),$ondup="newcopy"){ + function multiUpload($file,$path,$filename,$attach=array(),$ondup="newcopy"){ $path=self::clean($path); $filename=self::name_filter($filename); - if($io=self::initIO($path)) return $io->multiUpload($file,$path,$filename,$force,$attach,$ondup); + if($io=self::initIO($path)) return $io->multiUpload($file,$path,$filename,$attach,$ondup); else return false; } @@ -281,18 +282,18 @@ class dzz_io else return false; } - function upload_by_content($fileContent,$path,$filename,$force = false){ + function upload_by_content($fileContent,$path,$filename){ $path=self::clean($path); $filename=self::name_filter($filename); - if($io=self::initIO($path)) return $io->upload_by_content($fileContent,$path,$filename,$force); + if($io=self::initIO($path)) return $io->upload_by_content($fileContent,$path,$filename); else return false; } - public function uploadStream($file,$name,$path,$relativePath='',$content_range='',$force = false){ + public function uploadStream($file,$name,$path,$relativePath='',$content_range=''){ $path=self::clean(urldecode($path)); $name=self::name_filter(urldecode($name)); $relativePath=self::clean(urldecode($relativePath)); - if($io=self::initIO($path)) return $io->uploadStream($file,$name,$path,$relativePath,$content_range,$force); + if($io=self::initIO($path)) return $io->uploadStream($file,$name,$path,$relativePath,$content_range); else return false; } @@ -304,10 +305,10 @@ class dzz_io else return false; } //恢复文件 - function Recover($path,$force=false,$noperm=false){ + function Recover($path,$combine=true){ $path=self::clean($path); if($io=self::initIO($path)) { - return $io->Recover($path,$force,$noperm); + return $io->Recover($path,$combine); } else return false; } @@ -321,10 +322,10 @@ class dzz_io } - public function download($paths,$filename=''){ + public function download($paths,$filename='',$checkperm = true){ $paths = (array)$paths; $paths=self::clean($paths); - if($io=self::initIO($paths[0])) $io->download($paths,$filename); + if($io=self::initIO($paths[0])) $io->download($paths,$filename,$checkperm); else return false; } diff --git a/core/class/dzz/dzz_notification.php b/core/class/dzz/dzz_notification.php index da55461..c55c273 100644 --- a/core/class/dzz/dzz_notification.php +++ b/core/class/dzz/dzz_notification.php @@ -63,6 +63,8 @@ class dzz_notification { $oldnote['new'] = 0; $setarr['id']=C::t('notification')->insert($setarr, true); } + $noteid=$setarr['id']; + Hook::listen('online_notification', $noteid); //self::wx_notification($setarr); //$banType = array('task'); if(empty($oldnote['new'])) { @@ -118,7 +120,7 @@ class dzz_notification { } } - + public function update_newprompt($uid, $type) { global $_G; if($_G['member']['newprompt_num']) { diff --git a/core/class/dzz/dzz_sftp.php b/core/class/dzz/dzz_sftp.php new file mode 100644 index 0000000..0889dee --- /dev/null +++ b/core/class/dzz/dzz_sftp.php @@ -0,0 +1,415 @@ +set_error(0); + $this->config = !$config ? getglobal('setting/ftp') : $config; + $this->enabled = false; + if(empty($this->config['on']) || empty($this->config['host'])) { + $this->set_error(SFTP_ERR_CONFIG_OFF); + } else { + $this->func = 'ssh2_connect'; + if(!function_exists('ssh2_connect')) { + $this->set_error(SFTP_ERR_SERVER_DISABLED); + } else { + $this->config['host'] = $this->clear($this->config['host']); + $this->config['port'] = intval($this->config['port']); + //$this->config['ssl'] = intval($this->config['ssl']); + $this->config['username'] = $this->clear($this->config['username']); + $this->config['password'] = authcode($this->config['password'], 'DECODE', md5(getglobal('config/security/authkey'))); + $this->config['timeout'] = intval($this->config['timeout']); + $this->config['charset'] = ($this->config['charset']); + $this->enabled = true; + } + } + } + function basename($path){ + $arr=explode('/',$path); + return $arr[count($arr)-1]; + } + function upload($source, $target, $mode = 0777) + { + if ($this->error()) { + return 0; + } + + $res = 0; + if (!$this->error()) { + $target = $this->clear($target); + $source = $this->clear($source); + if (!ssh2_scp_send($this->connectid, $source, $target, $mode)) { + $sftp = ssh2_sftp($this->connectid); + $tdir = dirname($target); + $this->ftp_mkdir($tdir); + $sftpStream = fopen('ssh2.sftp://' . $sftp . $target, 'w'); + try { + + if (!$sftpStream) { + //throw new Exception("Could not open remote file: $source"); + $this->set_error("Could not open remote file: $target"); + return 0; + } + + $data_to_send = file_get_contents($source); + + if ($data_to_send === false) { + // throw new Exception("Could not open local file: $source."); + $this->set_error("Could not open local file: $source."); + return 0; + } + + if (fwrite($sftpStream, $data_to_send) === false) { + //throw new Exception("Could not send data from file: $source."); + $this->set_error("Could not send data from file: $source."); + return 0; + } + + fclose($sftpStream); + return 1; + + } catch (Exception $e) { + //error_log('Exception: ' . $e->getMessage()); + $this->set_error('Exception: ' . $e->getMessage()); + fclose($sftpStream); + } + } + ssh2_exec($this->connectid, 'exit'); + return 1; + } + + return 0; + } + + function connect() { + if(!$this->enabled || empty($this->config)) { + return 0; + } else { + return $this->sftp_connect( + $this->config['host'], + $this->config['username'], + $this->config['password'], + $this->config['attachdir'], + $this->config['port'], + $this->config['timeout'], + $this->config['ssl'], + $this->config['pasv'] + ); + } + } + function sftp_connect($ftphost, $username, $password, $ftppath, $ftpport = 22, $timeout = 30, $ftpssl = 0, $ftppasv = 0) { + $res = 0; + $fun = $this->func; + + if($this->connectid = $fun($ftphost, $ftpport)) { + + if($this->ftp_login($username, $password)) { + $res = $this->connectid; + } else { + $this->set_error(FTP_ERR_USER_NO_LOGGIN); + } + } else { + $this->set_error(SFTP_ERR_CONNECT_TO_SERVER); + } + if($res) { + $this->set_error(); + $this->enabled = 1; + return $this->sftp=ssh2_sftp($res); + //$this->systype=$this->SFTP_systype(); + } else { + $this->enabled = 0; + $this->ftp_close(); + } + return 0; + + } + + function set_error($code = 0) { + $this->_error = $code; + } + + function error() { + return $this->_error; + } + + function clear($str) { + return str_replace(array('/./','//'),'/',str_replace(array( "\n", "\r", '..'), '', $str)); + } + + + /*function set_option($cmd, $value) { + if(function_exists('SFTP_set_option')) { + return @SFTP_set_option($this->connectid, $cmd, $value); + } + }*/ + + function ftp_mkdir($directory) { + $directory = $this->clear($directory); + //return @ssh2_sftp_mkdir($this->connectid, $dir,true); + $epath = explode('/', $directory); + $dir = '';$comma = ''; + foreach($epath as $path) { + $dir .= $comma.$path; + $comma = '/'; + $return = @ssh2_sftp_mkdir($this->sftp, $dir); + $this->ftp_chmod($dir); + } + return $return; + } + + function ftp_rmdir($directory) { + $directory = $this->clear($directory); + return @ssh2_sftp_rmdir($this->sftp, $directory); + } + function ftp_rmdir_force($path){ + $path = $this->clear($path); + if(!ssh2_sftp_rmdir($this->sftp, $path)){ + //检查子目录 + if($list=self::ftp_list($path,0)){ + foreach($list as $value){ + if($value['type']=='folder'){ + self::ftp_rmdir_force($value['path']); + }else{ + self::ftp_delete($value['path']); + } + } + } + return ssh2_sftp_rmdir($this->sftp, $path); + }else{ + return true; + } + } + + function ftp_put($remote_file, $local_file , $mode = 0777) { + + $remote_file = $this->clear($remote_file); + $local_file = $this->clear($local_file); + //$mode = intval($mode); + //echo $this->connectid.'===='.$remote_file.'===='.$local_file; + return ssh2_scp_send($this->connectid, $local_file, $remote_file); + } + + /*function sftp_fput($remote_file, $sourcefp, $mode = 0644,$startpos=0) { + $remote_file = $this->clear($remote_file); + $mode = intval($mode); + return @SFTP_fput($this->connectid, $remote_file, $sourcefp, $mode,$startpos); + }*/ + + function ftp_size($remote_file) { + $remote_file = $this->clear($remote_file); + $statinfo = ssh2_sftp_stat($this->sftp, $remote_file); + return $statinfo['size']; + } + + function ftp_close() { + @ssh2_exec($this->connection,'echo "EXITING" && exit;'); + $this->connection = NULL; + return true; + } + function ftp_rename($path,$newpath) { + $path = $this->clear($path); + $newpath = $this->clear($newpath); + return @ssh2_sftp_rename($this->sftp, $path,$newpath); + } + function ftp_delete($path) { + $path = $this->clear($path); + return ssh2_sftp_unlink($this->sftp, $path); + } + + function sftp_get($local_file, $remote_file) { + $remote_file = $this->clear($remote_file); + $local_file = $this->clear($local_file); + return @ssh2_scp_recv($this->connectid, $remote_file, $local_file); + } + + function ftp_login($username, $password) { + //$username = $this->clear($username); + //$password = str_replace(array("\n", "\r"), array('', ''), $password); + if(@ssh2_auth_password($this->connectid,$username, $password)) { + return true; + } else { + $this->set_error(SFTP_ERR_USER_NO_LOGGIN); + return false; + } + } + /* + function SFTP_pasv($pasv) { + return @SFTP_pasv($this->connectid, $pasv ? true : false); + }*/ + + /*function SFTP_chdir($directory) { + $directory = $this->clear($directory); + return @SFTP_chdir($this->connectid, $directory); + }*/ + + /*function SFTP_site($cmd) { + $cmd = $this->clear($cmd); + return @SFTP_site($this->connectid, $cmd); + }*/ + + function ftp_chmod($filename, $chmod = 0777) { + //$chmod = octdec ( str_pad ( $chmod, 4, '0', STR_PAD_LEFT ) ); + //$chmod = (int) $chmod; + + $filename = $this->clear($filename); + if(function_exists('ssh2_sftp_chmod')) { + return @ssh2_sftp_chmod($this->sftp, $chmod, $filename); + } else { + return @ssh2_exec($this->connectid, 'CHMOD '.$chmod.' '.$filename); + } + } + function ftp_chmod_son($filename,$chmod = 0777){ + //$chmod = octdec ( str_pad ( $chmod, 4, '0', STR_PAD_LEFT ) ); + //$chmod = (int) $chmod; + + $filename = $this->clear($filename); + //检查子目录 + if($list=self::ftp_list($filename,0)){ + foreach($list as $value){ + if($value['type']=='folder'){ + self::ftp_chmod_son($value['path'],$chmod); + }else{ + self::sftp_chmod($value['path'],$chmod); + } + } + } + return self::ftp_chmod($filename,$chmod); + } + function ftp_meta($path){ + $path = $this->clear($path); + $ppath=substr($path,0,strrpos($path,'/')); + $data=self::ftp_list($ppath,0); + foreach($data as $value){ + if($value['path']==$path){ + $value['path']=diconv($value['path'],$this->config['charset'],CHARSET); + $value['name']=diconv($value['name'],$this->config['charset'],CHARSET); + return $value; + } + } + return false; + } + function ftp_mdtm($remote_file) { + $cmd = $this->clear($remote_file); + $statinfo = ssh2_sftp_stat($this->sftp, $remote_file); + return $statinfo['mtime']; + } + /*function SFTP_pwd() { + return @SFTP_pwd($this->connectid); + }*/ + /*function SFTP_systype(){ + return @SFTP_systype($this->connectid); + }*/ + function ftp_isdir($dir){ //判断是否为目录 + if($meta=self::ftp_meta($dir)){ + if($meta['type']=='folder') return true; + } + } + + function ftp_list($path,$iconv=0) { + $path = $this->clear($path); + if(empty($path)) $path='/'; + + $stdout_stream= ssh2_exec($this->connectid, '/usr/bin/ls -l '.$path); + stream_set_blocking($stdout_stream,true); + $rawList=array(); + while($line = fgets($stdout_stream)) { + $rawList[]=$line; + } + fclose($stdout_stream); + $data=self::parseRawList($rawList); + foreach($data as $key => $value){ + $value['path']=$iconv?diconv(preg_replace("/\/+/",'/',$path.'/'.$value['name']),$this->config['charset'],CHARSET):preg_replace("/\/+/",'/',$path.'/'.$value['name']); + $value['name']=$iconv?diconv($value['name'],$this->config['charset'],CHARSET):$value['name']; + $data[$key]=$value; + } + return $data; + } + function byteconvert($bytes) { + $symbol = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'); + $exp = floor( log($bytes) / log(1024) ); + return sprintf( '%.2f ' . $symbol[ $exp ], ($bytes / pow(1024, floor($exp))) ); + } + + function chmodnum($chmod) { + $trans = array('-' => '0', 'r' => '4', 'w' => '2', 'x' => '1', 't' => '1', 's' => '1'); + $chmod = substr(strtr($chmod, $trans), 1); + $array = str_split($chmod, 3); + return array_sum(str_split($array[0])) . array_sum(str_split($array[1])) . array_sum(str_split($array[2])); + } + + function parseRawList($rawList){ + $data=array(); + foreach($rawList as $key=>$value) + { + $temp=array(); + $parser = null; + /*if(preg_match("/Window/i",$this->systype)){ + $parser = explode(" ", preg_replace('!\s+!', ' ', $value)); + if(isset($parser)){ + list($month,$day,$year)=explode('-',$parser[0]); + $temp['mtime']=strtotime($year.'-'.$month.'-'.$day.' '.$parser[1]); + $temp['type']=preg_match("//i",$parser[2])?'folder':'file'; + + if($temp['type']=='folder'){ + $temp['size']=0; + $temp['name']=substr($value,strrpos($value,$parser[3])); + }else{ + $temp['size']=$parser[2]; + $temp['name']=substr($value,strrpos($value,$parser[3])); + } + $temp['mod']=0; + $data[] = $temp; + } + }else{*/ + + $parser = explode(" ", preg_replace('!\s+!', ' ', $value)); + //echo $value; + + if(count($parser)>8){ + + $temp['mod']=self::chmodnum($parser[0]); + $temp['mtime']=strtotime($parser[5].' '.$parser[6].' '.$parser[7]); + $temp['type']=(substr($parser[0], 0, 1)=='d')?'folder':'file'; + $temp['size']=$parser[4]; + $temp['name']=substr($value,strrpos($value,$parser[8])); + if($temp['name']!='.' && $temp['name']!='..'){ + // print_r($temp); + $data[] = $temp; + } + } + //} + } + return $data; + } + +} +?> \ No newline at end of file diff --git a/core/class/dzz/dzz_upgrade.php b/core/class/dzz/dzz_upgrade.php index 296ee40..b2176e9 100644 --- a/core/class/dzz/dzz_upgrade.php +++ b/core/class/dzz/dzz_upgrade.php @@ -53,11 +53,14 @@ class dzz_upgrade { return array(); } - $newupgradefilelist = array(); + $newupgradefilelist = $newlist = array(); foreach($upgradefilelist as $v) { $newupgradefilelist[$v] = md5_file(DZZ_ROOT.'./'.$v); + if( !$newupgradefilelist[$v] ){ + $newlist[$v]=$v; + } } - + $modifylist = $showlist = $searchlist = array(); foreach($dzzfiles as $line) { $file = trim(substr($line, 34)); @@ -86,7 +89,7 @@ class dzz_upgrade { } } - return array($modifylist, $showlist, $ignorelist); + return array($modifylist, $showlist, $ignorelist,$newlist); } public function compare_file_content($file, $remotefile) { @@ -110,7 +113,7 @@ class dzz_upgrade { $return = false; $upgradefile = $this->upgradeurl.$this->versionpath().'/upgrade.xml'; - $response = xml2array(dfsockopen($upgradefile)); + $response = xml2array(dfsockopen($upgradefile, 0, '', '', FALSE, '', 1)); if(isset($response['cross']) || isset($response['patch'])) { C::t('setting')->update('upgrade', $response); $return = true; @@ -277,8 +280,8 @@ class dzz_upgrade { $data = ''; foreach($update as $key => $value) { $data .= $key.'='.rawurlencode($value).'&'; - } - $upgradeurl = 'ht'.'tp:/'.'/dev'.'.'.'d'.'zzo'.'ffice.'.'c'.'om/co'.'unt'.'.p'.'hp?'.'os=d'.'zzoff'.'ice&update='.rawurlencode(base64_encode($data)).'×tamp='.TIMESTAMP; + } + $upgradeurl = APP_CHECK_URL."market/system/info/".rawurlencode(base64_encode($data))."/".TIMESTAMP; dfsockopen($upgradeurl,0, '', '', FALSE, '',1); } } diff --git a/core/class/dzz/dzz_upgrade_app.php b/core/class/dzz/dzz_upgrade_app.php index e4bd5de..1d68820 100644 --- a/core/class/dzz/dzz_upgrade_app.php +++ b/core/class/dzz/dzz_upgrade_app.php @@ -191,6 +191,40 @@ class dzz_upgrade_app { return $return; } + public function fetch_installapp_zip( $appinfo ){ + $file = DZZ_ROOT.'data/update/app/'.$appinfo['app_path'].'/'.$appinfo['identifier'].'/'.$appinfo['version'].'/'.$appinfo['identifier'].'.zip.md5.tmp'; + $upgradedataflag = true; + $upgradedata = @file_get_contents($file); + if(!$upgradedata) { + $upgradedata = dfsockopen($this->upgradeurl.$appinfo['app_path'].'/'.$appinfo['identifier'].'/'.$appinfo['latestversion'].'/'.$appinfo['identifier'].'.zip.md5.dzz' ); + $upgradedataflag = false; + } + + $return = array(); + $upgradedataarr = explode("\n", str_replace("\r\n","\n",$upgradedata)); + foreach($upgradedataarr as $k => $v) { + if(!$v) { + continue; + } + $return['file'][$k] = trim(substr($v, 34)); + $return['md5'][$k] = substr($v, 0, 32); + if(trim(substr($v, 32, 2)) != '*') { + @unlink($file); + return array(); + } + + } + if(!$upgradedataflag) { + $this->mkdirs(dirname($file)); + $fp = fopen($file, 'w'); + if(!$fp) { + return array(); + } + fwrite($fp, $upgradedata); + } + return $return; + } + public function fetch_installfile_list( $appinfo ){ $file = DZZ_ROOT.'data/update/app/'.$appinfo['app_path'].'/'.$appinfo['identifier'].'/'.$appinfo['version'].'/'.$appinfo['identifier'].'.md5.tmp'; $upgradedataflag = true; diff --git a/core/class/dzz/route.php b/core/class/dzz/route.php index 5cc385f..f3c6fdd 100644 --- a/core/class/dzz/route.php +++ b/core/class/dzz/route.php @@ -15,7 +15,6 @@ class Route{ $mod = !empty($params[MOULD]) ? $params[MOULD]:$_config['default_mod']; $op = !empty($params[DIVIDE]) ? $params[DIVIDE]:$_config['default_op']; - if(empty($mod)){ if($_G['uid']<1 && !defined('ALLOWGUEST') && $_G['setting']['loginset']['available']){ @@ -74,6 +73,7 @@ class Route{ define('MOD_URL',BASESCRIPT.'?mod='.$mod); define('OP_NAME',$op); // $break = true; + Hook::listen('mod_run'); return DZZ_ROOT.$modfile; } } diff --git a/core/class/helper/helper_browser.php b/core/class/helper/helper_browser.php index 743724d..4fc1d38 100644 --- a/core/class/helper/helper_browser.php +++ b/core/class/helper/helper_browser.php @@ -1,199 +1,174 @@ $matches[1]); - } - //deal with IE - if (preg_match("/MSIE ([0-9]{1,2}\.[0-9]{1,2})/", $useragent, $matches)) { - return array('ie'=>$matches[1]); - } - } - elseif (strpos($useragent, 'IEMobile') !== FALSE) { - if (preg_match("/IEMobile\/([0-9]{1,2}\.[0-9]{1,2})/", $useragent, $matches)) { - return array('ie'=>$matches[1],'ismobile'=>$matches[1]); - - } - } - - elseif (strpos($useragent, 'Gecko')) { - //deal with Gecko based - if (strpos($useragent, 'Trident/7.0') !== FALSE && strpos($useragent, 'rv:11.0') !== FALSE) { - return array('ie'=>11); - } - //if firefox - elseif (preg_match("/Firefox\/([0-9]{1,2}\.[0-9]{1,2}(\.[0-9]{1,2})?)/", $useragent, $matches)) { - return array('firefox'=>$matches[1]); - } - - //if Netscape (based on gecko) - if (preg_match("/Netscape\/([0-9]{1}\.[0-9]{1}(\.[0-9])?)/", $useragent, $matches)) { - return array('netscape'=>$matches[1]); - } - - //check chrome before safari because chrome agent contains both - if (preg_match("/Chrome\/([^\s]+)/", $useragent, $matches)) { - return array('chrome'=>$matches[1]); - } - - //if Safari (based on gecko) - if (preg_match("/Safari\/([0-9]{2,4}(\.[0-9])?)/", $useragent, $matches)) { - return array('safari'=>$matches[1]); - } - - //if Galeon (based on gecko) - if (preg_match("/Galeon\/([0-9]{1}\.[0-9]{1}(\.[0-9])?)/", $useragent, $matches)) { - return array('galeon'=>$matches[1]); - } - - //if Konqueror (based on gecko) - if (preg_match("/Konqueror\/([0-9]{1}\.[0-9]{1}(\.[0-9])?)/", $useragent, $matches)) { - return array('konqueror'=>$matches[1]); - } - - // if Fennec (based on gecko) - if (preg_match("/Fennec\/([0-9]{1}\.[0-9]{1}(\.[0-9])?)/", $useragent, $matches)) { - return array('fennec'=>$matches[1]); - } - - // if Maemo (based on gecko) - if (preg_match("/Maemo\/([0-9]{1}\.[0-9]{1}(\.[0-9])?)/", $useragent, $matches)) { - return array('maemo'=>$matches[1]); - } - - //no specific Gecko found - //return generic Gecko - return array('Gecko based'=>true); - } - elseif (strpos($useragent, 'Opera') !== FALSE) { - //deal with Opera - if (preg_match("/Opera[\/ ]([0-9]{1}\.[0-9]{1}([0-9])?)/", $useragent, $matches)) { - return array('opera'=>$matches[1]); - } - } - elseif (strpos($useragent, 'Lynx') !== FALSE) { - //deal with Lynx - if (preg_match("/Lynx\/([0-9]{1}\.[0-9]{1}(\.[0-9])?)/", $useragent, $matches)) { - return array('lynx'=>$matches[1]); - } - } - elseif (strpos($useragent, 'Netscape') !== FALSE) { - //NN8 with IE string - if (preg_match("/Netscape\/([0-9]{1}\.[0-9]{1}(\.[0-9])?)/", $useragent, $matches)) { - return array('netscape'=>$matches[1]); - } - } - else { - //unrecognized, this should be less than 1% of browsers (not counting bots like google etc)! - return 'unknown'; - } - } - - static function ismobile(){ - $agent = strtolower($_SERVER['HTTP_USER_AGENT']); - if (preg_match("/WindowsWechat/i", $agent)){ - return 'WindowsWechat'; - }elseif (preg_match("/MicroMessenger/i", $agent)){ - return 'wechat'; - }elseif (preg_match("/iphone/i", $agent) && preg_match("/mac os/i", $agent)){ - return 'iPhone'; - }elseif (preg_match("/ipod/i", $agent) && preg_match("/mac os/i", $agent)){ - return 'iPod'; - }elseif (preg_match("/linux/i", $agent) && preg_match("/Android/i", $agent)){ - return 'Android'; - } - return false; - } - - //A function to determine the platform we are on. - //判断平台的种类 - - static function getplatform() - { - $agent = strtolower($_SERVER['HTTP_USER_AGENT']); - $os = array();; - - if (preg_match("/win/i",$agent) && preg_match('/nt 5.1/', $agent)) - { - $os = array('Windows'=>'XP'); - } - elseif (preg_match('win',$agent) && preg_match('/nt 5.0/',$agent)) - { - $os = array('Windows'=>'2000'); - } - elseif (preg_match('win',$agent) && preg_match("/nt 5.2/i",$agent)) - { - $os = array('Windows'=>'2003'); - } - elseif (preg_match("/win/i",$agent) && preg_match("/nt 6.0/i",$agent)) - { - $os = array('Windows'=>'2008'); - } - elseif (preg_match("/win/i",$agent) && preg_match("/6.0/i",$agent)) - { - $os = array('Windows'=>'vasta'); - } - elseif (preg_match("/win/i",$agent) && preg_match("/6.1/i",$agent)) - { - $os = array('Windows'=>'7'); - } - elseif (preg_match("/win/i",$agent) && preg_match("/6.2/i",$agent)) - { - $os = array('Windows'=>'8'); - } - elseif (preg_match("/win/i",$agent) && preg_match("/nt 6.3/i",$agent)) - { - $os = array('Windows'=>'8.1'); - } - elseif (preg_match("/win/i",$agent) && preg_match("/nt/i",$agent)) - { - $os = array('Windows'=>'nt'); - } - elseif (preg_match("/ipad/i",$agent) && preg_match('/mac os/i', $agent)) - { - $os = array('iPad'=>true); - } - elseif (preg_match("/iphone/i",$agent) && preg_match('/mac os/i', $agent)) - { - $os = array('iPhone'=>true); - } - elseif (preg_match("/ipod/i",$agent) && preg_match('/mac os/i', $agent)) - { - $os = array('iPod'=>true); - } - elseif (preg_match("/linux/i",$agent) && preg_match('/Android/i', $agent)) - { - $os = array('Android'=>true); - } - elseif (preg_match("/linux/i",$agent)) - { - $os = array('Linux'=>true); - } - elseif (preg_match("/unix/i",$agent)) - { - $os = array('Unix'=>true); - } - - elseif (preg_match("/Mac/i",$agent) && preg_match("/Macintosh/i",$agent)) - { - $os = array('Macintosh'=>true); - } - - - return $os; - } +class helper_browser +{ + //判断返回的字符串提取对应的字符做出判断 + //A function to determine what browser and version we are using. + + static function getBrowser($useragent = null) + { + // check for most popular browsers first + // unfortunately, that's IE. We also ignore Opera and Netscape 8 + // because they sometimes send msie agent + $useragent = $useragent ? $useragent : $_SERVER['HTTP_USER_AGENT']; + if (strpos($useragent, 'MSIE') !== FALSE && strpos($useragent, 'Opera') === FALSE && strpos($useragent, 'Netscape') === FALSE) { + //deal with Blazer + if (preg_match("/Blazer\/([0-9]{1}\.[0-9]{1}(\.[0-9])?)/", $useragent, $matches)) { + return array('blazer' => $matches[1]); + } + //deal with IE + if (preg_match("/MSIE ([0-9]{1,2}\.[0-9]{1,2})/", $useragent, $matches)) { + return array('ie' => $matches[1]); + } + } elseif (strpos($useragent, 'IEMobile') !== FALSE) { + if (preg_match("/IEMobile\/([0-9]{1,2}\.[0-9]{1,2})/", $useragent, $matches)) { + return array('ie' => $matches[1], 'ismobile' => $matches[1]); + + } + } elseif (strpos($useragent, 'Gecko')) { + //deal with Gecko based + if (strpos($useragent, 'Trident/7.0') !== FALSE && strpos($useragent, 'rv:11.0') !== FALSE) { + return array('ie' => 11); + } //if firefox + elseif (preg_match("/Firefox\/([0-9]{1,2}\.[0-9]{1,2}(\.[0-9]{1,2})?)/", $useragent, $matches)) { + return array('firefox' => $matches[1]); + } + + //if Netscape (based on gecko) + if (preg_match("/Netscape\/([0-9]{1}\.[0-9]{1}(\.[0-9])?)/", $useragent, $matches)) { + return array('netscape' => $matches[1]); + } + + //check chrome before safari because chrome agent contains both + if (preg_match("/Chrome\/([^\s]+)/", $useragent, $matches)) { + return array('chrome' => $matches[1]); + } + + //if Safari (based on gecko) + if (preg_match("/Safari\/([0-9]{2,4}(\.[0-9])?)/", $useragent, $matches)) { + return array('safari' => $matches[1]); + } + + //if Galeon (based on gecko) + if (preg_match("/Galeon\/([0-9]{1}\.[0-9]{1}(\.[0-9])?)/", $useragent, $matches)) { + return array('galeon' => $matches[1]); + } + + //if Konqueror (based on gecko) + if (preg_match("/Konqueror\/([0-9]{1}\.[0-9]{1}(\.[0-9])?)/", $useragent, $matches)) { + return array('konqueror' => $matches[1]); + } + + // if Fennec (based on gecko) + if (preg_match("/Fennec\/([0-9]{1}\.[0-9]{1}(\.[0-9])?)/", $useragent, $matches)) { + return array('fennec' => $matches[1]); + } + + // if Maemo (based on gecko) + if (preg_match("/Maemo\/([0-9]{1}\.[0-9]{1}(\.[0-9])?)/", $useragent, $matches)) { + return array('maemo' => $matches[1]); + } + + //no specific Gecko found + //return generic Gecko + return array('Gecko based' => true); + } elseif (strpos($useragent, 'Opera') !== FALSE) { + //deal with Opera + if (preg_match("/Opera[\/ ]([0-9]{1}\.[0-9]{1}([0-9])?)/", $useragent, $matches)) { + return array('opera' => $matches[1]); + } + } elseif (strpos($useragent, 'Lynx') !== FALSE) { + //deal with Lynx + if (preg_match("/Lynx\/([0-9]{1}\.[0-9]{1}(\.[0-9])?)/", $useragent, $matches)) { + return array('lynx' => $matches[1]); + } + } elseif (strpos($useragent, 'Netscape') !== FALSE) { + //NN8 with IE string + if (preg_match("/Netscape\/([0-9]{1}\.[0-9]{1}(\.[0-9])?)/", $useragent, $matches)) { + return array('netscape' => $matches[1]); + } + } else { + //unrecognized, this should be less than 1% of browsers (not counting bots like google etc)! + return 'unknown'; + } + } + + //判断是否为企业微信 + static function is_wxwork() + { + if (strpos($_SERVER['HTTP_USER_AGENT'], 'wxwork') !== false) { + return true; + } else { + return false; + } + } + + static function ismobile() + { + $agent = strtolower($_SERVER['HTTP_USER_AGENT']); + if (preg_match("/WindowsWechat/i", $agent)) { + return 'WindowsWechat'; + } elseif (preg_match("/MicroMessenger/i", $agent)) { + return 'wechat'; + } elseif (preg_match("/iphone/i", $agent) && preg_match("/mac os/i", $agent)) { + return 'iPhone'; + } elseif (preg_match("/ipod/i", $agent) && preg_match("/mac os/i", $agent)) { + return 'iPod'; + } elseif (preg_match("/linux/i", $agent) && preg_match("/Android/i", $agent)) { + return 'Android'; + } + return false; + } + + //A function to determine the platform we are on. + //判断平台的种类 + + static function getplatform() + { + $agent = strtolower($_SERVER['HTTP_USER_AGENT']); + $os = array();; + + if (preg_match("/win/i", $agent) && preg_match('/nt 5.1/', $agent)) { + $os = array('Windows' => 'XP'); + } elseif (preg_match('win', $agent) && preg_match('/nt 5.0/', $agent)) { + $os = array('Windows' => '2000'); + } elseif (preg_match('win', $agent) && preg_match("/nt 5.2/i", $agent)) { + $os = array('Windows' => '2003'); + } elseif (preg_match("/win/i", $agent) && preg_match("/nt 6.0/i", $agent)) { + $os = array('Windows' => '2008'); + } elseif (preg_match("/win/i", $agent) && preg_match("/6.0/i", $agent)) { + $os = array('Windows' => 'vasta'); + } elseif (preg_match("/win/i", $agent) && preg_match("/6.1/i", $agent)) { + $os = array('Windows' => '7'); + } elseif (preg_match("/win/i", $agent) && preg_match("/6.2/i", $agent)) { + $os = array('Windows' => '8'); + } elseif (preg_match("/win/i", $agent) && preg_match("/nt 6.3/i", $agent)) { + $os = array('Windows' => '8.1'); + } elseif (preg_match("/win/i", $agent) && preg_match("/nt/i", $agent)) { + $os = array('Windows' => 'nt'); + } elseif (preg_match("/ipad/i", $agent) && preg_match('/mac os/i', $agent)) { + $os = array('iPad' => true); + } elseif (preg_match("/iphone/i", $agent) && preg_match('/mac os/i', $agent)) { + $os = array('iPhone' => true); + } elseif (preg_match("/ipod/i", $agent) && preg_match('/mac os/i', $agent)) { + $os = array('iPod' => true); + } elseif (preg_match("/linux/i", $agent) && preg_match('/Android/i', $agent)) { + $os = array('Android' => true); + } elseif (preg_match("/linux/i", $agent)) { + $os = array('Linux' => true); + } elseif (preg_match("/unix/i", $agent)) { + $os = array('Unix' => true); + } elseif (preg_match("/Mac/i", $agent) && preg_match("/Macintosh/i", $agent)) { + $os = array('Macintosh' => true); + } + + + return $os; + } } + ?> diff --git a/core/class/helper/helper_config.php b/core/class/helper/helper_config.php new file mode 100644 index 0000000..6787f19 --- /dev/null +++ b/core/class/helper/helper_config.php @@ -0,0 +1,77 @@ + $config)); + $content .= "\r\n// ".str_pad(' THE END ', 50, '-', STR_PAD_BOTH)."\r\n return \$_config;"; + file_put_contents($filename, $content); +} + + public function setdefault($var, $default) { + foreach ($default as $k => $v) { + if(!isset($var[$k])) { + $var[$k] = $default[$k]; + } elseif(is_array($v)) { + $var[$k] = setdefault($var[$k], $default[$k]); + } + } + return $var; + } + public function getvars($data, $type = 'VAR') { + $evaluate = ''; + foreach($data as $key => $val) { + if(!preg_match("/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/", $key)) { + continue; + } + if(is_array($val)) { + $evaluate .= self::buildarray($val, 0, "\${$key}")."\r\n"; + } else { + $val = addcslashes($val, '\'\\'); + $evaluate .= $type == 'VAR' ? "\$$key = '$val';\n" : "define('".strtoupper($key)."', '$val');\n"; + } + } + return $evaluate; + } + public function buildarray($array, $level = 0, $pre = '$_config') { + static $ks; + if($level == 0) { + $ks = array(); + $return = ''; + } + + foreach ($array as $key => $val) { + if($level == 0) { + $newline = str_pad(' CONFIG '.strtoupper($key).' ', 70, '-', STR_PAD_BOTH); + $return .= "\r\n// $newline //\r\n"; + if($key == 'admincp') { + $newline = str_pad(' Founders: $_config[\'admincp\'][\'founder\'] = \'1,2,3\'; ', 70, '-', STR_PAD_BOTH); + $return .= "// $newline //\r\n"; + } + } + + $ks[$level] = $ks[$level - 1]."['$key']"; + if(is_array($val)) { + $ks[$level] = $ks[$level - 1]."['$key']"; + $return .= self::buildarray($val, $level + 1, $pre); + } else { + $val = is_string($val) || strlen($val) > 12 || !preg_match("/^\-?[1-9]\d*$/", $val) ? '\''.addcslashes($val, '\'\\').'\'' : $val; + $return .= $pre.$ks[$level - 1]."['$key']"." = $val;\r\n"; + } + } + return $return; + } +} +?> \ No newline at end of file diff --git a/core/class/helper/helper_page.php b/core/class/helper/helper_page.php index 8ca04cc..026c1e8 100644 --- a/core/class/helper/helper_page.php +++ b/core/class/helper/helper_page.php @@ -40,7 +40,7 @@ class helper_page { } $multipage = ''; if($jsfunc === FALSE) { - $mpurl .= strpos($mpurl, '?') !== FALSE ? '&' : '?'; + $mpurl .= strpos($mpurl, '?') !== FALSE ? '&' : '?'; } $realpages = 1; @@ -120,8 +120,8 @@ class helper_page { $return = ''; $lang['next'] = lang('nextpage'); $lang['prev'] = lang('prevpage'); - $next = $num == $perpage ? ''.$lang['next'].'' : ''; - $prev = $curpage > 1 ? ''.$lang['prev'].'' : ''; + $next = $num == $perpage ? ''.$lang['next'].'' : ''; + $prev = $curpage > 1 ? ''.$lang['prev'].'' : ''; if($next || $prev) { $return = '
    '.$prev.$next.'
    '; } diff --git a/core/class/io/io_ALIOSS.php b/core/class/io/io_ALIOSS.php index eba855f..1403693 100644 --- a/core/class/io/io_ALIOSS.php +++ b/core/class/io/io_ALIOSS.php @@ -243,19 +243,22 @@ class io_ALIOSS extends io_api global $_G; $imgcachePath='./imgcache/'; $cachepath=str_replace('//','/',str_replace(':','/',$path)); + foreach($_G['setting']['thumbsize'] as $value){ - $target=$imgcachePath.($cachepath).'.'.$value['width'].'_'.$value['height'].'.jpeg'; + $target = $imgcachePath . ($cachepath) . '.' . $value['width'] . '_' . $value['height'] . '_1.jpeg'; + $target1 = $imgcachePath . ($cachepath) . '.' . $value['width'] . '_' . $value['height'] . '_2.jpeg'; @unlink($_G['setting']['attachdir'].$target); + @unlink($_G['setting']['attachdir'].$target1); } } - public function createThumb($path,$size,$width=0,$height=0,$srcx = 0,$srcy = 0){ + public function createThumb($path,$size,$width=0,$height=0,$thumbtype = 1){ global $_G; if(intval($width)<1) $width=$_G['setting']['thumbsize'][$size]['width']; if(intval($height)<1) $height=$_G['setting']['thumbsize'][$size]['height']; $imgcachePath='imgcache/'; $cachepath=str_replace(urlencode('/'),'/',urlencode(str_replace('//','/',str_replace(':','/',$path)))); - $target=$imgcachePath.($cachepath).'.'.$width.'_'.$height.'.jpeg'; + $target = $imgcachePath . ($cachepath) . '.' . $width . '_' . $height . '_' .$thumbtype. '.jpeg'; if(@getimagesize($_G['setting']['attachdir'].'./'.$target)){ return 2;//已经存在缩略图 } @@ -278,7 +281,7 @@ class io_ALIOSS extends io_api $targetpath = dirname($target_attach); dmkdir($targetpath); $image=new image(); - if($thumb = $image->Cropper($fileurls['filedir'], $target, $width, $height,$srcx,$srcy)){ + if($thumb = $image->Thumb($fileurls['filedir'], $target, $width, $height,$thumbtype)){ //if($thumb = $image->Thumb($imgurl,$target,$width, $height,1) ){ return 1;//生成缩略图成功 }else{ @@ -287,11 +290,11 @@ class io_ALIOSS extends io_api } //获取缩略图 - public function getThumb($path,$width,$height,$original,$returnurl=false,$srcx = 0,$srcy = 0){ + public function getThumb($path,$width,$height,$original,$returnurl = false,$thumbtype = 1){ global $_G; $imgcachePath='imgcache/'; $cachepath=str_replace(urlencode('/'),'/',urlencode(str_replace('//','/',str_replace(':','/',$path)))); - $target = $imgcachePath . ($cachepath) . '.' . $width . '_' . $height . '.jpeg'; + $target = $imgcachePath . ($cachepath) . '.' . $width . '_' . $height . '_' .$thumbtype. '.jpeg'; if(!$original && @getimagesize($_G['setting']['attachdir'].'./'.$target)){ if($returnurl) return $_G['setting']['attachurl'].'/'.$target; IO::output_thumb($_G['setting']['attachdir'].'./'.$target); @@ -320,7 +323,7 @@ class io_ALIOSS extends io_api dmkdir($targetpath); require_once libfile('class/image'); $image = new image(); - if($thumb = $image->Cropper($imgurl, $target, $width, $height,$srcx,$srcy)){ + if($thumb = $image->Thumb($imgurl, $target, $width, $height,$thumbtype)){ if($returnurl) return $_G['setting']['attachurl'].'/'.$target; IO::output_thumb($_G['setting']['attachdir'].'./'.$target); }else{ @@ -706,7 +709,6 @@ class io_ALIOSS extends io_api $img=$_G['siteurl'].DZZSCRIPT.'?mod=io&op=thumbnail&size=small&path='.dzzencode($arr['bz'].$arr['bucket'].$meta['Key']); $url=$_G['siteurl'].DZZSCRIPT.'?mod=io&op=thumbnail&size=large&path='.dzzencode($arr['bz'].$arr['bucket'].$meta['Key']); }else{ - @include_once DZZ_ROOT.'./dzz/function/dzz_core.php'; $img=geticonfromext($ext,$type); $url=$_G['siteurl'].DZZSCRIPT.'?mod=io&op=getStream&path='.dzzencode($arr['bz'].$arr['bucket'].$meta['Key']);; } @@ -883,7 +885,7 @@ class io_ALIOSS extends io_api $path=$paths[0]; } $path=rawurldecode($path); - + //header("location: $url"); try { $url=self::getStream($path); diff --git a/core/class/io/io_OneDrive.php b/core/class/io/io_OneDrive.php index 3a98908..490cd29 100644 --- a/core/class/io/io_OneDrive.php +++ b/core/class/io/io_OneDrive.php @@ -325,18 +325,20 @@ class io_OneDrive extends io_api $imgcachePath='./imgcache/'; $cachepath=str_replace(urlencode('/'),'/',urlencode(str_replace(':','/',$path))); foreach($_G['setting']['thumbsize'] as $value){ - $target=$imgcachePath.($cachepath).'.'.$value['width'].'_'.$value['height'].'.jpeg'; + $target = $imgcachePath . ($cachepath) . '.' . $value['width'] . '_' . $value['height'] . '_1.jpeg'; + $target1 = $imgcachePath . ($cachepath) . '.' . $value['width'] . '_' . $value['height'] . '_2.jpeg'; @unlink($_G['setting']['attachdir'].$target); + @unlink($_G['setting']['attachdir'].$target1); } } - public function createThumb($path,$size,$width=0,$height=0,$srcx = 0,$srcy = 0){ + public function createThumb($path,$size,$width=0,$height=0,$thumbtype = 1){ global $_G; if(intval($width)<1) $width=$_G['setting']['thumbsize'][$size]['width']; if(intval($height)<1) $height=$_G['setting']['thumbsize'][$size]['height']; $imgcachePath='imgcache/'; $cachepath=str_replace(':','/',$path); $cachepath=preg_replace("/\/+/",'/',str_replace(':','/',$path)); - $target=$imgcachePath.($cachepath).'.'.$width.'_'.$height.'.jpeg'; + $target = $imgcachePath . ($cachepath) . '.' . $width . '_' . $height. '_'.$thumbtype.'.jpeg'; if(@getimagesize($_G['setting']['attachdir'].'./'.$target)){ return 2;//已经存在缩略图 } @@ -351,7 +353,7 @@ class io_OneDrive extends io_api dmkdir($targetpath); require_once libfile('class/image'); $image = new image(); - if($thumb = $image->Cropper($imgurl, $target, $width, $height,$srcx,$srcy)){ + if($thumb = $image->Thumb($imgurl, $target, $width, $height,$thumbtype)){ return 1; }else{ return 0; @@ -378,11 +380,13 @@ class io_OneDrive extends io_api return 1; } - public function getThumb($path,$width,$height,$original,$returnurl=false,$srcx =0,$srcy = 0){ + public function getThumb($path,$width,$height,$original,$returnurl=false,$thumbtype = 1){ global $_G; $imgcachePath='imgcache/'; $cachepath=str_replace(':','/',$path); $cachepath=preg_replace("/\/+/",'/',str_replace(':','/',$path)); + $target = $imgcachePath . ($cachepath) . '.' . $width . '_' . $height. '_'.$thumbtype.'.jpeg'; + if(!$original && @getimagesize($_G['setting']['attachdir'].'./'.$target)){ if($returnurl) return $_G['setting']['attachurl'].'/'.$target; IO::output_thumb($_G['setting']['attachdir'].'./'.$target); @@ -398,7 +402,7 @@ class io_OneDrive extends io_api dmkdir($targetpath); require_once libfile('class/image'); $image = new image(); - if($thumb = $image->Cropper($imgurl, $target, $width, $height,$srcx,$srcy)){ + if($thumb = $image->Thumb($imgurl, $target, $width, $height,$thumbtype)){ if($returnurl) return $_G['setting']['attachurl'].'/'.$target; IO::output_thumb($_G['setting']['attachdir'].'./'.$target); }else{ diff --git a/core/class/io/io_baiduPCS.php b/core/class/io/io_baiduPCS.php index 05b7acb..4babec0 100644 --- a/core/class/io/io_baiduPCS.php +++ b/core/class/io/io_baiduPCS.php @@ -265,18 +265,20 @@ class io_baiduPCS extends io_api $cachepath=str_replace(urlencode('/'),'/',urlencode(str_replace('//','/',str_replace(':','/',$path)))); foreach($_G['setting']['thumbsize'] as $value){ - $target=$imgcachePath.($cachepath).'.'.$value['width'].'_'.$value['height'].'.jpeg'; + $target = $imgcachePath . ($cachepath) . '.' . $value['width'] . '_' . $value['height'] . '_1.jpeg'; + $target1 = $imgcachePath . ($cachepath) . '.' . $value['width'] . '_' . $value['height'] . '_2.jpeg'; @unlink($_G['setting']['attachdir'].$target); + @unlink($_G['setting']['attachdir'].$target1); } } - public function createThumb($path,$size,$width=0,$height=0,$srcx = 0,$srcy = 0){ + public function createThumb($path,$size,$width = 0,$height = 0,$thumbtype = 1){ global $_G; if(intval($width)<1) $width=$_G['setting']['thumbsize'][$size]['width']; if(intval($height)<1) $height=$_G['setting']['thumbsize'][$size]['height']; $imgcachePath='imgcache/'; $cachepath=str_replace(':','/',$path); $cachepath=preg_replace("/\/+/",'/',str_replace(':','/',$path)); - $target=$imgcachePath.($cachepath).'.'.$width.'_'.$height.'.jpeg'; + $target=$imgcachePath.($cachepath).'.'.$width.'_'.$height. '_'.$thumbtype.'.jpeg'; if(@getimagesize($_G['setting']['attachdir'].'./'.$target)){ return 2;//已经存在缩略图 } @@ -291,7 +293,7 @@ class io_baiduPCS extends io_api dmkdir($targetpath); require_once libfile('class/image'); $image = new image(); - if($thumb = $image->Cropper($imgurl, $target, $width, $height,$srcx,$srcy)){ + if($thumb = $image->Thumb($imgurl, $target, $width, $height,$thumbtype)){ return 1; }else{ return 0; @@ -318,11 +320,12 @@ class io_baiduPCS extends io_api return true; } - public function getThumb($path,$width,$height,$original,$returnurl=false,$srcx =0,$srcy = 0){ + public function getThumb($path,$width,$height,$original,$returnurl = false , $thumbtype = 1){ global $_G; $imgcachePath='imgcache/'; $cachepath=str_replace(':','/',$path); $cachepath=preg_replace("/\/+/",'/',str_replace(':','/',$path)); + $target = $imgcachePath . ($cachepath) . '.' . $width . '_' . $height. '_'.$thumbtype.'.jpeg'; if(!$original && @getimagesize($_G['setting']['attachdir'].'./'.$target)){ if($returnurl) return $_G['setting']['attachurl'].'/'.$target; IO::output_thumb($_G['setting']['attachdir'].'./'.$target); @@ -338,7 +341,7 @@ class io_baiduPCS extends io_api dmkdir($targetpath); require_once libfile('class/image'); $image = new image(); - if($thumb = $image->Cropper($imgurl, $target, $width, $height,$srcx,$srcy)){ + if($thumb = $image->Thumb($imgurl, $target, $width, $height,$thumbtype)){ if($returnurl) return $_G['setting']['attachurl'].'/'.$target; IO::output_thumb($_G['setting']['attachdir'].'./'.$target); }else{ diff --git a/core/class/io/io_disk.php b/core/class/io/io_disk.php index fa31710..9aacca9 100644 --- a/core/class/io/io_disk.php +++ b/core/class/io/io_disk.php @@ -33,7 +33,7 @@ class io_disk extends io_api $this->_root='disk:'.$config['id'].':'; $this->encode=$config['charset']; $this->_rootname=$config['cloudname']; - $this->attachdir=$config['attachdir'].DS; + $this->attachdir=diconv($config['attachdir'],CHARSET,$config['charset']).DS; }else{ $this->error='need authorize'; @@ -92,18 +92,21 @@ class io_disk extends io_api $str='test read write'; $filename='新建文本文档__test.txt'; $filename_encode=diconv($filename,CHARSET,$config['charset']); - if(!$attachdir=realpath($config['attachdir'])) return array('error'=>'folder not exist! or no permission'); + //$filename_encode=$filename; + $filepath=diconv($config['attachdir'],CHARSET,$config['charset']); + if(!$attachdir=realpath($filepath)) return array('error'=>'folder not exist! or no permission'); if(!file_put_contents($attachdir.DIRECTORY_SEPARATOR.$filename_encode,$str)){ return array('error'=>'folder '.$config['attachdir'].' not writable'); } + //exit($attachdir.DIRECTORY_SEPARATOR.$filename_encode); if($str!=file_get_contents($attachdir.DIRECTORY_SEPARATOR.$filename_encode)){ return array('error'=>'folder '.$config['attachdir'].' not readable'); } - @unlink($attachdir.DIRECTORY_SEPARATOR.'test.txt'); + @unlink($attachdir.DIRECTORY_SEPARATOR.$filename_encode); return true; } public function authorize($refer){ - global $_G,$_GET,$clouds;; + global $_G,$_GET,$clouds; if(empty($_G['uid'])) { dsetcookie('_refer', rawurlencode(BASESCRIPT.'?mod=connect&op=oauth&bz=disk')); showmessage('to_login', '', array(), array('showmsg' => true, 'login' => 1)); @@ -111,12 +114,10 @@ class io_disk extends io_api if(submitcheck('disksubmit')){ $config=$_GET['config']; $config['bz']='disk'; - //$config['attachdir']=addslashes($config['attachdir']); $uid=defined('IN_ADMIN')?0:$_G['uid']; if($ret = self::checkdisk($config)){ - if($ret['error']) showmessage($ret['error'],BASESCRIPT.'?mod=connect&op=oauth&bz=disk'); + if($ret['error']) showmessage($ret['error'],BASESCRIPT.'?mod=cloud&op=space'); } - $config['uid']=$uid; if($id=DB::result_first("select id from %t where uid=%d and attachdir=%s",array(self::T,$uid,$config['attachdir']))){ DB::update(self::T,$config,"id ='{$id}'"); @@ -171,15 +172,18 @@ class io_disk extends io_api $imgcachePath='./imgcache/'; $cachepath=preg_replace("/\/+/",'/',str_replace(':','/',$path)); foreach($_G['setting']['thumbsize'] as $value){ - $target=$imgcachePath.($cachepath).'.'.$value['width'].'_'.$value['height'].'.jpeg'; + $target = $imgcachePath . ($cachepath) . '.' . $value['width'] . '_' . $value['height'] . '_1.jpeg'; + $target1 = $imgcachePath . ($cachepath) . '.' . $value['width'] . '_' . $value['height'] . '_2.jpeg'; @unlink($_G['setting']['attachdir'].$target); + @unlink($_G['setting']['attachdir'].$target1); } } - public function createThumb($path,$size,$width=0,$height=0,$srcx = 0,$srcy=0){ + public function createThumb($path,$size,$width = 0,$height = 0,$thumbtype = 1){ global $_G; $imgcachePath = 'imgcache/'; $cachepath=preg_replace("/\/+/",'/',str_replace(':','/',$path)); $target = $imgcachePath . ($cachepath) . '.' . $width . '_' . $height . '.jpeg'; + $target = $imgcachePath . ($cachepath) . '.' . $width . '_' . $height . '_'.$thumbtype.'.jpeg'; if (@getimagesize($_G['setting']['attachdir'] .'./'. $target)) { return 2;//已经存在缩略图 } @@ -189,8 +193,6 @@ class io_disk extends io_api $fileurls=array('fileurl'=>self::getFileUri($path),'filedir'=>self::getStream($path)); } $filepath = $fileurls['filedir']; - $srcx = 0; - $srcy = 0; if (intval($width) < 1) $width = $_G['setting']['thumbsize'][$size]['width']; if (intval($height) < 1) $height = $_G['setting']['thumbsize'][$size]['height']; @@ -208,16 +210,15 @@ class io_disk extends io_api $targetpath = dirname($target_attach); dmkdir($targetpath); $image = new image(); - //Thumb($source, $target, $thumbwidth, $thumbheight, $thumbtype = 1, $nosuffix = 0) - //Cropper($source, $target, $dstwidth, $dstheight, $srcx = 0, $srcy = 0, $srcwidth = 0, $srcheight = 0) - if ($thumb = $image->Cropper($filepath, $target, $width, $height,$srcx,$srcy,$imginfo[0],$imginfo[1])) { + + if ($thumb = $image->Thumb($filepath, $target, $width, $height,$thumbtype)) { return 1;//生成缩略图成功 } else { return 0;//生成缩略图失败 } } - public function getThumb($path,$width,$height,$original,$returnurl=false,$srcx = 0,$srcy = 0){ + public function getThumb($path,$width,$height,$original,$returnurl = false,$thumbtype = 0){ global $_G; $imgcachePath='imgcache/'; $cachepath=str_replace(':','/',$path); @@ -225,7 +226,7 @@ class io_disk extends io_api if(!$data=IO::getMeta($path)) return false; $enable_cache = true; //是否启用缓存 $quality = 80; - $target = $imgcachePath . ($cachepath) . '.' . $width . '_' . $height . '.jpeg'; + $target = $imgcachePath . ($cachepath) . '.' . $width . '_' . $height . '_'.$thumbtype.'.jpeg'; if (!$original && $enable_cache && @getimagesize($_G['setting']['attachdir'] .'./'. $target)) { if ($returnurl) return $_G['setting']['attachurl'] .'/'. $target; $file = $_G['setting']['attachdir'] . './' . $target; @@ -265,7 +266,7 @@ class io_disk extends io_api dmkdir($targetpath); $filepath = $fileurls['filedir']; $image = new image(); - if($thumb = $image->Cropper($filepath, $target, $width, $height,$srcx,$srcy)){ + if($thumb = $image->Thumb($filepath, $target, $width, $height,$thumbtype)){ //if ($thumb = $image->Thumb($file, $target, $width, $height, 1)) { if ($returnurl) return $_G['setting']['attachurl'] .'/'. $target; $file = $target_attach; @@ -384,13 +385,10 @@ class io_disk extends io_api */ function listFiles($path,$by='time',$order='desc',$limit='',$force=0){ if($this->error) return array('error'=>$this->error); - //echo $path; - $bzarr=self::parsePath($path); - //print_r($bzarr); + $bzarr=self::parsePath($path); $filepath=$this->attachdir.($bzarr['path']?('./'.$bzarr['path']):''); $icosdata=array(); foreach(new DirectoryIterator($filepath) as $file){ - if ($file->isDot()) { continue; } @@ -425,7 +423,7 @@ class io_disk extends io_api *$force>0 强制刷新,不读取缓存数据; */ function getMeta($path,$force=0){ - $bzarr=self::parsePath($path); + $bzarr=self::parsePath($path); $meta=array(); if($path==$this->_root){ $meta['path']=''; @@ -454,7 +452,7 @@ class io_disk extends io_api } } - + $icosdata=self::_formatMeta($meta,$bzarr['bz']); return $icosdata; } diff --git a/core/class/io/io_dzz.php b/core/class/io/io_dzz.php index af30175..c99a02a 100644 --- a/core/class/io/io_dzz.php +++ b/core/class/io/io_dzz.php @@ -45,7 +45,7 @@ class io_dzz extends io_api * 获取空间配额信息 * @return string */ - public function MoveToSpace($path, $attach=array()) + public function MoveToSpace($path, $attach = array()) { global $_G; $obz = io_remote::getBzByRemoteid($attach['remote']); @@ -133,6 +133,8 @@ class io_dzz extends io_api if ($bz == 'dzz') { return $_G['setting']['attachdir'] . $attach['attachment']; } else { + /* echo $bz . '/' . $attach['attachment']; + die;*/ return IO::getStream($bz . '/' . $attach['attachment'], $fop); } } elseif (strpos($path, 'dzz::') === 0) { @@ -180,7 +182,7 @@ class io_dzz extends io_api } //获取文件的真实地址 - public function getFileUri($path, $fop='') + public function getFileUri($path, $fop = '') { global $_G; if (strpos($path, 'attach::') === 0) { @@ -235,19 +237,22 @@ class io_dzz extends io_api $data = IO::getMeta($path); $imgcachePath = './imgcache/'; $cachepath = str_replace('//', '/', str_replace(':', '/', $data['attachment'])); + foreach ($_G['setting']['thumbsize'] as $value) { - $target = $imgcachePath . ($cachepath) . '.' . $value['width'] . '_' . $value['height'] . '.jpeg'; - @unlink($_G['setting']['attachdir'] . $target); + $target = $imgcachePath . ($cachepath) . '.' . $value['width'] . '_' . $value['height'] . '_1.jpeg'; + $target1 = $imgcachePath . ($cachepath) . '.' . $value['width'] . '_' . $value['height'] . '_2.jpeg'; + @unlink($_G['setting']['attachdir'].$target); + @unlink($_G['setting']['attachdir'].$target1); } } - public function createThumb($path, $size, $width = 0, $height = 0, $srcx = 0, $srcy = 0) + public function createThumb($path, $size, $width = 0, $height = 0, $thumbtype = 1) { global $_G; if (!$data = IO::getMeta($path)) return false; $imgcachePath = 'imgcache/'; $cachepath = str_replace('//', '/', str_replace(':', '/', $data['attachment'] ? $data['attachment'] : $data['path'])); - $target = $imgcachePath . ($cachepath) . '.' . $width . '_' . $height . '.jpeg'; + $target = $imgcachePath . ($cachepath) . '.' . $width . '_' . $height . '_'.$thumbtype.'.jpeg'; if (@getimagesize($_G['setting']['attachdir'] . './' . $target)) { return 2;//已经存在缩略图 } @@ -257,8 +262,7 @@ class io_dzz extends io_api $fileurls = array('fileurl' => self::getFileUri($path), 'filedir' => self::getStream($path)); } $filepath = $fileurls['filedir']; - $srcx = 0; - $srcy = 0; + if (intval($width) < 1) $width = $_G['setting']['thumbsize'][$size]['width']; if (intval($height) < 1) $height = $_G['setting']['thumbsize'][$size]['height']; @@ -278,21 +282,15 @@ class io_dzz extends io_api $image = new image(); //Thumb($source, $target, $thumbwidth, $thumbheight, $thumbtype = 1, $nosuffix = 0) //Cropper($source, $target, $dstwidth, $dstheight, $srcx = 0, $srcy = 0, $srcwidth = 0, $srcheight = 0) - if ($thumb = $image->Cropper($filepath, $target, $width, $height, $srcx, $srcy, $imginfo[0], $imginfo[1])) { + if ($thumb = $image->Thumb($filepath, $target, $width, $height, $thumbtype) ) { return 1;//生成缩略图成功 } else { return 0;//生成缩略图失败 } - /* if ($thumb = $image->Thumb($filepath, $target, $width, $height, 1)) { - return 1;//生成缩略图成功 - } else { - return 0;//生成缩略图失败 - }*/ - } //获取缩略图 - public function getThumb($path, $width=0, $height=0, $original = false, $returnurl = false, $srcx = 0, $srcy = 0) + public function getThumb($path, $width = 0, $height = 0, $original = false, $returnurl = false, $thumbtype = 1) { global $_G; //$path:可能的值 icoid,'dzz::dzz/201401/02/wrwsdfsdfasdsf.txt'等dzzPath格式; @@ -301,7 +299,7 @@ class io_dzz extends io_api $quality = 80; $imgcachePath = 'imgcache/'; $cachepath = str_replace('//', '/', str_replace(':', '/', $data['attachment'] ? $data['attachment'] : $data['path'])); - $target = $imgcachePath . ($cachepath) . '.' . $width . '_' . $height . '.jpeg'; + $target = $imgcachePath . ($cachepath) . '.' . $width . '_' . $height . '_'.$thumbtype.'.jpeg'; if (!$original && $enable_cache && @getimagesize($_G['setting']['attachdir'] . './' . $target)) { if ($returnurl) return $_G['setting']['attachurl'] . '/' . $target; $file = $_G['setting']['attachdir'] . './' . $target; @@ -341,7 +339,7 @@ class io_dzz extends io_api dmkdir($targetpath); $filepath = $fileurls['filedir']; $image = new image(); - if ($thumb = $image->Cropper($filepath, $target, $width, $height, $srcx, $srcy)) { + if ($thumb = $image->Thumb($filepath, $target, $width, $height, $thumbtype)) { //if ($thumb = $image->Thumb($file, $target, $width, $height, 1)) { if ($returnurl) return $_G['setting']['attachurl'] . '/' . $target; $file = $target_attach; @@ -353,62 +351,178 @@ class io_dzz extends io_api } exit(); } - //@param number $rid 文件的rid - //@param string $message 文件的新内容 - public function setFileContent($rid, $fileContent, $force = false) + + /*//将文件内容保存成文件,放入附件表 + private function saveFilecontentToAttach($icoarr,$filecontent){ + global $_G; + //保存的文件名 + $filename = $icoarr['name']; + $pathinfo = pathinfo($filename); + //获取后缀名 + $ext = strtolower($pathinfo['extension']); + //生成路径 + $target = $this->getPath($ext ? ('.' . $ext) : '', 'dzz'); + + if (!empty($fileContent) && !file_put_contents($_G['setting']['attachdir'] . $target, $fileContent)) { + return array('error' => lang('cache_file_error')); + } + //判断空间大小 + $gid = DB::result_first("select gid from %t where fid=%d", array('folder', $icoarr['pfid'])); + if (!SpaceSize(filesize($_G['setting']['attachdir'] . $target), $gid)) { + @unlink($_G['setting']['attachdir'] . $target); + return array('error' => lang('inadequate_capacity_space')); + } + //保存到附件表 + if ($attach = $this->save($target, $filename)) { + return $attach; + } else { + return array('error' => 'Could not save uploaded file. The upload was cancelled, or server error encountered'); + } + }*/ + /* //将文件内容作为新版本保存(用于保存时,选择文件覆盖的情形) + private function coverFilebynewVersion($attach, $icoarr) { global $_G; + $setting = $_G['setting']; + //当前文件版本数量 + $versionnum = DB::result_first("select count(*) from %t where rid = %s", array('resources_version', $icoarr['rid'])); + // + //版本开启 + $vperm = (!isset($setting['fileVersion']) || $setting['fileVersion']) ? true : false; + //版本数量限制 + $vnumlimit = isset($setting['fileVersionNumber']) ? intval($setting['fileVersionNumber']) : 0; + $covertype = 0; + //当上传版本开启,上传版本数量不限制;或者上传版本开启,文件版本数量未达到上限:设置当前文件为最新版本 + if ($vperm && (!$vnumlimit || ($vnumlimit && ($versionnum < $vnumlimit)))) { + $covertype = 1; + //当上传版本关闭,并且文件包含版本;或者上传版本开启,并且版本数量达到上限:剔除最老版本,并设置新文件为主版本 + } elseif ((!$vperm && $versionnum > 0) || ($vperm && $vnumlimit && $versionnum > $vnumlimit)) { + $covertype = 2; + //当上传版本关闭,且当前文件不含有版本:替换当前文件 + } elseif (!$vperm && !$versionnum) { + $covertype = 3; + } + if ($covertype == 1) { + $setarr = array( + 'uid' => $_G['uid'], + 'username' => $_G['username'], + 'name' => $attach['filename'], + 'aid' => $attach['aid'], + 'size' => $attach['filesize'], + 'ext' => $attach['filetype'], + 'dateline' => TIMESTAMP + ); + $return = C::t('resources_version')->add_new_version_by_rid($icoarr['rid'], $setarr); + } elseif ($covertype == 2) { + $setarr = array( + 'uid' => $_G['uid'], + 'username' => $_G['username'], + 'name' => $attach['filename'], + 'aid' => $attach['aid'], + 'size' => $attach['filesize'], + 'ext' => $attach['filetype'], + 'dateline' => TIMESTAMP + ); + $return = C::t('resources_version')->add_new_version_by_rid($icoarr['rid'], $setarr); + $vid = DB::result_first("select min(dateline),vid from %t where rid = %s ", array('resources_version', $icoarr['rid'])); + C::t('rescources_version')->delete_by_vid($vid, $icoarr['rid']); + } elseif ($covertype == 3) { + } + }*/ + //@param number $rid 文件的rid + //@param string $message 文件的新内容 + public function setFileContent($rid, $fileContent, $force = false, $nocover = true) + { + global $_G; if (!$icoarr = C::t('resources')->fetch_by_rid($rid)) { return array('error' => lang('file_not_exist')); } if ($icoarr['type'] != 'document' && $icoarr['type'] != 'attach' && $icoarr['type'] != 'image') { return array('error' => lang('no_privilege')); } + $gid = DB::result_first("select gid from %t where fid=%d", array('folder', $icoarr['pfid'])); if (!$force && !perm_check::checkperm('edit', $icoarr)) { return array('error' => lang('no_privilege')); } - setglobal('appGreenChannel', ($force) ? true : false); if (!$attach = getTxtAttachByMd5($fileContent, $icoarr['name'], $icoarr['ext'])) { - setglobal('appGreenChannel', false); return array('error' => lang('file_save_failure')); } - - //计算用户新的空间大小 - $csize = $attach['filesize'] - $icoarr['size']; - //重新计算用户空间 - if ($csize) { - if (!SpaceSize($csize, $gid, 0, $icoarr['uid'])) { - setglobal('appGreenChannel', false); - return array('error' => lang('inadequate_capacity_space')); + $covertype = 0; + if ($nocover) {//判断是否是覆盖 + $setting = $_G['setting']; + //当前文件版本数量 + $versionnum = DB::result_first("select count(*) from %t where rid = %s", array('resources_version', $icoarr['rid'])); + // + //版本开启 + $vperm = (!isset($setting['fileVersion']) || $setting['fileVersion']) ? true : false; + //版本数量限制 + $vnumlimit = isset($setting['fileVersionNumber']) ? intval($setting['fileVersionNumber']) : 0; + //当上传版本开启,上传版本数量不限制;或者上传版本开启,文件版本数量未达到上限:设置当前文件为最新版本 + if ($vperm && (!$vnumlimit || ($vnumlimit && ($versionnum < $vnumlimit)))) { + $covertype = 1; + //当上传版本关闭,并且文件包含版本;或者上传版本开启,并且版本数量达到上限:剔除最老版本,并设置新文件为主版本 + } elseif ((!$vperm && $versionnum > 0) || ($vperm && $vnumlimit && $versionnum >= $vnumlimit)) { + $covertype = 2; + //当上传版本关闭,且当前文件不含有版本:替换当前文件 + } elseif (!$vperm && !$versionnum) { + $covertype = 0; } - SpaceSize($csize, $gid, 1, $icoarr['uid']); } - $oldaid = $icoarr['aid']; - //更新附件数量 - if ($oldaid != $attach['aid']) { - C::t('resources')->update($rid, array('size' => $attach['filesize'])); - C::t('resources_statis')->add_statis_by_rid($rid, array('editdateline' => TIMESTAMP)); - C::t('resources_attr')->update_by_skey($icoarr['rid'], $icoarr['vid'], array('aid' => $attach['aid'])); - C::t('attachment')->update($attach['aid'], array('copys' => $attach['copys'] + 1)); - C::t('attachment')->delete_by_aid($oldaid); + if ($covertype) { + if($covertype == 2){ + $vinfo = DB::fetch_first("select min(dateline),vid from %t where rid = %s ", array('resources_version', $icoarr['rid'])); + C::t('resources_version')->delete_by_vid($vinfo['vid'], $icoarr['rid']); + } + $setarr = array( + 'uid' => $_G['uid'], + 'username' => $_G['username'], + 'name' => $icoarr['name'], + 'aid' => $attach['aid'], + 'size' => $attach['filesize'], + 'ext' => $attach['filetype'], + 'dateline' => TIMESTAMP + ); + $return = C::t('resources_version')->add_new_version_by_rid($icoarr['rid'], $setarr); + if($return['error']){ + return array('error'=>$return['error']); + } + } else { + //计算用户新的空间大小 + $csize = $attach['filesize'] - $icoarr['size']; + //重新计算用户空间 + if ($csize) { + if (!SpaceSize($csize, $gid, 0, $icoarr['uid'])) { + + return array('error' => lang('inadequate_capacity_space')); + } + SpaceSize($csize, $gid, 1, $icoarr['uid']); + } + $oldaid = $icoarr['aid']; + //更新附件数量 + if ($oldaid != $attach['aid']) { + C::t('resources')->update($rid, array('size' => $attach['filesize'])); + C::t('resources_statis')->add_statis_by_rid($rid, array('editdateline' => TIMESTAMP)); + C::t('resources_attr')->update_by_skey($icoarr['rid'], $icoarr['vid'], array('aid' => $attach['aid'])); + C::t('attachment')->update($attach['aid'], array('copys' => $attach['copys'] + 1)); + C::t('attachment')->delete_by_aid($oldaid); + } + $path = C::t('resources_path')->fetch_pathby_pfid($icoarr['pfid']); + $path = preg_replace('/dzz:(.+?):/', '', $path) ? preg_replace('/dzz:(.+?):/', '', $path) : ''; + $hash = C::t('resources_event')->get_showtpl_hash_by_gpfid($icoarr['pfid'], $icoarr['gid']); + $eventdata = array( + 'title' => $icoarr['name'], + 'aid' => $icoarr['aid'], + 'username' => $_G['username'], + 'uid' => $_G['uid'], + 'path' => $icoarr['path'], + 'position' => $path, + 'hash' => $hash + ); + $event = 'edit_file'; + C::t('resources_event')->addevent_by_pfid($icoarr['pfid'], $event, 'edit', $eventdata, $icoarr['gid'], $icoarr['rid'], $icoarr['name']); } - $path = C::t('resources_path')->fetch_pathby_pfid($icoarr['pfid']); - $path = preg_replace('/dzz:(.+?):/', '', $path) ? preg_replace('/dzz:(.+?):/', '', $path) : ''; - $hash = C::t('resources_event')->get_showtpl_hash_by_gpfid($icoarr['pfid'], $icoarr['gid']); - $eventdata = array( - 'title' => $icoarr['name'], - 'aid' => $icoarr['aid'], - 'username' => $icoarr['username'], - 'uid' => $icoarr['uid'], - 'path' => $icoarr['path'], - 'position' => $path, - 'hash' => $hash - ); - $event = 'edit_file'; - C::t('resources_event')->addevent_by_pfid($icoarr['pfid'], $event, 'edit', $eventdata, $icoarr['gid'], $icoarr['rid'], $icoarr['name']); - setglobal('appGreenChannel', false); return C::t('resources')->fetch_by_rid($rid); } //查找目录下的同名文件 @@ -440,43 +554,52 @@ class io_dzz extends io_api 'size' => filesize(getglobal('setting/attachdir') . $attachment), 'url' => getglobal('setting/attachurl') . $attachment, 'path' => $icoid, - 'md5'=>md5_file(getglobal('setting/attachdir') . $attachment), - 'attachment'=>$attachment, - 'dpath'=>dzzencode($icoid) + 'md5' => md5_file(getglobal('setting/attachdir') . $attachment), + 'attachment' => $attachment, + 'dpath' => dzzencode($icoid), + 'sperm' => perm_FileSPerm::typePower('attachment'), + 'bz'=>'' ); } elseif (strpos($icoid, 'attach::') === 0) { $attach = C::t('attachment')->fetch(intval(str_replace('attach::', '', $icoid))); - return array('icoid' => $icoid, - 'name' => $attach['filename'], - 'ext' => $attach['filetype'], - 'apath' => dzzencode('attach::' . $attach['aid']), - 'dpath' => dzzencode('attach::' . $attach['aid']), - 'path' => 'attach::' . $attach['aid'], - 'attachment'=>$attach['attachment'], - 'size' => $attach['filesize'], - 'url' => getAttachUrl($attach), - 'md5'=>$attach['md5'], - 'bz' => io_remote::getBzByRemoteid($attach['remote']) - ); + $bz = io_remote::getBzByRemoteid($attach['remote']); + if ($bz == 'dzz') { + return array('icoid' => $icoid, + 'name' => $attach['filename'], + 'ext' => $attach['filetype'], + 'apath' => dzzencode('attach::' . $attach['aid']), + 'dpath' => dzzencode('attach::' . $attach['aid']), + 'path' => 'attach::' . $attach['aid'], + 'attachment' => $attach['attachment'], + 'size' => $attach['filesize'], + 'url' => getAttachUrl($attach), + 'md5' => $attach['md5'], + 'bz' => '', + 'sperm' => perm_FileSPerm::typePower('attachment') + ); + } else { + $path = $bz.'/'.$attach['attachment']; + return IO::getMeta($path); + } + } elseif (strpos($icoid, 'TMP::') === 0) { $file = self::getStream($icoid); $attachment = preg_replace('/^TMP::/i', '', $icoid); $pathinfo = pathinfo($file); return array('icoid' => md5($icoid), - + 'name' => $pathinfo['basename'], 'ext' => $pathinfo['extension'], 'size' => filesize($file), - 'path'=>$icoid, - 'dpath'=>dzzencode($icoid), + 'path' => $icoid, + 'dpath' => dzzencode($icoid), 'url' => '', 'bz' => '' - + ); } elseif (preg_match('/^dzz:[gu]id_\d+:.+?/i', $icoid)) { $dir = dirname($icoid) . '/'; - if (!$pfid = C::t('resources_path')->fetch_fid_bypath($dir)) { return false; } @@ -501,7 +624,7 @@ class io_dzz extends io_api } //打包下载文件 - public function zipdownload($paths, $filename='') + public function zipdownload($paths, $filename = '',$checkperm = true) { global $_G; $paths = (array)$paths; @@ -524,7 +647,6 @@ class io_dzz extends io_api 'downs' => 1, ); C::t('resources_statis')->add_statis_by_rid($paths, $statisdata); - if (count($paths) > 1) { $filenames = ''; @@ -546,12 +668,12 @@ class io_dzz extends io_api //$data=self::getFolderInfo($path); include_once libfile('class/ZipStream'); $zip = new ZipStream($filename . ".zip"); - $data = self::getFolderInfo($paths, '', $zip); + $data = self::getFolderInfo($paths, '', $zip,$checkperm); $zip->finalize(); } - public function getFolderInfo($paths, $position = '', &$zip) + public function getFolderInfo($paths, $position = '', &$zip,$checkperm = true) { static $data = array(); try { @@ -561,7 +683,7 @@ class io_dzz extends io_api switch ($meta['type']) { case 'folder': $lposition = $position . $meta['name'] . '/'; - $contents = C::t('resources')->fetch_by_pfid($meta['oid']); + $contents = C::t('resources')->fetch_by_pfid($meta['oid'],'',$checkperm); foreach ($contents as $key => $value) { self::getFolderInfo(array($value['rid']), $lposition, $zip); } @@ -591,12 +713,12 @@ class io_dzz extends io_api } //下载 - public function download($paths, $filename='') + public function download($paths, $filename = '',$checkperm = true) { global $_G; $paths = (array)$paths; if (count($paths) > 1) { - self::zipdownload($paths, $filename); + self::zipdownload($paths, $filename,$checkperm); exit(); } else { $path = $paths[0]; @@ -623,7 +745,7 @@ class io_dzz extends io_api if (!$icoarr['rid']) { topshowmessage(lang('attachment_nonexistence')); } elseif ($icoarr['type'] == 'folder') { - self::zipdownload($path); + self::zipdownload($path,$filename,$checkperm); exit(); } if (!$icoarr['aid']) { @@ -671,7 +793,7 @@ class io_dzz extends io_api if (!$icoarr['rid']) { topshowmessage(lang('attachment_nonexistence')); } elseif ($icoarr['type'] == 'folder') { - self::zipdownload($path, $filename); + self::zipdownload($path, $filename,$checkperm); exit(); } if (!$icoarr['aid']) { @@ -713,10 +835,9 @@ class io_dzz extends io_api //删除 //当文件在回收站时,彻底删除; //$force 真实删除,不放入回收站 - public function Delete($path, $force = false, $noperm = false) + public function Delete($path, $force = false) { global $_G; - setglobal('appGreenChannel', ($noperm) ? true : false); if (strpos($path, 'dzz::') === 0) { if (strpos($path, './') !== false) return false; @unlink($_G['setting']['attachdir'] . preg_replace('/^dzz::/i', '', $path)); @@ -724,19 +845,15 @@ class io_dzz extends io_api } elseif (strpos($path, 'attach::') === 0) { if (strpos($path, './') !== false) return false; - setglobal('appGreenChannel', false); return C::t('attachment')->delete_by_aid(intval(str_replace('attach::', '', $path))); } elseif (strpos($path, 'TMP::') === 0) { $tmp = str_replace('\\', '/', sys_get_temp_dir()); - setglobal('appGreenChannel', false); return @unlink(str_replace('TMP::', $tmp . '/', $path)); } elseif (preg_match('/^dzz:[gu]id_\d+:.+?/i', $path)) { $dir = dirname($path) . '/'; if (!$pfid = C::t('resources_path')->fetch_fid_bypath($dir)) { - setglobal('appGreenChannel', false); return false; } - $filename = preg_replace('/^.+[\\\\\\/]/', '', $path); //如果是文件夹 if (!$filename) { @@ -746,59 +863,72 @@ class io_dzz extends io_api } if (!$icoarr = DB::fetch_first("select * from %t where pfid = %d and name = %s and isdelete < 1", array('resources', $pfid, $filename))) { - setglobal('appGreenChannel', false); return array('rid' => $icoarr['rid'], 'error' => lang('file_longer_exists')); } - if ($force) { - if ($noperm || perm_check::checkperm('delete', $icoarr)) { - C::t('resources')->delete_by_rid($icoarr['rid']); - } else { - setglobal('appGreenChannel', false); - return array('rid' => $icoarr['rid'], 'error' => lang('no_privilege')); - } - + $size = 0; + if ($icoarr['type'] == 'folder') { + $contains = C::t('resources')->get_contains_by_fid($icoarr['oid'], true); + $size = $contains['size']; } else { - if ($noperm || perm_check::checkperm('delete', $icoarr)) { - C::t('resources')->recyle_by_rid($icoarr['rid']); - if ($icoarr['type'] == 'folder') C::t('folder')->update($icoarr['oid'], array('uid' => getglobal('uid'), 'username' => getglobal('username'), 'isdelete' => 1, 'deldateline' => TIMESTAMP)); + if ($icoarr['vid'] > 0) { + $size = DB::result_first("select sum(size) from %t where rid = %s", array('resources_version', $icoarr['rid'])); } else { - setglobal('appGreenChannel', false); - return array('rid' => $icoarr['rid'], 'error' => lang('no_privilege')); + $size = $icoarr['size']; } - } - setglobal('appGreenChannel', false); + if (perm_check::checkperm('delete', $icoarr)) { + if ($force) {//强制彻底删除 + C::t('resources')->delete_by_rid($path, true); + } elseif ($icoarr['isdelete'] > 0) {//删除状态彻底删除 + C::t('resources')->delete_by_rid($path, false); + } else {//非删除状态删除到回收站 + $return = C::t('resources')->recyle_by_rid($icoarr['rid']); + if ($return['error']) { + return $return; + } + } + } else { + return array('rid' => $icoarr['rid'], 'error' => lang('no_privilege')); + } + if ($size > 0 && !$icoarr['isdelete']) { + SpaceSize(-$size, $icoarr['gid'], true); + } return array('rid' => $icoarr['rid'], 'name' => $icoarr['name']); - } else {//rid删除 + } elseif (preg_match('/\w{32}/i', $path)) {//rid删除 try { if (!$icoarr = C::t('resources')->fetch_info_by_rid($path)) { - setglobal('appGreenChannel', false); return array('rid' => $path, 'error' => lang('file_longer_exists')); } - if ($force || $icoarr['isdelete']) { - if($noperm || perm_check::checkperm('delete', $icoarr)){ - C::t('resources')->delete_by_rid($path); - setglobal('appGreenChannel', false); - }else { - setglobal('appGreenChannel', false); - return array('rid' => $icoarr['rid'], 'error' => lang('no_privilege')); - } + $size = 0; + if ($icoarr['type'] == 'folder') { + $contains = C::t('resources')->get_contains_by_fid($icoarr['oid'], true); + $size = $contains['size']; } else { - if ($noperm || perm_check::checkperm('delete', $icoarr)) { - $return = C::t('resources')->recyle_by_rid($icoarr['rid']); - if ($return['error']) { - setglobal('appGreenChannel', false); - return $return; - } + if ($icoarr['vid'] > 0) { + $size = DB::result_first("select sum(size) from %t where rid = %s", array('resources_version', $icoarr['rid'])); } else { - setglobal('appGreenChannel', false); - return array('rid' => $icoarr['rid'], 'error' => lang('no_privilege')); + $size = $icoarr['size']; } } - setglobal('appGreenChannel', false); + if (perm_check::checkperm('delete', $icoarr)) { + if ($force) {//强制彻底删除 + C::t('resources')->delete_by_rid($path, true); + } elseif ($icoarr['isdelete'] > 0) {//删除状态彻底删除 + C::t('resources')->delete_by_rid($path, false); + } else {//非删除状态删除到回收站 + $return = C::t('resources')->recyle_by_rid($icoarr['rid']); + if ($return['error']) { + return $return; + } + } + } else { + return array('rid' => $icoarr['rid'], 'error' => lang('no_privilege')); + } + if ($size > 0 && !$icoarr['isdelete']) { + SpaceSize(-$size, $icoarr['gid'], true); + } return array('rid' => $icoarr['rid'], 'name' => $icoarr['name']); } catch (Exception $e) { - setglobal('appGreenChannel', false); return array('error' => $e->getMessage()); } } @@ -854,17 +984,15 @@ class io_dzz extends io_api } } - + //根据文件名创建顶级目录 - public function createTopFolderByFname($fname, $perm=0, $noperm = false, $params = array(), $ondup = 'newcopy') + public function createTopFolderByFname($fname, $perm = 0, $params = array(), $ondup = 'newcopy') { global $_G; - setglobal('appGreenChannel', ($noperm) ? true : false); $folderparams = array('innav', 'fsperm', 'disp', 'iconview', 'display', 'flag', 'default'); $data = array(); - if (($ondup == 'overwrite') && ($folder = C::t('folder')->fetch_by_fname($fname))) {//如果目录下有同名目录 + if (($ondup == 'overwrite') && ($folder = C::t('folder')->fetch_topby_fname($fname))) {//如果目录下有同名目录 $data['folderarr'] = $folder; - setglobal('appGreenChannel', false); return $data; } else $fname = self::getFolderName($fname, 0); //重命名 $top = array( @@ -901,73 +1029,38 @@ class io_dzz extends io_api C::t('folder')->update_perm_inherit_by_fid($topfid); } $data['folderarr'] = C::t('folder')->fetch_by_fid($topfid); - setglobal('appGreenChannel', false); return $data; } //创建目录 - public function CreateFolder($pfid, $fname, $perm=0, $noperm = false, $params = array(), $ondup = 'newcopy') + public function CreateFolder($pfid, $fname, $perm = 0, $params = array(), $ondup = 'newcopy') { global $_G, $_GET; $folderparams = array('innav', 'fsperm', 'disp', 'iconview', 'display', 'flag', 'default'); if ($pfid == 0) { - return self::createTopFolderByFname($fname, $perm, $noperm, $params, $ondup); + return self::createTopFolderByFname($fname, $perm, $params, $ondup); } - setglobal('appGreenChannel', ($noperm) ? true : false); $fname = self::name_filter($fname); if (!$folder = DB::fetch_first("select fid,pfid,iconview,disp,gid,perm_inherit from %t where fid=%d", array('folder', $pfid))) { return array('error' => lang('parent_directory_not_exist')); } - if (!$noperm && !perm_check::checkperm_Container($pfid, 'folder')) { + if (!perm_check::checkperm_Container($pfid, 'folder')) { return array('error' => lang('no_privilege')); } - //判断该当前目录下是否存在该目录 - if ($finfo = DB::fetch_first("select f.fid,f.isdelete,r.rid from %t f - left join %t r on f.fid=r.oid where f.pfid=%d and f.fname=%s", array('folder', 'resources', $pfid, $fname)) - ) { - //如果该目录已经被删除则恢复 - if ($finfo['isdelete'] > 0) { - if ($finfo['rid']) { - if ($ricoid = self::getRepeatIDByName($fname, $pfid, true)) { - $newname = self::getFolderName($fname, $pfid); - self::rename($finfo['rid'],$newname); - } - //查询对应资源表数据并恢复 - - $icoarr = C::t('resources')->fetch_by_rid($finfo['rid']); - if ($icoarr['isdelete'] > 0) DB::update('resources', array('isdelete' => 0, 'deldateline' => 0), array('rid' => $finfo['rid'])); - $icoarr['isdelete'] = 0; - $icoarr['deldateline'] = 0; - } - $data = array(); - //恢复目录表数据为未删除 - DB::update('folder', array('isdelete' => 0, 'deldateline' => 0), array('fid' => $finfo['fid'])); - - - $data['icoarr'] = $icoarr; - $data['folderarr'] = self::getFolderByIcosdata($data['icoarr']); - setglobal('appGreenChannel', false); - return $data; - } else { - $fname = self::getFolderName($fname, $pfid); //重命名 - } - - } - /*if (($ondup == 'overwrite') && ($rid = self::getRepeatIDByName($fname, $pfid, true))) {//如果目录下有同名目录 + if (($ondup == 'overwrite') && ($rid = self::getRepeatIDByName($fname, $pfid, true))) {//如果目录下有同名目录 $data = array(); $data['icoarr'] = C::t('resources')->fetch_by_rid($rid); $data['folderarr'] = self::getFolderByIcosdata($data['icoarr']); - setglobal('appGreenChannel', false); return $data; - } else $fname = self::getFolderName($fname, $pfid); //重命名*/ + } else $fname = self::getFolderName($fname, $pfid); //重命名 $path = C::t('resources_path')->fetch_pathby_pfid($folder['fid']); $setarr = array('fname' => $fname, 'uid' => $_G['uid'], 'username' => $_G['username'], 'pfid' => $folder['fid'], 'disp' => $folder['disp'], - 'perm' => ($perm) ? $perm:$folder['perm_inherit'], + 'perm' => ($perm) ? $perm : $folder['perm_inherit'], 'flag' => 'folder', 'dateline' => $_G['timestamp'], 'gid' => $folder['gid'], @@ -1032,13 +1125,11 @@ class io_dzz extends io_api ); C::t('resources_event')->addevent_by_pfid($setarr1['pfid'], $event, 'create', $eventdata, $setarr1['gid'], $setarr1['rid'], $setarr1['name']); } - setglobal('appGreenChannel', false); return array('icoarr' => $setarr1, 'folderarr' => $setarr); } else { C::t('folder')->delete_by_fid(); } } - setglobal('appGreenChannel', false); return false; } @@ -1060,7 +1151,7 @@ class io_dzz extends io_api return $target . date('His') . '' . strtolower(random(16)) . $ext; } - public function save($target, $filename='') + public function save($target, $filename = '') { global $_G; $filepath = $_G['setting']['attachdir'] . $target; @@ -1122,11 +1213,10 @@ class io_dzz extends io_api } } - public function uploadToattachment($attach, $fid, $noperm = false) + public function uploadToattachment($attach, $fid) { global $_G, $documentexts, $space, $docexts; - setglobal('appGreenChannel', ($noperm) ? true : false); - if (!$noperm && !perm_check::checkperm_Container($fid, 'upload')) { + if (!perm_check::checkperm_Container($fid, 'upload')) { return array('error' => lang('no_privilege')); } @@ -1183,10 +1273,8 @@ class io_dzz extends io_api ); C::t('resources_event')->addevent_by_pfid($fid, $event, 'create', $eventdata, $icoarr['gid'], $icoarr['rid'], $icoarr['name']); - setglobal('appGreenChannel', false); } else { C::t('resources')->delete_by_rid($icoarr['rid']); - setglobal('appGreenChannel', false); return array('error' => lang('data_error')); } } @@ -1308,9 +1396,8 @@ class io_dzz extends io_api } - public function createFolderByPath($path, $pfid, $noperm = false, $params = array()) + public function createFolderByPath($path, $pfid, $params = array()) { - setglobal('appGreenChannel', ($noperm) ? true : false); $data = array('pfid' => $pfid); if (!$path) { $data['pfid'] = $pfid; @@ -1320,40 +1407,20 @@ class io_dzz extends io_api foreach ($patharr as $fname) { if (!$fname) continue; //判断是否含有此目录 - /*if ($fid = DB::result_first("select fid from %t where pfid=%d and isdelete<1 and fname=%s", array('folder', $pfid, $fname))) { + if ($fid = DB::result_first("select fid from %t where pfid=%d and isdelete<1 and fname=%s", array('folder', $pfid, $fname))) { $pfid = $data['pfid'] = $fid; - } */ - if ($finfo = DB::fetch_first("select f.fid,f.isdelete,r.rid from %t f - left join %t r on f.fid=r.oid where f.pfid=%d and f.fname=%s", array('folder', 'resources', $pfid, $fname)) - ) { - if ($finfo['isdelete'] > 0) { - if ($finfo['rid']) { - if ($ricoid = self::getRepeatIDByName($fname, $pfid, true)) { - $newname = self::getFolderName($fname, $pfid); - self::rename($finfo['rid'], $newname); - } - DB::update('resources', array('isdelete' => 0, 'deldateline' => 0), array('rid' => $finfo['rid'])); - } - DB::update('folder', array('isdelete' => 0, 'deldateline' => 0), array('fid' => $finfo['fid'])); - /* if ($finfo['rid']) { - DB::update('resources', array('isdelete' => 0, 'deldateline' => 0), array('rid' => $finfo['rid'])); - }*/ - } - $pfid = $data['pfid'] = $finfo['fid']; } else { - if ($re = self::CreateFolder($data['pfid'], $fname, 0, $noperm, $params, 'overwrite')) { + if ($re = self::CreateFolder($data['pfid'], $fname, 0, $params, 'overwrite')) { $data['icoarr'][] = $re['icoarr']; $data['folderarr'][] = $re['folderarr']; $pfid = $data['pfid'] = $re['folderarr']['fid']; } else { $data['error'] = 'create folder error!'; - setglobal('appGreenChannel', false); return $data; } } } } - setglobal('appGreenChannel', false); return $data; } @@ -1405,18 +1472,16 @@ class io_dzz extends io_api return $arr; } - public function uploadStream($file, $filename, $pfid, $relativePath='', $content_range=array(), $noperm = false, $params = array()) + public function uploadStream($file, $filename, $pfid, $relativePath = '', $content_range = array(), $params = array()) { - setglobal('appGreenChannel', ($noperm) ? true : false); $filename = self::name_filter($filename); $data = array(); //处理目录(没有分片或者最后一个分片时创建目录 $arr = self::getPartInfo($content_range); $data['pfid'] = intval($pfid); if ($relativePath && $arr['iscomplete']) { - $data = self::createFolderByPath($relativePath, $pfid, $noperm, $params); + $data = self::createFolderByPath($relativePath, $pfid, $params); if (isset($data['error'])) { - setglobal('appGreenChannel', false); return array('error' => $data['error']); } } @@ -1425,7 +1490,6 @@ class io_dzz extends io_api //获取文件内容 $fileContent = ''; if (!$handle = fopen($file, 'rb')) { - setglobal('appGreenChannel', false); return array('error' => lang('open_file_error')); } while (!feof($handle)) { @@ -1433,37 +1497,40 @@ class io_dzz extends io_api } fclose($handle); if ($arr['ispart']) { - $re = self::upload($fileContent, $data['pfid'], $filename, $noperm, $arr); + $re = self::upload($fileContent, $data['pfid'], $filename, $arr); if ($arr['iscomplete']) { if (empty($re['error'])) { $data['icoarr'][] = $re; - setglobal('appGreenChannel', false); return $data; } else { $data['error'] = $re['error']; - setglobal('appGreenChannel', false); return $data; } } else { return true; } } else { - $re = self::upload($fileContent, $data['pfid'], $filename, $noperm); + $re = self::upload($fileContent, $data['pfid'], $filename); if (empty($re['error'])) { + if($re['type'] == 'image' && $re['aid']){ + $re['imgpath'] = DZZSCRIPT.'?mod=io&op=thumbnail&path='.dzzencode('attach::' . $re['aid']); + } + $re['monthdate'] = dgmdate($re['dateline'],'m-d'); + $re['hourdate'] = dgmdate($re['dateline'],'H:i'); + $re['pfid'] = $pfid; + $re['colect'] = 0; $data['icoarr'][] = $re; - setglobal('appGreenChannel', false); return $data; } else { $data['error'] = $re['error']; - setglobal('appGreenChannel', false); return $data; } } } - public function upload_by_content($fileContent, $path, $filename, $noperm = false) + public function upload_by_content($fileContent, $path, $filename) { - return self::upload($fileContent, $path, $filename, $noperm); + return self::upload($fileContent, $path, $filename); } /** @@ -1476,13 +1543,12 @@ class io_dzz extends io_api * @param boolean $isCreateSuperFile 是否分片上传 * @return string */ - public function upload($fileContent, $fid, $filename, $noperm = false, $partinfo = array(), $ondup = 'newcopy') + public function upload($fileContent, $fid, $filename, $partinfo = array(), $ondup = 'newcopy') { global $_G; - setglobal('appGreenChannel', ($noperm) ? true : false); $filename = self::name_filter($filename); if (($ondup == 'overwrite') && ($rid = self::getRepeatIDByName($filename, $fid))) {//如果目录下有同名文件 - return self::overwriteUpload($fileContent, $rid, $filename, $noperm, $partinfo);//覆盖 + return self::overwriteUpload($fileContent, $rid, $filename, $partinfo);//覆盖 } else $nfilename = self::getFileName($filename, $fid); //重命名 if ($partinfo['ispart']) { @@ -1498,7 +1564,6 @@ class io_dzz extends io_api } else { $target = self::getCache($partinfo['flag'] . '_' . md5($filename)); } - if (!file_put_contents( $_G['setting']['attachdir'] . $target, $fileContent, @@ -1517,9 +1582,7 @@ class io_dzz extends io_api $pathinfo = pathinfo($filename); $ext = strtolower($pathinfo['extension']); $target = $this->getPath($ext ? ('.' . $ext) : '', 'dzz'); - if (!empty($fileContent) && !file_put_contents($_G['setting']['attachdir'] . $target, $fileContent)) { - setglobal('appGreenChannel', false); return array('error' => lang('cache_file_error')); } } @@ -1528,26 +1591,22 @@ class io_dzz extends io_api $gid = DB::result_first("select gid from %t where fid=%d", array('folder', $fid)); if (!SpaceSize(filesize($_G['setting']['attachdir'] . $target), $gid)) { @unlink($_G['setting']['attachdir'] . $target); - setglobal('appGreenChannel', false); return array('error' => lang('inadequate_capacity_space')); } if ($attach = $this->save($target, $nfilename)) { if ($attach['error']) { - setglobal('appGreenChannel', false); return array('error' => $attach['error']); } else { - setglobal('appGreenChannel', false); - return $this->uploadToattachment($attach, $fid, $noperm); + return $this->uploadToattachment($attach, $fid); } } else { - setglobal('appGreenChannel', false); return array('error' => 'Could not save uploaded file. The upload was cancelled, or server error encountered'); } } - public function overwriteUpload($fileContent, $rid, $filename, $noperm = false, $partinfo = array()) + public function overwriteUpload($fileContent, $rid, $filename, $partinfo = array()) { global $_G, $space; @@ -1559,10 +1618,10 @@ class io_dzz extends io_api } $gid = DB::result_first("select gid from %t where fid=%d", array('folder', $icoarr['pfid'])); if (in_array($icoarr['type'], array('folder', 'link', 'video', 'dzzdoc'))) { - if (!$noperm && !perm_check::checkperm_Container($icoarr['pfid'], 'upload')) { + if (!perm_check::checkperm_Container($icoarr['pfid'], 'upload')) { return array('error' => lang('privilege')); } - } elseif (!$noperm && !perm_check::checkperm_Container($icoarr['pfid'], 'upload')) { + } elseif (!perm_check::checkperm_Container($icoarr['pfid'], 'upload')) { return array('error' => lang('privilege')); } $target = $icoarr['attachment']; @@ -2056,19 +2115,28 @@ class io_dzz extends io_api * @param string $path 目标位置(可能是同一api内或跨api,这两种情况分开处理) * @return icosdatas */ - public function CopyTo($rid, $pfid, $iscopy=0, $noperm = false) + public function CopyTo($rid, $pfid, $iscopy = 0) { - setglobal('appGreenChannel', ($noperm) ? true : false); + try { $data = C::t('resources')->fetch_by_rid($rid); + if (is_numeric($pfid)) {//如果目标位置也是本地 + + if($data['type']=='folder'){//判断上级目录不能移动到下级目录中 + $pfids=C::t('folder')->fetch_path_by_fid($pfid); + if(in_array($data['oid'],$pfids)){ + $data['success']= lang('forbid_folder_to_sub_folder'); + return $data; + } + } if (!$iscopy) { - $re = self::FileMove($rid, $pfid, $noperm, true); + $re = self::FileMove($rid, $pfid, true); $data['newdata'] = $re['icoarr']; $data['success'] = true; $data['moved'] = true; } else { - $re = self::FileCopy($rid, $pfid, $noperm, true); + $re = self::FileCopy($rid, $pfid, true); $data['newdata'] = $re['icoarr']; $data['success'] = true; } @@ -2077,7 +2145,7 @@ class io_dzz extends io_api } else {//后期待处理 switch ($data['type']) { case 'folder'://创建目录 - if ($re = IO::CreateFolder($pfid, $data['name'], 0, $noperm)) { + if ($re = IO::CreateFolder($pfid, $data['name'], 0)) { if (isset($re['error']) && intval($re['error_code']) != 31061) { $data['success'] = $re['error']; } else { @@ -2086,7 +2154,7 @@ class io_dzz extends io_api $data['success'] = true; $contents = C::t('resources')->fetch_by_pfid($data['oid']); foreach ($contents as $key => $value) { - $data['contents'][$key] = self::CopyTo($value['rid'], $re['folderarr']['path'], $iscopy, $noperm); + $data['contents'][$key] = self::CopyTo($value['rid'], $re['folderarr']['path'], $iscopy); } } } @@ -2103,7 +2171,7 @@ class io_dzz extends io_api $data['success'] = lang('document_only_stored_enterprise'); break; default: - $re = IO::multiUpload($rid, $pfid, $data['name'], $noperm); + $re = IO::multiUpload($rid, $pfid, $data['name']); if ($re['error']) $data['success'] = $re['error']; else { $data['newdata'] = $re; @@ -2116,14 +2184,11 @@ class io_dzz extends io_api $data['success'] = $e->getMessage(); } $data['iscopy'] = $iscopy; - setglobal('appGreenChannel', false); return $data; } - //检测目录下是否含有对应路径文件夹,如果没有创建,如果有判断是否为删除状态,如果是则恢复 - public function chk_dir_exists_create($path, $pfid, $noperm = false, $params = array()) + public function RecovercreateFolderByPath($path, $pfid, $params = array()) { - setglobal('appGreenChannel', ($noperm) ? true : false); $data = array('pfid' => $pfid); if (!$path) { $data['pfid'] = $pfid; @@ -2132,62 +2197,75 @@ class io_dzz extends io_api //生成目录 foreach ($patharr as $fname) { if (!$fname) continue; + $fpath = C::t('resources_path')->fetch_pathby_pfid($pfid, false); + $path = $fpath . $fname . '/'; + $fid = DB::result_first("select fid from %t where path = %s", array('resources_path', $path)); + /* echo $fid; + die;*/ //判断是否含有此目录 - if ($finfo = DB::fetch_first("select f.fid,f.isdelete,r.rid from %t f - left join %t r on f.fid=r.oid where f.pfid=%d and f.fname=%s", array('folder', 'resources', $pfid, $fname)) + if ($finfo = DB::fetch_first("select f.fid,f.isdelete,r.rid from %t f + left join %t r on f.fid=r.oid where f.fid=%d and f.fname=%s", array('folder', 'resources', $fid, $fname)) ) { if ($finfo['isdelete'] > 0) { - DB::update('folder', array('isdelete' => 0, 'deldateline' => 0), array('fid' => $finfo['fid'])); if ($finfo['rid']) { - DB::update('resources', array('isdelete' => 0, 'deldateline' => 0), array('rid' => $finfo['rid'])); + if ($ricoid = self::getRepeatIDByName($fname, $pfid, true)) { + $newname = self::getFolderName($fname, $pfid); + self::rename($finfo['rid'], $newname); + } + DB::update('resources', array('isdelete' => 0, 'deldateline' => 0, 'pfid' => $pfid), array('rid' => $finfo['rid'])); } + DB::update('folder', array('isdelete' => 0, 'deldateline' => 0, 'pfid' => $pfid), array('fid' => $finfo['fid'])); } $pfid = $data['pfid'] = $finfo['fid']; } else { - if ($re = self::CreateFolder($data['pfid'], $fname, 0, $noperm, $params, 'overwrite')) { + if ($re = self::CreateFolder($data['pfid'], $fname, 0, $params, 'overwrite')) { $data['icoarr'][] = $re['icoarr']; $data['folderarr'][] = $re['folderarr']; $pfid = $data['pfid'] = $re['folderarr']['fid']; } else { $data['error'] = 'create folder error!'; - setglobal('appGreenChannel', false); return $data; } } } } - setglobal('appGreenChannel', false); return $data; } //恢复文件 - public function Recover($rid, $noperm = false) + public function Recover($rid, $combine = true) { global $_G; - setglobal('appGreenChannel', ($noperm) ? true : false); //判断文件是否存在 if (!$icoarr = C::t('resources')->fetch_info_by_rid($rid)) { return array('rid' => $rid, 'error' => lang('file_longer_exists')); } + $newpfid = false; + //获取回收站数据 if ($recycleinfo = C::t('resources_recyle')->get_data_by_rid($rid)) { //获取文件目录信息 if (!$dirinfo = C::t('resources_path')->parse_path_get_rootdirinfo($recycleinfo['pathinfo'])) { return array('rid' => $rid, 'error' => lang('file_longer_exists')); } - //若目录被删除恢复或创建目录 - if (!$folderinfo = self::createFolderByPath($dirinfo['path'], $dirinfo['pfid'])) { - return array('rid' => $rid, 'error' => lang('file_longer_exists')); + if ($dirinfo['path']) { + //若目录被删除恢复或创建目录 + if (!$folderinfo = self::createFolderByPath($dirinfo['path'], $dirinfo['pfid'])) { + return array('rid' => $rid, 'error' => lang('file_longer_exists')); + } + } + if (isset($folderinfo['pfid'])) { + $icoarr['pfid'] = $folderinfo['pfid']; + if ($dirinfo['pfid'] != $folderinfo['pfid']) { + $newpfid = $folderinfo['pfid']; + } + } else { + $icoarr['pfid'] = $dirinfo['pfid']; } - } - //判断空间大小 - $gid = $icoarr['gid']; - if ($icoarr['size'] && !SpaceSize($icoarr['size'], $gid)) { - setglobal('appGreenChannel', false); - return array('error' => lang('inadequate_capacity_space')); - } + } + $gid = $icoarr['gid']; //判断是否具有恢复权限 - if (!$noperm && !perm_check::checkperm('delete', $icoarr)) { + if (!perm_check::checkperm('delete', $icoarr)) { return array('rid' => $icoarr['rid'], 'error' => lang('no_privilege')); } else { $targetpath = C::t('resources_path')->fetch_pathby_pfid($icoarr['pfid']);//文件路径 @@ -2196,53 +2274,91 @@ class io_dzz extends io_api //如果是文件夹 if ($icoarr['type'] == 'folder') { - //如果当前文件夹是删除状态则恢复当前文件夹 - if ($icoarr['isdelete'] > 0) { - $recoverarr = array('isdelete' => 0, 'deldateline' => 0); + //验证空间大小 + $contains = C::t('resources')->get_contains_by_fid($icoarr['oid'], true); + if (!SpaceSize($contains['size'], $gid)) { + return array('error' => lang('inadequate_capacity_space')); + } + if ($combine && $ricoid = self::getRepeatIDByName($icoarr['name'], $icoarr['pfid'], true)) { + $rinfo = C::t('resources')->fetch_info_by_rid($ricoid); + //目录下所有删除文件rid + $rids = array(); + $fids = array(); + foreach (DB::fetch_all("select rid,type,oid from %t where pfid = %d and isdelete > 0", array('resources', $icoarr['oid'])) as $v) { + if ($v['type'] == 'folder') { + $fids[] = $v['oid']; + } else { + $rids[] = $v['rid']; + } + } + if (count($rids) > 0) DB::update('resources', array('pfid' => $rinfo['oid']), 'rid in(' . dimplode($rids) . ')'); + if (count($fids) > 0) DB::update('folder', array('pfid' => $rinfo['oid']), 'fid in(' . dimplode($fids) . ')'); + //更改当前目录下所有下级文件路径 + C::t('resources_path')->update_pathdata_by_fid($icoarr['oid'], $rinfo['oid'], true); + //更改动态归属 + C::t('resources_event')->update_position_by_rid($rids, $rinfo['oid'], $rinfo['gid']); + C::t('resources_event')->update_event_by_pfid($icoarr['oid'], $rinfo['oid']); + //改变分享表数据 + DB::update('shares', array('pfid' => $rinfo['oid']), array('pfid' => $icoarr['oid'])); + + foreach ($rids as $v) { + self::Recover($v, $combine); + } + self::delete($icoarr['rid']); + //删除回收站数据 + C::t('resources_recyle')->delete_by_rid($icoarr['rid']); + } else { + //判断目录中是否存在同名文件夹,如果有则将当前目录改名 if ($ricoid = self::getRepeatIDByName($icoarr['name'], $icoarr['pfid'], true)) { $newname = self::getFolderName($icoarr['name'], $icoarr['pfid']); - self::rename($icoarr['rid'],$newname); + self::rename($icoarr['rid'], $newname); } - if (DB::update('folder', $recoverarr, 'fid =' . $icoarr['oid']) && DB::update('resources', $recoverarr, "rid ='{$rid}'")) { - $hash = C::t('resources_event')->get_showtpl_hash_by_gpfid($icoarr['pfid'], $icoarr['gid']); - //添加事件 - $eventdata1 = array('username' => $_G['username'], 'position' => $path, 'filename' => $icoarr['name'], 'hash' => $hash); - C::t('resources_event')->addevent_by_pfid($icoarr['pfid'], 'recover_file', 'recoverfile', $eventdata1, $icoarr['gid'], $rid, $icoarr['name']); + //如果当前文件夹是删除状态则恢复当前文件夹 + if ($icoarr['isdelete'] > 0) { + $recoverarr = array('isdelete' => 0, 'deldateline' => 0, 'pfid' => $icoarr['pfid']); + //恢复文件夹表数据和resources表数据 + if (DB::update('folder', $recoverarr, 'fid =' . $icoarr['oid']) && DB::update('resources', $recoverarr, "rid ='{$rid}'")) { + $hash = C::t('resources_event')->get_showtpl_hash_by_gpfid($icoarr['pfid'], $icoarr['gid']); + //添加事件 + $eventdata1 = array('username' => $_G['username'], 'position' => $path, 'filename' => $icoarr['name'], 'hash' => $hash); + C::t('resources_event')->addevent_by_pfid($icoarr['pfid'], 'recover_file', 'recoverfile', $eventdata1, $icoarr['gid'], $rid, $icoarr['name']); + } } - } - //获取当前文件夹fid及所有下级目录fid - $fids = C::t('resources_path')->fetch_folder_containfid_by_pfid($icoarr['oid']); - //目录下所有的文件rid和目录fid - $rids = array(); - foreach (DB::fetch_all("select rid from %t where pfid in(%n) and isdelete > 0", array('resources', $fids)) as $v) { - $rids[] = $v['rid']; - } - - foreach (DB::fetch_all("select rid from %t where pfid in(%n) and rid != %s", array('resources_recyle', $fids, $rid)) as $v) { - if (in_array($v['rid'], $rids)) {//如果文件rid在回收站,则排除 - $key = array_search($v['rid'], $rids); - unset($rids[$key]); + /* //获取当前文件夹fid及所有下级目录fid + $fids = C::t('resources_path')->fetch_folder_containfid_by_pfid($icoarr['oid']);*/ + //目录下所有删除文件rid + $rids = array(); + foreach (DB::fetch_all("select rid from %t where pfid = %d and isdelete > 0", array('resources', $icoarr['oid'])) as $v) { + $rids[] = $v['rid']; } + foreach ($rids as $v) { + self::Recover($v, $combine); + } + if ($newpfid) { + C::t('resources_path')->update_pathdata_by_fid($icoarr['oid'], $newpfid); + } + //删除回收站数据 + C::t('resources_recyle')->delete_by_rid($icoarr['rid']); } - foreach ($rids as $v) { - self::Recover($v, $noperm); - } - //删除回收站数据 - C::t('resources_recyle')->delete_by_rid($icoarr['rid']); - } else { if (!DB::result_first("select isdelete from %t where rid = %s", array('resources', $rid))) { return; } - $recoverarr = array('isdelete' => 0, 'deldateline' => 0); + $recoverarr = array('isdelete' => 0, 'deldateline' => 0, 'pfid' => $icoarr['pfid']); //如果目录下有同名文件,则恢复时生成新的文件名 if ($ricoid = self::getRepeatIDByName($icoarr['name'], $icoarr['pfid'], false)) { $recoverarr['name'] = self::getFileName($icoarr['name'], $icoarr['pfid']); } + $totalsize = 0; + if ($icoarr['vid'] > 0) { + $totalsize = DB::result_first("select sum(size) from %t where rid = %s", array('resources_version', $icoarr['rid'])); + } else { + $totalsize = $icoarr['size']; + } //重新设定空间值 - /* if ($icoarr['size'] > 0) { - SpaceSize($icoarr['size'], $gid, 1); - }*/ + if ($totalsize > 0) { + SpaceSize($totalsize, $gid, 1); + } //恢复文件 if (DB::update('resources', $recoverarr, array('rid' => $rid))) { @@ -2267,15 +2383,14 @@ class io_dzz extends io_api } } } - setglobal('appGreenChannel', false); + return array('rid' => $icoarr['rid'], 'name' => $icoarr['name']); } //本地文件移动到本地其它区域 - public function FileMove($rid, $pfid, $noperm = false, $first = true) + public function FileMove($rid, $pfid, $first = true) { global $_G, $_GET; - setglobal('appGreenChannel', ($noperm) ? true : false); @set_time_limit(0); @ini_set("memory_limit", "512M"); //判断目标目录是否存在 @@ -2293,13 +2408,13 @@ class io_dzz extends io_api //判断移动文件是否和目标文件在同一目录 if ($icoarr['pfid'] != $tfolder['fid']) { //判断有无删除权限 - if (!$noperm && !perm_check::checkperm('delete', $icoarr)) { + if (!perm_check::checkperm('delete', $icoarr)) { return array('error' => lang('privilege')); } //判断有无新建权限,如果是文件夹判断是否有文件件新建权限 - if (!$noperm && $icoarr['type'] == 'folder' && !perm_check::checkperm_Container($pfid, 'folder')) { + if ($icoarr['type'] == 'folder' && !perm_check::checkperm_Container($pfid, 'folder')) { return array('error' => lang('privilege')); - } elseif (!$noperm && !perm_check::checkperm_Container($pfid, 'upload')) { + } elseif (!perm_check::checkperm_Container($pfid, 'upload')) { return array('error' => lang('privilege')); } } @@ -2316,9 +2431,9 @@ class io_dzz extends io_api $oldgid = $icoarr['gid']; //如果是文件夹类型 if ($icoarr['type'] == 'folder') { - $contains = C::t('resources')->get_contains_by_fid($icoarr['oid'],true); + $contains = C::t('resources')->get_contains_by_fid($icoarr['oid'], true); if ($ogid != $gid && $contains['size'] && !SpaceSize($contains['size'], $gid)) { - setglobal('appGreenChannel', false); + return array('error' => lang('inadequate_capacity_space')); } @@ -2412,26 +2527,24 @@ class io_dzz extends io_api C::t('resources_event')->addevent_by_pfid($oldpfid, 'move_folder', 'movefolder', $eventdata2, $ogid, $rid, $icoarr['name']); } } else { - setglobal('appGreenChannel', false); return array('error', lang('folder_not_exist')); } } } else { $totalsize = 0; - if($icoarr['vid'] > 0){ - $totalsize =DB::result_first("select sum(size) from %t where rid = %s",array('resources_version',$icoarr['rid'])); - }else{ + if ($icoarr['vid'] > 0) { + $totalsize = DB::result_first("select sum(size) from %t where rid = %s", array('resources_version', $icoarr['rid'])); + } else { $totalsize = $icoarr['size']; } if ($ogid != $gid && $totalsize && !SpaceSize($totalsize, $gid)) { - setglobal('appGreenChannel', false); return array('error' => lang('inadequate_capacity_space')); } //如果不是文件夹判断文件名重复 if ($icoarr['pfid'] != $tfolder['fid'] || $icoarr['isdelete'] > 0) { - $icoarr1['name'] = self::getFileName($icoarr['name'], $tfolder['fid']); + $icoarr['name'] = self::getFileName($icoarr['name'], $tfolder['fid']); } $icoarr['gid'] = $gid; $icoarr['uid'] = $_G['uid']; @@ -2470,19 +2583,18 @@ class io_dzz extends io_api } if ($icoarr['type'] == 'folder') C::t('folder')->update($icoarr['oid'], array('isdelete' => 0)); $return['icoarr'] = C::t('resources')->fetch_by_rid($icoarr['rid']); + $return['icoarr']['monthdate'] = dgmdate($return['icoarr']['dateline'], 'm-d'); + $return['icoarr']['hourdate'] = dgmdate($return['icoarr']['dateline'], 'H:i'); unset($icoarr); - setglobal('appGreenChannel', false); return $return; return array('error' => lang('movement_error') . '!'); } //本地文件复制到本地其它区域 - public function FileCopy($rid, $pfid, $noperm = false, $first = true) + public function FileCopy($rid, $pfid, $first = true) { global $_G, $_GET; - setglobal('appGreenChannel', ($noperm) ? true : false); if (!$tfolder = DB::fetch_first("select * from " . DB::table('folder') . " where fid='{$pfid}'")) { - setglobal('appGreenChannel', false); return array('error' => lang('target_location_not_exist')); } if ($icoarr = C::t('resources')->fetch_by_rid($rid)) { @@ -2490,23 +2602,22 @@ class io_dzz extends io_api unset($icoarr['rid']); //判断当前文件有没有拷贝权限; - if (!$noperm && !perm_check::checkperm('copy', $icoarr)) { + if (!perm_check::checkperm('copy', $icoarr)) { return array('error' => lang('privilege')); } //判断当期目录有无添加权限 - if (!$noperm && !perm_check::checkperm_Container($pfid, 'upload')) { + if (!perm_check::checkperm_Container($pfid, 'upload')) { return array('error' => lang('privilege')); } - /*get_contains_by_fid*/ $success = 0; $gid = DB::result_first("select gid from " . DB::table('folder') . " where fid='{$pfid}'"); - $targetpath = C::t('resources_path')->fetch_pathby_pfid($pfid);//目标路径 + $targetpatharr = C::t('resources_path')->fetch_pathby_pfid($pfid,true);//目标路径 + $targetpath = $targetpatharr['path']; if ($icoarr['type'] == 'folder') { - $foldercontains = C::t('resourcse')->get_contains_by_fid($icoarr['oid']); + $foldercontains = C::t('resources')->get_contains_by_fid($icoarr['oid']); if (!SpaceSize($foldercontains['size'], $gid)) { - setglobal('appGreenChannel', false); return array('error' => lang('inadequate_capacity_space')); } if ($icoarr['pfid'] == $pfid) {//判断源文件位置和目标位置是否相同,如果相同则生成副本 @@ -2530,7 +2641,7 @@ class io_dzz extends io_api //复制源文件夹数据到目标目录同名文件夹 foreach (C::t('resources')->fetch_by_pfid($icoarr['oid']) as $value) { try { - self::FileCopy($value['rid'], $currentfid, $noperm, false); + self::FileCopy($value['rid'], $currentfid, false); } catch (Exception $e) { } } @@ -2539,10 +2650,10 @@ class io_dzz extends io_api $icoarr['rid'] = $data['rid']; } else {//如果目标目录中不存在同名文件夹或者存在同名文件夹而源文件位置和目标位置在同一目录,执行创建 - if ($data = self::createFolderByPath($icoarr['name'], $pfid, $noperm)) {//根据文件夹名字和当前文件夹路径创建文件夹 + if ($data = self::createFolderByPath($icoarr['name'], $pfid)) {//根据文件夹名字和当前文件夹路径创建文件夹 foreach (C::t('resources')->fetch_by_pfid($folder['fid']) as $value) {//查询原文件夹中文件 try { - self::FileCopy($value['rid'], $data['pfid'], $noperm, false);//复制原文件夹中文件到新文件夹 + self::FileCopy($value['rid'], $data['pfid'], false);//复制原文件夹中文件到新文件夹 } catch (Exception $e) { } } @@ -2553,13 +2664,11 @@ class io_dzz extends io_api } } else { - setglobal('appGreenChannel', false); return array('error', lang('folder_not_exist')); } } else { //判断空间大小是否足够 if (!SpaceSize($icoarr['size'], $gid)) { - setglobal('appGreenChannel', false); return array('error' => lang('inadequate_capacity_space')); } //判断文件名重复 @@ -2581,7 +2690,6 @@ class io_dzz extends io_api $icoarr['name'] = self::getFileName($icoarr['name'], $pfid); } - $setarr = array( 'name' => $icoarr['name'], 'oid' => $icoarr['oid'], @@ -2626,7 +2734,6 @@ class io_dzz extends io_api C::t('resources_event')->addevent_by_pfid($pfid, $event, 'create', $eventdata, $setarr['gid'], $icoarr['rid'], $icoarr['name']); } else { C::t('resources')->delete_by_rid($icoarr['rid']); - setglobal('appGreenChannel', false); return array('error' => lang('data_error')); } } @@ -2639,15 +2746,14 @@ class io_dzz extends io_api addtoconfig($icoarr); } else { $return['icoarr'] = C::t('resources')->fetch_by_rid($icoarr['rid']); - setglobal('appGreenChannel', false); + $return['icoarr']['monthdate'] = dgmdate($return['icoarr']['dateline'], 'm-d'); + $return['icoarr']['hourdate'] = dgmdate($return['icoarr']['dateline'], 'H:i'); return $return; } } else { - setglobal('appGreenChannel', false); return array('error' => lang('files_allowed_copy')); } - setglobal('appGreenChannel', false); return array('error' => 'copy error'); } } @@ -2702,13 +2808,12 @@ class io_dzz extends io_api } - public function multiUpload($opath, $path, $filename, $noperm = false, $attach = array(), $ondup = "newcopy") + public function multiUpload($opath, $path, $filename, $attach = array(), $ondup = "newcopy") { /* * 分块上传文件 * param $file:文件路径(可以是url路径,需要服务器开启allow_url_fopen); */ - setglobal('appGreenChannel', ($noperm) ? true : false); $data = IO::getMeta($opath); if ($data['error']) return $data; $size = $data['size']; @@ -2726,7 +2831,6 @@ class io_dzz extends io_api } } if (!$handle = fopen($filepath, 'rb')) { - setglobal('appGreenChannel', false); return array('error' => lang('open_file_error')); } if (strpos($path, 'dzz::') !== false || strpos($path, 'TMP::') !== false) { @@ -2737,7 +2841,6 @@ class io_dzz extends io_api unset($fileContent); } fclose($handle); - setglobal('appGreenChannel', false); return true; } else { $pathinfo = pathinfo($filename); @@ -2757,24 +2860,20 @@ class io_dzz extends io_api if ($attach = $this->save($target, $nfilename)) { //return array('error'=>json_encode($attach)); if ($attach['error']) { - setglobal('appGreenChannel', false); return array('error' => $attach['error']); } else { - setglobal('appGreenChannel', false); - return $this->uploadToattachment($attach, $path, $noperm); + return $this->uploadToattachment($attach, $path); } } else { - setglobal('appGreenChannel', false); return array('error' => 'failure'); } } - public function shenpiCreateFile($fid, $path, $attach, $noperm = false) + public function shenpiCreateFile($fid, $path, $attach) { - $data = self::createFolderByPath($path, $fid, $noperm); - setglobal('appGreenChannel', false); - return self::uploadToattachment($attach, $data['pfid'], $noperm); + $data = self::createFolderByPath($path, $fid);; + return self::uploadToattachment($attach, $data['pfid']); } } diff --git a/core/class/io/io_ftp.php b/core/class/io/io_ftp.php index a7a1f2a..bb7c827 100644 --- a/core/class/io/io_ftp.php +++ b/core/class/io/io_ftp.php @@ -8,916 +8,989 @@ */ if(!defined('IN_DZZ')) { - exit('Access Denied'); + exit('Access Denied'); } @set_time_limit(0); @ini_set('max_execution_time',0); class io_ftp extends io_api { - - const T ='connect_ftp'; - const BZ='ftp'; - var $perm=0; - var $icosdatas=array(); - var $error=''; - var $conn=null; - var $encode='GBK'; - var $_root=''; - var $_rootname=''; - public function __construct($path) { - $bzarr=explode(':',$path); - $ftpid=trim($bzarr[1]); - if($config=DB::fetch_first("select * from ".DB::table(self::T)." where id='{$ftpid}'")){ - $this->_root='ftp:'.$config['id'].':'; - $this->encode=$config['charset']; - $this->_rootname=$config['cloudname']; - $ftp=new dzz_ftp($config); - if($ftp->error()){ - $this->error=$ftp->error(); - return $this; - } - if($ftp->connect()){ - $this->conn=$ftp; - }else{ - $this->error='ftp not connect'; - } - }else{ - $this->error='need authorize'; - } - $this->perm=perm_binPerm::getMyPower(); - return $this; - } - - public function MoveToSpace($path,$attach){ - global $_G; - - $filename=substr($path,strrpos($path,'/')+1);; - $fpath=substr($path,0,strrpos($path,'/')); - - $obz=io_remote::getBzByRemoteid($attach['remote']); - if($obz=='dzz'){ - $opath='dzz::'.$attach['attachment']; - }else{ - $opath=$obz.'/'.$attach['attachment']; - } - //exit($opath.'==='.$fpath.'/'.$filename); - if($re=self::multiUpload($opath,$fpath,$filename,$attach,'overwrite')){ - if($re['error']) return $re; - else{ - return true; - } - } - return false; - } - - - //根据路径获取目录树的数据; - public function getFolderDatasByPath($path){ - - $bzarr=self::parsePath($path); - - $spath=preg_replace("/\/+/",'/',$bzarr['path1']); - if($spath){ - $patharr=explode('/',trim($spath,'/')); - }else{ - $patharr=array(); - } - //if(empty($patharr[0])) unset($patharr[0]); - $folderarr=array(); - for($i=0;$i<=count($patharr);$i++){ - $path1=$bzarr['bz']; - for($j=0;$j<$i;$j++){ - if($patharr[$j]) $path1.='/'.$patharr[$j]; - } - if($arr=self::getMeta($path1)){ - if(isset($arr['error'])) continue; - $folder=self::getFolderByIcosdata($arr); - $folderarr[$folder['fid']]=$folder; - } - } - return $folderarr; - } - public function authorize($refer){ - global $_G,$_GET,$clouds;; - if(empty($_G['uid'])) { - dsetcookie('_refer', rawurlencode(BASESCRIPT.'?mod=connect&op=oauth&bz=ftp')); - showmessage('to_login', '', array(), array('showmsg' => true, 'login' => 1)); - } - if(submitcheck('ftpsubmit')){ - $config=$_GET['config']; - $config['password']=authcode($config['password'], 'ENCODE', md5(getglobal('config/security/authkey'))); - $config['bz']='ftp'; - $uid=defined('IN_ADMIN')?0:$_G['uid']; - $config['on']=1; - $ftp = new dzz_ftp($config); - if($ftp->error()) showmessage(lang('ftp_Parameter_setting_error').$ftp->error(),dreferer()); - if($ftp->connect()){ - $config['uid']=$uid; - if($id=DB::result_first("select id from %t where uid=%d and host=%s and port=%d and username=%s",array(self::T,$uid,$config['host'],$config['port'],$config['username']))){ - DB::update(self::T,$config,"id ='{$id}'"); - }else{ - $config['dateline']=TIMESTAMP; - $id=DB::insert(self::T,$config,1); - } - if(defined('IN_ADMIN')){ - $setarr=array('name'=>$config['cloudname'], - 'bz'=>'ftp', - 'isdefault'=>0, - 'dname'=>self::T, - 'did'=>$id, - 'dateline'=>TIMESTAMP - ); - if(!DB::result_first("select COUNT(*) from %t where did=%d and dname=%s ",array('local_storage',$id,self::T))){ - C::t('local_storage')->insert($setarr); - } - showmessage('do_success',BASESCRIPT.'?mod=cloud&op=space'); - }else{ - showmessage('do_success',$refer?$refer:BASESCRIPT.'?mod=connect'); - } - }else{ - showmessage('try_connect_FTP_failed',dreferer()); - } - - }else{ - include template('oauth_ftp'); - } - } - public function parsePath($path){ - $bzarr=explode(':',$path); - return array('bz'=>$bzarr[0].':'.$bzarr[1].':','path'=>diconv($bzarr[2],CHARSET,$this->encode),'path1'=>$bzarr[2]); - } - //更改权限 - public function chmod($path,$chmod=0777,$son=0){ - if($this->error) return array('error'=>$this->error); - $bzarr=self::parsePath($path); - $chmod=eval("return({$chmod});"); - if($son){ - return $this->conn->ftp_chmod_son($bzarr['path'],$chmod); - }else{ - //showmessage($chmod.'======='.$this->conn->ftp_chmod($bzarr['path'],$chmod)); - return $this->conn->ftp_chmod($bzarr['path'],$chmod); - } - } - //获取文件流; - //$path: 路径 - function getStream($path){ - $arr=self::parsePath($path); - $config=$this->conn->config; - if($config['ssl']) $scheme='ftps://'; - else $scheme='ftp://'; - return $scheme.urlencode($config['username']).':'.urlencode($config['password']).'@'.$config['host'].':'.$config['port'].$arr['path']; - } - //获取文件流地址; - //$path: 路径 - function getFileUri($path){ - return getglobal('siteurl').'index.php?mod=io&op=getStream&path='.dzzencode($path); - } - public function deleteThumb($path){ - global $_G; - $imgcachePath='./imgcache/'; - $cachepath=preg_replace("/\/+/",'/',str_replace(':','/',$path)); - foreach($_G['setting']['thumbsize'] as $value){ - $target=$imgcachePath.($cachepath).'.'.$value['width'].'_'.$value['height'].'.jpeg'; - @unlink($_G['setting']['attachdir'].$target); - } - } - public function createThumb($path,$size,$width=0,$height=0,$srcx = 0,$srcy = 0){ - global $_G; - if(intval($width)<1) $width=$_G['setting']['thumbsize'][$size]['width']; - if(intval($height)<1) $height=$_G['setting']['thumbsize'][$size]['height']; - $imgcachePath='imgcache/'; - $cachepath=str_replace(':','/',$path); - $cachepath=preg_replace("/\/+/",'/',str_replace(':','/',$path)); - $target=$imgcachePath.($cachepath).'.'.$width.'_'.$height.'.jpeg'; - if(@getimagesize($_G['setting']['attachdir'].'./'.$target)){ - return 2;//已经存在缩略图 - } - //调用挂载点程序生成缩略图绝对和相对地址; - $fileurls=array(); - Hook::listen('thumbnail',$fileurls,$path); - if(!$fileurls){ - $fileurls=array('fileurl'=>self::getFileUri($path),'filedir'=>self::getStream($path)); - } - //非图片类文件的时候,直接获取文件后缀对应的图片 - if(!$imginfo = @getimagesize($fileurls['filedir'])){ - return -1; //非图片不能生成 - } - if(($imginfo[0]<$width && $imginfo[1]<$height) ) { - return 3;//小于要求尺寸,不需要生成 - } - //生成缩略图 - include_once libfile('class/image'); - $target_attach=$_G['setting']['attachdir'].'./'.$target; - $targetpath = dirname($target_attach); - dmkdir($targetpath); - $image=new image(); - if($thumb = $image->Cropper($fileurls['filedir'], $target, $width, $height,$srcx,$srcy)){ - //if($thumb = $image->Thumb($imgurl,$target,$width, $height,1) ){ - return 1;//生成缩略图成功 - }else{ - return 0;//生成缩略图失败 - } - - } - public function getThumb($path,$width,$height,$original,$returnurl=false,$srcx =0,$srcy = 0){ - global $_G; - $imgcachePath='imgcache/'; - $cachepath=str_replace(':','/',$path); - $cachepath=preg_replace("/\/+/",'/',str_replace(':','/',$path)); - if(!$original && @getimagesize($_G['setting']['attachdir'].'./'.$target)){ - if($returnurl) return $_G['setting']['attachurl'].'/'.$target; - IO::output_thumb($_G['setting']['attachdir'].'./'.$target); - } - //调用挂载点程序生成缩略图绝对和相对地址; - $fileurls=array(); - Hook::listen('thumbnail',$fileurls,$path); - if(!$fileurls){ - $fileurls=array('fileurl'=>self::getFileUri($path),'filedir'=>self::getStream($path)); - } - //非图片类文件的时候,直接获取文件后缀对应的图片 - if(!$imginfo = @getimagesize($fileurls['filedir'])){ - $imgurl= geticonfromext($data['ext'],$data['type']); - if ($returnurl) return $imgurl; - IO::output_thumb($imgurl); - } - //返回原图的时候或图片小于缩略图宽高的不生成直接返回原图 - if ($original || ($imginfo[0] < $width && $imginfo[1] < $height)) { - if ($returnurl) return $fileurls['fileurl']; - IO::output_thumb($fileurls['filedir']); + const T ='connect_ftp'; + const BZ='ftp'; + var $perm=0; + var $icosdatas=array(); + var $error=''; + var $conn=null; + var $encode='GBK'; + var $_root=''; + var $_rootname=''; + var $filecachetime = 300; + public function __construct($path) { + $bzarr=explode(':',$path); + $ftpid=trim($bzarr[1]); + if($config=DB::fetch_first("select * from ".DB::table(self::T)." where id='{$ftpid}'")){ + $this->_root='ftp:'.$config['id'].':'; + $this->encode=$config['charset']; + $this->_rootname=$config['cloudname']; + if($config['port'] == 22 || $config['ssl'] == 2){ + $ftp=new dzz_sftp($config); + }else{ + $ftp=new dzz_ftp($config); + } + if($ftp->error()){ + $this->error=$ftp->error(); + return $this; + } + if($ftp->connect()){ + $this->conn=$ftp; + }else{ + $this->error='ftp not connect'; + } + + }else{ + $this->error='need authorize'; } - //生成图片缩略图 - $imgurl = $fileurls['filedir']; - $target_attach = $_G['setting']['attachdir'] .'./'. $target; + $this->perm=perm_binPerm::getMyPower(); + return $this; + } + + public function MoveToSpace($path,$attach){ + global $_G; + $filename=substr($path,strrpos($path,'/')+1);; + $fpath=substr($path,0,strrpos($path,'/')); + $obz=io_remote::getBzByRemoteid($attach['remote']); + if($obz=='dzz'){ + $opath='dzz::'.$attach['attachment']; + }else{ + $opath=$obz.'/'.$attach['attachment']; + } + //exit($opath.'==='.$fpath.'/'.$filename); + if($re=self::multiUpload($opath,$fpath,$filename,$attach,'overwrite')){ + if($re['error']) return $re; + else{ + return true; + } + } + return false; + } + + + + //根据路径获取目录树的数据; + public function getFolderDatasByPath($path){ + + $bzarr=self::parsePath($path); + + $spath=preg_replace("/\/+/",'/',$bzarr['path1']); + if($spath){ + $patharr=explode('/',trim($spath,'/')); + }else{ + $patharr=array(); + } + //if(empty($patharr[0])) unset($patharr[0]); + $folderarr=array(); + for($i=0;$i<=count($patharr);$i++){ + $path1=$bzarr['bz']; + for($j=0;$j<$i;$j++){ + if($patharr[$j]) $path1.='/'.$patharr[$j]; + } + if($arr=self::getMeta($path1)){ + if(isset($arr['error'])) continue; + $folder=self::getFolderByIcosdata($arr); + $folderarr[$folder['fid']]=$folder; + } + } + return $folderarr; + } + public function authorize($refer){ + global $_G,$_GET,$clouds;; + if(empty($_G['uid'])) { + dsetcookie('_refer', rawurlencode(BASESCRIPT.'?mod=connect&op=oauth&bz=ftp')); + showmessage('to_login', '', array(), array('showmsg' => true, 'login' => 1)); + } + if(submitcheck('ftpsubmit')){ + $config=$_GET['config']; + $config['password']=authcode($config['password'], 'ENCODE', md5(getglobal('config/security/authkey'))); + $config['bz']='ftp'; + $uid=defined('IN_ADMIN')?0:$_G['uid']; + $config['on']=1; + if($config['port'] == 22 || $config['ssl'] == 2){ + $ftp = new dzz_sftp($config); + }else{ + $ftp = new dzz_ftp($config); + } + if($ftp->error()) showmessage(lang('ftp_Parameter_setting_error').$ftp->error(),dreferer()); + if($ftp->connect()){ + $config['uid']=$uid; + if($id=DB::result_first("select id from %t where uid=%d and host=%s and port=%d and username=%s",array(self::T,$uid,$config['host'],$config['port'],$config['username']))){ + DB::update(self::T,$config,"id ='{$id}'"); + }else{ + $config['dateline']=TIMESTAMP; + $id=DB::insert(self::T,$config,1); + } + if(defined('IN_ADMIN')){ + $setarr=array('name'=>$config['cloudname'], + 'bz'=>'ftp', + 'isdefault'=>0, + 'dname'=>self::T, + 'did'=>$id, + 'dateline'=>TIMESTAMP + ); + if(!DB::result_first("select COUNT(*) from %t where did=%d and dname=%s ",array('local_storage',$id,self::T))){ + C::t('local_storage')->insert($setarr); + } + showmessage('do_success',BASESCRIPT.'?mod=cloud&op=space'); + }else{ + showmessage('do_success',$refer?$refer:BASESCRIPT.'?mod=connect'); + } + }else{ + showmessage('try_connect_FTP_failed',dreferer()); + } + + }else{ + include template('oauth_ftp'); + } + } + public function parsePath($path){ + $bzarr=explode(':',$path); + return array('bz'=>$bzarr[0].':'.$bzarr[1].':','path'=>diconv($bzarr[2],CHARSET,$this->encode),'path1'=>$bzarr[2]); + } + //更改权限 + public function chmod($path,$chmod=0777,$son=0){ + if($this->error) return array('error'=>$this->error); + $bzarr=self::parsePath($path); + $chmod=eval("return({$chmod});"); + if($son){ + return $this->conn->ftp_chmod_son($bzarr['path'],$chmod); + }else{ + //showmessage($chmod.'======='.$this->conn->ftp_chmod($bzarr['path'],$chmod)); + return $this->conn->ftp_chmod($bzarr['path'],$chmod); + } + } + //获取文件流; + //$path: 路径 + function getStream($path){ + global $_G; + $arr=self::parsePath($path); + $filename = basename($path); + $cachetarget = $_G['setting']['attachdir'].'cache/'.$filename; + if(file_exists($cachetarget) && (filectime($cachetarget) > TIMESTAMP - $this->filecachetime)){ + return $cachetarget; + }else{ + $config=$this->conn->config; + if($config['ssl']) $scheme='ftps://'; + else $scheme='ftp://'; + if($config['port'] == 22 || $config['ssl'] == 2){ + $sftp = ssh2_sftp($this->conn->connectid); + $url = 'ssh2.sftp://'.$sftp.$arr['path']; + }else{ + $url = $scheme.urlencode($config['username']).':'.urlencode($config['password']).'@'.$config['host'].':'.$config['port'].$arr['path']; + } + if(file_put_contents($cachetarget,file_get_contents($url)) === false){ + $cachetarget = false; + } + } + return $cachetarget; + + } + //获取文件流地址; + //$path: 路径 + function getFileUri($path){ + return getglobal('siteurl').'index.php?mod=io&op=getStream&path='.dzzencode($path); + } + public function deleteThumb($path){ + global $_G; + $imgcachePath='./imgcache/'; + $cachepath=preg_replace("/\/+/",'/',str_replace(':','/',$path)); + foreach($_G['setting']['thumbsize'] as $value){ + $target = $imgcachePath . ($cachepath) . '.' . $value['width'] . '_' . $value['height'] . '_1.jpeg'; + $target1 = $imgcachePath . ($cachepath) . '.' . $value['width'] . '_' . $value['height'] . '_2.jpeg'; + @unlink($_G['setting']['attachdir'].$target); + @unlink($_G['setting']['attachdir'].$target1); + } + } + public function createThumb($path,$size,$width=0,$height=0,$thumbtype = 1){ + global $_G; + if(intval($width)<1) $width=$_G['setting']['thumbsize'][$size]['width']; + if(intval($height)<1) $height=$_G['setting']['thumbsize'][$size]['height']; + $imgcachePath='imgcache/'; + $cachepath=str_replace(':','/',$path); + $cachepath=preg_replace("/\/+/",'/',str_replace(':','/',$path)); + $target = $imgcachePath . ($cachepath) . '.' . $width . '_' . $height. '_'.$thumbtype.'.jpeg'; + if(@getimagesize($_G['setting']['attachdir'].'./'.$target)){ + return 2;//已经存在缩略图 + } + //调用挂载点程序生成缩略图绝对和相对地址; + $fileurls=array(); + Hook::listen('thumbnail',$fileurls,$path); + if(!$fileurls){ + $fileurls=array('fileurl'=>self::getFileUri($path),'filedir'=>self::getStream($path)); + } + //非图片类文件的时候,直接获取文件后缀对应的图片 + if(!$imginfo = @getimagesize($fileurls['filedir'])){ + return -1; //非图片不能生成 + } + if(($imginfo[0]<$width && $imginfo[1]<$height) ) { + return 3;//小于要求尺寸,不需要生成 + } + //生成缩略图 + include_once libfile('class/image'); + $target_attach=$_G['setting']['attachdir'].'./'.$target; $targetpath = dirname($target_attach); dmkdir($targetpath); - require_once libfile('class/image'); - $image = new image(); - if($thumb = $image->Cropper($imgurl, $target, $width, $height,$srcx,$srcy)){ - if($returnurl) return $_G['setting']['attachurl'].'/'.$target; - IO::output_thumb($_G['setting']['attachdir'].'./'.$target); - }else{ - if($returnurl) return $imgurl; - IO::output_thumb($imgurl); - } + $image=new image(); + if($thumb = $image->Thumb($fileurls['filedir'], $target, $width, $height,$thumbtype)){ + return 1;//生成缩略图成功 + }else{ + return 0;//生成缩略图失败 + } - } - //重写文件内容 - //@param number $path 文件的路径 - //@param string $data 文件的新内容 - public function setFileContent($path,$data){ - - $bzarr=self::parsepath($path); - $temp = tempnam(sys_get_temp_dir(), 'tmpimg_'); - if(!file_put_contents($temp,$data)){ - return array(lang('error_writing_temporary_file')); - } - if($this->conn->upload($temp,$bzarr['path'])){ - - }else{ - return array('error'=>$this->conn->error()); - } - $icoarr=self::getMeta($path); - if($icoarr['type']=='image'){ - $icoarr['img'].='&t='.TIMESTAMP; - } - return $icoarr; - } - - /** - * 移动文件到目标位置 - * @param string $opath 被移动的文件路径 - * @param string $path 目标位置(可能是同一api内或跨api,这两种情况分开处理) - * @return icosdatas - */ - public function CopyTo($opath,$path,$iscopy){ - $oarr=self::parsePath($opath); - $arr=IO::parsePath($path); - $data=self::getMeta($opath); - switch($data['type']){ - case 'folder'://创建目录 - if($re=IO::CreateFolder($path,$data['name'])){ - $data['newdata']=$re['icoarr']; - $data['success']=true; - $contents=self::listFiles($opath); - foreach($contents as $key=>$value){ - $data['contents'][$key]=self::CopyTo($value['path'],$re['folderarr']['path']); - } - } - break; - default: - - if($re=IO::multiUpload($opath,$path,$data['name'])){ - if($re['error']) $data['success']=$re['error']; - else{ - $data['newdata']=$re; - $data['success']=true; - } - } - } - - - return $data; - } - /* - * 分块上传文件 - * param $file:文件路径(可以是url路径,需要服务器开启allow_url_fopen); - */ - public function multiUpload($opath,$path,$filename,$attach=array(),$ondup="newcopy"){ - global $_G; - - $partsize=1024*1024*5; //分块大小2M - if($attach){ - $data=$attach; - $data['size']=$attach['filesize']; - }else{ - $data=IO::getMeta($opath); - if($data['error']) return $data; - } - $size=$data['size']; - if(is_array($filepath=IO::getStream($opath))){ - return array('error'=>$filepath['error']); - } - - //exit(($size<$partsize).'===='.$size.'==='.$filepath.'===='.$path); - if($size<$partsize){ - //获取文件内容 - $fileContent=''; - if(!$handle=fopen($filepath, 'rb')){ - return array('error'=>lang('open_file_error')); - } - while (!feof($handle)) { - $fileContent .= fread($handle, 8192); - //if(strlen($fileContent)==0) return array('error'=>'文件不存在'); - } - fclose($handle); - //exit('upload'); - return self::upload_by_content($fileContent,$path,$filename); - }else{ //分片上传 + } + public function getThumb($path,$width,$height,$original,$returnurl=false,$thumbtype = 1){ + global $_G; + $imgcachePath='imgcache/'; + $cachepath=str_replace(':','/',$path); + $cachepath=preg_replace("/\/+/",'/',str_replace(':','/',$path)); + $target = $imgcachePath . ($cachepath) . '.' . $width . '_' . $height. '_'.$thumbtype.'.jpeg'; + if(!$original && @getimagesize($_G['setting']['attachdir'].'./'.$target)){ + if($returnurl) return $_G['setting']['attachurl'].'/'.$target; + IO::output_thumb($_G['setting']['attachdir'].'./'.$target); + } + //调用挂载点程序生成缩略图绝对和相对地址; + $fileurls=array(); + Hook::listen('thumbnail',$fileurls,$path); + if(!$fileurls){ + $fileurls=array('fileurl'=>self::getFileUri($path),'filedir'=>self::getStream($path)); + } + //非图片类文件的时候,直接获取文件后缀对应的图片 + if(!$imginfo = @getimagesize($fileurls['filedir'])){ + $imgurl= geticonfromext($data['ext'],$data['type']); + if ($returnurl) return $imgurl; + IO::output_thumb($imgurl); + } + //返回原图的时候或图片小于缩略图宽高的不生成直接返回原图 + if ($original || ($imginfo[0] < $width && $imginfo[1] < $height)) { + if ($returnurl) return $fileurls['fileurl']; + IO::output_thumb($fileurls['filedir']); + } + //生成图片缩略图 + $imgurl = $fileurls['filedir']; + $target_attach = $_G['setting']['attachdir'] .'./'. $target; + $targetpath = dirname($target_attach); + dmkdir($targetpath); + require_once libfile('class/image'); + $image = new image(); + if($thumb = $image->Thumb($imgurl, $target, $width, $height,$thumbtype)){ + if($returnurl) return $_G['setting']['attachurl'].'/'.$target; + IO::output_thumb($_G['setting']['attachdir'].'./'.$target); + }else{ + if($returnurl) return $imgurl; + IO::output_thumb($imgurl); + } - $partinfo=array('ispart'=>true,'partnum'=>0,'iscomplete'=>false); - if(!$handle=fopen($filepath, 'rb')){ - return array('error'=>lang('open_file_error')); - } - $cachefile=$_G['setting']['attachdir'].'./cache/'.md5($opath).'.dzz'; - $fileContent=''; - while (!feof($handle)) { - $fileContent.=fread($handle, 8192); - if(strlen($fileContent)==0) return array('error'=>lang('file_not_exist1')); - if(strlen($fileContent)>=$partsize){ - if($partinfo['partnum']*$partsize+strlen($fileContent)>=$size) $partinfo['iscomplete']=true; - $partinfo['partnum']+=1; - file_put_contents($cachefile,$fileContent); - $re=self::upload($cachefile,$path,$filename,$partinfo); - if($re['error']) return $re; - if($partinfo['iscomplete']){ - @unlink($cachefile); - return $re; - } - $fileContent=''; - } - } - fclose($handle); - if(!empty($fileContent)){ - $partinfo['partnum']+=1; - $partinfo['iscomplete']=true; - file_put_contents($cachefile,$fileContent); - $re=self::upload($cachefile,$path,$filename,$partinfo); - if($re['error']) return $re; - if($partinfo['iscomplete']){ - @unlink($cachefile); - return $re; - } - } - } - } - /** - * 获取指定文件夹下的文件列表 - * @param string $path 文件路径 - * @param string $by 排序字段,缺省根据文件类型排序,time(修改时间),name(文件名),size(大小,注意目录无大小) - * @param string $order asc或desc,缺省采用降序排序 - * @param string $limit 返回条目控制,参数格式为:n1-n2。返回结果集的[n1, n2)之间的条目,缺省返回所有条目。n1从0开始。 - * @param string $force 读取缓存,大于0:忽略缓存,直接调用api数据,常用于强制刷新时。 - * @return icosdatas - */ - function listFiles($path,$by='time',$order='desc',$limit='',$force=0){ - if($this->error) return array('error'=>$this->error); - $bzarr=self::parsePath($path); - - $data = $this->conn->ftp_list($bzarr['path']); - //print_r($data);exit(diconv($bzarr['path'],'GBK',CHARSET)); - if($this->conn->error()) return array('error'=>$this->conn->error()); - $icosdata=array(); - foreach($data as $key => $value){ - $icoarr=self::_formatMeta($value,$bzarr['bz']); - $icosdata[$icoarr['icoid']]=$icoarr; - } - return $icosdata; - } - /* - *获取文件的meta数据 - *返回标准的icosdata - *$force>0 强制刷新,不读取缓存数据; - */ - function getMeta($path,$force=0){ - $bzarr=self::parsePath($path); - $meta=array(); - if($path==$this->_root){ - $meta['path']=''; - $meta['name']=$this->_rootname; - $meta['type']='folder'; - $meta['size']='-'; - $meta['flag']=self::BZ; - }else{ - if(!$meta=$this->conn->ftp_meta($bzarr['path'])){ - $meta['path']=$bzarr['path1']; - $meta['name']=substr(strrchr($bzarr['path1'], '/'), 1); - if($this->conn->ftp_isdir($bzarr['path'])){ - $meta['type']='folder'; - $meta['size']='-'; - }else{ - $meta['type']='file'; - $meta['size']=$this->conn->ftp_size($bzarr['path']); - $meta['mtime']=$this->conn->ftp_mdtm($bzarr['path']); - if($meta['mtime']<0) $meta['mtime']=0; - } - - } - } - $icosdata=self::_formatMeta($meta,$bzarr['bz']); - return $icosdata; - } - //将api获取的meta数据转化为icodata - function _formatMeta($meta,$bz){ - global $_G,$documentexts,$imageexts; - //判断是否为根目录 - $icosdata=array(); - - if($meta['type']=='folder'){ - $icoarr=array( - 'icoid'=>md5(($bz.$meta['path'])), - 'path'=>$bz.$meta['path'], - 'dpath'=>dzzencode($bz.$meta['path']), - 'bz'=>($bz), - 'gid'=>0, - 'name'=>$meta['name'], - 'username'=>$_G['username'], - 'uid'=>$_G['uid'], - 'oid'=>md5(($bz.$meta['path'])), - 'img'=>'dzz/images/default/system/folder.png', - 'type'=>'folder', - 'ext'=>'', - 'pfid'=>md5(str_replace(strrchr($meta['path'], '/'), '',$bz.$meta['path'])), - 'size'=>'-', - 'dateline'=>intval($meta['mtime']), - 'flag'=>$meta['flag']?$meta['flag']:'', - 'mod'=>$meta['mod'] - ); - - $icoarr['fsize']='-'; - $icoarr['ftype']=getFileTypeName($icoarr['type'],$icoarr['ext']); - if(!$icoarr['dateline']) $icoarr['fdateline']='-'; - else $icoarr['fdateline']=dgmdate($icoarr['dateline']); - $icosdata=$icoarr; - - }else{ - $pathinfo = pathinfo($meta['path']); - $ext = strtolower($pathinfo['extension']); - if(in_array($ext,$imageexts)) $type='image'; - elseif(in_array($ext,$documentexts)) $type='document'; - else $type='attach'; - - if($type=='image'){ - $img=$_G['siteurl'].DZZSCRIPT.'?mod=io&op=thumbnail&size=small&path='.dzzencode($bz.$meta['path']); - $url=$_G['siteurl'].DZZSCRIPT.'?mod=io&op=thumbnail&size=large&path='.dzzencode($bz.$meta['path']); - }else{ - $img=geticonfromext($ext,$type); - $url=$_G['siteurl'].DZZSCRIPT.'?mod=io&op=getStream&path='.dzzencode($bz.$meta['path']); - } - $icoarr=array( - 'icoid'=>md5(($bz.$meta['path'])), - 'path'=>($bz.$meta['path']), - 'dpath'=>dzzencode($bz.$meta['path']), - 'bz'=>($bz), - 'gid'=>0, - 'name'=>$meta['name'], - 'username'=>$_G['username'], - 'uid'=>$_G['uid'], - 'oid'=>md5(($bz.$meta['path'])), - 'img'=>$img, - 'url'=>$url, - 'type'=>$type, - 'ext'=>strtolower($ext), - 'pfid'=>md5(str_replace(strrchr($meta['path'], '/'), '',$bz.$meta['path'])), - 'size'=>$meta['size'], - 'dateline'=>intval($meta['mtime']), - 'flag'=>'', - 'mod'=>$meta['mod'] - ); - - $icoarr['fsize']=formatsize($icoarr['size']); - $icoarr['ftype']=getFileTypeName($icoarr['type'],$icoarr['ext']); - if(!$icoarr['dateline']) $icoarr['fdateline']='-'; - else $icoarr['fdateline']=dgmdate($icoarr['dateline']); - $icosdata=$icoarr; - } - - return $icosdata; - } - //通过icosdata获取folderdata数据 - function getFolderByIcosdata($icosdata){ - global $_GET; - $folder=array(); - if($icosdata['type']=='folder'){ - $folder=array('fid'=>$icosdata['oid'], - 'path'=>$icosdata['path'], - 'fname'=>$icosdata['name'], - 'uid'=>$icosdata['uid'], - 'pfid'=>$icosdata['pfid'], - 'iconview'=>$_GET['iconview']?intval($_GET['iconview']):1, - 'disp'=>$_GET['disp']?intval($_GET['disp']):1, - 'perm'=>$this->perm, - 'hash'=>$icosdata['hash'], - 'bz'=>$icosdata['bz'], - 'gid'=>$icosdata['gid'], - 'fsperm'=>perm_FolderSPerm::flagPower('external') - ); - - } - return $folder; - } - //获得文件内容; - function getFileContent($path){ - $url=self::getStream($path); - return file_get_contents($url); - } - //打包下载文件 - public function zipdownload($paths,$filename){ - global $_G; - $paths=(array)$paths; - set_time_limit(0); - - if(empty($filename)){ - $meta=self::getMeta($paths[0]); - $filename=$meta['name'].(count($paths)>1?lang('wait'):''); - } - $filename=(strtolower(CHARSET) == 'utf-8' && (strexists($_SERVER['HTTP_USER_AGENT'], 'MSIE') || strexists($_SERVER['HTTP_USER_AGENT'], 'Edge') || strexists($_SERVER['HTTP_USER_AGENT'], 'rv:11')) ? urlencode($filename) : $filename); - include_once libfile('class/ZipStream'); - - $zip = new ZipStream($filename.".zip"); - //$zip->setComment("$meta[name] " . date('l jS \of F Y h:i:s A')); - $data=self::getFolderInfo($paths,'',$zip); - /*foreach($data as $value){ - $zip->addLargeFile(fopen($value['url'],'rb'), $value['position'], $value['dateline']); - }*/ - $zip->finalize(); - } - public function getFolderInfo($paths,$position='',&$zip){ - static $data=array(); - try{ - foreach($paths as $path){ - $arr=self::parsePath($path); - - $meta=self::getMeta($path); - - switch($meta['type']){ - case 'folder': - $lposition=$position.$meta['name'].'/'; - $contents=self::listFiles($path); - $arr=array(); - foreach($contents as $key=>$value){ - $arr[]=$value['path']; - } - if($arr) self::getFolderInfo($arr,$lposition,$zip); - break; - default: - $meta['url']=self::getStream($meta['path']); - $meta['position']=$position.$meta['name']; - //$data[$meta['icoid']]=$meta; - $zip->addLargeFile(fopen($meta['url'],'rb'), $meta['position'], $meta['dateline']); - } - } - - }catch(Exception $e){ - //var_dump($e); - $data['error']=$e->getMessage(); - return $data; - } - return $data; - } - - //下载文件 - public function download($paths,$filename){ - global $_G; - $paths=(array)$paths; - if(count($paths)>1){ - self::zipdownload($paths,$filename); - exit(); - }else{ - $path=$paths[0]; - } - $path=rawurldecode($path); - try { - // Download the file - $file=self::getMeta($path); - if($file['type']=='folder'){ - self::zipdownload($path); - exit(); - } - $url=self::getStream($path); - if(!$fp = @fopen($url, 'rb')) { - topshowmessage(lang('file_not_exist1')); - } - - $chunk = 10 * 1024 * 1024; - //$file['data'] = self::getFileContent($path); - //if($file['data']['error']) IO::topshowmessage($file['data']['error']); - $file['name'] = '"'.(strtolower(CHARSET) == 'utf-8' && (strexists($_SERVER['HTTP_USER_AGENT'], 'MSIE') || strexists($_SERVER['HTTP_USER_AGENT'], 'Edge') || strexists($_SERVER['HTTP_USER_AGENT'], 'rv:11')) ? urlencode($file['name']) : $file['name']).'"'; - $d=new FileDownload(); - $d->download($url,$file['name'],$file['size'],$file['dateline'],true); - exit(); - dheader('Date: '.gmdate('D, d M Y H:i:s', $file['dateline']).' GMT'); - dheader('Last-Modified: '.gmdate('D, d M Y H:i:s', $file['dateline']).' GMT'); - dheader('Content-Encoding: none'); - dheader('Content-Disposition: attachment; filename='.$file['name']); - dheader('Content-Type: application/octet-stream'); - dheader('Content-Length: '.$file['size']); - - @ob_end_clean(); - if(getglobal('gzipcompress')) @ob_start('ob_gzhandler'); - while (!feof($fp)) { - echo fread($fp, $chunk); - @ob_flush(); // flush output - @flush(); - } - @fclose($fp); - exit(); - } catch (Exception $e) { - // The file wasn't found at the specified path/revision - //echo 'The file was not found at the specified path/revision'; - topshowmessage($e->getMessage()); - } - } - + } + //重写文件内容 + //@param number $path 文件的路径 + //@param string $data 文件的新内容 + public function setFileContent($path,$data){ - public function rename($path,$name){ - $arr=self::parsePath($path); - $patharr=explode('/',$arr['path1']); - $arr['path2']=''; - $pathinfo = pathinfo($arr['path1']); - $ext = strtolower($pathinfo['extension']); - foreach($patharr as $key =>$value){ - if($key>=count($patharr)-1) break; - $arr['path2'].=$value.'/'; - } - $arr['path2'].=$ext?(preg_replace("/\.\w+$/i",'.'.$ext,$name)):$name; - $arr['path3']=diconv($arr['path2'],CHARSET,$this->encode); - if($arr['path1']!=$arr['path2']){ - if($this->conn->ftp_rename($arr['path'],$arr['path3'])){ - }else{ - return array('error'=>$this->conn->error()); - } - } - return self::getMeta($arr['bz'].$arr['path2']); - } - - - //删除原内容 - //$path: 删除的路径 - //$bz: 删除的api; - //$data:可以删除的id数组(当剪切的时候,为了保证数据不丢失,目标位置添加成功后将此id添加到data数组, - //删除时如果$data有数据,将会只删除id在$data中的数据; - //如果删除的是目录或下级有目录,需要判断此目录内是否所有元素都在删除的id中,如果有未删除的元素,则此目录保留不会删除; - //$force 真实删除,不放入回收站 - public function Delete($path,$force=false){ - //global $dropbox; - $bzarr=self::parsePath($path); - if($this->error){ - return array('error'=>$this->error); - } - - if($this->conn->ftp_isdir($bzarr['path'])){ - if($this->conn->ftp_rmdir_force($bzarr['path'])){ - return array('icoid'=>md5(($path)), - 'name'=>substr(strrchr($path, '/'), 1), - ); - }else{ - return array('icoid'=>md5(($path)),'error'=>$this->conn->error()); - } - }else{ - if($this->conn->ftp_delete($bzarr['path'])){ - return array('icoid'=>md5(($path)), - 'name'=>substr(strrchr($path, '/'), 1), - ); - }else{ - return array('icoid'=>md5(($path)),'error'=>$this->conn->error()); - } - } - } - public function createFolderByPath($path, $pfid = '',$noperm = false) - { - $data = array(); - if($this->conn->ftp_mkdir($path)){ - $data = $this->conn->ftp_meta($path); - } - return $data; - } - //添加目录 - //$fname:目录路径; - //$container:目标容器 - //$bz:api; - public function CreateFolder($path,$fname){ - global $_G; - $path=$path.'/'.$fname; - $bzarr=self::parsePath($path); - $return=array(); - if($this->conn->ftp_mkdir($bzarr['path'])){ - $meta['path']=$bzarr['path1']; - $meta['name']=substr(strrchr($bzarr['path1'], '/'), 1); - $meta['type']='folder'; - $meta['size']='-'; - $icoarr=self::_formatMeta($meta,$bzarr['bz']); - $folderarr=self::getFolderByIcosdata($icoarr); - return array('folderarr'=>$folderarr,'icoarr'=>$icoarr); - }else{ - return array('error'=>$this->conn->error()); - } - - } - //获取不重复的目录名称 - public function getFolderName($name,$path){ - static $i=0; - if(!$this->icosdatas) $this->icosdatas=self::listFiles($path); - $names=array(); - foreach($this->icosdatas as $value){ - $names[]=$value['name']; - } - if(in_array($name,$names)){ - $name=str_replace('('.$i.')','',$name).'('.($i+1).')'; - $i+=1; - return self::getFolderName($name,$path); - }else { - return $name; - } - } - private function getPartInfo($content_range){ - $arr=array(); - if(!$content_range){ - $arr['ispart']=false; - $arr['iscomplete']=true; - }elseif(is_array($content_range)){ - $arr['ispart']=true; - $partsize=getglobal('setting/maxChunkSize'); - $arr['partnum']=ceil(($content_range[2]+1)/$partsize); - if(($content_range[2]+1)>=$content_range[3]){ - $arr['iscomplete']=true; - }else{ - $arr['iscomplete']=false; - } - }else{ - return false; - } - return $arr; - } - private function getCache($path){ - $cachekey='ftp_upload_'.md5($path); - if($cache=C::t('cache')->fetch($cachekey)){ - return $cache['cachevalue']; - }else{ - return false; - } - } - private function saveCache($path,$str){ - global $_G; - $cachekey='ftp_upload_'.md5($path); - C::t('cache')->insert(array( - 'cachekey' => $cachekey, - 'cachevalue' => $str, - 'dateline' => $_G['timestamp'], - ), false, true); - } - private function deleteCache($path){ - $cachekey='ftp_upload_'.md5($path); - C::t('cache')->delete($cachekey); - } - public function uploadStream($file,$filename,$path,$relativePath,$content_range){ - $data=array(); - //exit($path.'===='.$filename); - - //处理目录(没有分片或者最后一个分片时创建目录 - $arr=self::getPartInfo($content_range); - - if($relativePath && ($arr['iscomplete'])){ - $path1=$path; - $patharr=explode('/',$relativePath); - foreach($patharr as $key=> $value){ - if(!$value){ - unset($patharr[$key]); - continue; - } - if($patharr[$key-1]) $path1.='/'.$patharr[$key-1]; - - $re=self::CreateFolder($path1,$value); - if(isset($re['error'])){ - return $re; - }else{ - if($key==0){ - $data['icoarr'][]=$re['icoarr']; - $data['folderarr'][]=$re['folderarr']; - } - } - - } - //$path.='/'.implode('/',$patharr); - } - if($relativePath) $path=$path.'/'.trim($relativePath,'/'); - if($arr['ispart']){ - if($re1=self::upload($file,$path,$filename,$arr)){ - if($re1['error']){ - return $re1; - } - if($arr['iscomplete']){ - if(empty($re1['error'])){ - - $data['icoarr'][] = $re1; - return $data; - }else{ - $data['error'] = $re1['error']; - return $data; - } - }else{ - return true; - } - } - }else{ - $re1=self::upload($file,$path,$filename); - if(empty($re1['error'])){ - /*if($relativePath){ - $icoarr=self::getMeta($path); - $data['icoarr'][]=$icoarr; - $data['folderarr'][]=self::getFolderByIcosdata($icoarr); - }*/ - $data['icoarr'][] = $re1; - return $data; - }else{ - $data['error'] = $re1['error']; - return $data; - } - } - } - function upload($file,$path,$filename,$partinfo=array(),$ondup='newcopy'){ - global $_G; - - $bzarr=self::parsePath($path.'/'.$filename); - //获取文件内容 - $fileContent=''; - if(!$handle=fopen($file, 'rb')){ - return array('error'=>lang('open_file_error')); - } - while (!feof($handle)) { - $fileContent .= fread($handle, 8192); - } - fclose($handle); - if($partinfo['ispart']){ - if($partinfo['partnum']==1){ - $target='./cache/'.md5($path.'/'.$filename); - file_put_contents($_G['setting']['attachdir'].$target,''); - self::saveCache(md5($path.'/'.$filename),$target); - }else{ - $target=self::getCache(md5($path.'/'.$filename)); - } - - if(!file_put_contents($_G['setting']['attachdir'].$target,$fileContent,FILE_APPEND)){ - return array('error'=>lang('cache_file_error1')); - } - if(!$partinfo['iscomplete']) return true; - else{ - if(!$this->conn->upload($_G['setting']['attachdir'].$target,$bzarr['path'])){ - return array('error'=>$this->conn->error()); - } - @unlink($_G['setting']['attachdir'].$target); - self::deleteCache(md5($path.'/'.$filename)); - } - }else{ - if(!$this->conn->upload($file,$bzarr['path'])){ - return array('error'=>$this->conn->error()); - } - } - return self::getMeta($path.'/'.$filename); - } - public function upload_by_content($content,$path,$filename){ - global $_G; - - $bzarr=self::parsePath($path.'/'.$filename); - //获取文件内容 - $file=$_G['setting']['attachdir'].'./cache/'.md5($path.'/'.$filename); - @file_put_contents($file,$content); - // $return=self::upload($file,$path,$filename); - if(!$this->conn->upload($file,$bzarr['path'])){ - return array('error'=>$this->conn->error()); - } - @unlink($file); - return self::getMeta($path.'/'.$filename); - } + $bzarr=self::parsepath($path); + $temp = tempnam(sys_get_temp_dir(), 'tmpimg_'); + if(!file_put_contents($temp,$data)){ + return array(lang('error_writing_temporary_file')); + } + if($this->conn->upload($temp,$bzarr['path'])){ + + }else{ + return array('error'=>$this->conn->error()); + } + $icoarr=self::getMeta($path); + if($icoarr['type']=='image'){ + $icoarr['img'].='&t='.TIMESTAMP; + } + return $icoarr; + } + + /** + * 移动文件到目标位置 + * @param string $opath 被移动的文件路径 + * @param string $path 目标位置(可能是同一api内或跨api,这两种情况分开处理) + * @return icosdatas + */ + public function CopyTo($opath,$path,$iscopy){ + $oarr=self::parsePath($opath); + $arr=IO::parsePath($path); + $data=self::getMeta($opath); + switch($data['type']){ + case 'folder'://创建目录 + if($re=IO::CreateFolder($path,$data['name'])){ + $data['newdata']=$re['icoarr']; + $data['success']=true; + $contents=self::listFiles($opath); + foreach($contents as $key=>$value){ + $data['contents'][$key]=self::CopyTo($value['path'],$re['folderarr']['path']); + } + } + break; + default: + + if($re=IO::multiUpload($opath,$path,$data['name'])){ + if($re['error']) $data['success']=$re['error']; + else{ + $data['newdata']=$re; + $data['success']=true; + } + } + } + + + return $data; + } + /* + * 分块上传文件 + * param $file:文件路径(可以是url路径,需要服务器开启allow_url_fopen); + */ + public function multiUpload($opath,$path,$filename,$attach=array(),$ondup="newcopy"){ + global $_G; + $partsize=1024*1024*5; //分块大小2M + if($attach){ + $data=$attach; + $data['size']=$attach['filesize']; + }else{ + $data=IO::getMeta($opath); + if($data['error']) return $data; + } + $size=$data['size']; + if(is_array($filepath=IO::getStream($opath))){ + return array('error'=>$filepath['error']); + } + + //exit(($size<$partsize).'===='.$size.'==='.$filepath.'===='.$path); + if($size<$partsize){ + //获取文件内容 + $fileContent=''; + if(!$handle=fopen($filepath, 'rb')){ + return array('error'=>lang('open_file_error')); + } + while (!feof($handle)) { + $fileContent .= fread($handle, 8192); + //if(strlen($fileContent)==0) return array('error'=>'文件不存在'); + } + fclose($handle); + //exit('upload'); + return self::upload_by_content($fileContent,$path,$filename); + }else{ //分片上传 + + $partinfo=array('ispart'=>true,'partnum'=>0,'iscomplete'=>false); + if(!$handle=fopen($filepath, 'rb')){ + return array('error'=>lang('open_file_error')); + } + $cachefile=$_G['setting']['attachdir'].'./cache/'.md5($opath).'.dzz'; + $fileContent=''; + while (!feof($handle)) { + $fileContent.=fread($handle, 8192); + if(strlen($fileContent)==0) return array('error'=>lang('file_not_exist1')); + if(strlen($fileContent)>=$partsize){ + if($partinfo['partnum']*$partsize+strlen($fileContent)>=$size) $partinfo['iscomplete']=true; + $partinfo['partnum']+=1; + file_put_contents($cachefile,$fileContent); + $re=self::upload($cachefile,$path,$filename,$partinfo); + if($re['error']) return $re; + if($partinfo['iscomplete']){ + @unlink($cachefile); + return $re; + } + $fileContent=''; + } + } + fclose($handle); + if(!empty($fileContent)){ + $partinfo['partnum']+=1; + $partinfo['iscomplete']=true; + file_put_contents($cachefile,$fileContent); + $re=self::upload($cachefile,$path,$filename,$partinfo); + if($re['error']) return $re; + if($partinfo['iscomplete']){ + @unlink($cachefile); + return $re; + } + } + } + } + /** + * 获取指定文件夹下的文件列表 + * @param string $path 文件路径 + * @param string $by 排序字段,缺省根据文件类型排序,time(修改时间),name(文件名),size(大小,注意目录无大小) + * @param string $order asc或desc,缺省采用降序排序 + * @param string $limit 返回条目控制,参数格式为:n1-n2。返回结果集的[n1, n2)之间的条目,缺省返回所有条目。n1从0开始。 + * @param string $force 读取缓存,大于0:忽略缓存,直接调用api数据,常用于强制刷新时。 + * @return icosdatas + */ + function listFiles($path,$by='time',$order='desc',$limit='',$force=0){ + if($this->error) return array('error'=>$this->error); + $bzarr=self::parsePath($path); + + $data = $this->conn->ftp_list($bzarr['path']); + //print_r($data);exit(diconv($bzarr['path'],'GBK',CHARSET)); + if($this->conn->error()) return array('error'=>$this->conn->error()); + $icosdata=array(); + foreach($data as $key => $value){ + $icoarr=self::_formatMeta($value,$bzarr['bz']); + $icosdata[$icoarr['icoid']]=$icoarr; + } + return $icosdata; + } + /* + *获取文件的meta数据 + *返回标准的icosdata + *$force>0 强制刷新,不读取缓存数据; + */ + function getMeta($path,$force=0){ + $bzarr=self::parsePath($path); + $meta=array(); + if($path==$this->_root){ + $meta['path']=''; + $meta['name']=$this->_rootname; + $meta['type']='folder'; + $meta['size']='-'; + $meta['flag']=self::BZ; + }else{ + if(!$meta=$this->conn->ftp_meta($bzarr['path'])){ + $meta['path']=$bzarr['path1']; + $meta['name']=substr(strrchr($bzarr['path1'], '/'), 1); + if($this->conn->ftp_isdir($bzarr['path'])){ + $meta['type']='folder'; + $meta['size']='-'; + }else{ + $meta['type']='file'; + $meta['size']=$this->conn->ftp_size($bzarr['path']); + $meta['mtime']=$this->conn->ftp_mdtm($bzarr['path']); + if($meta['mtime']<0) $meta['mtime']=0; + } + + } + } + $icosdata=self::_formatMeta($meta,$bzarr['bz']); + return $icosdata; + } + //将api获取的meta数据转化为icodata + function _formatMeta($meta,$bz){ + global $_G,$documentexts,$imageexts; + //判断是否为根目录 + $icosdata=array(); + + if($meta['type']=='folder'){ + $icoarr=array( + 'icoid'=>md5(($bz.$meta['path'])), + 'path'=>$bz.$meta['path'], + 'dpath'=>dzzencode($bz.$meta['path']), + 'bz'=>($bz), + 'gid'=>0, + 'name'=>$meta['name'], + 'username'=>$_G['username'], + 'uid'=>$_G['uid'], + 'oid'=>md5(($bz.$meta['path'])), + 'img'=>'dzz/images/default/system/folder.png', + 'type'=>'folder', + 'ext'=>'', + 'pfid'=>md5(str_replace(strrchr($meta['path'], '/'), '',$bz.$meta['path'])), + 'size'=>'-', + 'dateline'=>intval($meta['mtime']), + 'flag'=>$meta['flag']?$meta['flag']:'', + 'mod'=>$meta['mod'] + ); + + $icoarr['fsize']='-'; + $icoarr['ftype']=getFileTypeName($icoarr['type'],$icoarr['ext']); + if(!$icoarr['dateline']) $icoarr['fdateline']='-'; + else $icoarr['fdateline']=dgmdate($icoarr['dateline']); + $icosdata=$icoarr; + + }else{ + $pathinfo = pathinfo($meta['path']); + $ext = strtolower($pathinfo['extension']); + if(in_array($ext,$imageexts)) $type='image'; + elseif(in_array($ext,$documentexts)) $type='document'; + else $type='attach'; + + if($type=='image'){ + $img=$_G['siteurl'].DZZSCRIPT.'?mod=io&op=thumbnail&size=small&path='.dzzencode($bz.$meta['path']); + $url=$_G['siteurl'].DZZSCRIPT.'?mod=io&op=thumbnail&size=large&path='.dzzencode($bz.$meta['path']); + }else{ + $img=geticonfromext($ext,$type); + $url=$_G['siteurl'].DZZSCRIPT.'?mod=io&op=getStream&path='.dzzencode($bz.$meta['path']); + } + $icoarr=array( + 'icoid'=>md5(($bz.$meta['path'])), + 'path'=>($bz.$meta['path']), + 'dpath'=>dzzencode($bz.$meta['path']), + 'bz'=>($bz), + 'gid'=>0, + 'name'=>$meta['name'], + 'username'=>$_G['username'], + 'uid'=>$_G['uid'], + 'oid'=>md5(($bz.$meta['path'])), + 'img'=>$img, + 'url'=>$url, + 'type'=>$type, + 'ext'=>strtolower($ext), + 'pfid'=>md5(str_replace(strrchr($meta['path'], '/'), '',$bz.$meta['path'])), + 'size'=>$meta['size'], + 'dateline'=>intval($meta['mtime']), + 'flag'=>'', + 'mod'=>$meta['mod'] + ); + + $icoarr['fsize']=formatsize($icoarr['size']); + $icoarr['ftype']=getFileTypeName($icoarr['type'],$icoarr['ext']); + if(!$icoarr['dateline']) $icoarr['fdateline']='-'; + else $icoarr['fdateline']=dgmdate($icoarr['dateline']); + $icosdata=$icoarr; + } + + return $icosdata; + } + //通过icosdata获取folderdata数据 + function getFolderByIcosdata($icosdata){ + global $_GET; + $folder=array(); + if($icosdata['type']=='folder'){ + $folder=array('fid'=>$icosdata['oid'], + 'path'=>$icosdata['path'], + 'fname'=>$icosdata['name'], + 'uid'=>$icosdata['uid'], + 'pfid'=>$icosdata['pfid'], + 'iconview'=>$_GET['iconview']?intval($_GET['iconview']):1, + 'disp'=>$_GET['disp']?intval($_GET['disp']):1, + 'perm'=>$this->perm, + 'hash'=>$icosdata['hash'], + 'bz'=>$icosdata['bz'], + 'gid'=>$icosdata['gid'], + 'fsperm'=>perm_FolderSPerm::flagPower('external') + ); + + } + return $folder; + } + //获得文件内容; + function getFileContent($path){ + /*$url=self::getStream($path); + $config=$this->conn->config; + if($config['port'] == 22 || $config['ssl'] == 2){ + $sftp = ssh2_sftp($this->conn->connectid); + $url = str_replace('{stfp}',$sftp); + } + var_dump(file_get_contents($url)); + die;*/ + $arr=self::parsePath($path); + + $config=$this->conn->config; + if($config['ssl']) $scheme='ftps://'; + else $scheme='ftp://'; + if($config['port'] == 22 || $config['ssl'] == 2){ + $sftp = ssh2_sftp($this->conn->connectid); + $url = 'ssh2.sftp://'.$sftp.$arr['path']; + }else{ + $url = $scheme.urlencode($config['username']).':'.urlencode($config['password']).'@'.$config['host'].':'.$config['port'].$arr['path']; + } + return file_get_contents($url); + } + //打包下载文件 + public function zipdownload($paths,$filename){ + global $_G; + $paths=(array)$paths; + set_time_limit(0); + + if(empty($filename)){ + $meta=self::getMeta($paths[0]); + $filename=$meta['name'].(count($paths)>1?lang('wait'):''); + } + $filename=(strtolower(CHARSET) == 'utf-8' && (strexists($_SERVER['HTTP_USER_AGENT'], 'MSIE') || strexists($_SERVER['HTTP_USER_AGENT'], 'Edge') || strexists($_SERVER['HTTP_USER_AGENT'], 'rv:11')) ? urlencode($filename) : $filename); + include_once libfile('class/ZipStream'); + + $zip = new ZipStream($filename.".zip"); + //$zip->setComment("$meta[name] " . date('l jS \of F Y h:i:s A')); + $data=self::getFolderInfo($paths,'',$zip); + /*foreach($data as $value){ + $zip->addLargeFile(fopen($value['url'],'rb'), $value['position'], $value['dateline']); + }*/ + $zip->finalize(); + } + public function getFolderInfo($paths,$position='',&$zip){ + static $data=array(); + try{ + foreach($paths as $path){ + $arr=self::parsePath($path); + + $meta=self::getMeta($path); + + switch($meta['type']){ + case 'folder': + $lposition=$position.$meta['name'].'/'; + $contents=self::listFiles($path); + $arr=array(); + foreach($contents as $key=>$value){ + $arr[]=$value['path']; + } + if($arr) self::getFolderInfo($arr,$lposition,$zip); + break; + default: + $config=$this->conn->config; + if($config['ssl']) $scheme='ftps://'; + else $scheme='ftp://'; + if($config['port'] == 22 || $config['ssl'] == 2){ + $sftp = ssh2_sftp($this->conn->connectid); + $url = 'ssh2.sftp://'.$sftp.$arr['path']; + }else{ + $url = $scheme.urlencode($config['username']).':'.urlencode($config['password']).'@'.$config['host'].':'.$config['port'].$arr['path']; + } + //$meta['url']=self::getStream($meta['path']); + $meta['url']=$url; + $meta['position']=$position.$meta['name']; + //$data[$meta['icoid']]=$meta; + $zip->addLargeFile(fopen($meta['url'],'rb'), $meta['position'], $meta['dateline']); + } + } + + }catch(Exception $e){ + //var_dump($e); + $data['error']=$e->getMessage(); + return $data; + } + return $data; + } + + //下载文件 + public function download($paths,$filename){ + global $_G; + $paths=(array)$paths; + if(count($paths)>1){ + self::zipdownload($paths,$filename); + exit(); + }else{ + $path=$paths[0]; + } + $path=rawurldecode($path); + try { + // Download the file + $file=self::getMeta($path); + if($file['type']=='folder'){ + self::zipdownload($path); + exit(); + } + $arr=self::parsePath($path); + $config=$this->conn->config; + if($config['ssl']) $scheme='ftps://'; + else $scheme='ftp://'; + if($config['port'] == 22 || $config['ssl'] == 2){ + $sftp = ssh2_sftp($this->conn->connectid); + $url = 'ssh2.sftp://'.$sftp.$arr['path']; + }else{ + $url = $scheme.urlencode($config['username']).':'.urlencode($config['password']).'@'.$config['host'].':'.$config['port'].$arr['path']; + } + //$url=self::getStream($path); + if(!$fp = @fopen($url, 'rb')) { + topshowmessage(lang('file_not_exist1')); + } + + $chunk = 10 * 1024 * 1024; + //$file['data'] = self::getFileContent($path); + //if($file['data']['error']) IO::topshowmessage($file['data']['error']); + $file['name'] = '"'.(strtolower(CHARSET) == 'utf-8' && (strexists($_SERVER['HTTP_USER_AGENT'], 'MSIE') || strexists($_SERVER['HTTP_USER_AGENT'], 'Edge') || strexists($_SERVER['HTTP_USER_AGENT'], 'rv:11')) ? urlencode($file['name']) : $file['name']).'"'; + $d=new FileDownload(); + $d->download($url,$file['name'],$file['size'],$file['dateline'],true); + exit(); + dheader('Date: '.gmdate('D, d M Y H:i:s', $file['dateline']).' GMT'); + dheader('Last-Modified: '.gmdate('D, d M Y H:i:s', $file['dateline']).' GMT'); + dheader('Content-Encoding: none'); + dheader('Content-Disposition: attachment; filename='.$file['name']); + dheader('Content-Type: application/octet-stream'); + dheader('Content-Length: '.$file['size']); + + @ob_end_clean(); + if(getglobal('gzipcompress')) @ob_start('ob_gzhandler'); + while (!feof($fp)) { + echo fread($fp, $chunk); + @ob_flush(); // flush output + @flush(); + } + @fclose($fp); + exit(); + } catch (Exception $e) { + // The file wasn't found at the specified path/revision + //echo 'The file was not found at the specified path/revision'; + topshowmessage($e->getMessage()); + } + } + + + public function rename($path,$name){ + $arr=self::parsePath($path); + $patharr=explode('/',$arr['path1']); + $arr['path2']=''; + $pathinfo = pathinfo($arr['path1']); + $ext = strtolower($pathinfo['extension']); + foreach($patharr as $key =>$value){ + if($key>=count($patharr)-1) break; + $arr['path2'].=$value.'/'; + } + $arr['path2'].=$ext?(preg_replace("/\.\w+$/i",'.'.$ext,$name)):$name; + $arr['path3']=diconv($arr['path2'],CHARSET,$this->encode); + if($arr['path1']!=$arr['path2']){ + if($this->conn->ftp_rename($arr['path'],$arr['path3'])){ + }else{ + return array('error'=>$this->conn->error()); + } + } + return self::getMeta($arr['bz'].$arr['path2']); + } + + + //删除原内容 + //$path: 删除的路径 + //$bz: 删除的api; + //$data:可以删除的id数组(当剪切的时候,为了保证数据不丢失,目标位置添加成功后将此id添加到data数组, + //删除时如果$data有数据,将会只删除id在$data中的数据; + //如果删除的是目录或下级有目录,需要判断此目录内是否所有元素都在删除的id中,如果有未删除的元素,则此目录保留不会删除; + //$force 真实删除,不放入回收站 + public function Delete($path,$force=false){ + //global $dropbox; + $bzarr=self::parsePath($path); + if($this->error){ + return array('error'=>$this->error); + } + + if($this->conn->ftp_isdir($bzarr['path'])){ + if($this->conn->ftp_rmdir_force($bzarr['path'])){ + return array('icoid'=>md5(($path)), + 'name'=>substr(strrchr($path, '/'), 1), + ); + }else{ + return array('icoid'=>md5(($path)),'error'=>$this->conn->error()); + } + }else{ + if($this->conn->ftp_delete($bzarr['path'])){ + return array('icoid'=>md5(($path)), + 'name'=>substr(strrchr($path, '/'), 1), + ); + }else{ + return array('icoid'=>md5(($path)),'error'=>$this->conn->error()); + } + } + } + public function createFolderByPath($path, $pfid = '',$noperm = false) + { + $data = array(); + if($this->conn->ftp_mkdir($path)){ + $data = $this->conn->ftp_meta($path); + } + return $data; + } + //添加目录 + //$fname:目录路径; + //$container:目标容器 + //$bz:api; + public function CreateFolder($path,$fname){ + global $_G; + $path=$path.'/'.$fname; + $bzarr=self::parsePath($path); + $return=array(); + if($this->conn->ftp_mkdir($bzarr['path'])){ + $meta['path']=$bzarr['path1']; + $meta['name']=substr(strrchr($bzarr['path1'], '/'), 1); + $meta['type']='folder'; + $meta['size']='-'; + $icoarr=self::_formatMeta($meta,$bzarr['bz']); + $folderarr=self::getFolderByIcosdata($icoarr); + return array('folderarr'=>$folderarr,'icoarr'=>$icoarr); + }else{ + return array('error'=>$this->conn->error()); + } + + } + //获取不重复的目录名称 + public function getFolderName($name,$path){ + static $i=0; + if(!$this->icosdatas) $this->icosdatas=self::listFiles($path); + $names=array(); + foreach($this->icosdatas as $value){ + $names[]=$value['name']; + } + if(in_array($name,$names)){ + $name=str_replace('('.$i.')','',$name).'('.($i+1).')'; + $i+=1; + return self::getFolderName($name,$path); + }else { + return $name; + } + } + private function getPartInfo($content_range){ + $arr=array(); + if(!$content_range){ + $arr['ispart']=false; + $arr['iscomplete']=true; + }elseif(is_array($content_range)){ + $arr['ispart']=true; + $partsize=getglobal('setting/maxChunkSize'); + $arr['partnum']=ceil(($content_range[2]+1)/$partsize); + if(($content_range[2]+1)>=$content_range[3]){ + $arr['iscomplete']=true; + }else{ + $arr['iscomplete']=false; + } + }else{ + return false; + } + return $arr; + } + private function getCache($path){ + $cachekey='ftp_upload_'.md5($path); + if($cache=C::t('cache')->fetch($cachekey)){ + return $cache['cachevalue']; + }else{ + return false; + } + } + private function saveCache($path,$str){ + global $_G; + $cachekey='ftp_upload_'.md5($path); + C::t('cache')->insert(array( + 'cachekey' => $cachekey, + 'cachevalue' => $str, + 'dateline' => $_G['timestamp'], + ), false, true); + } + private function deleteCache($path){ + $cachekey='ftp_upload_'.md5($path); + C::t('cache')->delete($cachekey); + } + public function uploadStream($file,$filename,$path,$relativePath,$content_range){ + if($this->error){ + return array('error'=>$this->error); + } + $data=array(); + //exit($path.'===='.$filename); + + //处理目录(没有分片或者最后一个分片时创建目录 + $arr=self::getPartInfo($content_range); + + if($relativePath && ($arr['iscomplete'])){ + $path1=$path; + $patharr=explode('/',$relativePath); + foreach($patharr as $key=> $value){ + if(!$value){ + unset($patharr[$key]); + continue; + } + if($patharr[$key-1]) $path1.='/'.$patharr[$key-1]; + + $re=self::CreateFolder($path1,$value); + if(isset($re['error'])){ + return $re; + }else{ + if($key==0){ + $data['icoarr'][]=$re['icoarr']; + $data['folderarr'][]=$re['folderarr']; + } + } + + } + //$path.='/'.implode('/',$patharr); + } + if($relativePath) $path=$path.'/'.trim($relativePath,'/'); + if($arr['ispart']){ + if($re1=self::upload($file,$path,$filename,$arr)){ + if($re1['error']){ + return $re1; + } + if($arr['iscomplete']){ + if(empty($re1['error'])){ + + $data['icoarr'][] = $re1; + return $data; + }else{ + $data['error'] = $re1['error']; + return $data; + } + }else{ + return true; + } + } + }else{ + $re1=self::upload($file,$path,$filename); + if(empty($re1['error'])){ + /*if($relativePath){ + $icoarr=self::getMeta($path); + $data['icoarr'][]=$icoarr; + $data['folderarr'][]=self::getFolderByIcosdata($icoarr); + }*/ + $data['icoarr'][] = $re1; + return $data; + }else{ + $data['error'] = $re1['error']; + return $data; + } + } + } + function upload($file,$path,$filename,$partinfo=array(),$ondup='newcopy'){ + global $_G; + + $bzarr=self::parsePath($path.'/'.$filename); + if($this->error){ + return array('error'=>$this->error); + } + //获取文件内容 + $fileContent=''; + if(!$handle=fopen($file, 'rb')){ + return array('error'=>lang('open_file_error')); + } + while (!feof($handle)) { + $fileContent .= fread($handle, 8192); + } + fclose($handle); + if($partinfo['ispart']){ + if($partinfo['partnum']==1){ + $target='./cache/'.md5($path.'/'.$filename); + file_put_contents($_G['setting']['attachdir'].$target,''); + self::saveCache(md5($path.'/'.$filename),$target); + }else{ + $target=self::getCache(md5($path.'/'.$filename)); + } + + if(!file_put_contents($_G['setting']['attachdir'].$target,$fileContent,FILE_APPEND)){ + return array('error'=>lang('cache_file_error1')); + } + if(!$partinfo['iscomplete']) return true; + else{ + if(!$this->conn->upload($_G['setting']['attachdir'].$target,$bzarr['path'])){ + return array('error'=>$this->conn->error()); + } + @unlink($_G['setting']['attachdir'].$target); + self::deleteCache(md5($path.'/'.$filename)); + } + }else{ + if(!$this->conn->upload($file,$bzarr['path'])){ + return array('error'=>$this->conn->error()); + } + } + return self::getMeta($path.'/'.$filename); + } + public function upload_by_content($content,$path,$filename){ + global $_G; + $bzarr=self::parsePath($path.'/'.$filename); + if($this->error){ + return array('error'=>$this->error); + } + //获取文件内容 + //$fileinfo = pathinfo($filename); + //$file=$_G['setting']['attachdir'].'./cache/'.md5($path.'/'.$filename).'.'. $fileinfo['extension']; + $file=$_G['setting']['attachdir'].'./cache/'.md5($path.'/'.$filename); + @file_put_contents($file,$content); + if(!$this->conn->upload($file,$bzarr['path'])){ + return array('error'=>$this->conn->error()); + } + @unlink($file); + return self::getMeta($path.'/'.$filename); + } } ?> diff --git a/core/class/io/io_qiniu.php b/core/class/io/io_qiniu.php index 4f7c90f..062a5aa 100644 --- a/core/class/io/io_qiniu.php +++ b/core/class/io/io_qiniu.php @@ -222,21 +222,23 @@ class io_qiniu extends io_api $imgcachePath='imgcache/'; $cachepath=str_replace(urlencode('/'),'/',urlencode(str_replace(':','/',$path))); foreach($_G['setting']['thumbsize'] as $value){ - $target=$imgcachePath.($cachepath).'.'.$value['width'].'_'.$value['height'].'.jpeg'; + $target = $imgcachePath . ($cachepath) . '.' . $value['width'] . '_' . $value['height'] . '_1.jpeg'; + $target1 = $imgcachePath . ($cachepath) . '.' . $value['width'] . '_' . $value['height'] . '_2.jpeg'; @unlink($_G['setting']['attachdir'].$target); + @unlink($_G['setting']['attachdir'].$target1); } } - public function createThumb($path,$size,$width=0,$height=0){ + public function createThumb($path,$size,$width=0,$height=0,$thumbtype = 1){ if(intval($width)<1) $width=$_G['setting']['thumbsize'][$size]['width']; if(intval($height)<1) $height=$_G['setting']['thumbsize'][$size]['height']; return; } //获取缩略图 - public function getThumb($path,$width,$height,$original,$returnurl=false){ + public function getThumb($path,$width,$height,$original,$returnurl=false,$thumbtype = 1){ global $_G; $imgcachePath='imgcache/'; $cachepath=str_replace(urlencode('/'),'/',urlencode(str_replace('//','/',str_replace(':','/',$path)))); - $target = $imgcachePath . ($cachepath) . '.' . $width . '_' . $height . '.jpeg'; + $target = $imgcachePath . ($cachepath) . '.' . $width . '_' . $height. '_'.$thumbtype.'.jpeg'; if(!$original && @getimagesize($_G['setting']['attachdir'].'./'.$target)){ if($returnurl) return $_G['setting']['attachurl'].'/'.$target; IO::output_thumb($_G['setting']['attachdir'].'./'.$target); @@ -252,7 +254,7 @@ class io_qiniu extends io_api dmkdir($targetpath); require_once libfile('class/image'); $image = new image(); - if($thumb = $image->Cropper($imgurl, $target, $width, $height,$srcx,$srcy)){ + if($thumb = $image->Thumb($imgurl, $target, $width, $height,$thumbtype)){ if($returnurl) return $_G['setting']['attachurl'].'/'.$target; IO::output_thumb($_G['setting']['attachdir'].'./'.$target); }else{ diff --git a/core/class/io/io_remote.php b/core/class/io/io_remote.php index 7dbc172..d41ff8b 100644 --- a/core/class/io/io_remote.php +++ b/core/class/io/io_remote.php @@ -60,7 +60,6 @@ class io_remote //迁移文件 public function Migrate($attach,$remoteid){ global $_G; - if(is_numeric($re=self::MoveToSpace($attach,$remoteid))){ $remoteid=$re; if(C::t('attachment')->update($attach['aid'],array('remote'=>$re))){ diff --git a/core/class/perm/perm_FileSPerm.php b/core/class/perm/perm_FileSPerm.php index 9ef0a5c..58c260d 100644 --- a/core/class/perm/perm_FileSPerm.php +++ b/core/class/perm/perm_FileSPerm.php @@ -65,7 +65,7 @@ class perm_FileSPerm{ return true; } - public function typePower($type,$ext){ //返回类型的权限 + public function typePower($type,$ext=''){ //返回类型的权限 global $textexts; switch($type){ case 'document'://('wallpaper','widget','share','edit'); @@ -82,6 +82,8 @@ class perm_FileSPerm{ return self::getSumByAction(array('wallpaper','widget','download')); case 'folder': //edit,widget,wallpaper return self::getSumByAction(array('wallpaper','widget')); + case 'attachment': //通过attach::xxx和dzz://方式获取的文件不给编辑权限 + return self::getSumByAction(array('edit','rename','move','wallpaper','widget')); default: return 0; } diff --git a/core/class/perm/perm_check.php b/core/class/perm/perm_check.php index 9e81464..df4cddb 100644 --- a/core/class/perm/perm_check.php +++ b/core/class/perm/perm_check.php @@ -155,7 +155,7 @@ class perm_check{ if($_G['uid']<1){ //游客没有权限 return false; } - if($bz || $arr['bz']){ + if(($bz && $bz!='dzz') || ($arr['bz'] && $arr['bz']!='dzz')){ return self::checkperm_Container($arr['pfid'],$action,$bz?$bz:$arr['bz']); }else{ //首先判断ico的超级权限; diff --git a/core/class/table/table_connect_disk.php b/core/class/table/table_connect_disk.php index fa442ec..bb73e6d 100644 --- a/core/class/table/table_connect_disk.php +++ b/core/class/table/table_connect_disk.php @@ -58,7 +58,7 @@ class table_connect_disk extends dzz_table $data=parent::fetch($id); if(parent::delete($id)){ $return['msg']='success'; - C::t('source_shortcut')->delete_by_bz($data['bz'].':'.$id.':',true);//删除快捷方式; + //C::t('source_shortcut')->delete_by_bz($data['bz'].':'.$id.':',true);//删除快捷方式; //删除图片缓存文件 $imgcache=getglobal('setting/attachdir').'./imgcache/'.$data['bz'].'/'.$id.'/'; removedirectory($imgcache); diff --git a/core/class/table/table_connect_ftp.php b/core/class/table/table_connect_ftp.php index 6951199..dc9b23a 100644 --- a/core/class/table/table_connect_ftp.php +++ b/core/class/table/table_connect_ftp.php @@ -58,7 +58,7 @@ class table_connect_ftp extends dzz_table $data=parent::fetch($id); if(parent::delete($id)){ $return['msg']='success'; - C::t('source_shortcut')->delete_by_bz($data['bz'].':'.$id.':',true);//删除快捷方式; + //C::t('source_shortcut')->delete_by_bz($data['bz'].':'.$id.':',true);//删除快捷方式; //删除图片缓存文件 $imgcache=getglobal('setting/attachdir').'./imgcache/'.$data['bz'].'/'.$id.'/'; removedirectory($imgcache); diff --git a/core/class/table/table_connect_onedrive.php b/core/class/table/table_connect_onedrive.php index a830c14..6aefcbe 100644 --- a/core/class/table/table_connect_onedrive.php +++ b/core/class/table/table_connect_onedrive.php @@ -59,7 +59,7 @@ class table_connect_onedrive extends dzz_table $data=parent::fetch($id); if(parent::delete($id)){ $return['msg']='success'; - C::t('source_shortcut')->delete_by_bz($data['bz'].':'.$id.':',true);//删除快捷方式; + //C::t('source_shortcut')->delete_by_bz($data['bz'].':'.$id.':',true);//删除快捷方式; //删除图片缓存文件 $imgcache=getglobal('setting/attachdir').'./imgcache/'.$data['bz'].'/'.$id.'/'; removedirectory($imgcache); diff --git a/core/class/table/table_connect_pan.php b/core/class/table/table_connect_pan.php index d0828f4..942727c 100644 --- a/core/class/table/table_connect_pan.php +++ b/core/class/table/table_connect_pan.php @@ -59,7 +59,7 @@ class table_connect_pan extends dzz_table $data=parent::fetch($id); if(parent::delete($id)){ $return['msg']='success'; - C::t('source_shortcut')->delete_by_bz($data['bz'].':'.$id.':',true);//删除快捷方式; + //C::t('source_shortcut')->delete_by_bz($data['bz'].':'.$id.':',true);//删除快捷方式; //删除图片缓存文件 $imgcache=getglobal('setting/attachdir').'./imgcache/'.$data['bz'].'/'.$id.'/'; removedirectory($imgcache); diff --git a/core/class/table/table_connect_storage.php b/core/class/table/table_connect_storage.php index f041a18..9ba9441 100644 --- a/core/class/table/table_connect_storage.php +++ b/core/class/table/table_connect_storage.php @@ -60,7 +60,7 @@ class table_connect_storage extends dzz_table $data=parent::fetch($id); if(parent::delete($id)){ $return['msg']='success'; - C::t('source_shortcut')->delete_by_bz($data['bz'].':'.$id.':',true);//删除快捷方式; + //C::t('source_shortcut')->delete_by_bz($data['bz'].':'.$id.':',true);//删除快捷方式; //删除图片缓存文件 $imgcache=getglobal('setting/attachdir').'./imgcache/'.$data['bz'].'/'.$id.'/'; removedirectory($imgcache); diff --git a/core/class/table/table_feed_at.php b/core/class/table/table_feed_at.php deleted file mode 100644 index f3b3f25..0000000 --- a/core/class/table/table_feed_at.php +++ /dev/null @@ -1,47 +0,0 @@ -_table = 'feed_at'; - $this->_pk = ''; - - parent::__construct(); - } - public function fetch_all_tids_by_uid($uid,$timestamp=0,$count=0){ - $tids=array(); - if($count) return DB::result_first("select COUNT(*) from %t where uid=%d and dateline>%d",array($this->_table,$uid,$timestamp)); - foreach(DB::fetch_all("select pid,tid from %t where uid=%d and dateline>%d",array($this->_table,$uid,$timestamp)) as $value){ - $tids[]=$value['tid']; - } - return array_unique($tids); - } - public function insert_by_pid($pid,$tid,$uids){ - if(!$pid || !$uids) return false; - foreach($uids as $uid){ - parent::insert(array('pid'=>$pid,'tid'=>$tid,'uid'=>$uid,'dateline'=>TIMESTAMP),0,1); - } - } - public function delete_by_pid($pids){ - if(!$pids) return false; - if(!is_array($pids)){ - $pids=array($pids); - } - return DB::delete($this->_table,"pid IN (".dimplode($pids).")"); - } - -} - -?> diff --git a/core/class/table/table_feed_attach.php b/core/class/table/table_feed_attach.php deleted file mode 100644 index 3e90779..0000000 --- a/core/class/table/table_feed_attach.php +++ /dev/null @@ -1,132 +0,0 @@ -_table = 'feed_attach'; - $this->_pk = 'qid'; - $this->_pre_cache_key = 'feed_attach_'; - $this->_cache_ttl = 0; - parent::__construct(); - } - public function fetch_by_qid($qid){ - global $_G; - if(!$data=self::fetch($qid)) return false; - if($data['aid']>0){ - $attach=C::t('attachment')->fetch($data['aid']); - if(in_array(strtolower($attach['filetype']),array('png','jpeg','jpg','gif'))){ - $attach['img']=C::t('attachment')->getThumbByAid($attach,120,80); - $attach['isimage']=1; - $attach['type']='image'; - }else{ - $attach['img']=geticonfromext($attach['filetype'],''); - $attach['isimage']=0; - } - $attach['url']=C::t('attachment')->getThumbByAid($attach,120,80,1); - $attach['filename']=$data['title']; - $data = array_merge($attach,$data); - } - return $data; - } - public function delete_by_pid($pids){ - $ret=0; - foreach(DB::fetch_all("select qid,aid,type,img from %t where pid IN (%n) ",array('feed_attach',$pids)) as $value){ - if(parent::delete($value['qid'])){ - $ret++; - if($value['aid']>0) C::t('attachment')->delete_by_aid($value['aid']); - if($value['type']=='link'){ - $imgarr=$value['img']?explode('icon',$value['img']):array(); - if(isset($imgarr[1]) && ($did=DB::result_first("select did from %t where pic=%s",array('icon','icon'.$imgarr[1])))) C::t('icon')->update_copys_by_did($did,-1); - } - } - } - return $ret; - } - public function fetch_all_by_pid($pid){ - global $_G; - $data=array(); - //$openext=C::t('app_open')->fetch_all_orderby_ext($_G['uid']); - foreach(DB::fetch_all("select * from %t where pid= %d",array($this->_table,$pid)) as $value){ - if($value['aid']){ - $attach=C::t('attachment')->fetch($value['aid']); - if(in_array(strtolower($attach['filetype']),array('png','jpeg','jpg','gif','bmp'))){ - $attach['img']=C::t('attachment')->getThumbByAid($attach); - $attach['isimage']=1; - }else{ - $attach['img']=geticonfromext($attach['filetype'],''); - $attach['isimage']=0; - } - $attach['url']=C::t('attachment')->getThumbByAid($attach,120,80,1); - $attach['preview']=1; - $attach['filesize']=formatsize($attach['filesize']); - $data[$value['qid']]=array_merge($value,$attach); - }else{ - $value['preview']=1; - $data[$value['qid']]=$value; - } - } - return $data; - } - public function update_by_pid($pid,$tid,$attach){ - $qids=array(); - $ret=0; - foreach(DB::fetch_all("select qid from %t where pid=%d",array($this->_table,$pid)) as $value){ - $qids[$value['qid']]=$value['qid']; - } - - foreach($attach['title'] as $key=> $value){ - $qid=intval($attach['qid'][$key]); - if($qid>0){ - unset($qids[$qid]); - }else{ - - $setarr=array('pid'=>$pid, - 'tid'=>$tid, - 'dateline'=>TIMESTAMP, - 'aid'=>intval($attach['aid'][$key]), - 'title'=>trim($value), - 'type'=>trim($attach['type'][$key]), - 'img'=>trim($attach['img'][$key]), - 'url'=>trim($attach['url'][$key]) - ); - if($ret+=parent::insert($setarr)){ - if($setarr['aid']) C::t('attachment')->addcopy_by_aid($setarr['aid']); - if($setarr['type']=='link'){ - $imgarr=$setarr['img']?explode('icon',$setarr['img']):array(); - if(isset($imgarr[1]) && ($did=DB::result_first("select did from %t where pic=%s",array('icon','icon'.$imgarr[1])))) C::t('icon')->update_copys_by_did($did); - } - } - } - } - if($qids) $ret+=self::delete_by_qid($qids); - return $ret; - } - public function delete_by_qid($qids){ - $qids=(array)$qids; - $ret=0; - foreach(DB::fetch_all("select qid,aid,type,img from %t where qid IN(%n)",array($this->_table,$qids)) as $value){ - if(parent::delete($value['qid'])){ - $ret+=1; - if($value['aid']>0) C::t('attachment')->delete_by_aid($value['aid']); - if($value['type']=='link'){ - $imgarr=$value['img']?explode('icon',$value['img']):array(); - if(isset($imgarr[1]) && ($did=DB::result_first("select did from %t where pic=%s",array('icon','icon'.$imgarr[1])))) C::t('icon')->update_copys_by_did($did,-1); - } - } - } - return $ret; - } -} -?> diff --git a/core/class/table/table_feed_collection.php b/core/class/table/table_feed_collection.php deleted file mode 100644 index 416df0b..0000000 --- a/core/class/table/table_feed_collection.php +++ /dev/null @@ -1,45 +0,0 @@ -_table = 'feed_collection'; - $this->_pk = ''; - - parent::__construct(); - } - public function fetch_all_tids_by_uid($uid){ - $tids=array(); - foreach(DB::fetch_all("select tid from %t where uid=%d",array($this->_table,$uid)) as $value){ - $tids[]=$value['tid']; - } - return $tids; - } - public function insert_by_tid_uid($tid,$uid){ - if(!$tid || !$uid) return false; - return parent::insert(array('tid'=>$tid,'uid'=>$uid),0,1); - } - public function delete_by_tid_uid($tid,$uid){ - if(!$tid || !$uid) return false; - return DB::delete($this->_table,"tid='{$tid}' and uid='{$uid}'"); - } - public function delete_by_tid($tids){ - $tids=(array)$tids; - return DB::delete($this->_table,"tid IN(".dimplode($tid).")"); - } - -} - -?> diff --git a/core/class/table/table_feed_post.php b/core/class/table/table_feed_post.php deleted file mode 100644 index f22d060..0000000 --- a/core/class/table/table_feed_post.php +++ /dev/null @@ -1,47 +0,0 @@ -_table = 'feed_post'; - $this->_pk = 'pid'; - $this->_pre_cache_key = 'feed_post_'; - $this->_cache_ttl = 0; - parent::__construct(); - } - public function delete_by_pid($pids){ - if(!$pids) return false; - if(!is_array($pids)){ - $pids=array($pids); - } - $pids=array_unique($pids); - //删除@ - C::t('feed_at')->delete_by_pid($pids); - //删除附件 - C::t('feed_attach')->delete_by_pid($pids); - //删除回复表 - C::t('feed_reply')->delete_by_pid($pids); - return self::delete($pids); - } - public function delete_by_tid($tids){ - $pids=array(); - foreach(DB::fetch_all("select pid from %t where tid IN (%n) ",array('feed_post',$tids)) as $value){ - $pids[]=$value['pid']; - } - return self::delete_by_pid($pids); - } -} - -?> diff --git a/core/class/table/table_feed_reply.php b/core/class/table/table_feed_reply.php deleted file mode 100644 index 3d5c75a..0000000 --- a/core/class/table/table_feed_reply.php +++ /dev/null @@ -1,45 +0,0 @@ -_table = 'feed_reply'; - $this->_pk = 'pid'; - - parent::__construct(); - } - public function fetch_all_tids_by_ruid($uid,$timestamp=0,$count=0){ - $tids=array(); - if($count) return DB::result_first("select COUNT(*) from %t where ruid=%d and dateline>%d",array($this->_table,$uid,$timestamp)); - foreach(DB::fetch_all("select pid,tid from %t where ruid=%d and dateline>%d",array($this->_table,$uid,$timestamp)) as $value){ - $tids[]=$value['tid']; - } - return array_unique($tids); - } - - public function delete_by_pid($pids){ - if(!$pids) return false; - if(!is_array($pids)){ - $pids=array($pids); - } - return DB::delete($this->_table,"pid IN (".dimplode($pids).")"); - } - public function fetch_by_pid($pid,$uid){ - return DB::fetch_first("select * from %t where pid=%d and uid=%d",array($this->_table,$pid,$uid)); - } - -} - -?> diff --git a/core/class/table/table_feed_thread.php b/core/class/table/table_feed_thread.php deleted file mode 100644 index 380cb26..0000000 --- a/core/class/table/table_feed_thread.php +++ /dev/null @@ -1,64 +0,0 @@ -_table = 'feed_thread'; - $this->_pk = 'tid'; - $this->_pre_cache_key = 'feed_thread_'; - $this->_cache_ttl = 0; - parent::__construct(); - } - public function delete_by_tid($tids){ - $tids=(array)$tids; - C::t('feed_post')->delete_by_tid($tids); - - //删除收藏 - C::t('feed_collection')->delete_by_tid($tids); - //删除投票 - C::t('vote')->delete_by_id_idtype($tids,'feed'); - parent::delete($tids); - } - - public function increase($tids, $fieldarr) { - $tids = dintval((array)$tids, true); - $sql = array(); - $num = 0; - $allowkey = array('replies', 'lastposter', 'lastpost'); - foreach($fieldarr as $key => $value) { - if(in_array($key, $allowkey)) { - if(is_array($value)) { - $sql[] = DB::field($key, $value[0]); - } else { - $value = dintval($value); - $sql[] = "`$key`=`$key`+'$value'"; - } - } else { - unset($fieldarr[$key]); - } - } - if($getsetarr) { - return $sql; - } - if(!empty($sql)){ - $cmd = "UPDATE " ; - $num = DB::query($cmd.DB::table($this->_table)." SET ".implode(',', $sql)." WHERE tid IN (".dimplode($tids).")", 'UNBUFFERED'); - $this->increase_cache($tids, $fieldarr); - } - return $num; - } -} - -?> diff --git a/core/class/table/table_folder.php b/core/class/table/table_folder.php index c02a593..91b090f 100644 --- a/core/class/table/table_folder.php +++ b/core/class/table/table_folder.php @@ -1,139 +1,155 @@ _table = 'folder'; $this->_pk = 'fid'; $this->_pre_cache_key = 'folder_'; - $this->_cache_ttl = 60*60; - $this->noperm = (getglobal('appGreenChannel'))?getglobal('appGreenChannel'):false; + $this->_cache_ttl = 60 * 60; + $this->noperm = (getglobal('appGreenChannel')) ? getglobal('appGreenChannel') : false; parent::__construct(); } - public function update($fid,$data){ - if(isset($data['perm'])){ - $perm=intval($data['perm']); - $data['perm_inherit'] = perm_check::getPerm1($fid,'',0,$perm); + + public function update($fid, $data) + { + if (isset($data['perm'])) { + $perm = intval($data['perm']); + $data['perm_inherit'] = perm_check::getPerm1($fid, '', 0, $perm); } - if($ret=parent::update($fid,$data)){ - if($data['perm_inherit']){//如果更新权限的话,需要单独处理子目录的继承权限 - $power=new perm_binPerm($perm); - if($power->isPower('flag')){//不继承,更新下级继承权限 - $subfids=array(); - foreach(DB::fetch_all("select p.fid from %t p LEFT JOIN %t f ON p.fid=f.fid where p.pathkey LIKE %s and f.perm='0'",array('resources_path','folder','%_'.$fid.'_%')) as $value){ - $subfids[]=$value['fid']; - } - if($subfids) parent::update($subfids,array('perm_inherit'=>$perm)); - } - } - } - return $ret; - } - //更改继承权限 - public function update_perm_inherit_by_fid($fids){ - if(!is_array($fids)) $fids = (array)$fids; - foreach($fids as $value){ - $perm_inherit=perm_check::getPerm1($value); - DB::update('folder',array('perm_inherit'=>$perm_inherit),"fid='{$value}'"); + if ($ret = parent::update($fid, $data)) { + if ($data['perm_inherit']) {//如果更新权限的话,需要单独处理子目录的继承权限 + $power = new perm_binPerm($perm); + if ($power->isPower('flag')) {//不继承,更新下级继承权限 + $subfids = array(); + foreach (DB::fetch_all("select p.fid from %t p LEFT JOIN %t f ON p.fid=f.fid where p.pathkey LIKE %s and f.perm='0'", array('resources_path', 'folder', '%_' . $fid . '_%')) as $value) { + $subfids[] = $value['fid']; + } + if ($subfids) parent::update($subfids, array('perm_inherit' => $perm)); + } + } + } + return $ret; + } + + //更改继承权限 + public function update_perm_inherit_by_fid($fids) + { + if (!is_array($fids)) $fids = (array)$fids; + foreach ($fids as $value) { + $perm_inherit = perm_check::getPerm1($value); + DB::update('folder', array('perm_inherit' => $perm_inherit), "fid='{$value}'"); } } - public function insert($data,$appid= 0){ - if(empty($data)){ + + public function insert($data, $appid = 0) + { + if (empty($data)) { return false; } - - if($path['fid'] = parent::insert($data,1)){ - $perm_inherit=perm_check::getPerm1($path['fid']); - parent::update($path['fid'],array('perm_inherit'=>$perm_inherit)); - if($data['pfid']){ - if(!$pdata = C::t('resources_path')->fetch_pathby_pfid($data['pfid'],true)){ + if ($path['fid'] = parent::insert($data, 1)) { + $perm_inherit = perm_check::getPerm1($path['fid']); + parent::update($path['fid'], array('perm_inherit' => $perm_inherit)); + if ($data['pfid']) { + + if (!$pdata = C::t('resources_path')->fetch_pathby_pfid($data['pfid'], true)) { //根据fid生成path和pathkey - $pdata = self::create_pathinfo_by_fid($data['pfid'],$appid); + $pdata = self::create_pathinfo_by_fid($data['pfid'], $appid); } - if(!$pdata){ - return array('error'=>lang('failure_newfolder')); + if (!$pdata) { + return array('error' => lang('failure_newfolder')); } - $path['path'] = $pdata['path'].$data['fname']."/"; - $path['pathkey'] = ($pdata['pathkey']) ? $pdata['pathkey'].'-_'.$path['fid'].'_':'_'.$path['fid'].'_'; + $path['path'] = $pdata['path'] . $data['fname'] . "/"; + $path['pathkey'] = ($pdata['pathkey']) ? $pdata['pathkey'] . '-_' . $path['fid'] . '_' : '_' . $path['fid'] . '_'; - }else{ - if($appid){ - $path['path'] = "dzz:app_".$appid.":".$data['fname']."/"; - }else{ - $path['path'] = ($data['gid']) ? "dzz:gid_".$data['gid'].":".$data['fname']."/":"dzz:uid_".$data['uid'].":".$data['fname']."/"; + } else { + if ($appid) { + $path['path'] = "dzz:app_" . $appid . ":" . $data['fname'] . "/"; + } else { + $path['path'] = ($data['gid']) ? "dzz:gid_" . $data['gid'] . ":" . $data['fname'] . "/" : "dzz:uid_" . $data['uid'] . ":" . $data['fname'] . "/"; } - $path['pathkey'] = '_'.$path['fid'].'_'; + $path['pathkey'] = '_' . $path['fid'] . '_'; } - if(C::t('resources_path')->insert($path)){ + if (C::t('resources_path')->insert($path)) { return $path['fid']; - }else{ + } else { parent::delete($path['fid']); } } return false; } - public function get_folder_pathinfo_by_fid($fid,$folderarr = array()){ - if(!$folderinfo =parent::fetch($fid)) return; + public function get_folder_pathinfo_by_fid($fid, $folderarr = array()) + { - array_unshift($folderarr,array('fname'=>$folderinfo['fname'],'fid'=>$folderinfo['fid'],'gid'=>$folderinfo['gid'],'uid'=>$folderinfo['uid'])); + if (!$folderinfo = parent::fetch($fid)) return; - if($folderinfo['pfid']){ + array_unshift($folderarr, array('fname' => $folderinfo['fname'], 'fid' => $folderinfo['fid'], 'gid' => $folderinfo['gid'], 'uid' => $folderinfo['uid'])); - $folderarr = self::get_folder_pathinfo_by_fid($folderinfo['pfid'],$folderarr); + if ($folderinfo['pfid']) { + + $folderarr = self::get_folder_pathinfo_by_fid($folderinfo['pfid'], $folderarr); } return $folderarr; } + //根据fid生成path和pathkey - public function create_pathinfo_by_fid($fid,$appid = 0){ + public function create_pathinfo_by_fid($fid, $appid = 0) + { $patharr = array(); - if(!$pathdata = self::get_folder_pathinfo_by_fid($fid)) return $patharr; + if (!$pathdata = self::get_folder_pathinfo_by_fid($fid)) return $patharr; - $pathprefix = ($appid) ? "dzz:app_".$appid.":":''; + $pathprefix = ($appid) ? "dzz:app_" . $appid . ":" : ''; $path = ''; $pathkey = ''; - foreach($pathdata as $v){ - if(!$pathprefix){ - $pathprefix = ($v['gid']) ? "dzz:gid_".$v['gid'].":":"dzz:uid_".$v['uid'].":"; + foreach ($pathdata as $v) { + if (!$pathprefix) { + $pathprefix = ($v['gid']) ? "dzz:gid_" . $v['gid'] . ":" : "dzz:uid_" . $v['uid'] . ":"; } $path .= $pathprefix; - $path .= $v['fname'].'/'; - $pathkey .= '_'.$v['fid'].'_-'; + $path .= $v['fname'] . '/'; + $pathkey .= '_' . $v['fid'] . '_-'; } $patharr['path'] = $path; - $patharr['pathkey'] = substr($pathkey,0,-1); + $patharr['pathkey'] = substr($pathkey, 0, -1); return $patharr; } - public function check_home_by_uid($uid = ''){ + + public function check_home_by_uid($uid = '') + { global $_G; - if(!$uid) $uid = $_G['uid']; + if (!$uid) $uid = $_G['uid']; else $uid = intval($uid); - return DB::fetch_first("select f.*,p.path from %t f left join %t p on f.fid = p.fid where f.uid = %d and f.flag = %s",array($this->_table,'resources_path',$uid,'home')); + return DB::fetch_first("select f.*,p.path from %t f left join %t p on f.fid = p.fid where f.uid = %d and f.flag = %s", array($this->_table, 'resources_path', $uid, 'home')); } + //查询个人文档目录以及路径 - public function fetch_home_by_uid($uid = ''){ + public function fetch_home_by_uid($uid = '') + { global $_G; - if(!$uid) $uid = $_G['uid']; + if (!$uid) $uid = $_G['uid']; else $uid = intval($uid); - if($return = DB::fetch_first("select f.*,p.path from %t f left join %t p on f.fid = p.fid where f.uid = %d and f.flag = %s",array($this->_table,'resources_path',$uid,'home'))){ + if ($return = DB::fetch_first("select f.*,p.path from %t f left join %t p on f.fid = p.fid where f.uid = %d and f.flag = %s", array($this->_table, 'resources_path', $uid, 'home'))) { return $return; - }else{ + } else { $root = array( 'pfid' => 0, 'uid' => $uid, @@ -157,254 +173,270 @@ class table_folder extends dzz_table } } - - //创建顶级目录 - public function create_topfolder($setarr){ - if(!$setarr) return false; - if($fid = parent::insert($setarr,1)){ - return $fid; - }else{ - return false; - } - } - - //查询目录下所有数据 - public function fetch_all_by_fid($fids){ - $data=array(); - foreach(self::fetch_all($fids) as $fid => $value){ - if($arr=self::fetch_by_fid($fid)) $data[$fid]=$arr; + /*//查询目录下所有数据 + public function fetch_all_by_fid($fids) + { + $data = array(); + foreach (self::fetch_all($fids) as $fid => $value) { + if ($arr = self::fetch_by_fid($fid)) $data[$fid] = $arr; } return $data; - } - public function fetch_by_fname($fname){ - $fid = DB::result_first("select fid from %t where fname = %s",array($this->_table,$fname)); + }*/ + //依文件名查询顶级目录 + public function fetch_topby_fname($fname) + { + $fid = DB::result_first("select fid from %t where fname = %s and pfid = 0", array($this->_table, $fname)); return self::fetch_by_fid($fid); } + //返回一条数据及附件表数据 - public function fetch_by_fid($fid,$gid=''){ + public function fetch_by_fid($fid, $gid = '') + { global $_G; $fid = intval($fid); - if(!$data=self::fetch($fid)) array('error'=>lang('file_not_exist')); - $data['title']=$data['fname']; + if (!$data = self::fetch($fid)) array('error' => lang('file_not_exist')); + $data['title'] = $data['fname']; //统计文件数 - if($data['gid']>0){//如果是群组 + if ($data['gid'] > 0) {//如果是群组 //文件数 - $data['iconum']= DB::result_first("select COUNT(*) from ".DB::table('resources') ." where pfid='{$fid}' and gid='{$gid}' and isdelete<1"); + $data['iconum'] = DB::result_first("select COUNT(*) from " . DB::table('resources') . " where pfid='{$fid}' and gid='{$gid}' and isdelete<1"); //文件夹数 - $data['foldernum'] = DB::result_first("select COUNT(*) from ".DB::table('resources') ." where pfid='{$fid}' and gid='{$gid}' and type='folder' and isdelete<1"); - }else{ + $data['foldernum'] = DB::result_first("select COUNT(*) from " . DB::table('resources') . " where pfid='{$fid}' and gid='{$gid}' and type='folder' and isdelete<1"); + } else { //文件数 - $data['iconum']= DB::result_first("select COUNT(*) from ".DB::table('resources') ." where pfid='{$fid}' and isdelete < 1"); + $data['iconum'] = DB::result_first("select COUNT(*) from " . DB::table('resources') . " where pfid='{$fid}' and isdelete < 1"); //文件夹数 - $data['foldernum']= DB::result_first("select COUNT(*) from ".DB::table('resources') ." where pfid='{$fid}' and type='folder' and isdelete < 1"); + $data['foldernum'] = DB::result_first("select COUNT(*) from " . DB::table('resources') . " where pfid='{$fid}' and type='folder' and isdelete < 1"); } - $data['perm']=perm_check::getPerm($fid); - $data['perm1']=$data['perm_inherit']; - if($data['gid']>0){ - $data['isadmin'] = $data['ismoderator']=C::t('organization_admin')->is_admin_by_orgid($data['gid'],$_G['uid']); - $permtitle=perm_binPerm::getGroupTitleByPower($data['perm1']); - if(file_exists('dzz/images/default/system/folder-'.$permtitle['flag'].'.png')){ - $data['icon']='dzz/images/default/system/folder-'.$permtitle['flag'].'.png'; - }else{ - $data['icon']='dzz/images/default/system/folder-read.png'; + $data['perm'] = perm_check::getPerm($fid); + $data['perm1'] = $data['perm_inherit']; + if ($data['gid'] > 0) { + $data['isadmin'] = $data['ismoderator'] = C::t('organization_admin')->is_admin_by_orgid($data['gid'], $_G['uid']); + $permtitle = perm_binPerm::getGroupTitleByPower($data['perm1']); + if (file_exists('dzz/images/default/system/folder-' . $permtitle['flag'] . '.png')) { + $data['icon'] = 'dzz/images/default/system/folder-' . $permtitle['flag'] . '.png'; + } else { + $data['icon'] = 'dzz/images/default/system/folder-read.png'; } } $data['realpath'] = C::t('resources_path')->fetch_pathby_pfid($fid); - $data['relativepath']=preg_replace('/dzz:(.+?):/','',$data['realpath']); - $data['path']=$data['fid']; - $data['oid']=$data['fid']; - $data['bz']=''; + $data['relativepath'] = preg_replace('/dzz:(.+?):/', '', $data['realpath']); + $data['path'] = $data['fid']; + $data['oid'] = $data['fid']; + $data['bz'] = ''; return $data; } + //更改文件夹名称 - public function rename_by_fid($fid,$name){ - if(!$folder = parent::fetch($fid)) return false; + public function rename_by_fid($fid, $name) + { + if (!$folder = parent::fetch($fid)) return false; //如果文件夹有对应的rid - if($rid = C::t('resources')->fetch_rid_by_fid($fid)){ + if ($rid = C::t('resources')->fetch_rid_by_fid($fid)) { $return = C::t('resources')->rename_by_rid($rid); - if($return['error']){ + if ($return['error']) { return false; - }else{ + } else { return true; } - }else{ + } else { //更改路径表数据 - if(C::t('resources_path')->update_path_by_fid($fid,$name)){ + if (C::t('resources_path')->update_path_by_fid($fid, $name)) { //增加统计数 $statisdata = array( - 'uid'=>getglobal('uid'), - 'edits'=>1, - 'editdateline'=>TIMESTAMP + 'uid' => getglobal('uid'), + 'edits' => 1, + 'editdateline' => TIMESTAMP ); - C::t('resources_statis')->add_statis_by_fid($fid,$statisdata); + C::t('resources_statis')->add_statis_by_fid($fid, $statisdata); //更改folder数据 - return parent::update($fid,array('fname'=>$name)); - }else{ + return parent::update($fid, array('fname' => $name)); + } else { return false; } } } + //查询组织id - public function fetch_gid_by_fid($fid){ - if(!$folder=parent::fetch($fid)) return 0; - if($folder['flag']=='organization' || $folder['pfid']<1) return $folder['gid']; - elseif($folder['pfid']){ + public function fetch_gid_by_fid($fid) + { + if (!$folder = parent::fetch($fid)) return 0; + if ($folder['flag'] == 'organization') return $folder['gid']; + elseif ($folder['pfid']) { return self::fetch_gid_by_fid($folder['pfid']); } } + //查询路径 - public function fetch_path_by_fid($fid,$fids=array()){ - if(!$folder=parent::fetch($fid)) return ; - $fids[]=$folder['fid']; - if($folder['pfid']){ - $fids=self::fetch_path_by_fid($folder['pfid'],$fids); + public function fetch_path_by_fid($fid, $fids = array()) + { + if (!$folder = parent::fetch($fid)) return; + $fids[] = $folder['fid']; + if ($folder['pfid']) { + $fids = self::fetch_path_by_fid($folder['pfid'], $fids); } return $fids; } - public function delete_by_fid($fid,$rid = '',$isdelete = true){ //清空目录 - $folder=self::fetch($fid); - if(/*!defined('IN_ADMIN') && */$folder['flag']!='folder' && $folder['flag'] != 'organization'){ + + public function delete_by_fid($fid, $force = false) + { //清空目录 + $folder = self::fetch($fid); + //默认只允许删除文件夹和群组根目录,暂时不允许删除应用根目录 + if ($folder['flag'] != 'folder' && $folder['flag'] != 'organization') { return false; } - if(!$this->noperm && !perm_check::checkperm_container($fid,'delete')){ - return array('error'=>lang('no_privilege')); + //判断删除权限 + if (!perm_check::checkperm_container($fid, 'delete')) { + return array('error' => lang('no_privilege')); } - $rids = array(); - $currentrids = array(); - //获取当前文件夹包含的删除状态数据 - foreach(DB::fetch_all("select rid,oid,isdelete from %t where pfid = %d",array('resources',$fid,$fid)) as $v){ - if($v['isdelete'] > 0){ - $rids[] = $v['rid']; - }else{ - $currentrids[] = $v['rid']; + $isdelrids = array(); + $nodelrids = array(); + //获取当前文件夹包含的删除状态数据,及非删除状态数据 + foreach (DB::fetch_all("select rid,oid,isdelete from %t where pfid = %d", array('resources', $fid, $fid)) as $v) { + if ($v['isdelete'] > 0) { + $isdelrids[] = $v['rid']; + } else { + $nodelrids[] = $v['rid']; } + $rids[] = $v['rid']; } - - //获取包含当前文件夹在内的所有下级文件夹fid - $fids = C::t('resources_path')->fetch_folder_containfid_by_pfid($fid); - //查找回收站数据,如果该数据在回收站存在则排除该项 - if($rid){ - foreach(DB::fetch_all("select rid from %t where pfid in (%n) and rid != %s",array('resources_recyle',$fids,$rid)) as $v){ - if(in_array($v['rid'],$rids)){ - $rindex = array_search($v['rid'],$rids); - $currentrids[] = $v['rid']; - unset($rids[$rindex]); - }else{ - $currentrids[] = $v['rid']; - } - } - } - //排除非删除状态项 $delrids = array(); - if($rids){ - foreach(DB::fetch_all("select isdelete,rid from %t where rid in(%n)",array('resources',$rids)) as $v){ - if($v['isdelete'] > 0){ - $delrids[] = $v['rid']; - } + if (!$force) {//如果非强制彻底删除,只删除删除状态项 + $delrids = $isdelrids; + } else {//如果是强制删除,删除所有文件,包括非删除状态和删除状态文件 + $delrids = $rids; + //获取当前目录中在回收站中的数据 + foreach (DB::fetch_all("select rid from %t where pfid = %d", array('resources_recyle', $fid)) as $v) { + $delrids[] = $v['rid']; } } //执行删除 - foreach($delrids as $value){ - C::t('resources')->delete_by_rid($value); + foreach ($delrids as $value) { + C::t('resources')->delete_by_rid($value, $force); } - //如果当前目录是非删除状态或者下级有不能彻底删除文件(包含回收站单独项和未删除),则跳过当前目录删除,只清空回收站表数据 - if(!$isdelete || count($currentrids) > 0){ + //如果当前目录是非删除状态或者下级有不能彻底删除文件(未删除文件),则跳过当前目录删除,只清空回收站表数据 + if (!$force && count($nodelrids) > 0) { return 2; } return self::delete($fid); } - public function delete($fid){//删除目录 + //删除目录 + public function delete($fid) + { + //删除路径表数据 C::t('resources_path')->delete_by_fid($fid); - return parent::delete($fid); + //删除文件夹属性表数据 + C::t('folder_attr')->delete_by_fid($fid); + //删除文件夹动态(只限于文件夹) + C::t('resources_event')->delete_by_pfid_and_notrid($fid); + return parent::delete($fid); } - - public function fetch_all_default_by_uid($uid){ - return DB::fetch_all("SELECT * FROM %t WHERE `default`!= '' and uid=%d ",array($this->_table,$uid),'fid'); + + public function fetch_all_default_by_uid($uid) + { + return DB::fetch_all("SELECT * FROM %t WHERE `default`!= '' and uid=%d ", array($this->_table, $uid), 'fid'); } - public function fetch_typefid_by_uid($uid){ - $data=array(); - foreach(DB::fetch_all("SELECT * FROM %t WHERE `flag`!= 'folder' and uid='{$uid}' and gid<1 ",array($this->_table),'fid') as $value){ - $data[$value['flag']]=$value['fid']; + + public function fetch_typefid_by_uid($uid) + { + $data = array(); + foreach (DB::fetch_all("SELECT * FROM %t WHERE `flag`!= 'folder' and uid='{$uid}' and gid<1 ", array($this->_table), 'fid') as $value) { + $data[$value['flag']] = $value['fid']; } return $data; } - public function fetch_all_by_uid(){ - return DB::fetch_all("SELECT * FROM %t WHERE uid='0' ",array($this->_table),'fid'); - } - public function fetch_all_by_pfid($pfid,$count){ - global $_G; - $wheresql='pfid = %d and isdelete<1'; - if($folder=C::t('folder')->fetch_by_fid($pfid)){ - $where1=array(); - if(!$this->noperm && $folder['gid']>0 ){ - $folder['perm']=perm_check::getPerm($folder['fid']); - if($folder['perm']>0){ - if(perm_binPerm::havePower('read1',$folder['perm'])){ - $where1[]="uid ='{$_G[uid]}'"; + public function fetch_all_by_uid() + { + return DB::fetch_all("SELECT * FROM %t WHERE uid='0' ", array($this->_table), 'fid'); + } + + public function fetch_all_by_pfid($pfid, $count) + { + global $_G; + $wheresql = 'pfid = %d and isdelete<1'; + if ($folder = C::t('folder')->fetch_by_fid($pfid)) { + $where1 = array(); + if (!$this->noperm && $folder['gid'] > 0) { + $folder['perm'] = perm_check::getPerm($folder['fid']); + + if ($folder['perm'] > 0) { + if (perm_binPerm::havePower('read1', $folder['perm'])) { + $where1[] = "uid ='{$_G[uid]}'"; } - if(perm_binPerm::havePower('read2',$folder['perm'])){ - $where1[]="uid!='{$_G[uid]}'"; + if (perm_binPerm::havePower('read2', $folder['perm'])) { + $where1[] = "uid!='{$_G[uid]}'"; } } - if($where1) $wheresql.=" and (".implode(' OR ' ,$where1).")"; - else $wheresql.=" and 0"; + if ($where1) $wheresql .= " and (" . implode(' OR ', $where1) . ")"; + else $wheresql .= " and 0"; } } - if($count) return DB::result_first("SELECT COUNT(*) FROM %t WHERE $wheresql",array($this->_table,$pfid)); - else return DB::fetch_all("SELECT * FROM %t WHERE $wheresql",array($this->_table,$pfid),'fid'); + if ($count) return DB::result_first("SELECT COUNT(*) FROM %t WHERE $wheresql", array($this->_table, $pfid)); + else return DB::fetch_all("SELECT * FROM %t WHERE $wheresql", array($this->_table, $pfid), 'fid'); } - public function fetch_folderinfo_by_gid($gid){//查询群组目录及文件基本信息 + + public function fetch_folderinfo_by_gid($gid) + {//查询群组目录及文件基本信息 $gid = intval($gid); - if($info = DB::fetch_first("select f.*,p.path from %t f left join %t p on f.fid = p.fid where gid = %d and flag = %s",array($this->_table,'resources_path',$gid,'organization'))){ + if ($info = DB::fetch_first("select f.*,p.path from %t f left join %t p on f.fid = p.fid where gid = %d and flag = %s", array($this->_table, 'resources_path', $gid, 'organization'))) { return $info; } return false; } - public function fetch_fid_by_flag($flag){ - $uid= getglobal('uid'); - return DB::result_first("select fid from %t where uid = %d and flag = %s",array($this->_table,$uid,$flag)); + + public function fetch_fid_by_flag($flag) + { + $uid = getglobal('uid'); + return DB::result_first("select fid from %t where uid = %d and flag = %s", array($this->_table, $uid, $flag)); } - public function fetch_fid_by_flags($flags){ - if(!is_array($flags)) $flags = (array)$flags; + + public function fetch_fid_by_flags($flags) + { + if (!is_array($flags)) $flags = (array)$flags; $fids = array(); - foreach(DB::fetch_all("select fid from %t where flag in(%n)",array($this->_table,$flags)) as $v){ + foreach (DB::fetch_all("select fid from %t where flag in(%n)", array($this->_table, $flags)) as $v) { $fids[] = $v['fid']; } return $fids; } - public function fetch_folderinfo_by_fid($fid){//查询群组目录及文件基本信息 + + public function fetch_folderinfo_by_fid($fid) + {//查询群组目录及文件基本信息 $fid = intval($fid); $folderinfo = array(); - if($info = DB::fetch_first("select f.*,p.path from %t f left join %t p on f.fid = p.fid where f.fid = %d ",array($this->_table,'resources_path',$fid))){ + if ($info = DB::fetch_first("select f.*,p.path,p.pathkey from %t f left join %t p on f.fid = p.fid where f.fid = %d ", array($this->_table, 'resources_path', $fid))) { return $info; } return false; } //获取文件夹权限 - public function fetch_perm_by_fid($fid){ - $perms = DB::fetch_first("select perm,perm_inherit from %t where fid = %d",array($this->_table,$fid)); - if($perms['perm']){ + public function fetch_perm_by_fid($fid) + { + $perms = DB::fetch_first("select perm,perm_inherit from %t where fid = %d", array($this->_table, $fid)); + if ($perms['perm']) { return $perms['perm']; - }else{ + } else { return $perms['perm_inherit']; } } - public function fetch_folder_by_pfid($pfid,$field = array()){//查询群组目录及文件夹基本信息 + + public function fetch_folder_by_pfid($pfid, $field = array()) + {//查询群组目录及文件夹基本信息 global $_G; $fielddata = '*'; - if(!empty($field)){ - $fielddata = implode(',',$field); + if (!empty($field)) { + $fielddata = implode(',', $field); } $pfid = intval($pfid); $infoarr = array(); - if($folder=C::t('folder')->fetch($pfid)) { + if ($folder = C::t('folder')->fetch($pfid)) { $where1 = array(); if (!$this->noperm && $folder['gid'] > 0) { $folder['perm'] = perm_check::getPerm($folder['fid']); @@ -423,22 +455,24 @@ class table_folder extends dzz_table } else { $temp[] = " uid='{$_G[uid]}'"; } - $where[]='('.implode(' and ',$temp).')'; + $where[] = '(' . implode(' and ', $temp) . ')'; unset($temp); - } + } $wheresql = "where pfid = %d and flag != %s and "; - if($where) $wheresql .= implode(' AND ',$where); + if ($where) $wheresql .= implode(' AND ', $where); else return false; - $infoarr = DB::fetch_all("select $fielddata from %t $wheresql and isdelete < 1",array($this->_table,$pfid,'organization')); + $infoarr = DB::fetch_all("select $fielddata from %t $wheresql and isdelete < 1", array($this->_table, $pfid, 'organization')); return $infoarr; } + //查询子文件夹fid - public function fetch_fid_by_pfid($pfid){ + public function fetch_fid_by_pfid($pfid) + { global $_G; $pfid = intval($pfid); $infoarr = array(); - if($folder=C::t('folder')->fetch($pfid)) { + if ($folder = C::t('folder')->fetch($pfid)) { $where1 = array(); if (!$this->noperm && $folder['gid'] > 0) { $folder['perm'] = perm_check::getPerm($folder['fid']); @@ -456,64 +490,68 @@ class table_folder extends dzz_table } else { $temp[] = " uid='{$_G[uid]}'"; } - $where[]='('.implode(' and ',$temp).')'; + $where[] = '(' . implode(' and ', $temp) . ')'; unset($temp); } $wheresql = "where pfid = %d and "; - if($where) $wheresql .= implode(' AND ',$where); + if ($where) $wheresql .= implode(' AND ', $where); else return false; - $infoarr = DB::fetch_all("select fid from %t $wheresql",array($this->_table,$pfid)); + $infoarr = DB::fetch_all("select fid from %t $wheresql", array($this->_table, $pfid)); return $infoarr; } + //查询所有有权限文件夹 - public function fetch_all_fid(){ + public function fetch_all_fid() + { global $_G; $uid = $_G['uid']; $fids = array(); //个人根目录 - $personfid = DB::result_first("select fid from %t where uid = %d and flag = %s",array($this->_table,$uid,'home')); + $personfid = DB::result_first("select fid from %t where uid = %d and flag = %s", array($this->_table, $uid, 'home')); $fids[] = $personfid; - foreach($this->fetch_all_folderfid_by_pfid($personfid) as $v){ + foreach ($this->fetch_all_folderfid_by_pfid($personfid) as $v) { $fids[] = $v; } //群组部门顶级目录 $orgs = C::t('organization')->fetch_all_orgid(); - $orgids = $orgs['orgids']; - $fidarr = DB::fetch_all("select fid from %t where orgid in(%n)",array('organization',$orgids)); + $orgids = $orgs['orgids']; + $fidarr = DB::fetch_all("select fid from %t where orgid in(%n)", array('organization', $orgids)); //群组目录及下级所有目录fid - foreach($fidarr as $v){ + foreach ($fidarr as $v) { $fids[] = $v['fid']; - foreach($this->fetch_all_folderfid_by_pfid($v['fid']) as $val){ + foreach ($this->fetch_all_folderfid_by_pfid($v['fid']) as $val) { $fids[] = $val; } } return $fids; } - - - + + //查询目录下所有文件夹的fid - public function fetch_all_folderfid_by_pfid($pfid){ + public function fetch_all_folderfid_by_pfid($pfid) + { static $fids = array(); - foreach($this->fetch_fid_by_pfid($pfid) as $v){ + foreach ($this->fetch_fid_by_pfid($pfid) as $v) { $fids[] = $v['fid']; $this->fetch_fid_by_pfid($v['fid']); } return $fids; } - //获取目录的所有上级目录 - public function fetch_all_parent_by_fid($fid,$ret=array()){ - if(!$folder=parent::fetch($fid)){ - return $ret; - } - $ret[]=$folder; - if($folder['pfid']>0){ - $ret=self::fetch_all_parent_by_fid($folder['pfid'],$ret); - } - return $ret; - } + + //获取目录的所有上级目录 + public function fetch_all_parent_by_fid($fid, $ret = array()) + { + if (!$folder = parent::fetch($fid)) { + return $ret; + } + $ret[] = $folder; + if ($folder['pfid'] > 0) { + $ret = self::fetch_all_parent_by_fid($folder['pfid'], $ret); + } + return $ret; + } } \ No newline at end of file diff --git a/core/class/table/table_local_storage.php b/core/class/table/table_local_storage.php index 753c6e2..76d7d1b 100644 --- a/core/class/table/table_local_storage.php +++ b/core/class/table/table_local_storage.php @@ -41,6 +41,7 @@ class table_local_storage extends dzz_table if($data['type']=='pan') $bz=$data['bz'].':'.$data['id'].':'.$data['root']; elseif($data['type']=='storage') $bz=$data['bz'].':'.$data['id'].':'.$data['bucket']; elseif($data['type']=='ftp') $bz=$data['bz'].':'.$data['id'].':'.$data['root']; + elseif($data['type']=='disk') $bz=$data['bz'].':'.$data['id'].':'.$data['root']; else $bz='dzz'; return $bz; } @@ -91,7 +92,11 @@ class table_local_storage extends dzz_table $bz=$data['bz'].':'.$data['id'].':'; $return['usesize']=C::t('attachment')->getSizeByRemote($remoteid); $return['totalsize']=0; - }else{ + }elseif($data['type']=='disk'){ + $bz=$data['bz'].':'.$data['id'].':'; + $return['usesize']=C::t('attachment')->getSizeByRemote($remoteid); + $return['totalsize']=disk_free_space($data['attachdir']); + }else{ $return['usesize']=C::t('attachment')->getSizeByRemote($remoteid); $return['totalsize']=0; } diff --git a/core/class/table/table_market.php b/core/class/table/table_market.php deleted file mode 100644 index 451cd1e..0000000 --- a/core/class/table/table_market.php +++ /dev/null @@ -1,43 +0,0 @@ -_table = 'market'; - $this->_pk = 'mid'; - - parent::__construct(); - } - public function fetch_by_mid($mid,$width=800,$height=500,$original=0){ - $app=parent::fetch($mid); - $version=DB::fetch_first("select * from %t where mid=%d order by version_num desc limit 1",array('market_version',$mid)); - if($version && $field=C::t('market_field')->fetch($version['id'])){ - $app['desc']=$field['desc']; - $app['pics']=C::t('market_field')->fetch_pic_by_mid($version['id'],$width,$height,$original); - } - $app['coverimg']=C::t('attachment')->getThumbByAid($app['cover'],236,136,0); - - return $app; - } - public function delete_by_mid($mid){ - if(parent::delete($mid)){ - C::t('market_field')->delete_by_mid($mid); - return true; - } - return false; - } -} - -?> diff --git a/core/class/table/table_market_field.php b/core/class/table/table_market_field.php deleted file mode 100644 index a0bace9..0000000 --- a/core/class/table/table_market_field.php +++ /dev/null @@ -1,70 +0,0 @@ -_table = 'market_field'; - $this->_pk = 'mid'; - parent::__construct(); - } - public function insert_by_mid($mid,$message,$attachs){ - if($field=parent::fetch($mid)){ - $return=parent::update($mid,array('desc'=>$message,'attachs'=>implode(',',$attachs))); - $oattachs=$field['attachs']?explode(',',$field['attachs']):array(); - $dels=array_diff($oattachs,$attachs); - $adds=array_diff($attachs,$oattachs); - C::t('attachment')->addcopy_by_aid($dels,-1); - C::t('attachment')->addcopy_by_aid($adds,1); - return $return; - }else{ - return parent::insert(array('mid'=>$mid,'desc'=>$message,'attachs'=>implode(',',$attachs)),1); - } - } - public function update_pic_by_mid($mid,$aids){ - if($field=parent::fetch($mid)){ - $return=parent::update($mid,array('pics'=>implode(',',$aids))); - $opics=$field['pics']?explode(',',$field['pics']):array(); - $dels=array_diff($opics,$aids); - $adds=array_diff($aids,$opics); - C::t('attachment')->addcopy_by_aid($dels,-1); - C::t('attachment')->addcopy_by_aid($adds,1); - return $return; - }else{ - return parent::insert(array('mid'=>$mid,'desc'=>'','pics'=>implode(',',$aids)),1); - } - } - public function fetch_pic_by_mid($mid,$width=800,$height=500,$original=1){ - $data=array(); - if($field=parent::fetch($mid)){ - $aids=$field['pics']?explode(',',$field['pics']):array(); - foreach($aids as $aid){ - $data[$aid]=C::t('attachment')->getThumbByAid($aid,$width,$height,$original); - } - } - return $data; - } - public function delete_by_mid($mid){ - $data=parent::fetch($mid); - $opics=$data['pics']?explode(',',$data['pics']):array(); - $attachs=$data['attachs']?explode(',',$data['attachs']):array(); - $aids=array_merge($opics,$attachs); - foreach($aids as $aid){ - C::t('attachment')->delete_by_aid($aid); - } - return true; - } -} - -?> diff --git a/core/class/table/table_organization.php b/core/class/table/table_organization.php index e12a9bf..982bb6d 100644 --- a/core/class/table/table_organization.php +++ b/core/class/table/table_organization.php @@ -89,7 +89,7 @@ class table_organization extends dzz_table $orginfo['adminer'] = C::t('organization_admin')->fetch_adminer_by_orgid($toporgid); $groups['org'][] = $orginfo; } else { - if ($orginfo = DB::fetch_first("select * from %t where `orgid` = %d and syatemon = %d and manageon = %d ORDER BY disp", array($this->_table, $toporgid, 1, 1))) { + if ($orginfo = DB::fetch_first("select * from %t where `orgid` = %d and syatemon = %d and manageon = %d and diron = 1 ORDER BY disp", array($this->_table, $toporgid, 1, 1))) { $orginfo['usernum'] = C::t('organization_user')->fetch_num_by_toporgid($toporgid); $orginfo['adminer'] = C::t('organization_admin')->fetch_adminer_by_orgid($toporgid); $groups['org'][] = $orginfo; @@ -114,7 +114,8 @@ class table_organization extends dzz_table if ($foreces) { if ($orginfo['syatemon'] == 0) {//系统管理员关闭群组 continue; - } elseif ($orginfo['syatemon'] == 1 && $orginfo['manageon'] == 0 && C::t('organization_admin')->chk_memberperm($orginfo['orgid'], $uid) == 0) {//管理员关闭群组,当前用户不具备管理员权限 + //如果是普通成员,判断群组是否关闭,暂时用diron来进行判断 + } elseif ($orginfo['diron'] == 0 && C::t('organization_admin')->chk_memberperm($orginfo['orgid'], $uid) == 0) {//管理员关闭群组,当前用户不具备管理员权限 continue; } } @@ -173,12 +174,12 @@ class table_organization extends dzz_table if (!$org = parent::fetch($orgid)) { return array('error' => lang('remove_error_object_inexistence')); } - if (self::fetch_all_by_forgid($org['orgid'], true) || ($org['fid'] && DB::result_first("select count(*) from %t where pfid = %d", array('resources', $org['fid'])))) { + if (self::fetch_all_by_forgid($org['orgid'], true) || ($org['fid'] && DB::result_first("select count(*) from %t where pfid = %d and isdelete < 1", array('resources', $org['fid'])))) { return array('error' => lang('remove_error_check_the_content')); } //删除对应目录 if ($org['fid']) { - C::t('folder')->delete_by_fid($org['fid'], true); + C::t('folder')->delete_by_fid($org['fid'],true); } //删除对应事件 C::t('resources_event')->delete_by_gid($orgid); @@ -190,8 +191,8 @@ class table_organization extends dzz_table if (intval($org['aid']) != 0) { C::t('attachment')->addcopy_by_aid($org['aid'], -1); } - if ($this->_wxbind) { - self::deleteDepartment($org['worgid']); + if( $org["type"]==0){//非群主才同步 + self::syn_organization($org['orgid'],'delete'); } return $org; } else { @@ -246,7 +247,7 @@ class table_organization extends dzz_table if (!in_array($v['orgid'], $orgidarr) && in_array($v['orgid'], $val)) { if (C::t('organization_admin')->chk_memberperm($v['orgid'], $uid) > 0 && $v['syatemon'] == 1) { $resultarr[] = $v; - } elseif ($v['syatemon'] == 1 && $v['manageon'] == 1) { + } elseif ($v['syatemon'] && $v['manageon'] && $v['diron']) { $resultarr[] = $v; } $orgidarr[] = $v['orgid']; @@ -402,7 +403,7 @@ class table_organization extends dzz_table $disp = $torg['disp']; if (DB::query("update %t SET disp=disp+1 where disp>=%d and forgid=%d", array($this->_table, $disp, $forgid)) && $this->_wxbind) { foreach (DB::fetch_all("select orgid from %t where disp>%d and forgid=%d", array($this->_table, $disp, $forgid)) as $value) { - self::wx_update($value['orgid']); + //self::wx_update($value['orgid']); } } } else { @@ -429,11 +430,11 @@ class table_organization extends dzz_table if ($disp > 10000) { if (DB::query("update %t SET disp=disp-9000 where forgid=%d", array($this->_table, $forgid))) { foreach (DB::fetch_all("select orgid from %t where forgid=%d", array($this->_table, $forgid)) as $value) { - self::wx_update($value['orgid']); + //self::wx_update($value['orgid']); } } } else { - if ($this->_wxbind) self::wx_update($orgid); + //if ($this->_wxbind) self::wx_update($orgid); } return $return; } else { @@ -475,10 +476,6 @@ class table_organization extends dzz_table //添加对应动态 $eventdata = array('groupname' => $setarr['orgname'], 'uid' => getglobal('uid'), 'username' => getglobal('username')); C::t('resources_event')->addevent_by_pfid($fid, 'create_group', 'create', $eventdata, $setarr['orgid']); - - if ($synwx && $this->_wxbind) {//同步到微信端 - self::wx_update($setarr['orgid']); - } self::setPathkeyByOrgid($setarr['orgid']); return $setarr['orgid']; } @@ -499,15 +496,22 @@ class table_organization extends dzz_table $uid = getglobal('uid'); C::t('organization_admin')->insert($uid, $setarr['orgid'], 1); } - if ($this->_wxbind) {//同步到微信端 - self::wx_update($setarr['orgid']); - } - self::setPathkeyByOrgid($setarr['orgid']); + + self::setPathkeyByOrgid($setarr['orgid']); + if(isset($setarr['type']) && $setarr['type'] == 0 ) self::syn_organization($setarr['orgid']); return $setarr; } return false; } + + public function syn_organization( $data=array(),$type="update" ){ + if( $type=="update"){ + Hook::listen('syntoline_department',$data);//注册绑定到三方部门表 + }else if( $type=="delete"){ + Hook::listen('syntoline_department',$data,"del");//删除对应到三方部门表 + } + } public function update_by_orgid($orgid, $setarr, $synwx = 1) { @@ -519,10 +523,8 @@ class table_organization extends dzz_table if (parent::update($orgid, array('orgname' => $name))) { $body_data = array('username' => getglobal('username'), 'oldname' => $org['orgname'], 'newname' => $name); $event_body = 'update_group_name'; - C::t('resources_event')->addevent_by_pfid($org['fid'], $event_body, 'update_groupname', $body_data, $orgid, '', $org['orgname']);//记录事件 - if ($this->_wxbind) {//同步到微信端 - self::wx_update($orgid); - } + C::t('resources_event')->addevent_by_pfid($org['fid'], $event_body, 'update_groupname', $body_data, $orgid, '', $org['orgname']);//记录事件 + if( $synwx && $org['type']==0) self::syn_organization($orgid); } unset($setarr['orgname']); } @@ -550,15 +552,13 @@ class table_organization extends dzz_table C::t('attachment')->addcopy_by_aid($aid); } } - $org = array_merge($org, $setarr); + $org = array_merge($org, $setarr); self::setFolderByOrgid($org['orgid']); $body_data = array('username' => getglobal('username')); $event_body = 'update_group_setting'; C::t('resources_event')->addevent_by_pfid($org['fid'], $event_body, 'update_setting', $body_data, $orgid, '', $org['orgname']);//记录事件 - self::setPathkeyByOrgid($orgid); - if ($synwx && $this->_wxbind) {//同步到微信端 - self::wx_update($orgid); - } + self::setPathkeyByOrgid($orgid); + if( $synwx && $org['type']==0 ) self::syn_organization($orgid); return true; } return true; @@ -573,8 +573,9 @@ class table_organization extends dzz_table public function getUpOrgidTree($orgid,$pids=array()){ global $_G; if($org=C::t('organization')->fetch($orgid)){ - $pids[]=$orgid; - $pids=getUpOrgidTree($org['forgid'],$pids); + //$pids[]=$orgid; + array_unshift($pids,$orgid); + $pids=self::getUpOrgidTree($org['forgid'],$pids); } return ($pids); } @@ -589,8 +590,8 @@ class table_organization extends dzz_table return false; }else{ if ($force || empty($org['pathkey'])) {//没有pathkey, - include_once libfile('function/organization'); - if($ids=getUpOrgidTree($org['orgid'])){ + // include_once libfile('function/organization'); + if($ids=self::getUpOrgidTree($org['orgid'])){ $pathkey='_'.implode('_-_',$ids).'_'; if( parent::update($org['orgid'],array('pathkey'=>$pathkey))) return $pathkey; } @@ -678,18 +679,7 @@ class table_organization extends dzz_table } } return false; - } - - public function deleteDepartment($id) - { - $wx = new qyWechat(array('appid' => getglobal('setting/CorpID'), 'appsecret' => getglobal('setting/CorpSecret'), 'agentid' => 0)); - if ($wx->deleteDepartment($id)) return true; - else { - $message = 'deleteDepartment:errCode:' . $wx->errCode . ';errMsg:' . $wx->errMsg; - runlog('wxlog', $message); - } - return false; - } + } public function getPathByOrgid($orgid,$space='-') { @@ -729,8 +719,7 @@ class table_organization extends dzz_table //当前机构或部门管理员,查询所有下级和上级 if (C::t('organization_admin')->chk_memberperm($val, $uid)) { $path = DB::result_first("select pathkey from %t where orgid = %d", array($this->_table, $val)); - $patharr = DB::fetch_all("select pathkey from %t where pathkey regexp %s and available = %d and diron = %d", array($this->_table, '^' . $path . '.*', 1, 1)); - + $patharr = DB::fetch_all("select pathkey from %t where pathkey regexp %s and available = %d", array($this->_table, '^' . $path . '.*', 1)); foreach ($patharr as $v) { $pathstr = str_replace('_', '', $v['pathkey']); if ($orgidarr = explode('-', $pathstr)) $orgids_admin = array_merge($orgids_admin, $orgidarr); @@ -743,7 +732,6 @@ class table_organization extends dzz_table } } - $member_orgids = array(); //判断参与群组的群组开启和文件开启 foreach (DB::fetch_all('select manageon,diron,orgid from %t where orgid in(%n)', array($this->_table, $orgids_member)) as $v) { diff --git a/core/class/table/table_organization_job.php b/core/class/table/table_organization_job.php index f8c02e9..06a6266 100644 --- a/core/class/table/table_organization_job.php +++ b/core/class/table/table_organization_job.php @@ -31,6 +31,24 @@ class table_organization_job extends dzz_table $data['orgtree']=getTreeByOrgid($data['orgid']); return $data; } + + function insert_job_by_name($orgid=0, $name="" ){ + if (!$orgid || !$name ) return 0; + if( !$jobid = DB::result_first("select jobid from %t where orgid = %d and name=%s", array('organization_job',$orgid,$name)) ) { + $data=array( + "orgid" => $orgid, + 'name' => $name, + 'jobid' => 0, + 'dateline' => TIMESTAMP + ); + if($jobid = DB::insert('organization_job',$data,1)){//插入版本数据 + return $jobid; + } + }else{ + return $jobid; + } + return 0; + } } ?> diff --git a/core/class/table/table_organization_user.php b/core/class/table/table_organization_user.php index d859f7c..abcb4d5 100644 --- a/core/class/table/table_organization_user.php +++ b/core/class/table/table_organization_user.php @@ -33,8 +33,10 @@ class table_organization_user extends dzz_table $ret[$v]=$v; } } - wx_updateUser($ret); - return $ret; + if( $org["type"]==0){//非群主才同步 + self::syn_user( $ret ); + } + return $ret; } public function fetch_by_uid_orgid($uid, $orgid) @@ -61,15 +63,37 @@ class table_organization_user extends dzz_table foreach ($updateids as $orgid) { if ($orgid > 0) DB::update($this->_table, array('jobid' => $orgarr[$orgid]), "orgid='{$orgid}' and uid='{$uid}'"); } - - wx_updateUser($uid); return true; } + + public function bind_uid_and_orgid($uid, $orgarr){ + $orgids = array(); + foreach ($orgarr as $key => $value) { + $orgids[] = $key; + } + + $Oorgids = self::fetch_orgids_by_uid($uid); + if (!is_array($orgids)) $orgids = array($orgids); + $insertids = array_diff($orgids, $Oorgids); + $delids = array_diff($Oorgids, $orgids); + $updateids = array_diff($orgids, $delids, $insertids); + //if ($delids) DB::delete($this->_table, "uid='{$uid}' and orgid IN (" . dimplode($delids) . ")"); + + foreach ($insertids as $orgid) { + if ($orgid > 0) self::insert_by_orgid($orgid,$uid,$orgarr[$orgid]); + } + foreach ($updateids as $orgid) { + if ($orgid > 0) DB::update($this->_table, array('jobid' => $orgarr[$orgid]), "orgid='{$orgid}' and uid='{$uid}'"); + } + + return true; + } public function delete_by_uid($uid, $wxupdate = 1) { if ($return = DB::delete($this->_table, "uid='{$uid}'")) { - if ($wxupdate) wx_updateUser($uid); + + self::syn_user( $uid ); return $return; } else return false; } @@ -98,19 +122,32 @@ class table_organization_user extends dzz_table //删除管理员表数据 DB::delete('organization_admin', "uid IN (" . dimplode($uids) . ") and orgid='{$orgid}'"); include_once libfile('function/cache'); - updatecache('organization'); - if ($wxupdate) wx_updateUser($uids); + updatecache('organization'); + self::syn_user( $uids ); return $uids; } else return false; } public function delete_by_orgid($orgids) { - if (!$orgids) return; - $orgids = (array)$orgids; - $uids = self::fetch_uids_by_orgid($orgids); + if (!$orgids) return; + $orgids = (array)$orgids; + //$uids = self::fetch_uids_by_orgid($orgids); + $syn_uid =array(); + foreach ($orgids as $orgid) { + $org = DB::fetch_first("select orgid,type from %t where orgid=%d", array('organization', $orgid)); + if( $org ){ + $query = DB::query("select uid from %t where orgid=%d", array($this->_table, $orgid)); + while ($value = DB::fetch($query)) { + if( $org["type"]==0 ) $syn_uid[]=$value['uid']; + } + } + } + + if( $syn_uid ) $syn_uid = array_unique($syn_uid); + if ($return = DB::delete($this->_table, "orgid IN (" . dimplode($orgids) . ")")) { - if ($uids) wx_updateUser($uids); + if ($syn_uid) self::syn_user( $syn_uid ); return $return; } else return false; } @@ -277,7 +314,25 @@ class table_organization_user extends dzz_table $params[] = $uid; } $userinfo = array(); - foreach (DB::fetch_all("select o.*,u.username from %t o left join %t u on o.uid = u.uid where o.orgid = %d $where", $params) as $v) { + foreach (DB::fetch_all("select o.*,u.username,u.email from %t o left join %t u on o.uid = u.uid where o.orgid = %d $where", $params) as $v) { + $admintype = DB::result_first("select admintype from %t where orgid = %d and uid = %d", array('organization_admin', $orgid, $v['uid'])); + if (!$admintype) { + $v['perm'] = 0; + } else { + $v['perm'] = $admintype; + } + $userinfo[] = $v; + } + return $userinfo; + } + //获取当前机构或部门及下级所有的用户 + public function get_all_user_byorgid($orgid){ + $pathkey = DB::result_first("select pathkey from %t where orgid = %d",array('organization',$orgid)); + $params = array('organization','organization_user','user','^'.$pathkey.'.*'); + $userinfo = array(); + foreach (DB::fetch_all("select o.orgid,ou.*,u.username,u.email from %t o + left join %t ou on ou.orgid = o.orgid + left join %t u on ou.uid = u.uid where o.pathkey regexp %s", $params) as $v) { $admintype = DB::result_first("select admintype from %t where orgid = %d and uid = %d", array('organization_admin', $orgid, $v['uid'])); if (!$admintype) { $v['perm'] = 0; @@ -363,5 +418,11 @@ class table_organization_user extends dzz_table $uids['all'] = array_merge($uids['partmember'],$uids['adminer']); return $uids; } + + public function syn_user( $data=array() ){ + Hook::listen('syntoline_user',$data);//注册绑定到钉钉用户表 + //Hook::listen('dzztowxwork_synuser',$data);//注册绑定到企业微信用户表 + } + } diff --git a/core/class/table/table_resources.php b/core/class/table/table_resources.php index f8aec59..16d04b3 100644 --- a/core/class/table/table_resources.php +++ b/core/class/table/table_resources.php @@ -1,139 +1,149 @@ _table = 'resources'; $this->_pk = 'rid'; - $this->noperm = (getglobal('appGreenChannel'))?getglobal('appGreenChannel'):false; parent::__construct(); } - public function insert_data($data){ + + public function insert_data($data) + { $rid = self::create_id(); $data['rid'] = $rid; - if(parent::insert($data)){ - return $rid; - } - return false; + if (parent::insert($data)) { + return $rid; + } + return false; } + //生成主键rid - public function create_id(){ + public function create_id() + { $microtime = microtime(); - list($msec,$sec) = explode(' ',$microtime); - $msec = $msec*1000000; - $idstr = md5($sec.$msec.random(6)); + list($msec, $sec) = explode(' ', $microtime); + $msec = $msec * 1000000; + $idstr = md5($sec . $msec . random(6)); return $idstr; } - public function getparentsuri($pfid){ + public function getparentsuri($pfid) + { $path = array(); - if($parent = DB::result_first('select pfid,fname from %t where fid = %d',array('folder',$pfid))){ - if($parent['pfid'] > 0 && $parent['pfid'] != $pfid){ - $path[]= $parent['fname']; - self::getparenturi($parent['pfid']); - } - } - $path = array_reverse($path); - $path = implode('/',$path); + if ($parent = DB::result_first('select pfid,fname from %t where fid = %d', array('folder', $pfid))) { + if ($parent['pfid'] > 0 && $parent['pfid'] != $pfid) { + $path[] = $parent['fname']; + self::getparenturi($parent['pfid']); + } + } + $path = array_reverse($path); + $path = implode('/', $path); return $path; } - public function rename_by_rid($rid,$newname){ + public function rename_by_rid($rid, $newname) + { global $_G; $uid = $_G['uid']; - if(!$infoarr = $this->fetch_info_by_rid($rid)){ - return array('error'=>lang('file_not_exist')); + if (!$infoarr = $this->fetch_info_by_rid($rid)) { + return array('error' => lang('file_not_exist')); } $updatepath = false; - if($infoarr['type'] == 'folder'){ + if ($infoarr['type'] == 'folder') { $updatepath = true; } $fid = $infoarr['pfid']; if ($infoarr['gid'] > 0) { $pfid = $infoarr['pfid']; $perm = perm_check::getPerm($pfid); - if ($perm > 0 && !$this->noperm) { + if ($perm > 0) { if (!perm_binPerm::havePower('edit2', $perm) && !(perm_binPerm::havePower('edit1', $perm) && $uid == $infoarr['uid'])) { - return array('error'=>true); + return array('error' => true); } } } $setarr = array( - 'isdelete'=>1, - 'deldateline'=>time() + 'isdelete' => 1, + 'deldateline' => time() ); $position = C::t('resources_path')->fetch_pathby_pfid($fid); - $position = preg_replace('/dzz:(.+?):/','',$position); - if(DB::update($this->_table,array('name'=>$newname,'dateline'=>TIMESTAMP),array('rid'=>$rid))){ - if($updatepath){ - C::t('folder')->update($infoarr['oid'],array('fname'=>$newname)); - C::t('resources_path')->update_path_by_fid($infoarr['oid'],$newname); + $position = preg_replace('/dzz:(.+?):/', '', $position); + if (DB::update($this->_table, array('name' => $newname, 'dateline' => TIMESTAMP), array('rid' => $rid))) { + if ($updatepath) { + C::t('folder')->update($infoarr['oid'], array('fname' => $newname)); + C::t('resources_path')->update_path_by_fid($infoarr['oid'], $newname); } //更新属性表数据 - C::t('resources_attr')->update_by_skey($rid,$infoarr['vid'],array('title'=>$newname)); + C::t('resources_attr')->update_by_skey($rid, $infoarr['vid'], array('title' => $newname)); $statisdata = array( - 'uid'=>getglobal('uid'), - 'edits'=>1, - 'editdateline'=>TIMESTAMP + 'uid' => getglobal('uid'), + 'edits' => 1, + 'editdateline' => TIMESTAMP ); - C::t('resources_statis')->add_statis_by_rid($rid,$statisdata); - $hash = C::t('resources_event')->get_showtpl_hash_by_gpfid($infoarr['pfid'],$infoarr['gid']); - $eventdata = array('username'=>$_G['username'],'position'=>$position,'filename'=>$infoarr['name'],'newfilename'=>$newname,'hash'=>$hash); - if(C::t('resources_event')->addevent_by_pfid($infoarr['pfid'],'rename_file','rename',$eventdata,$infoarr['gid'],$rid,$infoarr['name'])){ - return array('newname'=>$newname); - }else{ - DB::update('resources_attr',array('title'=>$infoarr['name']),array('rid'=>$rid,'vid'=>$infoarr['vid'])); - DB::update($this->_table,array('name'=>$infoarr['name'],'dateline'=>$infoarr['dateline']),array('rid'=>$rid)); - return array('error'=>true); + C::t('resources_statis')->add_statis_by_rid($rid, $statisdata); + $hash = C::t('resources_event')->get_showtpl_hash_by_gpfid($infoarr['pfid'], $infoarr['gid']); + $eventdata = array('username' => $_G['username'], 'position' => $position, 'filename' => $infoarr['name'], 'newfilename' => $newname, 'hash' => $hash); + if (C::t('resources_event')->addevent_by_pfid($infoarr['pfid'], 'rename_file', 'rename', $eventdata, $infoarr['gid'], $rid, $infoarr['name'])) { + return array('newname' => $newname); + } else { + DB::update('resources_attr', array('title' => $infoarr['name']), array('rid' => $rid, 'vid' => $infoarr['vid'])); + DB::update($this->_table, array('name' => $infoarr['name'], 'dateline' => $infoarr['dateline']), array('rid' => $rid)); + return array('error' => true); } } } //查询文件表基础信息 $notisdelete是否是已删除 - public function fetch_info_by_rid($rid,$notisdelete = false){ + public function fetch_info_by_rid($rid, $notisdelete = false) + { $rid = trim($rid); $where = ' and 1 '; - if($notisdelete){ + if ($notisdelete) { $where .= ' and isdelete < 1 '; } - return DB::fetch_first("select * from %t where rid = %s $where",array($this->_table,$rid)); + return DB::fetch_first("select * from %t where rid = %s $where", array($this->_table, $rid)); } + //检查权限 - public function check_groupperm_by_pfids($pfids,$action,$gid=0,$bz=''){ + public function check_groupperm_by_pfids($pfids, $action, $gid = 0, $bz = '') + { global $_G; - if(!is_array($pfids)) $pfids = array($pfids); + if (!is_array($pfids)) $pfids = array($pfids); //bz判断暂时注释 - /* if($bz){ - foreach($pfids as $v){ - if(!self::checkperm_Container($v,$action,$bz)){ - return false; - } - } - }*/ + /* if($bz){ + foreach($pfids as $v){ + if(!self::checkperm_Container($v,$action,$bz)){ + return false; + } + } + }*/ //获取目录权限和超级权限 - $folderpermarr = DB::fetch_all("select perm_inherit,fsperm,uid from %t where fid in(%n)",array('folder',$pfids)); + $folderpermarr = DB::fetch_all("select perm_inherit,fsperm,uid from %t where fid in(%n)", array('folder', $pfids)); //判断目录超级权限 - foreach($folderpermarr as $v){ - if(!perm_FolderSPerm::isPower($v['fsperm'],$action)) return false; + foreach ($folderpermarr as $v) { + if (!perm_FolderSPerm::isPower($v['fsperm'], $action)) return false; } $uid = $_G['uid']; - if($_G['adminid'] == 1) return true; - $ismoderator=C::t('organization_admin')->chk_memberperm($gid,$_G['uid']); - if($ismoderator) return true; + if ($_G['adminid'] == 1) return true; + $ismoderator = C::t('organization_admin')->chk_memberperm($gid, $_G['uid']); + if ($ismoderator) return true; //判断目录权限 - if(DB::result_first("select count(*) from %t where uid=%d and orgid=%d",array('organization_user',$uid,$gid)) < 1){ + if (DB::result_first("select count(*) from %t where uid=%d and orgid=%d", array('organization_user', $uid, $gid)) < 1) { return false; } - $permarr = perm_binPerm::getPowerArr(); - foreach($folderpermarr as $v){ - if(!($v['perm_inherit'] & $permarr[$action.'2']) && !($v['perm_inherit'] & $permarr[$action.'1'])){ + $permarr = perm_binPerm::getPowerArr(); + foreach ($folderpermarr as $v) { + if (!($v['perm_inherit'] & $permarr[$action . '2']) && !($v['perm_inherit'] & $permarr[$action . '1'])) { return false; } } @@ -142,141 +152,117 @@ class table_resources extends dzz_table } //删除文件(移动文件到回收站) - public function recyle_by_rid($rid){ + public function recyle_by_rid($rid) + { global $_G; $uid = $_G['uid']; - //if(!is_array($rid)) $rid = (array)$rid; $rid = trim($rid); $dels = array(); //判断文件是否存在 - if(!$infoarr = DB::fetch_first("select * from %t where rid = %s",array($this->_table,$rid))){ + if (!$infoarr = DB::fetch_first("select * from %t where rid = %s", array($this->_table, $rid))) { return false; } $fid = $infoarr['pfid']; $setarr = array( - 'isdelete'=>1, - 'deldateline'=>time() + 'pfid' => -1, + 'isdelete' => 1, + 'deldateline' => TIMESTAMP + ); + $setarr1 = array( + 'isdelete' => 1, + 'deldateline' => TIMESTAMP ); //如果删除的是文件夹 - if($infoarr['type'] == 'folder'){ - $fids = C::t('resources_path')->fetch_folder_containfid_by_pfid($infoarr['oid']); - if($infoarr['gid'] > 0 && !$this->noperm){ - //获取文件夹fid集合 + if ($infoarr['type'] == 'folder') { + $currentfid = $infoarr['oid']; + //获取文件夹fid集合 + $fids = C::t('resources_path')->fetch_folder_containfid_by_pfid($currentfid); + if ($infoarr['gid'] > 0) { $pfids = $fids; $pfids[] = $fid; //权限判断 - if(!self::check_groupperm_by_pfids($pfids,'delete',$infoarr['gid'])){ - return array('error'=>lang('has_no_privilege_file')); + if (!self::check_groupperm_by_pfids($pfids, 'delete', $infoarr['gid'])) { + return array('error' => lang('has_no_privilege_file')); } } $rids = array(); - $rfids = array(); - foreach(DB::fetch_all("select rid,oid from %t where oid in(%n) or pfid in(%n)",array($this->_table,$fids,$fids)) as $v){ + //获取当前文件下所有下级rid + foreach (DB::fetch_all("select rid from %t where oid in(%n) or pfid in(%n) and rid != %s", array($this->_table, $fids, $fids, $rid)) as $v) { $rids[] = $v['rid']; - if($v['oid']) $rfids[$v['rid']] =$v['oid']; } - foreach(DB::fetch_all("select rid from %t where pfid in(%n) and rid != %s",array('resources_recyle',$fids,$rid)) as $v){ - if (in_array($v['rid'], $rids)) {//如果该数据在回首站存在则去除 - if ($rfids[$v['rid']]) {//如果是文件夹 - unset($rfids[$v['rid']]); - } - $rindex = array_search($v['rid'], $rids); - unset($rids[$rindex]); - } - } - //执行删除 - if(DB::update($this->table,$setarr,'rid in('.dimplode($rids).')')){ + $rfids = $fids; + $index = array_search($currentfid, $rfids); + unset($rfids[$index]); + $ridsstatus = (count($rids) > 0) ? true : false; + $fidssstatus = (count($rfids) > 0) ? true : false; + if (DB::update($this->table, $setarr, array('rid' => $rid))) { $infoarr['deldateline'] = $setarr['deldateline']; $infoarr['isdelete'] = $setarr['isdelete']; - C::t('shares')->change_by_rid($rids); + //更改下级目录删除状态 + if ($ridsstatus) DB::update($this->table, $setarr1, 'rid in(' . dimplode($rids) . ')'); //查询回收站是否有相同数据,如果有合并回收站数据 - $recyledata = C::t('resources_recyle')->fetch_by_rid($infoarr['rid']); - if($recyledata){ - if(DB::update('folder',array('isdelete' =>$setarr['isdelete'], 'deldateline' => $setarr['deldateline']),'fid in('.dimplode($rfids).')') - && DB::update('resources_recyle',array('deldateline'=>$infoarr['deldateline']),array('id'=>$recyledata['id']))){ - $dels = $rids; + if ($recyledata = C::t('resources_recyle')->fetch_by_rid($infoarr['rid'])) { + if (DB::update('folder', $setarr, 'fid =' . $currentfid)) { + if ($fidssstatus) DB::update('folder', $setarr1, 'fid in(' . dimplode($rfids) . ')'); + DB::update('resources_recyle', array('deldateline' => $infoarr['deldateline'], 'uid' => $uid), array('id' => $recyledata['id'])); + } else { + if ($ridsstatus) DB::update($this->table, array('isdelete' => 0, 'deldateline' => 0, 'pfid' => $infoarr['pfid']), 'rid in(' . dimplode($rids) . ')'); + DB::update($this->table, array('isdelete' => 0, 'deldateline' => 0, 'pfid' => $infoarr['pfid']), 'rid = ' . $rid); + return array('error' => lang('do_failed')); } - }else{ - //数据放入回收站表(顶级文件夹数据) - if(DB::update('folder',array('isdelete' =>$setarr['isdelete'], 'deldateline' => $setarr['deldateline']),'fid in('.dimplode($rfids).')') - && C::t('resources_recyle')->insert_data($infoarr)){ - $dels = $rids; - }else{//放入回收站失败处理 - DB::update($this->table,array('isdelete'=>0,'deldateline'=>0),'rid in('.dimplode($rids).')'); - return array('error'=>lang('do_failed')); + } else { + if (DB::update('folder', $setarr, 'fid =' . $currentfid)) { + if ($fidssstatus) DB::update('folder', $setarr1, 'fid in(' . dimplode($rfids) . ')'); + C::t('resources_recyle')->insert_data($infoarr); + } else { + if ($ridsstatus) DB::update($this->table, array('isdelete' => 0, 'deldateline' => 0, 'pfid' => $infoarr['pfid']), 'rid in(' . dimplode($rids) . ')'); + DB::update($this->table, array('isdelete' => 0, 'deldateline' => 0, 'pfid' => $infoarr['pfid']), 'rid = ' . $rid); + return array('error' => lang('do_failed')); } } - }else{ - return array('error'=>lang('do_failed')); } - - }else{ + $dels[] = $rid; + } else { //文件权限判断 - if($infoarr['gid'] > 0 && !$this->noperm){ - if(!perm_check::checkperm_Container($fid,'delete2') &&!(perm_check::checkperm_Container($fid,'delete1') && $uid == $infoarr['uid']) ){ - return array('error'=>lang('no_privilege')); + if ($infoarr['gid'] > 0) { + if (!perm_check::checkperm_Container($fid, 'delete2') && !(perm_check::checkperm_Container($fid, 'delete1') && $uid == $infoarr['uid'])) { + return array('error' => lang('no_privilege')); } } - if(DB::result_first("select count(*) from %t where rid = %s",array('resources_recyle',$rid))){ - return array('error'=>lang('file_isdelete_in_recycle')); + if (DB::result_first("select count(*) from %t where rid = %s", array('resources_recyle', $rid))) { + return array('error' => lang('file_isdelete_in_recycle')); } //执行删除 - if(DB::update($this->table,$setarr,array('rid'=>$rid))){ + if (DB::update($this->table, $setarr, array('rid' => $rid))) { //修改分享表状态 C::t('shares')->change_by_rid($rid); $infoarr['deldateline'] = $setarr['deldateline']; $infoarr['isdelete'] = $setarr['isdelete']; //数据放入回收站表 - if(C::t('resources_recyle')->insert_data($infoarr)){ + if (C::t('resources_recyle')->insert_data($infoarr)) { $dels[] = $rid; - }else{//放入回收站失败处理 - DB::update($this->table,array('isdelete'=>0,'deldateline'=>0),array('rid'=>$rid)); + } else {//放入回收站失败处理 + DB::update($this->table, array('isdelete' => 0, 'deldateline' => 0, 'pfid' => $infoarr['pfid']), array('rid' => $rid)); } } } - //删除的文件取消收藏 - //C::t('resources_collect')->delete_by_rid($dels); + return $dels; } - /*返回1,正常删除,需删除附属表数据,返回2,非删除状态内容,只删除回收站表数据,返回3删除失败 - * */ - public function deletesourcedata($resource){ - $type=$resource['type']; - $oid=$resource['oid']; - $isdelete = $resource['isdelete']; - //如果当前数据非删除状态,并且不是文件夹则只删除回收站数据,不删除该数据 - if($isdelete < 1 && $type != 'folder'){ - return 2; - }elseif($isdelete > 0 && $type != 'folder'){ - $pfid = $resource['pfid']; - $paths = C::t('resources_path')->fetch_pathby_pfid($pfid,true); - $pathkey = $paths['pathkey']; - $fids = explode('-',str_replace('_','',$pathkey)); - unset($fids[0]); - $fids = array_reverse($fids); - $pfids = array(); - foreach(DB::fetch_all("select rid,oid from %t where oid in(%n) order by oid desc",array($this->_table,$fids)) as $v){ - $pfids[$v['oid']] = $v['rid']; - } - foreach($pfids as $k=>$v){ - if(!DB::result_first("select count(*) from %t where pfid = %d and rid <> %s",array('resources',$k,$resource['rid'])) - && DB::result_first("select isdelete from %t where fid = %d ",array('folder',$k))>0 - && !DB::result_first("select count(*) from %t where rid = %s",array('resources_recyle',$v))){ - parent::delete($v); - C::t('folder')->delete($k); - }else{ - break; - } - } - return 1; - } - switch($type){ + /*返回1,正常删除,需删除附属表数据,返回2,非删除状态内容,只删除回收站表数据,返回3删除失败 + *$force=>是否彻底删除(即是否强制删除非删除状态文件) + * */ + public function deletesourcedata($resource, $force = false) + { + $type = $resource['type']; + $oid = $resource['oid']; + switch ($type) { case 'folder': - return C::t('folder')->delete_by_fid($oid,$resource['rid'],$isdelete); + return C::t('folder')->delete_by_fid($oid, $force); case 'link': - C::t('collect')->delete_by_cid($oid); + C::t('collect')->delete_by_cid($oid); return 1; case 'app': return 1; @@ -286,17 +272,24 @@ class table_resources extends dzz_table return 1; case 'storage': return 1; - default : C::t('attachment')->addcopy_by_aid($resource['aid'],-1); + default : + if(!$resource['vid']){ + C::t('attachment')->addcopy_by_aid($resource['aid'], -1); + } return 1; } } - public function delete_by_rid($rid){ //删除图标 + + public function delete_by_rid($rid, $force = false) + { //删除图标 global $_G; - $data=self::fetch_by_rid($rid); - if(!$this->noperm && !perm_check::checkperm('delete',$data)){ return array('error'=>lang('no_privilege'));} - $status = self::deletesourcedata($data); + $data = self::fetch_by_rid($rid); + if (!perm_check::checkperm('delete', $data)) { + return array('error' => lang('no_privilege')); + } + $status = self::deletesourcedata($data, $force); //删除相关数据 - if($status == 1){ + if ($status == 1) { //刪除属性表数据 C::t('resources_attr')->delete_by_rid($rid); //删除事件表数据 @@ -306,228 +299,245 @@ class table_resources extends dzz_table //删除回收站数据 C::t('resources_recyle')->delete_by_rid($rid); //删除版本表数据 - if($data['vid']){ - C::t('resources_version')->delete_by_rid($rid,$data); - }else{ + if ($data['vid']) { + C::t('resources_version')->delete_by_rid($rid); + }/* else { //空间计算移动至版本表 - if($data['size']) SpaceSize(-$data['size'],$data['gid'],1,$data['uid']); - } + if ($data['size']) SpaceSize(-$data['size'], $data['gid'], 1, $data['uid']); + }*/ //删除收藏表数据 C::t('resources_collect')->delete_by_rid($rid); //删除统计表数据 C::t('resources_statis')->delete_by_rid($rid); //删除resources表数据 - if(self::delete($rid) ){ + if (self::delete($rid)) { //记录删除事件 - $hash = C::t('resources_event')->get_showtpl_hash_by_gpfid($data['pfid'],$data['gid']); - $eventdata = array('username'=>$_G['username'],'position'=>$data['relpath'],'filename'=>$data['name'],'hash'=>$hash); - C::t('resources_event')->addevent_by_pfid($data['pfid'],'finallydel_file','finallydelete',$eventdata,$data['gid'],$rid,$data['name']); - return $data; - }else{ + $hash = C::t('resources_event')->get_showtpl_hash_by_gpfid($data['pfid'], $data['gid']); + $eventdata = array('username' => $_G['username'], 'position' => $data['relpath'], 'filename' => $data['name'], 'hash' => $hash); + C::t('resources_event')->addevent_by_pfid($data['pfid'], 'finallydel_file', 'finallydelete', $eventdata, $data['gid'], $rid, $data['name']); + return true; + } else { return false; } - }elseif($status == 2){ + } elseif ($status == 2) { //删除回收站数据 C::t('resources_recyle')->delete_by_rid($rid); - }else{ + } else { return false; } } - public function getsourcedata($rid){ + + public function getsourcedata($rid) + { //查询索引表数据 $resourcedata = array(); - if(!$resourcedata=self::fetch($rid)){ + if (!$resourcedata = self::fetch($rid)) { return array(); } - //查询文件夹信息 - if($resourcedata['type']=='folder'){ - $folder=C::t('folder')->fetch_by_fid($resourcedata['oid']); - $resourcedata=array_merge($resourcedata,$folder); + //查询文件夹信息 + if ($resourcedata['type'] == 'folder') { + $folder = C::t('folder')->fetch_by_fid($resourcedata['oid']); + $resourcedata = array_merge($resourcedata, $folder); $folderattr = C::t('folder_attr')->fetch_all_folder_setting_by_fid($resourcedata['oid']); - $resourcedata=array_merge($resourcedata,$folderattr); - } + $resourcedata = array_merge($resourcedata, $folderattr); + } //查询文件路径 - if($path= C::t('resources_path')->fetch_pathby_pfid($resourcedata['pfid'])){ - $resourcedata['path'] = ($resourcedata['type'] == 'folder') ? $path.$resourcedata['name'].'/':$path.$resourcedata['name']; + if ($path = C::t('resources_path')->fetch_pathby_pfid($resourcedata['pfid'])) { + $resourcedata['path'] = ($resourcedata['type'] == 'folder') ? $path . $resourcedata['name'] . '/' : $path . $resourcedata['name']; } $vdata = array(); - if($resourcedata['vid'] > 0){ + if ($resourcedata['vid'] > 0) { $vdata = C::t('resources_version')->fetch($resourcedata['vid']); } $versiondata = array(); - if($vdata){ + if ($vdata) { $versiondata = array( /*'aid'=>$vdata['aid'], 'name'=>$vdata['vname'], 'size'=>$vdata['size'],*/ - 'dateline'=>$vdata['dateline'],//文件修改时间 + 'dateline' => $vdata['dateline'],//文件修改时间 /*'ext'=>$vdata['ext'], 'type'=>$vdata['type']*/ ); } //查询文件属性信息 - $attrdata = C::t('resources_attr')->fetch_by_rid($rid,$resourcedata['vid']); - $resourcedata = array_merge($resourcedata,$attrdata); + $attrdata = C::t('resources_attr')->fetch_by_rid($rid, $resourcedata['vid']); + $resourcedata = array_merge($resourcedata, $attrdata); - $resourcedata = array_merge($resourcedata,$versiondata); + $resourcedata = array_merge($resourcedata, $versiondata); - if($resourcedata['aid']){//查询附件数据 - $attachment=C::t('attachment')->fetch($resourcedata['aid']); + if ($resourcedata['aid']) {//查询附件数据 + $attachment = C::t('attachment')->fetch($resourcedata['aid']); //附件表上传时间和文件创建时间字段名称冲突 $attachment['olddateline'] = $attachment['dateline']; unset($attachment['dateline']); - $resourcedata = array_merge($resourcedata,$attachment); + $resourcedata = array_merge($resourcedata, $attachment); } return $resourcedata; } - public function fetch_by_rid($rid,$force_from_db=false){ //返回一条数据同时加载资源表数据 + + public function fetch_by_rid($rid, $force_from_db = false) + { //返回一条数据同时加载资源表数据 global $_G; $data = array(); - if(!$data = self::getsourcedata($rid)){ + if (!$data = self::getsourcedata($rid)) { return array(); } - $data['size']=isset($data['size'])?$data['size']:0; - if($data['type']=='image'){ - $data['img']=DZZSCRIPT.'?mod=io&op=thumbnail&size=small&path='.dzzencode('attach::'.$data['aid']); - $data['url']=DZZSCRIPT.'?mod=io&op=thumbnail&size=large&path='.dzzencode('attach::'.$data['aid']); - }elseif($data['type']=='attach' || $data['type']=='document'){ - $data['img']=geticonfromext($data['ext'],$data['type']); - //$data['img']=DZZSCRIPT.'?mod=io&op=thumbnail&size=small&path='.dzzencode('attach::'.$data['aid']); - $data['url']=DZZSCRIPT.'?mod=io&op=getStream&path='.dzzencode('attach::'.$data['aid']); - }elseif($data['type']=='shortcut'){ + $data['size'] = isset($data['size']) ? $data['size'] : 0; + if ($data['type'] == 'image') { + $data['img'] = DZZSCRIPT . '?mod=io&op=thumbnail&size=small&path=' . dzzencode('attach::' . $data['aid']); + $data['url'] = DZZSCRIPT . '?mod=io&op=thumbnail&size=large&path=' . dzzencode('attach::' . $data['aid']); + } elseif ($data['type'] == 'attach' || $data['type'] == 'document') { + $data['img'] = geticonfromext($data['ext'], $data['type']); + //$data['img']=DZZSCRIPT.'?mod=io&op=thumbnail&size=small&path='.dzzencode('attach::'.$data['aid']); + $data['url'] = DZZSCRIPT . '?mod=io&op=getStream&path=' . dzzencode('attach::' . $data['aid']); + } elseif ($data['type'] == 'shortcut') { //$data['img']=isset($data['tdata']['img'])?$data['tdata']['img']:geticonfromext($data['tdata']['ext'],$data['tdata']['type']); - $data['ttype']=$data['tdata']['type']; - $data['ext']=$data['tdata']['ext']; - }elseif($data['type']=='dzzdoc'){ - $data['url']=DZZSCRIPT.'?mod=document&icoid='.dzzencode('attach::'.$data['aid']); - $data['img']=isset($data['img'])?$data['img']:geticonfromext($data['ext'],$data['type']); - }elseif($data['type'] == 'folder'){ - $contaions = self::get_contains_by_fid($data['oid'],true); - $relativepath = str_replace(':','',strrchr($data['path'],':')); - $data['position'] = substr($relativepath,0,strlen($relativepath)-1); + $data['ttype'] = $data['tdata']['type']; + $data['ext'] = $data['tdata']['ext']; + } elseif ($data['type'] == 'dzzdoc') { + $data['url'] = DZZSCRIPT . '?mod=document&icoid=' . dzzencode('attach::' . $data['aid']); + $data['img'] = isset($data['img']) ? $data['img'] : geticonfromext($data['ext'], $data['type']); + } elseif ($data['type'] == 'folder') { + $contaions = self::get_contains_by_fid($data['oid'], true); + $data['contaions'] = $contaions; + $relativepath = str_replace(':', '', strrchr($data['path'], ':')); + $data['position'] = substr($relativepath, 0, strlen($relativepath) - 1); $data['fsize'] = formatsize($contaions['size']); - $data['ffsize']=lang('property_info_size',array('fsize'=>formatsize($contaions['size']),'size'=>$contaions['size'])); - $data['contain']=lang('property_info_contain',array('filenum'=>$contaions['contain'][0],'foldernum'=>$contaions['contain'][1])); + $data['ffsize'] = lang('property_info_size', array('fsize' => formatsize($contaions['size']), 'size' => $contaions['size'])); + $data['contain'] = lang('property_info_contain', array('filenum' => $contaions['contain'][0], 'foldernum' => $contaions['contain'][1])); $data['img'] = '/dzz/images/extimg/folder.png'; - }else{ - $data['img']=isset($data['img'])?$data['img']:geticonfromext($data['ext'],$data['type']); + } else { + $data['img'] = isset($data['img']) ? $data['img'] : geticonfromext($data['ext'], $data['type']); } - if($data['appid']) { + if ($data['appid']) { $imgs = C::t('app_market')->fetch_appico_by_appid($data['appid']); - $data['img'] = ($imgs) ? 'data/attachment/'.$imgs : geticonfromext($data['ext'], $data['type']); + $data['img'] = ($imgs) ? 'data/attachment/' . $imgs : geticonfromext($data['ext'], $data['type']); } - if(empty($data['name'])) $data['name']=$data['title']; - $data['url']=isset($data['url'])?replace_canshu($data['url']):''; - $data['ftype']=getFileTypeName($data['type'],$data['ext']); - $data['fdateline']=dgmdate($data['dateline'],'Y-m-d H:i:s'); - $data['fsize']=formatsize($data['size']); - $data['ffsize']=lang('property_info_size',array('fsize'=>formatsize($data['size']),'size'=>$data['size'])); - $data['relativepath'] = $data['path'] ? $data['path']:''; - $data['relpath'] = dirname(preg_replace('/dzz:(.+?):/','',$data['relativepath'])).'/'; - $data['dpath']=dzzencode($data['rid']); - $data['path']=$data['rid']; - $data['bz']=''; + if (empty($data['name'])) $data['name'] = $data['title']; + $data['url'] = isset($data['url']) ? replace_canshu($data['url']) : ''; + $data['ftype'] = getFileTypeName($data['type'], $data['ext']); + $data['fdateline'] = dgmdate($data['dateline'], 'Y-m-d H:i:s'); + $data['fsize'] = formatsize($data['size']); + $data['ffsize'] = lang('property_info_size', array('fsize' => formatsize($data['size']), 'size' => $data['size'])); + $data['relativepath'] = $data['path'] ? $data['path'] : ''; + $data['relpath'] = dirname(preg_replace('/dzz:(.+?):/', '', $data['relativepath'])) . '/'; + $data['path'] = $data['rid']; + $data['bz'] = ''; $data['collect'] = C::t('resources_collect')->fetch_by_rid($rid); - if($data['remote']>1) $data['rbz']=io_remote::getBzByRemoteid($data['remote']); + if ($data['remote'] > 1) $data['rbz'] = io_remote::getBzByRemoteid($data['remote']); //增加安全相关的路径 - $data['dpath']=dzzencode($data['path']); - $data['apath']=$data['aid']?dzzencode('attach::'.$data['aid']):$data['dpath']; - if(!$data['sperm']) $data['sperm']=perm_FileSPerm::typePower($data['type'],$data['ext']); - Hook::listen('filter_resource_rid',$data);//数据过滤挂载点 + $data['dpath'] = dzzencode($data['path']); + $data['apath'] = $data['aid'] ? dzzencode('attach::' . $data['aid']) : $data['dpath']; + if (!$data['sperm']) $data['sperm'] = perm_FileSPerm::typePower($data['type'], $data['ext']); + Hook::listen('filter_resource_rid', $data);//数据过滤挂载点 return $data; } + //查询群组id - public function fetch_gid_by_rid($rid){ - return DB::result_first("select gid from %t where rid = %d",array($this->_table,$rid)); + public function fetch_gid_by_rid($rid) + { + return DB::result_first("select gid from %t where rid = %d", array($this->_table, $rid)); } + //查询多个文件右侧信息 - public function fetch_rightinfo_by_rid($rids){ - if(!is_array($rids)) $rids = (array)$rids; + public function fetch_rightinfo_by_rid($rids) + { + if (!is_array($rids)) $rids = (array)$rids; $fileinfo = array(); - $contains=array('size'=>0,'contain'=>array(0,0)); - foreach(DB::fetch_all("select * from %t where rid in(%n)",array($this->_table,$rids)) as $value){ + $contains = array('size' => 0, 'contain' => array(0, 0)); + foreach (DB::fetch_all("select * from %t where rid in(%n)", array($this->_table, $rids)) as $value) { $contains['size'] += $value['size']; - if($value['type']=='folder'){ - $contains['contain'][1]+=1; + if ($value['type'] == 'folder') { + $contains['contain'][1] += 1; $containchild = ''; - $containchild = $this->get_contains_by_fid($value['oid'],true); - if(!empty($containchild)){ + $containchild = $this->get_contains_by_fid($value['oid'], true); + if (!empty($containchild)) { $contains['contain'][1] += $containchild['contain'][1]; $contains['contain'][0] += $containchild['contain'][0]; $contains['size'] += $containchild['size']; } - }else{ - $contains['contain'][0]+=1; + } else { + $contains['contain'][0] += 1; } - if(!isset($fileinfo['path'])){ - $path= C::t('resources_path')->fetch_pathby_pfid($value['pfid']); - $fileinfo['position'] = preg_replace('/dzz:(.+?):/','',$path); + if (!isset($fileinfo['path'])) { + $path = C::t('resources_path')->fetch_pathby_pfid($value['pfid']); + $fileinfo['position'] = preg_replace('/dzz:(.+?):/', '', $path); } } - $fileinfo['ffsize']=lang('property_info_size',array('fsize'=>formatsize($contains['size']),'size'=>$contains['size'])); - $fileinfo['contain']=lang('property_info_contain',array('filenum'=>$contains['contain'][0],'foldernum'=>$contains['contain'][1])); + $fileinfo['ffsize'] = lang('property_info_size', array('fsize' => formatsize($contains['size']), 'size' => $contains['size'])); + $fileinfo['contain'] = lang('property_info_contain', array('filenum' => $contains['contain'][0], 'foldernum' => $contains['contain'][1])); $fileinfo['filenum'] = count($rids); return $fileinfo; } + //查询目录文件数,$getversion =>是否获取版本数据 - public function get_contains_by_fid($fid,$getversion = true){ - $contains=array('size'=>0,'contain'=>array(0,0)); + public function get_contains_by_fid($fid, $getversion = true) + { + $contains = array('size' => 0, 'contain' => array(0, 0)); $pfids = C::t('resources_path')->fetch_folder_containfid_by_pfid($fid); - foreach(DB::fetch_all("select r.rid,r.vid,r.size as primarysize,r.type,r.pfid,v.size from %t r - left join %t v on r.rid=v.rid where r.pfid in (%n) and r.isdelete < 1",array($this->_table,'resources_version',$pfids)) as $v){ - if(!isset($resluts[$v['rid']]) ){ + foreach (DB::fetch_all("select r.rid,r.vid,r.size as primarysize,r.type,r.pfid,v.size from %t r + left join %t v on r.rid=v.rid where r.pfid in (%n) and r.isdelete < 1", array($this->_table, 'resources_version', $pfids)) as $v) { + if (!isset($resluts[$v['rid']])) { $resluts[$v['rid']] = $v; - }else{ + } else { $resluts[$v['rid']]['size'] += intval($v['size']); } - } - foreach($resluts as $value){ - if($getversion){ - $contains['size'] += ($value['size'] > 0) ? $value['size']:$value['primarysize']; - }else{ + } + foreach ($resluts as $value) { + if ($getversion) { + $contains['size'] += ($value['size'] > 0) ? $value['size'] : $value['primarysize']; + } else { $contains['size'] += $value['primarysize']; } - if($value['type']=='folder' && $fid != $value['oid']){ - $contains['contain'][1]+=1; - }else{ - $contains['contain'][0]+=1; + if ($value['type'] == 'folder' && $fid != $value['oid']) { + $contains['contain'][1] += 1; + } else { + $contains['contain'][0] += 1; } } return $contains; } + //查询文件对应的rid - public function fetch_rid_by_fid($fid){ - return DB::result_first("select rid from %t where oid = %d and `type` = 'folder' ",array($this->_table,$fid)); + public function fetch_rid_by_fid($fid) + { + return DB::result_first("select rid from %t where oid = %d and `type` = 'folder' ", array($this->_table, $fid)); } + //查询文件夹对应的fid - public function fetch_fid_by_rid($rid){ - return DB::result_first("select oid from %t where rid = %s and `type` = %s",array($this->_table,$rid,'folder')); + public function fetch_fid_by_rid($rid) + { + return DB::result_first("select oid from %t where rid = %s and `type` = %s", array($this->_table, $rid, 'folder')); } + //获取文件夹基本信息 - public function get_folderinfo_by_fid($fid){ - if(!$folderinfo = C::t('folder')->fetch($fid)) return false; - $contaions = self::get_contains_by_fid($fid,true); - $folderinfo['ffsize']=lang('property_info_size',array('fsize'=>formatsize($contaions['size']),'size'=>$contaions['size'])); - $folderinfo['contain']=lang('property_info_contain',array('filenum'=>$contaions['contain'][0],'foldernum'=>$contaions['contain'][1])); - $path= C::t('resources_path')->fetch_pathby_pfid($fid); - $folderinfo['position'] = preg_replace('/dzz:(.+?):/','',$path); - $folderinfo['fdateline'] = dgmdate($folderinfo['dateline'],'Y-m-d H:i:s'); - $folderinfo['isgroup'] = ($folderinfo['flag'] == 'organization') ? true:false; + public function get_folderinfo_by_fid($fid) + { + if (!$folderinfo = C::t('folder')->fetch($fid)) return false; + $contaions = self::get_contains_by_fid($fid, true); + $folderinfo['ffsize'] = lang('property_info_size', array('fsize' => formatsize($contaions['size']), 'size' => $contaions['size'])); + $folderinfo['contain'] = lang('property_info_contain', array('filenum' => $contaions['contain'][0], 'foldernum' => $contaions['contain'][1])); + $path = C::t('resources_path')->fetch_pathby_pfid($fid); + $folderinfo['position'] = preg_replace('/dzz:(.+?):/', '', $path); + $folderinfo['fdateline'] = dgmdate($folderinfo['dateline'], 'Y-m-d H:i:s'); + $folderinfo['isgroup'] = ($folderinfo['flag'] == 'organization') ? true : false; return $folderinfo; } //查詢文件夹下文件信息 - public function fetch_folderinfo_by_pfid($fid){ + public function fetch_folderinfo_by_pfid($fid) + { global $_G; - if($fid){ - if($folder=C::t('folder')->fetch($fid)) { + if ($fid) { + if ($folder = C::t('folder')->fetch($fid)) { $where1 = array(); - if (!$this->noperm && $folder['gid'] > 0) { + if ($folder['gid'] > 0) { $folder['perm'] = perm_check::getPerm($folder['fid']); if ($folder['perm'] > 0) { if (perm_binPerm::havePower('read2', $folder['perm'])) { @@ -544,152 +554,187 @@ class table_resources extends dzz_table } else { $temp[] = " uid='{$_G[uid]}'"; } - $where[]='('.implode(' and ',$temp).')'; + $where[] = '(' . implode(' and ', $temp) . ')'; unset($temp); } $wheresql = ""; - if($where) $wheresql .= implode(' AND ',$where); + if ($where) $wheresql .= implode(' AND ', $where); - return DB::fetch_all("select * from %t where pfid = %d and isdelete = 0 and $wheresql",array($this->_table,$fid)); + return DB::fetch_all("select * from %t where pfid = %d and isdelete = 0 and $wheresql", array($this->_table, $fid)); } } - public function fetch_all_by_pfid($pfid,$name='',$limit=0,$orderby='',$order='',$start=0,$count=false){ + + public function fetch_all_by_pfid($pfid, $conditions=array(), $limit = 0, $orderby = '', $order = '', $start = 0, $count = false) + { global $_G; $limitsql = $limit ? DB::limit($start, $limit) : ''; - $data=array(); - $wheresql=''; - $where=array(); - $para=array($this->_table); - $where[]=' isdelete < 1 '; - if($name){ - $where[]='name like %s'; - $para[]='%'.$name.'%'; + $data = array(); + $wheresql = ' 1 '; + $where = array(); + $para = array($this->_table); + $where[] = ' isdelete < 1 '; + $mustdition = ''; + //解析搜索条件 + if ($conditions && is_string($conditions)) {//字符串条件语句 + $wheresql .= $conditions; + } elseif (is_array($conditions)) { + foreach ($conditions as $k => $v) { + if (!is_array($v)) { + if($k == 'mustdition'){ + $mustdition = $v; + }else{ + $connect = 'and'; + $wheresql .= $connect . ' `' . $k . "` = '" . $v . "' "; + } + } else { + $relative = isset($v[1]) ? $v[1] : '='; + $connect = isset($v[2]) ? $v[2] : 'and'; + if ($relative == 'in') { + $wheresql .= $connect . " `" . $k . "` " . $relative . " (" . dimplode($v[0]) . ") "; + } elseif ($relative == 'stringsql') { + $wheresql .= $connect . " " . $v[0] . " "; + } elseif ($relative == 'like') { + $wheresql .= $connect . " " . $k . " like %s "; + $para[] = '%' . $v[0] . '%'; + } else { + $wheresql .= $connect . " `" . $k . "` " . $relative . " '". $v[0] . "' "; + } + } + } } - - if(is_array($pfid)){ - $arr=array(); - foreach($pfid as $fid){ - $temp=array('pfid = %d'); - $para[]=$fid; - if($folder=C::t('folder')->fetch($fid)){ - $where1=array(); - if($folder['gid']>0 ){ - $folder['perm']=perm_check::getPerm($folder['fid']); - if($folder['perm']>0){ - if(perm_binPerm::havePower('read2',$folder['perm'])){ + if (is_array($pfid)) { + $arr = array(); + foreach ($pfid as $fid) { + $temp = array('pfid = %d'); + $para[] = $fid; + if ($folder = C::t('folder')->fetch($fid)) { + $where1 = array(); + if ($folder['gid'] > 0) { + $folder['perm'] = perm_check::getPerm($folder['fid']); + if ($folder['perm'] > 0) { + if (perm_binPerm::havePower('read2', $folder['perm'])) { //$where1[]="uid!='{$_G[uid]}'"; //原来查询思路,read2只能查询其他人建立文件 - $where1[]="1"; - }elseif(perm_binPerm::havePower('read1',$folder['perm'])){ - $where1[]="uid='{$_G[uid]}'"; + $where1[] = "1"; + } elseif (perm_binPerm::havePower('read1', $folder['perm'])) { + $where1[] = "uid='{$_G[uid]}'"; } } $where1 = array_filter($where1); - if(!empty($where1)) $temp[]="(".implode(' OR ' ,$where1).")"; - else $temp[]="0"; - }else{ - $temp[]=" uid='{$_G[uid]}'"; + if (!empty($where1)) $temp[] = "(" . implode(' OR ', $where1) . ")"; + else $temp[] = "0"; + } else { + $temp[] = " uid='{$_G[uid]}'"; } } - $arr[]='('.implode(' and ',$temp).')'; + $arr[] = '(' . implode(' and ', $temp) . ')'; unset($temp); } - if($arr) $where[]='('.implode(' OR ',$arr).')'; - }elseif($pfid){ - $temp=array('pfid= %d'); - $para[]=$pfid; - if($folder=C::t('folder')->fetch($pfid)){ - $where1=array(); - if(!$this->noperm && $folder['gid']>0 ){ - $folder['perm']=perm_check::getPerm($folder['fid']); - if($folder['perm']>0){ - if(perm_binPerm::havePower('read2',$folder['perm'])){ + if ($arr) $where[] = '(' . implode(' OR ', $arr) . ')'; + } elseif ($pfid) { + $temp = array('pfid= %d'); + $para[] = $pfid; + if ($folder = C::t('folder')->fetch($pfid)) { + $where1 = array(); + if ($folder['gid'] > 0) { + $folder['perm'] = perm_check::getPerm($folder['fid']); + if ($folder['perm'] > 0) { + if (perm_binPerm::havePower('read2', $folder['perm'])) { //$where1[]="uid!='{$_G[uid]}'"; //原来查询思路,read2只能查询其他人建立文件 - $where1[]="1 = 1"; - }elseif(perm_binPerm::havePower('read1',$folder['perm'])){ - $where1[]="uid='{$_G[uid]}'"; + $where1[] = "1 = 1"; + } elseif (perm_binPerm::havePower('read1', $folder['perm'])) { + $where1[] = "uid='{$_G[uid]}'"; } } $where1 = array_filter($where1); - if($where1) $temp[]="(".implode(' OR ' ,$where1).")"; - else $temp[]="0"; - }else{ - $temp[]=" uid='{$_G[uid]}'"; + if ($where1) $temp[] = "(" . implode(' OR ', $where1) . ")"; + else $temp[] = "0"; + } else { + $temp[] = " uid='{$_G[uid]}'"; } } - $where[]='('.implode(' and ',$temp).')'; + $where[] = '(' . implode(' and ', $temp) . ')'; unset($temp); } - if($where) $wheresql='WHERE '.implode(' AND ',$where); - else return false; - if($count) return DB::result_first("SELECT COUNT(*) FROM %t $wheresql ", $para); - $ordersql=''; - if(is_array($orderby)){ - foreach($orderby as $key=>$value){ - $orderby[$key]=$value.' '.$order; + if($mustdition) $wheresql = '('.$wheresql .$mustdition.')'; + if ($where) $wheresql .= ' and ' . implode(' AND ', $where); + if ($count) return DB::result_first("SELECT COUNT(*) FROM %t $wheresql ", $para); + $ordersql = ''; + if (is_array($orderby)) { + foreach ($orderby as $key => $value) { + $orderby[$key] = $value . ' ' . $order; } - $ordersql=' ORDER BY '.implode(',',$orderby); - }elseif($orderby){ - $ordersql=' ORDER BY '.$orderby.' '.$order; + $ordersql = ' ORDER BY ' . implode(',', $orderby); + } elseif ($orderby) { + $ordersql = ' ORDER BY ' . $orderby . ' ' . $order; } - foreach(DB::fetch_all("SELECT rid FROM %t $wheresql $ordersql $limitsql", $para) as $value){ - if($arr=self::fetch_by_rid($value['rid'])) $data[$value['rid']]=$arr; + foreach (DB::fetch_all("SELECT rid FROM %t where $wheresql $ordersql $limitsql", $para) as $value) { + if ($arr = self::fetch_by_rid($value['rid'])) $data[$value['rid']] = $arr; } return $data; } //查询群组下的文件、文件夹信息 - public function fetch_all_by_gid($gid){ + public function fetch_all_by_gid($gid) + { $gid = intval($gid); - if($folderinfo = C::t('folder')->fetch_folderinfo_by_gid($gid)){ + if ($folderinfo = C::t('folder')->fetch_folderinfo_by_gid($gid)) { return self::fetch_by_pfid($folderinfo['fid']); - } + } } + //查询目录下所有文件基本信息 - public function fetch_basicinfo_by_pfid($pfid){ + public function fetch_basicinfo_by_pfid($pfid) + { $pfid = intval($pfid); - return DB::fetch_all("select * from %t where pfid = %d",array($this->_table,$pfid)); + return DB::fetch_all("select * from %t where pfid = %d", array($this->_table, $pfid)); } + //查询目录下的文件信息 - public function fetch_by_pfid($pfid,$uid=''){ + public function fetch_by_pfid($pfid, $uid = '',$checkperm = true) + { $currentuid = getglobal('uid'); $pfid = intval($pfid); $where = " pfid = %d"; - $param = array($this->_table,$pfid); + $param = array($this->_table, $pfid); $datainfo = array(); - if($uid){ + if ($uid) { $where .= " and uid = %d"; $param[] = $uid; } $path = C::t('resources_path')->fetch_pathby_pfid($pfid); - foreach(DB::fetch_all("select * from %t where $where and isdelete < 1 order by dateline desc",$param) as $k=>$value){ - if($value['type'] == 'folder'){ - $value['path'] = $path.$value['name'].'/';//路径 - if(!$this->noperm && $value['uid'] == $currentuid && !perm_check::checkperm_Container($value['oid'],'read1')){ - continue; - }elseif(!$this->noperm &&!perm_check::checkperm_Container($value['oid'],'read2')){ - continue; + foreach (DB::fetch_all("select * from %t where $where and isdelete < 1 order by dateline desc", $param) as $k => $value) { + if ($value['type'] == 'folder') { + $value['path'] = $path . $value['name'] . '/';//路径 + if($checkperm){ + if ($value['uid'] == $currentuid && !perm_check::checkperm_Container($value['oid'], 'read1')) { + continue; + } elseif (!perm_check::checkperm_Container($value['oid'], 'read2')) { + continue; + } } - }else{ - $value['path'] = $path.$value['name'];//路径 - if(!$this->noperm &&$value['uid'] == $currentuid && !perm_check::checkperm_Container($value['pfid'],'read1')){ - continue; - }elseif(!$this->noperm &&!perm_check::checkperm_Container($value['pfid'],'read2')){ - continue; + } else { + if($checkperm){ + $value['path'] = $path . $value['name'];//路径 + if ($value['uid'] == $currentuid && !perm_check::checkperm_Container($value['pfid'], 'read1')) { + continue; + } elseif (!perm_check::checkperm_Container($value['pfid'], 'read2')) { + continue; + } } } - $data = C::t('resources_attr')->fetch_by_rid($value['rid'],$value['vid']); + $data = C::t('resources_attr')->fetch_by_rid($value['rid'], $value['vid']); $data['collect'] = C::t('resources_collect')->fetch_by_rid($value['rid']); $datainfo[$k] = $value; - $datainfo[$k] = array_merge($datainfo[$k],$data); - if(!isset($datainfo[$k]['img'])){ - if($datainfo[$k]['type'] == 'folder'){ + $datainfo[$k] = array_merge($datainfo[$k], $data); + if (!isset($datainfo[$k]['img'])) { + if ($datainfo[$k]['type'] == 'folder') { $datainfo[$k]['img'] = '/dzz/images/extimg/folder.png'; - }elseif($datainfo[$k]['type'] == 'image'){ - $datainfo[$k]['img'] = DZZSCRIPT.'?mod=io&op=thumbnail&size=small&path='.dzzencode('attach::'.$datainfo[$k]['aid']); - }else{ - $datainfo[$k]['img'] = '/dzz/images/extimg/'.$datainfo[$k]['ext'].'.png'; + } elseif ($datainfo[$k]['type'] == 'image') { + $datainfo[$k]['img'] = DZZSCRIPT . '?mod=io&op=thumbnail&size=small&path=' . dzzencode('attach::' . $datainfo[$k]['aid']); + } else { + $datainfo[$k]['img'] = '/dzz/images/extimg/' . $datainfo[$k]['ext'] . '.png'; } } $datainfo[$k]['taginfo'] = C::t('resources_tag')->fetch_tag_by_rid($value['rid']); @@ -698,247 +743,145 @@ class table_resources extends dzz_table } return $datainfo; } - public function update_by_rid($rid,$setarr){ - if(DB::update($this->_table,$setarr,"rid = '{$rid}'")){ + + public function update_by_rid($rid, $setarr) + { + if (DB::update($this->_table, $setarr, "rid = '{$rid}'")) { return true; - }else{ + } else { return false; } } + //查询某目录下的所有文件夹 - public function fetch_folder_by_pfid($fid,$numselect = false){ - - return DB::fetch_all("select * from %t where pfid = %d and `type` = %s and isdelete < 1 ",array($this->_table,$fid,'folder')); - } - public function fetch_folder_num_by_pfid($fid){ - return DB::result_first("select count(*) from %t where pfid = %d and `type` = %s and deldateline < 1",array($this->_table,$fid,'folder')); - } - //根据条件检索文件 - public function searchFile($pfid,$start = 0,$limit = 0,$condition=array(),$order='',$orderby='') + public function fetch_folder_by_pfid($fid, $numselect = false) { - $uid = getglobal('uid'); - $data = array(); - $limitsql = $limit ? DB::limit($start, $limit) : ''; - $wheresql = ' where 1 '; - $params=array($this->_table); - //解析搜索条件 - if ($condition && is_string($condition)) {//字符串条件语句 - $wheresql .= $condition; - } elseif (is_array($condition)) { - foreach ($condition as $k => $v) { - if (!is_array($v)) { - $connect = 'and'; - $wheresql .= $connect . ' `' . $k . "` = '" . $v . "' "; - } else { - $relative = isset($v[1]) ? $v[1] : '='; - $connect = isset($v[2]) ? $v[2] : 'and'; - if ($relative == 'in') { - $wheresql .= $connect . " `" . $k . "` " . $relative . " (" . $v[0] . ") "; - } elseif($relative == 'stringsql'){ - $wheresql .= $connect." ".$v[0]." "; - }elseif($relative == 'like'){ - $wheresql .= $connect." ".$k." like %s "; - $params[] = '%' . $v[0] . '%'; - }else { - $wheresql .= $connect . ' `' . $k . '` ' . $relative . ' ' . $v[0] . ' '; - } - } - } - } - - $pfid = (!is_array($pfid)) ? (array)$pfid:$pfid; - if($pfid){ - $arr=array(); - foreach($pfid as $fid){ - $temp=array('pfid = %d'); - $params[]=$fid; - if($folder=C::t('folder')->fetch($fid)){ - $where1=array(); - if(!$this->noperm && $folder['gid']>0 ){ - $folder['perm']=perm_check::getPerm($folder['fid']); - if($folder['perm']>0){ - if(perm_binPerm::havePower('read2',$folder['perm'])){ - $where1[]="1"; - }elseif(perm_binPerm::havePower('read1',$folder['perm'])){ - $where1[]="uid='{$uid}'"; - } - - } - $where1 = array_filter($where1); - if(!empty($where1)) $temp[]="(".implode(' OR ' ,$where1).")"; - else $temp[]="0"; - }else{ - $temp[]=" uid='{$uid}'"; - } - } - $arr[]='('.implode(' and ',$temp).')'; - unset($temp); - } - if($arr) $where[]='('.implode(' OR ',$arr).')'; - } - exit($wheresql); - if($where) $wheresql .=' and '.implode(' AND ',$where); - foreach (DB::fetch_all("select rid,pfid,gid,uid,vid from %t $wheresql order by dateline desc $limitsql", $params) as $value) { - if ($arr = self::fetch_by_rid($value['rid'])) $data[] = $arr; - } - return $data; + return DB::fetch_all("select * from %t where pfid = %d and `type` = %s and isdelete < 1 ", array($this->_table, $fid, 'folder')); } - //根据条件查询文件 - public function search($condition='',$limit=0,$orderby='',$order='',$start=0,$count=false){ - global $_G; - $limitsql = $limit ? DB::limit($start, $limit) : ''; - $data=array(); - $wheresql=' where 1 '; - $where=array(); - $para=array($this->_table); - if($condition && is_string($condition)){ - $wheresql .= $condition; - }elseif(is_array($condition)){ - foreach($condition as $k=>$v){ - if(!is_array($v)){ - $connect = 'and'; - $wheresql .= $connect.' '.$k." = ".$v.' '; - }else{ - $relative = isset($v[1]) ? $v[1]:'='; - $connect = isset($v[2]) ? $v[2]:'and'; - if($relative == 'in'){ - $wheresql .= $connect." ".$k." ".$relative." (".$v[0].") "; - }else{ - $wheresql .= $connect.' '.$k.' '.$relative.' '.$v[0].' '; - } - } - } - } - if($count) return DB::result_first("SELECT COUNT(*) FROM %t $wheresql ", $para); - $ordersql=''; - if(is_array($orderby)){ - foreach($orderby as $key=>$value){ - $orderby[$key]=$value.' '.$order; - } - $ordersql=' ORDER BY '.implode(',',$orderby); - }elseif($orderby){ - $ordersql=' ORDER BY '.$orderby.' '.$order; - } - foreach(DB::fetch_all("SELECT rid FROM %t $wheresql $ordersql $limitsql", $para) as $value){ - if($arr=self::fetch_by_rid($value['rid'])) $data[]=$arr; - } - return $data; + public function fetch_folder_num_by_pfid($fid) + { + return DB::result_first("select count(*) from %t where pfid = %d and `type` = %s and deldateline < 1", array($this->_table, $fid, 'folder')); } - public function get_property_by_rid($rids){ + + public function get_property_by_rid($rids) + { global $_G; - $uid = $_G['uid']; + // $uid = $_G['uid']; $wheresql = " where r.rid in(%n) "; - $param = array($this->_table,'folder','resources_path',$rids); - $orgids = C::t('organization')->fetch_all_orgid();//获取所有有管理权限的部门 - $powerarr=perm_binPerm::getPowerArr(); - if(!is_array($rids)) $rids = (array)$rids; - $or=array(); + $param = array($this->_table, 'folder', 'resources_path', $rids); + // $orgids = C::t('organization')->fetch_all_orgid();//获取所有有管理权限的部门 + // $powerarr = perm_binPerm::getPowerArr(); + if (!is_array($rids)) $rids = (array)$rids; + /* $or = array(); //用户自己的文件; - $or[]="(r.gid=0 and r.uid=%d)"; - $param[]=$_G['uid']; + $or[] = "(r.gid=0 and r.uid=%d)"; + $param[] = $_G['uid']; //我管理的群组或部门的文件 - if($orgids['orgids_admin']){ - $or[]="r.gid IN (%n)"; - $param[]=$orgids['orgids_admin']; + if ($orgids['orgids_admin'] && $_G['adminid']!=1) { + $or[] = "r.gid IN (%n)"; + $param[] = $orgids['orgids_admin']; } //我参与的群组的文件 - if($orgids['orgids_member']){ - $or[]="(r.gid IN(%n) and ((f.perm_inherit & %d) OR (r.uid=%d and f.perm_inherit & %d)))"; - $param[]=$orgids['orgids_member']; - $param[]=$powerarr['read2']; - $param[]=$_G['uid']; - $param[]=$powerarr['read1']; + if ($orgids['orgids_member']) { + $or[] = "(r.gid IN(%n) and ((f.perm_inherit & %d) OR (r.uid=%d and f.perm_inherit & %d)))"; + $param[] = $orgids['orgids_member']; + $param[] = $powerarr['read2']; + $param[] = $_G['uid']; + $param[] = $powerarr['read1']; } - if($or) $wheresql .=" and (".implode(' OR ',$or).")"; - if(count($rids) > 1){ + if ($or) $wheresql .= " and (" . implode(' OR ', $or) . ")";*/ + if (count($rids) > 1) { //获取文件基本信息 - $fileinfos = DB::fetch_all("select r.*,f.perm_inherit,p.path from %t r left join %t f on r.pfid = f.fid left join %t p on p.fid = r.pfid $wheresql",$param); - if(!$fileinfos){ - return array('error'=>lang('no_privilege')); + $fileinfos = DB::fetch_all("select r.*,f.perm_inherit,p.path from %t r left join %t f on r.pfid = f.fid left join %t p on p.fid = r.pfid $wheresql", $param); + if (!$fileinfos) { + return array('error' => lang('no_privilege')); } $fileinfo = array(); $tmpinfo = array(); $infos = array(); - foreach ($fileinfos as $v){ + foreach ($fileinfos as $v) { $infos[$v['rid']] = $v; $tmpinfo['rids'][] = $v['rid']; - $tmpinfo['names'][] = $v['name']; + $tmpinfo['names'][] = $v['name']; $tmpinfo['pfid'][] = $v['pfid']; - $tmpinfo['ext'][] = ($v['ext']) ? $v['ext']:$v['type']; + $tmpinfo['ext'][] = ($v['ext']) ? $v['ext'] : $v['type']; $tmpinfo['type'][] = $v['type']; $tmpinfo['username'][] = $v['username']; - $tnpinfo['hascontain'][$v['rid']] = ($v['type'] == 'folder') ? 1:0; + $tnpinfo['hascontain'][$v['rid']] = ($v['type'] == 'folder') ? 1 : 0; $tmpinfo['realpath'][] = $v['path']; } - $fileinfo['ismulti']=count($rids);//是否是多选 - $fileinfo['name']=getstr(implode(',',array_unique($tmpinfo['names'])),60); + $fileinfo['ismulti'] = count($rids);//是否是多选 + $fileinfo['name'] = getstr(implode(',', array_unique($tmpinfo['names'])), 60); //判断文件归属 - $fileinfo['username'] = (count(array_unique($tmpinfo['username'])) > 1) ? lang('more_member_owner'):$tmpinfo['username'][0]; - + $fileinfo['username'] = (count(array_unique($tmpinfo['username'])) > 1) ? lang('more_member_owner') : $tmpinfo['username'][0]; + //判断是否在同一文件夹下 - if(count(array_unique($tmpinfo['pfid'])) > 1){ + if (count(array_unique($tmpinfo['pfid'])) > 1) { $fileinfo['realpath'] = lang('more_folder_position'); - $fileinfo['rid'] = implode(',',$tmpinfo['rids']); - }else{ - $fileinfo['realpath'] = lang('all_positioned').preg_replace('/dzz:(.+?):/','',$tmpinfo['realpath'][0]); - $fileinfo['rid'] = implode(',',$tmpinfo['rids']); + $fileinfo['rid'] = implode(',', $tmpinfo['rids']); + } else { + $fileinfo['realpath'] = lang('all_positioned') . preg_replace('/dzz:(.+?):/', '', $tmpinfo['realpath'][0]); + $fileinfo['rid'] = implode(',', $tmpinfo['rids']); } //判断文件类型是否相同 $judgesecond = false; - if(count(array_unique($tmpinfo['ext'])) > 1){ + if (count(array_unique($tmpinfo['ext'])) > 1) { $fileinfo['type'] = lang('more_file_type'); $judgesecond = true; - }else{ - $fileinfo['type'] = lang('louis_vuitton').$tmpinfo['ext'][0].lang('type_of_file'); + } else { + $fileinfo['type'] = lang('louis_vuitton') . $tmpinfo['ext'][0] . lang('type_of_file'); } - if(in_array('',$tmpinfo['ext']) || $judgesecond){ - if(count(array_unique($tmpinfo['type'])) > 1){ + if (in_array('', $tmpinfo['ext']) || $judgesecond) { + if (count(array_unique($tmpinfo['type'])) > 1) { $fileinfo['type'] = lang('more_file_type'); - }else{ - $fileinfo['type'] = lang('louis_vuitton').$tmpinfo['type'][0].lang('typename_attach'); + } else { + $fileinfo['type'] = lang('louis_vuitton') . $tmpinfo['type'][0] . lang('typename_attach'); } } //文件大小和文件个数信息 - $tmpinfo['contains'] = array('size'=>0,'contain'=>array(0,0)); - foreach($tnpinfo['hascontain'] as $k=>$v){ - if($v){ - $tmpinfo['contains']['contain'][1]+=1; - $childcontains = self::get_contains_by_fid($infos[$k]['oid'],true); - $tmpinfo['contains']['contain'][0]+=$childcontains['contain'][0]; - $tmpinfo['contains']['contain'][1]+=$childcontains['contain'][1]; - $tmpinfo['contains']['size']+=$childcontains['size']; - }else{ - $tmpinfo['contains']['contain'][0]+=1; - $tmpinfo['contains']['size']+=$infos[$k]['size']; + $tmpinfo['contains'] = array('size' => 0, 'contain' => array(0, 0)); + foreach ($tnpinfo['hascontain'] as $k => $v) { + if ($v) { + $tmpinfo['contains']['contain'][1] += 1; + $childcontains = self::get_contains_by_fid($infos[$k]['oid'], true); + $tmpinfo['contains']['contain'][0] += $childcontains['contain'][0]; + $tmpinfo['contains']['contain'][1] += $childcontains['contain'][1]; + $tmpinfo['contains']['size'] += $childcontains['size']; + } else { + $tmpinfo['contains']['contain'][0] += 1; + $tmpinfo['contains']['size'] += $infos[$k]['size']; } } $fileinfo['fsize'] = formatsize($tmpinfo['contains']['size']); - $fileinfo['ffsize']=lang('property_info_size',array('fsize'=>formatsize($tmpinfo['contains']['size']),'size'=>$tmpinfo['contains']['size'])); - $fileinfo['contain']=lang('property_info_contain',array('filenum'=>$tmpinfo['contains']['contain'][0],'foldernum'=>$tmpinfo['contains']['contain'][1])); + $fileinfo['ffsize'] = lang('property_info_size', array('fsize' => formatsize($tmpinfo['contains']['size']), 'size' => $tmpinfo['contains']['size'])); + $fileinfo['contain'] = lang('property_info_contain', array('filenum' => $tmpinfo['contains']['contain'][0], 'foldernum' => $tmpinfo['contains']['contain'][1])); unset($tmpinfo); - }else{//单个文件信息 + } else {//单个文件信息 //文件基本信息 - $fileinfo = DB::fetch_first("select r.*,f.perm_inherit,p.path from %t r - left join %t f on r.pfid = f.fid left join %t p on r.pfid = p.fid $wheresql",$param); - if(!$fileinfo){ - return array('error'=>lang('no_privilege')); + $fileinfo =DB::fetch_first("select r.*,f.perm_inherit,p.path from %t r + left join %t f on r.pfid = f.fid left join %t p on r.pfid = p.fid $wheresql", $param); + + if (!$fileinfo) { + return array('error' => lang('no_privilege')); } //文件统计信息 $filestatis = C::t('resources_statis')->fetch_by_rid($rids[0]); //位置信息 - $fileinfo['realpath'] = preg_replace('/dzz:(.+?):/','',$fileinfo['path']); + $fileinfo['realpath'] = preg_replace('/dzz:(.+?):/', '', $fileinfo['path']); + + //统计信息 - $fileinfo['opendateline'] = ($filestatis['opendateline']) ? dgmdate($filestatis['opendateline'],'Y-m-d H:i:s'):dgmdate($fileinfo['dateline'],'Y-m-d H:i:s'); - $fileinfo['editdateline'] = ($filestatis['editdateline']) ? dgmdate($filestatis['editdateline'],'Y-m-d H:i:s'):dgmdate($fileinfo['dateline'],'Y-m-d H:i:s'); - $fileinfo['fdateline'] = dgmdate($fileinfo['dateline'],'Y-m-d H:i:s'); + $fileinfo['opendateline'] = ($filestatis['opendateline']) ? dgmdate($filestatis['opendateline'], 'Y-m-d H:i:s') : dgmdate($fileinfo['dateline'], 'Y-m-d H:i:s'); + $fileinfo['editdateline'] = ($filestatis['editdateline']) ? dgmdate($filestatis['editdateline'], 'Y-m-d H:i:s') : dgmdate($fileinfo['dateline'], 'Y-m-d H:i:s'); + $fileinfo['fdateline'] = dgmdate($fileinfo['dateline'], 'Y-m-d H:i:s'); //编辑权限信息 $fileinfo['editperm'] = 1; - if($fileinfo['gid'] > 0){ - if(!(C::t('organization_admin')->chk_memberperm($fileinfo['gid'])) && !($uid == $fileinfo['uid'] && $fileinfo['perm_inherit'] & $powerarr['edit1']) && !($fileinfo['perm_inherit'] & $powerarr['edit2']) ){ + if ($fileinfo['gid'] > 0) { + if (!(C::t('organization_admin')->chk_memberperm($fileinfo['gid'])) && !($uid == $fileinfo['uid'] && $fileinfo['perm_inherit'] & $powerarr['edit1']) && !($fileinfo['perm_inherit'] & $powerarr['edit2'])) { $fileinfo['editperm'] = 0; } } @@ -946,20 +889,20 @@ class table_resources extends dzz_table //文件图标信息 $fileinfo['img'] = self::get_icosinfo_by_rid($fileinfo['rid']); //文件类型和大小信息 - if($fileinfo['type'] == 'folder'){ + if ($fileinfo['type'] == 'folder') { $fileinfo['type'] = '文件夹'; - if($currentfolder = C::t('folder')->fetch($fileinfo['oid'])){ - $fileinfo['isgroup'] = ($currentfolder['flag'] == 'organization') ? true:false; + if ($currentfolder = C::t('folder')->fetch($fileinfo['oid'])) { + $fileinfo['isgroup'] = ($currentfolder['flag'] == 'organization') ? true : false; } - $contaions = self::get_contains_by_fid($fileinfo['oid'],true); + $contaions = self::get_contains_by_fid($fileinfo['oid'], true); $contaions['contain'][1] += 1; $fileinfo['fsize'] = formatsize($contaions['size']); - $fileinfo['ffsize']=lang('property_info_size',array('fsize'=>formatsize($contaions['size']),'size'=>$contaions['size'])); - $fileinfo['contain']=lang('property_info_contain',array('filenum'=>$contaions['contain'][0],'foldernum'=>$contaions['contain'][1])); - }elseif($fileinfo['ext']){ - $fileinfo['type'] = $fileinfo['ext'].lang('typename_folder'); + $fileinfo['ffsize'] = lang('property_info_size', array('fsize' => formatsize($contaions['size']), 'size' => $contaions['size'])); + $fileinfo['contain'] = lang('property_info_contain', array('filenum' => $contaions['contain'][0], 'foldernum' => $contaions['contain'][1])); + } elseif ($fileinfo['ext']) { + $fileinfo['type'] = $fileinfo['ext'] . lang('typename_folder'); $fileinfo['fsize'] = formatsize($fileinfo['size']); - }else{ + } else { $fileinfo['type'] = lang('undefined_file_type'); $fileinfo['fsize'] = formatsize($fileinfo['size']); } @@ -967,32 +910,34 @@ class table_resources extends dzz_table } return $fileinfo; } - public function get_property_by_fid($fid){ + + public function get_property_by_fid($fid) + { global $_G; $uid = $_G['uid']; - $powerarr=perm_binPerm::getPowerArr(); + $powerarr = perm_binPerm::getPowerArr(); $fileinfo = array(); - $param = array('folder','resources_path',$fid,$powerarr['read2'],$uid,$powerarr['read1']); + $param = array('folder', 'resources_path', $fid, $powerarr['read2'], $uid, $powerarr['read1']); $folders = DB::fetch_first("select f.*,p.path from %t f left join %t p on f.fid = p.fid - where f.fid = %d and ((f.perm_inherit & %d) OR (f.uid=%d and f.perm_inherit & %d))",$param); - if(!$folders){ - return array('error'=>lang('no_privilege')); + where f.fid = %d and ((f.perm_inherit & %d) OR (f.uid=%d and f.perm_inherit & %d))", $param); + if (!$folders) { + return array('error' => lang('no_privilege')); } - $fileinfo['realpath'] = preg_replace('/dzz:(.+?):/','',$folders['path']); + $fileinfo['realpath'] = preg_replace('/dzz:(.+?):/', '', $folders['path']); $fileinfo['name'] = $folders['fname']; $fileinfo['username'] = $folders['username']; - if($folders['gid'] > 0 && $folders['pfid'] == 0){ + if ($folders['gid'] > 0 && $folders['pfid'] == 0) { $fileinfo['type'] = lang('org_or_group'); - }else{ + } else { $fileinfo['type'] = lang('type_folder'); } - $contaions = self::get_contains_by_fid($fid,true); - $fileinfo['fsize']=lang('property_info_size',array('fsize'=>formatsize($contaions['size']),'size'=>$contaions['size'])); - $fileinfo['contain']=lang('property_info_contain',array('filenum'=>$contaions['contain'][0],'foldernum'=>$contaions['contain'][1])); + $contaions = self::get_contains_by_fid($fid, true); + $fileinfo['fsize'] = lang('property_info_size', array('fsize' => formatsize($contaions['size']), 'size' => $contaions['size'])); + $fileinfo['contain'] = lang('property_info_contain', array('filenum' => $contaions['contain'][0], 'foldernum' => $contaions['contain'][1])); //编辑权限信息 - if($folders['pfid'] == 0 || (!($uid == $folders['uid'] && $folders['perm_inherit'] & $powerarr['edit1']) && !($folders['perm_inherit'] & $powerarr['edit2']))){ + if ($folders['pfid'] == 0 || (!($uid == $folders['uid'] && $folders['perm_inherit'] & $powerarr['edit1']) && !($folders['perm_inherit'] & $powerarr['edit2']))) { $fileinfo['editperm'] = 0; - }else{ + } else { $fileinfo['editperm'] = 1; } $statis = C::t('resources_statis')->fetch_by_fid($fid); @@ -1002,23 +947,25 @@ class table_resources extends dzz_table return $fileinfo; } - public function get_icosinfo_by_rid($rid){ - $resourcedata = parent::fetch($rid); - $attrdata = C::t('resources_attr')->fetch_by_rid($rid,$resourcedata['vid']); - $data = array_merge($resourcedata,$attrdata); - if($data['type']=='image'){ - $data['img']=DZZSCRIPT.'?mod=io&op=thumbnail&size=small&path='.dzzencode('attach::'.$data['aid']); - }elseif($data['type']=='attach' || $data['type']=='document'){ - $data['img']=geticonfromext($data['ext'],$data['type']); - }elseif($data['type']=='shortcut'){ - $data['img']=isset($data['tdata']['img'])?$data['tdata']['img']:geticonfromext($data['tdata']['ext'],$data['tdata']['type']); - }elseif($data['type']=='dzzdoc'){ - $data['img']=isset($data['img'])?$data['img']:geticonfromext($data['ext'],$data['type']); - }elseif($data['type'] == 'folder'){ + public function get_icosinfo_by_rid($rid) + { + $resourcedata = parent::fetch($rid); + $attrdata = C::t('resources_attr')->fetch_by_rid($rid, $resourcedata['vid']); + $data = array_merge($resourcedata, $attrdata); + if ($data['type'] == 'image') { + $data['img'] = DZZSCRIPT . '?mod=io&op=thumbnail&size=small&path=' . dzzencode('attach::' . $data['aid']); + } elseif ($data['type'] == 'attach' || $data['type'] == 'document') { + $data['img'] = geticonfromext($data['ext'], $data['type']); + } elseif ($data['type'] == 'shortcut') { + $data['img'] = isset($data['tdata']['img']) ? $data['tdata']['img'] : geticonfromext($data['tdata']['ext'], $data['tdata']['type']); + } elseif ($data['type'] == 'dzzdoc') { + + $data['img'] = isset($data['img']) ? $data['img'] : geticonfromext($data['ext'], $data['type']); + } elseif ($data['type'] == 'folder') { $data['img'] = '/dzz/images/extimg/folder.png'; - }else{ - $data['img']=isset($data['img'])?$data['img']:geticonfromext($data['ext'],$data['type']); + } else { + $data['img'] = isset($data['img']) ? $data['img'] : geticonfromext($data['ext'], $data['type']); } $img = $data['img']; unset($data); @@ -1026,12 +973,14 @@ class table_resources extends dzz_table } //文件名获取文件信息 - public function get_resources_by_pfid_name($pfid, $name){ - return DB::fetch_first("select * from %t where pfid=%d and name = %s and `type` = 'folder' ",array($this->_table, $pfid, $name)); + public function get_resources_by_pfid_name($pfid, $name) + { + return DB::fetch_first("select * from %t where pfid=%d and name = %s and `type` = 'folder' ", array($this->_table, $pfid, $name)); } //文件id获取文件信息 - public function get_resources_info_by_fid($fid){ - return DB::fetch_first("select * from %t where oid = %d and `type` = 'folder' ", array($this->_table, $fid)); + public function get_resources_info_by_fid($fid) + { + return DB::fetch_first("select * from %t where oid = %d and `type` = 'folder' ", array($this->_table, $fid)); } } \ No newline at end of file diff --git a/core/class/table/table_resources_attr.php b/core/class/table/table_resources_attr.php index cdddd2d..23af43e 100644 --- a/core/class/table/table_resources_attr.php +++ b/core/class/table/table_resources_attr.php @@ -32,6 +32,9 @@ class table_resources_attr extends dzz_table } return false; } + public function delete_by_rvid($rid,$vid){ + return DB::delete($this->_table,array('rid'=>$rid,'vid'=>$vid)); + } public function delete_by_rid($rid){ if(!is_array($rid)) $rid = (array)$rid; if(DB::delete($this->_table,'rid in('.dimplode($rid).')')){ diff --git a/core/class/table/table_resources_clipboard.php b/core/class/table/table_resources_clipboard.php index 877b5ca..8347173 100644 --- a/core/class/table/table_resources_clipboard.php +++ b/core/class/table/table_resources_clipboard.php @@ -16,14 +16,26 @@ class table_resources_clipboard extends dzz_table $uid = getglobal('uid'); if(!is_array($paths)) $paths = (array)$paths; $rids = ''; - foreach(DB::fetch_all("select rid,uid,pfid from %t where rid in (%n) and isdelete < 1",array('resources',$paths)) as $v){ + $typearr = array(); + foreach(DB::fetch_all("select rid,uid,pfid,type from %t where rid in (%n) and isdelete < 1",array('resources',$paths)) as $v){ $pfid = $v['pfid']; $perm = perm_check::getPerm($pfid); if(!perm_binPerm::havePower('copy2', $perm) && !(perm_binPerm::havePower('copy1', $perm) && $uid == $v['uid']) ){ continue; } + if($v['type'] == 'folder'){ + $typearr[] = 1; + }else{ + $typearr[] = 2; + } $rids .= $v['rid'].','; } + $typearr = array_unique($typearr); + if(count($typearr) > 1){ + $type = 3; + }else{ + $type = $typearr[0]; + } if(!$rids) return array('error'=>lang('no_privilege')); $rids = substr($rids,0,-1); @@ -31,12 +43,13 @@ class table_resources_clipboard extends dzz_table 'uid'=>getglobal('uid'), 'username'=>getglobal('username'), 'dateline'=>time(), + 'type'=>$type, 'files'=>$rids, 'copytype'=>$copytype ); self::delete_by_uid(); if($copyid = parent::insert($setarr,1)){ - return array('rid'=>$rids,'copyid'=>$copyid); + return array('rid'=>$rids,'copyid'=>$copyid,'type'=>$type); } return array('error'=>lang('sysem_busy')); } @@ -54,6 +67,10 @@ class table_resources_clipboard extends dzz_table } return false; } + public function fetch_user_paste_type(){ + $uid = getglobal('uid'); + return DB::result_first("select `type` from %t where uid = %d",array($this->_table,$uid)); + } //去掉粘贴板已删除的rid public function update_data_by_delrid($rids) { diff --git a/core/class/table/table_resources_event.php b/core/class/table/table_resources_event.php index 4591be3..35f7353 100644 --- a/core/class/table/table_resources_event.php +++ b/core/class/table/table_resources_event.php @@ -1,8 +1,9 @@ $rid, - 'event_body'=>$event, - 'uid'=>getglobal('uid'), - 'username'=>getglobal('username'), - 'dateline'=>time(), - 'body_data'=>serialize($eventdata), - 'gid'=>$gid, - 'pfid'=>$pfid, - 'do'=>$do, - 'do_obj'=>$do_obj, - 'type'=>$type + 'rid' => $rid, + 'event_body' => $event, + 'uid' => getglobal('uid'), + 'username' => getglobal('username'), + 'dateline' => time(), + 'body_data' => serialize($eventdata), + 'gid' => $gid, + 'pfid' => $pfid, + 'do' => $do, + 'do_obj' => $do_obj, + 'type' => $type ); - if($insert = parent::insert($eventArr,1)){ + if ($insert = parent::insert($eventArr, 1)) { return $insert; - }else{ + } else { return false; } } - public function delete_by_gid($gid){ - DB::delete($this->table,array('gid'=>$gid)); + public function delete_by_gid($gid) + { + DB::delete($this->table, array('gid' => $gid)); + } + + //删除文件夹动态,仅限于文件夹,其下文件动态不删除 + public function delete_by_pfid_and_notrid($fid) + { + return DB::delete($this->_table, array('rid' => '', 'pfid' => $fid)); } //删除动态 - public function delete_by_rid($rid){ - if(!is_array($rid)) $rid = (array)$rid; - if(DB::delete($this->_table,'rid in('.dimplode($rid).')')){ - return array('success'=>lang('exploder_do_succeed')); + public function delete_by_rid($rid) + { + if (!is_array($rid)) $rid = (array)$rid; + if (DB::delete($this->_table, 'rid in(' . dimplode($rid) . ')')) { + return array('success' => lang('exploder_do_succeed')); } - return array('error'=>lang('exploder_do_failed')); + return array('error' => lang('exploder_do_failed')); } + //更改动态归属位置信息(移动文件时使用) - public function update_position_by_rid($rid,$pfid,$gid){ - if(!is_array($rid)) $rid = (array)$rid; - DB::update($this->_table,array('pfid'=>$pfid,'gid'=>$gid),"rid IN(".dimplode($rid).")"); + public function update_position_by_rid($rid, $pfid, $gid) + { + if (!is_array($rid)) $rid = (array)$rid; + DB::update($this->_table, array('pfid' => $pfid, 'gid' => $gid), "rid IN(" . dimplode($rid) . ")"); return true; } - public function fetch_event_by_gid($gid){ + + public function fetch_event_by_gid($gid) + { $gid = intval($gid); $time = date('Y-m-d'); $starttime = strtotime($time); - $endtime = $starttime+3600*24; + $endtime = $starttime + 3600 * 24; $events = array(); - foreach(DB::fetch_all("select * from %t where gid = %d and dateline > %d and dateline < %d order by dateline desc",array($this->_table,$gid,$starttime,$endtime)) as $v){ + foreach (DB::fetch_all("select * from %t where gid = %d and dateline > %d and dateline < %d order by dateline desc", array($this->_table, $gid, $starttime, $endtime)) as $v) { $v['body_data'] = unserialize($v['body_data']); - $v['body_data']['msg']=dzzcode($v['body_data']['msg']); + $v['body_data']['msg'] = self::emoji_decode($v['body_data']['msg']); + $v['body_data']['msg'] = preg_replace_callback("/@\[(.+?):(.+?)\]/i", "atreplacement", $v['body_data']['msg']); + $v['body_data']['msg'] = dzzcode($v['body_data']['msg']); $v['do_lang'] = lang($v['do']); - $v['details'] = lang($v['event_body'],$v['body_data']); + $v['details'] = lang($v['event_body'], $v['body_data']); $events[] = $v; } return $events; } + public function emoji_decode($str) + { + $text = json_encode($str); //暴露出unicode + $text = preg_replace_callback('/\\\\\\\\/i', function ($str) { + return '\\'; + }, $text); //将两条斜杠变成一条,其他不动 + return json_decode($text); + } + + //根据fid查询评论 + public function fetch_comment_by_fid($fid, $count = false, $start = 0, $limit = 0) + { + $fid = intval($fid); + $params = array($this->_table, $fid, 1); + $limitsql = $limit ? DB::limit($start, $limit) : ''; + if ($count) { + return DB::result_first("select count(*) from %t where pfid = %d and rid = '' and `type`= %d", $params); + } + $events = array(); + foreach (DB::fetch_all("select * from %t where pfid = %d and rid = '' and `type`= %d order by dateline desc $limitsql", $params) as $v) { + $v['body_data'] = unserialize($v['body_data']); + $v['body_data']['msg'] = self::emoji_decode($v['body_data']['msg']); + $v['body_data']['msg'] = preg_replace_callback("/@\[(.+?):(.+?)\]/i", "atreplacement", $v['body_data']['msg']); + $v['body_data']['msg'] = dzzcode($v['body_data']['msg']); + $v['do_lang'] = lang($v['do']); + $v['details'] = lang($v['event_body'], $v['body_data']); + $v['fdate'] = dgmdate($v['dateline'], 'u'); + $uids[] = $v['uid']; + $events[] = $v; + } + if (count($events)) { + $events = self::result_events_has_avatarstatusinfo($uids, $events); + } + + + return $events; + } + + //根据fid查询评论 + public function fetch_comment_by_rid($rid, $count = false, $start = 0, $limit = 0) + { + $rid = trim($rid); + $params = array($this->_table, $rid, 1); + $limitsql = $limit ? DB::limit($start, $limit) : ''; + if ($count) { + return DB::result_first("select count(*) from %t where rid = %s and `type`= %d", $params); + } + $uid = array(); + $events = array(); + foreach (DB::fetch_all("select * from %t where rid = %s and `type`= %d order by dateline desc $limitsql", $params) as $v) { + $v['body_data'] = unserialize($v['body_data']); + $v['body_data']['msg'] = self::emoji_decode($v['body_data']['msg']); + $v['body_data']['msg'] = preg_replace_callback("/@\[(.+?):(.+?)\]/i", "atreplacement", $v['body_data']['msg']); + $v['body_data']['msg'] = dzzcode($v['body_data']['msg']); + $v['do_lang'] = lang($v['do']); + $v['details'] = lang($v['event_body'], $v['body_data']); + $v['fdate'] = dgmdate($v['dateline'], 'u'); + $uids[] = $v['uid']; + $events[] = $v; + } + if (count($events)) { + $events = self::result_events_has_avatarstatusinfo($uids, $events); + } + + return $events; + } + //根据rid查询动态 - public function fetch_by_rid($rids,$start = 0,$limit = 0,$count = false){ - if(!is_array($rids)) $rids = (array)$rids; + public function fetch_by_rid($rids, $start = 0, $limit = 0, $count = false, $type = false) + { + if (!is_array($rids)) $rids = (array)$rids; $fids = array(); - foreach(DB::fetch_all("select * from %t where rid in(%n)",array('resources',$rids)) as $v){ - if($v['type'] == 'folder'){ + foreach (DB::fetch_all("select * from %t where rid in(%n)", array('resources', $rids)) as $v) { + if ($v['type'] == 'folder') { $fids[] = $v['oid']; } - } - $wheresql = " where rid in(%n) "; - $params = array($this->_table,$rids); - if(count($fids) > 0){ + } + $wheresql = " where rid in(%n) "; + $params = array($this->_table, $rids); + if (count($fids) > 0) { $wheresql .= " or (pfid in(%n))"; $params[] = $fids; } - if($count){ - return DB::result_first("select count(*) from %t $wheresql",$params); + if ($type) { + $type = $type - 1; + $wheresql .= ' and `type` = ' . $type; + } + if ($count) { + return DB::result_first("select count(*) from %t $wheresql", $params); } $limitsql = $limit ? DB::limit($start, $limit) : ''; $events = array(); $uids = array(); - foreach(DB::fetch_all("select * from %t $wheresql order by dateline desc $limitsql",$params) as $v){ + foreach (DB::fetch_all("select * from %t $wheresql order by dateline desc $limitsql", $params) as $v) { $v['body_data'] = unserialize($v['body_data']); - $v['body_data']['msg']=preg_replace_callback("/@\[(.+?):(.+?)\]/i","atreplacement",$v['body_data']['msg']); - $v['body_data']['msg']=dzzcode($v['body_data']['msg']); + $v['body_data']['msg'] = self::emoji_decode($v['body_data']['msg']); + $v['body_data']['msg'] = preg_replace_callback("/@\[(.+?):(.+?)\]/i", "atreplacement", $v['body_data']['msg']); + $v['body_data']['msg'] = dzzcode($v['body_data']['msg']); $v['do_lang'] = lang($v['do']); - /*if($v['type'] == 1){ - $v['details'] = lang($v['event_body'],$v['body_data']); - $v['details'] = '评论了'.$v['do_obj'].':'.$v['details']; - }else{*/ - $v['details'] = lang($v['event_body'],$v['body_data']); - //} - - $v['fdate'] = dgmdate($v['dateline'],'u'); + $v['details'] = lang($v['event_body'], $v['body_data']); + $v['fdate'] = dgmdate($v['dateline'], 'u'); $uids[] = $v['uid']; $events[] = $v; } - $events = self::result_events_has_avatarstatusinfo($uids,$events); + $events = self::result_events_has_avatarstatusinfo($uids, $events); return $events; } + //根据文件夹id查询动态 - public function fetch_by_pfid_rid($fid,$counts = false,$start = 0,$limit = 0,$rid = ''){ + public function fetch_by_pfid_rid($fid, $counts = false, $start = 0, $limit = 0, $rid = '', $type = false) + { //查询文件夹所有下级 $fids = C::t('resources_path')->get_child_fids($fid); - $wheresql = " where (pfid in(%n) and `type` = 0)"; - $params = array($this->_table,$fids); - if($rid){ - $wheresql .= " or ((rid = %s and `type` = 1) or `type` = 0)"; - $params[] = $rid; - }else{ - $wheresql .= " or (pfid = %d and `type` = 1 and rid = '')"; - $params[] = $fid; + + if ($type) { + $type = $type - 1; + $wheresql = " where (pfid in(%n) and `type` = " . $type . ")"; + } else { + $wheresql = " where (pfid in(%n) and `type` = 0)"; } - if($counts){ - return DB::result_first("select count(*) from %t $wheresql",$params); + $wheresql = " where (pfid in(%n) and `type` = 0)"; + $params = array($this->_table, $fids); + + if ($rid) { + if ($type) { + $type = $type - 1; + $wheresql .= " or ((rid = %s and `type` = 1) or `type` = 0)"; + } else { + $wheresql .= " or ((rid = %s and `type` = 1) or `type` = 0)"; + } + + $params[] = $rid; + } else { + if ($type) { + $type = $type - 1; + $wheresql .= " or ((rid = %s and `type` = 1) or `type` = 0)"; + } else { + $wheresql .= " or (pfid = %d and `type` = 1 and rid = '')"; + } + $params[] = $fid; + } + if ($counts) { + return DB::result_first("select count(*) from %t $wheresql", $params); } $limitsql = $limit ? DB::limit($start, $limit) : ''; $events = array(); - $uids = array(); + $uids = array(); include_once libfile('function/use'); - foreach(DB::fetch_all("select * from %t $wheresql order by dateline desc $limitsql",$params) as $v){ + foreach (DB::fetch_all("select * from %t $wheresql order by dateline desc $limitsql", $params) as $v) { $v['body_data'] = unserialize($v['body_data']); - $v['body_data']['msg']=preg_replace_callback("/@\[(.+?):(.+?)\]/i","atreplacement",$v['body_data']['msg']); - $v['body_data']['msg']=dzzcode($v['body_data']['msg']); + $v['body_data']['msg'] = preg_replace_callback("/@\[(.+?):(.+?)\]/i", "atreplacement", $v['body_data']['msg']); + $v['body_data']['msg'] = dzzcode($v['body_data']['msg']); $at_users = array(); $v['do_lang'] = lang($v['do']); - $v['details'] = lang($v['event_body'],$v['body_data']); - $v['fdate'] = dgmdate($v['dateline'],'u'); + $v['details'] = lang($v['event_body'], $v['body_data']); + $v['fdate'] = dgmdate($v['dateline'], 'u'); $uids[] = $v['uid']; $events[] = $v; } - $events = self::result_events_has_avatarstatusinfo($uids,$events); + $events = self::result_events_has_avatarstatusinfo($uids, $events); return $events; } - public function result_events_has_avatarstatusinfo($uids,$events){ + + public function result_events_has_avatarstatusinfo($uids, $events) + { $uids = array_unique($uids); $avatars = array(); - foreach(DB::fetch_all("select u.avatarstatus,u.uid,s.svalue from %t u left join %t s on u.uid=s.uid and s.skey=%s where u.uid in(%n)",array('user','user_setting','headerColor',$uids)) as $v){ - if($v['avatarstatus'] == 1){ + foreach (DB::fetch_all("select u.avatarstatus,u.uid,s.svalue from %t u left join %t s on u.uid=s.uid and s.skey=%s where u.uid in(%n)", array('user', 'user_setting', 'headerColor', $uids)) as $v) { + if ($v['avatarstatus'] == 1) { $avatars[$v['uid']]['avatarstatus'] = 1; - }else{ + } else { $avatars[$v['uid']]['avatarstatus'] = 0; $avatars[$v['uid']]['headerColor'] = $v['svalue']; } } $fevents = array(); - foreach($events as $v){ + foreach ($events as $v) { $v['avatarstatus'] = $avatars[$v['uid']]['avatarstatus']; - if(!$avatars[$v['uid']]['avatarstatus'] && isset($avatars[$v['uid']]['headerColor'])){ + if (!$avatars[$v['uid']]['avatarstatus'] && isset($avatars[$v['uid']]['headerColor'])) { $v['headerColor'] = $avatars[$v['uid']]['headerColor']; } $fevents[] = $v; @@ -171,23 +277,26 @@ class table_resources_event extends dzz_table } //查询该文件最近的动态 - public function fetch_by_ridlast($rid){ + public function fetch_by_ridlast($rid) + { $event = array(); - $result = DB::fetch_first("select * from %t where rid = %s and `type` = %d",array($this->_table,$rid,0)); + $result = DB::fetch_first("select * from %t where rid = %s and `type` = %d", array($this->_table, $rid, 0)); $body_data = unserialize($result['body_data']); - $body_data['msg']=dzzcode($body_data['msg']); + $body_data['msg'] = dzzcode($body_data['msg']); $event = array( - 'details'=>lang($result['event_body'],$body_data), - 'fdate'=>dgmdate($result['dateline'],'u'), + 'details' => lang($result['event_body'], $body_data), + 'fdate' => dgmdate($result['dateline'], 'u'), ); return $event; } + //查询当前用户所有动态 - public function fetch_all_event($start = 0,$limit = 0,$condition=array(),$ordersql = '',$count = false){ + public function fetch_all_event($start = 0, $limit = 0, $condition = array(), $ordersql = '', $count = false) + { $limitsql = $limit ? DB::limit($start, $limit) : ''; $wheresql = ' 1 '; $uid = getglobal('uid'); - $params = array($this->_table,'folder'); + $params = array($this->_table, 'folder'); $explorer_setting = get_resources_some_setting();//获取系统设置 $powerarr = perm_binPerm::getPowerArr(); @@ -196,28 +305,28 @@ class table_resources_event extends dzz_table //如果筛选条件没有用户限制,默认查询当前用户网盘数据 if (!isset($condition['uidval'])) { //用户自己的文件 - if($explorer_setting['useronperm']){//判断当前用户存储是否开启,如果开启则查询当前用户网盘数据 + if ($explorer_setting['useronperm']) {//判断当前用户存储是否开启,如果开启则查询当前用户网盘数据 $usercondition ['nogid'] = " e.gid=0 and e.uid=%d "; $params[] = $uid; } - }else{ + } else { $uids = $condition['uidval'][0]; - if(in_array($uid,$uids)){ - if($explorer_setting['useronperm']){//判断当前用户存储是否开启,如果开启则查询当前用户网盘数据 + if (in_array($uid, $uids)) { + if ($explorer_setting['useronperm']) {//判断当前用户存储是否开启,如果开启则查询当前用户网盘数据 $usercondition ['nogid'] = " e.gid=0 and e.uid=%d "; $params[] = $uid; } } - if(count($uids) > 0){//群组用户限制 + if (count($uids) > 0) {//群组用户限制 $usercondition ['hasgid'] = " (e.uid in(%n)) "; } } - if(isset($usercondition['nogid'])) $wheresql .= 'and ('.$usercondition ['nogid'].')'; + if (isset($usercondition['nogid'])) $wheresql .= 'and (' . $usercondition ['nogid'] . ')'; //群组条件后需判断有无用户条件 - $orgcondition =array(); + $orgcondition = array(); $orgids = C::t('organization')->fetch_all_orgid();//获取所有有管理权限的部门,并排除已关闭的群组或机构 //我管理的群组或部门 if ($orgids['orgids_admin']) { @@ -234,17 +343,17 @@ class table_resources_event extends dzz_table $params[] = $uid; $params[] = $powerarr['read1']; } - if ($orgcondition){//如果有群组条件 - $or = isset($usercondition ['nogid']) ? 'or':'and';//判断是否有网盘数据 - if($usercondition ['hasgid']){//如果有网盘数据,则与群组条件组合为或的关系 - $wheresql .= " $or ((" . implode(' OR ', $orgcondition) . ") and ".$usercondition ['hasgid'].") "; + if ($orgcondition) {//如果有群组条件 + $or = isset($usercondition ['nogid']) ? 'or' : 'and';//判断是否有网盘数据 + if ($usercondition ['hasgid']) {//如果有网盘数据,则与群组条件组合为或的关系 + $wheresql .= " $or ((" . implode(' OR ', $orgcondition) . ") and " . $usercondition ['hasgid'] . ") "; $params[] = $uids; - }else{ + } else { $wheresql .= " $or (" . implode(' OR ', $orgcondition) . ") "; } - $wheresql = '('.$wheresql.')'; - }else{ - if(!isset($usercondition ['nogid'])){ + $wheresql = '(' . $wheresql . ')'; + } else { + if (!isset($usercondition ['nogid'])) { $wheresql .= ' and 0 '; } } @@ -262,102 +371,108 @@ class table_resources_event extends dzz_table $connect = isset($v[2]) ? $v[2] : 'and'; if ($relative == 'in') { $wheresql .= $connect . " e." . $k . " " . $relative . " (" . $v[0] . ") "; - }elseif($relative == 'nowhere'){ + } elseif ($relative == 'nowhere') { continue; - }elseif($relative == 'stringsql'){ - $wheresql .= $connect." ".$v[0]." "; - }elseif($relative == 'like'){ - $wheresql .= $connect." e.".$k." like %s "; + } elseif ($relative == 'stringsql') { + $wheresql .= $connect . " " . $v[0] . " "; + } elseif ($relative == 'like') { + $wheresql .= $connect . " e." . $k . " like %s "; $params[] = '%' . $v[0] . '%'; - }else { + } else { $wheresql .= $connect . ' e.' . $k . ' ' . $relative . ' ' . $v[0] . ' '; } } } } - if($count){ - return DB::result_first("select count(*) from %t e left join %t f on e.pfid = f.fid where $wheresql $ordersql",$params); + if ($count) { + return DB::result_first("select count(*) from %t e left join %t f on e.pfid = f.fid where $wheresql $ordersql", $params); } $uids = array(); $events = array(); - foreach(DB::fetch_all("select e.* from %t e left join %t f on e.pfid = f.fid where $wheresql $ordersql $limitsql",$params) as $v){ + foreach (DB::fetch_all("select e.* from %t e left join %t f on e.pfid = f.fid where $wheresql $ordersql $limitsql", $params) as $v) { $v['body_data'] = unserialize($v['body_data']); - $v['body_data']['msg']=dzzcode($v['body_data']['msg']); + $v['body_data']['msg'] = dzzcode($v['body_data']['msg']); $v['do_lang'] = lang($v['do']); - $v['details'] = lang($v['event_body'],$v['body_data']); - $v['fdate'] = dgmdate($v['dateline'],'u'); + $v['details'] = lang($v['event_body'], $v['body_data']); + $v['fdate'] = dgmdate($v['dateline'], 'u'); $uids[] = $v['uid']; $events[] = $v; } - $events = self::result_events_has_avatarstatusinfo($uids,$events); + $events = self::result_events_has_avatarstatusinfo($uids, $events); return $events; } //删除评论 - public function delete_comment_by_id($id){ + public function delete_comment_by_id($id) + { $id = intval($id); $uid = getglobal('uid'); - if(!$comment = parent::fetch($id)){ - return array('error'=>lang('comment_not_exists')); + if (!$comment = parent::fetch($id)) { + return array('error' => lang('comment_not_exists')); } //检测删除权限 $pfid = $comment['pfid']; - if($folder=C::t('folder')->fetch($pfid)){ - if($folder['gid']>0 ){ - $folder['perm']=perm_check::getPerm($folder['fid']); - if($folder['perm']>0){ - if(!perm_binPerm::havePower('delete2',$folder['perm']) && !(perm_binPerm::havePower('delete1',$folder['perm']) && $uid == $folder['uid'])){ - return array('error'=>lang('no_privilege')); + if ($folder = C::t('folder')->fetch($pfid)) { + if ($folder['gid'] > 0) { + $folder['perm'] = perm_check::getPerm($folder['fid']); + if ($folder['perm'] > 0) { + if (!perm_binPerm::havePower('delete2', $folder['perm']) && !(perm_binPerm::havePower('delete1', $folder['perm']) && $uid == $folder['uid'])) { + return array('error' => lang('no_privilege')); } - }else{ - if(!perm_binPerm::havePower('delete2',$folder['perm_inherit']) && !(perm_binPerm::havePower('delete1',$folder['perm_inherit']) && $uid == $folder['uid'])){ - return array('error'=>lang('no_privilege')); + } else { + if (!perm_binPerm::havePower('delete2', $folder['perm_inherit']) && !(perm_binPerm::havePower('delete1', $folder['perm_inherit']) && $uid == $folder['uid'])) { + return array('error' => lang('no_privilege')); } } } } - if(parent::delete($id)){ - return array('success'=>true); - }else{ - return array('error'=>lang('delete_error')); + if (parent::delete($id)) { + return array('success' => true); + } else { + return array('error' => lang('delete_error')); } } + /* * #group&do=file&gid=1&fid=13 * #group&gid=1 * #home&fid=1 * #home&do=file&fid=11 * */ - public function get_showtpl_hash_by_gpfid($pfid,$gid = 0){ + public function get_showtpl_hash_by_gpfid($pfid, $gid = 0) + { $hash = ''; //判断是否是群组内操作 - if($gid > 0){ - $gfid = DB::result_first("select fid from %t where orgid = %d",array('organization',$gid)); + if ($gid > 0) { + $gfid = DB::result_first("select fid from %t where orgid = %d", array('organization', $gid)); //判断是否是群组跟目录 - if($pfid == $gfid){ - //$hash=MOD_URL.'#group&gid='.$gid; - $hash='#group&gid='.$gid; - }else{ - //$hash=MOD_URL.'#group&do=file&gid='.$gid.'&fid='.$pfid; - $hash='#group&do=file&gid='.$gid.'&fid='.$pfid; + if ($pfid == $gfid) { + //$hash=MOD_URL.'#group&gid='.$gid; + $hash = '#group&gid=' . $gid; + } else { + //$hash=MOD_URL.'#group&do=file&gid='.$gid.'&fid='.$pfid; + $hash = '#group&do=file&gid=' . $gid . '&fid=' . $pfid; } - }else{ - $hfid = DB::result_first("select pfid from %t where fid = %d",array('folder',$pfid)); + } else { + $hfid = DB::result_first("select pfid from %t where fid = %d", array('folder', $pfid)); //判断是否是个人根目录 - if($hfid == 0){ + if ($hfid == 0) { //$hash=getglobal('siteurl').MOD_URL.'#home&fid='.$pfid; - $hash='#home&fid='.$pfid; - }else{ + $hash = '#home&fid=' . $pfid; + } else { //$hash=getglobal('siteurl').MOD_URL.'#home&do=file&fid='.$pfid; - $hash='#home&do=file&fid='.$pfid; + $hash = '#home&do=file&fid=' . $pfid; } } return $hash; + } - + public function update_event_by_pfid($pfid, $opfid) + { + DB::update($this->_table, array('pfid' => $opfid), array('pfid' => $opfid)); } } \ No newline at end of file diff --git a/core/class/table/table_resources_path.php b/core/class/table/table_resources_path.php index 7e010da..1e1ea8a 100644 --- a/core/class/table/table_resources_path.php +++ b/core/class/table/table_resources_path.php @@ -137,27 +137,30 @@ class table_resources_path extends dzz_table },$paths); if($content != $name) $newpath = str_replace($content,$name,$path); else return true; - $path = self::path_transferred_meaning($path); + $regpath = self::path_transferred_meaning($path); $sql = "update %t set path = replace(path,%s,%s) where path regexp %s"; - if(DB::query($sql,array($this->_table,$path,$newpath,'^'.$path.'.*'))){ + if(DB::query($sql,array($this->_table,$path,$newpath,'^'.$regpath.'.*'))){ return true; }else{ return false; } } //修改文件位置时 - public function update_pathdata_by_fid($fid,$ofid){ + public function update_pathdata_by_fid($fid,$ofid,$noself = false){ if($paths = $this->fetch_pathby_pfid($fid,true)){ $opaths = $this->fetch_pathby_pfid($ofid,true); $path = dirname($paths['path']).'/'; - $path = self::path_transferred_meaning($path); - $opath = self::path_transferred_meaning($opaths['path']); + //$path = self::path_transferred_meaning($path); + $opath = $opaths['path']; $pathkey = explode('-',$paths['pathkey']); array_pop($pathkey); $pathkey=implode('-',$pathkey); $opathkey = $opaths['pathkey']; $sql = "update %t set path = replace(path,%s,%s),pathkey = replace(pathkey,%s,%s) where path regexp %s"; - if(DB::query($sql,array($this->_table,$path,$opath,$pathkey,$opathkey,'^'.$paths['path'].'.*'))){ + $paths['path'] = self::path_transferred_meaning($paths['path']); + if($noself) $likepath = $paths['path'].'.+'; + else $likepath = $paths['path'].'.*'; + if(DB::query($sql,array($this->_table,$path,$opath,$pathkey,$opathkey,'^'.$likepath))){ return true; }else{ return false; @@ -192,7 +195,7 @@ class table_resources_path extends dzz_table $path = preg_replace('/^dzz:(.+?):/','',$pathkeys['path']); $patharr = explode('/',$path); unset($patharr[0]); - $$result['path'] = implode('/',$patharr); + $result['path'] = implode('/',$patharr); return $result; } diff --git a/core/class/table/table_resources_recyle.php b/core/class/table/table_resources_recyle.php index c78ea05..ab283ab 100644 --- a/core/class/table/table_resources_recyle.php +++ b/core/class/table/table_resources_recyle.php @@ -172,18 +172,6 @@ class table_resources_recyle extends dzz_table $params[] = $gids; }else{ - - /* //查询有管理权限的群组id - $manageorg= C::t('organization')->fetch_all_manage_orgid(); - $manageorgid = array(); - foreach($manageorg as $v){ - $manageorgid[] = $v['orgid']; - } - if($manageorgid){ - $or[] = '(re.gid in(%n))'; - $params[] = $manageorgid; - }*/ - if($explorer_setting['useronperm']){ $or[] = '(re.uid = %d and re.gid = 0)'; $params[] = $uid; @@ -216,15 +204,14 @@ class table_resources_recyle extends dzz_table if($count){ return DB::result_first("select count(*) from %t re left join %t r on re.rid=r.rid left join %t f on re.pfid=f.fid $wheresql $ordersql $limitsql ", $params); } - $selectfileds = "re.id,re.deldateline,re.username,re.filename,r.name,r.size,r.rid,r.pfid,r.type,r.pfid,r.oid,r.gid,c.id as collect"; + $selectfileds = "re.id,re.deldateline,re.username,re.filename,re.pathinfo,r.name,r.size,r.rid,re.pfid,r.type,r.pfid,r.oid,r.gid,c.id as collect"; foreach(DB::fetch_all("select $selectfileds from %t re left join %t r on re.rid=r.rid left join %t f on re.pfid=f.fid left join %t c on re.rid=c.rid and c.uid = re.uid $wheresql $ordersql $limitsql ", $params) as $v){ - if($v['pfid']){ - $path = C::t('resources_path')->fetch_pathby_pfid($v['pfid']); - $path = preg_replace('/dzz:(.+?):/','',$path); + if($v['pathinfo']){ + $path = preg_replace('/dzz:(.+?):/','',$v['pathinfo']); $v['from'] = substr($path,0,-1); } //计算最终删除时间 @@ -250,13 +237,11 @@ class table_resources_recyle extends dzz_table //获取最终删除时间 public function diffBetweenTwoDays($end) { - $start = time(); + $days = 0; + $start = TIMESTAMP; if ($start < $end) { - $tmp = $end; - $end = $start; - $start = $tmp; + $days = floor(($start - $end) / 86400); } - $days = floor(($start - $end) / 86400); if ($days < 0) $days = 0; return $days; } diff --git a/core/class/table/table_resources_version.php b/core/class/table/table_resources_version.php index 0d5d32a..a472b47 100644 --- a/core/class/table/table_resources_version.php +++ b/core/class/table/table_resources_version.php @@ -27,10 +27,22 @@ class table_resources_version extends dzz_table } return $data['img']; } - public function fetch_all_by_rid($rid){ + public function fetch_all_by_rid($rid,$limit = '',$count = false){ $rid = trim($rid); $versions = array(); $resources = C::t('resources')->fetch_info_by_rid($rid); + $limitsql = ''; + if($limit){ + $limitarr = explode('-',$limit); + if(count($limitarr) > 1){ + $limitsql = "limit $limitarr[0],$limitarr[1]"; + }else{ + $limitsql = "limit 0,$limitarr[0]"; + } + } + if($count){ + return DB::result_first("select count(*) from %t where rid = %s",array($this->_table,$rid)); + } if($resources['vid'] == 0){ $attrdata = C::t('resources_attr')->fetch_by_rid($rid,0); $filedata = array( @@ -49,7 +61,7 @@ class table_resources_version extends dzz_table $filedata['img'] = self::getfileimg($filedata); $versions[$filedata['vid']] = $filedata; }else{ - foreach(DB::fetch_all("select * from %t where rid = %s",array($this->_table,$rid)) as $val){ + foreach(DB::fetch_all("select * from %t where rid = %s order by dateline desc $limitsql ",array($this->_table,$rid)) as $val){ $attrdata = C::t('resources_attr')->fetch_by_rid($rid,$val['vid']); $val['img'] = isset($attrdata['img']) ?$attrdata['img']:''; $filedata = $val; @@ -58,6 +70,17 @@ class table_resources_version extends dzz_table } } return $versions; + } + public function delete_by_vid($vid,$rid){ + $vid = intval($vid); + $datainfo = C::t('resources')->fetch_info_by_rid($rid); + $vinfo = parent::fetch($vid); + if(parent::delete($vid)){ + SpaceSize(-$vinfo['size'],$datainfo['gid'],1,$datainfo['uid']); + C::t('resources_attr')->delete_by_rvid($rid,$vid); + } + return true; + } public function delete_by_version($icoid,$vid){ global $_G ; @@ -77,22 +100,18 @@ class table_resources_version extends dzz_table return array('msg'=>$v); }else return array('error'=>lang('error_delete_version_failed')); } - public function delete_by_rid($rid,$data=array()){ - // if(!is_array($rid)) $rid = (array)$rid; + public function delete_by_rid($rid){ if(!$return = DB::fetch_all("select * from %t where rid = %s",array($this->_table,$rid))){ return ; } $aids = array(); - $totalsize = 0; foreach($return as $v){ $aids[] = $v['aid']; - $totalsize += intval($v['size']); } - if($data['size']) SpaceSize(-$totalsize,$data['gid'],1,$data['uid']); if(!empty($aids)){ C::t('attachment')->addcopy_by_aid($aids,-1); } - DB::delete($this->_table,'rid in('.dimplode($rid).')'); + DB::delete($this->_table,array('rid'=>$rid)); } //上传新版本 public function add_new_version_by_rid($rid,$setarr){ @@ -139,14 +158,12 @@ class table_resources_version extends dzz_table //文件名 $filename = $setarr['name']; - $filename = self::getFileName($setarr['name'],$resources['pfid']); + $filename = self::getFileName($setarr['name'],$resources['pfid'],$rid); unset($setarr['name']); - $setarr['rid'] = $rid; //新数据插入版本表 if($vid = parent::insert($setarr,1)){ - //更新主表数据 if(DB::update('resources',array('vid'=>$vid,'size'=>$setarr['size'],'ext'=>$setarr['ext'],'type'=>$setarr['type'],'name'=>$filename),array('rid'=>$rid))){ SpaceSize($setarr['size'],$resources['gid'],true); @@ -257,10 +274,16 @@ class table_resources_version extends dzz_table } //判断文件重名 - public function getFileName($name,$pfid){ + public function getFileName($name,$pfid,$rid = ''){ static $i=0; + $params = array('resources',$name,$pfid); + $wheresql = ''; + if($rid){ + $wheresql .= " and rid != %s "; + $params[] = $rid; + } $name=self::name_filter($name); - if(DB::result_first("select COUNT(*) from %t where type!='folder' and name=%s and isdelete<1 and pfid=%d",array('resources',$name,$pfid))){ + if(DB::result_first("select COUNT(*) from %t where type!='folder' and name=%s and isdelete<1 and pfid=%d $wheresql",$params)){ $ext=''; $namearr=explode('.',$name); if(count($namearr)>1){ @@ -271,7 +294,7 @@ class table_resources_version extends dzz_table $tname=implode('.',$namearr); $name=preg_replace("/\(\d+\)/i",'',$tname).'('.($i+1).')'.$ext; $i+=1; - return self::getFileName($name,$pfid); + return self::getFileName($name,$pfid,$rid); }else{ return $name; } diff --git a/core/class/table/table_shares.php b/core/class/table/table_shares.php index fa89a73..f9a4942 100644 --- a/core/class/table/table_shares.php +++ b/core/class/table/table_shares.php @@ -46,7 +46,7 @@ class table_shares extends dzz_table $eventdata = array( 'username'=>$setarr['username'], 'filename'=>$fileinfo['name'], - 'url'=>C::t('shorturl')->getShortUrl(getglobal('siteurl').'index.php?mod=shares&sid='.dzzencode($insert)) + 'url'=>getglobal('siteurl').'index.php?mod=shares&sid='.dzzencode($insert) ); if(!C::t('resources_event')->addevent_by_pfid($fileinfo['pfid'],'share_file','share',$eventdata,$fileinfo['gid'],$fileinfo['rid'],$fileinfo['name'])){ parent::delete($insert); @@ -178,6 +178,8 @@ class table_shares extends dzz_table $setarr['uid'] = getglobal('uid'); $setarr['username'] = getglobal('username'); if(parent::delete($id)){ + $url = getglobal('siteurl').'index.php?mod=shares&sid='.dzzencode($id); + C::t('shorturl')->delete_by_url($url);//删除短链接 $eventdata = array('username'=>$setarr['username'],'filename'=>$shareinfo['title']); C::t('resources_event')->addevent_by_pfid($shareinfo['pfid'],'cancle_share','cancleshare',$eventdata,$shareinfo['gid'],'',$shareinfo['title']); return array('success'=>true,'shareid'=>$id,'sharetitle'=>$shareinfo['title']); @@ -205,7 +207,7 @@ class table_shares extends dzz_table } $sharestatus = array('-5'=>lang('sharefile_isdeleted_or_positionchange'),'-4' => lang('been_blocked'), '-3' => lang('file_been_deleted'), '-2' => lang('degree_exhaust'), '-1' => lang('logs_invite_status_4'), '0' => lang('founder_upgrade_normal')); foreach(DB::fetch_all("select * from %t where $wheresql $ordersql $limitsql",$params) as $val){ - $val['sharelink'] = C::t('shorturl')->getShortUrl(getglobal('siteurl').'index.php?mod=shares&sid='.dzzencode($val['id'])); + $val['sharelink'] = outputurl(getglobal('siteurl').'index.php?mod=shares&sid='.dzzencode($val['id'])); $val['fdateline'] = dgmdate($val['dateline'],'Y-m-d H:i:s'); $val['password'] = ($val['password']) ? dzzdecode($val['password']):''; $sid = dzzencode($val['id']); @@ -271,7 +273,7 @@ class table_shares extends dzz_table if(@getimagesize(getglobal('setting/attachdir').$target)){ return getglobal('setting/attachurl').$target; }else{//生成二维码 - QRcode::png(C::t('shorturl')->getShortUrl(getglobal('siteurl').'?index.php&mod=shares&sid='.$sid),getglobal('setting/attachdir').$target,'M',4,2); + QRcode::png((getglobal('siteurl').'index.php?mod=shares&sid='.$sid),getglobal('setting/attachdir').$target,'M',4,2); return getglobal('setting/attachurl').$target; } } diff --git a/core/class/table/table_shorturl.php b/core/class/table/table_shorturl.php index f40fa98..4be8d82 100644 --- a/core/class/table/table_shorturl.php +++ b/core/class/table/table_shorturl.php @@ -58,5 +58,9 @@ class table_shorturl extends dzz_table public function addview($sid){ return DB::query("update %t set count=count+1 where sid=%s",array($this->_table,$sid)); } + public function delete_by_url($url){ + $sid=self::getSid($url); + return parent::delete($sid); + } } ?> diff --git a/core/class/table/table_user.php b/core/class/table/table_user.php index b694b78..ba20824 100644 --- a/core/class/table/table_user.php +++ b/core/class/table/table_user.php @@ -94,8 +94,8 @@ class table_user extends dzz_table foreach(DB::fetch_all("select fid from %t where uid=%d and gid<1 ",array('folder',$uid)) as $value){ C::t('folder')->delete_by_fid($value['fid'],true); } - - wx_deleteUser($uid); + + Hook::listen('syntoline_user',$uid,'del');//删除对应到三方用户表 return true; } return false; diff --git a/core/core_version.php b/core/core_version.php index 0cbc1c3..4ad9005 100644 --- a/core/core_version.php +++ b/core/core_version.php @@ -11,7 +11,7 @@ if(!defined('IN_DZZ')) { } if(!defined('CORE_VERSION')) { - define('CORE_VERSION', '2.0 beta'); - define('CORE_RELEASE', '20180326'); + define('CORE_VERSION', '2.01'); + define('CORE_RELEASE', '20180528'); define('CORE_FIXBUG' , '20000000'); } diff --git a/core/cron/cron_check_app_version.php b/core/cron/cron_check_app_version.php deleted file mode 100644 index 9081fa1..0000000 --- a/core/cron/cron_check_app_version.php +++ /dev/null @@ -1,61 +0,0 @@ -where($map)->limit(10)->select(); -if( $applist ){ - $dzz_upgrade = new dzz_upgrade_app(); - //根据当前版本查询是否需要更新 - $appinfo["mysqlversion"] = helper_dbtool::dbversion(); - $appinfo["phpversion"] = PHP_VERSION ; - $appinfo["dzzversion"] = CORE_VERSION; - foreach($applist as $k=>$v ){ - if(empty($v['app_path'])) $v['app_path']='dzz'; - $savedata=array(); - if( $v["mid"]>0){//云端检测 - $info=array_merge($v,$appinfo); - $response = $dzz_upgrade->check_upgrade_byversion( $info ); - if( $response ) { - if( $response["status"]==1 ){ - $savedata=array( "upgrade_version"=>serialize($response["data"]), "check_upgrade_time"=>$today ); - }else{ - if( $response["status"]!=2 ){//云端应用未有新版本发布或找不到版本 - $savedata=array( "upgrade_version"=>"", "check_upgrade_time"=>$today ); - }else{//云端应用不存在 - $savedata=array( "upgrade_version"=>"", "check_upgrade_time"=>$today ); - } - } - } - }else{//本地检测 - $file = DZZ_ROOT . './'.$v['app_path'].'/' . $v['identifier'] . '/dzz_app_' . $v['identifier'] . '.xml'; - if ( file_exists($file) ) { - $importtxt = @implode('', file($file)); - $apparray = getimportdata('Dzz! app',0,0,$importtxt); - if($apparray["app"]["version"]>$v["version"]){ - unset( $apparray["app"]['appico']);//ico base64太长暂时屏蔽应用icon更新 - $savedata=array( "upgrade_version"=>serialize($apparray["app"]), "check_upgrade_time"=>$today ); - } else{ - $savedata=array( "upgrade_version"=>"", "check_upgrade_time"=>$today ); - } - }else{ - $savedata=array( "upgrade_version"=>"", "check_upgrade_time"=>$today ); - } - } - if( $savedata ){ - $re= C::t('app_market')->update($appid,$savedata);//C::tp_t('app_market')->where("appid=".$v["appid"])->save( $savedata ); - } - } -} -?> \ No newline at end of file diff --git a/core/cron/cron_clean_copys0_attachment_by_month.php b/core/cron/cron_clean_copys0_attachment_by_month.php index be7371f..70b6244 100644 --- a/core/cron/cron_clean_copys0_attachment_by_month.php +++ b/core/cron/cron_clean_copys0_attachment_by_month.php @@ -13,7 +13,7 @@ if(!defined('IN_DZZ')) { exit('Access Denied'); } $limit=100;//考虑到计划任务占用的系统资源,一次最大删除100个; -foreach(DB::fetch_all("select * from %t where dateline<%d and copys<1 ORDER BY dateline limit $limit",array('attachment',TIMESTAMP-60*60,$limit)) as $value){ +foreach(DB::fetch_all("select * from %t where dateline<%d and copys<1 ORDER BY dateline limit $limit",array('attachment',TIMESTAMP,$limit)) as $value){ if(io_remote::DeleteFromSpace($value)){ C::t('attachment')->delete($value['aid']); } diff --git a/core/cron/cron_getAtoken_by_Rtoken_week.php b/core/cron/cron_getAtoken_by_Rtoken_week.php new file mode 100644 index 0000000..1ed29c8 --- /dev/null +++ b/core/cron/cron_getAtoken_by_Rtoken_week.php @@ -0,0 +1,34 @@ +getAccessTokenByRefreshToken($value['refresh_token'],$value['scope']) ){ + $token['refreshtime']=TIMESTAMP; + if($token['access_token']) C::t('connect_pan')->update($value['id'],$token); + } + } +} +?> diff --git a/core/function/function_core.php b/core/function/function_core.php index 793611d..deb0369 100644 --- a/core/function/function_core.php +++ b/core/function/function_core.php @@ -97,188 +97,7 @@ function getOauthRedirect($url) $wx = new qyWechat(array('appid' => getglobal('setting/CorpID'), 'appsecret' => getglobal('setting/CorpSecret'))); return $wx->getOauthRedirect(getglobal('siteurl') . 'index.php?mod=system&op=wxredirect&url=' . dzzencode($url)); } - -function wx_deleteUser($uid) -{ - if (!getglobal('setting/CorpID') || !getglobal('setting/CorpSecret')) return true; - $user = C::t('user')->fetch($uid); - if( !$user || !$user["wechat_userid"]){ - return true;//判断是否绑定了企业微信 未绑定则不请求企业微信删除接口 - } - $wx = new qyWechat(array('appid' => getglobal('setting/CorpID'), 'appsecret' => getglobal('setting/CorpSecret'), 'agentid' => 0)); - if ($wx->deleteUser( $user["wechat_userid"] )) { - return true; - } else { - $message = 'deleteUser:errCode:' . $wx->errCode . ';errMsg:' . $wx->errMsg; - runlog('wxlog', $message); - } - return true; -} - -function wx_updateUser($uids) -{ - @set_time_limit(0); - if (!getglobal('setting/CorpID') || !getglobal('setting/CorpSecret')) return; - $uids = (array)$uids; - $wx = new qyWechat(array('appid' => getglobal('setting/CorpID'), 'appsecret' => getglobal('setting/CorpSecret'), 'agentid' => 0)); - $ret = 0; - $syngids = array(); - if ($syngid = getglobal('setting/synorgid')) { //设置的需要同步的部门 - include_once libfile('function/organization'); - $syngids = getOrgidTree($syngid); - } - foreach ($uids as $uid) { - if (!$user = C::t('user')->fetch($uid)) continue; - $worgids = array(); - if ($orgids = C::t('organization_user')->fetch_orgids_by_uid($uid)) { - if ($syngids) { - $orgids = array_intersect($orgids, $syngids); - } - if ($orgids) { - foreach (C::t('organization')->fetch_all($orgids) as $value) { - if( $value['type']>0 ){//群主类型不同步至微信 - continue; - } - if ($value['worgid']){ - $worgids[] = $value['worgid']; - }else { - if ($worgid = C::t('organization')->wx_update($value['orgid'])) { - $worgids[] = $worgid; - } - } - } - } - } - if( !$worgids ) $worgids=array(1);//默认同步到企业微信的跟部门下 - - if (!$worgids) {//用户不在机构和部门中,微信中应该禁用此用户 - $data = array("userid" => $user["wechat_userid"],//"dzz-" . $user['uid'], - "enable" => 0, - "department" => 1, - ); - if ($wx->updateUser($data)) { - $ret += 1; - } else { - $message = 'deleteUser:errCode:' . $wx->errCode . ';errMsg:' . $wx->errMsg; - runlog('wxlog', $message); - } - } else { - $profile = C::t('user_profile')->fetch_all($user['uid']); - $wxuser =array(); - if( $user["wechat_userid"] ){ - $wxuser = $wx->getUserInfo( $user["wechat_userid"] ); - } - if( $wxuser ){//已绑定企业微信端用户 //if ($wxuser = $wx->getUserInfo('dzz-' . $user['uid'])) {//更新用户信息 - $data = array( - "userid" => $user["wechat_userid"], - "name" => $user['username'], - //"position" => '', - "email" => $user['email'], - "enable" => $user['status'] ? 0 : 1 - ); - if (array_diff($wxuser['department'], $worgids)) { - $data['department'] = $worgids; - } - if ($user['phone'] && $user['phone'] != $wxuser['mobile']) { - $data['mobile'] = $user['phone']; - } - /* if ($user['weixinid'] && $wxuser['wechat_status'] == 4) { - $data['weixinid'] = $user['weixinid']; - }*/ - if ($profile['telephone'] && $profile['telephone'] != $wxuser['telephone']) { - $data['telephone'] = $profile['telephone']; - } - if ($profile['gender'] && ($profile['gender'] - 1) != $wxuser['gender']) { - $data['gender'] = $profile['gender'] - 1; - } - - if ($wx->updateUser($data)) { - $ret += 1; - } else { - $message = 'updateUser:errCode:' . $wx->errCode . ';errMsg:' . $wx->errMsg; - runlog('wxlog', $message); - } - - //$setarr = array('wechat_status' => $wxuser['status']); - //$setarr['weixinid'] = empty($wxuser['weixinid']) ? $user['weixinid'] : $wxuser['weixinid']; - $setarr['phone'] = empty($user['phone']) ? $wxuser['mobile'] : $user['phone']; - //$setarr['wechat_userid'] = 'dzz-' . $user['uid']; - C::t('user')->update($user['uid'], $setarr); - } else {//创建用户信息 - $data = array( - "userid" => 10000+ $user['uid'],//"dzz-" . $user['uid'], - "name" => $user['username'], - "department" => $worgids, - //"position" => '', - "email" => $user['email'], - //"weixinid" => $user['wechat'], - "enable" => $user['status'] ? 0 : 1 - ); - if ($user['phone']) { - $data['mobile'] = $user['phone']; - } - if ($profile['telephone']) { - $data['telephone'] = $profile['telephone']; - } - if ($profile['gender']) { - $data['gender'] = $profile['gender'] - 1; - } - //创建用户前查询企业微信端所有用户,判断是否微信账户重名 如email 或者 mobile相同视为同一用户 则更新信息 - $userlist =$wx->getUserListall(1,1); - $wxuser=array(); - if( $userlist["userlist"] ){ - foreach($userlist["userlist"] as $k=>$v ){ - if($v["email"] && $data["email"]==$v["email"] ){ - $wxuser=$v; - break; - } - if($v["mobile"] && $data["mobile"]==$v["mobile"] ){ - $wxuser=$v; - break; - } - } - } - if( $wxuser ){//判断是否已存在手机号或者邮箱,如果又则认定为是同一个账户,不需要重新创建 - $data["userid"]=$wxuser["userid"]; - $result = $wx->updateUser($data); - }else{//查询不到企业微信,重新创建 重新创建时判断是否重名,如果重名重新命名,直到不重名 - if( $userlist["userlist"] ){ - $nowuserid = $data["userid"]; - $noneunion=true; - $i=1; - while( $noneunion ){//检查是否和企业微信断已有用户重名 - $isunion=false; - foreach($userlist["userlist"] as $k=>$v ){ - if($v["userid"] == $nowuserid ){ - $isunion=true; - break; - } - } - if( $isunion ){ - $nowuserid = $data["userid"]."_".$i; - }else{ - $data['userid']=$nowuserid; - $noneunion=false; - } - $i++; - } - } - $result = $wx->createUser($data); - } - - if ( $result ) { - C::t('user')->update($user['uid'], array('wechat_userid' => $data['userid'])); - $ret += 1; - } else { - $message = 'createUser:errCode:' . $wx->errCode . ';errMsg:' . $wx->errMsg; - runlog('wxlog', $message); - } - } - } - } - return $ret; -} - + function fix_integer_overflow($size) { //处理整数溢出 if ($size < 0) { @@ -607,10 +426,9 @@ function fsocketopen($hostname, $port = 80, &$errno, &$errstr, $timeout = 15) return $fp; } -function dfsockopen($url, $limit = 0, $post = '', $cookie = '', $bysocket = FALSE, $ip = '', $timeout = 15, $block = TRUE, $encodetype = 'URLENCODE', $allowcurl = TRUE, $position = 0) -{ - require_once libfile('function/filesock'); - return _dfsockopen($url, $limit, $post, $cookie, $bysocket, $ip, $timeout, $block, $encodetype, $allowcurl, $position); +function dfsockopen($url, $limit = 0, $post = '', $cookie = '', $bysocket = FALSE, $ip = '', $timeout = 15, $block = TRUE, $encodetype = 'URLENCODE', $allowcurl = TRUE, $position = 0, $files = array()) { + require_once libfile('function/filesock'); + return _dfsockopen($url, $limit, $post, $cookie, $bysocket, $ip, $timeout, $block, $encodetype, $allowcurl, $position, $files); } function dhtmlspecialchars($string, $flags = null) @@ -858,8 +676,9 @@ function avatar_block($uid=0,$headercolors=array(),$class="Topcarousel"){ }else{ $user=array('uid' => 0, 'username' => 'guest', 'avatarstatus' => 0 ,'adminid' => 0, 'groupid' => 7, 'credits' => 0, 'timeoffset' => 9999); } + if(empty($user)) return ''; if($user['avatarstatus']){//用户已经上传头像 - return ''; + return ''; }else{//没有上传头像,使用背景+首字母 if($uid){ if($headercolors[$uid]) $headerColor=$headercolors[$uid]; @@ -1365,6 +1184,22 @@ function output() } } + +function outputurl( $url="" ) +{ + global $_G; + if ($_G['config']['rewritestatus']) { + $url = output_replace($url); + ob_end_clean(); + $_G['gzipcompress'] ? ob_start('ob_gzhandler') : ob_start(); + return $url; + } + if (defined('DZZ_DEBUG') && DZZ_DEBUG && @include(libfile('function/debug'))) { + function_exists('debugmessage') && debugmessage(); + } + return $url; +} + function output_replace($content) { global $_G; @@ -1376,7 +1211,55 @@ function output_replace($content) $content = str_replace($_G['setting']['rewrite']['str']['search'], $_G['setting']['rewrite']['str']['replace'], $content); } if (!empty($_G['config']['rewrite']['preg']['search'])) { - $content = preg_replace($_G['config']['rewrite']['preg']['search'], $_G['config']['rewrite']['preg']['replace'], $content); + + //处理js中 app_url,mod_url + $string1 = "APP_URL='".MOD_URL."'";//",APP_URL='".MOD_URL."',MOD_URL = '".MOD_URL."'"; + $string2 = "MOD_URL='".MOD_URL."'"; + $string=array($string1,$string2); + $md5[]=md5($string1); + $md5[]=md5($string2); + //end + + //处理非本地连接 + $reg = "/(https?|ftp|news):[\/]{2}([\w+\d+]+[.]{1})?[\w+\d]+[.]{1}[\w+\d]*+([^(\s|\"|\')]+)/"; + preg_match_all($reg,$content,$links); + if( isset($links[0]) && $links[0]){ + $siteurl = $_G["siteurl"]; + //echo $siteurl."******"; + foreach($links[0] as $k=>$v){ + //echo $v."------------"; + if( strpos($v,$siteurl)!==false){ + //echo $v."----------
    "; + }else{ + $string[]=$v; + $md5[]=md5($v); + } + } + } + //end + + $content=str_replace($string,$md5,$content); + + $search_arr = $_G['config']['rewrite']['preg']['search']; + $replace_arr = $_G['config']['rewrite']['preg']['replace']; + $search_new=array(); + $replace_new=array(); + foreach($search_arr as $k=>$v ){ + $s=$v; + $v2 = substr_replace($v, '\&/i',-2,2); + array_push($search_new,$v2); + $v = substr_replace($v, '\&/i',-2,2); + array_push($search_new,$v); + array_push($search_new,$s); + array_push($replace_new,$replace_arr[$k]."?"); + array_push($replace_new,$replace_arr[$k]."?"); + array_push($replace_new,$replace_arr[$k]); + } + $content = preg_replace($search_new, $replace_new, $content); + + $content=str_replace($md5,$string,$content); + + //$content = preg_replace($_G['config']['rewrite']['preg']['search'], $_G['config']['rewrite']['preg']['replace'], $content); } return $content; @@ -3240,7 +3123,7 @@ function get_resources_some_setting() foreach ($usersarr as $v) { //群组id if (preg_match('/^\d+$/', $v)) { - foreach (C::t('organization_user')->fetch_user_byorgid($v) as $val) { + foreach (C::t('organization_user')->get_all_user_byorgid($v) as $val) { $users[] = $val['uid']; } } elseif ($v == 'other') { @@ -3295,7 +3178,7 @@ function get_resources_some_setting() foreach ($usersarr as $v) { //群组id if (preg_match('/^\d+$/', $v)) { - foreach (C::t('organization_user')->fetch_user_byorgid($v) as $val) { + foreach (C::t('organization_user')->get_all_user_byorgid($v) as $val) { $users[] = $val['uid']; } } elseif ($v == 'other') { diff --git a/core/function/function_filesock.php b/core/function/function_filesock.php index 04547ac..f412f3b 100644 --- a/core/function/function_filesock.php +++ b/core/function/function_filesock.php @@ -54,7 +54,7 @@ function _dfsockopen($url, $limit = 0, $post = '', $cookie = '', $bysocket = FAL if($cookie) { curl_setopt($ch, CURLOPT_COOKIE, $cookie); } - curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); $data = curl_exec($ch); $status = curl_getinfo($ch); @@ -150,9 +150,9 @@ function _dfsockopen($url, $limit = 0, $post = '', $cookie = '', $bysocket = FAL if($position) { for($i=0; $i<$position; $i++) { $char = fgetc($fp); - if($char == "\n" && $oldchar != "\r") { + /*if($char == "\n" && $oldchar != "\r") { $i++; - } + }*/ $oldchar = $char; } } diff --git a/core/function/function_message.php b/core/function/function_message.php index 3bf00fd..a8aa2ee 100644 --- a/core/function/function_message.php +++ b/core/function/function_message.php @@ -141,7 +141,7 @@ function dshowmessage($message, $url_forward = '', $values = array(), $extrapara if($param['msgtype'] == 2 && $param['login']) { - dheader('location: user.php?mod=logging&action=login'); + dheader('location: user.php?mod=login'); } $show_jsmessage = str_replace("'", "\\'", $param['striptags'] ? strip_tags($show_message) : $show_message); diff --git a/core/language/zh-cn/lang.php b/core/language/zh-cn/lang.php index 36f62fb..d57f413 100644 --- a/core/language/zh-cn/lang.php +++ b/core/language/zh-cn/lang.php @@ -81,7 +81,7 @@ $lang = array ( 'subscriber_data_edit_success'=>'用户资料编辑成功', 'subscriber_data_alter_success'=>'用户资料修改成功', 'subscriber_data_item_edit_success'=>'用户资料项编辑成功', - 'js_exit' => '您确定要注销登陆?', + 'js_exit' => '您确定要注销登录?', 'username' => '用户名', 'password' => '密 码', 'board_message' => '提示信息', @@ -570,32 +570,32 @@ $lang = array ( 'members_verify_pic_removed' => '未上传图片或已被删除', // core/function/cache/function_seccode.php 'chn' => '的一是在了不和有大这主中人上为们地个用工时要动国产以我到他会作来分生对于学下级就年阶义发成部民可出能方进同行面说种过命度革而多子后自社加小机也经力线本电高量长党得实家定深法表着水理化争现所二起政三好十战无农使性前等反体合斗路图把结第里正新开论之物从当两些还天资事队批如应形想制心样干都向变关点育重其思与间内去因件日利相由压员气业代全组数果期导平各基或月毛然问比展那它最及外没看治提五解系林者米群头意只明四道马认次文通但条较克又公孔领军流入接席位情运器并飞原油放立题质指建区验活众很教决特此常石强极土少已根共直团统式转别造切九您取西持总料连任志观调七么山程百报更见必真保热委手改管处己将修支识病象几先老光专什六型具示复安带每东增则完风回南广劳轮科北打积车计给节做务被整联步类集号列温装即毫知轴研单色坚据速防史拉世设达尔场织历花受求传口断况采精金界品判参层止边清至万确究书术状厂须离再目海交权且儿青才证低越际八试规斯近注办布门铁需走议县兵固除般引齿千胜细影济白格效置推空配刀叶率述今选养德话查差半敌始片施响收华觉备名红续均药标记难存测士身紧液派准斤角降维板许破述技消底床田势端感往神便贺村构照容非搞亚磨族火段算适讲按值美态黄易彪服早班麦削信排台声该击素张密害侯草何树肥继右属市严径螺检左页抗苏显苦英快称坏移约巴材省黑武培着河帝仅针怎植京助升王眼她抓含苗副杂普谈围食射源例致酸旧却充足短划剂宣环落首尺波承粉践府鱼随考刻靠够满夫失包住促枝局菌杆周护岩师举曲春元超负砂封换太模贫减阳扬江析亩木言球朝医校古呢稻宋听唯输滑站另卫字鼓刚写刘微略范供阿块某功套友限项余倒卷创律雨让骨远帮初皮播优占死毒圈伟季训控激找叫云互跟裂粮粒母练塞钢顶策双留误础吸阻故寸盾晚丝女散焊功株亲院冷彻弹错散商视艺灭版烈零室轻血倍缺厘泵察绝富城冲喷壤简否柱李望盘磁雄似困巩益洲脱投送奴侧润盖挥距触星松送获兴独官混纪依未突架宽冬章湿偏纹吃执阀矿寨责熟稳夺硬价努翻奇甲预职评读背协损棉侵灰虽矛厚罗泥辟告卵箱掌氧恩爱停曾溶营终纲孟钱待尽俄缩沙退陈讨奋械载胞幼哪剥迫旋征槽倒握担仍呀鲜吧卡粗介钻逐弱脚怕盐末阴丰编印蜂急拿扩伤飞露核缘游振操央伍域甚迅辉异序免纸夜乡久隶缸夹念兰映沟乙吗儒杀汽磷艰晶插埃燃欢铁补咱芽永瓦倾阵碳演威附牙芽永瓦斜灌欧献顺猪洋腐请透司危括脉宜笑若尾束壮暴企菜穗楚汉愈绿拖牛份染既秋遍锻玉夏疗尖殖井费州访吹荣铜沿替滚客召旱悟刺脑', - 'feed_at'=>'{author}在动态中@(提到)你了,快去看看吧', + 'feed_at'=>'{author}在动态中@(提到)你了,快去看看吧', 'feed_at_wx'=>'{author}在动态中@(提到)你:{message}', 'feed_at_redirecturl'=>'{url}', 'feed_at_title'=>'动态@我提醒', - 'feed_reply'=>'{author}在动态中回复了你,快去看看吧', + 'feed_reply'=>'{author}在动态中回复了你,快去看看吧', 'feed_reply_title'=>'动态回复我提醒', 'feed_reply_wx'=>'{author}在动态中回复了你:{message}', 'feed_reply_redirecturl'=>'{url}', - 'profile_moderate'=>'有新的待处理{title},现在处理', + 'profile_moderate'=>'有新的待处理{title},现在处理', 'profile_moderate_wx'=>'有新的待处理{title}', 'profile_moderate_redirecturl'=>'{url}', 'profile_moderate_title'=>'{title} 审核提醒', - 'user_profile_moderate_pass'=>'{title} 通过了,现在去看看', + 'user_profile_moderate_pass'=>'{title} 通过了,现在去看看', 'user_profile_moderate_pass_wx'=>'{title} 通过了', 'user_profile_moderate_pass_redirecturl'=>'{url}', 'user_profile_moderate_pass_title'=>'{title} 提醒', - 'user_profile_moderate_refusal'=>'{title} 被拒绝:{profile} {reason} 现在去看看', + 'user_profile_moderate_refusal'=>'{title} 被拒绝:{profile} {reason} 现在去看看', 'user_profile_moderate_refusal_wx'=>'{title} 被拒绝:{profile} {reason}', 'user_profile_moderate_refusal_redirecturl'=>'{url}', 'user_profile_moderate_refusal_title'=>'{title} 提醒', - 'user_profile_pass_refusal'=>'您通过审核的{title}已被拒绝! 现在去看看', + 'user_profile_pass_refusal'=>'您通过审核的{title}已被拒绝! 现在去看看', 'user_profile_pass_refusal_wx'=>'您通过审核的{title}已被拒绝!', 'user_profile_pass_refusal_redirecturl'=>'{url}', 'user_profile_pass_refusal_title'=>'{title} 提醒', @@ -764,7 +764,7 @@ $lang = array ( 'profile_illegal' => '格式不正确或为空', 'profile_nickname_protect' => '用户名包含被系统屏蔽的字符', 'profile_username_protect' => '用户名包含被系统屏蔽的字符', - 'register_check_found' => '该用户名已注册,请更换用户名 登录', + 'register_check_found' => '该用户名已注册,请更换用户名 登录', 'register_activation' => '用户名已存在', 'no_invitation_code' => '抱歉,邀请码为空请填写,没有邀请码不允许注册', 'wrong_invitation_code' => '抱歉,邀请码错误,请重新填写,没有邀请码不允许注册', @@ -1384,7 +1384,8 @@ $_G[siteurl]', 'service_and_support'=>'服务支持', 'public_license'=>'开源协议', 'community_edition'=>'社区版', - 'title_admincp'=>'管理员登录入口' + 'title_admincp'=>'管理员登录入口', + 'forbid_folder_to_sub_folder'=>'目标文件夹是源文件夹的子文件夹' ); diff --git a/core/template/default/common/about.htm b/core/template/default/common/about.htm index e090ed6..8e3d598 100644 --- a/core/template/default/common/about.htm +++ b/core/template/default/common/about.htm @@ -7,7 +7,7 @@ diff --git a/core/template/default/common/footer.htm b/core/template/default/common/footer.htm index 206182a..c85a748 100644 --- a/core/template/default/common/footer.htm +++ b/core/template/default/common/footer.htm @@ -12,16 +12,14 @@ try{ - - - + - + - + - - - + - + - + - + diff --git a/core/template/default/common/header_end.htm b/core/template/default/common/header_end.htm index e26857b..b4948a9 100644 --- a/core/template/default/common/header_end.htm +++ b/core/template/default/common/header_end.htm @@ -1,4 +1,4 @@ - + diff --git a/core/template/default/common/header_reload.htm b/core/template/default/common/header_reload.htm index 9b83c34..18f441c 100644 --- a/core/template/default/common/header_reload.htm +++ b/core/template/default/common/header_reload.htm @@ -7,10 +7,9 @@ - + -
    \ No newline at end of file diff --git a/core/template/default/common/header_simple_end.htm b/core/template/default/common/header_simple_end.htm index 86c4066..87cbdcf 100644 --- a/core/template/default/common/header_simple_end.htm +++ b/core/template/default/common/header_simple_end.htm @@ -1,4 +1,3 @@ - diff --git a/core/template/default/common/header_simple_start.htm b/core/template/default/common/header_simple_start.htm index d341e2a..e46847c 100644 --- a/core/template/default/common/header_simple_start.htm +++ b/core/template/default/common/header_simple_start.htm @@ -20,9 +20,17 @@ + \ No newline at end of file + + + diff --git a/core/template/default/common/header_start.htm b/core/template/default/common/header_start.htm index dbf332e..ab4073f 100644 --- a/core/template/default/common/header_start.htm +++ b/core/template/default/common/header_start.htm @@ -25,3 +25,9 @@ + diff --git a/core/template/default/common/mobile_about.htm b/core/template/default/common/mobile_about.htm new file mode 100644 index 0000000..11676f6 --- /dev/null +++ b/core/template/default/common/mobile_about.htm @@ -0,0 +1,104 @@ + + + + + + 关于 + + + + + + + +
    + +
    + + + +
    +
    + + + + \ No newline at end of file diff --git a/core/template/default/common/mobile_simple_end.htm b/core/template/default/common/mobile_simple_end.htm new file mode 100644 index 0000000..84d9593 --- /dev/null +++ b/core/template/default/common/mobile_simple_end.htm @@ -0,0 +1,5 @@ + + + +
    +
    \ No newline at end of file diff --git a/core/template/default/common/mobile_simple_start.htm b/core/template/default/common/mobile_simple_start.htm new file mode 100644 index 0000000..aa61a7f --- /dev/null +++ b/core/template/default/common/mobile_simple_start.htm @@ -0,0 +1,21 @@ + + + + + + + <!--{if !empty($navtitle)}-->$navtitle - <!--{/if}-->$_G[setting][sitename] + + + + + + + + + + + + + + \ No newline at end of file diff --git a/core/template/default/common/share_password.htm b/core/template/default/common/share_password.htm deleted file mode 100644 index 74ce7c2..0000000 --- a/core/template/default/common/share_password.htm +++ /dev/null @@ -1,42 +0,0 @@ - - - - - @@ -83,9 +83,9 @@
      -
    • +
    • {lang delete}
    • diff --git a/dzz/comment/template/thread_item.htm b/dzz/comment/template/thread_item.htm index 758071c..9c7c858 100644 --- a/dzz/comment/template/thread_item.htm +++ b/dzz/comment/template/thread_item.htm @@ -15,17 +15,15 @@
      - $attach[title] - - -
      -
      -
      $attach[title]($attach[filesize]) -

      - {lang download} + $attach[title] +

      +
    @@ -64,7 +62,7 @@ {lang download} ($attach[downloads]{lang degree}) - {lang js_saved_my_documents} +

    @@ -77,9 +75,9 @@
    +
    {lang dev_desc}
    +*/ +$lang = array ( + 'appname' =>'配置向导', + 'system_install_success'=>'恭喜,系统安装成功!', + 'thank_you_of'=>'感谢您选用DzzOffice协同办公套件', + 'after_installed_tip'=>'这个页面是初始安装后临时指导页,系统设置完默认首页后就不会再进入这个页面。', + 'after_installed_help'=>'请使用管理员账号登录、并且按照下面的步骤依次配置系统!', + 'after_installed_step_one'=>'进入应用市场选择需要的应用,点击一键安装。安装完成后到“已安装”标签, 启用此应用;', + 'after_installed_step_one_tip'=>'系统默认仅预装了少量的管理应用,更多应用需要到应用市场内选择安装', + 'after_installed_step_two'=>'进入系统设置设置 默认首页,平台名称、logo等系统基本设置;', + 'Communication_and_feedback'=>'交流与反馈' +); \ No newline at end of file diff --git a/dzz/index/template/main.htm b/dzz/index/template/main.htm new file mode 100644 index 0000000..beec344 --- /dev/null +++ b/dzz/index/template/main.htm @@ -0,0 +1,112 @@ + + + + + + + + +
    +
    +
    + +

    {lang system_install_success}

    +
    +

    {lang thank_you_of}

    +

    {lang after_installed_tip}

    +

    {lang after_installed_help}

    +
      +
    1. {lang after_installed_step_one} +

      {lang after_installed_step_one_tip}

      +
    2. +
    3. {lang after_installed_step_two}
    4. +
    + +
    + +
    +

    {lang Communication_and_feedback}

    +
    + + + +
    +
    + +
    +
    +
    + + + + \ No newline at end of file diff --git a/dzz/io/download.php b/dzz/io/download.php index f0ed9b6..750872c 100644 --- a/dzz/io/download.php +++ b/dzz/io/download.php @@ -13,6 +13,8 @@ if(!defined('IN_DZZ')) { } define('NOROBOT', TRUE); $path = empty($_GET['icoid'])?trim($_GET['path']):$_GET['icoid']; +$filename = isset($_GET['filename']) ? $_GET['filename'] : ''; +$checkperm = isset($_GET['checkperm']) ? 0 : 1; $patharr=explode(',',$path); $paths=array(); foreach($patharr as $path){ @@ -21,7 +23,7 @@ foreach($patharr as $path){ } } if($paths){ - IO::download($paths,$_GET['filename']); + IO::download($paths,$filename,$checkperm); exit(); }else{ exit('path error!'); diff --git a/dzz/io/thumbnail.php b/dzz/io/thumbnail.php index 55a5f82..6c86dea 100644 --- a/dzz/io/thumbnail.php +++ b/dzz/io/thumbnail.php @@ -6,11 +6,11 @@ * @link http://www.dzzoffice.com * @author zyx(zyx@dzz.cc) */ - $path=dzzdecode(urldecode($_GET['path'])); $width=intval($_GET['width']); $height=intval($_GET['height']); $size=trim($_GET['size']); +$thumbtype=$_GET['thumbtype']?intval($_GET['thumbtype']):'1'; $size=in_array($size,array_keys($_G['setting']['thumbsize']))?$size:''; $original=intval($_GET['original']); if(!$width) $width=$_G['setting']['thumbsize'][$size]['width']; @@ -22,7 +22,7 @@ if($download=='down'){ $filename=$meta['name']; $filesize=$meta['size']; } - $imgurl=IO::getThumb($path,$width,$height,$original,true); + $imgurl=IO::getThumb($path,$width,$height,$original,true,$thumbtype); $filesize=filesize($imgurl); $filename = '"'.(strtolower(CHARSET) == 'utf-8' && (strexists($_SERVER['HTTP_USER_AGENT'], 'MSIE') || strexists($_SERVER['HTTP_USER_AGENT'], 'Edge') || strexists($_SERVER['HTTP_USER_AGENT'], 'rv:11')) ? urlencode($filename) : $filename).'"'; $db = DB::object(); @@ -46,7 +46,7 @@ if($download=='down'){ exit(); }else{ - IO::getThumb($path,$width,$height,$original); + IO::getThumb($path,$width,$height,$original,false,$thumbtype); } if($original){ if($returnurl) return $_G['setting']['attachurl'].'./'.$data['attachment']; diff --git a/dzz/language/zh-cn/lang.php b/dzz/language/zh-cn/lang.php index 020508a..0c35bb4 100644 --- a/dzz/language/zh-cn/lang.php +++ b/dzz/language/zh-cn/lang.php @@ -63,6 +63,7 @@ $lang = array( 'need_email_avation' => '

    你好 {username}:

    你的登录邮箱未验证,你的帐号功能受到限制

    请登录邮箱"{email}",点击激活链接来激活帐号

    邮箱不正确?没有收到邮件?重新验证邮件

    ', 'js_save_error' => '数据保存错误,可能您的网络出现故障!', 'confirmexit' => '您确定要离开', + 'js_save_recover_file' => '确实要覆盖"{filename}"吗?', 'ma' => '吗?', 'WinTitle' => array( 'market' => '应用库', @@ -417,7 +418,7 @@ $lang = array( 'arrow_right' => '→', 'hotkey_ctrl_alt_n' => '切换到指定桌面', 'hotkey_ctrl_alt_d' => '显示桌面', - 'hotkey_ctrl_alt_e' => '注销登陆', + 'hotkey_ctrl_alt_e' => '注销登录', 'system_restore' => '系统还原', 'desk_config' => '默认桌面设置', 'navbar_top' => '导航条置顶', @@ -443,5 +444,26 @@ $lang = array( 'send_file_from_local' => '发送本地文件', 'friendgroup_edit' => '编辑好友分组', 'file_size_beyond' => '文件大小超出', + 'possesor' => '所有者', + 'property' => '属性', + 'preceding_edit_time' => '上次修改时间', + 'preceding_open_time' => '上次打开时间', + 'create_time' => '创建时间', + 'include' => '包含', + 'default_folder_name' => '新建文件夹', + 'new_and_upload' => '新建/上传', + 'word_document' => 'Word 文档', + 'excel_document' => 'Excel 工作表', + 'ppt_document' => 'PPT 演示文稿', + 'cut_success' => '剪切成功', + 'spreadsheet' => '电子表格', + 'power_point' => '演示文稿', + 'pictures_photos' => '图片和照片', + 'pictures' => '图片', + 'document' => '文档', + 'all_type' => '全部类型', + 'please_select_file' => '请选择文件', + 'some_day_after' => '{day}天后', + 'within_a_day' => '1天内', ); ?> diff --git a/dzz/shares/ajax.php b/dzz/shares/ajax.php index 9eb83ff..9e0d6f0 100644 --- a/dzz/shares/ajax.php +++ b/dzz/shares/ajax.php @@ -30,14 +30,7 @@ if(isset($_GET['path'])){//打开文件夹 foreach (DB::fetch_all('select rid from %t where pfid = %d and isdelete < 1',array('resources',$morepath)) as $v){ $rids[] = $v['rid']; } - } - /*if(preg_match('/,/',$morepath)){ - $dpath = explode(',',$morepath); - $rids = array(); - foreach($dpath as $v){ - $rids[] = dzzdecode($v); - } - }*/else{ + } else{ $sid=dzzdecode($_GET['morepath']); $share=C::t('shares')->fetch($sid); $filepaths = $share['filepath']; @@ -49,8 +42,9 @@ if(isset($_GET['currentfolder']) && $_GET['currentfolder']){ }else{ $currentfolder = false; } +$ismobile = helper_browser::ismobile(); $page = (isset($_GET['page'])) ? intval($_GET['page']):1; -$perpage = 20; +$perpage = ($ismobile) ? 10:20; $start = ($page - 1) * $perpage; $gets = array('mod' => 'shares', 'sid' => $sid, ); $theurl = BASESCRIPT . "?" . url_implode($gets); @@ -84,30 +78,40 @@ $limitsql = 'limit '.$start .','. ($perpage); $params = array('resources',$rids); $wheresql = " where rid in(%n) and isdelete < 1"; $list = array(); - - $foldername = ''; $allrids = ''; -if($currentfolder){ - $fileinfo = DB::fetch_first("select * from %t where rid = %s",array('resources',$rids[0])); - $foldername = $fileinfo['name']; - $allrids = dzzencode($fileinfo['rid']); - $list = array(); -}else{ - //获取分享数据 - foreach(DB::fetch_all("select rid from %t $wheresql $ordersql $limitsql",$params) as $v){ - $fileinfo = getfileinfo($v['rid']); - if($open && !$foldername){ - $foldername = DB::result_first("select fname from %t where fid = %d",array('folder',$fileinfo['pfid'])); +if(!empty($rids)){ + if($currentfolder){ + $fileinfo = DB::fetch_first("select * from %t where rid = %s",array('resources',$rids[0])); + $foldername = $fileinfo['name']; + $allrids = dzzencode($fileinfo['rid']); + $list = array(); + }else{ + //获取分享数据 + foreach(DB::fetch_all("select rid from %t $wheresql $ordersql $limitsql",$params) as $v){ + $fileinfo = getfileinfo($v['rid']); + if($open && !$foldername){ + $foldername = DB::result_first("select fname from %t where fid = %d",array('folder',$fileinfo['pfid'])); + } + if($fileinfo['type'] == 'folder' && $fileinfo['oid']) { + $oid = $fileinfo['oid']; + $fileinfo['dhpath'] = $oid; + $fileinfo['filenum'] = $fileinfo['contaions']['contain'][0]; + $fileinfo['foldernum'] = $fileinfo['contaions']['contain'][1]; + } + if ($fileinfo['type'] == 'image') { + $fileinfo['img'] = DZZSCRIPT . '?mod=io&op=thumbnail&width=45&height=45&path=' . dzzencode('attach::' . $fileinfo['aid']); + $fileinfo['imgpath'] = DZZSCRIPT.'?mod=io&op=thumbnail&path='.dzzencode('attach::' . $fileinfo['aid']); + } + $list[] = $fileinfo; + $allrids .= dzzencode($val['rid']).','; } - if($fileinfo['type'] == 'folder' && $fileinfo['oid']) { - $oid = $fileinfo['oid']; - $fileinfo['dhpath'] = $oid; - } - $list[] = $fileinfo; - $allrids .= dzzencode($val['rid']).','; + $allrids = substr($allrids,0,-1); + } +}else{ + if($open && !$foldername){ + $foldername = DB::result_first("select fname from %t where fid = %d",array('folder',$morepath)); } - $allrids = substr($allrids,0,-1); } if (count($list) >= $perpage) { @@ -115,5 +119,10 @@ if (count($list) >= $perpage) { } else { $naxtpage = 0; } -include template('list_item'); +if($ismobile){ + include template('mobile/list_item'); +}else{ + include template('list_item'); +} +dexit(); ?> diff --git a/dzz/shares/images/folder.css b/dzz/shares/images/folder.css index 1d54f85..4fe2732 100644 --- a/dzz/shares/images/folder.css +++ b/dzz/shares/images/folder.css @@ -3,6 +3,7 @@ html, body { overflow: hidden; background: #fff; + min-width:768px; moz-user-select: -moz-none; -moz-user-select: none; -o-user-select:none; @@ -446,9 +447,10 @@ html, body { top: 0; left: 0; width: 100%; - height:64px; + height:65px; z-index: 101; display: none; + min-width: 768px; } .navtoperate{ background-color:#FFFFFF; @@ -492,7 +494,7 @@ html, body { width: auto; color:#666; display: inline-block; - line-height: 64px; + line-height: 65px; } .selectall-box .dzz-backing-out{ font-size: 24px; diff --git a/dzz/shares/images/mobile/password.css b/dzz/shares/images/mobile/password.css new file mode 100644 index 0000000..5c4806b --- /dev/null +++ b/dzz/shares/images/mobile/password.css @@ -0,0 +1,127 @@ +html, body { + background-color: #F2F2F2; + -webkit-tap-highlight-color: transparent; + min-height: 100%; + height: auto; +} +ul,ul li{ + list-style: none; +} +.hide{ + display: none; +} +.weui-cells{ + margin-top: 0rem; +} +.Topcarousel { + display: block; + color: #fff; + font-size: 1rem; + width: 2rem; + height: 2rem; + line-height: 2rem; + text-align: center; + border-radius: 50%; + margin-right: 0.5rem; + font-weight: bold; +} +.weui-cell__bd{ + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + word-break: break-all; +} +.weui-cell__bd h4{ + color: #555555; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + word-break: break-all; +} +.weui-cell__hd .special_avatar_class { + display: block; + width: 2rem; + height: 2rem; + line-height: 2rem; + border-radius: 50%; + margin-right: 0.5rem; +} +.weui-submit{ + padding: 0.75rem; +} +.weui-btn_primary_color{ + background-color: #3779ff; +} +.weui-cell_longpress{ + background-color: #FFFFFF; +} +.weui-cell__hd .weui-cell__recentimg { + width: 2rem; + height: 2rem; + margin-right: 0.5rem; + border-radius: 2px; +} +.weui-cell__bd p{ + color: #999999; + font-size: 0.7rem; +} +.weui-cell__bd p i { + font-style: normal; + margin: 0px 0.25rem; +} +.weui-share-dzzicon{ + font-size: 1.1rem; + color: #3779ff; +} +/*地址栏开始*/ +.weui-address { + position: relative; +} +.weui-index { + position: absolute; + top: 0.4rem; + left: 0.5rem; + width: 3rem; + line-height: 1rem; +} +.weui-index .dzz-index { + font-size: 1.2rem; + color: #3779FF; +} +.weui-index .dzz-index-vline { + font-size: 1.2rem; + color: #DDDDDD; +} +.weui-address-container { + margin-left: 0.5rem; + overflow: hidden; + line-height: 1.7rem; + position: relative; + height: 2rem; +} +.weui-address-field { + position: absolute; + top: 0; + right: 0; + left: 0; + white-space: nowrap; + padding: 0.15rem; + min-width: 100%; +} +.weui-address-field li { + float: left; + color: #666666; +} +.weui-address-field li a { + font-size: 0.7rem; + color: #666666; +} +.weui-address-field li span { + vertical-align: middle; +} +/*地址栏结束*/ +.weui-member-footer{ + background-color: #FFFFFF; + position: fixed; + box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.1); +} diff --git a/dzz/shares/index.php b/dzz/shares/index.php index 4a482eb..b10721c 100644 --- a/dzz/shares/index.php +++ b/dzz/shares/index.php @@ -7,147 +7,178 @@ * @author zyx(zyx@dzz.cc) */ if (!defined('IN_DZZ')) { - exit('Access Denied'); + exit('Access Denied'); } global $_G; $osid = $_GET['sid']; $morepath = $osid; -$sid=dzzdecode($osid); +$sid = dzzdecode($osid); +$ismobile = helper_browser::ismobile(); $do = isset($_GET['do']) ? trim($_GET['do']) : ''; -if($do == 'adddowns'){ - C::t('shares')->add_downs_by_id($sid); - exit(json_encode(array('success'=>true))); -}else{ - $share=C::t('shares')->fetch($sid); - if(!$share){ +if ($do == 'adddowns') { + C::t('shares')->add_downs_by_id($sid); + exit(json_encode(array('success' => true))); +} else { + $share = C::t('shares')->fetch($sid); + if (!$share) { showmessage('share_file_iscancled'); - } - if ($share['status'] == -4)showmessage('shared_links_screened_administrator'); - if ($share['status'] == -5)showmessage('sharefile_isdeleted_or_positionchange'); + } + if ($share['status'] == -4) showmessage('shared_links_screened_administrator'); + if ($share['status'] == -5) showmessage('sharefile_isdeleted_or_positionchange'); //判断是否过期 - if ($share['endtime'] && $share['endtime'] < TIMESTAMP) { - showmessage('share_link_expired'); - } - if ($share['times'] && $share['times'] <= $share['count']) { - showmessage('link_already_reached_max_number'); - } + if ($share['endtime'] && $share['endtime'] < TIMESTAMP) { + showmessage('share_link_expired'); + } + if ($share['times'] && $share['times'] <= $share['count']) { + showmessage('link_already_reached_max_number'); + } - if ($share['status'] == -3) { - showmessage('share_file_deleted'); - } - if ($share['password'] && (dzzdecode($share['password']) != authcode($_G['cookie']['pass_' . $sid]))) { - if (submitcheck('passwordsubmit')) { - if ($_GET['password'] != dzzdecode($share['password'])) { - include template('common/shares_password'); - exit(); - } - dsetcookie('pass_' . $sid, authcode($_GET['password'], 'ENCODE')); - } else { - include template('common/shares_password'); - exit(); - } - } - $sharestatus = array( - '-4' => lang('has_blocked'), - '-3' => lang('file_been_deleted'), - '-2' => lang('exhaust'), - '-1' => lang('have_expired'), - '0' => lang('normal') - ); - $typearr = array( - 'folder' => lang('catalogue'), - 'image' => lang('photo'), - 'app' => lang('type_app'), - 'link' => lang('type_link'), - 'video' => lang('type_video'), - 'attach' => lang('typename_attach'), - 'document' => lang('type_attach'), - 'dzzdoc' => lang('extname_dzzdoc'), - 'url' => lang('rest') - ); - $share['fdateline'] = dgmdate($share['dateline'],'Y-m-d'); - if($share['endtime']){ - $timediff = ($share['endtime'] - $share['dateline']); - $days = 0; - if($timediff > 0){ - $days = ceil($timediff/86400); - } - $share['expireday'] = ($days > 0) ? $days.'天后':'已过期'; - }else{ - $share['expireday'] = '永久有效'; - } - $rids = explode(',',$share['filepath']); - if(count($rids) > 1){ - $share['img'] = '/dzz/explorer/img/ic-files.png'; - }else{ - $share['img'] = C::t('resources')->get_icosinfo_by_rid($share['filepath']); - } - $shareuser = C::t('user')->fetch($share['uid']); - $shareusername = $shareuser['username']; + if ($share['status'] == -3) { + showmessage('share_file_deleted'); + } + if ($share['password'] && (dzzdecode($share['password']) != authcode($_G['cookie']['pass_' . $sid]))) { + if (submitcheck('passwordsubmit')) { + if ($_GET['password'] != dzzdecode($share['password'])) { + if ($ismobile) { + include template('mobile/share_password'); + } else { + include template('password'); + } + exit(); + } + dsetcookie('pass_' . $sid, authcode($_GET['password'], 'ENCODE')); + } else { + if ($ismobile) { + include template('mobile/share_password'); + } else { + include template('password'); + } + exit(); + } + } + $sharestatus = array( + '-4' => lang('has_blocked'), + '-3' => lang('file_been_deleted'), + '-2' => lang('exhaust'), + '-1' => lang('have_expired'), + '0' => lang('normal') + ); + $typearr = array( + 'folder' => lang('catalogue'), + 'image' => lang('photo'), + 'app' => lang('type_app'), + 'link' => lang('type_link'), + 'video' => lang('type_video'), + 'attach' => lang('typename_attach'), + 'document' => lang('type_attach'), + 'dzzdoc' => lang('extname_dzzdoc'), + 'url' => lang('rest') + ); + $share['fdateline'] = dgmdate($share['dateline'], 'Y-m-d'); + if ($share['endtime']) { + $timediff = ($share['endtime'] - $share['dateline']); + $days = 0; + if ($timediff > 0) { + $days = ceil($timediff / 86400); + } + $share['expireday'] = ($days > 0) ? $days . '天后' : '已过期'; + } else { + $share['expireday'] = '永久有效'; + } + $rids = explode(',', $share['filepath']); + if (count($rids) > 1) { + $share['img'] = '/dzz/explorer/img/ic-files.png'; + } else { + $share['img'] = C::t('resources')->get_icosinfo_by_rid($share['filepath']); + } + if ($share['uid']) { + $userinfo = DB::fetch_first("select u.avatarstatus,u.username,u.uid,s.svalue from %t u + left join %t s on u.uid=s.uid and s.skey=%s where u.uid = %d", array('user', 'user_setting', 'headerColor', $share['uid'])); + if ($userinfo['avatarstatus'] == 1) { + $shareuser['avatarstatus'] = 1; + } else { + $shareuser['avatarstatus'] = 0; + $shareuser['headerColor'] = $userinfo['svalue']; + } + $shareuser['username'] = $userinfo['username']; + $shareuser['firstword'] = strtoupper(new_strsubstr($shareuser[username],1,'')); + } //增加浏览次数 C::t('shares')->add_views_by_id($sid); - $page = (isset($_GET['page'])) ? intval($_GET['page']):1; - $perpage = 20; - $start = ($page - 1) * $perpage; - $gets = array('mod' => 'shares', 'sid' => $sid, ); - $theurl = BASESCRIPT . "?" . url_implode($gets); - $ordersql = ''; - $asc = (isset($_GET['asc'])) ? intval($_GET['asc']):1; - $disp = (isset($_GET['disp'])) ? intval($_GET['disp']):0; - $order = ($asc > 0) ? 'ASC':'DESC'; - switch ($disp) { - case 0: - $orderby = 'name'; - break; - case 1: - $orderby = 'size'; - break; - case 2: - $orderby = array('type', 'ext'); - break; - case 3: - $orderby = 'dateline'; - break; - } - if(is_array($orderby)){ - foreach($orderby as $key=>$value){ - $orderby[$key]=$value.' '.$order; - } - $ordersql=' ORDER BY '.implode(',',$orderby); - }elseif($orderby){ - $ordersql=' ORDER BY '.$orderby.' '.$order; - } - $limitsql = 'limit '.$start .','. ($start + $perpage); + $page = (isset($_GET['page'])) ? intval($_GET['page']) : 1; + $perpage = ($ismobile) ? 10 : 20; + $start = ($page - 1) * $perpage; + $gets = array('mod' => 'shares', 'sid' => $sid,); + $theurl = BASESCRIPT . "?" . url_implode($gets); + $ordersql = ''; + $asc = (isset($_GET['asc'])) ? intval($_GET['asc']) : 1; + $disp = (isset($_GET['disp'])) ? intval($_GET['disp']) : 0; + $order = ($asc > 0) ? 'ASC' : 'DESC'; + switch ($disp) { + case 0: + $orderby = 'name'; + break; + case 1: + $orderby = 'size'; + break; + case 2: + $orderby = array('type', 'ext'); + break; + case 3: + $orderby = 'dateline'; + break; + } + if (is_array($orderby)) { + foreach ($orderby as $key => $value) { + $orderby[$key] = $value . ' ' . $order; + } + $ordersql = ' ORDER BY ' . implode(',', $orderby); + } elseif ($orderby) { + $ordersql = ' ORDER BY ' . $orderby . ' ' . $order; + } + $limitsql = 'limit ' . $start . ',' . ($start + $perpage); //获取分享文件rid信息 - $filepaths = $share['filepath']; - $rids = explode(',',$filepaths); + $filepaths = $share['filepath']; + $rids = explode(',', $filepaths); - $params = array('resources',$rids); - $wheresql = " where rid in(%n) and isdelete < 1"; - $list = array(); + $params = array('resources', $rids); + $wheresql = " where rid in(%n) and isdelete < 1"; + $list = array(); $allrids = ''; - - $count = DB::result_first("select count(*) from %t $wheresql $ordersql $limitsql",$params); + $count = DB::result_first("select count(*) from %t $wheresql $ordersql $limitsql", $params); //获取分享数据 - foreach(DB::fetch_all("select rid from %t $wheresql $ordersql $limitsql",$params) as $v){ - $fileinfo = getfileinfo($v['rid']); - if($fileinfo['type'] == 'folder' && $fileinfo['oid']) { - $oid = $fileinfo['oid']; - $fileinfo['dhpath'] = $oid; - } - $list[] = $fileinfo; - $allrids .= dzzencode($v['rid']).','; - } - if(count($list) < 1){ - DB::update('shares',array('status'=>'-3'),array('id'=>$sid)); - showmessage('share_file_deleted'); - } - $allrids =substr($allrids,0,-1); + foreach (DB::fetch_all("select rid from %t $wheresql $ordersql $limitsql", $params) as $v) { + $fileinfo = getfileinfo($v['rid']); + if ($fileinfo['type'] == 'folder' && $fileinfo['oid']) { + $oid = $fileinfo['oid']; + $fileinfo['dhpath'] = $oid; + $fileinfo['filenum'] = $fileinfo['contaions']['contain'][0]; + $fileinfo['foldernum'] = $fileinfo['contaions']['contain'][1]; + } + if ($fileinfo['type'] == 'image') { + $fileinfo['img'] = DZZSCRIPT . '?mod=io&op=thumbnail&width=45&height=45&path=' . dzzencode('attach::' . $fileinfo['aid']); + $fileinfo['imgpath'] = DZZSCRIPT . '?mod=io&op=thumbnail&path=' . dzzencode('attach::' . $fileinfo['aid']); + } + $list[] = $fileinfo; + $allrids .= dzzencode($v['rid']) . ','; + } + if (count($list) < 1) { + DB::update('shares', array('status' => '-3'), array('id' => $sid)); + showmessage('share_file_deleted'); + } + $is_wxwork = helper_browser::is_wxwork();//判断是否是企业微信 + $allrids = substr($allrids, 0, -1); if (count($list) >= $perpage) { $nextpage = $page + 1; } else { $naxtpage = 0; } - include template('list'); + + if ($ismobile) { + include template('mobile/list'); + } else { + include template('list'); + } + } ?> diff --git a/dzz/shares/language/zh-cn/lang.php b/dzz/shares/language/zh-cn/lang.php index 9d68017..3cfeffb 100644 --- a/dzz/shares/language/zh-cn/lang.php +++ b/dzz/shares/language/zh-cn/lang.php @@ -10,6 +10,12 @@ $lang = array ( 'file_been_deleted'=>'文件已删除', 'change_list'=>'切换列表', 'change_thumbnail'=>'切换缩略图', + 'password_share'=>'加密分享', + 'password_share_to'=>'给您加密分享了文件', + 'password_share_lable'=>'请输入提取密码:', + 'password_share_placeholder'=>'请填写提取密码', + 'password_share_submit'=>'提取文件', + 'password_share'=>'请输入提取密码' ); ?> \ No newline at end of file diff --git a/dzz/shares/save.php b/dzz/shares/save.php index d9945f9..0873416 100644 --- a/dzz/shares/save.php +++ b/dzz/shares/save.php @@ -11,7 +11,10 @@ if (!defined('IN_DZZ')) { global $_G; Hook::listen('check_login');//检查是否登录,未登录跳转到登录界面 $uid = $_G['uid']; -$dzzrids = isset($_GET['dzzrids']) ? trim($_GET['dzzrids']) : ''; +$dzzrids = isset($_GET['dzzrids']) ? trim($_GET['dzzrids']) :''; +if(!$dzzrids){ + $dzzrids = $_GET['token']['paths']; +} $icoids = explode(',', $dzzrids); $data = array(); $ridarr = array(); @@ -45,6 +48,7 @@ if(!$doing){ $totalsize = 0; $icos = $folderids = array(); $i = 0; +$errorarr = array(); foreach ($icoids as $icoid) { $rid = dzzdecode($icoid); if (empty($rid)) { @@ -67,6 +71,16 @@ foreach ($icoids as $icoid) { $data['name'][$return['newdata']['rid']] = $return['newdata']['name']; $data['error'][$return['newdata']['rid']] = $return['newdata']['name'] . ':' . $return['error']; $data['msg'][$return['newdata']['rid']] = 'error'; + $errorarr[] = $return['error']; } } -exit(json_encode($data)); +if(isset($_GET['token'])){ + if(count($errorarr)){ + exit(json_encode(array('error'=>$errorarr[0]))); + }else{ + exit(json_encode(array('success'=>true))); + } +}else{ + exit(json_encode($data)); +} + diff --git a/dzz/shares/scripts/mobile/appevent.js b/dzz/shares/scripts/mobile/appevent.js new file mode 100644 index 0000000..365e9b4 --- /dev/null +++ b/dzz/shares/scripts/mobile/appevent.js @@ -0,0 +1,214 @@ +/** + * Created by a on 2018/5/3. + */ +(function($){ + var touch = {}, + touchTimeout, tapTimeout, swipeTimeout, longTapTimeout, + longTapDelay = 500, + gesture, + down, up, move, + eventMap, + initialized = false + + function swipeDirection(x1, x2, y1, y2) { + return Math.abs(x1 - x2) >= + Math.abs(y1 - y2) ? (x1 - x2 > 0 ? 'Left' : 'Right') : (y1 - y2 > 0 ? 'Up' : 'Down') + } + + function longTap() { + longTapTimeout = null + if (touch.last) { + touch.el.trigger('longTap') + touch = {} + } + } + + function cancelLongTap() { + if (longTapTimeout) clearTimeout(longTapTimeout) + longTapTimeout = null + } + + function cancelAll() { + if (touchTimeout) clearTimeout(touchTimeout) + if (tapTimeout) clearTimeout(tapTimeout) + if (swipeTimeout) clearTimeout(swipeTimeout) + if (longTapTimeout) clearTimeout(longTapTimeout) + touchTimeout = tapTimeout = swipeTimeout = longTapTimeout = null + touch = {} + } + + function isPrimaryTouch(event){ + return (event.pointerType == 'touch' || + event.pointerType == event.MSPOINTER_TYPE_TOUCH) + && event.isPrimary + } + + function isPointerEventType(e, type){ + return (e.type == 'pointer'+type || + e.type.toLowerCase() == 'mspointer'+type) + } + + // helper function for tests, so they check for different APIs + function unregisterTouchEvents(){ + if (!initialized) return + $(document).off(eventMap.down, down) + .off(eventMap.up, up) + .off(eventMap.move, move) + .off(eventMap.cancel, cancelAll) + $(window).off('scroll', cancelAll) + cancelAll() + initialized = false + } + + function setup(__eventMap){ + var now, delta, deltaX = 0, deltaY = 0, firstTouch, _isPointerType + + unregisterTouchEvents() + + eventMap = (__eventMap && ('down' in __eventMap)) ? __eventMap : + ('ontouchstart' in document ? + { 'down': 'touchstart', 'up': 'touchend', + 'move': 'touchmove', 'cancel': 'touchcancel' } : + 'onpointerdown' in document ? + { 'down': 'pointerdown', 'up': 'pointerup', + 'move': 'pointermove', 'cancel': 'pointercancel' } : + 'onmspointerdown' in document ? + { 'down': 'MSPointerDown', 'up': 'MSPointerUp', + 'move': 'MSPointerMove', 'cancel': 'MSPointerCancel' } : false) + + // No API availables for touch events + if (!eventMap) return + + if ('MSGesture' in window) { + gesture = new MSGesture() + gesture.target = document.body + + $(document) + .bind('MSGestureEnd', function(e){ + var swipeDirectionFromVelocity = + e.velocityX > 1 ? 'Right' : e.velocityX < -1 ? 'Left' : e.velocityY > 1 ? 'Down' : e.velocityY < -1 ? 'Up' : null + if (swipeDirectionFromVelocity) { + touch.el.trigger('swipe') + touch.el.trigger('swipe'+ swipeDirectionFromVelocity) + } + }) + } + + down = function(e){ + if((_isPointerType = isPointerEventType(e, 'down')) && + !isPrimaryTouch(e)) return + firstTouch = _isPointerType ? e :((e.touches) ? e.touches[0]:e.originalEvent.changedTouches[0]) + if (e.touches && e.touches.length === 1 && touch.x2) { + // Clear out touch movement data if we have it sticking around + // This can occur if touchcancel doesn't fire due to preventDefault, etc. + touch.x2 = undefined + touch.y2 = undefined + } + now = Date.now() + delta = now - (touch.last || now) + touch.el = jQuery('tagName' in firstTouch.target ? + firstTouch.target : firstTouch.target.parentNode) + touchTimeout && clearTimeout(touchTimeout) + touch.x1 = firstTouch.pageX + touch.y1 = firstTouch.pageY + if (delta > 0 && delta <= 250) touch.isDoubleTap = true + touch.last = now + longTapTimeout = setTimeout(longTap, longTapDelay) + // adds the current touch contact for IE gesture recognition + if (gesture && _isPointerType) gesture.addPointer(e.pointerId) + } + + move = function(e){ + if((_isPointerType = isPointerEventType(e, 'move')) && + !isPrimaryTouch(e)) return + firstTouch = _isPointerType ? e :((e.touches) ? e.touches[0]:e.originalEvent.changedTouches[0]) + cancelLongTap() + touch.x2 = firstTouch.pageX + touch.y2 = firstTouch.pageY + + deltaX += Math.abs(touch.x1 - touch.x2) + deltaY += Math.abs(touch.y1 - touch.y2) + } + + up = function(e){ + if((_isPointerType = isPointerEventType(e, 'up')) && + !isPrimaryTouch(e)) return + cancelLongTap() + + // swipe + if ((touch.x2 && Math.abs(touch.x1 - touch.x2) > 30) || + (touch.y2 && Math.abs(touch.y1 - touch.y2) > 30)) + + swipeTimeout = setTimeout(function() { + if (touch.el){ + touch.el.trigger('swipe') + touch.el.trigger('swipe' + (swipeDirection(touch.x1, touch.x2, touch.y1, touch.y2))) + } + touch = {} + }, 0) + + // normal tap + else if ('last' in touch) + // don't fire tap when delta position changed by more than 30 pixels, + // for instance when moving to a point and back to origin + if (deltaX < 30 && deltaY < 30) { + // delay by one tick so we can cancel the 'tap' event if 'scroll' fires + // ('tap' fires before 'scroll') + tapTimeout = setTimeout(function() { + + // trigger universal 'tap' with the option to cancelTouch() + // (cancelTouch cancels processing of single vs double taps for faster 'tap' response) + var event = jQuery.Event('tap') + event.cancelTouch = cancelAll + // [by paper] fix -> "TypeError: 'undefined' is not an object (evaluating 'touch.el.trigger'), when double tap + if (touch.el) touch.el.trigger(event) + + // trigger double tap immediately + if (touch.isDoubleTap) { + if (touch.el) touch.el.trigger('doubleTap') + touch = {} + } + + // trigger single tap after 250ms of inactivity + else { + touchTimeout = setTimeout(function(){ + touchTimeout = null + if (touch.el) touch.el.trigger('singleTap') + touch = {} + }, 250) + } + }, 0) + } else { + touch = {} + } + deltaX = deltaY = 0 + } + + jQuery(document).on(eventMap.up, up) + .on(eventMap.down, down) + .on(eventMap.move, move) + + // when the browser window loses focus, + // for example when a modal dialog is shown, + // cancel all ongoing events + jQuery(document).on(eventMap.cancel, cancelAll) + + // scrolling the window indicates intention of the user + // to scroll, not tap or swipe, so cancel all ongoing events + jQuery(window).on('scroll', cancelAll) + + initialized = true + } + + ;['swipe', 'swipeLeft', 'swipeRight', 'swipeUp', 'swipeDown', + 'doubleTap', 'tap', 'singleTap', 'longTap'].forEach(function(eventName){ + jQuery.fn[eventName] = function(callback){return this.on(eventName, callback) } + /*jQuery.fn[eventName] = function(callback){ + return jQuery(document).off(eventName).on(eventName,this,callback) + }*/ + }) + + jQuery.touch = { setup: setup } + + jQuery(document).ready(setup) +})(jQuery) diff --git a/dzz/shares/scripts/mobile/share.js b/dzz/shares/scripts/mobile/share.js new file mode 100644 index 0000000..dc10880 --- /dev/null +++ b/dzz/shares/scripts/mobile/share.js @@ -0,0 +1,170 @@ +//开始长按 +/* + $(document).bind('contextmenu',function(){ + var e=event; + e.preventDefault(); + })*/ +var selectors = []; +//打开文件 +$(document).off('tap.openfile').on('tap.openfile', '.filelist', function () { + var obj = $(this), dpath = obj.data('dpath'); + if (selectors.length > 0) { + select_file(obj); + return false; + } else { + if (is_wxwork) { + window.location.href = href; + return false; + } else { + var dpath = obj.data('dpath'); + var preurl = 'share.php?a=view&s=' + dpath; + window.open(preurl); + } + } + + +}) +//打开文件夹 +$(document).off('tap.openfolder').on('tap.openfolder', '.folderlist', function () { + var obj = $(this), dhpath = obj.data('dhpath'), dpath = obj.data('dpath'); + if (selectors.length > 0) { + select_file(obj); + return false; + } else { + $.post(MOD_URL + '&op=ajax', {path: dhpath, currentfolder: 0}, function (data) { + $('#dataContainer').html(data); + $('#filelist').html($('#dataContainer').find('.module-list').html()); + $($('#dataContainer').find('.breadcrumb-data:first').html()).insertAfter($('.breadcrumb li').last()); + $('.breadcrumb li:not(:last)').each(function () { + $(this).removeClass('active'); + $(this).html('' + $(this).html() + ''); + }); + $('#weui_address_scroll').navbarscroll(); + height(); + $('#dataContainer').empty(); + }) + } +}) +//选择文件 +function select_file(obj) { + var dpath = obj.data('dpath'), index = $.inArray(dpath, selectors); + if (obj.find('.weui-cells_checkbox .weui-check').prop('checked')) { + obj.find('.weui-cells_checkbox').addClass('hide'); + obj.find('.weui-cell__ft').removeClass('hide'); + obj.find('.weui-cells_checkbox .weui-check').prop('checked', false) + if (index != -1) { + selectors.splice(index, 1); + } + } else { + obj.find('.weui-cells_checkbox').removeClass('hide'); + obj.find('.weui-cell__ft').addClass('hide'); + obj.find('.weui-cells_checkbox .weui-check').prop('checked', true) + if (index == -1) { + selectors.push(dpath); + } + } + chk_select(); +} +//选择文件 +$(document).off('longTap.select').on('longTap.select', '.weui-cell_longpress', function () { + var obj = $(this); + select_file(obj); +}) +function chk_select() { + if (selectors.length > 0) { + $('.weui-cells_checkbox').removeClass('hide'); + $('.weui-cell__ft').addClass('hide'); + } else { + $('.weui-cells_checkbox').addClass('hide'); + $('.weui-cell__ft').removeClass('hide'); + } + return false; +} +$(document).off('tap.route').on('tap.route', '.route', function () { + var obj = $(this); + var href = obj.data('href'); + $.post(href, {currentfolder: 0}, function (data) { + $('#dataContainer').html(data); + $('#filelist').html($('#dataContainer').find('.module-list').html()); + obj.nextAll('li').remove(); + $('.breadcrumb li:not(:last)').each(function () { + $(this).removeClass('active'); + }); + $('#weui_address_scroll').navbarscroll(); + $('#dataContainer').empty(); + }) +}) +//加载更多 +//单页滚动加载 +var loading = false; //状态标记 +$(document.body).infinite().on("infinite", function () { + if (loading) return; + loading = true; + if (nextpage) { + $.post(DZZSCRIPT + '?mod=shares&op=ajax', {'morepath': morepath, 'page': nextpage}, function (data) { + $('#dataContainer').html(data); + $('#filelist').append($('#dataContainer').find('.module-list').html()); + $('#dataContainer').empty(); + }) + } else { + jQuery(document.body).destroyInfinite(); + } +}); +//保存文件 +$(document).off('tap.savefile').on('tap.savefile', '.savefiles', function () { + var action = 'index.php?mod=system&op=mobilefileselection&type=2&handlekey=seldir&allowcreate=1', + rids = [], callback_url = encodeURI(MOD_URL + '&op=save'), token = {}; + if (selectors.length > 0) { + rids = selectors.join(','); + } else { + $('.weui-cell_longpress').each(function () { + var rid = $(this).data('dpath'); + rids.push(rid); + }) + rids = rids.join(','); + } + token = {"paths": rids}; + if ($('#submitForm').length < 1) { + var form = $('
    '); + $(document.body).append(form); + } else { + form = $('#submitForm'); + } + if ($('#tokendata').length < 1) { + var tokendata = $(''); + form.append(tokendata); + } else { + var tokendata = $('#tokendata'); + } + + tokendata.val(JSON.stringify(token)); + if ($('#callbackdata').length < 1) { + var callbackdata = $(''); + form.append(callbackdata); + } else { + var callbackdata = $('#callbackdata'); + } + callbackdata.val(callback_url); + form.attr('action', action); + form.attr('method', 'post'); + form.submit(); + return false; + +}) +//下载文件 +$(document).off('tap.down').on('tap.down', '.downfile', function () { + var href = DZZSCRIPT + '?mod=io&op=download&checkperm=false', + rids = []; + if (selectors.length > 0) { + rids = selectors.join(','); + } else { + $('.weui-cell_longpress').each(function () { + var rid = $(this).data('dpath'); + rids.push(rid); + }) + rids = rids.join(','); + } + href = href + '&path=' + rids; + downfile(href); +}) + diff --git a/dzz/shares/template/header_right.htm b/dzz/shares/template/header_right.htm index d8717e1..67dba7e 100644 --- a/dzz/shares/template/header_right.htm +++ b/dzz/shares/template/header_right.htm @@ -1,5 +1,5 @@
    -
    +
    - +
    diff --git a/dzz/shares/template/mobile/list.htm b/dzz/shares/template/mobile/list.htm new file mode 100644 index 0000000..2048512 --- /dev/null +++ b/dzz/shares/template/mobile/list.htm @@ -0,0 +1,120 @@ + + + + + + + +分享列表 + + + + + + + +
    +
    + + + + {$shareuser[firstword]} + +
    +
    +

    $shareuser[username]的分享文件

    +
    +
    + +
    +
    + +
    +
    + +
    + + +
    +
    +
    +

    $v[name]

    +

    + 文件:$v[filenum], + 文件夹:$v[foldernum] +

    +
    + +
    +
    + + +
    +
    + +
    +
    +
    +

    $v[name]

    +

    + $v[fsize]{eval echo dgmdate($v[dateline],'Y/m/d');} + {eval echo dgmdate($v[dateline],'H:i');} +

    +
    +
    + + +
    +
    + + +
    + +
    + + + + + + + + + + + diff --git a/dzz/shares/template/mobile/list_item.htm b/dzz/shares/template/mobile/list_item.htm new file mode 100644 index 0000000..692152a --- /dev/null +++ b/dzz/shares/template/mobile/list_item.htm @@ -0,0 +1,45 @@ + +
    + + +
    +
    +
    +

    $v[name]

    +

    + 文件:$v[filenum], + 文件夹:$v[foldernum] +

    +
    + +
    +
    + + +
    +
    + +
    +
    +
    +

    $v[name]

    +

    + $v[fsize]{eval echo dgmdate($v[dateline],'Y/m/d');} + {eval echo dgmdate($v[dateline],'H:i');} +

    +
    +
    + + +
    +
    + + +
    + \ No newline at end of file diff --git a/dzz/shares/template/mobile/share_password.htm b/dzz/shares/template/mobile/share_password.htm new file mode 100644 index 0000000..f9f0a7e --- /dev/null +++ b/dzz/shares/template/mobile/share_password.htm @@ -0,0 +1,39 @@ + + + + + + + +{lang password_share} + + + + + + + +
    +
    +
    {eval echo avatar_block($share['uid']);}
    +
    +

    {$share[username]}{lang password_share_to}

    +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + + + + diff --git a/dzz/shares/template/password.htm b/dzz/shares/template/password.htm new file mode 100644 index 0000000..32bbb96 --- /dev/null +++ b/dzz/shares/template/password.htm @@ -0,0 +1,86 @@ + + + + + + {lang password_share} + + + + + + + + + + + +
    +
    + {eval echo avatar_block($share['uid']);} {$share[username]}{lang password_share_to} + +
    +
    + +
    +

    {lang password_share_lable}

    +
    + +
    + +
    +
    + + +
    +
    +
    + + + + \ No newline at end of file diff --git a/dzz/shares/template/share_password.htm b/dzz/shares/template/share_password.htm new file mode 100644 index 0000000..e085552 --- /dev/null +++ b/dzz/shares/template/share_password.htm @@ -0,0 +1,18 @@ + + + + + + + +成员 + + + + + + + + + + diff --git a/dzz/system/at.php b/dzz/system/at.php index cee27f2..196c7ab 100644 --- a/dzz/system/at.php +++ b/dzz/system/at.php @@ -12,8 +12,7 @@ //error_reporting(E_ALL); include_once libfile('function/organization'); - include_once dzz_libfile('class/pinyin'); - $py = new PinYin(); + $data=array(); $term=trim($_GET['term']); $filter=intval($_GET['filter']);//0:机构和用户;1:仅用户;2:仅机构 @@ -24,10 +23,11 @@ $sql_user.=" and username LIKE %s"; $param_user[]='%'.$term.'%'; } + foreach(DB::fetch_all("select u.uid,u.username from %t u LEFT JOIN %t s on u.uid=s.uid $sql_user order by s.lastactivity DESC limit 10",$param_user) as $value){ if($value['uid']!=$_G['uid']){ $data[]=array('name'=>$value['username'], - 'searchkey'=> $py->getAllPY($value['username']).$value['username'], + 'searchkey'=> pinyin::encode($value['username'],'all').$value['username'], 'id'=>'u'.$value['uid'], 'icon'=>'avatar.php?uid='.$value['uid'].'&size=small', 'title'=>$value['username'].':'.'u'.$value['uid'] @@ -35,12 +35,6 @@ } } - $param_org=array('organization'); - $sql_org="where 1"; - if($term){ - $sql_org.=" and orgname LIKE %s"; - $param_org[]='%'.$term.'%'; - } } if($filter==2 || !$filter){ $orgids=array(); @@ -61,7 +55,7 @@ } $data[]=array('name'=>$org['orgname'], 'title'=>implode('-',$titles), - 'searchkey'=> $py->getAllPY($org['orgname']).$org['orgname'], + 'searchkey'=> pinyin::encode($org['orgname'],'all').$org['orgname'], 'id'=>'g'.$org['orgid'], 'icon'=>$org['forgid']?'dzz/system/images/department.png':'dzz/system/images/organization.png' ); @@ -85,7 +79,7 @@ } $data[]=array('name'=>$org['orgname'], 'title'=>implode('-',$titles), - 'searchkey'=> $py->getAllPY($org['orgname']).$org['orgname'], + 'searchkey'=> pinyin::encode($org['orgname'],'all').$org['orgname'], 'id'=>'g'.$org['orgid'], 'icon'=>$org['forgid']?'dzz/system/images/department.png':'dzz/system/images/organization.png' ); @@ -101,7 +95,7 @@ } $data[]=array( 'name'=>$org['orgname'], 'title'=>implode('-',$titles), - 'searchkey'=> $py->getAllPY($org['orgname']).$org['orgname'], + 'searchkey'=> pinyin::encode($org['orgname'],'all').$org['orgname'], 'id'=>'g'.$org['orgid'], 'icon'=>$org['forgid']?'dzz/system/images/department.png':'dzz/system/images/organization.png' ); diff --git a/dzz/system/css/file_detailed.css b/dzz/system/css/file_detailed.css new file mode 100644 index 0000000..18635a5 --- /dev/null +++ b/dzz/system/css/file_detailed.css @@ -0,0 +1,2010 @@ +/*头部操作*/ + +.new-buildMenu{ + float: right; +} +.header-toggle .sizeMenu li a{ + color: #FFFFFF; +} +.sizeMenu{ + float:right!important; +} +.sizeMenu li a{ + float: left; + padding: 0 6px; + line-height: 34px; + cursor:pointer; +} +.sizeMenu li.background-toggle{ + background-color:rgba(0,0,0,0.2) ; + border-radius: 50%; + width: 34px; + height: 34px; +} +.sizeMenu li a i{ + font-size: 22px; + vertical-align: -4px; + +} +.sizeMenu li.rightswitch{ + display: none; +} +.sizeMenu li.listchange{ + display: none; +} +.new-buildMenu{ + display: none; +} +.select-toperate-right .sizeMenu{ + padding-right: 15px; +} +.select-toperate-right .sizeMenu li a{ + color: rgba(78,85,99,0.65); +} +.select-toperate-right .sizeMenu li a:hover{ + color: rgba(78,85,99,1); +} +.select-toperate-right .sizeMenu li .icons-thumbnail{ + padding: 0 8px 0px 14px; +} +/*头部操作*/ +/*我的网盘开始*/ +.yunfile-upload{ + position: relative; +} + +.dropdown-menu{ + border-radius: 2px; + box-shadow: 0px 4px 13px 0px rgba(62, 62, 62, 0.28); + border: 1px solid #d8d8d8; +} +.new-buildMenu .dropdown-menu{ + width: 190px; +} +.new-buildMenu .dropdown-menu li:hover a,.yunfile-moreMenu .dropdown-menu>li:hover>a{ + color:rgba(76, 137, 251, 1); +} +.new-buildMenu .newMenu{ + display: inline-block; + margin-right: 5px; +} +.btn-cricular{ + border-radius:500px; + color: #FFFFFF; + background: none; +} +.btn-cricular:hover,.btn-cricular:focus{ + color: #FFFFFF; + background-color: rgba(0, 0, 0,0.2); + box-shadow: none; +} +/*我的网盘结束*/ +/*文件列表模板详情开始*/ +.filemanage-detail-header{ + position: relative; +} +/*.scroll-y{ + padding-right: 25px; +}*/ +.filemanage .table th{ + border-bottom: 1px solid #EEEEEE; +} +.filemanage .detail_header_asc_1{ + background: none; +} +.filemanage .detail_header_asc_0{ + background: none; +} +.filemanage .detail_header_asc{ + vertical-align: text-top; +} +.filemanage .detail_header_asc_1 span,.filemanage .detail_header_asc_0 span{ + display: none; +} +.filemanage .detail_header_asc_1 .dzz-expand-less{ + display: inline-block; + color:#3779ff; +} +.filemanage .detail_header_asc_0 .dzz-expand-more{ + display: inline-block; + color:#3779ff; +} +.filemanage .table{ + border-collapse:inherit; + margin: 0; +} +.filemanage .table td{ + border-bottom: 1px solid #EEEEEE; + border-top:none; + +} +.table>tbody>tr>td, .table>tfoot>tr>td, .table>thead>tr>td{ + padding: 0.85rem; +} +.table>thead>tr>th,.table>tfoot>tr>th,.table>tbody>tr>th{ + padding:1.42rem 0.85rem; +} +.filemanage .detail_tr.hover{ + background: #F2F2F2; +} +.filemanage .detail_tr.Icoselected{ + background:#3779ff; +} +.filemanage .detail_tr.Icoblock .dzz-colllection-item{ + vertical-align: middle; + padding-left: 5px; + color: #BBBBBB; + cursor: default; +} +.filemanage .detail_tr.Icoselected .dzz-colllection-item{ + vertical-align: middle; + padding-left: 5px; + color: #fff; +} +.filemanage .detail_tr.Icoselected td{ + border-bottom: 1px solid transparent; + color: #FFFFFF; +} +.filemanage .detail_tr.Icoselected td .IcoText_folder,.filemanage .detail_tr.Icoselected td .detail_item_td_position_span{ + color: #FFFFFF; +} +.filemanage .detail_tr.Icoselected td .hoverTools .btn{ + color: #FFFFFF; +} +.filemanage .detail_text{ + text-shadow: none; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + line-height: inherit; + max-width: -webkit-calc(100% - 60px); + display: inline-block; + float: left; +} +.selectbox{ + background-image: url(../images/checkbox-check.png)!important; +} +.Icoselected .selectbox{ + background-image: url(../images/checkbox-box.png)!important; +} +.member_item_td_select,.detail_item_td_select{ + padding-top: 2px; +} +.hover .icoblank_rightbottom{ + background-image: none!important; +} +.Icoselected .icoblank_rightbottom{ + background-image: none!important; +} +.window .icoblank_rightbottom{ + background-color: transparent; +} +.hoverTools{ + display:none; + top:8px; + right:8px; + float:right; +} +.filemanage .detail_item_name_icon, .DragCopy .detail_item_name_icon{ + margin-right: 0px; +} +.filemanage .detail_item_td_name{ + width: calc(100% - 70px); + width: -webkit-calc(100% - 70px); + width: -moz-calc(100% - 70px); +} +.hover .hoverTools{ + display:block; +} +.renaming .hoverTools{/*重命名时不显示*/ + display:none; +} +.filemanage .detail_header_td_div{ + overflow: hidden; + position: relative; + white-space: nowrap; + text-overflow: ellipsis; +} +.filemanage .detail_item_td_name,.filemanage td,.filemanage th{ + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + line-height:inherit; +} + +.yunfile-btnMenu .btn,.yunfile-moreMenu .btn,.recycle-option-icon .btn,.share-option-icon .btn{ + padding:0px; + font-size:14px; + background:none; + border:0; + box-shadow: none; +} +.yunfile-btnMenu .btn i,.recycle-option-icon .btn span,.share-option-icon .btn span{ + font-size: 22px; + vertical-align: top; + padding: 5px 9px; + display: inline-block; +} +.yunfile-moreMenu .btn i{ + font-size: 22px; + vertical-align: top; + padding: 5px 14px 5px 7px; + display: inline-block; +} +.hoverTools .btn,.member_hoverTools .btn{ + color: rgba(78,85,99,0.65); + font-size: 18px; + padding:0px 7px; + background:none; + border:0; + box-shadow: none; +} +.hoverTools .btn:hover,.member_hoverTools .btn:hover{ + color:rgba(78,85,99,1); +} +.recycle-option-icon .btn:hover,.share-option-icon .btn:hover{ + /*background:RGBA(0,0,0,.05);*/ + box-shadow: none; + color: #666666; + opacity: 1; +} +.detail_header_tr th{ + color:rgba(99, 99, 99, 1); +} +.mousehover{ + display: none; +} +/*.shareMenu{ + float:right; + display: inline-block; + line-height: 64px; +}*/ +/*.shareMenu button:focus{ + border:none; + outline: none; + outline-offset:0; +}*/ +.shareMenu .btn:focus{ + border:none; + outline: none; + outline-offset:0; +} +.shareMenu .btn{ + color: rgba(78,85,99,0.65); +} + +.yunfile-btnMenu .btn:hover,.yunfile-moreMenu .btn:hover{ + color: rgba(78,85,99,1); +} +.recycle-option-icon button,.share-option-icon button{ + color: #666666; + opacity: 0.65; +} +.yunfile-moreMenu{ + border-right: 1px solid rgba(0, 0, 0, 0.1); +} +.yunfile-btnMenu,.yunfile-moreMenu{ + display: inline-block; +} +.yunfile-moreMenu .dropdown-menu{ + width:auto; + min-width:130px; +} +.yunfile-moreMenu .dropdown-menu>.dropdown-submenu>a:after{ + right:15px; +} +.yunfile-moreMenu .dropdown-menu>.dropdown-submenu .dropdown-menu{ + left: calc(-106%); + left: -moz-calc(-106%); + left: -webkit-calc(-106%); +} +.yunfile-moreMenu .dropdown-menu .filee-icon { + width: 16px; + height: 16px; + top: 10px; +} +.dropdown-menu >ul li:hover, .dropdown-menu > ul li > a:focus{ + background-color: #f3f3f3; +} +/*.yunfile-moreMenu .dropdown button{ + background: none; +}*/ +.yunfile-moreMenu .dropdown.open button{ + /*background: rgba(238, 238, 238, 1);*/ +} + +/*文件列表 全选*/ +.filemanage-header{ + position:relative; + min-height:39px; +} + + +/*.selectall-box.Icoselected{ + width:100%; +}*/ +.selectall-box a{ + position:absolute; + z-index:10; +} +.selectall-box .select-info{ + font-size: 1.28rem; + display: inline-block; +} +.filemanage-header .select-info{ + display: block; +} +/*全选结束*/ +/*文件列表模板详情结束*/ +/*右侧列表信息开始*/ +.nothing_message{ + position:relative; + height:100% +} +.nothing_message .nothing_allimg{ + position:absolute; + top:0; + left:0; + right:0; + bottom:0; + margin:auto; + height:220px; +} +.nothing_message .nothing_allimg img{ + width: 200px; + } +.toadytitle{ + font-size: 14px; + font-weight: 600; + color: rgba(102, 102, 102, 1); + margin-bottom: 15px; +} + +.right_projectmain .ensemble-left{ + padding-left: 10px; + padding-right: 10px; +} +.right_projectmain .dynamicMenu{ + padding:0; +} + +.right-messagetable .right-progress{ + margin-left: 1.42rem; + margin-right: 0.71rem; + margin-bottom: 0rem; + padding-top: 1.42rem; +} +.right-messagetable .progress{ + height: 0.4rem; + border-radius: 0rem; + margin-bottom: 0rem; + -webkit-box-shadow: none; + box-shadow: none; +} +.right-messagetable .progress-bar{ + background-color: #3779ff; +} +.dynconMenu{ + padding-left: 1.42rem; + padding-right: 1.42rem; +} +.dynconMenu .rightcarousel{ + border-radius: 50%; + text-align: center; + display: inline-block; + font-size: 18px; + margin-top: 2px; + width: 25px; + height: 25px; + position: absolute; +} +.dynconMenu .dynameic-times{ + font-size:12px ; + color: #999999; +} +.activity-content span{ + padding-right: 7px; + color:rgba(102, 102, 102, 1) ; +} +.activity-content span img{ + width: 24px; + height: 24px; + margin-left: 5px; + margin-right: 5px; +} +.dynameic-comment{ + margin-bottom: 5px; +} +.activity-content .activity-name{ + font-weight: 600; + +} +.forenoon{ + padding-right: 10px; +} +.toadysmalltime{ + position: relative; +} +.toadysmalltime i{ + position: absolute; + top: 7px; + left: 1px; +} +.right_projectmain .dynamicMenu{ + padding-top: 15px; + margin-bottom: 20px; +} +.comment-area{ + position:absolute; + bottom:0px; + left: 0px; + padding:10px; + background:#FFF; + width:100%; + box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.15); + } +.comment-area .messageMenu{ + margin:0 +} +.right_decoration{ + bottom: -1px; + left: 8px; + right: 8px; + top: auto; + position: absolute; + border-bottom: 3px solid rgba(76, 137, 251, 1); + display: none; +} +.select-tab .right_decoration{ + display: block; +} +.discuss-content{ + position: relative; + /*border-bottom: 1px solid rgba(230, 232, 235, 1);*/ + background: #fff; + margin-right: 30px; +} +.discuss-header{ + position: absolute; + bottom: 5px; + left: 5px; +} +.discuss-content .comment-input{ + overflow: auto; + height: 100%; + line-height: 20px; + /*border:none;*/ + padding-left: 0px; + +} +.right-newlabel .right-addlabel .opentagwindow{ + display: none; +} +.right-label:hover .right-addlabel .opentagwindow{ + display: block; +} +.right-newlabel .right-addlabel .dzz-edit-button{ + font-size: 17px; + color: rgba(78,85,99,0.65); +} +.right-newlabel .right-addlabel .dzz-edit-button:hover{ + color: rgba(78,85,99,1); +} +.righttop_title .toggright-icon{ + line-height: 56px; +} +.toggright-icon{ + font-size: 18px; + width: 30px; + line-height: 36px; + cursor: pointer; + text-align: center; + z-index: 1; + display: inline-block; + float: right; +} +.delete-comment{ + cursor: pointer; + opacity: 0; + color: #8b8f92; + font-size: 16px; + vertical-align: sub; + padding-right: 0px; +} +.dynameic-comment:hover .delete-comment{ + opacity: 1; + +} +.delete-comment:hover{ + color: #3779ff; +} +.right-numer{ + border-bottom: 1px solid rgba(231,231,231,1); +} +.right-paddingnumer{ + padding:20px; +} +.right-numer .numer-title{ + display: inline-block; + color: rgba(102, 102, 102, 1); + font-weight: 600; + font-size: 14px; +} +.right-numertop .groupbutton{ + margin-right: 0px; +} +.right-numertop .groupbutton{ + display: none; + color:rgba(78,85,99,0.65); +} +.right-numer:hover .groupbutton{ + display:inline-block ; +} +.right-numer .groupbutton:hover{ + color:rgba(78,85,99,1); +} +.right-numerbottom .right-numer-carousel{ + float: left; + margin-right: 0.5rem; + border-radius: 50%; + margin-bottom: 0.5rem; + text-align: center; + cursor: pointer; + position: relative; +} +.right-numer-carousel .Topcarousel{ + width: 28px; + height: 28px; + line-height:28px; + margin-top: 0px; +} +.right-numer-carousel a img{ + width: 28px; + height: 27px; +} +.right-numerbottom .numerbutton{ + border: none; + background: none; +} +.right-numerbottom .right-numer-carousel .dzz-right-first{ + position: absolute; + bottom: -2px; + right: -2px; +} +.right-numerbottom .right-numer-carousel .dzz-right-first img{ + width: 1rem; + height: 1rem; +} +.right_popbox_header .rightdropdown_top{ + padding-left: 10px; + overflow: hidden; + padding-top: 10px; +} +.right_popbox_header .rightdropdown_top img{ + width: 25px; + height: 25px; + float: left; + top: 7px; +} +.right_popbox_header .rightdropdown_top:hover{ + background: none; +} +.popbox-header-twomenu{ + left: calc(-100%); + left: -moz-calc(-100%); + left: -webkit-calc(-100%); + min-width: 138px; + box-shadow:0 1px 6px rgba(0,0,0,.15); + border-radius: 2px; + border: 1px solid rgba(0,0,0,0.05); + position: absolute; + top: -10px; + display: none; + background:#FFF; +} +.popbox-header-twomenu .popbox_li .dzz-fit{ + display: none; + position: absolute; + top: 10px; + left: 14px; +} +.popbox-header-twomenu .popbox_li .dzz-color{ + display: inline-block; + color: #3779ff; +} +.popbox-header-twomenu .popbox-text{ + padding-left: 15px; +} +.right_popbox_header>.popbox_li:hover>.right_popbox_header,.right_popbox_header>.popbox_li:focus>.right_popbox_header{ + display: block; +} +.right_popbox_header .rightdropdown-first{ + border-radius: 50%; + display: inline-block; + width: 32px; + height: 32px; + text-align: center; + line-height: 32px; + float: left; + color: #FFFFFF; +} +.rightdropdown_title{ + padding-left: 0.71rem; + float: left; +} +.rightdropdown_title .rightdropdown_name{ + font-size: 0.92rem; + color: #666666; +} +.rightdropdown_title .numer_admin{ + font-size: 0.85rem; + color: #666666; +} +.rightdropdown_title .numer_admin .dzz-admin{ + color:#b71c1c; + font-size: 0.85rem; +} +.rightdropdown_title .numer_admin .rightdropdown_admin{ + vertical-align: top; +} + +.right-numerbottom .right-numer-carousel .rightcarousel-first{ + font-size: 16px; + color: #FFFFFF; + line-height: 27px; +} +.right_popbox_header .popbox_li{ + padding: 0rem; + margin: 0rem; + position: relative; +} +.right_popbox_header>.popbox_li>a{ + padding: 0.57rem 0rem 0.57rem 1.78rem; + border-radius: 0.14rem; + -webkit-transition: background-color .25s; + -o-transition: background-color .25s; + transition: background-color .25s; + display: block; + clear: both; + line-height: 1.42857143; + color: #333; + white-space: nowrap; +} +.right_popbox_header>.popbox_li>a:hover,.right_popbox_header>.popbox_li>a:focus{ + color: #262626; + text-decoration: none; + background-color: #f5f5f5; +} +.right_popbox_header .dropdown-dropright{ + position: absolute; + right: 0px; + font-size: 20px; + color: #333333; +} +/*关于开始*/ +.right-about-title{ + float: left; + font-size: 14px; + color: rgba(102, 102, 102, 1); + font-weight: bold; +} +.right-about{ + border-bottom:1px solid rgba(231,231,231,1); +} +.right-about .right-about-conter{ + padding: 20px; +} +.right-about-conter .groupbutton{ + margin-right: 0px; +} +.right-about-conter .right-about-bottom{ + font-family: "微软雅黑"; + font-size: 12px; +} +.right-about-conter .groupbutton{ + display: none; +} +.right-about-conter:hover .groupbutton{ + display: inline-block; +} +.right-about-conter .right-about-bottom .right-about-name{ + padding-right: 10px; +} +.about-blockhead .about-cue{ + font-size: 12px; + color: #999999; +} +.about-blockhead .about-checked{ + font-size: 12px; + padding-left: 10px; +} +.about-blockhead .about-open{ + color: #3779ff; +} +.about-blockhead .about-close{ + color:#666666; +} +.right-about-bottom .about-img{ + border-radius: 50%; + width: 24px; + height: 24px; +} +.modal-footer .btn-rdedanger{ + cursor: pointer; + color: red; + line-height: 2.28rem; +} +.modal-footer .btn-gaydanger{ + font-size: 12px; + color: #999; + font-family: "微软雅黑"; +} +.modal-footer .btn-gaydanger span.dzz{ + font-size: 14px; + padding-right: 5px; +} +.modal-footer .btn-rdedanger span{ + vertical-align: middle; +} +.modal-footer .btn-rdedanger span.dzz{ + font-size: 1.14rem; + padding-right: 5px; +} +.group-head .dzz-hide{ + position: absolute; + left: 0px; + top: 0px; + display: none; +} +.group-head .head-file:hover .dzz-hide{ + display: block; +} +.right-about-name-icon,.right-about-name-switch span{ + cursor: default; +} +/*关于结束*/ +/*右侧列表信息结束*/ +/*缩略图样式开始*/ +.Icoblock.middleicon{ + width: 180px; + height: 180px; + border: 1px solid #EEEEEE; + margin:0.71rem 1.14rem 0.71rem 0.28rem; +} +.fileMenu.middleicon{ + padding-top: 0.71rem; +} +.IcoText_div a{ + font-family: "微软雅黑"; + font-size: 12px; + color: #666666; +} +.hover .IcoText_div a{ + color: #666666; +} +.hover table.toggleGlow{ + background-color:#F2F2F2; +} +.hover.Icoblock.middleicon{ + border-radius: 2px; +} +.Icoselected .tr_item_name{ + background-color:#3779ff; + +} +.Icoselected .IcoText_div a{ + color: #fff; +} +.Icoselected.Icoblock.middleicon{ + border: 1px solid #3779ff; + outline:1px solid #3779ff; + border-radius: 2px; +} +.Icoblock.middleicon .IcoText_div{ + padding: 0px 12px; +} +.Icoblock.middleicon .td_ico_item_name{ + overflow: hidden; + text-overflow: ellipsis; + word-break: break-all; + white-space: nowrap; + +} +.Icoselected .td_ico_item_name{ + color: #fff; +} +.window .hover .backgound_radius{ + border:none; + border-radius: 2px; + background: none; +} +.window .Icoselected .backgound_radius{ + border: none; + border-radius: 2px; + background:none; +} +.Icoblock.middleicon .icoimgContainer{ + width: auto; + height: auto; + max-height: 142px; +} +.Icoblock.middleicon .icoimgtips{ + width: auto; + height: auto; + max-height: 142px; + overflow: hidden; +} +.Icoblock.middleicon .Icoblock_icon{ + overflow: hidden; +} +.icoimgContainer_document .Icoblock_icon,.icoimgContainer_dzzdoc .Icoblock_icon,.icoimgContainer_attach .Icoblock_icon,.icoimgContainer_folder .Icoblock_icon{ + max-height: 96px; + max-width: 96px; +} +/*缩略图样式开始*/ +/*群组关于样式开始*/ +.about-block{ + padding-top: 15px; +} +.about-block:last-child{ + border-bottom: none; +} +.about-block .about-button{ + padding-left: 20px; +} +.about-blockgroup{ + margin-bottom: 30px; +} +.about-block .control-label{ + max-width: 65px; + float: left; + color: rgba(129, 129, 129, 1); + z-index: 2; + font-weight: 500; +} +.about-block .control-label.control-weight{ + padding-top: 0px; + font-weight: 500; +} +.head-portrait a{ + display: inline-block; +} +.head-portrait img,.head-file img,.head-file input{ + width: 24px; + height: 24px; + border-radius: 50%; + /*padding: 5px;*/ +} +.head-portrait .header-imageselect{ + width: 25px; + height: 25px; + border-radius: 50%; + display: inline-block; + text-align: center; + line-height: 25px; + margin: 5px; +} +.head-portrait.head-hover{ + background-color: #f2f2f2; + border-radius: 50%; +} +.head-portrait.head-border{ + background-color: #dbe6fa; + border-radius: 50%; +} +.head-portrait{ + margin-bottom: 10px; + position: relative; +} +.head-file{ + position: relative; +} +.head-file input{ + position: absolute; + top: 0; + left: 0; + opacity: 0; +} +.about-blockgroup .col-md-10{ + padding-left: 0px; +} +.group-head{ + overflow: hidden; +} +.headinput-checkbox{ + position: absolute; + top: 0; + left: 0; + width: 29px; + height: 29px; + opacity: 0; +} +.about-edit{ + position: absolute; + top: 0; + right: 0; +} +.about-blockhead .proper-poewr{ + padding-left: 0px; +} +.col-width-500{ + width: 500px; + padding-left: 20px; + } +/*群组关于样式结束*/ +/*群组-成员样式开始*/ +#home-member{ + padding-left: 25px; +} +.member_item_drop .member_item_admin{ + background-color:rgba(245, 127, 23, 1) ; + color: #fff; +} +.member_item_drop .member_item_creator{ + color: #fff; + background-color:rgba(76, 137, 251, 1) ; +} +.member_item_drop .member_item_cooperate{ + color:rgba(129, 129, 129, 1) ; + background-color:rgba(242, 242, 242, 1) ; +} +.member_item_drop .member_item_menu{ + position: absolute; + width: 100%; + min-width: 140px; +} +.members{ + padding-top: 10px; +} +.group-allgame-top{ + padding:10px; +} +/*群组-成员样式结束*/ +/*弹出框样式统一形式开始*/ +.modal-header{ + color: rgba(64, 64, 64, 1); + border-bottom: none; + position: relative; +} +.modal-header .modal-title{ + text-align: center; + font-size: 22px; +} +.modal-header .close{ + color: rgba(118, 118, 132, 1); + opacity: 1; + position: absolute; + top: 10px; + right: 20px; +} +.modal-dialog .modal-content{ + background:#fff; +} +.modal-body .modal-label{ + color: rgba(129, 129, 129, 1); + font-weight: 300; +} +.modal-body .about-animate.col-md-11{ + padding-left: 0px; +} +.modal-body .col-xs-9{ + padding-left: 0px; +} +.group .col-xs-2{ + padding-right: 0; +} +.group .col-xs-10{ + padding-left: 5px; +} +.checkbox-custom label,.radio-custom label{ + font-family: "微软雅黑"; + font-weight: normal; + display:block; + padding-left: 5px; +} +.modal-footer{ + border-top: 0; +} +.group .group-textarea{ + resize: none; +} +.lbook-label{ + font-weight: 500; +} +.lbook-label span{ + font-size: 14px; +} +.group-head li{ +float: left; +} +/*弹出框新建类型开始*/ +.fwinmask .m_c h3{ + padding: 10px 20px 0px 30px; +} +.custom-from{ + margin-bottom: 30px; +} +.dzz-whole-sigh{ + color:red; + font-size:20px; + padding-right:5px; + vertical-align:text-top; +} +.delect_text_red{ + color:red; +} +.delect-title-normal{ + font-weight: normal; + font-size: 1.28rem; + /*padding-top: 15px;*/ + display: inline-block; + /*padding-left: 10px;*/ +} +.alert_error{ + background-size: 20px 20px; + padding: 0px 0px 6px 35px; + font-size: 1.28rem; +} +/*弹出框新建类型结束*/ +/*弹出框创建分享开始*/ +.about-animate .share-control{ + width: 100%; + border: none; + border-bottom: 1px solid rgba(204, 204, 204, 1); +} +.share-body{ + padding:15px 40px; +} +.share-dropdown{ + display: block; + border-bottom: 1px solid rgba(204, 204, 204, 1); + color: rgba(129, 129, 129, 1); +} +.share-glyphicon{ + float: right; +} +.share-body label{ + color:rgba(76, 137, 251, 1) ; + font-size: 12px; + font-weight: normal; +} +.share-body .share-label{ + color:rgba(129, 129, 129, 1); + font-size: 14px; +} +.share-body .share-label .share-labelspan{ + color:rgba(204, 204, 204, 1) ; + font-size: 12px; + padding-left: 5px; +} +.share-dropdown:hover{ + color:rgba(129, 129, 129, 1); +} +.share-from{ + margin-bottom: 30px; +} +.about-animate .share-readonlyinput{ + color: rgba(204, 204, 204, 1); +} +.share-click{ + padding: 0px 25px; + margin-bottom: 0px; +} +.share-click .share-label-bluer{ + position: absolute; + top: 5px; + font-weight: normal; + color: #666; +} +.share-click .leace-blank{ + color: #bbb; +} +.share-click .share-paddingleft{ + padding-left: 0px; +} +.share-click .share-input-text{ + padding-left: 70px; +} +.group-select-members{ + overflow: hidden; +} +.select-toperate-center .share-option-icon{ + padding-right: 1.07rem; +} +/*弹出框创建分享结束*/ +/*弹出框创建属性开始*/ +.nature-body{ + padding: 15px 50px; +} +.nature-body label{ + color: rgba(102, 102, 102, 1); +} +.nature-body .label-text{ + color: #666; +} +.nature-body .nature-from{ + padding-top: 15px; +} +.file-nature{ + margin-bottom: 5px; + } +/*弹出框创建属性结束*/ +/*弹出框选择成员开始*/ +.user-select-content-left{ + width: 50%; + height: 300px; + border-right: 1px solid #d6d6d6; + float: left; +} +.user-select-content-right{ + width: 50%; + height: 300px; + float: right; + overflow: auto; +} +.user-select-content-left .select-mech{ + width: 20px; + height: 20px; +} +.user-select-content-left .glyphicon-menu-down,.user-select-content-left .glyphicon-menu-right{ + margin-right: 35px; +} + +.user-select-content-left .checkbox-custom{ + left: 45px; +} +.all-yourself .view-eidt{ + padding-right: 5px; + font-size: 18px; + color: #3779ff; + vertical-align: sub; +} +#permgroup .lbook-label{ + font-size: 16px; +} +#permgroup .lbook-label span{ + font-size: 12px; +} +.user-select-content{ + margin-top: 20px; + width: 100%; + height: 300px; +} +.group-select-members p{ + padding-left: 0!important; +} +.user-select-content-title{ + padding-left: 10px; +} +.group-content{ + height: 260px; +} +.group-content ul li{ + position: relative; +} +.user-select-content-right .selected-member{ + padding-left: 30px; + padding-top: 10px; + padding-bottom: 10px; +} +.sele-right-classa li{ + height: 40px; + padding-left: 25px; + line-height: 40px; + margin-left: 5px; +} +.sele-right-classa li .ti-close{ + float: right; + padding-right: 15px; + line-height: 40px; + display: none; +} +.sele-right-classa li img { + width: 20px; + height: 20px; + margin-right: 5px; +} +.sele-right-classa li:hover{ + background-color: #f2f2f2; + border-radius: 3px; +} +.sele-right-classa li:hover .ti-close{ + display: block; +} +.select-file{ + overflow: hidden; +} +.select-file .routeMenu{ + display: inline-block; + font-size: 14px; + font-family: "微软雅黑"; +} +.select-file .routeMenu a{ + color: #666666; +} +.select-file .form-control-feedback{ + text-align: left; + cursor: pointer; + color: #cccccc; + font-size: 14px; +} +.select-file .has-feedback{ + margin:0 ; +} +.select-file .routeMenu{ + margin: 0; +} +.select-file .select-switch{ + color: #cccccc; + font-size: 16px; + padding-top: 5px; + cursor: pointer; +} +.selectw-size,.selectw-use{ + width: 100px; + float: right; +} +.selectw-left,.selectw-listleft{ + padding-right: 170px; + overflow: hidden; +} +.selectw-right{ + position: absolute; + top: 0px; + right: 0; + width: 150px; +} +.selectw-th{ + position: relative; + margin-bottom: 15px; + margin-right: 32px; + color: #666666; + font-family: "微软雅黑"; + font-size: 14px; +} +.selectw-name{ + display: inline-block; +} +.selectw-name>.checkbox-custom{ + position: absolute; + top: 0px; + left: 25px; +} +.selectw-name span { + padding-left: 35px; +} +.selectw-listright{ + position: absolute; + top: 15px; + right: 0; + width: 150px; +} +.selectw-listname .imgMenu{ + position: absolute; + top: 10px; + left: 35px; +} +.selectw-img{ + width: 27px; + height: 32px; +} +.selectw-one{ + padding-left: 65px; + float: left; +} +.selectw-listname>.checkbox-custom{ + top: 15px; + left: 25px; +} +.selectwList{ + margin-bottom: 20px; + color:#666666 ; + font-size: 14px; + font-family: "微软雅黑"; +} +.selectwList .liste:hover{ + background-color:#fafafa ; + color:#666666!important ; +} +.group-content-right .mCSB_container{ + padding-right: 30px; + margin-right: 0; +} +.selectwList .liste:first-child{ + border-top: 1px solid #e2e8ea; +} +.selectwList .liste{ + position: relative; + padding: 15px 5px; + border-bottom: 1px solid #e2e8ea; +} +.group-content-right{ + height: 300px; + overflow: auto; +} +.select-file li a span{ + padding-left: 10px; + padding-right: 5px; +} + +/*弹出框选择成员结束*/ +/*弹出框新建文件夹开始*/ +.Nfolder-right p{ + color:#2196f3; + padding-bottom: 20px; +} +.Nfolder-right p span{ + color: #666666; + padding-left: 5px; +} +.properties-Nexplain li{ + float: left; + font-size: 12px; + padding-bottom: 5px; + padding-left: 0px; + width: 50%; +} +.all-yourself{ + font-size: 12px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } +/*弹出框新建文件夹结束*/ +/*弹出框样式统一形式结束*/ +/*类型-图片样式开始*/ +.pictures-names{ + margin-left: 25px; + margin-right: 25px; + overflow: hidden; + border-bottom: 1px dashed rgba(221, 221, 221, 1); +} +.fileimg-top{ + padding-right: 0px; + margin-right: 25px; + border-top:1px dashed rgba(221, 221, 221, 1); +} +.owm-group{ + float: left; + max-width: 80%; + padding-top: 10px; + margin-bottom: 10px; +} +.owm-group .form-group{ + margin-bottom: 0; +} +.owm-group .own-label{ + font-size: 14px; + font-weight: 300; + width: 65px; + display: inline-block; + vertical-align: middle; + color: #666666; + text-align: right; + position: absolute; + top: 0px; +} +.owm-group .own-type{ + display: inline-block; + padding-left: 70px; +} + +.owm-group .own-type li{ + float: left; + padding: 2px 0px; + margin-right:10px ; + vertical-align: middle; + cursor: pointer; + position: relative; + margin-bottom: 5px; +} +.own-type li .label{ + font-weight: 300; + color: rgba(78, 85, 99, 1); + padding: 0.2em 1em 0.3em; +} +.label-glitter{ + background-color:#ECEEF1; + border: 1px solid transparent; +} +.own-type li .label-rightimg{ + position: absolute; + top:0px; + right: -1px; +} +.search-select.hover .border-glitter{ + border: 1px solid rgba(76, 137, 251, 1); +} +.search-select.fileclick .border-glitter{ + border: 1px solid rgba(76, 137, 251, 1); +} +.docunment-allfile{ + float: left; + padding-left: 10px; + padding-top: 5px; + color: rgba(152, 159, 173, 1); +} +.share-editbutton{ + float:right; + margin-top: 15px; +} +.file-editcon{ + overflow: hidden; + position: relative; +} +.public-title .ti-pencil{ + padding-left: 5px; + cursor: pointer; +} +/*类型-图片样式结束*/ +/*工具分享页面开始*/ +.share-word{ + line-height: 34px; + height: 34px; +} +.share-copyaress{ + float: left; + padding-right: 10px; +} +.input-group-addonhover{ + background: #fff; + position: absolute; + right: -95px; + bottom: 0; + display: inline-block; + padding: 5px; + border: 1px solid #ddd; +} +.input-group-addonhover .shareform_qrcode{ + display: inline-block; +} +.input-group-addonhover .allowContextMenu{ + max-width: 90px; + max-height: 90px; + margin-right: 0px; +} +.deatisinfo td{ + overflow: visible; +} +.share-option-icon{ + border-right: 1px solid rgba(0,0,0,0.1); +} +/*工具分享页面结束*/ +/*工具动态页面开始*/ +.form-control-group{ + margin-bottom: 10px; + float: left; +} +.fieldset{ + margin-bottom: 20px; + padding: 0px 20px 0px 0px; +} +.group-time{ + margin-left: 20px; + float: left; +} + +.group-time input{ + border: none; + border-radius:0px; + width: 147px; + height: 30px; + text-align: left; +} +.group-time-animate{ + display: inline-block; +} +.group-time-animate-label{ + transform: rotate(90deg); + -ms-transform: rotate(90deg); + -webkit-transform: rotate(90deg); + -o-transform: rotate(90deg); + -moz-transform: rotate(90deg); +} +.group-time-animate.input-black{ + margin-bottom: 0px; +} +.select2-container-multi .select2-choices .select2-search-field input{ + padding:6px 8px!important; +} +.group-tableword{ + padding:10px 20px 0px 0px; + cursor: pointer; + display: none; + clear: both; +} +.group-tableword .scree-term{ + font-weight: 600; + font-size: 14px; + color:rgba(99, 99, 99, 1); + font-style: normal; +} +.group-tableword .label-text{ + padding: 4px 10px; + height: 20px; + line-height: 20px; + margin-left: 5px; + background-color: rgba(227, 242, 253, 1); + color:rgba(76, 137, 251, 1) ; + font-weight: 500; +} +.group-tableword .label-text .group-closeicon{ + padding-left: 20px; + color:rgba(118, 118, 132, 1) ; +} +.group-input{ + float: left; + width: 400px; +} +.member_header_color{ + color:#3779ff ; +} +.member_header_color:hover{ + text-decoration: underline; +} +.group-time-animate .selectDate{ + background-color: #FFFFFF; +} +.btn_dynamic_more:hover{ + box-shadow: none; + text-decoration: none; +} +.btn_dynamic_more{ + color: #3779ff; + font-size: 12px; +} +.righttop_title{ + height: 56px; + border-bottom:1px solid rgba(231, 231, 231, 1); + line-height: 56px; +} +.righttop_title .dzz-right-backing{ + font-size: 25px; + float: left; + line-height: 56px; + cursor: pointer; + color: #666666; +} +.righttop_title .right_name{ + font-size: 14px; + color: #71717a; + float: left; + margin:0; +} +.just-now{ + padding-top: 20px; +} +/*工具动态页面结束*/ +/*工具回收站页面开始*/ +.recyle-middle-select{ + padding-right: 20px; +} +.recyle-checkbox{ + margin-bottom: 10px; + padding-bottom: 10px; +} +.recyle-middle-select{ + padding-bottom: 10px; +} +.recyle-option{ + float: left; + overflow: hidden; + height: 34px; +} +.recyle-option .buildMenu{ + display: inline-block; +} +.recyle-option .recyle-text{ + padding-right: 10px; +} +.selectTime{ + /*border: none;*/ + height: 34px; + text-align: center; +} +.recyle-date{ + display: inline-block; +} +.recyle-date .input-black{ + display: inline-block; + margin-bottom: 10px; +} +.recyle-date .input-black .input-animate .form-control{ + background: transparent; +} +.recyle-option-all{ + float: right; +} +.recyle-option-all .recyle-option-dropdown{ + display: inline-block; + +} +.select-toperate-center .recycle-option-icon{ + padding-right: 7px; + border-right: 1px solid rgba(0, 0, 0, 0.1); +} +/*工具回收站页面结束*/ +/*管理文件夹权限开始*/ +.properties-list{ + padding: 15px 10px; + border-bottom: 1px solid #DDDDDD; + position: relative; +} +.perm-top{ + padding:0px 20px 10px 0px; + +} +.properties-table{ + padding-top: 10px; +} +.properties-baground{ + width: 100%; + background-color:#f2f2f2; + margin-bottom: 15px; +} +.properties-baground .properties-orange{ + color: #666; + padding-top: 20px; + padding-left: 20px; +} +.properties-explain{ + padding-left: 20px; + padding-top: 10px; + overflow: hidden; +} +.properties-explain li{ + width: 145px; + float: left; + font-size: 12px; + margin-bottom:15px ; + /*padding-left: 24px;*/ + /*background-image: url(../img/icons_ZG-QuanXian.png);*/ + background-repeat: no-repeat; + height: 30px; + line-height: 25px; +} +.properties-explain li span{ + font-size: 20px; + padding-right: 5px; + vertical-align: middle; + color: #3779ff; + margin-top: -1px; + } +.proper-iconshow{ + margin-left: 200px; + overflow: hidden; + +} +.properties-listRight{ + width: 250px; + position: absolute; + right: 0px; + top: 0px; + height: 100%; +} +.proper-absoleopera{ + position: absolute; + top: 16px; + left:12px; +} +.proper-absoleopera .label-gainsboro{ + margin-right: 19px; +} +.proper-delhover{ + position: absolute; + top: 17px; + right: 20px; + cursor: pointer; +} +.label-gainsboro{ + font-weight: 300; + color: rgba(102, 102, 102, 1); + background-color: #fafafa; + border-radius: 2px; + padding: 2px 5px; + border: 1px solid rgba(221, 221, 221, 1); +} +.proper-default{ + color: #333; +} +.perm-ok{ + padding-right: 5px; +} +.perm-ok-color{ + color: #7cb342; +} +.select-p{ + padding-top: 20px; + clear: both; +} +.select-p .select-perm{ + padding-bottom: 20px; + padding-left:15px ; +} +.select-properties li{ + position: relative; + margin-bottom: 15px; + height: 30px; +} + +.properties-operation{ + position: absolute; + top: 0; + right: 210px; +} +.properties-left,.properties-listLeft{ + margin-right: 250px; + overflow: hidden; +} +.properties-left p{ + display:inline-block; +} +.properties-left .properties-Name{ + padding-left: 10px; + width: 200px; +} +.properties-establish{ + padding-left: 10px; +} +.proper-leftimg{ + width:200px ; + float: left; + height: 25px; +} +.proper-leftimg img{ + width: 24px; + height: 24px; +} +.proper-leftimg .properties-admin{ + margin-left: 10px; + display: inline-block; + width: 140px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + vertical-align: middle; +} +.proper-show { + overflow: hidden; +} +.proper-show li{ + background-repeat: no-repeat; + float: left; + padding: 0px 5px; +} + +.proper-show li span{ + font-size: 20px; + color: #3779ff; +} +.proper-show li>.read-false{ + color: #ddd; +} +.proper-bottom{ + position: relative; + display: inline-block; + padding-right: 20px; +} +.proper-set{ + color: #2196f3; + display: none; +} +.properties-list:hover .proper-delhover .proper-set{ + display:inline-block; +} +.proper-edit{ + display: inline-block; + width: 30px; + height: 23px; + /*background-image: url(../img/icons_ZG-QuanXian.png);*/ + background-repeat: no-repeat; + vertical-align: middle; +} + +.proper-absoleopera .proper-delete{ + font-size: 20px; + padding-right: 17px; + vertical-align: middle; + color: #d6d6d6; + cursor: pointer; +} +.proper-absoleopera .proper-delete:hover{ + color: #2196f3; + cursor: pointer; +} +.properties-con{ + margin-bottom: 20px; +} +.properties-th{ + border-bottom: 1px solid #ddd; + position: relative; + margin-right: 25px; +} +.select-properties .checkbox-custom{ + font-size: 16px; + margin-top: 0px; +} +.proper-bottom .proper-span{ + font-size: 12px; +} +/*管理文件夹权限结束*/ +/*群组管理开始*/ +.new-groupmanage{ + float: right; +} +.groupmanage-header-top{ + float: right; +} +.middletopMenu .groupmanage-text{ + clear: both; + padding-top:1.42rem ; + font-size: 1rem; + color: #999999; +} +.middletopMenu .groupmanage-text span{ + font-size: 16px; + padding-right: 0.24rem; +} +.groupmanage-time .input-black .input-animate .form-control{ + background: transparent; + height: 35px; + padding: 0px; +} +.groupmanage-time .input-black .input-animate{ + padding-bottom: 0px; +} +.groupmanage-time .input-black{ + vertical-align: sub; +} +.public-allgroup{ + position: relative; + display: inline-block; + min-width: 5rem; + padding-right: 0.71rem; +} +.public-allgroup.input-black{ + margin-bottom: 0rem; +} +.public-allgroup .form-control[readonly]{ + background-color: #FFFFFF; +} +.public-allgrouptime{ + display: inline-block; +} +.middletopMenu{ + padding-top: 10px; +} +.recycle-top{ + float: right; +} +.groupmanage-top{ + padding-right: 20px; +} +.public-sizeMenu{ + float: right; +} + +.buildMenu{ + display: inline-block; +} +.groupmanage-paddingbottom{ + padding-bottom: 20px; +} +.groupadmin-toggle{ + display: inline-block; +} +.groupmanage-time{ + padding-top: 2px; + display: inline-block; +} +.middletopMenu .dropdown_text{ + padding-right: 2.14rem; +} +.groupmanage-time input.form-control{ + border-radius: 0px; + width: 120px; + text-align: left; + background-color: transparent; +} +.member_item_td .member_item_td_group{ + width: calc(100% - 40px); + width: -webkit-calc(100% - 40px); + width: -moz-calc(100% - 40px); +} +.member_hoverTools{ + float: right; + display: none; +} +/*群组管理结束*/ +/*收藏开始*/ +.yellowstars{ + color: #ffcc00; + padding-left: 10px; +} +/*收藏结束*/ +/*搜索页面开始*/ +#search{ + width: 100%; + height: 100%; + background: #fff; + z-index: 1000; + position: fixed; + top: 64px; +} +/*搜索页面结束*/ +/*功能管理开始*/ +.function-con .switchery{ + margin-top: 10px; + } +.function-radio{ + padding-top: 0.28rem; + margin-bottom: 0!important; +} +.form_app_manage .radio-custom{ + margin-bottom: 0.71em; +} +.form_app_manage .lbook{ + margin: 0px; +} +.form_app_manage .selectorguser,.form_app_manage .selectgroupuser{ + padding-top: 1.07rem; +} +.btn-sorg{ + margin: 5px 10px 5px 0px !important; + padding:5px 3px; +} +.btn-sorg .ibtn.dzz-close{ + margin:0!important; + +} +.ibtn.dzz-close { + border-radius: 0; + font-size: 18px; + width:24px !important; + height:auto; + line-height: normal; + vertical-align: sub; + color: rgba(102, 102, 102, 1); +} +.ibtn.dzz-close:hover { + background: #f9f9f7; + color: rgba(102, 102, 102, 1); +} +.btn-sorg:hover{ + box-shadow: none; +} +.function-space{ + width: 160px; +} +.function-share{ + font-size: 14px; + color: #aaaaaa; + padding-top: 15px; + margin-bottom: 0; +} +.function-allow{ + margin-bottom: 10px; + font-size: 14px; + color: #aaaaaa; +} +.function-button{ + margin-bottom: 20px; + padding-top: 20px; + overflow: hidden; +} +.function-con .form-groups{ + margin-bottom: 0; + padding-bottom: 0.92rem; +} +.form_app_manage{ + padding-top: 1.21rem; +} +@media only screen and (max-width:768px ) { + .app-label{ + padding-top: 7px; + } + } +} + +/*功能管理结束*/ + \ No newline at end of file diff --git a/dzz/system/css/filelist_detaillist/images/index.htm b/dzz/system/css/filelist_detaillist/images/index.htm new file mode 100644 index 0000000..e69de29 diff --git a/dzz/system/css/filelist_detaillist/images/sort_asc.gif b/dzz/system/css/filelist_detaillist/images/sort_asc.gif new file mode 100644 index 0000000000000000000000000000000000000000..67a2a4c669fc5821a07fc486228d626e16d6ad9e GIT binary patch literal 830 zcmZ?wbhEHb001Tk1^@s6j3j1m00004b3#c}2nYxW zd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position:absolute; + left:0px; + top:2px; +} +.filemanage .filemanage-right{ + left:0px;top:0px;padding:0px;height:100%; position:relative; + margin-left:180px; +} +.filemanage .filemanage-right .filemanage-header{ + background: #FbFbFb; + border-bottom: 1px solid #ddd; + font-size: 12px; + overflow:visible; +} +.filemanage-header .nav,.filemanage-bottom .nav{ + margin:0; +} +.nav > li > a:focus { + background: none; + text-decoration: none; +} +.nav-pills .dropdown-menu{ + border-radius:0; + min-width:100px; +} +.filemanage .filemanage-right .filemanage-bottom{ + background: #FbFbFb; + font-size: 12px; + position:absolute; + z-index:100; + left:0; + top:0; + width:100%; + border-left:1px solid #FFF; + display:none; + } + .filemanage-bottom span{ + padding:0 10px; + } +.filemanage-detail-header{ + +} +.filemanage .table { + border-collapse: initial; +} + +.filemanage .table th, .filemanage .table td { + border-bottom: 1px solid #e7e7e7; + border-top:1px solid #FFF; + line-height: 30px; +} +.filemanage .detail_header_tr{ + /*background:url(images/header.gif) repeat-x;*/ +} + +.filemanage .detail_header_asc{ + display: inline-block; + vertical-align:middle; + height: 4px; + width: 13px; + margin-left: 3px; + background-repeat:no-repeat; + _margin-top:10px; +} +.filemanage .detail_header_asc_0{ + background:url(images/sort_desc.gif) no-repeat; +} +.filemanage .detail_header_asc_1{ + background:url(images/sort_asc.gif) no-repeat; +} +.filemanage .detail_header{ +/* border-left:1px solid #FF; + border-right:1px solid #FFF; +*/ overflow:visible; +} +.filemanage .detail_header:hover,.filemanage .detail_header_hover{ + background:#F7F7F7; + /*border-left:1px solid #CCC; + border-right:1px solid #CCC*/ +} +.filemanage .detail_header_td_div{ + overflow:hidden; + line-height:22px; + height:22px; + overflow:visible; + position:relative; +} +.filemanage .detail_header_drag{ + position:absolute; + width:10px; + height:22px; + top:0px ; + right:-5px; + z-index:10; +} +.filemanage .detail_item_name_icon,.DragCopy .detail_item_name_icon{ + max-width:28px; + max-height:28px; + display:inline; + vertical-align:middle; + margin-top:-5px; + +} +*html .filemanage .detail_item_name_icon, *html .DragCopy .detail_item_name_icon{ + width: expression(this.width > 28 && this.width>=this.height ? 28 : true); + height: expression(this.height > 28 && this.width<=this.height ? 28 : true); +} + +.filemanage .detail_item_name_text,.DragCopy .detail_item_name_text{ + margin-left:5px; + cursor:default; + +} +.filemanage .detail_text{ + text-shadow:1px 1px 1px #FFF; + word-break:break-all; +} +.filemanage .detail_tr{ + height:32px; + border-bottom: 1px dotted rgb(204, 204, 204); +} + + +.filemanage .detail_item_td_div,.DragCopy .detail_item_td_div{ + + overflow:hidden; + line-height:30px; + height:30px; + overflow:hidden; + float:left; + +} + +.filemanage .treeshow-guide{ + width:15px; + height:35px; + display:inline-block; + float:left; + margin-right:10px; + background:url(images/treeshow.png) 0 -2px no-repeat; +} +.filemanage .treeshow-guide .treeshow-guide-left{ + width:15px; + height:35px; + display:inline-block; + background:url(images/treeshow.png) -15px -2px no-repeat; +} +.filemanage .treeshow-guide .treeshow-guide-left:hover{ + background:url(images/treeshow.png) -30px -2px no-repeat; +} +.filemanage .treeshow-guide .treeshow-guide-right{ + width:15px; + height:35px; + display:inline-block; + background:url(images/treeshow.png) -45px -2px no-repeat; +} +.filemanage .treeshow-guide .treeshow-guide-right:hover{ + background:url(images/treeshow.png) -60px -2px no-repeat; +} + + + +.filemanage .detail_tr a:hover{ + text-decoration:none; +} +.filemanage .detail_tr.hover{ + background:#F7F7F7; + transition: all 0.2s ease-in 0s; +} +.filemanage .detail_tr.Icoselected{ + background:#EFEFEF; + transition: all 0.2s ease-in 0s; +} +.filemanage .detail_item_name{ + margin:0 10px; + line-height:30px; + font-size:12px; + height:30px; + text-shadow:1px 1px 1px #FFF; + font-weight:700; + overflow:hidden; + word-wrap:nowrap; +} +.filemanage .detail_item_name span{ + cursor:pointer; +} +.filemanage .detail_item_info{ + margin:0 10px; + font-size:12px; + color:#999; + text-shadow:1px 1px 1px #FFF; + overflow:hidden; + word-wrap:nowrap; + height:18px; + +} +.filemanage .detail_item_hover{ + overflow:hidden; + word-wrap:nowrap; + position:relative; + + line-height:50px; +} + +.filemanage .detail_item_info span{ + padding:0 10px 0 0; +} diff --git a/dzz/system/css/filelist_detaillist/thumb.jpg b/dzz/system/css/filelist_detaillist/thumb.jpg new file mode 100644 index 0000000000000000000000000000000000000000..56b03fd0f066ac6a80b6f9c0df535f4f2a1b617c GIT binary patch literal 2593 zcmY+82Uyd|7RCPw34w$lL7JgAsnJJuDZ)a4V2~C%C`%J53(`VaK$O0Mln{`r#t@n` zK|qN}M+8A60i}slDT^YD(&3@|?Y@0yzM1dNJ$HU{j@})80J!i*7mNT92m}}(FW_hb zzydG`1OkP?pimebcDy;*VK8vHN z2#5^^LvkPmxVQw+yeM9@*uN$I*F{|XdvSdJ&_B=rDvsI!6dQm6Tv$LT0E_~$pg>1m zfFJ;Xpdb+NKS2R7gcZi}-PGd(KrCPg3ky4x1^HtF1ZIIiQ2;CVNtn1EkAxDhvL(Sa zFf(h8O;X?Hrc^zHk6%E=&?6|A7#l~aJ4T>E0GQ?f_y7nDfwHh3dupiT8VqHJL0J9{ zaLh+RxGit4Lr?OED;<;H@JcAF=n*LTkJ@KgCEa3=#sQAwX)uZf1?U2KIYB+PF|q@% zh&#&eJ@G4~73#9OpDeznn1+{WVW64$CKD+1n6HW#)3c@C;jUjmjD@*(^@?4-7NY5V zMDz=)&}P~6Ts~2AsrCpMJtOhd=7Xe}T&b^``jlSXP$S&>#QoTT9!<$*h0P}Z%vX91 zfdOwE_jEfVsJ2uRv%iPwB+P`OMD1r^hx6;F}vUeY=0R6OP;Otv`r zMx}c7KR!-);Yj+xBud5ka+YqsNKDKm%1f+b!<5}FnH!$2=~-GLwKRJ$0G(C$JZ#*v z`jT$%i}tK;X@ zwKTzPjN;iYSWU2V!-DjM8fmuPqE+q~L5-w88HzE|!3bpgtvls!oTrGnkG|5wz}$q4 z^ru6-vz$NG``Y?eSuyiZ(_2OB1^T(<>K41M{8~Yk_OS@P+fX7YU7HoA+$^eYfELrMxGBAo)B}_H`WZ8`H@B&$n3h=WN4-o>qN}Hx3NG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RQ0(=Bit4fs=_L_BOYRu;sPhF&lqn)q`hAiu`1TgMkW)&Fr;o{1OCy}Kb;{nS&>}CM==c5^>%Fr+)t^7 zr&s2GE2p9buhhFi>P0*T*s4rQhiOfMSClp}i{x#%z11z-j5!@~&4{eqc?XBXD_8p0 z-cqawpYEN3nG>h&_st}f{OPNrzqf&>!bWvZ-heiLuDmV-Abxm&?$OwP0p!Y) Am;e9( literal 0 HcmV?d00001 diff --git a/dzz/system/css/filelist_middleicon/images/checkbox.png b/dzz/system/css/filelist_middleicon/images/checkbox.png new file mode 100644 index 0000000000000000000000000000000000000000..6a0342a554388fce859563240e07d974131f50ce GIT binary patch literal 223 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf4nJ za0`JjWdJcUFETYRF)?Q9R8jx{ z3L8m8K~#90?Ooq*6UiO_%>M8?wS$x6M~h+*kSl^i6sgMb$|HXWQLgIs9@^KcI(Y2s zsZy_Z_cv6ksw+ZBsIQQqIAE@-B6z@nq9`~}Cyq_LJAH7*S|;n=nc11$HFqD$inIRi z%y>TYozM6CU3*O^rH}z3!~$ReAP0|0MS$V>eM)JN_h1+t8Dl~S0Z;>Q1b}B`MA?C2 zNXkATWQS7P1^_|`WEZJUND%_S22j0w_wLu1E?xSS@B6-qLFq(zaw(;w2|svFDW%xl z-0a=Hef#0Pd-uMfl>R%v(E>zfH4s7^06%~9=+W)VmoHxqpF4D(;(=0%AP7Jyh41?a zf&jknkDd<(0}KWObh}-2yWK&%-Tw2nYuEmSp$BCSSq}jK>id2l00x7>p%-O{Q6W+0 z9Oem(6!r)oCxnc=rqk&-M~@!;bLV|e=XDUKgMexuoJekVLAjZh&(7&4PBON{6_ailO} z7%Am)8MRssYinz`aN)v@hYufqoAp+liV&H}mT6Okm^kpH@Xr}BuIr*!tKrR?H+c5! z87^MDxVXBy`mNMpQX;j7nA)Cn+w-K@w*B67+qU624yLB2VB0p{zI}_0jSbAt&o4F_ zjqkGZ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Wx2iN5SORmP$N z#uCH4b;M-ERJbTB4wF(}DjE?CnO+Yuv1(`boWBwHP1u>TK!;@bw`1L8mGqT(U` z^78WEU%q_#>rSVW`30^t$Z88BgrHn54^~!I8W{ch($ M07*qoM6N<$f_MrjV*mgE literal 0 HcmV?d00001 diff --git a/dzz/system/css/filelist_middleicon/images/ops.png b/dzz/system/css/filelist_middleicon/images/ops.png new file mode 100644 index 0000000000000000000000000000000000000000..f2cbb1a880f999a680739e4f466a3414e47f2aa3 GIT binary patch literal 46276 zcmcfJ1#sj_7Z_?YGc)s=nVFfHnVFgGHG7R~STi#-t(lpbne8##@x6Z~FO`>iMZCF98pO0|NvE1TQ5is{9=(zKa|b#CJW0fWh${z+8l-RH42n zUntYa?|EoPNi7#3Aei%i3UF{Vy!Lk^hO3yStBA9ik*k%1J&~%Fof!}_BNGcf6FsNC z;ST=y8hHP#q2gff>S5$;1|($aU~EPtZsly|;oxlJLL{QX=G3&$4g>^V;^?fd;hA-* zZR1?Qj)oB)+?QfoB2|mb6p!y(U+{Tz{Z?XQwJM7_W5lp2wCO^Y&NbUFX12h(XYTp`WSa)5SJf6}0@c{^;G&-E!8dHr;G@lf!z0fVtf4 zc-?Aj5zpQYP;+>O+$n6+%f$GaXfpdz)i@WB=FH@CFqkM2$8fhwDiG!C{pSq~zLI}tOiUA0uJu8mmAftpp5D;ZwGv5x#;CphXJC!|T z>)s?7gB7$L38D{nc`WE|!LdWFp9u8nu>E0#U`A-c4^rwK|b_PJ|RzMRs!pLEu=$^cU!-Az*xh(!D38qH9#~HSk(~ZbDHE zN4L?@=7A^%{#EZ(eDy?h7Sx6oy}e-wdIt>v1+Fm!9I7A6zFZ;GW=cKiQQ*wayqGR` z_w74P;T|+SNF|h1Z9cOc{`o#cX3U_!sP{W3I6Lnq(De3sLM_U6wFZ?$Lr{U~v1;DTw`jlh<6?JT2^`e} zqwS1&efSje6Ru1}!Pb4QI)C}(0R+rn6?DFaRo{eGzrMeyUnv-S{v{QRR$J$&H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DEeQBn!f39p1*2eiouhlOStQfk6hDXr=Lfedaz29 zeY%HemR0K_3;?<1(2QSa?JNBX1JEijQ3Wy{4tH+^3#b*=9p2;PG?ix{=s9Wr92>Q$ zWxYJRcmCAso81r2iJJu^dE66tjK1i`gX7}Am=g5mn4@vK*Fuz=H0(Ly;>X@x&Kfo& z4+$f78#CLIXw>;{rU5?PcVko^+IFg^kB989vtN}vk5Ove{J}gR%W_Qqkr8^i(Mp1T zU-y@(`J7|5v!8Fd$L*0KD%$wE0AZutriU5I3w0YK8(m{xCA_>}Z=bIJHfcShH=o^` zU~SO9Qnw`o{Y76HHa@cXO8P->^gSM&cxUag+?xwhEWpHbom??2k-eGxW-A_ONDD5Y zUzA_03ovThClM3JR=Vrdfc4Cx+1R`F3(fJV!>=y6vF&o2mk=!J_Oy*p-0{)*+8Qv& zMP$`o^vfaR1O9^RQS&@sA9KX;w}!M1w-y&KvJ?=tXlTT{!#|%U%Bk(ggLB|2jhBe` zY&8jq_A0&<(c&(!sOCG_VK6?LeBSi3kog1o6`n7joJ%a)(U-7luUxwW=AN^bwM-Na zTQ`eN$q*VU-bBY*HVA!pWx^t!l`mwqnzv4Ly(aajmAKp6H`KkPu9`oN@FCx={-7?H zF99lnsO)x1jn7|?zyL84Y=LWb|7o)|fooIG*0TfPZ0@3@GA9n&1J z_l$kCSad9?phAt`@*2-#^)b_0?2E3@gL;U|klo>v0wdL2eHTCY8l_YKzE*O@@xlKB0brPc literal 0 HcmV?d00001 diff --git a/dzz/system/css/filelist_middleicon/images/play.png b/dzz/system/css/filelist_middleicon/images/play.png new file mode 100644 index 0000000000000000000000000000000000000000..8c76b10a46796b79cfee43ca23dfffad91c40ef2 GIT binary patch literal 752 zcmVw(EZ*psMAUL&X(s%#> z0!2wgK~y-6m6K0MRB;f;Kl6L~-fHS=-347Gr7k6PDGKxuL6#K4Mg#`pCDKD(JcMVB z=u|?df_A&ac2J1ah>|cOp*mI2!Gb8X)-`a`mu0mK)exst*hysU!gFr0EWq?P(LtwtRSXOP&0t{;O?nQro#?je~*1ob;q}G;b zgCWKX;2iL5y#~#|?InM~yYHrwW4XlJj6eMopjI`8;^yh5BUV?pts(-P0G<~&hyeG# z`U~}!zMmNw$qmiw6@CKXfd)8cb=3EjUp;TD$VZ?Z$f{s^o3H)7<8CT3;ttK4f;)_|vYjvbK2SU4=4smNa+VvR_~6uef=@0Gacr zUB~~D4iqv96wqi1s21)kg~*gpxLRtegFJ%#DOA7@AY-fQ`dZa!1qaiDD1cAiyC?nM zI(vJU+U|IuW2(`zRirNPhNoC@*n};St#Pxv3E&rK1Ecg+elpeR>>8ZR-Te#-0pe!Q z4qGDIfQdCSF8bLmmzU4>kGjL@Vj1%Rx8vr?y1q@<2C7szU665&krw@|9(Pm8vD}TR zxxh#<)fkGKJ=>33UEP%`Y^-Ob0$PAUPkVbDJwN04**OvA+Y*UwR?!AQUh)?!7Z3#w i1v>xtGZo{X-uX9v#qhRA8!pNK0000DmE literal 0 HcmV?d00001 diff --git a/dzz/system/css/filelist_middleicon/images/saveto.png b/dzz/system/css/filelist_middleicon/images/saveto.png new file mode 100644 index 0000000000000000000000000000000000000000..74dc6ef37f3eed845780995e232c1eaa652bf8d9 GIT binary patch literal 656 zcmV;B0&o3^P)pF7IZ~ebVG7wVRUJ4ZXi@?ZDjy3H!m|W zFEKLHbCfm!0010xMObuGZ)S9NVRB^vL1b@YWgtdra%FdKa%*!SLsK^Byt0e{00HPp zL_t(IjjfeCZxc}vg}>RoYj#73a1_xXlpp~;^pq3`M8OZ>hnN=pM<^(uLLwBDl#zl& zMMMZei3_aQAm?FwANNo=ixsrqgvYJ!-I;S{=FXYBCW%?=?ydRx*R3m^z*qqAVsNj$ zbNS8s!NDv{Fp~|~=%md&lfwfZ@=R`{lQ!!xuFjYha=wt2VSORX3e{q2jcAe?{`l;V zzx_2KK%wcy6sNGAg-~9|Pxt>sxZBUW%2Ao2a(3OQ#X6+*0x4BuPwPpRSwNKKoZI)=g@G?IC$u1l)kn#T6Mia z;mE2T{BJE4pqe)K28DBRNEn7z?P1_kQ4W(C1Pz-hoj4?PFWw(+e%{NT4O11S`tQ+6z4<|O!NJ7!u_$v&p#ZlriGRO8lmm&k2S8t qSlutc%wk{}C|~LCz*kA5S(u-ARO9o#=Wtp800004nJ za0`Jj?j|-^ni6 z?a*>0>{8Y$Wr5QN9!)9g4nJJ^^sS)6zMVN^Wo%+wVjlcc_cuBtHz6dv#FO{OZ57AGPIW(=tn}=KgQ%P}>r<)@^^=qBG||3haLC?*4yP^PR9M zl`_#YoTS~@7!!EU7xZ;EGPur6HwZt;uh}+tAEWC``2^Aai$|Z8uD#C}_c*mQ&d+d8 zjCfvK#FR>=&o7oq?7Q~Ke?wE?pCj9?cHVP5Vx1$JS{Hg+KS8SgquJ33uN!`u%RMrm z_b52)5_?OKY}u&uifNB>Q@5&Tc8WHOnRb z-7&k*81hl>x9MNz+uvutXI&z(E8>u(U*HmnbJdJhZ=KjTOB{~VH#TXDeeNx8={sBM T(F;FdP&0VC`njxgN@xNAbIieP literal 0 HcmV?d00001 diff --git a/dzz/system/css/filelist_middleicon/images/selected_folder.png b/dzz/system/css/filelist_middleicon/images/selected_folder.png new file mode 100644 index 0000000000000000000000000000000000000000..443cd3a5ef24ad823e40c456a61c5fad8120ab91 GIT binary patch literal 482 zcmV<80UiE{P)bd~0010xMObuGZ)S9NVRB^vL1b@YWgtdra%FdKa%*!SLsK^Byt0e{00BBl zL_t(IjiuAEOI$$^$MMgF1to=r;7coMqtzkAQV2>Kn>6XtrifT*7s6wU2%>OAA&^2y zu=5WvsX`z@QXGPnU?Fw~3))zy@Vun(c|1-J?r^I8&G7r~>?~7jHkw`F-TiY+|D96TBXfRC8OCE5c4vb>nat5U9~7=HE*$ns(cA25a% zHg0SEcJLZA<#{Q^aC%$l3^B`#CwPNaiebBw&#;VP{K8I^TYN2Jf`c_?f#_WRjVgcsF)#!1pWlD~U;X`;Ve7BI3~zq?`Oom?+kXa7kco0LGKldo zF>tUjFfbMrO#1)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Il)A5bYqK4k3<8mx9)8nH)b~9{MDeyc;M@>>dDF8sDS%XrkL|Ll5a@VcO1uG-{1YNyW=i@*ZtJeR@Tnb)O6^m zY=e>-twu^D6;g&F$QXMNY;Ej87-KMq2zgyslQP?_N>Du zsUvrPU3|86pDVwd;LbB<@(o|imcdUa>kh4)xPNeEp-buyCDRLQzrAF8c5$7vV5t)7 zJ=>dj72Ed3G4tiD7QQ>R^>kJBuJ($iGg7Af5M?bF?DphXLvHb6w{K&!@NH;(`|(F4%fxZ(srqjG+WHX~NVWl>sK`U&CrKfuCL zT&jm@J&R?Yj1eE_=JmkCug5l5iv9bKnZv`wbao!b@Ap$*o&vzoGe-F7gMYeizR2%4 zd<;12W+cxCQYxO9QEWoQBQbGcVv~>qfdJ8H3{BIRnwlaVPoSq#09Hj^lD~6DF@1dj zZgqEv9&Huow2Q*=F0;y>(M&5}$&pBebUH&anPhTulB}NPc_2V68b#N2@)s?_w|prz z)n(%7&mEMMm9f5QV|Kox+ty)%96;0D{I2^RMxBr;_bb5R3hRp@byk0dD4l^1I z(%apQVHm8f{fJ_pSATN*%1~rvFcM3dR|NQC08VGpFxr?@4+3xM4|ip65#z^cR>ejU&Tl)TgO0B{1hYL^AM fPBHtG-v_S&L$(`j*qlao00000NkvXXu0mjfQ^Ata literal 0 HcmV?d00001 diff --git a/dzz/system/css/filelist_middleicon/images/share3.png b/dzz/system/css/filelist_middleicon/images/share3.png new file mode 100644 index 0000000000000000000000000000000000000000..92fb6906f8e64d81b5bea37f9cf678cab92f09c5 GIT binary patch literal 524 zcmV+n0`vWeP)YN2Jf`c_?f#_WRjVgcsF)#!1pWlD~U;X`;Ve7BI3~zq?`Oom?+kXa7kco0LGKldo zF>tUjFfbMrO#1)e!2^ahYq}V=ZQI7+tMwgh^55UTe!aMP_QAEiYcIWf@oW#!fOS9v zUZWepa`Wa*h7TV;GQ4^7hT+SXFAP6EeP#Id9c&02uc(rmb$pH5i`y5BF7Dgt|K`#2 zl|b>AK|j6lP#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xlQiv&egvuE^(uOU)wW3Vo|r$4=l zn$^T}ppWDOQj1qGwPx0l&+w-ds(Cr5?4)|LEo5J%lBw~Cz zq*G$MdY8_+X>kpbOZVcm|9-x-=q3h#P7Qg2qdEdn0|;W|7JvHFPRo?BGd%g#*+(!& z7tXvAch_NVU{e^rMMYX5J0vL;R7{lSulxcarGB-51TQ#d2DoU%u!nqHB+~K3J14-e zRtn4T1^p&_d-lVfL*5I2U0vtZ&L2>z^6& z+88Sjv`Re;N7EE+_nM{mLnvhBE(8d5WvWxss6S>t8ATkIEhNUR73f+8@DA-o=*B2^ zoVCE&hG^|qAI4d;U*+}N)#jcu!#FY&es@YV{ww08=ULx`%`%tJUyLtJUC+0@>}%J_ z!lOwA^f8o?|FfE$jz<=VZerpAC$#bKQ@*UzaWdjjHC8%vmLfZeAUHjDIV#~UL{A~; z;ab3rtGr7`?ao4_%!A4%UZE&5-UH2qaiqWQr>9A1gA6U~nMTPhUikYg5Ceae_^y<+1la z#w~Vr^D6!wZMNa%z{s#%^~jDn8~1o4E_G+K=?pF{J(3nB8jq!gd15*`%MkFQ`=@ru z$-s|Qw>M#OE~(5eM=ZfVuhbU0U!kMRKVd*n^wf*&_w(YxxiXbsGYVn+Bs@Snc@F-N zRFAuN{rdcSVx?YsGSI5cf6gp=sUds0`zV)N=OFxjZn8+n_#Ff;cnM}f2YccB|HVeK z3i^I@3Ygw%B}V*++fqpn^Uu!sfhR?-iNzf^7ZswpYPlYW(w}@t^3i@(#O2M8+At<2 zBJ(*7-j~WfN)_PmzPL4>ul#?s@7U8}A}^pbB1+Zw{>bY};|H`JKYdiGY8n3j0Fz(D AyZ`_I literal 0 HcmV?d00001 diff --git a/dzz/system/css/filelist_middleicon/images/tips_1.png b/dzz/system/css/filelist_middleicon/images/tips_1.png new file mode 100644 index 0000000000000000000000000000000000000000..57d60620916dd3bc37407902b7547d86f40da74e GIT binary patch literal 1053 zcmV+&1mgRNP)$1uKrRJq0lv2NiVffkl+S-5(#(wqt0ZrfcCzVn)5s|1~ z6YtJ~xVL{7Z(&}do$WTf=KKDn4Q4mPuz3;&U~c>Vm#I|hBjvj66n@74^Df+cSjH4FD(&mZj#F7CV(%1IH|ks>Fw=3>doIKZZwF)@P)v3 z#J-QWxJc&AnWK82APJab(hD?t#{MMPTFs%(8XD-Wk<Ng98D>jVjy1eEXPwdVH%Z33x#@Ol6(X+QorI`mC8;fBWHbq3jFl;{9*jT(( zD$Sf89X+doBf8FN+u$=U1@r=GAO~c3_amiq2D{c411+ElG=Mtb0)ftve9A=Wgy^s6 zYpBKU@7IQgI@bg|eI4q0=<2ldm?bo*t?o|44#l0o?oK;9ZWjkUwZ}G8^cvN1|4jS` X2fHD{fhapO00000NkvXXu0mjfXEyD^ literal 0 HcmV?d00001 diff --git a/dzz/system/css/filelist_middleicon/images/tips_2.png b/dzz/system/css/filelist_middleicon/images/tips_2.png new file mode 100644 index 0000000000000000000000000000000000000000..a948baf75af7b036a0c8311e003a17b8d0662db6 GIT binary patch literal 1109 zcmV-b1giUqP)TID!O)wgX`j^lhNrR&H^z#HN|>{ z1!(+R%2Gc6x@nqU2_fp7i92}drA;2&R1I2kZ-dd;)T(J(XU_Bb|DKyW2h0LN^w4^! z0Q9WmbnCkQrhQ|G+`zBMLVl~jhi`3_6FYXC*bA*~`)g}&j!jO!*j!&f5rI|xAyDbP zdi9cF7#*1(zGG#eAB_OrFwj(WTgG*;Z{5OMT%`Qa;dn(Xc654bs(W;J*ar|+_;P=a zj~{7lY8tYKuB+*9y0Kyv+fKMqg;kr%GiQk(JI=!V{96q*H9rEr7N*qpRaL!*lLA}wx@?!>ru)pD$W2sfQ+EJX__aT>1o`_Nz8H!>6CU16@Zt{P)emR z4;*+N&;eHiRKU4-Z`3zDDeXMI z!gbvYYXKiD4nZcJ9(OgxEPS2v903F%KPNF_Zb7aB)z= z135Y}G9XlyWXHRdY#W)+@7N{VCfRWg#WcA!GSUx7AQ0ACMI|ct?0M?1yLW$zS5!3L zd;1--KmUR*1j_$O2)IE&qP>m!@4qEy+hZ+_ji)o|^c;{=^{|kN#iE+cX8(A(y}d1Y z`VC7c3MbRoPRXzLnz;SC>ffP9$V2*JvK z0M~F)ZPsp_4(k>AsXI|5}_klbpAL6>k`X# b=a1+gNn!vGRlUT;00000NkvXXu0mjfKt%Rt literal 0 HcmV?d00001 diff --git a/dzz/system/css/filelist_middleicon/images/tips_3.png b/dzz/system/css/filelist_middleicon/images/tips_3.png new file mode 100644 index 0000000000000000000000000000000000000000..55e4c41c3b04948f240593f07034d813c0024efe GIT binary patch literal 1118 zcmV-k1flzhP)d(io_s1wly#TWj(l)?zC{5z&?+R8)M4 zf(82!K_65EU;0*B@P;%H&4Z0kq0lr^G*O|Uo2J{`Ol)?u-OOI*a>j?9Nw?9LG+F=f z!8tSM^5cKb`Od)rg6KPSDkzKOwQF(9vfh^4vpbsVfhk(x&zBXQ&v94W87dHndEb7#(!055=1 z{+yiL-PYbdVvbx2rO%zkh}Lcz#99?rOzIB5L~QRq78e$dv^F+=2e>L_SJdtG^=}|$ zX!-nkLXL|xH*a~?N|lmqe?QT#J=E0J9tQdW8Ng_|uJ5;IX0TH!^cn+cm8u3K04JTH zluV-U-1!8c0k#T+fUv5nO)JSHu4&@BZq+~nxy2%->ytz}I}<*Pq5=w_3L!L^%OOn@ z={Qw~k);yu@-jjQo${$xf@KPMo+pK-DRL!`wEhPe%R+=BNGVH{4G}?}5su^B3b(Z0 zC(S&rWmO->c8IjKW7~FyvLUNU&&#CKztum~(H)A%aTXU*gs2{f=b_Zqp+CHfzcZO% z@spn77v%WZ*pLW?NE~~el4&CI`Km?9G)WvgilXcMJ~nm%koZYY1LAdCx88sC#*Ob| zwY42LUww`24?m&_fwGy70Ji55@9C!Ho3F^3=0s;(+o4Q4JrCqUn!kaI#bPL%&HnLB zPfvH^(2Isp6mDO-jGfQpIL@Yor|UGl*GtpqpJKai`h(uyw=ND3PXjA}C5$pm1c(FM zpF42i!7opr{;;93akpn#Q+aEvl;1cpKcbW!3$k>ueb#f#g13qUT)^=sHi4WU1^>IJR&;XwA1+`4 zdCG2ueIR9>AeBJUAHU>B-k-|~K;Z7jRR9!pEKoja0mw$33C6Yk2^NQR>F?} kBB^O z!JvJJpbsj7FMTU5ctaY9=E26NP-q$vO;j*+({!7giOp`do7u};&iJr1F-G5-P5i?L zhnaKc`|&?>zVl%KLG+(I8H`2h^5wW?S+7YchoqE~-X=>*IW48UVB7WwrfJ@1fS8?` zVLgulsQg>Xa-s0JuIrx&A)2k}D>#|u|Cn~uYE=_ETf=SbU8<_~<{jt!9}5f51M`3v zOj-{p04--(XEaTF%Dgm6e)v0Nu}}@TH7Q07(E|sGKG2oi-PANTnNC00(b6&Ipz;zg!Kp^O{*%P>o{1&5;gbSOXAqmI8y%j((&W_&z?SA2D|`J z`E6=yUt4?os5yEulsS6_BU)Qku#GCNn$#VAlGuTREG;e`Yi(@&3UE~_?y0-#>t965 z(8{@Ugd7)XR(ESRN|ln_zyQ&%{nXUf9t8#f831a!u6J9rv)Ji0dX0g!%3BI304I~B zoJyhZ*>gXj0k#T+fUv5nO{=LCu4&@B?v}y@a!V!3SEh(`b|!p4MFkW<6+&n-pGTS| z(s8y0P?pQMD=P>gbSf1_3AQ-od7c!SrpVO-(%L3K%R+=BNGZ!yj1xf}6prIu54W`5 zD$N3}Wo-|j?GR~e$F}V(730BN>Xvah8@)gxFd*&qJxJL%(Y;e`d2k z;TLMvAIORE@!{@dGMRYcITrffA)+W-3Rsqs#y4I^(RF?qA3qOB{6eh(@wy#5Zu|Y} z)vsfGZ_V;NZyn z{rwX@R0hZaCBRwV&8Sp*#F!sZD$WMCP4GM3?C}nIJqfsg5CZFzXsEk00000NkvXXu0mjfE7S0x literal 0 HcmV?d00001 diff --git a/dzz/system/css/filelist_middleicon/images/tishibg.png b/dzz/system/css/filelist_middleicon/images/tishibg.png new file mode 100644 index 0000000000000000000000000000000000000000..c8224979dddfe1311277a73994aec7b5c4833304 GIT binary patch literal 7373 zcmbtZbyQT*x4v|jf|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icon/images/user100.png new file mode 100644 index 0000000000000000000000000000000000000000..ec473358b3ac306d83aef7654ce469ca4243e22d GIT binary patch literal 8223 zcmV+)AmHDLP)000W>0fLJSS^xk57IZ~ebVG7wVRUJ4ZXi@?ZDjy3H!m`knFbvBKoCI-TCrS(`i2abqBrgsc5W``^8%=|!|zMSgr>iX)xR&^CIGwvjXL<9giGlxWEw*aW+5-#(o z1$h8~#s7AHQGVa`zI(Lh&za33%P!v&`5mluI;m&b!UJ>gP_HbYS?O*2F1gpY6?)nK zhar3YqG!ne4^wX6zI#2(MgW{lLpV0TvLL7fN1k(l;3@)`>tM8Tf&5>db4lho3fHy~ zi*4KU+-LhLlAZs3`)*$M`PF@o1Nc&aLn7oNkKjxf)J5kQfI<@pxo^s?%{MP3K->hG zonxRKkfV|-s@tCH<8=Ej@}1qhjQTsX=l|Ao5@;76mlgsnFBZV6@^7mX<#`wAHoyTt zC~jVMwrDwqXa9D|Cth7{b<5Yrg>GY62B=NOa}0al0=)=iFTgFp5&%_llfoQOh32sf zxNQ_nfO5n$;DA*=0}Jvj;@IPIa~s$C{&PWeLHBKC1F)P6)Il_!t??Y!z+VLPG7feD zvneRg1!Yq31Kq~e#j`~@JjXsRwYnSbdFS5p+;OSWlhg#zir?zkd5}GJMff6)^?_=W zE)$pA2JmhAIc$47;g;B~1v11Ok~K@bFrnK=wY z)$jKeGlLmaR54Q&MHGgi0sv+vB4TDHW(E-<2!eo!!0gt!pO~4o)?AjWI#-s7^E@|M zmN5~rH4cdglgUKqdCp2Hka@^Y)n{hG81 zi8yDrBD|s+z?Q`weQUwA;D!JKU2G|iqUhqqjUWhvFbIMGKtM!FDb&0;#cj7pX*%($zMWj^70C(b8efT3E*%%Ioagro@{lbOb!w)^Qk>`2Av;?p* zyt1;g+Ua%&%}Q+SVs8Um8forXb0TDNs%u1AAR)E zl?xXxT>8NK-v6%09((MOIF5&56b^|f0?^yo*yvondUde2zSbMA47+is(~sj$H&E13 zK@g*8=2jXMg(1pi-Ip)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%zxlE+KAAAXPjR%*?EF|I&O!fH6!u*8o{}kC_0{xk0hSJ(!s(&vQn(uyZkA zXrpHbh07>|K(&|y%{`G!BpVJ+#lAe(;9L{{*8&{?fSj4bBG7Fcv1>fZZ+We}PpJUb zg4_TXb!(kSZVR9Y%#1XZiycd=PIYu>m7dh87NSu>BYVx?2UEGj8=b4%z z-^RWN_=eX~ZY_9n>n5*@lnbtH8y5}CL6$)Kx(37YVG-KFwUPmt&-gCS)j+bxG_UCD zLv@<}FTrIr8^y9?`L2tO8=r*Gyl&iU+5iUXVO#B-YXey>>S6aSxNTv|+B?($4v8!m z+k#1JSGI21?`r{;E38O>eSp}-IpjTEuu0@;aH_Ly%fp^)0n1gZsC4yI`I)>-_@PNcdHmQ)&CQYYIKif!N|xq6Dd)(5aOY~{kn%YgI& z>f4ujk3te437WfKDvh z0Q*4m?fZ^h09`3?98lZHr<2_V;LGbC`#9SLR|4$o{?je{)irqwkY0c#i9|yDZpHH8eJN_)a@k{7q_^pDAD6drwLAvqBDob< zOA7(^UF>kQ4?N#F%eg)gYxixdmUDNt0p4an9hGa_sEwN!8Dg@`78rNAKDS{QG#dlZ z1iE&v<_0YQ7dQmKZ4}nlNL;F0Z2^~YaHD)^g67ND#?i;6HV$?Fmw9{@xr~F`^ti84 zpiR#%qGJQ>k_5ao)m>c)_&L$HFUjQ~UuF8l{BfyGy!!r^=X~T7^LF30Em+hWfa3w` z(uo0lSh6o*U&hlIYGh4+;kNlma#5RDUq-ID^+}Ifey410dEECr5#SC>{~y!fsU=it R3()`o002ovPDHLkV1iD;@+|-W literal 0 HcmV?d00001 diff --git a/dzz/system/css/filelist_middleicon/images/user50.png b/dzz/system/css/filelist_middleicon/images/user50.png new file mode 100644 index 0000000000000000000000000000000000000000..433290c450fdc5d1313a3ae442407517e6530bec GIT binary patch literal 3307 zcmV

    5Q;P)000W>0fLJSS^xk57IZ~ebVG7wVRUJ4ZXi@?ZDjy3H!mli$&HTRxtoqc@lLym2R zG&R?4uQh*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mQU+jEq7=nuu!kdVLNq z3%Y>R4X&8!lLrpeb+JgNqiD^vvQ|VB0bJEq3$D0h2Az70SpYL4vN$m@Ve@YHOp|1( zYl!WJjtyrI9XfR5!3Q2#+;+zu8rB-=-bHEMdW>WngeHKdh=d{%iHJ#_oG6{=vgTxy zWYrPC*|C+fp*el#jNQ3oN7GsxfhgHze%(Tybn+^_x91v|x$ic_Ihi5d9M<;+-n3yu zNX*F=pC4SP6S;Z}12T$z=DBkQg~Iyv7?L=R>uUEJjmFfgufFP^ zI&~_k0k!eg(M15IOP4OK1VOOz_FZbuhs0WIH_y(_e&wZ?UaAvOorv0TO$~^s+^pC6 zf3I9w#3PUFSic^Fs0<&ZOilccfRv;G@Fciy#bMVbeyKQoh@0`Xt?F< z7UXpqS;N8=<}_39=^~wuz$Q{awYmhNl5I9m$KSQ_%;Abv1Y%7od4IP)z$z&n|fC< usfV`aPVuLOAYOR_u3+?I{`cf$k^ckck`40<=*z1B0000{F literal 0 HcmV?d00001 diff --git a/dzz/system/css/filelist_middleicon/images/video50.png b/dzz/system/css/filelist_middleicon/images/video50.png new file mode 100644 index 0000000000000000000000000000000000000000..fa4862c76a6c412134d4e42fdc8840ba6044b2ba GIT binary patch literal 2494 zcmV;v2|@OWP)w(EZ*psMAUL&X(s%#> z2@^>~K~!jg?VC$%RmT~}|KH4&SR!3{PL5mQQAB}xQ&w2QQrQmIH? zv_#D!*|a!)u;_+l7e!HMa4>#czwYBa?#z5$ zoOAuiqEaI#CRh1OmhQFBId{If-}!$3Z|0bo8DDBq3IHB`_0_ev1_$#EZ@*n-trz}i zt))1QednAILNEYYt${8PODTa*F&5{XBcf_9m$M5Oi(?e`?)76S=SNSRm{R~CggEMH zeZ=?u+eWE8r60zg=Y=yfGwn%|1OV=uR3iHSzZYgE&+|-kb8`qF5<(aNl9UQPqK>dq z`2#Z_txZUy09vLdCeB4d+>%1TITx;5x2~^LDt&E!etv~RS{>!{dE|1rn}tH*Y?ft- zvbG~9We<|1jfgx207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q5|<4FrIkS>rYBDx2Q$W2eEFG&D70189|W&`Gh z4ddE`Fgd3+(G+{$2kCJfCrNT2>MKLY^Smh`#Cu4;=xP$j>zH|0_I~k}5yq@lz(31L z@)sdQ?E8Ls&z?OmUc7kmJJ#C&@flwn5s}hbzY|5#F=mbxQ2Eva4?I5T`#%ih*kK8F zkzu#U%v09dVx>}X8#it&*3%+0kYd*uGij}zkF7QRJ9pmETEjZG47997^#)rn>5+<^a}964`DVxX`1pDN&AO>+n{&?6vThfElX5-*4*l%8=N=bA zl$BCybab@UT3bQ=VAmRB4jemn?2U$oh8Y4dH$B}lyJgF~R*K?<8Uip8$zl|(xpe80 z0eR=n6-x`Z|hXk|u zBz9|302%=}Ecy@kd5rRNQq62OVlj4uC0=W(5Ai%;(n@(90Ej3t#%w~JEFWf)N~uWz z7c%2nwbnL+c{i5zGDIw_UF!k=O04}WfLKad>g(%!@$%)%Pt^-(h)8O!2g5M@O}4jN z*}r4Qp-Wmn6D0`)U;!-Viv^0zJju-S#u(S#-CeAwXUqVAnIq@iBs0%3bM@=Jz2m;` zBYko#GiH>v|BXT5ojZ4~_5JtXZ?04-ExBB--8oku>5++<{gWq8wvLR9G*?QcdvmR= z_cOEQPprD
      &O{QVXMQg1lCMMdfwRK}vnHk2Irv?TFzUuq_3=vUOEVj&U z*&?*(HO7ETAG$N<9~6eV7{}AY!^4DZkr}`>03QJGRxys1lrzSZM@B~G0VGKAdkt-E zqYRt};8Cs1CjcPIWiM;qgR>LsNdl?Ysujm&F%p0I-w@06U--FKExU_=!Ta:hover{ + color:#333; +} + +.IcoText_div { max-height:38px; overflow:hidden;word-break:break-all; } +.IcoText_div table{table-layout:fixed;} +.IcoText_div a{ + text-decoration:none; +} +.icosContainer .IcoText_div{position:relative;} +* html .IcoText_div { height: expression(this.height > 38 ? 38 : true);} +.IcoText_textarea { + border: 1px solid #6CABE7; + font-size: 13px; + overflow: visible; + z-index: 99999999; +} + +/*桌面图标前景层*/ +/*html结构 +
      + + + + +
      +*/ +.icoblank_tip{ + position:absolute; + display:none; + z-index:10; + +} +.Icoselected .icoblank_tip,.hover .icoblank_tip{ + display:block; + transition: all 0.5s ease-in 0s; +} +.icoblank_tip .icon +{ + display:none; + width:17px; + height:17px; + margin:0 5px; + float:left; + background-image:url(/dzz/styles/icoblock/default/images/ops.png); + background-repeat:no-repeat; +} + +.hover .icoblank_tip .icon{ + transition: all 0.2s ease-in 0s; + display:inline-block; +} +.like_icon{ + background-position:0px 0px; +} +.liked_icon{ + background-position:-20px 0px; +} +.like_icon:hover{ + background-position:-20px 0; +} + +.hover .icoblank_tip .liked_icon:hover{ + background-position:-20px 0; +} + +.share_icon{ + background-position:0px -20px; +} +.share_icon:hover{ + background-position:-20px -20px; +} +.download_icon{ + background-position:0px -40px; +} +.download_icon:hover{ + background-position:-20px -40px; +} +.saveto_icon{ + background-position:0px -60px; +} +.saveto_icon:hover{ + background-position:-20px -60px; +} + + + +.op_righttop{ + right:-24px; + top:0px; + width:27px; + +} +.op_righttop .icon{ + margin-bottom:5px; +} +.op_lefttop{ + left:0px; + top:-17px; + height:17px; +} +.op_lefttop .icon{ + margin-right:5px; +} + + +/*右下角选择框*/ + +.icoblank_rightbottom{ + width:16px; + height:16px; + bottom:2px; + right:2px; + transition: all 0.2s ease-in 0s; + z-index:10; +} +.window .icoblank_rightbottom{ + background-color:#FFF; +} +.hover .icoblank_rightbottom{ + + left:3px; + top:3px; + _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='dzz/styles/icoblock/images/checkbox.png', sizingMethod='scale'); + background-image:url(images/checkbox.png) !important; + background-image:none; + background-repeat: no-repeat; + +} +.Icoselected .icoblank_rightbottom{ + left:3px; + top:3px; + _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='dzz/styles/icoblock/images/selected.png', sizingMethod='scale'); + background-image:url(images/selected.png) !important; + background-image:none; + background-repeat: no-repeat; + +} +.Icoselected .icoblank_rightbottom,.hover .icoblank_rightbottom,.hover .icoblank_leftbottom{ + display:block; +} +.selectbox{ + _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='dzz/styles/icoblock/default/images/checkbox.png', sizingMethod='scale'); + background-image:url(./images/checkbox.png) !important; + background-image:none; + background-repeat: no-repeat; + width:16px; + height:16px; + display:inline-block; + margin:5px; +} +.Icoselected .selectbox{ + display:inline-block; + _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='dzz/styles/icoblock/default/images/selected_folder.png', sizingMethod='scale'); + background-image:url(./images/selected_folder.png) !important; + background-image:none; + background-repeat: no-repeat; +} + + + + + + + + + + +/*图标图片层start*/ + +/*图标图片层html +
      + + + + + + +
      + +
      + +
      + +
      +
      +
      + +
      +
      +此例中图标样式为50×50的中图标 +*/ + +.icoimgContainer_folder{} +.icoimgContainer_image{} +.icoimgContainer_video{} +.icoimgContainer_music{} +.icoimgContainer_user{} +.icoimgContainer_link{} +.icoimgContainer_attach{} + +.icoimgContainer_shortcut .icoimgCover_up{ /*通用图标遮罩层前景层*/ + background-image:url(images/shortcut.png); + background-repeat: no-repeat ; + background-size:100%; +} +.icoimgContainer .icoimgCover_up{ /*通用图标遮罩层前景层*/ + +} +.icoimgContainer .icoimgCover_down{/*通用图标遮罩层背景层*/ + +} +.icoimgContainer_image .icoimgCover_up{ /*图片类图标遮罩层前景层*/ + +} +.icoimgContainer_image .icoimgCover_down{ /*图片类图标遮罩层背景层*/ + +} + +/*图标图标tips*/ +/*用户图标左上角数字提醒*/ +.icoimgtips .icobutton_tips{ + float:left; + margin:2px 0px 0 -2px; + position:absolute; + top:-5px; + right:-5px; +} +.icoimgtips .tips_size_1{ + line-height:16px; + font-size:12px; + width:21px; + height:21px; + display:block; + _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='dzz/styles/icoblock/images/tips_1.png', sizingMethod='scale'); + background-image:url(images/tips_1.png) !important; + background-image:none; + background-repeat: no-repeat; + color:#FFF; +} +.icoimgtips .tips_size_2{ + line-height:16px; + font-size:12px; + width:29px; + height:21px; + display:block; + _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='dzz/styles/icoblock/images/tips_2.png', sizingMethod='scale'); + background-image:url(images/tips_2.png) !important; + background-image:none; + background-repeat: no-repeat; + color:#FFF; +} +.icoimgtips .tips_size_3{ + line-height:16px; + font-size:12px; + width:35px; + height:21px; + display:block; + _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='dzz/styles/icoblock/images/tips_3.png', sizingMethod='scale'); + background-image:url(images/tips_3.png) !important; + background-image:none; + background-repeat: no-repeat; + color:#FFF; +} +.icoimgtips .tips_size_4{ + line-height:16px; + font-size:12px; + width:40px; + height:21px; + display:block; + _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='dzz/styles/icoblock/images/tips_4.png', sizingMethod='scale'); + background-image:url(images/tips_4.png) !important; + background-image:none; + background-repeat: no-repeat; + color:#FFF; +} +/*图标右下喜欢提醒*/ +.icoimgtips .icoimg_liked_tips{ + position:absolute; + left:-5px; + top:-5px; + width:17px; + height:17px; + background:url(/dzz/styles/icoblock/default/images/ops.png) -20px 0 no-repeat; +} +/*图标左下角分享提醒*/ +.icoimgtips .icoimg_share_tips{ + position:absolute; + left:-5px; + bottom:0px; +} +.icoimgtips .icoimg_share_tips_1{ + float:left; + height:16px; + width:16px; + margin-right:5px; + _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='dzz/styles/icoblock/images/share1.png', sizingMethod='scale'); + background-image:url(images/share1.png) !important; + background-image:none; + background-repeat: no-repeat; + cursor:pointer +} +.icoimgtips .icoimg_share_tips_2{ + float:left; + height:16px; + width:16px; + margin-right:5px; + _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='dzz/styles/icoblock/images/share2.png', sizingMethod='scale'); + background-image:url(images/share2.png) !important; + background-image:none; + background-repeat: no-repeat; + cursor:pointer +} +.icoimgtips .icoimg_share_tips_3{ + float:left; + height:16px; + width:16px; + margin-right:5px; + _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='dzz/styles/icoblock/images/share3.png', sizingMethod='scale'); + background-image:url(images/share3.png) !important; + background-image:none; + background-repeat: no-repeat; + cursor:pointer +} +/*图标左下角分享提醒*/ +/*图标图片*/ +.IcoImg img {background-color: #FFF; color: #FFF; padding: 2px; vertical-align: bottom;} +.imageclass{ + background: #FFFFFF; + border: 1px solid #999; + padding: 2px; + box-shadow:1px 1px 2px #000; + display:none; + margin: -3px; +} +.ie6 .imageclass,.ie7 .imageclass{ + margin:0; + position:relative; + left:-3px; +} + +.appclass{ + box-shadow:1px 1px 2px #000; + display:none; +} +.videocss_loaded_flag,.usercss_loaded_flag{ + width:1px; + height:1px; +} +.videoclass{ + border: 1px solid #000; + box-shadow:1px 1px 2px #000; + display:none; + margin:-2px; +} +.ie6 .videoclass,.ie7 .videoclass{ + margin:0; + position:relative; + left:-2px; +} +.videoclass100_100{ + background: url(images/video100.png) center no-repeat; + padding: 6px 16px 6px 16px; + width:102px; + height:83px; + margin: -6px -16px -6px -16px; +} +.ie6 .videoclass100_100,.ie7 .videoclass100_100{ + margin:0; + position:relative; + left:-16px; +} +.videoclass50_50{ + background: url(images/video50.png) center no-repeat; + padding: 3px 9px; + width:50px; + height:41px; + margin: -3px -9px; +} +.ie6 .videoclass50_50{ + margin:0; +} +.ie7 .videoclass50_50{ + margin:0; + position:relative; + left:-9px; +} +.userclass{ + background: #FFFFFF; + border: 1px solid #999; + padding: 2px; + box-shadow:1px 1px 2px #000; + display:none; + margin: -3px; +} +.ie6 .userclass,.ie7 .userclass{ + margin:0; + position:relative; + left:-3px; + top:-3px; +} + +.userclass100_100{ + background: url(images/user100.png) center no-repeat; + padding:15px 19px 21px 16px;width:85px;height:84px; + margin:-15px -19px -21px -16px; +} +.ie6 .userclass100_100,.ie7 .userclass100_100{ + margin:0; + position:relative; + left:-8px; +} +.userclass50_50{ + background: url(images/user50.png) center no-repeat; + padding:7px 10px 11px 8px; + width:42px;height:41px; + margin:-7px -10px -11px -8px; +} +.ie6 .userclass50_50,.ie7 .userclass50_50{ + margin:0; + position:relative; + left:-4px; +} + +.image_tosmall.imageclass{ + +} +.icoimgContainer_link .image_tosmall{ + background:url('./images/link_small_bg.png') no-repeat center center; + background-size:contain; +} + +/*图标图片层end*/ \ No newline at end of file diff --git a/dzz/system/css/mobile/mobile_member.css b/dzz/system/css/mobile/mobile_member.css new file mode 100644 index 0000000..96e4c81 --- /dev/null +++ b/dzz/system/css/mobile/mobile_member.css @@ -0,0 +1,405 @@ +/*搜索*/ +html, body { + background-color: #F2F2F2; + -webkit-tap-highlight-color: transparent; + min-height: 100%; + height: auto; +} +ul,li,ul li{ + list-style: none; +} +.hide{ + display: none; +} +.weui-search-bar { + background-color: #F2F2F2; + padding: 0.5rem 0.5rem 0rem 0.5rem; + margin-bottom: 0.5rem; + position: fixed; + width: 100%; + top: 0; + z-index: 3; +} +.weui-search-bar__form { + background-color: transparent; + height: 1.5rem; +} +.weui-search-return__cancel-btn { + margin-left: 0.5rem; + line-height: 1.4rem; + color: #3779ff; + white-space: nowrap; +} +.weui-search-bar__box { + padding-left: 0.5rem; +} +.weui-search-bar__box .weui-search-bar__input { + padding: 0; + line-height: 1.5rem; + height: auto; +} +.weui-search-bar__box .weui-icon-clear { + line-height: 1.5rem; +} +.weui-search-index__label, .weui-search-bar__label { + position: absolute; + text-align: left; + padding-left: 0.5rem; + top: 0px; + bottom: 0px; + left: 0px; + right: 0px; + border-radius: 30px; + z-index: 2; + color: #9b9b9b; + background: #fff; +} +.weui-search-index__label .weui-icon-search, .weui-search-bar__label .weui-icon-search { + float: right; + clear: both; + line-height: 1.5rem; + margin-right: 0.5rem; +} +.weui-search-bar:after { + border: none; +} +.weui-search-bar__form:after { + border-radius: 30px; +} +.weui-cell__hd { + display: block; + float: left; +} +.weui-cell__hd .special_avatar_class { + display: block; + width: 2rem; + height: 2rem; + line-height: 2rem; + border-radius: 50%; + margin-right: 0.5rem; +} +.weui-cell__bd { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + word-break: break-all; +} +.weui-cells_margin_top{ + margin-top: 60px; +} +.weui-cell-member{ + background-color: #FFFFFF; +} +.Topcarousel,.iconFirstWord { + display: block; + color: #fff; + font-size: 1rem; + width: 2rem; + height: 2rem; + line-height: 2rem; + text-align: center; + border-radius: 50%; + margin-right: 0.5rem; + font-weight: bold; +} +.weui-cell__bd h4{ + color: #555555; +/* font-weight: normal;*/ + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + word-break: break-all; +} +.weui-cell__bd .weui-member-team{ + font-weight:600; +} +.weui-member-select{ + position: fixed; + bottom: 0; + background-color: #FFFFFF; + width: 100%; + height: 2.5rem; + box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.1); + z-index: 3; +} +.weui-member-success{ + position: absolute; + right: 0; + top: 0rem; + width: 5rem; + line-height: 2.5rem; + text-align: center; + height: 100%; + box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.1); +} +.weui-member-select-scroller .special_avatar_class{ + width: 1.5rem; + height: 1.5rem; + line-height: 1.5rem; + text-align: center; + border-radius: 50%; + margin-right: 0.5rem; +} +.weui-member-success .weui-member-success-word{ + line-height: 2.5rem; + width: 100%; + color:#3779ff; + display: block; + background-color: #fff; + outline: 0; + border: none; +} +.weui-member-select-user{ + margin-right: 5rem; + line-height: 2.5rem; + height: 100%; + overflow: hidden; +} +.weui-member-select-scroller{ + overflow: hidden; + height: 2.5rem; + margin-left: 0.5rem; + min-width: 100%; +} +.weui-member-select-scroller li{ + float: left; + line-height: 2.5rem; + height: 100%; + padding-top: 0.5rem; + position: relative; +} + +.weui-member-select-scroller .Topcarousel{ + width: 1.5rem; + height: 1.5rem; + line-height: 1.5rem; +} +/*文件另存为*/ +.weui_cells-margin-top{ + margin-top: 2.8rem; +} +.weui-cell__explorer { + background-color: #ff9800; +} +.weui-cell__group { + background-color: #009688; +} +.weui-cell__img { + font-size: 24px; + margin-right: 0.5rem; + display: block; + color: #FFFFFF; + padding: 0.4rem; + border-radius: 0.14rem; +} +.weui-cells__recent{ + margin-bottom:0.5rem; +} +.weui-file-keep{ + background-color: #FFFFFF; + line-height: 2.75rem; + text-align: center; + font-size: 0.8rem; + position: fixed; + width: 100%; + top: 0; + z-index: 3; +} +.weui-file-keep .weui-file-keep-cancel { + padding-left: 1rem; +} +.weui-file-keep .placeholder { + color: #2196f3; +} +.weui-file-div-keep-cancel{ + display: block; + color: #2196f3; +} +.weui-file-sumite-keep{ + padding-right: 1rem; +} +.weui-address { + position: relative; +} +.weui-cell-address{ + margin-top:2.75rem; +} +.weui-index { + position: absolute; + top: 0.4rem; + left: 0.5rem; + width: 3rem; + line-height: 1rem; +} +.weui-index .dzz-index { + font-size: 1.2rem; + color: #3779FF; +} +.weui-index .dzz-index-vline { + font-size: 1.2rem; + color: #DDDDDD; +} +.weui-address-container { + margin-left: 3rem; + overflow: hidden; + line-height: 1.7rem; + position: relative; + height: 2rem; +} +.weui-address-field { + position: absolute; + top: 0; + right: 0; + left: 0; + white-space: nowrap; + padding: 0.15rem; + min-width: 100%; +} +.weui-address-field li { + float: left; + color: #666666; +} +.weui-address-field li a { + font-size: 0.7rem; + color: #666666; +} +.weui-address-field li span { + vertical-align: middle; +} +.weui-cells{ + margin-top: 0rem; +} +.weui-cell__hd { + display: block; + float: left; +} +.weui-cell__hd .weui-cell__recentimg { + width: 2rem; + height: 2rem; + margin-right: 0.5rem; + border-radius: 2px; +} +.weui-cell__bd p { + color: #999999; + font-size: 0.7rem; +} +.weui-cell__bd p i { + font-style: normal; + padding: 0px 0.25rem; +} +.weui-file-footer .weui-file-dzzicon{ + color: #3779ff; + font-size: 1rem; +} +.weui-file-footer.weui-tabbar { + background-color: #FFFFFF; + position: fixed; + box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.1); +} +.weui-tabbar__item{ + padding: 0.25rem 0; +} +.weui-file-footer.weui-tabbar:before { + border-top: none; +} +.weui-cells__margin_footer{ + margin-bottom: 3rem; +} +.weui-dialog__hd { + padding: 1rem 1rem 0.5rem; + text-align: left; + color: #666666; + font-size: 0.8rem; +} +.weui-dialog .weui-dialog__btn.primary { + color: #3779ff; +} +.weui-tabbar__item a { + display: block; + position: relative; +} +.weui-footer-item i { + color: #3779ff; + font-size: 1rem; +} +.weui-footer-item p { + font-size: 0.6rem; + color: #666666; +} +.weui-dropup{ + box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.1); + background-color: #fff; + border-radius: 2px; + position: absolute; + bottom: 100%; + left: 10%; + float: left; + min-width: 180px; + margin-bottom: 5px; + z-index: 3; +} +.weui-dropup-right { + left: auto; + right: 10%; +} +.weui-dropup-type{ + left: 0.5rem; + right: 0.5rem; + bottom:2.5rem; + position: fixed; + max-height: 450px; + overflow: auto; +} +.weui-dropup-type .weui-type-word{ + text-align: left; + font-size: 0.7rem; +} +.weui-cells_radio .weui-check:checked+.weui-icon-checked:before{ + color:#3779ff; +} +.background-none{ + z-index: 2; + position: fixed; + top: 0; + bottom: 0; + left: 0; + right: 0; + display: none; +} +.weui-dropup>li { + margin: 0 1rem; + overflow: hidden; +} +.weui-dropup>li>a { + display: block; + padding: 0.5rem 0rem; + border-bottom: 1px solid #f2f2f2; + color: #666666; + text-align: left; + position: relative; + font-size: 0.7rem; +} +.org-sel-box-iframe{ + border: none; +} +.ti-opacity{ + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + opacity: 0; +} +/*搜索*/ +.weui-type-place{ + color: #999999; + font-size: 0.7rem; + padding: 0.5rem; +} +.weui-cell__search { + background-color: #ffc107; +} +.weui-type-resulting{ + color: #666666; + text-align: center; +} diff --git a/dzz/system/css/rightmenu.css b/dzz/system/css/rightmenu.css new file mode 100644 index 0000000..5c7df86 --- /dev/null +++ b/dzz/system/css/rightmenu.css @@ -0,0 +1,39 @@ +/*右键菜单开始*/ +.menu { + border-radius: 2px; + box-shadow: 0px 4px 13px 0px rgba(62,62,62,0.28); + background: #fff; + width: 190px; + padding: 5px 0px; + border: 1px solid #D8D8D8; + margin-left: 2px; +} +.menu-item { + height: 36px; + line-height: 36px; + border: none; + font-size: 14px; + font-family: "微软雅黑"; + color: #555555; +} +.menu-icon { + top: 10px; + left: 15px; + color: #999999; + font-size: 16px; + background-image: none; +} +.menu-text, .file-text { + left: 45px; + height: 36px; + width: 140px; + color: #666666; +} +.menu-rightarrow { + top: 15px; +} +.menu-sep { + margin: 5px 0px; + background: none; + border-top: 1px solid #EEEEEE; +} \ No newline at end of file diff --git a/dzz/system/css/rightmenu/images/icons.gif b/dzz/system/css/rightmenu/images/icons.gif new file mode 100644 index 0000000000000000000000000000000000000000..487b966a6dfb55be7a6f462f125d6a5fbf1e5cf2 GIT binary patch literal 10344 zcmWleX*kr6*T!exm#=-0jD3k3Th=soB@C4%(b$PJSqdq$B1=s|h#E_>RU?E@V~a|f zR6?pjO8Y1kE&q9b&v|jbJ#X&Mxvq2H9y{D^Y{O{~GUylR|0iY~q;;UbM+KMTv3X^Z z_MqIaDEk(9XD)Me36qa$8CmE`O3FD|+`ZT)lgaEVMomn7nO6e7{#a{Bx2mtNZ<=db zSzJsk-ik^_rKF_1efzdp9yrsz+%uNr9wR)}IZ32%OKabz*#hZBb>Qzyk^ZQy`Lw4WAmL8Y%-4+!Vmginx z&9v#Z(zZ=?~NjjqE_Uhgfv3sG?&0`-{{gc5;+7GXn#I3JVMO z%Wm)QSKfZL9)Bh)s7{L4@@yX(yTx_7)6Y&Tx%c|(zhCV;wsn}d^uL_Hea$-ipL#bjNZvsDmbOuo zD`WS4v~#;+A9}sNzkj`1u}_b5Z|RqFiK2H}*T~4o{hIb8rS74PuVmvEd`aZ(lw?^< zOyE(z+okpK@$s+U-^{-H+CB3vB4_i-8c#;k{YNKHzLiY;`t|GM?E=?a55F$I{%jbH zmi+$hP1(mW&g8Fcq4m2<9yHuZlTC8{i=K{G#I%i;-`%Pr>*_i(?(6UGKm1IPp58y@ zXHe0*oPT0}UYY28=S$s7@R*92-hKP38aoffm~Qec?tgaIJEA|oIbd@6UqL}pRd+(g zxa>w|=GWYlon77UCxss}JcAn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m}y?AcUUg2&PYR}XC z-f_!0+d1Ade_0hq9u$kwQ4w3d0&-l43?Rv^s84v5>V;B#vg)7iJi*R(Kqcitk{WY^ z(_sc<4J$)5WjpK0g^72LA zT$`X5eco(}zjCyne%hq$8^=E);aNfGv+v8?2Zg*K6bBK0*3O~5AAD$+eEnu(@S991lif+LrDQ?eC zm< zIP0>Mo4#jOT4WL`VHz0nzMJw4B%nqOH2Er%911z#k?+dE@3}l%xWGd)*s)@?4kee) z2zlee++%}*p>l$OKvVvK3jU6VkxJDiGa(G{$Wngr7z_RdlO(pg4ut9sqMqV!Fi(Uk zSGigXCvMuI9gyAYStYuSFxZxHB>CARo(XlqTo(QZc z_gW|CGFHs9l7I+7oWO484HQ({v>;F9joS!M!sMF1TKK3AHU4>uq8u6a0`&Ji#tpwP zRggEMV8aSo&b17a+r?azZY$|(TeLrUAw{oFEsTdYoBlpbS2BW`M?@}{)^Y^ABrzh= U^S^F|HQ=`3S@wp5LV@i652O71yZ`_I literal 0 HcmV?d00001 diff --git a/dzz/system/css/rightmenu/images/icons.png b/dzz/system/css/rightmenu/images/icons.png new file mode 100644 index 0000000000000000000000000000000000000000..c771704990ef97167a7cfb4584920723b6786827 GIT binary patch literal 31363 zcmV(jLH53hP)Kjs{jB19CSrkbW?9;ba!ELWdK2BZ(?O2Mrm?o zcW-iQb09-gHt4*vi~s;207*naRCt{1y?1z3Mc4QL+57bL04bzE=v|6*P>Ld0K#(FL zDmSPYic%C6L{My~6cLChAP87M#Da)`fCz$s5{mQ^NJu61Hm@AJOb z@0;sfIcM)#vuDrjz2-Y>t(g%hhfz?wdbMg3>a=LlDy&|;RyI-O(y?QS7mgoK%q}RH zzYH#xm#GYA&YTGXXwaZR!S%}AF05FwVzD3y@c_E6CyW>|V$A>4wP&pzx){9Iz6w2I z`jD@0whRFeKm73A#*G_~+PZb?WB>f~&)Sk)b^R7f3M*HxEUBj(g|6!f0JkE4qwO-Y zdssk7t(cQ$ZqjsAZK@BVmUM5dqRO{Y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iJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*! zrKP5(rl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dk zwzs#pxVX5vxw*Q!y1To(yu7@dCU z$jHda$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~ z>g((4?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF) z{QUg={r&#_{{R2~`6RjA00002bW%=J{{ZE;FiHRb03u05K~#9!VqjoI00ssI6b=Il nhXI!ivK}PU00000|NjF33?~3ZGNlzM00000NkvXXu0mjf(Ym^p literal 0 HcmV?d00001 diff --git a/dzz/system/css/rightmenu/images/menu_sep.png b/dzz/system/css/rightmenu/images/menu_sep.png new file mode 100644 index 0000000000000000000000000000000000000000..37b07e6cfcb04e3fe1f90c195f536bbf15dfad51 GIT binary patch literal 92 zcmeAS@N?(olHy`uVBq!ia0vp^j6lr9!2~459xE0ADfSXiUsv{zopr07PaN82|tP literal 0 HcmV?d00001 diff --git a/dzz/system/css/rightmenu/images/menu_split_downarrow.png b/dzz/system/css/rightmenu/images/menu_split_downarrow.png new file mode 100644 index 0000000000000000000000000000000000000000..b33a93ff2dc2039bd24e4ea3b75ecf4bb3295f84 GIT binary patch literal 185 zcmeAS@N?(olHy`uVBq!ia0vp^0zhoU!3-pmJXhxdDVB6cUq=RpYd5a=M;HP5k|nMY zCBgY=CFO}lsSJ)O`AMk?p1FzXsX?iUDV2pMQ*D5XI0Jk_TpJo1fXx5@|JyBHuocK+ zE(!7r{{Nrh`YB$Zfeh-NE{-7;w~`VPoLG4lGc~(62r^9wIqgTe~DWM4f1sXSq literal 0 HcmV?d00001 diff --git a/dzz/system/css/rightmenu/index.htm b/dzz/system/css/rightmenu/index.htm new file mode 100644 index 0000000..e69de29 diff --git a/dzz/system/css/rightmenu/style.css b/dzz/system/css/rightmenu/style.css new file mode 100644 index 0000000..c5fd491 --- /dev/null +++ b/dzz/system/css/rightmenu/style.css @@ -0,0 +1,343 @@ +.menu{ + position:absolute; + background:#F7F7F7; + margin:0; + padding:2px; + border:1px solid #ccc; + width:150px; + z-index:99999; +} +.menu-item{ + position:relative; + margin:0; + padding:0; + height:30px; + line-height:30px; + font-size:14px; + cursor:pointer; + border:1px solid #F7F7F7; +} + + +.menu-text{ + position:absolute; + left:30px; + top:0px; + width:120px; + height:30px; + overflow:hidden; +} +.menu-text .caret{ + display:none; +} +.menu-text .caret.asc{ + display:inline-block; + margin-top: -5px; + vertical-align: middle; + border-bottom: 4px solid; + border-right: 4px solid transparent; + border-left: 4px solid transparent; + border-top:4px solid transparent; +} +.menu-text .caret.desc{ + display:inline-block; +} +.menu-item-nodelete .menu-text{ + position:absolute; + left:28px; + top:0px; + color:#999; +} +.menu-icon{ + position:absolute; + width:16px; + height:16px; + top:6px; + left:5px; + background-image:url(images/icons.png); + background-repeat:no-repeat; + +} +.menu-icon img{ + vertical-align:inherit; + top: 0; + position: absolute; + left: 0; +} +ie6 .menu-icon{ + background-image:url('images/icons.gif'); +} + +.menu-rightarrow{ + position: absolute; + width:4px; + height:7px; + top:11px; + right:5px; + background:url('images/menu_rightarrow.png') no-repeat; +} +.menu-sep{ + position:relative; + display:block; + height:2px; + margin:3px 0px 3px 24px; + line-height:2px; + font-size:2px; + background:url('images/menu_sep.png') repeat-x; +} +.menu-active{ + border:1px solid #7eabcd; + background:#fafafa; + -moz-border-radius:3px; + -webkit-border-radius: 3px; +} +.menu_active{ + + background:#FFF; + -moz-border-radius:3px; + -webkit-border-radius: 3px; + border:1px solid #7eabcd; +} +.menu-shadow{ + position:absolute; + background:#ddd; + -moz-border-radius:5px; + -webkit-border-radius: 5px; + -moz-box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2); + -webkit-box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2); + filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2,MakeShadow=false,ShadowOpacity=0.2); +} +.menu .menu .icon-no { + background-position:-0px -0px; +} +.menu .icon-appshop { + background-position:-16px -0px; +} +.menu .icon-back { + background-position:-32px -0px; +} +.menu .icon-config { + background-position:-48px -0px; +} +.menu .icon-copy { + background-position:-64px -0px; +} +.menu .icon-create { + background-position:-80px -0px; +} +.menu .icon-cut { + background-position:-96px -0px; +} +.menu .icon-delete { + background-position:-112px -0px; +} +.menu .icon-desktop { + background-position:-128px -0px; +} +.menu .icon-todesktop { + background-position:-416px -16px; +} +.menu .icon-todock { + background-position:-432px -16px; +} +.menu .icon-property { + background-position:-448px -16px; +} +.menu .icon-collect { + background-position:-368px 0; +} +.menu .icon-newwindow { + background-position:-480px -16px; +} +.menu .icon-innerwindow { + background-position:-464px -16px; +} +.menu .icon-direction { + background-position:-144px -0px; +} +.menu .icon-door { + background-position:-160px -0px; +} +.menu .icon-download { + background-position:-176px -0px; +} +.menu .icon-dzzdoc { + background-position:-192px -0px; +} +.menu .icon-excel { + background-position:-192px -0px; +} +.menu .icon-doc { + background-position:-192px -0px; +} +.menu .icon-powerpoint { + background-position:-192px -0px; +} +.menu .icon-edit { + background-position:-208px -0px; +} +.menu .icon-edit_add { + background-position:-224px -0px; +} +.menu .icon-edit_remove { + background-position:-240px -0px; +} +.menu .icon-editnote { + background-position:-256px -0px; +} +.menu .icon-empty { + background-position:-272px -0px; +} +.menu .icon-filemanage { + background-position:-288px -0px; +} +.menu .icon-filesave { + background-position:-304px -0px; +} +.menu .icon-groupedit { + background-position:-320px -0px; +} +.menu .icon-guanbi { + background-position:-336px -0px; +} +.menu .icon-help { + background-position:-352px -0px; +} +.menu .icon-home { + background-position:-368px -0px; +} +.menu .icon-huanyuan { + background-position:-384px -0px; +} +.menu .icon-iconview { + background-position:-400px -0px; +} +.menu .icon-topic { + background-position:-400px -16px; +} +.menu .icon-indesktop { + background-position:-416px -0px; +} +.menu .icon-movegroup { + background-position:-432px -0px; +} +.menu .icon-newdoc { + background-position:-448px -0px; +} +.menu .icon-newfolder { + background-position:-464px -0px; +} +.menu .icon-newlink { + background-position:-480px -0px; +} +.menu .icon-autolist { + background-position:-496px -0px; +} +.menu .icon-notselect { + background-position:-512px -0px; +} +.menu .icon-ok { + background-position:-528px -0px; +} +.menu .icon-open { + background-position:-496px -16px; +} +.menu .icon-openwith { + background-position:-512px -16px; +} +.menu .icon-paste { + background-position:-560px -0px; +} +.menu .icon-pencil { + background-position:-576px -0px; +} +.menu .icon-realdel { + background-position:-0px -16px; +} +.menu .icon-pin { + background-position:-16px -16px; +} +.menu .icon-rename { + background-position:-32px -16px; +} +.menu .icon-position { + background-position:-48px -16px; +} +.menu .icon-print { + background-position:-64px -16px; +} +.menu .icon-recycle { + background-position:-80px -16px; +} +.menu .icon-redo { + background-position:-96px -16px; +} +.menu .icon-reload { + background-position:-112px -16px; +} +.menu .icon-restore { + background-position:-128px -16px; +} +.menu .icon-search { + background-position:-144px -16px; +} +.menu .icon-select { + background-position:-160px -16px; +} +.menu .icon-sendmsg { + background-position:-176px -16px; +} +.menu .icon-setwidget { + background-position:-192px -16px; +} +.menu .icon-share { + background-position:-208px -16px; +} +.menu .icon-userdetail { + background-position:-224px -16px; +} +.menu .icon-sort { + background-position:-240px -16px; +} +.menu .icon-txt { + background-position:-256px -16px; +} +.menu .icon-upload { + background-position:-272px -16px; +} +.menu .icon-uploadfolder { + background-position:-464px 0; +} +.menu .icon-viewdesktop { + background-position:-288px -16px; +} +.menu .icon-wallpaper { + background-position:-304px -16px; +} +.menu .icon-widget { + background-position:-320px -16px; +} +.menu .icon-world { + background-position:-336px -16px; +} +.menu .icon-zhuti { + background-position:-352px -16px; +} +.menu .icon-zuida { + background-position:-368px -16px; +} +.menu .icon-zuixiao { + background-position:-384px -16px; +} +.menu .icon-chmod { + background-position:-528px -16px; +} +.menu .icon-docx { + background:url(../../../images/icons/docx.png) center no-repeat; +} +.menu .icon-xlsx { + background:url(../../../images/icons/xlsx.png) center no-repeat; +} +.menu .icon-pptx { + background:url(../../../images/icons/pptx.png) center no-repeat; +} \ No newline at end of file diff --git a/dzz/system/css/select-file.css b/dzz/system/css/select-file.css new file mode 100644 index 0000000..386e656 --- /dev/null +++ b/dzz/system/css/select-file.css @@ -0,0 +1,592 @@ + body { + height: 100%; + width: 100%; + margin: 0; + overflow: hidden; + /*padding-bottom: 34px;*/ + } +a,a:hover,a:focus{ + text-decoration: none; +} +li{ + list-style: none; +} +.modal .modal-header{ +} +.orgtree-search { + position: fixed; + width: 100%; + left: 0; + bottom: 0; + background-color: #FFF; + +} + +.orgtree-search .form-control { + padding: 5px 50px 5px 5px; + border: 0; + border-top: 1px solid #CCC; + box-shadow: none; + background-color: #FFFFFF; +} + +.orgtree-search .form-control:focus { + box-shadow: none; +} + +.orgtree-search .search { + position: absolute; + right: 25px; + top: 1px; + width: 24px; + height: 32px; + padding: 8px 5px; + font-size: 18px; +} + +.orgtree-search .delete { + position: absolute; + right: 1px; + top: 1px; + width: 24px; + height: 32px; + padding: 8px 5px; + font-size: 18px; +} + +.orgtree-search a:hover { + background: #F7F7F7; +} + +.jstree-default-responsive .jstree-anchor > .jstree-themeicon { + background-size: auto; +} + +.iconFirstWord { + width: 24px; + height: 24px; + border-radius: 50%; + display: inline-block; + line-height: 24px; + text-align: center; + margin-right: 2px; + color: #FFFFFF; +} + +.jstree-default .jstree-node { + line-height: 2.4rem; +} + +.jstree-default .jstree-node, .jstree-default .jstree-icon { + background-image: url(/dzz/system/images/32px.png); +} + +.jstree-default .jstree-last { + background: 0 0; +} + +.jstree-default .jstree-themeicon-custom { + background-color: transparent; + background-image: none; +} +#position{ + /*position: absolute; + left: 0; + + overflow: auto; + padding:5px 0;*/ + /*top: 0px;*/ + /*bottom: 64px;*/ +} +.modal-header{ + border: none; +} +.modal-footer{ + /*position: fixed;*/ + left: 0; + right: 0; + bottom: 0; + border: none; +} + .user-select-search .input-black { + margin-bottom: 0; + } +.user-select-body { + padding-top: 20px!important; +} +.user-select-body .user-select-content { + margin-top: 0; + border-bottom: 1px solid #e1e1e1; +} +.user-select-body .user-select-content .user-select-content-left { + float: left; + height: 300px; + overflow: hidden; + width: 50%; + border-right: 1px solid #e1e1e1; +} +.user-select-body .user-select-content .user-select-content-right { + height: 300px; + overflow: auto; + float: left; + width: 50% +} +.user-select-content-right .sele-right-classa { + list-style: none; + padding: 0; + margin: 0; +} +.user-select-content-right .sele-right-classa li { + padding-left: 15px; + line-height: 40px; + margin-left: 5px; + position: relative; + height: 40px; + padding-right: 30px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} +.user-select-content-right .sele-right-classa li img { + max-width: 24px; + max-height: 24px; +} +.user-select-content-right .sele-right-classa li .ti-close { + position: absolute; + right: 0; + top: 0; + width: 30px; + height: 30px; + margin: 5px 0; + line-height: 30px; + text-align: center; + display: none; + cursor: pointer; + padding: 0; + background-color: #f2f2f2; +} +.user-select-content-right .sele-right-classa li:hover { + background-color: #f2f2f2; + border-radius: 3px; +} +.user-select-content-right .sele-right-classa li:hover .ti-close { + display: block; +} +#seluser_dropdown_menu { + height: 600px; +} +.iconFirstWord { + width: 24px; + height: 24px; + border-radius: 50%; + display: inline-block; + line-height: 24px; + text-align: center; + margin-right: 2px; + color: #FFFFFF; +} +@media (min-width:768px ) { + .modal-dialog{ + width: 800px; + + } +} +@media (max-width:768px ) { + .modal-dialog{ + width: 550px; + min-width: 550px; + } +} +/*内容上部分开始*/ +/*.select-fileall{ + overflow: hidden; +} +.select-filetop{ + overflow: hidden; +}*/ +.select-filetop{ + position: relative; +} +.select-address{ + -webkit-box-sizing: border-box; + -webkit-flex: 1 0; + flex: 1 0 auto; + display: -webkit-flex; + display: -moz-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} +.address-all{ + position: relative; + width: 100%; + height:34px; + line-height: 34px; + margin-bottom: 17px; + margin-right: 100px; + padding-right: 10px; +} +.address-goback{ + width: 70px; + position: absolute; + top: 0; + left: 0; +} +.address-goback a{ + color: #666666; +} +.address-field{ + line-height: 34px; + white-space: nowrap; + position: absolute; + right: 0; + top: 0; + min-width: 100%; +} +.address-field li{ + display: inline-block; +} +.address-field li a{ + color: #666666; +} +.dzz-address-vline{ + vertical-align: middle; +} +.address-container{ + margin-left: 70px; + position: relative; + height: 34px; + overflow: hidden; +} +.address-arrow{ + position: absolute; + top: 0; + width: 20px; +} +.address-left-arrow{ + left: 0; + text-align: left; + color: #999; + cursor: pointer; + line-height: 34px; + background: #FBFBFB; + z-index: 10; + display: none; +} +.address-right-arrow{ + text-align: right; + color: #999; + cursor: pointer; + line-height: 34px; + background: #FBFBFB; + z-index: 10; + right: 0; + display: none; +} +.address-container.arrow-left .address-left-arrow{ + display: block; +} +.address-container.arrow-right .address-right-arrow{ + display: block; +} +.borderInput{ + position: absolute; + left: 0; + top: 0; + z-index: 2; + height: 34px; + padding: 0; + display: none; +} +.select-filetopbottom{ + position: absolute; + top: 0; + right: 0; + padding-left: 10px; +} +.select-display{ + display: inline-block; + padding-top: 9px; +} +.select-display.form-control{ + width: auto; +} +.select-change i{ + font-size:1.28rem; + color: #BBBBBB; +} +#select-button{ + min-width: 7.14rem; +} +.dzz-select-button{ + float: right; + font-size: 18px; +} +.positionMenu .jstree-default .jstree-wholerow-clicked { + background: rgba(219, 230, 250, 1); +} +/*新建上传按钮开始*/ +.dropdown-menu { + border-radius: 2px; + box-shadow: 0px 4px 13px 0px rgba(62, 62, 62, 0.28); + border: 1px solid #d8d8d8; +} +.dropdown-menu>li>a { + padding: 8px 8px 8px 35px; + position: relative; +} +.filee-icon.filee-folder, .filee-icon.filee-upload, .filee-icon.filee-file, .filee-icon.filee-language, .filee-icon.filee-description { + color: #999; +} +.menu-text, .file-text { + left: 45px; + height: 36px; + width: 140px; + color: #666666; +} +.dropdown-menu .file-text { + padding-left: 1.3rem; +} +#wangpan-upload-file, #wangpan-upload-folder { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + cursor: pointer; + opacity: 0; +} +.select-button-dropdown{ + background: none; + border: none; + padding: 0; +} +.dropdown.newMenu{ + padding-top: 7px; + padding-right: 10px; + display: inline-block; +} +.dropdown-menu-primary.dropdown-menu{ + right: 0; + left: auto; +} +.select-button-dropdown .select-button-folder{ + font-size: 20px; + color: #bbb; +} +.select-search-block{ + font-size: 20px; + color: #bbb; + display: inline-block; + cursor: pointer; + /*padding-right: 10px; + padding-top: 6px;*/ + position: absolute; + top: 6px; + right: 10px; + z-index: 2; +} +.input-group{ + float: left; +} +#searchval{ + /*position: absolute; + right: 10px;*/ +} +.dzz-none{ + opacity: 0; + width: 10px; + height: 20px; + display: inline-block; + z-index: 0; + z-index: 0; +} +/*新建上传按钮结束*/ +/*新建文件夹开始*/ + +.modal .modal-footer{ + border-top:none; +} +.input-black .input-label{ + left: auto; +} +/*新建文件夹结束*/ +/*内容上部分结束*/ +/*内容中间部分开始*/ +.select-filecenter{ + position: relative; + border-top: 1px solid #e5e5e5; + margin-top: 10px; + border-bottom: 1px solid #E5E5E5; +} +.bs-left-container{ + background: #FFFFFF; +} +.bs-main-container{ + padding: 0 10px 0 0; +} + +/*列表开始*/ +.filemanage .detail_item_td_div, .DragCopy .detail_item_td_div{ + overflow: hidden; + height: 30px; + float: left; +} + +.filemanage .detail_item_td_name, .filemanage td, .filemanage th { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.filemanage .IcoText_folder,.filemanage .detail_item_td{ + color:#71717a; +} +.filemanage .detail_text { + text-shadow: none; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + max-width: -webkit-calc(100% - 10px); + line-height: 30px; + cursor: default; +} +.filemanage .detail_item_td_name { + width: calc(100% - 10px); + width: -webkit-calc(100% - 10px); + width: -moz-calc(100% - 10px); +} +.filemanage .detail_tr.hover{ + background-color: #F2F2F2; +} +.filemanage .detail_tr.Icoselected { + background: #3779ff; + transition: all 0.2s ease-in 0s; +} +.filemanage .detail_tr.Icoselected td { + border-bottom: 1px solid transparent; + color: #FFFFFF; +} +.filemanage .Icoselected .IcoText_folder, .filemanage .Icoselected .detail_item_td{ + color: #FFFFFF; +} +.filemanage .detail_header_asc_1 span, .filemanage .detail_header_asc_0 span { + display: none; +} +.filemanage .detail_header_asc_0 .dzz-expand-more { + display: inline-block; + color: #3779ff; +} +.filemanage .detail_header_asc_1 .dzz-expand-less { + display: inline-block; + color: #3779ff; +} +.icoimgContainer.icoimgContainer_image{ + width: 98px; + height: 88px; + overflow: hidden; +} +#middleconMenu{ + position: relative; +} +/*列表结束*/ +/*缩略图开始*/ +.Icoblock.middleicon{ + margin: 0.5rem 0.8rem 0.3rem 0.5rem; + width: 100px; + height: 125px; + position: relative; + float: left; + padding: 0; + z-index: 10; + overflow: visible; +} +.icoimgContainer_document .Icoblock_icon, .icoimgContainer_dzzdoc .Icoblock_icon, .icoimgContainer_attach .Icoblock_icon, .icoimgContainer_folder .Icoblock_icon { + max-height: 54px; + max-width: 54px; +} +.Icoblock.middleicon .icoimgCover_up { + position: absolute; + left: 0px; + top: 0px; + width: 100%; + height: 100%; + z-index: 1; +} +.Icoblock.middleicon .icoimgtips { + width: auto; + height: auto; + max-height: 90px; + overflow: hidden; + position: absolute; + left: 0px; + top: 0px; + z-index: 2; +} +.icoimgContainer .icoimgtips { + cursor: pointer; + overflow: hidden; +} +.Icoblock.middleicon .icoimgCover_down { + position: absolute; + left: 0px; + top: 0px; + width: 100%; + height: 100%; + z-index: -1; +} +.Icoblock.middleicon .select-tdtop{ + border: 1px solid #EEEEEE; +} +.hover.Icoblock.middleicon .select-tdtop{ + background-color:#F2F2F2; +} +.Icoselected.Icoblock.middleicon .select-tdtop{ + border: 1px solid #3779ff; + outline: 1px solid #3779ff; +} +.Icoblock.middleicon .td_ico_item_name { + overflow: hidden; + text-overflow: ellipsis; + word-break: break-all; + white-space: nowrap; +} +.Icoblock.middleicon .IcoText_div { + position: relative; + overflow: hidden; + word-break: break-all; +} +.IcoText_div a { + font-family: "微软雅黑"; + font-size: 12px; + color:#4e5563; + text-decoration: none; + overflow: hidden; + text-overflow: ellipsis; + word-break: break-all; + white-space: nowrap; + display: block; + width: 100px; +} +.Icoselected.Icoblock.middleicon .IcoText_div a{ + color: #3779ff; +} +/*缩略图结束*/ +/*内容中间部分结束*/ +/*内容下部分开始*/ +.input-black{ + margin: 0; +} +.select-filebottom{ + padding-top: 10px; +} +.typestyle button{ + text-align: left; +} +.typedropup{ + width: 100%; +} +.select-filebottom .input-black .input-label{ + text-align: right; + min-width: 63px; +} +/*内容下部分结束*/ \ No newline at end of file diff --git a/dzz/system/filelist.php b/dzz/system/filelist.php new file mode 100644 index 0000000..6bfcf5d --- /dev/null +++ b/dzz/system/filelist.php @@ -0,0 +1,290 @@ +check_home_by_uid($uid)){ + C::t('folder')->fetch_home_by_uid($uid); +} +$id = isset($_GET['id']) ? $_GET['id'] : ''; +$do = $_GET['do'] ? $_GET['do'] : ''; +$ctrlid = isset($_GET['ctrlid']) ? trim($_GET['ctrlid']):'selposition'; +$callback=isset($_GET['callback']) ? trim($_GET['callback']):'callback_selectposition'; +$inwindow = isset($_GET['inwindow']) ? intval($_GET['inwindow']):0; +$allowcreate = isset($_GET['allowcreate']) ? $_GET['allowcreate']:0; +$selhome = isset($_GET['selhome']) ? $_GET['selhome']:0;//展示网盘0不展示 +$selorg = isset($_GET['selorg']) ? $_GET['selorg']:0;//展示机构0不展示 +$selgroup = isset($_GET['selgroup']) ? $_GET['$selgroup']:0;//展示群组0不展示 +$range = isset($_GET['range']) ? $_GET['range']:0;//是否限制展示0不限定 +$ismobile=helper_browser::ismobile(); +$data = array(); +$powerarr = perm_binPerm::getPowerArr(); +if ($do == 'get_children') { + if ($id == 'group') { + //$orgids = C::t('organization_user')->fetch_org_by_uid($uid,1); + $groupinfo = C::t('organization')->fetch_group_by_uid($uid, true); + foreach ($groupinfo as $v) { + $children = (C::t('resources')->fetch_folder_num_by_pfid($v['fid']) > 0) ? true : false; + $arr = array( + 'id' => 'g_' . $v['orgid'], + 'type' => 'group', + 'children' => $children, + 'li_attr' => array('fid'=>$v['fid'],'gid'=>$v['orgid']) + ); + if (intval($v['aid']) == 0) { + $arr['text'] = '' . strtoupper(new_strsubstr($v['orgname'], 1, '')) . '' . $v['orgname']; + $arr['icon'] = false; + } else { + $arr['text'] = $v['orgname']; + $arr['icon'] = 'index.php?mod=io&op=thumbnail&width=24&height=24&path=' . dzzencode('attach::' . $v['aid']); + } + + $data[] = $arr; + } + exit(json_encode($data)); + } elseif (preg_match('/g_\d+/', $id)) { + $gid = intval(str_replace('g_', '', $id)); + $groupinfo = C::t('organization')->fetch($gid); + if ($groupinfo && $groupinfo['available'] == 1 && $groupinfo['diron'] == 1) { + foreach (C::t('folder')->fetch_folder_by_pfid($groupinfo['fid']) as $val) { + $children = (C::t('resources')->fetch_folder_num_by_pfid($val['fid']) > 0) ? true : false; + $data[] = array( + 'id' => 'f_' . $val['fid'], + 'text' => $val['fname'], + 'type' => 'folder', + 'children' => $children, + 'li_attr' =>array('fid'=>$val['fid'],'gid'=>$val['orgid']) + ); + } + } + exit(json_encode($data)); + } elseif (preg_match('/gid_\d+/', $id)) { + $gid = intval(str_replace('gid_', '', $id)); + $orginfo = C::t('organization')->fetch($gid); + if ($orginfo && $orginfo['available'] == 1 && $orginfo['diron'] == 1) { + foreach (C::t('folder')->fetch_folder_by_pfid($orginfo['fid']) as $val) { + $children = (C::t('resources')->fetch_folder_num_by_pfid($val['fid']) > 0) ? true : false; + + $arr = array( + 'id' => 'f_' . $val['fid'], + 'text' => $val['fname'], + 'type' => 'folder', + 'children' => $children, + 'li_attr' =>array('fid'=>$val['fid'],'gid'=>$val['orgid']) + ); + if ($val['flag'] == 'app') { + $appid = C::t("folder_attr")->fetch_by_skey_fid($val['fid'], 'appid'); + if ($imgs = C::t('app_market')->fetch_appico_by_appid($appid)) { + $arr['icon'] = 'data/attachment/' . $imgs; + } + + } + $data[] = $arr; + } + } + + $groupinfo = C::t('organization')->fetch_org_by_uidorgid($uid, $gid); + + if ($groupinfo) { + foreach ($groupinfo as $val) { + $children = (DB::result_first("select count(*) from %t where forgid = %d", array('organization', $val['orgid'])) > 0) ? true : false; + $arr = array( + 'id' => 'gid_' . $val['orgid'], + 'type' => 'department', + 'children' => $children, + 'li_attr' => array('fid'=>$val['fid'],'gid'=>$val['orgid']) + ); + if (intval($val['aid']) == 0) { + $arr['text'] = '' . strtoupper(new_strsubstr($val['orgname'], 1, '')) . '' . $val['orgname']; + $arr['icon'] = false; + } else { + $arr['text'] = $val['orgname']; + $arr['icon'] = 'index.php?mod=io&op=thumbnail&width=24&height=24&path=' . dzzencode('attach::' . $val['aid']); + } + $data[] = $arr; + } + } + exit(json_encode($data)); + } elseif (preg_match('/f_\d+/', $id)) { + $fid = intval(str_replace('f_', '', $id)); + $params = array('folder',$fid,$powerarr['upload']); + //foreach (DB::fetch_all("select fid,fname from %t where pfid = %d and perm_inherit & %d",$params) as $val){ + foreach (C::t('folder')->fetch_folder_by_pfid($fid) as $val) { + $children = (C::t('resources')->fetch_folder_num_by_pfid($val['fid']) > 0) ? true : false; + $data[] = array( + 'id' => 'f_' . $val['fid'], + 'text' => $val['fname'], + 'type' => 'folder', + 'children' => $children, + 'li_attr' => array('fid'=>$val['fid']) + ); + } + exit(json_encode($data)); + } elseif (preg_match('/u_\d+/', $id)) { + $fid = intval(str_replace('u_', '', $id)); + foreach (C::t('resources')->fetch_folder_by_pfid($fid) as $v) { + $children = (C::t('resources')->fetch_folder_num_by_pfid($v['oid']) > 0) ? true : false; + $data[] = array( + 'id' => 'u_' . $v['oid'], + 'text' => $v['name'], + 'type' => 'folder', + 'children' => $children, + 'li_attr' => array('fid'=>$v['oid']) + ); + } + } else { + //获取配置设置值 + $explorer_setting = get_resources_some_setting(); + if ($explorer_setting['useronperm'] && (!$range || ($range && $selhome))) { + $fid = C::t('folder')->fetch_fid_by_flag('home'); + $children = (C::t('resources')->fetch_folder_num_by_pfid($fid) > 0) ? true : false; + $data[] = array( + 'id' => 'u_' . $fid, + 'text' => lang('explorer_user_root_dirname'), + 'type' => 'home', + 'children' => $children, + 'li_attr' => array('fid'=>$fid) + ); + } + if ($explorer_setting['orgonperm'] && (!$range || ($range && $selorg))) { + $orgs = C::t('organization')->fetch_all_orggroup($uid); + foreach ($orgs['org'] as $v) { + if (DB::result_first("select count(*) from %t where forgid = %d", array('organization', $v['orgid'])) > 0 || C::t('resources')->fetch_folder_num_by_pfid($v['fid']) > 0) { + $children = true; + } else { + $children = false; + } + if (!empty($v)) { + $arr = array( + 'id' => 'gid_' . $v['orgid'], + 'type' => ($v['pfid'] > 0 ? 'department' : 'organization'), + 'children' => $children, + 'li_attr' => array('fid'=>$v['fid'],'gid'=>$v['gid']) + ); + if (intval($v['aid']) == 0) { + $arr['text'] = '' . strtoupper(new_strsubstr($v['orgname'], 1, '')) . '' . $v['orgname']; + $arr['icon'] = false; + } else { + $arr['text'] = $v['orgname']; + $arr['icon'] = 'index.php?mod=io&op=thumbnail&width=24&height=24&path=' . dzzencode('attach::' . $v['aid']); + } + $data[] = $arr; + } + } + } + if ($explorer_setting['grouponperm'] && (!$range || ($range && $selgroup))) { + $groups = C::t('organization')->fetch_group_by_uid($uid); + $children = (count($groups) > 0) ? true : false; + $data[] = array( + 'id' => 'group', + 'text' => '群组', + 'type' => 'group', + 'children' => $children, + 'li_attr' => array('hashs' => 'mygroup') + ); + } + } + exit(json_encode($data)); +} elseif ($do == 'filemanage') { + +} elseif ($do == 'getParentsArr') {//获取 + $fid = intval($_GET['fid']); + $gid = intval($_GET['gid']); + $ret = array(); + if ($fid) { + $subfix = ''; + $org = array(); + foreach (C::t('folder')->fetch_all_parent_by_fid($fid) as $value) { + if (empty($subfix)) { + if ($value['gid']) {//是部门或者群组 + $org = C::t('organization')->fetch($value['gid']); + if ($org['type'] == 0) { + $subfix = 'gid_'; + } elseif ($org['type'] == 1) { + $subfix = 'g_'; + } + } else { + $subfix = 'u_'; + } + } + if ($value['gid'] < 1) { + $arr[] = 'u_' . $value['fid']; + } elseif ($value['flag'] == 'organization') { + $arr[] = $subfix . $value['gid']; + } else { + $arr[] = 'f_' . $value['fid']; + } + } + if ($subfix == 'g_') {//群组的话,需要增加顶级"群组" + array_push($arr, 'group'); + } + $arr = array_reverse($arr); + } elseif ($gid) { + $subfix = ''; + foreach (C::t('organization')->fetch_parent_by_orgid($gid) as $orgid) { + if (empty($subfix)) { + $org = C::t('organization')->fetch($orgid); + if ($org['type'] == 0) { + $subfix = 'gid_'; + } elseif ($org['type'] == 1) { + $subfix = 'g_'; + } + } + $arr[] = $subfix . $orgid; + + } + if ($subfix == 'g_') array_unshift($arr, 'group'); + } + $arr = array_unique($arr); + exit(json_encode($arr)); +}elseif($do == 'creatnewfolder'){ + $fid = isset($_GET['fid']) ? intval($_GET['fid']):''; + $fname = isset($_GET['foldername']) ? trim($_GET['foldername']) : lang('newfolder'); + if ($arr = IO::CreateFolder($fid, $fname, $perm)) { + if ($arr['error']) { + } else { + $arr = array_merge($arr['icoarr'], $arr['folderarr']); + $arr['msg'] = 'success'; + + } + } else { + $arr = array(); + $arr['error'] = lang('failure_newfolder'); + } + exit(json_encode($arr)); +}elseif($do == 'rename'){ + $rid = isset($_GET['rid']) ? trim($_GET['rid']):''; + $text=str_replace('...','',getstr(io_dzz::name_filter($_GET['fname']),80)); + $ret=IO::rename($rid,$text); + exit(json_encode($ret)); +}elseif ($do == 'getfoldername'){ + $fid = isset($_GET['fid']) ? trim($_GET['fid']):''; + if(perm_check::checkperm_Container($fid,'folder')){ + $fname = isset($_GET['foldername']) ? trim($_GET['foldername']) : lang('newfolder'); + $newname = IO::getFolderName($fname,$fid); + exit(json_encode(array('success'=>true,'fname'=>$newname))); + }else{ + exit(json_encode(array('error'=>lang('no_privilege')))); + } +}elseif($do == 'checkupload'){ + $fid = isset($_GET['fid']) ? trim($_GET['fid']):''; + if(perm_check::checkperm_Container($fid,'upload')){ + exit(json_encode(array('perm'=>true))); + }else{ + exit(json_encode(array('perm'=>false))); + } +}elseif($do == 'geffolderinfo'){ + $fid = isset($_GET['fid']) ? intval($_GET['fid']):''; + if(!perm_check::checkperm_Container($fid,'read')){ + exit(json_encode(array('error'=>lang('no_privilege')))); + } + $data = C::t('folder')->fetch_by_fid($fid); + exit(json_encode($data)); +}elseif($do == 'savefile'){ + +} + +include template('filelist'); +exit(); \ No newline at end of file diff --git a/dzz/system/fileselection.php b/dzz/system/fileselection.php new file mode 100644 index 0000000..5d770fa --- /dev/null +++ b/dzz/system/fileselection.php @@ -0,0 +1,57 @@ +fetch_info_by_rid($rid); + $filename = $savefile['name']; + }else{ + $savefile['name'] = $filename; + } +} +$gets = array( + 'allowcreate' => $allowcreate, + 'type'=>$type, + 'rid'=>$rid, + 'filename'=>$filename, + 'range'=>$range, + 'defaultselect'=>$defaultselect, + 'exttype'=>$exttype, +); +$urldefined= '&'. url_implode($gets); +$allowvisit = array('file','listtree','explorerfile','json','ajax','dzzcp','save'); +//如果是移动端 +$ismobile = helper_browser::ismobile(); +if($ismobile){ + require MOD_PATH.'/mobilefileselection.php'; +}else{ + if($do){ + if(!in_array($do,$allowvisit)){ + showmessage(lang('access_denied'),dreferer()); + }else{ + require MOD_PATH.'/fileselection/'.$do.'.php'; + } + }else{ + include template('fileselection/index'); + exit(); + } +} + diff --git a/dzz/system/fileselection/ajax.php b/dzz/system/fileselection/ajax.php new file mode 100644 index 0000000..e02a734 --- /dev/null +++ b/dzz/system/fileselection/ajax.php @@ -0,0 +1,267 @@ + '/\.(gif|jpe?g|png)$/i', + 'upload_dir' => $_G['setting']['attachdir'] . 'cache/', + 'upload_url' => $_G['setting']['attachurl'] . 'cache/', + 'thumbnail' => array('max-width' => 40, 'max-height' => 40)); + $upload_handler = new uploadhandler($options); + exit(); +} elseif ($operation == 'uploads') {//上传新文件(指新建) + $container = trim($_GET['container']); + $space = dzzgetspace($uid); + $space['self'] = intval($space['self']); + $bz = trim($_GET['bz']); + require_once dzz_libfile('class/UploadHandler'); + //上传类型 + $allowedExtensions = $space['attachextensions'] ? explode(',', $space['attachextensions']) : array(); + + $sizeLimit = ($space['maxattachsize']); + + $options = array('accept_file_types' => $allowedExtensions ? ("/(\.|\/)(" . implode('|', $allowedExtensions) . ")$/i") : "/.+$/i", + 'max_file_size' => $sizeLimit ? $sizeLimit : null, + 'upload_dir' => $_G['setting']['attachdir'] . 'cache/', + 'upload_url' => $_G['setting']['attachurl'] . 'cache/', + ); + $upload_handler = new UploadHandler($options); + exit(); +} elseif ($operation == 'uploadfiles') {//上传文件(单纯的上传) + $space = dzzgetspace($uid); + $space['self'] = intval($space['self']); + require_once libfile('class/uploadhandler', '', 'core'); + //上传类型 + $allowedExtensions = $space['attachextensions'] ? explode(',', $space['attachextensions']) : array(); + $sizeLimit = ($space['maxattachsize']); + + $options = array('accept_file_types' => $allowedExtensions ? ("/(\.|\/)(" . implode('|', $allowedExtensions) . ")$/i") : "/.+$/i", + 'max_file_size' => $sizeLimit ? $sizeLimit : null, + 'upload_dir' => $_G['setting']['attachdir'] . 'cache/', + 'upload_url' => $_G['setting']['attachurl'] . 'cache/', + ); + $upload_handler = new UploadHandler($options); + exit(); +}elseif ($operation == 'newFolder') {//新建文件夹 + $fid = isset($_GET['fid']) ? intval($_GET['fid']) : ''; + $folderinfo = C::t('folder')->fetch($fid); + /*if ($folderinfo['gid'] && C::t('organization_admin')->chk_memberperm($folderinfo['gid'])) { + $inheritperm = DB::result_first("select perm from %t where fid = %d",array('folder',$fid)); + }*/ + $perm = 0; + $name = !empty($_GET['foldername']) ? trim($_GET['foldername']) : lang('newfolder'); + $fid = intval($_GET['fid']); + $fname = io_dzz::name_filter(getstr($name, 80)); + if ($arr = IO::CreateFolder($fid, $fname, $perm)) { + if ($arr['error']) { + } else { + $arr = array_merge($arr['icoarr'], $arr['folderarr']); + $arr['msg'] = 'success'; + + } + } else { + $arr = array(); + $arr['error'] = lang('failure_newfolder'); + } + exit(json_encode($arr)); + // } + + +}elseif ($operation == 'linkadd') { + if (isset($_GET['createlink']) && $_GET['createlink']) { + $link = isset($_GET['link']) ? trim($_GET['link']) : ''; + $fid = isset($_GET['fid']) ? intval($_GET['fid']) : ''; + //检查网址合法性 + if (!preg_match("/^(http|ftp|https|mms)\:\/\/.{5,300}$/i", ($link))) { + $link = 'http://' . preg_replace("/^(http|ftp|https|mms)\:\/\//i", '', $link); + } + if (!preg_match("/^(http|ftp|https|mms)\:\/\/.{4,300}$/i", ($link))) { + $arr['error'] = lang('invalid_format_url'); + } else { + + $ext = strtolower(substr(strrchr($link, '.'), 1, 10)); + $isimage = in_array(strtoupper($ext), $imageexts) ? 1 : 0; + $ismusic = 0; + + //是图片时处理 + if ($isimage) { + if (!perm_check::checkperm_Container($fid, 'upload')) { + $arr['error'] = lang('target_not_accept_image'); + } + if ($data = io_dzz::linktoimage($link, $fid)) { + if ($data['error']) $arr['error'] = $data['error']; + else { + $arr = $data; + $arr['msg'] = 'success'; + } + } + + } else { + //试图作为视频处理 + if ($data = io_dzz::linktovideo($link, $fid)) { + if (!perm_check::checkperm_Container($fid, 'upload')) { + $arr['error'] = lang('target_not_accept_video'); + } else { + if ($data['error']) $arr['error'] = $data['error']; + else { + $arr = $data; + $arr['msg'] = 'success'; + } + } + } + //作为网址处理 + if (!perm_check::checkperm_Container($fid, 'upload')) { + $arr['error'] = lang('target_not_accept_link'); + } else { + if ($data = io_dzz::linktourl($link, $fid)) { + if ($data['error']) { + $arr['error'] = $data['error']; + } else { + $arr = $data; + $arr['msg'] = 'success'; + } + } else { + $arr['error'] = lang('network_error'); + } + } + + } + + } + } + exit(json_encode($arr)); +}elseif ($operation == 'dzzdocument' || $operation == 'txt') {//新建文档 + if ($operation == 'dzzdocument') { + $ext = 'dzzdoc'; + } else { + $ext = 'txt'; + } + $name = lang('new_' . $ext); + $filename = $name . '.' . $ext; + $fid = isset($_GET['fid']) ? intval($_GET['fid']) : ''; + if ($arr = IO::upload_by_content(' ', $fid, $filename)) { + if ($arr['error']) { + + } else { + $arr['msg'] = 'success'; + } + } else { + $arr = array(); + $arr['error'] = lang('failure_newfolder'); + } +} elseif ($operation == 'newIco') {//新建文件 + $type = trim($_GET['type']); + $fid = trim($_GET['fid']); + $filename = isset($_GET['filename']) ? trim($_GET['filename']):''; + $bz = getBzByPath($fid); + switch ($type) { + case 'newTxt': + $filename = lang('new_txt') . '.txt'; + if (!perm_check::checkperm_Container($path, 'upload', $bz)) { + exit(json_encode(array('error' => lang('privilege')))); + } + $content = ' '; + break; + case 'newDzzDoc': + $filename = lang('new_dzzdoc') . '.dzzdoc'; + if (!perm_check::checkperm_Container($path, 'upload', $bz)) { + exit(json_encode(array('error' => lang('privilege')))); + } + $content = ' '; + break; + case 'newDoc': + $filename = lang('new_word') . '.docx'; + if (!perm_check::checkperm_Container($path, 'upload', $bz)) { + exit(json_encode(array('error' => lang('privilege')))); + } + $content = file_get_contents(DZZ_ROOT . './dzz/images/newfile/word.docx'); + break; + case 'newExcel': + $filename = lang('new_excel') . '.xlsx'; + if (!perm_check::checkperm_Container($path, 'upload', $bz)) { + exit(json_encode(array('error' => lang('privilege')))); + } + $content = file_get_contents(DZZ_ROOT . './dzz/images/newfile/excel.xlsx'); + break; + case 'newPowerPoint': + $filename = lang('new_PowerPoint') . '.pptx'; + if (!perm_check::checkperm_Container($path, 'upload', $bz)) { + exit(json_encode(array('error' => lang('privilege')))); + } + $content = file_get_contents(DZZ_ROOT . './dzz/images/newfile/ppt.pptx'); + break; + default: + if (!perm_check::checkperm_Container($path, 'upload', $bz)) { + exit(json_encode(array('error' => lang('privilege')))); + } + $content = ' '; + } + if($filename){ + $arr = IO::upload_by_content($content, $fid, $filename); + if ($arr['error']) { + } else { + $arr['msg'] = 'success'; + } + }else{ + $arr = array(); + $arr['error'] = lang('new_failure'); + } + exit(json_encode($arr)); +} elseif ($operation == 'getfid') {//获取路径对应目录 + $path = isset($_GET['name']) ? trim($_GET['name']) : ''; + $prefix = isset($_GET['prefix']) ? trim($_GET['prefix']) : ''; + $arr = array(); + if ($fid = C::t('resources_path')->fetch_by_path($path, $prefix)) { + if (preg_match('/c_\d+/', $fid)) { + $arr['cid'] = str_replace('c_', '', $fid); + } else { + $folderarr = C::t('folder')->fetch($fid); + if ($folderarr['gid']) { + $arr['gid'] = $folderarr['gid']; + if ($folderarr['flag'] != 'organization') { + $arr['fid'] = $fid; + } + } else { + $arr['fid'] = $fid; + } + } + exit(json_encode(array('success' => $arr, 'json'))); + } else { + exit(json_encode(array('error' => true, 'json'))); + } +}elseif ($operation == 'property') {//属性 + $paths = isset($_GET['paths']) ? trim($_GET['paths']) : ''; + $fid = 0; + if(preg_match('/fid_/',$paths)){ + $fid = intval(preg_replace('/fid_/','',$paths)); + } + if($fid){ + if($rid = C::t('resources')->fetch_rid_by_fid($fid)){ + $propertys = C::t('resources')->get_property_by_rid($rid); + }else{ + $propertys = C::t('resources')->get_property_by_fid($fid); + } + }else{ + $patharr = explode(',', $paths); + $rids = array(); + foreach ($patharr as $v) { + $rids[] = dzzdecode($v); + } + $propertys = C::t('resources')->get_property_by_rid($rids); + } + if($propertys['error']){ + $error = $propertys['error']; + } +} +include template('fileselection/ajax'); \ No newline at end of file diff --git a/dzz/system/fileselection/dzzcp.php b/dzz/system/fileselection/dzzcp.php new file mode 100644 index 0000000..216abed --- /dev/null +++ b/dzz/system/fileselection/dzzcp.php @@ -0,0 +1,249 @@ +update_data_by_delrid($ridarr); + } + echo json_encode($arr); + exit(); +}elseif($operation == 'copyfile' ){//复制或者剪切文件到云粘贴板 + $rids = isset($_GET['rids']) ? $_GET['rids']:''; + $bz= isset($_GET['bz']) ? trim($_GET['bz']):''; + $paths = array(); + foreach($rids as $rid){ + $paths[] = dzzdecode($rid); + } + $copytype = isset($_GET['copytype']) ? intval($_GET['copytype']):1; + $return = C::t('resources_clipboard')->insert_data($paths,$copytype); + if(!$return['error']){ + $rids = explode(',',$return['rid']); + $arr = array('msg'=>'success','rid'=>$rids,'copyid'=>$return['copyid']); + }else{ + $arr = array('msg'=>$return['error']); + } + exit(json_encode($arr)); +}elseif($operation == 'rename'){ + $path=dzzdecode($_GET['path']); + $text=str_replace('...','',getstr(io_dzz::name_filter($_GET['text']),80)); + $ret=IO::rename($path,$text); + exit(json_encode($ret)); + +}elseif($operation == 'paste'){//粘贴复制或者剪切的文件 + + $copyinfo = C::t('resources_clipboard')->fetch_by_uid(); + //复制文件rid + $icoids = explode(',',$copyinfo['files']); + //复制文件的bz + $obz = !empty($copyinfo['bz']) ? $copyinfo['bz']:''; + //目标位置的bz + $tbz=trim($_GET['tbz']); + $tpath = trim($_GET['tpath']); + + $icoarr=array(); + $folderarr=array(); + + //判断是否有粘贴文件 + if(!$icoids){ + $data=array('error'=>lang('data_error')); + echo json_encode($data); + exit(); + } + //判断是否是剪切 + $iscopy =($copyinfo['copytype'] == 1)?1:0; + + $data=array(); + $totalsize=0; + $icos=$folderids=array(); + //分4种情况:a:本地到api;b:api到api;c:api到本地;d:本地到本地; + foreach($icoids as $icoid){ + if(empty($icoid)){ + $data['error'][]=$icoid.':'.lang('forbid_operation'); + continue; + } + $rid=rawurldecode($icoid); + $path=rawurldecode($tpath); + $return=IO::CopyTo($rid,$path,$iscopy); + if($return['success']===true){ + if(!$iscopy && $return['moved']!==true){ + IO::DeleteByData($return); + } + $data['icoarr'][]=$return['newdata']; + if(!$tbz){ + addtoconfig($return['newdata'],$ticoid); + } + + if($return['newdata']['type']=='folder') $data['folderarr'][]=IO::getFolderByIcosdata($return['newdata']); + $data['successicos'][$return['rid']]=$return['newdata']['rid']; + + }else{ + $data['error'][]=$return['name'].':'.$return['success']; + } + } + + if($data['successicos']){ + $data['msg']='success'; + C::t('resources_clipboard')->delete_by_uid(); + if(isset($data['error'])) $data['error']=implode(';',$data['error']); + echo json_encode($data); + exit(); + }else{ + $data['error']=implode(';',$data['error']); + echo json_encode($data); + exit(); + } +}elseif($operation == 'recoverFile'){//恢复文件 + $arr=array(); + $i=0; + $icoids=$_GET['rids']; + $ridarr = array(); + $bz= isset($_GET['bz']) ? trim($_GET['bz']):''; + foreach($icoids as $icoid){ + $icoid=dzzdecode($icoid); + if(empty($icoid)){ + continue; + } + //判断文件是否在回收站 + if (!$recycleinfo = C::t('resources_recyle')->get_data_by_rid($icoid)) { + $arr['msg'][$icoid]=lang('file_longer_exists'); + }else{ + $return=IO::Recover($icoid); + } + + if(!$return['error']){ + //处理数据 + $arr['sucessicoids'][$return['rid']]=$return['rid']; + $arr['msg'][$return['rid']]='success'; + $arr['name'][$return['rid']] = $return['name']; + $ridarr[]= $return['rid']; + $i++; + }else{ + $arr['msg'][$return['rid']]=$return['error']; + } + } + echo json_encode($arr); + exit(); +}elseif($operation == 'recoverAll'){//恢复所有文件 + $rids = C::t('resources_recyle')->fetch_all_rid(); + foreach($rids as $icoid){ + //$icoid=dzzdecode($icoid); + if(empty($icoid)){ + continue; + } + //判断文件是否在回收站 + if (!$recycleinfo = C::t('resources_recyle')->get_data_by_rid($icoid)) { + $arr['msg'][$icoid]=lang('file_longer_exists'); + }else{ + $return=IO::Recover($icoid); + } + + if(!$return['error']){ + //处理数据 + $arr['sucessicoids'][$return['rid']]=$return['rid']; + $arr['msg'][$return['rid']]='success'; + $arr['name'][$return['rid']] = $return['name']; + $ridarr[]= $return['rid']; + $i++; + }else{ + $arr['msg'][$return['rid']]=$return['error']; + } + } + echo json_encode($arr); + exit(); +}elseif($operation == 'finallydelete'){//彻底删除文件 + $arr=array(); + $i=0; + $icoids=$_GET['rids']; + $ridarr = array(); + $bz= isset($_GET['bz']) ? trim($_GET['bz']):''; + foreach($icoids as $icoid){ + $icoid=dzzdecode($icoid); + if(empty($icoid)){ + continue; + } + $return=IO::Delete($icoid); + if(!$return['error']){ + //处理数据 + $arr['sucessicoids'][$return['rid']]=$return['rid']; + $arr['msg'][$return['rid']]='success'; + $arr['name'][$return['rid']] = $return['name']; + $ridarr[]= $return['rid']; + $i++; + }else{ + $arr['msg'][$return['rid']]=$return['error']; + } + } + echo json_encode($arr); + exit(); +}elseif($operation == 'emptyallrecycle'){//清空回收站 + $rids = C::t('resources_recyle')->fetch_all_rid(); + foreach($rids as $icoid){ + //$icoid=dzzdecode($icoid); + $return=IO::Delete($icoid); + if(!isset($return['error'])){ + //处理数据 + $arr['sucessicoids'][$return['rid']]=$return['rid']; + $arr['msg'][$return['rid']]='success'; + $arr['name'][$return['rid']] = $return['name']; + $ridarr[]= $return['rid']; + $i++; + }else{ + $arr['msg'][$return['rid']]=$return['error']; + } + } + echo json_encode($arr); + exit(); +}elseif($operation == 'download'){//暂无请求到此的下载 + define('NOROBOT', TRUE); + $path = empty($_GET['icoid'])?trim($_GET['path']):$_GET['icoid']; + $patharr=explode(',',$path); + $paths=array(); + foreach($patharr as $path){ + if($path=dzzdecode($path)){ + $paths[]=$path; + } + } + if($paths){ + IO::download($paths,$_GET['filename']); + exit(); + }else{ + exit('path error!'); + } +} \ No newline at end of file diff --git a/dzz/system/fileselection/explorerfile.php b/dzz/system/fileselection/explorerfile.php new file mode 100644 index 0000000..8b5f588 --- /dev/null +++ b/dzz/system/fileselection/explorerfile.php @@ -0,0 +1,166 @@ +0?'asc':"desc"; + switch($_GET['disp']){ + case 0: + $by='name'; + break; + case 1: + $by='size'; + break; + case 2 : + $by= array('type', 'ext'); + break; + case 3: + $by='dateline'; + break; + + } + $limit=$start.'-'.($start+$perpage); + if(strpos($bz,'ALIOSS')===0 || strpos($bz,'JSS')===0 || strpos($bz,'qiniu')===0){ + $order=$marker; + $limit=$perpage; + }elseif( strpos($bz,'OneDrive')===0){ + $limit=$perpage; + $force=$marker; + } + $icosdata=IO::listFiles($path,$by,$order,$limit,$force); + + if($icosdata['error']){ + exit(json_encode($icosdata)); + } + $folderdata=array(); + $ignore=0; + foreach($icosdata as $key => $value){ + if($value['error']){ + $ignore++; + continue; + } + if($value['type']=='folder'){ + $folder=IO::getFolderByIcosdata($value); + $folderdata[$folder['fid']]=$folder; + } + if(strpos($bz,'ftp')===false){ + if(trim($value['path'],'/')==trim($path,'/')){ + $ignore++; + continue; + } + } + + $userdata[$value['uid']]=$value['username']; + $data[$key]=$value; + } + $bz=($bz); + } + else { + list($prex, $id) = explode('-', $sid); + if ($prex == 'f') { + $arr = array(); + //查询当前文件夹信息 + if ($folder = C::t('folder')->fetch_by_fid($id)) { + + $folder['disp'] = $disp = intval($_GET['disp']) ? intval($_GET['disp']) : intval($folder['disp']);//文件排序 + + $folder['iconview'] = (isset($_GET['iconview']) ? intval($_GET['iconview']) : intval($folder['iconview']));//排列方式 + $conditions = array(); + $keyword = isset($_GET['keyword']) ? urldecode($_GET['keyword']) : ''; + $exts = isset($_GET['exts']) ? trim($_GET['exts']):''; + if($exts){ + $extsarr = explode(',',$exts); + $conditions['ext'] = array($extsarr,'in','and'); + } + + if($keyword){ + $conditions['name'] = array($keyword,'like','and'); + } + $conditions['mustdition'] = "or (flag = 'folder')"; + $asc = isset($_GET['asc'])?intval($_GET['asc']):1; + + $order = $asc > 0 ? 'ASC' : "DESC"; + + switch ($disp) { + case 0: + $orderby = 'name'; + break; + case 1: + $orderby = 'size'; + break; + case 2: + $orderby = array('type', 'ext'); + break; + case 3: + $orderby = 'dateline'; + break; + + } + + $folder['perm'] = perm_check::getPerm($folder['fid']);//获取文件权限 + foreach(C::t('resources')->fetch_all_by_pfid($folder['fid'], $conditions, $perpage, $orderby, $order, $start) as $v){ + if($v['type'] == 'image'){ + $v['img'] = DZZSCRIPT.'?mod=io&op=thumbnail&width=100&height=90&path=' . dzzencode('attach::' . $v['aid']); + } + + $data[$v['rid']] = $v; + } + $folderdata[$folder['fid']] = $folder;//文件夹信息 + + } + } + } + if(count($data) >= $perpage){ + $total = $start + $perpage*2 -1; + }else{ + $total = $start + count($data); + } + //$total=$count;//总条数 + if(!$json_data=json_encode($data)) $data=array(); + if(!$json_data=json_encode($folderdata)) $folderdata=array(); + //返回数据 + $return=array( + 'sid'=>$sid, + 'total'=>$total, + 'data'=>$data?$data:array(), + + 'folderdata'=>$folderdata?$folderdata:array(), + 'param'=>array( + 'disp'=>$folder['disp'], + 'view'=>$folder['iconview'], + 'page'=>$page, + 'perpage'=>$perpage, + 'bz'=>$bz, + 'total'=>$total, + 'asc'=>$asc, + 'keyword'=>$keyword, + 'localsearch'=>$bz?1:0 + ) + ); + exit(json_encode($return)); +} \ No newline at end of file diff --git a/dzz/system/fileselection/file.php b/dzz/system/fileselection/file.php new file mode 100644 index 0000000..193f53e --- /dev/null +++ b/dzz/system/fileselection/file.php @@ -0,0 +1,45 @@ +fetch($gid)) { + showmessage(lang('no_group'), dreferer()); + } + if (!$explorer_setting['grouponperm']) { + showmessage(lang('no_privilege'), dreferer()); + } + //获取群组成员权限 + $perm = C::t('organization_admin')->chk_memberperm($gid, $uid); + //判断群组是否开启,如果未开启(共享目录)并且不是管理员不能访问 + if (!$group['diron'] && !$perm) { + showmessage(lang('no_privilege'), dreferer()); + } + //判断是否有权限访问群组,如果不是管理员权限(主要针对系统管理员和上级管理员),并且非成员 + if (!$perm && !C::t('organization')->ismember($gid, $uid, false)) { + showmessage(lang('no_privilege'), dreferer()); + } + if (!$fid) $fid = $group['fid']; +} +$folderinfo = C::t('folder')->fetch_folderinfo_by_fid($fid); +$patharr = getpath($folderinfo['path']); +$folderpathstr = implode('\\', $patharr); +require template('fileselection/content'); diff --git a/dzz/system/fileselection/json.php b/dzz/system/fileselection/json.php new file mode 100644 index 0000000..4797f49 --- /dev/null +++ b/dzz/system/fileselection/json.php @@ -0,0 +1,136 @@ +fetch_all(); +} + +$data['iconview'] = $iconview; + +$config = array(); +$config=C::t('user_field')->fetch($_G['uid']); +$applist=$config['applist']?explode(',',$config['applist']):array(); +if($applist_n =array_keys(C::t('app_market')->fetch_all_by_notdelete($_G['uid']))) { + $newappids = array(); + foreach ($applist_n as $appid) { + if (!in_array($appid, $applist)) { + $applist[] = $appid; + $newappids[] = $appid; + } + } + if ($newappids){ + C::t('app_user')->insert_by_uid($_G['uid'], $newappids); + C::t('user_field')->update($_G['uid'], array('applist' => implode(',', $applist))); + } +} +//应用数据 + $appdata=array(); + $appdata=C::t('app_market')->fetch_all_by_appid($applist); + //$arr['appdata']=microtime(true); + $applist_1=array(); + foreach($appdata as $value){ + if($value['isshow']<1) continue; + if($value['available']<1) continue; + if($value['system'] == 2) continue; + $applist_1[]=$value['appid']; + } + + +$data['applist']=array_values($applist_1); +//获取系统桌面设置信息 +$icosdata = array(); +$data['noticebanlist'] = $config['noticebanlist'] ? explode(',', $config['noticebanlist']) : array(); +//获取打开方式 +$data['extopen']['all'] = C::t('app_open')->fetch_all_ext(); +$data['extopen']['ext'] = C::t('app_open')->fetch_all_orderby_ext($_G['uid'], $data['extopen']['all']); +$data['extopen']['user'] = C::t('app_open_default')->fetch_all_by_uid($_G['uid']); +//获取用户的默认打开方式 +$data['extopen']['userdefault'] = C::t('app_open_default')->fetch_all_by_uid($_G['uid']); +//目录数据 +$folderdata = array(); +$data['cut']=array(); +//用户粘贴板数据 +$clipboardinfo = C::t('resources_clipboard')->fetch_by_uid($uid); +if($clipboardinfo){ + //复制类型1为复制,2为剪切 + $copttype = $clipboardinfo['copytype']; + $data['cut']['iscut'] = ($copttype == 1) ? 0:1; + + $files = explode(',',$clipboardinfo['files']); + foreach($files as $v){ + $resourcesdata = C::t('resources')->fetch_by_rid($v); + if($resourcesdata['type'] == 'folder'){ + $folderdata[$resourcesdata['fid']] = C::t('folder')->fetch_by_fid($resourcedata['oid']); + $icosdata[$v] = $resourcesdata; + }else{ + $icosdata[$v] = $resourcesdata; + } + } + $data['cut']['icos'] = $files; +}else{ + $data['cut']['icos']=array(); +} + +$data['formhash'] = $_G['formhash']; + + +$data['sourcedata'] = array( + 'icos' => $icosdata ? $icosdata : array(), + 'folder' => $folderdata ? $folderdata : array(), + 'app' => $appdata?$appdata:array() +); +$space['attachextensions'] = $space['attachextensions'] ? explode(',', $space['attachextensions']) : array(); + +$data['myspace'] = $data['space'] = $space; +$thame = getThames(); +$data['thame'] = $thame['data']; +$infoPanelOpened = C::t('user_setting')->fetch_by_skey('infoPanelOpened'); +if (isset($infoPanelOpened)) { + $data['infoPanelOpened'] = ($infoPanelOpened) ? 1 : 0; +} else { + C::t('user_setting')->update_by_skey('infoPanelOpened',1); + $data['infoPanelOpened'] = 1; +} +$data['mulitype'] = $mulitype; +$data['fileselectiontype'] = $type; +if($exttype){ + $exttype = str_replace(array('"','|','$'),array('"','(',')'),$exttype); +} +$data['allowselecttype'] = json_decode($exttype); +$data['defaultfilename'] = isset($filename) ? $filename:''; +echo json_encode($data); +exit(); diff --git a/dzz/system/fileselection/listcontent.php b/dzz/system/fileselection/listcontent.php new file mode 100644 index 0000000..777f155 --- /dev/null +++ b/dzz/system/fileselection/listcontent.php @@ -0,0 +1,8 @@ +check_home_by_uid($uid)) { + C::t('folder')->fetch_home_by_uid($uid); +} +$id = isset($_GET['id']) ? $_GET['id'] : ''; +$operation = $_GET['operation'] ? $_GET['operation'] : ''; +$ismobile = helper_browser::ismobile(); +$data = array(); +$powerarr = perm_binPerm::getPowerArr(); +if ($operation == 'get_children') { + if ($id == 'group') { + $groupinfo = C::t('organization')->fetch_group_by_uid($uid, true); + foreach ($groupinfo as $v) { + $children = (C::t('resources')->fetch_folder_num_by_pfid($v['fid']) > 0) ? true : false; + $arr = array( + 'id' => 'g_' . $v['orgid'], + 'type' => 'group', + 'children' => $children, + 'li_attr' => array('hashs'=>'group&gid='.$v['orgid']) + ); + if (intval($v['aid']) == 0) { + $arr['text'] = avatar_group($v['orgid'], array($v['orgid'] => array('aid' => $v['aid'], 'orgname' => $v['orgname']))) . $v['orgname']; + $arr['icon'] = false; + } else { + $arr['text'] = $v['orgname']; + $arr['icon'] = 'index.php?mod=io&op=thumbnail&width=24&height=24&path=' . dzzencode('attach::' . $v['aid']); + } + + $data[] = $arr; + } + exit(json_encode($data)); + } elseif (preg_match('/g_\d+/', $id)) { + $gid = intval(str_replace('g_', '', $id)); + $groupinfo = C::t('organization')->fetch($gid); + if ($groupinfo && $groupinfo['available'] == 1 && $groupinfo['diron'] == 1) { + foreach (C::t('folder')->fetch_folder_by_pfid($groupinfo['fid']) as $val) { + $children = (C::t('resources')->fetch_folder_num_by_pfid($val['fid']) > 0) ? true : false; + $data[] = array( + 'id' => 'f_' . $val['fid'], + 'text' => $val['fname'], + 'type' => 'folder', + 'children' => $children, + 'li_attr' => array( + 'hashs' => 'group&do=file&gid=' . $groupinfo['orgid'] . '&fid=' . $val['fid']) + ); + } + } + exit(json_encode($data)); + } elseif (preg_match('/gid_\d+/', $id)) { + $gid = intval(str_replace('gid_', '', $id)); + $orginfo = C::t('organization')->fetch($gid); + if ($orginfo && $orginfo['available'] == 1 && $orginfo['diron'] == 1) { + foreach (C::t('folder')->fetch_folder_by_pfid($orginfo['fid']) as $val) { + $children = (C::t('resources')->fetch_folder_num_by_pfid($val['fid']) > 0) ? true : false; + $arr = array( + 'id' => 'f_' . $val['fid'], + 'text' => $val['fname'], + 'type' => 'folder', + 'children' => $children, + 'li_attr' => array( + 'href' => DZZSCRIPT . '?mod=' . MOD_NAME . '&op=group', + 'hashs' => 'group&do=file&gid=' . $orginfo['orgid'] . '&fid=' . $val['fid'] + ) + ); + if ($val['flag'] == 'app') { + $appid = C::t("folder_attr")->fetch_by_skey_fid($val['fid'], 'appid'); + if ($imgs = C::t('app_market')->fetch_appico_by_appid($appid)) { + $arr['icon'] = 'data/attachment/' . $imgs; + } + + } + $data[] = $arr; + } + } + + $groupinfo = C::t('organization')->fetch_org_by_uidorgid($uid, $gid); + + if ($groupinfo) { + foreach ($groupinfo as $val) { + $children = (DB::result_first("select count(*) from %t where forgid = %d", array('organization', $val['orgid'])) > 0) ? true : false; + $arr = array( + 'id' => 'gid_' . $val['orgid'], + 'type' => 'department', + 'children' => $children, + 'li_attr' => array('hashs' => 'group&gid=' . $val['orgid'], 'args' => 'gid_' . $val['orgid']) + ); + if (intval($val['aid']) == 0) { + $arr['text'] = avatar_group($val['orgid'], array($val['orgid'] => array('aid' => $val['aid'], 'orgname' => $val['orgname']))) . $val['orgname']; + $arr['icon'] = false; + } else { + $arr['text'] = $val['orgname']; + $arr['icon'] = 'index.php?mod=io&op=thumbnail&width=24&height=24&path=' . dzzencode('attach::' . $val['aid']); + } + $data[] = $arr; + } + } + exit(json_encode($data)); + } elseif (preg_match('/f_\d+/', $id)) { + $fid = intval(str_replace('f_', '', $id)); + foreach (C::t('folder')->fetch_folder_by_pfid($fid) as $val) { + $children = (C::t('resources')->fetch_folder_num_by_pfid($val['fid']) > 0) ? true : false; + $data[] = array( + 'id' => 'f_' . $val['fid'], + 'text' => $val['fname'], + 'type' => 'folder', + 'children' => $children, + 'li_attr' => array( + 'href' => DZZSCRIPT . '?mod=' . MOD_NAME . '&op=group', + 'hashs' => 'group&do=file&gid=' . $val['gid'] . '&fid=' . $val['fid']) + ); + } + exit(json_encode($data)); + } elseif (preg_match('/u_\d+/', $id)) { + $fid = intval(str_replace('u_', '', $id)); + foreach (C::t('resources')->fetch_folder_by_pfid($fid) as $v) { + $children = (C::t('resources')->fetch_folder_num_by_pfid($v['oid']) > 0) ? true : false; + $data[] = array( + 'id' => 'u_' . $v['oid'], + 'text' => $v['name'], + 'type' => 'folder', + 'children' => $children, + 'li_attr' => array( + 'hashs'=>'home&do=file&fid='.$v['oid'] + ) + ); + } + exit(json_encode($data)); + } else { + $selrangearr = array(); + if($range){ + $selrangearr = explode(',',$range); + } + $rangeval = (count($selrangearr) > 0) ? true:false; + if (!$rangeval || ($rangeval && in_array('home',$selrangearr))) { + $folders = C::t('folder')->fetch_home_by_uid(); + $fid = $folders['fid']; + $children = (C::t('resources')->fetch_folder_num_by_pfid($fid) > 0) ? true : false; + $data[] = array( + 'id' => 'u_' . $fid, + 'text' => lang('explorer_user_root_dirname'), + 'type' => 'home', + 'children' => $children, + 'li_attr' => array('hashs' => "home&fid=$fid",'flag'=>'home') + ); + } + if (!$rangeval|| ($rangeval && in_array('org',$selrangearr))) { + $orgs = C::t('organization')->fetch_all_orggroup($uid); + foreach ($orgs['org'] as $v) { + if (count(C::t('organization')->fetch_org_by_uidorgid($uid, $v['orgid'])) > 0 || C::t('resources')->fetch_folder_num_by_pfid($v['fid']) > 0) { + $children = true; + } else { + $children = false; + } + if (!empty($v)) { + $arr = array( + 'id' => 'gid_' . $v['orgid'], + 'type' => ($v['pfid'] > 0 ? 'department' : 'organization'), + 'children' => $children, + 'li_attr' => array('hashs' => 'group&gid=' . $v['orgid'], 'args' => 'gid_' . $v['orgid']) + ); + if (intval($v['aid']) == 0) { + $arr['text'] = avatar_group($v['orgid'], array($v['orgid'] => array('aid' => $v['aid'], 'orgname' => $v['orgname']))) . $v['orgname']; + $arr['icon'] = false; + } else { + $arr['text'] = $v['orgname']; + $arr['icon'] = 'index.php?mod=io&op=thumbnail&width=24&height=24&path=' . dzzencode('attach::' . $v['aid']); + } + $data[] = $arr; + } + } + } + if ($explorer_setting['grouponperm'] && (!$rangeval|| ($rangeval && in_array('group',$selrangearr)))) { + $groups = C::t('organization')->fetch_group_by_uid($uid); + $children = (count($groups) > 0) ? true : false; + $data[] = array( + 'id' => 'group', + 'text' => '群组', + 'type' => 'group', + 'children' => $children, + 'li_attr' => array('hashs' => '') + ); + } + } + exit(json_encode($data)); +} elseif ($operation == 'getParentsArr') {//获取 + $fid = intval($_GET['fid']); + $gid = intval($_GET['gid']); + $ret = array(); + if ($fid) { + $subfix = ''; + $org = array(); + foreach (C::t('folder')->fetch_all_parent_by_fid($fid) as $value) { + if (empty($subfix)) { + if ($value['gid']) {//是部门或者群组 + $org = C::t('organization')->fetch($value['gid']); + if ($org['type'] == 0) { + $subfix = 'gid_'; + } elseif ($org['type'] == 1) { + $subfix = 'g_'; + } + } else { + $subfix = 'u_'; + } + } + if ($value['gid'] < 1) { + $arr[] = 'u_' . $value['fid']; + } elseif ($value['flag'] == 'organization') { + $arr[] = $subfix . $value['gid']; + } else { + $arr[] = 'f_' . $value['fid']; + } + } + if ($subfix == 'g_') {//群组的话,需要增加顶级"群组" + array_push($arr, 'group'); + } + $arr = array_reverse($arr); + } elseif ($gid) { + $subfix = ''; + foreach (C::t('organization')->fetch_parent_by_orgid($gid) as $orgid) { + if (empty($subfix)) { + $org = C::t('organization')->fetch($orgid); + if ($org['type'] == 0) { + $subfix = 'gid_'; + } elseif ($org['type'] == 1) { + $subfix = 'g_'; + } + } + $arr[] = $subfix . $orgid; + + } + if ($subfix == 'g_') array_unshift($arr, 'group'); + } + $arr = array_unique($arr); + exit(json_encode($arr)); +} + diff --git a/dzz/system/fileselection/save.php b/dzz/system/fileselection/save.php new file mode 100644 index 0000000..e757a2f --- /dev/null +++ b/dzz/system/fileselection/save.php @@ -0,0 +1,19 @@ +true))); + }else{ + exit(json_encode(array('error'=>lang('no_privilege')))); + } +} \ No newline at end of file diff --git a/dzz/system/filewindow.php b/dzz/system/filewindow.php new file mode 100644 index 0000000..965d342 --- /dev/null +++ b/dzz/system/filewindow.php @@ -0,0 +1,33 @@ + $allowcreate, + 'nosearch' => 1, + 'inwindow' => 1, + 'ctrlid' => isset($_GET['selfiles']) ? trim($_GET['selfiles']) : 'selfiles', + 'selfids'=>$fids, + 'type'=>$type, + 'rid'=>$rid, + 'filename'=>$filename, + 'range'=>$selrange, + 'defaultselect'=>$defaultselect, + 'exttype'=>$exttype, + 'mulitype'=>$mulitype, + 'token'=>$token +); +$theurl = MOD_URL . "&op=fileselection&callback=".$callback.'&'. url_implode($gets); +include template('selectfile'); +exit(); \ No newline at end of file diff --git a/dzz/system/function/function_filerouterule.php b/dzz/system/function/function_filerouterule.php new file mode 100644 index 0000000..a504fc6 --- /dev/null +++ b/dzz/system/function/function_filerouterule.php @@ -0,0 +1,53 @@ +fetch_by_path($path, $prefix)) { + if (preg_match('/c_\d+/', $fid)) { + $arr['cid'] = str_replace('c_', '', $fid); + } else { + $folderarr = C::t('folder')->fetch($fid); + if ($folderarr['gid']) { + $arr['gid'] = $folderarr['gid']; + if ($folderarr['flag'] != 'organization') { + $arr['fid'] = $fid; + } + } else { + $arr['fid'] = $fid; + } + } + } + return $arr; + +} +function get_default_select(){ + +} \ No newline at end of file diff --git a/dzz/system/images/checkbox-box.png b/dzz/system/images/checkbox-box.png new file mode 100644 index 0000000000000000000000000000000000000000..8794cba551e3a4d1f72579beaa7ca4794c33bcc3 GIT binary patch literal 1163 zcmaJ=U2NM_6n2}S#>bx9)cbfZMNylI1*JsRN5i*=Cg1H#fku{ooU7p7sE%8j3#p8OYLF>f zS_77#W=v0BfhmfL44UN%uBf|Y9a)?f#&Evn5Hv-lMtn!pCm?2OuwmM1_Sa9(v5aY? z**$R;s7@9(&BBZech8KK^_dA>GT4!4nUpUR0t;e|@vZ%~C;Mr3l~*SF@S10t)et<9 zW*>;EsN+l)xsZu-iKs5bhMAl&b)kllTSjPqyNlyZgpt=o4wKD>T}v`g?=fuywY+CmF{&yTZ4Ya<4vR{f zB`ln28geq1kn*GXq!P~vf{;r}qL|N)lIDZlXhIrN+E@kYQx>#w8*4no4tK*j|xalA{c z{e0`qI<*e2fw2Zyg(m4%hYMr%+vM3Zm#E(YHcx@={bE0fUjvW*1Q75 z)XTxUCnxXj+xGj;1$skwe90Ao^RWOvkp7%Id4BG#%)WQtxOw|h&==nkh%YVY=Qn=# zVjwPe?cHKsyLjV?3s z{=(Ac;Mm-et!IK)-wuA+p)7sX3MOeV0QlwYi-+%>=)V6^hBmr?)5W2YjklCns0fu) W3+cw;FMcL%po+OM<-^hHp??5-`ii0e literal 0 HcmV?d00001 diff --git a/dzz/system/images/checkbox-check.png b/dzz/system/images/checkbox-check.png new file mode 100644 index 0000000000000000000000000000000000000000..2ea4951bbaddcaff7edc3c1e019bd5d806153fdf GIT binary patch literal 1044 zcmaJ=O=#0l91jl1oDL_VOb;$*AP&}ibn8b#yRL28t+ey5z;=)n+{o zC+y;7e#{}BJdWLjq0U`oAc&yg5N|SJD53`s^PtX`uI)Tn126A`-|zSTc)zzWk{)bp zJ=;nUL|bY|%;34*9WBlH-}!w{#?u*;$e~dpiav!hIVulvk4*;aZFh$07OoJDa{B|-=1txq^5?cF`vXrW*p?Tp|S-= z%jv9AE-1W8Mf%B*BVYj?AenUZ8N(KwFjdhN@Y+3QD6#@Ug)p_BR8ATpqc$)L^L2q9V>18=T!}1K*=V3X4tx~ySW z+k_j&II_ubH0zdB14`2Wp}Jm2+b9DL^8Kf{na&dn&=Bsf_;079UT|4L|jw}L8y9U&x1$DAgwxBi6 zrLUo0m8&++#n+I_;A9y0a{s#Q+7Wh;yR2ImZ|dd;26nuKt-W=m;|+cm*HdCN>%9N6 z$Q^x79!s7qo*3LSE`53(`P_3e{q~)>W^K=}{z`sWUkknDnMYgeyT$-l@XWXOFJ*-F zU3#-+^XE>7GSGea2YYX8x%JL@s-+~omrdZfH`Xy?iz`|SAg p(!-&T_s3SJx7ii%&MUt2F407!Z}dkVuPlta?=+Q2i>tBmxj$aRQh@*f literal 0 HcmV?d00001 diff --git a/dzz/system/language/zh-cn/lang.php b/dzz/system/language/zh-cn/lang.php index 8692932..05c6e31 100644 --- a/dzz/system/language/zh-cn/lang.php +++ b/dzz/system/language/zh-cn/lang.php @@ -68,6 +68,17 @@ $lang = array 'you_not_recorded'=>'您还没有登录', 'added_desktop_failure'=>'添加到桌面失败', 'no_institution_users'=>'无机构用户', - 'news_platform_send_here'=>'欢迎您!,平台的消息和通知会及时的发送到此处' + 'news_platform_send_here'=>'欢迎您!,平台的消息和通知会及时的发送到此处', + 'downpackage' => '打包下载', + 'iconview_2' => '中等图标', + 'iconview_4' => '详细列表', + 'openwith' => '打开方式', + 'upload' => '上传', + 'uploadfile' => '上传文件', + 'uploadfolder' => '上传文件夹', + 'newly_build' => '新建', + 'refresh' => '刷新', + 'rename' => '重命名', + 'edit_date' => '修改时间', ); ?> diff --git a/dzz/system/mobile_selectuser.php b/dzz/system/mobile_selectuser.php new file mode 100644 index 0000000..8fd5627 --- /dev/null +++ b/dzz/system/mobile_selectuser.php @@ -0,0 +1,114 @@ + $zero, + 'nouser' => nouser, + 'stype' => $stype, + 'moderator' => $moderator, + 'range' => $range, + 'multiple' => $multiple, + 'nosearch' => 1, + 'ctrlid' => 'seluser' +); +//获取选中项 +$ids = explode(',', $ids); +$selectorgids = $selectuids = array(); +foreach ($ids as $value) { + if (strpos($value, 'g_') !== false) { + if ($stype == 2) continue;//仅选择用户时,忽略部门和群组 + $orgid = intval(str_replace($value, 'g_', '')); + $selectorgids[$orgid] = $orgid; + + } elseif ($uid = intval($value)) { + if ($stype == 1) continue; //仅选择部门和群组时,忽略用户; + $selectuids[$uid] = $uid; + } +} +$keyword = isset($_GET['keyword']) ? trim($_GET['keyword']) : ''; +//获取所有机构和部门 +$orgdatas = $orgids = $orgnames = $selectorginfo = array(); +foreach (DB::fetch_all("select pathkey from %t where `type` = %d", array('organization', 0)) as $v) { + $param = array('organization', 0); + $pathkey = $pathkey . '.*'; + foreach (DB::fetch_all("select * from %t where pathkey regexp %s and `type` = 0", array('organization', $pathkey)) as $val) { + if (intval($val['aid']) == 0) { + $val['img'] = avatar_group($val['orgid'], array($val['orgid'] => array('aid' => $val['aid'], 'orgname' => $val['orgname']))); + } else { + $val['icon'] = 'index.php?mod=io&op=thumbnail&width=24&height=24&path=' . dzzencode('attach::' . $val['aid']); + } + $orgdatas[$val['pathkey']] = $val; + $orgdatas[$val['pathkey']]['user_count'] = 0; + $orgdatas[$val['pathkey']]['user_select'] = 0; + if(in_array($val['orgid'],$selectorgids)) $orgdatas[$val['pathkey']]['selected'] = true; + $orgids[] = $val['orgid']; + $orgnames[$val['orgid']] = $val['orgname']; + } +} +$wheresql = 'ou.orgid in(%n) '; +$param = array('organization_user', 'organization', 'user', 'user_setting', 'headerColor', $orgids); +if ($keyword) { + $wheresql .= ' and (u.username LIKE %s or u.email LIKE %s or u.phone LIKE %s)'; + $param[] = '%' . $keyword . '%'; + $param[] = '%' . $keyword . '%'; + $param[] = '%' . $keyword . '%'; +} +$selectuserinfo = array(); +$selectnum = ($stype == 1) ? count($selectorgids): count($selectuids); +if(!$nouser) { + $data = DB::fetch_all("select ou.orgid,o.pathkey,u.uid,u.username,u.avatarstatus,s.svalue from %t ou left join %t o on o.orgid=ou.orgid + left join %t u on ou.uid=u.uid left join %t s on u.uid=s.uid and s.skey=%s where $wheresql", $param); + //获取机构和部门下的用户 + foreach ($data as $v) { + //获取用户头像相关信息 + if (!$v['avatarstatus']) { + $v['avatarstatus'] = 0; + $v['headerColor'] = $v['svalue']; + $v['firstword'] = strtoupper(new_strsubstr($v['username'], 1, '')); + } + if ($orgdatas[$v['pathkey']]) { + if(in_array($v['uid'],$selectuids) || in_array($v['orgid'],$selectorgids)){ + $v['selected'] = true; + $selectuserinfo[] = $v; + $orgdatas[$v['pathkey']]['user_select'] += 1; + } + $orgdatas[$v['pathkey']]['users'][$v['uid']] = $v; + $orgdatas[$v['pathkey']]['user_count'] += 1; + } + } +} + +ksort($orgdatas); +foreach ($orgdatas as $k => $v) { + $pathkeyarr = explode('-', str_replace('_', '', $k)); + $orgdatas[$v['pathkey']]['title'] = ''; + foreach ($pathkeyarr as $val) { + $orgdatas[$v['pathkey']]['title'] .= $orgnames[$val] . '-'; + } + $orgdatas[$v['pathkey']]['title'] = substr($orgdatas[$v['pathkey']]['title'], 0, -1); +} +include template('mobile_selectuser'); +dexit(); + diff --git a/dzz/system/mobilefileselection.php b/dzz/system/mobilefileselection.php new file mode 100644 index 0000000..067e278 --- /dev/null +++ b/dzz/system/mobilefileselection.php @@ -0,0 +1,55 @@ + $allowcreate, + 'type' => $type, + 'range' => $range, + 'defaultselect' => $defaultselect, + 'mulitype' => $mulitype, + 'exttype' => $exttype, + 'callback_url'=>$callback_url, + 'token'=>$token, + 'formhash'=>$formhash, + 'filename'=>$filename +); +$json = json_encode($gets); +$allowvisit = array('file','searchfile', 'json', 'ajax', 'search', 'save','home','group'); +if ($do) { + if (!in_array($do, $allowvisit)) { + showmessage(lang('access_denied'), dreferer()); + } else { + require MOD_PATH . '/mobilefileselection/' . $do . '.php'; + } +} else { + include template('mobilefileselection/index'); + exit(); +} + diff --git a/dzz/system/mobilefileselection/ajax.php b/dzz/system/mobilefileselection/ajax.php new file mode 100644 index 0000000..4714626 --- /dev/null +++ b/dzz/system/mobilefileselection/ajax.php @@ -0,0 +1,30 @@ +fetch($fid); + $perm = 0; + $name = !empty($_GET['foldername']) ? trim($_GET['foldername']) : lang('newfolder'); + $fid = intval($_GET['fid']); + $fname = io_dzz::name_filter(getstr($name, 80)); + if ($arr = IO::CreateFolder($fid, $fname, $perm)) { + if ($arr['error']) { + } else { + $arr = array_merge($arr['icoarr'], $arr['folderarr']); + $arr['msg'] = 'success'; + + } + } else { + $arr = array(); + $arr['error'] = lang('failure_newfolder'); + } + exit(json_encode($arr)); +} \ No newline at end of file diff --git a/dzz/system/mobilefileselection/file.php b/dzz/system/mobilefileselection/file.php new file mode 100644 index 0000000..407e1a2 --- /dev/null +++ b/dzz/system/mobilefileselection/file.php @@ -0,0 +1,183 @@ +fetch($gid)) { + showmessage(lang('no_group'), dreferer()); + } + //获取成员权限 + $perm = C::t('organization_admin')->chk_memberperm($gid, $uid); + //判断群组是否开启,如果未开启(共享目录)并且不是管理员不能访问 + if (!$group['diron'] && !$perm) { + showmessage(lang('no_privilege'), dreferer()); + } + //判断是否有权限访问群组,如果不是管理员权限(主要针对系统管理员和上级管理员),并且非成员,不能访问 + if (!$perm && !C::t('organization')->ismember($gid, $uid, false)) { + showmessage(lang('no_privilege'), dreferer()); + } + + if (!$group['syatemon']) { + showmessage(lang('no_group_by_system'), dreferer()); + } + if (!$group['manageon'] && $perm < 1) { + showmessage(lang('no_privilege'), dreferer()); + } + if (!$fid) $fid = $group['fid']; +} +$perpage = isset($_GET['perpage']) ? intval($_GET['perpage']) : 10;//默认每页条数 +$page = empty($_GET['page']) ? 1 : intval($_GET['page']);//页码数 +$start = ($page - 1) * $perpage;//开始条数 +$datastart = isset($_GET['datatotal']) ? intval($_GET['datatotal']) : 0; +$total = 0;//总条数 +//是否有更多群组 +$gropunext = isset($_GET['gropunext']) ? intval($_GET['gropunext']) : true; +//默认按时间顺序查询 +$disp = isset($_GET['disp']) ? intval($_GET['disp']) : 3; +$bz = empty($_GET['bz']) ? '' : urldecode($_GET['bz']); +$marker = empty($_GET['marker']) ? '' : trim($_GET['marker']); +$data = array(); +$keyword = isset($_GET['keyword']) ? urldecode($_GET['keyword']) : ''; +$exts = isset($_GET['exts']) ? trim($_GET['exts']) : ''; +$conditions = array(); +if ($keyword) { + $conditions['name'] = array($keyword, 'like', 'and'); +} + +//类型筛选 +if ($exts) { + if($exts == 'folder'){ + $conditions['type'] = array('folder', '=', 'and'); + }else{ + $extarr = explode(',', $exts); + $conditions['ext'] = array($extarr, 'in', 'and'); + } +} +$asc = isset($_GET['asc']) ? intval($_GET['asc']) : 0; + +$order = $asc > 0 ? 'ASC' : "DESC"; + +switch ($disp) { + case 0: + $orderby = 'name'; + $groupby = 'o.orgname'; + break; + case 1: + $orderby = 'size'; + $groupby = 'o.dateline'; + break; + case 2: + $orderby = array('type', 'ext'); + $groupby = 'o.dateline'; + break; + case 3: + $orderby = 'dateline'; + $groupby = 'o.dateline'; + break; + +} +$folder = C::t('folder')->fetch_folderinfo_by_fid($fid); +$folder['gid'] = ($gid) ? $gid : 0; +$folder['ismoderator'] = $perm; +$folderjson = json_encode(array($fid => $folder)); +$folderpath = array_filter(explode('/', preg_replace('/dzz:(.+?):/', '', $folder['path']))); +$navtitle = $folderpath[0]; +$pathkeyarr = explode('-', str_replace('_', '', $folder['pathkey'])); +$folderpatharr = array(); +foreach (DB::fetch_all("select fid,gid,fname from %t where fid in(%n)", array('folder', $pathkeyarr)) as $v) { + $folderpatharr[] = array('fid' => $v['fid'], 'gid' => $v['gid'], 'name' => $v['fname']); +} +$groups = array(); +$newperpage = 10; +//如果是机构获或部门取下级 +if ($gid > 0 && $group['type'] == 0 && $gropunext) { + if (C::t('organization_admin')->chk_memberperm($gid, $uid) || C::t('organization')->ismember($gid, $uid, true)) { + foreach (DB::fetch_all("select o.*,f.fid from %t o left join %t f on o.fid=f.fid where o.forgid = %d order by $groupby $order limit $start,$perpage", array('organization', 'folder', $gid)) as $v) { + if (((C::t('organization_admin')->chk_memberperm($v['orgid'], $uid) > 0) || ($v['manageon'] && $v['diron'])) && $v['syatemon']) { + $resultarr[] = $v; + if (intval($v['aid'])) { + //群组图 + $v['img'] = 'index.php?mod=io&op=thumbnail&width=45&height=45&path=' . dzzencode('attach::' . $v['aid']); + } + $contaions = C::t('resources')->get_contains_by_fid($v['fid']); + $v['filenum'] = $contaions['contain'][0]; + $v['foldernum'] = $contaions['contain'][1]; + $v['orgname'] = addslashes($v['orgname']); + $groups[] = $v; + } else { + continue; + } + } + } + $groupnum = count($groups); + if ($groupnum >= $perpage) { + $gropunext = $page + 1; + } else { + $gropunext = false; + } + //如果有机构部门结果,则减去机构部门结果数量 + $newperpage = $perpage - $groupnum; +} else { + $gropunext = false; +} + +//获取文件数据 +if ($newperpage) { + //查询结果处理 + foreach (C::t('resources')->fetch_all_by_pfid($fid, $conditions, $newperpage, $orderby, $order, $datastart) as $val) { + if ($val['type'] == 'folder') { + $val['filenum'] = $val['contaions']['contain'][0]; + $val['foldernum'] = $val['contaions']['contain'][1]; + } else { + $val['monthdate'] = dgmdate($val['dateline'], 'm-d'); + $val['hourdate'] = dgmdate($val['dateline'], 'H:i'); + } + if ($val['type'] == 'image') { + $val['img'] = DZZSCRIPT . '?mod=io&op=thumbnail&width=45&height=45&path=' . dzzencode('attach::' . $val['aid']); + $val['imgpath'] = DZZSCRIPT . '?mod=io&op=thumbnail&path=' . dzzencode('attach::' . $val['aid']); + } + $val['name'] = addslashes($val['name']); + $data[$val['rid']] = $val; + } +} +$next = false; +if (count($data) + count($groups) >= $perpage) { + $next = $page + 1; +} +//返回数据 +$return = array('fid' => $fid, 'data' => $data ? $data : array(), 'param' => array( + 'perpage' => $perpage, + 'bz' => $bz, + 'asc' => $asc, + 'disp' => $disp, + 'page' => $next, + 'ext' => $exts, + 'fid' => $fid, + 'gid' => $gid, + 'datatotal' => (count($data) + count($groups) + $datastart), + 'groupnext' => $gropunext, + 'localsearch' => $bz ? 1 : 0 +) +); +$params = json_encode($return['param']); +require template('mobilefileselection/filelist'); +exit(); + + + diff --git a/dzz/system/mobilefileselection/group.php b/dzz/system/mobilefileselection/group.php new file mode 100644 index 0000000..fd6f327 --- /dev/null +++ b/dzz/system/mobilefileselection/group.php @@ -0,0 +1,64 @@ + 0 ? 'ASC' : "DESC"; + +switch ($disp) { + case 0: + $orderby = 'orgname'; + break; + case 1: + $orderby = 'dateline'; + break; + +} +$ordersql = ''; +if (is_array($orderby)) { + foreach ($orderby as $key => $value) { + $orderby[$key] = $value . ' ' . $order; + } + $ordersql = ' ORDER BY ' . implode(',', $orderby); +} elseif ($orderby) { + $ordersql = ' ORDER BY ' . $orderby . ' ' . $order; +} +$next = false; +$nextstart = $start + $limit; +$explorer_setting = get_resources_some_setting(); +$groups = array(); +//获取用户坐在群组id +$orgids = C::t('organization_user')->fetch_org_by_uid($uid, 1); +if (DB::result_first("select count(*) from %t where orgid in(%n) $ordersql ", array('organization', $orgids)) > $nextstart) { + $next = $nextstart; +} +if ($explorer_setting['grouponperm']) { + foreach (DB::fetch_all("select * from %t where orgid in(%n) $ordersql $limitsql", array('organization', $orgids)) as $orginfo) { + if ($orginfo['syatemon'] == 0) {//系统管理员关闭群组 + continue; + } elseif ($orginfo['syatemon'] == 1 && $orginfo['manageon'] == 0 && C::t('organization_admin')->chk_memberperm($orginfo['orgid'], $uid) == 0) {//管理员关闭群组,当前用户不具备管理员权限 + continue; + } + if (intval($orginfo['aid']) > 0) { + //群组图 + $orginfo['imgs'] = 'index.php?mod=io&op=thumbnail&width=45&height=45&path=' . dzzencode('attach::' . $orginfo['aid']); + } /*else { + $orginfo['imgs'] = avatar_group($v['orgid'], array($orginfo['orgid'] => array('aid' => $orginfo['aid'], 'orgname' => $orginfo['orgname']))); + }*/ + $contaions = C::t('resources')->get_contains_by_fid($orginfo['fid']); + $orginfo['filenum'] = $contaions['contain'][0]; + $orginfo['foldernum'] = $contaions['contain'][1]; + $groups[] = $orginfo; + } +} +require template('mobilefileselection/group'); \ No newline at end of file diff --git a/dzz/system/mobilefileselection/home.php b/dzz/system/mobilefileselection/home.php new file mode 100644 index 0000000..6eccac4 --- /dev/null +++ b/dzz/system/mobilefileselection/home.php @@ -0,0 +1,29 @@ +fetch_home_by_uid(); + $myexplorer['name'] = lang('explorer_user_root_dirname'); + $contains = C::t('resources')->get_contains_by_fid($myexplorer['fid']); + $myexplorer['filenum'] = $contains['contain'][0]; + $myexplorer['foldernum'] = $contains['contain'][1]; +} +if ($explorer_setting['orgonperm']) { + $orgs = C::t('organization')->fetch_all_orggroup($uid); + foreach ($orgs['org'] as $v) { + if(intval($v['aid'])){ + $v['icon']='index.php?mod=io&op=thumbnail&width=24&height=24&path=' . dzzencode('attach::' . $v['aid']); + } + $contains = C::t('resources')->get_contains_by_fid($v['fid']); + $v['filenum'] = $contains['contain'][0]; + $v['foldernum'] = $contains['contain'][1]; + $myorgs[] = $v; + } +} +if ($explorer_setting['grouponperm']) { + $mygroup = true; +} +include template('mobilefileselection/index_content'); \ No newline at end of file diff --git a/dzz/system/mobilefileselection/json.php b/dzz/system/mobilefileselection/json.php new file mode 100644 index 0000000..9c8edfe --- /dev/null +++ b/dzz/system/mobilefileselection/json.php @@ -0,0 +1,137 @@ +fetch_all(); +} + +$data['iconview'] = $iconview; + +$config = array(); +$config=C::t('user_field')->fetch($_G['uid']); +$applist=$config['applist']?explode(',',$config['applist']):array(); +if($applist_n =array_keys(C::t('app_market')->fetch_all_by_notdelete($_G['uid']))) { + $newappids = array(); + foreach ($applist_n as $appid) { + if (!in_array($appid, $applist)) { + $applist[] = $appid; + $newappids[] = $appid; + } + } + if ($newappids){ + C::t('app_user')->insert_by_uid($_G['uid'], $newappids); + C::t('user_field')->update($_G['uid'], array('applist' => implode(',', $applist))); + } +} +//应用数据 +$appdata=array(); +$appdata=C::t('app_market')->fetch_all_by_appid($applist); +//$arr['appdata']=microtime(true); +$applist_1=array(); +foreach($appdata as $value){ + if($value['isshow']<1) continue; + if($value['available']<1) continue; + if($value['system'] == 2) continue; + $applist_1[]=$value['appid']; +} + + +$data['applist']=array_values($applist_1); +//获取系统桌面设置信息 +$icosdata = array(); +$data['noticebanlist'] = $config['noticebanlist'] ? explode(',', $config['noticebanlist']) : array(); +//获取打开方式 +/*$data['extopen']['all'] = C::t('app_open')->fetch_all_ext(); +$data['extopen']['ext'] = C::t('app_open')->fetch_all_orderby_ext($_G['uid'], $data['extopen']['all']); +$data['extopen']['user'] = C::t('app_open_default')->fetch_all_by_uid($_G['uid']); +//获取用户的默认打开方式 +$data['extopen']['userdefault'] = C::t('app_open_default')->fetch_all_by_uid($_G['uid']); +//目录数据 +$folderdata = array(); +$data['cut']=array(); +//用户粘贴板数据 +$clipboardinfo = C::t('resources_clipboard')->fetch_by_uid($uid); +if($clipboardinfo){ + //复制类型1为复制,2为剪切 + $copttype = $clipboardinfo['copytype']; + $data['cut']['iscut'] = ($copttype == 1) ? 0:1; + + $files = explode(',',$clipboardinfo['files']); + foreach($files as $v){ + $resourcesdata = C::t('resources')->fetch_by_rid($v); + if($resourcesdata['type'] == 'folder'){ + $folderdata[$resourcesdata['fid']] = C::t('folder')->fetch_by_fid($resourcedata['oid']); + $icosdata[$v] = $resourcesdata; + }else{ + $icosdata[$v] = $resourcesdata; + } + } + $data['cut']['icos'] = $files; +}else{ + $data['cut']['icos']=array(); +}*/ + +$data['formhash'] = $_G['formhash']; + + +$data['sourcedata'] = array( + 'icos' => $icosdata ? $icosdata : array(), + 'folder' => $folderdata ? $folderdata : array(), + 'app' => $appdata?$appdata:array() +); +$space['attachextensions'] = $space['attachextensions'] ? explode(',', $space['attachextensions']) : array(); + +$data['myspace'] = $data['space'] = $space; +$thame = getThames(); +$data['thame'] = $thame['data']; +/*$infoPanelOpened = C::t('user_setting')->fetch_by_skey('infoPanelOpened'); +if (isset($infoPanelOpened)) { + $data['infoPanelOpened'] = ($infoPanelOpened) ? 1 : 0; +} else { + C::t('user_setting')->update_by_skey('infoPanelOpened',1); + $data['infoPanelOpened'] = 1; +}*/ +$data['mulitype'] = $mulitype; +$data['fileselectiontype'] = $type; +$data['callback_url'] = $callback; +if($exttype){ + $exttype = str_replace(array('"','|','$'),array('"','(',')'),$exttype); +} +$data['allowselecttype'] = json_decode($exttype); +$data['defaultfilename'] = isset($filename) ? $filename:''; +echo json_encode($data); +exit(); diff --git a/dzz/system/mobilefileselection/listtree.php b/dzz/system/mobilefileselection/listtree.php new file mode 100644 index 0000000..caea60f --- /dev/null +++ b/dzz/system/mobilefileselection/listtree.php @@ -0,0 +1,9 @@ +fetch($fid); +} +include template('mobilefileselection/search'); \ No newline at end of file diff --git a/dzz/system/mobilefileselection/searchfile.php b/dzz/system/mobilefileselection/searchfile.php new file mode 100644 index 0000000..9f72fec --- /dev/null +++ b/dzz/system/mobilefileselection/searchfile.php @@ -0,0 +1,171 @@ + 0 ? 'ASC' : "DESC"; + +$powerarr = perm_binPerm::getPowerArr(); + +switch ($disp) { + case 0: + $orderby = 'r.name'; + break; + case 1: + $orderby = 'r.size'; + break; + case 2: + $orderby = array('r.type', 'ext'); + break; + case 3: + $orderby = 'r.dateline'; + break; + +} +$ordersql = ''; +if (is_array($orderby)) { + foreach ($orderby as $key => $value) { + $orderby[$key] = $value . ' ' . $order; + } + $ordersql = ' ORDER BY ' . implode(',', $orderby); +} elseif ($orderby) { + $ordersql = ' ORDER BY ' . $orderby . ' ' . $order; +} +$wheresql = ' where 1'; +$param = array('resources', 'folder'); +if ($keyword && !preg_match('/^\s*$/', $keyword)) { + $kewordsarr = explode(',', $keyword); + $tids = C::t('tag')->fetch_tid_by_tagname($kewordsarr, 'explorer'); + $tagsql = ''; + if ($tids) { + $rids = C::t('resources_tag')->fetch_rid_by_tid($tids); + if (count($rids)) { + $tagsql = " r.rid in(%n)"; + $param[] = $rids; + } + + } + $keywordsqlarr = array(); + foreach ($kewordsarr as $v) { + $keywordsqlarr[] = " r.name like(%s) "; + $param[] = '%' . trim($v) . '%'; + } + if ($tagsql) { + $wheresql .= " and ($tagsql or (" . implode(' or ', $keywordsqlarr) . "))"; + } else { + $wheresql .= " and (" . implode(' or ', $keywordsqlarr) . ")"; + } +} +//类型筛选 +if ($exts) { + if($exts == 'folder'){ + $wheresql .= ' and r.type = %s'; + $param[] = 'folder'; + }else{ + $extarr = explode(',', $exts); + $wheresql .= ' and r.ext in(%n)'; + $param[] = $extarr; + } +} +$orgids = C::t('organization')->fetch_all_orgid();//获取所有有管理权限的部门 +$or = array(); +if (!$fid) { + //我的 + $or[] = "(r.gid=0 and r.uid=%d)"; + $param[] = $uid; + //我管理的群组或部门的文件 + if ($orgids['orgids_admin']) { + $or[] = "r.gid IN (%n)"; + $param[] = $orgids['orgids_admin']; + } + + if ($orgids['orgids_member']) { + $or[] = "(r.gid IN(%n) and ((f.perm_inherit & %d) OR (r.uid=%d and f.perm_inherit & %d)))"; + $param[] = $orgids['orgids_member']; + $param[] = $powerarr['read2']; + $param[] = $_G['uid']; + $param[] = $powerarr['read1']; + } + + +} else { + $folderinfo = C::t('folder')->fetch($fid); + if (($folderinfo['gid'] > 0 && C::t('organization_admin')->chk_memberperm($gid)) || !$folderinfo['gid']) {//如果具有管理员权限 + $wheresql .= ' and r.pfid = %d '; + $param[] = $fid; + + } else { + $wheresql .= ' and r.pfid = %d and ((f.perm_inherit & %d) OR (r.uid=%d and f.perm_inherit & %d))'; + $param[] = $fid; + $param[] = $powerarr['read2']; + $param[] = $_G['uid']; + $param[] = $powerarr['read1']; + } +} +if ($or && !$fid) $wheresql .= " and (" . implode(' OR ', $or) . ")"; +$data = array(); +$foldersids = $folderdata = array(); +if ($total = DB::result_first("SELECT COUNT(*) FROM %t r LEFT JOIN %t f ON r.pfid=f.fid $wheresql", $param) > $start) { + foreach (DB::fetch_all("SELECT r.rid FROM %t r LEFT JOIN %t f ON r.pfid=f.fid $wheresql $limitsql", $param) as $value) { + if ($arr = C::t('resources')->fetch_by_rid($value['rid'])) { + $folderids[$value['pfid']] = $arr['pfid']; + if ($arr['type'] == 'folder') { + $folderids[$arr['oid']] = $arr['oid']; + $arr['filenum'] = $arr['contaions']['contain'][0]; + $arr['foldernum'] = $arr['contaions']['contain'][1]; + } else { + $arr['monthdate'] = dgmdate($arr['dateline'], 'm-d'); + $arr['hourdate'] = dgmdate($arr['dateline'], 'H:i'); + } + if ($arr['type'] == 'image') { + $arr['img'] = DZZSCRIPT . '?mod=io&op=thumbnail&width=45&height=45&path=' . dzzencode('attach::' . $arr['aid']); + $arr['imgpath'] = DZZSCRIPT . '?mod=io&op=thumbnail&path=' . dzzencode('attach::' . $arr['aid']); + } + $data[$arr['rid']] = $arr; + } + } +} + +$disp = isset($_GET['disp']) ? intval($_GET['disp']) : intval($usersettings['disp']);//文件排序 +if (!isset($usersettings['iconview'])) $usersettings['iconview'] = 4; +$iconview = (isset($_GET['iconview']) ? intval($_GET['iconview']) : intval($usersettings['iconview']));//排列方式 +$next = false; +if (count($data) >= $perpage) { + $next = $page + 1; +} +$return = array( + 'total' => count($data) + $start, + 'param' => array( + 'disp' => $disp, + 'view' => $iconview, + 'page' => $next, + 'perpage' => $perpage, + 'bz' => $bz, + 'datatotal' => count($data) + $start, + 'asc' => $asc, + 'keyword' => $keyword, + 'fid' => $fid, + 'localsearch' => $bz ? 1 : 0, + 'exts'=>$exts + ), +); +$params = json_encode($return['param']); +require template('mobilefileselection/searchfile'); +exit(); \ No newline at end of file diff --git a/dzz/system/notification.php b/dzz/system/notification.php index a5bd590..c772768 100644 --- a/dzz/system/notification.php +++ b/dzz/system/notification.php @@ -100,9 +100,9 @@ if($filter=='new'){//列出所有新通知 }else{*/ include template('notification_list'); // } - exit(); + dexit(); } include template('notification'); -exit(); +dexit(); ?> \ No newline at end of file diff --git a/dzz/system/scripts/_hotkey.js b/dzz/system/scripts/_hotkey.js new file mode 100644 index 0000000..97debf1 --- /dev/null +++ b/dzz/system/scripts/_hotkey.js @@ -0,0 +1,120 @@ +/* + * @copyright Leyun internet Technology(Shanghai)Co.,Ltd + * @license http://www.dzzoffice.com/licenses/license.txt + * @package DzzOffice + * @link http://www.dzzoffice.com + * @author zyx(zyx@dzz.cc) + */ +_hotkey={}; +_hotkey.ctrl=0; +_hotkey.alt=0; +_hotkey.shift=0; +_hotkey.init=function(){ + _hotkey.ctrl=0; + _hotkey.alt=0; + _hotkey.shift=0; +} +jQuery(document).on('keydown',function(event){ + event=event?event:window.event; + var tag = event.srcElement ? event.srcElement :event.target; + if(/input|textarea/i.test(tag.tagName)){ + return true; + } + var e; + if (event.which !="") { e = event.which; } + else if (event.charCode != "") { e = event.charCode; } + else if (event.keyCode != "") { e = event.keyCode; } + switch(e){ + case 17: + _hotkey.ctrl=1; + break; + case 18: + _hotkey.alt=1; + break; + case 16: + _hotkey.shift=1; + break; + } + }); +jQuery(document).on('keyup',function(event){ + event=event?event:window.event; + var tag = event.srcElement ? event.srcElement :event.target; + if(/input|textarea/i.test(tag.tagName)){ + return true; + } + var e; + if (event.which !="") { e = event.which; } + else if (event.charCode != "") { e = event.charCode; } + else if (event.keyCode != "") { e = event.keyCode; } + switch(e){ + + case 17: + _hotkey.ctrl=0; + break; + case 18: + _hotkey.alt=0; + break; + case 16: + _hotkey.shift=0; + break; + /*case 67: //Alt+C + if(_hotkey.alt) _window.currentWindow('Close'); + //_hotkey.alt=0; + break; + case 77: //Alt+M + if(_hotkey.alt) _window.currentWindow('Max'); + _hotkey.alt=0; + break; + case 78://Alt+N + if(_hotkey.alt) _window.currentWindow('Min'); + _hotkey.alt=0; + break;*/ + /*case 81://Alt+shift+Q + if(_hotkey.alt && _hotkey.shift) _window.CloseAppwinAll(); + _hotkey.alt=0; + _hotkey.shift=0 + break;*/ + /*case 75: //Alt+K + if(_hotkey.alt) _login.showHotkey(); + //_hotkey.alt=0; + break;*/ + /*case 83://Alt+S + if(_hotkey.alt) jQuery('#taskbar_start').trigger('mousedown');; + //_hotkey.alt=0; + break;*/ + /*case 37://Ctrl + Alt + ← + if(_hotkey.ctrl && _hotkey.alt) {_layout.setPagePrev();} + break; + case 39://Ctrl + Alt + → + if(_hotkey.ctrl && _hotkey.alt) _layout.setPageNext(); + break; + + case 68: + //Ctrl + Alt + D + if(_hotkey.alt && _hotkey.ctrl) _window.showDesktop(); + + break; + case 145: + //Ctrl + Alt + ScrollLock + if(_hotkey.alt && _hotkey.ctrl) _login.showBackground(); + break;*/ + /*case 35: + //Ctrl + Alt + End + if(_hotkey.alt && _hotkey.ctrl) _login.LockDesktop(); + break;*/ + case 46:case 110: //delete + try{ + if(_explorer.selectall.icos.length>0){ + _filemanage.delIco(_config.selectall.icos[0]); + } + }catch(e){} + break; + + case 69://Ctrl + Alt + E + try{ + if(_hotkey.alt && _hotkey.ctrl) _header.loging_close(); + }catch(e){} + break; + } + + }); diff --git a/dzz/system/scripts/_perm.js b/dzz/system/scripts/_perm.js new file mode 100644 index 0000000..8d1bff4 --- /dev/null +++ b/dzz/system/scripts/_perm.js @@ -0,0 +1,214 @@ +/* + * @copyright Leyun internet Technology(Shanghai)Co.,Ltd + * @license http://www.dzzoffice.com/licenses/license.txt + * @package DzzOffice + * @link http://www.dzzoffice.com + * @author zyx(zyx@dzz.cc) + */ + +_explorer.isPower=function(power,action){//判断有无权限; + var actionArr={ 'flag' : 1, //标志位为1表示权限设置,否则表示未设置,继承上级; + 'read1' : 2, //读取自己的文件 + 'read2' : 4, //读取所有文件 + 'delete1' : 8, //删除自己的文件 + 'delete2' : 16, //删除所有文件 + 'edit1' : 32, //编辑自己的文件 + 'edit2' : 64, //编辑所有文件 + 'download1' : 128, //下载自己的文件 + 'download2' : 256, //下载所有文件 + 'copy1' : 512, //拷贝自己的文件 + 'copy2' : 1024, //拷贝所有文件 + 'upload' : 2048, //上传 + // 'newtype' : 4096, //新建其他类型文件(除文件夹、网址、dzz文档、视频、快捷方式以外) + 'folder' : 8192, //新建文件夹 + // 'link' : 16384, //新建网址 + // 'dzzdoc' : 32768, //新建dzz文档 + // 'video' : 65536, //新建视频 + // 'shortcut' : 131072, //快捷方式 + 'share' : 262144, //分享 + }; + if(parseInt(actionArr[action])<1) return false; + //权限比较时,进行与操作,得到0的话,表示没有权限 + //console.log([action,actionArr[action],power,(power & parseInt(actionArr[action]))]); + if( (power & parseInt(actionArr[action])) >0 ) return true; + return false; +} +_explorer.FolderSPower=function(power,action){//判断有无权限; + var actionArr={ 'delete' : 1, + 'folder' : 2, + 'link' : 4, + 'upload' : 8, + 'document': 16, + 'dzzdoc' : 32, + 'app' : 64, + 'widget' : 128, + 'user' : 256, + 'shortcut': 512, + 'discuss' :1024, + 'download' :2048 + }; + if(action=='copy') action='delete'; + if(parseInt(actionArr[action])<1) return true; + //权限比较时,进行与操作,得到0的话,表示没有权限 + if( (power & parseInt(actionArr[action])) == parseInt(actionArr[action]) ) return false; + return true; +} +_explorer.FileSPower=function(power,action){//判断有无权限; + + var actionArr={ 'delete' : 1, + 'edit' : 2, + 'rename' : 4, + 'move' : 8, + 'download' : 16, + 'share' : 32, + 'widget' : 64, + 'wallpaper' : 128, + 'cut' : 256, + 'shortcut' : 512 + }; + + if(action=='copy') action='delete'; + if(parseInt(actionArr[action])<1) return true; + //权限比较时,进行与操作,得到0的话,表示没有权限 + if( (power & parseInt(actionArr[action])) == parseInt(actionArr[action]) ) return false; + return true; +} + +_explorer.getFidByContainer=function(container){ + if(container.indexOf('icosContainer_body_')!==-1){ + return _explorer.space.typefid['desktop']; + }else if(container=='taskbar_dock'){ + return _explorer.space.typefid['dock']; + }else if(container=='_dock'){ + return _explorer.space.typefid['dock']; + }else if(container.indexOf('icosContainer_folder_')!==-1){ + return container.replace('icosContainer_folder_',''); + } +} +_explorer.getContainerByFid=function(fid){ + var type=''; + for(var i in _explorer.space.typefid){ + if(fid==_explorer.space.typefid[i]) type=i; + } + var container=''; + if(type=='dock') container='_dock'; + else if(type=='desktop') container='icosContainer_body_'+_layout.fid; + else{ + container='icosContainer_folder_'+fid; + } + return container; +} + +_explorer.Permission_Container=function(action,fid){ + //预处理些权限 + //首先判断超级权限 + if(!_explorer.sourcedata.folder[fid]) return false; + var perm=_explorer.sourcedata.folder[fid].perm; + var sperm=_explorer.sourcedata.folder[fid].fsperm; + var gid=_explorer.sourcedata.folder[fid].gid; + //判断超级权限 + if(!_explorer.FolderSPower(sperm,action)) return false; + if(_explorer.space.uid<1) return false;//游客没有权限; + /*if(_explorer.space.self>1){ + return true;//系统管理员有权限 + }*/ + if(gid>0){ + if(action=='admin'){ + if(_explorer.space.self>1 || _explorer.sourcedata.folder[fid].ismoderator>0) return true; + else return false; + }else if(action=='rename'){ + action='delete'; + }else if(action=='multiselect'){ + action='copy'; + }else if(jQuery.inArray(action,['link','dzzdoc','newtype'])>-1 ){ + action='upload'; + } + if(jQuery.inArray(action,['read','delete','edit','download','copy'])>-1){ + if(_explorer.myuid==_explorer.sourcedata.folder[fid].uid) action+='1'; + else action+='2'; + } + return _explorer.isPower(perm,action); + }else{ + if(action=='admin' || action=='multiselect'){ + //是自己的目录有管理权限 + if(_explorer.space.uid==_explorer.sourcedata.folder[fid].uid) return true; + //云端的资源默认都有管理权限; + if(_explorer.sourcedata.folder[fid].bz) return true; + } + if(action=='rename'){ + action='delete'; + }else if(jQuery.inArray(action,['link','dzzdoc','newtype'])>-1 ){ + action='upload'; + } + + if(jQuery.inArray(action,['read','delete','edit','download','copy'])>-1){ + if(_explorer.myuid==_explorer.sourcedata.folder[fid].uid) action+='1'; + else action+='2'; + } + + return _explorer.isPower(perm,action); + + } + return false; +} + +_explorer.Permission=function(action,data){ + if(_explorer.myuid<1) return false; //游客无权限; + //预处理些权限 + if(data.isdelete>0) return true; //回收站有权限; + var fid=data.pfid; + var sperm=data.sperm; + if(action=='download'){ //不是附件类型的不能下载 + if(data.type!='document' && data.type!='attach' && data.type!='image' && data.type!='folder') return false; + }else if(action=='copy'){ //回收站内不能复制 + if(data.flag=='recycle') return false; + if(data.type=='app' || data.type=='storage' || data.type=='pan' || data.type=='ftp') return false; + + }else if(action=='paste'){ //没有复制或剪切,没法粘帖 + if(_explorer.cut.icos.length<1) return false; + action=_explorer.sourcedata.icos[_explorer.cut.icos[0]].type; + }else if(action=='chmod'){ //修改权限 + if(data.bz && data.bz.split(':')[0]=='ftp') return true; + else return false; + }else if(action=='rename'){ //重命名 + if(fid==_explorer.space.typefid['dock']) return false; + if(data.type=='folder' && data.bz && (data.bz.split(':')[0]=='ALIOSS' || data.bz.split(':')[0]=='qiniu')) return false; + action='delete'; + + }else if(action=='multiselect'){ + action='copy'; + }else if(action=='drag'){ + if(data.gid>0) action='copy'; + else action='admin'; + } + if(!_explorer.FileSPower(sperm,action)) return false; + if(jQuery.inArray(action,['read','delete','edit','download','copy'])>-1){ + if(_explorer.myuid==data.uid) action+='1'; + else action+='2'; + } + return _explorer.Permission_Container(action,fid); + +}; + +//判断容器是否有写入此类型文件的权限 +_explorer.Permission_Container_write=function(fid,type){ + if(!_explorer.sourcedata.folder[fid]) return false; + var sperm=_explorer.sourcedata.folder[fid].fsperm; + var gid=_explorer.sourcedata.folder[fid].gid; + var action=type; + if(jQuery.inArray(type,['folder','link','dzzdoc','shortcut','video'])<0) action='newtype'; + //判断超级权限 + if(!_explorer.FolderSPower(sperm,action)) return false; + if(_explorer.myuid<1) return false;//游客没有权限; + if(gid>0){ + //是机构管理员有权权限; + if(_explorer.space.self>1 || _explorer.sourcedata.folder[fid].ismoderator>0) return true; + }else{ + //是自己的目录有管理权限 + if(_explorer.myuid==_explorer.sourcedata.folder[fid].uid) return true; + //云端的资源默认都有管理权限; + if(_explorer.sourcedata.folder[fid].bz) return true; + } + + return _explorer.Permission_Container(action,fid); +} diff --git a/dzz/system/scripts/_select.js b/dzz/system/scripts/_select.js new file mode 100644 index 0000000..a096ab7 --- /dev/null +++ b/dzz/system/scripts/_select.js @@ -0,0 +1,428 @@ +/* + * @copyright Leyun internet Technology(Shanghai)Co.,Ltd + * @license http://www.dzzoffice.com/licenses/license.txt + * @package DzzOffice + * @link http://www.dzzoffice.com + * @author zyx(zyx@dzz.cc) + */ +function _select(container) +{ + this.id=this.name=container; + this.string="_select.icos."+this.id; + this.board=document.getElementById(container); + _select.icos[this.id]=this; +}; +_select.delay=500; +_select.width=120; +_select.height=120; +_select.icos={}; + +_select.onmousemove=null; +_select.onmouseup=null; +_select.tach=null; +_select.onselectstart=1; +_select.init=function(container){ + var obj= new _select(container); + jQuery(obj.board).on('mousedown',function(e){ + + e=e?e:window.event; + var tag = e.srcElement ? e.srcElement :e.target; + + if(/input|textarea/i.test(tag.tagName)){ + return true; + } + + if(e.button==2) return true; + dfire('mousedown');//dfire('touchstart'); + obj.Mousedown(e?e:window.event); + return true; + }); + + jQuery(obj.board).on('mouseup',function(e){ + e=e?e:window.event; + var tag = e.srcElement ? e.srcElement :e.target; + if(/input|textarea/i.test(tag.tagName)){ + return true; + } + dfire('mouseup'); + //dfire('touchend'); + obj.Mouseup(e?e:window.event); + + return true; + }); + + + return obj; +}; +_select.prototype.DetachEvent=function(e) +{ + if(!_select.tach) return; + //document.body.style.cursor="url('dzz/images/cur/aero_arrow.cur'),auto"; + document.onmousemove=_select.onmousemove; + document.onmouseup=_select.onmouseup; + document.onselectstart=_select.onselectstart; + try{ + if(this.board.releaseCapture) this.board.releaseCapture(); + }catch(e){}; + _select.tach=0; + _select.finishblank=0; + +}; +_select.prototype.AttachEvent=function(e) +{ + if(_select.tach) return + _select.onmousemove=document.onmousemove; + _select.onmouseup=document.onmouseup; + _select.onselectstart=document.onselectstart; + try{ + document.onselectstart=function(){return false;} + if(e.preventDefault) e.preventDefault(); + else{ + if(this.board.setCapture) this.board.setCapture(); + } + }catch(e){}; + _select.tach=1; +}; +_select.prototype.Duplicate=function() +{ + this.copy=document.createElement('div'); + + document.body.appendChild(this.copy); + this.copy.style.cssText="position:absolute;left:0px;top:0px;width:0px;height:0px;filter:Alpha(opacity=50);opacity:0.5;z-index:10002;overflow:hidden;background:#000;border:1px solid #000;"; + //jQuery(this.copy).find('#text'+this.id).html(' '); +}; +_select.prototype.Mousedown=function(e) +{ +// console.log(_explorer.type); + this.mousedowndoing=false; + if(e.type=='touchstart'){ + var XX=e.touches[0].clientX; + var YY=e.touches[0].clientY; + }else{ + var XX=e.clientX; + var YY=e.clientY; + } + + _select.oldxx=XX; + _select.oldyy=YY; + this.tl=XX; + this.tt=YY; + this.oldx=XX; + this.oldy=YY; + //alert('down'); + var self=this; + if(!_select.tach) this.AttachEvent(e); + + if(e.type=='touchstart'){ + jQuery(this.board).on('touchmove',function(e){self.Move(e);return false}); + }else{ + document.onmousemove=function(e){self.Move(e?e:window.event);return false}; + } + + //this.mousedownTimer=setTimeout(function(){self.PreMove(XX,YY);},200); +}; + +_select.prototype.Mouseup=function(e) +{ + if(_select.tach) this.DetachEvent(e); + if(!this.mousedowndoing) { + }else this.Moved(e); +}; +_select.prototype.PreMove=function(e) +{ + jQuery('#_blank').empty().show(); + if (this.move=="no") return; + this.Duplicate(); + + var self=this; + this.mousedowndoing=true; + var p=jQuery(this.board).offset(); + + + this.copy.style.left=this.tl+'px'; + this.copy.style.top=this.tt+'px'; + + //清空数据 + if(_hotkey.ctrl>0 && _selectfile.selectall.container==this.id){ + + }else{ + if(_selectfile.selectall.container) jQuery('#'+_selectfile.selectall.container).find('.Icoblock').removeClass('Icoselected'); + _selectfile.selectall.container=this.id; + _selectfile.selectall.icos=[]; + _selectfile.selectall.position={}; + } + //计算此容器内的所有ico的绝对位置,并且存入_selectfile.selectall.position中; + jQuery(this.board).find('.Icoblock').each(function(){ + var el=jQuery(this); + var p=el.offset(); + var icoid=el.attr('rid'); + if(icoid){ + _selectfile.selectall.position[icoid]={icoid:icoid,left:p.left,top:p.top,width:el.width(),height:el.height()}; + } + }); + if(e.type=='touchmove'){ + jQuery(this.board).on('touchend',function(e){self.Moved(e);return true}); + }else{ + document.onmouseup=function(e){self.Moved(e?e:window.event);return false;}; + } +}; +_select.prototype.Move=function(e) +{ + if(e.type==='touchmove'){ + var XX=e.touches[0].clientX; + var YY=e.touches[0].clientY; + }else{ + var XX=e.clientX; + var YY=e.clientY; + } + if(!this.mousedowndoing && (Math.abs(this.oldx-XX)>5 || Math.abs(this.oldy-YY)>5)){ + this.PreMove(e); + } + if(!this.mousedowndoing) return; + var flag=0; + if(XX-this.oldx>0){ + this.copy.style.width=(XX-this.oldx)+"px"; + }else{ + this.copy.style.width=Math.abs(XX-this.oldx)+"px"; + this.copy.style.left=this.tl+(XX-this.oldx)+"px"; + } + if(YY-this.oldy>0){ + this.copy.style.height=(YY-this.oldy)+"px"; + }else{ + this.copy.style.height=Math.abs(YY-this.oldy)+"px"; + this.copy.style.top=this.tt+(YY-this.oldy)+"px"; + } + if(!BROWSER.ie){ + //if(Math.abs(_select.oldxx-XX)>20 || Math.abs(_select.oldyy-YY)>20){ + if(XX>this.oldx && YY > this.oldy){ + if(Math.abs(XX-_select.oldxx)>20 || Math.abs(YY-_select.oldyy)>20){ + _select.oldxx=XX; + _select.oldyy=YY; + this.setSelected(true); + } + }else{ + if(Math.abs(XX-_select.oldxx)>20 || Math.abs(YY-_select.oldyy)>20){ + _select.oldxx=XX; + _select.oldyy=YY; + this.setSelected(); + } + } + } +}; +_select.prototype.Moved=function(e) +{ + var self=this; + jQuery('#_blank').hide(); + if(_select.tach) this.DetachEvent(e); + if(e.type=='touchend'){ + var XX=e.changedTouches[0].clientX; + var YY=e.changedTouches[0].clientY; + }else{ + var XX=e.clientX; + var YY=e.clientY; + } + if(BROWSER.ie){ + if(XX>this.oldx && YY > this.oldy){ + this.setSelected(true); + }else{ + this.setSelected(); + } + } + jQuery(this.copy).remove(); + +}; +_select.prototype.setSelected=function(flag){ + _select.sum++; + var p=jQuery(this.copy).offset(); + var icos=[]; + var copydata={left:p.left,top:p.top,width:jQuery(this.copy).width(),height:jQuery(this.copy).height()}; + for(var icoid in _selectfile.selectall.position){ + var data=_selectfile.selectall.position[icoid]; + if(_select.checkInArea(copydata,data,flag)){ + _select.SelectedStyle(this.id,icoid,true,true); + }else if(_hotkey.ctrl<1){ + _select.SelectedStyle(this.id,icoid,false,true); + } + } +}; +_select.checkInArea=function(copydata,data,flag){ + var rect={minx:0,miny:0,maxx:0,maxy:0} + rect.minx=Math.max(data.left,copydata.left); + rect.miny =Math.max(data.top,copydata.top) ; + rect.maxx =Math.min(data.left+data.width,copydata.left+copydata.width) ; + rect.maxy =Math.min(data.top+data.height,copydata.top+copydata.height) ; + if(!flag){ + if(rect.minx>rect.maxx || rect.miny>rect.maxy){ + return false; + }else{ + return true + } + }else{ + if(rect.minx>rect.maxx || rect.miny>rect.maxy){ + return false; + }else{ + return true; + var area=(rect.maxx-rect.minx)*(rect.maxy-rect.miny); + var dataarea=data.width*data.height; + if(dataarea==area) return true; + else return false; + } + } +}; +_select.SelectedStyle=function(container,rid,flag,multi){ + var icos=_selectfile.selectall.icos||[]; + var fidarr=container.split('-'); + var fid=parseInt(fidarr[2]); + var filemanageid=container.replace('filemanage-','');//'f-'+fidarr[2]; + if(flag){ + + } + var el=jQuery('#'+container).find('.Icoblock[rid='+rid+']'); + if(flag){ + if(_selectfile.selectall.container=='') _selectfile.selectall.container=container; + if(multi && _selectfile.selectall.container==container){ + if(jQuery.inArray(rid,_selectfile.selectall.icos)<0){ + _selectfile.selectall.icos.push(rid); + } + }else{ + jQuery('#'+_selectfile.selectall.container).find('.Icoblock').removeClass('Icoselected'); + _selectfile.selectall.container=container; + _selectfile.selectall.icos=[rid]; + _selectfile.selectall.position={}; + } + el.addClass('Icoselected'); + + }else{ + var arr=[]; + if(_selectfile.selectall.container==container){ + for(var i in icos){ + if(icos[i]!=rid) arr.push(icos[i]); + } + } + _selectfile.selectall.icos=arr; + el.removeClass('Icoselected'); + } + + if(_selectfile.cons[filemanageid]) _selectfile.cons[filemanageid].selectInfo(); + if(_explorer.type){ + _selectfile.changefileName(rid); + } +}; +_select.Cut=function(icoid){ + //处理原对象 去除样式 + if(_config.cut.iscut>0 && _config.cut.icos.length>0){ + for(var i in _config.cut.icos){ + jQuery('.Icoblock[icoid='+_config.cut.icos[i]+']').removeClass('iscut'); + } + } + //添加新对象到剪切板,并且设置剪切样式 + _config.cut.iscut=1; + if(jQuery.inArray(icoid,_config.selectall.icos)>-1){ + _config.cut.icos=_config.selectall.icos; + }else{ + _config.cut.icos=[icoid]; + } + for(var i in _config.cut.icos){ + jQuery('.Icoblock[rid='+_config.cut.icos[i]+']').addClass('iscut'); + } +} +_select.Copy=function(icoid){ + //处理原对象 去除样式 + if(_config.cut.iscut>0 && _config.cut.icos.length>0){ + for(var i in _config.cut.icos){ + jQuery('.Icoblock[icoid='+_config.cut.icos[i]+']').removeClass('iscut'); + } + } + //添加新对象到剪切板,并且设置剪切样式 + _config.cut.iscut=0; + if(jQuery.inArray(icoid,_config.selectall.icos)>-1){ + _config.cut.icos=_config.selectall.icos; + }else{ + _config.cut.icos=[icoid]; + } + +} +_select.Paste=function(pfid,XX,YY){ + if(_config.cut.icos.length<1) return ;//剪贴板无数据,返回; + //判断默认应用不能更换容器 + /*for(var i=0;i<_config.cut.icos.length;i++){ + if(_config.cut.iscut>0 && !_config.Permission('delete',_config.sourcedata.icos[_config.cut.icos[i]])){ + _config.cut.icos.splice(i,1); + jQuery('.Icoblock[icoid='+_config.cut.icos[i]+']').removeClass('iscut'); + //showPrompt(null,'',_lang.default_app_not_move,1000); + } + }*/ + + //判断容器是否接受此类图标; + /*if(!_config.Permission_Container(_config.sourcedata.icos[_config.cut.icos[0]].type,pfid)){ + showPrompt(null,'',_lang.paste.paste_in_here_forbidden,1000); + return ; + }*/ + //获得目标路径的tbz + var tbz=_config.sourcedata.folder[pfid].bz||''; + if(tbz){ + var path=encodeURIComponent(_config.sourcedata.folder[pfid].path); + }else{ + var path=pfid; + } + + //组织data + if(_config.sourcedata.icos[_config.cut.icos[0]].bz && _config.sourcedata.icos[_config.cut.icos[0]].bz!=''){ + var paths=[]; + for(var i=0;i<_config.cut.icos.length;i++){ + paths.push((_config.sourcedata.icos[_config.cut.icos[i]].dpath)); + } + + var data={"obz":_config.sourcedata.icos[_config.cut.icos[0]].bz,"tbz":tbz,"sourcetype":"icoid","icoid":paths.join(','),"ticoid":0,"container":'icosContainer_folder_'+path,iscut:_config.cut.iscut>0?1:2}; + }else{ + var paths=[]; + for(var i=0;i<_config.cut.icos.length;i++){ + paths.push((_config.sourcedata.icos[_config.cut.icos[i]].dpath)); + } + var data={"obz":'',"tbz":tbz,"sourcetype":"icoid","icoid":paths.join(','),"ticoid":0,"container":'icosContainer_folder_'+path,iscut:_config.cut.iscut>0?1:2}; + } + var container=_config.getContainerByFid(pfid); + + var progress='

      ' + //alert(_config.saveurl+'&do=move&gid='+_config.gid+'&'+jQuery.param(data)); + showmessage('

      '+__lang.file_drag_processing+'

      '+progress,'success',0,1,'right-bottom'); + jQuery.getJSON(_config.saveurl+'&do=move&'+jQuery.param(data),function(json){ + if(json.msg=='success'){ + _config.cut.icos=[]; + _config.cut.successicos=[]; + _config.cut.osuccessicos=[]; + + for(var ico in json.successicos){ + _config.cut.successicos.push(json.successicos[ico]); + _config.cut.osuccessicos.push(ico); + + } + if(json.iscopy>0){ + showmessage(__lang.file_copy_success,'success',3000,1,'right-bottom') + + }else{ + showmessage(__lang.crop_files_success,'success',3000,1,'right-bottom') + _select.remove(_config.cut.osuccessicos); + + } + for(var i in json.icoarr){ + _config.sourcedata.icos[json.icoarr[i].icoid]=json.icoarr[i]; + } + for(var i in json.folderarr){ + _config.sourcedata.folder[json.folderarr[i].fid]=json.folderarr[i]; + } + _ico.appendIcoids(_config.cut.successicos); + if(json.error){ + showmessage(__lang.operate_files_error,'error',3000,1,'right-bottom'); + } + + }else{ + showmessage(__lang.operate_files_error,'error',3000,1,'right-bottom'); + } + }); +}; +_select.remove=function(icos){//移除原来的icoid + for(var i=0;i').appendTo(document.body); + } else { + var el = jQuery(document.getElementById('right_contextmenu')); + } + //如果是系统桌面,且用户不是管理员则不出现右键菜单 + rid = rid + ''; + var html = document.getElementById('right_ico').innerHTML; + html = html.replace(/\{XX\}/g, x); + html = html.replace(/\{YY\}/g, y); + html = html.replace(/\{rid\}/g, rid); + if (_selectfile.selectall.icos.length == 1 && obj.type == 'folder') {//单选中目录时,粘贴到此目录内部 + html = html.replace(/\{fid\}/g, obj.fid); + } else { + html = html.replace(/\{fid\}/g, obj.pfid); + } + el.html(html); + if (obj.type == 'shortcut' || obj.type == 'storage' || obj.type == 'pan' || _explorer.myuid < 1) { + el.find('.shortcut').remove(); + } + //判断copy + if (!_explorer.Permission('copy', obj)) { + el.find('.copy').remove(); + } + //判断粘贴 + if (!_explorer.Permission('upload', obj) || _explorer.cut.icos.length < 1 || _selectfile.fid < 1) { + el.find('.paste').remove(); + } + + //分享权限 + if (!_explorer.Permission('share', obj)) { + el.find('.share').remove(); + } + + //重命名权限 + if (!_explorer.Permission('rename', obj)) { + el.find('.rename').remove(); + } + + //下载权限 + if (!_explorer.Permission('download', obj)) { + el.find('.download').remove(); + el.find('.downpackage').remove(); + } + //ftp的chmod权限 + if (!_explorer.Permission('chmod', obj)) { + el.find('.chmod').remove(); + } + //删除权限 + if (!_explorer.Permission('delete', obj)) { + el.find('.cut').remove(); + el.find('.delete').remove(); + } + //不允许删除的情况 + if (obj.notdelete > 0 && obj.type == 'app') { + el.find('.delete').remove(); + el.find('.cut').remove(); + el.find('.copy').remove(); + } + + + //多选时的情况 + var collects = 0; + if (_selectfile.selectall.icos.length > 1 && jQuery.inArray(rid, _selectfile.selectall.icos) > -1) { + if(obj.isdelete == 1){ + el.find('.menu-item:not(.recover,.finallydelete)').remove(); + }else{ + el.find('.menu-item:not(.delete,.cut,.copy,.restore,.downpackage,.property,.collect,.paste,.share,.cancleshare)').remove(); + } + var pd = 1; + for (var i = 0; i < _selectfile.selectall.icos.length; i++) { + var ico = _explorer.sourcedata.icos[_selectfile.selectall.icos[i]]; + if (ico.collect) collects += 1; + if (!_explorer.Permission('download', ico)) { + pd = 0; + break; + } + } + if (!pd) { + el.find('.downpackage').remove(); + } + el.find('.download').remove(); + if (collects == _selectfile.selectall.icos.length) {//区别是已收藏时,菜单显示取消收藏 + el.find('.collect .menu-text').html('取消收藏'); + } + } else { + if (obj.collect) el.find('.collect .menu-text').html('取消收藏'); + el.find('.downpackage').remove(); + } + + + if (obj.isdelete == 1) { + el.find('.menu-item:not(.recover,.finallydelete)').remove(); + } else { + el.find('.finallydelete').remove(); + el.find('.recover').remove(); + } + if(_selectfile.winid.indexOf('collect') != -1){ + el.find('.cut').remove(); + el.find('.copy').remove(); + el.find('.paste').remove(); + } + //分享处理 + if(_selectfile.winid.indexOf('share') != -1){ + el.find('.menu-item:not(.cancleshare,.editshare)').remove(); + }else{ + el.find('.cancleshare,.editshare').remove(); + } + //如果在收藏,搜索和最近使用页面去掉删去和剪切和重命名 + if(_selectfile.winid.indexOf('collect') != -1 || _selectfile.winid.indexOf('recent') != -1 || _selectfile.winid.indexOf('search') != -1){ + el.find('.cut,.delete,.rename').remove(); + } + if (!el.find('.menu-item').length) { + el.hide(); + return; + } + //判断打开方式 + + var subdata = getExtOpen(obj.type == 'shortcut' ? obj.tdata : obj); + if (subdata === true) { + el.find('.openwith').remove(); + } else if (subdata === false) { + el.find('.openwith').remove(); + el.find('.open').remove(); + } else if (subdata.length == 1) { + el.find('.openwith').remove(); + } else if (subdata.length > 1) { + var html = '' + __lang.method_open + ''; + + html += ''; + el.find('.openwith').html(html); + } else { + el.find('.openwith').remove(); + } + + + //去除多余的分割线 + el.find('.menu-sep').each(function () { + if (!jQuery(this).next().first().hasClass('menu-item') || !jQuery(this).prev().first().hasClass('menu-item')) jQuery(this).remove(); + }); + + var Max_x = document.documentElement.clientWidth; + var Max_y = document.documentElement.clientHeight; + el.css({'z-index': _contextmenu.zIndex + 1}); + el.show(); + + el.find('>div').each(function () { + var item = jQuery(this); + var subitem = item.find('.menu'); + if (subitem.length) { + var shadow = item.find('.menu-shadow'); + item.on('mouseover', function () { + if (_contextmenu.ppp) _contextmenu.ppp.hide(); + if (_contextmenu.kkk) _contextmenu.kkk.hide(); + if (_contextmenu.last) _contextmenu.last.removeClass('menu-active'); + _contextmenu.kkk = shadow; + _contextmenu.last = item; + _contextmenu.ppp = subitem; + item.addClass('menu-active'); + var temp = item.find('.menu'); + var subx = el.width() - 1; + suby = 0; + if (x + el.width() * 2 > Max_x) subx = subx - temp.width() - el.width() - 6; + if (y + item.position().top + temp.height() > Max_y) suby = suby - temp.height() + item.height() - 5; + temp.css({left: subx, top: suby, 'z-index': _contextmenu.zIndex + 2, display: 'block'}); + shadow.css({ + display: "block", + zIndex: _contextmenu.zIndex + 1, + left: subx, + top: suby, + width: temp.outerWidth(), + height: temp.outerHeight() + }); + subitem.find('.menu-item').on('mouseover', function () { + jQuery(this).addClass('menu-active'); + }); + subitem.find('.menu-item').on('mouseout', function () { + jQuery(this).removeClass('menu-active'); + return false; + }); + + return false; + }); + item.on('mouseout', function () { + item.removeClass('menu-active'); + shadow.hide(); + subitem.hide();//alert('dddddd'); + return false; + }); + + } else { + item.on('mouseover', function () { + if (_contextmenu.last) _contextmenu.last.removeClass('menu-active'); + if (_contextmenu.ppp) _contextmenu.ppp.hide(); + if (_contextmenu.kkk) _contextmenu.kkk.hide(); + jQuery(this).addClass('menu-active'); + return false; + }); + item.on('mouseout', function () { + jQuery(this).removeClass('menu-active'); + }); + } + }); + //alert(el.width()+'===='+el.height()); + if (x + el.width() > Max_x) x = x - el.width(); + if (y + el.height() > Max_y) y = y - el.height(); + el.css({left: x, top: y}); + + jQuery(document).on('mousedown.right_contextmenu', function (e) { + e = e ? e : window.event; + var obj = e.srcElement ? e.srcElement : e.target; + if (jQuery(obj).closest('#right_contextmenu').length < 1) { + el.hide(); + el.empty(); + jQuery(document).off('.right_contextmenu'); + _contextmenu.kkk = null; + _contextmenu.ppp = null; + _contextmenu.last = null; + } + }); +}; +_contextmenu.right_body = function (e, fid) { + e = e ? e : window.event; + var obj = e.srcElement ? e.srcElement : e.target; + if (/input|textarea/i.test(obj.tagName)) { + return true; + } + var x = e.clientX; + var y = e.clientY; + var html = document.getElementById('right_body').innerHTML; + html = html.replace(/\{fid\}/g, fid); + html = html.replace(/\{filemanageid\}/g, _selectfile.winid); + if (!document.getElementById('right_contextmenu')) { + var el = jQuery('').appendTo(document.body); + } else { + var el = jQuery(document.getElementById('right_contextmenu')); + } + el.html(html); + var filemanage = _selectfile.cons[_selectfile.winid]; + //设置当前容器的相关菜单选项的图标 + el.find('span.menu-icon-iconview[view=' + filemanage.view + ']').removeClass('dzz-check-box-outline-blank').addClass('dzz-check-box'); + //el.find('span.menu-icon-disp[disp='+filemanage.disp+']').removeClass('dzz-check-box-outline-blank').addClass('dzz-check-box'); + //设置排序 + el.find('.menu-icon-disp').each(function () { + if (jQuery(this).attr('disp') == filemanage.disp) { + jQuery(this).removeClass('dzz-check-box-outline-blank').addClass('dzz-check-box'); + jQuery(this).next().find('.caret').removeClass('asc').removeClass('desc').addClass(filemanage.asc > 0 ? 'asc' : 'desc'); + } else { + jQuery(this).addClass('dzz-check-box-outline-blank').removeClass('dzz-check-box'); + jQuery(this).next().find('.caret').removeClass('asc').removeClass('desc'); + } + }); + if (!fid) { + el.find('.property').remove(); + el.find('.paste').remove(); + if(_selectfile.winid != 'recycle-list'){ + el.find('.recoverall').remove(); + el.find('.deleteall').remove(); + }else{ + el.find('.sort .disp2').remove(); + el.find('.sort .disp3').remove(); + } + }else{ + el.find('.recoverall').remove(); + el.find('.deleteall').remove(); + } + if (!_explorer.Permission_Container('folder', fid)) { + el.find('.newfolder').remove(); + } + if (!_explorer.Permission_Container('link', fid)) { + el.find('.newlink').remove(); + } + if (!_explorer.Permission_Container('dzzdoc', fid)) { + el.find('.newdzzdoc').remove(); + } + if (!_explorer.Permission_Container('upload', fid)) { + el.find('.newdzzdoc').remove(); + } + if (!_explorer.Permission_Container('newtype', fid)) { + el.find('.newtext').remove(); + el.find('.newdoc').remove(); + el.find('.newexcel').remove(); + el.find('.newpowerpoint').remove(); + } + if (el.find('.create .menu-item').length < 1) { + el.find('.create').remove(); + } + if (_explorer.cut.icos.length < 1) el.find('.paste').remove(); + + if (_explorer.Permission_Container('upload', fid)) { + + if (BROWSER.ie) { + jQuery('').appendTo(el.find('.upload')); + fileupload(jQuery('#right_uploadfile_' + fid)); + + jQuery('').appendTo(el.find('.uploadfolder')); + fileupload(jQuery('#right_uploadfolder_' + fid)); + + } else { + console.log(el.find('.upload')); + el.find('.upload').get(0).onclick = function () { + jQuery('.js-upload-file input').trigger('click'); + console.log(jQuery('.js-upload-file input')); + console.log('aaaa'); + el.hide(); + } + el.find('.uploadfolder').get(0).onclick = function () { + jQuery('.js-upload-folder input').trigger('click'); + el.hide(); + } + } + } else { + el.find('.upload').remove(); + el.find('.uploadfolder').remove(); + } + //设置默认桌面 + + //检测新建和上传是否都没有 + if (el.find('.create .menu>.menu-item').length < 1) { + el.find('.create').remove(); + } + if(_selectfile.winid == 'share-list'){ + el.find('.menu-item').remove(); + } + if (el.find('.menu-item').length < 1) { + el.hide(); + return; + } + el.find('.menu-sep').each(function () { + if (!jQuery(this).next().first().hasClass('menu-item') || !jQuery(this).prev().first().hasClass('menu-item')) jQuery(this).remove(); + }); + + var Max_x = document.documentElement.clientWidth; + var Max_y = document.documentElement.clientHeight; + el.css({'z-index': _contextmenu.zIndex + 1}); + el.show(); + + el.find('>div').each(function () { + var item = jQuery(this); + var subitem = item.find('.menu'); + if (subitem.length) { + var shadow = item.find('.menu-shadow'); + item.on('mouseover', function () { + if (_contextmenu.ppp) _contextmenu.ppp.hide(); + if (_contextmenu.kkk) _contextmenu.kkk.hide(); + if (_contextmenu.last) _contextmenu.last.removeClass('menu-active'); + _contextmenu.kkk = shadow; + _contextmenu.last = item; + _contextmenu.ppp = subitem; + item.addClass('menu-active'); + var temp = item.find('.menu'); + var subx = el.width() - 1; + suby = -5; + if (x + el.width() * 2 > Max_x) subx = subx - temp.width() - el.width() - 6; + if (y + item.position().top + temp.height() > Max_y) suby = suby - temp.height() + item.height(); + console.log(temp); + temp.css({left: subx, top: suby, 'z-index': _contextmenu.zIndex + 2, display: 'block'}); + shadow.css({ + display: "block", + zIndex: _contextmenu.zIndex + 1, + left: subx, + top: suby, + width: temp.outerWidth(), + height: temp.outerHeight() + }); + subitem.find('.menu-item').on('mouseover', function () { + jQuery(this).addClass('menu-active'); + + }); + subitem.find('.menu-item').on('mouseout', function () { + jQuery(this).removeClass('menu-active'); + return false; + + }); + + return false; + }); + item.on('mouseout', function () { + item.removeClass('menu-active'); + shadow.hide(); + subitem.hide();//alert('dddddd'); + return false; + }); + + } else { + item.on('mouseover', function () { + if (_contextmenu.last) _contextmenu.last.removeClass('menu-active'); + if (_contextmenu.ppp) _contextmenu.ppp.hide(); + if (_contextmenu.kkk) _contextmenu.kkk.hide(); + jQuery(this).addClass('menu-active'); + return false; + }); + item.on('mouseout', function () { + jQuery(this).removeClass('menu-active'); + }); + } + }); + if (x + el.width() > Max_x) x = x - el.width(); + if (y + el.height() > Max_y) y = y - el.height(); + if (y < 0) y = 0; + el.css({left: x, top: y}); + + jQuery('#shadow').css({ + display: "block", + zIndex: _contextmenu.zIndex, + left: x, + top: y, + width: el.outerWidth(), + height: el.outerHeight() + }); + + jQuery(document).on('mousedown.right_contextmenu', function (e) { + //var obj = event.srcElement ? event.srcElement : event.target; + e = e ? e : window.event; + var obj = e.srcElement ? e.srcElement : e.target; + if (jQuery(obj).closest('#right_contextmenu').length < 1) { + el.hide(); + jQuery('#shadow').hide(); + jQuery(document).off('.right_contextmenu'); + _contextmenu.kkk = null; + _contextmenu.ppp = null; + _contextmenu.last = null; + } + }); +}; + diff --git a/dzz/system/scripts/explorer.js b/dzz/system/scripts/explorer.js new file mode 100644 index 0000000..72abc12 --- /dev/null +++ b/dzz/system/scripts/explorer.js @@ -0,0 +1,538 @@ +"use strict"; +/* + * @copyright Leyun internet Technology(Shanghai)Co.,Ltd + * @license http://www.dzzoffice.com/licenses/license.txt + * @package DzzOffice + * @link http://www.dzzoffice.com + * @author zyx(zyx@dzz.cc) + */ +var _explorer = {}; +_explorer = function (json) { + _explorer.space = json.space; //用户信息 + _explorer.myuid = json.myuid; + _explorer.formhash = json.formhash; //FORMHASH + _explorer.extopen = json.extopen || {}; //打开方式信息 + _explorer.sourcedata = json.sourcedata || []; //所有文件信息 + _explorer.type = json.fileselectiontype || 0;//文件选择类型,0为选择文件,1为保存文件 + _explorer.mulitype = json.mulitype || 0;//是否允许多选,默认不允许 + _explorer.allowselecttype = json.allowselecttype || '';//允许筛选文件类型 + //默认筛选文件类型 + if(json.allowselecttype){ + for(var o in json.allowselecttype){ + if(json.allowselecttype[o][2] == 'selected'){ + _explorer.defaultexttype = json.allowselecttype[o][1].join(',').toLowerCase(); + } + } + }else{ + _explorer.defaultexttype = ''; + } + _explorer.defaultfilename = json.defaultfilename || ''; + _explorer.thame = json.thame || {}; + _explorer.infoRequest = 0; + _explorer.deletefinally = json.deletefinally || 0; + _explorer.cut = json.cut || { + iscut: 0, + icos: [] + }; +}; +_explorer.appUrl = 'index.php?mod=system&op=fileselection'; +_explorer.hash = ''; +_explorer.getConfig = function (url, callback) { + $.getJSON(url + '&t=' + new Date().getTime(), function (json) { + new _explorer(json); + _explorer.hashHandler(); + _explorer.initEvents(); + //_explorer.infoPanel(); + if (typeof callback === "function") { + callback(json); + } + }); +}; +_explorer.initEvents = function () { //初始化页面事件 + //hashchange事件 + $(window).on('hashchange', function () { + _explorer.hashHandler(); + }); + //左侧列表页事件 + $(document).off('click.document-data').on('click.document-data', '.document-data', function () { + //var el=$(this); + location.hash = jQuery(this).data('hash'); + }); + + //右侧加载完成事件 + $(document).off('ajaxLoad.middleContent').on('ajaxLoad.middleContent', function () { +// _explorer.Scroll($('.scroll-y')); + var hash = location.hash.replace(/^#/i, ''); + var op = hash.replace(/&(.+?)$/ig, ''); //(hash,'op'); + _explorer.topNav_init(); + _explorer.address_resize(); + _explorer.setHeight($('.height-100')); + if ($('.scroll-100').length) { + _explorer.scroll_100 = new PerfectScrollbar('.scroll-100'); + } + }); +}; +_explorer.set_address = function(path){ + var pathstr = path; + $('.select-address input.inputaddress').val(pathstr); + var patharr = pathstr.split('\\'); + var address_html = ''; + for(var o in patharr){ + address_html += '
    1. '+patharr[o]+'
    2. '; + } + $('.select-address div.address-field').html(address_html); +} +_explorer.address_resize = function (dir) { + var container = jQuery('.address-container'); + var address = jQuery('.address-field'); + var cwidth = container.width(); + var speed = cwidth; + var awidth = 0; + address.find('li').each(function () { + awidth += jQuery(this).outerWidth(true); + }); + var left = isNaN(parseInt(address.css('left'))) ? (cwidth - awidth) : parseInt(address.css('left')); + if (dir === 'left') { + left += speed; + if (left >= 0) { + left = 0; + container.removeClass('arrow-left'); + } + if (left > (cwidth - awidth)) { + container.addClass('arrow-right'); + } else { + container.removeClass('arrow-right'); + } + if (left < 0) { + container.addClass('arrow-left'); + } else { + container.removeClass('arrow-left'); + } + + address.animate({ + 'left': left, + 'right': 'auto' + }, 500); + + } else if (dir === 'right') { + left -= speed; + + if (left <= (cwidth - awidth)) { + left = (cwidth - awidth); + container.removeClass('arrow-right'); + } + if (left > (cwidth - awidth)) { + container.addClass('arrow-right'); + } else { + container.removeClass('arrow-right'); + } + if (left < 0) { + container.addClass('arrow-left'); + } else { + container.removeClass('arrow-left'); + } + address.animate({ + 'left': left, + 'right': 'auto' + }, 500); + } else { + + if (awidth > cwidth + 21) { + container.removeClass('arrow-right').addClass('arrow-left'); + } else { + container.removeClass('arrow-right').removeClass('arrow-left'); + } + address.css({ + 'left': 'auto', + 'right': 0 + }); + } +}; +_explorer.topNav_init = function () { + + /*页面地址栏相关事件*/ + $(document).off('click.address-left-arrow').on('click.address-left-arrow','.address-left-arrow', function () { + _explorer.address_resize('left'); + return false; + }); + $(document).off('click.address-right-arrow').on('click.address-right-arrow', '.address-right-arrow', function () { + _explorer.address_resize('right'); + return false; + }); + + //点击路径切栏切换位置 + $(document).off('click.routes').on('click.routes', '.address-container .routes', function () { + var path = ''; + var text = $(this).text().replace(/(^\s*)|(\s*$)/g,''); + var textprefix = /[::]/; + var prefix = ''; + var textarr = []; + if (textprefix.test(text)) { + textarr = text.split(/[::]/); + prefix = textarr[0]; + text = textarr[1]; + } + $(this).closest('li').prevAll().find('a').each(function () { + + path += $(this).text().replace(/(^\s*)|(\s*$)/g,'') + '/'; + }); + path += text; + //path = path.replace(/>/g,'/'); + if (path.charAt(path.length - 1) !== '/') { + path = path + '/'; + } + _explorer.routerule(path, prefix); + return false; + }); + //输入地址栏实现切换 + $(document).off('keyup.referer_path').on('keyup.referer_path', '.address-container .referer_path', function (e) { + if (e.keyCode === 13) { + var path = $(this).val(); + path = path.replace(/\\/g, '/', path); + var hash = false; + switch (path) { + case '我的网盘': + _explorer.routerule(path); + break; + case '动态': + hash = 'dynamic'; + break; + case '回收站': + hash = 'recycle'; + break; + case '分享': + hash = 'share'; + break; + case '收藏': + hash = 'collection'; + break; + case '最近使用': + hash = 'recent'; + break; + case '文件夹权限': + hash = 'perm'; + break; + case '功能管理': + hash = 'app'; + break; + case '图片': + case '文档': + path = '类型:' + path; + break; + } + var textprefix = /[::]/; + var patharr = []; + var prefix = ''; + if (textprefix.test(path)) { + patharr = path.split(/[::]/); + prefix = patharr[0]; + path = patharr[1]; + if (path.charAt(path.length - 1) !== '/') { + path = path + '/'; + } + _explorer.routerule(path, prefix); + return false; + } + + if (hash) { + location.hash = hash; + return false; + } + + if (path.charAt(path.length - 1) !== '/') { + path = path + '/'; + } + _explorer.routerule(path); + return false; + } + + }); +}; +_explorer.routerule = function (path, prefix) { + var queryobj = { + 'name': path + }; + //获取前缀 + if (prefix) { + switch (prefix) { + case '群组': + queryobj.prefix = 'g'; + break; + case '机构': + queryobj.prefix = 'o'; + break; + case '类型': + queryobj.prefix = 'c'; + break; + } + } + + $.post(_explorer.appUrl + '&do=ajax&operation=getfid', queryobj, function (data) { + if (data.success) { + var hash = ''; + if (!isNaN(parseInt(data.success['gid']))) { + hash = 'group&gid=' + data.success['gid'] + (data.success['fid'] ? '&fid=' + data.success['fid'] : ''); + }else { + hash = 'home&fid=' + data.success['fid']; + } + location.hash = hash; + } + }, 'json'); + return false; +}; +_explorer.hashHandler = function () { //处理页面hash变化 + var hash = location.hash; + hash = hash.replace(/^#/i, ''); + _explorer.jstree_select(hash); + if (!hash) { + hash = 'home=1'; + } + if (hash === _explorer.hash) { + return false; + } + if (hash !== _explorer.hash) { + _explorer.getRightContent(hash, $('#middleconMenu')); + _explorer.hash = hash; + } else { + _explorer.hash = hash; + } + //_explorer.topMenu(hash); + return false; +}; + +_explorer.loading = function (container, flag) { //右侧加载效果 + if (flag === 'hide') { + container.find('.rightLoading').remove(); + } else { + container.append('
      '); + } +}; +_explorer.getRightContent = function (hash, container) { //处理右侧页面加载 + _explorer.loading(container); + _explorer.rightLoading = 1; + $('.document-data').removeClass('actives'); + $('[data-hash="' + hash + '"]').addClass('actives'); + var url = _explorer.appUrl + '&do=file&' + hash; + jQuery('#middleconMenu').load(url, function () { + $(document).trigger('ajaxLoad.middleContent', [hash]); + }); + +}; +//通过hash值来设置左侧树的选择指示 +_explorer.jstree_select = function (hash) { + if (!hash) { + hash = location.hash.replace('#', ''); + } + if(!hash){ + hash = $('#position').find("li[flag='home']").attr('hashs'); + } + var op = hash.replace(/&(.+?)$/ig, ''); //(hash,'op'); + var fid = _explorer.getUrlParam(hash, 'fid'); + if (op === 'group') { + var gid = _explorer.getUrlParam(hash, 'gid'); + _explorer.open_node_by_id(fid, gid); + } else if (op === 'home') { + _explorer.open_node_by_id(fid); + } /*else if (op === 'mygroup') { + $('#position').jstree(true).select_node('#group'); + }*/ else { + if ($('#position').length > 0) { + $('#position').jstree(true).deselect_all(); + } + } +}; +_explorer.open_node_by_id = function (fid, gid) { + var inst = $('#position').jstree(true); + var node = null; + if (fid) { + node = inst.get_node('#f_' + fid) || inst.get_node('#u_' + fid); + } else if (gid) { + node = inst.get_node('#g_' + gid) || inst.get_node('#gid_' + gid); + } else { + inst.deselect_all(); + return; + } + if (node) { + inst.deselect_all(); + var selects = inst.get_selected(); + for (var i = 0; i < selects.length; i++) { + if (selects[i] === node.id) { + continue; + } + inst.deselect_node('#' + selects[i]); + } + inst.select_node(node); + } else { + $.post(_explorer.appUrl + '&op=filelist&do=getParentsArr', { + 'fid': fid, + 'gid': gid + }, function (data) { + var node = inst.get_node('#' + data[0]); + _explorer.open_node_bg(inst, node, data); + }, 'json'); + } +}; +_explorer.open_node_bg = function (inst, node, arr) { + + inst.open_node(node, function (node) { + var i = jQuery.inArray(node.id, arr); + if (i < arr.length && i > -1 && document.getElementById(arr[i + 1])) { + _explorer.open_node_bg(inst, document.getElementById(arr[i + 1]), arr); + } else { + inst.deselect_all(); + inst.select_node(node); + } + + }); +}; + +_explorer.getUrlParam = function (url, name) { + if (!name) { + return url; + } + var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); + if (!url) { + return ''; + } + var r = url.match(reg); + + if (r !== null) { + return decodeURIComponent(r[2]); + } +}; +//设定层高度 +_explorer.setHeight = function (els) { + var clientHeight = document.documentElement.clientHeight; + els.each(function () { + var el = $(this); + var pos = el.offset(); + var height = clientHeight - pos.top; + el.css('height', height); + }); +}; +//带有.scroll-y的层设置滚动条 +_explorer.Scroll = function (els) { + var clientHeight = document.documentElement.clientHeight; + if (!els) { + els = $('.scroll-y'); + } + els.each(function () { + var el = $(this); + var pos = el.offset(); + var height = clientHeight - pos.top; + if (el.data('subtractor')) { + height = height - el.data('subtractor'); + } + el.css({ + 'overflow': 'auto', + 'height': height, + 'position': 'relative' + }); + new PerfectScrollbar(this); + }); +}; + + +_explorer.image_resize = function (img, width, height) { + width = !width ? jQuery(img).parent().width() : width; + height = !height ? jQuery(img).parents('.icoimgContainer').parent().height() : height; + imgReady(img.src, function () { + var w = this.width; + var h = this.height; + var realw = 0, + realh = 0; + if (w > 0 && h > 0) { + if ((w / h) > 1) { + realw = (w > width) ? parseInt(width) : w; + realh = (w > width) ? parseInt(height) : (realw * h / w); + img.style.width = realw + 'px'; + img.style.height = realh + 'px'; + } else { + realh = (h > height) ? parseInt(height) : h; + realw = (h > height) ? parseInt(width) : (realh * w / h); + img.style.width = realw + 'px'; + img.style.height = 'auto'; + } + if (realw < 32 && realh < 32) { + jQuery(img).addClass('image_tosmall').css({ + padding: ((height - realh) / 2 - 1) + 'px ' + ((width - realw) / 2 - 1) + 'px' + }); + } + } + jQuery(img).show(); + }); + +}; +_explorer.icoimgError = function (img, width, height) { + width = !width ? jQuery(img).parent().width() : width; + height = !height ? jQuery(img).parent().height() : height; + if (jQuery(img).attr('error')) { + imgReady(jQuery(img).attr('error'), function () { + var w = this.width; + var h = this.height; + var realw = 0, + realh = 0; + if (w > 0 && h > 0) { + if ((w / h) > 1) { + realw = (w > width) ? parseInt(width) : w; + realh = realw * h / w; + } else { + realh = (h > height) ? parseInt(height) : h; + realw = realh * w / h; + } + if (realw < 32 && realh < 32) { + jQuery(img).addClass('image_tosmall').css({ + padding: ((height - realh) / 2 - 1) + 'px ' + ((width - realw) / 2 - 1) + 'px' + }); + } + try { + img.style.width = realw + 'px'; + img.style.height = realh + 'px'; + + } catch (e) { + + } + img.src = jQuery(img).attr('error'); + jQuery(img).show(); + } + }, + function () { + }, + function () { + img.onerror = null; + img.src = 'dzz/images/default/icodefault.png'; + jQuery(img).show(); + } + ); + } +}; +jQuery(window).resize(function () { + _explorer.Scroll(); +}); + + +function checkAll(type, form, value, checkall, changestyle) { + checkall = checkall ? checkall : 'chkall'; + for (var i = 0; i < form.elements.length; i++) { + var e = form.elements[i]; + if (type === 'option' && e.type === 'radio' && e.value === value && e.disabled !== true) { + e.checked = true; + } else if (type === 'value' && e.type === 'checkbox' && e.getAttribute('chkvalue') === value) { + e.checked = form.elements[checkall].checked; + + } else if (type === 'prefix' && e.name && e.name !== checkall && (!value || (value && e.name.match(value)))) { + e.checked = form.elements[checkall].checked; + if (changestyle) { + if (e.parentNode && e.parentNode.tagName.toLowerCase() === 'li') { + e.parentNode.className = e.checked ? 'checked' : ''; + } + if (e.parentNode.parentNode && e.parentNode.parentNode.tagName.toLowerCase() === 'div') { + e.parentNode.parentNode.className = e.checked ? 'item checked' : 'item'; + } + } + } + } +} +function dfire(e) { + jQuery(document).trigger(e); +} diff --git a/dzz/system/scripts/filemanage.js b/dzz/system/scripts/filemanage.js new file mode 100644 index 0000000..6b5937f --- /dev/null +++ b/dzz/system/scripts/filemanage.js @@ -0,0 +1,1266 @@ +/* + * @copyright Leyun internet Technology(Shanghai)Co.,Ltd + * @license http://www.dzzoffice.com/licenses/license.txt + * @package DzzOffice + * @link http://www.dzzoffice.com + * @author zyx(zyx@dzz.cc) + */ +//添加目录树的右键 +"use strict"; + +function _filemanage(id, data, param) { + var page = isNaN(parseInt(param.page)) ? 1 : parseInt(param.page); + var total = isNaN(parseInt(param.total)) ? 1 : parseInt(param.total); + this.total = total; + //alert('filemangeid='+id); + this.bz = param.bz || ''; //标志是那个api的数据 + + this.perpage = param.perpage; + this.totalpage = Math.ceil(this.total / this.perpage); + this.totalpage = this.totalpage < 1 ? 1 : this.totalpage; + this.id = id; + this.string = "_filemanage.cons." + this.id; + //alert(this.id); + var sidarr = id.split('-'); + if (sidarr[0] == 'f') this.fid = sidarr[1]; + else this.fid = 0; + this.subfix = sidarr[0]; //记录当前的sid前缀 f、cat等 + this.winid = id; + this.keyword = param.keyword; + this.localsearch = param.localsearch; + + this.view = isNaN(parseInt(param.view)) ? _filemanage.view : parseInt(param.view); + this.disp = isNaN(parseInt(param.disp)) ? _filemanage.disp : parseInt(param.disp); + + this.asc = param.asc; //_filemanage.asc; + this.detailper = _filemanage.detailper; + if (!this.data) this.data = {}; + this.data = data; + this.currentpage = page; + this.container = param.container; + this.odata = []; + this.sum = 0; + _filemanage.cons[this.id] = this; + _filemanage.fid = this.fid; + _filemanage.subfix = this.subfix; + _filemanage.winid = this.id; + this.pageloadding = true; + this.exts = param.exts || ''; + this.tags = param.tags || ''; + this.before = param.before || ''; + this.after = param.after || ''; + this.fids = param.fids || ''; + this.gid = param.gid || ''; + +} +_filemanage.selectall = { + position: {}, + container: '', + icos: [] +}; +_filemanage.saveurl = 'index.php?mod=system&op=save'; +_filemanage.speed = 5; +_filemanage.perpage = 100; //每页最多个数; +_filemanage.cons = {}; +_filemanage.view = 4; +_filemanage.disp = 0; +_filemanage.asc = 1; +_filemanage.detailper = [47, 10, 20, 15, 8]; //依此对应:名称 大小 类型 修改时间; +_filemanage.onmousemove = null; +_filemanage.onmouseup = null; +_filemanage.onselectstart = 1; +_filemanage.stack_data = {}; +_filemanage.showicosTimer = {}; +_filemanage.apicacheTimer = {}; +_filemanage.infoPanelUrl = ''; +_filemanage.viewstyle = ['bigicon', 'middleicon', 'middlelist', 'smalllist', 'detaillist']; +_filemanage.getData = function (url, callback) { + jQuery.getJSON(url, function (json) { + if (json.error) { + alert(json.error); + return false; + } else { + for (var id in json.data) { + _explorer.sourcedata.icos[id] = json.data[id]; + } + for (var fid in json.folderdata) { + _explorer.sourcedata.folder[fid] = json.folderdata[fid]; + } + _explorer.topMenu(null,_filemanage.fid); + var obj = null; + + if (json.param.page > 1) { + obj = _filemanage.cons[json.sid]; + obj.appendIcos(json.data); + obj.total = parseInt(json.total); + obj.totalpage = Math.ceil(obj.total / obj.perpage); + } else { + obj = new _filemanage(json.sid, json.data, json.param); + if (_filemanage.selectall.container !== 'filemanage-' + json.sid) { + _filemanage.selectall = { + position: {}, + container: '', + icos: [] + }; + obj.selectInfo(); + } + obj.showIcos(); + } + obj.url = url; + //修改初始化时的排列方式指示 + jQuery('.sizeMenu .icons-thumbnail').attr('iconview', obj.view).find('.dzz').removeClass('dzz-view-module').removeClass('dzz-view-list').addClass(obj.view === 2 ? 'dzz-view-list':'dzz-view-module'); + jQuery('.sizeMenu .icons-thumbnail').attr('iconview', obj.view).find('.dzz').attr('data-original-title',obj.view === 2 ? __lang.deltail_lsit : __lang.medium_icons); + jQuery('.sizeMenu .icons-thumbnail').attr('folderid', obj.id); + if (typeof (callback) === 'function') { + callback(obj); + } + } + }); +}; +_filemanage.glow = function (el) { + var delay = 200; + for (var i = 0; i < 4; i++) { + window.setTimeout(function () { + el.find('.toggleGlow').toggleClass('glow'); + }, delay * i); + } +}; +_filemanage.Arrange = function (obj, id, view) { + var el = jQuery(obj); + if (!id) { + id = el.attr('folderid'); + } + var filemanage = _filemanage.cons[id]; + + if (!view) { + view = (parseInt(el.attr('iconview')) < 4 ? 4 : 2); + } else { + view = view * 1; + } + jQuery('.sizeMenu .icons-thumbnail').attr('iconview', view).find('.dzz').removeClass('dzz-view-module').removeClass('dzz-view-list').addClass(view === 2 ? 'dzz-view-list':'dzz-view-module'); + jQuery('.sizeMenu .icons-thumbnail').attr('iconview', view).find('.dzz').attr('data-original-title',view === 2 ? __lang.deltail_lsit : __lang.medium_icons); + if (filemanage.subfix === 'f') { + var fid = _filemanage.fid; + if (fid > 0 && _explorer.Permission_Container('admin', fid)) { + jQuery.post(_filemanage.saveurl + '&do=folder', { + fid: fid, + iconview: view + }); + _explorer.sourcedata.folder[fid]['iconview'] = view; + + } + } else if (filemanage.subfix === 'cat') { + jQuery.post(_filemanage.saveurl + '&do=catsearch', { + catid: id.replace('cat-', ''), + iconview: view + }); + } else if (filemanage.subfix === 'search') { + jQuery.post(_filemanage.saveurl + '&do=search', { + iconview: view + }); + } else if (filemanage.subfix === 'recycle') { + jQuery.post(_filemanage.saveurl + '&do=recycle', { + iconview: view + }); + } + filemanage.view = view; + filemanage.showIcos(); + //var classend=jQuery('#filemanage_view'+winid).attr('class').replace(/filemanage_view\d+_/i,''); + //jQuery('#filemanage_view'+winid).attr('class','filemanage_view'+view+'_'+classend); + jQuery('#right_contextmenu .menu-icon-iconview').each(function () { + if (jQuery(this).attr('view') * 1 === view * 1) { + jQuery(this).removeClass('dzz-check-box-outline-blank').addClass('dzz-check-box'); + } else { + jQuery(this).addClass('dzz-check-box-outline-blank').removeClass('dzz-check-box'); + } + }); +}; +_filemanage.Disp = function (obj, id, disp) { + var filemanage = _filemanage.cons[id]; + if (filemanage.subfix === 'f') { + var fid = filemanage.fid; + if (fid > 0 && _explorer.Permission_Container('admin', fid)) { + jQuery.post(_filemanage.saveurl + '&do=folder', { + fid: fid, + disp: parseInt(disp) + }); + } + _explorer.sourcedata.folder[fid]['disp'] = parseInt(disp); + } else if (filemanage.subfix === 'cat') { + jQuery.post(_filemanage.saveurl + '&do=catsearch', { + catid: id.replace('cat-', ''), + disp: parseInt(disp) + }); + } + if (disp * 1 === filemanage.disp * 1) { + filemanage.asc = filemanage.asc > 0 ? 0 : 1; + } + filemanage.disp = parseInt(disp); + if (filemanage.bz.indexOf('ALIOSS') === 0 || filemanage.bz.indexOf('JSS') === 0) { + filemanage.showIcos(); + } else { + filemanage.pageClick(1); + } + jQuery('#right_contextmenu .menu-icon-disp').each(function () { + if (jQuery(this).attr('disp') * 1 === disp * 1) { + jQuery(this).removeClass('dzz-check-box-outline-blank').addClass('dzz-check-box'); + jQuery(this).next().find('.caret').removeClass('asc').removeClass('desc').addClass(filemanage.asc > 0 ? 'asc' : 'desc'); + } else { + jQuery(this).addClass('dzz-check-box-outline-blank').removeClass('dzz-check-box'); + jQuery(this).next().find('.caret').removeClass('asc').removeClass('desc'); + } + }); +}; +_filemanage.searchsubmit = function (sid) { + var keyword = document.getElementById('searchInput_' + sid).value; + keyword = (keyword === __lang.search) ? keyword : ''; + var obj = _filemanage.cons[sid]; + if (!obj) { + return; + } + if (obj.localsearch) { + obj.keyword = keyword; + obj.showIcos(); + } else { + obj.pageClick(1); + } +}; + + + +/* +view: 图标排列方式:0:大图标,1:中图标,2:中图标列表,3小图标列表,4:详细 +disp:图标排列顺序:0:原始顺序:按名称;1:按大小;2:按类型;3:按时间 +asc :升序或降序:0:升序;1:降序 +*/ + +_filemanage.setInfoPanel = function () { + + var rids = _filemanage.selectall.icos; + if (_explorer.infoRequest){ + _explorer.infoRequest.abort(); + _filemanage.infoPanelUrl=''; + } + if (!_explorer.infoPanelOpened || _explorer.infoPanel_hide) { + return; //右侧面板没有打开的话,不加载文件详细信息 + } + if (rids.length < 1) { + var fid = _filemanage.fid || $('#fidinput').val(); + if (!fid) { + var data = '
      ' + +'
      ' + +'' + +'

      '+__lang.choose_file_examine_information+'

      ' + +'
      ' + +'
      '; + $('#rightMenu').html(data); + _filemanage.infoPanelUrl = ''; + + return false; + } + if (_filemanage.infoPanelUrl !== fid) { + _explorer.infoRequest = $.post(MOD_URL + '&op=dynamic&do=getfolderdynamic', { + 'fid': fid + }, function (data) { + $('#rightMenu').html(data); + _filemanage.infoPanelUrl = fid; + }); + } + } else if (rids.length === 1) { + if (_filemanage.infoPanelUrl !== rids[0]) { + _explorer.infoRequest = $.post(MOD_URL + '&op=dynamic&do=getfiledynamic', { + 'rid': rids + }, function (data) { + $('#rightMenu').html(data); + _filemanage.infoPanelUrl = rids[0]; + }); + } + } else { + var ridsstr = rids.join(','); + if (_filemanage.infoPanelUrl !== ridsstr) { + _explorer.infoRequest = $.post(MOD_URL + '&op=dynamic&do=getfiledynamic', { + 'rid': rids + }, function (data) { + $('#rightMenu').html(data); + _filemanage.infoPanelUrl = ridsstr; + }); + } + } +}; + +_filemanage.prototype.CreateIcos = function (data, flag) { + var self = this; + var containerid = 'filemanage-' + this.winid; + if (!flag && this.data[data.rid]) { //如果已经存在 + var el1 = jQuery('#' + containerid + ' .Icoblock[rid=' + data.rid + ']'); + _filemanage.glow(el1); + return; + } + this.data[data.rid] = data; + var template = _filemanage.get_template(this.id); + //创建图标列表 + if (data.flag) { + if (!data.img) { + data.img = 'dzz/styles/thame/' + _explorer.thame.system.folder + '/system/' + data.flag + '.png'; + } + data.error = 'dzz/images/default/system/' + data.flag + '.png'; + } else if (data.type === 'folder') { + if (data.gid > 0) { + data.icon = data.img ? data.img : data.icon; + data.error = data.icon || 'dzz/images/default/system/folder-read.png'; + data.img = data.icon ? data.icon.replace('dzz/images/default', 'dzz/styles/thame/' + _explorer.thame.system.folder) : 'dzz/styles/thame/' + _explorer.thame.system.folder + '/system/folder-read.png'; + } else { + data.icon = data.img ? data.img : data.icon; + data.error = data.icon || 'dzz/images/default/system/folder.png'; + data.img = data.icon ? ((data.icon).replace('dzz/images/default', 'dzz/styles/thame/' + _explorer.thame.system.folder)) : 'dzz/styles/thame/' + _explorer.thame.system.folder + '/system/folder.png'; + } + } else if (data.type === 'shortcut' && data.ttype === 'folder') { + if (data.tdata.gid > 0) { + data.error = data.tdata.img || 'dzz/images/default/system/folder-read.png'; + data.img = (data.tdata.img + '').replace('dzz/images/default', 'dzz/styles/thame/' + _explorer.thame.system.folder); + } else { + data.error = data.tdata.img || 'dzz/images/default/system/folder.png'; + data.img = data.tdata.img ? ((data.tdata.img + '').replace('dzz/images/default', 'dzz/styles/thame/' + _explorer.thame.system.folder)) : 'dzz/styles/thame/' + _explorer.thame.system.folder + '/system/folder.png'; + } + } else { + data.error = 'dzz/images/default/icodefault.png'; + } + var html = template.replace(/\{name\}/g, data.name); + html = html.replace(/\{rid\}/g, data.rid); + html = html.replace(/tsrc=\"\{img\}\"/g, 'src="{img}"'); + html = html.replace(/\{img\}/g, data.img); + + html = html.replace(/\{username\}/g, data.username); + html = html.replace(/\{replynum\}/g, data.replynum ? data.replynum : '0'); + + + html = html.replace(/\{zIndex\}/g, 10); + html = html.replace(/\{error\}/g, data.error); + html = html.replace(/\{size\}/g, ((data.type === 'folder' || data.type === 'app' || data.type === 'shortcut') ? '' : data.fsize)); + html = html.replace(/\{fsize\}/g, data.fsize); + html = html.replace(/\{type\}/g, data.type); + html = html.replace(/\{ftype\}/g, data.ftype); + html = html.replace(/\{dateline\}/g, data.dateline); + html = html.replace(/\{fdateline\}/g, data.fdateline); + html = html.replace(/\{flag\}/g, data.flag); + html = html.replace(/\{position\}/g, data.relpath); + html = html.replace(/\{dpath\}/g, data.dpath); + html = html.replace(/\{from\}/g, data.from); + html = html.replace(/\{delusername\}/g, data.username); + html = html.replace(/\{deldateline\}/g, data.deldateline); + html = html.replace(/\{finallydate\}/g, data.finallydate); + html = html.replace(/\{views\}/g, data.views); + html = html.replace(/\{times\}/g, data.times); + html = html.replace(/\{downs\}/g, data.downs); + html = html.replace(/\{expireday\}/g, data.expireday); + html = html.replace(/\{sharelink\}/g, data.sharelink); + html = html.replace(/dsrc=\"\{qrcode\}\"/g, 'src="{qrcode}"'); + html = html.replace(/dsrc='\{qrcode\}'/g, "src='{qrcode}'"); + html = html.replace(/\{qrcode\}/g, data.qrcode); + html = html.replace(/\{password\}/g, data.password); + html = html.replace(/\{count\}/g, data.count); + if(data.status < 0){ + var sharestatus = '('+data.fstatus+')'; + }else{ + sharestatus = ''; + } + //收藏 + if(data.collect){ + var collectstatus = ''; + }else{ + var collectstatus = ''; + } + html = html.replace(/\{collectstatus\}/g,collectstatus); + html = html.replace(/\{sharestatus\}/g,sharestatus); + if (data.type !== 'image') { + html = html.replace(/data-start=\"image\".+?data-end=\"image\"/ig, ''); + } + var position_hash = ''; + if (data.gid > 0) { + position_hash = data.pfid > 0 ? '#group&do=file&gid=' + data.gid + '&fid=' + data.pfid : '#group&gid=' + data.gid; + } else { + position_hash = '#home&do=file&fid=' + data.pfid; + } + html = html.replace(/\{position_hash\}/g, position_hash); + //处理操作按钮 + //html=this.filterOPIcon(data,html); + var el = null; + if (flag && jQuery('.Icoblock[rid=' + data.rid + ']').length > 0) { + jQuery('.Icoblock[rid=' + data.rid + ']').replaceWith(html); + el = jQuery('.Icoblock[rid=' + data.rid + ']') + + } else { + jQuery(html).appendTo('#' + containerid + ' .js-file-item-tpl'); + el = jQuery('.Icoblock[rid=' + data.rid + ']'); + jQuery('#shareinfo_' + data.rid).on('click', function (e) { + return false; + }); + + } + if (this.view < 4) { + + el.on('mouseenter', function () { + jQuery(this).addClass('hover'); + + }); + el.on('mouseleave', function () { + jQuery(this).removeClass('hover'); + + }); + + //处理多选框 + //if(!_filemanage.fid || _explorer.Permission_Container('multiselect',this.fid)){ + el.find('.icoblank_rightbottom').on('click', function () { + var flag = true; + var ell = jQuery(this).parent(); + var rid = ell.attr('rid'); + if (ell.hasClass('Icoselected')) { + flag = false; + } + _select.SelectedStyle('filemanage-' + self.id, rid, flag, true); + + return false; + }); + //处理操作按钮 + el.on('click', function (e) { + var tag = e.srcElement ? e.srcElement : e.target; + if (/input|textarea/i.test(tag.tagName)) { + return true; + } + var Item = jQuery(this).closest('.Icoblock'); + var rid = Item.attr('rid'); + var flag = true; + if ((_hotkey.ctrl && Item.hasClass('Icoselected')) || (Item.hasClass('Icoselected') && _filemanage.selectall.icos.length === 1 && _filemanage.selectall.icos[0] === rid)) { + flag = false; + } + var multi = _hotkey.ctrl ? true : false; + _select.SelectedStyle('filemanage-' + self.id, jQuery(this).attr('rid'), flag, multi); + //self.createBottom(); + return false; + }); + /*}else{ + //el.find('.icoblank_rightbottom').remove(); + }*/ + + if (this.total == 0 && jQuery('#' + containerid).find('.emptyPage').length == 0) { + jQuery(jQuery('#template_nofile_notice').html()).appendTo(jQuery('#' + containerid)); + } else { + jQuery('#' + containerid).find('.emptyPage').remove(); + } + + } else { //详细列表时 + + + el.bind('mouseenter', function () { + jQuery(this).addClass('hover'); + //return false; + }); + el.bind('mouseleave', function () { + jQuery(this).removeClass('hover'); + //return false; + }); + + /*//点击图片和名称直接打开 + + el.on('click', function (e) { + e = e ? e : window.event; + var tag = e.srcElement ? e.srcElement : e.target; + if (/input|textarea/i.test(tag.tagName)) { + return true; + } + var Item = jQuery(this).closest('.Icoblock'); + var rid = Item.attr('rid'); + var flag = true; + if ((_hotkey.ctrl && Item.hasClass('Icoselected')) || (Item.hasClass('Icoselected') && _filemanage.selectall.icos.length === 1 && _filemanage.selectall.icos[0] === rid)) { + flag = false; + } + var multi = _hotkey.ctrl ? true : false; + _select.SelectedStyle('filemanage-' + self.id, Item.attr('rid'), flag, multi); + //self.createBottom(); + return false; + });*/ + //if(_filemanage.fid<1 || _explorer.Permission_Container('multiselect',this.fid)){ + + el.find('.selectbox').on('click', function () { + var flag = true; + var ell = jQuery(this).closest('.Icoblock'); + var rid = ell.attr('rid'); + if (ell.hasClass('Icoselected')) { + flag = false; + } + _select.SelectedStyle('filemanage-' + self.id, rid, flag, true); + return false; + }); + /*}else{ + //el.find('.detail_item_td_select').parent().remove(); + }*/ + + } + + + //检测已选中 + if (jQuery.inArray(data.rid, _filemanage.selectall.icos) > -1) { + el.addClass('Icoselected'); + } + //处理按钮 + + if (!flag) { + _filemanage.glow(el); + this.sum++; + this.total++; + jQuery('#' + containerid + ' .scroll-y').scrollTop(9999999); + //this.checkPageChange(); + //this.PageInfo(); + this.currentdata['icos_' + data.rid] = data; + } + if (this.total == 0 && jQuery('#' + containerid).find('.emptyPage').length == 0) { + jQuery(jQuery('#template_nofile_notice').html()).appendTo(jQuery('#' + containerid)); + } else { + jQuery('#' + containerid).find('.emptyPage').remove(); + } +}; + + + + + +_filemanage.prototype.showIcos = function (ext) { + //排序数据 + var self = this; + if (_filemanage.showicosTimer[this.winid]) { + window.clearTimeout(_filemanage.showicosTimer[this.winid]); + } + //_window.windows[this.winid].filemanageid=this.id; + var containerid = 'filemanage-' + this.winid; + + jQuery('#' + containerid).empty(); + this.createIcosContainer(); + //var container=jQuery('#'+containerid+' .js-file-item-tpl'); + var data_sorted = null; + if (this.keyword) { + data_sorted = _filemanage.Sort(_filemanage.Search(this.data, this.keyword), this.disp, this.asc); + jQuery('#searchInput_' + this.id).val(this.keyword); + } else { + data_sorted = _filemanage.Sort(this.data, this.disp, this.asc); + } + if (ext) { + data_sorted = _file.Searchext(data_sorted, ext); + } + this.currentdata = data_sorted; + _filemanage.stack_data[self.id] = Array(); + for (var i in data_sorted) { + _filemanage.stack_data[self.id].push({ + data: data_sorted[i], + "obj": self + }); + } + window.setTimeout(function () { + _filemanage.stack_run(self.id); + }, 1); + //增加底部信息 + this.pageloadding = false; +}; +_filemanage.prototype.appendIcos = function (data) { + var self = this; + if (_filemanage.showicosTimer[this.winid]) { + window.clearTimeout(_filemanage.showicosTimer[this.winid]); + } + _filemanage.stack_data[self.winid] = Array(); + for (var i in data) { + //this.data[i]=data[i]; + _filemanage.stack_data[self.winid].push({ + data: data[i], + "obj": self + }); + } + window.setTimeout(function () { + _filemanage.stack_run(self.winid); + }, 1); + this.pageloadding = false; +}; + +_filemanage.prototype.createIcosContainer = function () { + var self = this; + var containerid = 'filemanage-' + this.id; + var div = document.getElementById(containerid); + if (!div) { + return; + } + div.className = "icosContainer"; + div.setAttribute('unselectable', "on"); + div.setAttribute('onselectstart', "return event.srcElement.type== 'text';"); + var htmlContent = ''; + div.innerHTML = _filemanage.get_template(this.id, true); + _explorer.Scroll($('.scroll-y')); + var el = jQuery(div); + el.find('.js-file-item-tpl').empty(); + jQuery('.middlecenter,.middle-recycle,.share-content') + .on('contextmenu', function (e) { + e = e ? e : window.event; + var tag = e.srcElement ? e.srcElement : e.target; + if (/input|textarea/i.test(tag.tagName)) { + return true; + } + _contextmenu.right_body(e, self.fid); + return false; + }) + .on('click', function (e) { + //清空数据 + //if(_hotkey.ctrl<1) return true; + e = e ? e : window.event; + var tag = e.srcElement ? e.srcElement : e.target; + if (/input|textarea/i.test(tag.tagName)) { + return true; + } + if (containerid === _filemanage.selectall.container) { + _filemanage.selectall.container = containerid; + _filemanage.selectall.icos = []; + _filemanage.selectall.position = {}; + el.find('.Icoblock').removeClass('Icoselected'); + el.find('.selectall-box').removeClass('Icoselected'); + self.selectInfo(); + } + }) + .end().find('.selectall-box').on('click', function () { + var el = jQuery(this); + var selectall = true; + if (el.hasClass('Icoselected')) { + el.removeClass('Icoselected'); + selectall = false; + _filemanage.selectall.icos = []; + } else { + el.addClass('Icoselected'); + selectall = true; + _filemanage.selectall.icos = []; + } + + _filemanage.selectall.container = containerid; + jQuery('#' + containerid).find('.Icoblock').each(function () { + if (selectall) { + jQuery(this).addClass('Icoselected'); + _filemanage.selectall.icos.push(jQuery(this).attr('rid')); + } else { + jQuery(this).removeClass('Icoselected'); + } + }); + self.selectInfo(); + return false; + }); + jQuery(document).off('click.cselect').on('click.cselect', '.dzz-backing-out', function () { + var hash = location.hash; + if (hash.indexOf('share') != -1) { + jQuery('.deatisinfo').each(function () { + jQuery(this).addClass('hide'); + }); + } + jQuery('.navtopheader').css('display', 'none'); + el.find('.Icoblock').removeClass('Icoselected'); + _filemanage.selectall.icos = []; + _filemanage.setInfoPanel(); + }); + _select.init(containerid); + if (this.view < 4) { + + + } else { + jQuery('#' + containerid).find('.detail_header:not(.detail_header_select)').on('click', function () { + var disp = parseInt(jQuery(this).attr('disp')); + + if (disp * 1 === self.disp * 1) { + if (self.asc > 0) { + self.asc = 0; + // if(self.asc=0){ + // jQuery(this).find('span').addClass('dzz-expand-more').removeClass('dzz-expand-less'); + // } + } else { + self.asc = 1; + } + } else { + _filemanage.Disp(this, self.id, disp); + self.asc = 1; + } + self.disp = disp; + if (self.fid) { + _explorer.sourcedata.folder[self.fid].disp = disp; + } + if (self.bz.indexOf('ALIOSS') === 0 || self.bz.indexOf('JSS') === 0) { + self.showIcos(); + } else { + self.pageClick(1); + } + }); + } + el.closest('.scroll-srcollbars').scroll(function () { + var el = jQuery(this); + if (el.height() + el.scrollTop() >= el.children().first().height()) { + if (self.currentpage >= self.totalpage || self.pageloadding) { + return; + } + self.pageloadding = true; + self.currentpage++; + self.pageClick(self.currentpage); + } + }); + if (this.fid) { + $.getScript(MOD_PATH + '/js/uplodfile.js', function () { + jQuery('.wangpan-upload-file').each(function () { + fileupload(jQuery(this), self.fid); + }); + }); + } + if (this.total < 1 && jQuery('#' + containerid).find('.emptyPage').length == 0) { + jQuery(jQuery('#template_nofile_notice').html()).appendTo(div); + } else { + jQuery('#' + containerid).find('.emptyPage').remove(); + } + +}; + + +_filemanage.prototype.selectInfo = function () { + var self = this; + if (this.selectinfoTimer) { + window.clearTimeout(this.selectinfoTimer); + } + this.selectinfoTimer = window.setTimeout(function () { + self._selectInfo(); + }, 200); +}; + + + +_filemanage.prototype.pageClick = function (page) { + var self = this; + this.pageloadding = true; + if (!page) { + page = 1; + } + this.currentpage = page; + var keyword = jQuery('#searchInput_' + this.id).value; + if (!keyword || keyword === __lang.search) { + keyword = ''; + } + var url = self.url + .replace(/&disp\=\d/ig, '') + .replace(/&asc\=\d/ig, '') + .replace(/&iconview\=\d/ig, '') + .replace(/&page\=\d+/ig, '') + .replace(/&exts\=[\w,]*(&|$)/ig, '&') + .replace(/&tags\=[\w,]*(&|$)/ig, '&') + .replace(/&keyword\=\w*(&|$)/, '&') + .replace(/&fid\=\w*(&|$)/, '&') + .replace(/&gid\=\w*(&|$)/, '&') + .replace(/&before\=\w*(&|$)/, '&') + .replace(/&after\=\w*(&|$)/, '&') + .replace(/&marker\=\w*(&|$)/, '&') + .replace(/&t\=\d+/, ''); + url = url.replace(/&+$/ig, ''); + _filemanage.getData(url + '&exts=' + this.exts + '&tags=' + this.tags + '&disp=' + this.disp + '&fids=' + this.fids + '&gid=' + this.gid + '&before=' + this.before + '&after=' + this.after + '&asc=' + this.asc + '&iconview=' + this.view + '&keyword=' + encodeURI(keyword) + '&page=' + page + '&marker=' + (this.fid ? _explorer.sourcedata.folder[this.fid].nextMarker : '') + '&t=' + new Date().getTime(), function () { + self.PageInfo(); + }); +}; + +_filemanage.stack_run = function (winid) { + //if(_filemanage.showicosTimer[winid]) window.clearTimeout(_filemanage.showicosTimer[winid]); + if (_filemanage.stack_data[winid].length > 0) { + var obj = _filemanage.stack_data[winid][0].obj; + for (var i = 0; i < _filemanage.speed; i++) { + if (_filemanage.stack_data[winid].length > 0) { + _filemanage.stack_data[winid][0].obj.CreateIcos(_filemanage.stack_data[winid][0]['data'], 1); + _filemanage.stack_data[winid].splice(0, 1); + } else break; + } + _filemanage.showicosTimer[winid] = window.setTimeout(function () { + _filemanage.stack_run(winid); + }, 1); + } else { + jQuery(document).trigger('showIcos_done'); + } +}; +_filemanage.prototype.tddrager_start = function (e) { + this.XX = e.clientX; + document.getElementById('_blank').style.cursor = 'e-resize'; + jQuery('#_blank').show(); + //var self=this; + this.AttachEvent(e); + //document.onmousemove=function(e){self.tddraging(e?e:window.event);return false;}; + //document.onmouseup=function(e){self.tddraged(e?e:window.event);return false;}; + eval("document.onmousemove=function(e){" + this.string + ".tddraging(e?e:window.event);};"); + eval("document.onmouseup=function(e){" + this.string + ".tddraged(e?e:window.event);};"); +}; +_filemanage.prototype.tddraging = function () { + document.body.style.cursor = 'e-resize'; + +}; +_filemanage.prototype.tddraged = function (e) { + this.DetachEvent(e); + jQuery('#_blank').hide(); + //document.getElementById('_blank').style.cursor="url('dzz/images/cur/aero_arrow.cur'),auto"; + //document.body.style.cursor="url('dzz/images/cur/aero_arrow.cur'),auto"; + var xx = e.clientX - this.XX; + //计算新的各个td的百分比 + var right_width = _window.windows[this.winid].bodyWidth - jQuery('#jstree_area').width(); + var current_width = right_width * this.detailper[this.tddrager_disp] / 100; + var width = xx + current_width; + //if(width>right_width-150) width=right_width-200; + if (width < 50) { + width = 50; + } + var all_width = []; + var other_width = 0; + for (var i = 0; i < 4; i++) { + all_width[i] = right_width * this.detailper[i] / 100; + } + var dx = width - current_width; + if (xx > 0) { + if (all_width[this.tddrager_disp + 1] - dx > 50) { + all_width[this.tddrager_disp + 1] -= dx; + } else { + var dx1 = dx + (all_width[this.tddrager_disp + 1] - 50); + all_width[this.tddrager_disp + 1] = 50; + if ((this.tddrager_disp + 1 + 1) < 4) { + if (all_width[this.tddrager_disp + 1 + 1] - dx1 > 50) { + all_width[this.tddrager_disp + 1 + 1] -= dx; + } else { + var dx2 = dx1 + (all_width[this.tddrager_disp + 1 + 1] - 50); + all_width[this.tddrager_disp + 1 + 1] = 50; + if ((this.tddrager_disp + 1 + 1 + 1) < 4) { + if (all_width[this.tddrager_disp + 1 + 1 + 1] - dx2 > 50) { + all_width[this.tddrager_disp + 1 + 1 + 1] -= dx; + } else { + all_width[this.tddrager_disp + 1 + 1 + 1] = 50; + } + } + } + } + + } + other_width = 0; + for (i = 0; i < 4; i++) { + if (i !== this.tddrager_disp) { + other_width += all_width[i]; + } + } + all_width[this.tddrager_disp] = right_width - other_width; + } else { + all_width[this.tddrager_disp] = width; + all_width[this.tddrager_disp + 1] -= dx; + } + other_width = 0; + for (i = 0; i < 4; i++) { + if (i != this.tddrager_disp) { + other_width += all_width[i]; + } + } + all_width[this.tddrager_disp] = right_width - other_width; + for (i = 0; i < 4; i++) { + this.detailper[i] = Math.floor((all_width[i] / right_width) * 100); + } + this.showIcos(this.winid); + //alert(document.getElementById('tabs_cover').offsetLeft+'========='+document.getElementById('tabs_cover').offsetWidth); +}; +_filemanage.prototype.DetachEvent = function () { + + //document.body.style.cursor="url('dzz/images/cur/aero_arrow.cur'),auto"; + document.onmousemove = _filemanage.onmousemove; + document.onmouseup = _filemanage.onmouseup; + document.onselectstart = _filemanage.onselectstart; + + + +}; +_filemanage.prototype.AttachEvent = function (e) { + _filemanage.onmousemove = document.onmousemove; + _filemanage.onmouseup = document.onmouseup; + _filemanage.onselectstart = document.onselectstart; + try { + document.onselectstart = function () { + return false; + }; + if (e.preventDefault) { + e.preventDefault(); + } else { + if (this.board.setCapture) { + this.board.setCapture(); + } + } + } catch (event) { + + } +}; +_filemanage.prototype.Resize = function () { + _explorer.Scroll(jQuery('.scroll-y')); +}; + +_filemanage.Search = function (data, keyword) { + var data1 = {}; + for (var i in data) { + if (data[i].name.toLowerCase().indexOf(keyword.toLowerCase()) !== -1) { + data1[i] = data[i]; + } + } + return data1; +}; +_filemanage.Sort = function (data, disp, asc) { + var sarr = []; + if (!data) { + return []; + } + for (var i in data) { + + switch (parseInt(disp)) { + case 0: + + if (data[i].type === 'folder') { + sarr[sarr.length] = ' ' + data[i].name.replace(/_/g, '') + ' ___' + i; + } else { + sarr[sarr.length] = data[i].name.replace(/_/g, '') + '___' + i; + } + break; + case 1: + sarr[sarr.length] = data[i].size + '___' + i; + break; + case 2: + if (data[i].type === 'folder') { + sarr[sarr.length] = ' ' + '___' + i; + } else { + sarr[sarr.length] = data[i].ext + data[i].type + '___' + i; + } + break; + case 3: + //asc=0; + sarr[sarr.length] = (data[i].dateline) + '___' + i; + break; + } + } + if (parseInt(disp) === 1) { + sarr = sarr.sort(function (a, b) { + return (parseInt(a) - parseInt(b)); + }); + + } else { + sarr = sarr.sort(); + } + var temp = {}; + var temp1 = ''; + if (asc > 0) { + for (i = 0; i < sarr.length; i++) { + temp1 = sarr[i].split('___'); + temp['icos_' + temp1[1]] = data[temp1[1]]; + } + } else { + for (i = sarr.length - 1; i >= 0; i--) { + temp1 = sarr[i].split('___'); + temp['icos_' + temp1[temp1.length - 1]] = data[temp1[temp1.length - 1]]; + } + } + return temp; +}; +_filemanage.get_template = function (sid, whole, disp, asc) { + var obj = _filemanage.cons[sid]; + var str = ''; + if (whole) { + switch (obj.view) { + case 0: + case 1: + case 2: + case 3: + str = jQuery('#template_middleicon').html(); + + break; + case 4: + str = jQuery('#template_detaillist').html(); + //替换 + break; + } + //替换参数 + str = str.replace(/\{asc_\d\}/g, obj.asc); + var regx = new RegExp('\{show_' + obj.disp + '\}', 'ig'); + str = str.replace(regx, 'inline-block'); + str = str.replace(/\{show_\d}/ig, 'none'); + } else { + switch (obj.view) { + case 0: + case 1: + case 2: + case 3: + str = jQuery('#template_middleicon .js-file-item-tpl').html(); + break; + case 4: + str = jQuery('#template_detaillist .js-file-item-tpl').html(); + break; + } + } + return str; + +}; + + + + + +_filemanage.property = function (rid, isfolder) { + var path = ''; + if (isfolder) { + var folder = _explorer.sourcedata.folder[rid]; + path = encodeURIComponent('fid_' + folder.path); + } else { + var dpaths = []; + var ico = null; + if (_filemanage.selectall.icos.length > 0 && jQuery.inArray(rid, _filemanage.selectall.icos) > -1) { + for (var i = 0; i < _filemanage.selectall.icos.length; i++) { + ico = _explorer.sourcedata.icos[_filemanage.selectall.icos[i]]; + dpaths.push(ico.dpath); + } + } else { + ico = _explorer.sourcedata.icos[rid]; + dpaths = [ico.dpath]; + } + path = encodeURIComponent(dpaths.join(',')); + } + showWindow('property', _explorer.appUrl + '&op=ajax&operation=property&paths=' + path); +}; + + + + + + + +_filemanage.NewIco = function (type, fid) { + if (!fid && !_filemanage.fid) { + return; + } + if (!fid) { + fid = _filemanage.fid; + } + + if (type === 'newFolder') { + showWindow('newFolder', _explorer.appUrl + '&op=ajax&operation=' + type + '&fid=' + fid); + } else if (type === 'newLink') { + showWindow('newLink', _explorer.appUrl + '&op=ajax&operation=' + type + '&fid=' + fid); + } else { + $.post(_explorer.appUrl + '&op=ajax&operation=newIco&type=' + type, { + 'fid': fid + }, function (data) { + if (data.msg === 'success') { + _explorer.sourcedata.icos[data.rid] = data; + _filemanage.cons['f-' + fid].CreateIcos(data); + _filemanage.rename(data.rid); + } else { + showDialog(data.error); + } + }, 'json'); + } +}; +_filemanage.rename = function (id) { + var ico = _explorer.sourcedata.icos[id]; + if (!ico) { + return; + } + var filemanage = _filemanage.cons[_filemanage.winid]; + + var el = jQuery('#file_text_' + id); + el.css('overflow', 'visible'); + el.closest('td').addClass('renaming'); + jQuery('#Icoblock_middleicon_' + id).find('.IcoText_div').css('overflow', 'visible'); + filemanage.oldtext = el.html(); + var html = ''; + if (filemanage.view > 3) { + html = ""; + } else { + html = ""; + } + + el.html(html); + //jQuery('#content_'+filemanage.winid+' .icoblank[icoid="'+id+'"]').css('z-index',-1); + var ele = jQuery('#input_' + id); + ele.select(); + ele.on('keyup', function (e) { + e = e ? e : event; + if (e.keyCode === 13) { + jQuery(document).trigger('mousedown.file_text_' + id); + } + }); + jQuery(document).on('mousedown.file_text_' + id, function (e) { + //var obj = event.srcElement ? event.srcElement : event.target; + e = e ? e : window.event; + var obj = e.srcElement ? e.srcElement : e.target; + if (jQuery(obj).closest('#file_text_' + id).length < 1) { + jQuery(document).off('.file_text_' + id); + var text = ele.val() || ""; + var emptymatch = /^\s*$/; + if(emptymatch.test(text)){ + showDialog(__lang.name_is_must,'error','',function(){ + el.html(filemanage.oldtext); + el.css('overflow', 'hidden'); + el.closest('td').removeClass('renaming'); + jQuery('#Icoblock_middleicon_' + id).find('.IcoText_div').css('overflow', 'hidden'); + }); + return false; + } + text = text.replace("\n", ''); + if (filemanage.oldtext !== text) { + _filemanage.Rename(id, text); + } else { + el.html(filemanage.oldtext); + el.css('overflow', 'hidden'); + el.closest('td').removeClass('renaming'); + jQuery('#Icoblock_middleicon_' + id).find('.IcoText_div').css('overflow', 'hidden'); + } + //jQuery('#content_'+filemanage.winid+' .icoblank[icoid="'+id+'"]').css('z-index',10); + } + }); + +}; + +_filemanage.Rename = function (rid, text) { + var ico = _explorer.sourcedata.icos[rid]; + var filemanage = _filemanage.cons[_filemanage.winid]; + jQuery.ajax({ + type: 'post', + url: _explorer.appUrl + '&op=dzzcp&do=rename', + data: { + "text": text, + "path": ico.dpath, + "t": (new Date().getTime()) + }, + dataType: "json", + success: function (json) { + if (json.rid) { + _explorer.sourcedata.icos[json.rid].name = json.name; + filemanage.data[json.rid].name = json.name; + filemanage.CreateIcos(_explorer.sourcedata.icos[json.rid], true); + } else { + jQuery('#file_text_' + rid).html(filemanage.oldtext); + if (json.error) { + showmessage(json.error, 'danger', 3000, 1); + } + } + }, + error: function () { + jQuery('#file_text_' + rid).html(filemanage.oldtext); + if (json.error) { + showmessage(json.error, 'danger', 3000, 1); + } + showmessage(__lang.js_network_error, 'danger', 3000, 1); + } + }); +}; + +//清空回收站 + + //还原所有文件 + + + + +_filemanage.showTemplatenoFile = function (containid, total) { + if (total < 1 && jQuery('#' + containid).find('.emptyPage').length == 0) { + jQuery(jQuery('#template_nofile_notice').html()).appendTo(jQuery('#' + containid)); + } else { + jQuery('#' + containid).find('.emptyPage').remove(); + } + } + //取消分享 + +_filemanage.delIco = function (rid, noconfirm) { + var filemanage = _filemanage.cons[_filemanage.winid]; + var containid = 'filemanage-' + _filemanage.winid; + var total = filemanage.total; + if (!rid) { + rid = _filemanage.selectall.icos[0]; + } + var icosdata = _explorer.sourcedata.icos[rid]; + if (!noconfirm) { + //var finallydelete = (_explorer.deletefinally == 1) ? true:false; + var finallydelete = false; + if (_filemanage.selectall.icos.length > 0 && jQuery.inArray(rid, _filemanage.selectall.icos) > -1) { + if (_explorer.sourcedata.icos[_filemanage.selectall.icos[0]].isdelete > 0 || (_explorer.sourcedata.icos[_filemanage.selectall.icos[0]].bz && _explorer.sourcedata.icos[_filemanage.selectall.icos[0]].bz)) { + Confirm((finallydelete) ?__lang.js_finallydelete_selectall:__lang.js_delete_selectall, function () { + _filemanage.delIco(rid, 1); + }); + } else { + Confirm((finallydelete) ? __lang.js_finallydelete_selectall_recycle : __lang.js_delete_selectall_recycle, function () { + _filemanage.delIco(rid, 1); + }); + } + return; + } else if (_explorer.sourcedata.icos[rid].type === 'folder' && _explorer.sourcedata.folder[_explorer.sourcedata.icos[rid].oid] && _explorer.sourcedata.folder[_explorer.sourcedata.icos[rid].oid].iconum) { + if (_explorer.sourcedata.icos[rid].isdelete > 0 || (_explorer.sourcedata.icos[rid].bz && _explorer.sourcedata.icos[rid].bz)) { + Confirm((finallydelete) ? __lang.js_finallydelete_folder.replace('{name}', _explorer.sourcedata.icos[rid].name):__lang.js_delete_folder.replace('{name}', _explorer.sourcedata.icos[rid].name), function () { + _filemanage.delIco(rid, 1); + }); + } else { + Confirm((finallydelete) ? __lang.js_finallydelete_folder_recycle.replace('{name}', _explorer.sourcedata.icos[rid].name):__lang.js_delete_folder_recycle.replace('{name}', _explorer.sourcedata.icos[rid].name), function () { + _filemanage.delIco(rid, 1); + }); + } + return; + } else { + if (_explorer.sourcedata.icos[rid].isdelete > 0 || (_explorer.sourcedata.icos[rid].bz && _explorer.sourcedata.icos[rid].bz)) { + Confirm((finallydelete) ? __lang.js_finallydelete_confirm.replace('{name}', _explorer.sourcedata.icos[rid].name) : __lang.js_delete_confirm.replace('{name}', _explorer.sourcedata.icos[rid].name), function () { + _filemanage.delIco(rid, 1); + }); + } else { + Confirm((finallydelete) ? __lang.js_finallydelete_confirm_recycle.replace('{name}', _explorer.sourcedata.icos[rid].name): __lang.js_delete_confirm_recycle.replace('{name}', _explorer.sourcedata.icos[rid].name), function () { + _filemanage.delIco(rid, 1); + }); + } + return; + } + } + var path = []; + var data = {}; + if (_filemanage.selectall.icos.length > 0 && jQuery.inArray(rid, _filemanage.selectall.icos) > -1) { + if (icosdata.bz && icosdata.bz) { + + for (var i in _filemanage.selectall.icos) { + path.push(_explorer.sourcedata.icos[_filemanage.selectall.icos[i]].dpath); + } + data = { + rids: path, + 'bz': icosdata.bz + }; + } else { + + for (var i in _filemanage.selectall.icos) { + path.push(_explorer.sourcedata.icos[_filemanage.selectall.icos[i]].dpath); + } + data = { + rids: path + }; + } + } else { + if (icosdata.bz && icosdata.bz) { + data = { + rids: [icosdata.dpath], + 'bz': icosdata.bz + }; + } else { + data = { + rids: [icosdata.dpath] + }; + } + } + var url = _explorer.appUrl + '&op=dzzcp&do=deleteIco&t=' + new Date().getTime(); + var progress = '
      '; + showmessage('

      ' + __lang.deleting_not_please_close + '

      ' + progress, 'success', 0, 1, 'right-bottom'); + jQuery.post(url, data, function (json) { + var rids = []; + for (var i in json.msg) { + if (json.msg[i] === 'success') { + showmessage(_explorer.sourcedata.icos[i].name + __lang.delete_success, 'success', 1000, 1, 'right-bottom'); + //_filemanage.removerid(i); + rids.push(i); + total--; + _filemanage.showTemplatenoFile(containid, total); + + } else { + showmessage(json.msg[i], 'error', 3000, 1, 'right-bottom'); + } + } + _filemanage.removeridmore(rids); + + }, 'json'); +}; \ No newline at end of file diff --git a/dzz/system/scripts/mobile/appevent.js b/dzz/system/scripts/mobile/appevent.js new file mode 100644 index 0000000..365e9b4 --- /dev/null +++ b/dzz/system/scripts/mobile/appevent.js @@ -0,0 +1,214 @@ +/** + * Created by a on 2018/5/3. + */ +(function($){ + var touch = {}, + touchTimeout, tapTimeout, swipeTimeout, longTapTimeout, + longTapDelay = 500, + gesture, + down, up, move, + eventMap, + initialized = false + + function swipeDirection(x1, x2, y1, y2) { + return Math.abs(x1 - x2) >= + Math.abs(y1 - y2) ? (x1 - x2 > 0 ? 'Left' : 'Right') : (y1 - y2 > 0 ? 'Up' : 'Down') + } + + function longTap() { + longTapTimeout = null + if (touch.last) { + touch.el.trigger('longTap') + touch = {} + } + } + + function cancelLongTap() { + if (longTapTimeout) clearTimeout(longTapTimeout) + longTapTimeout = null + } + + function cancelAll() { + if (touchTimeout) clearTimeout(touchTimeout) + if (tapTimeout) clearTimeout(tapTimeout) + if (swipeTimeout) clearTimeout(swipeTimeout) + if (longTapTimeout) clearTimeout(longTapTimeout) + touchTimeout = tapTimeout = swipeTimeout = longTapTimeout = null + touch = {} + } + + function isPrimaryTouch(event){ + return (event.pointerType == 'touch' || + event.pointerType == event.MSPOINTER_TYPE_TOUCH) + && event.isPrimary + } + + function isPointerEventType(e, type){ + return (e.type == 'pointer'+type || + e.type.toLowerCase() == 'mspointer'+type) + } + + // helper function for tests, so they check for different APIs + function unregisterTouchEvents(){ + if (!initialized) return + $(document).off(eventMap.down, down) + .off(eventMap.up, up) + .off(eventMap.move, move) + .off(eventMap.cancel, cancelAll) + $(window).off('scroll', cancelAll) + cancelAll() + initialized = false + } + + function setup(__eventMap){ + var now, delta, deltaX = 0, deltaY = 0, firstTouch, _isPointerType + + unregisterTouchEvents() + + eventMap = (__eventMap && ('down' in __eventMap)) ? __eventMap : + ('ontouchstart' in document ? + { 'down': 'touchstart', 'up': 'touchend', + 'move': 'touchmove', 'cancel': 'touchcancel' } : + 'onpointerdown' in document ? + { 'down': 'pointerdown', 'up': 'pointerup', + 'move': 'pointermove', 'cancel': 'pointercancel' } : + 'onmspointerdown' in document ? + { 'down': 'MSPointerDown', 'up': 'MSPointerUp', + 'move': 'MSPointerMove', 'cancel': 'MSPointerCancel' } : false) + + // No API availables for touch events + if (!eventMap) return + + if ('MSGesture' in window) { + gesture = new MSGesture() + gesture.target = document.body + + $(document) + .bind('MSGestureEnd', function(e){ + var swipeDirectionFromVelocity = + e.velocityX > 1 ? 'Right' : e.velocityX < -1 ? 'Left' : e.velocityY > 1 ? 'Down' : e.velocityY < -1 ? 'Up' : null + if (swipeDirectionFromVelocity) { + touch.el.trigger('swipe') + touch.el.trigger('swipe'+ swipeDirectionFromVelocity) + } + }) + } + + down = function(e){ + if((_isPointerType = isPointerEventType(e, 'down')) && + !isPrimaryTouch(e)) return + firstTouch = _isPointerType ? e :((e.touches) ? e.touches[0]:e.originalEvent.changedTouches[0]) + if (e.touches && e.touches.length === 1 && touch.x2) { + // Clear out touch movement data if we have it sticking around + // This can occur if touchcancel doesn't fire due to preventDefault, etc. + touch.x2 = undefined + touch.y2 = undefined + } + now = Date.now() + delta = now - (touch.last || now) + touch.el = jQuery('tagName' in firstTouch.target ? + firstTouch.target : firstTouch.target.parentNode) + touchTimeout && clearTimeout(touchTimeout) + touch.x1 = firstTouch.pageX + touch.y1 = firstTouch.pageY + if (delta > 0 && delta <= 250) touch.isDoubleTap = true + touch.last = now + longTapTimeout = setTimeout(longTap, longTapDelay) + // adds the current touch contact for IE gesture recognition + if (gesture && _isPointerType) gesture.addPointer(e.pointerId) + } + + move = function(e){ + if((_isPointerType = isPointerEventType(e, 'move')) && + !isPrimaryTouch(e)) return + firstTouch = _isPointerType ? e :((e.touches) ? e.touches[0]:e.originalEvent.changedTouches[0]) + cancelLongTap() + touch.x2 = firstTouch.pageX + touch.y2 = firstTouch.pageY + + deltaX += Math.abs(touch.x1 - touch.x2) + deltaY += Math.abs(touch.y1 - touch.y2) + } + + up = function(e){ + if((_isPointerType = isPointerEventType(e, 'up')) && + !isPrimaryTouch(e)) return + cancelLongTap() + + // swipe + if ((touch.x2 && Math.abs(touch.x1 - touch.x2) > 30) || + (touch.y2 && Math.abs(touch.y1 - touch.y2) > 30)) + + swipeTimeout = setTimeout(function() { + if (touch.el){ + touch.el.trigger('swipe') + touch.el.trigger('swipe' + (swipeDirection(touch.x1, touch.x2, touch.y1, touch.y2))) + } + touch = {} + }, 0) + + // normal tap + else if ('last' in touch) + // don't fire tap when delta position changed by more than 30 pixels, + // for instance when moving to a point and back to origin + if (deltaX < 30 && deltaY < 30) { + // delay by one tick so we can cancel the 'tap' event if 'scroll' fires + // ('tap' fires before 'scroll') + tapTimeout = setTimeout(function() { + + // trigger universal 'tap' with the option to cancelTouch() + // (cancelTouch cancels processing of single vs double taps for faster 'tap' response) + var event = jQuery.Event('tap') + event.cancelTouch = cancelAll + // [by paper] fix -> "TypeError: 'undefined' is not an object (evaluating 'touch.el.trigger'), when double tap + if (touch.el) touch.el.trigger(event) + + // trigger double tap immediately + if (touch.isDoubleTap) { + if (touch.el) touch.el.trigger('doubleTap') + touch = {} + } + + // trigger single tap after 250ms of inactivity + else { + touchTimeout = setTimeout(function(){ + touchTimeout = null + if (touch.el) touch.el.trigger('singleTap') + touch = {} + }, 250) + } + }, 0) + } else { + touch = {} + } + deltaX = deltaY = 0 + } + + jQuery(document).on(eventMap.up, up) + .on(eventMap.down, down) + .on(eventMap.move, move) + + // when the browser window loses focus, + // for example when a modal dialog is shown, + // cancel all ongoing events + jQuery(document).on(eventMap.cancel, cancelAll) + + // scrolling the window indicates intention of the user + // to scroll, not tap or swipe, so cancel all ongoing events + jQuery(window).on('scroll', cancelAll) + + initialized = true + } + + ;['swipe', 'swipeLeft', 'swipeRight', 'swipeUp', 'swipeDown', + 'doubleTap', 'tap', 'singleTap', 'longTap'].forEach(function(eventName){ + jQuery.fn[eventName] = function(callback){return this.on(eventName, callback) } + /*jQuery.fn[eventName] = function(callback){ + return jQuery(document).off(eventName).on(eventName,this,callback) + }*/ + }) + + jQuery.touch = { setup: setup } + + jQuery(document).ready(setup) +})(jQuery) diff --git a/dzz/system/scripts/mobile/explorer.js b/dzz/system/scripts/mobile/explorer.js new file mode 100644 index 0000000..739cb9b --- /dev/null +++ b/dzz/system/scripts/mobile/explorer.js @@ -0,0 +1,3 @@ +/** + * Created by a on 2018/5/23. + */ diff --git a/dzz/system/scripts/mobile/file_keep.js b/dzz/system/scripts/mobile/file_keep.js new file mode 100644 index 0000000..c69af76 --- /dev/null +++ b/dzz/system/scripts/mobile/file_keep.js @@ -0,0 +1,305 @@ +var _filemanage = {}; +_filemanage = function (json) { + _filemanage.formhash = json.formhash || ''; //FORMHASH + _filemanage.type = json.type || 0;//文件选择类型,0为选择文件,1为保存文件,2为选择位置 + _filemanage.mulitype = json.mulitype || 0;//是否允许多选,默认不允许 + _filemanage.callback_url = json.callback_url; + _filemanage.token = json.token; + _filemanage.defaultfilename = json.filename; + if (_filemanage.type == 2) { + _filemanage.allowselecttype = {'folder': ['文件夹', ['folder'], 'selected']} + } else { + _filemanage.allowselecttype = json.exttype || '';//允许筛选文件类型 + } + //默认筛选文件类型 + if (_filemanage.allowselecttype) { + for (var o in _filemanage.allowselecttype) { + if (_filemanage.allowselecttype[o][2] == 'selected') { + _filemanage.defaultexttype = _filemanage.allowselecttype[o][1].join(',').toLowerCase(); + } + } + } else { + _filemanage.defaultexttype = ''; + } + _filemanage.defaultfilename = json.defaultfilename || ''; +}; +_filemanage.hash = ''; +_filemanage.getConfig = function (json, callback) { + new _filemanage(json); + _filemanage.hashHandler(); + _filemanage.initEvents(); + if (typeof callback === "function") { + callback(json); + } + //}); +}; +_filemanage.selector = [];//选择文件rid +_filemanage.dataparam = {};//请求文件条件参数 +_filemanage.initEvents = function () { //初始化页面事件 + _filemanage.height(); + //hashchange事件 + $(window).on('hashchange', function () { + _filemanage.hashHandler(); + }); + $(document).off('click.document-data').on('click.document-data', '.document-data', function () { + location.hash = jQuery(this).data('hash'); + }); + //右侧加载完成事件 + $(document).off('ajaxLoad.middleContent').on('ajaxLoad.middleContent', function () { + var hash = location.hash.replace(/^#/i, ''); + var op = hash.replace(/&(.+?)$/ig, ''); + if (hash.indexOf('search') == 0) { + $('#footermenu').html(''); + } else if (_filemanage.fid) { + $('#footermenu').html($('#footer_menu').find('.filelistmenu').html()); + } else { + $('#footermenu').html($('#footer_menu').find('.formatmenu').html()); + } + //设置类型 + if (_filemanage.allowselecttype) { + var typejson = _filemanage.allowselecttype, typehtml = '', selecttype = '', selectval = ''; + for (var o in typejson) { + var exts = typejson[o][1].join(',').toLowerCase(); + if (typejson[o][2] == 'selected') { + selecttype = typejson[o][0]; + selectval = exts; + typehtml += ''; + } else { + typehtml += ''; + } + + + } + $('#footermenu .typeext').html(typehtml); + } + //加载更多 + if (_filemanage.dataparam.page) { + + //单页滚动加载 + var loading = false; //状态标记 + $(document.body).infinite().on("infinite", function () { + if (loading) return; + loading = true; + if (_filemanage.dataparam.page) { + $.post(_filemanage.appUrl + '&do=' + _filemanage.hash, _filemanage.dataparam, function (data) { + $('#containsdata').html(data); + $('#middleconMenu .filelist').append($('#containsdata').find('.datacontent').html()); + $('#containsdata').empty(); + if (!_filemanage.dataparam.page) { + loading = false; + } else { + loading = true; + } + }) + + } else { + jQuery(document.body).destroyInfinite(); + } + }); + } + }); + +}; +_filemanage.height = function () { + var h = $(document).outerHeight(true); + var h1 = $('.weui-file-keep').outerHeight(true); + var h2 = $('.weui-file-footer').outerHeight(true); + $('#middleconMenu').css('height', h - h1 - h2); +} +_filemanage.hashHandler = function () { //处理页面hash变化 + var hash = location.hash; + hash = hash.replace(/^#/i, ''); + if (!hash) { + hash = 'home'; + } + if (hash === _filemanage.hash) { + return false; + } + if (hash !== _filemanage.hash) { + _filemanage.getContent(hash, $('#middleconMenu')); + _filemanage.hash = hash; + } else { + _filemanage.hash = hash; + } + return false; +}; +_filemanage.getContent = function (hash, container) { //处理页面加载 + var url = _filemanage.appUrl + '&do=' + hash; + _filemanage.dataparam = {}; + if (_filemanage.defaultexttype) { + _filemanage.dataparam.exts = _filemanage.defaultexttype; + } + $.post(url, _filemanage.dataparam, function (data) { + $('#containsdata').html(data); + $('#middleconMenu').html($('#containsdata').find('.datacontent').html()); + if ($('#containsdata').find('.addresscontent').length) { + $('#addressdata').html($('#containsdata').find('.addresscontent').html()); + $('#addressdata').removeClass('hide'); + }else if(_filemanage.hash.indexOf('search') == 0){ + $('#addressdata').html(''); + $('#addressdata').removeClass('hide'); + } + $('#containsdata').empty(); + $(document).trigger('ajaxLoad.middleContent', [hash]); + }) + +}; +//打开文件夹 +$(document).off('tap.openhref').on('tap.openhref', '.document-data', function () { + var hash = $(this).data('hash'); + location.hash = hash; +}) +//排序 +$(document).off('tap.sort').on('tap.sort', '.sort_menu .sort', function () { + var sort = $(this).data('sort'); + if (_filemanage.dataparam.disp == sort) _filemanage.dataparam.asc = (_filemanage.dataparam.asc > 0) ? 0 : 1; + else _filemanage.dataparam.disp = sort; + _filemanage.dataparam.page = 1; + _filemanage.dataparam.datatotal = 0; + if (_filemanage.defaultexttype) { + _filemanage.dataparam.exts = _filemanage.defaultexttype; + } + $.post(_filemanage.appUrl + '&do=' + _filemanage.hash, _filemanage.dataparam, function (data) { + $('#containsdata').html(data); + $('#middleconMenu').html($('#containsdata').find('.datacontent').html()); + if ($('#containsdata').find('.addresscontent').length) { + $('#addressdata').html($('#containsdata').find('.addresscontent').html()); + $('#addressdata').removeClass('hide'); + } + $('#containsdata').empty(); + $('.sort_menu').addClass('hide'); + }) +}) +//类型筛选 +$(document).off('tap.exts').on('tap.exts', '.weui-check__label', function () { + var obj = $(this); + var exts = obj.find('.weui-cell__ft input').val(); + _filemanage.dataparam.exts = exts; + _filemanage.dataparam.page = 1; + _filemanage.dataparam.datatotal = 0; + $.post(_filemanage.appUrl + '&do=' + _filemanage.hash, _filemanage.dataparam, function (data) { + $('#containsdata').html(data); + $('#middleconMenu').html($('#containsdata').find('.datacontent').html()); + if ($('#containsdata').find('.addresscontent').length) { + $('#addressdata').html($('#containsdata').find('.addresscontent').html()); + $('#addressdata').removeClass('hide'); + } + $('#containsdata').empty(); + obj.closest('.typeext').addClass('hide'); + }) + +}) +//搜索文件 +$(document).off('tap.search').on('tap.search', '.search', function () { + var hash = 'search', oldhash = _filemanage.hash; + oldhash = oldhash.replace(/&/g, '-'); + if (_filemanage.fid) { + hash += '&fid=' + _filemanage.fid + '&oldhash=' + oldhash; + } + location.hash = hash; +}) + +//文件选择 +$(document).off('tap.selectFile').on('tap.selectFile', '.document-filelist', function () { + var obj = $(this), rid = obj.data('rid'), index = $.inArray(rid, _filemanage.selector); + if (_filemanage.mulitype) { + if (obj.find('.weui-cells_checkbox .weui-check').prop('checked')) { + obj.find('.weui-cells_checkbox').addClass('hide'); + obj.find('.weui-cells_checkbox .weui-check').prop('checked', false); + if (index != -1) { + _filemanage.selector.splice(index, 1); + } + } else { + obj.find('.weui-cells_checkbox').removeClass('hide'); + obj.find('.weui-cells_checkbox .weui-check').prop('checked', true); + if (index == -1) { + _filemanage.selector.push(rid); + } + } + } else { + if (obj.find('.weui-cells_checkbox .weui-check').prop('checked')) { + $('.weui-cells_checkbox').each(function () { + $(this).find('.weui-check').prop('checked', false); + $(this).addClass('hide'); + }) + if (index != -1) { + _filemanage.selector.splice(index, 1); + } + } else { + $('.weui-cells_checkbox').each(function () { + $(this).find('.weui-check').prop('checked', false); + $(this).addClass('hide'); + }) + obj.find('.weui-cells_checkbox').removeClass('hide'); + obj.find('.weui-cells_checkbox .weui-check').prop('checked', true); + if (index == -1) { + _filemanage.selector.push(rid); + } + } + + } + + +}) +//新建文件夹 +jQuery(document).off('tap.docreate').on('tap.docreate', '.new-folder', function (placeholder) { + var obj = $(this); + $.prompt({ + title: '新建文件夹', + placeholder: '新建文件夹', + empty: false, // 是否允许为空 + onOK: function (input) { + var foldername = $('#weui-prompt-input').val(), + fid = _filemanage.fid, emojpatt = /[\ud800-\udbff][\udc00-\udfff]/gi; + if (emojpatt.test(foldername)) { + $.toast('文件名不合法!', "cancel"); + $('#weui-prompt-input').val(''); + return false; + } + $.post(_filemanage.appUrl + '&do=ajax&operation=createFolder', { + 'foldername': foldername, + 'fid': fid, + }, function (data) { + if (data['error']) { + $.toast(data['error'], 1000); + } else { + var html = '
      ' + + '
      ' + + ' ' + + '

      ' + data.name + '

      ' + + '文件:0, ' + + '文件夹:0

      ' + + '
      '; + $('.filelist').prepend(html); + $.toast("操作成功"); + } + }, 'json'); + + }, + onCancel: function () { + $('#weui-prompt-input').val(''); + obj.closest('div.weui-dropup').addClass('hide'); + obj.closest('div.weui-dropup').siblings('.background-none').hide(); + obj.closest('div.weui-dropup').siblings('.weui-footer-new-folder').find('p').css('color', '#666'); + } + }); +}); +//弹出框点击其他地方消失 +jQuery(document).off('tap.confirm').on('tap.confirm', '.background-none', function () { + $(this).prev('.weui-dropup').addClass('hide'); + $(this).prevAll('.weui-footer-none').find('p').css({'color': '#666666'}); + $(this).hide(); +}) +//排序菜单 +jQuery(document).off('tap.array').on('tap.array', '.weui-footer-sort', function () { + var dropup = $(this).next('.weui-dropup'); + if (dropup.hasClass('hide')) { + dropup.removeClass('hide'); + dropup.next('.background-none').show(); + $(this).find('p').css({'color': '#3779ff'}); + } +}) \ No newline at end of file diff --git a/dzz/system/scripts/select-file.js b/dzz/system/scripts/select-file.js new file mode 100644 index 0000000..7cde104 --- /dev/null +++ b/dzz/system/scripts/select-file.js @@ -0,0 +1,1665 @@ +var _selectfile = {}; +_selectfile = function (id, data, param) { + var page = isNaN(parseInt(param.page)) ? 1 : parseInt(param.page); + var total = isNaN(parseInt(param.total)) ? 1 : parseInt(param.total); + this.string = "_selectfile.cons." + this.id; + this.container = param.container; + this.total = total; + //alert('filemangeid='+id); + this.bz = param.bz || ''; //标志是那个api的数据 + + this.perpage = param.perpage; + this.totalpage = Math.ceil(this.total / this.perpage); + this.totalpage = this.totalpage < 1 ? 1 : this.totalpage; + this.id = id; + this.string = "_selectfile.cons." + this.id; + //alert(this.id); + var sidarr = id.split('-'); + if (sidarr[0] == 'f') this.fid = sidarr[1]; + else this.fid = 0; + this.subfix = sidarr[0]; //记录当前的sid前缀 f、cat等 + this.winid = id; + this.keyword = param.keyword; + this.localsearch = param.localsearch; + + this.view = isNaN(parseInt(param.view)) ? _selectfile.view : parseInt(param.view); + this.disp = isNaN(parseInt(param.disp)) ? _selectfile.disp : parseInt(param.disp); + + this.asc = param.asc; //_selectfile.asc; + this.detailper = _selectfile.detailper; + if (!this.data) this.data = {}; + this.data = data; + this.currentpage = page; + this.container = param.container; + this.odata = []; + this.sum = 0; + _selectfile.cons[this.id] = this; + _selectfile.fid = this.fid; + _selectfile.subfix = this.subfix; + _selectfile.winid = this.id; + this.pageloadding = true; + this.exts = param.exts || ''; + this.tags = param.tags || ''; + this.before = param.before || ''; + this.after = param.after || ''; + this.fids = param.fids || ''; + this.gid = param.gid || ''; +} +_selectfile.selectall = { + position: {}, + container: '', + icos: [] +}; +_selectfile.saveurl = 'index.php?mod=system&op=save'; +_selectfile.speed = 5; +_selectfile.perpage = 100; //每页最多个数; +_selectfile.cons = {}; +_selectfile.view = 4; +_selectfile.disp = 0; +_selectfile.asc = 1; +_selectfile.detailper = [47, 10, 20, 15, 8]; //依此对应:名称 大小 类型 修改时间; +_selectfile.onmousemove = null; +_selectfile.onmouseup = null; +_selectfile.onselectstart = 1; +_selectfile.stack_data = {}; +_selectfile.showicosTimer = {}; +_selectfile.apicacheTimer = {}; +_selectfile.infoPanelUrl = ''; +_selectfile.viewstyle = ['bigicon', 'middleicon', 'middlelist', 'smalllist', 'detaillist']; +//获取中间高度 +_selectfile.select_Scrolly = function (els) { + var clientHeight = document.documentElement.clientHeight; + if (!els) { + els = $('.selectScroll-y'); + } + els.each(function () { + var els = $(this); + var pos = els.offset(); + var height = clientHeight - pos.top - 100; + if (_explorer.type > 0) { + var height = clientHeight - pos.top - 140; + } + els.css({ + 'overflow': 'auto', + 'height': height, + }); + new PerfectScrollbar(this); + }) + +} + +//iocn图标切换 + +_selectfile.icon = function () { +//修改初始化时的排列方式指示 + jQuery('.icons-thumbnail').attr('iconview', obj.view).find('.dzz').removeClass('dzz-view-module').removeClass('dzz-view-list').addClass(obj.view === 2 ? 'dzz-view-list' : 'dzz-view-module'); +//jQuery('.icons-thumbnail').attr('iconview', obj.view).find('.dzz').attr('data-original-title',obj.view === 2 ? __lang.deltail_lsit : __lang.medium_icons); + jQuery('.icons-thumbnail').attr('folderid', obj.id); +} +//替换列表图和缩略图 +_selectfile.get_template = function (sid, whole, disp, asc) { + var obj = _selectfile.cons[sid]; + var str = ''; + if (whole) { + switch (obj.view) { + case 0: + case 1: + case 2: + case 3: + str = jQuery('#template_middleicon').html(); + + break; + case 4: + str = jQuery('#template_detaillist').html(); + //替换 + break; + } + //替换参数 + str = str.replace(/\{asc_\d\}/g, obj.asc); + var regx = new RegExp('\{show_' + obj.disp + '\}', 'ig'); + str = str.replace(regx, 'inline-block'); + str = str.replace(/\{show_\d}/ig, 'none'); + } else { + switch (obj.view) { + case 0: + case 1: + case 2: + case 3: + str = jQuery('#template_middleicon .js-file-item-tpl').html(); + break; + case 4: + str = jQuery('#template_detaillist .js-file-item-tpl').html(); + break; + } + } + return str; + +}; +_selectfile.prototype.CreateIcos = function (data, flag) { + var self = this; + var containerid = 'filemanage-' + this.winid; + if (!flag && this.data[data.rid]) { //如果已经存在 + var el1 = jQuery('#' + containerid + ' .Icoblock[rid=' + data.rid + ']'); + _selectfile.glow(el1); + return; + } + this.data[data.rid] = data; + var template = _selectfile.get_template(this.id); + //创建图标列表 + if (data.flag) { + if (!data.img) { + data.img = 'dzz/styles/thame/' + _explorer.thame.system.folder + '/system/' + data.flag + '.png'; + } + data.error = 'dzz/images/default/system/' + data.flag + '.png'; + } else if (data.type === 'folder') { + if (data.gid > 0) { + data.icon = data.img ? data.img : data.icon; + data.error = data.icon || 'dzz/images/default/system/folder-read.png'; + data.img = data.icon ? data.icon.replace('dzz/images/default', 'dzz/styles/thame/' + _explorer.thame.system.folder) : 'dzz/styles/thame/' + _explorer.thame.system.folder + '/system/folder-read.png'; + } else { + data.icon = data.img ? data.img : data.icon; + data.error = data.icon || 'dzz/images/default/system/folder.png'; + data.img = data.icon ? ((data.icon).replace('dzz/images/default', 'dzz/styles/thame/' + _explorer.thame.system.folder)) : 'dzz/styles/thame/' + _explorer.thame.system.folder + '/system/folder.png'; + } + } else if (data.type === 'shortcut' && data.ttype === 'folder') { + if (data.tdata.gid > 0) { + data.error = data.tdata.img || 'dzz/images/default/system/folder-read.png'; + data.img = (data.tdata.img + '').replace('dzz/images/default', 'dzz/styles/thame/' + _explorer.thame.system.folder); + } else { + data.error = data.tdata.img || 'dzz/images/default/system/folder.png'; + data.img = data.tdata.img ? ((data.tdata.img + '').replace('dzz/images/default', 'dzz/styles/thame/' + _explorer.thame.system.folder)) : 'dzz/styles/thame/' + _explorer.thame.system.folder + '/system/folder.png'; + } + } else { + data.error = 'dzz/images/default/icodefault.png'; + } + var html = template.replace(/\{name\}/g, data.name); + html = html.replace(/\{rid\}/g, data.rid); + html = html.replace(/tsrc=\"\{img\}\"/g, 'src="{img}"'); + html = html.replace(/\{img\}/g, data.img); + + html = html.replace(/\{username\}/g, data.username); + html = html.replace(/\{replynum\}/g, data.replynum ? data.replynum : '0'); + + + html = html.replace(/\{zIndex\}/g, 10); + html = html.replace(/\{error\}/g, data.error); + html = html.replace(/\{size\}/g, ((data.type === 'folder' || data.type === 'app' || data.type === 'shortcut') ? '' : data.fsize)); + html = html.replace(/\{fsize\}/g, data.fsize); + html = html.replace(/\{type\}/g, data.type); + html = html.replace(/\{ftype\}/g, data.ftype); + html = html.replace(/\{dateline\}/g, data.dateline); + html = html.replace(/\{fdateline\}/g, data.fdateline); + html = html.replace(/\{flag\}/g, data.flag); + html = html.replace(/\{position\}/g, data.relpath); + html = html.replace(/\{dpath\}/g, data.dpath); + html = html.replace(/\{from\}/g, data.from); + html = html.replace(/\{delusername\}/g, data.username); + html = html.replace(/\{deldateline\}/g, data.deldateline); + html = html.replace(/\{finallydate\}/g, data.finallydate); + html = html.replace(/\{views\}/g, data.views); + html = html.replace(/\{times\}/g, data.times); + html = html.replace(/\{downs\}/g, data.downs); + html = html.replace(/\{expireday\}/g, data.expireday); + html = html.replace(/\{sharelink\}/g, data.sharelink); + html = html.replace(/dsrc=\"\{qrcode\}\"/g, 'src="{qrcode}"'); + html = html.replace(/dsrc='\{qrcode\}'/g, "src='{qrcode}'"); + html = html.replace(/\{qrcode\}/g, data.qrcode); + html = html.replace(/\{password\}/g, data.password); + html = html.replace(/\{count\}/g, data.count); + if (data.status < 0) { + var sharestatus = '(' + data.fstatus + ')'; + } else { + sharestatus = ''; + } + //收藏 + if (data.collect) { + var collectstatus = ''; + } else { + var collectstatus = ''; + } + html = html.replace(/\{collectstatus\}/g, collectstatus); + html = html.replace(/\{sharestatus\}/g, sharestatus); + if (data.type !== 'image') { + html = html.replace(/data-start=\"image\".+?data-end=\"image\"/ig, ''); + } + var position_hash = ''; + if (data.gid > 0) { + position_hash = data.pfid > 0 ? '#group&do=file&gid=' + data.gid + '&fid=' + data.pfid : '#group&gid=' + data.gid; + } else { + position_hash = '#home&do=file&fid=' + data.pfid; + } + html = html.replace(/\{position_hash\}/g, position_hash); + //处理操作按钮 + //html=this.filterOPIcon(data,html); + var el = null; + if (flag && jQuery('.Icoblock[rid=' + data.rid + ']').length > 0) { + jQuery('.Icoblock[rid=' + data.rid + ']').replaceWith(html); + el = jQuery('.Icoblock[rid=' + data.rid + ']') + } else { +// jQuery(html).appendTo('#' + containerid + ' .js-file-item-tpl'); + jQuery('#' + containerid + ' .js-file-item-tpl').prepend(html); + el = jQuery('.Icoblock[rid=' + data.rid + ']'); + jQuery('#shareinfo_' + data.rid).on('click', function (e) { + return false; + }); + + } + + /* //检查下载和分享菜单 + //判断下载权限 + if (!_explorer.Permission('download', data)) { + el.find('.download').remove(); + } + + //判断分享权限 + if (!_explorer.Permission('share', data)) { + el.find('.share').remove(); + } +*/ + if (this.view < 4) { + + el.on('mouseenter', function () { + jQuery(this).addClass('hover'); + + }); + el.on('mouseleave', function () { + jQuery(this).removeClass('hover'); + + }); + + //处理多选框 + //if(!_selectfile.fid || _explorer.Permission_Container('multiselect',this.fid)){ + el.find('.icoblank_rightbottom').on('click', function () { + var flag = true; + var ell = jQuery(this).parent(); + var rid = ell.attr('rid'); + if (ell.hasClass('Icoselected')) { + flag = false; + } + _select.SelectedStyle('filemanage-' + self.id, rid, flag, true); + + return false; + }); + //处理操作按钮 + el.on('click', function (e) { + var tag = e.srcElement ? e.srcElement : e.target; + if (/input|textarea/i.test(tag.tagName)) { + return true; + } + var Item = jQuery(this).closest('.Icoblock'); + var rid = Item.attr('rid'); + if( _explorer.sourcedata.icos[rid].type == 'folder'){ + _selectfile.Open(rid); + return false; + } + var flag = true; + if ((_hotkey.ctrl && Item.hasClass('Icoselected')) || (Item.hasClass('Icoselected') && _selectfile.selectall.icos.length === 1 && _selectfile.selectall.icos[0] === rid)) { + flag = false; + } + var multi = (_hotkey.ctrl && _explorer.mulitype) ? true : false; + _select.SelectedStyle('filemanage-' + self.id, jQuery(this).attr('rid'), flag, multi); + //self.createBottom(); + return false; + }); + if (this.total == 0 && jQuery('#' + containerid).find('.emptyPage').length == 0) { + jQuery(jQuery('#template_nofile_notice').html()).appendTo(jQuery('#' + containerid)); + } else { + jQuery('#' + containerid).find('.emptyPage').remove(); + } + + } else { //详细列表时 + + + el.bind('mouseenter', function () { + jQuery(this).addClass('hover'); + //return false; + }); + el.bind('mouseleave', function () { + jQuery(this).removeClass('hover'); + //return false; + }); + + //点击图片和名称直接打开 + + el.on('click', function (e) { + e = e ? e : window.event; + var tag = e.srcElement ? e.srcElement : e.target; + if (/input|textarea/i.test(tag.tagName)) { + return true; + } + var Item = jQuery(this).closest('.Icoblock'); + var rid = Item.attr('rid'); + if(_explorer.sourcedata.icos[rid].type == 'folder'){ + _selectfile.Open(rid); + return false; + } + var flag = true; + if ((_hotkey.ctrl && Item.hasClass('Icoselected')) || (Item.hasClass('Icoselected') && _selectfile.selectall.icos.length === 1 && _selectfile.selectall.icos[0] === rid)) { + flag = false; + } + var multi = (_hotkey.ctrl && _explorer.mulitype) ? true : false; + _select.SelectedStyle('filemanage-' + self.id, Item.attr('rid'), flag, multi); + return false; + }); + + } + el.on('dblclick', function (e) { + if (!_selectfile.fid && _selectfile.winid == 'recycle-list') return true; + var tag = e.srcElement ? e.srcElement : e.target; + if (/input|textarea/i.test(tag.tagName)) { + return true; + } + _selectfile.Open(el.attr('rid')); + dfire('click'); + return false; + }); + //设置邮件菜单 + el.on('contextmenu', function (e) { + e = e ? e : window.event; + var tag = e.srcElement ? e.srcElement : e.target; + if (/input|textarea/i.test(tag.tagName)) { + return true; + } + _contextmenu.right_ico(e, jQuery(this).attr('rid')); + return false; + }); + //检测已选中 + if (jQuery.inArray(data.rid, _selectfile.selectall.icos) > -1) { + el.addClass('Icoselected'); + } + //处理按钮 + + if (!flag) { + _selectfile.glow(el); + this.sum++; + this.total++; + jQuery('#' + containerid + ' .scroll-y').scrollTop(9999999); + this.currentdata['icos_' + data.rid] = data; + } + if (this.total == 0 && jQuery('#' + containerid).find('.emptyPage').length == 0) { + jQuery(jQuery('#template_nofile_notice').html()).appendTo(jQuery('#' + containerid)); + } else { + jQuery('#' + containerid).find('.emptyPage').remove(); + } +}; + +_selectfile.changefileName = function(rid){ + var filename = ''; + if(!rid){ + filename = _explorer.defaultfilename; + }else{ + var ico = _explorer.sourcedata.icos[rid]; + filename = ico.name; + } + $('#savenewname').val(filename); +} +_selectfile.getData = function (url, callback) { + jQuery.getJSON(url, function (json) { + if (json.error) { + alert(json.error); + return false; + } else { + for (var id in json.data) { + _explorer.sourcedata.icos[id] = json.data[id]; + } + for (var fid in json.folderdata) { + _explorer.sourcedata.folder[fid] = json.folderdata[fid]; + } + var obj = null; + if (json.param.page > 1) { + obj = _selectfile.cons[json.sid]; + obj.appendIcos(json.data); + obj.total = parseInt(json.total); + obj.totalpage = Math.ceil(obj.total / obj.perpage); + } else { + obj = new _selectfile(json.sid, json.data, json.param); + if (_selectfile.selectall.container !== '_selectfile-' + json.sid) { + _selectfile.selectall = { + position: {}, + container: '', + icos: [] + }; + } + obj.showIcos(); + } + obj.url = url; + //修改初始化时的排列方式指示 + jQuery('.icons-thumbnail').attr('iconview', obj.view).find('.dzz').removeClass('dzz-view-module').removeClass('dzz-view-list').addClass(obj.view === 2 ? 'dzz-view-list' : 'dzz-view-module'); + jQuery('.icons-thumbnail').attr('iconview', obj.view).find('.dzz').attr('data-original-title', obj.view === 2 ? __lang.deltail_lsit : __lang.medium_icons); + jQuery('.icons-thumbnail').attr('folderid', obj.id); + if (typeof (callback) === 'function') { + callback(obj); + } + } + }); +}; +_selectfile.prototype.showIcos = function (ext) { + //排序数据 + var self = this; + if (_selectfile.showicosTimer[this.winid]) { + window.clearTimeout(_selectfile.showicosTimer[this.winid]); + } + var containerid = 'filemanage-' + this.winid; + + jQuery('#' + containerid).empty(); + this.createIcosContainer(); + var data_sorted = null; + if (this.keyword) { + data_sorted = _selectfile.Sort(_selectfile.Search(this.data, this.keyword), this.disp, this.asc); + jQuery('#searchInput_' + this.id).val(this.keyword); + } else { + data_sorted = _selectfile.Sort(this.data, this.disp, this.asc); + } + if (ext) { + data_sorted = _file.Searchext(data_sorted, ext); + } + this.currentdata = data_sorted; + _selectfile.stack_data[self.id] = Array(); + for (var i in data_sorted) { + _selectfile.stack_data[self.id].push({ + data: data_sorted[i], + "obj": self + }); + } + window.setTimeout(function () { + _selectfile.stack_run(self.id); + }, 1); + //增加底部信息 + this.pageloadding = false; +}; +_selectfile.prototype.Resize = function () { + _selectfile.select_Scrolly(jQuery('.scroll-y')); + _selectfile.searchall(); +}; +//监听iframe父级窗口变化大小 +$(parent).resize(function(){ + _selectfile.select_Scrolly(); + }) + /*jQuery(document).ready(function(){ + _selectfile.select_Scrolly(); + })*/ +//文件没有可以打开的应用 +_selectfile.Open = function (rid, extid, title) { + var data = _explorer.sourcedata.icos[rid]; + var name = data.name; + // var ext =data.ext; + // var type=data.type; + + var obj = {}; + obj.type = data.type; + obj.ext = data.ext; + obj.id = rid; + obj.text = name; + obj.dpath = data.dpath; + //判断打开的url中是否含有dzzjs:等特殊协议;为了安全,只有应用才可以 + if (obj.type === 'link') { + window.open(data.url); + return; + } else if (obj.type === 'dzzdoc') { + obj.url = "index.php?mod=document&icoid=" + obj.id; + window.open(obj.url); + return; + } else if (obj.type === 'folder') { + var hash = ''; + var fid = data.oid; + if (data.gid > 0) { + hash = '#group&do=file&gid=' + data.gid + (fid > 0 ? '&fid=' + fid : ''); + } else { + hash = '#home&do=file&fid=' + fid; + } + window.location.hash = hash; + return false; + } + + if (!extid) { + extid = getExtOpen(data, true); + } + if (extid) { + if (_explorer.extopen.all[extid].appid > 0 && _explorer.sourcedata.app[_explorer.extopen.all[extid].appid]['available'] < 1) { + Alert(__lang.regret_app + _explorer.sourcedata.app[_explorer.extopen.all[extid].appid]['appname'] + __lang.already_close, 5, null, null, 'info'); + return; + } + var extdata_url = extopen_replace(data, extid); + //var app=_explorer.sourcedata.app[_explorer.extopen.all[extid].appid]; + if (extdata_url) { + extdata_url = extdata_url.replace(/{\w+}/g, ''); + if (extdata_url.indexOf('dzzjs:OpenPicWin') === 0) { + jQuery('img[data-original]:visible').dzzthumb(); + jQuery('.Icoblock[rid=' + rid + '] img[data-original]').trigger('click'); + return; + } else if (extdata_url.indexOf('dzzjs:') === 0) { + window.open(data.url); + return; + } else { + window.open(extdata_url); + } + } + } else { + top.showDialog('文件没有可以打开的应用'); + } +}; + +//获取打开方式 + +function getExtOpen(data, isdefault) { + + if (data.type === 'folder' || data.type === 'user' || data.type === 'app' || data.type === 'pan' || data.type === 'storage' || data.type === 'disk') { + return true; + } + var openarr = []; + + //判断特殊区域后缀 + var bz = 'dzz'; + if (data.bz === '' || typeof data.bz === 'undefined') { + if (data.rbz) { + var bzarr = data.rbz.split(':'); + bz = bzarr[0]; + } else { + bz = 'dzz'; + } + } else { + var bzarr = data.bz.split(':'); + bz = bzarr[0]; + } + var ext = bz + ':' + data.ext; + var i = 0; + if (ext && _explorer.extopen.ext[ext]) { + if (isdefault && _explorer.extopen.all[_explorer.extopen.user[ext]]) { + return _explorer.extopen.user[ext]; + } + for (i = 0; i < _explorer.extopen.ext[ext].length; i++) { + if (_explorer.extopen.all[_explorer.extopen.ext[ext][i]]) { + if (isdefault && _explorer.extopen.all[_explorer.extopen.ext[ext][i]].isdefault > 0) { + return _explorer.extopen.all[_explorer.extopen.ext[ext][i]].extid; + } + openarr.push(_explorer.extopen.all[_explorer.extopen.ext[ext][i]]); + } + } + } + if (data.ext && _explorer.extopen.ext[data.ext]) { + if (isdefault && _explorer.extopen.all[_explorer.extopen.user[data.ext]]) { + return _explorer.extopen.user[data.ext]; + } + for (i = 0; i < _explorer.extopen.ext[data.ext].length; i++) { + if (_explorer.extopen.all[_explorer.extopen.ext[data.ext][i]]) { + if (isdefault && _explorer.extopen.all[_explorer.extopen.ext[data.ext][i]].isdefault > 0) { + return _explorer.extopen.all[_explorer.extopen.ext[data.ext][i]].extid; + } + openarr.push(_explorer.extopen.all[_explorer.extopen.ext[data.ext][i]]); + } + } + } + + + //判断type + if (data.type !== data.ext && _explorer.extopen.ext[data.type]) { + if (isdefault && _explorer.extopen.all[_explorer.extopen.user[data.type]]) { + return _explorer.extopen.user[data.type]; + } + for (i = 0; i < _explorer.extopen.ext[data.type].length; i++) { + if (_explorer.extopen.all[_explorer.extopen.ext[data.type][i]]) { + if (isdefault && _explorer.extopen.all[_explorer.extopen.ext[data.type][i]].isdefault > 0) { + return _explorer.extopen.all[_explorer.extopen.ext[data.type][i]].extid; + } + openarr.push(_explorer.extopen.all[_explorer.extopen.ext[data.type][i]]); + } + } + } + if (isdefault) { + if (openarr.length > 0) { + return openarr[0].extid; + } else { + return false; + } + } else { + var appids = []; + for (i in openarr) { + if ($.inArray(openarr[i].appid, appids) > -1) { + openarr.splice(i, 1); + } else { + appids.push(openarr[i].appid); + } + } + if (openarr.length > 0) { + return openarr; + } else { + return false; + } + } +} +//文件路径 +function extopen_replace(ico, extid) { + ico.icoid = ico.rid; + var extdata = _explorer.extopen.all[extid]; + var extdata_url = ''; + if (!ico || !extdata) { + return false; + } + for (var key in ico) { + extdata_url = extdata.url.replace(/{(\w+)}/g, function ($1) { + key = $1.replace(/[{}]/g, ''); + if (key === 'url') { + return encodeURIComponent(ico[key]); + } else if (key === 'icoid') { + return ico.rid; + } else if (key === 'path') { + return ico.dpath; + } else { + return ico[key]; + } + }); + } + if (extdata_url.indexOf('dzzjs:') === -1 && extdata_url.indexOf('?') !== -1 && extdata_url.indexOf('path=') === -1) { + extdata_url = extdata_url + '&path=' + ico.dpath; + } + return extdata_url; +} +_selectfile.prototype._selectInfo = function () { + //设置全选框信息 + //设置全选按钮的文字 + var sum = _selectfile.selectall.icos.length; + var total = jQuery('#filemanage-' + this.id).find('.Icoblock').length; + var html = jQuery('#template_file').html(); + var hash = location.hash; + if (sum > 0) { //有选中 + jQuery('.navtopheader').css('display', 'block'); + jQuery('.navtopheader').html(html); + jQuery('.selectall-box').addClass('Icoselected'); + jQuery('.selectall-box .select-info').html('已选中' + sum + '个文件'); + jQuery('.docunment-allfile').hide(); + if (sum >= total) { //全部选中 + jQuery('.selectall-box').addClass('Icoselected'); + } + } else { //没有选中 + jQuery('.navtopheader').css('display', 'none'); + jQuery('.navtopheader').html(''); + jQuery('.selectall-box').removeClass('Icoselected'); + jQuery('.selectall-box .select-info').html(this.view < 4 ? '全选' : ''); + jQuery('.docunment-allfile').show(); + if (hash.indexOf('recycle') != -1) { + jQuery('.recycle-option-icon').hide(); + } + } + //this.setToolButton(); //设置头部工具菜单; + return false; +}; +_selectfile.prototype.selectInfo = function () { + var self = this; + if (this.selectinfoTimer) { + window.clearTimeout(this.selectinfoTimer); + } + this.selectinfoTimer = window.setTimeout(function () { + self._selectInfo(); + }, 200); +}; +_selectfile.prototype.appendIcos = function (data) { + var self = this; + if (_selectfile.showicosTimer[this.winid]) { + window.clearTimeout(_selectfile.showicosTimer[this.winid]); + } + _selectfile.stack_data[self.winid] = Array(); + for (var i in data) { + //this.data[i]=data[i]; + _selectfile.stack_data[self.winid].push({ + data: data[i], + "obj": self + }); + } + window.setTimeout(function () { + _selectfile.stack_run(self.winid); + }, 1); + this.pageloadding = false; +}; + +_selectfile.prototype.createIcosContainer = function () { + var self = this; + var containerid = 'filemanage-' + this.id; + var div = document.getElementById(containerid); + if (!div) { + return; + } + div.className = "icosContainer"; + div.setAttribute('unselectable', "on"); + div.setAttribute('onselectstart', "return event.srcElement.type== 'text';"); + var htmlContent = ''; + div.innerHTML = _selectfile.get_template(this.id, true); + _selectfile.select_Scrolly(); + var el = jQuery(div); + el.find('.js-file-item-tpl').empty(); + jQuery('.middlecenter') + .on('contextmenu', function (e) { + e = e ? e : window.event; + var tag = e.srcElement ? e.srcElement : e.target; + if (/input|textarea/i.test(tag.tagName)) { + return true; + } + _contextmenu.right_body(e, self.fid); + return false; + }) + .on('click', function (e) { + //清空数据 + e = e ? e : window.event; + var tag = e.srcElement ? e.srcElement : e.target; + if (/input|textarea/i.test(tag.tagName)) { + return true; + } + if (containerid === _selectfile.selectall.container) { + _selectfile.selectall.container = containerid; + _selectfile.selectall.icos = []; + _selectfile.selectall.position = {}; + el.find('.Icoblock').removeClass('Icoselected'); + el.find('.selectall-box').removeClass('Icoselected'); + if(_explorer.type){ + _selectfile.changefileName(''); + } + self.selectInfo(); + } + }) + .end().find('.selectall-box').on('click', function () { + var el = jQuery(this); + var selectall = true; + if (el.hasClass('Icoselected')) { + el.removeClass('Icoselected'); + selectall = false; + _selectfile.selectall.icos = []; + } else { + el.addClass('Icoselected'); + selectall = true; + _selectfile.selectall.icos = []; + } + _selectfile.selectall.container = containerid; + jQuery('#' + containerid).find('.Icoblock').each(function () { + if (selectall) { + jQuery(this).addClass('Icoselected'); + _selectfile.selectall.icos.push(jQuery(this).attr('rid')); + } else { + jQuery(this).removeClass('Icoselected'); + } + }); + self.selectInfo(); + return false; + }); + if(_explorer.mulitype){ + _select.init(containerid); + } + if (this.view < 4) { + } else { + jQuery('#' + containerid).find('.detail_header:not(.detail_header_select)').on('click', function () { + var disp = parseInt(jQuery(this).attr('disp')); + if (disp * 1 === self.disp * 1) { + if (self.asc > 0) { + self.asc = 0; + } else { + self.asc = 1; + } + } else { + _selectfile.Disp(this, self.id, disp); + self.asc = 1; + } + self.disp = disp; + if (self.fid) { + _explorer.sourcedata.folder[self.fid].disp = disp; + } + if (self.bz.indexOf('ALIOSS') === 0 || self.bz.indexOf('JSS') === 0) { + self.showIcos(); + } else { + self.pageClick(1); + } + }); + } + el.closest('.scroll-srcollbars').scroll(function () { + var el = jQuery(this); + if (el.height() + el.scrollTop() >= el.children().first().height()) { + if (self.currentpage >= self.totalpage || self.pageloadding) { + return; + } + self.pageloadding = true; + self.currentpage++; + self.pageClick(self.currentpage); + } + }); + if (this.fid) { + $.getScript(MOD_PATH + '/scripts/uplodfile.js', function () { + jQuery('.wangpan-upload-file').each(function () { + fileupload(jQuery(this), self.fid); + }); + }); + } + if (this.total < 1 && jQuery('#' + containerid).find('.emptyPage').length == 0) { + jQuery(jQuery('#template_nofile_notice').html()).appendTo(div); + } else { + jQuery('#' + containerid).find('.emptyPage').remove(); + } + +} +_selectfile.prototype.pageClick = function (page) { + var self = this; + this.pageloadding = true; + if (!page) { + page = 1; + } + var keyword = (this.keyword) ? this.keyword : jQuery('#searchval').val(); + if (!keyword || keyword === __lang.search) { + keyword = ''; + } + if(!this.exts && _explorer.defaultexttype){ + this.exts = _explorer.defaultexttype; + } + var url = self.url + .replace(/&disp\=\d/ig, '') + .replace(/&asc\=\d/ig, '') + .replace(/&iconview\=\d/ig, '') + .replace(/&page\=\d+/ig, '') + .replace(/&exts\=[\w,]*(&|$)/ig, '&') + .replace(/&tags\=[\w,]*(&|$)/ig, '&') + .replace(/&keyword\=\w*(&|$)/, '&') + .replace(/&fid\=\w*(&|$)/, '&') + .replace(/&gid\=\w*(&|$)/, '&') + .replace(/&before\=\w*(&|$)/, '&') + .replace(/&after\=\w*(&|$)/, '&') + .replace(/&marker\=\w*(&|$)/, '&') + .replace(/&t\=\d+/, ''); + url = url.replace(/&+$/ig, ''); + _selectfile.getData(url + '&exts=' + this.exts + '&tags=' + this.tags + '&disp=' + this.disp + '&fids=' + this.fids + '&gid=' + this.gid + '&before=' + this.before + '&after=' + this.after + '&asc=' + this.asc + '&iconview=' + this.view + '&keyword=' + encodeURI(keyword) + '&page=' + page + '&marker=' + (this.fid ? _explorer.sourcedata.folder[this.fid].nextMarker : '') + '&t=' + new Date().getTime(), function () { + //self.PageInfo(); + }); +}; + +_selectfile.stack_run = function (winid) { + //if(_selectfile.showicosTimer[winid]) window.clearTimeout(_selectfile.showicosTimer[winid]); + if (_selectfile.stack_data[winid].length > 0) { + var obj = _selectfile.stack_data[winid][0].obj; + for (var i = 0; i < _selectfile.speed; i++) { + if (_selectfile.stack_data[winid].length > 0) { + _selectfile.stack_data[winid][0].obj.CreateIcos(_selectfile.stack_data[winid][0]['data'], 1); + _selectfile.stack_data[winid].splice(0, 1); + } else break; + } + _selectfile.showicosTimer[winid] = window.setTimeout(function () { + _selectfile.stack_run(winid); + }, 1); + } else { + jQuery(document).trigger('showIcos_done'); + } +}; +_selectfile.prototype.tddrager_start = function (e) { + this.XX = e.clientX; + document.getElementById('_blank').style.cursor = 'e-resize'; + jQuery('#_blank').show(); + this.AttachEvent(e); + eval("document.onmousemove=function(e){" + this.string + ".tddraging(e?e:window.event);};"); + eval("document.onmouseup=function(e){" + this.string + ".tddraged(e?e:window.event);};"); +}; +_selectfile.prototype.tddraging = function () { + document.body.style.cursor = 'e-resize'; + +}; +_selectfile.prototype.tddraged = function (e) { + this.DetachEvent(e); + jQuery('#_blank').hide(); + var xx = e.clientX - this.XX; + //计算新的各个td的百分比 + var right_width = _window.windows[this.winid].bodyWidth - jQuery('#jstree_area').width(); + var current_width = right_width * this.detailper[this.tddrager_disp] / 100; + var width = xx + current_width; + if (width < 50) { + width = 50; + } + var all_width = []; + var other_width = 0; + for (var i = 0; i < 4; i++) { + all_width[i] = right_width * this.detailper[i] / 100; + } + var dx = width - current_width; + if (xx > 0) { + if (all_width[this.tddrager_disp + 1] - dx > 50) { + all_width[this.tddrager_disp + 1] -= dx; + } else { + var dx1 = dx + (all_width[this.tddrager_disp + 1] - 50); + all_width[this.tddrager_disp + 1] = 50; + if ((this.tddrager_disp + 1 + 1) < 4) { + if (all_width[this.tddrager_disp + 1 + 1] - dx1 > 50) { + all_width[this.tddrager_disp + 1 + 1] -= dx; + } else { + var dx2 = dx1 + (all_width[this.tddrager_disp + 1 + 1] - 50); + all_width[this.tddrager_disp + 1 + 1] = 50; + if ((this.tddrager_disp + 1 + 1 + 1) < 4) { + if (all_width[this.tddrager_disp + 1 + 1 + 1] - dx2 > 50) { + all_width[this.tddrager_disp + 1 + 1 + 1] -= dx; + } else { + all_width[this.tddrager_disp + 1 + 1 + 1] = 50; + } + } + } + } + + } + other_width = 0; + for (i = 0; i < 4; i++) { + if (i !== this.tddrager_disp) { + other_width += all_width[i]; + } + } + all_width[this.tddrager_disp] = right_width - other_width; + } else { + all_width[this.tddrager_disp] = width; + all_width[this.tddrager_disp + 1] -= dx; + } + other_width = 0; + for (i = 0; i < 4; i++) { + if (i != this.tddrager_disp) { + other_width += all_width[i]; + } + } + all_width[this.tddrager_disp] = right_width - other_width; + for (i = 0; i < 4; i++) { + this.detailper[i] = Math.floor((all_width[i] / right_width) * 100); + } + this.showIcos(this.winid); + //alert(document.getElementById('tabs_cover').offsetLeft+'========='+document.getElementById('tabs_cover').offsetWidth); +}; +_selectfile.prototype.DetachEvent = function () { + document.onmousemove = _selectfile.onmousemove; + document.onmouseup = _selectfile.onmouseup; + document.onselectstart = _selectfile.onselectstart; + + +}; +_selectfile.prototype.AttachEvent = function (e) { + _selectfile.onmousemove = document.onmousemove; + _selectfile.onmouseup = document.onmouseup; + _selectfile.onselectstart = document.onselectstart; + try { + document.onselectstart = function () { + return false; + }; + if (e.preventDefault) { + e.preventDefault(); + } else { + if (this.board.setCapture) { + this.board.setCapture(); + } + } + } catch (event) { + + } +}; + + +_selectfile.Search = function (data, keyword) { + var data1 = {}; + for (var i in data) { + if (data[i].name.toLowerCase().indexOf(keyword.toLowerCase()) !== -1) { + data1[i] = data[i]; + } + } + return data1; +}; +_selectfile.Sort = function (data, disp, asc) { + var sarr = []; + if (!data) { + return []; + } + for (var i in data) { + + switch (parseInt(disp)) { + case 0: + + if (data[i].type === 'folder') { + sarr[sarr.length] = ' ' + data[i].name.replace(/_/g, '') + ' ___' + i; + } else { + sarr[sarr.length] = data[i].name.replace(/_/g, '') + '___' + i; + } + break; + case 1: + sarr[sarr.length] = data[i].size + '___' + i; + break; + case 2: + if (data[i].type === 'folder') { + sarr[sarr.length] = ' ' + '___' + i; + } else { + sarr[sarr.length] = data[i].ext + data[i].type + '___' + i; + } + break; + case 3: + //asc=0; + sarr[sarr.length] = (data[i].dateline) + '___' + i; + break; + } + } + if (parseInt(disp) === 1) { + sarr = sarr.sort(function (a, b) { + return (parseInt(a) - parseInt(b)); + }); + + } else { + sarr = sarr.sort(); + } + var temp = {}; + var temp1 = ''; + if (asc > 0) { + for (i = 0; i < sarr.length; i++) { + temp1 = sarr[i].split('___'); + temp['icos_' + temp1[1]] = data[temp1[1]]; + } + } else { + for (i = sarr.length - 1; i >= 0; i--) { + temp1 = sarr[i].split('___'); + temp['icos_' + temp1[temp1.length - 1]] = data[temp1[temp1.length - 1]]; + } + } + return temp; +}; +_selectfile.get_template = function (sid, whole, disp, asc) { + var obj = _selectfile.cons[sid]; + var str = ''; + if (whole) { + switch (obj.view) { + case 0: + case 1: + case 2: + case 3: + str = jQuery('#template_middleicon').html(); + + break; + case 4: + str = jQuery('#template_detaillist').html(); + //替换 + break; + } + //替换参数 + str = str.replace(/\{asc_\d\}/g, obj.asc); + var regx = new RegExp('\{show_' + obj.disp + '\}', 'ig'); + str = str.replace(regx, 'inline-block'); + str = str.replace(/\{show_\d}/ig, 'none'); + } else { + switch (obj.view) { + case 0: + case 1: + case 2: + case 3: + str = jQuery('#template_middleicon .js-file-item-tpl').html(); + break; + case 4: + str = jQuery('#template_detaillist .js-file-item-tpl').html(); + break; + } + } + return str; + +}; +_selectfile.rename = function (id) { + var ico = _explorer.sourcedata.icos[id]; + if (!ico) { + return; + } + var filemanage = _selectfile.cons[_selectfile.winid]; + + var el = jQuery('#file_text_' + id); + el.css('overflow', 'visible'); + el.closest('td').addClass('renaming'); + jQuery('#Icoblock_middleicon_' + id).find('.IcoText_div').css('overflow', 'visible'); + filemanage.oldtext = el.html(); + var html = ''; + if (filemanage.view > 3) { + html = ""; + } else { + html = ""; + } + + el.html(html); + //jQuery('#content_'+filemanage.winid+' .icoblank[icoid="'+id+'"]').css('z-index',-1); + var ele = jQuery('#input_' + id); + ele.select(); + ele.on('keyup', function (e) { + e = e ? e : event; + if (e.keyCode === 13) { + jQuery(document).trigger('mousedown.file_text_' + id); + } + }); + jQuery(document).on('mousedown.file_text_' + id, function (e) { + e = e ? e : window.event; + var obj = e.srcElement ? e.srcElement : e.target; + if (jQuery(obj).closest('#file_text_' + id).length < 1) { + jQuery(document).off('.file_text_' + id); + var text = ele.val() || ""; + var emptymatch = /^\s*$/; + if (emptymatch.test(text)) { + top.showDialog(__lang.name_is_must, 'error', '', function () { + el.html(filemanage.oldtext); + el.css('overflow', 'hidden'); + el.closest('td').removeClass('renaming'); + jQuery('#Icoblock_middleicon_' + id).find('.IcoText_div').css('overflow', 'hidden'); + }); + return false; + } + text = text.replace("\n", ''); + if (filemanage.oldtext !== text) { + _selectfile.Rename(id, text); + } else { + el.html(filemanage.oldtext); + el.css('overflow', 'hidden'); + el.closest('td').removeClass('renaming'); + jQuery('#Icoblock_middleicon_' + id).find('.IcoText_div').css('overflow', 'hidden'); + } + //jQuery('#content_'+filemanage.winid+' .icoblank[icoid="'+id+'"]').css('z-index',10); + } + }); + +}; + +_selectfile.Rename = function (rid, text) { + var ico = _explorer.sourcedata.icos[rid]; + var filemanage = _selectfile.cons[_selectfile.winid]; + jQuery.ajax({ + type: 'post', + url: _explorer.appUrl + '&do=dzzcp&operation=rename', + data: { + "text": text, + "path": ico.dpath, + "t": (new Date().getTime()) + }, + dataType: "json", + success: function (json) { + if (json.rid) { + _explorer.sourcedata.icos[json.rid].name = json.name; + filemanage.data[json.rid].name = json.name; + filemanage.CreateIcos(_explorer.sourcedata.icos[json.rid], true); + } else { + jQuery('#file_text_' + rid).html(filemanage.oldtext); + if (json.error) { + top.showmessage(json.error, 'danger', 3000, 1); + } + } + }, + error: function () { + jQuery('#file_text_' + rid).html(filemanage.oldtext); + if (json.error) { + top.showmessage(json.error, 'danger', 3000, 1); + } + top.showmessage(__lang.js_network_error, 'danger', 3000, 1); + } + }); +}; +_selectfile.downAttach = function (id) { + if (!id) { + id = _selectfile.selectall.icos[0]; + } + var data = _explorer.sourcedata.icos[id]; + if (!data) { + return false; + } + var url = DZZSCRIPT + '?mod=io&op=download&path=' + encodeURIComponent(data.dpath) + '&t=' + new Date().getTime(); + if (BROWSER.ie) { + window.open(url); + } else { + window.frames.hideframe.location = url; + } + //} + return false; +}; +_selectfile.downThumb = function (id) { + var data = _explorer.sourcedata.icos[id]; + var url = data.url + '&filename=' + encodeURIComponent(data.name) + '&a=down&t=' + new Date().getTime(); + if (BROWSER.ie) { + window.open(url); + } else { + window.frames.hideframe.location = url; + } + //} + return false; +}; +_selectfile.property = function (rid, isfolder) { + var path = ''; + if (isfolder) { + var folder = _explorer.sourcedata.folder[rid]; + path = encodeURIComponent('fid_' + folder.path); + } else { + var dpaths = []; + var ico = null; + if (_selectfile.selectall.icos.length > 0 && jQuery.inArray(rid, _selectfile.selectall.icos) > -1) { + for (var i = 0; i < _selectfile.selectall.icos.length; i++) { + ico = _explorer.sourcedata.icos[_selectfile.selectall.icos[i]]; + dpaths.push(ico.dpath); + } + } else { + ico = _explorer.sourcedata.icos[rid]; + dpaths = [ico.dpath]; + } + path = encodeURIComponent(dpaths.join(',')); + } + showWindow('property', _explorer.appUrl + '&do=ajax&operation=property&paths=' + path); +}; +_selectfile.NewIco = function (type, fid) { + if (!fid && !_selectfile.fid) { + return; + } + if (!fid) { + fid = _selectfile.fid; + } + if (type === 'newFolder') { +// showWindow('newFolder', _explorer.appUrl + '&do=ajax&operation=' + type + '&fid=' + fid); + $.post(_explorer.appUrl + '&do=ajax&operation=newFolder',{'fid':fid},function(data){ + if(data.msg === 'success'){ + _explorer.sourcedata.icos[data.rid] = data; + _selectfile.cons['f-' + fid].CreateIcos(data); + _selectfile.rename(data.rid); + }else{ + top.showDialog(data.error); + } + },'json'); + } else if (type === 'newLink') { + showWindow('newLink', _explorer.appUrl + '&do=ajax&operation=' + type + '&fid=' + fid); + } else { + $.post(_explorer.appUrl + '&do=ajax&operation=newIco&type=' + type, { + 'fid': fid + }, function (data) { + if (data.msg === 'success') { + _explorer.sourcedata.icos[data.rid] = data; + _selectfile.cons['f-' + fid].CreateIcos(data); + _selectfile.rename(data.rid); + } else { + top.showDialog(data.error); + } + }, 'json'); + } +}; +_selectfile.glow = function (el) { + var delay = 200; + for (var i = 0; i < 4; i++) { + window.setTimeout(function () { + el.find('.toggleGlow').toggleClass('glow'); + }, delay * i); + } +}; +_selectfile.Arrange = function (obj, id, view) { + var el = jQuery(obj); + if (!id) { + id = _selectfile.winid; + } + var filemanage = _selectfile.cons[id]; + + if (!view) { + view = (parseInt(el.attr('iconview')) < 4 ? 4 : 2); + } else { + view = view * 1; + } + jQuery('.icons-thumbnail').attr('iconview', view).find('.dzz').removeClass('dzz-view-module').removeClass('dzz-view-list').addClass(view === 2 ? 'dzz-view-list' : 'dzz-view-module'); + jQuery('.icons-thumbnail').attr('iconview', view).find('.dzz').attr('data-original-title', view === 2 ? __lang.deltail_lsit : __lang.medium_icons); + var fid = _selectfile.fid; + if (fid > 0 && _explorer.Permission_Container('admin', fid)) { + jQuery.post(_selectfile.saveurl + '&do=folder', { + fid: fid, + iconview: view + }); + _explorer.sourcedata.folder[fid]['iconview'] = view; + + } + filemanage.view = view; + filemanage.showIcos(); + jQuery('#right_contextmenu .menu-icon-iconview').each(function () { + if (jQuery(this).attr('view') * 1 === view * 1) { + jQuery(this).removeClass('dzz-check-box-outline-blank').addClass('dzz-check-box'); + } else { + jQuery(this).addClass('dzz-check-box-outline-blank').removeClass('dzz-check-box'); + } + }); +}; +_selectfile.Disp = function (obj, id, disp) { + var filemanage = _selectfile.cons[id]; + if (filemanage.subfix === 'f') { + var fid = filemanage.fid; + if (fid > 0 && _explorer.Permission_Container('admin', fid)) { + jQuery.post(_selectfile.saveurl + '&do=folder', { + fid: fid, + disp: parseInt(disp) + }); + } + _explorer.sourcedata.folder[fid]['disp'] = parseInt(disp); + } else if (filemanage.subfix === 'cat') { + jQuery.post(_selectfile.saveurl + '&do=catsearch', { + catid: id.replace('cat-', ''), + disp: parseInt(disp) + }); + } + if (disp * 1 === filemanage.disp * 1) { + filemanage.asc = filemanage.asc > 0 ? 0 : 1; + } + filemanage.disp = parseInt(disp); + if (filemanage.bz.indexOf('ALIOSS') === 0 || filemanage.bz.indexOf('JSS') === 0) { + filemanage.showIcos(); + } else { + filemanage.pageClick(1); + } + jQuery('#right_contextmenu .menu-icon-disp').each(function () { + if (jQuery(this).attr('disp') * 1 === disp * 1) { + jQuery(this).removeClass('dzz-check-box-outline-blank').addClass('dzz-check-box'); + jQuery(this).next().find('.caret').removeClass('asc').removeClass('desc').addClass(filemanage.asc > 0 ? 'asc' : 'desc'); + } else { + jQuery(this).addClass('dzz-check-box-outline-blank').removeClass('dzz-check-box'); + jQuery(this).next().find('.caret').removeClass('asc').removeClass('desc'); + } + }); +}; +//文件复制 +_selectfile.copy = function (rid) { + if (!rid) { + rid = _selectfile.selectall.icos[0]; + } + var icosdata = _explorer.sourcedata.icos[rid]; + var path = []; + var data = {}; + if (_selectfile.selectall.icos.length > 0 && jQuery.inArray(rid, _selectfile.selectall.icos) > -1) { + if (icosdata.bz && icosdata.bz) { + for (var i in _selectfile.selectall.icos) { + path.push(_explorer.sourcedata.icos[_selectfile.selectall.icos[i]].dpath); + } + data = { + rids: path, + 'bz': icosdata.bz + }; + } else { + for (var i in _selectfile.selectall.icos) { + path.push(_explorer.sourcedata.icos[_selectfile.selectall.icos[i]].dpath); + } + data = { + rids: path + }; + } + } else { + if (icosdata.bz && icosdata.bz) { + data = { + rids: [icosdata.dpath], + 'bz': icosdata.bz + }; + } else { + data = { + rids: [icosdata.dpath] + }; + } + } + //复制类型值为1,剪切类型值为2 + data.copytype = 1; + var url = _explorer.appUrl + '&do=dzzcp&operation=copyfile&t=' + new Date().getTime(); + jQuery.post(url, data, function (json) { + if (json.msg === 'success') { + var filenames = ''; + _explorer.cut.iscut = 0; + _explorer.cut.icos = json.rid; + for (var o in json['rid']) { + jQuery('.Icoblock[rid=' + json.rid[o] + ']').removeClass('iscut'); + filenames += _explorer.sourcedata.icos[json.rid[o]].name + ','; + } + filenames = filenames.substr(0, filenames.length - 1); + top.showmessage(filenames + __lang.copy_success, 'success', 1000, 1, 'right-bottom'); + } else { + top.showmessage(json.msg, 'error', 3000, 1, 'right-bottom'); + } + + + }, 'json'); +}; +//文件剪切 +_selectfile.cut = function (rid) { + var filemanage = _selectfile.cons[_selectfile.winid]; + var containid = 'filemanage-' + _selectfile.winid; + var total = filemanage.total; + if (!rid) { + rid = _selectfile.selectall.icos[0]; + } + var icosdata = _explorer.sourcedata.icos[rid]; + var path = []; + var data = {}; + if (_selectfile.selectall.icos.length > 0 && jQuery.inArray(rid, _selectfile.selectall.icos) > -1) { + if (icosdata.bz && icosdata.bz) { + for (var i in _selectfile.selectall.icos) { + path.push(_explorer.sourcedata.icos[_selectfile.selectall.icos[i]].dpath); + } + data = { + rids: path, + 'bz': icosdata.bz + }; + } else { + for (var i in _selectfile.selectall.icos) { + path.push(_explorer.sourcedata.icos[_selectfile.selectall.icos[i]].dpath); + } + data = { + rids: path + }; + } + } else { + if (icosdata.bz && icosdata.bz) { + data = { + rids: [icosdata.dpath], + 'bz': icosdata.bz + }; + } else { + data = { + rids: [icosdata.dpath] + }; + } + } + //复制类型值为1,剪切类型值为2 + data.copytype = 2; + var url = _explorer.appUrl + '&do=dzzcp&operation=copyfile'; + jQuery.post(url, data, function (json) { + if (json.msg === 'success') { + var filenames = ''; + _explorer.cut.iscut = 1; + _explorer.cut.icos = json.rid; + jQuery('.Icoblock').removeClass('iscut'); + for (var o in json.rid) { + jQuery('.Icoblock[rid=' + json.rid[o] + ']').addClass('iscut'); + filenames += _explorer.sourcedata.icos[json.rid[o]].name + ','; + total--; + } + // _selectfile.showTemplatenoFile(containid, total); + filenames = filenames.substr(0, filenames.length - 1); + top.showmessage(filenames + __lang.cut_success, 'success', 1000, 1, 'right-bottom'); + } else { + top.showmessage(json.msg, 'error', 3000, 1, 'right-bottom'); + } + + }, 'json'); +}; +//粘贴 +_selectfile.paste = function (fid) { + var folder = _explorer.sourcedata.folder[fid]; + if (!folder) { + return false; + } + var data = { + 'tpath': folder.fid, + 'tbz': folder.bz + }; + var url = _explorer.appUrl + '&do=dzzcp&operation=paste'; + var i = 0; + var node = null; + jQuery.post(url, data, function (json) { + if (fid === _selectfile.fid) { + if (json.folderarr) { + for (i = 0; i < json.folderarr.length; i++) { + _explorer.sourcedata.folder[json.folderarr[i].fid] = json.folderarr[i]; + } + node = jQuery('#position').jstree(true).get_node(folder.gid > 0 ? (folder.type > 0 ? '#g_' + folder.gid : '#gid_' + folder.gid) : '#f-' + folder.pfid); + jQuery('#position').jstree('refresh', node); + jQuery('#position').jstree('correct_state', node); + } + if (json.icoarr) { + var filemanage = _selectfile.cons['f-' + fid]; + for (i = 0; i < json.icoarr.length; i++) { + if (json.icoarr[i].pfid === filemanage.fid) { + _explorer.sourcedata.icos[json.icoarr[i].rid] = json.icoarr[i]; + filemanage.CreateIcos(json.icoarr[i]); + } + } + } + } else { + top.showmessage('粘贴成功', 'success', 3000, 1); + } + }, 'json'); + +}; +_selectfile.delIco = function (rid, noconfirm) { + var filemanage = _selectfile.cons[_selectfile.winid]; + var containid = 'filemanage-' + _selectfile.winid; + var total = filemanage.total; + if (!rid) { + rid = _selectfile.selectall.icos[0]; + } + var icosdata = _explorer.sourcedata.icos[rid]; + if (!noconfirm) { + //var finallydelete = (_explorer.deletefinally == 1) ? true:false; + var finallydelete = false; + if (_selectfile.selectall.icos.length > 0 && jQuery.inArray(rid, _selectfile.selectall.icos) > -1) { + if (_explorer.sourcedata.icos[_selectfile.selectall.icos[0]].isdelete > 0 || (_explorer.sourcedata.icos[_selectfile.selectall.icos[0]].bz && _explorer.sourcedata.icos[_selectfile.selectall.icos[0]].bz)) { + top.showDialog((finallydelete) ? __lang.js_finallydelete_selectall : __lang.js_delete_selectall,'confirm','' ,function () { + _selectfile.delIco(rid, 1); + }); + } else { + top.showDialog((finallydelete) ? __lang.js_finallydelete_selectall_recycle : __lang.js_delete_selectall_recycle,'confirm','', function () { + _selectfile.delIco(rid, 1); + }); + } + return; + } else if (_explorer.sourcedata.icos[rid].type === 'folder' && _explorer.sourcedata.folder[_explorer.sourcedata.icos[rid].oid] && _explorer.sourcedata.folder[_explorer.sourcedata.icos[rid].oid].iconum) { + if (_explorer.sourcedata.icos[rid].isdelete > 0 || (_explorer.sourcedata.icos[rid].bz && _explorer.sourcedata.icos[rid].bz)) { + top.showDialog((finallydelete) ? __lang.js_finallydelete_folder.replace('{name}', _explorer.sourcedata.icos[rid].name) : __lang.js_delete_folder.replace('{name}', _explorer.sourcedata.icos[rid].name),'confirm','', function () { + _selectfile.delIco(rid, 1); + }); + } else { + top.showDialog((finallydelete) ? __lang.js_finallydelete_folder_recycle.replace('{name}', _explorer.sourcedata.icos[rid].name) : __lang.js_delete_folder_recycle.replace('{name}', _explorer.sourcedata.icos[rid].name),'confirm','', function () { + _selectfile.delIco(rid, 1); + }); + } + return; + } else { + if (_explorer.sourcedata.icos[rid].isdelete > 0 || (_explorer.sourcedata.icos[rid].bz && _explorer.sourcedata.icos[rid].bz)) { + top.showDialog((finallydelete) ? __lang.js_finallydelete_confirm.replace('{name}', _explorer.sourcedata.icos[rid].name) : __lang.js_delete_confirm.replace('{name}', _explorer.sourcedata.icos[rid].name),'confirm','' ,function () { + _selectfile.delIco(rid, 1); + }); + } else { + top.showDialog((finallydelete) ? __lang.js_finallydelete_confirm_recycle.replace('{name}', _explorer.sourcedata.icos[rid].name) : __lang.js_delete_confirm_recycle.replace('{name}', _explorer.sourcedata.icos[rid].name),'confirm','', function () { + _selectfile.delIco(rid, 1); + }); + } + return; + } + } + var path = []; + var data = {}; + if (_selectfile.selectall.icos.length > 0 && jQuery.inArray(rid, _selectfile.selectall.icos) > -1) { + if (icosdata.bz && icosdata.bz) { + + for (var i in _selectfile.selectall.icos) { + path.push(_explorer.sourcedata.icos[_selectfile.selectall.icos[i]].dpath); + } + data = { + rids: path, + 'bz': icosdata.bz + }; + } else { + + for (var i in _selectfile.selectall.icos) { + path.push(_explorer.sourcedata.icos[_selectfile.selectall.icos[i]].dpath); + } + data = { + rids: path + }; + } + } else { + if (icosdata.bz && icosdata.bz) { + data = { + rids: [icosdata.dpath], + 'bz': icosdata.bz + }; + } else { + data = { + rids: [icosdata.dpath] + }; + } + } + var url = _explorer.appUrl + '&do=dzzcp&operation=deleteIco&t=' + new Date().getTime(); + var progress = '
      '; + top.showmessage('

      ' + __lang.deleting_not_please_close + '

      ' + progress, 'success', 0, 1, 'right-bottom'); + jQuery.post(url, data, function (json) { + var rids = []; + for (var i in json.msg) { + if (json.msg[i] === 'success') { + top.showmessage(_explorer.sourcedata.icos[i].name + __lang.delete_success, 'success', 1000, 1, 'right-bottom'); + //_selectfile.removerid(i); + rids.push(i); + total--; + //_selectfile.showTemplatenoFile(containid, total); + + } else { + top.showmessage(json.msg[i], 'error', 3000, 1, 'right-bottom'); + } + } + _selectfile.removeridmore(rids); + + }, 'json'); +}; +_selectfile.removerid = function (rid) { + var data = _explorer.sourcedata.icos[rid]; + var containerid = 'filemanage-' + _selectfile.winid; + var el = jQuery('#' + containerid + ' .Icoblock[rid=' + rid + ']'); + el.remove(); + if (data.type === 'folder') { + var node = jQuery('#position').jstree(true).get_node(data.gid > 0 ? (data.type > 0 ? '#g_' + data.gid : '#gid_' + data.gid) : '#f-' + data.oid); + jQuery('#position').jstree('refresh', node); + jQuery('#position').jstree('correct_state', node); + } + var filemanage = _selectfile.cons[_selectfile.winid]; + //删除选中列表 + var i = jQuery.inArray(rid, _selectfile.selectall.icos); + if (i > -1) { + _selectfile.selectall.icos.splice(i, 1); + } + delete filemanage.data[rid]; + delete filemanage.currentdata['icos_' + rid]; + filemanage.sum--; + filemanage.total--; + filemanage.selectInfo(); + _selectfile.stack_run(filemanage.winid); //删除时如果有未显示的接着显示 + + +}; +_selectfile.removeridmore = function (rids) { + if (rids.length > 1) { + var rid = rids[0]; + var data = _explorer.sourcedata.icos[rid]; + var containerid = 'filemanage-' + _selectfile.winid; + var types = []; + for (var o in rids) { + var currentrid = rids[o]; + jQuery('#' + containerid + ' .Icoblock[rid=' + currentrid + ']').remove(); + var currentdata = _explorer.sourcedata.icos[currentrid]; + types.push(currentdata.type); + } + if ($.inArray('folder', types) != -1) { + var node = jQuery('#position').jstree(true).get_node(data.gid > 0 ? (data.type > 0 ? '#g_' + data.gid : '#gid_' + data.gid) : '#f-' + data.oid); + jQuery('#position').jstree('refresh', node); + jQuery('#position').jstree('correct_state', node); + } + var filemanage = _selectfile.cons[_selectfile.winid]; + for (var o in rids) { + var currentrid = rids[o]; + //删除选中列表 + var i = jQuery.inArray(currentrid, _selectfile.selectall.icos); + if (i > -1) { + _selectfile.selectall.icos.splice(i, 1); + } + delete filemanage.data[currentrid]; + delete filemanage.currentdata['icos_' + currentrid]; + filemanage.sum--; + filemanage.total--; + filemanage.selectInfo(); + _selectfile.stack_run(filemanage.winid); //删除时如果有未显示的接着显示 + } + + } else { + _selectfile.removerid(rids[0]); + } + +} diff --git a/dzz/system/scripts/selorguser.js b/dzz/system/scripts/selorguser.js index 304fa99..025c5bc 100644 --- a/dzz/system/scripts/selorguser.js +++ b/dzz/system/scripts/selorguser.js @@ -39,7 +39,7 @@ selorg.set=function(ctrlid){ var val=[]; jQuery('#'+ctrlid+' li').each(function() { val.push(jQuery(this).data('val')); - }); + }); jQuery('#sel_'+ctrlid).val(val.join(',')); }; //y移除,并且取消机构树中的选择 diff --git a/dzz/system/scripts/uplodfile.js b/dzz/system/scripts/uplodfile.js new file mode 100644 index 0000000..0cfaf5f --- /dev/null +++ b/dzz/system/scripts/uplodfile.js @@ -0,0 +1,213 @@ +var _upload = {}; +_upload.total = 0; +_upload.completed = 0; +_upload.ismin = 1; +_upload.tips = $('#upload_file_tips'); +_upload.el = $('#uploading_file_list'); +_upload.filelist = $('.fileList'); +_upload.fid = null; +var attachextensions = (_explorer.space.attachextensions.indexOf('|') != -1) ? _explorer.space.attachextensions.join('|') : _explorer.space.attachextensions; +if (attachextensions == '') attachextensions = "\.*$"; +else attachextensions = "(\.|\/)(" + (attachextensions) + ")$"; +function fileupload(el,fid) { + el.off(); + el.fileupload({ + url: _explorer.appUrl+'&do=ajax&operation=uploads&container=' + fid, + dataType: 'json', + autoUpload: true, + maxChunkSize: parseInt(_explorer.space.maxChunkSize), //2M + dropZone: el.attr('id')=='wangpan-upload-folder'?null:$('#middleconMenu'), + pasteZone: el.attr('id')=='wangpan-upload-folder'?null:$('#middleconMenu'), + maxFileSize: parseInt(_explorer.space.maxattachsize) > 0 ? parseInt(_explorer.space.maxattachsize) : null, // 5 MB + acceptFileTypes: new RegExp(attachextensions, 'i'), + sequentialUploads: true + }).on('fileuploadadd', function (e, data) { + data.context = $('
    3. ').appendTo(_upload.el); + $.each(data.files, function (index, file) { + $(getItemTpl(file)).appendTo(data.context); + uploadadd(); + _uploadheight(); + }); + }).on('fileuploadsubmit', function (e, data) { + data.context.find('.upload-cancel').off('click').on('click', function () { + data.abort(); + data.files = ''; + uploaddone(); + $(this).parents('.dialog-info').find('.upload-cancel').hide(); + $(this).parents('.dialog-info').find('.upload-file-status').html('' + __lang.already_cancel + ''); + }); + + uploadsubmit(); + $.each(data.files, function (index, file) { + file.relativePath = (file.relativePath)?file.relativePath+file.name:''; + var relativePath = (file.webkitRelativePath ? file.webkitRelativePath :file.relativePath); + data.formData = {relativePath: relativePath}; + return; + }); + + }).on('fileuploadprocessalways', function (e, data) { + var index = data.index, + file = data.files[index]; + if (file.error) { + uploaddone(); + data.context.find('.upload-item.percent').html('' + file.error + ''); + } + }).on('fileuploadprogress', function (e, data) { + var index = data.index; + _upload.bitrate = formatSize(data.bitrate / 8); + var progre = parseInt(data.loaded / data.total * 100, 10); + data.context.find('.process').css('width',progre + '%'); + data.context.find('.upload-file-status .speed').html(_upload.bitrate + '/s'); + data.context.find('.upload-file-status .precent').html(progre + '%'); + }).on('fileuploadprogressall', function (e, data) { + _upload.bitrate = formatSize(data.bitrate / 8); + var progre = parseInt(data.loaded / data.total * 100, 10); + uploadprogress(_upload.bitrate + '/s', progre + '%'); + _upload.el.find('.panel-heading .upload-progress-mask').css('width', progre + '%'); + }).on('fileuploaddone', function (e, data) { + uploaddone(); + // data.context.find('.upload-progress-mask').css('width',progre + '%'); + // data.context.find('.upload-cancel').hide(); + data.context.find('.upload-progress-mask').css('width', '0%'); + data.context.find('.upload-cancel').hide(); + var process_bar=data.context.find('.process').css('width', '100%'); + if(process_bar){ + data.context.find('.process').css('background-color','#fff'); + } + $.each(data.result.files, function (index, file) { + if (file.error) { + var relativePath = (file.relativePath ? file.relativePath : ''); + data.context.find('.dialog-info .upload-file-status').html('' + file.error + ''); + } else { + + _upload.tips.find('.dialog-body-text').html(_upload.completed + '/' + _upload.total); + data.context.find('.upload-file-status .speed').html(''); + data.context.find('.upload-file-operate').html('完成'); + if(file.data.folderarr){ + for(var i=0;i' + file.error + ''); + }); + + }).on('fileuploaddrop', function (e, data) { + var url = e.dataTransfer.getData("text/plain"); + if (url) { + e.preventDefault(); + if (_explorer.Permission_Container('link', fid)) { + $.getJSON(_explorer.appUrl + '&do=dzzcp&do=newlink&path=' + parseInt(fid) + '&handlekey=handle_add_newlink&link=' + encodeURIComponent(url), function (json) { + if (!json) Alert(__lang.js_network_error, 1); + else if (json.error) { + Alert(json.error, 3); + } else { + _explorer.sourcedata.icos[json.rid]=json; + _selectfile.cons['f-'+fid].CreateIcos(json); + } + }); + return false; + } + } + }).on('fileuploaddragover', function (e) { + e.dataTransfer.dropEffect = 'copy'; + e.preventDefault(); + }); +} + +function uploadadd() { + _upload.total++; + _upload.tips.show(); + _upload.tips.find('.dialog-body-text').html(_upload.completed + '/' + _upload.total); +} + +function getItemTpl(file) { + var relativePath = (file.webkitRelativePath ? file.webkitRelativePath : (file.relativePath ? file.relativePath:file.name)); + var filearr = file.name.split('.'); + var ext = filearr.pop(); + var imgicon = ''; + var html = + '
      ' + + '
      '+imgicon+'
      ' + file.name + ' ' + + '
      ' + (file.size ? formatSize(file.size) : '') + '
      排队中' + + '
      ' + + ' ' + + '取消
      '; + return html; +} +function replace_img(obj){ + jQuery(obj).attr('src','dzz/images/default/icodefault.png'); +} + +function formatSize(bytes) { + var i = -1; + do { + bytes = bytes / 1024; + i++; + } while (bytes > 99); + + return Math.max(bytes, 0).toFixed(1) + ['kB', 'MB', 'GB', 'TB', 'PB', 'EB'][i]; +}; + +function uploadsubmit() { + _upload.el.find('.upload-sum-title').show().html(_upload.completed + '/' + _upload.total); +} +function uploaddone() { + _upload.completed++; + if (_upload.completed > _upload.total) { + _upload.el.find('.upload-sum-title').html(__lang.upload_finish + ':'); + _upload.el.find('.panel').addClass('ismin'); + _upload.ismin = 1; + } else { + _upload.el.find('.upload-sum-completed').show().html(_upload.completed + '/' + _upload.total); + } +} + +function uploadprogress(speed, per) { + _upload.el.find('.upload-speed').show().find('.upload-speed-value').html(speed); + if (_upload.speedTimer) window.clearTimeout(_upload.speedTimer); + _upload.speedTimer = window.setTimeout(function () { + _upload.el.find('.upload-speed').hide(); + }, 2000); +} +//文件上传成功 +$(document).on('click', '.dialog-close', function () {//事件委托 + $(this).parent('.dialog-tips').hide(); +}); +$(document).on('click', '.dialog-header-close', function () { + $(this).parents('.docunment-dialog').hide(); + $('#uploading_file_list').html(''); +}); +function _uploadheight() { + var winHeight = $('#uploading_file_list').height(); + if (winHeight > 441) { + _upload.el.animate({scrollTop: winHeight});//滚动条跟着滚动 + _upload.el.css({'overflow-y': 'auto', 'overflow-x': 'hidden', 'max-height': '460px'}); + } +}; +$(document).off('click.icon').on('click.icon', '.dialog-header-narrow', function () { + if ($(this).hasClass('dzz-dzz-min')) { + $(this).removeClass('dzz-dzz-min').addClass('dzz-dzz-max'); + $(this).parents('.docunment-dialog').css({'max-height': '146px', 'animation': '15s'}); + return false; + } else { + $(this).removeClass('dzz-dzz-max').addClass('dzz-dzz-min'); + $(this).parents('.docunment-dialog').css({'max-height': '600px', 'animation': '15s'}); + } +}); diff --git a/dzz/system/selectfile.php b/dzz/system/selectfile.php new file mode 100644 index 0000000..948c459 --- /dev/null +++ b/dzz/system/selectfile.php @@ -0,0 +1,31 @@ + $allowcreate, + 'nosearch' => 1, + 'inwindow' => 1, + 'ctrlid' => isset($_GET['selposition']) ? trim($_GET['selposition']) : 'selposition', + 'selhome'=>$selhome, + 'selorg'=>$selorg, + 'selgroup'=>$selgroup, + 'range'=>$range +); +$theurl = MOD_URL . "&op=filelist&callback=".$callback.'&'. url_implode($gets); +include template('selectfile'); +exit(); \ No newline at end of file diff --git a/dzz/system/selorguser.php b/dzz/system/selorguser.php index 2b43f6e..d0855de 100644 --- a/dzz/system/selorguser.php +++ b/dzz/system/selorguser.php @@ -20,16 +20,19 @@ $moderator=intval($_GET['moderator']);//是否仅可以选择我管理的群组 $range=intval($_GET['range']);//0:所有部门和群组;1:仅部门;2:仅群组 $multiple=intval($_GET['multiple']); //是否允许多线 $callback=$_GET['callback']?$_GET['callback']:'callback_selectuser';//回调函数名称 +$callback_url = isset($_GET['callback_url']) ? trim($_GET['callback_url']):''; +$deferer = dreferer(); $token=htmlspecialchars($_GET['token']); $gets = array( 'zero'=>$zero, - 'nouser'=>nouser, + 'nouser'=>$nouser, 'stype'=>$stype, 'moderator'=>$moderator, 'range'=>$range, 'multiple'=>$multiple, 'nosearch'=>1, - 'ctrlid'=>'seluser' + 'ctrlid'=>'seluser', + 'callback_url'=>$callback_url ); $theurl = MOD_URL."&op=orgtree&".url_implode($gets); $ids=explode(',',$ids); @@ -96,5 +99,12 @@ if($uids){ } $openarr_length=count($open)?'1':''; $openarr=json_encode($open); -include template('selorguser'); -exit(); +$ismobile = helper_browser::ismobile(); +if($ismobile){ + include template('mobile_selectuser'); + dexit(); +}else{ + include template('selorguser'); + exit(); +} + diff --git a/dzz/system/template/app_ajax.htm b/dzz/system/template/app_ajax.htm index c0594fe..13dec9d 100644 --- a/dzz/system/template/app_ajax.htm +++ b/dzz/system/template/app_ajax.htm @@ -61,7 +61,7 @@ jQuery('#app_popup1').show(); jQuery('#app_context .app-more').addClass('hide'); return false; - }) - + }) + \ No newline at end of file diff --git a/dzz/system/template/filelist.htm b/dzz/system/template/filelist.htm new file mode 100644 index 0000000..ecdc0e8 --- /dev/null +++ b/dzz/system/template/filelist.htm @@ -0,0 +1,345 @@ + + + + + + + + + + + +
      +
      + +
      +
      + +
      +
      <<
      +
      >>
      +
      +
    4. + 地址栏 + +
    5. +
      + +
      + +
      +
      + +
      + + + + +
      + + +
      + + + +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + +
      + +
      +
      +
      +
      + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dzz/system/template/fileselection/ajax.htm b/dzz/system/template/fileselection/ajax.htm new file mode 100644 index 0000000..dadd6ed --- /dev/null +++ b/dzz/system/template/fileselection/ajax.htm @@ -0,0 +1,263 @@ + + + + + +
      + + +
      + + + + + + + +
      + + + + +
      + + + + + + + +
      + + + +
      + + + + + + + + +
    6. + +
    7. data-href="$arr[url]" data-href="{eval echo dzzencode($arr[path]);}" +data-rid="$arr[rid]" data-ext="$arr[ext]" data-type="$arr[type]"data-name="$arr[name]" id="$arr[rid]"> + +
        +
      • +
        + + +
        +
        +
        + +
        +
        +
        +
        + $arr[name] +
        +
        +
        + + +
        +
        +
        +
      • +
      • $arr[fsize]
      • +
      • $arr[username]
      • +
      • {eval echo dgmdate($arr[dateline],'Y-m-d H:i:s')}
      • +
      +
    8. + + + + + + + + + diff --git a/dzz/system/template/fileselection/content.htm b/dzz/system/template/fileselection/content.htm new file mode 100644 index 0000000..c3dc4ef --- /dev/null +++ b/dzz/system/template/fileselection/content.htm @@ -0,0 +1,27 @@ + + +
      + + + diff --git a/dzz/system/template/fileselection/index.htm b/dzz/system/template/fileselection/index.htm new file mode 100644 index 0000000..1699c5c --- /dev/null +++ b/dzz/system/template/fileselection/index.htm @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dzz/system/template/fileselection/listcontent.htm b/dzz/system/template/fileselection/listcontent.htm new file mode 100644 index 0000000..25d64d9 --- /dev/null +++ b/dzz/system/template/fileselection/listcontent.htm @@ -0,0 +1,345 @@ + + + + +
      +
      + +
      +
      + +
      +
      +
      +
      +
      + +
      +
      +
      + + + + +
      +
      +
      +
      +
      +
      +
      +
      + +
      +
      + +
      + +
      + +
      + +
      +
      + + +
      + +
      + + \ No newline at end of file diff --git a/dzz/system/template/fileselection/right_contextmenu.htm b/dzz/system/template/fileselection/right_contextmenu.htm new file mode 100644 index 0000000..6fe7785 --- /dev/null +++ b/dzz/system/template/fileselection/right_contextmenu.htm @@ -0,0 +1,194 @@ + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +
      + + + + + + + + + + + + + +
      \ No newline at end of file diff --git a/dzz/system/template/fileselection/template_file_detaillist.htm b/dzz/system/template/fileselection/template_file_detaillist.htm new file mode 100644 index 0000000..f305690 --- /dev/null +++ b/dzz/system/template/fileselection/template_file_detaillist.htm @@ -0,0 +1,76 @@ + +
      +
      + + + + + + + + + +
      +
      {lang filename} + + + + +
      +
      +
      +
      {lang big_small} + + + + +
      +
      +
      +
      {lang type} + + + + +
      +
      +
      {lang edit_date} + + +
      +
      +
      + + + + + + + + + +
      +
      + + {name} + {collectstatus} +
      + +
      + {fsize} + + {ftype} + + {fdateline} +
      + +
      +
      + + + + \ No newline at end of file diff --git a/dzz/system/template/fileselection/template_file_detaillist_cat.htm b/dzz/system/template/fileselection/template_file_detaillist_cat.htm new file mode 100644 index 0000000..30f922c --- /dev/null +++ b/dzz/system/template/fileselection/template_file_detaillist_cat.htm @@ -0,0 +1,80 @@ + +
      +
      + + + + + + + + + + + +
      +
      {lang filename} + + + + +
      +
      +
      +
      {lang big_small} + + + + +
      +
      +
      +
      {lang type} + + + + +
      +
      +
      {lang edit_date} + + +
      {lang position}
      +
      +
      + + + + + + + + + + + + +
      +
      + + {name} + {collectstatus} +
      + +
      + {fsize} + + {ftype} + + {fdateline} + + {position} +
      + +
      +
      + \ No newline at end of file diff --git a/dzz/system/template/fileselection/template_file_middleicon.htm b/dzz/system/template/fileselection/template_file_middleicon.htm new file mode 100644 index 0000000..aafd7c4 --- /dev/null +++ b/dzz/system/template/fileselection/template_file_middleicon.htm @@ -0,0 +1,42 @@ +
      +
      +
      + + + + + + + + + +
      +
      + + + + + + +
      +
      +
      +
      +
      +
      +
      + + + + + + +
      {name}
      +
      +
      +
      +
      +
      +
      +
      + diff --git a/dzz/system/template/mobile_commer_header.htm b/dzz/system/template/mobile_commer_header.htm new file mode 100644 index 0000000..6ea8f79 --- /dev/null +++ b/dzz/system/template/mobile_commer_header.htm @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/dzz/system/template/mobile_selectuser.htm b/dzz/system/template/mobile_selectuser.htm new file mode 100644 index 0000000..197b99c --- /dev/null +++ b/dzz/system/template/mobile_selectuser.htm @@ -0,0 +1,247 @@ + + + + + + + + 成员 + + + + + + + + + + + + + + + + + +
      + + +
      + +
      +
      +
      +
        + +
      • {eval echo + avatar_block($value[uid]);}
      • + +
      +
      +
      +
      +
      + +
      +
      +
      + + + + + + + + + + \ No newline at end of file diff --git a/dzz/system/template/mobilefileselection/commer_header.htm b/dzz/system/template/mobilefileselection/commer_header.htm new file mode 100644 index 0000000..97394dc --- /dev/null +++ b/dzz/system/template/mobilefileselection/commer_header.htm @@ -0,0 +1,16 @@ + + + + + + + 文件选择 + + + + + + + + + \ No newline at end of file diff --git a/dzz/system/template/mobilefileselection/filelist.htm b/dzz/system/template/mobilefileselection/filelist.htm new file mode 100644 index 0000000..d94f064 --- /dev/null +++ b/dzz/system/template/mobilefileselection/filelist.htm @@ -0,0 +1,92 @@ + +
      +
      + + + + +
      +
      + +
      +
      +
      + +
      + +
      + + + +
      \ No newline at end of file diff --git a/dzz/system/template/mobilefileselection/flie_select.htm b/dzz/system/template/mobilefileselection/flie_select.htm new file mode 100644 index 0000000..c7bb464 --- /dev/null +++ b/dzz/system/template/mobilefileselection/flie_select.htm @@ -0,0 +1,373 @@ + + + + + + + + + + + + + +
      + +
      另存为
      +
      保存
      +
      + +
      + + + + +
      +
      + +
      +
      +
      + + + + + +
      + + +

      新建

      +
      + + +

      搜索

      +
      + + +

      刷新

      +
      + + +
      + + + + + + diff --git a/dzz/system/template/mobilefileselection/footer_menu.htm b/dzz/system/template/mobilefileselection/footer_menu.htm new file mode 100644 index 0000000..015ccd7 --- /dev/null +++ b/dzz/system/template/mobilefileselection/footer_menu.htm @@ -0,0 +1,78 @@ +
      + + +

      搜索

      +
      + + +

      刷新

      +
      + +
      +
      + + +

      新建

      +
      + + +

      搜索

      +
      + + +

      刷新

      +
      + + +
      \ No newline at end of file diff --git a/dzz/system/template/mobilefileselection/group.htm b/dzz/system/template/mobilefileselection/group.htm new file mode 100644 index 0000000..85dd115 --- /dev/null +++ b/dzz/system/template/mobilefileselection/group.htm @@ -0,0 +1,45 @@ + +
      + + + + +
      +
      + +
      +
      +
      + + + + \ No newline at end of file diff --git a/dzz/system/template/notification.htm b/dzz/system/template/notification.htm index 2cafb0b..44c9743 100644 --- a/dzz/system/template/notification.htm +++ b/dzz/system/template/notification.htm @@ -9,7 +9,7 @@
      - $value[author] + $value[author]
      diff --git a/dzz/system/template/orgtree.htm b/dzz/system/template/orgtree.htm index 87055c6..97e5eec 100644 --- a/dzz/system/template/orgtree.htm +++ b/dzz/system/template/orgtree.htm @@ -98,7 +98,9 @@ body{ background-color: transparent; background-image: none; } - +#orgtree{ + padding:15px;overflow:auto;height:100%; +} .orgtree-search{ display:none; @@ -114,10 +116,11 @@ var multiple=parseInt('$_GET[multiple]')>0?true:false; var nouser=parseInt('$_GET[nouser]')>0?1:0; var stype='$_GET[stype]'?parseInt('$_GET[stype]'):0;//0:可以选择机构和用户;1:仅选择机构和部门:2:仅选择用户 var moderator=parseInt('$_GET[moderator]')>0?1:0; +var callback_url = '{$callback_url}'; var ismobile='$ismobile'?1:0; -
      +