diff options
author | gweltas <gweltas@piwigo.org> | 2004-12-23 14:59:37 +0000 |
---|---|---|
committer | gweltas <gweltas@piwigo.org> | 2004-12-23 14:59:37 +0000 |
commit | ac1b8354f154edc903c9fa001a1f7fdb2db82b65 (patch) | |
tree | d3c6a5d4110f7f384a1c0f91ce60006e3a408d10 | |
parent | a6d104e98f2dcb2f1de03fb13ce43083c66274a4 (diff) |
- User permissions template migration
- Categories inheritence has not yet been done
git-svn-id: http://piwigo.org/svn/trunk@655 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r-- | admin.php | 23 | ||||
-rw-r--r-- | admin/user_perm.php | 303 | ||||
-rw-r--r-- | include/functions_category.inc.php | 3 | ||||
-rw-r--r-- | include/functions_html.inc.php | 1 | ||||
-rw-r--r-- | language/en_UK.iso-8859-1/admin.lang.php | 39 | ||||
-rw-r--r-- | language/fr_FR.iso-8859-1/admin.lang.php | 39 | ||||
-rw-r--r-- | template/default/admin.tpl | 2 | ||||
-rw-r--r-- | template/default/admin/cat_options.tpl | 1 | ||||
-rw-r--r-- | template/default/admin/user_perm.tpl | 24 | ||||
-rw-r--r-- | template/default/admin/user_select_body.tpl | 7 |
10 files changed, 111 insertions, 331 deletions
@@ -41,10 +41,10 @@ switch ( $_GET['page'] ) case 'user_list': $title = $lang['title_liste_users']; $page_valide = true; break; case 'profile': - $title = $lang['title_modify']; + $title = $lang['title_user_modify']; $page_valide = true; break; - case 'user_search': + case 'user_perm': $title = $lang['title_user_perm'].' '.$username; $page_valide = true; break; case 'group_list' : @@ -203,28 +203,31 @@ $template->assign_vars(array( 'L_CAT_VISIBLE'=>$lang['lock'], 'L_CAT_STATUS'=>$lang['cat_security'], + 'U_HISTORY'=>add_session_id($link_start.'stats' ), + 'U_FAQ'=>add_session_id($link_start.'help' ), + 'U_SITES'=>add_session_id($link_start.'remote_site'), + 'U_PHPINFO'=>add_session_id($link_start.'admin_phpinfo' ), 'U_CONFIG_GENERAL'=>add_session_id($conf_link.'general' ), 'U_CONFIG_COMMENTS'=>add_session_id($conf_link.'comments' ), 'U_CONFIG_DISPLAY'=>add_session_id($conf_link.'default' ), 'U_CONFIG_UPLOAD'=>add_session_id($conf_link.'upload' ), 'U_CONFIG_SESSION'=>add_session_id($conf_link.'session' ), 'U_CONFIG_METADATA'=>add_session_id($conf_link.'metadata' ), - 'U_SITES'=>add_session_id($link_start.'remote_site'), - 'U_PHPINFO'=>add_session_id($link_start.'admin_phpinfo' ), - 'U_USERS'=>add_session_id($link_start.'profile' ), - 'U_GROUPS'=>add_session_id($link_start.'group_list' ), 'U_CATEGORIES'=>add_session_id($link_start.'cat_list' ), 'U_CAT_UPLOAD'=>add_session_id($opt_link.'upload'), 'U_CAT_COMMENTS'=>add_session_id($opt_link.'comments'), 'U_CAT_VISIBLE'=>add_session_id($opt_link.'visible'), 'U_CAT_STATUS'=>add_session_id($opt_link.'status'), + 'U_CAT_OPTIONS'=>add_session_id($link_start.'cat_options'), + 'U_CAT_UPDATE'=>add_session_id($link_start.'update'), 'U_WAITING'=>add_session_id($link_start.'waiting' ), 'U_COMMENTS'=>add_session_id($link_start.'comments' ), - 'U_CAT_UPDATE'=>add_session_id($link_start.'update'), 'U_THUMBNAILS'=>add_session_id($link_start.'thumbnail' ), - 'U_HISTORY'=>add_session_id($link_start.'stats' ), - 'U_FAQ'=>add_session_id($link_start.'help' ), - 'U_CAT_OPTIONS'=>add_session_id($link_start.'cat_options'), + 'U_USERS'=>add_session_id($link_start.'profile' ), + 'U_GROUPS'=>add_session_id($link_start.'group_list' ), + 'U_USERS_AUTH'=>add_session_id($link_start.'user_perm' ), + 'U_GROUPS_AUTH'=>add_session_id($link_start.'group_perm'), + 'U_CAT_AUTH'=>add_session_id($link_start.'cat_perm' ), 'U_RETURN'=>add_session_id(PHPWG_ROOT_PATH.'category.php') )); diff --git a/admin/user_perm.php b/admin/user_perm.php index e2fd31d1e..f8c83d659 100644 --- a/admin/user_perm.php +++ b/admin/user_perm.php @@ -29,254 +29,101 @@ if( !defined("IN_ADMIN") ) { die ("Hacking attempt!"); } - include_once( PHPWG_ROOT_PATH.'admin/include/isadmin.inc.php' ); -// -// Username search -// -function username_search($search_match) +$userdata = array(); +if ( isset( $_POST['submituser'] ) ) { - global $db, $board_config, $template, $lang, $images, $theme, $phpEx, $phpbb_root_path; - global $starttime, $gen_simple_header; - - $gen_simple_header = TRUE; - - $username_list = ''; - if ( !empty($search_match) ) - { - $username_search = preg_replace('/\*/', '%', trim(strip_tags($search_match))); - - $sql = "SELECT username - FROM " . USERS_TABLE . " - WHERE username LIKE '" . str_replace("\'", "''", $username_search) . "' - ORDER BY username"; - if ( !($result = $db->sql_query($sql)) ) - { - message_die(GENERAL_ERROR, 'Could not obtain search results', '', __LINE__, __FILE__, $sql); - } - - if ( $row = $db->sql_fetchrow($result) ) - { - do - { - $username_list .= '<option value="' . $row['username'] . '">' . $row['username'] . '</option>'; - } - while ( $row = $db->sql_fetchrow($result) ); - } - else - { - $username_list .= '<option>' . $lang['No_match']. '</option>'; - } - $db->sql_freeresult($result); - } - - $page_title = $lang['Search']; - include($phpbb_root_path . 'includes/page_header.'.$phpEx); - - $template->set_filenames(array( - 'search_user_body' => 'search_username.tpl') - ); - - $template->assign_vars(array( - 'USERNAME' => ( !empty($search_match) ) ? strip_tags($search_match) : '', - - 'L_CLOSE_WINDOW' => $lang['Close_window'], - 'L_SEARCH_USERNAME' => $lang['Find_username'], - 'L_UPDATE_USERNAME' => $lang['Select_username'], - 'L_SELECT' => $lang['Select'], - 'L_SEARCH' => $lang['Search'], - 'L_SEARCH_EXPLAIN' => $lang['search_explain'], - 'L_CLOSE_WINDOW' => $lang['Close_window'], - - 'S_USERNAME_OPTIONS' => $username_list, - 'S_SEARCH_ACTION' => append_sid("search.$phpEx?mode=searchuser")) - ); - - if ( $username_list != '' ) - { - $template->assign_block_vars('switch_select_name', array()); - } - - $template->pparse('search_user_body'); - - include($phpbb_root_path . 'includes/page_tail.'.$phpEx); - - return; + $userdata = getuserdata($_POST['username']); } - -if (isset($HTTP_POST_VARS['username']) || isset( $_POST['submit'] )) -{ -//----------------------------------------------------- template initialization -$template->set_filenames( array('user'=>'admin/user_perm.tpl') ); - -$error = array(); -$tpl = array( 'permuser_authorized','permuser_forbidden','submit', - 'permuser_parent_forbidden','permuser_info_message', - 'adduser_info_back','permuser_only_private' ); -//--------------------------------------------------------------------- updates -if ( isset( $_POST['submit'] ) ) +elseif (isset($_POST['falsify']) || isset($_POST['trueify'])) { + $userdata = getuserdata(intval($_POST['userid'])); // cleaning the user_access table for this user - $query = 'DELETE FROM '.PREFIX_TABLE.'user_access'; - $query.= ' WHERE user_id = '.$_GET['user_id']; - $query.= ';'; - pwg_query( $query ); - // selecting all private categories - $query = 'SELECT id'; - $query.= ' FROM '.PREFIX_TABLE.'categories'; - $query.= " WHERE status = 'private'"; - $query.= ';'; - $result = pwg_query( $query ); - while ( $row = mysql_fetch_array( $result ) ) + if (isset($_POST['cat_true']) && count($_POST['cat_true']) > 0) { - $radioname = 'access-'.$row['id']; - if ( $_POST[$radioname] == 0 ) - { - $query = 'INSERT INTO '.PREFIX_TABLE.'user_access'; + foreach ($_POST['cat_true'] as $auth_cat) + { + $query = 'DELETE FROM '.USER_ACCESS_TABLE; + $query.= ' WHERE user_id = '.$userdata['id']; + $query.= ' AND cat_id='.$auth_cat.';'; + pwg_query ( $query ); + } + } + + if (isset($_POST['cat_false']) && count($_POST['cat_false']) > 0) + { + foreach ($_POST['cat_false'] as $auth_cat) + { + $query = 'INSERT INTO '.USER_ACCESS_TABLE; $query.= ' (user_id,cat_id) VALUES'; - $query.= ' ('.$_GET['user_id'].','.$row['id'].')'; + $query.= ' ('.$userdata['id'].','.$auth_cat.')'; $query.= ';'; pwg_query ( $query ); - } + } } - check_favorites( $_GET['user_id'] ); - synchronize_user( $_GET['user_id'] ); - $vtp->addSession( $sub, 'confirmation' ); - $url = './admin.php?page=user_list'; - $vtp->setVar( $sub, 'confirmation.back_url', add_session_id( $url ) ); - $vtp->closeSession( $sub, 'confirmation' ); } -//---------------------------------------------------------------- form display -$restrictions = get_user_restrictions( $_GET['user_id'], $page['user_status'], - false, false ); -$action = './admin.php?page=user_perm&user_id='.$_GET['user_id']; -$vtp->setVar( $sub, 'action', add_session_id( $action ) ); -// Association of group_ids with group_names -> caching informations -$query = 'SELECT id,name'; -$query.= ' FROM '.PREFIX_TABLE.'groups'; -$query.= ';'; -$result = pwg_query( $query ); -$groups = array(); -while ( $row = mysql_fetch_array( $result ) ) -{ - $groups[$row['id']] = $row['name']; -} -// Listing of groups the user belongs to -$query = 'SELECT ug.group_id as groupid'; -$query.= ' FROM '.PREFIX_TABLE.'user_group as ug'; -$query.= ' WHERE user_id = '.$_GET['user_id']; -$query.= ';'; -$result = pwg_query( $query ); -$usergroups = array(); -while ( $row = mysql_fetch_array( $result ) ) +//----------------------------------------------------- template initialization + +if ( empty($userdata)) { - array_push( $usergroups, $row['groupid'] ); + $template->set_filenames( array('user'=>'admin/user_perm.tpl') ); + $template->assign_vars(array( + 'L_SELECT_USERNAME'=>$lang['Select_username'], + 'L_LOOKUP_USER'=>$lang['Look_up_user'], + 'L_FIND_USERNAME'=>$lang['Find_username'], + 'L_AUTH_USER'=>$lang['permuser_only_private'], + 'L_SUBMIT'=>$lang['submit'], + + 'F_SEARCH_USER_ACTION' => add_session_id(PHPWG_ROOT_PATH.'admin.php?page=user_perm'), + 'U_SEARCH_USER' => add_session_id(PHPWG_ROOT_PATH.'admin/search.php') + )); } -// only private categories are listed -$query = 'SELECT id'; -$query.= ' FROM '.PREFIX_TABLE.'categories'; -$query.= " WHERE status = 'private'"; -$query.= ';'; -$result = pwg_query( $query ); -while ( $row = mysql_fetch_array( $result ) ) +else { - $vtp->addSession( $sub, 'category' ); - $vtp->setVar( $sub, 'category.id', $row['id'] ); - // we have to know whether the user is authorized to access this - // category. The category can be accessible for this user thanks to his - // personnal access rights OR thanks to the access rights of a group he - // belongs to. - // 1. group access : - // retrieving all authorized groups for this category and for this user - $query = 'SELECT ga.group_id as groupid'; - $query.= ' FROM '.PREFIX_TABLE.'group_access as ga'; - $query.= ', '.PREFIX_TABLE.'user_group as ug'; - $query.= ' WHERE ga.group_id = ug.group_id'; - $query.= ' AND ug.user_id = '.$_GET['user_id']; - $query.= ' AND cat_id = '.$row['id']; - $query.= ';'; - $subresult = pwg_query( $query ); - $authorized_groups = array(); - while ( $subrow = mysql_fetch_array( $subresult ) ) - { - array_push( $authorized_groups, $subrow['groupid'] ); - } - // 2. personnal access - $is_user_allowed = is_user_allowed( $row['id'], $restrictions ); - // link to the category permission management - $url = './admin.php?page=cat_perm&cat_id='.$row['id']; - $vtp->setVar( $sub, 'category.cat_perm_link', add_session_id( $url ) ); - // color of the category : green if the user is allowed by himself or - // thanks to a group he belongs to - if ( $is_user_allowed == 0 or count( $authorized_groups ) > 0 ) - { - $vtp->setVar( $sub, 'category.color', 'green' ); - } - else - { - $vtp->setVar( $sub, 'category.color', 'red' ); - } - // category name - $cat_infos = get_cat_info( $row['id'] ); - $name = get_cat_display_name($cat_infos['name']); - $vtp->setVar( $sub, 'category.name', $name ); - // usergroups - if ( count( $usergroups ) > 0 ) - { - $vtp->addSession( $sub, 'usergroups' ); - foreach ( $usergroups as $i => $usergroup ) { - $vtp->addSession( $sub, 'usergroup' ); - $vtp->setVar( $sub, 'usergroup.name', $groups[$usergroup] ); - $url = './admin.php?page=group_perm&group_id='.$usergroup; - $vtp->setVar( $sub, 'usergroup.url', add_session_id( $url ) ); - if ( in_array( $usergroup, $authorized_groups ) ) - { - $vtp->setVar( $sub, 'usergroup.color', 'green' ); - } - else - { - $vtp->setVar( $sub, 'usergroup.color', 'red' ); - } - if ( $i < count( $usergroups ) - 1 ) - { - $vtp->setVar( $sub, 'usergroup.separation', ',' ); - } - $vtp->closeSession( $sub, 'usergroup' ); - } - $vtp->closeSession( $sub, 'usergroups' ); - } - // any subcat forbidden for this user ? - if ( $is_user_allowed == 2 ) - { - $vtp->addSession( $sub, 'parent_forbidden' ); - $vtp->closeSession( $sub, 'parent_forbidden' ); - } - // personnal forbidden or authorized access ? - if ( $is_user_allowed == 0 ) + $cat_url = '<a href="'.add_session_id(PHPWG_ROOT_PATH.'admin.php?page=cat_options§ion=status'); + $cat_url .= '">'.$lang['permuser_info_link'].'</a>'; + $template->set_filenames( array('user'=>'admin/cat_options.tpl') ); + $template->assign_vars(array( + 'L_RESET'=>$lang['reset'], + 'L_CAT_OPTIONS_TRUE'=>$lang['authorized'], + 'L_CAT_OPTIONS_FALSE'=>$lang['forbidden'], + 'L_CAT_OPTIONS_INFO'=>$lang['permuser_info'].' '.$cat_url, + + 'HIDDEN_NAME'=> 'userid', + 'HIDDEN_VALUE'=>$userdata['id'], + 'F_ACTION' => add_session_id(PHPWG_ROOT_PATH.'admin.php?page=user_perm'), + )); + + + // only private categories are listed + $query_true = 'SELECT id,name,uppercats,global_rank FROM '.CATEGORIES_TABLE; + $query_true.= ' LEFT JOIN '.USER_ACCESS_TABLE.' as u'; + $query_true.= ' ON u.cat_id=id'; + $query_true.= ' WHERE status = \'private\' AND u.user_id='.$userdata['id'].';'; + $result = pwg_query($query_true); + $categorie_true = array(); + while (!empty($result) && $row = mysql_fetch_array($result)) { - $vtp->setVar( $sub, 'category.authorized_checked', ' checked="checked"' ); + array_push($categorie_true, $row); } - else + + $query = 'SELECT id,name,uppercats,global_rank FROM '.CATEGORIES_TABLE; + $query.= ' WHERE status = \'private\''; + $result = pwg_query($query); + $categorie_false = array(); + while ($row = mysql_fetch_array($result)) { - $vtp->setVar( $sub, 'category.forbidden_checked', ' checked="checked"' ); + if (!in_array($row,$categorie_true)) + array_push($categorie_false, $row); } - $vtp->closeSession( $sub, 'category' ); -} -//----------------------------------------------------------- default code -else -{ -$sub = $vtp->Open( '../template/'.$user['template'].'/admin/user_select_body.vtp' ); -$tpl = array( 'Look_up_user', 'Find_username', 'Select_username' ); -templatize_array( $tpl, 'lang', $sub ); - $vtp->addSession( $sub, 'user' ); - $vtp->setVarTab( $sub, array( - 'user.S_USER_ACTION' => append_sid("./admin.php?page=user_search"), - 'user.U_SEARCH_USER' => append_sid("./search.php")) - ); - $vtp->closeSession( $sub, 'user' ); + usort($categorie_true, 'global_rank_compare'); + usort($categorie_false, 'global_rank_compare'); + display_select_categories($categorie_true, array(), 'category_option_true', true); + display_select_categories($categorie_false, array(), 'category_option_false', true); } + //----------------------------------------------------------- sending html code -$vtp->Parse( $handle , 'sub', $sub ); +$template->assign_var_from_handle('ADMIN_CONTENT', 'user'); ?> diff --git a/include/functions_category.inc.php b/include/functions_category.inc.php index 5c76dd065..1c04c70d2 100644 --- a/include/functions_category.inc.php +++ b/include/functions_category.inc.php @@ -761,10 +761,13 @@ function display_select_cat_wrapper($query, $selecteds, $blockname, { $result = pwg_query($query); $categories = array(); + if (!empty($result)) + { while ($row = mysql_fetch_array($result)) { array_push($categories, $row); } + } usort($categories, 'global_rank_compare'); display_select_categories($categories, $selecteds, $blockname, $fullname); } diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php index c60abc778..c5f4ee06b 100644 --- a/include/functions_html.inc.php +++ b/include/functions_html.inc.php @@ -222,7 +222,6 @@ function style_select($default_style, $select_name = "style") * returns only the categories name without links. * * @param array cat_informations - * @param string separator * @param string url * @param boolean replace_space * @return string diff --git a/language/en_UK.iso-8859-1/admin.lang.php b/language/en_UK.iso-8859-1/admin.lang.php index 2eeaec176..ff385e19d 100644 --- a/language/en_UK.iso-8859-1/admin.lang.php +++ b/language/en_UK.iso-8859-1/admin.lang.php @@ -228,6 +228,8 @@ $lang['infoimage_dissociated'] = 'dissociated from'; $lang['storage_category'] = 'storage category'; $lang['represents'] = 'represents'; $lang['doesnt_represent'] = 'doesn\'t represent'; +$lang['waiting_update'] = 'Validated pictures will be displayed only once pictures database updated'; +$lang['cat_unknown_id'] = 'This category is unknown in the database'; // Thumbnails $lang['tn_width'] = 'width'; @@ -285,11 +287,12 @@ $lang['update_cats_subset'] = 'reduce to single existing categories'; $lang['stats_title'] = 'Last year statistics'; $lang['stats_month_title'] = 'Monthly statistics'; $lang['stats_pages_seen'] = 'Pages seen'; -$lang['stats_empty'] = 'empty history'; $lang['stats_global_graph_title'] = 'Pages seen by month'; $lang['stats_visitors_graph_title'] = 'Nombre de visiteurs par jour'; // Users +$lang['title_user_modify'] = 'Modify a user'; +$lang['title_user_perm'] = 'Modify permission for user'; $lang['user_err_modify'] = 'This user can\'t be modified or deleted'; $lang['user_err_unknown'] = 'This user doesn\'t exist in the database'; $lang['user_management'] = 'Special field for administrators'; @@ -298,7 +301,7 @@ $lang['user_status_admin'] = 'Administrator'; $lang['user_status_guest'] = 'User'; $lang['user_delete'] = 'Delete user'; $lang['user_delete_hint'] = 'Click here to delete this user. Warning! This operation cannot be undone!'; - +$lang['permuser_only_private'] = 'Only private categories are shown'; // Groups $lang['group_confirm_delete']= 'Confirm group deletion'; @@ -311,39 +314,7 @@ $lang['group_deny_user'] = 'Deny selected'; $lang['group_add_user']= 'Add user'; - -$lang['permuser_info_message'] = 'Permissions registered'; -$lang['permuser_title'] = 'Restrictions for user'; -$lang['permuser_warning'] = 'Warning : a "<span style="font-weight:bold;">forbidden access</span>" to the root of a category prevent from accessing the whole category'; - -$lang['permuser_parent_forbidden'] = 'parent category forbidden'; -$lang['listuser_confirm'] = 'Do you really want to delete this user'; -$lang['listuser_info_deletion'] = 'was removed from database'; -$lang['listuser_user_group'] = 'Users group'; -$lang['listuser_modify'] = 'modify'; -$lang['listuser_modify_hint'] = 'modify informations of'; -$lang['listuser_permission'] = 'Permissions'; -$lang['listuser_permission_hint'] = 'modify permissions of'; - - -$lang['title_add'] = 'Add a user'; -$lang['title_modify'] = 'Modify a user'; -$lang['title_user_perm'] = 'Modify permission for user'; $lang['title_cat_perm'] = 'Modify permissions for category'; $lang['title_group_perm'] = 'Modify permissions for group'; $lang['title_picmod'] = 'Modify informations about a picture'; - -$lang['stats_pages_seen'] = 'pages seen'; -$lang['stats_visitors'] = 'guests'; -$lang['stats_empty'] = 'empty history'; -$lang['stats_pages_seen_graph_title'] = 'Number of pages seen by day'; -$lang['stats_visitors_graph_title'] = 'Number of guests by day'; -$lang['comments_last_title'] = 'Last comments'; -$lang['comments_non_validated_title'] = 'Comments waiting for validation'; - -$lang['step1_err_copy'] = 'Copy the text between hyphens and paste it into the file "include/mysql.inc.php"(Warning : mysql.inc.php must only contain what is in blue, no line return or space character)'; -$lang['permuser_only_private'] = 'Only private categories are shown'; -$lang['waiting_update'] = 'Validated pictures will be displayed only once pictures database updated'; -$lang['cat_unknown_id'] = 'This category is unknown in the database'; -$lang['install_warning'] = 'The file "install.php" is still present. Please remove it from your server. It is not secure to keep it.'; ?>
\ No newline at end of file diff --git a/language/fr_FR.iso-8859-1/admin.lang.php b/language/fr_FR.iso-8859-1/admin.lang.php index bad240705..16afa39b6 100644 --- a/language/fr_FR.iso-8859-1/admin.lang.php +++ b/language/fr_FR.iso-8859-1/admin.lang.php @@ -71,17 +71,17 @@ $lang['remote_site_update'] = 'update'; $lang['remote_site_update_hint'] = 'read remote listing.xml and updates database'; $lang['remote_site_clean'] = 'clean'; $lang['remote_site_clean_hint'] = 'remove remote listing.xml file'; -$lang['remote_site_delete'] = 'delete'; +$lang['remote_site_delete'] = 'Détruire'; $lang['remote_site_delete_hint'] = 'delete this site and all its attached elements'; $lang['remote_site_file_not_found'] = 'file create_listing_file.php on remote site was not found'; -$lang['remote_site_error'] = 'an error happened'; +$lang['remote_site_error'] = 'Une erreur est intervenue'; $lang['remote_site_listing_not_found'] = 'remote listing file was not found'; $lang['remote_site_removed'] = 'was removed on remote site'; $lang['remote_site_removed_title'] = 'Removed elements'; -$lang['remote_site_created'] = 'created'; -$lang['remote_site_deleted'] = 'deleted'; +$lang['remote_site_created'] = 'Créé'; +$lang['remote_site_deleted'] = 'Détruit'; $lang['remote_site_local_found'] = 'A local listing.xml file has been found for '; -$lang['remote_site_local_new'] = '(new site)'; +$lang['remote_site_local_new'] = '(nouveau site)'; $lang['remote_site_local_update'] = 'read local listing.xml and update'; // Category words @@ -229,7 +229,8 @@ $lang['infoimage_associated'] = 'Associé'; $lang['infoimage_dissociated'] = 'Non associé'; $lang['storage_category'] = 'Repertoire de stockage'; $lang['represents'] = 'Représente'; -$lang['doesnt_represent'] = 'doesn\'t represent'; +$lang['doesnt_represent'] = 'Autres catégories'; +$lang['cat_unknown_id'] = 'Cette catégorie n\'existe pas dans la base de données'; // Thumbnails $lang['tn_width'] = 'largeur'; @@ -291,11 +292,12 @@ $lang['update_cats_subset'] = 'Limiter la synchronisation aux catégories suivant $lang['stats_title'] = 'Historique de l\'année écoulée'; $lang['stats_month_title'] = 'Historique mois par mois'; $lang['stats_pages_seen'] = 'Pages vues'; -$lang['stats_empty'] = 'vider l\'historique'; $lang['stats_global_graph_title'] = 'Nombre de pages vues par mois'; $lang['stats_visitors_graph_title'] = 'Nombre de visiteurs par jour'; // Users +$lang['title_user_modify'] = 'Modifier un utilisateur'; +$lang['title_user_perm'] = 'Modifier les permissions pour l\'utilisateur'; $lang['user_err_modify'] = 'Cet utilisateur ne peut pas être modifé ou supprimé'; $lang['user_err_unknown'] = 'Cet utilisateur n\'existe pas dans la base de données'; $lang['user_management'] = 'Champs spéciaux pour l\'administrateur'; @@ -304,6 +306,9 @@ $lang['user_status_admin'] = 'Administrateur'; $lang['user_status_guest'] = 'Utilisateur'; $lang['user_delete'] = 'Supprimer l\'utilisateur'; $lang['user_delete_hint'] = 'Cliquez ici pour supprimer définitivement l\'utilisateur. Attention cette opération ne pourra être rétablie.'; +$lang['permuser_info'] = 'Seules les catégories déclarées en privée sont affichées. Cliquez ici pour y accéder : '; +$lang['permuser_info_link'] = 'Sécurité des catégories'; +$lang['permuser_only_private'] = 'Seules les catégories privées sont représentées'; // Groups $lang['group_list_title'] = 'Liste des groupes existants'; @@ -316,29 +321,9 @@ $lang['group_deny_user'] = 'Supprimer la sélection'; $lang['group_add_user']= 'Ajouter le membre'; -// To be done - - -$lang['permuser_info_message'] = 'Permissions enregistrées'; -$lang['permuser_title'] = 'Restrictions pour l\'utilisateur'; -$lang['permuser_warning'] = 'Attention : un "<span style="font-weight:bold;">accès interdit</span>" à la racine d\'une catégorie empêche l\'accès à toute la catégorie'; -$lang['permuser_parent_forbidden'] = 'catégorie parente interdite'; - - - -$lang['title_add'] = 'Ajouter un utilisateur'; -$lang['title_modify'] = 'Modifier un utilisateur'; - -$lang['title_user_perm'] = 'Modifier les permissions pour l\'utilisateur'; $lang['title_cat_perm'] = 'Modifier les permissions pour la catégorie'; $lang['title_group_perm'] = 'Modifier les permissions pour le groupe'; $lang['title_picmod'] = 'Modifier les informations d\'une image'; $lang['waiting_update'] = 'Les images validées ne seront visibles qu\'après mise à jour de la base d\'images.'; -$lang['permuser_only_private'] = 'Seules les catégories privées sont représentées'; - -$lang['comments_last_title'] = 'Derniers commentaires'; -$lang['comments_non_validated_title'] = 'Commentaires non validés'; -$lang['cat_unknown_id'] = 'Cette catégorie n\'existe pas dans la base de données'; -$lang['conf_remote_site_delete_info'] = 'Supprimer un site revient à supprimer toutes les images et les catégories en relation avec ce site.'; ?>
\ No newline at end of file diff --git a/template/default/admin.tpl b/template/default/admin.tpl index 1652bb45c..c342e2283 100644 --- a/template/default/admin.tpl +++ b/template/default/admin.tpl @@ -61,9 +61,9 @@ <div class="titreMenu">{L_AUTH}</div> <div class="menu"> <ul class="menu"> - <li><a class="adminMenu" href="{U_AUTH}">{L_AUTH}</a></li> <li><a class="adminMenu" href="{U_USERS_AUTH}">{L_USERS}</a></li> <li><a class="adminMenu" href="{U_GROUPS_AUTH}">{L_GROUPS}</a></li> + <li><a class="adminMenu" href="{U_CAT_AUTH}">{L_CATEGORIES}</a></li </ul> </div> </div> diff --git a/template/default/admin/cat_options.tpl b/template/default/admin/cat_options.tpl index 91e63b8a2..1e9704011 100644 --- a/template/default/admin/cat_options.tpl +++ b/template/default/admin/cat_options.tpl @@ -24,6 +24,7 @@ </div> </div> <div style="clear:both;"></div> +<input type="hidden" name="{HIDDEN_NAME}" value="{HIDDEN_VALUE}" /> <input type="reset" name="reset" value="{L_RESET}" class="bouton" /> </form> <div class="information">{L_CAT_OPTIONS_INFO}</div> diff --git a/template/default/admin/user_perm.tpl b/template/default/admin/user_perm.tpl index f6fa3ba2a..e3944fe42 100644 --- a/template/default/admin/user_perm.tpl +++ b/template/default/admin/user_perm.tpl @@ -1,28 +1,6 @@ -<!-- BEGIN search --> <div class="admin">{L_SELECT_USERNAME}</div> <form method="post" name="post" action="{F_SEARCH_USER_ACTION}"> <input type="text" name="username" maxlength="50" size="20" /> - <input type="hidden" name="mode" value="edit" />{S_HIDDEN_FIELDS} <input type="submit" name="submituser" value="{L_LOOKUP_USER}" class="bouton" /> <input type="submit" name="usersubmit" value="{L_FIND_USERNAME}" class="bouton" onClick="window.open('{U_SEARCH_USER}', '_phpwgsearch', 'HEIGHT=250,resizable=yes,WIDTH=400');return false;" /> -</form> -<!-- END search --> -<!-- BEGIN permission --> -<div class="admin">{L_AUTH_USER} {USERNAME}</div> -<form action="{F_AUTH_ACTION}" method="POST"> - <ul class="menu"> - <!-- BEGIN category --> - <li> - <input type="radio" name="{permission.category.CAT_ID}" value="0" {permission.category.AUTH_YES}/>{L_AUTHORIZED} - <input type="radio" name="{permission.category.CAT_ID}" value="1" {permission.category.AUTH_NO}/>{L_FORBIDDEN} - : - <a href="{permission.category.CAT_URL}">{permission.category.CAT_NAME}</a> - <!-- BEGIN parent_forbidden --> - {L_PARENT_FORBIDDEN} - - <!-- END parent_forbidden --> - </li> - <!-- END category --> - </ul> - <input type="submit" name="submit" class="bouton" value="{L_SUBMIT}"/> -</form> -<!-- END permission --> +</form>
\ No newline at end of file diff --git a/template/default/admin/user_select_body.tpl b/template/default/admin/user_select_body.tpl deleted file mode 100644 index 6790c2d00..000000000 --- a/template/default/admin/user_select_body.tpl +++ /dev/null @@ -1,7 +0,0 @@ -<div class="admin">{L_SELECT_USERNAME}</div> -<form method="post" name="post" action="{F_USER_ACTION}"> - <input type="text" name="username" maxlength="50" size="20" /> - <input type="hidden" name="mode" value="edit" />{S_HIDDEN_FIELDS} - <input type="submit" name="submituser" value="{L_LOOKUP_USER}" /> - <input type="submit" name="usersubmit" value="{L_FIND_USERNAME}" onClick="window.open('{U_SEARCH_USER}', '_phpwgsearch', 'HEIGHT=250,resizable=yes,WIDTH=400');return false;" /> -</form>
\ No newline at end of file |