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 @@ \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 @@ \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') '; -}else{ +} else { echo '转到财付通支付页面 diff --git a/src/member/reg_new.php b/src/member/reg_new.php index cbcee788..f229679a 100755 --- a/src/member/reg_new.php +++ b/src/member/reg_new.php @@ -7,15 +7,12 @@ * @link https://www.dedebiz.com */ require_once(dirname(__FILE__)."/config.php"); - if ($cfg_mb_allowreg == 'N') { ShowMsg('系统关闭了新用户注册', 'index.php'); exit(); } - if (!isset($dopost)) $dopost = ''; $step = empty($step) ? 1 : intval($step); - if ($step == 1) { if ($cfg_ml->IsLogin()) { ShowMsg('您已经登录系统,无需重新注册', 'index.php'); @@ -30,17 +27,6 @@ if ($step == 1) { exit(); } } - - //$faqkey = isset($faqkey) && is_numeric($faqkey) ? $faqkey : 0; - //if($safe_faq_reg == '1') - //{ - // if($safefaqs[$faqkey]['answer'] != $rsafeanswer || $rsafeanswer=='') - // { - // ShowMsg('验证问题答案错误', '-1'); - // exit(); - // } - //} - $userid = $uname = trim($userid); $pwd = trim($userpwd); $pwdc = trim($userpwdok); @@ -61,17 +47,14 @@ if ($step == 1) { ShowMsg('您两次输入的密码不一致', '-1'); exit(); } - $uname = HtmlReplace($uname, 1); $userid = HtmlReplace($userid, 1); - //检测用户名是否存在 $row = $dsql->GetOne("SELECT mid FROM `#@__member` WHERE userid LIKE '$userid' "); if (is_array($row)) { ShowMsg("您指定的用户名 {$userid} 已存在,请使用别的用户名", "-1"); exit(); } - //会员的默认金币 $dfscores = 0; $dfmoney = 0; @@ -86,16 +69,11 @@ if ($step == 1) { $loginip = GetIP(); $pwd = md5($userpwd); $mtype = '个人'; - $spaceSta = ($cfg_mb_spacesta < 0 ? $cfg_mb_spacesta : 0); - - $inQuery = "INSERT INTO `#@__member` (`mtype` ,`userid` ,`pwd` ,`uname` ,`sex` ,`rank` ,`money` ,`email` ,`scores` , - `matt`, `spacesta` ,`face`,`safequestion`,`safeanswer` ,`jointime` ,`joinip` ,`logintime` ,`loginip` ) - VALUES ('$mtype','$userid','$pwd','$uname','','10','$dfmoney','','$dfscores', - '0','$spaceSta','','','','$jointime','$joinip','$logintime','$loginip'); "; + $inQuery = "INSERT INTO `#@__member` (`mtype` ,`userid` ,`pwd` ,`uname` ,`sex` ,`rank` ,`money` ,`email` ,`scores` ,`matt`, `spacesta` ,`face`,`safequestion`,`safeanswer` ,`jointime` ,`joinip` ,`logintime` ,`loginip` ) + VALUES ('$mtype','$userid','$pwd','$uname','','10','$dfmoney','','$dfscores','0','$spaceSta','','','','$jointime','$joinip','$logintime','$loginip'); "; if ($dsql->ExecuteNoneQuery($inQuery)) { $mid = $dsql->GetLastID(); - //写入默认会员详细资料 if ($mtype == '个人') { $space = 'person'; @@ -104,26 +82,21 @@ if ($step == 1) { } else { $space = 'person'; } - //写入默认统计数据 $membertjquery = "INSERT INTO `#@__member_tj` (`mid`,`article`,`album`,`archives`,`homecount`,`pagecount`,`feedback`,`friend`,`stow`) - VALUES ('$mid','0','0','0','0','0','0','0','0'); "; + VALUES ('$mid','0','0','0','0','0','0','0','0'); "; $dsql->ExecuteNoneQuery($membertjquery); - //写入默认空间配置数据 $spacequery = "INSERT INTO `#@__member_space`(`mid` ,`pagesize` ,`matt` ,`spacename` ,`spacelogo` ,`spacestyle`, `sign` ,`spacenews`) - VALUES('{$mid}','10','0','{$uname}的空间','','$space','',''); "; + VALUES('{$mid}','10','0','{$uname}的空间','','$space','',''); "; $dsql->ExecuteNoneQuery($spacequery); - //写入其它默认数据 $dsql->ExecuteNoneQuery("INSERT INTO `#@__member_flink`(mid,title,url) VALUES('$mid','DedeBIZ','https://www.dedebiz.com'); "); - //---------------------------------------------- //模拟登录 //--------------------------- $cfg_ml = new MemberLogin(7 * 3600); $rs = $cfg_ml->CheckUser($userid, $userpwd); - ShowMsg('您已经登录系统,无需重新注册', 'index.php'); exit; } else { @@ -140,4 +113,4 @@ if ($step == 1) { ShowMsg('您已经登录系统,无需重新注册', 'index.php'); exit; } -} +} \ No newline at end of file diff --git a/src/member/templets/content_list.htm b/src/member/templets/content_list.htm index 1781bbb1..4a853e40 100755 --- a/src/member/templets/content_list.htm +++ b/src/member/templets/content_list.htm @@ -91,9 +91,7 @@ 修改 | 删除 | 改 | 删 | "; } ?> 预览 diff --git a/src/member/templets/resetpassword2.htm b/src/member/templets/resetpassword2.htm index 71ba157f..d0b1b65d 100755 --- a/src/member/templets/resetpassword2.htm +++ b/src/member/templets/resetpassword2.htm @@ -11,11 +11,8 @@ 密码帮手——找回密码第二步 - - -
@@ -29,23 +26,20 @@
-
- + -
-
@@ -55,13 +49,8 @@
-
- - - - \ No newline at end of file diff --git a/src/plus/vdimgck.php b/src/plus/vdimgck.php index b2af42fc..84e11388 100755 --- a/src/plus/vdimgck.php +++ b/src/plus/vdimgck.php @@ -14,25 +14,21 @@ require_once(DEDEDATA.'/config.cache.inc.php'); $config = array( 'font_size' => 20, 'img_height' => $safe_wheight, - 'word_type' => (int)$safe_codetype, //1:数字 2:英文 3:单词 + 'word_type' => (int)$safe_codetype, 'img_width' => $safe_wwidth, 'use_boder' => TRUE, 'font_file' => DEDEINC.'/data/fonts/'.mt_rand(1, 6).'.ttf', 'wordlist_file' => DEDEINC.'/data/words/words.txt', 'filter_type' => 5 ); - $enkey = substr(md5(substr($cfg_cookie_encode, 0, 5)), 0, 10); $sessSavePath = DEDEDATA."/sessions_{$enkey}"; if (!is_dir($sessSavePath)) mkdir($sessSavePath); - //Session保存路径 - if (is_writeable($sessSavePath) && is_readable($sessSavePath)) { session_save_path($sessSavePath); } if (!empty($cfg_domain_cookie)) session_set_cookie_params(0, '/', $cfg_domain_cookie); - if (!echo_validate_image($config)) { //如果不成功则初始化一个默认验证码 @session_start(); @@ -55,15 +51,12 @@ if (!echo_validate_image($config)) { echo $c; } } - function echo_validate_image($config = array()) { @session_start(); - if (!function_exists('imagettftext')) { return false; } - //主要参数 $font_size = isset($config['font_size']) ? $config['font_size'] : 14; $img_height = isset($config['img_height']) ? $config['img_height'] : 38; @@ -71,19 +64,15 @@ function echo_validate_image($config = array()) $font_file = isset($config['font_file']) ? $config['font_file'] : DEDEINC.'/data/font/'.mt_rand(1, 6).'.ttf'; $use_boder = isset($config['use_boder']) ? $config['use_boder'] : TRUE; $filter_type = isset($config['filter_type']) ? $config['filter_type'] : 0; - //创建图片,并设置背景色 $im = @imagecreate($img_width, $img_height); - imagecolorallocate($im, mt_rand(200, 255), mt_rand(200, 255), mt_rand(200, 255)); - //文字随机颜色 $fontColor[] = imagecolorallocate($im, 0x15, 0x15, 0x15); $fontColor[] = imagecolorallocate($im, 0x95, 0x1e, 0x04); $fontColor[] = imagecolorallocate($im, 0x93, 0x14, 0xa9); $fontColor[] = imagecolorallocate($im, 0x12, 0x81, 0x0a); $fontColor[] = imagecolorallocate($im, 0x06, 0x3a, 0xd5); - //获取随机字符 $rndstring = ''; if ($config['word_type'] != 3) { @@ -106,23 +95,8 @@ function echo_validate_image($config = array()) $rndstring .= $chars[mt_rand(0, $max)]; } } - $_SESSION['securimage_code_value'] = strtolower($rndstring); - $rndcodelen = strlen($rndstring); - - ////背景横线 - //$lineColor1 = imagecolorallocate($im, 0xda, 0xd9, 0xd1); - //for ($j = 3; $j <= $img_height - 3; $j = $j + 3) { - // imageline($im, 2, $j, $img_width - 2, $j, $lineColor1); - //} - - ////背景竖线 - //$lineColor2 = imagecolorallocate($im, 0xda, 0xd9, 0xd1); - //for ($j = 2; $j < 100; $j = $j + 6) { - // imageline($im, $j, 0, $j + 8, $img_height, $lineColor2); - //} - //增加一些噪线 for ($i = 0; $i < 5; $i++) { $red = mt_rand(50, 255); @@ -143,14 +117,11 @@ function echo_validate_image($config = array()) imagesetthickness($im, mt_rand(1, 3)); imageline($im, $Xa, $Ya, $Xb, $Yb, $tcol); } - - //画边框 if ($use_boder && $filter_type == 0) { $bordercolor = imagecolorallocate($im, 0x9d, 0x9e, 0x96); imagerectangle($im, 0, 0, $img_width - 1, $img_height - 1, $bordercolor); } - //输出文字 $lastc = ''; for ($i = 0; $i < $rndcodelen; $i++) { @@ -161,7 +132,6 @@ function echo_validate_image($config = array()) @imagettftext($im, $font_size, $c, $y_pos, 28, $c_fontColor, $font_file, $rndstring[$i]); $lastc = $rndstring[$i]; } - //图象效果 switch ($filter_type) { case 1: @@ -176,14 +146,9 @@ function echo_validate_image($config = array()) default: break; } - header("Pragma:no-cache\r\n"); header("Cache-Control:no-cache\r\n"); header("Expires:0\r\n"); - - //输出特定类型的图片格式,优先级为 gif -> jpg ->png - //dump(function_exists("imagejpeg")); - if (function_exists("imagejpeg")) { header("content-type:image/jpeg\r\n"); imagejpeg($im); @@ -193,4 +158,4 @@ function echo_validate_image($config = array()) } imagedestroy($im); exit(); -} +} \ No newline at end of file diff --git a/src/static/enums.js b/src/static/enums.js index c3d89bcc..80828d8d 100755 --- a/src/static/enums.js +++ b/src/static/enums.js @@ -33,30 +33,16 @@ function selNext(oj, v) oj.options.add(aOption); } } - - //子类改变事件 function ChangeSon() { - /* + //由于支持3级联动,所以这里需要对自己改变进行重构 var emname = this.name.replace('_son', ''); - var topSelObj = document.getElementById(emname+'_top'); - if(this.options[this.selectedIndex].value==0) { - document.getElementById('hidden_'+emname).value = topSelObj.options[topSelObj.selectedIndex].value; - } - else { - document.getElementById('hidden_'+emname).value = this.options[this.selectedIndex].value; - } - */ - // 由于支持3级联动,所以这里需要对自己改变进行重构 - var emname = this.name.replace('_son', ''); - // alert(emname); + //alert(emname); if( document.getElementById(emname+'_sec') ) { var oj = document.getElementById(emname + '_sec'); - } - else - { + } else { var oj = document.createElement('select'); oj.name = emname + '_sec'; oj.id = emname + '_sec'; @@ -67,10 +53,9 @@ function ChangeSon() document.getElementById('hidden_'+emname).value = v; var newobj = oj.options; var selarr = eval('em_'+emname+'s'); - var selv = parseInt(v); var maxv = parseInt(v) + 0.5; - // alert(maxv); + //alert(maxv); i = 0; while(newobj && newobj.length > 0) oj.remove(0); clear(oj); @@ -81,9 +66,7 @@ function ChangeSon() aOption.value = '0'; oj.options.add(aOption); return; - } - else - { + } else { aOption = document.createElement('OPTION'); aOption.text = '请选择..'; aOption.value = '0'; @@ -103,20 +86,17 @@ function ChangeSon() if(j > 0) document.getElementById('span_'+emname+'_sec').appendChild(oj); else document.getElementById('span_'+emname+'_sec').innerHTML = ""; } - -// 改变第三级的事件 +//改变第三级的事件 function ChangeSec() { var emname = this.name.replace('_sec', ''); var topSelObj = document.getElementById(emname+'_top'); if(this.options[this.selectedIndex].value==0) { document.getElementById('hidden_'+emname).value = topSelObj.options[topSelObj.selectedIndex].value; - } - else { + } else { document.getElementById('hidden_'+emname).value = this.options[this.selectedIndex].value; } } - //顶级类改变事件 function selNextSon() { @@ -124,9 +104,7 @@ function selNextSon() if( document.getElementById(emname+'_son') ) { var oj = document.getElementById(emname + '_son'); - } - else - { + } else { var oj = document.createElement('select'); oj.name = emname + '_son'; oj.id = emname + '_son'; @@ -148,9 +126,7 @@ function selNextSon() aOption.value = '0'; oj.options.add(aOption); return; - } - else - { + } else { aOption = document.createElement('OPTION'); aOption.text = '请选择..'; aOption.value = '0'; @@ -167,9 +143,7 @@ function selNextSon() } document.getElementById('span_'+emname+'_son').appendChild(oj); } - - -// 根据数组生成多级联动菜单 +//根据数组生成多级联动菜单 function MakeTopSelect(emname, selvalue) { var selectFormHtml = ''; @@ -180,34 +154,30 @@ function MakeTopSelect(emname, selvalue) selObj.className = "form-control"; selObj.onchange = selNextSon; var selarr = eval('em_'+emname+'s'); - // alert(selarr[1002.2]); + //alert(selarr[1002.2]); var topvalue = 0; var sonvalue = 0; var secvalue = 0; - aOption = document.createElement('OPTION'); aOption.text = '请选择..'; aOption.value = 0; selObj.options.add(aOption); - - // alert(selvalue); + //alert(selvalue); if(selvalue % 500 == 0 ) { topvalue = selvalue; } - // 如果是小数,则依次取出顶级数值,二级数值以及三级数值 + //如果是小数,则依次取出顶级数值,二级数值以及三级数值 else if(!!(selvalue % 1)) { secvalue = selvalue; sonvalue = Math.floor(selvalue); topvalue = sonvalue - (sonvalue % 500); - // alert(secvalue); - } - else { + //alert(secvalue); + } else { sonvalue = selvalue; topvalue = selvalue - (selvalue % 500); } - for(i = 500; i <= selarr.length; i += 500) { if(!selarr[i]) continue; @@ -218,8 +188,7 @@ function MakeTopSelect(emname, selvalue) aOption.value = i; selObj.options.add(aOption); aOption.selected = true; - } - else { + } else { aOption = document.createElement('OPTION'); aOption.text = selarr[i]; aOption.value = i; @@ -227,7 +196,6 @@ function MakeTopSelect(emname, selvalue) } } document.getElementById('span_'+emname).appendChild(selObj); - //如果子类存在值,创建子类 //if(sonvalue > 0 || topvalue > 0) { selObj = document.createElement("select"); @@ -239,7 +207,6 @@ function MakeTopSelect(emname, selvalue) aOption.text = '请选择..'; aOption.value = 0; selObj.options.add(aOption); - //当大类有值输出子类 if(topvalue > 0) { @@ -255,8 +222,7 @@ function MakeTopSelect(emname, selvalue) aOption.value = i; selObj.options.add(aOption); aOption.selected = true; - } - else { + } else { aOption = document.createElement('OPTION'); aOption.text = selarr[i]; aOption.value = i; @@ -265,8 +231,7 @@ function MakeTopSelect(emname, selvalue) } } document.getElementById('span_'+emname+'_son').appendChild(selObj); - - // 若存在第三级则创建 + //若存在第三级则创建 if(secvalue > 0) { selObj = document.createElement("select"); @@ -278,10 +243,9 @@ function MakeTopSelect(emname, selvalue) selObj.className = "form-control"; aOption.value = 0; selObj.options.add(aOption); - var selv = sonvalue; var maxv = parseInt(sonvalue) + 0.5; - // alert(maxv); + //alert(maxv); i = 0; for(i = selv + 0.001; i < maxv; i = FloatAdd(i, 0.001)) { @@ -293,8 +257,7 @@ function MakeTopSelect(emname, selvalue) aOption.value = i; selObj.options.add(aOption); aOption.selected = true; - } - else { + } else { aOption = document.createElement('OPTION'); aOption.text = selarr[i]; aOption.value = i; @@ -304,8 +267,7 @@ function MakeTopSelect(emname, selvalue) } document.getElementById('span_'+emname+'_sec').appendChild(selObj); } - -// 两个小数相加进度计算 +//两个小数相加进度计算 function FloatAdd(arg1, arg2) { var r1,r2,m; @@ -314,7 +276,6 @@ function FloatAdd(arg1, arg2) m=Math.pow(10,Math.max(r1,r2)) return (arg1*m+arg2*m)/m } - //清除旧对象 function clear(o) { @@ -322,4 +283,4 @@ function clear(o) for (i = 0; i< l; i++){ o.options[1]=null; } -} +} \ No newline at end of file diff --git a/src/templets/plus/list_diyform.htm b/src/templets/plus/list_diyform.htm index 4aac9b0f..a4bd5f12 100755 --- a/src/templets/plus/list_diyform.htm +++ b/src/templets/plus/list_diyform.htm @@ -11,7 +11,6 @@ -
@@ -61,7 +60,7 @@ echo "
\r\n"; } echo ''; - }else{ + } else { echo ""; } ?> diff --git a/src/templets/plus/showphoto.htm b/src/templets/plus/showphoto.htm index 8a1987ad..9cc5d6e3 100755 --- a/src/templets/plus/showphoto.htm +++ b/src/templets/plus/showphoto.htm @@ -6,7 +6,6 @@ -

diff --git a/src/templets/plus/view_diyform.htm b/src/templets/plus/view_diyform.htm index 6b683d9e..baaa5128 100755 --- a/src/templets/plus/view_diyform.htm +++ b/src/templets/plus/view_diyform.htm @@ -11,7 +11,6 @@ -
{$filelists[$i]}
{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.="
{$fielddata[0]}{$fields[$field]}
暂无记录