mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Basic ability to add users to group and group moderators
git-svn-id: file:///svn/phpbb/trunk@3468 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
28a01da9a4
commit
615e676b02
3 changed files with 243 additions and 46 deletions
|
@ -45,13 +45,49 @@ if (!$auth->acl_get('a_group') )
|
||||||
|
|
||||||
|
|
||||||
// Check and set some common vars
|
// Check and set some common vars
|
||||||
$action = (isset($_REQUEST['action'])) ? $_REQUEST['action'] : ((isset($_POST['addgroup'])) ? 'addgroup' : '');
|
$mode = (isset($_REQUEST['mode'])) ? $_REQUEST['mode'] : '';
|
||||||
|
if (isset($_POST['addgroup']))
|
||||||
|
{
|
||||||
|
$action = 'addgroup';
|
||||||
|
}
|
||||||
|
else if (isset($_POST['delete']))
|
||||||
|
{
|
||||||
|
$action = 'delete';
|
||||||
|
}
|
||||||
|
else if (isset($_POST['add']))
|
||||||
|
{
|
||||||
|
$action = 'add';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$action = (isset($_REQUEST['action'])) ? $_REQUEST['action'] : '';
|
||||||
|
}
|
||||||
$group_id = (isset($_REQUEST['g'])) ? intval($_REQUEST['g']) : '';
|
$group_id = (isset($_REQUEST['g'])) ? intval($_REQUEST['g']) : '';
|
||||||
$start = (isset($_GET['start'])) ? intval($_GET['start']) : 0;
|
|
||||||
|
|
||||||
// Which page?
|
$start = (isset($_GET['start']) && $mode == 'member') ? intval($_GET['start']) : 0;
|
||||||
|
$start_mod = (isset($_GET['start']) && $mode == 'mod') ? intval($_GET['start']) : 0;
|
||||||
|
$start_pend = (isset($_GET['start']) && $mode == 'pend') ? intval($_GET['start']) : 0;
|
||||||
|
|
||||||
|
// Grab basic data for group, if group_id is set since it's used
|
||||||
|
// in several places below
|
||||||
|
if (!empty($group_id))
|
||||||
|
{
|
||||||
|
$sql = "SELECT *
|
||||||
|
FROM " . GROUPS_TABLE . "
|
||||||
|
WHERE group_id = $group_id";
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
if (!extract($db->sql_fetchrow($result)))
|
||||||
|
{
|
||||||
|
trigger_error($user->lang['NO_GROUP']);
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Page header
|
||||||
page_header($user->lang['MANAGE']);
|
page_header($user->lang['MANAGE']);
|
||||||
|
|
||||||
|
// Which page?
|
||||||
switch ($action)
|
switch ($action)
|
||||||
{
|
{
|
||||||
case 'edit':
|
case 'edit':
|
||||||
|
@ -59,21 +95,6 @@ switch ($action)
|
||||||
|
|
||||||
$error = '';
|
$error = '';
|
||||||
|
|
||||||
// Grab data, even when submitting updates
|
|
||||||
if ($action == 'edit')
|
|
||||||
{
|
|
||||||
$sql = "SELECT *
|
|
||||||
FROM " . GROUPS_TABLE . "
|
|
||||||
WHERE group_id = $group_id";
|
|
||||||
$result = $db->sql_query($sql);
|
|
||||||
|
|
||||||
if (!extract($db->sql_fetchrow($result)))
|
|
||||||
{
|
|
||||||
trigger_error($user->lang['NO_GROUP']);
|
|
||||||
}
|
|
||||||
$db->sql_freeresult($result);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Did we submit?
|
// Did we submit?
|
||||||
if (isset($_POST['submit']) || isset($_POST['submitprefs']))
|
if (isset($_POST['submit']) || isset($_POST['submitprefs']))
|
||||||
{
|
{
|
||||||
|
@ -340,16 +361,7 @@ function swatch()
|
||||||
<td class="row1" nowrap="nowrap"><input type="radio" name="user_dst" value="0" /> <?php echo $user->lang['DISABLED']; ?> <input type="radio" name="user_dst" value="1" /> <?php echo $user->lang['ENABLED']; ?> <input type="radio" name="user_dst" value="-1" checked="checked" /> <?php echo $user->lang['USER_DEFAULT']; ?></td>
|
<td class="row1" nowrap="nowrap"><input type="radio" name="user_dst" value="0" /> <?php echo $user->lang['DISABLED']; ?> <input type="radio" name="user_dst" value="1" /> <?php echo $user->lang['ENABLED']; ?> <input type="radio" name="user_dst" value="-1" checked="checked" /> <?php echo $user->lang['USER_DEFAULT']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="cat" colspan="2" align="center"><?php
|
<td class="cat" colspan="2" align="center"><input class="mainoption" type="submit" name="submitprefs" value="<?php echo $user->lang['SUBMIT']; ?>" /> <input class="liteoption" type="reset" value="<?php echo $user->lang['RESET']; ?>" /></td>
|
||||||
|
|
||||||
if ($group_type == GROUP_SPECIAL)
|
|
||||||
{
|
|
||||||
|
|
||||||
?><input type="hidden" name="group_type" value="<?php echo GROUP_SPECIAL; ?>" /><?php
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
?><input class="mainoption" type="submit" name="submitprefs" value="<?php echo $user->lang['SUBMIT']; ?>" /> <input class="liteoption" type="reset" value="<?php echo $user->lang['RESET']; ?>" /></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table></form>
|
</table></form>
|
||||||
|
|
||||||
|
@ -359,11 +371,112 @@ function swatch()
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'deletegroup':
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
case 'add':
|
case 'add':
|
||||||
|
|
||||||
|
if (empty($_POST['usernames']))
|
||||||
|
{
|
||||||
|
trigger_error($user->lang['NO_USERS']);
|
||||||
|
}
|
||||||
|
$users = explode("\n", $_POST['usernames']);
|
||||||
|
|
||||||
|
$table_sql = ($mode == 'mod' ) ? GROUPS_MODERATOR_TABLE : USER_GROUP_TABLE;
|
||||||
|
|
||||||
|
// Grab the user ids
|
||||||
|
$sql = "SELECT user_id
|
||||||
|
FROM " . USERS_TABLE . "
|
||||||
|
WHERE username IN (" . implode(', ', preg_replace('#^[\s]*?(.*?)[\s]*?$#', "'\\1'", $users)) . ")";
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
if (!($row = $db->sql_fetchrow($result)))
|
||||||
|
{
|
||||||
|
trigger_error($user->lang['NO_USERS']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$user_id_ary = array();
|
||||||
|
do
|
||||||
|
{
|
||||||
|
$user_id_ary[] = $row['user_id'];
|
||||||
|
}
|
||||||
|
while ($row = $db->sql_fetchrow($result));
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
// Remove users who are already members of this group
|
||||||
|
$sql = "SELECT user_id
|
||||||
|
FROM $table_sql
|
||||||
|
WHERE user_id IN (" . implode(', ', $user_id_ary) . ")
|
||||||
|
AND group_id = $group_id";
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
if ($row = $db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
$old_user_id_ary = array();
|
||||||
|
do
|
||||||
|
{
|
||||||
|
$old_user_id_ary[] = $row['user_id'];
|
||||||
|
}
|
||||||
|
while ($row = $db->sql_fetchrow($result));
|
||||||
|
|
||||||
|
$user_id_ary = array_diff($user_id_ary, $old_user_id_ary);
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
// Insert the new users
|
||||||
|
switch (SQL_LAYER)
|
||||||
|
{
|
||||||
|
case 'postgresql':
|
||||||
|
case 'msaccess':
|
||||||
|
case 'mssql-odbc':
|
||||||
|
case 'oracle':
|
||||||
|
case 'db2':
|
||||||
|
foreach ($user_id_ary as $user_id)
|
||||||
|
{
|
||||||
|
$sql = "INSERT INTO $table_sql (user_id, group_id)
|
||||||
|
VALUES ($user_id, $group_id)";
|
||||||
|
$db->sql_query($sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'mysql':
|
||||||
|
case 'mysql4':
|
||||||
|
$sql = "INSERT INTO $table_sql (user_id, group_id)
|
||||||
|
VALUES " . implode(', ', preg_replace('#^([0-9]+)$#', "(\\1, $group_id)", $user_id_ary));
|
||||||
|
$db->sql_query($sql);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'mssql':
|
||||||
|
$sql = "INSERT INTO $table_sql (user_id, group_id)
|
||||||
|
VALUES " . implode(' UNION ALL ', preg_replace('#^([0-9]+)$#', "(\\1, $group_id)", $user_id_ary));
|
||||||
|
$db->sql_query($sql);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update user settings (color, rank) if applicable
|
||||||
|
if (!empty($_POST['settings']))
|
||||||
|
{
|
||||||
|
$sql = "UPDATE " . USERS_TABLE ."
|
||||||
|
SET user_colour = '$group_colour', user_rank = " . intval($group_rank) . "
|
||||||
|
WHERE user_id IN (" . implode(', ', $user_id_ary) . ")";
|
||||||
|
$db->sql_query($sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
// add_log();
|
||||||
|
|
||||||
|
$message = ($mode == 'mod') ? 'GROUP_MODS_ADDED' : 'GROUP_USERS_ADDED';
|
||||||
|
trigger_error($user->lang[$message]);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'delete':
|
case 'delete':
|
||||||
case 'deletegroup':
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'approve':
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'list':
|
case 'list':
|
||||||
|
@ -395,7 +508,7 @@ function swatch()
|
||||||
|
|
||||||
<p><?php echo $user->lang['GROUP_MODS_EXPLAIN']; ?></p>
|
<p><?php echo $user->lang['GROUP_MODS_EXPLAIN']; ?></p>
|
||||||
|
|
||||||
<form name="mods" method="post" action="admin_groups.<?php echo "$phpEx$SID&action=list"; ?>"><table class="bg" width="80%" cellspacing="1" cellpadding="4" border="0" align="center">
|
<form name="mod" method="post" action="admin_groups.<?php echo "$phpEx$SID&g=$group_id"; ?>"><table class="bg" width="80%" cellspacing="1" cellpadding="4" border="0" align="center">
|
||||||
<tr>
|
<tr>
|
||||||
<th><?php echo $user->lang['USERNAME']; ?></th>
|
<th><?php echo $user->lang['USERNAME']; ?></th>
|
||||||
<th><?php echo $user->lang['JOINED']; ?></th>
|
<th><?php echo $user->lang['JOINED']; ?></th>
|
||||||
|
@ -405,10 +518,21 @@ function swatch()
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Group moderators
|
// Group moderators
|
||||||
$sql = "SELECT u.user_id, u.username
|
$sql = "SELECT COUNT(user_id) AS total_members
|
||||||
|
FROM " . GROUPS_MODERATOR_TABLE . "
|
||||||
|
WHERE group_id = $group_id";
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
$row = $db->sql_fetchrow($result);
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
$total_members = $row['total_members'];
|
||||||
|
|
||||||
|
$sql = "SELECT u.user_id, u.username, u.user_regdate, u.user_posts
|
||||||
FROM " . USERS_TABLE . " u, " . GROUPS_MODERATOR_TABLE . " gm
|
FROM " . USERS_TABLE . " u, " . GROUPS_MODERATOR_TABLE . " gm
|
||||||
WHERE gm.group_id = $group_id
|
WHERE gm.group_id = $group_id
|
||||||
ORDER BY u.user_id";
|
AND u.user_id = gm.user_id
|
||||||
|
ORDER BY u.username
|
||||||
|
LIMIT $start_mod, " . $config['topics_per_page'];
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
@ -418,6 +542,16 @@ function swatch()
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
|
||||||
|
$row_class = ($row_class == 'row1') ? 'row2' : 'row1';
|
||||||
|
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td class="<?php echo $row_class; ?>"><a href="../ucp.<?php echo "$phpEx$SID&mode=viewprofile&u=" . $row['user_id']; ?>" target="_profile"><?php echo $row['username']; ?></a></td>
|
||||||
|
<td class="<?php echo $row_class; ?>" align="center"><?php echo $user->format_date($row['user_regdate'], $user->lang['DATE_FORMAT']); ?></td>
|
||||||
|
<td class="<?php echo $row_class; ?>" align="center"><?php echo $row['user_posts']; ?></td>
|
||||||
|
<td class="<?php echo $row_class; ?>" align="center"><input type="checkbox" name="mark[<?php echo $row['user_id']; ?>]" /></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
|
||||||
}
|
}
|
||||||
while ($row = $db->sql_fetchrow($result) );
|
while ($row = $db->sql_fetchrow($result) );
|
||||||
|
@ -440,18 +574,46 @@ function swatch()
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="cat" colspan="4" align="right"></td>
|
<td class="cat" colspan="4" align="right"><input type="hidden" name="mode" value="mod" /><input class="liteoption" type="submit" name="delete" value="<?php echo $user->lang['DELETE_MARKED']; ?>" /> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th colspan="4"><?php echo $user->lang['ADD_USERS']; ?></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="row1" colspan="4" align="center"><textarea name="usernames" cols="40" rows="5"></textarea></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="cat" colspan="4" align="center"><input class="mainoption" type="submit" name="add" value="<?php echo $user->lang['SUBMIT']; ?>" /> <input class="liteoption" type="submit" value="<?php echo $user->lang['FIND_USERNAME']; ?>" onclick="window.open('<?php echo "../memberlist.$phpEx$SID"; ?>&mode=searchuser&form=mod&field=usernames', '_phpbbsearch', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=740');return false;" /></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<table width="80%" cellspacing="1" cellpadding="0" border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td valign="top"><?php echo on_page($total_members, $config['topics_per_page'], $start_mod); ?></td>
|
||||||
|
<td align="right"><b><span class="gensmall"><a href="javascript:marklist('mod', true);" class="gensmall"><?php echo $user->lang['MARK_ALL']; ?></a> :: <a href="javascript:marklist('mod', false);" class="gensmall"><?php echo $user->lang['UNMARK_ALL']; ?></a></span></b> <br /><span class="nav"><?php echo generate_pagination("admin_groups.$phpEx$SID&action=list&mode=mod&g=$group_id", $total_members, $config['topics_per_page'], $start); ?></span></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table></form>
|
</table></form>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Pending users
|
// Pending users
|
||||||
$sql = "SELECT u.user_id, u.username
|
$sql = "SELECT COUNT(user_id) AS total_members
|
||||||
FROM " . USERS_TABLE . " u, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g
|
FROM " . USER_GROUP_TABLE . "
|
||||||
WHERE ug.user_pending = 1
|
WHERE group_id = $group_id
|
||||||
|
AND user_pending = 1";
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
$row = $db->sql_fetchrow($result);
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
$total_members = $row['total_members'];
|
||||||
|
|
||||||
|
$sql = "SELECT u.user_id, u.username, u.user_regdate, u.user_posts
|
||||||
|
FROM " . USERS_TABLE . " u, " . USER_GROUP_TABLE . " ug
|
||||||
|
WHERE ug.group_id = $group_id
|
||||||
|
AND ug.user_pending = 1
|
||||||
AND u.user_id = ug.user_id
|
AND u.user_id = ug.user_id
|
||||||
ORDER BY ug.group_id, u.user_id";
|
ORDER BY u.username
|
||||||
|
LIMIT $start_pend, " . $config['topics_per_page'];
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
if ($row = $db->sql_fetchrow($result) )
|
if ($row = $db->sql_fetchrow($result) )
|
||||||
|
@ -462,7 +624,7 @@ function swatch()
|
||||||
|
|
||||||
<p><?php echo $user->lang['GROUP_PENDING_EXPLAIN']; ?></p>
|
<p><?php echo $user->lang['GROUP_PENDING_EXPLAIN']; ?></p>
|
||||||
|
|
||||||
<form name="pending" method="post" action="admin_groups.<?php echo "$phpEx$SID&action=list"; ?>"><table class="bg" width="80%" cellspacing="1" cellpadding="4" border="0" align="center">
|
<form name="pend" method="post" action="admin_groups.<?php echo "$phpEx$SID&g=$group_id"; ?>"><table class="bg" width="80%" cellspacing="1" cellpadding="4" border="0" align="center">
|
||||||
<tr>
|
<tr>
|
||||||
<th><?php echo $user->lang['USERNAME']; ?></th>
|
<th><?php echo $user->lang['USERNAME']; ?></th>
|
||||||
<th><?php echo $user->lang['JOINED']; ?></th>
|
<th><?php echo $user->lang['JOINED']; ?></th>
|
||||||
|
@ -474,6 +636,8 @@ function swatch()
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
|
||||||
|
$row_class = ($row_class == 'row1') ? 'row2' : 'row1';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="<?php echo $row_class; ?>"><a href="../ucp.<?php echo "$phpEx$SID&mode=viewprofile&u=" . $row['user_id']; ?>" target="_profile"><?php echo $row['username']; ?></a></td>
|
<td class="<?php echo $row_class; ?>"><a href="../ucp.<?php echo "$phpEx$SID&mode=viewprofile&u=" . $row['user_id']; ?>" target="_profile"><?php echo $row['username']; ?></a></td>
|
||||||
|
@ -487,6 +651,25 @@ function swatch()
|
||||||
while ($row = $db->sql_fetchrow($result) );
|
while ($row = $db->sql_fetchrow($result) );
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
<tr>
|
||||||
|
<td class="cat" colspan="4" align="right"><input type="hidden" name="mode" value="pend" /><input class="liteoption" type="submit" name="delete" value="<?php echo $user->lang['DELETE_MARKED']; ?>" /> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th colspan="4"><?php echo $user->lang['ADD_USERS']; ?></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="row1" colspan="4" align="center"><textarea name="usernames" cols="40" rows="5"></textarea></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="cat" colspan="4" align="center"><input class="mainoption" type="submit" name="add" value="<?php echo $user->lang['SUBMIT']; ?>" /> <input class="liteoption" type="submit" value="<?php echo $user->lang['FIND_USERNAME']; ?>" onclick="window.open('<?php echo "../memberlist.$phpEx$SID"; ?>&mode=searchuser&form=pend&field=usernames', '_phpbbsearch', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=740');return false;" /></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<table width="80%" cellspacing="1" cellpadding="0" border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td valign="top"><?php echo on_page($total_members, $config['topics_per_page'], $start_mod); ?></td>
|
||||||
|
<td align="right"><b><span class="gensmall"><a href="javascript:marklist('pend', true);" class="gensmall"><?php echo $user->lang['MARK_ALL']; ?></a> :: <a href="javascript:marklist('pend', false);" class="gensmall"><?php echo $user->lang['UNMARK_ALL']; ?></a></span></b> <br /><span class="nav"><?php echo generate_pagination("admin_groups.$phpEx$SID&action=list&mode=pend&g=$group_id", $total_members, $config['topics_per_page'], $start); ?></span></td>
|
||||||
|
</tr>
|
||||||
</table></form>
|
</table></form>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
@ -495,16 +678,17 @@ function swatch()
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Existing members
|
||||||
$sql = "SELECT COUNT(user_id) AS total_members
|
$sql = "SELECT COUNT(user_id) AS total_members
|
||||||
FROM " . USER_GROUP_TABLE . "
|
FROM " . USER_GROUP_TABLE . "
|
||||||
WHERE group_id = $group_id";
|
WHERE group_id = $group_id
|
||||||
|
AND user_pending = 0";
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
$row = $db->sql_fetchrow($result);
|
$row = $db->sql_fetchrow($result);
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
$total_members = $row['total_members'];
|
$total_members = $row['total_members'];
|
||||||
|
|
||||||
// Existing members
|
|
||||||
$sql = "SELECT u.user_id, u.username, u.user_regdate, u.user_posts
|
$sql = "SELECT u.user_id, u.username, u.user_regdate, u.user_posts
|
||||||
FROM " . USERS_TABLE . " u, " . USER_GROUP_TABLE . " ug
|
FROM " . USERS_TABLE . " u, " . USER_GROUP_TABLE . " ug
|
||||||
WHERE ug.group_id = $group_id
|
WHERE ug.group_id = $group_id
|
||||||
|
@ -525,7 +709,7 @@ function swatch()
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<form name="list" method="post" action="admin_groups.<?php echo "$phpEx$SID&action=list"; ?>"><table class="bg" width="80%" cellspacing="1" cellpadding="4" border="0" align="center">
|
<form name="list" method="post" action="admin_groups.<?php echo "$phpEx$SID&g=$group_id"; ?>"><table class="bg" width="80%" cellspacing="1" cellpadding="4" border="0" align="center">
|
||||||
<tr>
|
<tr>
|
||||||
<th><?php echo $user->lang['USERNAME']; ?></th>
|
<th><?php echo $user->lang['USERNAME']; ?></th>
|
||||||
<th><?php echo $user->lang['JOINED']; ?></th>
|
<th><?php echo $user->lang['JOINED']; ?></th>
|
||||||
|
@ -553,14 +737,23 @@ function swatch()
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="cat" colspan="4" align="right"><input class="liteoption" type="submit" name="delete" value="<?php echo $user->lang['DELETE_MARKED']; ?>" /> </td>
|
<td class="cat" colspan="4" align="right"><input type="hidden" name="mode" value="members" /><input class="liteoption" type="submit" name="delete" value="<?php echo $user->lang['DELETE_MARKED']; ?>" /> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th colspan="4"><?php echo $user->lang['ADD_USERS']; ?></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="row1" colspan="4" align="center"><textarea name="usernames" cols="40" rows="5"></textarea><br /><?php echo $user->lang['USER_GETS_GROUP_SET']; ?> <input type="radio" name="settings" value="1" checked="checked" /> <?php echo $user->lang['YES']; ?> <input type="radio" name="settings" value="0" /> <?php echo $user->lang['NO']; ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="cat" colspan="4" align="center"><input class="mainoption" type="submit" name="add" value="<?php echo $user->lang['SUBMIT']; ?>" /> <input class="liteoption" type="submit" value="<?php echo $user->lang['FIND_USERNAME']; ?>" onclick="window.open('<?php echo "../memberlist.$phpEx$SID"; ?>&mode=searchuser&form=list&field=usernames', '_phpbbsearch', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=740');return false;" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table width="80%" cellspacing="1" cellpadding="0" border="0" align="center">
|
<table width="80%" cellspacing="1" cellpadding="0" border="0" align="center">
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top"><?php echo on_page($total_members, $config['topics_per_page'], $start); ?></td>
|
<td valign="top"><?php echo on_page($total_members, $config['topics_per_page'], $start); ?></td>
|
||||||
<td align="right"><b><span class="gensmall"><a href="javascript:marklist('list', true);" class="gensmall"><?php echo $user->lang['MARK_ALL']; ?></a> :: <a href="javascript:marklist('list', false);" class="gensmall"><?php echo $user->lang['UNMARK_ALL']; ?></a></span></b> <br /><span class="nav"><?php echo generate_pagination("admin_groups.$phpEx$SID&action=list&g=$group_id", $total_members, $config['topics_per_page'], $start); ?></span></td>
|
<td align="right"><b><span class="gensmall"><a href="javascript:marklist('list', true);" class="gensmall"><?php echo $user->lang['MARK_ALL']; ?></a> :: <a href="javascript:marklist('list', false);" class="gensmall"><?php echo $user->lang['UNMARK_ALL']; ?></a></span></b> <br /><span class="nav"><?php echo generate_pagination("admin_groups.$phpEx$SID&action=list&mode=member&g=$group_id", $total_members, $config['topics_per_page'], $start); ?></span></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table></form>
|
</table></form>
|
||||||
|
|
||||||
|
|
|
@ -203,7 +203,7 @@ $lang = array_merge($lang, array(
|
||||||
'GROUP_PERMISSIONS_EXPLAIN' => 'Here you can set usergroup based permissions. These include capabilities such as the use of avatars, sending private messages, etc. To alter these settings for single users the User permissions system is the prefered method.',
|
'GROUP_PERMISSIONS_EXPLAIN' => 'Here you can set usergroup based permissions. These include capabilities such as the use of avatars, sending private messages, etc. To alter these settings for single users the User permissions system is the prefered method.',
|
||||||
'LOOK_UP_GROUP' => 'Look up Usergroup',
|
'LOOK_UP_GROUP' => 'Look up Usergroup',
|
||||||
'Manage_users' => 'Manage Users',
|
'Manage_users' => 'Manage Users',
|
||||||
'Add_users' => 'Add Users',
|
'ADD_USERS' => 'Add Users',
|
||||||
'Manage_groups' => 'Manage Groups',
|
'Manage_groups' => 'Manage Groups',
|
||||||
'Add_groups' => 'Add Groups',
|
'Add_groups' => 'Add Groups',
|
||||||
'Admin_group' => 'Administrators',
|
'Admin_group' => 'Administrators',
|
||||||
|
@ -223,6 +223,7 @@ $lang = array_merge($lang, array(
|
||||||
'Inherit' => 'Inherit',
|
'Inherit' => 'Inherit',
|
||||||
'Deny' => 'Deny',
|
'Deny' => 'Deny',
|
||||||
'Basic' => 'Basic',
|
'Basic' => 'Basic',
|
||||||
|
'USER_PRESETS' => 'User presets',
|
||||||
'ALL_ALLOW' => 'All Allow',
|
'ALL_ALLOW' => 'All Allow',
|
||||||
'ALL_DENY' => 'All Deny',
|
'ALL_DENY' => 'All Deny',
|
||||||
'ALL_INHERIT' => 'All Inherit',
|
'ALL_INHERIT' => 'All Inherit',
|
||||||
|
@ -652,12 +653,15 @@ $lang = array_merge($lang, array(
|
||||||
'GROUP_TIMEZONE' => 'Group timezone',
|
'GROUP_TIMEZONE' => 'Group timezone',
|
||||||
'GROUP_DST' => 'Group daylight savings',
|
'GROUP_DST' => 'Group daylight savings',
|
||||||
'USER_DEFAULT' => 'User default',
|
'USER_DEFAULT' => 'User default',
|
||||||
|
'USER_GETS_GROUP_SET' => 'Users inherit group settings',
|
||||||
'GROUPS_NO_MODS' => 'No group moderators defined',
|
'GROUPS_NO_MODS' => 'No group moderators defined',
|
||||||
'GROUP_ERR_USERNAME' => 'No group name specified.',
|
'GROUP_ERR_USERNAME' => 'No group name specified.',
|
||||||
'GROUP_ERR_USER_LONG' => 'Group name too long.',
|
'GROUP_ERR_USER_LONG' => 'Group name too long.',
|
||||||
'GROUP_ERR_DESC_LONG' => 'Group description too long.',
|
'GROUP_ERR_DESC_LONG' => 'Group description too long.',
|
||||||
'GROUP_ERR_TYPE' => 'Inappropriate group type specified.',
|
'GROUP_ERR_TYPE' => 'Inappropriate group type specified.',
|
||||||
'GROUP_UPDATED' => 'Group preferences updated successfully.',
|
'GROUP_UPDATED' => 'Group preferences updated successfully.',
|
||||||
|
'GROUP_USERS_ADDED' => 'New users added to group successfully.',
|
||||||
|
'GROUP_MODS_ADDED' => 'New group moderators added successfully.',
|
||||||
|
|
||||||
|
|
||||||
'FORUM_PRUNE_EXPLAIN' => 'This will delete any topic which has not been posted to within the number of days you select. If you do not enter a number then all topics will be deleted. It will not remove topics in which polls are still running nor will it remove announcements. You will need to remove these topics manually.',
|
'FORUM_PRUNE_EXPLAIN' => 'This will delete any topic which has not been posted to within the number of days you select. If you do not enter a number then all topics will be deleted. It will not remove topics in which polls are still running nor will it remove announcements. You will need to remove these topics manually.',
|
||||||
|
|
|
@ -417,7 +417,7 @@ $lang = array_merge($lang, array(
|
||||||
'Send_a_reply' => 'Reply to a private message',
|
'Send_a_reply' => 'Reply to a private message',
|
||||||
'Edit_message' => 'Edit private message',
|
'Edit_message' => 'Edit private message',
|
||||||
'Notification_subject' => 'New Private Message has arrived',
|
'Notification_subject' => 'New Private Message has arrived',
|
||||||
'Find_username' => 'Find a username',
|
'FIND_USERNAME' => 'Find a username',
|
||||||
'Find' => 'Find',
|
'Find' => 'Find',
|
||||||
'No_match' => 'No matches found',
|
'No_match' => 'No matches found',
|
||||||
'No_such_folder' => 'No such folder exists',
|
'No_such_folder' => 'No such folder exists',
|
||||||
|
|
Loading…
Add table
Reference in a new issue