diff --git a/src/dede/action_search.php b/src/dede/action_search.php index d84d0513..76840a1f 100755 --- a/src/dede/action_search.php +++ b/src/dede/action_search.php @@ -9,8 +9,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -require_once(dirname(__FILE__) . "/actionsearch_class.php"); +require_once(dirname(__FILE__)."/config.php"); +require_once(dirname(__FILE__)."/actionsearch_class.php"); //增加权限检查 if (empty($dopost)) $dopost = ""; diff --git a/src/dede/actionsearch_class.php b/src/dede/actionsearch_class.php index 67968eb1..f64926cd 100755 --- a/src/dede/actionsearch_class.php +++ b/src/dede/actionsearch_class.php @@ -27,7 +27,7 @@ class ActionSearch function GetSearchstr() { - require_once(dirname(__FILE__) . "/inc/inc_action_info.php"); + require_once(dirname(__FILE__)."/inc/inc_action_info.php"); return is_array($actionSearch) ? $actionSearch : array(); } @@ -80,11 +80,11 @@ class ActionSearch foreach ($text as $key => $value) { if ($key == 'title' || $key == 'description') { //仅对title,description进行数组替换 - $text[$key] = str_replace($this->keyword, '' . $this->keyword . '', $text[$key]); + $text[$key] = str_replace($this->keyword, ''.$this->keyword.'', $text[$key]); } } } else { - $text = str_replace($this->keyword, '' . $this->keyword . '', $text); + $text = str_replace($this->keyword, ''.$this->keyword.'', $text); } return $text; } diff --git a/src/dede/ad_add.php b/src/dede/ad_add.php index a57812a9..9299e614 100755 --- a/src/dede/ad_add.php +++ b/src/dede/ad_add.php @@ -10,9 +10,9 @@ * @link https://www.dedebiz.com */ -require(dirname(__FILE__) . "/config.php"); +require(dirname(__FILE__)."/config.php"); CheckPurview('plus_广告管理'); -require_once DEDEINC . "/typelink.class.php"; +require_once DEDEINC."/typelink.class.php"; if (empty($dopost)) $dopost = ""; if ($dopost == "save") { diff --git a/src/dede/ad_edit.php b/src/dede/ad_edit.php index 6c7a44ec..0dc4a265 100755 --- a/src/dede/ad_edit.php +++ b/src/dede/ad_edit.php @@ -9,9 +9,9 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require(dirname(__FILE__) . "/config.php"); +require(dirname(__FILE__)."/config.php"); CheckPurview('plus_广告管理'); -require_once(DEDEINC . '/typelink.class.php'); +require_once(DEDEINC.'/typelink.class.php'); if (empty($dopost)) $dopost = ''; $aid = preg_replace("#[^0-9]#", '', $aid); $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? "ad_main.php" : $_COOKIE['ENV_GOBACK_URL']; @@ -21,13 +21,13 @@ if ($dopost == 'delete') { ShowMsg("成功删除一则广告代码!", $ENV_GOBACK_URL); exit(); } else if ($dopost == "gettag") { - require_once(DEDEINC . '/oxwindow.class.php'); + require_once(DEDEINC.'/oxwindow.class.php'); $jscode = ""; $showhtml = "\r\n\r\n$jscode\r\n\r\n"; $showhtml .= "预览:"; $row = $dsql->GetOne("SELECT tagname from `#@__myad` WHERE aid='$aid' "); - $showtag = '{' . "dede:myad name='{$row['tagname']}'/" . '}'; + $showtag = '{'."dede:myad name='{$row['tagname']}'/".'}'; $info = "说明:如果嵌入的是织梦CMS广告标签,那么将会解析成标签中的内容到页面,广告更改后需要重新生成。
如果不希望重新生成所有页面,则直接调用JS代码即可。 "; diff --git a/src/dede/ad_main.php b/src/dede/ad_main.php index 4b75f915..94985e09 100755 --- a/src/dede/ad_main.php +++ b/src/dede/ad_main.php @@ -9,9 +9,9 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/config.php'); -require_once(DEDEINC . '/datalistcp.class.php'); -require_once(DEDEINC . '/common.func.php'); +require_once(dirname(__FILE__).'/config.php'); +require_once(DEDEINC.'/datalistcp.class.php'); +require_once(DEDEINC.'/common.func.php'); setcookie('ENV_GOBACK_URL', $dedeNowurl, time() + 3600, '/'); $clsid = isset($clsid) ? intval($clsid) : 0; @@ -37,7 +37,7 @@ LEFT JOIN `#@__myadtype` ap on ap.id=ad.clsid WHERE $where_sql ORDER BY ad.aid desc"; $dlist = new DataListCP(); -$dlist->SetTemplet(DEDEADMIN . "/templets/ad_main.htm"); +$dlist->SetTemplet(DEDEADMIN."/templets/ad_main.htm"); $dlist->SetSource($sql); $dlist->display(); diff --git a/src/dede/adtype_main.php b/src/dede/adtype_main.php index 6e71b680..947d46f6 100755 --- a/src/dede/adtype_main.php +++ b/src/dede/adtype_main.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); if (empty($dopost)) $dopost = ''; //保存更改 @@ -18,9 +18,9 @@ if ($dopost == "save") { $endID = $idend; for (; $startID <= $endID; $startID++) { $query = ''; - $tid = ${'ID_' . $startID}; - $pname = ${'pname_' . $startID}; - if (isset(${'check_' . $startID})) { + $tid = ${'ID_'.$startID}; + $pname = ${'pname_'.$startID}; + if (isset(${'check_'.$startID})) { if ($pname != '') { $query = "UPDATE `#@__myadtypee` SET typename='$pname' WHERE id='$tid' "; $dsql->ExecuteNoneQuery($query); diff --git a/src/dede/album_add.php b/src/dede/album_add.php index 0b82ab1c..1d38fc8d 100755 --- a/src/dede/album_add.php +++ b/src/dede/album_add.php @@ -9,16 +9,16 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('a_New,a_AccNew'); -require_once(DEDEINC . "/customfields.func.php"); -require_once(DEDEADMIN . "/inc/inc_archives_functions.php"); +require_once(DEDEINC."/customfields.func.php"); +require_once(DEDEADMIN."/inc/inc_archives_functions.php"); if (empty($dopost)) $dopost = ''; if ($dopost != 'save') { - require_once(DEDEINC . "/dedetag.class.php"); - require_once(DEDEADMIN . "/inc/inc_catalog_options.php"); + require_once(DEDEINC."/dedetag.class.php"); + require_once(DEDEADMIN."/inc/inc_catalog_options.php"); ClearMyAddon(); $channelid = empty($channelid) ? 0 : intval($channelid); $cid = empty($cid) ? 0 : intval($cid); @@ -43,8 +43,8 @@ if ($dopost != 'save') { /*-------------------------------- function __save(){ } -------------------------------*/ else if ($dopost == 'save') { - require_once(DEDEINC . '/image.func.php'); - require_once(DEDEINC . '/oxwindow.class.php'); + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/oxwindow.class.php'); $flag = isset($flags) ? join(',', $flags) : ''; $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; @@ -110,15 +110,15 @@ function __save(){ } if ($litpic_b64 != "") { $data = explode(',', $litpic_b64); $ntime = time(); - $savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); CreateDir($savepath); - $fullUrl = $savepath . '/' . dd2char(MyDate('mdHis', $ntime) . $cuserLogin->getUserID() . mt_rand(1000, 9999)); - $fullUrl = $fullUrl . ".png"; + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir . $fullUrl, base64_decode($data[1])); + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); // 加水印 - WaterImg($cfg_basedir . $fullUrl, 'up'); + WaterImg($cfg_basedir.$fullUrl, 'up'); $litpic = $fullUrl; } @@ -149,10 +149,10 @@ function __save(){ } 处理从ZIP中解压的图片 ---------------------*/ if ($formzip == 1) { - include_once(DEDEINC . "/zip.class.php"); - include_once(DEDEADMIN . "/file_class.php"); - $zipfile = $cfg_basedir . str_replace($cfg_mainsite, '', $zipfile); - $tmpzipdir = DEDEDATA . '/ziptmp/' . cn_substr(md5(ExecTime()), 16); + include_once(DEDEINC."/zip.class.php"); + include_once(DEDEADMIN."/file_class.php"); + $zipfile = $cfg_basedir.str_replace($cfg_mainsite, '', $zipfile); + $tmpzipdir = DEDEDATA.'/ziptmp/'.cn_substr(md5(ExecTime()), 16); $ntime = time(); if (file_exists($zipfile)) { @mkdir($tmpzipdir, $GLOBALS['cfg_dir_purview']); @@ -165,11 +165,11 @@ function __save(){ } $i = 0; foreach ($imgs as $imgold) { $i++; - $savepath = $cfg_image_dir . "/" . MyDate("Y-m", $ntime); + $savepath = $cfg_image_dir."/".MyDate("Y-m", $ntime); CreateDir($savepath); - $iurl = $savepath . "/" . MyDate("d", $ntime) . dd2char(MyDate("His", $ntime) . '-' . $adminid . "-{$i}" . mt_rand(1000, 9999)); - $iurl = $iurl . substr($imgold, -4, 4); - $imgfile = $cfg_basedir . $iurl; + $iurl = $savepath."/".MyDate("d", $ntime).dd2char(MyDate("His", $ntime).'-'.$adminid."-{$i}".mt_rand(1000, 9999)); + $iurl = $iurl.substr($imgold, -4, 4); + $imgfile = $cfg_basedir.$iurl; copy($imgold, $imgfile); unlink($imgold); @@ -183,12 +183,12 @@ function __save(){ } } $info = ''; $imginfos = GetImageSize($imgfile, $info); - $imgurls .= "{dede:img ddimg='$litpicname' text='' width='" . $imginfos[0] . "' height='" . $imginfos[1] . "'} $iurl {/dede:img}\r\n"; + $imgurls .= "{dede:img ddimg='$litpicname' text='' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; //把图片信息保存到媒体文档管理档案中 $inquery = " INSERT INTO #@__uploads(title,url,mediatype,width,height,playtime,filesize,uptime,mid) - VALUES ('{$title}','{$iurl}','1','" . $imginfos[0] . "','" . $imginfos[1] . "','0','" . filesize($imgfile) . "','" . $ntime . "','$adminid'); + VALUES ('{$title}','{$iurl}','1','".$imginfos[0]."','".$imginfos[1]."','0','".filesize($imgfile)."','".$ntime."','$adminid'); "; $dsql->ExecuteNoneQuery($inquery); $fid = $dsql->GetLastID(); @@ -218,17 +218,17 @@ function __save(){ } $album = $albumsArr[$i]; $data = explode(',', $album['img']); $ntime = time(); - $savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); CreateDir($savepath); - $fullUrl = $savepath . '/' . dd2char(MyDate('mdHis', $ntime) . $cuserLogin->getUserID() . mt_rand(1000, 9999)); - $fullUrl = $fullUrl . ".png"; + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir . $fullUrl, base64_decode($data[1])); + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); $info = ''; - $imginfos = GetImageSize($cfg_basedir . $fullUrl, $info); + $imginfos = GetImageSize($cfg_basedir.$fullUrl, $info); $v = $fullUrl; $imginfo = !empty($album['txt']) ? $album['txt'] : ''; - $imgurls .= "{dede:img ddimg='$v' text='$imginfo' width='" . $imginfos[0] . "' height='" . $imginfos[1] . "'} $v {/dede:img}\r\n"; + $imgurls .= "{dede:img ddimg='$v' text='$imginfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $v {/dede:img}\r\n"; if ($ddisfirst == 1 && $litpic == '' && !empty($fullUrl)) { $litpic = $fullUrl; } @@ -264,18 +264,18 @@ function __save(){ } } ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); } - $inadd_f .= ',' . $vs[0]; - $inadd_v .= " ,'" . ${$vs[0]} . "' "; + $inadd_f .= ','.$vs[0]; + $inadd_v .= " ,'".${$vs[0]}."' "; } } } //处理图片文档的自定义属性 if ($litpic != '' && !preg_match("#p#", $flag)) { - $flag = ($flag == '' ? 'p' : $flag . ',p'); + $flag = ($flag == '' ? 'p' : $flag.',p'); } if ($redirecturl != '' && !preg_match("#j#", $flag)) { - $flag = ($flag == '' ? 'j' : $flag . ',j'); + $flag = ($flag == '' ? 'j' : $flag.',j'); } //跳转网址的文档强制为动态 @@ -288,7 +288,7 @@ function __save(){ } if (!$dsql->ExecuteNoneQuery($query)) { $gerr = $dsql->GetError(); $dsql->ExecuteNoneQuery(" DELETE FROM `#@__arctiny` WHERE id='$arcID' "); - ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCMS官方。" . str_replace('"', '', $gerr), "javascript:;"); + ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCMS官方。".str_replace('"', '', $gerr), "javascript:;"); exit(); } @@ -308,7 +308,7 @@ function __save(){ } $gerr = $dsql->GetError(); $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCMS官方。" . str_replace('"', '', $gerr), "javascript:;"); + ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCMS官方。".str_replace('"', '', $gerr), "javascript:;"); exit(); } @@ -316,7 +316,7 @@ function __save(){ } InsertTags($tags, $arcID); $artUrl = MakeArt($arcID, TRUE, TRUE, $isremote); if ($artUrl == '') { - $artUrl = $cfg_phpurl . "/view.php?aid=$arcID"; + $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; } ClearMyAddon($arcID, $title); @@ -337,7 +337,7 @@ function __save(){ }   请选择你的后续操作: 继续发布图片    - 更改图集 + 更改图集    预览文档    @@ -345,7 +345,7 @@ function __save(){ }    $backurl "; - $msg = "
{$msg}
" . GetUpdateTest(); + $msg = "
{$msg}
".GetUpdateTest(); $wintitle = "成功发布一个图集!"; $wecome_info = "文章管理::发布图集"; diff --git a/src/dede/album_edit.php b/src/dede/album_edit.php index 9950b51e..c3ae9009 100755 --- a/src/dede/album_edit.php +++ b/src/dede/album_edit.php @@ -9,16 +9,16 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('a_Edit,a_AccEdit,a_MyEdit'); -require_once(DEDEINC . "/customfields.func.php"); -require_once(DEDEADMIN . "/inc/inc_archives_functions.php"); +require_once(DEDEINC."/customfields.func.php"); +require_once(DEDEADMIN."/inc/inc_archives_functions.php"); if (empty($dopost)) $dopost = ''; if ($dopost != 'save') { - require_once(DEDEADMIN . "/inc/inc_catalog_options.php"); - require_once(DEDEINC . "/dedetag.class.php"); + require_once(DEDEADMIN."/inc/inc_catalog_options.php"); + require_once(DEDEINC."/dedetag.class.php"); ClearMyAddon(); $aid = intval($aid); @@ -32,7 +32,7 @@ if ($dopost != 'save') { ShowMsg("读取档案基本信息出错!", "-1"); exit(); } - $query = "SELECT * FROM `#@__channeltype` WHERE id='" . $arcRow['channel'] . "'"; + $query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; $cInfos = $dsql->GetOne($query); if (!is_array($cInfos)) { ShowMsg("读取频道配置信息出错!", "javascript:;"); @@ -59,8 +59,8 @@ if ($dopost != 'save') { /*-------------------------------- function __save(){ } -------------------------------*/ else if ($dopost == 'save') { - require_once(DEDEINC . '/image.func.php'); - require_once(DEDEINC . '/oxwindow.class.php'); + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/oxwindow.class.php'); $flag = isset($flags) ? join(',', $flags) : ''; $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; @@ -123,15 +123,15 @@ function __save(){ } if ($litpic_b64 != "") { $data = explode(',', $litpic_b64); $ntime = time(); - $savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); CreateDir($savepath); - $fullUrl = $savepath . '/' . dd2char(MyDate('mdHis', $ntime) . $cuserLogin->getUserID() . mt_rand(1000, 9999)); - $fullUrl = $fullUrl . ".png"; + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir . $fullUrl, base64_decode($data[1])); + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); // 加水印 - WaterImg($cfg_basedir . $fullUrl, 'up'); + WaterImg($cfg_basedir.$fullUrl, 'up'); $litpic = $fullUrl; } @@ -140,10 +140,10 @@ function __save(){ } //处理图片文档的自定义属性 if ($litpic != '' && !preg_match("#p#", $flag)) { - $flag = ($flag == '' ? 'p' : $flag . ',p'); + $flag = ($flag == '' ? 'p' : $flag.',p'); } if ($redirecturl != '' && !preg_match("#j#", $flag)) { - $flag = ($flag == '' ? 'j' : $flag . ',j'); + $flag = ($flag == '' ? 'j' : $flag.',j'); } //跳转网址的文档强制为动态 @@ -175,7 +175,7 @@ function __save(){ } WHERE id='$id'; "; if (!$dsql->ExecuteNoneQuery($query)) { - ShowMsg("更新数据库archives表时出错,请检查!" . $dsql->GetError(), "javascript:;"); + ShowMsg("更新数据库archives表时出错,请检查!".$dsql->GetError(), "javascript:;"); exit(); } @@ -186,46 +186,46 @@ function __save(){ } //检查旧的图片是否有更新,并保存 //----------------------------------------- for ($i = 1; $i <= 120; $i++) { - if (!isset(${'imgurl' . $i})) continue; + if (!isset(${'imgurl'.$i})) continue; $info = ''; - $iinfo = str_replace("'", "`", stripslashes(${'imgmsg' . $i})); - $iurl = stripslashes(${'imgurl' . $i}); - $ddurl = stripslashes(${'imgddurl' . $i}); + $iinfo = str_replace("'", "`", stripslashes(${'imgmsg'.$i})); + $iurl = stripslashes(${'imgurl'.$i}); + $ddurl = stripslashes(${'imgddurl'.$i}); if (preg_match("#swfupload#i", $ddurl)) $ddurl = ''; - $imgfile = $cfg_basedir . $iurl; - $litimgfile = $cfg_basedir . $ddurl; + $imgfile = $cfg_basedir.$iurl; + $litimgfile = $cfg_basedir.$ddurl; //有上传文件的情况 - if (isset(${'imgfile' . $i}) && is_uploaded_file(${'imgfile' . $i})) { - $tmpFile = ${'imgfile' . $i}; + if (isset(${'imgfile'.$i}) && is_uploaded_file(${'imgfile'.$i})) { + $tmpFile = ${'imgfile'.$i}; //检测上传的图片, 如果类型不对,保留原来图片 $imginfos = @GetImageSize($tmpFile, $info); if (!is_array($imginfos)) { $imginfos = @GetImageSize($imgfile, $info); - $imgurls .= "{dede:img ddimg='$ddurl' text='$iinfo' width='" . $imginfos[0] . "' height='" . $imginfos[1] . "'} $iurl {/dede:img}\r\n"; + $imgurls .= "{dede:img ddimg='$ddurl' text='$iinfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; continue; } move_uploaded_file($tmpFile, $imgfile); $imginfos = @GetImageSize($imgfile, $info); if ($ddurl == $iurl) { $litpicname = $pagestyle > 2 ? GetImageMapDD($iurl, $cfg_ddimg_width) : $iurl; - $litimgfile = $cfg_basedir . $litpicname; + $litimgfile = $cfg_basedir.$litpicname; } else { if ($cfg_ddimg_full == 'Y') ImageResizeNew($imgfile, $cfg_ddimg_width, $cfg_ddimg_height, $litimgfile); else ImageResize($imgfile, $cfg_ddimg_width, $cfg_ddimg_height, $litimgfile); $litpicname = $ddurl; } - $imgurls .= "{dede:img ddimg='$litpicname' text='$iinfo' width='" . $imginfos[0] . "' height='" . $imginfos[1] . "'} $iurl {/dede:img}\r\n"; + $imgurls .= "{dede:img ddimg='$litpicname' text='$iinfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; } //没上传图片(只修改msg信息) else { - $iinfo = str_replace("'", "`", stripslashes(${'imgmsg' . $i})); - $iurl = stripslashes(${'imgurl' . $i}); - $ddurl = stripslashes(${'imgddurl' . $i}); + $iinfo = str_replace("'", "`", stripslashes(${'imgmsg'.$i})); + $iurl = stripslashes(${'imgurl'.$i}); + $ddurl = stripslashes(${'imgddurl'.$i}); if (preg_match("#swfupload#i", $ddurl)) { $ddurl = $pagestyle > 2 ? GetImageMapDD($iurl, $cfg_ddimg_width) : $iurl; } $imginfos = @GetImageSize($imgfile, $info); - $imgurls .= "{dede:img ddimg='$ddurl' text='$iinfo' width='" . $imginfos[0] . "' height='" . $imginfos[1] . "'} $iurl {/dede:img}\r\n"; + $imgurls .= "{dede:img ddimg='$ddurl' text='$iinfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; } } @@ -245,10 +245,10 @@ function __save(){ } 从ZIP文件中获取新图片 ---------------------*/ if ($formzip == 1) { - include_once(DEDEINC . "/zip.class.php"); - include_once(DEDEADMIN . "/file_class.php"); - $zipfile = $cfg_basedir . str_replace($cfg_mainsite, '', $zipfile); - $tmpzipdir = DEDEDATA . '/ziptmp/' . cn_substr(md5(ExecTime()), 16); + include_once(DEDEINC."/zip.class.php"); + include_once(DEDEADMIN."/file_class.php"); + $zipfile = $cfg_basedir.str_replace($cfg_mainsite, '', $zipfile); + $tmpzipdir = DEDEDATA.'/ziptmp/'.cn_substr(md5(ExecTime()), 16); $ntime = time(); if (file_exists($zipfile)) { @@ -262,30 +262,30 @@ function __save(){ } $i = 0; foreach ($imgs as $imgold) { $i++; - $savepath = $cfg_image_dir . "/" . MyDate("Y-m", $ntime); + $savepath = $cfg_image_dir."/".MyDate("Y-m", $ntime); CreateDir($savepath); - $iurl = $savepath . "/" . MyDate("d", $ntime) . dd2char(MyDate("His", $ntime) . '-' . $adminid . "-{$i}" . mt_rand(1000, 9999)); - $iurl = $iurl . substr($imgold, -4, 4); - $imgfile = $cfg_basedir . $iurl; + $iurl = $savepath."/".MyDate("d", $ntime).dd2char(MyDate("His", $ntime).'-'.$adminid."-{$i}".mt_rand(1000, 9999)); + $iurl = $iurl.substr($imgold, -4, 4); + $imgfile = $cfg_basedir.$iurl; copy($imgold, $imgfile); unlink($imgold); if (is_file($imgfile)) { $litpicname = $pagestyle > 2 ? GetImageMapDD($iurl, $cfg_ddimg_width) : $iurl; $info = ''; $imginfos = GetImageSize($imgfile, $info); - $imgurls .= "{dede:img ddimg='$litpicname' text='' width='" . $imginfos[0] . "' height='" . $imginfos[1] . "'} $iurl {/dede:img}\r\n"; + $imgurls .= "{dede:img ddimg='$litpicname' text='' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; //把图片信息保存到媒体文档管理档案中 $inquery = " INSERT INTO #@__uploads(title,url,mediatype,width,height,playtime,filesize,uptime,mid) - VALUES ('{$title}','{$iurl}','1','" . $imginfos[0] . "','" . $imginfos[1] . "','0','" . filesize($imgfile) . "','" . $ntime . "','$adminid'); + VALUES ('{$title}','{$iurl}','1','".$imginfos[0]."','".$imginfos[1]."','0','".filesize($imgfile)."','".$ntime."','$adminid'); "; $dsql->ExecuteNoneQuery($inquery); if ( !$hasone && $ddisfirst == 1 && $litpic == "" && !empty($litpicname) ) { - if (file_exists($cfg_basedir . $litpicname)) { + if (file_exists($cfg_basedir.$litpicname)) { $litpic = $litpicname; $hasone = true; } @@ -308,17 +308,17 @@ function __save(){ } $album = $albumsArr[$i]; $data = explode(',', $album['img']); $ntime = time(); - $savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); CreateDir($savepath); - $fullUrl = $savepath . '/' . dd2char(MyDate('mdHis', $ntime) . $cuserLogin->getUserID() . mt_rand(1000, 9999)); - $fullUrl = $fullUrl . ".png"; + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir . $fullUrl, base64_decode($data[1])); + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); $info = ''; - $imginfos = GetImageSize($cfg_basedir . $fullUrl, $info); + $imginfos = GetImageSize($cfg_basedir.$fullUrl, $info); $v = $fullUrl; $imginfo = !empty($album['txt']) ? $album['txt'] : ''; - $imgurls .= "{dede:img ddimg='$v' text='$imginfo' width='" . $imginfos[0] . "' height='" . $imginfos[1] . "'} $v {/dede:img}\r\n"; + $imgurls .= "{dede:img ddimg='$v' text='$imginfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $v {/dede:img}\r\n"; } } @@ -346,7 +346,7 @@ function __save(){ } } ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $id); } - $inadd_f .= ",`{$vs[0]}` = '" . ${$vs[0]} . "'"; + $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; } } } @@ -371,7 +371,7 @@ function __save(){ } userip = '$useip' WHERE aid='$id'; "; if (!$dsql->ExecuteNoneQuery($query)) { - ShowMsg("更新附加表 `$addtable` 时出错,请检查原因!" . $dsql->GetError(), "javascript:;"); + ShowMsg("更新附加表 `$addtable` 时出错,请检查原因!".$dsql->GetError(), "javascript:;"); exit(); } } @@ -380,7 +380,7 @@ function __save(){ } UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); $arcUrl = MakeArt($id, true, true, $isremote); if ($arcUrl == '') { - $arcUrl = $cfg_phpurl . "/view.php?aid=$id"; + $arcUrl = $cfg_phpurl."/view.php?aid=$id"; } ClearMyAddon($id, $title); @@ -401,7 +401,7 @@ function __save(){ } "   请选择你的后续操作: 继续发布图片    - 查看更改 + 查看更改    预览文档    diff --git a/src/dede/album_testhtml.php b/src/dede/album_testhtml.php index 61d6d282..a961ac5d 100755 --- a/src/dede/album_testhtml.php +++ b/src/dede/album_testhtml.php @@ -10,7 +10,7 @@ * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); AjaxHead(); $myhtml = UnicodeUrl2Gbk(stripslashes($myhtml)); echo "
[关闭]
\r\n"; diff --git a/src/dede/archives_add.php b/src/dede/archives_add.php index 70d2cd7b..3315c085 100755 --- a/src/dede/archives_add.php +++ b/src/dede/archives_add.php @@ -9,16 +9,16 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/config.php'); +require_once(dirname(__FILE__).'/config.php'); CheckPurview('a_New,a_AccNew'); -require_once(DEDEINC . '/customfields.func.php'); -require_once(DEDEADMIN . '/inc/inc_archives_functions.php'); +require_once(DEDEINC.'/customfields.func.php'); +require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); if (empty($dopost)) $dopost = ''; if ($dopost != 'save') { - require_once(DEDEINC . '/dedetag.class.php'); - require_once(DEDEADMIN . '/inc/inc_catalog_options.php'); + require_once(DEDEINC.'/dedetag.class.php'); + require_once(DEDEADMIN.'/inc/inc_catalog_options.php'); ClearMyAddon(); $channelid = empty($channelid) ? 0 : intval($channelid); $cid = empty($cid) ? 0 : intval($cid); @@ -45,8 +45,8 @@ if ($dopost != 'save') { /*-------------------------------- function __save(){ } -------------------------------*/ else if ($dopost == 'save') { - require_once(DEDEINC . '/image.func.php'); - require_once(DEDEINC . '/oxwindow.class.php'); + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/oxwindow.class.php'); $flag = isset($flags) ? join(',', $flags) : ''; $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; @@ -110,15 +110,15 @@ function __save(){ } if ($litpic_b64 != "") { $data = explode(',', $litpic_b64); $ntime = time(); - $savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); CreateDir($savepath); - $fullUrl = $savepath . '/' . dd2char(MyDate('mdHis', $ntime) . $cuserLogin->getUserID() . mt_rand(1000, 9999)); - $fullUrl = $fullUrl . ".png"; + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir . $fullUrl, base64_decode($data[1])); + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); // 加水印 - WaterImg($cfg_basedir . $fullUrl, 'up'); + WaterImg($cfg_basedir.$fullUrl, 'up'); $litpic = $fullUrl; } @@ -144,18 +144,18 @@ function __save(){ } if (!isset(${$vs[0]})) ${$vs[0]} = ''; ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); } - $inadd_f .= ',' . $vs[0]; - $inadd_v .= " ,'" . ${$vs[0]} . "' "; + $inadd_f .= ','.$vs[0]; + $inadd_v .= " ,'".${$vs[0]}."' "; } } } //处理图片文档的自定义属性 if ($litpic != '' && !preg_match("#p#", $flag)) { - $flag = ($flag == '' ? 'p' : $flag . ',p'); + $flag = ($flag == '' ? 'p' : $flag.',p'); } if ($redirecturl != '' && !preg_match("#j#", $flag)) { - $flag = ($flag == '' ? 'j' : $flag . ',j'); + $flag = ($flag == '' ? 'j' : $flag.',j'); } //跳转网址的文档强制为动态 @@ -169,7 +169,7 @@ color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywo if (!$dsql->ExecuteNoneQuery($query)) { $gerr = $dsql->GetError(); $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCMS官方。" . str_replace('"', '', $gerr), "javascript:;"); + ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCMS官方。".str_replace('"', '', $gerr), "javascript:;"); exit(); } @@ -183,7 +183,7 @@ color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywo $gerr = $dsql->GetError(); $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCMS官方。" . str_replace('"', '', $gerr), "javascript:;"); + ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCMS官方。".str_replace('"', '', $gerr), "javascript:;"); exit(); } } @@ -192,7 +192,7 @@ color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywo InsertTags($tags, $arcID); $artUrl = MakeArt($arcID, true, true, $isremote); if ($artUrl == '') { - $artUrl = $cfg_phpurl . "/view.php?aid=$arcID"; + $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; } ClearMyAddon($arcID, $title); @@ -214,13 +214,13 @@ color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywo    查看文档    - 更改文档 + 更改文档    已发布文档管理    $backurl "; - $msg = "
{$msg}
" . GetUpdateTest(); + $msg = "
{$msg}
".GetUpdateTest(); $wintitle = '成功发布文档!'; $wecome_info = '文档管理::发布文档'; diff --git a/src/dede/archives_do.php b/src/dede/archives_do.php index 547b9230..ca8b26c4 100755 --- a/src/dede/archives_do.php +++ b/src/dede/archives_do.php @@ -8,11 +8,11 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/config.php'); -require_once(DEDEADMIN . '/inc/inc_batchup.php'); -require_once(DEDEADMIN . '/inc/inc_archives_functions.php'); -require_once(DEDEINC . '/typelink.class.php'); -require_once(DEDEINC . '/arc.archives.class.php'); +require_once(dirname(__FILE__).'/config.php'); +require_once(DEDEADMIN.'/inc/inc_batchup.php'); +require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); +require_once(DEDEINC.'/typelink.class.php'); +require_once(DEDEINC.'/arc.archives.class.php'); $ENV_GOBACK_URL = (empty($_COOKIE['ENV_GOBACK_URL']) ? 'content_list.php' : $_COOKIE['ENV_GOBACK_URL']); if (empty($dopost)) { ShowMsg('对不起,你没指定运行参数', '-1'); @@ -106,11 +106,11 @@ else if ($dopost == "viewArchives") { if (preg_match("#^http:#", $arcfile)) { $arcfile = preg_replace("#^http:\/\/([^\/]*)\/#i", '/', $arcfile); } - $truefile = GetTruePath() . $arcfile; + $truefile = GetTruePath().$arcfile; if (!file_exists($truefile)) { MakeArt($aid, TRUE); } - echo ""; + echo ""; exit(); } /*-------------------------- @@ -180,12 +180,12 @@ else if ($dopost == "commendArchives") { if ($row['issystem'] != -1) { $maintable = (trim($row['maintable']) == '' ? '#@__archives' : trim($row['maintable'])); $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE id='$aid' "); - $flag = ($arr['flag'] == '' ? 'c' : $arr['flag'] . ',c'); + $flag = ($arr['flag'] == '' ? 'c' : $arr['flag'].',c'); $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE id='{$aid}' "); } else { $maintable = trim($row['addtable']); $arr = $dsql->GetOne("SELECT flag From `{$maintable}` where aid='$aid' "); - $flag = ($arr['flag'] == '' ? 'c' : $arr['flag'] . ',c'); + $flag = ($arr['flag'] == '' ? 'c' : $arr['flag'].',c'); $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE aid='{$aid}' "); } } @@ -203,7 +203,7 @@ else if ($dopost == "makeArchives") { ShowMsg('参数无效', $ENV_GOBACK_URL); exit(); } - require_once(DEDEADMIN . '/inc/inc_archives_functions.php'); + require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); $qstrs = explode('`', $qstr); $i = 0; foreach ($qstrs as $aid) { @@ -219,7 +219,7 @@ function checkArchives() { } ---------------------------*/ else if ($dopost == "checkArchives") { CheckPurview('a_Check,a_AccCheck,sys_ArcBatch'); - require_once(DEDEADMIN . "/inc/inc_archives_functions.php"); + require_once(DEDEADMIN."/inc/inc_archives_functions.php"); if (!empty($aid) && empty($qstr)) $qstr = $aid; if ($qstr == '') { ShowMsg("参数无效", $ENV_GOBACK_URL); @@ -237,9 +237,9 @@ else if ($dopost == "checkArchives") { $maintable = (trim($row['maintable']) == '' ? '#@__archives' : trim($row['maintable'])); $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET arcrank='0' WHERE id='$aid' "); if ($row['issystem'] == -1) { - $dsql->ExecuteNoneQuery("UPDATE `" . trim($row['addtable']) . "` SET arcrank='0' WHERE aid='$aid' "); + $dsql->ExecuteNoneQuery("UPDATE `".trim($row['addtable'])."` SET arcrank='0' WHERE aid='$aid' "); } else { - $dsql->ExecuteNoneQuery("UPDATE `$maintable` SET arcrank='0', dutyadmin='" . $cuserLogin->getUserID() . "' WHERE id='$aid' "); + $dsql->ExecuteNoneQuery("UPDATE `$maintable` SET arcrank='0', dutyadmin='".$cuserLogin->getUserID()."' WHERE id='$aid' "); } $dsql->ExecuteNoneQuery("UPDATE `#@__taglist` SET arcrank='0' WHERE aid='$aid' "); $pageurl = MakeArt($aid, false); @@ -253,7 +253,7 @@ function delArchives(){ } ---------------------------*/ else if ($dopost == "delArchives") { CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); - require_once(DEDEINC . "/oxwindow.class.php"); + require_once(DEDEINC."/oxwindow.class.php"); if (empty($fmdo)) $fmdo = ''; if ($fmdo == 'yes') { @@ -277,7 +277,7 @@ else if ($dopost == "delArchives") { exit(); } else { $wintitle = "文档管理-删除文档"; - $wecome_info = "文档管理::删除文档"; + $wecome_info = "文档管理::删除文档"; $win = new OxWindow(); $win->Init("archives_do.php", "js/blank.js", "POST"); $win->AddHidden("fmdo", "yes"); @@ -295,7 +295,7 @@ function moveArchives(){ } else if ($dopost == 'moveArchives') { CheckPurview('sys_ArcBatch'); if (empty($totype)) { - require_once(DEDEINC . '/typelink.class.php'); + require_once(DEDEINC.'/typelink.class.php'); if (!empty($aid) && empty($qstr)) $qstr = $aid; AjaxHead(); $channelid = empty($channelid) ? 0 : $channelid; @@ -391,7 +391,7 @@ function RbReturnArchives(){ } ------------------------------*/ else if ($dopost == 'return') { CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); - require_once(DEDEINC . "/oxwindow.class.php"); + require_once(DEDEINC."/oxwindow.class.php"); if (!empty($aid) && empty($qstr)) $qstr = $aid; @@ -413,7 +413,7 @@ function RbClearArchives(){ } ------------------------------*/ else if ($dopost == 'clear') { CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); - require_once(DEDEINC . "/oxwindow.class.php"); + require_once(DEDEINC."/oxwindow.class.php"); if (empty($fmdo)) $fmdo = ''; $recycle = empty($recycle) ? "" : $recycle; @@ -440,7 +440,7 @@ else if ($dopost == 'clear') { $dsql->Execute(); $qstr = ''; while ($row = $dsql->GetArray()) { - $qstr .= $row['id'] . ","; + $qstr .= $row['id'].","; $aid = $row['id']; } $num = $dsql->GetTotalRow(); @@ -468,7 +468,7 @@ function RbDelArchives(){ } ------------------------------*/ else if ($dopost == 'del') { CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); - require_once(DEDEINC . "/oxwindow.class.php"); + require_once(DEDEINC."/oxwindow.class.php"); if (empty($fmdo)) $fmdo = ''; $recycle = empty($recycle) ? "" : $recycle; if ($fmdo == 'yes') { @@ -508,7 +508,7 @@ else if ($dopost == 'del') { function quickEdit(){ } ------------------------------*/ else if ($dopost == 'quickEdit') { - require_once(DEDEADMIN . "/inc/inc_catalog_options.php"); + require_once(DEDEADMIN."/inc/inc_catalog_options.php"); AjaxHead(); $query = "SELECT ch.typename as channelname,ch.addtable,ar.membername as rankname,arc.* FROM `#@__archives` arc @@ -546,7 +546,7 @@ else if ($dopost == 'quickEdit') { $dsql->Execute(); while ($trow = $dsql->GetObject()) { if ($trow->att == 'j' || $trow->att == 'p') continue; - if (preg_match("#" . $trow->att . "#", $arcRow['flag'])) + if (preg_match("#".$trow->att."#", $arcRow['flag'])) echo " "; else echo " "; @@ -608,7 +608,7 @@ else if ($dopost == 'quickEdit') { function quickEditSave(){ } ------------------------------*/ else if ($dopost == 'quickEditSave') { - require_once(DEDEADMIN . '/inc/inc_archives_functions.php'); + require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); //权限检测 if (!TestPurview('a_Edit')) { if (TestPurview('a_AccEdit')) { @@ -682,7 +682,7 @@ else if ($dopost == "makekw") { $title = $row['title']; $description = $row['description']; $body = cn_substr($row['body'], 5000); - $data = $client->Spliteword($title . Html2Text($body)); + $data = $client->Spliteword($title.Html2Text($body)); $keywords = $data->data; $description = str_replace(' ', ' ', trim($description)); $description = str_replace('[', ' ', $description); @@ -695,7 +695,7 @@ else if ($dopost == "makekw") { } $client->Close(); } else { - include_once(DEDEINC . '/splitword.class.php'); + include_once(DEDEINC.'/splitword.class.php'); $sp = new SplitWord($cfg_soft_lang, $cfg_soft_lang); while ($row = $dsql->GetArray()) { //跳过已经有关键字的内容 @@ -713,19 +713,19 @@ else if ($dopost == "makekw") { $allindexs = preg_replace("/#p#|#e#/", '', $sp->GetFinallyIndex()); if (is_array($allindexs) && is_array($titleindexs)) { foreach ($titleindexs as $k => $v) { - if (strlen($keywords . $k) >= 60) { + if (strlen($keywords.$k) >= 60) { break; } else { if (strlen($k) <= 2) continue; - $keywords .= $k . ','; + $keywords .= $k.','; } } foreach ($allindexs as $k => $v) { - if (strlen($keywords . $k) >= 60) { + if (strlen($keywords.$k) >= 60) { break; } else if (!in_array($k, $titleindexs)) { if (strlen($k) <= 2) continue; - $keywords .= $k . ','; + $keywords .= $k.','; } } } @@ -770,12 +770,12 @@ else if ($dopost == 'attsAdd') { if ($row['issystem'] != -1) { $maintable = (trim($row['maintable']) == '' ? '#@__archives' : trim($row['maintable'])); $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE id='$aid' "); - $flag = ($arr['flag'] == '' ? $flagname : $arr['flag'] . ',' . $flagname); + $flag = ($arr['flag'] == '' ? $flagname : $arr['flag'].','.$flagname); $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE id='{$aid}' "); } else { $maintable = trim($row['addtable']); $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE aid='$aid' "); - $flag = ($arr['flag'] == '' ? $flagname : $arr['flag'] . ',' . $flagname); + $flag = ($arr['flag'] == '' ? $flagname : $arr['flag'].','.$flagname); $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE aid='{$aid}' "); } } @@ -815,7 +815,7 @@ function attsDel(){ } $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE aid='$aid' "); } $flag = $arr['flag']; - if (trim($flag) == '' || !preg_match("#" . $flagname . "#", $flag)) { + if (trim($flag) == '' || !preg_match("#".$flagname."#", $flag)) { continue; } else { $flags = explode(',', $flag); diff --git a/src/dede/archives_edit.php b/src/dede/archives_edit.php index 2b0ca517..127bfd34 100755 --- a/src/dede/archives_edit.php +++ b/src/dede/archives_edit.php @@ -9,16 +9,16 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('a_Edit,a_AccEdit,a_MyEdit'); -require_once(DEDEINC . "/customfields.func.php"); -require_once(DEDEADMIN . "/inc/inc_archives_functions.php"); +require_once(DEDEINC."/customfields.func.php"); +require_once(DEDEADMIN."/inc/inc_archives_functions.php"); if (empty($dopost)) $dopost = ''; if ($dopost != 'save') { - require_once(DEDEADMIN . "/inc/inc_catalog_options.php"); - require_once(DEDEINC . "/dedetag.class.php"); + require_once(DEDEADMIN."/inc/inc_catalog_options.php"); + require_once(DEDEINC."/dedetag.class.php"); ClearMyAddon(); $aid = intval($aid); @@ -35,7 +35,7 @@ if ($dopost != 'save') { exit(); } - $query = "SELECT * FROM `#@__channeltype` WHERE id='" . $arcRow['channel'] . "'"; + $query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; $cInfos = $dsql->GetOne($query); if (!is_array($cInfos)) { ShowMsg("读取频道配置信息出错!", "javascript:;"); @@ -51,8 +51,8 @@ if ($dopost != 'save') { /*-------------------------------- function __save(){ } -------------------------------*/ else if ($dopost == 'save') { - require_once(DEDEINC . '/image.func.php'); - require_once(DEDEINC . '/oxwindow.class.php'); + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/oxwindow.class.php'); $flag = isset($flags) ? join(',', $flags) : ''; $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; if (empty($litpic_b64)) $litpic_b64 = ''; @@ -111,15 +111,15 @@ function __save(){ } if ($litpic_b64 != "") { $data = explode(',', $litpic_b64); $ntime = time(); - $savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); CreateDir($savepath); - $fullUrl = $savepath . '/' . dd2char(MyDate('mdHis', $ntime) . $cuserLogin->getUserID() . mt_rand(1000, 9999)); - $fullUrl = $fullUrl . ".png"; + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir . $fullUrl, base64_decode($data[1])); + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); // 加水印 - WaterImg($cfg_basedir . $fullUrl, 'up'); + WaterImg($cfg_basedir.$fullUrl, 'up'); $litpic = $fullUrl; } @@ -145,17 +145,17 @@ function __save(){ } } ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $id); } - $inadd_f .= ",`{$vs[0]}` = '" . ${$vs[0]} . "'"; + $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; } } } //处理图片文档的自定义属性 if ($litpic != '' && !preg_match("#p#", $flag)) { - $flag = ($flag == '' ? 'p' : $flag . ',p'); + $flag = ($flag == '' ? 'p' : $flag.',p'); } if ($redirecturl != '' && !preg_match("#j#", $flag)) { - $flag = ($flag == '' ? 'j' : $flag . ',j'); + $flag = ($flag == '' ? 'j' : $flag.',j'); } //跳转网址的文档强制为动态 @@ -204,7 +204,7 @@ function __save(){ } UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); $artUrl = MakeArt($id, TRUE, TRUE, $isremote); if ($artUrl == '') { - $artUrl = $cfg_phpurl . "/view.php?aid=$id"; + $artUrl = $cfg_phpurl."/view.php?aid=$id"; } ClearMyAddon($id, $title); @@ -225,7 +225,7 @@ function __save(){ }   请选择你的后续操作: 发布新文档    - 查看更改 + 查看更改    查看文档    diff --git a/src/dede/archives_sg_add.php b/src/dede/archives_sg_add.php index 3d301a7f..34c8412e 100755 --- a/src/dede/archives_sg_add.php +++ b/src/dede/archives_sg_add.php @@ -9,16 +9,16 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('a_New,a_AccNew'); -require_once(DEDEINC . "/customfields.func.php"); -require_once(DEDEADMIN . "/inc/inc_archives_functions.php"); +require_once(DEDEINC."/customfields.func.php"); +require_once(DEDEADMIN."/inc/inc_archives_functions.php"); if (empty($dopost)) $dopost = ''; if ($dopost != 'save') { - require_once(DEDEINC . "/dedetag.class.php"); - require_once(DEDEADMIN . "/inc/inc_catalog_options.php"); + require_once(DEDEINC."/dedetag.class.php"); + require_once(DEDEADMIN."/inc/inc_catalog_options.php"); ClearMyAddon(); $channelid = empty($channelid) ? 0 : intval($channelid); $cid = empty($cid) ? 0 : intval($cid); @@ -43,8 +43,8 @@ if ($dopost != 'save') { /*-------------------------------- function __save(){ } -------------------------------*/ else if ($dopost == 'save') { - require_once(DEDEINC . '/image.func.php'); - require_once(DEDEINC . '/oxwindow.class.php'); + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/oxwindow.class.php'); if ($typeid == 0) { ShowMsg("请指定文档的栏目!", "-1"); @@ -83,15 +83,15 @@ function __save(){ } if ($litpic_b64 != "") { $data = explode(',', $litpic_b64); $ntime = time(); - $savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); CreateDir($savepath); - $fullUrl = $savepath . '/' . dd2char(MyDate('mdHis', $ntime) . $cuserLogin->getUserID() . mt_rand(1000, 9999)); - $fullUrl = $fullUrl . ".png"; + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir . $fullUrl, base64_decode($data[1])); + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); // 加水印 - WaterImg($cfg_basedir . $fullUrl, 'up'); + WaterImg($cfg_basedir.$fullUrl, 'up'); $litpic = $fullUrl; } //生成文档ID @@ -124,15 +124,15 @@ function __save(){ } } ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); } - $inadd_f .= ',' . $vs[0]; - $inadd_v .= " ,'" . ${$vs[0]} . "' "; + $inadd_f .= ','.$vs[0]; + $inadd_v .= " ,'".${$vs[0]}."' "; } } } //处理图片文档的自定义属性 if ($litpic != '' && !preg_match("#p#", $flag)) { - $flag = ($flag == '' ? 'p' : $flag . ',p'); + $flag = ($flag == '' ? 'p' : $flag.',p'); } //保存到附加表 @@ -144,7 +144,7 @@ function __save(){ } if (!$dsql->ExecuteNoneQuery($query)) { $gerr = $dsql->GetError(); $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCMS官方。" . str_replace('"', '', $gerr), "javascript:;"); + ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCMS官方。".str_replace('"', '', $gerr), "javascript:;"); exit(); } } @@ -152,7 +152,7 @@ function __save(){ } //生成HTML $artUrl = MakeArt($arcID, TRUE, TRUE, $isremote); if ($artUrl == '') { - $artUrl = $cfg_phpurl . "/view.php?aid=$arcID"; + $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; } ClearMyAddon($arcID, $title); //返回成功信息 @@ -162,7 +162,7 @@ function __save(){ }    查看文档    - 更改文档 + 更改文档    已发布文档管理    diff --git a/src/dede/archives_sg_edit.php b/src/dede/archives_sg_edit.php index 0b994f86..6e34a42b 100755 --- a/src/dede/archives_sg_edit.php +++ b/src/dede/archives_sg_edit.php @@ -9,16 +9,16 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('a_Edit,a_AccEdit,a_MyEdit'); -require_once(DEDEINC . "/customfields.func.php"); -require_once(DEDEADMIN . "/inc/inc_archives_functions.php"); +require_once(DEDEINC."/customfields.func.php"); +require_once(DEDEADMIN."/inc/inc_archives_functions.php"); if (empty($dopost)) $dopost = ''; if ($dopost != 'save') { - require_once(DEDEADMIN . "/inc/inc_catalog_options.php"); - require_once(DEDEINC . "/dedetag.class.php"); + require_once(DEDEADMIN."/inc/inc_catalog_options.php"); + require_once(DEDEINC."/dedetag.class.php"); ClearMyAddon(); $aid = intval($aid); @@ -42,8 +42,8 @@ if ($dopost != 'save') { /*-------------------------------- function __save(){ } -------------------------------*/ else if ($dopost == 'save') { - require_once(DEDEINC . '/image.func.php'); - require_once(DEDEINC . '/oxwindow.class.php'); + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/oxwindow.class.php'); if ($typeid == 0) { ShowMsg("请指定文档的栏目!", "-1"); exit(); @@ -81,15 +81,15 @@ function __save(){ } if ($litpic_b64 != "") { $data = explode(',', $litpic_b64); $ntime = time(); - $savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); CreateDir($savepath); - $fullUrl = $savepath . '/' . dd2char(MyDate('mdHis', $ntime) . $cuserLogin->getUserID() . mt_rand(1000, 9999)); - $fullUrl = $fullUrl . ".png"; + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir . $fullUrl, base64_decode($data[1])); + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); // 加水印 - WaterImg($cfg_basedir . $fullUrl, 'up'); + WaterImg($cfg_basedir.$fullUrl, 'up'); $litpic = $fullUrl; } //分析处理附加表数据 @@ -114,14 +114,14 @@ function __save(){ } } ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $id); } - $inadd_f .= ",`{$vs[0]}` = '" . ${$vs[0]} . "'"; + $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; } } } //处理图片文档的自定义属性 if ($litpic != '' && !preg_match("#p#", $flag)) { - $flag = ($flag == '' ? 'p' : $flag . ',p'); + $flag = ($flag == '' ? 'p' : $flag.',p'); } $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); @@ -137,7 +137,7 @@ function __save(){ } //生成HTML UpIndexKey($id, $arcrank, $typeid, $sortrank, ''); $artUrl = MakeArt($id, TRUE, TRUE, $isremote); - if ($artUrl == '') $artUrl = $cfg_phpurl . "/view.php?aid=$id"; + if ($artUrl == '') $artUrl = $cfg_phpurl."/view.php?aid=$id"; ClearMyAddon($id, $title); //返回成功信息 @@ -145,7 +145,7 @@ function __save(){ }   请选择你的后续操作: 发布新文档    - 查看更改 + 查看更改    查看文档    diff --git a/src/dede/article_add.php b/src/dede/article_add.php index 6065513a..562d65b4 100755 --- a/src/dede/article_add.php +++ b/src/dede/article_add.php @@ -9,18 +9,18 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/config.php'); +require_once(dirname(__FILE__).'/config.php'); CheckPurview('a_New,a_AccNew'); -require_once(DEDEINC . '/customfields.func.php'); -require_once(DEDEADMIN . '/inc/inc_archives_functions.php'); -if (file_exists(DEDEDATA . '/template.rand.php')) { - require_once(DEDEDATA . '/template.rand.php'); +require_once(DEDEINC.'/customfields.func.php'); +require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); +if (file_exists(DEDEDATA.'/template.rand.php')) { + require_once(DEDEDATA.'/template.rand.php'); } if (empty($dopost)) $dopost = ''; if ($dopost != 'save') { - require_once(DEDEINC . "/dedetag.class.php"); - require_once(DEDEADMIN . "/inc/inc_catalog_options.php"); + require_once(DEDEINC."/dedetag.class.php"); + require_once(DEDEADMIN."/inc/inc_catalog_options.php"); ClearMyAddon(); $channelid = empty($channelid) ? 0 : intval($channelid); $cid = empty($cid) ? 0 : intval($cid); @@ -32,7 +32,7 @@ if ($dopost != 'save') { //采集单个网页 if (preg_match("#^http:\/\/#", $geturl)) { - require_once(DEDEADMIN . "/inc/inc_coonepage.php"); + require_once(DEDEADMIN."/inc/inc_coonepage.php"); $redatas = CoOnePage($geturl); extract($redatas); } @@ -60,8 +60,8 @@ if ($dopost != 'save') { /*-------------------------------- function __save(){ } -------------------------------*/ else if ($dopost == 'save') { - require_once(DEDEINC . '/image.func.php'); - require_once(DEDEINC . '/oxwindow.class.php'); + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/oxwindow.class.php'); $flag = isset($flags) ? join(',', $flags) : ''; $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; @@ -123,15 +123,15 @@ function __save(){ } if ($litpic_b64 != "") { $data = explode(',', $litpic_b64); $ntime = time(); - $savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); CreateDir($savepath); - $fullUrl = $savepath . '/' . dd2char(MyDate('mdHis', $ntime) . $cuserLogin->getUserID() . mt_rand(1000, 9999)); - $fullUrl = $fullUrl . ".png"; + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir . $fullUrl, base64_decode($data[1])); + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); // 加水印 - WaterImg($cfg_basedir . $fullUrl, 'up'); + WaterImg($cfg_basedir.$fullUrl, 'up'); $litpic = $fullUrl; } @@ -169,18 +169,18 @@ function __save(){ } if (!isset(${$vs[0]})) ${$vs[0]} = ''; ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); } - $inadd_f .= ',' . $vs[0]; - $inadd_v .= " ,'" . ${$vs[0]} . "' "; + $inadd_f .= ','.$vs[0]; + $inadd_v .= " ,'".${$vs[0]}."' "; } } } //处理图片文档的自定义属性 if ($litpic != '' && !preg_match("#p#", $flag)) { - $flag = ($flag == '' ? 'p' : $flag . ',p'); + $flag = ($flag == '' ? 'p' : $flag.',p'); } if ($redirecturl != '' && !preg_match("#j#", $flag)) { - $flag = ($flag == '' ? 'j' : $flag . ',j'); + $flag = ($flag == '' ? 'j' : $flag.',j'); } //跳转网址的文档强制为动态 @@ -196,7 +196,7 @@ function __save(){ } if (!$dsql->ExecuteNoneQuery($query)) { $gerr = $dsql->GetError(); $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCMS官方。" . str_replace('"', '', $gerr), "javascript:;"); + ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCMS官方。".str_replace('"', '', $gerr), "javascript:;"); exit(); } @@ -216,7 +216,7 @@ function __save(){ } $gerr = $dsql->GetError(); $dsql->ExecuteNoneQuery("Delete From `#@__archives` where id='$arcID'"); $dsql->ExecuteNoneQuery("Delete From `#@__arctiny` where id='$arcID'"); - ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCMS官方。" . str_replace('"', '', $gerr), "javascript:;"); + ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCMS官方。".str_replace('"', '', $gerr), "javascript:;"); exit(); } //生成HTML @@ -225,7 +225,7 @@ function __save(){ } if (count($_SESSION['bigfile_info']) > 0) { foreach ($_SESSION['bigfile_info'] as $k => $v) { if (!empty($v)) { - $pictitle = ${'picinfook' . $k}; + $pictitle = ${'picinfook'.$k}; $titleSet = ''; if (!empty($pictitle)) { $picTitle = TRUE; @@ -237,7 +237,7 @@ function __save(){ } } $artUrl = MakeArt($arcID, true, true, $isremote); if ($artUrl == '') { - $artUrl = $cfg_phpurl . "/view.php?aid=$arcID"; + $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; } ClearMyAddon($arcID, $title); @@ -259,13 +259,13 @@ function __save(){ }    查看文章    - 更改文章 + 更改文章    已发布文章管理    $backurl "; - $msg = "
{$msg}
" . GetUpdateTest(); + $msg = "
{$msg}
".GetUpdateTest(); $wintitle = "成功发布文章!"; $wecome_info = "文章管理::发布文章"; $win = new OxWindow(); diff --git a/src/dede/article_allowurl_edit.php b/src/dede/article_allowurl_edit.php index 0f0eca1f..b27b9bae 100755 --- a/src/dede/article_allowurl_edit.php +++ b/src/dede/article_allowurl_edit.php @@ -9,14 +9,14 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -require_once(DEDEINC . "/oxwindow.class.php"); +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEINC."/oxwindow.class.php"); CheckPurview('sys_Source'); if (empty($dopost)) $dopost = ''; if (empty($allurls)) $allsource = ''; else $allurls = stripslashes($allurls); -$m_file = DEDEDATA . "/admin/allowurl.txt"; +$m_file = DEDEDATA."/admin/allowurl.txt"; //保存 if ($dopost == 'save') { diff --git a/src/dede/article_coonepage_rule.php b/src/dede/article_coonepage_rule.php index 29148b88..40de3a77 100755 --- a/src/dede/article_coonepage_rule.php +++ b/src/dede/article_coonepage_rule.php @@ -9,8 +9,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -require_once(DEDEINC . "/datalistcp.class.php"); +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEINC."/datalistcp.class.php"); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); if (empty($action)) $action = ''; @@ -115,6 +115,6 @@ function _ShowLoad(){ } $sql = ""; $sql = "SELECT id,url,title,lang,issource FROM `#@__co_onepage` ORDER BY id DESC"; $dlist = new DataListCP(); -$dlist->SetTemplate(DEDEADMIN . "/templets/article_coonepage_rule.htm"); +$dlist->SetTemplate(DEDEADMIN."/templets/article_coonepage_rule.htm"); $dlist->SetSource($sql); $dlist->Display(); diff --git a/src/dede/article_description_main.php b/src/dede/article_description_main.php index 8d9f44e3..2ee63b6e 100755 --- a/src/dede/article_description_main.php +++ b/src/dede/article_description_main.php @@ -11,7 +11,7 @@ */ @ob_start(); @set_time_limit(3600); -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_Keyword'); if (empty($dojob)) $dojob = ''; if ($dojob == '') { @@ -98,7 +98,7 @@ if ($dojob == '') { //更新自动分页 if ($dojob == 'page') { - require_once(DEDEADMIN . "/inc/inc_archives_functions.php"); + require_once(DEDEADMIN."/inc/inc_archives_functions.php"); $addquery = ""; if ($sid != 0) { @@ -119,7 +119,7 @@ if ($dojob == '') { if ($totalnum > $startdd + $pagesize) { $limitSql = " LIMIT $startdd,$pagesize"; } else if (($totalnum - $startdd) > 0) { - $limitSql = " LIMIT $startdd," . ($totalnum - $startdd); + $limitSql = " LIMIT $startdd,".($totalnum - $startdd); } else { $limitSql = ""; } @@ -156,7 +156,7 @@ if ($dojob == '') { $tjsta .= "
完成处理文档总数的:$tjlen %,继续执行任务..."; if ($tjnum < $totalnum) { - $nurl = "article_description_main.php?totalnum=$totalnum&startdd=" . ($startdd + $pagesize) . "&pagesize=$pagesize&table={$table}&field={$field}&dsize={$dsize}&msize={$msize}&channel={$channel}&dojob={$dojob}"; + $nurl = "article_description_main.php?totalnum=$totalnum&startdd=".($startdd + $pagesize)."&pagesize=$pagesize&table={$table}&field={$field}&dsize={$dsize}&msize={$msize}&channel={$channel}&dojob={$dojob}"; ShowMsg($tjsta, $nurl, 0, 500); exit(); } else { diff --git a/src/dede/article_edit.php b/src/dede/article_edit.php index 01611f5b..657d032d 100755 --- a/src/dede/article_edit.php +++ b/src/dede/article_edit.php @@ -9,20 +9,20 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('a_Edit,a_AccEdit,a_MyEdit'); -require_once(DEDEINC . "/customfields.func.php"); -require_once(DEDEADMIN . "/inc/inc_archives_functions.php"); -if (file_exists(DEDEDATA . '/template.rand.php')) { - require_once(DEDEDATA . '/template.rand.php'); +require_once(DEDEINC."/customfields.func.php"); +require_once(DEDEADMIN."/inc/inc_archives_functions.php"); +if (file_exists(DEDEDATA.'/template.rand.php')) { + require_once(DEDEDATA.'/template.rand.php'); } if (empty($dopost)) $dopost = ''; $aid = isset($aid) && is_numeric($aid) ? $aid : 0; if ($dopost != 'save') { - require_once(DEDEADMIN . "/inc/inc_catalog_options.php"); - require_once(DEDEINC . "/dedetag.class.php"); + require_once(DEDEADMIN."/inc/inc_catalog_options.php"); + require_once(DEDEINC."/dedetag.class.php"); ClearMyAddon(); //读取归档信息 @@ -35,7 +35,7 @@ if ($dopost != 'save') { ShowMsg("读取档案基本信息出错!", "-1"); exit(); } - $query = "SELECT * FROM `#@__channeltype` WHERE id='" . $arcRow['channel'] . "'"; + $query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; $cInfos = $dsql->GetOne($query); if (!is_array($cInfos)) { ShowMsg("读取频道配置信息出错!", "javascript:;"); @@ -55,8 +55,8 @@ if ($dopost != 'save') { /*-------------------------------- function __save(){ } -------------------------------*/ else if ($dopost == 'save') { - require_once(DEDEINC . '/image.func.php'); - require_once(DEDEINC . '/oxwindow.class.php'); + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/oxwindow.class.php'); $flag = isset($flags) ? join(',', $flags) : ''; $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; @@ -139,7 +139,7 @@ function __save(){ } } ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $id); } - $inadd_f .= ",`{$vs[0]}` = '" . ${$vs[0]} . "'"; + $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; } } } @@ -148,24 +148,24 @@ function __save(){ } if ($litpic_b64 != "") { $data = explode(',', $litpic_b64); $ntime = time(); - $savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); CreateDir($savepath); - $fullUrl = $savepath . '/' . dd2char(MyDate('mdHis', $ntime) . $cuserLogin->getUserID() . mt_rand(1000, 9999)); - $fullUrl = $fullUrl . ".png"; + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir . $fullUrl, base64_decode($data[1])); + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); // 加水印 - WaterImg($cfg_basedir . $fullUrl, 'up'); + WaterImg($cfg_basedir.$fullUrl, 'up'); $litpic = $fullUrl; } //处理图片文档的自定义属性 if ($litpic != '' && !preg_match("#p#", $flag)) { - $flag = ($flag == '' ? 'p' : $flag . ',p'); + $flag = ($flag == '' ? 'p' : $flag.',p'); } if ($redirecturl != '' && !preg_match("#j#", $flag)) { - $flag = ($flag == '' ? 'j' : $flag . ',j'); + $flag = ($flag == '' ? 'j' : $flag.',j'); } //跳转网址的文档强制为动态 @@ -216,7 +216,7 @@ function __save(){ } UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); $artUrl = MakeArt($id, true, true, $isremote); if ($artUrl == '') { - $artUrl = $cfg_phpurl . "/view.php?aid=$id"; + $artUrl = $cfg_phpurl."/view.php?aid=$id"; } ClearMyAddon($id, $title); @@ -237,7 +237,7 @@ function __save(){ }   请选择你的后续操作: 发布新文章    - 查看更改 + 查看更改    查看文章    diff --git a/src/dede/article_keywords_main.php b/src/dede/article_keywords_main.php index bef93c28..44af5d36 100755 --- a/src/dede/article_keywords_main.php +++ b/src/dede/article_keywords_main.php @@ -9,9 +9,9 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_Keyword'); -require_once(DEDEINC . "/datalistcp.class.php"); +require_once(DEDEINC."/datalistcp.class.php"); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); if (empty($dopost)) $dopost = ''; @@ -24,19 +24,19 @@ if ($dopost == 'saveall') { exit(); } foreach ($aids as $aid) { - $rpurl = ${'rpurl_' . $aid}; - $rpurlold = ${'rpurlold_' . $aid}; - $keyword = ${'keyword_' . $aid}; + $rpurl = ${'rpurl_'.$aid}; + $rpurlold = ${'rpurlold_'.$aid}; + $keyword = ${'keyword_'.$aid}; //删除项目 - if (!empty(${'isdel_' . $aid})) { + if (!empty(${'isdel_'.$aid})) { $dsql->ExecuteNoneQuery("DELETE FROM `#@__keywords` WHERE aid='$aid'"); continue; } //禁用项目 - $staold = ${'staold_' . $aid}; - $sta = empty(${'isnouse_' . $aid}) ? 1 : 0; + $staold = ${'staold_'.$aid}; + $sta = empty(${'isnouse_'.$aid}) ? 1 : 0; if ($staold != $sta) { $query1 = "UPDATE `#@__keywords` SET sta='$sta',rpurl='$rpurl' WHERE aid='$aid' "; $dsql->ExecuteNoneQuery($query1); @@ -82,7 +82,7 @@ $sql = "SELECT * FROM `#@__keywords` $addquery ORDER BY rank DESC"; $dlist = new DataListCP(); $dlist->pageSize = 20; $dlist->SetParameter("keyword", $keyword); -$dlist->SetTemplate(DEDEADMIN . "/templets/article_keywords_main.htm"); +$dlist->SetTemplate(DEDEADMIN."/templets/article_keywords_main.htm"); $dlist->SetSource($sql); $dlist->Display(); diff --git a/src/dede/article_keywords_make.php b/src/dede/article_keywords_make.php index e62d75dd..544a7cb6 100755 --- a/src/dede/article_keywords_make.php +++ b/src/dede/article_keywords_make.php @@ -11,7 +11,7 @@ */ @ob_start(); @set_time_limit(3600); -require_once(dirname(__FILE__) . '/config.php'); +require_once(dirname(__FILE__).'/config.php'); CheckPurview('sys_Keyword'); if (empty($dopost)) $dopost = ''; @@ -43,14 +43,14 @@ if ($dopost == 'analyse') { continue; } if (isset($ws[$v])) { - $mykey .= $v . " "; + $mykey .= $v." "; } else if (isset($wsnew[$v])) { - $mykey .= $v . ' '; + $mykey .= $v.' '; $wsnew[$v]++; } else if (isset($wserr[$v])) { $nerr = true; } else { - $mykey .= $v . " "; + $mykey .= $v." "; $wsnew[$v] = 1; } } @@ -68,7 +68,7 @@ if ($dopost == 'analyse') { if (strlen($k) > 20) { continue; } - $dsql->SetQuery("INSERT INTO `#@__keywords`(keyword,rank,sta,rpurl) VALUES('" . addslashes($k) . "','$v','1','')"); + $dsql->SetQuery("INSERT INTO `#@__keywords`(keyword,rank,sta,rpurl) VALUES('".addslashes($k)."','$v','1','')"); $dsql->Execute(); } echo "完成关键字的导入!
\r\n"; @@ -84,7 +84,7 @@ if ($dopost == 'analyse') { } //自动获取关键字(适用于默认的文章模型) else if ($dopost == 'fetch') { - require_once(DEDEINC . "/splitword.class.php"); + require_once(DEDEINC."/splitword.class.php"); if (empty($startdd)) { $startdd = 0; } @@ -105,7 +105,7 @@ else if ($dopost == 'fetch') { if ($totalnum > $startdd + $pagesize) { $limitSql = " LIMIT $startdd,$pagesize"; } else if (($totalnum - $startdd) > 0) { - $limitSql = " LIMIT $startdd," . ($totalnum - $startdd); + $limitSql = " LIMIT $startdd,".($totalnum - $startdd); } else { $limitSql = ''; } @@ -127,7 +127,7 @@ else if ($dopost == 'fetch') { $tjnum++; $id = $row->id; $keywords = ""; - $data = $client->Spliteword($row->title . Html2Text($row->body)); + $data = $client->Spliteword($row->title.Html2Text($row->body)); $keywords = $data->data; $keywords = addslashes($keywords); if ($keywords == '') { @@ -162,7 +162,7 @@ else if ($dopost == 'fetch') { break; } else { if (strlen($k) <= 2) continue; - $keywords .= $k . ","; + $keywords .= $k.","; } } foreach ($allindexs as $k => $v) { @@ -170,7 +170,7 @@ else if ($dopost == 'fetch') { break; } else if (!in_array($k, $titleindexs)) { if (strlen($k) <= 2) continue; - $keywords .= $k . ","; + $keywords .= $k.","; } } } @@ -194,7 +194,7 @@ else if ($dopost == 'fetch') { $tjsta .= "
完成处理文档总数的:$tjlen %,位置:{$startdd},继续执行任务..."; if ($tjnum < $totalnum) { - $nurl = "article_keywords_make.php?dopost=fetch&totalnum=$totalnum&startdd=" . ($startdd + $pagesize) . "&pagesize=$pagesize"; + $nurl = "article_keywords_make.php?dopost=fetch&totalnum=$totalnum&startdd=".($startdd + $pagesize)."&pagesize=$pagesize"; ShowMsg($tjsta, $nurl, 0, 500); } else { ShowMsg("完成所有任务!", "javascript:;"); diff --git a/src/dede/article_keywords_select.php b/src/dede/article_keywords_select.php index aeb7e94f..0588d768 100755 --- a/src/dede/article_keywords_select.php +++ b/src/dede/article_keywords_select.php @@ -9,8 +9,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -require_once(DEDEINC . "/datalistcp.class.php"); +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEINC."/datalistcp.class.php"); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); $f = RemoveXSS($f); @@ -19,7 +19,7 @@ if (empty($keywords)) $keywords = ""; $sql = "SELECT * FROM #@__keywords ORDER BY rank DESC"; $dlist = new DataListCP(); -$dlist->SetTemplate(DEDEADMIN . "/templets/article_keywords_select.htm"); +$dlist->SetTemplate(DEDEADMIN."/templets/article_keywords_select.htm"); $dlist->pageSize = 300; $dlist->SetParameter("f", $f); $dlist->SetSource($sql); diff --git a/src/dede/article_select_sw.php b/src/dede/article_select_sw.php index 235714de..312e5388 100755 --- a/src/dede/article_select_sw.php +++ b/src/dede/article_select_sw.php @@ -7,14 +7,14 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require(dirname(__FILE__) . "/config.php"); +require(dirname(__FILE__)."/config.php"); header("Pragma:no-cache"); header("Cache-Control:no-cache"); header("Expires:0"); //来源列表 if ($t == 'source') { - $m_file = DEDEDATA . "/admin/source.txt"; + $m_file = DEDEDATA."/admin/source.txt"; $allsources = file($m_file); echo "
[设置] "; echo "[关闭]
\r\n
\r\n"; @@ -27,7 +27,7 @@ if ($t == 'source') { echo "
 
"; } else { //作者列表 - $m_file = DEDEDATA . "/admin/writer.txt"; + $m_file = DEDEDATA."/admin/writer.txt"; echo "
[设置] "; echo "[关闭]
\r\n
\r\n"; if (filesize($m_file) > 0) { diff --git a/src/dede/article_source_edit.php b/src/dede/article_source_edit.php index e80778c9..5de015ff 100755 --- a/src/dede/article_source_edit.php +++ b/src/dede/article_source_edit.php @@ -9,14 +9,14 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -require_once(DEDEINC . "/oxwindow.class.php"); +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEINC."/oxwindow.class.php"); CheckPurview('sys_Source'); if (empty($dopost)) $dopost = ''; if (empty($allsource)) $allsource = ''; else $allsource = stripslashes($allsource); -$m_file = DEDEDATA . "/admin/source.txt"; +$m_file = DEDEDATA."/admin/source.txt"; //保存 if ($dopost == 'save') { diff --git a/src/dede/article_string_mix.php b/src/dede/article_string_mix.php index c10b0306..d07f0725 100755 --- a/src/dede/article_string_mix.php +++ b/src/dede/article_string_mix.php @@ -9,15 +9,15 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/config.php'); -require_once(DEDEINC . '/oxwindow.class.php'); +require_once(dirname(__FILE__).'/config.php'); +require_once(DEDEINC.'/oxwindow.class.php'); CheckPurview('sys_StringMix'); if (empty($dopost)) $dopost = ''; if (empty($allsource)) $allsource = ''; else $allsource = stripslashes($allsource); -$m_file = DEDEDATA . "/downmix.data.php"; +$m_file = DEDEDATA."/downmix.data.php"; //保存 if ($dopost == "save") { diff --git a/src/dede/article_template_rand.php b/src/dede/article_template_rand.php index 219eee5a..5673d8cb 100755 --- a/src/dede/article_template_rand.php +++ b/src/dede/article_template_rand.php @@ -9,12 +9,12 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/config.php'); -require_once(DEDEINC . '/oxwindow.class.php'); +require_once(dirname(__FILE__).'/config.php'); +require_once(DEDEINC.'/oxwindow.class.php'); CheckPurview('sys_StringMix'); if (empty($dopost)) $dopost = ''; $templates = empty($templates) ? '' : stripslashes($templates); -$m_file = DEDEDATA . '/template.rand.php'; +$m_file = DEDEDATA.'/template.rand.php'; //----------------------action $okmsg = ''; @@ -25,7 +25,7 @@ if ($dopost == 'save') { flock($fp, 3); fwrite($fp, $templates); fclose($fp); - $okmsg = '成功保存配置信息 AT:(' . MyDate('H:i:s', time()) . ')'; + $okmsg = '成功保存配置信息 AT:('.MyDate('H:i:s', time()).')'; } //对旧文档进行随机模板处理 else if ($dopost == 'makeold') { diff --git a/src/dede/article_test_same.php b/src/dede/article_test_same.php index 0042d55d..761117db 100755 --- a/src/dede/article_test_same.php +++ b/src/dede/article_test_same.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); @set_time_limit(0); CheckPurview('sys_ArcBatch'); if (empty($dopost)) $dopost = ''; @@ -29,8 +29,8 @@ if ($dopost == 'analyse') { } //删除选中的内容(只保留一条) else if ($dopost == 'delsel') { - require_once(dirname(__FILE__) . "/../include/typelink.class.php"); - require_once(dirname(__FILE__) . "/inc/inc_batchup.php"); + require_once(dirname(__FILE__)."/../include/typelink.class.php"); + require_once(dirname(__FILE__)."/inc/inc_batchup.php"); if (empty($titles)) { header("Content-Type: text/html; charset={$cfg_ver_lang}"); diff --git a/src/dede/article_test_title.php b/src/dede/article_test_title.php index efe00782..bc1e20ce 100755 --- a/src/dede/article_test_title.php +++ b/src/dede/article_test_title.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); AjaxHead(); if (empty($t) || $cfg_check_title == 'N') exit; diff --git a/src/dede/article_writer_edit.php b/src/dede/article_writer_edit.php index 75fd9c38..40269544 100755 --- a/src/dede/article_writer_edit.php +++ b/src/dede/article_writer_edit.php @@ -9,15 +9,15 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/config.php'); -require_once(DEDEINC . '/oxwindow.class.php'); +require_once(dirname(__FILE__).'/config.php'); +require_once(DEDEINC.'/oxwindow.class.php'); CheckPurview('sys_Writer'); if (empty($dopost)) $dopost = ''; if (empty($allwriter)) $allwriter = ''; else $allwriter = stripslashes($allwriter); -$m_file = DEDEDATA . "/admin/writer.txt"; +$m_file = DEDEDATA."/admin/writer.txt"; //保存 if ($dopost == "save") { diff --git a/src/dede/baidunews.php b/src/dede/baidunews.php index 0077fd87..fd69a2f1 100755 --- a/src/dede/baidunews.php +++ b/src/dede/baidunews.php @@ -9,12 +9,12 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); if (empty($do)) { - include DEDEADMIN . '/templets/baidunews.htm'; + include DEDEADMIN.'/templets/baidunews.htm'; } else { - $baidunews = "\n"; + $baidunews = "\n"; $baidunews .= "\n"; $baidunews .= "$cfg_webname \n"; $baidunews .= "$cfg_adminemail \n"; @@ -37,7 +37,7 @@ if (empty($do)) { $title = dede_htmlspecialchars($row['title']); $row1 = GetOneArchive($row['id']); if (strpos($row1['arcurl'], 'http://') === false) { - $link = ($cfg_basehost == '' ? 'http://' . $_SERVER["HTTP_HOST"] . $cfg_cmspath : $cfg_basehost) . $row1['arcurl']; + $link = ($cfg_basehost == '' ? 'http://'.$_SERVER["HTTP_HOST"].$cfg_cmspath : $cfg_basehost).$row1['arcurl']; } else { $link = $row1['arcurl']; } @@ -46,7 +46,7 @@ if (empty($do)) { $text = dede_htmlspecialchars(strip_tags($row['body'])); $image = $row['litpic'] == '' ? '' : $row['litpic']; if ($image != '' && strpos($image, 'http://') === false) { - $image = ($cfg_basehost == '' ? 'http://' . $_SERVER["HTTP_HOST"] . $cfg_cmspath : $cfg_basehost) . $image; + $image = ($cfg_basehost == '' ? 'http://'.$_SERVER["HTTP_HOST"].$cfg_cmspath : $cfg_basehost).$image; } //$headlineimg = ''; $keywords = dede_htmlspecialchars($row['keywords']); @@ -71,7 +71,7 @@ if (empty($do)) { } $baidunews .= "\n"; - $fp = fopen(dirname(__FILE__) . '/' . $filename, 'w'); + $fp = fopen(dirname(__FILE__).'/'.$filename, 'w'); fwrite($fp, $baidunews); fclose($fp); showmsg("{$filename} make success", 'javascript:;'); diff --git a/src/dede/cards_make.php b/src/dede/cards_make.php index 7d9df052..3a00bd07 100755 --- a/src/dede/cards_make.php +++ b/src/dede/cards_make.php @@ -9,10 +9,10 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('member_Card'); if (empty($dopost)) $dopost = ''; -if ($dopost == '') include(DEDEADMIN . "/templets/cards_make.htm"); +if ($dopost == '') include(DEDEADMIN."/templets/cards_make.htm"); //生成点卡 elseif ($dopost == 'make') { @@ -30,7 +30,7 @@ elseif ($dopost == 'make') { header("Content-Type: text/html; charset={$cfg_soft_lang}"); for (; $startid < $endid; $startid++) { - $cardid = $snprefix . $startid . '-'; + $cardid = $snprefix.$startid.'-'; for ($p = 0; $p < $pwdgr; $p++) { for ($i = 0; $i < $pwdlen; $i++) { if ($ctype == 1) { diff --git a/src/dede/cards_manage.php b/src/dede/cards_manage.php index acfc975a..7d715260 100755 --- a/src/dede/cards_manage.php +++ b/src/dede/cards_manage.php @@ -9,8 +9,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -require_once(DEDEINC . '/datalistcp.class.php'); +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEINC.'/datalistcp.class.php'); $dopost = empty($dopost) ? "" : $dopost; if ($dopost == "delete") { $ids = explode('`', $aids); @@ -19,7 +19,7 @@ if ($dopost == "delete") { if ($dquery == "") $dquery .= "aid='$id' "; else $dquery .= " OR aid='$id' "; } - if ($dquery != "") $dquery = " WHERE " . $dquery; + if ($dquery != "") $dquery = " WHERE ".$dquery; $dsql->ExecuteNoneQuery("DELETE FROM #@__moneycard_record $dquery"); ShowMsg("成功删除指定的记录!", "cards_manage.php"); exit(); @@ -37,7 +37,7 @@ if ($dopost == "delete") { while ($rw = $dlist->dsql->GetArray('ts')) { $TypeNames[$rw['tid']] = $rw['pname']; } - $tplfile = DEDEADMIN . "/templets/cards_manmage.htm"; + $tplfile = DEDEADMIN."/templets/cards_manmage.htm"; //这两句的顺序不能更换 $dlist->SetTemplate($tplfile); //载入模板 @@ -50,7 +50,7 @@ function GetMemberID($mid) global $dsql; if ($mid == 0) return '0'; $row = $dsql->GetOne("SELECT userid FROM #@__member WHERE mid='$mid' "); - if (is_array($row)) return "" . $row['userid'] . ""; + if (is_array($row)) return "".$row['userid'].""; else return '0'; } diff --git a/src/dede/cards_type.php b/src/dede/cards_type.php index 76ed2120..1d075a5d 100755 --- a/src/dede/cards_type.php +++ b/src/dede/cards_type.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/config.php'); +require_once(dirname(__FILE__).'/config.php'); CheckPurview('member_Type'); if (empty($dopost)) $dopost = ""; @@ -19,11 +19,11 @@ if ($dopost == "save") { $endID = $idend; for (; $startID <= $endID; $startID++) { $query = ''; - $tid = ${'ID_' . $startID}; - $pname = ${'pname_' . $startID}; - $money = ${'money_' . $startID}; - $num = ${'num_' . $startID}; - if (isset(${'check_' . $startID})) { + $tid = ${'ID_'.$startID}; + $pname = ${'pname_'.$startID}; + $money = ${'money_'.$startID}; + $num = ${'num_'.$startID}; + if (isset(${'check_'.$startID})) { if ($pname != '') { $query = "UPDATE #@__moneycard_type SET pname='$pname',money='$money',num='$num' WHERE tid='$tid'"; $dsql->ExecuteNoneQuery($query); @@ -46,4 +46,4 @@ if ($dopost == "save") { header("Content-Type: text/html; charset={$cfg_soft_lang}"); echo ""; } -require_once(DEDEADMIN . "/templets/cards_type.htm"); +require_once(DEDEADMIN."/templets/cards_type.htm"); diff --git a/src/dede/catalog_add.php b/src/dede/catalog_add.php index 7591dc0e..61e558a6 100755 --- a/src/dede/catalog_add.php +++ b/src/dede/catalog_add.php @@ -9,8 +9,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -require_once(DEDEINC . "/typelink.class.php"); +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEINC."/typelink.class.php"); if (empty($listtype)) $listtype = ''; if (empty($dopost)) $dopost = ''; @@ -67,11 +67,11 @@ function action_savequick(){ } } else { continue; } - $rank = ${'rank' . $k}; - $toptypename = trim(${'toptype' . $k}); - $sontype = trim(${'sontype' . $k}); + $rank = ${'rank'.$k}; + $toptypename = trim(${'toptype'.$k}); + $sontype = trim(${'sontype'.$k}); $toptypedir = GetPinyin(stripslashes($toptypename)); - $toptypedir = $referpath == 'parent' ? $nextdir . '/' . $toptypedir : '/' . $toptypedir; + $toptypedir = $referpath == 'parent' ? $nextdir.'/'.$toptypedir : '/'.$toptypedir; if (empty($toptypename)) { continue; } @@ -89,7 +89,7 @@ function action_savequick(){ } if ($v == '') { continue; } - $typedir = $toptypedir . '/' . GetPinyin(stripslashes($v)); + $typedir = $toptypedir.'/'.GetPinyin(stripslashes($v)); $sql = str_replace('~reid~', $tid, $queryTemplate); $sql = str_replace('~topid~', $tid, $sql); $sql = str_replace('~rank~', $k, $sql); @@ -109,18 +109,18 @@ function action_savequick(){ } } else { continue; } - $rank = ${'rank' . $k}; - $toptypename = trim(${'reltype' . $k}); + $rank = ${'rank'.$k}; + $toptypename = trim(${'reltype'.$k}); $toptypedir = GetPinyin(stripslashes($toptypename)); switch ($referpath) { case 'parent': - $toptypedir = $nextdir . '/' . $toptypedir; + $toptypedir = $nextdir.'/'.$toptypedir; break; case 'typepath': - $toptypedir = isset($row['typedir']) ? $row['typedir'] . '/' . $toptypedir : '/' . $toptypedir; + $toptypedir = isset($row['typedir']) ? $row['typedir'].'/'.$toptypedir : '/'.$toptypedir; break; default: - $toptypedir = '/' . $toptypedir; + $toptypedir = '/'.$toptypedir; break; } @@ -161,7 +161,7 @@ function action_save(){ } if ($upinyin == 1 || $typedir == '') { $typedir = GetPinyin(stripslashes($typename)); } - $typedir = $nextdir . '/' . $typedir; + $typedir = $nextdir.'/'.$typedir; $typedir = preg_replace("#\/{1,}#", "/", $typedir); } @@ -176,7 +176,7 @@ function action_save(){ } ShowMsg("你绑定的二级域名无效,请用(http://host)的形式!", "-1"); exit(); } - if (preg_match("#" . $cfg_basehost . "#i", $siteurl)) { + if (preg_match("#".$cfg_basehost."#i", $siteurl)) { ShowMsg("你绑定的二级域名与当前站点是同一个域,不需要绑定!", "-1"); exit(); } diff --git a/src/dede/catalog_del.php b/src/dede/catalog_del.php index 9cb1d5b2..b89a131c 100755 --- a/src/dede/catalog_del.php +++ b/src/dede/catalog_del.php @@ -9,12 +9,12 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/config.php'); +require_once(dirname(__FILE__).'/config.php'); //检查权限许可 CheckPurview('t_Del,t_AccDel'); -require_once(DEDEINC . '/typeunit.class.admin.php'); -require_once(DEDEINC . '/oxwindow.class.php'); +require_once(DEDEINC.'/typeunit.class.admin.php'); +require_once(DEDEINC.'/oxwindow.class.php'); $id = trim(preg_replace("#[^0-9]#", '', $id)); //检查栏目操作许可 @@ -27,7 +27,7 @@ if ($dopost == 'ok') { ShowMsg("成功删除一个栏目!", "catalog_main.php"); exit(); } -$dsql->SetQuery("SELECT typename,typedir FROM #@__arctype WHERE id=" . $id); +$dsql->SetQuery("SELECT typename,typedir FROM #@__arctype WHERE id=".$id); $row = $dsql->GetOne(); $wintitle = "删除栏目确认"; $wecome_info = "栏目管理 >> 删除栏目确认"; diff --git a/src/dede/catalog_do.php b/src/dede/catalog_do.php index f3923d51..ac97566f 100755 --- a/src/dede/catalog_do.php +++ b/src/dede/catalog_do.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/config.php'); +require_once(dirname(__FILE__).'/config.php'); if (empty($dopost)) { ShowMsg("对不起,请指定栏目参数!", "catalog_main.php"); exit(); @@ -83,14 +83,14 @@ function listArchives(); //浏览通用模板目录 function viewTempletDir(); ---------------------------*/ else if ($dopost == "viewTemplet") { - header("location:tpl.php?path=/" . $cfg_df_style); + header("location:tpl.php?path=/".$cfg_df_style); exit(); } /*------------------------ 浏览单个页面的栏目 function ViewSgPage() ------------------------*/ else if ($dopost == "viewSgPage") { - require_once(DEDEINC . "/arc.listview.class.php"); + require_once(DEDEINC."/arc.listview.class.php"); $lv = new ListView($cid); $pageurl = $lv->MakeHtml(); ShowMsg("更新缓冲,请稍后...", $pageurl); @@ -123,8 +123,8 @@ function upRank() if (is_array($row)) { $maxID = $row['id']; for ($i = 1; $i <= $maxID; $i++) { - if (isset(${'sortrank' . $i})) { - $dsql->ExecuteNoneQuery("UPDATE #@__arctype SET sortrank='" . (${'sortrank' . $i}) . "' WHERE id='{$i}';"); + if (isset(${'sortrank'.$i})) { + $dsql->ExecuteNoneQuery("UPDATE #@__arctype SET sortrank='".(${'sortrank'.$i})."' WHERE id='{$i}';"); } } } @@ -175,7 +175,7 @@ function GetJs function GetSunListsMenu(); -----------*/ else if ($dopost == "GetSunListsMenu") { $userChannel = $cuserLogin->getUserChannel(); - require_once(DEDEINC . "/typeunit.class.menu.php"); + require_once(DEDEINC."/typeunit.class.menu.php"); AjaxHead(); PutCookie('lastCidMenu', $cid, 3600 * 24, "/"); $tu = new TypeUnit($userChannel); @@ -185,7 +185,7 @@ function GetSunListsMenu(); 获得子类的内容 function GetSunLists(); -----------*/ else if ($dopost == "GetSunLists") { - require_once(DEDEINC . "/typeunit.class.admin.php"); + require_once(DEDEINC."/typeunit.class.admin.php"); AjaxHead(); PutCookie('lastCid', $cid, 3600 * 24, "/"); $tu = new TypeUnit(); @@ -200,9 +200,9 @@ function GetSunLists(); function unitCatalog() { } -----------------*/ else if ($dopost == 'unitCatalog') { CheckPurview('t_Move'); - require_once(DEDEINC . '/oxwindow.class.php'); - require_once(DEDEINC . '/typelink.class.php'); - require_once(DEDEINC . '/channelunit.func.php'); + require_once(DEDEINC.'/oxwindow.class.php'); + require_once(DEDEINC.'/typelink.class.php'); + require_once(DEDEINC.'/channelunit.func.php'); if (empty($nextjob)) { $typeid = isset($typeid) ? intval($typeid) : 0; $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__arctype` WHERE reid='$typeid' "); @@ -258,9 +258,9 @@ function unitCatalog() { } function moveCatalog() { } -----------------*/ else if ($dopost == 'moveCatalog') { CheckPurview('t_Move'); - require_once(DEDEINC . '/oxwindow.class.php'); - require_once(DEDEINC . '/typelink.class.php'); - require_once(DEDEINC . '/channelunit.func.php'); + require_once(DEDEINC.'/oxwindow.class.php'); + require_once(DEDEINC.'/typelink.class.php'); + require_once(DEDEINC.'/channelunit.func.php'); if (empty($nextjob)) { $tl = new TypeLink($typeid); $typename = $tl->TypeInfos['typename']; diff --git a/src/dede/catalog_edit.php b/src/dede/catalog_edit.php index aee0fdfd..1362927e 100755 --- a/src/dede/catalog_edit.php +++ b/src/dede/catalog_edit.php @@ -9,8 +9,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -require_once(DEDEINC . "/typelink.class.php"); +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEINC."/typelink.class.php"); if (empty($dopost)) $dopost = ''; $id = isset($id) ? intval($id) : 0; @@ -71,7 +71,7 @@ if ($dopost == "save") { if ($topid > 0 && $issend == 1) { $dsql->ExecuteNoneQuery("UPDATE `#@__arctype` SET issend='$issend' WHERE id='$topid'; "); } - $slinks = " id IN (" . GetSonIds($id) . ")"; + $slinks = " id IN (".GetSonIds($id).")"; //修改顶级栏目时强制修改下级的多站点支持属性 if ($topid == 0 && preg_match("#,#", $slinks)) { @@ -103,7 +103,7 @@ if ($dopost == "save") { } //End Save Action else if ($dopost == "savetime") { $uptopsql = ''; - $slinks = " id IN (" . GetSonIds($id) . ")"; + $slinks = " id IN (".GetSonIds($id).")"; //顶级栏目二级域名根目录处理 if ($topid == 0 && $moresite == 1) { @@ -219,9 +219,9 @@ if ($dopost == 'time') { $dsql->Execute(); while ($row = $dsql->GetObject()) { if ($myrow['corank'] == $row->rank) - echo "\r\n"; + echo "\r\n"; else - echo "\r\n"; + echo "\r\n"; } ?> diff --git a/src/dede/catalog_main.php b/src/dede/catalog_main.php index f08d1d14..000b7bfa 100755 --- a/src/dede/catalog_main.php +++ b/src/dede/catalog_main.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -require_once(DEDEINC . "/typeunit.class.admin.php"); +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEINC."/typeunit.class.admin.php"); $userChannel = $cuserLogin->getUserChannel(); include DedeInclude('templets/catalog_main.htm'); diff --git a/src/dede/catalog_menu.php b/src/dede/catalog_menu.php index 234e34b0..2323bdee 100755 --- a/src/dede/catalog_menu.php +++ b/src/dede/catalog_menu.php @@ -9,8 +9,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -require_once(DEDEINC . "/typeunit.class.menu.php"); +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEINC."/typeunit.class.menu.php"); $userChannel = $cuserLogin->getUserChannel(); if (empty($opendir)) $opendir = -1; if ($userChannel > 0) $opendir = $userChannel; diff --git a/src/dede/config.php b/src/dede/config.php index 3531e4a1..f2ea56b0 100755 --- a/src/dede/config.php +++ b/src/dede/config.php @@ -10,15 +10,15 @@ * @link https://www.dedebiz.com */ define('DEDEADMIN', str_replace("\\", '/', dirname(__FILE__))); -require_once(DEDEADMIN . '/../include/common.inc.php'); -require_once(DEDEINC . '/userlogin.class.php'); +require_once(DEDEADMIN.'/../include/common.inc.php'); +require_once(DEDEINC.'/userlogin.class.php'); header('Cache-Control:private'); $dsql->safeCheck = FALSE; $dsql->SetLongLink(); $cfg_admin_skin = 1; // 后台管理风格 -if (file_exists(DEDEDATA . '/admin/skin.txt')) { - $skin = file_get_contents(DEDEDATA . '/admin/skin.txt'); +if (file_exists(DEDEDATA.'/admin/skin.txt')) { + $skin = file_get_contents(DEDEDATA.'/admin/skin.txt'); $cfg_admin_skin = !in_array($skin, array(1, 2, 3, 4)) ? 1 : $skin; } @@ -69,9 +69,9 @@ $cuserLogin = new userLogin(); if ($cuserLogin->getUserID() == -1) { if (preg_match("#PHP (.*) Development Server#", $_SERVER['SERVER_SOFTWARE'])) { $dirname = dirname($_SERVER['SCRIPT_NAME']); - header("location:{$dirname}/login.php?gotopage=" . urlencode($dedeNowurl)); + header("location:{$dirname}/login.php?gotopage=".urlencode($dedeNowurl)); } else { - header("location:login.php?gotopage=" . urlencode($dedeNowurl)); + header("location:login.php?gotopage=".urlencode($dedeNowurl)); } exit(); } @@ -96,21 +96,21 @@ if ($cfg_dede_log == 'Y') { $s_scriptNames = explode('/', $s_scriptName); $s_scriptNames = $s_scriptNames[count($s_scriptNames) - 1]; $s_userip = GetIP(); - if ($s_method == 'POST' || (!preg_match("#" . $s_nologfile . "#i", $s_scriptNames) && $s_query != '') || preg_match("#" . $s_needlogfile . "#i", $s_scriptNames)) { + if ($s_method == 'POST' || (!preg_match("#".$s_nologfile."#i", $s_scriptNames) && $s_query != '') || preg_match("#".$s_needlogfile."#i", $s_scriptNames)) { $inquery = "INSERT INTO `#@__log`(adminid,filename,method,query,cip,dtime) - VALUES ('" . $cuserLogin->getUserID() . "','{$s_scriptNames}','{$s_method}','" . addslashes($s_query) . "','{$s_userip}','" . time() . "');"; + VALUES ('".$cuserLogin->getUserID()."','{$s_scriptNames}','{$s_method}','".addslashes($s_query)."','{$s_userip}','".time()."');"; $dsql->ExecuteNoneQuery($inquery); } } //管理缓存、管理员频道缓存 -$cache1 = DEDEDATA . '/cache/inc_catalog_base.inc'; +$cache1 = DEDEDATA.'/cache/inc_catalog_base.inc'; if (!file_exists($cache1)) UpDateCatCache(); -$cacheFile = DEDEDATA . '/cache/admincat_' . $cuserLogin->userID . '.inc'; +$cacheFile = DEDEDATA.'/cache/admincat_'.$cuserLogin->userID.'.inc'; if (file_exists($cacheFile)) require_once($cacheFile); //更新服务器 -require_once(DEDEDATA . '/admin/config_update.php'); +require_once(DEDEDATA.'/admin/config_update.php'); if (strlen($cfg_cookie_encode) <= 10) { $chars = 'abcdefghigklmnopqrstuvwxwyABCDEFGHIGKLMNOPQRSTUVWXWY0123456789'; @@ -121,25 +121,25 @@ if (strlen($cfg_cookie_encode) <= 10) { $hash .= $chars[mt_rand(0, $max)]; } $dsql->ExecuteNoneQuery("UPDATE `#@__sysconfig` SET `value`='{$hash}' WHERE varname='cfg_cookie_encode' "); - $configfile = DEDEDATA . '/config.cache.inc.php'; + $configfile = DEDEDATA.'/config.cache.inc.php'; if (!is_writeable($configfile)) { echo "配置文件'{$configfile}'不支持写入,无法修改系统配置参数!"; exit(); } $fp = fopen($configfile, 'w'); flock($fp, 3); - fwrite($fp, "<" . "?php\r\n"); + fwrite($fp, "<"."?php\r\n"); $dsql->SetQuery("SELECT `varname`,`type`,`value`,`groupid` FROM `#@__sysconfig` ORDER BY aid ASC "); $dsql->Execute(); while ($row = $dsql->GetArray()) { if ($row['type'] == 'number') { if ($row['value'] == '') $row['value'] = 0; - fwrite($fp, "\${$row['varname']} = " . $row['value'] . ";\r\n"); + fwrite($fp, "\${$row['varname']} = ".$row['value'].";\r\n"); } else { - fwrite($fp, "\${$row['varname']} = '" . str_replace("'", '', $row['value']) . "';\r\n"); + fwrite($fp, "\${$row['varname']} = '".str_replace("'", '', $row['value'])."';\r\n"); } } - fwrite($fp, "?" . ">"); + fwrite($fp, "?".">"); fclose($fp); } @@ -152,8 +152,8 @@ if (strlen($cfg_cookie_encode) <= 10) { function UpDateCatCache() { global $dsql, $cache1, $cuserLogin; - $cache2 = DEDEDATA . '/cache/channelsonlist.inc'; - $cache3 = DEDEDATA . '/cache/channeltoplist.inc'; + $cache2 = DEDEDATA.'/cache/channelsonlist.inc'; + $cache3 = DEDEDATA.'/cache/channeltoplist.inc'; $dsql->SetQuery("SELECT id,reid,channeltype,issend,typename FROM `#@__arctype`"); $dsql->Execute(); $fp1 = fopen($cache1, 'w'); @@ -175,8 +175,8 @@ function UpDateCatCache() // 清空选项缓存 function ClearOptCache() { - $tplCache = DEDEDATA . '/tplcache/'; - $fileArray = glob($tplCache . "inc_option_*.inc"); + $tplCache = DEDEDATA.'/tplcache/'; + $fileArray = glob($tplCache."inc_option_*.inc"); if (count($fileArray) > 1) { foreach ($fileArray as $key => $value) { if (file_exists($value)) unlink($value); @@ -197,7 +197,7 @@ function ClearOptCache() */ function DedeInclude($filename, $isabs = FALSE) { - return $isabs ? $filename : DEDEADMIN . '/' . $filename; + return $isabs ? $filename : DEDEADMIN.'/'.$filename; } /** diff --git a/src/dede/content_att.php b/src/dede/content_att.php index 71166d0a..980eb1a1 100755 --- a/src/dede/content_att.php +++ b/src/dede/content_att.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_Att'); if (empty($dopost)) $dopost = ''; @@ -18,9 +18,9 @@ if ($dopost == "save") { $startID = 1; $endID = $idend; for (; $startID <= $endID; $startID++) { - $att = ${'att_' . $startID}; - $attname = ${'attname_' . $startID}; - $sortid = ${'sortid_' . $startID}; + $att = ${'att_'.$startID}; + $attname = ${'attname_'.$startID}; + $sortid = ${'sortid_'.$startID}; $query = "UPDATE `#@__arcatt` SET `attname`='$attname',`sortid`='$sortid' WHERE att='$att' "; $dsql->ExecuteNoneQuery($query); } diff --git a/src/dede/content_batch_up.php b/src/dede/content_batch_up.php index 6b751181..da79e0e5 100755 --- a/src/dede/content_batch_up.php +++ b/src/dede/content_batch_up.php @@ -9,6 +9,6 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/config.php'); -require_once(DEDEINC . '/typelink.class.php'); +require_once(dirname(__FILE__).'/config.php'); +require_once(DEDEINC.'/typelink.class.php'); include DedeInclude('templets/content_batch_up.htm'); diff --git a/src/dede/content_batchup_action.php b/src/dede/content_batchup_action.php index 88489299..04c4b141 100755 --- a/src/dede/content_batchup_action.php +++ b/src/dede/content_batchup_action.php @@ -9,10 +9,10 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_ArcBatch'); -require_once(DEDEINC . "/typelink.class.php"); -require_once(DEDEADMIN . "/inc/inc_batchup.php"); +require_once(DEDEINC."/typelink.class.php"); +require_once(DEDEADMIN."/inc/inc_batchup.php"); @set_time_limit(0); //typeid,startid,endid,seltime,starttime,endtime,action,newtypeid @@ -29,7 +29,7 @@ if (empty($userid)) $userid = ''; if ($action == "makehtml") { $jumpurl = "makehtml_archives_action.php?endid=$endid&startid=$startid"; $jumpurl .= "&typeid=$typeid&pagesize=20&seltime=$seltime"; - $jumpurl .= "&stime=" . urlencode($starttime) . "&etime=" . urlencode($endtime); + $jumpurl .= "&stime=".urlencode($starttime)."&etime=".urlencode($endtime); header("Location: $jumpurl"); exit(); } @@ -65,7 +65,7 @@ if ($action == 'check') { } $jumpurl = "makehtml_archives_action.php?endid=$endid&startid=$startid"; $jumpurl .= "&typeid=$typeid&pagesize=20&seltime=$seltime"; - $jumpurl .= "&stime=" . urlencode($starttime) . "&etime=" . urlencode($endtime); + $jumpurl .= "&stime=".urlencode($starttime)."&etime=".urlencode($endtime); $dsql->SetQuery("SELECT id,arcrank FROM `#@__arctiny` $gwhere"); $dsql->Execute('c'); while ($row = $dsql->GetObject('c')) { @@ -140,7 +140,7 @@ else if ($action == 'move') { ShowMsg("不能把数据移动到内容类型不同的栏目!", "javascript:;"); exit(); } - $gwhere .= " And channel='" . $typenew['channeltype'] . "' And title like '%$keyword%'"; + $gwhere .= " And channel='".$typenew['channeltype']."' And title like '%$keyword%'"; $ch = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id={$typenew['channeltype']} "); $addtable = $ch['addtable']; @@ -161,7 +161,7 @@ else if ($action == 'move') { if ($tdd > 0) { $jumpurl = "makehtml_archives_action.php?endid=$endid&startid=$startid"; $jumpurl .= "&typeid=$newtypeid&pagesize=20&seltime=$seltime"; - $jumpurl .= "&stime=" . urlencode($starttime) . "&etime=" . urlencode($endtime); + $jumpurl .= "&stime=".urlencode($starttime)."&etime=".urlencode($endtime); ShowMsg("成功移动 $tdd 条记录,准备重新生成HTML...", $jumpurl); } else { ShowMsg("完成操作,没移动任何数据...", "javascript:;"); diff --git a/src/dede/content_i_list.php b/src/dede/content_i_list.php index c32ee9fa..8a291ff4 100755 --- a/src/dede/content_i_list.php +++ b/src/dede/content_i_list.php @@ -10,4 +10,4 @@ * @link https://www.dedebiz.com */ $s_tmplets = "templets/content_i_list.htm"; -include(dirname(__FILE__) . "/content_list.php"); +include(dirname(__FILE__)."/content_list.php"); diff --git a/src/dede/content_list.php b/src/dede/content_list.php index edbd3f45..704def2d 100755 --- a/src/dede/content_list.php +++ b/src/dede/content_list.php @@ -11,10 +11,10 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/config.php'); -require_once(DEDEINC . '/typelink.class.php'); -require_once(DEDEINC . '/datalistcp.class.php'); -require_once(DEDEADMIN . '/inc/inc_list_functions.php'); +require_once(dirname(__FILE__).'/config.php'); +require_once(DEDEINC.'/typelink.class.php'); +require_once(DEDEINC.'/datalistcp.class.php'); +require_once(DEDEADMIN.'/inc/inc_list_functions.php'); $cid = isset($cid) ? intval($cid) : 0; $channelid = isset($channelid) ? intval($channelid) : 0; @@ -76,11 +76,11 @@ if (empty($totalresult) && empty($keyword) && empty($orderby) && empty($flag)) { } if (!empty($cid)) { - $tinyQuerys[] = " typeid in(" . GetSonIds($cid) . ") "; + $tinyQuerys[] = " typeid in(".GetSonIds($cid).") "; } if (count($tinyQuerys) > 0) { - $tinyQuery = "WHERE " . join(' AND ', $tinyQuerys); + $tinyQuery = "WHERE ".join(' AND ', $tinyQuerys); } // 缓存处理 $sql = "SELECT COUNT(*) AS dd FROM `#@__arctiny` $tinyQuery "; @@ -93,12 +93,12 @@ if ($cid == 0) { $positionname = '所有栏目>'; } else { $row = $tl->dsql->GetOne("SELECT id,typename,maintable FROM `#@__channeltype` WHERE id='$channelid'"); - $positionname = $row['typename'] . " > "; + $positionname = $row['typename']." > "; $maintable = $row['maintable']; $channelid = $row['id']; } } else { - $positionname = str_replace($cfg_list_symbol, " > ", $tl->GetPositionName()) . " > "; + $positionname = str_replace($cfg_list_symbol, " > ", $tl->GetPositionName())." > "; } //当选择的是单表模型栏目时,直接跳转到单表模型管理区 @@ -115,8 +115,8 @@ if ($channelid < -1) { // 栏目大于800则需要缓存数据 -$optHash = md5($cid . serialize($admin_catalogs) . $channelid); -$optCache = DEDEDATA . "/tplcache/inc_option_$optHash.inc"; +$optHash = md5($cid.serialize($admin_catalogs).$channelid); +$optCache = DEDEDATA."/tplcache/inc_option_$optHash.inc"; $typeCount = 0; if (file_exists($cache1)) require_once($cache1); @@ -143,7 +143,7 @@ while ($frow = $dsql->GetArray('f')) { if (!empty($userCatalogSql)) { - $whereSql .= " AND " . $userCatalogSql; + $whereSql .= " AND ".$userCatalogSql; } if (!empty($mid)) { $whereSql .= " AND arc.mid = '$mid' "; @@ -155,17 +155,17 @@ if ($flag != '') { $whereSql .= " AND FIND_IN_SET('$flag', arc.flag) "; } if ($cid != 0) { - $whereSql .= ' AND arc.typeid IN (' . GetSonIds($cid) . ')'; + $whereSql .= ' AND arc.typeid IN ('.GetSonIds($cid).')'; } if ($arcrank != '') { $whereSql .= " AND arc.arcrank = '$arcrank' "; - $CheckUserSend = ""; + $CheckUserSend = ""; } else { - $CheckUserSend = ""; + $CheckUserSend = ""; } $orderby = empty($orderby) ? 'id' : preg_replace("#[^a-z0-9]#", "", $orderby); -$orderbyField = 'arc.' . $orderby; +$orderbyField = 'arc.'.$orderby; $query = "SELECT arc.id,arc.typeid,arc.senddate,arc.flag,arc.ismake, arc.channel,arc.arcrank,arc.click,arc.title,arc.color,arc.litpic,arc.pubdate,arc.mid @@ -192,7 +192,7 @@ $dlist->SetParameter('f', $f); //模板 if (empty($s_tmplets)) $s_tmplets = 'templets/content_list.htm'; -$dlist->SetTemplate(DEDEADMIN . '/' . $s_tmplets); +$dlist->SetTemplate(DEDEADMIN.'/'.$s_tmplets); //查询 $dlist->SetSource($query); diff --git a/src/dede/content_s_list.php b/src/dede/content_s_list.php index 620d3748..e400a914 100755 --- a/src/dede/content_s_list.php +++ b/src/dede/content_s_list.php @@ -9,8 +9,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('spec_List'); $s_tmplets = "templets/content_s_list.htm"; $channelid = -1; -include(dirname(__FILE__) . "/content_list.php"); +include(dirname(__FILE__)."/content_list.php"); diff --git a/src/dede/content_select_list.php b/src/dede/content_select_list.php index f9816da7..a7b1f076 100755 --- a/src/dede/content_select_list.php +++ b/src/dede/content_select_list.php @@ -10,4 +10,4 @@ * @link https://www.dedebiz.com */ $s_tmplets = "templets/content_select_list.htm"; -include(dirname(__FILE__) . "/content_list.php"); +include(dirname(__FILE__)."/content_list.php"); diff --git a/src/dede/content_sg_list.php b/src/dede/content_sg_list.php index 571e83fb..8aa13db0 100755 --- a/src/dede/content_sg_list.php +++ b/src/dede/content_sg_list.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); $cid = isset($cid) ? intval($cid) : 0; $channelid = isset($channelid) ? intval($channelid) : 0; $mid = isset($mid) ? intval($mid) : 0; @@ -36,9 +36,9 @@ if (TestPurview('a_List')) { $adminid = $cuserLogin->getUserID(); $maintable = '#@__archives'; -require_once(DEDEINC . "/typelink.class.php"); -require_once(DEDEINC . "/datalistcp.class.php"); -require_once(DEDEADMIN . "/inc/inc_list_functions.php"); +require_once(DEDEINC."/typelink.class.php"); +require_once(DEDEINC."/datalistcp.class.php"); +require_once(DEDEADMIN."/inc/inc_list_functions.php"); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); $tl = new TypeLink($cid); $listtable = @trim($tl->TypeInfos['addtable']); @@ -49,10 +49,10 @@ if (!empty($channelid) && !empty($ucid) && $tl->TypeInfos['channeltype'] != $cha if ($cid == 0) { $row = $tl->dsql->GetOne("SELECT typename,addtable FROM `#@__channeltype` WHERE id='$channelid'"); - $positionname = $row['typename'] . " > "; + $positionname = $row['typename']." > "; $listtable = $row['addtable']; } else { - $positionname = str_replace($cfg_list_symbol, " > ", $tl->GetPositionName()) . " > "; + $positionname = str_replace($cfg_list_symbol, " > ", $tl->GetPositionName())." > "; } $optionarr = $tl->GetOptionArray($cid, $admin_catalogs, $channelid); @@ -60,7 +60,7 @@ $whereSql = $channelid == 0 ? " WHERE arc.channel < -1 " : " WHERE arc.channel = if (!empty($mid)) $whereSql .= " AND arc.mid = '$mid' "; if ($keyword != '') $whereSql .= " AND (arc.title like '%$keyword%') "; -if ($cid != 0) $whereSql .= " AND arc.typeid in (" . GetSonIds($cid) . ")"; +if ($cid != 0) $whereSql .= " AND arc.typeid in (".GetSonIds($cid).")"; if ($arcrank != '') { $whereSql .= " AND arc.arcrank = '$arcrank' "; @@ -81,7 +81,7 @@ $dlist->SetParameter("dopost", "listArchives"); $dlist->SetParameter("keyword", $keyword); $dlist->SetParameter("cid", $cid); $dlist->SetParameter("channelid", $channelid); -$dlist->SetTemplate(DEDEADMIN . "/templets/content_sg_list.htm"); +$dlist->SetTemplate(DEDEADMIN."/templets/content_sg_list.htm"); $dlist->SetSource($query); $dlist->Display(); $dlist->Close(); diff --git a/src/dede/content_tj.php b/src/dede/content_tj.php index 1f721276..fc051079 100755 --- a/src/dede/content_tj.php +++ b/src/dede/content_tj.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_ArcTj'); $row1 = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__arctiny` "); $row2 = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__feedback` "); @@ -40,12 +40,12 @@ function GetArchives($dsql, $ordertype) $dsql->Execute('ga'); while ($row = $dsql->GetObject('ga')) { if (preg_match("#feedback#i", $ordertype)) { - $moreinfo = "[id}'>评论:{$row->scores}]"; + $moreinfo = "[id}'>评论:{$row->scores}]"; } else { $moreinfo = "[点击:{$row->click}]"; } echo "·"; - echo cn_substr($row->title, 30) . "{$moreinfo}
\r\n"; + echo cn_substr($row->title, 30)."{$moreinfo}
\r\n"; } } include DedeInclude('templets/content_tj.htm'); diff --git a/src/dede/dialog/config.php b/src/dede/dialog/config.php index ed3c38ad..7ee5d3e6 100755 --- a/src/dede/dialog/config.php +++ b/src/dede/dialog/config.php @@ -9,8 +9,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/../../include/common.inc.php"); -require_once(DEDEINC . "/userlogin.class.php"); +require_once(dirname(__FILE__)."/../../include/common.inc.php"); +require_once(DEDEINC."/userlogin.class.php"); //获得当前脚本名称,如果你的系统被禁用了$_SERVER变量,请自行更改这个选项 $dedeNowurl = ''; @@ -27,11 +27,11 @@ $cuserLogin = new userLogin(); if ($cuserLogin->getUserID() <= 0) { if (empty($adminDirHand)) { - ShowMsg("提示:需输入后台管理目录才能登录
请输入后台管理目录名:
", "javascript:;"); + ShowMsg("提示:需输入后台管理目录才能登录
请输入后台管理目录名:
", "javascript:;"); exit(); } $adminDirHand = HtmlReplace($adminDirHand, 1); - $gurl = "../../{$adminDirHand}/login.php?gotopage=" . urlencode($dedeNowurl); + $gurl = "../../{$adminDirHand}/login.php?gotopage=".urlencode($dedeNowurl); echo ""; exit(); } diff --git a/src/dede/dialog/select_images.php b/src/dede/dialog/select_images.php index c8166d69..7eab9f6e 100644 --- a/src/dede/dialog/select_images.php +++ b/src/dede/dialog/select_images.php @@ -8,8 +8,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -include(DEDEDATA . '/mark/inc_photowatermark_config.php'); +require_once(dirname(__FILE__)."/config.php"); +include(DEDEDATA.'/mark/inc_photowatermark_config.php'); if (empty($activepath)) { $activepath = ''; } @@ -22,8 +22,8 @@ $activepath = preg_replace("#\/{1,}#", '/', $activepath); if (strlen($activepath) < strlen($cfg_medias_dir)) { $activepath = $cfg_medias_dir; } -$inpath = $cfg_basedir . $activepath; -$activeurl = '..' . $activepath; +$inpath = $cfg_basedir.$activepath; +$activeurl = '..'.$activepath; if (empty($f)) { $f = 'form1.picname'; } @@ -36,11 +36,11 @@ if (empty($comeback)) { } $addparm = ''; if (!empty($CKEditor)) { - $addparm = '&CKEditor=' . $CKEditor; + $addparm = '&CKEditor='.$CKEditor; $f = $CKEditor; } if (!empty($CKEditorFuncNum)) { - $addparm .= '&CKEditorFuncNum=' . $CKEditorFuncNum; + $addparm .= '&CKEditorFuncNum='.$CKEditorFuncNum; } if (!empty($noeditor)) { $addparm .= '&noeditor=yes'; @@ -148,10 +148,10 @@ table{background:#fff} if ($filesize != "") if ($filesize < 0.1) { @list($ty1, $ty2) = split("\.", $filesize); - $filesize = $ty1 . "." . substr($ty2, 0, 2); + $filesize = $ty1.".".substr($ty2, 0, 2); } else { @list($ty1, $ty2) = split("\.", $filesize); - $filesize = $ty1 . "." . substr($ty2, 0, 1); + $filesize = $ty1.".".substr($ty2, 0, 1); } $filetime = filemtime("$inpath/$file"); $filetime = MyDate("Y-m-d H:i", $filetime); @@ -162,7 +162,7 @@ table{background:#fff} $tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath); $line = "\n - 上级目录 + 上级目录 当前目录:$activepath "; echo $line; @@ -171,12 +171,12 @@ table{background:#fff} if (preg_match("#^\.(.*)$#i", $file)) continue; $line = "\n - $file + $file "; echo "$line"; - } else if (preg_match("#\.(" . $cfg_imgtype . ")#i", $file)) { + } else if (preg_match("#\.(".$cfg_imgtype.")#i", $file)) { $reurl = "$activeurl/$file"; $reurl = preg_replace("#^\.\.#", "", $reurl); $reurl = $reurl; diff --git a/src/dede/dialog/select_images_post.php b/src/dede/dialog/select_images_post.php index 47a3b056..aabd277f 100755 --- a/src/dede/dialog/select_images_post.php +++ b/src/dede/dialog/select_images_post.php @@ -9,8 +9,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -require_once(DEDEINC . "/image.func.php"); +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEINC."/image.func.php"); if (empty($activepath)) { @@ -27,13 +27,13 @@ if (empty($imgfile)) { $imgfile = ''; } if (!is_uploaded_file($imgfile)) { - ShowMsg("你没有选择上传的文件!" . $imgfile, "-1"); + ShowMsg("你没有选择上传的文件!".$imgfile, "-1"); exit(); } $CKEditorFuncNum = (isset($CKEditorFuncNum)) ? $CKEditorFuncNum : 1; $imgfile_name = trim(preg_replace("#[ \r\n\t\*\%\\\/\?><\|\":]{1,}#", '', $imgfile_name)); -if (!preg_match("#\.(" . $cfg_imgtype . ")#i", $imgfile_name)) { +if (!preg_match("#\.(".$cfg_imgtype.")#i", $imgfile_name)) { ShowMsg("你所上传的图片类型不在许可列表,请更改系统对扩展名限定的配置!", "-1"); exit(); } @@ -45,16 +45,16 @@ if (!in_array($imgfile_type, $sparr)) { exit(); } $mdir = MyDate($cfg_addon_savetype, $nowtme); -if (!is_dir($cfg_basedir . $activepath . "/$mdir")) { - MkdirAll($cfg_basedir . $activepath . "/$mdir", $cfg_dir_purview); +if (!is_dir($cfg_basedir.$activepath."/$mdir")) { + MkdirAll($cfg_basedir.$activepath."/$mdir", $cfg_dir_purview); CloseFtp(); } -$filename_name = $cuserLogin->getUserID() . '-' . dd2char(MyDate("ymdHis", $nowtme) . mt_rand(100, 999)); -$filename = $mdir . '/' . $filename_name; +$filename_name = $cuserLogin->getUserID().'-'.dd2char(MyDate("ymdHis", $nowtme).mt_rand(100, 999)); +$filename = $mdir.'/'.$filename_name; $fs = explode('.', $imgfile_name); -$filename = $filename . '.' . $fs[count($fs) - 1]; -$filename_name = $filename_name . '.' . $fs[count($fs) - 1]; -$fullfilename = $cfg_basedir . $activepath . "/" . $filename; +$filename = $filename.'.'.$fs[count($fs) - 1]; +$filename_name = $filename_name.'.'.$fs[count($fs) - 1]; +$fullfilename = $cfg_basedir.$activepath."/".$filename; move_uploaded_file($imgfile, $fullfilename) or die("上传文件到 $fullfilename 失败!"); @unlink($imgfile); @@ -79,13 +79,13 @@ $imgwidthValue = $sizes[0]; $imgheightValue = $sizes[1]; $imgsize = filesize($fullfilename); $inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) - VALUES ('0','$filename','" . $activepath . "/" . $filename . "','1','$imgwidthValue','$imgheightValue','0','{$imgsize}','{$nowtme}','" . $cuserLogin->getUserID() . "'); "; + VALUES ('0','$filename','".$activepath."/".$filename."','1','$imgwidthValue','$imgheightValue','0','{$imgsize}','{$nowtme}','".$cuserLogin->getUserID()."'); "; $dsql->ExecuteNoneQuery($inquery); $fid = $dsql->GetLastID(); -AddMyAddon($fid, $activepath . '/' . $filename); +AddMyAddon($fid, $activepath.'/'.$filename); $CKUpload = isset($CKUpload) ? $CKUpload : FALSE; if ($GLOBALS['cfg_html_editor'] == 'ckeditor' && $CKUpload) { - $fileurl = $activepath . '/' . $filename; + $fileurl = $activepath.'/'.$filename; $result = array('url' => $fileurl, "uploaded" => 1, 'fileName' => $filename); echo json_encode($result); exit; @@ -93,8 +93,8 @@ if ($GLOBALS['cfg_html_editor'] == 'ckeditor' && $CKUpload) { if (!empty($noeditor)) { - ShowMsg("成功上传一幅图片!", "select_images.php?imgstick=$imgstick&comeback=" . urlencode($filename_name) . "&v=$v&f=$f&CKEditorFuncNum=$CKEditorFuncNum&noeditor=yes&activepath=" . urlencode($activepath) . "/$mdir&d=" . time()); + ShowMsg("成功上传一幅图片!", "select_images.php?imgstick=$imgstick&comeback=".urlencode($filename_name)."&v=$v&f=$f&CKEditorFuncNum=$CKEditorFuncNum&noeditor=yes&activepath=".urlencode($activepath)."/$mdir&d=".time()); } else { - ShowMsg("成功上传一幅图片!", "select_images.php?imgstick=$imgstick&comeback=" . urlencode($filename_name) . "&v=$v&f=$f&CKEditorFuncNum=$CKEditorFuncNum&activepath=" . urlencode($activepath) . "/$mdir&d=" . time()); + ShowMsg("成功上传一幅图片!", "select_images.php?imgstick=$imgstick&comeback=".urlencode($filename_name)."&v=$v&f=$f&CKEditorFuncNum=$CKEditorFuncNum&activepath=".urlencode($activepath)."/$mdir&d=".time()); } exit(); diff --git a/src/dede/dialog/select_media.php b/src/dede/dialog/select_media.php index 0457d069..82731cac 100755 --- a/src/dede/dialog/select_media.php +++ b/src/dede/dialog/select_media.php @@ -10,7 +10,7 @@ * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); if (empty($activepath)) { $activepath = ''; } @@ -20,8 +20,8 @@ $activepath = preg_replace("#\/{1,}#", '/', $activepath); if (strlen($activepath) < strlen($cfg_other_medias)) { $activepath = $cfg_other_medias; } -$inpath = $cfg_basedir . $activepath; -$activeurl = '..' . $activepath; +$inpath = $cfg_basedir.$activepath; +$activeurl = '..'.$activepath; if (!is_dir($inpath)) { die('No Exsits Path'); } @@ -34,10 +34,10 @@ if (empty($comeback)) { } $addparm = ''; if (!empty($CKEditor)) { - $addparm = '&CKEditor=' . $CKEditor; + $addparm = '&CKEditor='.$CKEditor; } if (!empty($CKEditorFuncNum)) { - $addparm .= '&CKEditorFuncNum=' . $CKEditorFuncNum; + $addparm .= '&CKEditorFuncNum='.$CKEditorFuncNum; } if (!empty($noeditor)) { $addparm .= '&noeditor=yes'; @@ -96,10 +96,10 @@ if (!empty($noeditor)) { if ($filesize != "") if ($filesize < 0.1) { @list($ty1, $ty2) = split("\.", $filesize); - $filesize = $ty1 . "." . substr($ty2, 0, 2); + $filesize = $ty1.".".substr($ty2, 0, 2); } else { @list($ty1, $ty2) = split("\.", $filesize); - $filesize = $ty1 . "." . substr($ty2, 0, 1); + $filesize = $ty1.".".substr($ty2, 0, 1); } $filetime = filemtime("$inpath/$file"); $filetime = MyDate("Y-m-d H:i:s", $filetime); @@ -111,7 +111,7 @@ if (!empty($noeditor)) { if ($activepath == "") continue; $tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath); $line = "\n - 上级目录 + 上级目录 当前目录:$activepath \r\n"; echo $line; @@ -120,7 +120,7 @@ if (!empty($noeditor)) { if (preg_match("#^\.(.*)$#i", $file)) continue; $line = "\n - $file + $file - - diff --git a/src/dede/dialog/select_media_post.php b/src/dede/dialog/select_media_post.php index 3c3f329c..c48f4e79 100755 --- a/src/dede/dialog/select_media_post.php +++ b/src/dede/dialog/select_media_post.php @@ -9,8 +9,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -include_once(dirname(__FILE__) . '/config.php'); -$cfg_softtype = $cfg_mediatype . "|mp4"; +include_once(dirname(__FILE__).'/config.php'); +$cfg_softtype = $cfg_mediatype."|mp4"; $cfg_soft_dir = $cfg_other_medias; $bkurl = 'select_media.php'; $uploadmbtype = "多媒体文件类型"; @@ -24,4 +24,4 @@ if (empty($activepath)) { } } -require_once(dirname(__FILE__) . "/select_soft_post.php"); +require_once(dirname(__FILE__)."/select_soft_post.php"); diff --git a/src/dede/dialog/select_soft.php b/src/dede/dialog/select_soft.php index 8af04d74..e799ae6d 100644 --- a/src/dede/dialog/select_soft.php +++ b/src/dede/dialog/select_soft.php @@ -8,7 +8,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); if (empty($activepath)) { $activepath = ''; } @@ -17,8 +17,8 @@ $activepath = preg_replace("#\/{1,}#", '/', $activepath); if (strlen($activepath) < strlen($cfg_soft_dir)) { $activepath = $cfg_soft_dir; } -$inpath = $cfg_basedir . $activepath; -$activeurl = '..' . $activepath; +$inpath = $cfg_basedir.$activepath; +$activeurl = '..'.$activepath; if (empty($f)) { $f = 'form1.enclosure'; } @@ -30,10 +30,10 @@ if (empty($comeback)) { } $addparm = ''; if (!empty($CKEditor)) { - $addparm = '&CKEditor=' . $CKEditor; + $addparm = '&CKEditor='.$CKEditor; } if (!empty($CKEditorFuncNum)) { - $addparm .= '&CKEditorFuncNum=' . $CKEditorFuncNum; + $addparm .= '&CKEditorFuncNum='.$CKEditorFuncNum; } if (!empty($noeditor)) { $addparm .= '&noeditor=yes'; @@ -109,10 +109,10 @@ table{background:#fff} if ($filesize != "") if ($filesize < 0.1) { @list($ty1, $ty2) = split("\.", $filesize); - $filesize = $ty1 . "." . substr($ty2, 0, 2); + $filesize = $ty1.".".substr($ty2, 0, 2); } else { @list($ty1, $ty2) = split("\.", $filesize); - $filesize = $ty1 . "." . substr($ty2, 0, 1); + $filesize = $ty1.".".substr($ty2, 0, 1); } $filetime = filemtime("$inpath/$file"); $filetime = MyDate("Y-m-d H:i", $filetime); @@ -123,7 +123,7 @@ table{background:#fff} if ($activepath == "") continue; $tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath); $line = "\n - 上级目录 + 上级目录 当前目录:$activepath \r\n"; echo $line; @@ -131,7 +131,7 @@ table{background:#fff} if (preg_match("#^_(.*)$#i", $file)) continue; if (preg_match("#^\.(.*)$#i", $file)) continue; $line = "\n - $file + $file "; diff --git a/src/dede/dialog/select_soft_post.php b/src/dede/dialog/select_soft_post.php index 36815800..ebf9a786 100755 --- a/src/dede/dialog/select_soft_post.php +++ b/src/dede/dialog/select_soft_post.php @@ -10,7 +10,7 @@ * @link https://www.dedebiz.com */ if (!isset($cfg_basedir)) { - include_once(dirname(__FILE__) . '/config.php'); + include_once(dirname(__FILE__).'/config.php'); } if (empty($uploadfile)) $uploadfile = ''; if (empty($uploadmbtype)) $uploadmbtype = '软件类型'; @@ -31,7 +31,7 @@ $cfg_softtype = $cfg_softtype; $cfg_softtype = str_replace('||', '|', $cfg_softtype); $uploadfile_name = trim(preg_replace("#[ \r\n\t\*\%\\\/\?><\|\":]{1,}#", '', $uploadfile_name)); -if (!preg_match("#\.(" . $cfg_softtype . ")#i", $uploadfile_name)) { +if (!preg_match("#\.(".$cfg_softtype.")#i", $uploadfile_name)) { ShowMsg("你所上传的{$uploadmbtype}不在许可列表,请更改系统对扩展名限定的配置!", ""); exit(); } @@ -39,9 +39,9 @@ if (!preg_match("#\.(" . $cfg_softtype . ")#i", $uploadfile_name)) { $nowtme = time(); if ($activepath == $cfg_soft_dir) { $newdir = MyDate($cfg_addon_savetype, $nowtme); - $activepath = $activepath . '/' . $newdir; - if (!is_dir($cfg_basedir . $activepath)) { - MkdirAll($cfg_basedir . $activepath, $cfg_dir_purview); + $activepath = $activepath.'/'.$newdir; + if (!is_dir($cfg_basedir.$activepath)) { + MkdirAll($cfg_basedir.$activepath, $cfg_dir_purview); CloseFtp(); } } @@ -51,23 +51,23 @@ if (!empty($newname)) { $filename = $newname; if (!preg_match("#\.#", $filename)) $fs = explode('.', $uploadfile_name); else $fs = explode('.', $filename); - if (preg_match("#" . $cfg_not_allowall . "#", $fs[count($fs) - 1])) { + if (preg_match("#".$cfg_not_allowall."#", $fs[count($fs) - 1])) { ShowMsg("你指定的文件名被系统禁止!", 'javascript:;'); exit(); } - if (!preg_match("#\.#", $filename)) $filename = $filename . '.' . $fs[count($fs) - 1]; + if (!preg_match("#\.#", $filename)) $filename = $filename.'.'.$fs[count($fs) - 1]; } else { - $filename = $cuserLogin->getUserID() . '-' . dd2char(MyDate('ymdHis', $nowtme)); + $filename = $cuserLogin->getUserID().'-'.dd2char(MyDate('ymdHis', $nowtme)); $fs = explode('.', $uploadfile_name); - if (preg_match("#" . $cfg_not_allowall . "#", $fs[count($fs) - 1])) { + if (preg_match("#".$cfg_not_allowall."#", $fs[count($fs) - 1])) { ShowMsg("你上传了某些可能存在不安全因素的文件,系统拒绝操作!", 'javascript:;'); exit(); } - $filename = $filename . '.' . $fs[count($fs) - 1]; + $filename = $filename.'.'.$fs[count($fs) - 1]; } -$fullfilename = $cfg_basedir . $activepath . '/' . $filename; -$fullfileurl = $activepath . '/' . $filename; +$fullfilename = $cfg_basedir.$activepath.'/'.$filename; +$fullfileurl = $activepath.'/'.$filename; move_uploaded_file($uploadfile, $fullfilename) or die("上传文件到 $fullfilename 失败!"); @unlink($uploadfile); @@ -83,7 +83,7 @@ if ($uploadfile_type == 'application/x-shockwave-flash') { $inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) - VALUES ('0','$filename','$fullfileurl','$mediatype','0','0','0','{$uploadfile_size}','{$nowtme}','" . $cuserLogin->getUserID() . "'); "; + VALUES ('0','$filename','$fullfileurl','$mediatype','0','0','0','{$uploadfile_size}','{$nowtme}','".$cuserLogin->getUserID()."'); "; $dsql->ExecuteNoneQuery($inquery); $fid = $dsql->GetLastID(); @@ -99,6 +99,6 @@ if ($ck == 1) { ); echo json_encode($arr); } else { - ShowMsg("成功上传文件!", $bkurl . "?comeback=" . urlencode($filename) . "&f=$f&CKEditorFuncNum=$CKEditorFuncNum&activepath=" . urlencode($activepath) . "&d=" . time()); + ShowMsg("成功上传文件!", $bkurl."?comeback=".urlencode($filename)."&f=$f&CKEditorFuncNum=$CKEditorFuncNum&activepath=".urlencode($activepath)."&d=".time()); exit(); } diff --git a/src/dede/dialog/select_templets.php b/src/dede/dialog/select_templets.php index 71f4c1a1..8ca180e9 100644 --- a/src/dede/dialog/select_templets.php +++ b/src/dede/dialog/select_templets.php @@ -8,7 +8,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); if (empty($activepath)) { $activepath = ''; } @@ -19,8 +19,8 @@ $templetdir = $cfg_templets_dir; if (strlen($activepath) < strlen($templetdir)) { $activepath = $templetdir; } -$inpath = $cfg_basedir . $activepath; -$activeurl = '..' . $activepath; +$inpath = $cfg_basedir.$activepath; +$activeurl = '..'.$activepath; if (!is_dir($inpath)) { die('No Exsits Path'); } @@ -76,10 +76,10 @@ table{background:#fff} if ($filesize != "") if ($filesize < 0.1) { @list($ty1, $ty2) = split("\.", $filesize); - $filesize = $ty1 . "." . substr($ty2, 0, 2); + $filesize = $ty1.".".substr($ty2, 0, 2); } else { @list($ty1, $ty2) = split("\.", $filesize); - $filesize = $ty1 . "." . substr($ty2, 0, 1); + $filesize = $ty1.".".substr($ty2, 0, 1); } $filetime = filemtime("$inpath/$file"); $filetime = MyDate("Y-m-d H:i", $filetime); @@ -90,7 +90,7 @@ table{background:#fff} if ($activepath == "") continue; $tmp = preg_replace("#[\/][^\/]*$#", "", $activepath); $line = "\n - 上级目录 + 上级目录 当前目录:$activepath \r\n"; echo $line; @@ -98,7 +98,7 @@ table{background:#fff} if (preg_match("#^_(.*)$#i", $file)) continue; if (preg_match("#^\.(.*)$#i", $file)) continue; $line = "\n - $file + $file "; @@ -108,7 +108,7 @@ table{background:#fff} else $lstyle = ""; $reurl = "$activeurl/$file"; $reurl = preg_replace("#\.\.#", "", $reurl); - $reurl = preg_replace("#" . $templetdir . "\/#", "", $reurl); + $reurl = preg_replace("#".$templetdir."\/#", "", $reurl); $line = "\n $file $filesize KB @@ -120,7 +120,7 @@ table{background:#fff} else $lstyle = ""; $reurl = "$activeurl/$file"; $reurl = preg_replace("#\.\.#", "", $reurl); - $reurl = preg_replace("#" . $templetdir . "/#", "", $reurl); + $reurl = preg_replace("#".$templetdir."/#", "", $reurl); $line = "\n $file $filesize KB @@ -132,7 +132,7 @@ table{background:#fff} else $lstyle = ""; $reurl = "$activeurl/$file"; $reurl = preg_replace("#\.\.#", "", $reurl); - $reurl = preg_replace("#" . $templetdir . "\/#", "", $reurl); + $reurl = preg_replace("#".$templetdir."\/#", "", $reurl); $line = "\n $file $filesize KB @@ -144,7 +144,7 @@ table{background:#fff} else $lstyle = ""; $reurl = "$activeurl/$file"; $reurl = preg_replace("#\.\.#", "", $reurl); - $reurl = preg_replace("#" . $templetdir . "\/#", "", $reurl); + $reurl = preg_replace("#".$templetdir."\/#", "", $reurl); $line = "\n $file $filesize KB @@ -156,7 +156,7 @@ table{background:#fff} else $lstyle = ""; $reurl = "$activeurl/$file"; $reurl = preg_replace("#\.\.#", "", $reurl); - $reurl = preg_replace("#" . $templetdir . "\/#", "", $reurl); + $reurl = preg_replace("#".$templetdir."\/#", "", $reurl); $line = "\n $file $filesize KB @@ -168,7 +168,7 @@ table{background:#fff} else $lstyle = ""; $reurl = "$activeurl/$file"; $reurl = preg_replace("#\.\.#", "", $reurl); - $reurl = preg_replace("#" . $templetdir . "\/#", "", $reurl); + $reurl = preg_replace("#".$templetdir."\/#", "", $reurl); $line = "\n $file $filesize KB diff --git a/src/dede/dialog/select_templets_post.php b/src/dede/dialog/select_templets_post.php index f5287688..6cb25f58 100755 --- a/src/dede/dialog/select_templets_post.php +++ b/src/dede/dialog/select_templets_post.php @@ -10,7 +10,7 @@ * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); $cfg_txttype = "htm|html|tpl|txt"; if (empty($uploadfile)) { $uploadfile = ""; @@ -23,7 +23,7 @@ if (!preg_match("#^text#", $uploadfile_type)) { ShowMsg("你上传的不是文本类型附件!", "-1"); exit(); } -if (!preg_match("#\.(" . $cfg_txttype . ")#i", $uploadfile_name)) { +if (!preg_match("#\.(".$cfg_txttype.")#i", $uploadfile_name)) { ShowMsg("你所上传的模板文件类型不能被识别,只允许htm、html、tpl、txt扩展名!", "-1"); exit(); } @@ -32,13 +32,13 @@ if ($filename != '') { } else { $uploadfile_name = trim(preg_replace("#[ \r\n\t\*\%\\\/\?><\|\":]{1,}#", '', $uploadfile_name)); $filename = $uploadfile_name; - if ($filename == '' || !preg_match("#\.(" . $cfg_txttype . ")#i", $filename)) { + if ($filename == '' || !preg_match("#\.(".$cfg_txttype.")#i", $filename)) { ShowMsg("你所上传的文件存在问题,请检查文件类型是否适合!", "-1"); exit(); } } -$fullfilename = $cfg_basedir . $activepath . "/" . $filename; +$fullfilename = $cfg_basedir.$activepath."/".$filename; move_uploaded_file($uploadfile, $fullfilename) or die("上传文件到 $fullfilename 失败!"); @unlink($uploadfile); -ShowMsg("成功上传文件!", "select_templets.php?comeback=" . urlencode($filename) . "&f=$f&activepath=" . urlencode($activepath) . "&d=" . time()); +ShowMsg("成功上传文件!", "select_templets.php?comeback=".urlencode($filename)."&f=$f&activepath=".urlencode($activepath)."&d=".time()); exit(); diff --git a/src/dede/diy_add.php b/src/dede/diy_add.php index e1fb5ab5..71da767c 100755 --- a/src/dede/diy_add.php +++ b/src/dede/diy_add.php @@ -9,16 +9,16 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('c_New'); $mysql_version = $dsql->GetVersion(); $mysql_versions = explode(".", trim($mysql_version)); -$mysql_version = $mysql_versions[0] . "." . $mysql_versions[1]; +$mysql_version = $mysql_versions[0].".".$mysql_versions[1]; if (empty($action)) { $row = $dsql->GetOne("SELECT diyid FROM #@__diyforms ORDER BY diyid DESC LIMIT 0,1 "); if (is_array($row)) $newdiyid = $row['diyid'] + 1; else $newdiyid = 1; - include(DEDEADMIN . "/templets/diy_add.htm"); + include(DEDEADMIN."/templets/diy_add.htm"); } else { if (preg_match("#[^0-9-]#", $diyid) || empty($diyid)) { ShowMsg("'自定义表单diyid'必须为数字!", "-1"); @@ -52,7 +52,7 @@ if (empty($action)) { if ($mysql_version < 4.1) { $sql .= " PRIMARY KEY (`id`)\r\n) TYPE=MyISAM; "; } else { - $sql .= " PRIMARY KEY (`id`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=" . $cfg_db_language . "; "; + $sql .= " PRIMARY KEY (`id`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; } if ($dsql->ExecuteNoneQuery($sql)) { $query = "INSERT INTO #@__diyforms (`diyid`, `name`, `table`, `info`, `listtemplate`, `viewtemplate`, `posttemplate`, `public` ) VALUES ('$diyid', '$name', '$table', '', '$listtemplate', '$viewtemplate', '$posttemplate', '$public')"; diff --git a/src/dede/diy_edit.php b/src/dede/diy_edit.php index 2ab830b2..0dae006f 100755 --- a/src/dede/diy_edit.php +++ b/src/dede/diy_edit.php @@ -9,10 +9,10 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('c_Edit'); -require_once(DEDEINC . "/dedetag.class.php"); -require_once(DEDEINC . "/oxwindow.class.php"); +require_once(DEDEINC."/dedetag.class.php"); +require_once(DEDEINC."/oxwindow.class.php"); if (empty($dopost)) $dopost = ""; $diyid = (empty($diyid) ? 0 : intval($diyid)); @@ -45,7 +45,7 @@ function __Delete() $win->AddHidden("job", "yes"); $win->AddHidden("dopost", $dopost); $win->AddHidden("diyid", $diyid); - $win->AddTitle("!将删除所有与该自定义表单相关的文件和数据
你确实要删除 \"" . $row['name'] . "\" 这个自定义表单?"); + $win->AddTitle("!将删除所有与该自定义表单相关的文件和数据
你确实要删除 \"".$row['name']."\" 这个自定义表单?"); $winform = $win->GetWindow("ok"); $win->Display(); exit(); @@ -73,4 +73,4 @@ function __Delete() function edit() -----------------*/ $row = $dsql->GetOne("Select * From #@__diyforms where diyid='$diyid'"); -include DEDEADMIN . "/templets/diy_edit.htm"; +include DEDEADMIN."/templets/diy_edit.htm"; diff --git a/src/dede/diy_field_add.php b/src/dede/diy_field_add.php index 9dbb91de..a43a93f7 100755 --- a/src/dede/diy_field_add.php +++ b/src/dede/diy_field_add.php @@ -9,15 +9,15 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); //增加权限检查 -require_once(DEDEADMIN . '/inc/inc_admin_channel.php'); +require_once(DEDEADMIN.'/inc/inc_admin_channel.php'); if (empty($action)) $action = ''; $mysql_version = $dsql->GetVersion(); $mysql_versions = explode(".", trim($mysql_version)); -$mysql_version = $mysql_versions[0] . "." . $mysql_versions[1]; +$mysql_version = $mysql_versions[0].".".$mysql_versions[1]; /*---------------------- function Save() ---------------------*/ @@ -26,7 +26,7 @@ if ($action == 'save') { $fieldname = strtolower($fieldname); $row = $dsql->GetOne("SELECT `table`,`info` FROM #@__diyforms WHERE diyid='$diyid'"); $fieldset = $row['info']; - require_once(DEDEINC . "/dedetag.class.php"); + require_once(DEDEINC."/dedetag.class.php"); $dtp = new DedeTagParse(); $dtp->SetNameSpace("field", "<", ">"); $dtp->LoadSource($fieldset); @@ -46,7 +46,7 @@ if ($action == 'save') { if (!$rs) { $gerr = $dsql->GetError(); - ShowMsg("增加字段失败,错误提示为:" . $gerr, "javascript:;"); + ShowMsg("增加字段失败,错误提示为:".$gerr, "javascript:;"); exit(); } $ok = FALSE; @@ -61,17 +61,17 @@ if ($action == 'save') { break; } } - $oksetting = $ok ? $dtp->GetResultNP() : $fieldset . "\n" . stripslashes($fieldstring); + $oksetting = $ok ? $dtp->GetResultNP() : $fieldset."\n".stripslashes($fieldstring); } else { //原来的配置为空 - $oksetting = $fieldset . "\n" . stripslashes($fieldstring); + $oksetting = $fieldset."\n".stripslashes($fieldstring); } $addlist = GetAddFieldList($dtp, $oksetting); $oksetting = addslashes($oksetting); $rs = $dsql->ExecuteNoneQuery("Update #@__diyforms set `info`='$oksetting' where diyid='$diyid' "); if (!$rs) { $grr = $dsql->GetError(); - ShowMsg("保存节点配置出错!" . $grr, "javascript:;"); + ShowMsg("保存节点配置出错!".$grr, "javascript:;"); exit(); } ShowMsg("成功增加一个字段!", "diy_edit.php?diyid=$diyid"); @@ -91,7 +91,7 @@ $tabsql = "CREATE TABLE IF NOT EXISTS `$trueTable`( if ($mysql_version < 4.1) { $tabsql .= " PRIMARY KEY (`id`)\r\n) TYPE=MyISAM; "; } else { - $tabsql .= " PRIMARY KEY (`id`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=" . $cfg_db_language . "; "; + $tabsql .= " PRIMARY KEY (`id`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; } $dsql->ExecuteNoneQuery($tabsql); @@ -104,6 +104,6 @@ while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { } $f = ''; foreach ($fields as $k => $v) { - $f .= ($f == '' ? $k : ' ' . $k); + $f .= ($f == '' ? $k : ' '.$k); } -require_once(DEDEADMIN . "/templets/diy_field_add.htm"); +require_once(DEDEADMIN."/templets/diy_field_add.htm"); diff --git a/src/dede/diy_field_edit.php b/src/dede/diy_field_edit.php index 6782fced..03e1d9aa 100755 --- a/src/dede/diy_field_edit.php +++ b/src/dede/diy_field_edit.php @@ -9,18 +9,18 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); //增加权限检查 -require_once(DEDEINC . "/dedetag.class.php"); -require_once(DEDEADMIN . "/inc/inc_admin_channel.php"); +require_once(DEDEINC."/dedetag.class.php"); +require_once(DEDEADMIN."/inc/inc_admin_channel.php"); if (empty($action)) $action = ''; //获取模型信息 $mysql_version = $dsql->GetVersion(); $mysql_versions = explode(".", trim($mysql_version)); -$mysql_version = $mysql_versions[0] . "." . $mysql_versions[1]; +$mysql_version = $mysql_versions[0].".".$mysql_versions[1]; $row = $dsql->GetOne("SELECT `table`,`info` FROM #@__diyforms WHERE diyid='$diyid'"); $fieldset = $row['info']; $trueTable = $row['table']; @@ -32,7 +32,7 @@ foreach ($dtp->CTags as $ctag) { } //字段类型信息 -$ds = file(DEDEADMIN . "/inc/fieldtype.txt"); +$ds = file(DEDEADMIN."/inc/fieldtype.txt"); foreach ($ds as $d) { $dds = explode(',', trim($d)); $fieldtypes[$dds[0]] = $dds[1]; @@ -57,7 +57,7 @@ if ($action == 'save') { if ($mysql_version < 4.1) { $tabsql .= " PRIMARY KEY (`id`)\r\n) TYPE=MyISAM; "; } else { - $tabsql .= " PRIMARY KEY (`id`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=" . $cfg_db_language . "; "; + $tabsql .= " PRIMARY KEY (`id`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; } $dsql->ExecuteNoneQuery($tabsql); @@ -86,10 +86,10 @@ if ($action == 'save') { if (trim($fieldname) == trim(strtolower($ctag->GetName()))) { if (isset($fields[$fieldname]) && $fields[$fieldname] != $buideType) { - $tabsql = "ALTER TABLE `$trueTable` CHANGE `$fieldname` " . $ntabsql; + $tabsql = "ALTER TABLE `$trueTable` CHANGE `$fieldname` ".$ntabsql; $dsql->ExecuteNoneQuery($tabsql); } else if (!isset($fields[$fieldname])) { - $tabsql = "ALTER TABLE `$trueTable` ADD " . $ntabsql; + $tabsql = "ALTER TABLE `$trueTable` ADD ".$ntabsql; $dsql->ExecuteNoneQuery($tabsql); } else { $tabsql = ''; @@ -120,4 +120,4 @@ function _DELETE() ShowMsg("成功删除一个字段!", "diy_edit.php?diyid=$diyid"); exit(); } -require_once(DEDEADMIN . "/templets/diy_field_edit.htm"); +require_once(DEDEADMIN."/templets/diy_field_edit.htm"); diff --git a/src/dede/diy_list.php b/src/dede/diy_list.php index 7b9afe33..dfc90362 100755 --- a/src/dede/diy_list.php +++ b/src/dede/diy_list.php @@ -8,7 +8,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('c_New'); $diyid = isset($diyid) && is_numeric($diyid) ? $diyid : 0; $action = isset($action) && in_array($action, array('post', 'list', 'edit', 'check', 'delete','excel')) ? $action : ''; @@ -16,17 +16,17 @@ if (empty($diyid)) { showMsg("非法操作!", 'javascript:;'); exit(); } -require_once DEDEINC . '/diyform.cls.php'; +require_once DEDEINC.'/diyform.cls.php'; $diy = new diyform($diyid); if ($action == 'post') { if (empty($do)) { $postform = $diy->getForm('post', '', 'admin'); - include DEDEADMIN . '/templets/diy_post.htm'; + include DEDEADMIN.'/templets/diy_post.htm'; } else if ($do == 2) { $dede_fields = empty($dede_fields) ? '' : trim($dede_fields); $dede_fieldshash = empty($dede_fieldshash) ? '' : trim($dede_fieldshash); if (!empty($dede_fields)) { - if ($dede_fieldshash != md5($dede_fields . $cfg_cookie_encode)) { + if ($dede_fieldshash != md5($dede_fields.$cfg_cookie_encode)) { showMsg("数据校验不对,程序返回", '-1'); exit(); } @@ -52,8 +52,8 @@ if ($action == 'post') { } else { ${$fieldinfo[0]} = getFieldValue(${$fieldinfo[0]}, $fieldinfo[1], 0, 'add', '', 'member'); } - $addvar .= ', `' . $fieldinfo[0] . '`'; - $addvalue .= ", '" . ${$fieldinfo[0]} . "'"; + $addvar .= ', `'.$fieldinfo[0].'`'; + $addvalue .= ", '".${$fieldinfo[0]}."'"; } } } @@ -66,13 +66,13 @@ if ($action == 'post') { } } } else if ($action == 'list') { - include_once DEDEINC . '/datalistcp.class.php'; + include_once DEDEINC.'/datalistcp.class.php'; $query = "SELECT * FROM {$diy->table} ORDER BY id DESC"; $datalist = new DataListCP(); $datalist->pageSize = 10; $datalist->SetParameter('action', 'list'); $datalist->SetParameter('diyid', $diyid); - $datalist->SetTemplate(DEDEADMIN . '/templets/diy_list.htm'); + $datalist->SetTemplate(DEDEADMIN.'/templets/diy_list.htm'); $datalist->SetSource($query); $fieldlist = $diy->getFieldList(); $datalist->Display(); @@ -93,7 +93,7 @@ if ($action == 'post') { $fieldlist = $diy->getFieldList(); $c1 = $row['ifcheck'] == 1 ? 'checked' : ''; $c2 = $row['ifcheck'] == 0 ? 'checked' : ''; - include DEDEADMIN . '/templets/diy_edit_content.htm'; + include DEDEADMIN.'/templets/diy_edit_content.htm'; } else if ($do == 2) { $dede_fields = empty($dede_fields) ? '' : trim($dede_fields); $diyform = $dsql->GetOne("SELECT * FROM #@__diyforms WHERE diyid=$diyid"); @@ -121,7 +121,7 @@ if ($action == 'post') { ${$fieldinfo[0]} = GetFieldValue(${$fieldinfo[0]}, $fieldinfo[1], 0, 'add', '', 'diy', $fieldinfo[0]); ${$fieldinfo[0]} = empty(${$fieldinfo[0]}) ? $diyco[$fieldinfo[0]] : ${$fieldinfo[0]}; } - $addsql .= !empty($addsql) ? ',`' . $fieldinfo[0] . "`='" . ${$fieldinfo[0]} . "'" : '`' . $fieldinfo[0] . "`='" . ${$fieldinfo[0]} . "'"; + $addsql .= !empty($addsql) ? ',`'.$fieldinfo[0]."`='".${$fieldinfo[0]}."'" : '`'.$fieldinfo[0]."`='".${$fieldinfo[0]}."'"; } } } @@ -162,8 +162,8 @@ if ($action == 'post') { } } else if ($do = 1) { $row = $dsql->GetOne("SELECT * FROM `$diy->table` WHERE id='$id'"); - if (file_exists($cfg_basedir . $row[$name])) { - unlink($cfg_basedir . $row[$name]); + if (file_exists($cfg_basedir.$row[$name])) { + unlink($cfg_basedir.$row[$name]); $dsql->ExecuteNoneQuery("UPDATE `$diy->table` SET $name='' WHERE id='$id'"); showmsg('文件删除成功', "diy_list.php?action=list&diyid={$diy->diyid}"); } else { diff --git a/src/dede/diy_main.php b/src/dede/diy_main.php index 702315c6..08b1cc4a 100755 --- a/src/dede/diy_main.php +++ b/src/dede/diy_main.php @@ -9,14 +9,14 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('c_List'); -require_once(DEDEINC . "/datalistcp.class.php"); -require_once(DEDEINC . "/common.func.php"); +require_once(DEDEINC."/datalistcp.class.php"); +require_once(DEDEINC."/common.func.php"); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); $sql = "Select `diyid`,`name`,`table` From #@__diyforms order by diyid asc"; $dlist = new DataListCP(); -$dlist->SetTemplet(DEDEADMIN . "/templets/diy_main.htm"); +$dlist->SetTemplet(DEDEADMIN."/templets/diy_main.htm"); $dlist->SetSource($sql); $dlist->display(); $dlist->Close(); diff --git a/src/dede/erraddsave.php b/src/dede/erraddsave.php index ca984092..d6099445 100755 --- a/src/dede/erraddsave.php +++ b/src/dede/erraddsave.php @@ -9,9 +9,9 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/config.php'); -require_once(DEDEINC . '/datalistcp.class.php'); -require_once(DEDEINC . '/common.func.php'); +require_once(dirname(__FILE__).'/config.php'); +require_once(DEDEINC.'/datalistcp.class.php'); +require_once(DEDEINC.'/common.func.php'); if (empty($dopost)) $dopost = ''; if (empty($fmdo)) $fmdo = ''; @@ -77,7 +77,7 @@ if ($dopost == "delete") { ShowMsg("成功删除指定的文档!", "erraddsave.php"); exit(); } else { - require_once(DEDEINC . "/oxwindow.class.php"); + require_once(DEDEINC."/oxwindow.class.php"); $wintitle = "删除"; $wecome_info = "错误管理::删除错误"; $win = new OxWindow(); @@ -95,6 +95,6 @@ if ($dopost == "delete") { $sql = "SELECT * FROM `#@__erradd` ORDER BY id desc"; $dlist = new DataListCP(); -$dlist->SetTemplet(DEDEADMIN . "/templets/erradd.htm"); +$dlist->SetTemplet(DEDEADMIN."/templets/erradd.htm"); $dlist->SetSource($sql); $dlist->display(); diff --git a/src/dede/exit.php b/src/dede/exit.php index 68eef8c5..d707765e 100755 --- a/src/dede/exit.php +++ b/src/dede/exit.php @@ -9,8 +9,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/../include/common.inc.php'); -require_once(DEDEINC . '/userlogin.class.php'); +require_once(dirname(__FILE__).'/../include/common.inc.php'); +require_once(DEDEINC.'/userlogin.class.php'); $cuserLogin = new userLogin(); $cuserLogin->exitUser(); if (empty($needclose)) { diff --git a/src/dede/feedback_edit.php b/src/dede/feedback_edit.php index 21e5da57..ebb058fc 100755 --- a/src/dede/feedback_edit.php +++ b/src/dede/feedback_edit.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_Feedback'); $id = isset($id) && is_numeric($id) ? $id : 0; $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? "feedback_main.php" : $_COOKIE['ENV_GOBACK_URL']; @@ -24,14 +24,14 @@ if ($dopost == 'edit') { $adminmsg = str_replace(">", ">", $adminmsg); $adminmsg = str_replace(" ", "  ", $adminmsg); $adminmsg = str_replace("\r\n", "
\n", $adminmsg); - $msg = $msg . "
\n" . "管理员回复: $adminmsg\n"; + $msg = $msg."
\n"."管理员回复: $adminmsg\n"; } $query = "UPDATE `#@__feedback` SET username='$username',msg='$msg',ischeck=1 WHERE id=$id"; $dsql->ExecuteNoneQuery($query); ShowMsg("成功回复一则留言!", $ENV_GOBACK_URL); exit(); } elseif ($dopost === 'makehtml') { - require_once(DEDEADMIN . '/inc/inc_archives_functions.php'); + require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); $query = "SELECT * FROM `#@__feedback` WHERE id=$id"; $row = $dsql->GetOne($query); MakeArt($row['aid']); diff --git a/src/dede/feedback_main.php b/src/dede/feedback_main.php index ba72b2d1..0623227e 100755 --- a/src/dede/feedback_main.php +++ b/src/dede/feedback_main.php @@ -9,12 +9,12 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); //权限检查 CheckPurview('sys_Feedback'); -require_once(DEDEINC . "/datalistcp.class.php"); -require_once(DEDEINC . "/typelink.class.php"); +require_once(DEDEINC."/datalistcp.class.php"); +require_once(DEDEINC."/typelink.class.php"); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); function IsCheck($st) @@ -101,7 +101,7 @@ else { $tl = new TypeLink($typeid); $openarray = $tl->GetOptionArray($typeid, $admin_catalogs, 0); - $addsql = ($typeid != 0 ? " And typeid IN (" . GetSonIds($typeid) . ")" : ''); + $addsql = ($typeid != 0 ? " And typeid IN (".GetSonIds($typeid).")" : ''); $addsql .= ($aid != 0 ? " And aid=$aid " : ''); $addsql .= ($ip != '' ? " And ip LIKE '$ip' " : ''); @@ -117,7 +117,7 @@ else { $dlist->SetParameter('ip', $ip); $dlist->SetParameter('typeid', $typeid); $dlist->SetParameter('keyword', $keyword); - $dlist->SetTemplate(DEDEADMIN . '/templets/feedback_main.htm'); + $dlist->SetTemplate(DEDEADMIN.'/templets/feedback_main.htm'); $dlist->SetSource($querystring); $dlist->Display(); } diff --git a/src/dede/file_class.php b/src/dede/file_class.php index 087fdc95..dbbee2f9 100755 --- a/src/dede/file_class.php +++ b/src/dede/file_class.php @@ -28,12 +28,12 @@ class FileManagement //更改文件名 function RenameFile($oldname, $newname) { - $oldname = $this->baseDir . $this->activeDir . "/" . $oldname; - $newname = $this->baseDir . $this->activeDir . "/" . $newname; + $oldname = $this->baseDir.$this->activeDir."/".$oldname; + $newname = $this->baseDir.$this->activeDir."/".$newname; if (($newname != $oldname) && is_writable($oldname)) { rename($oldname, $newname); } - ShowMsg("成功更改一个文件名!", "file_manage_main.php?activepath=" . $this->activeDir); + ShowMsg("成功更改一个文件名!", "file_manage_main.php?activepath=".$this->activeDir); return 0; } @@ -41,14 +41,14 @@ class FileManagement function NewDir($dirname) { $newdir = $dirname; - $dirname = $this->baseDir . $this->activeDir . "/" . $dirname; - if (is_writable($this->baseDir . $this->activeDir)) { + $dirname = $this->baseDir.$this->activeDir."/".$dirname; + if (is_writable($this->baseDir.$this->activeDir)) { MkdirAll($dirname, $GLOBALS['cfg_dir_purview']); CloseFtp(); - ShowMsg("成功创建一个新目录!", "file_manage_main.php?activepath=" . $this->activeDir . "/" . $newdir); + ShowMsg("成功创建一个新目录!", "file_manage_main.php?activepath=".$this->activeDir."/".$newdir); return 1; } else { - ShowMsg("创建新目录失败,因为这个位置不允许写入!", "file_manage_main.php?activepath=" . $this->activeDir); + ShowMsg("创建新目录失败,因为这个位置不允许写入!", "file_manage_main.php?activepath=".$this->activeDir); return 0; } } @@ -64,20 +64,20 @@ class FileManagement function MoveFile($mfile, $mpath) { if ($mpath != "" && !preg_match("#\.\.#", $mpath)) { - $oldfile = $this->baseDir . $this->activeDir . "/$mfile"; + $oldfile = $this->baseDir.$this->activeDir."/$mfile"; $mpath = str_replace("\\", "/", $mpath); $mpath = preg_replace("#\/{1,}#", "/", $mpath); if (!preg_match("#^/#", $mpath)) { - $mpath = $this->activeDir . "/" . $mpath; + $mpath = $this->activeDir."/".$mpath; } - $truepath = $this->baseDir . $mpath; + $truepath = $this->baseDir.$mpath; if (is_readable($oldfile) && is_readable($truepath) && is_writable($truepath)) { if (is_dir($truepath)) { - copy($oldfile, $truepath . "/$mfile"); + copy($oldfile, $truepath."/$mfile"); } else { MkdirAll($truepath, $GLOBALS['cfg_dir_purview']); CloseFtp(); - copy($oldfile, $truepath . "/$mfile"); + copy($oldfile, $truepath."/$mfile"); } unlink($oldfile); ShowMsg("成功移动文件!", "file_manage_main.php?activepath=$mpath", 0, 1000); @@ -127,7 +127,7 @@ class FileManagement { $dh = dir($indir); while ($filename = $dh->read()) { - $truefile = $indir . '/' . $filename; + $truefile = $indir.'/'.$filename; if ($filename == "." || $filename == "..") { continue; } else if (is_dir($truefile)) { @@ -147,7 +147,7 @@ class FileManagement */ function DeleteFile($filename) { - $filename = $this->baseDir . $this->activeDir . "/$filename"; + $filename = $this->baseDir.$this->activeDir."/$filename"; if (is_file($filename)) { @unlink($filename); $t = "文件"; @@ -157,11 +157,11 @@ class FileManagement $this->RmDirFiles($filename); } else { // 完善用户体验,by:sumic - ShowMsg("系统禁止删除" . $t . "!", "file_manage_main.php?activepath=" . $this->activeDir); + ShowMsg("系统禁止删除".$t."!", "file_manage_main.php?activepath=".$this->activeDir); exit; } } - ShowMsg("成功删除一个" . $t . "!", "file_manage_main.php?activepath=" . $this->activeDir); + ShowMsg("成功删除一个".$t."!", "file_manage_main.php?activepath=".$this->activeDir); return 0; } } @@ -191,7 +191,7 @@ class SpaceUse if ($size > 0) { list($t1, $t2) = explode(".", $size); - $size = $t1 . "." . substr($t2, 0, 1); + $size = $t1.".".substr($t2, 0, 1); } return $size; } @@ -201,7 +201,7 @@ class SpaceUse $size = $size / 1024 / 1024; if ($size > 0) { list($t1, $t2) = explode(".", $size); - $size = $t1 . "." . substr($t2, 0, 2); + $size = $t1.".".substr($t2, 0, 2); } return $size; } diff --git a/src/dede/file_manage_control.php b/src/dede/file_manage_control.php index f7d3e259..342ff05b 100755 --- a/src/dede/file_manage_control.php +++ b/src/dede/file_manage_control.php @@ -9,15 +9,15 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require(dirname(__FILE__) . "/config.php"); +require(dirname(__FILE__)."/config.php"); CheckPurview('plus_文件管理器'); -require(DEDEINC . "/oxwindow.class.php"); -require_once(DEDEADMIN . '/file_class.php'); +require(DEDEINC."/oxwindow.class.php"); +require_once(DEDEADMIN.'/file_class.php'); $activepath = str_replace("..", "", $activepath); $activepath = preg_replace("#^\/{1,}#", "/", $activepath); if ($activepath == "/") $activepath = ""; if ($activepath == "") $inpath = $cfg_basedir; -else $inpath = $cfg_basedir . $activepath; +else $inpath = $cfg_basedir.$activepath; //文件管理器交互与逻辑控制文件 $fmm = new FileManagement(); @@ -100,16 +100,16 @@ function __upload(); ----------------*/ else if ($fmdo == "upload") { $j = 0; for ($i = 1; $i <= 50; $i++) { - $upfile = "upfile" . $i; - $upfile_name = "upfile" . $i . "_name"; + $upfile = "upfile".$i; + $upfile_name = "upfile".$i."_name"; if (!isset(${$upfile}) || !isset(${$upfile_name})) { continue; } $upfile = ${$upfile}; $upfile_name = ${$upfile_name}; if (is_uploaded_file($upfile)) { - if (!file_exists($cfg_basedir . $activepath . "/" . $upfile_name)) { - move_uploaded_file($upfile, $cfg_basedir . $activepath . "/" . $upfile_name); + if (!file_exists($cfg_basedir.$activepath."/".$upfile_name)) { + move_uploaded_file($upfile, $cfg_basedir.$activepath."/".$upfile_name); } @unlink($upfile); $j++; @@ -129,7 +129,7 @@ else if ($fmdo == "space") { $titleinfo = "目录 $ecpath 空间使用状况:
"; $wintitle = "文件管理"; $wecome_info = "文件管理::空间大小检查 [文件浏览器]"; - $activepath = $cfg_basedir . $activepath; + $activepath = $cfg_basedir.$activepath; $space = new SpaceUse; $space->checksize($activepath); $total = $space->totalsize; diff --git a/src/dede/file_manage_main.php b/src/dede/file_manage_main.php index 9b3fee98..0c30460b 100755 --- a/src/dede/file_manage_main.php +++ b/src/dede/file_manage_main.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require(dirname(__FILE__) . "/config.php"); +require(dirname(__FILE__)."/config.php"); CheckPurview('plus_文件管理器'); if (!isset($activepath)) $activepath = $cfg_cmspath; @@ -19,10 +19,10 @@ $activepath = preg_replace("#^\/{1,}#", "/", $activepath); if ($activepath == "/") $activepath = ""; if ($activepath == "") $inpath = $cfg_basedir; -else $inpath = $cfg_basedir . $activepath; +else $inpath = $cfg_basedir.$activepath; $activeurl = $activepath; -if (preg_match("#" . $cfg_templets_dir . "#i", $activepath)) { +if (preg_match("#".$cfg_templets_dir."#i", $activepath)) { $istemplets = TRUE; } else { $istemplets = FALSE; diff --git a/src/dede/file_manage_view.php b/src/dede/file_manage_view.php index 547e785f..c5c5d8f0 100755 --- a/src/dede/file_manage_view.php +++ b/src/dede/file_manage_view.php @@ -9,14 +9,14 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('plus_文件管理器'); -require_once(DEDEINC . "/oxwindow.class.php"); +require_once(DEDEINC."/oxwindow.class.php"); $activepath = str_replace("..", "", $activepath); $activepath = preg_replace("#^\/{1,}#", "/", $activepath); if ($activepath == "/") $activepath = ""; if ($activepath == "") $inpath = $cfg_basedir; -else $inpath = $cfg_basedir . $activepath; +else $inpath = $cfg_basedir.$activepath; //显示控制层 //更改文件名 @@ -80,7 +80,7 @@ else if ($fmdo == "del") { $win->AddHidden("fmdo", $fmdo); $win->AddHidden("activepath", $activepath); $win->AddHidden("filename", $filename); - if (@is_dir($cfg_basedir . $activepath . "/$filename")) { + if (@is_dir($cfg_basedir.$activepath."/$filename")) { $wmsg = "你确信要删除目录:$filename 吗?"; } else { $wmsg = "你确信要删除文件:$filename 吗?"; @@ -120,7 +120,7 @@ else if ($fmdo == "edit") { $GLOBALS['extension'] = 'text/html'; } $ctp = new DedeTagParse(); - $ctp->LoadTemplate(DEDEADMIN . "/templets/file_edit.htm"); + $ctp->LoadTemplate(DEDEADMIN."/templets/file_edit.htm"); $ctp->display(); } /*编辑文件,可视化模式 @@ -162,13 +162,13 @@ else if ($fmdo == "newfile") { $contentView = "\r\n"; $GLOBALS['token'] = make_hash(); $ctp = new DedeTagParse(); - $ctp->LoadTemplate(DEDEADMIN . "/templets/file_edit.htm"); + $ctp->LoadTemplate(DEDEADMIN."/templets/file_edit.htm"); $ctp->display(); } //上传文件 else if ($fmdo == "upload") { $ctp = new DedeTagParse(); - $ctp->LoadTemplate(DEDEADMIN . "/templets/file_upload.htm"); + $ctp->LoadTemplate(DEDEADMIN."/templets/file_upload.htm"); $ctp->display(); } diff --git a/src/dede/freelist_add.php b/src/dede/freelist_add.php index 4c899902..a5a328df 100755 --- a/src/dede/freelist_add.php +++ b/src/dede/freelist_add.php @@ -9,10 +9,10 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('c_FreeList'); if (empty($dopost)) { - require_once DEDEINC . '/typelink.class.php'; + require_once DEDEINC.'/typelink.class.php'; include DedeInclude('templets/freelist_add.htm'); exit(); } else if ($dopost == 'save') { @@ -26,10 +26,10 @@ if (empty($dopost)) { exit(); } if (is_array($types)) { - foreach ($types as $v) $ntype .= $v . ' '; + foreach ($types as $v) $ntype .= $v.' '; } - if ($ntype != '') $atts .= " type='" . trim($ntype) . "' "; + if ($ntype != '') $atts .= " type='".trim($ntype)."' "; if (!empty($typeid)) $atts .= " typeid='$typeid' "; if (!empty($channel)) $atts .= " channel='$channel' "; if (!empty($subday)) $atts .= " subday='$subday' "; diff --git a/src/dede/freelist_edit.php b/src/dede/freelist_edit.php index 7aebf9d8..f3917140 100755 --- a/src/dede/freelist_edit.php +++ b/src/dede/freelist_edit.php @@ -9,15 +9,15 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); if (empty($dopost)) { - require_once DEDEINC . '/typelink.class.php'; - require_once DEDEINC . '/dedetag.class.php'; + require_once DEDEINC.'/typelink.class.php'; + require_once DEDEINC.'/dedetag.class.php'; $aid = isset($aid) && is_numeric($aid) ? $aid : 0; $row = $dsql->GetOne("Select * From `#@__freelist` where aid='$aid' "); $dtp = new DedeTagParse(); $dtp->SetNameSpace("dede", "{", "}"); - $dtp->LoadSource("--" . $row['listtag'] . "--"); + $dtp->LoadSource("--".$row['listtag']."--"); $ctag = $dtp->GetTag('list'); include DedeInclude('templets/freelist_edit.htm'); exit(); @@ -28,10 +28,10 @@ if (empty($dopost)) { $ntype = ''; $edtime = time(); if (is_array($types)) { - foreach ($types as $v) $ntype .= $v . ' '; + foreach ($types as $v) $ntype .= $v.' '; } - if ($ntype != '') $atts .= " type='" . trim($ntype) . "' "; + if ($ntype != '') $atts .= " type='".trim($ntype)."' "; if (!empty($typeid)) $atts .= " typeid='$typeid' "; if (!empty($channel)) $atts .= " channel='$channel' "; if (!empty($subday)) $atts .= " subday='$subday' "; diff --git a/src/dede/friendlink_add.php b/src/dede/friendlink_add.php index 6277556e..49e4240c 100755 --- a/src/dede/friendlink_add.php +++ b/src/dede/friendlink_add.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require(dirname(__FILE__) . "/config.php"); +require(dirname(__FILE__)."/config.php"); CheckPurview('plus_友情链接模块'); if (empty($dopost)) $dopost = ""; @@ -17,18 +17,18 @@ if ($dopost == "add") { $dtime = time(); if (is_uploaded_file($logoimg)) { $names = split("\.", $logoimg_name); - $shortname = "." . $names[count($names) - 1]; + $shortname = ".".$names[count($names) - 1]; if (!preg_match("#(jpg|gif|png)$#", $shortname)) { $shortname = '.gif'; } - $filename = MyDate("ymdHis", time()) . mt_rand(1000, 9999) . $shortname; - $imgurl = $cfg_medias_dir . "/flink"; - if (!is_dir($cfg_basedir . $imgurl)) { - MkdirAll($cfg_basedir . $imgurl, $cfg_dir_purview); + $filename = MyDate("ymdHis", time()).mt_rand(1000, 9999).$shortname; + $imgurl = $cfg_medias_dir."/flink"; + if (!is_dir($cfg_basedir.$imgurl)) { + MkdirAll($cfg_basedir.$imgurl, $cfg_dir_purview); CloseFtp(); } - $imgurl = $imgurl . "/" . $filename; - move_uploaded_file($logoimg, $cfg_basedir . $imgurl) or die("复制文件到:" . $cfg_basedir . $imgurl . "失败"); + $imgurl = $imgurl."/".$filename; + move_uploaded_file($logoimg, $cfg_basedir.$imgurl) or die("复制文件到:".$cfg_basedir.$imgurl."失败"); @unlink($logoimg); } else { $imgurl = $logo; @@ -48,7 +48,7 @@ if ($dopost == "add") { ShowMsg("成功增加一个链接!", $burl, 0, 500); exit(); } else { - ShowMsg("增加链接时出错,请向官方反馈,原因:" . $dsql->GetError(), "javascript:;"); + ShowMsg("增加链接时出错,请向官方反馈,原因:".$dsql->GetError(), "javascript:;"); exit(); } } diff --git a/src/dede/friendlink_edit.php b/src/dede/friendlink_edit.php index ca381556..ef60b0c7 100755 --- a/src/dede/friendlink_edit.php +++ b/src/dede/friendlink_edit.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('plus_友情链接模块'); $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? 'friendlink_main.php' : $_COOKIE['ENV_GOBACK_URL']; if (empty($dopost)) $dopost = ""; @@ -40,15 +40,15 @@ if ($dopost == "delete") { exit(); } } else if ($dopost == "saveedit") { - require_once DEDEINC . '/request.class.php'; + require_once DEDEINC.'/request.class.php'; $request = new Request(); $request->Init(); $id = preg_replace("#[^0-9]#", "", $request->Item('id', 0)); $logo = $request->Item('logo', ''); $logoimg = $request->Upfile('logoimg', ''); if (!empty($logoimg)) { - $request->MoveUploadFile('logoimg', DEDEROOT . '/uploads/flink/' . $request->GetFileInfo('logoimg', 'name')); - $logo = $cfg_cmspath . '/uploads/flink/' . $request->GetFileInfo('logoimg', 'name'); + $request->MoveUploadFile('logoimg', DEDEROOT.'/uploads/flink/'.$request->GetFileInfo('logoimg', 'name')); + $logo = $cfg_cmspath.'/uploads/flink/'.$request->GetFileInfo('logoimg', 'name'); } $sortrank = $request->Item('sortrank', 1); $url = $request->Item('url', ''); diff --git a/src/dede/friendlink_main.php b/src/dede/friendlink_main.php index 8a017aba..d64974aa 100755 --- a/src/dede/friendlink_main.php +++ b/src/dede/friendlink_main.php @@ -9,8 +9,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/config.php'); -require_once(DEDEINC . '/datalistcp.class.php'); +require_once(dirname(__FILE__).'/config.php'); +require_once(DEDEINC.'/datalistcp.class.php'); setcookie('ENV_GOBACK_URL', $dedeNowurl, time() + 3600, '/'); if (empty($keyword)) $keyword = ''; @@ -29,7 +29,7 @@ $sql = "SELECT * FROM `#@__flink` WHERE CONCAT(`url`,`webname`,`email`) LIKE '% $dlist = new DataListCP(); $dlist->SetParameter('keyword', $keyword); $dlist->SetParameter('ischeck', $ischeck); -$dlist->SetTemplet(DEDEADMIN . '/templets/friendlink_main.htm'); +$dlist->SetTemplet(DEDEADMIN.'/templets/friendlink_main.htm'); $dlist->SetSource($sql); $dlist->display(); diff --git a/src/dede/friendlink_type.php b/src/dede/friendlink_type.php index 00f6a442..0aae026a 100755 --- a/src/dede/friendlink_type.php +++ b/src/dede/friendlink_type.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); if (empty($dopost)) $dopost = ''; //保存更改 @@ -18,9 +18,9 @@ if ($dopost == "save") { $endID = $idend; for (; $startID <= $endID; $startID++) { $query = ''; - $tid = ${'ID_' . $startID}; - $pname = ${'pname_' . $startID}; - if (isset(${'check_' . $startID})) { + $tid = ${'ID_'.$startID}; + $pname = ${'pname_'.$startID}; + if (isset(${'check_'.$startID})) { if ($pname != '') { $query = "UPDATE `#@__flinktype` SET typename='$pname' WHERE id='$tid' "; $dsql->ExecuteNoneQuery($query); diff --git a/src/dede/imagecut.php b/src/dede/imagecut.php index d5dba8c9..7cf0f234 100755 --- a/src/dede/imagecut.php +++ b/src/dede/imagecut.php @@ -9,19 +9,19 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/config.php'); +require_once(dirname(__FILE__).'/config.php'); $action = isset($action) ? trim($action) : ''; if (empty($action)) { - if (!@is_file($cfg_basedir . $file)) { + if (!@is_file($cfg_basedir.$file)) { ShowMsg("对不起,必须选择站内的图片才能进行裁剪!
点击'站内选择', 上传或选择一个图片,然后才能进行裁剪!", "./dialog/select_images.php?f=form1.picname&imgstick=small", 0, 10000); exit(); } - include DEDEADMIN . '/templets/imagecut.htm'; + include DEDEADMIN.'/templets/imagecut.htm'; exit(); } elseif ($action == 'cut') { - require_once(DEDEINC . '/image.func.php'); + require_once(DEDEINC.'/image.func.php'); - if (!@is_file($cfg_basedir . $file)) { + if (!@is_file($cfg_basedir.$file)) { ShowMsg('对不起,请重新选择裁剪图片!', '-1'); exit(); } @@ -33,13 +33,13 @@ if (empty($action)) { ShowMsg('对不起,请选择裁剪图片的尺寸!', '-1'); exit(); } - $imginfo = getimagesize($cfg_basedir . $file); + $imginfo = getimagesize($cfg_basedir.$file); $imgw = $imginfo[0]; $imgh = $imginfo[1]; $temp = 400 / $imgw; $newwidth = 400; $newheight = $imgh * $temp; - $srcFile = $cfg_basedir . $file; + $srcFile = $cfg_basedir.$file; $thumb = imagecreatetruecolor($newwidth, $newheight); $thumba = imagecreatetruecolor($width, $height); @@ -65,7 +65,7 @@ if (empty($action)) { $ddpicok = $reObjJs = ''; if (empty($isupload)) { - $ddpicok = preg_replace("#\." . $ddn . "$#", '-lp.' . $ddn, $file); + $ddpicok = preg_replace("#\.".$ddn."$#", '-lp.'.$ddn, $file); $reObjJs = " var backObj = window.opener.document.form1.picname; var prvObj = window.opener.document.getElementById('divpicview');\r\n"; } else { @@ -74,7 +74,7 @@ if (empty($action)) { var prvObj = window.opener.parent.document.getElementById('divpicview');\r\n"; } - $ddpicokurl = $cfg_basedir . $ddpicok; + $ddpicokurl = $cfg_basedir.$ddpicok; switch ($imginfo['mime']) { case 'image/jpeg': @@ -99,7 +99,7 @@ if (empty($action)) { //如果从其它图中剪出, 保存附件信息 if (empty($isupload)) { $inquery = "INSERT INTO `#@__uploads`(title,url,mediatype,width,height,playtime,filesize,uptime,mid) - VALUES ('$ddpicok','$ddpicok','1','0','0','0','" . filesize($ddpicokurl) . "','" . time() . "','" . $cuserLogin->getUserID() . "'); "; + VALUES ('$ddpicok','$ddpicok','1','0','0','0','".filesize($ddpicokurl)."','".time()."','".$cuserLogin->getUserID()."'); "; $dsql->ExecuteNoneQuery($inquery); $fid = $dsql->GetLastID(); AddMyAddon($fid, $ddpicok); diff --git a/src/dede/inc/inc_action_info.php b/src/dede/inc/inc_action_info.php index 2fdb35b5..b041fc9e 100755 --- a/src/dede/inc/inc_action_info.php +++ b/src/dede/inc/inc_action_info.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/../config.php"); +require_once(dirname(__FILE__)."/../config.php"); $cuserLogin = new userLogin(); //后台功能操作配置项 $actionSearch[0] = array( @@ -33,7 +33,7 @@ $actionSearch[0] = array( 'title' => '我发布的文档', 'description' => '现在登录的管理员所发表的所有内容模型中的文档', 'purview' => 'a_List,a_AccList,a_MyList', - 'linkurl' => 'content_list.php?mid=' . $cuserLogin->userID + 'linkurl' => 'content_list.php?mid='.$cuserLogin->userID ), 3 => array( 'title' => '评论管理', diff --git a/src/dede/inc/inc_archives_all.php b/src/dede/inc/inc_archives_all.php index b12e22b9..25f56689 100755 --- a/src/dede/inc/inc_archives_all.php +++ b/src/dede/inc/inc_archives_all.php @@ -69,7 +69,7 @@ function GetFormItem($ctag) } if ($ctag->GetAtt("type") == "htmltext" || $ctag->GetAtt("type") == "textdata") { $formitem = ""; - $formitem .= "\n"); while ($filename = $dh->read()) { if (!preg_match("#\.$#", $filename)) { - $fullName = $truePath . "/" . $filename; - $fileUrl = $nowPath . "/" . $filename; + $fullName = $truePath."/".$filename; + $fileUrl = $nowPath."/".$filename; if (is_dir($fullName)) { if ($col % $listSize == 0 && $col != 0) { echo ("\n\n"); for ($i = $rowdd - $listSize; $i < $rowdd; $i++) { - echo ("\n"); + echo ("\n"); } echo ("\n\n"); } @@ -60,7 +60,7 @@ function ListPic($truePath, $nowPath) "; $filelist[$rowdd] = $filename; @@ -71,7 +71,7 @@ function ListPic($truePath, $nowPath) if ($col % $listSize == 0 && $col != 0) { echo ("\n\n"); for ($i = $rowdd - $listSize; $i < $rowdd; $i++) { - echo ("\n"); + echo ("\n"); } echo ("\n\n"); } @@ -80,7 +80,7 @@ function ListPic($truePath, $nowPath)
" . $ctag->GetAtt('itemname') . ""; + $formitem .= "
".$ctag->GetAtt('itemname').""; $formitem .= GetEditor($fieldname, '', 350, 'Basic', 'string'); $formitem .= "
\r\n"; return $formitem; @@ -86,22 +86,22 @@ function GetFormItem($ctag) $formitem = str_replace("~form~", $innertext, $formitem); return $formitem; } else if ($ctag->GetAtt("type") == "img") { - $innertext = "\r\n"; + $innertext = "\r\n"; $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); $formitem = str_replace("~form~", $innertext, $formitem); return $formitem; } else if ($ctag->GetAtt("type") == "media") { - $innertext = "\r\n"; + $innertext = "\r\n"; $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); $formitem = str_replace("~form~", $innertext, $formitem); return $formitem; } else if ($ctag->GetAtt("type") == "addon") { - $innertext = "\r\n"; + $innertext = "\r\n"; $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); $formitem = str_replace("~form~", $innertext, $formitem); return $formitem; } else if ($ctag->GetAtt("type") == "media") { - $innertext = "\r\n"; + $innertext = "\r\n"; $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); $formitem = str_replace("~form~", $innertext, $formitem); return $formitem; @@ -147,28 +147,28 @@ function GetFieldValue($dvalue, $dtype, $aid = 0, $job = 'add', $addvar = '') } else if ($dtype == "textdata") { if ($job == 'edit') { $addvarDirs = explode('/', $addvar); - $addvarDir = preg_replace("#\/" . $addvarDirs[count($addvarDirs) - 1] . "$#", "", $addvar); - $mdir = $GLOBALS['cfg_basedir'] . $addvarDir; + $addvarDir = preg_replace("#\/".$addvarDirs[count($addvarDirs) - 1]."$#", "", $addvar); + $mdir = $GLOBALS['cfg_basedir'].$addvarDir; if (!is_dir($mdir)) { MkdirAll($mdir, $GLOBALS['cfg_dir_purview']); } - $fp = fopen($GLOBALS['cfg_basedir'] . $addvar, "w"); + $fp = fopen($GLOBALS['cfg_basedir'].$addvar, "w"); fwrite($fp, stripslashes($dvalue)); fclose($fp); CloseFtp(); return $addvar; } else { - $ipath = $GLOBALS['cfg_cmspath'] . "/data/textdata"; + $ipath = $GLOBALS['cfg_cmspath']."/data/textdata"; $tpath = ceil($aid / 5000); - if (!is_dir($GLOBALS['cfg_basedir'] . $ipath)) { - MkdirAll($GLOBALS['cfg_basedir'] . $ipath, $cfg_dir_purview); + if (!is_dir($GLOBALS['cfg_basedir'].$ipath)) { + MkdirAll($GLOBALS['cfg_basedir'].$ipath, $cfg_dir_purview); } - if (!is_dir($GLOBALS['cfg_basedir'] . $ipath . '/' . $tpath)) { - MkdirAll($GLOBALS['cfg_basedir'] . $ipath . '/' . $tpath, $cfg_dir_purview); + if (!is_dir($GLOBALS['cfg_basedir'].$ipath.'/'.$tpath)) { + MkdirAll($GLOBALS['cfg_basedir'].$ipath.'/'.$tpath, $cfg_dir_purview); } - $ipath = $ipath . '/' . $tpath; - $filename = "{$ipath}/{$aid}-" . cn_substr(md5($cfg_cookie_encode), 0, 16) . ".txt"; - $fp = fopen($GLOBALS['cfg_basedir'] . $filename, "w"); + $ipath = $ipath.'/'.$tpath; + $filename = "{$ipath}/{$aid}-".cn_substr(md5($cfg_cookie_encode), 0, 16).".txt"; + $fp = fopen($GLOBALS['cfg_basedir'].$filename, "w"); fwrite($fp, stripslashes($dvalue)); fclose($fp); CloseFtp(); @@ -180,24 +180,24 @@ function GetFieldValue($dvalue, $dtype, $aid = 0, $job = 'add', $addvar = '') return ""; } $iurl = trim(str_replace($GLOBALS['cfg_basehost'], "", $iurl)); - $imgurl = "{dede:img text='' width='' height=''} " . $iurl . " {/dede:img}"; + $imgurl = "{dede:img text='' width='' height=''} ".$iurl." {/dede:img}"; if (preg_match("#^http:\/\/#i", $iurl) && $GLOBALS['isUrlOpen']) { //远程图片 $reimgs = ""; if ($isUrlOpen) { $reimgs = GetRemoteImage($iurl, $GLOBALS['adminid']); if (is_array($reimgs)) { - $imgurl = "{dede:img text='' width='" . $reimgs[1] . "' height='" . $reimgs[2] . "'} " . $reimgs[0] . " {/dede:img}"; + $imgurl = "{dede:img text='' width='".$reimgs[1]."' height='".$reimgs[2]."'} ".$reimgs[0]." {/dede:img}"; } } else { - $imgurl = "{dede:img text='' width='' height=''} " . $iurl . " {/dede:img}"; + $imgurl = "{dede:img text='' width='' height=''} ".$iurl." {/dede:img}"; } } else if ($iurl != "") { //站内图片 - $imgfile = $GLOBALS['cfg_basedir'] . $iurl; + $imgfile = $GLOBALS['cfg_basedir'].$iurl; if (is_file($imgfile)) { $imginfos = GetImageSize($imgfile); - $imgurl = "{dede:img text='' width='" . $imginfos[0] . "' height='" . $imginfos[1] . "'} $iurl {/dede:img}"; + $imgurl = "{dede:img text='' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}"; } } return addslashes($imgurl); @@ -271,8 +271,8 @@ function GetFormItemValue($ctag, $fvalue) //文本数据的特殊处理 if ($ctag->GetAtt("type") == "textdata") { - if (is_file($GLOBALS['cfg_basedir'] . $fvalue)) { - $fp = fopen($GLOBALS['cfg_basedir'] . $fvalue, 'r'); + if (is_file($GLOBALS['cfg_basedir'].$fvalue)) { + $fp = fopen($GLOBALS['cfg_basedir'].$fvalue, 'r'); $okfvalue = ""; while (!feof($fp)) { $okfvalue .= fgets($fp, 1024); @@ -281,14 +281,14 @@ function GetFormItemValue($ctag, $fvalue) } else { $okfvalue = ""; } - $formitem = "\r\n"; - $formitem .= "\r\n"; + $formitem = "
" . $ctag->GetAtt('itemname') . "\r\n" . GetEditor($fieldname, $okfvalue, 350, 'Basic', 'string') . "
\r\n"; + $formitem .= "\r\n"; $formitem .= "
".$ctag->GetAtt('itemname')."\r\n".GetEditor($fieldname, $okfvalue, 350, 'Basic', 'string')."
\r\n"; $formitem .= "\r\n"; return $formitem; } else if ($ctag->GetAtt("type") == "htmltext") { - $formitem = "\r\n"; - $formitem .= "\r\n"; + $formitem = "
" . $ctag->GetAtt('itemname') . "\r\n" . GetEditor($fieldname, $fvalue, 350, 'Basic', 'string') . "
\r\n"; + $formitem .= "\r\n"; $formitem .= "
".$ctag->GetAtt('itemname')."\r\n".GetEditor($fieldname, $fvalue, 350, 'Basic', 'string')."
\r\n"; return $formitem; } else if ($ctag->GetAtt("type") == "multitext") { @@ -312,17 +312,17 @@ function GetFormItemValue($ctag, $fvalue) } $ntag = $ndtp->GetTag("img"); $fvalue = trim($ntag->GetInnerText()); - $innertext = "\r\n"; + $innertext = "\r\n"; $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); $formitem = str_replace("~form~", $innertext, $formitem); return $formitem; } else if ($ctag->GetAtt("type") == "media") { - $innertext = "\r\n"; + $innertext = "\r\n"; $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); $formitem = str_replace("~form~", $innertext, $formitem); return $formitem; } else if ($ctag->GetAtt("type") == "addon") { - $innertext = "\r\n"; + $innertext = "\r\n"; $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); $formitem = str_replace("~form~", $innertext, $formitem); return $formitem; diff --git a/src/dede/inc/inc_archives_functions.php b/src/dede/inc/inc_archives_functions.php index 06afcd42..34cb1b30 100755 --- a/src/dede/inc/inc_archives_functions.php +++ b/src/dede/inc/inc_archives_functions.php @@ -9,14 +9,14 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(DEDEINC . '/dedehttpdown.class.php'); -require_once(DEDEINC . '/image.func.php'); -require_once(DEDEINC . '/archives.func.php'); -require_once(DEDEINC . '/arc.partview.class.php'); +require_once(DEDEINC.'/dedehttpdown.class.php'); +require_once(DEDEINC.'/image.func.php'); +require_once(DEDEINC.'/archives.func.php'); +require_once(DEDEINC.'/arc.partview.class.php'); $backurl = !empty($_COOKIE['ENV_GOBACK_URL']) ? $_COOKIE['ENV_GOBACK_URL'] : ''; $backurl = preg_match("#content_#", $backurl) ? "记忆的列表页  " : ''; if (!isset($_NOT_ARCHIVES)) { - require_once(DEDEINC . '/customfields.func.php'); + require_once(DEDEINC.'/customfields.func.php'); } /** @@ -32,35 +32,35 @@ function GetCurContentAlbum($body, $rfurl, &$firstdd) { global $dsql, $cfg_multi_site, $cfg_basehost, $cfg_ddimg_width; global $cfg_basedir, $pagestyle, $cuserLogin, $cfg_addon_savetype; - require_once(DEDEINC . '/dedecollection.func.php'); + require_once(DEDEINC.'/dedecollection.func.php'); if (empty($cfg_ddimg_width)) $cfg_ddimg_width = 320; $rsimg = ''; $cfg_uploaddir = $GLOBALS['cfg_image_dir']; $cfg_basedir = $GLOBALS['cfg_basedir']; - $basehost = 'http://' . $_SERVER['HTTP_HOST']; + $basehost = 'http://'.$_SERVER['HTTP_HOST']; $img_array = array(); preg_match_all("/(src)=[\"|'| ]{0,}(http:\/\/([^>]*)\.(gif|jpg|png))/isU", $body, $img_array); $img_array = array_unique($img_array[2]); - $imgUrl = $cfg_uploaddir . '/' . MyDate($cfg_addon_savetype, time()); - $imgPath = $cfg_basedir . $imgUrl; - if (!is_dir($imgPath . '/')) { + $imgUrl = $cfg_uploaddir.'/'.MyDate($cfg_addon_savetype, time()); + $imgPath = $cfg_basedir.$imgUrl; + if (!is_dir($imgPath.'/')) { MkdirAll($imgPath, $GLOBALS['cfg_dir_purview']); CloseFtp(); } - $milliSecond = 'co' . dd2char(MyDate('ymdHis', time())); + $milliSecond = 'co'.dd2char(MyDate('ymdHis', time())); foreach ($img_array as $key => $value) { $value = trim($value); if ( - preg_match("#" . $basehost . "#i", $value) || !preg_match("#^http:\/\/#i", $value) - || ($cfg_basehost != $basehost && preg_match("#" . $cfg_basehost . "#i", $value)) + preg_match("#".$basehost."#i", $value) || !preg_match("#^http:\/\/#i", $value) + || ($cfg_basehost != $basehost && preg_match("#".$cfg_basehost."#i", $value)) ) { continue; } $itype = substr($value, -4, 4); if (!preg_match("#\.(gif|jpg|png)#", $itype)) $itype = ".jpg"; - $rndFileName = $imgPath . '/' . $milliSecond . '-' . $key . $itype; - $iurl = $imgUrl . '/' . $milliSecond . '-' . $key . $itype; + $rndFileName = $imgPath.'/'.$milliSecond.'-'.$key.$itype; + $iurl = $imgUrl.'/'.$milliSecond.'-'.$key.$itype; //下载并保存文件 $rs = DownImageKeep($value, $rfurl, $rndFileName, '', 0, 30); @@ -68,10 +68,10 @@ function GetCurContentAlbum($body, $rfurl, &$firstdd) $info = ''; $imginfos = GetImageSize($rndFileName, $info); $fsize = filesize($rndFileName); - $filename = $milliSecond . '-' . $key . $itype; + $filename = $milliSecond.'-'.$key.$itype; //保存图片附件信息 $inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) - VALUES ('0','$filename','$iurl','1','{$imginfos[0]}','$imginfos[1]','0','$fsize','" . time() . "','" . $cuserLogin->getUserID() . "'); "; + VALUES ('0','$filename','$iurl','1','{$imginfos[0]}','$imginfos[1]','0','$fsize','".time()."','".$cuserLogin->getUserID()."'); "; $dsql->ExecuteNoneQuery($inquery); $fid = $dsql->GetLastID(); AddMyAddon($fid, $iurl); @@ -82,12 +82,12 @@ function GetCurContentAlbum($body, $rfurl, &$firstdd) } if (empty($firstdd) && !empty($litpicname)) { $firstdd = $litpicname; - if (!file_exists($cfg_basedir . $firstdd)) { + if (!file_exists($cfg_basedir.$firstdd)) { $firstdd = $iurl; } } @WaterImg($rndFileName, 'down'); - $rsimg .= "{dede:img ddimg='$litpicname' text='' width='" . $imginfos[0] . "' height='" . $imginfos[1] . "'} $iurl {/dede:img}\r\n"; + $rsimg .= "{dede:img ddimg='$litpicname' text='' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; } } return $rsimg; @@ -105,23 +105,23 @@ function GetCurContent($body) global $cfg_multi_site, $cfg_basehost, $cfg_basedir, $cfg_image_dir, $arcID, $cuserLogin, $dsql; $cfg_uploaddir = $cfg_image_dir; $htd = new DedeHttpDown(); - $basehost = "http://" . $_SERVER["HTTP_HOST"]; + $basehost = "http://".$_SERVER["HTTP_HOST"]; $img_array = array(); preg_match_all("/src=[\"|'|\s]([^\"|^\'|^\s]*?)/isU", $body, $img_array); $img_array = array_unique($img_array[1]); - $imgUrl = $cfg_uploaddir . '/' . MyDate("ymd", time()); - $imgPath = $cfg_basedir . $imgUrl; - if (!is_dir($imgPath . '/')) { + $imgUrl = $cfg_uploaddir.'/'.MyDate("ymd", time()); + $imgPath = $cfg_basedir.$imgUrl; + if (!is_dir($imgPath.'/')) { MkdirAll($imgPath, $GLOBALS['cfg_dir_purview']); CloseFtp(); } $milliSecond = MyDate('His', time()); foreach ($img_array as $key => $value) { - if (preg_match("#" . $basehost . "#i", $value)) { + if (preg_match("#".$basehost."#i", $value)) { continue; } - if ($cfg_basehost != $basehost && preg_match("#" . $cfg_basehost . "#i", $value)) { + if ($cfg_basehost != $basehost && preg_match("#".$cfg_basehost."#i", $value)) { continue; } if (!preg_match("#^(http|https):\/\/#i", $value)) { @@ -140,10 +140,10 @@ function GetCurContent($body) $itype = '.jpg'; } } - $milliSecondN = dd2char($milliSecond . mt_rand(1000, 8000)); + $milliSecondN = dd2char($milliSecond.mt_rand(1000, 8000)); $value = trim($value); - $rndFileName = $imgPath . '/' . $milliSecondN . '-' . $key . $itype; - $fileurl = $imgUrl . '/' . $milliSecondN . '-' . $key . $itype; + $rndFileName = $imgPath.'/'.$milliSecondN.'-'.$key.$itype; + $fileurl = $imgUrl.'/'.$milliSecondN.'-'.$key.$itype; $rs = $htd->SaveToBin($rndFileName); if ($rs) { @@ -152,12 +152,12 @@ function GetCurContent($body) $fsize = filesize($rndFileName); //保存图片附件信息 $inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) - VALUES ('{$arcID}','$rndFileName','$fileurl','1','{$imginfos[0]}','$imginfos[1]','0','$fsize','" . time() . "','" . $cuserLogin->getUserID() . "'); "; + VALUES ('{$arcID}','$rndFileName','$fileurl','1','{$imginfos[0]}','$imginfos[1]','0','$fsize','".time()."','".$cuserLogin->getUserID()."'); "; $dsql->ExecuteNoneQuery($inquery); $fid = $dsql->GetLastID(); AddMyAddon($fid, $fileurl); if ($cfg_multi_site == 'Y') { - $fileurl = $cfg_basehost . $fileurl; + $fileurl = $cfg_basehost.$fileurl; } $body = str_replace($value, $fileurl, $body); @WaterImg($rndFileName, 'down'); @@ -187,8 +187,8 @@ function GetRemoteImage($url, $uid = 0) if (!in_array($htd->GetHead("content-type"), $sparr)) { return ''; } else { - $imgUrl = $cfg_uploaddir . '/' . MyDate($cfg_addon_savetype, time()); - $imgPath = $cfg_basedir . $imgUrl; + $imgUrl = $cfg_uploaddir.'/'.MyDate($cfg_addon_savetype, time()); + $imgPath = $cfg_basedir.$imgUrl; CreateDir($imgUrl); $itype = $htd->GetHead("content-type"); if ($itype == "image/gif") { @@ -200,9 +200,9 @@ function GetRemoteImage($url, $uid = 0) } else { $itype = '.jpg'; } - $rndname = dd2char($uid . '_' . MyDate('mdHis', time()) . mt_rand(1000, 9999)); - $rndtrueName = $imgPath . '/' . $rndname . $itype; - $fileurl = $imgUrl . '/' . $rndname . $itype; + $rndname = dd2char($uid.'_'.MyDate('mdHis', time()).mt_rand(1000, 9999)); + $rndtrueName = $imgPath.'/'.$rndname.$itype; + $fileurl = $imgUrl.'/'.$rndname.$itype; $ok = $htd->SaveToBin($rndtrueName); @WaterImg($rndtrueName, 'down'); if ($ok) { @@ -235,13 +235,13 @@ function GetRemoteFlash($url, $uid = 0) if ($htd->GetHead("content-type") != $sparr) { return ''; } else { - $imgUrl = $cfg_uploaddir . '/' . MyDate($cfg_addon_savetype, time()); - $imgPath = $cfg_basedir . $imgUrl; + $imgUrl = $cfg_uploaddir.'/'.MyDate($cfg_addon_savetype, time()); + $imgPath = $cfg_basedir.$imgUrl; CreateDir($imgUrl); $itype = '.swf'; - $milliSecond = $uid . '_' . MyDate('mdHis', time()); - $rndFileName = $imgPath . '/' . $milliSecond . $itype; - $fileurl = $imgUrl . '/' . $milliSecond . $itype; + $milliSecond = $uid.'_'.MyDate('mdHis', time()); + $rndFileName = $imgPath.'/'.$milliSecond.$itype; + $fileurl = $imgUrl.'/'.$milliSecond.$itype; $ok = $htd->SaveToBin($rndFileName); if ($ok) { $revalues = $fileurl; @@ -309,7 +309,7 @@ function SpLongBody($mybody, $spsize, $sptag) $npageBody .= $bds[$i]; continue; } - $bds[$i] = "<" . $bds[$i]; + $bds[$i] = "<".$bds[$i]; if (strlen($bds[$i]) > 6) { $tname = substr($bds[$i], 1, 5); if (strtolower($tname) == 'table') { @@ -327,7 +327,7 @@ function SpLongBody($mybody, $spsize, $sptag) $npageBody .= $bds[$i]; } if (strlen($npageBody) > $spsize) { - $mybody .= $npageBody . $sptag; + $mybody .= $npageBody.$sptag; $npageBody = ''; } } @@ -349,7 +349,7 @@ function SpLongBody($mybody, $spsize, $sptag) function MakeArt($aid, $mkindex = FALSE, $ismakesign = FALSE, $isremote = 0) { global $envs, $typeid; - require_once(DEDEINC . '/arc.archives.class.php'); + require_once(DEDEINC.'/arc.archives.class.php'); if ($ismakesign) $envs['makesign'] = 'yes'; $arc = new Archives($aid); $reurl = $arc->MakeHtml($isremote); @@ -400,25 +400,25 @@ function GetDDImage($litpic, $picname, $isremote) ShowMsg("上传的图片格式错误,请使用JPEG、GIF、PNG格式的其中一种!", "-1"); exit(); } - $savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); CreateDir($savepath); - $fullUrl = $savepath . '/' . dd2char(MyDate('mdHis', $ntime) . $cuserLogin->getUserID() . mt_rand(1000, 9999)); + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); if (strtolower($_FILES[$litpic]['type']) == "image/gif") { - $fullUrl = $fullUrl . ".gif"; + $fullUrl = $fullUrl.".gif"; } else if (strtolower($_FILES[$litpic]['type']) == "image/png") { - $fullUrl = $fullUrl . ".png"; + $fullUrl = $fullUrl.".png"; } else { - $fullUrl = $fullUrl . ".jpg"; + $fullUrl = $fullUrl.".jpg"; } - @move_uploaded_file($_FILES[$litpic]['tmp_name'], $cfg_basedir . $fullUrl); + @move_uploaded_file($_FILES[$litpic]['tmp_name'], $cfg_basedir.$fullUrl); $litpic = $fullUrl; - if ($GLOBALS['cfg_ddimg_full'] == 'Y') @ImageResizeNew($cfg_basedir . $fullUrl, $cfg_ddimg_width, $cfg_ddimg_height); - else @ImageResize($cfg_basedir . $fullUrl, $cfg_ddimg_width, $cfg_ddimg_height); + if ($GLOBALS['cfg_ddimg_full'] == 'Y') @ImageResizeNew($cfg_basedir.$fullUrl, $cfg_ddimg_width, $cfg_ddimg_height); + else @ImageResize($cfg_basedir.$fullUrl, $cfg_ddimg_width, $cfg_ddimg_height); - $img = $cfg_basedir . $litpic; + $img = $cfg_basedir.$litpic; } else { $picname = trim($picname); @@ -431,17 +431,17 @@ function GetDDImage($litpic, $picname, $isremote) } else { $litpic = $ddinfos[0]; if ($ddinfos[1] > $cfg_ddimg_width || $ddinfos[2] > $cfg_ddimg_height) { - if ($GLOBALS['cfg_ddimg_full'] == 'Y') @ImageResizeNew($cfg_basedir . $litpic, $cfg_ddimg_width, $cfg_ddimg_height); - else @ImageResize($cfg_basedir . $litpic, $cfg_ddimg_width, $cfg_ddimg_height); + if ($GLOBALS['cfg_ddimg_full'] == 'Y') @ImageResizeNew($cfg_basedir.$litpic, $cfg_ddimg_width, $cfg_ddimg_height); + else @ImageResize($cfg_basedir.$litpic, $cfg_ddimg_width, $cfg_ddimg_height); } } } else { if ($litpic == 'ddfirst' && !preg_match("#^http:\/\/#i", $picname)) { - $oldpic = $cfg_basedir . $picname; + $oldpic = $cfg_basedir.$picname; $litpic = str_replace('.', '-lp.', $picname); - if ($GLOBALS['cfg_ddimg_full'] == 'Y') @ImageResizeNew($oldpic, $cfg_ddimg_width, $cfg_ddimg_height, $cfg_basedir . $litpic); - else @ImageResize($oldpic, $cfg_ddimg_width, $cfg_ddimg_height, $cfg_basedir . $litpic); - if (!is_file($cfg_basedir . $litpic)) $litpic = ''; + if ($GLOBALS['cfg_ddimg_full'] == 'Y') @ImageResizeNew($oldpic, $cfg_ddimg_width, $cfg_ddimg_height, $cfg_basedir.$litpic); + else @ImageResize($oldpic, $cfg_ddimg_width, $cfg_ddimg_height, $cfg_basedir.$litpic); + if (!is_file($cfg_basedir.$litpic)) $litpic = ''; } else { $litpic = $picname; return $litpic; @@ -513,12 +513,12 @@ function PrintAutoFieldsAdd($fieldset, $loadtype = 'all') $loadtype != 'autofield' || ($loadtype == 'autofield' && $ctag->GetAtt('autofield') == 1) ) { - $dede_addonfields .= ($dede_addonfields == "" ? $ctag->GetName() . "," . $ctag->GetAtt('type') : ";" . $ctag->GetName() . "," . $ctag->GetAtt('type')); + $dede_addonfields .= ($dede_addonfields == "" ? $ctag->GetName().",".$ctag->GetAtt('type') : ";".$ctag->GetName().",".$ctag->GetAtt('type')); echo GetFormItemA($ctag); } } } - echo "\r\n"; + echo "\r\n"; } /** @@ -542,12 +542,12 @@ function PrintAutoFieldsEdit(&$fieldset, &$fieldValues, $loadtype = 'all') $loadtype != 'autofield' || ($loadtype == 'autofield' && $ctag->GetAtt('autofield') == 1) ) { - $dede_addonfields .= ($dede_addonfields == '' ? $ctag->GetName() . "," . $ctag->GetAtt('type') : ";" . $ctag->GetName() . "," . $ctag->GetAtt('type')); + $dede_addonfields .= ($dede_addonfields == '' ? $ctag->GetName().",".$ctag->GetAtt('type') : ";".$ctag->GetName().",".$ctag->GetAtt('type')); echo GetFormItemValueA($ctag, $fieldValues[$ctag->GetName()]); } } } - echo "\r\n"; + echo "\r\n"; } @@ -579,8 +579,8 @@ function AnalyseHtmlBody($body, &$description, &$litpic, &$keywords, $dtype = '' if ($dellink == 1) { $allow_urls = array($_SERVER['HTTP_HOST']); // 读取允许的超链接设置 - if (file_exists(DEDEDATA . "/admin/allowurl.txt")) { - $allow_urls = array_merge($allow_urls, file(DEDEDATA . "/admin/allowurl.txt")); + if (file_exists(DEDEDATA."/admin/allowurl.txt")) { + $allow_urls = array_merge($allow_urls, file(DEDEDATA."/admin/allowurl.txt")); } $body = Replace_Links($body, $allow_urls); } @@ -607,11 +607,11 @@ function AnalyseHtmlBody($body, &$description, &$litpic, &$keywords, $dtype = '' $client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); $client->appid = $cfg_bizcore_appid; $client->key = $cfg_bizcore_key; - $data = $client->Spliteword($subject . Html2Text($message)); + $data = $client->Spliteword($subject.Html2Text($message)); $keywords = $data->data; $client->Close(); } else { - include_once(DEDEINC . '/splitword.class.php'); + include_once(DEDEINC.'/splitword.class.php'); $keywords = ''; $sp = new SplitWord($cfg_soft_lang, $cfg_soft_lang); $sp->SetSource($subject, $cfg_soft_lang, $cfg_soft_lang); @@ -623,19 +623,19 @@ function AnalyseHtmlBody($body, &$description, &$litpic, &$keywords, $dtype = '' if (is_array($allindexs) && is_array($titleindexs)) { foreach ($titleindexs as $k => $v) { - if (strlen($keywords . $k) >= 60) { + if (strlen($keywords.$k) >= 60) { break; } else { if (strlen($k) <= 2) continue; - $keywords .= $k . ','; + $keywords .= $k.','; } } foreach ($allindexs as $k => $v) { - if (strlen($keywords . $k) >= 60) { + if (strlen($keywords.$k) >= 60) { break; } else if (!in_array($k, $titleindexs)) { if (strlen($k) <= 2) continue; - $keywords .= $k . ','; + $keywords .= $k.','; } } } @@ -667,7 +667,7 @@ function Replace_Links(&$body, $allow_urls = array()) $rparr = array(); $tgarr = array(); foreach ($arr[0] as $i => $v) { - if ($host_rule != '' && preg_match('#' . $host_rule . '#i', $arr[1][$i])) { + if ($host_rule != '' && preg_match('#'.$host_rule.'#i', $arr[1][$i])) { continue; } else { $rparr[] = $v; @@ -694,18 +694,18 @@ function GetImageMapDD($filename, $maxwidth) { global $cuserLogin, $dsql, $cfg_ddimg_height, $cfg_ddimg_full; $ddn = substr($filename, -3); - $ddpicok = preg_replace("#\." . $ddn . "$#", "-lp." . $ddn, $filename); - $toFile = $GLOBALS['cfg_basedir'] . $ddpicok; + $ddpicok = preg_replace("#\.".$ddn."$#", "-lp.".$ddn, $filename); + $toFile = $GLOBALS['cfg_basedir'].$ddpicok; - if ($cfg_ddimg_full == 'Y') ImageResizeNew($GLOBALS['cfg_basedir'] . $filename, $maxwidth, $cfg_ddimg_height, $toFile); - else ImageResize($GLOBALS['cfg_basedir'] . $filename, $maxwidth, $cfg_ddimg_height, $toFile); + if ($cfg_ddimg_full == 'Y') ImageResizeNew($GLOBALS['cfg_basedir'].$filename, $maxwidth, $cfg_ddimg_height, $toFile); + else ImageResize($GLOBALS['cfg_basedir'].$filename, $maxwidth, $cfg_ddimg_height, $toFile); //保存图片附件信息 $fsize = filesize($toFile); $ddpicoks = explode('/', $ddpicok); $filename = $ddpicoks[count($ddpicoks) - 1]; $inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) - VALUES ('0','$filename','$ddpicok','1','0','0','0','$fsize','" . time() . "','" . $cuserLogin->getUserID() . "'); "; + VALUES ('0','$filename','$ddpicok','1','0','0','0','$fsize','".time()."','".$cuserLogin->getUserID()."'); "; $dsql->ExecuteNoneQuery($inquery); $fid = $dsql->GetLastID(); AddMyAddon($fid, $ddpicok); @@ -744,31 +744,31 @@ function UploadOneImage($upname, $handurl = '', $isremote = 1, $ntitle = '') ShowMsg("上传的图片格式错误,请使用JPEG、GIF、PNG格式的其中一种!", "-1"); exit(); } - if (!empty($handurl) && !preg_match("#^http:\/\/#i", $handurl) && file_exists($cfg_basedir . $handurl)) { + if (!empty($handurl) && !preg_match("#^http:\/\/#i", $handurl) && file_exists($cfg_basedir.$handurl)) { if (!is_object($dsql)) { $dsql = new DedeSql(); } $dsql->ExecuteNoneQuery("DELETE FROM `#@__uploads` WHERE url LIKE '$handurl' "); $fullUrl = preg_replace("#\.([a-z]*)$#i", "", $handurl); } else { - $savepath = $cfg_image_dir . '/' . strftime("%Y-%m", $ntime); + $savepath = $cfg_image_dir.'/'.strftime("%Y-%m", $ntime); CreateDir($savepath); - $fullUrl = $savepath . '/' . strftime("%d", $ntime) . dd2char(strftime("%H%M%S", $ntime) . '0' . $cuserLogin->getUserID() . '0' . mt_rand(1000, 9999)); + $fullUrl = $savepath.'/'.strftime("%d", $ntime).dd2char(strftime("%H%M%S", $ntime).'0'.$cuserLogin->getUserID().'0'.mt_rand(1000, 9999)); } if (strtolower($_FILES[$upname]['type']) == "image/gif") { - $fullUrl = $fullUrl . ".gif"; + $fullUrl = $fullUrl.".gif"; } else if (strtolower($_FILES[$upname]['type']) == "image/png") { - $fullUrl = $fullUrl . ".png"; + $fullUrl = $fullUrl.".png"; } else { - $fullUrl = $fullUrl . ".jpg"; + $fullUrl = $fullUrl.".jpg"; } //保存 - @move_uploaded_file($_FILES[$upname]['tmp_name'], $cfg_basedir . $fullUrl); + @move_uploaded_file($_FILES[$upname]['tmp_name'], $cfg_basedir.$fullUrl); $filename = $fullUrl; //水印 - @WaterImg($cfg_basedir . $fullUrl, 'up'); + @WaterImg($cfg_basedir.$fullUrl, 'up'); $isrm_up = TRUE; } @@ -793,7 +793,7 @@ function UploadOneImage($upname, $handurl = '', $isremote = 1, $ntitle = '') $filename = $handurl; } } - $imgfile = $cfg_basedir . $filename; + $imgfile = $cfg_basedir.$filename; if (is_file($imgfile) && $isrm_up && $filename != '') { $info = ""; $imginfos = GetImageSize($imgfile, $info); @@ -801,7 +801,7 @@ function UploadOneImage($upname, $handurl = '', $isremote = 1, $ntitle = '') //把新上传的图片信息保存到媒体文档管理档案中 $inquery = " INSERT INTO `#@__uploads`(title,url,mediatype,width,height,playtime,filesize,uptime,mid) - VALUES ('$title','$filename','1','" . $imginfos[0] . "','" . $imginfos[1] . "','0','" . filesize($imgfile) . "','" . time() . "','" . $cuserLogin->getUserID() . "'); + VALUES ('$title','$filename','1','".$imginfos[0]."','".$imginfos[1]."','0','".filesize($imgfile)."','".time()."','".$cuserLogin->getUserID()."'); "; $dsql->ExecuteNoneQuery($inquery); } @@ -823,7 +823,7 @@ function GetUpdateTest() if ($cfg_makeindex == 'Y') $dolist .= empty($dolist) ? 'makeindex' : ',makeindex'; if ($cfg_make_andcat == 'Y') $dolist .= empty($dolist) ? 'makeparenttype' : ',makeparenttype'; $dolists = explode(',', $dolist); - $jumpUrl = "task_do.php?typeid={$typeid}&aid={$arcID}&dopost={$dolists[0]}&nextdo=" . preg_replace("#" . $dolists[0] . "[,]{0,1}#", '', $dolist); + $jumpUrl = "task_do.php?typeid={$typeid}&aid={$arcID}&dopost={$dolists[0]}&nextdo=".preg_replace("#".$dolists[0]."[,]{0,1}#", '', $dolist); $revalue = "\r\n"; $revalue .= "\r\n"; $revalue .= "
 正在进行相关内容更新,请完成前不要进行其它操作:\r\n
\r\n\r\n
"; diff --git a/src/dede/inc/inc_batchup.php b/src/dede/inc/inc_batchup.php index acce64da..c23a5980 100755 --- a/src/dede/inc/inc_batchup.php +++ b/src/dede/inc/inc_batchup.php @@ -96,14 +96,14 @@ function DelArc($aid, $type = 'ON', $onlyfile = FALSE, $recycle = 0) $addfile = $row['url']; $aid = $row['aid']; $dsql->ExecuteNoneQuery("Delete From `#@__uploads` where aid = '$aid' "); - $upfile = $cfg_basedir . $addfile; + $upfile = $cfg_basedir.$addfile; if (@file_exists($upfile)) @unlink($upfile); } } } } //删除文本数据 - $filenameh = DEDEDATA . "/textdata/" . (ceil($aid / 5000)) . "/{$aid}-" . substr(md5($cfg_cookie_encode), 0, 16) . ".txt"; + $filenameh = DEDEDATA."/textdata/".(ceil($aid / 5000))."/{$aid}-".substr(md5($cfg_cookie_encode), 0, 16).".txt"; if (@is_file($filenameh)) @unlink($filenameh); } @@ -132,14 +132,14 @@ function DelArc($aid, $type = 'ON', $onlyfile = FALSE, $recycle = 0) $arcRow['filename'] ); if (!preg_match("#\?#", $arcurl)) { - $htmlfile = GetTruePath() . str_replace($GLOBALS['cfg_basehost'], '', $arcurl); + $htmlfile = GetTruePath().str_replace($GLOBALS['cfg_basehost'], '', $arcurl); if (file_exists($htmlfile) && !is_dir($htmlfile)) { @unlink($htmlfile); $arcurls = explode(".", $htmlfile); $sname = $arcurls[count($arcurls) - 1]; $fname = preg_replace("#(\.$sname)$#", "", $htmlfile); for ($i = 2; $i <= 100; $i++) { - $htmlfile = $fname . "_{$i}." . $sname; + $htmlfile = $fname."_{$i}.".$sname; if (@file_exists($htmlfile)) @unlink($htmlfile); else break; } diff --git a/src/dede/inc/inc_catalog_options.php b/src/dede/inc/inc_catalog_options.php index 4b6255cf..738eb290 100755 --- a/src/dede/inc/inc_catalog_options.php +++ b/src/dede/inc/inc_catalog_options.php @@ -33,8 +33,8 @@ function GetOptionList($selid = 0, $userCatalog = 0, $channeltype = 0) //当前选中的栏目 if ($selid > 0) { $row = $dsql->GetOne("SELECT id,typename,ispart,channeltype FROM `#@__arctype` WHERE id='$selid'"); - if ($row['ispart'] == 1) $OptionArrayList .= "\r\n"; - else $OptionArrayList .= "\r\n"; + if ($row['ispart'] == 1) $OptionArrayList .= "\r\n"; + else $OptionArrayList .= "\r\n"; } //是否限定用户管理的栏目 @@ -48,9 +48,9 @@ function GetOptionList($selid = 0, $userCatalog = 0, $channeltype = 0) $topidstr = ''; while ($row = $dsql->GetObject('qq')) { if ($row->reid == 0) continue; - $topidstr .= ($topidstr == '' ? $row->reid : ',' . $row->reid); + $topidstr .= ($topidstr == '' ? $row->reid : ','.$row->reid); } - $admin_catalog .= ',' . $topidstr; + $admin_catalog .= ','.$topidstr; $admin_catalogs = explode(',', $admin_catalog); $admin_catalogs = array_unique($admin_catalogs); $admin_catalog = join(',', $admin_catalogs); @@ -68,17 +68,17 @@ function GetOptionList($selid = 0, $userCatalog = 0, $channeltype = 0) $sonCats = ''; LogicGetOptionArray($row->id, '─', $channeltype, $dsql, $sonCats); if ($sonCats != '') { - if ($row->ispart == 1) $OptionArrayList .= "\r\n"; + if ($row->ispart == 1) $OptionArrayList .= "\r\n"; else if ($row->ispart == 2) $OptionArrayList .= ''; - else if (empty($channeltype) && $row->ispart != 0) $OptionArrayList .= "\r\n"; - else $OptionArrayList .= "\r\n"; + else if (empty($channeltype) && $row->ispart != 0) $OptionArrayList .= "\r\n"; + else $OptionArrayList .= "\r\n"; $OptionArrayList .= $sonCats; } else { if ($row->ispart == 0 && (!empty($channeltype) && $row->channeltype == $channeltype)) { - $OptionArrayList .= "\r\n"; + $OptionArrayList .= "\r\n"; } else if ($row->ispart == 0 && empty($channeltype)) { // 专题 - $OptionArrayList .= "\r\n"; + $OptionArrayList .= "\r\n"; } } } @@ -88,17 +88,17 @@ function GetOptionList($selid = 0, $userCatalog = 0, $channeltype = 0) function LogicGetOptionArray($id, $step, $channeltype, &$dsql, &$sonCats) { global $OptionArrayList, $channels, $cfg_admin_channel, $admin_catalogs; - $dsql->SetQuery("Select id,typename,ispart,channeltype From `#@__arctype` where reid='" . $id . "' And ispart<>2 order by sortrank asc"); + $dsql->SetQuery("Select id,typename,ispart,channeltype From `#@__arctype` where reid='".$id."' And ispart<>2 order by sortrank asc"); $dsql->Execute($id); while ($row = $dsql->GetObject($id)) { if ($cfg_admin_channel != 'all' && !in_array($row->id, $admin_catalogs)) { continue; } if ($row->channeltype == $channeltype && $row->ispart == 1) { - $sonCats .= "\r\n"; + $sonCats .= "\r\n"; } else if (($row->channeltype == $channeltype && $row->ispart == 0) || empty($channeltype)) { - $sonCats .= "\r\n"; + $sonCats .= "\r\n"; } - LogicGetOptionArray($row->id, $step . '─', $channeltype, $dsql, $sonCats); + LogicGetOptionArray($row->id, $step.'─', $channeltype, $dsql, $sonCats); } } diff --git a/src/dede/inc/inc_coonepage.php b/src/dede/inc/inc_coonepage.php index 4493d9fe..4f50a76b 100755 --- a/src/dede/inc/inc_coonepage.php +++ b/src/dede/inc/inc_coonepage.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(DEDEINC . '/charset.func.php'); +require_once(DEDEINC.'/charset.func.php'); /** * 获取一个页面 @@ -24,7 +24,7 @@ function CoOnePage($gurl) $redatas = array('title' => '', 'body' => '', 'source' => '', 'writer' => '', 'description' => '', 'keywords' => ''); $redatas['source'] = preg_replace("/http:\/\//i", "", $gurl); $redatas['source'] = preg_replace("/\/(.*)$/i", "", $redatas['source']); - $row = $dsql->GetOne("SELECT * FROM `#@__co_onepage` WHERE url LIKE '" . $redatas['source'] . "' "); + $row = $dsql->GetOne("SELECT * FROM `#@__co_onepage` WHERE url LIKE '".$redatas['source']."' "); $s = $e = ''; if (is_array($row)) { list($s, $e) = explode('{@body}', $row['rule']); diff --git a/src/dede/inc/inc_list_functions.php b/src/dede/inc/inc_list_functions.php index f84567ad..802173d8 100755 --- a/src/dede/inc/inc_list_functions.php +++ b/src/dede/inc/inc_list_functions.php @@ -10,7 +10,7 @@ * @link https://www.dedebiz.com */ if (!isset($registerGlobals)) { - require_once(dirname(__FILE__) . "/../../include/common.inc.php"); + require_once(dirname(__FILE__)."/../../include/common.inc.php"); } // 获取栏目名称 @@ -18,8 +18,8 @@ function GetTypename($tid) { global $dsql; if (empty($tid)) return ''; - if (file_exists(DEDEDATA . '/cache/inc_catalog_base.inc')) { - require_once(DEDEDATA . '/cache/inc_catalog_base.inc'); + if (file_exists(DEDEDATA.'/cache/inc_catalog_base.inc')) { + require_once(DEDEDATA.'/cache/inc_catalog_base.inc'); global $cfg_Cs; if (isset($cfg_Cs[$tid])) { return base64_decode($cfg_Cs[$tid][3]); @@ -46,7 +46,7 @@ function IsCommendArchives($iscommend) $sn = ''; foreach ($arcatts as $k => $v) { $v = cn_substr($v, 2); - $sn .= (preg_match("#" . $k . "#", $iscommend) ? ' ' . $v : ''); + $sn .= (preg_match("#".$k."#", $iscommend) ? ' '.$v : ''); } $sn = trim($sn); if ($sn == '') return ''; diff --git a/src/dede/inc/inc_menu.php b/src/dede/inc/inc_menu.php index ff53c722..87b81cd6 100755 --- a/src/dede/inc/inc_menu.php +++ b/src/dede/inc/inc_menu.php @@ -1,5 +1,4 @@ 0) { - $admin_catalog = join(',', $admin_catalogs); - $dsql->SetQuery(" SELECT channeltype FROM `#@__arctype` WHERE id IN({$admin_catalog}) GROUP BY channeltype "); + $admin_catalog = join(',', $admin_catalogs); + $dsql->SetQuery(" SELECT channeltype FROM `#@__arctype` WHERE id IN({$admin_catalog}) GROUP BY channeltype "); } else { - $dsql->SetQuery(" SELECT channeltype FROM `#@__arctype` GROUP BY channeltype "); + $dsql->SetQuery(" SELECT channeltype FROM `#@__arctype` GROUP BY channeltype "); } $dsql->Execute(); $candoChannel = ''; while ($row = $dsql->GetObject()) { - $candoChannel .= ($candoChannel == '' ? $row->channeltype : ',' . $row->channeltype); + $candoChannel .= ($candoChannel == '' ? $row->channeltype : ','.$row->channeltype); } if (empty($candoChannel)) $candoChannel = 1; $dsql->SetQuery("SELECT id,typename,addcon,mancon FROM `#@__channeltype` WHERE id IN({$candoChannel}) AND id<>-1 AND isshow=1 ORDER BY id ASC"); $dsql->Execute('mm'); while ($row = $dsql->GetObject('mm')) { - $addset .= " \r\n"; + $addset .= "\r\n"; } -////////////////////////// -$helpUrl = DEDEBIZURL . "/help"; -$gitUrl = DEDEBIZURL . "/git"; +$helpUrl = DEDEBIZURL."/help"; +$gitUrl = DEDEBIZURL."/git"; $dedebizUrl = DEDEBIZURL; $adminMenu1 = $adminMenu2 = ''; if ($cuserLogin->getUserType() >= 10) { - $adminMenu1 = " - - - - - - -"; + $adminMenu1 = " + + + + + +"; $adminMenu2 = " - - - - - + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - "; + + + + + + + +"; } -$menusMain = " ------------------------------------------------ - - - - - - - - +$menusMain = " + + + + + + - - $addset - + $addset + - - - - + + + - $adminMenu1 - - - - - - - - - + + + + + + + + - - - + + - - - - - - - - - - + + + + + + + + + - - - - - + + + + - $adminMenu2 - - - - - - ------------------------------------------------ -"; + + + +"; \ No newline at end of file diff --git a/src/dede/inc/inc_menu_func.php b/src/dede/inc/inc_menu_func.php index 44564faa..435351da 100755 --- a/src/dede/inc/inc_menu_func.php +++ b/src/dede/inc/inc_menu_func.php @@ -9,8 +9,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/../config.php"); -require_once(DEDEINC . "/dedetag.class.php"); +require_once(dirname(__FILE__)."/../config.php"); +require_once(DEDEINC."/dedetag.class.php"); $headTemplet = "
~channelname~
@@ -38,26 +38,26 @@ function GetMenus($userrank, $topos = 'main') $m = 0; foreach ($dtp->CTags as $i => $ctag) { if ($ctag->GetName() == 'top' && ($ctag->GetAtt('rank') == '' || TestPurview($ctag->GetAtt('rank')))) { - if ($openitem != 999 && !preg_match("#" . $openitem . '_' . "#", $ctag->GetAtt('item')) && $openitem != 100) continue; + if ($openitem != 999 && !preg_match("#".$openitem.'_'."#", $ctag->GetAtt('item')) && $openitem != 100) continue; $m++; - echo "\r\n"; + echo "\r\n"; $htmp = str_replace("~channelname~", $ctag->GetAtt("name"), $headTemplet); if (empty($openitem) || $openitem == 100) { if ($ctag->GetAtt('notshowall') == '1') continue; $htmp = str_replace('~display~', $ctag->GetAtt('display'), $htmp); } else { - if ($openitem == $ctag->GetAtt('item') || preg_match("#" . $openitem . '_' . "#", $ctag->GetAtt('item')) || $openitem == '-1') + if ($openitem == $ctag->GetAtt('item') || preg_match("#".$openitem.'_'."#", $ctag->GetAtt('item')) || $openitem == '-1') $htmp = str_replace('~display~', 'block', $htmp); else $htmp = str_replace('~display~', 'none', $htmp); } - $htmp = str_replace('~cc~', $m . '_' . $openitem, $htmp); + $htmp = str_replace('~cc~', $m.'_'.$openitem, $htmp); echo $htmp; $dtp2->LoadSource($ctag->InnerText); foreach ($dtp2->CTags as $j => $ctag2) { $ischannel = trim($ctag2->GetAtt('ischannel')); if ($ctag2->GetName() == 'item' && ($ctag2->GetAtt('rank') == '' || TestPurview($ctag2->GetAtt('rank')))) { - $link = "" . $ctag2->GetAtt('name') . ""; + $link = "".$ctag2->GetAtt('name').""; if ($ischannel == '1') { if ($ctag2->GetAtt('addalt') != '') { $addalt = $ctag2->GetAtt('addalt'); @@ -75,7 +75,7 @@ function GetMenus($userrank, $topos = 'main') $link = "
$link
\r\n
- $addalt + $addalt
\r\n"; } else { @@ -86,7 +86,7 @@ function GetMenus($userrank, $topos = 'main') } } echo $footTemplet; - echo "\r\n"; + echo "\r\n"; } } } diff --git a/src/dede/inc/inc_menu_map.php b/src/dede/inc/inc_menu_map.php index 24f4112a..29c59421 100755 --- a/src/dede/inc/inc_menu_map.php +++ b/src/dede/inc/inc_menu_map.php @@ -1,5 +1,4 @@ '文档相关', 2 => '系统设置', 3 => '必须辅助功能', 4 => '网站更新操作', 5 => '会员相关', 6 => '基本模块插件'); - //载入可发布频道 $addset = ''; - //检测可用的内容模型 if ($cfg_admin_channel = 'array' && count($admin_catalogs) > 0) { - $admin_catalog = join(',', $admin_catalogs); - $dsql->SetQuery(" SELECT channeltype FROM `#@__arctype` WHERE id IN({$admin_catalog}) GROUP BY channeltype "); + $admin_catalog = join(',', $admin_catalogs); + $dsql->SetQuery(" SELECT channeltype FROM `#@__arctype` WHERE id IN({$admin_catalog}) GROUP BY channeltype "); } else { - $dsql->SetQuery(" SELECT channeltype FROM `#@__arctype` GROUP BY channeltype "); + $dsql->SetQuery(" SELECT channeltype FROM `#@__arctype` GROUP BY channeltype "); } $dsql->Execute(); $candoChannel = ''; while ($row = $dsql->GetObject()) { - $candoChannel .= ($candoChannel == '' ? $row->channeltype : ',' . $row->channeltype); + $candoChannel .= ($candoChannel == '' ? $row->channeltype : ','.$row->channeltype); } if (empty($candoChannel)) $candoChannel = 1; $dsql->SetQuery("SELECT id,typename,addcon,mancon FROM `#@__channeltype` WHERE id IN({$candoChannel}) AND id<>-1 AND isshow=1 ORDER BY id ASC"); $dsql->Execute(); while ($row = $dsql->GetObject()) { - $addset .= " \r\n"; + $addset .= "\r\n"; } -////////////////////////// -$menusMain = " ------------------------------------------------ - - - - - - - - +$menusMain = " + + + + + + - - $addset - + $addset + - - - - - - + + + + + - - - - - - - - + + + + + + + - - - + + - - - - - - - - - + + + + + + + + + - - - - + + + - - - - - + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - + + + + + + + - - - - - - - - -"; - + + + + + +"; //载入插件菜单 $plusset = ''; $dsql->SetQuery("SELECT * FROM `#@__plus` WHERE isshow=1 ORDER BY aid ASC"); $dsql->Execute(); while ($row = $dsql->GetObject()) { - $plusset .= $row->menustring . "\r\n"; + $plusset .= $row->menustring."\r\n"; } - $menusMain .= " - - - + + + - - - $plusset - -"; - + + $plusset +"; $mapstring = ''; $dtp = new DedeTagparse(); $dtp->SetNameSpace('m', '<', '>'); $dtp->LoadString($menusMain); - foreach ($maparray as $k => $bigname) { - $mapstring .= "
\r\n"; - $mapstring .= "
$bigname
\r\n"; - $mapstring .= "
\r\n"; - foreach ($dtp->CTags as $ctag) { - if ($ctag->GetAtt('mapitem') == $k) { - $mapstring .= "
\r\n"; - $mapstring .= "
" . $ctag->GetAtt('name') . "
\r\n"; - $mapstring .= "
\r\n
    \r\n"; - $dtp2 = new DedeTagParse(); - $dtp2->SetNameSpace('m', '<', '>'); - $dtp2->LoadSource($ctag->InnerText); - foreach ($dtp2->CTags as $j => $ctag2) { - $mapstring .= "
  • " . $ctag2->GetAtt('name') . "
  • \r\n"; - } - $mapstring .= "
\r\n
\r\n
\r\n"; + $mapstring .= "
\r\n"; + $mapstring .= "
$bigname
\r\n"; + $mapstring .= "
\r\n"; + foreach ($dtp->CTags as $ctag) { + if ($ctag->GetAtt('mapitem') == $k) { + $mapstring .= "
\r\n"; + $mapstring .= "
".$ctag->GetAtt('name')."
\r\n"; + $mapstring .= "
\r\n
    \r\n"; + $dtp2 = new DedeTagParse(); + $dtp2->SetNameSpace('m', '<', '>'); + $dtp2->LoadSource($ctag->InnerText); + foreach ($dtp2->CTags as $j => $ctag2) { + $mapstring .= "
  • ".$ctag2->GetAtt('name')."
  • \r\n"; + } + $mapstring .= "
\r\n
\r\n
\r\n"; + } } - } - $mapstring .= "
\r\n
\r\n"; -} + $mapstring .= "
\r\n
\r\n"; +} \ No newline at end of file diff --git a/src/dede/inc/inc_menu_module.php b/src/dede/inc/inc_menu_module.php index 37eaca14..c0adbc2c 100755 --- a/src/dede/inc/inc_menu_module.php +++ b/src/dede/inc/inc_menu_module.php @@ -1,5 +1,4 @@ @@ -20,24 +18,21 @@ require_once(dirname(__FILE__) . "/../config.php"); 这个菜单可在生成模块时指定 */ - //载入模块菜单 $moduleset = ''; $dsql->SetQuery("SELECT * FROM `#@__sys_module` ORDER BY id DESC"); $dsql->Execute('mm'); while ($row = $dsql->GetObject('mm')) { - $moduleset .= $row->menustring . "\r\n"; + $moduleset .= $row->menustring."\r\n"; } - //载入插件菜单 $plusset = ''; $dsql->SetQuery("SELECT * FROM `#@__plus` WHERE isshow=1 ORDER BY aid ASC"); $dsql->Execute(); while ($row = $dsql->GetObject()) { $row->menustring = str_replace('plus_友情链接', 'plus_友情链接模块', $row->menustring); - $plusset .= $row->menustring . "\r\n"; + $plusset .= $row->menustring."\r\n"; } - $adminMenu = ''; if ($cuserLogin->getUserType() >= 10) { $adminMenu = " @@ -46,15 +41,11 @@ if ($cuserLogin->getUserType() >= 10) { "; } - $menusMoudle = " ------------------------------------------------ $adminMenu - - $plusset + + $plusset - $moduleset ------------------------------------------------ -"; +"; \ No newline at end of file diff --git a/src/dede/index.php b/src/dede/index.php index ce605297..e06cc494 100755 --- a/src/dede/index.php +++ b/src/dede/index.php @@ -13,18 +13,18 @@ if (preg_match("#PHP (.*) Development Server#", $_SERVER['SERVER_SOFTWARE'])) { if ($_SERVER['REQUEST_URI'] == dirname($_SERVER['SCRIPT_NAME'])) { header('HTTP/1.1 301 Moved Permanently'); - header('Location:' . $_SERVER['REQUEST_URI'] . '/'); + header('Location:'.$_SERVER['REQUEST_URI'].'/'); } } -require_once(dirname(__FILE__) . "/config.php"); -require_once(DEDEINC . '/dedetag.class.php'); -$defaultIcoFile = DEDEDATA . '/admin/quickmenu.txt'; -$myIcoFile = DEDEDATA . '/admin/quickmenu-' . $cuserLogin->getUserID() . '.txt'; +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEINC.'/dedetag.class.php'); +$defaultIcoFile = DEDEDATA.'/admin/quickmenu.txt'; +$myIcoFile = DEDEDATA.'/admin/quickmenu-'.$cuserLogin->getUserID().'.txt'; if (!file_exists($myIcoFile)) $myIcoFile = $defaultIcoFile; -require(DEDEADMIN . '/inc/inc_menu_map.php'); -include(DEDEADMIN . '/templets/index2.htm'); +require(DEDEADMIN.'/inc/inc_menu_map.php'); +include(DEDEADMIN.'/templets/index2.htm'); exit(); diff --git a/src/dede/index_body.php b/src/dede/index_body.php index 740defcb..f1131ebd 100755 --- a/src/dede/index_body.php +++ b/src/dede/index_body.php @@ -9,23 +9,23 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require(dirname(__FILE__) . '/config.php'); -require(DEDEINC . '/image.func.php'); -require(DEDEINC . '/dedetag.class.php'); -$defaultIcoFile = DEDEDATA . '/admin/quickmenu.txt'; -$myIcoFile = DEDEDATA . '/admin/quickmenu-' . $cuserLogin->getUserID() . '.txt'; +require(dirname(__FILE__).'/config.php'); +require(DEDEINC.'/image.func.php'); +require(DEDEINC.'/dedetag.class.php'); +$defaultIcoFile = DEDEDATA.'/admin/quickmenu.txt'; +$myIcoFile = DEDEDATA.'/admin/quickmenu-'.$cuserLogin->getUserID().'.txt'; if (!file_exists($myIcoFile)) $myIcoFile = $defaultIcoFile; //默认主页 if (empty($dopost)) { - require(DEDEINC . '/inc/inc_fun_funAdmin.php'); - $verLockFile = DEDEDATA . '/admin/ver.txt'; + require(DEDEINC.'/inc/inc_fun_funAdmin.php'); + $verLockFile = DEDEDATA.'/admin/ver.txt'; $fp = fopen($verLockFile, 'r'); $upTime = trim(fread($fp, 64)); fclose($fp); - $oktime = substr($upTime, 0, 4) . '-' . substr($upTime, 4, 2) . '-' . substr($upTime, 6, 2); + $oktime = substr($upTime, 0, 4).'-'.substr($upTime, 4, 2).'-'.substr($upTime, 6, 2); $offUrl = SpGetNewInfo(); - $dedecmsidc = DEDEDATA . '/admin/idc.txt'; + $dedecmsidc = DEDEDATA.'/admin/idc.txt'; $fp = fopen($dedecmsidc, 'r'); $dedeIDC = fread($fp, filesize($dedecmsidc)); fclose($fp); @@ -50,12 +50,12 @@ function _AddNew() { } $ico = preg_replace("#['\"]#", '`', $ico); $oldct .= "\r\n"; - $myIcoFileTrue = DEDEDATA . '/admin/quickmenu-' . $cuserLogin->getUserID() . '.txt'; + $myIcoFileTrue = DEDEDATA.'/admin/quickmenu-'.$cuserLogin->getUserID().'.txt'; $fp = fopen($myIcoFileTrue, 'w'); fwrite($fp, $oldct); fclose($fp); - ShowMsg("成功增加一个项目!", "index_body.php?" . time()); + ShowMsg("成功增加一个项目!", "index_body.php?".time()); exit(); } /*--------------------------- @@ -64,12 +64,12 @@ function _EditSave() { } ----------------------------*/ else if ($dopost == 'editsave') { $quickmenu = stripslashes($quickmenu); - $myIcoFileTrue = DEDEDATA . '/admin/quickmenu-' . $cuserLogin->getUserID() . '.txt'; + $myIcoFileTrue = DEDEDATA.'/admin/quickmenu-'.$cuserLogin->getUserID().'.txt'; $fp = fopen($myIcoFileTrue, 'w'); fwrite($fp, $quickmenu); fclose($fp); - ShowMsg("成功修改快捷操作项目!", "index_body.php?" . time()); + ShowMsg("成功修改快捷操作项目!", "index_body.php?".time()); exit(); } /*--------------------------- @@ -79,7 +79,7 @@ function _EditSave() { } $movedata = str_replace('\\', "", $sortorder); $movedata = json_decode($movedata, TRUE); $movedata = serialize($movedata); - $myIcoFileTrue = DEDEDATA . '/admin/move-' . $cuserLogin->getUserID() . '.txt'; + $myIcoFileTrue = DEDEDATA.'/admin/move-'.$cuserLogin->getUserID().'.txt'; $fp = fopen($myIcoFileTrue, 'w'); fwrite($fp, $movedata); fclose($fp); @@ -214,7 +214,7 @@ function _getRightSide() { } } else if ($dopost == 'setskin') { $cskin = empty($cskin) ? 1 : $cskin; $skin = !in_array($cskin, array(1, 2, 3, 4)) ? 1 : $cskin; - $skinconfig = DEDEDATA . '/admin/skin.txt'; + $skinconfig = DEDEDATA.'/admin/skin.txt'; PutFile($skinconfig, $skin); } elseif ($dopost == 'get_seo') { // 直接采用DedeBIZ重写方法 diff --git a/src/dede/index_menu.php b/src/dede/index_menu.php index c7985307..e2900ba5 100755 --- a/src/dede/index_menu.php +++ b/src/dede/index_menu.php @@ -9,8 +9,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require(dirname(__FILE__) . '/config.php'); -require(DEDEADMIN . '/inc/inc_menu.php'); -require(DEDEADMIN . '/inc/inc_menu_func.php'); +require(dirname(__FILE__).'/config.php'); +require(DEDEADMIN.'/inc/inc_menu.php'); +require(DEDEADMIN.'/inc/inc_menu_func.php'); $openitem = (empty($openitem) ? 1 : $openitem); include DedeInclude('templets/index_menu2.htm'); diff --git a/src/dede/index_menu_load.php b/src/dede/index_menu_load.php index a1ced138..6f883624 100755 --- a/src/dede/index_menu_load.php +++ b/src/dede/index_menu_load.php @@ -9,17 +9,17 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/config.php'); +require_once(dirname(__FILE__).'/config.php'); AjaxHead(); if ($openitem != 100) { - require(dirname(__FILE__) . '/inc/inc_menu.php'); - require(DEDEADMIN . '/inc/inc_menu_func.php'); + require(dirname(__FILE__).'/inc/inc_menu.php'); + require(DEDEADMIN.'/inc/inc_menu_func.php'); GetMenus($cuserLogin->getUserRank(), 'main'); exit(); } else { $openitem = 0; - require(dirname(__FILE__) . '/inc/inc_menu_module.php'); - require(DEDEADMIN . '/inc/inc_menu_func.php'); + require(dirname(__FILE__).'/inc/inc_menu_module.php'); + require(DEDEADMIN.'/inc/inc_menu_func.php'); GetMenus($cuserLogin->getUserRank(), 'module'); exit(); } diff --git a/src/dede/index_menu_module.php b/src/dede/index_menu_module.php index 99b5fb1e..668245d9 100755 --- a/src/dede/index_menu_module.php +++ b/src/dede/index_menu_module.php @@ -9,14 +9,14 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require(dirname(__FILE__) . "/config.php"); +require(dirname(__FILE__)."/config.php"); if ($cuserLogin->adminStyle != 'dedecms') { header("location:index_menu.php?openitem=100"); exit(); } -require(DEDEADMIN . '/inc/inc_menu_module.php'); -require(DEDEADMIN . '/inc/inc_menu_func.php'); +require(DEDEADMIN.'/inc/inc_menu_module.php'); +require(DEDEADMIN.'/inc/inc_menu_func.php'); ?> diff --git a/src/dede/index_testenv.php b/src/dede/index_testenv.php index 291b38a2..3880fa44 100755 --- a/src/dede/index_testenv.php +++ b/src/dede/index_testenv.php @@ -1,7 +1,7 @@ '; + $testStr = '<'.chr(0x3F).'p'.chr(hexdec(68)).chr(112)."\n\r"; + $filename = md5($d).'.php'; + $testStr .= 'function test(){ echo md5(\''.$d.'\');}'."\n\rtest();\n\r"; + $testStr .= chr(0x3F).'>'; $reval = false; if (empty($rootDir)) $rootDir = DEDEROOT; if (TestWriteable($d)) { - @file_put_contents($d . '/' . $filename, $testStr); - $remoteUrl = $siteuRL . '/' . str_replace($rootDir, '', str_replace("\\", '/', realpath($d))) . '/' . $filename; + @file_put_contents($d.'/'.$filename, $testStr); + $remoteUrl = $siteuRL.'/'.str_replace($rootDir, '', str_replace("\\", '/', realpath($d))).'/'.$filename; $tempStr = @PostHost($remoteUrl); $reval = (md5($d) == trim($tempStr)) ? true : false; - unlink($d . '/' . $filename); + unlink($d.'/'.$filename); return $reval; } else { return -1; @@ -55,19 +55,19 @@ if (!function_exists('PostHost')) { } elseif (!@$parse['port']) { $parse['port'] = '80'; } - $parse['host'] = str_replace(array('http://', 'https://'), array('', 'ssl://'), "$parse[scheme]://") . $parse['host']; + $parse['host'] = str_replace(array('http://', 'https://'), array('', 'ssl://'), "$parse[scheme]://").$parse['host']; if (!$fp = @fsockopen($parse['host'], $parse['port'], $errnum, $errstr, $timeout)) { return false; } $method = strtoupper($method); $wlength = $wdata = $responseText = ''; - $parse['path'] = str_replace(array('\\', '//'), '/', @$parse['path']) . "?" . @$parse['query']; + $parse['path'] = str_replace(array('\\', '//'), '/', @$parse['path'])."?".@$parse['query']; if ($method == 'GET') { $separator = @$parse['query'] ? '&' : ''; substr($data, 0, 1) == '&' && $data = substr($data, 1); - $parse['path'] .= $separator . $data; + $parse['path'] .= $separator.$data; } elseif ($method == 'POST') { - $wlength = "Content-length: " . strlen($data) . "\r\n"; + $wlength = "Content-length: ".strlen($data)."\r\n"; $wdata = $data; } $write = "$method $parse[path] HTTP/1.0\r\nHost: $parse[host]\r\nContent-type: application/x-www-form-urlencoded\r\n{$wlength}Connection: close\r\n\r\n$wdata"; @@ -109,7 +109,7 @@ if (!function_exists('IsWritable')) { if ($isDir) { if (is_dir($pathfile)) { mt_srand((float)microtime() * 1000000); - $pathfile = $pathfile . 'dede_' . uniqid(mt_rand()) . '.tmp'; + $pathfile = $pathfile.'dede_'.uniqid(mt_rand()).'.tmp'; } elseif (@mkdir($pathfile)) { return IsWritable($pathfile); } else { @@ -132,7 +132,7 @@ $dirname = str_replace('index_body.php', '', strtolower($_SERVER['PHP_SELF'])); if (preg_match("#[\\|/]dede[\\|/]#", $dirname)) { $safeMsg[] = '默认管理目录为dede,需要立即将它更名;'; } -if (IsWritable(DEDEDATA . '/common.inc.php')) { +if (IsWritable(DEDEDATA.'/common.inc.php')) { $safeMsg[] = '强烈建议data/common.inc.php文件属性设置为644(Linux/Unix)或只读(NT);'; } $rs = TestAdminPWD(); diff --git a/src/dede/index_top.php b/src/dede/index_top.php index 82e34424..a77159d1 100755 --- a/src/dede/index_top.php +++ b/src/dede/index_top.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require(dirname(__FILE__) . "/config.php"); +require(dirname(__FILE__)."/config.php"); if ($cuserLogin->adminStyle == 'dedecms') { include DedeInclude('templets/index_top1.htm'); } else { diff --git a/src/dede/log_edit.php b/src/dede/log_edit.php index 8ad2e1ad..88d52144 100755 --- a/src/dede/log_edit.php +++ b/src/dede/log_edit.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_Log'); if (empty($dopost)) { ShowMsg("你没指定任何参数!", "javascript:;"); @@ -32,7 +32,7 @@ if ($dopost == "clear") { $dquery .= " Or lid='$id' "; } } - if ($dquery != "") $dquery = " where " . $dquery; + if ($dquery != "") $dquery = " where ".$dquery; $dsql->ExecuteNoneQuery("DELETE FROM #@__log $dquery"); ShowMsg("成功删除指定的日志!", $bkurl); exit(); diff --git a/src/dede/log_list.php b/src/dede/log_list.php index 2e77efed..9c357bc9 100755 --- a/src/dede/log_list.php +++ b/src/dede/log_list.php @@ -9,10 +9,10 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_Log'); -require_once(DEDEINC . "/datalistcp.class.php"); -require_once(DEDEINC . "/common.func.php"); +require_once(DEDEINC."/datalistcp.class.php"); +require_once(DEDEINC."/common.func.php"); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); $sql = $where = ""; @@ -41,6 +41,6 @@ $dlist->pageSize = 20; $dlist->SetParameter("adminid", $adminid); $dlist->SetParameter("cip", $cip); $dlist->SetParameter("dtime", $dtime); -$dlist->SetTemplate(DEDEADMIN . "/templets/log_list.htm"); +$dlist->SetTemplate(DEDEADMIN."/templets/log_list.htm"); $dlist->SetSource($sql); $dlist->Display(); diff --git a/src/dede/login.php b/src/dede/login.php index 9cbd3c2e..c1641f3e 100755 --- a/src/dede/login.php +++ b/src/dede/login.php @@ -8,15 +8,15 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/../include/common.inc.php'); -require_once(DEDEINC . '/userlogin.class.php'); +require_once(dirname(__FILE__).'/../include/common.inc.php'); +require_once(DEDEINC.'/userlogin.class.php'); if (empty($dopost)) $dopost = ''; if (empty($gotopage)) $gotopage = ''; $gotopage = RemoveXSS($gotopage); //检测安装目录安全性 -if (is_dir(dirname(__FILE__) . '/../install')) { - if (!file_exists(dirname(__FILE__) . '/../install/install_lock.txt')) { - $fp = fopen(dirname(__FILE__) . '/../install/install_lock.txt', 'w') or die('安装目录无写入权限,无法进行写入锁定文件,请安装完毕删除安装目录!'); +if (is_dir(dirname(__FILE__).'/../install')) { + if (!file_exists(dirname(__FILE__).'/../install/install_lock.txt')) { + $fp = fopen(dirname(__FILE__).'/../install/install_lock.txt', 'w') or die('安装目录无写入权限,无法进行写入锁定文件,请安装完毕删除安装目录!'); fwrite($fp, 'ok'); fclose($fp); } @@ -35,7 +35,7 @@ if (is_dir(dirname(__FILE__) . '/../install')) { } } //更新服务器 -require_once(DEDEDATA . '/admin/config_update.php'); +require_once(DEDEDATA.'/admin/config_update.php'); //检测后台目录是否更名 $cururl = GetCurUrl(); if (preg_match('/dede\/login/i', $cururl)) { diff --git a/src/dede/makehtml_all.php b/src/dede/makehtml_all.php index d5c8feac..49464931 100755 --- a/src/dede/makehtml_all.php +++ b/src/dede/makehtml_all.php @@ -9,12 +9,12 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -require_once(DEDEINC . "/channelunit.func.php"); +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEINC."/channelunit.func.php"); $action = (empty($action) ? '' : $action); if ($action == '') { - require_once(DEDEADMIN . "/templets/makehtml_all.htm"); + require_once(DEDEADMIN."/templets/makehtml_all.htm"); exit(); } else if ($action == 'make') { //step = 1 更新主页、step = 2 更新内容、step = 3 更新栏目 @@ -35,7 +35,7 @@ if ($action == '') { /*------------------- function _2_MakeArchives() ---------------------*/ else if ($step == 2) { - include_once(DEDEADMIN . "/makehtml_archives_action.php"); + include_once(DEDEADMIN."/makehtml_archives_action.php"); exit(); } //更新主页 @@ -43,15 +43,15 @@ if ($action == '') { function _3_MakeHomePage() -------------------*/ if ($step == 3) { - include_once(DEDEINC . "/arc.partview.class.php"); + include_once(DEDEINC."/arc.partview.class.php"); $pv = new PartView(); $row = $pv->dsql->GetOne("SELECT * FROM `#@__homepageset` "); $templet = str_replace("{style}", $cfg_df_style, $row['templet']); - $homeFile = DEDEADMIN . '/' . $row['position']; + $homeFile = DEDEADMIN.'/'.$row['position']; $homeFile = str_replace("\\", '/', $homeFile); $homeFile = preg_replace("#\/{1,}#", '/', $homeFile); if ($row['showmod'] == 1) { - $pv->SetTemplet($cfg_basedir . $cfg_templets_dir . '/' . $templet); + $pv->SetTemplet($cfg_basedir.$cfg_templets_dir.'/'.$templet); $pv->SaveToHtml($homeFile); $pv->Close(); } else { @@ -67,13 +67,13 @@ if ($action == '') { $mkvalue = intval($mkvalue); $typeidsok = $typeids = array(); $adminID = $cuserLogin->getUserID(); - $mkcachefile = DEDEDATA . "/mkall_cache_{$adminID}.php"; + $mkcachefile = DEDEDATA."/mkall_cache_{$adminID}.php"; if ($uptype == 'all' || empty($mkvalue)) { ShowMsg("不需要进行初处理,现更新所有栏目!", "makehtml_list_action.php?gotype=mkallct"); exit(); } else { if ($uptype == 'time') { - $query = "SELECT DISTINCT typeid From `#@__arctiny` WHERE senddate >=" . GetMkTime($mkvalue) . " AND arcrank>-1"; + $query = "SELECT DISTINCT typeid From `#@__arctiny` WHERE senddate >=".GetMkTime($mkvalue)." AND arcrank>-1"; } else { $query = "SELECT DISTINCT typeid From `#@__arctiny` WHERE id>=$mkvalue AND arcrank>-1"; } @@ -98,7 +98,7 @@ if ($action == '') { } $fp = fopen($mkcachefile, 'w') or die("无法写入缓存文件:{$mkcachefile} 所以无法更新栏目!"); if (count($typeidsok) > 0) { - fwrite($fp, "<" . "?php\r\n"); + fwrite($fp, "<"."?php\r\n"); $i = -1; foreach ($typeidsok as $k => $t) { if ($k != '') { @@ -106,7 +106,7 @@ if ($action == '') { fwrite($fp, "\$idArray[$i]={$k};\r\n"); } } - fwrite($fp, "?" . ">"); + fwrite($fp, "?".">"); fclose($fp); ShowMsg("完成栏目缓存处理,现转向更新栏目!", "makehtml_list_action.php?gotype=mkall"); exit(); @@ -121,7 +121,7 @@ if ($action == '') { function _10_MakeAllOK() --------------------*/ else if ($step == 10) { $adminID = $cuserLogin->getUserID(); - $mkcachefile = DEDEDATA . "/mkall_cache_{$adminID}.php"; + $mkcachefile = DEDEDATA."/mkall_cache_{$adminID}.php"; @unlink($mkcachefile); OptimizeData($dsql); ShowMsg("完成所有文件的更新!", "javascript:;"); diff --git a/src/dede/makehtml_archives.php b/src/dede/makehtml_archives.php index 0b9a4ec8..eeafe9e8 100755 --- a/src/dede/makehtml_archives.php +++ b/src/dede/makehtml_archives.php @@ -9,6 +9,6 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -require_once(DEDEINC . "/typelink.class.php"); +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEINC."/typelink.class.php"); include DedeInclude('templets/makehtml_archives.htm'); diff --git a/src/dede/makehtml_archives_action.php b/src/dede/makehtml_archives_action.php index f4e774f5..b2a19eb2 100755 --- a/src/dede/makehtml_archives_action.php +++ b/src/dede/makehtml_archives_action.php @@ -9,9 +9,9 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_MakeHtml'); -require_once(DEDEINC . "/arc.archives.class.php"); +require_once(DEDEINC."/arc.archives.class.php"); $est1 = ExecTime(); $startid = (empty($startid) ? -1 : $startid); @@ -66,7 +66,7 @@ if ($totalnum == 0) { if ($totalnum > $startdd + $pagesize) { $limitSql = " LIMIT $startdd,$pagesize"; } else { - $limitSql = " LIMIT $startdd," . ($totalnum - $startdd); + $limitSql = " LIMIT $startdd,".($totalnum - $startdd); } $tjnum = $startdd; @@ -95,7 +95,7 @@ $ttime = number_format(($ttime / 60), 2); $tjlen = $totalnum > 0 ? ceil(($tjnum / $totalnum) * 100) : 100; $dvlen = $tjlen * 2; $tjsta = "
"; -$tjsta .= "
本次用时:" . number_format($t2, 2) . ",总用时:$ttime 分钟,到达位置:" . ($startdd + $pagesize) . "
完成创建文件总数的:$tjlen %,继续执行任务..."; +$tjsta .= "
本次用时:".number_format($t2, 2).",总用时:$ttime 分钟,到达位置:".($startdd + $pagesize)."
完成创建文件总数的:$tjlen %,继续执行任务..."; //速度测试 @@ -109,8 +109,8 @@ if($startdd > 1000) if ($tjnum < $totalnum) { $nurl = "makehtml_archives_action.php?endid=$endid&startid=$startid&typeid=$typeid"; - $nurl .= "&totalnum=$totalnum&startdd=" . ($startdd + $pagesize) . "&pagesize=$pagesize"; - $nurl .= "&seltime=$seltime&sstime=$sstime&stime=" . urlencode($stime) . "&etime=" . urlencode($etime) . "&uptype=$uptype&mkvalue=$mkvalue"; + $nurl .= "&totalnum=$totalnum&startdd=".($startdd + $pagesize)."&pagesize=$pagesize"; + $nurl .= "&seltime=$seltime&sstime=$sstime&stime=".urlencode($stime)."&etime=".urlencode($etime)."&uptype=$uptype&mkvalue=$mkvalue"; ShowMsg($tjsta, $nurl, 0, 100); exit(); } else { diff --git a/src/dede/makehtml_freelist.php b/src/dede/makehtml_freelist.php index ab41d448..58670560 100755 --- a/src/dede/makehtml_freelist.php +++ b/src/dede/makehtml_freelist.php @@ -9,5 +9,5 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -require_once(DEDEADMIN . "/templets/makehtml_freelist.htm"); +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEADMIN."/templets/makehtml_freelist.htm"); diff --git a/src/dede/makehtml_freelist_action.php b/src/dede/makehtml_freelist_action.php index 752c2a07..1c737b85 100755 --- a/src/dede/makehtml_freelist_action.php +++ b/src/dede/makehtml_freelist_action.php @@ -9,9 +9,9 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_MakeHtml'); -require_once(DEDEINC . "/arc.freelist.class.php"); +require_once(DEDEINC."/arc.freelist.class.php"); if (empty($startid)) $startid = 0; $ci = " aid >= $startid "; if (!empty($endid) && $endid >= $startid) { @@ -56,10 +56,10 @@ if ($nextpage == $totalpage) { } else { if ($finishType) { $gourl = "makehtml_freelist_action.php?maxpagesize=$maxpagesize&startid=$startid&endid=$endid&pageno=$nextpage"; - ShowMsg("成功创建列表:" . $tid . ",继续进行操作!", $gourl, 0, 100); + ShowMsg("成功创建列表:".$tid.",继续进行操作!", $gourl, 0, 100); } else { $gourl = "makehtml_freelist_action.php?mkpage=$mkpage&maxpagesize=$maxpagesize&startid=$startid&endid=$endid&pageno=$pageno"; - ShowMsg("列表:" . $tid . ",继续进行操作...", $gourl, 0, 100); + ShowMsg("列表:".$tid.",继续进行操作...", $gourl, 0, 100); } } $dsql->ExecuteNoneQuery("Update `#@__freelist` set nodefault='1' where aid='$startid';"); diff --git a/src/dede/makehtml_homepage.php b/src/dede/makehtml_homepage.php index 82d88d5e..501c8ffc 100755 --- a/src/dede/makehtml_homepage.php +++ b/src/dede/makehtml_homepage.php @@ -9,15 +9,15 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_MakeHtml'); -require_once(DEDEINC . "/arc.partview.class.php"); +require_once(DEDEINC."/arc.partview.class.php"); if (empty($dopost)) $dopost = ''; if ($dopost == "view") { $pv = new PartView(); $templet = str_replace("{style}", $cfg_df_style, $templet); - $pv->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $templet); + $pv->SetTemplet($cfg_basedir.$cfg_templets_dir."/".$templet); $pv->Display(); exit(); } else if ($dopost == "make") { @@ -63,7 +63,7 @@ if ($dopost == "view") { } $remotepos = empty($remotepos) ? '/index.html' : $remotepos; $serviterm = empty($serviterm) ? "" : $serviterm; - $homeFile = DEDEADMIN . "/" . $position; + $homeFile = DEDEADMIN."/".$position; $homeFile = str_replace("\\", "/", $homeFile); $homeFile = str_replace("//", "/", $homeFile); $fp = fopen($homeFile, "w") or die("你指定的文件名有问题,无法创建文件"); @@ -78,10 +78,10 @@ if ($dopost == "view") { $templet = str_replace("{style}", $cfg_df_style, $templet); $pv = new PartView(); $GLOBALS['_arclistEnv'] = 'index'; - $pv->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $templet); + $pv->SetTemplet($cfg_basedir.$cfg_templets_dir."/".$templet); $pv->SaveToHtml($homeFile); echo ""; - echo "
成功更新主页HTML:" . $homeFile . "
浏览...

"; + echo "
成功更新主页HTML:".$homeFile."
浏览...

"; } else { // 动态浏览 if (file_exists($homeFile)) @unlink($homeFile); diff --git a/src/dede/makehtml_js.php b/src/dede/makehtml_js.php index 50c6f0f5..70c33db1 100755 --- a/src/dede/makehtml_js.php +++ b/src/dede/makehtml_js.php @@ -9,6 +9,6 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -require_once(DEDEINC . "/typelink.class.php"); +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEINC."/typelink.class.php"); include DedeInclude('templets/makehtml_js.htm'); diff --git a/src/dede/makehtml_js_action.php b/src/dede/makehtml_js_action.php index 7756dd65..2dcf22d8 100755 --- a/src/dede/makehtml_js_action.php +++ b/src/dede/makehtml_js_action.php @@ -9,9 +9,9 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_MakeHtml'); -require_once(DEDEINC . "/arc.partview.class.php"); +require_once(DEDEINC."/arc.partview.class.php"); if (empty($typeid)) $typeid = 0; if (empty($templet)) $templet = "plus/js.htm"; @@ -25,20 +25,20 @@ if ($uptype == "all") { exit(); } else { $pv = new PartView($row['id']); - $pv->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $templet); - $pv->SaveToHtml($cfg_basedir . $cfg_cmspath . "/data/js/" . $row['id'] . ".js", 0); + $pv->SetTemplet($cfg_basedir.$cfg_templets_dir."/".$templet); + $pv->SaveToHtml($cfg_basedir.$cfg_cmspath."/data/js/".$row['id'].".js", 0); $typeid = $row['id'];; - ShowMsg("成功更新" . $cfg_cmspath . "/data/js/" . $row['id'] . ".js,继续进行操作!", "makehtml_js_action.php?typeid=$typeid", 0, 100); + ShowMsg("成功更新".$cfg_cmspath."/data/js/".$row['id'].".js,继续进行操作!", "makehtml_js_action.php?typeid=$typeid", 0, 100); exit(); } } else { $pv = new PartView($typeid); - $pv->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $templet); - $pv->SaveToHtml($cfg_basedir . $cfg_cmspath . "/data/js/" . $typeid . ".js", 0); + $pv->SetTemplet($cfg_basedir.$cfg_templets_dir."/".$templet); + $pv->SaveToHtml($cfg_basedir.$cfg_cmspath."/data/js/".$typeid.".js", 0); echo ""; - echo "
成功更新" . $cfg_cmspath . "/data/js/" . $typeid . ".js!"; + echo "
成功更新".$cfg_cmspath."/data/js/".$typeid.".js!"; echo "预览:
"; echo "
"; - echo ""; + echo ""; exit(); } diff --git a/src/dede/makehtml_list.php b/src/dede/makehtml_list.php index 89b1b3bc..abc661c7 100755 --- a/src/dede/makehtml_list.php +++ b/src/dede/makehtml_list.php @@ -9,6 +9,6 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -require_once(DEDEINC . "/typelink.class.php"); +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEINC."/typelink.class.php"); include DedeInclude('templets/makehtml_list.htm'); diff --git a/src/dede/makehtml_list_action.php b/src/dede/makehtml_list_action.php index 388ecfbd..81095eca 100755 --- a/src/dede/makehtml_list_action.php +++ b/src/dede/makehtml_list_action.php @@ -9,10 +9,10 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_MakeHtml'); -require_once(DEDEDATA . "/cache/inc_catalog_base.inc"); -require_once(DEDEINC . "/channelunit.func.php"); +require_once(DEDEDATA."/cache/inc_catalog_base.inc"); +require_once(DEDEINC."/channelunit.func.php"); if (!isset($upnext)) $upnext = 1; if (empty($gotype)) $gotype = ''; @@ -41,7 +41,7 @@ if ($gotype == '' || $gotype == 'mkallct') { //一键更新带缓存的情况 else if ($gotype == 'mkall') { $uppage = 1; - $mkcachefile = DEDEDATA . "/mkall_cache_{$adminID}.php"; + $mkcachefile = DEDEDATA."/mkall_cache_{$adminID}.php"; $idArray = array(); if (file_exists($mkcachefile)) require_once($mkcachefile); } @@ -74,11 +74,11 @@ if (!empty($tid)) { exit(); } if ($cfg_Cs[$tid][1] > 0) { - require_once(DEDEINC . "/arc.listview.class.php"); + require_once(DEDEINC."/arc.listview.class.php"); $lv = new ListView($tid); $position = MfTypedir($lv->Fields['typedir']); } else { - require_once(DEDEINC . "/arc.sglistview.class.php"); + require_once(DEDEINC."/arc.sglistview.class.php"); $lv = new SgListView($tid); } // 这里统一统计 @@ -101,7 +101,7 @@ $nextpage = $pageno + 1; if ($nextpage >= $totalpage && $finishType) { if ($gotype == '') { if (empty($reurl)) { - $reurl = '../plus/list.php?tid=' . $tid; + $reurl = '../plus/list.php?tid='.$tid; } ShowMsg("完成所有栏目列表更新!浏览栏目", "javascript:;"); exit(); @@ -112,11 +112,11 @@ if ($nextpage >= $totalpage && $finishType) { } else { if ($finishType) { $gourl = "makehtml_list_action.php?gotype={$gotype}&uppage=$uppage&maxpagesize=$maxpagesize&typeid=$typeid&pageno=$nextpage"; - ShowMsg("成功创建栏目:" . $tid . ",继续进行操作!", $gourl, 0, 100); + ShowMsg("成功创建栏目:".$tid.",继续进行操作!", $gourl, 0, 100); exit(); } else { $gourl = "makehtml_list_action.php?gotype={$gotype}&uppage=$uppage&mkpage=$mkpage&maxpagesize=$maxpagesize&typeid=$typeid&pageno=$pageno"; - ShowMsg("栏目:" . $tid . ",继续进行操作...", $gourl, 0, 100); + ShowMsg("栏目:".$tid.",继续进行操作...", $gourl, 0, 100); exit(); } } diff --git a/src/dede/makehtml_map.php b/src/dede/makehtml_map.php index 7939ca9d..055e05a0 100755 --- a/src/dede/makehtml_map.php +++ b/src/dede/makehtml_map.php @@ -9,9 +9,9 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -require_once(DEDEINC . "/sitemap.class.php"); -require_once(DEDEINC . "/dedetag.class.php"); +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEINC."/sitemap.class.php"); +require_once(DEDEINC."/dedetag.class.php"); if (empty($dopost)) { ShowMsg("参数错误!", "-1"); @@ -22,15 +22,15 @@ $serviterm = empty($serviterm) ? "" : $serviterm; $sm = new SiteMap(); $maplist = $sm->GetSiteMap($dopost); if ($dopost == "site") { - $murl = $cfg_cmspath . "/data/sitemap.html"; - $tmpfile = $cfg_basedir . $cfg_templets_dir . "/plus/sitemap.htm"; + $murl = $cfg_cmspath."/data/sitemap.html"; + $tmpfile = $cfg_basedir.$cfg_templets_dir."/plus/sitemap.htm"; } else { - $murl = $cfg_cmspath . "/data/rssmap.html"; - $tmpfile = $cfg_basedir . $cfg_templets_dir . "/plus/rssmap.htm"; + $murl = $cfg_cmspath."/data/rssmap.html"; + $tmpfile = $cfg_basedir.$cfg_templets_dir."/plus/rssmap.htm"; } $dtp = new DedeTagParse(); $dtp->LoadTemplet($tmpfile); -$dtp->SaveTo($cfg_basedir . $murl); +$dtp->SaveTo($cfg_basedir.$murl); $dtp->Clear(); echo ""; echo "
成功更新文件: $murl 浏览...
"; diff --git a/src/dede/makehtml_map_guide.php b/src/dede/makehtml_map_guide.php index ad13138a..fd04b914 100755 --- a/src/dede/makehtml_map_guide.php +++ b/src/dede/makehtml_map_guide.php @@ -9,5 +9,5 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); include DedeInclude('templets/makehtml_map_guide.htm'); diff --git a/src/dede/makehtml_rss.php b/src/dede/makehtml_rss.php index 33c971d9..32d6aa69 100755 --- a/src/dede/makehtml_rss.php +++ b/src/dede/makehtml_rss.php @@ -9,5 +9,5 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); include DedeInclude('templets/makehtml_rss.htm'); diff --git a/src/dede/makehtml_rss_action.php b/src/dede/makehtml_rss_action.php index c39667a9..e9c02365 100755 --- a/src/dede/makehtml_rss_action.php +++ b/src/dede/makehtml_rss_action.php @@ -9,9 +9,9 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_MakeHtml'); -require_once(DEDEINC . "/arc.rssview.class.php"); +require_once(DEDEINC."/arc.rssview.class.php"); if (empty($tid)) $tid = 0; if (empty($maxrecord)) $maxrecord = 50; @@ -24,5 +24,5 @@ if (!is_array($row)) { $rv = new RssView($row['id'], $maxrecord); $rssurl = $rv->MakeRss(0); $tid = $row['id']; - ShowMsg("成功更新" . $rssurl . ",继续进行操作!", "makehtml_rss_action.php?tid=$tid&maxrecord=$maxrecord", 0, 100); + ShowMsg("成功更新".$rssurl.",继续进行操作!", "makehtml_rss_action.php?tid=$tid&maxrecord=$maxrecord", 0, 100); } diff --git a/src/dede/makehtml_spec.php b/src/dede/makehtml_spec.php index c208feb6..1fa952b4 100755 --- a/src/dede/makehtml_spec.php +++ b/src/dede/makehtml_spec.php @@ -9,12 +9,12 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_MakeHtml'); if (empty($dopost)) $dopost = ""; if ($dopost == "ok") { - require_once(DEDEINC . "/arc.specview.class.php"); + require_once(DEDEINC."/arc.specview.class.php"); $sp = new SpecView(); $rurl = $sp->MakeHtml(0); echo ""; diff --git a/src/dede/makehtml_taglist_action.php b/src/dede/makehtml_taglist_action.php index 529bde33..0ed2cca6 100644 --- a/src/dede/makehtml_taglist_action.php +++ b/src/dede/makehtml_taglist_action.php @@ -9,9 +9,9 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_MakeHtml'); -require_once(DEDEINC . "/arc.taglist.class.php"); +require_once(DEDEINC."/arc.taglist.class.php"); if (empty($pageno)) $pageno = 0; if (empty($mkpage)) $mkpage = 1; @@ -48,7 +48,7 @@ if ($ctagid == 0 && $allfinish) { $tag = $dsql->GetOne("SELECT * FROM `#@__tagindex` WHERE id='$ctagid' LIMIT 0,1;"); -MkdirAll($cfg_basedir . "/a/tags", $cfg_dir_purview); +MkdirAll($cfg_basedir."/a/tags", $cfg_dir_purview); if (is_array($tag) && count($tag) > 0) { $dlist = new TagList($tag['tag'], 'taglist.htm'); @@ -82,7 +82,7 @@ if (is_array($tag) && count($tag) > 0) { } $reurl .= $tag['tag_pinyin']; - ShowMsg("完成TAG更新:[" . $tag['tag'] . "]!浏览TAG首页", "javascript:;"); + ShowMsg("完成TAG更新:[".$tag['tag']."]!浏览TAG首页", "javascript:;"); } exit(); } else { @@ -95,12 +95,12 @@ if (is_array($tag) && count($tag) > 0) { $nextpage = 0; } $gourl = "makehtml_taglist_action.php?maxpagesize=$maxpagesize&tagid=$tagid&pageno=$nextpage&upall=$upall&ctagid=$ctagid"; - ShowMsg("成功生成TAG:[" . $tag['tag'] . "],继续进行操作!", $gourl, 0, 100); + ShowMsg("成功生成TAG:[".$tag['tag']."],继续进行操作!", $gourl, 0, 100); exit(); } else { // 继续当前这个 $gourl = "makehtml_taglist_action.php?mkpage=$mkpage&maxpagesize=$maxpagesize&tagid=$tagid&pageno=$pageno&upall=$upall&ctagid=$ctagid"; - ShowMsg("成功生成TAG:[" . $tag['tag'] . "],继续进行操作...", $gourl, 0, 100); + ShowMsg("成功生成TAG:[".$tag['tag']."],继续进行操作...", $gourl, 0, 100); exit(); } } diff --git a/src/dede/mda_main.php b/src/dede/mda_main.php index f656d8f2..ba1c8c29 100755 --- a/src/dede/mda_main.php +++ b/src/dede/mda_main.php @@ -9,8 +9,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/config.php'); -require_once(DEDEINC . "/oxwindow.class.php"); +require_once(dirname(__FILE__).'/config.php'); +require_once(DEDEINC."/oxwindow.class.php"); helper('mda'); @@ -40,7 +40,7 @@ if (!$dsql->IsTable('#@__plus_mda_setting')) { foreach ($install_sqls as $install_sql) { $sql = preg_replace("#ENGINE=MyISAM#i", 'TYPE=MyISAM', $install_sql); - $sql41tmp = 'ENGINE=MyISAM DEFAULT CHARSET=' . $cfg_db_language; + $sql41tmp = 'ENGINE=MyISAM DEFAULT CHARSET='.$cfg_db_language; if ($mysql_version >= 4.1) { $sql = preg_replace("#TYPE=MyISAM#i", $sql41tmp, $sql); @@ -64,7 +64,7 @@ if (version_compare($version, MDA_VER, '<')) { } foreach ($sqls as $sql) { $sql = preg_replace("#ENGINE=MyISAM#i", 'TYPE=MyISAM', $sql); - $sql41tmp = 'ENGINE=MyISAM DEFAULT CHARSET=' . $cfg_db_language; + $sql41tmp = 'ENGINE=MyISAM DEFAULT CHARSET='.$cfg_db_language; if ($mysql_version >= 4.1) { $sql = preg_replace("#TYPE=MyISAM#i", $sql41tmp, $sql); @@ -90,16 +90,16 @@ if ($dopost == 'place' or $dopost == 'report' or $dopost == 'account' or $dopost if ($dopost == 'place') { $channel_uuid = mda_get_setting('channel_uuid'); - $manage_url = MDA_APIHOST . "/place?from=dedecms&uuid={$channel_uuid}"; + $manage_url = MDA_APIHOST."/place?from=dedecms&uuid={$channel_uuid}"; $ptitle = '广告管理'; } elseif ($dopost == 'report') { - $manage_url = MDA_APIHOST . "/report"; + $manage_url = MDA_APIHOST."/report"; $ptitle = '报表管理'; } elseif ($dopost == 'account') { - $manage_url = MDA_APIHOST . "/account"; + $manage_url = MDA_APIHOST."/account"; $ptitle = '结算中心'; } elseif ($dopost == 'setting') { - $manage_url = MDA_APIHOST . "/setting"; + $manage_url = MDA_APIHOST."/setting"; $ptitle = '德得设置'; } @@ -145,11 +145,11 @@ EOT; /*-------------------------------- function __clearcache(){ } -------------------------------*/ else if ($dopost == 'clearcache') { - if (!is_dir(DEDEDATA . "/cache/mda/") or RmRecurse(DEDEDATA . "/cache/mda/")) { + if (!is_dir(DEDEDATA."/cache/mda/") or RmRecurse(DEDEDATA."/cache/mda/")) { ShowMsg("成功清除缓存信息", -1); exit(); } else { - ShowMsg("清除缓存失败,请尝试手工删除" . DEDEDATA . "/cache/mda/", 'javascript:;'); + ShowMsg("清除缓存失败,请尝试手工删除".DEDEDATA."/cache/mda/", 'javascript:;'); exit(); } } @@ -205,7 +205,7 @@ function __login(){ } 'channel_secret' => $channel_secret, 'email' => $email, 'ts' => $ts, - 'crc' => md5($channel_uuid . $channel_secret . $ts), + 'crc' => md5($channel_uuid.$channel_secret.$ts), ); $jquery_file = MDA_JQUERY; $api_login = MDA_API_LOGIN; @@ -324,7 +324,7 @@ EOT; 'channel_secret' => $channel_secret, 'email' => $email, 'ts' => $ts, - 'crc' => md5($channel_uuid . $channel_secret . $ts), + 'crc' => md5($channel_uuid.$channel_secret.$ts), ); $rs = json_decode(mda_http_send(MDA_API_LOGIN, 0, $paramsArr), TRUE); if (!$rs) { @@ -352,7 +352,7 @@ function __index(){ } $mda_reg_url = MDA_REG_URL; $mda_forget_pwd_url = MDA_FORGOT_PASSWORD_URL; $domain = !empty($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME']; - $mda_update_url = MDA_APIHOST . "/help/dedecms_module_download"; + $mda_update_url = MDA_APIHOST."/help/dedecms_module_download"; echo << diff --git a/src/dede/media_add.php b/src/dede/media_add.php index 476265db..70ce78f7 100755 --- a/src/dede/media_add.php +++ b/src/dede/media_add.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); //增加权限检查 if (empty($dopost)) $dopost = ""; @@ -17,7 +17,7 @@ if (empty($dopost)) $dopost = ""; //上传 if ($dopost == "upload") { CheckCSRF(); - require_once(DEDEINC . "/image.func.php"); + require_once(DEDEINC."/image.func.php"); $sparr_image = array("image/pjpeg", "image/jpeg", "image/gif", "image/png", "image/x-png", "image/wbmp"); $sparr_flash = array("application/xshockwaveflash"); $okdd = 0; @@ -26,35 +26,35 @@ if ($dopost == "upload") { $width = $height = ''; for ($i = 0; $i <= 40; $i++) { - if (isset(${"upfile" . $i}) && is_uploaded_file(${"upfile" . $i})) { - $filesize = ${"upfile" . $i . "_size"}; - $upfile_type = ${"upfile" . $i . "_type"}; - $upfile_name = ${"upfile" . $i . "_name"}; + if (isset(${"upfile".$i}) && is_uploaded_file(${"upfile".$i})) { + $filesize = ${"upfile".$i."_size"}; + $upfile_type = ${"upfile".$i."_type"}; + $upfile_name = ${"upfile".$i."_name"}; $dpath = MyDate("ymd", $uptime); if (in_array($upfile_type, $sparr_image)) { $mediatype = 1; - $savePath = $cfg_image_dir . "/" . $dpath; + $savePath = $cfg_image_dir."/".$dpath; } else if (in_array($upfile_type, $sparr_flash)) { $mediatype = 2; - $savePath = $cfg_other_medias . "/" . $dpath; + $savePath = $cfg_other_medias."/".$dpath; } // 2011-6-2 修复附件无法上传的错误(by:tianya) - else if (preg_match('#audio|media|video#i', $upfile_type) && preg_match("#\." . $cfg_mediatype . "$#i", $upfile_name)) { + else if (preg_match('#audio|media|video#i', $upfile_type) && preg_match("#\.".$cfg_mediatype."$#i", $upfile_name)) { $mediatype = 3; - $savePath = $cfg_other_medias . "/" . $dpath; - } else if (preg_match("#\." . $cfg_softtype . "+\." . $cfg_softtype . "$#i", $upfile_name)) { + $savePath = $cfg_other_medias."/".$dpath; + } else if (preg_match("#\.".$cfg_softtype."+\.".$cfg_softtype."$#i", $upfile_name)) { $mediatype = 4; - $savePath = $cfg_soft_dir . "/" . $dpath; + $savePath = $cfg_soft_dir."/".$dpath; } else { continue; } - $filename = "{$adminid}_" . MyDate("His", $uptime) . mt_rand(100, 999) . $i; - $fs = explode(".", ${"upfile" . $i . "_name"}); - $filename = $filename . "." . $fs[count($fs) - 1]; - $filename = $savePath . "/" . $filename; - if (!is_dir($cfg_basedir . $savePath)) { - MkdirAll($cfg_basedir . $savePath, 777); + $filename = "{$adminid}_".MyDate("His", $uptime).mt_rand(100, 999).$i; + $fs = explode(".", ${"upfile".$i."_name"}); + $filename = $filename.".".$fs[count($fs) - 1]; + $filename = $savePath."/".$filename; + if (!is_dir($cfg_basedir.$savePath)) { + MkdirAll($cfg_basedir.$savePath, 777); CloseFtp(); } /* @@ -65,19 +65,19 @@ if ($dopost == "upload") { ShowMsg("你指定的文件名被系统禁止!", "javascript:;"); exit(); } - $fullfilename = $cfg_basedir . $filename; + $fullfilename = $cfg_basedir.$filename; if ($mediatype == 1) { - @move_uploaded_file(${"upfile" . $i}, $fullfilename); + @move_uploaded_file(${"upfile".$i}, $fullfilename); $info = ''; $data = getImagesize($fullfilename, $info); $width = $data[0]; $height = $data[1]; if (in_array($upfile_type, $cfg_photo_typenames)) WaterImg($fullfilename, 'up'); } else { - @move_uploaded_file(${"upfile" . $i}, $fullfilename); + @move_uploaded_file(${"upfile".$i}, $fullfilename); } if ($i > 1) { - $ntitle = $title . "_" . $i; + $ntitle = $title."_".$i; } else { $ntitle = $title; } diff --git a/src/dede/media_edit.php b/src/dede/media_edit.php index b371fcc7..0e971898 100755 --- a/src/dede/media_edit.php +++ b/src/dede/media_edit.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); //权限检查 CheckPurview('sys_Upload,sys_MyUpload'); @@ -25,8 +25,8 @@ if ($dopost == 'del') { $ids = ""; } if ($ids == "") { - $myrow = $dsql->GetOne("SELECT url FROM `#@__uploads` WHERE aid='" . $aid . "'"); - $truefile = $cfg_basedir . $myrow['url']; + $myrow = $dsql->GetOne("SELECT url FROM `#@__uploads` WHERE aid='".$aid."'"); + $truefile = $cfg_basedir.$myrow['url']; $rs = 0; if (!file_exists($truefile) || $myrow['url'] == "") { $rs = 1; @@ -35,7 +35,7 @@ if ($dopost == 'del') { } if ($rs == 1) { $msg = "成功删除一个附件!"; - $dsql->ExecuteNoneQuery("DELETE FROM `#@__uploads` WHERE aid='" . $aid . "'"); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__uploads` WHERE aid='".$aid."'"); } ShowMsg($msg, $backurl); exit(); @@ -53,7 +53,7 @@ if ($dopost == 'del') { $dsql->Execute(); while ($myrow = $dsql->GetArray()) { - $truefile = $cfg_basedir . $myrow['url']; + $truefile = $cfg_basedir.$myrow['url']; $rs = 0; if (!file_exists($truefile) || $myrow['url'] == "") { $rs = 1; @@ -61,7 +61,7 @@ if ($dopost == 'del') { $rs = @unlink($truefile); } if ($rs == 1) { - $dsql->ExecuteNoneQuery("DELETE FROM `#@__uploads` WHERE aid='" . $myrow['aid'] . "'"); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__uploads` WHERE aid='".$myrow['aid']."'"); } } ShowMsg('成功删除选定的文件!', $backurl); @@ -74,7 +74,7 @@ function __save_edit() //保存更改 if ($aid == "") exit(); CheckCSRF(); //检查是否有修改权限 - $myrow = $dsql->GetOne("SELECT * FROM `#@__uploads` WHERE aid='" . $aid . "'"); + $myrow = $dsql->GetOne("SELECT * FROM `#@__uploads` WHERE aid='".$aid."'"); if ($myrow['mid'] != $cuserLogin->getUserID()) { CheckPurview('sys_Upload'); } @@ -99,12 +99,12 @@ function __save_edit() //保存更改 ShowMsg("你上传的为不正确类型的影音文件!", "javascript:history.go(-1);"); exit(); } - if (!preg_match("#\." . $cfg_mediatype . "#", $upfile_name)) { + if (!preg_match("#\.".$cfg_mediatype."#", $upfile_name)) { ShowMsg("你上传的影音文件扩展名无法被识别,请更改系统配置的参数!", "javascript:history.go(-1);"); exit(); } } else { - if (!preg_match("#\." . $cfg_softtype . "#", $upfile_name)) { + if (!preg_match("#\.".$cfg_softtype."#", $upfile_name)) { ShowMsg("你上传的附件扩展名无法被识别,请更改系统配置的参数!", "javascript:history.go(-1);"); exit(); } @@ -114,15 +114,15 @@ function __save_edit() //保存更改 $nowtime = time(); $oldfile = $myrow['url']; $oldfiles = explode('/', $oldfile); - $fullfilename = $cfg_basedir . $oldfile; - $oldfile_path = preg_replace("#" . $oldfiles[count($oldfiles) - 1] . "$#", "", $oldfile); - if (!is_dir($cfg_basedir . $oldfile_path)) { - MkdirAll($cfg_basedir . $oldfile_path, 777); + $fullfilename = $cfg_basedir.$oldfile; + $oldfile_path = preg_replace("#".$oldfiles[count($oldfiles) - 1]."$#", "", $oldfile); + if (!is_dir($cfg_basedir.$oldfile_path)) { + MkdirAll($cfg_basedir.$oldfile_path, 777); CloseFtp(); } @move_uploaded_file($upfile, $fullfilename); if ($mediatype == 1) { - require_once(DEDEINC . "/image.func.php"); + require_once(DEDEINC."/image.func.php"); if (in_array($upfile_type, $cfg_photo_typenames)) { WaterImg($fullfilename, 'up'); } @@ -151,12 +151,12 @@ function __save_edit() //保存更改 $query = " UPDATE #@__uploads SET title='$title',mediatype='$mediatype',playtime='$playtime'"; $query .= "$addquery WHERE aid='$aid' "; $dsql->ExecuteNoneQuery($query); - ShowMsg('成功更改一则附件数据!', 'media_edit.php?aid=' . $aid); + ShowMsg('成功更改一则附件数据!', 'media_edit.php?aid='.$aid); exit(); } //读取档案信息 -$myrow = $dsql->GetOne("SELECT * FROM #@__uploads WHERE aid='" . $aid . "'"); +$myrow = $dsql->GetOne("SELECT * FROM #@__uploads WHERE aid='".$aid."'"); if (!is_array($myrow)) { ShowMsg('错误,找不到此编号的档案!', 'javascript:;'); exit(); diff --git a/src/dede/media_main.php b/src/dede/media_main.php index fb5b1799..193e410c 100755 --- a/src/dede/media_main.php +++ b/src/dede/media_main.php @@ -9,9 +9,9 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -require_once(DEDEINC . "/datalistcp.class.php"); -require_once(DEDEINC . "/common.func.php"); +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEINC."/datalistcp.class.php"); +require_once(DEDEINC."/common.func.php"); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); if (empty($dopost)) $dopost = ''; @@ -55,7 +55,7 @@ $dlist->pageSize = 20; $dlist->SetParameter("mediatype", $mediatype); $dlist->SetParameter("keyword", $keyword); $dlist->SetParameter("membertype", $membertype); -$dlist->SetTemplate(DEDEADMIN . "/templets/media_main.htm"); +$dlist->SetTemplate(DEDEADMIN."/templets/media_main.htm"); $dlist->SetSource($sql); $dlist->Display(); @@ -75,7 +75,7 @@ function MediaType($tid, $nurl) function GetFileSize($fs) { $fs = $fs / 1024; - return trim(sprintf("%10.1f", $fs) . " K"); + return trim(sprintf("%10.1f", $fs)." K"); } function UploadAdmin($adminid, $mid) diff --git a/src/dede/member_do.php b/src/dede/member_do.php index 1eb08f7b..bbe08867 100755 --- a/src/dede/member_do.php +++ b/src/dede/member_do.php @@ -9,8 +9,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -require_once(DEDEINC . "/oxwindow.class.php"); +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEINC."/oxwindow.class.php"); if (empty($dopost)) $dopost = ''; if (empty($fmdo)) $fmdo = ''; $ENV_GOBACK_URL = isset($_COOKIE['ENV_GOBACK_URL']) ? 'member_main.php' : ''; @@ -23,7 +23,7 @@ if ($dopost == "delmember") { CheckPurview('member_Del'); if ($fmdo == 'yes') { $id = preg_replace("#[^0-9]#", '', $id); - $safecodeok = substr(md5($cfg_cookie_encode . $randcode), 0, 24); + $safecodeok = substr(md5($cfg_cookie_encode.$randcode), 0, 24); if ($safecodeok != $safecode) { ShowMsg("请填写正确的安全验证串!", "member_do.php?id={$id}&dopost=delmember"); exit(); @@ -62,9 +62,9 @@ if ($dopost == "delmember") { exit(); } $randcode = mt_rand(10000, 99999); - $safecode = substr(md5($cfg_cookie_encode . $randcode), 0, 24); + $safecode = substr(md5($cfg_cookie_encode.$randcode), 0, 24); $wintitle = "会员管理-删除会员"; - $wecome_info = "会员管理::删除会员"; + $wecome_info = "会员管理::删除会员"; $win = new OxWindow(); $win->Init("member_do.php", "js/blank.js", "POST"); $win->AddHidden("fmdo", "yes"); @@ -72,14 +72,14 @@ if ($dopost == "delmember") { $win->AddHidden("id", $id); $win->AddHidden("randcode", $randcode); $win->AddHidden("safecode", $safecode); - $win->AddTitle("你确实要删除(ID:" . $id . ")这个会员?"); + $win->AddTitle("你确实要删除(ID:".$id.")这个会员?"); $win->AddMsgItem("安全验证串: (复制本代码: $safecode )", "30"); $winform = $win->GetWindow("ok"); $win->Display(); } else if ($dopost == "delmembers") { CheckPurview('member_Del'); if ($fmdo == 'yes') { - $safecodeok = substr(md5($cfg_cookie_encode . $randcode), 0, 24); + $safecodeok = substr(md5($cfg_cookie_encode.$randcode), 0, 24); if ($safecodeok != $safecode) { ShowMsg("请填写正确的安全验证串!", "member_do.php?id={$id}&dopost=delmembers"); exit(); @@ -87,21 +87,21 @@ if ($dopost == "delmember") { if (!empty($id)) { //删除用户信息 - $rs = $dsql->ExecuteNoneQuery2("DELETE FROM `#@__member` WHERE mid IN (" . str_replace("`", ",", $id) . ") And matt<>10 "); + $rs = $dsql->ExecuteNoneQuery2("DELETE FROM `#@__member` WHERE mid IN (".str_replace("`", ",", $id).") And matt<>10 "); if ($rs > 0) { - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_tj` WHERE mid IN (" . str_replace("`", ",", $id) . ") "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_space` WHERE mid IN (" . str_replace("`", ",", $id) . ") "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_company` WHERE mid IN (" . str_replace("`", ",", $id) . ") "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_person` WHERE mid IN (" . str_replace("`", ",", $id) . ") "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_tj` WHERE mid IN (".str_replace("`", ",", $id).") "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_space` WHERE mid IN (".str_replace("`", ",", $id).") "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_company` WHERE mid IN (".str_replace("`", ",", $id).") "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_person` WHERE mid IN (".str_replace("`", ",", $id).") "); //删除用户相关数据 - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_stow` WHERE mid IN (" . str_replace("`", ",", $id) . ") "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_flink` WHERE mid IN (" . str_replace("`", ",", $id) . ") "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_operation` WHERE mid IN (" . str_replace("`", ",", $id) . ") "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_pms` WHERE toid IN (" . str_replace("`", ",", $id) . ") Or fromid IN (" . str_replace("`", ",", $id) . ") "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_friends` WHERE mid IN (" . str_replace("`", ",", $id) . ") Or fid IN (" . str_replace("`", ",", $id) . ") "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__feedback` WHERE mid IN (" . str_replace("`", ",", $id) . ") "); - $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET mid='0' WHERE mid IN (" . str_replace("`", ",", $id) . ")"); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_stow` WHERE mid IN (".str_replace("`", ",", $id).") "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_flink` WHERE mid IN (".str_replace("`", ",", $id).") "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_operation` WHERE mid IN (".str_replace("`", ",", $id).") "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_pms` WHERE toid IN (".str_replace("`", ",", $id).") Or fromid IN (".str_replace("`", ",", $id).") "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_friends` WHERE mid IN (".str_replace("`", ",", $id).") Or fid IN (".str_replace("`", ",", $id).") "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__feedback` WHERE mid IN (".str_replace("`", ",", $id).") "); + $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET mid='0' WHERE mid IN (".str_replace("`", ",", $id).")"); } else { ShowMsg("无法删除此会员,如果这个会员是管理员关连的ID,
必须先删除这个管理员才能删除此帐号!", $ENV_GOBACK_URL, 0, 3000); exit(); @@ -111,9 +111,9 @@ if ($dopost == "delmember") { exit(); } $randcode = mt_rand(10000, 99999); - $safecode = substr(md5($cfg_cookie_encode . $randcode), 0, 24); + $safecode = substr(md5($cfg_cookie_encode.$randcode), 0, 24); $wintitle = "会员管理-删除会员"; - $wecome_info = "会员管理::删除会员"; + $wecome_info = "会员管理::删除会员"; $win = new OxWindow(); $win->Init("member_do.php", "js/blank.js", "POST"); $win->AddHidden("fmdo", "yes"); @@ -121,7 +121,7 @@ if ($dopost == "delmember") { $win->AddHidden("id", $id); $win->AddHidden("randcode", $randcode); $win->AddHidden("safecode", $safecode); - $win->AddTitle("你确实要删除(ID:" . $id . ")这个会员?"); + $win->AddTitle("你确实要删除(ID:".$id.")这个会员?"); $win->AddMsgItem(" 安全验证串: (复制本代码: $safecode)", "30"); $winform = $win->GetWindow("ok"); $win->Display(); @@ -148,7 +148,7 @@ function __EditUser() ----------------*/ else if ($dopost == 'edituser') { CheckPurview('member_Edit'); if (!isset($_POST['id'])) exit('Request Error!'); - $pwdsql = empty($pwd) ? '' : ",pwd='" . md5($pwd) . "'"; + $pwdsql = empty($pwd) ? '' : ",pwd='".md5($pwd)."'"; if (empty($sex)) $sex = '男'; $uptime = GetMkTime($uptime); @@ -186,7 +186,7 @@ function __EditUser() $rs = $dsql->ExecuteNoneQuery2($query); } - ShowMsg('成功更改会员资料!', 'member_view.php?id=' . $id); + ShowMsg('成功更改会员资料!', 'member_view.php?id='.$id); exit(); } /*-------------- diff --git a/src/dede/member_main.php b/src/dede/member_main.php index e7d4cb37..bb523203 100755 --- a/src/dede/member_main.php +++ b/src/dede/member_main.php @@ -9,9 +9,9 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('member_List'); -require_once(DEDEINC . "/datalistcp.class.php"); +require_once(DEDEINC."/datalistcp.class.php"); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); if (!isset($sex)) $sex = ''; @@ -67,7 +67,7 @@ if ($matt != 10) { $whereSql = join(' AND ', $wheres); if ($whereSql != '') { - $whereSql = ' WHERE ' . $whereSql; + $whereSql = ' WHERE '.$whereSql; } $sql = "SELECT * FROM `#@__member` $whereSql ORDER BY $sortkey DESC "; @@ -78,7 +78,7 @@ $dlist->SetParameter('matt', $matt); $dlist->SetParameter('mtype', $mtype); $dlist->SetParameter('sortkey', $sortkey); $dlist->SetParameter('keyword', $keyword); -$dlist->SetTemplet(DEDEADMIN . "/templets/member_main.htm"); +$dlist->SetTemplet(DEDEADMIN."/templets/member_main.htm"); $dlist->SetSource($sql); $dlist->display(); @@ -86,7 +86,7 @@ function GetMemberName($rank, $mt) { global $MemberTypes; if (isset($MemberTypes[$rank])) { - if ($mt == 'ut') return " 待升级:" . $MemberTypes[$rank] . ""; + if ($mt == 'ut') return " 待升级:".$MemberTypes[$rank].""; else return $MemberTypes[$rank]; } else { if ($mt == 'ut') return ''; diff --git a/src/dede/member_operations.php b/src/dede/member_operations.php index 282511b3..673c2181 100755 --- a/src/dede/member_operations.php +++ b/src/dede/member_operations.php @@ -9,10 +9,10 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('member_Operations'); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); -require_once(DEDEINC . '/datalistcp.class.php'); +require_once(DEDEINC.'/datalistcp.class.php'); if (empty($buyid)) $buyid = ''; $addsql = " WHERE buyid LIKE '%$buyid%' "; @@ -31,7 +31,7 @@ $dlist->dsql->Execute('ts'); while ($rw = $dlist->dsql->GetArray('ts')) { $TypeNames[$rw['tid']] = $rw['pname']; } -$tplfile = DEDEADMIN . "/templets/member_operations.htm"; +$tplfile = DEDEADMIN."/templets/member_operations.htm"; //这两句的顺序不能更换 $dlist->SetTemplate($tplfile); //载入模板 @@ -46,7 +46,7 @@ function GetMemberID($mid) } $row = $dsql->GetOne("SELECT userid FROM #@__member WHERE mid='$mid' "); if (is_array($row)) { - return "" . $row['userid'] . ""; + return "".$row['userid'].""; } else { return '0'; } diff --git a/src/dede/member_pm.php b/src/dede/member_pm.php index 3d9fff92..87a6b8bb 100755 --- a/src/dede/member_pm.php +++ b/src/dede/member_pm.php @@ -9,10 +9,10 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('member_Pm'); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); -require_once(DEDEINC . '/datalistcp.class.php'); +require_once(DEDEINC.'/datalistcp.class.php'); if (!isset($folder)) $folder = ''; if (!isset($username)) $username = ''; @@ -31,10 +31,10 @@ $postuser = "收件人"; if ($folder == "inbox" || $folder == '') $postuser = "发件人"; if (!empty($keyword)) { - $whereSql .= " AND (subject like '%" . $keyword . "%' OR message like '%" . $keyword . "%')"; + $whereSql .= " AND (subject like '%".$keyword."%' OR message like '%".$keyword."%')"; } if (!empty($username)) { - $whereSql .= " AND floginid like '%" . $username . "%'"; + $whereSql .= " AND floginid like '%".$username."%'"; } $sql = "SELECT * FROM #@__member_pms $whereSql ORDER BY sendtime desc"; $dlist = new DataListCP(); @@ -42,7 +42,7 @@ $dlist->pagesize = 25; $dlist->SetParameter("folder", $folder); $dlist->SetParameter("username", $username); $dlist->SetParameter("keyword", $keyword); -$dlist->SetTemplate(DEDEADMIN . "/templets/member_pm.htm"); +$dlist->SetTemplate(DEDEADMIN."/templets/member_pm.htm"); $dlist->SetSource($sql); $dlist->Display(); $dlist->Close(); diff --git a/src/dede/member_pmall.php b/src/dede/member_pmall.php index 86e54228..6b8cfbfd 100755 --- a/src/dede/member_pmall.php +++ b/src/dede/member_pmall.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('member_Pm'); if (!isset($action)) $action = ''; @@ -34,4 +34,4 @@ if ($action == "post") { ShowMsg('短信已成功发送', '-1'); exit(); } -require_once(DEDEADMIN . "/templets/member_pmall.htm"); +require_once(DEDEADMIN."/templets/member_pmall.htm"); diff --git a/src/dede/member_pmone.php b/src/dede/member_pmone.php index 8a6f1ba4..09049a7d 100755 --- a/src/dede/member_pmone.php +++ b/src/dede/member_pmone.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('member_Pm'); //检查用户名的合法性 function CheckUserID($uid, $msgtitle = '用户名', $ckhas = true) @@ -18,11 +18,11 @@ function CheckUserID($uid, $msgtitle = '用户名', $ckhas = true) if ($cfg_mb_notallow != '') { $nas = explode(',', $cfg_mb_notallow); if (in_array($uid, $nas)) { - return $msgtitle . '为系统禁止的标识!'; + return $msgtitle.'为系统禁止的标识!'; } } if ($cfg_md_idurl == 'Y' && preg_match("#[^a-z0-9]#i", $uid)) { - return $msgtitle . '必须由英文字母或数字组成!'; + return $msgtitle.'必须由英文字母或数字组成!'; } if ($cfg_soft_lang == 'utf-8') $ck_uid = utf82gb($uid); @@ -33,17 +33,17 @@ function CheckUserID($uid, $msgtitle = '用户名', $ckhas = true) if (isset($ck_uid[$i + 1]) && ord($ck_uid[$i + 1]) > 0x40) { $i++; } else { - return $msgtitle . '可能含有乱码,建议你改用英文字母和数字组合!'; + return $msgtitle.'可能含有乱码,建议你改用英文字母和数字组合!'; } } else { if (preg_match("#[^0-9a-z@\.-]i#", $ck_uid[$i])) { - return $msgtitle . '不能含有 [@]、[.]、[-]以外的特殊符号!'; + return $msgtitle.'不能含有 [@]、[.]、[-]以外的特殊符号!'; } } } if ($ckhas) { $row = $dsql->GetOne("SELECT * FROM `#@__member` WHERE userid LIKE '$uid' "); - if (is_array($row)) return $msgtitle . "已经存在!"; + if (is_array($row)) return $msgtitle."已经存在!"; } return 'ok'; } @@ -78,4 +78,4 @@ if ($action == "post") { ShowMsg('短信已成功发送', 'member_pmone.php'); exit(); } -require_once(DEDEADMIN . "/templets/member_pmone.htm"); +require_once(DEDEADMIN."/templets/member_pmone.htm"); diff --git a/src/dede/member_rank.php b/src/dede/member_rank.php index a9b83a3d..17133f09 100755 --- a/src/dede/member_rank.php +++ b/src/dede/member_rank.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('member_Type'); if (empty($dopost)) $dopost = ''; @@ -19,12 +19,12 @@ if ($dopost == 'save') { $endID = $idend; for (; $startID <= $endID; $startID++) { $query = ''; - $id = ${"ID_" . $startID}; - $name = ${"name_" . $startID}; - $rank = ${"rank_" . $startID}; - $money = ${"money_" . $startID}; - $scores = ${"scores_" . $startID}; - if (isset(${"check_" . $startID})) { + $id = ${"ID_".$startID}; + $name = ${"name_".$startID}; + $rank = ${"rank_".$startID}; + $money = ${"money_".$startID}; + $scores = ${"scores_".$startID}; + if (isset(${"check_".$startID})) { if ($rank > 0) { $query = "UPDATE `#@__arcrank` SET membername='$name',money='$money',rank='$rank',scores='$scores' WHERE id='$id' "; } diff --git a/src/dede/member_scores.php b/src/dede/member_scores.php index ae7db81e..10a71668 100755 --- a/src/dede/member_scores.php +++ b/src/dede/member_scores.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('member_Scores'); if (!isset($action)) $action = ''; @@ -28,8 +28,8 @@ if ($action == 'save') { if (empty($k)) { $k = 0; } - $sql = $fildes . "='" . $k . "'"; - $dsql->ExecuteNoneQuery("UPDATE `#@__scores` SET " . $sql . " WHERE id='{$ID}'"); + $sql = $fildes."='".$k."'"; + $dsql->ExecuteNoneQuery("UPDATE `#@__scores` SET ".$sql." WHERE id='{$ID}'"); if (preg_match("#Ids-#", $rk)) { if ($k) $dsql->ExecuteNoneQuery("DELETE FROM `#@__scores` WHERE id='$ID'"); } diff --git a/src/dede/member_toadmin.php b/src/dede/member_toadmin.php index 27cc63dd..c84abf7c 100755 --- a/src/dede/member_toadmin.php +++ b/src/dede/member_toadmin.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('member_Edit'); if (empty($dopost)) $dopost = ''; if (empty($fmdo)) $fmdo = ''; @@ -26,7 +26,7 @@ if ($dopost == "toadmin") { ShowMsg('密码不合法,请使用[0-9a-zA-Z_@!.-]内的字符!', '-1', 0, 3000); exit(); } - $safecodeok = substr(md5($cfg_cookie_encode . $randcode), 0, 24); + $safecodeok = substr(md5($cfg_cookie_encode.$randcode), 0, 24); if ($safecodeok != $safecode) { ShowMsg("请填写正确的安全验证串!", "member_toadmin.php?id={$id}"); exit(); @@ -34,15 +34,15 @@ if ($dopost == "toadmin") { $pwdm = ''; if ($pwd != '') { $inputpwd = ",pwd"; - $inputpwdv = ",'" . substr(md5($pwd), 5, 20) . "'"; - $pwdm = ",pwd='" . md5($pwd) . "'"; + $inputpwdv = ",'".substr(md5($pwd), 5, 20)."'"; + $pwdm = ",pwd='".md5($pwd)."'"; } else { $row = $dsql->GetOne("SELECT * FROM #@__member WHERE mid='$id'"); $password = $row['pwd']; $inputpwd = ",pwd"; $pwd = substr($password, 5, 20); - $inputpwdv = ",'" . $pwd . "'"; - $pwdm = ",pwd='" . $password . "'"; + $inputpwdv = ",'".$pwd."'"; + $pwdm = ",pwd='".$password."'"; } $typeids = (empty($typeids)) ? "" : $typeids; if ($typeids == '') { @@ -77,18 +77,18 @@ $id = preg_replace("#[^0-9]#", "", $id); //显示用户信息 $randcode = mt_rand(10000, 99999); -$safecode = substr(md5($cfg_cookie_encode . $randcode), 0, 24); +$safecode = substr(md5($cfg_cookie_encode.$randcode), 0, 24); $typeOptions = ''; $typeid = (empty($typeid)) ? '' : $typeid; $typeids = explode(',', $typeid); $dsql->SetQuery("SELECT id,typename FROM `#@__arctype` WHERE reid=0 AND (ispart=0 OR ispart=1)"); $dsql->Execute('op'); while ($nrow = $dsql->GetObject('op')) { - $typeOptions .= "\r\n"; + $typeOptions .= "\r\n"; $dsql->SetQuery("SELECT id,typename FROM #@__arctype WHERE reid={$nrow->id} AND (ispart=0 OR ispart=1)"); $dsql->Execute('s'); while ($nrow = $dsql->GetObject('s')) { - $typeOptions .= "\r\n"; + $typeOptions .= "\r\n"; } } $row = $dsql->GetOne("SELECT * FROM #@__member WHERE mid='$id'"); diff --git a/src/dede/member_type.php b/src/dede/member_type.php index 2e6ed11d..7c8fbffc 100755 --- a/src/dede/member_type.php +++ b/src/dede/member_type.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('member_Type'); if (empty($dopost)) $dopost = ""; @@ -19,12 +19,12 @@ if ($dopost == "save") { $endID = $idend; for (; $startID <= $endID; $startID++) { $query = ''; - $aid = ${'ID_' . $startID}; - $pname = ${'pname_' . $startID}; - $rank = ${'rank_' . $startID}; - $money = ${'money_' . $startID}; - $exptime = ${'exptime_' . $startID}; - if (isset(${'check_' . $startID})) { + $aid = ${'ID_'.$startID}; + $pname = ${'pname_'.$startID}; + $rank = ${'rank_'.$startID}; + $money = ${'money_'.$startID}; + $exptime = ${'exptime_'.$startID}; + if (isset(${'check_'.$startID})) { if ($pname != '') { $query = "UPDATE #@__member_type SET pname='$pname',money='$money',rank='$rank',exptime='$exptime' WHERE aid='$aid'"; } @@ -59,4 +59,4 @@ $times[183] = '半年'; $times[366] = '一年'; $times[32767] = '终身'; -require_once(DEDEADMIN . "/templets/member_type.htm"); +require_once(DEDEADMIN."/templets/member_type.htm"); diff --git a/src/dede/member_view.php b/src/dede/member_view.php index 9fd8cb6e..2856cc75 100755 --- a/src/dede/member_view.php +++ b/src/dede/member_view.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require(dirname(__FILE__) . "/config.php"); +require(dirname(__FILE__)."/config.php"); CheckPurview('member_Edit'); $ENV_GOBACK_URL = isset($_COOKIE['ENV_GOBACK_URL']) ? "member_main.php" : ''; $id = preg_replace("#[^0-9]#", "", $id); diff --git a/src/dede/module_main.php b/src/dede/module_main.php index 903ee72f..11829542 100755 --- a/src/dede/module_main.php +++ b/src/dede/module_main.php @@ -9,24 +9,24 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_module'); -require_once(dirname(__FILE__) . "/../include/dedemodule.class.php"); -require_once(dirname(__FILE__) . "/../include/oxwindow.class.php"); +require_once(dirname(__FILE__)."/../include/dedemodule.class.php"); +require_once(dirname(__FILE__)."/../include/oxwindow.class.php"); if (empty($action)) $action = ''; -require_once(DEDEDATA . "/admin/config_update.php"); -$mdir = DEDEDATA . '/module'; +require_once(DEDEDATA."/admin/config_update.php"); +$mdir = DEDEDATA.'/module'; $mdurl = ""; function TestWriteAble($d) { $tfile = '_dedet.txt'; $d = preg_replace("#\/$#", '', $d); - $fp = @fopen($d . '/' . $tfile, 'w'); + $fp = @fopen($d.'/'.$tfile, 'w'); if (!$fp) return FALSE; else { fclose($fp); - $rs = @unlink($d . '/' . $tfile); + $rs = @unlink($d.'/'.$tfile); if ($rs) return TRUE; else return FALSE; } @@ -35,7 +35,7 @@ function TestWriteAble($d) function ReWriteConfigAuto() { global $dsql; - $configfile = DEDEDATA . '/config.cache.inc.php'; + $configfile = DEDEDATA.'/config.cache.inc.php'; if (!is_writeable($configfile)) { echo "配置文件'{$configfile}'不支持写入,无法修改系统配置参数!"; //ClearAllLink(); @@ -43,14 +43,14 @@ function ReWriteConfigAuto() } $fp = fopen($configfile, 'w'); flock($fp, 3); - fwrite($fp, "<" . "?php\r\n"); + fwrite($fp, "<"."?php\r\n"); $dsql->SetQuery("SELECT `varname`,`type`,`value`,`groupid` FROM `#@__sysconfig` ORDER BY aid ASC "); $dsql->Execute(); while ($row = $dsql->GetArray()) { - if ($row['type'] == 'number') fwrite($fp, "\${$row['varname']} = " . $row['value'] . ";\r\n"); - else fwrite($fp, "\${$row['varname']} = '" . str_replace("'", '', $row['value']) . "';\r\n"); + if ($row['type'] == 'number') fwrite($fp, "\${$row['varname']} = ".$row['value'].";\r\n"); + else fwrite($fp, "\${$row['varname']} = '".str_replace("'", '', $row['value'])."';\r\n"); } - fwrite($fp, "?" . ">"); + fwrite($fp, "?".">"); fclose($fp); } @@ -69,7 +69,7 @@ if ($action == '') { if (is_array($modules_remote) && count($modules_remote) > 0) { $modules = array_merge($modules, $modules_remote); } - require_once(dirname(__FILE__) . "/templets/module_main.htm"); + require_once(dirname(__FILE__)."/templets/module_main.htm"); $dm->Clear(); exit(); } @@ -86,7 +86,7 @@ function ViewDevelopoer(); } $dev_id = $info['dev_id']; - $devURL = DEDECDNURL . "/developers/$dev_id.json"; + $devURL = DEDECDNURL."/developers/$dev_id.json"; $dhd = new DedeHttpDown(); $dhd->OpenUrl($devURL); $devContent = $dhd->GetHtml(); @@ -137,7 +137,7 @@ function Setup(); if (!preg_match("#^\.#", $prvdir)) $prvdir = './'; $n = TRUE; foreach ($incdir as $k => $v) { - if (preg_match("#^" . $v . "#i", $prvdir)) { + if (preg_match("#^".$v."#i", $prvdir)) { $n = FALSE; break; } @@ -253,7 +253,7 @@ function SetupRun() $rs = $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_module` WHERE hashcode LIKE '$hash' "); $rs = $dsql->ExecuteNoneQuery($query); if (!$rs) { - ShowMsg('保存数据库信息失败,无法完成安装!' . $dsql->GetError(), 'javascript:;'); + ShowMsg('保存数据库信息失败,无法完成安装!'.$dsql->GetError(), 'javascript:;'); exit(); } @@ -266,7 +266,7 @@ function SetupRun() //用模块的安装程序安装 if (!isset($autosetup) || $autosetup == 0) { - include(DEDEDATA . '/module/' . $filename); + include(DEDEDATA.'/module/'.$filename); exit(); } //系统自动安装 @@ -276,7 +276,7 @@ function SetupRun() $setupsql = $dm->GetSystemFile($hash, 'setupsql40'); $setupsql = preg_replace("#ENGINE=MyISAM#i", 'TYPE=MyISAM', $setupsql); - $sql41tmp = 'ENGINE=MyISAM DEFAULT CHARSET=' . $cfg_db_language; + $sql41tmp = 'ENGINE=MyISAM DEFAULT CHARSET='.$cfg_db_language; if ($mysql_version >= 4.1) { $setupsql = preg_replace("#TYPE=MyISAM#i", $sql41tmp, $setupsql); @@ -285,7 +285,7 @@ function SetupRun() //_ROOTURL_ if ($cfg_cmspath == '/') $cfg_cmspath = ''; - $rooturl = $cfg_basehost . $cfg_cmspath; + $rooturl = $cfg_basehost.$cfg_cmspath; $setupsql = preg_replace("#_ROOTURL_#i", $rooturl, $setupsql); $setupsql = preg_replace("#[\r\n]{1,}#", "\n", $setupsql); @@ -362,7 +362,7 @@ function DelModule(); exit(); } else if ($action == 'delok') { $dm = new DedeModule($mdir); - $modfile = $mdir . "/" . $dm->GetHashFile($hash); + $modfile = $mdir."/".$dm->GetHashFile($hash); unlink($modfile) or die("删除文件 {$modfile} 失败!"); ShowMsg("成功删除一个模块文件!", "module_main.php"); exit(); @@ -458,8 +458,8 @@ function UnInstallRun(); @$dm->DelSystemFile($hash, 'setup'); $dm->Clear(); if (!isset($autodel) || $autodel == 0) { - include(DEDEDATA . "/module/{$hash}-uninstall.php"); - @unlink(DEDEDATA . "/module/{$hash}-uninstall.php"); + include(DEDEDATA."/module/{$hash}-uninstall.php"); + @unlink(DEDEDATA."/module/{$hash}-uninstall.php"); exit(); } else { @$dm->DelSystemFile($hash, 'uninstall'); @@ -517,7 +517,7 @@ function ViewOne(); else $v['type'] = '文件'; $filelist .= "{$v['type']}|{$v['name']}\r\n"; } - if (file_exists(DEDEDATA . "/module/{$hash}-readme.php")) { + if (file_exists(DEDEDATA."/module/{$hash}-readme.php")) { $setupinfo = "已安装 卸载"; } else { $setupinfo = "未安装 安装"; @@ -588,7 +588,7 @@ function Edit(); $indexurl = str_replace('**', '=', $indexurl); $dm->Clear(); - require_once(dirname(__FILE__) . '/templets/module_edit.htm'); + require_once(dirname(__FILE__).'/templets/module_edit.htm'); exit(); } /*-------------- diff --git a/src/dede/module_make.php b/src/dede/module_make.php index 06f69680..ec093bc0 100755 --- a/src/dede/module_make.php +++ b/src/dede/module_make.php @@ -10,24 +10,24 @@ * @link https://www.dedebiz.com */ @set_time_limit(0); -require_once(dirname(__FILE__) . "/config.php"); -require_once(dirname(__FILE__) . "/../include/dedemodule.class.php"); +require_once(dirname(__FILE__)."/config.php"); +require_once(dirname(__FILE__)."/../include/dedemodule.class.php"); CheckPurview('sys_module'); if (empty($action)) $action = ''; if ($action == '') { $modules = array(); - require_once(dirname(__FILE__) . "/templets/module_make.htm"); + require_once(dirname(__FILE__)."/templets/module_make.htm"); exit(); } /*------------- //生成项目 function Makemodule() --------------*/ else if ($action == 'make') { - require_once(DEDEINC . '/dedehttpdown.class.php'); + require_once(DEDEINC.'/dedehttpdown.class.php'); // 校验私钥,确定开发者身份 - $devURL = DEDECDNURL . "/developers/$dev_id.json"; + $devURL = DEDECDNURL."/developers/$dev_id.json"; $dhd = new DedeHttpDown(); $dhd->OpenUrl($devURL); $devContent = $dhd->GetHtml(); @@ -80,9 +80,9 @@ function Makemodule() if (!isset($autosetup)) $autosetup = 0; if (!isset($autodel)) $autodel = 0; - $mdir = DEDEDATA . '/module'; - $hashcode = md5($modulname . $devInfo['dev_id']); - $moduleFilename = $mdir . '/' . $hashcode . '.xml'; + $mdir = DEDEDATA.'/module'; + $hashcode = md5($modulname.$devInfo['dev_id']); + $moduleFilename = $mdir.'/'.$hashcode.'.xml'; $menustring = base64_encode($menustring); $indexurl = str_replace('=', '**', $indexurl); $dm = new DedeModule($mdir); @@ -96,23 +96,23 @@ function Makemodule() $readmef = $setupf = $uninstallf = ''; if (empty($readmetxt)) { - move_uploaded_file($readme, $mdir . "/{$hashcode}-r.html") or die("你没填写说明或上传说明文件!"); - $readmef = $dm->GetEncodeFile($mdir . "/{$hashcode}-r.html", TRUE); + move_uploaded_file($readme, $mdir."/{$hashcode}-r.html") or die("你没填写说明或上传说明文件!"); + $readmef = $dm->GetEncodeFile($mdir."/{$hashcode}-r.html", TRUE); } else { - $readmetxt = "

" . $readmetxt; + $readmetxt = "

".$readmetxt; $readmetxt = preg_replace("#[\r\n]{1,}#", "
\r\n", $readmetxt); $readmetxt .= "

"; $readmef = base64_encode(trim($readmetxt)); } if ($autosetup == 0) { - move_uploaded_file($setup, $mdir . "/{$hashcode}-s.php") or die("你没上传,或系统无法把setup文件移动到 module 目录!"); - $setupf = $dm->GetEncodeFile($mdir . "/{$hashcode}-s.php", TRUE); + move_uploaded_file($setup, $mdir."/{$hashcode}-s.php") or die("你没上传,或系统无法把setup文件移动到 module 目录!"); + $setupf = $dm->GetEncodeFile($mdir."/{$hashcode}-s.php", TRUE); } if ($autodel == 0) { - move_uploaded_file($uninstall, $mdir . "/{$hashcode}-u.php") or die("你没上传,或系统无法把uninstall文件移动到 module 目录!"); - $uninstallf = $dm->GetEncodeFile($mdir . "/{$hashcode}-u.php", TRUE); + move_uploaded_file($uninstall, $mdir."/{$hashcode}-u.php") or die("你没上传,或系统无法把uninstall文件移动到 module 目录!"); + $uninstallf = $dm->GetEncodeFile($mdir."/{$hashcode}-u.php", TRUE); } if (trim($setupsql40) == '') $setupsql40 = ''; @@ -205,7 +205,7 @@ function editModule() } // 校验私钥,确定开发者身份 - $devURL = DEDECDNURL . "/developers/$dev_id.json"; + $devURL = DEDECDNURL."/developers/$dev_id.json"; $dhd = new DedeHttpDown(); $dhd->OpenUrl($devURL); $devContent = $dhd->GetHtml(); @@ -242,9 +242,9 @@ function editModule() foreach ($_POST as $k => $v) $$k = stripslashes($v); if (!isset($autosetup)) $autosetup = 0; if (!isset($autodel)) $autodel = 0; - $mdir = DEDEDATA . '/module'; + $mdir = DEDEDATA.'/module'; $hashcode = $hash; - $moduleFilename = $mdir . '/' . $hashcode . '.xml'; + $moduleFilename = $mdir.'/'.$hashcode.'.xml'; $modulname = str_replace('=', '', $modulname); $indexurl = str_replace('=', '**', $indexurl); $menustring = base64_encode($menustring); @@ -254,16 +254,16 @@ function editModule() //编译setup文件 if (is_uploaded_file($setup)) { - move_uploaded_file($setup, $mdir . "/{$hashcode}-s.php") or die("你没上传,或系统无法把setup文件移动到 module 目录!"); - $setupf = $dm->GetEncodeFile($mdir . "/{$hashcode}-s.php", TRUE); + move_uploaded_file($setup, $mdir."/{$hashcode}-s.php") or die("你没上传,或系统无法把setup文件移动到 module 目录!"); + $setupf = $dm->GetEncodeFile($mdir."/{$hashcode}-s.php", TRUE); } else { if ($autosetup == 0) $setupf = base64_encode($dm->GetSystemFile($hashcode, 'setup')); } //编译uninstall文件 if (is_uploaded_file($uninstall)) { - move_uploaded_file($uninstall, $mdir . "/{$hashcode}-u.php") or die("你没上传,或系统无法把uninstall文件移动到 module 目录!"); - $uninstallf = $dm->GetEncodeFile($mdir . "/{$hashcode}-u.php", true); + move_uploaded_file($uninstall, $mdir."/{$hashcode}-u.php") or die("你没上传,或系统无法把uninstall文件移动到 module 目录!"); + $uninstallf = $dm->GetEncodeFile($mdir."/{$hashcode}-u.php", true); } else { if ($autodel == 0) $uninstallf = base64_encode($dm->GetSystemFile($hashcode, 'uninstall')); } @@ -325,7 +325,7 @@ $filelist } //测试无误后编译安装包 $fp = fopen($moduleFilename, 'w'); - fwrite($fp, $modulinfo . "\r\n"); + fwrite($fp, $modulinfo."\r\n"); fwrite($fp, "\r\n"); foreach ($filelists as $v) { $v = trim($v); @@ -337,7 +337,7 @@ $filelist } else { $fxml = $dm->GetFileXml($hashcode); $fp = fopen($moduleFilename, 'w'); - fwrite($fp, $modulinfo . "\r\n"); + fwrite($fp, $modulinfo."\r\n"); fwrite($fp, $fxml); fclose($fp); } diff --git a/src/dede/module_upload.php b/src/dede/module_upload.php index e19d48a4..ba5603e5 100755 --- a/src/dede/module_upload.php +++ b/src/dede/module_upload.php @@ -9,20 +9,20 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_module'); -require_once(dirname(__FILE__) . "/../include/dedemodule.class.php"); -require_once(dirname(__FILE__) . "/../include/oxwindow.class.php"); +require_once(dirname(__FILE__)."/../include/dedemodule.class.php"); +require_once(dirname(__FILE__)."/../include/oxwindow.class.php"); if (empty($action)) $action = ''; -$mdir = DEDEDATA . '/module'; +$mdir = DEDEDATA.'/module'; if ($action == 'upload') { if (!is_uploaded_file($upfile)) { ShowMsg("貌似你什么都没有上传哦!", "javascript:;"); exit(); } else { - include_once(dirname(__FILE__) . "/../include/zip.class.php"); - $tmpfilename = $mdir . '/' . ExecTime() . mt_rand(10000, 50000) . '.tmp'; + include_once(dirname(__FILE__)."/../include/zip.class.php"); + $tmpfilename = $mdir.'/'.ExecTime().mt_rand(10000, 50000).'.tmp'; move_uploaded_file($upfile, $tmpfilename) or die("把上传的文件移动到{$tmpfilename}时失败,请检查{$mdir}目录是否有写入权限!"); //ZIP格式的文件 @@ -45,10 +45,10 @@ if ($action == 'upload') { ShowMsg("对不起,你上传的压缩包中不存在dede模块文件!

>>返回重新上传>>", "javascript:;"); exit(); } - $ziptmp = $mdir . '/ziptmp'; + $ziptmp = $mdir.'/ziptmp'; $z->Extract($tmpfilename, $ziptmp, $dedefileindex); unlink($tmpfilename); - $tmpfilename = $mdir . "/ziptmp/" . $dedefile; + $tmpfilename = $mdir."/ziptmp/".$dedefile; } $dm = new DedeModule($mdir); @@ -63,7 +63,7 @@ if ($action == 'upload') { exit("hash check failed!"); } - $okfile = $mdir . '/' . $infos['hash'] . '.xml'; + $okfile = $mdir.'/'.$infos['hash'].'.xml'; if ($dm->HasModule($infos['hash']) && empty($delhas)) { unlink($tmpfilename); $dm->Clear(); diff --git a/src/dede/mychannel_add.php b/src/dede/mychannel_add.php index c0ed5c2c..349507c3 100755 --- a/src/dede/mychannel_add.php +++ b/src/dede/mychannel_add.php @@ -9,9 +9,9 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('c_New'); -require_once(DEDEINC . "/dedetag.class.php"); +require_once(DEDEINC."/dedetag.class.php"); if (empty($ismake)) $ismake = 0; if (empty($isdel)) $isdel = 0; if (empty($action)) $action = ''; @@ -78,11 +78,11 @@ if ($action == 'add') { if ($mysql_version < 4.1) { $tabsql .= " PRIMARY KEY (`aid`), KEY `typeid` (`typeid`)\r\n) TYPE=MyISAM; "; } else { - $tabsql .= " PRIMARY KEY (`aid`), KEY `typeid` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=" . $cfg_db_language . "; "; + $tabsql .= " PRIMARY KEY (`aid`), KEY `typeid` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; } $rs = $dsql->ExecuteNoneQuery($tabsql); if (!$rs) { - ShowMsg("创建附加表失败!" . $dsql->GetError(), "javascript:;"); + ShowMsg("创建附加表失败!".$dsql->GetError(), "javascript:;"); exit(); } } @@ -109,11 +109,11 @@ if ($action == 'add') { $inQuery = "INSERT INTO `#@__channeltype`(id,nid,typename,addtable,addcon,mancon,editcon,useraddcon,usermancon,usereditcon,fieldset,listfields,issystem,issend,arcsta,usertype,sendrank,needdes,needpic,titlename,onlyone,dfcid) VALUES ('$id','$nid','$typename','$addtable','$addcon','$mancon','$editcon','$useraddcon','$usermancon','$usereditcon','$fieldset','$listfields','$issystem','$issend','$arcsta','$usertype','$sendrank','$needdes','$needpic','$titlename','$onlyone','$dfcid');"; $dsql->ExecuteNoneQuery($inQuery); - ShowMsg("成功增加一个频道模型!", "mychannel_edit.php?id=" . $id); + ShowMsg("成功增加一个频道模型!", "mychannel_edit.php?id=".$id); exit(); } $row = $dsql->GetOne("SELECT id FROM `#@__channeltype` ORDER BY id DESC LIMIT 0,1 "); $newid = $row['id'] + 1; if ($newid < 10) $newid = $newid + 10; -require_once(DEDEADMIN . "/templets/mychannel_add.htm"); +require_once(DEDEADMIN."/templets/mychannel_add.htm"); diff --git a/src/dede/mychannel_edit.php b/src/dede/mychannel_edit.php index 54cec15e..29fcec02 100755 --- a/src/dede/mychannel_edit.php +++ b/src/dede/mychannel_edit.php @@ -9,10 +9,10 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('c_Edit'); -require_once(DEDEINC . "/dedetag.class.php"); -require_once(DEDEINC . "/oxwindow.class.php"); +require_once(DEDEINC."/dedetag.class.php"); +require_once(DEDEINC."/oxwindow.class.php"); if (empty($dopost)) $dopost = ""; $id = isset($id) && is_numeric($id) ? $id : 0; @@ -50,14 +50,14 @@ function __CopyStart() if ($newid < -10) { $newid = $newid - 10; } - $idname = 'w' . ($newid * -1); + $idname = 'w'.($newid * -1); } $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id'"); $wintitle = "频道管理-模型复制"; $wecome_info = " 频道管理 - 模型复制"; $win = new OxWindow(); $win->Init("mychannel_edit.php", "js/blank.js", "post"); - $win->AddTitle(" 被复制频道: [" . $row['typename'] . "]"); + $win->AddTitle(" 被复制频道: [".$row['typename']."]"); $win->AddHidden("cid", $id); $win->AddHidden("id", $id); $win->AddHidden("dopost", 'copysave'); @@ -114,7 +114,7 @@ function __Export() $win = new OxWindow(); $win->Init(); $win->AddTitle("以下为规则 [{$row['typename']}] 的模型规则,你可以共享给你的朋友:"); - $winform = $win->GetWindow("hand", ""); + $winform = $win->GetWindow("hand", ""); $win->Display(); exit(); } @@ -135,7 +135,7 @@ function __ExportIn() /*---------------- function __ExportInOk() -----------------*/ else if ($dopost == "exportinok") { - require_once(DEDEADMIN . "/inc/inc_admin_channel.php"); + require_once(DEDEADMIN."/inc/inc_admin_channel.php"); function GotoStaMsg($msg) { global $wintitle, $wecome_info, $winform; @@ -200,11 +200,11 @@ function __ExportInOk() if ($mysql_version < 4.1) { $tabsql .= " PRIMARY KEY (`aid`), KEY `typeid` (`typeid`)\r\n) TYPE=MyISAM; "; } else { - $tabsql .= " PRIMARY KEY (`aid`), KEY `typeid` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=" . $cfg_db_language . "; "; + $tabsql .= " PRIMARY KEY (`aid`), KEY `typeid` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; } $rs = $dsql->ExecuteNoneQuery($tabsql); if (!$rs) { - GotoStaMsg("创建表失败!" . $dsql->GetError()); + GotoStaMsg("创建表失败!".$dsql->GetError()); exit(); } @@ -231,7 +231,7 @@ function __ExportInOk() $rs = $dsql->ExecuteNoneQuery($inquery); - if (!$rs) GotoStaMsg("导入模型时发生错误!" . $dsql->GetError()); + if (!$rs) GotoStaMsg("导入模型时发生错误!".$dsql->GetError()); $dtp = new DedeTagParse(); $dtp->SetNameSpace("field", "<", ">"); $dtp->LoadSource($fieldset); @@ -248,7 +248,7 @@ function __ExportInOk() $ntabsql = $fieldinfos[0]; $buideType = $fieldinfos[1]; if ($islist != '') { - $allfields .= ($allfields == '' ? $fieldname : ',' . $fieldname); + $allfields .= ($allfields == '' ? $fieldname : ','.$fieldname); } $dsql->ExecuteNoneQuery(" ALTER TABLE `{$fields['addtable']}` ADD $ntabsql "); } @@ -284,7 +284,7 @@ function __SaveCopy() $dsql->ExecuteNoneQuery($tableStruct); } if ($copytemplet == 1) { - $tmpletdir = $cfg_basedir . $cfg_templets_dir . '/' . $cfg_df_style; + $tmpletdir = $cfg_basedir.$cfg_templets_dir.'/'.$cfg_df_style; copy("{$tmpletdir}/article_{$nid}.htm", "{$tmpletdir}/{$newnid}_article.htm"); copy("{$tmpletdir}/list_{$nid}.htm", "{$tmpletdir}/{$newnid}_list.htm"); copy("{$tmpletdir}/index_{$nid}.htm", "{$tmpletdir}/{$newnid}_index.htm"); @@ -347,14 +347,14 @@ function __SaveEdit() /*-------------------- function __GetTemplate() --------------------*/ else if ($dopost == "gettemplets") { - require_once(DEDEINC . "/oxwindow.class.php"); + require_once(DEDEINC."/oxwindow.class.php"); $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id'"); $wintitle = " 频道管理-查看模板"; $wecome_info = "频道管理::查看模板"; $win = new OxWindow(); $win->Init("", "js/blank.js", ""); - $win->AddTitle(" 频道:(" . $row['typename'] . ")默认模板文件说明:"); - $defaulttemplate = $cfg_templets_dir . '/' . $cfg_df_style; + $win->AddTitle(" 频道:(".$row['typename'].")默认模板文件说明:"); + $defaulttemplate = $cfg_templets_dir.'/'.$cfg_df_style; $msg = " 文档模板:{$defaulttemplate}/article_{$row['nid']}.htm [修改]
@@ -382,7 +382,7 @@ function __Delete() if ($job == "") //确认提示 { - require_once(DEDEINC . "/oxwindow.class.php"); + require_once(DEDEINC."/oxwindow.class.php"); $wintitle = "频道管理-删除模型"; $wecome_info = "频道管理::删除模型"; $win = new OxWindow(); @@ -390,13 +390,13 @@ function __Delete() $win->AddHidden("job", "yes"); $win->AddHidden("dopost", $dopost); $win->AddHidden("id", $id); - $win->AddTitle("你确实要删除 (" . $row['typename'] . ") 这个频道?"); + $win->AddTitle("你确实要删除 (".$row['typename'].") 这个频道?"); $winform = $win->GetWindow("ok"); $win->Display(); exit(); } else if ($job == "yes") //操作 { - require_once(DEDEINC . "/typeunit.class.admin.php"); + require_once(DEDEINC."/typeunit.class.admin.php"); $myrow = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$id'", MYSQL_ASSOC); if (!is_array($myrow)) { ShowMsg('你所指定的频道信息不存在!', '-1'); @@ -412,7 +412,7 @@ function __Delete() $tids = ''; $dsql->Execute('qm', "SELECT id FROM `#@__arctype` WHERE channeltype='$id'"); while ($row = $dsql->GetArray('qm')) { - $tids .= ($tids == '' ? $row['id'] : ',' . $row['id']); + $tids .= ($tids == '' ? $row['id'] : ','.$row['id']); } //删除相关信息 @@ -469,12 +469,12 @@ function __modifysearch() $c4 = in_array('source', $searchinfo['mainfields']) ? 'checked' : ''; $c5 = in_array('senddate', $searchinfo['mainfields']) ? 'checked' : ''; - $mainfields = ' '; - $mainfields .= ' '; + $mainfields = ' '; + $mainfields .= ' '; - $mainfields .= ' '; - $mainfields .= ' '; - $mainfields .= ' '; + $mainfields .= ' '; + $mainfields .= ' '; + $mainfields .= ' '; /* $mainfields .= ''; $mainfields .= ''; @@ -492,9 +492,9 @@ function __modifysearch() $dtp->LoadSource($channel['fieldset']); if ($channel['issystem'] < 0) { $checked = in_array('typeid', $addonfieldsarr) ? 'checked' : ''; - $addonfields .= ' '; + $addonfields .= ' '; $checked = in_array('senddate', $addonfieldsarr) ? 'checked' : ''; - $addonfields .= ' '; + $addonfields .= ' '; } if (is_array($dtp->CTags) && !empty($dtp->CTags)) { foreach ($dtp->CTags as $ctag) { @@ -512,7 +512,7 @@ function __modifysearch() } } } - require_once(dirname(__FILE__) . "/templets/mychannel_modifysearch.htm"); + require_once(dirname(__FILE__)."/templets/mychannel_modifysearch.htm"); } else if ($step == 1) { $query = "SELECT * FROM `#@__channeltype` WHERE id='$mid'"; $channel = $dsql->GetOne($query); @@ -520,7 +520,7 @@ function __modifysearch() $addonfields = ''; } $template = trim($template); - $forms = '
'; + $forms = ''; $forms .= ""; $forms .= ""; $forms .= "关键词:
"; @@ -529,7 +529,7 @@ function __modifysearch() $mainstring = implode(',', $mainfields); foreach ($mainfields as $mainfield) { if ($mainfield == 'typeid') { - require_once(dirname(__FILE__) . "/../include/typelink.class.php"); + require_once(dirname(__FILE__)."/../include/typelink.class.php"); $tl = new TypeLink(0); $typeOptions = $tl->GetOptionArray(0, 0, $mid); $forms .= "
栏目:\r\n"; @@ -600,9 +600,9 @@ function __modifysearch() $itemname = $itemarr[$k]; $name = $field; $type = $typearr[$k]; - $tmp = $name . ':' . $type; + $tmp = $name.':'.$type; if (in_array($type, $intarr)) { - $forms .= "
$itemname :
"; + $forms .= "
$itemname :
"; } else if (in_array($type, $textarr)) { $forms .= "$itemname :
"; } else if ($type == 'select') { @@ -617,9 +617,9 @@ function __modifysearch() } else if ($type == 'radio') { $values = explode(',', $valuearr[$k]); if (is_array($values) && !empty($values)) { - $forms .= "
$itemname : "; + $forms .= "
$itemname : "; foreach ($values as $value) { - $forms .= ""; + $forms .= ""; } } } else if ($type == 'checkbox') { @@ -627,7 +627,7 @@ function __modifysearch() if (is_array($values) && !empty($values)) { $forms .= "
$itemname : "; foreach ($values as $value) { - $forms .= ""; + $forms .= ""; } } } elseif ($type == 'datetime') { @@ -636,7 +636,7 @@ function __modifysearch() } else { $tmp = ''; } - $addonstring .= $tmp . ','; + $addonstring .= $tmp.','; } } $forms .= '
'; @@ -644,8 +644,8 @@ function __modifysearch() $query = "REPLACE INTO #@__advancedsearch(mid, maintable, mainfields, addontable, addonfields, forms, template) VALUES('$mid','$maintable','$mainstring','$addontable','$addonstring','$formssql', '$template')"; $dsql->ExecuteNoneQuery($query); $formshtml = dede_htmlspecialchars($forms); - echo ''; - echo "下面为生成的html表单,请自行复制,根据自己需求修改样式后粘贴到对应的模板中

"; + echo ''; + echo "下面为生成的html表单,请自行复制,根据自己需求修改样式后粘贴到对应的模板中

"; echo '
预览:

'; echo $forms; } @@ -659,4 +659,4 @@ else if ($dopost == 'del') { exit(); } $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id' "); -require_once(DEDEADMIN . "/templets/mychannel_edit.htm"); +require_once(DEDEADMIN."/templets/mychannel_edit.htm"); diff --git a/src/dede/mychannel_field_add.php b/src/dede/mychannel_field_add.php index 2aaab9c4..5ce2a4da 100755 --- a/src/dede/mychannel_field_add.php +++ b/src/dede/mychannel_field_add.php @@ -9,10 +9,10 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('c_New'); -require_once(DEDEADMIN . "/inc/inc_admin_channel.php"); -require_once(DEDEINC . "/dedetag.class.php"); +require_once(DEDEADMIN."/inc/inc_admin_channel.php"); +require_once(DEDEINC."/dedetag.class.php"); if (empty($action)) $action = ''; $mysql_version = $dsql->GetVersion(); @@ -58,7 +58,7 @@ if ($action == 'save') { $rs = $dsql->ExecuteNoneQuery("ALTER TABLE `$trueTable` ADD $ntabsql "); if (!$rs) { $gerr = $dsql->GetError(); - ShowMsg("增加字段失败,错误提示为:" . $gerr, "javascript:;"); + ShowMsg("增加字段失败,错误提示为:".$gerr, "javascript:;"); exit(); } @@ -73,9 +73,9 @@ if ($action == 'save') { break; } } - $oksetting = $ok ? $dtp->GetResultNP() : $fieldset . "\n" . stripslashes($fieldstring); + $oksetting = $ok ? $dtp->GetResultNP() : $fieldset."\n".stripslashes($fieldstring); } else { - $oksetting = $fieldset . "\r\n" . stripslashes($fieldstring); + $oksetting = $fieldset."\r\n".stripslashes($fieldstring); } $addlist = GetAddFieldList($dtp, $oksetting); @@ -83,7 +83,7 @@ if ($action == 'save') { $rs = $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET fieldset='$oksetting',listfields='$addlist' WHERE id='$id' "); if (!$rs) { $grr = $dsql->GetError(); - ShowMsg("保存节点配置出错!" . $grr, "javascript:;"); + ShowMsg("保存节点配置出错!".$grr, "javascript:;"); exit(); } @@ -101,9 +101,9 @@ $trueTable = $row['addtable']; $tabsql = "CREATE TABLE IF NOT EXISTS `$trueTable`( `aid` int(11) NOT NULL default '0',\r\n `typeid` int(11) NOT NULL default '0',\r\n "; if ($mysql_version < 4.1) { - $tabsql .= " PRIMARY KEY (`aid`), KEY `" . $trueTable . "_index` (`typeid`)\r\n) TYPE=MyISAM; "; + $tabsql .= " PRIMARY KEY (`aid`), KEY `".$trueTable."_index` (`typeid`)\r\n) TYPE=MyISAM; "; } else { - $tabsql .= " PRIMARY KEY (`aid`), KEY `" . $trueTable . "_index` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=" . $cfg_db_language . "; "; + $tabsql .= " PRIMARY KEY (`aid`), KEY `".$trueTable."_index` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; } $dsql->ExecuteNoneQuery($tabsql); @@ -134,7 +134,7 @@ while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { $f = ''; foreach ($fields as $k => $v) { - $f .= ($f == '' ? $k : ' ' . $k); + $f .= ($f == '' ? $k : ' '.$k); } // 获取频道模型 @@ -145,4 +145,4 @@ while ($row = $dsql->GetObject()) { $channelArray[$row->id]['nid'] = $row->nid; } -require_once(DEDEADMIN . "/templets/mychannel_field_add.htm"); +require_once(DEDEADMIN."/templets/mychannel_field_add.htm"); diff --git a/src/dede/mychannel_field_edit.php b/src/dede/mychannel_field_edit.php index 6a42f071..364a4bc6 100755 --- a/src/dede/mychannel_field_edit.php +++ b/src/dede/mychannel_field_edit.php @@ -9,10 +9,10 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('c_New'); -require_once(DEDEINC . "/dedetag.class.php"); -require_once(dirname(__FILE__) . "/inc/inc_admin_channel.php"); +require_once(DEDEINC."/dedetag.class.php"); +require_once(dirname(__FILE__)."/inc/inc_admin_channel.php"); if (empty($action)) $action = ''; $id = isset($id) && is_numeric($id) ? $id : 0; @@ -31,7 +31,7 @@ foreach ($dtp->CTags as $ctag) { } //字段类型信息 -$ds = file(dirname(__FILE__) . "/inc/fieldtype.txt"); +$ds = file(dirname(__FILE__)."/inc/fieldtype.txt"); foreach ($ds as $d) { $dds = explode(',', trim($d)); $fieldtypes[$dds[0]] = $dds[1]; @@ -74,9 +74,9 @@ if ($action == 'save') { //检测数据库是否存在附加表,不存在则新建一个 $tabsql = "CREATE TABLE IF NOT EXISTS `{$row['addtable']}`( `aid` int(11) NOT NULL default '0',\r\n `typeid` int(11) NOT NULL default '0',\r\n "; if ($mysql_version < 4.1) { - $tabsql .= " PRIMARY KEY (`aid`), KEY `" . $trueTable . "_index` (`typeid`)\r\n) TYPE=MyISAM; "; + $tabsql .= " PRIMARY KEY (`aid`), KEY `".$trueTable."_index` (`typeid`)\r\n) TYPE=MyISAM; "; } else { - $tabsql .= " PRIMARY KEY (`aid`), KEY `" . $trueTable . "_index` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=" . $cfg_db_language . "; "; + $tabsql .= " PRIMARY KEY (`aid`), KEY `".$trueTable."_index` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; } $dsql->ExecuteNoneQuery($tabsql); @@ -103,10 +103,10 @@ if ($action == 'save') { foreach ($dtp->CTags as $tagid => $ctag) { if ($fieldname == strtolower($ctag->GetName())) { if (isset($fields[$fieldname]) && $fields[$fieldname] != $buideType) { - $tabsql = "ALTER TABLE `$trueTable` CHANGE `$fieldname` " . $ntabsql; + $tabsql = "ALTER TABLE `$trueTable` CHANGE `$fieldname` ".$ntabsql; $dsql->ExecuteNoneQuery($tabsql); } else if (!isset($fields[$fieldname])) { - $tabsql = "ALTER TABLE `$trueTable` ADD " . $ntabsql; + $tabsql = "ALTER TABLE `$trueTable` ADD ".$ntabsql; $dsql->ExecuteNoneQuery($tabsql); } else { $tabsql = ''; @@ -147,4 +147,4 @@ function _DELETE() exit(); } -require_once(DEDEADMIN . "/templets/mychannel_field_edit.htm"); +require_once(DEDEADMIN."/templets/mychannel_field_edit.htm"); diff --git a/src/dede/mychannel_main.php b/src/dede/mychannel_main.php index 2e15f0d6..4ceb1af3 100755 --- a/src/dede/mychannel_main.php +++ b/src/dede/mychannel_main.php @@ -9,14 +9,14 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('c_List'); -require_once(DEDEINC . '/datalistcp.class.php'); +require_once(DEDEINC.'/datalistcp.class.php'); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); $sql = "SELECT id,nid,typename,addtable,isshow,issystem FROM `#@__channeltype` ORDER BY id DESC"; $dlist = new DataListCP(); -$dlist->SetTemplet(DEDEADMIN . "/templets/mychannel_main.htm"); +$dlist->SetTemplet(DEDEADMIN."/templets/mychannel_main.htm"); $dlist->SetSource($sql); $dlist->display(); diff --git a/src/dede/mynews_add.php b/src/dede/mynews_add.php index 4c2addb0..3f2bcdfc 100755 --- a/src/dede/mynews_add.php +++ b/src/dede/mynews_add.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('plus_站内新闻发布'); if (empty($dopost)) $dopost = ""; diff --git a/src/dede/mynews_edit.php b/src/dede/mynews_edit.php index 4333917b..b4ac1094 100755 --- a/src/dede/mynews_edit.php +++ b/src/dede/mynews_edit.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('plus_站内新闻发布'); if (empty($dopost)) $dopost = ""; @@ -19,7 +19,7 @@ if ($dopost == "del") { ShowMsg("成功删除一条站内新闻!", "mynews_main.php"); exit(); } else if ($dopost == "editsave") { - $inquery = "UPDATE #@__mynews SET title='$title',typeid='$typeid',writer='$writer',senddate='" . GetMKTime($sdate) . "',body='$body' WHERE aid='$aid';"; + $inquery = "UPDATE #@__mynews SET title='$title',typeid='$typeid',writer='$writer',senddate='".GetMKTime($sdate)."',body='$body' WHERE aid='$aid';"; $dsql->ExecuteNoneQuery($inquery); ShowMsg("成功更改一条站内新闻!", "mynews_main.php"); exit(); diff --git a/src/dede/mynews_main.php b/src/dede/mynews_main.php index 6c0c60f3..ae0a04bf 100755 --- a/src/dede/mynews_main.php +++ b/src/dede/mynews_main.php @@ -9,9 +9,9 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -require_once(DEDEINC . "/typelink.class.php"); -require_once(DEDEINC . "/datalistcp.class.php"); +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEINC."/typelink.class.php"); +require_once(DEDEINC."/datalistcp.class.php"); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); $sql = "SELECT #@__mynews.aid,#@__mynews.title,#@__mynews.writer, @@ -21,6 +21,6 @@ $sql = "SELECT LEFT JOIN #@__arctype ON #@__arctype.id=#@__mynews.typeid ORDER BY aid DESC"; $dlist = new DataListCP(); -$dlist->SetTemplet(DEDEADMIN . "/templets/mynews_main.htm"); +$dlist->SetTemplet(DEDEADMIN."/templets/mynews_main.htm"); $dlist->SetSource($sql); $dlist->display(); diff --git a/src/dede/mytag_add.php b/src/dede/mytag_add.php index 42704dbf..093ae85e 100755 --- a/src/dede/mytag_add.php +++ b/src/dede/mytag_add.php @@ -9,9 +9,9 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require(dirname(__FILE__) . "/config.php"); +require(dirname(__FILE__)."/config.php"); CheckPurview('temp_Other'); -require_once(DEDEINC . "/typelink.class.php"); +require_once(DEDEINC."/typelink.class.php"); if (empty($dopost)) $dopost = ""; if ($dopost == "save") { diff --git a/src/dede/mytag_edit.php b/src/dede/mytag_edit.php index 857a8803..67fbc803 100755 --- a/src/dede/mytag_edit.php +++ b/src/dede/mytag_edit.php @@ -9,9 +9,9 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require(dirname(__FILE__) . "/config.php"); +require(dirname(__FILE__)."/config.php"); CheckPurview('temp_Other'); -require_once(DEDEINC . "/typelink.class.php"); +require_once(DEDEINC."/typelink.class.php"); if (empty($dopost)) $dopost = ''; $aid = intval($aid); @@ -38,7 +38,7 @@ if ($dopost == 'delete') { ShowMsg("成功更改一个自定义标记!", $ENV_GOBACK_URL); exit(); } else if ($dopost == "getjs") { - require_once(DEDEINC . "/oxwindow.class.php"); + require_once(DEDEINC."/oxwindow.class.php"); $jscode = ""; $showhtml = "\r\n\r\n$jscode\r\n\r\n"; $showhtml .= "预览:"; diff --git a/src/dede/mytag_main.php b/src/dede/mytag_main.php index 5fa82ea0..ec7db2e3 100755 --- a/src/dede/mytag_main.php +++ b/src/dede/mytag_main.php @@ -9,15 +9,15 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/config.php'); +require_once(dirname(__FILE__).'/config.php'); CheckPurview('temp_Other'); -require_once(DEDEINC . '/datalistcp.class.php'); +require_once(DEDEINC.'/datalistcp.class.php'); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, '/'); make_hash(); $sql = "SELECT myt.aid,myt.tagname,tp.typename,myt.timeset,myt.endtime FROM `#@__mytag` myt LEFT JOIN `#@__arctype` tp ON tp.id=myt.typeid ORDER BY myt.aid DESC "; $dlist = new DataListCP(); -$dlist->SetTemplet(DEDEADMIN . '/templets/mytag_main.htm'); +$dlist->SetTemplet(DEDEADMIN.'/templets/mytag_main.htm'); $dlist->SetSource($sql); $dlist->display(); diff --git a/src/dede/mytag_tag_guide.php b/src/dede/mytag_tag_guide.php index 4859a975..548c81a9 100755 --- a/src/dede/mytag_tag_guide.php +++ b/src/dede/mytag_tag_guide.php @@ -9,6 +9,6 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -require_once(DEDEINC . "/typelink.class.php"); +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEINC."/typelink.class.php"); include DedeInclude('templets/mytag_tag_guide.htm'); diff --git a/src/dede/mytag_tag_guide_ok.php b/src/dede/mytag_tag_guide_ok.php index cda03c56..152d86fd 100755 --- a/src/dede/mytag_tag_guide_ok.php +++ b/src/dede/mytag_tag_guide_ok.php @@ -9,26 +9,26 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('temp_Other'); //根据条件生成标记 $attlist = ""; -$attlist .= " row='" . $row . "'"; -$attlist .= " titlelen='" . $titlelen . "'"; -if ($orderby != 'senddate') $attlist .= " orderby='" . $orderby . "'"; -if ($order != 'desc') $attlist .= " order='" . $order . "'"; -if ($typeid > 0) $attlist .= " typeid='" . $typeid . "'"; -if (isset($arcid)) $attlist .= " idlist='" . $arcid . "'"; -if ($channel > 0) $attlist .= " channelid='" . $channel . "'"; -if ($att > 0) $attlist .= " att='" . $att . "'"; -if ($col > 1) $attlist .= " col='" . $col . "'"; -if ($subday > 0) $attlist .= " subday='" . $subday . "'"; +$attlist .= " row='".$row."'"; +$attlist .= " titlelen='".$titlelen."'"; +if ($orderby != 'senddate') $attlist .= " orderby='".$orderby."'"; +if ($order != 'desc') $attlist .= " order='".$order."'"; +if ($typeid > 0) $attlist .= " typeid='".$typeid."'"; +if (isset($arcid)) $attlist .= " idlist='".$arcid."'"; +if ($channel > 0) $attlist .= " channelid='".$channel."'"; +if ($att > 0) $attlist .= " att='".$att."'"; +if ($col > 1) $attlist .= " col='".$col."'"; +if ($subday > 0) $attlist .= " subday='".$subday."'"; if (!empty($types)) { $attlist .= " type='"; foreach ($types as $v) { - $attlist .= $v . '.'; + $attlist .= $v.'.'; } $attlist .= "'"; } diff --git a/src/dede/pic_view.php b/src/dede/pic_view.php index 1543ef9a..d2920433 100755 --- a/src/dede/pic_view.php +++ b/src/dede/pic_view.php @@ -9,13 +9,13 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('pic_view'); if (empty($activepath)) $activepath = $cfg_medias_dir; $activepath = preg_replace("#\/{1,}#", "/", $activepath); $activepath = RemoveXSS($activepath); -$truePath = $cfg_basedir . $activepath; +$truePath = $cfg_basedir.$activepath; $listSize = 5; include DedeInclude('templets/pic_view.htm'); @@ -27,9 +27,9 @@ function GetPrePath($nowPath) $dirs = split("/", $nowPath); $nowPath = ""; for ($i = 1; $i < count($dirs) - 1; $i++) { - $nowPath .= "/" . $dirs[$i]; + $nowPath .= "/".$dirs[$i]; } - echo ("转到上级目录\n"); + echo ("转到上级目录\n"); } } @@ -46,13 +46,13 @@ function ListPic($truePath, $nowPath) echo ("
" . $filelist[$i] . "".$filelist[$i]."
- +
" . $filelist[$i] . "".$filelist[$i]."
- " . GetImgFile($truePath, $nowPath, $filename) . " + ".GetImgFile($truePath, $nowPath, $filename)."
"; $filelist[$rowdd] = $filename; @@ -98,7 +98,7 @@ function ListPic($truePath, $nowPath) $t = $listSize; } for ($i = $rowdd - $t; $i < $rowdd; $i++) { - echo ("" . $filelist[$i] . "\n"); + echo ("".$filelist[$i]."\n"); } echo ("\n"); } @@ -108,7 +108,7 @@ function GetImgFile($truePath, $nowPath, $fileName) { $toW = 102; $toH = 102; - $srcFile = $truePath . "/" . $fileName; + $srcFile = $truePath."/".$fileName; $info = ""; $data = GetImageSize($srcFile, $info); $srcW = $data[0]; @@ -127,7 +127,7 @@ function GetImgFile($truePath, $nowPath, $fileName) $ftoW = $ftoH * ($srcW / $srcH); } } - return (""); + return (""); } function IsImg($fileName) diff --git a/src/dede/plus_edit.php b/src/dede/plus_edit.php index 40a3a8b7..f72d046a 100755 --- a/src/dede/plus_edit.php +++ b/src/dede/plus_edit.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_plus'); $aid = preg_replace("#[^0-9]#", "", $aid); if ($dopost == "show") { @@ -24,7 +24,7 @@ if ($dopost == "show") { if (empty($job)) $job = ""; if ($job == "") //确认提示 { - require_once(DEDEINC . "/oxwindow.class.php"); + require_once(DEDEINC."/oxwindow.class.php"); $wintitle = "删除插件"; $wecome_info = "插件管理::删除插件"; $win = new OxWindow(); @@ -32,7 +32,7 @@ if ($dopost == "show") { $win->AddHidden("job", "yes"); $win->AddHidden("dopost", $dopost); $win->AddHidden("aid", $aid); - $win->AddTitle("你确实要删除'" . $title . "'这个插件?"); + $win->AddTitle("你确实要删除'".$title."'这个插件?"); $win->AddMsgItem("警告:在这里删除仅仅删除菜单项,要干净删除请在模块管理处删除!

模块管理>>
"); $winform = $win->GetWindow("ok"); $win->Display(); diff --git a/src/dede/plus_main.php b/src/dede/plus_main.php index 15a55f38..1f30b023 100755 --- a/src/dede/plus_main.php +++ b/src/dede/plus_main.php @@ -9,22 +9,22 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_plus'); -require_once(DEDEINC . "/datalistcp.class.php"); +require_once(DEDEINC."/datalistcp.class.php"); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); $sql = "SELECT aid,plusname,writer,isshow FROM `#@__plus` ORDER BY aid ASC"; $dlist = new DataListCP(); -$dlist->SetTemplet(DEDEADMIN . "/templets/plus_main.htm"); +$dlist->SetTemplet(DEDEADMIN."/templets/plus_main.htm"); $dlist->SetSource($sql); $dlist->display(); function GetSta($sta, $id, $title) { if ($sta == 1) { - return "   修改   启用 > 禁用   删除"; + return "   修改   启用 > 禁用   删除"; } else { - return "   修改   禁用 > 启用   册除"; + return "   修改   禁用 > 启用   册除"; } } diff --git a/src/dede/public_guide.php b/src/dede/public_guide.php index 3c510343..db26c56b 100755 --- a/src/dede/public_guide.php +++ b/src/dede/public_guide.php @@ -9,8 +9,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -require_once(DEDEINC . "/oxwindow.class.php"); +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEINC."/oxwindow.class.php"); if (empty($action)) $action = ''; /*-------------------- @@ -60,7 +60,7 @@ if (is_array($row) && $action != 'edit') { } $channelid = $row['id']; $cid = 0; - require_once(DEDEADMIN . '/' . $addcon); + require_once(DEDEADMIN.'/'.$addcon); exit(); } diff --git a/src/dede/recycling.php b/src/dede/recycling.php index 74e11ac7..fc67efe0 100755 --- a/src/dede/recycling.php +++ b/src/dede/recycling.php @@ -9,21 +9,21 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/config.php'); +require_once(dirname(__FILE__).'/config.php'); CheckPurview('a_List,a_AccList,a_MyList'); -require_once(DEDEINC . '/datalistcp.class.php'); +require_once(DEDEINC.'/datalistcp.class.php'); if (empty($cid)) { $cid = '0'; $whereSql = ''; } if ($cid != 0) { - require_once(DEDEINC . '/channelunit.func.php'); - $whereSql = " AND arc.typeid IN (" . GetSonIds($cid) . ")"; + require_once(DEDEINC.'/channelunit.func.php'); + $whereSql = " AND arc.typeid IN (".GetSonIds($cid).")"; } $query = "SELECT arc.*,tp.typename FROM `#@__archives` AS arc LEFT JOIN `#@__arctype` AS tp ON arc.typeid = tp.id WHERE arc.arcrank = '-2' $whereSql order by arc.id desc"; $dlist = new DataListCP(); -$dlist->SetTemplet(DEDEADMIN . "/templets/recycling.htm"); +$dlist->SetTemplet(DEDEADMIN."/templets/recycling.htm"); $dlist->SetSource($query); $dlist->display(); diff --git a/src/dede/search_keywords_main.php b/src/dede/search_keywords_main.php index 0ba33f23..bed90e35 100755 --- a/src/dede/search_keywords_main.php +++ b/src/dede/search_keywords_main.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); if (empty($pagesize)) $pagesize = 30; @@ -54,7 +54,7 @@ else if ($dopost == 'delall') { if ($dopost == '') { $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__search_keywords` "); $totalRow = $row['dd']; - include(DEDEADMIN . "/templets/search_keywords_main.htm"); + include(DEDEADMIN."/templets/search_keywords_main.htm"); } //获得特定的关键字列表 @@ -77,8 +77,8 @@ function GetKeywordList($dsql, $pageno, $pagesize, $orderby = 'aid') \r\n "; echo $printhead; - if ($orderby == 'result') $orderby = $orderby . " ASC"; - else $orderby = $orderby . " DESC"; + if ($orderby == 'result') $orderby = $orderby." ASC"; + else $orderby = $orderby." DESC"; $dsql->SetQuery("SELECT * FROM `#@__search_keywords` ORDER BY $orderby LIMIT $start,$pagesize "); $dsql->Execute(); while ($row = $dsql->GetArray()) { @@ -89,8 +89,8 @@ function GetKeywordList($dsql, $pageno, $pagesize, $orderby = 'aid') - {$row['result']} - " . MyDate("Y-m-d H:i:s", $row['lasttime']) . " + {$row['result']} + ".MyDate("Y-m-d H:i:s", $row['lasttime'])." 更新 | 删除 diff --git a/src/dede/shops_delivery.php b/src/dede/shops_delivery.php index 34f288d5..5befa4d8 100755 --- a/src/dede/shops_delivery.php +++ b/src/dede/shops_delivery.php @@ -9,9 +9,9 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('shops_Delivery'); -require_once DEDEINC . '/datalistcp.class.php'; +require_once DEDEINC.'/datalistcp.class.php'; if (!isset($do)) $do = ''; if ($do == 'add') { @@ -44,9 +44,9 @@ if ($do == 'add') { if (!is_array($row)) { continue; } - $dname = ${"m_dname" . $id}; - $price = ${"m_price" . $id}; - $des = ${"m_des" . $id}; + $dname = ${"m_dname".$id}; + $price = ${"m_price".$id}; + $des = ${"m_des".$id}; if (empty($dname) || (strlen($dname) > 100)) { $dname = addslashes($row['dname']); } @@ -74,6 +74,6 @@ $dlist = new DataListCP(); $dlist->pageSize = 25; //设定每页显示记录数(默认25条) //这两句的顺序不能更换 -$dlist->SetTemplate(DEDEADMIN . "/templets/shops_delivery.htm"); //载入模板 +$dlist->SetTemplate(DEDEADMIN."/templets/shops_delivery.htm"); //载入模板 $dlist->SetSource("SELECT `pid`,`dname`,`price`,`des` FROM `#@__shops_delivery` ORDER BY `orders` ASC"); // 设定查询SQL $dlist->Display(); //显示 \ No newline at end of file diff --git a/src/dede/shops_operations.php b/src/dede/shops_operations.php index c23f3d0d..1960d990 100755 --- a/src/dede/shops_operations.php +++ b/src/dede/shops_operations.php @@ -9,9 +9,9 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('shops_Operations'); -require_once(DEDEINC . '/datalistcp.class.php'); +require_once(DEDEINC.'/datalistcp.class.php'); if (isset($dopost)) { CheckPurview('shops_Operations_cpanel'); @@ -67,7 +67,7 @@ if (empty($oid)) $oid = 0; setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); if (isset($buyid)) { $buyid = preg_replace("#[^-0-9A-Z]#", "", $buyid); - $addsql = "WHERE s.oid='" . $buyid . "'"; + $addsql = "WHERE s.oid='".$buyid."'"; } if (isset($sta)) { $addsql = "WHERE s.`state`='$sta'"; @@ -77,7 +77,7 @@ $sql = "SELECT s.`oid`,s.`cartcount`,s.`price`,s.`state`,s.`stime`,s.priceCount, $dlist = new DataListCP(); $dlist->SetParameter("oid", $oid); if (isset($sta)) $dlist->SetParameter("sta", $sta); -$tplfile = DEDEADMIN . "/templets/shops_operations.htm"; +$tplfile = DEDEADMIN."/templets/shops_operations.htm"; //这两句的顺序不能更换 $dlist->SetTemplate($tplfile); //载入模板 @@ -117,7 +117,7 @@ function GetMemberID($mid) if ($mid == 0) return '0'; $row = $dsql->GetOne("SELECT userid FROM `#@__member` WHERE mid='$mid' "); if (is_array($row)) { - return "" . $row['userid'] . ""; + return "".$row['userid'].""; } else { return '0'; } diff --git a/src/dede/shops_operations_cart.php b/src/dede/shops_operations_cart.php index 2343c6cb..3678fcc0 100755 --- a/src/dede/shops_operations_cart.php +++ b/src/dede/shops_operations_cart.php @@ -9,8 +9,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -require_once(DEDEINC . "/datalistcp.class.php"); +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEINC."/datalistcp.class.php"); CheckPurview('shops_Operations'); if (!isset($oid)) exit("无效操作!"); @@ -23,7 +23,7 @@ $sql = "SELECT o.*,p.title,p.price as uprice,d.dname FROM `#@__shops_orders` as $dlist = new DataListCP(); $dlist->pageSize = 20; $dlist->SetParameter("oid", $oid); -$dlist->SetTemplate(DEDEADMIN . "/templets/shops_operations_cart.htm"); +$dlist->SetTemplate(DEDEADMIN."/templets/shops_operations_cart.htm"); $dlist->SetSource($sql); $dlist->Display(); $dlist->Close(); @@ -34,11 +34,11 @@ function GetSta($sta, $oid) $row = $dsql->GetOne("SELECT paytype FROM `#@__shops_orders` WHERE oid='$oid'"); $payname = $dsql->GetOne("SELECT name,fee FROM `#@__payment` WHERE id='{$row['paytype']}'"); if ($sta == 0) { - return $payname['name'] . " 手续费:" . $payname['fee'] . "元"; + return $payname['name']." 手续费:".$payname['fee']."元"; } else if ($sta == 1) { return '已付款,等发货'; } else if ($sta == 2) { - return '确认'; + return '确认'; } else { return '已完成'; } diff --git a/src/dede/shops_operations_userinfo.php b/src/dede/shops_operations_userinfo.php index aef9b539..d283a8ba 100755 --- a/src/dede/shops_operations_userinfo.php +++ b/src/dede/shops_operations_userinfo.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('shops_Operations'); if (!isset($oid)) exit("无效操作!"); $oid = preg_replace("#[^-0-9A-Z]#", "", $oid); @@ -28,5 +28,5 @@ if (is_array($row)) { $rows['dprice'] = $row['dprice']; } $rows['des'] = stripslashes($rows['des']); -include DEDEADMIN . "/templets/shops_operations_userinfo.htm"; +include DEDEADMIN."/templets/shops_operations_userinfo.htm"; unset($rows); diff --git a/src/dede/soft_add.php b/src/dede/soft_add.php index 1938828e..c9ec9852 100755 --- a/src/dede/soft_add.php +++ b/src/dede/soft_add.php @@ -9,15 +9,15 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('a_New,a_AccNew'); -require_once(DEDEINC . '/customfields.func.php'); -require_once(DEDEADMIN . '/inc/inc_archives_functions.php'); +require_once(DEDEINC.'/customfields.func.php'); +require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); if (empty($dopost)) $dopost = ''; if ($dopost != 'save') { - require_once(DEDEINC . '/dedetag.class.php'); - require_once(DEDEADMIN . '/inc/inc_catalog_options.php'); + require_once(DEDEINC.'/dedetag.class.php'); + require_once(DEDEADMIN.'/inc/inc_catalog_options.php'); ClearMyAddon(); $channelid = empty($channelid) ? 0 : intval($channelid); $cid = empty($cid) ? 0 : intval($cid); @@ -43,8 +43,8 @@ if ($dopost != 'save') { /*-------------------------------- function __save(){ } -------------------------------*/ else if ($dopost == 'save') { - require_once(DEDEINC . '/image.func.php'); - require_once(DEDEINC . '/oxwindow.class.php'); + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/oxwindow.class.php'); $flag = isset($flags) ? join(',', $flags) : ''; $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; @@ -110,15 +110,15 @@ function __save(){ } if ($litpic_b64 != "") { $data = explode(',', $litpic_b64); $ntime = time(); - $savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); CreateDir($savepath); - $fullUrl = $savepath . '/' . dd2char(MyDate('mdHis', $ntime) . $cuserLogin->getUserID() . mt_rand(1000, 9999)); - $fullUrl = $fullUrl . ".png"; + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir . $fullUrl, base64_decode($data[1])); + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); // 加水印 - WaterImg($cfg_basedir . $fullUrl, 'up'); + WaterImg($cfg_basedir.$fullUrl, 'up'); $litpic = $fullUrl; } @@ -156,18 +156,18 @@ function __save(){ } } ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); } - $inadd_f .= ',' . $vs[0]; - $inadd_v .= " ,'" . ${$vs[0]} . "' "; + $inadd_f .= ','.$vs[0]; + $inadd_v .= " ,'".${$vs[0]}."' "; } } } //处理图片文档的自定义属性 if ($litpic != '' && !preg_match('#p#', $flag)) { - $flag = ($flag == '' ? 'p' : $flag . ',p'); + $flag = ($flag == '' ? 'p' : $flag.',p'); } if ($redirecturl != '' && !preg_match('#j#', $flag)) { - $flag = ($flag == '' ? 'j' : $flag . ',j'); + $flag = ($flag == '' ? 'j' : $flag.',j'); } //跳转网址的文档强制为动态 @@ -180,7 +180,7 @@ function __save(){ } if (!$dsql->ExecuteNoneQuery($inQuery)) { $gerr = $dsql->GetError(); $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCMS官方。" . str_replace('"', '', $gerr), "javascript:;"); + ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCMS官方。".str_replace('"', '', $gerr), "javascript:;"); exit(); } @@ -194,11 +194,11 @@ function __save(){ } $urls .= "{dede:link islocal='1' text='{$servermsg1}'} $softurl1 {/dede:link}\r\n"; $autosize = empty($autosize) ? FALSE : TRUE; if ($autosize && empty($softsize)) { - $nsoftsize = @filesize($cfg_basedir . $softurl1); + $nsoftsize = @filesize($cfg_basedir.$softurl1); if (empty($nsoftsize)) $nsoftsize = '未知'; else { $nsoftsize = trim(sprintf("%0.2f", $nsoftsize / 1024 / 1024)); - $nsoftsize = $nsoftsize . " MB"; + $nsoftsize = $nsoftsize." MB"; } } } @@ -206,24 +206,24 @@ function __save(){ } //软件大小 if (!empty($nsoftsize)) $softsize = $nsoftsize; else if (empty($softsize)) $softsize = '未知'; - else $softsize = $softsize . ' ' . $unit; + else $softsize = $softsize.' '.$unit; //其它链接处理 for ($i = 2; $i <= 30; $i++) { - if (!empty(${'softurl' . $i})) { - $forconfig = empty(${'forconfig' . $i}) ? FALSE : TRUE; + if (!empty(${'softurl'.$i})) { + $forconfig = empty(${'forconfig'.$i}) ? FALSE : TRUE; if ($forconfig) { - if (empty(${'need' . $i})) continue; - $serverUrl = stripslashes(${'softurlfirst' . $i}); + if (empty(${'need'.$i})) continue; + $serverUrl = stripslashes(${'softurlfirst'.$i}); $serverUrl = preg_replace("#\/$#", "", $serverUrl); - $softurl = stripslashes(${'softurl' . $i}); - if (cn_substr($softurl, 1) != '/') $softurl = '/' . $softurl; - $softurl = $serverUrl . $softurl; + $softurl = stripslashes(${'softurl'.$i}); + if (cn_substr($softurl, 1) != '/') $softurl = '/'.$softurl; + $softurl = $serverUrl.$softurl; } else { - $softurl = stripslashes(${'softurl' . $i}); + $softurl = stripslashes(${'softurl'.$i}); } - $servermsg = str_replace("'", "", stripslashes(${'servermsg' . $i})); - if ($servermsg == '') $servermsg = '下载地址' . $i; + $servermsg = str_replace("'", "", stripslashes(${'servermsg'.$i})); + if ($servermsg == '') $servermsg = '下载地址'.$i; if ($softurl != 'http://') { $urls .= "{dede:link text='$servermsg'} $softurl {/dede:link}\r\n"; } @@ -250,7 +250,7 @@ function __save(){ } $gerr = $dsql->GetError(); $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCMS官方。" . str_replace('"', '', $gerr), "javascript:;"); + ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCMS官方。".str_replace('"', '', $gerr), "javascript:;"); exit(); } @@ -258,7 +258,7 @@ function __save(){ } InsertTags($tags, $arcID); $arcUrl = MakeArt($arcID, TRUE, TRUE, 0); if ($arcUrl == '') { - $arcUrl = $cfg_phpurl . "/view.php?aid=$arcID"; + $arcUrl = $cfg_phpurl."/view.php?aid=$arcID"; } ClearMyAddon($arcID, $title); @@ -281,13 +281,13 @@ function __save(){ }    查看软件    - 更改软件 + 更改软件    已发布软件管理    网站栏目管理 "; - $msg = "
{$msg}
" . GetUpdateTest(); + $msg = "
{$msg}
".GetUpdateTest(); $wintitle = "成功发布一个软件!"; $wecome_info = "文章管理::发布软件"; diff --git a/src/dede/soft_config.php b/src/dede/soft_config.php index aee30a1a..e2f2853b 100755 --- a/src/dede/soft_config.php +++ b/src/dede/soft_config.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_SoftConfig'); if (empty($dopost)) $dopost = ''; diff --git a/src/dede/soft_edit.php b/src/dede/soft_edit.php index 0e578438..a9026af3 100755 --- a/src/dede/soft_edit.php +++ b/src/dede/soft_edit.php @@ -9,15 +9,15 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('a_Edit,a_AccEdit,a_MyEdit'); -require_once(DEDEINC . "/customfields.func.php"); -require_once(DEDEADMIN . "/inc/inc_archives_functions.php"); +require_once(DEDEINC."/customfields.func.php"); +require_once(DEDEADMIN."/inc/inc_archives_functions.php"); if (empty($dopost)) $dopost = ''; if ($dopost != 'save') { - require_once(DEDEADMIN . "/inc/inc_catalog_options.php"); - require_once(DEDEINC . "/dedetag.class.php"); + require_once(DEDEADMIN."/inc/inc_catalog_options.php"); + require_once(DEDEINC."/dedetag.class.php"); ClearMyAddon(); $aid = preg_replace("#[^0-9]#", '', $aid); $channelid = "3"; @@ -37,7 +37,7 @@ if ($dopost != 'save') { ShowMsg("读取档案基本信息出错!", "-1"); exit(); } - $query = "SELECT * FROM `#@__channeltype` WHERE id='" . $arcRow['channel'] . "'"; + $query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; $cInfos = $dsql->GetOne($query); if (!is_array($cInfos)) { ShowMsg("读取频道配置信息出错!", "javascript:;"); @@ -58,9 +58,9 @@ if ($dopost != 'save') { if ($ctag->GetName() == 'link') { $islocal = $ctag->GetAtt('islocal'); if ($islocal != 1) $needmsg = "删除"; - else $needmsg = ''; - $nForm .= "
软件地址{$newRowStart}: - 服务器名称: + else $needmsg = ''; + $nForm .= "
软件地址{$newRowStart}: + 服务器名称: $needmsg
\r\n"; @@ -80,8 +80,8 @@ if ($dopost != 'save') { /*-------------------------------- function __save(){ } -------------------------------*/ else if ($dopost == 'save') { - require_once(DEDEINC . '/image.func.php'); - require_once(DEDEINC . '/oxwindow.class.php'); + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/oxwindow.class.php'); $flag = isset($flags) ? join(',', $flags) : ''; $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; @@ -145,15 +145,15 @@ function __save(){ } if ($litpic_b64 != "") { $data = explode(',', $litpic_b64); $ntime = time(); - $savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); CreateDir($savepath); - $fullUrl = $savepath . '/' . dd2char(MyDate('mdHis', $ntime) . $cuserLogin->getUserID() . mt_rand(1000, 9999)); - $fullUrl = $fullUrl . ".png"; + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir . $fullUrl, base64_decode($data[1])); + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); // 加水印 - WaterImg($cfg_basedir . $fullUrl, 'up'); + WaterImg($cfg_basedir.$fullUrl, 'up'); $litpic = $fullUrl; } @@ -179,17 +179,17 @@ function __save(){ } } ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $id); } - $inadd_f .= ",`{$vs[0]}` = '" . ${$vs[0]} . "'"; + $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; } } } //处理图片文档的自定义属性 if ($litpic != '' && !preg_match('#p#', $flag)) { - $flag = ($flag == '' ? 'p' : $flag . ',p'); + $flag = ($flag == '' ? 'p' : $flag.',p'); } if ($redirecturl != '' && !preg_match('#j#', $flag)) { - $flag = ($flag == '' ? 'j' : $flag . ',j'); + $flag = ($flag == '' ? 'j' : $flag.',j'); } //跳转网址的文档强制为动态 @@ -227,14 +227,14 @@ function __save(){ } $urls = ''; for ($i = 1; $i <= 30; $i++) { - if (!empty(${'softurl' . $i})) { - $islocal = empty(${'islocal' . $i}) ? '' : 1; - $isneed = empty(${'del' . $i}) ? true : false; - $servermsg = str_replace("'", '', stripslashes(${'servermsg' . $i})); - $softurl = stripslashes(${'softurl' . $i}); + if (!empty(${'softurl'.$i})) { + $islocal = empty(${'islocal'.$i}) ? '' : 1; + $isneed = empty(${'del'.$i}) ? true : false; + $servermsg = str_replace("'", '', stripslashes(${'servermsg'.$i})); + $softurl = stripslashes(${'softurl'.$i}); if ($servermsg == '') { - $servermsg = '下载地址' . $i; + $servermsg = '下载地址'.$i; } if ($softurl != 'http://') { if ($islocal == 1) $urls .= "{dede:link islocal='$islocal' text='{$servermsg}'} $softurl {/dede:link}\r\n"; @@ -280,7 +280,7 @@ function __save(){ } $arcUrl = MakeArt($id, TRUE, TRUE, $isremote); if ($arcUrl == "") { - $arcUrl = $cfg_phpurl . "/view.php?aid=$id"; + $arcUrl = $cfg_phpurl."/view.php?aid=$id"; } ClearMyAddon($id, $title); @@ -301,7 +301,7 @@ function __save(){ }   请选择你的后续操作: 发布新软件    - 继续修改 + 继续修改    查看软件    diff --git a/src/dede/spec_add.php b/src/dede/spec_add.php index ef76e206..334b629a 100755 --- a/src/dede/spec_add.php +++ b/src/dede/spec_add.php @@ -9,15 +9,15 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('a_New,a_AccNew'); -require_once(DEDEINC . "/customfields.func.php"); -require_once(DEDEADMIN . "/inc/inc_archives_functions.php"); +require_once(DEDEINC."/customfields.func.php"); +require_once(DEDEADMIN."/inc/inc_archives_functions.php"); if (empty($dopost)) $dopost = ''; if ($dopost != 'save') { - require_once(DEDEINC . '/dedetag.class.php'); - require_once(DEDEADMIN . '/inc/inc_catalog_options.php'); + require_once(DEDEINC.'/dedetag.class.php'); + require_once(DEDEADMIN.'/inc/inc_catalog_options.php'); ClearMyAddon(); $channelid = -1; $cid = isset($cid) && is_numeric($cid) ? $cid : 0; @@ -30,8 +30,8 @@ if ($dopost != 'save') { /*-------------------------------- function __save(){ } -------------------------------*/ else if ($dopost == 'save') { - require_once(DEDEINC . '/image.func.php'); - require_once(DEDEINC . '/oxwindow.class.php'); + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/oxwindow.class.php'); $flag = isset($flags) ? join(',', $flags) : ''; $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); @@ -78,15 +78,15 @@ function __save(){ } if ($litpic_b64 != "") { $data = explode(',', $litpic_b64); $ntime = time(); - $savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); CreateDir($savepath); - $fullUrl = $savepath . '/' . dd2char(MyDate('mdHis', $ntime) . $cuserLogin->getUserID() . mt_rand(1000, 9999)); - $fullUrl = $fullUrl . ".png"; + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir . $fullUrl, base64_decode($data[1])); + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); // 加水印 - WaterImg($cfg_basedir . $fullUrl, 'up'); + WaterImg($cfg_basedir.$fullUrl, 'up'); $litpic = $fullUrl; } @@ -106,7 +106,7 @@ function __save(){ } echo $inQuery; $gerr = $dsql->GetError(); $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCMS官方。" . str_replace('"', '', $gerr), "javascript:;"); + ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCMS官方。".str_replace('"', '', $gerr), "javascript:;"); exit(); } @@ -114,20 +114,20 @@ function __save(){ } $arcids = array(); $notelist = ''; for ($i = 1; $i <= $cfg_specnote; $i++) { - if (!empty(${'notename' . $i})) { - $notename = str_replace("'", "", trim(${'notename' . $i})); - $arcid = trim(${'arcid' . $i}); - $col = trim(${'col' . $i}); - $imgwidth = trim(${'imgwidth' . $i}); - $imgheight = trim(${'imgheight' . $i}); - $titlelen = trim(${'titlelen' . $i}); - $infolen = trim(${'infolen' . $i}); - $listtmp = trim(${'listtmp' . $i}); - $noteid = trim(${'noteid' . $i}); - $isauto = trim(${'isauto' . $i}); - $keywords = str_replace("'", "", trim(${'keywords' . $i})); - $typeid = trim(${'typeid' . $i}); - if (!empty(${'rownum' . $i})) $rownum = trim(${'rownum' . $i}); + if (!empty(${'notename'.$i})) { + $notename = str_replace("'", "", trim(${'notename'.$i})); + $arcid = trim(${'arcid'.$i}); + $col = trim(${'col'.$i}); + $imgwidth = trim(${'imgwidth'.$i}); + $imgheight = trim(${'imgheight'.$i}); + $titlelen = trim(${'titlelen'.$i}); + $infolen = trim(${'infolen'.$i}); + $listtmp = trim(${'listtmp'.$i}); + $noteid = trim(${'noteid'.$i}); + $isauto = trim(${'isauto'.$i}); + $keywords = str_replace("'", "", trim(${'keywords'.$i})); + $typeid = trim(${'typeid'.$i}); + if (!empty(${'rownum'.$i})) $rownum = trim(${'rownum'.$i}); else $rownum = 0; $arcid = preg_replace("#[^0-9,]#", "", $arcid); $ids = explode(",", $arcid); @@ -140,7 +140,7 @@ function __save(){ } if ($okids == "") { $okids .= $mid; } else { - $okids .= "," . $mid; + $okids .= ",".$mid; } $arcids[$mid] = 1; } @@ -177,15 +177,15 @@ function __save(){ } } ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); } - $inadd_f .= ',' . $vs[0]; - $inadd_v .= " ,'" . ${$vs[0]} . "' "; + $inadd_f .= ','.$vs[0]; + $inadd_v .= " ,'".${$vs[0]}."' "; } } } //处理图片文档的自定义属性 if ($litpic != '' && !preg_match('#p#', $flag)) { - $flag = ($flag == '' ? 'p' : $flag . ',p'); + $flag = ($flag == '' ? 'p' : $flag.',p'); } $useip = GetIP(); //加入附加表 @@ -201,7 +201,7 @@ function __save(){ } InsertTags($tags, $arcID); $artUrl = MakeArt($arcID, TRUE, TRUE, $isremote); if ($artUrl == '') { - $artUrl = $cfg_phpurl . "/view.php?aid=$arcID"; + $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; } ClearMyAddon($arcID, $title); diff --git a/src/dede/spec_edit.php b/src/dede/spec_edit.php index 9a631d4c..92261b4c 100755 --- a/src/dede/spec_edit.php +++ b/src/dede/spec_edit.php @@ -9,14 +9,14 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('a_Edit,a_AccEdit,a_MyEdit'); -require_once(DEDEINC . "/customfields.func.php"); -require_once(DEDEADMIN . "/inc/inc_archives_functions.php"); +require_once(DEDEINC."/customfields.func.php"); +require_once(DEDEADMIN."/inc/inc_archives_functions.php"); if (empty($dopost)) $dopost = ''; if ($dopost != 'save') { - require_once(DEDEADMIN . "/inc/inc_catalog_options.php"); - require_once(DEDEINC . "/dedetag.class.php"); + require_once(DEDEADMIN."/inc/inc_catalog_options.php"); + require_once(DEDEINC."/dedetag.class.php"); ClearMyAddon(); $aid = intval($aid); $channelid = -1; @@ -44,8 +44,8 @@ if ($dopost != 'save') { /*-------------------------------- function __save(){ } -------------------------------*/ else if ($dopost == 'save') { - require_once(DEDEINC . '/image.func.php'); - require_once(DEDEINC . '/oxwindow.class.php'); + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/oxwindow.class.php'); $flag = isset($flags) ? join(',', $flags) : ''; $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; @@ -88,15 +88,15 @@ function __save(){ } if ($litpic_b64 != "") { $data = explode(',', $litpic_b64); $ntime = time(); - $savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); CreateDir($savepath); - $fullUrl = $savepath . '/' . dd2char(MyDate('mdHis', $ntime) . $cuserLogin->getUserID() . mt_rand(1000, 9999)); - $fullUrl = $fullUrl . ".png"; + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir . $fullUrl, base64_decode($data[1])); + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); // 加水印 - WaterImg($cfg_basedir . $fullUrl, 'up'); + WaterImg($cfg_basedir.$fullUrl, 'up'); $litpic = $fullUrl; } @@ -122,14 +122,14 @@ function __save(){ } } ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); } - $inadd_f .= ",`{$vs[0]}` = '" . ${$vs[0]} . "'"; + $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; } } } //处理图片文档的自定义属性 if ($litpic != '' && !preg_match('#p#', $flag)) { - $flag = ($flag == '' ? 'p' : $flag . ',p'); + $flag = ($flag == '' ? 'p' : $flag.',p'); } $inQuery = "UPDATE `#@__archives` SET typeid='$typeid', @@ -159,37 +159,37 @@ function __save(){ } $arcids = array(); $notelist = ''; for ($i = 1; $i <= $cfg_specnote; $i++) { - if (!empty(${'notename' . $i})) { - $notename = str_replace("'", "", trim(${'notename' . $i})); - $arcid = trim(${'arcid' . $i}); - $col = trim(${'col' . $i}); - $imgwidth = trim(${'imgwidth' . $i}); - $imgheight = trim(${'imgheight' . $i}); - $titlelen = trim(${'titlelen' . $i}); - $infolen = trim(${'infolen' . $i}); - $listtmp = trim(${'listtmp' . $i}); - if (isset(${'noteid' . $i})) { - $noteid = trim(${'noteid' . $i}); + if (!empty(${'notename'.$i})) { + $notename = str_replace("'", "", trim(${'notename'.$i})); + $arcid = trim(${'arcid'.$i}); + $col = trim(${'col'.$i}); + $imgwidth = trim(${'imgwidth'.$i}); + $imgheight = trim(${'imgheight'.$i}); + $titlelen = trim(${'titlelen'.$i}); + $infolen = trim(${'infolen'.$i}); + $listtmp = trim(${'listtmp'.$i}); + if (isset(${'noteid'.$i})) { + $noteid = trim(${'noteid'.$i}); } else { $noteid = $i; } - if (isset(${'isauto' . $i})) { - $isauto = trim(${'isauto' . $i}); + if (isset(${'isauto'.$i})) { + $isauto = trim(${'isauto'.$i}); } else { $isauto = 0; } - if (isset(${'keywords' . $i})) { - $keywords = str_replace("'", "", trim(${'keywords' . $i})); + if (isset(${'keywords'.$i})) { + $keywords = str_replace("'", "", trim(${'keywords'.$i})); } else { $keywords = ""; } - if (!empty(${'typeid' . $i})) { - $ttypeid = trim(${'typeid' . $i}); + if (!empty(${'typeid'.$i})) { + $ttypeid = trim(${'typeid'.$i}); } else { $ttypeid = 0; } - if (!empty(${'rownum' . $i})) { - $rownum = trim(${'rownum' . $i}); + if (!empty(${'rownum'.$i})) { + $rownum = trim(${'rownum'.$i}); } else { $rownum = 0; } @@ -204,7 +204,7 @@ function __save(){ } if ($okids == "") { $okids .= $mid; } else { - $okids .= "," . $mid; + $okids .= ",".$mid; } $arcids[$mid] = 1; } @@ -230,7 +230,7 @@ function __save(){ } UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); $artUrl = MakeArt($id, TRUE, TRUE, $isremote); if ($artUrl == '') { - $artUrl = $cfg_phpurl . "/view.php?aid=$id"; + $artUrl = $cfg_phpurl."/view.php?aid=$id"; } ClearMyAddon($id, $title); @@ -250,7 +250,7 @@ function __save(){ } $msg = "  请选择你的后续操作: 发布新专题    - 查看更改 + 查看更改    查看专题    diff --git a/src/dede/stepselect_main.php b/src/dede/stepselect_main.php index e185f58e..8b28625a 100755 --- a/src/dede/stepselect_main.php +++ b/src/dede/stepselect_main.php @@ -9,10 +9,10 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('c_Stepselect'); -require_once(DEDEINC . "/datalistcp.class.php"); -require_once(DEDEINC . '/enums.func.php'); +require_once(DEDEINC."/datalistcp.class.php"); +require_once(DEDEINC.'/enums.func.php'); /*----------------- 前台视图 function __show() { } @@ -35,7 +35,7 @@ if (empty($action)) { if (!empty($topvalue)) { // 判断是否为1级联动 if ($topvalue % 500 == 0) { - $egroupsql = " WHERE egroup LIKE '$egroup' AND evalue>=$topvalue AND evalue < " . ($topvalue + 500); + $egroupsql = " WHERE egroup LIKE '$egroup' AND evalue>=$topvalue AND evalue < ".($topvalue + 500); } else { $egroupsql = " WHERE (evalue LIKE '$topvalue.%%%' OR evalue=$topvalue) AND egroup LIKE '$egroup'"; } @@ -51,7 +51,7 @@ if (empty($action)) { $dlist = new DataListCP(); $dlist->SetParameter('egroup', $egroup); $dlist->SetParameter('topvalue', $topvalue); - $dlist->SetTemplet(DEDEADMIN . "/templets/stepselect_main.htm"); + $dlist->SetTemplet(DEDEADMIN."/templets/stepselect_main.htm"); $dlist->SetSource($sql); $dlist->display(); exit(); @@ -66,16 +66,16 @@ function __del() { } ------------------*/ else if ($action == 'del') { $arr = $dsql->GetOne("SELECT * FROM `#@__stepselect` WHERE id='$id' "); if (!is_array($arr)) { - ShowMsg("无法获取分类信息,不允许后续操作!", "stepselect_main.php?" . ExecTime()); + ShowMsg("无法获取分类信息,不允许后续操作!", "stepselect_main.php?".ExecTime()); exit(); } if ($arr['issystem'] == 1) { - ShowMsg("系统内置的枚举分类不能删除!", "stepselect_main.php?" . ExecTime()); + ShowMsg("系统内置的枚举分类不能删除!", "stepselect_main.php?".ExecTime()); exit(); } $dsql->ExecuteNoneQuery("DELETE FROM `#@__stepselect` WHERE id='$id'; "); $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_enum` WHERE egroup='{$arr['egroup']}'; "); - ShowMsg("成功删除一个分类!", "stepselect_main.php?" . ExecTime()); + ShowMsg("成功删除一个分类!", "stepselect_main.php?".ExecTime()); exit(); } else if ($action == 'delenumAllSel') { if (isset($ids) && is_array($ids)) { @@ -115,7 +115,7 @@ function __edit_save() { } exit(); } $dsql->ExecuteNoneQuery("UPDATE `#@__stepselect` SET `itemname`='$itemname',`egroup`='$egroup' WHERE id='$id'; "); - ShowMsg("成功修改一个分类!", "stepselect_main.php?" . ExecTime()); + ShowMsg("成功修改一个分类!", "stepselect_main.php?".ExecTime()); exit(); } /*----------------- @@ -194,7 +194,7 @@ function __addenum_save() { } VALUES('$ename','$evalue','$egroup','$disorder','$issign'); "); } WriteEnumsCache($egroup); - ShowMsg("成功添加枚举分类!" . $dsql->GetError(), $ENV_GOBACK_URL); + ShowMsg("成功添加枚举分类!".$dsql->GetError(), $ENV_GOBACK_URL); exit(); } else if ($issign == 2 && $topvalue != 0) { $minid = $topvalue; @@ -204,13 +204,13 @@ function __addenum_save() { } $arr = $dsql->GetOne("SELECT * FROM `#@__sys_enum` WHERE egroup='$egroup' AND evalue LIKE '$topvalue.%%%' ORDER BY evalue DESC "); if (!is_array($arr)) { $disorder = $minid; - $evalue = $minid . '.001'; + $evalue = $minid.'.001'; } else { $disorder = $minid; preg_match("#([0-9]{1,})\.([0-9]{1,})#", $arr['evalue'], $matchs); $addvalue = $matchs[2] + 1; $addvalue = sprintf("%03d", $addvalue); - $evalue = $matchs[1] . '.' . $addvalue; + $evalue = $matchs[1].'.'.$addvalue; } $sql = "INSERT INTO `#@__sys_enum`(`ename`,`evalue`,`egroup`,`disorder`,`issign`) VALUES('$ename','$evalue','$egroup','$disorder','$issign'); "; diff --git a/src/dede/swfupload.php b/src/dede/swfupload.php index 304b845c..ccf7adb2 100755 --- a/src/dede/swfupload.php +++ b/src/dede/swfupload.php @@ -9,8 +9,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/config.php'); -require_once(DEDEINC . '/image.func.php'); +require_once(dirname(__FILE__).'/config.php'); +require_once(DEDEINC.'/image.func.php'); /************************ //上传 function Upload(){ } @@ -23,7 +23,7 @@ if (empty($dopost)) { } //把文件移动到临时目录 - $tmpdir = DEDEDATA . '/uploadtmp'; + $tmpdir = DEDEDATA.'/uploadtmp'; if (!is_dir($tmpdir)) { MkdirAll($tmpdir, $cfg_dir_purview); CloseFtp(); @@ -34,7 +34,7 @@ if (empty($dopost)) { } $FiledataNew = str_replace("\\", '/', $Filedata); - $FiledataNew = $tmpdir . '/' . preg_replace("/(.*)[\/]/isU", "", $FiledataNew); + $FiledataNew = $tmpdir.'/'.preg_replace("/(.*)[\/]/isU", "", $FiledataNew); move_uploaded_file($Filedata, $FiledataNew); $info = $ftype = $sname = ''; @@ -71,35 +71,35 @@ if (empty($dopost)) { } //保存原图 - $filedir = $cfg_image_dir . '/' . MyDate($cfg_addon_savetype, time()); - if (!is_dir(DEDEROOT . $filedir)) { - MkdirAll($cfg_basedir . $filedir, $cfg_dir_purview); + $filedir = $cfg_image_dir.'/'.MyDate($cfg_addon_savetype, time()); + if (!is_dir(DEDEROOT.$filedir)) { + MkdirAll($cfg_basedir.$filedir, $cfg_dir_purview); CloseFtp(); } - $filename = $cuserLogin->getUserID() . '-' . dd2char(MyDate('ymdHis', time())); - if (file_exists($cfg_basedir . $filedir . '/' . $filename . $sname)) { + $filename = $cuserLogin->getUserID().'-'.dd2char(MyDate('ymdHis', time())); + if (file_exists($cfg_basedir.$filedir.'/'.$filename.$sname)) { for ($i = 50; $i <= 5000; $i++) { - if (!file_exists($cfg_basedir . $filedir . '/' . $filename . '-' . $i . $sname)) { - $filename = $filename . '-' . $i; + if (!file_exists($cfg_basedir.$filedir.'/'.$filename.'-'.$i.$sname)) { + $filename = $filename.'-'.$i; break; } } } - $fileurl = $filedir . '/' . $filename . $sname; - $rs = copy($FiledataNew, $cfg_basedir . $fileurl); + $fileurl = $filedir.'/'.$filename.$sname; + $rs = copy($FiledataNew, $cfg_basedir.$fileurl); unlink($FiledataNew); if (!$rs) { echo "ERROR: Copy Uploadfile Error! "; exit(0); } //WaterImg($cfg_basedir.$fileurl, 'up'); - $title = $filename . $sname; + $title = $filename.$sname; $inquery = "INSERT INTO `#@__uploads`(title,url,mediatype,width,height,playtime,filesize,uptime,mid) - VALUES ('$title','$fileurl','$ftype','0','0','0','" . filesize($cfg_basedir . $fileurl) . "','" . time() . "','" . $cuserLogin->getUserID() . "'); "; + VALUES ('$title','$fileurl','$ftype','0','0','0','".filesize($cfg_basedir.$fileurl)."','".time()."','".$cuserLogin->getUserID()."'); "; if (!empty($arcid)) { $inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) - VALUES ('$arcid','$title','$fileurl','$ftype','0','0','0','" . filesize($cfg_basedir . $fileurl) . "','" . time() . "','" . $cuserLogin->getUserID() . "'); "; + VALUES ('$arcid','$title','$fileurl','$ftype','0','0','0','".filesize($cfg_basedir.$fileurl)."','".time()."','".$cuserLogin->getUserID()."'); "; } $dsql->ExecuteNoneQuery($inquery); @@ -108,7 +108,7 @@ if (empty($dopost)) { //生成缩略图 ob_start(); - ImageResizeNew($cfg_basedir . $fileurl, $cfg_ddimg_width, $cfg_ddimg_height, '', false); + ImageResizeNew($cfg_basedir.$fileurl, $cfg_ddimg_width, $cfg_ddimg_height, '', false); $imagevariable = ob_get_contents(); ob_end_clean(); @@ -120,7 +120,7 @@ if (empty($dopost)) { $_SESSION['bigfile_info'][$_SESSION['fileid']] = $fileurl; $_SESSION['file_info'][$_SESSION['fileid']] = $imagevariable; - echo "FILEID:" . $_SESSION['fileid']; + echo "FILEID:".$_SESSION['fileid']; exit(0); } /************************ @@ -138,7 +138,7 @@ else if ($dopost == 'thumbnail') { exit(0); } header('Content-type: image/jpeg'); - header('Content-Length: ' . strlen($_SESSION['file_info'][$id])); + header('Content-Length: '.strlen($_SESSION['file_info'][$id])); echo $_SESSION['file_info'][$id]; exit(0); } @@ -151,7 +151,7 @@ else if ($dopost == 'del') { exit(); } $dsql->ExecuteNoneQuery("DELETE FROM `#@__uploads` WHERE url LIKE '{$_SESSION['bigfile_info'][$id]}'; "); - @unlink($cfg_basedir . $_SESSION['bigfile_info'][$id]); + @unlink($cfg_basedir.$_SESSION['bigfile_info'][$id]); $_SESSION['file_info'][$id] = ''; $_SESSION['bigfile_info'][$id] = ''; echo "已删除!"; @@ -175,12 +175,12 @@ function GetddImg(){ } else if ($dopost == 'ddimg') { //生成缩略图 ob_start(); - if (!preg_match("/^(http[s]?:\/\/)?([^\/]+)/i", $img)) $img = $cfg_basedir . $img; + if (!preg_match("/^(http[s]?:\/\/)?([^\/]+)/i", $img)) $img = $cfg_basedir.$img; ImageResizeNew($img, $cfg_ddimg_width, $cfg_ddimg_height, '', false); $imagevariable = ob_get_contents(); ob_end_clean(); header('Content-type: image/jpeg'); - header('Content-Length: ' . strlen($imagevariable)); + header('Content-Length: '.strlen($imagevariable)); echo $imagevariable; exit(); } @@ -188,8 +188,8 @@ else if ($dopost == 'ddimg') { //删除指定的图片(编辑图集时用) *************************/ else if ($dopost == 'delold') { - $imgfile = $cfg_basedir . $picfile; - if (!file_exists($imgfile) && !is_dir($imgfile) && preg_match("#^" . $cfg_medias_dir . "#", $imgfile)) { + $imgfile = $cfg_basedir.$picfile; + if (!file_exists($imgfile) && !is_dir($imgfile) && preg_match("#^".$cfg_medias_dir."#", $imgfile)) { @unlink($imgfile); } $dsql->ExecuteNoneQuery("DELETE FROM `#@__uploads` WHERE url LIKE '{$picfile}'; "); diff --git a/src/dede/sys_admin_user.php b/src/dede/sys_admin_user.php index f47ad1c8..3cb18f87 100755 --- a/src/dede/sys_admin_user.php +++ b/src/dede/sys_admin_user.php @@ -9,9 +9,9 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_User'); -require_once(DEDEINC . "/datalistcp.class.php"); +require_once(DEDEINC."/datalistcp.class.php"); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); if (empty($rank)) $rank = ''; else $rank = " WHERE CONCAT(#@__admin.usertype)='$rank' "; @@ -23,7 +23,7 @@ while ($row = $dsql->GetObject()) { } $query = "SELECT #@__admin.*,#@__arctype.typename FROM #@__admin LEFT JOIN #@__arctype ON #@__admin.typeid = #@__arctype.id $rank "; $dlist = new DataListCP(); -$dlist->SetTemplet(DEDEADMIN . "/templets/sys_admin_user.htm"); +$dlist->SetTemplet(DEDEADMIN."/templets/sys_admin_user.htm"); $dlist->SetSource($query); $dlist->Display(); diff --git a/src/dede/sys_admin_user_add.php b/src/dede/sys_admin_user_add.php index d25eedab..e42373f2 100755 --- a/src/dede/sys_admin_user_add.php +++ b/src/dede/sys_admin_user_add.php @@ -9,9 +9,9 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_User'); -require_once(DEDEINC . "/typelink.class.php"); +require_once(DEDEINC."/typelink.class.php"); if (empty($dopost)) $dopost = ''; if ($dopost == 'add') { @@ -20,7 +20,7 @@ if ($dopost == 'add') { ShowMsg('密码或或用户名不合法,
请使用[0-9a-zA-Z_@!.-]内的字符!', '-1', 0, 3000); exit(); } - $safecodeok = substr(md5($cfg_cookie_encode . $randcode), 0, 24); + $safecodeok = substr(md5($cfg_cookie_encode.$randcode), 0, 24); if ($safecode != $safecodeok) { ShowMsg('请填写安全验证串!', '-1', 0, 3000); exit(); @@ -44,7 +44,7 @@ if ($dopost == 'add') { $mid = $dsql->GetLastID(); if ($mid <= 0) { - die($dsql->GetError() . ' 数据库出错!'); + die($dsql->GetError().' 数据库出错!'); } //后台管理员 @@ -69,7 +69,7 @@ if ($dopost == 'add') { exit(); } $randcode = mt_rand(10000, 99999); -$safecode = substr(md5($cfg_cookie_encode . $randcode), 0, 24); +$safecode = substr(md5($cfg_cookie_encode.$randcode), 0, 24); $typeOptions = ''; $dsql->SetQuery(" SELECT id,typename FROM `#@__arctype` WHERE reid=0 AND (ispart=0 OR ispart=1) "); $dsql->Execute('op'); diff --git a/src/dede/sys_admin_user_edit.php b/src/dede/sys_admin_user_edit.php index 96ded2f0..c691435d 100755 --- a/src/dede/sys_admin_user_edit.php +++ b/src/dede/sys_admin_user_edit.php @@ -9,9 +9,9 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/config.php'); +require_once(dirname(__FILE__).'/config.php'); CheckPurview('sys_User'); -require_once(DEDEINC . '/typelink.class.php'); +require_once(DEDEINC.'/typelink.class.php'); if (empty($dopost)) $dopost = ''; $id = preg_replace("#[^0-9]#", '', $id); @@ -22,15 +22,15 @@ if ($dopost == 'saveedit') { ShowMsg('密码不合法,请使用[0-9a-zA-Z_@!.-]内的字符!', '-1', 0, 3000); exit(); } - $safecodeok = substr(md5($cfg_cookie_encode . $randcode), 0, 24); + $safecodeok = substr(md5($cfg_cookie_encode.$randcode), 0, 24); if ($safecodeok != $safecode) { ShowMsg("请填写正确的安全验证串!", "sys_admin_user_edit.php?id={$id}&dopost=edit"); exit(); } $pwdm = ''; if ($pwd != '') { - $pwdm = ",pwd='" . md5($pwd) . "'"; - $pwd = ",pwd='" . substr(md5($pwd), 5, 20) . "'"; + $pwdm = ",pwd='".md5($pwd)."'"; + $pwd = ",pwd='".substr(md5($pwd), 5, 20)."'"; } if (empty($typeids)) { $typeid = ''; @@ -52,8 +52,8 @@ if ($dopost == 'saveedit') { if (empty($userok)) $userok = ""; if ($userok != "yes") { $randcode = mt_rand(10000, 99999); - $safecode = substr(md5($cfg_cookie_encode . $randcode), 0, 24); - require_once(DEDEINC . "/oxwindow.class.php"); + $safecode = substr(md5($cfg_cookie_encode.$randcode), 0, 24); + require_once(DEDEINC."/oxwindow.class.php"); $wintitle = "删除用户"; $wecome_info = "系统帐号管理::删除用户"; $win = new OxWindow(); @@ -70,14 +70,14 @@ if ($dopost == 'saveedit') { $win->Display(); exit(); } - $safecodeok = substr(md5($cfg_cookie_encode . $randcode), 0, 24); + $safecodeok = substr(md5($cfg_cookie_encode.$randcode), 0, 24); if ($safecodeok != $safecode) { ShowMsg("请填写正确的安全验证串!", "sys_admin_user.php"); exit(); } //不能删除id为1的创建人帐号,不能删除自己 - $rs = $dsql->ExecuteNoneQuery2("DELETE FROM `#@__admin` WHERE id='$id' AND id<>1 AND id<>'" . $cuserLogin->getUserID() . "' "); + $rs = $dsql->ExecuteNoneQuery2("DELETE FROM `#@__admin` WHERE id='$id' AND id<>1 AND id<>'".$cuserLogin->getUserID()."' "); if ($rs > 0) { //更新前台用户信息 $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET matt='0' WHERE mid='$id' LIMIT 1"); @@ -90,7 +90,7 @@ if ($dopost == 'saveedit') { //显示用户信息 $randcode = mt_rand(10000, 99999); -$safecode = substr(md5($cfg_cookie_encode . $randcode), 0, 24); +$safecode = substr(md5($cfg_cookie_encode.$randcode), 0, 24); $typeOptions = ''; $row = $dsql->GetOne("SELECT * FROM `#@__admin` WHERE id='$id'"); $typeids = explode(',', $row['typeid']); @@ -98,12 +98,12 @@ $dsql->SetQuery("SELECT id,typename FROM `#@__arctype` WHERE reid=0 AND (ispart= $dsql->Execute('op'); while ($nrow = $dsql->GetObject('op')) { - $typeOptions .= "\r\n"; + $typeOptions .= "\r\n"; $dsql->SetQuery("SELECT id,typename FROM #@__arctype WHERE reid={$nrow->id} AND (ispart=0 OR ispart=1)"); $dsql->Execute('s'); while ($nrow = $dsql->GetObject('s')) { - $typeOptions .= "\r\n"; + $typeOptions .= "\r\n"; } } make_hash(); diff --git a/src/dede/sys_admin_user_tj.php b/src/dede/sys_admin_user_tj.php index 7cec8cbe..d4c46ce2 100755 --- a/src/dede/sys_admin_user_tj.php +++ b/src/dede/sys_admin_user_tj.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_User'); if (isset($dopost) && $dopost == 'getone') { @@ -35,10 +35,10 @@ if (isset($dopost) && $dopost == 'getone') { //季度 $starttime = 0; - if (preg_match("#[123]#", $m) && $m < 10) $starttime = $y . "-01-01 00:00:00"; - else if (preg_match("#[456]#", $m)) $starttime = $y . "-04-01 00:00:00"; - else if (preg_match("#[789]#", $m)) $starttime = $y . "-07-01 00:00:00"; - else $starttime = $y . "-10-01 00:00:00"; + if (preg_match("#[123]#", $m) && $m < 10) $starttime = $y."-01-01 00:00:00"; + else if (preg_match("#[456]#", $m)) $starttime = $y."-04-01 00:00:00"; + else if (preg_match("#[789]#", $m)) $starttime = $y."-07-01 00:00:00"; + else $starttime = $y."-10-01 00:00:00"; $istarttime = GetMkTime($starttime); $sql = "SELECT addtable FROM `#@__channeltype` WHERE issystem='-1'"; $dsql->Execute('me', $sql); @@ -54,7 +54,7 @@ if (isset($dopost) && $dopost == 'getone') { $ccs = $row['cc'] + $ccs; //当月 - $starttime = $y . "-{$m}-01 00:00:00"; + $starttime = $y."-{$m}-01 00:00:00"; $istarttime = GetMkTime($starttime); $sql = "SELECT addtable FROM `#@__channeltype` WHERE issystem='-1'"; $dsql->Execute('me', $sql); @@ -70,7 +70,7 @@ if (isset($dopost) && $dopost == 'getone') { $ccm = $row['cc'] + $ccm; //本周 - $starttime = $y . "-{$m}-{$d} 00:00:00"; + $starttime = $y."-{$m}-{$d} 00:00:00"; $istarttime = GetMkTime($starttime) - (7 * 24 * 3600); $sql = "SELECT addtable FROM `#@__channeltype` WHERE issystem='-1'"; $dsql->Execute('me', $sql); @@ -86,7 +86,7 @@ if (isset($dopost) && $dopost == 'getone') { $ccw = $row['cc'] + $ccw; //当天 - $starttime = $y . "-{$m}-{$d} 00:00:00"; + $starttime = $y."-{$m}-{$d} 00:00:00"; $istarttime = GetMkTime($starttime); $sql = "SELECT addtable FROM `#@__channeltype` WHERE issystem='-1'"; $dsql->Execute('me', $sql); diff --git a/src/dede/sys_cache_up.php b/src/dede/sys_cache_up.php index a764fc18..20e7bad3 100755 --- a/src/dede/sys_cache_up.php +++ b/src/dede/sys_cache_up.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_ArcBatch'); if (empty($dopost)) $dopost = ''; if (empty($step)) $step = 1; @@ -32,7 +32,7 @@ if ($dopost == "ok") { //更新枚举缓存 else if ($step == 2) { - include_once(DEDEINC . "/enums.func.php"); + include_once(DEDEINC."/enums.func.php"); WriteEnumsCache(); //WriteAreaCache(); 已过期 ShowMsg("成功更新枚举缓存,准备更新调用缓存...", "sys_cache_up.php?dopost=ok&step=3&uparc=$uparc"); @@ -41,7 +41,7 @@ if ($dopost == "ok") { //清理arclist调用缓存、过期会员访问历史、过期短信 else if ($step == 3) { - echo ''; + echo ''; $dsql->ExecuteNoneQuery("DELETE FROM `#@__arccache`"); echo "\n成功更新arclist调用缓存,准备清理过期会员访问历史...
"; $oldtime = time() - (90 * 24 * 3600); diff --git a/src/dede/sys_data.php b/src/dede/sys_data.php index 7ec77bbb..3362a013 100755 --- a/src/dede/sys_data.php +++ b/src/dede/sys_data.php @@ -9,12 +9,12 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_Data'); if (empty($dopost)) $dopost = ''; if ($cfg_dbtype == 'sqlite') { - showMsg('备份系统根目录下/data/' . $cfg_dbname . '.db文件即可', 'javascript:;'); + showMsg('备份系统根目录下/data/'.$cfg_dbname.'.db文件即可', 'javascript:;'); exit(); } @@ -24,7 +24,7 @@ if ($dopost == "viewinfo") //查看表结构 if (empty($tablename)) { echo "没有指定表名!"; } else { - $dsql->SetQuery("SHOW CREATE TABLE " . $dsql->dbName . "." . $tablename); + $dsql->SetQuery("SHOW CREATE TABLE ".$dsql->dbName.".".$tablename); $dsql->Execute('me'); $row2 = $dsql->GetArray('me', MYSQL_BOTH); $ctinfo = $row2[1]; @@ -42,7 +42,7 @@ if ($dopost == "viewinfo") //查看表结构 if ($rs) { echo "执行优化表: $tablename OK!"; } else { - echo "执行优化表: $tablename 失败,原因是:" . $dsql->GetError(); + echo "执行优化表: $tablename 失败,原因是:".$dsql->GetError(); } } echo ''; @@ -57,7 +57,7 @@ if ($dopost == "viewinfo") //查看表结构 if ($rs) { echo "修复表: $tablename OK!"; } else { - echo "修复表: $tablename 失败,原因是:" . $dsql->GetError(); + echo "修复表: $tablename 失败,原因是:".$dsql->GetError(); } } echo ''; diff --git a/src/dede/sys_data_done.php b/src/dede/sys_data_done.php index 2c687d74..f7b72032 100755 --- a/src/dede/sys_data_done.php +++ b/src/dede/sys_data_done.php @@ -12,16 +12,16 @@ @ob_start(); @set_time_limit(0); ini_set('memory_limit', '-1'); -require_once(dirname(__FILE__) . '/config.php'); +require_once(dirname(__FILE__).'/config.php'); CheckPurview('sys_Data'); if (empty($dopost)) $dopost = ''; -$bkdir = DEDEDATA . '/' . $cfg_backup_dir; +$bkdir = DEDEDATA.'/'.$cfg_backup_dir; //跳转到一下页的JS $gotojs = "function GotoNextPage(){ - document.gonext." . "submit(); -}" . "\r\nset" . "Timeout('GotoNextPage()',500);"; + document.gonext."."submit(); +}"."\r\nset"."Timeout('GotoNextPage()',500);"; $dojs = ""; @@ -66,7 +66,7 @@ if ($dopost == 'bak') { if (!preg_match("#txt$#", $filename)) { continue; } - $filename = $bkdir . "/$filename"; + $filename = $bkdir."/$filename"; if (!is_dir($filename)) { unlink($filename); } @@ -75,22 +75,22 @@ if ($dopost == 'bak') { $tmsg .= "清除备份目录旧数据完成...
"; if ($isstruct == 1) { - $bkfile = $bkdir . "/tables_struct_" . substr(md5(time() . mt_rand(1000, 5000) . $cfg_cookie_encode), 0, 16) . ".txt"; + $bkfile = $bkdir."/tables_struct_".substr(md5(time().mt_rand(1000, 5000).$cfg_cookie_encode), 0, 16).".txt"; $mysql_version = $dsql->GetVersion(); $fp = fopen($bkfile, "w"); foreach ($tables as $t) { fwrite($fp, "DROP TABLE IF EXISTS `$t`;\r\n\r\n"); - $dsql->SetQuery("SHOW CREATE TABLE " . $dsql->dbName . "." . $t); + $dsql->SetQuery("SHOW CREATE TABLE ".$dsql->dbName.".".$t); $dsql->Execute('me'); $row = $dsql->GetArray('me', MYSQL_BOTH); // 去除AUTO_INCREMENT $row[1] = preg_replace("#AUTO_INCREMENT=([0-9]{1,})[ \r\n\t]{1,}#i", "", $row[1]); - $eng1 = "#ENGINE=MyISAM[ \r\n\t]{1,}DEFAULT[ \r\n\t]{1,}CHARSET=" . $cfg_db_language . "#i"; + $eng1 = "#ENGINE=MyISAM[ \r\n\t]{1,}DEFAULT[ \r\n\t]{1,}CHARSET=".$cfg_db_language."#i"; $tableStruct = preg_replace($eng1, "TYPE=MyISAM", $row[1]); - fwrite($fp, '' . $tableStruct . ";\r\n\r\n"); + fwrite($fp, ''.$tableStruct.";\r\n\r\n"); } fclose($fp); $tmsg .= "备份数据表结构信息完成...
"; @@ -127,7 +127,7 @@ if ($dopost == 'bak') { $dsql->SetQuery("SELECT * FROM `$nowtable` "); $dsql->Execute(); $m = 0; - $bakfilename = "$bkdir/{$nowtable}_{$startpos}_" . substr(md5(time() . mt_rand(1000, 5000) . $cfg_cookie_encode), 0, 16) . ".txt"; + $bakfilename = "$bkdir/{$nowtable}_{$startpos}_".substr(md5(time().mt_rand(1000, 5000).$cfg_cookie_encode), 0, 16).".txt"; while ($row2 = $dsql->GetArray()) { if ($m < $startpos) { $m++; @@ -157,9 +157,9 @@ if ($dopost == 'bak') { for ($j = 0; $j <= $fsd; $j++) { if ($j < $fsd) { - $line .= "'" . RpLine(addslashes($row2[$fs[$j]])) . "',"; + $line .= "'".RpLine(addslashes($row2[$fs[$j]]))."',"; } else { - $line .= "'" . RpLine(addslashes($row2[$fs[$j]])) . "');\r\n"; + $line .= "'".RpLine(addslashes($row2[$fs[$j]]))."');\r\n"; } } $m++; @@ -226,7 +226,7 @@ else if ($dopost == 'redat') { $querys = explode(';', $tbdata); foreach ($querys as $q) { $q = preg_replace("#TYPE=MyISAM#i","ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language, $q); - $rs = $dsql->ExecuteNoneQuery(trim($q) . ';'); + $rs = $dsql->ExecuteNoneQuery(trim($q).';'); } if ($delfile == 1) { @unlink("$bkdir/$structfile"); @@ -241,7 +241,7 @@ else if ($dopost == 'redat') { exit(); } else { $nowfile = $bakfiles[0]; - $bakfilesTmp = preg_replace("#" . $nowfile . "[,]{0,1}#", "", $bakfilesTmp); + $bakfilesTmp = preg_replace("#".$nowfile."[,]{0,1}#", "", $bakfilesTmp); $oknum = 0; if (filesize("$bkdir/$nowfile") > 0) { $fp = fopen("$bkdir/$nowfile", 'r'); @@ -280,7 +280,7 @@ function PutInfo($msg1, $msg2) DedeBIZ 提示信息 \n\n\n
{$msg2}"; - echo $msginfo . "\n\n"; + echo $msginfo."\n\n"; } function RpLine($str) diff --git a/src/dede/sys_data_replace.php b/src/dede/sys_data_replace.php index 796628ef..ab35979e 100755 --- a/src/dede/sys_data_replace.php +++ b/src/dede/sys_data_replace.php @@ -9,11 +9,11 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/config.php'); +require_once(dirname(__FILE__).'/config.php'); CheckPurview('sys_Data'); if (empty($action)) $action = ''; if (empty($action)) { - require_once(DEDEADMIN . "/templets/sys_data_replace.htm"); + require_once(DEDEADMIN."/templets/sys_data_replace.htm"); exit(); } @@ -24,9 +24,9 @@ function __getfields() AjaxHead(); $dsql->GetTableFields($exptable); echo "
"; - echo "表(" . $exptable . ")含有的字段:
"; + echo "表(".$exptable.")含有的字段:
"; while ($row = $dsql->GetFieldObject()) { - echo "name}')\">" . $row->name . "\r\n"; + echo "name}')\">".$row->name."\r\n"; } echo "
"; exit(); @@ -75,7 +75,7 @@ function __Apply() $oo = 0; while ($row = $dsql->GetArray()) { $kid = $row[$keyfield]; - $rpf = preg_replace("#" . $rpstring . "#i", $tostring, $row[$rpfield]); + $rpf = preg_replace("#".$rpstring."#i", $tostring, $row[$rpfield]); $rs = $dsql->ExecuteNoneQuery("UPDATE $exptable SET $rpfield='$rpf' WHERE $keyfield='$kid' "); if ($rs) { $oo++; diff --git a/src/dede/sys_data_revert.php b/src/dede/sys_data_revert.php index 235263ec..90f80e22 100755 --- a/src/dede/sys_data_revert.php +++ b/src/dede/sys_data_revert.php @@ -7,9 +7,9 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_Data'); -$bkdir = DEDEDATA . "/" . $cfg_backup_dir; +$bkdir = DEDEDATA."/".$cfg_backup_dir; $filelists = array(); $dh = dir($bkdir); $structfile = "没找到数据结构文件"; diff --git a/src/dede/sys_group.php b/src/dede/sys_group.php index 7765cd97..77312905 100755 --- a/src/dede/sys_group.php +++ b/src/dede/sys_group.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_Group'); if (empty($dopost)) $dopost = ""; include DedeInclude('templets/sys_group.htm'); diff --git a/src/dede/sys_group_add.php b/src/dede/sys_group_add.php index ad2d23c3..ee320bae 100755 --- a/src/dede/sys_group_add.php +++ b/src/dede/sys_group_add.php @@ -9,10 +9,10 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_Group'); if (!empty($dopost)) { - $row = $dsql->GetOne("SELECT * FROM #@__admintype WHERE rank='" . $rankid . "'"); + $row = $dsql->GetOne("SELECT * FROM #@__admintype WHERE rank='".$rankid."'"); if (is_array($row)) { ShowMsg('你所创建的组别的级别值已存在,不允许重复!', '-1'); exit(); @@ -24,7 +24,7 @@ if (!empty($dopost)) { $AllPurviews = ''; if (is_array($purviews)) { foreach ($purviews as $pur) { - $AllPurviews = $pur . ' '; + $AllPurviews = $pur.' '; } $AllPurviews = trim($AllPurviews); } diff --git a/src/dede/sys_group_edit.php b/src/dede/sys_group_edit.php index 1c35afc9..5bbb6f08 100755 --- a/src/dede/sys_group_edit.php +++ b/src/dede/sys_group_edit.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_Group'); if (empty($dopost)) $dopost = ""; diff --git a/src/dede/sys_info.php b/src/dede/sys_info.php index 50c0f1d8..34a5abbf 100755 --- a/src/dede/sys_info.php +++ b/src/dede/sys_info.php @@ -9,11 +9,11 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_Edit'); if (empty($dopost)) $dopost = ""; -$configfile = DEDEDATA . '/config.cache.inc.php'; +$configfile = DEDEDATA.'/config.cache.inc.php'; //更新配置函数 function ReWriteConfig() @@ -25,18 +25,18 @@ function ReWriteConfig() } $fp = fopen($configfile, 'w'); flock($fp, 3); - fwrite($fp, "<" . "?php\r\n"); + fwrite($fp, "<"."?php\r\n"); $dsql->SetQuery("SELECT `varname`,`type`,`value`,`groupid` FROM `#@__sysconfig` ORDER BY aid ASC "); $dsql->Execute(); while ($row = $dsql->GetArray()) { if ($row['type'] == 'number') { if ($row['value'] == '') $row['value'] = 0; - fwrite($fp, "\${$row['varname']} = " . $row['value'] . ";\r\n"); + fwrite($fp, "\${$row['varname']} = ".$row['value'].";\r\n"); } else { - fwrite($fp, "\${$row['varname']} = '" . str_replace("'", '', $row['value']) . "';\r\n"); + fwrite($fp, "\${$row['varname']} = '".str_replace("'", '', $row['value'])."';\r\n"); } } - fwrite($fp, "?" . ">"); + fwrite($fp, "?".">"); fclose($fp); } @@ -111,8 +111,8 @@ EOT; while ($row = $dsql->GetArray()) { $bgcolor = ($i++ % 2 == 0) ? "#F9FCEF" : "#ffffff"; - $row['info'] = preg_replace("#{$keywords}#", '' . $keywords . '', $row['info']); - $row['varname'] = preg_replace("#{$keywords}#", '' . $keywords . '', $row['varname']); + $row['info'] = preg_replace("#{$keywords}#", ''.$keywords.'', $row['info']); + $row['varname'] = preg_replace("#{$keywords}#", ''.$keywords.'', $row['varname']); ?> : @@ -125,11 +125,11 @@ EOT; echo ""; echo ""; } else if ($row['type'] == 'bstring') { - echo ""; + echo ""; } else if ($row['type'] == 'number') { echo ""; } else { - echo ""; + echo ""; } ?> diff --git a/src/dede/sys_info_mark.php b/src/dede/sys_info_mark.php index 49f993d3..99ec2c5f 100755 --- a/src/dede/sys_info_mark.php +++ b/src/dede/sys_info_mark.php @@ -9,14 +9,14 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_Edit'); -require_once(DEDEINC . "/image.func.php"); +require_once(DEDEINC."/image.func.php"); if ($cfg_photo_support == '') { echo "你的系统没安装GD库,不允许使用本功能!"; exit(); } -$ImageWaterConfigFile = DEDEDATA . "/mark/inc_photowatermark_config.php"; +$ImageWaterConfigFile = DEDEDATA."/mark/inc_photowatermark_config.php"; if (empty($action)) $action = ""; $allow_mark_types = array( 'image/gif', @@ -27,8 +27,8 @@ if ($action == "save") { $vars = array('photo_markup', 'photo_markdown', 'photo_marktype', 'photo_wwidth', 'photo_wheight', 'photo_waterpos', 'photo_watertext', 'photo_fontsize', 'photo_fontcolor', 'photo_marktrans', 'photo_diaphaneity'); $configstr = $shortname = ""; foreach ($vars as $v) { - ${$v} = str_replace("'", "", ${'get_' . $v}); - $configstr .= "\${$v} = '" . ${$v} . "';\r\n"; + ${$v} = str_replace("'", "", ${'get_'.$v}); + $configstr .= "\${$v} = '".${$v}."';\r\n"; } if (is_uploaded_file($newimg)) { $imgfile_type = strtolower(trim($newimg_type)); @@ -45,11 +45,11 @@ if ($action == "save") { ShowMsg("水印图片仅支持gif、png格式的其中一种!", "-1"); exit; } - $photo_markimg = 'mark' . $shortname; - @move_uploaded_file($newimg, DEDEDATA . "/mark/" . $photo_markimg); + $photo_markimg = 'mark'.$shortname; + @move_uploaded_file($newimg, DEDEDATA."/mark/".$photo_markimg); } $configstr .= "\$photo_markimg = '{$photo_markimg}';\r\n"; - $configstr = "<" . "?php\r\n" . $configstr . "?" . ">\r\n"; + $configstr = "<"."?php\r\n".$configstr."?".">\r\n"; $fp = fopen($ImageWaterConfigFile, "w") or die("写入文件 $ImageWaterConfigFile 失败,请检查权限!"); fwrite($fp, $configstr); fclose($fp); diff --git a/src/dede/sys_passport.php b/src/dede/sys_passport.php index 89f5b3be..0c4c4e82 100755 --- a/src/dede/sys_passport.php +++ b/src/dede/sys_passport.php @@ -9,21 +9,21 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); if (!isset($dopost)) $dopost = ""; if ($dopost == 'save') { - $ConfigFile = DEDEINC . "/config_passport.php"; + $ConfigFile = DEDEINC."/config_passport.php"; $vars = array('cfg_pp_need', 'cfg_pp_encode', 'cfg_pp_login', 'cfg_pp_exit', 'cfg_pp_reg'); $configstr = ""; foreach ($vars as $v) { ${$v} = str_replace("'", "", ${$v}); - $configstr .= "\${$v} = '" . str_replace("'", "", stripslashes(${'edit___' . $v})) . "';\r\n"; + $configstr .= "\${$v} = '".str_replace("'", "", stripslashes(${'edit___'.$v}))."';\r\n"; } - $configstr = '<' . '?' . "\r\n" . $configstr . '?' . '>'; + $configstr = '<'.'?'."\r\n".$configstr.'?'.'>'; $fp = fopen($ConfigFile, "w") or die("写入文件 $ConfigFile 失败,请检查权限!"); fwrite($fp, $configstr); fclose($fp); - echo "\r\n"; + echo "\r\n"; } include DedeInclude('templets/sys_passport.htm'); diff --git a/src/dede/sys_payment.php b/src/dede/sys_payment.php index 12c0554e..18b090ce 100755 --- a/src/dede/sys_payment.php +++ b/src/dede/sys_payment.php @@ -9,8 +9,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -require_once(DEDEINC . '/datalistcp.class.php'); +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEINC.'/datalistcp.class.php'); CheckPurview('sys_Data'); $dopost = (empty($dopost)) ? '' : $dopost; @@ -190,16 +190,16 @@ else if ($dopost == 'config') { } else if ($cfg_soft_lang == 'gb2312') { $config = unserialize($row['config']); } - $payments = "'code' => '" . $row['code'] . "',"; + $payments = "'code' => '".$row['code']."',"; foreach ($config as $key => $v) { $config[$key]['value'] = ${$key}; - $payments .= "'" . $key . "' => '" . $config[$key]['value'] . "',"; + $payments .= "'".$key."' => '".$config[$key]['value']."',"; } $payments = substr($payments, 0, -1); - $payment = "\$payment=array(" . $payments . ")"; - $configstr = "<" . "?php\r\n" . $payment . "\r\n?" . ">\r\n"; + $payment = "\$payment=array(".$payments.")"; + $configstr = "<"."?php\r\n".$payment."\r\n?".">\r\n"; if (!empty($payment)) { - $m_file = DEDEDATA . "/payment/" . $row['code'] . ".php"; + $m_file = DEDEDATA."/payment/".$row['code'].".php"; $fp = fopen($m_file, "w") or die("写入文件 $safeconfigfile 失败,请检查权限!"); fwrite($fp, $configstr); fclose($fp); @@ -239,13 +239,13 @@ else if ($dopost == 'uninstall') { $query = "UPDATE `#@__payment` SET fee='',config='$config',enabled='0' WHERE id='$pid'"; $dsql->ExecuteNoneQuery($query); //同时需要删除对应的缓存 - $m_file = DEDEDATA . "/payment/" . $row['code'] . ".php"; + $m_file = DEDEDATA."/payment/".$row['code'].".php"; @unlink($m_file); ShowMsg("删除成功!", "sys_payment.php"); exit(); } $sql = "SELECT * FROM `#@__payment` ORDER BY rank ASC"; $dlist = new DataListCP(); -$dlist->SetTemplet(DEDEADMIN . "/templets/sys_payment.htm"); +$dlist->SetTemplet(DEDEADMIN."/templets/sys_payment.htm"); $dlist->SetSource($sql); $dlist->display(); diff --git a/src/dede/sys_repair.php b/src/dede/sys_repair.php index e83f87e8..48167a73 100755 --- a/src/dede/sys_repair.php +++ b/src/dede/sys_repair.php @@ -9,9 +9,9 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/config.php'); +require_once(dirname(__FILE__).'/config.php'); CheckPurview('sys_ArcBatch'); -require_once(dirname(__FILE__) . '/../include/oxwindow.class.php'); +require_once(dirname(__FILE__).'/../include/oxwindow.class.php'); //ShowMsg("目前暂不需要此工具,以后有需要系统会进行自动升级这个程序!
<<点击此返回>>", "javascript:;"); //exit(); if (empty($dopost)) { diff --git a/src/dede/sys_safetest.php b/src/dede/sys_safetest.php index 379ad6b7..21c09cd4 100755 --- a/src/dede/sys_safetest.php +++ b/src/dede/sys_safetest.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/config.php'); +require_once(dirname(__FILE__).'/config.php'); CheckPurview('sys_Edit'); if (empty($action)) $action = ''; if (empty($message)) $message = '尚未进行检测……'; @@ -48,8 +48,8 @@ function TestOneFile($f) } fclose($fp); - if (preg_match("#(" . $info . ")[ \r\n\t]{0,}([\[\(])#i", $str)) { - $trfile = preg_replace("#^" . DEDEROOT . "#", '', $f); + if (preg_match("#(".$info.")[ \r\n\t]{0,}([\[\(])#i", $str)) { + $trfile = preg_replace("#^".DEDEROOT."#", '', $f); $oldTrfile = $trfile; $trfile = substr(str_replace("/", "\\", $trfile), 1); @@ -75,11 +75,11 @@ function TestSafe($tdir) global $filetype; $dh = dir($tdir); while ($fname = $dh->read()) { - $fnamef = $tdir . '/' . $fname; + $fnamef = $tdir.'/'.$fname; if (@is_dir($fnamef) && $fname != '.' && $fname != '..') { TestSafe($fnamef); } - if (preg_match("#\.(" . $filetype . ")#i", $fnamef)) { + if (preg_match("#\.(".$filetype.")#i", $fnamef)) { TestOneFile($fnamef); } } @@ -114,7 +114,7 @@ if ($action == 'test') { fclose($fp); } - include(dirname(__FILE__) . '/templets/sys_safetest_viewdiff.htm'); + include(dirname(__FILE__).'/templets/sys_safetest_viewdiff.htm'); exit(); } @@ -122,14 +122,14 @@ if ($action == 'test') { else if ($action == 'clear') { global $cfg_tplcache_dir; $message = ''; - $d = DEDEROOT . $cfg_tplcache_dir; + $d = DEDEROOT.$cfg_tplcache_dir; AjaxHead(); sleep(1); if (preg_match("#data\/#", $cfg_tplcache_dir) && file_exists($d) && is_dir($d)) { $dh = dir($d); while ($filename = $dh->read()) { if ($filename == '.' || $filename == '..' || $filename == 'index.html') continue; - @unlink($d . '/' . $filename); + @unlink($d.'/'.$filename); } } $message = "成功清空模板缓存!"; @@ -137,5 +137,5 @@ else if ($action == 'clear') { exit(); } -include(dirname(__FILE__) . '/templets/sys_safetest.htm'); +include(dirname(__FILE__).'/templets/sys_safetest.htm'); ?> \ No newline at end of file diff --git a/src/dede/sys_sql_query.php b/src/dede/sys_sql_query.php index 35816077..14303083 100755 --- a/src/dede/sys_sql_query.php +++ b/src/dede/sys_sql_query.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require(dirname(__FILE__) . "/config.php"); +require(dirname(__FILE__)."/config.php"); CheckPurview('sys_Data'); if (empty($dopost)) $dopost = ""; @@ -19,11 +19,11 @@ if ($dopost == "viewinfo") { if (empty($tablename)) { echo "没有指定表名!"; } else { - $dsql->SetQuery("SHOW CREATE TABLE " . $dsql->dbName . "." . $tablename); + $dsql->SetQuery("SHOW CREATE TABLE ".$dsql->dbName.".".$tablename); $dsql->Execute('me'); $row2 = $dsql->GetArray('me', MYSQL_BOTH); $ctinfo = $row2[1]; - echo "" . trim($ctinfo) . ""; + echo "".trim($ctinfo).""; } exit(); } @@ -35,7 +35,7 @@ else if ($dopost == "opimize") { } else { $rs = $dsql->ExecuteNoneQuery("OPTIMIZE TABLE `$tablename` "); if ($rs) echo "执行优化表: $tablename OK!"; - else echo "执行优化表: $tablename 失败,原因是:" . $dsql->GetError(); + else echo "执行优化表: $tablename 失败,原因是:".$dsql->GetError(); } exit(); } @@ -49,7 +49,7 @@ else if ($dopost == "opimizeAll") { if ($rs) { echo "优化表: {$row[0]} ok!
\r\n"; } else { - echo "优化表: {$row[0]} 失败! 原因是: " . $dsql->GetError() . "
\r\n"; + echo "优化表: {$row[0]} 失败! 原因是: ".$dsql->GetError()."
\r\n"; } } exit(); @@ -62,7 +62,7 @@ else if ($dopost == "repair") { } else { $rs = $dsql->ExecuteNoneQuery("REPAIR TABLE `$tablename` "); if ($rs) echo "修复表: $tablename OK!"; - else echo "修复表: $tablename 失败,原因是:" . $dsql->GetError(); + else echo "修复表: $tablename 失败,原因是:".$dsql->GetError(); } exit(); } @@ -76,7 +76,7 @@ else if ($dopost == "repairAll") { if ($rs) { echo "修复表: {$row[0]} ok!
\r\n"; } else { - echo "修复表: {$row[0]} 失败! 原因是: " . $dsql->GetError() . "
\r\n"; + echo "修复表: {$row[0]} 失败! 原因是: ".$dsql->GetError()."
\r\n"; } } exit(); @@ -96,7 +96,7 @@ else if ($dopost == "query") { if ($dsql->GetTotalRow() <= 0) { echo "运行SQL:{$sqlquery},无返回记录!"; } else { - echo "运行SQL:{$sqlquery},共有" . $dsql->GetTotalRow() . "条记录,最大返回100条!"; + echo "运行SQL:{$sqlquery},共有".$dsql->GetTotalRow()."条记录,最大返回100条!"; } $j = 0; while ($row = $dsql->GetArray()) { @@ -129,7 +129,7 @@ else if ($dopost == "query") { if ($errCode == "") { $i++; } else { - $nerrCode .= "执行: $q 出错,错误提示:" . $errCode . "
"; + $nerrCode .= "执行: $q 出错,错误提示:".$errCode."
"; } } echo "成功执行{$i}个SQL语句!

"; diff --git a/src/dede/tag_test.php b/src/dede/tag_test.php index 51ea2a6c..fd07302d 100755 --- a/src/dede/tag_test.php +++ b/src/dede/tag_test.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('temp_Other'); -require_once(DEDEINC . "/typelink.class.php"); +require_once(DEDEINC."/typelink.class.php"); include DedeInclude('templets/tag_test.htm'); diff --git a/src/dede/tag_test_action.php b/src/dede/tag_test_action.php index 9a551a37..adfd5c28 100755 --- a/src/dede/tag_test_action.php +++ b/src/dede/tag_test_action.php @@ -9,9 +9,9 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('temp_Test'); -require_once(DEDEINC . "/arc.partview.class.php"); +require_once(DEDEINC."/arc.partview.class.php"); CheckCSRF(); if (empty($partcode)) { ShowMsg('错误请求', 'javascript:;'); @@ -28,7 +28,7 @@ else $pv = new PartView(); $pv->SetTemplet($partcode, "string"); if ($showsource == "" || $showsource == "yes") { echo "模板代码:"; - echo "
" . dede_htmlspecialchars($partcode) . "
"; + echo "
".dede_htmlspecialchars($partcode)."
"; echo "结果:
"; } $pv->Display(); diff --git a/src/dede/tags_main.php b/src/dede/tags_main.php index fefb9d00..f07491ed 100755 --- a/src/dede/tags_main.php +++ b/src/dede/tags_main.php @@ -9,9 +9,9 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/config.php'); +require_once(dirname(__FILE__).'/config.php'); CheckPurview('sys_Keyword'); -require_once(DEDEINC . '/datalistcp.class.php'); +require_once(DEDEINC.'/datalistcp.class.php'); $timestamp = time(); if (empty($tag)) $tag = ''; @@ -29,7 +29,7 @@ if (empty($action)) { $dlist->SetParameter("orderway", $orderway); $dlist->SetParameter("orderby", $orderby); $dlist->pageSize = 20; - $dlist->SetTemplet(DEDEADMIN . "/templets/tags_main.htm"); + $dlist->SetTemplet(DEDEADMIN."/templets/tags_main.htm"); $dlist->SetSource($query); $dlist->Display(); exit(); @@ -98,7 +98,7 @@ function fetch() $endaid = 0; } if (!empty($where)) { - $wheresql = " WHERE arcrank>-1 AND " . implode(' AND ', $where); + $wheresql = " WHERE arcrank>-1 AND ".implode(' AND ', $where); } $query = "SELECT id as aid,arcrank,typeid,keywords FROM `#@__archives` $wheresql LIMIT $start, 100"; $dsql->SetQuery($query); @@ -125,7 +125,7 @@ function fetch() $trow = $dsql->GetOne("SELECT COUNT(*) as dd FROM `#@__taglist` WHERE tag LIKE '$keyword'"); if (intval($trow['dd']) != $row['total']) { - $query = "UPDATE `#@__tagindex` SET `total`=" . $trow['dd'] . ",uptime=$now WHERE id='$tid' "; + $query = "UPDATE `#@__tagindex` SET `total`=".$trow['dd'].",uptime=$now WHERE id='$tid' "; $dsql->ExecuteNoneQuery($query); } } else { diff --git a/src/dede/task_do.php b/src/dede/task_do.php index 18066d45..3f909796 100755 --- a/src/dede/task_do.php +++ b/src/dede/task_do.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require(dirname(__FILE__) . '/config.php'); +require(dirname(__FILE__).'/config.php'); $dopost = (!isset($dopost) ? '' : $dopost); /****************************** 返回到下一任务的URL @@ -29,21 +29,21 @@ function GetNextUrl($notallowArr = array('dopost', 'f', 'del')) if (isset($nextdos[1])) { for ($i = 1; $i < count($nextdos); $i++) { if (trim($nextdos[$i]) == '') continue; - $nextdo .= ($nextdo == '' ? $nextdos[$i] : ',' . $nextdos[$i]); + $nextdo .= ($nextdo == '' ? $nextdos[$i] : ','.$nextdos[$i]); } } //如果系统有多重任务, 把下一任务和任务列表参数提交给程序处理 if (in_array('morejob', $notallowArr)) { - $reurl .= "&doposttmp=" . $nextdos[0]; + $reurl .= "&doposttmp=".$nextdos[0]; if ($nextdo != '') $reurl .= "&nextdotmp=$nextdo"; } else { - $reurl .= "&dopost=" . $nextdos[0]; + $reurl .= "&dopost=".$nextdos[0]; if ($nextdo != '') $reurl .= "&nextdo=$nextdo"; } } else if (in_array($k, $notallowArr)) { continue; } else { - $reurl .= "&{$k}=" . urlencode($GLOBALS[$k]); + $reurl .= "&{$k}=".urlencode($GLOBALS[$k]); } } return $reurl; @@ -53,7 +53,7 @@ function GetNextUrl($notallowArr = array('dopost', 'f', 'del')) function makeprenext() { } ******************************/ if ($dopost == 'makeprenext') { - require_once(DEDEINC . '/arc.archives.class.php'); + require_once(DEDEINC.'/arc.archives.class.php'); $aid = intval($aid); $preRow = $dsql->GetOne("SELECT id FROM `#@__arctiny` WHERE id<$aid AND arcrank>-1 AND typeid='$typeid' ORDER BY id DESC"); $nextRow = $dsql->GetOne("SELECT id FROM `#@__arctiny` WHERE id>$aid AND arcrank>-1 AND typeid='$typeid' ORDER BY id ASC"); @@ -81,19 +81,19 @@ if ($dopost == 'makeprenext') { function makeindex() { } ******************************/ if ($dopost == 'makeindex') { - require_once(DEDEINC . '/arc.partview.class.php'); + require_once(DEDEINC.'/arc.partview.class.php'); $envs = $_sys_globals = array(); $envs['aid'] = 0; $pv = new PartView(); $row = $pv->dsql->GetOne('SELECT * FROM `#@__homepageset`'); $templet = str_replace("{style}", $cfg_df_style, $row['templet']); - $homeFile = dirname(__FILE__) . '/' . $row['position']; + $homeFile = dirname(__FILE__).'/'.$row['position']; $homeFile = str_replace("//", "/", str_replace("\\", "/", $homeFile)); $fp = fopen($homeFile, 'w') or die("无法更新网站主页到:$homeFile 位置"); fclose($fp); - $tpl = $cfg_basedir . $cfg_templets_dir . '/' . $templet; + $tpl = $cfg_basedir.$cfg_templets_dir.'/'.$templet; if (!file_exists($tpl)) { - $tpl = $cfg_basedir . $cfg_templets_dir . '/default/index.htm'; + $tpl = $cfg_basedir.$cfg_templets_dir.'/default/index.htm'; if (!file_exists($tpl)) exit("无法找到主页模板:$tpl "); } $GLOBALS['_arclistEnv'] = 'index'; @@ -114,8 +114,8 @@ if ($dopost == 'makeindex') { function makeparenttype() { } ******************************/ else if ($dopost == 'makeparenttype') { - require_once(DEDEDATA . "/cache/inc_catalog_base.inc"); - require_once(DEDEINC . '/arc.listview.class.php'); + require_once(DEDEDATA."/cache/inc_catalog_base.inc"); + require_once(DEDEINC.'/arc.listview.class.php'); $notallowArr = array('dopost', 'f', 'del', 'curpage', 'morejob'); $jumpurl = GetNextUrl($notallowArr); @@ -129,13 +129,13 @@ else if ($dopost == 'makeparenttype') { $tid = $topids[$curpage]; if (isset($cfg_Cs[$tid]) && $cfg_Cs[$tid][1] > 0) { - require_once(DEDEINC . "/arc.listview.class.php"); + require_once(DEDEINC."/arc.listview.class.php"); $lv = new ListView($tid); $lv->CountRecord(); $lv->MakeHtml(); $lv->Close(); } else { - require_once(DEDEINC . "/arc.sglistview.class.php"); + require_once(DEDEINC."/arc.sglistview.class.php"); $lv = new SgListView($tid); $lv->CountRecord(); $lv->MakeHtml(); diff --git a/src/dede/templets_main.php b/src/dede/templets_main.php index d6baad98..1675906d 100755 --- a/src/dede/templets_main.php +++ b/src/dede/templets_main.php @@ -9,16 +9,16 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/config.php'); +require_once(dirname(__FILE__).'/config.php'); CheckPurview('plus_文件管理器'); if (empty($acdir)) $acdir = $cfg_df_style; -$templetdir = $cfg_basedir . $cfg_templets_dir; -$templetdird = $templetdir . '/' . $acdir; -$templeturld = $cfg_templeturl . '/' . $acdir; +$templetdir = $cfg_basedir.$cfg_templets_dir; +$templetdird = $templetdir.'/'.$acdir; +$templeturld = $cfg_templeturl.'/'.$acdir; if (preg_match("#\.#", $acdir)) { - ShowMsg('Not Allow dir ' . $acdir . '!', '-1'); + ShowMsg('Not Allow dir '.$acdir.'!', '-1'); exit(); } @@ -37,9 +37,9 @@ function GetInfoArray($filename) return $arrs; } -$dirlists = GetInfoArray($templetdir . '/templet-dirlist.inc'); -$filelists = GetInfoArray($templetdir . '/templet-filelist.inc'); -$pluslists = GetInfoArray($templetdir . '/templet-pluslist.inc'); +$dirlists = GetInfoArray($templetdir.'/templet-dirlist.inc'); +$filelists = GetInfoArray($templetdir.'/templet-filelist.inc'); +$pluslists = GetInfoArray($templetdir.'/templet-pluslist.inc'); $fileinfos = ($acdir == 'plus' ? $pluslists : $filelists); include DedeInclude('templets/templets_default.htm'); diff --git a/src/dede/templets_one.php b/src/dede/templets_one.php index da254c44..e3d11581 100755 --- a/src/dede/templets_one.php +++ b/src/dede/templets_one.php @@ -9,9 +9,9 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('temp_One'); -require_once(DEDEINC . "/datalistcp.class.php"); +require_once(DEDEINC."/datalistcp.class.php"); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); $addquery = ''; @@ -20,7 +20,7 @@ $likeid = (!isset($likeid) ? '' : $likeid); $addq = $likeid != '' ? " AND likeid LIKE '$likeid' " : ''; $sql = "SELECT aid,title,ismake,uptime,filename,likeid FROM `#@__sgpage` WHERE title LIKE '%$keyword%' $addq ORDER BY aid DESC"; $dlist = new DataListCP(); -$dlist->SetTemplet(DEDEADMIN . "/templets/templets_one.htm"); +$dlist->SetTemplet(DEDEADMIN."/templets/templets_one.htm"); $dlist->SetSource($sql); $dlist->display(); diff --git a/src/dede/templets_one_add.php b/src/dede/templets_one_add.php index ea03d9e5..0ea9ccfe 100755 --- a/src/dede/templets_one_add.php +++ b/src/dede/templets_one_add.php @@ -9,12 +9,12 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require(dirname(__FILE__) . "/config.php"); +require(dirname(__FILE__)."/config.php"); CheckPurview('temp_One'); if (empty($dopost)) $dopost = ""; if ($dopost == "save") { - require_once(DEDEINC . "/arc.partview.class.php"); + require_once(DEDEINC."/arc.partview.class.php"); $uptime = time(); $body = str_replace('"', '\\"', $body); $filename = preg_replace("#^\/#", "", $nfilename); @@ -33,7 +33,7 @@ if ($dopost == "save") { exit(); } $id = $dsql->GetLastID(); - include_once(DEDEINC . "/arc.sgpage.class.php"); + include_once(DEDEINC."/arc.sgpage.class.php"); $sg = new sgpage($id); $sg->SaveToHtml(); ShowMsg("成功增加一个页面!", "templets_one.php"); @@ -41,4 +41,4 @@ if ($dopost == "save") { } $row = $dsql->GetOne("SELECT MAX(aid) AS aid FROM `#@__sgpage` "); $nowid = is_array($row) ? $row['aid'] + 1 : ''; -include_once(DEDEADMIN . "/templets/templets_one_add.htm"); +include_once(DEDEADMIN."/templets/templets_one_add.htm"); diff --git a/src/dede/templets_one_edit.php b/src/dede/templets_one_edit.php index 786d459d..0119a7b6 100755 --- a/src/dede/templets_one_edit.php +++ b/src/dede/templets_one_edit.php @@ -9,20 +9,20 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require(dirname(__FILE__) . "/config.php"); +require(dirname(__FILE__)."/config.php"); CheckPurview('temp_One'); if (empty($dopost)) $dopost = ""; $aid = isset($aid) && is_numeric($aid) ? $aid : 0; if ($dopost == "saveedit") { - include_once(DEDEINC . "/arc.sgpage.class.php"); + include_once(DEDEINC."/arc.sgpage.class.php"); $uptime = time(); $body = str_replace('"', '\\"', $body); $filename = preg_replace("#^\/#", "", $nfilename); //如果更改了文件名,删除旧文件 if ($oldfilename != $filename) { - $oldfilename = $cfg_basedir . $cfg_cmspath . "/" . $oldfilename; + $oldfilename = $cfg_basedir.$cfg_cmspath."/".$oldfilename; if (is_file($oldfilename)) { unlink($oldfilename); } @@ -52,7 +52,7 @@ if ($dopost == "saveedit") { exit(); } else if ($dopost == "delete") { $row = $dsql->GetOne("SELECT filename FROM `#@__sgpage` WHERE aid='$aid'"); - $filename = preg_replace("#\/{1,}#", "/", $cfg_basedir . $cfg_cmspath . "/" . $row['filename']); + $filename = preg_replace("#\/{1,}#", "/", $cfg_basedir.$cfg_cmspath."/".$row['filename']); $dsql->ExecuteNoneQuery(" DELETE FROM `#@__sgpage` WHERE aid='$aid' "); if (is_file($filename)) { unlink($filename); @@ -60,15 +60,15 @@ if ($dopost == "saveedit") { ShowMsg("成功删除一个页面!", "templets_one.php"); exit(); } else if ($dopost == "make") { - include_once(DEDEINC . "/arc.sgpage.class.php"); + include_once(DEDEINC."/arc.sgpage.class.php"); $row = $dsql->GetOne("SELECT filename FROM `#@__sgpage` WHERE aid='$aid'"); - $fileurl = $cfg_cmsurl . '/' . preg_replace("#\/{1,}#", "/", $row['filename']); + $fileurl = $cfg_cmsurl.'/'.preg_replace("#\/{1,}#", "/", $row['filename']); $sg = new sgpage($aid); $sg->SaveToHtml(); ShowMsg("成功更新一个页面!", $fileurl); exit(); } else if ($dopost == "mkall") { - include_once(DEDEINC . "/arc.sgpage.class.php"); + include_once(DEDEINC."/arc.sgpage.class.php"); $dsql->Execute("ex", "SELECT aid FROM `#@__sgpage` "); $i = 0; while ($row = $dsql->GetArray("ex")) { @@ -82,7 +82,7 @@ if ($dopost == "saveedit") { if (empty($ids)) { $ids = ''; } - include_once(DEDEINC . "/arc.sgpage.class.php"); + include_once(DEDEINC."/arc.sgpage.class.php"); $i = 0; if ($ids == 0) { ShowMsg('您没有选择需要更新的文档!', '-1'); @@ -101,10 +101,10 @@ if ($dopost == "saveedit") { ShowMsg('错误的ID!', 'javascript:;'); exit(); } - include_once(DEDEINC . "/arc.sgpage.class.php"); + include_once(DEDEINC."/arc.sgpage.class.php"); $sg = new sgpage($aid); $sg->display(); exit(); } $row = $dsql->GetOne("SELECT * FROM `#@__sgpage` WHERE aid='$aid' "); -include(DEDEADMIN . "/templets/templets_one_edit.htm"); +include(DEDEADMIN."/templets/templets_one_edit.htm"); diff --git a/src/dede/templets_tagsource.php b/src/dede/templets_tagsource.php index e31d9d5c..9dbf9264 100755 --- a/src/dede/templets_tagsource.php +++ b/src/dede/templets_tagsource.php @@ -9,17 +9,17 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/config.php'); +require_once(dirname(__FILE__).'/config.php'); CheckPurview('plus_文件管理器'); -$libdir = DEDEINC . '/taglib'; -$helpdir = DEDEINC . '/taglib/help'; +$libdir = DEDEINC.'/taglib'; +$helpdir = DEDEINC.'/taglib/help'; //获取默认文件说明信息 function GetHelpInfo($tagname) { global $helpdir; - $helpfile = $helpdir . '/' . $tagname . '.txt'; + $helpfile = $helpdir.'/'.$tagname.'.txt'; if (!file_exists($helpfile)) { return '该标签没帮助信息'; } diff --git a/src/dede/testenv.php b/src/dede/testenv.php index 6552fd99..550f2bb6 100755 --- a/src/dede/testenv.php +++ b/src/dede/testenv.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_Edit'); $action = isset($action) ? $action : ''; ?> @@ -32,7 +32,7 @@ $action = isset($action) ? $action : ''; { $tfile = '_write_able.txt'; $d = preg_replace("/\/$/", '', $d); - $fp = @fopen($d . '/' . $tfile, 'w'); + $fp = @fopen($d.'/'.$tfile, 'w'); if (!$fp) { if ($c == false) { @chmod($d, 0777); @@ -40,7 +40,7 @@ $action = isset($action) ? $action : ''; } else return TestWriteable($d, true); } else { fclose($fp); - return @unlink($d . '/' . $tfile) ? true : false; + return @unlink($d.'/'.$tfile) ? true : false; } } } @@ -49,19 +49,19 @@ $action = isset($action) ? $action : ''; // 检查是否具目录可执行 function TestExecuteable($d = '.', $siteuRL = '', $rootDir = '') { - $testStr = '<' . chr(0x3F) . 'p' . chr(hexdec(68)) . chr(112) . "\n\r"; - $filename = md5($d) . '.php'; - $testStr .= 'function test(){ echo md5(\'' . $d . '\');}' . "\n\rtest();\n\r"; - $testStr .= chr(0x3F) . '>'; + $testStr = '<'.chr(0x3F).'p'.chr(hexdec(68)).chr(112)."\n\r"; + $filename = md5($d).'.php'; + $testStr .= 'function test(){ echo md5(\''.$d.'\');}'."\n\rtest();\n\r"; + $testStr .= chr(0x3F).'>'; $reval = false; if (empty($rootDir)) $rootDir = DEDEROOT; if (TestWriteable($d)) { - @file_put_contents($d . '/' . $filename, $testStr); - $remoteUrl = $siteuRL . '/' . str_replace($rootDir, '', str_replace("\\", '/', realpath($d))) . '/' . $filename; + @file_put_contents($d.'/'.$filename, $testStr); + $remoteUrl = $siteuRL.'/'.str_replace($rootDir, '', str_replace("\\", '/', realpath($d))).'/'.$filename; $tempStr = @PostHost($remoteUrl); $reval = (md5($d) == trim($tempStr)) ? true : false; - unlink($d . '/' . $filename); + unlink($d.'/'.$filename); return $reval; } else { return -1; @@ -80,19 +80,19 @@ $action = isset($action) ? $action : ''; } elseif (!@$parse['port']) { $parse['port'] = '80'; } - $parse['host'] = str_replace(array('http://', 'https://'), array('', 'ssl://'), "$parse[scheme]://") . $parse['host']; + $parse['host'] = str_replace(array('http://', 'https://'), array('', 'ssl://'), "$parse[scheme]://").$parse['host']; if (!$fp = @fsockopen($parse['host'], $parse['port'], $errnum, $errstr, $timeout)) { return false; } $method = strtoupper($method); $wlength = $wdata = $responseText = ''; - $parse['path'] = str_replace(array('\\', '//'), '/', @$parse['path']) . "?" . @$parse['query']; + $parse['path'] = str_replace(array('\\', '//'), '/', @$parse['path'])."?".@$parse['query']; if ($method == 'GET') { $separator = @$parse['query'] ? '&' : ''; substr($data, 0, 1) == '&' && $data = substr($data, 1); - $parse['path'] .= $separator . $data; + $parse['path'] .= $separator.$data; } elseif ($method == 'POST') { - $wlength = "Content-length: " . strlen($data) . "\r\n"; + $wlength = "Content-length: ".strlen($data)."\r\n"; $wdata = $data; } $write = "$method $parse[path] HTTP/1.0\r\nHost: $parse[host]\r\nContent-type: application/x-www-form-urlencoded\r\n{$wlength}Connection: close\r\n\r\n$wdata"; @@ -163,14 +163,14 @@ $action = isset($action) ? $action : ''; $dh = dir($d); while ($filename = $dh->read()) { if ( - substr($filename, 0, 1) == '.' || is_file($d . '/' . $filename) || + substr($filename, 0, 1) == '.' || is_file($d.'/'.$filename) || preg_match("#^(svn|bak-)#i", $filename) ) { continue; } - if (is_dir($d . '/' . $filename)) { - $dirname[] = $d . '/' . $filename; - GetSondir($d . '/' . $filename, $dirname); + if (is_dir($d.'/'.$filename)) { + $dirname[] = $d.'/'.$filename; + GetSondir($d.'/'.$filename, $dirname); } } $dh->close(); @@ -195,25 +195,25 @@ $action = isset($action) ? $action : ''; if (($e == ".") || ($e == "..")) { continue; } - if ($rec && is_dir($path . "/" . $e) && ($ignoredir == '' || strpos($ignoredir, $e) === FALSE)) { - $ret = array_merge($ret, preg_ls($path . "/" . $e, $rec, $pat, $ignoredir)); + if ($rec && is_dir($path."/".$e) && ($ignoredir == '' || strpos($ignoredir, $e) === FALSE)) { + $ret = array_merge($ret, preg_ls($path."/".$e, $rec, $pat, $ignoredir)); continue; } if (!preg_match($pat, $e)) { continue; } - $ret[] = $path . "/" . $e; + $ret[] = $path."/".$e; } - return (empty($ret) && preg_match($pat, basename($path))) ? array($path . "/") : $ret; + return (empty($ret) && preg_match($pat, basename($path))) ? array($path."/") : $ret; } foreach ($needDir as $key => $val) { - $allPath[trim('/' . $val)] = array( + $allPath[trim('/'.$val)] = array( 'read' => true, // 读取 'write' => false, // 写入 'execute' => true // 执行 ); - $sonDir = GetSondir(DEDEROOT . '/' . $val); + $sonDir = GetSondir(DEDEROOT.'/'.$val); foreach ($sonDir as $kk => $vv) { $vv = trim(str_replace(DEDEROOT, '', $vv)); $allPath[$vv] = array( @@ -230,14 +230,14 @@ $action = isset($action) ? $action : ''; '/templets' ); foreach ($needDir as $key => $val) { - $allPath[trim('/' . $val)] = array( + $allPath[trim('/'.$val)] = array( 'read' => true, // 读取 'write' => false, // 写入 'execute' => false // 执行 ); - $sonDir = GetSondir(DEDEROOT . '/' . $val); + $sonDir = GetSondir(DEDEROOT.'/'.$val); foreach ($sonDir as $kk => $vv) { - $vv = trim(str_replace(DEDEROOT . '/', '', $vv)); + $vv = trim(str_replace(DEDEROOT.'/', '', $vv)); $allPath[$vv] = array( 'read' => true, // 读取 'write' => false, // 写入 @@ -253,9 +253,9 @@ $action = isset($action) ? $action : ''; '/include' ); foreach ($jsDir as $k => $v) { - $jsfiles = preg_ls(DEDEROOT . $v, TRUE, "/.*\.(js)$/i"); + $jsfiles = preg_ls(DEDEROOT.$v, TRUE, "/.*\.(js)$/i"); foreach ($jsfiles as $k => $v) { - $vv = trim(str_replace(DEDEROOT . '/', '/', $v)); + $vv = trim(str_replace(DEDEROOT.'/', '/', $v)); $allPath[$vv] = array( 'read' => true, // 读取 'write' => false, // 写入 @@ -297,9 +297,9 @@ $action = isset($action) ? $action : ''; $ = jQuery; var log = " $val) { - if (is_dir(DEDEROOT . $key)) { + if (is_dir(DEDEROOT.$key)) { ?>|无法判断"; @@ -311,26 +311,26 @@ $action = isset($action) ? $action : ''; } ?>|错误(不可读)" : "正常(可读)"; + echo is_readable(DEDEROOT.$key) != $val['read'] ? "错误(不可读)" : "正常(可读)"; else - echo is_readable(DEDEROOT . $key) != $val['read'] ? "错误(可读)" : "正常(不可读)"; + echo is_readable(DEDEROOT.$key) != $val['read'] ? "错误(可读)" : "正常(不可读)"; ?>|错误(不可写)" : "正常(可写)"; + echo TestWriteable(DEDEROOT.$key) != $val['write'] ? "错误(不可写)" : "正常(可写)"; else - echo TestWriteable(DEDEROOT . $key) != $val['write'] ? "错误(可写)" : "正常(不可写)"; + echo TestWriteable(DEDEROOT.$key) != $val['write'] ? "错误(可写)" : "正常(不可写)"; ?>|无需判断|错误(不可读)" : "正常(可读)"; + echo is_readable(DEDEROOT.$key) != $val['read'] ? "错误(不可读)" : "正常(可读)"; else - echo is_readable(DEDEROOT . $key) != $val['read'] ? "错误(可读)" : "正常(不可读)"; + echo is_readable(DEDEROOT.$key) != $val['read'] ? "错误(可读)" : "正常(不可读)"; ?>|错误(不可写)" : "正常(可写)"; + echo is_writable(DEDEROOT.$key) != $val['write'] ? "错误(不可写)" : "正常(可写)"; else - echo is_writable(DEDEROOT . $key) != $val['write'] ? "错误(可写)" : "正常(不可写)"; + echo is_writable(DEDEROOT.$key) != $val['write'] ? "错误(可写)" : "正常(不可写)"; ?>read())) { - if ($entry != '.' && $entry != '..' && !is_dir($tagHelpDir . $entry)) { + if ($entry != '.' && $entry != '..' && !is_dir($tagHelpDir.$entry)) { $dtags[] = str_replace('.txt', '', $entry); } } $dir->close(); foreach ($dtags as $tag) { //$helpContent = file_get_contents($tagHelpDir.$tag.'.txt'); - $fp = fopen($tagHelpDir . $tag . '.txt', 'r'); - $helpContent = fread($fp, filesize($tagHelpDir . $tag . '.txt')); + $fp = fopen($tagHelpDir.$tag.'.txt', 'r'); + $helpContent = fread($fp, filesize($tagHelpDir.$tag.'.txt')); fclose($fp); $helps[$tag] = explode('>>dede>>', $helpContent); } make_hash(); - include DEDEADMIN . '/templets/tpl_edit.htm'; + include DEDEADMIN.'/templets/tpl_edit.htm'; exit(); } /*--------------------------- @@ -92,20 +92,20 @@ function save_tpl() { } $content = preg_replace("/##\/textarea/i", "'; +?".'>'; $filename = "demotag.lib.php"; $title = "新建标签"; } else { @@ -202,13 +202,13 @@ function lib_demotag(&\$ctag,&\$refObj) ShowMsg('文件不是标准的标签碎片文件,不允许在此编辑!', '-1'); exit(); } - $fp = fopen(DEDEINC . '/taglib/' . $filename, 'r'); - $democode = fread($fp, filesize(DEDEINC . '/taglib/' . $filename)); + $fp = fopen(DEDEINC.'/taglib/'.$filename, 'r'); + $democode = fread($fp, filesize(DEDEINC.'/taglib/'.$filename)); fclose($fp); $title = "修改标签"; } make_hash(); - include DEDEADMIN . '/templets/tpl_edit_tag.htm'; + include DEDEADMIN.'/templets/tpl_edit_tag.htm'; exit(); } /*--------------------------- @@ -220,10 +220,10 @@ function savetagfile() { } ShowMsg('文件名不合法,不允许进行操作!', '-1'); exit(); } - require_once(DEDEINC . '/oxwindow.class.php'); + require_once(DEDEINC.'/oxwindow.class.php'); $tagname = preg_replace("#\.lib\.php$#i", "", $filename); $content = stripslashes($content); - $truefile = DEDEINC . '/taglib/' . $filename; + $truefile = DEDEINC.'/taglib/'.$filename; $fp = fopen($truefile, 'w'); fwrite($fp, $content); fclose($fp); diff --git a/src/dede/vote_add.php b/src/dede/vote_add.php index f94ce773..d8d41f8c 100755 --- a/src/dede/vote_add.php +++ b/src/dede/vote_add.php @@ -9,9 +9,9 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require(dirname(__FILE__) . "/config.php"); -require_once(DEDEINC . "/dedevote.class.php"); -require_once(DEDEINC . "/helpers/filter.helper.php"); +require(dirname(__FILE__)."/config.php"); +require_once(DEDEINC."/dedevote.class.php"); +require_once(DEDEINC."/helpers/filter.helper.php"); CheckPurview('plus_投票模块'); if (empty($dopost)) $dopost = ""; if (empty($isarc)) $isarc = 0; @@ -23,9 +23,9 @@ if ($dopost == "save" && $isarc == 0) { $j = 0; for ($i = 1; $i <= 15; $i++) { - if (!empty(${"voteitem" . $i})) { + if (!empty(${"voteitem".$i})) { $j++; - $voteitems .= "" . ${"voteitem" . $i} . "\r\n"; + $voteitems .= "".${"voteitem".$i}."\r\n"; } } $inQuery = "INSERT INTO `#@__vote`(votename,starttime,endtime,totalcount,ismore,votenote,isallow,view,spec,isenable) @@ -38,9 +38,9 @@ if ($dopost == "save" && $isarc == 0) { $vt = new DedeVote($aid); $vote_content = $vt->GetVoteForm(); $vote_content = preg_replace(array("#/#", "#([\r\n])[\s]+#"), array("\/", " "), $vote_content); //取出内容中的空白字符并进行转义 - $vote_content = 'document.write("' . $vote_content . '");'; + $vote_content = 'document.write("'.$vote_content.'");'; - $vote_file = DEDEDATA . "/vote/vote_" . $aid . ".js"; + $vote_file = DEDEDATA."/vote/vote_".$aid.".js"; file_put_contents($vote_file, $vote_content); ShowMsg("成功增加一组投票!", "vote_main.php"); exit(); @@ -51,9 +51,9 @@ if ($dopost == "save" && $isarc == 0) { $j = 0; for ($i = 1; $i <= 15; $i++) { - if (!empty(${"voteitem" . $i})) { + if (!empty(${"voteitem".$i})) { $j++; - $voteitems .= "" . ${"voteitem" . $i} . "\r\n"; + $voteitems .= "".${"voteitem".$i}."\r\n"; } } $inQuery = "INSERT INTO `#@__vote`(votename,starttime,endtime,totalcount,ismore,votenote,isallow,view,spec,isenable) @@ -66,11 +66,11 @@ if ($dopost == "save" && $isarc == 0) { $vt = new DedeVote($aid); $vote_content = $vt->GetVoteForm(); $vote_content = preg_replace(array("#/#", "#([\r\n])[\s]+#"), array("\/", " "), $vote_content); //取出内容中的空白字符并进行转义 - $vote_content = 'document.write("' . $vote_content . '");'; + $vote_content = 'document.write("'.$vote_content.'");'; - $vote_file = DEDEDATA . "/vote/vote_" . $aid . ".js"; + $vote_file = DEDEDATA."/vote/vote_".$aid.".js"; file_put_contents($vote_file, $vote_content); - ShowMsg("成功增加一组投票!", "vote_main.php?issel=1&aid=" . $aid); + ShowMsg("成功增加一组投票!", "vote_main.php?issel=1&aid=".$aid); exit(); } $startDay = time(); diff --git a/src/dede/vote_edit.php b/src/dede/vote_edit.php index 2d93a9e0..63cbc243 100755 --- a/src/dede/vote_edit.php +++ b/src/dede/vote_edit.php @@ -9,9 +9,9 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require(dirname(__FILE__) . "/config.php"); +require(dirname(__FILE__)."/config.php"); CheckPurview('plus_投票模块'); -require_once(DEDEINC . "/dedetag.class.php"); +require_once(DEDEINC."/dedetag.class.php"); if (empty($dopost)) $dopost = ""; $aid = isset($aid) && is_numeric($aid) ? $aid : 0; @@ -45,10 +45,10 @@ if ($dopost == "delete") { "; if ($dsql->ExecuteNoneQuery($query)) { $vt = new DedeVote($aid); - $vote_file = DEDEDATA . "/vote/vote_" . $aid . ".js"; + $vote_file = DEDEDATA."/vote/vote_".$aid.".js"; $vote_content = $vt->GetVoteForm(); $vote_content = preg_replace(array("#/#", "#([\r\n])[\s]+#"), array("\/", " "), $vote_content); //取出内容中的空白字符并进行转义 - $vote_content = 'document.write("' . $vote_content . '");'; + $vote_content = 'document.write("'.$vote_content.'");'; file_put_contents($vote_file, $vote_content); ShowMsg('成功更改一组投票!', $ENV_GOBACK_URL); } else { diff --git a/src/dede/vote_getcode.php b/src/dede/vote_getcode.php index b5c77dc1..fdff5239 100755 --- a/src/dede/vote_getcode.php +++ b/src/dede/vote_getcode.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -require_once(DEDEINC . "/dedevote.class.php"); +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEINC."/dedevote.class.php"); $aid = isset($aid) && is_numeric($aid) ? $aid : 0; include DedeInclude('templets/vote_getcode.htm'); diff --git a/src/dede/vote_main.php b/src/dede/vote_main.php index 29687f07..ebe90292 100755 --- a/src/dede/vote_main.php +++ b/src/dede/vote_main.php @@ -9,8 +9,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -require_once(DEDEINC . "/datalistcp.class.php"); +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEINC."/datalistcp.class.php"); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); $sql = "SELECT aid,votename,starttime,endtime,totalcount,isenable FROM #@__vote ORDER BY aid DESC"; $dlist = new DataListCP(); @@ -18,9 +18,9 @@ $issel = isset($issel) ? $issel : 0; $aid = isset($aid) ? $aid : 0; if ($issel == 1) { $dlist->SetParameter('issel', $issel); - $dlist->SetTemplet(DEDEADMIN . "/templets/vote_select.htm"); + $dlist->SetTemplet(DEDEADMIN."/templets/vote_select.htm"); } else { - $dlist->SetTemplet(DEDEADMIN . "/templets/vote_main.htm"); + $dlist->SetTemplet(DEDEADMIN."/templets/vote_main.htm"); } $dlist->SetSource($sql); $dlist->display(); diff --git a/src/include/arc.archives.class.php b/src/include/arc.archives.class.php index 67d1d660..d2ff3785 100755 --- a/src/include/arc.archives.class.php +++ b/src/include/arc.archives.class.php @@ -9,9 +9,9 @@ if (!defined('DEDEINC')) exit("Request Error!"); * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(DEDEINC . "/typelink.class.php"); -require_once(DEDEINC . "/channelunit.class.php"); -require_once(DEDEINC . "/downmix.inc.php"); +require_once(DEDEINC."/typelink.class.php"); +require_once(DEDEINC."/channelunit.class.php"); +require_once(DEDEINC."/downmix.inc.php"); @set_time_limit(0); /** * 主文档类(Archives类) @@ -168,11 +168,11 @@ class Archives if ($ctag->GetTagName() == 'field' && $ctag->GetAtt('name') == $k) { //带标识的专题节点 if ($ctag->GetAtt('noteid') != '') { - $this->Fields[$k . '_' . $ctag->GetAtt('noteid')] = $this->ChannelUnit->MakeField($k, $row[$k], $ctag); + $this->Fields[$k.'_'.$ctag->GetAtt('noteid')] = $this->ChannelUnit->MakeField($k, $row[$k], $ctag); } //带类型的字段节点 else if ($ctag->GetAtt('type') != '') { - $this->Fields[$k . '_' . $ctag->GetAtt('type')] = $this->ChannelUnit->MakeField($k, $row[$k], $ctag); + $this->Fields[$k.'_'.$ctag->GetAtt('type')] = $this->ChannelUnit->MakeField($k, $row[$k], $ctag); } //其它字段 else { @@ -235,10 +235,10 @@ class Archives //处理默认缩略图等 if (isset($this->Fields['litpic'])) { if ($this->Fields['litpic'] == '-' || $this->Fields['litpic'] == '') { - $this->Fields['litpic'] = $GLOBALS['cfg_cmspath'] . '/static/defaultpic.jpg'; + $this->Fields['litpic'] = $GLOBALS['cfg_cmspath'].'/static/defaultpic.jpg'; } if (!preg_match("#^http:\/\/#i", $this->Fields['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') { - $this->Fields['litpic'] = $GLOBALS['cfg_mainsite'] . $this->Fields['litpic']; + $this->Fields['litpic'] = $GLOBALS['cfg_mainsite'].$this->Fields['litpic']; } $this->Fields['picname'] = $this->Fields['litpic']; //模板里直接使用{dede:field name='image'/}获取缩略图 @@ -319,10 +319,10 @@ class Archives $filenames = explode(".", $filename); $this->ShortName = $filenames[count($filenames) - 1]; if ($this->ShortName == '') $this->ShortName = 'html'; - $fileFirst = preg_replace("/\." . $this->ShortName . "$/i", "", $filename); + $fileFirst = preg_replace("/\.".$this->ShortName."$/i", "", $filename); $this->Fields['namehand'] = basename($fileFirst); $filenames = explode("/", $filename); - $this->NameFirst = preg_replace("/\." . $this->ShortName . "$/i", "", $filenames[count($filenames) - 1]); + $this->NameFirst = preg_replace("/\.".$this->ShortName."$/i", "", $filenames[count($filenames) - 1]); if ($this->NameFirst == '') { $this->NameFirst = $this->arcID; } @@ -354,21 +354,21 @@ class Archives for ($i = 1; $i <= $this->TotalPage; $i++) { if ($this->TotalPage > 1) { $this->Fields['tmptitle'] = (empty($this->Fields['tmptitle']) ? $this->Fields['title'] : $this->Fields['tmptitle']); - if ($i > 1) $this->Fields['title'] = $this->Fields['tmptitle'] . "($i)"; + if ($i > 1) $this->Fields['title'] = $this->Fields['tmptitle']."($i)"; } if ($i > 1) { - $TRUEfilename = $this->GetTruePath() . $fileFirst . "_" . $i . "." . $this->ShortName; - $URLFilename = $fileFirst . "_" . $i . "." . $this->ShortName; + $TRUEfilename = $this->GetTruePath().$fileFirst."_".$i.".".$this->ShortName; + $URLFilename = $fileFirst."_".$i.".".$this->ShortName; } else { - $TRUEfilename = $this->GetTruePath() . $filename; + $TRUEfilename = $this->GetTruePath().$filename; $URLFilename = $filename; } - $seoUrls = array_merge($seoUrls, array($cfg_basehost . $URLFilename)); + $seoUrls = array_merge($seoUrls, array($cfg_basehost.$URLFilename)); $this->ParseDMFields($i, 1); $this->dtp->SaveTo($TRUEfilename); } } - $this->dsql->ExecuteNoneQuery("Update `#@__archives` SET ismake=1 WHERE id='" . $this->ArcID . "'"); + $this->dsql->ExecuteNoneQuery("Update `#@__archives` SET ismake=1 WHERE id='".$this->ArcID."'"); return $this->GetTrueUrl($filename); } /** @@ -423,14 +423,14 @@ class Archives } //指定了ID的节点 else if ($ctag->GetAtt('noteid') != '') { - if (isset($this->Fields[$fname . '_' . $ctag->GetAtt('noteid')])) { - return $this->Fields[$fname . '_' . $ctag->GetAtt('noteid')]; + if (isset($this->Fields[$fname.'_'.$ctag->GetAtt('noteid')])) { + return $this->Fields[$fname.'_'.$ctag->GetAtt('noteid')]; } } //指定了type的节点 else if ($ctag->GetAtt('type') != '') { - if (isset($this->Fields[$fname . '_' . $ctag->GetAtt('type')])) { - return $this->Fields[$fname . '_' . $ctag->GetAtt('type')]; + if (isset($this->Fields[$fname.'_'.$ctag->GetAtt('type')])) { + return $this->Fields[$fname.'_'.$ctag->GetAtt('type')]; } } else if (isset($this->Fields[$fname])) { return $this->Fields[$fname]; @@ -449,26 +449,26 @@ class Archives $cid = $this->ChannelUnit->ChannelInfos['nid']; if (!empty($this->Fields['templet'])) { $filetag = MfTemplet($this->Fields['templet']); - if (!preg_match("#\/#", $filetag)) $filetag = $GLOBALS['cfg_df_style'] . '/' . $filetag; + if (!preg_match("#\/#", $filetag)) $filetag = $GLOBALS['cfg_df_style'].'/'.$filetag; } else { $filetag = MfTemplet($this->TypeLink->TypeInfos["temparticle"]); } $tid = $this->Fields['typeid']; $filetag = str_replace('{cid}', $cid, $filetag); $filetag = str_replace('{tid}', $tid, $filetag); - $tmpfile = $cfg_basedir . $cfg_templets_dir . '/' . $filetag; + $tmpfile = $cfg_basedir.$cfg_templets_dir.'/'.$filetag; if ($cid == 'spec') { if (!empty($this->Fields['templet'])) { - $tmpfile = $cfg_basedir . $cfg_templets_dir . '/' . $filetag; + $tmpfile = $cfg_basedir.$cfg_templets_dir.'/'.$filetag; } else { - $tmpfile = $cfg_basedir . $cfg_templets_dir . "/{$cfg_df_style}/article_spec.htm"; + $tmpfile = $cfg_basedir.$cfg_templets_dir."/{$cfg_df_style}/article_spec.htm"; } } if (defined('DEDEMOB')) { $tmpfile = str_replace('.htm', '_m.htm', $tmpfile); } if (!file_exists($tmpfile)) { - $tmpfile = $cfg_basedir . $cfg_templets_dir . "/{$cfg_df_style}/" . ($cid == 'spec' ? 'article_spec.htm' : 'article_default.htm'); + $tmpfile = $cfg_basedir.$cfg_templets_dir."/{$cfg_df_style}/".($cid == 'spec' ? 'article_spec.htm' : 'article_default.htm'); if (defined('DEDEMOB')) { $tmpfile = str_replace('.htm', '_m.htm', $tmpfile); } @@ -489,7 +489,7 @@ class Archives return ''; } $this->Fields["displaytype"] = "dm"; - if ($this->NowPage > 1) $this->Fields["title"] = $this->Fields["title"] . "({$this->NowPage})"; + if ($this->NowPage > 1) $this->Fields["title"] = $this->Fields["title"]."({$this->NowPage})"; //预编译 $this->LoadTemplet(); $this->ParAddTable(); @@ -498,9 +498,9 @@ class Archives $this->Fields['flag'] = empty($this->Fields['flag']) ? "" : $this->Fields['flag']; if (preg_match("#j#", $this->Fields['flag']) && $this->Fields['redirecturl'] != '') { if ($GLOBALS['cfg_jump_once'] == 'N') { - $pageHtml = "\r\n\r\n\r\n" . $this->Fields['title'] . "\r\n"; - $pageHtml .= "Fields['redirecturl'] . "\">\r\n\r\n\r\n"; - $pageHtml .= "现在正在转向:" . $this->Fields['title'] . ",请稍候...

\r\n转向内容简介:" . $this->Fields['description'] . "\r\n\r\n\r\n"; + $pageHtml = "\r\n\r\n\r\n".$this->Fields['title']."\r\n"; + $pageHtml .= "Fields['redirecturl']."\">\r\n\r\n\r\n"; + $pageHtml .= "现在正在转向:".$this->Fields['title'].",请稍候...

\r\n转向内容简介:".$this->Fields['description']."\r\n\r\n\r\n"; echo $pageHtml; } else { header("location:{$this->Fields['redirecturl']}"); @@ -693,11 +693,11 @@ class Archives $query = "Select arc.id,arc.title,arc.shorttitle,arc.typeid,arc.ismake,arc.senddate,arc.arcrank,arc.money,arc.filename,arc.litpic, t.typedir,t.typename,t.namerule,t.namerule2,t.ispart,t.moresite,t.siteurl,t.sitepath from `#@__archives` arc left join #@__arctype t on arc.typeid=t.id "; - $nextRow = $this->dsql->GetOne($query . $next); - $preRow = $this->dsql->GetOne($query . $pre); + $nextRow = $this->dsql->GetOne($query.$next); + $preRow = $this->dsql->GetOne($query.$pre); if (is_array($preRow)) { if (defined('DEDEMOB')) { - $mlink = 'view.php?aid=' . $preRow['id']; + $mlink = 'view.php?aid='.$preRow['id']; } else { $mlink = GetFileUrl( $preRow['id'], @@ -730,7 +730,7 @@ class Archives } if (is_array($nextRow)) { if (defined('DEDEMOB')) { - $mlink = 'view.php?aid=' . $preRow['id']; + $mlink = 'view.php?aid='.$preRow['id']; } else { $mlink = GetFileUrl( $nextRow['id'], @@ -777,7 +777,7 @@ class Archives } else if ($gtype == 'nextimg') { $rs = $this->PreNext['nextimg']; } else { - $rs = $this->PreNext['pre'] . "   " . $this->PreNext['next']; + $rs = $this->PreNext['pre']."   ".$this->PreNext['next']; } return $rs; } @@ -796,7 +796,7 @@ class Archives if ($totalPage == 1) { return ""; } - $PageList = "
  • 共" . $totalPage . "页:
  • "; + $PageList = "
  • 共".$totalPage."页:
  • "; $nPage = $nowPage - 1; $lPage = $nowPage + 1; if ($nowPage == 1) { @@ -828,7 +828,7 @@ class Archives } else { $n = $i; if ($nowPage != $i) { - $PageList .= "
  • " . $n . "
  • "; + $PageList .= "
  • ".$n."
  • "; if ($cfg_rewrite == 'Y') { $PageList = str_replace(".php?aid=", "-", $PageList); $PageList = preg_replace("#&pageno=(\d+)#i", '-\\1.html', $PageList); @@ -863,36 +863,36 @@ class Archives if ($totalPage == 1) { return ""; } - $PageList = "
  • 共" . $totalPage . "页:
  • "; + $PageList = "
  • 共".$totalPage."页:
  • "; $nPage = $nowPage - 1; $lPage = $nowPage + 1; if ($nowPage == 1) { $PageList .= "
  • 上一页
  • "; } else { if ($nPage == 1) { - $PageList .= "
  • 上一页
  • "; + $PageList .= "
  • 上一页
  • "; } else { - $PageList .= "
  • 上一页
  • "; + $PageList .= "
  • 上一页
  • "; } } for ($i = 1; $i <= $totalPage; $i++) { if ($i == 1) { if ($nowPage != 1) { - $PageList .= "
  • 1
  • "; + $PageList .= "
  • 1
  • "; } else { $PageList .= "
  • 1
  • "; } } else { $n = $i; if ($nowPage != $i) { - $PageList .= "
  • " . $n . "
  • "; + $PageList .= "
  • ".$n."
  • "; } else { $PageList .= "
  • {$n}
  • "; } } } if ($lPage <= $totalPage) { - $PageList .= "
  • 下一页
  • "; + $PageList .= "
  • 下一页
  • "; } else { $PageList .= "
  • 下一页
  • "; } @@ -934,12 +934,12 @@ class Archives $revalue = "\r\n"; foreach ($this->SplitTitles as $k => $v) { if ($i == 1) { - $revalue .= "\r\n"; + $revalue .= "\r\n"; } else { if ($pageNo == $i) { - $revalue .= "\r\n"; + $revalue .= "\r\n"; } else { - $revalue .= "\r\n"; + $revalue .= "\r\n"; } } $i++; @@ -1096,7 +1096,7 @@ function _highlight($string, $words, $result, $pre) if ($GLOBALS['replaced'][$word] == 1) { continue; } - $string = preg_replace("#" . preg_quote($word) . "#", $result[$key], $string, $cfg_replace_num); + $string = preg_replace("#".preg_quote($word)."#", $result[$key], $string, $cfg_replace_num); if (strpos($string, $word) !== FALSE) { $GLOBALS['replaced'][$word] = 1; } @@ -1104,5 +1104,5 @@ function _highlight($string, $words, $result, $pre) } else { $string = str_replace($words, $result, $string); } - return $pre . $string; + return $pre.$string; } \ No newline at end of file diff --git a/src/include/arc.freelist.class.php b/src/include/arc.freelist.class.php index ae3f87f4..3b2e60e7 100755 --- a/src/include/arc.freelist.class.php +++ b/src/include/arc.freelist.class.php @@ -9,7 +9,7 @@ * @link https://www.dedebiz.com */ -require_once DEDEINC . '/arc.partview.class.php'; +require_once DEDEINC.'/arc.partview.class.php'; @set_time_limit(0); /** @@ -150,7 +150,7 @@ class FreeList if ($cfg_list_son == 'N') { $addSql .= " AND (typeid='$typeid') "; } else { - $addSql .= " AND typeid in (" . GetSonIds($typeid, 0, TRUE) . ") "; + $addSql .= " AND typeid in (".GetSonIds($typeid, 0, TRUE).") "; } } @@ -206,14 +206,14 @@ class FreeList */ function LoadTemplet() { - $tmpdir = $GLOBALS['cfg_basedir'] . $GLOBALS['cfg_templets_dir']; + $tmpdir = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']; $tempfile = str_replace("{style}", $GLOBALS['cfg_df_style'], $this->FLInfos['templet']); - $tempfile = $tmpdir . "/" . $tempfile; + $tempfile = $tmpdir."/".$tempfile; if (!file_exists($tempfile)) { - $tempfile = $tmpdir . "/" . $GLOBALS['cfg_df_style'] . "/list_free.htm"; + $tempfile = $tmpdir."/".$GLOBALS['cfg_df_style']."/list_free.htm"; } $this->dtp->LoadTemplate($tempfile); - $this->TempletsFile = preg_replace("#^" . $GLOBALS['cfg_basedir'] . "#", '', $tempfile); + $this->TempletsFile = preg_replace("#^".$GLOBALS['cfg_basedir']."#", '', $tempfile); } /** @@ -251,11 +251,11 @@ class FreeList //文件名 $makeFile = $this->GetMakeFileRule(); if (!preg_match("#^\/#", $makeFile)) { - $makeFile = "/" . $makeFile; + $makeFile = "/".$makeFile; } $makeFile = str_replace('{page}', $this->PageNo, $makeFile); $murl = $makeFile; - $makeFile = $GLOBALS['cfg_basedir'] . $makeFile; + $makeFile = $GLOBALS['cfg_basedir'].$makeFile; $makeFile = preg_replace("#\/{1,}#", "/", $makeFile); if ($this->PageNo == 1) { $firstFile = $makeFile; @@ -263,14 +263,14 @@ class FreeList //保存文件 $this->dtp->SaveTo($makeFile); - echo "
    "; + echo "
    "; } if ($this->FLInfos['nodefault'] == 0) { - $murl = '/' . str_replace('{cmspath}', $GLOBALS['cfg_cmspath'], $this->FLInfos['listdir']); - $murl .= '/' . $this->FLInfos['defaultpage']; - $indexfile = $GLOBALS['cfg_basedir'] . $murl; + $murl = '/'.str_replace('{cmspath}', $GLOBALS['cfg_cmspath'], $this->FLInfos['listdir']); + $murl .= '/'.$this->FLInfos['defaultpage']; + $indexfile = $GLOBALS['cfg_basedir'].$murl; $murl = preg_replace("#\/{1,}#", "/", $murl); - echo "
    复制:$firstFile 为 " . $this->FLInfos['defaultpage'] . "

    "; + echo "
    复制:$firstFile 为 ".$this->FLInfos['defaultpage']."

    "; copy($firstFile, $indexfile); } $this->Close(); @@ -300,20 +300,20 @@ class FreeList function DisplayPartTemplets() { $nmfa = 0; - $tmpdir = $GLOBALS['cfg_basedir'] . $GLOBALS['cfg_templets_dir']; + $tmpdir = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']; if ($this->Fields['ispart'] == 1) { $tempfile = str_replace("{tid}", $this->FreeID, $this->Fields['tempindex']); $tempfile = str_replace("{cid}", $this->ChannelUnit->ChannelInfos['nid'], $tempfile); - $tempfile = $tmpdir . "/" . $tempfile; + $tempfile = $tmpdir."/".$tempfile; if (!file_exists($tempfile)) { - $tempfile = $tmpdir . "/" . $GLOBALS['cfg_df_style'] . "/index_default.htm"; + $tempfile = $tmpdir."/".$GLOBALS['cfg_df_style']."/index_default.htm"; } $this->PartView->SetTemplet($tempfile); } else if ($this->Fields['ispart'] == 2) { $tempfile = str_replace("{tid}", $this->FreeID, $this->Fields['tempone']); $tempfile = str_replace("{cid}", $this->ChannelUnit->ChannelInfos['nid'], $tempfile); - if (is_file($tmpdir . "/" . $tempfile)) { - $this->PartView->SetTemplet($tmpdir . "/" . $tempfile); + if (is_file($tmpdir."/".$tempfile)) { + $this->PartView->SetTemplet($tmpdir."/".$tempfile); } else { $this->PartView->SetTemplet("这是没有使用模板的单独页!", "string"); $nmfa = 1; @@ -321,7 +321,7 @@ class FreeList } CreateDir($this->Fields['typedir']); $makeUrl = $this->GetMakeFileRule($this->Fields['id'], "index", $this->Fields['typedir'], $this->Fields['defaultname'], $this->Fields['namerule2']); - $makeFile = $this->GetTruePath() . $makeUrl; + $makeFile = $this->GetTruePath().$makeUrl; if ($nmfa == 0) { $this->PartView->Display(); } else { @@ -429,8 +429,8 @@ class FreeList $tablewidth = 100; if ($col == "") $col = 1; $colWidth = ceil(100 / $col); - $tablewidth = $tablewidth . "%"; - $colWidth = $colWidth . "%"; + $tablewidth = $tablewidth."%"; + $colWidth = $colWidth."%"; //按不同情况设定SQL条件 $orwhere = " arc.arcrank > -1 AND channel>-1 "; @@ -446,7 +446,7 @@ class FreeList if ($cfg_list_son == 'N') { $orwhere .= " AND (arc.typeid='$typeid') "; } else { - $orwhere .= " AND arc.typeid IN (" . GetSonIds($typeid, 0, TRUE) . ") "; + $orwhere .= " AND arc.typeid IN (".GetSonIds($typeid, 0, TRUE).") "; } } @@ -507,7 +507,7 @@ class FreeList if (is_object($this->ChannelUnit)) { $addtable = $this->ChannelUnit->ChannelInfos['addtable']; if ($addtable != "") { - $addJoin = " LEFT JOIN $addtable ON arc.id = " . $addtable . ".aid "; + $addJoin = " LEFT JOIN $addtable ON arc.id = ".$addtable.".aid "; $addField = ""; $fields = explode(",", $this->ChannelUnit->ChannelInfos['listfields']); foreach ($fields as $k => $v) { @@ -516,9 +516,9 @@ class FreeList foreach ($this->ChannelUnit->ChannelFields as $k => $arr) { if (isset($nfields[$k])) { if (!empty($arr['rename'])) { - $addField .= "," . $addtable . "." . $k . " as " . $arr['rename']; + $addField .= ",".$addtable.".".$k." as ".$arr['rename']; } else { - $addField .= "," . $addtable . "." . $k; + $addField .= ",".$addtable.".".$k; } } } @@ -531,7 +531,7 @@ class FreeList FROM {$this->maintable} arc LEFT JOIN #@__arctype tp ON arc.typeid=tp.id $addJoin - WHERE $orwhere $ordersql LIMIT $limitstart," . $this->PageSize; + WHERE $orwhere $ordersql LIMIT $limitstart,".$this->PageSize; $this->dsql->SetQuery($query); $this->dsql->Execute("al"); $artlist = ""; @@ -589,28 +589,28 @@ class FreeList $row['description'] = cn_substr($row['description'], $infolen); if ($row['litpic'] == '-' || $row['litpic'] == '') { - $row['litpic'] = $GLOBALS['cfg_cmspath'] . '/static/defaultpic.gif'; + $row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/defaultpic.gif'; } if (!preg_match("#^http:\/\/#i", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') { - $row['litpic'] = $GLOBALS['cfg_mainsite'] . $row['litpic']; + $row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic']; } $row['picname'] = $row['litpic']; $row['info'] = $row['description']; $row['filename'] = $row['arcurl']; $row['stime'] = GetDateMK($row['pubdate']); - $row['textlink'] = "" . $row['title'] . ""; - $row['typelink'] = "[" . $row['typename'] . "]"; - $row['imglink'] = "" . str_replace(""; - $row['image'] = "" . str_replace(""; + $row['textlink'] = "".$row['title'].""; + $row['typelink'] = "[".$row['typename']."]"; + $row['imglink'] = "".str_replace(""; + $row['image'] = "".str_replace(""; $row['plusurl'] = $row['phpurl'] = $GLOBALS['cfg_phpurl']; $row['memberurl'] = $GLOBALS['cfg_memberurl']; $row['templeturl'] = $GLOBALS['cfg_templeturl']; $row['title'] = cn_substr($row['title'], $titlelen); if ($row['color'] != "") { - $row['title'] = "" . $row['title'] . ""; + $row['title'] = "".$row['title'].""; } if (preg_match("#c#", $row['flag'])) { - $row['title'] = "" . $row['title'] . ""; + $row['title'] = "".$row['title'].""; } //编译附加表里的数据 @@ -688,12 +688,12 @@ class FreeList } $totalpage = ceil($this->TotalResult / $this->PageSize); if ($totalpage <= 1 && $this->TotalResult > 0) { - return "
  • 共1页/" . $this->TotalResult . "条记录
  • "; + return "
  • 共1页/".$this->TotalResult."条记录
  • "; } if ($this->TotalResult == 0) { - return "
  • 共0页/" . $this->TotalResult . "条记录
  • "; + return "
  • 共0页/".$this->TotalResult."条记录
  • "; } - $maininfo = "
  • 共{$totalpage}页/" . $this->TotalResult . "条记录
  • "; + $maininfo = "
  • 共{$totalpage}页/".$this->TotalResult."条记录
  • "; $purl = $this->GetCurUrl(); $tnamerule = $this->GetMakeFileRule(); $tnamerule = preg_replace("#^(.*)\/#", '', $tnamerule); @@ -701,16 +701,16 @@ class FreeList //获得上一页和主页的链接 if ($this->PageNo != 1) { - $prepage .= "
  • 上一页
  • \r\n"; - $indexpage = "
  • 首页
  • \r\n"; + $prepage .= "
  • 上一页
  • \r\n"; + $indexpage = "
  • 首页
  • \r\n"; } else { $indexpage = "
  • 首页
  • \r\n"; } //下一页,未页的链接 if ($this->PageNo != $totalpage && $totalpage > 1) { - $nextpage .= "下一页\r\n"; - $endpage = "末页\r\n"; + $nextpage .= "下一页\r\n"; + $endpage = "末页\r\n"; } else { $endpage = "
  • 末页
  • \r\n"; } @@ -723,9 +723,9 @@ class FreeList $optionlist = ""; @@ -750,27 +750,27 @@ class FreeList if ($j == $this->PageNo) { $listdd .= "
  • {$j}
  • \r\n"; } else { - $listdd .= "
  • " . $j . "
  • \r\n"; + $listdd .= "
  • ".$j."
  • \r\n"; } } $plist = ""; if (preg_match('#info#i', $listitem)) { - $plist .= $maininfo . ' '; + $plist .= $maininfo.' '; } if (preg_match('#index#i', $listitem)) { - $plist .= $indexpage . ' '; + $plist .= $indexpage.' '; } if (preg_match('#pre#i', $listitem)) { - $plist .= $prepage . ' '; + $plist .= $prepage.' '; } if (preg_match('#pageno#i', $listitem)) { - $plist .= $listdd . ' '; + $plist .= $listdd.' '; } if (preg_match('#next#i', $listitem)) { - $plist .= $nextpage . ' '; + $plist .= $nextpage.' '; } if (preg_match('#end#i', $listitem)) { - $plist .= $endpage . ' '; + $plist .= $endpage.' '; } if (preg_match('#option#i', $listitem)) { $plist .= $optionlist; @@ -797,28 +797,28 @@ class FreeList } $totalpage = ceil($this->TotalResult / $this->PageSize); if ($totalpage <= 1 && $this->TotalResult > 0) { - return "
  • 共1页/" . $this->TotalResult . "条记录
  • "; + return "
  • 共1页/".$this->TotalResult."条记录
  • "; } if ($this->TotalResult == 0) { - return "
  • 共0页/" . $this->TotalResult . "条记录
  • "; + return "
  • 共0页/".$this->TotalResult."条记录
  • "; } - $maininfo = "
  • 共{$totalpage}页/" . $this->TotalResult . "条记录
  • "; + $maininfo = "
  • 共{$totalpage}页/".$this->TotalResult."条记录
  • "; $purl = $this->GetCurUrl(); - $geturl = "lid=" . $this->FreeID . "&TotalResult=" . $this->TotalResult . "&"; - $hidenform = "\r\n"; - $hidenform .= "\r\n"; - $purl .= "?" . $geturl; + $geturl = "lid=".$this->FreeID."&TotalResult=".$this->TotalResult."&"; + $hidenform = "\r\n"; + $hidenform .= "\r\n"; + $purl .= "?".$geturl; //获得上一页和下一页的链接 if ($this->PageNo != 1) { - $prepage .= "
  • 上一页\r\n"; - $indexpage = "
  • 首页\r\n"; + $prepage .= "
  • 上一页\r\n"; + $indexpage = "
  • 首页\r\n"; } else { $indexpage = "
  • 首页
  • \r\n"; } if ($this->PageNo != $totalpage && $totalpage > 1) { - $nextpage .= "
  • 下一页\r\n"; - $endpage = "
  • 末页\r\n"; + $nextpage .= "
  • 下一页\r\n"; + $endpage = "
  • 末页\r\n"; } else { $endpage = "
  • 末页
  • \r\n"; } @@ -838,13 +838,13 @@ class FreeList if ($j == $this->PageNo) { $listdd .= "
  • $j
  • \r\n"; } else { - $listdd .= "
  • " . $j . "
  • \r\n"; + $listdd .= "
  • ".$j."
  • \r\n"; } } - $plist = "
    $hidenform"; - $plist .= $maininfo . $indexpage . $prepage . $listdd . $nextpage . $endpage; + $plist = "$hidenform"; + $plist .= $maininfo.$indexpage.$prepage.$listdd.$nextpage.$endpage; if ($totalpage > $total_list) { - $plist .= "\r\n"; + $plist .= "\r\n"; $plist .= "\r\n"; } $plist .= "
    \r\n"; diff --git a/src/include/arc.listview.class.php b/src/include/arc.listview.class.php index 2ac59100..dcb003f0 100755 --- a/src/include/arc.listview.class.php +++ b/src/include/arc.listview.class.php @@ -8,7 +8,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(DEDEINC . '/arc.partview.class.php'); +require_once(DEDEINC.'/arc.partview.class.php'); helper('cache'); @set_time_limit(0); @@ -80,7 +80,7 @@ class ListView //设置一些全局参数的值 foreach ($GLOBALS['PubFields'] as $k => $v) $this->Fields[$k] = $v; - $this->Fields['rsslink'] = $GLOBALS['cfg_cmsurl'] . "/data/rss/" . $this->TypeID . ".xml"; + $this->Fields['rsslink'] = $GLOBALS['cfg_cmsurl']."/data/rss/".$this->TypeID.".xml"; //设置环境变量 SetSysEnv($this->TypeID, $this->Fields['typename'], 0, '', 'list'); @@ -101,7 +101,7 @@ class ListView $this->dsql->SetQuery($selquery); $this->dsql->Execute(); while ($arr = $this->dsql->GetArray()) { - $this->CrossID .= ($this->CrossID == '' ? $arr['id'] : ',' . $arr['id']); + $this->CrossID .= ($this->CrossID == '' ? $arr['id'] : ','.$arr['id']); } } } @@ -143,11 +143,11 @@ class ListView if ($cfg_list_son == 'N') { if ($cfg_need_typeid2 == 'N') { - if ($this->CrossID == '') $this->addSql .= " AND (arc.typeid='" . $this->TypeID . "') "; + if ($this->CrossID == '') $this->addSql .= " AND (arc.typeid='".$this->TypeID."') "; else $this->addSql .= " AND (arc.typeid in({$this->CrossID},{$this->TypeID})) "; } else { if ($this->CrossID == '') { - $this->addSql .= " AND ( (arc.typeid='" . $this->TypeID . "') OR CONCAT(',', arc.typeid2, ',') LIKE $typeid2like) "; + $this->addSql .= " AND ( (arc.typeid='".$this->TypeID."') OR CONCAT(',', arc.typeid2, ',') LIKE $typeid2like) "; } else { if ($cfg_cross_sectypeid == 'Y') { $typeid2Clike = " '%,{$this->CrossID},%' "; @@ -181,7 +181,7 @@ class ListView } } if ($this->TotalResult == -1) { - $cquery = "SELECT COUNT(*) AS dd FROM `#@__arctiny` arc WHERE " . $this->addSql; + $cquery = "SELECT COUNT(*) AS dd FROM `#@__arctiny` arc WHERE ".$this->addSql; $row = $this->dsql->GetOne($cquery); if (is_array($row)) { $this->TotalResult = $row['dd']; @@ -191,14 +191,14 @@ class ListView } //初始化列表模板,并统计页面总数 - $tempfile = $GLOBALS['cfg_basedir'] . $GLOBALS['cfg_templets_dir'] . "/" . $this->TypeLink->TypeInfos['templist']; + $tempfile = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$this->TypeLink->TypeInfos['templist']; $tempfile = str_replace("{tid}", $this->TypeID, $tempfile); $tempfile = str_replace("{cid}", $this->ChannelUnit->ChannelInfos['nid'], $tempfile); if (defined('DEDEMOB')) { $tempfile = str_replace('.htm', '_m.htm', $tempfile); } if (!file_exists($tempfile)) { - $tempfile = $GLOBALS['cfg_basedir'] . $GLOBALS['cfg_templets_dir'] . "/" . $GLOBALS['cfg_df_style'] . "/list_default.htm"; + $tempfile = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$GLOBALS['cfg_df_style']."/list_default.htm"; if (defined('DEDEMOB')) { $tempfile = str_replace('.htm', '_m.htm', $tempfile); } @@ -243,7 +243,7 @@ class ListView //创建封面模板文件 if ($this->TypeLink->TypeInfos['isdefault'] == -1) { echo '这个类目是动态类目!'; - return '../plus/list.php?tid=' . $this->TypeLink->TypeInfos['id']; + return '../plus/list.php?tid='.$this->TypeLink->TypeInfos['id']; } //单独页面 @@ -278,9 +278,9 @@ class ListView $makeFile = str_replace("{page}", $this->PageNo, $makeFile); $murl = $makeFile; if (!preg_match("/^\//", $makeFile)) { - $makeFile = "/" . $makeFile; + $makeFile = "/".$makeFile; } - $makeFile = $this->GetTruePath() . $makeFile; + $makeFile = $this->GetTruePath().$makeFile; $makeFile = preg_replace("/\/{1,}/", "/", $makeFile); $murl = $this->GetTrueUrl($murl); $this->dtp->SaveTo($makeFile); @@ -296,9 +296,9 @@ class ListView ) { $onlyrule = $this->GetMakeFileRule($this->Fields['id'], "list", $this->Fields['typedir'], '', $this->Fields['namerule2']); $onlyrule = str_replace("{page}", "1", $onlyrule); - $list_1 = $this->GetTruePath() . $onlyrule; - $murl = MfTypedir($this->Fields['typedir']) . '/' . $this->Fields['defaultname']; - $indexname = $this->GetTruePath() . $murl; + $list_1 = $this->GetTruePath().$onlyrule; + $murl = MfTypedir($this->Fields['typedir']).'/'.$this->Fields['defaultname']; + $indexname = $this->GetTruePath().$murl; copy($list_1, $indexname); } } @@ -321,15 +321,15 @@ class ListView if ((empty($this->PageNo) || $this->PageNo == 1) && $this->TypeLink->TypeInfos['ispart'] == 1 ) { - $tmpdir = $GLOBALS['cfg_basedir'] . $GLOBALS['cfg_templets_dir']; + $tmpdir = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']; $tempfile = str_replace("{tid}", $this->TypeID, $this->Fields['tempindex']); $tempfile = str_replace("{cid}", $this->ChannelUnit->ChannelInfos['nid'], $tempfile); - $tempfile = $tmpdir . "/" . $tempfile; + $tempfile = $tmpdir."/".$tempfile; if (defined('DEDEMOB')) { $tempfile = str_replace('.htm', '_m.htm', $tempfile); } if (!file_exists($tempfile)) { - $tempfile = $tmpdir . "/" . $GLOBALS['cfg_df_style'] . "/index_default.htm"; + $tempfile = $tmpdir."/".$GLOBALS['cfg_df_style']."/index_default.htm"; if (defined('DEDEMOB')) { $tempfile = str_replace('.htm', '_m.htm', $tempfile); } @@ -352,16 +352,16 @@ class ListView $this->PartView = new PartView($this->TypeID, false); $this->PartView->SetTypeLink($this->TypeLink); $nmfa = 0; - $tmpdir = $GLOBALS['cfg_basedir'] . $GLOBALS['cfg_templets_dir']; + $tmpdir = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']; if ($this->Fields['ispart'] == 1) { $tempfile = str_replace("{tid}", $this->TypeID, $this->Fields['tempindex']); $tempfile = str_replace("{cid}", $this->ChannelUnit->ChannelInfos['nid'], $tempfile); - $tempfile = $tmpdir . "/" . $tempfile; + $tempfile = $tmpdir."/".$tempfile; if (defined('DEDEMOB')) { $tempfile = str_replace('.htm', '_m.htm', $tempfile); } if (!file_exists($tempfile)) { - $tempfile = $tmpdir . "/" . $GLOBALS['cfg_df_style'] . "/index_default.htm"; + $tempfile = $tmpdir."/".$GLOBALS['cfg_df_style']."/index_default.htm"; if (defined('DEDEMOB')) { $tempfile = str_replace('.htm', '_m.htm', $tempfile); } @@ -374,7 +374,7 @@ class ListView CreateDir(MfTypedir($this->Fields['typedir'])); $makeUrl = $this->GetMakeFileRule($this->Fields['id'], "index", MfTypedir($this->Fields['typedir']), $this->Fields['defaultname'], $this->Fields['namerule2']); $makeUrl = preg_replace("/\/{1,}/", "/", $makeUrl); - $makeFile = $this->GetTruePath() . $makeUrl; + $makeFile = $this->GetTruePath().$makeUrl; if ($nmfa == 0) { $this->PartView->SaveToHtml($makeFile); } else { @@ -397,17 +397,17 @@ class ListView $this->PartView = new PartView($this->TypeID, false); $this->PartView->SetTypeLink($this->TypeLink); $nmfa = 0; - $tmpdir = $GLOBALS['cfg_basedir'] . $GLOBALS['cfg_templets_dir']; + $tmpdir = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']; if ($this->Fields['ispart'] == 1) { //封面模板 $tempfile = str_replace("{tid}", $this->TypeID, $this->Fields['tempindex']); $tempfile = str_replace("{cid}", $this->ChannelUnit->ChannelInfos['nid'], $tempfile); - $tempfile = $tmpdir . "/" . $tempfile; + $tempfile = $tmpdir."/".$tempfile; if (defined('DEDEMOB')) { $tempfile = str_replace('.htm', '_m.htm', $tempfile); } if (!file_exists($tempfile)) { - $tempfile = $tmpdir . "/" . $GLOBALS['cfg_df_style'] . "/index_default.htm"; + $tempfile = $tmpdir."/".$GLOBALS['cfg_df_style']."/index_default.htm"; if (defined('DEDEMOB')) { $tempfile = str_replace('.htm', '_m.htm', $tempfile); } @@ -421,7 +421,7 @@ class ListView } CreateDir(MfTypedir($this->Fields['typedir'])); $makeUrl = $this->GetMakeFileRule($this->Fields['id'], "index", MfTypedir($this->Fields['typedir']), $this->Fields['defaultname'], $this->Fields['namerule2']); - $makeFile = $this->GetTruePath() . $makeUrl; + $makeFile = $this->GetTruePath().$makeUrl; if ($nmfa == 0) { $this->PartView->Display(); } else { @@ -456,9 +456,9 @@ class ListView { if ($this->Fields['moresite'] == 1) { if ($this->Fields['sitepath'] != '') { - $nurl = preg_replace("/^" . $this->Fields['sitepath'] . "/", '', $nurl); + $nurl = preg_replace("/^".$this->Fields['sitepath']."/", '', $nurl); } - $nurl = $this->Fields['siteurl'] . $nurl; + $nurl = $this->Fields['siteurl'].$nurl; } return $nurl; } @@ -554,7 +554,7 @@ class ListView { $typedir = MfTypedir($typedir); if ($wname == 'index') { - return $typedir . '/' . $defaultname; + return $typedir.'/'.$defaultname; } else { $namerule2 = str_replace('{tid}', $typeid, $namerule2); $namerule2 = str_replace('{typedir}', $typedir, $namerule2); @@ -619,8 +619,8 @@ class ListView if ($tablewidth == '') $tablewidth = 100; if ($col == '') $col = 1; $colWidth = ceil(100 / $col); - $tablewidth = $tablewidth . '%'; - $colWidth = $colWidth . '%'; + $tablewidth = $tablewidth.'%'; + $colWidth = $colWidth.'%'; $innertext = trim($innertext); if ($innertext == '') { @@ -642,7 +642,7 @@ class ListView //获得附加表的相关信息 $addtable = $this->ChannelUnit->ChannelInfos['addtable']; if ($addtable != "") { - $addJoin = " LEFT JOIN `$addtable` ON arc.id = " . $addtable . '.aid '; + $addJoin = " LEFT JOIN `$addtable` ON arc.id = ".$addtable.'.aid '; $addField = ''; $fields = explode(',', $this->ChannelUnit->ChannelInfos['listfields']); foreach ($fields as $k => $v) { @@ -652,9 +652,9 @@ class ListView foreach ($this->ChannelUnit->ChannelFields as $k => $arr) { if (isset($nfields[$k])) { if (!empty($arr['rename'])) { - $addField .= ',' . $addtable . '.' . $k . ' as ' . $arr['rename']; + $addField .= ','.$addtable.'.'.$k.' as '.$arr['rename']; } else { - $addField .= ',' . $addtable . '.' . $k; + $addField .= ','.$addtable.'.'.$k; } } } @@ -750,25 +750,25 @@ class ListView $row['sitepath'] ); if ($row['litpic'] == '-' || $row['litpic'] == '') { - $row['litpic'] = $GLOBALS['cfg_cmspath'] . '/static/defaultpic.jpg'; + $row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/defaultpic.jpg'; } if (!preg_match("/^http:\/\//i", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') { - $row['litpic'] = $GLOBALS['cfg_mainsite'] . $row['litpic']; + $row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic']; } $row['picname'] = $row['litpic']; $row['stime'] = GetDateMK($row['pubdate']); - $row['typelink'] = "" . $row['typename'] . ""; - $row['image'] = "" . preg_replace("/[<]/", "", $row['title']) . "'>"; - $row['imglink'] = "" . $row['image'] . ""; + $row['typelink'] = "".$row['typename'].""; + $row['image'] = "".preg_replace("/[<]/", "", $row['title'])."'>"; + $row['imglink'] = "".$row['image'].""; $row['fulltitle'] = $row['title']; $row['title'] = cn_substr($row['title'], $titlelen); if ($row['color'] != '') { - $row['title'] = "" . $row['title'] . ""; + $row['title'] = "".$row['title'].""; } if (preg_match('/c/', $row['flag'])) { - $row['title'] = "" . $row['title'] . ""; + $row['title'] = "".$row['title'].""; } - $row['textlink'] = "" . $row['title'] . ""; + $row['textlink'] = "".$row['title'].""; $row['plusurl'] = $row['phpurl'] = $GLOBALS['cfg_phpurl']; $row['memberurl'] = $GLOBALS['cfg_memberurl']; $row['templeturl'] = $GLOBALS['cfg_templeturl']; @@ -833,27 +833,27 @@ class ListView $totalpage = ceil($this->TotalResult / $this->PageSize); if ($totalpage <= 1 && $this->TotalResult > 0) { - return "
  • 1" . $this->TotalResult . "条记录
  • \r\n"; + return "
  • 1".$this->TotalResult."条记录
  • \r\n"; } if ($this->TotalResult == 0) { - return "
  • 0" . $this->TotalResult . "条记录
  • \r\n"; + return "
  • 0".$this->TotalResult."条记录
  • \r\n"; } $purl = $this->GetCurUrl(); - $maininfo = "
  • {$totalpage}" . $this->TotalResult . "
  • \r\n"; + $maininfo = "
  • {$totalpage}".$this->TotalResult."
  • \r\n"; $tnamerule = $this->GetMakeFileRule($this->Fields['id'], "list", $this->Fields['typedir'], $this->Fields['defaultname'], $this->Fields['namerule2']); //获得上一页和主页的链接 if ($this->PageNo != 1) { - $prepage .= "
  • 上一页
  • \r\n"; - $indexpage = "
  • 首页
  • \r\n"; + $prepage .= "
  • 上一页
  • \r\n"; + $indexpage = "
  • 首页
  • \r\n"; } else { $indexpage = "
  • 首页
  • \r\n"; } //下一页,未页的链接 if ($this->PageNo != $totalpage && $totalpage > 1) { - $nextpage .= "
  • 下一页
  • \r\n"; - $endpage = "
  • 末页
  • \r\n"; + $nextpage .= "
  • 下一页
  • \r\n"; + $endpage = "
  • 末页
  • \r\n"; } else { $endpage = "
  • 末页
  • \r\n"; } @@ -868,9 +868,9 @@ class ListView $optionlist = "
  • \r\n"; @@ -894,7 +894,7 @@ class ListView if ($j == $this->PageNo) { $listdd .= "
  • $j
  • \r\n"; } else { - $listdd .= "
  • " . $j . "
  • \r\n"; + $listdd .= "
  • ".$j."
  • \r\n"; } } $plist = ''; @@ -928,12 +928,12 @@ class ListView } $totalpage = ceil($this->TotalResult / $this->PageSize); if ($totalpage <= 1 && $this->TotalResult > 0) { - return "
  • 共 1 页/" . $this->TotalResult . " 条记录
  • \r\n"; + return "
  • 共 1 页/".$this->TotalResult." 条记录
  • \r\n"; } if ($this->TotalResult == 0) { - return "
  • 共 0 页/" . $this->TotalResult . " 条记录
  • \r\n"; + return "
  • 共 0 页/".$this->TotalResult." 条记录
  • \r\n"; } - $maininfo = "
  • {$totalpage}" . $this->TotalResult . "
  • \r\n"; + $maininfo = "
  • {$totalpage}".$this->TotalResult."
  • \r\n"; $purl = $this->GetCurUrl(); // 如果开启为静态,则对规则进行替换 @@ -943,8 +943,8 @@ class ListView $purl = $nowurls[0]; } - $geturl = "tid=" . $this->TypeID . "&TotalResult=" . $this->TotalResult . "&"; - $purl .= '?' . $geturl; + $geturl = "tid=".$this->TypeID."&TotalResult=".$this->TotalResult."&"; + $purl .= '?'.$geturl; $optionlist = ''; //$hidenform = "\r\n"; @@ -952,14 +952,14 @@ class ListView //获得上一页和下一页的链接 if ($this->PageNo != 1) { - $prepage .= "
  • 上一页
  • \r\n"; - $indexpage = "
  • 首页
  • \r\n"; + $prepage .= "
  • 上一页
  • \r\n"; + $indexpage = "
  • 首页
  • \r\n"; } else { $indexpage = "
  • 首页
  • \r\n"; } if ($this->PageNo != $totalpage && $totalpage > 1) { - $nextpage .= "
  • 下一页
  • \r\n"; - $endpage = "
  • 末页
  • \r\n"; + $nextpage .= "
  • 下一页
  • \r\n"; + $endpage = "
  • 末页
  • \r\n"; } else { $endpage = "
  • 末页
  • \r\n"; } @@ -984,7 +984,7 @@ class ListView if ($j == $this->PageNo) { $listdd .= "
  • $j
  • \r\n"; } else { - $listdd .= "
  • " . $j . "
  • \r\n"; + $listdd .= "
  • ".$j."
  • \r\n"; } } diff --git a/src/include/arc.partview.class.php b/src/include/arc.partview.class.php index 9aacc186..8d3a8d3a 100755 --- a/src/include/arc.partview.class.php +++ b/src/include/arc.partview.class.php @@ -8,8 +8,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(DEDEINC . '/channelunit.class.php'); -require_once(DEDEINC . '/typelink.class.php'); +require_once(DEDEINC.'/channelunit.class.php'); +require_once(DEDEINC.'/typelink.class.php'); /** * 视图类 @@ -260,7 +260,7 @@ class PartView } if (!isset($GLOBALS['__SpGetArcList'])) { - require_once(dirname(__FILE__) . "/inc/inc_fun_SpGetArcList.php"); + require_once(dirname(__FILE__)."/inc/inc_fun_SpGetArcList.php"); } return SpGetArcList( $this->dsql, diff --git a/src/include/arc.rssview.class.php b/src/include/arc.rssview.class.php index 670a122f..bca9e4ff 100755 --- a/src/include/arc.rssview.class.php +++ b/src/include/arc.rssview.class.php @@ -8,9 +8,9 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(DEDEINC . "/dedetag.class.php"); -require_once(DEDEINC . "/typelink.class.php"); -require_once(DEDEINC . "/channelunit.func.php"); +require_once(DEDEINC."/dedetag.class.php"); +require_once(DEDEINC."/typelink.class.php"); +require_once(DEDEINC."/channelunit.func.php"); @set_time_limit(0); /** @@ -43,7 +43,7 @@ class RssView $this->TypeID = $typeid; $this->dtp = new DedeTagParse(); $this->dtp->refObj = $this; - $templetfiles = $GLOBALS['cfg_basedir'] . $GLOBALS['cfg_templets_dir'] . "/plus/rss.htm"; + $templetfiles = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/plus/rss.htm"; $this->dtp->LoadTemplate($templetfiles); $this->dsql = $GLOBALS['dsql']; $this->TypeLink = new TypeLink($typeid); @@ -51,7 +51,7 @@ class RssView $this->MaxRow = $max_row; $this->TypeFields['title'] = $this->TypeLink->GetPositionLink(false); $this->TypeFields['title'] = preg_replace("/[<>]/", " / ", $this->TypeFields['title']); - $this->TypeFields['typelink'] = $GLOBALS['cfg_basehost'] . $this->TypeLink->GetOneTypeUrl($this->TypeFields); + $this->TypeFields['typelink'] = $GLOBALS['cfg_basehost'].$this->TypeLink->GetOneTypeUrl($this->TypeFields); $this->TypeFields['powerby'] = $GLOBALS['cfg_powerby']; $this->TypeFields['adminemail'] = $GLOBALS['cfg_adminemail']; $this->remoteDir = ''; @@ -92,8 +92,8 @@ class RssView */ function MakeRss($isremote = 0) { - $murl = $GLOBALS['cfg_cmspath'] . "/data/rss/" . $this->TypeID . ".xml"; - $mfile = $GLOBALS['cfg_basedir'] . $murl; + $murl = $GLOBALS['cfg_cmspath']."/data/rss/".$this->TypeID.".xml"; + $mfile = $GLOBALS['cfg_basedir'].$murl; $this->dtp->SaveTo($mfile); return $murl; } @@ -133,12 +133,12 @@ class RssView $innertext = GetSysTemplets("rss.htm"); } $orwhere = " arc.arcrank > -1 "; - $orwhere .= " AND (arc.typeid in (" . GetSonIds($this->TypeID, $this->TypeFields['channeltype']) . ") ) "; + $orwhere .= " AND (arc.typeid in (".GetSonIds($this->TypeID, $this->TypeFields['channeltype']).") ) "; $ordersql = " ORDER BY arc.id desc"; $query = "SELECT arc.*,tp.typedir,tp.typename,tp.isdefault, tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath FROM `#@__archives` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id - WHERE $orwhere $ordersql LIMIT 0," . $this->MaxRow; + WHERE $orwhere $ordersql LIMIT 0,".$this->MaxRow; $this->dsql->SetQuery($query); $this->dsql->Execute('al'); $artlist = ''; @@ -148,10 +148,10 @@ class RssView while ($row = $this->dsql->GetArray('al')) { //处理一些特殊字段 if ($row['litpic'] == '-' || $row['litpic'] == '') { - $row['litpic'] = $GLOBALS['cfg_cmspath'] . '/static/defaultpic.gif'; + $row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/defaultpic.gif'; } if (!preg_match("/^http:\/\//", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') { - $row['litpic'] = $GLOBALS['cfg_mainsite'] . $row['litpic']; + $row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic']; } $row['picname'] = $row['litpic']; $row["arcurl"] = GetFileUrl( @@ -183,8 +183,8 @@ class RssView $row["info"] = $row["description"]; $row["filename"] = $row["arcurl"]; $row["stime"] = GetDateMK($row["pubdate"]); - $row["image"] = ""; - $row["fullurl"] = $GLOBALS["cfg_basehost"] . $row["arcurl"]; + $row["image"] = ""; + $row["fullurl"] = $GLOBALS["cfg_basehost"].$row["arcurl"]; if ($GLOBALS['cfg_multi_site'] == 'Y') $row["fullurl"] = $row["arcurl"]; $row["phpurl"] = $GLOBALS["cfg_plus_dir"]; $row["templeturl"] = $GLOBALS["cfg_templets_dir"]; @@ -212,7 +212,7 @@ class RssView } } } - $artlist .= $dtp2->GetResult() . "\r\n"; + $artlist .= $dtp2->GetResult()."\r\n"; } $this->dsql->FreeResult('al'); return $artlist; diff --git a/src/include/arc.searchview.class.php b/src/include/arc.searchview.class.php index 08ffac7d..38217212 100755 --- a/src/include/arc.searchview.class.php +++ b/src/include/arc.searchview.class.php @@ -8,11 +8,11 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(DEDEINC . "/typelink.class.php"); -require_once(DEDEINC . "/dedetag.class.php"); -require_once(DEDEINC . "/splitword.class.php"); -require_once(DEDEINC . "/taglib/hotwords.lib.php"); -require_once(DEDEINC . "/taglib/channel.lib.php"); +require_once(DEDEINC."/typelink.class.php"); +require_once(DEDEINC."/dedetag.class.php"); +require_once(DEDEINC."/splitword.class.php"); +require_once(DEDEINC."/taglib/hotwords.lib.php"); +require_once(DEDEINC."/taglib/channel.lib.php"); @set_time_limit(0); @ini_set('memory_limit', '512M'); @@ -118,7 +118,7 @@ class SearchView $this->CountRecord(); - $tempfile = $GLOBALS['cfg_basedir'] . $GLOBALS['cfg_templets_dir'] . "/" . $GLOBALS['cfg_df_style'] . "/search.htm"; + $tempfile = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$GLOBALS['cfg_df_style']."/search.htm"; if (defined('DEDEMOB')) { $tempfile = str_replace('.htm', '_m.htm', $tempfile); } @@ -134,7 +134,7 @@ class SearchView } $this->TotalPage = ceil($this->TotalResult / $this->PageSize); if ($this->PageNo == 1) { - $this->dsql->ExecuteNoneQuery("UPDATE `#@__search_keywords` SET result='" . $this->TotalResult . "' WHERE keyword='" . addslashes($keyword) . "'; "); + $this->dsql->ExecuteNoneQuery("UPDATE `#@__search_keywords` SET result='".$this->TotalResult."' WHERE keyword='".addslashes($keyword)."'; "); } } @@ -170,7 +170,7 @@ class SearchView global $cfg_soft_lang; global $cfg_bizcore_appid, $cfg_bizcore_key, $cfg_bizcore_hostname, $cfg_bizcore_port; $keyword = cn_substr($keyword, 50); - $row = $this->dsql->GetOne("SELECT spwords FROM `#@__search_keywords` WHERE keyword='" . addslashes($keyword) . "'; "); + $row = $this->dsql->GetOne("SELECT spwords FROM `#@__search_keywords` WHERE keyword='".addslashes($keyword)."'; "); if (!is_array($row)) { if (strlen($keyword) > 7) { if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { @@ -179,9 +179,9 @@ class SearchView $client->key = $cfg_bizcore_key; $data = $client->Spliteword($keyword); $kvs = explode(",", $data->data); - $keywords = $keyword . " "; + $keywords = $keyword." "; foreach ($kvs as $key => $value) { - $keywords .= ' ' . $value; + $keywords .= ' '.$value; } $keywords = preg_replace("/[ ]{1,}/", " ", $keywords); $client->Close(); @@ -194,12 +194,12 @@ class SearchView $keywords = $sp->GetFinallyResult(); $idx_keywords = $sp->GetFinallyIndex(); ksort($idx_keywords); - $keywords = $keyword . ' '; + $keywords = $keyword.' '; foreach ($idx_keywords as $key => $value) { if (strlen($key) <= 3) { continue; } - $keywords .= ' ' . $key; + $keywords .= ' '.$key; } $keywords = preg_replace("/[ ]{1,}/", " ", $keywords); // var_dump($keywords);exit(); @@ -209,10 +209,10 @@ class SearchView $keywords = $keyword; } $inquery = "INSERT INTO `#@__search_keywords`(`keyword`,`spwords`,`count`,`result`,`lasttime`) - VALUES ('" . addslashes($keyword) . "', '" . addslashes($keywords) . "', '1', '0', '" . time() . "'); "; + VALUES ('".addslashes($keyword)."', '".addslashes($keywords)."', '1', '0', '".time()."'); "; $this->dsql->ExecuteNoneQuery($inquery); } else { - $this->dsql->ExecuteNoneQuery("UPDATE `#@__search_keywords` SET count=count+1,lasttime='" . time() . "' WHERE keyword='" . addslashes($keyword) . "'; "); + $this->dsql->ExecuteNoneQuery("UPDATE `#@__search_keywords` SET count=count+1,lasttime='".time()."' WHERE keyword='".addslashes($keyword)."'; "); $keywords = $row['spwords']; } return $keywords; @@ -281,16 +281,16 @@ class SearchView } $k = addslashes($k); if ($lsql == '') { - $lsql = $lsql . " CONCAT(spwords,' ') LIKE '%$k %' "; + $lsql = $lsql." CONCAT(spwords,' ') LIKE '%$k %' "; } else { - $lsql = $lsql . " OR CONCAT(spwords,' ') LIKE '%$k %' "; + $lsql = $lsql." OR CONCAT(spwords,' ') LIKE '%$k %' "; } } if ($lsql == '') { return ''; } else { $likeword = ''; - $lsql = "(" . $lsql . ") AND NOT(keyword like '" . addslashes($this->Keyword) . "') "; + $lsql = "(".$lsql.") AND NOT(keyword like '".addslashes($this->Keyword)."') "; $this->dsql->SetQuery("SELECT keyword,count FROM `#@__search_keywords` WHERE $lsql ORDER BY lasttime DESC LIMIT 0,$num; "); $this->dsql->Execute('l'); while ($row = $this->dsql->GetArray('l')) { @@ -301,7 +301,7 @@ class SearchView } else { $style = ""; } - $likeword .= " " . $row['keyword'] . " "; + $likeword .= " ".$row['keyword']." "; } return $likeword; } @@ -355,19 +355,19 @@ class SearchView $ksql = $this->GetKeywordSql(); $ksqls = array(); if ($this->StartTime > 0) { - $ksqls[] = " arc.senddate>'" . $this->StartTime . "' "; + $ksqls[] = " arc.senddate>'".$this->StartTime."' "; } if ($this->TypeID > 0) { - $ksqls[] = " typeid IN (" . GetSonIds($this->TypeID) . ") "; + $ksqls[] = " typeid IN (".GetSonIds($this->TypeID).") "; } if ($this->ChannelType > 0) { - $ksqls[] = " arc.channel='" . $this->ChannelType . "'"; + $ksqls[] = " arc.channel='".$this->ChannelType."'"; } if ($this->mid > 0) { - $ksqls[] = " arc.mid = '" . $this->mid . "'"; + $ksqls[] = " arc.mid = '".$this->mid."'"; } $ksqls[] = " arc.arcrank > -1 "; - $this->AddSql = ($ksql == '' ? join(' AND ', $ksqls) : join(' AND ', $ksqls) . " AND ($ksql)"); + $this->AddSql = ($ksql == '' ? join(' AND ', $ksqls) : join(' AND ', $ksqls)." AND ($ksql)"); if ($this->ChannelType < 0 || $this->ChannelTypeid < 0) { if ($this->ChannelType == "0") $id = $this->ChannelTypeid; else $id = $this->ChannelType; @@ -377,10 +377,10 @@ class SearchView } else { $this->AddTable = "#@__archives"; } - $cquery = "SELECT * FROM `{$this->AddTable}` arc WHERE " . $this->AddSql; + $cquery = "SELECT * FROM `{$this->AddTable}` arc WHERE ".$this->AddSql; //var_dump($cquery); $hascode = md5($cquery); - $row = $this->dsql->GetOne("SELECT * FROM `#@__arccache` WHERE `md5hash`='" . $hascode . "' "); + $row = $this->dsql->GetOne("SELECT * FROM `#@__arccache` WHERE `md5hash`='".$hascode."' "); $uptime = time(); if (is_array($row) && time() - $row['uptime'] < 3600 * 24) { $aids = explode(',', $row['cachedata']); @@ -398,7 +398,7 @@ class SearchView } $nums = count($aidarr) - 1; $aids = implode(',', $aidarr); - $delete = "DELETE FROM `#@__arccache` WHERE uptime<" . (time() - 3600 * 24); + $delete = "DELETE FROM `#@__arccache` WHERE uptime<".(time() - 3600 * 24); $this->dsql->SetQuery($delete); $this->dsql->executenonequery(); $insert = "INSERT INTO `#@__arccache` (`md5hash`, `uptime`, `cachedata`) @@ -525,8 +525,8 @@ class SearchView if ($tablewidth == '') $tablewidth = 100; if ($col == '') $col = 1; $colWidth = ceil(100 / $col); - $tablewidth = $tablewidth . "%"; - $colWidth = $colWidth . "%"; + $tablewidth = $tablewidth."%"; + $colWidth = $colWidth."%"; $innertext = trim($innertext); if ($innertext == '') { $innertext = GetSysTemplets("search_list.htm"); @@ -602,20 +602,20 @@ class SearchView $row["title"] = $this->GetRedKeyWord(cn_substr($row["title"], $titlelen)); $row["id"] = $row["id"]; if ($row['litpic'] == '-' || $row['litpic'] == '') { - $row['litpic'] = $GLOBALS['cfg_cmspath'] . '/static/defaultpic.jpg'; + $row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/defaultpic.jpg'; } if (!preg_match("/^http:\/\//", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') { - $row['litpic'] = $GLOBALS['cfg_mainsite'] . $row['litpic']; + $row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic']; } $row['picname'] = $row['litpic']; $row["typeurl"] = GetTypeUrl($row["typeid"], $row["typedir"], $row["isdefault"], $row["defaultname"], $row["ispart"], $row["namerule2"], $row["moresite"], $row["siteurl"], $row["sitepath"]); $row["info"] = $row["description"]; $row["filename"] = $row["arcurl"]; $row["stime"] = GetDateMK($row["pubdate"]); - $row["textlink"] = "" . $row["title"] . ""; - $row["typelink"] = "[" . $row["typename"] . "]"; - $row["imglink"] = ""; - $row["image"] = ""; + $row["textlink"] = "".$row["title"].""; + $row["typelink"] = "[".$row["typename"]."]"; + $row["imglink"] = ""; + $row["image"] = ""; $row['plusurl'] = $row['phpurl'] = $GLOBALS['cfg_phpurl']; $row['memberurl'] = $GLOBALS['cfg_memberurl']; $row['templeturl'] = $GLOBALS['cfg_templeturl']; @@ -674,10 +674,10 @@ class SearchView } $totalpage = ceil($this->TotalResult / $this->PageSize); if ($totalpage <= 1 && $this->TotalResult > 0) { - return "
    • 共1页/" . $this->TotalResult . "条记录
    "; + return "
    • 共1页/".$this->TotalResult."条记录
    "; } if ($this->TotalResult == 0) { - return "
    • 共0页/" . $this->TotalResult . "条记录
    "; + return "
    • 共0页/".$this->TotalResult."条记录
    "; } $purl = $this->GetCurUrl(); @@ -687,30 +687,30 @@ class SearchView if ($this->TotalResult > $this->SearchMaxRc) { $totalpage = ceil($this->SearchMaxRc / $this->PageSize); } - $infos = "
  • 共找到" . $this->TotalResult . "条记录/最大显示{$totalpage}
  • \r\n"; - $geturl = "keyword=" . urlencode($oldkeyword) . "&searchtype=" . $this->SearchType; - $hidenform = "\r\n"; - $geturl .= "&channeltype=" . $this->ChannelType . "&orderby=" . $this->OrderBy; - $hidenform .= "\r\n"; - $hidenform .= "\r\n"; - $geturl .= "&kwtype=" . $this->KType . "&pagesize=" . $this->PageSize; - $hidenform .= "\r\n"; - $hidenform .= "\r\n"; - $geturl .= "&typeid=" . $this->TypeID . "&TotalResult=" . $this->TotalResult . "&"; - $hidenform .= "\r\n"; - $hidenform .= "\r\n"; - $purl .= "?" . $geturl; + $infos = "
  • 共找到".$this->TotalResult."条记录/最大显示{$totalpage}
  • \r\n"; + $geturl = "keyword=".urlencode($oldkeyword)."&searchtype=".$this->SearchType; + $hidenform = "\r\n"; + $geturl .= "&channeltype=".$this->ChannelType."&orderby=".$this->OrderBy; + $hidenform .= "\r\n"; + $hidenform .= "\r\n"; + $geturl .= "&kwtype=".$this->KType."&pagesize=".$this->PageSize; + $hidenform .= "\r\n"; + $hidenform .= "\r\n"; + $geturl .= "&typeid=".$this->TypeID."&TotalResult=".$this->TotalResult."&"; + $hidenform .= "\r\n"; + $hidenform .= "\r\n"; + $purl .= "?".$geturl; //获得上一页和下一页的链接 if ($this->PageNo != 1) { - $prepage .= "
  • 上一页
  • \r\n"; - $indexpage = "
  • 首页
  • \r\n"; + $prepage .= "
  • 上一页
  • \r\n"; + $indexpage = "
  • 首页
  • \r\n"; } else { $indexpage = "
  • 首页
  • \r\n"; } if ($this->PageNo != $totalpage && $totalpage > 1) { - $nextpage .= "
  • 下一页
  • \r\n"; - $endpage = "
  • 末页
  • \r\n"; + $nextpage .= "
  • 下一页
  • \r\n"; + $endpage = "
  • 末页
  • \r\n"; } else { $endpage = "
  • 末页
  • \r\n"; } @@ -734,13 +734,13 @@ class SearchView if ($j == $this->PageNo) { $listdd .= "
  • $j 
  • \r\n"; } else { - $listdd .= "
  • " . $j . " 
  • \r\n"; + $listdd .= "
  • ".$j." 
  • \r\n"; } } $plist = ""; // $plist = "\r\n"; // $plist .= "\r\n"; - $plist .= "$hidenform"; + $plist .= "$hidenform"; $plist .= "
      "; $plist .= $infos; $plist .= $indexpage; diff --git a/src/include/arc.sglistview.class.php b/src/include/arc.sglistview.class.php index 42bc46e4..86a34319 100755 --- a/src/include/arc.sglistview.class.php +++ b/src/include/arc.sglistview.class.php @@ -10,7 +10,7 @@ */ @set_time_limit(0); -require_once(DEDEINC . "/arc.partview.class.php"); +require_once(DEDEINC."/arc.partview.class.php"); /** * 单表模型列表视图类 @@ -85,7 +85,7 @@ class SgListView //设置一些全局参数的值 foreach ($GLOBALS['PubFields'] as $k => $v) $this->Fields[$k] = $v; - $this->Fields['rsslink'] = $GLOBALS['cfg_cmsurl'] . "/data/rss/" . $this->TypeID . ".xml"; + $this->Fields['rsslink'] = $GLOBALS['cfg_cmsurl']."/data/rss/".$this->TypeID.".xml"; //设置环境变量 SetSysEnv($this->TypeID, $this->Fields['typename'], 0, '', 'list'); @@ -106,7 +106,7 @@ class SgListView $this->dsql->SetQuery($selquery); $this->dsql->Execute(); while ($arr = $this->dsql->GetArray()) { - $this->CrossID .= ($this->CrossID == '' ? $arr['id'] : ',' . $arr['id']); + $this->CrossID .= ($this->CrossID == '' ? $arr['id'] : ','.$arr['id']); } } } @@ -144,11 +144,11 @@ class SgListView //栏目id条件 if (!empty($this->TypeID)) { if ($cfg_list_son == 'N') { - if ($this->CrossID == '') $this->addSql .= " AND (arc.typeid='" . $this->TypeID . "') "; + if ($this->CrossID == '') $this->addSql .= " AND (arc.typeid='".$this->TypeID."') "; else $this->addSql .= " AND (arc.typeid IN({$this->CrossID},{$this->TypeID})) "; } else { - if ($this->CrossID == '') $this->addSql .= " AND (arc.typeid IN (" . GetSonIds($this->TypeID, $this->Fields['channeltype']) . ") ) "; - else $this->addSql .= " AND (arc.typeid IN (" . GetSonIds($this->TypeID, $this->Fields['channeltype']) . ",{$this->CrossID}) ) "; + if ($this->CrossID == '') $this->addSql .= " AND (arc.typeid IN (".GetSonIds($this->TypeID, $this->Fields['channeltype']).") ) "; + else $this->addSql .= " AND (arc.typeid IN (".GetSonIds($this->TypeID, $this->Fields['channeltype']).",{$this->CrossID}) ) "; } } @@ -157,14 +157,14 @@ class SgListView if (count($this->searchArr) > 0) { if (!empty($this->searchArr['nativeplace'])) { if ($this->searchArr['nativeplace'] % 500 == 0) { - $naddQuery .= " AND arc.nativeplace >= '{$this->searchArr['nativeplace']}' AND arc.nativeplace < '" . ($this->searchArr['nativeplace'] + 500) . "'"; + $naddQuery .= " AND arc.nativeplace >= '{$this->searchArr['nativeplace']}' AND arc.nativeplace < '".($this->searchArr['nativeplace'] + 500)."'"; } else { $naddQuery .= "AND arc.nativeplace = '{$this->searchArr['nativeplace']}'"; } } if (!empty($this->searchArr['infotype'])) { if ($this->searchArr['infotype'] % 500 == 0) { - $naddQuery .= " AND arc.infotype >= '{$this->searchArr['infotype']}' AND arc.infotype < '" . ($this->searchArr['infotype'] + 500) . "'"; + $naddQuery .= " AND arc.infotype >= '{$this->searchArr['infotype']}' AND arc.infotype < '".($this->searchArr['infotype'] + 500)."'"; } else { $naddQuery .= "AND arc.infotype = '{$this->searchArr['infotype']}'"; } @@ -181,9 +181,9 @@ class SgListView if ($this->TotalResult == -1) { if ($this->sAddTable) { - $cquery = "SELECT COUNT(*) AS dd FROM `{$this->AddTable}` arc WHERE " . $this->addSql; + $cquery = "SELECT COUNT(*) AS dd FROM `{$this->AddTable}` arc WHERE ".$this->addSql; } else { - $cquery = "SELECT COUNT(*) AS dd FROM `#@__arctiny` arc WHERE " . $this->addSql; + $cquery = "SELECT COUNT(*) AS dd FROM `#@__arctiny` arc WHERE ".$this->addSql; } $row = $this->dsql->GetOne($cquery); if (is_array($row)) { @@ -193,14 +193,14 @@ class SgListView } } //初始化列表模板,并统计页面总数 - $tempfile = $GLOBALS['cfg_basedir'] . $GLOBALS['cfg_templets_dir'] . "/" . $this->TypeLink->TypeInfos['templist']; + $tempfile = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$this->TypeLink->TypeInfos['templist']; $tempfile = str_replace("{tid}", $this->TypeID, $tempfile); $tempfile = str_replace("{cid}", $this->ChannelUnit->ChannelInfos['nid'], $tempfile); if (defined('DEDEMOB')) { $tempfile = str_replace('.htm', '_m.htm', $tempfile); } if (!file_exists($tempfile)) { - $tempfile = $GLOBALS['cfg_basedir'] . $GLOBALS['cfg_templets_dir'] . "/" . $GLOBALS['cfg_df_style'] . "/list_default_sg.htm"; + $tempfile = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$GLOBALS['cfg_df_style']."/list_default_sg.htm"; if (defined('DEDEMOB')) { $tempfile = str_replace('.htm', '_m.htm', $tempfile); } @@ -278,9 +278,9 @@ class SgListView $makeFile = str_replace("{page}", $this->PageNo, $makeFile); $murl = $makeFile; if (!preg_match("/^\//", $makeFile)) { - $makeFile = "/" . $makeFile; + $makeFile = "/".$makeFile; } - $makeFile = $this->GetTruePath() . $makeFile; + $makeFile = $this->GetTruePath().$makeFile; $makeFile = preg_replace("/\/{1,}/", "/", $makeFile); $murl = $this->GetTrueUrl($murl); $this->dtp->SaveTo($makeFile); @@ -296,9 +296,9 @@ class SgListView ) { $onlyrule = $this->GetMakeFileRule($this->Fields['id'], "list", $this->Fields['typedir'], '', $this->Fields['namerule2']); $onlyrule = str_replace("{page}", "1", $onlyrule); - $list_1 = $this->GetTruePath() . $onlyrule; - $murl = MfTypedir($this->Fields['typedir']) . '/' . $this->Fields['defaultname']; - $indexname = $this->GetTruePath() . $murl; + $list_1 = $this->GetTruePath().$onlyrule; + $murl = MfTypedir($this->Fields['typedir']).'/'.$this->Fields['defaultname']; + $indexname = $this->GetTruePath().$murl; copy($list_1, $indexname); } } @@ -348,16 +348,16 @@ class SgListView $this->PartView = new PartView($this->TypeID, false); $this->PartView->SetTypeLink($this->TypeLink); $nmfa = 0; - $tmpdir = $GLOBALS['cfg_basedir'] . $GLOBALS['cfg_templets_dir']; + $tmpdir = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']; if ($this->Fields['ispart'] == 1) { $tempfile = str_replace("{tid}", $this->TypeID, $this->Fields['tempindex']); $tempfile = str_replace("{cid}", $this->ChannelUnit->ChannelInfos['nid'], $tempfile); - $tempfile = $tmpdir . "/" . $tempfile; + $tempfile = $tmpdir."/".$tempfile; if (defined('DEDEMOB')) { $tempfile = str_replace('.htm', '_m.htm', $tempfile); } if (!file_exists($tempfile)) { - $tempfile = $tmpdir . "/" . $GLOBALS['cfg_df_style'] . "/index_default_sg.htm"; + $tempfile = $tmpdir."/".$GLOBALS['cfg_df_style']."/index_default_sg.htm"; if (defined('DEDEMOB')) { $tempfile = str_replace('.htm', '_m.htm', $tempfile); } @@ -370,7 +370,7 @@ class SgListView CreateDir(MfTypedir($this->Fields['typedir'])); $makeUrl = $this->GetMakeFileRule($this->Fields['id'], "index", MfTypedir($this->Fields['typedir']), $this->Fields['defaultname'], $this->Fields['namerule2']); $makeUrl = preg_replace("/\/{1,}/", "/", $makeUrl); - $makeFile = $this->GetTruePath() . $makeUrl; + $makeFile = $this->GetTruePath().$makeUrl; if ($nmfa == 0) { $this->PartView->SaveToHtml($makeFile); } else { @@ -392,17 +392,17 @@ class SgListView $this->PartView = new PartView($this->TypeID, false); $this->PartView->SetTypeLink($this->TypeLink); $nmfa = 0; - $tmpdir = $GLOBALS['cfg_basedir'] . $GLOBALS['cfg_templets_dir']; + $tmpdir = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']; if ($this->Fields['ispart'] == 1) { //封面模板 $tempfile = str_replace("{tid}", $this->TypeID, $this->Fields['tempindex']); $tempfile = str_replace("{cid}", $this->ChannelUnit->ChannelInfos['nid'], $tempfile); - $tempfile = $tmpdir . "/" . $tempfile; + $tempfile = $tmpdir."/".$tempfile; if (defined('DEDEMOB')) { $tempfile = str_replace('.htm', '_m.htm', $tempfile); } if (!file_exists($tempfile)) { - $tempfile = $tmpdir . "/" . $GLOBALS['cfg_df_style'] . "/index_default_sg.htm"; + $tempfile = $tmpdir."/".$GLOBALS['cfg_df_style']."/index_default_sg.htm"; if (defined('DEDEMOB')) { $tempfile = str_replace('.htm', '_m.htm', $tempfile); } @@ -416,7 +416,7 @@ class SgListView } CreateDir(MfTypedir($this->Fields['typedir'])); $makeUrl = $this->GetMakeFileRule($this->Fields['id'], "index", MfTypedir($this->Fields['typedir']), $this->Fields['defaultname'], $this->Fields['namerule2']); - $makeFile = $this->GetTruePath() . $makeUrl; + $makeFile = $this->GetTruePath().$makeUrl; if ($nmfa == 0) { $this->PartView->Display(); } else { @@ -452,9 +452,9 @@ class SgListView if (preg_match("/^http[s]?:\/\//", $nurl)) return $nurl; if ($this->Fields['moresite'] == 1) { if ($this->Fields['sitepath'] != '') { - $nurl = preg_replace("/^" . $this->Fields['sitepath'] . "/", '', $nurl); + $nurl = preg_replace("/^".$this->Fields['sitepath']."/", '', $nurl); } - $nurl = $this->Fields['siteurl'] . $nurl; + $nurl = $this->Fields['siteurl'].$nurl; } return $nurl; } @@ -547,7 +547,7 @@ class SgListView { $typedir = MfTypedir($typedir); if ($wname == 'index') { - return $typedir . '/' . $defaultname; + return $typedir.'/'.$defaultname; } else { $namerule2 = str_replace('{tid}', $typeid, $namerule2); $namerule2 = str_replace('{typedir}', $typedir, $namerule2); @@ -596,8 +596,8 @@ class SgListView if ($tablewidth == '') $tablewidth = 100; if ($col == '') $col = 1; $colWidth = ceil(100 / $col); - $tablewidth = $tablewidth . "%"; - $colWidth = $colWidth . "%"; + $tablewidth = $tablewidth."%"; + $colWidth = $colWidth."%"; $innertext = trim($innertext); if ($innertext == '') $innertext = GetSysTemplets('list_sglist.htm'); @@ -612,7 +612,7 @@ class SgListView $ordersql = " ORDER BY arc.aid $orderWay"; } - $addField = 'arc.' . join(',arc.', $this->ListFields); + $addField = 'arc.'.join(',arc.', $this->ListFields); //如果不用默认的sortrank或id排序,使用联合查询(数据量大时非常缓慢) if (preg_match('/hot|click/', $orderby) || $this->sAddTable) { @@ -699,10 +699,10 @@ class SgListView $row['sitepath'] ); if ($row['litpic'] == '-' || $row['litpic'] == '') { - $row['litpic'] = $GLOBALS['cfg_cmspath'] . '/static/defaultpic.gif'; + $row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/defaultpic.gif'; } if (!preg_match("/^http:\/\//", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') { - $row['litpic'] = $GLOBALS['cfg_mainsite'] . $row['litpic']; + $row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic']; } $row['picname'] = $row['litpic']; @@ -710,17 +710,17 @@ class SgListView $row['stime'] = GetDateMK($row['pubdate']); - $row['typelink'] = "" . $row['typename'] . ""; + $row['typelink'] = "".$row['typename'].""; $row['fulltitle'] = $row['title']; $row['title'] = cn_substr($row['title'], $titlelen); if (preg_match('/b/', $row['flag'])) { - $row['title'] = "" . $row['title'] . ""; + $row['title'] = "".$row['title'].""; } - $row['textlink'] = "" . $row['title'] . ""; + $row['textlink'] = "".$row['title'].""; $row['plusurl'] = $row['phpurl'] = $GLOBALS['cfg_phpurl']; @@ -788,28 +788,28 @@ class SgListView } $totalpage = ceil($this->TotalResult / $this->PageSize); if ($totalpage <= 1 && $this->TotalResult > 0) { - return "
    • 共 1 页" . $this->TotalResult . "条记录
    • "; + return "
    • 共 1 页".$this->TotalResult."条记录
    • "; } if ($this->TotalResult == 0) { - return "
    • 共 0 页" . $this->TotalResult . "条记录
    • "; + return "
    • 共 0 页".$this->TotalResult."条记录
    • "; } $purl = $this->GetCurUrl(); - $maininfo = "
    • 共 {$totalpage} 页" . $this->TotalResult . "条
    • "; + $maininfo = "
    • 共 {$totalpage} 页".$this->TotalResult."条
    • "; $tnamerule = $this->GetMakeFileRule($this->Fields['id'], "list", $this->Fields['typedir'], $this->Fields['defaultname'], $this->Fields['namerule2']); $tnamerule = preg_replace("/^(.*)\//", '', $tnamerule); //获得上一页和主页的链接 if ($this->PageNo != 1) { - $prepage .= "
    • 上一页
    • \r\n"; - $indexpage = "
    • 首页
    • \r\n"; + $prepage .= "
    • 上一页
    • \r\n"; + $indexpage = "
    • 首页
    • \r\n"; } else { $indexpage = "
    • 首页
    • \r\n"; } //下一页,未页的链接 if ($this->PageNo != $totalpage && $totalpage > 1) { - $nextpage .= "
    • 下一页
    • \r\n"; - $endpage = "
    • 末页
    • \r\n"; + $nextpage .= "
    • 下一页
    • \r\n"; + $endpage = "
    • 末页
    • \r\n"; } else { $endpage = "
    • 末页
    • "; } @@ -853,27 +853,27 @@ class SgListView if ($j == $this->PageNo) { $listdd .= "
    • $j
    • \r\n"; } else { - $listdd .= "
    • " . $j . "
    • \r\n"; + $listdd .= "
    • ".$j."
    • \r\n"; } } $plist = ""; if (preg_match('/info/i', $listitem)) { - $plist .= $maininfo . ' '; + $plist .= $maininfo.' '; } if (preg_match('/index/i', $listitem)) { - $plist .= $indexpage . ' '; + $plist .= $indexpage.' '; } if (preg_match('/pre/i', $listitem)) { - $plist .= $prepage . ' '; + $plist .= $prepage.' '; } if (preg_match('/pageno/i', $listitem)) { - $plist .= $listdd . ' '; + $plist .= $listdd.' '; } if (preg_match('/next/i', $listitem)) { - $plist .= $nextpage . ' '; + $plist .= $nextpage.' '; } if (preg_match('/end/i', $listitem)) { - $plist .= $endpage . ' '; + $plist .= $endpage.' '; } if (preg_match('/option/i', $listitem)) { $plist .= $optionlist; @@ -903,30 +903,30 @@ class SgListView } $totalpage = ceil($this->TotalResult / $this->PageSize); if ($totalpage <= 1 && $this->TotalResult > 0) { - return "
    • 共1页/" . $this->TotalResult . "条记录
    • "; + return "
    • 共1页/".$this->TotalResult."条记录
    • "; } if ($this->TotalResult == 0) { - return "
    • 共0页/" . $this->TotalResult . "条记录
    • "; + return "
    • 共0页/".$this->TotalResult."条记录
    • "; } $purl = $this->GetCurUrl(); - $geturl = "tid=" . $this->TypeID . "&TotalResult=" . $this->TotalResult . "&nativeplace=$nativeplace&infotype=$infotype&keyword=" . urlencode($keyword) . "&"; - $hidenform = "\r\n"; + $geturl = "tid=".$this->TypeID."&TotalResult=".$this->TotalResult."&nativeplace=$nativeplace&infotype=$infotype&keyword=".urlencode($keyword)."&"; + $hidenform = "\r\n"; $hidenform = "\r\n"; $hidenform = "\r\n"; $hidenform = "\r\n"; - $hidenform .= "\r\n"; - $purl .= "?" . $geturl; + $hidenform .= "\r\n"; + $purl .= "?".$geturl; //获得上一页和下一页的链接 if ($this->PageNo != 1) { - $prepage .= "
    • 上一页
    • \r\n"; - $indexpage = "
    • 首页
    • \r\n"; + $prepage .= "
    • 上一页
    • \r\n"; + $indexpage = "
    • 首页
    • \r\n"; } else { $indexpage = "
    • 首页
    • \r\n"; } if ($this->PageNo != $totalpage && $totalpage > 1) { - $nextpage .= "
    • 下一页
    • \r\n"; - $endpage = "
    • 末页
    • \r\n"; + $nextpage .= "
    • 下一页
    • \r\n"; + $endpage = "
    • 末页
    • \r\n"; } else { $endpage = "
    • 末页
    • "; } @@ -950,11 +950,11 @@ class SgListView if ($j == $this->PageNo) { $listdd .= "
    • $j
    • \r\n"; } else { - $listdd .= "
    • " . $j . "
    • \r\n"; + $listdd .= "
    • ".$j."
    • \r\n"; } } - $plist = $indexpage . $prepage . $listdd . $nextpage . $endpage; + $plist = $indexpage.$prepage.$listdd.$nextpage.$endpage; return $plist; } diff --git a/src/include/arc.sgpage.class.php b/src/include/arc.sgpage.class.php index 8f5ac612..2fcde7db 100755 --- a/src/include/arc.sgpage.class.php +++ b/src/include/arc.sgpage.class.php @@ -8,7 +8,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(DEDEINC . "/arc.partview.class.php"); +require_once(DEDEINC."/arc.partview.class.php"); /** * 单表模型列表视图类 @@ -53,7 +53,7 @@ class sgpage $pv->SetTemplet($this->Fields['body'], 'string'); $this->Fields['body'] = $pv->GetResult(); } - $tplfile = $cfg_basedir . str_replace('{style}', $cfg_templets_dir . '/' . $cfg_df_style, $this->Fields['template']); + $tplfile = $cfg_basedir.str_replace('{style}', $cfg_templets_dir.'/'.$cfg_df_style, $this->Fields['template']); $this->dtp->LoadTemplate($tplfile); $this->ParseTemplet(); } @@ -94,7 +94,7 @@ class sgpage */ function SaveToHtml() { - $filename = $GLOBALS['cfg_basedir'] . $GLOBALS['cfg_cmspath'] . '/' . $this->Fields['filename']; + $filename = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_cmspath'].'/'.$this->Fields['filename']; $filename = preg_replace("/\/{1,}/", '/', $filename); $this->dtp->SaveTo($filename); } diff --git a/src/include/arc.specview.class.php b/src/include/arc.specview.class.php index 2ef6c7d0..4969cd9c 100755 --- a/src/include/arc.specview.class.php +++ b/src/include/arc.specview.class.php @@ -9,8 +9,8 @@ * @link https://www.dedebiz.com */ -require_once(DEDEINC . "/typelink.class.php"); -require_once(DEDEINC . "/channelunit.class.php"); +require_once(DEDEINC."/typelink.class.php"); +require_once(DEDEINC."/channelunit.class.php"); @set_time_limit(0); /** @@ -68,7 +68,7 @@ class SpecView $this->StartTime = GetMkTime($starttime); } $this->CountRecord(); - $tempfile = $GLOBALS['cfg_basedir'] . $GLOBALS['cfg_templets_dir'] . "/" . $GLOBALS['cfg_df_style'] . "/list_spec.htm"; + $tempfile = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$GLOBALS['cfg_df_style']."/list_spec.htm"; if (!file_exists($tempfile) || !is_file($tempfile)) { echo "模板文件不存在,无法解析文档!"; exit(); @@ -119,7 +119,7 @@ class SpecView } if ($this->TotalResult == -1) { if ($this->StartTime > 0) { - $timesql = " AND #@__archives.senddate>'" . $this->StartTime . "'"; + $timesql = " AND #@__archives.senddate>'".$this->StartTime."'"; } else { $timesql = ""; } @@ -233,14 +233,14 @@ class SpecView } } //End foreach - $makeFile = $GLOBALS['cfg_special'] . "/spec_" . $this->PageNo . $GLOBALS['art_shortname']; + $makeFile = $GLOBALS['cfg_special']."/spec_".$this->PageNo.$GLOBALS['art_shortname']; $murl = $makeFile; - $makeFile = $GLOBALS['cfg_basedir'] . $makeFile; + $makeFile = $GLOBALS['cfg_basedir'].$makeFile; $this->dtp->SaveTo($makeFile); echo "成功创建:$murl
      "; } - copy($GLOBALS['cfg_basedir'] . $GLOBALS['cfg_special'] . "/spec_1" . $GLOBALS['art_shortname'], $GLOBALS['cfg_basedir'] . $GLOBALS['cfg_special'] . "/index.html"); - $murl = $GLOBALS['cfg_special'] . "/index.html"; + copy($GLOBALS['cfg_basedir'].$GLOBALS['cfg_special']."/spec_1".$GLOBALS['art_shortname'], $GLOBALS['cfg_basedir'].$GLOBALS['cfg_special']."/index.html"); + $murl = $GLOBALS['cfg_special']."/index.html"; return $murl; } @@ -320,8 +320,8 @@ class SpecView $col = 1; } $colWidth = ceil(100 / $col); - $tablewidth = $tablewidth . "%"; - $colWidth = $colWidth . "%"; + $tablewidth = $tablewidth."%"; + $colWidth = $colWidth."%"; $innertext = trim($innertext); if ($innertext == "") { $innertext = GetSysTemplets("spec_list.htm"); @@ -330,7 +330,7 @@ class SpecView //按不同情况设定SQL条件 $orwhere = " arc.arcrank > -1 AND arc.channel = -1 "; if ($this->StartTime > 0) { - $orwhere .= " AND arc.senddate>'" . $this->StartTime . "'"; + $orwhere .= " AND arc.senddate>'".$this->StartTime."'"; } //排序方式 @@ -369,10 +369,10 @@ class SpecView $row["title"] = cn_substr($row["title"], $titlelen); $row["id"] = $row["id"]; if ($row['litpic'] == '-' || $row['litpic'] == '') { - $row['litpic'] = $GLOBALS['cfg_cmspath'] . '/static/defaultpic.gif'; + $row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/defaultpic.gif'; } if (!preg_match("/^http:\/\//", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') { - $row['litpic'] = $GLOBALS['cfg_mainsite'] . $row['litpic']; + $row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic']; } $row['picname'] = $row['litpic']; $row["arcurl"] = GetFileUrl( @@ -394,10 +394,10 @@ class SpecView $row["info"] = $row["description"]; $row["filename"] = $row["arcurl"]; $row["stime"] = GetDateMK($row["pubdate"]); - $row["textlink"] = "" . $row["title"] . ""; - $row["typelink"] = "[" . $row["typename"] . "]"; - $row["imglink"] = ""; - $row["image"] = ""; + $row["textlink"] = "".$row["title"].""; + $row["typelink"] = "[".$row["typename"]."]"; + $row["imglink"] = ""; + $row["image"] = ""; $row['plusurl'] = $row['phpurl'] = $GLOBALS['cfg_phpurl']; $row['memberurl'] = $GLOBALS['cfg_memberurl']; $row['templeturl'] = $GLOBALS['cfg_templeturl']; @@ -464,24 +464,24 @@ class SpecView $totalpage = ceil($this->TotalResult / $this->PageSize); if ($totalpage <= 1 && $this->TotalResult > 0) { - return "1" . $this->TotalResult . "条记录"; + return "1".$this->TotalResult."条记录"; } if ($this->TotalResult == 0) { - return "0" . $this->TotalResult . "条记录"; + return "0".$this->TotalResult."条记录"; } $purl = $this->GetCurUrl(); $tnamerule = "spec_"; //获得上一页和下一页的链接 if ($this->PageNo != 1) { - $prepage .= "
    • 上一页
    • \r\n"; - $indexpage = "
    • 首页
    • \r\n"; + $prepage .= "
    • 上一页
    • \r\n"; + $indexpage = "
    • 首页
    • \r\n"; } else { $indexpage = "
    • 首页
    • \r\n"; } if ($this->PageNo != $totalpage && $totalpage > 1) { - $nextpage .= "
    • 下一页
    • \r\n"; - $endpage = "
    • 末页
    • \r\n"; + $nextpage .= "
    • 下一页
    • \r\n"; + $endpage = "
    • 末页
    • \r\n"; } else { $endpage = "
    • 末页
    • \r\n"; } @@ -505,10 +505,10 @@ class SpecView if ($j == $this->PageNo) { $listdd .= "
    • $j
    • \r\n"; } else { - $listdd .= "
    • " . $j . "
    • \r\n"; + $listdd .= "
    • ".$j."
    • \r\n"; } } - $plist = $indexpage . $prepage . $listdd . $nextpage . $endpage; + $plist = $indexpage.$prepage.$listdd.$nextpage.$endpage; return $plist; } @@ -531,28 +531,28 @@ class SpecView } $totalpage = ceil($this->TotalResult / $this->PageSize); if ($totalpage <= 1 && $this->TotalResult > 0) { - return "共1页/" . $this->TotalResult . "条记录"; + return "共1页/".$this->TotalResult."条记录"; } if ($this->TotalResult == 0) { - return "共0页/" . $this->TotalResult . "条记录"; + return "共0页/".$this->TotalResult."条记录"; } $purl = $this->GetCurUrl(); - $geturl = "typeid=" . $this->TypeID . "&TotalResult=" . $this->TotalResult . "&"; - $hidenform = "\r\n"; - $hidenform .= "\r\n"; - $purl .= "?" . $geturl; + $geturl = "typeid=".$this->TypeID."&TotalResult=".$this->TotalResult."&"; + $hidenform = "\r\n"; + $hidenform .= "\r\n"; + $purl .= "?".$geturl; //获得上一页和下一页的链接 if ($this->PageNo != 1) { - $prepage .= "
    • 上一页
    • \r\n"; - $indexpage = "
    • 首页
    • \r\n"; + $prepage .= "
    • 上一页
    • \r\n"; + $indexpage = "
    • 首页
    • \r\n"; } else { $indexpage = "
    • 首页
    • \r\n"; } if ($this->PageNo != $totalpage && $totalpage > 1) { - $nextpage .= "
    • 下一页
    • \r\n"; - $endpage = "
    • 末页
    • \r\n"; + $nextpage .= "
    • 下一页
    • \r\n"; + $endpage = "
    • 末页
    • \r\n"; } else { $endpage = "
    • 末页
    • "; } @@ -576,11 +576,11 @@ class SpecView if ($j == $this->PageNo) { $listdd .= "
    • $j
    • \r\n"; } else { - $listdd .= "
    • " . $j . "
    • \r\n"; + $listdd .= "
    • ".$j."
    • \r\n"; } } - $plist = $indexpage . $prepage . $listdd . $nextpage . $endpage; + $plist = $indexpage.$prepage.$listdd.$nextpage.$endpage; return $plist; } diff --git a/src/include/arc.taglist.class.php b/src/include/arc.taglist.class.php index ca38b9d7..8e9cca35 100755 --- a/src/include/arc.taglist.class.php +++ b/src/include/arc.taglist.class.php @@ -9,8 +9,8 @@ * @link https://www.dedebiz.com */ -require_once(DEDEINC . '/channelunit.class.php'); -require_once(DEDEINC . '/typelink.class.php'); +require_once(DEDEINC.'/channelunit.class.php'); +require_once(DEDEINC.'/typelink.class.php'); @set_time_limit(0); /** @@ -73,14 +73,14 @@ class TagList if ($this->Tag != '') { $this->TagInfos = $this->dsql->GetOne("Select * From `#@__tagindex` where tag like '{$this->Tag}' "); if (!is_array($this->TagInfos)) { - $fullsearch = $GLOBALS['cfg_phpurl'] . "/search.php?keyword=" . $this->Tag . "&searchtype=titlekeyword"; + $fullsearch = $GLOBALS['cfg_phpurl']."/search.php?keyword=".$this->Tag."&searchtype=titlekeyword"; $msg = "系统无此标签,可能已经移除!

      你还可以尝试通过搜索程序去搜索这个关键字:前往搜索>>"; ShowMsg($msg, "-1"); exit(); } // 确定是否存在tag_pinyin if (empty($this->TagInfos['tag_pinyin'])) { - $this->TagInfos['tag_pinyin'] = $this->TagPinyinExists($this->Tag) ? GetPinyin($this->Tag) . $this->TagInfos['id'] : GetPinyin($this->Tag); + $this->TagInfos['tag_pinyin'] = $this->TagPinyinExists($this->Tag) ? GetPinyin($this->Tag).$this->TagInfos['id'] : GetPinyin($this->Tag); $this->dsql->ExecNoneQuery("UPDATE `#@__tagindex` SET tag_pinyin = '{$this->TagInfos['tag_pinyin']}' WHERE tag LIKE '{$this->Tag}'"); } @@ -90,13 +90,13 @@ class TagList } //初始化模板 - $tempfile = $GLOBALS['cfg_basedir'] . $GLOBALS['cfg_templets_dir'] . "/" . $GLOBALS['cfg_df_style'] . '/' . $this->Templet; + $tempfile = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$GLOBALS['cfg_df_style'].'/'.$this->Templet; if (!file_exists($tempfile) || !is_file($tempfile)) { echo "模板文件不存在,无法解析文档!"; exit(); } $this->dtp->LoadTemplate($tempfile); - $this->TempletsFile = preg_replace("#^" . $GLOBALS['cfg_basedir'] . "#", '', $tempfile); + $this->TempletsFile = preg_replace("#^".$GLOBALS['cfg_basedir']."#", '', $tempfile); } function TagPinyinExists($tag) @@ -184,12 +184,12 @@ class TagList */ function Display() { - $makeDir = empty($this->Tag) ? $this->GetTruePath() . "/a/tags/index.html" : $this->GetTruePath() . "/a/tags/" . GetPinyin($this->Tag) . "/index.html"; + $makeDir = empty($this->Tag) ? $this->GetTruePath()."/a/tags/index.html" : $this->GetTruePath()."/a/tags/".GetPinyin($this->Tag)."/index.html"; if (file_exists($makeDir)) { header('HTTP/1.1 301 Moved Permanently'); if (!empty($this->Tag)) { - header('Location:a/tags/' . GetPinyin($this->Tag) . "/"); + header('Location:a/tags/'.GetPinyin($this->Tag)."/"); } else { header('Location:a/tags/'); } @@ -321,15 +321,15 @@ class TagList if ($tablewidth == '') $tablewidth = 100; if ($col == '') $col = 1; $colWidth = ceil(100 / $col); - $tablewidth = $tablewidth . "%"; - $colWidth = $colWidth . "%"; + $tablewidth = $tablewidth."%"; + $colWidth = $colWidth."%"; $innertext = trim($innertext); if ($innertext == '') $innertext = GetSysTemplets("list_fulllist.htm"); $idlists = $ordersql = ''; $this->dsql->SetQuery("SELECT aid FROM `#@__taglist` WHERE tid = '{$this->TagInfos['id']}' AND arcrank>-1 LIMIT $limitstart,$getrow"); $this->dsql->Execute(); while ($row = $this->dsql->GetArray()) { - $idlists .= ($idlists == '' ? $row['aid'] : ',' . $row['aid']); + $idlists .= ($idlists == '' ? $row['aid'] : ','.$row['aid']); } if ($idlists == '') return ''; @@ -390,25 +390,25 @@ class TagList $row['sitepath'] ); if ($row['litpic'] == '-' || $row['litpic'] == '') { - $row['litpic'] = $GLOBALS['cfg_cmspath'] . '/static/defaultpic.gif'; + $row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/defaultpic.gif'; } if (!preg_match("/^http:\/\//", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') { - $row['litpic'] = $GLOBALS['cfg_mainsite'] . $row['litpic']; + $row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic']; } $row['picname'] = $row['litpic']; $row['stime'] = GetDateMK($row['pubdate']); - $row['typelink'] = "" . $row['typename'] . ""; - $row['image'] = "" . preg_replace("/[<]/", "", $row['title']) . "'>"; - $row['imglink'] = "" . $row['image'] . ""; + $row['typelink'] = "".$row['typename'].""; + $row['image'] = "".preg_replace("/[<]/", "", $row['title'])."'>"; + $row['imglink'] = "".$row['image'].""; $row['fulltitle'] = $row['title']; $row['title'] = cn_substr($row['title'], $titlelen); if ($row['color'] != '') { - $row['title'] = "" . $row['title'] . ""; + $row['title'] = "".$row['title'].""; } if (preg_match('/c/', $row['flag'])) { - $row['title'] = "" . $row['title'] . ""; + $row['title'] = "".$row['title'].""; } - $row['textlink'] = "" . $row['title'] . ""; + $row['textlink'] = "".$row['title'].""; $row['plusurl'] = $row['phpurl'] = $GLOBALS['cfg_phpurl']; $row['memberurl'] = $GLOBALS['cfg_memberurl']; $row['templeturl'] = $GLOBALS['cfg_templeturl']; @@ -460,25 +460,25 @@ class TagList } $totalpage = $this->TotalPage; if ($totalpage <= 1 && $this->TotalResult > 0) { - return "
    • 共1页/" . $this->TotalResult . "条
    • "; + return "
    • 共1页/".$this->TotalResult."条
    • "; } if ($this->TotalResult == 0) { - return "
    • 共0页/" . $this->TotalResult . "条
    • "; + return "
    • 共0页/".$this->TotalResult."条
    • "; } - $maininfo = "
    • 共{$totalpage}页/" . $this->TotalResult . "条
    • \r\n"; + $maininfo = "
    • 共{$totalpage}页/".$this->TotalResult."条
    • \r\n"; $purl = $this->GetCurUrl(); - $purl .= "?/" . urlencode($this->Tag); + $purl .= "?/".urlencode($this->Tag); //获得上一页和下一页的链接 if ($this->PageNo != 1) { - $prepage .= "
    • 上一页
    • \r\n"; - $indexpage = "
    • 首页
    • \r\n"; + $prepage .= "
    • 上一页
    • \r\n"; + $indexpage = "
    • 首页
    • \r\n"; } else { $indexpage = "
    • 首页
    • \r\n"; } if ($this->PageNo != $totalpage && $totalpage > 1) { - $nextpage .= "
    • 下一页
    • \r\n"; - $endpage = "
    • 末页
    • \r\n"; + $nextpage .= "
    • 下一页
    • \r\n"; + $endpage = "
    • 末页
    • \r\n"; } else { $endpage = "
    • 末页
    • \r\n"; } @@ -502,27 +502,27 @@ class TagList if ($j == $this->PageNo) { $listdd .= "
    • $j
    • \r\n"; } else { - $listdd .= "
    • " . $j . "
    • \r\n"; + $listdd .= "
    • ".$j."
    • \r\n"; } } $plist = ''; if (preg_match('/info/i', $listitem)) { - $plist .= $maininfo . ' '; + $plist .= $maininfo.' '; } if (preg_match('/index/i', $listitem)) { - $plist .= $indexpage . ' '; + $plist .= $indexpage.' '; } if (preg_match('/pre/i', $listitem)) { - $plist .= $prepage . ' '; + $plist .= $prepage.' '; } if (preg_match('/pageno/i', $listitem)) { - $plist .= $listdd . ' '; + $plist .= $listdd.' '; } if (preg_match('/next/i', $listitem)) { - $plist .= $nextpage . ' '; + $plist .= $nextpage.' '; } if (preg_match('/end/i', $listitem)) { - $plist .= $endpage . ' '; + $plist .= $endpage.' '; } return $plist; } @@ -538,27 +538,27 @@ class TagList } $totalpage = $this->TotalPage; if ($totalpage <= 1 && $this->TotalResult > 0) { - return "
    • 共1页/" . $this->TotalResult . "条
    • "; + return "
    • 共1页/".$this->TotalResult."条
    • "; } if ($this->TotalResult == 0) { - return "
    • 共0页/" . $this->TotalResult . "条
    • "; + return "
    • 共0页/".$this->TotalResult."条
    • "; } - $maininfo = "
    • 共{$totalpage}页/" . $this->TotalResult . "条
    • \r\n"; + $maininfo = "
    • 共{$totalpage}页/".$this->TotalResult."条
    • \r\n"; // $purl = $this->GetCurUrl(); - $purl = "/a/tags/" . GetPinyin($this->Tag); + $purl = "/a/tags/".GetPinyin($this->Tag); // var_dump($purl); //获得上一页和下一页的链接 if ($this->PageNo != 1) { - $prepage .= "
    • 上一页
    • \r\n"; - $indexpage = "
    • 首页
    • \r\n"; + $prepage .= "
    • 上一页
    • \r\n"; + $indexpage = "
    • 首页
    • \r\n"; } else { $indexpage = "
    • 首页
    • \r\n"; } if ($this->PageNo != $totalpage && $totalpage > 1) { - $nextpage .= "
    • 下一页
    • \r\n"; - $endpage = "
    • 末页
    • \r\n"; + $nextpage .= "
    • 下一页
    • \r\n"; + $endpage = "
    • 末页
    • \r\n"; } else { $endpage = "
    • 末页
    • \r\n"; } @@ -582,27 +582,27 @@ class TagList if ($j == $this->PageNo) { $listdd .= "
    • $j
    • \r\n"; } else { - $listdd .= "
    • " . $j . "
    • \r\n"; + $listdd .= "
    • ".$j."
    • \r\n"; } } $plist = ''; if (preg_match('/info/i', $listitem)) { - $plist .= $maininfo . ' '; + $plist .= $maininfo.' '; } if (preg_match('/index/i', $listitem)) { - $plist .= $indexpage . ' '; + $plist .= $indexpage.' '; } if (preg_match('/pre/i', $listitem)) { - $plist .= $prepage . ' '; + $plist .= $prepage.' '; } if (preg_match('/pageno/i', $listitem)) { - $plist .= $listdd . ' '; + $plist .= $listdd.' '; } if (preg_match('/next/i', $listitem)) { - $plist .= $nextpage . ' '; + $plist .= $nextpage.' '; } if (preg_match('/end/i', $listitem)) { - $plist .= $endpage . ' '; + $plist .= $endpage.' '; } return $plist; } @@ -624,8 +624,8 @@ class TagList $this->ParseTempletsFirst(); if ($this->Tag == "") { - MkdirAll($this->GetTruePath() . "/a/tags/", $cfg_dir_purview); - $this->dtp->SaveTo($this->GetTruePath() . "/a/tags/index.html"); + MkdirAll($this->GetTruePath()."/a/tags/", $cfg_dir_purview); + $this->dtp->SaveTo($this->GetTruePath()."/a/tags/index.html"); } else { $totalpage = ceil($this->TotalResult / $this->PageSize); @@ -644,17 +644,17 @@ class TagList $endpage = 2; } - $makeDir = $this->GetTruePath() . "/a/tags/" . $this->TagInfos['tag_pinyin'] . "/"; + $makeDir = $this->GetTruePath()."/a/tags/".$this->TagInfos['tag_pinyin']."/"; MkdirAll($makeDir, $cfg_dir_purview); for ($this->PageNo = $startpage; $this->PageNo < $endpage; $this->PageNo++) { $this->ParseDMFields($this->PageNo, 1); - $fileDir = $makeDir . "/" . $this->PageNo; + $fileDir = $makeDir."/".$this->PageNo; MkdirAll($fileDir, $cfg_dir_purview); - $this->dtp->SaveTo($fileDir . "/index.html"); + $this->dtp->SaveTo($fileDir."/index.html"); } if ($startpage == 1) { - $list_1 = $makeDir . "/1/index.html"; - copy($list_1, $makeDir . "/index.html"); + $list_1 = $makeDir."/1/index.html"; + copy($list_1, $makeDir."/index.html"); } } } diff --git a/src/include/channelunit.class.php b/src/include/channelunit.class.php index 872464e8..b8182cbf 100755 --- a/src/include/channelunit.class.php +++ b/src/include/channelunit.class.php @@ -7,8 +7,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(DEDEINC . "/dedetag.class.php"); -require_once(DEDEINC . "/channelunit.func.php"); +require_once(DEDEINC."/dedetag.class.php"); +require_once(DEDEINC."/channelunit.func.php"); /*---------------------------------- function C____ChannelUnit(); @@ -51,7 +51,7 @@ class ChannelUnit } $tnames[$tname] = 1; if ($this->AllFieldNames != '') { - $this->AllFieldNames .= ',' . $tname; + $this->AllFieldNames .= ','.$tname; } else { $this->AllFieldNames .= $tname; } @@ -108,10 +108,10 @@ class ChannelUnit if ($ftype == 'text') { $fvalue = HtmlReplace($fvalue); } else if ($ftype == 'textdata') { - if (!is_file($GLOBALS['cfg_basedir'] . $fvalue)) { + if (!is_file($GLOBALS['cfg_basedir'].$fvalue)) { return ''; } - $fp = fopen($GLOBALS['cfg_basedir'] . $fvalue, 'r'); + $fp = fopen($GLOBALS['cfg_basedir'].$fvalue, 'r'); $fvalue = ''; while (!feof($fp)) { $fvalue .= fgets($fp, 1024); @@ -122,9 +122,9 @@ class ChannelUnit $tmptext = GetSysTemplets("channel_addon.htm"); $fvalue = str_replace('~link~', $foldvalue, $tmptext); $fvalue = str_replace('~phpurl~', $GLOBALS['cfg_phpurl'], $fvalue); - } else if (file_exists(DEDEINC . '/taglib/channel/' . $ftype . '.lib.php')) { - include_once(DEDEINC . '/taglib/channel/' . $ftype . '.lib.php'); - $func = 'ch_' . $ftype; + } else if (file_exists(DEDEINC.'/taglib/channel/'.$ftype.'.lib.php')) { + include_once(DEDEINC.'/taglib/channel/'.$ftype.'.lib.php'); + $func = 'ch_'.$ftype; $fvalue = $func($fvalue, $addvalue, $this, $fname); } return $fvalue; @@ -190,12 +190,12 @@ class ChannelUnit $imgurl = "view.php?aid=$this->ArcID&pageno=$photoid"; } else { if ($photoid == 1) { - $imgurl = $GLOBALS["fileFirst"] . ".html"; + $imgurl = $GLOBALS["fileFirst"].".html"; } else { - $imgurl = $GLOBALS["fileFirst"] . "_" . $photoid . ".html"; + $imgurl = $GLOBALS["fileFirst"]."_".$photoid.".html"; } } - $imgcls = "image" . ($photoid - 1); + $imgcls = "image".($photoid - 1); $revalue .= "
      $alt
      $ddimg
      $ddimg
      $ddimg
      $photoid
      \r\n"; $photoid++; } diff --git a/src/include/channelunit.func.php b/src/include/channelunit.func.php index 15efb80c..e43e0549 100755 --- a/src/include/channelunit.func.php +++ b/src/include/channelunit.func.php @@ -14,12 +14,12 @@ global $PubFields, $pTypeArrays, $idArrary, $envs, $v1, $v2; $pTypeArrays = $idArrary = $PubFields = $envs = array(); $PubFields['phpurl'] = $cfg_phpurl; -$PubFields['indexurl'] = $cfg_mainsite . $cfg_indexurl; +$PubFields['indexurl'] = $cfg_mainsite.$cfg_indexurl; $PubFields['templeturl'] = $cfg_templeturl; $PubFields['memberurl'] = $cfg_memberurl; $PubFields['specurl'] = $cfg_specialurl; $PubFields['indexname'] = $cfg_indexname; -$PubFields['templetdef'] = $cfg_templets_dir . '/' . $cfg_df_style; +$PubFields['templetdef'] = $cfg_templets_dir.'/'.$cfg_df_style; $envs['typeid'] = 0; $envs['reid'] = 0; $envs['aid'] = 0; diff --git a/src/include/common.func.php b/src/include/common.func.php index 78631562..fec41b17 100755 --- a/src/include/common.func.php +++ b/src/include/common.func.php @@ -117,13 +117,13 @@ function helper($helpers) if (isset($_helpers[$helpers])) { return; } - if (file_exists(DEDEINC . '/helpers/' . $helpers . '.helper.php')) { - include_once(DEDEINC . '/helpers/' . $helpers . '.helper.php'); + if (file_exists(DEDEINC.'/helpers/'.$helpers.'.helper.php')) { + include_once(DEDEINC.'/helpers/'.$helpers.'.helper.php'); $_helpers[$helpers] = TRUE; } //无法载入小助手 if (!isset($_helpers[$helpers])) { - exit('Unable to load the requested file: helpers/' . $helpers . '.helper.php'); + exit('Unable to load the requested file: helpers/'.$helpers.'.helper.php'); } } function dede_htmlspecialchars($str) @@ -165,7 +165,7 @@ if (!function_exists('file_put_contents')) { */ function UpdateStat() { - include_once(DEDEINC . "/inc/inc_stat.php"); + include_once(DEDEINC."/inc/inc_stat.php"); return SpUpdateStat(); } $arrs1 = array(); @@ -193,7 +193,7 @@ function ShowMsg($msg, $gourl, $onlymsg = 0, $limittime = 0) $gourl = "javascript:history.go(-1);"; } if ($gourl == '' || $onlymsg == 1) { - $msg = ""; + $msg = ""; } else { //当网址为:close::objname 时, 关闭父框架的id=objname元素 if (preg_match('/close::/', $gourl)) { @@ -261,6 +261,6 @@ function IndexActive($idx) } // 自定义函数接口 // 这里主要兼容早期的用户扩展,v5.7之后我们建议使用小助手helper进行扩展 -if (file_exists(DEDEINC . '/extend.func.php')) { - require_once(DEDEINC . '/extend.func.php'); +if (file_exists(DEDEINC.'/extend.func.php')) { + require_once(DEDEINC.'/extend.func.php'); } \ No newline at end of file diff --git a/src/include/common.inc.php b/src/include/common.inc.php index f80fe124..a189c99d 100755 --- a/src/include/common.inc.php +++ b/src/include/common.inc.php @@ -21,9 +21,9 @@ define('DEBUG_LEVEL', FALSE); // 如果设置为TRUE则会打印执行SQL的时 define('DEDEINC', str_replace("\\", '/', dirname(__FILE__))); define('DEDEROOT', str_replace("\\", '/', substr(DEDEINC, 0, -8))); -define('DEDEDATA', DEDEROOT . '/data'); -define('DEDEMEMBER', DEDEROOT . '/member'); -define('DEDETEMPLATE', DEDEROOT . '/templets'); +define('DEDEDATA', DEDEROOT.'/data'); +define('DEDEMEMBER', DEDEROOT.'/member'); +define('DEDETEMPLATE', DEDEROOT.'/templets'); // ------------------------------------------------------------------------ define('DEDEBIZURL', "https://www.dedebiz.com"); // Dede商业支持 @@ -124,7 +124,7 @@ if (preg_match('/windows/i', @getenv('OS'))) { } //系统配置参数 -require_once(DEDEDATA . "/config.cache.inc.php"); +require_once(DEDEDATA."/config.cache.inc.php"); //Session保存路径 $sessSaveHandler = @ini_get("session.save_handler"); @@ -133,7 +133,7 @@ if ($sessSaveHandler !== "files") { } $enkey = substr(md5(substr($cfg_cookie_encode, 0, 5)), 0, 10); -$sessSavePath = DEDEDATA . "/sessions_{$enkey}"; +$sessSavePath = DEDEDATA."/sessions_{$enkey}"; if (!is_dir($sessSavePath)) mkdir($sessSavePath); if (is_writeable($sessSavePath) && is_readable($sessSavePath)) { @@ -142,19 +142,19 @@ if (is_writeable($sessSavePath) && is_readable($sessSavePath)) { //转换上传的文件相关的变量及安全处理、并引用前台通用的上传函数 if ($_FILES) { - require_once(DEDEINC . '/uploadsafe.inc.php'); + require_once(DEDEINC.'/uploadsafe.inc.php'); } //数据库配置文件 -require_once(DEDEDATA . '/common.inc.php'); +require_once(DEDEDATA.'/common.inc.php'); if (!isset($cfg_dbtype)) { $cfg_dbtype = 'mysql'; } //载入系统验证安全配置 -if (file_exists(DEDEDATA . '/safe/inc_safe_config.php')) { - require_once(DEDEDATA . '/safe/inc_safe_config.php'); +if (file_exists(DEDEDATA.'/safe/inc_safe_config.php')) { + require_once(DEDEDATA.'/safe/inc_safe_config.php'); if (!empty($safe_faqs)) $safefaqs = unserialize($safe_faqs); } @@ -167,7 +167,7 @@ if (!empty($cfg_domain_cookie)) { //由于这个函数对于是php5.1以下版本并无意义,因此实际上的时间调用,应该用MyDate函数调用 if (PHP_VERSION > '5.1') { $time51 = $cfg_cli_time * -1; - @date_default_timezone_set('Etc/GMT' . $time51); + @date_default_timezone_set('Etc/GMT'.$time51); } $cfg_isUrlOpen = @ini_get("allow_url_fopen"); @@ -175,12 +175,12 @@ $cfg_isUrlOpen = @ini_get("allow_url_fopen"); if (PHP_SAPI === 'cli') { $cfg_clihost = 'https://www.dedebiz.com'; } else { - $cfg_clihost = 'http://' . $_SERVER['HTTP_HOST']; + $cfg_clihost = 'http://'.$_SERVER['HTTP_HOST']; } //站点根目录 -$cfg_basedir = preg_replace('#' . $cfg_cmspath . '\/include$#i', '', DEDEINC); +$cfg_basedir = preg_replace('#'.$cfg_cmspath.'\/include$#i', '', DEDEINC); if ($cfg_multi_site == 'Y') { $cfg_mainsite = $cfg_basehost; } else { @@ -188,52 +188,52 @@ if ($cfg_multi_site == 'Y') { } //模板的存放目录 -$cfg_templets_dir = $cfg_cmspath . '/templets'; -$cfg_templeturl = $cfg_mainsite . $cfg_templets_dir; -$cfg_templets_skin = empty($cfg_df_style) ? $cfg_mainsite . $cfg_templets_dir . "/default" : $cfg_mainsite . $cfg_templets_dir . "/$cfg_df_style"; +$cfg_templets_dir = $cfg_cmspath.'/templets'; +$cfg_templeturl = $cfg_mainsite.$cfg_templets_dir; +$cfg_templets_skin = empty($cfg_df_style) ? $cfg_mainsite.$cfg_templets_dir."/default" : $cfg_mainsite.$cfg_templets_dir."/$cfg_df_style"; //cms安装目录的网址 -$cfg_cmsurl = $cfg_mainsite . $cfg_cmspath; +$cfg_cmsurl = $cfg_mainsite.$cfg_cmspath; //插件目录,这个目录是用于存放计数器、投票、评论等程序的必要动态程序 -$cfg_plus_dir = $cfg_cmspath . '/plus'; -$cfg_phpurl = $cfg_mainsite . $cfg_plus_dir; +$cfg_plus_dir = $cfg_cmspath.'/plus'; +$cfg_phpurl = $cfg_mainsite.$cfg_plus_dir; -$cfg_static_dir = $cfg_cmspath . '/static'; -$cfg_staticurl = $cfg_mainsite . $cfg_static_dir; +$cfg_static_dir = $cfg_cmspath.'/static'; +$cfg_staticurl = $cfg_mainsite.$cfg_static_dir; -$cfg_mobile_dir = $cfg_cmspath . '/m'; -$cfg_mobileurl = $cfg_mainsite . $cfg_mobile_dir; +$cfg_mobile_dir = $cfg_cmspath.'/m'; +$cfg_mobileurl = $cfg_mainsite.$cfg_mobile_dir; -$cfg_data_dir = $cfg_cmspath . '/data'; -$cfg_dataurl = $cfg_mainsite . $cfg_data_dir; +$cfg_data_dir = $cfg_cmspath.'/data'; +$cfg_dataurl = $cfg_mainsite.$cfg_data_dir; //会员目录 -$cfg_member_dir = $cfg_cmspath . '/member'; -$cfg_memberurl = $cfg_mainsite . $cfg_member_dir; +$cfg_member_dir = $cfg_cmspath.'/member'; +$cfg_memberurl = $cfg_mainsite.$cfg_member_dir; //专题列表的存放路径 -$cfg_special = $cfg_cmspath . '/special'; -$cfg_specialurl = $cfg_mainsite . $cfg_special; +$cfg_special = $cfg_cmspath.'/special'; +$cfg_specialurl = $cfg_mainsite.$cfg_special; //附件目录 -$cfg_medias_dir = $cfg_cmspath . $cfg_medias_dir; -$cfg_mediasurl = $cfg_mainsite . $cfg_medias_dir; +$cfg_medias_dir = $cfg_cmspath.$cfg_medias_dir; +$cfg_mediasurl = $cfg_mainsite.$cfg_medias_dir; //上传的普通图片的路径,建议按默认 -$cfg_image_dir = $cfg_medias_dir . '/allimg'; +$cfg_image_dir = $cfg_medias_dir.'/allimg'; //上传的缩略图 -$ddcfg_image_dir = $cfg_medias_dir . '/litimg'; +$ddcfg_image_dir = $cfg_medias_dir.'/litimg'; //用户投稿图片存放目录 -$cfg_user_dir = $cfg_medias_dir . '/userup'; +$cfg_user_dir = $cfg_medias_dir.'/userup'; //上传的软件目录 -$cfg_soft_dir = $cfg_medias_dir . '/soft'; +$cfg_soft_dir = $cfg_medias_dir.'/soft'; //上传的多媒体文件目录 -$cfg_other_medias = $cfg_medias_dir . '/media'; +$cfg_other_medias = $cfg_medias_dir.'/media'; //软件摘要信息,****请不要删除本项**** 否则系统无法正确接收系统漏洞或升级信息 $cfg_version = 'V6'; @@ -247,7 +247,7 @@ $cfg_soft_devteam = 'DedeBIZ'; //文档的默认命名规则 $art_shortname = $cfg_df_ext = '.html'; -$cfg_df_namerule = '{typedir}/{Y}/{M}{D}/{aid}' . $cfg_df_ext; +$cfg_df_namerule = '{typedir}/{Y}/{M}{D}/{aid}'.$cfg_df_ext; //新建目录的权限,如果你使用别的属性,本程不保证程序能顺利在Linux或Unix系统运行 if (isset($cfg_ftp_mkdir) && $cfg_ftp_mkdir == 'Y') { @@ -273,7 +273,7 @@ if ($cfg_sendmail_bysmtp == 'Y' && !empty($cfg_smtp_usermail)) { } // DedeBIZ商业化组件 -require_once(DEDEINC . '/dedebiz.class.php'); +require_once(DEDEINC.'/dedebiz.class.php'); //对全局分页传递参数进行过滤 if (isset($GLOBALS['PageNo'])) { @@ -304,24 +304,24 @@ if (!isset($cfg_NotPrintHead)) { //自动加载类库处理 if (version_compare(PHP_VERSION, '7.2.0', '>=')) { - require_once(DEDEINC . '/autoload7.inc.php'); + require_once(DEDEINC.'/autoload7.inc.php'); } else { - require_once(DEDEINC . '/autoload.inc.php'); + require_once(DEDEINC.'/autoload.inc.php'); } -$cfg_biz_helpUrl = DEDEBIZURL . "/help"; -$cfg_biz_gitUrl = DEDEBIZURL . "/git"; +$cfg_biz_helpUrl = DEDEBIZURL."/help"; +$cfg_biz_gitUrl = DEDEBIZURL."/git"; $cfg_biz_dedebizUrl = DEDEBIZURL; //引入数据库类 if ($GLOBALS['cfg_dbtype'] == 'mysql' || $GLOBALS['cfg_dbtype'] == 'mysqli') { - require_once(DEDEINC . '/dedesqli.class.php'); + require_once(DEDEINC.'/dedesqli.class.php'); } else { - require_once(DEDEINC . '/dedesqlite.class.php'); + require_once(DEDEINC.'/dedesqlite.class.php'); } //全局常用函数 -require_once(DEDEINC . '/common.func.php'); +require_once(DEDEINC.'/common.func.php'); //载入小助手配置,并对其进行默认初始化 $cfg_helper_autoload = array( diff --git a/src/include/customfields.func.php b/src/include/customfields.func.php index 31a6a250..11544e70 100755 --- a/src/include/customfields.func.php +++ b/src/include/customfields.func.php @@ -40,18 +40,18 @@ function GetFormItem($ctag, $admintype = 'admin') $innertext = $myformItem; } else if ($fieldType == 'stepselect') { global $hasSetEnumJs, $cfg_cmspath; - $cmspath = ((empty($cfg_cmspath) || !preg_match('/[/$]/', $cfg_cmspath)) ? $cfg_cmspath . '/' : $cfg_cmspath); + $cmspath = ((empty($cfg_cmspath) || !preg_match('/[/$]/', $cfg_cmspath)) ? $cfg_cmspath.'/' : $cfg_cmspath); $myformItem = ''; $myformItem .= "\r\n"; $myformItem .= "\r\n"; $myformItem .= "\r\n"; $myformItem .= "\r\n"; if ($hasSetEnumJs != 'hasset') { - $myformItem .= '' . "\r\n"; + $myformItem .= ''."\r\n"; $GLOBALS['hasSetEnumJs'] = 'hasset'; } $myformItem .= "\r\n"; - $myformItem .= '' . "\r\n"; + $myformItem .= ''."\r\n"; $formitem = str_replace('~name~', $ctag->GetAtt('itemname'), $formitem); $formitem = str_replace('~form~', $myformItem, $formitem); return $formitem; @@ -101,19 +101,19 @@ function GetFormItem($ctag, $admintype = 'admin') if ($admintype == 'diy') { $innertext = "\r\n"; } else { - $innertext = " \r\n"; + $innertext = " \r\n"; } } else if ($fieldType == 'media') { if ($admintype == 'diy') { $innertext = "不支持的类型\r\n"; } else { - $innertext = " \r\n"; + $innertext = " \r\n"; } } else if ($fieldType == 'addon') { if ($admintype == 'diy') { $innertext = "\r\n"; } else { - $innertext = " \r\n"; + $innertext = " \r\n"; } } else if ($fieldType == 'int' || $fieldType == 'float') { $dfvalue = ($ctag->GetAtt('default') != '' ? $ctag->GetAtt('default') : '0'); @@ -207,22 +207,22 @@ function GetFieldValue($dvalue, $dtype, $aid = 0, $job = 'add', $addvar = '', $a } return $dvalue; } else if ($dtype == "textdata") { - $ipath = $cfg_cmspath . "/data/textdata"; + $ipath = $cfg_cmspath."/data/textdata"; $tpath = ceil($aid / 5000); - if (!is_dir($cfg_basedir . $ipath)) { - MkdirAll($cfg_basedir . $ipath, $GLOBALS['cfg_dir_purview']); + if (!is_dir($cfg_basedir.$ipath)) { + MkdirAll($cfg_basedir.$ipath, $GLOBALS['cfg_dir_purview']); } - if (!is_dir($cfg_basedir . $ipath . '/' . $tpath)) { - MkdirAll($cfg_basedir . $ipath . '/' . $tpath, $GLOBALS['cfg_dir_purview']); + if (!is_dir($cfg_basedir.$ipath.'/'.$tpath)) { + MkdirAll($cfg_basedir.$ipath.'/'.$tpath, $GLOBALS['cfg_dir_purview']); } - $ipath = $ipath . '/' . $tpath; - $filename = "{$ipath}/{$aid}-" . cn_substr(md5($cfg_cookie_encode), 0, 16) . ".txt"; + $ipath = $ipath.'/'.$tpath; + $filename = "{$ipath}/{$aid}-".cn_substr(md5($cfg_cookie_encode), 0, 16).".txt"; //会员投稿内容安全处理 if ($admintype == 'member' || $admintype == 'diy') { $dvalue = HtmlReplace($dvalue, -1); } - $fp = fopen($cfg_basedir . $filename, "w"); + $fp = fopen($cfg_basedir.$filename, "w"); fwrite($fp, stripslashes($dvalue)); fclose($fp); CloseFtp(); @@ -238,7 +238,7 @@ function GetFieldValue($dvalue, $dtype, $aid = 0, $job = 'add', $addvar = '', $a return ''; } $iurl = trim(str_replace($GLOBALS['cfg_basehost'], "", $iurl)); - $imgurl = "{dede:img text='' width='' height=''} " . $iurl . " {/dede:img}"; + $imgurl = "{dede:img text='' width='' height=''} ".$iurl." {/dede:img}"; if (preg_match("/^http:\/\//i", $iurl) && $GLOBALS['cfg_isUrlOpen']) { //远程图片 $reimgs = ''; @@ -248,26 +248,26 @@ function GetFieldValue($dvalue, $dtype, $aid = 0, $job = 'add', $addvar = '', $a if ($dtype == 'imgfile') { $imgurl = $reimgs[1]; } else { - $imgurl = "{dede:img text='' width='" . $reimgs[1] . "' height='" . $reimgs[2] . "'} " . $reimgs[0] . " {/dede:img}"; + $imgurl = "{dede:img text='' width='".$reimgs[1]."' height='".$reimgs[2]."'} ".$reimgs[0]." {/dede:img}"; } } } else { if ($dtype == 'imgfile') { $imgurl = $iurl; } else { - $imgurl = "{dede:img text='' width='' height=''} " . $iurl . " {/dede:img}"; + $imgurl = "{dede:img text='' width='' height=''} ".$iurl." {/dede:img}"; } } } else if ($iurl != '') { //站内图片 - $imgfile = $cfg_basedir . $iurl; + $imgfile = $cfg_basedir.$iurl; if (is_file($imgfile)) { $info = ''; $imginfos = GetImageSize($imgfile, $info); if ($dtype == "imgfile") { $imgurl = $iurl; } else { - $imgurl = "{dede:img text='' width='" . $imginfos[0] . "' height='" . $imginfos[1] . "'} $iurl {/dede:img}"; + $imgurl = "{dede:img text='' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}"; } } } @@ -323,14 +323,14 @@ function GetFormItemValue($ctag, $fvalue, $admintype = 'admin', $fieldname = '') $innertext = $myformItem; } else if ($ctag->GetAtt("type") == 'stepselect') { global $hasSetEnumJs, $cfg_cmspath; - $cmspath = ((empty($cfg_cmspath) || preg_match('/[/$]/', $cfg_cmspath)) ? $cfg_cmspath . '/' : $cfg_cmspath); + $cmspath = ((empty($cfg_cmspath) || preg_match('/[/$]/', $cfg_cmspath)) ? $cfg_cmspath.'/' : $cfg_cmspath); $myformItem = ''; $myformItem .= "\r\n"; $myformItem .= "\r\n"; $myformItem .= "\r\n"; $myformItem .= "\r\n"; if ($hasSetEnumJs != 'hasset') { - $myformItem .= '' . "\r\n"; + $myformItem .= ''."\r\n"; $GLOBALS['hasSetEnumJs'] = 'hasset'; } $myformItem .= "\r\n"; @@ -371,8 +371,8 @@ function GetFormItemValue($ctag, $fvalue, $admintype = 'admin', $fieldname = '') //文本数据的特殊处理 else if ($ftype == "textdata") { - if (is_file($cfg_basedir . $fvalue)) { - $fp = fopen($cfg_basedir . $fvalue, 'r'); + if (is_file($cfg_basedir.$fvalue)) { + $fp = fopen($cfg_basedir.$fvalue, 'r'); $okfvalue = ''; while (!feof($fp)) { $okfvalue .= fgets($fp, 1024); @@ -382,16 +382,16 @@ function GetFormItemValue($ctag, $fvalue, $admintype = 'admin', $fieldname = '') $okfvalue = ''; } if ($admintype == 'admin') { - $myformItem = GetEditor($fieldname, $okfvalue, 350, 'Basic', 'string') . "\r\n \r\n "; + $myformItem = GetEditor($fieldname, $okfvalue, 350, 'Basic', 'string')."\r\n \r\n "; } else { - $myformItem = GetEditor($fieldname, $okfvalue, 350, 'Member', 'string') . "\r\n \r\n "; + $myformItem = GetEditor($fieldname, $okfvalue, 350, 'Member', 'string')."\r\n \r\n "; } $innertext = $myformItem; } else if ($ftype == "htmltext") { if ($admintype == 'admin') { - $myformItem = GetEditor($fieldname, $fvalue, 350, 'Basic', 'string') . "\r\n "; + $myformItem = GetEditor($fieldname, $fvalue, 350, 'Basic', 'string')."\r\n "; } else { - $myformItem = GetEditor($fieldname, $fvalue, 350, 'Member', 'string') . "\r\n "; + $myformItem = GetEditor($fieldname, $fvalue, 350, 'Member', 'string')."\r\n "; } $innertext = $myformItem; } else if ($ftype == "multitext") { @@ -409,13 +409,13 @@ function GetFormItemValue($ctag, $fvalue, $admintype = 'admin', $fieldname = '') $ntag = $ndtp->GetTag("img"); $fvalue = trim($ntag->GetInnerText()); } - $innertext = " \r\n"; + $innertext = " \r\n"; } else if ($ftype == "imgfile") { - $innertext = " \r\n"; + $innertext = " \r\n"; } else if ($ftype == "media") { - $innertext = " \r\n"; + $innertext = " \r\n"; } else if ($ftype == "addon") { - $innertext = " \r\n"; + $innertext = " \r\n"; } else if ($ftype == "int" || $ftype == "float") { $innertext = " (填写数值)\r\n"; } else if ($ftype == "relation") { diff --git a/src/include/datalistcp.class.php b/src/include/datalistcp.class.php index dcd2ba87..d1a83722 100755 --- a/src/include/datalistcp.class.php +++ b/src/include/datalistcp.class.php @@ -18,11 +18,11 @@ * @link https://www.dedebiz.com */ -require_once(DEDEINC . '/dedetemplate.class.php'); +require_once(DEDEINC.'/dedetemplate.class.php'); $codefile = (isset($needCode) ? $needCode : $cfg_soft_lang); $codefile = preg_replace("#[^\w-]#", '', $codefile); -if (file_exists(DEDEINC . '/code/datalist.' . $codefile . '.inc')) { - require_once(DEDEINC . '/code/datalist.' . $codefile . '.inc'); +if (file_exists(DEDEINC.'/code/datalist.'.$codefile.'.inc')) { + require_once(DEDEINC.'/code/datalist.'.$codefile.'.inc'); } else { $lang_pre_page = '上页'; $lang_next_page = '下页'; @@ -147,9 +147,9 @@ class DataListCP $row = $this->dsql->GetOne($countQuery); if (!is_array($row)) $row['dd'] = 0; $this->totalResult = isset($row['dd']) ? $row['dd'] : 0; - $this->sourceSql .= " LIMIT 0," . $this->pageSize; + $this->sourceSql .= " LIMIT 0,".$this->pageSize; } else { - $this->sourceSql .= " LIMIT " . (($this->pageNO - 1) * $this->pageSize) . "," . $this->pageSize; + $this->sourceSql .= " LIMIT ".(($this->pageNO - 1) * $this->pageSize).",".$this->pageSize; } } @@ -195,8 +195,8 @@ class DataListCP $search .= '1234567890!@#$%^&*()'; $search .= '~`";:?+/={}[]-_|\'\\'; for ($i = 0; $i < strlen($search); $i++) { - $val = preg_replace('/(&#[xX]0{0,8}' . dechex(ord($search[$i])) . ';?)/i', $search[$i], $val); // with a ; - $val = preg_replace('/(�{0,8}' . ord($search[$i]) . ';?)/', $search[$i], $val); // with a ; + $val = preg_replace('/(&#[xX]0{0,8}'.dechex(ord($search[$i])).';?)/i', $search[$i], $val); // with a ; + $val = preg_replace('/(�{0,8}'.ord($search[$i]).';?)/', $search[$i], $val); // with a ; } $val = str_replace("`", "‘", $val); @@ -226,7 +226,7 @@ class DataListCP $pattern .= $ra[$i][$j]; } $pattern .= '/i'; - $replacement = substr($ra[$i], 0, 2) . '' . substr($ra[$i], 2); + $replacement = substr($ra[$i], 0, 2).''.substr($ra[$i], 2); $val = preg_replace($pattern, $replacement, $val); if ($val_before == $val) { $found = false; @@ -275,10 +275,10 @@ class DataListCP //echo " {$totalpage}=={$this->totalResult}=={$this->pageSize}"; //无结果或只有一页的情况 if ($totalpage <= 1 && $this->totalResult > 0) { - return "
        \n
      • {$lang_total} 1 {$lang_page}/" . $this->totalResult . $lang_record_number . "
      "; + return "
        \n
      • {$lang_total} 1 {$lang_page}/".$this->totalResult.$lang_record_number."
      "; } if ($this->totalResult == 0) { - return "
        \n
      • {$lang_total} 0 {$lang_page}/" . $this->totalResult . $lang_record_number . "
      "; + return "
        \n
      • {$lang_total} 0 {$lang_page}/".$this->totalResult.$lang_record_number."
      "; } $infos = "
    • {$lang_total} {$totalpage} {$lang_page}/{$this->totalResult}{$lang_record_number}
    • "; if ($this->totalResult != 0) { @@ -287,22 +287,22 @@ class DataListCP if (count($this->getValues) > 0) { foreach ($this->getValues as $key => $value) { $value = urlencode($value); - $geturl .= "$key=$value" . "&"; + $geturl .= "$key=$value"."&"; $hidenform .= "\n"; } } - $purl .= "?" . $geturl; + $purl .= "?".$geturl; //获得上一页和下一页的链接 if ($this->pageNO != 1) { - $prepage .= "
    • $lang_pre_page
    • \n"; - $indexpage = "
    • $lang_index_page
    • \n"; + $prepage .= "
    • $lang_pre_page
    • \n"; + $indexpage = "
    • $lang_index_page
    • \n"; } else { - $indexpage = "
    • " . "$lang_index_page \n" . "
    • "; + $indexpage = "
    • "."$lang_index_page \n"."
    • "; } if ($this->pageNO != $totalpage && $totalpage > 1) { - $nextpage .= "
    • $lang_next_page
    • \n"; - $endpage = "
    • $lang_end_page
    • \n"; + $nextpage .= "
    • $lang_next_page
    • \n"; + $endpage = "
    • $lang_end_page
    • \n"; } else { $endpage = "
    • $lang_end_page
    • \n"; } @@ -323,7 +323,7 @@ class DataListCP } } for ($j; $j <= $total_list; $j++) { - $listdd .= $j == $this->pageNO ? "
    • $j
    • \r\n" : "
    • " . $j . "
    • \n"; + $listdd .= $j == $this->pageNO ? "
    • $j
    • \r\n" : "
    • ".$j."
    • \n"; } $plist = "
    \r\n"; - $items .= "\r\n"; + $items .= "\r\n"; $items .= "\r\n"; - $items .= "\r\n"; - $items .= "\r\n"; - $items .= "\r\n"; + $items .= "\r\n"; + $items .= "\r\n"; + $items .= "\r\n"; if ($this->VoteCount > 0) { foreach ($this->VoteNotes as $k => $arr) { if ($this->VoteInfos['ismore'] == 0) { - $items .= "\r\n"; + $items .= "\r\n"; } else { - $items .= "\r\n"; + $items .= "\r\n"; } } $items .= "\r\n"; + $items .= "value='查看结果' onClick=window.open('".$GLOBALS['cfg_phpurl']."/vote.php?dopost=view&aid=".$this->VoteID."'); />\r\n"; } $items .= "\r\n
    " . $this->VoteInfos['votename'] . "
    ".$this->VoteInfos['votename']."
    \r\n"; $items .= "\r\n"; $items .= "VoteID . "'); />
    \r\n"; return $items; @@ -190,10 +190,10 @@ class DedeVote if (!empty($memberID)) { if (isset($VoteMem['id'])) { $voteday = date("Y-m-d", $VoteMem['uptime']); - $day = strtotime("-" . $row['spec'] . " day"); + $day = strtotime("-".$row['spec']." day"); $day = date("Y-m-d", $day); if ($day < $voteday) { - ShowMsg('在' . $row['spec'] . '天内不能重复投票', $ENV_GOBACK_URL); + ShowMsg('在'.$row['spec'].'天内不能重复投票', $ENV_GOBACK_URL); exit(); } else { $query = "UPDATE #@__vote_member SET uptime='$nowtime' WHERE voteid='$this->VoteID' AND userid='$memberID'"; @@ -227,10 +227,10 @@ class DedeVote } } foreach ($this->VoteNotes as $k => $arr) { - $items .= "" . $arr['name'] . "\r\n"; + $items .= "".$arr['name']."\r\n"; } } - $this->dsql->ExecuteNoneQuery("UPDATE `#@__vote` SET totalcount='" . ($this->VoteInfos['totalcount'] + 1) . "',votenote='" . addslashes($items) . "' WHERE aid='" . $this->VoteID . "'"); + $this->dsql->ExecuteNoneQuery("UPDATE `#@__vote` SET totalcount='".($this->VoteInfos['totalcount'] + 1)."',votenote='".addslashes($items)."' WHERE aid='".$this->VoteID."'"); return "投票成功!"; } @@ -253,9 +253,9 @@ class DedeVote $res .= "\r\n"; $i = 1; foreach ($this->VoteNotes as $k => $arr) { - $res .= "" . $i . "、" . $arr['name'] . ""; + $res .= "".$i."、".$arr['name'].""; $c = $arr['count']; - $res .= "
    \r\n"; + $res .= "
    \r\n"; $i++; } $res .= "\r\n"; diff --git a/src/include/diyform.cls.php b/src/include/diyform.cls.php index 9552686a..a8ac8dcd 100755 --- a/src/include/diyform.cls.php +++ b/src/include/diyform.cls.php @@ -9,8 +9,8 @@ * @link https://www.dedebiz.com */ -require_once DEDEINC . '/dedetag.class.php'; -require_once DEDEINC . '/customfields.func.php'; +require_once DEDEINC.'/dedetag.class.php'; +require_once DEDEINC.'/customfields.func.php'; /** * diyform @@ -56,9 +56,9 @@ class diyform $this->name = $diyinfo['name']; $this->table = $diyinfo['table']; $this->public = $diyinfo['public']; - $this->listTemplate = $diyinfo['listtemplate'] != '' && file_exists(DEDETEMPLATE . '/plus/' . $diyinfo['listtemplate']) ? $diyinfo['listtemplate'] : 'list_diyform.htm'; - $this->viewTemplate = $diyinfo['viewtemplate'] != '' && file_exists(DEDETEMPLATE . '/plus/' . $diyinfo['viewtemplate']) ? $diyinfo['viewtemplate'] : 'view_diyform.htm';; - $this->postTemplate = $diyinfo['posttemplate'] != '' && file_exists(DEDETEMPLATE . '/plus/' . $diyinfo['posttemplate']) ? $diyinfo['posttemplate'] : 'post_diyform.htm';; + $this->listTemplate = $diyinfo['listtemplate'] != '' && file_exists(DEDETEMPLATE.'/plus/'.$diyinfo['listtemplate']) ? $diyinfo['listtemplate'] : 'list_diyform.htm'; + $this->viewTemplate = $diyinfo['viewtemplate'] != '' && file_exists(DEDETEMPLATE.'/plus/'.$diyinfo['viewtemplate']) ? $diyinfo['viewtemplate'] : 'view_diyform.htm';; + $this->postTemplate = $diyinfo['posttemplate'] != '' && file_exists(DEDETEMPLATE.'/plus/'.$diyinfo['posttemplate']) ? $diyinfo['posttemplate'] : 'post_diyform.htm';; } /** @@ -87,13 +87,13 @@ class diyform } else { $formstring .= $func($tag, dede_htmlspecialchars($value[$tag->GetName()], ENT_QUOTES), $admintype); } - $formfields .= $formfields == '' ? $tag->GetName() . ',' . $tag->GetAtt('type') : ';' . $tag->GetName() . ',' . $tag->GetAtt('type'); + $formfields .= $formfields == '' ? $tag->GetName().','.$tag->GetAtt('type') : ';'.$tag->GetName().','.$tag->GetAtt('type'); } } } - $formstring .= "\n"; - $formstring .= ""; + $formstring .= "\n"; + $formstring .= ""; return $formstring; } diff --git a/src/include/enums.func.php b/src/include/enums.func.php index 8caf5999..15c6e604 100755 --- a/src/include/enums.func.php +++ b/src/include/enums.func.php @@ -10,7 +10,7 @@ */ // 弱不存在缓存文件则写入缓存 -if (!file_exists(DEDEDATA . '/enums/system.php')) WriteEnumsCache(); +if (!file_exists(DEDEDATA.'/enums/system.php')) WriteEnumsCache(); /** * 更新枚举缓存 @@ -33,9 +33,9 @@ function WriteEnumsCache($egroup = '') $egroups[] = $nrow['egroup']; } foreach ($egroups as $egroup) { - $cachefile = DEDEDATA . '/enums/' . $egroup . '.php'; + $cachefile = DEDEDATA.'/enums/'.$egroup.'.php'; $fp = fopen($cachefile, 'w'); - fwrite($fp, '<' . "?php\r\nglobal \$em_{$egroup}s;\r\n\$em_{$egroup}s = array();\r\n"); + fwrite($fp, '<'."?php\r\nglobal \$em_{$egroup}s;\r\n\$em_{$egroup}s = array();\r\n"); $dsql->SetQuery("SELECT ename,evalue,issign FROM `#@__sys_enum` WHERE egroup='$egroup' ORDER BY disorder ASC, evalue ASC "); $dsql->Execute('enum'); $issign = -1; @@ -46,7 +46,7 @@ function WriteEnumsCache($egroup = '') if ($nrow['issign'] == 2) $tenum = true; } if ($tenum) $dsql->ExecuteNoneQuery("UPDATE `#@__stepselect` SET `issign`=2 WHERE egroup='$egroup'; "); - fwrite($fp, '?' . '>'); + fwrite($fp, '?'.'>'); fclose($fp); if (empty($issign)) WriteEnumsJs($egroup); } @@ -85,14 +85,14 @@ function GetEnumsTypes($v) */ function GetEnumsForm($egroup, $evalue = 0, $formid = '', $seltitle = '') { - $cachefile = DEDEDATA . '/enums/' . $egroup . '.php'; + $cachefile = DEDEDATA.'/enums/'.$egroup.'.php'; include($cachefile); if ($formid == '') { $formid = $egroup; } $forms = "匿名评论\r\n"; if ($cfg_feedback_ck == 'Y') { echo "验证码:"; diff --git a/src/member/ajax_loginsta.php b/src/member/ajax_loginsta.php index e22b5457..23a69506 100755 --- a/src/member/ajax_loginsta.php +++ b/src/member/ajax_loginsta.php @@ -9,7 +9,7 @@ */ define('AJAXLOGIN', TRUE); -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); AjaxHead(); @@ -31,7 +31,7 @@ if (!$cfg_ml->IsLogin()) { $uid = $cfg_ml->M_LoginID; !$cfg_ml->fields['face'] && $face = ($cfg_ml->fields['sex'] == '女') ? 'dfgirl' : 'dfboy'; -$facepic = empty($face) ? $cfg_ml->fields['face'] : $GLOBALS['cfg_memberurl'] . '/templets/images/' . $face . '.png'; +$facepic = empty($face) ? $cfg_ml->fields['face'] : $GLOBALS['cfg_memberurl'].'/templets/images/'.$face.'.png'; if ($format === 'json') { echo json_encode(array( diff --git a/src/member/album_add.php b/src/member/album_add.php index 06756ccc..417ef118 100755 --- a/src/member/album_add.php +++ b/src/member/album_add.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); //考虑安全原因不管是否开启游客投稿功能,都不允许用户对图集投稿 CheckRank(0, 0); @@ -21,11 +21,11 @@ if ($cfg_mb_album == 'N') { ShowMsg("对不起,由于系统关闭了图集功能,你访问的功能不可用!", "-1"); exit(); } -require_once(DEDEINC . "/dedetag.class.php"); -require_once(DEDEINC . "/userlogin.class.php"); -require_once(DEDEINC . "/customfields.func.php"); -require_once(DEDEMEMBER . "/inc/inc_catalog_options.php"); -require_once(DEDEMEMBER . "/inc/inc_archives_functions.php"); +require_once(DEDEINC."/dedetag.class.php"); +require_once(DEDEINC."/userlogin.class.php"); +require_once(DEDEINC."/customfields.func.php"); +require_once(DEDEMEMBER."/inc/inc_catalog_options.php"); +require_once(DEDEMEMBER."/inc/inc_archives_functions.php"); $channelid = isset($channelid) && is_numeric($channelid) ? $channelid : 2; $typeid = isset($typeid) && is_numeric($typeid) ? $typeid : 0; $menutype = 'content'; @@ -44,22 +44,22 @@ if (empty($dopost)) { //检查会员等级和类型限制 if ($cInfos['sendrank'] > $cfg_ml->M_Rank) { - $row = $dsql->GetOne("Select membername From `#@__arcrank` where rank='" . $cInfos['sendrank'] . "' "); - ShowMsg("对不起,需要[" . $row['membername'] . "]才能在这个频道发布文档!", "-1", "0", 5000); + $row = $dsql->GetOne("Select membername From `#@__arcrank` where rank='".$cInfos['sendrank']."' "); + ShowMsg("对不起,需要[".$row['membername']."]才能在这个频道发布文档!", "-1", "0", 5000); exit(); } if ($cInfos['usertype'] != '' && $cInfos['usertype'] != $cfg_ml->M_MbType) { - ShowMsg("对不起,需要[" . $cInfos['usertype'] . "帐号]才能在这个频道发布文档!", "-1", "0", 5000); + ShowMsg("对不起,需要[".$cInfos['usertype']."帐号]才能在这个频道发布文档!", "-1", "0", 5000); exit(); } - include(DEDEMEMBER . "/templets/album_add.htm"); + include(DEDEMEMBER."/templets/album_add.htm"); exit(); } /*------------------------------ function _SaveArticle(){ } ------------------------------*/ else if ($dopost == 'save') { - include(DEDEMEMBER . '/inc/archives_check.php'); + include(DEDEMEMBER.'/inc/archives_check.php'); $svali = GetCkVdValue(); if (preg_match("/1/", $safe_gdopen)) { @@ -76,18 +76,18 @@ function _SaveArticle(){ } $prow = isset($prow) && is_numeric($prow) ? $prow : 3; $pcol = isset($pcol) && is_numeric($pcol) ? $pcol : 3; $pagestyle = in_array($pagestyle, array('1', '2', '3')) ? $pagestyle : 2; - include(DEDEMEMBER . '/inc/archives_check.php'); + include(DEDEMEMBER.'/inc/archives_check.php'); $imgurls = "{dede:pagestyle maxwidth='$maxwidth' pagepicnum='$pagepicnum' ddmaxwidth='$ddmaxwidth' row='$prow' col='$pcol' value='$pagestyle'/}\r\n"; $hasone = false; $ddisfirst = 1; //只支持填写地址 for ($i = 1; $i <= 120; $i++) { - if (!isset(${'imgfile' . $i})) { + if (!isset(${'imgfile'.$i})) { continue; } - $f = ${'imgfile' . $i}; - $msg = isset(${'imgmsg' . $i}) ? ${'imgmsg' . $i} : ""; + $f = ${'imgfile'.$i}; + $msg = isset(${'imgmsg'.$i}) ? ${'imgmsg'.$i} : ""; if (!empty($f) && filter_var($f, FILTER_VALIDATE_URL)) { $u = str_replace(array("\"", "'"), "`", $f); $info = str_replace(array("\"", "'"), "`", $msg); @@ -116,8 +116,8 @@ function _SaveArticle(){ } ${$vs[0]} = ''; } ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], 0); - $inadd_f .= ',' . $vs[0]; - $inadd_v .= " ,'" . ${$vs[0]} . "' "; + $inadd_f .= ','.$vs[0]; + $inadd_v .= " ,'".${$vs[0]}."' "; } } @@ -163,20 +163,20 @@ VALUES ('$arcID','$typeid','$sortrank','$flag','$ismake','$channelid','$arcrank' $gerr = $dsql->GetError(); $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请联系管理员!" . $gerr, "javascript:;"); + ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请联系管理员!".$gerr, "javascript:;"); exit(); } } //增加积分 - $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET scores=scores+{$cfg_sendarc_scores} WHERE mid='" . $cfg_ml->M_ID . "' ; "); + $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET scores=scores+{$cfg_sendarc_scores} WHERE mid='".$cfg_ml->M_ID."' ; "); //更新统计 countArchives($channelid); //生成HTML InsertTags($tags, $arcID); $artUrl = MakeArt($arcID, true); - if ($artUrl == '') $artUrl = $cfg_phpurl . "/view.php?aid=$arcID"; + if ($artUrl == '') $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; ClearMyAddon($arcID, $title); @@ -187,7 +187,7 @@ VALUES ('$arcID','$typeid','$sortrank','$flag','$ismake','$channelid','$arcrank'    查看图集    - 更改图集 + 更改图集    已发布图集管理 "; diff --git a/src/member/album_edit.php b/src/member/album_edit.php index 4f112d81..0d89e414 100755 --- a/src/member/album_edit.php +++ b/src/member/album_edit.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckRank(0, 0); if ($cfg_mb_lit == 'Y') { ShowMsg("由于系统开启了精简版会员空间,你访问的功能不可用!", "-1"); @@ -19,10 +19,10 @@ if ($cfg_mb_album == 'N') { ShowMsg("对不起,由于系统关闭了图集功能,你访问的功能不可用!", "-1"); exit(); } -require_once(DEDEINC . "/dedetag.class.php"); -require_once(DEDEINC . "/customfields.func.php"); -require_once(DEDEMEMBER . "/inc/inc_catalog_options.php"); -require_once(DEDEMEMBER . "/inc/inc_archives_functions.php"); +require_once(DEDEINC."/dedetag.class.php"); +require_once(DEDEINC."/customfields.func.php"); +require_once(DEDEMEMBER."/inc/inc_catalog_options.php"); +require_once(DEDEMEMBER."/inc/inc_archives_functions.php"); $channelid = isset($channelid) && is_numeric($channelid) ? $channelid : 2; $aid = isset($aid) && is_numeric($aid) ? $aid : 0; $menutype = 'content'; @@ -35,7 +35,7 @@ if (empty($dopost)) { //读取归档信息 $arcQuery = "SELECT arc.*,ch.addtable,ch.fieldset,ch.arcsta FROM `#@__archives` arc LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel - WHERE arc.id='$aid' AND arc.mid='" . $cfg_ml->M_ID . "'; "; + WHERE arc.id='$aid' AND arc.mid='".$cfg_ml->M_ID."'; "; $row = $dsql->GetOne($arcQuery); if (!is_array($row)) { ShowMsg("读取文档信息出错!", "-1"); @@ -54,7 +54,7 @@ if (empty($dopost)) { $abinfo = $dtp->GetTagByName('pagestyle'); $row = XSSClean($row); $addRow = XSSClean($addRow); - include(DEDEMEMBER . "/templets/album_edit.htm"); + include(DEDEMEMBER."/templets/album_edit.htm"); exit(); } /*------------------------------ @@ -76,7 +76,7 @@ function _Save(){ } $pcol = isset($pcol) && is_numeric($pcol) ? $pcol : 3; $pagestyle = in_array($pagestyle, array('1', '2', '3')) ? $pagestyle : 2; - include(DEDEMEMBER . '/inc/archives_check_edit.php'); + include(DEDEMEMBER.'/inc/archives_check_edit.php'); $imgurls = "{dede:pagestyle maxwidth='$maxwidth' pagepicnum='$pagepicnum' ddmaxwidth='$ddmaxwidth' row='$prow' col='$pcol' value='$pagestyle'/}\r\n"; $hasone = false; @@ -84,11 +84,11 @@ function _Save(){ } //只支持填写地址 for ($i = 1; $i <= 120; $i++) { - if (!isset(${'imgfile' . $i})) { + if (!isset(${'imgfile'.$i})) { continue; } - $f = ${'imgfile' . $i}; - $msg = isset(${'imgmsg' . $i}) ? ${'imgmsg' . $i} : ""; + $f = ${'imgfile'.$i}; + $msg = isset(${'imgmsg'.$i}) ? ${'imgmsg'.$i} : ""; if (!empty($f) && filter_var($f, FILTER_VALIDATE_URL)) { $u = str_replace(array("\"", "'"), "`", $f); $info = str_replace(array("\"", "'"), "`", $msg); @@ -111,8 +111,8 @@ function _Save(){ } ${$vs[0]} = ''; } ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $aid); - $inadd_f .= ',' . $vs[0] . " ='" . ${$vs[0]} . "' "; - $inadd_m .= ',' . $vs[0]; + $inadd_f .= ','.$vs[0]." ='".${$vs[0]}."' "; + $inadd_m .= ','.$vs[0]; } } @@ -138,7 +138,7 @@ function _Save(){ } flag='$flag' WHERE id='$aid' AND mid='$mid'; "; if (!$dsql->ExecuteNoneQuery($upQuery)) { - ShowMsg("把数据保存到数据库主表时出错,请联系管理员!" . $dsql->GetError(), "-1"); + ShowMsg("把数据保存到数据库主表时出错,请联系管理员!".$dsql->GetError(), "-1"); exit(); } @@ -158,14 +158,14 @@ function _Save(){ } isrm='$isrm'{$inadd_f} WHERE aid='$aid'; "; if (!$dsql->ExecuteNoneQuery($query)) { - ShowMsg("更新附加表 `$addtable` 时出错,请联系管理员!" . $dsql->GetError(), "javascript:;"); + ShowMsg("更新附加表 `$addtable` 时出错,请联系管理员!".$dsql->GetError(), "javascript:;"); exit(); } } UpIndexKey($aid, $arcrank, $typeid, $sortrank, $tags); $artUrl = MakeArt($aid, TRUE); - if ($artUrl == '') $artUrl = $cfg_phpurl . "/view.php?aid=$aid"; + if ($artUrl == '') $artUrl = $cfg_phpurl."/view.php?aid=$aid"; //--------------------------------- //返回成功信息 @@ -173,7 +173,7 @@ function _Save(){ } $msg = "  请选择你的后续操作: 发布新图集    -查看更改 +查看更改    查看图集    diff --git a/src/member/archives_add.php b/src/member/archives_add.php index bda62125..224129b8 100755 --- a/src/member/archives_add.php +++ b/src/member/archives_add.php @@ -9,12 +9,12 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -require_once(DEDEINC . "/dedetag.class.php"); -require_once(DEDEINC . "/userlogin.class.php"); -require_once(DEDEINC . "/customfields.func.php"); -require_once(DEDEMEMBER . "/inc/inc_catalog_options.php"); -require_once(DEDEMEMBER . "/inc/inc_archives_functions.php"); +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEINC."/dedetag.class.php"); +require_once(DEDEINC."/userlogin.class.php"); +require_once(DEDEINC."/customfields.func.php"); +require_once(DEDEMEMBER."/inc/inc_catalog_options.php"); +require_once(DEDEMEMBER."/inc/inc_archives_functions.php"); $channelid = isset($channelid) && is_numeric($channelid) ? $channelid : 1; $typeid = isset($typeid) && is_numeric($typeid) ? $typeid : 0; $mtypesid = isset($mtypesid) && is_numeric($mtypesid) ? $mtypesid : 0; @@ -37,21 +37,21 @@ if (empty($dopost)) { //检查会员等级和类型限制 if ($cInfos['sendrank'] > $cfg_ml->M_Rank) { - $row = $dsql->GetOne("Select membername From `#@__arcrank` where rank='" . $cInfos['sendrank'] . "' "); - ShowMsg("对不起,需要[" . $row['membername'] . "]才能在这个频道发布文档!", "-1", "0", 5000); + $row = $dsql->GetOne("Select membername From `#@__arcrank` where rank='".$cInfos['sendrank']."' "); + ShowMsg("对不起,需要[".$row['membername']."]才能在这个频道发布文档!", "-1", "0", 5000); exit(); } if ($cInfos['usertype'] != '' && $cInfos['usertype'] != $cfg_ml->M_MbType) { - ShowMsg("对不起,需要[" . $cInfos['usertype'] . "帐号]才能在这个频道发布文档!", "-1", "0", 5000); + ShowMsg("对不起,需要[".$cInfos['usertype']."帐号]才能在这个频道发布文档!", "-1", "0", 5000); exit(); } - include(DEDEMEMBER . "/templets/archives_add.htm"); + include(DEDEMEMBER."/templets/archives_add.htm"); exit(); } /*------------------------------ function _SaveArticle(){ } ------------------------------*/ else if ($dopost == 'save') { - include(dirname(__FILE__) . '/inc/archives_check.php'); + include(dirname(__FILE__).'/inc/archives_check.php'); //分析处理附加表数据 $inadd_f = $inadd_v = ''; if (!empty($dede_addonfields)) { @@ -75,8 +75,8 @@ function _SaveArticle(){ } ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], 0); - $inadd_f .= ',' . $vs[0]; - $inadd_v .= " ,'" . ${$vs[0]} . "' "; + $inadd_f .= ','.$vs[0]; + $inadd_v .= " ,'".${$vs[0]}."' "; } } @@ -129,7 +129,7 @@ VALUES ('$arcID','$typeid','$sortrank','$flag','$ismake','$channelid','$arcrank' } //增加积分 - $dsql->ExecuteNoneQuery("Update `#@__member` set scores=scores+{$cfg_sendarc_scores} where mid='" . $cfg_ml->M_ID . "' ; "); + $dsql->ExecuteNoneQuery("Update `#@__member` set scores=scores+{$cfg_sendarc_scores} where mid='".$cfg_ml->M_ID."' ; "); //更新统计 countArchives($channelid); @@ -137,7 +137,7 @@ VALUES ('$arcID','$typeid','$sortrank','$flag','$ismake','$channelid','$arcrank' InsertTags($tags, $arcID); $artUrl = MakeArt($arcID, true); if ($artUrl == '') { - $artUrl = $cfg_phpurl . "/view.php?aid=$arcID"; + $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; } ClearMyAddon($arcID, $title); diff --git a/src/member/archives_do.php b/src/member/archives_do.php index f6ef25ee..89e66a25 100755 --- a/src/member/archives_do.php +++ b/src/member/archives_do.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); if (empty($dopost)) $dopost = ''; $aid = isset($aid) && is_numeric($aid) ? $aid : 0; @@ -23,10 +23,10 @@ if ($dopost == "delStow") { CheckRank(0, 0); $type = empty($type) ? 'sys' : trim($type); $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? "mystow.php" : $_COOKIE['ENV_GOBACK_URL']; - $dsql->ExecuteNoneQuery("DELETE FROM #@__member_stow WHERE aid='$aid' AND mid='" . $cfg_ml->M_ID . "' AND type='$type';"); + $dsql->ExecuteNoneQuery("DELETE FROM #@__member_stow WHERE aid='$aid' AND mid='".$cfg_ml->M_ID."' AND type='$type';"); //更新用户统计 - $row = $dsql->GetOne("SELECT COUNT(*) AS nums FROM `#@__member_stow` WHERE `mid`='" . $cfg_ml->M_ID . "' "); - $dsql->ExecuteNoneQuery("UPDATE #@__member_tj SET `stow`='$row[nums]' WHERE `mid`='" . $cfg_ml->M_ID . "'"); + $row = $dsql->GetOne("SELECT COUNT(*) AS nums FROM `#@__member_stow` WHERE `mid`='".$cfg_ml->M_ID."' "); + $dsql->ExecuteNoneQuery("UPDATE #@__member_tj SET `stow`='$row[nums]' WHERE `mid`='".$cfg_ml->M_ID."'"); ShowMsg("成功删除一条收藏记录!", $ENV_GOBACK_URL); exit(); @@ -37,11 +37,11 @@ function addArchives() 添加投稿 ------------------*/ else if ($dopost == "addArc") { if ($channelid == 1) { - $addcon = 'article_add.php?channelid=' . $channelid; + $addcon = 'article_add.php?channelid='.$channelid; } else if ($channelid == 2) { - $addcon = 'album_add.php?channelid=' . $channelid; + $addcon = 'album_add.php?channelid='.$channelid; } else if ($channelid == 3) { - $addcon = 'soft_add.php?channelid=' . $channelid; + $addcon = 'soft_add.php?channelid='.$channelid; } else { $row = $dsql->GetOne("SELECT useraddcon FROM `#@__channeltype` WHERE id='$channelid' "); if (!is_array($row)) { @@ -52,7 +52,7 @@ function addArchives() if (trim($addcon) == '') { $addcon = 'archives_add.php'; } - $addcon = $addcon . "?channelid=$channelid"; + $addcon = $addcon."?channelid=$channelid"; } header("Location:$addcon"); exit(); @@ -64,11 +64,11 @@ function editArchives() ------------------*/ else if ($dopost == "edit") { CheckRank(0, 0); if ($channelid == 1) { - $edit = 'article_edit.php?channelid=' . $channelid; + $edit = 'article_edit.php?channelid='.$channelid; } else if ($channelid == 2) { - $edit = 'album_edit.php?channelid=' . $channelid; + $edit = 'album_edit.php?channelid='.$channelid; } else if ($channelid == 3) { - $edit = 'soft_edit.php?channelid=' . $channelid; + $edit = 'soft_edit.php?channelid='.$channelid; } else { $row = $dsql->GetOne("SELECT usereditcon FROM `#@__channeltype` WHERE id='$channelid' "); if (!is_array($row)) { @@ -79,9 +79,9 @@ function editArchives() if (trim($edit) == '') { $edit = 'archives_edit.php'; } - $edit = $edit . "?channelid=$channelid"; + $edit = $edit."?channelid=$channelid"; } - header("Location:$edit" . "&aid=$aid"); + header("Location:$edit"."&aid=$aid"); exit(); } @@ -90,7 +90,7 @@ function delArchives() 删除文章 --------------------*/ else if ($dopost == "delArc") { CheckRank(0, 0); - include_once(DEDEMEMBER . "/inc/inc_batchup.php"); + include_once(DEDEMEMBER."/inc/inc_batchup.php"); $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? 'content_list.php?channelid=' : $_COOKIE['ENV_GOBACK_URL']; @@ -104,9 +104,9 @@ function delArchives() } if (trim($row['maintable']) == '') $row['maintable'] = '#@__archives'; if ($row['issystem'] == -1) { - $equery = "SELECT mid FROM `{$row['addtable']}` WHERE aid='$aid' AND mid='" . $cfg_ml->M_ID . "' "; + $equery = "SELECT mid FROM `{$row['addtable']}` WHERE aid='$aid' AND mid='".$cfg_ml->M_ID."' "; } else { - $equery = "SELECT mid,litpic from `{$row['maintable']}` WHERE id='$aid' AND mid='" . $cfg_ml->M_ID . "' "; + $equery = "SELECT mid,litpic from `{$row['maintable']}` WHERE id='$aid' AND mid='".$cfg_ml->M_ID."' "; } $arr = $dsql->GetOne($equery); if (!is_array($arr)) { @@ -131,19 +131,19 @@ function delArchives() else $rs = DelArcSg($aid); //删除缩略图 - if (trim($row['litpic']) != '' && preg_match("#^" . $cfg_user_dir . "/{$cfg_ml->M_ID}#", $row['litpic'])) { + if (trim($row['litpic']) != '' && preg_match("#^".$cfg_user_dir."/{$cfg_ml->M_ID}#", $row['litpic'])) { $dsql->ExecuteNoneQuery("DELETE FROM `#@__uploads` WHERE url LIKE '{$row['litpic']}' AND mid='{$cfg_ml->M_ID}' "); - @unlink($cfg_basedir . $row['litpic']); + @unlink($cfg_basedir.$row['litpic']); } if ($ENV_GOBACK_URL == 'content_list.php?channelid=') { - $ENV_GOBACK_URL = $ENV_GOBACK_URL . $channelid; + $ENV_GOBACK_URL = $ENV_GOBACK_URL.$channelid; } if ($rs) { //更新用户记录 countArchives($channelid); //扣除积分 - $dsql->ExecuteNoneQuery("Update `#@__member` set scores=scores-{$cfg_sendarc_scores} where mid='" . $cfg_ml->M_ID . "' And (scores-{$cfg_sendarc_scores}) > 0; "); + $dsql->ExecuteNoneQuery("Update `#@__member` set scores=scores-{$cfg_sendarc_scores} where mid='".$cfg_ml->M_ID."' And (scores-{$cfg_sendarc_scores}) > 0; "); ShowMsg("成功删除一篇文档!", $ENV_GOBACK_URL); exit(); } else { @@ -159,8 +159,8 @@ function viewArchives() ------------------*/ else if ($dopost == "viewArchives") { CheckRank(0, 0); if ($type == "") { - header("location:" . $cfg_phpurl . "/view.php?aid=" . $aid); + header("location:".$cfg_phpurl."/view.php?aid=".$aid); } else { - header("location:/book/book.php?bid=" . $aid); + header("location:/book/book.php?bid=".$aid); } } diff --git a/src/member/archives_edit.php b/src/member/archives_edit.php index f1a5e99a..cca7db66 100755 --- a/src/member/archives_edit.php +++ b/src/member/archives_edit.php @@ -9,12 +9,12 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckRank(0, 0); -require_once(DEDEINC . "/dedetag.class.php"); -require_once(DEDEINC . "/customfields.func.php"); -require_once(DEDEMEMBER . "/inc/inc_catalog_options.php"); -require_once(DEDEMEMBER . "/inc/inc_archives_functions.php"); +require_once(DEDEINC."/dedetag.class.php"); +require_once(DEDEINC."/customfields.func.php"); +require_once(DEDEMEMBER."/inc/inc_catalog_options.php"); +require_once(DEDEMEMBER."/inc/inc_archives_functions.php"); $channelid = isset($channelid) && is_numeric($channelid) ? $channelid : 1; $aid = isset($aid) && is_numeric($aid) ? $aid : 0; $mtypesid = isset($mtypesid) && is_numeric($mtypesid) ? $mtypesid : 0; @@ -27,7 +27,7 @@ if (empty($dopost)) { //读取归档信息 $arcQuery = "SELECT arc.*,ch.addtable,ch.fieldset,arc.mtype as mtypeid,ch.arcsta FROM `#@__archives` arc LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel - WHERE arc.id='$aid' And arc.mid='" . $cfg_ml->M_ID . "'; "; + WHERE arc.id='$aid' And arc.mid='".$cfg_ml->M_ID."'; "; $row = $dsql->GetOne($arcQuery); if (!is_array($row)) { ShowMsg("读取文档信息出错!", "-1"); @@ -42,14 +42,14 @@ if (empty($dopost)) { } $addRow = $dsql->GetOne("SELECT * FROM `{$row['addtable']}` WHERE aid='$aid'; "); $cInfos = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='{$row['channel']}'; "); - include(DEDEMEMBER . "/templets/archives_edit.htm"); + include(DEDEMEMBER."/templets/archives_edit.htm"); exit(); } /*------------------------------ function _SaveArticle(){ } ------------------------------*/ else if ($dopost == 'save') { - include(DEDEMEMBER . '/inc/archives_check_edit.php'); + include(DEDEMEMBER.'/inc/archives_check_edit.php'); //分析处理附加表数据 $inadd_f = $inadd_m = ''; @@ -71,8 +71,8 @@ function _SaveArticle(){ } } ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $aid); - $inadd_m .= ',' . $vs[0]; - $inadd_f .= ',' . $vs[0] . " ='" . ${$vs[0]} . "' "; + $inadd_m .= ','.$vs[0]; + $inadd_f .= ','.$vs[0]." ='".${$vs[0]}."' "; } } @@ -102,7 +102,7 @@ function _SaveArticle(){ } WHERE id='$aid' And mid='$mid'; "; if (!$dsql->ExecuteNoneQuery($upQuery)) { - ShowMsg("把数据保存到数据库主表时出错,请联系管理员!" . $dsql->GetError(), "-1"); + ShowMsg("把数据保存到数据库主表时出错,请联系管理员!".$dsql->GetError(), "-1"); exit(); } @@ -117,13 +117,13 @@ function _SaveArticle(){ } $sortrank = empty($sortrank) ? 0 : $sortrank; UpIndexKey($aid, $arcrank, $typeid, $sortrank, $tags); $artUrl = MakeArt($aid, TRUE); - if ($artUrl == '') $artUrl = $cfg_phpurl . "/view.php?aid=$aid"; + if ($artUrl == '') $artUrl = $cfg_phpurl."/view.php?aid=$aid"; //返回成功信息 $msg = "  请选择你的后续操作: 发布新内容    - 查看更改 + 查看更改    查看内容    diff --git a/src/member/archives_sg_add.php b/src/member/archives_sg_add.php index cf97b2ea..c65157fd 100755 --- a/src/member/archives_sg_add.php +++ b/src/member/archives_sg_add.php @@ -9,12 +9,12 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -require_once(DEDEINC . "/dedetag.class.php"); -require_once(DEDEINC . "/userlogin.class.php"); -require_once(DEDEINC . "/customfields.func.php"); -require_once(dirname(__FILE__) . "/inc/inc_catalog_options.php"); -require_once(dirname(__FILE__) . "/inc/inc_archives_functions.php"); +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEINC."/dedetag.class.php"); +require_once(DEDEINC."/userlogin.class.php"); +require_once(DEDEINC."/customfields.func.php"); +require_once(dirname(__FILE__)."/inc/inc_catalog_options.php"); +require_once(dirname(__FILE__)."/inc/inc_archives_functions.php"); $channelid = isset($channelid) && is_numeric($channelid) ? $channelid : 1; $typeid = isset($typeid) && is_numeric($typeid) ? $typeid : 0; $mtypesid = isset($mtypesid) && is_numeric($mtypesid) ? $mtypesid : 0; @@ -37,22 +37,22 @@ if (empty($dopost)) { //检查会员等级和类型限制 if ($cInfos['sendrank'] > $cfg_ml->M_Rank) { - $row = $dsql->GetOne("SELECT membername FROM `#@__arcrank` WHERE rank='" . $cInfos['sendrank'] . "' "); - ShowMsg("对不起,需要[" . $row['membername'] . "]才能在这个频道发布文档!", "-1", "0", 5000); + $row = $dsql->GetOne("SELECT membername FROM `#@__arcrank` WHERE rank='".$cInfos['sendrank']."' "); + ShowMsg("对不起,需要[".$row['membername']."]才能在这个频道发布文档!", "-1", "0", 5000); exit(); } if ($cInfos['usertype'] != '' && $cInfos['usertype'] != $cfg_ml->M_MbType) { - ShowMsg("对不起,需要[" . $cInfos['usertype'] . "帐号]才能在这个频道发布文档!", "-1", "0", 5000); + ShowMsg("对不起,需要[".$cInfos['usertype']."帐号]才能在这个频道发布文档!", "-1", "0", 5000); exit(); } - include(DEDEMEMBER . "/templets/archives_sg_add.htm"); + include(DEDEMEMBER."/templets/archives_sg_add.htm"); exit(); } /*------------------------------ function _SaveArticle(){ } ------------------------------*/ else if ($dopost == 'save') { - include_once(DEDEINC . "/image.func.php"); - include_once(DEDEINC . "/oxwindow.class.php"); + include_once(DEDEINC."/image.func.php"); + include_once(DEDEINC."/oxwindow.class.php"); $svali = GetCkVdValue(); if (preg_match("/3/", $safe_gdopen)) { if (strtolower($vdcode) != $svali || $svali == '') { @@ -86,13 +86,13 @@ function _SaveArticle(){ } //检查频道设定的投稿许可权限 if ($cInfos['sendrank'] > $cfg_ml->M_Rank) { - $row = $dsql->GetOne("Select membername From #@__arcrank where rank='" . $cInfos['sendrank'] . "' "); - ShowMsg("对不起,需要[" . $row['membername'] . "]才能在这个频道发布文档!", "-1", "0", 5000); + $row = $dsql->GetOne("Select membername From #@__arcrank where rank='".$cInfos['sendrank']."' "); + ShowMsg("对不起,需要[".$row['membername']."]才能在这个频道发布文档!", "-1", "0", 5000); exit(); } if ($cInfos['usertype'] != '' && $cInfos['usertype'] != $cfg_ml->M_MbType) { - ShowMsg("对不起,需要[" . $cInfos['usertype'] . "]才能在这个频道发布文档!", "-1", "0", 5000); + ShowMsg("对不起,需要[".$cInfos['usertype']."]才能在这个频道发布文档!", "-1", "0", 5000); exit(); } @@ -134,8 +134,8 @@ function _SaveArticle(){ } ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], 0); - $inadd_f .= ',`' . $vs[0] . '`'; - $inadd_v .= " ,'" . ${$vs[0]} . "' "; + $inadd_f .= ',`'.$vs[0].'`'; + $inadd_v .= " ,'".${$vs[0]}."' "; } } @@ -171,11 +171,11 @@ function _SaveArticle(){ } } //增加积分 - $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET scores=scores+{$cfg_sendarc_scores} WHERE mid='" . $cfg_ml->M_ID . "' ; "); + $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET scores=scores+{$cfg_sendarc_scores} WHERE mid='".$cfg_ml->M_ID."' ; "); //生成HTML $artUrl = MakeArt($arcID, true); - if ($artUrl == '') $artUrl = $cfg_phpurl . "/view.php?aid=$arcID"; + if ($artUrl == '') $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; ClearMyAddon($arcID, $title); diff --git a/src/member/archives_sg_edit.php b/src/member/archives_sg_edit.php index dacd99dc..f928509e 100755 --- a/src/member/archives_sg_edit.php +++ b/src/member/archives_sg_edit.php @@ -9,12 +9,12 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckRank(0, 0); -require_once(DEDEINC . "/dedetag.class.php"); -require_once(DEDEINC . "/customfields.func.php"); -require_once(DEDEMEMBER . "/inc/inc_catalog_options.php"); -require_once(DEDEMEMBER . "/inc/inc_archives_functions.php"); +require_once(DEDEINC."/dedetag.class.php"); +require_once(DEDEINC."/customfields.func.php"); +require_once(DEDEMEMBER."/inc/inc_catalog_options.php"); +require_once(DEDEMEMBER."/inc/inc_archives_functions.php"); $channelid = isset($channelid) && is_numeric($channelid) ? $channelid : 1; $aid = isset($aid) && is_numeric($aid) ? $aid : 0; $mtypesid = isset($mtypesid) && is_numeric($mtypesid) ? $mtypesid : 0; @@ -38,15 +38,15 @@ if (empty($dopost)) { exit(); } $addRow['id'] = $addRow['aid']; - include(DEDEMEMBER . "/templets/archives_sg_edit.htm"); + include(DEDEMEMBER."/templets/archives_sg_edit.htm"); exit(); } /*------------------------------ function _SaveArticle(){ } ------------------------------*/ else if ($dopost == 'save') { - require_once(DEDEINC . "/image.func.php"); - require_once(DEDEINC . "/oxwindow.class.php"); + require_once(DEDEINC."/image.func.php"); + require_once(DEDEINC."/oxwindow.class.php"); $flag = ''; $typeid = isset($typeid) && is_numeric($typeid) ? $typeid : 0; $userip = GetIP(); @@ -112,8 +112,8 @@ function _SaveArticle(){ } ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $aid); - $inadd_f .= ',`' . $vs[0] . "` ='" . ${$vs[0]} . "' "; - $inadd_m .= ',' . $vs[0]; + $inadd_f .= ',`'.$vs[0]."` ='".${$vs[0]}."' "; + $inadd_m .= ','.$vs[0]; } } @@ -137,13 +137,13 @@ function _SaveArticle(){ } UpIndexKey($aid, 0, $typeid, $sortrank, ''); $artUrl = MakeArt($aid, true); - if ($artUrl == '') $artUrl = $cfg_phpurl . "/view.php?aid=$aid"; + if ($artUrl == '') $artUrl = $cfg_phpurl."/view.php?aid=$aid"; //返回成功信息 $msg = "请选择你的后续操作: 发布新内容    - 查看更改 + 查看更改    查看内容    diff --git a/src/member/article_add.php b/src/member/article_add.php index 01821586..d2214c3f 100755 --- a/src/member/article_add.php +++ b/src/member/article_add.php @@ -9,12 +9,12 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -require_once(DEDEINC . "/dedetag.class.php"); -require_once(DEDEINC . "/userlogin.class.php"); -require_once(DEDEINC . "/customfields.func.php"); -require_once(DEDEMEMBER . "/inc/inc_catalog_options.php"); -require_once(DEDEMEMBER . "/inc/inc_archives_functions.php"); +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEINC."/dedetag.class.php"); +require_once(DEDEINC."/userlogin.class.php"); +require_once(DEDEINC."/customfields.func.php"); +require_once(DEDEMEMBER."/inc/inc_catalog_options.php"); +require_once(DEDEMEMBER."/inc/inc_archives_functions.php"); $channelid = isset($channelid) && is_numeric($channelid) ? $channelid : 1; $typeid = isset($typeid) && is_numeric($typeid) ? $typeid : 0; $mtypesid = isset($mtypesid) && is_numeric($mtypesid) ? $mtypesid : 0; @@ -32,22 +32,22 @@ if (empty($dopost)) { //检查会员等级和类型限制 if ($cInfos['sendrank'] > $cfg_ml->M_Rank) { - $row = $dsql->GetOne("SELECT membername FROM `#@__arcrank` WHERE rank='" . $cInfos['sendrank'] . "' "); - ShowMsg("对不起,需要[" . $row['membername'] . "]才能在这个频道发布文档!", "-1", "0", 5000); + $row = $dsql->GetOne("SELECT membername FROM `#@__arcrank` WHERE rank='".$cInfos['sendrank']."' "); + ShowMsg("对不起,需要[".$row['membername']."]才能在这个频道发布文档!", "-1", "0", 5000); exit(); } if ($cInfos['usertype'] != '' && $cInfos['usertype'] != $cfg_ml->M_MbType) { - ShowMsg("对不起,需要[" . $cInfos['usertype'] . "帐号]才能在这个频道发布文档!", "-1", "0", 5000); + ShowMsg("对不起,需要[".$cInfos['usertype']."帐号]才能在这个频道发布文档!", "-1", "0", 5000); exit(); } - include(DEDEMEMBER . "/templets/article_add.htm"); + include(DEDEMEMBER."/templets/article_add.htm"); exit(); } /*------------------------------ function _SaveArticle(){ } ------------------------------*/ else if ($dopost == 'save') { - include(DEDEMEMBER . '/inc/archives_check.php'); + include(DEDEMEMBER.'/inc/archives_check.php'); //分析处理附加表数据 $inadd_f = $inadd_v = ''; @@ -65,8 +65,8 @@ function _SaveArticle(){ } ${$vs[0]} = ''; } ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], 0); - $inadd_f .= ',' . $vs[0]; - $inadd_v .= " ,'" . ${$vs[0]} . "' "; + $inadd_f .= ','.$vs[0]; + $inadd_v .= " ,'".${$vs[0]}."' "; } } } @@ -119,14 +119,14 @@ VALUES ('$arcID','$typeid','$sortrank','$flag','$ismake','$channelid','$arcrank' } //增加积分 - $dsql->ExecuteNoneQuery("UPDATE `#@__member` set scores=scores+{$cfg_sendarc_scores} WHERE mid='" . $cfg_ml->M_ID . "' ; "); + $dsql->ExecuteNoneQuery("UPDATE `#@__member` set scores=scores+{$cfg_sendarc_scores} WHERE mid='".$cfg_ml->M_ID."' ; "); //更新统计 countArchives($channelid); //生成HTML InsertTags($tags, $arcID); $artUrl = MakeArt($arcID, TRUE); - if ($artUrl == '') $artUrl = $cfg_phpurl . "/view.php?aid=$arcID"; + if ($artUrl == '') $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; ClearMyAddon($arcID, $title); diff --git a/src/member/article_edit.php b/src/member/article_edit.php index bfbef8f4..2120860a 100755 --- a/src/member/article_edit.php +++ b/src/member/article_edit.php @@ -9,12 +9,12 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckRank(0, 0); -require_once(DEDEINC . "/dedetag.class.php"); -require_once(DEDEINC . "/customfields.func.php"); -require_once(DEDEMEMBER . "/inc/inc_catalog_options.php"); -require_once(DEDEMEMBER . "/inc/inc_archives_functions.php"); +require_once(DEDEINC."/dedetag.class.php"); +require_once(DEDEINC."/customfields.func.php"); +require_once(DEDEMEMBER."/inc/inc_catalog_options.php"); +require_once(DEDEMEMBER."/inc/inc_archives_functions.php"); $channelid = isset($channelid) && is_numeric($channelid) ? $channelid : 1; $aid = isset($aid) && is_numeric($aid) ? $aid : 0; $mtypesid = isset($mtypesid) && is_numeric($mtypesid) ? $mtypesid : 0; @@ -27,7 +27,7 @@ if (empty($dopost)) { //读取归档信息 $arcQuery = "SELECT arc.*,ch.addtable,ch.fieldset,arc.mtype as mtypeid,ch.arcsta FROM `#@__archives` arc LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel - WHERE arc.id='$aid' And arc.mid='" . $cfg_ml->M_ID . "'; "; + WHERE arc.id='$aid' And arc.mid='".$cfg_ml->M_ID."'; "; $row = $dsql->GetOne($arcQuery); if (!is_array($row)) { ShowMsg("读取文章信息出错!", "-1"); @@ -41,14 +41,14 @@ if (empty($dopost)) { } } $addRow = $dsql->GetOne("SELECT * FROM `{$row['addtable']}` WHERE aid='$aid'; "); - include(DEDEMEMBER . "/templets/article_edit.htm"); + include(DEDEMEMBER."/templets/article_edit.htm"); exit(); } /*------------------------------ function _SaveArticle(){ } ------------------------------*/ else if ($dopost == 'save') { - include(DEDEMEMBER . '/inc/archives_check_edit.php'); + include(DEDEMEMBER.'/inc/archives_check_edit.php'); //分析处理附加表数据 $inadd_f = $inadd_m = ''; @@ -64,8 +64,8 @@ function _SaveArticle(){ } ${$vs[0]} = ''; } ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $aid); - $inadd_f .= ',' . $vs[0] . " ='" . ${$vs[0]} . "' "; - $inadd_m .= ',' . $vs[0]; + $inadd_f .= ','.$vs[0]." ='".${$vs[0]}."' "; + $inadd_m .= ','.$vs[0]; } } @@ -93,7 +93,7 @@ function _SaveArticle(){ } flag='$flag' WHERE id='$aid' AND mid='$mid'; "; if (!$dsql->ExecuteNoneQuery($upQuery)) { - ShowMsg("把数据保存到数据库主表时出错,请联系管理员!" . $dsql->GetError(), "-1"); + ShowMsg("把数据保存到数据库主表时出错,请联系管理员!".$dsql->GetError(), "-1"); exit(); } if ($addtable != '') { @@ -106,14 +106,14 @@ function _SaveArticle(){ } UpIndexKey($aid, $arcrank, $typeid, $sortrank, $tags); $artUrl = MakeArt($aid, true); if ($artUrl == '') { - $artUrl = $cfg_phpurl . "/view.php?aid=$aid"; + $artUrl = $cfg_phpurl."/view.php?aid=$aid"; } //返回成功信息 $msg = "  请选择你的后续操作: 发布新文章    - 查看更改 + 查看更改    查看文章    diff --git a/src/member/buy.php b/src/member/buy.php index 51a37dd5..5c62e098 100755 --- a/src/member/buy.php +++ b/src/member/buy.php @@ -7,11 +7,11 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/config.php'); +require_once(dirname(__FILE__).'/config.php'); CheckRank(0, 0); $menutype = 'mydede'; $menutype_son = 'op'; -$myurl = $cfg_basehost . $cfg_member_dir . '/index.php?uid=' . $cfg_ml->M_LoginID; +$myurl = $cfg_basehost.$cfg_member_dir.'/index.php?uid='.$cfg_ml->M_LoginID; $moneycards = ''; $membertypes = ''; $dsql->SetQuery("SELECT * FROM `#@__moneycard_type`"); @@ -40,5 +40,5 @@ while ($row = $dsql->GetObject()) { "; } $tpl = new DedeTemplate(); -$tpl->LoadTemplate(DEDEMEMBER . '/templets/buy.htm'); +$tpl->LoadTemplate(DEDEMEMBER.'/templets/buy.htm'); $tpl->Display(); diff --git a/src/member/buy_action.php b/src/member/buy_action.php index 5e4697c3..b693e18d 100755 --- a/src/member/buy_action.php +++ b/src/member/buy_action.php @@ -7,11 +7,11 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckRank(0, 0); $menutype = 'mydede'; $menutype_son = 'op'; -require_once DEDEINC . '/dedetemplate.class.php'; +require_once DEDEINC.'/dedetemplate.class.php'; $product = isset($product) ? trim(HtmlReplace($product, 1)) : ''; $mid = $cfg_ml->M_ID; @@ -20,7 +20,7 @@ $pname = ''; $price = ''; $mtime = time(); -if (isset($pd_encode) && isset($pd_verify) && md5("payment" . $pd_encode . $cfg_cookie_encode) == $pd_verify) { +if (isset($pd_encode) && isset($pd_verify) && md5("payment".$pd_encode.$cfg_cookie_encode) == $pd_verify) { $result = json_decode(mchStrCode($pd_encode, 'DECODE')); $product = preg_replace("#[^0-9a-z]#i", "", $result->product); @@ -37,7 +37,7 @@ if (isset($pd_encode) && isset($pd_verify) && md5("payment" . $pd_encode . $cfg_ } $buyid = $row['buyid']; } else { - $buyid = 'M' . $mid . 'T' . $mtime . 'RN' . mt_rand(100, 999); + $buyid = 'M'.$mid.'T'.$mtime.'RN'.mt_rand(100, 999); //删除用户旧的未付款的同类记录 if (!empty($product)) { $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_operation` WHERE mid='$mid' AND sta=0 AND product='$product'"); @@ -76,7 +76,7 @@ if (!isset($paytype)) { "; $isok = $dsql->ExecuteNoneQuery($inquery); if (!$isok) { - echo "数据库出错,请重新尝试!" . $dsql->GetError(); + echo "数据库出错,请重新尝试!".$dsql->GetError(); exit(); } @@ -107,22 +107,22 @@ if (!isset($paytype)) { $pr_encode = str_replace('=', '', mchStrCode(json_encode($pr_encode))); - $pr_verify = md5("payment" . $pr_encode . $cfg_cookie_encode); + $pr_verify = md5("payment".$pr_encode.$cfg_cookie_encode); $tpl = new DedeTemplate(); - $tpl->LoadTemplate(DEDEMEMBER . '/templets/buy_action_payment.htm'); + $tpl->LoadTemplate(DEDEMEMBER.'/templets/buy_action_payment.htm'); $tpl->Display(); } else { $rs = $dsql->GetOne("SELECT * FROM `#@__payment` WHERE id='$paytype' "); $rs['code'] = preg_replace("#[^0-9a-z]#i", "", $rs['code']); - if (!file_exists(DEDEINC . '/payment/' . $rs['code'] . '.php')) { + if (!file_exists(DEDEINC.'/payment/'.$rs['code'].'.php')) { ShowMsg("未发现支付接口文件,请到后台配置!", 'javascript:;'); exit(); } - require_once DEDEINC . '/payment/' . $rs['code'] . '.php'; + require_once DEDEINC.'/payment/'.$rs['code'].'.php'; $pay = new $rs['code']; $payment = ""; if ($rs['code'] == "cod" || $rs['code'] == "bank") { @@ -133,7 +133,7 @@ if (!isset($paytype)) { 'out_trade_no' => $buyid, 'price' => sprintf("%01.2f", $price) ); - require_once DEDEDATA . '/payment/' . $rs['code'] . '.php'; + require_once DEDEDATA.'/payment/'.$rs['code'].'.php'; } $button = $pay->GetCode($order, $payment); $dtp = new DedeTemplate(); @@ -149,7 +149,7 @@ if (!isset($paytype)) { $dtp->SetVar('description', $rs['description']); $dtp->SetVar('button', $button); $dtp->Assign('carts', $carts); - $dtp->LoadTemplate(DEDEMEMBER . '/templets/shops_action_payment.htm'); + $dtp->LoadTemplate(DEDEMEMBER.'/templets/shops_action_payment.htm'); $dtp->Display(); exit(); } @@ -170,8 +170,8 @@ function mchStrCode($string, $operation = 'ENCODE') $fixedkey = md5($key); $egiskeys = md5(substr($fixedkey, 16, 16)); $runtokey = $key_length ? ($operation == 'ENCODE' ? substr(md5(microtime(true)), -$key_length) : substr($string, 0, $key_length)) : ''; - $keys = md5(substr($runtokey, 0, 16) . substr($fixedkey, 0, 16) . substr($runtokey, 16) . substr($fixedkey, 16)); - $string = $operation == 'ENCODE' ? sprintf('%010d', $expiry ? $expiry + time() : 0) . substr(md5($string . $egiskeys), 0, 16) . $string : base64_decode(substr($string, $key_length)); + $keys = md5(substr($runtokey, 0, 16).substr($fixedkey, 0, 16).substr($runtokey, 16).substr($fixedkey, 16)); + $string = $operation == 'ENCODE' ? sprintf('%010d', $expiry ? $expiry + time() : 0).substr(md5($string.$egiskeys), 0, 16).$string : base64_decode(substr($string, $key_length)); $i = 0; $result = ''; @@ -180,9 +180,9 @@ function mchStrCode($string, $operation = 'ENCODE') $result .= chr(ord($string[$i]) ^ ord($keys[$i % 32])); } if ($operation == 'ENCODE') { - return $runtokey . str_replace('=', '', base64_encode($result)); + return $runtokey.str_replace('=', '', base64_encode($result)); } else { - if ((substr($result, 0, 10) == 0 || substr($result, 0, 10) - time() > 0) && substr($result, 10, 16) == substr(md5(substr($result, 26) . $egiskeys), 0, 16)) { + if ((substr($result, 0, 10) == 0 || substr($result, 0, 10) - time() > 0) && substr($result, 10, 16) == substr(md5(substr($result, 26).$egiskeys), 0, 16)) { return substr($result, 26); } else { return ''; diff --git a/src/member/check_card.php b/src/member/check_card.php index 3d9b02a2..263e24cb 100755 --- a/src/member/check_card.php +++ b/src/member/check_card.php @@ -7,7 +7,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); $svali = GetCkVdValue(); if (strtolower($vdcode) != $svali || $svali == "") { @@ -34,8 +34,8 @@ if ($row['isexp'] == -1) { } $hasMoney = $row['num']; -$dsql->ExecuteNoneQuery("UPDATE `#@__moneycard_record` SET uid='" . $cfg_ml->M_ID . "',isexp='-1',utime='" . time() . "' WHERE cardid='$cardid' "); -$dsql->ExecuteNoneQuery("UPDATE `#@__member` SET money=money+$hasMoney WHERE mid='" . $cfg_ml->M_ID . "'"); +$dsql->ExecuteNoneQuery("UPDATE `#@__moneycard_record` SET uid='".$cfg_ml->M_ID."',isexp='-1',utime='".time()."' WHERE cardid='$cardid' "); +$dsql->ExecuteNoneQuery("UPDATE `#@__member` SET money=money+$hasMoney WHERE mid='".$cfg_ml->M_ID."'"); ShowMsg("充值成功,你本次增加的金币为:{$hasMoney} 个!", -1); exit(); diff --git a/src/member/config.php b/src/member/config.php index 1c453bf7..764fbc05 100755 --- a/src/member/config.php +++ b/src/member/config.php @@ -27,8 +27,8 @@ function XSSClean($val) $search .= '1234567890!@#$%^&*()'; $search .= '~`";:?+/={}[]-_|\'\\'; for ($i = 0; $i < strlen($search); $i++) { - $val = preg_replace('/(&#[xX]0{0,8}' . dechex(ord($search[$i])) . ';?)/i', $search[$i], $val); // with a ; - $val = preg_replace('/(�{0,8}' . ord($search[$i]) . ';?)/', $search[$i], $val); // with a ; + $val = preg_replace('/(&#[xX]0{0,8}'.dechex(ord($search[$i])).';?)/i', $search[$i], $val); // with a ; + $val = preg_replace('/(�{0,8}'.ord($search[$i]).';?)/', $search[$i], $val); // with a ; } $val = str_replace("`", "‘", $val); @@ -58,7 +58,7 @@ function XSSClean($val) $pattern .= $ra[$i][$j]; } $pattern .= '/i'; - $replacement = substr($ra[$i], 0, 2) . '' . substr($ra[$i], 2); + $replacement = substr($ra[$i], 0, 2).''.substr($ra[$i], 2); $val = preg_replace($pattern, $replacement, $val); if ($val_before == $val) { $found = false; @@ -73,10 +73,10 @@ $_POST = XSSClean($_POST); $_REQUEST = XSSClean($_REQUEST); $_COOKIE = XSSClean($_COOKIE); -require_once(dirname(__FILE__) . '/../include/common.inc.php'); -require_once(DEDEINC . '/filter.inc.php'); -require_once(DEDEINC . '/memberlogin.class.php'); -require_once(DEDEINC . '/dedetemplate.class.php'); +require_once(dirname(__FILE__).'/../include/common.inc.php'); +require_once(DEDEINC.'/filter.inc.php'); +require_once(DEDEINC.'/memberlogin.class.php'); +require_once(DEDEINC.'/dedetemplate.class.php'); // 检查CSRF function CheckCSRF() @@ -145,10 +145,10 @@ $cfg_ml = new MemberLogin($keeptime); //判断用户是否登录 $myurl = ''; if ($cfg_ml->IsLogin()) { - $myurl = $cfg_memberurl . "/index.php?uid=" . urlencode($cfg_ml->M_LoginID); - if (!preg_match("#^http[s]?:#i", $myurl)) $myurl = $cfg_basehost . $myurl; + $myurl = $cfg_memberurl."/index.php?uid=".urlencode($cfg_ml->M_LoginID); + if (!preg_match("#^http[s]?:#i", $myurl)) $myurl = $cfg_basehost.$myurl; if ($cfg_ml->fields['face'] == "") { - $cfg_ml->fields['face'] = $cfg_cmsurl . "/static/img/avatar.png"; + $cfg_ml->fields['face'] = $cfg_cmsurl."/static/img/avatar.png"; } } @@ -166,7 +166,7 @@ function CheckRank($rank = 0, $money = 0) { global $cfg_ml, $cfg_memberurl, $cfg_mb_spacesta,$dsql; if (!$cfg_ml->IsLogin()) { - header("Location:{$cfg_memberurl}/login.php?gourl=" . urlencode(GetCurUrl())); + header("Location:{$cfg_memberurl}/login.php?gourl=".urlencode(GetCurUrl())); exit(); } else { if ($cfg_mb_spacesta == '-10') { @@ -189,7 +189,7 @@ function CheckRank($rank = 0, $money = 0) $myname = "普通会员"; $needname = $row['membername']; } else { - $dsql->SetQuery("SELECT membername From `#@__arcrank` WHERE rank='$rank' OR rank='" . $cfg_ml->M_Rank . "' ORDER BY rank DESC"); + $dsql->SetQuery("SELECT membername From `#@__arcrank` WHERE rank='$rank' OR rank='".$cfg_ml->M_Rank."' ORDER BY rank DESC"); $dsql->Execute(); $row = $dsql->GetObject(); $needname = $row->membername; @@ -202,7 +202,7 @@ function CheckRank($rank = 0, $money = 0) ShowMsg("对不起,需要:$needname 才能访问本页面。
    你目前的等级是:$myname 。", "-1", 0, 5000); exit(); } else if ($cfg_ml->M_Money < $money) { - ShowMsg("对不起,需要花费金币:$money 才能访问本页面。
    你目前拥有的金币是:" . $cfg_ml->M_Money . " 。", "-1", 0, 5000); + ShowMsg("对不起,需要花费金币:$money 才能访问本页面。
    你目前拥有的金币是:".$cfg_ml->M_Money." 。", "-1", 0, 5000); exit(); } } @@ -226,9 +226,9 @@ function countArchives($channelid) } else { $_field = 'articles'; } - $row = $dsql->GetOne("SELECT COUNT(*) AS nums FROM #@__archives WHERE channel='$id' AND mid='" . $cfg_ml->M_ID . "'"); + $row = $dsql->GetOne("SELECT COUNT(*) AS nums FROM #@__archives WHERE channel='$id' AND mid='".$cfg_ml->M_ID."'"); - $dsql->ExecuteNoneQuery("UPDATE #@__member_tj SET " . $_field . "='" . $row['nums'] . "' WHERE mid='" . $cfg_ml->M_ID . "'"); + $dsql->ExecuteNoneQuery("UPDATE #@__member_tj SET ".$_field."='".$row['nums']."' WHERE mid='".$cfg_ml->M_ID."'"); } else { return FALSE; } diff --git a/src/member/content_list.php b/src/member/content_list.php index 1df3890f..32be6f58 100755 --- a/src/member/content_list.php +++ b/src/member/content_list.php @@ -9,11 +9,11 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckRank(0, 0); -require_once(DEDEINC . "/typelink.class.php"); -require_once(DEDEINC . "/datalistcp.class.php"); -require_once(DEDEMEMBER . "/inc/inc_list_functions.php"); +require_once(DEDEINC."/typelink.class.php"); +require_once(DEDEINC."/datalistcp.class.php"); +require_once(DEDEMEMBER."/inc/inc_list_functions.php"); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); $cid = isset($cid) && is_numeric($cid) ? $cid : 0; $channelid = isset($channelid) && is_numeric($channelid) ? $channelid : 0; @@ -46,7 +46,7 @@ if ($cid == 0) { $positionname = $row['typename']; } } else { - $positionname = str_replace($cfg_list_symbol, "", $tl->GetPositionName()) . " "; + $positionname = str_replace($cfg_list_symbol, "", $tl->GetPositionName())." "; } $whereSql = " where arc.channel = '$channelid' And arc.mid='$mid' "; if ($keyword != '') { @@ -54,7 +54,7 @@ if ($keyword != '') { $keyword = addslashes($keyword); $whereSql .= " And (arc.title like '%$keyword%') "; } -if ($cid != 0) $whereSql .= " And arc.typeid in (" . GetSonIds($cid) . ")"; +if ($cid != 0) $whereSql .= " And arc.typeid in (".GetSonIds($cid).")"; //增加分类查询 @@ -70,7 +70,7 @@ $classlist = ''; $dsql->SetQuery("SELECT * FROM `#@__mtypes` WHERE `mid` = '$cfg_ml->M_ID';"); $dsql->Execute(); while ($row = $dsql->GetArray()) { - $classlist .= "\r\n"; + $classlist .= "\r\n"; } if ($mtypesid != 0) { $whereSql .= " And arc.mtype = '$mtypesid'"; @@ -87,6 +87,6 @@ $dlist->SetParameter("dopost", "listArchives"); $dlist->SetParameter("keyword", $keyword); $dlist->SetParameter("cid", $cid); $dlist->SetParameter("channelid", $channelid); -$dlist->SetTemplate(DEDEMEMBER . "/templets/content_list.htm"); +$dlist->SetTemplate(DEDEMEMBER."/templets/content_list.htm"); $dlist->SetSource($query); $dlist->Display(); diff --git a/src/member/content_sg_list.php b/src/member/content_sg_list.php index 4494c8c7..a1dfe462 100755 --- a/src/member/content_sg_list.php +++ b/src/member/content_sg_list.php @@ -9,11 +9,11 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckRank(0, 0); -require_once(DEDEINC . "/typelink.class.php"); -require_once(DEDEINC . "/datalistcp.class.php"); -require_once(DEDEMEMBER . "/inc/inc_list_functions.php"); +require_once(DEDEINC."/typelink.class.php"); +require_once(DEDEINC."/datalistcp.class.php"); +require_once(DEDEMEMBER."/inc/inc_list_functions.php"); setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); $cid = isset($cid) && is_numeric($cid) ? $cid : 0; $channelid = isset($channelid) && is_numeric($channelid) ? $channelid : 0; @@ -39,9 +39,9 @@ if ($cInfos['usertype'] != '' && $cInfos['usertype'] != $cfg_ml->M_MbType) { } if ($cid == 0) { - $positionname = $cInfos['typename'] . " >> "; + $positionname = $cInfos['typename']." >> "; } else { - $positionname = str_replace($cfg_list_symbol, " >> ", $tl->GetPositionName()) . " >> "; + $positionname = str_replace($cfg_list_symbol, " >> ", $tl->GetPositionName())." >> "; } $whereSql = " WHERE arc.channel = '$channelid' AND arc.mid='$mid' "; if ($keyword != '') { @@ -50,7 +50,7 @@ if ($keyword != '') { $whereSql .= " AND (arc.title like '%$keyword%') "; } if ($cid != 0) { - $whereSql .= " AND arc.typeid in (" . GetSonIds($cid) . ")"; + $whereSql .= " AND arc.typeid in (".GetSonIds($cid).")"; } if ($arcrank == '1') { $whereSql .= " And arc.arcrank >= 0"; @@ -71,6 +71,6 @@ $dlist->SetParameter("dopost", "listArchives"); $dlist->SetParameter("keyword", $keyword); $dlist->SetParameter("cid", $cid); $dlist->SetParameter("channelid", $channelid); -$dlist->SetTemplate(DEDEMEMBER . "/templets/content_sg_list.htm"); +$dlist->SetTemplate(DEDEMEMBER."/templets/content_sg_list.htm"); $dlist->SetSource($query); $dlist->Display(); diff --git a/src/member/edit_baseinfo.php b/src/member/edit_baseinfo.php index 87a333a2..0f81a729 100755 --- a/src/member/edit_baseinfo.php +++ b/src/member/edit_baseinfo.php @@ -7,13 +7,13 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckRank(0, 0); $menutype = 'config'; if (!isset($dopost)) $dopost = ''; $pwd2 = (empty($pwd2)) ? "" : $pwd2; -$row = $dsql->GetOne("SELECT * FROM `#@__member` WHERE mid='" . $cfg_ml->M_ID . "'"); +$row = $dsql->GetOne("SELECT * FROM `#@__member` WHERE mid='".$cfg_ml->M_ID."'"); $face = $row['face']; if ($dopost == 'save') { $svali = GetCkVdValue(); @@ -88,12 +88,12 @@ if ($dopost == 'save') { exit(); } - $query1 = "UPDATE `#@__member` SET pwd='$pwd',sex='$sex'{$addupquery} where mid='" . $cfg_ml->M_ID . "' "; + $query1 = "UPDATE `#@__member` SET pwd='$pwd',sex='$sex'{$addupquery} where mid='".$cfg_ml->M_ID."' "; $dsql->ExecuteNoneQuery($query1); //如果是管理员,修改其后台密码 if ($cfg_ml->fields['matt'] == 10 && $pwd2 != "") { - $query2 = "UPDATE `#@__admin` SET pwd='$pwd2' where id='" . $cfg_ml->M_ID . "' "; + $query2 = "UPDATE `#@__admin` SET pwd='$pwd2' where id='".$cfg_ml->M_ID."' "; $dsql->ExecuteNoneQuery($query2); } // 清除会员缓存 @@ -101,4 +101,4 @@ if ($dopost == 'save') { ShowMsg('成功更新你的基本资料!', 'edit_baseinfo.php', 0, 5000); exit(); } -include(DEDEMEMBER . "/templets/edit_baseinfo.htm"); +include(DEDEMEMBER."/templets/edit_baseinfo.htm"); diff --git a/src/member/edit_email.php b/src/member/edit_email.php index e4d2ac3a..a2d13d18 100644 --- a/src/member/edit_email.php +++ b/src/member/edit_email.php @@ -7,7 +7,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); $dopost = isset($dopost) ? $dopost : ""; if (!isset($backurl)) { @@ -34,5 +34,5 @@ if ($dopost == 'save') { exit(); } $email = $cfg_ml->fields['email']; -include(DEDEMEMBER . "/templets/edit_email.htm"); +include(DEDEMEMBER."/templets/edit_email.htm"); exit(); diff --git a/src/member/edit_face.php b/src/member/edit_face.php index 9a9c4cf1..946b4bbe 100755 --- a/src/member/edit_face.php +++ b/src/member/edit_face.php @@ -7,7 +7,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckRank(0, 0); $menutype = 'config'; if (!isset($dopost)) { @@ -29,5 +29,5 @@ if ($dopost == 'save') { exit(); } $face = $cfg_ml->fields['face']; -include(DEDEMEMBER . "/templets/edit_face.htm"); +include(DEDEMEMBER."/templets/edit_face.htm"); exit(); diff --git a/src/member/inc/archives_check.php b/src/member/inc/archives_check.php index 62655149..0a6b3cc2 100755 --- a/src/member/inc/archives_check.php +++ b/src/member/inc/archives_check.php @@ -11,8 +11,8 @@ */ if (!defined('DEDEMEMBER')) exit('dedebiz'); -include_once(DEDEINC . '/image.func.php'); -include_once(DEDEINC . '/oxwindow.class.php'); +include_once(DEDEINC.'/image.func.php'); +include_once(DEDEINC.'/oxwindow.class.php'); $svali = GetCkVdValue(); if (strtolower($vdcode) != $svali || $svali == '') { @@ -45,13 +45,13 @@ if ($cInfos['issend'] != 1 || $cInfos['ispart'] != 0 || $cInfos['channeltype'] //检查频道设定的投稿许可权限 if ($cInfos['sendrank'] > $cfg_ml->M_Rank) { - $row = $dsql->GetOne("Select membername From #@__arcrank where rank='" . $cInfos['sendrank'] . "' "); - ShowMsg("对不起,需要[" . $row['membername'] . "]才能在这个频道发布文档!", "-1", "0", 5000); + $row = $dsql->GetOne("Select membername From #@__arcrank where rank='".$cInfos['sendrank']."' "); + ShowMsg("对不起,需要[".$row['membername']."]才能在这个频道发布文档!", "-1", "0", 5000); exit(); } if ($cInfos['usertype'] != '' && $cInfos['usertype'] != $cfg_ml->M_MbType) { - ShowMsg("对不起,需要[" . $cInfos['usertype'] . "]才能在这个频道发布文档!", "-1", "0", 5000); + ShowMsg("对不起,需要[".$cInfos['usertype']."]才能在这个频道发布文档!", "-1", "0", 5000); exit(); } diff --git a/src/member/inc/archives_check_edit.php b/src/member/inc/archives_check_edit.php index 66a9281a..b7938741 100755 --- a/src/member/inc/archives_check_edit.php +++ b/src/member/inc/archives_check_edit.php @@ -11,8 +11,8 @@ */ if (!defined('DEDEMEMBER')) exit('dedebiz'); -require_once(DEDEINC . "/image.func.php"); -require_once(DEDEINC . "/oxwindow.class.php"); +require_once(DEDEINC."/image.func.php"); +require_once(DEDEINC."/oxwindow.class.php"); $flag = ''; $typeid = isset($typeid) && is_numeric($typeid) ? $typeid : 0; diff --git a/src/member/inc/config_pay_alipay.php b/src/member/inc/config_pay_alipay.php index 042c345f..5e8f3e59 100755 --- a/src/member/inc/config_pay_alipay.php +++ b/src/member/inc/config_pay_alipay.php @@ -9,8 +9,8 @@ if (!defined('DEDEMEMBER')) exit("Request Error!"); * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(DEDEMEMBER . "/paycenter/alipay/alipay_config.php"); -require_once(DEDEMEMBER . "/paycenter/alipay/alipay_service.php"); +require_once(DEDEMEMBER."/paycenter/alipay/alipay_config.php"); +require_once(DEDEMEMBER."/paycenter/alipay/alipay_service.php"); if ($payment_exp[2] < 0) $payment_exp[2] = 0; $piice_ex = $price * $payment_exp[2]; $parameter = array( @@ -40,7 +40,7 @@ echo ' 转到支付宝支付页面 -
    +
    '; diff --git a/src/member/inc/config_pay_tenpay.php b/src/member/inc/config_pay_tenpay.php index 2374d7c6..80e863c7 100755 --- a/src/member/inc/config_pay_tenpay.php +++ b/src/member/inc/config_pay_tenpay.php @@ -43,7 +43,7 @@ $strSpBillNo = $buyid;; 交易单号(28位): 商户号(10位) + 日期(8位) + 流水号(10位), 必须按此格式生成, 且不能重复 如果sp_billno超过10位, 则截取其中的流水号部分加到transaction_id后部(不足10位左补0) 如果sp_billno不足10位, 则左补0, 加到transaction_id后部*/ -$strTransactionId = $strSpid . $strBillDate . time(); +$strTransactionId = $strSpid.$strBillDate.time(); /*货币类型: 1 – RMB(人民币) 2 - USD(美元) 3 - HKD(港币)*/ $strFeeType = "1"; /*财付通回调页面地址, 推荐使用ip地址的方式(最长255个字符)*/ @@ -51,19 +51,19 @@ $strRetUrl = $cfg_basehost."/member/paycenter/tenpay/notify_handler.php"; /*商户私有数据, 请求回调页面时原样返回*/ $strAttach = "my_magic_string"; /*生成MD5签名*/ -$strSignText = "cmdno=" . $strCmdNo . "&date=" . $strBillDate . "&bargainor_id=" . $strSaler . - "&transaction_id=" . $strTransactionId . "&sp_billno=" . $strSpBillNo . - "&total_fee=" . $strTotalFee . "&fee_type=" . $strFeeType . "&return_url=" . $strRetUrl . - "&attach=" . $strAttach . "&key=" . $strSpkey; +$strSignText = "cmdno=".$strCmdNo."&date=".$strBillDate."&bargainor_id=".$strSaler . + "&transaction_id=".$strTransactionId."&sp_billno=".$strSpBillNo. + "&total_fee=".$strTotalFee."&fee_type=".$strFeeType."&return_url=".$strRetUrl . + "&attach=".$strAttach."&key=".$strSpkey; $strSign = strtoupper(md5($strSignText)); /*请求支付串*/ -$strRequest = "cmdno=" . $strCmdNo . "&date=" . $strBillDate . "&bargainor_id=" . $strSaler . -"&transaction_id=" . $strTransactionId . "&sp_billno=" . $strSpBillNo . -"&total_fee=" . $strTotalFee . "&fee_type=" . $strFeeType . "&return_url=" . $strRetUrl . -"&attach=" . $strAttach . "&bank_type=" . $strBankType . "&desc=" . $strDesc . -"&purchaser_id=" . $strBuyerId . -"&sign=" . $strSign ; +$strRequest = "cmdno=".$strCmdNo."&date=".$strBillDate."&bargainor_id=".$strSaler. +"&transaction_id=".$strTransactionId."&sp_billno=".$strSpBillNo. +"&total_fee=".$strTotalFee."&fee_type=".$strFeeType."&return_url=".$strRetUrl. +"&attach=".$strAttach."&bank_type=".$strBankType."&desc=".$strDesc. +"&purchaser_id=".$strBuyerId. +"&sign=".$strSign ; $strRequestUrl = "https://www.tenpay.com/cgi-bin/v1.0/pay_gate.cgi?".$strRequest; diff --git a/src/member/inc/config_space.php b/src/member/inc/config_space.php index d191d951..931a7061 100755 --- a/src/member/inc/config_space.php +++ b/src/member/inc/config_space.php @@ -63,13 +63,13 @@ if ($_vars['spacestyle'] == '') { } } //找不到指定样式文件夹的时候使用person为默认 -if (!is_dir(DEDEMEMBER . '/space/' . $_vars['spacestyle'])) { +if (!is_dir(DEDEMEMBER.'/space/'.$_vars['spacestyle'])) { $_vars['spacestyle'] = 'person'; } //获取分类数据 $mtypearr = array(); -$dsql->Execute('mty', "select * from `#@__mtypes` where mid='" . $_vars['mid'] . "'"); +$dsql->Execute('mty', "select * from `#@__mtypes` where mid='".$_vars['mid']."'"); while ($row = $dsql->GetArray('mty')) { $mtypearr[] = $row; } @@ -87,8 +87,8 @@ while ($row = $dsql->GetArray('ctc')) { //获取企业用户私有数据 if ($_vars['mtype'] == '企业') { - require_once(DEDEINC . '/enums.func.php'); - $query = "SELECT * FROM `#@__member_company` WHERE mid='" . $_vars['mid'] . "'"; + require_once(DEDEINC.'/enums.func.php'); + $query = "SELECT * FROM `#@__member_company` WHERE mid='".$_vars['mid']."'"; $company = $db->GetOne($query); $company['vocation'] = GetEnumsValue('vocation', $company['vocation']); $company['cosize'] = GetEnumsValue('cosize', $company['cosize']); @@ -96,7 +96,7 @@ if ($_vars['mtype'] == '企业') { $provinceid = $tmpplace['top']; $provincename = (isset($em_nativeplaces[$provinceid]) ? $em_nativeplaces[$provinceid] : ''); $cityname = (isset($em_nativeplaces[$tmpplace['son']]) ? $em_nativeplaces[$tmpplace['son']] : ''); - $company['place'] = $provincename . ' - ' . $cityname; + $company['place'] = $provincename.' - '.$cityname; $_vars = array_merge($company, $_vars); if ($action == 'infos') $action = 'introduce'; $_vars['comface'] = empty($_vars['comface']) ? 'images/comface.png' : $_vars['comface']; @@ -129,7 +129,7 @@ function GetUserSpaceInfos() $_vars['face'] = ($_vars['sex'] == '女') ? 'templets/images/dfgirl.png' : 'templets/images/dfboy.png'; } $_vars['userid_e'] = urlencode($_vars['userid']); - $_vars['userurl'] = $cfg_memberurl . "/index.php?uid=" . $_vars['userid_e']; + $_vars['userurl'] = $cfg_memberurl."/index.php?uid=".$_vars['userid_e']; if ($_vars['membername'] == '开放浏览') $_vars['membername'] = '限制会员'; return $_vars; } diff --git a/src/member/inc/inc_archives_functions.php b/src/member/inc/inc_archives_functions.php index 6db4108f..30e9e96c 100755 --- a/src/member/inc/inc_archives_functions.php +++ b/src/member/inc/inc_archives_functions.php @@ -10,9 +10,9 @@ * @link https://www.dedebiz.com */ if (!defined('DEDEMEMBER')) exit('dedebiz'); -require_once(DEDEINC . '/image.func.php'); -require_once(DEDEINC . '/archives.func.php'); -require_once(DEDEINC . "/userlogin.class.php"); +require_once(DEDEINC.'/image.func.php'); +require_once(DEDEINC.'/archives.func.php'); +require_once(DEDEINC."/userlogin.class.php"); //检查用户是否被禁言 CheckNotAllow(); @@ -28,25 +28,25 @@ CheckNotAllow(); function GetCurContentAlbum($body, $rfurl, &$firstdd) { global $cfg_multi_site, $cfg_basehost, $ddmaxwidth, $cfg_basedir, $pagestyle, $cfg_mb_rmdown, $title, $cfg_ml, $cfg_user_dir; - include_once(DEDEINC . "/dedecollection.func.php"); + include_once(DEDEINC."/dedecollection.func.php"); if (empty($ddmaxwidth)) $ddmaxwidth = 240; $rsimg = ''; - $basehost = "http://" . $_SERVER["HTTP_HOST"]; + $basehost = "http://".$_SERVER["HTTP_HOST"]; $img_array = array(); preg_match_all("/(src)=[\"|'| ]{0,}(http:\/\/([^>]*)\.(gif|jpg|png))/isU", $body, $img_array); $img_array = array_unique($img_array[2]); - $imgUrl = $cfg_user_dir . "/" . $cfg_ml->M_ID; - $imgPath = $cfg_basedir . $imgUrl; - if (!is_dir($imgPath . "/")) { + $imgUrl = $cfg_user_dir."/".$cfg_ml->M_ID; + $imgPath = $cfg_basedir.$imgUrl; + if (!is_dir($imgPath."/")) { MkdirAll($imgPath, $GLOBALS['cfg_dir_purview']); CloseFtp(); } $milliSecond = MyDate("ymdHis", time()); foreach ($img_array as $key => $value) { - if (preg_match("#" . $basehost . "#i", $value)) { + if (preg_match("#".$basehost."#i", $value)) { continue; } - if ($cfg_basehost != $basehost && preg_match("#" . $cfg_basehost . "#i", $value)) { + if ($cfg_basehost != $basehost && preg_match("#".$cfg_basehost."#i", $value)) { continue; } if (!preg_match("#^http[s]?:\/\/#i", $value)) { @@ -56,8 +56,8 @@ function GetCurContentAlbum($body, $rfurl, &$firstdd) $value = trim($value); $itype = substr($value, -4, 4); if (!preg_match("#\.(gif|jpg|png)#i", $itype)) $itype = ".jpg"; - $rndFileName = $imgPath . "/" . $milliSecond . $key . $itype; - $iurl = $imgUrl . "/" . $milliSecond . $key . $itype; + $rndFileName = $imgPath."/".$milliSecond.$key.$itype; + $iurl = $imgUrl."/".$milliSecond.$key.$itype; //下载并保存文件 //$rs = $htd->SaveToBin($rndFileName); @@ -71,13 +71,13 @@ function GetCurContentAlbum($body, $rfurl, &$firstdd) } if (empty($firstdd)) { $firstdd = $litpicname; - if (!file_exists($cfg_basedir . $firstdd)) $firstdd = $iurl; + if (!file_exists($cfg_basedir.$firstdd)) $firstdd = $iurl; } @WaterImg($rndFileName, 'down'); $info = ''; $imginfos = GetImageSize($rndFileName, $info); SaveUploadInfo($title, $iurl, 1, $imginfos); - $rsimg .= "{dede:img ddimg='$litpicname' text='' width='" . $imginfos[0] . "' height='" . $imginfos[1] . "'} $iurl {/dede:img}\r\n"; + $rsimg .= "{dede:img ddimg='$litpicname' text='' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; } } else { $rsimg .= "{dede:img ddimg='$value' text='' width='0' height='0'} $value {/dede:img}\r\n"; @@ -100,10 +100,10 @@ function GetImageMapDD($filename, $ddm, $oldname = '') $ddpicok = $oldname; } else { $ddn = substr($filename, -3); - $ddpicok = preg_replace("#\." . $ddn . "$#", "-lp." . $ddn, $filename); + $ddpicok = preg_replace("#\.".$ddn."$#", "-lp.".$ddn, $filename); } - $toFile = $GLOBALS['cfg_basedir'] . $ddpicok; - ImageResize($GLOBALS['cfg_basedir'] . $filename, $ddm, 300, $toFile); + $toFile = $GLOBALS['cfg_basedir'].$ddpicok; + ImageResize($GLOBALS['cfg_basedir'].$filename, $ddm, 300, $toFile); return $ddpicok; } @@ -127,10 +127,10 @@ function SaveUploadInfo($title, $filename, $medaitype = 1, $addinfos = '') } if ($medaitype == 1) { $info = ''; - $addinfos = GetImageSize($cfg_basedir . $filename, $info); + $addinfos = GetImageSize($cfg_basedir.$filename, $info); } - $addinfos[2] = @filesize($cfg_basedir . $filename); - $row = $dsql->GetOne("SELECT aid,title,url FROM `#@__uploads` WHERE url LIKE '$filename' AND mid='" . $cfg_ml->M_ID . "'; "); + $addinfos[2] = @filesize($cfg_basedir.$filename); + $row = $dsql->GetOne("SELECT aid,title,url FROM `#@__uploads` WHERE url LIKE '$filename' AND mid='".$cfg_ml->M_ID."'; "); $uptime = time(); if (is_array($row)) { $query = "UPDATE `#@__uploads` SET title='$title',mediatype='$medaitype', @@ -139,7 +139,7 @@ function SaveUploadInfo($title, $filename, $medaitype = 1, $addinfos = '') $dsql->ExecuteNoneQuery($query); } else { $inquery = "INSERT INTO `#@__uploads`(title,url,mediatype,width,height,playtime,filesize,uptime,mid) - VALUES ('$title','$filename','$medaitype','" . $addinfos[0] . "','" . $addinfos[1] . "','0','" . $addinfos[2] . "','$uptime','" . $cfg_ml->M_ID . "'); "; + VALUES ('$title','$filename','$medaitype','".$addinfos[0]."','".$addinfos[1]."','0','".$addinfos[2]."','$uptime','".$cfg_ml->M_ID."'); "; $dsql->ExecuteNoneQuery($inquery); } $fid = $dsql->GetLastID(); @@ -204,15 +204,15 @@ function PrintAutoFieldsAdd(&$fieldset, $loadtype = 'all', $isprint = TRUE) if (is_array($dtp->CTags)) { foreach ($dtp->CTags as $tid => $ctag) { if ($loadtype != 'autofield' || $ctag->GetAtt('autofield') == 1) { - $dede_addonfields .= ($dede_addonfields == "" ? $ctag->GetName() . "," . $ctag->GetAtt('type') : ";" . $ctag->GetName() . "," . $ctag->GetAtt('type')); - $addonfieldsname .= "," . $ctag->GetName(); + $dede_addonfields .= ($dede_addonfields == "" ? $ctag->GetName().",".$ctag->GetAtt('type') : ";".$ctag->GetName().",".$ctag->GetAtt('type')); + $addonfieldsname .= ",".$ctag->GetName(); if ($isprint) echo GetFormItemA($ctag); } } } - echo ""; - echo ""; + echo ""; + echo ""; // 增加一个返回 return $addonfieldsname; } @@ -237,13 +237,13 @@ function PrintAutoFieldsEdit(&$fieldset, &$fieldValues, $loadtype = 'all') $loadtype != 'autofield' || ($loadtype == 'autofield' && $ctag->GetAtt('autofield') == 1) ) { - $dede_addonfields .= ($dede_addonfields == '' ? $ctag->GetName() . "," . $ctag->GetAtt('type') : ";" . $ctag->GetName() . "," . $ctag->GetAtt('type')); + $dede_addonfields .= ($dede_addonfields == '' ? $ctag->GetName().",".$ctag->GetAtt('type') : ";".$ctag->GetName().",".$ctag->GetAtt('type')); echo GetFormItemValueA($ctag, $fieldValues[$ctag->GetName()]); } } } - echo ""; - echo ""; + echo ""; + echo ""; } /** @@ -255,7 +255,7 @@ function PrintAutoFieldsEdit(&$fieldset, &$fieldValues, $loadtype = 'all') */ function MakeArt($aid, $ismakesign = FALSE) { - include_once(DEDEINC . '/arc.archives.class.php'); + include_once(DEDEINC.'/arc.archives.class.php'); if ($ismakesign) { $envs['makesign'] = 'yes'; } @@ -316,24 +316,24 @@ function AnalyseHtmlBody($body, &$description, $dtype = '') function GetCurContent(&$body) { global $cfg_multi_site, $cfg_basehost, $cfg_basedir, $cfg_user_dir, $title, $cfg_ml; - include_once(DEDEINC . "/dedecollection.func.php"); + include_once(DEDEINC."/dedecollection.func.php"); $htd = new DedeHttpDown(); - $basehost = "http://" . $_SERVER["HTTP_HOST"]; + $basehost = "http://".$_SERVER["HTTP_HOST"]; $img_array = array(); preg_match_all("/(src|SRC)=[\"|'| ]{0,}(http[s]?:\/\/([^>]*)\.(gif|jpg|png))/isU", $body, $img_array); $img_array = array_unique($img_array[2]); - $imgUrl = $cfg_user_dir . "/" . $cfg_ml->M_ID; - $imgPath = $cfg_basedir . $imgUrl; - if (!is_dir($imgPath . "/")) { + $imgUrl = $cfg_user_dir."/".$cfg_ml->M_ID; + $imgPath = $cfg_basedir.$imgUrl; + if (!is_dir($imgPath."/")) { MkdirAll($imgPath, $GLOBALS['cfg_dir_purview']); CloseFtp(); } $milliSecond = MyDate("ymdHis", time()); foreach ($img_array as $key => $value) { - if (preg_match("#" . $basehost . "#i", $value)) { + if (preg_match("#".$basehost."#i", $value)) { continue; } - if ($cfg_basehost != $basehost && preg_match("#" . $cfg_basehost . "#i", $value)) { + if ($cfg_basehost != $basehost && preg_match("#".$cfg_basehost."#i", $value)) { continue; } if (!preg_match("#^http:\/\/#i", $value)) { @@ -351,10 +351,10 @@ function GetCurContent(&$body) $itype = '.jpg'; } } - $milliSecondN = dd2char($milliSecond . '-' . mt_rand(1000, 8000)); + $milliSecondN = dd2char($milliSecond.'-'.mt_rand(1000, 8000)); $value = trim($value); - $rndFileName = $imgPath . "/" . $milliSecondN . '-' . $key . $itype; - $fileurl = $imgUrl . "/" . $milliSecondN . '-' . $key . $itype; + $rndFileName = $imgPath."/".$milliSecondN.'-'.$key.$itype; + $fileurl = $imgUrl."/".$milliSecondN.'-'.$key.$itype; $rs = $htd->SaveToBin($rndFileName); if ($rs) { $body = str_replace($value, $fileurl, $body); diff --git a/src/member/inc/inc_batchup.php b/src/member/inc/inc_batchup.php index 1a899df1..e96278c2 100755 --- a/src/member/inc/inc_batchup.php +++ b/src/member/inc/inc_batchup.php @@ -8,7 +8,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(DEDEINC . "/channelunit.func.php"); +require_once(DEDEINC."/channelunit.func.php"); /** * 删除文档 @@ -60,15 +60,15 @@ function DelArc($aid) break; } if ($nid != "") { - $row = $dsql->GetOne("SELECT $nid FROM " . $arcRow['addtable'] . " WHERE aid = '$aid'"); + $row = $dsql->GetOne("SELECT $nid FROM ".$arcRow['addtable']." WHERE aid = '$aid'"); $licp = $dsql->GetOne("SELECT litpic FROM `#@__archives` WHERE id = '$aid'"); if ($licp['litpic'] != "") { - $litpic = DEDEROOT . $licp['litpic']; + $litpic = DEDEROOT.$licp['litpic']; if (file_exists($litpic) && !is_dir($litpic)) { @unlink($litpic); } } - $tmpname = '/(\\' . $cfg_medias_dir . '.+?)(\"| )/'; + $tmpname = '/(\\'.$cfg_medias_dir.'.+?)(\"| )/'; //取出文章附件; preg_match_all("$tmpname", $row["$nid"], $delname); @@ -77,12 +77,12 @@ function DelArc($aid) $delname = array_unique($delname['1']); foreach ($delname as $var) { $dsql->ExecuteNoneQuery("DELETE FROM `#@__uploads` WHERE url='$var' AND mid = '$cfg_ml->M_ID'"); - $upname = DEDEROOT . $var; + $upname = DEDEROOT.$var; if (file_exists($upname) && !is_dir($upname)) @unlink($upname); } } } - $dsql->ExecuteNoneQuery("DELETE FROM `" . $arcRow['addtable'] . "` where aid='$aid' "); + $dsql->ExecuteNoneQuery("DELETE FROM `".$arcRow['addtable']."` where aid='$aid' "); } $dsql->ExecuteNoneQuery(" DELETE FROM `#@__archives` where id='$aid' "); $dsql->ExecuteNoneQuery("DELETE FROM `#@__feedback` where aid='$aid'"); @@ -106,14 +106,14 @@ function DelArc($aid) $arcRow['filename'] ); if (!preg_match("#\?#", $arcurl)) { - $htmlfile = GetTruePath() . str_replace($GLOBALS['cfg_basehost'], '', $arcurl); + $htmlfile = GetTruePath().str_replace($GLOBALS['cfg_basehost'], '', $arcurl); if (file_exists($htmlfile) && !is_dir($htmlfile)) { @unlink($htmlfile); $arcurls = explode(".", $htmlfile); $sname = $arcurls[count($arcurls) - 1]; $fname = preg_replace("#(\.$sname)$#", "", $htmlfile); for ($i = 2; $i <= 100; $i++) { - $htmlfile = $fname . "_$i" . "." . $sname; + $htmlfile = $fname."_$i".".".$sname; if (file_exists($htmlfile) && !is_dir($htmlfile)) @unlink($htmlfile); else break; } @@ -121,7 +121,7 @@ function DelArc($aid) } //删除文本文件 - $filenameh = DEDEDATA . "/textdata/" . (ceil($aid / 5000)) . "/{$aid}-" . substr(md5($cfg_cookie_encode), 0, 16) . ".txt"; + $filenameh = DEDEDATA."/textdata/".(ceil($aid / 5000))."/{$aid}-".substr(md5($cfg_cookie_encode), 0, 16).".txt"; if (is_file($filename)) @unlink($filename); return TRUE; } @@ -156,7 +156,7 @@ function DelArcSg($aid) //删除数据库的内容 $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` where id='$aid' "); - $dsql->ExecuteNoneQuery("DELETE FROM `" . $arcRow['addtable'] . "` where aid='$aid' "); + $dsql->ExecuteNoneQuery("DELETE FROM `".$arcRow['addtable']."` where aid='$aid' "); $dsql->ExecuteNoneQuery("DELETE FROM `#@__feedback` where aid='$aid'"); $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_stow` where aid='$aid'"); $dsql->ExecuteNoneQuery("DELETE FROM `#@__taglist ` where aid='$aid'"); @@ -178,21 +178,21 @@ function DelArcSg($aid) '' ); if (!preg_match("#\?#", $arcurl)) { - $htmlfile = GetTruePath() . str_replace($GLOBALS['cfg_basehost'], '', $arcurl); + $htmlfile = GetTruePath().str_replace($GLOBALS['cfg_basehost'], '', $arcurl); if (file_exists($htmlfile) && !is_dir($htmlfile)) { @unlink($htmlfile); $arcurls = explode(".", $htmlfile); $sname = $arcurls[count($arcurls) - 1]; $fname = preg_replace("#(\.$sname)$#", "", $htmlfile); for ($i = 2; $i <= 100; $i++) { - $htmlfile = $fname . "_$i" . "." . $sname; + $htmlfile = $fname."_$i".".".$sname; if (file_exists($htmlfile) && !is_dir($htmlfile)) @unlink($htmlfile); else break; } } } //删除文本文件 - $filenameh = DEDEDATA . "/textdata/" . (ceil($aid / 5000)) . "/{$aid}-" . substr(md5($cfg_cookie_encode), 0, 16) . ".txt"; + $filenameh = DEDEDATA."/textdata/".(ceil($aid / 5000))."/{$aid}-".substr(md5($cfg_cookie_encode), 0, 16).".txt"; return TRUE; } diff --git a/src/member/inc/inc_catalog_options.php b/src/member/inc/inc_catalog_options.php index dfd16228..eb00a3c2 100755 --- a/src/member/inc/inc_catalog_options.php +++ b/src/member/inc/inc_catalog_options.php @@ -38,9 +38,9 @@ function GetOptionList($selid = 0, $channeltype = 0) } if ($row->channeltype == $channeltype && $row->issend == 1) { if ($row->ispart == 0) { - $OptionArrayList .= "\r\n"; + $OptionArrayList .= "\r\n"; } else if ($row->ispart == 1) { - $OptionArrayList .= "\r\n"; + $OptionArrayList .= "\r\n"; } } $selected = ''; @@ -63,7 +63,7 @@ function LogicGetOptionArray($id, $step, $channeltype, $selid = 0) { global $OptionArrayList, $channels, $dsql; $selected = ''; - $dsql->SetQuery("Select id,typename,ispart,channeltype,issend From `#@__arctype` where reid='" . $id . "' And ispart<2 order by sortrank asc"); + $dsql->SetQuery("Select id,typename,ispart,channeltype,issend From `#@__arctype` where reid='".$id."' And ispart<2 order by sortrank asc"); $dsql->Execute($id); while ($row = $dsql->GetObject($id)) { if ($selid == $row->id) { @@ -71,13 +71,13 @@ function LogicGetOptionArray($id, $step, $channeltype, $selid = 0) } if ($row->channeltype == $channeltype && $row->issend == 1) { if ($row->ispart == 0) { - $OptionArrayList .= "\r\n"; + $OptionArrayList .= "\r\n"; } else if ($row->ispart == 1) { - $OptionArrayList .= "\r\n"; + $OptionArrayList .= "\r\n"; } } $selected = ''; - LogicGetOptionArray($row->id, $step . "─", $channeltype, $selid); + LogicGetOptionArray($row->id, $step."─", $channeltype, $selid); } } @@ -102,7 +102,7 @@ function classification($mid, $mtypeid = 0, $channelid = 1) $selected = " selected"; } } - $list .= "\r\n"; + $list .= "\r\n"; $selected = ''; } return $list; diff --git a/src/member/inc/inc_pwd_functions.php b/src/member/inc/inc_pwd_functions.php index 98bdeb2f..392abf68 100755 --- a/src/member/inc/inc_pwd_functions.php +++ b/src/member/inc/inc_pwd_functions.php @@ -20,7 +20,7 @@ function random($length, $numeric = 0) { PHP_VERSION < '4.2.0' && mt_srand((float)microtime() * 1000000); if ($numeric) { - $hash = sprintf('%0' . $length . 'd', mt_rand(0, pow(10, $length) - 1)); + $hash = sprintf('%0'.$length.'d', mt_rand(0, pow(10, $length) - 1)); } else { $hash = ''; $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz'; @@ -54,7 +54,7 @@ function sendmail($email, $mailtitle, $mailbody, $headers) } else { if ($cfg_sendmail_bysmtp == 'Y') { $mailtype = 'TXT'; - require_once(DEDEINC . '/mail.class.php'); + require_once(DEDEINC.'/mail.class.php'); $smtp = new smtp($cfg_smtp_server, $cfg_smtp_port, true, $cfg_smtp_usermail, $cfg_smtp_password); $smtp->debug = false; $smtp->sendmail($email, $cfg_webname, $cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype); @@ -79,10 +79,10 @@ function newmail($mid, $userid, $mailto, $type, $send) global $db, $cfg_adminemail, $cfg_webname, $cfg_basehost, $cfg_memberurl; $mailtime = time(); $randval = random(8); - $mailtitle = $cfg_webname . ":密码修改"; + $mailtitle = $cfg_webname.":密码修改"; $mailto = $mailto; - $headers = "From: " . $cfg_adminemail . "\r\nReply-To: $cfg_adminemail"; - $mailbody = "亲爱的" . $userid . ":\r\n您好!感谢您使用" . $cfg_webname . "网。\r\n" . $cfg_webname . "应您的要求,重新设置密码:(注:如果您没有提出申请,请检查您的信息是否泄漏。)\r\n本次临时登录密码为:" . $randval . " 请于三天内登录下面网址确认修改。\r\n" . $cfg_basehost . $cfg_memberurl . "/resetpassword.php?dopost=getpasswd&id=" . $mid; + $headers = "From: ".$cfg_adminemail."\r\nReply-To: $cfg_adminemail"; + $mailbody = "亲爱的".$userid.":\r\n您好!感谢您使用".$cfg_webname."网。\r\n".$cfg_webname."应您的要求,重新设置密码:(注:如果您没有提出申请,请检查您的信息是否泄漏。)\r\n本次临时登录密码为:".$randval." 请于三天内登录下面网址确认修改。\r\n".$cfg_basehost.$cfg_memberurl."/resetpassword.php?dopost=getpasswd&id=".$mid; if ($type == 'INSERT') { $key = md5($randval); $sql = "INSERT INTO `#@__pwd_tmp` (`mid` ,`membername` ,`pwd` ,`mailtime`)VALUES ('$mid', '$userid', '$key', '$mailtime');"; @@ -91,7 +91,7 @@ function newmail($mid, $userid, $mailto, $type, $send) sendmail($mailto, $mailtitle, $mailbody, $headers); return ShowMsg('EMAIL修改验证码已经发送到原来的邮箱请查收', 'login.php', '', '5000'); } else if ($send == 'N') { - return ShowMsg('稍后跳转到修改页', $cfg_basehost . $cfg_memberurl . "/resetpassword.php?dopost=getpasswd&id=" . $mid . "&key=" . $randval); + return ShowMsg('稍后跳转到修改页', $cfg_basehost.$cfg_memberurl."/resetpassword.php?dopost=getpasswd&id=".$mid."&key=".$randval); } } else { return ShowMsg('对不起修改失败,请联系管理员', 'login.php'); @@ -104,7 +104,7 @@ function newmail($mid, $userid, $mailto, $type, $send) sendmail($mailto, $mailtitle, $mailbody, $headers); ShowMsg('EMAIL修改验证码已经发送到原来的邮箱请查收', 'login.php'); } elseif ($send == 'N') { - return ShowMsg('稍后跳转到修改页', $cfg_basehost . $cfg_memberurl . "/resetpassword.php?dopost=getpasswd&id=" . $mid . "&key=" . $randval); + return ShowMsg('稍后跳转到修改页', $cfg_basehost.$cfg_memberurl."/resetpassword.php?dopost=getpasswd&id=".$mid."&key=".$randval); } } else { ShowMsg('对不起修改失败,请与管理员联系', 'login.php'); diff --git a/src/member/index.php b/src/member/index.php index beab09a6..75aece12 100755 --- a/src/member/index.php +++ b/src/member/index.php @@ -7,7 +7,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); $uid = empty($uid) ? "" : RemoveXSS($uid); if (empty($action)) $action = ''; @@ -19,9 +19,9 @@ $menutype = 'mydede'; if ($uid == '') { $iscontrol = 'yes'; if (!$cfg_ml->IsLogin()) { - include_once(dirname(__FILE__) . "/templets/index-notlogin.htm"); + include_once(dirname(__FILE__)."/templets/index-notlogin.htm"); } else { - $minfos = $dsql->GetOne("SELECT * FROM `#@__member_tj` WHERE mid='" . $cfg_ml->M_ID . "'; "); + $minfos = $dsql->GetOne("SELECT * FROM `#@__member_tj` WHERE mid='".$cfg_ml->M_ID."'; "); $minfos['totaluse'] = $cfg_ml->GetUserSpace(); $minfos['totaluse'] = number_format($minfos['totaluse'] / 1024 / 1024, 2); if ($cfg_mb_max > 0) { @@ -30,7 +30,7 @@ if ($uid == '') { $ddsize = 0; } - require_once(DEDEINC . '/channelunit.func.php'); + require_once(DEDEINC.'/channelunit.func.php'); /* 最新文档8条 */ $archives = array(); @@ -65,7 +65,7 @@ if ($uid == '') { $pms = $dsql->GetOne("SELECT COUNT(*) AS nums FROM `#@__member_pms` WHERE toid='{$cfg_ml->M_ID}' AND `hasview`=0 AND folder = 'inbox'"); $dpl = new DedeTemplate(); - $tpl = dirname(__FILE__) . "/templets/index.htm"; + $tpl = dirname(__FILE__)."/templets/index.htm"; $dpl->LoadTemplate($tpl); $dpl->display(); } diff --git a/src/member/index_do.php b/src/member/index_do.php index 6d59e9cd..d3712190 100755 --- a/src/member/index_do.php +++ b/src/member/index_do.php @@ -7,7 +7,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); if (empty($dopost)) $dopost = ''; if (empty($fmdo)) $fmdo = ''; @@ -23,10 +23,10 @@ if ($fmdo == 'sendMail') { ShowMsg('你的帐号不在邮件验证状态,本操作无效!', '-1'); exit(); } - $userhash = md5($cfg_cookie_encode . '--' . $cfg_ml->fields['mid'] . '--' . $cfg_ml->fields['email']); - $url = $cfg_basehost . (empty($cfg_cmspath) ? '/' : $cfg_cmspath) . "/member/index_do.php?fmdo=checkMail&mid={$cfg_ml->fields['mid']}&userhash={$userhash}&do=1"; + $userhash = md5($cfg_cookie_encode.'--'.$cfg_ml->fields['mid'].'--'.$cfg_ml->fields['email']); + $url = $cfg_basehost.(empty($cfg_cmspath) ? '/' : $cfg_cmspath)."/member/index_do.php?fmdo=checkMail&mid={$cfg_ml->fields['mid']}&userhash={$userhash}&do=1"; $url = preg_replace("#http:\/\/#i", '', $url); - $url = 'http://' . preg_replace("#\/\/#i", '/', $url); + $url = 'http://'.preg_replace("#\/\/#i", '/', $url); $mailtitle = "{$cfg_webname}--会员邮件验证通知"; $mailbody = ''; $mailbody .= "尊敬的用户[{$cfg_ml->fields['uname']}],您好:\r\n"; @@ -35,7 +35,7 @@ if ($fmdo == 'sendMail') { $mailbody .= "{$url}\r\n\r\n"; $mailbody .= "Power by https://www.dedebiz.com DedeBIZ内容管理系统\r\n"; - $headers = "From: " . $cfg_adminemail . "\r\nReply-To: " . $cfg_adminemail; + $headers = "From: ".$cfg_adminemail."\r\nReply-To: ".$cfg_adminemail; if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { $client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); @@ -46,7 +46,7 @@ if ($fmdo == 'sendMail') { } else { if ($cfg_sendmail_bysmtp == 'Y' && !empty($cfg_smtp_server)) { $mailtype = 'TXT'; - require_once(DEDEINC . '/mail.class.php'); + require_once(DEDEINC.'/mail.class.php'); $smtp = new smtp($cfg_smtp_server, $cfg_smtp_port, true, $cfg_smtp_usermail, $cfg_smtp_password); $smtp->debug = false; $smtp->sendmail($cfg_ml->fields['email'], $cfg_webname, $cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype); @@ -64,7 +64,7 @@ if ($fmdo == 'sendMail') { exit(); } $row = $dsql->GetOne("SELECT * FROM `#@__member` WHERE mid='{$mid}' "); - $needUserhash = md5($cfg_cookie_encode . '--' . $mid . '--' . $row['email']); + $needUserhash = md5($cfg_cookie_encode.'--'.$mid.'--'.$row['email']); if ($needUserhash != $userhash) { ShowMsg('你的效验串不合法!', '-1'); exit(); @@ -133,7 +133,7 @@ else if ($fmdo == 'user') { //引入注册页面 else if ($dopost == "regnew") { $step = empty($step) ? 1 : intval(preg_replace("/[^\d]/", '', $step)); - require_once(dirname(__FILE__) . "/reg_new.php"); + require_once(dirname(__FILE__)."/reg_new.php"); exit(); } /*************************** @@ -165,7 +165,7 @@ else if ($fmdo == 'user') { VALUES ('ScoresToMoney', '积分换金币操作', 'stc' , '0' , '$mtime' , '0' , '{$cfg_ml->M_ID}' , '0' , '用 {$needscores} 积分兑了换金币:{$money} 个'); "; $dsql->ExecuteNoneQuery($inquery); //修改积分与金币值 - $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET `scores`=$litmitscores, money= money + $money WHERE mid='" . $cfg_ml->M_ID . "' "); + $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET `scores`=$litmitscores, money= money + $money WHERE mid='".$cfg_ml->M_ID."' "); // 清除会员缓存 $cfg_ml->DelCache($cfg_ml->M_ID); diff --git a/src/member/login.php b/src/member/login.php index 70ba265f..54e54156 100755 --- a/src/member/login.php +++ b/src/member/login.php @@ -7,10 +7,10 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); $gourl = RemoveXSS($gourl); if ($cfg_ml->IsLogin()) { ShowMsg('你已经登录系统,无需重新注册!', 'index.php'); exit(); } -require_once(dirname(__FILE__) . "/templets/login.htm"); +require_once(dirname(__FILE__)."/templets/login.htm"); diff --git a/src/member/mypay.php b/src/member/mypay.php index 1c233140..304a1f43 100755 --- a/src/member/mypay.php +++ b/src/member/mypay.php @@ -9,19 +9,19 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/config.php'); +require_once(dirname(__FILE__).'/config.php'); CheckRank(0, 0); $menutype = 'mydede'; $menutype_son = 'op'; -require_once(DEDEINC . '/datalistcp.class.php'); +require_once(DEDEINC.'/datalistcp.class.php'); setcookie('ENV_GOBACK_URL', GetCurUrl(), time() + 3600, '/'); if (!isset($dopost)) $dopost = ''; if ($dopost == '') { - $query = "SELECT * FROM `#@__member_operation` WHERE mid='" . $cfg_ml->M_ID . "' And product='archive' order by aid desc"; + $query = "SELECT * FROM `#@__member_operation` WHERE mid='".$cfg_ml->M_ID."' And product='archive' order by aid desc"; $dlist = new DataListCP(); $dlist->pageSize = 20; - $dlist->SetTemplate(DEDEMEMBER . '/templets/mypay.htm'); + $dlist->SetTemplate(DEDEMEMBER.'/templets/mypay.htm'); $dlist->SetSource($query); $dlist->Display(); } elseif ($dopost == 'del') { diff --git a/src/member/mystow.php b/src/member/mystow.php index ff534e9b..b7165093 100755 --- a/src/member/mystow.php +++ b/src/member/mystow.php @@ -9,9 +9,9 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckRank(0, 0); -require_once(DEDEINC . "/datalistcp.class.php"); +require_once(DEDEINC."/datalistcp.class.php"); setcookie("ENV_GOBACK_URL", GetCurUrl(), time() + 3600, "/"); $type = empty($type) ? "sys" : trim($type); $tpl = ''; @@ -21,7 +21,7 @@ if ($rank == 'top') { $sql = "SELECT s.*,COUNT(s.aid) AS num,t.* from `#@__member_stow` AS s LEFT JOIN `#@__member_stowtype` AS t on t.stowname=s.type group by s.aid order by num desc"; $tpl = 'mystowtop'; } else { - $sql = "SELECT s.*,t.* FROM `#@__member_stow` AS s left join `#@__member_stowtype` AS t on t.stowname=s.type where s.mid='" . $cfg_ml->M_ID . "' order by s.id desc"; + $sql = "SELECT s.*,t.* FROM `#@__member_stow` AS s left join `#@__member_stowtype` AS t on t.stowname=s.type where s.mid='".$cfg_ml->M_ID."' order by s.id desc"; $tpl = 'mystow'; } @@ -32,6 +32,6 @@ while ($row = $dsql->GetArray('nn')) { $dlist = new DataListCP(); $dlist->pageSize = 20; -$dlist->SetTemplate(DEDEMEMBER . "/templets/mystow.htm"); +$dlist->SetTemplate(DEDEMEMBER."/templets/mystow.htm"); $dlist->SetSource($sql); $dlist->Display(); diff --git a/src/member/operation.php b/src/member/operation.php index 03f2d4c7..8147fc5d 100755 --- a/src/member/operation.php +++ b/src/member/operation.php @@ -9,8 +9,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -require_once(DEDEINC . "/datalistcp.class.php"); +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEINC."/datalistcp.class.php"); CheckRank(0, 0); $menutype = 'mydede'; $menutype_son = 'op'; @@ -31,10 +31,10 @@ function GetSta($sta) } if ($dopost == '') { - $sql = "SELECT * FROM `#@__member_operation` WHERE mid='" . $cfg_ml->M_ID . "' AND product<>'archive' ORDER BY aid DESC"; + $sql = "SELECT * FROM `#@__member_operation` WHERE mid='".$cfg_ml->M_ID."' AND product<>'archive' ORDER BY aid DESC"; $dlist = new DataListCP(); $dlist->pageSize = 20; - $dlist->SetTemplate(DEDEMEMBER . "/templets/operation.htm"); + $dlist->SetTemplate(DEDEMEMBER."/templets/operation.htm"); $dlist->SetSource($sql); $dlist->Display(); } else if ($dopost == 'del') { diff --git a/src/member/pm.php b/src/member/pm.php index 48f5a162..1473c81f 100755 --- a/src/member/pm.php +++ b/src/member/pm.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckRank(0, 0); $menutype = 'mydede'; $menutype_son = 'pm'; @@ -66,7 +66,7 @@ else { if (!isset($folder)) { $folder = 'inbox'; } - require_once(DEDEINC . "/datalistcp.class.php"); + require_once(DEDEINC."/datalistcp.class.php"); $wsql = ''; if ($folder == 'outbox') { $wsql = " `fromid`='{$cfg_ml->M_ID}' AND folder LIKE 'outbox' "; @@ -103,7 +103,7 @@ else { $dlist = new DataListCP(); $dlist->pageSize = 20; $dlist->SetParameter("dopost", $dopost); - $dlist->SetTemplate(DEDEMEMBER . '/templets/pm-main.htm'); + $dlist->SetTemplate(DEDEMEMBER.'/templets/pm-main.htm'); $dlist->SetSource($query); $dlist->Display(); } diff --git a/src/member/reg_new.php b/src/member/reg_new.php index cbf6e6e1..e8278b18 100755 --- a/src/member/reg_new.php +++ b/src/member/reg_new.php @@ -7,7 +7,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); if ($cfg_mb_allowreg == 'N') { ShowMsg('系统关闭了新用户注册!', 'index.php'); @@ -132,7 +132,7 @@ if ($step == 1) { exit(); } } - require_once(DEDEMEMBER . "/templets/reg-new.htm"); + require_once(DEDEMEMBER."/templets/reg-new.htm"); } else { if (!$cfg_ml->IsLogin()) { ShowMsg("尚未完成基本信息的注册,请返回重新填写!", "index_do.php?fmdo=user&dopost=regnew"); diff --git a/src/member/resetpassword.php b/src/member/resetpassword.php index 260e2460..f4a88083 100755 --- a/src/member/resetpassword.php +++ b/src/member/resetpassword.php @@ -9,13 +9,13 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -require_once(DEDEMEMBER . "/inc/inc_pwd_functions.php"); +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEMEMBER."/inc/inc_pwd_functions.php"); if (empty($dopost)) $dopost = ""; $id = isset($id) ? intval($id) : 0; if ($dopost == "") { - include(dirname(__FILE__) . "/templets/resetpassword.htm"); + include(dirname(__FILE__)."/templets/resetpassword.htm"); } elseif ($dopost == "getpwd") { //验证验证码 @@ -57,7 +57,7 @@ if ($dopost == "") { showmsg('对不起您尚未设置安全密码,请通过邮件方式重设密码', 'login.php'); exit; } - require_once(dirname(__FILE__) . "/templets/resetpassword3.htm"); + require_once(dirname(__FILE__)."/templets/resetpassword3.htm"); } exit(); } else if ($dopost == "safequestion") { @@ -95,7 +95,7 @@ if ($dopost == "") { ShowMsg("对不起,临时密码修改期限已过期", "login.php"); exit(); } - require_once(dirname(__FILE__) . "/templets/resetpassword2.htm"); + require_once(dirname(__FILE__)."/templets/resetpassword2.htm"); } elseif ($setp == 2) { if (isset($key)) $pwdtmp = $key; diff --git a/src/member/shops_orders.php b/src/member/shops_orders.php index 2342088b..207db75b 100755 --- a/src/member/shops_orders.php +++ b/src/member/shops_orders.php @@ -9,8 +9,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -include_once DEDEINC . '/datalistcp.class.php'; +require_once(dirname(__FILE__)."/config.php"); +include_once DEDEINC.'/datalistcp.class.php'; $menutype = 'mydede'; $menutype_son = 'op'; if (!isset($dopost)) $dopost = ''; @@ -28,21 +28,21 @@ function GetSta($sta, $oid) global $dsql; $row = $dsql->GetOne("SELECT p.name FROM `#@__shops_orders` AS s LEFT JOIN `#@__payment` AS p ON s.paytype=p.id WHERE s.oid='$oid'"); if ($sta == 0) { - return '未付款(' . $row['name'] . ') < 去付款'; + return '未付款('.$row['name'].') < 去付款'; } else if ($sta == 1) { return '已付款,等发货'; } else if ($sta == 2) { - return '确认'; + return '确认'; } else { return '已完成'; } } if ($dopost == '') { - $sql = "SELECT * FROM `#@__shops_orders` WHERE userid='" . $cfg_ml->M_ID . "' ORDER BY stime DESC"; + $sql = "SELECT * FROM `#@__shops_orders` WHERE userid='".$cfg_ml->M_ID."' ORDER BY stime DESC"; $dl = new DataListCP(); $dl->pageSize = 20; //这两句的顺序不能更换 - $dl->SetTemplate(dirname(__FILE__) . "/templets/shops_orders.htm"); //载入模板 + $dl->SetTemplate(dirname(__FILE__)."/templets/shops_orders.htm"); //载入模板 $dl->SetSource($sql); //设定查询SQL $dl->Display(); //显示 } else if ($dopost == 'del') { diff --git a/src/member/shops_point.php b/src/member/shops_point.php index fe2dd76f..465f10a8 100755 --- a/src/member/shops_point.php +++ b/src/member/shops_point.php @@ -9,25 +9,25 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); if (isset($oid)) { $oid = preg_replace("#[^-0-9A-Z]#i", "", $oid); - $rs = $dsql->GetOne("SELECT paytype,priceCount FROM `#@__shops_orders` WHERE userid='" . $cfg_ml->M_ID . "' AND oid='$oid'"); + $rs = $dsql->GetOne("SELECT paytype,priceCount FROM `#@__shops_orders` WHERE userid='".$cfg_ml->M_ID."' AND oid='$oid'"); if ($rs['paytype'] != 5) { ShowMsg("订单不支持该支付方式!", "javascript:;"); exit(); } $priceCount = $row['priceCount']; - $members = $dsql->GetOne("SELECT `money` FROM `#@__member` WHERE mid='" . $cfg_ml->M_ID . "'"); + $members = $dsql->GetOne("SELECT `money` FROM `#@__member` WHERE mid='".$cfg_ml->M_ID."'"); if ($members['money'] < $priceCount) { ShowMsg("支付失败点数不够!", "-1"); exit(); } - if ($dsql->ExecuteNoneQuery("UPDATE `#@__shops_orders` SET `state`='1' WHERE `oid`='$oid' AND `userid`='" . $cfg_ml->M_ID . "' AND `state`<1")) { + if ($dsql->ExecuteNoneQuery("UPDATE `#@__shops_orders` SET `state`='1' WHERE `oid`='$oid' AND `userid`='".$cfg_ml->M_ID."' AND `state`<1")) { $res = $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET money=money-$priceCount WHERE mid='{$cfg_ml->M_ID}'"); - ShowMsg("下单,支付成功,等待商家发货!", "../member/shops_products.php?oid=" . $oid); + ShowMsg("下单,支付成功,等待商家发货!", "../member/shops_products.php?oid=".$oid); exit(); } else { ShowMsg("支付失败,请联系管理员!", "-1"); diff --git a/src/member/shops_products.php b/src/member/shops_products.php index 7a434503..8add0a4c 100755 --- a/src/member/shops_products.php +++ b/src/member/shops_products.php @@ -9,8 +9,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); -include_once DEDEINC . '/datalistcp.class.php'; +require_once(dirname(__FILE__)."/config.php"); +include_once DEDEINC.'/datalistcp.class.php'; $menutype = 'mydede'; $menutype_son = 'op'; if (!isset($dopost)) $dopost = ''; @@ -22,17 +22,17 @@ if ($dopost == '') { if (!empty($oid)) { if ($do == 'ok') { $dsql->ExecuteNoneQuery("UPDATE `#@__shops_orders` SET `state`='4' WHERE oid='$oid'"); - ShowMsg("已确认订单!", 'shops_products.php?oid=' . $oid); + ShowMsg("已确认订单!", 'shops_products.php?oid='.$oid); exit(); } - $row = $dsql->GetOne("SELECT * FROM `#@__shops_userinfo` WHERE userid='" . $cfg_ml->M_ID . "' AND oid='$oid'"); + $row = $dsql->GetOne("SELECT * FROM `#@__shops_userinfo` WHERE userid='".$cfg_ml->M_ID."' AND oid='$oid'"); if (!isset($row['oid'])) { ShowMsg("订单不存在!", -1); exit(); } $row['des'] = stripslashes($row['des']); - $rs = $dsql->GetOne("SELECT * FROM `#@__shops_orders` WHERE userid='" . $cfg_ml->M_ID . "' AND oid='$oid'"); + $rs = $dsql->GetOne("SELECT * FROM `#@__shops_orders` WHERE userid='".$cfg_ml->M_ID."' AND oid='$oid'"); $row['state'] = $rs['state']; $row['stime'] = $rs['stime']; $row['cartcount'] = $rs['cartcount']; @@ -43,15 +43,15 @@ if ($dopost == '') { $rs = $dsql->GetOne("SELECT `dname` FROM `#@__shops_delivery` WHERE pid='$rs[pid]' LIMIT 0,1"); $row['dname'] = $rs['dname']; unset($rs); - $addsql = " AND oid='" . $oid . "'"; + $addsql = " AND oid='".$oid."'"; } - $sql = "SELECT * FROM `#@__shops_products` WHERE userid='" . $cfg_ml->M_ID . "' $addsql ORDER BY aid ASC"; + $sql = "SELECT * FROM `#@__shops_products` WHERE userid='".$cfg_ml->M_ID."' $addsql ORDER BY aid ASC"; $dl = new DataListCP(); $dl->pageSize = 20; if (!empty($oid)) $dl->SetParameter('oid', $oid); //这两句的顺序不能更换 - $dl->SetTemplate(dirname(__FILE__) . "/templets/shops_products.htm"); //载入模板 + $dl->SetTemplate(dirname(__FILE__)."/templets/shops_products.htm"); //载入模板 $dl->SetSource($sql); //设定查询SQL $dl->Display(); } else if ($dopost == 'del') { @@ -84,11 +84,11 @@ function GetSta($sta, $oid) $row = $dsql->GetOne("SELECT paytype FROM `#@__shops_orders` WHERE oid='$oid'"); $payname = $dsql->GetOne("SELECT name,fee FROM `#@__payment` WHERE id='{$row['paytype']}'"); if ($sta == 0) { - return $payname['name'] . " 手续费:" . $payname['fee'] . "元"; + return $payname['name']." 手续费:".$payname['fee']."元"; } elseif ($sta == 1) { return '已付款,等发货'; } elseif ($sta == 2) { - return '确认'; + return '确认'; } else { return '已完成'; } diff --git a/src/member/soft_add.php b/src/member/soft_add.php index b54a0596..de1996cc 100755 --- a/src/member/soft_add.php +++ b/src/member/soft_add.php @@ -9,18 +9,18 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); //考虑安全原因不管是否开启游客投稿功能,都不允许用户投稿 CheckRank(0, 0); if ($cfg_mb_lit == 'Y') { ShowMsg("由于系统开启了精简版会员空间,你访问的功能不可用!", "-1"); exit(); } -require_once(DEDEINC . "/dedetag.class.php"); -require_once(DEDEINC . "/userlogin.class.php"); -require_once(DEDEINC . "/customfields.func.php"); -require_once(DEDEMEMBER . "/inc/inc_catalog_options.php"); -require_once(DEDEMEMBER . "/inc/inc_archives_functions.php"); +require_once(DEDEINC."/dedetag.class.php"); +require_once(DEDEINC."/userlogin.class.php"); +require_once(DEDEINC."/customfields.func.php"); +require_once(DEDEMEMBER."/inc/inc_catalog_options.php"); +require_once(DEDEMEMBER."/inc/inc_archives_functions.php"); $channelid = isset($channelid) && is_numeric($channelid) ? $channelid : 3; $typeid = isset($typeid) && is_numeric($typeid) ? $typeid : 0; $menutype = 'content'; @@ -42,15 +42,15 @@ if (empty($dopost)) { //检查会员等级和类型限制 if ($cInfos['sendrank'] > $cfg_ml->M_Rank) { - $row = $dsql->GetOne("Select membername From `#@__arcrank` where rank='" . $cInfos['sendrank'] . "' "); - ShowMsg("对不起,需要[" . $row['membername'] . "]才能在这个频道发布文档!", "-1", "0", 5000); + $row = $dsql->GetOne("Select membername From `#@__arcrank` where rank='".$cInfos['sendrank']."' "); + ShowMsg("对不起,需要[".$row['membername']."]才能在这个频道发布文档!", "-1", "0", 5000); exit(); } if ($cInfos['usertype'] != '' && $cInfos['usertype'] != $cfg_ml->M_MbType) { - ShowMsg("对不起,需要[" . $cInfos['usertype'] . "帐号]才能在这个频道发布文档!", "-1", "0", 5000); + ShowMsg("对不起,需要[".$cInfos['usertype']."帐号]才能在这个频道发布文档!", "-1", "0", 5000); exit(); } - include(DEDEMEMBER . "/templets/soft_add.htm"); + include(DEDEMEMBER."/templets/soft_add.htm"); exit(); } @@ -58,7 +58,7 @@ if (empty($dopost)) { function _SaveArticle(){ } ------------------------------*/ else if ($dopost == 'save') { $description = ''; - include(DEDEMEMBER . '/inc/archives_check.php'); + include(DEDEMEMBER.'/inc/archives_check.php'); //生成文档ID $arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $mid); @@ -96,8 +96,8 @@ function _SaveArticle(){ } } ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); } - $inadd_f .= ',' . $vs[0]; - $inadd_v .= " ,'" . ${$vs[0]} . "' "; + $inadd_f .= ','.$vs[0]; + $inadd_v .= " ,'".${$vs[0]}."' "; } } @@ -137,13 +137,13 @@ VALUES ('$arcID','$typeid','$sortrank','$flag','$ismake','$channelid','$arcrank' } } for ($i = 2; $i <= 12; $i++) { - if (!empty(${'softurl' . $i})) { - $servermsg = str_replace("'", "", stripslashes(${'servermsg' . $i})); + if (!empty(${'softurl'.$i})) { + $servermsg = str_replace("'", "", stripslashes(${'servermsg'.$i})); $servermsg = str_replace(array("{dede:", "{/dede:", "}"), "#", $servermsg); - $softurl = stripslashes(${'softurl' . $i}); + $softurl = stripslashes(${'softurl'.$i}); $softurl = str_replace(array("{dede:", "{/dede:", "}"), "#", $softurl); if ($servermsg == '') { - $servermsg = '下载地址' . $i; + $servermsg = '下载地址'.$i; } if ($softurl != '' && $softurl != 'http://') { $urls .= "{dede:link text='$servermsg'} $softurl {/dede:link}\r\n"; @@ -151,7 +151,7 @@ VALUES ('$arcID','$typeid','$sortrank','$flag','$ismake','$channelid','$arcrank' } } $urls = addslashes($urls); - $softsize = $softsize . $unit; + $softsize = $softsize.$unit; //保存到附加表 $needmoney = @intval($needmoney); @@ -174,13 +174,13 @@ VALUES ('$arcID','$typeid','$sortrank','$flag','$ismake','$channelid','$arcrank' $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); echo $inQuery; exit(); - ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCMS官方。" . str_replace('"', '', $gerr), "javascript:;"); + ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCMS官方。".str_replace('"', '', $gerr), "javascript:;"); exit(); } //增加积分 $cfg_sendarc_scores = intval($cfg_sendarc_scores); - $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET scores=scores+{$cfg_sendarc_scores} WHERE mid='" . $cfg_ml->M_ID . "' ; "); + $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET scores=scores+{$cfg_sendarc_scores} WHERE mid='".$cfg_ml->M_ID."' ; "); //更新统计 countArchives($channelid); @@ -188,7 +188,7 @@ VALUES ('$arcID','$typeid','$sortrank','$flag','$ismake','$channelid','$arcrank' InsertTags($tags, $arcID); $artUrl = MakeArt($arcID, TRUE); if ($artUrl == '') { - $artUrl = $cfg_phpurl . "/view.php?aid=$arcID"; + $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; } ClearMyAddon($arcID, $title); diff --git a/src/member/soft_edit.php b/src/member/soft_edit.php index 25b11ff0..789fc864 100755 --- a/src/member/soft_edit.php +++ b/src/member/soft_edit.php @@ -9,12 +9,12 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/config.php"); +require_once(dirname(__FILE__)."/config.php"); CheckRank(0, 0); -require_once(DEDEINC . "/dedetag.class.php"); -require_once(DEDEINC . "/customfields.func.php"); -require_once(DEDEMEMBER . "/inc/inc_catalog_options.php"); -require_once(DEDEMEMBER . "/inc/inc_archives_functions.php"); +require_once(DEDEINC."/dedetag.class.php"); +require_once(DEDEINC."/customfields.func.php"); +require_once(DEDEMEMBER."/inc/inc_catalog_options.php"); +require_once(DEDEMEMBER."/inc/inc_archives_functions.php"); $channelid = isset($channelid) && is_numeric($channelid) ? $channelid : 3; $aid = isset($aid) && is_numeric($aid) ? $aid : 0; $menutype = 'content'; @@ -46,7 +46,7 @@ if (empty($dopost)) { exit(); } } - $query = "SELECT * FROM `#@__channeltype` WHERE id='" . $row['channel'] . "'"; + $query = "SELECT * FROM `#@__channeltype` WHERE id='".$row['channel']."'"; $cInfos = $dsql->GetOne($query); if (!is_array($cInfos)) { ShowMsg("读取频道配置信息出错!", "javascript:;"); @@ -63,8 +63,8 @@ if (empty($dopost)) { if (is_array($dtp->CTags)) { foreach ($dtp->CTags as $ctag) { if ($ctag->GetName() == 'link') { - $nForm .= "软件地址" . $newRowStart . ": - 服务器名称: + $nForm .= "软件地址".$newRowStart.": + 服务器名称:
    "; $newRowStart++; } @@ -76,14 +76,14 @@ if (empty($dopost)) { $addRow = XSSClean($addRow); $channelid = $row['channel']; $tags = GetTags($aid); - include(DEDEMEMBER . "/templets/soft_edit.htm"); + include(DEDEMEMBER."/templets/soft_edit.htm"); exit(); } /*------------------------------ function _SaveArticle(){ } ------------------------------*/ else if ($dopost == 'save') { $description = ''; - include(DEDEMEMBER . '/inc/archives_check_edit.php'); + include(DEDEMEMBER.'/inc/archives_check_edit.php'); //分析处理附加表数据 $inadd_f = ''; @@ -99,7 +99,7 @@ function _SaveArticle(){ } ${$vs[0]} = ''; } ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $aid); - $inadd_f .= ',' . $vs[0] . " ='" . ${$vs[0]} . "' "; + $inadd_f .= ','.$vs[0]." ='".${$vs[0]}."' "; } } } @@ -132,7 +132,7 @@ function _SaveArticle(){ } } ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); } - $inadd_f .= ",`{$vs[0]}` = '" . ${$vs[0]} . "'"; + $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; } } @@ -163,13 +163,13 @@ function _SaveArticle(){ } //软件链接列表 $urls = ''; for ($i = 1; $i <= 9; $i++) { - if (!empty(${'softurl' . $i})) { - $servermsg = str_replace("'", '', stripslashes(${'servermsg' . $i})); + if (!empty(${'softurl'.$i})) { + $servermsg = str_replace("'", '', stripslashes(${'servermsg'.$i})); $servermsg = str_replace(array("{dede:", "{/dede:", "}"), "#", $servermsg); - $softurl = stripslashes(${'softurl' . $i}); + $softurl = stripslashes(${'softurl'.$i}); $softurl = str_replace(array("{dede:", "{/dede:", "}"), "#", $softurl); if ($servermsg == '') { - $servermsg = '下载地址' . $i; + $servermsg = '下载地址'.$i; } if ($softurl != '' && $softurl != 'http://') { $urls .= "{dede:link text='$servermsg'} $softurl {/dede:link}\r\n"; @@ -208,14 +208,14 @@ function _SaveArticle(){ } UpIndexKey($aid, $arcrank, $typeid, $sortrank, $tags); $artUrl = MakeArt($aid, TRUE); if ($artUrl == '') { - $artUrl = $cfg_phpurl . "/view.php?aid=$aid"; + $artUrl = $cfg_phpurl."/view.php?aid=$aid"; } //返回成功信息 $msg = "  请选择你的后续操作: 发布新软件    - 查看更改 + 查看更改    查看软件    diff --git a/src/plus/ad_js.php b/src/plus/ad_js.php index 5ecb9dd1..0932922a 100755 --- a/src/plus/ad_js.php +++ b/src/plus/ad_js.php @@ -10,13 +10,13 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/../include/common.inc.php"); +require_once(dirname(__FILE__)."/../include/common.inc.php"); if (isset($arcID)) $aid = $arcID; $arcID = $aid = (isset($aid) && is_numeric($aid)) ? $aid : 0; if ($aid == 0) die(' Request Error! '); -$cacheFile = DEDEDATA . '/cache/myad-' . $aid . '.htm'; +$cacheFile = DEDEDATA.'/cache/myad-'.$aid.'.htm'; if (isset($nocache) || !file_exists($cacheFile) || time() - filemtime($cacheFile) > $cfg_puccache_time) { $row = $dsql->GetOne("SELECT * FROM `#@__myad` WHERE aid='$aid' "); $adbody = ''; diff --git a/src/plus/advancedsearch.php b/src/plus/advancedsearch.php index 1becc113..016891c5 100755 --- a/src/plus/advancedsearch.php +++ b/src/plus/advancedsearch.php @@ -10,8 +10,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/../include/common.inc.php"); -require_once(DEDEINC . "/datalistcp.class.php"); +require_once(dirname(__FILE__)."/../include/common.inc.php"); +require_once(DEDEINC."/datalistcp.class.php"); $timestamp = time(); @session_start(); @@ -48,7 +48,7 @@ if (empty($sql)) { //主表字段处理 $q = stripslashes($q); $q = preg_replace("#[\|\"\r\n\t%\*\?\(\)\$;,'%<>]#", " ", trim($q)); - if (($cfg_notallowstr != '' && preg_match("#" . $cfg_notallowstr . "#i", $q)) || ($cfg_replacestr != '' && preg_match("#" . $cfg_replacestr . "#i", $q))) { + if (($cfg_notallowstr != '' && preg_match("#".$cfg_notallowstr."#i", $q)) || ($cfg_replacestr != '' && preg_match("#".$cfg_replacestr."#i", $q))) { echo "你的信息中存在非法内容,被系统禁止![返回]"; exit(); } @@ -109,14 +109,14 @@ if (empty($sql)) { $var = $addonfieldarr[0]; $type = $addonfieldarr[1]; if (in_array($type, $intarr)) { - if (isset(${'start' . $var}) && trim(${'start' . $var}) != '') { - ${'start' . $var} = trim(${'start' . $var}); - ${'start' . $var} = intval(${'start' . $var}); + if (isset(${'start'.$var}) && trim(${'start'.$var}) != '') { + ${'start'.$var} = trim(${'start'.$var}); + ${'start'.$var} = intval(${'start'.$var}); $where .= " AND addon.$var>${'start' .$var} "; } - if (isset(${'end' . $var}) && trim(${'end' . $var}) != '') { - ${'end' . $var} = trim(${'end' . $var}); - ${'end' . $var} = intval(${'end' . $var}); + if (isset(${'end'.$var}) && trim(${'end'.$var}) != '') { + ${'end'.$var} = trim(${'end'.$var}); + ${'end'.$var} = intval(${'end'.$var}); $where .= " AND addon.$var<${'end' .$var} "; } } elseif (in_array($type, $textarr)) { @@ -153,17 +153,17 @@ if (empty($sql)) { } } } elseif ($type == 'datetime') { - ${'start' . $var} = trim(${'start' . $var}); - if (${'start' . $var} != '') { - ${'start' . $var} = strtotime(${'start' . $var}); + ${'start'.$var} = trim(${'start'.$var}); + if (${'start'.$var} != '') { + ${'start'.$var} = strtotime(${'start'.$var}); } else { - ${'start' . $var} = 0; + ${'start'.$var} = 0; } - ${'end' . $var} = trim(${'end' . $var}); - if (${'end' . $var} != '') { - ${'end' . $var} = strtotime(${'end' . $var}); + ${'end'.$var} = trim(${'end'.$var}); + if (${'end'.$var} != '') { + ${'end'.$var} = strtotime(${'end'.$var}); } else { - ${'end' . $var} = 0; + ${'end'.$var} = 0; } } } @@ -196,14 +196,14 @@ $dlist = new DataListCP(); $dlist->pageSize = 20; $dlist->SetParameter("hash", $sqlhash); $dlist->SetParameter("mid", $mid); -if (file_exists(DEDEROOT . "/templets/default/$template")) { - $templatefile = DEDEROOT . "/templets/default/$template"; +if (file_exists(DEDEROOT."/templets/default/$template")) { + $templatefile = DEDEROOT."/templets/default/$template"; } else { - $templatefile = DEDEROOT . "/templets/default/advancedsearch.htm"; + $templatefile = DEDEROOT."/templets/default/advancedsearch.htm"; } $dlist->SetTemplate($templatefile); $dlist->SetSource($query); -require_once(DEDEINC . "/channelunit.class.php"); +require_once(DEDEINC."/channelunit.class.php"); //获得一个指定档案的链接 function GetArcUrl($aid, $typeid, $timetag, $title, $ismake = 0, $rank = 0, $namerule = '', $artdir = '', $money = 0) diff --git a/src/plus/car.php b/src/plus/car.php index 2034936e..4ba8262d 100755 --- a/src/plus/car.php +++ b/src/plus/car.php @@ -10,11 +10,11 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/../include/common.inc.php"); -define('_PLUS_TPL_', DEDEROOT . '/templets/plus'); -require_once(DEDEINC . '/dedetemplate.class.php'); -require_once DEDEINC . '/shopcar.class.php'; -require_once DEDEINC . '/memberlogin.class.php'; +require_once(dirname(__FILE__)."/../include/common.inc.php"); +define('_PLUS_TPL_', DEDEROOT.'/templets/plus'); +require_once(DEDEINC.'/dedetemplate.class.php'); +require_once DEDEINC.'/shopcar.class.php'; +require_once DEDEINC.'/memberlogin.class.php'; $cart = new MemberShops(); if (isset($dopost) && $dopost == 'makeid') { @@ -40,6 +40,6 @@ $carts = array( $dtp = new DedeTemplate(); $dtp->Assign('carts', $carts); -$dtp->LoadTemplate(_PLUS_TPL_ . '/car.htm'); +$dtp->LoadTemplate(_PLUS_TPL_.'/car.htm'); $dtp->Display(); exit; diff --git a/src/plus/carbuyaction.php b/src/plus/carbuyaction.php index 5124a202..d4b90735 100755 --- a/src/plus/carbuyaction.php +++ b/src/plus/carbuyaction.php @@ -10,11 +10,11 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/../include/common.inc.php"); -define('_PLUS_TPL_', DEDEROOT . '/templets/plus'); -require_once DEDEINC . '/dedetemplate.class.php'; -require_once DEDEINC . '/shopcar.class.php'; -require_once DEDEINC . '/memberlogin.class.php'; +require_once(dirname(__FILE__)."/../include/common.inc.php"); +define('_PLUS_TPL_', DEDEROOT.'/templets/plus'); +require_once DEDEINC.'/dedetemplate.class.php'; +require_once DEDEINC.'/shopcar.class.php'; +require_once DEDEINC.'/memberlogin.class.php'; if ($cfg_mb_open == 'N') { ShowMsg("系统关闭了会员功能,因此你无法访问此页面!", "javascript:;"); @@ -71,7 +71,7 @@ if (!isset($dopost) || empty($dopost)) { 'price_count' => $cart->priceCount() ); $dtp->Assign('carts', $carts); - $dtp->LoadTemplate(_PLUS_TPL_ . '/carbuyaction.htm'); + $dtp->LoadTemplate(_PLUS_TPL_.'/carbuyaction.htm'); $dtp->Display(); exit(); } else if ($do == 'clickout') { @@ -168,7 +168,7 @@ if (!isset($dopost) || empty($dopost)) { "; $dsql->ExecuteNoneQuery($sql); } else { - ShowMsg("更新订单时出现错误!" . $dsql->GetError(), "-1"); + ShowMsg("更新订单时出现错误!".$dsql->GetError(), "-1"); exit(); } } else { @@ -189,12 +189,12 @@ if (!isset($dopost) || empty($dopost)) { //最后结算价格 = 最后统计价格 $priceCount = sprintf("%01.2f", $lastpriceCount); //更新用户商品统计 - $countOrders = $dsql->GetOne("SELECT SUM(cartcount) AS nums FROM #@__shops_orders WHERE userid='" . $cfg_ml->M_ID . "'"); - $dsql->ExecuteNoneQuery("UPDATE #@__member_tj SET `shop`='" . $countOrders['nums'] . "' WHERE mid='" . $cfg_ml->M_ID . "'"); + $countOrders = $dsql->GetOne("SELECT SUM(cartcount) AS nums FROM #@__shops_orders WHERE userid='".$cfg_ml->M_ID."'"); + $dsql->ExecuteNoneQuery("UPDATE #@__member_tj SET `shop`='".$countOrders['nums']."' WHERE mid='".$cfg_ml->M_ID."'"); $rs = $dsql->GetOne("SELECT * FROM `#@__payment` WHERE id='$paytype' "); - require_once DEDEINC . '/payment/' . $rs['code'] . '.php'; + require_once DEDEINC.'/payment/'.$rs['code'].'.php'; $pay = new $rs['code']; if ($rs['code'] == "cod" || $rs['code'] == "bank") { $order = $OrdersId; @@ -203,7 +203,7 @@ if (!isset($dopost) || empty($dopost)) { 'out_trade_no' => $cart->OrdersId, 'price' => $priceCount ); - require_once DEDEDATA . '/payment/' . $rs['code'] . '.php'; + require_once DEDEDATA.'/payment/'.$rs['code'].'.php'; } $button = $pay->GetCode($order, $payment); $dtp = new DedeTemplate(); @@ -219,7 +219,7 @@ if (!isset($dopost) || empty($dopost)) { $dtp->SetVar('description', $rs['description']); $dtp->SetVar('button', $button); $dtp->Assign('carts', $carts); - $dtp->LoadTemplate(_PLUS_TPL_ . '/shops_action_payment.htm'); + $dtp->LoadTemplate(_PLUS_TPL_.'/shops_action_payment.htm'); $dtp->Display(); exit(); } @@ -265,11 +265,11 @@ if (!isset($dopost) || empty($dopost)) { $rs = $dsql->GetOne("SELECT * FROM `#@__payment` WHERE id='{$row['paytype']}' "); } $rs['code'] = isset($rs['code']) ? preg_replace("#[^0-9a-z_\-]+#i", "", $rs['code']) : ""; - if (empty($rs['code']) or !file_exists(DEDEINC . '/payment/' . $rs['code'] . '.php')) { + if (empty($rs['code']) or !file_exists(DEDEINC.'/payment/'.$rs['code'].'.php')) { exit("Error:payment is not exsits!"); } - require_once DEDEINC . '/payment/' . $rs['code'] . '.php'; + require_once DEDEINC.'/payment/'.$rs['code'].'.php'; $pay = new $rs['code']; $payment = ""; if ($rs['code'] == "cod" || $rs['code'] == "bank") $order = $OrdersId; @@ -278,7 +278,7 @@ if (!isset($dopost) || empty($dopost)) { 'out_trade_no' => $OrdersId, 'price' => $priceCount ); - require_once DEDEDATA . '/payment/' . $rs['code'] . '.php'; + require_once DEDEDATA.'/payment/'.$rs['code'].'.php'; } $button = $pay->GetCode($order, $payment); $dtp = new DedeTemplate(); @@ -294,13 +294,13 @@ if (!isset($dopost) || empty($dopost)) { $dtp->SetVar('description', $rs['description']); $dtp->SetVar('button', $button); $dtp->Assign('carts', $carts); - $dtp->LoadTemplate(_PLUS_TPL_ . '/shops_action_payment.htm'); + $dtp->LoadTemplate(_PLUS_TPL_.'/shops_action_payment.htm'); $dtp->Display(); exit(); } else if ($dopost == 'return') { $write_list = array('alipay', 'bank', 'cod', 'yeepay'); if (in_array($code, $write_list)) { - require_once DEDEINC . '/payment/' . $code . '.php'; + require_once DEDEINC.'/payment/'.$code.'.php'; $pay = new $code; $msg = $pay->respond(); ShowMsg($msg, "javascript:;", 0, 3000); diff --git a/src/plus/count.php b/src/plus/count.php index 3a010924..0477fdc9 100755 --- a/src/plus/count.php +++ b/src/plus/count.php @@ -15,7 +15,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/../include/common.inc.php"); +require_once(dirname(__FILE__)."/../include/common.inc.php"); if (isset($aid)) $arcID = $aid; $cid = empty($cid) ? 1 : intval($cid); @@ -53,7 +53,7 @@ if (!empty($view)) { ); echo json_encode($result); } else { - echo "document.write('" . $row['click'] . "');\r\n"; + echo "document.write('".$row['click']."');\r\n"; } } } diff --git a/src/plus/digg_ajax.php b/src/plus/digg_ajax.php index 95da3aaf..5e20c2f9 100755 --- a/src/plus/digg_ajax.php +++ b/src/plus/digg_ajax.php @@ -10,7 +10,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/../include/common.inc.php"); +require_once(dirname(__FILE__)."/../include/common.inc.php"); $action = isset($action) ? trim($action) : ''; $format = isset($format) ? $format : ''; $id = empty($id) ? 0 : intval($id); @@ -31,7 +31,7 @@ if ($cid < 0) { } $prefix = 'diggCache'; -$key = 'aid-' . $id; +$key = 'aid-'.$id; $row = GetCache($prefix, $key); if (!is_array($row) || $cfg_digg_update == 0) { @@ -39,10 +39,10 @@ if (!is_array($row) || $cfg_digg_update == 0) { if ($cfg_digg_update == 0) { if ($action == 'good') { $row['goodpost'] = $row['goodpost'] + 1; - $dsql->ExecuteNoneQuery("UPDATE `$maintable` SET scores = scores + {$cfg_caicai_add},goodpost=goodpost+1,lastpost=" . time() . " WHERE $idtype='$id'"); + $dsql->ExecuteNoneQuery("UPDATE `$maintable` SET scores = scores + {$cfg_caicai_add},goodpost=goodpost+1,lastpost=".time()." WHERE $idtype='$id'"); } else if ($action == 'bad') { $row['badpost'] = $row['badpost'] + 1; - $dsql->ExecuteNoneQuery("UPDATE `$maintable` SET scores = scores - {$cfg_caicai_sub},badpost=badpost+1,lastpost=" . time() . " WHERE $idtype='$id'"); + $dsql->ExecuteNoneQuery("UPDATE `$maintable` SET scores = scores - {$cfg_caicai_sub},badpost=badpost+1,lastpost=".time()." WHERE $idtype='$id'"); } DelCache($prefix, $key); } @@ -101,20 +101,20 @@ if ($formurl == 'caicai') { $digg = json_encode($result); } else { // 兼容之前的老版本 - $digg = '
    + $digg = '
    顶一下
    -
    (' . $row['goodpost'] . ')
    +
    ('.$row['goodpost'].')
    -
    -
    ' . $row['goodper'] . '%
    +
    +
    '.$row['goodper'].'%
    -
    +
    踩一下
    -
    (' . $row['badpost'] . ')
    +
    ('.$row['badpost'].')
    -
    -
    ' . $row['badper'] . '%
    +
    +
    '.$row['badper'].'%
    '; } diff --git a/src/plus/disdls.php b/src/plus/disdls.php index f9d8d346..c6cfd134 100755 --- a/src/plus/disdls.php +++ b/src/plus/disdls.php @@ -13,7 +13,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/../include/common.inc.php"); +require_once(dirname(__FILE__)."/../include/common.inc.php"); $aid = (isset($aid) && is_numeric($aid)) ? $aid : 0; $row = $dsql->GetOne("SELECT SUM(downloads) AS totals FROM `#@__downloads` WHERE id='$aid' "); if (empty($row['totals'])) $row['totals'] = 0; diff --git a/src/plus/diy.php b/src/plus/diy.php index cdfcfd3f..3b992f7c 100755 --- a/src/plus/diy.php +++ b/src/plus/diy.php @@ -9,7 +9,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/../include/common.inc.php"); +require_once(dirname(__FILE__)."/../include/common.inc.php"); $diyid = isset($diyid) && is_numeric($diyid) ? $diyid : 0; $action = isset($action) && in_array($action, array('post', 'list', 'view')) ? $action : 'post'; $id = isset($id) && is_numeric($id) ? $id : 0; @@ -17,7 +17,7 @@ if (empty($diyid)) { showMsg('非法操作!', 'javascript:;'); exit(); } -require_once DEDEINC . '/diyform.cls.php'; +require_once DEDEINC.'/diyform.cls.php'; $diy = new diyform($diyid); /*---------------------------- function Post(){ } @@ -25,13 +25,13 @@ function Post(){ } if ($action == 'post') { if (empty($do)) { $postform = $diy->getForm(true); - include DEDEROOT . "/templets/plus/{$diy->postTemplate}"; + include DEDEROOT."/templets/plus/{$diy->postTemplate}"; exit(); } elseif ($do == 2) { $dede_fields = empty($dede_fields) ? '' : trim($dede_fields); $dede_fieldshash = empty($dede_fieldshash) ? '' : trim($dede_fieldshash); if (!empty($dede_fields)) { - if ($dede_fieldshash != md5($dede_fields . $cfg_cookie_encode)) { + if ($dede_fieldshash != md5($dede_fields.$cfg_cookie_encode)) { showMsg('数据校验不对,程序返回', '-1'); exit(); } @@ -64,8 +64,8 @@ if ($action == 'post') { } else { ${$fieldinfo[0]} = GetFieldValue(${$fieldinfo[0]}, $fieldinfo[1],0,'add','','diy', $fieldinfo[0]); } - $addvar .= ', `' . $fieldinfo[0] . '`'; - $addvalue .= ", '" . ${$fieldinfo[0]} . "'"; + $addvar .= ', `'.$fieldinfo[0].'`'; + $addvalue .= ", '".${$fieldinfo[0]}."'"; } } } @@ -94,7 +94,7 @@ else if ($action == 'list') { ShowMsg('后台关闭前台浏览', 'javascript:;'); exit(); } - include_once DEDEINC . '/datalistcp.class.php'; + include_once DEDEINC.'/datalistcp.class.php'; if ($diy->public == 2) $query = "SELECT * FROM `{$diy->table}` ORDER BY id DESC"; else @@ -103,7 +103,7 @@ else if ($action == 'list') { $datalist->pageSize = 10; $datalist->SetParameter('action', 'list'); $datalist->SetParameter('diyid', $diyid); - $datalist->SetTemplate(DEDEINC . "/../templets/plus/{$diy->listTemplate}"); + $datalist->SetTemplate(DEDEINC."/../templets/plus/{$diy->listTemplate}"); $datalist->SetSource($query); $fieldlist = $diy->getFieldList(); $datalist->Display(); @@ -128,5 +128,5 @@ else if ($action == 'list') { exit(); } $fieldlist = $diy->getFieldList(); - include DEDEROOT . "/templets/plus/{$diy->viewTemplate}"; + include DEDEROOT."/templets/plus/{$diy->viewTemplate}"; } \ No newline at end of file diff --git a/src/plus/download.php b/src/plus/download.php index 01bf1989..da3b6263 100755 --- a/src/plus/download.php +++ b/src/plus/download.php @@ -10,8 +10,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/../include/common.inc.php"); -require_once(DEDEINC . "/channelunit.class.php"); +require_once(dirname(__FILE__)."/../include/common.inc.php"); +require_once(DEDEINC."/channelunit.class.php"); if (!isset($open)) $open = 0; //读取链接列表 @@ -39,13 +39,13 @@ if ($open == 0) { break; } } - $row = $dsql->GetOne("SELECT $vname FROM `" . $cu->ChannelInfos['addtable'] . "` WHERE aid='$aid'"); + $row = $dsql->GetOne("SELECT $vname FROM `".$cu->ChannelInfos['addtable']."` WHERE aid='$aid'"); - include_once(DEDEINC . '/taglib/channel/softlinks.lib.php'); + include_once(DEDEINC.'/taglib/channel/softlinks.lib.php'); $ctag = ''; $downlinks = ch_softlinks($row[$vname], $ctag, $cu, '', TRUE); - require_once(DEDETEMPLATE . '/plus/download_links_templet.htm'); + require_once(DEDETEMPLATE.'/plus/download_links_templet.htm'); exit(); } /*------------------------ @@ -114,7 +114,7 @@ function getSoft_new() } //分析连接列表 - require_once(DEDEINC . '/dedetag.class.php'); + require_once(DEDEINC.'/dedetag.class.php'); $softUrl = ''; $islocal = 0; $dtp = new DedeTagParse(); @@ -134,7 +134,7 @@ function getSoft_new() //支持http,迅雷下载,ftp,flashget if (!preg_match("#^http:\/\/|^thunder:\/\/|^ftp:\/\/|^flashget:\/\/#i", $link)) { - $link = $cfg_mainsite . $link; + $link = $cfg_mainsite.$link; } $dbhash = substr(md5($link), 0, 24); if ($uhash == $dbhash) $softUrl = $link; @@ -151,7 +151,7 @@ function getSoft_new() foreach ($sites as $site) { if (trim($site) == '') continue; list($link, $serverName) = explode('|', $site); - $link = trim(preg_replace("#\/$#", "", $link)) . $firstLink; + $link = trim(preg_replace("#\/$#", "", $link)).$firstLink; $dbhash = substr(md5($link), 0, 24); if ($uhash == $dbhash) $softUrl = $link; } @@ -172,11 +172,11 @@ function getSoft_new() //处理需要下载权限的软件 if ($needRank > 0 || $needMoney > 0) { - require_once(DEDEINC . '/memberlogin.class.php'); + require_once(DEDEINC.'/memberlogin.class.php'); $cfg_ml = new MemberLogin(); $arclink = $arcurl; $arctitle = $title; - $arcLinktitle = "" . $arctitle . ""; + $arcLinktitle = "".$arctitle.""; $pubdate = GetDateTimeMk($pubdate); //会员级别不足 @@ -187,35 +187,35 @@ function getSoft_new() } $memberTypes[0] = "游客"; $msgtitle = "你没有权限下载软件:{$arctitle}!"; - $moremsg = "这个软件需要 " . $memberTypes[$needRank] . " 才能下载,你目前是:" . $memberTypes[$cfg_ml->M_Rank] . " !"; - include_once(DEDETEMPLATE . '/plus/view_msg.htm'); + $moremsg = "这个软件需要 ".$memberTypes[$needRank]." 才能下载,你目前是:".$memberTypes[$cfg_ml->M_Rank]." !"; + include_once(DEDETEMPLATE.'/plus/view_msg.htm'); exit(); } //以下为正常情况,自动扣点数 //如果文章需要金币,检查用户是否浏览过本文档 if ($needMoney > 0 && $mid != $cfg_ml->M_ID) { - $sql = "SELECT aid,money FROM `#@__member_operation` WHERE buyid='ARCHIVE" . $id . "' AND mid='" . $cfg_ml->M_ID . "'"; + $sql = "SELECT aid,money FROM `#@__member_operation` WHERE buyid='ARCHIVE".$id."' AND mid='".$cfg_ml->M_ID."'"; $row = $dsql->GetOne($sql); //未购买过此文章 if (!is_array($row)) { //没有足够的金币 if ($needMoney > $cfg_ml->M_Money || $cfg_ml->M_Money == '') { $msgtitle = "你没有权限下载软件:{$arctitle}!"; - $moremsg = "这个软件需要 " . $needMoney . " 金币 才能下载,你目前拥有金币:" . $cfg_ml->M_Money . " 个 !"; - include_once(DEDETEMPLATE . '/plus/view_msg.htm'); + $moremsg = "这个软件需要 ".$needMoney." 金币 才能下载,你目前拥有金币:".$cfg_ml->M_Money." 个 !"; + include_once(DEDETEMPLATE.'/plus/view_msg.htm'); exit(0); } //有足够金币,记录用户信息 $inquery = "INSERT INTO `#@__member_operation`(mid,oldinfo,money,mtime,buyid,product,pname,sta) - VALUES ('" . $cfg_ml->M_ID . "','$arctitle','$needMoney','" . time() . "', 'ARCHIVE" . $id . "', 'archive','下载软件', 2); "; + VALUES ('".$cfg_ml->M_ID."','$arctitle','$needMoney','".time()."', 'ARCHIVE".$id."', 'archive','下载软件', 2); "; //记录定单 if (!$dsql->ExecuteNoneQuery($inquery)) { ShowMsg('记录定单失败, 请返回', '-1'); exit(0); } //扣除金币 - $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET money = money - $needMoney WHERE mid='" . $cfg_ml->M_ID . "'"); + $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET money = money - $needMoney WHERE mid='".$cfg_ml->M_ID."'"); } } } diff --git a/src/plus/erraddsave.php b/src/plus/erraddsave.php index 9494dcef..3df71918 100755 --- a/src/plus/erraddsave.php +++ b/src/plus/erraddsave.php @@ -10,8 +10,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/../include/common.inc.php"); -require_once(DEDEINC . '/memberlogin.class.php'); +require_once(dirname(__FILE__)."/../include/common.inc.php"); +require_once(DEDEINC.'/memberlogin.class.php'); $dopost = isset($dopost) ? $dopost : ""; $aid = isset($aid) ? intval($aid) : 0; diff --git a/src/plus/feedback.php b/src/plus/feedback.php index c72da082..ec7fee4f 100755 --- a/src/plus/feedback.php +++ b/src/plus/feedback.php @@ -10,7 +10,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/../include/common.inc.php"); +require_once(dirname(__FILE__)."/../include/common.inc.php"); if ($cfg_feedback_forbid == 'Y') { echo json_encode(array( @@ -21,7 +21,7 @@ if ($cfg_feedback_forbid == 'Y') { exit(); } -require_once(DEDEINC . "/filter.inc.php"); +require_once(DEDEINC."/filter.inc.php"); if (!isset($action)) { $action = ''; } @@ -47,7 +47,7 @@ if (empty($aid) && empty($fid)) { exit(); } -include_once(DEDEINC . "/memberlogin.class.php"); +include_once(DEDEINC."/memberlogin.class.php"); $cfg_ml = new MemberLogin(); @@ -80,12 +80,12 @@ if ($action == '' || $action == 'show') { $querystring = "SELECT fb.*,mb.userid,mb.face as mface,mb.spacesta,mb.scores,mb.sex FROM `#@__feedback` fb LEFT JOIN `#@__member` mb on mb.mid = fb.mid $where_sql AND fb.ischeck='1' ORDER BY fb.good DESC"; - $dsql->Execute('fb', $querystring . " LIMIT 20 "); + $dsql->Execute('fb', $querystring." LIMIT 20 "); $data = array(); while ($row = $dsql->GetArray('fb')) { - $row['face'] = empty($row['mface']) ? $GLOBALS['cfg_cmspath'] . '/static/img/avatar.png' : $row['mface']; + $row['face'] = empty($row['mface']) ? $GLOBALS['cfg_cmspath'].'/static/img/avatar.png' : $row['mface']; $row['dtimestr'] = MyDate('Y-m-d', $row['dtime']); unset($row['ip']); $data[] = $row; @@ -168,7 +168,7 @@ function __SendFeedback(){ } if ($username != '' && $pwd != '') { $rs = $cfg_ml->CheckUser($username, $pwd); if ($rs == 1) { - $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET logintime='" . time() . "',loginip='" . GetIP() . "' WHERE mid='{$cfg_ml->M_ID}'; "); + $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET logintime='".time()."',loginip='".GetIP()."' WHERE mid='{$cfg_ml->M_ID}'; "); } else { $username = '游客'; } @@ -263,8 +263,8 @@ function __SendFeedback(){ } } //统计用户发出的评论 if ($cfg_ml->M_ID > 0) { - $row = $dsql->GetOne("SELECT COUNT(*) AS nums FROM `#@__feedback` WHERE `mid`='" . $cfg_ml->M_ID . "'"); - $dsql->ExecuteNoneQuery("UPDATE `#@__member_tj` SET `feedback`='$row[nums]' WHERE `mid`='" . $cfg_ml->M_ID . "'"); + $row = $dsql->GetOne("SELECT COUNT(*) AS nums FROM `#@__feedback` WHERE `mid`='".$cfg_ml->M_ID."'"); + $dsql->ExecuteNoneQuery("UPDATE `#@__member_tj` SET `feedback`='$row[nums]' WHERE `mid`='".$cfg_ml->M_ID."'"); } $_SESSION['sedtime'] = time(); diff --git a/src/plus/flink.php b/src/plus/flink.php index cf900fe6..1b64200c 100755 --- a/src/plus/flink.php +++ b/src/plus/flink.php @@ -10,7 +10,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/../include/common.inc.php"); +require_once(dirname(__FILE__)."/../include/common.inc.php"); if (empty($dopost)) $dopost = ''; @@ -35,4 +35,4 @@ if ($dopost == 'save') { } //显示模板(简单PHP文件) -include_once(DEDETEMPLATE . '/plus/flink-list.htm'); +include_once(DEDETEMPLATE.'/plus/flink-list.htm'); diff --git a/src/plus/flink_add.php b/src/plus/flink_add.php index c70bda9a..1d3c1813 100755 --- a/src/plus/flink_add.php +++ b/src/plus/flink_add.php @@ -10,6 +10,6 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/../include/common.inc.php'); +require_once(dirname(__FILE__).'/../include/common.inc.php'); //显示模板(简单PHP文件) -include_once(DEDETEMPLATE . '/plus/flink-add.htm'); +include_once(DEDETEMPLATE.'/plus/flink-add.htm'); diff --git a/src/plus/freelist.php b/src/plus/freelist.php index e66ff8c7..6f3550b7 100755 --- a/src/plus/freelist.php +++ b/src/plus/freelist.php @@ -10,8 +10,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/../include/common.inc.php"); -require_once(DEDEINC . "/arc.freelist.class.php"); +require_once(dirname(__FILE__)."/../include/common.inc.php"); +require_once(DEDEINC."/arc.freelist.class.php"); if (!empty($lid)) $tid = $lid; $tid = (isset($tid) && is_numeric($tid) ? $tid : 0); diff --git a/src/plus/heightsearch.php b/src/plus/heightsearch.php index e61f7716..10774c86 100755 --- a/src/plus/heightsearch.php +++ b/src/plus/heightsearch.php @@ -10,6 +10,6 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/../include/common.inc.php'); -require_once(DEDEINC . '/typelink.class.php'); -require_once(DEDETEMPLATE . '/plus/heightsearch.htm'); +require_once(dirname(__FILE__).'/../include/common.inc.php'); +require_once(DEDEINC.'/typelink.class.php'); +require_once(DEDETEMPLATE.'/plus/heightsearch.htm'); diff --git a/src/plus/list.php b/src/plus/list.php index d477adbc..0d68c15b 100755 --- a/src/plus/list.php +++ b/src/plus/list.php @@ -10,7 +10,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/../include/common.inc.php"); +require_once(dirname(__FILE__)."/../include/common.inc.php"); $t1 = ExecTime(); @@ -40,14 +40,14 @@ if ($tinfos['issystem'] == -1) { if (!empty($nativeplace)) $cArr['nativeplace'] = $nativeplace; if (!empty($infotype)) $cArr['infotype'] = $infotype; if (!empty($keyword)) $cArr['keyword'] = $keyword; - include(DEDEINC . "/arc.sglistview.class.php"); + include(DEDEINC."/arc.sglistview.class.php"); $lv = new SgListView($tid, $cArr); } else { - include(DEDEINC . "/arc.listview.class.php"); + include(DEDEINC."/arc.listview.class.php"); $lv = new ListView($tid); //对设置了会员级别的栏目进行处理 if (isset($lv->Fields['corank']) && $lv->Fields['corank'] > 0) { - require_once(DEDEINC . '/memberlogin.class.php'); + require_once(DEDEINC.'/memberlogin.class.php'); $cfg_ml = new MemberLogin(); if ($cfg_ml->M_Rank < $lv->Fields['corank']) { $dsql->Execute('me', "SELECT * FROM `#@__arcrank` "); @@ -56,8 +56,8 @@ if ($tinfos['issystem'] == -1) { } $memberTypes[0] = "游客或没权限会员"; $msgtitle = "你没有权限浏览栏目:{$lv->Fields['typename']} !"; - $moremsg = "这个栏目需要 " . $memberTypes[$lv->Fields['corank']] . " 才能访问,你目前是:" . $memberTypes[$cfg_ml->M_Rank] . " !"; - include_once(DEDETEMPLATE . '/plus/view_msg_catalog.htm'); + $moremsg = "这个栏目需要 ".$memberTypes[$lv->Fields['corank']]." 才能访问,你目前是:".$memberTypes[$cfg_ml->M_Rank]." !"; + include_once(DEDETEMPLATE.'/plus/view_msg_catalog.htm'); exit(); } } diff --git a/src/plus/mytag_js.php b/src/plus/mytag_js.php index 6dd177c5..b7cac7fa 100755 --- a/src/plus/mytag_js.php +++ b/src/plus/mytag_js.php @@ -10,14 +10,14 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/../include/common.inc.php'); -require_once(DEDEINC . '/arc.partview.class.php'); +require_once(dirname(__FILE__).'/../include/common.inc.php'); +require_once(DEDEINC.'/arc.partview.class.php'); if (isset($arcID)) $aid = $arcID; $arcID = $aid = (isset($aid) && is_numeric($aid)) ? $aid : 0; if ($aid == 0) die(" document.write('Request Error!'); "); -$cacheFile = DEDEDATA . '/cache/mytag-' . $aid . '.htm'; +$cacheFile = DEDEDATA.'/cache/mytag-'.$aid.'.htm'; if (isset($nocache) || !file_exists($cacheFile) || time() - filemtime($cacheFile) > $cfg_puccache_time) { $pv = new PartView(); $row = $pv->dsql->GetOne(" SELECT * FROM `#@__mytag` WHERE aid='$aid' "); diff --git a/src/plus/posttocar.php b/src/plus/posttocar.php index d0ee76eb..b8c435c1 100755 --- a/src/plus/posttocar.php +++ b/src/plus/posttocar.php @@ -10,8 +10,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/../include/common.inc.php"); -require_once DEDEINC . '/shopcar.class.php'; +require_once(dirname(__FILE__)."/../include/common.inc.php"); +require_once DEDEINC.'/shopcar.class.php'; $cart = new MemberShops(); $do = isset($do) ? trim($do) : 'add'; @@ -77,7 +77,7 @@ if ($do == 'add') { $cts = GetChannelTable($rs['channel']); $rows = $dsql->GetOne("SELECT aid as id,trueprice as price,units FROM `$cts[addtable]` WHERE aid='$id'"); if (!is_array($rows)) continue; - $rows['buynum'] = intval(${'buynum' . $id}); + $rows['buynum'] = intval(${'buynum'.$id}); if ($rows['buynum'] < 1) { //如果设单位数量小于1个时更新,则移出购物车 $cart->delItem($id); diff --git a/src/plus/qrcode.php b/src/plus/qrcode.php index 9e224d48..4cd51b36 100755 --- a/src/plus/qrcode.php +++ b/src/plus/qrcode.php @@ -12,8 +12,8 @@ */ $cfg_NotPrintHead = 'Y'; -require_once(dirname(__FILE__) . '/../include/common.inc.php'); -require_once(DEDEINC . '/qrcode.class.php'); +require_once(dirname(__FILE__).'/../include/common.inc.php'); +require_once(DEDEINC.'/qrcode.class.php'); $action = isset($action) ? $action : ''; $type = isset($type) ? RemoveXSS(HtmlReplace($type, 3)) : ''; @@ -22,12 +22,12 @@ if (!in_array($type, array('list', 'arc', 'index'))) $url = "https://www.dedebiz if ($action == 'get_qrcode') { if ($type == 'arc') { - $url = $cfg_basehost . $cfg_plus_dir . '/view.php?aid=' . $id; + $url = $cfg_basehost.$cfg_plus_dir.'/view.php?aid='.$id; } elseif ($type == 'list') { - $url = $cfg_basehost . $cfg_plus_dir . '/list.php?tid=' . $id; + $url = $cfg_basehost.$cfg_plus_dir.'/list.php?tid='.$id; } if ($id == 0) $url = "https://www.dedebiz.com"; - if ($type == 'index') $url = $cfg_basehost . $cfg_plus_dir . '/index.php'; + if ($type == 'index') $url = $cfg_basehost.$cfg_plus_dir.'/index.php'; header("Content-Type: image/png"); $params = array(); @@ -39,7 +39,7 @@ if ($action == 'get_qrcode') { } else { header("Content-Type: text/html; charset={$cfg_soft_lang}"); $dtp = new DedeTemplate(); - $tplfile = DEDETEMPLATE . '/plus/qrcode.htm'; + $tplfile = DEDETEMPLATE.'/plus/qrcode.htm'; $dtp->LoadTemplate($tplfile); $dtp->SetVar('id', $id); $dtp->SetVar('type', $type); diff --git a/src/plus/recommend.php b/src/plus/recommend.php index 88a71803..59c06cca 100755 --- a/src/plus/recommend.php +++ b/src/plus/recommend.php @@ -10,8 +10,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/../include/common.inc.php"); -require_once(DEDEINC . "/channelunit.class.php"); +require_once(dirname(__FILE__)."/../include/common.inc.php"); +require_once(DEDEINC."/channelunit.class.php"); if (!isset($action)) $action = ''; unset($_FILES); if (isset($arcID)) $aid = $arcID; @@ -46,7 +46,7 @@ else if ($action == 'send') { $mailbody .= "$msg \r\n\r\n"; $mailbody .= "Powered by https://www.dedebiz.com DedeBIZ内容管理系统!"; - $headers = "From: " . $cfg_adminemail . "\r\nReply-To: " . $cfg_adminemail; + $headers = "From: ".$cfg_adminemail."\r\nReply-To: ".$cfg_adminemail; if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { $client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); $client->appid = $cfg_bizcore_appid; @@ -56,7 +56,7 @@ else if ($action == 'send') { } else { if ($cfg_sendmail_bysmtp == 'Y' && !empty($cfg_smtp_server)) { $mailtype = 'TXT'; - require_once(DEDEINC . '/mail.class.php'); + require_once(DEDEINC.'/mail.class.php'); $smtp = new smtp($cfg_smtp_server, $cfg_smtp_port, true, $cfg_smtp_usermail, $cfg_smtp_password); $smtp->debug = false; $smtp->sendmail($email, $cfg_webname, $cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype); @@ -75,4 +75,4 @@ if ($arcRow['aid'] == '') { } extract($arcRow, EXTR_OVERWRITE); //显示模板(简单PHP文件) -include(DEDETEMPLATE . '/plus/recommend.htm'); +include(DEDETEMPLATE.'/plus/recommend.htm'); diff --git a/src/plus/rss.php b/src/plus/rss.php index 53557683..c4bf9d43 100755 --- a/src/plus/rss.php +++ b/src/plus/rss.php @@ -10,8 +10,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/../include/common.inc.php'); -require_once(DEDEINC . "/arc.rssview.class.php"); +require_once(dirname(__FILE__).'/../include/common.inc.php'); +require_once(DEDEINC."/arc.rssview.class.php"); $tid = isset($tid) && is_numeric($tid) ? $tid : 0; if ($tid == 0) die(" Request Error! "); diff --git a/src/plus/search.php b/src/plus/search.php index ee55a179..e516b142 100755 --- a/src/plus/search.php +++ b/src/plus/search.php @@ -10,8 +10,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/../include/common.inc.php"); -require_once(DEDEINC . "/arc.searchview.class.php"); +require_once(dirname(__FILE__)."/../include/common.inc.php"); +require_once(DEDEINC."/arc.searchview.class.php"); $pagesize = (isset($pagesize) && is_numeric($pagesize)) ? $pagesize : 10; $typeid = (isset($typeid) && is_numeric($typeid)) ? $typeid : 0; @@ -36,16 +36,16 @@ $oldkeyword = $keyword = FilterSearch(stripslashes($keyword)); //查找栏目信息 if (empty($typeid)) { - $typenameCacheFile = DEDEDATA . '/cache/typename.inc'; + $typenameCacheFile = DEDEDATA.'/cache/typename.inc'; if (!file_exists($typenameCacheFile) || filemtime($typenameCacheFile) < time() - (3600 * 24)) { - $fp = fopen(DEDEDATA . '/cache/typename.inc', 'w'); - fwrite($fp, "<" . "?php\r\n"); + $fp = fopen(DEDEDATA.'/cache/typename.inc', 'w'); + fwrite($fp, "<"."?php\r\n"); $dsql->SetQuery("Select id,typename,channeltype From `#@__arctype`"); $dsql->Execute(); while ($row = $dsql->GetArray()) { fwrite($fp, "\$typeArr[{$row['id']}] = '{$row['typename']}';\r\n"); } - fwrite($fp, '?' . '>'); + fwrite($fp, '?'.'>'); fclose($fp); } //引入栏目缓存并看关键字是否有相关栏目内容 @@ -66,7 +66,7 @@ if (empty($typeid)) { $keyword = addslashes(cn_substr($keyword, 30)); $typeid = intval($typeid); -if ($cfg_notallowstr != '' && preg_match("#" . $cfg_notallowstr . "#i", $keyword)) { +if ($cfg_notallowstr != '' && preg_match("#".$cfg_notallowstr."#i", $keyword)) { ShowMsg("你的搜索关键字中存在非法内容,被系统禁止!", "-1"); exit(); } @@ -85,7 +85,7 @@ $row = $dsql->GetOne("SELECT * FROM `#@__search_limits` WHERE ip='{$ip}'"); if (is_array($row)) { if (($now - $row['searchtime']) < $cfg_search_time) { - ShowMsg('管理员设定搜索时间间隔为' . $cfg_search_time . '秒,请稍后再试!', '-1'); + ShowMsg('管理员设定搜索时间间隔为'.$cfg_search_time.'秒,请稍后再试!', '-1'); exit; } $dsql->ExecuteNoneQuery("UPDATE `#@__search_limits` SET `searchtime`='{$now}' WHERE `ip`='{$ip}';"); diff --git a/src/plus/showphoto.php b/src/plus/showphoto.php index ee879570..06409664 100755 --- a/src/plus/showphoto.php +++ b/src/plus/showphoto.php @@ -10,8 +10,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/../include/common.inc.php"); -require_once(DEDEINC . "/channelunit.class.php"); +require_once(dirname(__FILE__)."/../include/common.inc.php"); +require_once(DEDEINC."/channelunit.class.php"); if (isset($arcID)) $aid = $arcID; $arcID = $aid = (isset($aid) && is_numeric($aid)) ? $aid : 0; @@ -63,21 +63,21 @@ foreach ($dtp->CTags as $ctag) { } unset($dtp); if ($cfg_multi_site == 'Y') { - if (!preg_match("/^http:/i", $preSrc) && !empty($preSrc)) $preSrc = $cfg_basehost . $preSrc; - if (!preg_match("/^http:/i", $nextSrc) && !empty($nextSrc)) $nextSrc = $cfg_basehost . $nextSrc; + if (!preg_match("/^http:/i", $preSrc) && !empty($preSrc)) $preSrc = $cfg_basehost.$preSrc; + if (!preg_match("/^http:/i", $nextSrc) && !empty($nextSrc)) $nextSrc = $cfg_basehost.$nextSrc; } if ($preSrc != '') { - $pageGuide .= "<<上一幅图片 "; + $pageGuide .= "<<上一幅图片 "; } else { $pageGuide .= "这是开始"; } $nextlink = 'javascript:;'; if ($nextSrc != '') { - $nextlink = "showphoto.php?aid={$aid}&src=" . urlencode($nextSrc) . "&npos=" . ($npos + 1); + $nextlink = "showphoto.php?aid={$aid}&src=".urlencode($nextSrc)."&npos=".($npos + 1); if ($pageGuide != "") $pageGuide .= " | "; - $pageGuide .= "下一幅图片>>"; + $pageGuide .= "下一幅图片>>"; } else { $pageGuide .= " | 没有了"; } -require_once(DEDETEMPLATE . '/plus/showphoto.htm'); +require_once(DEDETEMPLATE.'/plus/showphoto.htm'); exit(); diff --git a/src/plus/stow.php b/src/plus/stow.php index def80c74..469e72bd 100755 --- a/src/plus/stow.php +++ b/src/plus/stow.php @@ -10,7 +10,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/../include/common.inc.php"); +require_once(dirname(__FILE__)."/../include/common.inc.php"); $aid = (isset($aid) && is_numeric($aid)) ? $aid : 0; $type = empty($type) ? "" : HtmlReplace($type, 1); @@ -19,7 +19,7 @@ if ($aid == 0) { exit(); } -require_once(DEDEINC . "/memberlogin.class.php"); +require_once(DEDEINC."/memberlogin.class.php"); $ml = new MemberLogin(); if ($ml->M_ID == 0) { @@ -41,17 +41,17 @@ if ($type == '') { $row = $dsql->GetOne("SELECT * FROM `#@__member_stow` WHERE aid='$aid' And mid='{$ml->M_ID}' AND type IS NULL "); if (!is_array($row)) { - $dsql->ExecuteNoneQuery("INSERT INTO `#@__member_stow`(mid,aid,title,addtime) VALUES ('" . $ml->M_ID . "','$aid','" . addslashes($arctitle) . "','$addtime'); "); + $dsql->ExecuteNoneQuery("INSERT INTO `#@__member_stow`(mid,aid,title,addtime) VALUES ('".$ml->M_ID."','$aid','".addslashes($arctitle)."','$addtime'); "); } } else { $row = $dsql->GetOne("SELECT * FROM `#@__member_stow` WHERE type='$type' AND (aid='$aid' AND mid='{$ml->M_ID}')"); if (!is_array($row)) { - $dsql->ExecuteNoneQuery("INSERT INTO `#@__member_stow`(mid,aid,title,addtime,type) VALUES ('" . $ml->M_ID . "','$aid','$title','$addtime','$type'); "); + $dsql->ExecuteNoneQuery("INSERT INTO `#@__member_stow`(mid,aid,title,addtime,type) VALUES ('".$ml->M_ID."','$aid','$title','$addtime','$type'); "); } } //更新用户统计 $row = $dsql->GetOne("SELECT COUNT(*) AS nums FROM `#@__member_stow` WHERE `mid`='{$ml->M_ID}' "); -$dsql->ExecuteNoneQuery("UPDATE `#@__member_tj` SET `stow`='{$row['nums']}' WHERE `mid`='" . $ml->M_ID . "'"); +$dsql->ExecuteNoneQuery("UPDATE `#@__member_tj` SET `stow`='{$row['nums']}' WHERE `mid`='".$ml->M_ID."'"); ShowMsg('成功收藏一篇文档!', 'javascript:window.close();'); diff --git a/src/plus/vdimgck.php b/src/plus/vdimgck.php index c7e56a4a..65885292 100755 --- a/src/plus/vdimgck.php +++ b/src/plus/vdimgck.php @@ -9,22 +9,22 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . '/../include/common.inc.php'); -require_once(DEDEDATA . '/safe/inc_safe_config.php'); -require_once(DEDEDATA . '/config.cache.inc.php'); +require_once(dirname(__FILE__).'/../include/common.inc.php'); +require_once(DEDEDATA.'/safe/inc_safe_config.php'); +require_once(DEDEDATA.'/config.cache.inc.php'); $config = array( 'font_size' => 20, 'img_height' => $safe_wheight, 'word_type' => (int)$safe_codetype, // 1:数字 2:英文 3:单词 'img_width' => $safe_wwidth, 'use_boder' => TRUE, - 'font_file' => DEDEINC . '/data/fonts/' . mt_rand(1, 6) . '.ttf', - 'wordlist_file' => DEDEINC . '/data/words/words.txt', + '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}"; +$sessSavePath = DEDEDATA."/sessions_{$enkey}"; if (!is_dir($sessSavePath)) mkdir($sessSavePath); // Session保存路径 @@ -39,7 +39,7 @@ if (!echo_validate_image($config)) { @session_start(); $_SESSION['securimage_code_value'] = strtolower('abcd'); if (function_exists('imagecreatefromjpeg')) { - $im = @imagecreatefromjpeg(DEDEINC . '/data/vdcode.jpg'); + $im = @imagecreatefromjpeg(DEDEINC.'/data/vdcode.jpg'); header("Pragma:no-cache\r\n"); header("Cache-Control:no-cache\r\n"); header("Expires:0\r\n"); @@ -49,8 +49,8 @@ if (!echo_validate_image($config)) { header("Pragma:no-cache\r\n"); header("Cache-Control:no-cache\r\n"); header("Expires:0\r\n"); - $c = file_get_contents(DEDEINC . '/data/vdcode.jpg', true); - $size = filesize(DEDEINC . '/data/vdcode.jpg'); + $c = file_get_contents(DEDEINC.'/data/vdcode.jpg', true); + $size = filesize(DEDEINC.'/data/vdcode.jpg'); header('Content-Type: image/x-icon'); header("Content-length: $size"); echo $c; @@ -69,7 +69,7 @@ function echo_validate_image($config = array()) $font_size = isset($config['font_size']) ? $config['font_size'] : 14; $img_height = isset($config['img_height']) ? $config['img_height'] : 38; $img_width = isset($config['img_width']) ? $config['img_width'] : 68; - $font_file = isset($config['font_file']) ? $config['font_file'] : DEDEINC . '/data/font/' . mt_rand(1, 6) . '.ttf'; + $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; diff --git a/src/plus/view.php b/src/plus/view.php index f3e5ec20..b4f62352 100755 --- a/src/plus/view.php +++ b/src/plus/view.php @@ -14,8 +14,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/../include/common.inc.php"); -require_once(DEDEINC . '/arc.archives.class.php'); +require_once(dirname(__FILE__)."/../include/common.inc.php"); +require_once(DEDEINC.'/arc.archives.class.php'); $t1 = ExecTime(); @@ -34,7 +34,7 @@ if ($arc->IsError) ParamError(); $needMoney = $arc->Fields['money']; $needRank = $arc->Fields['arcrank']; -require_once(DEDEINC . '/memberlogin.class.php'); +require_once(DEDEINC.'/memberlogin.class.php'); $cfg_ml = new MemberLogin(); if ($needRank < 0 && $arc->Fields['mid'] != $cfg_ml->M_ID) { @@ -50,8 +50,8 @@ if ($needMoney > 0 || $needRank > 1) { $arclink = GetFileUrl($arc->ArcID,$arc->Fields["typeid"],$arc->Fields["senddate"], $arc->Fields["title"],$arc->Fields["ismake"],$arc->Fields["arcrank"]); */ - $arclink = $cfg_phpurl . '/view.php?aid=' . $arc->ArcID; - $arcLinktitle = "" . $arctitle . ""; + $arclink = $cfg_phpurl.'/view.php?aid='.$arc->ArcID; + $arcLinktitle = "".$arctitle.""; $description = $arc->Fields["description"]; $pubdate = GetDateTimeMk($arc->Fields["pubdate"]); @@ -64,35 +64,35 @@ if ($needMoney > 0 || $needRank > 1) { } $memberTypes[0] = "游客或没权限会员"; $msgtitle = "你没有权限浏览文档:{$arctitle} !"; - $moremsg = "这篇文档需要 " . $memberTypes[$needRank] . " 才能访问,你目前是:" . $memberTypes[$cfg_ml->M_Rank] . " !"; - include_once(DEDETEMPLATE . '/plus/view_msg.htm'); + $moremsg = "这篇文档需要 ".$memberTypes[$needRank]." 才能访问,你目前是:".$memberTypes[$cfg_ml->M_Rank]." !"; + include_once(DEDETEMPLATE.'/plus/view_msg.htm'); exit(); } //需要金币的情况 if ($needMoney > 0 && $arc->Fields['mid'] != $cfg_ml->M_ID) { - $sql = "SELECT aid,money FROM `#@__member_operation` WHERE buyid='ARCHIVE" . $aid . "' AND mid='" . $cfg_ml->M_ID . "'"; + $sql = "SELECT aid,money FROM `#@__member_operation` WHERE buyid='ARCHIVE".$aid."' AND mid='".$cfg_ml->M_ID."'"; $row = $dsql->GetOne($sql); //未购买过此文章 if (!is_array($row)) { if ($cfg_ml->M_Money == '' || $needMoney > $cfg_ml->M_Money) { $msgtitle = "你没有权限浏览文档:{$arctitle} !"; - $moremsg = "这篇文档需要 " . $needMoney . " 金币 才能访问,你目前拥有金币:" . $cfg_ml->M_Money . " 个 !"; - include_once(DEDETEMPLATE . '/plus/view_msg.htm'); + $moremsg = "这篇文档需要 ".$needMoney." 金币 才能访问,你目前拥有金币:".$cfg_ml->M_Money." 个 !"; + include_once(DEDETEMPLATE.'/plus/view_msg.htm'); $arc->Close(); exit(); } else { if ($dopost == 'buy') { $inquery = "INSERT INTO `#@__member_operation`(mid,oldinfo,money,mtime,buyid,product,pname) - VALUES ('" . $cfg_ml->M_ID . "','$arctitle','$needMoney','" . time() . "', 'ARCHIVE" . $aid . "', 'archive',''); "; + VALUES ('".$cfg_ml->M_ID."','$arctitle','$needMoney','".time()."', 'ARCHIVE".$aid."', 'archive',''); "; if ($dsql->ExecuteNoneQuery($inquery)) { - $inquery = "UPDATE `#@__member` SET money=money-$needMoney WHERE mid='" . $cfg_ml->M_ID . "'"; + $inquery = "UPDATE `#@__member` SET money=money-$needMoney WHERE mid='".$cfg_ml->M_ID."'"; if (!$dsql->ExecuteNoneQuery($inquery)) { showmsg('购买失败, 请返回', -1); exit; } - showmsg('购买成功,购买扣点不会重扣金币,谢谢!', '/plus/view.php?aid=' . $aid); + showmsg('购买成功,购买扣点不会重扣金币,谢谢!', '/plus/view.php?aid='.$aid); exit; } else { showmsg('购买失败, 请返回', -1); @@ -101,8 +101,8 @@ if ($needMoney > 0 || $needRank > 1) { } $msgtitle = "扣金币购买阅读!"; - $moremsg = "阅读该文档内容需要付费!
    这篇文档需要 " . $needMoney . " 金币 才能访问,你目前拥有金币 " . $cfg_ml->M_Money . " 个!
    确认阅读请点 [确认付点阅读]"; - include_once($cfg_basedir . $cfg_templets_dir . "/plus/view_msg.htm"); + $moremsg = "阅读该文档内容需要付费!
    这篇文档需要 ".$needMoney." 金币 才能访问,你目前拥有金币 ".$cfg_ml->M_Money." 个!
    确认阅读请点 [确认付点阅读]"; + include_once($cfg_basedir.$cfg_templets_dir."/plus/view_msg.htm"); $arc->Close(); exit(); } diff --git a/src/plus/vote.php b/src/plus/vote.php index c3006eec..b42357c4 100755 --- a/src/plus/vote.php +++ b/src/plus/vote.php @@ -10,18 +10,18 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require(dirname(__FILE__) . "/../include/common.inc.php"); -require(DEDEINC . "/dedevote.class.php"); -require(DEDEINC . "/memberlogin.class.php"); -require(DEDEINC . "/userlogin.class.php"); +require(dirname(__FILE__)."/../include/common.inc.php"); +require(DEDEINC."/dedevote.class.php"); +require(DEDEINC."/memberlogin.class.php"); +require(DEDEINC."/userlogin.class.php"); $member = new MemberLogin; $memberID = $member->M_LoginID; $time = time(); -$content = $memberID . '|' . $time; -$file = DEDEDATA . '/cache/vote_' . $aid . '_' . $member->M_ID . '.inc'; //存放会员投票记录的缓存文件 +$content = $memberID.'|'.$time; +$file = DEDEDATA.'/cache/vote_'.$aid.'_'.$member->M_ID.'.inc'; //存放会员投票记录的缓存文件 -$loginurl = $cfg_basehost . "/member"; +$loginurl = $cfg_basehost."/member"; $ENV_GOBACK_URL = empty($_SERVER['HTTP_REFERER']) ? '' : $_SERVER['HTTP_REFERER']; if (empty($dopost)) $dopost = ''; @@ -49,7 +49,7 @@ if ($row['isallow'] == 1) { if ($dopost == 'send') { if (!empty($voteitem)) { - $rsmsg = "
     你方才的投票状态:" . $vo->SaveVote($voteitem) . "
    "; + $rsmsg = "
     你方才的投票状态:".$vo->SaveVote($voteitem)."
    "; } else { $rsmsg = "
     你刚才没选择任何投票项目!
    "; } @@ -76,4 +76,4 @@ if ($dopost == 'view') { } } //显示模板(简单PHP文件) -include(DEDETEMPLATE . '/plus/vote.htm'); +include(DEDETEMPLATE.'/plus/vote.htm'); diff --git a/src/special/index.php b/src/special/index.php index 05bbd8df..919fbc76 100755 --- a/src/special/index.php +++ b/src/special/index.php @@ -8,10 +8,10 @@ * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/../include/common.inc.php"); -require_once(DEDEINC . "/arc.specview.class.php"); +require_once(dirname(__FILE__)."/../include/common.inc.php"); +require_once(DEDEINC."/arc.specview.class.php"); if (strlen($art_shortname) > 6) exit("art_shortname too long!"); -$specfile = dirname(__FILE__) . "spec_1" . $art_shortname; +$specfile = dirname(__FILE__)."spec_1".$art_shortname; //如果已经编译静态列表,则直接引入第一个文件 if (file_exists($specfile)) { include($specfile); diff --git a/src/tags.php b/src/tags.php index 3477cd78..9a319b9c 100755 --- a/src/tags.php +++ b/src/tags.php @@ -7,8 +7,8 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(dirname(__FILE__) . "/include/common.inc.php"); -require_once(DEDEINC . "/arc.taglist.class.php"); +require_once(dirname(__FILE__)."/include/common.inc.php"); +require_once(DEDEINC."/arc.taglist.class.php"); $PageNo = 1; if (isset($_SERVER['QUERY_STRING'])) {