Didnt I commit these?

git-svn-id: file:///svn/phpbb/trunk@650 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2001-07-13 17:03:04 +00:00
parent 8e49899bce
commit 813016d706
7 changed files with 115 additions and 68 deletions

View file

@ -25,15 +25,19 @@
if($setmodules==1) if($setmodules==1)
{ {
$file = basename(__FILE__); $file = basename(__FILE__);
$module['board']['config'] = $file; $module['General']['config'] = $file;
//$module['users']['edit'] = $file.'?mode=edit'; //$module['users']['edit'] = $file.'?mode=edit';
//$module['users']['delete'] = $file.'?mode=delete'; //$module['users']['delete'] = $file.'?mode=delete';
return; return;
} }
print "Got past the \$setmodules check<br>\n"; print "Got past the \$setmodules check<br>\n";
print "Requested action was: $mode<br>\n"; print "Requested action was: $mode<br>\n";
$phpbb_root_path = "./../";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
?> ?>

View file

@ -7,11 +7,9 @@ if($setmodules==1)
return; return;
} }
$phpbb_root_path = "./../";
chdir("../"); include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include('extension.inc');
include('common.'.$phpEx);
// //
// Start session management // Start session management

View file

@ -22,18 +22,21 @@
* *
***************************************************************************/ ***************************************************************************/
if($setmodules==1) if( $setmodules == 1 )
{ {
$filename = basename(__FILE__); $filename = basename(__FILE__);
$module['forums']['add'] = "$filename?mode=add"; $module['Forums']['add'] = "$filename?mode=add";
$module['forums']['edit'] = "$filename?mode=edit"; $module['Forums']['edit'] = "$filename?mode=edit";
$module['forums']['delete'] = "$filename?mode=delete"; $module['Forums']['delete'] = "$filename?mode=delete";
return; return;
} }
print "Got past the \$setmodules check<br>\n"; print "Got past the \$setmodules check<br>\n";
print "Requested action was: $mode<br>\n"; print "Requested action was: $mode<br>\n";
$phpbb_root_path = "./../";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
?> ?>

View file

@ -1,9 +1,16 @@
<?php <?php
chdir("../"); if($setmodules == 1)
{
$filename = basename(__FILE__);
$module['Auth']['groups'] = $filename;
include('extension.inc'); return;
include('common.'.$phpEx); }
$phpbb_root_path = "./../";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
// //
// Start session management // Start session management
@ -41,7 +48,6 @@ $forum_auth_key_fields = array("auth_view", "auth_read", "auth_post", "auth_repl
// //
function a_auth_check_user($type, $key, $u_auth, $is_admin) function a_auth_check_user($type, $key, $u_auth, $is_admin)
{ {
$single_user = 0; $single_user = 0;
$auth_user = array(); $auth_user = array();
@ -365,9 +371,11 @@ else if(empty($HTTP_GET_VARS[POST_GROUPS_URL]))
$select_list .= "</select>"; $select_list .= "</select>";
$template->set_filenames(array( $template->set_filenames(array(
"body" => "admin/userauth_select_body.tpl")); "body" => "admin/ug_auth_select_body.tpl"));
$template->assign_vars(array( $template->assign_vars(array(
"L_USER_OR_GROUP" => "Group",
"S_USERAUTH_ACTION" => append_sid("admin_groupauth.$phpEx"), "S_USERAUTH_ACTION" => append_sid("admin_groupauth.$phpEx"),
"S_USERS_SELECT" => $select_list, "S_USERS_SELECT" => $select_list,
@ -386,7 +394,7 @@ else if(empty($HTTP_GET_VARS[POST_GROUPS_URL]))
// //
$template->set_filenames(array( $template->set_filenames(array(
"body" => "admin/userauth_body.tpl") "body" => "admin/ug_auth_body.tpl")
); );
$group_id = $HTTP_GET_VARS[POST_GROUPS_URL]; $group_id = $HTTP_GET_VARS[POST_GROUPS_URL];
@ -621,14 +629,20 @@ if($adv == -1)
} }
else else
{ {
$t_username_list = "has no members."; $t_username_list = "<b>Has no members</b>";
} }
$s_hidden_fields = "<input type=\"hidden\" name=\"" . POST_GROUPS_URL . "\" value=\"$group_id\">"; $s_hidden_fields = "<input type=\"hidden\" name=\"" . POST_GROUPS_URL . "\" value=\"$group_id\">";
$template->assign_vars(array( $template->assign_vars(array(
"USERNAME" => $t_groupname, "USERNAME" => $t_groupname,
"USER_GROUP_LIST" => $t_username_list, "USER_GROUP_MEMBERSHIPS" => "This group has the following members: $t_username_list",
"L_USER_OR_GROUPNAME" => "Groupname",
"L_USER_OR_GROUP" => "Group",
"U_USER_OR_GROUP" => append_sid("admin_groupauth.$phpEx"),
"U_FORUMAUTH" => append_sid("admin_forumauth.$phpEx"),
"S_USER_AUTH_ACTION" => append_sid("admin_groupauth.$phpEx"), "S_USER_AUTH_ACTION" => append_sid("admin_groupauth.$phpEx"),
"S_HIDDEN_FIELDS" => $s_hidden_fields) "S_HIDDEN_FIELDS" => $s_hidden_fields)

View file

@ -1,16 +1,16 @@
<?php <?php
if($setmodules==1) if($setmodules == 1)
{ {
$filename = basename(__FILE__); $filename = basename(__FILE__);
$module['Auth']['users'] = $filename; $module['Auth']['users'] = $filename;
return; return;
} }
chdir("../"); $phpbb_root_path = "./../";
include($phpbb_root_path . 'extension.inc');
include('extension.inc'); include($phpbb_root_path . 'common.'.$phpEx);
include('common.'.$phpEx);
// //
// Start session management // Start session management
@ -400,8 +400,8 @@ if(isset($HTTP_POST_VARS['submit']) && !empty($HTTP_POST_VARS[POST_USERS_URL]))
} }
} }
// print_r($valid_auth_acl_sql); print_r($valid_auth_acl_sql);
// echo "<BR><BR>"; echo "<BR><BR>";
// //
// The next part requires that we know whether we're // The next part requires that we know whether we're
@ -435,6 +435,8 @@ if(isset($HTTP_POST_VARS['submit']) && !empty($HTTP_POST_VARS[POST_USERS_URL]))
} }
} }
exit;
header("Location: admin_userauth.$phpEx?" . POST_USERS_URL . "=$user_id"); header("Location: admin_userauth.$phpEx?" . POST_USERS_URL . "=$user_id");
} }
@ -449,8 +451,8 @@ else if(empty($HTTP_GET_VARS[POST_USERS_URL]))
// //
$sql = "SELECT user_id, username $sql = "SELECT user_id, username
FROM ".USERS_TABLE . " FROM " . USERS_TABLE . "
WHERE user_id != " . ANONYMOUS; WHERE user_id <> " . ANONYMOUS;
$u_result = $db->sql_query($sql); $u_result = $db->sql_query($sql);
$user_list = $db->sql_fetchrowset($u_result); $user_list = $db->sql_fetchrowset($u_result);
@ -462,10 +464,12 @@ else if(empty($HTTP_GET_VARS[POST_USERS_URL]))
$select_list .= "</select>"; $select_list .= "</select>";
$template->set_filenames(array( $template->set_filenames(array(
"body" => "admin/userauth_select_body.tpl")); "body" => "admin/ug_auth_select_body.tpl"));
$template->assign_vars(array( $template->assign_vars(array(
"S_USERAUTH_ACTION" => append_sid("admin_userauth.$phpEx"), "L_USER_OR_GROUP" => "User",
"S_USERAUTH_ACTION" => append_sid("admin_userauth.$phpEx"),
"S_USERS_SELECT" => $select_list, "S_USERS_SELECT" => $select_list,
"U_FORUMAUTH" => append_sid("admin_forumauth.$phpEx")) "U_FORUMAUTH" => append_sid("admin_forumauth.$phpEx"))
@ -483,7 +487,7 @@ else if(empty($HTTP_GET_VARS[POST_USERS_URL]))
// //
$template->set_filenames(array( $template->set_filenames(array(
"body" => "admin/userauth_body.tpl") "body" => "admin/ug_auth_body.tpl")
); );
$user_id = $HTTP_GET_VARS[POST_USERS_URL]; $user_id = $HTTP_GET_VARS[POST_USERS_URL];
@ -714,7 +718,7 @@ if($adv == -1)
$t_usergroup_list = ""; $t_usergroup_list = "";
for($i = 0; $i < count($userinf); $i++) for($i = 0; $i < count($userinf); $i++)
{ {
$t_usergroup_list .= "<a href=\"groupauth.$phpEx?" . POST_GROUPS_URL . "=" . $group_id[$i] . "\">" . $group_name[$i] . "</a>"; $t_usergroup_list .= "<a href=\"admin_groupauth.$phpEx?" . POST_GROUPS_URL . "=" . $group_id[$i] . "\">" . $group_name[$i] . "</a>";
if($i < count($group_name) - 1) if($i < count($group_name) - 1)
{ {
$t_usergroup_list .= ", "; $t_usergroup_list .= ", ";
@ -723,19 +727,23 @@ if($adv == -1)
} }
else else
{ {
$t_usergroup_list = "belongs to no usergroups."; $t_usergroup_list = "None";
} }
$s_hidden_fields = "<input type=\"hidden\" name=\"" . POST_USERS_URL . "\" value=\"$user_id\">"; $s_hidden_fields = "<input type=\"hidden\" name=\"" . POST_USERS_URL . "\" value=\"$user_id\">";
$s_hidden_fields .= "<input type=\"hidden\" name=\"curadmin\" value=\"" . $is_admin ."\">"; $s_hidden_fields .= "<input type=\"hidden\" name=\"curadmin\" value=\"" . $is_admin ."\">";
$s_hidden_fields .= "<input type=\"hidden\" name=\"" . POST_GROUPS_URL . "\" value=\"" . "\">";
$template->assign_vars(array( $template->assign_vars(array(
"USERNAME" => $t_username, "USERNAME" => $t_username,
"USER_GROUP_LIST" => $t_usergroup_list, "USER_GROUP_MEMBERSHIPS" => "This user is a $s_user_type and belongs to the following groups: $t_usergroup_list",
"L_USER_OR_GROUPNAME" => "Username",
"L_USER_OR_GROUP" => "User",
"U_USER_OR_GROUP" => append_sid("admin_userauth.$phpEx"),
"U_FORUMAUTH" => append_sid("admin_forumauth.$phpEx"),
"S_USER_AUTH_ACTION" => append_sid("admin_userauth.$phpEx"), "S_USER_AUTH_ACTION" => append_sid("admin_userauth.$phpEx"),
"S_USER_TYPE_SELECT" => $s_user_type,
"S_HIDDEN_FIELDS" => $s_hidden_fields) "S_HIDDEN_FIELDS" => $s_hidden_fields)
); );

View file

@ -22,6 +22,17 @@
* *
***************************************************************************/ ***************************************************************************/
if($setmodules == 1)
{
$filename = basename(__FILE__);
$module['Users']['users'] = $filename;
return;
}
$phpbb_root_path = "./../";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
?> ?>

View file

@ -22,45 +22,53 @@
* *
***************************************************************************/ ***************************************************************************/
chdir("../"); $phpbb_root_path = "./../";
include('extension.inc'); include($phpbb_root_path . 'extension.inc');
include('common.'.$phpEx); include($phpbb_root_path . 'common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX, $session_length); $userdata = session_pagestart($user_ip, PAGE_INDEX, $session_length);
init_userprefs($userdata); init_userprefs($userdata);
//
// End sessionmanagement
//
if ($pane == 'top') if ($pane == 'top')
{ {
$page_title = $lang['View_topic'] ." - $topic_title"; $page_title = $lang['View_topic'] ." - $topic_title";
$pagetype = "viewtopic"; $pagetype = "viewtopic";
include('includes/page_header.'.$phpEx);
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
} }
elseif ($pane == 'left') elseif ($pane == 'left')
{ {
print "<BASE TARGET=\"main\">"; print "<BASE TARGET=\"main\">";
// Hmm, should we make this variable?
chdir('admin/');
$dir = opendir("."); $dir = opendir(".");
$setmodules=1; $setmodules = 1;
while($file = readdir($dir)) while($file = readdir($dir))
{ {
if(preg_match("/^admin_.*/", $file)) if(preg_match("/^admin_.*/", $file))
{ {
//print "$file<br>\n"; //print "$file<br>\n";
include($file); include($file);
} }
} }
while(list($cat, $action_array) = each($module)) while( list($cat, $action_array) = each($module) )
{ {
print "<H3>$cat</H3>\n"; print "<H3>$cat</H3>\n";
print "<ul>\n"; print "<ul>\n";
while(list($action, $file) = each($action_array))
{ while( list($action, $file) = each($action_array) )
print "<li><a href=\"$file\">$action</a></li>\n"; {
} print "<li><a href=\"$file\">$action</a></li>\n";
print "</ul>\n"; }
print "</ul>\n";
} }
//var_dump($module); //var_dump($module);
@ -69,12 +77,14 @@ elseif ($pane == 'left')
elseif ($pane == 'right') elseif ($pane == 'right')
{ {
echo "This the right pane ;)"; echo "This the right pane ;)";
} }
else else
{ // Generate frameset {
// Generate frameset
?> ?>
<html> <html>
<head> <head>
@ -98,5 +108,4 @@ else
} }
?> ?>