1:
|
<?php // ************************************************************************************// // * WoltLab Burning Board 2 // ************************************************************************************// // * Copyright (c) 2001-2004 WoltLab GmbH // * Web http://www.woltlab.de/ // * License http://www.woltlab.de/products/burning_board/license_en.php // * http://www.woltlab.de/products/burning_board/license.php // ************************************************************************************// // * WoltLab Burning Board 2 is NOT free software. // * You may not redistribute this package or any of it's files. // ************************************************************************************// // * $Date: 2005-10-25 14:50:43 +0200 (Tue, 25 Oct 2005) $ // * $Author: Burntime $ // * $Rev: 1651 $ // ************************************************************************************// $filename = 'misc.php'; require('./global.php'); require('./acp/lib/class_parse.php'); if (isset($_REQUEST['action'])) $action = $_REQUEST['action']; else $action = ''; /** find user popup (for private message) */ if ($action == 'finduser') { $lang->load('MISC'); $options = ''; if (isset($_POST['send'])) { $username = wbb_trim($_POST['username']); if ($username && $username != '%') { $result = $db->unbuffered_query("SELECT username FROM bb".$n."_users WHERE username LIKE '%".addslashes($username)."%'"); while ($row = $db->fetch_array($result)) { $row['username'] = htmlconverter($row['username']); $options .= makeoption($row['username'], $row['username']); } } } eval("\$tpl->output(\"".$tpl->get("finduser")."\");"); } /** more smilies popup **/ if($action=="moresmilies") { $lang->load("MISC"); $all_smilies = $lang->items['LANG_MISC_CATEGORIE_ALL_SMILIE']; if(isset($_GET['catname'])) $catname=$_GET['catname']; elseif(isset($_POST['catname'])) $catname=$_POST['catname']; else $catname=""; if($catname=="") { $standard = $db->query_first("SELECT * FROM bb".$n."_smilies_categorie WHERE standard=1"); $catname=$standard['catname']; } $sel_cate[$catname]=" selected=\"selected\""; if($catname==$all_smilies){ list($smiliecount) = $db->query_first("SELECT COUNT(*) FROM bb".$n."_smilies"); $smiliecount2=$smiliecount; }else{ list($smiliecount2) = $db->query_first("SELECT COUNT(*) FROM bb".$n."_smilies"); list($smiliecount) = $db->query_first("SELECT COUNT(*) FROM bb".$n."_smilies WHERE catname='$catname'"); } var_dump($smiliecount); $smilie_categorie="<option value=\"$all_smilies\" selected=\"selected\">$all_smilies($smiliecount2)</option>"; $result = $db->query("SELECT * FROM bb".$n."_smilies_categorie ORDER BY catorder ASC"); while($row = $db->fetch_array($result)) { if($row['catname']==$catname) $smilie_categorie.="<option value=\"$row[catname]\"$sel_cate[$catname]>$row[catname]($row[counter])</option>"; else $smilie_categorie.="<option value=\"$row[catname]\">$row[catname]($row[counter])</option>"; } if(isset($_GET['page'])) { $page=intval($_GET['page']); if($page==0) $page=1; }else $page=1; if(isset($_POST['smilieseite'])) $page=$_POST['smilieseite']; $smiliesperpage="18"; echo $page; $pages = ceil($smiliecount/$smiliesperpage); if($page>$pages) $page=$pages; echo $page; if($pages>1 && $catname<>$all_smilies) $pagelink=makepage_smilies($smiliecount,"misc.php?action=moresmilies&catname=$catname".$SID_ARG_2ND,$page,$smiliesperpage); elseif($pages>1 && $catname==$all_smilies) $pagelink=makepage_smilies($smiliecount,"misc.php?action=moresmilies&catname=$all_smilies".$SID_ARG_2ND,$page,$smiliesperpage); else $pagelink=""; $rightorleft = "left"; if($showsmiliesrandom==1) { if($catname==$all_smilies) $result = $db->unbuffered_query("SELECT smiliepath, smilietitle, smiliecode,catname FROM bb".$n."_smilies ORDER BY RAND()",0,$smiliesperpage,$smiliesperpage*($page-1)); else $result = $db->unbuffered_query("SELECT smiliepath, smilietitle, smiliecode,catname FROM bb".$n."_smilies WHERE catname='$catname' ORDER BY RAND()",0,$smiliesperpage,$smiliesperpage*($page-1)); }else{ if($catname==$all_smilies) $result = $db->unbuffered_query("SELECT smiliepath, smilietitle, smiliecode,catname FROM bb".$n."_smilies ORDER BY smilieorder ASC",0,$smiliesperpage,$smiliesperpage*($page-1)); else $result = $db->unbuffered_query("SELECT smiliepath, smilietitle, smiliecode,catname FROM bb".$n."_smilies WHERE catname='$catname' ORDER BY smilieid ASC",0,$smiliesperpage,$smiliesperpage*($page-1)); } $j=0; $popup_smiliesbits=""; while($row = $db->fetch_array($result)) { $row['smilietitle']=getlangvar($row['smilietitle'], $lang); $row['smiliename']=htmlconverter($row['smiliecode']); $row['smiliecode']=addcslashes($row['smiliecode'], "'\\"); $row['smiliepath'] = replaceImagefolder($row['smiliepath']); eval ("\$popup_smiliesbits .= \"".$tpl->get("popup_smiliesbits")."\";"); if ($rightorleft == "left") { $j++; $rightorleft = "right"; }else $rightorleft = "left"; } $j++; $tdclass=getone($j,"tableb","tablea"); if($rightorleft == "right") $popup_smiliesbits .= "<td class=\"$tdclass\"> </td><td class=\"$tdclass\"> </td></tr>"; eval("\$tpl->output(\"".$tpl->get("popup_smilies")."\");"); } /** whoposted popup **/ if ($action == 'whoposted') { if (!isset($threadid)) error($lang->get("LANG_GLOBAL_ERROR_FALSELINK", array('$adminmail' => $adminmail))); $lang->load('MISC'); $posts = $db->unbuffered_query("SELECT COUNT(p.postid) AS posts, p.userid, u.username FROM bb".$n."_posts p LEFT JOIN bb".$n."_users u USING (userid) WHERE threadid='$threadid' GROUP BY p.userid ORDER BY posts DESC, u.username ASC"); $posters = ''; $counter = 0; $totalposts = 0; while ($post = $db->fetch_array($posts)) { $totalposts += $post['posts']; $post['posts'] = number_format($post['posts'], 0, '', $lang->get("LANG_GLOBAL_THOUSANDS_SEP")); if ($post['userid']) { $authorname = makehreftag("profile.php?userid=".$post['userid'].$SID_ARG_2ND, "<b>".htmlconverter($post['username'])."</b>", "_blank"); $post['posts'] = makehreftag("thread.php?threadid=".$threadid."&hilightuser=".$post['userid'].$SID_ARG_2ND, "<b>$post[posts]</b>", "_blank"); } else $authorname = $lang->items['LANG_MISC_WHOPOSTED_GUESTS']; eval("\$posters .= \"".$tpl->get("whopostedbit")."\";"); $counter++; } if ($totalposts >= 1000) $totalposts = number_format($totalposts, 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP")); $lang->items['LANG_MISC_WHOPOSTED_POSTS_TOTAL'] = $lang->get("LANG_MISC_WHOPOSTED_POSTS_TOTAL", array('$totalposts' => $totalposts)); eval("\$tpl->output(\"".$tpl->get("whoposted")."\");"); } /** view ip **/ if ($action == 'viewip') { if (!isset($postid)) error($lang->get("LANG_GLOBAL_ERROR_FALSELINK", array('$adminmail' => $adminmail))); if ($wbbuserdata['a_can_view_ipaddress'] != 1) access_error(); $lang->load('MISC'); $navbar = getNavbar($board['parentlist']); eval("\$navbar .= \"".$tpl->get("navbar_board")."\";"); $post['host'] = htmlconverter(@gethostbyaddr($post['ipaddress'])); $moreips = ''; if ($post['userid']) { $result = $db->unbuffered_query("SELECT DISTINCT ipaddress FROM bb".$n."_posts WHERE userid='$post[userid]' AND ipaddress<>'".addslashes($post['ipaddress'])."' ORDER BY posttime DESC", 0, 10); while ($row = $db->fetch_array($result)) $moreips .= htmlconverter($row['ipaddress'])."<br />"; } $thread['topic'] = htmlconverter(textwrap($thread['topic'])); $post['username'] = htmlconverter($post['username']); $post['ipaddress'] = htmlconverter($post['ipaddress']); $lang->items['LANG_MISC_VIEWIP_POSTED_BY'] = $lang->get("LANG_MISC_VIEWIP_POSTED_BY", array('$username' => $post['username'])); eval("\$tpl->output(\"".$tpl->get("viewip")."\");"); } /** FAQ **/ if ($action == 'faq') { $lang->load('FAQ'); eval("\$tpl->output(\"".$tpl->get("faq")."\");"); } if($action=="boardregeln") { eval("\$tpl->output(\"".$tpl->get("boardregeln")."\");"); } if($action=="impressum") { eval("\$tpl->output(\"".$tpl->get("impressum")."\");"); } if($action=="datenschutz") { eval("\$tpl->output(\"".$tpl->get("datenschutz")."\");"); } /** FAQ #1 **/ if ($action == 'faq1') { $lang->load('FAQ'); $count = 0; $rankbit = ''; $result = $db->unbuffered_query("SELECT r.*, g.title FROM bb".$n."_ranks r LEFT JOIN bb".$n."_groups g USING(groupid) ORDER BY g.showorder ASC, r.groupid DESC, r.needposts ASC"); while ($row = $db->fetch_array($result)) { $tdclass = getone($count, "tablea", "tableb"); $row['title'] = getlangvar($row['title'], $lang); $row['ranktitle'] = getlangvar($row['ranktitle'], $lang); $row['rankimages'] = formatRI($row['rankimages']); eval("\$rankbit .= \"".$tpl->get("faq1_rankbit")."\";"); $count++; } $lang->items['LANG_FAQ_COOKIES_EXP'] = $lang->get("LANG_FAQ_COOKIES_EXP", array('$SID_ARG_2ND' => $SID_ARG_2ND)); $lang->items['LANG_FAQ_PROFILE_EXP'] = $lang->get("LANG_FAQ_PROFILE_EXP", array('$SID_ARG_2ND' => $SID_ARG_2ND)); $lang->items['LANG_FAQ_PASSWORD_EXP'] = $lang->get("LANG_FAQ_PASSWORD_EXP", array('$SID_ARG_1ST' => $SID_ARG_1ST)); $lang->items['LANG_FAQ_SIGNATUR_EXP'] = $lang->get("LANG_FAQ_SIGNATUR_EXP", array('$SID_ARG_2ND' => $SID_ARG_2ND)); $lang->items['LANG_FAQ_BUDDY_EXP'] = $lang->get("LANG_FAQ_BUDDY_EXP", array('$SID_ARG_2ND' => $SID_ARG_2ND, '$imagefolder' => $style['imagefolder'])); $lang->items['LANG_FAQ_FAVORITES_EXP'] = $lang->get("LANG_FAQ_FAVORITES_EXP", array('$SID_ARG_2ND' => $SID_ARG_2ND)); eval("\$tpl->output(\"".$tpl->get("faq1")."\");"); } /** FAQ #2 **/ if ($action == 'faq2') { $lang->load('FAQ'); $lang->items['LANG_FAQ_EMAIL_EXP'] = $lang->get("LANG_FAQ_EMAIL_EXP", array('$SID_ARG_1ST' => $SID_ARG_1ST, '$imagefolder' => $style['imagefolder'])); $lang->items['LANG_FAQ_PM_EXP'] = $lang->get("LANG_FAQ_PM_EXP", array('$SID_ARG_1ST' => $SID_ARG_1ST, '$SID_ARG_2ND' => $SID_ARG_2ND, '$imagefolder' => $style['imagefolder'])); $lang->items['LANG_FAQ_MEMBERLIST_EXP'] = $lang->get("LANG_FAQ_MEMBERLIST_EXP", array('$SID_ARG_1ST' => $SID_ARG_1ST)); $lang->items['LANG_FAQ_CALENDAR_EXP'] = $lang->get("LANG_FAQ_CALENDAR_EXP", array('$SID_ARG_1ST' => $SID_ARG_1ST, '$SID_ARG_2ND' => $SID_ARG_2ND)); eval("\$tpl->output(\"".$tpl->get("faq2")."\");"); } /** FAQ #3 **/ if ($action == 'faq3') { $lang->load('FAQ'); $lang->items['LANG_FAQ_FORMAT_EXP'] = $lang->get("LANG_FAQ_FORMAT_EXP", array('$SID_ARG_2ND' => $SID_ARG_2ND)); $lang->items['LANG_FAQ_SMILIES_EXP'] = $lang->get("LANG_FAQ_SMILIES_EXP", array('$SID_ARG_2ND' => $SID_ARG_2ND)); $lang->items['LANG_FAQ_NOTIFICATION_EXP'] = $lang->get("LANG_FAQ_NOTIFICATION_EXP", array('$SID_ARG_2ND' => $SID_ARG_2ND)); $lang->items['LANG_FAQ_EDIT_EXP'] = $lang->get("LANG_FAQ_EDIT_EXP", array('$imagefolder' => $style['imagefolder'])); eval("\$tpl->output(\"".$tpl->get("faq3")."\");"); } /** rate user **/ if ($action == 'userrating') { $lang->load('MISC'); if (isset($_GET['userid'])) $userid = intval($_GET['userid']); elseif (isset($_POST['userid'])) $userid = intval($_POST['userid']); else { eval("\$tpl->output(\"".$tpl->get("userrating_error")."\");"); exit(); } if ($wbbuserdata['can_rate_users'] == 0 || $userid == $wbbuserdata['userid']) { eval("\$tpl->output(\"".$tpl->get("userrating_error")."\");"); exit(); } if ($wbbuserdata['userid']) $result = $db->query_first("SELECT id FROM bb".$n."_votes WHERE id='$userid' AND votemode=3 AND userid='$wbbuserdata[userid]'"); else $result = $db->query_first("SELECT id FROM bb".$n."_votes WHERE id='$userid' AND votemode=3 AND ipaddress='".addslashes($REMOTE_ADDR)."'"); if ($result['id']) { eval("\$tpl->output(\"".$tpl->get("userrating_error")."\");"); exit(); } $user = $db->query_first("SELECT userid, username FROM bb".$n."_users WHERE userid='$userid'"); if (!$user['userid']) { eval("\$tpl->output(\"".$tpl->get("userrating_error")."\");"); exit(); } if (isset($_POST['send'])) { $ratingpoints = intval($_POST['ratingpoints']); if ($ratingpoints >= 0 && $ratingpoints <= 10) { $db->unbuffered_query("UPDATE bb".$n."_users SET ratingcount=ratingcount+1, ratingpoints=ratingpoints+'$ratingpoints' WHERE userid='$userid'", 1); $db->unbuffered_query("INSERT INTO bb".$n."_votes (id,votemode,userid,ipaddress) VALUES ('$userid','3','$wbbuserdata[userid]','".addslashes($REMOTE_ADDR)."')", 1); } eval("\$tpl->output(\"".$tpl->get("window_close")."\");"); exit(); } $user['username'] = htmlconverter($user['username']); eval("\$tpl->output(\"".$tpl->get("userrating_window")."\");"); } /** show smilies **/ if ($action == 'showsmilies') { $lang->load('FAQ'); if ($showsmiliesrandom == 1) $result = $db->unbuffered_query("SELECT smiliepath, smilietitle, smiliecode FROM bb".$n."_smilies ORDER BY RAND()"); else $result = $db->unbuffered_query("SELECT smiliepath, smilietitle, smiliecode FROM bb".$n."_smilies ORDER BY smilieorder ASC"); $smiliebit = ''; while ($row = $db->fetch_array($result)) { $row['smilietitle'] = getlangvar($row['smilietitle'], $lang); $row['smiliecode'] = htmlconverter($row['smiliecode']); $row['smiliepath'] = replaceImagefolder($row['smiliepath']); eval("\$smiliebit .= \"".$tpl->get("faq_showsmiliesbit")."\";"); } eval("\$tpl->output(\"".$tpl->get("faq_showsmilies")."\");"); } /** show bbcodes **/ if ($action == 'bbcode'){ $lang->load('FAQ'); $parse = &new parse(0, 75, 1, "", 0); $count = 1; $faq_bbcode_links_bit = ''; $faq_bbcode_content = ''; $result = $db->query("SELECT bbcodeexample, bbcodeexplanation FROM bb".$n."_bbcodes ORDER BY bbcodeid"); while ($row = $db->fetch_array($result)) { $name = getlangvar($row['bbcodeexample'], $lang); $description = getlangvar($row['bbcodeexplanation'], $lang); $parsed = $parse->doparse(rehtmlconverter($name), 0, 0, 1, 1); $content = $lang->get("LANG_FAQ_BBCODES_CONTENT", array('$name' => $name, '$parsed' => $parsed)); eval("\$faq_bbcode_links_bit .= \"".$tpl->get("faq_bbcode_links")."\";"); eval("\$faq_bbcode_content .= \"".$tpl->get("faq_bbcode_content")."\";"); $count++; } $lang->items['LANG_FAQ_BBCODES_IMG'] = $lang->get("LANG_FAQ_BBCODES_IMG", array('{$style[imagefolder]}' => $style['imagefolder'])); eval("\$tpl->output(\"".$tpl->get("faq_bbcode")."\");"); } /** show imprint **/ if ($action == 'imprint') { eval("\$tpl->output(\"".$tpl->get("imprint")."\");"); } function makepage_smilies($results, $address, $page, $perpage) { global $lang; $curpage = 0; $pagenav = ''; $firstlink = ''; $prevlink = ''; $lastlink = ''; $nextlink = ''; $pagelinkpages="3"; if ($results <= $perpage) { $show['pagenav'] = false; return ''; } $show['pagenav'] = true; $total = smilie_number_format($results); $totalpages = ceil($results / $perpage); $showprev = "0"; $shownext = "0"; $showfirst = "0"; $showlast = "0"; if ($page > 1) { $prevpage = $page - 1; $prevnumbers = smilie_start_end_total_array($prevpage, $perpage, $results); $showprev = 1; } if ($page < $totalpages) { $nextpage = $page + 1; $nextnumbers = smilie_start_end_total_array($nextpage, $perpage, $results); $shownext = 1; } while ($curpage++ < $totalpages) { if (($curpage <= $page - $pagelinkpages OR $curpage >= $page + $pagelinkpages) AND $pagelinkpages != 0) { if ($curpage == 1) { $firstnumbers = smilie_start_end_total_array(1, $perpage, $results); $showfirst = 1; } if ($curpage == $totalpages) { $lastnumbers = smilie_start_end_total_array($totalpages, $perpage, $results); $showlast = 1; } } else { if ($curpage == $page) { $numbers = smilie_start_end_total_array($curpage, $perpage, $results); $LANG_MISC_SMILIES_NEWPAGELINK_AKTUELL = $lang->get("LANG_MISC_SMILIES_NEWPAGELINK_AKTUELL", array('$numbers[first]' => $numbers['first'], '$numbers[last]' => $numbers['last'], '$total' => $total)); $pagelink1 .= "<td class=\"tableb\"><span class=\"smallfont\" title=\"$LANG_MISC_SMILIES_NEWPAGELINK_AKTUELL\">[ <b>$curpage</b> ]</span></td>"; } else { $pagenumbers = smilie_start_end_total_array($curpage, $perpage, $results); $LANG_MISC_SMILIES_NEWPAGELINK_AKTUELL2 = $lang->get("LANG_MISC_SMILIES_NEWPAGELINK_AKTUELL2", array('$pagenumbers[first]' => $pagenumbers['first'], '$pagenumbers[last]' => $pagenumbers['last'], '$total' => $total)); $pagelink1 .= "<td class=\"tablea\"><span class=\"smallfont\"> <a href=\"$address&page=$curpage\" title=\"$LANG_MISC_SMILIES_NEWPAGELINK_AKTUELL2\">$curpage</a> </span></td>"; } } } $LANG_MISC_SMILIES_NEWPAGELINK_SITE = $lang->get("LANG_MISC_SMILIES_NEWPAGELINK_SITE", array('$page' => $page, '$totalpages' => $totalpages)); $LANG_MISC_SMILIES_NEWPAGELINK_FIRST1 = $lang->get("LANG_MISC_SMILIES_NEWPAGELINK_FIRST1", array('$firstnumbers[first]' => $firstnumbers['first'], '$firstnumbers[last]' => $firstnumbers['last'], '$total' => $total)); $LANG_MISC_SMILIES_NEWPAGELINK_FIRST = $lang->items['LANG_MISC_SMILIES_NEWPAGELINK_FIRST']; $LANG_MISC_SMILIES_NEWPAGELINK_PREV = $lang->get("LANG_MISC_SMILIES_NEWPAGELINK_PREV", array('$prevnumbers[first]' => $prevnumbers['first'], '$prevnumbers[last]' => $prevnumbers['last'], '$total' => $total)); $LANG_MISC_SMILIES_NEWPAGELINK_NEXT = $lang->get("LANG_MISC_SMILIES_NEWPAGELINK_NEXT", array('$nextnumbers[first]' => $nextnumbers['first'], '$nextnumbers[last]' => $nextnumbers['last'], '$total' => $total)); $LANG_MISC_SMILIES_NEWPAGELINK_LAST1 = $lang->get("LANG_MISC_SMILIES_NEWPAGELINK_LAST1", array('$lastnumbers[first]' => $lastnumbers['first'], '$lastnumbers[last]' => $lastnumbers['last'], '$total' => $total)); $LANG_MISC_SMILIES_NEWPAGELINK_LAST = $lang->items['LANG_MISC_SMILIES_NEWPAGELINK_LAST']; $pagelink = "<table class=\"tableinborder\" cellpadding=\"3\" cellspacing=\"1\" border=\"0\"><tr><td class=\"tablecat\" align=\"center\" nowrap=\"nowrap\"><span class=\"smallfont\">$LANG_MISC_SMILIES_NEWPAGELINK_SITE</span></td>"; if($showfirst==1) $pagelink .="<td class=\"tablea\" nowrap=\"nowrap\"><span class=\"smallfont\"><a href=\"$address&page=1\" title=\"$LANG_MISC_SMILIES_NEWPAGELINK_FIRST1\">$LANG_MISC_SMILIES_NEWPAGELINK_FIRST</a></span></td>"; if($showprev==1) $pagelink .="<td class=\"tablea\"><span class=\"smallfont\"> <a href=\"$address&page=$prevpage\" title=\"$LANG_MISC_SMILIES_NEWPAGELINK_PREV\"><</a> </span></td>"; $pagelink .=$pagelink1; if($shownext==1) $pagelink .="<td class=\"tablea\"><span class=\"smallfont\"> <a href=\"$address&page=$nextpage\" title=\"$LANG_MISC_SMILIES_NEWPAGELINK_NEXT\">></a> </span></td>"; if($showlast==1) $pagelink .="<td class=\"tablea\" nowrap=\"nowrap\"><span class=\"smallfont\"><a href=\"$address&page=$totalpages\" title=\"$LANG_MISC_SMILIES_NEWPAGELINK_LAST1\">$LANG_MISC_SMILIES_NEWPAGELINK_LAST</a></span></td>"; $pagelink .="</tr></table>"; return $pagelink; } function smilie_start_end_total_array($pagenumber, $perpage, $total) { $first = $perpage * ($pagenumber - 1); $last = $first + $perpage; if ($last > $total) $last = $total; $first++; return array('first' => smilie_number_format($first), 'last' => smilie_number_format($last)); } function smilie_number_format($number, $decimals = 0) { return number_format($number, $decimals, ",", ".") . $type; } // boardpasswordlist by br�ke | start // boardpasswordlist functions $permissioncache = array(); $permissioncache = getPermissions(); function makebplist($boardid, $x = 0) { global $boardcache, $permissioncache, $maxcolspan, $tpl, $lang, $style; if (!isset($boardcache[$boardid])) return; while (list($key1, $val1) = each($boardcache[$boardid])) { while (list($key2, $boards) = each($val1)) { if (!isset($permissioncache[$boards['boardid']]['can_view_board']) || $permissioncache[$boards['boardid']]['can_view_board'] == -1) $permissioncache[$boards['boardid']]['can_view_board'] = $wbbuserdata['can_view_board']; if (!isset($permissioncache[$boards['boardid']]['can_enter_board']) || $permissioncache[$boards['boardid']]['can_enter_board'] == -1) $permissioncache[$boards['boardid']]['can_enter_board'] = $wbbuserdata['can_enter_board']; if ($boards['invisible'] == 2 || !$permissioncache[$boards['boardid']]['can_view_board']) continue; $count = countboard($boardcache[$boardid]); $colspan = $maxcolspan - $x; $temp = $maxcolspan - ($maxcolspan - $x); if ($temp) $tds = str_repeat("<td class=\"tablea\"> </td>", $temp); else $tds = ''; eval("\$out .= \"".$tpl->get("bplistbit")."\";"); $out .= makebplist($boards['boardid'], $x + 1); } } unset($boardcache[$boardid]); return $out; } function countboard($array) { $count = 0; reset($array); while (list($key, $val) = each($array)) $count += count($val); return $count; } // boardpasswordlist popup if ($action == 'bplist') { if ($wbbuserdata['m_can_view_bplist'] != 1) access_error(); $lang->load('MISC'); $maxcolspan = 0; $result = $db->query("SELECT boardid, parentid, boardorder, title, parentlist, password, invisible FROM bb".$n."_boards WHERE bpl=1 ORDER by parentid ASC, boardorder ASC"); while ($row = $db->fetch_array($result)) { $temp = count(explode(",", $row['parentlist'])); if ($temp > $maxcolspan) $maxcolspan = $temp; $row['title'] = getlangvar($row['title'], $lang); $row['password'] = htmlconverter($row['password']); $boardcache[$row['parentid']][$row['boardorder']][$row['boardid']] = $row; } $bplist = makebplist(0); $maxcolspan += 1; $mincolspan = ($maxcolspan-1); eval("\$tpl->output(\"".$tpl->get("bplist")."\");"); } // boardpasswordlist by br�ke | end ?> |