经过一番研究,发现可以这样改: 在plus/guestbook目录新建文件 Js.PHP
<?PHPrequire_once(dirname(__file__)."/config.PHP");require_once(dirname(__file__)."/../../include/pub_dataList_dm.PHP"); setcookie("GUEST_BOOK_MOVE",GetCurUrl(),time()+3600,"/");if($gotopagerank=="admin"){ $userrank = $cuserLogin->getUserRank();}else{ $userrank = -1; }function GetIsCheck($ischeck,$ID){ if($ischeck==0) return "<br><a href='edit.PHP?job=check&ID=$ID' style='color:red'>[审核]</a>"; else return "";}if($userrank>0) $sql = "select * from dede_guestbook order by ID desc";else $sql = "select * from dede_guestbook where ischeck=1 order by ID desc";$dList = new DataList();$dList->Init();$dList->pageSize =7;$dList->SetParameter("gotopagerank",$gotopagerank);$dList->SetSource($sql);$myList = $dList->GetDataList();while($row = $myList->GetArray('dm')){ $xingming=$row['uname']; $neirong=strip_Tags($row['msg']); $neirong=str_replace(" ","",$neirong); $neirong=cn_substr($neirong,45); $neirong=str_replace("",$neirong); $neirong=rawurldecode($neirong); $link=$row['ID']; echo "document.write(\"·<a href='./plus/guestbook/index.PHP#$link' target='_blank'> <Font color=red>$xingming - </Font> $neirong</A><br>\");";} $dList->Close();?> |
上一篇:DedeCMS系统参数设置手册之站点设置
下一篇:将RSS描述改成全文内容输出方法
总结以上是内存溢出为你收集整理的DEDECMS如何在首页用JS调用留言本内容全部内容,希望文章能够帮你解决DEDECMS如何在首页用JS调用留言本内容所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)