diff --git a/src/admin/dialog/select_mimages.php b/src/admin/dialog/select_mimages.php
index 6ddbf59e..22775c82 100644
--- a/src/admin/dialog/select_mimages.php
+++ b/src/admin/dialog/select_mimages.php
@@ -58,7 +58,7 @@ button+button{margin-left:10px}
if (document.querySelector('#isWater').checked) {
formData.append('needwatermark', 1);
} else {
- // formData.append('needwatermark', 0);
+ //formData.append('needwatermark', 0);
}
let res = await fetch('select_images_post.php', {
method: 'POST',
diff --git a/src/admin/file_manage_view.php b/src/admin/file_manage_view.php
index 6cc7d405..3c240b0e 100644
--- a/src/admin/file_manage_view.php
+++ b/src/admin/file_manage_view.php
@@ -136,9 +136,7 @@ else if($fmdo=="editview")
if((eregi("sendmail($email,$cfg_webname,$cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype);
- }else{
+ } else {
@mail($email, $mailtitle, $mailbody, $headers);
}
}
@@ -62,7 +62,7 @@ if($action=="post"){
if(file_exists(DEDEDATA.'/mail/'.$mailfile)){
$address = file(DEDEDATA.'/mail/'.$mailfile);
$address=implode(",", $address);
- }else{
+ } else {
ShowMsg($mailfile."不存在","-1");
exit();
}
diff --git a/src/admin/mail_title.php b/src/admin/mail_title.php
index 7ac0d2af..b85fbff6 100644
--- a/src/admin/mail_title.php
+++ b/src/admin/mail_title.php
@@ -50,7 +50,7 @@ if($dopost=="add"){
if(!$dsql->ExecuteNoneQuery($query)){
ShowMsg("更新数据库#@__mail_title表时出错,请检查","javascript:;");
exit();
- }else{
+ } else {
ShowMsg("发表期刊成功","mail_title.php");
exit();
}
@@ -78,7 +78,7 @@ if($dopost=="add"){
if(!$dsql->ExecuteNoneQuery($query)){
ShowMsg("更新数据库#@__mail_title表时出错,请检查","javascript:;");
exit();
- }else{
+ } else {
ShowMsg("编辑期刊成功","mail_title.php");
exit();
}
@@ -86,7 +86,7 @@ if($dopost=="add"){
$dsql->ExecuteNoneQuery("Delete From `#@__mail_title` where id='$id'");
ShowMsg("删除期刊成功","mail_title.php");
exit();
-}else{
+} else {
function GetSendTimeMk($mktime){
if($mktime=="0") return "未发送";
diff --git a/src/admin/mail_title_send.php b/src/admin/mail_title_send.php
index 4c790fc9..04f6dd44 100644
--- a/src/admin/mail_title_send.php
+++ b/src/admin/mail_title_send.php
@@ -27,7 +27,7 @@ if($dopost=="send"){
exit();
}
$smtp->sendmail($email,$cfg_webname,$cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype);
- }else{
+ } else {
@mail($email, $mailtitle, $mailbody, $headers);
}
}
@@ -57,7 +57,7 @@ if($dopost=="send"){
ShowMsg('邮件已成功发送','mail_title_send.php');
exit();
}
-}else{
+} else {
function GetState($state){
if($state=="0") return "未发送";
diff --git a/src/admin/mail_type.php b/src/admin/mail_type.php
index bf883a98..c0cd9802 100644
--- a/src/admin/mail_type.php
+++ b/src/admin/mail_type.php
@@ -21,7 +21,7 @@ if($dopost=="add"){
if(!$dsql->ExecuteNoneQuery($query)){
ShowMsg("更新数据库#@__mail_type表时出错,请检查","javascript:;");
exit();
- }else{
+ } else {
ShowMsg("添加分类成功","mail_type.php");
exit();
}
@@ -37,7 +37,7 @@ if($dopost=="add"){
if(!$dsql->ExecuteNoneQuery($query)){
ShowMsg("更新数据库#@__mail_type表时出错,请检查","javascript:;");
exit();
- }else{
+ } else {
ShowMsg("修改分类成功","mail_type.php");
exit();
}
@@ -45,7 +45,7 @@ if($dopost=="add"){
$dsql->ExecuteNoneQuery("Delete From `#@__mail_type` where id='$id'");
ShowMsg("删除分类成功","mail_type.php");
exit();
-}else{
+} else {
$sql = "SELECT * FROM `#@__mail_type` ORDER BY id ";
$dlist = new DataListCP();
$dlist->SetTemplet(DEDEADMIN."/templets/mail_type_main.htm");
diff --git a/src/admin/templets/index_top2.htm b/src/admin/templets/index_top2.htm
index d4c977ff..95e0cca3 100644
--- a/src/admin/templets/index_top2.htm
+++ b/src/admin/templets/index_top2.htm
@@ -21,7 +21,7 @@ function ChangeMenu(way)
top.document.all.btFrame.cols = '0,*';
FrameHide = 1;
return;
- }else{
+ } else {
top.document.all.btFrame.cols = preFrameW;
FrameHide = 0;
return;
@@ -45,7 +45,7 @@ function ChangeMenuFF(way)
window.parent.document.getElementsByTagName('btFrame').cols = '0,*';
FrameHide = 1;
return;
- }else{
+ } else {
window.parent.document.getElementsByTagName('btFrame').cols = preFrameW;
FrameHide = 0;
return;
diff --git a/src/admin/templets/makehtml_homepage.htm b/src/admin/templets/makehtml_homepage.htm
index 795f5823..eb91303c 100644
--- a/src/admin/templets/makehtml_homepage.htm
+++ b/src/admin/templets/makehtml_homepage.htm
@@ -89,7 +89,7 @@
-
+
操作密码: |
diff --git a/src/admin/templets/member_toadmin.htm b/src/admin/templets/member_toadmin.htm
index c51b7d6d..37ef6bb3 100644
--- a/src/admin/templets/member_toadmin.htm
+++ b/src/admin/templets/member_toadmin.htm
@@ -36,7 +36,7 @@
if($row['matt']==10)
{
echo "已经是管理员了,不要再提升了";
- }else{
+ } else {
?>
diff --git a/src/admin/templets/public_guide.htm b/src/admin/templets/public_guide.htm
index ed2a8029..ead4bfd8 100644
--- a/src/admin/templets/public_guide.htm
+++ b/src/admin/templets/public_guide.htm
@@ -22,7 +22,7 @@
if(selobj.checked){
if(preobj!=null && selid != selCheckbox) preobj.checked = false;
selCheckbox = selid;
- }else{
+ } else {
if(selCheckbox == selid) selCheckbox = '';
}
}
@@ -30,7 +30,7 @@
{
if(selCheckbox==''){
ShowMsg("您没有选中需要设置为默认的栏目");
- }else{
+ } else {
var selobj = document.getElementById(selCheckbox);
location="public_guide.php?action=setdefault&cid="+selobj.value;
}
@@ -89,7 +89,7 @@
?>
管理内容
发布内容
-
+
|
管理内容
|
diff --git a/src/admin/templets/sys_data.htm b/src/admin/templets/sys_data.htm
index e0251643..83a0d67c 100644
--- a/src/admin/templets/sys_data.htm
+++ b/src/admin/templets/sys_data.htm
@@ -227,7 +227,7 @@
class="btn btn-success btn-sm">结构
| | | \r\n";
}
echo " \r\n";
diff --git a/src/admin/templets/sys_data_revert.htm b/src/admin/templets/sys_data_revert.htm
index cf80d62a..b2efe489 100644
--- a/src/admin/templets/sys_data_revert.htm
+++ b/src/admin/templets/sys_data_revert.htm
@@ -94,7 +94,7 @@
{$filelists[$i]} | \r\n";
echo $mtd;
- }else{
+ } else {
echo " | | \r\n";
}
echo "\r\n";
diff --git a/src/admin/templets/vote_main.htm b/src/admin/templets/vote_main.htm
index 09a6e117..fb52c6f7 100644
--- a/src/admin/templets/vote_main.htm
+++ b/src/admin/templets/vote_main.htm
@@ -37,7 +37,7 @@
{dede:field.endtime function="GetDateMk(@me)" /} |
{dede:field.totalcount /} |
- 未启用";}else{echo "启用";} ?>
+ 未启用";} else {echo "启用";} ?>
|
代码
diff --git a/src/include/arc.freelist.class.php b/src/include/arc.freelist.class.php
index 35974522..2ae1a151 100755
--- a/src/include/arc.freelist.class.php
+++ b/src/include/arc.freelist.class.php
@@ -65,9 +65,7 @@ class FreeList
if(empty($channelid))
{
showmsg('必须指定频道','-1');exit();
- }
- else
- {
+ } else {
$channelid = intval($channelid);
$channelinfo = $this->dsql->getone("select maintable from #@__channeltype where id='$channelid'");
$this->maintable = $channelinfo['maintable'];
diff --git a/src/include/arc.searchview.class.php b/src/include/arc.searchview.class.php
index 06cdee58..50949177 100755
--- a/src/include/arc.searchview.class.php
+++ b/src/include/arc.searchview.class.php
@@ -751,8 +751,8 @@ class SearchView
$plist .= $endpage;
//if($totalpage>$total_list)
//{
- // $plist.=" | | \r\n";
- // $plist.=" | \r\n";
+ // $plist.=" | \r\n";
+ // $plist.=" | \r\n";
//}
$plist .= "\r\n";
return $plist;
diff --git a/src/include/autoload.inc.php b/src/include/autoload.inc.php
index dc116a3d..fece3fee 100755
--- a/src/include/autoload.inc.php
+++ b/src/include/autoload.inc.php
@@ -23,18 +23,14 @@ function __autoload($classname)
if ( is_file ( DEDEINC.'/'.$libclassfile ) )
{
require DEDEINC.'/'.$libclassfile;
- }
- else
- {
+ } else {
if (DEBUG_LEVEL === TRUE)
{
echo '';
echo $classname.'类找不到';
echo ' ';
exit ();
- }
- else
- {
+ } else {
header ( "location:/404.html" );
die ();
}
diff --git a/src/include/autoload7.inc.php b/src/include/autoload7.inc.php
index 86ae8089..b18a95ad 100755
--- a/src/include/autoload7.inc.php
+++ b/src/include/autoload7.inc.php
@@ -23,18 +23,14 @@ function dede_autoloader($classname)
if ( is_file ( DEDEINC.'/'.$libclassfile ) )
{
require DEDEINC.'/'.$libclassfile;
- }
- else
- {
+ } else {
if (DEBUG_LEVEL === TRUE)
{
echo '';
echo $classname.'类找不到';
echo ' ';
exit ();
- }
- else
- {
+ } else {
header ( "location:/404.html" );
die ();
}
diff --git a/src/include/cli.class.php b/src/include/cli.class.php
index dd01dae9..1c75a661 100644
--- a/src/include/cli.class.php
+++ b/src/include/cli.class.php
@@ -206,9 +206,7 @@ class DedeCli
$step = (int)round($percent / 10);
fwrite(STDOUT, "[\033[32m".str_repeat('#', $step).str_repeat('.', 10 - $step)."\033[0m]");
fwrite(STDOUT, sprintf(" %3d%% Complete", $percent).PHP_EOL);
- }
- else
- {
+ } else {
fwrite(STDOUT, "\007");
}
}
@@ -362,9 +360,7 @@ class DedeCli
$time--;
}
static::write();
- }
- else
- {
+ } else {
if ($seconds > 0)
{
sleep($seconds);
diff --git a/src/include/dedemodule.class.php b/src/include/dedemodule.class.php
index 12bf49f3..d35539c9 100755
--- a/src/include/dedemodule.class.php
+++ b/src/include/dedemodule.class.php
@@ -12,17 +12,14 @@ if (!defined('DEDEINC')) exit('dedebiz');
require_once(DEDEINC.'/charset.func.php');
require_once(DEDEINC.'/dedeatt.class.php');
require_once(DEDEINC.'/dedehttpdown.class.php');
-
function base64url_encode($data)
{
return rtrim(strtr(base64_encode($data), '+/', '-_'), '=');
}
-
function base64url_decode($data)
{
return base64_decode(str_pad(strtr($data, '-_', '+/'), strlen($data) % 4, '=', STR_PAD_RIGHT));
}
-
class DedeModule
{
var $modulesPath;
@@ -43,7 +40,6 @@ class DedeModule
{
$this->__construct($modulespath);
}
-
/**
* 枚举系统里已经存在的模块(缓存功能实际上只作hash与文件名的解析,在此不特别处理)
*
@@ -54,11 +50,8 @@ class DedeModule
function GetModuleList($moduletype = '')
{
if (is_array($this->modules)) return $this->modules;
-
$dh = dir($this->modulesPath) or die("没找到模块目录:({$this->modulesPath})");
-
- $fp = @fopen($this->modulesPath.'/modulescache.php', 'w') or die('读取文件权限出错,目录文件'.$this->modulesPath.'/modulescache.php不可写!');
-
+ $fp = @fopen($this->modulesPath.'/modulescache.php', 'w') or die('读取文件权限出错,目录文件'.$this->modulesPath.'/modulescache.php不可写');
fwrite($fp, "<"."?php\r\n");
fwrite($fp, "global \$allmodules;\r\n");
while ($filename = $dh->read()) {
@@ -81,7 +74,6 @@ class DedeModule
$dh->Close();
return $this->modules;
}
-
/**
* 从远程获取模块信息
*
@@ -119,7 +111,6 @@ class DedeModule
}
}
}
-
/**
* 获得指定hash的模块文件
*
@@ -133,7 +124,6 @@ class DedeModule
if (isset($GLOBALS['allmodules'][$hash])) return $GLOBALS['allmodules'][$hash];
else return $hash.'.xml';
}
-
/**
* 获得某模块的基本信息
*
@@ -176,20 +166,16 @@ class DedeModule
}
}
fclose($fp);
-
if (empty($minfos['lang'])) {
$minfos['lang'] = "utf-8";
}
if (isset($minfos['lang'])) $this->moduleLang = trim($minfos['lang']);
else $this->moduleLang = 'gbk';
-
if ($this->sysLang == 'gb2312') $this->sysLang = 'gbk';
if ($this->moduleLang == 'gb2312') $this->moduleLang = 'gbk';
-
if ($this->sysLang != $this->moduleLang) {
foreach ($minfos as $k => $v) $minfos[$k] = $this->AppCode($v);
}
-
if (isset($minfos['pubkey'])) {
//验证模块信息
$pubKey = @base64url_decode($minfos['pubkey']);
@@ -202,7 +188,6 @@ class DedeModule
return null;
}
}
-
return $minfos;
}
@@ -236,7 +221,6 @@ class DedeModule
fclose($fp);
return $filexml;
}
-
/**
* 获得系统文件的内容
* 指安装、删除、协议文件
@@ -257,7 +241,7 @@ class DedeModule
while (!feof($fp)) {
$line = fgets($fp, 1024);
if (!$start) {
- // 2011-6-7 修复模块打包程序中上传安装程序生成为空白文件(by:华强)
+ //2011-6-7 修复模块打包程序中上传安装程序生成为空白文件
if (preg_match("#<{$ntype}>#i", $line)) $start = TRUE;
} else {
if (preg_match("#<\/{$ntype}#i", $line)) break;
@@ -271,7 +255,6 @@ class DedeModule
$okdata = $this->AppCode($okdata);
return $okdata;
}
-
/**
* 把某系统文件转换为文件
*
@@ -290,7 +273,6 @@ class DedeModule
fclose($fp);
return $filename;
}
-
/**
* 删除系统文件
*
@@ -304,7 +286,6 @@ class DedeModule
$filename = $this->modulesPath.'/'.$hashcode."-{$ntype}.php";
unlink($filename);
}
-
/**
* 检查是否已经存在指定的模块
*
@@ -318,7 +299,6 @@ class DedeModule
if (file_exists($modulefile) && !is_dir($modulefile)) return TRUE;
else return FALSE;
}
-
/**
* 读取文件,返回编码后的文件内容
*
@@ -336,7 +316,6 @@ class DedeModule
if (!empty($str)) return base64_encode($str);
else return '';
}
-
/**
* 获取模块包里的文件名列表
*
@@ -364,7 +343,6 @@ class DedeModule
fclose($fp);
return $filelists;
}
-
/**
* 删除已安装模块附带的文件
*
@@ -409,7 +387,6 @@ class DedeModule
}
return TRUE;
}
-
/**
* 把模块包里的文件写入服务器
*
@@ -482,7 +459,6 @@ class DedeModule
fclose($fp);
return TRUE;
}
-
/**
* 测试某文件的文件夹是否创建
*
@@ -506,7 +482,6 @@ class DedeModule
}
return TRUE;
}
-
/**
* 获取某个目录或文件的打包数据
*
@@ -522,7 +497,6 @@ class DedeModule
$this->MakeEncodeFileRun($basedir, $f, $fp);
return TRUE;
}
-
/**
* 测试目标文件
*
@@ -537,7 +511,6 @@ class DedeModule
$this->MakeEncodeFileRunTest($basedir, $f);
return TRUE;
}
-
/**
* 检测某个目录或文件的打包数据,递归
*
@@ -566,7 +539,6 @@ class DedeModule
}
}
}
-
/**
* 获取个目录或文件的打包数据,递归
*
@@ -600,7 +572,6 @@ class DedeModule
fwrite($fp, $fileList);
}
}
-
/**
* 清理
*
diff --git a/src/include/dedetemplate.class.php b/src/include/dedetemplate.class.php
index 78897472..bb30b366 100755
--- a/src/include/dedetemplate.class.php
+++ b/src/include/dedetemplate.class.php
@@ -529,9 +529,7 @@ class DedeTemplate
fclose($fp);
}
}
- }
- else
- {
+ } else {
if($ctype=='config' && count($this->tpCfgs) > 0 )
{
$fp = fopen($this->configFile,'w') or dir("Write Config File Error! ");
diff --git a/src/include/qrcode/phpqrcode.php b/src/include/qrcode/phpqrcode.php
index 9aa2ac7f..ac7eaf13 100755
--- a/src/include/qrcode/phpqrcode.php
+++ b/src/include/qrcode/phpqrcode.php
@@ -950,7 +950,7 @@
ImagePng($image, $filename);
header("Content-type: image/png");
ImagePng($image);
- }else{
+ } else {
ImagePng($image, $filename);
}
}
diff --git a/src/include/qrcode/qrimage.php b/src/include/qrcode/qrimage.php
index 46586375..f3be896a 100755
--- a/src/include/qrcode/qrimage.php
+++ b/src/include/qrcode/qrimage.php
@@ -21,14 +21,10 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
define('QR_IMAGE', true);
-
class QRimage {
-
public static $black = array(255,255,255);
public static $white = array(0,0,0);
-
//----------------------------------------------------------------------
public static function png($frame, $filename = false, $pixelPerPoint = 4, $outerFrame = 4,$saveandprint=FALSE)
{
@@ -42,14 +38,12 @@
ImagePng($image, $filename);
header("Content-type: image/png");
ImagePng($image);
- }else{
+ } else {
ImagePng($image, $filename);
}
}
-
ImageDestroy($image);
}
-
//----------------------------------------------------------------------
public static function jpg($frame, $filename = false, $pixelPerPoint = 8, $outerFrame = 4, $q = 85)
{
@@ -64,23 +58,17 @@
ImageDestroy($image);
}
-
//----------------------------------------------------------------------
private static function image($frame, $pixelPerPoint = 4, $outerFrame = 4)
{
$h = count($frame);
$w = strlen($frame[0]);
-
$imgW = $w + 2*$outerFrame;
$imgH = $h + 2*$outerFrame;
-
$base_image =ImageCreate($imgW, $imgH);
-
$col[0] = ImageColorAllocate($base_image,QRImage::$black[0],QRImage::$black[1],QRImage::$black[2]);
$col[1] = ImageColorAllocate($base_image,QRImage::$white[0],QRImage::$white[1],QRImage::$white[2]);
-
imagefill($base_image, 0, 0, $col[0]);
-
for($y=0; $y<$h; $y++) {
for($x=0; $x<$w; $x++) {
if ($frame[$y][$x] == '1') {
@@ -88,7 +76,6 @@
}
}
}
-
$target_image =ImageCreate($imgW * $pixelPerPoint, $imgH * $pixelPerPoint);
ImageCopyResized($target_image, $base_image, 0, 0, 0, 0, $imgW * $pixelPerPoint, $imgH * $pixelPerPoint, $imgW, $imgH);
ImageDestroy($base_image);
diff --git a/src/include/splitword.class.php b/src/include/splitword.class.php
index 5bd0b785..05424a3c 100755
--- a/src/include/splitword.class.php
+++ b/src/include/splitword.class.php
@@ -148,9 +148,7 @@ class SplitWord
if( isset($this->mainDicInfos[ $keynum ]) )
{
$data = $this->mainDicInfos[ $keynum ];
- }
- else
- {
+ } else {
//rewind( $this->mainDicHand );
$move_pos = $keynum * 8;
fseek($this->mainDicHand, $move_pos, SEEK_SET);
@@ -201,9 +199,7 @@ class SplitWord
else {
$rs = FALSE;
}
- }
- else
- {
+ } else {
$rs = FALSE;
}
return $rs;
@@ -236,9 +232,7 @@ class SplitWord
if($maindic=='' || !file_exists($maindic) )
{
$dicWords = $this->mainDicFile ;
- }
- else
- {
+ } else {
$dicWords = $maindic;
$this->mainDicFile = $maindic;
}
@@ -246,7 +240,7 @@ class SplitWord
//加载主词典(只打开)
if($this->isUnpacked){
$this->mainDicHand = fopen($dicWords, 'r');
- }else{
+ } else {
$this->InportDict($this->mainDicFileZip);
}
@@ -318,9 +312,7 @@ class SplitWord
{
$this->newWords[$word]++;
$this->mainDicInfos[$word]['c']++;
- }
- else
- {
+ } else {
$this->newWords[$word] = 1;
$this->mainDicInfos[$word] = $infos;
}
diff --git a/src/member/inc/config_pay_tenpay.php b/src/member/inc/config_pay_tenpay.php
index 6c46484c..951a46ab 100755
--- a/src/member/inc/config_pay_tenpay.php
+++ b/src/member/inc/config_pay_tenpay.php
@@ -76,7 +76,7 @@ if($cfg_soft_lang == 'utf-8')
|