|
From: Paul S. O. <ps...@us...> - 2001-11-24 01:51:39
|
Update of /cvsroot/phpbb/phpBB2/admin
In directory usw-pr-cvs1:/tmp/cvs-serv20052/admin
Modified Files:
admin_styles.php admin_disallow.php admin_ranks.php
admin_words.php
Log Message:
Various updates
Index: admin_styles.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/admin/admin_styles.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** admin_styles.php 2001/11/12 11:57:25 1.7
--- admin_styles.php 2001/11/24 01:51:35 1.8
***************
*** 44,48 ****
if($cancel)
{
! header("Location: $PHP_SELF");
}
--- 44,48 ----
if($cancel)
{
! header("Location: admin_styles.$phpEx");
}
[...1553 lines suppressed...]
"ROW_COLOR" => $row_color,
"STYLE_NAME" => $style_rowset[$i]['style_name'],
"TEMPLATE_NAME" => $style_rowset[$i]['template_name'],
!
! "U_STYLES_EDIT" => append_sid("admin_styles.$phpEx?mode=edit&style_id=" . $style_rowset[$i]['themes_id']),
! "U_STYLES_DELETE" => append_sid("admin_styles.$phpEx?mode=delete&style_id=" . $style_rowset[$i]['themes_id']))
! );
}
$template->pparse("body");
! break;
}
! if( !$HTTP_POST_VARS['send_file'] )
{
include('page_footer_admin.'.$phpEx);
}
! ?>
\ No newline at end of file
Index: admin_disallow.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/admin/admin_disallow.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** admin_disallow.php 2001/10/15 20:41:42 1.2
--- admin_disallow.php 2001/11/24 01:51:35 1.3
***************
*** 35,91 ****
require('pagestart.inc');
! //
! // Check to see what mode we shold operate in.
! //
! if( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) )
{
! $mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
! }
! else
! {
! $mode = "";
! }
! $output_info = '';
! switch( $mode )
! {
! case $lang['Delete']:
! $disallowed_id = ( isset($HTTP_POST_VARS['disallowed_id']) ) ? intval( $HTTP_POST_VARS['disallowed_id'] ) : intval( $HTTP_GET_VARS['disallowed_id'] );
!
! $sql = 'DELETE FROM '.DISALLOW_TABLE.' WHERE disallow_id = '.$disallowed_id;
! $result = $db->sql_query($sql);
! if( !$result )
! {
! message_die(GENERAL_ERROR, "Couldn't removed disallowed user.", "",__LINE__, __FILE__, $sql);
! }
! $output_info = $lang['disallowed_deleted'];
! break;
! case $lang['Add']:
! $disallowed_user = ( isset($HTTP_POST_VARS['disallowed_user']) ) ? $HTTP_POST_VARS['disallowed_user'] : $HTTP_GET_VARS['disallowed_user'];
! $disallowed_user = preg_replace( '/\*/', '%', $disallowed_user );
! if( !validate_username( $disallowed_user ) )
! {
! $output_info = $lang['disallowed_already'];
! }
! else
{
! $sql = 'INSERT INTO '.DISALLOW_TABLE."(disallow_username) VALUES('".$disallowed_user."')";
! $result = $db->sql_query( $sql );
! if ( !$result )
! {
! message_die(GENERAL_ERROR, "Could not add disallowed user.", "",__LINE__, __FILE__, $sql);
! }
! $output_info = $lang['disallow_successful'];
}
! break;
}
//
// Grab the current list of disallowed usernames...
//
! $sql = 'SELECT * FROM '.DISALLOW_TABLE;
$result = $db->sql_query($sql);
if( !$result )
{
! message_die( GENERAL_ERROR, "Couldn't get disallowed users.", "", __LINE__, __FILE__, $sql );
}
$disallowed = $db->sql_fetchrowset($result);
--- 35,92 ----
require('pagestart.inc');
! if( isset($HTTP_POST_VARS['add_name']) )
{
! $disallowed_user = ( isset($HTTP_POST_VARS['disallowed_user']) ) ? $HTTP_POST_VARS['disallowed_user'] : $HTTP_GET_VARS['disallowed_user'];
! $disallowed_user = preg_replace( '/\*/', '%', $disallowed_user );
!
! if( !validate_username($disallowed_user) )
! {
! $message = $lang['Disallowed_already'];
! }
! else
! {
! $sql = "INSERT INTO " . DISALLOW_TABLE . " (disallow_username)
! VALUES('" . $disallowed_user . "')";
! $result = $db->sql_query( $sql );
! if ( !$result )
{
! message_die(GENERAL_ERROR, "Could not add disallowed user.", "",__LINE__, __FILE__, $sql);
}
! $message = $lang['Disallow_successful'];
! }
!
! $message .= "<br /><br />" . sprintf($lang['Click_return_disallowadmin'], "<a href=\"" . append_sid("admin_disallow.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
!
! message_die(GENERAL_MESSAGE, $message);
! }
! else if( isset($HTTP_POST_VARS['delete_name']) )
! {
! $disallowed_id = ( isset($HTTP_POST_VARS['disallowed_id']) ) ? intval( $HTTP_POST_VARS['disallowed_id'] ) : intval( $HTTP_GET_VARS['disallowed_id'] );
!
! $sql = "DELETE FROM " . DISALLOW_TABLE . "
! WHERE disallow_id = $disallowed_id";
! $result = $db->sql_query($sql);
! if( !$result )
! {
! message_die(GENERAL_ERROR, "Couldn't removed disallowed user.", "",__LINE__, __FILE__, $sql);
! }
!
! $message .= $lang['Disallowed_deleted'] . "<br /><br />" . sprintf($lang['Click_return_disallowadmin'], "<a href=\"" . append_sid("admin_disallow.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
!
! message_die(GENERAL_MESSAGE, $message);
!
}
+
//
// Grab the current list of disallowed usernames...
//
! $sql = "SELECT *
! FROM " . DISALLOW_TABLE;
$result = $db->sql_query($sql);
if( !$result )
{
! message_die(GENERAL_ERROR, "Couldn't get disallowed users.", "", __LINE__, __FILE__, $sql );
}
+
$disallowed = $db->sql_fetchrowset($result);
***************
*** 94,131 ****
// what mode we are in.
//
! $disallow_select = "<SELECT NAME=\"disallowed_id\">";
! if ( trim($disallowed) == '' )
{
! $disallow_select .= '<option value="">'.$lang['no_disallowed'].'</option>';
}
else
{
- $disallow_select .= "<OPTION value=\"\">".$lang['Select'].' '.$lang['Username']."</OPTION>";
$user = array();
for( $i = 0; $i < count($disallowed); $i++ )
{
! $disallowed[$i]['disallow_username'] = preg_replace( '/%/', '*', $disallowed[$i]['disallow_username']);
! $disallow_select .= '<option value="'.$disallowed[$i]['disallow_id'].'">'.$disallowed[$i]['disallow_username'].'</option>';
}
}
! $disallow_select .= '</SELECT>';
$template->set_filenames(array(
"body" => "admin/disallow_body.tpl")
);
$template->assign_vars(array(
"S_DISALLOW_SELECT" => $disallow_select,
"L_INFO" => $output_info,
"L_DISALLOW_TITLE" => $lang['Disallow_control'],
! "L_DELETE" => $lang['Delete'],
! "L_ADD" => $lang['Add'],
! "L_RESET" => $lang['Reset'],
! "S_FORM_ACTION" => append_sid('admin_disallow.php'),
! "L_EXPLAIN" => $lang['disallow_instructs'],
! "L_DEL_DISALLOW" => $lang['del_disallow'],
! "L_DEL_EXPLAIN" => $lang['del_disallow_explain'],
! "L_ADD_DISALLOW" => $lang['add_disallow'],
! "L_ADD_EXPLAIN" => $lang['add_disallow_explain'],
"L_USERNAME" => $lang['Username'])
);
$template->pparse("body");
! ?>
--- 95,138 ----
// what mode we are in.
//
! $disallow_select = '<select name="disallowed_id">';
!
! if( trim($disallowed) == "" )
{
! $disallow_select .= '<option value="">' . $lang['no_disallowed'] . '</option>';
}
else
{
$user = array();
for( $i = 0; $i < count($disallowed); $i++ )
{
! $disallowed[$i]['disallow_username'] = preg_replace('/%/', '*', $disallowed[$i]['disallow_username']);
!
! $disallow_select .= '<option value="' . $disallowed[$i]['disallow_id'] . '">' . $disallowed[$i]['disallow_username'] . '</option>';
}
}
!
! $disallow_select .= '</select>';
!
$template->set_filenames(array(
"body" => "admin/disallow_body.tpl")
);
+
$template->assign_vars(array(
"S_DISALLOW_SELECT" => $disallow_select,
+ "S_FORM_ACTION" => append_sid('admin_disallow.php'),
+
"L_INFO" => $output_info,
"L_DISALLOW_TITLE" => $lang['Disallow_control'],
! "L_DISALLOW_EXPLAIN" => $lang['Disallow_explain'],
! "L_DELETE" => $lang['Delete_disallow'],
! "L_DELETE_DISALLOW" => $lang['Delete_disallow_title'],
! "L_DELETE_EXPLAIN" => $lang['Delete_disallow_explain'],
! "L_ADD" => $lang['Add_disallow'],
! "L_ADD_DISALLOW" => $lang['Add_disallow_title'],
! "L_ADD_EXPLAIN" => $lang['Add_disallow_explain'],
"L_USERNAME" => $lang['Username'])
);
+
$template->pparse("body");
!
! ?>
\ No newline at end of file
Index: admin_ranks.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/admin/admin_ranks.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** admin_ranks.php 2001/11/21 03:10:10 1.4
--- admin_ranks.php 2001/11/24 01:51:35 1.5
***************
*** 32,36 ****
//
$phpbb_root_dir = "./../";
! $no_page_header = TRUE;
require('pagestart.inc');
--- 32,36 ----
//
$phpbb_root_dir = "./../";
!
require('pagestart.inc');
***************
*** 67,72 ****
// They want to add a new rank, show the form.
//
- include('page_header_admin.' . $phpEx);
-
$rank_id = ( isset($HTTP_GET_VARS['id']) ) ? intval($HTTP_GET_VARS['id']) : 0;
--- 67,70 ----
***************
*** 143,147 ****
$max_posts = ( isset($HTTP_POST_VARS['max_posts']) ) ? intval($HTTP_POST_VARS['max_posts']) : -1;
$min_posts = ( isset($HTTP_POST_VARS['min_posts']) ) ? intval($HTTP_POST_VARS['min_posts']) : -1;
! $rank_image = ( (isset($HTTP_POST_VARS['rank_image'])) || $HTTP_POST_VARS['rank_image'] != "http://" ) ? $HTTP_POST_VARS['rank_image'] : "";
if( $rank_title == "" )
--- 141,145 ----
$max_posts = ( isset($HTTP_POST_VARS['max_posts']) ) ? intval($HTTP_POST_VARS['max_posts']) : -1;
$min_posts = ( isset($HTTP_POST_VARS['min_posts']) ) ? intval($HTTP_POST_VARS['min_posts']) : -1;
! $rank_image = ( (isset($HTTP_POST_VARS['rank_image'])) ) ? $HTTP_POST_VARS['rank_image'] : "";
if( $rank_title == "" )
***************
*** 177,180 ****
--- 175,179 ----
rank_image = '$rank_image'
WHERE rank_id = $rank_id";
+
$message = $lang['Rank_updated'];
}
***************
*** 185,188 ****
--- 184,188 ----
VALUES
('$rank_title', '$special_rank', '$max_posts', '$min_posts', '$rank_image')";
+
$message = $lang['Rank_added'];
}
***************
*** 193,200 ****
}
! $template->assign_vars(array(
! "META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("admin_ranks.$phpEx") . '">')
! );
! $message .= "<br />" . sprintf($lang['return_rank_admin'], "<a href=\"" . append_sid("admin_ranks.$phpEx") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
--- 193,198 ----
}
! $message .= "<br /><br />" . sprintf($lang['Click_return_rankadmin'], "<a href=\"" . append_sid("admin_ranks.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
!
message_die(GENERAL_MESSAGE, $message);
***************
*** 225,233 ****
}
! $template->assign_vars(array(
! "META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("admin_ranks.$phpEx") . '">')
! );
! $message = $lang['Rank_removed'];
! $message .= "<br />" . sprintf($lang['return_rank_admin'], "<a href=\"" . append_sid("admin_ranks.$phpEx") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
--- 223,228 ----
}
! $message .= "<br /><br />" . sprintf($lang['Click_return_rankadmin'], "<a href=\"" . append_sid("admin_ranks.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
!
message_die(GENERAL_MESSAGE, $message);
***************
*** 235,241 ****
else
{
- $template->assign_vars(array(
- "META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("admin_ranks.$phpEx") . '">')
- );
message_die(GENERAL_MESSAGE, $lang['Must_select_rank']);
}
--- 230,233 ----
***************
*** 246,251 ****
// They didn't feel like giving us any information. Oh, too bad, we'll just display the
// list then...
! include('page_header_admin.' . $phpEx);
!
$template->set_filenames(array(
"body" => "admin/ranks_list_body.tpl")
--- 238,242 ----
// They didn't feel like giving us any information. Oh, too bad, we'll just display the
// list then...
! //
$template->set_filenames(array(
"body" => "admin/ranks_list_body.tpl")
***************
*** 289,293 ****
$rank_min = $rank_max = "-";
}
-
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
--- 280,283 ----
***************
*** 314,319 ****
// Show the default page
//
- include('page_header_admin.' . $phpEx);
-
$template->set_filenames(array(
"body" => "admin/ranks_list_body.tpl")
--- 304,307 ----
***************
*** 360,364 ****
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
! $rank_is_special = ( $special_rank == 1 ) ? $lang['Yes'] : $lang['No'];
$template->assign_block_vars("ranks", array(
--- 348,353 ----
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
!
! $rank_is_special = ( $special_rank ) ? $lang['Yes'] : $lang['No'];
$template->assign_block_vars("ranks", array(
***************
*** 380,382 ****
include('page_footer_admin.'.$phpEx);
! ?>
--- 369,371 ----
include('page_footer_admin.'.$phpEx);
! ?>
\ No newline at end of file
Index: admin_words.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/admin/admin_words.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** admin_words.php 2001/10/14 15:46:53 1.5
--- admin_words.php 2001/11/24 01:51:35 1.6
***************
*** 24,28 ****
{
$file = basename(__FILE__);
! $module['General']['Word Censor'] = "$file";
return;
}
--- 24,28 ----
{
$file = basename(__FILE__);
! $module['General']['Word_Censor'] = "$file";
return;
}
***************
*** 96,100 ****
"L_WORDS_TITLE" => $lang['Words_title'],
"L_WORDS_TEXT" => $lang['Words_explain'],
! "L_WORD_CENSOR" => $lang['Word_censor'],
"L_WORD" => $lang['Word'],
"L_REPLACEMENT" => $lang['Replacement'],
--- 96,100 ----
"L_WORDS_TITLE" => $lang['Words_title'],
"L_WORDS_TEXT" => $lang['Words_explain'],
! "L_WORD_CENSOR" => $lang['Edit_word_censor'],
"L_WORD" => $lang['Word'],
"L_REPLACEMENT" => $lang['Replacement'],
***************
*** 125,129 ****
SET word = '$word', replacement = '$replacement'
WHERE word_id = $word_id";
! $message_success = $lang['Word_updated'];
}
else
--- 125,129 ----
SET word = '$word', replacement = '$replacement'
WHERE word_id = $word_id";
! $message = $lang['Word_updated'];
}
else
***************
*** 131,135 ****
$sql = "INSERT INTO " . WORDS_TABLE . " (word, replacement)
VALUES ('$word', '$replacement')";
! $message_success = $lang['Word_added'];
}
--- 131,135 ----
$sql = "INSERT INTO " . WORDS_TABLE . " (word, replacement)
VALUES ('$word', '$replacement')";
! $message = $lang['Word_added'];
}
***************
*** 138,145 ****
message_die(GENERAL_ERROR, "Could not insert data into words table", $lang['Error'], __LINE__, __FILE__, $sql);
}
! else
! {
! message_die(GENERAL_MESSAGE, $message_success);
! }
}
else if( $mode == "delete" )
--- 138,145 ----
message_die(GENERAL_ERROR, "Could not insert data into words table", $lang['Error'], __LINE__, __FILE__, $sql);
}
!
! $message .= "<br /><br />" . sprintf($lang['Click_return_wordadmin'], "<a href=\"" . append_sid("admin_words.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
!
! message_die(GENERAL_MESSAGE, $message);
}
else if( $mode == "delete" )
***************
*** 163,170 ****
message_die(GENERAL_ERROR, "Could not remove data from words table", $lang['Error'], __LINE__, __FILE__, $sql);
}
! else
! {
! message_die(GENERAL_MESSAGE, $lang['Word_removed']);
! }
}
else
--- 163,170 ----
message_die(GENERAL_ERROR, "Could not remove data from words table", $lang['Error'], __LINE__, __FILE__, $sql);
}
!
! $message = $lang['Word_removed'] . "<br /><br />" . sprintf($lang['Click_return_wordadmin'], "<a href=\"" . append_sid("admin_words.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
!
! message_die(GENERAL_MESSAGE, $message);
}
else
***************
*** 219,224 ****
"WORD" => $word,
"REPLACEMENT" => $replacement,
! "U_WORD_EDIT" => append_sid("admin_words.$phpEx?mode=edit&id=$word_id"),
! "U_WORD_DELETE" => append_sid("admin_words.$phpEx?mode=delete&id=$word_id"))
);
}
--- 219,225 ----
"WORD" => $word,
"REPLACEMENT" => $replacement,
!
! "U_WORD_EDIT" => append_sid("admin_words.$phpEx?mode=edit&id=$word_id"),
! "U_WORD_DELETE" => append_sid("admin_words.$phpEx?mode=delete&id=$word_id"))
);
}
|