query("SELECT boxid,boxname FROM bb".$n."_portal_module WHERE boxid='".$_POST['portal_site_select']."'"); if(!$db->num_rows($result)) $portal_location = "portal.php?sid=$session[hash]"; else $portal_location = "portal_module.php?module=".$_POST['portal_site_select']."&sid=$session[hash]"; } header("Location:".$portal_location); exit(); } if($portal_gb_url!="http://deineURL/wbblite/burningbook" && $portal_gb_url) $portal_site_selectbits = makeoption("wbbook","Gstebuch"); else $portal_site_selectbits = ""; $result = $db -> query("SELECT boxid,boxname FROM bb".$n."_portal_module"); while($row=$db -> fetch_array($result)) $portal_site_selectbits .= makeoption($row['boxid'],$row['boxname']); eval ("\$portal_site_select = \"".$tpl->get("portal_site_select")."\";"); /* ############## Ende Portal Site Select ############## */ $newestuser = $db->query_first("SELECT userid,username FROM bb".$n."_users WHERE activation='1' ORDER by regdate DESC LIMIT 1"); $newestuser = makehreftag("profile.php?userid=$newestuser[userid]&sid=$session[hash]",$newestuser['username']); $searchdate = time() - $wbbuserdata['lastvisit']; /* ############# Minimieren oder Maximieren der Boxen ############ */ if($_GET['action'] == "hidebox") { $db -> query("INSERT INTO bb".$n."_portal_hide VALUES ('".intval($wbbuserdata['userid'])."', '".$_GET['boxid']."')"); header("Location: ".ifelse($_GET['pfile'],$_GET['pfile']."?sid=$session[hash]","portal.php?sid=$session[hash]")); exit(); } if($_GET['action'] == "showbox") { $db -> query("DELETE FROM bb".$n."_portal_hide WHERE userid='".$wbbuserdata['userid']."' AND boxid='".$_GET['boxid']."'"); header("Location: ".ifelse($_GET['pfile'],$_GET['pfile']."?sid=$session[hash]","portal.php?sid=$session[hash]")); exit(); } /* ############# Auslesen der minimierten Boxen ############ */ $result = $db -> query("SELECT boxid FROM bb".$n."_portal_hide WHERE userid='".$wbbuserdata['userid']."'"); while($num=$db -> fetch_array($result)) $hideboxes[$num['boxid']] = 1; /* ############# Aufruf der neuen Boxen ############ */ if($_REQUEST['single']) { $result = $db -> query("SELECT box.boxid FROM bb".$n."_portal_box AS box LEFT JOIN bb".$n."_portal_box_type AS boxtype ON (box.boxtypeid=boxtype.boxtypeid) WHERE IF(boxinhalt,boxinhalt,typecontent)='".$_REQUEST['single']."'"); if($db->num_rows($result)>0) { $_REQUEST['hidesideboxes']=1; list($singleid)=$db -> fetch_array($result); } } $result = $db -> query("SELECT box.boxid, boxname, IF(boxinhalt<>'',boxinhalt,typecontent) AS boxinhalt, bseite FROM bb".$n."_portal_box AS box,bb".$n."_portal_object2box AS object LEFT JOIN bb".$n."_portal_box_type AS boxtype ON (box.boxtypeid=boxtype.boxtypeid) WHERE box.boxid=object.boxid AND objectid='$wbbuserdata[groupid]' AND viewpermission='1'".ifelse($singleid," AND box.boxid='".$singleid."'")." ORDER BY bsort"); while($num=$db -> fetch_array($result)) { if($num['boxinhalt'] == "{boardumfrage}" && !$portal_poll) continue; $boxname = $num['boxname']; if ($hideboxes[$num['boxid']]) { $boxinhalt = ""; if($num['bseite'] == 0 || $num['bseite'] == 1) eval ("\$showhide_link = \"".$tpl->get("portal_box_showbit")."\";"); else eval ("\$showhide_link = \"".$tpl->get("portal_box_showbit2")."\";"); } else { $boxinhalt = $num['boxinhalt']; if($wbbuserdata['userid']) { if($num['bseite'] == 0 || $num['bseite'] == 1) eval ("\$showhide_link = \"".$tpl->get("portal_box_hidebit")."\";"); else eval ("\$showhide_link = \"".$tpl->get("portal_box_hidebit2")."\";"); } } $boxinhalt = preg_replace_callback('/(<\?php)(.*)(\?>)/isU', create_function('$matches', 'return eval_php_code($matches[2]);'), $boxinhalt); if ($num['bseite'] == 0) eval ("\$box .= \"".$tpl->get("portal_box")."\";"); elseif ($num['bseite'] == 1) eval ("\$box2 .= \"".$tpl->get("portal_box")."\";"); else eval ("\$box3 .= \"".$tpl->get("portal_box2")."\";"); } eval ("\$portal_menu = \"".$tpl->get("portal_menu")."\";"); /* ############## Anfang Navigations-Box ############## */ $result = $db->query ("SELECT parentid FROM bb".$n."_portal_navilink WHERE link_groupid=".intval($wbbuserdata['groupid'])); while ($row = $db->fetch_array ($result)) $link_permission[$row[parentid]]="1"; $result = $db->query ("SELECT * FROM bb".$n."_portal_navilink WHERE parentid=0 ORDER BY linkorder"); while ($row = $db->fetch_array ($result)) { if($link_permission[$row['linkid']]) { if($row[link]) { if(substr($row[link],0,7) != "http://") { if(!strchr($row[link], "?")) $row[link].="?sid=".$session['hash']; else $row[link].="&sid=".$session['hash']; } eval ("\$navibox .= \"" . $tpl->get ("portal_naviboxbit") . "\";"); } else $navibox .= $row['linkname']; } } if($navibox != "") { $boxname = "Navigation"; $boxinhalt = $navibox; $showhide_link = ""; eval ("\$navibox = \"".$tpl->get("portal_box")."\";"); } if($portal_box_reset) $box = $navibox; else $box = $navibox.$box; /* ############## Ende Navigations-Box ############## */ /*############### Anfang Umfrage ####### */ if((ereg("{boardumfrage}",$box) || ereg("{boardumfrage}",$box2) || ereg("{boardumfrage}",$box3)) && $portal_poll) { if($wbbuserdata['issupermod']==1 || $modpermissions['userid']==1) eval ("\$mod_poll_edit = \"".$tpl->get("portal_mod_poll_edit")."\";"); unset($votecheck); $ppoll=$db->query_first("SELECT * FROM bb".$n."_polls WHERE pollid='$portal_poll'"); if($ppoll['timeout']==0) $timeout=time()+1; else $timeout=$ppoll['starttime']+$ppoll['timeout']*86400; if($_REQUEST['preresult']!=1 && $wbbuserdata['canvotepoll'] && $timeout>=time()) { if($wbbuserdata['userid']) $votecheck=$db->query_first("SELECT id AS pollid FROM bb".$n."_votes WHERE id='$portal_poll' AND votemode=1 AND userid='$wbbuserdata[userid]'"); else $votecheck=$db->query_first("SELECT id AS pollid FROM bb".$n."_votes WHERE id='$portal_poll' AND votemode=1 AND ipaddress='$REMOTE_ADDR'"); } if($_REQUEST['preresult']==1 || $votecheck['pollid'] || !$wbbuserdata['canvotepoll'] || $timeoutquery("SELECT * FROM bb".$n."_polloptions WHERE pollid='$portal_poll' ORDER BY votes DESC"); while($row=$db->fetch_array($result)) { $totalvotes+=$row['votes']; $ppolloptions[]=$row; } $i=1; while(list($key,$row)=each($ppolloptions)) { if($totalvotes) { $percent_float = $row['votes']*100/$totalvotes; $percent = number_format($percent_float, 2); if(ereg("{boardumfrage}",$box3)) { $percent_int = floor($percent_float)*3; $percent_int += 1; } else $percent_int = floor($percent_float); } else $percent = $percent_int = 0; if(ereg("{boardumfrage}",$box3)) eval ("\$portal_poll_resultbit .= \"".$tpl->get("portal_poll_resultbit")."\";"); else eval ("\$portal_poll_resultbit .= \"".$tpl->get("portal_poll_resultbit2")."\";"); if($i==5) $i=0; $i++; } if(ereg("{boardumfrage}",$box3)) eval ("\$portal_poll = \"".$tpl->get("portal_poll_result")."\";"); else eval ("\$portal_poll = \"".$tpl->get("portal_poll_result2")."\";"); unset($portal_poll_resultbit); } else { if($ppoll['choicecount']>1) $inputtype="checkbox"; else $inputtype="radio"; $result=$db->query("SELECT * FROM bb".$n."_polloptions WHERE pollid='$portal_poll' ORDER BY showorder ASC"); while($row=$db->fetch_array($result)) { if(ereg("{boardumfrage}",$box3)) eval ("\$portal_pollbit .= \"".$tpl->get("portal_pollbit")."\";"); else eval ("\$portal_pollbit .= \"".$tpl->get("portal_pollbit2")."\";"); } if(ereg("{boardumfrage}",$box3)) eval ("\$portal_poll = \"".$tpl->get("portal_poll")."\";"); else eval ("\$portal_poll = \"".$tpl->get("portal_poll2")."\";"); unset($portal_pollbit); } $portal_poll = "
$portal_poll
"; $box = str_replace("{boardumfrage}","$portal_poll",$box); $box2 = str_replace("{boardumfrage}","$portal_poll",$box2); $box3 = str_replace("{boardumfrage}","$portal_poll",$box3); } /*############### Ende Umfrage ####### */ /*############### Anfang Gstebuch Eintrge ####### */ if(ereg("{gb}",$box) || ereg("{gb}",$box2) || ereg("{gb}",$box3)) { if ($portal_gb_url != "http://deineURL/wbblite/burningbook" && $portal_gb_url) { $los = $db->query("SELECT * FROM bgb".$n."_posts ORDER BY posttime DESC",$portal_count_gb,0,1); $los2 = $db -> query("SELECT COUNT(*) FROM bgb".$n."_posts",0,0,1); if(!$los) { $los = $db->query("SELECT * FROM bgb_posts ORDER BY posttime DESC",$portal_count_gb,0,1); $los2 = $db -> query("SELECT COUNT(*) FROM bgb_posts",0,0,1); } if($los) { while($erg = $db->fetch_array($los)) { $eintragtime = formatdate($dateformat.", ",$erg["posttime"],1); $eintragtime .= " ".formatdate($timeformat,$erg["posttime"]); eval ("\$wbbookeintraguser .= \"".$tpl->get("portal_guestbook_userbit")."\";"); } $gbeintrag = $db -> fetch_array($los2); } } if(!$gbeintrag[0]) $gbeintrag[0] = "0"; eval ("\$wbbookeintrag = \"".$tpl->get("portal_guestbook")."\";"); $box = str_replace("{gb}","$wbbookeintrag",$box); $box2 = str_replace("{gb}","$wbbookeintrag",$box2); $box3 = str_replace("{gb}","$wbbookeintrag",$box3); } /* ############## Ende Gstebuch Eintrge ######## */ /* ########### Anfang Wer ist Online ########## */ if(ereg("{wio}",$box) || ereg("{wio}",$box2) || ereg("{wio}",$box3)) { $p_membercount=0; $p_guestcount=0; $result = $db->query("SELECT bb".$n."_sessions.userid, username, bb".$n."_users.groupid, invisible,shorttitle,shorttitlecolor FROM bb".$n."_sessions LEFT JOIN bb".$n."_users USING (userid) LEFT JOIN bb".$n."_groups USING (groupid) WHERE bb".$n."_sessions.lastactivity >= '".(time()-60*$useronlinetimeout)."' ORDER BY username ASC"); while($row = $db->fetch_array($result)) { if($row['userid']==0) { $p_guestcount++; continue; } $p_membercount++; $row['shorttitle']=stripslashes($row['shorttitle']); if(!$row['invisible']) eval ("\$p_useronlinebit .= \"".$tpl->get("portal_wiobit")."\";"); } $useronline = $p_guestcount + $p_membercount; if ($onlineuser <> 1) $onlineuserTag = "sind"; else $onlineuserTag = "ist"; if ($p_guestcount <> 1) $guestsTag = "Gste"; else $guestsTag = "Gast"; if ($p_membercount <> 1) $membersTag = "Mitglieder"; else $membersTag = "Mitglied"; eval ("\$wio = \"".$tpl->get("portal_wio")."\";"); $box = str_replace("{wio}","$wio",$box); $box2 = str_replace("{wio}","$wio",$box2); $box3 = str_replace("{wio}","$wio",$box3); } /* ########### Ende Wer ist Online ########## */ /* ########### Anfang zuletzt Online ########## */ if(ereg("{lastonline}",$box) || ereg("{lastonline}",$box2) || ereg("{lastonline}",$box3)) { $result = $db -> query("SELECT * FROM bb".$n."_users WHERE activation='1' AND invisible='0' ORDER BY lastactivity DESC LIMIT 0,".$portal_count_useronline); while($num=$db -> fetch_array($result)) { $lasttime = formatdate($dateformat.", ",$num['lastactivity'],1); $lasttime .= " ".formatdate($timeformat,$num['lastactivity']); eval ("\$lastonline .= \"".$tpl->get("portal_lastonline")."\";"); } $box = str_replace("{lastonline}","$lastonline",$box); $box2 = str_replace("{lastonline}","$lastonline",$box2); $box3 = str_replace("{lastonline}","$lastonline",$box3); } /* ########### Ende zuletzt Online ########## */ /* ########### Anfang Neue Mitglieder ########## */ if(ereg("{newuser}",$box) || ereg("{newuser}",$box2) || ereg("{newuser}",$box3)) { $result = $db -> query("SELECT * FROM bb".$n."_users WHERE activation='1' ORDER BY regdate DESC",$portal_count_newusers); while ($num = $db -> fetch_array($result)) { $regdatum = formatdate($dateformat.", ",$num['regdate'],1); $regdatum .= " ".formatdate($timeformat,$num['regdate']); eval ("\$newuser .= \"".$tpl->get("portal_newuser")."\";"); } $box = str_replace("{newuser}","$newuser",$box); $box2 = str_replace("{newuser}","$newuser",$box2); $box3 = str_replace("{newuser}","$newuser",$box3); } /* ############## Ende Neue Mitglieder ############## */ /* ############## Anfang Team Anzeige ############## */ if(ereg("{teamuser}",$box) || ereg("{teamuser}",$box2) || ereg("{teamuser}",$box3)) { $result = $db->query("SELECT userid,g.groupid,g.title,icq,username,canuseacp,issupermod,ismod FROM bb".$n."_users u,bb".$n."_groups g WHERE u.groupid=g.groupid AND (canuseacp=1 OR issupermod=1 OR ismod=1) ORDER BY g.groupid ASC,userid ASC"); while($row = $db->fetch_array($result)) { if($row['groupid'] != $tmp_array[groupid] && $tmp_array['groupid']) { if($tmp_array['canuseacp']) eval ("\$teamadmin .= \"".$tpl->get("portal_team")."\";"); else if($tmp_array['issupermod']) eval ("\$teamsmod .= \"".$tpl->get("portal_team")."\";"); else if($tmp_array['ismod']) eval ("\$teammod .= \"".$tpl->get("portal_team")."\";"); $teambit = ""; } $tmp_array['groupid'] = $row['groupid']; $tmp_array['canuseacp'] = $row['canuseacp']; $tmp_array['issupermod'] = $row['issupermod']; $tmp_array['ismod'] = $row['ismod']; $tmp_array['title'] = $row['title']; if ($row['icq']) eval ("\$teamicq = \"".$tpl->get("portal_teamicq")."\";"); else $teamicq = ""; eval ("\$teambit .= \"".$tpl->get("portal_teambit")."\";"); } if($tmp_array['groupid']) { if($tmp_array['canuseacp']) eval ("\$teamadmin .= \"".$tpl->get("portal_team")."\";"); else if($tmp_array['issupermod']) eval ("\$teamsmod .= \"".$tpl->get("portal_team")."\";"); else if($tmp_array['ismod']) eval ("\$teammod .= \"".$tpl->get("portal_team")."\";"); } $teamuser = $teamadmin.$teamsmod.$teammod; $box = str_replace("{teamuser}","$teamuser",$box); $box2 = str_replace("{teamuser}","$teamuser",$box2); $box3 = str_replace("{teamuser}","$teamuser",$box3); } /* ############## Ende Team Anzeige ############## */ /* ############## Anfang Top Poster ############## */ if(ereg("{topposter}",$box) || ereg("{topposter}",$box2) || ereg("{topposter}",$box3)) { $result = $db -> query("SELECT userid,username,userposts FROM bb".$n."_users ORDER BY userposts DESC LIMIT 0,".$portal_count_topposter); while($num=$db -> fetch_array($result)) eval ("\$portal_topposterbits .= \"".$tpl->get("portal_topposterbit")."\";"); eval ("\$topposter .= \"".$tpl->get("portal_topposter")."\";"); $box = str_replace("{topposter}","$topposter",$box); $box2 = str_replace("{topposter}","$topposter",$box2); $box3 = str_replace("{topposter}","$topposter",$box3); } /* ############## Ende Top Poster ############## */ /* ########### Anfang Top Foren ########## */ if(ereg("{topforen}",$box) || ereg("{topforen}",$box2) || ereg("{topforen}",$box3)) { $result = $db -> query("SELECT boardid,title,invisible,postcount FROM bb".$n."_boards ORDER BY postcount DESC LIMIT 0,".$portal_count_topforum); while($num=$db -> fetch_array($result)) { if (strlen($num['title']) > '20') $ViewThreadname = substr($num['title'], 0, 17)."..."; else $ViewThreadname = $num['title']; if(!$num['invisible']) eval ("\$topforen .= \"".$tpl->get("portal_topforenbit")."\";"); } $box = str_replace("{topforen}","$topforen",$box); $box2 = str_replace("{topforen}","$topforen",$box2); $box3 = str_replace("{topforen}","$topforen",$box3); } /* ############## Ende Top Foren ############## */ /* ############## Anfang Suche ############## */ if(ereg("{suche}",$box) || ereg("{suche}",$box2) || ereg("{suche}",$box3)) { $result = $db->query("SELECT boardid, parentid, boardorder, title, invisible FROM bb".$n."_boards ORDER by parentid ASC, boardorder ASC"); while ($row = $db->fetch_array($result)) $boardcache[$row[parentid]][$row[boardorder]][$row[boardid]] = $row; $result = $db->query("SELECT * FROM bb".$n."_permissions WHERE groupid = '$wbbuserdata[groupid]'"); while ($row = $db->fetch_array($result)) $permissioncache[$row[boardid]] = $row; $board_options=makeboardselect(0); eval ("\$portal_suche = \"".$tpl->get("portal_search")."\";"); $box = str_replace("{suche}","$portal_suche",$box); $box2 = str_replace("{suche}","$portal_suche",$box2); $box3 = str_replace("{suche}","$portal_suche",$box3); unset($boardcache); unset($permissioncache); } /* ########### Ende Suche ########## */ /* ############## Anfang Kalender ############## */ if(ereg("{kalender}",$box) || ereg("{kalender}",$box2) || ereg("{kalender}",$box3)) { if($_POST['pkY'] && ($_POST['pkY'] != date("Y") || $_POST['pkM'] != date("n"))) { $monat = $_POST['pkM']; $jahr = $_POST['pkY']; $portal_kalender_time = mktime(0,0,0,$monat,1,$jahr); } else { $monat = date("n"); $jahr = date("Y"); $portal_kalender_time = time(); } for($i=1; $i<=12; $i++) $pkM_options .= makeoption($i,ifelse($i<10,"0".$i,$i),$monat,1); for($i=(date("Y")-2); $i<=(date("Y")+2); $i++) $pkY_options .= makeoption($i,$i,$jahr,1); setlocale (LC_TIME, 'de'); $monat = getmonth($monat); $Tage = date("t", $portal_kalender_time); $week[1] = "Mo"; $week[2] = "Di"; $week[3] = "Mi"; $week[4] = "Do"; $week[5] = "Fr"; $week[6] = "Sa"; $week[7] = "So"; $result = $db->query("SELECT userid, username, birthday FROM bb".$n."_users WHERE birthday <> '000-00-00' ORDER BY username ASC"); while($row=$db->fetch_array($result)) { $birthday_array2 = explode("-",$row['birthday']); if(intval($birthday_array2[1])==date("n", $portal_kalender_time)) { $row['age_y'] = intval($birthday_array2[0]); $row['age_m'] = intval($birthday_array2[1]); $row['age_d'] = intval($birthday_array2[2]); $birthdaycache2[$row['age_d']][]=$row; } } $result = $db->query("SELECT eventid, subject, eventdate, public FROM bb".$n."_events WHERE eventdate LIKE '".date("Y-m", $portal_kalender_time)."%' AND ((userid >= 1 AND userid = '".$wbbuserdata['userid']."') OR public = '1') ORDER BY public ASC, subject ASC",0,0,1); while($row=@$db->fetch_array($result)) $eventcache2[intval(substr($row['eventdate'], -2))][]=$row; if(!$portal_calender_boards) $portal_calender_boards=0; $result = $db->query("SELECT t.* FROM bb".$n."_threads AS t LEFT JOIN bb".$n."_boards AS b ON (t.boardid=b.boardid) WHERE t.boardid IN ($portal_calender_boards) AND t.starttime > '".mktime(0,0,0,date("n", $portal_kalender_time),1,date("Y", $portal_kalender_time))."' AND t.starttime < '".mktime(23,59,59,date("n", $portal_kalender_time),$Tage,date("Y", $portal_kalender_time))."' ORDER BY t.starttime;"); while($row=$db->fetch_array($result)) $eventcache2[date("j",$row['starttime'])][]=$row; eval ("\$kalender = \"".$tpl->get("portal_kalender_script")."\";"); for($w = 1; $w <= 7; $w++) eval ("\$kalender_weekdaybit .= \"".$tpl->get("portal_kalender_weekdaybit")."\";"); $colspan = date("w",mktime(0, 0, 0, date("n", $portal_kalender_time), 1, date("Y", $portal_kalender_time)))-1; if($colspan<0) $colspan += 7; if($colspan) eval ("\$kalender_daybits .= \"".$tpl->get("portal_kalender_dayspan")."\";"); for($i = 1; $i <= $Tage; $i++) { if(!count($eventcache2[$i]) && !count($birthdaycache2[$i])){ if($i == date("j", $portal_kalender_time) && date("n-Y") == date("n-Y", $portal_kalender_time)) eval ("\$kalender_daybits .= \"".$tpl->get("portal_kalender_todaybit")."\";"); else eval ("\$kalender_daybits .= \"".$tpl->get("portal_kalender_daybit")."\";"); } else { if($i == date("j", $portal_kalender_time) && date("n-Y") == date("n-Y", $portal_kalender_time)) eval ("\$kalender_daybits .= \"".$tpl->get("portal_kalender_todaybit_active")."\";"); else eval ("\$kalender_daybits .= \"".$tpl->get("portal_kalender_daybit_active")."\";"); unset($kalender_detail_eventbit); unset($kalender_detail_birthdaybit); for($j=0; $j < count($eventcache2[$i]); $j++) { if(!$eventcache2[$i][$j]['starttime']) { $event_id = $eventcache2[$i][$j]['eventid']; $event_subject = $eventcache2[$i][$j]['subject']; eval ("\$kalender_detail_eventbit .= \"".$tpl->get("portal_kalender_detail_eventbit")."\";"); } else { $event_subject = $eventcache2[$i][$j]['topic']; $kalender_threadid=$eventcache2[$i][$j]['threadid']; eval ("\$kalender_detail_eventbit .= \"".$tpl->get("portal_kalender_detail_eventbit2")."\";"); } } for($j=0; $j < count($birthdaycache2[$i]); $j++) { $birthday_age = (date("Y", $portal_kalender_time)-$birthdaycache2[$i][$j]['age_y']); $birthday_name = $birthdaycache2[$i][$j]['username']; $birthday_id = $birthdaycache2[$i][$j]['userid']; eval ("\$kalender_detail_birthdaybit .= \"".$tpl->get("portal_kalender_detail_birthdaybit")."\";"); } eval ("\$kalender_detail .= \"".$tpl->get("portal_kalender_detail")."\";"); } if((($i + $colspan) % 7)==0) { eval ("\$kalender_weeks .= \"".$tpl->get("portal_kalender_weekbit")."\";"); unset($kalender_daybits); } } $colspan = ($Tage + $colspan) % 7; if($colspan) { $colspan = 7 - $colspan; eval ("\$kalender_daybits .= \"".$tpl->get("portal_kalender_dayspan")."\";"); eval ("\$kalender_weeks .= \"".$tpl->get("portal_kalender_weekbit")."\";"); } eval ("\$kalender .= \"".$tpl->get("portal_kalender")."\";"); $box = str_replace("{kalender}","$kalender",$box); $box2 = str_replace("{kalender}","$kalender",$box2); $box3 = str_replace("{kalender}","$kalender",$box3); } /* ########### Ende Kalender ########## */ /*############### Anfang Buch-Tipp ####### */ if(ereg("{tip}",$box) || ereg("{tip}",$box2) || ereg("{tip}",$box3)) { if($_GET[click] == "click" && $_GET[id]) { $info = $db -> query_first("SELECT * FROM bb".$n."_portal_tip WHERE id='".$_GET['id']."'"); $db -> query("UPDATE bb".$n."_portal_tip SET clicks='".($info['clicks']+1)."' WHERE id='".$_GET['id']."'"); header ("Location: $info[link]"); exit; } srand((double)microtime()*1000000000); $rand_v = rand(); $info = $db -> query("SELECT * FROM bb".$n."_portal_tip ORDER BY RAND($rand_v) LIMIT 0,1"); $info = $db->fetch_array($info); if($info['id']) { $db -> query("UPDATE bb".$n."_portal_tip SET views='".($info['views']+1)."' WHERE id='".$info['id']."'"); if($info['link']) $info['link'] = ""; if($info['grafikfile']) $info['grafik'] = "portal_tip/".$info['id']."-".$info['grafikfile']; $info['title'] = stripslashes($info['title']); $info['subtitle'] = stripslashes($info['subtitle']); } eval ("\$bannertipp = \"".$tpl->get("portal_tip")."\";"); $box = str_replace("{tip}","$bannertipp",$box); $box2 = str_replace("{tip}","$bannertipp",$box2); $box3 = str_replace("{tip}","$bannertipp",$box3); } /* ############## Ende Buch-Tipp ######## */ /* ############## Anfang Portallogin ############## */ if(ereg("{portallogin}",$box) || ereg("{portallogin}",$box2) || ereg("{portallogin}",$box3)) { $portal_avatar = $db->query_first("SELECT u.avatarid,avatarextension FROM bb".$n."_users u LEFT JOIN bb".$n."_avatars a USING (avatarid) WHERE u.userid = '".$wbbuserdata['userid']."'"); if ($portal_avatar['avatarid']) $portal_avatar = "avatar-".$portal_avatar['avatarid'].".".$portal_avatar['avatarextension']; else $portal_avatar = "portal_noavatar.gif"; $portal_daytime = intval(date("G")); if(4 < $portal_daytime && $portal_daytime <= 9) $user_greeting = "Guten Morgen"; else if(9 < $portal_daytime && $portal_daytime <= 17) $user_greeting = "Guten Tag"; else if(17 < $portal_daytime && $portal_daytime <= 21) $user_greeting = "Guten Abend"; else $user_greeting = "Gute Nacht"; $portal_lastvisit = formatdate($dateformat.", ",$wbbuserdata['lastvisit'],1); $portal_lastvisit .= " ".formatdate($timeformat,$wbbuserdata['lastvisit']); $counttotal=0; $countunread=0; $countnew=0; $result = $db->query("SELECT view, sendtime FROM bb".$n."_privatemessage WHERE deletepm <> 1 AND recipientid = '$wbbuserdata[userid]'"); while($row=$db->fetch_array($result)) { $counttotal++; if($row['view']==0) { $countunread++; if($row['sendtime']>$wbbuserdata['lastvisit']) $countnew++; } } if($countnew>0) eval ("\$new_notnew = \"".$tpl->get("index_newpm")."\";"); else eval ("\$new_notnew = \"".$tpl->get("index_nonewpm")."\";"); if(!$wbbuserdata['userid']) eval ("\$portallogin = \"".$tpl->get("portal_box_login")."\";"); else eval ("\$portallogin = \"".$tpl->get("portal_box_member")."\";"); $box = str_replace ("{portallogin}","$portallogin",$box); $box2 = str_replace ("{portallogin}","$portallogin",$box2); $box3 = str_replace ("{portallogin}","$portallogin",$box3); } /* ############## Portallogin ############## */ /* ############## Anfang Styleauswahl ############## */ if(ereg("{style}",$box) || ereg("{style}",$box2)) { if($_POST['style_send'] == "send") { if($wbbuserdata['userid']) { $db->query("UPDATE bb".$n."_users SET styleid='".$_POST['portal_styleset']."' WHERE userid='".$wbbuserdata['userid']."'"); header("Location: portal.php?styleid=".$_POST['portal_styleset']."&sid=$session[hash]"); } else header("Location: portal.php?styleid=".$_POST['portal_styleset']."&sid=$session[hash]"); exit(); } else { $style_result = $db->query("SELECT styleid, stylename FROM bb".$n."_styles ORDER BY default_style DESC,stylename ASC"); $u_style=""; while($row = $db->fetch_array($style_result)) { if($wbbuserdata['styleid']==$row['styleid']) $style_selected = " selected"; else $styleselected = ""; eval ("\$portal_style_option .= \"".$tpl->get("portal_box_style_option")."\";"); } eval ("\$portal_style = \"".$tpl->get("portal_box_style")."\";"); $box = str_replace("{style}","$portal_style",$box); $box2 = str_replace("{style}","$portal_style",$box2); } } /* ############## Ende Styleauswahl ############## */ /* ############## Anfang Avatar ############## */ if(ereg("{avatar}",$box) || ereg("{avatar}",$box2)) { $portal_avatar = $db->query_first("SELECT u.avatarid,avatarextension FROM bb".$n."_users u LEFT JOIN bb".$n."_avatars a USING (avatarid) WHERE u.userid = '".$wbbuserdata['userid']."'"); if ($portal_avatar['avatarid']) $portal_avatar = "avatar-".$portal_avatar['avatarid'].".".$portal_avatar['avatarextension']; else $portal_avatar = "portal_noavatar.gif"; eval ("\$portal_avatar = \"".$tpl->get("portal_box_avatar")."\";"); $box = str_replace("{avatar}","$portal_avatar",$box); $box2 = str_replace("{avatar}","$portal_avatar",$box2); } /* ############## Ende Avatar ############## */ /* ############## Anfang Private Nachrichten ############## */ if(ereg("{pmsportal}",$box) || ereg("{pmsportal}",$box2)) { if($wbbuserdata['userid']) { $counttotal=0; $countunread=0; $countnew=0; $result = $db->query("SELECT view, sendtime FROM bb".$n."_privatemessage WHERE deletepm <> 1 AND recipientid = '$wbbuserdata[userid]'"); while($row=$db->fetch_array($result)) { $counttotal++; if($row['view']==0) { $countunread++; if($row['sendtime']>$wbbuserdata['lastvisit']) $countnew++; } } if($countnew>0) eval ("\$new_notnew = \"".$tpl->get("index_newpm")."\";"); else eval ("\$new_notnew = \"".$tpl->get("index_nonewpm")."\";"); eval ("\$portal_pms = \"".$tpl->get("portal_box_pm")."\";"); } else eval ("\$portal_pms = \"".$tpl->get("portal_box_guest")."\";"); $box = str_replace("{pmsportal}","$portal_pms",$box); $box2 = str_replace("{pmsportal}","$portal_pms",$box2); } /* ############## Ende Private Nachrichten ############## */ /* ############## Anfang Forenbersicht ############## */ if(ereg("{boards}",$box) || ereg("{boards}",$box2) || ereg("{boards}",$box3)) { $result = $db->query(" SELECT b.* FROM bb".$n."_boards b ORDER by b.parentid ASC, b.boardorder ASC"); while ($row = $db->fetch_array($result)) $boardcache[$row['parentid']][$row['boardorder']][$row['boardid']] = $row; $result = $db->query("SELECT * FROM bb".$n."_permissions WHERE groupid = '$wbbuserdata[groupid]'"); while ($row = $db->fetch_array($result)) $permissioncache[$row['boardid']] = $row; function portal_makeboard($bid,$depth=1) { global $boardcache,$permissioncache,$max_depth,$session,$tpl; if(!isset($boardcache[$bid])) return; reset($boardcache[$bid]); $out = ""; while (list($key1,$val1) = each($boardcache[$bid])) { while(list($key2,$boards) = each($val1)) { if($boards['invisible']==2 || ($boards['invisible']==1 && !$permissioncache[$boards['boardid']]['boardpermission']) || ($max_depth && $depth > $max_depth)) continue; if($depth>1) { $sub_repeat=str_repeat("--",$depth-1); eval ("\$out .= \"".$tpl->get("portal_box_overview2")."\";"); } else { if($out) $out.="
"; eval ("\$out .= \"".$tpl->get("portal_box_overview1")."\";"); } $out.=portal_makeboard($boards['boardid'],$depth+1); } } unset($boardcache[$bid]); return $out; } $max_depth=$portal_board_depth; $boards_view = portal_makeboard(0); $box = str_replace("{boards}","$boards_view",$box); $box2 = str_replace("{boards}","$boards_view",$box2); $box3 = str_replace("{boards}","$boards_view",$box3); unset($boardcache); unset($permissioncache); } /* ############## Ende Forenbersicht ############## */ /* ############## Start Birthdays ############## */ if(ereg("{birthdays}",$box) || ereg("{birthdays}",$box2) || ereg("{birthdays}",$box3)) { $currentdate = formatdate("m-d", time()); $currentyear = intval(formatdate("Y", time())); $result = $db->query("SELECT userid, username, birthday FROM bb".$n."_users WHERE birthday LIKE '%-$currentdate' ORDER BY username ASC"); while($row = $db->fetch_array($result)) { $birthyear = intval(substr($row[birthday], 0, 4)); $age = $currentyear-$birthyear; if($age<1 || $age>200) $age=""; else $age=" ($age)"; if(isset($birthdaybit)) eval ("\$birthdaybit .= \", ".$tpl->get("portal_birthdaybit")."\";"); else eval ("\$birthdaybit = \"".$tpl->get("portal_birthdaybit")."\";"); } if(!$age) eval ("\$birthdaybit = \"".$tpl->get("portal_nobirthdaybit")."\";"); $db->free_result($result); if(isset($birthdaybit)) eval ("\$birthdays = \"".$tpl->get("portal_birthdays")."\";"); $box = str_replace("{birthdays}","$birthdays",$box); $box2 = str_replace("{birthdays}","$birthdays",$box2); $box3 = str_replace("{birthdays}","$birthdays",$box3); } /* ############## Ende Birthdays ############## */ /* ############## Start Wer war Online ############## */ if(ereg("{wwo}",$box) || ereg("{wwo}",$box2) || ereg("{wwo}",$box3)) { $actdate = strtotime (date ("Y-m-d")); $membercount = 0; $invisiblecount = 0; $useronlinebit = ""; $result = $db->query ("SELECT userid, username, groupid, invisible FROM bb".$n."_users WHERE lastactivity >= $actdate ORDER BY username ASC"); while ($row = $db->fetch_array ($result)) { $membercount++; if ($row['invisible'] == 1) $invisiblecount++; if($invisible==1 && !($wbbuserdata['canuseacp'] || $wbbuserdata['issupermod'] || $wbbuserdata['ismod'])) continue; if($useronlinebit!="") $useronlinebit .= ",
$row[username]"; else $useronlinebit = "$row[username]"; } if ($membercount != 1) $onlineuserTag = "waren"; else $onlineuserTag = "war"; if ($membercount != 1) $membersTag = "Mitglieder"; else $membersTag = "Mitglied"; if ($invisiblecount != 1) $invisTag = "Geister"; else $invisTag = "Geist"; if (!$wbbuserdata["userid"]) eval ("\$portal_useronline = \"".$tpl->get("portal_box_wwo")."\";"); else eval ("\$portal_useronline = \"".$tpl->get("portal_box_wwo2")."\";"); $db->free_result ($result); $box = str_replace("{wwo}","$portal_useronline",$box); $box2 = str_replace("{wwo}","$portal_useronline",$box2); $box3 = str_replace("{wwo}","$portal_useronline",$box3); } /* ############## Ende Wer war Online ############## */ /* ############## Letztes Bild by progressive ############## */ $galdata = $db->query("SELECT g.*, u.username FROM bb".$n."_galeriedata g LEFT JOIN bb".$n."_users u ON (g.userid = u.userid) ORDER BY uploadet DESC LIMIT 1"); $lastpic = $db->fetch_array($galdata); $pic_link = $lastpic[link]; $pic_id = $lastpic[id]; if($lastpic['thumblink']) { $image = "galerie/thumbs/tn_".$lastpic['thumblink']; } else { $image = "galerie/thumbs/tn_".$pic_link; } $pic_uploader = $lastpic[userid]; $pic_uploader_name = $lastpic[username]; $pic_uploadet = $lastpic[uploadet]; $uploadet = formatdate($dateformat,$pic_uploadet,1)." "; $uploadet .= formatdate($timeformat,$pic_uploadet); eval ("\$picbox = \"".$tpl->get("portal_galeriebox")."\";"); $box = str_replace("{picbox}","$picbox",$box); $box1 = str_replace("{picbox}","$picbox",$box1); $box2 = str_replace("{picbox}","$picbox",$box2); $box3 = str_replace("{picbox}","$picbox",$box3); /* ############## Ende letztes Bild ############## */ ?>x^ZKs8>0LM3e,˱K~ȱkXI&sI$$b׀e'?h/HIq.{E@ilo|G's^?ڷ֛)gR$a5 ݳ{0Q%{mm{Ru f2bGp7` gO_ 'QHf*vqf1Axa\Fەovd+0v \p\XzfW =5Yt?3d5@"%&!y\2~B@T9]E<Og '2,Zs/ 0Viͯ'+PpqTkOV[S T  -l?FBJ4#=po0pRJ@|h/Nv7V w i?W_eCsi8us")=ir $N=pИhMRePh./aJoIIJqm;a;/C_J?{垖WvRmwM4!oKXM,Sya:&xL6&rfL*p9GW̗ QK 4(Y{iPN{q,(uEfcK'4~f~`M/qAk4(oO£7L}ǝ؄6 _}n`'}m߳{ a';;6`Eyjb E܄]LLLmJkie%wf!t6;x nA[u7/>7F^8mMXCV+8Ff:n"8LtHĖB`OS Igb- 5\p4bڈ^(H h_J b!)*;~gY) ̛I 2\:u~,#ivB14E%쌟HDȲ],trt"5x(hWSőσGDdzIӳўE=L]]hU.zB+K^N=ge $~x""!@E7QGGؾR_R.W:10alYDGBMHo=xfR, 8+IɂM'ѳN</Wx@} qBD2F|XUX)2l)6 L`:)*> T)<-f 1E Z0clgi6iECtĔX:gӢN Tkƒ$ =cMt1ֶ̙[`goNAvptxw.FNߎã}ܱӝ]w;o/s&l #&M"Cϲa^@V󿜎׀i#.<5 DvF \(w> f.MB/Bi6K257F)Mdvqǰf';O_6 q..XmuS?OU?G<_NUϒjU۝WCTKI7$z3~{;C|yT ]^=90 ]\.`QP_[x(76|AE~L 6mb+@PQj/6.c!/YZy2X7q)BhL4 u]t *@M3UX,n;vs͞;`bkv?_GጦQv=Kwҷحٻ$wP\-搅̗$_Szvl*gÓ ǩ9gy!