コード例 #1
0
ファイル: squads.php プロジェクト: hellagent75/ign_live
    </table>
  </div>
  <table width="100%" border="0" cellspacing="1" cellpadding="3">
    <tr>
      <td colspan="2"><b>' . $_language->module['squad_info'] . '</b>
      <table width="99%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td valign="top">' . $addbbcode . '</td>
          <td valign="top">' . $addflags . '</td>
        </tr>
      </table>
      <br /><textarea rows="5" cols="" name="message" style="width: 100%;">' . getinput($ds['info']) . '</textarea>
      </td>
    </tr>
    <tr>
      <td colspan="2"><input type="hidden" name="captcha_hash" value="' . $hash . '" /><input type="hidden" name="squadID" value="' . getforminput($squadID) . '" /><input type="submit" name="saveedit" value="' . $_language->module['edit_squad'] . '" /></td>
    </tr>
  </table>
  </form>';
} else {
    echo '<h1>&curren; ' . $_language->module['squads'] . '</h1>';
    echo '<input type="button" onclick="MM_goToURL(\'parent\',\'admincenter.php?site=squads&amp;action=add\');return document.MM_returnValue" value="' . $_language->module['new_squad'] . '" /><br /><br />';
    echo '<form method="post" action="admincenter.php?site=squads">
  <table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#DDDDDD">
    <tr>
      <td width="20%" class="title"><b>' . $_language->module['squad_name'] . '</b></td>
      <td width="17%" class="title"><b>' . $_language->module['squad_type'] . '</b></td>
      <td width="35%" class="title"><b>' . $_language->module['squad_info'] . '</b></td>
      <td width="20%" class="title"><b>' . $_language->module['actions'] . '</b></td>
      <td width="8%" class="title"><b>' . $_language->module['sort'] . '</b></td>
    </tr>';
コード例 #2
0
ファイル: clanwars.php プロジェクト: Blaz3r/webSPELL
         if ($scoreHome[$d] > $scoreOpp[$d]) {
             $score .= '<td>[color=' . $wincolor . '][b]' . $scoreHome[$d] . '[/b][/color] : [color=' . $loosecolor . '][b]' . $scoreOpp[$d] . '[/b][/color]</td>';
         } elseif ($scoreHome[$d] < $scoreOpp[$d]) {
             $score .= '<td>[color=' . $loosecolor . '][b]' . $scoreHome[$d] . '[/b][/color] : [color=' . $wincolor . '][b]' . $scoreOpp[$d] . '[/b][/color]</td>';
         } else {
             $score .= '<td>[color=' . $drawcolor . '][b]' . $scoreHome[$d] . '[/b][/color] : [color=' . $drawcolor . '][b]' . $scoreOpp[$d] . '[/b][/color]</td>';
         }
         $d++;
         eval("\$news_cw_results = \"" . gettemplate("news_cw_results") . "\";");
         $results_ext .= $news_cw_results;
         unset($score);
     }
     $results_ext .= '[/TOGGLE]';
 }
 if (!empty($report)) {
     $more1 = '[TOGGLE=Report]' . getforminput($report) . '[/TOGGLE]';
 }
 $home = "";
 if (is_array($team)) {
     $n = 1;
     foreach ($team as $id) {
         if (!empty($id)) {
             if ($n > 1) {
                 $home .= ', <a href="index.php?site=profile&amp;id=' . $id . '">' . getnickname($id) . '</a>';
             } else {
                 $home = '<a href="index.php?site=profile&amp;id=' . $id . '">' . getnickname($id) . '</a>';
             }
             $n++;
         }
     }
 }
コード例 #3
0
ファイル: files.php プロジェクト: hellagent75/ign_live
        $accesslevel = 2;
    }
    if ($file['accesslevel'] <= $accesslevel) {
        $link = '<a href="download.php?fileID=' . $fileID . '"><img src="images/icons/download.gif" border="0" alt="" /> <b><font color="#00AA00">' . str_replace('%filename%', $filename, $_language->module['download_now']) . '</font></b> <img src="images/icons/download.gif" border="0" alt="" /></a>';
    } else {
        $link = $_language->module['download_registered_only'] . '<br /><a href="index.php?site=login">' . $_language->module['login'] . '</a> | <a href="index.php?site=register">' . $_language->module['register'] . '</a>';
    }
    eval("\$files_display = \"" . gettemplate("files_display") . "\";");
    echo $files_display;
} elseif ($action == "statistic") {
    // EXTENDED STATS
} elseif ($action == "report") {
    // DEAD-LINK TICKET SYSTEM
    $mode = 'deadlink';
    $type = 'files';
    $id = getforminput($_GET['link']);
    $referer = $hp_url . '/index.php?site=files&amp;fileID=' . $id;
    // display
    $bg1 = BG_1;
    $bg2 = BG_2;
    $bghead = BGHEAD;
    $border = BORDER;
    $pagebg = PAGEBG;
    if ($id) {
        $type = 'files';
        $captcha_form = "";
        $type_ = "";
        if (!$userID) {
            $CAPCLASS = new Captcha();
            $captcha = $CAPCLASS->create_captcha();
            $hash = $CAPCLASS->get_hash();
コード例 #4
0
ファイル: users.php プロジェクト: hellagent75/ign_live
			</form>';
        } else {
            echo $_language->module['you_cant_ban'] . '<br /><br />&laquo; <a href="javascript:history.back()">' . $_language->module['back'] . '</a>';
        }
    } else {
        echo $_language->module['you_cant_ban_yourself'] . '<br /><br />&laquo; <a href="javascript:history.back()">' . $_language->module['back'] . '</a>';
    }
} elseif ($action == "addtoclan") {
    echo '<h1>&curren; <a href="admincenter.php?site=users" class="white">' . $_language->module['users'] . '</a> &raquo; ' . $_language->module['add_to_clan'] . '</h1>';
    $id = $_GET['id'];
    $nickname = getnickname($id);
    $squads = getsquads();
    $CAPCLASS = new Captcha();
    $CAPCLASS->create_transaction();
    $hash = $CAPCLASS->get_hash();
    echo '<form method="post" action="admincenter.php?site=users&amp;page=' . (int) $_GET['page'] . '&amp;type=' . getforminput($_GET['type']) . '&amp;sort=' . $_GET['sort'] . '">
	<table width="100%" border="0" cellspacing="1" cellpadding="3">
    <tr>
      <td width="15%"><b>' . $_language->module['nickname'] . '</b> hgjgkjh</td>
      <td width="85%">' . $nickname . '</td>
    </tr>
    <tr>
      <td><b>' . $_language->module['squad'] . '</b></td>
      <td><select name="squad">' . $squads . '</select></td>
    </tr>
    <tr>
      <td><b>' . $_language->module['position'] . '</b></td>
      <td><input type="text" name="position" size="60" /></td>
    </tr>
    <tr>
      <td><b>' . $_language->module['activity'] . '</b></td>
コード例 #5
0
ファイル: newsletter.php プロジェクト: Blaz3r/webSPELL
        redirect('index.php?site=newsletter', $_language->module['password_had_been_send'], 3);
    } else {
        redirect('index.php?site=newsletter', $_language->module['no_such_mail_adress'], 3);
    }
} else {
    $bg1 = BG_1;
    $bg2 = BG_2;
    $bg3 = BG_3;
    $bg4 = BG_4;
    $usermail = getemail($userID);
    if (isset($_GET['mail'])) {
        $get_mail = getforminput($_GET['mail']);
    } else {
        $get_mail = '';
    }
    if ($get_mail == "") {
        $get_mail = $_language->module['mail_adress'];
    }
    if (isset($_GET['pass'])) {
        $get_pw = getforminput($_GET['pass']);
    } else {
        $get_pw = '';
    }
    if ($get_pw == "") {
        $get_pw = $_language->module['del_key'];
    }
    eval("\$newsletter_title = \"" . gettemplate("title_newsletter") . "\";");
    echo $newsletter_title;
    eval("\$newsletter = \"" . gettemplate("newsletter") . "\";");
    echo $newsletter;
}
コード例 #6
0
ファイル: joinus.php プロジェクト: Talfagoron/webSPELL-1
            $email = '';
        }
        if (isset($_POST['messenger'])) {
            $messenger = getforminput($_POST['messenger']);
        } else {
            $messenger = '';
        }
        if (isset($_POST['age'])) {
            $age = getforminput($_POST['age']);
        } else {
            $age = '';
        }
        if (isset($_POST['city'])) {
            $city = getforminput($_POST['city']);
        } else {
            $city = '';
        }
        if (isset($_POST['clanhistory'])) {
            $clanhistory = getforminput($_POST['clanhistory']);
        } else {
            $clanhistory = '';
        }
        if (isset($_POST['info'])) {
            $info = getforminput($_POST['info']);
        } else {
            $info = '';
        }
        eval("\$joinus_notloggedin = \"" . gettemplate("joinus_notloggedin") . "\";");
        echo $joinus_notloggedin;
    }
}
コード例 #7
0
ファイル: contact.php プロジェクト: Blaz3r/webSPELL
} else {
    $CAPCLASS = new Captcha();
    $captcha = $CAPCLASS->create_captcha();
    $hash = $CAPCLASS->get_hash();
    $CAPCLASS->clear_oldcaptcha();
    if (!isset($showerror)) {
        $showerror = '';
    }
    if (isset($_POST['name'])) {
        $name = getforminput($_POST['name']);
    } else {
        $name = '';
    }
    if (isset($_POST['from'])) {
        $from = getforminput($_POST['from']);
    } else {
        $from = '';
    }
    if (isset($_POST['subject'])) {
        $subject = getforminput($_POST['subject']);
    } else {
        $subject = '';
    }
    if (isset($_POST['text'])) {
        $text = getforminput($_POST['text']);
    } else {
        $text = '';
    }
    eval("\$contact_notloggedin = \"" . gettemplate("contact_notloggedin") . "\";");
    echo $contact_notloggedin;
}
コード例 #8
0
ファイル: comments.php プロジェクト: Blaz3r/webSPELL
         }
         if (isset($_GET['error'])) {
             $err = $_GET['error'];
         } else {
             $err = "";
         }
         if ($err == "nickname") {
             $error = $_language->module['error_nickname'];
             $name = "";
         } elseif ($err == "captcha") {
             $error = $_language->module['error_captcha'];
         } else {
             $error = '';
         }
         if (isset($_SESSION['comments_message'])) {
             $message = getforminput($_SESSION['comments_message']);
             unset($_SESSION['comments_message']);
         } else {
             $message = "";
         }
         $CAPCLASS = new Captcha();
         $captcha = $CAPCLASS->create_captcha();
         $hash = $CAPCLASS->get_hash();
         $CAPCLASS->clear_oldcaptcha();
         eval("\$addbbcode = \"" . gettemplate("addbbcode") . "\";");
         eval("\$comments_add_visitor = \"" . gettemplate("comments_add_visitor") . "\";");
         echo $comments_add_visitor;
     } else {
         echo $_language->module['no_access'];
     }
 } else {
コード例 #9
0
ファイル: forum.php プロジェクト: Blaz3r/webSPELL
                    $chk_sticky = '<br />' . "\n" . ' <input class="input" type="checkbox" name="sticky" value="1" ' . $_sticky . ' /> ' . $_language->module['make_sticky'];
                } else {
                    $chk_sticky = '<br />' . "\n" . ' <input class="input" type="checkbox" name="sticky" value="1" /> ' . $_language->module['make_sticky'];
                }
            } else {
                $chk_sticky = '';
            }
            if (isset($_POST['notify'])) {
                $notify = ' checked="checked"';
            } else {
                $notify = '';
            }
            if (isset($_POST['topicname'])) {
                $topicname = getforminput($_POST['topicname']);
            }
            if (isset($_POST['message'])) {
                $message = getforminput($_POST['message']);
            }
            eval("\$forum_newtopic = \"" . gettemplate("forum_newtopic") . "\";");
            echo $forum_newtopic;
        } else {
            echo $_language->module['not_logged_msg'];
        }
    } elseif (!$_POST['admaction']) {
        header("Location: index.php?site=forum");
    }
} elseif (!isset($board)) {
    boardmain();
} else {
    showboard($board);
}
コード例 #10
0
ファイル: register.php プロジェクト: hellagent75/ign_live
            } else {
                $b_year = '';
            }
            if (isset($_POST['pwd1'])) {
                $pwd1 = getforminput($_POST['pwd1']);
            } else {
                $pwd1 = '';
            }
            if (isset($_POST['pwd2'])) {
                $pwd2 = getforminput($_POST['pwd2']);
            } else {
                $pwd2 = '';
            }
            if (isset($_POST['mail'])) {
                $mail = getforminput($_POST['mail']);
            } else {
                $mail = '';
            }
            if (isset($_POST['sex'])) {
                $sex = str_replace('value="' . getforminput($_POST['sex']) . '"', 'value="' . getforminput($_POST['sex']) . '" selected="selected"', $sex);
            }
            if (isset($_POST['country'])) {
                $countries = str_replace('value="' . getforminput($_POST['country']) . '"', 'value="' . getforminput($_POST['country']) . '" selected="selected"', $countries);
            }
            eval("\$register = \"" . gettemplate("register") . "\";");
            echo $register;
        } else {
            echo '<h3>Create Account</h3>You are already registered.<div style="height:400px;"></div>';
        }
    }
}
コード例 #11
0
ファイル: challenge.php プロジェクト: Talfagoron/webSPELL-1
    if (isset($_POST['info'])) {
        $info = getforminput($_POST['info']);
    } else {
        $info = '';
    }
    if ($loggedin) {
        $email = getemail($userID);
        eval("\$challenge_loggedin = \"" . gettemplate("challenge_loggedin") . "\";");
        echo $challenge_loggedin;
    } else {
        $CAPCLASS = new Captcha();
        $captcha = $CAPCLASS->create_captcha();
        $hash = $CAPCLASS->get_hash();
        $CAPCLASS->clear_oldcaptcha();
        if (isset($_POST['email'])) {
            $email = getforminput($_POST['email']);
        } else {
            $email = "";
        }
        eval("\$challenge_notloggedin = \"" . gettemplate("challenge_notloggedin") . "\";");
        echo $challenge_notloggedin;
    }
}
if (isclanwaradmin($userID)) {
    $ergebnis = safe_query("SELECT * FROM " . PREFIX . "challenge ORDER BY date {$type}");
    $anz = mysql_num_rows($ergebnis);
    if ($anz) {
        if (!isset($type)) {
            $type = "DESC";
        }
        if ($type == "ASC") {
コード例 #12
0
ファイル: messenger.php プロジェクト: Blaz3r/webSPELL
     }
 } elseif ($action == "newmessage") {
     $_language->read_module('bbcode', true);
     $ergebnis = safe_query("SELECT buddy FROM " . PREFIX . "buddys WHERE userID='{$userID}'");
     $user = '';
     while ($ds = mysql_fetch_array($ergebnis)) {
         $user .= '<option value="' . $ds['buddy'] . '">' . getnickname($ds['buddy']) . '</option>';
     }
     if ($user == "") {
         $user = '******' . $_language->module['no_buddys'] . '</option>';
     } else {
         $user = '******' . $user;
     }
     if (isset($_SESSION['message_error'])) {
         $subject = getforminput($_SESSION['message_subject']);
         $message = getforminput($_SESSION['message_body']);
         $error = "<div class='errorbox' style='margin-left: auto; margin-right: auto;'><b>" . $_language->module['error'] . ":</b><br/>&#8226; " . $_language->module['unknown_user'] . "</div>";
         unset($_SESSION['message_subject'], $_SESSION['message_body'], $_SESSION['message_error']);
     } else {
         $error = $message = $subject = "";
     }
     $bg1 = BG_1;
     if (isanyadmin($userID)) {
         $admin = '<b>' . $_language->module['adminoptions'] . '</b><br />' . $_language->module['sendeachuser'] . '<input class="input" type="checkbox" name="eachuser" value="true" /><br />' . $_language->module['sendeachmember'] . '<input class="input" type="checkbox" name="eachmember" value="true" />';
     } else {
         $admin = '';
     }
     eval("\$addbbcode = \"" . gettemplate("addbbcode") . "\";");
     eval("\$pm_new = \"" . gettemplate("pm_new") . "\";");
     echo $pm_new;
 }
コード例 #13
0
ファイル: forum_topic.php プロジェクト: Blaz3r/webSPELL
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&amp;topic={$topic}&amp;type={$type}", $page, $pages);
    }
    if ($type == "ASC") {
        $sorter = '<a href="index.php?site=forum_topic&amp;topic=' . $topic . '&amp;page=' . $page . '&amp;type=DESC">' . $_language->module['sort'] . ':</a> <img src="images/icons/asc.gif" alt="" />';
    } else {
        $sorter = '<a href="index.php?site=forum_topic&amp;topic=' . $topic . '&amp;page=' . $page . '&amp;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'] . '&amp;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&amp;addtopic=true&amp;action=newtopic&amp;board=' . $dt['boardID'] . '">' . $_language->module['newtopic_image'] . '</a> <a href="index.php?site=forum_topic&amp;topic=' . $topic . '&amp;addreply=true&amp;page=' . $pages . '&amp;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&amp;action=touser&amp;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&amp;id=' . $dr['poster'] . '&amp;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&amp;id=' . $dr['poster'] . '&amp;userID=' . $userID . '"><img src="images/icons/buddy_ignore.gif" border="0" alt="' . $_language->module['ignore'] . '" /></a>';
            } else {
                $buddy = '<a href="buddys.php?action=add&amp;id=' . $dr['poster'] . '&amp;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&amp;addreply=true&amp;board=' . $dt['boardID'] . '&amp;topic=' . $topic . '&amp;quoteID=' . $dr['postID'] . '&amp;page=' . $page . '&amp;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&amp;topic=' . $topic . '&amp;edit=true&amp;id=' . $dr['postID'] . '&amp;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'];
        }
    }
}