diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-08-03 23:52:33 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-08-03 23:52:33 +0000 |
commit | ca716517676cff9e66ebd301bf771891d0cb0962 (patch) | |
tree | 17560847b65989326f26d395f4b4aa363f4e4053 /phpBB/admin/admin_words.php | |
parent | 66295f4bdae6eb6c0dd2f6d165d0faf3f9d7f10d (diff) | |
download | forums-ca716517676cff9e66ebd301bf771891d0cb0962.tar forums-ca716517676cff9e66ebd301bf771891d0cb0962.tar.gz forums-ca716517676cff9e66ebd301bf771891d0cb0962.tar.bz2 forums-ca716517676cff9e66ebd301bf771891d0cb0962.tar.xz forums-ca716517676cff9e66ebd301bf771891d0cb0962.zip |
Various updates
git-svn-id: file:///svn/phpbb/trunk@2816 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/admin/admin_words.php')
-rw-r--r-- | phpBB/admin/admin_words.php | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/phpBB/admin/admin_words.php b/phpBB/admin/admin_words.php index b71885a464..384c83fd3c 100644 --- a/phpBB/admin/admin_words.php +++ b/phpBB/admin/admin_words.php @@ -79,7 +79,7 @@ if( $mode != '' ) { case 'edit': case 'add': - $word_id = ( isset($HTTP_GET_VARS['id']) ) ? $HTTP_GET_VARS['id'] : 0; + $word_id = ( isset($HTTP_GET_VARS['id']) ) ? intval($HTTP_GET_VARS['id']) : 0; $s_hidden_fields = ''; if ( $mode == 'edit' ) @@ -98,7 +98,7 @@ if( $mode != '' ) $s_hidden_fields .= '<input type="hidden" name="id" value="' . $word_id . '" />'; } - page_header($lang['General']); + page_header($lang['Words_title']); ?> @@ -106,7 +106,7 @@ if( $mode != '' ) <p><?php echo $lang['Words_explain']; ?></p> -<form method="post" action="<?php echo "admin_words.$phpEx$SID"; ?>"><table cellspacing="1" cellpadding="4" border="0" align="center" bgcolor="#98AAB1"> +<form method="post" action="<?php echo "admin_words.$phpEx$SID"; ?>"><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center"> <tr> <th colspan="2"><?php echo $lang['Edit_word_censor']; ?></th> </tr> @@ -128,7 +128,7 @@ if( $mode != '' ) break; case 'save': - $word_id = ( isset($HTTP_POST_VARS['id']) ) ? $HTTP_POST_VARS['id'] : 0; + $word_id = ( isset($HTTP_POST_VARS['id']) ) ? intval($HTTP_POST_VARS['id']) : 0; $word = ( isset($HTTP_POST_VARS['word']) ) ? trim($HTTP_POST_VARS['word']) : ''; $replacement = ( isset($HTTP_POST_VARS['replacement']) ) ? trim($HTTP_POST_VARS['replacement']) : ''; @@ -144,8 +144,6 @@ if( $mode != '' ) add_admin_log($log_action, stripslashes($word)); $message = ( $word_id ) ? $lang['Word_updated'] : $lang['Word_added']; - $message .= '<br /><br />' . sprintf($lang['Click_return_wordadmin'], '<a href="' . "admin_words.$phpEx$SID" . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . "index.$phpEx$SID&pane=right" . '">', '</a>'); - message_die(MESSAGE, $message); break; @@ -153,7 +151,7 @@ if( $mode != '' ) if ( isset($HTTP_POST_VARS['id']) || isset($HTTP_GET_VARS['id']) ) { - $word_id = ( isset($HTTP_POST_VARS['id']) ) ? $HTTP_POST_VARS['id'] : $HTTP_GET_VARS['id']; + $word_id = ( isset($HTTP_POST_VARS['id']) ) ? intval($HTTP_POST_VARS['id']) : intval($HTTP_GET_VARS['id']); } else { @@ -166,9 +164,7 @@ if( $mode != '' ) add_admin_log('log_delete_word'); - $message = $lang['Word_removed'] . '<br /><br />' . sprintf($lang['Click_return_wordadmin'], '<a href="' . "admin_words.$phpEx$SID" . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . "index.$phpEx$SID&pane=right" . '">', '</a>'); - - message_die(MESSAGE, $message); + message_die(MESSAGE, $lang['Word_removed']); break; } @@ -176,7 +172,7 @@ if( $mode != '' ) else { - page_header($lang['General']); + page_header($lang['Words_title']); ?> @@ -184,7 +180,7 @@ else <p><?php echo $lang['Words_explain']; ?></p> -<form method="post" action="<?php echo "admin_words.$phpEx$SID"; ?>"><table cellspacing="1" cellpadding="4" border="0" align="center" bgcolor="#98AAB1"> +<form method="post" action="<?php echo "admin_words.$phpEx$SID"; ?>"><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center"> <tr> <th><?php echo $lang['Word']; ?></th> <th><?php echo $lang['Replacement']; ?></th> @@ -202,14 +198,14 @@ else { do { - $cell_bg = ( $cell_bg == 'row1' ) ? 'row2' : 'row1'; + $row_class = ( $row_class == 'row1' ) ? 'row2' : 'row1'; ?> <tr> - <td class="<?php echo $cell_bg; ?>" align="center"><?php echo $row['word']; ?></td> - <td class="<?php echo $cell_bg; ?>" align="center"><?php echo $row['replacement']; ?></td> - <td class="<?php echo $cell_bg; ?>"> <a href="<?php echo "admin_words.$phpEx$SID&mode=edit&id=" . $row['word_id']; ?>"><?php echo $lang['Edit']; ?></a> </td> - <td class="<?php echo $cell_bg; ?>"> <a href="<?php echo "admin_words.$phpEx$SID&mode=delete&id=" . $row['word_id']; ?>"><?php echo $lang['Delete']; ?></a> </td> + <td class="<?php echo $row_class; ?>" align="center"><?php echo $row['word']; ?></td> + <td class="<?php echo $row_class; ?>" align="center"><?php echo $row['replacement']; ?></td> + <td class="<?php echo $row_class; ?>"> <a href="<?php echo "admin_words.$phpEx$SID&mode=edit&id=" . $row['word_id']; ?>"><?php echo $lang['Edit']; ?></a> </td> + <td class="<?php echo $row_class; ?>"> <a href="<?php echo "admin_words.$phpEx$SID&mode=delete&id=" . $row['word_id']; ?>"><?php echo $lang['Delete']; ?></a> </td> </tr> <?php |