27 Commits
2.0 ... 2.1.0

873 changed files with 40927 additions and 10096 deletions

188
README.md
View File

@@ -1,63 +1,173 @@
# 欧奥 PicHome
**演示地址:**[http://pichome.oaooa.com](http://pichome.oaooa.com/)
### 官方网站:https://oaooa.com/pichome.html PicHome是一款功能强大的开源网盘程序它不仅能高效管理各类文件还在图像和媒体文件管理方面表现出色。其亮点包括强大的文件共享功能和先进的AI辅助管理工具为用户提供了便捷、智能的文件管理体验。
### 演示地址:http://pichome.oaooa.com
# 欧奥PicHome是什么 ![1.jpg](https://imgc.cc/2024/04/29/662f1116e65a8.jpg)
欧奥PicHome是用于欧奥图文档系统的图片展示门户图片搜索引擎。也能够用于Eagle等其他图库软件的图片展示门户。
# 为什么使用欧奥PicHome ---
一般图库是由一个人或者多个人进行管理常见管理方式是采用欧奥图文档系统或者eagle等图库软件当需要将图库中内容向更多人展示个下载时就不太方便了。欧奥PicHome的用途就是作为已有图库的展示门户或者图片搜索引擎来使用。例如以下场景某企业的宣传设计品是由设计部的几个人员管理。企业的其他部门和产品代理商遍布在全国各地会经常需要获取产品各类设计素材宣传品的最新版本文件。此时这些人员就可以使用欧奥PicHome对需要的素材文件查找和下载。
**开发背景**
在数字化时代背景下图像、音视频等媒体文件已成为信息传递的核心载体其重要性不断攀升。然而传统网盘在处理这类文件时的管理方式逐渐显得力不从心。正是基于这一现实需求PicHome应时而生致力于提供一种创新、高效的媒体文件管理策略。
**技术基础**
- 开发语言PHP
- 数据库MYSQL
- 开源协议AGPL V2
---
### 功能特性
**网盘基础功能:与传统网盘的优势对比**
1. **多样化的列表模式**
- 传统网盘:传统网盘通常仅提供列表和网格两种视图。
- PicHome提供包括瀑布流、自适应布局、网格、列表、双排列表和详细视图在内的多种模式以适应不同用户的视觉和操作体验。
![2.jpg](https://imgc.cc/2024/04/29/662f111360fa0.jpg)
2. **定制化的文件信息展示**
- 传统网盘:信息展示固定,通常只显示图标、文件名和后缀名。
- PicHome允许用户根据需要自定义显示文件名、后缀名、标签、文件大小、图像尺寸、视频时长和添加时间等丰富信息。
![3.jpg](https://imgc.cc/2024/04/29/662f111320055.jpg)
3. **增强的文件快速预览功能**
- 传统网盘:需要打开文件才能查看内容。
- PicHome通过提供足够大的缩略图使得用户在没有打开文件的情况下就能快速识别和选择所需文件。音视频文件甚至可以在列表中直接预览快进播放。极大提升了查询效率。
# 功能特点 4. **先进的标签化文件管理**
- 传统网盘:大多不支持或仅提供基础的标签管理功能。
- PicHome支持自动获取图片的颜色、形状等属性以及音视频的时长等信息并允许用户添加二级标签、文件描述和评分从而实现多维度、深度的文件管理。
![4.jpg](https://imgc.cc/2024/04/29/662f111345222.jpg)
### 任何操作系统都可以安装 5. **自定义封面图与预览图**
windowsmacoslinux都可以安装PicHome - 传统网盘:文件以图标形式展示,图片和视频以自动生成的固定封面展示。
- PicHome允许用户为任意文件自定义封面这对于设计文件、压缩包等复杂文件来说可以更全面地展示文件内容。
![5.jpg](https://imgc.cc/2024/04/29/662f11111cec3.jpg)
### 任何设备都可以部署 6. **多预览图功能**
个人电脑NAS阿里云腾讯云等网络服务器采用1核2G以上的硬件配置以上就可以部署 - 传统网盘:传统网盘中一般不支持多预览图,并且不支持预览的文件也无法预览
- PicHome不支持预览的文件可自定义封面与预览图还支持多预览图的方式比如在设计图、模型文件、压缩包等文件中单张预览图无法表达文件全貌时可提供多张预览图便于用户更全面地了解文件全貌。
![6.jpg](https://imgc.cc/2024/04/29/662f1111d7f53.jpg)
### 任何设备都可以使用 7. **多库管理功能**
只需要有浏览器功能的设备就可以访问,查找图片 - 传统网盘:通常只提供一个统一的文件管理空间
- PicHome支持创建多个网盘库根据文件类型和业务需求进行分类存储和分配管理权限提高了文件管理的灵活性和效率。
![7.jpg](https://imgc.cc/2024/04/29/662f1113b7156.jpg)
### 任何地点查使用 **文件共享功能:重塑文件共享边界**
如果您的服务器支持外网访问,或者直接部署在阿里云,腾讯云等公网服务器,那么在任何地点都可以访问使用。
### 支持原有图库的查询条件 PicHome的文件共享功能强大且灵活它不仅支持整个库的共享还允许用户创建个性化的展示网页甚至构建完整的资料分享展示网站。
标签,颜色,形状,评分,拍摄时间等,高度保留原有图库软件中的图片信息进行筛选查询 - **共享整个库**:用户可以选择性地共享整个库给朋友、同事或客户。库的展示样式可以个性化设置,优化访问者的浏览体验
![8.jpg](https://imgc.cc/2024/04/29/662f1114cdd6e.jpg)
### 数据自动同步 - **共享展示网页**PicHome 的单页功能允许用户无需编写代码,通过拖拽模块快速制作个性化的展示网页。用户可以自由组合轮播图、文件推荐、富文本、常见问题和链接等模块,打造精美的展示页面。
自动同步原有图库软件的数据信息在原有图库系统中增删改图片和标签自动更新PicHome网站。 ![9.jpg](https://imgc.cc/2024/04/29/662f1116bb5ef.jpg)
### 多库综合搜索 - **组织结构化的共享网站**PicHome 可以将共享文件、整库和单页等元素组织成一个完整的网站。这样,用户可以快速建立个人家庭媒体资料库、团队共享资料库或企业文件资料库网站。
可以将多人,多个图库集中在一起综合查询 ![10.jpg](https://imgc.cc/2024/04/29/662f11176c443.jpg)
### 大数据量支持 ---
轻松支持数十万量级文件高速查询。如果有更大量级的查询需求,可以联系我们付费获取高可用部署方案。
### 免费发布,功能定制 **AI辅助管理智能化文件标注与管理**
PicHome是免费发布的任何人都可以免费安装。如果有特殊的功能需求还可以联系我们付费定制功能。
文件的分类和标注一直是文件管理中的挑战需要管理人员投入大量时间和精力。幸运的是如今AI大模型的出现为这项工作提供了解决方案。PicHome 将全面整合AI智能功能以提升文件管理效率。目前PicHome 已经实现了以下AI辅助功能
1. **AI修改文件名**:自动识别文件内容并生成更有意义的文件名,提高文件查找效率。
2. **AI打标签**:根据文件内容自动添加标签,帮助用户更快速地分类和检索文件。
3. **AI写描述**:智能生成文件描述,让用户了解文件内容,无需手动编辑。
4. **AI批量标注**:一次性对多个文件进行标注,减少人工操作。
5. **AI文件问答**:回答用户关于文件的问题,提供更智能的文件管理服务。
在PicHome中各项文件标注功能通过自定义Prompt来实现。不同的Prompt描述可以引导AI生成不同方向的结果从而实现针对不同行业、不同类型文件的精准标注。管理员可以在后台自定义设置多条Prompt并在管理界面中方便地选择采用哪个Prompt来进行文件标注。
![11.jpg](https://imgc.cc/2024/04/29/662f11162e2dd.jpg)
AI对各文件类型支持陆续增加中目前已经支持的文件类型
- [x] 图片
- [ ] 视频
- [ ] 文档
PicHome还将陆续提供更多能够对接的在线大模型以及对接私有化大模型的方案以满足不同用户的需求。
---
**支持格式**
任意格式的文件都可以上传导入,支持大多数常见格式的预览,支持图片水印保护源文件。
**图像**
svg  png jpg jpeg jpe webp  jfif ico heic gif eps bmp tga hdr exr dds ppm pnm pgm pdd pcx pbm pam mpo mng miff jpx jps jpf jpc jp2 j2k j2c dib cur cin  tif  wmf  emf tiff
**源文件**
psd ai
**音频**
wav ogg mp3 m4a flac aac ape aiff amr
**视频**
wmv webm mp4 mov m4v avi ts swf rmvb rm mkv flv vob trp sct ogv mxf mpg m2ts f4v dv dcr asf 3g2p
**RAW**
3fr arw cr2 cr3 crw dng erf mrw nef nrw orf otf pef raf raw rw2 sr2 srw x3f
**办公**
xlsx xls pptx ppt pdf docx  doc pdf txt rtf odt htm html mht pps ppsx odp ods csv
**压缩包**
zip rar
---
**丰富使用场景**
可以应用于电商,游戏,设计,开发,企事业,学校,实验室,媒体,演艺机构等类型的个人,团队,企业业务中
1. 作为普通网盘使用
2. 创建素材共享库
3. 创建文件发布网站
4. 实现 Eagle 素材库多端展示
5. 实现 Billfish 素材库多端展示
6. 实现普通文件夹多端展示
7. 建立企业知识库
8. 建立代理商,分销商,分公司产品资料共享平台
9. 建立商品素材,商品图共享平台
10. 建立企业图库平台
11. 建立团队灵感库
12. 建立团队标准库
13. ......
# 一些常见使用场景 ---
在移动端,平板方便的查看图库内容,搜索图片。 ## **PicHome 使用了解
随时将图片分享给同事,代理商,客户查看或下载 **PicHome** 分为后台和前台两个部分,各自担任不同的角色
向其他人展示我的图库,或者下载我的图片。 ### **后台功能**
团队讨论设计方案时,随时快速查询灵感素材,资料库,材料库信息 - 后台主要用于系统配置,定位类似于“系统开发”人员使用
- 只是这个“开发”工作并不需要代码知识,只需通过配置与拖拽,就可以实现各种个性化需求。
- 后台就像一个无代码网页设计器,能够在无需编程的情况下配置出各种个性化的页面效果。
- 如果你对 **PicHome** 的后台配置熟悉了,不但可以搭建出满足自身各种需求的文件系统,甚至可以帮助他人或者企业搭建各类定制化需求的文件资源共享平台。
与客户交流时,随时快速查询出需要举例的素材或相似方案,辅助描述表达。 ### **前台功能**
用平板向客户一边查看图片,一边讲解产品设计理念 - 前台是平时正常使用的界面,用于展示数据和进行日常管理
- 所有的网盘管理和文件管理都在前台门户和个人中心中进行。
与异地协作人员共享素材 - 作为使用人员时,你只需在前台的门户中对展示出来的数据进行查询和检索
- 需要管理网盘文件时,只需进入个人中心,对不同的库进行文件管理,而无需进入后台。
汇总多个图库,多人的图库统一管理,统一查找 - **PicHome** 的前台操作简单易上手,让你轻松管理文件和数据
个人,企业作品或产品展示网站。
---

View File

@@ -1,21 +1,18 @@
## PicHome Home 2.0 更新说明 ## PicHome Home 2.1.0 更新说明
### 1增加PH库支持上传文件编辑文件信息名称标签描述评分等 1.增加AI大模型接入实现AI自动打标签PH库和普通目录支持、修改文件名PH库支持以及描述功能PH库和普通目录支持。已支持星火大模型后续会陆续增加其他在线模型与私有模型接口。
### 2增加单页功能可以自定义单页内容 2.支持文件大模型AI对话已支持图片对话所有库支持
### 3增加栏目功能,库,单页,连接可以设置成栏目,对外展示,新增加的库将自动生成栏目,默认是关闭状态,对于老版本升级后将自动为开启状态 3.增加PH库和普通目录的文件封面替换和恢复功能
### 4增加个人中心,统一管理用户相关的内容,个人中心包括下载记录,浏览记录等信息 4.增加PH库和普通目录的文件多预览图功能可以为大部分类型文件增加多张预览图。文档音视频不支持
### 5重构并优化系统缩略图机制提升加载速度。 5.库管理页面增加任务列表,可查看库内缩略图生成及批量任务执行进度
### 6增加管理工具包含系统设置系统工具登录日志和存储位置将原有的站点设置功能迁移到系统设置中并丰富原有设置内容增加如缩略图邮件的设置 6.修复缩略图及相关计划任务执行异常问题
### 7兼容Billfish 3版本的导入 7.修复billfish库导入标签增减问题目录变化问题
### 8优化库导入和更新机制 8.修复手机端详情页不能正常访问的bug
### 9支持腾讯云存储以及cdn加速域名 9.优化普通目录缩略图生成逻辑,提升生成效率,优化普通目录展示逻辑(缩略图未生成时,展示图片类文件的原文件,即页面不会在导入图片后出现空白)
### 10栏目单页支持短链接需设置rewrite规则具体内容安装包中包含 10.优化左侧分类树加载逻辑,提升页面加载效率
注: 11.其他已知bug修复系统加载速度优化
1. 当前版本展示内容和管理内容实行分开处理,不再直接将库展示给游客和普通用户,安装完成之后站点首页内容可根据需要自行设置
2. 安装完成后默认为站点不公开,必须登录才能访问,如需公开,请在管理工具,系统设置中进行设置
3. 缩略图设置在管理工具存储位置中设置,原则上优先文件位置选择生成方式
## PicHome Home 1.1 升级到 2.0 升级方法 ## PicHome Home 2.0.2 升级到 2.1.0 升级方法
### 1复制所有文件覆盖到网站目录 1复制所有文件覆盖到网站目录
### 2运行 http(s)://网站域名ip)/install/update.php按提示步骤完成升级 2运行 http(s)://网站域名ip)/install/update.php按提示步骤完成升级
### 3升级完成后使用管理员登录站点进入系统设置打开站点并且进入 系统工具 更新系统缓存 3升级完成后使用管理员登录站点进入系统设置打开站点并且进入 系统工具 更新系统缓存

View File

@@ -1417,6 +1417,10 @@ $lang = array
'imgwater_image_watermark_preview'=>'Preview watermark effect', 'imgwater_image_watermark_preview'=>'Preview watermark effect',
'imgwater_image_watermark_preview_tips'=>'Please submit and preview', 'imgwater_image_watermark_preview_tips'=>'Please submit and preview',
//管理员登录页
'title_admincp'=>'Administrator login entry',
'login_cplock' => 'Your admin panel is locked! <br>Please revisit after <b> {ltime} </b> seconds',
); );

View File

@@ -1430,6 +1430,11 @@ $lang = array
'imgwater_image_watermark_preview'=>'预览水印效果', 'imgwater_image_watermark_preview'=>'预览水印效果',
'imgwater_image_watermark_preview_tips'=>'请提交后再预览', 'imgwater_image_watermark_preview_tips'=>'请提交后再预览',
//管理员登录页
'title_admincp'=>'管理员登录入口',
'login_cplock' => '您的管理面板已经锁定! <br>请在<b> {ltime} </b>秒以后重新访问',
); );

View File

@@ -1,6 +1,12 @@
input:-webkit-autofill { input:-webkit-autofill {
box-shadow: 0 0 0px 1000px white inset !important; box-shadow: 0 0 0px 1000px white inset !important;
} }
body,html{
height:100%;
overflow: hidden;
margin: 0;
padding: 0;
}
.mainContainer { .mainContainer {
position: absolute; position: absolute;
height: 100%; height: 100%;
@@ -11,23 +17,32 @@ input:-webkit-autofill {
height: 100%; height: 100%;
width: 100% width: 100%
} }
.loginContainer tr td{
padding:0 10px;
}
.logintips { .logintips {
color: red; color: red;
line-height: 30px; line-height: 30px;
padding: 20px; padding: 20px;
width: 350px; width: 400px;
background: #FFF; border-radius: 20px;
border-radius: 5px;
border: 1px solid #e3e3e3; border: 1px solid #e3e3e3;
-webkit-box-shadow: 0 5px 15px RGBA(0,0,0,.3); -webkit-box-shadow: 0 5px 15px RGBA(0,0,0,.3);
-moz-box-shadow: 0 5px 15px RGBA(0,0,0,.3); -moz-box-shadow: 0 5px 15px RGBA(0,0,0,.3);
box-shadow: 0 5px 15px RGBA(0,0,0,.3); box-shadow: 0 5px 15px RGBA(0,0,0,.3);
font-size: 20px;
line-height: 2.5;
text-shadow: 1px 1px 1px RGBA(0,0,0,.3);
background: RGBA(255,255,255,.8);
} }
#loginform { #loginform {
width: 350px; width: 400px;
margin: 0; margin: 0;
text-align: center; text-align: center;
} }
.login h4 { .login h4 {
height: 35px; height: 35px;
margin-bottom: 10px; margin-bottom: 10px;
@@ -39,13 +54,13 @@ input:-webkit-autofill {
text-align: center; text-align: center;
} }
.avatarContainer img { .avatarContainer img {
max-width: 128px; max-width: 100%;
max-height: 128px; max-height: 128px;
} }
.avatarContainer .maintitle{ .avatarContainer .maintitle{
font-size:20px; font-size:20px;
font-weight: 600; font-weight: 700;
padding-top:10px; padding-top:20px;
} }
#admin_password_Container { #admin_password_Container {
padding: 30px 0 30px 0; padding: 30px 0 30px 0;
@@ -57,7 +72,7 @@ input:-webkit-autofill {
padding: 30px; padding: 30px;
text-align: center; text-align: center;
background-color: #FFF; background-color: #FFF;
border-radius: 5px; border-radius: 20px;
border: 1px solid #e3e3e3; border: 1px solid #e3e3e3;
-webkit-box-shadow: 0 5px 15px RGBA(0,0,0,.3); -webkit-box-shadow: 0 5px 15px RGBA(0,0,0,.3);
-moz-box-shadow: 0 5px 15px RGBA(0,0,0,.3); -moz-box-shadow: 0 5px 15px RGBA(0,0,0,.3);
@@ -82,40 +97,15 @@ input[type="password"], input[type="text"] {
direction: ltr; direction: ltr;
font-size: 14px; font-size: 14px;
outline: none; outline: none;
width: 286px\0;
*width:286px;
}
input[type="submit"] {
width: 100%;
height: 40px;
font-size: 16px;
font-weight: 700;
width: 286px\0;
*width:286px;
} }
input[type="password"]:focus, input[type="text"]:focus { input[type="password"]:focus, input[type="text"]:focus {
box-shadow: none; box-shadow: none;
outline: none; outline: none;
} }
.footer .copyright {
border: medium none;
font-size: 12px;
position: static;
text-align: center;
}
.copyright {
color: #899;
font-family: "微软雅黑";
font-size: 12px;
left: 5px;
line-height: 150%;
padding-top: 20px;
text-align: center;
z-index: 10;
}
.copyright a {
color: #899;
}
.wrapper-placeholder { .wrapper-placeholder {
text-align: left text-align: left
} }
@@ -128,3 +118,109 @@ input[type="password"]:focus, input[type="text"]:focus {
font-size: 45px; font-size: 45px;
color: #fff; color: #fff;
} }
:root {
--btn-primary-background-color: #A85E39;
--btn-primary-border-color: transparent;
--btn-primary-background-color-hover: rgba(202, 132, 108, 0.7);
--btn-primary-border-color-hover: transparent;
--default-color-border: #e1e1e1;
--input-border-color-focus: #CA846C;
}
.btn {
display: inline-block;
padding: 6px 12px;
margin-bottom: 0;
font-size: 1rem;
font-weight: 400;
line-height: 1.42857143;
text-align: center;
white-space: nowrap;
vertical-align: middle;
-ms-touch-action: manipulation;
touch-action: manipulation;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background-image: none;
border: 1px solid transparent;
border-radius: 4px;
}
.btn-primary {
color: #fff;
background-color: #0072ef;
border-color: #0072ef;
}
.btn-primary:hover{
background-color: #79bbff;
border-color: #79bbff;
}
.btn-block {
display: block;
width: 100%;
}
.btn {
transition-property: all;
transition-duration: .3s;
padding: 0.45rem 2.152rem;
font-size: 0.92rem;
font-weight: bold;
border-radius: 5px;
}
.btn-lg {
padding: 12px 20px;
}
.form-control {
display: block;
width: 100%;
height: 34px;
padding: 6px 12px;
font-size: 14px;
line-height: 1.42857143;
color: #555;
background-color: #fff;
background-image: none;
border: 1px solid #ccc;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
-webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}
.form-control {
background-color: transparent;
border-style: solid;
border-width: 0 0 1px 0;
border-color: #e1e1e1;
box-shadow: none;
border-radius: 0;
}
.loginContainer .copyright {
width:400px;
margin: 20px 0 0 0;
line-height: 1.5;
font-size:12px;
color:#FFF;
text-shadow:1px 1px 1px RGBA(0,0,0,.5);
}
.loginContainer .copyright a{
color:#FFF;
text-decoration: none;
}
.loginContainer .copyright a:hover{
color:#FFF;
text-decoration: underline;
}
@media (max-width: 414px){
#loginform {
width: 100%;
}
.loginContainer .copyright {
width:100%;
}
}

BIN
admin/login/images/bg.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

View File

@@ -11,45 +11,13 @@ if (!defined('IN_OAOOA') ) {
exit('Access Denied'); exit('Access Denied');
} }
if (!function_exists('ajaxshowheader')) {
function ajaxshowheader() {
global $_G;
ob_end_clean();
@header("Expires: -1");
@header("Cache-Control: no-store, private, post-check=0, pre-check=0, max-age=0", FALSE);
@header("Pragma: no-cache");
header("Content-type: application/xml");
echo "<?xml version=\"1.0\" encoding=\"" . CHARSET . "\"?>\n<root><![CDATA[";
}
}
if (!function_exists('ajaxshowfooter')) {
function ajaxshowfooter() {
echo ']]></root>';
exit();
}
}
if ($dzz ->var['inajax']) {
ajaxshowheader();
ajaxshowfooter();
}
html_login_header(); html_login_header();
if ($admincp -> cpaccess == -1) { if ($admincp -> cpaccess == -1 || $admincp -> cpaccess == -4) {
$ltime = $this -> sessionlife - (TIMESTAMP - $this -> adminsession['dateline']); $ltime = $this -> sessionlife - (TIMESTAMP - $this -> adminsession['dateline']);
echo '<p class="logintips">' . lang('login_cplock', array('ltime' => $ltime)) . '</p>'; echo '<p class="logintips">' . lang('login_cplock', array('ltime' => $ltime)) . '</p>';
} elseif ($admincp -> cpaccess == -4) {
$ltime = $this -> sessionlife - (TIMESTAMP - $this -> adminsession['dateline']);
echo '<p class="logintips">' . lang('login_user_lock') . '</p>';
//} elseif($admincp->cpaccess = 3) {
//header("Location:".dreferer());
//exit();
} else { } else {
html_login_form(); html_login_form();
} }
@@ -59,9 +27,7 @@ function html_login_header($form = true) {
global $_G; global $_G;
$uid = getglobal('uid'); $uid = getglobal('uid');
$charset = CHARSET; $charset = CHARSET;
$lang = &lang(); $title = lang('title_admincp');
$title = $lang['login_title'];
$tips = $lang['login_tips'];
echo <<<EOT echo <<<EOT
<!DOCTYPE> <!DOCTYPE>
@@ -71,22 +37,14 @@ function html_login_header($form = true) {
<base href="{$_G['siteurl']}"> <base href="{$_G['siteurl']}">
<meta http-equiv="Content-Type" content="text/html;charset=$charset" /> <meta http-equiv="Content-Type" content="text/html;charset=$charset" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<link rel="stylesheet" href="static/bootstrap/css/bootstrap.min.css" type="text/css" media="all" />
<link rel="stylesheet" href="admin/login/images/adminlogin.css" type="text/css" media="all" /> <link rel="stylesheet" href="admin/login/images/adminlogin.css" type="text/css" media="all" />
<link rel="stylesheet" href="static/css/common.css" type="text/css" media="all" />
<script type="text/javascript" src="static/js/md5.js"></script> <script type="text/javascript" src="static/js/md5.js"></script>
<script type="text/javascript" src="static/jquery/jquery.min.js?{VERHASH}"></script>
<script type="text/javascript" src="static/js/common.js?{VERHASH}"></script>
<!--[if lt IE 9]>
<script src="static/js/jquery.placeholder.js" type="text/javascript"></script>
<![endif]-->
<meta content="oaooa.com" name="Copyright" />
</head> </head>
<body> <body>
EOT; EOT;
if ($form) { if ($form) {
$loginset_img=$_G['setting']['loginset']['img']?$_G['setting']['loginset']['img']:'user/login/images/login.jpg'; $loginset_img=$_G['setting']['loginset']['img']?$_G['setting']['loginset']['img']:'admin/login/images/bg.jpg';
$loginset_bcolor=$_G['setting']['loginset']['bcolor']?$_G['setting']['loginset']['bcolor']:'#76838f'; $loginset_bcolor=$_G['setting']['loginset']['bcolor']?$_G['setting']['loginset']['bcolor']:'#76838f';
echo <<<EOT echo <<<EOT
<div id="wrapper_div" style="width: 100%;height:100%; position: absolute; top: 0px; left: 0px; margin: 0px; padding: 0px; overflow: hidden;z-index:0; font-size: 0px; background:$loginset_bcolor;"> <div id="wrapper_div" style="width: 100%;height:100%; position: absolute; top: 0px; left: 0px; margin: 0px; padding: 0px; overflow: hidden;z-index:0; font-size: 0px; background:$loginset_bcolor;">
@@ -94,7 +52,7 @@ EOT;
<img src="$loginset_img" name="imgbg" id="imgbg" style="right: 0px; bottom: 0px; top: 0px; left: 0px; z-index:1;margin:0;padding:0;overflow:hidden; position: absolute;width:100%;height:100%" height="100%" width="100%"> <img src="$loginset_img" name="imgbg" id="imgbg" style="right: 0px; bottom: 0px; top: 0px; left: 0px; z-index:1;margin:0;padding:0;overflow:hidden; position: absolute;width:100%;height:100%" height="100%" width="100%">
</div> </div>
<div class="mainContainer"> <div class="mainContainer">
<table class="loginContainer" wide="100%" height="100%"> <table class="loginContainer" width="100%" height="100%" style="layout:f">
<tr><td align="center" valign="middle"> <tr><td align="center" valign="middle">
EOT; EOT;
} }
@@ -118,51 +76,41 @@ EOT;
function html_login_form() { function html_login_form() {
global $_G; global $_G;
$uid = getglobal('uid'); $uid = getglobal('uid');
$isguest = !getglobal('uid');
$lang1 = lang();
$year=dgmdate(TIMESTAMP,'Y'); $year=dgmdate(TIMESTAMP,'Y');
$maintitle=lang('title_admincp'); $maintitle=lang('title_admincp');
$loginuser = $isguest ? '<input class="form-control" name="admin_email" type="text" title="" onfocus="if(this.value==\'' . lang('login_email_username') . '\'){this.value=\'\'}" onblur="if(this.value==\'\'){this.value=\'' . lang('login_email_username') . '\'}" autocomplete="off" />' : '<div class="username">' . $_G['member']['username'] . '</div><div class="email">' . $_G['member']['email'] . '</div>'; $placeholder_email=lang('login_email_username');
$loginuser = empty($uid) ? '<input class="form-control" name="admin_email" type="text" placeholder="'.$placeholder_email.'" autocomplete="off" />' : '<div class="username">' . $_G['member']['username'] . '</div><div class="email">' . $_G['member']['email'] . '</div>';
$sid = getglobal('sid'); $sid = getglobal('sid');
$avatarstatus=getglobal('avatarstatus','member');
if(!$uid ){ if(!$uid ){
$avastar ='<img src="'.($_G['setting']['sitelogo']?\IO::getFileUri('attach::'.$_G['setting']['sitelogo']):'static/image/common/logo.png').'" />'; $avastar ='<img src="data/attachment/sitelogo/sitelogo.png?'.VERHASH.'" />';
}else{ }else{
$avastar = avatar_block($uid); $avastar = avatar_block($uid);
} }
$_GET['referer'] = dhtmlspecialchars($_GET['referer'], ENT_QUOTES); $_GET['referer'] = dhtmlspecialchars($_GET['referer'], ENT_QUOTES);
$_GET['referer'] = str_replace('&amp;', '&', $_GET['referer']); $referer = str_replace('&amp;', '&', $_GET['referer']);
$avastar.='<div class="maintitle">'.$maintitle.'</div>'; $avastar.='<div class="maintitle">'.$maintitle.'</div>';
$extra = BASESCRIPT . '?' . $_SERVER['QUERY_STRING']; $extra = BASESCRIPT . '?' . $_SERVER['QUERY_STRING'];
$forcesecques = '<option value="0">' . ($_G['config']['admincp']['forcesecques'] ? $lang1['forcesecques'] : $lang1['security_question_0']) . '</option>'; $placeholder_password=lang('password');
$placeholder_login=lang('login');
echo <<<EOT echo <<<EOT
<form method="post" name="login" id="loginform" action="$extra" onsubmit="pwmd5('admin_password')"> <form method="post" name="login" id="loginform" action="$extra" onsubmit="pwmd5('admin_password')">
<input type="hidden" name="sid" value="$sid"> <input type="hidden" name="sid" value="$sid">
<input type="hidden" name="referer" value="$_GET[referer]"> <input type="hidden" name="referer" value="$referer">
<div class="loginformContainer"> <div class="loginformContainer">
<div class="avatarContainer">$avastar</div> <div class="avatarContainer">$avastar</div>
$loginuser $loginuser
<div id="admin_password_Container"> <div id="admin_password_Container">
<input name="admin_password" id="admin_password" type="password" class="form-control" value="" autocomplete="off" placeholder="$lang1[password]" /> <input name="admin_password" id="admin_password" type="password" class="form-control" value="" autocomplete="off" placeholder="$placeholder_password" />
</div> </div>
<input name="submit" value="$lang1[login]" type="submit" class="btn btn-primary" /> <button name="submit" type="submit" class="btn btn-primary btn-block btn-lg" >$placeholder_login</button>
<div class="copyright">Powered by <a href="https://www.oaooa.com/" target="_blank">Pichome</a> &copy; 2012-$year</div>
</div> </div>
</form> </form>
<script type="text/JavaScript"> <div class="copyright">Powered by <a href="https://www.oaooa.com/" target="_blank">Pichome</a> &copy; 2012-$year</div>
jQuery(document).ready(function(e) {
jQuery('#loginform .form-control:first').focus();
if(jQuery('.ie8,.ie9').length){ //ie8模拟placeholder;
jQuery(':input[placeholder]').each(function(){
jQuery(this).placeholder();
});
}
});
</script>
EOT; EOT;
} }
?> ?>

File diff suppressed because it is too large Load Diff

179
admin/scripts/uploadpic.js Normal file
View File

@@ -0,0 +1,179 @@
/*
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
* @license https://www.oaooa.com/licenses/
*
* @link https://www.oaooa.com
* @author zyx(zyx@oaooa.com)
*/
var attachexts = new Array();
var attachwh = new Array();
var insertType = 1;
var thumbwidth = parseInt(60);
var thumbheight = parseInt(60);
var extensions = 'jpg,jpeg,gif,png';
var forms;
var nowUid = 0;
var uploadStat = 0;
var picid = 0;
var nowid = 0;
var mainForm;
var successState = false;
function getExt(path) {
return path.lastIndexOf('.') == -1 ? '' : path.substr(path.lastIndexOf('.') + 1, path.length).toLowerCase();
}
function delete_pic(obj,picid){
document.getElementById('pic_container').removeChild(obj.parentNode.parentNode);
var input=document.createElement('input');
input.type='hidden';
input.name='delete_pics[]';
input.value=picid;
document.getElementById('pic_delete').appendChild(input);
}
function delAttach(id) {
document.getElementById('attachbody').removeChild(document.getElementById('attach_' + id).parentNode.parentNode.parentNode);
if(document.getElementById('attachbody').innerHTML == '') {
addAttach();
}
document.getElementById('localimgpreview_' + id + '_menu') ? document.body.removeChild(document.getElementById('localimgpreview_' + id + '_menu')) : null;
}
function addAttach() {
newnode = document.getElementById('attachbodyhidden').rows[0].cloneNode(true);
var id = nowid;
var tags;
tags = newnode.getElementsByTagName('form');
for(var i=0;i<tags.length;i++) {
if(tags[i] && tags[i].id == 'upload') {
tags[i].id = 'upload_' + id;
}
}
tags = newnode.getElementsByTagName('input');
for(var i=0;i<tags.length;i++) {
if(tags[i].name == 'attach') {
tags[i].id = 'attach_' + id;
tags[i].name = 'attach';
tags[i].onchange = function() {insertAttach(id)};
tags[i].unselectable = 'on';
}
}
tags = newnode.getElementsByTagName('span');
for(var i=0;i<tags.length;i++) {
if(tags[i].id == 'localfile') {
tags[i].id = 'localfile_' + id;
}
}
nowid++;
document.getElementById('attachbody').appendChild(newnode);
}
addAttach();
function insertAttach(id) {
var localimgpreview = '';
var path = document.getElementById('attach_' + id).value;
var ext = getExt(path);
var re = new RegExp("(^|\\s|,)" + ext + "($|\\s|,)", "ig");
var localfile = document.getElementById('attach_' + id).value.substr(document.getElementById('attach_' + id).value.replace(/\\/g, '/').lastIndexOf('/') + 1);
if(path == '') {
return;
}
if(extensions != '' && (re.exec(extensions) == null || ext == '')) {
alert(__lang.support_upload_pictures_extensions);
return;
}
attachexts[id] = inArray(ext, ['gif', 'jpg', 'jpeg', 'png']) ? 2 : 1;
var inhtml = '<table cellspacing="0" cellpadding="0" class="up_row"><tr>';
inhtml += '<td><strong>' + localfile +'</strong>';
inhtml += '</td><td class="o"><span id="showmsg' + id + '"><a href="javascript:;" onclick="delAttach(' + id + ');return false;" class="xi2">['+__lang.delete+']</a></span>';
inhtml += '</td></tr></table>';
document.getElementById('localfile_' + id).innerHTML = inhtml;
document.getElementById('attach_' + id).style.display = 'none';
addAttach();
}
function getPath(obj){
if (obj) {
if (BROWSER.ie && BROWSER.ie < 7) {
obj.select();
return document.selection.createRange().text;
} else if(BROWSER.firefox) {
if (obj.files) {
return obj.files.item(0).getAsDataURL();
}
return obj.value;
} else {
return '';
}
return obj.value;
}
}
function inArray(needle, haystack) {
if(typeof needle == 'string') {
for(var i in haystack) {
if(haystack[i] == needle) {
return true;
}
}
}
return false;
}
function insertAttachimgTag(id) {
edit_insert('[imgid=' + id + ']');
}
function uploadSubmit(obj) {
obj.disabled = true;
mainForm = obj.form;
forms = document.getElementById('attachbody').getElementsByTagName("FORM");
upload();
}
function upload() {
if(typeof(forms[nowUid]) == 'undefined') return false;
var nid = forms[nowUid].id.split('_');
nid = nid[1];
if(nowUid>0) {
var upobj = document.getElementById('showmsg'+nowid);
if(uploadStat==1) {
upobj.innerHTML = __lang.upload_success;
successState = true;
var InputNode;
try {
var InputNode = document.createElement("<input type=\"hidden\" id=\"picid_" + picid + "\" value=\""+ picid +"\" name=\"picids[]\">");
} catch(e) {
var InputNode = document.createElement("input");
InputNode.setAttribute("name", "picids[]");
InputNode.setAttribute("type", "hidden");
InputNode.setAttribute("id", "picid_" + picid);
InputNode.setAttribute("value",picid);
}
mainForm.appendChild(InputNode);
} else {
upobj.style.color = "#f00";
upobj.innerHTML = __lang.upload_failed+uploadStat;
}
}
if(document.getElementById('showmsg'+nid) != null) {
document.getElementById('showmsg'+nid).innerHTML = __lang.upload_await+'(<a href="javascript:;" onclick="forms[nowUid].submit();">'+__lang.founder_upgrade_reset+'</a>)';
forms[nowUid].submit();
} else if(nowUid+1 == forms.length) {
window.onbeforeunload = null;
mainForm.submit();
}
nowid = nid;
nowUid++;
uploadStat = 0;
}

View File

@@ -0,0 +1 @@
.el-avatar[data-v-a6c00da6]{float:left;cursor:pointer}.el-divider--horizontal.el-divider[data-v-a6c00da6]{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

@@ -0,0 +1 @@
.help-inline[data-v-cf04a844]{display:block}.avatar-uploader[data-v-cf04a844] .el-upload{border:1px dashed #d9d9d9;border-radius:6px;cursor:pointer;position:relative;width:150px;height:150px;overflow:hidden;line-height:160px;padding:5px}.avatar-uploader[data-v-cf04a844] .el-upload .avatar-uploader-icon{font-size:28px;color:#8c939d;vertical-align:sub}.avatar-uploader[data-v-cf04a844] .el-upload .el-image{height:150px;width:100%;line-height:150px}.avatar-uploader[data-v-cf04a844] .el-upload .el-image img{max-width:100%;max-height:150px;width:auto;height:auto;vertical-align:middle}.avatar-uploader[data-v-cf04a844] .el-upload .el-progress{position:absolute;left:5px;top:5px;background:#fff;z-index:100}.max-width[data-v-cf04a844]{width:360px}

View File

@@ -0,0 +1 @@
.resNav .resNav-item[data-v-77bcd1f8],.resNav[data-v-77bcd1f8]{display:flex}.resNav[data-v-77bcd1f8]{width:100%;height:100%}.resNav .resNav-left[data-v-77bcd1f8]{height:100%;line-height:80px}.resNav .resNav-left a[data-v-77bcd1f8]{height:100%;display:flex;justify-content:center;align-items:center;text-decoration:none;text-align:left}.resNav .resNav-left a .el-image[data-v-77bcd1f8]{width:35px;height:35px}.resNav .resNav-left a .text[data-v-77bcd1f8]{font-size:16px;font-weight:700;margin-left:10px;color:#fff;white-space:nowrap;line-height:normal}.resNav .resNav-center[data-v-77bcd1f8]{flex:1 1 100%;height:100%}.resNav .resNav-center .el-menu[data-v-77bcd1f8]{border:0;padding:15px 0}.resNav .resNav-center .el-menu .el-menu-item[data-v-77bcd1f8]{height:50px;line-height:50px}.resNav .resNav-center .el-menu .el-menu-item[data-v-77bcd1f8]:hover{color:#fff;background:transparent!important}.resNav .resNav-right[data-v-77bcd1f8]{flex:0 0 auto;align-content:center;align-items:center}.resNav .resNav-right .line[data-v-77bcd1f8]{float:left;width:1px;height:22px;background:#fff;margin-right:10px}.el-page-header[data-v-77bcd1f8]{align-content:center;align-items:center}.el-page-header[data-v-77bcd1f8] .el-page-header__content{color:#fff}

View File

@@ -0,0 +1 @@
.help-inline[data-v-cac40bea]{display:block}.avatar-uploader[data-v-cac40bea] .el-upload{border:1px dashed #d9d9d9;border-radius:6px;cursor:pointer;position:relative;width:150px;height:150px;overflow:hidden;line-height:160px;padding:5px}.avatar-uploader[data-v-cac40bea] .el-upload .avatar-uploader-icon{font-size:28px;color:#8c939d;vertical-align:sub}.avatar-uploader[data-v-cac40bea] .el-upload .el-image{height:150px;width:100%;line-height:150px}.avatar-uploader[data-v-cac40bea] .el-upload .el-image img{max-width:100%;max-height:150px;width:auto;height:auto;vertical-align:middle}.avatar-uploader[data-v-cac40bea] .el-upload .el-progress{position:absolute;left:5px;top:5px;background:#fff;z-index:100}.max-width[data-v-cac40bea]{width:360px}

View File

@@ -0,0 +1 @@
.basic-container[data-v-440cc97a]{height:calc(100vh - 46px);overflow:auto}.avatar-uploader[data-v-440cc97a] .el-upload{border:1px dashed #d9d9d9;border-radius:6px;cursor:pointer;position:relative;width:80px;height:80px;overflow:hidden;line-height:80px;padding:5px}.avatar-uploader[data-v-440cc97a] .el-upload .avatar-uploader-icon{font-size:28px;color:#8c939d;vertical-align:sub}.avatar-uploader[data-v-440cc97a] .el-upload .el-image{height:80px;width:100%;line-height:80px}.avatar-uploader[data-v-440cc97a] .el-upload .el-image img{max-width:100%;max-height:80px;width:auto;height:auto;vertical-align:middle}.avatar-uploader[data-v-440cc97a] .el-upload .el-progress{position:absolute;left:5px;top:5px;background:#fff;z-index:100}

View File

@@ -0,0 +1 @@
.basic-container[data-v-fb7dd626]{height:calc(100vh - 46px);overflow:auto}.avatar-uploader[data-v-fb7dd626] .el-upload{border:1px dashed #d9d9d9;border-radius:6px;cursor:pointer;position:relative;width:80px;height:80px;overflow:hidden;line-height:80px;padding:5px}.avatar-uploader[data-v-fb7dd626] .el-upload .avatar-uploader-icon{font-size:28px;color:#8c939d;vertical-align:sub}.avatar-uploader[data-v-fb7dd626] .el-upload .el-image{height:80px;width:100%;line-height:80px}.avatar-uploader[data-v-fb7dd626] .el-upload .el-image img{max-width:100%;max-height:80px;width:auto;height:auto;vertical-align:middle}.avatar-uploader[data-v-fb7dd626] .el-upload .el-progress{position:absolute;left:5px;top:5px;background:#fff;z-index:100}

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/setting/dist/css/chunk-11793d76.e3aa52a0.css rel=prefetch><link href=/admin/setting/dist/css/chunk-1ce8ae7e.57e2bf3f.css rel=prefetch><link href=/admin/setting/dist/css/chunk-201f656b.eb2931b7.css rel=prefetch><link href=/admin/setting/dist/css/chunk-27b595b5.6f37d603.css rel=prefetch><link href=/admin/setting/dist/css/chunk-2e9b5e3e.ff920983.css rel=prefetch><link href=/admin/setting/dist/css/chunk-36ed7802.ddfa8de2.css rel=prefetch><link href=/admin/setting/dist/css/chunk-37d74806.0c02e4db.css rel=prefetch><link href=/admin/setting/dist/css/chunk-42c1b704.3293b89e.css rel=prefetch><link href=/admin/setting/dist/css/chunk-45f0a227.cdc9335d.css rel=prefetch><link href=/admin/setting/dist/css/chunk-4850fbf9.980b88ba.css rel=prefetch><link href=/admin/setting/dist/css/chunk-4bd6d832.ad2beee9.css rel=prefetch><link href=/admin/setting/dist/css/chunk-51ab32cd.519dec70.css rel=prefetch><link href=/admin/setting/dist/css/chunk-56b92ffd.7264eae2.css rel=prefetch><link href=/admin/setting/dist/css/chunk-60968146.4f89c1c7.css rel=prefetch><link href=/admin/setting/dist/css/chunk-65f82ec1.82e43d2c.css rel=prefetch><link href=/admin/setting/dist/css/chunk-745ec13c.c40d05c4.css rel=prefetch><link href=/admin/setting/dist/css/chunk-74c32c70.4b7d665e.css rel=prefetch><link href=/admin/setting/dist/css/chunk-76f23146.6fc79cd8.css rel=prefetch><link href=/admin/setting/dist/css/chunk-8253696e.853db2ed.css rel=prefetch><link href=/admin/setting/dist/css/chunk-8af60fbc.1de80ebe.css rel=prefetch><link href=/admin/setting/dist/css/chunk-c2ea2536.0dada93f.css rel=prefetch><link href=/admin/setting/dist/css/chunk-e9e5fa9a.aecc7157.css rel=prefetch><link href=/admin/setting/dist/css/chunk-fc47aa76.dddb9b47.css rel=prefetch><link href=/admin/setting/dist/css/setting_temp.160d41ee.css rel=prefetch><link href=/admin/setting/dist/js/chunk-11793d76.ce1a5be7.js rel=prefetch><link href=/admin/setting/dist/js/chunk-1ce8ae7e.6a1bbf82.js rel=prefetch><link href=/admin/setting/dist/js/chunk-201f656b.7ab31c65.js rel=prefetch><link href=/admin/setting/dist/js/chunk-27b595b5.1211aaff.js rel=prefetch><link href=/admin/setting/dist/js/chunk-2e9b5e3e.602304e3.js rel=prefetch><link href=/admin/setting/dist/js/chunk-36ed7802.dfdd9749.js rel=prefetch><link href=/admin/setting/dist/js/chunk-37d74806.18c0b22d.js rel=prefetch><link href=/admin/setting/dist/js/chunk-42c1b704.e50a2fab.js rel=prefetch><link href=/admin/setting/dist/js/chunk-45f0a227.d6202e1a.js rel=prefetch><link href=/admin/setting/dist/js/chunk-4850fbf9.2ef97ebb.js rel=prefetch><link href=/admin/setting/dist/js/chunk-4bd6d832.cc9a988f.js rel=prefetch><link href=/admin/setting/dist/js/chunk-51ab32cd.f2e4282a.js rel=prefetch><link href=/admin/setting/dist/js/chunk-56b92ffd.8568d3b0.js rel=prefetch><link href=/admin/setting/dist/js/chunk-60968146.9c21e70a.js rel=prefetch><link href=/admin/setting/dist/js/chunk-6337fcfc.90794efc.js rel=prefetch><link href=/admin/setting/dist/js/chunk-65f82ec1.d9e3dbe2.js rel=prefetch><link href=/admin/setting/dist/js/chunk-745ec13c.f468e46a.js rel=prefetch><link href=/admin/setting/dist/js/chunk-74c32c70.1f5e9382.js rel=prefetch><link href=/admin/setting/dist/js/chunk-76f23146.0d2957ed.js rel=prefetch><link href=/admin/setting/dist/js/chunk-8253696e.e9561f92.js rel=prefetch><link href=/admin/setting/dist/js/chunk-8af60fbc.8ad59181.js rel=prefetch><link href=/admin/setting/dist/js/chunk-c2ea2536.8fc255e1.js rel=prefetch><link href=/admin/setting/dist/js/chunk-e9e5fa9a.322b6d2c.js rel=prefetch><link href=/admin/setting/dist/js/chunk-fc47aa76.b39d41e7.js rel=prefetch><link href=/admin/setting/dist/js/setting_temp.806222b7.js rel=prefetch><link href=/admin/setting/dist/css/chunk-vendors.4d5d56a8.css rel=preload as=style><link href=/admin/setting/dist/css/index.bfb05069.css rel=preload as=style><link href=/admin/setting/dist/js/chunk-vendors.852e680b.js rel=preload as=script><link href=/admin/setting/dist/js/index.c0d8c523.js rel=preload as=script><link href=/admin/setting/dist/css/chunk-vendors.4d5d56a8.css rel=stylesheet><link href=/admin/setting/dist/css/index.bfb05069.css rel=stylesheet></head><body><div id=app></div><script src=/admin/setting/dist/js/chunk-vendors.852e680b.js></script><script src=/admin/setting/dist/js/index.c0d8c523.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/setting/dist/css/chunk-11793d76.e3aa52a0.css rel=prefetch><link href=admin/setting/dist/css/chunk-1ce8ae7e.57e2bf3f.css rel=prefetch><link href=admin/setting/dist/css/chunk-201f656b.eb2931b7.css rel=prefetch><link href=admin/setting/dist/css/chunk-27b595b5.6f37d603.css rel=prefetch><link href=admin/setting/dist/css/chunk-302fb9a6.814b8c98.css rel=prefetch><link href=admin/setting/dist/css/chunk-36ed7802.ddfa8de2.css rel=prefetch><link href=admin/setting/dist/css/chunk-37d74806.0c02e4db.css rel=prefetch><link href=admin/setting/dist/css/chunk-3925df0a.7621d3e9.css rel=prefetch><link href=admin/setting/dist/css/chunk-3bab3918.0db98615.css rel=prefetch><link href=admin/setting/dist/css/chunk-42c1b704.3293b89e.css rel=prefetch><link href=admin/setting/dist/css/chunk-45f0a227.cdc9335d.css rel=prefetch><link href=admin/setting/dist/css/chunk-4850fbf9.980b88ba.css rel=prefetch><link href=admin/setting/dist/css/chunk-4bd6d832.ad2beee9.css rel=prefetch><link href=admin/setting/dist/css/chunk-56b92ffd.7264eae2.css rel=prefetch><link href=admin/setting/dist/css/chunk-60968146.4f89c1c7.css rel=prefetch><link href=admin/setting/dist/css/chunk-65f82ec1.82e43d2c.css rel=prefetch><link href=admin/setting/dist/css/chunk-6dbaec17.746edac1.css rel=prefetch><link href=admin/setting/dist/css/chunk-745ec13c.c40d05c4.css rel=prefetch><link href=admin/setting/dist/css/chunk-74c32c70.4b7d665e.css rel=prefetch><link href=admin/setting/dist/css/chunk-76f23146.6fc79cd8.css rel=prefetch><link href=admin/setting/dist/css/chunk-8253696e.853db2ed.css rel=prefetch><link href=admin/setting/dist/css/chunk-8af60fbc.1de80ebe.css rel=prefetch><link href=admin/setting/dist/css/chunk-e9e5fa9a.aecc7157.css rel=prefetch><link href=admin/setting/dist/css/setting_temp.160d41ee.css rel=prefetch><link href=admin/setting/dist/js/chunk-11793d76.ce1a5be7.js rel=prefetch><link href=admin/setting/dist/js/chunk-1ce8ae7e.6a1bbf82.js rel=prefetch><link href=admin/setting/dist/js/chunk-201f656b.7ab31c65.js rel=prefetch><link href=admin/setting/dist/js/chunk-27b595b5.1211aaff.js rel=prefetch><link href=admin/setting/dist/js/chunk-302fb9a6.9e8263f7.js rel=prefetch><link href=admin/setting/dist/js/chunk-36ed7802.dfdd9749.js rel=prefetch><link href=admin/setting/dist/js/chunk-37d74806.18c0b22d.js rel=prefetch><link href=admin/setting/dist/js/chunk-3925df0a.c417ece5.js rel=prefetch><link href=admin/setting/dist/js/chunk-3bab3918.35ace87b.js rel=prefetch><link href=admin/setting/dist/js/chunk-42c1b704.e50a2fab.js rel=prefetch><link href=admin/setting/dist/js/chunk-45f0a227.d6202e1a.js rel=prefetch><link href=admin/setting/dist/js/chunk-4850fbf9.2ef97ebb.js rel=prefetch><link href=admin/setting/dist/js/chunk-4bd6d832.cc9a988f.js rel=prefetch><link href=admin/setting/dist/js/chunk-56b92ffd.8568d3b0.js rel=prefetch><link href=admin/setting/dist/js/chunk-60968146.9c21e70a.js rel=prefetch><link href=admin/setting/dist/js/chunk-6337fcfc.90794efc.js rel=prefetch><link href=admin/setting/dist/js/chunk-65f82ec1.d9e3dbe2.js rel=prefetch><link href=admin/setting/dist/js/chunk-6dbaec17.9a9c0afa.js rel=prefetch><link href=admin/setting/dist/js/chunk-745ec13c.f468e46a.js rel=prefetch><link href=admin/setting/dist/js/chunk-74c32c70.1f5e9382.js rel=prefetch><link href=admin/setting/dist/js/chunk-76f23146.0d2957ed.js rel=prefetch><link href=admin/setting/dist/js/chunk-8253696e.445ed38f.js rel=prefetch><link href=admin/setting/dist/js/chunk-8af60fbc.8ad59181.js rel=prefetch><link href=admin/setting/dist/js/chunk-e9e5fa9a.322b6d2c.js rel=prefetch><link href=admin/setting/dist/js/setting_temp.ddc15f83.js rel=prefetch><link href=admin/setting/dist/css/chunk-vendors.4d5d56a8.css rel=preload as=style><link href=admin/setting/dist/css/index.bfb05069.css rel=preload as=style><link href=admin/setting/dist/js/chunk-vendors.852e680b.js rel=preload as=script><link href=admin/setting/dist/js/index.2a224278.js rel=preload as=script><link href=admin/setting/dist/css/chunk-vendors.4d5d56a8.css rel=stylesheet><link href=admin/setting/dist/css/index.bfb05069.css rel=stylesheet></head><body><div id=app></div><script src=admin/setting/dist/js/chunk-vendors.852e680b.js></script><script src=admin/setting/dist/js/index.2a224278.js></script></body></html>

View File

@@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-11793d76"],{"02fa":function(t,e,n){},"11c1":function(t,e,n){"use strict";var c=n("02fa"),a=n.n(c);a.a},"76cf":function(t,e,n){"use strict";n.r(e);var c=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"page-content"},[n("el-scrollbar",{staticClass:"page-component__scroll"},[n("el-menu",{attrs:{"default-active":t.LeftActive},on:{select:t.handleSelect}},t._l(t.GetleftData,(function(e){return n("el-menu-item",{style:{"font-size":1==t.IfuserAgent?"14px":"17px"},attrs:{index:e.type}},[n("i",{class:e.icon}),n("span",{attrs:{slot:"title"},slot:"title"},[t._v(t._s(e.text))])])})),1)],1)],1)},a=[],s=(n("b0c0"),n("5530")),l=n("2f62"),o={data:function(){return{}},computed:Object(s["a"])(Object(s["a"])({},Object(l["c"])(["IfuserAgent","LeftActive"])),Object(l["b"])(["GetleftData"])),created:function(){},methods:{handleSelect:function(t,e){var n=this.$route.name;n!=t&&this.$router.push({name:t})}},components:{}},i=o,r=(n("11c1"),n("2877")),u=Object(r["a"])(i,c,a,!1,null,"5965fcf4",null);e["default"]=u.exports}}]);

View File

@@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1ce8ae7e"],{"540d":function(t,a,e){},"6d0b":function(t,a,e){"use strict";var s=e("540d"),n=e.n(s);n.a},9048:function(t,a,e){"use strict";e.r(a);var s=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.buttonLoad,expression:"buttonLoad"}],staticClass:"page-content"},[e("div",{staticClass:"top-title color-border"},[t._v(t._s(t.$t("lefttext2")))]),e("el-scrollbar",{staticClass:"page-component__scroll"},[e("el-form",{ref:"form",staticStyle:{padding:"35px 50px"},attrs:{"label-position":1==t.IfuserAgent?"top":"rigth","label-width":"160px"}},[e("el-form-item",{attrs:{label:t.$t("setting_main_suffix")+":"}},[e("el-input",{staticClass:"max-width",attrs:{type:"textarea",autosize:""},model:{value:t.formdata.unRunExts,callback:function(a){t.$set(t.formdata,"unRunExts",a)},expression:"formdata.unRunExts"}}),e("ul",{staticClass:"help-block",domProps:{innerHTML:t._s(t.$t("setting_main_suffix_text"))}})],1),e("el-form-item",{attrs:{label:t.$t("upload_block_size")+":"}},[e("el-input",{staticClass:"max-width",attrs:{type:"number"},model:{value:t.formdata.maxChunkSize,callback:function(a){t.$set(t.formdata,"maxChunkSize",a)},expression:"formdata.maxChunkSize"}},[e("template",{slot:"append"},[t._v("M")])],2),e("ul",{staticClass:"help-block",domProps:{innerHTML:t._s(t.$t("upload_block_size_text"))}})],1),e("el-form-item",{staticStyle:{"padding-top":"15px"}},[e("el-button",{attrs:{type:"primary"},on:{click:t.SubmitDatalist}},[t._v(t._s(t.$t("save_changes")))])],1)],1)],1)],1)},n=[],o={props:["FormHash","IfuserAgent","formdata","buttonLoad"],data:function(){return{}},created:function(){},methods:{SubmitDatalist:function(){this.$emit("formSubmit")}}},i=o,l=(e("6d0b"),e("2877")),r=Object(l["a"])(i,s,n,!1,null,"17c69b7c",null);a["default"]=r.exports}}]);

View File

@@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-201f656b"],{afdd:function(t,a,e){"use strict";var i=e("df75c"),s=e.n(i);s.a},df75c:function(t,a,e){},fc70:function(t,a,e){"use strict";e.r(a);var i=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"basic-container"},[e("van-form",{attrs:{"label-width":"7.5em"}},[e("van-field",{attrs:{label:t.$t("thumbnail_size")+":"},scopedSlots:t._u([{key:"input",fn:function(){return[e("van-row",[e("van-col",{attrs:{span:"8"}},[e("van-field",{staticStyle:{padding:"0 5px","border-bottom":"1px solid #ebedf0"},attrs:{label:""},model:{value:t.formdata.thumbsize.small.width,callback:function(a){t.$set(t.formdata.thumbsize.small,"width",a)},expression:"formdata.thumbsize.small.width"}})],1),e("van-col",{staticStyle:{"text-align":"center"},attrs:{span:"2"}},[t._v("X")]),e("van-col",{attrs:{span:"8"}},[e("van-field",{staticStyle:{padding:"0 5px","border-bottom":"1px solid #ebedf0"},attrs:{label:""},model:{value:t.formdata.thumbsize.small.height,callback:function(a){t.$set(t.formdata.thumbsize.small,"height",a)},expression:"formdata.thumbsize.small.height"}})],1),e("van-col",{staticStyle:{"margin-bottom":"15px"},attrs:{span:"6"}},[e("span",[t._v(t._s(t.$t("large_size")))])]),e("van-col",{attrs:{span:"8"}},[e("van-field",{staticStyle:{padding:"0 5px","border-bottom":"1px solid #ebedf0"},attrs:{label:""},model:{value:t.formdata.thumbsize.middle.width,callback:function(a){t.$set(t.formdata.thumbsize.middle,"width",a)},expression:"formdata.thumbsize.middle.width"}})],1),e("van-col",{staticStyle:{"text-align":"center"},attrs:{span:"2"}},[t._v("X")]),e("van-col",{attrs:{span:"8"}},[e("van-field",{staticStyle:{padding:"0 5px","border-bottom":"1px solid #ebedf0"},attrs:{label:""},model:{value:t.formdata.thumbsize.middle.height,callback:function(a){t.$set(t.formdata.thumbsize.middle,"height",a)},expression:"formdata.thumbsize.middle.height"}})],1),e("van-col",{staticStyle:{"margin-bottom":"15px"},attrs:{span:"6"}},[e("span",[t._v(t._s(t.$t("chinese_size")))])]),e("van-col",{attrs:{span:"8"}},[e("van-field",{staticStyle:{padding:"0 5px","border-bottom":"1px solid #ebedf0"},attrs:{label:""},model:{value:t.formdata.thumbsize.large.width,callback:function(a){t.$set(t.formdata.thumbsize.large,"width",a)},expression:"formdata.thumbsize.large.width"}})],1),e("van-col",{staticStyle:{"text-align":"center"},attrs:{span:"2"}},[t._v("X")]),e("van-col",{attrs:{span:"8"}},[e("van-field",{staticStyle:{padding:"0 5px","border-bottom":"1px solid #ebedf0"},attrs:{label:""},model:{value:t.formdata.thumbsize.large.height,callback:function(a){t.$set(t.formdata.thumbsize.large,"height",a)},expression:"formdata.thumbsize.large.height"}})],1),e("van-col",{attrs:{span:"6"}},[e("span",[t._v(t._s(t.$t("max_size")))])])],1)]},proxy:!0}])}),e("ul",{staticClass:"GrayColor",staticStyle:{"font-size":"0.5em",padding:"8px 15px"}},[e("li",[t._v(t._s(t.$t("setting_main_thumbnail_size")))])]),e("van-field",{attrs:{name:"radioxGroup",label:t.$t("thumbnail_generation")+":"},scopedSlots:t._u([{key:"input",fn:function(){return[e("van-radio-group",{attrs:{direction:"horizontal"},model:{value:t.formdata.thumb_active,callback:function(a){t.$set(t.formdata,"thumb_active",a)},expression:"formdata.thumb_active"}},[e("van-radio",{attrs:{name:"1"}},[t._v(t._s(t.$t("active_mode")))]),e("van-radio",{attrs:{name:"0"}},[t._v(t._s(t.$t("passive_mode")))])],1)]},proxy:!0}])}),e("ul",{staticClass:"GrayColor",staticStyle:{"font-size":"0.5em",padding:"8px 15px"},domProps:{innerHTML:t._s(t.$t("setting_main_thumbnail_generation"))}}),e("div",{staticStyle:{margin:"16px"}},[e("van-button",{attrs:{round:"",block:"",type:"info","native-type":"submit"},on:{click:t.SubmitDatalist}},[t._v(t._s(t.$t("save_changes")))])],1)],1)],1)},s=[],n={props:["formdata","buttonLoad"],data:function(){return{}},watch:{buttonLoad:{handler:function(t){var a=this.$toast.loading({message:this.$t("loading")+"...",forbidClick:!0,duration:0});t||a.clear()},deep:!0,immediate:!0}},created:function(){},methods:{SubmitDatalist:function(){this.$emit("formSubmit")}}},l=n,o=(e("afdd"),e("2877")),d=Object(o["a"])(l,i,s,!1,null,"7ebb1108",null);a["default"]=d.exports}}]);

View File

@@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-27b595b5"],{1530:function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("van-nav-bar",{staticClass:"van-nav-header",attrs:{title:e.$t(e.$route.meta.title)},scopedSlots:e._u([{key:"left",fn:function(){return[n("van-icon",{attrs:{name:"ellipsis",size:"18"},on:{click:function(t){e.showMenu=!0}}})]},proxy:!0},{key:"right",fn:function(){return[n("van-icon",{attrs:{name:"apps-o",size:"18"},on:{click:function(t){e.showNavigation=!0}}})]},proxy:!0}])}),n("van-popup",{style:{width:"100%"},attrs:{position:"top","get-container":"#app"},model:{value:e.showMenu,callback:function(t){e.showMenu=t},expression:"showMenu"}},[n("van-sidebar",{staticStyle:{width:"100%"},on:{change:e.handleMenu},model:{value:e.MenuActive,callback:function(t){e.MenuActive=t},expression:"MenuActive"}},e._l(e.GetleftData,(function(e){return n("van-sidebar-item",{attrs:{title:e.text}})})),1)],1),n("van-popup",{style:{width:"100%"},attrs:{position:"top","get-container":"#app"},model:{value:e.showNavigation,callback:function(t){e.showNavigation=t},expression:"showNavigation"}},[n("van-sidebar",{staticStyle:{width:"100%"},on:{change:e.handleNavigation},model:{value:e.headerActive,callback:function(t){e.headerActive=t},expression:"headerActive"}},e._l(e.headerData,(function(e){return n("van-sidebar-item",{attrs:{title:e.name}})})),1)],1),n("router-view",{attrs:{IfuserAgent:e.IfuserAgent,FormHash:e.GetFormHash}})],1)},i=[],o=(n("4160"),n("159b"),n("5530")),c=n("2f62"),s={data:function(){return{MenuActive:0,MenuData:[],headerActive:0,headerData:[],showMenu:!1,showNavigation:!1}},computed:Object(o["a"])(Object(o["a"])({},Object(c["c"])(["IfuserAgent","ContLeft"])),Object(c["b"])(["GetNavMenu","GetFormHash","GetleftData"])),watch:{GetleftData:{handler:function(e){var t=this;this.MenuData=e,e.forEach((function(e,n){e.type==t.$route.meta.active&&(t.MenuActive=n)}))},deep:!0,immediate:!0},GetNavMenu:{handler:function(e){var t=this;this.headerData=e,e&&e.length&&e.forEach((function(e,n){"setting"==e.index&&(t.headerActive=n)}))},deep:!0,immediate:!0}},created:function(){},methods:{handleMenu:function(e){this.$router.push({name:this.MenuData[e].type}),this.showMenu=!1},handleNavigation:function(e){var t=this.headerData[e];"admin"==t.type?window.location.href="admin.php?mod="+t.index:window.location.href="index.php?mod="+t.index}},components:{}},r=s,u=(n("3032"),n("2877")),h=Object(u["a"])(r,a,i,!1,null,"33fcd69a",null);t["default"]=h.exports},3032:function(e,t,n){"use strict";var a=n("7f82"),i=n.n(a);i.a},"7f82":function(e,t,n){}}]);

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-302fb9a6"],{"0e9b":function(t,e,a){"use strict";var s=a("2f7e"),o=a.n(s);o.a},"2f7e":function(t,e,a){},6254:function(t,e,a){"use strict";a.r(e);var s=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:"systeminfo"}},[t._v("系统管理")]),a("el-divider",{staticClass:"adjust-divider"}),a("el-dropdown-item",{attrs:{command:"OutLogin"}},[t._v("退出站点")])],1)],2)],1)},o=[],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){var e=this;switch(t){case"collection":window.location.href="index.php?mod=collection";break;case"personal":window.location.href="user.php?mod=my";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"systeminfo":window.location.href="index.php?mod=systeminfo";break;case"system":window.open("admin.php?mod=system");break;case"orguser":window.open("admin.php?mod=orguser");break;case"systemlog":window.open("admin.php?mod=systemlog");break;case"OutLogin":this.$message,this.$confirm("您确定要注销登录?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(n["a"])(regeneratorRuntime.mark((function t(){var a,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.axios.post("user.php?mod=login&op=logging&inajax=1&action=logout&formhash="+e.GetFormHash+"&t="+(new Date).getTime());case 2:a=t.sent,s=a.data,s.success?window.location.reload():e.$message.error(s.msg||"退出登录失败");case 5:case"end":return t.stop()}}),t)})))).catch((function(){}));break}return!1}}},l=c,d=(a("0e9b"),a("9c24"),a("2877")),p=Object(d["a"])(l,s,o,!1,null,"a6c00da6",null);e["default"]=p.exports},"864f":function(t,e,a){},"9c24":function(t,e,a){"use strict";var s=a("864f"),o=a.n(s);o.a}}]);

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-37d74806"],{"7e89":function(t,a,e){"use strict";var i=e("b260"),s=e.n(i);s.a},a9f5:function(t,a,e){"use strict";e.r(a);var i=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"basic-container"},[e("van-form",{attrs:{"label-width":"7.5em"}},[e("van-field",{attrs:{label:t.$t("main_title_page")+":"},model:{value:t.formdata.loginset.title,callback:function(a){t.$set(t.formdata.loginset,"title",a)},expression:"formdata.loginset.title"}}),e("p",{staticClass:"GrayColor",staticStyle:{"font-size":"0.5em",padding:"0 15px"}},[t._v(t._s(t.$t("main_title_page_state")))]),e("van-field",{attrs:{label:t.$t("page_subtitle")+":"},model:{value:t.formdata.loginset.subtitle,callback:function(a){t.$set(t.formdata.loginset,"subtitle",a)},expression:"formdata.loginset.subtitle"}}),e("p",{staticClass:"GrayColor",staticStyle:{"font-size":"0.5em",padding:"0 15px"}},[t._v(t._s(t.$t("page_subtitle_state")))]),e("van-field",{attrs:{label:t.$t("page_background")+":"},model:{value:t.formdata.loginset.background,callback:function(a){t.$set(t.formdata.loginset,"background",a)},expression:"formdata.loginset.background"}}),e("p",{staticClass:"GrayColor",staticStyle:{"font-size":"0.5em",padding:"0 15px"}},[t._v(t._s(t.$t("for_color_set")))]),e("div",{staticStyle:{margin:"16px"}},[e("van-button",{attrs:{round:"",block:"",type:"info","native-type":"submit"},on:{click:t.SubmitDatalist}},[t._v(t._s(t.$t("save_changes")))])],1)],1)],1)},s=[],n={props:["formdata","buttonLoad"],data:function(){return{}},watch:{buttonLoad:{handler:function(t){var a=this.$toast.loading({message:this.$t("loading")+"...",forbidClick:!0,duration:0});t||a.clear()},deep:!0,immediate:!0}},created:function(){},methods:{SubmitDatalist:function(){this.$emit("formSubmit")}}},o=n,l=(e("7e89"),e("2877")),r=Object(l["a"])(o,i,s,!1,null,"711f0036",null);a["default"]=r.exports},b260:function(t,a,e){}}]);

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3bab3918"],{"1b85":function(t,a,e){},"4eaa":function(t,a,e){"use strict";var n=e("1b85"),i=e.n(n);i.a},fcc8:function(t,a,e){"use strict";e.r(a);var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"resNav"},[e("div",{staticClass:"resNav-item resNav-left"},[e("a",{staticClass:"h-left",attrs:{href:t.siteurl},on:{click:function(a){return t.goBack()}}},[e("el-image",{attrs:{src:"data/attachment/sitelogo/sitelogo.png?"+t.makeid(),fit:"contain"}}),e("span",{staticClass:"text"},[t._v(t._s(t.navTitle))])],1)]),e("div",{staticClass:"resNav-item resNav-center"}),e("div",{staticClass:"resNav-item resNav-right"},[e("Mavatar")],1)])},i=[],c=(e("d3b7"),e("5530")),r=e("2f62"),s={props:["hideContent","apptype","hideBack"],data:function(){return{}},computed:Object(c["a"])(Object(c["a"])({},Object(r["c"])(["headerName","navTitle","IfuserAgent","siteurl"])),Object(r["b"])(["GetNavMenu"])),methods:{handleClick:function(t){var a=this.GetNavMenu;for(var e in a)if(a[e].index==t){"admin"==a[e].type?window.location.href="admin.php?mod="+t:window.location.href="index.php?mod="+t;break}},makeid:function(){var t="",a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",e=a.length,n=0;while(n<5)t+=a.charAt(Math.floor(Math.random()*e)),n+=1;return t},goBack:function(){window.location.href="/"}},components:{Mavatar:function(){return e.e("chunk-302fb9a6").then(e.bind(null,"6254"))}}},o=s,l=(e("4eaa"),e("2877")),d=Object(l["a"])(o,n,i,!1,null,"77bcd1f8",null);a["default"]=d.exports}}]);

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-45f0a227"],{7263:function(t,e,a){},"82fb":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.buttonLoad,expression:"buttonLoad"}],staticClass:"page-content"},[a("div",{staticClass:"top-title color-border"},[t._v(t._s(t.$t("lefttext6")))]),a("el-scrollbar",{staticClass:"page-component__scroll"},[a("el-form",{ref:"form",staticStyle:{padding:"35px 50px"},attrs:{"label-position":1==t.IfuserAgent?"top":"rigth","label-width":"160px"}},[a("el-form-item",{attrs:{label:t.$t("thumbnail_size")+":"}},[a("div",{staticClass:"max-width",staticStyle:{overflow:"hidden","margin-bottom":"15px"}},[a("el-col",{attrs:{span:8}},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("width"),type:"number"},model:{value:t.formdata.thumbsize.small.width,callback:function(e){t.$set(t.formdata.thumbsize.small,"width",e)},expression:"formdata.thumbsize.small.width"}})],1),a("el-col",{staticClass:"line",staticStyle:{"text-align":"center"},attrs:{span:2}},[t._v("X")]),a("el-col",{attrs:{span:14}},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("height"),type:"number"},model:{value:t.formdata.thumbsize.small.height,callback:function(e){t.$set(t.formdata.thumbsize.small,"height",e)},expression:"formdata.thumbsize.small.height"}},[a("template",{slot:"append"},[t._v(t._s(t.$t("large_size")))])],2)],1)],1),a("div",{staticClass:"max-width",staticStyle:{overflow:"hidden","margin-bottom":"15px"}},[a("el-col",{attrs:{span:8}},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("width"),type:"number"},model:{value:t.formdata.thumbsize.middle.width,callback:function(e){t.$set(t.formdata.thumbsize.middle,"width",e)},expression:"formdata.thumbsize.middle.width"}})],1),a("el-col",{staticClass:"line",staticStyle:{"text-align":"center"},attrs:{span:2}},[t._v("X")]),a("el-col",{attrs:{span:14}},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("height"),type:"number"},model:{value:t.formdata.thumbsize.middle.height,callback:function(e){t.$set(t.formdata.thumbsize.middle,"height",e)},expression:"formdata.thumbsize.middle.height"}},[a("template",{slot:"append"},[t._v(t._s(t.$t("chinese_size")))])],2)],1)],1),a("div",{staticClass:"max-width",staticStyle:{overflow:"hidden","margin-bottom":"15px"}},[a("el-col",{attrs:{span:8}},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("width"),type:"number"},model:{value:t.formdata.thumbsize.large.width,callback:function(e){t.$set(t.formdata.thumbsize.large,"width",e)},expression:"formdata.thumbsize.large.width"}})],1),a("el-col",{staticClass:"line",staticStyle:{"text-align":"center"},attrs:{span:2}},[t._v("X")]),a("el-col",{attrs:{span:14}},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("height"),type:"number"},model:{value:t.formdata.thumbsize.large.height,callback:function(e){t.$set(t.formdata.thumbsize.large,"height",e)},expression:"formdata.thumbsize.large.height"}},[a("template",{slot:"append"},[t._v(t._s(t.$t("max_size")))])],2)],1)],1),a("ul",{staticClass:"help-inline",staticStyle:{"line-height":"22px","padding-left":"15px"}},[a("li",[t._v(t._s(t.$t("setting_main_thumbnail_size")))])])]),a("el-form-item",{attrs:{label:t.$t("thumbnail_generation")+":"}},[a("div",{staticClass:"max-width",staticStyle:{display:"inline-block"}},[a("el-radio",{attrs:{border:"",label:"1"},model:{value:t.formdata.thumb_active,callback:function(e){t.$set(t.formdata,"thumb_active",e)},expression:"formdata.thumb_active"}},[t._v(t._s(t.$t("active_mode")))]),a("el-radio",{attrs:{border:"",label:"0"},model:{value:t.formdata.thumb_active,callback:function(e){t.$set(t.formdata,"thumb_active",e)},expression:"formdata.thumb_active"}},[t._v(t._s(t.$t("passive_mode")))])],1),a("ul",{staticClass:"help-inline",staticStyle:{"line-height":"22px","padding-left":"15px"},domProps:{innerHTML:t._s(t.$t("setting_main_thumbnail_generation"))}})]),a("el-form-item",{staticStyle:{"padding-top":"15px"}},[a("el-button",{attrs:{type:"primary"},on:{click:t.SubmitDatalist}},[t._v(t._s(t.$t("save_changes")))])],1)],1)],1)],1)},l=[],s={props:["IfuserAgent","formdata"],data:function(){return{}},created:function(){},methods:{SubmitDatalist:function(){this.$emit("formSubmit")}}},o=s,n=(a("de25"),a("2877")),r=Object(n["a"])(o,i,l,!1,null,"79937805",null);e["default"]=r.exports},de25:function(t,e,a){"use strict";var i=a("7263"),l=a.n(i);l.a}}]);

View File

@@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4850fbf9"],{"1c40":function(t,a,e){"use strict";e.r(a);var s=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"basic-container"},[e("van-form",{attrs:{"label-width":"7.5em"}},[e("van-field",{attrs:{name:"switch",label:t.$t("allow_new_user_registration")+":"},scopedSlots:t._u([{key:"input",fn:function(){return[e("van-switch",{attrs:{"active-value":"1","inactive-value":"0",size:"20"},model:{value:t.formdata.regstatus,callback:function(a){t.$set(t.formdata,"regstatus",a)},expression:"formdata.regstatus"}})]},proxy:!0}])}),e("p",{staticClass:"GrayColor",staticStyle:{"font-size":"0.5em",padding:"0 15px"}},[t._v(t._s(t.$t("open_enrollment_text")))]),e("van-field",{attrs:{label:t.$t("register_link_text")+":"},model:{value:t.formdata.reglinkname,callback:function(a){t.$set(t.formdata,"reglinkname",a)},expression:"formdata.reglinkname"}}),e("p",{staticClass:"GrayColor",staticStyle:{"font-size":"0.5em",padding:"0 15px"}},[t._v(t._s(t.$t("register_link_text_text")))]),e("van-field",{attrs:{type:"number",label:t.$t("password_min_length")+":"},model:{value:t.formdata.pwlength,callback:function(a){t.$set(t.formdata,"pwlength",a)},expression:"formdata.pwlength"}}),e("p",{staticClass:"GrayColor",staticStyle:{"font-size":"0.5em",padding:"0 15px"}},[t._v(t._s(t.$t("password_min_length_state")))]),e("van-field",{attrs:{name:"checkboxGroup",label:t.$t("mandatory_password_complexity")+":"},scopedSlots:t._u([{key:"input",fn:function(){return[e("van-checkbox-group",{attrs:{direction:"horizontal"},model:{value:t.formdata.strongpw,callback:function(a){t.$set(t.formdata,"strongpw",a)},expression:"formdata.strongpw"}},t._l(t.fstrongpw,(function(a){return e("van-checkbox",{staticStyle:{"margin-bottom":"5px"},attrs:{name:a.val,shape:"square"}},[t._v(t._s(a.text))])})),1)]},proxy:!0}])}),e("p",{staticClass:"GrayColor",staticStyle:{"font-size":"0.5em",padding:"0 15px"}},[t._v(t._s(t.$t("mandatory_password_complexity_state")))]),e("van-field",{attrs:{name:"radioxGroup",label:t.$t("according_site_terms_service")+":"},scopedSlots:t._u([{key:"input",fn:function(){return[e("van-radio-group",{attrs:{direction:"horizontal"},model:{value:t.formdata.bbrules,callback:function(a){t.$set(t.formdata,"bbrules",a)},expression:"formdata.bbrules"}},[e("van-radio",{attrs:{name:"1"}},[t._v(t._s(t.$t("yes")))]),e("van-radio",{attrs:{name:"0"}},[t._v(t._s(t.$t("no")))])],1)]},proxy:!0}])}),e("p",{staticClass:"GrayColor",staticStyle:{"font-size":"0.5em",padding:"0 15px"}},[t._v(t._s(t.$t("registration_website_terms_service")))]),e("van-field",{directives:[{name:"show",rawName:"v-show",value:"1"==t.formdata.bbrules,expression:"formdata.bbrules == '1'"}],attrs:{rows:"2",autosize:"",label:t.$t("terms_service_content")+":",type:"textarea",placeholder:""},model:{value:t.formdata.bbrulestxt,callback:function(a){t.$set(t.formdata,"bbrulestxt",a)},expression:"formdata.bbrulestxt"}}),e("p",{directives:[{name:"show",rawName:"v-show",value:"1"==t.formdata.bbrules,expression:"formdata.bbrules == '1'"}],staticClass:"GrayColor",staticStyle:{"font-size":"0.5em",padding:"0 15px"}},[t._v(t._s(t.$t("details_sites_terms_service")))]),e("div",{staticStyle:{margin:"16px"}},[e("van-button",{attrs:{round:"",block:"",type:"info","native-type":"submit"},on:{click:t.SubmitDatalist}},[t._v(t._s(t.$t("save_changes")))])],1)],1)],1)},r=[],n={props:["buttonLoad","formdata","fstrongpw"],data:function(){return{}},watch:{buttonLoad:{handler:function(t){var a=this.$toast.loading({message:this.$t("loading")+"...",forbidClick:!0,duration:0});t||a.clear()},deep:!0,immediate:!0}},created:function(){},methods:{SubmitDatalist:function(){this.$emit("formSubmit")}}},o=n,i=(e("e4d0"),e("2877")),l=Object(i["a"])(o,s,r,!1,null,"2c7e0b30",null);a["default"]=l.exports},b7bf:function(t,a,e){},e4d0:function(t,a,e){"use strict";var s=e("b7bf"),r=e.n(s);r.a}}]);

View File

@@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4bd6d832"],{"1b19":function(t,a,e){"use strict";var s=e("55b9"),i=e.n(s);i.a},"55b9":function(t,a,e){},b00b:function(t,a,e){"use strict";e.r(a);var s=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.buttonLoad,expression:"buttonLoad"}],staticClass:"page-content"},[e("div",{staticClass:"top-title color-border"},[t._v(t._s(t.$t("lefttext4")))]),e("el-scrollbar",{staticClass:"page-component__scroll"},[e("el-form",{ref:"form",staticStyle:{padding:"35px 50px"},attrs:{"label-position":1==t.IfuserAgent?"top":"rigth","label-width":"160px"}},[e("el-form-item",{attrs:{label:t.$t("main_title_page")+":"}},[e("el-input",{staticClass:"max-width",model:{value:t.formdata.loginset.title,callback:function(a){t.$set(t.formdata.loginset,"title",a)},expression:"formdata.loginset.title"}}),e("span",{staticClass:"help-inline"},[t._v(t._s(t.$t("main_title_page_state")))])],1),e("el-form-item",{attrs:{label:t.$t("page_subtitle")+":"}},[e("el-input",{staticClass:"max-width",model:{value:t.formdata.loginset.subtitle,callback:function(a){t.$set(t.formdata.loginset,"subtitle",a)},expression:"formdata.loginset.subtitle"}}),e("span",{staticClass:"help-inline"},[t._v(t._s(t.$t("page_subtitle_state")))])],1),e("el-form-item",{attrs:{label:t.$t("page_background")+":"}},[e("el-input",{staticClass:"max-width",model:{value:t.formdata.loginset.background,callback:function(a){t.$set(t.formdata.loginset,"background",a)},expression:"formdata.loginset.background"}}),e("span",{staticClass:"help-inline"},[t._v(t._s(t.$t("for_color_set")))])],1),e("el-form-item",{staticStyle:{"padding-top":"15px"}},[e("el-button",{attrs:{type:"primary"},on:{click:t.SubmitDatalist}},[t._v(t._s(t.$t("save_changes")))])],1)],1)],1)],1)},i=[],l={props:["IfuserAgent","formdata","buttonLoad"],data:function(){return{}},created:function(){},methods:{SubmitDatalist:function(){this.$emit("formSubmit")}}},n=l,o=(e("1b19"),e("2877")),r=Object(o["a"])(n,s,i,!1,null,"26fd32b2",null);a["default"]=r.exports}}]);

View File

@@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-51ab32cd"],{3685:function(t,e,a){},ec9e:function(t,e,a){"use strict";var n=a("3685"),i=a.n(n);i.a},fcc8: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-fc47aa76").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-51ab32cd"],{3685:function(t,e,a){},ec9e:function(t,e,a){"use strict";var n=a("3685"),i=a.n(n);i.a},fcc8: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-302fb9a6").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-56b92ffd"],{"782a":function(t,a,e){"use strict";e.r(a);var s=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"page-content"},[e("div",{staticClass:"top-title color-border"},[t._v(" "+t._s(t.$t("lefttext5"))+" "),e("span",{staticClass:"line"}),e("span",{staticClass:"text",staticStyle:{"margin-right":"20px"},on:{click:t.router_mail}},[t._v(t._s(t.$t("set")))]),e("span",{staticClass:"text color-color-important"},[t._v(t._s(t.$t("detection")))])]),e("el-scrollbar",{staticClass:"page-component__scroll"},[e("el-form",{ref:"form",staticStyle:{padding:"35px 50px"},attrs:{"label-position":1==t.IfuserAgent?"top":"rigth","label-width":"225px"}},[e("el-form-item",{attrs:{label:t.$t("setting_mail_check_test_from")+":"}},[e("el-input",{staticClass:"max-width",attrs:{placeholder:""},model:{value:t.formdata.test_from,callback:function(a){t.$set(t.formdata,"test_from",a)},expression:"formdata.test_from"}})],1),e("el-form-item",{attrs:{label:t.$t("setting_mail_check_test_to")+":"}},[e("el-input",{staticClass:"max-width",attrs:{type:"textarea",autosize:"",placeholder:""},model:{value:t.formdata.test_to,callback:function(a){t.$set(t.formdata,"test_to",a)},expression:"formdata.test_to"}}),e("span",{staticClass:"help-inline"},[t._v(t._s(t.$t("setting_mail_check_test_to_comment")))])],1),e("el-form-item",{staticStyle:{"padding-top":"15px"}},[e("el-button",{attrs:{type:"primary"},on:{click:t.SubmitDatalist}},[t._v(t._s(t.$t("submit")))])],1)],1)],1)],1)},i=[],o={props:["IfuserAgent","formdata"],data:function(){return{}},created:function(){},methods:{SubmitDatalist:function(){this.$emit("formSubmit")},router_mail:function(){this.$router.push({path:"/mail"})}}},l=o,r=(e("a7d2"),e("2877")),n=Object(r["a"])(l,s,i,!1,null,"0b61b126",null);a["default"]=n.exports},a7d2:function(t,a,e){"use strict";var s=e("fa7d"),i=e.n(s);i.a},fa7d:function(t,a,e){}}]);

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-65f82ec1"],{"801d":function(t,a,e){"use strict";e.r(a);var i=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[e("div",{staticClass:"basic-container"},[e("van-form",{attrs:{"label-width":"7em"}},[e("van-field",{attrs:{label:t.$t("setting_mail_check_test_from")+":"},model:{value:t.formdata.test_from,callback:function(a){t.$set(t.formdata,"test_from",a)},expression:"formdata.test_from"}}),e("van-field",{attrs:{label:t.$t("setting_mail_check_test_to")+":"},model:{value:t.formdata.test_to,callback:function(a){t.$set(t.formdata,"test_to",a)},expression:"formdata.test_to"}}),e("p",{staticClass:"GrayColor",staticStyle:{"font-size":"0.5em",padding:"0 15px"}},[t._v(t._s(t.$t("setting_mail_check_test_to_comment")))]),e("div",{staticStyle:{margin:"16px"}},[e("van-button",{attrs:{round:"",block:"",type:"info","native-type":"submit"},on:{click:t.SubmitDatalist}},[t._v(t._s(t.$t("submit")))])],1)],1)],1),e("van-tabbar",{on:{change:t.TabActiveChange},model:{value:t.TabActive,callback:function(a){t.TabActive=a},expression:"TabActive"}},[e("van-tabbar-item",{attrs:{name:"mail",icon:"setting-o"}},[t._v(t._s(t.$t("set")))]),e("van-tabbar-item",{attrs:{name:"mailcheck",icon:"browsing-history-o"}},[t._v(t._s(t.$t("detection")))])],1)],1)},n=[],s={props:["formdata"],data:function(){return{TabActive:"mailcheck"}},created:function(){},methods:{TabActiveChange:function(t){"mail"==t&&this.$router.push({path:"/mail"})},SubmitDatalist:function(){this.$emit("formSubmit")}},components:{}},o=s,c=(e("db87"),e("2877")),r=Object(c["a"])(o,i,n,!1,null,"3f7ad1a8",null);a["default"]=r.exports},db87:function(t,a,e){"use strict";var i=e("efed"),n=e.n(i);n.a},efed:function(t,a,e){}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-745ec13c"],{"19ba":function(t,a,e){},c619:function(t,a,e){"use strict";var n=e("19ba"),i=e.n(n);i.a},f25b:function(t,a,e){"use strict";e.r(a);var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"basic-container"},[e("van-form",{attrs:{"label-width":"7.5em"}},[e("van-field",{attrs:{rows:"3",autosize:"",label:t.$t("setting_main_suffix")+":",type:"textarea",placeholder:""},model:{value:t.formdata.unRunExts,callback:function(a){t.$set(t.formdata,"unRunExts",a)},expression:"formdata.unRunExts"}}),e("ul",{staticClass:"GrayColor",staticStyle:{"font-size":"0.5em",padding:"8px 15px"},domProps:{innerHTML:t._s(t.$t("setting_main_suffix_text"))}}),e("van-field",{attrs:{type:"number",label:t.$t("upload_block_size")+":"},scopedSlots:t._u([{key:"extra",fn:function(){return[e("span",{staticStyle:{padding:"0 15px"}},[t._v("M")])]},proxy:!0}]),model:{value:t.formdata.maxChunkSize,callback:function(a){t.$set(t.formdata,"maxChunkSize",a)},expression:"formdata.maxChunkSize"}}),e("ul",{staticClass:"GrayColor",staticStyle:{"font-size":"0.5em",padding:"8px 15px"},domProps:{innerHTML:t._s(t.$t("upload_block_size_text"))}}),e("div",{staticStyle:{margin:"16px"}},[e("van-button",{attrs:{round:"",block:"",type:"info","native-type":"submit"},on:{click:t.SubmitDatalist}},[t._v(t._s(t.$t("save_changes")))])],1)],1)],1)},i=[],s={props:["FormHash","IfuserAgent","formdata","buttonLoad"],data:function(){return{}},watch:{buttonLoad:{handler:function(t){var a=this.$toast.loading({message:this.$t("loading")+"...",forbidClick:!0,duration:0});t||a.clear()},deep:!0,immediate:!0}},created:function(){},methods:{SubmitDatalist:function(){this.$emit("formSubmit")}}},o=s,r=(e("c619"),e("2877")),u=Object(r["a"])(o,n,i,!1,null,"07fce424",null);a["default"]=u.exports}}]);

View File

@@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-8253696e"],{"0b53":function(e,t,n){},"2e83":function(e,t,n){},"5ede":function(e,t,n){"use strict";var r=n("0b53"),c=n.n(r);c.a},"95e2":function(e,t,n){"use strict";var r=n("2e83"),c=n.n(r);c.a},"95ef":function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-container",[n("el-header",{staticClass:"color-background",attrs:{height:"60px"}},[n("Mheader")],1),n("el-container",{staticStyle:{overflow:"hidden",height:"100%"}},[n("el-aside",{attrs:{width:e.IfuserAgent?"200px":"300px"}},[n("Mleft",{attrs:{type:"home"}}),n("div",{staticClass:"color-border",attrs:{id:"leftResize"}})],1),n("el-main",{staticStyle:{overflow:"hidden"}},[n("router-view",{attrs:{IfuserAgent:e.IfuserAgent,FormHash:e.GetFormHash}})],1)],1)],1)},c=[],a=(n("d3b7"),n("5530")),o=n("2f62"),i=n("50a0"),s={data:function(){return{}},created:function(){},computed:Object(a["a"])(Object(a["a"])({},Object(o["c"])(["IfuserAgent"])),Object(o["b"])(["GetFormHash"])),methods:{},components:{Mheader:function(){return n.e("chunk-3bab3918").then(n.bind(null,"fcc8"))},Mleft:function(){return n.e("chunk-11793d76").then(n.bind(null,"76cf"))}},mounted:function(){Object(i["a"])()}},u=s,d=(n("95e2"),n("5ede"),n("2877")),l=Object(d["a"])(u,r,c,!1,null,"7347ae1e",null);t["default"]=l.exports}}]);

View File

@@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-8253696e"],{"0b53":function(e,t,n){},"2e83":function(e,t,n){},"5ede":function(e,t,n){"use strict";var r=n("0b53"),c=n.n(r);c.a},"95e2":function(e,t,n){"use strict";var r=n("2e83"),c=n.n(r);c.a},"95ef":function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-container",[n("el-header",{staticClass:"color-background",attrs:{height:"60px"}},[n("Mheader")],1),n("el-container",{staticStyle:{overflow:"hidden",height:"100%"}},[n("el-aside",{attrs:{width:e.IfuserAgent?"200px":"300px"}},[n("Mleft",{attrs:{type:"home"}}),n("div",{staticClass:"color-border",attrs:{id:"leftResize"}})],1),n("el-main",{staticStyle:{overflow:"hidden"}},[n("router-view",{attrs:{IfuserAgent:e.IfuserAgent,FormHash:e.GetFormHash}})],1)],1)],1)},c=[],a=(n("d3b7"),n("5530")),o=n("2f62"),i=n("50a0"),s={data:function(){return{}},created:function(){},computed:Object(a["a"])(Object(a["a"])({},Object(o["c"])(["IfuserAgent"])),Object(o["b"])(["GetFormHash"])),methods:{},components:{Mheader:function(){return n.e("chunk-51ab32cd").then(n.bind(null,"fcc8"))},Mleft:function(){return n.e("chunk-11793d76").then(n.bind(null,"76cf"))}},mounted:function(){Object(i["a"])()}},u=s,d=(n("95e2"),n("5ede"),n("2877")),l=Object(d["a"])(u,r,c,!1,null,"7347ae1e",null);t["default"]=l.exports}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e9e5fa9a"],{"0dd6":function(t,e,a){},9615:function(t,e,a){"use strict";var s=a("0dd6"),l=a.n(s);l.a},d27d:function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.buttonLoad,expression:"buttonLoad"}],staticClass:"page-content"},[a("div",{staticClass:"top-title color-border"},[t._v(t._s(t.$t("lefttext3")))]),a("el-scrollbar",{staticClass:"page-component__scroll"},[a("el-form",{ref:"form",staticStyle:{padding:"35px 50px"},attrs:{"label-position":1==t.IfuserAgent?"top":"rigth","label-width":"160px"}},[a("el-form-item",{attrs:{label:t.$t("allow_new_user_registration")+":"}},[a("div",{staticClass:"max-width",staticStyle:{display:"inline-block"}},[a("el-switch",{model:{value:t.formdata.regstatus,callback:function(e){t.$set(t.formdata,"regstatus",e)},expression:"formdata.regstatus"}})],1),a("span",{staticClass:"help-inline"},[t._v(t._s(t.$t("open_enrollment_text")))])]),a("el-form-item",{attrs:{label:t.$t("register_link_text")+":"}},[a("el-input",{staticClass:"max-width",model:{value:t.formdata.reglinkname,callback:function(e){t.$set(t.formdata,"reglinkname",e)},expression:"formdata.reglinkname"}}),a("span",{staticClass:"help-inline"},[t._v(t._s(t.$t("register_link_text_text")))])],1),a("el-form-item",{attrs:{label:t.$t("password_min_length")+":"}},[a("el-input",{staticClass:"max-width",attrs:{type:"number"},model:{value:t.formdata.pwlength,callback:function(e){t.$set(t.formdata,"pwlength",e)},expression:"formdata.pwlength"}}),a("span",{staticClass:"help-inline"},[t._v(t._s(t.$t("password_min_length_state")))])],1),a("el-form-item",{attrs:{label:t.$t("mandatory_password_complexity")+":"}},[a("el-checkbox-group",{model:{value:t.formdata.strongpw,callback:function(e){t.$set(t.formdata,"strongpw",e)},expression:"formdata.strongpw"}},t._l(t.fstrongpw,(function(e){return a("el-checkbox",{key:e.val,staticStyle:{"margin-left":"0","margin-bottom":"10px"},attrs:{label:e.val,border:""}},[t._v(t._s(e.text))])})),1),a("span",{staticClass:"help-inline"},[t._v(t._s(t.$t("mandatory_password_complexity_state")))])],1),a("el-form-item",{attrs:{label:t.$t("according_site_terms_service")+":"}},[a("div",{staticClass:"max-width",staticStyle:{display:"inline-block"}},[a("el-radio",{attrs:{border:"",label:"1"},model:{value:t.formdata.bbrules,callback:function(e){t.$set(t.formdata,"bbrules",e)},expression:"formdata.bbrules"}},[t._v(t._s(t.$t("yes")))]),a("el-radio",{attrs:{border:"",label:"0"},model:{value:t.formdata.bbrules,callback:function(e){t.$set(t.formdata,"bbrules",e)},expression:"formdata.bbrules"}},[t._v(t._s(t.$t("no")))])],1),a("span",{staticClass:"help-inline"},[t._v(t._s(t.$t("registration_website_terms_service")))])]),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:"1"==t.formdata.bbrules,expression:"formdata.bbrules == '1'"}],attrs:{label:t.$t("terms_service_content")+":"}},[a("el-input",{staticClass:"max-width",attrs:{type:"textarea",autosize:""},model:{value:t.formdata.bbrulestxt,callback:function(e){t.$set(t.formdata,"bbrulestxt",e)},expression:"formdata.bbrulestxt"}}),a("span",{staticClass:"help-inline"},[t._v(t._s(t.$t("details_sites_terms_service")))])],1),a("el-form-item",{staticStyle:{"padding-top":"15px"}},[a("el-button",{attrs:{type:"primary"},on:{click:t.SubmitDatalist}},[t._v(t._s(t.$t("save_changes")))])],1)],1)],1)],1)},l=[],r={props:["FormHash","IfuserAgent","fstrongpw","buttonLoad","formdata"],data:function(){return{}},created:function(){},methods:{SubmitDatalist:function(){this.$emit("formSubmit")}}},i=r,o=(a("9615"),a("2877")),n=Object(o["a"])(i,s,l,!1,null,"79f5a396",null);e["default"]=n.exports}}]);

View File

@@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-fc47aa76"],{6254:function(t,e,a){"use strict";a.r(e);var s=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:"systeminfo"}},[t._v("系统管理")]),a("el-divider",{staticClass:"adjust-divider"}),a("el-dropdown-item",{attrs:{command:"OutLogin"}},[t._v("退出站点")])],1)],2)],1)},o=[],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){var e=this;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"systeminfo":window.location.href="index.php?mod=systeminfo";break;case"system":window.open("admin.php?mod=system");break;case"orguser":window.open("admin.php?mod=orguser");break;case"systemlog":window.open("admin.php?mod=systemlog");break;case"OutLogin":this.$message,this.$confirm("您确定要注销登录?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(n["a"])(regeneratorRuntime.mark((function t(){var a,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.axios.post("user.php?mod=login&op=logging&inajax=1&action=logout&formhash="+e.GetFormHash+"&t="+(new Date).getTime());case 2:a=t.sent,s=a.data,s.success?window.location.reload():e.$message.error(s.msg||"退出登录失败");case 5:case"end":return t.stop()}}),t)})))).catch((function(){}));break}return!1}}},l=c,d=(a("7a22"),a("9c24"),a("2877")),p=Object(d["a"])(l,s,o,!1,null,"4ef095d4",null);e["default"]=p.exports},"7a22":function(t,e,a){"use strict";var s=a("f01e"),o=a.n(s);o.a},"864f":function(t,e,a){},"9c24":function(t,e,a){"use strict";var s=a("864f"),o=a.n(s);o.a},f01e:function(t,e,a){}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -41,9 +41,9 @@ if ($operation == 'basic') {
if (Hook::listen('rolecheck', $params, null, true) === false) continue; if (Hook::listen('rolecheck', $params, null, true) === false) continue;
$applist[] = array('appname' => $value['appname'], 'identifier' => 'vapp_' . $value['identify']); $applist[] = array('appname' => $value['appname'], 'identifier' => 'vapp_' . $value['identify']);
} }
if($setting['sitelogo']){
$setting['sitelogoPath'] = IO::getFileUri('attach::'.$setting[sitelogo]); $setting['sitelogoPath'] =getglobal('setting/attachurl').'sitelogo/sitelogo.png?'.VERHASH;
}
exit(json_encode(array('settingdata' => $setting, 'appdata' => $applist,'serverspace'=>$serverspace))); exit(json_encode(array('settingdata' => $setting, 'appdata' => $applist,'serverspace'=>$serverspace)));
} else { } else {
$settingnew = $_GET['settingnew']; $settingnew = $_GET['settingnew'];
@@ -99,10 +99,10 @@ if ($operation == 'basic') {
} }
if ($settingnew['sitelogo'] && $settingnew['sitelogo'] != $setting['sitelogo']) { /* if ($settingnew['sitelogo'] && $settingnew['sitelogo'] != $setting['sitelogo']) {
if ($setting['sitelogo']) C::t('attachment')->delete_by_aid($setting['sitelogo']); if ($setting['sitelogo']) C::t('attachment')->delete_by_aid($setting['sitelogo']);
C::t('attachment')->addcopy_by_aid($settingnew['sitelogo'], 1); C::t('attachment')->addcopy_by_aid($settingnew['sitelogo'], 1);
} }*/
updatesetting($setting,$settingnew); updatesetting($setting,$settingnew);
exit(json_encode(array('success'=>true))); exit(json_encode(array('success'=>true)));
} }
@@ -218,7 +218,32 @@ if ($operation == 'basic') {
updatesetting($setting,$settingnew); updatesetting($setting,$settingnew);
exit(json_encode(array('success'=>true))); exit(json_encode(array('success'=>true)));
} }
}elseif($operation == 'mailcheck'){//邮件检测 }elseif($operation == 'uploadsitelogo'){
global $_G;
$files = $_FILES['files'];
if($files["type"] != 'image/png' || $files['size'] >= 1024*1024*2){
exit(json_encode(array('error'=>'file is not invalite')));
}
$logopath = 'sitelogo/sitelogo.png';
$logofilepath =$_G['setting']['attachdir'] .$logopath;
$logodir = dirname($logofilepath);
dmkdir($logodir);
//获取md5
$logomd5 = md5_file($files["tmp_name"]);
$return = move_uploaded_file($files["tmp_name"],$logofilepath);
if($return){
updatecache('setting');
exit(json_encode(array('success'=>true)));
}else{
exit(json_encode(array('success'=>false)));
}
}
elseif($operation == 'mailcheck'){//邮件检测
global $_G;
if(!submitcheck('settingsubmit')) { if(!submitcheck('settingsubmit')) {
$op = $_GET['op']?$_GET['op']:' '; $op = $_GET['op']?$_GET['op']:' ';
$navtitle=lang('email_send_test'); $navtitle=lang('email_send_test');
@@ -296,9 +321,10 @@ if ($operation == 'basic') {
//获取缩略图的md5 //获取缩略图的md5
$watermd5 = md5_file($files["tmp_name"]); $watermd5 = md5_file($files["tmp_name"]);
$return = move_uploaded_file($files["tmp_name"],$waterfilepath); $return = move_uploaded_file($files["tmp_name"],$waterfilepath);
if($return){ if($return){
//rename($waterpath.$files['name'],$waterpath.'water.png'); //rename($waterpath.$files['name'],$waterpath.'water.png');
@unlink($_G['setting']['waterimg']); //@unlink($_G['setting']['waterimg']);
//C::t('setting')->update('waterimg',$_G['setting']['attachurl'] .$waterpath); //C::t('setting')->update('waterimg',$_G['setting']['attachurl'] .$waterpath);
C::t('setting')->update('watermd5',$watermd5); C::t('setting')->update('watermd5',$watermd5);
updatecache('setting'); updatecache('setting');
@@ -367,7 +393,9 @@ if ($operation == 'basic') {
exit(json_encode(array('path'=>$_G['setting']['attachurl'] .$waterpath))); exit(json_encode(array('path'=>$_G['setting']['attachurl'] .$waterpath)));
} }
exit(json_encode(array('error'=>'upload error'))); exit(json_encode(array('path'=>getglobal('setting/attachurl').$waterpath.'?'.VERHASH)));
}else{
exit(json_encode(array('error'=>'upload failer')));
} }
}elseif($operation == 'watermark'){//水印设置 }elseif($operation == 'watermark'){//水印设置
if(!submitcheck('settingsubmit')) { if(!submitcheck('settingsubmit')) {

View File

@@ -104,6 +104,8 @@ if($operation == 'getApp'){//获取当前用户应用
}else{ }else{
// 地址栏名称 // 地址栏名称
$navtitle = $_G['setting']['sitename']; $navtitle = $_G['setting']['sitename'];
// 地址栏
$siteurl = $_G['siteurl'];
// 获取hash // 获取hash
$hash = FORMHASH; $hash = FORMHASH;
@@ -179,6 +181,6 @@ if($operation == 'getApp'){//获取当前用户应用
// 获取通知 // 获取通知
$notice_num=DB::result_first("select COUNT(*) from %t where new>0 and uid=%d",array('notification',$_G['uid'])); $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))); exit(json_encode(array('hash'=>$hash,'navMenu'=>$navMenu,'userData'=>$userData,'notice_num'=>$notice_num,'navtitle'=>$navtitle,'siteurl'=>$siteurl)));
} }
?> ?>

View File

@@ -0,0 +1 @@
.resNav .resNav-item[data-v-77bcd1f8],.resNav[data-v-77bcd1f8]{display:flex}.resNav[data-v-77bcd1f8]{width:100%;height:100%}.resNav .resNav-left[data-v-77bcd1f8]{height:100%;line-height:80px}.resNav .resNav-left a[data-v-77bcd1f8]{height:100%;display:flex;justify-content:center;align-items:center;text-decoration:none;text-align:left}.resNav .resNav-left a .el-image[data-v-77bcd1f8]{width:35px;height:35px}.resNav .resNav-left a .text[data-v-77bcd1f8]{font-size:16px;font-weight:700;margin-left:10px;color:#fff;white-space:nowrap;line-height:normal}.resNav .resNav-center[data-v-77bcd1f8]{flex:1 1 100%;height:100%}.resNav .resNav-center .el-menu[data-v-77bcd1f8]{border:0;padding:15px 0}.resNav .resNav-center .el-menu .el-menu-item[data-v-77bcd1f8]{height:50px;line-height:50px}.resNav .resNav-center .el-menu .el-menu-item[data-v-77bcd1f8]:hover{color:#fff;background:transparent!important}.resNav .resNav-right[data-v-77bcd1f8]{flex:0 0 auto;align-content:center;align-items:center}.resNav .resNav-right .line[data-v-77bcd1f8]{float:left;width:1px;height:22px;background:#fff;margin-right:10px}.el-page-header[data-v-77bcd1f8]{align-content:center;align-items:center}.el-page-header[data-v-77bcd1f8] .el-page-header__content{color:#fff}

View File

@@ -0,0 +1 @@
.el-avatar[data-v-a6c00da6]{float:left;cursor:pointer}.el-divider--horizontal.el-divider[data-v-a6c00da6]{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-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-ace00e2e.dddb9b47.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/chunk-faa8eb38.19611e95.css rel=prefetch><link href=/admin/system/dist/css/system_temp.abc9b69c.css rel=prefetch><link href=/admin/system/dist/js/chunk-2b4f90f7.2f0a4e7e.js rel=prefetch><link href=/admin/system/dist/js/chunk-2d0a3327.e8057289.js rel=prefetch><link href=/admin/system/dist/js/chunk-2d0bdbc6.166a0b1e.js rel=prefetch><link href=/admin/system/dist/js/chunk-2d0dd46d.2eaf7fe5.js rel=prefetch><link href=/admin/system/dist/js/chunk-2d0efd3c.d7dead10.js rel=prefetch><link href=/admin/system/dist/js/chunk-2d20fcd9.8090bd34.js rel=prefetch><link href=/admin/system/dist/js/chunk-2d21ddf7.19e2cf8a.js rel=prefetch><link href=/admin/system/dist/js/chunk-494f643e.bcba0a3f.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.57a7ae92.js rel=prefetch><link href=/admin/system/dist/js/chunk-9f9c2568.304b6bdc.js rel=prefetch><link href=/admin/system/dist/js/chunk-ace00e2e.9081a3c9.js rel=prefetch><link href=/admin/system/dist/js/chunk-af3b1b98.b297d596.js rel=prefetch><link href=/admin/system/dist/js/chunk-e730cc06.54b6104c.js rel=prefetch><link href=/admin/system/dist/js/chunk-faa8eb38.4708d20a.js rel=prefetch><link href=/admin/system/dist/js/system_temp.e1d6de9b.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.49caa82b.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.49caa82b.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-494f643e.7502109f.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-88627cc4.0db98615.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-cb5bf1ee.814b8c98.css rel=prefetch><link href=admin/system/dist/css/chunk-e730cc06.987283b7.css rel=prefetch><link href=admin/system/dist/css/chunk-faa8eb38.19611e95.css rel=prefetch><link href=admin/system/dist/css/system_temp.abc9b69c.css rel=prefetch><link href=admin/system/dist/js/chunk-2d0a3327.e8057289.js rel=prefetch><link href=admin/system/dist/js/chunk-2d0bdbc6.166a0b1e.js rel=prefetch><link href=admin/system/dist/js/chunk-2d0dd46d.2eaf7fe5.js rel=prefetch><link href=admin/system/dist/js/chunk-2d0efd3c.d7dead10.js rel=prefetch><link href=admin/system/dist/js/chunk-2d20fcd9.8090bd34.js rel=prefetch><link href=admin/system/dist/js/chunk-2d21ddf7.19e2cf8a.js rel=prefetch><link href=admin/system/dist/js/chunk-494f643e.bcba0a3f.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.57a7ae92.js rel=prefetch><link href=admin/system/dist/js/chunk-88627cc4.62d576fe.js rel=prefetch><link href=admin/system/dist/js/chunk-9f9c2568.304b6bdc.js rel=prefetch><link href=admin/system/dist/js/chunk-af3b1b98.b297d596.js rel=prefetch><link href=admin/system/dist/js/chunk-cb5bf1ee.421e873b.js rel=prefetch><link href=admin/system/dist/js/chunk-e730cc06.54b6104c.js rel=prefetch><link href=admin/system/dist/js/chunk-faa8eb38.4708d20a.js rel=prefetch><link href=admin/system/dist/js/system_temp.ed3cb1c1.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.3415cf84.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.3415cf84.js></script></body></html>

View File

@@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-88627cc4"],{"1b85":function(t,e,a){},"4eaa":function(t,e,a){"use strict";var n=a("1b85"),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:t.siteurl},on:{click:function(e){return t.goBack()}}},[a("el-image",{attrs:{src:"data/attachment/sitelogo/sitelogo.png?"+t.makeid(),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")),r=a("2f62"),s={props:["hideContent","apptype","hideBack"],data:function(){return{}},computed:Object(c["a"])(Object(c["a"])({},Object(r["c"])(["headerName","navTitle","IfuserAgent","siteurl"])),Object(r["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}},makeid:function(){var t="",e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=e.length,n=0;while(n<5)t+=e.charAt(Math.floor(Math.random()*a)),n+=1;return t},goBack:function(){window.location.href="/"}},components:{Mavatar:function(){return a.e("chunk-cb5bf1ee").then(a.bind(null,"6254"))}}},o=s,l=(a("4eaa"),a("2877")),d=Object(l["a"])(o,n,i,!1,null,"77bcd1f8",null);e["default"]=d.exports}}]);

View File

@@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-cb5bf1ee"],{"0e9b":function(t,e,a){"use strict";var s=a("2f7e"),o=a.n(s);o.a},"2f7e":function(t,e,a){},6254:function(t,e,a){"use strict";a.r(e);var s=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:"systeminfo"}},[t._v("系统管理")]),a("el-divider",{staticClass:"adjust-divider"}),a("el-dropdown-item",{attrs:{command:"OutLogin"}},[t._v("退出站点")])],1)],2)],1)},o=[],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){var e=this;switch(t){case"collection":window.location.href="index.php?mod=collection";break;case"personal":window.location.href="user.php?mod=my";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"systeminfo":window.location.href="index.php?mod=systeminfo";break;case"system":window.open("admin.php?mod=system");break;case"orguser":window.open("admin.php?mod=orguser");break;case"systemlog":window.open("admin.php?mod=systemlog");break;case"OutLogin":this.$message,this.$confirm("您确定要注销登录?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(n["a"])(regeneratorRuntime.mark((function t(){var a,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.axios.post("user.php?mod=login&op=logging&inajax=1&action=logout&formhash="+e.GetFormHash+"&t="+(new Date).getTime());case 2:a=t.sent,s=a.data,s.success?window.location.reload():e.$message.error(s.msg||"退出登录失败");case 5:case"end":return t.stop()}}),t)})))).catch((function(){}));break}return!1}}},l=c,d=(a("0e9b"),a("9c24"),a("2877")),p=Object(d["a"])(l,s,o,!1,null,"a6c00da6",null);e["default"]=p.exports},"864f":function(t,e,a){},"9c24":function(t,e,a){"use strict";var s=a("864f"),o=a.n(s);o.a}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +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');
?>

View File

@@ -1,4 +1,4 @@
<!--
<div class="h-left"> <div class="h-left">
<div class="el-page-header"> <div class="el-page-header">
@@ -23,4 +23,29 @@
{eval echo avatar_block($_G[uid]);} {eval echo avatar_block($_G[uid]);}
</el-avatar> </el-avatar>
</comavatar> </comavatar>
</div> </div> -->
<a href="{$_G[siteurl]}" class="h-left" style="text-decoration: none;">
<el-image class="logo" src="data/attachment/sitelogo/sitelogo.png?{VERHASH}" fit="contain">
<template #error><div class="el-image__placeholder"></div></template>
</el-image>
<el-text tag="b" size="large" style="color:#FFFFFF">登录日志</el-text>
</a>
<div class="h-center">
</div>
<div class="h-right">
<comavatar
:level="parseInt($_G[pichomelevel])"
iscollect="<!--{if defined('PICHOME_LIENCE') && (!$_G[config][pichomeclosecollect] || $_G[adminid])}--><!--{/if}-->"
:adminid="parseInt($_G[adminid])"
PICHOME_LIENCE="<!--{if defined('PICHOME_LIENCE')}--><!--{/if}-->"
:uid="parseInt($_G[uid])"
upgrade="<!--{if $_G['setting']['upgrade']}--><!--{/if}-->"
version="$_G[setting][version]"
formhash="{FORMHASH}"
:isrefresh="true">
<el-avatar size="40">
{eval echo avatar_block($_G[uid]);}
</el-avatar>
</comavatar>
</div>

View File

@@ -152,7 +152,7 @@ $_config['security']['attackevasive'] = 0; // CC 攻击防御 1|2|4|8
$_config['security']['querysafe']['status'] = 1; // 是否开启SQL安全检测可自动预防SQL注入攻击 $_config['security']['querysafe']['status'] = 1; // 是否开启SQL安全检测可自动预防SQL注入攻击
$_config['security']['querysafe']['dfunction'] = array('load_file','hex','substring','if','ord','char'); $_config['security']['querysafe']['dfunction'] = array('load_file','hex','substring','if','ord','char');
$_config['security']['querysafe']['daction'] = array('@','intooutfile','intodumpfile','unionselect','(select', 'unionall', 'uniondistinct'); $_config['security']['querysafe']['daction'] = array('@','intooutfile','intodumpfile','unionselect', 'unionall', 'uniondistinct');
$_config['security']['querysafe']['dnote'] = array('/*','*/','#','--','"'); $_config['security']['querysafe']['dnote'] = array('/*','*/','#','--','"');
$_config['security']['querysafe']['dlikehex'] = 1; $_config['security']['querysafe']['dlikehex'] = 1;
$_config['security']['querysafe']['afullnote'] = 0; $_config['security']['querysafe']['afullnote'] = 0;

View File

@@ -209,7 +209,7 @@ class image {
$this->imagecreatefromfunc = $this->imagefunc = TRUE; $this->imagecreatefromfunc = $this->imagefunc = TRUE;
} }
if(!$this->libmethod && $this->imginfo['mime'] == 'image/gif') { /*if(!$this->libmethod && $this->imginfo['mime'] == 'image/gif') {
if(!$this->imagecreatefromfunc) { if(!$this->imagecreatefromfunc) {
return -4; return -4;
} }
@@ -219,7 +219,7 @@ class image {
$content = fread($fp, $this->imginfo['size']); $content = fread($fp, $this->imginfo['size']);
fclose($fp); fclose($fp);
$this->imginfo['animated'] = strpos($content, 'NETSCAPE2.0') === FALSE ? 0 : 1; $this->imginfo['animated'] = strpos($content, 'NETSCAPE2.0') === FALSE ? 0 : 1;
} }*/
return $this->imagecreatefromfunc ? 1 : -4; return $this->imagecreatefromfunc ? 1 : -4;
} }
@@ -295,6 +295,7 @@ class image {
} }
function Thumb_GD() { function Thumb_GD() {
if(!function_exists('imagecreatetruecolor') || !function_exists('imagecopyresampled') || !function_exists('imagejpeg') || !function_exists('imagecopymerge')) { if(!function_exists('imagecreatetruecolor') || !function_exists('imagecopyresampled') || !function_exists('imagejpeg') || !function_exists('imagecopymerge')) {
return -4; return -4;
} }
@@ -319,7 +320,7 @@ class image {
case 1: case 1:
if($this->imginfo['width'] >= $this->param['thumbwidth'] || $this->imginfo['height'] >= $this->param['thumbheight']) { if($this->imginfo['width'] >= $this->param['thumbwidth'] || $this->imginfo['height'] >= $this->param['thumbheight']) {
$thumb = array(); $thumb = array();
list(,,$thumb['width'], $thumb['height']) = $this->sizevalue(0); list($thumb['width'], $thumb['height']) = $this->scaleImage($this->param['thumbwidth'], $this->param['thumbheight'],$this->imginfo['width'],$this->imginfo['height']);
$cx = $this->imginfo['width']; $cx = $this->imginfo['width'];
$cy = $this->imginfo['height']; $cy = $this->imginfo['height'];
$thumb_photo = imagecreatetruecolor($thumb['width'], $thumb['height']); $thumb_photo = imagecreatetruecolor($thumb['width'], $thumb['height']);
@@ -361,6 +362,7 @@ class image {
break; break;
} }
clearstatcache(); clearstatcache();
if($thumb_photo) { if($thumb_photo) {
if($this->imginfo['mime'] == 'image/jpeg') { if($this->imginfo['mime'] == 'image/jpeg') {
@$imagefunc($thumb_photo, $this->target, $this->param['thumbquality']); @$imagefunc($thumb_photo, $this->target, $this->param['thumbquality']);
@@ -440,9 +442,9 @@ class image {
$im->stripImage(); //去除图片信息 $im->stripImage(); //去除图片信息
$im->setIteratorIndex(0); $im->setIteratorIndex(0);
$im->cropImage($cutw, $cuth, $startx, $starty); $im->cropImage($cutw, $cuth, $startx, $starty);
if($this->imginfo['mime'] == 'image/png') { /* if($this->imginfo['mime'] == 'image/png') {
$prefix='png:'; $prefix='png:';
}elseif($this->imginfo['mime'] == 'image/gif') { }else*/if($this->imginfo['mime'] == 'image/gif') {
$prefix='png:'; $prefix='png:';
}else{ }else{
$prefix=''; $prefix='';
@@ -484,9 +486,9 @@ class image {
$im->stripImage(); //去除图片信息 $im->stripImage(); //去除图片信息
$im->setIteratorIndex(0); $im->setIteratorIndex(0);
$im->cropImage($this->param['thumbwidth'], $this->param['thumbheight'], $startx, $starty); $im->cropImage($this->param['thumbwidth'], $this->param['thumbheight'], $startx, $starty);
if($this->imginfo['mime'] == 'image/png') { /*if($this->imginfo['mime'] == 'image/png') {
$prefix='png:'; $prefix='png:';
}elseif($this->imginfo['mime'] == 'image/gif') { }else*/if($this->imginfo['mime'] == 'image/gif') {
$prefix='png:'; $prefix='png:';
}else{ }else{
$prefix=''; $prefix='';

View File

@@ -153,7 +153,7 @@ class template {
$template = preg_replace("/\<\!\-\-\{(.+?)\}\-\-\>/s", "{\\1}", $template); $template = preg_replace("/\<\!\-\-\{(.+?)\}\-\-\>/s", "{\\1}", $template);
// js的lang替换 // js的lang替换
$template = preg_replace_callback("/<script[^>]+?src=\"(.+?)\".*?>[\s\S]*?/is", array($this, 'parse_template_callback_javascript'), $template); $template = preg_replace_callback("/<script[^>]+?src=\"(.+?)\".*?>[\s\S]*?/is", array($this, 'parse_template_callback_javascript'), $template);
// 模版lang替换 // 模版lang替换
$template = preg_replace_callback("/\{lang\s+(.+?)\}/is", array($this, 'parse_template_callback_languagevar_1'), $template); $template = preg_replace_callback("/\{lang\s+(.+?)\}/is", array($this, 'parse_template_callback_languagevar_1'), $template);
// 模版__lang替换 // 模版__lang替换
$template = preg_replace_callback("/__lang\.(\w+)/i", array($this, 'parse_template_callback_languagevar_2'), $template); $template = preg_replace_callback("/__lang\.(\w+)/i", array($this, 'parse_template_callback_languagevar_2'), $template);
@@ -204,7 +204,7 @@ class template {
} }
function parse_template_callback_javascript($matches) { function parse_template_callback_javascript($matches) {
return $this -> loadjstemplate($matches); return $this -> loadjstemplate($matches);
} }
function parse_template_callback_hook($matches){ function parse_template_callback_hook($matches){
@@ -337,10 +337,11 @@ class template {
},$paramet); },$paramet);
$src =DZZ_ROOT.'/' . $parameter; $src =DZZ_ROOT.'/' . $parameter;
$src = preg_replace('/\?.*/i', '', $src); $src = preg_replace('/\?.*/i', '', $src);
$jsname = str_replace('.','_',basename($src,'.js')); //$jsname = str_replace('.','_',basename($src,'.js'));
$jsname = md5($src);
$content = @file_get_contents($src); $content = @file_get_contents($src);
$_G['template_paramet_replace_value'] = $paramet; $_G['template_paramet_replace_value'] = $paramet;
if(!$content){ if(!$content){
$return = preg_replace_callback("/<script([^>]+?)src=\"(.+?)\"(.*?)>[\s\S]*?/is",function($m){ $return = preg_replace_callback("/<script([^>]+?)src=\"(.+?)\"(.*?)>[\s\S]*?/is",function($m){
@@ -371,7 +372,8 @@ class template {
fwrite($fp, $jscontent); fwrite($fp, $jscontent);
fclose($fp); fclose($fp);
} }
$return = '<script type="text/javascript" src="'.$jscachefile.'"></script>';
$return = '<script type="text/javascript" src="'.$jscachefile.'"></script>';
$return .= preg_replace_callback("/<script([^>]+?)src=\"(.+?)\"(.*?)>[\s\S]*?/is",function($m){ $return .= preg_replace_callback("/<script([^>]+?)src=\"(.+?)\"(.*?)>[\s\S]*?/is",function($m){
return '<script'.$m[1].'src="'.getglobal('template_paramet_replace_value').'"'.$m[3].'>'; return '<script'.$m[1].'src="'.getglobal('template_paramet_replace_value').'"'.$m[3].'>';
},$matches[0]); },$matches[0]);
@@ -382,6 +384,7 @@ class template {
return '<script'.$m[1].'src="'.getglobal('template_paramet_replace_value').'"'.$m[3].'>'; return '<script'.$m[1].'src="'.getglobal('template_paramet_replace_value').'"'.$m[3].'>';
},$matches[0]); },$matches[0]);
unset($_G['template_paramet_replace_value']); unset($_G['template_paramet_replace_value']);
return $return; return $return;
} }
// 模版lang替换 // 模版lang替换

View File

@@ -82,7 +82,18 @@ class dzz_admincp
if(!$this->isfounder) { if(!$this->isfounder) {
$session = C::t('user')->fetch($this->adminuser['uid']); $session = C::t('user')->fetch($this->adminuser['uid']);
if($session && ($session['groupid']==1) ) { if($session && ($session['groupid']==1) ) {
$session = array_merge($session, (array)C::t('admincp_session')->fetch($this->adminuser['uid'], $session['groupid'])); if(!$s=C::t('admincp_session')->fetch($this->adminuser['uid'], $session['groupid'])){
$s=array(
'uid' => $this->adminuser['uid'],
'adminid' => $this->adminuser['adminid'],
'panel' => $this->adminuser['groupid'],
'ip' => $this->core->var['clientip'],
'dateline' => TIMESTAMP,
'errorcount' => 0,
);
C::t('admincp_session')->insert($s);
}
$session = array_merge($session, $s);
}else $session=array(); }else $session=array();
} else { } else {
$session = C::t('admincp_session')->fetch($this->adminuser['uid'], $this->panel); $session = C::t('admincp_session')->fetch($this->adminuser['uid'], $this->panel);

View File

@@ -106,6 +106,11 @@
if ($io = self::initIO($path)) return $io->getThumb($path, $thumbsign, $original, $returnurl, $create, $thumbtype, $extpramas); if ($io = self::initIO($path)) return $io->getThumb($path, $thumbsign, $original, $returnurl, $create, $thumbtype, $extpramas);
} }
function getPreviewThumb($path, $thumbsign, $original, $returnurl = false, $create = 0, $thumbtype = 1, $extpramas = array()){
$path = self::clean($path);
if ($io = self::initIO($path)) return $io->getPreviewThumb($path, $thumbsign, $original, $returnurl, $create, $thumbtype, $extpramas);
}
//获取文件信息 //获取文件信息
function getfilesinfo($path){ function getfilesinfo($path){
$path = self::clean($path); $path = self::clean($path);

View File

@@ -810,4 +810,8 @@ class dzz_mime{
public static function get_type($ext) { public static function get_type($ext) {
return isset(self::$mime_maps[$ext]) ? self::$mime_maps[$ext] : 'application/octet-stream'; return isset(self::$mime_maps[$ext]) ? self::$mime_maps[$ext] : 'application/octet-stream';
} }
public function get_ext($type){
$typearr = array_flip(self::$mime_maps);
return isset($typearr[$type]) ? $typearr[$type] : 'dzz';
}
} }

View File

@@ -13,14 +13,7 @@ class helper_form {
global $_G; global $_G;
if($allowget || ($_SERVER['REQUEST_METHOD'] == 'POST' && !empty($_GET['formhash']) && $_GET['formhash'] == formhash() && empty($_SERVER['HTTP_X_FLASH_VERSION']) && (empty($_SERVER['HTTP_REFERER']) || if($allowget || ($_SERVER['REQUEST_METHOD'] == 'POST' && !empty($_GET['formhash']) && $_GET['formhash'] == formhash() && empty($_SERVER['HTTP_X_FLASH_VERSION']) && (empty($_SERVER['HTTP_REFERER']) ||
preg_replace("/https?:\/\/([^\:\/]+).*/i", "\\1", $_SERVER['HTTP_REFERER']) == preg_replace("/([^\:]+).*/", "\\1", $_SERVER['HTTP_HOST'])))) { preg_replace("/https?:\/\/([^\:\/]+).*/i", "\\1", $_SERVER['HTTP_REFERER']) == preg_replace("/([^\:]+).*/", "\\1", $_SERVER['HTTP_HOST'])))) {
//if(checkperm('seccode')) {
if($secqaacheck && !check_secqaa($_GET['secanswer'], $_GET['sechash'])) {
showmessage('login_question_invalid');
}
if($seccodecheck && !check_seccode($_GET['seccodeverify'], $_GET['sechash'])) {
showmessage('submit_seccode_invalid');
}
//}
return TRUE; return TRUE;
} else { } else {
showmessage('submit_invalid'); showmessage('submit_invalid');

View File

@@ -885,7 +885,7 @@
else{ else{
$qcosimageexts = getglobal('config/qcosimage') ? explode(',',getglobal('config/qcosimage')):array('jpeg','jpg', 'png', 'gif', 'webp','bmp'); $qcosimageexts = getglobal('config/qcosimage') ? explode(',',getglobal('config/qcosimage')):array('jpeg','jpg', 'png', 'gif', 'webp','bmp');
if(!in_array($filedirextension,$qcosimageexts)){ if(!in_array($filedirextension,$qcosimageexts)){
return false; return io_dzz::createThumbByOriginal($path, $data,$width, $height ,$thumbtype, $original , $extraparams,$filesize);
} }
if($filedirextension == 'gif'){ if($filedirextension == 'gif'){
$thumbext = 'gif'; $thumbext = 'gif';
@@ -2403,21 +2403,7 @@
$relativepath = $data['dirname'] ? getstr($data['dirname']):''; $relativepath = $data['dirname'] ? getstr($data['dirname']):'';
$pfid = $data['pfid'] ? trim($data['pfid']):''; $pfid = $data['pfid'] ? trim($data['pfid']):'';
$level = 0; $level = 0;
/*if($pfid){
$folderdata = DB::result_first("select pathkey,level from %t where fid = %s",array('pichome_folder',$pfid));
$tfids = explode($data['appid'],$folderdata['pathkey']);
$level = $folderdata['level'];
$pfids = [];
foreach($tfids as $v){
$pfids[] = $v.$data['appid'];
}
//获取所有上级目录
$ppath = '';
foreach(DB::fetch_all("select fname from %t where fid in(%n)",array('pichome_folder',$pfids)) as $v){
$ppath .= '/'.$v;
}
$relativepath = str_replace($relativepath,'',$ppath);
}*/
//如果有不存在的目录则创建之 //如果有不存在的目录则创建之
$datas = array(); $datas = array();
@@ -2540,15 +2526,6 @@
$setarr['fsize'] = formatsize($setarr['size']); $setarr['fsize'] = formatsize($setarr['size']);
$setarr['ftype'] = getFileTypeName($setarr['type'], $setarr['ext']); $setarr['ftype'] = getFileTypeName($setarr['type'], $setarr['ext']);
$setarr['fdateline'] = dgmdate($setarr['dateline']/1000); $setarr['fdateline'] = dgmdate($setarr['dateline']/1000);
/* $thumbparams = ['rid' => $setarr['rid'], 'hash' => VERHASH, 'download' => 1,
'hasthumb' => 0, 'lastdate' => $setarr['lastdate']];
if(in_array($setarr['ext'],explode(',',getglobal('config/pichomecommimageext')))){
//缩略图地址
$setarr['icondata'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . Pencode($thumbparams, 0, '');
}else{
$setarr['icondata'] = geticonfromext($setarr['ext']);
}*/
$setarr['icondata'] = false; $setarr['icondata'] = false;
$setarr['width'] = ($setarr['width']) ? intval($setarr['width']):900; $setarr['width'] = ($setarr['width']) ? intval($setarr['width']):900;
$setarr['height'] = ($setarr['height']) ? intval($setarr['height']):900; $setarr['height'] = ($setarr['height']) ? intval($setarr['height']):900;
@@ -2556,7 +2533,7 @@
$setarr['path'] = $path; $setarr['path'] = $path;
$setarr['path'] = dzzencode($setarr['rid'], '', 0, 0); $setarr['path'] = dzzencode($setarr['rid'], '', 0, 0);
$setarr['aid'] = $attach['aid']; $setarr['aid'] = $attach['aid'];
$setarr['addnum'] = 1;
return $setarr; return $setarr;
} else { } else {
return array('error' => lang('data_error')); return array('error' => lang('data_error'));

View File

@@ -44,7 +44,7 @@ class io_dzz extends io_api
$arr = self::getPartInfo($content_range); $arr = self::getPartInfo($content_range);
// echo $pfid;die; // echo $pfid;die;
if ($arr['iscomplete']) { if ($arr['iscomplete']) {
if($relativePath){ if($relativePath && $relativePath != '.' && $relativePath != '..'){
$fdata = C::t('pichome_folder')->createfolerbypath($appid, $relativePath, $pfid); $fdata = C::t('pichome_folder')->createfolerbypath($appid, $relativePath, $pfid);
if (isset($fdata['error'])) { if (isset($fdata['error'])) {
return array('error' => $data['error']); return array('error' => $data['error']);
@@ -52,21 +52,40 @@ class io_dzz extends io_api
}elseif($pfid){ }elseif($pfid){
$folderdata = C::t('pichome_folder')->fetch($pfid); $folderdata = C::t('pichome_folder')->fetch($pfid);
$fdata = ['fid'=>$pfid,'level'=>$folderdata['level']]; $fdata = ['fid'=>$pfid,'level'=>$folderdata['level']];
}else{
$fdata = ['fid'=>'','level'=>0];
} }
}else{
if($relativePath && $relativePath != '.' && $relativePath != '..'){
$fdata = C::t('pichome_folder')->createfolerbypath($appid, $relativePath, $pfid);
if (isset($fdata['error'])) {
return array('error' => $data['error']);
}
}elseif($pfid){
$folderdata = C::t('pichome_folder')->fetch($pfid);
$fdata = ['fid'=>$pfid,'level'=>$folderdata['level']];
}else{
$fdata = ['fid'=>'','level'=>0];
}
} }
if (substr($filename, -7) == '.folder') { /* if (substr($filename, -7) == '.folder') {
if(!$relativePath){ if(!$relativePath){
$patharr = explode('/',$filename); $patharr = explode('/',$filename);
array_pop($patharr); array_pop($patharr);
$relativePath = ($patharr) ? implode('/',$patharr):''; $relativePath = ($patharr) ? implode('/',$patharr):'';
} }
$fdata = C::t('pichome_folder')->createfolerbypath($appid, $relativePath, $pfid); $fdata = C::t('pichome_folder')->createfolerbypath($appid, $relativePath, $pfid);
var_dump($fdata);
die;
if (isset($fdata['error'])) { if (isset($fdata['error'])) {
return array('error' => $data['error']); return array('error' => $data['error']);
} }
return $fdata; return $fdata;
} }*/
$arr['flag'] = $appid . '_' . $relativePath; $arr['flag'] = $appid . '_' . $relativePath;
//获取文件内容 //获取文件内容
$fileContent = ''; $fileContent = '';
@@ -229,7 +248,7 @@ class io_dzz extends io_api
} }
} }
} }
private static function saveCache($path, $str) private static function saveCache($path, $str)
{ {
global $_G; global $_G;
@@ -244,10 +263,10 @@ class io_dzz extends io_api
), false, true); ), false, true);
} }
} }
private static function deleteCache($path) private static function deleteCache($path)
{ {
$cachekey = 'dzz_upload_' . md5($path); $cachekey = 'dzz_upload_' . md5($path);
if(memory('check')){ if(memory('check')){
memory('rm',$cachekey); memory('rm',$cachekey);
@@ -323,44 +342,106 @@ class io_dzz extends io_api
global $_G; global $_G;
//如果当前库有该文件 //如果当前库有该文件
if ($rid = DB::result_first("select rid from %t where path = %d and appid = %s ", array('pichome_resources_attr', $attach['aid'], $appid))) { if ($rid = DB::result_first("select rid from %t where path = %s and appid = %s ", array('pichome_resources_attr', $attach['aid'], $appid))) {
$resourcesdata = C::t('pichome_resources')->fetch($rid); $resourcesdata = C::t('pichome_resources')->fetch($rid);
$nfids = explode(',', $resourcesdata['fids']); if($resourcesdata['isdelete']){
if (!in_array($fid, $nfids)) { $rsetarr = [
$nfids[] = $fid; 'lastdate' => TIMESTAMP * 1000,
} 'appid' => $appid,
$icoarr = [ 'uid' => $_G['uid'],
'lastdate' => TIMESTAMP * 1000, 'username' => $_G['username'],
'appid' => $appid, 'apptype' => 1,
'uid'=>$_G['uid'], 'size' => $resourcesdata['size'],
'username'=>$_G['username'], 'type' => $resourcesdata['type'],
'apptype' => 3, 'ext' => $resourcesdata['ext'],
'mtime' => TIMESTAMP * 1000, 'mtime' => TIMESTAMP * 1000,
'dateline' => TIMESTAMP * 1000, 'dateline' => TIMESTAMP * 1000,
'btime' => TIMESTAMP * 1000, 'btime' => TIMESTAMP * 1000,
'lastdate' => TIMESTAMP, 'width' => $resourcesdata['width'],
'name' => $resourcesdata['name'], 'height' => $resourcesdata['height'],
'fids' => $nfids ? implode(',', $nfids) : '', 'lastdate' => TIMESTAMP,
]; 'level' => isset($folderdata['level']) ? $folderdata['level'] : 0,
'name' => $resourcesdata['name'],
'fids' => $folderdata['fid'] ? $folderdata['fid'] : ''
];
if (C::t('pichome_resources')->update($rid, $icoarr)) {//插入主表 if ($rsetarr['rid'] = C::t('pichome_resources')->insert_data($rsetarr)) {//插入主表
//目录数据 //获取附属表数据
if ($fid) { $attrdata = C::t('pichome_resources_attr')->fetch($rid);
$frsetarr = ['appid' => $appid, 'rid' => $icoarr['rid'], 'fid' => $fid]; $attrdata['rid'] = $rsetarr['rid'];
C::t('pichome_folderresources')->insert($frsetarr); $attrdata['appid'] = $appid;
C::t('pichome_folder')->add_filenum_by_fid($fid, 1); $attrdata['searchval'] = $rsetarr['name'];
C::t('attachment')->addcopy_by_aid($attrdata['path']);//增加图片使用数
C::t('pichome_resources_attr')->insert($attrdata);
//目录数据
if ($folderdata['fid']) {
$frsetarr = ['appid' => $appid, 'rid' => $rsetarr['rid'], 'fid' => $folderdata['fid']];
C::t('pichome_folderresources')->insert($frsetarr);
//C::t('pichome_folder')->add_filenum_by_fid($folderdata['fid'], 1);
}
//缩略图数据
$thumbrecorddata = C::t('thumb_record')->fetch($rid);
$thumbrecorddata['rid'] = $rsetarr['rid'];
C::t('thumb_record')->insert_data($thumbrecorddata);
//颜色数据
foreach (DB::fetch_all("select * from %t where rid = %s", array('pichome_palette', $rid)) as $v) {
$v['rid'] = $rsetarr['rid'];
unset($v['id']);
C::t('pichome_palette')->insert($v);
}
C::t('pichome_vapp')->addcopy_by_appid($appid);
$data = C::t('pichome_resources')->fetch_by_rid($rsetarr['rid']);
$data['addnum'] = 1;
$data['folder'] = C::t('pichome_folder')->fetch_allfolder_by_fid($folderdata['fid']);
return $data;
}else{
return array('error' => lang('data_error'));
} }
$data = C::t('pichome_resources')->fetch_by_rid($rid);
$data['folder'] = C::t('pichome_folder')->fetch_allfolder_by_fid($fid);
return $data;
}else{ }else{
return array('error' => lang('data_error')); $nfids = explode(',', $resourcesdata['fids']);
} $iscurrentfolder = 1;
if (!in_array($fid, $nfids)) {
$iscurrentfolder = 0;
$nfids[] = $fid;
}
$icoarr = [
'lastdate' => TIMESTAMP * 1000,
'appid' => $appid,
'uid'=>$_G['uid'],
'username'=>$_G['username'],
'apptype' => 3,
'mtime' => TIMESTAMP * 1000,
'dateline' => TIMESTAMP * 1000,
'btime' => TIMESTAMP * 1000,
'lastdate' => TIMESTAMP,
'name' => $resourcesdata['name'],
'fids' => $nfids ? implode(',', $nfids) : '',
];
if (C::t('pichome_resources')->update($rid, $icoarr)) {//插入主表
//目录数据
if (!$iscurrentfolder && $fid) {
$frsetarr = ['appid' => $appid, 'rid' => $rid, 'fid' => $fid];;
C::t('pichome_folderresources')->insert($frsetarr);
// C::t('pichome_folder')->add_filenum_by_fid($fid, 1);
}
$data = C::t('pichome_resources')->fetch_by_rid($rid);
$data['addnum'] = ($iscurrentfolder) ? 0:1;
$data['onlyfolderadd'] = 1;
$data['folder'] = C::t('pichome_folder')->fetch_allfolder_by_fid($fid);
return $data;
}else{
return array('error' => lang('data_error'));
}
}
} }
elseif ($rid = DB::result_first("select rid from %t where path = %d ", array('pichome_resources_attr',$attach['aid']))) {//如果当前库没有该文件,但其它库有 elseif ($rid = DB::result_first("select rid from %t where path = %s ", array('pichome_resources_attr',$attach['aid']))) {//如果当前库没有该文件,但其它库有
//获取原文件基本数据 //获取原文件基本数据
$resourcesdata = C::t('pichome_resources')->fetch($rid); $resourcesdata = C::t('pichome_resources')->fetch($rid);
$rsetarr = [ $rsetarr = [
@@ -412,6 +493,7 @@ class io_dzz extends io_api
C::t('pichome_vapp')->addcopy_by_appid($appid); C::t('pichome_vapp')->addcopy_by_appid($appid);
$data = C::t('pichome_resources')->fetch_by_rid($rsetarr['rid']); $data = C::t('pichome_resources')->fetch_by_rid($rsetarr['rid']);
$data['folder'] = C::t('pichome_folder')->fetch_allfolder_by_fid($folderdata['fid']); $data['folder'] = C::t('pichome_folder')->fetch_allfolder_by_fid($folderdata['fid']);
$data['addnum'] = 1;
return $data; return $data;
}else{ }else{
return array('error' => lang('data_error')); return array('error' => lang('data_error'));
@@ -473,6 +555,7 @@ class io_dzz extends io_api
$setarr['aid'] = $attach['aid']; $setarr['aid'] = $attach['aid'];
$setarr['dpath'] = dzzencode($setarr['rid'], '', 0, 0); $setarr['dpath'] = dzzencode($setarr['rid'], '', 0, 0);
$setarr['realpath'] = IO::getStream('attach::'.$attach['aid']); $setarr['realpath'] = IO::getStream('attach::'.$attach['aid']);
$setarr['addnum'] = 1;
return $setarr; return $setarr;
} else { } else {
return array('error' => lang('data_error')); return array('error' => lang('data_error'));
@@ -511,6 +594,7 @@ class io_dzz extends io_api
public function getMeta($path, $getimagedata = 0) public function getMeta($path, $getimagedata = 0)
{ {
if(strpos($path, 'attach::') === 0){ if(strpos($path, 'attach::') === 0){
global $Types;
$attachment = C::t('attachment')->fetch(intval(str_replace('attach::', '', $path))); $attachment = C::t('attachment')->fetch(intval(str_replace('attach::', '', $path)));
$bz = io_remote::getBzByRemoteid($attachment['remoteid']); $bz = io_remote::getBzByRemoteid($attachment['remoteid']);
$data = array( $data = array(
@@ -523,12 +607,20 @@ class io_dzz extends io_api
'path'=>$bz.$attachment['attachment'], 'path'=>$bz.$attachment['attachment'],
'aid'=>$attachment['aid'] 'aid'=>$attachment['aid']
); );
return $data; $imginfo = array();
if ($getimagedata && (in_array($attachment['filetype'], $Types['commonimage']) || in_array($attachment['filetype'], $Types['image']))) {
//获取图片信息,以取得宽高
$imgpath =IO::getStream($path);
$imgdata = @getimagesize($imgpath);
$imginfo['width'] = isset($imgdata[0]) ? $imgdata[0] : 0;
$imginfo['height'] = isset($imgdata[1]) ? $imgdata[1] : 0;
}
return array_merge($data, $imginfo);
}elseif(preg_match('/^\w{32}$/i',$path)){ }elseif(preg_match('/^\w{32}$/i',$path)){
$data = C::t('pichome_resources')->fetch_data_by_rid($path); $data = C::t('pichome_resources')->fetch_data_by_rid($path);
return $data; return $data;
} else { } else {
$path = $this->parsePath($path); // $path = $this->parsePath($path);
global $Types; global $Types;
$pathinfo = pathinfo($path); $pathinfo = pathinfo($path);
$ext = strtolower($pathinfo['extension']); $ext = strtolower($pathinfo['extension']);
@@ -655,27 +747,21 @@ class io_dzz extends io_api
$attach = C::t('attachment')->fetch(intval(str_replace('attach::', '', $path))); $attach = C::t('attachment')->fetch(intval(str_replace('attach::', '', $path)));
if($attach['remote'] > 0){ if($attach['remote'] > 0){
$bz = io_remote::getBzByRemoteid($attach['remote']); $bz = io_remote::getBzByRemoteid($attach['remote']);
return IO::getFileUri($bz.$attach['attachment']); $uri = IO::getFileUri($bz.$attach['attachment']);
}else{ }else{
return getglobal('setting/attachurl') . $attach['attachment']; $uri = getglobal('setting/attachurl') . $attach['attachment'];
} }
}elseif(preg_match('/^\w{32}$/',$path)){ }elseif(preg_match('/^\w{32}$/',$path)){
$resources = C::t('resources')->fetch_data_by_rid($path); $resources = C::t('resources')->fetch_data_by_rid($path);
return IO::getFileUri($resources['path']); $uri = IO::getFileUri($resources['path']);
}elseif(strpos($path, 'dzz::') === 0){ }elseif(strpos($path, 'dzz::') === 0){
$path = str_replace('dzz::','',$path); $path = str_replace('dzz::','',$path);
return getglobal('setting/attachurl') . $path; $uri = getglobal('setting/attachurl') . $path;
}else{ }else{
$path = $this->parsePath($path); $uri = $path;
$localpath = BS . $path;
if(is_file($localpath)){
return $localpath;
}else{
return $path;
}
} }
return preg_match( '/^http(s)?:\\/\\/.+/',$uri) ? $uri:getglobal('siteurl') .$uri;
} }
//获取文件的真实地址 //获取文件的真实地址
@@ -695,19 +781,11 @@ class io_dzz extends io_api
$path = str_replace('dzz::','',$path); $path = str_replace('dzz::','',$path);
return getglobal('setting/attachdir') . $path; return getglobal('setting/attachdir') . $path;
}elseif(preg_match('/^\w{32}$/',$path)){ }elseif(preg_match('/^\w{32}$/',$path)){
$resources = C::t('resources')->fetch_data_by_rid($path); $resources = C::t('pichome_resources')->fetch_data_by_rid($path);
return IO::getStream($resources['path']); return IO::getStream($resources['path']);
}else{ }else{
$path = $this->parsePath($path); return $path;
$localpath = BS . $path;
if(is_file(getglobal('setting/attachdir') . $path)){
return getglobal('setting/attachdir') . $path;
}
elseif(is_file($localpath)){
return $localpath;
}else{
return $path;
}
} }
} }
@@ -1012,8 +1090,10 @@ class io_dzz extends io_api
$extraparams['istmp'] = 1; $extraparams['istmp'] = 1;
$extraparams['nomark'] = 1; $extraparams['nomark'] = 1;
$thumbpath = IO::createThumbByOriginal($filepath, $data, $width, $height, $thumbtype, 0, $extraparams); $thumbpath = IO::createThumbByOriginal($filepath, $data, $width, $height, $thumbtype, 0, $extraparams);
$bz = io_remote::getBzByRemoteid($defaultspace['remoteid']);
$thumbpath = $bz.$thumbpath;
if($thumbpath){ if($thumbpath){
$img = IO::getFileuri($thumbpath); $img = IO::getFileUri($thumbpath);
if ($returnurl) return $img; if ($returnurl) return $img;
else IO::output_thumb($img); else IO::output_thumb($img);
}else{ }else{
@@ -1274,6 +1354,142 @@ class io_dzz extends io_api
if ($returnurl) return $img; if ($returnurl) return $img;
else IO::output_thumb($img); else IO::output_thumb($img);
} }
public function getPreviewThumb($rdata, $thumbsign='', $original = false, $returnurl = false, $create = 0, $thumbtype = 1, $extraparams = array(), $filesize = 0)
{
global $_G;
if (!$data = IO::getMeta('attach::'.$rdata['aid'])) return false;
$filesize = $data['size'];
$filepath = $data['path'];
$wp = $_G['setting']['IsWatermarkstatus'] ? $_G['setting']['watermarkstatus']:'';
$wt = $_G['setting']['IsWatermarkstatus'] ? $_G['setting']['watermarktype']:'';
$wcontent = $_G['setting']['IsWatermarkstatus'] ? ($_G['setting']['watermarktype'] == 'png' ? $_G['setting']['waterimg']:$extraparams['position_text']):'';
//水印图md5或者水印文字
$watermd5 = '';
if($extraparams['watermarkstatus']){
$watermd5 = !$extraparams['watermarktext'] ? $_G['setting']['watermd5']:($extraparams['watermarktext'] ? $extraparams['watermarktext']:$_G['setting']['watermarktext']);
}
//水印参数处理
$extraparams['position_text'] = $extraparams['position_text'] ? $extraparams['position_text']:$wcontent;
$extraparams['position'] = $extraparams['position'] ? $extraparams['position']:$wp;
$extraparams['watermarkstatus'] = $extraparams['watermarkstatus'] ?$extraparams['watermarkstatus']:$_G['setting']['IsWatermarkstatus'];
$extraparams['watermarktype'] = $extraparams['watermarktype'] ?$extraparams['watermarktype']:$wt;
$extraparams['watermarktext'] = $extraparams['watermarktext'] ? $extraparams['watermarktext']:'';
//宽高值获取原图默认为0
$data['thumbsign'] = $thumbsign;
$defaultspace = $_G['setting']['defaultspacesetting'];
if($thumbsign){
$width = $_G['setting']['thumbsize'][$thumbsign]['width'];
$height = $_G['setting']['thumbsize'][$thumbsign]['height'];
}else{
$width = $height = 0;
}
$thumbpath = '';
if($thumbsign == 'small' && $rdata['sstatus']){//小图
$thumbpath = $rdata['spath'];
}elseif($thumbsign == 'large' && $rdata['lstatus']){//大图
$thumbpath = $rdata['lpath'];
}
// //尝试从缓存表获取数据
if(!$thumbpath){
$thumbarr = [
'width'=>$width,
'height'=>$height,
'aid'=>$data['aid'],
'thumbtype'=>$thumbtype,
'watermd5'=>$watermd5,
];
$cachedata = C::t('thumb_cache')->fetch_data_by_thumbparam($thumbarr);
if($cachedata){
$bz = io_remote::getBzByRemoteid($cachedata['remoteid']);
$thumbpath = $bz.$cachedata['path'];
if($thumbsign == 'small'){
$thumbarr = [
'spath'=>$thumbpath,
'sstatus'=>1,
'scacheid'=>$cachedata['id'],
'sremoteid'=>$cachedata['remoteid'],
'sdateline'=>TIMESTAMP,
'schk'=>0,
'schktimes'=>0
];
}elseif($thumbsign == 'large'){
$thumbarr = [
'lpath'=>$thumbpath,
'lstatus'=>1,
'lcacheid'=>$cachedata['id'],
'lremoteid'=>$cachedata['remoteid'],
'ldateline'=>TIMESTAMP,
'lchk'=>0,
'lchktimes'=>0
];
}
//插入缩略图记录表
C::t('thumb_preview')->update($rdata['id'], $thumbarr);
} else{
//如果没有强制生成根据查询结果返回
if (!$create) {
$thumbpath = IO::getFileUri($rdata['opath']);
} else {
//创建缩略图
$cthumbpath = IO::createThumbByOriginal($filepath, $data, $width, $height, $thumbtype, $original, $extraparams, $filesize);
$bz = io_remote::getBzByRemoteid($defaultspace['remoteid']);
$thumbpath = $bz.$cthumbpath;
if($cthumbpath){
$cacheid = '';
if($rdata['aid']){
$thumbarr = [
'width'=>$width,
'height'=>$height,
'aid'=>$rdata['aid'],
'thumbtype'=>$thumbtype,
'watermd5'=>$watermd5,
'path'=>$cthumbpath,
'remoteid'=>$defaultspace['did']
];
$cacheid = C::t('thumb_cache')->insertdata($thumbarr);
}
if($data['rid']){
$thumbdataarr = [];
if($thumbsign == 'small'){
$thumbdataarr = [
'spath'=>$thumbpath,
'sstatus'=>1,
'schk'=>0,
'sremoteid'=>$defaultspace['did'],
'scacheid'=>$cacheid
];
}elseif($thumbsign == 'large'){
$thumbdataarr = [
'lpath'=>$thumbpath,
'lstatus'=>1,
'lchk'=>0,
'lremoteid'=>$defaultspace['did'],
'lcacheid'=>$cacheid
];
}
C::t('thumb_preview')->update($rdata['id'],$thumbdataarr);
}
}
}
}
}
if ($thumbpath) {
$img = IO::getFileUri($thumbpath);
} else{
$img = geticonfromext($data['ext'], $data['type']);
}
if ($returnurl) return $img;
else IO::output_thumb($img);
}
//过滤文件名称 //过滤文件名称
public function name_filter($name) public function name_filter($name)

View File

@@ -20,10 +20,19 @@ class memory_driver_memcache
$connect = @$this->obj->connect($config['server'], $config['port']); $connect = @$this->obj->connect($config['server'], $config['port']);
} }
$this->enable = $connect ? true : false; $this->enable = $this->checkEnable($connect);
} }
} }
public function checkEnable($connect){
if($connect){
$this->set('_check_','_check_',10);
if($this->get('_check_')=='_check_'){
return true;
}
$this->rm('_check_');
}
return false;
}
public function get($key) { public function get($key) {
return $this->obj->get($key); return $this->obj->get($key);
} }

View File

@@ -12,9 +12,22 @@ class memory_driver_memcached
public function init($config) { public function init($config) {
if(!empty($config['server'])) { if(!empty($config['server'])) {
$this->obj = new Memcached(); $this->obj = new Memcached();
$connect = $this->connectd($config['server'], $config['port']); $connect = $this->connectd($config['server'], $config['port']);
$this->enable = $connect ? true : false; $this->enable=$this->checkEnable($connect);
} }
}
public function checkEnable($connect){
if($connect){
$this->set('_check_','_check_',10);
if($this->get('_check_')=='_check_'){
return true;
}
$this->rm('_check_');
}
return false;
} }
public function connectd($host , $port){ public function connectd($host , $port){
$servers = $this->obj->getServerList(); $servers = $this->obj->getServerList();

View File

@@ -18,7 +18,7 @@ class memory_driver_redis
} catch (RedisException $e) { } catch (RedisException $e) {
echo $e; echo $e;
} }
$this->enable = $connect ? true : false; $this->enable = $this->checkEnable($connect);
if($this->enable) { if($this->enable) {
if($config['requirepass']) { if($config['requirepass']) {
$this->obj->auth($config['requirepass']); $this->obj->auth($config['requirepass']);
@@ -27,7 +27,16 @@ class memory_driver_redis
} }
} }
} }
public function checkEnable($connect){
if($connect){
$this->set('_check_','_check_',10);
if($this->get('_check_')=='_check_'){
return true;
}
$this->rm('_check_');
}
return false;
}
function &instance() { function &instance() {
static $object; static $object;
if(empty($object)) { if(empty($object)) {

View File

@@ -0,0 +1,20 @@
<?php
if (!defined('IN_OAOOA')) {
exit('Access Denied');
}
class table_ai_cron extends dzz_table
{
public function __construct()
{
$this->_table = 'ai_cron';
$this->_pk = 'id';
parent::__construct();
}
public function insertData($setarr){
return parent::insert($setarr,1);
}
}

View File

@@ -0,0 +1,38 @@
<?php
if (!defined('IN_OAOOA')) {
exit('Access Denied');
}
class table_ai_imageparse extends dzz_table
{
public function __construct()
{
$this->_table = 'ai_imageparse';
$this->_pk = 'id';
parent::__construct();
}
public function insertData($setarr)
{
$setarr['dateline'] = TIMESTAMP;
//如果查询到已经有数据,则不插入
if ($data = DB::fetch_first("select * from %t where aid = %d and rid=%s and gettype = %d and tplid = %d and aikey = %s",
[$this->_table, $setarr['aid'], $setarr['rid'], $setarr['gettype'],$setarr['tplid'],$setarr['aikey']])) {
if($data['isget'] && $data['data']) return ['id'=>$data['id'],'isget'=>$data['isget'],'data'=>$data['data']];
else return ['id'=>$data['id']];
} else {
if($id = parent::insert($setarr,1)){
return ['id'=>$id];
}
}
}
public function deleteByRid($rid){
return DB::delete($this->_table,"rid='$rid'");
}
public function deleteByAid($aid){
return DB::delete($this->_table,'aid='.$aid);
}
}

View File

@@ -0,0 +1,33 @@
<?php
if (!defined('IN_OAOOA')) {
exit('Access Denied');
}
class table_ai_task extends dzz_table
{
public function __construct()
{
$this->_table = 'ai_task';
$this->_pk = 'id';
parent::__construct();
}
public function insertData($setarr){
if(DB::result_first("select id from %t where rid = %s and gettype = %d and tplid = %d and aikey=%s",
[$this->_table,$setarr['rid'],$setarr['gettype'],$setarr['tplid'],$setarr['aikey']])){
return true;
}else{
return parent::insert($setarr,1);
}
}
public function fetchNumByAppid($appid){
$data = [];
foreach(DB::fetch_all("select count(id) as num,gettype from %t where appid = %s group by gettype",[$this->_table,$appid]) as $v){
$data[$v['gettype']] = $v['num'];
}
return $data;
}
}

View File

@@ -45,7 +45,7 @@ class table_cache extends dzz_table
public function fetch_cachedata_by_cachename($cachename, $expiretime = 600) public function fetch_cachedata_by_cachename($cachename, $expiretime = 600)
{ {
if (memory('check')) { if (memory('check')) {
$data = ($data = memory('get', $cachename)) === false ? array() : unserialize($data['cachevalue']); $data = ($data = memory('get', $cachename)) === false ? array() : (unserialize($data['cachevalue']) ? unserialize($data['cachevalue']):$data['cachevalue']);
} else { } else {
$cachedata = parent::fetch($cachename); $cachedata = parent::fetch($cachename);

View File

@@ -110,7 +110,7 @@ class table_connect_storage extends dzz_table
if (DB::result_first("select COUNT(*) from %t where cloudname=%s ", array($this->_table, $cloudname))) { if (DB::result_first("select COUNT(*) from %t where cloudname=%s ", array($this->_table, $cloudname))) {
$cloudname = preg_replace("/\(\d+\)/i", '', $cloudname) . '(' . ($i + 1) . ')'; $cloudname = preg_replace("/\(\d+\)/i", '', $cloudname) . '(' . ($i + 1) . ')';
$i += 1; $i += 1;
return self::getFolderName($cloudname); return self::getcloudname($cloudname);
} else { } else {
return $cloudname; return $cloudname;
} }

View File

@@ -14,7 +14,7 @@ if (!defined('IN_OAOOA')) {
class table_form_setting extends dzz_table class table_form_setting extends dzz_table
{ {
private $type = array('input','time', 'textarea','date', 'timerange', 'select', 'multiselect', 'user', 'label', 'tagcat', 'grade', 'color', 'link'); private $type = array('input','time','fulltext', 'textarea','date', 'timerange', 'select', 'multiselect', 'user', 'label', 'tagcat', 'grade', 'color', 'link');
public function __construct() public function __construct()
{ {
@@ -46,7 +46,8 @@ class table_form_setting extends dzz_table
$data['extra']['maxdate'] = dgmdate($data['extra']['maxdate'], $data['extra']['dateformat']); $data['extra']['maxdate'] = dgmdate($data['extra']['maxdate'], $data['extra']['dateformat']);
} }
$data['labelname'] = lang('fs_' . $data['flag']) != 'fs_' . $data['flag'] ? lang('fs_' . $data['flag']) : $data['labelname']; // $data['labelname'] = lang('fs_' . $data['flag']) != 'fs_' . $data['flag'] ? lang('fs_' . $data['flag']) : $data['labelname'];
Hook::listen('fileddataFilter',$data);
return $data; return $data;
} }

View File

@@ -24,12 +24,19 @@ class table_form_setting_filedcat extends dzz_table
$data=parent::fetch($id); $data=parent::fetch($id);
return $data; return $data;
} }
public function updateById($ids,$setarr){
if(!is_array($ids)) $ids = (array)$ids;
Hook::listen('filedcatupdateBefore',$setarr,$ids);
if($setarr) parent::update($ids,$setarr);
return true;
}
public function fetch_all_by_tabgroupid($tabgroupid){ public function fetch_all_by_tabgroupid($tabgroupid){
$data=array(); $data=array();
foreach(DB::fetch_all("select * from %t where tabgroupid = %d order by disp",array($this->_table,$tabgroupid)) as $value){ foreach(DB::fetch_all("select * from %t where tabgroupid = %d order by disp",array($this->_table,$tabgroupid)) as $value){
$data[$value['id']]=$value; $data[$value['id']]=$value;
} }
Hook::listen("filedcatFilter",$data);
return $data; return $data;
} }
public function delete_by_id($id,$field){ public function delete_by_id($id,$field){

View File

@@ -0,0 +1,224 @@
<?php
if(!defined('IN_OAOOA')) {
exit('Access Denied');
}
class table_my_file extends dzz_table
{
public function __construct()
{
$this->_table = 'my_file';
$this->_pk = 'id';
parent::__construct();
}
public function delete_by_id($id){
$data = parent::fetch($id);
if(parent::delete($id)){
C::t('attachment')->delete_by_aid($aid);
}
return true;
}
public function insert_by_fileurl($setarr){
global $_G;
//获取文件后缀
$filedirpathinfo = pathinfo($setarr['fileurl']);
$filedirextensionarr = explode('?', $filedirpathinfo['extension']);
$ext = strtolower($filedirextensionarr[0]);
//缓存文件位置
$cachepath = 'data/attachment/cache/'.md5($_G['uid'].$setarr['fileurl'].$setarr['type']).'.'.$ext;
//将文件写入到缓冲区
if($this->writeFileurlToFile($setarr['fileurl'],$cachepath)){
$md5 = md5_file($cachepath);
$filesize = filesize($cachepath);
if(!$attachment = C::t('attachment')->fetch_by_md5($md5)){
$filepath = $this->getPath($ext ? ('.' . $ext) : '', 'dzz');
$remoteid = 0;
if($_G['setting']['defaultspace']){
$defaultspace = $_G['setting']['defaultspace'];
$bz = $defaultspace['bz'].':'.$defaultspace['did'].':';
$remoteid = $defaultspace['did'];
}else{
$bz = 'dzz::';
}
$savepath = $bz.$filepath;
//移动文件成功后插入attachment表
if(IO::moveThumbFile($savepath,$cachepath)){
@unlink($cachepath);
$attachment = [
'filename'=>$setarr['name'].'.'.$ext,
'filetype'=>$ext,
'filesize'=>$filesize,
'attachment'=>$filepath,
'remote'=>$remoteid,
'md5'=>$md5,
'dateline'=>TIMESTAMP
];
if (!$attachment['aid'] = C::t('attachment')->insert($attachment, 1)){
IO::Delete($savepath);
return false;
}
}else{
return false;
}
}
else{
return false;
}
}else{
return false;
}
$filearr = [
'uid'=>$_G['uid'],
'username'=>$_G['username'],
'source'=>$setarr['type'],
'aid'=>$attachment['aid'],
'filetype'=>$attachment['filetype'],
'filename'=>$attachment['filename'],
'dateline'=>TIMESTAMP
];
if($id = DB::result_first("select id from %t where uid = %d and aid = %d",array($this->_table,$filearr['uid'],$filearr['aid']))){
parent::update($id,$filearr);
return $id;
}
if($id = parent::insert($filearr,1)){
C::t('attachment')->addcopy_by_aid($attachment['aid']);
return $id;
}else{
return false;
}
}
public function insert_by_base64data($setarr){
global $_G;
//获取文件后缀
if(preg_match("/data:(.+?);base64,/i",$setarr['base64'],$matches)){
$mime=$matches[1];
}
$ext = dzz_mime::get_ext($mime);
$base64Data = preg_replace("/data:(.+?);base64,/i",'',$setarr['base64']);
$decodedData = base64_decode($base64Data);
$md5 = md5($decodedData);
$filesize = fix_integer_overflow(strlen($decodedData));
if(!$attachment = C::t('attachment')->fetch_by_md5($md5)){
//缓存文件位置
$cachepath = 'data/attachment/cache/'.md5($_G['uid'].$md5.$setarr['type']).'.'.$ext;
//将文件写入到缓冲区
if($this->writeContentToFile($decodedData,$cachepath)){
$filepath = $this->getPath($ext ? ('.' . $ext) : '', 'dzz');
$remoteid = 0;
if($_G['setting']['defaultspace']){
$defaultspace = $_G['setting']['defaultspace'];
$bz = $defaultspace['bz'].':'.$defaultspace['did'].':';
$remoteid = $defaultspace['did'];
}else{
$bz = 'dzz::';
}
$savepath = $bz.$filepath;
//移动文件成功后插入attachment表
if(IO::moveThumbFile($savepath,$cachepath)){
@unlink($cachepath);
$attachment = [
'filename'=>$setarr['name'],
'filetype'=>$ext,
'filesize'=>$filesize,
'attachment'=>$filepath,
'remote'=>$remoteid,
'md5'=>$md5,
'dateline'=>TIMESTAMP
];
if (!$attachment['aid'] = C::t('attachment')->insert($attachment, 1)){
IO::Delete($savepath);
return false;
}
}else{
return false;
}
}
else{
return false;
}
}
$filearr = [
'uid'=>$_G['uid'],
'username'=>$_G['username'],
'source'=>$setarr['type'],
'aid'=>$attachment['aid'],
'filetype'=>$attachment['filetype'],
'filename'=>$attachment['filename'],
'dateline'=>TIMESTAMP
];
if($id = DB::result_first("select id from %t where uid = %d and aid = %d",array($this->_table,$filearr['uid'],$filearr['aid']))){
parent::update($id,$filearr);
return $id;
}
if($id = parent::insert($filearr,1)){
C::t('attachment')->addcopy_by_aid($attachment['aid']);
return $id;
}else{
return false;
}
}
public function getPath($ext, $dir = 'dzz')
{
global $_G;
if ($ext && in_array(trim($ext, '.'), $_G['setting']['unRunExts'])) {
$ext = '.dzz';
}
$subdir = $subdir1 = $subdir2 = '';
$subdir1 = date('Ym');
$subdir2 = date('d');
$subdir = $subdir1 . '/' . $subdir2 . '/';
$target1 = $dir . '/' . $subdir . 'index.html';
$target = $dir . '/' . $subdir;
$target_attach = $target1;
$targetpath = $_G['setting']['attachdir'] . dirname($target_attach);
dmkdir($targetpath);
return $target . date('His') . '' . strtolower(random(16)) . $ext;
}
public function writeContentToFile($filecontent,$filepath){
$filedir = dirname($filepath);
dmkdir($filedir);
$handle = fopen($filepath, 'w+');
$chunkSize = 8192; // 每次读取的块大小
$offset = 0;
while ($offset < strlen($filecontent)) {
$chunk = substr($filecontent, $offset, $chunkSize);
fwrite($handle, $chunk);
$offset += strlen($chunk);
}
fclose($handle);
if(is_file($filepath)){
return true;
}else{
return false;
}
}
public function writeFileurlToFile($path, $filepath)
{
$filedir = dirname($filepath);
dmkdir($filedir);
$handle = fopen($path, 'rb');
$succ = 1;
while (!feof($handle)) {
$fileContent = fread($handle, 8192);
if (file_put_contents($filepath, $fileContent, FILE_APPEND) === false) {
$succ = 0;
}
unset($fileContent);
}
fclose($handle);
if (!$succ) {
@unlink($filepath);
return false;
}
return $filepath;
}
}

View File

@@ -43,13 +43,19 @@ class table_pichome_banner extends dzz_table
} }
//删除栏目 //删除栏目
public function delete_by_id($id){ public function delete_by_id($id){
if(!$bdata = parent::fetch($id)) return false; if(!$bdata = parent::fetch($id)) return 0;
foreach(DB::fetch_all("select id,bdata from %t where pathkey like %s",[$this->_table,str_replace('_','\_',$bdata['pathkey']).'%']) as $v){ $i=0;
if(C::t('pichome_route')->delete_by_abid($v['bdata'],1)){ //删除上级时同时删除所有下级
parent::delete($v['id']); $i=0;
} foreach(DB::fetch_all("select id,bdata,btype from %t where pathkey like %s",[$this->_table,str_replace('_','\_',$bdata['pathkey']).'%']) as $v){
if( parent::delete($v['id'])){
$i++;
if(!DB::result_first("select COUNT(*) from %t where bdata=%s and btype = %d",array($this->_table,$bdata['bdata'],$bdata['btype']))){
C::t('pichome_route')->delete_by_abid($v['bdata'],1,$bdata['btype']);
}
}
} }
return true; return $i;
} }
public function fetch_bannerbasic_by_bid($bid){ public function fetch_bannerbasic_by_bid($bid){
if(!$bannerdata = parent::fetch($bid)) return false; if(!$bannerdata = parent::fetch($bid)) return false;

View File

@@ -45,6 +45,7 @@ class table_pichome_folder extends dzz_table
$return = ['fid'=>$fid,'level'=>$level,'pathkey'=>$setarr['pathkey']]; $return = ['fid'=>$fid,'level'=>$level,'pathkey'=>$setarr['pathkey']];
} }
// } // }
Hook::listen('folderdataFilter',$return,true);
return $return; return $return;
} }
@@ -141,6 +142,12 @@ class table_pichome_folder extends dzz_table
Hook::listen("delpichomefolderafter",$hookdatad); Hook::listen("delpichomefolderafter",$hookdatad);
} }
} }
public function updateByFids($fids,$setarr){
if(!is_array($fids)) $fids = array($fids);
Hook::listen('folderupdateBefore',$setarr,$fids);
if($setarr) parent::update($fids,$setarr);
return true;
}
public function update_name_by_fid($fid,$name){ public function update_name_by_fid($fid,$name){
if(!$folder = parent::fetch($fid)) return false; if(!$folder = parent::fetch($fid)) return false;
if(parent::update($fid,['fname'=>$name])){ if(parent::update($fid,['fname'=>$name])){
@@ -249,74 +256,53 @@ class table_pichome_folder extends dzz_table
public function fetch_all_folder_by_appid($appid,$pfid='',$i=1){ public function fetch_all_folder_by_appid($appid,$pfid='',$i=1){
if($i>5) return []; if($i>5) return [];
foreach(DB::fetch_all("select fid,fname,pathkey,pfid,`level` as perm from %t where appid = %s and password = '' and pfid = %s",array($this->_table,$appid,$pfid)) as $v){ foreach(DB::fetch_all("select fid,fname,pathkey,pfid,`level` as perm from %t where appid = %s and password = '' and pfid = %s order by disp asc",array($this->_table,$appid,$pfid)) as $v){
$v['level'] = $i; $v['level'] = $i;
$j = $i+1; $j = $i+1;
$v['children'] = $this->fetch_all_folder_by_appid($appid,$v['fid'],$j); $v['children'] = $this->fetch_all_folder_by_appid($appid,$v['fid'],$j);
$returndata[] = $v; $returndata[] = $v;
} }
Hook::listen('folderdataFilter',$returndata);
return $returndata; return $returndata;
} }
/* public function fetch_folder_by_appid_pfid($appid,$pfid=[]){
global $_G;
$ulevel = ($_G['uid']) ? $_G['pichomelevel']:0 ;
$folderdata = [];
if(!empty($pfid)){
foreach(DB::fetch_all("select fid,fname,pathkey,appid,pfid,`level` as perm from %t where appid = %s and pfid in(%n) order by disp asc",array($this->_table,$appid,$pfid)) as $v){
$v['nosubfilenum'] = DB::result_first("SELECT count(DISTINCT fr.rid) FROM %t fr
left join %t r on fr.rid = r.rid
where fr.appid = %s and fr.fid = %s and r.level <= %d",array('pichome_folderresources','pichome_resources',$appid,$v['fid'],$ulevel));
$v['filenum'] = DB::result_first("SELECT count(DISTINCT fr.rid) FROM %t fr
left join %t f on fr.fid = f.fid
left join %t r on fr.rid = r.rid
where fr.appid = %s and f.pathkey like %s and r.level <= %d ",array('pichome_folderresources','pichome_folder','pichome_resources',$appid,$v['pathkey'].'%',$ulevel));
$v['leaf'] = DB::result_first("select count(*) from %t where pfid = %s",array($this->_table,$v['fid'])) ? false:true;
$folderdata[] = $v;
}
}else{
foreach(DB::fetch_all("select fid,fname,pathkey,appid,pfid,`level` as perm from %t where appid = %s and pfid = '' order by disp asc",array($this->_table,$appid)) as $v){
$v['nosubfilenum'] = DB::result_first("SELECT count(DISTINCT fr.rid) FROM %t fr
left join %t r on fr.rid = r.rid
where fr.appid = %s and fr.fid = %s and r.level <= %d ",array('pichome_folderresources','pichome_resources',$appid,$v['fid'],$ulevel));
$v['filenum'] = DB::result_first("SELECT count(DISTINCT fr.rid) FROM %t fr
left join %t f on fr.fid = f.fid
left join %t r on fr.rid = r.rid
where fr.appid = %s and f.pathkey like %s and r.level <= %d",array('pichome_folderresources','pichome_folder','pichome_resources',$appid,$v['pathkey'].'%',$ulevel));
$v['leaf'] = DB::result_first("select count(*) from %t where pfid = %s",array($this->_table,$v['fid'])) ? false:true;
$folderdata[] = $v;
}
}
return $folderdata;
}*/
public function fetch_folder_by_appid_pfid($appid,$pfid=[]){ public function fetch_folder_by_appid_pfid($appid,$pfid=[]){
$folderdata = []; $folderdata = [];
if(!empty($pfid)){ if(!empty($pfid)){
foreach(DB::fetch_all("select fid,fname,pathkey,appid,pfid,filenum as nosubfilenum,level as perm from %t where appid = %s and pfid in(%n) order by disp asc",array($this->_table,$appid,$pfid)) as $v){ foreach(DB::fetch_all("select fid,fname,pathkey,appid,pfid,filenum as nosubfilenum,level as perm 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 $v['filenum'] = 0;
left join %t f on fr.fid = f.fid left join %t r on r.rid=fr.rid
where fr.appid = %s and f.pathkey like %s and r.isdelete < 1",array('pichome_folderresources','pichome_folder','pichome_resources',$appid,$v['pathkey'].'%'));
$v['leaf'] = DB::result_first("select count(*) from %t where pfid = %s",array($this->_table,$v['fid'])) ? false:true; $v['leaf'] = DB::result_first("select count(*) from %t where pfid = %s",array($this->_table,$v['fid'])) ? false:true;
$folderdata[] = $v; $folderdata[] = $v;
} }
}else{ }else{
foreach(DB::fetch_all("select fid,fname,pathkey,appid,pfid,filenum as nosubfilenum,level as perm from %t where appid = %s and pfid = '' order by disp asc",array($this->_table,$appid)) as $v){ foreach(DB::fetch_all("select fid,fname,pathkey,appid,pfid,filenum as nosubfilenum,level as perm 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 $v['filenum'] = 0;
left join %t f on fr.fid = f.fid left join %t r on r.rid=fr.rid
where fr.appid = %s and f.pathkey like %s and r.isdelete < 1",array('pichome_folderresources','pichome_folder','pichome_resources',$appid,$v['pathkey'].'%'));
$v['leaf'] = DB::result_first("select count(*) from %t where pfid = %s",array($this->_table,$v['fid'])) ? false:true; $v['leaf'] = DB::result_first("select count(*) from %t where pfid = %s",array($this->_table,$v['fid'])) ? false:true;
$folderdata[] = $v; $folderdata[] = $v;
} }
} }
return $folderdata; return $folderdata;
} }
public function getFolderNumByPathkey($appid,$pathkey){
if(!is_array($pathkey))$pathkey = (array)$pathkey;
$returndata = [];
foreach($pathkey as $v){
$filenum = DB::result_first("SELECT count(DISTINCT fr.rid) FROM %t fr
left join %t r on r.rid=fr.rid
where fr.appid = %s and fr.pathkey like %s and r.isdelete = 0 ",array('pichome_folderresources','pichome_resources',$appid,$v.'%'));
$returndata[] = ['pathkey'=>$v,'filenum'=>$filenum];
}
return $returndata;
}
public function search_by_fname($keyword,$appid=''){ public function search_by_fname($keyword,$appid=''){
$folderdata = []; $folderdata = [];
$wheresql = ' fname like %s '; $wheresql = ' fname like %s ';
@@ -457,7 +443,7 @@ class table_pichome_folder extends dzz_table
} }
public function update_data_by_fids($appid,$fids,$data){ public function update_data_by_fids($appid,$fids,$data){
if(!is_array($fids)) $fids = (array)$fids; if(!is_array($fids)) $fids = (array)$fids;
if(parent::update($fids,$data)){ if($this->updateByFids($fids,$data)){
$hookindex = ['fids'=>$fids,'appid'=>$appid]; $hookindex = ['fids'=>$fids,'appid'=>$appid];
Hook::listen('updatedataafter',$hookindex); Hook::listen('updatedataafter',$hookindex);
} }
@@ -483,4 +469,16 @@ class table_pichome_folder extends dzz_table
DB::query("update %t set filenum=filenum-%d where fid IN(%n)", array($this->_table, abs($ceof), $fids)); DB::query("update %t set filenum=filenum-%d where fid IN(%n)", array($this->_table, abs($ceof), $fids));
} }
} }
public function getDataByFids($fids){
if(!is_array($fids)) $fids = (array)$fids;
$fids = array_unique($fids);
$fids = array_filter($fids);
$folders = [];
foreach(DB::fetch_all("select fid,fname,pathkey,level,cover,filenum from %t where fid in(%n)",array($this->_table,$fids)) as $v){
$folders[$v['fid']] = $v;
}
Hook::listen('folderdataFilter',$folders,true);
return $folders;
}
} }

View File

@@ -14,7 +14,9 @@
parent::__construct(); parent::__construct();
} }
public function insert($setarr){ public function insert($setarr){
if(!isset($setarr['pathkey'])){
$setarr['pathkey'] = DB::result_first("select pathkey from %t where fid = %s",array('pichome_folder',$setarr['fid']));
}
if($id = DB::result_first("select id from %t where rid = %s and fid = %s and appid = %s",array($this->_table,$setarr['rid'],$setarr['fid'],$setarr['appid']))){ if($id = DB::result_first("select id from %t where rid = %s and fid = %s and appid = %s",array($this->_table,$setarr['rid'],$setarr['fid'],$setarr['appid']))){
$rid = $setarr['rid']; $rid = $setarr['rid'];
unset($setarr['rid']); unset($setarr['rid']);
@@ -23,8 +25,10 @@
if(parent::insert($setarr)){ if(parent::insert($setarr)){
$ofids = DB::result_first("select fids from %t where rid = %s",array('pichome_resources',$setarr['rid'])); $ofids = DB::result_first("select fids from %t where rid = %s",array('pichome_resources',$setarr['rid']));
$ofidarr = explode(',',$ofids); $ofidarr = explode(',',$ofids);
$fidarr[] = $setarr['fid']; if(!in_array($setarr['fid'],$ofidarr)){
$fids = implode(',',$fidarr); $ofidarr[] = $setarr['fid'];
}
$fids = implode(',',$ofidarr);
C::t('pichome_resources')->update_by_rids($setarr['appid'],$setarr['rid'],['fids'=>$fids,'lastdate'=>TIMESTMP]); C::t('pichome_resources')->update_by_rids($setarr['appid'],$setarr['rid'],['fids'=>$fids,'lastdate'=>TIMESTMP]);
C::t('pichome_folder')->add_filenum_by_fid($setarr,1); C::t('pichome_folder')->add_filenum_by_fid($setarr,1);
} }
@@ -53,6 +57,7 @@
if(!is_array($rids)) $rids = (array)$rids; if(!is_array($rids)) $rids = (array)$rids;
if(!is_array($fids)) $fids = (array)$fids; if(!is_array($fids)) $fids = (array)$fids;
$dids = []; $dids = [];
//print_r(DB::fetch_all("select * from %t where rid in(%n) and fid in(%n)",array($this->_table,$rids,$fids)));die;
foreach(DB::fetch_all("select * from %t where rid in(%n) and fid in(%n)",array($this->_table,$rids,$fids)) as $v){ foreach(DB::fetch_all("select * from %t where rid in(%n) and fid in(%n)",array($this->_table,$rids,$fids)) as $v){
$dids[] = $v['id']; $dids[] = $v['id'];
$rdata = DB::fetch_first("select fids,isdelete from %t where rid = %s",array('pichome_resources',$v['rid'])); $rdata = DB::fetch_first("select fids,isdelete from %t where rid = %s",array('pichome_resources',$v['rid']));
@@ -97,9 +102,10 @@
} }
public function get_foldername_by_rid($rid){ public function get_foldername_by_rid($rid){
$foldernames = []; $foldernames = [];
foreach(DB::fetch_all("select f.fid,f.fname,pathkey from %t fr left join %t f on f.fid=fr.fid and !isnull(fr.id) where rid = %s",array($this->_table,'pichome_folder',$rid)) as $v){ foreach(DB::fetch_all("select f.fid,f.fname,f.pathkey from %t fr left join %t f on f.fid=fr.fid and !isnull(fr.id) where rid = %s",array($this->_table,'pichome_folder',$rid)) as $v){
if(isset($v['fname'])) $foldernames[$v['fid']] = ['fname'=>$v['fname'],'pathkey'=>$v['pathkey']]; if(isset($v['fname'])) $foldernames[$v['fid']] = ['fname'=>$v['fname'],'pathkey'=>$v['pathkey']];
} }
Hook::listen('folderdataFilter',$foldernames,true);
return $foldernames; return $foldernames;
} }
public function fetch_rid_by_fids($fids,$limit = 6,$rid=''){ public function fetch_rid_by_fids($fids,$limit = 6,$rid=''){

View File

@@ -93,11 +93,10 @@ class table_pichome_resources extends dzz_table
public function update_by_rids($appid, $rids, $attr) public function update_by_rids($appid, $rids, $attr)
{ {
if (!is_array($rids)) $rids = (array)$rids; if(!is_array($rids)) $rids = array($rids);
if (parent::update($rids, $attr)) { Hook::listen('resourcesupdateBefore',$attr,$rids);
$hookindex = ['rids' => $rids, 'appid' => $appid]; if($attr) parent::update($rids,$attr);
Hook::listen('updatedataafter', $hookindex); return true;
}
} }
//清空删除文件 //清空删除文件
@@ -121,16 +120,17 @@ class table_pichome_resources extends dzz_table
public function delete_by_rid($rids, $uid = 0, $username = '') public function delete_by_rid($rids, $uid = 0, $username = '')
{ {
if (!is_array($rids)) $rids = (array)$rids; if (!is_array($rids)) $rids = (array)$rids;
$vapptype = DB::result_first("select v.type from %t v left join %t r on r.appid = v.appid where r.rid = %s",
['pichome_vapp','pichome_resources',$rids[0]]);
C::t('pichome_resources_attr')->delete_by_rid($rids); C::t('pichome_resources_attr')->delete_by_rid($rids);
C::t('pichome_folderresources')->delete_by_rid($rids); C::t('pichome_folderresources')->delete_by_rid($rids);
C::t('pichome_palette')->delete_by_rid($rids); C::t('pichome_palette')->delete_by_rid($rids);
C::t('pichome_comments')->delete_by_rid($rids); C::t('pichome_comments')->delete_by_rid($rids);
C::t('pichome_resourcestag')->delete_by_rid($rids); C::t('pichome_resourcestag')->delete_by_rid($rids);
C::t('pichome_share')->delete_by_rid($rids); C::t('pichome_share')->delete_by_rid($rids);
C::t('thumb_record')->delete_by_rid($rids); C::t('thumb_record')->delete_by_rid($rids,$vapptype);
//C::t('video_record')->delete_by_rid($rids); C::t('thumb_preview')->delete_by_rid($rids);
//C::t('pichome_view')->delete_by_rid($rids);
C::t('pichome_resourcestab')->delete_by_rid($rids); C::t('pichome_resourcestab')->delete_by_rid($rids);
C::t('ffmpegimage_cache')->delete_by_path($rids); C::t('ffmpegimage_cache')->delete_by_path($rids);
//移除文件夹封面数据 //移除文件夹封面数据
@@ -248,6 +248,7 @@ class table_pichome_resources extends dzz_table
if ($downshare[$resourcesdata['appid']]['isdelete']) return array(); if ($downshare[$resourcesdata['appid']]['isdelete']) return array();
$attrdata = C::t('pichome_resources_attr')->fetch($rid); $attrdata = C::t('pichome_resources_attr')->fetch($rid);
$resourcesdata = array_merge($resourcesdata, $attrdata); $resourcesdata = array_merge($resourcesdata, $attrdata);
$resourcesdata['remoteid'] = 0;
if (is_numeric($resourcesdata['path'])) { if (is_numeric($resourcesdata['path'])) {
$attachment = C::t('attachment')->fetch(intval($resourcesdata['path'])); $attachment = C::t('attachment')->fetch(intval($resourcesdata['path']));
$bz = io_remote::getBzByRemoteid($attachment['remote']); $bz = io_remote::getBzByRemoteid($attachment['remote']);
@@ -260,12 +261,19 @@ class table_pichome_resources extends dzz_table
$resourcesdata['bz'] = 'dzz::'; $resourcesdata['bz'] = 'dzz::';
} else { } else {
$patharr = explode(':', $downshare[$resourcesdata['appid']]['path']); $patharr = explode(':', $downshare[$resourcesdata['appid']]['path']);
$resourcesdata['bz'] = ($patharr[1]) ? $patharr[0] . ':' . $patharr[1] . ':' : 'dzz::'; if(is_numeric($patharr[1])){
$resourcesdata['remoteid'] = $patharr[1]; $resourcesdata['bz'] = ($patharr[1]) ? $patharr[0] . ':' . $patharr[1] . ':' : 'dzz::';
$resourcesdata['remoteid'] = $patharr[1];
}else{
$resourcesdata['bz'] = 'dzz::';
}
} }
$resourcesdata['path'] = $downshare[$resourcesdata['appid']]['path'] . BS . $resourcesdata['path']; $resourcesdata['path'] = $downshare[$resourcesdata['appid']]['path'] . BS . $resourcesdata['path'];
} }
$resourcesdata['vapptype'] = $downshare[$resourcesdata['appid']]['type']; $resourcesdata['vapptype'] = $downshare[$resourcesdata['appid']]['type'];
if($resourcesdata['vapptype'] == 3) $resourcesdata['iswebsitefile'] = 1;
else $resourcesdata['iswebsitefile'] =0;
return $resourcesdata; return $resourcesdata;
} }
@@ -286,6 +294,7 @@ class table_pichome_resources extends dzz_table
public function getOpensrc($ext, $bz) public function getOpensrc($ext, $bz)
{ {
$openexts = C::t('app_open')->fetch_all_ext(); $openexts = C::t('app_open')->fetch_all_ext();
// print_r($openexts);die;
$bzarr = explode(':', $bz); $bzarr = explode(':', $bz);
$bzpre = $bzarr[0]; $bzpre = $bzarr[0];
$openlist = []; $openlist = [];
@@ -312,12 +321,24 @@ class table_pichome_resources extends dzz_table
{ {
if (!is_array($rids)) $rids = (array)$rids; if (!is_array($rids)) $rids = (array)$rids;
$return = []; $return = [];
$hascoverrids = [];
foreach(DB::fetch_all("select * from %t where rid in(%n) and iscover = %d",array('thumb_preview',$rids,1)) as $v){
$return[$v['rid']]['imgstatus'] = 1;
$return[$v['rid']]['icondata'] = ($v['sstatus']) ? IO::getFileUri($v['spath']): IO::getFileUri($v['opath']);
$return[$v['rid']]['originalimg'] = ($v['lstatus']) ? IO::getFileUri($v['lpath']): IO::getFileUri($v['opath']);
$return[$v['rid']]['width'] = $v['width'];
$return[$v['rid']]['height'] = $v['height'];
$hascoverrids[] = $v['rid'];
}
$rids = array_diff($rids, $hascoverrids);
foreach (DB::fetch_all("select * from %t where rid in(%n)", array('thumb_record', $rids)) as $v) { foreach (DB::fetch_all("select * from %t where rid in(%n)", array('thumb_record', $rids)) as $v) {
if ($v['rid']) $return[$v['rid']]['imgstatus'] = 1; if ($v['rid']) $return[$v['rid']]['imgstatus'] = 1;
if ($v['sstatus']) $return[$v['rid']]['icondata'] = getglobal('siteurl') . IO::getFileuri($v['spath']); if ($v['sstatus']) {
else $return[$v['rid']]['icondata'] = false; $return[$v['rid']]['icondata'] =IO::getFileUri($v['spath']);
if ($v['lstatus']) $return[$v['rid']]['originalimg'] = getglobal('siteurl') . IO::getFileuri($v['lpath']); } else $return[$v['rid']]['icondata'] = false;
else $return[$v['rid']]['originalimg'] = false; if ($v['lstatus']) {
$return[$v['rid']]['originalimg'] =IO::getFileUri($v['lpath']);
} else $return[$v['rid']]['originalimg'] = false;
} }
return $return; return $return;
} }
@@ -331,7 +352,7 @@ class table_pichome_resources extends dzz_table
$did = is_numeric($patharr[1]) ? $patharr[1] : 1; $did = is_numeric($patharr[1]) ? $patharr[1] : 1;
//库路径 //库路径
$thumbdir = $apppath; $thumbdir = $apppath;
if(strpos($resourcesdata['path'],$thumbdir)!==false)$resourcesdata['path'] = str_replace($thumbdir.BS,'',$resourcesdata['path']); if(strpos($resourcesdata['path'],$thumbdir)!==false)$resourcesdata['path'] = str_replace([$thumbdir.BS,$thumbdir.'/'],'',$resourcesdata['path']);
$ext = $resourcesdata['ext']; $ext = $resourcesdata['ext'];
//获取缩略图地址模式默认0由服务器自动根据文件位置生成地址 //获取缩略图地址模式默认0由服务器自动根据文件位置生成地址
$thumurlmod = getglobal('config/thumburlmod') ? getglobal('config/thumburlmod'):0; $thumurlmod = getglobal('config/thumburlmod') ? getglobal('config/thumburlmod'):0;
@@ -339,18 +360,47 @@ class table_pichome_resources extends dzz_table
if ($did == 1 || $thumurlmod) { if ($did == 1 || $thumurlmod) {
//小图参数 //小图参数
$smallthumbparams = ['rid' => $resourcesdata['rid'], 'hash' => VERHASH, 'download' => $download, $smallthumbparams = ['rid' => $resourcesdata['rid'], 'hash' => VERHASH, 'download' => $download,
'thumbsign' => '0', 'ext' => $resourcesdata['ext'], 'appid' => $resourcesdata['appid']]; 'thumbsign' => '0', 'path'=>$resourcesdata['path'],'ext' => $resourcesdata['ext'], 'appid' => $resourcesdata['appid'],'hasthumb'=>$resourcesdata['hasthumb']];
//大图参数 //大图参数
$largethumbparams = ['rid' => $resourcesdata['rid'], 'hash' => VERHASH, 'download' => $download, $largethumbparams = ['rid' => $resourcesdata['rid'], 'hash' => VERHASH, 'download' => $download,
'thumbsign' => '1', 'ext' => $resourcesdata['ext'], 'appid' => $resourcesdata['appid']]; 'thumbsign' => '1','path'=>$resourcesdata['path'], 'ext' => $resourcesdata['ext'], 'appid' => $resourcesdata['appid'],'hasthumb'=>$resourcesdata['hasthumb']];
if ($apptype == 3 || $apptype == 1) { if ($apptype == 3) {
$thumbdata = C::t('thumb_record')->fetch($resourcesdata['rid']); if($previewdata = DB::fetch_first("select * from %t where rid = %s and iscover = %d",['thumb_preview',$resourcesdata['rid'],1])){
if ($thumbdata['sstatus']) $imgdata['icondata'] = getglobal('siteurl') . IO::getFileuri($thumbdata['spath']); $imgdata['icondata'] = ($previewdata['sstatus']) ? IO::getFileUri($previewdata['spath']): IO::getFileUri($previewdata['opath']);
else $imgdata['icondata'] = false; $imgdata['originalimg'] = ($previewdata['lstatus']) ? IO::getFileUri($previewdata['lpath']): IO::getFileUri($previewdata['opath']);
if ($thumbdata['lstatus']) $imgdata['originalimg'] = getglobal('siteurl') . IO::getFileuri($thumbdata['lpath']); }else{
else { $thumbdata = C::t('thumb_record')->fetch($resourcesdata['rid']);
$imgdata['originalimg'] = (!$return) ? false: getglobal('siteurl') . 'index.php?mod=io&op=createThumb&path='.$resourcesdata['dpath'].'&size=large'; if ($thumbdata['sstatus']) $imgdata['icondata'] = IO::getFileUri($thumbdata['spath']);
else $imgdata['icondata'] = false;
if ($thumbdata['lstatus']) $imgdata['originalimg'] = IO::getFileUri($thumbdata['lpath']);
else {
$imgdata['originalimg'] = (!$return) ? false: getglobal('siteurl') . 'index.php?mod=io&op=createThumb&path='.$resourcesdata['dpath'].'&size=large';
}
} }
}elseif($apptype == 1){
if($previewdata = DB::fetch_first("select * from %t where rid = %s and iscover = %d",['thumb_preview',$resourcesdata['rid'],1])){
$imgdata['icondata'] = ($previewdata['sstatus']) ? IO::getFileUri($previewdata['spath']): IO::getFileUri($previewdata['opath']);
$imgdata['originalimg'] = ($previewdata['lstatus']) ? IO::getFileUri($previewdata['lpath']): IO::getFileUri($previewdata['opath']);
}else{
if(isset($resourcesdata['isFilelistThumb']) && $resourcesdata['isFilelistThumb']){
$smallthumbparams = ['rid' => $resourcesdata['rid'], 'hash' => VERHASH, 'download' => $download,
'thumbsign' => '0', 'path'=>$resourcesdata['path'],'ext' => $resourcesdata['ext'], 'appid' => $resourcesdata['appid'],'hasthumb'=>$resourcesdata['hasthumb']];
$imgdata['iconimg'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . Pencode($smallthumbparams, 0, '') . '&' . VERHASH;
}else{
$thumbdata = C::t('thumb_record')->fetch($resourcesdata['rid']);
if ($thumbdata['sstatus']) $imgdata['icondata'] = IO::getFileUri($thumbdata['spath']);
else $imgdata['icondata'] = false;
if ($thumbdata['lstatus']) $imgdata['originalimg'] = IO::getFileUri($thumbdata['lpath']);
else {
$imgdata['originalimg'] = (!$return) ? false: getglobal('siteurl') . 'index.php?mod=io&op=createThumb&path='.$resourcesdata['dpath'].'&size=large';
}
}
}
} else { } else {
$imgdata['icondata'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . Pencode($smallthumbparams, 0, '') . '&' . VERHASH; $imgdata['icondata'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . Pencode($smallthumbparams, 0, '') . '&' . VERHASH;
@@ -358,9 +408,9 @@ class table_pichome_resources extends dzz_table
} }
} }
else { else {
switch ($apptype) { switch ($apptype) {
case 0: case 0:
//小图地址 //小图地址
if ($resourcesdata['hasthumb']) { if ($resourcesdata['hasthumb']) {
$tmppath = str_replace(strrchr($resourcesdata['path'], "."), "", $resourcesdata['path']); $tmppath = str_replace(strrchr($resourcesdata['path'], "."), "", $resourcesdata['path']);
@@ -376,7 +426,7 @@ class table_pichome_resources extends dzz_table
} }
//大图地址 //大图地址
if (in_array($ext, explode(',', getglobal('config/pichomecommimageext')))) { if (!$resourcesdata['hasthumb'] && in_array($ext, explode(',', getglobal('config/pichomecommimageext')))) {
$imgdata['originalimg'] = IO::getFileUri($thumbdir . BS . $resourcesdata['path']); $imgdata['originalimg'] = IO::getFileUri($thumbdir . BS . $resourcesdata['path']);
} else { } else {
$imgdata['originalimg'] = $imgdata['icondata']; $imgdata['originalimg'] = $imgdata['icondata'];
@@ -409,19 +459,43 @@ class table_pichome_resources extends dzz_table
} }
$originalimg = $thumbdir . '/.bf/.preview/' . $thumbpath . '/' . $bid . '.hd.webp'; $originalimg = $thumbdir . '/.bf/.preview/' . $thumbpath . '/' . $bid . '.hd.webp';
//大图地址 //大图地址
if (in_array($ext, $pichomespecialimgextarr) && IO::checkfileexists($originalimg)) { if (!$resourcesdata['hasthumb'] && in_array($ext, $pichomespecialimgextarr) && IO::checkfileexists($originalimg)) {
$imgdata['originalimg'] = IO::getFileUri($originalimg); $imgdata['originalimg'] = IO::getFileUri($originalimg);
} else { } else {
$imgdata['originalimg'] = $imgdata['icondata']; $imgdata['originalimg'] = $imgdata['icondata'];
} }
break; break;
case 1: case 1:
if($previewdata = DB::fetch_first("select * from %t where rid = %s and iscover = %d",['thumb_preview',$resourcesdata['rid'],1])){
$imgdata['icondata'] = ($previewdata['sstatus']) ? IO::getFileUri($previewdata['spath']): IO::getFileUri($previewdata['opath']);
$imgdata['originalimg'] = ($previewdata['lstatus']) ? IO::getFileUri($previewdata['lpath']): IO::getFileUri($previewdata['opath']);
}else{
if(isset($resourcesdata['isFilelistThumb']) && $resourcesdata['isFilelistThumb']){
$smallthumbparams = ['rid' => $resourcesdata['rid'], 'hash' => VERHASH, 'download' => $download,
'thumbsign' => '0', 'path'=>$resourcesdata['path'],'ext' => $resourcesdata['ext'], 'appid' => $resourcesdata['appid'],'hasthumb'=>$resourcesdata['hasthumb']];
$imgdata['iconimg'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . Pencode($smallthumbparams, 0, '') . '&' . VERHASH;
}else{
$thumbdata = C::t('thumb_record')->fetch($resourcesdata['rid']);
if ($thumbdata['sstatus']) $imgdata['icondata'] = IO::getFileUri($thumbdata['spath']);
else $imgdata['icondata'] = false;
if ($thumbdata['lstatus']) $imgdata['originalimg'] = IO::getFileUri($thumbdata['lpath']);
else $imgdata['originalimg'] = (!$return) ? false: getglobal('siteurl') . 'index.php?mod=io&op=createThumb&path='.$resourcesdata['dpath'].'&size=large';
}
}
break;
case 3: case 3:
$thumbdata = C::t('thumb_record')->fetch($resourcesdata['rid']); if($previewdata = DB::fetch_first("select * from %t where rid = %s and iscover = %d",['thumb_preview',$resourcesdata['rid'],1])){
if ($thumbdata['sstatus']) $imgdata['icondata'] = getglobal('siteurl') . IO::getFileuri($thumbdata['spath']); $imgdata['icondata'] = ($previewdata['sstatus']) ? IO::getFileUri($previewdata['spath']): IO::getFileUri($previewdata['opath']);
else $imgdata['icondata'] = false; $imgdata['originalimg'] = ($previewdata['lstatus']) ? IO::getFileUri($previewdata['lpath']): IO::getFileUri($previewdata['opath']);
if ($thumbdata['lstatus']) $imgdata['originalimg'] = getglobal('siteurl') . IO::getFileuri($thumbdata['lpath']); }else{
else $imgdata['originalimg'] = (!$return) ? false: getglobal('siteurl') . 'index.php?mod=io&op=createThumb&path='.$resourcesdata['dpath'].'&size=large'; $thumbdata = C::t('thumb_record')->fetch($resourcesdata['rid']);
if ($thumbdata['sstatus']) $imgdata['icondata'] = IO::getFileUri($thumbdata['spath']);
else $imgdata['icondata'] = false;
if ($thumbdata['lstatus']) $imgdata['originalimg'] = IO::getFileUri($thumbdata['lpath']);
else $imgdata['originalimg'] = (!$return) ? false: getglobal('siteurl') . 'index.php?mod=io&op=createThumb&path='.$resourcesdata['dpath'].'&size=large';
}
break; break;
} }
} }
@@ -473,19 +547,21 @@ class table_pichome_resources extends dzz_table
}else{ }else{
$resourcesdata['share'] = $nolevel ? 0:C::t('pichome_vapp')->getpermbypermdata($appdata['share'], $resourcesdata['appid'], 'share'); $resourcesdata['share'] = $nolevel ? 0:C::t('pichome_vapp')->getpermbypermdata($appdata['share'], $resourcesdata['appid'], 'share');
$resourcesdata['download'] = $nolevel ? 1:C::t('pichome_vapp')->getpermbypermdata($appdata['download'], $resourcesdata['appid'], 'download'); $resourcesdata['download'] = $nolevel ? 1:C::t('pichome_vapp')->getpermbypermdata($appdata['download'], $resourcesdata['appid'], 'download');
$resourcesdata['collection'] = $nolevel ? 0:(defined('PICHOME_LIENCE') && ($_G['adminid'] == 1 || ($_G['uid'] && !$_G['config']['pichomeclosecollect']))) ? 1 : 0; $resourcesdata['collection'] = $nolevel ? 0:((defined('PICHOME_LIENCE') && ($_G['adminid'] == 1 || ($_G['uid'] && !$_G['config']['pichomeclosecollect']))) ? 1 : 0);
} }
$resourcesdata['isdetail'] = 1; $resourcesdata['isdetail'] = 1;
$resourcesdata['dpath'] =dzzencode($rid, '', 0, 0); $resourcesdata['dpath'] =dzzencode($rid, '', 0, 0);
$resourcesdata['isFilelistThumb'] = 1;
$imgdata = $this->getfileimageurl($resourcesdata, $appdata['path'], $appdata['type'], $resourcesdata['download'],1); $imgdata = $this->getfileimageurl($resourcesdata, $appdata['path'], $appdata['type'], $resourcesdata['download'],1);
if(!$imgdata['icondata'] && $imgdata['iconimg']) $imgdata['icondata'] = $imgdata['iconimg'];
$resourcesdata = array_merge($resourcesdata, $imgdata); $resourcesdata = array_merge($resourcesdata, $imgdata);
if ($resourcesdata['width'] == 0) $resourcesdata['width'] = 900; if ($resourcesdata['width'] == 0) $resourcesdata['width'] = 900;
if ($resourcesdata['height'] == 0) $resourcesdata['height'] = 900; if ($resourcesdata['height'] == 0) $resourcesdata['height'] = 900;
$thumbwidth = getglobal('config/pichomethumlargwidth') ? getglobal('config/pichomethumlargwidth') : 1920; $thumbwidth = getglobal('config/pichomethumlargwidth') ? getglobal('config/pichomethumlargwidth') : 1920;
$thumbheight = getglobal('config/pichomethumlargheight') ? getglobal('config/pichomethumlargheight') : 1080; $thumbheight = getglobal('config/pichomethumlargheight') ? getglobal('config/pichomethumlargheight') : 1080;
$thumsizearr = $this->getImageThumbsize($resourcesdata['width'], $resourcesdata['height'], $thumbwidth, $thumbheight); $thumsizearr = $this->scaleImage($resourcesdata['width'], $resourcesdata['height'], $thumbwidth, $thumbheight);
$resourcesdata['iconwidth'] = $thumsizearr[0]; $resourcesdata['iconwidth'] = $thumsizearr[0];
$resourcesdata['iconheight'] = $thumsizearr[1]; $resourcesdata['iconheight'] = $thumsizearr[1];
@@ -503,6 +579,8 @@ class table_pichome_resources extends dzz_table
unset($resourcesdata['path']); unset($resourcesdata['path']);
$random = rand(); $random = rand();
$resourcesdata['iniframe'] = ($src) ? $src . '&random=' . $random . '&hash=' . VERHASH . '&path=' . $resourcesdata['dpath'] : ''; $resourcesdata['iniframe'] = ($src) ? $src . '&random=' . $random . '&hash=' . VERHASH . '&path=' . $resourcesdata['dpath'] : '';
Hook::listen('resourcesdataFilter',$resourcesdata,false);
return $resourcesdata; return $resourcesdata;
} }
@@ -524,29 +602,43 @@ class table_pichome_resources extends dzz_table
//获取所有的缩略图表数据 //获取所有的缩略图表数据
$imagedatas = $this->getThumbsByrids($rids); $imagedatas = $this->getThumbsByrids($rids);
foreach ($resourcesdata as $v) { foreach ($resourcesdata as $v) {
if ($nodel && $v['isdelete'] > 0) continue; if (($nodel && $v['isdelete'] > 0) ) continue;
if($v['isdelete']){ if($v['isdelete']){
$v['share'] = $v['download'] = $v['collection'] = 0; $v['share'] = $v['download'] = $v['collection'] = 0;
}else{ }else{
$v['share'] = C::t('pichome_vapp')->getpermbypermdata($downshare[$v['appid']]['share'], $v['appid'], 'share'); $v['share'] = C::t('pichome_vapp')->getpermbypermdata($downshare[$v['appid']]['share'], $v['appid'], 'share');
$v['download'] = C::t('pichome_vapp')->getpermbypermdata($downshare[$v['appid']]['download'], $v['appid'], 'download'); $v['download'] = C::t('pichome_vapp')->getpermbypermdata($downshare[$v['appid']]['download'], $v['appid'], 'download');
$v['collection'] = (defined('PICHOME_LIENCE') && ($_G['adminid'] == 1 || ($_G['uid'] && !$_G['config']['pichomeclosecollect']))) ? 1 : 0; $v['collection'] = (defined('PICHOME_LIENCE') && ($_G['adminid'] == 1 || ($_G['uid'] && !$_G['config']['pichomeclosecollect']))) ? 1 : 0;
} }
if ($imagedatas[$v['rid']]['imgstatus']) { if ($imagedatas[$v['rid']]['imgstatus']) {
$imgdata = ['icondata' => $imagedatas[$v['rid']]['icondata'], 'originalimg' => $imagedatas[$v['rid']]['originalimg']]; $imgdata = [
'icondata' => $imagedatas[$v['rid']]['icondata'],
'originalimg' => $imagedatas[$v['rid']]['originalimg']
];
if(isset($imagedatas[$v['rid']]['width']))$imgdata['width'] = $imagedatas[$v['rid']]['width'];
if(isset($imagedatas[$v['rid']]['height']))$imgdata['height'] = $imagedatas[$v['rid']]['height'];
if($downshare[$v['appid']]['type'] == 1 && !$imgdata['icondata']){
$v['isFilelistThumb'] = 1;
$tmpimagedata = $this->getfileimageurl($v, $downshare[$v['appid']]['path'], $downshare[$v['appid']]['type'], $v['download']);
$imgdata = array_merge($imgdata,$tmpimagedata);
}
} else { } else {
$imgdata = $this->getfileimageurl($v, $downshare[$v['appid']]['path'], $downshare[$v['appid']]['type'], $v['download']); $imgdata = $this->getfileimageurl($v, $downshare[$v['appid']]['path'], $downshare[$v['appid']]['type'], $v['download']);
} }
$v['hasthumb'] = $imagedatas[$v['rid']]['imgstatus'] ? intval($imagedatas[$v['rid']]['imgstatus']):0;
$v = array_merge($v, $imgdata); $v = array_merge($v, $imgdata);
$v['annonationnum'] = $annonationnumdata[$v['rid']]['num']; $v['annonationnum'] = $annonationnumdata[$v['rid']]['num'];
$thumbwidth = getglobal('config/pichomethumsmallwidth') ? getglobal('config/pichomethumsmallwidth') : 360; $thumbwidth = getglobal('config/pichomethumsmallwidth') ? getglobal('config/pichomethumsmallwidth') : 360;
$thumbheight = getglobal('config/pichomethumsmallwidth') ? getglobal('config/pichomethumsmallwidth') : 360; $thumbheight = getglobal('config/pichomethumsmallwidth') ? getglobal('config/pichomethumsmallwidth') : 360;
if ($v['width'] == 0) $v['width'] = 900; if ($v['width'] == 0) $v['width'] = 900;
if ($v['height'] == 0) $v['height'] = 900; if ($v['height'] == 0) $v['height'] = 900;
$thumsizearr = $this->getImageThumbsize($v['width'], $v['height'], $thumbwidth, $thumbheight); if($v['hasthumb']){
$v['thumbwidth'] = $thumsizearr[0]; $thumsizearr = $this->scaleImage($v['width'], $v['height'], $thumbwidth, $thumbheight);
$v['thumbheight'] = $thumsizearr[1]; $v['thumbwidth'] = $thumsizearr[0];
$v['thumbheight'] = $thumsizearr[1];
}
//获取文件所属目录数 //获取文件所属目录数
$v['foldernum'] = DB::result_first("select count(id) from %t where rid = %s", array('pichome_folderresources', $v['rid'])); $v['foldernum'] = DB::result_first("select count(id) from %t where rid = %s", array('pichome_folderresources', $v['rid']));
$intcolor = DB::result_first("select color from %t where rid = %s order by weight desc", array('pichome_palette', $v['rid'])); $intcolor = DB::result_first("select color from %t where rid = %s order by weight desc", array('pichome_palette', $v['rid']));
@@ -554,6 +646,7 @@ class table_pichome_resources extends dzz_table
unset($v['path']); unset($v['path']);
$returndata[] = $v; $returndata[] = $v;
} }
Hook::listen('resourcesdataFilter',$returndata,true);
return $returndata; return $returndata;
} }
@@ -597,8 +690,34 @@ class table_pichome_resources extends dzz_table
return array($width, $height); return array($width, $height);
} }
function scaleImage($owidth,$oheight,$width,$height) {
if($owidth>$width && $oheight>$height){
$or=$owidth/$oheight;
$r=$width/$height;
if($or>$r){
if($oheight<$height){
$height=$oheight;
$width=$owidth;
}else{
$width=ceil($height*$or);
}
public function geticondata_by_rid($rid, $onlyicon = 0) }else{
if($owidth<$width){
$height=$oheight;
$width=$owidth;
}else{
$height=ceil($width/$or);
}
}
}else{
$width=$owidth;
$height=$oheight;
}
return array($width,$height);
}
public function geticondata_by_rid($rid, $onlyicon = 0,$force = 1)
{ {
$resourcesdata = DB::fetch_first("select r.rid,r.isdelete,r.appid,r.ext,r.type,ra.path as fpath, $resourcesdata = DB::fetch_first("select r.rid,r.isdelete,r.appid,r.ext,r.type,ra.path as fpath,
v.path,v.type as apptype,v.download from %t r v.path,v.type as apptype,v.download from %t r
@@ -608,11 +727,22 @@ class table_pichome_resources extends dzz_table
if ($onlyicon) return false; if ($onlyicon) return false;
else return $resourcesdata; else return $resourcesdata;
} else { } else {
$vapppath = $resourcesdata['path'];
if($resourcesdata['apptype'] != 3){
$resourcesdata['path'] = $vapppath.BS.$resourcesdata['fpath'];
}
if($force && $resourcesdata['apptype'] = 1){
$resourcesdata['isFilelistThumb'] = 1;
}
$download = C::t('pichome_vapp')->getpermbypermdata($resourcesdata['download'], $resourcesdata['appid'], 'download'); $download = C::t('pichome_vapp')->getpermbypermdata($resourcesdata['download'], $resourcesdata['appid'], 'download');
$imgdata = $this->getfileimageurl($resourcesdata, $resourcesdata['path'], $resourcesdata['apptype'], $download); $imgdata = $this->getfileimageurl($resourcesdata, $vapppath, $resourcesdata['apptype'], $download);
if ($onlyicon) { if ($onlyicon) {
return $imgdata['icondata']; if($resourcesdata['apptype'] = 1 && !$imgdata['icondata'] && $imgdata['iconimg']){
$iconimgdata =$imgdata['iconimg'];
}else{
$iconimgdata = $imgdata['icondata'];
}
return $iconimgdata;
} else { } else {
return array_merge($resourcesdata, $imgdata); return array_merge($resourcesdata, $imgdata);
} }
@@ -713,8 +843,7 @@ class table_pichome_resources extends dzz_table
if ($nfids) $setarr['level'] = implode(',', $nfids); if ($nfids) $setarr['level'] = implode(',', $nfids);
$setarr['dateline'] = $data['dateline'] * 1000; $setarr['dateline'] = $data['dateline'] * 1000;
} }
//print_r($dataattrs);
//print_r($setarr);die;
//修改主表数据 //修改主表数据
if (C::t('pichome_resources')->update($rid, $setarr)) {//插入主表 if (C::t('pichome_resources')->update($rid, $setarr)) {//插入主表
//目录数据 //目录数据

View File

@@ -84,10 +84,14 @@
return true; return true;
} }
public function update_by_rids($appid,$rids,$setarr){ public function update_by_rids($appid,$rids,$setarr){
if(!is_array($rids)) $rids = (array)$rids; if(!is_array($rids)) $rids = array($rids);
foreach($rids as $v){ Hook::listen('resourcesupdateBefore',$setarr,$rids);
$this->update_by_rid($appid,$v,$setarr); if($setarr){
foreach($rids as $v){
$this->update_by_rid($appid,$v,$setarr);
}
} }
} }
public function update_searchval_by_rid($rid){ public function update_searchval_by_rid($rid){
$searchval = ''; $searchval = '';

View File

@@ -60,7 +60,7 @@ class table_pichome_route extends dzz_table
global $_G; global $_G;
//$surl = $this->path_transferred_meaning($url); //$surl = $this->path_transferred_meaning($url);
if(!$path) $path = $this->create_shortpath($url); if(!$path) $path = $this->create_shortpath($url);
elseif(!preg_match('/^\w+$/',$path)) return false; elseif(!preg_match('/^\w{1,30}$/',$path)) return false;
// $spath = $this->path_transferred_meaning($path); // $spath = $this->path_transferred_meaning($path);
if(!DB::result_first("select id from %t where path = %s ",array($this->_table,$path))){ if(!DB::result_first("select id from %t where path = %s ",array($this->_table,$path))){
if($id = DB::result_first("select id from %t where url = %s",array($this->_table,$url))){ if($id = DB::result_first("select id from %t where url = %s",array($this->_table,$url))){
@@ -79,30 +79,42 @@ class table_pichome_route extends dzz_table
} }
//删除栏目单页的route规则 //删除栏目单页的route规则
public function delete_by_abid($id,$isbanner = 1){ public function delete_by_abid($id,$isbanner = 1,$btype=2){
$params = [$this->_table]; $params = [$this->_table];
if(!$isbanner){ if(!$isbanner){
$wheresql = " url like %s "; $wheresql = " url like %s ";
$params[] = $this->path_transferred_meaning('%mod=alonepage&op=view#id='.$id.'%'); $params[] = $this->path_transferred_meaning('%mod=alonepage&op=view#id='.$id.'%');
$sid = 'a_'.$id;
}else{ }else{
$wheresql = " url like %s "; $wheresql = " url like %s ";
$params[] = $this->path_transferred_meaning('%mod=banner&op=index#id='.$id.'%'); $params[] = $this->path_transferred_meaning('%mod=banner&op=index#id='.$id.'%');
$sid = ($btype == 4) ? 'tb_'.$id:'b_'.$id;
} }
$i=0;
foreach(DB::fetch_all("select id from %t where $wheresql ",$params) as $v){ foreach(DB::fetch_all("select id from %t where $wheresql ",$params) as $v){
parent::delete($v['id']); if(parent::delete($v['id'])){
$this->delQRcodeBySid($sid);
$i++;
}
} }
$this->update_route(); $this->update_route();
return $i;
} }
////删除库的route规则 ////删除库的route规则
public function delete_by_appid($appid){ public function delete_by_appid($appid){
$params = [$this->_table,'%'.$appid.'%']; $params = [$this->_table,'%'.$appid.'%'];
$wheresql = " url like %s "; $wheresql = " url like %s ";
foreach(DB::fetch_all("select id from %t where $wheresql ",$params) as $v){ foreach(DB::fetch_all("select id from %t where $wheresql ",$params) as $v){
parent::delete($v['id']); parent::delete($v['id']);
$sid = 'vapp_'.$appid;
$this->delQRcodeBySid($sid);
} }
$this->update_route(); $this->update_route();
} }
public function update_route(){ public function update_route(){
$pathinoStatus = isset($_G['setting']['pathinfo']) ? $_G['setting']['pathinfo']:0; $pathinoStatus = isset($_G['setting']['pathinfo']) ? $_G['setting']['pathinfo']:0;
if(!$pathinoStatus) $pathinoStatus = C::t('setting')->fetch('pathinfo'); if(!$pathinoStatus) $pathinoStatus = C::t('setting')->fetch('pathinfo');
@@ -115,19 +127,25 @@ class table_pichome_route extends dzz_table
@file_put_contents($routefile,"<?php \t\n return ".var_export($data,true).";"); @file_put_contents($routefile,"<?php \t\n return ".var_export($data,true).";");
} }
public function feth_path_by_url($url){ public function feth_path_by_url($url){
//$url = $this->path_transferred_meaning($url);
// $url = $this->path_transferred_meaning($url);
return DB::result_first("select path from %t where url = %s",array($this->_table,$url)); return DB::result_first("select path from %t where url = %s",array($this->_table,$url));
} }
public function delQRcodeBySid($sid){
$sidarr = explode('_',$sid);
$target='./qrcode/'.$sidarr[0].'/'.$sidarr[1].'.png';
@unlink(getglobal('setting/attachdir').$target);
}
public function getQRcodeBySid($url,$sid){ public function getQRcodeBySid($url,$sid){
$pathinoStatus = isset($_G['setting']['pathinfo']) ? $_G['setting']['pathinfo']:0; $pathinoStatus = isset($_G['setting']['pathinfo']) ? $_G['setting']['pathinfo']:0;
if(!$pathinoStatus) $pathinoStatus = C::t('setting')->fetch('pathinfo'); if(!$pathinoStatus) $pathinoStatus = C::t('setting')->fetch('pathinfo');
if($pathinoStatus && $path = C::t('pichome_route')->feth_path_by_url($url)){ if($pathinoStatus && $path = C::t('pichome_route')->feth_path_by_url($url)){
$url = $path; $url = $path;
} }
$url = getglobal('siteurl').$url;
$sidarr = explode('_',$sid);
//如果开启了短链接模式 //如果开启了短链接模式
$target='./qrcode/'.$sid[0].'/'.$sid.'.png'; $target='./qrcode/'.$sidarr[0].'/'.$sidarr[1].'.png';
$targetpath = dirname(getglobal('setting/attachdir').$target); $targetpath = dirname(getglobal('setting/attachdir').$target);
dmkdir($targetpath); dmkdir($targetpath);
if(@getimagesize(getglobal('setting/attachdir').$target)){ if(@getimagesize(getglobal('setting/attachdir').$target)){

View File

@@ -14,34 +14,148 @@
parent::__construct(); parent::__construct();
} }
public function add_share($rid,$stype =0){ public function add_share($rid,$stype =0,$params=array()){
if(!$stype && !$data = C::t('pichome_resources')->fetch($rid)) return false; $appid='';
if($stype == 1 && !$data=C::t('pichome_collectlist')->fetch($rid)) return false; $viewurl='';
switch ($stype){
case 0://文件
if(!$data= C::t('pichome_resources')->fetch($rid)){
return false;
}
$appid=$data['appid'];
$viewurl=getglobal('siteurl').'index.php?mod=pichome&op=share';
break;
case 1://收藏夹文件
if(!$data = C::t('pichome_collectlist')->fetch($rid)){
return false;
}
if(!$resource= C::t('pichome_resources')->fetch($data['rid'])){
return false;
}
$data['name']=$resource['name'];
$appid=$data['appid'];
$viewurl=getglobal('siteurl').'index.php?mod=pichome&op=share';
break;
case 2://收藏夹
if(!$data = C::t('pichome_collect')->fetch($rid)){
return false;
}
$viewurl=getglobal('siteurl').'index.php?mod=collection&op=share';
break;
case 3: //专辑
if(!$data = C::t('pichome_tab')->fetch($rid)){
return false;
}
$viewurl=getglobal('siteurl').'index.php?mod=tab&op=share';
break;
}
if($stype == 2 && !$data =C::t('pichome_collect')->fetch($rid)) return false;
$setarr = [ $setarr = [
'title'=>$data['name'], 'title'=>$data['name'],
'filepath'=>$rid, 'filepath'=>$rid,
'appid'=>($stype < 2) ? $data['appid']:'', 'appid'=>$appid,
'clid'=>isset($data['clid']) ? $data['clid']:0, 'clid'=>isset($data['clid']) ? $data['clid']:0,
'dateline'=>TIMESTAMP, 'dateline'=>TIMESTAMP,
'uid'=>getglobal('uid') ? getglobal('uid'):0, 'uid'=>getglobal('uid'),
'username'=>getglobal('username'),
'stype'=>$stype 'stype'=>$stype
]; ];
if($params['title']){
$setarr['title']=$params['title'];
}
if($params['endtime']){
$setarr['endtime']=intval($params['endtime']);
}
if($params['password']){
$setarr['password']=$params['password'];
}
if($params['times']){
$setarr['times']=intval($params['times']);
}
if($params['perm']){
$setarr['perm']=intval($params['perm']);
}
if($id = DB::result_first("select id from %t where filepath = %s and uid = %d and stype = %d ",array($this->_table,$setarr['filepath'],$setarr['uid'],$setarr['stype']))){ if($id = DB::result_first("select id from %t where filepath = %s and uid = %d and stype = %d ",array($this->_table,$setarr['filepath'],$setarr['uid'],$setarr['stype']))){
parent::update($id,$setarr);
}else{ }else{
$id = parent::insert($setarr,1); $id = parent::insert($setarr,1);
}
if($stype == 2){
$shareurl = C::t('shorturl')->getShortUrl(getglobal('siteurl').'index.php?mod=collection&op=share&sid='.dzzencode($id,'',0,0));
}else{
$shareurl = C::t('shorturl')->getShortUrl(getglobal('siteurl').'index.php?mod=pichome&op=share&sid='.dzzencode($id,'',0,0));
} }
$shareurl = C::t('shorturl')->getShortUrl($viewurl.'&sid='.dzzencode($id,'',0,0));
return $shareurl; return $shareurl;
}
public function getShareUrl($data){
if(!$data) {
if(!$data = parent::fetch($data)) return false;
}
$viewurl='';
switch ($data['stype']){
case 0://文件
$viewurl=getglobal('siteurl').'index.php?mod=pichome&op=share';
break;
case 1://收藏夹文件
$viewurl=getglobal('siteurl').'index.php?mod=pichome&op=share';
break;
case 2://收藏夹
$viewurl=getglobal('siteurl').'index.php?mod=collection&op=share';
break;
case 3: //专辑
$viewurl=getglobal('siteurl').'index.php?mod=tab&op=share';
break;
}
return C::t('shorturl')->getShortUrl($viewurl.'&sid='.dzzencode($data['id'],'',0,0));
}
public function fetch_by_sid($sid){
if(!$data=parent::fetch($sid)) return false;
$viewurl='';
switch($data['stype']){
case 0://文件
$viewurl=getglobal('siteurl').'index.php?mod=pichome&op=share';
break;
case 1://收藏夹文件
$viewurl=getglobal('siteurl').'index.php?mod=pichome&op=share';
break;
case 2://收藏夹
$viewurl=getglobal('siteurl').'index.php?mod=collection&op=share';
break;
case 3: //专辑
$viewurl=getglobal('siteurl').'index.php?mod=tab&op=share';
break;
}
$data['shareurl'] = C::t('shorturl')->getShortUrl($viewurl.'&sid='.dzzencode($sid,'',0,0));
$data['fshareurl'] = $data['shareurl'].($data['password'] ? ' 提取密码:'.$data['password']:'');
$data['fdateline']=dgmdate($data['dateline'],'Y-m-d H:i');
if($data['endtime']) $data['fendtime']=dgmdate($data['endtime'],'Y-m-d');
$data['fstatus']=lang('share_status_'.$data['status']);
$data['fstype']=lang('share_stype_'.$data['stype']);
$data['fperm']=lang('share_perm_'.$data['perm']);
$data['qrcodeurl']='';
$data['isqrcode']=false;
return $data;
}
public function getQRcodeBySid($sid){
if(!$data = parent::fetch($sid)) return false;
$viewurl='';
switch ($data['stype']){
case 0://文件
$viewurl=getglobal('siteurl').'index.php?mod=pichome&op=share';
break;
case 1://收藏夹文件
$viewurl=getglobal('siteurl').'index.php?mod=pichome&op=share';
break;
case 2://收藏夹
$viewurl=getglobal('siteurl').'index.php?mod=collection&op=share';
break;
case 3: //专辑
$viewurl=getglobal('siteurl').'index.php?mod=tab&op=share';
break;
}
return C::t('shorturl')->getQrcodeUrl($viewurl.'&sid='.dzzencode($sid,'',0,0));
}
public function count_by_uid($uid=0){
if(!$uid) $uid = getglobal('uid');
return DB::result_first("select count(*) from %t where uid = %d",array($this->_table,$uid));
} }
public function delete_by_riduid($rid){ public function delete_by_riduid($rid){
$uid = getglobal('uid') ? getglobal('uid'):0; $uid = getglobal('uid') ? getglobal('uid'):0;

View File

@@ -20,13 +20,19 @@
$cid = ($setarr['cid']) ? $setarr['cid']:$this->createcid($setarr['appid']); $cid = ($setarr['cid']) ? $setarr['cid']:$this->createcid($setarr['appid']);
if ($taggroup = DB::fetch_first("select * from %t where cid = %s and appid = %s", array($this->_table, $cid,$setarr['appid']))) { if ($taggroup = DB::fetch_first("select * from %t where cid = %s and appid = %s", array($this->_table, $cid,$setarr['appid']))) {
unset($setarr['cid']); unset($setarr['cid']);
if ($taggroup['catname'] != $setarr['catname']) parent::update($cid, $setarr); if ($taggroup['catname'] != $setarr['catname']) $this->updateBycid($cid, $setarr);
return $cid; return $cid;
} else { } else {
$setarr['cid'] = $cid; $setarr['cid'] = $cid;
if (parent::insert($setarr)) return $cid; if (parent::insert($setarr)) return $cid;
} }
} }
public function updateBycid($cid,$setarr){
$setarr['cid'] = $cid;
Hook::listen('taggroupupdateBefore',$setarr);
if($setarr) parent::update($cid, $setarr);
return true;
}
public function createcid($appid){ public function createcid($appid){
$cid = random(13).$appid; $cid = random(13).$appid;
if(DB::result_first("select count(cid) from %t where cid = %s",array($this->_table,$cid))){ if(DB::result_first("select count(cid) from %t where cid = %s",array($this->_table,$cid))){

View File

@@ -152,7 +152,6 @@ left join %t th on t.tid = th.tid and th.themeid = %d where t.pageid = %d order
$v['data'] = C::t('pichome_templatetagdata')->fetch_data_by_tidandtagtype($v['tid'], $v['tagtype']); $v['data'] = C::t('pichome_templatetagdata')->fetch_data_by_tidandtagtype($v['tid'], $v['tagtype']);
$tagdata[] = $v; $tagdata[] = $v;
} }
return $tagdata; return $tagdata;
} }

View File

@@ -3,7 +3,7 @@ if (!defined('IN_OAOOA')) {
exit('Access Denied'); exit('Access Denied');
} }
class table_pichome_templatetagdata extends dzz_table class table_pichome_templatetagdata extends dzz_table
{ {
public function __construct() public function __construct()
{ {
@@ -37,20 +37,20 @@ class table_pichome_templatetagdata extends dzz_table
foreach($setarr['tdata'] as $v){ foreach($setarr['tdata'] as $v){
$naids[] = $v['aid']; $naids[] = $v['aid'];
} }
if($olddata){ if($olddata){
$odata = unserialize($olddata['tdata']); $odata = unserialize($olddata['tdata']);
$oaids = []; $oaids = [];
foreach($odata as $idata){ foreach($odata as $idata){
$oaids[] = $idata['aid']; $oaids[] = $idata['aid'];
} }
$delaids = array_diff($oaids,$naids); $delaids = array_diff($oaids,$naids);
foreach($delaids as $v){ foreach($delaids as $v){
C::t('attachment')->delete_by_aid($v['aid']); C::t('attachment')->delete_by_aid($v['aid']);
}
$naids = array_diff($naids,$oaids);
} }
$naids = array_diff($naids,$oaids);
}
C::t('attachment')->addcopy_by_aid($naids); C::t('attachment')->addcopy_by_aid($naids);
$setarr['tdata'] = serialize($setarr['tdata']); $setarr['tdata'] = serialize($setarr['tdata']);
break; break;
@@ -59,6 +59,25 @@ class table_pichome_templatetagdata extends dzz_table
$setarr['tdata'] = $this->getcontentdata($setarr['tdata'],$olddata['tdata']); $setarr['tdata'] = $this->getcontentdata($setarr['tdata'],$olddata['tdata']);
break; break;
default : default :
$naids = [];
foreach($setarr['tdata'] as $v){
$naids[] = $v['aid'];
}
if($olddata){
$odata = unserialize($olddata['tdata']);
$oaids = [];
foreach($odata as $idata){
$oaids[] = $idata['aid'];
}
$delaids = array_diff($oaids,$naids);
foreach($delaids as $v){
C::t('attachment')->delete_by_aid($v['aid']);
}
$naids = array_diff($naids,$oaids);
if($naids) C::t('attachment')->addcopy_by_aid($naids);
}
$setarr['tdata'] = serialize($setarr['tdata']); $setarr['tdata'] = serialize($setarr['tdata']);
break; break;
@@ -72,6 +91,12 @@ class table_pichome_templatetagdata extends dzz_table
} }
} }
public function parserichtextdata($data){ public function parserichtextdata($data){
$pattern = "/(https?:\/\/)?\w+\.\w+\.\w+\.\w+?(:[0-9]+)?\/index\.php\?mod=io&amp;op=getfileStream&amp;path=(.+)/";
$data= preg_replace_callback($pattern,function($matchs){
return 'index.php?mod=io&op=getfileStream&path='.$matchs[3];
},$data);
$data= preg_replace_callback('/path=(\w+)&amp;aflag=(attach::\d+)/',function($matchs){ $data= preg_replace_callback('/path=(\w+)&amp;aflag=(attach::\d+)/',function($matchs){
if(isset($matchs[2])){ if(isset($matchs[2])){
@@ -86,51 +111,51 @@ class table_pichome_templatetagdata extends dzz_table
$tagdata = []; $tagdata = [];
foreach(DB::fetch_all("select * from %t where tid = %d order by disp asc",[$this->_table,$tid]) as $v){ foreach(DB::fetch_all("select * from %t where tid = %d order by disp asc",[$this->_table,$tid]) as $v){
if($tagtype == 'rich_text'){ if($tagtype == 'rich_text'){
$v['tdata'] = $this->parserichtextdata($v['tdata']); $v['tdata'] = $this->parserichtextdata($v['tdata']);
}else{ }else{
$v['tdata'] = unserialize($v['tdata']); $v['tdata'] = unserialize($v['tdata']);
foreach($v['tdata'] as $k=>$val){ foreach($v['tdata'] as $k=>$val){
//print_r($val);die; if($val['aid']){
if($val['aid']){ $v['tdata'][$k]['imgurl'] =IO::getFileUri('attach::'.$val['aid']);
$v['tdata'][$k]['imgurl'] = getglobal('siteurl').IO::getFileUri('attach::'.$val['aid']); }
} if(!$val['link']) $val['tdata'][$k]['url'] = $val['linkval'] ? $val['linkval']:'';
if(!$val['link']) $val['tdata'][$k]['url'] = $val['linkval'] ? $val['linkval']:''; else{
else{ switch ($val['link']){
switch ($val['link']){ case 1:
case 1: $url = 'index.php?mod=pichome&op=fileview#appid='.$val['linkval'];
$url = 'index.php?mod=pichome&op=fileview#appid='.$val['linkval']; break;
break; case 2:
case 2: $url = 'index.php?mod=alonepage&op=view#id='.$val['linkval'];
$url = 'index.php?mod=alonepage&op=view#id='.$val['linkval']; break;
break; case 3:
case 3: $bdata = C::t('pichome_banner')->fetch($val['linkval']);
$bdata = C::t('pichome_banner')->fetch($val['linkval']); $url = ($bdata['btype'] == 3) ? $bdata['bdata']:'index.php?mod=banner&op=index#id='.$bdata['bdata'];
$url = ($bdata['btype'] == 3) ? $bdata['bdata']:'index.php?mod=banner&op=index#id='.$bdata['bdata']; break;
break; }
} if(getglobal('setting/pathinfo')) $path = C::t('pichome_route')->feth_path_by_url($url);
if(getglobal('setting/pathinfo')) $path = C::t('pichome_route')->feth_path_by_url($url); else $path = '';
else $path = ''; if($path){
if($path){ $v['tdata'][$k]['url'] = getglobal('siteurl').$path;
$v['tdata'][$k]['url'] = getglobal('siteurl').$path; }else{
}else{ $v['tdata'][$k]['url'] = getglobal('siteurl').$url;
$v['tdata'][$k]['url'] = getglobal('siteurl').$url; }
} }
} }
}
} }
$v['tdid'] = $v['id']; $v['tdid'] = $v['id'];
unset($v['id']); unset($v['id']);
$tagdata[] = $v; $tagdata[] = $v;
} }
return $tagdata; return $tagdata;
} }
public function getcontentdata($data,$odata){ public function getcontentdata($data,$odata){
global $naids; global $naids;
$data = str_replace(getglobal('siteurl'),'',$data);
$naids= []; $naids= [];
$data= preg_replace_callback('/path=(\w+)/',function($matchs){ $data= preg_replace_callback('/path=(\w+)/',function($matchs){
global $naids; global $naids;
@@ -170,4 +195,5 @@ class table_pichome_templatetagdata extends dzz_table
} }
return true; return true;
} }
} }

View File

@@ -15,6 +15,23 @@ class table_pichome_vapp extends dzz_table
parent::__construct(); parent::__construct();
} }
public function fetchByAppid($appid,$hasdel=1){
$appdata = [];
//不包含删除状态库
if(!$hasdel){
$data = DB::fetch_first('SELECT * FROM %t WHERE appid=%s and isdelete < %d', array($this->_table, $appid,1));
}else{
$data = parent::fetch($appid);
}
Hook::listen("vappdataFilter",$data,false);
return $data;
}
public function updateByAppid($appid,$setarr){
$setarr['appid'] = $appid;
Hook::listen('vappupdateBefore',$setarr);
parent::update($appid,$setarr);
return $appid;
}
private function code62($x) private function code62($x)
{ {
$show = ''; $show = '';
@@ -135,6 +152,7 @@ class table_pichome_vapp extends dzz_table
$adminperm = 0; $adminperm = 0;
} }
if ($adminperm) return true; if ($adminperm) return true;
if ($perm == 'download' && (isset($_G['config']['pichomeclosedownload']) && $_G['config']['pichomeclosedownload'])) { if ($perm == 'download' && (isset($_G['config']['pichomeclosedownload']) && $_G['config']['pichomeclosedownload'])) {
return false; return false;
} }
@@ -143,7 +161,6 @@ class table_pichome_vapp extends dzz_table
return false; return false;
} }
if (!$permdata) return false; if (!$permdata) return false;
if ($permdata === '1') return true; if ($permdata === '1') return true;
$uorgids = []; $uorgids = [];
@@ -194,15 +211,16 @@ class table_pichome_vapp extends dzz_table
$downshare = array(); $downshare = array();
if ($appid) { if ($appid) {
$downshare = DB::fetch_first("select * from %t where isdelete < 1 and appid = %s", array($this->_table, $appid)); $downshare = DB::fetch_first("select * from %t where isdelete < 1 and appid = %s", array($this->_table, $appid));
$downshare['download'] = $this->getpermbypermdata($downshare['download'],$appid, 'download'); /* $downshare['download'] =$downshare['download'];
$downshare['share'] = $this->getpermbypermdata($downshare['share'], $appid,'share'); $downshare['share'] =$downshare['share'];
$downshare['view'] = $this->getpermbypermdata($downshare['view'],$appid); $downshare['view'] =$downshare['view'];*/
} else { } else {
foreach (DB::fetch_all("select * from %t where isdelete < 1", array($this->_table)) as $v) { foreach (DB::fetch_all("select * from %t where isdelete < 1", array($this->_table)) as $v) {
$v['download'] = $this->getpermbypermdata($v['download'],$v['appid'], 'download'); /* $v['download'] =$v['download'];
$v['share'] = $this->getpermbypermdata($v['share'], $v['appid'],'share'); $v['share'] = $v['share'];
$v['view'] = $this->getpermbypermdata($v['view'],$v['appid']); $v['view'] = $v['view'];*/
$downshare[$v['appid']] = $v; $downshare[$v['appid']] = $v;
} }
} }

View File

@@ -0,0 +1,61 @@
<?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_search_template extends dzz_table
{
public function __construct() {
$this->_table = 'search_template';
$this->_pk = 'tid';
/*$this->_pre_cache_key = 'search_template_';
$this->_cache_ttl = 0;*/
parent::__construct();
}
public function fetch_all_template(){
$data=array();
foreach(DB::fetch_all("select * from %t where 1 order by disp asc,dateline desc",array($this->_table)) as $value){
if($value['screen']){
$value['screen']=json_decode($value['screen'],true);
}else{
$value['screen']=array();
}
if($value['pagesetting']){
$value['pagesetting']=json_decode($value['pagesetting'],true);
if($value['pagesetting']['layout']) $value['layout']=$value['pagesetting']['layout'];
else{
$value['layout']='waterFall';
}
}else{
$value['pagesetting']=array();
$value['layout']='waterFall';
}
if($value['searchRange']){
$appids=explode(',',$value['searchRange']);
$appnames=array();
foreach($appids as $appid){
if(isset($apps[$appid])){
$appnames[]=$apps[$appid]['appname'];
}
}
$value['searchRange_names']=implode(',',$appnames);
}else{
$value['searchRange']=array();
$value['searchRange_names']='所有库';
}
$data[$value['tid']]=$value;
}
return $data;
}
}

View File

@@ -0,0 +1,145 @@
<?php
if(!defined('IN_OAOOA')) {
exit('Access Denied');
}
class table_thumb_preview extends dzz_table
{
public function __construct()
{
$this->_table = 'thumb_preview';
$this->_pk = 'id';
$this->_pre_cache_key = 'thumb_preview';
$this->_cache_ttl = 3600;
parent::__construct();
}
public function addPreview($rid,$aid){
global $_G;
if($id = DB::result_first("select id from %t where rid = %s and opath = %d ",[$this->_table,$rid,$aid])){
return $id;
}else{
//获取图片数据
$imgData = IO::getMeta('attach::'.$aid,1);
$wp = $_G['setting']['IsWatermarkstatus'] ? $_G['setting']['watermarkstatus']:'';
$wt = $_G['setting']['IsWatermarkstatus'] ? $_G['setting']['watermarktype']:'';
$wcontent = $_G['setting']['IsWatermarkstatus'] ? ($_G['setting']['watermarktype'] == 'png' ? $_G['setting']['waterimg']:$_G['setting']['position_text']):'';
$setarr = [
'rid'=>$rid,
'opath'=>$imgData['path'],
'aid'=>$aid,
'width' => $imgData['width'] ? intval($imgData['width']):0,
'height' => $imgData['height'] ? intval($imgData['height']):0,
'lwidth' => $_G['setting']['thumbsize']['large']['width'],
'lheight' => $_G['setting']['thumbsize']['large']['height'],
'swidth' => $_G['setting']['thumbsize']['small']['width'],
'sheight' =>$_G['setting']['thumbsize']['small']['height'],
'filesize' => $imgData['filesize'],
'ext' => $imgData['ext'],
'lwaterposition'=>$wp,
'lwatertype'=>$wt,
'lwatercontent'=>$wcontent,
'swaterposition'=>$wp,
'swatertype'=>$wt,
'swatercontent'=>$wcontent,
];
if($id = parent::insert($setarr,1)){
C::t('attachment')->addcopy_by_aid($aid,1);
return $id;
}
}
return false;
}
public function editCover($rid,$aid){
global $_G;
$imgData = IO::getMeta('attach::'.$aid,1);
$wp = $_G['setting']['IsWatermarkstatus'] ? $_G['setting']['watermarkstatus']:'';
$wt = $_G['setting']['IsWatermarkstatus'] ? $_G['setting']['watermarktype']:'';
$wcontent = $_G['setting']['IsWatermarkstatus'] ? ($_G['setting']['watermarktype'] == 'png' ? $_G['setting']['waterimg']:$_G['setting']['position_text']):'';
$setarr = [
'rid'=>$rid,
'opath'=>$imgData['path'],
'aid'=>$aid,
'width' => $imgData['width'] ? intval($imgData['width']):0,
'height' => $imgData['height'] ? intval($imgData['height']):0,
'lwidth' => $_G['setting']['thumbsize']['large']['width'],
'lheight' => $_G['setting']['thumbsize']['large']['height'],
'swidth' => $_G['setting']['thumbsize']['small']['width'],
'sheight' =>$_G['setting']['thumbsize']['small']['height'],
'filesize' => $imgData['filesize'] ? $imgData['filesize'] : 0,
'ext' => $imgData['ext'],
'lwaterposition'=>$wp,
'lwatertype'=>$wt,
'lwatercontent'=>$wcontent,
'swaterposition'=>$wp,
'swatertype'=>$wt,
'swatercontent'=>$wcontent,
'iscover'=>1,
'sstatus'=>0,
'lstatus'=>0,
];
if($coverdata = DB::fetch_first("select id from %t where rid = %s and iscover = %d ",[$this->_table,$rid,1])){
if($coverdata['opath'] != $aid){
if(parent::update($coverdata['id'],$setarr)){
C::t('attachment')->addcopy_by_aid($aid,1);
C::t('attachment')->delete_by_aid($coverdata['aid']);
return true;
}
}
}else{
if(parent::insert($setarr,1)){
C::t('attachment')->addcopy_by_aid($aid,1);
return true;
}
}
return false;
}
public function delCover($rid){
if($coverdata = DB::fetch_first("select id,opath from %t where rid = %s and iscover = %d ",[$this->_table,$rid,1])){
if(parent::delete($coverdata['id'])){
C::t('attachment')->delete_by_aid($coverdata['aid']);
return true;
}
}
return false;
}
public function delPreview($id){
if($previewdata = DB::fetch_first("select id,opath from %t where id = %s ",[$this->_table,$id])){
if(parent::delete($previewdata['id'])){
C::t('attachment')->delete_by_aid($previewdata['aid']);
return true;
}
}
return false;
}
public function delete_by_rid($rid){
if(!is_array($rid)) $rid = (array)$rid;
if($previewdata = DB::fetch_all("select id,opath from %t where rid in(%n) ",[$this->_table,$rid])){
foreach($previewdata as $value){
if(parent::delete($value['id'])){
C::t('attachment')->delete_by_aid($value['aid']);
}
}
}
}
public function fetchPreviewByRid($rid,$onlysmall=false){
$returndata = [];
foreach(DB::fetch_all("select * from %t where rid = %s and iscover !=%d order by disp asc",[$this->_table,$rid,1]) as $v){
$tmpdata = [
'id'=>$v['id'],
'spath'=>($v['sstatus']) ? IO::getFileUri($v['spath']):IO::getFileUri($v['opath']),
];
if(!$onlysmall) $tmpdata['lpath']=($v['lstatus']) ? IO::getFileUri($v['lpath']):IO::getFileUri($v['opath']);
$returndata[] = $tmpdata;
}
return $returndata;
}
}

View File

@@ -22,7 +22,7 @@
parent::__construct(); parent::__construct();
} }
public function insert_data($setarr,$isreturn = false) public function insert_data($setarr,$isreturn = false)
{ {
@@ -75,7 +75,7 @@
return $rdata; return $rdata;
} }
public function delete_by_rid($rids) public function delete_by_rid($rids,$vapptype)
{ {
if(!is_array($rids)) $rids = (array)$rids; if(!is_array($rids)) $rids = (array)$rids;
foreach (DB::fetch_all("select * from %t where rid in(%n)", array($this->_table, $rids)) as $v) { foreach (DB::fetch_all("select * from %t where rid in(%n)", array($this->_table, $rids)) as $v) {
@@ -83,6 +83,10 @@
//if($v['lstatus'] == 1) IO::Delete($v['lpath']); //if($v['lstatus'] == 1) IO::Delete($v['lpath']);
// if($v['opath']) IO::Delete($v['opath']); // if($v['opath']) IO::Delete($v['opath']);
self::delete($v['rid']); self::delete($v['rid']);
if($vapptype == 1){
if($v['sstatus'] == 1) IO::Delete($v['spath']);
if($v['lstatus'] == 1) IO::Delete($v['lpath']);
}
} }
} }

View File

@@ -41,10 +41,17 @@ class table_video_record extends dzz_table
if ($returndata = DB::fetch_first("select * from %t where rid = %s order by `status` desc", array($this->_table, $rid))) { if ($returndata = DB::fetch_first("select * from %t where rid = %s order by `status` desc", array($this->_table, $rid))) {
return $returndata; return $returndata;
} else { } else {
/* $resourcesdata = C::t('pichome_resources')->fetch_data_by_rid($rid); return false;
$hookdata = ['appid'=>$resourcesdata['appid'],'rid'=>$rid,'ext'=>$resourcesdata['ext'],'isforce'=>1,'realpath'=>$resourcesdata['realpath']];
$return = Hook::listen('pichomeconvert',$hookdata,null,false,true);*/ }
}
public function fetch_by_aid($aid)
{
$aid = intval($aid);
if ($returndata = DB::fetch_first("select * from %t where aid = %d order by `status` desc", array($this->_table, $aid))) {
return $returndata;
} else {
return false; return false;
} }

View File

@@ -11,8 +11,8 @@ if(!defined('IN_OAOOA')) {
} }
if(!defined('CORE_VERSION')) { if(!defined('CORE_VERSION')) {
define('CORE_VERSION', '10.2.0'); define('CORE_VERSION', '10.2.1.0');
define('CORE_VERSION_LEVEL', 'Home'); define('CORE_VERSION_LEVEL', 'Home');
define('CORE_RELEASE', '20240130'); define('CORE_RELEASE', '20240429');
define('CORE_FIXBUG' , '10200000'); define('CORE_FIXBUG' , '10020100');
} }

View File

@@ -0,0 +1,10 @@
<?php
if(!defined('IN_OAOOA')) {
exit('Access Denied');
}
@set_time_limit(0);
$limit = 5;
//获取需要插入任务
foreach(DB::fetch_all("select id from %t where 1 order by dateline asc limit 0,$limit",array('ai_cron')) as $v){
dfsockopen(getglobal('localurl') . 'misc.php?mod=aicrontotask&id=' .$v['id'], 0, '', '', false, '', 1);
}

View File

@@ -0,0 +1,8 @@
<?php
if (!defined('IN_OAOOA')) {
exit('Access Denied');
}
@set_time_limit(0);
dfsockopen(getglobal('localurl') . 'misc.php?mod=doaitask', 0, '', '', false, '', 1);

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