7 Commits

137 changed files with 17378 additions and 10088 deletions

View File

@@ -1,17 +1,21 @@
## PicHome beta3.0 更新说明
## PicHome beta3.3 更新说明
### 1.增加普通目录导入支持,普通目录可限定文件导入,默认使用 “站点设置”=>“导入设置”中的“允许导入文件”中的设置值,可根据需要更改。
### 1.billfish数据支持兼容billfish2.5版本数据导入
### 2.支持选择或输入指定目录地址作为库库更改为手动添加以便于自由选择eagle库或者普通目录库目录选择中默认屏蔽了一些由系统生成目录可在站点设置=>导入设置中的“禁止导入目录”中更改。
### 2.eagle数据支持兼容新旧版本eagle数据导入
### 3.普通目录支持部分图片缩略图、颜色获取和部分音视频文件信息和缩略图获取(注:格式可参考 站点设置”=>“导入设置”中的“允许导入文件”此功能pdf格式需有iamgick支持linux下音视频需ffmpeg支持);该功能可在库的“设置”中选择开启或不开启,需要注意的是开启该功能可能会占用大量服务器资源。
### 3.优化普通目录文件缩略图生成逻辑,优化效率,以及缩略图转换数字显示等问题修复
### 4.增加新的界面展示模板,可在 “站点设置”=>“界面设置”中切换
### 4.修复普通目录由于文件名长度问题导致的文件缺失和部分服务器中存在因路径分割符不同导致文件导入累加式重复问题
### 5.导入逻辑优化优化导入效率修复没有文件时一直在导入状态的bug
### 5.库设置增加库名称修改选项
### 6.优化删除库逻辑,删除更改为异步删除
### 6.修复页面标签未分类数据显示错误问题,修复单一库时存在的筛选项不能正常显示问题
### 7.优化访问效率
### 7.页面增加按eagle和billfish内目录排序显示支持
### 8.其他已知bug修复
### 8.优化库删除逻辑,删除时清理库冗余数据
### 9.文件访问地址修改为动态地址,增强文件私密性,为之后版本文件私密保护做准备
### 10.其他已知bug修复

View File

@@ -130,7 +130,7 @@ function html_login_form() {
$sid = getglobal('sid');
$avatarstatus=getglobal('avatarstatus','member');
if(!$uid ){
$avastar ='<img src="'.($_G['setting']['sitelogo']?\IO::getFileUri('attach::'.$_G['setting']['sitelogo']):'data/attachment/sitelogo/sitelogo.png').'" />';
$avastar ='<img src="data/attachment/sitelogo/sitelogo.png" />';
}else{
$avastar = avatar_block($uid);
}

View File

@@ -20,6 +20,7 @@ b725e80a7ff1e8a3a434e77ba290a6df *admin/system/dist/css/chunk-74c32c70.4b7d665e.
2e6b6788446f5529d3deed1697515b3b *admin/system/dist/css/chunk-76f23146.6fc79cd8.css
c513c1a246b65307640fca09b0034313 *admin/system/dist/css/chunk-77c8d08e.61624e22.css
d12dc4f1e439eb23e83c18205290cf55 *admin/system/dist/css/chunk-7828662a.c81657ef.css
053d89992d7adc9fae1b7830d031f2b0 *admin/system/dist/css/chunk-801d4da6.a47ba236.css
4fc8845677fec5f6ab3e4e56dcf36650 *admin/system/dist/css/chunk-9f9c2568.5356ad7d.css
84614a4a0974a1157dc75739ce2b8966 *admin/system/dist/css/chunk-af3b1b98.b822363f.css
f018e18ed2f2fe16f2d76ed02b284545 *admin/system/dist/css/chunk-e730cc06.987283b7.css
@@ -33,7 +34,8 @@ ea41001e9a9735db73fd1c33f753a258 *admin/system/dist/css/chunk-vendors.4d5d56a8.c
888e61f04316f10bddfff7bee10c6dd0 *admin/system/dist/fonts/remixicon.888e61f0.ttf
9915fef980fa539085da55b84dfde760 *admin/system/dist/fonts/remixicon.9915fef9.woff2
95138f36e015ad912c37db92164f5844 *admin/system/dist/img/remixicon.95138f36.svg
6ccaad5c6ef97e4ba59c3d8eb8e37d39 *admin/system/dist/index.html
911c0d4f607a5e0f1ba2a9eb9280ab66 *admin/system/dist/index.html
e116b4f06b14ec0f557bbf891fd591af *admin/system/dist/js/chunk-2b4f90f7.8dd0185d.js
057184d69924bbec3848613e9d484a61 *admin/system/dist/js/chunk-2b4f90f7.ec4ac270.js
9915050af25ebd2a757ddda815fa2025 *admin/system/dist/js/chunk-2d0a3327.ad2684c9.js
14d1eb5255f59b744a0e86b76e999f8c *admin/system/dist/js/chunk-2d0bdbc6.4ec7bc5e.js
@@ -54,13 +56,15 @@ f1356ba4b41b1c2d0db9158645cfd968 *admin/system/dist/js/chunk-2d0dd46d.bd431129.j
240a2f188b2b072ac8200cd0a3cc153a *admin/system/dist/js/chunk-76f23146.0d2957ed.js
60e968e5f5a74243077cee14c95528ee *admin/system/dist/js/chunk-77c8d08e.3e576953.js
80880cf301a3788dc9bee90756f7e93d *admin/system/dist/js/chunk-7828662a.e587f025.js
55515e2cd3f2bb776a090112418eae77 *admin/system/dist/js/chunk-801d4da6.0f74a3ea.js
55253ec60403c36280aecd7a278c8737 *admin/system/dist/js/chunk-9f9c2568.538835dd.js
0b209b8b1a24238e609f30444e59741f *admin/system/dist/js/chunk-9f9c2568.877eae72.js
037a3c1f50e8e47edde48a7ff4d45130 *admin/system/dist/js/chunk-af3b1b98.850ec152.js
25f102fba0aba57fcad60998d1e1c334 *admin/system/dist/js/chunk-e730cc06.3ce9a994.js
328be3371bb7c2536befbfddcc64e417 *admin/system/dist/js/chunk-vendors.3b95dfe3.js
b4c690180b4c0268240bb8544d252b67 *admin/system/dist/js/index.5892fe49.js
5247e802fd0efbbe8eb80cd9f6a34540 *admin/system/dist/js/index.b5ff203c.js
aab63af8b9c2d8610ba5ab295de6c96a *admin/system/dist/js/index.be6002c4.js
e6b823145386281984301ad83fcf96fe *admin/system/dist/js/index.d36cff59.js
904b573ab459ffaba51c33b5851d0f5d *admin/system/dist/js/index.d77cc092.js
0d548b27371bb03899d61437a8cdf8fa *admin/system/dist/js/system_temp.c7e32270.js
554e1288867238ccbe21a7dc65fe9487 *admin/system/dzz_app_system.xml
@@ -109,9 +113,9 @@ bfd0cbd4c4120f0bef89fb2898332f2b *core/class/class_bbcode.php
bcfb2e3e9c3ff2018f356176a1cf43a2 *core/class/class_core.php
723a351225f0f7562784e35f8607ce29 *core/class/class_DbException.php
3ce9db683150a76cd033167c7e281391 *core/class/class_Des.php
b950274816c263377559b82772efaa04 *core/class/class_FileDownload.php
212cc7650e4798754337b1fefb291827 *core/class/class_FileDownload.php
b6b0b9dc4773307d80f9215ed5122361 *core/class/class_GifMerge.php
4793dcfc740be53d3fc40ba98562558a *core/class/class_image.php
fda45a96b7be48e159007eb8434a9685 *core/class/class_image.php
d301e008d382be1af825d77bc993d423 *core/class/class_ImagePalette.php
1b836428237ca8d2bb58695cbe37df67 *core/class/class_JSSDK.php
986ad79bf8a9bff90c64c82918c0fa74 *core/class/class_Minifier.php
@@ -218,24 +222,25 @@ b333c9e8748737d29d090f31a502a147 *core/class/table/table_mailcron.php
7efba4a878332f9739c40a4f63d96f64 *core/class/table/table_organization_job.php
f9fea2c25dbea100b27386dde7057be4 *core/class/table/table_organization_upjob.php
7e02ce47e363f56c798a7c261cccc6a4 *core/class/table/table_organization_user.php
def27091cbc525a4cd45b2955472ce29 *core/class/table/table_pichome_collectlist.php
37e3c23f4c36ba1167bc433f18e8ce93 *core/class/table/table_pichome_comments.php
dc169efe36fdf79623277fb5a538c673 *core/class/table/table_pichome_ffmpeg_record.php
64030519d059cc061b9cc990b2ed9b08 *core/class/table/table_pichome_folder.php
1cbfd07fc6cc2ec4ce28cae9d5334a95 *core/class/table/table_pichome_folder.php
15cc26415b076bb08eeed7f76c40c45b *core/class/table/table_pichome_folderresources.php
fb390b2cfce67236a7263549a430868b *core/class/table/table_pichome_folder_relation.php
180233f6f8d234986280df5c3821fe24 *core/class/table/table_pichome_imagickrecord.php
26298713afbbb276e365e2b440454321 *core/class/table/table_pichome_palette.php
6b369ce49f9a03b0e29a062352b99454 *core/class/table/table_pichome_resources.php
8f36fe58bb79975f403ea0fa5e868c85 *core/class/table/table_pichome_resourcestag.php
a2a946f8d3a0180db50b1c7435d9516a *core/class/table/table_pichome_palette.php
9070977794d2ca52379721d552c3e1e7 *core/class/table/table_pichome_resources.php
534452d059df927d062dac5bcd7b0de6 *core/class/table/table_pichome_resourcestag.php
c08ce988dad5ccead193db0a7f79b4f2 *core/class/table/table_pichome_resources_attr.php
09db8f5c9d2966f503bee5a4c6d6cc32 *core/class/table/table_pichome_resources_relation.php
4fb898320b47959764b3f09a5489418b *core/class/table/table_pichome_searchrecent.php
757655270a99be70f9e781fbae5f6634 *core/class/table/table_pichome_share.php
fafb2bf10eed9314bc2bf2d6b32d84b9 *core/class/table/table_pichome_tag.php
02ef950574c3af62f7b13fd61a61c2ce *core/class/table/table_pichome_taggroup.php
306a994431aaffaa2faf08f3d5de7d50 *core/class/table/table_pichome_taggroup_relation.php
d36c3e504e4666b6a9301699ebeeeaa5 *core/class/table/table_pichome_taggroup_relation.php
1969387f935173b42f34c33c426e1fb7 *core/class/table/table_pichome_tagrelation.php
59d5d07f70e88fbb93f56f5e4b953c6c *core/class/table/table_pichome_vapp.php
c860e27706f0d5d97efceba9a5a1c619 *core/class/table/table_pichome_vapp.php
eea6b39fd13b5fdf18052c7733adb369 *core/class/table/table_process.php
ffc8c199da703d941c493fa317785611 *core/class/table/table_session.php
774bda01812449ffa4819b0be241dc4e *core/class/table/table_setting.php
@@ -254,7 +259,7 @@ d5b0e7dc291a731a5c184d97baecf2df *core/class/table/table_user_profile_setting.ph
bc2e189cfaacbdb84ddceb3a0abdcf92 *core/class/table/table_user_verify_info.php
692cda4c6ad17e87e1edefb7251d0116 *core/class/table/table_user_wechat.php
ca64f852f9c9442d65fa30ed279c6d6c *core/coreBase.php
d712c1ad304eafdd40573ea7cc9e1609 *core/core_version.php
32785586bb05fca676beed40893a76ba *core/core_version.php
d90d23b8deb20cef2c43e66725ec2813 *core/cron/cron_cache_cleanup_week.php
540843e90244b66d31a1deb8c882d238 *core/cron/cron_cache_pichome_searchhot.php
09bf107dfc58f0424b0245834d221a42 *core/cron/cron_clean_notification_month.php
@@ -262,7 +267,7 @@ d90d23b8deb20cef2c43e66725ec2813 *core/cron/cron_cache_cleanup_week.php
b9d93753f597cf46343c07234d01a37b *core/cron/cron_pichome_getimagecolor.php
c04ccafee38c3e06208024a7cbe8a656 *core/cron/cron_pichome_getvideoinfo.php
3925c2ef1804631507efcdae43ec1108 *core/cron/cron_pichome_getwideothumb.php
3f04fd27593769aa47af32734d542a12 *core/cron/cron_pichome_updatelibrary_file.php
dc6a0c77112286b82c5742d0b93c6b6d *core/cron/cron_pichome_updatelibrary_file.php
e437812ec0dbb1050daa691303544d1c *core/dzzstart.php
d4c7872572f6965e3173a12153dd758b *core/function/cache/cache_fields_optional.php
98b3024c7107943c8573cf473d624710 *core/function/cache/cache_fields_register.php
@@ -371,10 +376,25 @@ f4741b20d0983035a4db52858a0f6240 *data/cache/tags.php
47bbeaba8bfa9a1b1d088e2977ddc314 *data/extdata/exts.php
d41d8cd98f00b204e9800998ecf8427e *data/sendmail.lock
d41d8cd98f00b204e9800998ecf8427e *data/sendwx.lock
ac153bd851d728eed4c993b38260f1c8 *dzz/class/class_encode.php
3adf9db6567079f39787326907e65a81 *dzz/billfish/class/class_billfishexport.php
043e8771d5984838964069c11815a104 *dzz/billfish/class/table/table_billfish_folderrecord.php
e8a6a327799675bebb4a6c66aa895f32 *dzz/billfish/class/table/table_billfish_record.php
946e09642ffe242f3eb7e3876e66127b *dzz/billfish/class/table/table_billfish_taggrouprecord.php
af76b998930a2ea1b565afe98e83c6e3 *dzz/billfish/class/table/table_billfish_tagrecord.php
66eb18511cf2fd7817c97629562f45b2 *dzz/billfish/classes/delpichomefolderafter.php
aebc0d22523952b3a81993ab5d52321d *dzz/billfish/classes/getpichomethumb.php
930c3c4350639839e724b8de7d16b013 *dzz/billfish/classes/pichomevappdelete.php
e284fd1a7b8d5d5ce30d04583588c5e1 *dzz/class/class_encode.php
762fd46dbe12c6fa06ba3df224fe20f8 *dzz/eagle/class/class_eagleexport.php
e165ceec42c6de2c56b5d4339f4843e1 *dzz/eagle/class/table/table_eagle_folderrecord.php
2c1f9123c8775cd340416afee533d29a *dzz/eagle/class/table/table_eagle_record.php
e9a0575b63f2ee8011d81724eb829b30 *dzz/eagle/classes/deleteafter.php
d2a28bf51a52b9530d54e364e6e5766c *dzz/eagle/classes/delpichomefolderafter.php
db2a8594d52f5cc6f65f5271849b094f *dzz/eagle/classes/getpichomethumb.php
0b99362e5be7a741986567d8e9738c69 *dzz/eagle/classes/pichomevappdelete.php
a3ad077bda18e4057e0b31e3b3b2eed4 *dzz/ffmpeg/class/class_fmpeg.php
a8a30984a87248b934ef8747481b2e0e *dzz/ffmpeg/classes/info.php
3ba0ebc60cd19158228e5c47f931aa80 *dzz/ffmpeg/classes/thumb.php
bc4ab81b4c26d1a67a97a9f105201e7e *dzz/ffmpeg/classes/info.php
d8ed7668f7e78a7618f80db40f88f2b8 *dzz/ffmpeg/classes/thumb.php
b0ef25e19c4aa9e96c06f5fb6f091883 *dzz/ffmpeg/composer.json
a962e01165e345d26a86a07e9e098239 *dzz/ffmpeg/composer.lock
808d6119fa0a890a2554fa07e600ba7d *dzz/ffmpeg/convert.php
@@ -389,8 +409,8 @@ b49d7db7da975848af00a7597333d12e *dzz/ffmpeg/ffmpeg/avcodec-57.dll
109731440511e75afa2c4dcbe5b2d069 *dzz/ffmpeg/ffmpeg/postproc-54.dll
91ca5f81f37690d1e05772947b38e8a0 *dzz/ffmpeg/ffmpeg/swresample-2.dll
4f49c26e951e69007d60edf054d2a37a *dzz/ffmpeg/ffmpeg/swscale-4.dll
17d36f2ee186514a290fab9baaeac65e *dzz/ffmpeg/getinfo.php
671f1a782b7dc9395519933bffb967fe *dzz/ffmpeg/thumb.php
54eb4c59cb02380010cabc5d69aae021 *dzz/ffmpeg/getinfo.php
c81877414511a5f8c1e919c61526da2a *dzz/ffmpeg/thumb.php
723b27a2bb73cccf492ed827bc528a5c *dzz/ffmpeg/vendor/alchemy/binary-driver/LICENSE
9608b8205db23a377edd4f328af949bd *dzz/ffmpeg/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/AbstractBinary.php
96d510df2561b5a55bc62b0d04db9861 *dzz/ffmpeg/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/BinaryDriverTestCase.php
@@ -683,8 +703,8 @@ e0fbf93ee3e79762c694682e010f721d *dzz/ffmpeg/vendor/symfony/process/LICENSE
882fab9690637ec4cf9746b825b21e15 *dzz/ffmpeg/vendor/symfony/process/Process.php
2a3b661974c0cd7432f29595ccdb6a93 *dzz/ffmpeg/vendor/symfony/process/ProcessBuilder.php
13625bd3819dabb00e70409aa8b8cc54 *dzz/ffmpeg/vendor/symfony/process/ProcessUtils.php
848f904ac7e815cf4abc752639c32f68 *dzz/imageColor/classes/getcolor.php
8fcedaed7fefce2be26a36d2ac4bf9af *dzz/imageColor/index.php
634039b168dae271922c99af9b144e4b *dzz/imageColor/classes/getcolor.php
be1fd6f396b2fda2f45217565298f52e *dzz/imageColor/index.php
a35efffbc8ffb84994c399cac01fb592 *dzz/images/addUser.png
325472601571f31e1bf00674c368d335 *dzz/images/b.gif
87fadeff473ddcb5208b7af66ae5966a *dzz/images/close.png
@@ -969,9 +989,11 @@ bae84af37dba1b272ef439708d1b8e9f *dzz/images/extimg_small/xml.png
a949e13639231f3ab4192465ff2538ac *dzz/images/logo-blue.png
b92838cc79a788fc78a7685b5aae1f28 *dzz/index/index.php
d615e6446bb74240281aa217d6f5ad01 *dzz/index/login.php
28d0c2d1aacb4500ef061f8eae72200f *dzz/io/getImg.php
f1f3a52260de623f37da59db88d5132f *dzz/io/getImg.php
c922015b4938aea09a73ed7d1d759ee4 *dzz/language/en-US/lang.php
d91b3ccebc18bcd41bc44e9da28d598f *dzz/language/zh-CN/lang.php
d0cec69ef9e94897d184cee623497d3f *dzz/local/class/class_localexport.php
6620d302f12ba470c79c46e17d94b87f *dzz/local/classes/deleteafter.php
e6ff860b694692916c323609ac7697f8 *dzz/pdf/build/pdf.js
81b75950e639b1439c398d62a6037686 *dzz/pdf/build/pdf.js.map
f025b4d2dd3cd3eca72f347e2406101d *dzz/pdf/build/pdf.worker.js
@@ -1379,10 +1401,11 @@ badeea57fda90d27e54a9f9488ac4c43 *dzz/pdf/web/viewer.html
f2dddeac144b9bbac3ef849464bdf74b *dzz/pdf/web/viewer.js
9d8f7b8df2cf3dffa23febb3582928d4 *dzz/pdf/web/viewer.js.map
57cbaacb499474a5ca6c14a86d411512 *dzz/pichome/admin.php
7a4feb3626ba6a8e2bfad12b6d2b4ff0 *dzz/pichome/ajax.php
3d3aa981f09612419f1cffe5cfa4f4ab *dzz/pichome/ajax.php
c550e347457729fb118592d6be50d050 *dzz/pichome/checkexport.php
706bd367941708aa5b026376fc56e6a6 *dzz/pichome/class/class_eagleexport.php
395888f8a190db23bfa5e5af2dac3e55 *dzz/pichome/class/class_localexport.php
b6201d143beca6278320d101db08695f *dzz/pichome/class/class_eagleexport.php
ae068aea655bde669f255db1dd988024 *dzz/pichome/class/class_localexport.php
8bd360df9ad3377d6ede3c4b56c73c6c *dzz/pichome/collection.php
6293eb9bd5b473c7f178be5d6534341c *dzz/pichome/config/config.php
29640dfed0df1100d9c8e4d819b4c593 *dzz/pichome/css/admin.css
07f01151181178c663d669622ea927f3 *dzz/pichome/css/common.css
@@ -1396,55 +1419,66 @@ f09b1c7476e28ad67f1c2f2f314230a0 *dzz/pichome/css/fonts/remixicon.symbol.svg
881fbc46361e0c0e5f003c159b2f3005 *dzz/pichome/css/fonts/remixicon.woff
9915fef980fa539085da55b84dfde760 *dzz/pichome/css/fonts/remixicon.woff2
beba9d9c0e6f710c90145d9e3cbbab2d *dzz/pichome/css/index.css
393c3333716eea4c974db36b5a8630d5 *dzz/pichome/css/mobile/common.css
577f7f31ca1ac0fe27b7c7e8f28f838f *dzz/pichome/css/mobile/details.css
871bda5b39c93380460d42db713c2932 *dzz/pichome/css/mobile/index.css
87163334cb48cff22fdabe3e8e615cc7 *dzz/pichome/css/mobile/common.css
0f7c873eb385eefd56b37a025b978eb4 *dzz/pichome/css/mobile/details.css
ed97c351d8b9390710c7421c4197bcf1 *dzz/pichome/css/mobile/image.css
86078d14becfe840e42b75da9b7193ec *dzz/pichome/css/mobile/index.css
f1e227b4a2e8a0345daaf6141e1856dd *dzz/pichome/css/mobile/personal.css
3af6f1b9febc5c78806ac865f8d18ebb *dzz/pichome/css/mobile/screen.css
cc6d3bf279ed780dd69d0dcc250bd442 *dzz/pichome/css/mobile/share.css
d56b57b7000fef922f9031726810a467 *dzz/pichome/css/pc/AddcollectionDialog.css
509deac393472e307756fc9deee67276 *dzz/pichome/css/pc/admin.css
7a9ae0c0a2a7ccfe1b92949ce1efd330 *dzz/pichome/css/pc/common.css
670b7f2f61bdfd492b53e03e750ee531 *dzz/pichome/css/pc/collection.css
6b6a57a59a5d6ee5bd3c3c501baf1b02 *dzz/pichome/css/pc/common.css
7b846f80e058d874a9cb7106a18e5b78 *dzz/pichome/css/pc/components/addcollect.css
e600f6b1841e3542bb948a5289e9363e *dzz/pichome/css/pc/components/collect.css
e3123a0f6930b3d0a84387d3102c704d *dzz/pichome/css/pc/details.css
478715f3a9570d1be58dda7943ec1a4c *dzz/pichome/css/pc/image.css
1a7589e0fb94c67ded810b23cceb0ea6 *dzz/pichome/css/pc/index.css
1b81547e0d91292d2a77153774bbf013 *dzz/pichome/css/pc/image.css
c0a5a61c77eb071519b9e148edafdacd *dzz/pichome/css/pc/index.css
16ceb77eb522e138548921aa5b024a36 *dzz/pichome/css/pc/screen.css
69c8a20f13ee8eb40d35ddd497d35fd3 *dzz/pichome/css/pc/xuanzhuan/iconfont.ttf
b006647cb9c39a657d354fcf0bdf88bf *dzz/pichome/css/pc/xuanzhuan/index.css
48994b9f88c49cdb67a88116380cfb95 *dzz/pichome/css/theme/black/index.css
3d037ab39fd205fc01dcb0644dc73594 *dzz/pichome/css/theme/black/root.css
ec549d08e4bd82c18ac8a906e7c3ff0e *dzz/pichome/css/theme/black/root.css
247be4f622b714c5745e69ebb932e197 *dzz/pichome/css/theme/darkgrey/index.css
9a6e6b73f09a721abe91bcadd9d1dbcd *dzz/pichome/css/theme/darkgrey/root.css
3e59794617124cb119a6b0fc763a7c14 *dzz/pichome/css/theme/darkgrey/root.css
732389ded34cb9c52dd88271f1345af9 *dzz/pichome/css/theme/fonts/element-icons.ttf
535877f50039c0cb49a6196a5b7517cd *dzz/pichome/css/theme/fonts/element-icons.woff
dce825b1ca6c3b1c18adc856618b8602 *dzz/pichome/css/theme/lightgrey/index.css
6c11a6e69881f44860b2dd8a9b7dde51 *dzz/pichome/css/theme/lightgrey/root.css
8e19f8f0afd86036d9e6b74e8fa25b4f *dzz/pichome/css/theme/lightgrey/root.css
106204b58c77af1048a22bfe9cbd1d49 *dzz/pichome/css/theme/navyblue/index.css
2669ef65012ea0cc6ca29e3c5f57bf47 *dzz/pichome/css/theme/navyblue/root.css
9e60cad02523fcf3aac6c9d960294af0 *dzz/pichome/css/theme/navyblue/root.css
6a3812a857dae07ed74b59d26c86d7e1 *dzz/pichome/css/theme/purple/index.css
2566cbfc860d4bc3c12812d9d35011ef *dzz/pichome/css/theme/purple/root.css
48fcbcbd9d925541404038119bacdc9a *dzz/pichome/css/theme/purple/root.css
4705cbd2d8a842635d69d2ace637212e *dzz/pichome/css/theme/white/index.css
b07e0746971bb7c6dfc1d88ed2bdc4b2 *dzz/pichome/css/theme/white/root.css
24100e5ac1435598339350ec3ccf63bc *dzz/pichome/delete.php
42223aa2673c8b81e62a8ebc481d9da2 *dzz/pichome/css/theme/white/root.css
7dded9715f7c5c2408f7905b6cddf810 *dzz/pichome/delete.php
0bc21a1af1a289191cf5a48523f2cf8c *dzz/pichome/details.php
2531bc3851ab49b6c3f95d0c09850382 *dzz/pichome/download.php
214cabed470fd756b227851860513e6b *dzz/pichome/download.php
e245c8b1f860c8252eade7f3dec51879 *dzz/pichome/dzz_app_pichome.xml
0d5b36f34930c6f3234ba9482fbcb401 *dzz/pichome/exportfile.php
2e03b890f6a73541d58e9fa68ab17624 *dzz/pichome/exportfilecheck.php
ab80472bc466830bbf05847da7026017 *dzz/pichome/filelist.php
43f2f7de28bea4de51cde2b4f1f8e82b *dzz/pichome/exportfile.php
af14eda8139abc2d09e421cc4b27a1b4 *dzz/pichome/exportfilecheck.php
f0b8396b0798d20e257802e0284c1c99 *dzz/pichome/filelist.php
2d0185de715fe914af40ce715d15afca *dzz/pichome/function/function_common.php
d211a97399d52fea48f94a45a06648d1 *dzz/pichome/image/eaglefile.webp
8a53ae7b1997c5ddc37e06b74f47b6b2 *dzz/pichome/image/flashlight.png
152ec265e38eb67acb6cb31026448e3d *dzz/pichome/image/img/t1.jpeg
651d0b49012d763c7dda236756274a9d *dzz/pichome/image/img/t2.jpg
309c31fa9200e0c9b4ee8fd3f1399dfc *dzz/pichome/image/img/t3.jpeg
5f5562a16dad1fa33294b5c0a920f1d6 *dzz/pichome/image/img/t4.jpeg
006790064e59717d811f6f1eec849e63 *dzz/pichome/image/library/billfish.png
e6bda96407083273f2a6ef5ac3b1e819 *dzz/pichome/image/library/eagle.png
cf4ad845fa202adf1c2c99dba55a6490 *dzz/pichome/image/library/file.png
5d34d2b476b50156b594b9371dd38d1f *dzz/pichome/image/library/library.png
08a26df5cbee8f21dbac8d646d1da218 *dzz/pichome/image/nodata.svg
1f0ee3cd38e82bd18490a34fcec8c690 *dzz/pichome/image/notScreen.png
f308fd14dbe2e06349ef366d6f9aa2c7 *dzz/pichome/image/palette.png
d51db8efca781201f641a41b57420dfe *dzz/pichome/image/phlogo.png
9a21fde6d13f5377bb4c23e1103f65c5 *dzz/pichome/index.php
4d793d9993042e9beda12a40272576c7 *dzz/pichome/initexport.php
438384ffb6dbf09c63f9c0254c57340a *dzz/pichome/index.php
9976279181804deb1113d4b3e6af7fab *dzz/pichome/initexport.php
c9b191574ccc8ab6c8ff631302f10561 *dzz/pichome/install.php
29b8b6254aaaa263cbb0fe8272f05a59 *dzz/pichome/js/audioPlay.js
a088950fc4bf4348d87cda978e5ded97 *dzz/pichome/js/common.js
ed875394497b550972b24c9b09d00955 *dzz/pichome/js/common.js
b7a95d9f617863cf515a43e7b83978c5 *dzz/pichome/js/headerMethods.js
d752d1878252e486cc0244887cfadbae *dzz/pichome/js/headerWatch.js
d5843dbdc71ff8014a5eafd346a262da *dzz/pichome/js/jquery.mousewheel.min.js
@@ -1455,11 +1489,14 @@ d36c75e3d8880ebfece375fd7cd46787 *dzz/pichome/js/mobile/plug/colorPicker/jquery.
b5d4479aca9121ce9ed95af5d77c10d9 *dzz/pichome/js/mobile/plug/vant/index.css
3d5fcccab75bba76cc259351e875d42a *dzz/pichome/js/mobile/plug/vant/vant.min.js
29b8b6254aaaa263cbb0fe8272f05a59 *dzz/pichome/js/pc/audioPlay.js
27f51d96c2a6cca4ec0abbce6e0a24db *dzz/pichome/js/pc/components/addcollect.js
1bfeb0538751df45e883d9751aae14a3 *dzz/pichome/js/pc/components/collect.js
56972b38bc78798895d3bb917f4aeb5e *dzz/pichome/js/pc/components/collectdialog.js
2ffc868ac18c18d948c3ae5576afa98b *dzz/pichome/js/pc/headerMethods.js
84f0575bc959e85fc1abab5dc71d3079 *dzz/pichome/js/pc/headerWatch.js
d5843dbdc71ff8014a5eafd346a262da *dzz/pichome/js/pc/jquery.mousewheel.min.js
72dbef2b0dd2644f4fb4e72ddbb7013b *dzz/pichome/js/pc/plug/DomResize.js
8a788a8d0bfb2d3c1988bddb4aef4b4b *dzz/pichome/js/pc/plug/element-ui.js
693f98461ce3fa58cbe5ac24d9a21b1e *dzz/pichome/js/pc/plug/element-ui.js
66fe9527aec8d8b68e3bc5036ea8f7f9 *dzz/pichome/js/pc/plug/sortable.min.js
7292e14f4f8fad306d40a6d7d586b225 *dzz/pichome/js/pc/plug/wavesurfer.js
ef4591bffb23a90c8d9e0d02a7b5c15f *dzz/pichome/js/pc/row-grid.js
@@ -1476,15 +1513,18 @@ b21b8531847604ab5f2f5caaef51ba31 *dzz/pichome/js/vue/vue.js
69764bf35375a54256412f3c748b312d *dzz/pichome/js/waterfall.js
c24f19d7061cdf5bae41e5e9b9f5600c *dzz/pichome/language/en-US/lang.php
8a3e6ab24d873202b96c3acd9c1b0d2b *dzz/pichome/language/zh-CN/lang.php
05d2d04e0cd1f4e16bc46c2d5fe7893e *dzz/pichome/library.php
9b1430e306b95dff41087a2fca148484 *dzz/pichome/library.php
ccef8b340c90fc0061c6dd645fecc8df *dzz/pichome/setting.php
cda7d5feb6b4ed907d8a1eeb7d0ba46d *dzz/pichome/share.php
30a3b6a3143136ebf197c3e58e6bcfe8 *dzz/pichome/share.php
892a7e59f327bc5f273fc0fe2cd2679b *dzz/pichome/template/mobile/components/classify.htm
00be7e9bc0e92e22f9c7aa8fce703854 *dzz/pichome/template/mobile/components/index/JsCommon.htm
23b99d3824aa02a61621667b100dbacb *dzz/pichome/template/mobile/components/index/image/classify.htm
5752e1116e385c87552c6328125e14c3 *dzz/pichome/template/mobile/components/index/image/JsCollect.htm
b5ff94d14983520fb465ffa78959b81f *dzz/pichome/template/mobile/components/index/image/more.htm
643af4f4eabf3fd0f01d05f1e0fb6189 *dzz/pichome/template/mobile/components/index/JsCommon.htm
3c0bae451668c060ae526d3253e9be73 *dzz/pichome/template/mobile/components/index/JsDetailMessage.htm
b61252abe414de77e062e3f96aabccbd *dzz/pichome/template/mobile/components/index/JsImages.htm
801d90ff93583268416fdc99faa91860 *dzz/pichome/template/mobile/components/index/JsIndex.htm
18939ca3c3ccb67156c1d2f3d059a3fa *dzz/pichome/template/mobile/components/index/JsMy.htm
493f25784b802d691a49b22d55345e19 *dzz/pichome/template/mobile/components/index/JsImages.htm
507954354bef6b8905158c9037d38e8a *dzz/pichome/template/mobile/components/index/JsIndex.htm
d1051b51dd34c88927309c4e82744553 *dzz/pichome/template/mobile/components/index/JsMy.htm
a09a548c0637e1dfc7397410ac056711 *dzz/pichome/template/mobile/components/index/JsScreen.htm
76399fc5b4e7a84ee75ed49e34e483c9 *dzz/pichome/template/mobile/components/index/JsSearch.htm
aa8df8e4c660d9136bbff54070a2522a *dzz/pichome/template/mobile/components/index/JsSort.htm
@@ -1505,20 +1545,26 @@ ae8d0557008c6f19458bed5c49db2167 *dzz/pichome/template/mobile/components/index/s
8f54b82e6d2f9cb4d7ba43d09a39f088 *dzz/pichome/template/mobile/frame/footer_simple.htm
ae502b90b2b31175892efe56867bc2e7 *dzz/pichome/template/mobile/frame/header_simple_end.htm
fdc74d5e180321fc338ae91a1a90e22e *dzz/pichome/template/mobile/frame/header_simple_start.htm
f9c4288c838455ae487c2cc0c4d44890 *dzz/pichome/template/mobile/page/details.htm
f9f65e35608efe6563e49abbc66c1249 *dzz/pichome/template/mobile/page/index.htm
385067e1775bcc445b1dbc978d543ac0 *dzz/pichome/template/mobile/page/details.htm
e34a4b13baa25f03bddc82608964ffd7 *dzz/pichome/template/mobile/page/index.htm
be7755b8e73e2ffa49557e8c3891027a *dzz/pichome/template/mobile/page/personal.htm
63845b99e6f7f14d1385b56a0c4ffebf *dzz/pichome/template/mobile/page/share.htm
dd8403f5dbcfb5767f01143f12afff93 *dzz/pichome/template/pc/components/headerAdmin/index.htm
59d6f74af0683d8c3dee09e7e09f9787 *dzz/pichome/template/mobile/page/share.htm
de346d0b0da4cc4eceb143baf17f6812 *dzz/pichome/template/pc/components/collection/Jsimage.htm
7705ce7827e5d3de8b4b41659ff0d9e9 *dzz/pichome/template/pc/components/collection/JsLeft.htm
74a6088ee7aa0b3cf1201de5b6d30132 *dzz/pichome/template/pc/components/headerAdmin/index.htm
e078614bb6d558d96006ec127f7c392c *dzz/pichome/template/pc/components/headerindex/index.htm
0436c3ba601aa0804b0e51926f557988 *dzz/pichome/template/pc/components/headerindex/screen.htm
105d244408ea6a9780677c28b376ea6c *dzz/pichome/template/pc/components/headerindex/searchScreen.htm
e3cbbf2cf1281dfe69ee59584debe8dc *dzz/pichome/template/pc/components/image/ImageAudioPlay.htm
8719049c86e5ed162ef840352086ee8f *dzz/pichome/template/pc/components/image/ImageList.htm
7bd38f47edd65c05832edd108ef1479e *dzz/pichome/template/pc/components/image/ImageRowGrid.htm
b146499d5bc505f37ec0d323394d1e27 *dzz/pichome/template/pc/components/image/ImageWaterfall.htm
e52de01bb534c8ae8906aeea2a26e4bc *dzz/pichome/template/pc/components/index/header/JsHdeaderSearch1.htm
710efaf3e9e92603f55599af84e07f2b *dzz/pichome/template/pc/components/index/header/JsHdeaderSearch2.htm
0b560bcf32b9928e09a087efbe543405 *dzz/pichome/template/pc/components/index/header/JsHdeaderSearchInput.htm
aa36103d6b45e77c11a97dc34f5fa38c *dzz/pichome/template/pc/components/index/header/JsHdeaderSearchInput.htm
44afb76ddd1106c3081e901b74ccd350 *dzz/pichome/template/pc/components/index/header/JsHdeaderSearchScreen.htm
cdfdeb7826e501fc2d0dabbe4545bba6 *dzz/pichome/template/pc/components/index/header/JsHeaderRight.htm
82a1a57d683d58fd868fb91fac13ab25 *dzz/pichome/template/pc/components/index/header/JsHeaderRightAvatar.htm
2dcef9d94e0d12773e17f32cf9c84720 *dzz/pichome/template/pc/components/index/header/JsHeaderRightAvatar.htm
a5629a36eef6a8c0d3aec35f3a679d86 *dzz/pichome/template/pc/components/index/header/JsHeaderRightBtn.htm
754c1ae954a2bd706a9ca808225927c9 *dzz/pichome/template/pc/components/index/image/ImageAudioPlay.htm
8719049c86e5ed162ef840352086ee8f *dzz/pichome/template/pc/components/index/image/ImageList.htm
@@ -1526,12 +1572,12 @@ f394ee2d8177fe42a05aeb7c5d1b783a *dzz/pichome/template/pc/components/index/image
506a3a316c9b37a48c65ed71c7435f33 *dzz/pichome/template/pc/components/index/image/ImageWaterfall.htm
e75f2d5563b6d12d345ee4414e2840f9 *dzz/pichome/template/pc/components/index/images.htm
0764f300b91acf6e60925fa91c528941 *dzz/pichome/template/pc/components/index/indexVuex.htm
ac1a37ef71ff76f05435a47b8f13a6b8 *dzz/pichome/template/pc/components/index/JsCommon.htm
f18d9fc925dd80b5682ea9b65afb96c0 *dzz/pichome/template/pc/components/index/JsCommon.htm
d88649d33a48388af9e95f4b7b3aeea8 *dzz/pichome/template/pc/components/index/JsHeader1.htm
eb3a364123d4c0982dfc2497683adc29 *dzz/pichome/template/pc/components/index/JsHeader2.htm
4f7c5892b56744064e332bd2a9b64852 *dzz/pichome/template/pc/components/index/Jsimage.htm
203fade598d5f1f14bd0cbe612f400c9 *dzz/pichome/template/pc/components/index/Jsimage.htm
e5f81267932b2e39355c4bff620d11b6 *dzz/pichome/template/pc/components/index/JsLibrary.htm
1f1b56d62e79127ce0b5b78d00dedd9b *dzz/pichome/template/pc/components/index/JsScreen.htm
7a925a4631acb01fc275bbb237250d92 *dzz/pichome/template/pc/components/index/JsScreen.htm
ca1f90529303acc461fb2ce08fb6e7fc *dzz/pichome/template/pc/components/index/screen/btime/js.htm
a2d7aa1c09cf3119740247c2c84dc880 *dzz/pichome/template/pc/components/index/screen/btime/temp.htm
be0730d952f4744e88b2055c32d1f08b *dzz/pichome/template/pc/components/index/screen/classify/js.htm
@@ -1556,26 +1602,26 @@ a91f8cdb2836930e60e76000e14cd109 *dzz/pichome/template/pc/components/index/scree
026964771fde79d520db8fca996705d5 *dzz/pichome/template/pc/components/index/screen/shape/temp.htm
ed778182594282451fdeaf533390504a *dzz/pichome/template/pc/components/index/screen/size/js.htm
6607851de5183d1db762d74a184220b1 *dzz/pichome/template/pc/components/index/screen/size/temp.htm
14b788e3582ec1a59b1df295d645acf6 *dzz/pichome/template/pc/components/index/screen/tag/js.htm
ce8f0dddfb2446e04ed00da108a9d5ff *dzz/pichome/template/pc/components/index/screen/tag/js.htm
12adf53eb950a45a47d2d80e8b246fa6 *dzz/pichome/template/pc/components/index/screen/tag/temp.htm
c2953f2cc75684f3a777148ad8c5fce9 *dzz/pichome/template/pc/components/index/screen.htm
e99ff61dd48256711bfc0f6b7620d4ab *dzz/pichome/template/pc/components/index/template2/JsLeft.htm
56e224bc38e1eb8da17523729f62dfd8 *dzz/pichome/template/pc/components/index/template2/JsLeft.htm
8f54b82e6d2f9cb4d7ba43d09a39f088 *dzz/pichome/template/pc/frame/footer_simple.htm
ae502b90b2b31175892efe56867bc2e7 *dzz/pichome/template/pc/frame/header_simple_end.htm
08154101159fde8eb21fe522cc937e4c *dzz/pichome/template/pc/frame/header_simple_start.htm
42648cd5769edf01f824444c5acc98b2 *dzz/pichome/template/pc/page/adminBasic.htm
f45c9ec8917e94bf4b61a7b5bbacf3e5 *dzz/pichome/template/pc/page/adminBasic.htm
d46f3035458009aa3d87d579da8848c3 *dzz/pichome/template/pc/page/adminFileterset.htm
ef3300e59bc7be272f56ade943326d88 *dzz/pichome/template/pc/page/adminImportsetting.htm
ea578588242396cb021031f41dd4bc69 *dzz/pichome/template/pc/page/adminLeft.htm
0e57e8ab9dbccead521f9b18fe8a2de2 *dzz/pichome/template/pc/page/adminLoginpage.htm
624c95c6ba1998d1f0538493c510fed1 *dzz/pichome/template/pc/page/adminPagesetting.htm
0920466b526ad2b5b6e20c8b2acead53 *dzz/pichome/template/pc/page/adminPersonal.htm
e7d36a2b763f353c1df3bf82d9695673 *dzz/pichome/template/pc/page/details.htm
3ad11c89ea7b41c55b63d2f5d29004fb *dzz/pichome/template/pc/page/adminPersonal.htm
364cd2b3bba93563c86ebf33102a6ba9 *dzz/pichome/template/pc/page/details.htm
8e351bacc90f2855e890cc3cb0ef9fc2 *dzz/pichome/template/pc/page/index.htm
3434b3277fb32f8dd37684b5d898c24b *dzz/pichome/template/pc/page/index1.htm
dee08b61a3556659df1cb5daa3845b4e *dzz/pichome/template/pc/page/index2.htm
13a21e3c1168124857f64369e53bc024 *dzz/pichome/template/pc/page/library.htm
d05bbcc9ca122a830c924cfabed697c0 *dzz/pichome/template/pc/page/share.htm
22d1d385387e15a52c90b35eb6ed3a55 *dzz/pichome/template/pc/page/index1.htm
b672309ad39f5e67246c0aabe7811306 *dzz/pichome/template/pc/page/index2.htm
c339f4670ef6db9e27f37f497e36f566 *dzz/pichome/template/pc/page/library.htm
b3675471f7a9d279efd0162ac18f1505 *dzz/pichome/template/pc/page/share.htm
3cd79761b99168c3f9faf607183df134 *dzz/pichome/uninstall.php
b5221437a0c978e0caf63f2278759934 *dzz/pichome/uninstall_real.php
a5c5705a5b9e3a2175d3633656ae614e *dzz/pichome/updatesearchvaldata.php
@@ -1607,8 +1653,8 @@ b0bb6c733a343afcddcd03baaeff31b0 *dzz/xgplayer/js/xgplayer.music.js
5cb9422375b907e05eb6b7dc36fcd895 *favicon.ico
8e55bdb192a3aefe82e03292527819ca *htaccess_default.txt
55d39f5cf3916ab6a9336d95c671ab53 *index.php
37beb2f26d52660fed7d76cc77959e26 *install/data/install.sql
4a35501b2e1fca641c5a8d2d5175e72d *install/data/install_data.sql
b92e6bc4f11bbece12288d800321aa3c *install/data/install.sql
2630350d3ef08d868fcd36e678094709 *install/data/install_data.sql
feabf4e4c8e20dc73548dfd6ba8400f9 *install/images/error.png
fc25acefcabc066437d4b27550387954 *install/images/logo.png
2ba93e93e0fbdfeb91e22f6d3bf8b6ca *install/images/logo.svg
@@ -1620,9 +1666,9 @@ fc25acefcabc066437d4b27550387954 *install/images/logo.png
a987af86766c27c565794ffa189cf664 *install/include/install_mysql.php
249b244097610688130b93721d1c2bd1 *install/include/install_mysqli.php
effd4ff5bdac95bbc9e360de443f335c *install/include/install_var.php
81c8f56afad64263e7f7be6e8f223338 *install/index.php
672ea3abb501cb04f0708a5c69ac2161 *install/language/zh-cn/lang.php
63947a3a069dd8a3433f1c4a182c96a1 *install/update.php
4c34d50daace82774e12ef92efb93d18 *install/index.php
677cacb463b31ea65d0ce771f9c02422 *install/language/zh-cn/lang.php
2938ca630f07497e9a4adedf25fbdae2 *install/update.php
5aefe69b1ba16fe8a6f79c2156f8f281 *misc/ajax.php
66ee773a4c2e373da92f48f81930cf3f *misc/classes/init.php
f656adb0c1b2699a4d8c613f2b9dacab *misc/pichomeexport.php

View File

@@ -1,184 +1,184 @@
<?php
/*
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
* @license https://www.oaooa.com/licenses/
*
* @link https://www.oaooa.com
* @author zyx(zyx@oaooa.com)
*/
if(!defined('IN_OAOOA')) {
exit('Access Denied');
}
global $_G;
Hook::listen('adminlogin');
$uid = $_G['uid'];
include libfile('function/filerouterule');
require libfile('function/code');
$operation = $_GET['operation'] ? trim($_GET['operation']) : '';
if($operation == 'getApp'){//获取当前用户应用
$config = array();
if($_G['uid']){
$config= dzz_userconfig_init();
if(!$config){
//$config= dzz_userconfig_init();
if($config['applist']){
$applist=explode(',',$config['applist']);
}else{
$applist=array();
}
}else{//检测不允许删除的应用,重新添加进去
if($config['applist']){
$applist=explode(',',$config['applist']);
}else{
$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)));
}
}
}else{
$applist =array_keys(C::t('app_market')->fetch_all_by_default());
}
//获取已安装应用
$app=C::t('app_market')->fetch_all_by_appid($applist);
$applist_1=array();
$applist_2=array();
$identifier=array('imageTool','picture');
foreach($app as $key => $value){
if($value['isshow']<1) continue;
if($value['available']<1) continue;
if($value['position']<1) continue;//位置为无的忽略
//判断管理员应用
if($_G['adminid']!=1 && $value['group']==3){
continue;
}
$params=array('name'=>$value['identifier'],'perm'=>1,'return_type'=>'bool');
if(Hook::listen('rolecheck',$params,null,true)===false) continue;
//if($value['system'] == 2) continue;
if(in_array($value['identifier'], $identifier)){
$applist_1[] = $value;
}else{
$applist_2[] = $value;
}
}
//获取虚拟应用
$params=array();
$vapps=Hook::listen('vapplist',$params,null,true);
foreach($vapps as $key => $value){
$params=array('name'=>'vapp/'.$value['identifier'],'perm'=>1,'return_type'=>'bool');
if(Hook::listen('rolecheck',$params,null,true)===false) continue;
$applist_1[] = $value;
}
//对应用根据disp 排序
if($applist_1){
$sort = array(
'direction' => 'SORT_ASC', //排序顺序标志 SORT_DESC 降序SORT_ASC 升序
'field' => 'disp', //排序字段
);
$arrSort = array();
foreach($applist_1 AS $uniqid => $row){
foreach($row AS $key=>$value){
$arrSort[$key][$uniqid] = $value;
}
}
if($sort['direction']){
array_multisort($arrSort[$sort['field']], constant($sort['direction']), $applist_1);
}
}
exit(json_encode(array('data'=>array_merge($applist_1,$applist_2))));
}else{
// 地址栏名称
$navtitle = $_G['setting']['sitename'];
// 获取hash
$hash = FORMHASH;
// 获取当前用户信息
$userData = array();
$udata = DB::fetch_first("select u.uid,u.avatarstatus,u.username,u.groupid,u.adminid,u.nickname,s.svalue from %t u
left join %t s on s.uid = u.uid and s.skey=%swhere u.uid =%d",
array('user','user_setting','headerColor',$uid));
if($udata['avatarstatus'] == 1){
$userData['icon'] = 'avatar.php?uid='.$udata['uid'].'&random='.VERHASH;
}elseif($udata['svalue']){
$userData['firstword'] = strtoupper(new_strsubstr($udata['username'],1,''));
$userData['headerColor'] = $udata['svalue'];
$userData['icon'] = false;
}else{
$colorkey = rand(1,15);
$headerColor = $colors[$colorkey];
C::t('user_setting')->insert_by_skey('headerColor',$headerColor,$udata['uid']);
$userData['firstword'] = strtoupper(new_strsubstr($udata['username'],1,''));
$userData['headerColor'] = $udata['svalue'];
}
if( C::t('user')->checkfounder($udata)){
$userData['perm'] = 3;
}elseif($udata['adminid'] == 1){
$userData['perm'] = 2;
}else{
$userData['perm'] = 1;
}
$userData['username'] = $udata['username'];
$userData['uid'] = $uid;
$userData['language'] = $_G[language];
$userData['upgrade'] = $_G['setting']['upgrade'];
$userData['version'] = $_G['setting']['version'];
// 获取顶部应用
if($userData['language'] == 'en-US'){
$navMenuNames = ['System setting','Cloud settings','Orguser','App','Statistics','System Tool'];
}else{
$navMenuNames = ['系统设置','云设置','用户','应用','统计','系统工具'];
}
$navMenu = array(
array(
'name'=>$navMenuNames[0],
'index'=>'setting',
'type'=>'admin'
),
array(
'name'=>$navMenuNames[1],
'index'=>'cloudsetting',
'type'=>'admin'
),
array(
'name'=>$navMenuNames[2],
'index'=>'orguser',
'type'=>'admin'
),
array(
'name'=>$navMenuNames[3],
'index'=>'app',
'type'=>'admin'
),
array(
'name'=>$navMenuNames[4],
'index'=>'stats',
'type'=>'dzz'
),
array(
'name'=>$navMenuNames[5],
'index'=>'system',
'type'=>'admin'
),
);
// 获取通知
$notice_num=DB::result_first("select COUNT(*) from %t where new>0 and uid=%d",array('notification',$_G['uid']));
exit(json_encode(array('hash'=>$hash,'navMenu'=>$navMenu,'userData'=>$userData,'notice_num'=>$notice_num,'navtitle'=>$navtitle)));
}
?>
<?php
/*
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
* @license https://www.oaooa.com/licenses/
*
* @link https://www.oaooa.com
* @author zyx(zyx@oaooa.com)
*/
if(!defined('IN_OAOOA')) {
exit('Access Denied');
}
global $_G;
Hook::listen('adminlogin');
$uid = $_G['uid'];
include libfile('function/filerouterule');
require libfile('function/code');
$operation = $_GET['operation'] ? trim($_GET['operation']) : '';
if($operation == 'getApp'){//获取当前用户应用
$config = array();
if($_G['uid']){
$config= dzz_userconfig_init();
if(!$config){
//$config= dzz_userconfig_init();
if($config['applist']){
$applist=explode(',',$config['applist']);
}else{
$applist=array();
}
}else{//检测不允许删除的应用,重新添加进去
if($config['applist']){
$applist=explode(',',$config['applist']);
}else{
$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)));
}
}
}else{
$applist =array_keys(C::t('app_market')->fetch_all_by_default());
}
//获取已安装应用
$app=C::t('app_market')->fetch_all_by_appid($applist);
$applist_1=array();
$applist_2=array();
$identifier=array('imageTool','picture');
foreach($app as $key => $value){
if($value['isshow']<1) continue;
if($value['available']<1) continue;
if($value['position']<1) continue;//位置为无的忽略
//判断管理员应用
if($_G['adminid']!=1 && $value['group']==3){
continue;
}
$params=array('name'=>$value['identifier'],'perm'=>1,'return_type'=>'bool');
if(Hook::listen('rolecheck',$params,null,true)===false) continue;
//if($value['system'] == 2) continue;
if(in_array($value['identifier'], $identifier)){
$applist_1[] = $value;
}else{
$applist_2[] = $value;
}
}
//获取虚拟应用
$params=array();
$vapps=Hook::listen('vapplist',$params,null,true);
foreach($vapps as $key => $value){
$params=array('name'=>'vapp/'.$value['identifier'],'perm'=>1,'return_type'=>'bool');
if(Hook::listen('rolecheck',$params,null,true)===false) continue;
$applist_1[] = $value;
}
//对应用根据disp 排序
if($applist_1){
$sort = array(
'direction' => 'SORT_ASC', //排序顺序标志 SORT_DESC 降序SORT_ASC 升序
'field' => 'disp', //排序字段
);
$arrSort = array();
foreach($applist_1 AS $uniqid => $row){
foreach($row AS $key=>$value){
$arrSort[$key][$uniqid] = $value;
}
}
if($sort['direction']){
array_multisort($arrSort[$sort['field']], constant($sort['direction']), $applist_1);
}
}
exit(json_encode(array('data'=>array_merge($applist_1,$applist_2))));
}else{
// 地址栏名称
$navtitle = $_G['setting']['sitename'];
// 获取hash
$hash = FORMHASH;
// 获取当前用户信息
$userData = array();
$udata = DB::fetch_first("select u.uid,u.avatarstatus,u.username,u.groupid,u.adminid,u.nickname,s.svalue from %t u
left join %t s on s.uid = u.uid and s.skey=%swhere u.uid =%d",
array('user','user_setting','headerColor',$uid));
if($udata['avatarstatus'] == 1){
$userData['icon'] = 'avatar.php?uid='.$udata['uid'].'&random='.VERHASH;
}elseif($udata['svalue']){
$userData['firstword'] = strtoupper(new_strsubstr($udata['username'],1,''));
$userData['headerColor'] = $udata['svalue'];
$userData['icon'] = false;
}else{
$colorkey = rand(1,15);
$headerColor = $colors[$colorkey];
C::t('user_setting')->insert_by_skey('headerColor',$headerColor,$udata['uid']);
$userData['firstword'] = strtoupper(new_strsubstr($udata['username'],1,''));
$userData['headerColor'] = $udata['svalue'];
}
if( C::t('user')->checkfounder($udata)){
$userData['perm'] = 3;
}elseif($udata['adminid'] == 1){
$userData['perm'] = 2;
}else{
$userData['perm'] = 1;
}
$userData['username'] = $udata['username'];
$userData['uid'] = $uid;
$userData['language'] = $_G[language];
$userData['upgrade'] = $_G['setting']['upgrade'];
$userData['version'] = $_G['setting']['version'];
// 获取顶部应用
if($userData['language'] == 'en-US'){
$navMenuNames = ['System setting','Cloud settings','Orguser','App','Statistics','System Tool'];
}else{
$navMenuNames = ['系统设置','云设置','用户','应用','统计','系统工具'];
}
$navMenu = array(
array(
'name'=>$navMenuNames[0],
'index'=>'setting',
'type'=>'admin'
),
array(
'name'=>$navMenuNames[1],
'index'=>'cloudsetting',
'type'=>'admin'
),
array(
'name'=>$navMenuNames[2],
'index'=>'orguser',
'type'=>'admin'
),
array(
'name'=>$navMenuNames[3],
'index'=>'app',
'type'=>'admin'
),
array(
'name'=>$navMenuNames[4],
'index'=>'stats',
'type'=>'dzz'
),
array(
'name'=>$navMenuNames[5],
'index'=>'system',
'type'=>'admin'
),
);
// 获取通知
$notice_num=DB::result_first("select COUNT(*) from %t where new>0 and uid=%d",array('notification',$_G['uid']));
exit(json_encode(array('hash'=>$hash,'navMenu'=>$navMenu,'userData'=>$userData,'notice_num'=>$notice_num,'navtitle'=>$navtitle)));
}
?>

View File

@@ -1,200 +1,200 @@
<?php
/*
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
* @license https://www.oaooa.com/licenses/
*
* @link https://www.oaooa.com
* @author zyx(zyx@oaooa.com)
*/
if (!defined('IN_OAOOA') || !defined('IN_ADMIN')) {
exit('Access Denied');
}
include_once libfile('function/cache');
//error_reporting(E_ALL);
$op = $_GET['op'];
$navtitle = lang('cron') . ' - ' . lang('admin_navtitle');
if (empty($_GET['edit']) && empty($_GET['run'])) {
if (!submitcheck('cronssubmit')) {
$crons = array();
$query = DB::query("SELECT * FROM " . DB::table('cron') . " ORDER BY type DESC");
while ($cron = DB::fetch($query)) {
$disabled = $cron['weekday'] == -1 && $cron['day'] == -1 && $cron['hour'] == -1 && $cron['minute'] == '' ? 'disabled' : '';
if ($cron['day'] > 0 && $cron['day'] < 32) {
$cron['time'] = lang('monthly') . $cron['day'] . lang('day');
} elseif ($cron['weekday'] >= 0 && $cron['weekday'] < 7) {
$cron['time'] = lang('weekly') . lang('misc_cron_week_day_' . $cron['weekday']);
} elseif ($cron['hour'] >= 0 && $cron['hour'] < 24) {
$cron['time'] = lang('everyday');
} else {
$cron['time'] = lang('per_hour');
}
$cron['time'] .= $cron['hour'] >= 0 && $cron['hour'] < 24 ? sprintf('%02d', $cron[hour]) . lang('timeliness') : '';
if (!in_array($cron['minute'], array(-1, ''))) {
foreach ($cron['minute'] = explode("\t", $cron['minute']) as $k => $v) {
$cron['minute'][$k] = sprintf('%02d', $v);
}
$cron['minute'] = implode(',', $cron['minute']);
$cron['time'] .= $cron['minute'] . lang('point');
} else {
$cron['time'] .= '00' . lang('point');
}
$cron['lastrun'] = $cron['lastrun'] ? dgmdate($cron['lastrun'], $_G['setting']['dateformat'] . "<\b\\r />" . $_G['setting']['timeformat']) : '<b>N/A</b>';
$cron['nextcolor'] = $cron['nextrun'] && $cron['nextrun'] + $_G['setting']['timeoffset'] * 3600 < TIMESTAMP ? 'style="color: #ff0000"' : '';
$cron['nextrun'] = $cron['nextrun'] ? dgmdate($cron['nextrun'], $_G['setting']['dateformat'] . "<\b\\r />" . $_G['setting']['timeformat']) : '<b>N/A</b>';
$cron['run'] = $cron['available'];
$crons[] = $cron;
}
} else {
if ($ids = dimplode($_GET['delete'])) {
DB::delete('cron', "cronid IN ($ids) AND type!='system'");
}
if (is_array($_GET['namenew'])) {
foreach ($_GET['namenew'] as $id => $name) {
$newcron = array('name' => dhtmlspecialchars($_GET['namenew'][$id]), 'available' => $_GET['availablenew'][$id]);
if (empty($_GET['availablenew'][$id])) {
$newcron['nextrun'] = '0';
}
DB::update('cron', $newcron, "cronid='{$id}'");
}
}
if ($newname = trim($_GET['newname'])) {
DB::insert('cron', array('name' => dhtmlspecialchars($newname), 'type' => 'user', 'available' => '0', 'weekday' => '-1', 'day' => '-1', 'hour' => '-1', 'minute' => '', 'nextrun' => $_G['timestamp'], ));
}
$query = DB::query("SELECT cronid, filename FROM " . DB::table('cron'));
while ($cron = DB::fetch($query)) {
$efile = explode(':', $cron['filename']);
if (count($efile) > 1) {
$filename = array_pop($efile);
$cronfile = DZZ_ROOT. ''.implode("/",$efile).'/cron/'.$filename;
} else {
$cronfile = DZZ_ROOT . './core/cron/' . $cron['filename'];
}
if (!file_exists($cronfile)) {
DB::update('cron', array('available' => '0', 'nextrun' => '0', ), "cronid='$cron[cronid]'");
}
}
updatecache('setting');
$msg = lang('crons_succeed');
$redirecturl = BASESCRIPT . '?mod=system&op=cron';
$msg_type = 'text-success';
}
} else {
$cronid = empty($_GET['run']) ? $_GET['edit'] : $_GET['run'];
$cron = DB::fetch_first("SELECT * FROM " . DB::table('cron') . " WHERE cronid='$cronid'");
if (!$cron) {
$msg = lang('cron_not_found');
$redirecturl = BASESCRIPT . '?mod=system&op=cron';
$msg_type = 'text-error';
include template('cron');
exit();
}
$cron['filename'] = str_replace(array('..', '/', '\\'), array('', '', ''), $cron['filename']);
$cronminute = str_replace("\t", ',', $cron['minute']);
$cron['minute'] = explode("\t", $cron['minute']);
if (!empty($_GET['edit'])) {
if (!submitcheck('editsubmit')) {
$navtitle = lang('misc_cron_edit') . ' - ' . lang('admin_navtitle');
$weekdayselect = $dayselect = $hourselect = '';
for ($i = 0; $i <= 6; $i++) {
$weekdayselect .= "<option value=\"$i\" " . ($cron['weekday'] == $i ? 'selected' : '') . ">" . lang('misc_cron_week_day_' . $i) . "</option>";
}
for ($i = 1; $i <= 31; $i++) {
$dayselect .= "<option value=\"$i\" " . ($cron['day'] == $i ? 'selected' : '') . ">$i " . lang('day') . "</option>";
}
for ($i = 0; $i <= 23; $i++) {
$hourselect .= "<option value=\"$i\" " . ($cron['hour'] == $i ? 'selected' : '') . ">$i " . lang('timeliness') . "</option>";
}
} else {
$daynew = $_GET['weekdaynew'] != -1 ? -1 : $_GET['daynew'];
if (strpos($_GET['minutenew'], ',') !== FALSE) {
$minutenew = explode(',', $_GET['minutenew']);
foreach ($minutenew as $key => $val) {
$minutenew[$key] = $val = intval($val);
if ($val < 0 || $var > 59) {
unset($minutenew[$key]);
}
}
$minutenew = array_slice(array_unique($minutenew), 0, 12);
$minutenew = implode("\t", $minutenew);
} else {
$minutenew = intval($_GET['minutenew']);
$minutenew = $minutenew >= 0 && $minutenew < 60 ? $minutenew : '';
}
$msg = '';
$_GET['filenamenew'] = str_replace(array('..', '/', '\\'), '', $_GET['filenamenew']);
$efile = explode(':', $_GET['filenamenew']);
if (count($efile) > 1) {
$filename = array_pop($efile);
$cronfile = DZZ_ROOT. ''.implode("/",$efile).'/cron/'.$filename;
} else {
$cronfile = DZZ_ROOT . './core/cron/' . $cron['filename'];
}
if (preg_match("/[\\\\\/\*\?\"\<\>\|]+/", $_GET['filenamenew'])) {
$msg = lang('crons_filename_illegal');
} elseif (!is_readable($cronfile)) {
$msg = lang('crons_filename_invalid', array('cronfile' => $cronfile));
} elseif ($_GET['weekdaynew'] == -1 && $daynew == -1 && $_GET['hournew'] == -1 && $minutenew === '') {
$msg = lang('crons_time_invalid');
}
if (!empty($msg)) {
$msg_type = 'text-error';
$redirecturl = dreferer();
include template('cron');
exit();
}
DB::update('cron', array('weekday' => $_GET['weekdaynew'], 'day' => $daynew, 'hour' => $_GET['hournew'], 'minute' => $minutenew, 'filename' => trim($_GET['filenamenew']), ), "cronid='$cronid'");
dzz_cron::run($cronid);
$msg = lang('crons_succeed');
$msg_type = 'text-success';
$redirecturl = BASESCRIPT . '?mod=system&op=cron';
}
} else {
$cron['filename'] = str_replace(array('..', '/', '\\'), '', $cron['filename']);
$efile = explode(':', $cron['filename']);
if (count($efile) > 1) {
$filename = array_pop($efile);
$cronfile = DZZ_ROOT. ''.implode("/",$efile).'/cron/'.$filename;
} else {
$cronfile = DZZ_ROOT . './core/cron/' . $cron['filename'];
}
if (!file_exists($cronfile)) {
$msg = lang('crons_run_invalid', array('cronfile' => $cronfile));
$msg_type = 'text-error';
} else {
dzz_cron::run($cron['cronid']);
$msg = lang('crons_run_succeed');
$redirecturl = BASESCRIPT . '?mod=system&op=cron';
$msg_type = 'text-success';
}
}
}
include template('cron');
?>
<?php
/*
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
* @license https://www.oaooa.com/licenses/
*
* @link https://www.oaooa.com
* @author zyx(zyx@oaooa.com)
*/
if (!defined('IN_OAOOA') || !defined('IN_ADMIN')) {
exit('Access Denied');
}
include_once libfile('function/cache');
//error_reporting(E_ALL);
$op = $_GET['op'];
$navtitle = lang('cron') . ' - ' . lang('admin_navtitle');
if (empty($_GET['edit']) && empty($_GET['run'])) {
if (!submitcheck('cronssubmit')) {
$crons = array();
$query = DB::query("SELECT * FROM " . DB::table('cron') . " ORDER BY type DESC");
while ($cron = DB::fetch($query)) {
$disabled = $cron['weekday'] == -1 && $cron['day'] == -1 && $cron['hour'] == -1 && $cron['minute'] == '' ? 'disabled' : '';
if ($cron['day'] > 0 && $cron['day'] < 32) {
$cron['time'] = lang('monthly') . $cron['day'] . lang('day');
} elseif ($cron['weekday'] >= 0 && $cron['weekday'] < 7) {
$cron['time'] = lang('weekly') . lang('misc_cron_week_day_' . $cron['weekday']);
} elseif ($cron['hour'] >= 0 && $cron['hour'] < 24) {
$cron['time'] = lang('everyday');
} else {
$cron['time'] = lang('per_hour');
}
$cron['time'] .= $cron['hour'] >= 0 && $cron['hour'] < 24 ? sprintf('%02d', $cron[hour]) . lang('timeliness') : '';
if (!in_array($cron['minute'], array(-1, ''))) {
foreach ($cron['minute'] = explode("\t", $cron['minute']) as $k => $v) {
$cron['minute'][$k] = sprintf('%02d', $v);
}
$cron['minute'] = implode(',', $cron['minute']);
$cron['time'] .= $cron['minute'] . lang('point');
} else {
$cron['time'] .= '00' . lang('point');
}
$cron['lastrun'] = $cron['lastrun'] ? dgmdate($cron['lastrun'], $_G['setting']['dateformat'] . "<\b\\r />" . $_G['setting']['timeformat']) : '<b>N/A</b>';
$cron['nextcolor'] = $cron['nextrun'] && $cron['nextrun'] + $_G['setting']['timeoffset'] * 3600 < TIMESTAMP ? 'style="color: #ff0000"' : '';
$cron['nextrun'] = $cron['nextrun'] ? dgmdate($cron['nextrun'], $_G['setting']['dateformat'] . "<\b\\r />" . $_G['setting']['timeformat']) : '<b>N/A</b>';
$cron['run'] = $cron['available'];
$crons[] = $cron;
}
} else {
if ($ids = dimplode($_GET['delete'])) {
DB::delete('cron', "cronid IN ($ids) AND type!='system'");
}
if (is_array($_GET['namenew'])) {
foreach ($_GET['namenew'] as $id => $name) {
$newcron = array('name' => dhtmlspecialchars($_GET['namenew'][$id]), 'available' => $_GET['availablenew'][$id]);
if (empty($_GET['availablenew'][$id])) {
$newcron['nextrun'] = '0';
}
DB::update('cron', $newcron, "cronid='{$id}'");
}
}
if ($newname = trim($_GET['newname'])) {
DB::insert('cron', array('name' => dhtmlspecialchars($newname), 'type' => 'user', 'available' => '0', 'weekday' => '-1', 'day' => '-1', 'hour' => '-1', 'minute' => '', 'nextrun' => $_G['timestamp'], ));
}
$query = DB::query("SELECT cronid, filename FROM " . DB::table('cron'));
while ($cron = DB::fetch($query)) {
$efile = explode(':', $cron['filename']);
if (count($efile) > 1) {
$filename = array_pop($efile);
$cronfile = DZZ_ROOT. ''.implode("/",$efile).'/cron/'.$filename;
} else {
$cronfile = DZZ_ROOT . './core/cron/' . $cron['filename'];
}
if (!file_exists($cronfile)) {
DB::update('cron', array('available' => '0', 'nextrun' => '0', ), "cronid='$cron[cronid]'");
}
}
updatecache('setting');
$msg = lang('crons_succeed');
$redirecturl = BASESCRIPT . '?mod=system&op=cron';
$msg_type = 'text-success';
}
} else {
$cronid = empty($_GET['run']) ? $_GET['edit'] : $_GET['run'];
$cron = DB::fetch_first("SELECT * FROM " . DB::table('cron') . " WHERE cronid='$cronid'");
if (!$cron) {
$msg = lang('cron_not_found');
$redirecturl = BASESCRIPT . '?mod=system&op=cron';
$msg_type = 'text-error';
include template('cron');
exit();
}
$cron['filename'] = str_replace(array('..', '/', '\\'), array('', '', ''), $cron['filename']);
$cronminute = str_replace("\t", ',', $cron['minute']);
$cron['minute'] = explode("\t", $cron['minute']);
if (!empty($_GET['edit'])) {
if (!submitcheck('editsubmit')) {
$navtitle = lang('misc_cron_edit') . ' - ' . lang('admin_navtitle');
$weekdayselect = $dayselect = $hourselect = '';
for ($i = 0; $i <= 6; $i++) {
$weekdayselect .= "<option value=\"$i\" " . ($cron['weekday'] == $i ? 'selected' : '') . ">" . lang('misc_cron_week_day_' . $i) . "</option>";
}
for ($i = 1; $i <= 31; $i++) {
$dayselect .= "<option value=\"$i\" " . ($cron['day'] == $i ? 'selected' : '') . ">$i " . lang('day') . "</option>";
}
for ($i = 0; $i <= 23; $i++) {
$hourselect .= "<option value=\"$i\" " . ($cron['hour'] == $i ? 'selected' : '') . ">$i " . lang('timeliness') . "</option>";
}
} else {
$daynew = $_GET['weekdaynew'] != -1 ? -1 : $_GET['daynew'];
if (strpos($_GET['minutenew'], ',') !== FALSE) {
$minutenew = explode(',', $_GET['minutenew']);
foreach ($minutenew as $key => $val) {
$minutenew[$key] = $val = intval($val);
if ($val < 0 || $var > 59) {
unset($minutenew[$key]);
}
}
$minutenew = array_slice(array_unique($minutenew), 0, 12);
$minutenew = implode("\t", $minutenew);
} else {
$minutenew = intval($_GET['minutenew']);
$minutenew = $minutenew >= 0 && $minutenew < 60 ? $minutenew : '';
}
$msg = '';
$_GET['filenamenew'] = str_replace(array('..', '/', '\\'), '', $_GET['filenamenew']);
$efile = explode(':', $_GET['filenamenew']);
if (count($efile) > 1) {
$filename = array_pop($efile);
$cronfile = DZZ_ROOT. ''.implode("/",$efile).'/cron/'.$filename;
} else {
$cronfile = DZZ_ROOT . './core/cron/' . $cron['filename'];
}
if (preg_match("/[\\\\\/\*\?\"\<\>\|]+/", $_GET['filenamenew'])) {
$msg = lang('crons_filename_illegal');
} elseif (!is_readable($cronfile)) {
$msg = lang('crons_filename_invalid', array('cronfile' => $cronfile));
} elseif ($_GET['weekdaynew'] == -1 && $daynew == -1 && $_GET['hournew'] == -1 && $minutenew === '') {
$msg = lang('crons_time_invalid');
}
if (!empty($msg)) {
$msg_type = 'text-error';
$redirecturl = dreferer();
include template('cron');
exit();
}
DB::update('cron', array('weekday' => $_GET['weekdaynew'], 'day' => $daynew, 'hour' => $_GET['hournew'], 'minute' => $minutenew, 'filename' => trim($_GET['filenamenew']), ), "cronid='$cronid'");
dzz_cron::run($cronid);
$msg = lang('crons_succeed');
$msg_type = 'text-success';
$redirecturl = BASESCRIPT . '?mod=system&op=cron';
}
} else {
$cron['filename'] = str_replace(array('..', '/', '\\'), '', $cron['filename']);
$efile = explode(':', $cron['filename']);
if (count($efile) > 1) {
$filename = array_pop($efile);
$cronfile = DZZ_ROOT. ''.implode("/",$efile).'/cron/'.$filename;
} else {
$cronfile = DZZ_ROOT . './core/cron/' . $cron['filename'];
}
if (!file_exists($cronfile)) {
$msg = lang('crons_run_invalid', array('cronfile' => $cronfile));
$msg_type = 'text-error';
} else {
dzz_cron::run($cron['cronid']);
$msg = lang('crons_run_succeed');
$redirecturl = BASESCRIPT . '?mod=system&op=cron';
$msg_type = 'text-success';
}
}
}
include template('cron');
?>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
.el-avatar[data-v-663b95fa]{float:left;cursor:pointer}.el-divider--horizontal.el-divider[data-v-663b95fa]{margin:8px 0}.aboutPichome{padding:0;width:478px}.aboutPichome .el-message-box__btns,.aboutPichome .el-message-box__header{display:none}.aboutPichome .aboutlogo{text-align:center;line-height:0;padding-top:40px}.aboutPichome .aboutmessage{padding:65px 40px;font-size:19px;padding-bottom:15px}.aboutPichome .aboutmessage .aboutlist{margin-bottom:20px;overflow:hidden}.aboutPichome a{text-decoration:none}.aboutPichome .aboutmessage .aboutlist .title{float:left;width:95px}.aboutPichome .aboutmessage .aboutlist .mes{float:left;width:calc(100% - 95px)}.aboutPichome .aboutmessage .aboutlist .update{font-size:12px}

View File

@@ -1 +1 @@
<!DOCTYPE html><html lang=zh><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=favicon.ico><title></title><link href=admin/system/dist/css/chunk-2b4f90f7.519dec70.css rel=prefetch><link href=admin/system/dist/css/chunk-494f643e.7502109f.css rel=prefetch><link href=admin/system/dist/css/chunk-5ae5cc35.d763cbce.css rel=prefetch><link href=admin/system/dist/css/chunk-5cdcd199.6f46c04d.css rel=prefetch><link href=admin/system/dist/css/chunk-74c32c70.4b7d665e.css rel=prefetch><link href=admin/system/dist/css/chunk-76f23146.6fc79cd8.css rel=prefetch><link href=admin/system/dist/css/chunk-7828662a.c81657ef.css rel=prefetch><link href=admin/system/dist/css/chunk-9f9c2568.5356ad7d.css rel=prefetch><link href=admin/system/dist/css/chunk-af3b1b98.b822363f.css rel=prefetch><link href=admin/system/dist/css/chunk-e730cc06.987283b7.css rel=prefetch><link href=admin/system/dist/css/system_temp.a56510eb.css rel=prefetch><link href=admin/system/dist/js/chunk-2b4f90f7.ec4ac270.js rel=prefetch><link href=admin/system/dist/js/chunk-2d0a3327.ad2684c9.js rel=prefetch><link href=admin/system/dist/js/chunk-2d0bdbc6.4ec7bc5e.js rel=prefetch><link href=admin/system/dist/js/chunk-2d0dd46d.e13ddeba.js rel=prefetch><link href=admin/system/dist/js/chunk-2d0efd3c.44a093d1.js rel=prefetch><link href=admin/system/dist/js/chunk-2d20fcd9.50f81306.js rel=prefetch><link href=admin/system/dist/js/chunk-2d21ddf7.9f7b329e.js rel=prefetch><link href=admin/system/dist/js/chunk-494f643e.77a11d42.js rel=prefetch><link href=admin/system/dist/js/chunk-5ae5cc35.25761a21.js rel=prefetch><link href=admin/system/dist/js/chunk-5cdcd199.070f9c94.js rel=prefetch><link href=admin/system/dist/js/chunk-74c32c70.1f5e9382.js rel=prefetch><link href=admin/system/dist/js/chunk-76f23146.0d2957ed.js rel=prefetch><link href=admin/system/dist/js/chunk-7828662a.e587f025.js rel=prefetch><link href=admin/system/dist/js/chunk-9f9c2568.538835dd.js rel=prefetch><link href=admin/system/dist/js/chunk-af3b1b98.850ec152.js rel=prefetch><link href=admin/system/dist/js/chunk-e730cc06.3ce9a994.js rel=prefetch><link href=admin/system/dist/js/system_temp.c7e32270.js rel=prefetch><link href=admin/system/dist/css/chunk-vendors.4d5d56a8.css rel=preload as=style><link href=admin/system/dist/css/index.7d0ec6bf.css rel=preload as=style><link href=admin/system/dist/js/chunk-vendors.3b95dfe3.js rel=preload as=script><link href=admin/system/dist/js/index.d36cff59.js rel=preload as=script><link href=admin/system/dist/css/chunk-vendors.4d5d56a8.css rel=stylesheet><link href=admin/system/dist/css/index.7d0ec6bf.css rel=stylesheet></head><body><div id=app></div><script src=admin/system/dist/js/chunk-vendors.3b95dfe3.js></script><script src=admin/system/dist/js/index.d36cff59.js></script></body></html>
<!DOCTYPE html><html lang=zh><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=favicon.ico><title></title><link href=admin/system/dist/css/chunk-2b4f90f7.519dec70.css rel=prefetch><link href=admin/system/dist/css/chunk-494f643e.7502109f.css rel=prefetch><link href=admin/system/dist/css/chunk-5ae5cc35.d763cbce.css rel=prefetch><link href=admin/system/dist/css/chunk-74c32c70.4b7d665e.css rel=prefetch><link href=admin/system/dist/css/chunk-76f23146.6fc79cd8.css rel=prefetch><link href=admin/system/dist/css/chunk-7828662a.c81657ef.css rel=prefetch><link href=admin/system/dist/css/chunk-801d4da6.a47ba236.css rel=prefetch><link href=admin/system/dist/css/chunk-9f9c2568.5356ad7d.css rel=prefetch><link href=admin/system/dist/css/chunk-af3b1b98.b822363f.css rel=prefetch><link href=admin/system/dist/css/chunk-e730cc06.987283b7.css rel=prefetch><link href=admin/system/dist/css/system_temp.a56510eb.css rel=prefetch><link href=admin/system/dist/js/chunk-2b4f90f7.8dd0185d.js rel=prefetch><link href=admin/system/dist/js/chunk-2d0a3327.ad2684c9.js rel=prefetch><link href=admin/system/dist/js/chunk-2d0bdbc6.4ec7bc5e.js rel=prefetch><link href=admin/system/dist/js/chunk-2d0dd46d.e13ddeba.js rel=prefetch><link href=admin/system/dist/js/chunk-2d0efd3c.44a093d1.js rel=prefetch><link href=admin/system/dist/js/chunk-2d20fcd9.50f81306.js rel=prefetch><link href=admin/system/dist/js/chunk-2d21ddf7.9f7b329e.js rel=prefetch><link href=admin/system/dist/js/chunk-494f643e.77a11d42.js rel=prefetch><link href=admin/system/dist/js/chunk-5ae5cc35.25761a21.js rel=prefetch><link href=admin/system/dist/js/chunk-74c32c70.1f5e9382.js rel=prefetch><link href=admin/system/dist/js/chunk-76f23146.0d2957ed.js rel=prefetch><link href=admin/system/dist/js/chunk-7828662a.e587f025.js rel=prefetch><link href=admin/system/dist/js/chunk-801d4da6.0f74a3ea.js rel=prefetch><link href=admin/system/dist/js/chunk-9f9c2568.538835dd.js rel=prefetch><link href=admin/system/dist/js/chunk-af3b1b98.850ec152.js rel=prefetch><link href=admin/system/dist/js/chunk-e730cc06.3ce9a994.js rel=prefetch><link href=admin/system/dist/js/system_temp.c7e32270.js rel=prefetch><link href=admin/system/dist/css/chunk-vendors.4d5d56a8.css rel=preload as=style><link href=admin/system/dist/css/index.7d0ec6bf.css rel=preload as=style><link href=admin/system/dist/js/chunk-vendors.3b95dfe3.js rel=preload as=script><link href=admin/system/dist/js/index.5892fe49.js rel=preload as=script><link href=admin/system/dist/css/chunk-vendors.4d5d56a8.css rel=stylesheet><link href=admin/system/dist/css/index.7d0ec6bf.css rel=stylesheet></head><body><div id=app></div><script src=admin/system/dist/js/chunk-vendors.3b95dfe3.js></script><script src=admin/system/dist/js/index.5892fe49.js></script></body></html>

View File

@@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2b4f90f7"],{3685:function(t,e,a){},ec9e:function(t,e,a){"use strict";var n=a("3685"),i=a.n(n);i.a},fcc8f:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"resNav"},[a("div",{staticClass:"resNav-item resNav-left"},[a("a",{staticClass:"h-left",attrs:{href:"javascript:;"},on:{click:function(e){return t.goBack()}}},[a("el-image",{attrs:{src:"data/attachment/sitelogo/sitelogo.png",fit:"contain"}}),a("span",{staticClass:"text"},[t._v(t._s(t.navTitle))])],1)]),a("div",{staticClass:"resNav-item resNav-center"}),a("div",{staticClass:"resNav-item resNav-right"},[a("Mavatar")],1)])},i=[],c=(a("d3b7"),a("5530")),s=a("2f62"),r={props:["hideContent","apptype","hideBack"],data:function(){return{}},computed:Object(c["a"])(Object(c["a"])({},Object(s["c"])(["headerName","navTitle","IfuserAgent"])),Object(s["b"])(["GetNavMenu"])),methods:{handleClick:function(t){var e=this.GetNavMenu;for(var a in e)if(e[a].index==t){"admin"==e[a].type?window.location.href="admin.php?mod="+t:window.location.href="index.php?mod="+t;break}},goBack:function(){window.location.href="/"}},components:{Mavatar:function(){return a.e("chunk-801d4da6").then(a.bind(null,"6254"))}}},o=r,d=(a("ec9e"),a("2877")),l=Object(d["a"])(o,n,i,!1,null,"b9d2b62e",null);e["default"]=l.exports}}]);

View File

@@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-801d4da6"],{"04d2":function(t,e,a){},6254:function(t,e,a){"use strict";a.r(e);var o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticStyle:{"margin-left":"10px",display:"inherit"}},[a("el-dropdown",{staticStyle:{width:"35px",height:"35px"},attrs:{trigger:"click","hide-on-click":!1},on:{command:t.handleAvatar}},[t.GetUserData.icon?[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.GetUserData.username,placement:"left"}},[a("el-avatar",{attrs:{size:35,src:t.GetUserData.icon}})],1)]:[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.GetUserData.username,placement:"left"}},[a("el-avatar",{style:{background:t.GetUserData.headerColor},attrs:{size:35}},[t._v(t._s(t.GetUserData.firstword))])],1)],a("el-dropdown-menu",{staticClass:"avatar-dropdown",attrs:{slot:"dropdown"},slot:"dropdown"},[a("el-dropdown-item",{attrs:{command:"personal"}},[t._v("个人设置")]),a("el-dropdown-item",{attrs:{command:"help"}},[t._v("帮助文档")]),a("el-dropdown-item",{attrs:{command:"problem"}},[t._v("问题反馈")]),a("el-divider"),a("el-dropdown-item",{attrs:{command:"setting"}},[t._v("站点设置")]),a("el-dropdown-item",{attrs:{command:"library"}},[t._v("库设置")]),a("el-dropdown-item",{attrs:{command:"orguser"}},[t._v("用户管理")]),a("el-dropdown-item",{attrs:{command:"system"}},[a("span",{staticStyle:{position:"relative"}},[t._v(" 系统工具 "),t.GetUserData.upgrade?a("div",{staticClass:"tip",staticStyle:{width:"7px",height:"7px","border-radius":"50%",background:"red",position:"absolute",left:"-13px",top:"0",bottom:"0",margin:"auto"}}):t._e()])]),a("el-divider"),a("el-dropdown-item",{attrs:{command:"about"}},[t._v("关于PicHome")]),a("el-dropdown-item",{attrs:{command:"OutLogin"}},[t._v("退出站点")])],1)],2)],1)},s=[],n=(a("96cf"),a("1da1")),i=a("5530"),r=a("2f62"),c={data:function(){return{}},computed:Object(i["a"])({},Object(r["b"])(["GetUserData","GetFormHash","GetLanguage"])),methods:{handleAvatar:function(t){switch(t){case"collection":window.location.href="index.php?mod=collection";break;case"personal":window.location.href="index.php?mod=pichome&op=user&do=personal";break;case"help":window.open("https://www.yuque.com/pichome");break;case"problem":window.open("https://support.qq.com/products/340252");break;case"setting":window.location.href="index.php?mod=pichome&op=admin&do=basic";break;case"library":window.location.href="index.php?mod=pichome&op=library";break;case"about":this.$alert('<div class="aboutlogo">\n \t\t\t<img src="dzz/pichome/image/phlogo.png" alt="">\n \t\t</div>\n \t\t<div class="aboutmessage">\n \t\t\t<div class="aboutlist">\n \t\t\t\t<span class="title">软件名称:</span><span class="mes">欧奥PicHome</span>\n \t\t\t</div>\n \t\t\t<div class="aboutlist">\n \t\t\t\t<span class="title">版本信息:</span><span class="mes">'+this.GetUserData.version+'</span>\n \t\t\t</div>\n \t\t\t<div class="aboutlist">\n \t\t\t\t<span class="title">版权信息:</span><span class="mes">Powered By oaooa PicHome © 2020-2022 欧奥图文</span>\n \t\t\t</div>\n \t\t\t<div class="aboutlist">\n \t\t\t\t<span class="title">网站地址:</span><span class="mes"><a class="address" href="https://oaooa.com/" target="_blank">oaooa.com</a></span>\n \t\t\t</div>\n \t\t</div>',"",{customClass:"aboutPichome",showClose:!1,showConfirmButton:!1,dangerouslyUseHTMLString:!0,closeOnClickModal:!0});break;case"OutLogin":this.outLogin();break;case"system":window.open("admin.php?mod=system");break;case"orguser":window.open("admin.php?mod=orguser");break}return!1},outLogin:function(){var t=this;return Object(n["a"])(regeneratorRuntime.mark((function e(){var a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.axios.post(t.AxiosApi+"user.php?mod=login&op=logging&action=logout&formhash="+t.GetFormHash+"&t="+(new Date).getTime());case 2:a=e.sent,a.data,window.location.reload();case 5:case"end":return e.stop()}}),e)})))()}}},d=c,l=(a("a16b"),a("9c24"),a("2877")),p=Object(l["a"])(d,o,s,!1,null,"663b95fa",null);e["default"]=p.exports},"864f":function(t,e,a){},"9c24":function(t,e,a){"use strict";var o=a("864f"),s=a.n(o);s.a},a16b:function(t,e,a){"use strict";var o=a("04d2"),s=a.n(o);s.a}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -1,18 +1,18 @@
<?php
/*
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
* @license https://www.oaooa.com/licenses/
*
* @link https://www.oaooa.com
* @author zyx(zyx@oaooa.com)
*/
if (!defined('IN_OAOOA') || !defined('IN_ADMIN')) {
exit('Access Denied');
}
require_once(__DIR__.'/dist/index.html');
exit();
$operation = $_GET['operation'] ? $_GET['operation'] : 'updatecache';
$url=getglobal('siteurl'). BASESCRIPT . '?mod=system&op=' . $operation;
$url = outputurl($url);
@header("location: $url");
?>
<?php
/*
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
* @license https://www.oaooa.com/licenses/
*
* @link https://www.oaooa.com
* @author zyx(zyx@oaooa.com)
*/
if (!defined('IN_OAOOA') || !defined('IN_ADMIN')) {
exit('Access Denied');
}
require_once(__DIR__.'/dist/index.html');
exit();
$operation = $_GET['operation'] ? $_GET['operation'] : 'updatecache';
$url=getglobal('siteurl'). BASESCRIPT . '?mod=system&op=' . $operation;
$url = outputurl($url);
@header("location: $url");
?>

File diff suppressed because it is too large Load Diff

View File

@@ -227,6 +227,8 @@ if ($operation == 'patch' || $operation == 'cross') {
$file = DZZ_ROOT . './data/update/pichome' . $version . '/updatelist.tmp';
@unlink($file);
@unlink(DZZ_ROOT . './install/update.php');
//打开站点
C::t('setting')->update('bbclosed', 0);
C::t('cache') -> delete('upgrade_step');
C::t('cache') -> delete('upgrade_run');
C::t('setting') -> update('upgrade', '');

View File

@@ -1,7 +1,7 @@
<?php
$lang = array (
'appname'=>'System Tool',
'systemupgrade'=>'online upgrade',
'tools_updatecache_memory'=>'Memory Cache'
);
<?php
$lang = array (
'appname'=>'System Tool',
'systemupgrade'=>'online upgrade',
'tools_updatecache_memory'=>'Memory Cache'
);
?>

View File

@@ -1,7 +1,7 @@
<?php
$lang = array (
'appname'=>'系统工具',
'systemupgrade'=>'在线升级',
'tools_updatecache_memory'=>'内存缓存'
);
<?php
$lang = array (
'appname'=>'系统工具',
'systemupgrade'=>'在线升级',
'tools_updatecache_memory'=>'内存缓存'
);
?>

View File

@@ -1,416 +1,416 @@
<?php
/*
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
* @license https://www.oaooa.com/licenses/
*
* @link https://www.oaooa.com
* @author zyx(zyx@oaooa.com)
*/
if (!defined('IN_OAOOA') || !defined('IN_ADMIN')) {
exit('Access Denied');
}
$navtitle = lang('upgrade') . ' - ' . lang('admin_navtitle');
@set_time_limit(0);
include_once DZZ_ROOT . './core/core_version.php';
include_once libfile('function/admin');
include_once libfile('function/cache');
$dzz_upgrade = new dzz_upgrade();
$step = intval($_GET['step']);
$op = $_GET['op'];
$step = $step ? $step : 1;
$operation = $_GET['operation'] ? trim($_GET['operation']) : 'check';
$steplang = array('', lang('founder_upgrade_updatelist'), lang('founder_upgrade_download'), lang('founder_upgrade_compare'), lang('founder_upgrade_upgrading'), lang('founder_upgrade_complete'), 'dbupdate' => lang('founder_upgrade_dbupdate'));
if ($operation == 'patch' || $operation == 'cross') {
if (!$_G['setting']['bbclosed']) {
$msg = '<p style="margin:10px 0;color:red">' . lang('upgrade_close_site') . '</p>';
$msg .= '<p style="margin:10px 0"><input type="button" class="btn btn-primary" onclick="window.location.reload();" value="' . lang('founder_upgrade_reset') . '" /></p>';
$msg .= "<p style=\"margin:10px 0\"><script type=\"text/javascript\">";
$msg .= "if(history.length > (BROWSER.ie ? 0 : 1)) document.write('<a href=\"javascript:history.go(-1);\" >" . lang('message_return') . "</a>');";
$msg .= "</script></p>";
if (!$_GET['iframe']) {
include template('upgrade');
exit();
} else {
include template('upgrade_iframe');
exit();
}
}
$msg = '';
$version = trim($_GET['version']);
//$release = trim($_GET['release']);
$locale = trim($_GET['locale']);
$charset = trim($_GET['charset']);
$upgradeinfo = $upgrade_step = array();
if ($_GET['ungetfrom']) {
if (md5($_GET['ungetfrom'] . $_G['config']['security']['authkey']) == $_GET['ungetfrommd5']) {
$dbreturnurl = $_G['siteurl'] . ADMINSCRIPT . '?mod=system&op=systemupgrade&operation=' . $operation . '&version=' . $version . '&step=5';
$url = outputurl( $_G['siteurl'] . 'install/update.php?step=prepare&from=' . rawurlencode($dbreturnurl) . '&frommd5=' . rawurlencode(md5($dbreturnurl . $_G['config']['security']['authkey'])) );
dheader('Location: ' . $url);
} else {
showmessage('upgrade_param_error');
}
}
$upgrade_step = C::t('cache') -> fetch('upgrade_step');
$upgrade_step = dunserialize($upgrade_step['cachevalue']);
$upgrade_step['step'] = $step;
$upgrade_step['operation'] = $operation;
$upgrade_step['version'] = $version;
//$upgrade_step['release'] = $release;
$upgrade_step['charset'] = $charset;
$upgrade_step['locale'] = $locale;
C::t('cache') -> insert(array('cachekey' => 'upgrade_step', 'cachevalue' => serialize($upgrade_step), 'dateline' => $_G['timestamp'], ), false, true);
$upgrade_run = C::t('cache') -> fetch('upgrade_run');
if (!$upgrade_run) {
C::t('cache') -> insert(array('cachekey' => 'upgrade_run', 'cachevalue' => serialize($_G['setting']['upgrade']), 'dateline' => $_G['timestamp'], ), false, true);
$upgrade_run = $_G['setting']['upgrade'];
} else {
$upgrade_run = dunserialize($upgrade_run['cachevalue']);
}
if ($step != 5) {
foreach ($upgrade_run as $type => $list) {
if ($type == $operation && $version == $list['latestversion']) {
$dzz_upgrade -> locale = $locale;
$dzz_upgrade -> charset = $charset;
$upgradeinfo = $list;
break;
}
}
if (!$upgradeinfo) {
$msg = '<p style="margin:10px 0;color:red">' . lang('upgrade_none', array('upgradeurl' => upgradeinformation(-1))) . '</p>';
$msg .= "<p style=\"margin:10px 0\"><script type=\"text/javascript\">";
$msg .= "if(history.length > (BROWSER.ie ? 0 : 1)) document.write('<a href=\"javascript:history.go(-1);\" >" . lang('message_return') . "</a>');";
$msg .= "</script></p>";
if (!$_GET['iframe']) {
include template('upgrade');
exit();
} else {
include template('upgrade_iframe');
exit();
}
}
$updatefilelist = $dzz_upgrade -> fetch_updatefile_list($upgradeinfo);
$updatemd5filelist = $updatefilelist['md5'];
$updatefilelist = $updatefilelist['file'];
$theurl = $_G['siteurl'].ADMINSCRIPT . '?mod=system&op=systemupgrade&operation=' . $operation . '&version=' . $version . '&locale=' . $locale . '&charset=' . $charset;
if (empty($updatefilelist)) {
$msg = '<p style="margin:10px 0;color:red">' . lang('upgrade_download_upgradelist_error', array('upgradeurl' => upgradeinformation(-2))) . '</p>';
$msg .= '<script type="text/JavaScript">setTimeout("location.href=\'' . ($thurl) . '\';", 1000);</script>';
$msg .= ' <p style="margin:10px 0"><a href="' . $thurl . '">' . lang('message_redirect') . '</p>';
if (!$_GET['iframe']) {
include template('upgrade');
exit();
} else {
include template('upgrade_iframe');
exit();
}
}
}
if ($step == 1) {
$linkurl = $theurl . '&step=2';
include template('upgrade');
exit();
} elseif ($step == 2) {
$fileseq = intval($_GET['fileseq']);
$fileseq = $fileseq ? $fileseq : 1;
if ($fileseq > count($updatefilelist)) {
$linkurl = $theurl . '&step=3';
$downloadstatus = 3;
$msg = lang('upgrade_download_complete_to_compare', array('upgradeurl' => upgradeinformation(0)));
if (!$_GET['iframe']) {
$msg .= '<script type="text/JavaScript">setTimeout("location.href=\'' . $linkurl . '\';", 1000);</script>';
$msg .= ' <p><a href="' . $linkurl . '">' . lang('message_redirect') . '</a></p>';
} else {
$msg .= '<script type="text/JavaScript">setTimeout("parent.location.href=\'' . $linkurl . '\';", 1000);</script>';
$msg .= ' <p><a href="javascript:;" onclick="parent.location.href=\'' . $linkurl . '\';return false;">' . lang('message_redirect') . '</a></p>';
include template('upgrade_iframe');
exit();
}
} else {
if (!$_GET['iframe']) {
$linkurl = $theurl . '&step=2&fileseq=' . $fileseq . '&iframe=1';
$msg = '<iframe id="downiframe" marginheight="0" marginwidth="0" allowtransparency="true" frameborder="0" src="' . $linkurl . '" style="width:100%;height:100%;"></iframe>';
} else {
$downloadstatus = $dzz_upgrade -> download_file($upgradeinfo, $updatefilelist[$fileseq - 1], 'upload', $updatemd5filelist[$fileseq - 1]);
if ($downloadstatus == 1) {
$linkurl = $theurl . '&step=2&fileseq=' . $fileseq . '&iframe=1';
$msg = lang('upgrade_downloading_file', array('file' => $updatefilelist[$fileseq - 1], 'percent' => sprintf("%2d", 100 * $fileseq / count($updatefilelist)) . '%', 'upgradeurl' => upgradeinformation(1))) . '<script type="text/JavaScript">setTimeout("location.href=\'' . $linkurl . '\';", 10);</script>';
$msg .= ' <p><a href="' . $linkurl . '">' . lang('message_redirect') . '</a></p>';
} elseif ($downloadstatus == 2) {
$linkurl = $theurl . '&step=2&fileseq=' . ($fileseq + 1) . '&iframe=1';
$msg = '<p style="margin:10px 0">' . lang('upgrade_downloading_file', array('file' => $updatefilelist[$fileseq - 1], 'percent' => sprintf("%2d", 100 * $fileseq / count($updatefilelist)) . '%', 'upgradeurl' => upgradeinformation(1))) . '<script type="text/JavaScript">setTimeout("location.href=\'' . $linkurl . '\';", 10);</script></p>';
$msg .= ' <p><a href="' . $linkurl . '">' . lang('message_redirect') . '</a></p>';
} else {
$linkurl = $theurl . '&step=2&fileseq=' . ($fileseq) . '&iframe=1';
$msg = '<p style="margin:10px 0">' . lang('upgrade_redownload', array('file' => $updatefilelist[$fileseq - 1], 'upgradeurl' => upgradeinformation(-3))) . '</p>';
$msg .= '<p style="margin:10px 0;"><input type="button" class="btn btn-success" value="'.lang('founder_upgrade_reset').'" onclick="location.href=\'' . $linkurl . '\'" />';
}
include template('upgrade_iframe');
exit();
}
}
} elseif ($step == 3) {
list($modifylist, $showlist, $ignorelist,$newlist) = $dzz_upgrade -> compare_basefile($upgradeinfo, $updatefilelist,$updatemd5filelist);
if (empty($modifylist) && empty($showlist) && empty($ignorelist) && empty($newlist)) {
$msg = lang('filecheck_nofound_md5file', array('upgradeurl' => upgradeinformation(-4)));
}
$linkurl = $theurl . '&step=4';
} elseif ($step == 4) {
$confirm = $_GET['confirm'];
if (!$confirm) {
if ($_GET['siteftpsetting']) {
$action = $theurl . '&step=4&confirm=ftp' . ($_GET['startupgrade'] ? '&startupgrade=1' : '');
include template('upgrade');
exit();
}
if ($upgradeinfo['isupdatedb']) {
$checkupdatefilelist = array('install/update.php', 'install/data/install.sql', 'install/data/install_data.sql');
$checkupdatefilelist = array_merge($checkupdatefilelist, $updatefilelist);
} else {
$checkupdatefilelist = $updatefilelist;
}
if ($dzz_upgrade -> check_folder_perm($checkupdatefilelist)) {
$confirm = 'file';
} else {
$linkurl = $theurl . '&step=4';
$ftplinkurl = $linkurl . '&siteftpsetting=1';
$msg = '<p style="margin:10px 0">' . lang('upgrade_cannot_access_file') . '</p>';
$msg .= '<p style="margin:10px 0"><input type="button" class="btn btn-primary" onclick="window.location.href=\'' . $ftplinkurl . '\'" value="' . lang('founder_upgrade_set_ftp') . '" />';
$msg .= ' &nbsp; <input type="button" class="btn btn-default" onclick="window.location.href=\'' . $linkurl . '\'" value="' . lang('founder_upgrade_reset') . '" /></p>';
$msg .= "<script type=\"text/javascript\">";
$msg .= "if(history.length > (BROWSER.ie ? 0 : 1)) document.write('<a href=\"javascript:history.go(-1);\" class=\"lightlink\">" . lang('message_return') . "</a>');";
$msg .= "</script>";
include template('upgrade');
exit();
}
}
$paraftp = '';
if ($_GET['siteftp']) {
foreach ($_GET['siteftp'] as $k => $v) {
$paraftp .= '&siteftp[' . $k . ']=' . $v;
}
}
if (!$_GET['startupgrade']) {
if (!$_GET['backfile']) {
$linkurl = $theurl . '&step=4&backfile=1&confirm=' . $confirm . $paraftp;
$msg = '<p style="margin:10px 0">' . lang('upgrade_backuping', array('upgradeurl' => upgradeinformation(2))) . '</p>';
$msg .= '<script type="text/JavaScript">setTimeout("location.href=\'' . ($linkurl) . '\';", 1000);</script>';
$msg .= ' <p style="margin:10px 0"><a href="' . $linkurl . '">' . lang('message_redirect') . '</p>';
include template('upgrade');
exit();
}
foreach ($updatefilelist as $updatefile) {
$destfile = DZZ_ROOT . $updatefile;
$backfile = DZZ_ROOT . './data/back/pichome' . CORE_VERSION . '/' . $updatefile;
if (is_file($destfile)) {
if (!$dzz_upgrade -> copy_file($destfile, $backfile, 'file')) {
$msg = '<p style="margin:10px 0">' . lang('upgrade_backup_error', array('upgradeurl' => upgradeinformation(-5))) . '</p>';
$msg .= "<p style=\"margin:10px 0\"><script type=\"text/javascript\">";
$msg .= "if(history.length > (BROWSER.ie ? 0 : 1)) document.write('<a href=\"javascript:history.go(-1);\" >" . lang('message_return') . "</a>');";
$msg .= "</script></p>";
include template('upgrade');
exit();
}
}
}
$msg = '<p style="margin:10px 0">' . lang('upgrade_backup_complete', array('upgradeurl' => upgradeinformation(3))) . '</p>';
$msg .= '<script type="text/JavaScript">setTimeout("location.href=\'' . ($theurl . '&step=4&startupgrade=1&confirm=' . $confirm . $paraftp) . '\';", 1000);</script>';
$msg .= ' <p><a href="' . ($theurl . '&step=4&startupgrade=1&confirm=' . $confirm . $paraftp) . '">' . lang('message_redirect') . '</p>';
include template('upgrade');
exit();
}
$linkurl = $theurl . '&step=4&startupgrade=1&confirm=' . $confirm . $paraftp;
$ftplinkurl = $theurl . '&step=4&startupgrade=1&siteftpsetting=1';
foreach ($updatefilelist as $updatefile) {
$srcfile = DZZ_ROOT . './data/update/pichome' . $version . '/' . $updatefile;
if ($confirm == 'ftp') {
$destfile = $updatefile;
} else {
$destfile = DZZ_ROOT . $updatefile;
}
if (!$dzz_upgrade -> copy_file($srcfile, $destfile, $confirm)) {
if ($confirm == 'ftp') {
$msg = '<p style="margin:10px 0">' . lang('upgrade_ftp_upload_error', array('file' => $updatefile, 'upgradeurl' => upgradeinformation(-6))) . '</p>';
$msg .= '<p style="margin:10px 0"><input type="button" class="btn btn-primary" onclick="window.location.href=\'' . $linkurl . '\'" value="' . lang('founder_upgrade_reupload') . '" />';
$msg .= '&nbsp;<input type="button" class="btn btn-default" onclick="window.location.href=\'' . $ftplinkurl . '\'" value="' . lang('founder_upgrade_reset_ftp') . '" /></p>';
$msg .= "<p style=\"margin:10px 0\"><script type=\"text/javascript\">";
$msg .= "if(history.length > (BROWSER.ie ? 0 : 1)) document.write('<a href=\"javascript:history.go(-1);\" class=\"lightlink\">" . lang('message_return') . "</a>');";
$msg .= "</script></p>";
include template('upgrade');
exit();
} else {
$msg = '<p style="margin:10px 0">' . lang('upgrade_copy_error', array('file' => $updatefile, 'upgradeurl' => upgradeinformation(-7))) . '</p>';
$msg .= '<p style="margin:10px 0"><input type="button" class="btn btn-primary" onclick="window.location.href=\'' . $linkurl . '\'" value="' . lang('founder_upgrade_recopy') . '" />';
$msg .= '&nbsp;<input type="button" class="btn btn-default" onclick="window.location.href=\'' . $ftplinkurl . '\'" value="' . lang('founder_upgrade_set_ftp') . '" /></p>';
$msg .= "<p style=\"margin:10px 0\"><script type=\"text/javascript\">";
$msg .= "if(history.length > (BROWSER.ie ? 0 : 1)) document.write('<a href=\"javascript:history.go(-1);\" class=\"lightlink\">" . lang('message_return') . "</a>');";
$msg .= "</script></p>";
include template('upgrade');
exit();
}
}
}
if ($upgradeinfo['isupdatedb']) {
$upgrade_step['step'] = 'dbupdate';
C::t('cache') -> insert(array('cachekey' => 'upgrade_step', 'cachevalue' => serialize($upgrade_step), 'dateline' => $_G['timestamp'], ), false, true);
$dbreturnurl = $_G['siteurl'] . ADMINSCRIPT . '?mod=system&op=systemupgrade&operation=' . $operation . '&version=' . $version . '&step=5';
$linkurl = $_G['siteurl'] . 'install/update.php?step=prepare&from=' . rawurlencode($dbreturnurl) . '&frommd5=' . rawurlencode(md5($dbreturnurl . $_G['config']['security']['authkey']));
$msg = '<p style="margin:10px 0">' . lang('upgrade_file_successful', array('upgradeurl' => upgradeinformation(4))) . '</p>';
$msg .= '<script type="text/JavaScript">setTimeout(function(){createIframe(\'' . $linkurl . '\');}, 1000);</script>';
$msg .= ' <p><a href="javascript:;" onclick="createIframe(\'' . $linkurl . '\');return false">' . lang('message_redirect') . '</p>';
include template('upgrade');
exit();
}
$url = outputurl( $_G['siteurl'].MOD_URL.'&op=systemupgrade&operation=' . $operation . '&version=' . $version . '&step=5' );
dheader('Location: ' . $url);
} elseif ($step == 5) {
$file = DZZ_ROOT . './data/update/pichome' . $version . '/updatelist.tmp';
@unlink($file);
@unlink(DZZ_ROOT . './install/update.php');
C::t('cache') -> delete('upgrade_step');
C::t('cache') -> delete('upgrade_run');
C::t('setting') -> update('upgrade', '');
updatecache('setting');
$old_update_dir = './data/update/';
$new_update_dir = './data/update' . md5('update' . $_G['config']['security']['authkey']) . '/';
$old_back_dir = './data/back/';
$new_back_dir = './data/back' . md5('back' . $_G['config']['security']['authkey']) . '/';
$dzz_upgrade -> copy_dir(DZZ_ROOT . $old_update_dir, DZZ_ROOT . $new_update_dir);
$dzz_upgrade -> copy_dir(DZZ_ROOT . $old_back_dir, DZZ_ROOT . $new_back_dir);
$dzz_upgrade -> rmdirs(DZZ_ROOT . $old_update_dir);
$dzz_upgrade -> rmdirs(DZZ_ROOT . $old_back_dir);
$msg = lang('upgrade_successful', array('version' => $version, 'save_update_dir' => $new_update_dir, 'save_back_dir' => $new_back_dir, 'upgradeurl' => upgradeinformation(0)));
}
}
elseif ($operation == 'check') {
$msg = '';
if (!intval($_GET['rechecking'])) {
$upgrade_step = C::t('cache') -> fetch('upgrade_step');
if (!empty($upgrade_step['cachevalue'])) {
$upgrade_step['cachevalue'] = dunserialize($upgrade_step['cachevalue']);
if (!empty($upgrade_step['cachevalue']['step'])) {
$theurl = ADMINSCRIPT . '?mod=system&op=systemupgrade&operation=' . $upgrade_step['cachevalue']['operation'] . '&version=' . $upgrade_step['cachevalue']['version'] . '&locale=' . $upgrade_step['cachevalue']['locale'] . '&charset=' . $upgrade_step['cachevalue']['charset'];
$recheckurl = ADMINSCRIPT . '?mod=system&op=systemupgrade&operation=recheck';
if ($upgrade_step['cachevalue']['step'] == 'dbupdate') {
$dbreturnurl = $_G['siteurl'] . $theurl . '&step=5';
$stepurl = $_G['siteurl'] . 'install/update.php?step=prepare&from=' . rawurlencode($dbreturnurl) . '&frommd5=' . rawurlencode(md5($dbreturnurl . $_G['config']['security']['authkey']));
$msg = '<p style="margin:10px 0;">' . lang('upgrade_continue_db', array('steplang' => $steplang['dbupdate'], 'stepurl' => $stepurl, 'recheckurl' => $recheckurl)) . '</p>';
} else {
$stepurl = $theurl . '&step=' . $upgrade_step['cachevalue']['step'];
$msg = '<p style="margin:10px 0;">' . lang('upgrade_continue', array('steplang' => $steplang[$upgrade_step['cachevalue']['step']], 'stepurl' => $stepurl, 'recheckurl' => $recheckurl)) . '</p>';
}
}
}
} else {
C::t('cache') -> delete('upgrade_step');
}
if (!intval($_GET['checking']) || $msg) {
} else {
$dzz_upgrade -> check_upgrade();
$url = outputurl( $_G['siteurl'].MOD_URL.'&op=systemupgrade&operation=showupgrade' );
dheader('Location: ' . $url);
}
}
elseif ($operation == 'showupgrade') {
if ($_G['setting']['upgrade']) {
C::t('cache') -> insert(array('cachekey' => 'upgrade_step', 'cachevalue' => serialize(array('curversion' => $dzz_upgrade -> versionpath())), 'dateline' => $_G['timestamp'], ), false, true);
$upgraderow = $patchrow = array();
$charset = str_replace('-', '', strtoupper($_G['config']['output']['charset']));
$dbversion = helper_dbtool::dbversion();
$locale = '';
if ($charset == 'BIG5') {
$locale = 'TC';
} elseif ($charset == 'GBK') {
$locale = 'SC';
} elseif ($charset == 'UTF8') {
if ($_G['config']['output']['language'] == 'zh-cn' || $_G['config']['output']['language'] == 'zh_cn') {
$locale = 'SC';
} elseif ($_G['config']['output']['language'] == 'zh-tw' || $_G['config']['output']['language'] == 'zh_tw') {
$locale = 'TC';
}else{
$locale = 'SC';
}
}
if (!is_array($_G['setting']['upgrade']))
$_G['setting']['upgrade'] = unserialize($_G['setting']['upgrade']);
$list = array();
foreach ($_G['setting']['upgrade'] as $type => $upgrade) {
$unupgrade = 0;
if (version_compare($upgrade['phpversion'], PHP_VERSION) > 0 || version_compare($upgrade['mysqlversion'], $dbversion) > 0) {
$unupgrade = 1;
}
$list[$type]['linkurl'] = $linkurl = ADMINSCRIPT . '?mod=system&op=systemupgrade&operation=' . $type . '&version=' . $upgrade['latestversion'] . '&locale=' . $locale . '&charset=' . $charset;
if ($unupgrade) {
$list[$type]['title'] = 'oaooa PicHome' . $upgrade['latestversion'] . '_' . $locale . '_' . $charset;
$list[$type]['btn1'] = lang('founder_upgrade_require_config') . ' php v' . PHP_VERSION . 'MYSQL v' . $dbversion;
} else {
$list[$type]['title'] = 'oaooa PicHome' . $upgrade['latestversion'] . '_' . $locale . '_' . $charset;
$list[$type]['btn1'] = '<input type="button" class="btn btn-success" onclick="confirm(\'' . lang('founder_upgrade_backup_remind') . '\') ? window.location.href=\'' . $linkurl . '\' : \'\';" value="' . lang('founder_upgrade_automatically') . '">';
$list[$type]['official'] = '<a class="btn btn-link" href="' . $upgrade['official'] . '" target="_blank">' . lang('founder_upgrade_manually') . '</a>';
}
}
} else {
$msg = lang('upgrade_latest_version');
}
}
elseif ($operation == 'recheck') {
$upgrade_step = C::t('cache') -> fetch('upgrade_step');
$upgrade_step = dunserialize($upgrade_step['cachevalue']);
$file = DZZ_ROOT . './data/update/pichome' . $upgrade_step['version'] . '/updatelist.tmp';
@unlink($file);
@unlink(DZZ_ROOT . './install/update.php');
C::t('cache') -> delete('upgrade_step');
C::t('cache') -> delete('upgrade_run');
C::t('setting') -> update('upgrade', '');
updatecache('setting');
$old_update_dir = './data/update/';
$dzz_upgrade -> rmdirs(DZZ_ROOT . $old_update_dir);
$url = outputurl($_G['siteurl'].MOD_URL.'&op=systemupgrade' );
dheader('Location: ' . $url);
}
include template('upgrade');
<?php
/*
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
* @license https://www.oaooa.com/licenses/
*
* @link https://www.oaooa.com
* @author zyx(zyx@oaooa.com)
*/
if (!defined('IN_OAOOA') || !defined('IN_ADMIN')) {
exit('Access Denied');
}
$navtitle = lang('upgrade') . ' - ' . lang('admin_navtitle');
@set_time_limit(0);
include_once DZZ_ROOT . './core/core_version.php';
include_once libfile('function/admin');
include_once libfile('function/cache');
$dzz_upgrade = new dzz_upgrade();
$step = intval($_GET['step']);
$op = $_GET['op'];
$step = $step ? $step : 1;
$operation = $_GET['operation'] ? trim($_GET['operation']) : 'check';
$steplang = array('', lang('founder_upgrade_updatelist'), lang('founder_upgrade_download'), lang('founder_upgrade_compare'), lang('founder_upgrade_upgrading'), lang('founder_upgrade_complete'), 'dbupdate' => lang('founder_upgrade_dbupdate'));
if ($operation == 'patch' || $operation == 'cross') {
if (!$_G['setting']['bbclosed']) {
$msg = '<p style="margin:10px 0;color:red">' . lang('upgrade_close_site') . '</p>';
$msg .= '<p style="margin:10px 0"><input type="button" class="btn btn-primary" onclick="window.location.reload();" value="' . lang('founder_upgrade_reset') . '" /></p>';
$msg .= "<p style=\"margin:10px 0\"><script type=\"text/javascript\">";
$msg .= "if(history.length > (BROWSER.ie ? 0 : 1)) document.write('<a href=\"javascript:history.go(-1);\" >" . lang('message_return') . "</a>');";
$msg .= "</script></p>";
if (!$_GET['iframe']) {
include template('upgrade');
exit();
} else {
include template('upgrade_iframe');
exit();
}
}
$msg = '';
$version = trim($_GET['version']);
//$release = trim($_GET['release']);
$locale = trim($_GET['locale']);
$charset = trim($_GET['charset']);
$upgradeinfo = $upgrade_step = array();
if ($_GET['ungetfrom']) {
if (md5($_GET['ungetfrom'] . $_G['config']['security']['authkey']) == $_GET['ungetfrommd5']) {
$dbreturnurl = $_G['siteurl'] . ADMINSCRIPT . '?mod=system&op=systemupgrade&operation=' . $operation . '&version=' . $version . '&step=5';
$url = outputurl( $_G['siteurl'] . 'install/update.php?step=prepare&from=' . rawurlencode($dbreturnurl) . '&frommd5=' . rawurlencode(md5($dbreturnurl . $_G['config']['security']['authkey'])) );
dheader('Location: ' . $url);
} else {
showmessage('upgrade_param_error');
}
}
$upgrade_step = C::t('cache') -> fetch('upgrade_step');
$upgrade_step = dunserialize($upgrade_step['cachevalue']);
$upgrade_step['step'] = $step;
$upgrade_step['operation'] = $operation;
$upgrade_step['version'] = $version;
//$upgrade_step['release'] = $release;
$upgrade_step['charset'] = $charset;
$upgrade_step['locale'] = $locale;
C::t('cache') -> insert(array('cachekey' => 'upgrade_step', 'cachevalue' => serialize($upgrade_step), 'dateline' => $_G['timestamp'], ), false, true);
$upgrade_run = C::t('cache') -> fetch('upgrade_run');
if (!$upgrade_run) {
C::t('cache') -> insert(array('cachekey' => 'upgrade_run', 'cachevalue' => serialize($_G['setting']['upgrade']), 'dateline' => $_G['timestamp'], ), false, true);
$upgrade_run = $_G['setting']['upgrade'];
} else {
$upgrade_run = dunserialize($upgrade_run['cachevalue']);
}
if ($step != 5) {
foreach ($upgrade_run as $type => $list) {
if ($type == $operation && $version == $list['latestversion']) {
$dzz_upgrade -> locale = $locale;
$dzz_upgrade -> charset = $charset;
$upgradeinfo = $list;
break;
}
}
if (!$upgradeinfo) {
$msg = '<p style="margin:10px 0;color:red">' . lang('upgrade_none', array('upgradeurl' => upgradeinformation(-1))) . '</p>';
$msg .= "<p style=\"margin:10px 0\"><script type=\"text/javascript\">";
$msg .= "if(history.length > (BROWSER.ie ? 0 : 1)) document.write('<a href=\"javascript:history.go(-1);\" >" . lang('message_return') . "</a>');";
$msg .= "</script></p>";
if (!$_GET['iframe']) {
include template('upgrade');
exit();
} else {
include template('upgrade_iframe');
exit();
}
}
$updatefilelist = $dzz_upgrade -> fetch_updatefile_list($upgradeinfo);
$updatemd5filelist = $updatefilelist['md5'];
$updatefilelist = $updatefilelist['file'];
$theurl = $_G['siteurl'].ADMINSCRIPT . '?mod=system&op=systemupgrade&operation=' . $operation . '&version=' . $version . '&locale=' . $locale . '&charset=' . $charset;
if (empty($updatefilelist)) {
$msg = '<p style="margin:10px 0;color:red">' . lang('upgrade_download_upgradelist_error', array('upgradeurl' => upgradeinformation(-2))) . '</p>';
$msg .= '<script type="text/JavaScript">setTimeout("location.href=\'' . ($thurl) . '\';", 1000);</script>';
$msg .= ' <p style="margin:10px 0"><a href="' . $thurl . '">' . lang('message_redirect') . '</p>';
if (!$_GET['iframe']) {
include template('upgrade');
exit();
} else {
include template('upgrade_iframe');
exit();
}
}
}
if ($step == 1) {
$linkurl = $theurl . '&step=2';
include template('upgrade');
exit();
} elseif ($step == 2) {
$fileseq = intval($_GET['fileseq']);
$fileseq = $fileseq ? $fileseq : 1;
if ($fileseq > count($updatefilelist)) {
$linkurl = $theurl . '&step=3';
$downloadstatus = 3;
$msg = lang('upgrade_download_complete_to_compare', array('upgradeurl' => upgradeinformation(0)));
if (!$_GET['iframe']) {
$msg .= '<script type="text/JavaScript">setTimeout("location.href=\'' . $linkurl . '\';", 1000);</script>';
$msg .= ' <p><a href="' . $linkurl . '">' . lang('message_redirect') . '</a></p>';
} else {
$msg .= '<script type="text/JavaScript">setTimeout("parent.location.href=\'' . $linkurl . '\';", 1000);</script>';
$msg .= ' <p><a href="javascript:;" onclick="parent.location.href=\'' . $linkurl . '\';return false;">' . lang('message_redirect') . '</a></p>';
include template('upgrade_iframe');
exit();
}
} else {
if (!$_GET['iframe']) {
$linkurl = $theurl . '&step=2&fileseq=' . $fileseq . '&iframe=1';
$msg = '<iframe id="downiframe" marginheight="0" marginwidth="0" allowtransparency="true" frameborder="0" src="' . $linkurl . '" style="width:100%;height:100%;"></iframe>';
} else {
$downloadstatus = $dzz_upgrade -> download_file($upgradeinfo, $updatefilelist[$fileseq - 1], 'upload', $updatemd5filelist[$fileseq - 1]);
if ($downloadstatus == 1) {
$linkurl = $theurl . '&step=2&fileseq=' . $fileseq . '&iframe=1';
$msg = lang('upgrade_downloading_file', array('file' => $updatefilelist[$fileseq - 1], 'percent' => sprintf("%2d", 100 * $fileseq / count($updatefilelist)) . '%', 'upgradeurl' => upgradeinformation(1))) . '<script type="text/JavaScript">setTimeout("location.href=\'' . $linkurl . '\';", 10);</script>';
$msg .= ' <p><a href="' . $linkurl . '">' . lang('message_redirect') . '</a></p>';
} elseif ($downloadstatus == 2) {
$linkurl = $theurl . '&step=2&fileseq=' . ($fileseq + 1) . '&iframe=1';
$msg = '<p style="margin:10px 0">' . lang('upgrade_downloading_file', array('file' => $updatefilelist[$fileseq - 1], 'percent' => sprintf("%2d", 100 * $fileseq / count($updatefilelist)) . '%', 'upgradeurl' => upgradeinformation(1))) . '<script type="text/JavaScript">setTimeout("location.href=\'' . $linkurl . '\';", 10);</script></p>';
$msg .= ' <p><a href="' . $linkurl . '">' . lang('message_redirect') . '</a></p>';
} else {
$linkurl = $theurl . '&step=2&fileseq=' . ($fileseq) . '&iframe=1';
$msg = '<p style="margin:10px 0">' . lang('upgrade_redownload', array('file' => $updatefilelist[$fileseq - 1], 'upgradeurl' => upgradeinformation(-3))) . '</p>';
$msg .= '<p style="margin:10px 0;"><input type="button" class="btn btn-success" value="'.lang('founder_upgrade_reset').'" onclick="location.href=\'' . $linkurl . '\'" />';
}
include template('upgrade_iframe');
exit();
}
}
} elseif ($step == 3) {
list($modifylist, $showlist, $ignorelist,$newlist) = $dzz_upgrade -> compare_basefile($upgradeinfo, $updatefilelist,$updatemd5filelist);
if (empty($modifylist) && empty($showlist) && empty($ignorelist) && empty($newlist)) {
$msg = lang('filecheck_nofound_md5file', array('upgradeurl' => upgradeinformation(-4)));
}
$linkurl = $theurl . '&step=4';
} elseif ($step == 4) {
$confirm = $_GET['confirm'];
if (!$confirm) {
if ($_GET['siteftpsetting']) {
$action = $theurl . '&step=4&confirm=ftp' . ($_GET['startupgrade'] ? '&startupgrade=1' : '');
include template('upgrade');
exit();
}
if ($upgradeinfo['isupdatedb']) {
$checkupdatefilelist = array('install/update.php', 'install/data/install.sql', 'install/data/install_data.sql');
$checkupdatefilelist = array_merge($checkupdatefilelist, $updatefilelist);
} else {
$checkupdatefilelist = $updatefilelist;
}
if ($dzz_upgrade -> check_folder_perm($checkupdatefilelist)) {
$confirm = 'file';
} else {
$linkurl = $theurl . '&step=4';
$ftplinkurl = $linkurl . '&siteftpsetting=1';
$msg = '<p style="margin:10px 0">' . lang('upgrade_cannot_access_file') . '</p>';
$msg .= '<p style="margin:10px 0"><input type="button" class="btn btn-primary" onclick="window.location.href=\'' . $ftplinkurl . '\'" value="' . lang('founder_upgrade_set_ftp') . '" />';
$msg .= ' &nbsp; <input type="button" class="btn btn-default" onclick="window.location.href=\'' . $linkurl . '\'" value="' . lang('founder_upgrade_reset') . '" /></p>';
$msg .= "<script type=\"text/javascript\">";
$msg .= "if(history.length > (BROWSER.ie ? 0 : 1)) document.write('<a href=\"javascript:history.go(-1);\" class=\"lightlink\">" . lang('message_return') . "</a>');";
$msg .= "</script>";
include template('upgrade');
exit();
}
}
$paraftp = '';
if ($_GET['siteftp']) {
foreach ($_GET['siteftp'] as $k => $v) {
$paraftp .= '&siteftp[' . $k . ']=' . $v;
}
}
if (!$_GET['startupgrade']) {
if (!$_GET['backfile']) {
$linkurl = $theurl . '&step=4&backfile=1&confirm=' . $confirm . $paraftp;
$msg = '<p style="margin:10px 0">' . lang('upgrade_backuping', array('upgradeurl' => upgradeinformation(2))) . '</p>';
$msg .= '<script type="text/JavaScript">setTimeout("location.href=\'' . ($linkurl) . '\';", 1000);</script>';
$msg .= ' <p style="margin:10px 0"><a href="' . $linkurl . '">' . lang('message_redirect') . '</p>';
include template('upgrade');
exit();
}
foreach ($updatefilelist as $updatefile) {
$destfile = DZZ_ROOT . $updatefile;
$backfile = DZZ_ROOT . './data/back/pichome' . CORE_VERSION . '/' . $updatefile;
if (is_file($destfile)) {
if (!$dzz_upgrade -> copy_file($destfile, $backfile, 'file')) {
$msg = '<p style="margin:10px 0">' . lang('upgrade_backup_error', array('upgradeurl' => upgradeinformation(-5))) . '</p>';
$msg .= "<p style=\"margin:10px 0\"><script type=\"text/javascript\">";
$msg .= "if(history.length > (BROWSER.ie ? 0 : 1)) document.write('<a href=\"javascript:history.go(-1);\" >" . lang('message_return') . "</a>');";
$msg .= "</script></p>";
include template('upgrade');
exit();
}
}
}
$msg = '<p style="margin:10px 0">' . lang('upgrade_backup_complete', array('upgradeurl' => upgradeinformation(3))) . '</p>';
$msg .= '<script type="text/JavaScript">setTimeout("location.href=\'' . ($theurl . '&step=4&startupgrade=1&confirm=' . $confirm . $paraftp) . '\';", 1000);</script>';
$msg .= ' <p><a href="' . ($theurl . '&step=4&startupgrade=1&confirm=' . $confirm . $paraftp) . '">' . lang('message_redirect') . '</p>';
include template('upgrade');
exit();
}
$linkurl = $theurl . '&step=4&startupgrade=1&confirm=' . $confirm . $paraftp;
$ftplinkurl = $theurl . '&step=4&startupgrade=1&siteftpsetting=1';
foreach ($updatefilelist as $updatefile) {
$srcfile = DZZ_ROOT . './data/update/pichome' . $version . '/' . $updatefile;
if ($confirm == 'ftp') {
$destfile = $updatefile;
} else {
$destfile = DZZ_ROOT . $updatefile;
}
if (!$dzz_upgrade -> copy_file($srcfile, $destfile, $confirm)) {
if ($confirm == 'ftp') {
$msg = '<p style="margin:10px 0">' . lang('upgrade_ftp_upload_error', array('file' => $updatefile, 'upgradeurl' => upgradeinformation(-6))) . '</p>';
$msg .= '<p style="margin:10px 0"><input type="button" class="btn btn-primary" onclick="window.location.href=\'' . $linkurl . '\'" value="' . lang('founder_upgrade_reupload') . '" />';
$msg .= '&nbsp;<input type="button" class="btn btn-default" onclick="window.location.href=\'' . $ftplinkurl . '\'" value="' . lang('founder_upgrade_reset_ftp') . '" /></p>';
$msg .= "<p style=\"margin:10px 0\"><script type=\"text/javascript\">";
$msg .= "if(history.length > (BROWSER.ie ? 0 : 1)) document.write('<a href=\"javascript:history.go(-1);\" class=\"lightlink\">" . lang('message_return') . "</a>');";
$msg .= "</script></p>";
include template('upgrade');
exit();
} else {
$msg = '<p style="margin:10px 0">' . lang('upgrade_copy_error', array('file' => $updatefile, 'upgradeurl' => upgradeinformation(-7))) . '</p>';
$msg .= '<p style="margin:10px 0"><input type="button" class="btn btn-primary" onclick="window.location.href=\'' . $linkurl . '\'" value="' . lang('founder_upgrade_recopy') . '" />';
$msg .= '&nbsp;<input type="button" class="btn btn-default" onclick="window.location.href=\'' . $ftplinkurl . '\'" value="' . lang('founder_upgrade_set_ftp') . '" /></p>';
$msg .= "<p style=\"margin:10px 0\"><script type=\"text/javascript\">";
$msg .= "if(history.length > (BROWSER.ie ? 0 : 1)) document.write('<a href=\"javascript:history.go(-1);\" class=\"lightlink\">" . lang('message_return') . "</a>');";
$msg .= "</script></p>";
include template('upgrade');
exit();
}
}
}
if ($upgradeinfo['isupdatedb']) {
$upgrade_step['step'] = 'dbupdate';
C::t('cache') -> insert(array('cachekey' => 'upgrade_step', 'cachevalue' => serialize($upgrade_step), 'dateline' => $_G['timestamp'], ), false, true);
$dbreturnurl = $_G['siteurl'] . ADMINSCRIPT . '?mod=system&op=systemupgrade&operation=' . $operation . '&version=' . $version . '&step=5';
$linkurl = $_G['siteurl'] . 'install/update.php?step=prepare&from=' . rawurlencode($dbreturnurl) . '&frommd5=' . rawurlencode(md5($dbreturnurl . $_G['config']['security']['authkey']));
$msg = '<p style="margin:10px 0">' . lang('upgrade_file_successful', array('upgradeurl' => upgradeinformation(4))) . '</p>';
$msg .= '<script type="text/JavaScript">setTimeout(function(){createIframe(\'' . $linkurl . '\');}, 1000);</script>';
$msg .= ' <p><a href="javascript:;" onclick="createIframe(\'' . $linkurl . '\');return false">' . lang('message_redirect') . '</p>';
include template('upgrade');
exit();
}
$url = outputurl( $_G['siteurl'].MOD_URL.'&op=systemupgrade&operation=' . $operation . '&version=' . $version . '&step=5' );
dheader('Location: ' . $url);
} elseif ($step == 5) {
$file = DZZ_ROOT . './data/update/pichome' . $version . '/updatelist.tmp';
@unlink($file);
@unlink(DZZ_ROOT . './install/update.php');
C::t('cache') -> delete('upgrade_step');
C::t('cache') -> delete('upgrade_run');
C::t('setting') -> update('upgrade', '');
updatecache('setting');
$old_update_dir = './data/update/';
$new_update_dir = './data/update' . md5('update' . $_G['config']['security']['authkey']) . '/';
$old_back_dir = './data/back/';
$new_back_dir = './data/back' . md5('back' . $_G['config']['security']['authkey']) . '/';
$dzz_upgrade -> copy_dir(DZZ_ROOT . $old_update_dir, DZZ_ROOT . $new_update_dir);
$dzz_upgrade -> copy_dir(DZZ_ROOT . $old_back_dir, DZZ_ROOT . $new_back_dir);
$dzz_upgrade -> rmdirs(DZZ_ROOT . $old_update_dir);
$dzz_upgrade -> rmdirs(DZZ_ROOT . $old_back_dir);
$msg = lang('upgrade_successful', array('version' => $version, 'save_update_dir' => $new_update_dir, 'save_back_dir' => $new_back_dir, 'upgradeurl' => upgradeinformation(0)));
}
}
elseif ($operation == 'check') {
$msg = '';
if (!intval($_GET['rechecking'])) {
$upgrade_step = C::t('cache') -> fetch('upgrade_step');
if (!empty($upgrade_step['cachevalue'])) {
$upgrade_step['cachevalue'] = dunserialize($upgrade_step['cachevalue']);
if (!empty($upgrade_step['cachevalue']['step'])) {
$theurl = ADMINSCRIPT . '?mod=system&op=systemupgrade&operation=' . $upgrade_step['cachevalue']['operation'] . '&version=' . $upgrade_step['cachevalue']['version'] . '&locale=' . $upgrade_step['cachevalue']['locale'] . '&charset=' . $upgrade_step['cachevalue']['charset'];
$recheckurl = ADMINSCRIPT . '?mod=system&op=systemupgrade&operation=recheck';
if ($upgrade_step['cachevalue']['step'] == 'dbupdate') {
$dbreturnurl = $_G['siteurl'] . $theurl . '&step=5';
$stepurl = $_G['siteurl'] . 'install/update.php?step=prepare&from=' . rawurlencode($dbreturnurl) . '&frommd5=' . rawurlencode(md5($dbreturnurl . $_G['config']['security']['authkey']));
$msg = '<p style="margin:10px 0;">' . lang('upgrade_continue_db', array('steplang' => $steplang['dbupdate'], 'stepurl' => $stepurl, 'recheckurl' => $recheckurl)) . '</p>';
} else {
$stepurl = $theurl . '&step=' . $upgrade_step['cachevalue']['step'];
$msg = '<p style="margin:10px 0;">' . lang('upgrade_continue', array('steplang' => $steplang[$upgrade_step['cachevalue']['step']], 'stepurl' => $stepurl, 'recheckurl' => $recheckurl)) . '</p>';
}
}
}
} else {
C::t('cache') -> delete('upgrade_step');
}
if (!intval($_GET['checking']) || $msg) {
} else {
$dzz_upgrade -> check_upgrade();
$url = outputurl( $_G['siteurl'].MOD_URL.'&op=systemupgrade&operation=showupgrade' );
dheader('Location: ' . $url);
}
}
elseif ($operation == 'showupgrade') {
if ($_G['setting']['upgrade']) {
C::t('cache') -> insert(array('cachekey' => 'upgrade_step', 'cachevalue' => serialize(array('curversion' => $dzz_upgrade -> versionpath())), 'dateline' => $_G['timestamp'], ), false, true);
$upgraderow = $patchrow = array();
$charset = str_replace('-', '', strtoupper($_G['config']['output']['charset']));
$dbversion = helper_dbtool::dbversion();
$locale = '';
if ($charset == 'BIG5') {
$locale = 'TC';
} elseif ($charset == 'GBK') {
$locale = 'SC';
} elseif ($charset == 'UTF8') {
if ($_G['config']['output']['language'] == 'zh-cn' || $_G['config']['output']['language'] == 'zh_cn') {
$locale = 'SC';
} elseif ($_G['config']['output']['language'] == 'zh-tw' || $_G['config']['output']['language'] == 'zh_tw') {
$locale = 'TC';
}else{
$locale = 'SC';
}
}
if (!is_array($_G['setting']['upgrade']))
$_G['setting']['upgrade'] = unserialize($_G['setting']['upgrade']);
$list = array();
foreach ($_G['setting']['upgrade'] as $type => $upgrade) {
$unupgrade = 0;
if (version_compare($upgrade['phpversion'], PHP_VERSION) > 0 || version_compare($upgrade['mysqlversion'], $dbversion) > 0) {
$unupgrade = 1;
}
$list[$type]['linkurl'] = $linkurl = ADMINSCRIPT . '?mod=system&op=systemupgrade&operation=' . $type . '&version=' . $upgrade['latestversion'] . '&locale=' . $locale . '&charset=' . $charset;
if ($unupgrade) {
$list[$type]['title'] = 'oaooa PicHome' . $upgrade['latestversion'] . '_' . $locale . '_' . $charset;
$list[$type]['btn1'] = lang('founder_upgrade_require_config') . ' php v' . PHP_VERSION . 'MYSQL v' . $dbversion;
} else {
$list[$type]['title'] = 'oaooa PicHome' . $upgrade['latestversion'] . '_' . $locale . '_' . $charset;
$list[$type]['btn1'] = '<input type="button" class="btn btn-success" onclick="confirm(\'' . lang('founder_upgrade_backup_remind') . '\') ? window.location.href=\'' . $linkurl . '\' : \'\';" value="' . lang('founder_upgrade_automatically') . '">';
$list[$type]['official'] = '<a class="btn btn-link" href="' . $upgrade['official'] . '" target="_blank">' . lang('founder_upgrade_manually') . '</a>';
}
}
} else {
$msg = lang('upgrade_latest_version');
}
}
elseif ($operation == 'recheck') {
$upgrade_step = C::t('cache') -> fetch('upgrade_step');
$upgrade_step = dunserialize($upgrade_step['cachevalue']);
$file = DZZ_ROOT . './data/update/pichome' . $upgrade_step['version'] . '/updatelist.tmp';
@unlink($file);
@unlink(DZZ_ROOT . './install/update.php');
C::t('cache') -> delete('upgrade_step');
C::t('cache') -> delete('upgrade_run');
C::t('setting') -> update('upgrade', '');
updatecache('setting');
$old_update_dir = './data/update/';
$dzz_upgrade -> rmdirs(DZZ_ROOT . $old_update_dir);
$url = outputurl($_G['siteurl'].MOD_URL.'&op=systemupgrade' );
dheader('Location: ' . $url);
}
include template('upgrade');
?>

View File

@@ -1,188 +1,188 @@
<!--{template common/header_simple_start}-->
<link href="static/css/common.css?{VERHASH}" rel="stylesheet" media="all">
<script type="text/javascript" src="static/js/jquery.leftDrager.js?{VERHASH}"></script>
<script src="admin/scripts/admin.js?{VERHASH}"></script>
<style>
input[type="text"] {
margin: 0;
}
ul.help-block, ul.help-block li, .help-block li{
margin-bottom: 5px;
}
</style>
<!--{template common/header_simple_end}-->
<!--{template common/commer_header}-->
<div class="bs-container clearfix">
<div class="bs-left-container clearfix">
<!--{template left}-->
</div>
<div class="left-drager">
</div>
<div class="bs-main-container clearfix">
<div class="main-header clearfix">
<ul class="nav nav-pills nav-pills-bottomguide">
<li <!--{if empty($_GET[ 'edit']) && empty($_GET[ 'run'])}-->class="active"<!--{/if}-->>
<a hidefocus="true" href="{BASESCRIPT}?mod={MOD_NAME}&op=cron">{lang cron}</a>
</li>
<!--{if !empty($_GET['edit'])}-->
<li class="active">
<a hidefocus="true" href="{BASESCRIPT}?mod={MOD_NAME}&op=cron&edit=$_GET[edit]">{lang misc_cron_edit}</a>
</li>
<!--{/if}-->
<!--{if !empty($_GET['run'])}-->
<li class="active">
<a hidefocus="true" href="{BASESCRIPT}?mod={MOD_NAME}&op=cron&run=$_GET[run]">{lang misc_cron_operation}</a>
</li>
<!--{/if}-->
</ul>
</div>
<div class="main-content" style="padding:15px;border-top:1px solid #FFF">
<!--{if $msg}-->
<div class="well">
<p class="$msg_type">$msg</p>
<!--{if $redirecturl}-->
<p class="text-info">
<a href="{$redirecturl}" class="lightlink">{lang message_redirect}</a>
</p>
<script type="text/JavaScript">setTimeout(function(){location.href='{$redirecturl}';}, 2000);</script>
<!--{/if}-->
</div>
<!--{else}-->
<!--{if $_GET['edit']>0}-->
<ul class="help-block">
<h4>{lang board_message}</h4> {lang misc_cron_edit_tips}
</ul>
<form id="cpform" action="{BASESCRIPT}?mod=system&op=cron&edit=$cronid" class="form-horizontal form-horizontal-left" method="post" name="cpform">
<input type="hidden" value="{FORMHASH}" name="formhash">
<input type="hidden" value="true" name="editsubmit">
<dl>
<dt>{lang weekly}:</dt>
<dd class="clearfix">
<select name="weekdaynew" class="form-control">
<option value="-1" selected="selected">*</option>
$weekdayselect
</select>
<span class="help-inline">{lang misc_cron_edit_weekday_comment}</span>
</dd>
</dl>
<dl>
<dt>{lang everyday}:</dt>
<dd class="clearfix">
<select name="daynew" class="form-control">
<option value="-1" selected="selected">*</option>
$dayselect
</select>
<span class="help-inline">{lang misc_cron_edit_day_comment}</span>
</dd>
</dl>
<dl>
<dt>{lang hour}:</dt>
<dd class="clearfix">
<select name="hournew" class="form-control">
<option value="-1" selected="selected">*</option>
$hourselect
</select>
<span class="help-inline">{lang misc_cron_edit_hour_comment}</span>
</dd>
</dl>
<dl>
<dt>{lang minute}:</dt>
<dd class="clearfix">
<input name="minutenew" value="{eval echo implode(',',$cron[minute])}" type="text" class="form-control">
<span class="help-inline">{lang misc_cron_edit_minute_comment}</span>
</dd>
</dl>
<dl>
<dt>{lang misc_cron_edit_filename}:</dt>
<dd class="clearfix">
<input name="filenamenew" value="$cron[filename]" type="text" class="form-control">
<span class="help-inline">{lang misc_cron_edit_filename_comment}</span>
</dd>
</dl>
<dl>
<dd class="clearfix">
<button type="submit" class="btn btn-primary" name="exportsubmit" value="true">{lang blank_submit}</button>
</dd>
</dl>
</form>
<!--{elseif $_GET['run']}-->
<!--{else}-->
<ul class="help-block">
<h5>{lang board_message}</h5> {lang misc_cron_tips}
<li class="text-danger mt10">计划任务默认通过用户访问触发。缺点是影响用户访问体验计划任务执行不及时。可以修改config.php文件设置参数 {eval echo '$_config[remote][on]=1; $_config[remote][cron]=1;';} 停止这种触发方式。</li>
<li class="text-danger">推荐设置通过系统计划任务来触发。如linux系统可以修改/etc/crontab,加入一行 * * * * root php {eval echo DZZ_ROOT.'cron.php >>/dev/null 2>$1';}</li>
<li>详细请查阅官方文档 <a href="http://help.oaooa.com/corpus/list?cid=24#fid_330" target="_blank">管理员手册-计划任务</a> 中的相关内容</li>
</ul>
<form id="cpform" action="{BASESCRIPT}?mod=system&op=cron" class="form-horizontal form-horizontal-left" method="post" name="cpform">
<input type="hidden" value="{FORMHASH}" name="formhash">
<input type="hidden" value="true" name="cronssubmit">
<table class="table">
<thead>
<th width="45"></th>
<th>{lang name}</th>
<th>{lang available}</th>
<th>{lang type}</th>
<th>{lang time}</th>
<th>{lang misc_cron_last_run}</th>
<th>{lang misc_cron_next_run}</th>
<th></th>
</thead>
<!--{loop $crons $cron}-->
<tr>
<td align="right"><input type="checkbox" name="delete[]" value="$cron[cronid]" <!--{if $cron[type]=='system' }-->disabled
<!--{/if}-->></td>
<td>
<p class="clearfix">
<input type="text" name="namenew[{$cron[cronid]}]" class="form-control" value="$cron[name]"></p>
<strong>$cron[filename]</strong>
</td>
<td><label class="checkbox-inline"><input type="checkbox" name="availablenew[{$cron[cronid]}]" value="1" <!--{if $cron[available]>0}-->checked="checked"<!--{/if}-->></label></td>
<td>
<!--{if $cron['type'] == 'system'}-->
{lang inbuilt}
<!--{elseif $cron['type'] == 'user'}-->
{lang custom}
<!--{/if}-->
</td>
<td>$cron[time]</td>
<td>$cron[lastrun]</td>
<td>$cron[nextrun]</td>
<td>
<a href="{BASESCRIPT}?mod=system&op=cron&edit=$cron[cronid]">{lang edit}</a>
<br />
<!--{if $cron['run']}-->
<a href="{BASESCRIPT}?mod=system&op=cron&run=$cron[cronid]">{lang execute}</a>
<!--{else}-->
<a href="javascript:;" class="text-muted">{lang execute}</a>
<!--{/if}-->
</td>
</tr>
<!--{/loop}-->
<tr>
<td>{lang add_new}</td>
<td colspan="10"><input type="text" name="newname" value="" class="form-control"></td>
</tr>
<tr>
<td colspan="15" style="border-bottom:none"><label class="checkbox-inline ml20"><input type="checkbox" name="chkall" id="chkallspKI" onclick="checkAll('prefix', this.form, 'delete')">{lang del}</label>&nbsp;&nbsp;<button type="submit" class="btn btn-primary" name="exportsubmit" value="true">{lang blank_submit}</button>
</td>
</tr>
</table>
</form>
<!--{/if}-->
<!--{/if}-->
</div>
</div>
</div>
<script type="text/javascript">
jQuery('.left-drager').leftDrager_layout();
</script>
<script src="static/bootstrap/js/bootstrap.min.js?{VERHASH}"></script>
<!--{template common/header_simple_start}-->
<link href="static/css/common.css?{VERHASH}" rel="stylesheet" media="all">
<script type="text/javascript" src="static/js/jquery.leftDrager.js?{VERHASH}"></script>
<script src="admin/scripts/admin.js?{VERHASH}"></script>
<style>
input[type="text"] {
margin: 0;
}
ul.help-block, ul.help-block li, .help-block li{
margin-bottom: 5px;
}
</style>
<!--{template common/header_simple_end}-->
<!--{template common/commer_header}-->
<div class="bs-container clearfix">
<div class="bs-left-container clearfix">
<!--{template left}-->
</div>
<div class="left-drager">
</div>
<div class="bs-main-container clearfix">
<div class="main-header clearfix">
<ul class="nav nav-pills nav-pills-bottomguide">
<li <!--{if empty($_GET[ 'edit']) && empty($_GET[ 'run'])}-->class="active"<!--{/if}-->>
<a hidefocus="true" href="{BASESCRIPT}?mod={MOD_NAME}&op=cron">{lang cron}</a>
</li>
<!--{if !empty($_GET['edit'])}-->
<li class="active">
<a hidefocus="true" href="{BASESCRIPT}?mod={MOD_NAME}&op=cron&edit=$_GET[edit]">{lang misc_cron_edit}</a>
</li>
<!--{/if}-->
<!--{if !empty($_GET['run'])}-->
<li class="active">
<a hidefocus="true" href="{BASESCRIPT}?mod={MOD_NAME}&op=cron&run=$_GET[run]">{lang misc_cron_operation}</a>
</li>
<!--{/if}-->
</ul>
</div>
<div class="main-content" style="padding:15px;border-top:1px solid #FFF">
<!--{if $msg}-->
<div class="well">
<p class="$msg_type">$msg</p>
<!--{if $redirecturl}-->
<p class="text-info">
<a href="{$redirecturl}" class="lightlink">{lang message_redirect}</a>
</p>
<script type="text/JavaScript">setTimeout(function(){location.href='{$redirecturl}';}, 2000);</script>
<!--{/if}-->
</div>
<!--{else}-->
<!--{if $_GET['edit']>0}-->
<ul class="help-block">
<h4>{lang board_message}</h4> {lang misc_cron_edit_tips}
</ul>
<form id="cpform" action="{BASESCRIPT}?mod=system&op=cron&edit=$cronid" class="form-horizontal form-horizontal-left" method="post" name="cpform">
<input type="hidden" value="{FORMHASH}" name="formhash">
<input type="hidden" value="true" name="editsubmit">
<dl>
<dt>{lang weekly}:</dt>
<dd class="clearfix">
<select name="weekdaynew" class="form-control">
<option value="-1" selected="selected">*</option>
$weekdayselect
</select>
<span class="help-inline">{lang misc_cron_edit_weekday_comment}</span>
</dd>
</dl>
<dl>
<dt>{lang everyday}:</dt>
<dd class="clearfix">
<select name="daynew" class="form-control">
<option value="-1" selected="selected">*</option>
$dayselect
</select>
<span class="help-inline">{lang misc_cron_edit_day_comment}</span>
</dd>
</dl>
<dl>
<dt>{lang hour}:</dt>
<dd class="clearfix">
<select name="hournew" class="form-control">
<option value="-1" selected="selected">*</option>
$hourselect
</select>
<span class="help-inline">{lang misc_cron_edit_hour_comment}</span>
</dd>
</dl>
<dl>
<dt>{lang minute}:</dt>
<dd class="clearfix">
<input name="minutenew" value="{eval echo implode(',',$cron[minute])}" type="text" class="form-control">
<span class="help-inline">{lang misc_cron_edit_minute_comment}</span>
</dd>
</dl>
<dl>
<dt>{lang misc_cron_edit_filename}:</dt>
<dd class="clearfix">
<input name="filenamenew" value="$cron[filename]" type="text" class="form-control">
<span class="help-inline">{lang misc_cron_edit_filename_comment}</span>
</dd>
</dl>
<dl>
<dd class="clearfix">
<button type="submit" class="btn btn-primary" name="exportsubmit" value="true">{lang blank_submit}</button>
</dd>
</dl>
</form>
<!--{elseif $_GET['run']}-->
<!--{else}-->
<ul class="help-block">
<h5>{lang board_message}</h5> {lang misc_cron_tips}
<li class="text-danger mt10">计划任务默认通过用户访问触发。缺点是影响用户访问体验计划任务执行不及时。可以修改config.php文件设置参数 {eval echo '$_config[remote][on]=1; $_config[remote][cron]=1;';} 停止这种触发方式。</li>
<li class="text-danger">推荐设置通过系统计划任务来触发。如linux系统可以修改/etc/crontab,加入一行 * * * * root php {eval echo DZZ_ROOT.'cron.php >>/dev/null 2>$1';}</li>
<li>详细请查阅官方文档 <a href="http://help.oaooa.com/corpus/list?cid=24#fid_330" target="_blank">管理员手册-计划任务</a> 中的相关内容</li>
</ul>
<form id="cpform" action="{BASESCRIPT}?mod=system&op=cron" class="form-horizontal form-horizontal-left" method="post" name="cpform">
<input type="hidden" value="{FORMHASH}" name="formhash">
<input type="hidden" value="true" name="cronssubmit">
<table class="table">
<thead>
<th width="45"></th>
<th>{lang name}</th>
<th>{lang available}</th>
<th>{lang type}</th>
<th>{lang time}</th>
<th>{lang misc_cron_last_run}</th>
<th>{lang misc_cron_next_run}</th>
<th></th>
</thead>
<!--{loop $crons $cron}-->
<tr>
<td align="right"><input type="checkbox" name="delete[]" value="$cron[cronid]" <!--{if $cron[type]=='system' }-->disabled
<!--{/if}-->></td>
<td>
<p class="clearfix">
<input type="text" name="namenew[{$cron[cronid]}]" class="form-control" value="$cron[name]"></p>
<strong>$cron[filename]</strong>
</td>
<td><label class="checkbox-inline"><input type="checkbox" name="availablenew[{$cron[cronid]}]" value="1" <!--{if $cron[available]>0}-->checked="checked"<!--{/if}-->></label></td>
<td>
<!--{if $cron['type'] == 'system'}-->
{lang inbuilt}
<!--{elseif $cron['type'] == 'user'}-->
{lang custom}
<!--{/if}-->
</td>
<td>$cron[time]</td>
<td>$cron[lastrun]</td>
<td>$cron[nextrun]</td>
<td>
<a href="{BASESCRIPT}?mod=system&op=cron&edit=$cron[cronid]">{lang edit}</a>
<br />
<!--{if $cron['run']}-->
<a href="{BASESCRIPT}?mod=system&op=cron&run=$cron[cronid]">{lang execute}</a>
<!--{else}-->
<a href="javascript:;" class="text-muted">{lang execute}</a>
<!--{/if}-->
</td>
</tr>
<!--{/loop}-->
<tr>
<td>{lang add_new}</td>
<td colspan="10"><input type="text" name="newname" value="" class="form-control"></td>
</tr>
<tr>
<td colspan="15" style="border-bottom:none"><label class="checkbox-inline ml20"><input type="checkbox" name="chkall" id="chkallspKI" onclick="checkAll('prefix', this.form, 'delete')">{lang del}</label>&nbsp;&nbsp;<button type="submit" class="btn btn-primary" name="exportsubmit" value="true">{lang blank_submit}</button>
</td>
</tr>
</table>
</form>
<!--{/if}-->
<!--{/if}-->
</div>
</div>
</div>
<script type="text/javascript">
jQuery('.left-drager').leftDrager_layout();
</script>
<script src="static/bootstrap/js/bootstrap.min.js?{VERHASH}"></script>
<!--{template common/footer_simple}-->

View File

@@ -1,236 +1,236 @@
<!--{template common/header_simple_start}-->
<link href="static/css/common.css?{VERHASH}" rel="stylesheet" media="all">
<script type="text/javascript" src="static/js/jquery.leftDrager.js?{VERHASH}"></script>
<script src="admin/scripts/admin.js?{VERHASH}"></script>
<!--{template common/header_simple_end}-->
<!--{template common/commer_header}-->
<div class="bs-container clearfix">
<div class="bs-left-container clearfix">
<!--{template left}-->
</div>
<div class="left-drager">
</div>
<div class="bs-main-container clearfix">
<div class="main-header clearfix">
<ul class="nav nav-pills nav-pills-bottomguide">
<li <!--{if $operation=='export' }-->class="active"<!--{/if}-->>
<a hidefocus="true" href="{MOD_URL}&op=database&operation=export">{lang export}</a>
</li>
<li <!--{if $operation=='import' }-->class="active"<!--{/if}-->>
<a hidefocus="true" href="{MOD_URL}&op=database&operation=import">{lang nav_db_import}</a>
</li>
<li <!--{if $operation=='runquery' }-->class="active"<!--{/if}-->>
<a hidefocus="true" href="{MOD_URL}&op=database&operation=runquery">{lang nav_db_runquery}</a>
</li>
</ul>
</div>
<!--{if $operation=='export'}-->
<ul class="help-block mt20">
<h5>{lang board_message}</h5> {lang db_export_tips}
</ul>
<div class="main-content">
<!--{if !$submit}-->
<form id="cpform" action="{MOD_URL}&op=database&operation=export&setup=1" class="form-horizontal form-horizontal-left" method="post" name="cpform">
<input type="hidden" value="{FORMHASH}" name="formhash">
<input type="hidden" value="true" name="exportsubmit">
<dl>
<dt>{lang db_export_type}:</dt>
<dd class="clearfix"><label class="radio radio-inline"><input type="radio" name="type" value="dzz" checked="" onclick="document.getElementById('showtables').style.display = 'none';">{lang all_data_table}</label></dd>
<dd class="clearfix"><label class="radio radio-inline"><input type="radio" name="type" value="custom" onclick="document.getElementById('showtables').style.display = '';">{lang db_export_custom}</label></dd>
<dd id="showtables" class="clearfix" style="display:none;border:1px solid #D2D2D2">
<h4 class="clearfix ml20"> <label class="checkbox-inline" for ="chkalltables"><input name="chkall" onclick="checkAll('prefix', this.form, 'customtables', 'chkall', true)" checked="checked" type="checkbox" id="chkalltables">{lang check_all_data_table}</label></h4>
<ul class="list-unstyled">
<!--{loop $dztables $value}-->
<li class="col-xs-4"><label class="checkbox-inline"><input type="checkbox" name="customtables[]" value="$value" checked="checked">$value</label></li>
<!--{/loop}-->
</ul>
</dd>
</dl>
<div id="advanceoption" style="display:none">
<dl>
<dt>{lang db_export_method}:</dt>
<dd class="clearfix"><label class="radio radio-inline"><input type="radio" name="method" value="shell" onclick="if('0') {if(this.form.sqlcompat[2].checked==true) this.form.sqlcompat[0].checked=true; this.form.sqlcompat[2].disabled=true; this.form.sizelimit.disabled=true;} else {this.form.sqlcharset[0].checked=true; for(var i=1; i&lt;=5; i++) {if(this.form.sqlcharset[i]) this.form.sqlcharset[i].disabled=true;}}" id="method_shell">{lang db_export_shell}</label></dd>
<dd class="clearfix"><label class="radio radio-inline"><input type="radio" name="method" value="multivol" checked="checked" onclick="this.form.sqlcompat[2].disabled=false; this.form.sizelimit.disabled=false; for(var i=1; i<=5; i++) {if(this.form.sqlcharset[i]) this.form.sqlcharset[i].disabled=false;}" id="method_multivol">{lang db_export_multivol}</label>
<input type="text" class="input-sm form-control" style="width:50px;" name="sizelimit" value="2048">
</dd>
</dl>
<dl>
<dt>{lang db_export_options_extended_insert}:</dt>
<dd class="clearfix"><label class="radio radio-inline"><input type="radio" name="extendins" value="1">{lang yes}</label><label class="radio radio-inline"><input type="radio" name="extendins" value="0" checked="checked">{lang no}</label></dd>
</dl>
<dl>
<dt>{lang db_export_options_sql_compatible}:</dt>
<dd class="clearfix"><label class="radio radio-inline"><input type="radio" name="sqlcompat" value="" checked="">{lang default}</label></dd>
<dd class="clearfix"><label class="radio radio-inline"><input type="radio" name="sqlcompat" value="MYSQL40"> MySQL 3.23/4.0.x</label></dd>
<dd class="clearfix"><label class="radio radio-inline"><input type="radio" name="sqlcompat" value="MYSQL41" disabled=""> MySQL 4.1.x/5.x</label></dd>
</dl>
<dl>
<dt>{lang db_export_options_charset}:</dt>
<dd class="clearfix"><label class="radio radio-inline"><input type="radio" name="sqlcharset" value="">{lang db_export_options_charset}</label>
<label class="radio radio-inline"><input type="radio" name="sqlcharset" value="utf8"> UTF8</label></dd>
</dl>
<dl>
<dt>{lang db_export_usehex}:</dt>
<dd class="clearfix"><label class="radio radio-inline"><input type="radio" name="usehex" value="1" checked="checked">{lang yes}</label>
<label class="radio radio-inline"><input type="radio" name="usehex" value="0" >{lang no}</label></dd>
</dl>
<dl>
<dt>{lang db_export_usezip}:</dt>
<dd class="clearfix"><label class="radio radio-inline"><input type="radio" name="usezip" value="1">{lang db_export_zip_1}</label></dd>
<dd class="clearfix"><label class="radio radio-inline"><input type="radio" name="usezip" value="2">{lang db_export_zip_2}</label></dd>
<dd class="clearfix"><label class="radio radio-inline"><input type="radio" name="usezip" value="0" checked>{lang db_export_zip_3}</label></dd>
</dl>
<dl>
<dt>{lang db_export_filename}:</dt>
<dd class="clearfix"><input type="text" class="form-control" name="filename" value="$defaultfilename"></dd>
</dl>
</div>
<dl>
<dd class="clearfix"><button type="submit" class="btn btn-primary" name="exportsubmit" value="true" >{lang blank_submit}</button>
&nbsp; &nbsp;<label class="checkbox inline"><input type="checkbox" value="1" onclick="document.getElementById('advanceoption').style.display = document.getElementById('advanceoption').style.display == 'none' ? '' : 'none'; this.value = this.value == 1 ? 0 : 1; this.checked = this.value == 1 ? false : true" id="btn_more">{lang more_options}</label></dd>
</dl>
</form>
<!--{else}-->
<div class="well">
<!--{if $msg}-->
<p class="$msg_type">$msg</p>
<!--{/if}-->
<!--{if $redirecturl}-->
<p class="text-info">
<a href="{$redirecturl}" class="lightlink">{lang message_redirect}</a>
</p>
<script type="text/JavaScript">setTimeout(function(){location.href='{$redirecturl}';}, 2000);</script>
<!--{/if}-->
</div>
<!--{/if}-->
</div>
<!--{elseif $operation=='import'}-->
<div class="main-content" style="border:1px solid #FFF">
<!--{if $msg}-->
<div class="well">
<p class="$msg_type">$msg</p>
<!--{if $redirecturl}-->
<p class="text-info">
<a href="{$redirecturl}" class="lightlink">{lang message_redirect}</a>
</p>
<script type="text/JavaScript">setTimeout(function(){location.href='{$redirecturl}';}, 2000);</script>
<!--{/if}-->
</div>
<!--{else}-->
<ul class="help-block">
<h5>{lang board_message}</h5> {lang db_import_tips}
</ul>
$do_import_option
<form id="cpform" action="{MOD_URL}&op=database&operation=import" class="form-horizontal form-horizontal-left " method="post" name="cpform">
<input type="hidden" value="{FORMHASH}" name="formhash">
<input type="hidden" value="true" name="deletesubmit">
<table class="table table-hover" style="border-top:1px solid #DDD">
<thead>
<th></th>
<th>{lang filename}</th>
<th>{lang version}</th>
<th>{lang time}</th>
<th>{lang type}</th>
<th>{lang big_small}</th>
<th>{lang db_method}</th>
<th>{lang db_volume}</th>
<th></th>
</thead>
<!--{loop $list $key $val}-->
<tr>
<td><input type="checkbox" name="delete[]" value="$key"></td>
<td>
<!--{if $val['list']}-->
<a href="javascript:;" onclick="jQuery('#exportlog_{$key}').toggle()">$key</a>
<!--{else}-->
<a href="$val[filename]">$key</a>
<!--{/if}-->
</td>
<td>$val[version]</td>
<td>$val[dateline]</td>
<td>$val[ftype]</td>
<td>$val[size]</td>
<td>$val[method]</td>
<td>$val[volume]</td>
<td>
<!--{if $val['list']}-->
<a href="{$datasiteurl}restore.php?operation=import&from=server&datafile_server=$val[datafile_server]&importsubmit=yes" <!--{if $info[ 'version'] !=$_G[ 'setting'][ 'version']}--> onclick="return confirm('{lang db_import_confirm}');"<!--{else}-->onclick="return confirm('{lang db_import_confirm_sql}');"<!--{/if}-->target="_blank">{lang import}</a>
<!--{else}-->
<a href="{$datasiteurl}restore.php?operation=importzip&datafile_server=$info[datafile_server]&importsubmit=yes" onclick="return confirm('{lang db_import_confirm_zip}');" target="_blank">{lang db_import_unzip}</a>
<!--{/if}-->
</td>
</tr>
<thead id="exportlog_{$key}" style="display:none;">
<!--{loop $val[list] $key1 $val1}-->
<tr>
<td></td>
<td>
<a href="$val1[filename]">$val1[filename]</a>
</td>
<td>$val1[version]</td>
<td>$val1[dateline]</td>
<td></td>
<td>$val1[size]</td>
<td></td>
<td>$val1[volume]</td>
<td></td>
</tr>
<!--{/loop}-->
</thead>
<!--{/loop}-->
<thead>
<tr>
<td colspan="15"><input type="checkbox" name="chkall" id="chkallspKI" onclick="checkAll('prefix', this.form, 'delete')">{lang del}&nbsp;&nbsp;<button type="submit" class="btn btn-primary" name="exportsubmit" value="true" >{lang blank_submit}</button>
</td>
</tr>
</thead>
</table>
</form>
<!--{/if}-->
</div>
<!--{elseif $operation=='runquery'}-->
<div class="main-content">
<ul class="help-block">
<h4>{lang board_message}</h4>
{lang db_runquery_tips}
</ul>
<!--{if $msg}-->
<div class="well">
<p class="$msg_type">$msg</p>
<!--{if $redirecturl}-->
<p class="text-info">
<a href="{$redirecturl}" class="lightlink">{lang message_redirect}</a>
</p>
<script type="text/JavaScript">setTimeout(function(){location.href='{$redirecturl}';}, 5000);</script>
<!--{/if}-->
</div>
<!--{else}-->
<form id="cpform" action="{MOD_URL}&op=database&operation=runquery" method="post" name="cpform">
<input type="hidden" value="{FORMHASH}" name="formhash">
<input type="hidden" value="true" name="sqlsubmit">
<dl>
<dt>{lang db_runquery_sql}</dt>
<dd class="clearfix"><textarea cols="85" rows="10" name="queries" style="width:500px;"></textarea></dd>
<dd class="clearfix mt10"><label class="checkbox-inline"><input name="createcompatible" type="checkbox" value="1" checked="checked" />{lang db_runquery_createcompatible}</label></dd>
</dl>
<dl>
<dd class="clearfix"><button type="submit" class="btn btn-primary">{lang blank_submit}</button></dd>
</dl>
</form>
<!--{/if}-->
</div>
<!--{/if}-->
</div>
</div>
<script type="text/javascript">
jQuery('.left-drager').leftDrager_layout();
</script>
<script src="static/bootstrap/js/bootstrap.min.js?{VERHASH}"></script>
<!--{template common/header_simple_start}-->
<link href="static/css/common.css?{VERHASH}" rel="stylesheet" media="all">
<script type="text/javascript" src="static/js/jquery.leftDrager.js?{VERHASH}"></script>
<script src="admin/scripts/admin.js?{VERHASH}"></script>
<!--{template common/header_simple_end}-->
<!--{template common/commer_header}-->
<div class="bs-container clearfix">
<div class="bs-left-container clearfix">
<!--{template left}-->
</div>
<div class="left-drager">
</div>
<div class="bs-main-container clearfix">
<div class="main-header clearfix">
<ul class="nav nav-pills nav-pills-bottomguide">
<li <!--{if $operation=='export' }-->class="active"<!--{/if}-->>
<a hidefocus="true" href="{MOD_URL}&op=database&operation=export">{lang export}</a>
</li>
<li <!--{if $operation=='import' }-->class="active"<!--{/if}-->>
<a hidefocus="true" href="{MOD_URL}&op=database&operation=import">{lang nav_db_import}</a>
</li>
<li <!--{if $operation=='runquery' }-->class="active"<!--{/if}-->>
<a hidefocus="true" href="{MOD_URL}&op=database&operation=runquery">{lang nav_db_runquery}</a>
</li>
</ul>
</div>
<!--{if $operation=='export'}-->
<ul class="help-block mt20">
<h5>{lang board_message}</h5> {lang db_export_tips}
</ul>
<div class="main-content">
<!--{if !$submit}-->
<form id="cpform" action="{MOD_URL}&op=database&operation=export&setup=1" class="form-horizontal form-horizontal-left" method="post" name="cpform">
<input type="hidden" value="{FORMHASH}" name="formhash">
<input type="hidden" value="true" name="exportsubmit">
<dl>
<dt>{lang db_export_type}:</dt>
<dd class="clearfix"><label class="radio radio-inline"><input type="radio" name="type" value="dzz" checked="" onclick="document.getElementById('showtables').style.display = 'none';">{lang all_data_table}</label></dd>
<dd class="clearfix"><label class="radio radio-inline"><input type="radio" name="type" value="custom" onclick="document.getElementById('showtables').style.display = '';">{lang db_export_custom}</label></dd>
<dd id="showtables" class="clearfix" style="display:none;border:1px solid #D2D2D2">
<h4 class="clearfix ml20"> <label class="checkbox-inline" for ="chkalltables"><input name="chkall" onclick="checkAll('prefix', this.form, 'customtables', 'chkall', true)" checked="checked" type="checkbox" id="chkalltables">{lang check_all_data_table}</label></h4>
<ul class="list-unstyled">
<!--{loop $dztables $value}-->
<li class="col-xs-4"><label class="checkbox-inline"><input type="checkbox" name="customtables[]" value="$value" checked="checked">$value</label></li>
<!--{/loop}-->
</ul>
</dd>
</dl>
<div id="advanceoption" style="display:none">
<dl>
<dt>{lang db_export_method}:</dt>
<dd class="clearfix"><label class="radio radio-inline"><input type="radio" name="method" value="shell" onclick="if('0') {if(this.form.sqlcompat[2].checked==true) this.form.sqlcompat[0].checked=true; this.form.sqlcompat[2].disabled=true; this.form.sizelimit.disabled=true;} else {this.form.sqlcharset[0].checked=true; for(var i=1; i&lt;=5; i++) {if(this.form.sqlcharset[i]) this.form.sqlcharset[i].disabled=true;}}" id="method_shell">{lang db_export_shell}</label></dd>
<dd class="clearfix"><label class="radio radio-inline"><input type="radio" name="method" value="multivol" checked="checked" onclick="this.form.sqlcompat[2].disabled=false; this.form.sizelimit.disabled=false; for(var i=1; i<=5; i++) {if(this.form.sqlcharset[i]) this.form.sqlcharset[i].disabled=false;}" id="method_multivol">{lang db_export_multivol}</label>
<input type="text" class="input-sm form-control" style="width:50px;" name="sizelimit" value="2048">
</dd>
</dl>
<dl>
<dt>{lang db_export_options_extended_insert}:</dt>
<dd class="clearfix"><label class="radio radio-inline"><input type="radio" name="extendins" value="1">{lang yes}</label><label class="radio radio-inline"><input type="radio" name="extendins" value="0" checked="checked">{lang no}</label></dd>
</dl>
<dl>
<dt>{lang db_export_options_sql_compatible}:</dt>
<dd class="clearfix"><label class="radio radio-inline"><input type="radio" name="sqlcompat" value="" checked="">{lang default}</label></dd>
<dd class="clearfix"><label class="radio radio-inline"><input type="radio" name="sqlcompat" value="MYSQL40"> MySQL 3.23/4.0.x</label></dd>
<dd class="clearfix"><label class="radio radio-inline"><input type="radio" name="sqlcompat" value="MYSQL41" disabled=""> MySQL 4.1.x/5.x</label></dd>
</dl>
<dl>
<dt>{lang db_export_options_charset}:</dt>
<dd class="clearfix"><label class="radio radio-inline"><input type="radio" name="sqlcharset" value="">{lang db_export_options_charset}</label>
<label class="radio radio-inline"><input type="radio" name="sqlcharset" value="utf8"> UTF8</label></dd>
</dl>
<dl>
<dt>{lang db_export_usehex}:</dt>
<dd class="clearfix"><label class="radio radio-inline"><input type="radio" name="usehex" value="1" checked="checked">{lang yes}</label>
<label class="radio radio-inline"><input type="radio" name="usehex" value="0" >{lang no}</label></dd>
</dl>
<dl>
<dt>{lang db_export_usezip}:</dt>
<dd class="clearfix"><label class="radio radio-inline"><input type="radio" name="usezip" value="1">{lang db_export_zip_1}</label></dd>
<dd class="clearfix"><label class="radio radio-inline"><input type="radio" name="usezip" value="2">{lang db_export_zip_2}</label></dd>
<dd class="clearfix"><label class="radio radio-inline"><input type="radio" name="usezip" value="0" checked>{lang db_export_zip_3}</label></dd>
</dl>
<dl>
<dt>{lang db_export_filename}:</dt>
<dd class="clearfix"><input type="text" class="form-control" name="filename" value="$defaultfilename"></dd>
</dl>
</div>
<dl>
<dd class="clearfix"><button type="submit" class="btn btn-primary" name="exportsubmit" value="true" >{lang blank_submit}</button>
&nbsp; &nbsp;<label class="checkbox inline"><input type="checkbox" value="1" onclick="document.getElementById('advanceoption').style.display = document.getElementById('advanceoption').style.display == 'none' ? '' : 'none'; this.value = this.value == 1 ? 0 : 1; this.checked = this.value == 1 ? false : true" id="btn_more">{lang more_options}</label></dd>
</dl>
</form>
<!--{else}-->
<div class="well">
<!--{if $msg}-->
<p class="$msg_type">$msg</p>
<!--{/if}-->
<!--{if $redirecturl}-->
<p class="text-info">
<a href="{$redirecturl}" class="lightlink">{lang message_redirect}</a>
</p>
<script type="text/JavaScript">setTimeout(function(){location.href='{$redirecturl}';}, 2000);</script>
<!--{/if}-->
</div>
<!--{/if}-->
</div>
<!--{elseif $operation=='import'}-->
<div class="main-content" style="border:1px solid #FFF">
<!--{if $msg}-->
<div class="well">
<p class="$msg_type">$msg</p>
<!--{if $redirecturl}-->
<p class="text-info">
<a href="{$redirecturl}" class="lightlink">{lang message_redirect}</a>
</p>
<script type="text/JavaScript">setTimeout(function(){location.href='{$redirecturl}';}, 2000);</script>
<!--{/if}-->
</div>
<!--{else}-->
<ul class="help-block">
<h5>{lang board_message}</h5> {lang db_import_tips}
</ul>
$do_import_option
<form id="cpform" action="{MOD_URL}&op=database&operation=import" class="form-horizontal form-horizontal-left " method="post" name="cpform">
<input type="hidden" value="{FORMHASH}" name="formhash">
<input type="hidden" value="true" name="deletesubmit">
<table class="table table-hover" style="border-top:1px solid #DDD">
<thead>
<th></th>
<th>{lang filename}</th>
<th>{lang version}</th>
<th>{lang time}</th>
<th>{lang type}</th>
<th>{lang big_small}</th>
<th>{lang db_method}</th>
<th>{lang db_volume}</th>
<th></th>
</thead>
<!--{loop $list $key $val}-->
<tr>
<td><input type="checkbox" name="delete[]" value="$key"></td>
<td>
<!--{if $val['list']}-->
<a href="javascript:;" onclick="jQuery('#exportlog_{$key}').toggle()">$key</a>
<!--{else}-->
<a href="$val[filename]">$key</a>
<!--{/if}-->
</td>
<td>$val[version]</td>
<td>$val[dateline]</td>
<td>$val[ftype]</td>
<td>$val[size]</td>
<td>$val[method]</td>
<td>$val[volume]</td>
<td>
<!--{if $val['list']}-->
<a href="{$datasiteurl}restore.php?operation=import&from=server&datafile_server=$val[datafile_server]&importsubmit=yes" <!--{if $info[ 'version'] !=$_G[ 'setting'][ 'version']}--> onclick="return confirm('{lang db_import_confirm}');"<!--{else}-->onclick="return confirm('{lang db_import_confirm_sql}');"<!--{/if}-->target="_blank">{lang import}</a>
<!--{else}-->
<a href="{$datasiteurl}restore.php?operation=importzip&datafile_server=$info[datafile_server]&importsubmit=yes" onclick="return confirm('{lang db_import_confirm_zip}');" target="_blank">{lang db_import_unzip}</a>
<!--{/if}-->
</td>
</tr>
<thead id="exportlog_{$key}" style="display:none;">
<!--{loop $val[list] $key1 $val1}-->
<tr>
<td></td>
<td>
<a href="$val1[filename]">$val1[filename]</a>
</td>
<td>$val1[version]</td>
<td>$val1[dateline]</td>
<td></td>
<td>$val1[size]</td>
<td></td>
<td>$val1[volume]</td>
<td></td>
</tr>
<!--{/loop}-->
</thead>
<!--{/loop}-->
<thead>
<tr>
<td colspan="15"><input type="checkbox" name="chkall" id="chkallspKI" onclick="checkAll('prefix', this.form, 'delete')">{lang del}&nbsp;&nbsp;<button type="submit" class="btn btn-primary" name="exportsubmit" value="true" >{lang blank_submit}</button>
</td>
</tr>
</thead>
</table>
</form>
<!--{/if}-->
</div>
<!--{elseif $operation=='runquery'}-->
<div class="main-content">
<ul class="help-block">
<h4>{lang board_message}</h4>
{lang db_runquery_tips}
</ul>
<!--{if $msg}-->
<div class="well">
<p class="$msg_type">$msg</p>
<!--{if $redirecturl}-->
<p class="text-info">
<a href="{$redirecturl}" class="lightlink">{lang message_redirect}</a>
</p>
<script type="text/JavaScript">setTimeout(function(){location.href='{$redirecturl}';}, 5000);</script>
<!--{/if}-->
</div>
<!--{else}-->
<form id="cpform" action="{MOD_URL}&op=database&operation=runquery" method="post" name="cpform">
<input type="hidden" value="{FORMHASH}" name="formhash">
<input type="hidden" value="true" name="sqlsubmit">
<dl>
<dt>{lang db_runquery_sql}</dt>
<dd class="clearfix"><textarea cols="85" rows="10" name="queries" style="width:500px;"></textarea></dd>
<dd class="clearfix mt10"><label class="checkbox-inline"><input name="createcompatible" type="checkbox" value="1" checked="checked" />{lang db_runquery_createcompatible}</label></dd>
</dl>
<dl>
<dd class="clearfix"><button type="submit" class="btn btn-primary">{lang blank_submit}</button></dd>
</dl>
</form>
<!--{/if}-->
</div>
<!--{/if}-->
</div>
</div>
<script type="text/javascript">
jQuery('.left-drager').leftDrager_layout();
</script>
<script src="static/bootstrap/js/bootstrap.min.js?{VERHASH}"></script>
<!--{template common/footer_simple}-->

View File

@@ -1,12 +1,12 @@
{eval $oparr=array('updatecache','database','cron','systemupgrade' );}
{eval $leftmenu=array();}
{eval foreach($oparr as $key => $value){}
{eval $leftmenu[$value]=array('title'=>lang($value),'active'=>'');}
{eval if($value==$op) $leftmenu[$value]['active']='class="active"';}
{eval }}
<ul class="nav-stacked">
<!--{loop $leftmenu $key $value}-->
<li $value[active]><a hidefocus="true" href="{MOD_URL}&op=$key">$value[title]</a></li>
<!--{/loop}-->
{eval $oparr=array('updatecache','database','cron','systemupgrade' );}
{eval $leftmenu=array();}
{eval foreach($oparr as $key => $value){}
{eval $leftmenu[$value]=array('title'=>lang($value),'active'=>'');}
{eval if($value==$op) $leftmenu[$value]['active']='class="active"';}
{eval }}
<ul class="nav-stacked">
<!--{loop $leftmenu $key $value}-->
<li $value[active]><a hidefocus="true" href="{MOD_URL}&op=$key">$value[title]</a></li>
<!--{/loop}-->
</ul>

View File

@@ -1,73 +1,73 @@
<!--{template common/header_simple_start}-->
<link href="static/css/common.css?{VERHASH}" rel="stylesheet" media="all">
<script type="text/javascript" src="static/js/jquery.leftDrager.js?{VERHASH}"></script>
<!--{template common/header_simple_end}-->
<!--{template common/commer_header}-->
<div class="bs-container clearfix">
<div class="bs-left-container clearfix">
<!--{template left}-->
</div>
<div class="left-drager">
</div>
<div class="bs-main-container clearfix">
<div class="main-header">
<div class="clearfix" style="line-height:40px;padding:0 10px">
<!-- <strong style="font-size:14px;">{lang updatecache}</strong>-->
<span class="text-muted" id="step1" <!--{if $step==1}-->style="color:green"<!--{/if}-->>1.{lang nav_updatecache_confirm}</span>
<span class="text-muted" id="step2" <!--{if $step==2}-->style="color:green"<!--{/if}-->>2.{lang nav_updatecache_verify}</span>
<span class="text-muted" id="step3" <!--{if $step==3}-->style="color:green"<!--{/if}-->>3.{lang nav_updatecache_completed}</span>
</div>
</div>
<div class="main-content" style="padding:20px;border-top:1px solid #FFF">
<div class="well well-sm">
<!--{if $step==1}-->
<form method="post" class="form-horizontal form-horizontal-left" action="{MOD_URL}&op=updatecache&step=2">
<input name="formhash" value="{VERHASH}" type="hidden">
<p class="clearfix ml20">
<label class="checkbox-inline">
<input name="type[]" value="data" checked="" type="checkbox">
{lang tools_updatecache_data}
</label>
<label class="checkbox-inline">
<input name="type[]" value="tpl" id="tplcache" checked="" type="checkbox">
{lang tools_updatecache_tpl}
</label>
<label class="checkbox-inline">
<input name="type[]" value="memory" id="momerycache" type="checkbox">
{lang tools_updatecache_memory}
</label>
</p>
<p class="clearfix ml20">
<input class="btn btn-primary" name="confirmed" value="{lang confirms}" type="submit"> &nbsp;
<script type="text/javascript">
if(history.length > (BROWSER.ie ? 0 : 1)) document.write('<input type="button" class="btn btn-default" value="{lang cancel}" onClick="history.go(-1);">');
</script>
</p>
</form>
<!--{elseif $step==2}-->
<p class="ml20">{lang tools_updatecache_waiting}</p>
<p class="text-success ml20">
<a href="{MOD_URL}&op=updatecache&step=3&type=$type" class="lightlink">{lang message_redirect}</a>
</p>
<script type="text/JavaScript">setTimeout(function(){location.href='{MOD_URL}&op=updatecache&step=3&type=$type';}, 2000);</script>
<!--{elseif $step==3}-->
<p class="text-success ml20" style="margin:10px;">{lang update_cache_succeed}</p>
<script type="text/javascript">
window.setTimeout(function() { location.href = '{MOD_URL}&op=updatecache'; }, 5000);
</script>
<!--{/if}-->
</div>
<ul class="help-block">
<h5>{lang board_message}</h5> {lang tools_updatecache_tips}
</ul>
</div>
</div>
</div>
<script type="text/javascript">
jQuery('.left-drager').leftDrager_layout();
</script>
<script src="static/bootstrap/js/bootstrap.min.js?{VERHASH}"></script>
<!--{template common/header_simple_start}-->
<link href="static/css/common.css?{VERHASH}" rel="stylesheet" media="all">
<script type="text/javascript" src="static/js/jquery.leftDrager.js?{VERHASH}"></script>
<!--{template common/header_simple_end}-->
<!--{template common/commer_header}-->
<div class="bs-container clearfix">
<div class="bs-left-container clearfix">
<!--{template left}-->
</div>
<div class="left-drager">
</div>
<div class="bs-main-container clearfix">
<div class="main-header">
<div class="clearfix" style="line-height:40px;padding:0 10px">
<!-- <strong style="font-size:14px;">{lang updatecache}</strong>-->
<span class="text-muted" id="step1" <!--{if $step==1}-->style="color:green"<!--{/if}-->>1.{lang nav_updatecache_confirm}</span>
<span class="text-muted" id="step2" <!--{if $step==2}-->style="color:green"<!--{/if}-->>2.{lang nav_updatecache_verify}</span>
<span class="text-muted" id="step3" <!--{if $step==3}-->style="color:green"<!--{/if}-->>3.{lang nav_updatecache_completed}</span>
</div>
</div>
<div class="main-content" style="padding:20px;border-top:1px solid #FFF">
<div class="well well-sm">
<!--{if $step==1}-->
<form method="post" class="form-horizontal form-horizontal-left" action="{MOD_URL}&op=updatecache&step=2">
<input name="formhash" value="{VERHASH}" type="hidden">
<p class="clearfix ml20">
<label class="checkbox-inline">
<input name="type[]" value="data" checked="" type="checkbox">
{lang tools_updatecache_data}
</label>
<label class="checkbox-inline">
<input name="type[]" value="tpl" id="tplcache" checked="" type="checkbox">
{lang tools_updatecache_tpl}
</label>
<label class="checkbox-inline">
<input name="type[]" value="memory" id="momerycache" type="checkbox">
{lang tools_updatecache_memory}
</label>
</p>
<p class="clearfix ml20">
<input class="btn btn-primary" name="confirmed" value="{lang confirms}" type="submit"> &nbsp;
<script type="text/javascript">
if(history.length > (BROWSER.ie ? 0 : 1)) document.write('<input type="button" class="btn btn-default" value="{lang cancel}" onClick="history.go(-1);">');
</script>
</p>
</form>
<!--{elseif $step==2}-->
<p class="ml20">{lang tools_updatecache_waiting}</p>
<p class="text-success ml20">
<a href="{MOD_URL}&op=updatecache&step=3&type=$type" class="lightlink">{lang message_redirect}</a>
</p>
<script type="text/JavaScript">setTimeout(function(){location.href='{MOD_URL}&op=updatecache&step=3&type=$type';}, 2000);</script>
<!--{elseif $step==3}-->
<p class="text-success ml20" style="margin:10px;">{lang update_cache_succeed}</p>
<script type="text/javascript">
window.setTimeout(function() { location.href = '{MOD_URL}&op=updatecache'; }, 5000);
</script>
<!--{/if}-->
</div>
<ul class="help-block">
<h5>{lang board_message}</h5> {lang tools_updatecache_tips}
</ul>
</div>
</div>
</div>
<script type="text/javascript">
jQuery('.left-drager').leftDrager_layout();
</script>
<script src="static/bootstrap/js/bootstrap.min.js?{VERHASH}"></script>
<!--{template common/footer_simple}-->

View File

@@ -1,246 +1,246 @@
<!--{template common/header_simple_start}-->
<link href="static/css/common.css?{VERHASH}" rel="stylesheet" media="all">
<script type="text/javascript" src="static/js/jquery.leftDrager.js?{VERHASH}"></script>
<script src="admin/scripts/admin.js?{VERHASH}"></script>
<style>
.progress.active .progress-bar {
-webkit-animation: none;
animation: none;
transition: none;
-webkit-box-shadow: none;
box-shadow: none;
}
</style>
<!--{template common/header_simple_end}-->
<!--{template common/commer_header}-->
<div class="bs-container clearfix">
<div class="bs-left-container clearfix">
<!--{template left}-->
</div>
<div class="left-drager">
</div>
<div class="bs-main-container clearfix">
<!--{if $operation == 'patch' || $operation == 'cross'}-->
<div class="main-header">
<div class="clearfix" style="line-height:40px;padding:0 10px;font-size:12px;">
<strong style="font-size:14px;">{lang upgrade}</strong>
<!--{loop $steplang $key $value}-->
<!--{if $key>0 && $key<=5}-->
<span class="text-muted" <!--{if $key==$step}-->style="color:green"<!--{/if}-->>{$key}.{$value}</span>
<!--{/if}-->
<!--{/loop}-->
</div>
</div>
<!--{/if}-->
<!--{if $operation=='check'}-->
<div class="main-content" style="border-top:1px solid #FFF">
<!--{if $msg}-->
<div id="step4" style="padding:20px;height:450px">
<div class="alert alert-warning text-center">
$msg
</div>
</div>
<!--{else}-->
<div style="padding:20px;">
<div class="text-center" style="width:300px;margin:0 auto">
<p style="margin:20px 0;">{lang upgrade_checking}</p>
<div class="progress progress-striped active" style="border:1px solid #5bc0de">
<div class="progress-bar progress-bar-info " role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width:0%"><span class="sr-only">100% Complete</span></div>
</div>
</div>
<script type="text/javascript">
jQuery('.progress-bar').animate({ width: '100%' }, 3000, function() {
window.location.href = '{MOD_URL}&op=systemupgrade&operation=check&checking=1';
});
</script>
</div>
<!--{/if}-->
</div>
<!--{elseif $operation=='showupgrade'}-->
<div class="main-content" style="border-top:1px solid #FFF">
<!--{if $msg}-->
<div id="step4" style="padding:20px;height:450px">
<div class="alert alert-warning">
$msg
</div>
</div>
<!--{else}-->
<table class="table table-hover">
<thead>
<th colspan="5">{lang founder_upgrade_select_version}</th>
</thead>
<!--{loop $list $value}-->
<tr>
<td>$value[title]</td>
<td>$value[btn1]</td>
</tr>
<!--{/loop}-->
</table>
<!--{/if}-->
</div>
<!--{elseif $operation=='patch' || $operation=='cross' }-->
<div class="main-content" style="border-top:1px solid #FFF;">
<!--{if !$_G['setting']['bbclosed']}-->
<div style="padding:20px;height:450px">
<div class="alert alert-warning text-center">
$msg
</div>
</div>
<!--{elseif $step==1}-->
<table class="table table-hover">
<thead>
<th colspan="5">{lang founder_upgrade_preupdatelist}</th>
</thead>
<!--{loop $updatefilelist $value}-->
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;<i class="glyphicon glyphicon-file"></i> $value</td>
</tr>
<!--{/loop}-->
<thead>
<th colspan="5">&nbsp;{lang founder_upgrade_store_directory} ./data/update/oaooa$version</th>
</thead>
<thead>
<th colspan="5">&nbsp;<input type="button" class="btn btn-primary" onclick="window.location.href='$linkurl'" value="{lang founder_upgrade_download}">{eval echo upgradeinformation(0)}</th>
</thead>
</table>
<!--{elseif $step==2}-->
<div style="padding:20px;">$msg</div>
<!--{elseif $step==3}-->
<!--{if $msg}-->
<div id="step4" style="padding:20px;">
<div class="alert alert-warning text-center">
$msg
</div>
</div>
<!--{else}-->
<table class="table table-hover">
<thead>
<th colspan="5">{lang founder_upgrade_diff_show}</th>
</thead>
<!--{loop $updatefilelist $v}-->
<!--{if isset($ignorelist[$v])}-->
<!--{elseif isset($modifylist[$v])}-->
<tr>
<td class="text-danger">&nbsp;&nbsp;&nbsp;&nbsp;{lang founder_upgrade_diff} &nbsp;<i class="glyphicon glyphicon-exclamation-sign"></i> $v</td>
</tr>
<!--{elseif isset($showlist[$v])}-->
<tr>
<td class="text-success">&nbsp;&nbsp;&nbsp;&nbsp;{lang founder_upgrade_normal} &nbsp;<i class="glyphicon glyphicon-ok"></i> $v</td>
</tr>
<!--{elseif isset($newlist[$v])}-->
<tr>
<td class="text-info">&nbsp;&nbsp;&nbsp;&nbsp;{lang founder_upgrade_new} &nbsp;<i class="glyphicon glyphicon-plus"></i> $v</td>
</tr>
<!--{/if}-->
<!--{/loop}-->
<thead>
<th colspan="5">{lang founder_upgrade_download_file} ./data/update/oaooa{$version}</th>
</thead>
<thead>
<th colspan="5">&nbsp;{lang founder_upgrade_backup_file} ./data/back/oaooa{CORE_VERSION} {lang founder_upgrade_backup_file2} </th>
</thead>
<thead>
<th colspan="5">&nbsp;<input type="button" class="btn btn-primary" onclick="window.location.href='{$linkurl}';" value="<!--{if !empty($modifylist)}-->{lang founder_upgrade_force}<!--{else}-->{lang founder_upgrade_regular}<!--{/if}-->" /> {eval echo upgradeinformation(0)}</th>
</thead>
</table>
<!--{/if}-->
<!--{elseif $step==4}-->
<!--{if $msg}-->
<div id="step4" style="padding:20px;height:450px">
<div class="alert alert-warning text-center">
$msg
</div>
</div>
<!--{elseif $_GET['siteftpsetting']}-->
<form name="aliform" class="form-horizontal form-horizontal-left" action="$action" method="post" style="padding:20px;">
<input type="hidden" name="formhash" value="{FORMHASH}">
<p style="padding-left:20px;font-weight:bold;font-size:16px;padding-bottom:20px;">{lang upgrade_website_FTP_set}</p>
<div class="form-group">
<label class="control-label">FTP {lang server_address}</label>
<input type="text" class="form-control required" name="siteftp[host]" value="" placeholder="{lang host_IP_address}">
<span class="help-inline">{lang FTP_server_IP_site_domain}</span>
</div>
<div class="form-group">
<label class="control-label">FTP {lang server_port}</label>
<input type="text" class="form-control required" name="siteftp[port]" value="21" placeholder="{lang port}">
<span class="help-inline">{lang default_for_the_21st}</span>
</div>
<div class="form-group">
<label class="control-label">FTP {lang account}</label>
<input type="text" class="form-control required" name="siteftp[username]" value="" placeholder="{lang FTP_account_user_name}">
<span class="help-inline">{lang accounts_supreme_authority}</span>
</div>
<div class="form-group">
<label class="control-label">FTP {lang password}</label>
<input type="password" class="form-control required" name="siteftp[password]" value="" placeholder="{lang FTP_account_user_password}">
</div>
<!--<div class="form-group">
<label class="control-label">编码</label>
<select class="form-control" name="siteftp[charset]">
<option value="GBK" selected="selected">GBK</option>
<option value="UTF-8">UTF-8</option>
<option value="BIG5">BIG5</option>
</select>
<span class="help-inline">根据FTP服务器的编码设置不一致会导致乱码</span>
</div>-->
<div class="form-group">
<label class="control-label">{lang sitepath}</label>
<input type="text" class="form-control required" name="siteftp[attachdir]" value="">
<span class="help-inline">{lang site_absolute_path_root_directory}</span>
</div>
<div class="form-group">
<label class="control-label"></label>
<label class="checkbox-inline" style="width:180px;"><input type="checkbox" name="siteftp[pasv]" value="1">{lang use_Passive_Mode}</label>
<span class="help-inline">{lang general_condition_passive_mode}</span>
</div>
<div class="form-group">
<label class="control-label"></label>
<label class="checkbox-inline" style="width:180px;"><input type="checkbox" name="siteftp[ssl]" value="1">{lang enable_secure_link}</label>
<span class="help-inline">{lang notice_FTP_open_SSL}</span>
</div>
<div class="form-group">
<label class="control-label"></label>
<input type="submit" class="btn btn-primary" style="padding:6px 25px" value="{lang confirms}">
</div>
</form>
<!--{/if}-->
<!--{elseif $step==5}-->
<div style="padding:20px;">
<div class="alert alert-success text-center">
$msg
</div>
</div>
<!--{/if}-->
</div>
<!--{/if}-->
</div>
</div>
<script type="text/javascript">
jQuery('.left-drager').leftDrager_layout();
function createIframe(src) {
document.getElementById('step4').innerHTML = '<iframe marginheight="0" marginwidth="0" allowtransparency="true" frameborder="0" src="' + src + '" style="width:100%;height:100%;"></iframe>';
}
</script>
<script src="static/bootstrap/js/bootstrap.min.js?{VERHASH}"></script>
<!--{template common/header_simple_start}-->
<link href="static/css/common.css?{VERHASH}" rel="stylesheet" media="all">
<script type="text/javascript" src="static/js/jquery.leftDrager.js?{VERHASH}"></script>
<script src="admin/scripts/admin.js?{VERHASH}"></script>
<style>
.progress.active .progress-bar {
-webkit-animation: none;
animation: none;
transition: none;
-webkit-box-shadow: none;
box-shadow: none;
}
</style>
<!--{template common/header_simple_end}-->
<!--{template common/commer_header}-->
<div class="bs-container clearfix">
<div class="bs-left-container clearfix">
<!--{template left}-->
</div>
<div class="left-drager">
</div>
<div class="bs-main-container clearfix">
<!--{if $operation == 'patch' || $operation == 'cross'}-->
<div class="main-header">
<div class="clearfix" style="line-height:40px;padding:0 10px;font-size:12px;">
<strong style="font-size:14px;">{lang upgrade}</strong>
<!--{loop $steplang $key $value}-->
<!--{if $key>0 && $key<=5}-->
<span class="text-muted" <!--{if $key==$step}-->style="color:green"<!--{/if}-->>{$key}.{$value}</span>
<!--{/if}-->
<!--{/loop}-->
</div>
</div>
<!--{/if}-->
<!--{if $operation=='check'}-->
<div class="main-content" style="border-top:1px solid #FFF">
<!--{if $msg}-->
<div id="step4" style="padding:20px;height:450px">
<div class="alert alert-warning text-center">
$msg
</div>
</div>
<!--{else}-->
<div style="padding:20px;">
<div class="text-center" style="width:300px;margin:0 auto">
<p style="margin:20px 0;">{lang upgrade_checking}</p>
<div class="progress progress-striped active" style="border:1px solid #5bc0de">
<div class="progress-bar progress-bar-info " role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width:0%"><span class="sr-only">100% Complete</span></div>
</div>
</div>
<script type="text/javascript">
jQuery('.progress-bar').animate({ width: '100%' }, 3000, function() {
window.location.href = '{MOD_URL}&op=systemupgrade&operation=check&checking=1';
});
</script>
</div>
<!--{/if}-->
</div>
<!--{elseif $operation=='showupgrade'}-->
<div class="main-content" style="border-top:1px solid #FFF">
<!--{if $msg}-->
<div id="step4" style="padding:20px;height:450px">
<div class="alert alert-warning">
$msg
</div>
</div>
<!--{else}-->
<table class="table table-hover">
<thead>
<th colspan="5">{lang founder_upgrade_select_version}</th>
</thead>
<!--{loop $list $value}-->
<tr>
<td>$value[title]</td>
<td>$value[btn1]</td>
</tr>
<!--{/loop}-->
</table>
<!--{/if}-->
</div>
<!--{elseif $operation=='patch' || $operation=='cross' }-->
<div class="main-content" style="border-top:1px solid #FFF;">
<!--{if !$_G['setting']['bbclosed']}-->
<div style="padding:20px;height:450px">
<div class="alert alert-warning text-center">
$msg
</div>
</div>
<!--{elseif $step==1}-->
<table class="table table-hover">
<thead>
<th colspan="5">{lang founder_upgrade_preupdatelist}</th>
</thead>
<!--{loop $updatefilelist $value}-->
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;<i class="glyphicon glyphicon-file"></i> $value</td>
</tr>
<!--{/loop}-->
<thead>
<th colspan="5">&nbsp;{lang founder_upgrade_store_directory} ./data/update/oaooa$version</th>
</thead>
<thead>
<th colspan="5">&nbsp;<input type="button" class="btn btn-primary" onclick="window.location.href='$linkurl'" value="{lang founder_upgrade_download}">{eval echo upgradeinformation(0)}</th>
</thead>
</table>
<!--{elseif $step==2}-->
<div style="padding:20px;">$msg</div>
<!--{elseif $step==3}-->
<!--{if $msg}-->
<div id="step4" style="padding:20px;">
<div class="alert alert-warning text-center">
$msg
</div>
</div>
<!--{else}-->
<table class="table table-hover">
<thead>
<th colspan="5">{lang founder_upgrade_diff_show}</th>
</thead>
<!--{loop $updatefilelist $v}-->
<!--{if isset($ignorelist[$v])}-->
<!--{elseif isset($modifylist[$v])}-->
<tr>
<td class="text-danger">&nbsp;&nbsp;&nbsp;&nbsp;{lang founder_upgrade_diff} &nbsp;<i class="glyphicon glyphicon-exclamation-sign"></i> $v</td>
</tr>
<!--{elseif isset($showlist[$v])}-->
<tr>
<td class="text-success">&nbsp;&nbsp;&nbsp;&nbsp;{lang founder_upgrade_normal} &nbsp;<i class="glyphicon glyphicon-ok"></i> $v</td>
</tr>
<!--{elseif isset($newlist[$v])}-->
<tr>
<td class="text-info">&nbsp;&nbsp;&nbsp;&nbsp;{lang founder_upgrade_new} &nbsp;<i class="glyphicon glyphicon-plus"></i> $v</td>
</tr>
<!--{/if}-->
<!--{/loop}-->
<thead>
<th colspan="5">{lang founder_upgrade_download_file} ./data/update/oaooa{$version}</th>
</thead>
<thead>
<th colspan="5">&nbsp;{lang founder_upgrade_backup_file} ./data/back/oaooa{CORE_VERSION} {lang founder_upgrade_backup_file2} </th>
</thead>
<thead>
<th colspan="5">&nbsp;<input type="button" class="btn btn-primary" onclick="window.location.href='{$linkurl}';" value="<!--{if !empty($modifylist)}-->{lang founder_upgrade_force}<!--{else}-->{lang founder_upgrade_regular}<!--{/if}-->" /> {eval echo upgradeinformation(0)}</th>
</thead>
</table>
<!--{/if}-->
<!--{elseif $step==4}-->
<!--{if $msg}-->
<div id="step4" style="padding:20px;height:450px">
<div class="alert alert-warning text-center">
$msg
</div>
</div>
<!--{elseif $_GET['siteftpsetting']}-->
<form name="aliform" class="form-horizontal form-horizontal-left" action="$action" method="post" style="padding:20px;">
<input type="hidden" name="formhash" value="{FORMHASH}">
<p style="padding-left:20px;font-weight:bold;font-size:16px;padding-bottom:20px;">{lang upgrade_website_FTP_set}</p>
<div class="form-group">
<label class="control-label">FTP {lang server_address}</label>
<input type="text" class="form-control required" name="siteftp[host]" value="" placeholder="{lang host_IP_address}">
<span class="help-inline">{lang FTP_server_IP_site_domain}</span>
</div>
<div class="form-group">
<label class="control-label">FTP {lang server_port}</label>
<input type="text" class="form-control required" name="siteftp[port]" value="21" placeholder="{lang port}">
<span class="help-inline">{lang default_for_the_21st}</span>
</div>
<div class="form-group">
<label class="control-label">FTP {lang account}</label>
<input type="text" class="form-control required" name="siteftp[username]" value="" placeholder="{lang FTP_account_user_name}">
<span class="help-inline">{lang accounts_supreme_authority}</span>
</div>
<div class="form-group">
<label class="control-label">FTP {lang password}</label>
<input type="password" class="form-control required" name="siteftp[password]" value="" placeholder="{lang FTP_account_user_password}">
</div>
<!--<div class="form-group">
<label class="control-label">编码</label>
<select class="form-control" name="siteftp[charset]">
<option value="GBK" selected="selected">GBK</option>
<option value="UTF-8">UTF-8</option>
<option value="BIG5">BIG5</option>
</select>
<span class="help-inline">根据FTP服务器的编码设置不一致会导致乱码</span>
</div>-->
<div class="form-group">
<label class="control-label">{lang sitepath}</label>
<input type="text" class="form-control required" name="siteftp[attachdir]" value="">
<span class="help-inline">{lang site_absolute_path_root_directory}</span>
</div>
<div class="form-group">
<label class="control-label"></label>
<label class="checkbox-inline" style="width:180px;"><input type="checkbox" name="siteftp[pasv]" value="1">{lang use_Passive_Mode}</label>
<span class="help-inline">{lang general_condition_passive_mode}</span>
</div>
<div class="form-group">
<label class="control-label"></label>
<label class="checkbox-inline" style="width:180px;"><input type="checkbox" name="siteftp[ssl]" value="1">{lang enable_secure_link}</label>
<span class="help-inline">{lang notice_FTP_open_SSL}</span>
</div>
<div class="form-group">
<label class="control-label"></label>
<input type="submit" class="btn btn-primary" style="padding:6px 25px" value="{lang confirms}">
</div>
</form>
<!--{/if}-->
<!--{elseif $step==5}-->
<div style="padding:20px;">
<div class="alert alert-success text-center">
$msg
</div>
</div>
<!--{/if}-->
</div>
<!--{/if}-->
</div>
</div>
<script type="text/javascript">
jQuery('.left-drager').leftDrager_layout();
function createIframe(src) {
document.getElementById('step4').innerHTML = '<iframe marginheight="0" marginwidth="0" allowtransparency="true" frameborder="0" src="' + src + '" style="width:100%;height:100%;"></iframe>';
}
</script>
<script src="static/bootstrap/js/bootstrap.min.js?{VERHASH}"></script>
<!--{template common/footer_simple}-->

View File

@@ -1,21 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="static/bootstrap/css/bootstrap.min.css">
<link href="static/css/common.css" rel="stylesheet" media="all">
<style>
body {
overflow: hidden;
}
</style>
</head>
<body>
<div class="alert alert-warning">
$msg
</div>
</body>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="static/bootstrap/css/bootstrap.min.css">
<link href="static/css/common.css" rel="stylesheet" media="all">
<style>
body {
overflow: hidden;
}
</style>
</head>
<body>
<div class="alert alert-warning">
$msg
</div>
</body>
</html>

View File

@@ -1,46 +1,46 @@
<?php
/*
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
* @license https://www.oaooa.com/licenses/
*
* @link https://www.oaooa.com
* @author zyx(zyx@oaooa.com)
*/
if (!defined('IN_OAOOA') || !defined('IN_ADMIN')) {
exit('Access Denied');
}
$oparr = array('updatecache', 'database', /*'security','patch','update',*/
'cron', 'log');
$leftmenu = array();
$op = $_GET['op'];
foreach ($oparr as $key => $value) {
$leftmenu[$value] = array('title' => lang($value), 'active' => '');
if ($value == $op)
$leftmenu[$value]['active'] = 'class="active"';
}
include libfile('function/cache');
$navtitle = lang('updatecache') . ' - ' . lang('admin_navtitle');
$step = max(1, intval($_GET['step']));
if ($step == 1) {
} elseif ($step == 2) {
$type = implode('_', (array)$_GET['type']);
} elseif ($step == 3) {
$type = explode('_', $_GET['type']);
if (in_array('data', $type)) {
updatecache();
}
if (in_array('tpl', $type) && $_G['config']['output']['tplrefresh']) {
cleartemplatecache();
}
if (in_array('memory', $type)) {
//清空内存缓存
C::memory()->clear();
}
}
include template('updatecache');
?>
<?php
/*
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
* @license https://www.oaooa.com/licenses/
*
* @link https://www.oaooa.com
* @author zyx(zyx@oaooa.com)
*/
if (!defined('IN_OAOOA') || !defined('IN_ADMIN')) {
exit('Access Denied');
}
$oparr = array('updatecache', 'database', /*'security','patch','update',*/
'cron', 'log');
$leftmenu = array();
$op = $_GET['op'];
foreach ($oparr as $key => $value) {
$leftmenu[$value] = array('title' => lang($value), 'active' => '');
if ($value == $op)
$leftmenu[$value]['active'] = 'class="active"';
}
include libfile('function/cache');
$navtitle = lang('updatecache') . ' - ' . lang('admin_navtitle');
$step = max(1, intval($_GET['step']));
if ($step == 1) {
} elseif ($step == 2) {
$type = implode('_', (array)$_GET['type']);
} elseif ($step == 3) {
$type = explode('_', $_GET['type']);
if (in_array('data', $type)) {
updatecache();
}
if (in_array('tpl', $type) && $_G['config']['output']['tplrefresh']) {
cleartemplatecache();
}
if (in_array('memory', $type)) {
//清空内存缓存
C::memory()->clear();
}
}
include template('updatecache');
?>

View File

@@ -1,103 +1,113 @@
<?php
/** php下载类,支持断点续传
* Date: 2013-06-30
* Author: test
* Ver: 1.0
*
* Func:
* download: 下载文件
* setSpeed: 设置下载速度
* getRange: 获取header中Range
*/
class FileDownload{ // class start
private $_speed = 512; // 下载速度
/** 下载
* @param String $file 要下载的文件路径
* @param String $name 文件名称,为空则与下载的文件名称一样
* @param boolean $reload 是否开启断点续传
*/
public function download($file, $name='',$file_size=0,$dateline=0, $reload=false){
if($name==''){
$name = basename($file);
}
if(!$dateline){
$dataline=TIMESTAMP;
}
if(!$fp = fopen($file, 'rb')){
topshowmessage(lang('file_not_exist1'));
}
$db = DB::object();
$db->close();
@ob_end_clean();
if(getglobal('gzipcompress')) @ob_start('ob_gzhandler');
if(!$file_size) $file_size = filesize($file);
$ranges = $this->getRange($file_size);
header('cache-control:public');
header('Date: '.gmdate('D, d M Y H:i:s', $dateline).' GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s', $dateline).' GMT');
header('content-type:application/octet-stream');
header('content-disposition:attachment; filename='.$name);
if($reload && $ranges!=null){ // 使用续传
header('HTTP/1.1 206 Partial Content');
header('Accept-Ranges:bytes');
// 剩余长度
header(sprintf('content-length:%u',$ranges['end']-$ranges['start']+1));
// range信息
header(sprintf('content-range:bytes %s-%s/%s', $ranges['start'], $ranges['end'], $file_size));
// fp指针跳到断点位置
fseek($fp, sprintf('%u', $ranges['start']));
}else{
header('HTTP/1.1 200 OK');
header('content-length:'.$file_size);
}
while(!feof($fp)){
echo fread($fp, round($this->_speed*1024,0));
@flush(); @ob_flush();
// usleep(500); // 用于测试,减慢下载速度
}
($fp!=null) && fclose($fp);
}
/** 设置下载速度
* @param int $speed
*/
public function setSpeed($speed){
if(is_numeric($speed) && $speed>16 && $speed<4096){
$this->_speed = $speed;
}
}
/** 获取header range信息
* @param int $file_size 文件大小
* @return Array
*/
private function getRange($file_size){
if(isset($_SERVER['HTTP_RANGE'])){
list($a, $range) = explode("=",$_SERVER['HTTP_RANGE'],2);
list($range) = explode(",",$range,2);
list($start, $range_end) = explode("-", $range);
$start=intval($start);
if(!$range_end) {
$range_end=$file_size-1;
} else {
$range_end=intval($range_end);
}
$range = array('start'=>$start,'end'=>$range_end);
return $range;
}
return null;
}
} // class end
<?php
/** php下载类,支持断点续传
* Date: 2013-06-30
* Author: test
* Ver: 1.0
*
* Func:
* download: 下载文件
* setSpeed: 设置下载速度
* getRange: 获取header中Range
*/
class FileDownload{ // class start
private $_speed = 512; // 下载速度
/** 下载
* @param String $file 要下载的文件路径
* @param String $name 文件名称,为空则与下载的文件名称一样
* @param boolean $reload 是否开启断点续传
*/
public function download($file, $name='',$file_size=0,$dateline=0, $reload=false){
if($name==''){
$name = basename($file);
}
if(!$dateline){
$dataline=TIMESTAMP;
}
if(!$fp = fopen($file, 'rb')){
topshowmessage(lang('file_not_exist1'));
}
$charset = CHARSET;
$db = DB::object();
$db->close();
@ob_end_clean();
if(getglobal('gzipcompress')) @ob_start('ob_gzhandler');
if(!$file_size) $file_size = filesize($file);
$ranges = $this->getRange($file_size);
header('cache-control:public');
header('Date: '.gmdate('D, d M Y H:i:s', $dateline).' GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s', $dateline).' GMT');
header('content-type:application/octet-stream');
if (preg_match("/Firefox/", $_SERVER["HTTP_USER_AGENT"])) {
$attachment = 'attachment; filename*='.$charset.'\'\'' . $name;
} elseif (!preg_match("/Chrome/", $_SERVER["HTTP_USER_AGENT"]) && preg_match("/Safari/", $_SERVER["HTTP_USER_AGENT"])) {
$filename = rawurlencode($name); // 注意rawurlencode与urlencode的区别
$attachment = 'attachment; filename*='.$charset.'\'\'' . $filename;
} else{
$attachment = 'attachment; filename='.$name;
}
//header('content-disposition:attachment; filename='.$name);
header('content-disposition:'.$attachment);
if($reload && $ranges!=null){ // 使用续传
header('HTTP/1.1 206 Partial Content');
header('Accept-Ranges:bytes');
// 剩余长度
header(sprintf('content-length:%u',$ranges['end']-$ranges['start']+1));
// range信息
header(sprintf('content-range:bytes %s-%s/%s', $ranges['start'], $ranges['end'], $file_size));
// fp指针跳到断点位置
fseek($fp, sprintf('%u', $ranges['start']));
}else{
header('HTTP/1.1 200 OK');
header('content-length:'.$file_size);
}
while(!feof($fp)){
echo fread($fp, round($this->_speed*1024,0));
@flush(); @ob_flush();
// usleep(500); // 用于测试,减慢下载速度
}
($fp!=null) && fclose($fp);
}
/** 设置下载速度
* @param int $speed
*/
public function setSpeed($speed){
if(is_numeric($speed) && $speed>16 && $speed<4096){
$this->_speed = $speed;
}
}
/** 获取header range信息
* @param int $file_size 文件大小
* @return Array
*/
private function getRange($file_size){
if(isset($_SERVER['HTTP_RANGE'])){
list($a, $range) = explode("=",$_SERVER['HTTP_RANGE'],2);
list($range) = explode(",",$range,2);
list($start, $range_end) = explode("-", $range);
$start=intval($start);
if(!$range_end) {
$range_end=$file_size-1;
} else {
$range_end=intval($range_end);
}
$range = array('start'=>$start,'end'=>$range_end);
return $range;
}
return null;
}
} // class end
?>

View File

@@ -245,6 +245,11 @@ class image {
$w = ceil($y_ratio * $this->imginfo['width']);
$h = $this->param['thumbheight'];
}
if($w < 242){
$w = $this->param['thumbwidth'] = 242;
$x_ratio = $this->param['thumbwidth'] / $this->imginfo['width'];
$h = ceil($x_ratio*$this->imginfo['height']);
}
}
return array($x, $y, $w, $h);
}
@@ -356,6 +361,10 @@ class image {
}else{
$width=ceil($height*$or);
if($width < 242){
$width = 242;
$height = ceil($width/$or);
}
}
}else{
@@ -364,6 +373,11 @@ class image {
$width=$owidth;
}else{
$height=ceil($width/$or);
$width = ceil($height*$or);
if($width < 242){
$width = 242;
$height = ceil($width/$or);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,432 @@
<?php
if (!defined('IN_OAOOA')) {
exit('Access Denied');
}
class table_pichome_collectlist extends dzz_table
{
public function __construct()
{
$this->_table = 'pichome_collectlist';
$this->_pk = 'id';
$this->_pre_cache_key = 'pichome_collectlist';
$this->_cache_ttl = 3600;
parent::__construct();
}
//添加收藏
public function add_collect($data){
$perm = C::t('pichome_collectuser')->get_perm_by_clid($data['clid']);
if($perm < 2){
return array('error'=>'no_perm');
}
if(empty($data['rid'])) return true;
$existsdata = DB::fetch_all("select rid from %t where rid in(%n) and clid = %d and cid = %d",array($this->_table,$data['rid'],$data['clid'],$data['cid']));
$existsrids = [];
foreach($existsdata as $v){
$existsrids[] = $v['rid'];
}
$totalcount = count($data['rid']);
$data['rid'] = array_diff($data['rid'],$existsrids);
if(empty($data['rid'])) return true;
//记录加入收藏个数
$counti = 0;
$namesarr = [];
foreach(DB::fetch_all("select appid,rid,name from %t where rid in(%n)",array('pichome_resources',$data['rid'])) as $v){
$setarr = [
'rid'=>$v['rid'],
'cid'=>$data['cid'],
'clid'=>$data['clid'],
'uid'=>$data['uid'],
'username'=>$data['username'],
'dateline'=>$data['dateline'],
'appid'=>$v['appid'],
];
$namesarr[] = $v['name'];
if(parent::insert($setarr,1)) $counti += 1;
}
if($counti){
$filenamearr = array_slice($namesarr,0,5);
$filename = implode(',',$filenamearr).'等'.$totalcount.'个文件';
//如果收藏有分类增加该分类下文件数
$position = DB::result_first("select name from %t where clid = %d",array('pichome_collect',$data['clid']));
if($data['cid']){
C::t('pichome_collectcat')->add_filenum_by_cid($data['cid'],$counti);
$pathkey = DB::result_first("select pathkey from %t where cid = %d",array('pichome_collectcat',$data['cid']));
$pathkey = str_replace('_','',$pathkey);
$patharr = explode('-',$pathkey);
foreach(DB::fetch_all("select catname from %t where cid in(%n)",array('pichome_collectcat',$patharr)) as $v){
$position .= '/'.$v['catname'];
}
}
C::t('pichome_collect')->add_filenum_by_clid($data['clid'],$counti);
$enventbodydata = ['username'=>getglobal('username'),'filename'=>$filename,'collectname'=>$position,'rids'=> $data['rid']];
$enventdata = [
'eventbody' =>'collectfile' ,
'uid' => getglobal('uid'),
'username' => getglobal('username'),
'bodydata' => json_encode($enventbodydata),
'clid' =>$data['clid'],
'cid' =>($data['cid']) ? $data['cid']:0,
'do' => 'collect_file',
'do_obj' =>$filename,
'dateline'=>TIMESTAMP
];
C::t('pichome_collectevent')->insert($enventdata);
}
$this->update_collect_thumb($data['clid']);
return true;
}
public function delete($id){
if(!is_array($id)) $id = (array)$id;
if(parent::delete($id)){
//删除对应分享
if(!empty($id))DB::delete('pichome_share','filepath in('.dimplode($id).') and stype = 1');
}
return true;
}
//取消收藏
public function cancle_filecollect($lids,$clid,$cid = 0){
$perm = C::t('pichome_collectuser')->get_perm_by_clid($clid);
if($perm < 2){
return array('error'=>'no_perm');
}
if(!is_array($lids)) $lids = (array)$lids;
if(empty($lids)) return true;
$counti = 0;
$rids = [];
foreach(DB::fetch_all("select rid,id,cid,clid from %t where id in(%n)",array($this->_table,$lids)) as $v){
$rids[] = $v['rid'];
if($this->delete($v['id'])){
$counti += 1;
C::t('pichome_collectcat')->add_filenum_by_cid($v['cid'],-1);
C::t('pichome_collect')->add_filenum_by_clid($v['clid'],-1);
}
}
$position = DB::result_first("select name from %t where clid = %d",array('pichome_collect',$clid));
if($cid){
$pathkey = DB::result_first("select pathkey from %t where cid = %d",array('pichome_collectcat',$cid));
$pathkey = str_replace('_','',$pathkey);
$patharr = explode('-',$pathkey);
foreach(DB::fetch_all("select catname from %t where cid in(%n)",array('pichome_collectcat',$patharr)) as $v){
$position .= '/'.$v['catname'];
}
}
$namesarr = [];
foreach(DB::fetch_all("select name from %t where rid in(%n) limit 0,5",array('pichome_resources',$rids)) as $v){
$namesarr[] = $v['name'];
}
$filename = implode(',',$namesarr).'等'.$counti.'个文件';
$enventbodydata = ['username'=>getglobal('username'),'filename'=>$filename,'collectname'=>$position,'rid'=>$rids];
$enventdata = [
'eventbody' =>'canclecollectfile' ,
'uid' => getglobal('uid'),
'username' => getglobal('username'),
'bodydata' => json_encode($enventbodydata),
'clid' =>$clid,
'cid' =>($cid) ? $cid:0,
'do' => 'cancle_collectfile',
'do_obj' =>$filename,
'dateline'=>TIMESTAMP
];
C::t('pichome_collectevent')->insert($enventdata);
$this->update_collect_thumb($clid);
return true;
}
//更新收藏夹缩略图
public function update_collect_thumb($clid){
$first = false;
$collectdata = C::t('pichome_collect')->fetch($clid);
if(!C::t('pichome_collectlist')->fetch($collectdata['lid'])){
$first = true;
}else{
$first = false;
}
$setarr = [];
if($first){
//取得第一张图
$firstdata = DB::fetch_first("select * from %t where clid = %d order by id asc",array($this->_table,$clid));
if($firstdata){
$icondatas = C::t('pichome_resources')->geticondata_by_rid($firstdata['rid']);
$setarr['covert'] = $icondatas['icondata'];
$setarr['lid'] = $firstdata['id'];
}else{
$setarr['covert'] = '';
$setarr['lid'] = 0;
}
}
//取得最新两张图
$i = 2;
$coverdata = DB::fetch_all("select rid,id from %t where clid = %d order by id desc limit 0,2",array($this->_table,$clid));
$count = count($coverdata);
if($count == 0){
$setarr['covert1'] = '';
$setarr['covert2'] = '';
$setarr['lid1'] = 0;
$setarr['lid2'] = 0;
}elseif($count ==1) {
foreach ($coverdata as $v) {
$icondatas = C::t('pichome_resources')->geticondata_by_rid($v['rid']);
$setarr['covert' . $i] = $icondatas['icondata'];
$setarr['lid' . $i] = $v['id'];
$i--;
}
$setarr['covert2'] = '';
$setarr['lid2'] = 0;
}else{
foreach($coverdata as $v){
$icondatas = C::t('pichome_resources')->geticondata_by_rid($v['rid']);
$setarr['covert'.$i] = $icondatas['icondata'];
$setarr['lid'.$i] = $v['id'];
$i--;
}
}
C::t('pichome_collect')->update($clid,$setarr);
return true;
}
//删除收藏夹所有文件
public function delete_by_clid($clid){
return DB::delete($this->_table,array('clid'=>$clid));
}
//移动文件到某收藏
public function move_collectfile($lids,$oclid,$ocid=0){
if(!is_array($lids)) $lids = (array)$lids;
if(empty($lids)) return true;
$total = count($lids);
$cids = [];
$clid = 0;
$counti = 0;
$rids=[];
foreach(DB::fetch_all("select * from %t where id in(%n)",array('pichome_collectlist',$lids)) as $v){
$cids[] = $v['cid'];
$clid = $v['clid'];
//如果收藏位置相同则不做任何处理
if($v['clid'] == $oclid && $v['cid'] == $ocid){
/* if(parent::delete($v['id'])){
//收藏夹文件数和分类数减1
if($v['cid']) C::t('pichome_collectcat')->add_filenum_by_cid($v['cid'],-1);
if($v['clid'])C::t('pichome_collect')->add_filenum_by_clid($v['clid'],-1);
}*/
continue;
}else{
//如果该收藏文件在目标位置已经存在则删除原收藏位置文件
if($id = DB::result_first("select id from %t where rid = %s and clid = %d and cid = %d",
array($this->_table,$v['rird'],$oclid,$ocid))){
$this->delete($id);
C::t('pichome_collect')->add_filenum_by_clid($clid,-1);
if($v['cid'])C::t('pichome_collectcat')->add_filenum_by_cid($v['cid'],-1);
}else{
$setarr = [
'uid'=>getglobal('uid'),
'username'=>getglobal('username'),
'clid'=>$oclid,
'cid'=>$ocid
];
/* echo $ocid;
print_r($v);die;*/
//更新数据
if(parent::update($v['id'],$setarr)){
//如果移动位置不在一个收藏夹
if($v['clid'] != $oclid){
//增加移入收藏夹文件数
C::t('pichome_collect')->add_filenum_by_clid($oclid,1);
if($v['clid']) C::t('pichome_collect')->add_filenum_by_clid($clid,-1);
}
if($v['cid'])C::t('pichome_collectcat')->add_filenum_by_cid($v['cid'],-1);
$counti++;
//增加移入分类文件数
if($ocid)C::t('pichome_collectcat')->add_filenum_by_cid($ocid,1);
}
}
}
$rids[] = $v['rid'];
}
//如果移动文件位置cid为多个则不记入动态
$cids = array_unique($cids);
if(count($cids) == 1) $cid = $cids[0];
else $cid = 0;
$namesarr = [];
foreach(DB::fetch_all("select name from %t where rid in(%n) limit 0,5",array('pichome_resources',$rids)) as $v){
$namesarr[] = $v['name'];
}
$filename = implode(',',$namesarr).'等'.$total.'个文件';
$oposition = DB::result_first("select name from %t where clid = %d",array('pichome_collect',$oclid));
if($ocid){
$pathkey = DB::result_first("select pathkey from %t where cid = %d",array('pichome_collectcat',$ocid));
$pathkey = str_replace('_','',$pathkey);
$patharr = explode('-',$pathkey);
foreach(DB::fetch_all("select catname from %t where cid in(%n)",array('pichome_collectcat',$patharr)) as $v){
$oposition .= '/'.$v['catname'];
}
}
//更新移出收藏文件数
$position = DB::result_first("select name from %t where clid = %d",array('pichome_collect',$clid));
if($cid){
$pathkey = DB::result_first("select pathkey from %t where cid = %d",array('pichome_collectcat',$cid));
$pathkey = str_replace('_','',$pathkey);
$patharr = explode('-',$pathkey);
foreach(DB::fetch_all("select catname from %t where cid in(%n)",array('pichome_collectcat',$patharr)) as $v){
$position .= '/'.$v['catname'];
}
}
//移入动态
$enventbodydata = ['username'=>getglobal('username'),'filename'=>$filename,'collectname'=>$position,'newcolletname'=>$oposition,'rid'=>$rids];
$enventdata = [
'eventbody' =>'movecollectfileto' ,
'uid' => getglobal('uid'),
'username' => getglobal('username'),
'bodydata' => json_encode($enventbodydata),
'clid' =>$oclid,
'cid' =>($ocid) ? $ocid:0,
'do' => 'move_collectfileto',
'do_obj' =>$filename,
'dateline'=>TIMESTAMP
];
C::t('pichome_collectevent')->insert($enventdata);
//更新移入文件收藏缩略图
if($oclid != $clid) $this->update_collect_thumb($oclid);
//移出动态
$enventbodydata = ['username'=>getglobal('username'),'filename'=>$filename,'collectname'=>$position,'newcolletname'=>$oposition,'rid'=>$rids];
$enventdata = [
'eventbody' =>'delcollectfilefrom' ,
'uid' => getglobal('uid'),
'username' => getglobal('username'),
'bodydata' => json_encode($enventbodydata),
'clid' =>$clid,
'cid' =>($cid) ? $cid:0,
'do' => 'del_collectfilefrom',
'do_obj' =>$filename,
'dateline'=>TIMESTAMP
];
C::t('pichome_collectevent')->insert($enventdata);
//更新移出文件收藏缩略图
if($clid && $oclid != $clid) $this->update_collect_thumb($oclid);
return true;
}
//收藏已收藏文件到指定收藏
public function collect_by_lid($lids,$clid,$cid=0){
$perm = C::t('pichome_collectuser')->get_perm_by_clid($clid);
if($perm < 2){
return array('error'=>'no_perm');
}
if(!is_array($lids)) $lids = (array)$lids;
if(empty($lids)) return true;
$rids = [];
foreach(DB::fetch_all("select rid,id from %t where id in(%n)",array($this->_table,$lids)) as $v){
$rids[] = $v['rid'];
}
$existsrids = [];
foreach(DB::fetch_all("select rid from %t where rid in(%n) and clid = %d and cid = %d",array($this->_table,$rids,$clid,$cid)) as $v){
$existsrids[] = $v['rid'];
}
$totalcount = count($rids);
$insertrids = array_diff($rids,$existsrids);
//记录加入收藏个数
$counti = 0;
$namesarr = [];
foreach(DB::fetch_all("select appid,rid,name from %t where rid in(%n)",array('pichome_resources',$insertrids)) as $v){
$setarr = [
'rid'=>$v['rid'],
'cid'=>$cid,
'clid'=>$clid,
'uid'=>getglobal('uid'),
'username'=>getglobal('username'),
'dateline'=>TIMESTAMP,
'appid'=>$v['appid'],
];
$namesarr[] = $v['name'];
if(parent::insert($setarr,1)) $counti += 1;
}
if($counti){
$filenamearr = array_slice($namesarr,0,5);
$filename = implode(',',$filenamearr).'等'.$totalcount.'个文件';
//如果收藏有分类增加该分类下文件数
$position = DB::result_first("select name from %t where clid = %d",array('pichome_collect',$clid));
if($cid){
C::t('pichome_collectcat')->add_filenum_by_cid($cid,$counti);
$pathkey = DB::result_first("select pathkey from %t where cid = %d",array('pichome_collectcat',$cid));
$pathkey = str_replace('_','',$pathkey);
$patharr = explode('-',$pathkey);
foreach(DB::fetch_all("select catname from %t where cid in(%n)",array('pichome_collectcat',$patharr)) as $v){
$position .= '/'.$v['catname'];
}
}
C::t('pichome_collect')->add_filenum_by_clid($clid,$counti);
$enventbodydata = ['username'=>getglobal('username'),'filename'=>$filename,'collectname'=>$position,'rids'=>$rids];
$enventdata = [
'eventbody' =>'collectfile' ,
'uid' => getglobal('uid'),
'username' => getglobal('username'),
'bodydata' => json_encode($enventbodydata),
'clid' =>$clid,
'cid' =>$cid ? $cid:0,
'do' => 'collect_file',
'do_obj' =>$filename,
'dateline'=>TIMESTAMP
];
C::t('pichome_collectevent')->insert($enventdata);
}
$this->update_collect_thumb($clid);
return true;
}
public function delete_by_rids($rids,$uid,$username){
if(!$rids) $rids = (array)$rids;
if(empty($rids)) return true;
$clids = [];
foreach(DB::fetch_all("select * from %t where rid in(%n)",array($this->_table,$rids)) as $v){
$clids[$v['clid']][] = $v['id'];
}
foreach ($clids as $k=>$val){
$clid = $k;
$counti = 0;
$rids = [];
foreach(DB::fetch_all("select rid,id,cid,clid from %t where id in(%n)",array($this->_table,$val)) as $v){
$rids[] = $v['rid'];
if($this->delete($v['id'])){
$counti += 1;
if($v['cid'])C::t('pichome_collectcat')->add_filenum_by_cid($v['cid'],-1);
if($v['clid'])C::t('pichome_collect')->add_filenum_by_clid($v['clid'],-1);
}
}
$position = DB::result_first("select name from %t where clid = %d",array('pichome_collect',$clid));
$namesarr = [];
foreach(DB::fetch_all("select name from %t where rid in(%n) limit 0,5",array('pichome_resources',$rids)) as $v){
$namesarr[] = $v['name'];
}
$filename = implode(',',$namesarr).'等'.$counti.'个文件';
$enventbodydata = ['username'=>getglobal('username'),'filename'=>$filename,'collectname'=>$position,'rid'=>$rids];
$enventdata = [
'eventbody' =>'canclecollectfile' ,
'uid' => $uid,
'username' => $username,
'bodydata' => json_encode($enventbodydata),
'clid' =>$clid,
'cid' =>0,
'do' => 'cancle_collectfile',
'do_obj' =>$filename,
'dateline'=>TIMESTAMP
];
C::t('pichome_collectevent')->insert($enventdata);
$this->update_collect_thumb($clid);
}
return true;
}
}

View File

@@ -19,6 +19,8 @@
foreach(DB::fetch_all("select fid from %t where appid = %s",array($this->_table,$appid)) as $v){
$fids[] = $v['fid'];
}
$hookdata = ['appid'=>$appid];
Hook::listen("delpichomefolderafter",$hookdata);
return parent::delete($fids);
}
//插入和更新目录数据
@@ -53,6 +55,17 @@
}
return $folderarr;
}
public function insert_data($setarr){
$fid = $setarr['fid'];
if($fname = DB::result_first("select count(*) from %t where fid = %s",array($this->_table,$setarr['fid']))){
unset($setarr['fid']);
parent::update($fid,$setarr);
}else{
parent::insert($setarr);
}
return $fid;
}
//检查目录是否包含密码,多个目录时,只有都包含密码才视为包含密码
public function check_haspasswrod($folderids,$appid){
$haspassword = 0;
@@ -109,7 +122,7 @@
$folderdata = [];
if(!empty($pfid)){
foreach(DB::fetch_all("select fid,fname,pathkey,appid,pfid,filenum as nosubfilenum from %t where appid = %s and pfid in(%n)",array($this->_table,$appid,$pfid)) as $v){
foreach(DB::fetch_all("select fid,fname,pathkey,appid,pfid,filenum as nosubfilenum from %t where appid = %s and pfid in(%n) order by disp asc",array($this->_table,$appid,$pfid)) as $v){
$v['filenum'] = DB::result_first("SELECT count(DISTINCT fr.rid) FROM %t fr
left join %t f on fr.fid = f.fid
where fr.appid = %s and f.pathkey like %s",array('pichome_folderresources','pichome_folder',$appid,$v['pathkey'].'%'));
@@ -118,7 +131,7 @@
}
}else{
foreach(DB::fetch_all("select fid,fname,pathkey,appid,pfid,filenum as nosubfilenum from %t where appid = %s and pfid = ''",array($this->_table,$appid)) as $v){
foreach(DB::fetch_all("select fid,fname,pathkey,appid,pfid,filenum as nosubfilenum from %t where appid = %s and pfid = '' order by disp asc",array($this->_table,$appid)) as $v){
$v['filenum'] = DB::result_first("SELECT count(DISTINCT fr.rid) FROM %t fr
left join %t f on fr.fid = f.fid
where fr.appid = %s and f.pathkey like %s",array('pichome_folderresources','pichome_folder',$appid,$v['pathkey'].'%'));
@@ -150,4 +163,22 @@
return $folderdata;
}
public function createfidbyappid($appid){
$fid = random(13).$appid;
if(DB::result_first("select count(fid) from %t where fid = %s and appid = %s",array($this->_table,$fid,$appid))){
$fid = $this->createfidbyappid($appid);
}
return $fid;
}
public function delete_by_fids($fids){
if(!is_array($fids)) $fids = (array)$fids;
if(!empty($fids)){
DB::delete('pichome_folderresources',"fid in (".dimplode($fids).")");
parent::delete($fids);
return true;
}
}
}

View File

@@ -1,109 +1,160 @@
<?php
if(!defined('IN_OAOOA')) {
exit('Access Denied');
}
class table_pichome_palette extends dzz_table
{
public function __construct()
{
$this->_table = 'pichome_palette';
$this->_pk = 'id';
$this->_pre_cache_key = 'pichome_palette';
$this->_cache_ttl = 3600;
parent::__construct();
}
//根据appid删除目录
public function delete_by_appid($appid){
$ids = [];
foreach(DB::fetch_all("select id from %t where appid = %s",array($this->_table,$appid)) as $v){
$ids[] = $v['id'];
}
return parent::delete($ids);
}
public function delete_by_rid($rid){
if(!is_array($rid)) $rid = (array) $rid;
$delids = [];
foreach (DB::fetch_all("select id from %t where rid in(%n)",array($this->_table,$rid)) as $v){
$delids[] = $v['id'];
}
return parent::delete($delids);
}
public function fetch_rid_by_color($color,$persion=0,$appid='',$limit=6,$rid=''){
//设定基础相似度为80%,当精度调整时相似度根据精度数值相应增加调整范围为0-100,实际计算用20的差异量进行转换
$similarity = 90+(10/100)*$persion;
//此值为rgb(0,0,0)与rgb(255,255,255)最大色差值,用以计算相似度的被除数
$maxColDist = 764.8339663572415;
//获取颜色的rgb,该操作为十六进制转换为rgb
$rgbcolor = $this->hex2rgb($color);
//色差计算公式为sqrt((2 + $rmean / 256) * (pow($r, 2)) + 4 * (pow($g, 2)) + (2 + (255 - $rmean) / 256) * (pow($b, 2)))
//公式中rgb值为连个rgb的差值$rmean为r值之和的二分之一
if($appid){
$sql = 'select distinct p.rid from %t p left join %t r on p.rid = r.rid';
$wheresql = " r.appid = %s and p.rid != %s
and round((%d-sqrt((((2+(p.r+%d)/2)/256)*(pow((%d-p.r),2))+(4*pow((%d-p.g),2)) + (((2+(255-(p.r+%d)/2))/256))*(pow((%d-p.b), 2)))))/%d,4)*100 >= %d ";
$ordersql = ' order by round((%d-sqrt((((2+(p.r+%d)/2)/256)*(pow((%d-p.r),2))+(4*pow((%d-p.g),2)) + (((2+(255-(p.r+%d)/2))/256))*(pow((%d-p.b), 2)))))/%d,4)*100*weight ';
$params = array($this->_table,'pichome_resources',$appid,$rid,$maxColDist,$rgbcolor['r'],$rgbcolor['r'],$rgbcolor['g'],$rgbcolor['r'],$rgbcolor['b'],$maxColDist,$similarity,
$maxColDist,$rgbcolor['r'],$rgbcolor['r'],$rgbcolor['g'],$rgbcolor['r'],$rgbcolor['b'],$maxColDist,$similarity);
}else{
$sql = 'select distinct rid from %t ';
$wheresql = " rid != %s
and round((%d-sqrt((((2+(r+%d)/2)/256)*(pow((%d-r),2))+(4*pow((%d-g),2)) + (((2+(255-(r+%d)/2))/256))*(pow((%d-b), 2)))))/%d,4)*100 >= %d ";
$params = array($this->_table,$rid,$maxColDist,$rgbcolor['r'],$rgbcolor['r'],$rgbcolor['g'],$rgbcolor['r'],$rgbcolor['b'],$maxColDist,$similarity,
$maxColDist,$rgbcolor['r'],$rgbcolor['r'],$rgbcolor['g'],$rgbcolor['r'],$rgbcolor['b'],$maxColDist,$similarity);
}
$riddata = DB::fetch_all("$sql where $wheresql $ordersql desc limit 0,$limit ",$params);
$rids= [];
foreach ($riddata as $v){
$rids[] = $v['rid'];
}
return $rids;
}
//转换十六进制颜色为rgb
public function hex2rgb($hexColor){
$color=str_replace('#','',$hexColor);
if (strlen($color)> 3){
$rgb=array(
'r'=>hexdec(substr($color,0,2)),
'g'=>hexdec(substr($color,2,2)),
'b'=>hexdec(substr($color,4,2))
);
}else{
$r=substr($color,0,1). substr($color,0,1);
$g=substr($color,1,1). substr($color,1,1);
$b=substr($color,2,1). substr($color,2,1);
$rgb=array(
'r'=>hexdec($r),
'g'=>hexdec($g),
'b'=>hexdec($b)
);
}
return $rgb;
}
public function fetch_colordata_by_rid($rid){
$data = [];
foreach(DB::fetch_all("select color,weight from %t where rid = %s",array($this->_table,$rid)) as $v){
$weight = $v['weight']*100;
$data[$weight] = dechex($v['color']);
}
krsort($data);
return $data;
}
/*
*$colors 该参数需带权重,以键为权重值,此处查询优先权重最大的查询近似颜色值
* ***/
public function fetch_rids_by_clolos($colors,$limit=6){
$rids = [];
//此处颜色值按权重顺序,优先寻找权重最大的,如果权重最大的得到足够数据,则不再查找其它颜色相似数据
foreach($colors as $k=>$v){
foreach($this->fetch_rid_by_color($v) as $v){
$rids[] = $v;
}
if(count($rids) >= $limit) break;
}
return $rids;
}
<?php
if(!defined('IN_OAOOA')) {
exit('Access Denied');
}
class table_pichome_palette extends dzz_table
{
public function __construct()
{
$this->_table = 'pichome_palette';
$this->_pk = 'id';
$this->_pre_cache_key = 'pichome_palette';
$this->_cache_ttl = 3600;
parent::__construct();
}
//根据appid删除目录
public function delete_by_appid($appid){
$ids = [];
foreach(DB::fetch_all("select id from %t where appid = %s",array($this->_table,$appid)) as $v){
$ids[] = $v['id'];
}
return parent::delete($ids);
}
public function delete_by_rid($rid){
if(!is_array($rid)) $rid = (array) $rid;
$delids = [];
foreach (DB::fetch_all("select id from %t where rid in(%n)",array($this->_table,$rid)) as $v){
$delids[] = $v['id'];
}
return parent::delete($delids);
}
public function fetch_rid_by_color($color,$persion=0,$appid='',$limit=6,$rid=''){
//设定基础相似度为80%,当精度调整时相似度根据精度数值相应增加调整范围为0-100,实际计算用20的差异量进行转换
$similarity = 90+(10/100)*$persion;
//此值为rgb(0,0,0)与rgb(255,255,255)最大色差值,用以计算相似度的被除数
$maxColDist = 764.8339663572415;
//获取颜色的rgb,该操作为十六进制转换为rgb
$rgbcolor = $this->hex2rgb($color);
//色差计算公式为sqrt((2 + $rmean / 256) * (pow($r, 2)) + 4 * (pow($g, 2)) + (2 + (255 - $rmean) / 256) * (pow($b, 2)))
//公式中rgb值为连个rgb的差值$rmean为r值之和的二分之一
if($appid){
$sql = 'select distinct p.rid from %t p left join %t r on p.rid = r.rid';
$wheresql = " r.appid = %s and p.rid != %s
and round((%d-sqrt((((2+(p.r+%d)/2)/256)*(pow((%d-p.r),2))+(4*pow((%d-p.g),2)) + (((2+(255-(p.r+%d)/2))/256))*(pow((%d-p.b), 2)))))/%d,4)*100 >= %d ";
$ordersql = ' order by round((%d-sqrt((((2+(p.r+%d)/2)/256)*(pow((%d-p.r),2))+(4*pow((%d-p.g),2)) + (((2+(255-(p.r+%d)/2))/256))*(pow((%d-p.b), 2)))))/%d,4)*100*weight ';
$params = array($this->_table,'pichome_resources',$appid,$rid,$maxColDist,$rgbcolor['r'],$rgbcolor['r'],$rgbcolor['g'],$rgbcolor['r'],$rgbcolor['b'],$maxColDist,$similarity,
$maxColDist,$rgbcolor['r'],$rgbcolor['r'],$rgbcolor['g'],$rgbcolor['r'],$rgbcolor['b'],$maxColDist,$similarity);
}else{
$sql = 'select distinct rid from %t ';
$wheresql = " rid != %s
and round((%d-sqrt((((2+(r+%d)/2)/256)*(pow((%d-r),2))+(4*pow((%d-g),2)) + (((2+(255-(r+%d)/2))/256))*(pow((%d-b), 2)))))/%d,4)*100 >= %d ";
$params = array($this->_table,$rid,$maxColDist,$rgbcolor['r'],$rgbcolor['r'],$rgbcolor['g'],$rgbcolor['r'],$rgbcolor['b'],$maxColDist,$similarity,
$maxColDist,$rgbcolor['r'],$rgbcolor['r'],$rgbcolor['g'],$rgbcolor['r'],$rgbcolor['b'],$maxColDist,$similarity);
}
$riddata = DB::fetch_all("$sql where $wheresql $ordersql desc limit 0,$limit ",$params);
$rids= [];
foreach ($riddata as $v){
$rids[] = $v['rid'];
}
return $rids;
}
//转换十六进制颜色为rgb
public function hex2rgb($hexColor){
$color=str_replace('#','',$hexColor);
if (strlen($color)> 3){
$rgb=array(
'r'=>hexdec(substr($color,0,2)),
'g'=>hexdec(substr($color,2,2)),
'b'=>hexdec(substr($color,4,2))
);
}else{
$r=substr($color,0,1). substr($color,0,1);
$g=substr($color,1,1). substr($color,1,1);
$b=substr($color,2,1). substr($color,2,1);
$rgb=array(
'r'=>hexdec($r),
'g'=>hexdec($g),
'b'=>hexdec($b)
);
}
return $rgb;
}
function RGBToHex($rgb){
$regexp = "/^rgb\(([0-9]{0,3})\,\s*([0-9]{0,3})\,\s*([0-9]{0,3})\)/";
$re = preg_match($regexp, $rgb, $match);
$re = array_shift($match);
$hexColor = "";
$hex = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F');
for ($i = 0; $i < 3; $i++) {
$r = null;
$c = $match[$i];
$hexAr = array();
while ($c > 16) {
$r = $c % 16;
$c = ($c / 16) >> 0;
array_push($hexAr, $hex[$r]);
}
array_push($hexAr, $hex[$c]);
$ret = array_reverse($hexAr);
$item = implode('', $ret);
$item = str_pad($item, 2, '0', STR_PAD_LEFT);
$hexColor .= $item;
}
return $hexColor;
}
public function fetch_colordata_by_rid($rid){
$data = [];
foreach(DB::fetch_all("select r,g,b,weight from %t where rid = %s",array($this->_table,$rid)) as $v){
$rgbdata = 'rgb('.$v['r'].','.$v['g'].','.$v['b'].')';
$weight = $v['weight']*100;
$v['color'] = $this->RGBToHex($rgbdata);
$data[] = ['color'=>$v['color'],'weight'=>$weight];
}
$distance = [];
$colordata = [];
foreach($data as $v){
$distance[] = $v['weight'];
}
array_multisort($distance, SORT_DESC, $data);
foreach($data as $v){
$colordata[] = $v['color'];
}
return $colordata;
}
/*
*$colors 该参数需带权重,以键为权重值,此处查询优先权重最大的查询近似颜色值
* ***/
public function fetch_rids_by_clolos($colors,$limit=6){
$rids = [];
//此处颜色值按权重顺序,优先寻找权重最大的,如果权重最大的得到足够数据,则不再查找其它颜色相似数据
foreach($colors as $k=>$v){
foreach($this->fetch_rid_by_color($v) as $v){
$rids[] = $v;
}
if(count($rids) >= $limit) break;
}
return $rids;
}
}

View File

@@ -29,12 +29,13 @@ class table_pichome_resources extends dzz_table
public function delete_by_appid($appid)
{
$data = C::t('pichome_vapp')->fetch($appid);
//$i = 0;
$rids = [];
foreach (DB::fetch_all("select rid from %t where appid = %s limit 0,1000", array($this->_table, $appid)) as $v) {
foreach (DB::fetch_all("select rid from %t where appid = %s limit 0,100", array($this->_table, $appid)) as $v) {
$rids[] = $v['rid'];
}
if ($rids) $this->delete_by_rid($rids);
if ($rids) $this->delete_by_rid($rids, $data['deluid'], $data['delusername']);
//return $i;
}
@@ -44,7 +45,7 @@ class table_pichome_resources extends dzz_table
return DB::result_first("select * from %t where path = %s", array($this->_table, $path));
}
public function delete_by_rid($rids)
public function delete_by_rid($rids, $uid = 0, $username = '')
{
if (!is_array($rids)) $rids = (array)$rids;
C::t('pichome_resources_attr')->delete_by_rid($rids);
@@ -55,9 +56,13 @@ class table_pichome_resources extends dzz_table
C::t('pichome_share')->delete_by_rid($rids);
C::t('pichome_ffmpeg_record')->delete($rids);
C::t('pichome_imagickrecord')->delete($rids);
$deldata = ['rids' => $rids, 'deluid' => $uid, 'delusername' => $username];
Hook::listen('pichomedatadeleteafter', $deldata);
return $this->delete($rids);
}
public function fetch_by_rids($rids)
{
global $Opentype;
@@ -70,7 +75,7 @@ class table_pichome_resources extends dzz_table
$v['dateline'] = dgmdate(round($v['dateline'] / 1000), 'Y/m/d H:i');
$v['name'] = str_replace(strrchr($v['name'], "."), "", $v['name']);
$v['btime'] = dgmdate(round($v['btime'] / 1000), 'Y/m/d H:i');
$v['dpath'] = dzzencode($v['rid'], '', 0,0);
$v['dpath'] = dzzencode($v['rid'], '', 0, 0);
if (in_array($v['ext'], $Opentype['video'])) {
$v['opentype'] = 'video';
} elseif (in_array($v['ext'], $Opentype['text'])) {
@@ -107,16 +112,18 @@ class table_pichome_resources extends dzz_table
return $datas;
}
//获取数据后端使用
public function fetch_data_by_rid($rid){
public function fetch_data_by_rid($rid)
{
if (!$resourcesdata = parent::fetch($rid)) return array();
if ($resourcesdata['isdelete'] > 0) return array();
$downshare = C::t('pichome_vapp')->fetch_all_sharedownlod();
if($downshare[$resourcesdata['appid']]['isdelete']) return array();
if ($downshare[$resourcesdata['appid']]['isdelete']) return array();
$attrdata = C::t('pichome_resources_attr')->fetch($rid);
$resourcesdata = array_merge($resourcesdata, $attrdata);
$resourcesdata['realpath'] =$downshare[$resourcesdata['appid']]['path'] . BS . $resourcesdata['path'];
$resourcesdata['realpath'] = $downshare[$resourcesdata['appid']]['path'] . BS . $resourcesdata['path'];
return $resourcesdata;
}
@@ -128,6 +135,7 @@ class table_pichome_resources extends dzz_table
//获取所有库分享和下载权限
$downshare = C::t('pichome_vapp')->fetch_all_sharedownlod();
$attrdata = C::t('pichome_resources_attr')->fetch($rid);
if ($attrdata['desc']) $attrdata['desc'] = strip_tags($attrdata['desc']);
$resourcesdata = array_merge($resourcesdata, $attrdata);
$resourcesdata['colors'] = C::t('pichome_palette')->fetch_colordata_by_rid($rid);
$resourcesdata['ext'] = strtolower($resourcesdata['ext']);
@@ -142,77 +150,38 @@ class table_pichome_resources extends dzz_table
} else {
$resourcesdata['opentype'] = 'other';
}
if ($resourcesdata['hasthumb']) {
//如果是本地文件
if ($resourcesdata['apptype'] == 1) {
$filename = 'pichomethumb'.BS . $resourcesdata['appid'] . BS . md5($resourcesdata['path']) . '.jpg';
$resourcesdata['icondata'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($rid, '', 0, 0);
$thumbpath = getglobal('setting/attachurl') . $filename;
//echo $thumbpath;die;
$resourcesdata['icondata'] = str_replace('+', '%20', urlencode($thumbpath));
}
else {
$resourcesdata['path'] = str_replace('\\','/',$resourcesdata['path']);
$filepath = dirname($resourcesdata['path']);
$filename = substr($resourcesdata['path'], strrpos($resourcesdata['path'], '/') + 1);
$filename = str_replace(strrchr($filename, "."), "", $filename);
$filepath = str_replace('/',BS,$filepath);
if ($downshare[$resourcesdata['appid']]['iswebsitefile']) {
$tmppath = str_replace(DZZ_ROOT, '', $downshare[$resourcesdata['appid']]['path']);
$thumbpath = $tmppath . BS . $filepath . BS . $filename . '_thumbnail.png';
$resourcesdata['icondata'] = str_replace('+', '%20', urlencode($thumbpath));
} else {
$tmppath = $downshare[$resourcesdata['appid']]['path'];
$thumbpath = $tmppath . BS . $filepath . BS . $filename . '_thumbnail.png';
$resourcesdata['icondata'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($thumbpath,'',0,0);
}
//$thumbpath = 'library/' . $filepath . '/' . $filename . '_thumbnail.png';
//$resourcesdata['icondata'] = $thumbpath;
}
//}
} else {
if ($resourcesdata['type'] == 'commonimage') {
if ($downshare[$resourcesdata['appid']]['iswebsitefile']) {
$tmppath = str_replace(DZZ_ROOT, '', $downshare[$resourcesdata['appid']]['path']);
$thumbpath = $tmppath . BS . $resourcesdata['path'];
$thumbpath = str_replace(BS,'/',$thumbpath);
$resourcesdata['icondata'] = str_replace('+', '%20', urlencode($thumbpath));
} else {
$tmppath = $downshare[$resourcesdata['appid']]['path'];
$resourcesdata['icondata'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($tmppath,'',0,0);
}
} else {
$resourcesdata['icondata'] = geticonfromext($resourcesdata['ext'], $resourcesdata['type']);
}
}
$thumbwidth = getglobal('config/pichomethumbwidth') ? getglobal('config/pichomethumbwidth') : 900;
$thumbheight = getglobal('config/pichomethumbheight') ? getglobal('config/pichomethumbheight') : 900;
$thumsizearr = $this->getImageThumbsize($resourcesdata['width'], $resourcesdata['height'], $thumbwidth, $thumbheight);
$resourcesdata['iconwidth'] = $thumsizearr[0];
$resourcesdata['iconheight'] = $thumsizearr[1];
//echo $resourcesdata['icondata'];die;
$imginfo = @getimagesize($resourcesdata['icondata']);
$resourcesdata['iconwidth'] = $imginfo[0] ? $imginfo[0]:$resourcesdata['width'];
$resourcesdata['iconheight'] = $imginfo[1] ? $imginfo[1]:$resourcesdata['height'];
//$imginfo = @getimagesize($resourcesdata['icondata']);
// $resourcesdata['iconwidth'] = $imginfo[0] ? $imginfo[0] : $resourcesdata['width'];
//$resourcesdata['iconheight'] = $imginfo[1] ? $imginfo[1] : $resourcesdata['height'];
$resourcesdata['icondata'] = str_replace('+', '%20', $resourcesdata['icondata']);
$resourcesdata['share'] = $downshare[$resourcesdata['appid']]['share'];
$resourcesdata['download'] = $downshare[$resourcesdata['appid']]['download'];
if ($downshare[$resourcesdata['appid']]['iswebsitefile']){
$originalimg= str_replace(DZZ_ROOT,'',$downshare[$resourcesdata['appid']]['path'] . BS . $resourcesdata['path']);
$originalimg = str_replace(BS,'/',$originalimg);
$resourcesdata['originalimg'] = str_replace('+', '%20', urlencode($originalimg));
$resourcesdata['realpath'] =str_replace('+', '%20', urlencode($originalimg));
}else{
$originalimg = $downshare[$resourcesdata['appid']]['path'] . BS . $resourcesdata['path'];
$resourcesdata['originalimg'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($originalimg,'',0,0);
if(in_array($resourcesdata['opentype'],array('text','video','pdf'))){
$resourcesdata['realpath'] = str_replace('+','',urlencode(getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($originalimg,'',0,0)));
}else{
$resourcesdata['realpath'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($originalimg,'',0,0);
}
/* if ($downshare[$resourcesdata['appid']]['iswebsitefile']) {
$originalimg = str_replace(DZZ_ROOT, '', $downshare[$resourcesdata['appid']]['path'] . BS . $resourcesdata['path']);
$originalimg = str_replace(BS, '/', $originalimg);
$resourcesdata['originalimg'] = str_replace('+', '%20', urlencode($originalimg));
$resourcesdata['realpath'] = str_replace('+', '%20', urlencode($originalimg));
} else {*/
$originalimg = $downshare[$resourcesdata['appid']]['path'] . BS . $resourcesdata['path'];
$resourcesdata['originalimg'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&fpath=' . dzzencode($originalimg, '', 0, 0);
if (in_array($resourcesdata['opentype'], array('text', 'video', 'pdf'))) {
$resourcesdata['realpath'] = str_replace('+', '', urlencode(getglobal('siteurl') . 'index.php?mod=io&op=getImg&fpath=' . dzzencode($originalimg, '', 0, 0)));
} else {
$resourcesdata['realpath'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&fpath=' . dzzencode($originalimg, '', 0, 0);
}
//}
$resourcesdata['name'] = str_replace(strrchr($resourcesdata['name'], "."), "", $resourcesdata['name']);
$resourcesdata['fsize'] = formatsize($resourcesdata['size']);
$resourcesdata['mtime'] = dgmdate(round($resourcesdata['mtime'] / 1000), 'Y/m/d H:i');
@@ -221,8 +190,8 @@ class table_pichome_resources extends dzz_table
unset($resourcesdata['path']);
$resourcesdata['foldernames'] = C::t('pichome_folderresources')->get_foldername_by_rid($rid);
$resourcesdata['tag'] = C::t('pichome_resourcestag')->fetch_tag_by_rid($rid);
$resourcesdata['dpath'] = dzzencode($rid, '', 0,0);
//print_r($resourcesdata);die;
$resourcesdata['dpath'] = dzzencode($rid, '', 0, 0);
return $resourcesdata;
}
@@ -243,55 +212,16 @@ class table_pichome_resources extends dzz_table
$v['annonationnum'] = $annonationnumdata[$v['rid']]['num'];
$v['share'] = $downshare[$v['appid']]['share'];
$v['download'] = $downshare[$v['appid']]['download'];
if ($v['hasthumb']) {
//如果是本地文件
if ($v['apptype'] == 1) {
$filename = 'pichomethumb'.BS . $v['appid'] . BS . md5($v['path']) . '.jpg';
$thumbpath = getglobal('setting/attachurl') . $filename;
$v['icondata'] = str_replace('+', '%20', urlencode($thumbpath));
} else {
$v['path'] = str_replace('\\','/',$v['path']);
$filepath = dirname($v['path']);
$filename = substr($v['path'], strrpos($v['path'], '/') + 1);
$filepath = str_replace('/',BS,$filepath);
$filename = str_replace(strrchr($filename, "."), "", $filename);
$filepath = str_replace('/',BS,$filepath);
if ($downshare[$v['appid']]['iswebsitefile']) {
$tmppath = str_replace(DZZ_ROOT, '', $downshare[$v['appid']]['path']);
$thumbpath = $tmppath . BS . $filepath . BS . $filename . '_thumbnail.png';
$v['icondata'] = str_replace('+', '%20', urlencode($thumbpath));
} else {
$tmppath = $downshare[$v['appid']]['path'];
$thumbpath = $tmppath . BS . $filepath .BS . $filename . '_thumbnail.png';
$v['icondata'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($thumbpath);
}
}
$v['icondata'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($v['rid'], '', 0, 0);
$thumbwidth = getglobal('config/pichomethumbwidth') ? getglobal('config/pichomethumbwidth') : 900;
$thumbheight = getglobal('config/pichomethumbheight') ? getglobal('config/pichomethumbheight') : 900;
$thumsizearr = $this->getImageThumbsize($v['width'], $v['height'], $thumbwidth, $thumbheight);
$v['thumbwidth'] = $thumsizearr[0];
$v['thumbheight'] = $thumsizearr[1];
} else {
if ($v['type'] == 'commonimage') {
if ($downshare[$v['appid']]['iswebsitefile']) {
$tmppath = str_replace(DZZ_ROOT, '', $downshare[$v['appid']]['path']);
$v['icondata'] = str_replace('+', '%20', urlencode($tmppath . '/' . $v['path']));
} else {
$tmppath = $downshare[$v['appid']]['path'] . BS . $v['path'];
$v['icondata'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($tmppath,'',0,0);
}
} else {
$v['icondata'] = geticonfromext($v['ext'], $v['type']);
$v['width'] = 128;
$v['height'] = 128;
}
}
//文件真实地址
if ($downshare[$v['appid']]['iswebsitefile']){
$originalimg= str_replace(DZZ_ROOT,'',$downshare[$v['appid']]['path'] . BS . $v['path']);
$originalimg = str_replace(BS,'/',$originalimg);
$v['realpath'] =str_replace('+', '%20', urlencode($originalimg));
}else{
$originalimg = $downshare[$v['appid']]['path'] . BS . $v['path'];
$v['realpath'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($originalimg,'',0,0);
}
$originalimg = $downshare[$v['appid']]['path'] . BS . $v['path'];
$v['realpath'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&fpath=' . dzzencode($originalimg, '', 0, 0);
unset($v['path']);
@@ -299,53 +229,58 @@ class table_pichome_resources extends dzz_table
}
return $returndata;
}
public function geticondata_by_rid($rid){
$resourcesdata = DB::fetch_first("select r.rid,r.appid,r.hasthumb,r.ext,r.type,ra.path as fpath,
v.path,r.apptype,v.iswebsitefile from %t r
left join %t ra on r.rid=ra.rid left join %t v on r.appid = v.appid where r.rid = %s and r.isdelete = 0",
array($this->_table,'pichome_resources_attr','pichome_vapp',$rid));
if ($resourcesdata['hasthumb']) {
//如果是本地文件
if ($resourcesdata['apptype'] == 1) {
$filename = 'pichomethumb'.BS . $resourcesdata['appid'] . BS. md5($resourcesdata['fpath']) . '.jpg';
$thumbpath = getglobal('setting/attachurl') . $filename;
$resourcesdata['icondata'] = str_replace('+', '%20', urlencode($thumbpath));
}
else {
$resourcesdata['fpath'] = str_replace('\\','/',$resourcesdata['fpath']);
$filepath = dirname($resourcesdata['fpath']);
$filename = substr($resourcesdata['fpath'], strrpos($resourcesdata['fpath'], '/') + 1);
$filename = str_replace(strrchr($filename, "."), "", $filename);
$filepath = str_replace('/',BS,$filepath);
if ($resourcesdata['iswebsitefile']) {
$tmppath = str_replace(DZZ_ROOT, '', $resourcesdata['path']);
$thumbpath = $tmppath . BS . $filepath . BS. $filename . '_thumbnail.png';
$resourcesdata['icondata'] = str_replace('+', '%20', urlencode($thumbpath));
public function getImageThumbsize($owidth, $oheight, $width, $height)
{
if ($owidth > $width || $oheight > $height) {
$or = $owidth / $oheight;
$r = $width / $height;
if ($r > $or) {
if ($oheight < $height) {
$height = $oheight;
$width = $owidth;
} else {
$tmppath = $resourcesdata['path'];
$thumbpath = $tmppath . BS . $filepath . BS . $filename . '_thumbnail.png';
$resourcesdata['icondata'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($thumbpath,'',0,0);
}
}
} else {
if ($resourcesdata['type'] == 'commonimage') {
if ($resourcesdata['iswebsitefile']) {
$tmppath = str_replace(DZZ_ROOT, '', $resourcesdata['path']);
$thumbpath = $tmppath . BS . $resourcesdata['fpath'];
$thumbpath = str_replace(BS,'/',$thumbpath);
$resourcesdata['icondata'] = str_replace('+', '%20', urlencode($thumbpath));
} else {
$tmppath = $resourcesdata['path'];
$resourcesdata['icondata'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($tmppath,'',0,0);
$width = ceil($height * $or);
if ($width < 242) {
$width = 242;
$height = ceil($width / $or);
}
}
} else {
$resourcesdata['icondata'] = geticonfromext($resourcesdata['ext'], $resourcesdata['type']);
if ($owidth < $width) {
$height = $oheight;
$width = $owidth;
} else {
$height = ceil($width / $or);
$width = ceil($height * $or);
if ($width < 242) {
$width = 242;
$height = ceil($width / $or);
}
}
}
} else {
$width = $owidth;
$height = $oheight;
}
//Return the results
return array($width, $height);
}
public function geticondata_by_rid($rid)
{
$resourcesdata = DB::fetch_first("select r.rid,r.appid,r.hasthumb,r.ext,r.type,ra.path as fpath,
v.path,r.apptype,v.iswebsitefile,v.version from %t r
left join %t ra on r.rid=ra.rid left join %t v on r.appid = v.appid where r.rid = %s and r.isdelete = 0",
array($this->_table, 'pichome_resources_attr', 'pichome_vapp', $rid));
$resourcesdata['icondata'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($rid, '', 0, 0);
return $resourcesdata;
}
public function fetch_like_words($keyword, $limit = 10)
{
$likewords = [];

View File

@@ -55,11 +55,13 @@
{
if(!is_array($rid)) $rid = (array)$rid;
$delids = [];
foreach (DB::fetch_all("select id from %t where rid in(%n)", array($this->_table, $rid)) as $v) {
foreach (DB::fetch_all("select id,tid from %t where rid in(%n)", array($this->_table, $rid)) as $v) {
$delids[] = $v['id'];
C::t('pichome_tag')->delete_by_tid($v['tid']);
}
return parent::delete($delids);
}
public function fetch_rids_by_tids($tids,$appid,$limit=6,$rid=''){
if(!is_array($tids)) $tids = (array) $tids;

View File

@@ -26,4 +26,13 @@
public function fetch_cid_by_gid($gid,$appid){
return DB::result_first("select cid from %t where gid = %d and appid = %s",array($this->_table,$gid,$appid));
}
public function insertdata($setarr){
if($id=DB::result_first("select id from %t where tid = %d and appid = %s",array($this->_table,$setarr['tid'],$setarr['appid']))){
parent::update($id,$setarr);
}else{
parent::insert($setarr);
}
return true;
}
}

View File

@@ -48,12 +48,7 @@
}
public function insert($setarr){
//如果为oaooa库时
if($setarr['type'] == 2){
$setarr['path'] =$setarr['did'].'_'.$setarr['kuid'].'_'.$setarr['fid'];
$path = md5($setarr['path']);
}else{
$path = $setarr['path'];
}
$path = $setarr['path'];
if($appid = DB::result_first("select appid from %t where path = %s and isdelete = 0",array($this->_table,$setarr['path']))){
parent::update($appid,$setarr);
return $appid;
@@ -84,6 +79,7 @@
//删除虚拟应用
public function delete_vapp_by_appid($appid){
$appdata = parent::fetch($appid);
//删除文件表数据
C::t('pichome_resources')->delete_by_appid($appid);
//删除目录表数据
@@ -103,6 +99,10 @@
if(is_dir(getglobal('setting/attachdir').'pichomethumb/'.$appid)){
removedirectory(getglobal('setting/attachdir').'pichomethumb/'.$appid);
}
if($appdata['type'] !== 1){
$hookdata = ['appid'=>$appid,'apptype'=>$appdata['type']];
Hook::listen('pichomevappdelete',$hookdata);
}
return parent::delete($appid);
}
@@ -115,4 +115,20 @@
}
return $downshare;
}
public function add_getinfonum_by_appid($appid,$ceof = 1){
$appdata = C::t('pichome_vapp')->fetch($appid);
if($ceof < 0){
if($appdata['getinfonum'] == 0) return true;
elseif($appdata['getinfonum'] < abs($ceof))$ceof = -$appdata['getinfonum'];
}
if ($ceof > 0) {
DB::query("update %t set getinfonum=getinfonum+%d where appid = %s", array($this->_table, $ceof, $appid));
} else {
DB::query("update %t set getinfonum=getinfonum-%d where appid = %s", array($this->_table, abs($ceof), $appid));
}
$this->clear_cache($appid);
}
}

View File

@@ -11,8 +11,8 @@ if(!defined('IN_OAOOA')) {
}
if(!defined('CORE_VERSION')) {
define('CORE_VERSION', 'beta3.0');
define('CORE_VERSION', 'beta3.3');
define('CORE_VERSION_LEVEL', 'Pichome');
define('CORE_RELEASE', '20211208');
define('CORE_FIXBUG' , '03000000');
define('CORE_RELEASE', '20220224');
define('CORE_FIXBUG' , '03300000');
}

View File

@@ -6,9 +6,9 @@
@set_time_limit(0);
$appdata = DB::fetch_all("select * from %t where isdelete = 0 ",array('pichome_vapp'));
foreach($appdata as $v){
if($v['state'] == 1){
if($v['state'] == 2){
dfsockopen(getglobal('localurl'). 'index.php?mod=pichome&op=exportfile&appid='.$v['appid'],0, '', '', false, '', 1);
}elseif($v['state'] == 2){
}elseif($v['state'] == 3){
dfsockopen(getglobal('localurl'). 'index.php?mod=pichome&op=exportfilecheck&appid='.$v['appid'],0, '', '', false, '', 1);
}

View File

@@ -0,0 +1,852 @@
<?php
if (!defined('IN_OAOOA')) {
exit('Access Denied');
}
@set_time_limit(0);
@ini_set('max_execution_time', 0);
require_once(DZZ_ROOT . './dzz/class/class_encode.php');
require_once libfile('function/user', '', 'user');
use \core as C;
use \DB as DB;
use \IO as IO;
use \ImagePalette as ImagePalette;
use \Color as Color;
class billfishxport
{
public $palette = array(
0x111111, 0xFFFFFF, 0x9E9E9E, 0xA48057, 0xFC85B3, 0xFF2727, 0xFFA34B, 0xFFD534, 0x47C595, 0x51C4C4, 0x2B76E7, 0x6D50ED
);
private $path = '';//待执行数据path
private $appid = 0;//库id
private $uid = 0;//用户id
private $username = null;//用户名
private $filenum = 0;//总文件数
private $checklimit = 1000;
private $onceexportnum = 100;
private $getinfonum = 0;
private $readtxt = DZZ_ROOT . './data/attachment/cache/';
private $exportstatus = 0;
private $donum = 0;
private $lastid = '';
private $charset = 'UTF-8';
private $version = '';
private $notallowext = '';
private $db = null;
public function __construct($data = array())
{
global $Defaultallowext;
//获取导入记录表基本数据
$this->path = $data['path'];
$this->appid = $data['appid'];
$this->uid = $data['uid'];
$this->username = $data['username'];
$this->exportstatus = $data['state'];
$this->donum = $data['donum'];
$this->filenum = $data['filenum'];
$this->lastid = $data['lastid'];
$this->version = $data['version'];
if ($data['charset']) $this->charset = $data['charset'];
//尝试连接数据库
$connect = $this->connect_db();
if (!is_object($connect)) {
return $connect;
} else {
$this->db = $connect;
}
}
public function connect_db()
{
$dsn = 'sqlite:' . $this->path . BS . '.bf' . BS . 'billfish.db';
try {
return new PDO($dsn);
} catch (PDOException $e) {
return array('error' => $e->getMessage());
}
}
public function fetch($sql)
{
$q = $this->db->query($sql);
$rows = $q->fetch(PDO::FETCH_ASSOC);
return $rows;
}
public function fetch_all($sql)
{
$q = $this->db->query($sql);
$rows = $q->fetchAll(PDO::FETCH_ASSOC);
return $rows;
}
public function initExport()
{
//修改导入状态为1
$versionsql = " SELECT version from library where 1";
$versions = $this->fetch($versionsql);
$this->version = $versions['version'];
C::t('pichome_vapp')->update($this->appid, array('state' => 1,'version'=>intval($this->version)));
if($this->version >= 30){
//查询res_join_tag是否有文件id索引
$fecthsql = "SELECT * FROM sqlite_master WHERE type = 'index'";
$indexdata = $this->fetch_all($fecthsql);
$indexarr = array_column($indexdata,'name');
//如果标签表iid没有索引创建res_join_tag_iid_idx索引
if(!in_array('res_join_tag_id',$indexarr)){
$createsql = "CREATE INDEX res_join_tag_id ON bf_tag_join_file (tag_id ASC )";
$this->db->query($createsql);
}
//查询待导入文件数
// $sql = "select count(f.id) as num from bf_file f left join bf_material m on f.id = m.file_id where m.is_recycle =0 ";
$sql = "select count(id) as num from bf_file where 1";
$data = $this->fetch($sql);
$this->filenum = $data['num'];
}else{
//查询res_join_tag是否有文件id索引
$fecthsql = "SELECT * FROM sqlite_master WHERE type = 'index'";
$indexdata = $this->fetch_all($fecthsql);
$indexarr = array_column($indexdata,'name');
//如果标签表iid没有索引创建res_join_tag_iid_idx索引
if(!in_array('res_join_tag_iid',$indexarr)){
$createsql = "CREATE INDEX res_join_tag_iid ON res_join_tag ( iid ASC )";
$this->db->query($createsql);
}
//查询待导入文件数
//$sql = "select count(s.id) as num from source s left join res_prop rp on s.id = rp.iid where rp.action =0 ";
$sql = "select count(id) as num from source where 1 ";
$data = $this->fetch($sql);
$this->filenum = $data['num'];
}
//如果没有数据,视为导入成功
if (!$this->filenum) {
C::t('pichome_vapp')->update($this->appid, array('state' => 4));
} else {
C::t('pichome_vapp')->update($this->appid, array('state' => 2, 'filenum' => $this->filenum));
}
return array('success' => true);
}
//获取文件可访问的真实地址
public function getFileRealFileName($filepath,$filename){
$charsetarr = ['GBK','GB18030'];
$returnname = $filename;
if(!is_file($filepath.BS.$filename)){
foreach ($charsetarr as $v){
$filemetadataname = diconv($filename, CHARSET, $v);
if(is_file($filepath.BS.$filemetadataname)){
$returnname = $filemetadataname;
break;
}
}
}
return $returnname;
}
public function execExport($force = false)
{
if($this->version < 30){
$this->oldexport($force);
}else{
$this->export($force);
}
}
public function export($force = false){
//开始页数
if ($this->lastid) {
$start = $this->lastid;
} else $start = 1;
$lastid = $start;
$start = ($start-1)*$this->onceexportnum;
$sql = "select f.*,m.w,m.h,m.is_recycle,m.thumb_tid,mu.comments_detail,mu.note,mu.score,mu.origin from bf_file f
left join bf_material m on m.file_id = f.id
left join bf_material_userdata mu on mu.file_id=f.id
where 1 limit $start,$this->onceexportnum";
$datas = $this->fetch_all($sql);
foreach ($datas as $v) {
//查询文件是否在回收站
$id = $v['id'];//文件id
$rid = md5($this->appid . $id);
//如果文件在回收站
if ($v['is_recycle'] > 0) {
//如果已经有数据,标记为已删除
if (DB::fetch_first("select count(rid) from %t where rid = %s", array('pichome_resources', $rid))) {
C::t('pichome_resources')->update($rid, array('isdelete' => 1));
}
//文件总数减1
$this->filenum -= 1;
}
else {
//获取文件后缀
$ext = strtolower(substr(strrchr($v['name'], '.'), 1));
//获取文件类型
$type = getTypeByExt($ext);
//出入主表数据
$setarr = [
'rid' => $rid,
'uid'=>$this->uid,
'username'=>$this->username,
'appid' => $this->appid,
'ext' => $ext,
'type' => $type,
'name' => $v['name'],
'mtime' => ($v['mtime']) ? $v['mtime'] * 1000 : $v['born'] * 1000,
'dateline' => $v['ctime'] ? $v['ctime'] * 1000:$v['born']*1000,
'btime' => $v['born'] ? $v['born']*1000:$v['mtime'] * 1000,
'size' => $v['file_size'],
'width' => $v['w'],
'height' => $v['h'],
'grade' => $v['score'],
'apptype' => 2,
'hasthumb' => $v['thumb_tid'] ? 1 : 0,
'thumb' => $v['thumb']
];
//数据插入主表
if (C::t('#billfish#billfish_record')->inser_data($v['id'], $setarr)) {
//定义属性表变量
$attrdata = [];
$attrdata['desc'] = $v['note'];
$attrdata['link'] = $v['origin'];
//将名字记入搜索字段
$attrdata['searchval'] = $setarr['name'].$attrdata['desc'].$attrdata['link'];
//处理目录数据
if ($v['pid']) {
$folderdata = $this->getFolderfid($v['pid']);
//处理目录数据
$fid = $folderdata['fid'];
$folderarr = [
'fid' => $fid,
'appid' => $this->appid,
'rid' => $rid
];
C::t('pichome_folderresources')->insert($folderarr);
$attrdata['path'] = $folderdata['dirpath'] . BS . $setarr['name'];
} else {
$attrdata['path'] = $setarr['name'];
}
//目录数据处理完成
$attrdata['path'] = $this->getFileRealFileName($this->path,$attrdata['path']);
//转码路径 记入属性表
//$p = new Encode_Core();
//$this->charset = $p->get_encoding($attrdata['path']);
//if (CHARSET != $this->charset) $attrdata['path'] = diconv($attrdata['path'],CHARSET, $this->charset);;
//标签数据开始
//查询文件标签id
$sql = "select tag_id from bf_tag_join_file where file_id = $id";//耗时最多
$tiddata = $this->fetch_all($sql);
$tids = [];
foreach ($tiddata as $val) {
$tids[] = $val['tag_id'];
}
if (!empty($tids)) {
$tidstr = dimplode($tids);
//查询标签分类数据
$sql = "select jg.gid,g.name from bf_tag_join_group jg
left join bf_tag_group g on g.id = jg.gid
where jg.tag_id in($tidstr) group by jg.gid";
$taggroupdata = $this->fetch_all($sql);
$relationgroupdata = [];
//插入标签分类关系表及pichome分类返回原分类id对应pichome标签分类id
foreach ($taggroupdata as $val) {
$tmpreturn = C::t('#billfish#billfish_taggrouprecord')->insert_data($val, $this->appid);
$relationgroupdata[$tmpreturn['bcid']] = $tmpreturn['cid'];
}
//处理标签表数据
//查询标签名称,id 插入标签对照表 返回原标签id对应pichome标签id 将标签加入searchval
$sql = " select t.id,t.name,j.gid from bf_tag t
left join bf_tag_join_group j on j.tag_id = t.id where t.id in($tidstr)";
$tagdata = $this->fetch_all($sql);
$tagrelativedata = [];
$taggroups =[];
foreach ($tagdata as $val) {
$tagsetarr = ['name' => $val['name'], 'lid' => $val['id']];
$tmptagrelativedata = C::t('#billfish#billfish_tagrecord')->insert_data($tagsetarr, $this->appid);
$tagrelativedata[$tmptagrelativedata['lid']] = $tmptagrelativedata['tid'];
$attrdata['searchval'] .= $val['name'];
if($val['gid']) $taggroups[] = ['gid'=>$val['gid'],'lid'=>$val['id']];
}
//处理标签与分类关系数据 查询原标签分类和标签id 插入pichome标签分类对应标签id
//$sql = "select gid,lid from tag_join_group where lid in($tidstr)";
//$taggroups = $this->fetch_all($sql);
foreach ($taggroups as $val) {
$tagrelarr = [
'tid' => $tagrelativedata[$val['lid']],
'cid' => $relationgroupdata[$val['gid']],
'appid' => $this->appid,
];
C::t('pichome_tagrelation')->insert($tagrelarr);
}
//处理标签文件关系数据
$inserttids = $ftids = array_values($tagrelativedata);
//查询pichome是否有标签数据
$oattrtag = DB::result_first("select tag from %t where rid = %s", array('pichome_resources_attr', $rid));
if ($oattrtag) {
$ottids = explode(',', $oattrtag);
//取得删除的标签
$deltids = array_diff($ftids, $ottids);
if (!empty($deltids)) C::t('pichome_resourcestag')->delete_by_ridtid($rid, $deltids);
//取得插入的标签
$inserttids = $deltids = array_diff($ottids, $ftids);
}
//插入标签关系表
foreach ($inserttids as $val) {
$tagresourcesattr = ['tid' => $val, 'rid' => $rid, 'appid' => $this->appid];
C::t('pichome_resourcestag')->insert($tagresourcesattr);
}
//更新属性表标签数据
$attrdata['tag'] = implode(',', $ftids);
}
//标签数据结束
//开始处理颜色数据
//查询颜色数据
$sql = "select * from bf_material_color where file_id = $id";
$bcolordata = $this->fetch_all($sql);
//删除原颜色数据
DB::delete('pichome_palette', array('rid' => $rid));
foreach ($bcolordata as $val) {
$colorarr = ['rid' => $rid,
'color' => $val['color'],
'weight' => $val['precent'],
'r' => $val['r'],
'g' => $val['g'],
'b' => $val['b']
];
C::t('pichome_palette')->insert($colorarr);
}
//颜色数据处理结束
//处理标注数据
//删除原标注数据
C::t('pichome_comments')->delete_by_rid($rid);
if ($v['comments_detail']) {
$commentdata = json_decode($v['comments_detail'],true);
foreach ($commentdata as $commentval) {
$tcommentval['id'] = random(13) . $this->appid;
$tentval['appid'] = $this->appid;
$tcommentval['rid'] = $rid;
$tcommentval['x'] = number_format($commentval['x'], 2);
$tcommentval['y'] = number_format($commentval['y'], 2);
$tcommentval['width'] = number_format($commentval['cx'], 2);
$tcommentval['height'] = number_format($commentval['cy'], 2);
$tcommentval['annotation'] = $commentval['comment'];
try {
C::t('pichome_comments')->insert($tcommentval);
$setarr['searchval'] .= $tcommentval['annotation'];
} catch (Exception $e) {
}
}
}
//标注数据处理结束
//处理音视频时长数据
//查询音频时长
$sql = "select duration from bf_material_video where file_id = $id";
$videodata = $this->fetch($sql);
if(isset($videodata['duration'])) $attrdata['duration'] = $videodata['duration'];
//查询视频时长
$sql = "select duration from bf_material_audio where file_id = $id";
$audiodata = $this->fetch($sql);
if(isset($audiodata['duration'])) $attrdata['duration'] = $audiodata['duration'];
//时长处理结束
//插入属性表数据
$attrdata['rid'] = $rid;
$attrdata['appid'] = $this->appid;
C::t('pichome_resources_attr')->insert($attrdata);
$this->donum += 1;
}
else{
//文件总数减1
$this->filenum -= 1;
}
}
//导入百分比
$percent = floor(($this->donum / $this->filenum) * 100);
$percent = ($percent > 100) ? 100 : $percent;
$state = ($percent >= 100) ? 3 : 2;
if ($state == 3) {
$lastid = 0;
}
//记录导入起始位置,以备中断后从此处,更改导入状态
C::t('pichome_vapp')->update($this->appid, array('percent' => $percent, 'donum' => $this->donum, 'state' => $state));
}
if($state == 2){
$lastid = $lastid+1;
C::t('pichome_vapp')->update($this->appid,array('lastid' => $lastid));
}
return array('success' => true);
}
public function oldexport($force = false){
//开始页数
if ($this->lastid) {
$start = $this->lastid;
} else $start = 1;
$lastid = $start;
$start = ($start-1)*$this->onceexportnum;
$sql = "select s.*,p.fid,p.score,p.title,p.origin,p.note,p.action from source s
left join res_prop p on p.iid = s.id
where 1 limit $start,$this->onceexportnum";
$datas = $this->fetch_all($sql);
foreach ($datas as $v) {
//查询文件是否在回收站
$id = $v['id'];//文件id
$rid = md5($this->appid . $id);
//如果文件在回收站
if ($v['action'] > 0) {
//如果已经有数据,标记为已删除
if (DB::fetch_first("select count(rid) from %t where rid = %s", array('pichome_resources', $rid))) {
C::t('pichome_resources')->update($rid, array('isdelete' => 1));
}
//文件总数减1
$this->filenum -= 1;
}
else {
//获取文件后缀
$ext = strtolower(substr(strrchr($v['name'], '.'), 1));
//获取文件类型
$type = getTypeByExt($ext);
//出入主表数据
$setarr = [
'rid' => $rid,
'uid'=>$this->uid,
'username'=>$this->username,
'appid' => $this->appid,
'ext' => $ext,
'type' => $type,
'name' => $v['name'],
'mtime' => ($v['born']) ? $v['born'] * 1000 : $v['lastw'] * 1000,
'dateline' => $v['lastw'] * 1000,
'btime' => TIMESTAMP * 1000,
'size' => $v['size'],
'width' => $v['width'],
'height' => $v['height'],
'grade' => $v['score'],
'apptype' => 2,
'hasthumb' => $v['thumb'] ? 1 : 0,
'thumb' => $v['thumb']
];
//数据插入主表
if (C::t('#billfish#billfish_record')->inser_data($v['id'], $setarr)) {
//定义属性表变量
$attrdata = [];
$attrdata['desc'] = $v['note'];
$attrdata['link'] = $v['origin'];
//将名字记入搜索字段
$attrdata['searchval'] = $setarr['name'].$attrdata['desc'].$attrdata['link'];
//处理目录数据
if ($v['fid']) {
$folderdata = $this->getFolderfid($v['fid']);
//处理目录数据
$fid = $folderdata['fid'];
$folderarr = [
'fid' => $fid,
'appid' => $this->appid,
'rid' => $rid
];
C::t('pichome_folderresources')->insert($folderarr);
$attrdata['path'] = $folderdata['dirpath'] . BS . $setarr['name'];
} else {
$attrdata['path'] = $setarr['name'];
}
//目录数据处理完成
$attrdata['path'] = $this->getFileRealFileName($this->path,$attrdata['path']);
//转码路径 记入属性表
//$p = new Encode_Core();
//$this->charset = $p->get_encoding($attrdata['path']);
//if (CHARSET != $this->charset) $attrdata['path'] = diconv($attrdata['path'],CHARSET, $this->charset);;
//标签数据开始
//查询文件标签id
$sql = "select lid from res_join_tag where iid = $id";//耗时最多
$tiddata = $this->fetch_all($sql);
$tids = [];
foreach ($tiddata as $val) {
$tids[] = $val['lid'];
}
if (!empty($tids)) {
$tidstr = dimplode($tids);
//查询标签分类数据
$sql = "select jg.gid,g.name from tag_join_group jg
left join taggrp g on g.id = jg.gid
where jg.lid in($tidstr) group by jg.gid";
$taggroupdata = $this->fetch_all($sql);
$relationgroupdata = [];
//插入标签分类关系表及pichome分类返回原分类id对应pichome标签分类id
foreach ($taggroupdata as $val) {
$tmpreturn = C::t('#billfish#billfish_taggrouprecord')->insert_data($val, $this->appid);
$relationgroupdata[$tmpreturn['bcid']] = $tmpreturn['cid'];
}
//处理标签表数据
//查询标签名称,id 插入标签对照表 返回原标签id对应pichome标签id 将标签加入searchval
$sql = " select t.id,t.name,j.gid from tag t
left join tag_join_group j on j.lid = t.id where t.id in($tidstr)";
$tagdata = $this->fetch_all($sql);
$tagrelativedata = [];
$taggroups =[];
foreach ($tagdata as $val) {
$tagsetarr = ['name' => $val['name'], 'lid' => $val['id']];
$tmptagrelativedata = C::t('#billfish#billfish_tagrecord')->insert_data($tagsetarr, $this->appid);
$tagrelativedata[$tmptagrelativedata['lid']] = $tmptagrelativedata['tid'];
$attrdata['searchval'] .= $val['name'];
if($val['gid']) $taggroups[] = ['gid'=>$val['gid'],'lid'=>$val['id']];
}
//处理标签与分类关系数据 查询原标签分类和标签id 插入pichome标签分类对应标签id
//$sql = "select gid,lid from tag_join_group where lid in($tidstr)";
//$taggroups = $this->fetch_all($sql);
foreach ($taggroups as $val) {
$tagrelarr = [
'tid' => $tagrelativedata[$val['lid']],
'cid' => $relationgroupdata[$val['gid']],
'appid' => $this->appid,
];
C::t('pichome_tagrelation')->insert($tagrelarr);
}
//处理标签文件关系数据
$inserttids = $ftids = array_values($tagrelativedata);
//查询pichome是否有标签数据
$oattrtag = DB::result_first("select tag from %t where rid = %s", array('pichome_resources_attr', $rid));
if ($oattrtag) {
$ottids = explode(',', $oattrtag);
//取得删除的标签
$deltids = array_diff($ftids, $ottids);
if (!empty($deltids)) C::t('pichome_resourcestag')->delete_by_ridtid($rid, $deltids);
//取得插入的标签
$inserttids = $deltids = array_diff($ottids, $ftids);
}
//插入标签关系表
foreach ($inserttids as $val) {
$tagresourcesattr = ['tid' => $val, 'rid' => $rid, 'appid' => $this->appid];
C::t('pichome_resourcestag')->insert($tagresourcesattr);
}
//更新属性表标签数据
$attrdata['tag'] = implode(',', $ftids);
}
//标签数据结束
//开始处理颜色数据
//查询颜色数据
$sql = "select * from colour where iid = $id";
$bcolordata = $this->fetch_all($sql);
//删除原颜色数据
DB::delete('pichome_palette', array('rid' => $rid));
foreach ($bcolordata as $val) {
$colorarr = ['rid' => $rid,
'color' => $val['bf_clr'],
'weight' => $val['precent'],
'r' => $val['r'],
'g' => $val['g'],
'b' => $val['b']
];
C::t('pichome_palette')->insert($colorarr);
}
//颜色数据处理结束
//处理标注数据
$sql = "select * from comment where iid = $id";
$commentdata = $this->fetch_all($sql);
//删除原标注数据
C::t('pichome_comments')->delete_by_rid($rid);
if ($commentdata) {
foreach ($commentdata as $commentval) {
$tcommentval['id'] = random(13) . $this->appid;
$tentval['appid'] = $this->appid;
$tcommentval['rid'] = $rid;
$tcommentval['x'] = number_format($commentval['x'], 2);
$tcommentval['y'] = number_format($commentval['y'], 2);
$tcommentval['width'] = number_format($commentval['cx'], 2);
$tcommentval['height'] = number_format($commentval['cy'], 2);
$tcommentval['annotation'] = $commentval['comment'];
try {
C::t('pichome_comments')->insert($tcommentval);
$setarr['searchval'] .= $tcommentval['annotation'];
} catch (Exception $e) {
}
}
}
//标注数据处理结束
//处理音视频时长数据
//查询音频时长
$sql = "select duration from video where iid = $id";
$videodata = $this->fetch($sql);
if(isset($videodata['duration'])) $attrdata['duration'] = $videodata['duration'];
//查询视频时长
$sql = "select duration from audio where iid = $id";
$audiodata = $this->fetch($sql);
if(isset($audiodata['duration'])) $attrdata['duration'] = $audiodata['duration'];
//时长处理结束
//插入属性表数据
$attrdata['rid'] = $rid;
$attrdata['appid'] = $this->appid;
C::t('pichome_resources_attr')->insert($attrdata);
$this->donum += 1;
}
else{
//文件总数减1
$this->filenum -= 1;
}
}
//导入百分比
$percent = floor(($this->donum / $this->filenum) * 100);
$percent = ($percent > 100) ? 100 : $percent;
$state = ($percent >= 100) ? 3 : 2;
if ($state == 3) {
$lastid = 0;
}
//记录导入起始位置,以备中断后从此处,更改导入状态
C::t('pichome_vapp')->update($this->appid, array('percent' => $percent, 'donum' => $this->donum, 'state' => $state));
}
$lastid = $lastid+1;
C::t('pichome_vapp')->update($this->appid,array('lastid' => $lastid));
return array('success' => true);
}
public function getFolderfid($bfid, $dirpath = '')
{
$parentfolderdata = [];
if($this->version < 30){
$sql = "select * from folder where id = $bfid";
}else{
$sql = "select * from bf_folder where id = $bfid";
}
$folderdata = $this->fetch($sql);
$dirpath = $folderdata['name'] . ($dirpath ? BS . $dirpath : '');
if ($folderdata['pid']) {
$parentfolderdata = $this->getFolderfid($folderdata['pid'], $dirpath);
}
if($parentfolderdata['dirpath']) $dirpath = $parentfolderdata['dirpath'];
$setarr = [
'pfid' => isset($parentfolderdata['fid']) ? $parentfolderdata['fid'] : '',
'fname' => $folderdata['name'],
'appid' => $this->appid,
'disp'=>($this->version < 30) ? $folderdata['seq']:round($folderdata['seq']*1000000000)
];
$return = C::t('#billfish#billfish_folderrecord')->insert_data($bfid, $setarr);
$return['dirpath'] = $dirpath;
return $return;
}
//校验文件
public function execCheckFile()
{
if ($this->exportstatus == 3) {
$total = DB::result_first("select count(rid) from %t where appid = %s ", array('pichome_resources', $this->appid));
//校验文件
$this->check_file($total);
}
return true;
}
public function check_file($total)
{
if ($this->lastid < 1) $this->lastid = 1;
$limitsql = ($this->lastid - 1) * $this->checklimit . ',' . $this->checklimit;
$delrids = [];
$data = DB::fetch_all("select rid,name from %t where appid = %s order by lastdate asc limit $limitsql ", array('pichome_resources', $this->appid));
if (empty($data)) {
//校验完成后更新目录文件数
foreach (DB::fetch_all("select count(rf.id) as num,f.fid from %t f left join %t rf on rf.fid=f.fid where f.appid = %s group by f.fid", array('pichome_folder', 'pichome_folderresources', $this->appid)) as $v) {
C::t('pichome_folder')->update($v['fid'], array('filenum' => $v['num']));
}
//检查不存在的目录删除
$foldertotal = DB::result_first("select count(id) from %t where appid = %s",array('billfish_folderrecord',$this->appid));
$this->check_notexists_folder($foldertotal);
//检查不存在的标签删除
$tagtotal = DB::result_first("select count(id) from %t where appid = %s",array('billfish_tagrecord',$this->appid));
$this->check_notexists_tag($tagtotal);
if($this->version < 30){
//删除创建的索引
$sql = 'DROP INDEX res_join_tag_iid';
$this->db->query($sql);
}else{
$sql = 'DROP INDEX res_join_tag_id';
$this->db->query($sql);
}
$hascatnum = DB::result_first("SELECT count(DISTINCT rid) FROM %t where appid = %s",array('pichome_folderresources',$this->appid));
$nosubfilenum = $total - $hascatnum;
C::t('pichome_vapp')->update($this->appid, array('percent' => 0, 'state' => 4, 'lastid' => 0, 'donum' => 0,'filenum'=>$total,'nosubfilenum'=>$nosubfilenum));
return true;
}
foreach ($data as $v) {
$rid = $v['rid'];
$iid = DB::result_first("select bid from %t where rid = %s and appid = %s",array('billfish_record',$rid,$this->appid));
if($this->version < 30){
$sql = "select count(s.id) as num from source s left join res_prop rp on s.id = rp.iid where rp.action =0 and s.id = $iid";
}else{
//查询billfish中是否有该数据
$sql = "select count(f.id) as num from bf_file f left join bf_material m on f.id = m.file_id where m.is_recycle =0 and f.id = $iid";
}
$numdata = $this->fetch($sql);
if(!isset($numdata['num']) || !$numdata['num']){
$delrids[] = $rid;
}
}
if (!empty($delrids)) {
$this->filenum = $this->filenum - count($delrids);
//如果有需要删除的,删除后,则重新查询上一页数据
C::t('pichome_resources')->delete_by_rid($delrids);
if($this->lastid == 1){
$percent = round(($this->checklimit / $total) * 100);
}else{
$percent = round((($this->lastid - 1) * $this->checklimit / $total) * 100);
}
C::t('pichome_vapp')->update($this->appid, array('lastid' => $this->lastid, 'percent' => $percent, 'state' => 3, 'filenum' => $this->filenum));
} else {
if($this->lastid == 1){
$percent = round(($this->checklimit / $total) * 100);
}else{
$percent = round((($this->lastid - 1) * $this->checklimit / $total) * 100);
}
$percent = ($percent > 100) ? 100:$percent;
C::t('pichome_vapp')->update($this->appid, array('lastid' => $this->lastid + 1, 'percent' => $percent, 'state' => 3));
}
}
//检查目录数据
public function check_notexists_folder($total){
$tmpkey = 'pichomecheckfolder' . $this->appid;
$folderstart = C::t('cache')->fetch($tmpkey);
if (!$folderstart) {
$folderstart = 0;
}
if($folderstart < $total){
$bfids = [];
//检查不存在的目录删除
foreach(DB::fetch_all("select bfr.bfid as bfid from %t f left join %t bfr on bfr.fid=f.fid where f.appid = %s limit $folderstart,100",array('pichome_folder','billfish_folderrecord',$this->appid)) as $v){
$bfids[] = $v['bfid'];
}
if(empty($bfids)){
C::t('cache')->delete($tmpkey);
return true;
}
$bfidstr = dimplode($bfids);
if($this->version < 30){
$sql = "select id from folder where id in($bfidstr)";
}else{
$sql = "select id from bf_folder where id in($bfidstr)";
}
//查询不存的目录
$bfolder = $this->fetch_all($sql);
$blfids = [];
foreach ($bfolder as $val){
$blfids[] = $val['id'];
}
$delfids = array_diff($bfids,$blfids);
if(!empty($delfids))C::t('#billfish#billfish_folderrecord')->delete_by_bfid($delfids,$this->appid);
$folderstart += 100;
$setarr = ['cachekey' => $tmpkey, 'cachevalue' => $folderstart, 'dateline' => time()];
C::t('cache')->insert($setarr);
$this->check_notexists_folder($total);
}else{
C::t('cache')->delete($tmpkey);
return true;
}
}
//检查标签对照表数据
public function check_notexists_tag($total){
$tmpkey = 'pichomechecktag'.$this->appid;
$tagstart = C::t('cache')->fetch($tmpkey);
if (!$tagstart) {
$tagstart = 0;
}
if($tagstart < $total){
$lids=[];
foreach(DB::fetch_all("select lid from %t where appid = %s limit $tagstart,100 ",array('billfish_tagrecord',$this->appid)) as $v){
$lids[] = $v['lid'];
}
if(empty($lids)){
C::t('cache')->delete($tmpkey);
return true;
}
$lidstr = dimplode(',',$lids);
if($this->version < 30){
$sql = "select id from tag where id in($lidstr)";
}
else $sql = "select id from bf_tag where id in($lidstr)";
$blids =[] ;
foreach($this->fetch_all($sql) as $v){
$blids[] = $v['id'];
}
$deblids = array_diff($lids,$blids);
if(!empty($deblids)) DB::delete('billfish_tagrecord','lid in('.dimplode($deblids).')');
$tagstart += 100;
$setarr = ['cachekey' => $tmpkey, 'cachevalue' => $tagstart, 'dateline' => time()];
C::t('cache')->insert($setarr);
$this->check_notexists_tag($total);
}else{
C::t('cache')->delete($tmpkey);
return true;
}
}
}

View File

@@ -0,0 +1,71 @@
<?php
/*
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
* @license https://www.oaooa.com/licenses/
*
* @link https://www.oaooa.com
* @author zyx(zyx@oaooa.com)
*/
if(!defined('IN_OAOOA')) {
exit('Access Denied');
}
class table_billfish_folderrecord extends dzz_table
{
public function __construct() {
$this->_table = 'billfish_folderrecord';
$this->_pk = 'id';
parent::__construct();
}
public function insert_data($bfid,$setarr){
$returndata =[];
if($fid = DB::result_first("select fid from %t where bfid = %d and appid = %s",array($this->_table,$bfid,$setarr['appid']))){
C::t('pichome_folder')->update($fid,$setarr);
$setarr['fid'] = $fid;
return $setarr;
}else{
$fpathkey = '';
if($setarr['pfid']){
$fpathkey =DB::result_first("select pathkey from %t where fid = %s and appid = %s",array('pichome_folder',$setarr['pfid'],$setarr['appid']));
}
$setarr['fid'] = random(13) . $setarr['appid'];
$setarr['pathkey'] = ($fpathkey) ? $fpathkey.$setarr['fid']:$setarr['fid'];
if(C::t('pichome_folder')->insert($setarr)){
$setarr1 = [
'bfid'=>$bfid,
'fid'=>$setarr['fid'],
'appid'=>$setarr['appid']
];
if(parent::insert($setarr1,1)){
return $setarr;
}else{
C::t('pichome_folder')->delete($setarr['fid']);
return $returndata;
}
}
}
}
public function delete_by_bfid($bfids,$appid){
if(!is_array($bfids)) $bfids = (array)$bfids;
$delfid = $delid = [];
foreach(DB::fetch_all("select fid,id from %t where bfid in(%n) and appid = %s",array($this->_table,$bfids,$appid)) as $v){
$delfid[] = $v['fid'];
$delid[] = $v['id'];
}
DB::delete('pichome_folderresources',"fid in (".dimplode($delfid).")");
DB::delete('pichome_folder',"fid in (".dimplode($delfid).")");
parent::delete($delid);
}
public function delete_by_appid($appid){
DB::delete($this->_table,array('appid'=>$appid));
}
}

View File

@@ -0,0 +1,43 @@
<?php
/*
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
* @license https://www.oaooa.com/licenses/
*
* @link https://www.oaooa.com
* @author zyx(zyx@oaooa.com)
*/
if(!defined('IN_OAOOA')) {
exit('Access Denied');
}
class table_billfish_record extends dzz_table
{
public function __construct() {
$this->_table = 'billfish_record';
$this->_pk = 'id';
parent::__construct();
}
public function inser_data($bid,$setarr){
$setarr1['thumb'] = $setarr['thumb'];
unset($setarr['thumb']);
if(C::t('pichome_resources')->insert($setarr)){
$setarr1['rid'] = $setarr['rid'];
$setarr1['appid'] = $setarr['appid'];
$setarr1['bid'] = $bid;
$id = DB::result_first("select id from %t where bid = %d and appid = %s",array($this->_table,$bid,$setarr['appid']));
if($id){
parent::update($id,$setarr1);
}else{
parent::insert($setarr1);
}
}
return true;
}
public function delete_by_appid($appid){
DB::delete($this->_table,array('appid'=>$appid));
}
}

View File

@@ -0,0 +1,42 @@
<?php
/*
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
* @license https://www.oaooa.com/licenses/
*
* @link https://www.oaooa.com
* @author zyx(zyx@oaooa.com)
*/
if(!defined('IN_OAOOA')) {
exit('Access Denied');
}
class table_billfish_taggrouprecord extends dzz_table
{
public function __construct() {
$this->_table = 'billfish_taggrouprecord';
$this->_pk = 'id';
parent::__construct();
}
public function insert_data($setarr,$appid){
$hasrecord = false;
if($cid = DB::result_first("select cid from %t where bcid=%d and appid = %s",array($this->_table,$setarr['gid'],$appid))){
$data['cid'] = $cid;
$hasrecord = true;
}else{
$data['cid'] = random(13).$appid;
}
$data['catname'] = $setarr['name'];
$data['appid'] = $appid;
$data['dateline'] = TIMESTAMP;
if($cid = C::t('pichome_taggroup')->insert($data)){
if(!$hasrecord) parent::insert(array('cid'=>$cid,'bcid'=>$setarr['gid'],'appid'=>$appid));
return array('bcid'=>$setarr['gid'],'cid'=>$cid);
}
}
public function delete_by_appid($appid){
DB::delete($this->_table,array('appid'=>$appid));
}
}

View File

@@ -0,0 +1,39 @@
<?php
/*
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
* @license https://www.oaooa.com/licenses/
*
* @link https://www.oaooa.com
* @author zyx(zyx@oaooa.com)
*/
if(!defined('IN_OAOOA')) {
exit('Access Denied');
}
class table_billfish_tagrecord extends dzz_table
{
public function __construct() {
$this->_table = 'billfish_tagrecord';
$this->_pk = 'id';
parent::__construct();
}
public function insert_data($setarr,$appid){
if($id = DB::result_first("select id from %t where lid=%d and appid = %s",array($this->_table,$setarr['lid'],$appid))){
parent::update($id,array('name'=>$setarr['name']));
}else{
$setarr['appid'] = $appid;
parent::insert($setarr);
}
if($tid= DB::result_first("select tid from %t where tagname = %s",array('pichome_tag',$setarr['name']))){
return array('lid'=>$setarr['lid'],'tid'=>$tid);
}else{
$tid = C::t('pichome_tag')->insert($setarr['name']);
}
return array('tid'=>$tid,'lid'=>$setarr['lid']);
}
public function delete_by_appid($appid){
DB::delete($this->_table,array('appid'=>$appid));
}
}

View File

@@ -0,0 +1,18 @@
<?php
namespace dzz\billfish\classes;
use \core as C;
use \DB as DB;
use \fmpeg as fmpeg;
class delpichomefolderafter
{
public function run($appid)
{
C::t("#billfish#billfish_folderrecord")->delete_by_appid($appid);
}
}

View File

@@ -0,0 +1,51 @@
<?php
namespace dzz\billfish\classes;
use \core as C;
use \DB as DB;
use \fmpeg as fmpeg;
class getpichomethumb
{
public function run(&$data)
{
$thumbid = DB::result_first("select thumb from %t where appid = %s and rid = %s", array('billfish_record', $data['appid'], $data['rid']));
if(isset($data['version']) && $data['version'] >=30){
$bid = DB::result_first("select bid from %t where rid = %s",array('billfish_record',$data['rid']));
$thumbdir = dechex($bid);
$thumbdir = (string) $thumbdir;
if(strlen($thumbdir) < 2){
$thumbdir =str_pad($thumbdir,2,0,STR_PAD_LEFT);
}elseif(strlen($thumbdir) > 2){
$thumbdir = substr($thumbdir,-2);
}
$pathdir = $data['apppath'].BS.'.bf'.BS.'.preview'.BS.$thumbdir.BS.$bid.'.small.webp';
return array('icon'=>$pathdir);
}else{
if (strlen($thumbid) < 9) {
$thumbid = str_pad($thumbid,9,0,STR_PAD_LEFT);
}
$pathdir = $data['apppath'].BS.'.bf'.BS.'.preview';
$thumbpatharr = $this->mbStrSplit($thumbid,3);
array_pop($thumbpatharr);
$thumbpath = implode(BS,$thumbpatharr);
return array('icon'=>$pathdir.BS.$thumbpath.BS.$thumbid.'.webp');
}
}
function mbStrSplit ($string, $len=1) {
$start = 0;
$strlen = mb_strlen($string);
while ($strlen) {
$array[] = mb_substr($string,$start,$len,"utf8");
$string = mb_substr($string, $len, $strlen,"utf8");
$strlen = mb_strlen($string);
}
return $array;
}
}

View File

@@ -0,0 +1,26 @@
<?php
namespace dzz\billfish\classes;
use \core as C;
use \DB as DB;
use \fmpeg as fmpeg;
class pichomevappdelete
{
public function run($data)
{
if($data['type'] == 2){
C::t("#billfish#billfish_record")->delete_by_appid($data['appid']);
C::t("#billfish#billfish_folderrecord")->delete_by_appid($data['appid']);
C::t("#billfish#billfish_tagrecord")->delete_by_appid($data['appid']);
C::t("#billfish#billfish_taggrouprecord")->delete_by_appid($data['appid']);
}
return true;
}
}

View File

@@ -1,118 +1,118 @@
<?php
/*
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
* @license https://www.oaooa.com/licenses/
*
* @link https://www.oaooa.com
* @author zyx(zyx@oaooa.com)
*/
define ('UTF32_BIG_ENDIAN_BOM' , chr(0x00) . chr(0x00) . chr(0xFE) . chr(0xFF));
define ('UTF32_LITTLE_ENDIAN_BOM', chr(0xFF) . chr(0xFE) . chr(0x00) . chr(0x00));
define ('UTF16_BIG_ENDIAN_BOM' , chr(0xFE) . chr(0xFF));
define ('UTF16_LITTLE_ENDIAN_BOM', chr(0xFF) . chr(0xFE));
define ('UTF8_BOM' , chr(0xEF) . chr(0xBB) . chr(0xBF));
class Encode_Core {
/**
* 文件分析方法来检查UNICODE文件ANSI文件没有文件头此处不分析
*/
private function detect_utf_encoding($text) {
$first2 = substr($text, 0, 2);
$first3 = substr($text, 0, 3);
$first4 = substr($text, 0, 3);
if ($first3 == UTF8_BOM) return 'UTF-8';
elseif ($first4 == UTF32_BIG_ENDIAN_BOM) return 'UTF-32BE';
elseif ($first4 == UTF32_LITTLE_ENDIAN_BOM) return 'UTF-32LE';
elseif ($first2 == UTF16_BIG_ENDIAN_BOM) return 'UTF-16BE';
elseif ($first2 == UTF16_LITTLE_ENDIAN_BOM) return 'UTF-16LE';
return '';
}
/**
* 检测是否GB2312编码
* @param string $str
* @since 2012-03-20
* @return boolean
*/
private function is_gb2312($str) {
for($i=0; $i<strlen($str); $i++) {
$v = ord( $str[$i] );
if( $v > 127) {
if( ($v >= 228) && ($v <= 233) ){
if( ($i+2) >= (strlen($str) - 1)) return true; // not enough characters
$v1 = ord( $str[$i+1] );
$v2 = ord( $str[$i+2] );
if( ($v1 >= 128) && ($v1 <=191) && ($v2 >=128) && ($v2 <= 191) )
return false;
else
return true; //GB编码
}
}
}
}
private function is_GBK($str){
$s1 = iconv('gbk','utf-8',$str);
$s0 = iconv('utf-8','gbk',$s1);
if($s0 == $str){
return true;
}else{
return false;
}
}
/**
* 取得编码
* @param string $str
* @return string $encoding
*/
public static function get_encoding($str){
$ary = array();
//$ary[] = "ASCII";
$ary[] = "UTF-8";
$ary[] = "GB18030";//简体码
$ary[] = "BIG-5";//繁体码
$ary[] = "EUC-CN";
$ary[] = "JIS";//日文编码
$ary[] = "EUC-JP";//日文编码
$encoding= self::detect_utf_encoding($str);
if(empty($encoding) && self::is_gb2312($str)) return 'GBK';
if(empty($encoding)){
$encoding=mb_detect_encoding($str,$ary);
}
if($encoding=='ASCII') $encoding='UTF-8';
return $encoding;
}
public function utf16_to_utf8($str) {
$len = strlen($str);
$dec = '';
for ($i = 0; $i < $len; $i += 2) {
$c = ($be) ? ord($str[$i]) << 8 | ord($str[$i + 1]) :
ord($str[$i + 1]) << 8 | ord($str[$i]);
if ($c >= 0x0001 && $c <= 0x007F) {
$dec .= chr($c);
} else if ($c > 0x07FF) {
$dec .= chr(0xE0 | (($c >> 12) & 0x0F));
$dec .= chr(0x80 | (($c >> 6) & 0x3F));
$dec .= chr(0x80 | (($c >> 0) & 0x3F));
} else {
$dec .= chr(0xC0 | (($c >> 6) & 0x1F));
$dec .= chr(0x80 | (($c >> 0) & 0x3F));
}
}
return $dec;
}
}
?>
<?php
/*
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
* @license https://www.oaooa.com/licenses/
*
* @link https://www.oaooa.com
* @author zyx(zyx@oaooa.com)
*/
define ('UTF32_BIG_ENDIAN_BOM' , chr(0x00) . chr(0x00) . chr(0xFE) . chr(0xFF));
define ('UTF32_LITTLE_ENDIAN_BOM', chr(0xFF) . chr(0xFE) . chr(0x00) . chr(0x00));
define ('UTF16_BIG_ENDIAN_BOM' , chr(0xFE) . chr(0xFF));
define ('UTF16_LITTLE_ENDIAN_BOM', chr(0xFF) . chr(0xFE));
define ('UTF8_BOM' , chr(0xEF) . chr(0xBB) . chr(0xBF));
class Encode_Core {
/**
* 文件分析方法来检查UNICODE文件ANSI文件没有文件头此处不分析
*/
private function detect_utf_encoding($text) {
$first2 = substr($text, 0, 2);
$first3 = substr($text, 0, 3);
$first4 = substr($text, 0, 3);
if ($first3 == UTF8_BOM) return 'UTF-8';
elseif ($first4 == UTF32_BIG_ENDIAN_BOM) return 'UTF-32BE';
elseif ($first4 == UTF32_LITTLE_ENDIAN_BOM) return 'UTF-32LE';
elseif ($first2 == UTF16_BIG_ENDIAN_BOM) return 'UTF-16BE';
elseif ($first2 == UTF16_LITTLE_ENDIAN_BOM) return 'UTF-16LE';
return '';
}
/**
* 检测是否GB2312编码
* @param string $str
* @since 2012-03-20
* @return boolean
*/
private function is_gb2312($str) {
for($i=0; $i<strlen($str); $i++) {
$v = ord( $str[$i] );
if( $v > 127) {
if( ($v >= 228) && ($v <= 233) ){
if( ($i+2) >= (strlen($str) - 1)) return true; // not enough characters
$v1 = ord( $str[$i+1] );
$v2 = ord( $str[$i+2] );
if( ($v1 >= 128) && ($v1 <=191) && ($v2 >=128) && ($v2 <= 191) )
return false;
else
return true; //GB编码
}
}
}
}
private function is_GBK($str){
$s1 = iconv('gbk','utf-8',$str);
$s0 = iconv('utf-8','gbk',$s1);
if($s0 == $str){
return true;
}else{
return false;
}
}
/**
* 取得编码
* @param string $str
* @return string $encoding
*/
public static function get_encoding($str){
$ary = array();
//$ary[] = "ASCII";
$ary[] = "UTF-8";
$ary[] = "GB18030";//简体码
$ary[] = "BIG-5";//繁体码
$ary[] = "EUC-CN";
$ary[] = "JIS";//日文编码
$ary[] = "EUC-JP";//日文编码
$encoding= self::detect_utf_encoding($str);
//if(empty($encoding) && self::is_GBK($str)) return 'GBK';
if(empty($encoding)){
$encoding=mb_detect_encoding($str,$ary);
}
if($encoding=='ASCII') $encoding='UTF-8';
return $encoding;
}
public function utf16_to_utf8($str) {
$len = strlen($str);
$dec = '';
for ($i = 0; $i < $len; $i += 2) {
$c = ($be) ? ord($str[$i]) << 8 | ord($str[$i + 1]) :
ord($str[$i + 1]) << 8 | ord($str[$i]);
if ($c >= 0x0001 && $c <= 0x007F) {
$dec .= chr($c);
} else if ($c > 0x07FF) {
$dec .= chr(0xE0 | (($c >> 12) & 0x0F));
$dec .= chr(0x80 | (($c >> 6) & 0x3F));
$dec .= chr(0x80 | (($c >> 0) & 0x3F));
} else {
$dec .= chr(0xC0 | (($c >> 6) & 0x1F));
$dec .= chr(0x80 | (($c >> 0) & 0x3F));
}
}
return $dec;
}
}
?>

View File

@@ -0,0 +1,700 @@
<?php
if (!defined('IN_OAOOA')) {
exit('Access Denied');
}
@set_time_limit(0);
@ini_set('max_execution_time', 0);
require_once(DZZ_ROOT . './dzz/class/class_encode.php');
require_once './core/class/class_Color.php';
require_once libfile('function/user', '', 'user');
class eagleexport
{
private $path = '';//待执行数据path
private $appid = 0;//库id
private $uid = 0;//用户id
private $username = null;//用户名
private $filenum = 0;//总文件数
private $checkpage = 1;
private $checklimit = 1000;
private $onceexportnum = 1000;
private $checknum = 0;
private $eagledir = DZZ_ROOT . 'library';
private $readtxt = DZZ_ROOT . './data/attachment/cache/';
private $exportstatus = 0;
private $donum = 0;
private $lastid = '';
public function __construct($data = array())
{
//获取导入记录表基本数据
$this->path = str_replace('/', BS, $data['path']);;
$this->appid = $data['appid'];
$this->uid = $data['uid'];
$this->username = $data['username'];
$this->exportstatus = $data['state'];
$this->donum = $data['donum'];
$this->filenum = $data['filenum'];
$this->lastid = $data['lastid'];
}
public function getpathdata($folderdata, $appid, $pathdata = array())
{
foreach ($folderdata as $v) {
$pathdata[$v['id'] . $appid] = $v['name'];
if ($v['children']) {
$tmpchild = $v['children'];
$pathdata = $this->getpathdata($tmpchild, $appid, $pathdata);
}
}
return $pathdata;
}
public function initFoldertag()
{
$jsonfile = $this->path . BS . 'metadata.json';
$mtime = filemtime($jsonfile);
$appdatas = file_get_contents($jsonfile);
//解析出json数据
$appdatas = json_decode($appdatas, true);
//目录数据
$folderdata = $appdatas['folders'];
$efids = C::t('#eagle#eagle_folderrecord')->insert_folderdata_by_appid($this->appid, $folderdata);
$delids = DB::fetch_all("select id from %t where efid not in(%n) and appid = %s",array('eagle_folderrecord',$efids,$this->appid));
//对比目录数据
if($delids)C::t('#eagle#eagle_folderrecord')->delete_by_ids($delids);
//标签数据
$tagdata = $appdatas['tagsGroups'];
$currentcids = [];
$tids = [];
foreach ($tagdata as $v) {
$taggroupdata = [
'cid' => $v['id'] . $this->appid,
'catname' => $v['name'],
'appid' => $this->appid,
'dateline' => TIMESTAMP
];
//插入或更新标签分类数据
$cid = C::t('pichome_taggroup')->insert($taggroupdata);
$currentcids[] = $cid;
foreach ($v['tags'] as $val) {
$tid = C::t('pichome_tag')->insert($val, 1);
$tids[] = $tid;
if ($cid) {
$relasetarr = ['cid' => $cid, 'tid' => $tid, 'appid' => $this->appid];
C::t('pichome_tagrelation')->insert($relasetarr);
}
}
}
if ($tids) {
//查询关系表中包含的不存在的标签关系
$drids = [];
foreach (DB::fetch_all("select id from %t where tid not in(%n) and appid = %s", array('pichome_tagrelation', $tids, $this->appid)) as $rv) {
$drids[] = $rv['id'];
}
//删除不存在的标签关系数据
C::t('pichome_tagrelation')->delete($drids);
}
$ocids = C::t('pichome_taggroup')->fetch_cid_by_appid($this->appid);
$delcids = array_diff($ocids, $currentcids);
C::t('pichome_taggroup')->delete_by_cids($delcids);
C::t('pichome_vapp')->update($this->appid, array('dateline' => $mtime));
return true;
}
public function initExport()
{
$filedir = $this->path . BS . 'images';
$readtxt = $this->readtxt . 'eagleexport' . md5($this->path) . '.txt';
$filenum = 0;
if (!is_file($readtxt) || filemtime($readtxt) < filemtime($this->path . BS . 'metadata.json')) {
C::t('pichome_vapp')->update($this->appid, array('state' => 1));
if ($dch = opendir($filedir)) {
$thandle = fopen($readtxt, 'w+');
while (($file = readdir($dch)) != false) {
if ($file != '.' && $file != '..') {
$filePath = $filedir . '/' . $file;
if (is_dir($filePath) && is_file($filePath . '/metadata.json')) {
$filenum++;
fwrite($thandle, $file . "\n");
}
unset($filePath);
unset($file);
}
}
fclose($thandle);
closedir($dch);
if ($filenum) $this->filenum = $filenum;
} else {
C::t('pichome_vapp')->update($this->appid, array('state' => 0));
return array('error' => 'Read Dir Failer');
}
C::t('pichome_vapp')->update($this->appid, array('filenum' => $this->filenum, 'state' => 2));
}
C::t('pichome_vapp')->update($this->appid, array('state' => 2));
$this->initFoldertag();
return array('success' => true);
}
//获取文件可访问的真实地址
public function getFileRealFileName($filepath, $filename, $ext)
{
$charsetarr = ['GBK', 'GB18030'];
$returnname = $filename;
if (!is_file($filepath . BS . $filename . '.' . $ext)) {
foreach ($charsetarr as $v) {
$filemetadataname = diconv($filename, CHARSET, $v);
if (is_file($filepath . BS . $filemetadataname . '.' . $ext)) {
$returnname = $filemetadataname;
break;
}
}
}
return $returnname;
}
//生成主键rid
public function createrid()
{
$microtime = microtime();
list($msec, $sec) = explode(' ', $microtime);
$msec = $msec * 1000000;
$idstr = md5($sec . $msec . random(6) . $this->appid);
if (DB::result_first("select count(rid) from %t where rid = %s", array('pichome_resources', $idstr))) {
$this->create_id();
}
return $idstr;
}
public function execExport($force = false)
{
$filedir = $this->path . BS . 'images';
$readtxt = $this->readtxt . 'eagleexport' . md5($this->path) . '.txt';
if (filesize($readtxt) == 0) {
@unlink($readtxt);
C::t('pichome_vapp')->update($this->appid, array('lastid' => 0, 'percent' => 100, 'donum' => 0, 'state' => 3, 'filenum' => $this->filenum));
return array('success' => true);
}
if ($this->lastid) {
$start = $this->lastid;
} else $start = 0;
$spl_object = new SplFileObject($readtxt, 'rb');
$spl_object->seek($start);
if ($this->lastid < $this->filenum && $this->exportstatus == 2) {
$i = 0;
while (is_file($readtxt) && !$spl_object->eof()) {
$i++;
if ($i > $this->onceexportnum) {
break;
}
$file = $spl_object->current();
$file = trim($file);
$filePath = $filedir . '/' . $file;
$id = trim(str_replace('.info', '', $file));
//文件路径
$tmppath = $filePath;
unset($filePath);
//文件信息文件路径
$metadatajsonfile = $tmppath . BS . 'metadata.json';
//尝试获取记录表记录
$rdata = C::t('#eagle#eagle_record')->fetch_by_eid($id,$this->appid);
$rid = '';
if (!isset($rdata['rid'])) {
$orid = $id . $this->appid;//原来rid格式
if ($lastdate = DB::result_first("select lastdate from %t where rid = %s", array('pichome_resources', $orid))) {
$rid = $orid;
}
} else {
$rid = $rdata['rid'];
$lastdate = $rdata['dateline'];
}
//判断是否含有数据信息文件
if (is_file($metadatajsonfile)) {
$flastdate = filemtime($metadatajsonfile);
$metadata = file_get_contents($metadatajsonfile);
$filemetadata = json_decode($metadata, true);
//如果是删除状态,并且已有数据则执行删除
if ($filemetadata['isDeleted'] && $rid) {
C::t('pichome_resources')->delete_by_rid($rid);
} else {
//如果不是新生成rid
if ($rid) {
$data = C::t('pichome_resources')->fetch($rid);
//判断最后更新时间
if ($force || $lastdate < $flastdate) {
$filemetadataname = $this->getFileRealFileName($tmppath, $filemetadata['name'], $filemetadata['ext']);
//文件名称
$filename = $filemetadataname . '.' . $filemetadata['ext'];
//缩略图名称
$thumbname = $filemetadataname . '_thumbnail.png';
//文件路径
$file = $tmppath . BS . $filename;
//缩略图路径
$thumbfile = $tmppath . BS . $thumbname;
//如果mtime发生变化则删除原数据重新导入
if ($data['mtime'] < $filemetadata['mtime']) {
C::t('pichome_resources')->delete_by_rid($rid);
$filemetadata['rid'] = $this->createrid();
$filemetadata['filename'] = $filemetadata['name'];
$filemetadata['file'] = $file;
$filemetadata['thumbfile'] = $thumbfile;
$filemetadata['rid'] = $rid;
$filemetadata['mtime'] = $filemetadata['mtime'] ? $filemetadata['mtime'] : $filemetadata['modificationTime'];
$filemetadata['btime'] = $filemetadata['btime'] ? $filemetadata['btime'] : $filemetadata['modificationTime'];
$filemetadata['dateline'] = $filemetadata['lastModified'];
$filemetadata['lastdate'] = $flastdate;
$this->exportfile($id,$filemetadata);
unset($filemetadata);
}
else {
//信息表数据记录
$setarr = [];
$setarr['searchval'] = $filemetadata['name'];
//查询原数据中的属性信息
$attrdata = C::t('pichome_resources_attr')->fetch($rid);
$filename = $filemetadata['name'] . '.' . $filemetadata['ext'];
//检查reources数据变化
$resourcesarr = [
'name' => $filename,
'dateline' => $filemetadata['lastModified'],
'isdelete' => $filemetadata['isDeleted'],
'grade' => $filemetadata['star'] ? intval($filemetadata['star']) : 0,
'lastdate' => $flastdate
];
$file = str_replace('/', BS, $file);
$attachment = str_replace($this->path . BS, '', $file);
$path = str_replace('/', BS, $attachment);
$thumb = (is_file($thumbfile)) ? 1 : 0;
$setarr['path'] = $path;
$resourcesarr['hasthumb'] = $thumb;
$resourcesarr['rid'] = $rid;
if (C::t('#eagle#eagle_record')->insert_data($id, $resourcesarr)) {
//检查标签变化
//标签数据
$tags = $filemetadata['tags'];
$setarr['searchval'] .= implode('', $tags);
//现有标签
$tagids = [];
//原有标签
$oldtids = [];
if ($attrdata['tag']) $oldtids = explode(',', $attrdata['tag']);
if (!empty($tags)) {
$tagids = $this->addtag($tags);
$setarr['tag'] = implode(',', $tagids);
}
$addtags = array_diff($tagids, $oldtids);
$deltags = array_diff($oldtids, $tagids);
if (!empty($deltags)) C::t('pichome_resourcestag')->delete_by_ridtid($rid, $deltags);
foreach ($addtags as $tid) {
$rtag = ['appid' => $this->appid, 'rid' => $rid, 'tid' => $tid];
C::t('pichome_resourcestag')->insert($rtag);
}
//检查标注变化
if (isset($filemetadata['comments'])) {
$cids = [];
foreach ($filemetadata['comments'] as $commentval) {
$tcommentval['id'] = $commentval['id'] . $this->appid;
$tcommentval['appid'] = $this->appid;
$tcommentval['rid'] = $rid;
$tcommentval['x'] = number_format($commentval['x'], 2);
$tcommentval['y'] = number_format($commentval['y'], 2);
$tcommentval['width'] = $commentval['width'];
$tcommentval['height'] = $commentval['height'];
$tcommentval['annotation'] = $commentval['annotation'];
$tcommentval['lastModified'] = $commentval['lastModified'];
try {
C::t('pichome_comments')->insert($tcommentval);
$setarr['searchval'] .= $tcommentval['annotation'];
} catch (Exception $e) {
}
$cids[] = $tcommentval['id'];
unset($tcommentval);
}
$ocids = C::t('pichome_comments')->fetch_id_by_rid($rid);
$delcids = array_diff($ocids, $cids);
if (!empty($delcids)) C::t('pichome_comments')->delete($delcids);
} else {
C::t('pichome_comments')->delete_by_rid($rid);
}
$rfids = [];
$orfids = C::t('pichome_folderresources')->fetch_id_by_rid($rid);
C::t('pichome_folderresources')->delete($orfids);
$setarr['searchval'] .= $resourcesarr['name'];
//$fids = [];
if(!empty($filemetadata['folders'])){
$realfids = C::t('#eagle#eagle_folderrecord')->fetch_fid_by_efid($filemetadata['folders'],$this->appid);
}
//检查目录变化
foreach ($realfids as $fv) {
$fid = trim($fv) . $this->appid;
if (!C::t('pichome_folder')->check_password_byfid($fid)) {
$frsetarr = ['appid' => $this->appid, 'rid' => $rid, 'fid' => $fid];
C::t('pichome_folderresources')->insert($frsetarr);
// $fids[] = $fid;
}
}
//尝试更新属性表数据
$setarr['link'] = $filemetadata['url'] ? trim($filemetadata['url']) : '';
//描述数据
$setarr['desc'] = $filemetadata['annotation'] ? $filemetadata['annotation'] : '';
$setarr['searchval'] .= $setarr['desc'] . $setarr['link'];
if ($filemetadata['duration']) $setarr['duration'] = number_format($filemetadata['duration'], 2);
$setarr['rid'] = $rid;
C::t('pichome_resources_attr')->insert($setarr);
unset($filemetadata);
unset($setarr);
}
}
}
else{
if(!$rdata){
$setarr = [
'appid'=>$this->appid,
'rid'=>$rid,
'eid'=>$id,
'dateline'=>$flastdate
];
C::t('#eagle#eagle_record')->insert($setarr);
}
}
} else {
if(!empty($filemetadata['folders'])){
$realfids = C::t('#eagle#eagle_folderrecord')->fetch_fid_by_efid($filemetadata['folders'],$this->appid);
}
if(!empty($realfids)){
//如果目录含有密码则不导入数据直接跳过
$haspassword = C::t('pichome_folder')->check_haspasswrod($realfids, $this->appid);
}else{
$haspassword = false;
}
if (!$haspassword) {
$filemetadataname = $this->getFileRealFileName($tmppath, $filemetadata['name'], $filemetadata['ext']);
$filename = $filemetadataname . '.' . $filemetadata['ext'];
$thumbname = $filemetadataname . '_thumbnail.png';
//echo $i.'middle:'.memory_get_usage()/1024 . '<br>';
$file = $tmppath . BS . $filename;
$thumbfile = $tmppath . BS . $thumbname;
//$filemd5 = md5_file($file);
$filemetadata['filename'] = $filemetadata['name'];
$filemetadata['file'] = $file;
unset($file);
$filemetadata['thumbfile'] = $thumbfile;
$filemetadata['folders'] = $realfids;
unset($thumbfile);
$filemetadata['rid'] = $this->createrid();
$filemetadata['mtime'] = $filemetadata['mtime'] ? $filemetadata['mtime'] : $filemetadata['modificationTime'];
$filemetadata['btime'] = $filemetadata['btime'] ? $filemetadata['btime'] : $filemetadata['modificationTime'];
$filemetadata['dateline'] = $filemetadata['lastModified'];
$filemetadata['lastdate'] = $flastdate;
$this->exportfile($id,$filemetadata);
unset($filemetadata);
}
}
}
} else {
//如果已有数据删除,否则不做处理
if (!$rid) C::t('pichome_resources')->delete_by_rid($rid);
}
$this->donum += 1;
$percent = floor(($this->donum / $this->filenum) * 100);
//防止因获取文件总个数不准确百分比溢出
$percent = ($percent > 100) ? 100 : $percent;
$state = ($percent >= 100) ? 3 : 2;
if ($state == 3) {
$spl_object = false;
@unlink($this->readtxt . 'eagleexport' . md5($this->path) . '.txt');
$lastid = 0;
} else {
$lastid = $this->donum;
}
//记录导入起始位置,以备中断后从此处,更改导入状态为正在导入
C::t('pichome_vapp')->update($this->appid, array('lastid' => $lastid, 'percent' => $percent, 'donum' => $this->donum, 'state' => $state, 'filenum' => $this->filenum));
if($spl_object) $spl_object->next();
}
}
return array('success' => true);
}
//校验文件
public function execCheckFile()
{
if ($this->exportstatus == 3) {
$total = DB::result_first("select count(rid) from %t where appid = %s ", array('pichome_resources', $this->appid));
//校验文件
$this->check_file($total);
}
return true;
}
public function check_file($total)
{
if ($this->lastid < 1) $this->lastid = 1;
$limitsql = ($this->lastid - 1) * $this->checklimit . ',' . $this->checklimit;
$delrids = [];
$data = DB::fetch_all("select rid,isdelete from %t where appid = %s order by lastdate asc limit $limitsql ", array('pichome_resources', $this->appid));
if (empty($data)) {
C::t('pichome_vapp')->update($this->appid, array('percent' => 0, 'state' => 4, 'lastid' => 0, 'donum' => 0));
//校验完成后更新目录文件数
foreach (DB::fetch_all("select count(rf.id) as num,f.fid from %t f left join %t rf on rf.fid=f.fid where f.appid = %s group by f.fid", array('pichome_folder', 'pichome_folderresources', $this->appid)) as $v) {
C::t('pichome_folder')->update($v['fid'], array('filenum' => $v['num']));
}
//修正库中文件数
$total = DB::result_first("select count(rid) from %t where appid = %s ", array('pichome_resources', $this->appid));
$hascatnum = DB::result_first("SELECT count(DISTINCT rid) FROM %t where appid = %s", array('pichome_folderresources', $this->appid));
$nosubfilenum = $total - $hascatnum;
C::t('pichome_vapp')->update($this->appid, array('filenum' => $total, 'nosubfilenum' => $nosubfilenum));
return true;
}
foreach ($data as $v) {
if ($v['isdelete']) {
$delrids[] = $v['rid'];
} else {
$id = C::t('#eagle#eagle_record')->fetch_eid_by_rid($v['rid'],$this->appid);
if(!$id){
$id = str_replace($this->appid, '', $v['rid']);
}
$filejson = $this->path . BS . 'images' . BS . $id . '.info' . BS . 'metadata.json';
if (!is_file($filejson)) {
$delrids[] = $v['rid'];
}
}
}
if (!empty($delrids)) {
//如果有需要删除的,删除后,则重新查询上一页数据
C::t('pichome_resources')->delete_by_rid($delrids);
if ($this->lastid == 1) {
$percent = round(($this->checklimit / $total) * 100);
} else {
$percent = round((($this->lastid - 1) * $this->checklimit / $total) * 100);
}
C::t('pichome_vapp')->update($this->appid, array('lastid' => $this->lastid, 'percent' => $percent, 'state' => 3));
} else {
if ($this->lastid == 1) {
$percent = round(($this->checklimit / $total) * 100);
} else {
$percent = round((($this->lastid - 1) * $this->checklimit / $total) * 100);
}
$percent = ($percent > 100) ? 100 : $percent;
C::t('pichome_vapp')->update($this->appid, array('lastid' => $this->lastid + 1, 'percent' => $percent, 'state' => 3));
}
}
public function exportfile($id,$filemetadata)
{
$rid = $filemetadata['rid'];
if (!is_file($filemetadata['file'])) {
return;
}
$filemetadata['file'] = str_replace('/', BS, $filemetadata['file']);
$attachment = str_replace('/', BS, $filemetadata['file']);
$path = str_replace($this->path . BS, '', $attachment);
unset($attachment);
$thumb = (is_file($filemetadata['thumbfile'])) ? 1 : 0;
//echo 'middle1:'.memory_get_usage()/1024 . '<br>';
$type = getTypeByExt($filemetadata['ext']);
$resourcesarr = [
'rid' => $rid,
'uid' => $this->uid,
'username' => $this->username,
'appid' => $this->appid,
'width' => $filemetadata['width'] ? $filemetadata['width'] : 0,
'height' => $filemetadata['height'] ? $filemetadata['height'] : 0,
'name' => $filemetadata['filename'] . '.' . $filemetadata['ext'],
'ext' => $filemetadata['ext'],
'size' => $filemetadata['size'],
'dateline' => $filemetadata['dateline'],
'btime' => $filemetadata['btime'],
'mtime' => $filemetadata['mtime'],
'isdelete' => $filemetadata['isDeleted'],
'hasthumb' => $thumb,
'grade' => $filemetadata['star'] ? intval($filemetadata['star']) : 0,
'type' => $type,
'lastdate' => $filemetadata['lastdate']
];
unset($type);
//插入文件表数据
if (C::t('#eagle#eagle_record')->insert_data($id,$resourcesarr)) {
DB::delete('pichome_folderresources', array('rid' => $rid));
//获取属性表数据
$setarr = [];
$setarr['searchval'] = $resourcesarr['name'];
//$fids = [];
//插入目录关联表数据
foreach ($filemetadata['folders'] as $fv) {
$fid = $fv;
if (!C::t('pichome_folder')->check_password_byfid($fid)) {
$frsetarr = ['appid' => $this->appid, 'rid' => $rid, 'fid' => $fid];
C::t('pichome_folderresources')->insert($frsetarr);
//$fids[] = $fid;
unset($frsetarr);
}
}
/* if(!empty($fids)){
foreach(DB::fetch_all("select fname from %t where fid in(%n)",array('pichome_folder',$fids)) as $foldername){
$setarr['searchval'] .= $foldername['fname'];
}
}*/
//标签数据
$tags = $filemetadata['tags'];
$setarr['searchval'] .= implode('', $tags);
if (!empty($tags)) {
$tagids = $this->addtag($tags);
unset($tags);
foreach ($tagids as $tid) {
$rtag = ['appid' => $this->appid, 'rid' => $rid, 'tid' => $tid];
C::t('pichome_resourcestag')->insert($rtag);
}
$setarr['tag'] = implode(',', $tagids);
unset($tagids);
}
//颜色数据
if (isset($filemetadata['palettes'])) {
$returndata = $this->getColor($filemetadata['palettes'], $resourcesarr['width'], $resourcesarr['height'], $rid);
$setarr['colors'] = $returndata['colors'];
$setarr['gray'] = $returndata['gray'];
$setarr['shape'] = $returndata['shape'];
unset($returndata);
}
//标注数据
if (isset($filemetadata['comments'])) {
foreach ($filemetadata['comments'] as $commentval) {
$tcommentval['id'] = $commentval['id'] . $this->appid;
$tcommentval['appid'] = $this->appid;
$tcommentval['rid'] = $rid;
$tcommentval['x'] = number_format($commentval['x'], 2);
$tcommentval['y'] = number_format($commentval['y'], 2);
$tcommentval['width'] = $commentval['width'];
$tcommentval['height'] = $commentval['height'];
$tcommentval['annotation'] = $commentval['annotation'];
$tcommentval['lastModified'] = $commentval['lastModified'];
C::t('pichome_comments')->insert($tcommentval);
$setarr['searchval'] .= $commentval['annotation'];
unset($tcommentval);
}
}
//时长
if ($filemetadata['duration']) $setarr['duration'] = number_format($filemetadata['duration'], 2);
//链接数据
$setarr['link'] = $filemetadata['url'] ? trim($filemetadata['url']) : '';
//描述数据
$setarr['desc'] = $filemetadata['annotation'] ? $filemetadata['annotation'] : '';
$setarr['searchval'] .= $setarr['desc'] . $setarr['link'];
$setarr['rid'] = $rid;
$setarr['appid'] = $this->appid;
$setarr['path'] = $path;
//echo '属性插入前缓存:'.memory_get_usage()/1024 . '<br>';
//插入数据
C::t('pichome_resources_attr')->insert($setarr);
//echo '属性插入后缓存:'.memory_get_usage()/1024 . '<br>';
} else {
runlog('eagleexport', $rid);
}
}
//判断图片纯色
public function isgray($colors)
{
$i = 0;
if (count($colors) < 1) return 0;
foreach ($colors as $color) {
$color = new Color($color);
$rgb = $color->toRGB();
unset($color);
if (abs($rgb[0] - $rgb[1]) < 10 && abs($rgb[2] - $rgb[1]) < 10) {
$i++;
}
unset($rgb);
}
if ($i == count($colors)) {
return 1;
} else {
return 0;
}
}
//获取颜色数据
public function getColor($colors, $width, $height, $rid)
{
//echo '颜色处理前:'.memory_get_usage()/1024 . '<br>';
$intcolorsarr = $returndata = [];
$i = 1;
foreach ($colors as $c) {
$color = new \Color($c['color']);
//获取颜色整型值
$intcolor = $color->toInt();
$palattedataarr = ['rid' => $rid, 'color' => $intcolor, 'weight' => $c['ratio'], 'r' => $c['color'][0], 'g' => $c['color'][1], 'b' => $c['color'][2]];
$intcolorsarr[] = $intcolor;
//echo "颜色处理中前 $i :".memory_get_usage()/1024 . '<br>';
C::t('pichome_palette')->insert($palattedataarr);
//echo "颜色处理中后 $i :".memory_get_usage()/1024 . '<br>';
$i++;
}
unset($colors);
//颜色整型值数据
// $intcolorsarr= array_keys($palattedataarr);
$returndata['colors'] = implode(',', $intcolorsarr);
$returndata['gray'] = $this->isgray($intcolorsarr);
$returndata['shape'] = round(($width / $height) * 100);
unset($intcolorsarr);
//echo '颜色处理后缓存:'.memory_get_usage()/1024 . '<br>';
return $returndata;
}
//添加标签
public function addtag($tags)
{
$tagids = [];
foreach ($tags as $v) {
if (!preg_match('/^\s*$/', $v)) {
if ($tid = C::t('pichome_tag')->insert($v)) {
$tagids[] = $tid;
}
}
}
unset($tags);
return $tagids;
}
}

View File

@@ -0,0 +1,92 @@
<?php
/*
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
* @license https://www.oaooa.com/licenses/
*
* @link https://www.oaooa.com
* @author zyx(zyx@oaooa.com)
*/
if(!defined('IN_OAOOA')) {
exit('Access Denied');
}
class table_eagle_folderrecord extends dzz_table
{
public function __construct() {
$this->_table = 'eagle_folderrecord';
$this->_pk = 'id';
parent::__construct();
}
public function createfidby_efidappid($efid,$appid){
//如果没有记录值
if (!$fid = DB::result_first("select fid from %t where efid = %s", array($this->_table, $efid))){
//检查是否有旧版数据记录值
$fid = $efid.$appid;
if(!DB::result_first("select fid from %t where fid = %s",array('pichome_folder',$fid))){
$fid = C::t('pichome_folder')->createfidbyappid($appid);
}
$setarr = [
'appid'=>$appid,
'efid'=>$efid,
'fid'=>$fid
];
parent::insert($setarr);
}
return $fid;
}
public function insert_folderdata_by_appid($appid,$folderdata,$pfid='',$pathkey='',$fids=[])
{
foreach ($folderdata as $k => $v) {
$id = $v['id'];
//获取或生成记录fid值
$fid = $this->createfidby_efidappid($id,$appid);
$setarr=['fid'=>$fid,'fname'=>$v['name'],'dateline'=>TIMESTAMP,'pfid'=>$pfid,'appid'=>$appid,'pathkey'=> ($pathkey)?$pathkey.$fid:$fid,'disp'=>$k];
$fid = C::t('pichome_folder')->insert_data($setarr);
$fids[] = $id;
if($v['children']){
$fids = $this->insert_folderdata_by_appid($appid,$v['children'],$fid,($pathkey)?$pathkey.$fid:$fid,$fids);
}
}
return $fids;
}
public function delete_by_fid($fids,$appid){
if(!is_array($fids)) $fids = (array)$fids;
$delfid = $delid = [];
foreach(DB::fetch_all("select fid,id from %t where fid in(%n) and appid = %s",array($this->_table,$fids,$appid)) as $v){
$delfid[] = $v['fid'];
$delid[] = $v['id'];
}
if(!empty($delfid))C::t('pichome_folder')->delete_by_fids($delfid);
parent::delete($delid);
}
public function delete_by_ids($ids){
if(!array($ids)) $ids = (array)$ids;
$fids = [];
foreach(DB::fetch_all("select fid from %t where id in(%n)",array($this->_table,$ids)) as $v){
$fids[] = $v['fid'];
}
if(!empty($fids))C::t('pichome_folder')->delete_by_fids($fids);
parent::delete($ids);
}
public function delete_by_appid($appid){
DB::delete($this->_table,array('appid'=>$appid));
}
public function fetch_fid_by_efid($efids,$appid){
$fids = [];
foreach(DB::fetch_all("select fid from %t where efid in(%n) and appid = %s",array($this->_table,$efids,$appid)) as $v){
$fids[] = $v['fid'];
}
return $fids;
}
}

View File

@@ -0,0 +1,54 @@
<?php
/*
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
* @license https://www.oaooa.com/licenses/
*
* @link https://www.oaooa.com
* @author zyx(zyx@oaooa.com)
*/
if(!defined('IN_OAOOA')) {
exit('Access Denied');
}
class table_eagle_record extends dzz_table
{
public function __construct() {
$this->_table = 'eagle_record';
$this->_pk = 'id';
parent::__construct();
}
public function insert_data($eid,$setarr){
if(C::t('pichome_resources')->insert($setarr)){
$setarr1['rid'] = $setarr['rid'];
$setarr1['appid'] = $setarr['appid'];
$setarr1['eid'] = $eid;
$setarr1['dateline']=$setarr['lastdate'];
$id = DB::result_first("select id from %t where eid = %s and appid = %s",array($this->_table,$eid,$setarr['appid']));
if($id){
parent::update($id,$setarr1);
}else{
parent::insert($setarr1);
}
}
return true;
}
public function delete_by_appid($appid){
DB::delete($this->_table,array('appid'=>$appid));
}
public function delete_by_rids($rids){
if (!is_array($rids)) $rids = (array)$rids;
DB::delete($this->_table,'rid in ('.dimplode($rids).')');
}
public function fetch_by_eid($eid,$appid){
return DB::fetch_first("select * from %t where eid = %s and appid = %s",array($this->_table,$eid,$appid));
}
public function fetch_eid_by_rid($rid,$appid){
return DB::result_first("select eid from %t where rid = %s",array($this->_table,$rid,$appid));
}
}

View File

@@ -0,0 +1,20 @@
<?php
namespace dzz\eagle\classes;
use \core as C;
use \DB as DB;
class deleteafter
{
public function run($data)
{
C::t('#eagle#eagle_record')->delete_by_rids($data['rids']);
}
}

View File

@@ -0,0 +1,18 @@
<?php
namespace dzz\eagle\classes;
use \core as C;
use \DB as DB;
use \fmpeg as fmpeg;
class delpichomefolderafter
{
public function run($appid)
{
C::t("#eagle#eagle_folderrecord")->delete_by_appid($appid);
}
}

View File

@@ -0,0 +1,48 @@
<?php
namespace dzz\eagle\classes;
use \core as C;
use \DB as DB;
class getpichomethumb
{
public function run(&$data)
{
/*$thumbid = DB::result_first("select thumb from %t where appid = %s and rid = %s", array('billfish_record', $data['appid'], $data['rid']));
if(isset($data['version']) && $data['version'] > 16){
$bid = DB::result_first("select bid from %t where rid = %s",array('billfish_record',$data['rid']));
$thumbdir = dechex($bid);
$thumbdir = (string) $thumbdir;
if(strlen($thumbdir) < 2){
$thumbdir =str_pad($thumbdir,2,0,STR_PAD_LEFT);
}
$pathdir = $data['apppath'].BS.'.bf'.BS.'.preview'.BS.$thumbdir.BS.$bid.'.small.webp';
return array('icon'=>$pathdir);
}else{
if (strlen($thumbid) < 9) {
$thumbid = str_pad($thumbid,9,0,STR_PAD_LEFT);
}
$pathdir = $data['apppath'].BS.'.bf'.BS.'.preview';
$thumbpatharr = $this->mbStrSplit($thumbid,3);
array_pop($thumbpatharr);
$thumbpath = implode(BS,$thumbpatharr);
return array('icon'=>$pathdir.BS.$thumbpath.BS.$thumbid.'.webp');
}*/
}
/* function mbStrSplit ($string, $len=1) {
$start = 0;
$strlen = mb_strlen($string);
while ($strlen) {
$array[] = mb_substr($string,$start,$len,"utf8");
$string = mb_substr($string, $len, $strlen,"utf8");
$strlen = mb_strlen($string);
}
return $array;
}*/
}

View File

@@ -0,0 +1,24 @@
<?php
namespace dzz\eagle\classes;
use \core as C;
use \DB as DB;
use \fmpeg as fmpeg;
class pichomevappdelete
{
public function run($data)
{
if($data['apptype'] == 0){
C::t("#eagle#eagle_record")->delete_by_appid($data['appid']);
C::t("#eagle#eagle_folderrecord")->delete_by_appid($data['appid']);
}
return true;
}
}

View File

@@ -43,6 +43,14 @@ class info
if (isset($info['duration'])) C::t('pichome_resources_attr')->update($data['rid'], array('duration' => $info['duration']));
if (isset($info['width'])) C::t('pichome_resources')->update($data['rid'], array('width' => $info['width'], 'height' => $info['height']));
C::t('pichome_ffmpeg_record')->update($data['rid'],array('infostatus'=>1));
$fdata = C::t('pichome_ffmpeg_record')->fetch($data['rid']);
if($fdata['thumbstatus'] == 1 && $fdata['infostatus'] == 1){
if(!DB::result_first("select isget from %t where rid = %s",array('pichome_resources_attr',$data['rid']))) {
C::t('pichome_resources_attr')->update($data['rid'],array('isget'=>1));
C::t('pichome_vapp')->add_getinfonum_by_appid($data['appid'], 1);
}
}
}
} catch (\Exception $e) {

View File

@@ -56,6 +56,13 @@ class thumb
C::t('pichome_resources')->update($data['rid'],$resourcesarr);
C::t('pichome_resources')->update($data['rid'], array('hasthumb' => 1));
C::t('pichome_ffmpeg_record')->update($data['rid'], array('thumbstatus' => 1,'thumb'=>$target));
$fdata = C::t('pichome_ffmpeg_record')->fetch($data['rid']);
if($fdata['thumbstatus'] == 1 && $fdata['infostatus'] == 1){
if(!DB::result_first("select isget from %t where rid = %s",array('pichome_resources_attr',$data['rid']))) {
C::t('pichome_resources_attr')->update($data['rid'],array('isget'=>1));
C::t('pichome_vapp')->add_getinfonum_by_appid($data['appid'], 1);
}
}
}
}

View File

@@ -14,13 +14,14 @@ if(empty($appids)){
exit('success');
}
$locked = true;
for($i=0;$i<1;$i++){
/*for($i=0;$i<1;$i++){
$processname = 'DZZ_LOCK_PICHOMEGETINFO'.$i;
if (!dzz_process::islocked($processname, 60*60)) {
$locked=false;
break;
}
}
}*/
$i = 0;
$processname = 'DZZ_LOCK_PICHOMEGETINFO'.$i;
$limit = 10;
$start=$i*$limit;
@@ -55,7 +56,10 @@ order by infodonum asc limit $start,$limit",array('pichome_ffmpeg_record',$appid
}
//如果信息和缩略图标记为已生成,标记该文件信息状态为已获取
if($v['thumbstatus'] == 1 && $v['infostatus'] == 1){
C::t('pichome_resources_attr')->update($v['rid'],array('isget'=>1));
if(!DB::result_first("select isget from %t where rid = %s",array('pichome_resources_attr',$v['rid']))) {
C::t('pichome_resources_attr')->update($v['rid'], array('isget' => 1));
C::t('pichome_vapp')->add_getinfonum_by_appid($v['appid'], 1);
}
dzz_process::unlock($processname1);
continue;
}
@@ -66,6 +70,6 @@ order by infodonum asc limit $start,$limit",array('pichome_ffmpeg_record',$appid
}
dzz_process::unlock($processname);
if(DB::result_first("select * from %t where infostatus = 0 ",array('pichome_ffmpeg_record'))){
dfsockopen(getglobal('localurl') . 'index.php?mod=ffmpeg&op=getinfo', 0, '', '', false, '', 0.1);
dfsockopen(getglobal('localurl') . 'index.php?mod=ffmpeg&op=getinfo', 0, '', '', false, '', 5*60);
}
exit('success');

View File

@@ -20,13 +20,14 @@ if(empty($appids)){
exit('success');
}
$locked = true;
for($i=0;$i<1;$i++){
/*for($i=0;$i<1;$i++){
$processname = 'DZZ_LOCK_PICHOMEGETVIDOTHUMB'.$i;
if (!dzz_process::islocked($processname, 60*60)) {
$locked=false;
break;
}
}
}*/
$i = 0;
$processname = 'DZZ_LOCK_PICHOMEGETVIDOTHUMB'.$i;
$limit = 10;
$start=$i*$limit;
@@ -60,7 +61,10 @@ order by thumbdonum asc limit $start,$limit",array('pichome_ffmpeg_record',$appi
}
//如果信息和缩略图标记为已生成,标记该文件信息状态为已获取
if($v['thumbstatus'] == 1 && $v['infostatus'] == 1){
C::t('pichome_resources_attr')->update($v['rid'],array('isget'=>1));
if(!DB::result_first("select isget from %t where rid = %s",array('pichome_resources_attr',$v['rid']))) {
C::t('pichome_resources_attr')->update($v['rid'], array('isget' => 1));
C::t('pichome_vapp')->add_getinfonum_by_appid($v['appid'], 1);
}
dzz_process::unlock($processname1);
continue;
}
@@ -72,6 +76,6 @@ order by thumbdonum asc limit $start,$limit",array('pichome_ffmpeg_record',$appi
}
dzz_process::unlock($processname);
if(DB::result_first("select * from %t where thumbstatus = 0 ",array('pichome_ffmpeg_record'))){
dfsockopen(getglobal('localurl') . 'index.php?mod=ffmpeg&op=thumb', 0, '', '', false, '', 0.1);
dfsockopen(getglobal('localurl') . 'index.php?mod=ffmpeg&op=thumb', 0, '', '', false, '', 5*60);
}
exit('success');

View File

@@ -75,6 +75,8 @@ class getColor
$palette = new ImagePalette($img, 1, 10, $lib, $this->palette);
$palettes = $palette->palette;
} catch (\Exception $e) {
$processname1 = 'PICHOMEGETCOLOR_'.$data['rid'];
dzz_process::unlock($processname1);
runlog('imageColor', $e->getMessage() . ' img=' . $img);
}
@@ -87,7 +89,7 @@ class getColor
foreach ($palettes as $k => $v) {
$color = new \Color($k);
$rgbcolor = $color->toRgb();
$data = [
$tdata = [
'rid' => $data['rid'],
'color' => $k,
'r' => $rgbcolor[0],
@@ -95,9 +97,12 @@ class getColor
'b' => $rgbcolor[2],
'weight' => $v
];
C::t('pichome_palette')->insert($data);
C::t('pichome_palette')->insert($tdata);
C::t('pichome_imagickrecord')->update($data['rid'], array('colorstatus' => 1));
C::t('pichome_resources_attr')->update($data['rid'], array('isget' => 1));
if(!DB::result_first("select isget from %t where rid = %s",array('pichome_resources_attr',$data['rid']))) {
C::t('pichome_resources_attr')->update($data['rid'],array('isget'=>1));
C::t('pichome_vapp')->add_getinfonum_by_appid($data['appid'], 1);
}
}
@@ -144,24 +149,34 @@ class getColor
$im->setResolution($width, $height); //设置图像分辨率
$im->setCompressionQuality(80); //压缩比
try {
$im->readImage($data['realpath'] . '[0]'); //设置读取pdf的第一页
} catch (\Exception $e) {
runlog('pdfthumb', iconv("gbk", 'utf-8', $e->getMessage()));
}
//$im->thumbnailImage(200, 100, true); // 改变图像的大小
$im->scaleImage($width, $height, true); //缩放大小图像
//缩放大小图像
try {
$im->scaleImage($width, $height, true);
}catch (\Exception $e){
runlog('pdfthumb', iconv("gbk", 'utf-8', $e->getMessage()));
}
$filename = getglobal('setting/attachdir') . './' . $target;
try {
if ($im->writeImage($filename) == true) {
$imginfo = @getimagesize($filename);
$resourcesarr = [
'width' => $imginfo[0] ? $imginfo[0]:0,
'height' =>$imginfo[1] ? $imginfo[1]:0
];
C::t('pichome_resources')->update($data['rid'],$resourcesarr);
C::t('pichome_imagickrecord')->update($data['rid'], array('thumbstatus' => 1,'colorstatus'=>1,'path'=>$filename));
C::t('pichome_resources')->update($data['rid'], array('hasthumb' => 1));
}
if ($im->writeImage($filename) == true) {
$imginfo = @getimagesize($filename);
$resourcesarr = [
'width' => $imginfo[0] ? $imginfo[0]:0,
'height' =>$imginfo[1] ? $imginfo[1]:0
];
C::t('pichome_resources')->update($data['rid'],$resourcesarr);
C::t('pichome_imagickrecord')->update($data['rid'], array('thumbstatus' => 1,'colorstatus'=>1,'path'=>$filename));
C::t('pichome_resources')->update($data['rid'], array('hasthumb' => 1));
}catch (\Exception $e){
runlog('pdfthumb', iconv("gbk", 'utf-8', $e->getMessage()));
}
}

View File

@@ -14,19 +14,21 @@ if(empty($appids)){
exit('success');
}
$locked = true;
for($i=0;$i<1;$i++){
/*for($i=0;$i<1;$i++){
$processname = 'DZZ_LOCK_PICHOMEGETCOLOR'.$i;
if (!dzz_process::islocked($processname, 60*60)) {
$locked=false;
break;
}
}
}*/
$i = 0;
$processname = 'DZZ_LOCK_PICHOMEGETCOLOR'.$i;
$limit = 10;
$start=$i*$limit;
if (!dzz_process::islocked($processname, 60*60)) {
$locked=false;
}
//dzz::unlock($processname);
if ($locked) {
exit(json_encode( array('error'=>'进程已被锁定请稍后再试')));
}
@@ -62,7 +64,11 @@ order by thumbdonum asc,colordonum asc limit $start,$limit",array('pichome_imagi
}
//如果颜色和缩略图标记为已生成,标记该文件信息状态为已获取
if($v['thumbstatus'] == 1 && $v['colorstatus'] == 1){
C::t('pichome_resources_attr')->update($v['rid'],array('isget'=>1));
if(!DB::result_first("select isget from %t where rid = %s",array('pichome_resources_attr',$v['rid']))){
C::t('pichome_resources_attr')->update($v['rid'],array('isget'=>1));
C::t('pichome_vapp')->add_getinfonum_by_appid($v['appid'], 1);
}
dzz_process::unlock($processname1);
continue;
}
@@ -81,6 +87,6 @@ order by thumbdonum asc,colordonum asc limit $start,$limit",array('pichome_imagi
}
dzz_process::unlock($processname);
if(DB::result_first("select count(*) from %t where thumbstatus = 0 or colorstatus = 0 ",array('pichome_imagickrecord'))){
dfsockopen(getglobal('localurl') . 'index.php?mod=imageColor&op=index', 0, '', '', false, '', 0.1);
dfsockopen(getglobal('localurl') . 'index.php?mod=imageColor&op=index', 0, '', '', false, '', 5*60);
}
exit('success'.$i);

View File

@@ -6,83 +6,119 @@
* @link https://www.oaooa.com
* @author zyx(zyx@oaooa.com)
*/
if ( !defined( 'IN_OAOOA' ) ) {
exit( 'Access Denied' );
if (!defined('IN_OAOOA')) {
exit('Access Denied');
}
$fpath = isset($_GET['fpath']) ? trim($_GET['fpath']):'';
if(!$fpath = dzzdecode(rawurldecode($fpath), '', 0)){
if (!$path = dzzdecode(rawurldecode($_GET['path']), '', 0)) {
@header('HTTP/1.1 404 Not Found');
@header('Status: 404 Not Found');
}
$rid = $path;
$resourcesdata = C::t('pichome_resources')->fetch($rid);
if(!$resourcesdata){
exit('file is not exists');
}
$resourattrdata = C::t('pichome_resources_attr')->fetch($rid);
$resourcesdata = array_merge($resourcesdata, $resourattrdata);
$appdata = C::t('pichome_vapp')->fetch($resourcesdata['appid']);
if ($resourcesdata['hasthumb']) {
//如果是本地文件
if ($appdata['type'] == 1) {
$filename = 'pichomethumb' . BS . $resourcesdata['appid'] . BS . md5($resourcesdata['path']) . '.jpg';
$thumbpath = getglobal('setting/attachurl') . $filename;
} elseif ($resourcesdata['apptype'] == 0) {
$resourcesdata['path'] = str_replace('\\', '/', $resourcesdata['path']);
$filepath = dirname($resourcesdata['path']);
$filename = substr($resourcesdata['path'], strrpos($resourcesdata['path'], '/') + 1);
$filename = str_replace(strrchr($filename, "."), "", $filename);
$filepath = str_replace('/', BS, $filepath);
$tmppath = $appdata['path'];
$thumbpath = $tmppath . BS . $filepath . BS . $filename . '_thumbnail.png';
} else {
$hookdata = ['rid' => $resourcesdata['rid'], 'apppath' => $appdata['path'], 'appid' => $resourcesdata['appid'], 'version' => $appdata['version']];
$return = Hook::listen('getpichomethumb', $hookdata);
$thumbpath = str_replace(DZZ_ROOT, '', $return[0]['icon']);
}
} else {
if ($resourcesdata['type'] == 'commonimage') {
$thumbpath = $appdata['path'] . BS . $resourcesdata['path'];
} else {
$thumbpath = geticonfromext($resourcesdata['ext'], $resourcesdata['type']);
}
}
}else{
$thumbpath = $fpath;
}
if ( !$path = dzzdecode(rawurldecode( $_GET[ 'path' ] ),'',0 ) ) {
@header( 'HTTP/1.1 404 Not Found' );
@header( 'Status: 404 Not Found' );
exit( 'Access Denied' );
}
$url = $path;
$filename = rtrim( $_GET[ 'n' ], '.dzz' );
$ext = strtolower( substr( strrchr( $filename, '.' ), 1, 10 ) );
if ( !$ext )$ext = strtolower( substr( strrchr( preg_replace( "/\.dzz$/i", '', preg_replace( "/\?.*/i", '', $url ) ), '.' ), 1, 10 ) );
$mime = dzz_mime::get_type( $ext );
if ( is_file( $url ) ) {
$url = $thumbpath;
$filename = rtrim($_GET['n'], '.dzz');
$ext = strtolower(substr(strrchr($filename, '.'), 1, 10));
if (!$ext) $ext = strtolower(substr(strrchr(preg_replace("/\.dzz$/i", '', preg_replace("/\?.*/i", '', $url)), '.'), 1, 10));
$mime = dzz_mime::get_type($ext);
if (is_file($url)) {
$filename = $url;
$start = 0;
$total = filesize( $filename );
header("Cache-Control: private, max-age=2592000, pre-check=2592000");
header("Pragma: private");
header("Expires: ".date(DATE_RFC822,strtotime(" 30 day")));
header('Last-Modified: '.gmdate('D, d M Y H:i:s',filemtime($filename)).' GMT');
if ( isset( $_SERVER[ 'HTTP_RANGE' ] ) ) {
$range = str_replace( '=', '-', $_SERVER[ 'HTTP_RANGE' ] );
$range = explode( '-', $range );
if ( isset( $range[ 2 ] ) && intval( $range[ 2 ] ) > 0 ) {
$end = trim( $range[ 2 ] );
$total = filesize($filename);
header("Cache-Control: private, max-age=2592000, pre-check=2592000");
header("Pragma: private");
header("Expires: " . date(DATE_RFC822, strtotime(" 30 day")));
header('Last-Modified: ' . gmdate('D, d M Y H:i:s', filemtime($filename)) . ' GMT');
if (isset($_SERVER['HTTP_RANGE'])) {
$range = str_replace('=', '-', $_SERVER['HTTP_RANGE']);
$range = explode('-', $range);
if (isset($range[2]) && intval($range[2]) > 0) {
$end = trim($range[2]);
} else {
$end = $total - 1;
}
$start = trim( $range[ 1 ] );
$start = trim($range[1]);
$size = $end - $start + 1;
header( 'HTTP/1.1 206 Partial Content' );
header( 'Content-Length:' . $size );
header( 'Content-Range: bytes ' . $start . '-' . $end . '/' . $total );
header('HTTP/1.1 206 Partial Content');
header('Content-Length:' . $size);
header('Content-Range: bytes ' . $start . '-' . $end . '/' . $total);
} else {
$size = $end = $total;
header( 'HTTP/1.1 200 OK' );
header( 'Content-Length:' . $size );
header( 'Content-Range: bytes 0-' . ( $total - 1 ) . '/' . $total );
header('HTTP/1.1 200 OK');
header('Content-Length:' . $size);
header('Content-Range: bytes 0-' . ($total - 1) . '/' . $total);
}
header( 'Accenpt-Ranges: bytes' );
header( 'Content-Type:' . $mime );
$fp = fopen( $filename, 'rb' );
fseek( $fp, $start, 0 );
header('Accenpt-Ranges: bytes');
header('Content-Type:' . $mime);
$fp = fopen($filename, 'rb');
fseek($fp, $start, 0);
$cur = $start;
@ob_end_clean();
if ( getglobal( 'gzipcompress' ) )@ob_start( 'ob_gzhandler' );
while ( !feof( $fp ) && $cur <= $end && ( connection_status() == 0 ) ) {
print fread( $fp, min( 1024 * 16, ( $end - $cur ) + 1 ) );
if (getglobal('gzipcompress')) @ob_start('ob_gzhandler');
while (!feof($fp) && $cur <= $end && (connection_status() == 0)) {
print fread($fp, min(1024 * 16, ($end - $cur) + 1));
$cur += 1024 * 16;
}
fclose( $fp );
fclose($fp);
exit();
} else {
//$cachefile=$_G['siteurl']['attachdir'].'cache/'.play_cache_md5(file).'.'.$ext;
//$meta=IO::getMeta($path);
//$size=$meta['size'];
header("Cache-Control: private, max-age=2592000, pre-check=2592000");
header("Pragma: private");
header("Expires: ".date(DATE_RFC822,strtotime(" 30 day")));
header('Last-Modified: '.gmdate('D, d M Y H:i:s',filemtime($url)).' GMT');
header( 'Content-Type: ' . $mime );
header("Cache-Control: private, max-age=2592000, pre-check=2592000");
header("Pragma: private");
header("Expires: " . date(DATE_RFC822, strtotime(" 30 day")));
header('Last-Modified: ' . gmdate('D, d M Y H:i:s', filemtime($url)) . ' GMT');
header('Content-Type: ' . $mime);
//header('Content-Length:'.$size);
//header('Content-Range: bytes 0-'.($size-1).'/'.$size);
@ob_end_clean();
if ( getglobal( 'gzipcompress' ) )@ob_start( 'ob_gzhandler' );
@readfile( $url );
if (getglobal('gzipcompress')) @ob_start('ob_gzhandler');
@readfile($url);
@flush();
@ob_flush();
exit();

View File

@@ -0,0 +1,464 @@
<?php
if (!defined('IN_OAOOA')) {
exit('Access Denied');
}
@set_time_limit(0);
@ini_set('max_execution_time', 0);
require_once(DZZ_ROOT . './dzz/class/class_encode.php');
require_once libfile('function/user', '', 'user');
use \core as C;
use \DB as DB;
use \IO as IO;
use \ImagePalette as ImagePalette;
use \Color as Color;
class localexport
{
public $palette = array(
0x111111, 0xFFFFFF, 0x9E9E9E, 0xA48057, 0xFC85B3, 0xFF2727, 0xFFA34B, 0xFFD534, 0x47C595, 0x51C4C4, 0x2B76E7, 0x6D50ED
);
private $path = '';//待执行数据path
private $appid = 0;//库id
private $uid = 0;//用户id
private $username = null;//用户名
private $filenum = 0;//总文件数
private $getinfosizelimit = 100;//限制获取信心文件大小单位M
private $checklimit = 1000;
private $onceexportnum = 1000;
private $oncegetinfonum = 10000;
private $getinfonum = 0;
private $readtxt = DZZ_ROOT . './data/attachment/cache/';
private $exportstatus = 0;
private $donum = 0;
private $lastid = '';
private $charset = 'UTF-8';
private $allowext = '';
private $notallowext = '';
private $notallowdir = '';
private $getinfo = 0;
public function __construct($data = array())
{
global $Defaultallowext;
//获取导入记录表基本数据
$this->path = str_replace(BS, '/', $data['path']);
$this->appid = $data['appid'];
$this->uid = $data['uid'];
$this->username = $data['username'];
$this->exportstatus = $data['state'];
$this->donum = $data['donum'];
$this->filenum = $data['filenum'];
$this->lastid = $data['lastid'];
$this->getinfonum = $data['getinfonum'];
$this->getinfo = $data['getinfo'];
$data['allowext'] = ($data['allowext']) ? $data['allowext']:getglobal('setting/pichomeimportallowext');
//允许导入后缀
if ($data['allowext']) {
$allowext = str_replace(array('.', ',','+','$',"'",'^','(',')','[',']','{','}'), array('\.', '|','\+','\$',"'",'\^','\(',')','\[','\]','\{','\}'),$data['allowext']);
$this->allowext = str_replace('*', '.*', $allowext);
}
$data['notallowext'] = ($data['notallowext']) ? $data['notallowext']:getglobal('setting/pichomeimportnotallowext');
//禁止导入后缀
if ($data['notallowext']) {
$notallowext = str_replace(array('.', ',','+','$',"'",'^','(',')','[',']','{','}'), array('\.', '|','\+','\$',"'",'\^','\(',')','\[','\]','\{','\}'),$data['notallowext']);
$this->notallowext = str_replace('*', '.*', $notallowext);
}
//获取pichome设置的默认禁止导入目录
$notallowdir = getglobal('setting/pichomeimportnotdir') ? getglobal('setting/pichomeimportnotdir'):implode(',',$Defaultallowext);
//禁止导入目录
if ($notallowdir) {
$notallowdir = str_replace(array('.', ',','+','$',"'",'^','(',')','[',']','{','}'), array('\.', '|','\+','\$',"'",'\^','\(',')','\[','\]','\{','\}'), $notallowdir);
$this->notallowdir = str_replace('*', '.*', $notallowdir);
}
if ($data['charset']) $this->charset = $data['charset'];
}
//获取文件名
public function getbasename($filename)
{
return preg_replace('/^.+[\\\\\\/]/', '', $filename);
}
public function initExport()
{
$filedir = $this->path;
$readtxt = $this->readtxt . 'loaclexport' . md5($this->path) . '.txt';
$filenum = 0;
if (!is_file($readtxt)) {
C::t('pichome_vapp')->update($this->appid, array( 'state' => 1));
$thandle = fopen($readtxt, 'w+');
$fileinfo = $this->readdir($filedir, $thandle, $filenum);
fclose($thandle);
if ($fileinfo['error']) {
C::t('pichome_vapp')->update($this->appid, array('state' => 0));
return $fileinfo;
} else {
C::t('pichome_vapp')->update($this->appid, array('filenum' => $fileinfo['filenum'], 'state' => 2));
}
}
C::t('pichome_vapp')->update($this->appid, array('state' => 2));
return array('success' => true);
}
public function readdir($path, $thandle, &$filenum)
{
if (!is_dir($path)) {
return [];
}
$handle = dir($path);
if ($handle) {
while (($filename = $handle->read()) !== false) {
if ($this->charset != CHARSET) $convertfilename = diconv($filename, $this->charset, CHARSET);;
$newPath = $path . BS . $filename;
if (is_dir($newPath) && $filename != '.' && $filename != '..') {
if ((preg_match('/^(' . $this->notallowdir . ')$/i', $convertfilename))) {
continue;
}
fwrite($thandle, $newPath . "\t" . 'folder' . "\n");
$this->readdir($newPath, $thandle, $filenum);
} elseif (is_file($newPath)) {
if (($this->allowext && !preg_match('/^(' . $this->allowext . ')$/i', $convertfilename)) || ($this->notallowext && preg_match('/^(' . $this->notallowext . ')$/i', $convertfilename))) {
continue;
}
$filenum++;
fwrite($thandle, $newPath . "\n");
}
}
} else {
return array('error' => 'Read Dir Failer');
}
$handle->close();
return array('filenum' => $filenum);
}
public function execExport($force = false)
{
$filedir = $this->path;
$filedir = str_replace(array('/', './', '\\'), BS, $filedir);
$readtxt = $this->readtxt . 'loaclexport' . md5($this->path) . '.txt';
//如果txt为空直接进入下一步
if(filesize($readtxt) == 0){
@unlink($readtxt);
C::t('pichome_vapp')->update($this->appid, array('lastid' => 0, 'percent' => 100, 'donum' => 0, 'state' => 3, 'filenum' => $this->filenum));
return array('success' => true);
}
//检测是否安装了ffmpeg
if ($this->lastid) {
$start = $this->lastid;
} else $start = 0;
$spl_object = new SplFileObject($readtxt, 'rb');
$spl_object->seek($start);
if ($this->lastid < $this->filenum && $this->exportstatus == 2) {
$i = 0;
while (is_file($readtxt) && !$spl_object->eof()) {
$i++;
if ($i > $this->onceexportnum) {
break;
}
$file = $spl_object->current();
$file = trim($file);
$file = str_replace(array('/', './', '\\'), BS, $file);
$filearr = explode("\t", $file);
$filerelativepath = $filearr[0];
$filepath = str_replace($filedir . BS, '', $filerelativepath);
$p = new Encode_Core();
$this->charset = $p->get_encoding($filepath);
//如果是目录直接执行目录导入
if (isset($filearr[1]) && $filearr[1] == 'folder') {
if ($this->charset != CHARSET) $filepath = diconv($filepath, $this->charset, CHARSET);
$fid = $this->createfolerbypath($filepath);
$spl_object->next();
continue;
} else {
$hasrid = 0;
//保存路径,用于之后获取文件使用
$savepath = str_replace(array('/', './', '\\'), '/', $filearr[0]);
$savepath = str_replace($this->path . '/', '', $savepath);
if($rid = DB::result_first("select rid from %t where path = %s and appid = %s",
array('pichome_resources_attr',$savepath,$this->appid))){
$hasrid = 1;
}else{
//生成rid
$rid = $this->createRid();
}
$realfilepath = $filedir.BS.$filepath;
//如果文件不存在则删除记录
if (!is_file($realfilepath)) {
if($hasrid)C::t('pichome_resources')->delete_by_rid($rid);
$this->filenum -= 1;
} else {
//修改时间
$mtime = filemtime($realfilepath);
//创建时间
$ctime = filectime($realfilepath);
//获取文件后缀
$ext = substr(strrchr($realfilepath, '.'), 1);
$ext = strtolower($ext);
//获取文件类型
$type = getTypeByExt($ext);
//获取文件大小
$size = filesize($realfilepath);
//获取图片信息,以取得宽高
$imginfo = @getimagesize($realfilepath);
//去掉库路径,以便获取文件相对目录
$filepath = str_replace($filedir . BS, '', $filepath);
if ($this->charset != CHARSET) $filepath = diconv($filepath, $this->charset, CHARSET);
//获取文件名
$filename = $this->getbasename($filepath);
//不符合导入规则文件不允许导入,并减少总数
if (($this->allowext && !preg_match('/^(' . $this->allowext . ')$/i', $filename)) || ($this->notallowext && preg_match('/^(' . $this->notallowext . ')$/i', $filename))) {
$this->filenum -= 1;
} else {
//查询是否已有数据
$data = C::t('pichome_resources')->fetch($rid);
if (!$data) {
$setarr = [
'rid' => $rid,
'name' => $filename,
'lastdate' => $mtime,
'appid' => $this->appid,
'apptype' => 1,
'size' => $size,
'type' => $type,
'ext' => $ext,
'width' => ($imginfo[0]) ? $imginfo[0] : 0,
'height' => ($imginfo[1]) ? $imginfo[1] : 0,
'mtime' => $ctime * 1000,
'dateline' => $mtime * 1000,
'btime' => TIMESTAMP * 1000
];
if (C::t('pichome_resources')->insert($setarr)) {
$attrdata = [
'rid' => $rid,
'appid' => $this->appid,
'isget' => 0,
'path' => $savepath,
'searchval'=>$filename
];
C::t('pichome_resources_attr')->insert($attrdata);
$dirstr = dirname($filepath);
if ($dirstr != '.' && $dirstr != '..') {
$fid = $this->createfolerbypath($dirstr);
if ($fid) {
$frsetarr = ['appid' => $this->appid, 'rid' => $rid, 'fid' => $fid];
C::t('pichome_folderresources')->insert($frsetarr);
}
}
//插入获取信息数据
Hook::listen('pichomegetinfo',$setarr);
}
}
else {
if ($mtime > $data['lastdate']) {
$setarr = [
'lastdate' => $mtime,
'appid' => $this->appid,
'apptype' => 1,
'size' => $size,
'type' => $type,
'ext' => $ext,
'mtime' => $ctime * 1000,
'dateline' => $mtime * 1000,
'btime' => TIMESTAMP * 1000,
'width' => ($imginfo[0]) ? $imginfo[0] : 0,
'height' => ($imginfo[1]) ? $imginfo[1] : 0,
];
if (C::t('pichome_resources')->update($rid, $setarr)) {
$attrdata = [
'rid' => $rid,
'appid' => $this->appid,
'isget' => 0,
'path' => $savepath,
'searchval'=>$filename
];
C::t('pichome_resources_attr')->insert($attrdata);
//如果文件被替换强制插入获取信息数据
$setarr['isforce'] = 1;
Hook::listen('pichomegetinfo',$data);
}
}else{
//如果文件已存在,尝试插入获取信息数据
Hook::listen('pichomegetinfo',$data);
}
}
$this->donum += 1;
}
}
$percent = floor(($this->donum / $this->filenum) * 100);
$percent = ($percent > 100) ? 100 : $percent;
$state = ($percent >= 100) ? 3 : 2;
if ($state == 3) {
@unlink($readtxt);
$lastid = 0;
} else {
$lastid = $this->donum;
}
//记录导入起始位置,以备中断后从此处,更改导入状态为正在导入
C::t('pichome_vapp')->update($this->appid, array('lastid' => $lastid, 'percent' => $percent, 'donum' => $this->donum, 'state' => $state, 'filenum' => $this->filenum));
}
$spl_object->next();
}
}
return array('success' => true);
}
//生成rid
public function createRid(){
//订单年月
$ridmd = strtoupper(dechex(date('m'))) . date('d');
//订单时间戳
$ridms = substr(time(), -5) . substr(microtime(), 2, 5);
//订单号
$rid = md5($ridmd.$ridms. sprintf('%02d', rand(0, 99)).$this->appid);
return $rid;
}
//根据路径创建目录
public function createfolerbypath($path, $pfid = '')
{
if (!$path) {
return $pfid;
} else {
$patharr = explode(BS, $path);
//生成目录
foreach ($patharr as $fname) {
if (!$fname) continue;
//判断是否含有此目录
if ($fid = DB::result_first("select fid from %t where pfid=%s and appid=%s and fname=%s", array('pichome_folder', $pfid, $this->appid, $fname))) {
$pfid = $fid;
} else {
$parentfolder = C::t('pichome_folder')->fetch($pfid);
$fid = random(13) . $this->appid;
if (DB::result_first("select fid from %t where fid = %s", array('pichome_folder', $fid))) {
$fid = random(13) . $this->appid;
}
if ($parentfolder) {
$pathkey = $parentfolder['pathkey'] . $fid;
} else {
$pathkey = $fid;
}
$setarr = [
'fid' => $fid,
'fname' => $fname,
'appid' => $this->appid,
'dateline' => TIMESTAMP,
'pfid' => $pfid,
'pathkey' => $pathkey
];
if (C::t('pichome_folder')->insert($setarr)) $pfid = $fid;
}
}
}
return $pfid;
}
//校验文件
public function execCheckFile()
{
if ($this->exportstatus == 3) {
$total = DB::result_first("select count(rid) from %t where appid = %s ", array('pichome_resources', $this->appid));
//校验文件
$this->check_file($total);
}
return true;
}
public function check_file($total)
{
if ($this->lastid < 1) $this->lastid = 1;
$limitsql = ($this->lastid - 1) * $this->checklimit . ',' . $this->checklimit;
$delrids = [];
$data = DB::fetch_all("select rid,name,ext from %t where appid = %s order by lastdate asc limit $limitsql ", array('pichome_resources', $this->appid));
if (empty($data)) {
C::t('pichome_vapp')->update($this->appid, array('percent' => 0, 'state' => 4, 'lastid' => 0, 'donum' => 0));
//校验完成后更新目录文件数
foreach (DB::fetch_all("select count(rf.id) as num,f.fid from %t f left join %t rf on rf.fid=f.fid where f.appid = %s group by f.fid", array('pichome_folder', 'pichome_folderresources', $this->appid)) as $v) {
C::t('pichome_folder')->update($v['fid'], array('filenum' => $v['num']));
}
if($this->getinfo){
//开启器获取信息后执行获取文件信息
dfsockopen(getglobal('localurl') . 'index.php?mod=imageColor&op=index', 0, '', '', false, '', 1);
dfsockopen(getglobal('localurl') . 'index.php?mod=ffmpeg&op=getinfo', 0, '', '', false, '', 1);
dfsockopen(getglobal('localurl') . 'index.php?mod=ffmpeg&op=thumb', 0, '', '', false, '', 1);
}
$total = DB::result_first("select count(rid) from %t where appid = %s ", array('pichome_resources', $this->appid));
$hascatnum = DB::result_first("SELECT count(DISTINCT rid) FROM %t where appid = %s",array('pichome_folderresources',$this->appid));
$nosubfilenum = $total - $hascatnum;
$getinfonum = DB::result_first("SELECT count(ra.rid) FROM %t ra left join %t fc on ra.rid = fc.rid left join %t ic on ra.rid= ic.rid
where ra.appid = %s and ((ra.isget = 0 and ISNULL(fc.rid) and ISNULL(ic.rid)) or (ra.isget=1))",
array('pichome_resources_attr','pichome_ffmpeg_record','pichome_imagickrecord',$this->appid));
C::t('pichome_vapp')->update($this->appid,array('filenum'=>$total,'nosubfilenum'=>$nosubfilenum,'getinfonum'=>$getinfonum));
return true;
}
foreach ($data as $v) {
$rid = $v['rid'];
$filepath = DB::result_first("select `path` from %t where rid = %s and appid = %s", array('pichome_resources_attr', $rid, $this->appid));
$filepath = str_replace(array('/', './', '\\'), BS, $this->path . BS . $filepath);
//echo $v['name'].'<br>';
if (!is_file($filepath) || ($this->allowext && !preg_match('/^(' . $this->allowext . ')$/i', $v['name'])) || ($this->notallowext && preg_match('/^(' . $this->notallowext . ')$/i', $v['name']))) {
//echo $rid;
// echo $v['name']."\n";
// var_dump((!preg_match('/^(' . $this->allowext . ')$/i', $v['name'])));
//die;
$delrids[] = $rid;
}
}
if (!empty($delrids)) {
$this->filenum = $this->filenum - count($delrids);
//如果有需要删除的,删除后,则重新查询上一页数据
C::t('pichome_resources')->delete_by_rid($delrids);
if($this->lastid == 1){
$percent = round(($this->checklimit / $total) * 100);
}else{
$percent = round((($this->lastid - 1) * $this->checklimit / $total) * 100);
}
$percent = ($percent > 100) ? 100:$percent;
C::t('pichome_vapp')->update($this->appid, array('lastid' => $this->lastid, 'percent' => $percent, 'state' => 3, 'filenum' => $this->filenum));
} else {
if($this->lastid == 1){
$percent = round(($this->checklimit / $total) * 100);
}else{
$percent = round((($this->lastid - 1) * $this->checklimit / $total) * 100);
}
$percent = ($percent > 100) ? 100:$percent;
C::t('pichome_vapp')->update($this->appid, array('lastid' => $this->lastid + 1, 'percent' => $percent, 'state' => 3));
}
}
}

View File

@@ -0,0 +1,28 @@
<?php
namespace dzz\local\classes;
use \core as C;
use \DB as DB;
class deleteafter
{
public function run($data)
{
if(!empty($data['rids'])){
$appid = DB::result_first("select appid from %t where rid = %s",array('pichome_resources',$data['rids'][0]));
$appdata = C::t('pichome_vapp')->fetch($appid);
if($appdata['type'] == 1){
$delnum = count($data['rids']);
C::t('pichome_vapp')->add_getinfonum_by_appid($appid,-$delnum);
}
}
}
}

View File

@@ -62,8 +62,11 @@ if ($operation == 'addsearch') {//增加关键词搜索次数
$appid = isset($_GET['appid']) ? trim($_GET['appid']) : '';
$fids = isset($_GET['fids']) ? trim($_GET['fids']) : '';
$vappids = [];
foreach(DB::fetch_all("select appid from %t where isdelete = 0",array('pichome_vapp')) as $v){
$vappids[] = $v['appid'];
foreach(DB::fetch_all("select appid,path from %t where isdelete = 0",array('pichome_vapp')) as $v){
if(is_dir($v['path'])){
$vappids[] = $v['appid'];
}
}
if(empty($vappids)){
$wheresql .= ' and 0';
@@ -513,7 +516,8 @@ if ($operation == 'addsearch') {//增加关键词搜索次数
$cid = isset($_GET['cid']) ? $_GET['cid']:'';
if ($cid) {
if ($cid == -1) {
$sql .= " left join %t tr on isnull(tr.cid)";
$sql .= " left join %t tr on rt.tid=tr.tid ";
$wheresql .= " and isnull(tr.cid) ";
$params[] = 'pichome_tagrelation';
} else {
$sql .= " left join %t tr on tr.tid = rt.tid ";
@@ -823,8 +827,12 @@ if ($operation == 'addsearch') {//增加关键词搜索次数
$fids = isset($_GET['fids']) ? trim($_GET['fids']) : '';
$vappids = [];
foreach(DB::fetch_all("select appid from %t where isdelete = 0",array('pichome_vapp')) as $v){
$vappids[] = $v['appid'];
$vappids = [];
foreach(DB::fetch_all("select appid,path from %t where isdelete = 0",array('pichome_vapp')) as $v){
if(is_dir($v['path'])){
$vappids[] = $v['appid'];
}
}
if(empty($vappids)){
$wheresql .= ' and 0';
@@ -1230,7 +1238,7 @@ if ($operation == 'addsearch') {//增加关键词搜索次数
$wheresql .= " and r.isdelete < 1 ";
$data = array();
if ($skey == 'tag') {
$cid = isset($_GET['cid']) ? $_GET['cid']:'';
/*$cid = isset($_GET['cid']) ? $_GET['cid']:'';
if ($cid) {
if ($cid == -1) {
$sql .= " left join %t tr on isnull(tr.cid)";
@@ -1242,7 +1250,7 @@ if ($operation == 'addsearch') {//增加关键词搜索次数
$para[] = $cid;
}
}
}*/
$tagkeyword = isset($_GET['tagkeyword']) ? trim($_GET['tagkeyword']):'';
if ($tagkeyword) {
$sql .= " left join %t t on t.tid=rt.tid ";
@@ -1268,14 +1276,17 @@ if ($operation == 'addsearch') {//增加关键词搜索次数
$sql .= " left join %t g on g.cid = tr.cid ";
$params[] = 'pichome_taggroup';
if (!empty($para)) $params = array_merge($params, $para);
$sum = 0;
foreach (DB::fetch_all("$sql where $wheresql group by g.cid",$params) as $v) {
if($v['cid']){
$catdata[]=['cid'=>$v['cid'],'catname'=>$v['catname'],'num'=>$v['num']];
}else{
$catdata[]=['cid'=>0,'catname'=>'全部','num'=>$v['num']];
$catdata[]=['cid'=>-1,'catname'=>'未分类','num'=>$v['num']];
}
$sum += $v['num'];
}
$catdata[]=['cid'=>0,'catname'=>'全部','num'=>$sum];
}else{
//if (!empty($para)) $params = array_merge($params, $para);
@@ -1403,9 +1414,15 @@ if ($operation == 'addsearch') {//增加关键词搜索次数
$folderdata[$v['fid']] = ['fname'=>$v['fname'],'pathkey'=>$v['pathkey'],'appid'=>$v['appid']];
$folderdata[$v['fid']]['leaf'] = DB::result_first("select count(*) from %t where pfid = %s",array('pichome_folder',$v['fid'])) ? false:true;
}
if(!isset($_G['setting']['pichomefilterfileds'])){
$pichomefilterfileds = C::t('setting')->fetch_all('pichomefilterfileds');
}else{
$pichomefilterfileds = $_G['setting']['pichomefilterfileds'];
}
if ($appid) {
if ($data = DB::fetch_first("select * from %t where appid=%s ", array('pichome_vapp', $appid))) {
$data['filter'] = unserialize($data['filter']);
$data['filter'] = ($data['filter']) ? unserialize($data['filter']):$pichomefilterfileds;
// if($data['filter']){
foreach ($data['filter'] as $k => $v) {
if ($v['key'] == 'tag' && $v['chacked'] == 1) {
@@ -1428,13 +1445,10 @@ if ($operation == 'addsearch') {//增加关键词搜索次数
} else {
exit(json_encode(array('error' => true)));
}
} else {
if (isset($_G['setting']['pichomefilterfileds'])) {
exit(json_encode(array('success' => true, 'data' => $_G['setting']['pichomefilterfileds'],'folderdata'=>$folderdata,'tagdata'=>$tagdata,'shape'=>$shapelable)));
} else {
$setting = C::t('setting')->fetch_all('pichomefilterfileds');
exit(json_encode(array('success' => true, 'data' => $setting['pichomefilterfileds'],'folderdata'=>$folderdata,'tagdata'=>$tagdata,'shape'=>$shapelable)));
}
} else{
exit(json_encode(array('success' => true, 'data' => $pichomefilterfileds,'folderdata'=>$folderdata,'tagdata'=>$tagdata,'shape'=>$shapelable)));
}
} elseif ($operation == 'createshare') {//分享
@@ -1487,4 +1501,35 @@ if ($operation == 'addsearch') {//增加关键词搜索次数
C::t('user_setting')->update_by_skey('pichomeimageexpanded',$pichomeimageexpanded);
exit(json_encode(array('success' => true)));
}
}elseif($operation == 'gethostip'){
$iphost = [];
$os = PHP_OS;
if(preg_match('/^WIN(.+?)/i',$os)){
$host= gethostname();
}else{
$host = $_SERVER['SERVER_NAME'];
}
$host = $_SERVER['SERVER_NAME'];
$ip = gethostbyname($host);
$ip = filter_var($ip,FILTER_VALIDATE_IP);
if(!$ip || strpos($ip,'127') === 0){
if(preg_match('/^WIN(.+?)/i',$os)){
$host= gethostname();
}else{
$host = $_SERVER['SERVER_NAME'];
}
$ip = gethostbyname($host);
}
if($_SERVER['SERVER_PORT'] == 443){
$siteurl = 'https://'.$_SERVER['SERVER_NAME'];
} elseif($_SERVER["SERVER_PORT"] == 80) {
$siteurl = 'http://'.$_SERVER['SERVER_NAME'];
}else{
$ip = $ip . ':' . $_SERVER["SERVER_PORT"];
$siteurl = 'http://'.$_SERVER['SERVER_NAME'] . ':' . $_SERVER["SERVER_PORT"];
}
$iphost = ['ip'=>$ip,'siteurl'=>$siteurl];
exit(json_encode($iphost));
}

4
dzz/pichome/ceshi.php Normal file
View File

@@ -0,0 +1,4 @@
<?php
$a = C::t('pichome_vapp')->fetch('J62mX1');
print_r($a);die;

View File

@@ -115,6 +115,7 @@ class eagleexport
$readtxt = $this->readtxt . 'eagleexport' . md5($this->path) . '.txt';
$filenum = 0;
if (!is_file($readtxt) || filemtime($readtxt) < filemtime( $this->path . BS.'metadata.json')) {
C::t('pichome_vapp')->update($this->appid, array( 'state' => 1));
if ($dch = opendir($filedir)) {
$thandle = fopen($readtxt, 'w+');
while (($file = readdir($dch)) != false) {
@@ -136,28 +137,43 @@ class eagleexport
return array('error' => 'Read Dir Failer');
}
C::t('pichome_vapp')->update($this->appid, array('filenum' => $this->filenum, 'state' => 1));
C::t('pichome_vapp')->update($this->appid, array('filenum' => $this->filenum, 'state' => 2));
}
C::t('pichome_vapp')->update($this->appid, array('state' => 1));
C::t('pichome_vapp')->update($this->appid, array('state' => 2));
$this->initFoldertag();
return array('success' => true);
}
//获取文件可访问的真实地址
public function getFileRealFileName($filepath,$filename,$ext){
$charsetarr = ['GBK','GB18030'];
$returnname = $filename;
if(!is_file($filepath.BS.$filename.'.'.$ext)){
foreach ($charsetarr as $v){
$filemetadataname = diconv($filename, CHARSET, $v);
if(is_file($filepath.BS.$filemetadataname.'.'.$ext)){
$returnname = $filemetadataname;
break;
}
}
}
return $returnname;
}
public function execExport($force = false)
{
$filedir = $this->path . BS.'images';
$readtxt = $this->readtxt . 'eagleexport' . md5($this->path) . '.txt';
if(filesize($readtxt) == 0){
@unlink($readtxt);
C::t('pichome_vapp')->update($this->appid, array('lastid' => 0, 'percent' => 100, 'donum' => 0, 'state' => 2,'filenum'=>$this->filenum));
C::t('pichome_vapp')->update($this->appid, array('lastid' => 0, 'percent' => 100, 'donum' => 0, 'state' => 3,'filenum'=>$this->filenum));
return array('success'=>true);
}
if ($this->lastid) {
$start = $this->lastid * 19;
} else $start = 0;
if ($this->lastid < $this->filenum && $this->exportstatus == 1) {
if ($this->lastid < $this->filenum && $this->exportstatus == 2) {
$tfile = fopen($readtxt, 'r');
$i = 0;
fseek($tfile, $start);
@@ -198,9 +214,7 @@ class eagleexport
C::t('pichome_resources')->delete_by_rid($rid);
}
else{
$p = new Encode_Core();
$charset = $p->get_encoding($tmppath);
if (CHARSET != $charset) $filemetadataname = diconv($filemetadata['name'], CHARSET, $charset);
$filemetadataname = $this->getFileRealFileName($tmppath,$filemetadata['name'],$filemetadata['ext']);
//文件名称
$filename = $filemetadataname . '.' . $filemetadata['ext'];
//缩略图名称
@@ -338,10 +352,8 @@ class eagleexport
$haspassword = C::t('pichome_folder')->check_haspasswrod($filemetadata['folders'], $this->appid);
if (!$haspassword){
$p = new Encode_Core();
$charset = $p->get_encoding($tmppath);
if (CHARSET != $charset) $filemetadataname = diconv($filemetadata['name'], CHARSET, $charset);
$filemetadataname = $this->getFileRealFileName($tmppath,$filemetadata['name'],$filemetadata['ext']);
//echo $filemetadataname;die;
$filename = $filemetadataname . '.' . $filemetadata['ext'];
$thumbname = $filemetadataname . '_thumbnail.png';
//echo $i.'middle:'.memory_get_usage()/1024 . '<br>';
@@ -372,8 +384,9 @@ class eagleexport
$this->donum += 1;
$percent = floor(($this->donum / $this->filenum) * 100);
//防止因获取文件总个数不准确百分比溢出
$state = ($percent >= 100) ? 2 : 1;
if ($state == 2) {
$percent = ($percent > 100) ? 100 : $percent;
$state = ($percent >= 100) ? 3 : 2;
if ($state == 3) {
fclose($tfile);
@unlink($this->readtxt . 'eagleexport' . md5($this->path) . '.txt');
$tfile = false;
@@ -396,7 +409,7 @@ class eagleexport
//校验文件
public function execCheckFile()
{
if ($this->exportstatus == 2) {
if ($this->exportstatus == 3) {
$total = DB::result_first("select count(rid) from %t where appid = %s ", array('pichome_resources', $this->appid));
//校验文件
$this->check_file($total);
@@ -411,7 +424,7 @@ class eagleexport
$delrids = [];
$data = DB::fetch_all("select rid,isdelete from %t where appid = %s order by lastdate asc limit $limitsql ", array('pichome_resources', $this->appid));
if (empty($data)) {
C::t('pichome_vapp')->update($this->appid, array('percent' => 0, 'state' => 3, 'lastid' => 0, 'donum' => 0));
C::t('pichome_vapp')->update($this->appid, array('percent' => 0, 'state' => 4, 'lastid' => 0, 'donum' => 0));
//校验完成后更新目录文件数
foreach(DB::fetch_all("select count(rf.id) as num,f.fid from %t f left join %t rf on rf.fid=f.fid where f.appid = %s group by f.fid",array('pichome_folder','pichome_folderresources',$this->appid)) as $v){
C::t('pichome_folder')->update($v['fid'],array('filenum'=>$v['num']));
@@ -419,7 +432,9 @@ class eagleexport
}
//修正库中文件数
$total = DB::result_first("select count(rid) from %t where appid = %s ", array('pichome_resources', $this->appid));
C::t('pichome_vapp')->update($this->appid,array('filenum'=>$total));
$hascatnum = DB::result_first("SELECT count(DISTINCT rid) FROM %t where appid = %s",array('pichome_folderresources',$this->appid));
$nosubfilenum = $total - $hascatnum;
C::t('pichome_vapp')->update($this->appid,array('filenum'=>$total,'nosubfilenum'=>$nosubfilenum));
return true;
}
@@ -439,11 +454,20 @@ class eagleexport
if (!empty($delrids)) {
//如果有需要删除的,删除后,则重新查询上一页数据
C::t('pichome_resources')->delete_by_rid($delrids);
$percent = round((($this->lastid - 1) * $this->checklimit / $total) * 100);
C::t('pichome_vapp')->update($this->appid, array('lastid' => $this->lastid, 'percent' => $percent, 'state' => 2));
if($this->lastid == 1){
$percent = round(($this->checklimit / $total) * 100);
}else{
$percent = round((($this->lastid - 1) * $this->checklimit / $total) * 100);
}
C::t('pichome_vapp')->update($this->appid, array('lastid' => $this->lastid, 'percent' => $percent, 'state' => 3));
} else {
$percent = round((($this->lastid - 1) * $this->checklimit / $total) * 100);
C::t('pichome_vapp')->update($this->appid, array('lastid' => $this->lastid + 1, 'percent' => $percent, 'state' => 2));
if($this->lastid == 1){
$percent = round(($this->checklimit / $total) * 100);
}else{
$percent = round((($this->lastid - 1) * $this->checklimit / $total) * 100);
}
$percent = ($percent > 100) ? 100:$percent;
C::t('pichome_vapp')->update($this->appid, array('lastid' => $this->lastid + 1, 'percent' => $percent, 'state' => 3));
}
}

View File

@@ -91,6 +91,7 @@ class localexport
$filenum = 0;
if (!is_file($readtxt)) {
C::t('pichome_vapp')->update($this->appid, array( 'state' => 1));
$thandle = fopen($readtxt, 'w+');
$fileinfo = $this->readdir($filedir, $thandle, $filenum);
fclose($thandle);
@@ -98,10 +99,10 @@ class localexport
C::t('pichome_vapp')->update($this->appid, array('state' => 0));
return $fileinfo;
} else {
C::t('pichome_vapp')->update($this->appid, array('filenum' => $fileinfo['filenum'], 'state' => 1));
C::t('pichome_vapp')->update($this->appid, array('filenum' => $fileinfo['filenum'], 'state' => 2));
}
}
C::t('pichome_vapp')->update($this->appid, array('state' => 1));
C::t('pichome_vapp')->update($this->appid, array('state' => 2));
return array('success' => true);
}
@@ -148,7 +149,7 @@ class localexport
//如果txt为空直接进入下一步
if(filesize($readtxt) == 0){
@unlink($readtxt);
C::t('pichome_vapp')->update($this->appid, array('lastid' => 0, 'percent' => 100, 'donum' => 0, 'state' => 2, 'filenum' => $this->filenum));
C::t('pichome_vapp')->update($this->appid, array('lastid' => 0, 'percent' => 100, 'donum' => 0, 'state' => 3, 'filenum' => $this->filenum));
return array('success' => true);
}
@@ -161,7 +162,7 @@ class localexport
$spl_object = new SplFileObject($readtxt, 'rb');
$spl_object->seek($start);
if ($this->lastid < $this->filenum && $this->exportstatus == 1) {
if ($this->lastid < $this->filenum && $this->exportstatus == 2) {
$i = 0;
while (is_file($readtxt) && !$spl_object->eof()) {
$i++;
@@ -174,36 +175,45 @@ class localexport
$file = trim($file);
$file = str_replace(array('/', './', '\\'), BS, $file);
$filearr = explode("\t", $file);
$filepath = $filearr[0];
$filerelativepath = $filearr[0];
$filepath = str_replace($filedir . BS, '', $filerelativepath);
$p = new Encode_Core();
$this->charset = $p->get_encoding($filepath);
//如果是目录直接执行目录导入
if (isset($filearr[1]) && $filearr[1] == 'folder') {
$filepath = str_replace($filedir . BS, '', $filepath);
if ($this->charset != CHARSET) $filepath = diconv($filepath, $this->charset, CHARSET);
$fid = $this->createfolerbypath($filepath);
$spl_object->next();
continue;
} else {
//生成rid
$rid = md5($filepath.$this->appid);
$hasrid = 0;
if($rid = DB::result_first("select rid from %t where path = %s and appid = %s",
array('pichome_resources_attr',$filepath,$this->appid))){
$hasrid = 1;
}else{
//生成rid
$rid = $this->createRid();
}
$realfilepath = $filedir.BS.$filepath;
//如果文件不存在则删除记录
if (!is_file($filepath)) {
C::t('pichome_resources')->delete_by_rid($rid);
if (!is_file($realfilepath)) {
if($hasrid)C::t('pichome_resources')->delete_by_rid($rid);
$this->filenum -= 1;
} else {
$mtime = filemtime($filepath);
$ctime = filectime($filepath);
//修改时间
$mtime = filemtime($realfilepath);
//创建时间
$ctime = filectime($realfilepath);
//获取文件后缀
$ext = substr(strrchr($filepath, '.'), 1);
$ext = substr(strrchr($realfilepath, '.'), 1);
$ext = strtolower($ext);
//获取文件类型
$type = getTypeByExt($ext);
//获取文件大小
$size = filesize($filepath);
$size = filesize($realfilepath);
//获取图片信息,以取得宽高
$imginfo = @getimagesize($filepath);
$imginfo = @getimagesize($realfilepath);
//保存路径,用于之后获取文件使用
$savepath = str_replace(array('/', './', '\\'), '/', $filearr[0]);
$savepath = str_replace($this->path . '/', '', $savepath);
@@ -302,8 +312,8 @@ class localexport
}
$percent = floor(($this->donum / $this->filenum) * 100);
$percent = ($percent > 100) ? 100 : $percent;
$state = ($percent >= 100) ? 2 : 1;
if ($state == 2) {
$state = ($percent >= 100) ? 3 : 2;
if ($state == 3) {
@unlink($readtxt);
$lastid = 0;
} else {
@@ -320,7 +330,17 @@ class localexport
return array('success' => true);
}
//生成rid
public function createRid(){
//订单年月
$ridmd = strtoupper(dechex(date('m'))) . date('d');
//订单时间戳
$ridms = substr(time(), -5) . substr(microtime(), 2, 5);
//订单号
$rid = md5($ridmd.$ridms. sprintf('%02d', rand(0, 99)).$this->appid);
return $rid;
}
//根据路径创建目录
public function createfolerbypath($path, $pfid = '')
{
@@ -367,7 +387,7 @@ class localexport
//校验文件
public function execCheckFile()
{
if ($this->exportstatus == 2) {
if ($this->exportstatus == 3) {
$total = DB::result_first("select count(rid) from %t where appid = %s ", array('pichome_resources', $this->appid));
//校验文件
$this->check_file($total);
@@ -382,7 +402,7 @@ class localexport
$delrids = [];
$data = DB::fetch_all("select rid,name from %t where appid = %s order by lastdate asc limit $limitsql ", array('pichome_resources', $this->appid));
if (empty($data)) {
C::t('pichome_vapp')->update($this->appid, array('percent' => 0, 'state' => 3, 'lastid' => 0, 'donum' => 0));
C::t('pichome_vapp')->update($this->appid, array('percent' => 0, 'state' => 4, 'lastid' => 0, 'donum' => 0));
//校验完成后更新目录文件数
foreach (DB::fetch_all("select count(rf.id) as num,f.fid from %t f left join %t rf on rf.fid=f.fid where f.appid = %s group by f.fid", array('pichome_folder', 'pichome_folderresources', $this->appid)) as $v) {
C::t('pichome_folder')->update($v['fid'], array('filenum' => $v['num']));
@@ -394,6 +414,10 @@ class localexport
dfsockopen(getglobal('localurl') . 'index.php?mod=ffmpeg&op=getinfo', 0, '', '', false, '', 1);
dfsockopen(getglobal('localurl') . 'index.php?mod=ffmpeg&op=thumb', 0, '', '', false, '', 1);
}
$total = DB::result_first("select count(rid) from %t where appid = %s ", array('pichome_resources', $this->appid));
$hascatnum = DB::result_first("SELECT count(DISTINCT rid) FROM %t where appid = %s",array('pichome_folderresources',$this->appid));
$nosubfilenum = $total - $hascatnum;
C::t('pichome_vapp')->update($this->appid,array('filenum'=>$total,'nosubfilenum'=>$nosubfilenum));
return true;
}
foreach ($data as $v) {
@@ -409,11 +433,21 @@ class localexport
$this->filenum = $this->filenum - count($delrids);
//如果有需要删除的,删除后,则重新查询上一页数据
C::t('pichome_resources')->delete_by_rid($delrids);
$percent = round((($this->lastid - 1) * $this->checklimit / $total) * 100);
C::t('pichome_vapp')->update($this->appid, array('lastid' => $this->lastid, 'percent' => $percent, 'state' => 2, 'filenum' => $this->filenum));
if($this->lastid == 1){
$percent = round(($this->checklimit / $total) * 100);
}else{
$percent = round((($this->lastid - 1) * $this->checklimit / $total) * 100);
}
$percent = ($percent > 100) ? 100:$percent;
C::t('pichome_vapp')->update($this->appid, array('lastid' => $this->lastid, 'percent' => $percent, 'state' => 3, 'filenum' => $this->filenum));
} else {
$percent = round((($this->lastid - 1) * $this->checklimit / $total) * 100);
C::t('pichome_vapp')->update($this->appid, array('lastid' => $this->lastid + 1, 'percent' => $percent, 'state' => 2));
if($this->lastid == 1){
$percent = round(($this->checklimit / $total) * 100);
}else{
$percent = round((($this->lastid - 1) * $this->checklimit / $total) * 100);
}
$percent = ($percent > 100) ? 100:$percent;
C::t('pichome_vapp')->update($this->appid, array('lastid' => $this->lastid + 1, 'percent' => $percent, 'state' => 3));
}
}

View File

@@ -0,0 +1,74 @@
<?php
/*
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
* @license https://www.oaooa.com/licenses/
*
* @link https://www.oaooa.com
* @author zyx(zyx@oaooa.com)
*/
//此页的调用地址 index.php?mod=test;
//同目录的其他php文件调用 index.php?mod=test&op=test1;
if (!defined('IN_OAOOA')) {//所有的php文件必须加上此句防止被外部调用
exit('Access Denied');
}
$ismobile = helper_browser::ismobile();
$overt = getglobal('setting/overt');
if(!$overt && !$overt = C::t('setting')->fetch('overt')){
Hook::listen('check_login');//检查是否登录,未登录跳转到登录界面
}
//主题
$theme = GetThemeColor();
//库
$apps = [];
foreach(DB::fetch_all("select * from %t where isdelete = 0 order by disp ",array('pichome_vapp')) as $v){
$v['path'] = urlencode($v['path']);
$v['leaf'] = DB::result_first("select count(*) from %t where appid = %s",array('pichome_folder',$v['appid'])) ? false:true;
if(!$v['nosubfilenum']){
$hascatnum = DB::result_first("SELECT count(DISTINCT rid) FROM %t where appid = %s",array('pichome_folderresources',$v['appid']));
$v['nosubfilenum'] = $v['filenum'] - $hascatnum;
C::t('pichome_vapp')->update($v['appid'],array('nosubfilenum'=>$v['nosubfilenum']));
}
$apps[] = $v;
}
$apps = json_encode($apps);
//显示子分类内容
$ImageExpanded = C::t('user_setting')->fetch_by_skey('pichomeimageexpanded',$uid);
//筛选
$screen = C::t('user_setting')->fetch_by_skey('pichomeuserscreen',$uid);
$screen = $screen?intval($screen):0;
$setting = $_G['setting'];
$pagesetting = $setting['pichomepagesetting'] ? $setting['pichomepagesetting'] : [];
//排序方式
$pichomesortfileds = C::t('user_setting')->fetch_by_skey('pichomesortfileds',$_G['uid']);
//显示信息
$pichomeshowfileds = C::t('user_setting')->fetch_by_skey('pichomeshowfileds',$_G['uid']);
//布局类型
$pichomelayout = C::t('user_setting')->fetch_by_skey('pichomelayout',$_G['uid']);
if($pichomesortfileds){
$sortdatarr = unserialize($pichomesortfileds);
$sortfilearr = ['btime'=>1,'mtime'=>2,'dateline'=>3,'name'=>4,'size'=>5,'grade'=>6,'duration'=>7,'whsize'=>8];
$pagesetting['sort'] = $sortfilearr[$sortdatarr['filed']];
$pagesetting['desc'] = $sortdatarr['sort'];
}
if($pichomelayout){
$layout = unserialize($pichomelayout);
$pagesetting['layout'] = $layout['layout'];
}
if($pichomeshowfileds){
$pichomeshowfileds = unserialize($pichomeshowfileds);
$pagesetting['show'] = $pichomeshowfileds['filed'];
$pagesetting['other'] = $pichomeshowfileds['other'];
}
$template = 1;
if($pagesetting['template']){
$template = $pagesetting['template'];
}
$pagesetting = json_encode($pagesetting);
include template('pc/page/collection');

View File

@@ -26,6 +26,29 @@ html,body,#dzzoffice{
padding: 0;
overflow: hidden;
}
.bs-main-container{
height: 100%;
width: 100%;
overflow: hidden;
}
.pic-container{
height: 100%;
width: 100%;
overflow: hidden;
}
.pic-container .pic-container-scroll{
height: 100%;
width: 100%;
overflow: auto;
position: relative;
padding-top: 46px;
}
.pic-container .img-container{
min-height: 100% ;
position: relative;
padding: 0 4px;
}
input::-webkit-input-placeholder { /* WebKit, Blink, Edge */
color : var(--tip-color);
}
@@ -45,10 +68,83 @@ input:-ms-input-placeholder { /* Internet Explorer 10-11 */
input::-ms-input-placeholder { /* Microsoft Edge */
color : var(--tip-color);
}
[v-cloak] {
display: none;
}
.page-popup{
background: var(--bg-content) !important;
}
.van-action-sheet__cancel, .van-action-sheet__item{
background-color: transparent;
}
.van-action-sheet__gap,
.van-action-sheet__cancel:active,
.van-action-sheet__item:active{
background-color: var(--bg-poperHover);
}
.van-action-sheet__cancel{
color: var(--header-text);
}
.custom-image.van-empty{
position: absolute;
left: 0;
right: 0;
bottom: 0;
top: 0;
margin: auto;
}
.img-circle{
width: 2.1875rem;
height: 2.1875rem;
border-radius: 50%;
vertical-align: middle;
}
.Topcarousel{
border-radius: 50%;
text-align: center;
display: inline-block;
font-size: 1rem;
width: 2.1875rem;
height: 2.1875rem;
line-height: 2.1875rem;
color: #FFF;
}
#dzzoffice{
position: relative;
background: var(--bg-content);
}
.pic-logo{
height: 40px;
padding: 5px 0;
}
.pic-logo .h-left{
height: 30px;
display: -webkit-box;
display: -webkit-flex;
display: flex;
align-items: center;
color: var(--header-text);
text-decoration: none;
}
.pic-logo .h-left img{
max-width: 100%;
max-height: 100%;
margin-right: 10px;
}
.van-nav-bar__title{
color: var(--header-text);
}
.van-nav-bar__content{
/* 46px */
height: 46px;
}
.van-nav-bar .van-icon{
color: var(--content-textHover);
}
.van-nav-bar__content .van-nav-bar__text{
color: var(--header-text);
}
.van-popup.van-notify.van-notify--warning{
background-color: #ff976a;
color: #fff;
@@ -169,7 +265,9 @@ ul{
.van-cell::after{
border-color: var(--border-color-base);
}
.van-cell--clickable:active{
background-color: var(--bg-poperHover);
}
.van-search{
background-color: transparent;
}
@@ -189,6 +287,9 @@ ul{
background-color: transparent;
color: var(--header-text);
}
.van-sidebar-item.van-sidebar-item--disabled{
opacity: 0.7;
}
.van-sidebar-item--select{
color: var(--header-active);
}
@@ -267,4 +368,173 @@ ul{
to {
transform: rotate(359deg)
}
}
.van-cell-group{
background-color: transparent;
}
.about-popup,
.my-popup{
height: 100%;
width: 100%;
background: var(--bg-content);
color: var(--content-textHover);
overflow: hidden;
padding-top: 46px;
}
.about-popup .van-nav-bar,
.my-popup .van-nav-bar{
position: absolute;
top: 0;
left: 0;
width: 100%;
}
.about-popup .scroll-box,
.my-popup .scroll-box{
width: 100%;
height: 100%;
overflow: auto;
padding-top: 0.9375rem;
}
.my-popup .scroll-box .van-cell-group{
background: transparent;
}
.my-popup .scroll-box .van-cell {
background: transparent;
}
.my-popup .scroll-box .van-cell::after{
display: none;
}
.my-popup .scroll-box .van-cell .van-cell__right-icon{
color: var(--header-text);
}
.about-popup .aboutlogo{
text-align: center;
padding-top: 3.125rem;
padding-bottom: 1.875rem;
}
.about-popup .aboutmessage{
padding: 0 2.1875rem;
}
.about-popup .aboutmessage .aboutlist{
margin-bottom: 1.25rem;
overflow: hidden;
font-size: 1rem;
}
.about-popup .aboutmessage .aboutlist .title{
float: left;
}
.about-popup .aboutmessage .aboutlist .address{
color: var(--color-primary);
font-size: 1rem;
vertical-align: sub;
}
@media screen and (min-width: 768px) {
.about-popup .aboutmessage{
padding: 0 6.25rem;
}
}
.pic-toolbar{
position: fixed;
width: 100%;
left: 0;
padding: 0 8%;
transition: all .3s;
transition:all .3s;
-moz-transition:all .3s; /* Firefox 4 */
-webkit-transition:all .3s; /* Safari and Chrome */
-o-transition:all .3s; /* Opera */
z-index: 100;
}
.pic-toolbar.footershow{
bottom: 3%;
opacity: 1;
}
.pic-toolbar.footerhide{
bottom: -2.9375rem;
opacity: 0;
}
.pic-toolbar .tabbar{
display: -webkit-box;
display: -webkit-flex;
display: flex;
border-radius: 39px;
background: var(--bg-poper);
padding: 0.375rem 0;
color: var(--header-text);
/* box-shadow: 0px 0px 5px 1px var(--bg-poperHover); */
}
.pic-toolbar .tab-item{
-webkit-box-flex: 1;
-webkit-flex: 1;
flex: 1;
text-align: center;
font-size: 14px;
}
.pic-toolbar .tab-item .icon{
font-size: var(--font-32);
}
.pic-toolbar .tab-item img{
border-radius: 50%;
width: 2.1875rem;
height: 2.1875rem;
vertical-align: bottom;
}
.van-popup{
overflow: unset;
}
.van-popup .vam-popup-title{
height: 40px;
font-weight: 700;
position: absolute;
top: -40px;
left: 0;
width: 100%;
padding: 0 12px;
font-size: 18px;
color: #FFFFFF;
}
.footer-popup{
padding-bottom: 70px;
}
.footer-popup .btn-bottom{
padding: 10px;
height: 70px;
position: absolute;
width: 100%;
bottom: 0;
left: 0;
}
.footer-popup .btn-bottom .van-button{
width: auto;
padding: 15px 20px;
}
.footer-popup .popup-search-input .van-field__right-icon{
padding-right: 0;
}
.footer-popup .popup-search-input .van-field__right-icon .van-icon{
font-size: 1.25rem;
color: var(--header-active);
}
.footer-popup .van-search-box{
position: absolute;
top: 0;
left: 0;
width: 100%;
}
.footer-popup .van-search-box .van-field{
border: 0;
font-size: 0.875rem;
}
.van-notify--success {
background-color: #07c160;
}
.van-notify--danger {
background-color: #ee0a24;
}
.van-notify--warning {
background-color: #ff976a;
}

View File

@@ -1,27 +1,27 @@
[v-cloak] {
display: none;
}
}
#dzzoffice {
position: relative;
background: var(--bg-content);
}
}
.detail-popup {
position: relative;
height: 100%;
padding-top: 46px;
padding-bottom: 60px;
overflow: hidden;
width: 100%;
background: var(--bg-content);
position: relative;
height: 100%;
padding-top: 46px;
padding-bottom: 60px;
overflow: hidden;
width: 100%;
background: var(--bg-content);
color: var(--content-textHover);
}
.detail-popup.full{
padding: 0;
background: #000000;
}
.detail-popup.NotFooter{
padding-bottom: 0;
}
}
.detail-popup.full{
padding: 0;
background: #000000;
}
.detail-popup.NotFooter{
padding-bottom: 0;
}
.header-top {
position: fixed;
top: 0;
@@ -33,256 +33,252 @@
-webkit-transition: all .3s;
-o-transition: all .3s;
background: var(--bg-content);
}
.detail-popup.full .header-top{
display: none;
}
.van-nav-bar .van-nav-bar__title,
.van-nav-bar .van-icon {
color: var(--content-textHover);
}
.detail-popup .detail-popup-translate{
position: relative;
height: 100%;
}
}
.detail-popup.full .header-top{
display: none;
}
.detail-popup .detail-popup-translate{
position: relative;
height: 100%;
}
.detail-popup .detail-popup-content {
position: absolute;
width: 100%;
height: 100%;
color: var(--content-textHover);
}
}
.detail-popup .detail-popup-content.opacity {
opacity: 0;
}
}
.detail-popup .detail-popup-content.prev {
right: 100%;
margin-right: 10px;
}
}
.detail-popup .detail-popup-content.next {
left: 100%;
margin-left: 10px;
}
}
.detail-popup .detail-popup-content .detail-popup-img {
height: 100%;
position: relative;
}
}
.detail-popup .detail-popup-content .video-box{
width: 100%;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
width: 100%;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
}
}
.detail-popup .detail-popup-content .img-box {
height: 100%;
width: 100%;
overflow: hidden;
position: relative;
}
}
.detail-popup .detail-popup-content .image-viewer__img {
position: absolute;
z-index: 10;
transform-origin: 0 0;
margin: auto;
left: 0;
right: 0;
bottom: 0;
top: 0;
max-width: 100%;
transform-origin: 0 0;
margin: auto;
left: 0;
right: 0;
bottom: 0;
top: 0;
max-width: 100%;
max-height: 100%;
}
}
.detail-popup .detail-popup-content .image-viewer__img {
-webkit-user-drag: none;
-moz-user-drag: none;
-ms-user-drag: none;
user-drag: none;
}
.pinch-zoom-container{
width: 100% !important;
height: 100% !important;
}
.detail-popup .detail-popup-content .image-viewer__img.opacity{
opacity: 0;
}
.detail-popup .detail-popup-content .image-viewer__img.thumbnail{
z-index: 5;
}
.detail-popup .footer-tabbar{
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 60px;
line-height: 60px;
text-align: center;
font-size: 1.75rem;
/* border-top: 1px solid var(--border-color-base); */
display: -webkit-box;
display: -webkit-flex;
display: flex;
z-index: 10000;
background: var(--bg-content);
}
.detail-popup.full .footer-tabbar{
display: none;
}
-webkit-user-drag: none;
-moz-user-drag: none;
-ms-user-drag: none;
user-drag: none;
}
.pinch-zoom-container{
width: 100% !important;
height: 100% !important;
}
.detail-popup .detail-popup-content .image-viewer__img.opacity{
opacity: 0;
}
.detail-popup .detail-popup-content .image-viewer__img.thumbnail{
z-index: 5;
}
.detail-popup .footer-tabbar{
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 60px;
line-height: 60px;
text-align: center;
font-size: 1.75rem;
/* border-top: 1px solid var(--border-color-base); */
display: -webkit-box;
display: -webkit-flex;
display: flex;
z-index: 10000;
background: var(--bg-content);
}
.detail-popup.full .footer-tabbar{
display: none;
}
.detail-popup .footer-tabbar .footer-tabbar-item {
-webkit-box-flex: 1;
-webkit-flex: 1;
flex: 1;
}
.detail-popup-message{
width: 100%;
height: 100%;
position: absolute;
background: transparent;
color: var(--content-textHover);
padding-bottom: 60px;
}
.detail-popup-message.noPadding{
padding-bottom: 0;
}
.detail-popup-message .DetailPopup-content{
padding: 0 1rem;
height: 100%;
overflow: auto;
}
.detail-popup-message .name{
}
.detail-popup-message{
width: 100%;
height: 100%;
position: absolute;
background: transparent;
color: var(--content-textHover);
padding-bottom: 60px;
}
.detail-popup-message.noPadding{
padding-bottom: 0;
}
.detail-popup-message .DetailPopup-content{
padding: 0 1rem;
height: 100%;
overflow: auto;
}
.detail-popup-message .name{
font-weight: 700;
padding: 16px 0;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.detail-popup-message .block{
margin-bottom: 1rem;
}
text-overflow: ellipsis;
}
.detail-popup-message .block{
margin-bottom: 1rem;
}
.detail-popup-message .block .title{
font-weight: 700;
margin-bottom: 0.625rem;
}
.detail-popup-message .block .block-item.colors{
display: -webkit-box;
display: -webkit-flex;
display: flex;
}
.detail-popup-message .block .block-item.colors{
display: -webkit-box;
display: -webkit-flex;
display: flex;
margin-left: -0.1875rem;
}
.detail-popup-message .block .block-item.colors .colors{
-webkit-box-flex: 1;
-webkit-flex: 1;
flex: 1;
padding-left: 0.1875rem;
}
.detail-popup-message .block .block-item.colors .colors>div{
}
.detail-popup-message .block .block-item.colors .colors{
-webkit-box-flex: 1;
-webkit-flex: 1;
flex: 1;
padding-left: 0.1875rem;
}
.detail-popup-message .block .block-item.colors .colors>div{
position: relative;
border-radius: 0.5rem;
border-radius: 0.5rem;
border: 1px solid var(--border-color-base);
}
@media screen and (max-width: 768px) {
.detail-popup-message .name{
font-size: 1.125rem;
}
.detail-popup-message .block .title{
font-size: 1rem;
}
.detail-popup-message .block .block-item.colors .colors>div{
height: 1.5625rem;
}
.detail-popup-message .block .block-item.tag .tag{
font-size: 0.875rem;
padding:0 0.5rem;
}
@media screen and (max-width: 768px) {
.detail-popup-message .name{
font-size: 1.125rem;
}
.detail-popup-message .block .title{
font-size: 1rem;
}
.detail-popup-message .block .block-item.colors .colors>div{
height: 1.5625rem;
}
.detail-popup-message .block .block-item.tag .tag{
font-size: 0.875rem;
padding:0 0.5rem;
height: 1.875rem;
line-height: 1.875rem;
}
.detail-popup-message .block .block-item.link{
font-size: 0.875rem;
height: 1.25rem;
line-height: 1.25rem;
}
.detail-popup-message .block .block-item.link i{
font-size: 1.125rem;
}
.detail-popup-message .block .block-item .basic{
font-size: 0.875rem;
}
}
@media screen and (min-width: 768px) {
.detail-popup-message .name{
font-size:1.25rem;
}
.detail-popup-message .block .title{
font-size: 1.125rem;
}
.detail-popup-message .block .block-item.colors .colors>div{
height: 1.875rem;
line-height: 1.875rem;
}
.detail-popup-message .block .block-item.link{
font-size: 0.875rem;
height: 1.25rem;
line-height: 1.25rem;
}
.detail-popup-message .block .block-item.link i{
font-size: 1.125rem;
}
.detail-popup-message .block .block-item .basic{
font-size: 0.875rem;
}
}
@media screen and (min-width: 768px) {
.detail-popup-message .name{
font-size:1.25rem;
}
.detail-popup-message .block .title{
font-size: 1.125rem;
}
.detail-popup-message .block .block-item.colors .colors>div{
height: 1.875rem;
}
.detail-popup-message .block .block-item.tag .tag{
font-size: 1rem;
padding:0 0.625rem;
height: 2.5rem;
line-height:2.5rem;
}
.detail-popup-message .block .block-item.link{
font-size: 1rem;
height: 1.875rem;
line-height:1.875rem;
}
.detail-popup-message .block .block-item.link i{
font-size: 1.75rem;
}
.detail-popup-message .block .block-item .basic{
font-size: 1rem;
}
}
.detail-popup-message .block .block-item.tag{
overflow: hidden;
margin-left: -0.625rem;
}
.detail-popup-message .block .block-item.tag .tag{
}
.detail-popup-message .block .block-item.tag .tag{
font-size: 1rem;
padding:0 0.625rem;
height: 2.5rem;
line-height:2.5rem;
}
.detail-popup-message .block .block-item.link{
font-size: 1rem;
height: 1.875rem;
line-height:1.875rem;
}
.detail-popup-message .block .block-item.link i{
font-size: 1.75rem;
}
.detail-popup-message .block .block-item .basic{
font-size: 1rem;
}
}
.detail-popup-message .block .block-item.tag{
overflow: hidden;
margin-left: -0.625rem;
}
.detail-popup-message .block .block-item.tag .tag{
float: left;
min-width: 2.8125rem;
text-align: center;
border: 1px solid var(--border-color-base);
border-radius: 0.5rem;
margin-left: 0.625rem;
color: var(--content-text);
margin-bottom: 0.3125rem;
}
.detail-popup-message .block .block-item.link{
margin-left: 0.625rem;
color: var(--content-text);
margin-bottom: 0.3125rem;
}
.detail-popup-message .block .block-item.link{
color: var(--content-text);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
position: relative;
padding-right: 1.5625rem;
}
.detail-popup-message .block .block-item.link i{
}
.detail-popup-message .block .block-item.link i{
position: absolute;
right: 0;
top: 0;
}
.detail-popup-message .block .block-item .basic{
color: var(--content-text);
margin-bottom: 0.625rem;
}
.detail-popup-message .block .block-item .basic .record{
text-align: right;
}
.detail-popup-message .block .block-item .basic .record .star{
color: var(--stars);
}
.detail-popup-message .block .block-item .basic .record .star.active{
color: var(--starsActive);
}
.detail-popup-message .block .block-item .basic{
color: var(--content-text);
margin-bottom: 0.625rem;
}
.detail-popup-message .block .block-item .basic .record{
text-align: right;
}
.detail-popup-message .block .block-item .basic .record .star{
color: var(--stars);
}
.detail-popup-message .block .block-item .basic .record .star.active{
color: var(--starsActive);
}

View File

@@ -0,0 +1,342 @@
#imgContainer .imgitem .imgchecked{
z-index: 5;
position: absolute;
left: 5%;
top: 3%;
}
#imgContainer .imgitem .imgchecked .van-checkbox__icon{
height: 25px;
}
#imgContainer .imgitem .imgchecked .van-checkbox__icon .van-icon{
font-size: 20px;
background-color: #FFFFFF;
}
#imgContainer .imgitem .imgchecked .van-checkbox__icon.van-checkbox__icon--checked .van-icon{
background-color: var(--color-primary);
}
#imgContainer .imgitem .imgbox .bottom-img-message{
text-align: center;
color: var(--content-text);
overflow: hidden;
max-height: 65px;
padding: 0 6px;
}
#imgContainer .imgitem .imgbox .bottom-img-message .name {
max-height: 45px;
display: -webkit-box;
display: -webkit-flex;
display: flex;
overflow: hidden;
justify-content: flex-end;
}
#imgContainer .imgitem .imgbox .bottom-img-message .name .text{
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
font-size: 0.875rem;
width: 100%;
height: 35px;
margin-top: 10px;
word-wrap: break-word;
}
#imgContainer .imgitem .imgbox .bottom-img-message .name .circulars{
color: var(--content-text);
font-size: 16px;
min-width: 45px;
height: 35px;
text-align: center;
line-height: 35px;
}
#imgContainer .imgitem .imgbox .bottom-img-message .other {
font-size: 0.75rem;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
height: 21px;
padding-top: 5px;
color: var(--content-textMessage);
}
#imgContainer .imgitem .imgbox .bottom-img-message .other .score{
color: var(--stars);
}
#imgContainer .imgitem .imgbox .bottom-img-message .other .score.active{
color: var(--starsActive);
}
#imgContainer .imgitem .imgbox .annotation{
position: absolute;
right: 5px;
top: 5px;
font-size: 14px;
width: 22px;
height: 22px;
border: 2px solid #FFFFFF;
border-radius: 50%;
color: #FFFFFF;
text-align: center;
line-height: 20px;
background: var(--color-primary);
}
#imgContainer{
position: relative;
margin: 0 auto;
}
#imgContainer .imgitem{
position: absolute;
/* transition:all .2s; */
}
#imgContainer .imgitem .imgbox {
padding-left: 4px;
padding-right: 4px;
}
#imgContainer .imgitem .imgbox .imgbox-border {
position: relative;
overflow: hidden;
cursor: zoom-in;
/* min-height: 120px; */
height: 100%;
}
#imgContainer .imgitem .imgbox .imgbox-border.radius{
border-radius: 18px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black {
width: 100%;
height: 100%;
position: relative;
display: -webkit-box;
display: -webkit-flex;
display: flex;
justify-content: center;
align-items: center;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black .bck{
width: 100%;
height: 100%;
display: none;
background: var(--bg-poper);
top: 0;
left: 0;
position: absolute;
opacity: 0.7;
}
#imgContainer .imgitem .imgbox .imgbox-border .img {
max-width: 100%;
max-height: 100%;
width: auto;
height: auto;
border-radius: 18px;
}
#imgContainer .imgitem .imgbox .imgbox-border .img.opacity{
opacity: 0;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box{
display: none;
position: absolute;
z-index: 2;
width: 45px;
height: 45px;
border-radius: 50%;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box .circular-item{
width: 45px;
height: 45px;
border-radius: 50%;
color: #333;
z-index: 100;
font-size: 21px;
text-align: center;
line-height: 45px;
background: #ffffff;
position: absolute;
transition: top .3s ease-in-out,left .3s ease-in-out;
/* transition: all .3s ease-in-out; */
top: -22.5px;
left: -22.5px;
transform-origin: 0px;
/* transition-delay: 0.02s; */
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed{
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 100;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .bck{
display: block;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .img{
position: absolute;
z-index: 2;
max-width: inherit;
max-height: inherit;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box{
display: block;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box .round{
position: absolute;
width: 45px;
height: 45px;
border-radius: 50%;
background: transparent;
left: 0px;
top: 0px;
border: 3px solid var(--bg-poper);
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box .circular-item-box{
position: absolute;
left: -67.5px;
top: -67.5px;
border: 90px solid transparent;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box.top .circular-item.first{
top: -22.5px;
left: -22.5px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box.top .circular-item.two{
top: 0px;
left: -80px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box.top .circular-item.three{
top: -22.5px;
left: -138.5px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box .circular-item-box .icon{
display: block;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top .circular-item.first{
transform: rotate(0deg);
top: -80px;
left: -80px;
transform-origin: 80px 80px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top .circular-item.two{
transform: rotate(45deg);
top: -80px;
left: -80px;
transform-origin: 80px 80px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top .circular-item.two .icon{
transform: rotate(-45deg);
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top .circular-item.three{
transform: rotate(90deg);
top: -80px;
left: -80px;
transform-origin: 80px 80px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top .circular-item.three .icon{
transform: rotate(-90deg);
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box.top.right .circular-item.first{
top: -80.5px;
left: 1px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box.top.right .circular-item.two{
top: -22.5px;
left: -22.5px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box.top.right .circular-item.three{
top: 0px;
left: -80px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.right .circular-item.first{
transform: rotate(-45deg);
top: -80px;
left: -80px;
transform-origin: 80px 80px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.right .circular-item.first .icon{
transform: rotate(45deg);
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.right .circular-item.two{
transform: rotate(0deg);
top: -80px;
left: -80px;
transform-origin: 80px 80px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.right .circular-item.two .icon{
transform: rotate(0deg);
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.right .circular-item.three{
transform: rotate(45deg);
top: -80px;
left: -80px;
transform-origin: 80px 80px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.right .circular-item.three .icon{
transform: rotate(-45deg);
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box.top.left .circular-item.first{
top: 0px;
left: -80px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box.top.left .circular-item.two{
top: -22.5px;
left: -136.5px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box.top.left .circular-item.three{
left: -160px;
top: -80px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.left .circular-item.first{
transform: rotate(45deg);
top: -80px;
left: -80px;
transform-origin: 80px 80px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.left .circular-item.first .icon{
transform: rotate(-45deg);
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.left .circular-item.two{
transform: rotate(90deg);
top: -80px;
left: -80px;
transform-origin: 80px 80px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.left .circular-item.two .icon{
transform: rotate(-90deg);
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.left .circular-item.three{
transform: rotate(135deg);
top: -80px;
left: -80px;
transform-origin: 80px 80px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.left .circular-item.three .icon{
transform: rotate(-135deg);
}
@media screen and (min-width: 768px) {
.#imgContainer .imgitem {
width: 33.3333%;
}
}
@media screen and (min-width: 992px) {
.#imgContainer .imgitem {
width: 25%;
}
}
@media screen and (min-width: 1024px) {
.#imgContainer .imgitem {
width: 20%;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,289 @@
.notScreen{
width: 100%;
height: 100%;
position: relative;
}
.notScreen>div{
height: 80px;
text-align: center;
margin: auto;
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: 0;
font-size: var(--font-14);
color: var(--header-text);
}
.notScreen>div img{
width: 3.125rem;
height: 3.125rem;
}
.sort-popup .van-popup__close-icon--top-right,
.screen-popup .van-popup__close-icon--top-right {
top: 10px;
right: 10px;
}
/* .sort-popup .van-tree-select{
height: calc(100% - 41px) !important;
height: -moz-calc(100% - 41px) !important;
height: -webkit-calc(100% - 41px) !important;
} */
.screen-popup .van-tree-select{
}
.screen-popup .van-tree-select .van-sidebar{
width: 6rem;
-webkit-box-flex: initial;
-webkit-flex: initial;
flex: initial;
}
.sort-popup .van-tree-select__content,
.screen-popup .van-tree-select__content{
height: 100%;
overflow: hidden;
position: relative;
background-color: transparent;
}
.van-popup .van-tree-select__content .screen-item-box{
height: 100%;
width: 100%;
position: relative;
overflow: hidden;
padding-top: 56px;
}
.van-popup .van-tree-select__content .screen-item .screen-item-option-box{
padding: 0px 8px;
}
.van-popup .van-tree-select__content .screen-item .screen-item-option-box .screen-item-option{
padding: 10px 16px;
margin-bottom: 8px;
border-radius: 8px;
}
.van-popup .van-tree-select__content .screen-item .screen-item-option-box .screen-item-option.active{
background: var(--bg-poperHover);
}
.screen-popup .van-tree-select__content .screen-item{
height: 100%;
overflow: auto;
padding: 0px 10px;
}
.screen-popup .van-tree-select__content .screen-item .swip-row{
border: 1px solid var(--border-color-base);
border-radius: 18px;
overflow: hidden;
}
.screen-popup .van-tree-select__content .screen-item .swip-row .swip{
height: 30px;
line-height: 30px;
text-align: center;
background-color: var(--bg-input);
color: var(--header-text);
}
.screen-popup .van-tree-select__content .screen-item .swip-row .swip.active{
background: var(--color-primary);
color: #FFFFFF;
}
.van-popup .van-tree-select__content .screen-item .van-cell-group .van-cell.van-cell-tag{
margin-bottom: 6px;
border-radius: 999px;
}
.van-popup .van-tree-select__content .screen-item .van-cell-group .van-cell.van-cell-tag.active{
background-color: var(--bg-poperHover);
}
.sort-popup .van-tree-select__content .screen-item .van-cell-group,
.screen-popup .van-tree-select__content .screen-item .van-cell-group{
background-color: transparent;
}
.sort-popup .van-tree-select__content .screen-item .van-cell-group .van-cell,
.screen-popup .van-tree-select__content .screen-item .van-cell-group .van-cell{
background-color: transparent;
}
.van-calendar__day--end, .van-calendar__day--multiple-middle, .van-calendar__day--multiple-selected, .van-calendar__day--start, .van-calendar__day--start-end{
background-color: var(--color-primary);
}
.screen-popup .van-hairline--top-bottom::after, .screen-popup .van-hairline-unset--top-bottom::after {
border-width: 0;
}
.sort-popup .van-hairline--top-bottom::after, .sort-popup .van-hairline-unset--top-bottom::after {
border-width: 0;
}
.screen-popup .van-tree-select__content .screen-item .color-box .quick{
overflow: hidden;
/* margin-left: -10px; */
}
.screen-popup .van-tree-select__content .screen-item .color-box .quick .quick-list-box{
width: 20%;
margin-bottom: 0.1875rem;
padding: 0 0.1875rem;
display: inline-block;
}
.screen-popup .van-tree-select__content .screen-item .color-box .quick .quick-list{
/* float: left;
height: calc(20% / 2);
width: 20%;
height: 2.5rem;
width: 2.5rem;
z-index: 1;
border-radius: 50%;
margin-bottom: 0.625rem;
margin-left: 0.625rem;
border: 1px solid transparent;
position: relative; */
height: 0;
padding: 25% 0;
position: relative;
border-radius: 8px;
}
.screen-popup .van-tree-select__content .screen-item .color-box .quick .quick-list .van-icon{
position: absolute;
color: #FFFFFF;
margin: auto;
top: 0;
left: 0;
bottom: 0;
right: 0;
}
@media screen and (max-width: 768px) {
.screen-popup .van-tree-select__content .screen-item .color-box .quick .quick-list .van-icon{
font-size: 18px;
width: 18px;
height: 18px;
}
}
@media screen and (min-width: 768px) {
.screen-popup .van-tree-select__content .screen-item .color-box .quick .quick-list .van-icon{
font-size: 30px;
width: 30px;
height: 30px;
}
}
.screen-popup .van-tree-select__content .screen-item .color-box .color-input{
position: relative;
margin-bottom: 0.9375rem;
}
.screen-popup .van-tree-select__content .screen-item .color-box .color-input .van-field{
/* padding: 0; */
/* height: 35px; */
padding-left: 35px;
/* height: 35px; */
border-radius: 8px;
}
.screen-popup .van-tree-select__content .screen-item .color-box .color-input .color-show{
position: absolute;
width: 18px;
height: 18px;
z-index: 1;
border-radius: 6px;
margin-top: auto;
margin-bottom: auto;
top: 0;
bottom: 0;
left: 8px;
border: 1px solid transparent;
}
.screen-popup .van-tree-select__content .screen-item .color-box .color-input .color-show.border{
border: 1px solid var(--border-color-base);
}
.screen-popup .van-tree-select__content .screen-item .color-box .color-input .van-field .van-field__button{
padding-left: 8px;
line-height: 35px;
padding-right: 8px;
border-left: 1px solid var(--border-color-base);
}
.screen-popup .van-tree-select__content .screen-item .color-box .color-input .van-field .van-field__button img{
vertical-align: sub;
width: 16px;
height: 16px;
}
.screen-popup .van-tree-select__content .screen-item .color-box .color-slider{
display: -webkit-box;
display: -webkit-flex;
display: flex;
align-items: center;
padding: 15px 0;
}
.screen-popup .van-calendar__popup .van-button--danger{
background-color: var(--color-primary);
border-color: var(--color-primary);
}
.screen-popup .van-calendar__popup .van-calendar__month-mark{
opacity: 0.5;
}
.screen-popup .van-tree-select__content .van-tabs{
height: 100%;
}
.screen-popup .van-tree-select__content .van-tabs--line .van-tabs__wrap{
/* border-bottom: 1px solid var(--slider-line); */
padding-right: 8px;
padding-left: 8px;
}
.screen-popup .van-tree-select__content .van-tabs .van-tabs__content{
height: calc(100% - 44px);
height: -moz-calc(100% - 44px);
height: -webkit-calc(100% - 44px);
}
.screen-popup .van-tree-select__content .van-tabs .van-tabs__content .van-tab__pane{
height: 100%;
padding-top: 10px;
overflow: hidden;
}
.screen-popup .van-tree-select__content .van-tabs__nav{
background-color: transparent;
}
.screen-popup .van-tree-select__content .van-tabs__nav .van-tab{
color: var(--header-text);
}
.screen-popup .van-tree-select__content .van-tabs__nav .van-tab.van-tab--active{
color: var(--header-active);
}
.screen-popup .van-tree-select__content .van-cell .num{
margin-right: 6px;
}
.sort-popup .van-tree-select__content .van-cell::after,
.screen-popup .van-tree-select__content .van-cell::after{
display: none;
}
.screen-popup .screen-classify-collapse .van-cell{
background-color: transparent;
margin-bottom: 6px;
}
.screen-popup .screen-classify-collapse .van-collapse-item.active>.van-cell{
background-color: var(--bg-poperHover);
border-radius: 999px;
}
.screen-popup .screen-classify-collapse .van-hairline--top-bottom::after,
.screen-popup .screen-classify-collapse .van-collapse-item--border::after{
display: none;
}
.screen-popup .screen-classify-collapse .van-collapse-item__content{
background-color: transparent;
padding: 0;
padding-left: 1rem;
}
.screen-popup .screen-classify-collapse .van-cell__value{
flex: none;
}
.van-calendar__day--middle{
color: var(--header-active);
}
.van-calendar__day--start{
border-radius: 16px 0 0 16px;
}
.van-calendar__day--end{
border-radius: 0 16px 16px 0;
}
.screen-cell-input{
margin-bottom: 16px;
border-radius: 8px;
}
.screen-cell-input::after{
display: none;
}
.screen-cell-input .van-field{
border-radius: 8px;
}

View File

@@ -0,0 +1,108 @@
.collection-dialog{
padding: 0;
}
.collection-dialog-content{
width: 360px;
height: 460px;
}
.collection-dialog-content .header{
padding: 12px;
padding-bottom: 0;
}
.collection-dialog-content .content{
padding: 12px 0;
height: 358px;
}
.collection-dialog-content .content .el-tree-node__content{
height: 64px;
padding-right: 8px;
border-radius: 3px;
}
.collection-dialog-content .content .el-tree-node__content .el-tree-node__expand-icon{
font-size: 16px;
}
.collection-dialog-content .content .custom-tree-node{
width: 100%;
position: relative;
padding-left: 55px;
height: 100%;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.collection-dialog-content .content .custom-tree-node .img{
width: 40px;
height: 40px;
border-radius: 3px;
overflow: hidden;
margin-top: auto;
margin-bottom: auto;
position: absolute;
left: 0;
top: 0;
bottom: 0;
}
.collection-dialog-content .content .custom-tree-node .img img{
object-fit: cover;
width: 100%;
height: 100%;
}
.collection-dialog-content .content .custom-tree-node .name{
width: 100%;
padding-right: 8px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-weight: 700;
font-size: 14px;
}
.collection-dialog-content .content .custom-tree-node .btn{
display: none;
}
.collection-dialog-content .content .custom-tree-node:hover .btn{
display: block;
}
.collection-dialog-content .content .custom-tree-node .avatar{
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.collection-dialog-content .content .custom-tree-node .avatar>li{
margin-left: -8px;
}
.collection-dialog-content .content .custom-tree-node .avatar>li:first-child{
margin-left: 0;
}
.collection-dialog-content .content .custom-tree-node .avatar .img-circle{
width: 24px;
height: 24px;
vertical-align: text-top;
border: 1px solid var(--border-color-base);
}
.collection-dialog-content .content .custom-tree-node:hover .avatar{
display: none;
}
.collection-dialog-content .footer{
height: 50px;
line-height: 50px;
font-size: 18px;
border-top: 1px solid var(--border-color-base);
text-align: center;
cursor: pointer;
}
.collection-dialog-content .footer:hover{
background-color: var(--bg-poperHover);
}
.collection-dialog-content .footer i{
font-size: 23px;
margin-right: 8px;
color: var(--starsActive);
vertical-align: text-bottom;
}

View File

@@ -0,0 +1,92 @@
#imagelayout .collection-box{
padding: 0 16px;
}
#imagelayout .collection-box .jurisdiction-box{
text-align: center;
padding-bottom: 16px;
}
#imagelayout .collection-box .jurisdiction-box .jurisdiction-ul{
display: inline-block;
}
#imagelayout .collection-box .jurisdiction-box .jurisdiction-ul .jurisdiction-item{
display: inline-block;
margin-left: -16px;
}
#imagelayout .collection-box .jurisdiction-box .jurisdiction-ul .jurisdiction-item:first-child{
margin: 0;
}
#imagelayout .collection-box .jurisdiction-box .jurisdiction-ul .jurisdiction-item .Topcarousel{
width: 48px;
height: 48px;
border: 1px solid var(--border-color-base);
line-height: 48px;
}
#imagelayout .collection-box .jurisdiction-box .jurisdiction-ul .jurisdiction-item .add{
width: 48px;
height: 48px;
border: 1px solid var(--border-color-base);
line-height: 48px;
text-align: center;
border-radius: 50%;
background: var(--bg-poper);
cursor: pointer;
font-size: 20px;
font-weight: 700;
color: var(--header-text);
}
#imagelayout .collection-box .jurisdiction-box .jurisdiction-ul .jurisdiction-item .add:hover{
background: var(--bg-poperHover);
}
#imagelayout .collection-box .file-box .file-message{
overflow: hidden;
padding-bottom: 16px;
color: var(--content-text);
font-size: 16px;
}
#imagelayout .collection-box .file-box .file-message .left{
float: left;
padding: 8px 0;
}
#imagelayout .collection-box .file-box .file-message .right{
float: right;
cursor: pointer;
border-radius: 3px;
padding: 8px;
}
#imagelayout .collection-box .file-box .file-message .right:hover{
color: var(--header-active);
background: var(--bg-poperHover);
}
#imagelayout .collection-box .file-box .file-list{
margin-left: -16px;
padding-bottom: 16px;
}
#imagelayout .collection-box .file-box .file-list .item{
margin-left: 16px;
width: 320px;
display: inline-block;
border-radius: 3px;
margin-bottom: 16px;
overflow: hidden;
}
#imagelayout .collection-box .file-box .file-list .item .img{
overflow: hidden;
}
#imagelayout .collection-box .file-box .file-list .item .block{
width: 107px;
height: 141px;
border-left: 1px solid var(--border-color-base);
float: left;
background: var(--bg-poper);
}
#imagelayout .collection-box .file-box .file-list .item .block:first-child{
width: 106px;
border: 0;
}
#imagelayout .collection-box .file-box .file-list .item .text{
font-size: 18px;
color: var(--content-text);
line-height: 27px;
padding: 8px;
}

View File

@@ -1,3 +1,6 @@
/* color-primary
color-text-placeholder
border-color-base */
*{
padding: 0;
margin: 0;
@@ -28,13 +31,36 @@ body,
body{
background-color: var(--bg-content);
}
.el-page-header__left{
z-index: 100;
color: var(--header-text);
margin-right: 6px;
}
.el-page-header__left:hover{
color: var(--header-active);
}
.el-page-header__left .el-icon-back{
font-size: 21px;
font-weight: 700;
}
.el-page-header__left .el-page-header__title{
font-size: 16px;
font-weight: 700;
white-space: nowrap;
}
.el-page-header__left::after{
display: none;
}
.tipTxt{
color: var(--tip-color);
font-size: 12px;
line-height: 20px;
margin-top: 6px;
}
.highlight {
color: var(--leftTreeColor);
font-weight: 700;
}
.tipTxt:hover {
color: var(--content-text);
}
@@ -117,6 +143,9 @@ body{
.el-progress-bar__outer{
background-color: var(--bg-input);
}
.el-dropdown-menu{
min-width: 165px;
}
.el-dropdown-menu__item--divided{
border-color: var(--border-color-base);
}
@@ -299,9 +328,15 @@ body{
height: 100%;
flex: 1;
}
.page-component__scroll>.el-scrollbar__wrap {
.el-scrollbar__wrap {
overflow-x: hidden;
}
#copyInput{
opacity: 0;
position: fixed;
bottom: 0;
left: 0;
}
.Topcarousel{
border-radius: 50%;
text-align: center;
@@ -311,17 +346,27 @@ body{
height: 100%;
color: #FFF;
}
#copyInput{
opacity: 0;
position: fixed;
bottom: 0;
left: 0;
}
.img-circle{
border-radius: 50%;
width: 100%;
height: 100%;
}
.img-circle,.Topcarousel{
width: 40px;
height: 40px;
line-height: 40px;
}
.small .img-circle,.small .Topcarousel{
width: 35px;
height: 35px;
line-height: 35px;
}
.mini .img-circle,.mini .Topcarousel{
width: 24px;
height: 24px;
line-height: 24px;
}
.hide{
display: none !important;
}
@@ -411,7 +456,7 @@ ul{
justify-content: left;
background: var(--bg-header);
margin-left: -20px;
min-width: 150px;
}
#top_header .header-content .h-left>a{
width: 100%;
@@ -419,6 +464,7 @@ ul{
padding-left: 41px;
text-decoration: none;
}
.container2 #top_header .header-content .h-left>a{
width: calc(100% - 45px);
}

View File

@@ -0,0 +1,33 @@
.addcollection-dialog .el-checkbox{
width: 100%;
overflow: hidden;
height: 50px;
margin: 0;
display: block;
}
.addcollection-dialog .el-checkbox .el-checkbox__input{
float: right;
line-height: 50px;
}
.addcollection-dialog .el-checkbox .el-checkbox__label{
float: left;
line-height: 50px;
padding-left: 0;
}
.addcollection-dialog .el-checkbox .el-checkbox__label .img-circle{
width: 32px;
height: 32px;
margin-top: 9px;
vertical-align: top;
margin-right: 6px;
}
.addcollection-dialog .el-checkbox .el-checkbox__label .Topcarousel{
width: 32px;
height: 32px;
margin-top: 9px;
margin-right: 6px;
color: #FFFFFF;
text-align: center;
line-height: 32px;
font-size: 14px;
}

View File

@@ -0,0 +1,132 @@
.collection-dialog{
padding: 0;
}
.collection-dialog .el-dialog__body{
padding: 0;
}
.collection-dialog.el-dialog .collection-dialog-content{
width: 100%;
}
.collection-dialog-content{
width: 360px;
height: 460px;
}
.collection-dialog-content .header{
padding: 12px;
padding-bottom: 0;
}
.collection-dialog-content .content{
padding: 12px 0;
height: 358px;
position: relative;
}
.collection-dialog-content .content.notadd{
height: 408px;
}
.collection-dialog-content .content .el-tree-node__content{
height: 64px;
padding-right: 8px;
border-radius: 3px;
}
.collection-dialog-content .content .el-tree-node__content .el-tree-node__expand-icon{
font-size: 16px;
}
.collection-dialog-content .content .custom-tree-node{
width: 100%;
position: relative;
padding-left: 55px;
height: 100%;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.collection-dialog-content .content .custom-tree-node.notpadding{
padding-left: 0px;
}
.collection-dialog-content .content .custom-tree-node .img{
width: 40px;
height: 40px;
border-radius: 3px;
overflow: hidden;
margin-top: auto;
margin-bottom: auto;
position: absolute;
left: 0;
top: 0;
bottom: 0;
background: var(--content-imgbg);
}
.collection-dialog-content .content .custom-tree-node .img img{
object-fit: cover;
width: 100%;
height: 100%;
}
.collection-dialog-content .content .custom-tree-node .name{
width: 100%;
padding-right: 8px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-weight: 700;
font-size: 14px;
}
.collection-dialog-content .content .custom-tree-node .btn{
display: none;
}
.collection-dialog-content .content .custom-tree-node:hover .btn{
display: block;
}
.collection-dialog-content .content .custom-tree-node .avatar{
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.collection-dialog-content .content .custom-tree-node .avatar>li{
margin-left: -8px;
}
.collection-dialog-content .content .custom-tree-node .avatar>li:first-child{
margin-left: 0;
}
.collection-dialog-content .content .custom-tree-node .avatar .img-circle{
width: 24px;
height: 24px;
vertical-align: text-top;
border: 1px solid var(--border-color-base);
}
.collection-dialog-content .content .custom-tree-node .avatar .Topcarousel{
width: 24px;
height: 24px;
border: 1px solid var(--border-color-base);
text-align: center;
line-height: 24px;
color: #FFFFFF;
font-size: 14px;
}
.collection-dialog-content .content .custom-tree-node:hover .avatar{
display: none;
}
.collection-dialog-content .footer{
height: 50px;
line-height: 50px;
font-size: 18px;
border-top: 1px solid var(--border-color-base);
text-align: center;
cursor: pointer;
color: var(--header-text);
}
.collection-dialog-content .footer:hover{
background-color: var(--bg-poperHover);
color: var(--header-active);
}
.collection-dialog-content .footer i{
font-size: 23px;
margin-right: 8px;
color: var(--starsActive);
vertical-align: text-bottom;
}

View File

@@ -1,3 +1,11 @@
#Details_Iframe{
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 1000;
}
#container_scroll .el-loading-mask{
background: var(--bg-content);
z-index: 20;
@@ -21,6 +29,11 @@
width: 100%;
height: 100%;
}
#container_scroll .container-not.center{
display: flex;
justify-content: center;
align-items: center;
}
.image-container{
min-height: 100%;
position: relative;
@@ -34,12 +47,21 @@
position: absolute;
}
.image-container .image-wrapper .image-item .image-inside{
padding: 0 4px;
padding: 0 4px;
position: relative;
}
.image-container .image-wrapper .image-item .image-inside .image-single{
cursor: pointer;
position: relative;
background: var(--bg-content);
background: var(--bg-content);
border: 1px solid transparent;
}
.image-container .image-wrapper .image-item.checked .image-inside .image-single{
border: 1px solid var(--border-color-base);
border-radius: 18px;
}
.container2 .image-container .image-wrapper .image-item.checked .image-inside .image-single{
border-radius: 3px;
}
.image-container .image-wrapper .image-item .image-inside .image-single.radius{
border-radius: 18px;
@@ -99,7 +121,7 @@
height: 100%;
opacity: 0;
overflow: hidden;
z-index: 5;
z-index: 1;
}
.image-container .image-wrapper .image-item .image-inside .image-single .image-playurl.show{
opacity: 1;
@@ -108,14 +130,54 @@
.image-container .image-wrapper .image-item .image-inside .message{
text-align: center;
}
.image-container .image-wrapper .image-item .image-inside .image-single .topFlex{
.image-container .image-wrapper .image-item .image-inside .el-button-group{
position: absolute;
left: 8px;
z-index: 10;
left: 12px;
top: 8px;
display: none;
}
.image-container .image-wrapper .image-item .image-inside:hover .el-button-group{
display: block;
}
.image-container .image-wrapper .image-item .image-inside .el-button-group .reference{
margin-right: -1px;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
float: left;
border-left: 0;
border-top-left-radius: 18px;
border-bottom-left-radius: 18px;
}
.container2 .image-container .image-wrapper .image-item .image-inside .el-button-group .reference{
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
}
.container2 .image-container .image-wrapper .image-item .image-inside .el-button-group.border .reference{
border-radius: 3px;
border-color: #f56c6c;
}
.image-container .image-wrapper .image-item .image-inside .el-button-group .el-dropdown__caret-button{
height: 36px;
padding: 0px 3px;
border-top-right-radius: 18px;
border-bottom-right-radius: 18px;
width: 30px;
}
.container2 .image-container .image-wrapper .image-item .image-inside .el-button-group .el-dropdown__caret-button{
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
.image-container .image-wrapper .image-item .image-inside .topFlex{
position: absolute;
right: 8px;
top: 8px;
overflow: hidden;
z-index: 10;
}
.image-container .image-wrapper .image-item .image-inside .image-single .circulars{
.image-container .image-wrapper .image-item .image-inside .circulars{
background-color: var(--content-imgbg-btn);
color: var(--content-imgbg-txt);
border-radius: 50%;
@@ -130,17 +192,17 @@
display: none;
z-index: 10;
}
.image-container .image-wrapper .image-item .image-inside .image-single.showoperation .circulars{
.image-container .image-wrapper .image-item .image-inside:hover .circulars{
display: block;
}
.image-container .image-wrapper .image-item .image-inside .image-single .circulars:first-child{
.image-container .image-wrapper .image-item .image-inside .circulars:first-child{
margin-left: 0;
}
.image-container .image-wrapper .image-item .image-inside .image-single .circulars:hover{
.image-container .image-wrapper .image-item .image-inside .circulars:hover{
color: var(--content-imgbg-txtHover);
background-color: var(--content-imgbg-btnHover);
}
.image-container .image-wrapper .image-item .image-inside .image-single .circulars.link{
.image-container .image-wrapper .image-item .image-inside .circulars.link{
position: absolute;
bottom: 8px;
left: 8px;
@@ -148,22 +210,22 @@
width: auto;
border-radius: 8px;
padding: 0 5px;
z-index: 10;
z-index: 2;
margin-left: 0;
}
.image-container .image-wrapper .image-item .image-inside .image-single .circulars.link .el-link--inner{
.image-container .image-wrapper .image-item .image-inside .circulars.link .el-link--inner{
font-size: 14px;
vertical-align: top;
}
.image-container .image-wrapper .image-item .image-inside .image-single .image-playurl .movies-box{
.image-container .image-wrapper .image-item .image-inside .image-playurl .movies-box{
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 4;
z-index: 2;
background: var(--content-imgbg);
cursor: auto;
}
@@ -177,14 +239,17 @@
bottom: 0;
margin-top: auto;
margin-bottom: auto;
z-index: 4;
z-index: 2;
height: 100%;
}
.image-container .image-wrapper .image-item .image-inside .image-single .image-playurl .movies-box .voice{
position: absolute;
position: absolute;
right: 46px;
top: 7px;
z-index: 2;
}
.image-container .image-wrapper .image-item .image-inside .image-single .image-playurl.exhibit .movies-box .voice{
right: 8px;
top: 8px;
z-index: 10;
}
.image-container .image-wrapper .image-item .image-inside .image-single .image-playurl .movies-box .voice.yes .no,
.image-container .image-wrapper .image-item .image-inside .image-single .image-playurl .movies-box .voice.no .yes{
@@ -277,4 +342,55 @@
}
.image-container .image-wrapper .image-item .image-inside .message .other .score.active{
color: var(--starsActive);
}
.image-container .image-wrapper .image-item .collect-checkeds{
position: absolute;
width: 100%;
height: 100%;
z-index: 20;
display: none;
cursor: pointer;
/* border: 2px solid var(--border-color-base); */
}
.image-container .image-wrapper .image-item.checked .collect-checkeds{
display: block;
}
.image-container .image-wrapper .image-item .collect-checkeds .check{
position: absolute;
left: 12px;
top: 8px;
border-radius: 8px;
background: #000;
width: 24px;
height: 24px;
font-size: 16px;
font-weight: 700;
text-align: center;
line-height: 24px;
color: #FFFFFF;
}
#imagelayout .collects-move-btn-box{
position: fixed;
bottom: 30px;
left: 0;
z-index: 100;
width: 100%;
text-align: center;
}
#imagelayout .collects-move-btn-box .item{
width: 58px;
height: 58px;
text-align: center;
line-height: 58px;
font-size: 22px;
background: var(--header-textHover);
border-radius: 50%;
color: var(--header-text);
display: inline-block;
box-shadow: rgb(0,0,0,0.1) 0px 0px 20px;
cursor: pointer;
}
#imagelayout .collects-move-btn-box .item:hover{
background: var(--header-textHover);
color: var(--header-iconHover);
}

View File

@@ -51,6 +51,14 @@
text-overflow: ellipsis;
min-width: 80px;
}
.left-tree .el-tree-node__content .custom-tree-node .num{
color: var(--content-textMessage);
font-size: 14px;
}
.left-tree .el-tree-node__content .tree-node-color.custom-tree-node .name,
.left-tree .el-tree-node__content .tree-node-color.custom-tree-node .num{
color: var(--leftTreeColor);
}
.el-aside .classify-search{
position: absolute;
left: 0;
@@ -78,9 +86,6 @@
height: 100%;
width: 100%;
}
#container_scroll .el-scrollbar__wrap{
overflow-x: hidden;
}
#container_scroll .el-scrollbar__wrap .el-scrollbar__view{
min-height: 100%;
width: 100%;
@@ -91,14 +96,6 @@
#container_scroll .el-scrollbar__bar.is-vertical{
z-index: 10;
}
#Details_Iframe{
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 1000;
}
.container2 .el-header{
padding: 0;
z-index: 10;

View File

@@ -1,42 +1,44 @@
:root{
--bg-header:#262626;/* 头部颜色 */
--header-text:#D4D4D4;/* 头部文字 */
--header-active:#FFFFFF;/* 头部文字选中色 */
--header-icon:#B4B4B8;/* 头部icon */
--header-iconHover:#C8C8CC;/* 头部icon选中 */
--header-textHover:#353535;/* 头部块hover的背景色 */
--header-screenDel:#C9405A;/* 头部清除筛选的 × 背景色 */
--bg-content:#1E1E1E;/* 内容背景色 */
--content-text:#BCBCBC;/* 内容文字颜色 */
--content-textHover:#F4F4F4;/* 内容文字hover颜色 */
--content-imgbg:#161616;/* 图片背景色 */
--content-imgbg-btn:rgb(0,0,0,.3);/* 图片上的操作按钮背景色 */
--content-imgbg-txt:#F5F5F5;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnHover:rgb(0,0,0,.5);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txtHover:#F2F2F2;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnTime:rgb(0,0,0,.6);/* 图片上的操作时间背景颜色 */
--content-textMessage:#8F8F8F;/* 图片文字信息 */
--td-striped:#252525;/* td斑纹颜色 */
--bg-input:#292929;/* 输入框背景色 */
--bg-inputfocus:#292929;/* 输入框focus背景色 */
--bg-poper:#353535;/* 浮层背景色 */
--bg-poperHover:#4A4A4A;/* hover背景色 */
--color-primary:#0072EF;/* 选中颜色 */
--border-color-base:#141414;/* 组要边框颜色 */
--tip-color:#8A8A8A;/* 提示文字颜色 */
--bg-tooltip:#303030;/* title显示背景色 */
--music-line:#9B9B9B;/* 音乐滑动线的颜色 */
--slider-line:#404040;/* 滑块颜色 */
--radio-line:#686868;/* radio边框颜色 */
--tagbg:#2B2B2B;/* 标签左侧颜色 */
--stars:#3A3A3A;/* 评分颜色 */
--starsActive:#DDAB1E;/* 选中评分颜色 */
:root{
--bg-header:#262626;/* 头部颜色 */
--header-text:#D4D4D4;/* 头部文字 */
--header-active:#FFFFFF;/* 头部文字选中色 */
--header-icon:#B4B4B8;/* 头部icon */
--header-iconHover:#C8C8CC;/* 头部icon选中 */
--header-textHover:#353535;/* 头部块hover的背景色 */
--header-screenDel:#C9405A;/* 头部清除筛选的 × 背景色 */
--bg-content:#1E1E1E;/* 内容背景色 */
--bg-contentopacity:rgb(30,30,30,0.6);/* 内容背景色透明 */
--content-text:#BCBCBC;/* 内容文字颜色 */
--content-textHover:#F4F4F4;/* 内容文字hover颜色 */
--content-imgbg:#161616;/* 图片背景色 */
--content-imgbg-btn:rgb(0,0,0,.3);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txt:#F5F5F5;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnHover:rgb(0,0,0,.5);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txtHover:#F2F2F2;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnTime:rgb(0,0,0,.6);/* 图片上的操作时间背景颜色 */
--content-textMessage:#8F8F8F;/* 图片文字信息 */
--td-striped:#252525;/* td斑纹颜色 */
--bg-input:#292929;/* 输入框背景色 */
--bg-inputfocus:#292929;/* 输入框focus背景色 */
--bg-poper:#353535;/* 浮层背景色 */
--bg-poperHover:#4A4A4A;/* hover背景色 */
--color-primary:#0072EF;/* 选中颜色 */
--border-color-base:#141414;/* 组要边框颜色 */
--tip-color:#8A8A8A;/* 提示文字颜色 */
--bg-tooltip:#303030;/* title显示背景色 */
--music-line:#9B9B9B;/* 音乐滑动线的颜色 */
--slider-line:#404040;/* 滑块颜色 */
--radio-line:#686868;/* radio边框颜色 */
--tagbg:#2B2B2B;/* 标签左侧颜色 */
--stars:#3A3A3A;/* 评分颜色 */
--starsActive:#DDAB1E;/* 选中评分颜色 */
--leftTreeColor:#D7BA6E;
}

View File

@@ -1,42 +1,44 @@
:root{
--bg-header:#404040;/* 头部颜色 */
--header-text:#D9D9D9;/* 头部文字 */
--header-active:#FFFFFF;/* 头部文字选中色 */
--header-icon:#B9B9BD;/* 头部icon */
--header-iconHover:#CBCBCF;/* 头部icon选中 */
--header-textHover:#424242;/* 头部块hover的背景色 */
--header-screenDel:#C33A54;/* 头部清除筛选的 × 背景色 */
--bg-content:#383838;/* 内容背景色 */
--content-text:#C4C4C4;/* 内容文字颜色 */
--content-textHover:#F6F6F6;/* 内容文字hover颜色 */
--content-imgbg:#303030;/* 图片背景色 */
--content-imgbg-btn:rgb(0,0,0,.3);/* 图片上的操作按钮背景色 */
--content-imgbg-txt:#F5F5F5;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnHover:rgb(0,0,0,.5);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txtHover:#F2F2F2;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnTime:rgb(0,0,0,.6);/* 图片上的操作时间背景颜色 */
--content-textMessage:#9C9C9C;/* 图片文字信息 */
--td-striped:#3E3E3E;/* td斑纹颜色 */
--bg-input:#2D2D2D;/* 输入框背景色 */
--bg-inputfocus:#2D2D2D;/* 输入框focus背景色 */
--bg-poper:#4C4C4C;/* 浮层背景色 */
--bg-poperHover:#5E5E5E;/* hover背景色 */
--color-primary:#0072EF;/* 选中颜色 */
--border-color-base:#222222;/* 组要边框颜色 */
--tip-color:#8C8C8C;/* 提示文字颜色 */
--bg-tooltip:#303030;/* title显示背景色 */
--music-line:#9B9B9B;/* 音乐滑动线的颜色 */
--slider-line:#565656;/* 滑块颜色 */
--radio-line:#797979;/* radio边框颜色 */
--tagbg:#454545;/* 标签左侧颜色 */
--stars:#515151;/* 选中评分颜色 */
--starsActive:#E1AF22;/* 评分颜色 */
}
:root{
--bg-header:#404040;/* 头部颜色 */
--header-text:#D9D9D9;/* 头部文字 */
--header-active:#FFFFFF;/* 头部文字选中色 */
--header-icon:#B9B9BD;/* 头部icon */
--header-iconHover:#CBCBCF;/* 头部icon选中 */
--header-textHover:#424242;/* 头部块hover的背景色 */
--header-screenDel:#C33A54;/* 头部清除筛选的 × 背景色 */
--bg-content:#383838;/* 内容背景色 */
--bg-contentopacity:rgb(56,56,56,0.6);/* 内容背景色透明 */
--content-text:#C4C4C4;/* 内容文字颜色 */
--content-textHover:#F6F6F6;/* 内容文字hover颜色 */
--content-imgbg:#303030;/* 图片背景色 */
--content-imgbg-btn:rgb(0,0,0,.3);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txt:#F5F5F5;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnHover:rgb(0,0,0,.5);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txtHover:#F2F2F2;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnTime:rgb(0,0,0,.6);/* 图片上的操作时间背景颜色 */
--content-textMessage:#9C9C9C;/* 图片文字信息 */
--td-striped:#3E3E3E;/* td斑纹颜色 */
--bg-input:#2D2D2D;/* 输入框背景色 */
--bg-inputfocus:#2D2D2D;/* 输入框focus背景色 */
--bg-poper:#4C4C4C;/* 浮层背景色 */
--bg-poperHover:#5E5E5E;/* hover背景色 */
--color-primary:#0072EF;/* 选中颜色 */
--border-color-base:#222222;/* 组要边框颜色 */
--tip-color:#8C8C8C;/* 提示文字颜色 */
--bg-tooltip:#303030;/* title显示背景色 */
--music-line:#9B9B9B;/* 音乐滑动线的颜色 */
--slider-line:#565656;/* 滑块颜色 */
--radio-line:#797979;/* radio边框颜色 */
--tagbg:#454545;/* 标签左侧颜色 */
--stars:#515151;/* 选中评分颜色 */
--starsActive:#E1AF22;/* 评分颜色 */
--leftTreeColor:#FFE9A4;
}

View File

@@ -1,42 +1,44 @@
:root{
--bg-header:#DCDEDF;/* 头部颜色 */
--header-text:#191D1E;/* 头部文字 */
--header-active:#121516;/* 头部文字选中色 */
--header-icon:#3B3C3C;/* 头部icon */
--header-iconHover:#393A3A;/* 头部icon选中 */
--header-textHover:#D8DADC;/* 头部块hover的背景色 */
--header-screenDel:#F66E88;/* 头部清除筛选的 × 背景色 */
--bg-content:#E2E4E5;/* 内容背景色 */
--content-text:#26292A;/* 内容文字颜色 */
--content-textHover:#121516;/* 内容文字hover颜色 */
--content-imgbg:#FFFFFF;/* 图片背景色 */
--content-imgbg-btn:rgb(0,0,0,.3);/* 图片上的操作按钮背景色 */
--content-imgbg-txt:#F5F5F5;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnHover:rgb(0,0,0,.5);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txtHover:#F2F2F2;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnTime:rgb(0,0,0,.6);/* 图片上的操作时间背景颜色 */
--content-textMessage:#535558;/* 图片文字信息 */
--td-striped:#EDEEEF;/* td斑纹颜色 */
--bg-input:#EBEDEE;/* 输入框背景色 */
--bg-inputfocus:#FFFFFF;/* 输入框focus背景色 */
--bg-poper:#DCDEDF;/* 浮层背景色 */
--bg-poperHover:#CBCDD0;/* hover背景色 */
--color-primary:#0072EF;/* 选中颜色 */
--border-color-base:#C6C8C9;/* 组要边框颜色 */
--tip-color:#7E8182;/* 提示文字颜色 */
--bg-tooltip:#303030;/* title显示背景色 */
--music-line:#9B9B9B;/* 音乐滑动线的颜色 */
--slider-line:#C3C5C7;/* 滑块颜色 */
--radio-line:#ACAFB0;/* radio边框颜色 */
--tagbg:#F7F7F7;/* 标签左侧颜色 */
--stars:#BEC0C2;/* 评分颜色 */
--starsActive:#FD9B00;/* 选中评分颜色 */
:root{
--bg-header:#DCDEDF;/* 头部颜色 */
--header-text:#191D1E;/* 头部文字 */
--header-active:#121516;/* 头部文字选中色 */
--header-icon:#3B3C3C;/* 头部icon */
--header-iconHover:#393A3A;/* 头部icon选中 */
--header-textHover:#D8DADC;/* 头部块hover的背景色 */
--header-screenDel:#F66E88;/* 头部清除筛选的 × 背景色 */
--bg-content:#E2E4E5;/* 内容背景色 */
--bg-contentopacity:rgb(226,228,229,0.6);/* 内容背景色透明 */
--content-text:#26292A;/* 内容文字颜色 */
--content-textHover:#121516;/* 内容文字hover颜色 */
--content-imgbg:#FFFFFF;/* 图片背景色 */
--content-imgbg-btn:rgb(0,0,0,.3);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txt:#F5F5F5;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnHover:rgb(0,0,0,.5);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txtHover:#F2F2F2;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnTime:rgb(0,0,0,.6);/* 图片上的操作时间背景颜色 */
--content-textMessage:#535558;/* 图片文字信息 */
--td-striped:#EDEEEF;/* td斑纹颜色 */
--bg-input:#EBEDEE;/* 输入框背景色 */
--bg-inputfocus:#FFFFFF;/* 输入框focus背景色 */
--bg-poper:#DCDEDF;/* 浮层背景色 */
--bg-poperHover:#CBCDD0;/* hover背景色 */
--color-primary:#0072EF;/* 选中颜色 */
--border-color-base:#C6C8C9;/* 组要边框颜色 */
--tip-color:#7E8182;/* 提示文字颜色 */
--bg-tooltip:#303030;/* title显示背景色 */
--music-line:#9B9B9B;/* 音乐滑动线的颜色 */
--slider-line:#C3C5C7;/* 滑块颜色 */
--radio-line:#ACAFB0;/* radio边框颜色 */
--tagbg:#F7F7F7;/* 标签左侧颜色 */
--stars:#BEC0C2;/* 评分颜色 */
--starsActive:#FD9B00;/* 选中评分颜色 */
--leftTreeColor:#37567C;
}

View File

@@ -1,42 +1,43 @@
:root{
--bg-header:#363A4B;/* 头部颜色 */
--header-text:#D7D8DB;/* 头部文字 */
--header-active:#FFFFFF;/* 头部文字选中色 */
--header-icon:#B8B8BF;/* 头部icon */
--header-iconHover:#CDCDD3;/* 头部icon选中 */
--header-textHover:#454855;/* 头部块hover的背景色 */
--header-screenDel:#CD4562;/* 头部清除筛选的 × 背景色 */
--bg-content:#303342;/* 内容背景色 */
--content-text:#C1C2C7;/* 内容文字颜色 */
--content-textHover:#F2F2F3;/* 内容文字hover颜色 */
--content-imgbg:#2A2C39;/* 图片背景色 */
--content-imgbg-btn:rgb(0,0,0,.3);/* 图片上的操作按钮背景色 */
--content-imgbg-txt:#F5F5F5;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnHover:rgb(0,0,0,.5);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txtHover:#F2F2F2;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnTime:rgb(0,0,0,.6);/* 图片上的操作时间背景颜色 */
--content-textMessage:#9899A1;/* 图片文字信息 */
--td-striped:#363948;/* td斑纹颜色 */
--bg-input:#262935;/* 输入框背景色 */
--bg-inputfocus:#262935;/* 输入框focus背景色 */
--bg-poper:#454855;/* 浮层背景色 */
--bg-poperHover:#585B66;/* hover背景色 */
--color-primary:#0072EF;/* 选中颜色 */
--border-color-base:#1D1F28;/* 组要边框颜色 */
--tip-color:#888A90;/* 提示文字颜色 */
--bg-tooltip:#303030;/* title显示背景色 */
--music-line:#9B9B9B;/* 音乐滑动线的颜色 */
--slider-line:#4F515E;/* 滑块颜色 */
--radio-line:#747680;/* radio边框颜色 */
--tagbg:#3B3E51;/* 标签左侧颜色 */
--stars:#4A4D5A;/* 评分颜色 */
--starsActive:#DFAE23;/* 选中评分颜色 */
:root{
--bg-header:#363A4B;/* 头部颜色 */
--header-text:#D7D8DB;/* 头部文字 */
--header-active:#FFFFFF;/* 头部文字选中色 */
--header-icon:#B8B8BF;/* 头部icon */
--header-iconHover:#CDCDD3;/* 头部icon选中 */
--header-textHover:#454855;/* 头部块hover的背景色 */
--header-screenDel:#CD4562;/* 头部清除筛选的 × 背景色 */
--bg-content:#303342;/* 内容背景色 */
--bg-contentopacity:rgb(48,51,66,0.6);/* 内容背景色透明 */
--content-text:#C1C2C7;/* 内容文字颜色 */
--content-textHover:#F2F2F3;/* 内容文字hover颜色 */
--content-imgbg:#2A2C39;/* 图片背景色 */
--content-imgbg-btn:rgb(0,0,0,.3);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txt:#F5F5F5;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnHover:rgb(0,0,0,.5);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txtHover:#F2F2F2;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnTime:rgb(0,0,0,.6);/* 图片上的操作时间背景颜色 */
--content-textMessage:#9899A1;/* 图片文字信息 */
--td-striped:#363948;/* td斑纹颜色 */
--bg-input:#262935;/* 输入框背景色 */
--bg-inputfocus:#262935;/* 输入框focus背景色 */
--bg-poper:#454855;/* 浮层背景色 */
--bg-poperHover:#585B66;/* hover背景色 */
--color-primary:#0072EF;/* 选中颜色 */
--border-color-base:#1D1F28;/* 组要边框颜色 */
--tip-color:#888A90;/* 提示文字颜色 */
--bg-tooltip:#303030;/* title显示背景色 */
--music-line:#9B9B9B;/* 音乐滑动线的颜色 */
--slider-line:#4F515E;/* 滑块颜色 */
--radio-line:#747680;/* radio边框颜色 */
--tagbg:#3B3E51;/* 标签左侧颜色 */
--stars:#4A4D5A;/* 评分颜色 */
--starsActive:#DFAE23;/* 选中评分颜色 */
--leftTreeColor:#93D7F8;
}

View File

@@ -1,43 +1,44 @@
:root{
--bg-header:#3B384A;/* 头部颜色 */
--header-text:#D8D7DB;/* 头部文字 */
--header-active:#FFFFFF;/* 头部文字选中色 */
--header-icon:#B8B8BF;/* 头部icon */
--header-iconHover:#CACAD0;/* 头部icon选中 */
--header-textHover:#494654;/* 头部块hover的背景色 */
--header-screenDel:#CE4462;/* 头部清除筛选的 × 背景色 */
--bg-content:#343141;/* 内容背景色 */
--content-text:#C2C2C6;/* 内容文字颜色 */
--content-textHover:#FFFFFF;/* 内容文字hover颜色 */
--content-imgbg:#2D2A38;/* 图片背景色 */
--content-imgbg-btn:rgb(0,0,0,.3);/* 图片上的操作按钮背景色 */
--content-imgbg-txt:#F5F5F5;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnHover:rgb(0,0,0,.5);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txtHover:#F2F2F2;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnTime:rgb(0,0,0,.6);/* 图片上的操作时间背景颜色 */
--content-textMessage:#9A98A0;/* 图片文字信息 */
--td-striped:#3A3747;/* td斑纹颜色 */
--bg-input:#2A2734;/* 输入框背景色 */
--bg-inputfocus:#2A2734;/* 输入框focus背景色 */
--bg-poper:#494654;/* 浮层背景色 */
--bg-poperHover:#5C5965;/* hover背景色 */
--color-primary:#0072EF;/* 选中颜色 */
--border-color-base:#1F1D27;/* 组要边框颜色 */
--tip-color:#8A8890;/* 提示文字颜色 */
--bg-tooltip:#303030;/* title显示背景色 */
--music-line:#9B9B9B;/* 音乐滑动线的颜色 */
--slider-line:#52505D;/* 滑块颜色 */
--radio-line:#77747F;/* radio边框颜色 */
--tagbg:#403C50;/* 标签左侧颜色 */
--stars:#4D4B59;/* 评分颜色 */
--starsActive:#E0AD23;/* 选中评分颜色 */
:root{
--bg-header:#3B384A;/* 头部颜色 */
--header-text:#D8D7DB;/* 头部文字 */
--header-active:#FFFFFF;/* 头部文字选中色 */
--header-icon:#B8B8BF;/* 头部icon */
--header-iconHover:#CACAD0;/* 头部icon选中 */
--header-textHover:#494654;/* 头部块hover的背景色 */
--header-screenDel:#CE4462;/* 头部清除筛选的 × 背景色 */
--bg-content:#343141;/* 内容背景色 */
--bg-contentopacity:rgb(52,49,65,0.6);/* 内容背景色透明 */
--content-text:#C2C2C6;/* 内容文字颜色 */
--content-textHover:#FFFFFF;/* 内容文字hover颜色 */
--content-imgbg:#2D2A38;/* 图片背景色 */
--content-imgbg-btn:rgb(0,0,0,.3);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txt:#F5F5F5;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnHover:rgb(0,0,0,.5);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txtHover:#F2F2F2;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnTime:rgb(0,0,0,.6);/* 图片上的操作时间背景颜色 */
--content-textMessage:#9A98A0;/* 图片文字信息 */
--td-striped:#3A3747;/* td斑纹颜色 */
--bg-input:#2A2734;/* 输入框背景色 */
--bg-inputfocus:#2A2734;/* 输入框focus背景色 */
--bg-poper:#494654;/* 浮层背景色 */
--bg-poperHover:#5C5965;/* hover背景色 */
--color-primary:#0072EF;/* 选中颜色 */
--border-color-base:#1F1D27;/* 组要边框颜色 */
--tip-color:#8A8890;/* 提示文字颜色 */
--bg-tooltip:#303030;/* title显示背景色 */
--music-line:#9B9B9B;/* 音乐滑动线的颜色 */
--slider-line:#52505D;/* 滑块颜色 */
--radio-line:#77747F;/* radio边框颜色 */
--tagbg:#403C50;/* 标签左侧颜色 */
--stars:#4D4B59;/* 评分颜色 */
--starsActive:#E0AD23;/* 选中评分颜色 */
--leftTreeColor:#D2A6FF;
}

View File

@@ -1,44 +1,45 @@
:root{
--bg-header:#F1F1F1;/* 头部颜色 */
--header-text:#1E1E1E;/* 头部文字 */
--header-active:#111111;/* 头部文字选中色 */
--header-icon:#404040;/* 头部icon */
--header-iconHover:#272727;/* 头部icon选中 */
--header-textHover:#DCDCDC;/* 头部块hover的背景色 */
--header-screenDel:#F46B85;/* 头部清除筛选的 × 背景色 */
--bg-content:#F8F8F8;/* 内容背景色 */
--content-text:#272727;/* 内容文字颜色 */
--content-textHover:#111111;/* 内容文字hover颜色 */
--content-imgbg:#FFFFFF;/* 图片背景色 */
--content-imgbg-btn:rgb(0,0,0,.3);/* 图片上的操作按钮背景色 */
--content-imgbg-txt:#F5F5F5;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnHover:rgb(0,0,0,.5);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txtHover:#F2F2F2;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnTime:rgb(0,0,0,.6);/* 图片上的操作时间背景颜色 */
--content-textMessage:#58595C;/* 图片文字信息 */
--td-striped:#FFFFFF;/* td斑纹颜色 */
--bg-input:#FFFFFF;/* 输入框背景色 */
--bg-inputfocus:#FFFFFF;/* 输入框focus背景色 */
--bg-poper:#FFFFFF;/* 浮层背景色 */
--bg-poperHover:#DCDCDC;/* hover背景色 */
--color-primary:#0072EF;/* 选中颜色 */
--border-color-base:#D7D7D7;/* 组要边框颜色 */
--tip-color:#888888;/* 提示文字颜色 */
--bg-tooltip:#303030;/* title显示背景色 */
--music-line:#9B9B9B;/* 音乐滑动线的颜色 */
--slider-line:#D4D4D4;/* 滑块颜色 */
--radio-line:#BEBEBE;/* radio边框颜色 */
--tagbg:#F7F7F7;/* 标签左侧颜色 */
--stars:#CFD0D1;/* 评分颜色 */
--starsActive:#FD9B00;/* 选中评分颜色 */
:root{
--bg-header:#F1F1F1;/* 头部颜色 */
--header-text:#1E1E1E;/* 头部文字 */
--header-active:#111111;/* 头部文字选中色 */
--header-icon:#404040;/* 头部icon */
--header-iconHover:#272727;/* 头部icon选中 */
--header-textHover:#DCDCDC;/* 头部块hover的背景色 */
--header-screenDel:#F46B85;/* 头部清除筛选的 × 背景色 */
--bg-content:#F8F8F8;/* 内容背景色 */
--bg-contentopacity:rgb(248,248,248,0.6);/* 内容背景色透明 */
--content-text:#272727;/* 内容文字颜色 */
--content-textHover:#111111;/* 内容文字hover颜色 */
--content-imgbg:#FFFFFF;/* 图片背景色 */
--content-imgbg-btn:rgb(0,0,0,.3);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txt:#F5F5F5;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnHover:rgb(0,0,0,.5);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txtHover:#F2F2F2;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnTime:rgb(0,0,0,.6);/* 图片上的操作时间背景颜色 */
--content-textMessage:#58595C;/* 图片文字信息 */
--td-striped:#FFFFFF;/* td斑纹颜色 */
--bg-input:#FFFFFF;/* 输入框背景色 */
--bg-inputfocus:#FFFFFF;/* 输入框focus背景色 */
--bg-poper:#FFFFFF;/* 浮层背景色 */
--bg-poperHover:#DCDCDC;/* hover背景色 */
--color-primary:#0072EF;/* 选中颜色 */
--border-color-base:#D7D7D7;/* 组要边框颜色 */
--tip-color:#888888;/* 提示文字颜色 */
--bg-tooltip:#303030;/* title显示背景色 */
--music-line:#9B9B9B;/* 音乐滑动线的颜色 */
--slider-line:#D4D4D4;/* 滑块颜色 */
--radio-line:#BEBEBE;/* radio边框颜色 */
--tagbg:#F7F7F7;/* 标签左侧颜色 */
--stars:#CFD0D1;/* 评分颜色 */
--starsActive:#FD9B00;/* 选中评分颜色 */
--leftTreeColor:#37748C;
}

View File

@@ -5,6 +5,20 @@ if (!defined('IN_OAOOA')) {
ignore_user_abort(true);
@set_time_limit(0);
@ini_set('max_execution_time', 0);
$locked = true;
$processname = 'DZZ_LOCK_PICHOMEDELETE';
if (!dzz_process::islocked($processname, 60*60)) {
$locked=false;
}
//dzz_process::unlock($processname);
if ($locked) {
exit(json_encode( array('error'=>'进程已被锁定请稍后再试')));
}
foreach(DB::fetch_all("select appid from %t where isdelete =1",array('pichome_vapp')) as $v){
C::t('pichome_vapp')->delete_vapp_by_appid($v['appid']);
}
}
dzz_process::unlock($processname);
if(DB::result_first("select count(appid) from %t where isdelete =1 ",array('pichome_vapp'))){
dfsockopen(getglobal('localurl') . 'index.php?mod=pichome&op=delete', 0, '', '', false, '', 0.1);
}
exit('success');

View File

@@ -1,20 +1,15 @@
<?php
if (!defined('IN_OAOOA')) {//所有的php文件必须加上此句防止被外部调用
exit('Access Denied');
}
$path = dzzdecode($_GET['dpath'],'',0);
if(!$path) exit(json_encode(array('error'=>'dpath is must')));
$resourcesdata = C::t('pichome_resources')->fetch($path);
$resourcesdata['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($resourcesdata['name']) : ($resourcesdata['name'])) . '"';
$attach = DB::fetch_first("select path,appid from %t where rid = %s",array('pichome_resources_attr',$path));
$librarydata = DB::fetch_first("select path,iswebsitefile from %t where appid = %s",array('pichome_vapp',$attach['appid']));
if($librarydata['iswebsitefile']){
$realpath = $librarydata['path'].'./'.$attach['path'];
$attachurl= getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($realpath);
}else{
$attachurl = $librarydata['path'].'./'.$attach['path'];
}
if (!defined('IN_OAOOA')) {//所有的php文件必须加上此句防止被外部调用
exit('Access Denied');
}
$path = dzzdecode($_GET['dpath'],'',0);
if(!$path) exit(json_encode(array('error'=>'dpath is must')));
$resourcesdata = C::t('pichome_resources')->fetch($path);
$resourcesdata['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($resourcesdata['name']) : ($resourcesdata['name'])) . '"';
$attach = DB::fetch_first("select path,appid from %t where rid = %s",array('pichome_resources_attr',$path));
$librarydata = DB::fetch_first("select path,iswebsitefile from %t where appid = %s",array('pichome_vapp',$attach['appid']));
$d = new FileDownload();
$d->download($attachurl, $resourcesdata['name'], $resourcesdata['size'], 0, true);
exit();
$attachurl = $librarydata['path'].BS.$attach['path'];
$d = new FileDownload();
$d->download($attachurl, $resourcesdata['name'], $resourcesdata['size'], 0, true);
exit();

View File

@@ -3,16 +3,16 @@
if (!defined('IN_OAOOA')) {
exit('Access Denied');
}
@set_time_limit(0);
ini_set('memory_limit', -1);
@ini_set('max_execution_time', 0);
@ignore_user_abort(true);
@set_time_limit(0);
@ini_set('memory_limit', -1);
@ini_set('max_execution_time', 0);
$appid = isset($_GET['appid']) ? trim($_GET['appid']):0;
$processname = 'DZZ_EXPORTFILE_LOCK_'.$appid;
// dzz_process::unlock($processname);
//dzz_process::unlock($processname);
$locked = true;
if (!dzz_process::islocked($processname, 60*5)) {
if (!dzz_process::islocked($processname, 60*60*24)) {
$locked=false;
}
if ($locked) {
@@ -22,17 +22,42 @@
$force = isset($_GET['force']) ? intval($_GET['force']):0;
$data = C::t('pichome_vapp')->fetch($appid);
if(!$data) exit(json_encode(array('error'=>'no data')));
if($data['type'] == 0 && $data['state'] == 1 && $data['isdelete'] == 0){
include_once dzz_libfile('eagleexport');
if($data['state'] != 2 && $data['isdelete'] != 0) exit(json_encode(array('error'=>'is deleted or state is not allow')));
if($data['type'] == 0){
include_once DZZ_ROOT.'dzz'.BS.'eagle'.BS.'class'.BS.'class_eagleexport.php';
//include_once dzz_libfile('eagleexport');
$eagleexport = new eagleexport($data);
$return = $eagleexport->execExport($force);
}elseif($data['type'] == 1 && $data['state'] == 1 && $data['isdelete'] == 0){
include_once dzz_libfile('localexport');
try{
$return = $eagleexport->execExport($force);
}catch (Exception $e){
dzz_process::unlock($processname);
}
}elseif($data['type'] == 1){
include_once DZZ_ROOT.'dzz'.BS.'local'.BS.'class'.BS.'class_localexport.php';
//include_once dzz_libfile('localexport');
$localexport = new localexport($data);
//执行导入文件
$return = $localexport->execExport($force);
try{
$return = $localexport->execExport($force);
}catch (Exception $e){
dzz_process::unlock($processname);
}
}elseif ($data['type'] == 2){
include_once DZZ_ROOT.'dzz'.BS.'billfish'.BS.'class'.BS.'class_billfishexport.php';
$billfishxport = new billfishxport($data);
try{
$return = $billfishxport->execExport($force);
}catch (Exception $e){
dzz_process::unlock($processname);
}
}
dzz_process::unlock($processname);
exit('success');
$data = C::t('pichome_vapp')->fetch($appid);
if($data['state'] == 2){
dfsockopen(getglobal('localurl') . 'index.php?mod=pichome&op=exportfile&appid=' . $appid, 0, '', '', false, '', 1);
}elseif($data['state'] == 3){
dfsockopen(getglobal('localurl') . 'index.php?mod=pichome&op=exportfilecheck&appid=' . $appid, 0, '', '', false, '', 1);
}
// exit('success');

View File

@@ -1,34 +1,45 @@
<?php
if (!defined('IN_OAOOA')) {
exit('Access Denied');
}
@ignore_user_abort(true);
@set_time_limit(0);
@ini_set('memory_limit', -1);
@ini_set('max_execution_time', 0);
$appid = isset($_GET['appid']) ? trim($_GET['appid']):0;
$processname = 'DZZ_EXPORTCHECKFILE_LOCK_'.$appid;
//dzz_process::unlock($processname);
$locked = true;
if (!dzz_process::islocked($processname, 60*5)) {
$locked=false;
}
if ($locked) {
exit(json_encode( array('error'=>'进程已被锁定请稍后再试')));
}
$force = isset($_GET['force']) ? intval($_GET['force']):0;
$data = C::t('pichome_vapp')->fetch($appid);
if(!$data) exit(json_encode(array('error'=>'no data')));
if($data['type'] == 0 && $data['state'] == 2 && $data['isdelete'] == 0){
include_once dzz_libfile('eagleexport');
$eagleexport = new eagleexport($data);
$return = $eagleexport->execCheckFile();
}elseif($data['type'] == 1 && $data['state'] == 2 && $data['isdelete'] == 0){
include_once dzz_libfile('localexport');
$localexport = new localexport($data);
$return = $localexport->execCheckFile();
}
dzz_process::unlock($processname);
if (!defined('IN_OAOOA')) {
exit('Access Denied');
}
@ignore_user_abort(true);
@set_time_limit(0);
@ini_set('memory_limit', -1);
@ini_set('max_execution_time', 0);
$appid = isset($_GET['appid']) ? trim($_GET['appid']) : 0;
$processname = 'DZZ_EXPORTCHECKFILE_LOCK_' . $appid;
//dzz_process::unlock($processname);
$locked = true;
if (!dzz_process::islocked($processname, 60*60*24)) {
$locked = false;
}
if ($locked) {
exit(json_encode(array('error' => '进程已被锁定请稍后再试')));
}
$force = isset($_GET['force']) ? intval($_GET['force']) : 0;
$data = C::t('pichome_vapp')->fetch($appid);
if (!$data) exit(json_encode(array('error' => 'no data')));
if ($data['state'] != 3 && $data['isdelete'] != 0) exit(json_encode(array('error' => 'is deleted or state is not allow')));
if ($data['type'] == 0) {
include_once DZZ_ROOT.'dzz'.BS.'eagle'.BS.'class'.BS.'class_eagleexport.php';
//include_once dzz_libfile('eagleexport');
$eagleexport = new eagleexport($data);
$return = $eagleexport->execCheckFile();
} elseif ($data['type'] == 1) {
include_once DZZ_ROOT.'dzz'.BS.'local'.BS.'class'.BS.'class_localexport.php';
//include_once dzz_libfile('localexport');
$localexport = new localexport($data);
$return = $localexport->execCheckFile();
}elseif ($data['type'] == 2){
include_once DZZ_ROOT.'dzz'.BS.'billfish'.BS.'class'.BS.'class_billfishexport.php';
$billfishxport = new billfishxport($data);
$return = $billfishxport->execCheckFile();
}
dzz_process::unlock($processname);
$data = C::t('pichome_vapp')->fetch($appid);
if($data['state'] == 3){
dfsockopen(getglobal('localurl') . 'index.php?mod=pichome&op=exportfilecheck&appid=' . $appid, 0, '', '', false, '', 1);
}

View File

@@ -41,8 +41,11 @@ if ($operation == 'filelist') {
$fids = isset($_GET['fids']) ? trim($_GET['fids']) : '';
$hassub = isset($_GET['hassub']) ? intval($_GET['hassub']) : 0;
$vappids = [];
foreach(DB::fetch_all("select appid from %t where isdelete = 0",array('pichome_vapp')) as $v){
$vappids[] = $v['appid'];
foreach(DB::fetch_all("select appid,path from %t where isdelete = 0",array('pichome_vapp')) as $v){
if(is_dir($v['path'])){
$vappids[] = $v['appid'];
}
}
if(empty($vappids)){
$wheresql .= ' and 0';
@@ -481,6 +484,7 @@ if ($operation == 'filelist') {
default:
$orderarr[] = ' r.dateline ' . $asc;
}
$orderarr[] = " r.rid ".$asc;
$ordersql = implode(',', $orderarr);
if (!empty($para)) $params = array_merge($params, $para);
if (!empty($orderparams)) $params = array_merge($params, $orderparams);

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 807 B

View File

@@ -20,17 +20,24 @@
//主题
$theme = GetThemeColor();
//主题
//
$apps = [];
foreach(DB::fetch_all("select * from %t where isdelete = 0",array('pichome_vapp')) as $v){
$v['path'] = urlencode($v['path']);
$v['leaf'] = DB::result_first("select count(*) from %t where appid = %s",array('pichome_folder',$v['appid'])) ? false:true;
$hascatnum = DB::result_first("SELECT count(DISTINCT rid) FROM %t where appid = %s",array('pichome_folderresources',$v['appid']));
$v['nosubfilenum'] = $v['filenum'] - $hascatnum;
$apps[] = $v;
foreach(DB::fetch_all("select * from %t where isdelete = 0 order by disp ",array('pichome_vapp')) as $v){
if(is_dir($v['path'])){
$v['path'] = urlencode($v['path']);
$v['leaf'] = DB::result_first("select count(*) from %t where appid = %s",array('pichome_folder',$v['appid'])) ? false:true;
if(!$v['nosubfilenum']){
$hascatnum = DB::result_first("SELECT count(DISTINCT rid) FROM %t where appid = %s",array('pichome_folderresources',$v['appid']));
$v['nosubfilenum'] = $v['filenum'] - $hascatnum;
C::t('pichome_vapp')->update($v['appid'],array('nosubfilenum'=>$v['nosubfilenum']));
}
$apps[] = $v;
}
}
$apps = json_encode($apps);
//显示子分类内容
$ImageExpanded = C::t('user_setting')->fetch_by_skey('pichomeimageexpanded',$uid);
//筛选
$screen = C::t('user_setting')->fetch_by_skey('pichomeuserscreen',$uid);
@@ -39,8 +46,11 @@
$setting = $_G['setting'];
$pagesetting = $setting['pichomepagesetting'] ? $setting['pichomepagesetting'] : [];
//排序方式
$pichomesortfileds = C::t('user_setting')->fetch_by_skey('pichomesortfileds',$_G['uid']);
//显示信息
$pichomeshowfileds = C::t('user_setting')->fetch_by_skey('pichomeshowfileds',$_G['uid']);
//布局类型
$pichomelayout = C::t('user_setting')->fetch_by_skey('pichomelayout',$_G['uid']);
if($pichomesortfileds){
$sortdatarr = unserialize($pichomesortfileds);

View File

@@ -2,22 +2,34 @@
if (!defined('IN_OAOOA')) {
exit('Access Denied');
}
@set_time_limit(0);
@ini_set('memory_limit', -1);
@ini_set('max_execution_time', 0);
@ignore_user_abort(true);
@set_time_limit(0);
@ini_set('memory_limit', -1);
@ini_set('max_execution_time', 0);
$appid = isset($_GET['appid']) ? trim($_GET['appid']):0;
$force = isset($_GET['force']) ? intval($_GET['force']):0;
$data = C::t('pichome_vapp')->fetch($appid);
if(!$data) exit(json_encode(array('error'=>'no data')));
if($data['type'] == 0 && $data['isdelete'] == 0){
include_once dzz_libfile('eagleexport');
if(($data['state'] > 1 && $data['state'] < 4) || $data['isdelete'] != 0) exit(json_encode(array('error'=>'export is runing or is deleted')));
if($data['type'] == 0){
include_once DZZ_ROOT.'dzz'.BS.'eagle'.BS.'class'.BS.'class_eagleexport.php';
//include_once dzz_libfile('eagleexport');
$eagleexport = new eagleexport($data);
$return = $eagleexport->initExport();
}elseif($data['type'] == 1 && $data['isdelete'] == 0){
include_once dzz_libfile('localexport');
}elseif($data['type'] == 1 ){
include_once DZZ_ROOT.'dzz'.BS.'local'.BS.'class'.BS.'class_localexport.php';
//include_once dzz_libfile('localexport');
$localexport = new localexport($data);
$return = $localexport->initExport();
}elseif ($data['type'] == 2){
include_once DZZ_ROOT.'dzz'.BS.'billfish'.BS.'class'.BS.'class_billfishexport.php';
$billfishxport = new billfishxport($data);
$return = $billfishxport->initExport();
}
$data = C::t('pichome_vapp')->fetch($appid);
if($data['state'] == 2){
dfsockopen(getglobal('localurl') . 'index.php?mod=pichome&op=exportfile&appid=' . $appid, 0, '', '', false, '', 1);
}
exit(json_encode(array('success'=>true)));

View File

@@ -1,76 +1,73 @@
jQuery(document).ready(function() {
function debounce(fun, delay) {
var time;
return function(args) {
var that = this;
var _args = args;
if (time) clearTimeout(time);
time = setTimeout(function() {
fun.call(that, _args)
}, delay)
}
};
function URLdecode(str) {
var ret = "";
for(var i=0;i<str.length;i++) {
var chr = str.charAt(i);
if(chr == "+") {
ret += " ";
}else if(chr=="%") {
var asc = str.substring(i+1,i+3);
if(parseInt("0x"+asc)>0x7f) {
ret += decodeURI("%"+ str.substring(i+1,i+9));
i += 8;
}else {
ret += String.fromCharCode(parseInt("0x"+asc));
i += 2;
}
}else {
ret += chr;
}
}
return ret;
};
});
function debounce(fun, delay) {
var time;
return function(args) {
var that = this;
var _args = args;
if (time) clearTimeout(time);
time = setTimeout(function() {
fun.call(that, _args)
}, delay)
}
};
function URLdecode(str) {
var ret = "";
for(var i=0;i<str.length;i++) {
var chr = str.charAt(i);
if(chr == "+") {
ret += " ";
}else if(chr=="%") {
var asc = str.substring(i+1,i+3);
if(parseInt("0x"+asc)>0x7f) {
ret += decodeURI("%"+ str.substring(i+1,i+9));
i += 8;
}else {
ret += String.fromCharCode(parseInt("0x"+asc));
i += 2;
}
}else {
ret += chr;
}
}
return ret;
};
function GetDateVal(type){
var str = '';
var start = new Date();
var end = new Date();
switch(type){
case '今日':
break;
case '昨日':
end.setTime(end.getTime() - 3600 * 1000 * 24);
start.setTime(start.getTime() - 3600 * 1000 * 24);
break;
case '最近7日':
start.setTime(start.getTime() - 3600 * 1000 * 24 * 6);
break;
case '最近30日':
start.setTime(start.getTime() - 3600 * 1000 * 24 * 29);
break;
case '最近90日':
start.setTime(start.getTime() - 3600 * 1000 * 24 * 89);
break;
case '最近365日':
start.setTime(start.getTime() - 3600 * 1000 * 24 * 364);
break;
}
str = start.getFullYear()+'-'+(start.getMonth()+1)+'-'+start.getDate()+'_'+end.getFullYear()+'-'+(end.getMonth()+1)+'-'+end.getDate();
return str;
}
function CopyTxt(item,text){
var input = document.createElement('input'); input.setAttribute('id', 'copyInput');
input.setAttribute('value', text);
document.getElementsByTagName('body')[0].appendChild(input);
document.getElementById('copyInput').select();
document.execCommand('copy')
item.$message({
message: '成功复制到剪切板',
type: 'success'
});
document.getElementById('copyInput').remove();
function GetDateVal(type){
var str = '';
var start = new Date();
var end = new Date();
switch(type){
case '今日':
break;
case '昨日':
end.setTime(end.getTime() - 3600 * 1000 * 24);
start.setTime(start.getTime() - 3600 * 1000 * 24);
break;
case '最近7日':
start.setTime(start.getTime() - 3600 * 1000 * 24 * 6);
break;
case '最近30日':
start.setTime(start.getTime() - 3600 * 1000 * 24 * 29);
break;
case '最近90日':
start.setTime(start.getTime() - 3600 * 1000 * 24 * 89);
break;
case '最近365日':
start.setTime(start.getTime() - 3600 * 1000 * 24 * 364);
break;
}
str = start.getFullYear()+'-'+(start.getMonth()+1)+'-'+start.getDate()+'_'+end.getFullYear()+'-'+(end.getMonth()+1)+'-'+end.getDate();
return str;
}
function CopyTxt(item,text){
var input = document.createElement('input'); input.setAttribute('id', 'copyInput');
input.setAttribute('value', text);
document.getElementsByTagName('body')[0].appendChild(input);
document.getElementById('copyInput').select();
document.execCommand('copy')
item.$message({
message: '成功复制到剪切板',
type: 'success'
});
document.getElementById('copyInput').remove();
};

View File

@@ -0,0 +1,142 @@
Vue.component('add-star-tree', {
props:['rids','dialogvisible'],
template: `<el-dialog
title="创建收藏夹"
custom-class="addcollection-dialog"
@opened="PopoverShow"
@closed="PopoverHide"
:visible.sync="dialogvisible">
<el-form ref="form" :model="formdata" label-position="top">
<el-form-item label="名称" required>
<el-input v-model.trim="formdata.name" placeholder="请输入名称"></el-input>
</el-form-item>
<el-form-item label="用户权限">
<el-radio-group v-model="formdata.perm">
<el-radio :label="1">观察员</el-radio>
<el-radio :label="2">协作成员</el-radio>
<el-radio :label="3">管理员</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="添加合作用户">
<el-input v-model.trim="Userkeyword" @input="UserKeywordInput" placeholder="姓名搜索" clearable></el-input>
<div style="padding: 12px 24px 0 24px;">
<template v-if="user.loading">
<div style="position: relative;width: 100%;height: 100px;">
<div class="img-loading center">
<span class="el-icon-loading"></span>加载中...
</div>
</div>
</template>
<template v-else>
<el-checkbox-group v-model="formdata.user">
<el-checkbox v-for="item in user.data" :label="item.uid">
<div>
<div style="display:inline-block" v-html="item.icon"></div>
{{item.username}}
</div>
</el-checkbox>
</el-checkbox-group>
</template>
</div>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogvisible = false">取 消</el-button>
<el-button type="primary" @click="handleSubmit" :disabled="formdata.name?false:true">确 定</el-button>
</span>
</el-dialog>`,
data: function() {
return {
user:{
data:[],
loading:true
},
Userkeyword:'',
formdata:{
name:'',
perm:1,
user:[],
}
}
},
watch:{
},
created() {
},
methods:{
UserKeywordInput:debounce(function(val){//输入
this.GetUsers();
},800),
PopoverShow(){
this.GetUsers();
},
PopoverHide(){
var self = this;
self.user.loading = true;
self.Userkeyword = '';
self.formdata = {
name:'',
perm:1,
user:[],
};
self.$emit('closeaddcollectdialog');
},
handleSubmit(){
var self = this;
var param = {
name:self.formdata.name,
perm:self.formdata.perm,
uids:self.formdata.user.join(','),
};
$.post(SITEURL+DZZSCRIPT+'?mod=collection&op=collect&do=addcollect',param,function(json){
if(json.success){
self.addCollect(json.success.clid);
}else{
self.$message.error(json.error);
}
},'json');
},
addCollect(clid){
var self = this;
var param = {
rids:this.rids.join(','),
clid:clid
};
$.post(SITEURL+DZZSCRIPT+'?mod=collection&op=collect&do=addfilecollect',param,function(json){
if(json.success){
self.$message({
type:'success',
message:'收藏夹创建成功'
});
self.$message({
type:'success',
message:'文件收藏成功'
});
self.PopoverHide();
}else{
self.$message.error(json.error);
}
},'json');
},
GetUsers(){
var self = this;
self.user.loading = true;
$.post(SITEURL+DZZSCRIPT+'?mod=collection&op=collect&do=getuser',{
keyword:self.Userkeyword
},function(json){
var data = [];
self.user.data = json.success;
self.user.loading = false;
},'json');
}
},
mounted() {
},
beforeRouteLeave() {
},
});

View File

@@ -0,0 +1,262 @@
Vue.component('star-tree', {
template: `<el-popover
popper-class="collection-dialog"
@show="PopoverShow"
@hide="PopoverHide"
placement="bottom"
ref="refcollectiondialog"
trigger="click">
<div class="collection-dialog-content">
<div class="header">
<el-input
clearable
v-model.trim="filterText"
placeholder="请输入关键字"></el-input>
</div>
<div class="content">
<div v-if="loading" style="background: var(--bg-header);position: absolute;width: 100%;height: 100%;z-index: 10;">
<div class="img-loading center">
<span class="el-icon-loading"></span>加载中...
</div>
</div>
<el-scrollbar style="height:100%;">
<div style="padding:0 12px;">
<el-tree
v-if="NodeShow"
ref="lefttree"
:load="GetTreeData"
node-key="cid"
lazy
:props="defaultProps"
:filter-node-method="TreeDataFilterNode"
:default-expanded-keys="ExpandedNodeKeys">
<div class="custom-tree-node" slot-scope="{ node, data }">
<div class="img">
<img v-if="data.covert" :src="data.covert" />
</div>
<div class="name" v-cloak>{{ data.catname }}</div>
<ul class="avatar">
<li v-for="item in data.uids" v-html="item.icon"></li>
</ul>
<el-button class="btn" @click.stop.prevent="handleSubmit(data.cid,data.clid,data.parent)" type="primary" size="medium">收藏</el-button>
</div>
</el-tree>
</div>
</el-scrollbar>
</div>
<div class="footer" @click="handleOpenAdd">
<i class="el-icon-circle-plus"></i>创建收藏夹
</div>
</div>
<button slot="reference" type="button" class="el-button el-button--danger reference el-button--medium">
<span>收藏</span>
</button>
</el-popover>`,
props:['rids'],
data: function() {
return {
filterText:'',
defaultProps: {
children: 'children',
label: 'catname'
},
loading:true,
NodeShow:false,
ExpandedNodeKeys:[],
alreadyExpandedNodeKeys:[]
}
},
watch:{
filterText:debounce(function(val){
var self = this;
if(val){
self.alreadyExpandedNodeKeys = [];
self.ExpandedNodeKeys = [];
self.loading = true;
this.NodeShow = false;
$.post(SITEURL+DZZSCRIPT+'?mod=collection&op=collect&do=searchcollect',{
keyword:val
},function(json){
var data = [];
for(var i in json.clid){
var id = json.clid[i];
if(data.indexOf('p'+id)<0){
data.push('p'+id);
}
}
for(var x in json.cids){
var id = json.cids[x];
if(data.indexOf(parseInt(id))<0){
data.push(parseInt(id));
}
}
self.ExpandedNodeKeys = data;
self.$nextTick(function(){
self.NodeShow = true;
});
},'json');
}else{
this.filterTextclear();
}
},800)
},
created() {
},
methods:{
filterTextclear(){
var self = this;
self.alreadyExpandedNodeKeys = [];
self.ExpandedNodeKeys = [];
self.loading = true;
self.NodeShow = false;
self.$nextTick(function(){
self.NodeShow = true;
});
},
GetTreeData(node,resolve){
var self = this;
var param = {};
if(node.level == 1){
param = {
clid:node.data.cid.replace('p','')
}
}
if(node.level > 1){
param = {
cid:node.data.cid,
clid:node.data.clid
}
}
$.post(SITEURL+DZZSCRIPT+'?mod=collection&op=collect&do=collectlist',param,function(json){
var data = [];
for(var i in json.success){
var item = json.success[i];
if(node.level == 0){
item['cid'] = 'p'+item.clid;
item['catname'] = item.name;
item['parent'] = true;
self.alreadyExpandedNodeKeys.push(item['cid']);
}else{
item['cid'] = parseInt(item.cid);
item['parent'] = false;
self.alreadyExpandedNodeKeys.push(parseInt(item['cid']));
}
data.push(item)
}
resolve(data);
self.$nextTick(function(){
self.LeftGetTreeDataFinish();
})
},'json');
},
LeftGetTreeDataFinish(){
var self = this;
var finish = false;
if(self.ExpandedNodeKeys.length){
for(var i in self.ExpandedNodeKeys){
var id = self.ExpandedNodeKeys[i];
if(self.alreadyExpandedNodeKeys.indexOf(id)>-1){
finish = true;
}else{
return false;
}
}
if(finish){
if(self.filterText){
self.$refs['lefttree'].filter(self.filterText);
}
self.loading = false;
}
}else{
if(self.filterText){
self.$refs['lefttree'].filter(self.filterText);
}
self.loading = false;
}
},
PopoverShow(){
var self = this;
var collectkey = JSON.parse(localStorage.getItem('collectkey'));
if(collectkey){
var keys = collectkey.key.split('-');
if(keys.length>1){
keys.pop();
}
var newkeys = [];
for(var i in keys){
if(keys[i].indexOf('p')>-1){
newkeys.push(keys[i]);
}else{
newkeys.push(parseInt(keys[i]));
}
}
this.ExpandedNodeKeys = newkeys;
}
this.NodeShow = true;
},
PopoverHide(){
this.NodeShow = false;
},
handleSubmit(cid,clid,parent){
var param = {}
var self = this;
if(parent){
param = {
rids:this.rids,
clid:cid.replace('p','')
}
}else{
param = {
rids:this.rids,
cid:cid,
clid:clid
}
}
$.post(SITEURL+DZZSCRIPT+'?mod=collection&op=collect&do=addfilecollect',param,function(json){
if(json.success){
var node = self.$refs['lefttree'].getNode(cid);
if(parent){
var collect = {
name:node.data.catname,
key:cid
};
}else{
var collectkey = clid+'-'+node.data.pathkey;
var collect = {
name:node.data.catname,
key:'p'+clid+'-'+node.data.pathkey
};
}
localStorage.setItem('collectkey', JSON.stringify(collect));
self.$message({
type:'success',
message:'收藏成功'
});
self.$emit('addcollectsuccess');
self.$refs['refcollectiondialog'].doClose();
}else{
self.$message.error(json.error);
}
},'json');
},
handleOpenAdd(){
var self = this;
self.$refs['refcollectiondialog'].doClose();
self.$emit('openaddcollect',this.rids);
},
TreeDataFilterNode(value, data) {
if (!value) return true;
return data.catname.indexOf(value) !== -1;
},
},
mounted() {
var self = this;
},
beforeRouteLeave() {
},
});

Some files were not shown because too many files have changed in this diff Show More