mirror of
https://github.com/DzzXH/DzzOffice.git
synced 2026-03-01 12:22:43 +08:00
更新至v1.87.2,更新内容在Dzzoffice笔记中查看
This commit is contained in:
@@ -390,7 +390,7 @@ $lang = array
|
||||
'database_export_zip_succeed' => '数据成功备份并压缩至服务器 <a href="{filename}">{filename}</a> 中',
|
||||
'tools_updatecache_tips' => '<li>当站点进行了数据恢复、升级或者工作出现异常的时候,您可以使用本功能重新生成缓存。更新缓存的时候,可能让服务器负载升高,请尽量避开会员访问的高峰时间</li>
|
||||
<li>数据缓存:更新站点的全部数据缓存</li>
|
||||
<li>模板缓存:更新论坛模板、风格等缓存文件,当您修改了模板或者风格,但是没有立即生效的时候使用</li>
|
||||
<li>模板缓存:更新Dzz模板、风格等缓存文件,当您修改了模板或者风格,但是没有立即生效的时候使用</li>
|
||||
',
|
||||
// admin/stysem
|
||||
'updatecache'=>'更新缓存',
|
||||
|
||||
@@ -85,8 +85,7 @@ if ($operation == 'export') {
|
||||
}
|
||||
|
||||
$volume = intval($_GET['volume']) + 1;
|
||||
$idstring = '# Identify: ' . base64_encode($_G['timestamp']."," . $_G['setting']['version'] . "," .$_GET['type']."," .$_GET['method']."," .$volume."," .$tablepre."," .$dbcharset) . "\n";
|
||||
|
||||
$idstring = '# Identify: ' . base64_encode("$_G[timestamp]," . $_G['setting']['version'] . ",{$_GET['type']},{$_GET['method']},{$volume},{$tablepre},{$dbcharset}") . "\n";
|
||||
$dumpcharset = $_GET['sqlcharset'] ? $_GET['sqlcharset'] : str_replace('-', '', $_G['charset']);
|
||||
$setnames = ($_GET['sqlcharset'] && $db -> version() > '4.1' && (!$_GET['sqlcompat'] || $_GET['sqlcompat'] == 'MYSQL41')) ? "SET NAMES '$dumpcharset';\n\n" : '';
|
||||
if ($db -> version() > '4.1') {
|
||||
@@ -499,7 +498,7 @@ function sqldumptablestruct($table) {
|
||||
}
|
||||
|
||||
$tablestatus = DB::fetch_first("SHOW TABLE STATUS LIKE '$table'");
|
||||
$tabledump .= ($tablestatus['Auto_increment'] ? " AUTO_INCREMENT=$tablestatus['Auto_increment']" : ''). ";\n\n";
|
||||
$tabledump .= ($tablestatus['Auto_increment'] ? " AUTO_INCREMENT=$tablestatus[Auto_increment]" : ''). ";\n\n";
|
||||
if ($_GET['sqlcompat'] == 'MYSQL40' && $db -> version() >= '4.1' && $db -> version() < '5.1') {
|
||||
if ($tablestatus['Auto_increment'] <> '') {
|
||||
$temppos = strpos($tabledump, ',');
|
||||
@@ -540,7 +539,7 @@ function sqldumptable($table, $startfrom = 0, $currsize = 0) {
|
||||
if ($_GET['extendins'] == '0') {
|
||||
while ($currsize + strlen($tabledump) + 500 < $_GET['sizelimit'] * 1000 && $numrows == $offset) {
|
||||
if ($firstfield['Extra'] == 'auto_increment') {
|
||||
$selectsql = "SELECT * FROM $table WHERE$firstfield['Field']> $startfrom ORDER BY$firstfield['Field']LIMIT $offset";
|
||||
$selectsql = "SELECT * FROM $table WHERE $firstfield[Field] > $startfrom ORDER BY $firstfield[Field] LIMIT $offset";
|
||||
} else {
|
||||
$selectsql = "SELECT * FROM $table LIMIT $startfrom, $offset";
|
||||
}
|
||||
@@ -571,7 +570,7 @@ function sqldumptable($table, $startfrom = 0, $currsize = 0) {
|
||||
} else {
|
||||
while ($currsize + strlen($tabledump) + 500 < $_GET['sizelimit'] * 1000 && $numrows == $offset) {
|
||||
if ($firstfield['Extra'] == 'auto_increment') {
|
||||
$selectsql = "SELECT * FROM $table WHERE$firstfield['Field']> $startfrom LIMIT $offset";
|
||||
$selectsql = "SELECT * FROM $table WHERE $firstfield[Field] > $startfrom LIMIT $offset";
|
||||
} else {
|
||||
$selectsql = "SELECT * FROM $table LIMIT $startfrom, $offset";
|
||||
}
|
||||
|
||||
@@ -149,10 +149,7 @@ class core
|
||||
}
|
||||
|
||||
public static function handleException($exception) {
|
||||
global $_config;
|
||||
if($_config['debug']>0){
|
||||
dzz_error::exception_error($exception);
|
||||
}
|
||||
dzz_error::exception_error($exception);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -610,32 +610,31 @@ class dzz_app extends dzz_base{
|
||||
}
|
||||
}
|
||||
if($appidxu=C::t('app_market')->fetch_by_identifier(CURMODULE)){
|
||||
if($this->var['member']['adminid'] || $_GET['do']=='savefile'){
|
||||
}elseif($appidxu['available']==0){
|
||||
showmessage(lang('该应用已关闭,请联系管理员。'));
|
||||
if($this->var['member']['adminid'] || $_GET['do']=='savefile'){
|
||||
}elseif($appidxu['available']==0){
|
||||
showmessage(lang('该应用已关闭,请联系管理员。'));
|
||||
}elseif($this->var['member']['uid']){
|
||||
$appuid= C::t('user_field')->fetch($this->var['member']['uid']);
|
||||
$appuidz=explode(',',$appuid['applist']);
|
||||
if (in_array($appidxu['appid'],$appuidz)){
|
||||
}elseif($config=dzz_userconfig_init()){
|
||||
if($config['applist']){
|
||||
$applist=explode(',',$config['applist']);
|
||||
}else{
|
||||
$applist=array();
|
||||
}
|
||||
$appuid= C::t('user_field')->fetch($_G['uid']);
|
||||
$appuid= C::t('user_field')->fetch($this->var['member']['uid']);
|
||||
$appuidz=explode(',',$appuid['applist']);
|
||||
if (in_array($appidxu['appid'],$appuidz)){
|
||||
}else{
|
||||
showmessage(lang('您无权限使用该应用,请联系管理员。'));
|
||||
}elseif($config=dzz_userconfig_init()){
|
||||
if($config['applist']){
|
||||
$applist=explode(',',$config['applist']);
|
||||
}else{
|
||||
$applist=array();
|
||||
}
|
||||
$appuid= C::t('user_field')->fetch($_G['uid']);
|
||||
$appuidz=explode(',',$appuid['applist']);
|
||||
if (in_array($appidxu['appid'],$appuidz)){
|
||||
}else{
|
||||
showmessage(lang('您无权限使用该应用,请联系管理员。'));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}elseif($appidxu['group']==0 || $appidxu['group']==-1){
|
||||
}else{
|
||||
Hook::listen('check_login');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(isset($this->var['setting']['nocacheheaders']) && $this->var['setting']['nocacheheaders']) {
|
||||
@header("Expires: -1");
|
||||
@header("Cache-Control: no-store, private, post-check=0, pre-check=0, max-age=0", FALSE);
|
||||
|
||||
@@ -14,7 +14,7 @@ if(!defined('CORE_VERSION')) {
|
||||
define('CORE_VERSION', '2.02');
|
||||
define('CORE_RELEASE', '20180909');
|
||||
define('CORE_FIXBUG' , '20000000');
|
||||
define('CORE_XHVERSION', '1.87.1');
|
||||
define('CORE_XHRELEASE', '20240127');
|
||||
define('CORE_XHVERSION', '1.87.2');
|
||||
define('CORE_XHRELEASE', '20240129');
|
||||
define('CORE_XHFIXBUG' , '20240110');
|
||||
}
|
||||
@@ -1774,93 +1774,79 @@ $idtype2type = array(
|
||||
'qid' => 'attach',
|
||||
'uid' => 'user'
|
||||
);
|
||||
function get_os()
|
||||
function get_os($agent = '')
|
||||
{
|
||||
$agent = $_SERVER['HTTP_USER_AGENT'];
|
||||
$os = false;
|
||||
|
||||
if (eregi('win', $agent) && eregi('nt 5.1', $agent)) {
|
||||
$os = 'Windows XP';
|
||||
} else if (eregi('win', $agent) && eregi('nt 5.0', $agent)) {
|
||||
$os = 'Windows 2000';
|
||||
} else if (eregi('win', $agent) && eregi('nt 5.2', $agent)) {
|
||||
$os = 'Windows 2003';
|
||||
} else if (eregi('win', $agent) && eregi('nt 6.0', $agent)) {
|
||||
$os = 'Windows 2008';
|
||||
} else if (eregi('win', $agent) && eregi('6.0', $agent)) {
|
||||
$os = 'Windows vista';
|
||||
} else if (eregi('win', $agent) && eregi('6.1', $agent)) {
|
||||
if (!$agent) $agent = $_SERVER['HTTP_USER_AGENT'];
|
||||
$os = 'unknow';
|
||||
if (stristr($agent, 'iPad')) {
|
||||
$os = "iPad";
|
||||
} elseif (preg_match('/Android (([0-9_.]{1,3})+)/i', $agent, $version)) {
|
||||
$os = "Android " . $version[1];
|
||||
} elseif (preg_match('/iPhone OS (([0-9_.]{1,3})+)/i', $agent, $version)) {
|
||||
$os = "iPhone " . $version[1];
|
||||
} elseif (preg_match('/win/i', $agent) && strpos($agent, '95')) {
|
||||
$os = 'Windows 95';
|
||||
} elseif (preg_match('/win 9x/i', $agent) && strpos($agent, '4.90')) {
|
||||
$os = 'Windows ME';
|
||||
} elseif (preg_match('/win/i', $agent) && preg_match('/98/i', $agent)) {
|
||||
$os = 'Windows 98';
|
||||
} elseif (preg_match('/win/i', $agent) && preg_match('/nt 6.0/i', $agent)) {
|
||||
$os = 'Windows Vista';
|
||||
} elseif (preg_match('/win/i', $agent) && preg_match('/nt 6.1/i', $agent)) {
|
||||
$os = 'Windows 7';
|
||||
} else if (eregi('win', $agent) && eregi('6.2', $agent)) {
|
||||
} elseif (preg_match('/win/i', $agent) && preg_match('/nt 6.2/i', $agent)) {
|
||||
$os = 'Windows 8';
|
||||
} else if (eregi('win', $agent) && eregi('nt', $agent)) {
|
||||
} elseif (preg_match('/win/i', $agent) && preg_match('/nt 10.0/i', $agent)) {
|
||||
$os = 'Windows 10';
|
||||
} elseif (preg_match('/win/i', $agent) && preg_match('/nt 5.1/i', $agent)) {
|
||||
$os = 'Windows XP';
|
||||
} elseif (preg_match('/win/i', $agent) && preg_match('/nt 5/i', $agent)) {
|
||||
$os = 'Windows 2000';
|
||||
} elseif (preg_match('/win/i', $agent) && preg_match('/nt/i', $agent)) {
|
||||
$os = 'Windows NT';
|
||||
} else if (eregi('win', $agent) && ereg('32', $agent)) {
|
||||
} elseif (preg_match('/win/i', $agent) && preg_match('/32/i', $agent)) {
|
||||
$os = 'Windows 32';
|
||||
} else if (eregi('linux', $agent) && ereg('Android', $agent)) {
|
||||
$os = 'Android';
|
||||
} else if (eregi('linux', $agent)) {
|
||||
} elseif (preg_match('/linux/i', $agent)) {
|
||||
$os = 'Linux';
|
||||
} else if (eregi('unix', $agent)) {
|
||||
} elseif (preg_match('/unix/i', $agent)) {
|
||||
$os = 'Unix';
|
||||
} else if (eregi('sun', $agent) && eregi('os', $agent)) {
|
||||
} elseif (preg_match('/sun/i', $agent) && preg_match('/os/i', $agent)) {
|
||||
$os = 'SunOS';
|
||||
} else if (eregi('ibm', $agent) && eregi('os', $agent)) {
|
||||
} elseif (preg_match('/ibm/i', $agent) && preg_match('/os/i', $agent)) {
|
||||
$os = 'IBM OS/2';
|
||||
} else if (eregi('Mac', $agent) && eregi('Macintosh', $agent)) {
|
||||
} elseif (preg_match('/Mac/i', $agent) && preg_match('/PC/i', $agent)) {
|
||||
$os = 'Macintosh';
|
||||
} else if (eregi('PowerPC', $agent)) {
|
||||
} elseif (preg_match('/PowerPC/i', $agent)) {
|
||||
$os = 'PowerPC';
|
||||
} /* else if (eregi('AIX', $agent))
|
||||
{
|
||||
$os = 'AIX';
|
||||
}
|
||||
else if (eregi('HPUX', $agent))
|
||||
{
|
||||
$os = 'HPUX';
|
||||
}
|
||||
else if (eregi('NetBSD', $agent))
|
||||
{
|
||||
$os = 'NetBSD';
|
||||
}
|
||||
else if (eregi('BSD', $agent))
|
||||
{
|
||||
$os = 'BSD';
|
||||
}
|
||||
else if (ereg('OSF1', $agent))
|
||||
{
|
||||
$os = 'OSF1';
|
||||
}
|
||||
else if (ereg('IRIX', $agent))
|
||||
{
|
||||
$os = 'IRIX';
|
||||
}
|
||||
else if (eregi('FreeBSD', $agent))
|
||||
{
|
||||
$os = 'FreeBSD';
|
||||
}
|
||||
else if (eregi('teleport', $agent))
|
||||
{
|
||||
$os = 'teleport';
|
||||
}
|
||||
else if (eregi('flashget', $agent))
|
||||
{
|
||||
$os = 'flashget';
|
||||
}
|
||||
else if (eregi('webzip', $agent))
|
||||
{
|
||||
$os = 'webzip';
|
||||
}
|
||||
else if (eregi('offline', $agent))
|
||||
{
|
||||
$os = 'offline';
|
||||
}*/
|
||||
else {
|
||||
$os = 'Unknown';
|
||||
} elseif (preg_match('/AIX/i', $agent)) {
|
||||
$os = 'AIX';
|
||||
} elseif (preg_match('/HPUX/i', $agent)) {
|
||||
$os = 'HPUX';
|
||||
} elseif (preg_match('/NetBSD/i', $agent)) {
|
||||
$os = 'NetBSD';
|
||||
} elseif (preg_match('/BSD/i', $agent)) {
|
||||
$os = 'BSD';
|
||||
} elseif (preg_match('/OSF1/i', $agent)) {
|
||||
$os = 'OSF1';
|
||||
} elseif (preg_match('/IRIX/i', $agent)) {
|
||||
$os = 'IRIX';
|
||||
} elseif (preg_match('/FreeBSD/i', $agent)) {
|
||||
$os = 'FreeBSD';
|
||||
} elseif (preg_match('/teleport/i', $agent)) {
|
||||
$os = 'teleport';
|
||||
} elseif (preg_match('/flashget/i', $agent)) {
|
||||
$os = 'flashget';
|
||||
} elseif (preg_match('/webzip/i', $agent)) {
|
||||
$os = 'webzip';
|
||||
} elseif (preg_match('/offline/i', $agent)) {
|
||||
$os = 'offline';
|
||||
} else {
|
||||
$os = 'unkonow';
|
||||
}
|
||||
return $os;
|
||||
}
|
||||
|
||||
|
||||
function array_sort($arr, $keys, $type = 'asc')
|
||||
{ //二维数组排序;
|
||||
$keysvalue = $new_array = array();
|
||||
|
||||
Reference in New Issue
Block a user