小胡
3 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with
23 additions and
8 deletions
-
admin/appmarket/cp.php
-
admin/appmarket/index.php
-
admin/appmarket/template/upgrade.htm
-
admin/language/zh-cn/lang.php
-
core/class/dzz/dzz_database.php
-
core/class/dzz/dzz_session.php
-
dzz/system/template/lyear/lyear_notification.htm
|
|
@ -124,7 +124,9 @@ elseif ($do == 'disable') {//关闭应用 |
|
|
|
$entrydir = DZZ_ROOT . './'.$app['app_path'].'/' . $app['identifier']; |
|
|
|
$file = $entrydir . '/dzz_app_' . $app['identifier'] . '.xml'; |
|
|
|
if (!file_exists($file)) { |
|
|
|
$apparray['disablefile'] = $app['extra']['disablefile']; |
|
|
|
if (is_array($app['extra']) && isset($app['extra']['disablefile'])) { |
|
|
|
$apparray['disablefile'] = $app['extra']['disablefile']; |
|
|
|
} |
|
|
|
$apparray['app']['version'] = $app['version']; |
|
|
|
} else { |
|
|
|
$importtxt = @implode('', file($file)); |
|
|
|
|
|
@ -42,7 +42,8 @@ $apps = array(); |
|
|
|
$string = " 1 "; |
|
|
|
$param=array('app_market'); |
|
|
|
if ($keyword) { |
|
|
|
$string .= " and appname like %s or vendor like %s"; |
|
|
|
$string .= " and appname like %s or vendor like %s or identifier like %s"; |
|
|
|
$param[]='%'.$keyword.'%'; |
|
|
|
$param[]='%'.$keyword.'%'; |
|
|
|
$param[]='%'.$keyword.'%'; |
|
|
|
} |
|
|
|
|
|
@ -50,6 +50,13 @@ |
|
|
|
</div> |
|
|
|
</header> |
|
|
|
<div class="card-body"> |
|
|
|
<div class="alert alert-warning alert-dismissible fade show" role="alert"> |
|
|
|
<strong>提示信息</strong> |
|
|
|
<li>升级应用时,请先备份好数据库和插件文件,以免升级过程中出现错误。</li> |
|
|
|
<li>升级后,需要前往系统工具中清理缓存。</li> |
|
|
|
<li>因升级会重置应用参数(非用户数据),所以升级后,需要重新配置应用。</li> |
|
|
|
<button type="button" class="btn-close" data-dismiss="alert" aria-label="Close"></button> |
|
|
|
</div> |
|
|
|
<form id="appform" name="appform" class="form-horizontal" action="{MOD_URL}" method="post"> |
|
|
|
<input type="hidden" name="appsubmit" value="true" /> |
|
|
|
<input type="hidden" name="formhash" value="{FORMHASH}" /> |
|
|
|
|
|
@ -458,7 +458,7 @@ $lang = array |
|
|
|
'system_administrators_available'=>'仅系统管理员可用', |
|
|
|
|
|
|
|
//admin/app/template/app.html
|
|
|
|
'application_name_suppliers'=>'应用名称或供应商', |
|
|
|
'application_name_suppliers'=>'可以根据应用名称、供应商、应用标识符搜索', |
|
|
|
'supplier'=>'供应商', |
|
|
|
'group_permissions'=>'组权限', |
|
|
|
'department_available'=>'可用部门', |
|
|
|
|
|
@ -56,7 +56,7 @@ class dzz_database { |
|
|
|
return self::query("$cmd $table SET $sql", null, $silent, !$return_insert_id); |
|
|
|
} |
|
|
|
|
|
|
|
public static function update($table, $data, $condition, $unbuffered = false, $low_priority = false) { |
|
|
|
public static function update($table, $data, $condition = '', $unbuffered = false, $low_priority = false) { |
|
|
|
$sql = self::implode($data); |
|
|
|
if(empty($sql)) { |
|
|
|
return false; |
|
|
@ -85,6 +85,9 @@ class dzz_database { |
|
|
|
|
|
|
|
public static function fetch_first($sql, $arg = array(), $silent = false) { |
|
|
|
$res = self::query($sql, $arg, $silent, false); |
|
|
|
if($res === 0){ |
|
|
|
return array(); |
|
|
|
} |
|
|
|
$ret = self::$db->fetch_array($res); |
|
|
|
self::$db->free_result($res); |
|
|
|
return $ret ? $ret : array(); |
|
|
|
|
|
@ -131,6 +131,7 @@ class dzz_session { |
|
|
|
static $updated = false; |
|
|
|
if(!$updated) { |
|
|
|
global $_G; |
|
|
|
$ulastactivity = 0; |
|
|
|
if($_G['uid']) { |
|
|
|
if($_G['cookie']['ulastactivity']) { |
|
|
|
$ulastactivity = authcode($_G['cookie']['ulastactivity'], 'DECODE'); |
|
|
@ -139,9 +140,10 @@ class dzz_session { |
|
|
|
dsetcookie('ulastactivity', authcode($ulastactivity, 'ENCODE'), 31536000); |
|
|
|
} |
|
|
|
} |
|
|
|
$oltimespan = $_G['setting']['oltimespan']; |
|
|
|
$lastolupdate = C::app()->session->var['lastolupdate']; |
|
|
|
if($_G['uid'] && $oltimespan && TIMESTAMP - ($lastolupdate ? $lastolupdate : $ulastactivity) > $oltimespan * 60) { |
|
|
|
$ulastactivity = (int)$ulastactivity; |
|
|
|
$oltimespan = (int)$_G['setting']['oltimespan']; |
|
|
|
$lastolupdate = (int)C::app()->session->var['lastolupdate']; |
|
|
|
if($_G['uid'] && $oltimespan && (int)TIMESTAMP - ($lastolupdate ? $lastolupdate : $ulastactivity) > $oltimespan * 60) { |
|
|
|
$isinsert = false; |
|
|
|
if(C::app()->session->isnew) { |
|
|
|
$oldata = C::t('onlinetime')->fetch($_G['uid']); |
|
|
|
|
|
@ -5,7 +5,7 @@ |
|
|
|
</h4> |
|
|
|
<button class="btn-close"></button> |
|
|
|
</div> |
|
|
|
<div class="popover-body" style="min-width: 300px;max-width: 800px;"> |
|
|
|
<div class="popover-body overflow-auto" style="min-width: 300px;max-width: 800px;max-height: 500px;"> |
|
|
|
<!--{if $list}--> |
|
|
|
<ul class="list-group"> |
|
|
|
<!--{loop $list $value}--> |
|
|
|