This commit is contained in:
zyx0814
2024-04-30 22:55:18 +08:00
Unverified
parent 98d8cfe37b
commit bbae232e49
730 changed files with 28811 additions and 6221 deletions

File diff suppressed because one or more lines are too long

View File

@@ -1,17 +1,18 @@
## PicHome Home 2.0.2 更新说明
## PicHome Home 2.0.1 更新说明
### 1增加搜索设置应用,同时单页增加搜索模块
### 2修复billfish库颜色导入处理错误问题
### 3更改腾讯云存储eagle库处理提升导入效率
### 4处理描述字段支持更多内容输入
### 5修复已登录用户登录不了后台的bug
### 6优化ph库上传及其逻辑处理
### 7处理部分路径图片加载不到的bug,优化页面加载速度
### 8修复修改站点logo不生效的bug
### 9重写登录注册页
### 10修复其他已知bug
1.增加AI大模型接入实现AI自动打标签PH库和普通目录支持、修改文件名PH库支持以及描述功能PH库和普通目录支持。已支持星火大模型后续会陆续增加其他在线模型与私有模型接口。
2.支持文件大模型AI对话已支持图片对话所有库支持
3.增加PH库和普通目录的文件封面替换和恢复功能
4.增加PH库和普通目录的文件多预览图功能可以为大部分类型文件增加多张预览图。文档音视频不支持
5.库管理页面增加任务列表,可查看库内缩略图生成及批量任务执行进度
6.修复缩略图及相关计划任务执行异常问题
7.修复billfish库导入标签增减问题目录变化问题
8.修复手机端详情页不能正常访问的bug
9.优化普通目录缩略图生成逻辑,提升生成效率,优化普通目录展示逻辑(缩略图未生成时,展示图片类文件的原文件,即页面不会在导入图片后出现空白)
10.优化左侧分类树加载逻辑,提升页面加载效率
11.其他已知bug修复系统加载速度优化
## PicHome Home 2.0.1 升级到 2.0.2 升级方法
### 1复制所有文件覆盖到网站目录
### 2运行 http(s)://网站域名ip)/install/update.php按提示步骤完成升级
### 3升级完成后使用管理员登录站点进入系统设置打开站点并且进入 系统工具 更新系统缓存
## PicHome Home 2.0.2 升级到 2.1.0 升级方法
1复制所有文件覆盖到网站目录
2运行 http(s)://网站域名ip)/install/update.php按提示步骤完成升级
3升级完成后使用管理员登录站点进入系统设置打开站点并且进入 系统工具 更新系统缓存

View File

@@ -1417,6 +1417,10 @@ $lang = array
'imgwater_image_watermark_preview'=>'Preview watermark effect',
'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_tips'=>'请提交后再预览',
//管理员登录页
'title_admincp'=>'管理员登录入口',
'login_cplock' => '您的管理面板已经锁定! <br>请在<b> {ltime} </b>秒以后重新访问',
);

View File

@@ -1,6 +1,12 @@
input:-webkit-autofill {
box-shadow: 0 0 0px 1000px white inset !important;
}
body,html{
height:100%;
overflow: hidden;
margin: 0;
padding: 0;
}
.mainContainer {
position: absolute;
height: 100%;
@@ -11,23 +17,32 @@ input:-webkit-autofill {
height: 100%;
width: 100%
}
.loginContainer tr td{
padding:0 10px;
}
.logintips {
color: red;
line-height: 30px;
padding: 20px;
width: 350px;
background: #FFF;
border-radius: 5px;
width: 400px;
border-radius: 20px;
border: 1px solid #e3e3e3;
-webkit-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);
font-size: 20px;
line-height: 2.5;
text-shadow: 1px 1px 1px RGBA(0,0,0,.3);
background: RGBA(255,255,255,.8);
}
#loginform {
width: 350px;
width: 400px;
margin: 0;
text-align: center;
}
.login h4 {
height: 35px;
margin-bottom: 10px;
@@ -39,13 +54,13 @@ input:-webkit-autofill {
text-align: center;
}
.avatarContainer img {
max-width: 128px;
max-width: 100%;
max-height: 128px;
}
.avatarContainer .maintitle{
font-size:20px;
font-weight: 600;
padding-top:10px;
font-weight: 700;
padding-top:20px;
}
#admin_password_Container {
padding: 30px 0 30px 0;
@@ -57,7 +72,7 @@ input:-webkit-autofill {
padding: 30px;
text-align: center;
background-color: #FFF;
border-radius: 5px;
border-radius: 20px;
border: 1px solid #e3e3e3;
-webkit-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;
font-size: 14px;
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 {
box-shadow: 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 {
text-align: left
}
@@ -128,3 +118,109 @@ input[type="password"]:focus, input[type="text"]:focus {
font-size: 45px;
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%;
}
}

View File

@@ -11,45 +11,13 @@ if (!defined('IN_OAOOA') ) {
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();
if ($admincp -> cpaccess == -1) {
if ($admincp -> cpaccess == -1 || $admincp -> cpaccess == -4) {
$ltime = $this -> sessionlife - (TIMESTAMP - $this -> adminsession['dateline']);
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 {
html_login_form();
}
@@ -59,9 +27,7 @@ function html_login_header($form = true) {
global $_G;
$uid = getglobal('uid');
$charset = CHARSET;
$lang = &lang();
$title = $lang['login_title'];
$tips = $lang['login_tips'];
$title = lang('title_admincp');
echo <<<EOT
<!DOCTYPE>
@@ -71,16 +37,8 @@ function html_login_header($form = true) {
<base href="{$_G['siteurl']}">
<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">
<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="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/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>
<body>
EOT;
@@ -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%">
</div>
<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">
EOT;
}
@@ -118,51 +76,41 @@ EOT;
function html_login_form() {
global $_G;
$uid = getglobal('uid');
$isguest = !getglobal('uid');
$lang1 = lang();
$year=dgmdate(TIMESTAMP,'Y');
$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');
$avatarstatus=getglobal('avatarstatus','member');
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{
$avastar = avatar_block($uid);
}
$_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>';
$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
<form method="post" name="login" id="loginform" action="$extra" onsubmit="pwmd5('admin_password')">
<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="avatarContainer">$avastar</div>
$loginuser
<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>
<input name="submit" value="$lang1[login]" type="submit" class="btn btn-primary" />
<div class="copyright">Powered by <a href="https://www.oaooa.com/" target="_blank">Pichome</a> &copy; 2012-$year</div>
<button name="submit" type="submit" class="btn btn-primary btn-block btn-lg" >$placeholder_login</button>
</div>
</form>
<script type="text/JavaScript">
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>
<div class="copyright">Powered by <a href="https://www.oaooa.com/" target="_blank">Pichome</a> &copy; 2012-$year</div>
EOT;
}
?>

File diff suppressed because it is too large Load Diff

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 @@
.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

@@ -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-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-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-6a900ee1.a62df9f6.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-8b3badce.b5cb1c65.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-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.6b07a5d0.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-6a900ee1.618b2392.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-8b3badce.fccf1043.js rel=prefetch><link href=/admin/setting/dist/js/chunk-e9e5fa9a.322b6d2c.js rel=prefetch><link href=/admin/setting/dist/js/setting_temp.7e3b072c.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.76165d16.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.76165d16.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

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-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

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

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

View File

@@ -104,6 +104,8 @@ if($operation == 'getApp'){//获取当前用户应用
}else{
// 地址栏名称
$navtitle = $_G['setting']['sitename'];
// 地址栏
$siteurl = $_G['siteurl'];
// 获取hash
$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']));
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="el-page-header">
@@ -23,4 +23,29 @@
{eval echo avatar_block($_G[uid]);}
</el-avatar>
</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']['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']['dlikehex'] = 1;
$_config['security']['querysafe']['afullnote'] = 0;

View File

@@ -153,7 +153,7 @@ class template {
$template = preg_replace("/\<\!\-\-\{(.+?)\}\-\-\>/s", "{\\1}", $template);
// js的lang替换
$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);
// 模版__lang替换
$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) {
return $this -> loadjstemplate($matches);
return $this -> loadjstemplate($matches);
}
function parse_template_callback_hook($matches){
@@ -337,10 +337,11 @@ class template {
},$paramet);
$src =DZZ_ROOT.'/' . $parameter;
$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);
$_G['template_paramet_replace_value'] = $paramet;
if(!$content){
$return = preg_replace_callback("/<script([^>]+?)src=\"(.+?)\"(.*?)>[\s\S]*?/is",function($m){
@@ -371,7 +372,8 @@ class template {
fwrite($fp, $jscontent);
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 '<script'.$m[1].'src="'.getglobal('template_paramet_replace_value').'"'.$m[3].'>';
},$matches[0]);
@@ -382,6 +384,7 @@ class template {
return '<script'.$m[1].'src="'.getglobal('template_paramet_replace_value').'"'.$m[3].'>';
},$matches[0]);
unset($_G['template_paramet_replace_value']);
return $return;
}
// 模版lang替换

View File

@@ -106,6 +106,11 @@
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){
$path = self::clean($path);

View File

@@ -885,7 +885,7 @@
else{
$qcosimageexts = getglobal('config/qcosimage') ? explode(',',getglobal('config/qcosimage')):array('jpeg','jpg', 'png', 'gif', 'webp','bmp');
if(!in_array($filedirextension,$qcosimageexts)){
return false;
return io_dzz::createThumbByOriginal($path, $data,$width, $height ,$thumbtype, $original , $extraparams,$filesize);
}
if($filedirextension == 'gif'){
$thumbext = 'gif';

View File

@@ -248,7 +248,7 @@ class io_dzz extends io_api
}
}
}
private static function saveCache($path, $str)
{
global $_G;
@@ -263,10 +263,10 @@ class io_dzz extends io_api
), false, true);
}
}
private static function deleteCache($path)
{
$cachekey = 'dzz_upload_' . md5($path);
if(memory('check')){
memory('rm',$cachekey);
@@ -594,6 +594,7 @@ class io_dzz extends io_api
public function getMeta($path, $getimagedata = 0)
{
if(strpos($path, 'attach::') === 0){
global $Types;
$attachment = C::t('attachment')->fetch(intval(str_replace('attach::', '', $path)));
$bz = io_remote::getBzByRemoteid($attachment['remoteid']);
$data = array(
@@ -606,7 +607,15 @@ class io_dzz extends io_api
'path'=>$bz.$attachment['attachment'],
'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)){
$data = C::t('pichome_resources')->fetch_data_by_rid($path);
return $data;
@@ -738,21 +747,21 @@ class io_dzz extends io_api
$attach = C::t('attachment')->fetch(intval(str_replace('attach::', '', $path)));
if($attach['remote'] > 0){
$bz = io_remote::getBzByRemoteid($attach['remote']);
return IO::getFileUri($bz.$attach['attachment']);
$uri = IO::getFileUri($bz.$attach['attachment']);
}else{
return getglobal('setting/attachurl') . $attach['attachment'];
$uri = getglobal('setting/attachurl') . $attach['attachment'];
}
}elseif(preg_match('/^\w{32}$/',$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){
$path = str_replace('dzz::','',$path);
return getglobal('setting/attachurl') . $path;
$uri = getglobal('setting/attachurl') . $path;
}else{
return $path;
$uri = $path;
}
return preg_match( '/^http(s)?:\\/\\/.+/',$uri) ? $uri:getglobal('siteurl') .$uri;
}
//获取文件的真实地址
@@ -772,7 +781,7 @@ class io_dzz extends io_api
$path = str_replace('dzz::','',$path);
return getglobal('setting/attachdir') . $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']);
}else{
return $path;
@@ -1084,7 +1093,7 @@ class io_dzz extends io_api
$bz = io_remote::getBzByRemoteid($defaultspace['remoteid']);
$thumbpath = $bz.$thumbpath;
if($thumbpath){
$img = IO::getFileuri($thumbpath);
$img = IO::getFileUri($thumbpath);
if ($returnurl) return $img;
else IO::output_thumb($img);
}else{
@@ -1345,6 +1354,142 @@ class io_dzz extends io_api
if ($returnurl) return $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)

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

@@ -14,7 +14,7 @@ if (!defined('IN_OAOOA')) {
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()
{
@@ -46,7 +46,8 @@ class table_form_setting extends dzz_table
$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;
}

View File

@@ -24,12 +24,19 @@ class table_form_setting_filedcat extends dzz_table
$data=parent::fetch($id);
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){
$data=array();
foreach(DB::fetch_all("select * from %t where tabgroupid = %d order by disp",array($this->_table,$tabgroupid)) as $value){
$data[$value['id']]=$value;
}
Hook::listen("filedcatFilter",$data);
return $data;
}
public function delete_by_id($id,$field){

View File

@@ -45,6 +45,7 @@ class table_pichome_folder extends dzz_table
$return = ['fid'=>$fid,'level'=>$level,'pathkey'=>$setarr['pathkey']];
}
// }
Hook::listen('folderdataFilter',$return,true);
return $return;
}
@@ -141,6 +142,12 @@ class table_pichome_folder extends dzz_table
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){
if(!$folder = parent::fetch($fid)) return false;
if(parent::update($fid,['fname'=>$name])){
@@ -249,48 +256,16 @@ class table_pichome_folder extends dzz_table
public function fetch_all_folder_by_appid($appid,$pfid='',$i=1){
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;
$j = $i+1;
$v['children'] = $this->fetch_all_folder_by_appid($appid,$v['fid'],$j);
$returndata[] = $v;
}
Hook::listen('folderdataFilter',$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=[]){
@@ -298,26 +273,36 @@ class table_pichome_folder extends dzz_table
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){
$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 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['filenum'] = 0;
$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,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
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['filenum'] = 0;
$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 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=''){
$folderdata = [];
$wheresql = ' fname like %s ';
@@ -458,7 +443,7 @@ class table_pichome_folder extends dzz_table
}
public function update_data_by_fids($appid,$fids,$data){
if(!is_array($fids)) $fids = (array)$fids;
if(parent::update($fids,$data)){
if($this->updateByFids($fids,$data)){
$hookindex = ['fids'=>$fids,'appid'=>$appid];
Hook::listen('updatedataafter',$hookindex);
}
@@ -484,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));
}
}
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();
}
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']))){
$rid = $setarr['rid'];
unset($setarr['rid']);
@@ -100,9 +102,10 @@
}
public function get_foldername_by_rid($rid){
$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']];
}
Hook::listen('folderdataFilter',$foldernames,true);
return $foldernames;
}
public function fetch_rid_by_fids($fids,$limit = 6,$rid=''){

View File

@@ -120,16 +120,17 @@ class table_pichome_resources extends dzz_table
public function delete_by_rid($rids, $uid = 0, $username = '')
{
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_folderresources')->delete_by_rid($rids);
C::t('pichome_palette')->delete_by_rid($rids);
C::t('pichome_comments')->delete_by_rid($rids);
C::t('pichome_resourcestag')->delete_by_rid($rids);
C::t('pichome_share')->delete_by_rid($rids);
C::t('thumb_record')->delete_by_rid($rids);
//C::t('video_record')->delete_by_rid($rids);
//C::t('pichome_view')->delete_by_rid($rids);
C::t('thumb_record')->delete_by_rid($rids,$vapptype);
C::t('thumb_preview')->delete_by_rid($rids);
C::t('pichome_resourcestab')->delete_by_rid($rids);
C::t('ffmpegimage_cache')->delete_by_path($rids);
//移除文件夹封面数据
@@ -293,6 +294,7 @@ class table_pichome_resources extends dzz_table
public function getOpensrc($ext, $bz)
{
$openexts = C::t('app_open')->fetch_all_ext();
// print_r($openexts);die;
$bzarr = explode(':', $bz);
$bzpre = $bzarr[0];
$openlist = [];
@@ -319,15 +321,23 @@ class table_pichome_resources extends dzz_table
{
if (!is_array($rids)) $rids = (array)$rids;
$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) {
if ($v['rid']) $return[$v['rid']]['imgstatus'] = 1;
if ($v['sstatus']) {
$uri = IO::getFileuri($v['spath']);
$return[$v['rid']]['icondata'] =preg_match( '/^http(s)?:\\/\\/.+/',$uri) ? $uri:getglobal('siteurl') .$uri;
$return[$v['rid']]['icondata'] =IO::getFileUri($v['spath']);
} else $return[$v['rid']]['icondata'] = false;
if ($v['lstatus']) {
$uri = IO::getFileuri($v['lpath']);
$return[$v['rid']]['originalimg'] = preg_match( '/^http(s)?:\\/\\/.+/',$uri) ? $uri:getglobal('siteurl') . $uri;
$return[$v['rid']]['originalimg'] =IO::getFileUri($v['lpath']);
} else $return[$v['rid']]['originalimg'] = false;
}
return $return;
@@ -355,27 +365,42 @@ class table_pichome_resources extends dzz_table
$largethumbparams = ['rid' => $resourcesdata['rid'], 'hash' => VERHASH, 'download' => $download,
'thumbsign' => '1','path'=>$resourcesdata['path'], 'ext' => $resourcesdata['ext'], 'appid' => $resourcesdata['appid'],'hasthumb'=>$resourcesdata['hasthumb']];
if ($apptype == 3) {
$thumbdata = C::t('thumb_record')->fetch($resourcesdata['rid']);
if ($thumbdata['sstatus']) $imgdata['icondata'] = getglobal('siteurl') . IO::getFileuri($thumbdata['spath']);
else $imgdata['icondata'] = false;
if ($thumbdata['lstatus']) $imgdata['originalimg'] = getglobal('siteurl') . 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(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;
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{
$thumbdata = C::t('thumb_record')->fetch($resourcesdata['rid']);
if ($thumbdata['sstatus']) $imgdata['icondata'] = getglobal('siteurl') . IO::getFileuri($thumbdata['spath']);
if ($thumbdata['sstatus']) $imgdata['icondata'] = IO::getFileUri($thumbdata['spath']);
else $imgdata['icondata'] = false;
if ($thumbdata['lstatus']) $imgdata['originalimg'] = getglobal('siteurl') . IO::getFileuri($thumbdata['lpath']);
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 {
$imgdata['icondata'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . Pencode($smallthumbparams, 0, '') . '&' . VERHASH;
@@ -441,26 +466,36 @@ class table_pichome_resources extends dzz_table
}
break;
case 1:
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;
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{
$thumbdata = C::t('thumb_record')->fetch($resourcesdata['rid']);
if ($thumbdata['sstatus']) $imgdata['icondata'] = getglobal('siteurl') . IO::getFileuri($thumbdata['spath']);
else $imgdata['icondata'] = false;
if ($thumbdata['lstatus']) $imgdata['originalimg'] = getglobal('siteurl') . IO::getFileuri($thumbdata['lpath']);
else $imgdata['originalimg'] = (!$return) ? false: getglobal('siteurl') . 'index.php?mod=io&op=createThumb&path='.$resourcesdata['dpath'].'&size=large';
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:
$thumbdata = C::t('thumb_record')->fetch($resourcesdata['rid']);
if ($thumbdata['sstatus']) $imgdata['icondata'] = getglobal('siteurl') . IO::getFileuri($thumbdata['spath']);
else $imgdata['icondata'] = false;
if ($thumbdata['lstatus']) $imgdata['originalimg'] = getglobal('siteurl') . IO::getFileuri($thumbdata['lpath']);
else $imgdata['originalimg'] = (!$return) ? false: getglobal('siteurl') . 'index.php?mod=io&op=createThumb&path='.$resourcesdata['dpath'].'&size=large';
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{
$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;
}
}
@@ -512,7 +547,7 @@ class table_pichome_resources extends dzz_table
}else{
$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['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;
@@ -578,7 +613,12 @@ class table_pichome_resources extends dzz_table
}
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']);
@@ -675,7 +715,6 @@ class table_pichome_resources extends dzz_table
$width=$owidth;
$height=$oheight;
}
//Return the results
return array($width,$height);
}
public function geticondata_by_rid($rid, $onlyicon = 0,$force = 1)
@@ -697,7 +736,6 @@ class table_pichome_resources extends dzz_table
}
$download = C::t('pichome_vapp')->getpermbypermdata($resourcesdata['download'], $resourcesdata['appid'], 'download');
$imgdata = $this->getfileimageurl($resourcesdata, $vapppath, $resourcesdata['apptype'], $download);
if ($onlyicon) {
if($resourcesdata['apptype'] = 1 && !$imgdata['icondata'] && $imgdata['iconimg']){
$iconimgdata =$imgdata['iconimg'];
@@ -805,8 +843,7 @@ class table_pichome_resources extends dzz_table
if ($nfids) $setarr['level'] = implode(',', $nfids);
$setarr['dateline'] = $data['dateline'] * 1000;
}
//print_r($dataattrs);
//print_r($setarr);die;
//修改主表数据
if (C::t('pichome_resources')->update($rid, $setarr)) {//插入主表
//目录数据

View File

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

View File

@@ -14,34 +14,148 @@
parent::__construct();
}
public function add_share($rid,$stype =0){
if(!$stype && !$data = C::t('pichome_resources')->fetch($rid)) return false;
if($stype == 1 && !$data=C::t('pichome_collectlist')->fetch($rid)) return false;
public function add_share($rid,$stype =0,$params=array()){
$appid='';
$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 = [
'title'=>$data['name'],
'filepath'=>$rid,
'appid'=>($stype < 2) ? $data['appid']:'',
'appid'=>$appid,
'clid'=>isset($data['clid']) ? $data['clid']:0,
'dateline'=>TIMESTAMP,
'uid'=>getglobal('uid') ? getglobal('uid'):0,
'uid'=>getglobal('uid'),
'username'=>getglobal('username'),
'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']))){
parent::update($id,$setarr);
}else{
$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;
}
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){
$uid = getglobal('uid') ? getglobal('uid'):0;

View File

@@ -20,13 +20,19 @@
$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']))) {
unset($setarr['cid']);
if ($taggroup['catname'] != $setarr['catname']) parent::update($cid, $setarr);
if ($taggroup['catname'] != $setarr['catname']) $this->updateBycid($cid, $setarr);
return $cid;
} else {
$setarr['cid'] = $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){
$cid = random(13).$appid;
if(DB::result_first("select count(cid) from %t where cid = %s",array($this->_table,$cid))){

View File

@@ -119,8 +119,7 @@ class table_pichome_templatetagdata extends dzz_table
foreach($v['tdata'] as $k=>$val){
if($val['aid']){
$uri = IO::getFileUri('attach::'.$val['aid']);
$v['tdata'][$k]['imgurl'] =preg_match( '/^http(s)?:\\/\\/.+/',$uri) ? $uri:getglobal('siteurl').$uri;
$v['tdata'][$k]['imgurl'] =IO::getFileUri('attach::'.$val['aid']);
}
if(!$val['link']) $val['tdata'][$k]['url'] = $val['linkval'] ? $val['linkval']:'';
else{

View File

@@ -15,6 +15,23 @@ class table_pichome_vapp extends dzz_table
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)
{
$show = '';

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();
}
public function insert_data($setarr,$isreturn = false)
{
@@ -75,7 +75,7 @@
return $rdata;
}
public function delete_by_rid($rids)
public function delete_by_rid($rids,$vapptype)
{
if(!is_array($rids)) $rids = (array)$rids;
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['opath']) IO::Delete($v['opath']);
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

@@ -11,8 +11,8 @@ if(!defined('IN_OAOOA')) {
}
if(!defined('CORE_VERSION')) {
define('CORE_VERSION', '10.2.0.2');
define('CORE_VERSION', '10.2.1.0');
define('CORE_VERSION_LEVEL', 'Home');
define('CORE_RELEASE', '20240308');
define('CORE_FIXBUG' , '10020200');
define('CORE_RELEASE', '20240429');
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);

View File

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

View File

@@ -9,7 +9,7 @@ foreach(DB::fetch_all("select * from %t where isdelete = 0 and `type` != %d and
//固定频率时
if($v['crontype']){
$corntime = $v['crontime']*60*60;
// $corntime = 60;
if($corntime+$v['dateline'] <= TIMESTAMP ){
dfsockopen(getglobal('localurl') . 'misc.php?mod=initexport&appid=' . $appid, 0, '', '', false, '', 1);
}

View File

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

View File

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

View File

@@ -6,6 +6,5 @@ if(!defined('IN_OAOOA')) {
//获取正在执行导入任务的库
foreach(DB::fetch_all("select * from %t where isdelete = 0 and `type` != %d and state =%d ",array('pichome_vapp',3,2)) as $v){
$appid = $v['appid'];
//固定频率时
dfsockopen(getglobal('localurl') . 'misc.php?mod=exportfile&appid=' . $appid, 0, '', '', false, '', 1);
}

View File

@@ -14,7 +14,6 @@ $dzz->init();
Hook::listen('dzz_initafter');//初始化后钩子
$files = Hook::listen('dzz_route',$_GET);//路由钩子,返回文件路径
foreach($files as $v){
require $v;//包含文件
}

View File

@@ -472,14 +472,13 @@ function dzzdecode($string, $key = '', $ckey_length = 0)
);
返回加密字符串
*/
function Pencode($params = array(), $expiry = 0, $key = '')
{
$arr = array();
foreach ($params as $k => $v) {
$arr[] = $k . ':' . $v;
function Pencode($params=array(),$expiry=0,$key=''){
$arr=array();
foreach($params as $k => $v){
$arr[]=$k.':'.base64_encode($v);
}
if ($arr) {
return dzzencode(implode('|', $arr), $key, $expiry);
if($arr){
return dzzencode(implode('|',$arr),$key,$expiry);
}
return '';
}
@@ -493,18 +492,18 @@ function Pencode($params = array(), $expiry = 0, $key = '')
);
*/
function Pdecode($string, $key = '')
{
if (!$str = dzzdecode($string, $key)) return array();
$ret = array();
if (strpos($str, '|') !== false) {
$arr = explode('|', $str);
foreach ($arr as $key => $value) {
$arr1 = explode(':', $value);
$ret[$arr1[0]] = $arr1[1];
function Pdecode($string, $key = ''){
if(!$str=dzzdecode($string,$key)) return array();
$ret=array();
if(strpos($str,'|')!==false){
$arr=explode('|',$str);
foreach($arr as $key => $value){
$arr1=explode(':',$value);
$ret[$arr1[0]]=base64_decode($arr1[1]);
}
} else {
$ret['path'] = $str;
}else{
$ret['path']=$str;
}
return $ret;
}
@@ -771,7 +770,7 @@ function random($length, $numeric = 0)
}
$max = strlen($seed) - 1;
for ($i = 0; $i < $length; $i++) {
$hash .= $seed{random_int(0, $max)};
$hash .= $seed[random_int(0, $max)];
}
return $hash;
}

View File

@@ -43,12 +43,14 @@ EOT;
$_G['setting']['mail']['mailsend'] = $_G['setting']['mail']['mailsend'] ? $_G['setting']['mail']['mailsend'] : 1;
if($_G['setting']['mail']['mailsend'] == 3) {
$email_from = empty($from) ? $_G['setting']['adminemail'] : $from;
$email_from = empty($from) ? ($_G['setting']['adminemail']?$_G['setting']['adminemail']:$_G['setting']['mail']['from']) : $from;
} else {
$email_from = $from == '' ? '=?'.CHARSET.'?B?'.base64_encode($_G['setting']['sitename'])."?= <".$_G['setting']['adminemail'].">" : (preg_match('/^(.+?) \<(.+?)\>$/',$from, $mats) ? '=?'.CHARSET.'?B?'.base64_encode($mats[1])."?= <$mats[2]>" : $from);
$email_from = $_G['setting']['mail']['from'];
//$email_from = (empty($from) ? '=?'.CHARSET.'?B?'.base64_encode($_G['setting']['sitename'])."?= <".$_G['setting']['adminemail'].">" : (preg_match('/^(.+?)\s+\<(.+?)\>$/',$from, $mats) ? '=?'.CHARSET.'?B?'.base64_encode($mats[1])."?= <$mats[2]>" : $from));
}
$email_to = preg_match('/^(.+?) \<(.+?)\>$/',$toemail, $mats) ? ($mailusername ? '=?'.CHARSET.'?B?'.base64_encode($mats[1])."?= <$mats[2]>" : $mats[2]) : $toemail;
$email_to = preg_match('/^(.+?)\s*\<(.+?)\>$/',$toemail, $mats) ? ($mailusername ? '=?'.CHARSET.'?B?'.base64_encode($mats[1])."?= <$mats[2]>" : $mats[2]) : $toemail;
$email_subject = '=?'.CHARSET.'?B?'.base64_encode(preg_replace("/[\r|\n]/", '', '['.$_G['setting']['sitename'].'] '.$subject)).'?=';
@@ -65,7 +67,7 @@ EOT;
} elseif($_G['setting']['mail']['mailsend'] == 2) {
if(!$fp = fsocketopen($_G['setting']['mail']['server'], $_G['setting']['mail']['port'], $errno, $errstr, 30)) {
runlog('SMTP', "({$_G[setting][mail][server]}:{$_G[setting][mail][port]}) CONNECT - Unable to connect to the SMTP server", 0);
runlog('SMTP', "({$_G['setting']['mail']['server']}:{$_G['setting']['mail']['port']}) CONNECT - Unable to connect to the SMTP server", 0);
return false;
}
@@ -73,14 +75,14 @@ EOT;
$lastmessage = fgets($fp, 512);
if(substr($lastmessage, 0, 3) != '220') {
runlog('SMTP', "{$_G[setting][mail][server]}:{$_G[setting][mail][port]} CONNECT - $lastmessage", 0);
runlog('SMTP', "{$_G['setting']['mail']['server']}:{$_G['setting']['mail']['port']} CONNECT - $lastmessage", 0);
return false;
}
fputs($fp, ($_G['setting']['mail']['auth'] ? 'EHLO' : 'HELO')." uchome\r\n");
fputs($fp, ($_G['setting']['mail']['auth'] ? 'EHLO' : 'HELO')." pichome\r\n");
$lastmessage = fgets($fp, 512);
if(substr($lastmessage, 0, 3) != 220 && substr($lastmessage, 0, 3) != 250) {
runlog('SMTP', "({$_G[setting][mail][server]}:{$_G[setting][mail][port]}) HELO/EHLO - $lastmessage", 0);
runlog('SMTP', "({$_G['setting']['mail']['server']}:{$_G['setting']['mail']['port']}) HELO/EHLO - $lastmessage", 0);
return false;
}
@@ -90,26 +92,25 @@ EOT;
}
$lastmessage = fgets($fp, 512);
}
if($_G['setting']['mail']['auth']) {
fputs($fp, "AUTH LOGIN\r\n");
$lastmessage = fgets($fp, 512);
if(substr($lastmessage, 0, 3) != 334) {
runlog('SMTP', "({$_G[setting][mail][server]}:{$_G[setting][mail][port]}) AUTH LOGIN - $lastmessage", 0);
runlog('SMTP', "({$_G['setting']['mail']['server']}:{$_G['setting']['mail']['port']}) AUTH LOGIN - $lastmessage", 0);
return false;
}
fputs($fp, base64_encode($_G['setting']['mail']['auth_username'])."\r\n");
$lastmessage = fgets($fp, 512);
if(substr($lastmessage, 0, 3) != 334) {
runlog('SMTP', "({$_G[setting][mail][server]}:{$_G[setting][mail][port]}) USERNAME - $lastmessage", 0);
runlog('SMTP', "({$_G['setting']['mail']['server']}:{$_G['setting']['mail']['port']}) USERNAME - $lastmessage", 0);
return false;
}
fputs($fp, base64_encode($_G['setting']['mail']['auth_password'])."\r\n");
$lastmessage = fgets($fp, 512);
if(substr($lastmessage, 0, 3) != 235) {
runlog('SMTP', "({$_G[setting][mail][server]}:{$_G[setting][mail][port]}) PASSWORD - $lastmessage", 0);
runlog('SMTP', "({$_G['setting']['mail']['server']}:{$_G['setting']['mail']['server']}) PASSWORD - $lastmessage", 0);
return false;
}
@@ -122,7 +123,7 @@ EOT;
fputs($fp, "MAIL FROM: <".preg_replace("/.*\<(.+?)\>.*/", "\\1", $email_from).">\r\n");
$lastmessage = fgets($fp, 512);
if(substr($lastmessage, 0, 3) != 250) {
runlog('SMTP', "({$_G[setting][mail][server]}:{$_G[setting][mail][port]}) MAIL FROM - $lastmessage", 0);
runlog('SMTP', "({$_G['setting']['mail']['server']}:{$_G['setting']['mail']['port']}) MAIL FROM - $lastmessage", 0);
return false;
}
}
@@ -132,14 +133,14 @@ EOT;
if(substr($lastmessage, 0, 3) != 250) {
fputs($fp, "RCPT TO: <".preg_replace("/.*\<(.+?)\>.*/", "\\1", $toemail).">\r\n");
$lastmessage = fgets($fp, 512);
runlog('SMTP', "({$_G[setting][mail][server]}:{$_G[setting][mail][port]}) RCPT TO - $lastmessage", 0);
runlog('SMTP', "({$_G['setting']['mail']['server']}:{$_G['setting']['mail']['port']}) RCPT TO - $lastmessage", 0);
return false;
}
fputs($fp, "DATA\r\n");
$lastmessage = fgets($fp, 512);
if(substr($lastmessage, 0, 3) != 354) {
runlog('SMTP', "({$_G[setting][mail][server]}:{$_G[setting][mail][port]}) DATA - $lastmessage", 0);
runlog('SMTP', "({$_G['setting']['mail']['server']}:{$_G['setting']['mail']['port']}) DATA - $lastmessage", 0);
return false;
}
@@ -157,7 +158,7 @@ EOT;
fputs($fp, "$email_message\r\n.\r\n");
$lastmessage = fgets($fp, 512);
if(substr($lastmessage, 0, 3) != 250) {
runlog('SMTP', "({$_G[setting][mail][server]}:{$_G[setting][mail][port]}) END - $lastmessage", 0);
runlog('SMTP', "({$_G['setting']['mail']['server']}:{$_G['setting']['mail']['port']}) END - $lastmessage", 0);
}
fputs($fp, "QUIT\r\n");

View File

@@ -1,220 +1,94 @@
<?php
if(!defined('IN_OAOOA')) {
exit('Access Denied');
if (!defined('IN_OAOOA')) {
exit('Access Denied');
}
function dshowmessage($message, $url_forward = '', $values = array(), $extraparam = array(), $custom = 0) {
global $_G, $show_message;
$_G['messageparam'] = func_get_args();
if($extraparam['break']) {
return;
}
$_G['inshowmessage'] = true;
function dshowmessage($message, $url_forward = '', $values = array(), $extraparam = array(), $custom = 0)
{
global $_G, $show_message;
$_G['messageparam'] = func_get_args();
$param = array(
'header' => false,
'timeout' => null,
'refreshtime' => null,
'closetime' => null,
'locationtime' => null,
'alert' => null,
'return' => false,
'redirectmsg' => 0,
'msgtype' => 1,
'showmsg' => true,
'showdialog' => false,
'login' => false,
'handle' => false,
'extrajs' => '',
'striptags' => false,
);
if ($extraparam['break']) {
return;
}
$_G['inshowmessage'] = true;
$navtitle = lang('board_message');
$param = array(
'header' => false,
'timeout' => null,
'refreshtime' => null,
'alert' => null,
'login' => false,
'location'=>false,
'extrajs' => '',
);
if($custom) {
$alerttype = 'alert_info';
$show_message = $message;
include template('common/showmessage');
dexit();
}
$navtitle = lang('board_message');
define('CACHE_FORBIDDEN', TRUE);
$_G['setting']['msgforward'] = @dunserialize($_G['setting']['msgforward']);
$handlekey = $leftmsg = '';
if ($custom) {
$alerttype = 'alert_info';
$show_message = $message;
include template('common/showmessage');
dexit();
}
define('CACHE_FORBIDDEN', TRUE);
if ($url_forward) {
$param['timeout'] = true;
}
foreach ($extraparam as $k => $v) {
$param[$k] = $v;
}
$timedefault = intval($param['refreshtime'] === null ? $_G['setting']['refreshtime'] : $param['refreshtime']);
if ($param['timeout'] !== null) {
$refreshsecond = !empty($timedefault) ? $timedefault : 3;
$refreshtime = $refreshsecond * 1000;
} else {
$refreshtime = $refreshsecond = 0;
}
if ($param['login'] && $_G['uid'] || $url_forward) {
$param['login'] = false;
}
//参数 header PHP跳转
$param['header'] = $url_forward && $param['header'] ? true : false;
if ($param['header']) {
header("HTTP/1.1 301 Moved Permanently");
dheader("location: " . str_replace('&amp;', '&', $url_forward));
dexit();
}
//location js跳转
$url_forward_js = addslashes(str_replace('\\', '%27', $url_forward));
if ($param['location'] && !empty($_G['inajax'])) {
include template('common/header_ajax');
echo '<script type="text/javascript" reload="1">window.location.href=\'' . $url_forward_js . '\';</script>';
include template('common/footer_ajax');
dexit();
}
//转登录
if ($param['login']) {
dheader('location: user.php?mod=login' . ($url_forward ? '&referer=' . urlencode($url_forward) : ''));
dexit();
}
/*if(defined('IN_MOBILE')) {
unset($extraparam['showdialog']);
unset($extraparam['closetime']);
unset($extraparam['extrajs']);
$vars = explode(':', $message);
if (count($vars) == 2) {
$show_message = lang($vars[1], $values, null, $vars[0]);
} else {
$show_message = lang($message, $values);
}
if(!$url_forward && dreferer() && IN_MOBILE == 1) {
$url_forward = $referer = dreferer();
}
if(!empty($url_forward) && strpos($url_forward, 'mobile') === false) {
$url_forward_arr = explode("#", $url_forward);
if(strpos($url_forward_arr[0], '?') !== false) {
$url_forward_arr[0] = $url_forward_arr[0].'&mobile='.IN_MOBILE;
} else {
$url_forward_arr[0] = $url_forward_arr[0].'?mobile='.IN_MOBILE;
}
$url_forward = implode("#", $url_forward_arr);
}
}*/
if ($param['alert'] === null) {
$alerttype = $url_forward ? (preg_match('/\_(succeed|success|成功)$/', $message) ? 'alert_right' : 'alert_info') : 'alert_info';
} else {
$alerttype = 'alert_' . $param['alert'];
}
if(empty($_G['inajax']) && (!empty($_GET['quickforward']) || $_G['setting']['msgforward']['quick'] && empty($extraparam['clean_msgforward']) && $_G['setting']['msgforward']['messages'] && @in_array($message, $_G['setting']['msgforward']['messages']))) {
$param['header'] = true;
}
$_GET['handlekey'] = !empty($_GET['handlekey']) && preg_match('/^\w+$/', $_GET['handlekey']) ? $_GET['handlekey'] : '';
if(!empty($_G['inajax'])) {
$handlekey = $_GET['handlekey'] = !empty($_GET['handlekey']) ? dhtmlspecialchars($_GET['handlekey']) : '';
$param['handle'] = true;
}
if(!empty($_G['inajax'])) {
$param['msgtype'] = empty($_GET['ajaxmenu']) && (empty($_POST) || !empty($_GET['nopost'])) ? 2 : 3;
}
if($url_forward) {
$param['timeout'] = true;
if($param['handle'] && !empty($_G['inajax'])) {
$param['showmsg'] = false;
}
}
foreach($extraparam as $k => $v) {
$param[$k] = $v;
}
if(array_key_exists('set', $extraparam)) {
$setdata = array('1' => array('msgtype' => 3));
if($setdata[$extraparam['set']]) {
foreach($setdata[$extraparam['set']] as $k => $v) {
$param[$k] = $v;
}
}
}
$timedefault = intval($param['refreshtime'] === null ? $_G['setting']['refreshtime'] : $param['refreshtime']);
if($param['timeout'] !== null) {
$refreshsecond = !empty($timedefault) ? $timedefault : 3;
$refreshtime = $refreshsecond * 1000;
} else {
$refreshtime = $refreshsecond = 0;
}
if($param['login'] && $_G['uid'] || $url_forward) {
$param['login'] = false;
}
$param['header'] = $url_forward && $param['header'] ? true : false;
if($_GET['ajaxdata'] === 'json') {
$param['header'] = '';
}
if($param['header']) {
header("HTTP/1.1 301 Moved Permanently");
dheader("location: ".str_replace('&amp;', '&', $url_forward));
}
$url_forward_js = addslashes(str_replace('\\', '%27', $url_forward));
if($param['location'] && !empty($_G['inajax'])) {
include template('common/header_ajax');
echo '<script type="text/javascript" reload="1">window.location.href=\''.$url_forward_js.'\';</script>';
include template('common/footer_ajax');
dexit();
}
$vars = explode(':', $message);
if(count($vars) == 2) {
$show_message = lang($vars[1], $values,null,$vars[0]);
} else {
$show_message = lang($message, $values);
}
if(isset($_GET['ajaxdata'])) {
if($_GET['ajaxdata'] === 'json') {
helper_output::json(array('message' => $show_message, 'data' => $values));
} else if($_GET['ajaxdata'] === 'html') {
helper_output::html($show_message);
}
}
if($param['msgtype'] == 2 && $param['login']) {
dheader('location: user.php?mod=login');
}
$show_jsmessage = str_replace("'", "\\'", $param['striptags'] ? strip_tags($show_message) : $show_message);
if((!$param['showmsg'] || $param['showid']) && !defined('IN_MOBILE') ) {
$show_message = '';
}
$allowreturn = !$param['timeout'] && !$url_forward && !$param['login'] || $param['return'] ? true : false;
if($param['alert'] === null) {
$alerttype = $url_forward ? (preg_match('/\_(succeed|success|成功)$/', $message) ? 'alert_right' : 'alert_info') : ($allowreturn ? 'alert_error' : 'alert_info');
} else {
$alerttype = 'alert_'.$param['alert'];
}
$extra = '';
if($param['showid']) {
$extra .= 'if($(\''.$param['showid'].'\')) {$(\''.$param['showid'].'\').innerHTML = \''.$show_jsmessage.'\';}';
}
if($param['handle']) {
$valuesjs = $comma = $subjs = '';
foreach($values as $k => $v) {
$v = daddslashes($v);
if(is_array($v)) {
$subcomma = '';
foreach ($v as $subk => $subv) {
$subjs .= $subcomma.'\''.$subk.'\':\''.$subv.'\'';
$subcomma = ',';
}
$valuesjs .= $comma.'\''.$k.'\':{'.$subjs.'}';
} else {
$valuesjs .= $comma.'\''.$k.'\':\''.$v.'\'';
}
$comma = ',';
}
$valuesjs = '{'.$valuesjs.'}';
if($url_forward) {
$extra .= 'if(typeof succeedhandle_'.$handlekey.'==\'function\') {succeedhandle_'.$handlekey.'(\''.$url_forward_js.'\', \''.$show_jsmessage.'\', '.$valuesjs.');}';
} else {
$extra .= 'if(typeof errorhandle_'.$handlekey.'==\'function\') {errorhandle_'.$handlekey.'(\''.$show_jsmessage.'\', '.$valuesjs.');}';
}
}
if($param['closetime'] !== null) {
$param['closetime'] = $param['closetime'] === true ? $timedefault : $param['closetime'];
}
if($param['locationtime'] !== null) {
$param['locationtime'] = $param['locationtime'] === true ? $timedefault : $param['locationtime'];
}
if($handlekey) {
if($param['showdialog']) {
$modes = array('alert_error' => 'alert', 'alert_right' => 'right', 'alert_info' => 'notice');
$extra .= 'hideWindow(\''.$handlekey.'\');showDialog(\''.$show_jsmessage.'\', \''.$modes[$alerttype].'\', null, '.($param['locationtime'] !== null ? 'function () { window.location.href =\''.$url_forward_js.'\'; }' : 'null').', 0, null, null, null, null, '.($param['closetime'] ? $param['closetime'] : 'null').', '.($param['locationtime'] ? $param['locationtime'] : 'null').');';
$param['closetime'] = null;
$st = '';
if($param['showmsg']) {
$show_message = '';
}
}
if($param['closetime'] !== null) {
$extra .= 'setTimeout("hideWindow(\''.$handlekey.'\')", '.($param['closetime'] * 1000).');';
}
} else {
$st = $param['locationtime'] !== null ?'setTimeout("window.location.href =\''.$url_forward_js.'\';", '.($param['locationtime'] * 1000).');' : '';
}
if(!$extra && $param['timeout']) {
$extra .= 'setTimeout("window.location.href =\''.$url_forward_js.'\';", '.$refreshtime.');';
}
$show_message .= $extra ? '<script type="text/javascript" reload="1">'.$extra.$st.'</script>' : '';
$show_message .= $param['extrajs'] ? $param['extrajs'] : '';
//print_r($param);exit($show_message);
include template('common/showmessage');
exit();
$extra = '';
if ($param['timeout']) {
$extra .= 'setTimeout("window.location.href =\'' . $url_forward_js . '\';", ' . $refreshtime . ');';
}
$show_message .= $extra ? '<script type="text/javascript" reload="1">' . $extra . '</script>' : '';
$show_message .= $param['extrajs'] ? $param['extrajs'] : '';
include template('common/showmessage');
exit();
}
?>

View File

@@ -3,7 +3,7 @@ $lang = array (
'license_not_find'=>'license.lic was not found, please put license.lic in the root directory of the website.',
'license_incorrect'=>'For illegal license.lic, please contact the official website (www.oaooa.com) to confirm license.lic are correct.',
'license_user_exceed'=>'the number of users exceeds the authorization limit, please contact the official website (www.oaooa.com) to purchase and increase the number of users.',
'license_user_sum'=>'License number of users',
'license_version'=>'License Version',
'license_to'=>'License To',
'V_Enterprise'=>'Enterprise',
@@ -90,8 +90,7 @@ $lang = array (
'theme_add_success'=>'The topic was added successfully',
'theme_set'=>'Theme setting',
'theme_manage'=>'Theme management',
'name'=>'name',
'input_name'=>'Enter a name',
'theme_name'=>'Subject name',
'all_theme'=>'All topics',
'add_theme'=>'Add topic',
@@ -99,11 +98,11 @@ $lang = array (
'uninstalled_theme'=>'Theme not installed',
'cover'=>'cover',
'preview'=>'preview',
'classify'=>'classification',
'distributed'=>'distribution',
'undistributed'=>'unallocated',
'classify_save_success'=>'The category name was saved successfully.',
'size' => 'size',
'big_small'=>'size',
'none' => 'no',
'have'=>'have',
@@ -114,11 +113,8 @@ $lang = array (
'subscriber_data_edit_success'=>'User data editing succeeded',
'subscriber_data_alter_success'=>'User data modified successfully',
'subscriber_data_item_edit_success'=>'User data item edited successfully',
'js_exit' => 'Are you sure you want to log out?',
'username' => 'username',
'nickname' => 'nickname',
'password' => 'password',
'board_message' => 'Prompt message',
'date_birth'=>'date of birth',
'cellphone'=>'Mobile phone',
'weixin'=>'We chat number',
@@ -126,7 +122,7 @@ $lang = array (
'department_position'=>'Department / Occupation',
'category_department'=>'Department',
'there_no_such_results'=>'No relevant results',
'there_no_such_content'=>'No related content',
'enable' => 'enable',
'no_enable' => 'Not enabled',
'forbidden'=>'disable',
@@ -134,14 +130,11 @@ $lang = array (
'stop'=>'stop',
'and'=>'with',
'homepage' => 'home',
'input_content' => 'Input content',
'describe' => 'description',
'input_describe_content' => 'Enter a description',
'confirms'=>'submit',
'time' => 'time',
'add_time' => 'add time',
'yes' => 'yes',
'no' => 'no',
'public' => 'public',
'delete'=>'delete',
'deleter'=>'Delete person',
@@ -156,7 +149,7 @@ $lang = array (
'secret'=>'private',
'privacy' =>'privacy',
'default_privacy' =>'Default privacy',
'label'=>'label',
'select_all' => 'select all',
'filtrate'=>'filter',
'filtrate_condition'=>'Filter condition',
@@ -168,9 +161,7 @@ $lang = array (
'possessor'=>'owner',
'download'=>'download',
'uploading'=>'New and Uploaded',
'uploading_files'=>'upload files',
'uploading_size'=>'Upload size',
'uploading_type'=>'Upload type',
'upload_installation_package'=>'Upload the installation package',
'install'=>'installation',
'been_install'=>'installed',
@@ -189,7 +180,7 @@ $lang = array (
'drag_can_be_sorted'=>'Drag to sort',
'drag_img_can_be_sorted'=>'Drag the image to sort',
'intro'=>'introductionv',
'type' => 'types of',
'type_files' => 'Document class',
'type_images' => 'Picture class',
@@ -198,14 +189,12 @@ $lang = array (
'type_package' => 'archive',
'file_type'=>'file type',
'file_location'=>'File location',
'file_name'=>'file name',
'file_size'=>'File size',
'cancel'=>'Cancel',
'share'=>'share it',
'cancel_share'=>'Cancel sharing',
'create_share_failer'=>'Create share failed',
'already_cancel'=>'cancelled',
'cancel_select'=>'cancel selection',
'creat_desktop_shortcut'=>'Create a desktop shortcut',
'author'=>'author',
'show'=>'display',
@@ -224,7 +213,7 @@ $lang = array (
'phone'=>'phone',
'relation_phone'=>'contact number',
'open'=>'turn on',
'all'=>'all',
'all_location'=>'All positions',
'add'=>'Add to',
'add_success'=>'Added successfully',
@@ -233,14 +222,7 @@ $lang = array (
'invite_member'=>'Invite members',
'member_list'=>'Member list',
'add_unsuccess_tautology'=>'Add failed, please try again later',
'monthly' => 'per month',
'weekly' => 'weekly',
'everyday' => 'daily',
'per_hour' => 'per hour',
'point' => 'minute',
'timeliness' => 'time',
'hour'=>'hour',
'minute'=>'minute',
'email'=>'mailbox',
'reset' => 'reset',
'import'=>'import',
@@ -270,6 +252,7 @@ $lang = array (
'edit_error'=>'Edit failed',
'modification'=>'modify',
'modification_success'=>'Successfully modified',
'modification_error'=>'Modification failed',
'no_modification'=>'not editable',
'revisability'=>'Can be modified',
'modification_hou'=>'After modification',
@@ -288,11 +271,8 @@ $lang = array (
'save_set'=>'Save Settings',
'set_success'=>'Successful setup',
'set_unsuccess'=>'Setup failed',
'cut'=>'cutting',
'copy'=>'copy',
'copy_success'=>'Successful copy',
'cut_success'=>'Successfully cut',
'custom'=>'customize',
'link'=>'link',
'custom_link'=>'Custom link',
'download_link'=>'Download link',
@@ -312,7 +292,7 @@ $lang = array (
'please_wait1'=>'Please wait',
'loading_please_wait'=>'Loading, please wait ...',
'loading_in'=>'loading...',
'loading'=>'loading...',
'create_in'=>'Creating...',
'are_uploading1'=>'uploading',
'are_uploading'=>'uploading...',
@@ -339,7 +319,7 @@ $lang = array (
'stopped'=>'stopped...',
'ignored'=>'Ignored...',
'are_retry'=>'Retrying...',
'submission'=>'submitting...',
'in_export'=>'Exporting...',
'in_import'=>'Importing...',
'skip_links'=>'Jump link',
@@ -357,7 +337,7 @@ $lang = array (
'open_mode'=>'Open mode',
'open_file'=>'open a file',
'advanced_options'=>'advanced options',
'name_cannot_empty'=>'Name is required',
'developer'=>'Developer',
'list'=>'List',
'list_name'=>'List name',
@@ -398,18 +378,14 @@ $lang = array (
'if_required'=>'Required or not',
'required'=>'required',
'certificate'=>'optional',
'input'=>'input',
'creation'=>'create',
'creation_success'=>'Created successfully',
'creation_unsuccess'=>'Creation failed',
'no_creation'=>'Not created',
'rechristen'=>'rename',
'rechristen_failure'=>'Rename failed',
'rechristen_error'=>'Rename error',
'movement_error'=>'Mobile error',
'format_error'=>'wrong format',
'width'=>'width',
'height'=>'height',
'lengthways_arrange'=>'Vertical arrangement',
'crosswise_arrange'=>'Horizontal arrangement',
'page_background'=>'Page background',
@@ -472,7 +448,7 @@ $lang = array (
'image_to_local_error'=>'Image localization error!',
'inadequate_capacity_space' => 'Insufficient space capacity to upload new files',
// core/template/wx_ajax.html
'please_choose'=>'please choose',
'delete_error'=>'Delete error',
'delete_error1'=>'Delete the error and try again later',
// core/misc/template/misc_seluser.html
@@ -481,7 +457,7 @@ $lang = array (
'selected'=>'chosen',
'selected_ge_user'=>'Users',
'selecte_user_to_add'=>'Select users to add',
'administrator'=>'administrator',
'need_a_administrator'=>'Need at least one administrator',
'cancel_administrator'=>'Cancel administrator',
'set_administrator'=>'Setup administrator',
@@ -513,7 +489,7 @@ $lang = array (
'lt'=>'more than the',
'gt'=>'Less than',
'In_a'=>'another',
'individual'=>'one',
// core/table/table_local_storage.php
'built_in_not_delete'=>'Built-in, can not delete',
'file_migration_not_delete'=>'Some files are not migrated and cannot be deleted',
@@ -1360,7 +1336,7 @@ Sincerely<br />
'fullblankspace' => ' ',
'search' => 'search for',
'page' => 'Page {page}',
'login_title' => 'Login to the Management Center',
@@ -1407,7 +1383,7 @@ Sincerely<br />
'already_close'=>'closed',
'open_start'=>'open',
'faq' => 'Help',
'login' => 'Sign in',
'login1' => 'Sign in',
'login_empty' => 'Sign in',
'user_login_password'=>'Password',
@@ -1486,9 +1462,8 @@ Sincerely<br />
'full_control_state'=>'Allow members to upload, create, add, edit, copy, view, and delete all files, including those of other members.',
'decryption_failure'=>'Decryption failed!',
'innerShare'=>'Internal sharing',
'confirm_message'=>'Confirmation message',
'userCenter'=>'User center',
'logout'=>'sign out',
'user_select_search_tip'=>'Search for',
@@ -1496,8 +1471,7 @@ Sincerely<br />
'user_select_title'=> 'Member selection',
'upgrade_notice_title'=>'Upgrade reminder',
'member'=>'member',
'about'=>'About',
'status'=>'Status',
'file_share'=>'File sharing',
'expires_time'=>'Expires in',
'explorer_gropuperm'=>array(
@@ -1575,21 +1549,7 @@ Sincerely<br />
'File_format'=>'File format not allowed',
'application_failed'=>'Application image upload failed',
'have_new_notifications'=>'【You have new notifications】',
'只读'=>'ReadOnly',
'只写'=>'WriteOnly',
'完全控制'=>'All Control',
'仅下载'=>'DownloadOnly',
'读写1'=>'Read Write One',
'读写2'=>'Read Write Two',
'读写3'=>'Read Write Three',
'filter_range_day'=>'Today',
'filter_range_yesterday'=>'Yesterday',
'filter_range_week'=>'Last 7 days',
'filter_range_month'=>'Last 30 days',
'filter_range_month3'=>'Last 90 days',
'filter_range_year'=>'Last 365 days',
'daysOfWeek'=>'["Su","Mo","Tu","We", "Th", "Fr","Sa"]',
'monthNames'=>'["Jan", "Feb", "Mar", "Apr", "May", "Jun","Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]',
//字段相关
@@ -1738,11 +1698,6 @@ Sincerely<br />
'fs_S_creator'=>'Creator',
'fs_S_create_time'=>'CreationTime',
'横图'=>'Horizontal',
'竖图'=>'Vertical',
'方图'=>'Square',
'细长横图'=>'Panoramic Herizontal',
'细长竖图'=>'Panoramic Vertical',
'file_down_checking'=>'Data checking',
'file_down_geting'=>'File fetching',
@@ -1751,6 +1706,190 @@ Sincerely<br />
'file_down_finishing'=>'File downloading',
'file_down_progress'=>'Progress',
'file_down_failure'=>'Download Failure',
// 新增
'themeColor'=>'Theme color matching',
'themeColor_tip'=>'Switch theme color scheme',
'display_sub_folder_content'=>'Display sub folder content',
'all'=>'all',
'input_content' => 'Input content',
'label'=>'label',
'width'=>'width',
'height'=>'height',
'width1'=>'wide',
'height1'=>'high',
'size' => 'size',
'shape'=>'shape',
'cut'=>'cutting',
'copy'=>'copy',
'copy_success'=>'Successful copy',
'copy_clipboard'=>'Successfully copied to clipboard',
'cut_success'=>'Successfully cut',
'color'=>'color',
'submit1' => 'submit',
'submission'=>'submitting...',
'submit_error'=>'Submission failed',
'submit_success'=>'Submitted successfully',
'search' => 'search',
'name'=>'name',
'input_name'=>'Enter a name',
'file_name'=>'file name',
'name_cannot_empty'=>'Name is required',
'classify'=>'classification',
'unclassify'=>'unclassify',
'confirms'=>'submit',
'cancel'=>'Cancel',
'share'=>'share',
'share_failer'=>'Sharing failed',
'cancel_share'=>'Cancel sharing',
'create_share_failer'=>'Create share failed',
'already_cancel'=>'cancelled',
'cancel_select'=>'cancel selection',
'board_message' => 'Prompt message',
'js_exit' => 'Are you sure you want to log out?',
'username' => 'username',
'nickname' => 'nickname',
'password' => 'password',
'confirm_message'=>'Confirmation message',
'userCenter'=>'User center',
'logout'=>'sign out',
'about'=>'About',
'status'=>'Status',
'login' => 'Login',
'loading'=>'loading...',
'input'=>'input',
'creation'=>'create',
'creation_success'=>'Created successfully',
'creation_unsuccess'=>'Creation failed',
'system_management'=>'system management',
'level'=>'level',
'software_name'=>'Software Name',
'version_information'=>'Version information',
'copyright_information'=>'Copyright Information',
'Website_address'=>'Website address',
'administrator'=>'administrator',
'favorite_created_success'=>'Favorite created successfully',
'file_collection_successful'=>'File collection successful',
'please_choose'=>'please choose',
// 组件收藏夹
'type' => 'type',
'collect'=>'collect',
'collect_to'=>'Collect to',
'format'=>'format',
'time' => 'time',
'add_time' => 'add time',
'modify_time' => 'Modification time',
'creation_time' => 'Creation time',
'yes' => 'yes',
'no' => 'no',
'grade'=>'grade',
'unrated'=>'Unrated',
'rate'=>'rate',
'start_date'=>'Start date',
'end_date'=>'End date',
'playback_failed'=>'Playback failed!',
'include_subordinates'=>'Include subordinates',
'select_favorites'=>'Select favorites',
'search_favorites'=>'Search favorites',
'no_favorites'=>'No favorites',
'create_favorites'=>'Create favorites',
'user_permissions'=>'User permissions',
'observer'=>'Observer',
'collaborative_members'=>'Collaborative members',
'add_cooperative_users'=>'Add cooperative users',
'name_search'=>'Name search',
'there_no_such_content'=>'No related content',
'no_data'=>'no data',
'No_relevant_options_available'=>'No relevant options available',
'custom'=>'custom',
'filter_range_day'=>'Today',
'filter_range_yesterday'=>'Yesterday',
'filter_range_week'=>'Last 7 days',
'filter_range_month'=>'Last 30 days',
'filter_range_month3'=>'Last 90 days',
'filter_range_year'=>'Last 365 days',
'daysOfWeek'=>'["Su","Mo","Tu","We", "Th", "Fr","Sa"]',
'monthNames'=>'["Jan", "Feb", "Mar", "Apr", "May", "Jun","Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]',
'accuracy'=>'accuracy',
'note'=>'note',
'annotated'=>'Annotated',
'no_note'=>'no note',
'contains_keywords'=>'Include keywords (use, separate)',
'not_have'=>'not have',
'have'=>'have',
'individual'=>'',
'monthly' => 'per month',
'weekly' => 'weekly',
'everyday' => 'daily',
'per_hour' => 'per hour',
'point' => 'minute',
'timeliness' => 'time',
'hour'=>'hour',
'minute'=>'minute',
'min'=>'min',
'max'=>'max',
'second'=>'second',
'duration'=>'duration',
'label_classification'=>'Label classification',
'logic'=>'logic',
'arbitrarily'=>'arbitrarily',
'filter_acquisition_failed'=>'Filter acquisition failed',
'all_completed'=>'completed',
'co_query'=>'Co query',
'newly_created'=>'Newly created',
'recent_updates'=>'Recent updates',
'popular_projects'=>'Popular projects',
'more'=>'more',
'license_user_sum'=>'License number of users',
'uploading_files'=>'upload files',
'uploading_files_error'=>'Upload file failed',
'uploading_size'=>'Upload size',
'uploading_type'=>'Upload type',
'enter_account'=>'Please enter your account number',
'enter_password'=>'Please enter password',
'uploading_files'=>'Upload file',
'uploading_files_error'=>'Upload file failure',
'uploading_size'=>'Upload size',
'uploading_type'=>'Upload type',
'edit'=>'edit',
'edit_success'=>'Successful editing',
'edit_error'=>'Edit failed',
//分享管理
'share_title'=>'Share Title',
'share_title_empty'=>'The sharing title cannot be empty',
'share_dateline'=>'Share Time',
'share_downloads'=>'Downloads',
'share_views'=>'Views',
'share_perm'=>'Permission',
'share_perm_0'=>'View',
'share_perm_1'=>'Download',
'share_times'=>'Times',
'share_times_tip'=>'Limit the number of shares, 0 means no limit',
'share_password'=>'Password',
'share_password_tip'=>'Leave blank to indicate no password is set',
'share_endtime'=>'Endtime',
'share_endtime_tip'=>'Leave blank to indicate no limit on endtime',
'share_stype'=>'Type',
'share_stype_0'=>'Library files',
'share_stype_1'=>'Favorite files',
'share_stype_2'=>'Favorite',
'share_stype_3'=>'Tab',
'share_status'=>'Status',
'share_status_-3'=>'Blocked',
'share_status_-2'=>'Exceeded',
'share_status_-1'=>'Expired ',
'share_status_0'=>'Normal',
'share_limit'=>'Limits',
'share_address'=>'Address',
'share_username'=>'Sharer',
'share_edit'=>'Edit',
'share_create'=>'Create',
);
?>

View File

@@ -3,7 +3,7 @@ $lang = array (
'license_not_find'=>'授权文件未找到请将授权文件license.lic)放到网站根目录下',
'license_incorrect'=>'非法授权文件请联系官网www.oaooa.com),确认授权文件是否正确',
'license_user_exceed'=>'用户数超出授权限制请联系官网www.oaooa.com),购买并增加用户数',
'license_user_sum'=>'授权用户数',
'license_version'=>'授权版本',
'license_to'=>'授权对象',
'auth_unmatch'=>'授权不匹配',
@@ -100,11 +100,11 @@ $lang = array (
'uninstalled_theme'=>'未安装主题',
'cover'=>'封面',
'preview'=>'预览',
'classify'=>'分类',
'distributed'=>'分配',
'undistributed'=>'未分配',
'classify_save_success'=>'分类名称保存成功',
'size' => '尺寸',
'big_small'=>'大小',
'none' => '无',
'have'=>'有',
@@ -115,11 +115,8 @@ $lang = array (
'subscriber_data_edit_success'=>'用户资料编辑成功',
'subscriber_data_alter_success'=>'用户资料修改成功',
'subscriber_data_item_edit_success'=>'用户资料项编辑成功',
'js_exit' => '您确定要注销登录?',
'nickname' => '用户名',
'username' => '姓名',
'password' => '密 码',
'board_message' => '提示信息',
'date_birth'=>'出生日期',
'cellphone'=>'手机',
'weixin'=>'微信号',
@@ -127,7 +124,7 @@ $lang = array (
'department_position'=>'部门职位',
'category_department'=>'所属部门',
'there_no_such_results'=>'没有相关的结果',
'there_no_such_content'=>'没有相关的内容',
'enable' => '启用',
'no_enable' => '不启用',
'forbidden'=>'禁用',
@@ -135,14 +132,11 @@ $lang = array (
'stop'=>'停止',
'and'=>'和',
'homepage' => '首页',
'input_content' => '输入内容',
'describe' => '描述',
'input_describe_content' => '输入描述内容',
'confirms'=>'确定',
'time' => '时间',
'add_time' => '添加时间',
'yes' => '是',
'no' => '否',
'public' => '公开',
'delete'=>'删除',
'deleter'=>'删除人',
@@ -157,7 +151,7 @@ $lang = array (
'secret'=>'私密',
'privacy' =>'隐私',
'default_privacy' =>'默认隐私',
'label'=>'标签',
'select_all' => '全选',
'filtrate'=>'筛选',
'filtrate_condition'=>'筛选条件',
@@ -167,11 +161,9 @@ $lang = array (
'sort_desc'=>'降序',
'sort_asc'=>'升序',
'possessor'=>'所有者',
'download'=>'下载',
'uploading'=>'新建和上传',
'uploading_files'=>'上传文件',
'uploading_size'=>'上传大小',
'uploading_type'=>'上传类型',
'upload_installation_package'=>'上传安装包',
'install'=>'安装',
'been_install'=>'已安装',
@@ -190,7 +182,7 @@ $lang = array (
'drag_can_be_sorted'=>'拖动可以排序',
'drag_img_can_be_sorted'=>'拖动图片可以排序',
'intro'=>'简介',
'type' => '类型',
'type_files' => '文档类',
'type_images' => '图片类',
@@ -201,12 +193,7 @@ $lang = array (
'file_location'=>'文件位置',
'file_name'=>'文件名称',
'file_size'=>'文件大小',
'cancel'=>'取消',
'share'=>'分享',
'cancel_share'=>'取消分享',
'create_share_failer'=>'创建分享失败',
'already_cancel'=>'已取消',
'cancel_select'=>'取消选择',
'creat_desktop_shortcut'=>'创建桌面快捷方式',
'author'=>'作者',
'show'=>'显示',
@@ -218,14 +205,14 @@ $lang = array (
'price'=>'价格',
'free'=>'免费',
'detailed_introduction'=>'详细介绍',
'title_login'=>'登录',
'relation'=>'联系',
'site'=>'地址',
'introduce'=>'介绍',
'phone'=>'电话',
'relation_phone'=>'联系电话',
'open'=>'打开',
'all'=>'全部',
'all_location'=>'全部位置',
'add'=>'添加',
'add_success'=>'添加成功',
@@ -234,14 +221,7 @@ $lang = array (
'invite_member'=>'邀请成员',
'member_list'=>'成员列表',
'add_unsuccess_tautology'=>'添加失败,请稍后重试',
'monthly' => '每月',
'weekly' => '每周',
'everyday' => '每日',
'per_hour' => '每小时',
'point' => '分',
'timeliness' => '时',
'hour'=>'小时',
'minute'=>'分钟',
'email'=>'邮箱',
'reset' => '重置',
'import'=>'导入',
@@ -271,6 +251,7 @@ $lang = array (
'edit_error'=>'编辑失败',
'modification'=>'修改',
'modification_success'=>'修改成功',
'modification_error'=>'修改失败',
'no_modification'=>'不可修改',
'revisability'=>'可修改',
'modification_hou'=>'修改后',
@@ -289,12 +270,7 @@ $lang = array (
'save_set'=>'保存设置',
'set_success'=>'设置成功',
'set_unsuccess'=>'设置失败',
'cut'=>'剪切',
'copy'=>'复制',
'copy_success'=>'复制成功',
'cut_success'=>'剪切成功',
'custom'=>'自定义',
'link'=>'链接',
'custom_link'=>'自定义链接',
'download_link'=>'下载链接',
'clear'=>'清除',
@@ -313,7 +289,7 @@ $lang = array (
'please_wait1'=>'请稍候',
'loading_please_wait'=>'正在加载,请稍候...',
'loading_in'=>'载入中...',
'loading'=>'正在加载...',
'create_in'=>'创建中...',
'are_uploading1'=>'正在上传',
'are_uploading'=>'正在上传...',
@@ -399,18 +375,14 @@ $lang = array (
'if_required'=>'是否必填',
'required'=>'必填',
'certificate'=>'选填',
'input'=>'输入',
'creation'=>'创建',
'creation_success'=>'创建成功',
'creation_unsuccess'=>'创建失败',
'no_creation'=>'不创建',
'rechristen'=>'重命名',
'rechristen_failure'=>'重命名失败',
'rechristen_error'=>'重命名错误',
'movement_error'=>'移动错误',
'format_error'=>'格式错误',
'width'=>'宽度',
'height'=>'高度',
'lengthways_arrange'=>'纵向排列',
'crosswise_arrange'=>'横向排列',
'page_background'=>'页面背景',
@@ -473,7 +445,7 @@ $lang = array (
'image_to_local_error'=>'图片本地化错误!',
'inadequate_capacity_space' => '空间容量不足,不能上传新文件',
// core/template/wx_ajax.html
'please_choose'=>'请选择',
'delete_error'=>'删除错误',
'delete_error1'=>'删除错误,稍后重试',
// core/misc/template/misc_seluser.html
@@ -482,7 +454,7 @@ $lang = array (
'selected'=>'已选择',
'selected_ge_user'=>'个用户',
'selecte_user_to_add'=>'选择需要添加的用户',
'administrator'=>'管理员',
'need_a_administrator'=>'至少需要一名管理员',
'cancel_administrator'=>'取消管理员',
'set_administrator'=>'设置管理员',
@@ -514,7 +486,7 @@ $lang = array (
'lt'=>'大于',
'gt'=>'小于',
'In_a'=>'换一个',
'individual'=>'个',
// core/table/table_local_storage.php
'built_in_not_delete'=>'内置,不能删除',
'file_migration_not_delete'=>'有文件未迁移,不能删除',
@@ -898,7 +870,6 @@ $lang = array (
'login_succeed_inactive_member' => '欢迎您回来,{usergroup} {username}。您的帐号处于非激活状态,您的功能将受到限制,请尽快激活账号!',
'login_question_empty' => '请选择安全提问以及填写正确的答案',
'login_question_invalid' => '抱歉,安全提问答案填写错误',
'login_invalid' => '登录失败,您还可以尝试 {loginperm} 次',
'login_password_invalid' => '抱歉,您输入的密码有误',
'register_disable' => '抱歉,目前站点禁止新用户注册',
'register_disable_activation' => '抱歉,目前站点禁止激活',
@@ -1361,7 +1332,7 @@ $_G[siteurl]',
'fullblankspace' => ' ',
'search' => '搜索',
'page' => '第{page}页',
'login_title' => '登录管理中心',
@@ -1407,7 +1378,7 @@ $_G[siteurl]',
'already_close'=>'已关闭',
'open_start'=>'开启',
'faq' => '帮助',
'login' => '登录',
'login1' => '登 录',
'login_empty' => '登&nbsp;&nbsp;&nbsp;录',
'user_login_password'=>'登录密码',
@@ -1486,9 +1457,7 @@ $_G[siteurl]',
'full_control_state'=>'允许成员上传、新建、添加、编辑、复制、查看、删除所有文件,包括其他成员的文件。',
'decryption_failure'=>'解密失败!',
'innerShare'=>'内部分享',
'confirm_message'=>'确认消息',
'userCenter'=>'用户中心',
'logout'=>'退出登录',
'user_select_search_tip'=>'搜索',
@@ -1496,8 +1465,7 @@ $_G[siteurl]',
'user_select_title'=> '成员选择',
'upgrade_notice_title'=>'升级提醒',
'member'=>'成员',
'about'=>'关于',
'status'=>'状态',
'file_share'=>'文件分享',
'expires_time'=>'失效时间',
'explorer_gropuperm'=>array(
@@ -1593,14 +1561,7 @@ $_G[siteurl]',
'File_format'=>'文件格式不允许',
'application_failed'=>'应用图片上传失败',
'have_new_notifications'=>'【您有新的通知】',
'filter_range_day'=>'今天',
'filter_range_yesterday'=>'昨天',
'filter_range_week'=>'最近7日',
'filter_range_month'=>'最近30日',
'filter_range_month3'=>'最近90日',
'filter_range_year'=>'最近365日',
'daysOfWeek'=>'["日","一","二","三", "四", "五","六"]',
'monthNames'=>'["一月", "二月", "三月", "四月", "五月", "六月","七月", "八月", "九月", "十月", "十一月", "十二月"]',
//字段相关
@@ -1757,6 +1718,204 @@ $_G[siteurl]',
'file_down_finishing'=>'文件下载中',
'file_down_progress'=>'进度',
'file_down_failure'=>'下载失败',
// 新增
'themeColor'=>'主题配色',
'themeColor_tip'=>'切换主题配色',
'display_sub_folder_content'=>'显示子文件夹内容',
'all'=>'全部',
'input_content' => '输入内容',
'label'=>'标签',
'size' => '尺寸',
'width'=>'宽度',
'height'=>'高度',
'width1'=>'宽',
'height1'=>'高',
'shape'=>'形状',
'cut'=>'剪切',
'copy'=>'复制',
'copy_success'=>'复制成功',
'copy_clipboard'=>'成功复制到剪切板',
'cut_success'=>'剪切成功',
'please_choose'=>'请选择',
'link'=>'链接',
'individual'=>'个',
'type' => '类型',
'color'=>'颜色',
'submit' => '提交',
'submission'=>'提交中...',
'submit_error'=>'提交失败',
'submit_success'=>'提交成功',
'classify'=>'分类',
'unclassify'=>'未分类',
'search' => '搜索',
'name'=>'名称',
'file_name'=>'文件名称',
'input_name'=>'输入名称',
'name_cannot_empty'=>'名称不能为空',
'download'=>'下载',
'confirms'=>'确定',
'cancel'=>'取消',
'share'=>'分享',
'share_failer'=>'分享失败',
'cancel_share'=>'取消分享',
'create_share_failer'=>'创建分享失败',
'already_cancel'=>'已取消',
'cancel_select'=>'取消选择',
'board_message' => '提示信息',
'js_exit' => '您确定要注销登录?',
'nickname' => '用户名',
'username' => '姓名',
'password' => '密 码',
'confirm_message'=>'确认消息',
'userCenter'=>'用户中心',
'logout'=>'退出登录',
'logout_error'=>'退出登录失败',
'about'=>'关于',
'status'=>'状态',
'login' => '登录',
'loading'=>'正在加载...',
'input'=>'输入',
'creation'=>'创建',
'creation_success'=>'创建成功',
'creation_unsuccess'=>'创建失败',
'system_management'=>'系统管理',
'level'=>'密级',
'software_name'=>'软件名称',
'version_information'=>'版本信息',
'copyright_information'=>'版权信息',
'Website_address'=>'网站地址',
'administrator'=>'管理员',
'favorite_created_success'=>'收藏夹创建成功',
'file_collection_successful'=>'文件收藏成功',
// 组件收藏夹
'collect'=>'收藏',
'collect_to'=>'收藏到',
'format'=>'格式',
'time' => '时间',
'add_time' => '添加时间',
'modify_time' => '修改时间',
'creation_time' => '创建时间',
'yes' => '是',
'no' => '否',
'grade'=>'评分',
'unrated'=>'未评分',
'rate'=>'星',
'start_date'=>'开始日期',
'end_date'=>'结束日期',
'playback_failed'=>'播放失败!',
'select_favorites'=>'选择收藏夹',
'search_favorites'=>'搜索收藏夹',
'no_favorites'=>'无收藏夹',
'create_favorites'=>'创建收藏夹',
'user_permissions'=>'用户权限',
'observer'=>'观察员',
'collaborative_members'=>'协作成员',
'add_cooperative_users'=>'添加合作用户',
'name_search'=>'姓名搜索',
'there_no_such_content'=>'没有相关内容',
'no_data'=>'暂无数据',
'No_relevant_options_available'=>'没有相关选项',
'include_subordinates'=>'包含下级',
'custom'=>'自定义',
'filter_range_day'=>'今天',
'filter_range_yesterday'=>'昨天',
'filter_range_week'=>'最近7日',
'filter_range_month'=>'最近30日',
'filter_range_month3'=>'最近90日',
'filter_range_year'=>'最近365日',
'daysOfWeek'=>'["日","一","二","三", "四", "五","六"]',
'monthNames'=>'["一月", "二月", "三月", "四月", "五月", "六月","七月", "八月", "九月", "十月", "十一月", "十二月"]',
'accuracy'=>'精确度',
'note'=>'注释',
'annotated'=>'有注释',
'no_note'=>'没有注释',
'contains_keywords'=>'包含关键字(使用,隔开)',
'not_have'=>'没有',
'have'=>'有',
'monthly' => '每月',
'weekly' => '每周',
'everyday' => '每日',
'per_hour' => '每小时',
'point' => '分',
'timeliness' => '时',
'hour'=>'小时',
'minute'=>'分钟',
'min'=>'最小',
'max'=>'最大',
'second'=>'秒',
'duration'=>'时长',
'label_classification'=>'标签分类',
'logic'=>'逻辑',
'arbitrarily'=>'任意',
'filter_acquisition_failed'=>'筛选获取失败',
'all_completed'=>'已经到底了',
'co_query'=>'共查询',
'newly_created'=>'最新创建',
'recent_updates'=>'最近更新',
'popular_projects'=>'热门项目',
'more'=>'更多',
'license_user_sum'=>'授权用户数',
'enter_account'=>'请输入账号',
'enter_password'=>'请输入密码',
'uploading_files'=>'上传文件',
'uploading_files_error'=>'上传文件失败',
'uploading_size'=>'上传大小',
'uploading_type'=>'上传类型',
'edit'=>'编辑',
'edit_success'=>'编辑成功',
'edit_error'=>'编辑失败',
//分享管理
'share_title'=>'分享标题',
'share_title_empty'=>'分享标题不能为空',
'share_dateline'=>'分享时间',
'share_downloads'=>'下载数',
'share_views'=>'查看数',
'share_perm'=>'分享权限',
'share_perm_0'=>'查看',
'share_perm_1'=>'下载',
'share_times'=>'分享次数',
'share_times_tip'=>'限制分享次数0表示不限制',
'share_password'=>'提取密码',
'share_password_tip'=>'留空表示不设置密码',
'share_endtime'=>'到期时间',
'share_endtime_tip'=>'留空表示不限制到期时间',
'share_stype'=>'分享类型',
'share_stype_0'=>'库文件',
'share_stype_1'=>'收藏夹文件',
'share_stype_2'=>'收藏夹',
'share_stype_3'=>'专辑',
'share_status'=>'分享状态',
'share_status_-3'=>'已屏蔽',
'share_status_-2'=>'次数到',
'share_status_-1'=>'已过期',
'share_status_0'=>'正常',
'share_limit'=>'分享条件',
'share_address'=>'分享地址',
'share_username'=>'分享者',
'share_edit'=>'分享编辑',
'share_create'=>'创建分享',
);
?>

View File

@@ -6,6 +6,44 @@ try{
console.log('Processed in $_G[debuginfo][time] second(s), $_G[debuginfo][queries] queries <!--{if $_G[gzipcompress]}-->, Gzip On<!--{/if}--><!--{if C::memory()->type}-->, <!--{echo ucwords(C::memory()->type)}--> On<!--{/if}-->.');
}
}catch(e){}
_notice ={};
_notice.flashStep = 1;
_notice.checkurl = 'user.php?mod=my&op=notification&filter=checknew';
_notice.normalTitle = document.title;
_notice.getNotificationCount = function (){
axios.get(_notice.checkurl).then((json) => {
let sum = parseInt(json.data.sum);
// _notice.showTips(sum);
if (json.data.timeout > 0) window.setTimeout(function(){_notice.getNotificationCount();}, json.data.timeout);
});
}
_notice.showTips = function (sum){
return;
if(sum>0){
// jQuery('#dzz_notification>span.badge').html(sum).removeClass('hide');
// jQuery('#dzz_notification>span.dzz').hide();
//_notice.flashTitle();
}else{
// jQuery('#dzz_notification>span.badge').addClass('hide');
// jQuery('#dzz_notification>span.dzz').show();
//_notice.flashTitle(1);
}
}
_notice.flashTitle = function (flag){
//仅窗口不在焦点时闪烁title回到焦点时停止闪烁并将title恢复正常
if(flag || CurrentActive){//当前处于焦点
document.title=_notice.normalTitle;
_notice.flashTitleRun = false;
return;//退出循环
}
_notice.flashTitleRun = true;
_notice.flashStep++;
if (_notice.flashStep==3) {_notice.flashStep=1;}
if (_notice.flashStep==1) {document.title="{lang have_new_notifications}";}
if (_notice.flashStep==2) {document.title="【      】";}
setTimeout(function(){_notice.flashTitle();},500); //循环
}
_notice.getNotificationCount();
</script>
<!--{/if}-->
<!--{eval updatesession();}-->

View File

@@ -1,98 +1,97 @@
<!--{if !$_G['inajax']}-->
<!--{template common/header_common}-->
<div id="ct" class="container " style="position: absolute;top: 30%;width: 100%;text-align: center;">
<!--{if !$param[login]}-->
<div class="">
<!--{else}-->
<div class="" id="main_succeed" style="max-width:500px;margin:0 auto;display: none">
<div class="f_c altw">
<div class="alert_right">
<h5 id="succeedmessage"></h5>
<p id="succeedlocation" class="alert_btnleft"></p>
<p class="alert_btnleft"><a id="succeedmessage_href">{lang message_forward}</a></p>
</div>
</div>
</div>
<div class="well" id="main_message">
<!--{/if}-->
<!--{else}-->
<!--{template common/header_ajax}-->
<!--{/if}-->
<!--{if $param[msgtype] == 1 || $param[msgtype] == 2 && !$_G[inajax]}-->
<div class="f_c altw">
<div id="messagetext">
<!--{if $alerttype == 'alert_right'}-->
<img src="static/image/common/noFilePage-successful.png">
<!--{elseif $alerttype == 'alert_info'}-->
<img src="static/image/common/noFilePage-fail.png">
<!--{/if}-->
<h5 style="color: #999999;">$show_message</h5>
<!--{if $url_forward}-->
<!--{if !$param[redirectmsg]}-->
<button class="btn-jump btn btn-primary" onclick="location.href='$url_forward';return false;" >{lang immdeiate_jump}<span class="num">3</span>s</button>
<!--{else}-->
<button class="btn-jump btn btn-primary" onclick="location.href='$url_forward';return false;">{lang return_to_the_naxt_level}<span class="num">3</span>s</button>
<!--<p class="alert_btnleft"><a href="$url_forward">{lang attach_forward}</a></p>-->
<!--{/if}-->
<!--{elseif $allowreturn}-->
<script type="text/javascript">
if(history.length > (BROWSER.ie ? 0 : 1)) {
document.write('<p class="alert_btnleft"><a href="javascript:history.back()">{lang message_go_back}</a></p>');
} else {
document.write('<p class="alert_btnleft"><a href="./">[ $_G['setting']['bbname'] {lang homepage} ]</a></p>');
}
</script>
<!--{/if}-->
</div>
<!--{if $param[login]}-->
<!--{/if}-->
</div>
<script type="text/javascript">
jQuery(document).ready(function(){
function jump(cont){
window.setTimeout(function(){
cont--;
if(cont>0){
$('.num').text(cont);
jump(cont);
}
},1000)
}
jump(3);
});
</script>
<!--{elseif $param[msgtype] == 2}-->
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title">{lang board_message}</h4>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title><!--{if !empty($navtitle)}-->$navtitle - <!--{/if}--><!--{if !empty($_G[setting][sitename])}-->$_G[setting][sitename]<!--{/if}--></title>
<meta name="keywords" content="{if !empty($_G[setting][metakeywords])}{echo htmlspecialchars($_G[setting][metakeywords])}{/if}"/>
<meta name="description" content="{if !empty($_G[setting][metadescription])}{echo htmlspecialchars($_G[setting][metadescription])} {/if}"/>
<meta name="generator" content="oaooa"/>
<meta name="author" content="oaooa"/>
<meta name="copyright" content="2012-{eval echo dgmdate(TIMESTAMP,'Y-m-d');} www.oaooa.com"/>
<meta name="renderer" content="webkit">
<base href="{$_G['siteurl']}"/>
<style>
html, body {
height: 100%;
overflow: hidden;
}
#ct {
height: 100%;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
}
.btn-jump {
line-height: 3;
color: #999999;
text-decoration: none;
}
.btn-jump:hover {
color:#0072ef
}
.messagetxt {
padding: 0 20px;
line-height: 2;
max-height: 300px;
overflow: hidden;
color: #999999;
}
</style>
<script type="text/javascript">
function jump(cont) {
window.setTimeout(function () {
cont--;
if (cont > 0) {
document.getElementById('num').innerHTML = cont;
jump(cont);
}
}, 1000)
}
</script>
</head>
<body id="nv_{$_G[basescript]}" class="$bodyClass">
<div id="ct">
<div id="main_message">
<!--{if $alerttype == 'alert_right'}-->
<img src="static/image/common/noFilePage-successful.png">
<!--{elseif $alerttype == 'alert_info'}-->
<img src="static/image/common/noFilePage-fail.png">
<!--{/if}-->
<div class="messagetxt">$show_message</div>
<!--{if $url_forward}-->
<a class="btn-jump " href="$url_forward">{lang immdeiate_jump}[<span id="num" class="num">{$refreshsecond}</span>s]</a>
<script type="text/javascript">
jump({$refreshsecond});
</script>
<!--{/if}-->
</div>
<div class="modal-body">
<div class="$alerttype">$show_message</div>
</div>
<div class="modal-footer">
<!--{if $param['closetime']}-->
<span class="btn btn-link text-muted">$param['closetime'] {lang message_closetime}</span>
<!--{elseif $param['locationtime']}-->
<span class="btn btn-link text-muted">$param['locationtime'] {lang message_locationtime}</span>
<!--{/if}-->
<!--{if $param[login]}-->
<button type="button" class="btn btn-info" onclick="hideWindow('$_GET['handlekey']');showWindow('login', 'user.php?mod=login&action=login');"><strong>{lang login}</strong></button>
<!--{if !$_G['setting']['bbclosed']}-->
<button type="button" class="btn btn-info" onclick="hideWindow('$_GET['handlekey']');window.open('user.php?mod=rigister');"><em>$_G['setting']['reglinkname']</em></button>
<!--{/if}-->
<!--{/if}-->
<button type="button" data-dismiss="modal" class="btn btn-default"><strong>{lang close}</strong></button>
</div>
<!--{else}-->$show_message<!--{/if}-->
<!--{if !$_G['inajax']}-->
</div>
</div>
<!--{template common/footer}-->
<!--{else}-->
<!--{template common/footer_ajax}-->
<!--{/if}-->
</div>
<!--{eval output();}-->
<!--{eval updatesession();}-->
<!--{if debuginfo()}-->
<script type="text/javascript">
try{
if(console && console.log){
console.log('Processed in $_G[debuginfo][time] second(s), $_G[debuginfo][queries] queries <!--{if $_G[gzipcompress]}-->, Gzip On<!--{/if}--><!--{if C::memory()->type}-->, <!--{echo ucwords(C::memory()->type)}--> On<!--{/if}-->.');
}
}catch(e){}
</script>
<!--{/if}-->
<!--{if !$_G['setting']['bbclosed']}-->
<!--{if !isset($_G['cookie']['sendmail'])}-->
<script type="text/javascript" src="misc.php?mod=sendmail&rand=$_G[timestamp]"></script>
<!--{/if}-->
<!--{/if}-->
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

96
dzz/aiXhimage/admin.php Normal file
View File

@@ -0,0 +1,96 @@
<?php
if(!defined('IN_OAOOA') ) {
exit('Access Denied');
}
Hook::listen('adminlogin');
$do = isset($_GET['do']) ? trim($_GET['do']):'';
if($do == 'add'){//请求api
$id = isset($_GET['id']) ? intval($_GET['id']):0;
if(submitcheck('adddata')){
$name = isset($_GET['name']) ? getstr($_GET['name']):'';
$content = isset($_GET['content']) ? $_GET['content']:'';
if(!$name || !$content) exit(json_encode(['success'=>false,'error'=>'参数错误']));
$carr = replaceInputAndTextarea($content);
$setarr = [
'name'=>$name,
'content'=>$content,
'desc'=>$_GET['desc'] ? getstr($_GET['desc']):'',
'pcontent'=>$carr['pcontent'],
'formdata'=>serialize($carr['formdata']),
'dateline'=>TIMESTAMP
];
if($id){
if(C::t('ai_model')->update($id,$setarr)){
exit(json_encode(array('success'=>true,'msg'=>MOD_URL.'&op=admin')));
}else{
exit(json_encode(array('error'=>true)));
}
}else{
if(C::t('ai_model')->insert($setarr,1)){
exit(json_encode(array('success'=>true,'msg'=>MOD_URL.'&op=admin')));
}else{
exit(json_encode(array('error'=>true)));
}
}
}else{
if($id)$data = C::t('ai_model')->fetch ($id);
include template('add');
exit();
}
}elseif($do == 'delete'){
$id = isset($_GET['id']) ? intval($_GET['id']):'';
C::t('ai_model')->delete($id);
showmessage('成功',MOD_URL.'&op=admin');
}elseif($do == 'updatepcontent'){
foreach(DB::fetch_all("select id,content,pcontent from %t where 1 order by dateline desc",array('ai_model')) as $v){
echo $v['content'];
$arr = replaceInputAndTextarea($v['content']);
$srtarr = [
'pcontent'=>$arr['pcontent'],
'formdata'=>serialize($arr['formdata'])
];
C::t('ai_model')->update($v['id'],$srtarr);
}
exit('成功');
}else{
$datas = [];
foreach(DB::fetch_all("select name,id,`desc`,content from %t where 1 order by dateline desc",array('ai_model')) as $v){
$datas[] = $v;
}
$datas = json_encode($datas);
include template('list');
}
function replaceInputAndTextarea($content) {
$inputCount = 1;
$formarr = [];
$content = preg_replace_callback('/\{input:([^}]+)\}/', function($matches) use (&$inputCount,&$formarr) {
$key = 'input' . $inputCount++;
if($matches[1]){
$tmparr = explode('|',$matches[1]);
$formarr[$key]['type'] = 'input';
$formarr[$key]['name'] = $key;
if($tmparr[0]) $formarr[$key]['lable'] = $tmparr[0];
if($tmparr[1]) $formarr[$key]['default'] = $tmparr[1];
}
return '{'.$key. '}';
}, $content);
$textareaCount = 1;
$content = preg_replace_callback('/\{textarea:([^}]+)\}/', function($matches) use (&$textareaCount,&$formarr) {
$key = 'textarea' . $textareaCount++;
if($matches[1]){
$tmparr = explode('|',$matches[1]);
$formarr[$key]['type'] = 'textarea';
$formarr[$key]['name'] = $key;
if($tmparr[0]) $formarr[$key]['lable'] = $tmparr[0];
if($tmparr[1]) $formarr[$key]['default'] = $tmparr[1];
}
return '{'.$key. '}';
}, $content);
return ['pcontent'=>$content,'formdata'=>$formarr];
}

View File

@@ -0,0 +1 @@
.page-header{border:0;background:rgba(0,0,0,0)}.el-aside{padding:0 20px;min-width:400px}.el-aside .left-box{background:#fff;border-radius:8px;height:92%;width:100%;position:relative;padding-bottom:40px;padding-top:41px}.el-aside .left-box .title{color:var(--el-color-black);padding:20px;padding-bottom:0;position:absolute;top:0;left:0;width:100%;font-weight:700}.el-aside .left-box .submitBtn{position:absolute;bottom:10px;width:calc(100% - 40px);left:10px}.chat-box li{background:#fff;padding:20px;margin-top:20px;border-radius:8px}.chat-box li .text{margin-bottom:20px;color:var(--el-color-black)}.chat-box li .operation{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}

View File

@@ -0,0 +1,62 @@
.maxWidth {
width: 500px;
}
.tipTxt {
display: block;
width: 100%;
margin-bottom: 15px;
}
.avatarstatus {
width: 100%;
height: 100%;
}
.avatarstatus .img-circle {
border-radius: 0;
width: 100%;
height: 100%;
}
.page-content .Topcarousel {
line-height: 148px;
}
.el-form-item__content {
flex-direction: column;
align-items: flex-start;
}
.prompt-ul .prompt-li {
max-width: 800px;
border: 1px solid var(--el-border-color);
background-color: var(--el-bg-color);
padding: 10px;
border-radius: var(--el-border-radius-base);
margin-bottom: 10px;
}
.prompt-ul .prompt-li .move {
height: 32px;
width: 32px;
display: flex;
justify-content: center;
align-items: center;
}
.prompt-ul .prompt-li .input-box {
flex: 1;
}
.prompt-ul .prompt-li .operation {
text-align: right;
}
.Prompt-add {
width: 100%;
max-width: 800px;
}
.Prompt-add .el-button {
width: 100%;
margin: 15px 0;
}
/*# sourceMappingURL=setting.css.map */

206
dzz/aiXhimage/chat.php Normal file
View File

@@ -0,0 +1,206 @@
<?php
$do = isset($_GET['do']) ? trim($_GET['do']) : '';
if ($do == 'getHistory') {//获取历史对话
$idval = $_GET['rid'] ?? '';
$type = $_GET['type'] ?? 'image';
if ($type == 'image') {
$metadata = IO::getMeta($idval);
if (!$metadata) json_decode(['success' => false, 'msg' => 'file is not exists']);
if ($metadata['aid']) {
$idval = $metadata['aid'];
$idtype = 0;
} else {
$idval = $idval;
$idtype = 1;
}
$historydaya = C::t('#aiXhimage#ai_xhchat')->fetchContentByIdvalue($idval, $idtype);
$returndata = [];
foreach ($historydaya as $k => $v) {
if ($k == 0) continue;
$tmmpcontent = json_decode($v['content'], true);
$returndata[$v['id']] = [
'role' => $v['role'],
'content' => $tmmpcontent['content'],
'dateline' => dgmdate($v['dateline'],'Y-m-d H:i:s' )
];
}
} elseif ($type == 'chat') {
$idval = $_GET['id'] ?? '';
$idtype= 2;
$historydaya = C::t('#aiXhimage#ai_xhchat')->fetchContentByIdvalue($idval, $idtype);
$returndata = [];
foreach ($historydaya as $k => $v) {
$tmmpcontent = json_decode($v['content'], true);
$returndata[$v['id']] = [
'role' => $v['role'],
'content' => $tmmpcontent['content'],
'dateline' => dgmdate($v['dateline'],'Y-m-d H:i:s' )
];
}
}
exit(json_encode(['success' => true, 'data' => $returndata]));
} elseif($do == 'clearchat'){
$idval = $_GET['rid'] ?? '';
$type = $_GET['type'] ?? 'image';
if ($type == 'image') {
$metadata = IO::getMeta($idval);
if (!$metadata) json_decode(['success' => false, 'msg' => 'file is not exists']);
if ($metadata['aid']) {
$idval = $metadata['aid'];
$idtype = 0;
} else {
$idval = $idval;
$idtype = 1;
}
C::t('#aiXhimage#ai_xhchat')->deleteContentByIdvalue($idval, $idtype);
} elseif ($type == 'chat') {
$idval = $_GET['id'] ?? '';
$idtype= 2;
C::t('#aiXhimage#ai_xhchat')->deleteContentByIdvalue($idval, $idtype);
}
exit(json_encode(['success' => true]));
}elseif ($do == 'createChat') {//创建会话
} else {
// 设置时区为东八区
date_default_timezone_set('PRC');
// 这行代码用于关闭输出缓冲。关闭后,脚本的输出将立即发送到浏览器,而不是等待缓冲区填满或脚本执行完毕。
ini_set('output_buffering', 'off');
// 这行代码禁用了 zlib 压缩。通常情况下,启用 zlib 压缩可以减小发送到浏览器的数据量,但对于服务器发送事件来说,实时性更重要,因此需要禁用压缩。
ini_set('zlib.output_compression', false);
// 这行代码使用循环来清空所有当前激活的输出缓冲区。ob_end_flush() 函数会刷新并关闭最内层的输出缓冲区,@ 符号用于抑制可能出现的错误或警告。
while (@ob_end_flush()) {
}
// 这行代码设置 HTTP 响应的 Content-Type 为 text/event-stream这是服务器发送事件SSE的 MIME 类型。
header('Content-Type: text/event-stream');
// 这行代码设置 HTTP 响应的 Cache-Control 为 no-cache告诉浏览器不要缓存此响应。
header('Cache-Control: no-cache');
// 这行代码设置 HTTP 响应的 Connection 为 keep-alive保持长连接以便服务器可以持续发送事件到客户端。
header('Connection: keep-alive');
// 这行代码设置 HTTP 响应的自定义头部 X-Accel-Buffering 为 no用于禁用某些代理或 Web 服务器(如 Nginx的缓冲。
// 这有助于确保服务器发送事件在传输过程中不会受到缓冲影响。
header('X-Accel-Buffering: no');
// 引入调用 OpenAI 接口类,该类由 GPT4 生成大部分代码
require DZZ_ROOT . './dzz/aiXhimage/class/xhChat.php';
echo 'data: ' . json_encode(['time' => date('Y-m-d H:i:s'), 'content' => '']) . PHP_EOL . PHP_EOL;
flush();
// 从 get 中获取提问
$question = urldecode($_GET['q'] ?? '');
if (empty($question)) {
stopMessage('Missing question');
}
$question = str_ireplace('{[$add$]}', '+', $question);
$type = $_GET['type'] ?? 'image';
$params = [
'question' => $question,
'type' => $type,
'hasStream' => 1
];
if ($type == 'image') {
$idval = $_GET['rid'] ?? '';
//缺少图片id参数
if (!$idval) {
stopMessage('Missing image id');
} else {
//获取对话id
$metadata = IO::getMeta($idval);
if (!$metadata) stopMessage('file is not exists');
else {
$rid = $idval;
if ($metadata['aid']) {
$idval = $metadata['aid'];
$idtype = 0;
} else {
$idtype = 1;
}
$allowExts = ['jpg', 'jpeg', 'png', 'webp'];
$imgurl = '';
$imgurl = C::t('pichome_resources')->geticondata_by_rid($rid,1,0);
if(!$imgurl) $imgurl = IO::getThumb($rid,'small',0,1, 1,1);
if(!$imgurl){
if (in_array($metadata['ext'], $allowExts) && $metadata['filesize'] <= 10 * 1024 * 1024) {
$imgurl = IO::getStream('attach::' . $metadata['aid']);
$params['idtype'] = $idtype;
$params['idval'] = $idval;
$params['imageurl'] = $imgurl;
$params['processname'] = waitLock('DZZ_LOCK_XHIAMGEPARSE');
$xhchatclient = new xhChat();
$xhchatclient->pareseMethod($params);
} else {
stopMessage('file is not allowed');
}
}else{
$params['idtype'] = $idtype;
$params['idval'] = $idval;
$params['imageurl'] = $imgurl;
$params['processname'] = waitLock('DZZ_LOCK_XHIAMGEPARSE');
$xhchatclient = new xhChat();
$xhchatclient->pareseMethod($params);
}
}
}
}
elseif($type == 'chat'){
$idval = $_GET['id'] ?? '';
$idtype = 2;
$params['idtype'] = $idtype;
$params['idval'] = $idval;
$params['processname'] = waitLock('DZZ_LOCK_XHAICHAT');
$xhchatclient = new xhChat();
$xhchatclient->pareseMethod($params);
}
}
function waitLock($processnameprefix){
$locked = true;
for($i=0;$i<2;$i++){
$processname =$processnameprefix.$i;
if (!dzz_process::islocked($processname, 60)) {
$locked=false;
break;
}
}
if($locked){
sleep(3);
for($i=0;$i<2;$i++){
$processname = $processnameprefix.$i;
if (!dzz_process::islocked($processname, 60)) {
$locked=false;
break;
}
}
if($locked){
stopMessage('系统繁忙,请稍后再试');;
}
}
return $processname;
}
function stopMessage($messgae)
{
echo "message: close" . PHP_EOL;
echo "data: " . json_encode(['time' => date('Y-m-d H:i:s'), 'content' => $messgae]) . PHP_EOL . PHP_EOL;
echo 'retry: 86400000' . PHP_EOL;
echo "event: close" . PHP_EOL;
echo "data: Connection closed" . PHP_EOL . PHP_EOL;
flush();
exit();
}

View File

@@ -0,0 +1,212 @@
<?php
class StreamHandler {
private $data_buffer;//缓存有可能一条data被切分成两部分了无法解析json所以需要把上一半缓存起来
private $counter;//数据接收计数器
private $qmd5;//问题md5
private $chars;//字符数组,开启敏感词检测时用于缓存待检测字符
private $punctuation;//停顿符号
private $dfa = NULL;
private $check_sensitive = FALSE;
public function __construct($params) {
$this->buffer = '';
$this->counter = 0;
$this->qmd5 = $params['qmd5'] ?? time();
$this->chars = [];
$this->lines = [];
$this->punctuation = ['', '。', '', '', '', '……'];
}
public function set_dfa(&$dfa){
$this->dfa = $dfa;
if(!empty($this->dfa) && $this->dfa->is_available()){
$this->check_sensitive = TRUE;
}
}
public function xhcallback($data) {
$this->counter += 1;
$resp = json_decode($data, true);
if ($resp["header"]["code"] != 0) {
file_put_contents('./log/data.'.$this->qmd5.'.log', $this->counter.'=='.$data.PHP_EOL.'--------------------'.PHP_EOL, FILE_APPEND);
$this->end('服务返回报错:'.json_encode(['content' => $data]));
return strlen($data);
}
// 0、把上次缓冲区内数据拼接上本次的data
$buffer = $this->data_buffer . '[br]' . $data;
// 2、把所有的 '}\n\n{' 替换维 '}[br]{' '}\n\n[' 替换为 '}[br]['
$buffer = str_replace("}\n\n{", '}[br]{', $buffer);
$buffer = str_replace("}\n\n[", '}[br][', $buffer);
// 3、用 '[br]' 分割成多行数组
$lines = explode('[br]', $buffer);
// 4、循环处理每一行对于最后一行需要判断是否是完整的json
$line_c = count($lines);
foreach ($lines as $li => $line) {
$line_data = json_decode(trim($line), TRUE);
if ($resp["header"]["status"] == 2 || $line_data['payload']['choices']['text'][0]['content'] == 'LAND') {
$finallytext = $line_data['payload']['choices']['text'][0]['content'];
$this->sensitive_check($finallytext);
$this->end();
} elseif (isset($line_data['payload']['choices']['text'][0]['content'])) {
$this->sensitive_check($line_data['payload']['choices']['text'][0]['content']);
}
// 检查是否已处理完一个完整的JSON对象
if (json_last_error() === JSON_ERROR_NONE) {
// 清空缓冲区,准备接收新的数据
$this->data_buffer = '';
}
}
// 如果仍有未完成的JSON对象残留将其附加回$data等待下次回调处理
if (!empty($this->data_buffer)) {
$data .= $this->data_buffer;
}
return strlen($data);
}
public function callback($data) {
$this->counter += 1;
file_put_contents('./log/data.'.$this->qmd5.'.log', $this->counter.'=='.$data.PHP_EOL.'--------------------'.PHP_EOL, FILE_APPEND);
$result = json_decode($data, TRUE);
if(is_array($result)){
$this->end('openai 请求错误:'.json_encode($result));
return strlen($data);
}
//print_r($data);die;
/*
此处步骤仅针对 openai 接口而言
每次触发回调函数时里边会有多条data数据需要分割
如某次收到 $data 如下所示:
data: {"id":"chatcmpl-6wimHHBt4hKFHEpFnNT2ryUeuRRJC","object":"chat.completion.chunk","created":1679453169,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"role":"assistant"},"index":0,"finish_reason":null}]}\n\ndata: {"id":"chatcmpl-6wimHHBt4hKFHEpFnNT2ryUeuRRJC","object":"chat.completion.chunk","created":1679453169,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"以下"},"index":0,"finish_reason":null}]}\n\ndata: {"id":"chatcmpl-6wimHHBt4hKFHEpFnNT2ryUeuRRJC","object":"chat.completion.chunk","created":1679453169,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"是"},"index":0,"finish_reason":null}]}\n\ndata: {"id":"chatcmpl-6wimHHBt4hKFHEpFnNT2ryUeuRRJC","object":"chat.completion.chunk","created":1679453169,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"使用"},"index":0,"finish_reason":null}]}
最后两条一般是这样的:
data: {"id":"chatcmpl-6wimHHBt4hKFHEpFnNT2ryUeuRRJC","object":"chat.completion.chunk","created":1679453169,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{},"index":0,"finish_reason":"stop"}]}\n\ndata: [DONE]
根据以上 openai 的数据格式,分割步骤如下:
*/
// 0、把上次缓冲区内数据拼接上本次的data
$buffer = $this->data_buffer.$data;
//拼接完之后,要把缓冲字符串清空
$this->data_buffer = '';
// 1、把所有的 'data: {' 替换为 '{' 'data: [' 换成 '['
$buffer = str_replace('data: {', '{', $buffer);
$buffer = str_replace('data: [', '[', $buffer);
// 2、把所有的 '}\n\n{' 替换维 '}[br]{' '}\n\n[' 替换为 '}[br]['
$buffer = str_replace("}\n\n{", '}[br]{', $buffer);
$buffer = str_replace("}\n\n[", '}[br][', $buffer);
// 3、用 '[br]' 分割成多行数组
$lines = explode('[br]', $buffer);
// 4、循环处理每一行对于最后一行需要判断是否是完整的json
$line_c = count($lines);
foreach($lines as $li=>$line){
if(trim($line) == '[DONE]'){
//数据传输结束
$this->data_buffer = '';
$this->counter = 0;
//$this->sensitive_check();
$this->end();
break;
}
$line_data = json_decode(trim($line), TRUE);
if( !is_array($line_data) || !isset($line_data['payload']['choices']) || !isset($line_data['payload']['choices'][0]) ){
if($li == ($line_c - 1)){
//如果是最后一行
$this->data_buffer = $line;
break;
}
//如果是中间行无法json解析则写入错误日志中
file_put_contents('./log/error.'.$this->qmd5.'.log', json_encode(['i'=>$this->counter, 'line'=>$line, 'li'=>$li], JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT).PHP_EOL.PHP_EOL, FILE_APPEND);
continue;
}
if( isset($line_data['payload']['choices'][0]['delta']) && isset($line_data['payload']['choices'][0]['delta']['content']) ){
$this->sensitive_check($line_data['payload']['choices'][0]['delta']['content']);
}
}
return strlen($data);
}
private function sensitive_check($content = NULL){
// 如果不检测敏感词,则直接返回给前端
if(!$this->check_sensitive){
$this->write($content);
return;
}
//每个 content 都检测是否包含换行或者停顿符号,如有,则成为一个新行
if(!$this->has_pause($content)){
$this->chars[] = $content;
return;
}
$this->chars[] = $content;
$content = implode('', $this->chars);
if($this->dfa->containsSensitiveWords($content)){
$content = $this->dfa->replaceWords($content);
$this->write($content);
}else{
foreach($this->chars as $char){
$this->write($char);
}
}
$this->chars = [];
}
private function has_pause($content){
if($content == NULL){
return TRUE;
}
$has_p = false;
if(is_numeric(strripos(json_encode($content), '\n'))){
$has_p = true;
}else{
foreach($this->punctuation as $p){
if( is_numeric(strripos($content, $p)) ){
$has_p = true;
break;
}
}
}
return $has_p;
}
private function write($content = NULL, $flush=TRUE){
if($content != NULL){
echo 'data: '.json_encode(['time'=>date('Y-m-d H:i:s'), 'content'=>$content], JSON_UNESCAPED_UNICODE).PHP_EOL.PHP_EOL;
}
if($flush){
flush();
}
}
public function end($content = NULL){
if(!empty($content)){
$this->write($content, FALSE);
}
echo 'retry: 86400000'.PHP_EOL;
echo 'event: close'.PHP_EOL;
echo 'data: Connection closed'.PHP_EOL.PHP_EOL;
flush();
}
}

View File

@@ -0,0 +1,56 @@
<?php
if (!defined('IN_OAOOA')) {
exit('Access Denied');
}
class table_ai_xhchat extends dzz_table
{
public function __construct()
{
$this->_table = 'ai_xhchat';
$this->_pk = 'id';
parent::__construct();
}
public function insertData($setarr)
{
global $_G;
$uid = $_G['uid'];
$setarr['dateline'] = time();
$setarr['uid'] = $uid;
if($setarr['totaltoken']){
$tokendatas = [
'totaltoken'=>$setarr['totaltoken'],
'uid'=>getglobal('uid'),
'app'=>'aiXhimageChat',
'gettype'=>0,
'dateline'=>TIMESTAMP
];
\Hook::listen('statsTokenuse',$tokendatas);
}
return parent::insert($setarr);
}
public function fetchContentByIdvalue($idvalue,$idtype)
{
global $_G;
$uid = $_G['uid'];
$returndata = [];
foreach(DB::fetch_all("select * from %t where idval = %s and idtype = %d and uid = %d order by id asc",
[$this->_table,$idvalue,$idtype,$uid]) as $v){
$returndata[] = $v;
}
return $returndata;
}
public function deleteContentByIdvalue($idvalue,$idtype){
global $_G;
$uid = $_G['uid'];
return DB::delete($this->_table,"idval='$idvalue' and idtype=$idtype and uid=$uid");
}
public function delContentByIdvalueAndNotuid($idvalue,$idtype){
return DB::delete($this->_table,"idval='$idvalue' and idtype=$idtype");
}
}

View File

@@ -0,0 +1,64 @@
<?php
if (!defined('IN_OAOOA')) {
exit('Access Denied');
}
class table_ai_xhimageprompt extends dzz_table
{
public function __construct()
{
$this->_table = 'ai_xhimageprompt';
$this->_pk = 'id';
parent::__construct();
}
public function insertData($setarr)
{
$setarr['name'] = getstr($setarr['name'],30);
if(DB::result_first("select id from %t where name = %s and cate = %d",[$this->_table,$setarr['name'],$setarr['cate']])){
return array('error'=>'该名称已存在');
}else{
return parent::insert($setarr,1);
}
}
public function sortByIds($ids){
if(!is_array($ids)) $ids = array($ids);
foreach($ids as $k=>$id){
parent::update($id,array('disp'=>$k),1);
}
}
public function setStatusById($id,$status){
return parent::update($id,array('status'=>$status),1);
}
public function setDefaultByIdandCate($id,$cate){
if(DB::update($this->_table,array('isdefault'=>0),DB::field('cate',$cate).' AND '.DB::field('isdefault',1))){
return parent::update($id,array('isdefault'=>1),1);
}
}
public function editById($id,$setarr){
$setarr['name'] = getstr($setarr['name'],30);
if(DB::result_first("select id from %t where name = %s and id != %d",[$this->_table,$setarr['name'],$id])){
return array('error'=>'该名称已存在');
}else{
return parent::update($id,$setarr,1);
}
}
public function fetchPromptByStatus(){
return DB::fetch_all("select * from %t where status = 1 order by disp asc ",[$this->_table]);
}
public function fetchPromptByCate($cate){
return DB::fetch_all("select * from %t where cate = %d order by disp asc ",[$this->_table,$cate]);
}
public function deleteById($id){
return parent::delete($id);
}
}

View File

@@ -0,0 +1,392 @@
<?php
require_once DZZ_ROOT . 'dzz/aiXhimage/websocket/vendor/autoload.php';
require_once 'Class.StreamHandler.php';
use WebSocket\Client as Client;
use \C as C;
class xhChat
{
private $appid = '';
private $ak = '';
private $sk = '';
private $idval = '';
private $idtype = '';
private $isstream = '';
private $connectid = 0;
private $apiurl = '';
private $processname = '';
private $processnamequery = '';
public function pareseMethod($params)
{
$methods = [
'image' => 'xh::chatImage',
'chat'=>'xh::chat',
];
$path = $methods[$params['type']];
$this->getApiData($path, $params);
}
public function getApiData($path, $params)
{
//解析方法
$this->parseMethod($path);
//获取api配置项
$this->getapiConfig();
$this->processname = $params['processname'];
//判断是否为多轮对话
$this->isstream = $params['hasStream'] ?? 0;
if($this->isstream){
$this->idval = $params['idval'];
$this->idtype = $params['idtype'];
}
//获取请求体
$body = $this->getImageBody($params);
if (method_exists($this, $this->method)) {
return call_user_func([$this, $this->method], $body);
}else{
return ['error_msg'=>'function is not exists'];
}
}
private function getapiConfig()
{
$apiSetting = [
'chatImage'=>'setting_xhImageDataSetting',
'chat'=>'setting_xhDataSetting'
];
$imageSetting = C::t('setting')->fetch($apiSetting[$this->method], true);
$this->appid = $imageSetting['appid'];
$this->ak = $imageSetting['ak'];
$this->sk = $imageSetting['sk'];
}
private function parseMethod($path)
{
$arr = explode(':', $path);
$connectid = $arr[1];
$method = $arr[2];
$this->connectid = $connectid;
$this->method = $method;
$this->getapiUrl($this->method);
// return array('id' => $connectid, 'method' => $method);
}
private function getapiUrl($method)
{
$apiurls = [
'chatImage' => 'wss://spark-api.cn-huabei-1.xf-yun.com/v2.1/image',
'chat'=>'wss://spark-api.xf-yun.com/v3.5/chat'
];
$this->apiurl = $apiurls[$method];
}
private function chat($body)
{
$authUrl = $this->assembleAuthUrl("GET");
return $this->getQuerstData($authUrl, $body);
}
private function chatImage($body)
{
$authUrl = $this->assembleAuthUrl("GET");
return $this->getQuerstData($authUrl, $body);
}
private function getImageData($imageUrl)
{
$imagedata = file_get_contents($imageUrl);
return base64_encode($imagedata);
}
private function getQuerstData($authUrl, $body)
{
//创建ws连接对象
$client = new Client($authUrl);
// 连接到 WebSocket 服务器
if ($client) {
if ($this->isstream) {
$streamHandler = new StreamHandler([
'qmd5' => md5($body . '' . time())
]);
}
// 发送数据到 WebSocket 服务器
$client->send($body);
// 从 WebSocket 服务器接收数据
$answer = "";
while (true) {
$response = $client->receive();
if ($this->isstream) $streamHandler->xhcallback($response);
$resp = json_decode($response, true);
$code = $resp["header"]["code"];
if (0 == $code) {
$status = $resp["header"]["status"];
if ($status != 2) {
$content = $resp['payload']['choices']['text'][0]['content'];
$answer .= $content;
} else {
$content = $resp['payload']['choices']['text'][0]['content'];
$answer .= $content;
$total_tokens = $resp['payload']['usage']['text']['total_tokens'];
// print("\n本次消耗token用量\n");
// print($total_tokens);
//记录数据表
break;
}
} else {
$response = json_decode($response, true);
$error_message = str_replace("\n\t",'<br>',$response['header']['message']);
$ret['error_msg'] = "服务返回报错:" . $error_message;
break;
// print_r($ret);die;
}
}
if ($this->isstream) {
$message=[
'role'=>'assistant',
'content' => $answer,
'content_type' => 'text',
];
$anwser =[
['content'=>json_encode($message), 'totaltoken' => $total_tokens]
];
$this->insetMessageData($anwser);
}
$ret['result'] = $answer;
$ret['totaltoken'] = $total_tokens;
// \dzz_process::unlock($this->processname1);
} else {
$ret['error_msg'] = "无法连接到 WebSocket 服务器";
}
\dzz_process::unlock($this->processname);
return $ret;
}
//构造参数体
private function getImageBody($params)
{
$paramters = [
'chatImage' => ['domain' => 'image', 'temperature' => 0.5, 'top_k' => 4, 'max_tokens' => 8192, 'auditing' => 'default'],
'chat' => ['domain' => 'generalv3.5', 'temperature' => 0.5, 'top_k' => 4, 'max_tokens' => 8192, 'auditing' => 'default']
];
$body['header'] = [
"app_id" => $this->appid,
'uid'=>"'".getglobal('uid')."'"
];
$body['parameter'] = [
"chat" => [
"domain" => $paramters[$this->method]['domain'],
"temperature" => $paramters[$this->method]['temperature'],
"top_k" => $paramters[$this->method]['top_k'],
"max_tokens" => $paramters[$this->method]['max_tokens'],
"auditing" => $paramters[$this->method]['auditing']
]
];
if($this->method == 'chatImage'){
if ($this->isstream) {
$messagedatas = $this->getMessageData();
if ($messagedatas) {
foreach ($messagedatas as $v) {
$messagedata = json_decode($v, true);
$body['payload']['message']['text'][] = $messagedata;
}
$newtext = [
"role" => "user",
"content" => $params['question'],
"content_type" => "text"
];
$body['payload']['message']['text'][] = $newtext;
$questions = [
['content'=> json_encode($newtext)]
];
$this->insetMessageData($questions);
} else {
$imagedata = $params['isurl'] ? $params['imageurl'] : $this->getImageData($params['imageurl']);
$body['payload'] = [
"message" => [
"text" => [
[
"role" => "user",
"content" => $imagedata,
"content_type" => "image"
], [
"role" => "user",
"content" => $params['question'],
"content_type" => "text"
]
]
]];
$questions = [
['content'=>json_encode($body['payload']['message']['text'][0])],
['content'=>json_encode($body['payload']['message']['text'][1])]
];
$this->insetMessageData($questions);
}
}
else {
$body['payload'] = [
"message" => [
"text" => [
[
"role" => "user",
"content" => $params['isurl'] ? $params['imageurl'] : $this->getImageData($params['imageurl']),
"content_type" => "image"
], [
"role" => "user",
"content" => $params['question'],
"content_type" => "text"
]
]
]];
}
}
elseif($this->method == 'chat'){
if ($this->isstream) {
$messagedatas = $this->getMessageData();
if ($messagedatas) {
foreach ($messagedatas as $v) {
$messagedata = json_decode($v, true);
$body['payload']['message']['text'][] = $messagedata;
}
$newtext = [
"role" => "user",
"content" => $params['question'],
"content_type" => "text"
];
$body['payload']['message']['text'][] = $newtext;
$questions = [
['content'=>json_encode($newtext)]
];
$this->insetMessageData($questions);
} else {
$newtext = [
"role" => "user",
"content" => $params['question'],
"content_type" => "text"
];
$body['payload'] = [
"message" => [
"text" => [
$newtext
]
]];
$questions = [
['content'=>json_encode($newtext)],
];
$this->insetMessageData($questions);
}
}
else {
$body['payload'] = [
"message" => [
"text" => [
[
"role" => "user",
"content" => $params['question'],
"content_type" => "text"
]
]
]];
}
}
$json_string = json_encode($body);
return $json_string;
}
private function getMessageData()
{ $messagedatas = [];
foreach(C::t('#aiXhimage#ai_xhchat')->fetchContentByIdvalue($this->idval,$this->idtype) as $v){
$messagedatas[] = $v['content'];
}
return $messagedatas;
}
private function insetMessageData($messagedatas){
foreach($messagedatas as $v){
$cdata = json_decode($v['content'],true);
if(!$cdata['role']) continue;
$setarr = [
'idval'=>$this->idval,
'idtype'=>$this->idtype,
'role'=>$cdata['role'],
'content'=>$v['content'],
'totaltoken'=>isset($v['totaltoken']) ? intval($v['totaltoken']):0
];
C::t('#aiXhimage#ai_xhchat')->insertData($setarr);
}
}
//鉴权方法
private function assembleAuthUrl($method)
{
if ($this->ak == "" && $this->sk == "") { // 不鉴权
return $this->apiurl;
}
$ul = parse_url($this->apiurl); // 解析地址
if ($ul === false) { // 地址不对,也不鉴权
return $this->apiurl;
}
// // $date = date(DATE_RFC1123); // 获取当前时间并格式化为RFC1123格式的字符串
$timestamp = time();
$rfc1123_format = gmdate("D, d M Y H:i:s \G\M\T", $timestamp);
// $rfc1123_format = "Mon, 31 Jul 2023 08:24:03 GMT";
// 参与签名的字段 host, date, request-line
$signString = array("host: " . $ul["host"], "date: " . $rfc1123_format, $method . " " . $ul["path"] . " HTTP/1.1");
// 对签名字符串进行排序,确保顺序一致
// ksort($signString);
//print_r($signString);die;
// 将签名字符串拼接成一个字符串
$sgin = implode("\n", $signString);
// print( $sgin);
// 对签名字符串进行HMAC-SHA256加密得到签名结果
$sha = hash_hmac('sha256', $sgin, $this->sk, true);
//print("signature_sha:\n");
// print($sha);
$signature_sha_base64 = base64_encode($sha);
// 将API密钥、算法、头部信息和签名结果拼接成一个授权URL
$authUrl = "api_key=\"$this->ak\", algorithm=\"hmac-sha256\", headers=\"host date request-line\", signature=\"$signature_sha_base64\"";
// 对授权URL进行Base64编码并添加到原始地址后面作为查询参数
$authAddr = $this->apiurl . '?' . http_build_query(array(
'host' => $ul['host'],
'date' => $rfc1123_format,
'authorization' => base64_encode($authUrl),
));
return $authAddr;
}
}
?>

View File

@@ -0,0 +1,86 @@
<?php
namespace dzz\aiXhimage\classes;
use \C as C;
class ImageAIkey
{
public function run(&$data, $params = [])
{
global $Types;
$imageSetting = C::t('setting')->fetch('setting_xhImageDataSetting', true);
if (!$imageSetting['status']) {
return true;
}
$type = $params['type'];
$imagetypes = array_merge($Types['commonimage'], $Types['image']);
$gifKey = array_search('gif', $imagetypes);
unset($imagetypes[$gifKey]);
$appdata = C::t('pichome_vapp')->fetch($params['appid']);
if (($type == 'file' || $type == 'files')&& array_intersect($imagetypes, $data['exts'])) {
$rids = $data['rid'];
if (empty($rids)) return true;
if (!is_array($rids)) $rids = [$rids];
//查询所有开启的模板
if($appdata['type'] == 1 || $appdata['type'] == 3){
$this->getAiKey($data,$type,$appdata['type']);
}
if ($type == 'file') {
$data['Aichat'] = [
'url' => getglobal('siteurl') . 'index.php?mod=aiXhimage&op=chat',
'recordurl' => getglobal('siteurl') . 'index.php?mod=aiXhimage&op=chat&do=getHistory',
'delhistoryurl' => getglobal('siteurl') . 'index.php?mod=aiXhimage&op=chat&do=clearchat',
'type' => 'image',
'params' => 'rid'
];
}
return false;
}
elseif($type == 'folder'){
if(empty($data['fid'])) return true;
$this->getAiKey($data,$type,$appdata['type']);
return false;
}elseif($type == 'vapp'){
if(empty($data['appid'])) return true;
$this->getAiKey($data,$type,$appdata['type']);
return false;
}
}
public function getAiKey(&$data,$type,$apptype){
$promptdata = C::t('#aiXhimage#ai_xhimageprompt')->fetchPromptByStatus();
$tplsdata = [];
foreach ($promptdata as $prompt) {
$tplsdata[$prompt['cate']][] = ['name' => $prompt['name'], 'tplid' => $prompt['id'], 'prompt' => $prompt['prompt']];
}
ksort($tplsdata);
$tplnamearr = [
['flag'=>'name','lable'=>'AI改文件名'],
['flag'=>'tag','lable'=>'AI打标签'],
['flag'=>'desc','lable'=>'AI写描述']
];
$filedkey = [];
foreach($tplsdata as $key=>$tpls){
if($apptype == 1 && $key == 0) continue;
$filedkey[$tplnamearr[$key]['flag']] = ['tpls'=>$tpls,'lablename'=>$tplnamearr[$key]['lable'],'flag'=>$tplnamearr[$key]['flag']];
}
$params = [
'file'=>'rid',
'folder'=>'fid',
'vapp'=>'appid'
];
if(!empty($filedkey)){
$data['Aikey'] = [
'key' => 'aiXh::chatImage',
'name' => '星火图片理解',
'params' => $params[$type],
'type'=>$type,
'filedkey' =>$filedkey
];
}
}
}

View File

@@ -0,0 +1,178 @@
<?php
namespace dzz\aiXhimage\classes;
require_once DZZ_ROOT . './dzz/aiXhimage/class/xhChat.php';
use \C as C;
use \xhChat as xhChat;
use \DB as DB;
use \IO as IO;
class ImagetagAnddesc
{
public $allowExt = [];
public function run($rid, $extar = [])
{
$aiKey = $extar['aiKey'];
if($aiKey != 'aiXh::chatImage'){
return true;
}
if (!$rid) return ['error' => 'params is not allow'];
$questionType = [
'请根据图片内容给出3到5个关键词作为图片标签每个标签词的长度不能超过5个字且标签词之间不能重复。返回结果的格式为“标签1,标签2,标签3”其中标签之间使用逗号分割。',
'请你根据所给出的图片详细描述其内容并给出一个不超过120个字符的简短介绍。请确保你的描述中包含主要元素、色彩和可能的主题或情感表达同时注意保持描述的连贯性和准确性。',
];
$force = $extar['force'] ? $extar['force'] : 0;
$tplid = $extar['tplid'] ? $extar['tplid'] : 0;
$promptdata = C::t('#aiXhimage#ai_xhimageprompt')->fetch($tplid);
if (!$promptdata) return ['error' => 'prompt is not exists'];
$getType = $promptdata['cate'];
if($promptdata['cate'] == 1){
$question = $promptdata['prompt'] .'。返回结果的格式为“标签1,标签2,标签3”其中标签之间使用逗号分割。';
}else{
$question = $promptdata['prompt'];
}
//获取文件数据
$metadata = IO::getMeta($rid);
if (!$metadata) return ['error' => 'file is not exists'];
$imgurl = FALSE;
$this->getAllowExts();
$thumbdata = DB::fetch_first("select * from %t where rid =%s", array('thumb_record', $rid));
if ($thumbdata['sstatus']) {
$imgurl = IO::getFileUri($thumbdata['spath']);
} else {
$imgurl = IO::getThumb($rid,'small',0,1, 1,1);
if (!$imgurl && in_array($metadata['ext'], $this->allowExt) && $metadata['filesize'] <= 10 * 1024 * 1024) {
if($metadata['aid'])$imgurl = IO::getStream('attach::' . $metadata['aid']);
else $imgurl = IO::getStream($rid);
}
}
if ($imgurl) {
if(!$metadata['aid']) $metadata['aid'] = 0;
$setarr = ['aid' => $metadata['aid'], 'rid' => $rid, 'gettype' => $getType,'tplid'=>$tplid,'aikey'=>$aiKey];
if ($data = C::t('ai_imageparse')->insertData($setarr)) {
if ($data['isget'] && $data['data'] && !$force) {
$content = $data['data'];
} else {
$params = ['imageurl' => $imgurl, 'question' => $question];
$return = $this->waitLock('DZZ_LOCK_XHIAMGEPARSE');
if(isset($return['error'])){
return ['error' => $return['error']];
}else{
$params['processname'] = $return;
}
$chatclinet = new xhChat();
$aireturn = $chatclinet->getApiData('aiXh::chatImage', $params);
if ($aireturn['error_msg']) return ['error'=>$aireturn['error_msg']];
if($aireturn['result']){
if($aireturn['totaltoken']){
$tokendatas = [
'totaltoken'=>$aireturn['totaltoken'],
'uid'=>getglobal('uid'),
'app'=>'aiXhimage',
'gettype'=>$getType,
'dateline'=>TIMESTAMP
];
\Hook::listen('statsTokenuse',$tokendatas);
}
C::t('ai_imageparse')->update($data['id'], ['isget'=>1,'data'=>$aireturn['result'],'totaltoken'=>$aireturn['totaltoken']]);
$content = $aireturn['result'];
}else{
C::t('ai_imageparse')->update($data['id'], ['isget'=>1,'data'=>'']);
return ['error' => 'aiXh::chatImage error'];
}
}
if ($getType == 1) {
$tags = explode('',$content);
$tids = [];
foreach ($tags as $v) {
$v = preg_replace('/标签\d+[:]/', '', $v);
$v = trim($v);
$v = str_replace([',','','.','。'],'',$v);
$v = trim($v);
if ($v) {
$tids[] = C::t('pichome_tag')->insert($v, 1);
}
}
$attrdata = C::t('pichome_resources_attr')->fetch($rid);
$datatags = explode(',', $attrdata['tag']);
$addtags = array_diff($tids, $datatags);
foreach ($addtags as $v) {
if (!$v) continue;
$rtag = ['appid' => $attrdata['appid'], 'rid' => $rid, 'tid' => $v];
C::t('pichome_resourcestag')->insert($rtag);
}
$ntags = array_unique(array_merge($datatags, $tids));
$attrs = [
'tag' => implode(',', $ntags)
];
C::t('pichome_resources_attr')->update_by_rid($attrdata['appid'], $rid, $attrs);
$tagdatas = [];
foreach (DB::fetch_all("select tagname,tid from %t where tid in(%n)", array('pichome_tag', $ntags)) as $tv) {
$tagdatas[] = ['tid' => $tv['tid'], 'tagname' => $tv['tagname']];
}
$returndata = ['rid' => $rid, 'value' => $tagdatas,'flag'=>'tag'];
} elseif ($getType == 2) {
$desc = getstr($content);
C::t('pichome_resources_attr')->update_by_rids($metadata['appid'], $rid, ['desc' => $desc]);
$returndata = ['rid' => $rid, 'value' => $desc,'flag'=>'desc'];
}elseif($getType == 0){
$name = trim($this->name_filter($content));
$name = str_replace([',','','.','。'],'',$name);
$name = getstr($name,30);
C::t('pichome_resources')->update_by_rids($metadata['appid'], $rid, ['name' => $name.'.'.$metadata['ext']]);
$returndata = ['rid' => $rid, 'value' => $name,'flag'=>'name'];
}
return $returndata;
}
} else {
return true;
}
}
public function name_filter($name)
{
return str_replace(array('/', '\\', ':', '*', '?', '<', '>', '|', '"', "\n"), '', $name);
}
public function getAllowExts()
{
$this->allowExt = ['jpg', 'jpeg', 'png', 'webp'];
}
public function waitLock($processnameprefix){
$locked = true;
for($i=0;$i<2;$i++){
$processname =$processnameprefix.$i;
if (!\dzz_process::islocked($processname, 60)) {
$locked=false;
break;
}
}
if($locked){
sleep(3);
for($i=0;$i<2;$i++){
$processname = $processnameprefix.$i;
if (!\dzz_process::islocked($processname, 60)) {
$locked=false;
break;
}
}
if($locked){
return ['error'=>'系统繁忙,请稍后再试'];
}
}
return $processname;
}
}

View File

@@ -0,0 +1,11 @@
<?php
namespace dzz\aiXhimage\classes;
use \C as C;
class attachmentDelAfter
{
public function run($aid){
if(!$aid) return true;
C::t('#aiXhimage#ai_xhchat')->delContentByIdvalueAndNotuid($aid,0);
C::t('ai_imageparse')->deleteByAid($aid);
}
}

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