aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2002-08-07 01:12:11 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2002-08-07 01:12:11 +0000
commit702761f40b28ca5f732c5e06dba0722034da495c (patch)
tree10985e3baf7eb4840e521420fb4e6ce7886fe3cd /phpBB
parent2c55d91ef8a304ae440f9f46e2dff1b117a02d7b (diff)
downloadforums-702761f40b28ca5f732c5e06dba0722034da495c.tar
forums-702761f40b28ca5f732c5e06dba0722034da495c.tar.gz
forums-702761f40b28ca5f732c5e06dba0722034da495c.tar.bz2
forums-702761f40b28ca5f732c5e06dba0722034da495c.tar.xz
forums-702761f40b28ca5f732c5e06dba0722034da495c.zip
Authentication stuff ... plugins generate any HTML form stuff they require
git-svn-id: file:///svn/phpbb/trunk@2838 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/admin/admin_board.php99
1 files changed, 72 insertions, 27 deletions
diff --git a/phpBB/admin/admin_board.php b/phpBB/admin/admin_board.php
index 4fa8f5ad79..8b33955ef8 100644
--- a/phpBB/admin/admin_board.php
+++ b/phpBB/admin/admin_board.php
@@ -33,6 +33,7 @@ if ( !empty($setmodules) )
$module['General']['Board_settings'] = "$file$SID&amp;mode=setting";
$module['General']['Email_settings'] = "$file$SID&amp;mode=email";
$module['General']['Server_settings'] = "$file$SID&amp;mode=server";
+ $module['General']['Auth_settings'] = "$file$SID&amp;mode=auth";
return;
}
@@ -61,36 +62,25 @@ else
//
// Pull all config data
//
-switch ( $mode )
-{
- case 'userdefs':
- $sql = "SELECT *
- FROM " . CONFIG_USER_TABLE;
- $result = $db->sql_query($sql);
- break;
+$sql = "SELECT *
+ FROM " . CONFIG_TABLE;
+$result = $db->sql_query($sql);
- default:
- $sql = "SELECT *
- FROM " . CONFIG_TABLE;
- $result = $db->sql_query($sql);
+while ( $row = $db->sql_fetchrow($result) )
+{
+ $config_name = $row['config_name'];
+ $config_value = $row['config_value'];
- while ( $row = $db->sql_fetchrow($result) )
- {
- $config_name = $row['config_name'];
- $config_value = $row['config_value'];
- $default_config[$config_name] = $config_value;
-
- $new[$config_name] = ( isset($HTTP_POST_VARS[$config_name]) ) ? $HTTP_POST_VARS[$config_name] : $default_config[$config_name];
+ $default_config[$config_name] = $config_value;
+ $new[$config_name] = ( isset($HTTP_POST_VARS[$config_name]) ) ? $HTTP_POST_VARS[$config_name] : $default_config[$config_name];
- if ( isset($HTTP_POST_VARS['submit']) )
- {
- $sql = "UPDATE " . CONFIG_TABLE . " SET
- config_value = '" . str_replace("\'", "''", $new[$config_name]) . "'
- WHERE config_name = '$config_name'";
- $db->sql_query($sql);
- }
- }
- break;
+ if ( isset($HTTP_POST_VARS['submit']) )
+ {
+ $sql = "UPDATE " . CONFIG_TABLE . " SET
+ config_value = '" . str_replace("\'", "''", $new[$config_name]) . "'
+ WHERE config_name = '$config_name'";
+ $db->sql_query($sql);
+ }
}
if ( isset($HTTP_POST_VARS['submit']) )
@@ -122,6 +112,12 @@ switch ( $mode )
case 'server':
$l_title = 'Server_settings';
break;
+ case 'login':
+ $l_title = 'Server_settings';
+ break;
+ case 'auth':
+ $l_title = 'Auth_settings';
+ break;
default:
return;
}
@@ -506,6 +502,55 @@ switch ( $mode )
break;
+ case 'auth':
+
+?>
+
+<?php
+
+ $auth_plugins = array();
+
+ $dp = opendir($phpbb_root_path . 'includes/auth');
+ while ( $file = readdir($dp) )
+ {
+ if ( preg_match('/^auth_(.*?)\.' . $phpEx . '$/', $file) )
+ {
+ $auth_plugins[] = preg_replace('/^auth_(.*?)\.' . $phpEx . '$/', '\1', $file);
+ }
+ }
+
+ sort($auth_plugins);
+
+ $auth_select = '';
+ foreach ( $auth_plugins as $method )
+ {
+ $selected = ( $board_config['auth_method'] == $method ) ? ' selected="selected"' : '';
+ $auth_select .= '<option value="' . $method . '"' . $selected . '>' . ucfirst($method) . '</option>';
+ }
+
+?>
+ <tr>
+ <td class="row1" width="50%"><?php echo $lang['Auth_method']; ?>:</td>
+ <td class="row2"><select name="auth_method"><?php echo $auth_select; ?></select></td>
+ </tr>
+<?php
+
+ foreach ( $auth_plugins as $method )
+ {
+ if ( $method && file_exists($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx) )
+ {
+ include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
+
+ $method = 'admin_' . $method;
+ if ( function_exists($method) )
+ {
+ $method($new);
+ }
+ }
+ }
+
+ break;
+
}
?>