📄 rss.php
字号:
<?php
/*
BMForum Plus! Bulletin Board Systems
Version : Plus!
This is a freeware, but don't change the copyright information.
A SourceForge Project - GNU Licence project.
Web Site: http://www.bmforum.com
Copyright (C) Bluview Technology
*/
error_reporting(E_ERROR | E_WARNING | E_PARSE);
include_once("datafile/config.php");
require("bmbcodes.php");
$forumidban=explode(",",$forumidbanned);
$usergroupfile="datafile/usergroup.php";
$usergroupdata=file($usergroupfile);
$timestamp=time();
header("Content-type:application/xml; charset=utf-8");
require_once("datafile/time.php");
global_usergroup();
if(empty($_GET['forumid'])) $infoqtype_g="all";
else $infoqtype_g=$_GET['forumid'];
$forumid=$infoqtype_g;
$qbgcolor="#FFFFFF";
$forumlist=file("datafile/forumdata.php");
$count=count($forumlist);
for ($i=0; $i<$count; $i++) {
$detail=explode('|',$forumlist[$i]);
$detail[0]=str_replace("<?exit;?>","",$detail[0]);
if($forumid==$detail[3] && ($detail[0]!='subforum' && $detail[0]!='subselection' && $detail[0]!='selection' && $detail[0]!='forum')){
$forumidban[]=$forumid;
}
if($forumid==$detail[3]){
$forumtitle="- ".$detail[1];
}
}
if(@in_array($forumid,$forumidban)){
exit;
}else{
$echoinfo='<?xml-stylesheet type="text/css" href="images/rsstyle.css"?>';
$echoinfo.= <<< eot
\n<rss version="2.0"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:syn="http://purl.org/rss/1.0/modules/syndication/"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<channel>
<title>$bbs_title $forumtitle</title>
<link>$script_pos/index.php</link>
<description>$bbs_des</description>
<image>
<title>$bbs_title</title>
<url>$bbslogo83</url>
<link>$script_pos</link>
<description>$bbs_des</description>
</image>
eot;
if($forumid=="all"){
$minv=15;
$forumlist=file("datafile/forumdata.php");
$fcount=count($forumlist);
for ($i=0; $i<$fcount; $i++) {
$detl=explode("|",$forumlist[$i]);
$detl[0]=str_replace("<?exit;?>","",$detl[0]);
if ($detl[0]!="category" && ($detl[0]=='subforum' || $detl[0]=='subselection' || $detl[0]=='selection' || $detl[0]=='forum') && !$detl[7] && $detl[7]<>"d41d8cd98f00b204e9800998ecf8427e") $forumnum[]=$detl[3];
}
$fcount=count($forumnum);
for ($ii=0; $ii<$fcount; $ii++) {
if (file_exists("{$idpath}forum$forumnum[$ii]/list.php")) {
$article=file("{$idpath}forum$forumnum[$ii]/list.php");
}
$c=min(count($article),$minv);
for ($i=0; $i<$c; $i++){
$detail=explode("|",$article[$i]);
$detail1=explode(",",$detail[8]);
$bad[0]=$forumnum[$ii];
$bad[1]=$article[$i];
$abcde=@implode("|",$bad);
$bymview[$abcde]=$detail1[2];
}
}
@arsort($bymview);
$abcde=@implode("|",$bymview);
@reset($bymview);
$svb=count($bymview);
for ($counter=1; $counter<=$minv; $counter++) {
$key=@key($bymview);
$multipage=''; list($forumid,$title,$author,$date,$des,$icon,$filename,$reply,$hit,$last_mod_data,$islock,$topic_type,$jihua)=explode("|",$key);
get_forum_info();
if($view_list==0) continue;
if($forum_pwd<>"" && $forum_pwd<>"d41d8cd98f00b204e9800998ecf8427e") continue;
if ($spusergroup=="1" && $enter_this_forum=="0") continue;
$topic_type = @trim($topic_type);
$topic_islock = @trim($islock);
if (file_exists("{$idpath}forum$forumid/$filename") && $filename!="") $articlelist=file("{$idpath}forum$forumid/$filename");
list($topic_name,$topic_author,$topic_content,$topic_date,$topic_area,$topic_icon,$topic_usesign,$topic_bym,$topic_bymuser,$topic_uploadfilename,$topic_editinfo,$sellmoney)=explode("|",$articlelist[0]);
$usergnshow="";
$somepostinfo=explode("_",$topic_usesign);
if(strstr($somepostinfo[6],"搂")){
$usergnshowtmp=explode("搂",$somepostinfo[6]);
$fdcoun=count($usergnshowtmp);
for ($fds=0;$fds<$fdcoun;$fds++) {
if($usergnshowtmp[$fds]!="") { $usergnshow[]=str_replace("new","",$usergnshowtmp[$fds]); }
}
}else{
$usergnshow[0]="nonono";
}
if(@in_array('6',$usergnshow)){
$topic_content=" Hidden Contents ";
}
if (file_exists("datafile/banuserposts.php")) {
include("datafile/banuserposts.php");
if ($banuserposts && in_array($topic_author,$banuserposts)) {
$topic_content=" Hidden Contents ";
}
}
if ($p_read_post=="0" || (!empty($sellmoney) && $sellmoney!="\n" ) || preg_match("/\[hide=(.+?)\](.+?)\[\/hide\]/eis",$topic_content)|| preg_match("/\[hmoney=(.+?)\](.+?)\[\/hmoney\]/eis",$topic_content)|| preg_match("/\[hpost=(.+?)\](.+?)\[\/hpost\]/eis",$topic_content) || preg_match("/\[post\](.+?)\[\/post\]/eis",$topic_content)){
$topic_content=" Hidden Contents ";
}
$tmpdate=get_date_rss($topic_date);
$author=htmlspecialchars($topic_author);
$title=str_replace(" "," ",htmlspecialchars($topic_name));
$title=str_replace("%a%","",$title);
$bcode_post = array('pic' => 1, 'fontsize' => 1, 'bmfimg' => 0, 'bmfcodes' => 0);
$co=bmbconvert($topic_content);
if($title!="" && $filename!=""){
$echoinfo.=<<< eot
\n<item>
<link>$script_pos/topic.php?filename=$filename&forumid=$forumid</link>
<title>$title</title>
<author>$author</author>
<category>$bbs_title</category>
<pubDate>$tmpdate</pubDate>
<guid>$script_pos/topic.php?filename=$filename&forumid=$forumid</guid>
<description>
<![CDATA[
$co
<br /> (<a href="$script_pos/topic.php?filename=$filename&forumid=$forumid" target=_blank> $title </a>)
]]>
</description>
</item>
eot;
}
if (!(@next($bymview))) break;
}
}else{
get_forum_info();
$page=1;
if (file_exists("{$idpath}forum$forumid/list.php")) {
$article_list=@file("{$idpath}forum$forumid/list.php");
}
$count=count($article_list);
if($view_list=="0") $count=0;
if($forum_pwd<>"" && $forum_pwd<>"d41d8cd98f00b204e9800998ecf8427e") $count=0;
if ($spusergroup=="1" && $enter_this_forum=="0") exit;
for ($i=0; $i<=15; $i++) {
$a_info=$article_list[$i];
list($title,$author,$date,$des,$icon,$filename,$reply,$hit,$last_mod_data,$islock,$topic_type)=explode("|",$a_info);
$tmpdate=get_date_rss($date);
$author=htmlspecialchars($author);
$title=str_replace(" "," ",htmlspecialchars($title));
$title=str_replace("%a%","",$title);
$topic_list=@file("{$idpath}forum$forumid/$filename");
$detailtopic=explode("|",$topic_list[0]);
$sellmoney=$detailtopic[11];
$topic_content=$detailtopic[2];
$usergnshow="";
$somepostinfo=explode("_",$detailtopic[6]);
if(strstr($somepostinfo[6],"搂")){
$usergnshowtmp=explode("搂",$somepostinfo[6]);
$fdcoun=count($usergnshowtmp);
for ($fds=0;$fds<$fdcoun;$fds++) {
if($usergnshowtmp[$fds]!="") { $usergnshow[]=str_replace("new","",$usergnshowtmp[$fds]); }
}
}else{
$usergnshow[0]="nonono";
}
if(@in_array('6',$usergnshow)){
$topic_content=" Hidden Contents ";
}
if ($p_read_post=="0" || (!empty($sellmoney) && $sellmoney!="\n" ) || preg_match("/\[hide=(.+?)\](.+?)\[\/hide\]/eis",$topic_content)|| preg_match("/\[hmoney=(.+?)\](.+?)\[\/hmoney\]/eis",$topic_content)|| preg_match("/\[hpost=(.+?)\](.+?)\[\/hpost\]/eis",$topic_content) || preg_match("/\[post\](.+?)\[\/post\]/eis",$topic_content)){
$topic_content=" Hidden Contents ";
}
if (file_exists("datafile/banuserposts.php")) {
include("datafile/banuserposts.php");
if ($banuserposts && in_array($author,$banuserposts)) {
$topic_content=" Hidden Contents ";
}
}
$bcode_post = array('pic' => 1, 'fontsize' => 1, 'bmfimg' => 0, 'bmfcodes' => 0);
$co=bmbconvert($topic_content);
if($title!="" && $filename!=""){
$echoinfo.=<<< eot
\n<item>
<link>$script_pos/topic.php?filename=$filename&forumid=$forumid</link>
<title>$title</title>
<author>$author</author>
<category>$bbs_title</category>
<pubDate>$tmpdate</pubDate>
<guid>$script_pos/topic.php?filename=$filename&forumid=$forumid</guid>
<description>
<![CDATA[
$co
<br /> (<a href="$script_pos/topic.php?filename=$filename&forumid=$forumid" target=_blank> $title </a>)
]]>
</description>
</item>
eot;
}
}
}
}
?>
<? echo '<?xml version="1.0" encoding="UTF-8" ?>';?>
<?=$echoinfo?>
</channel>
</rss>
<?
function get_date_chi($datetime){
global $minoffset,$time_1;
$datetime=$datetime+($time_1*60*60);
return gmdate("Y/m/d/",$datetime);
}
function get_date_rss($datetime){
global $minoffset,$time_1;
$datetime=$datetime+($time_1*60*60);
return gmdate("r",$datetime);
}
function getfulldate($datetime){
global $minoffset,$time_1;
$datetime=$datetime+($time_1*60*60);
return gmdate("Y/m/d/H:i",$datetime);
}
function get_time($datetime){
global $minoffset,$time_1;
$datetime=$datetime+($time_1*60*60);
return gmdate("H:i",$datetime);
}
function get_date($datetime){
global $minoffset,$time_1;
$datetime=$datetime+($time_1*60*60);
return gmdate("Y/m/d",$datetime);
}
//UNIX 鏃堕棿杞
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -