aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/admin/admin_forumauth.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2001-10-14 15:46:53 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2001-10-14 15:46:53 +0000
commit4aeb685d3cba6c46642d2ba6105b706434fcee49 (patch)
treeda3a9fb6736dfb939f2f0bcd989d13e68bf9b4db /phpBB/admin/admin_forumauth.php
parente31466a42f03d25d7a9e650f6e0b88b1ff0bb6c3 (diff)
downloadforums-4aeb685d3cba6c46642d2ba6105b706434fcee49.tar
forums-4aeb685d3cba6c46642d2ba6105b706434fcee49.tar.gz
forums-4aeb685d3cba6c46642d2ba6105b706434fcee49.tar.bz2
forums-4aeb685d3cba6c46642d2ba6105b706434fcee49.tar.xz
forums-4aeb685d3cba6c46642d2ba6105b706434fcee49.zip
Various updates, cleanups and support for URI based sessions ... more to come at some point
git-svn-id: file:///svn/phpbb/trunk@1179 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/admin/admin_forumauth.php')
-rw-r--r--phpBB/admin/admin_forumauth.php41
1 files changed, 31 insertions, 10 deletions
diff --git a/phpBB/admin/admin_forumauth.php b/phpBB/admin/admin_forumauth.php
index 350f0031e4..6ea86354fb 100644
--- a/phpBB/admin/admin_forumauth.php
+++ b/phpBB/admin/admin_forumauth.php
@@ -20,6 +20,8 @@
*
***************************************************************************/
+define("IN_ADMIN", true);
+
if($setmodules == 1)
{
$filename = basename(__FILE__);
@@ -29,10 +31,13 @@ if($setmodules == 1)
}
//
-// Include required files, get $phpEx and check permissions
+// Load default header
//
+$phpbb_root_dir = "./../";
+$no_page_header = TRUE;
require('pagestart.inc');
+
//
// Start program - define vars
//
@@ -67,7 +72,7 @@ $forum_auth_const = array(AUTH_ALL, AUTH_REG, AUTH_ACL, AUTH_MOD, AUTH_ADMIN);
if(isset($HTTP_GET_VARS[POST_FORUM_URL]) || isset($HTTP_POST_VARS[POST_FORUM_URL]))
{
- $forum_id = (isset($HTTP_POST_VARS[POST_FORUM_URL])) ? $HTTP_POST_VARS[POST_FORUM_URL] : $HTTP_GET_VARS[POST_FORUM_URL];
+ $forum_id = (isset($HTTP_POST_VARS[POST_FORUM_URL])) ? intval($HTTP_POST_VARS[POST_FORUM_URL]) : intval($HTTP_GET_VARS[POST_FORUM_URL]);
$forum_sql = "AND forum_id = $forum_id";
}
else
@@ -78,7 +83,7 @@ else
if( isset($HTTP_GET_VARS['adv']) )
{
- $adv = $HTTP_GET_VARS['adv'];
+ $adv = intval($HTTP_GET_VARS['adv']);
}
else
{
@@ -88,7 +93,7 @@ else
//
// Start program proper
//
-if(isset($HTTP_POST_VARS['submit']))
+if( isset($HTTP_POST_VARS['submit']) )
{
$sql = "";
@@ -124,6 +129,15 @@ if(isset($HTTP_POST_VARS['submit']))
$value = $HTTP_POST_VARS['auth_view'];
}
}
+
+ if($forum_auth_fields[$i] == 'auth_vote')
+ {
+ if( $HTTP_POST_VARS['auth_vote'] == AUTH_ALL )
+ {
+ $value = AUTH_REG;
+ }
+ }
+
$sql .= $forum_auth_fields[$i] . " = " . $value;
if($i < count($forum_auth_fields) - 1)
{
@@ -143,11 +157,16 @@ if(isset($HTTP_POST_VARS['submit']))
}
}
- unset($forum_id);
$forum_sql = "";
$adv = 0;
-
}
+
+ $template->assign_vars(array(
+ "META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("admin_forumauth.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">')
+ );
+ $message = $lang['Forum_auth_updated'] . "<br /><br />" . $lang['Click'] . " <a href=\"" . append_sid("admin_forumauth.$phpEx?" . POST_FORUM_URL . "=$forum_id") . "\">" . $lang['Here'] . "</a> " . $lang['return_forum_auth_admin'];
+ message_die(GENERAL_MESSAGE, $message);
+
}
//
@@ -164,7 +183,7 @@ $f_result = $db->sql_query($sql);
$forum_rows = $db->sql_fetchrowset($f_result);
-if(empty($forum_id))
+if( empty($forum_id) )
{
//
// Output the selection table if no forum id was
@@ -234,7 +253,7 @@ else
if( empty($adv) )
{
- $simple_auth = "&nbsp;<select name=\"simpleauth\">";
+ $simple_auth = "<select name=\"simpleauth\">";
for($j = 0; $j < count($simple_auth_types); $j++)
{
@@ -250,7 +269,7 @@ else
}
}
- $simple_auth .= "</select>&nbsp;";
+ $simple_auth .= "</select>";
$template->assign_block_vars("forum_auth_titles", array(
"CELL_TITLE" => $lang['Simple_mode'])
@@ -299,7 +318,7 @@ else
}
}
- $switch_mode = "admin_forumauth.$phpEx?" . POST_FORUM_URL . "=" . $forum_id . "&adv=";
+ $switch_mode = append_sid("admin_forumauth.$phpEx?" . POST_FORUM_URL . "=" . $forum_id . "&adv=");
$switch_mode .= ( empty($adv) ) ? "1" : "0";
$switch_mode_text = ( empty($adv) ) ? $lang['Advanced_mode'] : $lang['Simple_mode'];
$u_switch_mode = '<a href="' . $switch_mode . '">' . $switch_mode_text . '</a>';
@@ -323,6 +342,8 @@ else
}
+include('page_header_admin.'.$phpEx);
+
$template->pparse("body");
include('page_footer_admin.'.$phpEx);