authenticate("U_Username,U_PicturePosts,U_ShowSigs,U_Email,U_PictureView,U_Status,U_Privates,U_Name,U_Title,U_Totalposts,U_Visible, U_Laston,U_Language,U_TimeOffset,U_Groups,U_Picture,U_Number,U_TimeFormat"); list($palUusername,$palPicturePosts,$palShowSigs,$palEmail,$palPictureView,$palStatus,$palPrivates,$palRealName,$palUsertitle,$palTotalUposts,$palUVisible, $laston,$ubbt_language,$offset,$groups,$picture,$Uid,$palTimeFormat) = $user; isset($user['U_TimeOffset']) && $useroffset = $user['U_TimeOffset']; !isset($user['U_TimeFormat']) && $user['U_TimeFormat'] = $theme['timeformat']; $myVer = ".: IIP $palVersion by David Lozier ©2004 :."; if ($user['U_Status'] == "Administrator") { $myVer = " {$myVer} "; } else { $myVer = " {$myVer} "; } $myVer .= "
Distributed by ThreadsDev.com"; $VersionNotice = ""; if (!stristr($VERSION,"6.5")) { $VersionNotice = "

Version missmatch! IIP $palVersion will not work with UBB.threads™ $VERSION."; } if ($config['cookiepath'] == "") { $CookieNotice = "

Admins please note: The cookie path is not set site wide. This page must reside in the same directory as UBB.threads™ or cookies must be set site wide for this page to validate visitor access.
"; } $LastSeenStorageString = ""; $ShortStatsStorageString = ""; $TopPostersStorageString = ""; $RandProfileStorageString = ""; $TopThreadsStorageString = ""; $CurrentThreadsStorageString = ""; $HotTopicStorageString = ""; $TopRatedPostsStorageString = ""; $NewsStorageString = ""; $PastThreadsStorageString = ""; $CustomBox1StorageString = ""; $CustomBox2StorageString = ""; $CustomBox3StorageString = ""; $PollNameStorageString = ""; $PollVoteStorageString = ""; $PollResultsStorageString = ""; if (empty($wrapnum)) { $wrapnum = 0; } $spacer = "·"; $fullwidthStart = "$tbclose"; } else { // show full width? if (($pbsize == 2) && ($paction) && ($paction != "recommend") && ($paction != "ruthanks")) { echo "$fullwidthStart"; include "{$palspath}/pals/menupal.php"; if ($paction == "polls") { include "{$palspath}/pals/polllistpal.php"; } if ($paction == "attachments") { include "{$palspath}/pals/attachmentlistpal.php"; } if ($paction == "profileindex") { include "{$palspath}/pals/profilepal.php"; } } else { // create left column echo "$leftcolstart"; for ($x=1; $x<23; $x++) { $xused = 0; if ($index_include[1]['menu'] == $x && !$xused) { include "{$palspath}/pals/menupal.php"; $xused = 1; } if ($index_include[1]['quicksearch'] == $x && !$xused) { include "{$palspath}/pals/searchpal.php"; $xused = 1; } if ($index_include[1]['shortstats'] == $x && !$xused) { include "{$palspath}/pals/shortstatspal.php"; $xused = 1; } if ($index_include[1]['currentpoll'] == $x && !$xused) { include "{$palspath}/pals/pollpal.php"; $xused = 1; } if ($index_include[1]['events'] == $x && !$xused) { include "{$palspath}/pals/eventspal.php"; $xused = 1; } if ($index_include[1]['birthdays'] == $x && !$xused) { include "{$palspath}/pals/birthdaypal.php"; $xused = 1; } if ($index_include[1]['currentthreads'] == $x && !$xused) { include "{$palspath}/pals/currentthreadspal.php"; $xused = 1; } if ($index_include[1]['topthreads'] == $x && !$xused) { include "{$palspath}/pals/topthreadspal.php"; $xused = 1; } if ($index_include[1]['newuser'] == $x && !$xused) { include "{$palspath}/pals/newuserpal.php"; $xused = 1; } if ($index_include[1]['news'] == $x && !$xused) { include "{$palspath}/pals/newspal.php"; $xused = 1; } if ($index_include[1]['statuslogin'] == $x && !$xused) { include "{$palspath}/pals/loginpal.php"; $xused = 1; } if ($index_include[1]['whosonline'] == $x && !$xused) { include "{$palspath}/pals/onlinepal.php"; $xused = 1; } if ($index_include[1]['topposters'] == $x && !$xused) { include "{$palspath}/pals/topposterspal.php"; $xused = 1; } if ($index_include[1]['topratedposts'] == $x && !$xused) { include "{$palspath}/pals/topratedpostspal.php"; $xused = 1; } if ($index_include[1]['hottopic'] == $x && !$xused) { include "{$palspath}/pals/hottopicpal.php"; $xused = 1; } if ($index_include[1]['lastseen'] == $x && !$xused) { include "{$palspath}/pals/lastseenpal.php"; $xused = 1; } if ($index_include[1]['profilespotlight'] == $x && !$xused) { include "{$palspath}/pals/randprofilepal.php"; $xused = 1; } if ($index_include[1]['shoutbox'] == $x && !$xused) { include "{$palspath}/pals/shoutboxpal.php"; $xused = 1; } if ($index_include[1]['custombox1'] == $x && !$xused) { include "{$palspath}/pals/custombox1pal.php"; $xused = 1; } if ($index_include[1]['custombox2'] == $x && !$xused) { include "{$palspath}/pals/custombox2pal.php"; $xused = 1; } if ($index_include[1]['custombox3'] == $x && !$xused) { include "{$palspath}/pals/custombox3pal.php"; $xused = 1; } if ($index_include[1]['custombox4'] == $x && !$xused) { include "{$palspath}/pals/custombox4pal.php"; $xused = 1; } if ($index_include[1]['custombox5'] == $x && !$xused) { include "{$palspath}/pals/custombox5pal.php"; $xused = 1; } if ($index_include[1]['custombox6'] == $x && !$xused) { include "{$palspath}/pals/custombox6pal.php"; $xused = 1; } if ($index_include[1]['custombox7'] == $x && !$xused) { include "{$palspath}/pals/custombox7pal.php"; $xused = 1; } if ($index_include[1]['custombox8'] == $x && !$xused) { include "{$palspath}/pals/custombox8pal.php"; $xused = 1; } if ($index_include[1]['custombox9'] == $x && !$xused) { include "{$palspath}/pals/custombox9pal.php"; $xused = 1; } if ($index_include[1]['custombox10'] == $x && !$xused) { include "{$palspath}/pals/custombox10pal.php"; $xused = 1; } if ($index_include[1]['custombox11'] == $x && !$xused) { include "{$palspath}/pals/custombox11pal.php"; $xused = 1; } if ($index_include[1]['custombox12'] == $x && !$xused) { include "{$palspath}/pals/custombox12pal.php"; $xused = 1; } if ($index_include[1]['Calendarbox'] == $x && !$xused) { include "{$palspath}/pals/calendarpal.php"; $xused = 1; } } if (!$paction || $paction == "recommend" || $paction == "ruthanks") { // create middle column echo "$midcolstart"; if ($paction == "recommend" || $paction == "ruthanks") { include "{$palspath}/pals/recommenduspal.php"; } for ($x=1; $x<23; $x++) { $xused = 0; if ($index_include[2]['menu'] == $x && !$xused) { include "{$palspath}/pals/menupal.php"; $xused = 1; } if ($index_include[2]['quicksearch'] == $x && !$xused) { include "{$palspath}/pals/searchpal.php"; $xused = 1; } if ($index_include[2]['shortstats'] == $x && !$xused) { include "{$palspath}/pals/shortstatspal.php"; $xused = 1; } if ($index_include[2]['currentpoll'] == $x && !$xused) { include "{$palspath}/pals/pollpal.php"; $xused = 1; } if ($index_include[2]['events'] == $x && !$xused) { include "{$palspath}/pals/eventspal.php"; $xused = 1; } if ($index_include[2]['birthdays'] == $x && !$xused) { include "{$palspath}/pals/birthdaypal.php"; $xused = 1; } if ($index_include[2]['currentthreads'] == $x && !$xused) { include "{$palspath}/pals/currentthreadspal.php"; $xused = 1; } if ($index_include[2]['topthreads'] == $x && !$xused) { include "{$palspath}/pals/topthreadspal.php"; $xused = 1; } if ($index_include[2]['newuser'] == $x && !$xused) { include "{$palspath}/pals/newuserpal.php"; $xused = 1; } if ($index_include[2]['news'] == $x && !$xused) { include "{$palspath}/pals/newspal.php"; $xused = 1; } if ($index_include[2]['statuslogin'] == $x && !$xused) { include "{$palspath}/pals/loginpal.php"; $xused = 1; } if ($index_include[2]['whosonline'] == $x && !$xused) { include "{$palspath}/pals/onlinepal.php"; $xused = 1; } if ($index_include[2]['topposters'] == $x && !$xused) { include "{$palspath}/pals/topposterspal.php"; $xused = 1; } if ($index_include[2]['topratedposts'] == $x && !$xused) { include "{$palspath}/pals/topratedpostspal.php"; $xused = 1; } if ($index_include[2]['hottopic'] == $x && !$xused) { include "{$palspath}/pals/hottopicpal.php"; $xused = 1; } if ($index_include[2]['lastseen'] == $x && !$xused) { include "{$palspath}/pals/lastseenpal.php"; $xused = 1; } if ($index_include[2]['profilespotlight'] == $x && !$xused) { include "{$palspath}/pals/randprofilepal.php"; $xused = 1; } if ($index_include[2]['shoutbox'] == $x && !$xused) { include "{$palspath}/pals/shoutboxpal.php"; $xused = 1; } if ($index_include[2]['custombox1'] == $x && !$xused) { include "{$palspath}/pals/custombox1pal.php"; $xused = 1; } if ($index_include[2]['custombox2'] == $x && !$xused) { include "{$palspath}/pals/custombox2pal.php"; $xused = 1; } if ($index_include[2]['custombox3'] == $x && !$xused) { include "{$palspath}/pals/custombox3pal.php"; $xused = 1; } if ($index_include[2]['custombox4'] == $x && !$xused) { include "{$palspath}/pals/custombox4pal.php"; $xused = 1; } if ($index_include[2]['custombox5'] == $x && !$xused) { include "{$palspath}/pals/custombox5pal.php"; $xused = 1; } if ($index_include[2]['custombox6'] == $x && !$xused) { include "{$palspath}/pals/custombox6pal.php"; $xused = 1; } if ($index_include[2]['custombox7'] == $x && !$xused) { include "{$palspath}/pals/custombox7pal.php"; $xused = 1; } if ($index_include[2]['custombox8'] == $x && !$xused) { include "{$palspath}/pals/custombox8pal.php"; $xused = 1; } if ($index_include[2]['custombox9'] == $x && !$xused) { include "{$palspath}/pals/custombox9pal.php"; $xused = 1; } if ($index_include[2]['custombox10'] == $x && !$xused) { include "{$palspath}/pals/custombox10pal.php"; $xused = 1; } if ($index_include[2]['custombox11'] == $x && !$xused) { include "{$palspath}/pals/custombox11pal.php"; $xused = 1; } if ($index_include[2]['custombox12'] == $x && !$xused) { include "{$palspath}/pals/custombox12pal.php"; $xused = 1; } if ($index_include[2]['Calendarbox'] == $x && !$xused) { include "{$palspath}/pals/calendarpal.php"; $xused = 1; } } // create right column echo "$rightcolstart"; for ($x=1; $x<24; $x++) { $xused = 0; if ($index_include[3]['menu'] == $x && !$xused) { include "{$palspath}/pals/menupal.php"; $xused = 1; } if ($index_include[3]['quicksearch'] == $x && !$xused) { include "{$palspath}/pals/searchpal.php"; $xused = 1; } if ($index_include[3]['shortstats'] == $x && !$xused) { include "{$palspath}/pals/shortstatspal.php"; $xused = 1; } if ($index_include[3]['currentpoll'] == $x && !$xused) { include "{$palspath}/pals/pollpal.php"; $xused = 1; } if ($index_include[3]['events'] == $x && !$xused) { include "{$palspath}/pals/eventspal.php"; $xused = 1; } if ($index_include[3]['birthdays'] == $x && !$xused) { include "{$palspath}/pals/birthdaypal.php"; $xused = 1; } if ($index_include[3]['currentthreads'] == $x && !$xused) { include "{$palspath}/pals/currentthreadspal.php"; } if ($index_include[3]['topthreads'] == $x && !$xused) { include "{$palspath}/pals/topthreadspal.php"; $xused = 1; } if ($index_include[3]['newuser'] == $x && !$xused) { include "{$palspath}/pals/newuserpal.php"; $xused = 1; } if ($index_include[3]['news'] == $x && !$xused) { include "{$palspath}/pals/newspal.php"; $xused = 1; } if ($index_include[3]['statuslogin'] == $x && !$xused) { include "{$palspath}/pals/loginpal.php"; $xused = 1; } if ($index_include[3]['whosonline'] == $x && !$xused) { include "{$palspath}/pals/onlinepal.php"; $xused = 1; } if ($index_include[3]['topposters'] == $x && !$xused) { include "{$palspath}/pals/topposterspal.php"; $xused = 1; } if ($index_include[3]['topratedposts'] == $x && !$xused) { include "{$palspath}/pals/topratedpostspal.php"; $xused = 1; } if ($index_include[3]['hottopic'] == $x && !$xused) { include "{$palspath}/pals/hottopicpal.php"; $xused = 1; } if ($index_include[3]['lastseen'] == $x && !$xused) { include "{$palspath}/pals/lastseenpal.php"; $xused = 1; } if ($index_include[3]['profilespotlight'] == $x && !$xused) { include "{$palspath}/pals/randprofilepal.php"; $xused = 1; } if ($index_include[3]['shoutbox'] == $x && !$xused) { include "{$palspath}/pals/shoutboxpal.php"; $xused = 1; } if ($index_include[3]['custombox1'] == $x && !$xused) { include "{$palspath}/pals/custombox1pal.php"; $xused = 1; } if ($index_include[3]['custombox2'] == $x && !$xused) { include "{$palspath}/pals/custombox2pal.php"; $xused = 1; } if ($index_include[3]['custombox3'] == $x && !$xused) { include "{$palspath}/pals/custombox3pal.php"; $xused = 1; } if ($index_include[3]['custombox4'] == $x && !$xused) { include "{$palspath}/pals/custombox4pal.php"; $xused = 1; } if ($index_include[3]['custombox5'] == $x && !$xused) { include "{$palspath}/pals/custombox5pal.php"; $xused = 1; } if ($index_include[3]['custombox6'] == $x && !$xused) { include "{$palspath}/pals/custombox6pal.php"; $xused = 1; } if ($index_include[3]['custombox7'] == $x && !$xused) { include "{$palspath}/pals/custombox7pal.php"; $xused = 1; } if ($index_include[3]['custombox8'] == $x && !$xused) { include "{$palspath}/pals/custombox8pal.php"; $xused = 1; } if ($index_include[3]['custombox9'] == $x && !$xused) { include "{$palspath}/pals/custombox9pal.php"; $xused = 1; } if ($index_include[3]['custombox10'] == $x && !$xused) { include "{$palspath}/pals/custombox10pal.php"; $xused = 1; } if ($index_include[3]['custombox11'] == $x && !$xused) { include "{$palspath}/pals/custombox11pal.php"; $xused = 1; } if ($index_include[3]['custombox12'] == $x && !$xused) { include "{$palspath}/pals/custombox12pal.php"; $xused = 1; } if ($index_include[3]['Calendarbox'] == $x && !$xused) { include "{$palspath}/pals/calendarpal.php"; $xused = 1; } if ($index_include[3]['pastthreads'] == $x && !$xused) { include "{$palspath}/pals/pastthreadspal.php"; $xused = 1; } } } else { // create wide right column echo "$widerightcolstart"; if ($paction == "polls") { include "{$palspath}/pals/polllistpal.php"; } if ($paction == "attachments") { include "{$palspath}/pals/attachmentlistpal.php"; } if ($paction == "profileindex") { include "{$palspath}/pals/profilepal.php"; } } } // end columns echo "$endcolumns"; $date_q = $date - 600;// Thanks goes to Photopost for pointing this cache error out. if ($date >= $LastCacheTime) { $date_q = $date; } else { $date_q = $LastCacheTime; } $date_q = addslashes($date_q); if (!$LastSeenStorageString) { $LastSeenStorageString = $LastSeenData; } if (!$ShortStatsStorageString) { $ShortStatsStorageString = $ShortStatData; } if (!$TopPostersStorageString) { $TopPostersStorageString = $TopPostersData; } if (!$RandProfileStorageString) { $RandProfileStorageString = $RandProfileData; } $seen_q = addslashes($LastSeenStorageString); $seen2_q = addslashes($LastSeenStorageString2); $stat_q = addslashes($ShortStatsStorageString); $topp_q = addslashes($TopPostersStorageString); $ranp_q = addslashes($RandProfileStorageString); $topt_q = addslashes($TopThreadsStorageString); $curt_q = addslashes($CurrentThreadsStorageString); $hott_q = addslashes($HotTopicStorageString); $torp_q = addslashes($TopRatedPostsStorageString); $news_q = addslashes($NewsStorageString); $pstt_q = addslashes($PastThreadsStorageString); $cbx1_q = addslashes($CustomBox1StorageString); $cbx2_q = addslashes($CustomBox2StorageString); $cbx3_q = addslashes($CustomBox3StorageString); $pol1_q = addslashes($PollNameStorageString); $pol2_q = addslashes($PollVoteStorageString); $pol3_q = addslashes($PollResultsStorageString); if ($configured53) { $query = " UPDATE {$config['tbprefix']}IIPcache SET Ca_TimeStamp = '$date_q', Ca_ShortStats = '$stat_q', Ca_TopPosters = '$topp_q', Ca_LastSeen = '$seen_q', Ca_LastSeen2 = '$seen2_q', Ca_RandomProfile = '$ranp_q', Ca_TopThreads = '$topt_q', Ca_CurrentThreads = '$curt_q', Ca_HotTopic = '$hott_q', Ca_TopRatedPosts = '$torp_q', Ca_News = '$news_q', Ca_PastThreads = '$pstt_q', Ca_CustomB1 = '$cbx1_q', Ca_CustomB2 = '$cbx2_q', Ca_CustomB3 = '$cbx3_q', Ca_CurrentPollName = '$pol1_q', Ca_CurrentPollVote = '$pol2_q', Ca_CurrentPollResult = '$pol3_q' WHERE Ca_Number = '1' "; $dbh -> do_query($query); } } } else { echo "$tbopen$tbclose"; } $VERSION .= "

" . $myVer; // send the footer $html -> send_footer(); ?>
"; $leftcolstart = "
"; $midcolstart = "
"; $rightcolstart = "
"; $widerightcolstart = "
"; $endcolumns = "
"; if (empty($config['isclosed']) && $configured53 == "1") { $palPictureView = $theme['PictureView']; if ($theme['PictureView']) { if ($user['U_PictureView'] == "off") { $palPictureView = 0; } } $Groups = $user['U_Groups']; if (!$Groups || $forcepublic) { $Groups = "-4-"; $groupquery = "AND Bo_Read_Perm LIKE '%-4-%'"; if (!empty($membersonly)) { $Groups = "-3-"; $groupquery = "AND Bo_Read_Perm LIKE '%-3-%'"; } $Grouparray = split("-",$Groups); $gsize = sizeof($Grouparray); } else { $Grouparray = split("-",$Groups); $gsize = sizeof($Grouparray); $groupquery = "AND ("; $g = 0; for ($i=0; $i<$gsize;$i++) { if (!preg_match("/[0-9]/",$Grouparray[$i])) { continue; }; $g++; if ($g > 1) { $groupquery .= " OR "; } $groupquery .= "Bo_Read_Perm LIKE '%-$Grouparray[$i]-%'"; } $groupquery .= ")"; } if ($Cat && !$forcepublic) { $CatArray = split(",",$Cat); $CatSize = count($CatArray); $catonly = "AND (Bo_Cat = '"; for ($i=0; $i<$CatSize; $i++) { if (!preg_match("/[0-9]/",$CatArray[$i])) { continue; }; if ($i >= 1) { $catonly .= "' OR Bo_Cat = '"; } $catonly .= "$CatArray[$i]"; } $catonly .= "')"; } else { $CatArray[0] = "0"; $CatSize = 1; $catonly = ""; } if (!empty($excludedboards)) { $excludeArray = split(",",$excludedboards); $excludeSize = count($excludeArray); $andexclude = "AND Bo_Keyword != '"; for ($i=0; $i<$excludeSize; $i++) { if ($i >= 1) { $andexclude .= "' AND Bo_Keyword != '"; } $andexclude .= "$excludeArray[$i]"; } $andexclude .= "'"; } else { $andexclude = ""; } $query = " SELECT Bo_Keyword,Bo_Title,Bo_Write_Perm,Bo_Reply_Perm,Bo_Read_Perm FROM {$config['tbprefix']}Boards WHERE Bo_Keyword != '' $andexclude $groupquery $catonly "; $sth = $dbh -> do_query($query); $boardquery = "AND ("; $g = 0; while (list ($BKeyword,$BTitle,$BWritePerm,$BReplyPerm,$BReadPerm) = $dbh -> fetch_array($sth)) { $palBoardKeys[$g] = "$BKeyword"; $palBKeyword[$BKeyword] = "$BKeyword"; $palBTitle[$BKeyword] = "$BTitle"; $palBWritePerm[$BKeyword] = "$BWritePerm"; $palBReplyPerm[$BKeyword] = "$BReplyPerm"; $palBReadPerm[$BKeyword] = "$BReadPerm"; $g++; if ($g > 1) { $boardquery .= " OR "; } $boardquery .= "B_Board = '$BKeyword'"; } $dbh -> finish_sth($sth); $boardquery .= ")"; $html = new html; $date = $html -> get_date(); $query = " SELECT Ca_TimeStamp,Ca_ShortStats,Ca_TopPosters,Ca_LastSeen,Ca_LastSeen2,Ca_RandomProfile,Ca_TopThreads,Ca_CurrentThreads,Ca_HotTopic,Ca_TopRatedPosts,Ca_News,Ca_PastThreads,Ca_CustomB1,Ca_CustomB2,Ca_CustomB3,Ca_CurrentPollName,Ca_CurrentPollVote,Ca_CurrentPollResult FROM {$config['tbprefix']}IIPcache WHERE Ca_Number = 1 "; $sth = $dbh -> do_query($query); list ($LastCacheTime,$ShortStatData,$TopPostersData,$LastSeenData,$LastSeenData2,$RandProfileData,$TopThreadsData,$CurrentThreadsData,$HotTopicData,$TopRatedPostsData,$NewsData,$PastThreadsData,$CustomBox1Data,$CustomBox2Data,$CustomBox3Data,$Pol1NameData,$Pol1VoteData,$Pol1ResultsData) = $dbh -> fetch_array($sth); $dbh -> finish_sth($sth); if ($RefCache && $user['U_Status'] = "Administrator") { $LastCacheTime = 0; } if (empty($forcepublic)) { $TopThreadsData = ""; $Pol1NameData = ""; $Pol1VoteData = ""; $Pol1ResultsData = ""; $CurrentThreadsData = ""; $HotTopicData = ""; $TopRatedPostsData = ""; $NewsData = ""; $PastThreadsData = ""; } $numberOfBoards = $g; $query = " SELECT COUNT(*) FROM {$config['tbprefix']}Users WHERE U_Number > 1 AND U_Approved = 'yes' "; $sth = $dbh -> do_query($query); list ($palShowregs) = $dbh -> fetch_array($sth); $dbh -> finish_sth($sth); $phpSelf = find_environmental ("PHP_SELF"); $phpSelf = split("/",$phpSelf); $num = count($phpSelf) -1; $phpSelf = $phpSelf[$num]; if (ereg("MSIE", find_environmental('HTTP_USER_AGENT'))) { $xnum = 0; $mybrowser = "MSIE"; } else if (ereg("Netscape", find_environmental('HTTP_USER_AGENT'))) { $xnum = 1; $mybrowser = "Netscape"; } else { $xnum = 2; $mybrowser = "Other"; } } // send the header $config['iip_call'] = "1"; $html = new html; $html -> send_header($config['title'],$Cat,0,$user); list($tbopen,$tbclose) = $html -> table_wrapper(); if ($configured53 && $VersionNotice == "" && empty($config['isclosed'])) { if (!empty($membersonly) && empty($user['U_Number'])) { echo "$tbopen
{$pal_Alert[4]}

{$pal_Alert[5]}

"; include "{$palspath}/pals/loginpal.php"; echo "
{$pal_Alert[2]}

{$pal_Alert[3]}$VersionNotice$CookieNotice