diff --git a/phpBB/admin/admin_board.php b/phpBB/admin/admin_board.php index 5cb3ad51f9..432d39a9f8 100644 --- a/phpBB/admin/admin_board.php +++ b/phpBB/admin/admin_board.php @@ -37,7 +37,7 @@ define('IN_PHPBB', 1); $phpbb_root_path = '../'; require($phpbb_root_path . 'extension.inc'); require('pagestart.' . $phpEx); -require($phpbb_root_path . 'includes/functions_admin.' . $phpEx); +require_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx); // Get mode $mode = (isset($_REQUEST['mode'])) ? $_REQUEST['mode'] : ''; @@ -168,15 +168,15 @@ switch ($mode) ?> lang['Allow_local']; ?>: - /> lang['Yes']; ?>   /> lang['No']; ?> + /> lang['YES']; ?>   /> lang['NO']; ?> lang['Allow_remote']; ?>:
lang['Allow_remote_explain']; ?> - /> lang['Yes']; ?>   /> lang['No']; ?> + /> lang['YES']; ?>   /> lang['NO']; ?> lang['Allow_upload']; ?>: - /> lang['Yes']; ?>   /> lang['No']; ?> + /> lang['YES']; ?>   /> lang['NO']; ?> lang['Max_filesize']; ?>:
lang['Max_filesize_explain']; ?> @@ -235,7 +235,7 @@ switch ($mode) lang['Override_style']; ?>:
lang['Override_style_explain']; ?> - /> lang['Yes']; ?>   /> lang['No']; ?> + /> lang['YES']; ?>   /> lang['NO']; ?> lang['Default_language']; ?>: @@ -259,19 +259,19 @@ switch ($mode) lang['Allow_topic_notify']; ?>: - /> lang['Yes']; ?>   /> lang['No']; ?> + /> lang['YES']; ?>   /> lang['NO']; ?> lang['Allow_forum_notify']; ?>: - /> lang['Yes']; ?>   /> lang['No']; ?> + /> lang['YES']; ?>   /> lang['NO']; ?> lang['Allow_name_change']; ?>: - /> lang['Yes']; ?>   /> lang['No']; ?> + /> lang['YES']; ?>   /> lang['NO']; ?> lang['Allow_HTML']; ?>: - /> lang['Yes']; ?>   /> lang['No']; ?> + /> lang['YES']; ?>   /> lang['NO']; ?> lang['Allowed_tags']; ?>:
lang['Allowed_tags_explain']; ?> @@ -279,15 +279,15 @@ switch ($mode) lang['Allow_BBCode']; ?>: - /> lang['Yes']; ?>   /> lang['No']; ?> + /> lang['YES']; ?>   /> lang['NO']; ?> lang['Allow_smilies']; ?>: - /> lang['Yes']; ?>   /> lang['No']; ?> + /> lang['YES']; ?>   /> lang['NO']; ?> lang['Allow_sig']; ?>: - /> lang['Yes']; ?>   /> lang['No']; ?> + /> lang['YES']; ?>   /> lang['NO']; ?> lang['Max_sig_length']; ?>:
lang['Max_sig_length_explain']; ?> @@ -327,11 +327,11 @@ switch ($mode) lang['Board_disable']; ?>:
lang['Board_disable_explain']; ?> - /> lang['Yes']; ?>   /> lang['No']; ?>
+ /> lang['YES']; ?>   /> lang['NO']; ?>
lang['Enable_prune']; ?>: - /> lang['Yes']; ?>   /> lang['No']; ?> + /> lang['YES']; ?>   /> lang['NO']; ?> lang['Acct_activation']; ?>:
lang['Acct_activation_explain']; ?> @@ -339,7 +339,7 @@ switch ($mode) lang['Enable_COPPA']; ?>:
lang['Enable_COPPA_explain']; ?> - /> lang['Yes']; ?>   /> lang['No']; ?> + /> lang['YES']; ?>   /> lang['NO']; ?> lang['COPPA_fax']; ?>: @@ -427,7 +427,7 @@ switch ($mode) lang['Use_SMTP']; ?>:
lang['Use_SMTP_explain']; ?> - /> lang['Yes']; ?>   /> lang['No']; ?> + /> lang['YES']; ?>   /> lang['NO']; ?> lang['SMTP_server']; ?>: @@ -485,7 +485,7 @@ switch ($mode) lang['Enable_gzip']; ?>: - /> lang['Yes']; ?>   /> lang['No']; ?> + /> lang['YES']; ?>   /> lang['NO']; ?> lang['Smilies_path']; ?>:
lang['Smilies_path_explain']; ?> @@ -561,7 +561,7 @@ switch ($mode) ?> -    +    diff --git a/phpBB/admin/admin_database.php b/phpBB/admin/admin_database.php index 812e1050db..b23a402a90 100644 --- a/phpBB/admin/admin_database.php +++ b/phpBB/admin/admin_database.php @@ -38,7 +38,7 @@ define('IN_PHPBB', 1); $phpbb_root_path = '../'; require($phpbb_root_path . 'extension.inc'); require('pagestart.' . $phpEx); -include($phpbb_root_path . 'includes/functions_admin.'.$phpEx); +require_once($phpbb_root_path . 'includes/functions_admin.'.$phpEx); $mode = (isset($_GET['mode'])) ? $_GET['mode'] : ''; diff --git a/phpBB/admin/admin_forums.php b/phpBB/admin/admin_forums.php index 8f4b13d99f..6677862980 100644 --- a/phpBB/admin/admin_forums.php +++ b/phpBB/admin/admin_forums.php @@ -35,7 +35,7 @@ define('IN_PHPBB', 1); $phpbb_root_path = '../'; require($phpbb_root_path . 'extension.inc'); require('pagestart.' . $phpEx); -include($phpbb_root_path . 'includes/functions_admin.'.$phpEx); +require_once($phpbb_root_path . 'includes/functions_admin.'.$phpEx); // Get mode $mode = (isset($_REQUEST['mode'])) ? $_REQUEST['mode'] : ''; diff --git a/phpBB/admin/admin_permissions.php b/phpBB/admin/admin_permissions.php index ca51affd7e..8d13d151a1 100644 --- a/phpBB/admin/admin_permissions.php +++ b/phpBB/admin/admin_permissions.php @@ -36,7 +36,7 @@ define('IN_PHPBB', 1); $phpbb_root_path = '../'; require($phpbb_root_path . 'extension.inc'); require('pagestart.' . $phpEx); -require($phpbb_root_path . 'includes/functions_admin.'.$phpEx); +require_once($phpbb_root_path . 'includes/functions_admin.'.$phpEx); // Define some vars if (isset($_REQUEST['f'])) diff --git a/phpBB/admin/admin_prune.php b/phpBB/admin/admin_prune.php index 8ad2806569..99fd26afe9 100644 --- a/phpBB/admin/admin_prune.php +++ b/phpBB/admin/admin_prune.php @@ -36,7 +36,7 @@ define('IN_PHPBB', 1); $phpbb_root_path = '../'; require($phpbb_root_path . 'extension.inc'); require('pagestart.' . $phpEx); -require($phpbb_root_path . 'includes/functions_admin.'.$phpEx); +require_once($phpbb_root_path . 'includes/functions_admin.'.$phpEx); // Do we have permission? if (!$auth->acl_get('a_prune')) diff --git a/phpBB/admin/admin_styles.php b/phpBB/admin/admin_styles.php index b2c1c873e3..102c7f199b 100644 --- a/phpBB/admin/admin_styles.php +++ b/phpBB/admin/admin_styles.php @@ -17,28 +17,24 @@ if ( !empty($setmodules) ) } define('IN_PHPBB', 1); -// // Include files -// $phpbb_root_path = '../'; require($phpbb_root_path . 'extension.inc'); require('pagestart.' . $phpEx); -// // Do we have styles admin permissions? -// -if ( !$auth->acl_get('a_styles') ) +if (!$auth->acl_get('a_styles')) { - message_die(MESSAGE, $user->lang['No_admin']); + trigger_error($user->lang['No_admin']); } /* $dp = opendir($phpbb_root_path . 'templates/cache/'); -while ( $file = readdir($dp) ) +while ($file = readdir($dp)) { - if ( !is_file($phpbb_root_path . 'templates/cache/' . $file) && !is_link($phpbb_root_path . 'templates/cache/' . $file) && $file != '.' && $file != '..' ) + if (!is_file($phpbb_root_path . 'templates/cache/' . $file) && !is_link($phpbb_root_path . 'templates/cache/' . $file) && $file != '.' && $file != '..') { - $selected = ( $tplroot == $file ) ? ' selected="selected"' : ''; + $selected = ($tplroot == $file) ? ' selected="selected"' : ''; $tplroot_options .= ''; } } @@ -46,19 +42,17 @@ closedir($dp); */ // -// -// -$mode = ( isset($_GET['mode']) ) ? $_GET['mode'] : $_POST['mode']; +$mode = (isset($_GET['mode'])) ? $_GET['mode'] : $_POST['mode']; -switch ( $mode ) +switch ($mode) { case 'editimageset': - $imgroot = ( isset($_POST['imgroot']) ) ? $_POST['imgroot'] : $config['default_style']; + $imgroot = (isset($_POST['imgroot'])) ? $_POST['imgroot'] : $config['default_style']; - if ( isset($_POST['img_addconfig']) ) + if (isset($_POST['img_addconfig'])) { } - else if ( isset($_POST['img_addlocal']) ) + else if (isset($_POST['img_addlocal'])) { } @@ -70,27 +64,25 @@ switch ( $mode ) $result = $db->sql_query($sql); $imgroot_options = ''; - while ( $row = $db->sql_fetchrow($result) ) + while ($row = $db->sql_fetchrow($result)) { - $selected = ( $imgroot == $row['imageset_path'] ) ? ' selected="selected"' : ''; + $selected = ($imgroot == $row['imageset_path']) ? ' selected="selected"' : ''; $imgroot_options .= ''; } $imgname_options = ''; $dp = opendir($phpbb_root_path . 'imagesets/' . $imgroot . '/'); - while ( $file = readdir($dp) ) + while ($file = readdir($dp)) { - if ( preg_match('#\.(gif|png|jpg|jpeg)$#', $file) && is_file($phpbb_root_path . 'imagesets/' . $imgroot . '/' . $file) ) + if (preg_match('#\.(gif|png|jpg|jpeg)$#', $file) && is_file($phpbb_root_path . 'imagesets/' . $imgroot . '/' . $file)) { - $selected = ( $imgname == $file ) ? ' selected="selected"' : ''; + $selected = ($imgname == $file) ? ' selected="selected"' : ''; $imgname_options .= ''; } } closedir($dp); - // // Output page - // page_header($user->lang['Edit_Imageset']); ?> @@ -105,7 +97,7 @@ switch ( $mode ) ' : ''; + $img = (!empty($images[$imageset[$i]])) ? '' : ''; $img = str_replace('"imagesets/', '"../imagesets/', $img); $img = str_replace('{LANG}', $user->img_lang, $img); $img = str_replace('{RATE}', 3, $img); @@ -155,13 +147,13 @@ switch ( $mode ) case 'edittemplate': - $tplcols = ( isset($_POST['tplcols']) ) ? max(60, intval($_POST['tplcols'])) : 90; - $tplrows = ( isset($_POST['tplrows']) ) ? max(4, intval($_POST['tplrows'])) : 30; - $tplname = ( isset($_POST['tplname']) ) ? $_POST['tplname'] : ''; - $tplroot = ( isset($_POST['tplroot']) ) ? $_POST['tplroot'] : 'subSilver'; + $tplcols = (isset($_POST['tplcols'])) ? max(60, intval($_POST['tplcols'])) : 90; + $tplrows = (isset($_POST['tplrows'])) ? max(4, intval($_POST['tplrows'])) : 30; + $tplname = (isset($_POST['tplname'])) ? $_POST['tplname'] : ''; + $tplroot = (isset($_POST['tplroot'])) ? $_POST['tplroot'] : 'subSilver'; $str = ''; - if ( isset($_POST['tpl_compile']) && !empty($_POST['decompile']) ) + if (isset($_POST['tpl_compile']) && !empty($_POST['decompile'])) { $str = "compile(stripslashes($_POST['decompile'])) . "\n?".">"; @@ -175,10 +167,10 @@ switch ( $mode ) exit; } - else if ( !empty($tplname) && isset($_POST['tpl_name']) ) + else if (!empty($tplname) && isset($_POST['tpl_name'])) { $fp = fopen($phpbb_root_path . 'templates/cache/' . $tplroot . '/' . $tplname . '.html.' . $phpEx, 'r'); - while ( !feof($fp) ) + while (!feof($fp)) { $str .= fread($fp, 4096); } @@ -188,10 +180,10 @@ switch ( $mode ) } else { - $str = ( !empty($_POST['decompile']) ) ? stripslashes($_POST['decompile']) : ''; + $str = (!empty($_POST['decompile'])) ? stripslashes($_POST['decompile']) : ''; } - if ( isset($_POST['tpl_download']) ) + if (isset($_POST['tpl_download'])) { header("Content-Type: text/html; name=\"" . $tplname . ".html\""); header("Content-disposition: attachment; filename=" . $tplname . ".html"); @@ -204,19 +196,17 @@ switch ( $mode ) $tplname_options = ''; $dp = @opendir($phpbb_root_path . 'templates/cache/' . $tplroot . '/'); - while ( $file = readdir($dp) ) + while ($file = readdir($dp)) { - if ( strstr($file, '.html.' . $phpEx) && is_file($phpbb_root_path . 'templates/cache/' . $tplroot . '/' . $file) ) + if (strstr($file, '.html.' . $phpEx) && is_file($phpbb_root_path . 'templates/cache/' . $tplroot . '/' . $file)) { $tpl = substr($file, 0, strpos($file, '.')); - $selected = ( $tplname == $tpl ) ? ' selected="selected"' : ''; + $selected = ($tplname == $tpl) ? ' selected="selected"' : ''; $tplname_options .= ''; } } closedir($dp); - // - // // page_header($user->lang['Edit_template']); @@ -255,21 +245,21 @@ switch ( $mode ) case 'edittheme': - $theme_id = ( isset($_POST['themeroot']) ) ? $_POST['themeroot'] : ''; + $theme_id = (isset($_POST['themeroot'])) ? $_POST['themeroot'] : ''; - if ( isset($_POST['update']) ) + if (isset($_POST['update'])) { $sql = "SELECT theme_id, theme_name FROM " . STYLES_CSS_TABLE . " WHERE theme_id = $theme_id"; $result = $db->sql_query($sql); - if ( $row = $db->sql_fetchrow($result) ) + if ($row = $db->sql_fetchrow($result)) { $theme_name = $row['theme_name']; - $css_data = ( !empty($_POST['css_data']) ) ? htmlentities($_POST['css_data']) : ''; - $css_external = ( !empty($_POST['css_data']) ) ? $_POST['css_data'] : ''; + $css_data = (!empty($_POST['css_data'])) ? htmlentities($_POST['css_data']) : ''; + $css_external = (!empty($_POST['css_data'])) ? $_POST['css_data'] : ''; $sql = "UPDATE " > STYLES_CSS_TABLE . " SET css_data = '$css_data', css_external = '$css_external' @@ -289,26 +279,26 @@ switch ( $mode ) $result = $db->sql_query($sql); $theme_options = ''; - if ( $row = $db->sql_fetchrow($result) ) + if ($row = $db->sql_fetchrow($result)) { do { - $theme_options .= ( ( $theme_options != '' ) ? ', ' : '' ) . ''; + $theme_options .= (($theme_options != '') ? ', ' : '') . ''; } - while ( $row = $db->sql_fetchrow($result) ); + while ($row = $db->sql_fetchrow($result)); } $db->sql_freeresult($result); $css_data = ''; $css_external = ''; - if ( $theme_id ) + if ($theme_id) { $sql = "SELECT css_data, css_external FROM " . STYLES_CSS_TABLE . " WHERE theme_id = $theme_id"; $result = $db->sql_query($sql); - if ( $row = $db->sql_fetchrow($result) ) + if ($row = $db->sql_fetchrow($result)) { $css_data = preg_replace('/\t{1,}/i', ' ', $row['css_data']); $css_external = $row['css_external']; @@ -348,8 +338,6 @@ switch ( $mode ) } -// -// // function get_templates($tplroot = '') { @@ -361,9 +349,9 @@ function get_templates($tplroot = '') $result = $db->sql_query($sql); $tplroot_options = ''; - while ( $row = $db->sql_fetchrow($result) ) + while ($row = $db->sql_fetchrow($result)) { - $selected = ( $tplroot == $row['template_path'] ) ? ' selected="selected"' : ''; + $selected = ($tplroot == $row['template_path']) ? ' selected="selected"' : ''; $tplroot_options .= ''; } diff --git a/phpBB/admin/admin_users.php b/phpBB/admin/admin_users.php index 772b98f04d..5ab1309493 100644 --- a/phpBB/admin/admin_users.php +++ b/phpBB/admin/admin_users.php @@ -36,7 +36,7 @@ define('IN_PHPBB', 1); $phpbb_root_path = '../'; require($phpbb_root_path . 'extension.inc'); require('pagestart.' . $phpEx); -require($phpbb_root_path . 'includes/functions_admin.'.$phpEx); +require_once($phpbb_root_path . 'includes/functions_admin.'.$phpEx); // Set mode $mode = (isset($_REQUEST['mode'])) ? $_REQUEST['mode'] : 'main'; @@ -117,18 +117,15 @@ if (isset($_POST['username']) || isset($_GET['u']) || isset($_POST['u'])) Main | Profile | Preferences | Avatar | Permissions - - - - +?> + +
lang[$mode]; ?> -
@@ -212,37 +209,37 @@ if (isset($_POST['username']) || isset($_GET['u']) || isset($_POST['u'])) ?>
Username:
Click profile to edit
[ Ban ]
+ + + 'Forum', - 'a' => 'Administrator', - 'm' => 'Moderator', - 'u' => 'User', - ); foreach ($global as $type => $auth_ary) { -?> - - - - $allow) - { - if ($option != $type .'_') + foreach ($auth_ary as $option => $allow) { - $row_class = ($row_class == 'row1') ? 'row2' : 'row1'; + if ($option != $type .'_') + { + $row_class = ($row_class == 'row1') ? 'row2' : 'row1'; - $l_can_cell = (!empty($user->lang['acl_' . $option])) ? $user->lang['acl_' . $option] : ucfirst(preg_replace('#.*?_#', '', $option)); + $l_can_cell = (!empty($user->lang['acl_' . $option])) ? $user->lang['acl_' . $option] : ucfirst(preg_replace('#.*?_#', '', $option)); - $allow_type = ($allow == ACL_ALLOW) ? ' checked="checked"' : ''; - $deny_type = ($allow == ACL_DENY) ? ' checked="checked"' : ''; + $allow_type = ($allow == ACL_ALLOW) ? ' checked="checked"' : ''; + $deny_type = ($allow == ACL_DENY) ? ' checked="checked"' : ''; ?> @@ -250,8 +247,8 @@ if (isset($_POST['username']) || isset($_GET['u']) || isset($_POST['u'])) diff --git a/phpBB/admin/admin_words.php b/phpBB/admin/admin_words.php index 23a1d6a60f..f2ebe2e0a9 100644 --- a/phpBB/admin/admin_words.php +++ b/phpBB/admin/admin_words.php @@ -35,7 +35,7 @@ define('IN_PHPBB', 1); $phpbb_root_path = '../'; require($phpbb_root_path . 'extension.inc'); require('pagestart.' . $phpEx); -require($phpbb_root_path . 'includes/functions_admin.' . $phpEx); +require_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx); // Do we have forum admin permissions? if (!$auth->acl_get('a_words'))
Select permission set:  
 lang['Option']; ?>   lang['Allow']; ?>   lang['Deny']; ?> 
/>