@@ -19,9 +19,7 @@ | |||
*/ | |||
function DelArc($aid, $type = 'ON', $onlyfile = FALSE, $recycle = 0) | |||
{ | |||
global $dsql, $cfg_cookie_encode, $cfg_multi_site, $cfg_medias_dir; | |||
global $cuserLogin, $cfg_upload_switch, $cfg_delete, $cfg_basedir; | |||
global $admin_catalogs, $cfg_admin_channel; | |||
global $dsql, $cfg_cookie_encode, $cfg_multi_site, $cfg_medias_dir, $cuserLogin, $cfg_upload_switch, $cfg_delete, $cfg_basedir, $admin_catalogs, $cfg_admin_channel; | |||
if ($cfg_delete == 'N') $type = 'OK'; | |||
if (empty($aid)) return; | |||
$aid = preg_replace("#[^0-9]#i", '', $aid); | |||
@@ -10,10 +10,7 @@ | |||
*/ | |||
require_once(dirname(__FILE__).'/config.php'); | |||
require_once(DEDEINC.'/image.func.php'); | |||
/************************ | |||
//上传 | |||
function Upload(){ } | |||
*************************/ | |||
if (empty($dopost)) { | |||
ini_set('html_errors', '0'); | |||
if (empty($Filedata) || !is_uploaded_file($Filedata)) { | |||
@@ -122,10 +119,7 @@ if (empty($dopost)) { | |||
echo "FILEID:".$_SESSION['fileid']; | |||
exit(0); | |||
} | |||
/************************ | |||
//生成缩图 | |||
function GetThumbnail(){ } | |||
*************************/ | |||
else if ($dopost == 'thumbnail') { | |||
if (empty($id)) { | |||
header('HTTP/1.1 500 Internal Server Error'); | |||
@@ -141,9 +135,7 @@ else if ($dopost == 'thumbnail') { | |||
echo $_SESSION['file_info'][$id]; | |||
exit(0); | |||
} | |||
/************************ | |||
//删除指定id的图片 | |||
*************************/ | |||
else if ($dopost == 'del') { | |||
if (!isset($_SESSION['bigfile_info'][$id])) { | |||
echo ''; | |||
@@ -156,9 +148,7 @@ else if ($dopost == 'del') { | |||
echo "已删除"; | |||
exit(); | |||
} | |||
/************************ | |||
//获取图片地址 | |||
*************************/ | |||
else if ($dopost == 'addtoedit') { | |||
if (!isset($_SESSION['bigfile_info'][$id])) { | |||
echo ''; | |||
@@ -167,10 +157,7 @@ else if ($dopost == 'addtoedit') { | |||
echo $_SESSION['bigfile_info'][$id]; | |||
exit(); | |||
} | |||
/************************ | |||
//获取本地图片的缩略预览图 | |||
function GetddImg(){ } | |||
*************************/ | |||
else if ($dopost == 'ddimg') { | |||
//生成缩略图 | |||
ob_start(); | |||
@@ -183,9 +170,7 @@ else if ($dopost == 'ddimg') { | |||
echo $imagevariable; | |||
exit(); | |||
} | |||
/************************ | |||
//删除指定的图片修改图片时用 | |||
*************************/ | |||
else if ($dopost == 'delold') { | |||
$imgfile = $cfg_basedir.$picfile; | |||
if (!file_exists($imgfile) && !is_dir($imgfile) && preg_match("#^".$cfg_medias_dir."#", $imgfile)) { | |||
@@ -29,7 +29,7 @@ | |||
</tr> | |||
<tr> | |||
<td colspan="2"> | |||
<div class="alert alert-info mb-0">首页更新默认保存在根目录,如果不是在根目录安装的网站又想首页更新到网站根目录,使用相对路径来表示首页位置,例:安装在“http://www.abc.com/DedeBIZ/目录”,更新首页为:“http://www.abc.com/index.html”,填写:“../index.html”</div> | |||
<div class="alert alert-info mb-0">首页默认更新文件存放在根目录,如果不是根目录安装网站又想首页更新到网站根目录,使用相对路径来表示首页位置,例:安装在“http://www.abc.com/DedeBIZ/目录”,更新首页为:“http://www.abc.com/index.html”,填写:“../index.html”</div> | |||
</td> | |||
</tr> | |||
<tr> | |||
@@ -452,7 +452,7 @@ function IsSSL() | |||
//获取对应版本号的更新SQL | |||
function GetUpdateSQL() | |||
{ | |||
global $cfg_dbprefix,$cfg_dbtype,$cfg_db_language; | |||
global $cfg_dbprefix, $cfg_dbtype, $cfg_db_language; | |||
$result = array(); | |||
$query = ''; | |||
$sql4tmp = "ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language; | |||
@@ -543,7 +543,7 @@ function face($mid) | |||
if (!function_exists('GetMyTags')) { | |||
function GetMyTags($aid, $num=3) | |||
{ | |||
global $dsql,$cfg_cmspath; | |||
global $dsql, $cfg_cmspath; | |||
$tags = ''; | |||
$query = "SELECT * FROM `#@__taglist` WHERE aid='$aid' LIMIT $num"; | |||
$dsql->Execute('tag',$query); | |||
@@ -558,7 +558,7 @@ if (!function_exists('GetMyTags')) { | |||
if (!function_exists('pasterTempletDiy')) { | |||
function pasterTempletDiy($path) | |||
{ | |||
global $cfg_basedir,$cfg_templets_dir,$cfg_df_style; | |||
global $cfg_basedir, $cfg_templets_dir, $cfg_df_style; | |||
$tmpfile = $cfg_basedir.$cfg_templets_dir.'/'.$cfg_df_style.'/'.$path; | |||
$dtp = new PartView(); | |||
$dtp->SetTemplet($tmpfile); | |||
@@ -870,11 +870,7 @@ class DedeTagParse | |||
return $restr; | |||
} | |||
} | |||
/********************************************** | |||
//class DedeAttribute Dede模板标记属性集合 | |||
function c____DedeAttribute(); | |||
**********************************************/ | |||
//属性的数据描述 | |||
//属性数据描述 | |||
class DedeAttribute | |||
{ | |||
var $Count = -1; | |||
@@ -913,10 +909,7 @@ class DedeAttribute | |||
return $this->Count + 1; | |||
} | |||
} | |||
/******************************* | |||
//属性解析器(本版本中已经支持使用\'这种语法,和用.间隔表示name属性,如 field.body) | |||
function c____DedeAttributeParse(); | |||
********************************/ | |||
//属性解析器 | |||
class DedeAttributeParse | |||
{ | |||
var $sourceString = ""; | |||
@@ -990,7 +983,7 @@ class DedeAttributeParse | |||
$startdd = 0; | |||
} | |||
} | |||
//查找属性的限定标志 | |||
//查找属性限定标志 | |||
else if ($startdd == 0) { | |||
switch ($d) { | |||
case ' ': | |||
@@ -1021,7 +1014,7 @@ class DedeAttributeParse | |||
} | |||
} | |||
}//for | |||
//最后一个属性的给值 | |||
//最后一个属性给值 | |||
if ($tmpatt != '') { | |||
$this->cAttributes->Count++; | |||
$this->cAttributes->Items[$tmpatt] = trim($tmpvalue); | |||
@@ -377,9 +377,7 @@ function evalCode($code) | |||
//校验脚本 | |||
function checkCode($code) | |||
{ | |||
global $allowedCalls; | |||
global $allowedTokens; | |||
global $disallowedExpressions; | |||
global $allowedCalls, $allowedTokens, $disallowedExpressions; | |||
$tokens = token_get_all('<?php '.$code.' ?>'); | |||
$errors = array(); | |||
$braces = 0; | |||
@@ -416,17 +414,17 @@ function checkCode($code) | |||
$id = token_name($token[0]); | |||
switch ($id) { | |||
case ('T_STRING'): | |||
if (in_array(strtolower($token[1]), $allowedCalls) === false) { | |||
$errors[$i]['name'] = 'Illegal function: '.$token[1]; | |||
$errors[$i]['line'] = $token[2]; | |||
} | |||
break; | |||
if (in_array(strtolower($token[1]), $allowedCalls) === false) { | |||
$errors[$i]['name'] = 'Illegal function: '.$token[1]; | |||
$errors[$i]['line'] = $token[2]; | |||
} | |||
break; | |||
default: | |||
if (in_array($id, $allowedTokens) === false) { | |||
$errors[$i]['name'] = 'Illegal token: '.$token[1]; | |||
$errors[$i]['line'] = $token[2]; | |||
} | |||
break; | |||
if (in_array($id, $allowedTokens) === false) { | |||
$errors[$i]['name'] = 'Illegal token: '.$token[1]; | |||
$errors[$i]['line'] = $token[2]; | |||
} | |||
break; | |||
} | |||
} | |||
} | |||
@@ -23,9 +23,7 @@ if (!defined('DEDEINC')) exit('dedebiz'); | |||
if (!function_exists('AdminUpload')) { | |||
function AdminUpload($uploadname, $ftype = 'image', $rnddd = 0, $watermark = TRUE, $filetype = '') | |||
{ | |||
global $dsql, $cuserLogin, $cfg_addon_savetype, $cfg_dir_purview; | |||
global $cfg_basedir, $cfg_image_dir, $cfg_soft_dir, $cfg_other_medias; | |||
global $cfg_imgtype, $cfg_softtype, $cfg_mediatype; | |||
global $dsql, $cuserLogin, $cfg_addon_savetype, $cfg_dir_purview, $cfg_basedir, $cfg_image_dir, $cfg_soft_dir, $cfg_other_medias, $cfg_imgtype, $cfg_softtype, $cfg_mediatype; | |||
if ($watermark) include_once(DEDEINC.'/image.func.php'); | |||
$file_tmp = isset($GLOBALS[$uploadname]) ? $GLOBALS[$uploadname] : ''; | |||
if ($file_tmp == '' || !is_uploaded_file($file_tmp)) { | |||
@@ -24,8 +24,7 @@ function SpGetPinyin($str, $ishead = 0, $isclose = 1) | |||
if ($pinyins==null) { | |||
$pinyins = array(); | |||
} | |||
global $cfg_bizcore_appid, $cfg_bizcore_key; | |||
global $cfg_soft_lang; | |||
global $cfg_bizcore_appid, $cfg_bizcore_key, $cfg_soft_lang; | |||
$restr = ''; | |||
if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { | |||
if ($cfg_soft_lang == "utf-8") { | |||
@@ -42,8 +42,7 @@ function random($length, $numeric = 0) | |||
*/ | |||
function sendmail($email, $mailtitle, $mailbody, $headers) | |||
{ | |||
global $cfg_sendmail_bysmtp, $cfg_smtp_server, $cfg_smtp_port, $cfg_smtp_usermail, $cfg_smtp_user, $cfg_smtp_password, $cfg_adminemail; | |||
global $cfg_bizcore_appid,$cfg_bizcore_key; | |||
global $cfg_sendmail_bysmtp, $cfg_smtp_server, $cfg_smtp_port, $cfg_smtp_usermail, $cfg_smtp_user, $cfg_smtp_password, $cfg_adminemail, $cfg_bizcore_appid, $cfg_bizcore_key; | |||
if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { | |||
$client = new DedeBizClient(); | |||
$client->MailSend($email,$mailtitle,$mailtitle,$mailbody); | |||