} } if (isset($alreadythere)) { unset($res_title[$i]); unset($res_message[$i]); unset($res_link[$i]); unset($res_occurr[$i]); unset($res_date[$i]); unset($res_type[$i]); } else { $i++; } } } if (isset($_GET['news'])) { $ergebnis_news = safe_query("SELECT \r\n\t\t\t\t\t\t\t\t\t\t\t\tdate,\r\n\t\t\t\t\t\t\t\t\t\t\t\tposter,\r\n\t\t\t\t\t\t\t\t\t\t\t\tnewsID\r\n\t\t\t\t\t\t\t\t\t\t FROM\r\n\t\t\t\t\t\t\t\t\t\t \t\t" . PREFIX . "news\r\n\t\t\t\t\t\t\t\t\t\t WHERE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublished = '1'\r\n\t\t\t\t\t\t\t\t\t\t\t\tAND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tintern <= '" . isclanmember($userID) . "'\r\n\t\t\t\t\t\t\t\t\t\t\t\tAND\r\n\t\t\t\t\t\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tdate between " . $after . " AND " . $before . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t)"); while ($ds = mysql_fetch_array($ergebnis_news)) { $ergebnis_news_contents = safe_query("SELECT language, headline, content FROM " . PREFIX . "news_contents WHERE newsID = '" . $ds['newsID'] . "' and (content LIKE '%" . $text . "%' or headline LIKE '%" . $text . "%')"); if (mysql_num_rows($ergebnis_news_contents)) { $message_array = array(); while ($qs = mysql_fetch_array($ergebnis_news_contents)) { $message_array[] = array('lang' => $qs['language'], 'headline' => $qs['headline'], 'message' => $qs['content']); } $showlang = select_language($message_array); $newsID = $ds['newsID']; $res_title[$i] = $message_array[$showlang]['headline']; $res_message[$i] = clearfromtags($message_array[$showlang]['message']); $res_link[$i] = '<a href="index.php?site=news_comments&newsID=' . $newsID . '">' . $_language->module['news_link'] . '</a>'; $res_occurr[$i] = substri_count_array($message_array, stripslashes($text)); $res_date[$i] = $ds['date']; $res_type[$i] = $_language->module['news'];
function vote($poll) { global $userID, $_language; $pagebg = PAGEBG; $border = BORDER; $bghead = BGHEAD; $bgcat = BGCAT; if ($poll) { $lastpoll = safe_query("SELECT * FROM " . PREFIX . "poll WHERE aktiv='1' AND laufzeit>" . time() . " AND intern<=" . isclanmember($userID) . " and pollID='" . $poll . "' LIMIT 0,1"); } else { $num = mysql_num_rows(safe_query("SELECT * FROM " . PREFIX . "poll WHERE aktiv='1' AND laufzeit>" . time() . " AND intern<=" . isclanmember($userID) . "")); if ($num) { $start = rand(0, $num - 1); $lastpoll = safe_query("SELECT * FROM " . PREFIX . "poll WHERE aktiv='1' AND laufzeit>" . time() . " AND intern<=" . isclanmember($userID) . " ORDER BY pollID DESC LIMIT " . $start . "," . ($start + 1) . ""); } else { echo $_language->module['no_active_poll'] . '<br /><br />• <a href="index.php?site=polls">' . $_language->module['show_polls'] . '</a>'; return true; } } $anz = mysql_num_rows($lastpoll); $ds = mysql_fetch_array($lastpoll); if ($anz) { $anz = mysql_num_rows(safe_query("SELECT pollID FROM `" . PREFIX . "poll` WHERE pollID='" . $ds['pollID'] . "' AND hosts LIKE '%" . $_SERVER['REMOTE_ADDR'] . "%' AND intern<=" . isclanmember($userID) . "")); $anz_user = false; if ($userID) { $user_ids = explode(";", $ds['userIDs']); if (in_array($userID, $user_ids)) { $anz_user = true; } } $cookie = false; if (isset($_COOKIE['poll']) && is_array($_COOKIE['poll'])) { $cookie = in_array($ds['pollID'], $_COOKIE['poll']); } if ($cookie or $anz or $anz_user) { if ($ds['intern'] == 1) { $isintern = '(' . $_language->module['intern'] . ')'; } else { $isintern = ''; } $title = $ds['titel']; for ($n = 1; $n <= 10; $n++) { if ($ds['o' . $n]) { $options[] = clearfromtags($ds['o' . $n]); } } $votes = safe_query("SELECT * FROM " . PREFIX . "poll_votes WHERE pollID='" . $ds['pollID'] . "'"); $dv = mysql_fetch_array($votes); $gesamtstimmen = $dv['o1'] + $dv['o2'] + $dv['o3'] + $dv['o4'] + $dv['o5'] + $dv['o6'] + $dv['o7'] + $dv['o8'] + $dv['o9'] + $dv['o10']; eval("\$poll_voted_head = \"" . gettemplate("poll_voted_head") . "\";"); echo $poll_voted_head; $n = 1; $bg = BG_2; foreach ($options as $option) { $stimmen = $dv['o' . $n]; if ($gesamtstimmen) { $perc = $stimmen / $gesamtstimmen * 10000; settype($perc, "integer"); $perc = $perc / 100; } else { $perc = 0; } $picwidth = $perc; settype($picwidth, "integer"); eval("\$poll_voted_content = \"" . gettemplate("poll_voted_content") . "\";"); echo $poll_voted_content; $n++; } $anzcomments = getanzcomments($ds['pollID'], 'po'); $comments = '<a href="index.php?site=polls&pollID=' . $ds['pollID'] . '">[' . $anzcomments . '] ' . $_language->module['comments'] . '</a>'; eval("\$poll_voted_foot = \"" . gettemplate("poll_voted_foot") . "\";"); echo $poll_voted_foot; unset($options); } else { if ($ds['intern'] == 1) { $isintern = '(' . $_language->module['intern'] . ')'; } else { $isintern = ''; } $title = $ds['titel']; eval("\$poll_head = \"" . gettemplate("poll_head") . "\";"); echo $poll_head; for ($n = 1; $n <= 10; $n++) { if ($ds['o' . $n]) { $options[] = $ds['o' . $n]; } } $n = 1; foreach ($options as $option) { $option = $option; eval("\$poll_content = \"" . gettemplate("poll_content") . "\";"); echo $poll_content; $n++; } $pollID = $ds['pollID']; eval("\$poll_foot = \"" . gettemplate("poll_foot") . "\";"); echo $poll_foot; } } else { echo $_language->module['no_active_poll'] . '<br /><br />• <a href="index.php?site=polls">' . $_language->module['show_polls'] . '</a>'; } }
if ($userID != $id && $userID != 0) { safe_query("UPDATE " . PREFIX . "user SET visits=visits+1 WHERE userID='" . $id . "'"); if (mysql_num_rows(safe_query("SELECT visitID FROM " . PREFIX . "user_visitors WHERE userID='" . $id . "' AND visitor='" . $userID . "'"))) { safe_query("UPDATE " . PREFIX . "user_visitors SET date='" . $date . "' WHERE userID='" . $id . "' AND visitor='" . $userID . "'"); } else { safe_query("INSERT INTO " . PREFIX . "user_visitors (userID, visitor, date) values ('" . $id . "', '" . $userID . "', '" . $date . "')"); } } $anzvisits = $ds['visits']; if ($ds['userpic']) { $userpic = '<img src="images/userpics/' . $ds['userpic'] . '" alt="" />'; } else { $userpic = '<img src="images/userpics/nouserpic.gif" alt="" />'; } $nickname = $ds['nickname']; if (isclanmember($id)) { $member = ' <img src="images/icons/member.gif" alt="' . $_language->module['clanmember'] . '" />'; } else { $member = ''; } $registered = date("d.m.Y - H:i", $ds['registerdate']); $lastlogin = date("d.m.Y - H:i", $ds['lastlogin']); if ($ds['avatar']) { $avatar = '<img src="images/avatars/' . $ds['avatar'] . '" alt="" />'; } else { $avatar = '<img src="images/avatars/noavatar.gif" border="0" alt="" />'; } $status = isonline($ds['userID']); if ($ds['email_hide']) { $email = $_language->module['n_a']; } else {
function print_termine($tag, $month, $year) { global $wincolor; global $loosecolor; global $drawcolor; global $userID; global $_language; $_language->read_module('calendar'); $pagebg = PAGEBG; $border = BORDER; $bghead = BGHEAD; $bgcat = BGCAT; $start_date = mktime(0, 0, 0, $month, $tag, $year); $end_date = mktime(23, 59, 59, $month, $tag, $year); unset($termin); $ergebnis = safe_query("SELECT * FROM " . PREFIX . "upcoming"); $anz = mysql_num_rows($ergebnis); if ($anz) { while ($ds = mysql_fetch_array($ergebnis)) { if ($ds['type'] == "c") { if ($ds['date'] >= $start_date && $ds['date'] <= $end_date) { $date = date("d.m.Y", $ds['date']); $time = date("H:i", $ds['date']); $squad = getsquadname($ds['squad']); $oppcountry = "[flag]" . $ds['oppcountry'] . "[/flag]"; $oppcountry = flags($oppcountry); $opponent = $oppcountry . ' <a href="' . $ds['opphp'] . '" target="_blank">' . clearfromtags($ds['opptag']) . ' / ' . clearfromtags($ds['opponent']) . '</a>'; $maps = clearfromtags($ds['maps']); $server = clearfromtags($ds['server']); $league = '<a href="' . $ds['leaguehp'] . '" target="_blank">' . clearfromtags($ds['league']) . '</a>'; if (isclanmember($userID)) { $warinfo = cleartext($ds['warinfo']); } else { $warinfo = $_language->module['you_have_to_be_clanmember']; } $players = ""; $announce = ""; $adminaction = ''; if (isclanmember($userID) or isanyadmin($userID)) { $anmeldung = safe_query("SELECT * FROM " . PREFIX . "upcoming_announce WHERE upID='" . $ds['upID'] . "'"); if (mysql_num_rows($anmeldung)) { $i = 1; while ($da = mysql_fetch_array($anmeldung)) { if ($da['status'] == "y") { $fontcolor = $wincolor; } elseif ($da['status'] == "n") { $fontcolor = $loosecolor; } else { $fontcolor = $drawcolor; } if ($i > 1) { $players .= ', <a href="index.php?site=profile&id=' . $da['userID'] . '"><font color="' . $fontcolor . '">' . getnickname($da['userID']) . '</font></a>'; } else { $players .= '<a href="index.php?site=profile&id=' . $da['userID'] . '"><font color="' . $fontcolor . '">' . getnickname($da['userID']) . '</font></a>'; } $i++; } } else { $players = $_language->module['no_announced']; } if (issquadmember($userID, $ds['squad']) and $ds['date'] > time()) { $announce = '• <a href="index.php?site=calendar&action=announce&upID=' . $ds['upID'] . '">' . $_language->module['announce_here'] . '</a>'; } else { $announce = ""; } if (isclanwaradmin($userID)) { $adminaction = '<div align="right"> <input type="button" onclick="MM_openBrWindow(\'clanwars.php?action=new&upID=' . $ds['upID'] . '\',\'Clanwars\',\'toolbar=no,status=no,scrollbars=yes,width=800,height=490\')" value="' . $_language->module['add_clanwars'] . '" /> <input type="button" onclick="MM_goToURL(\'parent\',\'index.php?site=calendar&action=editwar&upID=' . $ds['upID'] . '\');return document.MM_returnValue" value="' . $_language->module['edit'] . '" /> <input type="button" onclick="MM_confirm(\'' . $_language->module['really_delete'] . '\', \'calendar.php?action=delete&upID=' . $ds['upID'] . '\')" value="' . $_language->module['delete'] . '" /></div>'; } else { $adminaction = ''; } } else { $players = $_language->module['access_member']; } $bg1 = BG_1; $bg2 = BG_2; $bg3 = BG_3; $bg4 = BG_4; eval("\$upcoming_war_details = \"" . gettemplate("upcoming_war_details") . "\";"); echo $upcoming_war_details; } } else { if ($start_date <= $ds['date'] && $end_date >= $ds['date'] || $start_date >= $ds['date'] && $end_date <= $ds['enddate'] || $start_date <= $ds['enddate'] && $end_date >= $ds['enddate']) { $date = date("d.m.Y", $ds['date']); $time = date("H:i", $ds['date']); $enddate = date("d.m.Y", $ds['enddate']); $endtime = date("H:i", $ds['enddate']); $title = clearfromtags($ds['title']); $location = '<a href="' . $ds['locationhp'] . '" target="_blank">' . clearfromtags($ds['location']) . '</a>'; $dateinfo = cleartext($ds['dateinfo']); $dateinfo = toggle($dateinfo, $ds['upID']); $country = "[flag]" . $ds['country'] . "[/flag]"; $country = flags($country); $players = ""; if (isclanmember($userID)) { $anmeldung = safe_query("SELECT * FROM " . PREFIX . "upcoming_announce WHERE upID='" . $ds['upID'] . "'"); if (mysql_num_rows($anmeldung)) { $i = 1; while ($da = mysql_fetch_array($anmeldung)) { if ($da['status'] == "y") { $fontcolor = $wincolor; } elseif ($da['status'] == "n") { $fontcolor = $loosecolor; } else { $fontcolor = $drawcolor; } if ($i > 1) { $players .= ', <a href="index.php?site=profile&id=' . $da['userID'] . '"><font color="' . $fontcolor . '">' . getnickname($da['userID']) . '</font></a>'; } else { $players .= '<a href="index.php?site=profile&id=' . $da['userID'] . '"><font color="' . $fontcolor . '">' . getnickname($da['userID']) . '</font></a>'; } $i++; } } else { $players = $_language->module['no_announced']; } if (isclanmember($userID) and $ds['date'] > time()) { $announce = '• <a href="index.php?site=calendar&action=announce&upID=' . $ds['upID'] . '">' . $_language->module['announce_here'] . '</a>'; } else { $announce = ''; } if (isclanwaradmin($userID)) { $adminaction = '<div align="right"><input type="button" onclick="MM_goToURL(\'parent\',\'index.php?site=calendar&action=editdate&upID=' . $ds['upID'] . '\');return document.MM_returnValue" value="' . $_language->module['edit'] . '" /><input type="button" onclick="MM_confirm(\'' . $_language->module['really_delete'] . '\', \'calendar.php?action=delete&upID=' . $ds['upID'] . '\')" value="' . $_language->module['delete'] . '" /></div>'; } else { $adminaction = ''; } } else { $players = $_language->module['access_member']; $announce = ''; $adminaction = ''; } $bg1 = BG_1; $bg2 = BG_2; $bg3 = BG_3; $bg4 = BG_4; eval("\$upcoming_date_details = \"" . gettemplate("upcoming_date_details") . "\";"); echo $upcoming_date_details; } } } } else { echo $_language->module['no_entries']; } }
function showtopic($topic, $edit, $addreply, $quoteID, $type) { global $userID; global $loggedin; global $page; global $maxposts; global $preview; global $message; global $picsize_l; global $_language; $_language->read_module('forum'); $_language->read_module('bbcode', true); $pagebg = PAGEBG; $border = BORDER; $bghead = BGHEAD; $bgcat = BGCAT; $thread = safe_query("SELECT * FROM " . PREFIX . "forum_topics WHERE topicID='{$topic}' "); $dt = mysql_fetch_array($thread); $usergrp = 0; $writer = 0; $ismod = ismoderator($userID, $dt['boardID']); if ($dt['writegrps'] != "" and !$ismod) { $writegrps = explode(";", $dt['writegrps']); foreach ($writegrps as $value) { if (isinusergrp($value, $userID)) { $usergrp = 1; $writer = 1; break; } } } else { $writer = 1; } if ($dt['readgrps'] != "" and !$usergrp and !$ismod) { $readgrps = explode(";", $dt['readgrps']); foreach ($readgrps as $value) { if (isinusergrp($value, $userID)) { $usergrp = 1; break; } } if (!$usergrp) { echo $_language->module['no_permission']; redirect('index.php?site=forum', $_language->module['no_permission'], 2); return; } } $gesamt = mysql_num_rows(safe_query("SELECT topicID FROM " . PREFIX . "forum_posts WHERE topicID='{$topic}'")); if ($gesamt == 0) { die($_language->module['topic_not_found'] . " <a href=\"javascript:history.back()\">back</a>"); } $pages = 1; if (!isset($page) || ($site = '')) { $page = 1; } if (isset($type)) { if (!($type == 'ASC' || $type == 'DESC')) { $type = "ASC"; } } else { $type = "ASC"; } $max = $maxposts; $pages = ceil($gesamt / $maxposts); $page_link = ''; if ($pages > 1) { $page_link = makepagelink("index.php?site=forum_topic&topic={$topic}&type={$type}", $page, $pages); } if ($type == "ASC") { $sorter = '<a href="index.php?site=forum_topic&topic=' . $topic . '&page=' . $page . '&type=DESC">' . $_language->module['sort'] . ':</a> <img src="images/icons/asc.gif" alt="" />'; } else { $sorter = '<a href="index.php?site=forum_topic&topic=' . $topic . '&page=' . $page . '&type=ASC">' . $_language->module['sort'] . ':</a> <img src="images/icons/desc.gif" alt="" />'; } $start = 0; if ($page > 1) { $start = $page * $max - $max; } safe_query("UPDATE " . PREFIX . "forum_topics SET views=views+1 WHERE topicID='{$topic}' "); // viewed topics if (mysql_num_rows(safe_query("SELECT userID FROM " . PREFIX . "user WHERE topics LIKE '%|" . $topic . "|%'"))) { $gv = mysql_fetch_array(safe_query("SELECT topics FROM " . PREFIX . "user WHERE userID='{$userID}'")); $array = explode("|", $gv['topics']); $new = '|'; foreach ($array as $split) { if ($split != "" and $split != $topic) { $new = $new . $split . '|'; } } safe_query("UPDATE " . PREFIX . "user SET topics='" . $new . "' WHERE userID='{$userID}'"); } // end viewed topics $topicname = getinput($dt['topic']); $ergebnis = safe_query("SELECT * FROM " . PREFIX . "forum_boards WHERE boardID='" . $dt['boardID'] . "' "); $db = mysql_fetch_array($ergebnis); $boardname = $db['name']; $moderators = getmoderators($dt['boardID']); $topicactions = '<a href="printview.php?board=' . $dt['boardID'] . '&topic=' . $topic . '" target="_blank"><img src="images/icons/printview.gif" border="0" alt="printview" /></a> '; if ($loggedin and $writer) { $topicactions .= '<a href="index.php?site=forum&addtopic=true&action=newtopic&board=' . $dt['boardID'] . '">' . $_language->module['newtopic_image'] . '</a> <a href="index.php?site=forum_topic&topic=' . $topic . '&addreply=true&page=' . $pages . '&type=' . $type . '">' . $_language->module['newreply_image'] . '</a>'; } if ($dt['closed']) { $closed = $_language->module['closed_image']; } else { $closed = ''; } $posttype = 'topic'; $kathname = getcategoryname($db['category']); eval("\$forum_topics_title = \"" . gettemplate("forum_topics_title") . "\";"); echo $forum_topics_title; eval("\$forum_topics_actions = \"" . gettemplate("forum_topics_actions") . "\";"); echo $forum_topics_actions; if ($dt['closed']) { echo '<br /><br />' . $_language->module['closed_image'] . '<br /><br />'; } if ($edit && !$dt['closed']) { $id = $_GET['id']; $dr = mysql_fetch_array(safe_query("SELECT * FROM " . PREFIX . "forum_posts WHERE postID='" . $id . "'")); $topic = $_GET['topic']; $bg1 = BG_1; $_sticky = $dt['sticky'] == '1' ? 'checked="checked"' : ''; $anz = mysql_num_rows(safe_query("SELECT * FROM " . PREFIX . "forum_posts WHERE topicID='" . $dt['topicID'] . "' AND postID='" . $id . "' AND poster='" . $userID . "' ORDER BY date ASC LIMIT 0,1")); if ($anz or isforumadmin($userID) or ismoderator($userID, $dt['boardID'])) { if (istopicpost($dt['topicID'], $id)) { $bg1 = BG_1; // topicmessage $message = getinput($dr['message']); $post = $id; $board = $dt['boardID']; // notification check $notifyqry = safe_query("SELECT * FROM " . PREFIX . "forum_notify WHERE topicID='" . $topic . "' AND userID='" . $userID . "'"); if (mysql_num_rows($notifyqry)) { $notify = '<input class="input" type="checkbox" name="notify" value="1" checked="checked" /> ' . $_language->module['notify_reply'] . '<br />'; } else { $notify = '<input class="input" type="checkbox" name="notify" value="1" /> ' . $_language->module['notify_reply'] . '<br />'; } //STICKY if (isforumadmin($userID) || ismoderator($userID, $board)) { $chk_sticky = '<br />' . "\n" . ' <input class="input" type="checkbox" name="sticky" value="1" ' . $_sticky . ' /> ' . $_language->module['make_sticky']; } else { $chk_sticky = ''; } // topic icon list $iconlist = '<tr bgcolor="' . $bg1 . '"> <td><input type="radio" class="input" name="icon" value="ausrufezeichen.gif" /> <img src="images/icons/topicicons/ausrufezeichen.gif" width="15" height="15" alt="" /></td> <td><input type="radio" class="input" name="icon" value="biggrin.gif" /> <img src="images/icons/topicicons/biggrin.gif" width="15" height="15" alt="" /></td> <td><input type="radio" class="input" name="icon" value="boese.gif" /> <img src="images/icons/topicicons/boese.gif" width="15" height="15" alt="" /></td> <td><input type="radio" class="input" name="icon" value="bored.gif" /> <img src="images/icons/topicicons/bored.gif" width="15" height="15" alt="" /></td> <td><input type="radio" class="input" name="icon" value="cool.gif" /> <img src="images/icons/topicicons/cool.gif" width="15" height="15" alt="" /></td> <td><input type="radio" class="input" name="icon" value="eek.gif" /> <img src="images/icons/topicicons/eek.gif" width="15" height="15" alt="" /></td> <td><input type="radio" class="input" name="icon" value="frage.gif" /> <img src="images/icons/topicicons/frage.gif" width="15" height="15" alt="" /></td> <td><input type="radio" class="input" name="icon" value="frown.gif" /> <img src="images/icons/topicicons/frown.gif" width="15" height="15" alt="" /></td> </tr> <tr bgcolor="' . $bg1 . '"> <td><input type="radio" class="input" name="icon" value="lampe.gif" /> <img src="images/icons/topicicons/lampe.gif" width="15" height="15" alt="" /></td> <td><input type="radio" class="input" name="icon" value="mad.gif" /> <img src="images/icons/topicicons/mad.gif" width="15" height="15" alt="" /></td> <td><input type="radio" class="input" name="icon" value="pfeil.gif" /> <img src="images/icons/topicicons/pfeil.gif" width="15" height="15" alt="" /></td> <td><input type="radio" class="input" name="icon" value="smile.gif" /> <img src="images/icons/topicicons/smile.gif" width="15" height="15" alt="" /></td> <td><input type="radio" class="input" name="icon" value="text.gif" /> <img src="images/icons/topicicons/text.gif" width="15" height="15" alt="" /></td> <td><input type="radio" class="input" name="icon" value="thumb_down.gif" /> <img src="images/icons/topicicons/thumb_down.gif" width="15" height="15" alt="" /></td> <td><input type="radio" class="input" name="icon" value="thumb_up.gif" /> <img src="images/icons/topicicons/thumb_up.gif" width="15" height="15" alt="" /></td> <td><input type="radio" class="input" name="icon" value="wink.gif" /> <img src="images/icons/topicicons/wink.gif" width="15" height="15" alt="" /></td> </tr> <tr bgcolor="' . $bg1 . '"> <td colspan="4"><input type="radio" class="input" name="icon" value="0" /> ' . $_language->module['no_icon'] . '</td> </tr>'; if ($dt['icon']) { $iconlist = str_replace('value="' . $dt['icon'] . '"', 'value="' . $dt['icon'] . '" checked="checked"', $iconlist); } else { $iconlist = str_replace('value="0"', 'value="0" checked="checked"', $iconlist); } eval("\$addbbcode = \"" . gettemplate("addbbcode") . "\";"); eval("\$forum_edittopic = \"" . gettemplate("forum_edittopic") . "\";"); echo $forum_edittopic; } else { // notification check $notifyqry = safe_query("SELECT * FROM " . PREFIX . "forum_notify WHERE topicID='" . $topic . "' AND userID='" . $userID . "'"); if (mysql_num_rows($notifyqry)) { $notify = '<input class="input" type="checkbox" name="notify" value="1" checked="checked" /> ' . $_language->module['notify_reply']; } else { $notify = '<input class="input" type="checkbox" name="notify" value="1" /> ' . $_language->module['notify_reply']; } //STICKY if (isforumadmin($userID) || ismoderator($userID, $board)) { $chk_sticky = '<br />' . "\n" . ' <input class="input" type="checkbox" name="sticky" value="1" ' . $_sticky . ' /> ' . $_language->module['make_sticky']; } else { $chk_sticky = ''; } $dr['message'] = getinput($dr['message']); eval("\$addbbcode = \"" . gettemplate("addbbcode") . "\";"); eval("\$forum_editpost = \"" . gettemplate("forum_editpost") . "\";"); echo $forum_editpost; } } else { echo $_language->module['permission_denied'] . '<br /><br />'; } $replys = safe_query("SELECT * FROM " . PREFIX . "forum_posts WHERE topicID='{$topic}' ORDER BY date DESC LIMIT {$start}, {$max}"); } elseif ($addreply && !$dt['closed']) { if ($loggedin and $writer) { if (isset($_POST['preview'])) { $bg1 = BG_1; $bg2 = BG_2; $time = date("H:i", time()); $date = $_language->module['today']; $message_preview = getforminput($_POST['message']); $postID = 0; $message = cleartext(getforminput($_POST['message'])); $message = toggle($message, 'xx'); $username = '******' . $userID . '"><b>' . getnickname($userID) . '</b></a>'; if (isclanmember($userID)) { $member = ' <img src="images/icons/member.gif" alt="' . $_language->module['clanmember'] . '" />'; } else { $member = ''; } if ($getavatar = getavatar($userID)) { $avatar = '<img src="images/avatars/' . $getavatar . '" alt="" />'; } else { $avatar = ''; } if ($getsignatur = getsignatur($userID)) { $signatur = cleartext($getsignatur); } else { $signatur = ''; } if ($getemail = getemail($userID) and !getemailhide($userID)) { $email = '<a href="mailto:' . mail_protect($getemail) . '"><img src="images/icons/email.gif" border="0" alt="email" /></a>'; } else { $email = ''; } if (isset($_POST['notify'])) { $notify = 'checked="checked"'; } else { $notify = ''; } $pm = ''; $buddy = ''; $statuspic = '<img src="images/icons/online.gif" alt="online" />'; if (!validate_url(gethomepage($userID))) { $hp = ''; } else { $hp = '<a href="' . gethomepage($userID) . '" target="_blank"><img src="images/icons/hp.gif" border="0" alt="' . $_language->module['homepage'] . '" /></a>'; } $registered = getregistered($userID); $posts = getuserforumposts($userID); if (isset($_POST['sticky'])) { $post_sticky = $_POST['sticky']; } else { $post_sticky = null; } $_sticky = $dt['sticky'] == '1' || $post_sticky == '1' ? 'checked="checked"' : ''; if (isforumadmin($userID)) { $usertype = $_language->module['admin']; $rang = '<img src="images/icons/ranks/admin.gif" alt="" />'; } elseif (isanymoderator($userID)) { $usertype = $_language->module['moderator']; $rang = '<img src="images/icons/ranks/moderator.gif" alt="" />'; } else { $ergebnis = safe_query("SELECT * FROM " . PREFIX . "forum_ranks WHERE {$posts} >= postmin AND {$posts} <= postmax AND postmax >0"); $ds = mysql_fetch_array($ergebnis); $usertype = $ds['rank']; $rang = '<img src="images/icons/ranks/' . $ds['pic'] . '" alt="" />'; } if (isforumadmin($userID)) { $chk_sticky = '<br />' . "\n" . ' <input class="input" type="checkbox" name="sticky" value="1" ' . $_sticky . ' /> ' . $_language->module['make_sticky']; } elseif (isanymoderator($userID)) { $chk_sticky = '<br />' . "\n" . ' <input class="input" type="checkbox" name="sticky" value="1" ' . $_sticky . ' /> ' . $_language->module['make_sticky']; } else { $chk_sticky = ''; } $quote = ""; $actions = ""; echo '<table width="100%" cellspacing="1" cellpadding="2" bgcolor="' . BORDER . '"> <tr bgcolor="' . BGHEAD . '"> <td colspan="2" class="title" align="center">' . $_language->module['preview'] . '</td> </tr> <tr bgcolor="' . PAGEBG . '"><td colspan="2"></td></tr>'; eval("\$forum_topic_content = \"" . gettemplate("forum_topic_content") . "\";"); echo $forum_topic_content; echo '</table>'; $message = $message_preview; } else { if ($quoteID) { $ergebnis = safe_query("SELECT poster,message FROM " . PREFIX . "forum_posts WHERE postID='{$quoteID}'"); $ds = mysql_fetch_array($ergebnis); $message = '[quote=' . getnickname($ds['poster']) . ']' . getinput($ds['message']) . '[/quote]'; } } if (isset($_POST['sticky'])) { $post_sticky = $_POST['sticky']; } else { $post_sticky = null; } $_sticky = $dt['sticky'] == '1' || $post_sticky == '1' ? 'checked="checked"' : ''; if (isforumadmin($userID) || ismoderator($userID, $dt['boardID'])) { $chk_sticky = '<br />' . "\n" . ' <input class="input" type="checkbox" name="sticky" value="1" ' . $_sticky . ' /> ' . $_language->module['make_sticky']; } else { $chk_sticky = ''; } if (isset($_POST['notify'])) { $post_notify = $_POST['notify']; } else { $post_notify = null; } $mysql_notify = mysql_num_rows(safe_query("SELECT notifyID FROM " . PREFIX . "forum_notify WHERE userID='" . $userID . "' AND topicID='" . $topic . "'")); $notify = $mysql_notify || $post_notify == '1' ? 'checked="checked"' : ''; $bg1 = BG_1; $board = $dt['boardID']; eval("\$addbbcode = \"" . gettemplate("addbbcode") . "\";"); eval("\$forum_newreply = \"" . gettemplate("forum_newreply") . "\";"); echo $forum_newreply; } elseif ($loggedin) { echo '<br /><br />' . $_language->module['no_access_write'] . '<br /><br />'; } else { echo $_language->module['not_logged_msg']; } $replys = safe_query("SELECT * FROM " . PREFIX . "forum_posts WHERE topicID='{$topic}' ORDER BY date DESC LIMIT 0, " . $max . ""); } else { $replys = safe_query("SELECT * FROM " . PREFIX . "forum_posts WHERE topicID='{$topic}' ORDER BY date {$type} LIMIT " . $start . ", " . $max . ""); } eval("\$forum_topic_head = \"" . gettemplate("forum_topic_head") . "\";"); echo $forum_topic_head; $i = 1; while ($dr = mysql_fetch_array($replys)) { if ($i % 2) { $bg1 = BG_1; $bg2 = BG_2; } else { $bg1 = BG_3; $bg2 = BG_4; } $date = date("d.m.Y", $dr['date']); $time = date("H:i", $dr['date']); $today = date("d.m.Y", time()); $yesterday = date("d.m.Y", time() - 3600 * 24); if ($date == $today) { $date = $_language->module['today']; } elseif ($date == $yesterday && $date < $today) { $date = $_language->module['yesterday']; } else { $date = $date; } $message = cleartext($dr['message']); $message = toggle($message, $dr['postID']); $postID = $dr['postID']; $username = '******' . $dr['poster'] . '"><b>' . stripslashes(getnickname($dr['poster'])) . '</b></a>'; if (isclanmember($dr['poster'])) { $member = ' <img src="images/icons/member.gif" alt="' . $_language->module['clanmember'] . '" />'; } else { $member = ''; } if ($getavatar = getavatar($dr['poster'])) { $avatar = '<img src="images/avatars/' . $getavatar . '" alt="" />'; } else { $avatar = ''; } if ($getsignatur = getsignatur($dr['poster'])) { $signatur = cleartext($getsignatur); } else { $signatur = ''; } if ($getemail = getemail($dr['poster']) and !getemailhide($dr['poster'])) { $email = '<a href="mailto:' . mail_protect($getemail) . '"><img src="images/icons/email.gif" border="0" alt="email" /></a>'; } else { $email = ''; } $pm = ''; $buddy = ''; if ($loggedin && $dr['poster'] != $userID) { $pm = '<a href="index.php?site=messenger&action=touser&touser='******'poster'] . '"><img src="images/icons/pm.gif" border="0" width="12" height="13" alt="' . $_language->module['messenger'] . '" /></a>'; if (isignored($userID, $dr['poster'])) { $buddy = '<a href="buddys.php?action=readd&id=' . $dr['poster'] . '&userID=' . $userID . '"><img src="images/icons/buddy_readd.gif" border="0" alt="' . $_language->module['back_buddy'] . '" /></a>'; } elseif (isbuddy($userID, $dr['poster'])) { $buddy = '<a href="buddys.php?action=ignore&id=' . $dr['poster'] . '&userID=' . $userID . '"><img src="images/icons/buddy_ignore.gif" border="0" alt="' . $_language->module['ignore'] . '" /></a>'; } else { $buddy = '<a href="buddys.php?action=add&id=' . $dr['poster'] . '&userID=' . $userID . '"><img src="images/icons/buddy_add.gif" border="0" alt="' . $_language->module['add_buddy'] . '" /></a>'; } } if (isonline($dr['poster']) == "offline") { $statuspic = '<img src="images/icons/offline.gif" alt="offline" />'; } else { $statuspic = '<img src="images/icons/online.gif" alt="online" />'; } if (!validate_url(gethomepage($dr['poster']))) { $hp = ''; } else { $hp = '<a href="' . gethomepage($dr['poster']) . '" target="_blank"><img src="images/icons/hp.gif" border="0" alt="' . $_language->module['homepage'] . '" /></a>'; } if (!$dt['closed']) { $quote = '<a href="index.php?site=forum_topic&addreply=true&board=' . $dt['boardID'] . '&topic=' . $topic . '&quoteID=' . $dr['postID'] . '&page=' . $page . '&type=' . $type . '"><img src="images/icons/quote.gif" border="0" alt="' . $_language->module['quote'] . '" /></a>'; } else { $quote = ""; } $registered = getregistered($dr['poster']); $posts = getuserforumposts($dr['poster']); if (isforumadmin($dr['poster'])) { $usertype = $_language->module['admin']; $rang = '<img src="images/icons/ranks/admin.gif" alt="" />'; } elseif (isanymoderator($dr['poster'])) { $usertype = $_language->module['moderator']; $rang = '<img src="images/icons/ranks/moderator.gif" alt="" />'; } else { $ergebnis = safe_query("SELECT * FROM " . PREFIX . "forum_ranks WHERE {$posts} >= postmin AND {$posts} <= postmax AND postmax >0"); $ds = mysql_fetch_array($ergebnis); $usertype = $ds['rank']; $rang = '<img src="images/icons/ranks/' . $ds['pic'] . '" alt="" />'; } $actions = ''; if (($userID == $dr['poster'] or isforumadmin($userID) or ismoderator($userID, $dt['boardID'])) && !$dt['closed']) { $actions = ' <a href="index.php?site=forum_topic&topic=' . $topic . '&edit=true&id=' . $dr['postID'] . '&page=' . $page . '"><img src="images/icons/edit.gif" border="0" alt="' . $_language->module['edit'] . '" /></a> '; } if (isforumadmin($userID) or ismoderator($userID, $dt['boardID'])) { $actions .= '<input class="input" type="checkbox" name="postID[]" value="' . $dr['postID'] . '" />'; } eval("\$forum_topic_content = \"" . gettemplate("forum_topic_content") . "\";"); echo $forum_topic_content; unset($actions); $i++; } $adminactions = ""; if (isforumadmin($userID) or ismoderator($userID, $dt['boardID'])) { if ($dt['closed']) { $close = '<option value="opentopic">- ' . $_language->module['reopen_topic'] . '</option>'; } else { $close = '<option value="closetopic">- ' . $_language->module['close_topic'] . '</option>'; } $adminactions = '<input class="input" type="checkbox" name="ALL" value="ALL" onclick="SelectAll(this.form);" /> ' . $_language->module['select_all'] . ' <select name="admaction"> <option value="0">' . $_language->module['admin_actions'] . ':</option> <option value="delposts">- ' . $_language->module['delete_posts'] . '</option> <option value="stickytopic">- ' . $_language->module['make_topic_sticky'] . '</option> <option value="unstickytopic">- ' . $_language->module['make_topic_unsticky'] . '</option> <option value="movetopic">- ' . $_language->module['move_topic'] . '</option> ' . $close . ' <option value="deletetopic">- ' . $_language->module['delete_topic'] . '</option> </select> <input type="hidden" name="topicID" value="' . $topic . '" /> <input type="hidden" name="board" value="' . $dt['boardID'] . '" /> <input type="submit" name="submit" value="' . $_language->module['go'] . '" />'; } eval("\$forum_topic_foot = \"" . gettemplate("forum_topic_foot") . "\";"); echo $forum_topic_foot; eval("\$forum_topics_actions = \"" . gettemplate("forum_topics_actions") . "\";"); echo $forum_topics_actions; echo '<div align="right">' . $adminactions . '</div></form>'; if ($dt['closed']) { echo $_language->module['closed_image']; } else { if (!$loggedin && !$edit) { echo $_language->module['not_logged_msg']; } } }
$ergebnis = safe_query("SELECT * FROM " . PREFIX . "buddys WHERE userID='{$userID}' AND banned='1'"); $anz = mysql_num_rows($ergebnis); if ($anz) { $n = 1; while ($ds = mysql_fetch_array($ergebnis)) { if ($n % 2) { $bg1 = BG_1; $bg2 = BG_2; } else { $bg1 = BG_3; $bg2 = BG_4; } $flag = '[flag]' . getcountry($ds['buddy']) . '[/flag]'; $country = flags($flag); $nickname = getnickname($ds['buddy']); if (isclanmember($ds['buddy'])) { $member = ' <img src="images/icons/member.gif" width="6" height="11" alt="Clanmember" />'; } else { $member = ''; } if (isonline($ds['buddy']) == "offline") { $statuspic = '<img src="images/icons/offline.gif" width="7" height="7" alt="offline" />'; } else { $statuspic = '<img src="images/icons/online.gif" width="7" height="7" alt="online" />'; } eval("\$ignore_content = \"" . gettemplate("ignore_content") . "\";"); echo $ignore_content; $n++; } } else { echo '<tr><td colspan="4" bgcolor="' . BG_1 . '">' . $_language->module['ignore_nousers'] . '</td></tr>';
# Far Development by Development Team - webspell.org # # # # visit webspell.org # # # ########################################################################## */ $_language->read_module('login'); if ($loggedin) { $username = '******' . $userID . '">' . strip_tags(getnickname($userID)) . '</a>'; $myprofile = '<a href="user/' . $userID . '">My profile</a>'; if (isanyadmin($userID)) { $admin = '<a href="admin/admincenter.php" target="_blank">Admin</a>'; } else { $admin = ''; } if (isclanmember($userID) or iscashadmin($userID)) { $cashbox = '• <a href="index.php?site=cash_box">' . $_language->module['cash-box'] . '</a>'; } else { $cashbox = ''; } $anz = getnewmessages($userID); if ($anz) { $newmessages = ' (<b>' . $anz . '</b>)'; } else { $newmessages = '0'; } if ($getavatar = getavatar($userID)) { $l_avatar = '<img src="images/avatars/' . $getavatar . '" alt="Avatar" />'; } else { $l_avatar = $_language->module['n_a']; }
function hidereplace($content) { global $userID; if (isclanmember($userID)) { $content = str_replace('[hide]', '<br />', $content); $content = str_replace('[/hide]', '<br />', $content); } else { $content = preg_replace("#\\[hide\\](.*?)\\[\\/hide\\]#si", "", $content); } return $content; }
# Copyright 2005-2011 by webspell.org # # # # visit webSPELL.org, webspell.info to get webSPELL for free # # - Script runs under the GNU GENERAL PUBLIC LICENSE # # - It's NOT allowed to remove this copyright-tag # # -- http://www.fsf.org/licensing/licenses/gpl.html # # # # Code based on WebSPELL Clanpackage (Michael Gruber - webspell.at), # # Far Development by Development Team - webspell.org # # # # visit webspell.org # # # ########################################################################## */ $_language->read_module('news'); $ergebnis = safe_query("SELECT newsID FROM " . PREFIX . "news WHERE newsID='" . $topnewsID . "' AND intern<=" . isclanmember($userID) . " AND published='1' LIMIT 0,1"); $anz = mysql_num_rows($ergebnis); if ($anz) { $dn = mysql_fetch_array($ergebnis); $message_array = array(); $query = safe_query("SELECT * FROM " . PREFIX . "news_contents WHERE newsID='" . $dn['newsID'] . "'"); while ($qs = mysql_fetch_array($query)) { $message_array[] = array('lang' => $qs['language'], 'headline' => $qs['headline'], 'message' => $qs['content']); } $showlang = select_language($message_array); $headline = clearfromtags($message_array[$showlang]['headline']); $content = $message_array[$showlang]['message']; if (mb_strlen($content) > $maxtopnewschars) { $content = mb_substr($content, 0, $maxtopnewschars); $content .= '...'; }
function showboard($board) { global $userID; global $loggedin; global $maxtopics; global $maxposts; global $page; global $action; global $_language; $_language->read_module('forum'); $pagebg = PAGEBG; $border = BORDER; $bghead = BGHEAD; $bgcat = BGCAT; eval("\$title_messageboard = \"" . gettemplate("title_messageboard") . "\";"); echo $title_messageboard; $alle = safe_query("SELECT topicID FROM " . PREFIX . "forum_topics WHERE boardID='{$board}'"); $gesamt = mysql_num_rows($alle); if ($action == "markall" and $userID) { $gv = mysql_fetch_array(safe_query("SELECT topics FROM " . PREFIX . "user WHERE userID='{$userID}'")); $board_topics = array(); while ($ds = mysql_fetch_array($alle)) { $board_topics[] = $ds['topicID']; } $array = explode("|", $gv['topics']); $new = '|'; foreach ($array as $split) { if ($split != "" and !in_array($split, $board_topics)) { $new .= $split . '|'; } } safe_query("UPDATE " . PREFIX . "user SET topics='" . $new . "' WHERE userID='{$userID}'"); } if (!isset($page) || $page == '') { $page = 1; } $max = $maxtopics; $pages = ceil($gesamt / $max); $page_link = ''; if ($pages > 1) { $page_link = makepagelink("index.php?site=forum&board={$board}", $page, $pages); } if ($page == 1) { $start = 0; } if ($page > 1) { $start = $page * $max - $max; } $db = mysql_fetch_array(safe_query("SELECT * FROM " . PREFIX . "forum_boards WHERE boardID='" . $board . "' ")); $boardname = $db['name']; $usergrp = 0; $writer = 0; $ismod = false; if (ismoderator($userID, $board) or isforumadmin($userID)) { $ismod = true; } if ($db['writegrps'] != "" and !$ismod) { $writegrps = explode(";", $db['writegrps']); foreach ($writegrps as $value) { if (isinusergrp($value, $userID)) { $usergrp = 1; $writer = 1; break; } } } else { $writer = 1; } if ($db['readgrps'] != "" and !$usergrp and !$ismod) { $readgrps = explode(";", $db['readgrps']); foreach ($readgrps as $value) { if (isinusergrp($value, $userID)) { $usergrp = 1; break; } } if (!$usergrp) { echo $_language->module['no_permission']; redirect('index.php?site=forum', '', 2); return; } } $moderators = getmoderators($board); if ($moderators) { $moderators = '(' . $_language->module['moderated_by'] . ': ' . $moderators . ')'; } $actions = '<a href="index.php?site=search">' . $_language->module['search_image'] . '</a>'; if ($loggedin) { $mark = '• <a href="index.php?site=forum&board=' . $board . '&action=markall">' . $_language->module['mark_topics_read'] . '</a>'; if ($writer) { $actions .= ' <a href="index.php?site=forum&addtopic=true&board=' . $board . '">' . $_language->module['newtopic_image'] . '</a>'; } } else { $mark = ''; } $cat = $db['category']; $kathname = getcategoryname($cat); eval("\$forum_head = \"" . gettemplate("forum_head") . "\";"); echo $forum_head; // TOPICS $topics = safe_query("SELECT * FROM " . PREFIX . "forum_topics WHERE boardID='{$board}' ORDER BY sticky DESC, lastdate DESC LIMIT {$start},{$max}"); $anztopics = mysql_num_rows(safe_query("SELECT boardID FROM " . PREFIX . "forum_topics WHERE boardID='{$board}'")); $i = 1; unset($link); if ($anztopics) { eval("\$forum_topics_head = \"" . gettemplate("forum_topics_head") . "\";"); echo $forum_topics_head; while ($dt = mysql_fetch_array($topics)) { if ($i % 2) { $bg1 = BG_1; $bg2 = BG_2; } else { $bg1 = BG_3; $bg2 = BG_4; } if ($dt['moveID']) { $gesamt = 0; } else { $gesamt = $dt['replys'] + 1; } $topicpages = 1; $topicpages = ceil($gesamt / $maxposts); $topicpage_link = ''; if ($topicpages > 1) { $topicpage_link = makepagelink("index.php?site=forum_topic&topic=" . $dt['topicID'], 1, $topicpages); } if ($dt['icon']) { $icon = '<img src="images/icons/topicicons/' . $dt['icon'] . '" alt="" />'; } else { $icon = ''; } // viewed topics if ($dt['sticky']) { $onicon = '<img src="images/icons/foldericons/newsticky.gif" alt="' . $_language->module['sticky'] . '" />'; $officon = '<img src="images/icons/foldericons/sticky.gif" alt="' . $_language->module['sticky'] . '" />'; $onhoticon = '<img src="images/icons/foldericons/newsticky.gif" alt="' . $_language->module['sticky'] . '" />'; $offhoticon = '<img src="images/icons/foldericons/sticky.gif" alt="' . $_language->module['sticky'] . '" />'; } else { $onicon = '<img src="images/icons/foldericons/newfolder.gif" alt="' . $_language->module['new_posts'] . '" />'; $officon = '<img src="images/icons/foldericons/folder.gif" alt="no ' . $_language->module['new_posts'] . '" />'; $onhoticon = '<img src="images/icons/foldericons/newhotfolder.gif" alt="' . $_language->module['new_posts'] . ' [' . $_language->module['popular'] . ']" />'; $offhoticon = '<img src="images/icons/foldericons/hotfolder.gif" alt="no ' . $_language->module['new_posts'] . ' [' . $_language->module['popular'] . ']" />'; } if ($dt['closed']) { $folder = '<img src="images/icons/foldericons/lockfolder.gif" alt="' . $_language->module['closed'] . '" />'; } elseif ($dt['moveID']) { $folder = '<img src="images/icons/topicicons/pfeil.gif" alt="' . $_language->module['moved'] . '" />'; } elseif ($userID) { $is_unread = mysql_num_rows(safe_query("SELECT userID FROM " . PREFIX . "user WHERE topics LIKE '%|" . $dt['topicID'] . "|%' AND userID='" . $userID . "'")); if ($is_unread) { if ($dt['replys'] > 15 || $dt['views'] > 150) { $folder = $onhoticon; } else { $folder = $onicon; } } else { if ($dt['replys'] > 15 || $dt['views'] > 150) { $folder = $offhoticon; } else { $folder = $officon; } } } else { if ($gesamt > 15) { $folder = $offhoticon; } else { $folder = $officon; } } // end viewed topics $topictitle = getinput($dt['topic']); $topictitle = str_break($topictitle, 40); $poster = '<a href="index.php?site=profile&id=' . $dt['userID'] . '">' . getnickname($dt['userID']) . '</a>'; if (isset($posterID) and isclanmember($posterID)) { $member1 = ' <img src="images/icons/member.gif" alt="' . $_language->module['clanmember'] . '" />'; } else { $member1 = ''; } $replys = '0'; $views = '0'; if ($dt['moveID']) { // MOVED TOPIC $move = safe_query("SELECT * FROM " . PREFIX . "forum_topics WHERE topicID='" . $dt['moveID'] . "'"); $dm = mysql_fetch_array($move); if ($dm['replys']) { $replys = $dm['replys']; } if ($dm['views']) { $views = $dm['views']; } $date = date("d.m.y", $dm['lastdate']); $time = date("H:i", $dm['lastdate']); $today = date("d.m.y", time()); $yesterday = date("d.m.y", time() - 3600 * 24); if ($date == $today) { $date = $_language->module['today'] . ", " . $time; } elseif ($date == $yesterday && $date < $today) { $date = $_language->module['yesterday'] . ", " . $time; } else { $date = $date . ", " . $time; } $lastposter = '<a href="index.php?site=profile&id=' . $dm['lastposter'] . '">' . getnickname($dm['lastposter']) . '</a>'; if (isclanmember($dm['lastposter'])) { $member = ' <img src="images/icons/member.gif" alt="' . $_language->module['clanmember'] . '" />'; } else { $member = ''; } $link = '<a href="index.php?site=forum_topic&topic=' . $dt['moveID'] . '"><b>' . $_language->module['moved'] . ': ' . $topictitle . '</b></a>'; } else { // NO MOVED TOPIC if ($dt['replys']) { $replys = $dt['replys']; } if ($dt['views']) { $views = $dt['views']; } $date = date("d.m.y", $dt['lastdate']); $time = date("H:i", $dt['lastdate']); $today = date("d.m.y", time()); $yesterday = date("d.m.y", time() - 3600 * 24); if ($date == $today) { $date = $_language->module['today'] . ", " . $time; } elseif ($date == $yesterday && $date < $today) { $date = $_language->module['yesterday'] . ", " . $time; } else { $date = $date . ", " . $time; } $lastposter = '<a href="index.php?site=profile&id=' . $dt['lastposter'] . '">' . getnickname($dt['lastposter']) . '</a>'; if (isclanmember($dt['lastposter'])) { $member = ' <img src="images/icons/member.gif" alt="' . $_language->module['clanmember'] . '" />'; } else { $member = ''; } $link = '<a href="index.php?site=forum_topic&topic=' . $dt['topicID'] . '"><b>' . $topictitle . '</b></a>'; } eval("\$forum_topics_content = \"" . gettemplate("forum_topics_content") . "\";"); echo $forum_topics_content; $i++; unset($topicpage_link); unset($lastposter); unset($member); unset($member1); unset($date); unset($time); unset($link); } eval("\$forum_topics_foot = \"" . gettemplate("forum_topics_foot") . "\";"); echo $forum_topics_foot; } eval("\$forum_actions = \"" . gettemplate("forum_actions") . "\";"); echo $forum_actions; if ($loggedin) { eval("\$forum_topics_legend = \"" . gettemplate("forum_topics_legend") . "\";"); echo $forum_topics_legend; } if (!$loggedin) { echo $_language->module['not_logged_msg']; } unset($page_link); }
} else { $showonly = ''; } /*news pages switch*/ if ($pages > 1) { $page_link = makepagelink("index.php?site=news", $page, $pages); } else { $page_link = ''; } if ($page == "1") { /*news pages switch ende*/ $result = safe_query("SELECT\n\t\t * \n\tFROM \n\t\t" . PREFIX . "news\n\tWHERE\n\t\tpublished='1' AND\n\t\tintern<=" . (int) isclanmember($userID) . " " . $showonly . "\n\tORDER BY \n\t\tdate DESC \n\tLIMIT 0," . $maxshownnews); $n = $gesamt; } else { $start = $page * $max - $max; $result = safe_query("SELECT\n\t\t\t *\n\t\tFROM \n\t\t\t" . PREFIX . "news \n\t\tWHERE \n\t\t\tpublished='1' AND\n\t\t\tintern<=" . (int) isclanmember($userID) . " \n\t\tORDER BY \n\t\t\tdate DESC\n\t\tLIMIT " . $start . "," . $maxshownnews); $n = $gesamt - $page * $max + $max; } $i = 1; while ($ds = mysqli_fetch_array($result)) { if ($i % 2) { $bg1 = BG_1; } else { $bg1 = BG_2; } $date = getformatdate($ds['date']); $time = getformattime($ds['date']); $rubrikname = getrubricname($ds['rubric']); $rubrikname_link = getinput($rubrikname); $rubricpic_path = "images/news-rubrics/" . getrubricpic($ds['rubric']); $rubricpic = '<img src="' . $rubricpic_path . '" alt="">';
function print_cashbox($squadID, $id) { global $_language; $_language->read_module('cash_box'); $bg1 = BG_1; $bg2 = BG_2; $pagebg = PAGEBG; $border = BORDER; $bghead = BGHEAD; $bgcat = BGCAT; global $wincolor; global $loosecolor; global $drawcolor; global $userID; if ($id) { $squadergebnis = safe_query("SELECT squad FROM " . PREFIX . "cash_box WHERE cashID='" . $id . "'"); $dv = mysql_fetch_array($squadergebnis); $squadID = $dv['squad']; } $costs_squad = ''; if ($squadID == 0) { $usersquad = $_language->module['clan']; } else { $ergebnis_squad = safe_query("SELECT * FROM " . PREFIX . "cash_box_payed, " . PREFIX . "cash_box WHERE " . PREFIX . "cash_box_payed.payed='1' AND " . PREFIX . "cash_box_payed.cashID=" . PREFIX . "cash_box.cashID AND " . PREFIX . "cash_box.squad = '" . $squadID . "'"); $anz_squad = mysql_num_rows($ergebnis_squad); $costs_squad = 0.0; if ($anz_squad) { while ($dss = mysql_fetch_array($ergebnis_squad)) { $costs_squad += $dss['costs']; } } $ergebnis_squad = safe_query("SELECT * FROM " . PREFIX . "cash_box WHERE squad='{$squadID}'"); $anz_squad = mysql_num_rows($ergebnis_squad); if ($anz_squad) { while ($dss = mysql_fetch_array($ergebnis_squad)) { $costs_squad -= $dss['totalcosts']; } } $costs_squad = ' (' . $costs_squad . ' euro)'; $usersquad = $_language->module['squad'] . ": " . getsquadname($squadID); } $ergebnis = safe_query("SELECT * FROM " . PREFIX . "cash_box WHERE squad='" . $squadID . "' ORDER BY paydate DESC LIMIT 0,1"); echo '<br /><br /><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top" width="180"><b>' . $usersquad . $costs_squad . '</b></td> </tr> <tr> <td height="1" bgcolor="' . BG_1 . '" width="100%" colspan="4"></td> </tr> <tr><td height="15"></td></tr>'; echo '<tr> <td valign="top" width="180">'; if (mysql_num_rows($ergebnis)) { $ds = mysql_fetch_array($ergebnis); if (!$id) { $id = $ds['cashID']; } $ergebnis = safe_query("SELECT * FROM " . PREFIX . "cash_box WHERE cashID='{$id}'"); $ds = mysql_fetch_array($ergebnis); $date = date("d.m.Y", $ds['date']); $paydate = date("d.m.Y", $ds['paydate']); $bezahlen = safe_query("SELECT * FROM " . PREFIX . "cash_box_payed WHERE cashID='{$id}' AND payed='1' "); $payed = mysql_num_rows($bezahlen); $konto = cleartext($ds['konto']); $usage = $ds['usedfor']; if (iscashadmin($userID)) { $adminaction = '<input type="button" onclick="MM_goToURL(\'parent\',\'index.php?site=cash_box&action=edit&id=' . $id . '\');return document.MM_returnValue" value="' . $_language->module['edit'] . '" /> <input type="button" onclick="MM_confirm(\'' . $_language->module['really_delete'] . '\', \'cash_box.php?delete=true&id=' . $id . '\')" value="' . $_language->module['delete'] . '" />'; } eval("\$cash_box_usage = \"" . gettemplate("cash_box_usage") . "\";"); echo $cash_box_usage; $all = safe_query("SELECT * FROM " . PREFIX . "cash_box WHERE squad='" . $squadID . "' ORDER BY paydate DESC"); echo '<br /><br />'; while ($ds = mysql_fetch_array($all)) { echo '• <a href="index.php?site=cash_box&id=' . $ds['cashID'] . '&squad=' . $squadID . '"><b>' . $ds['usedfor'] . '</b></a><br />'; } echo '</td><td width="10"> </td> <td valign="top">'; $members = array(); $ergebnis = safe_query("SELECT * FROM " . PREFIX . "user ORDER BY nickname"); while ($du = mysql_fetch_array($ergebnis)) { if ($squadID == 0) { if (isclanmember($du['userID'], $squadID)) { $members[] = $du['userID']; } } else { if (issquadmember($du['userID'], $squadID)) { $members[] = $du['userID']; } } } eval("\$cash_box_head = \"" . gettemplate("cash_box_head") . "\";"); echo $cash_box_head; if (count($members)) { foreach ($members as $usID) { $ergebnis = safe_query("SELECT * FROM " . PREFIX . "cash_box_payed WHERE userID='{$usID}' AND cashID='{$id}'"); $du = mysql_fetch_array($ergebnis); $user = '******' . $usID . '"><b>' . getnickname($usID) . '</b></a>'; if ($du['payed']) { $paydate = date("d.m.Y", $du['date']); $payed = '<font color="' . $wincolor . '">' . $_language->module['paid'] . ': ' . $paydate . '</font>'; } else { $payed = '<font color="' . $loosecolor . '">' . $_language->module['not_paid'] . '</font>'; } if (iscashadmin($userID)) { if ($du['costs']) { $bg = BG_1; $costs = $du['costs']; } else { $costs = ""; $bg = BG_2; } $payment = '<input type="text" size="7" name="payid[' . $usID . ']" value="' . $costs . '" dir="rtl" /> €'; } else { if ($du['costs']) { $costs = '<font color="' . $wincolor . '"><b>' . $du['costs'] . ' €</b></font>'; $bg = BG_1; } else { $costs = '<font color="' . $loosecolor . '">0.00 €</font>'; $bg = BG_2; } $payment = $costs; } eval("\$cash_box_content = \"" . gettemplate("cash_box_content") . "\";"); echo $cash_box_content; } } if (iscashadmin($userID)) { $admin = '<input type="hidden" name="id" value="' . $id . '" /><input type="submit" name="pay" value="' . $_language->module['update'] . '" />'; } eval("\$cash_box_foot = \"" . gettemplate("cash_box_foot") . "\";"); echo $cash_box_foot; } else { echo $_language->module['no_entries']; } echo '</td></tr></table>'; }
} else { $bg1 = BG_3; $bg2 = BG_4; } $date = date("d.m.Y - H:i", $ds['date']); if ($userID == $ds['fromuser']) { $buddy = ''; } elseif (isignored($userID, $ds['touser'])) { $buddy = '<a href="buddys.php?action=readd&id=' . $ds['touser'] . '&userID=' . $userID . '"><img src="images/icons/buddy_readd.gif" border="0" alt="%readd_ignored%" /></a>'; } elseif (isbuddy($userID, $ds['touser'])) { $buddy = '<a href="buddys.php?action=ignore&id=' . $ds['touser'] . '&userID=' . $userID . '"><img src="images/icons/buddy_ignore.gif" border="0" alt="%ignore%" /></a>'; } else { $buddy = '<a href="buddys.php?action=add&id=' . $ds['touser'] . '&userID=' . $userID . '"><img src="images/icons/buddy_add.gif" border="0" alt="%add_buddylist%" /></a>'; } $receptionist = '<a href="index.php?site=profile&id=' . $ds['touser'] . '"><b>' . getnickname($ds['touser']) . '</b></a>'; if (isclanmember($ds['touser'])) { $member = ' <img src="images/icons/member.gif" width="6" height="11" alt="Clanmember" />'; } else { $member = ''; } if (isonline($ds['touser']) == "offline") { $statuspic = '<img src="images/icons/offline.gif" alt="offline" />'; } else { $statuspic = '<img src="images/icons/online.gif" alt="online" />'; } if (trim($ds['title']) != "") { $title = clearfromtags($ds['title']); } else { $title = $_language->module['no_subject']; } $title = '• <a href="index.php?site=messenger&action=show&id=' . $ds['messageID'] . '">' . $title . '</a>';
if (!$userID) { $CAPCLASS = new Captcha(); $captcha = $CAPCLASS->create_captcha(); $hash = $CAPCLASS->get_hash(); $CAPCLASS->clear_oldcaptcha(); $captcha_form = $captcha . ' <input type="text" name="captcha" size="5" maxlength="5" /><input name="captcha_hash" type="hidden" value="' . $hash . '" /><br />'; } eval("\$report_deadlink = \"" . gettemplate("report_deadlink") . "\";"); echo $report_deadlink; } else { redirect("index.php?site=files", $_language->module['cant_report_without_fileID'], "3"); } } else { $accesslevel = 1; $adminactions = ''; if (isclanmember($userID)) { $accesslevel = 2; } if (isfileadmin($userID)) { $adminactions = '<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td align="right">'; $adminactions .= '<input type="button" onclick="MM_goToURL(\'parent\',\'index.php?site=files&action=newfile\');return document.MM_returnValue" value="' . $_language->module['new_file'] . '" /> '; $adminactions .= '<input type="button" onclick="MM_openBrWindow(\'admin/admincenter.php?site=filecategorys\',\'\')" value="' . $_language->module['new_category'] . '" />'; $adminactions .= '</td></tr></table><br />'; } // STATS // categories in database $catQry = safe_query("SELECT * FROM " . PREFIX . "files_categorys WHERE subcatID = '0' ORDER BY name"); $totalcats = mysql_num_rows($catQry); if ($totalcats) { // files in database $fileQry = safe_query("SELECT * FROM " . PREFIX . "files");
if (isnewsadmin($userID)) { $unpublished = safe_query("SELECT newsID FROM " . PREFIX . "news WHERE published='0' AND saved='1'"); $unpublished = mysql_num_rows($unpublished); if ($unpublished) { $publish = '<input type="button" onclick="MM_goToURL(\'parent\',\'index.php?site=news&action=unpublished\');return document.MM_returnValue;" value="' . $unpublished . ' ' . $_language->module['unpublished_news'] . '" /> '; } } echo $post . ' ' . $publish . '<input type="button" onclick="MM_goToURL(\'parent\',\'index.php?site=news&action=archive\');return document.MM_returnValue;" value="' . $_language->module['news_archive'] . '" /><hr />'; if (isset($_GET['show'])) { $result = safe_query("SELECT rubricID FROM " . PREFIX . "news_rubrics WHERE rubric='" . $_GET['show'] . "' LIMIT 0,1"); $dv = mysql_fetch_array($result); $showonly = "AND rubric='" . $dv['rubricID'] . "'"; } else { $showonly = ''; } $result = safe_query("SELECT * FROM " . PREFIX . "news WHERE published='1' AND intern<=" . isclanmember($userID) . " " . $showonly . " ORDER BY date DESC LIMIT 0," . $maxshownnews); $i = 1; while ($ds = mysql_fetch_array($result)) { if ($i % 2) { $bg1 = BG_1; } else { $bg1 = BG_2; } $date = date("d.m.Y", $ds['date']); $time = date("H:i", $ds['date']); $rubrikname = getrubricname($ds['rubric']); $rubrikname_link = getinput($rubrikname); $rubricpic_path = "images/news-rubrics/" . getrubricpic($ds['rubric']); $rubricpic = '<img src="' . $rubricpic_path . '" border="0" alt="" />'; if (!is_file($rubricpic_path)) { $rubricpic = '';
} if (isset($lang)) { unset($lang); } if (isset($_GET['lang'])) { $lang = $_GET['lang']; } $post = ""; if (isnewswriter($userID)) { $post = '<input type="button" onclick="MM_openBrWindow(\'news.php?action=new\',\'News\',\'toolbar=no,status=no,scrollbars=yes,width=800,height=600\')" value="' . $_language->module['post_news'] . '" />'; } echo $post . ' <input type="button" onclick="MM_goToURL(\'parent\',\'index.php?site=news&action=archive\');return document.MM_returnValue" value="' . $_language->module['news_archive'] . '" /><hr />'; if ($newsID) { $result = safe_query("SELECT * FROM " . PREFIX . "news WHERE newsID='" . $newsID . "'"); $ds = mysql_fetch_array($result); if ($ds['intern'] <= isclanmember($userID) && ($ds['published'] || (isnewsadmin($userID) || (isnewswriter($userID) and $ds['poster'] == $userID)))) { $date = date("d.m.Y", $ds['date']); $time = date("H:i", $ds['date']); $rubrikname = getrubricname($ds['rubric']); $rubrikname_link = getinput($rubrikname); $rubricpic_name = getrubricpic($ds['rubric']); $rubricpic = 'images/news-rubrics/' . $rubricpic_name; if (!file_exists($rubricpic) or $rubricpic_name == '') { $rubricpic = ''; } else { $rubricpic = '<img src="' . $rubricpic . '" border="0" alt="" />'; } $message_array = array(); $query = safe_query("SELECT n.*, c.short AS `countryCode`, c.country FROM " . PREFIX . "news_contents n LEFT JOIN " . PREFIX . "countries c ON c.short = n.language WHERE n.newsID='" . $newsID . "'"); while ($qs = mysql_fetch_array($query)) { $message_array[] = array('lang' => $qs['language'], 'headline' => $qs['headline'], 'message' => $qs['content'], 'country' => $qs['country'], 'countryShort' => $qs['countryCode']);
*/ $news_id = $_GET['newsID']; $qnews = safe_query("SELECT * FROM " . PREFIX . "news WHERE newsID={$news_id}"); $news = mysql_fetch_array($qnews); $sc_game = $news['game']; $only = ''; if (isset($sc_categoryID) and $sc_categoryID) { $only = "AND category='" . $sc_categoryID . "'"; } if (isset($sc_rubricID) and $sc_rubricID) { $only = "AND rubric='" . $sc_rubricID . "'"; } if (isset($sc_game) and $sc_game) { $only = "AND game='" . $sc_game . "'"; } $ergebnis = safe_query("SELECT * FROM " . PREFIX . "news WHERE published='1' " . $only . " AND intern<=" . isclanmember($userID) . " ORDER BY date DESC LIMIT 15"); if (mysql_num_rows($ergebnis)) { echo '<ul>'; $n = 1; while ($ds = mysql_fetch_array($ergebnis)) { $date = date("d.m.Y", $ds['date']); $time = date("H:i", $ds['date']); $news_id = $ds['newsID']; if ($n % 2) { $bg1 = BG_1; $bg2 = BG_2; } else { $bg1 = BG_3; $bg2 = BG_4; } if (file_exists('images/games/' . $ds['game'] . '.gif')) {
$nickname_c = getnickname($ds['userID']); $replaced_search = str_replace("%", "", $search); $nickname = str_replace($replaced_search, '<b>' . $replaced_search . '</b>', $nickname_c); if (issuperadmin($ds['userID']) && isclanmember($ds['userID'])) { $status = $_language->module['superadmin'] . '<br />& ' . $_language->module['clanmember']; } elseif (issuperadmin($ds['userID'])) { $status = $_language->module['superadmin']; } elseif (isanyadmin($ds['userID']) && isclanmember($ds['userID'])) { $status = $_language->module['admin'] . '<br />& ' . $_language->module['clanmember']; } elseif (isanyadmin($ds['userID'])) { $status = $_language->module['admin']; } elseif (isanymoderator($ds['userID']) && isclanmember($ds['userID'])) { $status = $_language->module['moderator'] . '<br />& ' . $_language->module['clanmember']; } elseif (isanymoderator($ds['userID'])) { $status = $_language->module['moderator']; } elseif (isclanmember($ds['userID'])) { $status = $_language->module['clanmember']; } else { $status = $_language->module['user']; } if (isbanned($ds['userID'])) { $banned = '<input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=users&action=ban&id=' . $ds['userID'] . '\');return document.MM_returnValue" value="' . $_language->module['undo_ban'] . '" />'; } else { $banned = '<input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=users&action=ban&id=' . $ds['userID'] . '\');return document.MM_returnValue" value="' . $_language->module['banish'] . '" />'; } if ($ds['activated'] == "1") { $actions = '<input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=users&page=' . $page . '&type=' . $type . '&sort=' . $sort . '&search=' . $search . '&action=addtoclan&id=' . $ds['userID'] . '\');return document.MM_returnValue" value="' . $_language->module['to_clan'] . '" /> <input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=members&action=edit&id=' . $ds['userID'] . '\');return document.MM_returnValue" value="' . $_language->module['rights'] . '" /> <input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=users&action=profile&page=' . $page . '&type=' . $type . '&sort=' . $sort . '&search=' . $search . '&id=' . $ds['userID'] . '\');return document.MM_returnValue" value="' . $_language->module['profile'] . '" />'; } else { $actions = '<input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=users&action=activate&id=' . $ds['userID'] . '&captcha_hash=' . $hash . '\');return document.MM_returnValue" value="' . $_language->module['activate'] . '" />'; } echo '<tr>
<input type="submit" value="vote" /></td> </tr> <tr> <td><br />• <a href="index.php?site=polls">' . $_language->module['show_polls'] . '</a></td> </tr> </table> </form>'; } } else { redirect('index.php?site=polls&pollID=' . $ds['pollID'], $_language->module['poll_ended'], 3); } } else { if (ispollsadmin($userID)) { echo '<input type="button" onclick="MM_goToURL(\'parent\',\'index.php?site=polls&action=new\');return document.MM_returnValue" value="' . $_language->module['new_poll'] . '" /><br /><br />'; } $ergebnis = safe_query("SELECT * FROM " . PREFIX . "poll WHERE intern<=" . isclanmember($userID) . " ORDER BY pollID DESC"); $anz = mysql_num_rows($ergebnis); if ($anz) { $i = 1; while ($ds = mysql_fetch_array($ergebnis)) { if ($i % 2) { $bg1 = BG_1; } else { $bg1 = BG_2; } $title = $ds['titel']; if ($ds['intern'] == 1) { $isintern = '(' . $_language->module['intern'] . ')'; } else { $isintern = ''; }