diff --git a/src/dede/catalog_do.php b/src/dede/catalog_do.php index 58803c1d..3e9f5aaf 100755 --- a/src/dede/catalog_do.php +++ b/src/dede/catalog_do.php @@ -1,4 +1,5 @@ GetOne("SELECT addcon FROM #@__channeltype WHERE id='$channelid'"); - } - else - { + } else { //根据栏目调用发布表单 $row = $dsql->GetOne("SELECT ch.addcon FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.id='$cid' "); } $gurl = $row["addcon"]; - if($gurl=="") - { - ShowMsg("对不起,你指的栏目可能有误!","catalog_main.php"); + if ($gurl == "") { + ShowMsg("对不起,你指的栏目可能有误!", "catalog_main.php"); exit(); } @@ -54,188 +48,146 @@ if($dopost=="addArchives") /*-------------------------- //管理文档 function listArchives(); ----------------------------*/ -else if($dopost=="listArchives") -{ - if(!empty($gurl)) - { - if(empty($arcrank)) - { +---------------------------*/ else if ($dopost == "listArchives") { + if (!empty($gurl)) { + if (empty($arcrank)) { $arcrank = ''; } - $gurl = str_replace('..','',$gurl); + $gurl = str_replace('..', '', $gurl); header("location:{$gurl}?arcrank={$arcrank}&cid={$cid}"); exit(); } - if($cid>0) - { + if ($cid > 0) { $row = $dsql->GetOne("SELECT #@__arctype.typename,#@__channeltype.typename AS channelname,#@__channeltype.id,#@__channeltype.mancon FROM #@__arctype LEFT JOIN #@__channeltype on #@__channeltype.id=#@__arctype.channeltype WHERE #@__arctype.id='$cid'"); $gurl = $row["mancon"]; $channelid = $row["id"]; $typename = $row["typename"]; $channelname = $row["channelname"]; - if($gurl=="") - { - ShowMsg("对不起,你指的栏目可能有误!","catalog_main.php"); + if ($gurl == "") { + ShowMsg("对不起,你指的栏目可能有误!", "catalog_main.php"); exit(); } - } - else if($channelid>0) - { + } else if ($channelid > 0) { $row = $dsql->GetOne("SELECT typename,id,mancon FROM #@__channeltype WHERE id='$channelid'"); $gurl = $row["mancon"]; $channelid = $row["id"]; $typename = ""; $channelname = $row["typename"]; } - - if(empty($gurl)) $gurl = 'content_list.php'; + + if (empty($gurl)) $gurl = 'content_list.php'; header("location:{$gurl}?channelid={$channelid}&cid={$cid}"); exit(); } /*-------------------------- //浏览通用模板目录 function viewTempletDir(); ----------------------------*/ -else if($dopost=="viewTemplet") -{ - header("location:tpl.php?path=/".$cfg_df_style); - exit(); -} - -/*-------------------------- -//留言簿管理 -function GoGuestBook(); ----------------------------*/ -else if($dopost=="guestbook") -{ - ShowMsg("正在跳转到留言本>>", "{$cfg_phpurl}/guestbook.php?gotopagerank=admin"); +---------------------------*/ else if ($dopost == "viewTemplet") { + header("location:tpl.php?path=/" . $cfg_df_style); exit(); } /*------------------------ 浏览单个页面的栏目 function ViewSgPage() -------------------------*/ -else if($dopost=="viewSgPage") -{ - require_once(DEDEINC."/arc.listview.class.php"); +------------------------*/ else if ($dopost == "viewSgPage") { + require_once(DEDEINC . "/arc.listview.class.php"); $lv = new ListView($cid); $pageurl = $lv->MakeHtml(); - ShowMsg("更新缓冲,请稍后...",$pageurl); + ShowMsg("更新缓冲,请稍后...", $pageurl); exit(); } /*------------------------ 更改栏目排列顺序 function upRank() -------------------------*/ -else if($dopost=="upRank") -{ +------------------------*/ else if ($dopost == "upRank") { //检查权限许可 CheckPurview('t_Edit,t_AccEdit'); //检查栏目操作许可 - CheckCatalog($cid,"你无权更改本栏目!"); + CheckCatalog($cid, "你无权更改本栏目!"); $row = $dsql->GetOne("SELECT reid,sortrank FROM #@__arctype WHERE id='$cid'"); $reid = $row['reid']; $sortrank = $row['sortrank']; $row = $dsql->GetOne("SELECT sortrank FROM #@__arctype WHERE sortrank<=$sortrank AND reid=$reid ORDER BY sortrank DESC "); - if(is_array($row)) - { - $sortrank = $row['sortrank']-1; + if (is_array($row)) { + $sortrank = $row['sortrank'] - 1; $dsql->ExecuteNoneQuery("UPDATE #@__arctype SET sortrank='$sortrank' WHERE id='$cid'"); } UpDateCatCache(); - ShowMsg("操作成功,返回目录...","catalog_main.php"); + ShowMsg("操作成功,返回目录...", "catalog_main.php"); exit(); -} -else if($dopost=="upRankAll") -{ +} else if ($dopost == "upRankAll") { //检查权限许可 CheckPurview('t_Edit'); $row = $dsql->GetOne("SELECT id FROM #@__arctype ORDER BY id DESC"); - if(is_array($row)) - { + 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}';"); + for ($i = 1; $i <= $maxID; $i++) { + if (isset(${'sortrank' . $i})) { + $dsql->ExecuteNoneQuery("UPDATE #@__arctype SET sortrank='" . (${'sortrank' . $i}) . "' WHERE id='{$i}';"); } } } UpDateCatCache(); - ShowMsg("操作成功,正在返回...","catalog_main.php"); + ShowMsg("操作成功,正在返回...", "catalog_main.php"); exit(); } /*-------------------------- //更新栏目缓存 function UpCatlogCache(); ----------------------------*/ -else if($dopost=="upcatcache") -{ +---------------------------*/ else if ($dopost == "upcatcache") { UpDateCatCache(); $sql = " TRUNCATE TABLE `#@__arctiny`"; $dsql->ExecuteNoneQuery($sql); - + //导入普通模型微数据 $sql = "INSERT INTO `#@__arctiny`(id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid) SELECT id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid FROM `#@__archives` "; $dsql->ExecuteNoneQuery($sql); - + //导入单表模型微数据 $dsql->SetQuery("SELECT id,addtable FROM `#@__channeltype` WHERE id < -1 "); $dsql->Execute(); $doarray = array(); - while($row = $dsql->GetArray()) - { + while ($row = $dsql->GetArray()) { $tb = str_replace('#@__', $cfg_dbprefix, $row['addtable']); - if(empty($tb) || isset($doarray[$tb]) ) - { + if (empty($tb) || isset($doarray[$tb])) { continue; - } - else - { + } else { $sql = "INSERT INTO `#@__arctiny`(id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid) SELECT aid, typeid, 0, arcrank, channel, senddate, 0, mid FROM `$tb` "; - $rs = $dsql->executenonequery($sql); + $rs = $dsql->executenonequery($sql); $doarray[$tb] = 1; } } - ShowMsg("操作成功,正在返回...","catalog_main.php"); + ShowMsg("操作成功,正在返回...", "catalog_main.php"); exit(); } /*--------------------- 获取JS文件 function GetJs -----------------------*/ -else if($dopost=="GetJs") -{ +----------------------*/ else if ($dopost == "GetJs") { header("location:makehtml_js.php"); exit(); } /*----------- 获得子类的内容 function GetSunListsMenu(); ------------*/ -else if($dopost=="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,"/"); + PutCookie('lastCidMenu', $cid, 3600 * 24, "/"); $tu = new TypeUnit($userChannel); - $tu->LogicListAllSunType($cid," "); + $tu->LogicListAllSunType($cid, " "); } /*----------- 获得子类的内容 function GetSunLists(); ------------*/ -else if($dopost=="GetSunLists") -{ - require_once(DEDEINC."/typeunit.class.admin.php"); +-----------*/ else if ($dopost == "GetSunLists") { + require_once(DEDEINC . "/typeunit.class.admin.php"); AjaxHead(); - PutCookie('lastCid', $cid, 3600*24, "/"); + PutCookie('lastCid', $cid, 3600 * 24, "/"); $tu = new TypeUnit(); $tu->dsql = $dsql; echo " \r\n"; @@ -246,23 +198,19 @@ else if($dopost=="GetSunLists") /*---------------- 合并栏目 function unitCatalog() { } ------------------*/ -else if($dopost == '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'); - if(empty($nextjob)) - { + 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' "); $tl = new TypeLink($typeid); $typename = $tl->TypeInfos['typename']; $reid = $tl->TypeInfos['reid']; $channelid = $tl->TypeInfos['channeltype']; - if(!empty($row['dd'])) - { + if (!empty($row['dd'])) { ShowMsg("栏目: $typename($typeid) 有子栏目,不能进行合并操作!", '-1'); exit(); } @@ -282,21 +230,17 @@ else if($dopost == 'unitCatalog') $winform = $win->GetWindow('ok'); $win->Display(); exit(); - } - else - { - if($typeid==$unittype) - { + } else { + if ($typeid == $unittype) { ShowMsg("同一栏目无法合并,请后退重试!", '-1'); exit(); } - if(IsParent($unittype, $typeid)) - { + if (IsParent($unittype, $typeid)) { ShowMsg('不能从父类合并到子类!', 'catalog_main.php'); exit(); } $row = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); - $addtable = (empty($row['addtable']) ? '#@__addonarticle' : $row['addtable'] ); + $addtable = (empty($row['addtable']) ? '#@__addonarticle' : $row['addtable']); $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET typeid='$unittype' WHERE typeid='$typeid' "); $dsql->ExecuteNoneQuery("UPDATE `#@__feedback` SET typeid='$unittype' WHERE typeid='$typeid' "); $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET typeid='$unittype' WHERE typeid='$typeid' "); @@ -312,20 +256,17 @@ else if($dopost == 'unitCatalog') /*---------------- 移动栏目 function moveCatalog() { } ------------------*/ -else if($dopost == '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'); - if(empty($nextjob)) - { + 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']; $reid = $tl->TypeInfos['reid']; $channelid = $tl->TypeInfos['channeltype']; - $typeOptions = $tl->GetOptionArray(0,0,$channelid); + $typeOptions = $tl->GetOptionArray(0, 0, $channelid); $wintitle = "移动栏目"; $wecome_info = "栏目管理 >> 移动栏目"; $win = new OxWindow(); @@ -335,22 +276,18 @@ else if($dopost == 'moveCatalog') $win->AddHidden('channelid', $channelid); $win->AddHidden('nextjob', 'unitok'); $win->AddTitle("移动目录时不会删除原来已创建的列表,移动后需重新对栏目创建HTML。"); - $win->AddItem('你选择的栏目是:',"$typename($typeid)"); - $win->AddItem('你希望移动到那个栏目?',""); - $win->AddItem('注意事项:','不允许从父级移动到子级目录,只允许子级到更高级或同级或不同父级的情况。'); + $win->AddItem('你选择的栏目是:', "$typename($typeid)"); + $win->AddItem('你希望移动到那个栏目?', ""); + $win->AddItem('注意事项:', '不允许从父级移动到子级目录,只允许子级到更高级或同级或不同父级的情况。'); $winform = $win->GetWindow('ok'); $win->Display(); exit(); - } - else - { - if($typeid==$movetype) - { + } else { + if ($typeid == $movetype) { ShowMsg('移对对象和目标位置相同!', 'catalog_main.php'); exit(); } - if(IsParent($movetype, $typeid)) - { + if (IsParent($movetype, $typeid)) { ShowMsg('不能从父类移动到子类!', 'catalog_main.php'); exit(); } @@ -359,4 +296,4 @@ else if($dopost == 'moveCatalog') ShowMsg('成功移动目录!', 'catalog_main.php'); exit(); } -} \ No newline at end of file +} diff --git a/src/dede/file_class.php b/src/dede/file_class.php index d1c02cdb..b7075975 100755 --- a/src/dede/file_class.php +++ b/src/dede/file_class.php @@ -1,4 +1,4 @@ -baseDir.$this->activeDir."/".$oldname; - $newname = $this->baseDir.$this->activeDir."/".$newname; - if(($newname!=$oldname) && is_writable($oldname)) - { - rename($oldname,$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; } @@ -42,17 +41,14 @@ class FileManagement function NewDir($dirname) { $newdir = $dirname; - $dirname = $this->baseDir.$this->activeDir."/".$dirname; - if(is_writable($this->baseDir.$this->activeDir)) - { - MkdirAll($dirname,$GLOBALS['cfg_dir_purview']); + $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); + } else { + ShowMsg("创建新目录失败,因为这个位置不允许写入!", "file_manage_main.php?activepath=" . $this->activeDir); return 0; } } @@ -67,41 +63,31 @@ class FileManagement */ function MoveFile($mfile, $mpath) { - if($mpath!="" && !preg_match("#\.\.#", $mpath)) - { - $oldfile = $this->baseDir.$this->activeDir."/$mfile"; - $mpath = str_replace("\\","/",$mpath); + if ($mpath != "" && !preg_match("#\.\.#", $mpath)) { + $oldfile = $this->baseDir . $this->activeDir . "/$mfile"; + $mpath = str_replace("\\", "/", $mpath); $mpath = preg_replace("#\/{1,}#", "/", $mpath); - if(!preg_match("#^/#", $mpath)) - { - $mpath = $this->activeDir."/".$mpath; + if (!preg_match("#^/#", $mpath)) { + $mpath = $this->activeDir . "/" . $mpath; } - $truepath = $this->baseDir.$mpath; - if(is_readable($oldfile) && is_readable($truepath) && is_writable($truepath)) - { - if(is_dir($truepath)) - { - copy($oldfile, $truepath."/$mfile"); - } - else - { + $truepath = $this->baseDir . $mpath; + if (is_readable($oldfile) && is_readable($truepath) && is_writable($truepath)) { + if (is_dir($truepath)) { + 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); + ShowMsg("成功移动文件!", "file_manage_main.php?activepath=$mpath", 0, 1000); return 1; - } - else - { - ShowMsg("移动文件 $oldfile -> $truepath/$mfile 失败,可能是某个位置权限不足!","file_manage_main.php?activepath=$mpath",0,1000); + } else { + ShowMsg("移动文件 $oldfile -> $truepath/$mfile 失败,可能是某个位置权限不足!", "file_manage_main.php?activepath=$mpath", 0, 1000); return 0; } - } - else - { - ShowMsg("对不起,你移动的路径不合法!","-1",0,5000); + } else { + ShowMsg("对不起,你移动的路径不合法!", "-1", 0, 5000); return 0; } } @@ -113,23 +99,16 @@ class FileManagement */ function RmDirFiles($indir) { - if(!is_dir($indir)) - { - return ; + if (!is_dir($indir)) { + return; } $dh = dir($indir); - while($filename = $dh->read()) - { - if($filename == "." || $filename == "..") - { + while ($filename = $dh->read()) { + if ($filename == "." || $filename == "..") { continue; - } - else if(is_file("$indir/$filename")) - { + } else if (is_file("$indir/$filename")) { @unlink("$indir/$filename"); - } - else - { + } else { $this->RmDirFiles("$indir/$filename"); } } @@ -147,19 +126,13 @@ class FileManagement function GetMatchFiles($indir, $fileexp, &$filearr) { $dh = dir($indir); - while($filename = $dh->read()) - { - $truefile = $indir.'/'.$filename; - if($filename == "." || $filename == "..") - { + while ($filename = $dh->read()) { + $truefile = $indir . '/' . $filename; + if ($filename == "." || $filename == "..") { continue; - } - else if(is_dir($truefile)) - { + } else if (is_dir($truefile)) { $this->GetMatchFiles($truefile, $fileexp, $filearr); - } - else if(preg_match("/\.(".$fileexp.")/i",$filename)) - { + } else if (substr($filename, -strlen($fileexp)) === $fileexp) { $filearr[] = $truefile; } } @@ -174,26 +147,21 @@ class FileManagement */ function DeleteFile($filename) { - $filename = $this->baseDir.$this->activeDir."/$filename"; - if(is_file($filename)) - { - @unlink($filename); $t="文件"; - } - else - { + $filename = $this->baseDir . $this->activeDir . "/$filename"; + if (is_file($filename)) { + @unlink($filename); + $t = "文件"; + } else { $t = "目录"; - if($this->allowDeleteDir==1) - { + if ($this->allowDeleteDir == 1) { $this->RmDirFiles($filename); - } else - { + } 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; } } @@ -201,22 +169,17 @@ class FileManagement //目录文件大小检测类 class SpaceUse { - var $totalsize=0; + var $totalsize = 0; function checksize($indir) { - $dh=dir($indir); - while($filename=$dh->read()) - { - if(!preg_match("#^\.#", $filename)) - { - if(is_dir("$indir/$filename")) - { + $dh = dir($indir); + while ($filename = $dh->read()) { + if (!preg_match("#^\.#", $filename)) { + if (is_dir("$indir/$filename")) { $this->checksize("$indir/$filename"); - } - else - { - $this->totalsize=$this->totalsize + filesize("$indir/$filename"); + } else { + $this->totalsize = $this->totalsize + filesize("$indir/$filename"); } } } @@ -224,24 +187,22 @@ class SpaceUse function setkb($size) { - $size=$size/1024; + $size = $size / 1024; - if($size>0) - { - list($t1,$t2)=explode(".",$size); - $size=$t1.".".substr($t2,0,1); + if ($size > 0) { + list($t1, $t2) = explode(".", $size); + $size = $t1 . "." . substr($t2, 0, 1); } return $size; } function setmb($size) { - $size=$size/1024/1024; - if($size>0) - { - list($t1,$t2)=explode(".",$size); - $size=$t1.".".substr($t2,0,2); + $size = $size / 1024 / 1024; + if ($size > 0) { + list($t1, $t2) = explode(".", $size); + $size = $t1 . "." . substr($t2, 0, 2); } return $size; } -} \ No newline at end of file +} diff --git a/src/include/taglib/help/memberinfos.txt b/src/include/taglib/help/memberinfos.txt deleted file mode 100755 index dd99b758..00000000 --- a/src/include/taglib/help/memberinfos.txt +++ /dev/null @@ -1,5 +0,0 @@ -文档关连的用户信息 ->>dede>> -{dede:memberinfos /} ->>dede>> -无属性,支持 innertext \ No newline at end of file diff --git a/src/include/taglib/memberinfos.lib.php b/src/include/taglib/memberinfos.lib.php deleted file mode 100755 index 0ede34e0..00000000 --- a/src/include/taglib/memberinfos.lib.php +++ /dev/null @@ -1,62 +0,0 @@ -CAttribute->Items,$attlist); - extract($ctag->CAttribute->Items, EXTR_SKIP); - - if(empty($mid)) - { - if(!empty($refObj->Fields['mid'])) $mid = $refObj->Fields['mid']; - else $mid = 1; - } - else - { - $mid = intval($mid); - } - - $revalue = ''; - $innerText = trim($ctag->GetInnerText()); - if(empty($innerText)) $innerText = GetSysTemplets('memberinfos.htm'); - - $sql = "SELECT mb.*,ms.spacename,ms.sign,ar.membername as rankname FROM `#@__member` mb - LEFT JOIN `#@__member_space` ms ON ms.mid = mb.mid - LEFT JOIN `#@__arcrank` ar ON ar.rank = mb.rank - WHERE mb.mid='{$mid}' LIMIT 0,1 "; - - $ctp = new DedeTagParse(); - $ctp->SetNameSpace('field','[',']'); - $ctp->LoadSource($innerText); - - $dsql->Execute('mb',$sql); - while($row = $dsql->GetArray('mb')) - { - if($row['matt']==10) return ''; - $row['spaceurl'] = $GLOBALS['cfg_basehost'].'/member/index.php?uid='.$row['userid']; - if(empty($row['face'])) { - $row['face']=($row['sex']=='女')? $GLOBALS['cfg_memberurl'].'/templets/images/dfgirl.png' : $GLOBALS['cfg_memberurl'].'/templets/images/dfboy.png'; - } - foreach($ctp->CTags as $tagid=>$ctag) - { - if(isset($row[$ctag->GetName()])){ $ctp->Assign($tagid,$row[$ctag->GetName()]); } - } - $revalue .= $ctp->GetResult(); - } - return $revalue; -} \ No newline at end of file diff --git a/src/member/ajax_loginsta.php b/src/member/ajax_loginsta.php index db6a267d..3426595f 100755 --- a/src/member/ajax_loginsta.php +++ b/src/member/ajax_loginsta.php @@ -1,4 +1,5 @@ IsLogin()) -{ +if (!$cfg_ml->IsLogin()) { if ($format === 'json') { echo json_encode(array( "code" => -1, @@ -30,8 +30,8 @@ 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'; +!$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'; if ($format === 'json') { echo json_encode(array( @@ -50,22 +50,11 @@ if ($format === 'json') {
你好:M_UserName; ?>,欢迎登录
- -
-
\ No newline at end of file diff --git a/src/plus/guestbook.php b/src/plus/guestbook.php deleted file mode 100755 index fa36e3f7..00000000 --- a/src/plus/guestbook.php +++ /dev/null @@ -1,98 +0,0 @@ -GetOne("SELECT msg FROM `#@__guestbook` WHERE id='$reid' "); - $msg = "
".addslashes($row['msg'])."
\n".$msg; - } - $msg = addslashes($msg); - - $query = "INSERT INTO `#@__guestbook`(title,tid,mid,uname,email,homepage,qq,face,msg,ip,dtime,ischeck) - VALUES ('$title','$tid','{$g_mid}','$uname','$email','$homepage','$qq','$img','$msg','$ip','$dtime','$needCheck'); "; - $dsql->ExecuteNoneQuery($query); - $gid = $dsql->GetLastID(); - if($needCheck==1) - { - require_once(DEDEINC."/oxwindow.class.php"); - $msg = " - 成功发送或回复留言!   我已经知道了,点击此返回>>"; - $wintitle = "留言发布成功提示"; - $wecome_info = "留言发布成功:"; - $win = new OxWindow(); - $win->Init("","js/blank.js","post"); - $win->AddTitle("提示:"); - $win->AddMsgItem("
$msg
"); - $winform = $win->GetWindow("hand"); - $win->Display(); - } - else { - ShowMsg('成功发送一则留言,但需审核后才能显示!','guestbook.php',0,3000); - } - exit(); -} -//显示所有留言 -else -{ - setcookie('GUEST_BOOK_POS',GetCurUrl(),time()+3600,'/'); - - if($g_isadmin) $sql = 'SELECT * FROM `#@__guestbook` ORDER BY id DESC'; - else $sql = 'SELECT * FROM `#@__guestbook` WHERE ischeck=1 ORDER BY id DESC'; - - $dlist = new DataListCP(); - $dlist->pageSize = 10; - $dlist->SetParameter('gotopagerank',$gotopagerank); - $dlist->SetTemplate(DEDETEMPLATE.'/plus/guestbook.htm'); - $dlist->SetSource($sql); - $dlist->Display(); -} \ No newline at end of file diff --git a/src/plus/guestbook/edit.inc.php b/src/plus/guestbook/edit.inc.php deleted file mode 100755 index 15742482..00000000 --- a/src/plus/guestbook/edit.inc.php +++ /dev/null @@ -1,73 +0,0 @@ -ExecuteNoneQuery(" DELETE FROM `#@__guestbook` WHERE id='$id' "); - ShowMsg("成功删除一条留言!", $GUEST_BOOK_POS); - exit(); -} -else if($job=='check' && $g_isadmin) -{ - $dsql->ExecuteNoneQuery(" UPDATE `#@__guestbook` SET ischeck=1 WHERE id='$id' "); - ShowMsg("成功审核一条留言!", $GUEST_BOOK_POS); - exit(); -} -else if($job=='editok') -{ - $remsg = trim($remsg); - if($remsg!='') - { - //管理员回复不过滤HTML - if($g_isadmin) - { - $msg = "
".$msg."
\n".$remsg; - //$remsg
管理员回复: - } - else - { - $row = $dsql->GetOne("SELECT msg From `#@__guestbook` WHERE id='$id' "); - $oldmsg = "
".addslashes($row['msg'])."
\n"; - $remsg = trimMsg(cn_substrR($remsg, 1024), 1); - $msg = $oldmsg.$remsg; - } - } else { - if(!$g_isadmin) - { - ShowMsg("无权提交修改当前留言!", $GUEST_BOOK_POS); - exit(); - } - } - $msg = HtmlReplace($msg, -1); - /* - 漏洞描述:dedecms留言板注入漏洞。 - */ - $msg = addslashes($msg); - $dsql->ExecuteNoneQuery("UPDATE `#@__guestbook` SET `msg`='$msg', `posttime`='".time()."' WHERE id='$id' "); - ShowMsg("成功更改或回复一条留言!", $GUEST_BOOK_POS); - exit(); -} - -if($g_isadmin) -{ - $row = $dsql->GetOne("SELECT * FROM `#@__guestbook` WHERE id='$id'"); - require_once(DEDETEMPLATE.'/plus/guestbook-admin.htm'); -} -else -{ - $row = $dsql->GetOne("SELECT id,title FROM `#@__guestbook` WHERE id='$id'"); - require_once(DEDETEMPLATE.'/plus/guestbook-user.htm'); -} diff --git a/src/plus/guestbook/guestbook.inc.php b/src/plus/guestbook/guestbook.inc.php deleted file mode 100755 index d9e9c58a..00000000 --- a/src/plus/guestbook/guestbook.inc.php +++ /dev/null @@ -1,38 +0,0 @@ -IsLogin()) -{ - $g_isadmin = ($cfg_ml->fields['matt'] >= 10); - $g_mid = $cfg_ml->M_ID; - $g_name = $cfg_ml->M_UserName; -} -else -{ - $g_isadmin = FALSE; - $g_mid = 0; - $g_name = ''; -} - -function GetIsCheck($ischeck,$id) -{ - if($ischeck==0) return "
[审核]"; - else return ''; -} \ No newline at end of file diff --git a/src/plus/guestbook/images/01.gif b/src/plus/guestbook/images/01.gif deleted file mode 100755 index a301e2f9..00000000 Binary files a/src/plus/guestbook/images/01.gif and /dev/null differ diff --git a/src/plus/guestbook/images/02.gif b/src/plus/guestbook/images/02.gif deleted file mode 100755 index eb74f53e..00000000 Binary files a/src/plus/guestbook/images/02.gif and /dev/null differ diff --git a/src/plus/guestbook/images/03.gif b/src/plus/guestbook/images/03.gif deleted file mode 100755 index cf70f9fa..00000000 Binary files a/src/plus/guestbook/images/03.gif and /dev/null differ diff --git a/src/plus/guestbook/images/04.gif b/src/plus/guestbook/images/04.gif deleted file mode 100755 index b27e8b91..00000000 Binary files a/src/plus/guestbook/images/04.gif and /dev/null differ diff --git a/src/plus/guestbook/images/05.gif b/src/plus/guestbook/images/05.gif deleted file mode 100755 index 73df4372..00000000 Binary files a/src/plus/guestbook/images/05.gif and /dev/null differ diff --git a/src/plus/guestbook/images/06.gif b/src/plus/guestbook/images/06.gif deleted file mode 100755 index c8bcb849..00000000 Binary files a/src/plus/guestbook/images/06.gif and /dev/null differ diff --git a/src/plus/guestbook/images/07.gif b/src/plus/guestbook/images/07.gif deleted file mode 100755 index 06bb3961..00000000 Binary files a/src/plus/guestbook/images/07.gif and /dev/null differ diff --git a/src/plus/guestbook/images/08.gif b/src/plus/guestbook/images/08.gif deleted file mode 100755 index f3fbd5bc..00000000 Binary files a/src/plus/guestbook/images/08.gif and /dev/null differ diff --git a/src/plus/guestbook/images/09.gif b/src/plus/guestbook/images/09.gif deleted file mode 100755 index 12546b2b..00000000 Binary files a/src/plus/guestbook/images/09.gif and /dev/null differ diff --git a/src/plus/guestbook/images/10.gif b/src/plus/guestbook/images/10.gif deleted file mode 100755 index 219929e1..00000000 Binary files a/src/plus/guestbook/images/10.gif and /dev/null differ diff --git a/src/plus/guestbook/images/11.gif b/src/plus/guestbook/images/11.gif deleted file mode 100755 index a6c55691..00000000 Binary files a/src/plus/guestbook/images/11.gif and /dev/null differ diff --git a/src/plus/guestbook/images/12.gif b/src/plus/guestbook/images/12.gif deleted file mode 100755 index 7a512c59..00000000 Binary files a/src/plus/guestbook/images/12.gif and /dev/null differ diff --git a/src/plus/guestbook/images/13.gif b/src/plus/guestbook/images/13.gif deleted file mode 100755 index 15bdd3fe..00000000 Binary files a/src/plus/guestbook/images/13.gif and /dev/null differ diff --git a/src/plus/guestbook/images/14.gif b/src/plus/guestbook/images/14.gif deleted file mode 100755 index ed292866..00000000 Binary files a/src/plus/guestbook/images/14.gif and /dev/null differ diff --git a/src/plus/guestbook/images/15.gif b/src/plus/guestbook/images/15.gif deleted file mode 100755 index 7900cb22..00000000 Binary files a/src/plus/guestbook/images/15.gif and /dev/null differ diff --git a/src/plus/guestbook/images/16.gif b/src/plus/guestbook/images/16.gif deleted file mode 100755 index 3359daf4..00000000 Binary files a/src/plus/guestbook/images/16.gif and /dev/null differ diff --git a/src/plus/guestbook/images/17.gif b/src/plus/guestbook/images/17.gif deleted file mode 100755 index 82f34532..00000000 Binary files a/src/plus/guestbook/images/17.gif and /dev/null differ diff --git a/src/plus/guestbook/images/18.gif b/src/plus/guestbook/images/18.gif deleted file mode 100755 index 255099fd..00000000 Binary files a/src/plus/guestbook/images/18.gif and /dev/null differ diff --git a/src/plus/guestbook/images/19.gif b/src/plus/guestbook/images/19.gif deleted file mode 100755 index 25929776..00000000 Binary files a/src/plus/guestbook/images/19.gif and /dev/null differ diff --git a/src/plus/guestbook/images/20.gif b/src/plus/guestbook/images/20.gif deleted file mode 100755 index dc359328..00000000 Binary files a/src/plus/guestbook/images/20.gif and /dev/null differ diff --git a/src/plus/guestbook/images/21.gif b/src/plus/guestbook/images/21.gif deleted file mode 100755 index 35957635..00000000 Binary files a/src/plus/guestbook/images/21.gif and /dev/null differ diff --git a/src/plus/guestbook/images/22.gif b/src/plus/guestbook/images/22.gif deleted file mode 100755 index faa46303..00000000 Binary files a/src/plus/guestbook/images/22.gif and /dev/null differ diff --git a/src/plus/guestbook/images/23.gif b/src/plus/guestbook/images/23.gif deleted file mode 100755 index 64ce89a4..00000000 Binary files a/src/plus/guestbook/images/23.gif and /dev/null differ diff --git a/src/plus/guestbook/images/24.gif b/src/plus/guestbook/images/24.gif deleted file mode 100755 index 6c999e71..00000000 Binary files a/src/plus/guestbook/images/24.gif and /dev/null differ diff --git a/src/plus/guestbook/images/botright.gif b/src/plus/guestbook/images/botright.gif deleted file mode 100755 index 3189338e..00000000 Binary files a/src/plus/guestbook/images/botright.gif and /dev/null differ diff --git a/src/plus/guestbook/images/bottop.gif b/src/plus/guestbook/images/bottop.gif deleted file mode 100755 index 25f9b361..00000000 Binary files a/src/plus/guestbook/images/bottop.gif and /dev/null differ diff --git a/src/plus/guestbook/images/css.css b/src/plus/guestbook/images/css.css deleted file mode 100755 index 88d3ebc6..00000000 --- a/src/plus/guestbook/images/css.css +++ /dev/null @@ -1,69 +0,0 @@ - -td,a,a:link,a:visited { - color:#000000;text-decoration:none;font-size:9pt -} - -a:hover{ - color:#000000; - font-size:9pt; - text-decoration:underline; -} - -input,select { - font-size:9pt; - color:#000000; -} - -body { - color:#000000; - font-size:9pt; - scrollbar-track-color:#eeeeee; - scrollbar-shadow-color:buttonface; - scrollbar-highlight-color:buttonface; - scrollbar-3dlight-color:buttonhighlight; - scrollbar-darkshadow-color:buttonshadow -} - -.input { - font-size:9pt; - border-top:#cdcdcd 1px solid; - border-left:#cdcdcd 1px solid; - border-right:#eeeeee 1px solid; - border-bottom:#eeeeee 1px solid; - height:18px;color:#000000; - padding-top:1px; - letter-spacing:0px; - padding-right:0px; - padding-left:0px; - width:90%; -} - -.admintb td{ padding-right:6px; } - -.btn { - font-size:9pt; - border-top:#cdcdcd 1px solid; - border-left:#cdcdcd 1px solid; - border-right:#737373 1px solid; - border-bottom:#737373 1px solid; - height:18px; - color:#000000; - padding-top:1px; - letter-spacing:0px; - padding-right:0px; - padding-left:0px; -} - -.textarea { - font-size:9pt; - border-top:#cdcdcd 1px solid; - border-left:#cdcdcd 1px solid; - border-right:#eeeeee 1px solid; - border-bottom:#eeeeee 1px solid; - color:#000000; - padding-top:1px; - letter-spacing:0px; - padding-right:0px; - padding-left:0px; - width:90%; -} \ No newline at end of file diff --git a/src/plus/guestbook/images/dedebanner.gif b/src/plus/guestbook/images/dedebanner.gif deleted file mode 100755 index b6ee2fe6..00000000 Binary files a/src/plus/guestbook/images/dedebanner.gif and /dev/null differ diff --git a/src/plus/guestbook/images/del.gif b/src/plus/guestbook/images/del.gif deleted file mode 100755 index fec69bbb..00000000 Binary files a/src/plus/guestbook/images/del.gif and /dev/null differ diff --git a/src/plus/guestbook/images/home.gif b/src/plus/guestbook/images/home.gif deleted file mode 100755 index 408503ee..00000000 Binary files a/src/plus/guestbook/images/home.gif and /dev/null differ diff --git a/src/plus/guestbook/images/ip.gif b/src/plus/guestbook/images/ip.gif deleted file mode 100755 index fe5c0f7f..00000000 Binary files a/src/plus/guestbook/images/ip.gif and /dev/null differ diff --git a/src/plus/guestbook/images/mail.gif b/src/plus/guestbook/images/mail.gif deleted file mode 100755 index 11d0b2c2..00000000 Binary files a/src/plus/guestbook/images/mail.gif and /dev/null differ diff --git a/src/plus/guestbook/images/quote.gif b/src/plus/guestbook/images/quote.gif deleted file mode 100755 index aae4d32a..00000000 Binary files a/src/plus/guestbook/images/quote.gif and /dev/null differ diff --git a/src/plus/guestbook/images/time.gif b/src/plus/guestbook/images/time.gif deleted file mode 100755 index 3178066a..00000000 Binary files a/src/plus/guestbook/images/time.gif and /dev/null differ diff --git a/src/templets/plus/guestbook-admin.htm b/src/templets/plus/guestbook-admin.htm deleted file mode 100755 index f5b32430..00000000 --- a/src/templets/plus/guestbook-admin.htm +++ /dev/null @@ -1,137 +0,0 @@ - - - - -<?php echo $cfg_webname; ?>_留言本 - - - - - -
-
-
-

-

- -
-
-
-
-
-

留言板

- 回复留言 返回首页
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
回复留言:
*留言者:OICQ号码:
 电子邮件:个人主页:
- *留言内容: - - -
- 回复留言: - -
管理员回复:", 250, "MemberLit"); ?>
-
- -    - -
- - - - - - diff --git a/src/templets/plus/guestbook-user.htm b/src/templets/plus/guestbook-user.htm deleted file mode 100755 index 5a48fb68..00000000 --- a/src/templets/plus/guestbook-user.htm +++ /dev/null @@ -1,170 +0,0 @@ - - - - -<?php echo $cfg_webname; ?> - 留言本 - - - - - -
-
-
-

-

- -
-
-
-
-
-

留言本

- 返回首页
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
回复主题:
*论文标题:验 证 码: - - - - - -
-
*你的姓名:OICQ号码:
 电子邮件:个人主页:
*留言内容:
- (1000字内)
- - 选择头像: - - - - - - - - - - - - - - -

- - - - - - - - - - - - - - -
-    -
- - -
- - - diff --git a/src/templets/plus/guestbook.htm b/src/templets/plus/guestbook.htm deleted file mode 100755 index f9314163..00000000 --- a/src/templets/plus/guestbook.htm +++ /dev/null @@ -1,226 +0,0 @@ - - - - -<?php echo $cfg_webname; ?> - 留言本 - - - - -
-
-
-

-

- -
-
-
-
-
-

留言本

- - [发布留言]   - [返回主页] - -
- - {dede:datalist} - "> - - - - - - - - - - - -
- - - 时间: -   - 主题: -
- - - - - - - - - - -
- .gif' border=0 /> -
 来自:
 QQ:
-
- [邮件]   - ' target='_blank'>[主页]   - '>[回复/编辑]   - - &job=del'>[删除] - -
- - {/dede:datalist} - - - - - -
{dede:pagelist listsize='5'/}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
发布留言:
*标题:验 证 码: - - - - - -
-
*你的姓名:OICQ号码:
 电子邮件:个人主页:
*留言内容:
- (1000字内)
- - 选择头像: - - - - - - - - - - - - - - -

- - - - - - - - - - - - - - -
-    -
-
-
- -{dede:include filename='plus_foot.htm' /} - - - - diff --git a/src/templets/system/memberinfos.htm b/src/templets/system/memberinfos.htm deleted file mode 100755 index 628130bc..00000000 --- a/src/templets/system/memberinfos.htm +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - -
- [field:uname/] -   - 查看此用户所有信息 -
- [发送留言] -   - [加为好友] -
用户等级[field:rankname /]
注册时间[field:jointime function="MyDate('Y-m-d H:m',@me)"/]
最后登录[field:logintime function="MyDate('Y-m-d H:m',@me)"/]
\ No newline at end of file diff --git a/src/templets/templet-pluslist.inc b/src/templets/templet-pluslist.inc index b8611bb0..369a411c 100755 --- a/src/templets/templet-pluslist.inc +++ b/src/templets/templet-pluslist.inc @@ -8,8 +8,6 @@ feedback_templet.htm,评论页 feedback_templet_js.htm,评论JS调用模板 flink-add.htm,增加友情链接 flink-list.htm,友情链接列表 -guestbook-admin.htm,管理留言本 -guestbook.htm,留言本 heightsearch.htm,高级搜索 js.htm,JS调用默认模板 list_diyform.htm,自定义表单默认内容列表