function sendmessage($touser, $title, $message, $from = '0') { global $hp_url, $admin_email, $admin_name, $hp_title; $_language_tmp = new Language(); $systemmail = false; if (!$from) { $systemmail = true; $from = '1'; } if (!$systemmail) { safe_query("INSERT INTO " . PREFIX . "messenger (userID, date, fromuser, touser, title, message, viewed) values('{$from}', '" . time() . "', '{$from}', '{$touser}', '{$title}', '" . $message . "', '0')"); safe_query("UPDATE " . PREFIX . "user SET pmsent=pmsent+1 WHERE userID='{$from}'"); } if (!isignored($touser, $from) or $systemmail) { if ($touser != $from || $systemmail) { safe_query("INSERT INTO " . PREFIX . "messenger (userID, date, fromuser, touser, title, message, viewed) VALUES ('{$touser}', '" . time() . "', '{$from}', '{$touser}', '{$title}', '" . $message . "', '0')"); } safe_query("UPDATE " . PREFIX . "user SET pmgot=pmgot+1 WHERE userID='{$touser}'"); if (wantmail($touser) and isonline($touser) == "offline") { $ds = mysql_fetch_array(safe_query("SELECT email, language FROM " . PREFIX . "user WHERE userID='{$touser}'")); $_language_tmp->set_language($ds['language']); $_language_tmp->read_module('messenger'); $mail_body = str_replace("%nickname%", getnickname($touser), $_language_tmp->module['mail_body']); $mail_body = str_replace("%hp_url%", $hp_url, $mail_body); mail($ds['email'], $hp_title . ': ' . $_language_tmp->module['mail_subject'], $mail_body, "Content-Type: text/html; charset=utf-8\nFrom: " . $admin_email . "\n"); } } }
$posts = getuserforumposts($ds['userID']); $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="" />'; } $lastvisits = ""; $visitors = safe_query("SELECT v.*, u.nickname, u.country FROM " . PREFIX . "user_visitors v JOIN " . PREFIX . "user u ON u.userID = v.visitor WHERE v.userID='" . $id . "' ORDER BY v.date DESC LIMIT 0,8"); if (mysql_num_rows($visitors)) { $n = 1; while ($dv = mysql_fetch_array($visitors)) { $n % 2 ? $bgcolor = BG_1 : ($bgcolor = BG_2); $flag = '[flag]' . $dv['country'] . '[/flag]'; $country = flags($flag); $nicknamevisitor = $dv['nickname']; if (isonline($dv['visitor']) == "offline") { $statuspic = '<img src="images/icons/offline.gif" alt="' . $_language->module['offline'] . '" />'; } else { $statuspic = '<img src="images/icons/online.gif" alt="' . $_language->module['online'] . '" />'; } $time = time(); $visittime = $dv['date']; $sec = $time - $visittime; $days = $sec / 86400; // sekunden / (60*60*24) $days = mb_substr($days, 0, mb_strpos($days, ".")); // kommastelle $sec = $sec - $days * 86400; $hours = $sec / 3600; $hours = mb_substr($hours, 0, mb_strpos($hours, ".")); $sec = $sec - $hours * 3600;
$quotenickname = addslashes(getinput(getnickname($ds['userID']))); $quote = str_replace(array('%nickname%', '%message%'), array($quotenickname, $quotemessage), $_language->module['quote_link']); $country = '[flag]' . getcountry($ds['userID']) . '[/flag]'; $country = flags($country); if ($email = getemail($ds['userID']) and !getemailhide($ds['userID'])) { $email = str_replace('%email%', mail_protect($email), $_language->module['email_link']); } else { $email = ''; } $gethomepage = gethomepage($ds['userID']); if ($gethomepage != "" && $gethomepage != "http://" && $gethomepage != "http:///" && $gethomepage != "n/a") { $hp = '<a href="http://' . $gethomepage . '" target="_blank"><img src="images/icons/hp.gif" border="0" width="14" height="14" alt="' . $_language->module['homepage'] . '" /></a>'; } else { $hp = ''; } if (isonline($ds['userID']) == "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" />'; } $avatar = '<img src="images/avatars/' . getavatar($ds['userID']) . '" align="left" alt="Avatar" />'; if ($loggedin && $ds['userID'] != $userID) { $pm = '<a href="index.php?site=messenger&action=touser&touser='******'userID'] . '"><img src="images/icons/pm.gif" border="0" width="12" height="13" alt="' . $_language->module['send_message'] . '" /></a>'; if (isignored($userID, $ds['userID'])) { $buddy = '<a href="buddys.php?action=readd&id=' . $ds['userID'] . '&userID=' . $userID . '"><img src="images/icons/buddy_readd.gif" width="16" height="16" border="0" alt="' . $_language->module['readd_buddy'] . '" /></a>'; } elseif (isbuddy($userID, $ds['userID'])) { $buddy = '<a href="buddys.php?action=ignore&id=' . $ds['userID'] . '&userID=' . $userID . '"><img src="images/icons/buddy_ignore.gif" width="16" height="16" border="0" alt="' . $_language->module['ignore_user'] . '" /></a>'; } elseif ($userID == $ds['userID']) { $buddy = ''; } else { $buddy = '<a href="buddys.php?action=add&id=' . $ds['userID'] . '&userID=' . $userID . '"><img src="images/icons/buddy_add.gif" width="16" height="16" border="0" alt="' . $_language->module['add_buddy'] . '" /></a>';
echo '<span style="color:red;font-weight:bold;">Achtung!</span> Du besitzt keinen Planeten! Bitte einen der folgenden wählen!<br />'; echo '<table class="invitetable" style="text-align:center;"><tr><th>Display</th><td>Name<th>System</th><th>Koordinaten des Systems</th></tr>'; $abfrage = mysql_query("SELECT planeten.id FROM planeten,systeme WHERE planeten.system=systeme.id AND systeme.x>=1000 AND systeme.y>=1000 AND planeten.besitzer='2'"); while ($planet = mysql_fetch_array($abfrage)) { $newpl = new Planeten($planet[0]); echo '<tr><td><a href="getPlanet.php?pid=', $newpl->id, '"><img src="images/misc/', $newpl->bild, '" border="0" /></a></td><td>noname (', $newpl->id, ')</td><td>', $newpl->position->system->name, '</td><td>', $newpl->position->system->x, '/', $newpl->position->system->y, '</td></tr>'; } echo '</table>'; } //TICK $tm = mysql_query("SELECT * FROM `ticklog` WHERE id=(SELECT max(id) FROM `ticklog`)") or die(mysql_error()); while ($tm2 = mysql_fetch_array($tm)) { $onlinecounter = 0; $isonlinevar = mysql_query("SELECT * FROM account"); while ($checkonline = mysql_fetch_array($isonlinevar)) { if (isonline($checkonline["aktion"])) { $onlinecounter++; } } if ($onlinecounter == 1) { echo 'Es ist gerade <a href="player.php">1 Spieler</a> online!<br />'; } if ($onlinecounter > 1) { echo 'Es sind gerade <a href="player.php">', $onlinecounter, ' Spieler</a> online!<br />'; } echo 'Dabei seit ', $account->mitglied, ' Ticks!<br />'; echo '<br /><font color="yellow"><b>permanenter Hinweis</b></font>: Solltest du Opfer von permanenten Diebstählen werden ( sogenanntes Farming ) wende dich bitte an das <a href="forum/">Forum - Gerichtshof </a> und bringe den permanenten Diebstahl zur Anzeige!<br />'; echo '<br />'; if ($account->level <= 3) { echo '<span style="color:yellow;font-weight:bold;">Hinweis:</span> Ich empfehle dir das <a href="wiki/index.php/Tutorial">Tutorial</a> und das <a href="wiki/">Wiki</a> durchzulesen<br /><span style="color:yellow;font-weight:bold;">Hinweis:</span> Du bist die ersten 3 Level geschützt, du kannst nich angegriffen werden, kannst keine Rohstoffe klauen, kannst nicht beklaut werden und nicht angreifen.<br />'; }
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>'; } eval("\$ignore_foot = \"" . gettemplate("ignore_foot") . "\";"); echo $ignore_foot; } else { $_language->read_module('buddys');
$buddy = ''; if ($loggedin && $ds['userID'] != $userID) { $pm = '<a href="index.php?site=messenger&action=touser&touser='******'userID'] . '"><img src="images/icons/pm.gif" border="0" width="12" height="13" alt="messenger" /></a>'; if (isignored($userID, $ds['userID'])) { $buddy = '<a href="buddys.php?action=readd&id=' . $ds['userID'] . '&userID=' . $userID . '"><img src="images/icons/buddy_readd.gif" width="16" height="16" border="0" alt="back to buddy-list" /></a>'; } elseif (isbuddy($userID, $ds['userID'])) { $buddy = '<a href="buddys.php?action=ignore&id=' . $ds['userID'] . '&userID=' . $userID . '"><img src="images/icons/buddy_ignore.gif" width="16" height="16" border="0" alt="ignore user" /></a>'; } elseif ($userID == $ds['userID']) { $buddy = ''; } else { $buddy = '<a href="buddys.php?action=add&id=' . $ds['userID'] . '&userID=' . $userID . '"><img src="images/icons/buddy_add.gif" width="16" height="16" border="0" alt="add to buddylist" /></a>'; } } $lastlogindate = date("d.m.Y", $ds['lastlogin']); $lastlogintime = date("H:i", $ds['lastlogin']); $registereddate = date("d.m.Y", $ds['registerdate']); $status = isonline($ds['userID']); if ($status == "offline") { $login = $lastlogindate . ' - ' . $lastlogintime; } else { $login = '******' . $_language->module['now_on']; } eval("\$registered_users_content = \"" . gettemplate("registered_users_content") . "\";"); echo $registered_users_content; $n++; } eval("\$registered_users_foot = \"" . gettemplate("registered_users_foot") . "\";"); echo $registered_users_foot; } else { echo $_language->module['no_users']; }
if ($seite == '') { $seite = 1; } $zaehler = 0; ?> <h3>Tabelle der Mitspieler</h3> <table class="invitetable"><tr> <th>ID</th><th>Spielername</th><th>Message</th></tr> <?php $abfrage = mysql_query("SELECT * FROM `account` WHERE id != 9 ORDER BY id ASC"); while ($user = mysql_fetch_array($abfrage)) { $acc = new Account($user["id"]); $zaehler++; if ($zaehler >= 1 + ($seite - 1) * 25 && $zaehler <= $seite * 25) { echo '<tr><td>', $user["id"], '</td><td><a href="userinfo.php?id=', $user["id"], '">', $acc->nickname, '</a> '; if (isonline($user["aktion"])) { echo '<span style="color:green;font-weight:bold;">Online</span>'; } echo ' </td><td>', $user["id"] == 2 || $user["id"] == 9 ? '-' : '<a href="newmail.php?to=' . $user["id"] . '">Nachricht senden</a>', '</td></tr>'; } } echo '</table>'; $einfaerben = false; for ($o = 1; $o <= ceil($zaehler / 25); $o++) { if ($zaehler >= 1 + ($o - 1) * 25) { //echo '!!zaheler: ',$zaehler,' !!! ergebnis:',1+($o-1)*20,'<br />'; if ($seite == $o) { $einfaerben = true; } echo $o == $seite ? '<a href="player.php?seite=' . $o . '"><span style="color:red;">' . $o . '</span></a>' : '<a href="player.php?seite=' . $o . '">' . $o . '</span>', $o == ceil($zaehler / 25) ? '' : ', ', '</a>'; }
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>'; $icon = '<img src="images/icons/pm_old.gif" width="14" height="12" alt="" />'; eval("\$pm_outgoing_content = \"" . gettemplate("pm_outgoing_content") . "\";"); echo $pm_outgoing_content; $n++; }
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']; } } }