$homeLink"; // parse query string if (ereg("/archive/[0-9]",getenv('REQUEST_URI'))) { $urlArray=explode("/",getenv('REQUEST_URI')); //split the URL path $a=0; while($urlArray[$a] != "archive") { $a++; } $forumID=$urlArray[($a+1)]; $year=$urlArray[($a+2)]; $month=$urlArray[($a+3)]; $week=$urlArray[($a+4)]; $threadID=$urlArray[($a+5)]; if (eregi("[a-z]",$forumID) or $forumID < 1 or strstr($privateForums,"|".$forumID."|")) $forumID=1; } if ( ($refresh==1) and ( (!empty($forumID)) and (!empty($year)) and (!empty($month)) and (!empty($threadID)) ) ) { if ((!stristr(getenv(HTTP_REFERER),$homeURL)) or (strlen(getenv(HTTP_REFERER)) < 1)) { $forward= ""; $metas=""; $forwarding=1; } } // setup the DB connection $db = new MySQL; if (!$db->init()) { echo "no DB connection
"; exit; } if(!$forwarding) header("Status: 200 OK"); if (empty($forumID)) { htmlHeader(); forumList(); exit; } else if (empty($year) or empty($month)) { htmlHeader(); weekList(); } else if (empty($threadID)) { htmlHeader(); threadList(); } else { showThread(); } //echo "

 
vbSpiderFriend by ~shabang~ of Overgrow
"; function showThread() { // ## Start replacements ## $searcharray = array( "/(\[)(list)(=)(['\"]?)([^\"']*)(\\4])(.*)(\[\/list)(((=)(\\4)([^\"']*)(\\4]))|(\]))/siU", "/(\[)(list)(])(.*)(\[\/list\])/siU", "/(\[\*\])/siU", "/(\[)(url)(=)(['\"]?)(www\.)([^\"']*)(\\4)(.*)(\[\/url\])/siU", "/(\[)(url)(=)(['\"]?)([^\"']*)(\\4])(.*)(\[\/url\])/siU", "/(\[)(url)(])(www\.)([^\"]*)(\[\/url\])/siU", "/(\[)(url)(])([^\"]*)(\[\/url\])/siU", "/(\[)(php)(])(\r\n)*(.*)(\[\/php\])/siU", "/(\[)(code)(])(\r\n)*(.*)(\[\/code\])/siU", "/javascript:/si", "/about:/si", "/vbscript:/si", "/\[\/color]/si", "/transcender/si", "/cramsession/si", "/(=\?[a-zA-Z]+)(.*)/si", "/ college /si", "/([a-zA-Z]+4less)/si", "/ (voucher)([s]*) /si", "/ (braindump)([s]*) /si", "/(\n)(>)/si", "/\[color=blue]/si" ); $replacearray = array( "
    \\7
", "", "
  • ", "\\8", "\\7", "\\5", "\\4", "
    code:
    \\5
    ", "
    code:
    \\5
    ", "java script:", "about :", "vbscript :", "
    ", "transcender", "examnotes", "guest", "college", "examvouchers", " \\1\\2 ", " \\1\\2 ", "
       ", "

    quote:

    " ); $months = array("blank","January","February","March","April","May","June","July","August","September","October","November","December"); global $db,$baseURL,$forumID,$year,$month,$week,$threadID,$homeURL,$homeLink,$forumURL,$keywords,$description,$pagetitle,$fullHomeLink; $query = "SELECT thread.title as ttitle,forum.title as ftitle FROM thread LEFT JOIN forum ON thread.forumid=forum.forumid WHERE thread.threadid='$threadID'"; $data = $db->select($query); if(!empty($data)) { while ( list ( $key,$forum ) = each ($data)) { $forumline = "$forum[ftitle]"; $threadline = "You are viewing an archived Text-only version of the thread:

    $forum[ttitle]

     To view this thread in it's original format Click here
    "; $threadtitle = $forum[ttitle]; } } else { echo $query; } $keywords="$threadtitle ".$keywords; $description="$threadtitle : ".$description; $pagetitle=" $threadtitle : ".$pagetitle; htmlHeader(); // $fullHomeLink.= ". please use the link below: "; // $fullHomeLink.= "Click HERE to see this thread with all of the graphics, features, and links.
     
    "; //echo ""; // echo $fullHomeLink; // echo spacer(1).$forumline; echo spacer(2).$threadline; //echo "/$forumID/$year/$month/$week
    "; //echo "$months[$month]"; echo "

    "; $intmonth=intval($month); echo "$fullHomeLink > Archive > $forumline > $months[$intmonth] $year  (Week $week)"; //echo "$baseURL/$forumID/$year/$month/$week"; $data=$db->select("SELECT post.dateline as dateline,post.postid as postid,post.pagetext as pagetext,post.username as fakename, post.title as title,post.userid as userid, user.userid as userid,user.username as username, user.usertitle as usertitle,user.posts as posts FROM post LEFT JOIN user ON (user.userid = post.userid) WHERE post.threadid=$threadID AND visible=1 ORDER BY dateline"); if(!empty($data)) { echo "

    "; $i=1; while ( list ( $key,$posts ) = each ($data)) { $i++; if($i>2){ $i=1; } if($i==1){ $bg="#EDEDED"; } else{ $bg="#DDDDDD"; } $rep=preg_replace($searcharray, $replacearray, $posts[pagetext]); $username=$posts[username]; if(empty($username)) $username=$posts[fakename]; $repuser=preg_replace($searcharray, $replacearray, $username); echo ""; } echo "
    $repuser".nl2br($rep)."
    "; } echo "
    ".$fullHomeLink; } function threadList(){ global $db,$baseURL,$forumID,$year,$month,$week,$fullHomeLink; echo "$fullHomeLink > Archives
    "; $query = "SELECT title FROM forum WHERE forumid='$forumID'"; $data = $db->select($query); if(!empty($data)) { while ( list ( $key,$forum ) = each ($data)) { echo spacer(1)."$forum[title]
    "; } } switch($week) { case("1"): $fw = "01"; $lw = "07"; break; case("2"): $fw = "08"; $lw = "14"; break; case("3"): $fw = "15"; $lw = "21"; break; case("4"): $fw = "22"; $lw = "31"; break; default: $fw = "01"; $lw = "07"; } $date1 = "$month/$fw/$year"; $date2 = "$month/$lw/$year"; $ts1 = strtotime("$date1"); $ts2 = strtotime("$date2"); //echo "$month $week"; echo spacer(2)."Dates: $date1 to $date2
     
    "; $filter="and title NOT like '%$$%' and title NOT like '%nude%' and title NOT LIKE '%!!!%'"; $query = "SELECT title,threadid,lastpost,replycount FROM thread WHERE lastpost > '$ts1' AND lastpost < '$ts2' AND forumid='$forumID' $filter ORDER BY dateline ASC"; $data = $db->select($query); if(!empty($data)) { echo ""; $i=1; while ( list ( $key,$thread ) = each ($data)) { $i++; if($i>2){ $i=1; } if($i==1){ $bg="#EDEDED"; } else{ $bg="#DDDDDD"; } $pcount=$thread[replycount]+1; echo ""; } echo "
    Posts: $pcount$thread[title]"; echo "
    "; } else { echo spacer(3)."No posts, please go back."; } } function spacer($n) { global $spacer; while($n!=0){ $return.=$spacer; $n--; } return $return; } function removeZero($n) { preg_replace ("/./","",$n); return $n; } function weekList() { global $db,$baseURL,$forumID,$firstYear,$currentYear,$currentMonth,$firstMonth,$fullHomeLink; $months = array("blank","January","February","March","April","May","June","July","August","September","October","November","December"); echo "$fullHomeLink > Archives"; $query = "SELECT title FROM forum WHERE forumid='$forumID'"; $data = $db->select($query); if(!empty($data)) { while ( list ( $key,$forum ) = each ($data)) { echo " > $forum[title]
    "; } } echo ""; for($y=$firstYear;$y<=$currentYear;$y++) { echo ""; // start year if($y==$firstYear) $fm=$firstMonth; else $fm=1; if($y==$currentYear) $lm=($currentMonth + 1); else $lm=13; for($m=$fm;$m<$lm;$m++){ echo ""; // end month } echo ""; } // end year echo "
    "."$y
     
    "; // start month echo spacer(1)."".$months[$m]."
    "; for($w=1;$w<5;$w++) { if (strlen($m) < 2) $mo="0".$m; else $mo=$m; echo spacer(2)."week $w
    "; } echo " 
    "; } function forumList() { global $db,$baseURL,$privateForums,$fullHomeLink; echo "$fullHomeLink > Archives
    "; $privateForums=preg_replace("/^\|/","",$privateForums); $privateForums=preg_replace("/\|$/","",$privateForums); $pfs = explode("|",$privateForums); $whereclause=""; $wherecounter=0; while($pf=array_shift($pfs)) { if(ereg("[0-9]",$pf)) { if($wherecounter==0) { $whereclause= " WHERE forumid!='$pf'"; $wherecounter++; } else { $whereclause .= " AND forumid!='$pf'"; } } } $query = "SELECT * FROM forum,nntp_groups $whereclause and forum.forumid=nntp_groups.forum and forum.displayorder<>0 AND forum.active=1 ORDER BY title,displayorder"; $data = $db->select($query); if(!empty($data)) { while ( list ( $key,$forum ) = each ($data)) { echo spacer(1)."$forum[title]
    "; } } } function htmlHeader() { global $keywords,$description,$pagetitle,$forward; ?> <?=$pagetitle?>