Seite 1 von 1
BanList MOD Fehlerhaft?!
Verfasst: 21.04.2005 11:40
von kleinermuuk
Ein sehr kleiner MOD der aber irgendwie fehlerhaft ist
http://www.phpbbhacks.com/download/1061
könnte ihn jemand mal checken?!
So sieht er momentan bei mir aus:
Mein Banlistmod fehler
danke schonmal im vorraus ....ich hoffe es wird der/ein fehler gefunden!
Verfasst: 21.04.2005 13:22
von Mario Siebert
Was genau ist denn Fehlerhaft? Ich habe ihn gerade eingebaut und er läuft einwandfrei auch bei dir auf der Site kann ich keinen Fehler entdecken
Grüße Mario
Verfasst: 21.04.2005 20:50
von kleinermuuk
Mario Siebert hat geschrieben:Was genau ist denn Fehlerhaft? Ich habe ihn gerade eingebaut und er läuft einwandfrei auch bei dir auf der Site kann ich keinen Fehler entdecken
Grüße Mario
Der Grund lässt sich nicht eintragen ...das mySQL feld dafür bleibt immer leer ...
Und bei datum/zeit siehste ja wohl auch die komischen sonderzeichen !!
Verfasst: 25.06.2005 01:22
von BIG Mule
Hi,
Im Forum von phpbbhacks wurde eine überarbeitete banlist.php hinzugefügt. Hier ist sie.
Code: Alles auswählen
<?php
/***************************************************************************
* banlist.php
* -------------------
* begin : Wensday, Feb 11, 2003
* copyright : (C) 2003 ThE DrAgOn'S
* email : orna_h@012.net.il
*
* $Id: banlist.php,v 1.36.2.2 2002/07/29 05:04:03 dougk_ff7 Exp $
*
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_VIEWMEMBERS);
init_userprefs($userdata);
//
// End session management
//
$start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;
//
// Generate page
//
$page_title = $lang['Ban'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
'body' => 'banlist_body.tpl')
);
make_jumpbox('viewforum.'.$phpEx);
$order_by = "ban_id DESC LIMIT $start, " . $board_config['topics_per_page'];
$sql = "SELECT ban_userid,user_name,reason,baned_by,date,time
FROM " . BANLIST_TABLE . "
WHERE ban_userid <> 0
ORDER BY $order_by";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query users', '', __LINE__, __FILE__, $sql);
}
if ( $row = $db->sql_fetchrow($result) )
{
$i = 0;
do
{
if($row['reason']=="")
$reason = "no reason was enter to this ban";
else
$reason = $row['reason'];
$by=$row['baned_by'];
$in = "Date: ".$row['date']."<br>Time: ".$row['time'];
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
$tmp=mysql_result(mysql_query("SELECT user_id FROM phpbb_users WHERE username='$by'"),0);
print $user_name;
$template->assign_block_vars('memberrow', array(
'ROW_NUMBER' => $i + ( $HTTP_GET_VARS['start'] + 1 ),
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'USERNAME' => $row['user_name'],
'BY' => $by,
'IN' => $in,
'REASON' => $reason,
'U_VIEWPROFILE2' => append_sid("profile.$phpEx?mode=viewprofile&".POST_USERS_URL."=".$tmp),
'U_VIEWPROFILE' => append_sid("profile.$phpEx?mode=viewprofile&".POST_USERS_URL."=".$row['ban_userid']))
);
$i++;
}
while ( $row = $db->sql_fetchrow($result) );
}
if ( $mode != 'topten' || $board_config['topics_per_page'] < 10 )
{
$sql = "SELECT count(*) AS total
FROM " . BANLIST_TABLE . "
WHERE ban_userid <> 0";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Error getting total users', '', __LINE__, __FILE__, $sql);
}
if ( $total = $db->sql_fetchrow($result) )
{
$total_members = $total['total'];
$pagination = generate_pagination("banlist.$phpEx?mode=$mode&order=$sort_order", $total_bans, $board_config['topics_per_page'], $start). '&';
}
}
else
{
$pagination = '&';
$total_members = 10;
}
$template->assign_vars(array(
'PAGINATION' => $pagination,
'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), ceil( $total_members / $board_config['topics_per_page'] )),
'L_GOTO_PAGE' => $lang['Goto_page'])
);
$template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
Translated to English, and bugfixed.