Esempio n. 1
0
function editForm($post, $boardid, $threadid, $postid, $abbonieren, $smi, $code)
{
    global $style, $config, $tagbar;
    $TReply = Get_Template('templates/' . $style['styletemplate'] . '/reply.html');
    $formula = '<form action="edit.php" method="post" name="form">
	              <input type="hidden" name="send" value="1" />
	              <input type="hidden" name="action" value="edit" />
	              <input type="hidden" name="boardid" value="' . $boardid . '" />
				  <input type="hidden" name="threadid" value="' . $threadid . '" />
				  <input type="hidden" name="postid" value="' . $postid . '" />
				  <input type="hidden" name="page" value="' . $post['page'] . '" />';
    $topic = '<input type="hidden" name="new[topic]" value="' . $post['topic'] . '" />';
    if (P_EDITTOPIC == 1) {
        $topic = '<tr><td class="cella">&nbsp;Topic</td>
		  <td class="cellb"><input type="text" size="60" maxlength="' . $config['max_topic_len'] . '" name="new[topic]" id="border-tab" value="' . $post['topic'] . '" /></td></tr>';
    }
    $icon = '';
    $poll = '';
    $top = 'Edit';
    if ($post['user_id'] == 0) {
        $autor = '<input type="text" name="new[autor]" size="30" maxlength="' . $config['max_usernamelength'] . '" id="border-tab" value="' . $post['guest_name'] . '" />';
    } else {
        $autor = '<input type="hidden" name="new[autor]" value="" />&nbsp;[smallfont]registriertes Mitglied[smallfontend]';
    }
    $text = stripslashes(decodeX($post['text']));
    switch ($smi) {
        case 0:
            $smilies = 'Aus';
            $smil_yes = '';
            break;
        case 1:
            $smilies = 'An';
            $smil_yes = ' checked';
            if (isset($post['smil'])) {
                if ($post['smil'] == 0) {
                    $smil_yes = '';
                }
            }
    }
    $abbo_yes = '';
    if (isset($post['abbo'])) {
        if ($post['abbo'] == 1) {
            $abbo_yes = ' checked';
        }
    }
    switch ($abbonieren) {
        case 0:
            $mail = 'Aus';
            break;
        case 1:
            $mail = 'An';
    }
    if (isset($post['code'])) {
        $code = $post['code'];
    }
    switch ($code) {
        case 0:
            $bcode_yes = '';
            break;
        case 1:
            $bcode_yes = ' checked';
    }
    $TReply = str_replace('[formula]', $formula, $TReply);
    $TReply = str_replace('[topic]', $topic, $TReply);
    $TReply = str_replace('[icon]', $icon, $TReply);
    $TReply = str_replace('[poll]', $poll, $TReply);
    $TReply = str_replace('[top]', $top, $TReply);
    $TReply = str_replace('[autor]', $autor, $TReply);
    $TReply = str_replace('[tagbar]', $tagbar, $TReply);
    $TReply = str_replace('[text]', $text, $TReply);
    $TReply = str_replace('[smilies]', $smilies, $TReply);
    $TReply = str_replace('[mail]', $mail, $TReply);
    $TReply = str_replace('[abbo_yes]', $abbo_yes, $TReply);
    $TReply = str_replace('[smil_yes]', $smil_yes, $TReply);
    $TReply = str_replace('[bcode_yes]', $bcode_yes, $TReply);
    $TReply = str_replace('[max_len]', $config['max_post_len'], $TReply);
    return $TReply;
}
Esempio n. 2
0
         redistribute it and/or modify it under the
         terms of the GNU General Public License as
         published by the Free Software Foundation;
         either  version 2 of  the License,  or (at
         your option) any later version.

       ==============================================
*/
include 'inc/header.inc.php';
include 'inc/tagbar.inc.php';
// nav_path ------------------------------------------
$data['nav_path'] .= '&nbsp;&gt;&gt;&nbsp;<a href="calendar.php" class="bg">Kalender</a>';
$data['nav_path'] .= '&nbsp;&gt;&gt;&nbsp;Neuer Eintrag';
// global Templates ----------------------------------
$TBoard = Get_Template('templates/' . $style['styletemplate'] . '/board.html');
$TNewevent = Get_Template('templates/' . $style['styletemplate'] . '/new_event.html');
// Permissions
if (U_ID > 0 && P_CEVENT == 0 || U_ID < 1 && (P_CEVENT == 0 || $config['guest_calendar'] == 0)) {
    message('Du bist nicht berechtigt Kalendereintr&auml;ge zu machen', 'Rechte', 0);
}
if (!isset($send)) {
    $data['max_len'] = $config['max_event_len'];
    $data['bcode'] = '&nbsp;';
    if ($config['eventcode'] == 1) {
        $data['bcode'] = $tagbar;
    }
    if (!isset($back)) {
        if (!isset($m)) {
            $m = date("m", $board_time);
        }
        if (!isset($y)) {
Esempio n. 3
0
         download the latest version:
         https://developer.berlios.de/projects/thwc/

         This  program is  free  software;  you can
         redistribute it and/or modify it under the
         terms of the GNU General Public License as
         published by the Free Software Foundation;
         either  version 2 of  the License,  or (at
         your option) any later version.

       ==============================================
*/
include 'inc/header.inc.php';
$TBoard = Get_Template('templates/' . $style['styletemplate'] . '/board.html');
$TThreadtable = Get_Template('templates/' . $style['styletemplate'] . '/threadtable.html');
$TThreadrow = Get_Template('templates/' . $style['styletemplate'] . '/threadrow.html');
if (!isset($page)) {
    $page = 1;
}
$data['thread_nav'] = '';
$r_board = db_query("SELECT\n     board_id,\n     board_name,\n     category,\n     threads,\n     threads_del\n FROM " . $pref . "board WHERE board_id='{$boardid}'");
if (db_rows($r_board) != 1) {
    message('Sorry! Fehlerhafte Boardid.', 'Fehler', 0);
} else {
    $board = db_result($r_board);
    if (P_VIEW == 0 || $board['category'] == 0) {
        message('Sorry! Du hast nicht die Berechtigung dieses Board zu &ouml;ffnen.', 'Zugriff verweigert', 0);
    } else {
        $r_category = db_query("SELECT\n             category_id,\n             category_name\n         FROM " . $pref . "category WHERE category_id='" . $board['category'] . "'");
        $a_category = db_result($r_category);
        // thread permissions
Esempio n. 4
0
    }
}
if (!isset($_SESSION['adsig'])) {
    $_SESSION['adsig'] = 0;
}
if (!isset($_SESSION['userid'])) {
    $_SESSION['userid'] = 0;
}
if (sigControl() == 1) {
    $a_admin = db_query("SELECT\n         user_id,\n         user_name,\n         user_isadmin,\n         is_uradmin,\n         user_styleid\n     FROM " . $pref . "user WHERE user_id='{$_SESSION['userid']}'");
    $admin = db_result($a_admin);
    // style ---------------------------------------------------------
    if ($admin['user_styleid'] != 0) {
        $where = "styleid='{$admin['user_styleid']}'";
    } else {
        $where = "styleisdefault='1'";
    }
    $r_style = db_query("SELECT\n         *\n     FROM " . $pref . "style WHERE " . $where . " ");
    $style = db_result($r_style);
} else {
    print Get_Template('login.html');
    exit;
}
// modlog
$basename = basename($HTTP_SERVER_VARS["SCRIPT_NAME"]);
if ($action != '') {
    db_query("INSERT INTO " . $pref . "modlog SET\n         logtime='{$board_time}',\n         loguser='******'user_name']) . "',\n         logip='" . getenv('REMOTE_ADDR') . "',\n         logfile='{$basename}',\n         action='" . addslashes($action) . "'");
}
// create menu
$data['menurows'] = Template(Get_Template('modmenu.html'));
Esempio n. 5
0
         https://developer.berlios.de/projects/thwc/

         This  program is  free  software;  you can
         redistribute it and/or modify it under the
         terms of the GNU General Public License as
         published by the Free Software Foundation;
         either  version 2 of  the License,  or (at
         your option) any later version.

       ==============================================
*/
include 'inc/header.inc.php';
include 'inc/bcode.inc.php';
// global Templates
$TBoard = Get_Template('templates/' . $style['styletemplate'] . '/board.html');
$TProfile = Get_Template('templates/' . $style['styletemplate'] . '/s_profile.html');
// Function color
function color($i)
{
    if ($i % 2 == 0) {
        $back = '[CellA]';
    } else {
        $back = '[CellB]';
    }
    return $back;
}
// nav_path---------
$data['nav_path'] .= '&nbsp;&gt;&gt;&nbsp;Userprofil';
// nur für registrierte Mitglieder ---
if (U_ID < 1) {
    message('Sorry! Profile k&ouml;nnen nur von registrierten Mitgliedern ge&ouml;ffnet werden.', 'Rechte', 0);
Esempio n. 6
0
    $TOnline = str_replace('[onlineuser]', $usercount, $TOnline);
    $post = 'G&auml;ste';
    if ($guestcount == 1) {
        $post = 'Gast';
    }
    $TOnline = str_replace('[onlineguest]', '<b>' . $guestcount . '</b> ' . $post, $TOnline);
    $TOnline = str_replace('[onlinelist]', $onlinelist, $TOnline);
    $TOnline = str_replace('[onlinecount24]', $onlinecount24, $TOnline);
    $TOnline = str_replace('[onlinelist24]', $onlinelist24, $TOnline);
    $TOnline = str_replace('[rek]', $rek, $TOnline);
    $TOnline = str_replace('[rekorttime]', $rekorttime, $TOnline);
    $onlinebox = $TOnline;
}
$statbox = '';
if ($config['statbox']) {
    $TStat = Get_Template('templates/' . $style['styletemplate'] . '/stats.html');
    include 'stats.php';
    $statbox = $TStat;
}
$r_category = db_query("SELECT      \n     category_id,\n\t category_name,\n\t category_is_open\n FROM " . $pref . "category ORDER BY category_order");
if (db_rows($r_category) < 1) {
    $data['boards'] = '<tr><td class="cella" colspan="5"><center>Keine Kategorien angelegt.</center></td></tr>';
} else {
    if (!isset($_SESSION['openclose'])) {
        // openclose schon erzeugt ?
        $_SESSION['openclose'] = '0';
    }
    $boards = '';
    while ($a_category = db_result($r_category)) {
        $new_cat = 0;
        $session_cat = 'c' . $a_category['category_id'];
Esempio n. 7
0
         published by the Free Software Foundation;
         either  version 2 of  the License,  or (at
         your option) any later version.

       ==============================================
*/
include 'inc/header.inc.php';
include 'inc/bcode.inc.php';
if (U_ID != 0) {
    if (!isset($_SESSION['newpost'])) {
        setNewposts(U_OLDTIME);
    }
}
$TBoard = Get_Template('templates/' . $style['styletemplate'] . '/board.html');
$TPosttab = Get_Template('templates/' . $style['styletemplate'] . '/posttable.html');
$TPostrow = Get_Template('templates/' . $style['styletemplate'] . '/postrow.html');
if (!isset($page)) {
    $page = 1;
}
$data['post_nav'] = '';
$r_thread = db_query("SELECT\n     board_id,\n\t thread_topic,\n\t thread_views,\n\t thread_closed,\n\t deleted,\n\t replies,\n\t thread_autor,\n\t autor_id,\n\t replies_del,\n\t is_poll,\n\t deleted\n FROM " . $pref . "thread WHERE thread_id='{$threadid}' AND board_id='{$boardid}'");
// Permission check ------------------------------------------
if (db_rows($r_thread) != 1) {
    message('Sorry! Fehlerhafter Link.', 'Fehler', 0);
}
$thread = db_result($r_thread);
mysql_free_result($r_thread);
if (P_VIEW != 1) {
    message('Du bist nicht berechtigt dieses Board zu &ouml;ffnen.', 'Rechte', 0);
}
if ($thread['deleted'] == 1 && P_SHOWDELETED == 0) {
Esempio n. 8
0
       ==============================================
         (c) 2003 by
          Mario Pischel         <*****@*****.**>

         download the latest version:
         https://developer.berlios.de/projects/thwc/

         This  program is  free  software;  you can
         redistribute it and/or modify it under the
         terms of the GNU General Public License as
         published by the Free Software Foundation;
         either  version 2 of  the License,  or (at
         your option) any later version.

       ==============================================
*/
include 'inc/header.inc.php';
include 'inc/bcode.inc.php';
// global Template
$TEvent = Get_Template('templates/' . $style['styletemplate'] . '/event.html');
$r_event = db_query("SELECT\n     caltime,\n\t caltopic,\n\t calautor,\n\t caltext\n FROM " . $pref . "calendar WHERE calid='{$event}'");
if (db_rows($r_event) == 1) {
    $event = db_result($r_event);
    $data['datum'] = date("d.m.Y (H:i\\U\\h\\r)", $event['caltime']);
    $data['event'] = parse_code($event['caltopic'], 1, 0, 0, $config['eventcode']);
    $data['text'] = parse_code($event['caltext'], 1, 0, $config['eventcode'], $config['eventcode']);
    $data['autor'] = '<a href="s_profile.php?username='******'calautor'] . '" target="_blank">' . $event['calautor'] . '</a>';
} else {
    echo 'Fehler! Kein Event mit dieser ID gefunden.';
}
echo Output(Template($TEvent));
Esempio n. 9
0
<?php

/* $Id: index.php,v 1.1 2003/06/12 13:59:19 master_mario Exp $ */
include 'modhead.inc.php';
echo Output(Template(Get_Template('mod.html')));
tb_footer();
Esempio n. 10
0
         This  program is  free  software;  you can
         redistribute it and/or modify it under the
         terms of the GNU General Public License as
         published by the Free Software Foundation;
         either  version 2 of  the License,  or (at
         your option) any later version.

       ==============================================
*/
include 'inc/header.inc.php';
// nav_path ------------------------------------------
$data['nav_path'] .= '&nbsp;&gt;&gt;&nbsp;Kalender';
// global Templates ----------------------------------
$TBoard = Get_Template('templates/' . $style['styletemplate'] . '/board.html');
$TCal = Get_Template('templates/' . $style['styletemplate'] . '/calendar.html');
// Permissions ---------------------------------------
if (U_ID < 1 && $config['guest_calenda'] == 0) {
    message('Der Kalender wurde vom Administrator f&uuml;r G&auml;ste deaktiviert.', 'Rechte', 0);
}
if ($config['calendar'] == 0) {
    message('Der Kalender wurde vom Administrator deaktiviert.', 'Kalender', 0);
}
// ----------------------------------------------------
$month_array = array(1 => 'Jannuar', 2 => 'Februar', 3 => 'M&auml;rz', 4 => 'April', 5 => 'Mai', 6 => 'Juni', 7 => 'Juli', 8 => 'August', 9 => 'September', 10 => 'Oktober', 11 => 'November', 12 => 'Dezember');
// -----------------------------------------------------
$datum = date("d.m.Y", $board_time);
$data['datum'] = $datum;
$data['month'] = date("m", $board_time);
$data['year'] = date("Y", $board_time);
if (!isset($m)) {
Esempio n. 11
0
         download the latest version:
         https://developer.berlios.de/projects/thwc/

         This  program is  free  software;  you can
         redistribute it and/or modify it under the
         terms of the GNU General Public License as
         published by the Free Software Foundation;
         either  version 2 of  the License,  or (at
         your option) any later version.

       ==============================================
*/
include 'inc/header.inc.php';
include 'inc/bcode.inc.php';
$TBoard = Get_Template('templates/' . $style['styletemplate'] . '/board.html');
$TReport = Get_Template('templates/' . $style['styletemplate'] . '/report.html');
$data['nav_path'] = board_nav($boardid, $threadid, $data['nav_path']) . '&nbsp;&gt;&gt;&nbsp;Melden';
if ($config['report'] == 0) {
    message('Meldungen sind vom Administrator deaktiviert.', 'Rechte', 0);
}
if (U_ID == 0) {
    message('Meldungen k&ouml;nnen nur von registrierten Usern gemacht werden.', 'Rechte', 0);
}
$r_report = db_query("SELECT\n     report_id\n FROM " . $pref . "report WHERE user_id='" . U_ID . "' AND post_id='{$postid}'");
if (db_rows($r_report) > 0) {
    message('Du hast dieses Posting bereits gemeldet.', 'Fehler', 0);
}
$form = 'form';
$textarea = 'text';
$laenge = $config['report_max_len'];
if ($laenge > 1500) {
Esempio n. 12
0
         This  program is  free  software;  you can
         redistribute it and/or modify it under the
         terms of the GNU General Public License as
         published by the Free Software Foundation;
         either  version 2 of  the License,  or (at
         your option) any later version.

       ==============================================
*/
include 'inc/header.inc.php';
// nav_path ------------------------------------------
$data['nav_path'] .= '&nbsp;&gt;&gt;&nbsp;Teampage';
// global Templates ----------------------------------
$TBoard = Get_Template('templates/' . $style['styletemplate'] . '/board.html');
$TTeam = Get_Template('templates/' . $style['styletemplate'] . '/team.html');
$TTeamrow = Get_Template('templates/' . $style['styletemplate'] . '/teamrow.html');
if (U_ID < 1 && $config['guest_team'] == 0) {
    message('Die Teampage ist wurde vom Administrator f&uuml;r G&auml;ste gesperrt.', 'Rechte', 0);
}
$r_team = db_query("SELECT\n     user_name,\n\t user_mail,\n\t user_ismod,\n\t user_isadmin,\n\t user_lastacttime\n FROM " . $pref . "user WHERE user_team='1' ORDER BY user_name");
$teamrows = '';
if (db_rows($r_team) > 0) {
    $i = 0;
    while ($team = db_result($r_team)) {
        $level = '&nbsp;';
        if ($team['user_ismod'] == 1) {
            $level = 'Moderator';
        }
        if ($team['user_isadmin'] == 1) {
            $level = 'Administrator';
        }
Esempio n. 13
0
function replyForm($post, $boardid, $threadid, $postid, $abbonieren, $smi, $code, $method)
{
    global $style, $config, $tagbar;
    $TReply = Get_Template('templates/' . $style['styletemplate'] . '/reply.html');
    $formula = '<form action="reply.php" method="post" name="form">
	  <input type="hidden" name="send" value="1" />';
    switch ($method) {
        case 0:
            $formula .= '<input type="hidden" name="action" value="new" />
			              <input type="hidden" name="boardid" value="' . $boardid . '" />';
            $topic = '<tr><td class="cella">&nbsp;Topic</td>
			 <td class="cellb"><input type="text" size="60" maxlength="' . $config['max_topic_len'] . '" name="new[topic]" id="border-tab" value="' . (isset($post['topic']) ? $post['topic'] : '') . '" /></td></tr>';
            $icon = Get_Template('templates/' . $style['styletemplate'] . '/icon.html');
            $icon = str_replace('[icon_list]', Create_Smillist(isset($post['icon']) ? $post['icon'] : 'fullalpha'), $icon);
            $poll = '';
            $top = 'Neuer Thread';
            if (U_ID == 0) {
                $autor = '<input type="text" name="new[autor]" size="30" maxlength="' . $config['max_usernamelength'] . '" id="border-tab" value="' . (isset($post['aztor']) ? $post['autor'] : '') . '" />';
            } else {
                $autor = '<input type="text" name="new[autor]" size="30" maxlength="' . $config['max_usernamelength'] . '" value="' . U_NAME . '" readonly id="border-tab" />';
            }
            if (isset($post['text'])) {
                $text = $post['text'];
            } else {
                $text = '';
            }
            break;
        case 1:
            $formula .= '<input type="hidden" name="action" value="reply" />
			              <input type="hidden" name="boardid" value="' . $boardid . '" />
						  <input type="hidden" name="threadid" value="' . $threadid . '" />';
            $topic = '';
            $icon = '';
            $poll = '';
            $top = 'Reply';
            if (U_ID == 0) {
                $autor = '<input type="text" name="new[autor]" size="30" maxlength="' . $config['max_usernamelength'] . '" id="border-tab" value="' . (isset($post['aztor']) ? $post['autor'] : '') . '" />';
            } else {
                $autor = '<input type="text" name="new[autor]" size="30" maxlength="' . $config['max_usernamelength'] . '" value="' . U_NAME . '" readonly id="border-tab" />';
            }
            if (isset($post['text'])) {
                $text = $post['text'];
            } else {
                $text = '';
            }
        case 2:
            $formula .= '<input type="hidden" name="action" value="quote" />
			              <input type="hidden" name="boardid" value="' . $boardid . '" />
						  <input type="hidden" name="threadid" value="' . $threadid . '" />
						  <input type="hidden" name="postid" value="' . $postid . '" />
						  <input type="hidden" name="page" value="' . $post['page'] . '" />';
            $topic = '';
            $icon = '';
            $poll = '';
            $top = 'Reply';
            if (U_ID == 0) {
                $autor = '<input type="text" name="new[autor]" size="30" maxlength="' . $config['max_usernamelength'] . '" id="border-tab" value="' . (isset($post['aztor']) ? $post['autor'] : '') . '" />';
            } else {
                $autor = '<input type="text" name="new[autor]" size="30" maxlength="' . $config['max_usernamelength'] . '" value="' . U_NAME . '" readonly id="border-tab" />';
            }
            if (isset($post['text'])) {
                $text = $post['text'];
            } else {
                $text = '';
            }
    }
    switch ($smi) {
        case 0:
            $smilies = 'Aus';
            $smil_yes = '';
            break;
        case 1:
            $smilies = 'An';
            $smil_yes = ' checked';
            if (isset($post['smil'])) {
                if ($post['smil'] == 0) {
                    $smil_yes = '';
                }
            }
    }
    $abbo_yes = '';
    if (isset($post['abbo'])) {
        if ($post['abbo'] == 1) {
            $abbo_yes = ' checked';
        }
    }
    switch ($abbonieren) {
        case 0:
            $mail = 'Aus';
            break;
        case 1:
            $mail = 'An';
    }
    if (isset($post['code'])) {
        $code = $post['code'];
    }
    switch ($code) {
        case 0:
            $bcode_yes = '';
            break;
        case 1:
            $bcode_yes = ' checked';
    }
    $TReply = str_replace('[formula]', $formula, $TReply);
    $TReply = str_replace('[topic]', $topic, $TReply);
    $TReply = str_replace('[icon]', $icon, $TReply);
    $TReply = str_replace('[poll]', $poll, $TReply);
    $TReply = str_replace('[top]', $top, $TReply);
    $TReply = str_replace('[autor]', $autor, $TReply);
    $TReply = str_replace('[tagbar]', $tagbar, $TReply);
    $TReply = str_replace('[text]', $text, $TReply);
    $TReply = str_replace('[smilies]', $smilies, $TReply);
    $TReply = str_replace('[mail]', $mail, $TReply);
    $TReply = str_replace('[abbo_yes]', $abbo_yes, $TReply);
    $TReply = str_replace('[smil_yes]', $smil_yes, $TReply);
    $TReply = str_replace('[bcode_yes]', $bcode_yes, $TReply);
    $TReply = str_replace('[max_len]', $config['max_post_len'], $TReply);
    return $TReply;
}
Esempio n. 14
0
            db_query("UPDATE " . $pref . "user SET\n                 ad_sig='{$adsig}',\n                 ad_time='{$board_time}'\n             WHERE user_id='{$a_admin['user_id']}'");
            $_SESSION['adsig'] = $adsig;
            $_SESSION['userid'] = $a_admin['user_id'];
        }
    }
}
if ($action == 'logout') {
    db_query("UPDATE " . $pref . "user SET\n         ad_sig='',\n         ad_time=''\n     WHERE user_id='{$_SESSION['userid']}'");
    $_SESSION['adsig'] = '';
}
if (!isset($_SESSION['adsig'])) {
    $_SESSION['adsig'] = 0;
}
if (!isset($_SESSION['userid'])) {
    $_SESSION['userid'] = 0;
}
if (sigControl() == 1) {
    $a_admin = db_query("SELECT\n         user_id,\n         user_name,\n         user_isadmin,\n         is_uradmin\n     FROM " . $pref . "user WHERE user_id='{$_SESSION['userid']}'");
    $admin = db_result($a_admin);
} else {
    print Get_Template('login.html');
    exit;
}
// adlog
$basename = basename($HTTP_SERVER_VARS["SCRIPT_NAME"]);
if ($action != '') {
    db_query("INSERT INTO " . $pref . "adlog SET\n         logtime='{$board_time}',\n         loguser='******'user_name']) . "',\n         logip='" . getenv('REMOTE_ADDR') . "',\n         logfile='{$basename}',\n         action='" . addslashes($action) . "'");
}
// create menu
$data['menurows'] = Template(Get_Template('templates/admenu.html'));
Esempio n. 15
0
        }
    }
}
// read styles
$r_style = db_query("SELECT\n     *\n FROM " . $pref . "style WHERE " . $where . " ");
$style = db_result($r_style);
$style['smallfont'] = '<font size="1">';
$style['smallfontend'] = '</font>';
// script basename
$basename = basename($HTTP_SERVER_VARS["SCRIPT_NAME"]);
$data['loginscript'] = $basename;
if ($basename == 'category.php') {
    $data['loginscript'] = $basename . '?catid=' . $catid;
}
if ($basename == 'board.php') {
    $data['loginscript'] = $basename . '?boardid=' . $boardid;
}
if ($basename == 'showtopic.php') {
    $data['loginscript'] = $basename . '?boardid=' . $boardid . '&threadid=' . $threadid;
}
// U_ID == 0 then Logintemplate
if (U_ID == 0) {
    $data['login'] = Template(Get_Template('templates/' . $style['styletemplate'] . '/login.html'));
}
$data['javascript'] = '';
// JUMP ----- if boardid negativ then it is catid
if (isset($boardid)) {
    if ($boardid < 0) {
        message_redirect('Du wirst zur gew&uuml;nschten Kategorie weiter geleitet, bitte warten ...', 'category.php?catid=' . abs($boardid));
    }
}
Esempio n. 16
0
         published by the Free Software Foundation;
         either  version 2 of  the License,  or (at
         your option) any later version.

       ==============================================
*/
include 'inc/header.inc.php';
if (U_ID != 0) {
    if (!isset($_SESSION['newpost'])) {
        setNewposts(U_OLDTIME);
    }
}
$TCatrow = Get_Template('templates/' . $style['styletemplate'] . '/catrow.html');
$TBoardrow = Get_Template('templates/' . $style['styletemplate'] . '/index_b_row.html');
$TIndex = Get_Template('templates/' . $style['styletemplate'] . '/boardtable.html');
$TBoard = Get_Template('templates/' . $style['styletemplate'] . '/board.html');
if ($catid == 0) {
    message('Diese Kategorie gibt es nicht.', 'Fehler', 0);
}
$r_category = db_query("SELECT\n     category_id,\n     category_name,\n     category_is_open\n FROM " . $pref . "category WHERE category_id='{$catid}'");
if (db_rows($r_category) != 1) {
    message('Diese Kategorie gibt es nicht.', 'Fehler', 0);
}
$boards = '';
$a_category = db_result($r_category);
$board_count = 0;
$r_boards = db_query("SELECT\n     board_id,\n     board_name,\n     board_under,\n     last_act_time,\n     last_post_id,\n     last_act_user,\n     last_thread_id,\n     last_act_thread,\n     threads,\n     posts,\n     threads_del,\n     posts_del\n FROM " . $pref . "board WHERE disabled='0' AND category='" . $a_category['category_id'] . "' ORDER BY board_order ASC");
if (db_rows($r_boards) > 0) {
    $category = '';
    while ($board = db_result($r_boards)) {
        $P = boardPermissions(U_GROUPIDS, $board['board_id']);
Esempio n. 17
0
            db_query("UPDATE " . $pref . "user SET\n\t\t\t     pm_new='1',\n\t\t\t\t pm_count='" . ($user['pm_count'] + 1) . "'\n\t\t\t WHERE user_id='{$user['user_id']}'");
            message_redirect('Die Nachricht wurde versand, bitte warten ...', 'pm.php');
        }
    }
} elseif ($action == 'read') {
    $data['nav_path'] .= '&nbsp;&gt;&gt;&nbsp;&Privatnachricht lesen';
    $r_pm = db_query("SELECT\n\t     pm_id,\n\t\t pm_autor,\n\t\t pm_text,\n\t\t pm_empf,\n\t\t pm_time,\n\t\t pm_topic,\n\t\t pm_gelesen,\n\t\t pm_antwort,\n\t\t pm_saved\n\t FROM " . $pref . "pm WHERE pm_id='{$pmid}'");
    if (db_rows($r_pm) != 1) {
        message('Sorry! Es gibt keine PM mit dieser ID.', 'Fehler', 0);
    }
    $pm = db_result($r_pm);
    if ($pm['pm_autor'] != U_NAME && $pm['pm_empf'] != U_NAME) {
        message('Du bist nicht berechtigt diese Nachricht zu lesen.', 'Rechte', 0);
    }
    db_query("UPDATE " . $pref . "pm SET\n\t     pm_gelesen='1'\n\t WHERE pm_id='{$pmid}'");
    $TPm = Get_Template('templates/' . $style['styletemplate'] . '/pm_read.html');
    $TPm = str_replace('[pmid]', $pm['pm_id'], $TPm);
    $TPm = str_replace('[autor]', '<a href="s_profile.php?username='******'pm_autor'] . '">' . $pm['pm_autor'] . '</a>', $TPm);
    $TPm = str_replace('[empf]', '<a href="s_profile.php?username='******'pm_empf'] . '">' . $pm['pm_empf'] . '</a>', $TPm);
    $TPm = str_replace('[datum]', datum($pm['pm_time']), $TPm);
    $TPm = str_replace('[topic]', $pm['pm_topic'], $TPm);
    $TPm = str_replace('[text]', parse_code($pm['pm_text'], 1, 1, 1, $config['smilies']), $TPm);
    // user update
    $r_pm = db_query("SELECT\n\t     COUNT(pm_id)\n\t FROM " . $pref . "pm WHERE pm_empf='" . U_NAME . "' AND pm_gelesen='0'");
    $pm = db_result($r_pm);
    list(, $new) = each($pm);
    db_query("UPDATE " . $pref . "user SET\n\t\t pm_new='" . ($new == 0 ? 0 : 1) . "'\n\t WHERE user_id='" . U_ID . "'");
} elseif ($action == 'delete') {
    if (isset($all)) {
        $r_pm = db_query("SELECT\n\t         pm_id\n\t     FROM " . $pref . "pm WHERE pm_autor='" . U_NAME . "' OR pm_empf='" . U_NAME . "'");
        $pmdel = array();
Esempio n. 18
0
         This  program is  free  software;  you can
         redistribute it and/or modify it under the
         terms of the GNU General Public License as
         published by the Free Software Foundation;
         either  version 2 of  the License,  or (at
         your option) any later version.

       ==============================================
*/
include 'inc/header.inc.php';
// nav_path ------------------------------------------
$data['nav_path'] .= '&nbsp;&gt;&gt;&nbsp;Memberlist';
// global Templates ----------------------------------
$TBoard = Get_Template('templates/' . $style['styletemplate'] . '/board.html');
$TList = Get_Template('templates/' . $style['styletemplate'] . '/memberlist.html');
$TRow = Get_Template('templates/' . $style['styletemplate'] . '/membersrow.html');
// Guest ---------------------------------------------
if (U_ID < 1 && $config['guest_memberlist'] == 0) {
    message('Die Memberlist ist f&uuml;r G&auml;ste deaktiviert.', 'Rechte', 0);
}
// suchoptionen --------------------------------------
if (!isset($method)) {
    $method = 0;
}
switch ($method) {
    case 0:
        $order = "user_name";
        break;
    case 1:
        $order = "user_mail";
        break;
Esempio n. 19
0
        $data['work'] = '<font color="#990000">Kein Style angelegt.</font>';
    } else {
        $data['work'] .= '<a href="style.php?action=publicStyle&styleid=all">Alle als &ouml;ffendlich makieren</a> |
          <a href="style.php?action=publicStyle&styleid=no">Alle als nicht &ouml;ffendlich makieren</a><br /><br />
          <table cellpadding="3" cellspacing="0" border="0">';
        while ($list = db_result($r_list)) {
            $data['work'] .= '<tr>
              <td>' . $list['stylename'] . '</td>
              <td>&nbsp;</td>
              <td><font color="#FF0000">' . ($list['styleisdefault'] == 1 ? '*' : '&nbsp;') . '</font></td>
              <td><font color="#0000FF">' . ($list['styleispublic'] == 1 ? '*' : '&nbsp;') . '</font></td>
              <td>&nbsp;</td>
              <td>
               <a href="style.php?action=editStyle&styleid=' . $list['styleid'] . '">Editieren</a> |
               <a href="style.php?action=deleStyle&styleid=' . $list['styleid'] . '">L&ouml;schen</a> |
               <a href="style.php?action=defaultStyle&styleid=' . $list['styleid'] . '">Als global makieren</a> |
               <a href="style.php?action=exStyle&styleid=' . $list['styleid'] . '">Exportieren</a>
              </td>
             </tr>';
        }
        $data['work'] .= '</table><br /><br />
          <font color="#FF0000">*</font> Globaler Style. Dieser Wird auf der Indexseite und in allen Foren genutzt, es sei denn
          f&uuml;r ein Forum<br />&nbsp;&nbsp; ist ein anderer Style makiert.<br /><br />
          <font color="#0000FF">*</font> &Ouml;ffendlicher Style. Diese Styles k&ouml;nnen vom User im Profil ausgew&auml;hlt werden.<br />
          &nbsp;&nbsp; Dann wird f&uuml;r ihn das gesammte Board mit diesem Style angezeigt.
         ';
    }
}
$data['javascript'] = '';
echo Template(Get_Template('templates/admin.html'));
tb_footer();
Esempio n. 20
0
function message_redirect($msg, $url)
{
    global $style;
    $TRedirect = Get_Template('templates/' . $style['styletemplate'] . '/redirect.html');
    $TRedirect = str_replace('[url]', $url, $TRedirect);
    $TRedirect = str_replace('[msg]', $msg, $TRedirect);
    echo Output($TRedirect);
    exit;
}