aboutsummaryrefslogtreecommitdiffstats
path: root/admin/group_list.php
diff options
context:
space:
mode:
authorgweltas <gweltas@piwigo.org>2005-01-06 16:33:04 +0000
committergweltas <gweltas@piwigo.org>2005-01-06 16:33:04 +0000
commit22e0536a05bbb6bca313dd05225bc4bb1963e0dc (patch)
tree89d5975d8ed2365a63b5263136c28cd3095e5e8e /admin/group_list.php
parent0d8918b7d89eac72238ac2ea990f2ec4668d9e0a (diff)
- Group permission delivery
- Reorganisation of common.lang.php git-svn-id: http://piwigo.org/svn/trunk@671 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/group_list.php')
-rw-r--r--admin/group_list.php59
1 files changed, 28 insertions, 31 deletions
diff --git a/admin/group_list.php b/admin/group_list.php
index d399a6d69..2d9ff7e26 100644
--- a/admin/group_list.php
+++ b/admin/group_list.php
@@ -135,28 +135,25 @@ $groups_display .= '</select>';
$action = PHPWG_ROOT_PATH.'admin.php?page=group_list';
//----------------------------------------------------- template initialization
$template->set_filenames( array('groups'=>'admin/group_list.tpl') );
-$tpl = array( 'group_add','add','listuser_permission','delete',
- 'group_confirm','yes','no','group_list_title' );
-
$template->assign_vars(array(
'S_GROUP_SELECT'=>$groups_display,
'L_GROUP_SELECT'=>$lang['group_list_title'],
- 'L_GROUP_CONFIRM'=>$lang['group_confirm_delete'],
- 'L_LOOK_UP'=>$lang['edit'],
- 'L_GROUP_DELETE'=>$lang['delete'],
+ 'L_GROUP_CONFIRM'=>$lang['group_confirm_delete'],
+ 'L_LOOK_UP'=>$lang['edit'],
+ 'L_GROUP_DELETE'=>$lang['delete'],
'L_CREATE_NEW_GROUP'=>$lang['group_add'],
'L_GROUP_EDIT'=>$lang['group_edit'],
- 'L_USER_NAME'=>$lang['login'],
- 'L_USER_EMAIL'=>$lang['mail_address'],
- 'L_USER_SELECT'=>$lang['Select'],
- 'L_DENY_SELECTED'=>$lang['group_deny_user'],
- 'L_ADD_MEMBER'=>$lang['group_add_user'],
+ 'L_USER_NAME'=>$lang['login'],
+ 'L_USER_EMAIL'=>$lang['mail_address'],
+ 'L_USER_SELECT'=>$lang['Select'],
+ 'L_DENY_SELECTED'=>$lang['group_deny_user'],
+ 'L_ADD_MEMBER'=>$lang['group_add_user'],
'L_FIND_USERNAME'=>$lang['Find_username'],
- 'S_GROUP_ACTION'=>add_session_id($action),
- 'U_SEARCH_USER' => add_session_id(PHPWG_ROOT_PATH.'admin/search.php')
- ));
+ 'S_GROUP_ACTION'=>add_session_id($action),
+ 'U_SEARCH_USER' => add_session_id(PHPWG_ROOT_PATH.'admin/search.php')
+ ));
if ($groups_nb)
{
@@ -167,32 +164,32 @@ if ($groups_nb)
if ( isset( $_POST['edit']) || isset( $_POST['add']) || isset( $_POST['deny_user'] ))
{
// Retrieving the group name
- $query = 'SELECT id, name FROM '.GROUPS_TABLE;
+ $query = 'SELECT id, name FROM '.GROUPS_TABLE;
$query.= " WHERE id = '".$_POST['group_id']."'";
$query.= ';';
$result = mysql_fetch_array(pwg_query( $query ));
$template->assign_block_vars('edit_group',array(
'GROUP_NAME'=>$result['name'],
- 'GROUP_ID'=>$result['id']
+ 'GROUP_ID'=>$result['id']
));
// Retrieving all the users
- $query = 'SELECT id, username, mail_address';
- $query.= ' FROM ('.USERS_TABLE.' as u';
- $query.= ' LEFT JOIN '.USER_GROUP_TABLE.' as ug ON ug.user_id=u.id)';
+ $query = 'SELECT id, username, mail_address';
+ $query.= ' FROM ('.USERS_TABLE.' as u';
+ $query.= ' LEFT JOIN '.USER_GROUP_TABLE.' as ug ON ug.user_id=u.id)';
$query.= " WHERE ug.group_id = '".$_POST['group_id']."';";
- $result = pwg_query( $query );
- $i=0;
- while ( $row = mysql_fetch_array( $result ) )
- {
- $class = ($i % 2)? 'row1':'row2'; $i++;
- $template->assign_block_vars('edit_group.user',array(
- 'ID'=>$row['id'],
- 'NAME'=>$row['username'],
- 'EMAIL'=>$row['mail_address'],
- 'T_CLASS'=>$class
- ));
- }
+ $result = pwg_query( $query );
+ $i=0;
+ while ( $row = mysql_fetch_array( $result ) )
+ {
+ $class = ($i % 2)? 'row1':'row2'; $i++;
+ $template->assign_block_vars('edit_group.user',array(
+ 'ID'=>$row['id'],
+ 'NAME'=>$row['username'],
+ 'EMAIL'=>$row['mail_address'],
+ 'T_CLASS'=>$class
+ ));
+ }
}
//----------------------------------------------------------- sending html code