Changeset 655


Ignore:
Timestamp:
Dec 23, 2004, 3:59:37 PM (19 years ago)
Author:
gweltas
Message:
  • User permissions template migration
  • Categories inheritence has not yet been done
Location:
trunk
Files:
1 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin.php

    r646 r655  
    4242   $title = $lang['title_liste_users'];   $page_valide = true; break;
    4343 case 'profile':
    44    $title = $lang['title_modify'];
     44   $title = $lang['title_user_modify'];
    4545         $page_valide = true;
    4646         break;
    47  case 'user_search':
     47 case 'user_perm':
    4848   $title = $lang['title_user_perm'].' '.$username;
    4949   $page_valide = true; break;
     
    204204  'L_CAT_STATUS'=>$lang['cat_security'],
    205205
     206  'U_HISTORY'=>add_session_id($link_start.'stats' ),
     207  'U_FAQ'=>add_session_id($link_start.'help' ),
     208  'U_SITES'=>add_session_id($link_start.'remote_site'),
     209  'U_PHPINFO'=>add_session_id($link_start.'admin_phpinfo' ),
    206210  'U_CONFIG_GENERAL'=>add_session_id($conf_link.'general' ),
    207211  'U_CONFIG_COMMENTS'=>add_session_id($conf_link.'comments' ),
     
    210214  'U_CONFIG_SESSION'=>add_session_id($conf_link.'session' ),
    211215  'U_CONFIG_METADATA'=>add_session_id($conf_link.'metadata' ),
    212   'U_SITES'=>add_session_id($link_start.'remote_site'),
    213   'U_PHPINFO'=>add_session_id($link_start.'admin_phpinfo' ),
    214   'U_USERS'=>add_session_id($link_start.'profile' ),
    215   'U_GROUPS'=>add_session_id($link_start.'group_list' ),
    216216  'U_CATEGORIES'=>add_session_id($link_start.'cat_list' ),
    217217  'U_CAT_UPLOAD'=>add_session_id($opt_link.'upload'),
     
    219219  'U_CAT_VISIBLE'=>add_session_id($opt_link.'visible'),
    220220  'U_CAT_STATUS'=>add_session_id($opt_link.'status'),
     221  'U_CAT_OPTIONS'=>add_session_id($link_start.'cat_options'),
     222  'U_CAT_UPDATE'=>add_session_id($link_start.'update'),
    221223  'U_WAITING'=>add_session_id($link_start.'waiting' ),
    222224  'U_COMMENTS'=>add_session_id($link_start.'comments' ),
    223   'U_CAT_UPDATE'=>add_session_id($link_start.'update'),
    224225  'U_THUMBNAILS'=>add_session_id($link_start.'thumbnail' ),
    225   'U_HISTORY'=>add_session_id($link_start.'stats' ),
    226   'U_FAQ'=>add_session_id($link_start.'help' ),
    227   'U_CAT_OPTIONS'=>add_session_id($link_start.'cat_options'),
     226  'U_USERS'=>add_session_id($link_start.'profile' ),
     227  'U_GROUPS'=>add_session_id($link_start.'group_list' ),
     228  'U_USERS_AUTH'=>add_session_id($link_start.'user_perm' ),
     229  'U_GROUPS_AUTH'=>add_session_id($link_start.'group_perm'),
     230  'U_CAT_AUTH'=>add_session_id($link_start.'cat_perm' ),
    228231  'U_RETURN'=>add_session_id(PHPWG_ROOT_PATH.'category.php')
    229232  ));
  • trunk/admin/user_perm.php

    r642 r655  
    3030  die ("Hacking attempt!");
    3131}
    32 
    3332include_once( PHPWG_ROOT_PATH.'admin/include/isadmin.inc.php' );
    3433
    35 //
    36 // Username search
    37 //
    38 function username_search($search_match)
     34$userdata = array();
     35if ( isset( $_POST['submituser'] ) )
    3936{
    40   global $db, $board_config, $template, $lang, $images, $theme, $phpEx, $phpbb_root_path;
    41   global $starttime, $gen_simple_header;
     37  $userdata = getuserdata($_POST['username']);
     38}
     39elseif (isset($_POST['falsify']) || isset($_POST['trueify']))
     40{
     41  $userdata = getuserdata(intval($_POST['userid']));
     42  // cleaning the user_access table for this user
     43  if (isset($_POST['cat_true']) && count($_POST['cat_true']) > 0)
     44  {
     45    foreach ($_POST['cat_true'] as $auth_cat)
     46        {
     47          $query = 'DELETE FROM '.USER_ACCESS_TABLE;
     48      $query.= ' WHERE user_id = '.$userdata['id'];
     49      $query.= ' AND cat_id='.$auth_cat.';';
     50      pwg_query ( $query );
     51        }
     52  }
    4253 
    43   $gen_simple_header = TRUE;
    44 
    45   $username_list = '';
    46   if ( !empty($search_match) )
     54  if (isset($_POST['cat_false']) && count($_POST['cat_false']) > 0)
    4755  {
    48     $username_search = preg_replace('/\*/', '%', trim(strip_tags($search_match)));
    49 
    50     $sql = "SELECT username
    51       FROM " . USERS_TABLE . "
    52       WHERE username LIKE '" . str_replace("\'", "''", $username_search) . "'
    53       ORDER BY username";
    54     if ( !($result = $db->sql_query($sql)) )
    55     {
    56       message_die(GENERAL_ERROR, 'Could not obtain search results', '', __LINE__, __FILE__, $sql);
    57     }
    58 
    59     if ( $row = $db->sql_fetchrow($result) )
    60     {
    61       do
    62       {
    63         $username_list .= '<option value="' . $row['username'] . '">' . $row['username'] . '</option>';
    64       }
    65       while ( $row = $db->sql_fetchrow($result) );
    66     }
    67     else
    68     {
    69       $username_list .= '<option>' . $lang['No_match']. '</option>';
    70     }
    71     $db->sql_freeresult($result);
     56    foreach ($_POST['cat_false'] as $auth_cat)
     57        {
     58          $query = 'INSERT INTO '.USER_ACCESS_TABLE;
     59      $query.= ' (user_id,cat_id) VALUES';
     60      $query.= ' ('.$userdata['id'].','.$auth_cat.')';
     61      $query.= ';';
     62      pwg_query ( $query );
     63        }
    7264  }
    73 
    74   $page_title = $lang['Search'];
    75   include($phpbb_root_path . 'includes/page_header.'.$phpEx);
    76 
    77   $template->set_filenames(array(
    78     'search_user_body' => 'search_username.tpl')
    79   );
    80 
    81   $template->assign_vars(array(
    82     'USERNAME' => ( !empty($search_match) ) ? strip_tags($search_match) : '',
    83 
    84     'L_CLOSE_WINDOW' => $lang['Close_window'],
    85     'L_SEARCH_USERNAME' => $lang['Find_username'],
    86     'L_UPDATE_USERNAME' => $lang['Select_username'],
    87     'L_SELECT' => $lang['Select'],
    88     'L_SEARCH' => $lang['Search'],
    89     'L_SEARCH_EXPLAIN' => $lang['search_explain'],
    90     'L_CLOSE_WINDOW' => $lang['Close_window'],
    91 
    92     'S_USERNAME_OPTIONS' => $username_list,
    93     'S_SEARCH_ACTION' => append_sid("search.$phpEx?mode=searchuser"))
    94   );
    95 
    96   if ( $username_list != '' )
    97   {
    98     $template->assign_block_vars('switch_select_name', array());
    99   }
    100 
    101   $template->pparse('search_user_body');
    102 
    103   include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
    104 
    105   return;
    10665}
    10766
    108 if  (isset($HTTP_POST_VARS['username']) || isset( $_POST['submit'] ))
     67//----------------------------------------------------- template initialization
     68
     69if ( empty($userdata))
    10970{
    110 //----------------------------------------------------- template initialization
    111 $template->set_filenames( array('user'=>'admin/user_perm.tpl') );
     71  $template->set_filenames( array('user'=>'admin/user_perm.tpl') );
     72  $template->assign_vars(array(
     73    'L_SELECT_USERNAME'=>$lang['Select_username'],
     74    'L_LOOKUP_USER'=>$lang['Look_up_user'],
     75    'L_FIND_USERNAME'=>$lang['Find_username'],
     76    'L_AUTH_USER'=>$lang['permuser_only_private'],
     77    'L_SUBMIT'=>$lang['submit'],
    11278
    113 $error = array();
    114 $tpl = array( 'permuser_authorized','permuser_forbidden','submit',
    115               'permuser_parent_forbidden','permuser_info_message',
    116               'adduser_info_back','permuser_only_private' );
    117 //--------------------------------------------------------------------- updates
    118 if ( isset( $_POST['submit'] ) )
    119 {
    120   // cleaning the user_access table for this user
    121   $query = 'DELETE FROM '.PREFIX_TABLE.'user_access';
    122   $query.= ' WHERE user_id = '.$_GET['user_id'];
    123   $query.= ';';
    124   pwg_query( $query );
    125   // selecting all private categories
    126   $query = 'SELECT id';
    127   $query.= ' FROM '.PREFIX_TABLE.'categories';
    128   $query.= " WHERE status = 'private'";
    129   $query.= ';';
    130   $result = pwg_query( $query );
    131   while ( $row = mysql_fetch_array( $result ) )
    132   {
    133     $radioname = 'access-'.$row['id'];
    134     if ( $_POST[$radioname] == 0 )
    135     {
    136       $query = 'INSERT INTO '.PREFIX_TABLE.'user_access';
    137       $query.= ' (user_id,cat_id) VALUES';
    138       $query.= ' ('.$_GET['user_id'].','.$row['id'].')';
    139       $query.= ';';
    140       pwg_query ( $query );
    141     }
    142   }
    143   check_favorites( $_GET['user_id'] );
    144   synchronize_user( $_GET['user_id'] );
    145   $vtp->addSession( $sub, 'confirmation' );
    146   $url = './admin.php?page=user_list';
    147   $vtp->setVar( $sub, 'confirmation.back_url', add_session_id( $url ) );
    148   $vtp->closeSession( $sub, 'confirmation' );
     79    'F_SEARCH_USER_ACTION' => add_session_id(PHPWG_ROOT_PATH.'admin.php?page=user_perm'),
     80    'U_SEARCH_USER' => add_session_id(PHPWG_ROOT_PATH.'admin/search.php')
     81    ));
    14982}
    150 //---------------------------------------------------------------- form display
    151 
    152 $restrictions = get_user_restrictions( $_GET['user_id'], $page['user_status'],
    153                                   false, false );
    154 $action = './admin.php?page=user_perm&amp;user_id='.$_GET['user_id'];
    155 $vtp->setVar( $sub, 'action', add_session_id( $action ) );
    156 // Association of group_ids with group_names -> caching informations
    157 $query = 'SELECT id,name';
    158 $query.= ' FROM '.PREFIX_TABLE.'groups';
    159 $query.= ';';
    160 $result = pwg_query( $query );
    161 $groups = array();
    162 while ( $row = mysql_fetch_array( $result ) )
    163 {
    164   $groups[$row['id']] = $row['name'];
    165 }
    166 // Listing of groups the user belongs to
    167 $query = 'SELECT ug.group_id as groupid';
    168 $query.= ' FROM '.PREFIX_TABLE.'user_group as ug';
    169 $query.= ' WHERE user_id = '.$_GET['user_id'];
    170 $query.= ';';
    171 $result = pwg_query( $query );
    172 $usergroups = array();
    173 while ( $row = mysql_fetch_array( $result ) )
    174 {
    175   array_push( $usergroups, $row['groupid'] );
    176 }
    177 // only private categories are listed
    178 $query = 'SELECT id';
    179 $query.= ' FROM '.PREFIX_TABLE.'categories';
    180 $query.= " WHERE status = 'private'";
    181 $query.= ';';
    182 $result = pwg_query( $query );
    183 while ( $row = mysql_fetch_array( $result ) )
    184 {
    185   $vtp->addSession( $sub, 'category' );
    186   $vtp->setVar( $sub, 'category.id', $row['id'] );
    187   // we have to know whether the user is authorized to access this
    188   // category. The category can be accessible for this user thanks to his
    189   // personnal access rights OR thanks to the access rights of a group he
    190   // belongs to.
    191   // 1. group access :
    192   //    retrieving all authorized groups for this category and for this user
    193   $query = 'SELECT ga.group_id as groupid';
    194   $query.= ' FROM '.PREFIX_TABLE.'group_access as ga';
    195   $query.= ', '.PREFIX_TABLE.'user_group as ug';
    196   $query.= ' WHERE ga.group_id = ug.group_id';
    197   $query.= ' AND ug.user_id = '.$_GET['user_id'];
    198   $query.= ' AND cat_id = '.$row['id'];
    199   $query.= ';';
    200   $subresult = pwg_query( $query );
    201   $authorized_groups = array();
    202   while ( $subrow = mysql_fetch_array( $subresult ) )
    203   {
    204     array_push( $authorized_groups, $subrow['groupid'] );
    205   }
    206   // 2. personnal access
    207   $is_user_allowed = is_user_allowed( $row['id'], $restrictions );
    208   // link to the category permission management
    209   $url = './admin.php?page=cat_perm&amp;cat_id='.$row['id'];
    210   $vtp->setVar( $sub, 'category.cat_perm_link', add_session_id( $url ) );
    211   // color of the category : green if the user is allowed by himself or
    212   // thanks to a group he belongs to
    213   if ( $is_user_allowed == 0 or count( $authorized_groups ) > 0 )
    214   {
    215     $vtp->setVar( $sub, 'category.color', 'green' );
    216   }
    217   else
    218   {
    219     $vtp->setVar( $sub, 'category.color', 'red' );
    220   }
    221   // category name
    222   $cat_infos = get_cat_info( $row['id'] );
    223   $name = get_cat_display_name($cat_infos['name']);
    224   $vtp->setVar( $sub, 'category.name', $name );
    225   // usergroups
    226   if ( count( $usergroups ) > 0 )
    227   {
    228     $vtp->addSession( $sub, 'usergroups' );
    229     foreach ( $usergroups as $i => $usergroup ) {
    230       $vtp->addSession( $sub, 'usergroup' );
    231       $vtp->setVar( $sub, 'usergroup.name', $groups[$usergroup] );
    232       $url = './admin.php?page=group_perm&amp;group_id='.$usergroup;
    233       $vtp->setVar( $sub, 'usergroup.url', add_session_id( $url ) );
    234       if ( in_array( $usergroup, $authorized_groups ) )
    235       {
    236         $vtp->setVar( $sub, 'usergroup.color', 'green' );
    237       }
    238       else
    239       {
    240         $vtp->setVar( $sub, 'usergroup.color', 'red' );
    241       }
    242       if ( $i < count( $usergroups ) - 1 )
    243       {
    244         $vtp->setVar( $sub, 'usergroup.separation', ',' );
    245       }
    246       $vtp->closeSession( $sub, 'usergroup' );
    247     }
    248     $vtp->closeSession( $sub, 'usergroups' );
    249   }
    250   // any subcat forbidden for this user ?
    251   if ( $is_user_allowed == 2 )
    252   {
    253     $vtp->addSession( $sub, 'parent_forbidden' );
    254     $vtp->closeSession( $sub, 'parent_forbidden' );
    255   }
    256   // personnal forbidden or authorized access ?
    257   if ( $is_user_allowed == 0 )
    258   {
    259     $vtp->setVar( $sub, 'category.authorized_checked', ' checked="checked"' );
    260   }
    261   else
    262   {
    263     $vtp->setVar( $sub, 'category.forbidden_checked', ' checked="checked"' );
    264   }
    265   $vtp->closeSession( $sub, 'category' );
    266 }
    267 //----------------------------------------------------------- default code
    26883else
    26984{
    270 $sub = $vtp->Open( '../template/'.$user['template'].'/admin/user_select_body.vtp' );
    271 $tpl = array( 'Look_up_user', 'Find_username', 'Select_username' );
    272 templatize_array( $tpl, 'lang', $sub );
    273   $vtp->addSession( $sub, 'user' );
    274   $vtp->setVarTab( $sub, array(
    275       'user.S_USER_ACTION' => append_sid("./admin.php?page=user_search"),
    276     'user.U_SEARCH_USER' => append_sid("./search.php"))
    277     );
    278   $vtp->closeSession( $sub, 'user' );
     85  $cat_url = '<a href="'.add_session_id(PHPWG_ROOT_PATH.'admin.php?page=cat_options&section=status');
     86  $cat_url .= '">'.$lang['permuser_info_link'].'</a>';
     87  $template->set_filenames( array('user'=>'admin/cat_options.tpl') );
     88  $template->assign_vars(array(
     89    'L_RESET'=>$lang['reset'],
     90    'L_CAT_OPTIONS_TRUE'=>$lang['authorized'],
     91    'L_CAT_OPTIONS_FALSE'=>$lang['forbidden'],
     92    'L_CAT_OPTIONS_INFO'=>$lang['permuser_info'].'&nbsp;'.$cat_url,
     93       
     94        'HIDDEN_NAME'=> 'userid',
     95        'HIDDEN_VALUE'=>$userdata['id'],
     96    'F_ACTION' => add_session_id(PHPWG_ROOT_PATH.'admin.php?page=user_perm'),
     97    ));
     98
     99
     100  // only private categories are listed
     101  $query_true = 'SELECT id,name,uppercats,global_rank FROM '.CATEGORIES_TABLE;
     102  $query_true.= ' LEFT JOIN '.USER_ACCESS_TABLE.' as u';
     103  $query_true.= ' ON u.cat_id=id';
     104  $query_true.= ' WHERE status = \'private\' AND u.user_id='.$userdata['id'].';';
     105  $result = pwg_query($query_true);
     106  $categorie_true = array();
     107  while (!empty($result) && $row = mysql_fetch_array($result))
     108  {
     109    array_push($categorie_true, $row);
     110  }
     111 
     112  $query = 'SELECT id,name,uppercats,global_rank FROM '.CATEGORIES_TABLE;
     113  $query.= ' WHERE status = \'private\'';
     114  $result = pwg_query($query);
     115  $categorie_false = array();
     116  while ($row = mysql_fetch_array($result))
     117  {
     118    if (!in_array($row,$categorie_true))
     119          array_push($categorie_false, $row);
     120  }
     121  usort($categorie_true, 'global_rank_compare');
     122  usort($categorie_false, 'global_rank_compare');
     123  display_select_categories($categorie_true, array(), 'category_option_true', true);
     124  display_select_categories($categorie_false, array(), 'category_option_false', true);
    279125}
     126
    280127//----------------------------------------------------------- sending html code
    281 $vtp->Parse( $handle , 'sub', $sub );
     128$template->assign_var_from_handle('ADMIN_CONTENT', 'user');
    282129?>
  • trunk/include/functions_category.inc.php

    r654 r655  
    762762  $result = pwg_query($query);
    763763  $categories = array();
     764  if (!empty($result))
     765  {
    764766  while ($row = mysql_fetch_array($result))
    765767  {
    766768    array_push($categories, $row);
     769  }
    767770  }
    768771  usort($categories, 'global_rank_compare');
  • trunk/include/functions_html.inc.php

    r647 r655  
    223223 *
    224224 * @param array cat_informations
    225  * @param string separator
    226225 * @param string url
    227226 * @param boolean replace_space
  • trunk/language/en_UK.iso-8859-1/admin.lang.php

    r653 r655  
    229229$lang['represents'] = 'represents';
    230230$lang['doesnt_represent'] = 'doesn\'t represent';
     231$lang['waiting_update'] = 'Validated pictures will be displayed only once pictures database updated';
     232$lang['cat_unknown_id'] = 'This category is unknown in the database';
    231233
    232234// Thumbnails
     
    286288$lang['stats_month_title'] = 'Monthly statistics';
    287289$lang['stats_pages_seen'] = 'Pages seen';
    288 $lang['stats_empty'] = 'empty history';
    289290$lang['stats_global_graph_title'] = 'Pages seen by month';
    290291$lang['stats_visitors_graph_title'] = 'Nombre de visiteurs par jour';
    291292
    292293// Users
     294$lang['title_user_modify'] = 'Modify a user';
     295$lang['title_user_perm'] = 'Modify permission for user';
    293296$lang['user_err_modify'] = 'This user can\'t be modified or deleted';
    294297$lang['user_err_unknown'] = 'This user doesn\'t exist in the database';
     
    299302$lang['user_delete'] = 'Delete user';
    300303$lang['user_delete_hint'] = 'Click here to delete this user. Warning! This operation cannot be undone!';
    301 
     304$lang['permuser_only_private'] = 'Only private categories are shown';
    302305
    303306// Groups
     
    312315
    313316
    314 
    315 $lang['permuser_info_message'] = 'Permissions registered';
    316 $lang['permuser_title'] = 'Restrictions for user';
    317 $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';
    318 
    319 $lang['permuser_parent_forbidden'] = 'parent category forbidden';
    320 $lang['listuser_confirm'] = 'Do you really want to delete this user';
    321 $lang['listuser_info_deletion'] = 'was removed from database';
    322 $lang['listuser_user_group'] = 'Users group';
    323 $lang['listuser_modify'] = 'modify';
    324 $lang['listuser_modify_hint'] = 'modify informations of';
    325 $lang['listuser_permission'] = 'Permissions';
    326 $lang['listuser_permission_hint'] = 'modify permissions of';
    327 
    328 
    329 $lang['title_add'] = 'Add a user';
    330 $lang['title_modify'] = 'Modify a user';
    331 $lang['title_user_perm'] = 'Modify permission for user';
    332317$lang['title_cat_perm'] = 'Modify permissions for category';
    333318$lang['title_group_perm'] = 'Modify permissions for group';
    334319$lang['title_picmod'] = 'Modify informations about a picture';
    335 
    336 $lang['stats_pages_seen'] = 'pages seen';
    337 $lang['stats_visitors'] = 'guests';
    338 $lang['stats_empty'] = 'empty history';
    339 $lang['stats_pages_seen_graph_title'] = 'Number of pages seen by day';
    340 $lang['stats_visitors_graph_title'] = 'Number of guests by day';
    341 $lang['comments_last_title'] = 'Last comments';
    342 $lang['comments_non_validated_title'] = 'Comments waiting for validation';
    343 
    344 $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)';
    345 $lang['permuser_only_private'] = 'Only private categories are shown';
    346 $lang['waiting_update'] = 'Validated pictures will be displayed only once pictures database updated';
    347 $lang['cat_unknown_id'] = 'This category is unknown in the database';
    348 $lang['install_warning'] = 'The file "install.php" is still present. Please remove it from your server. It is not secure to keep it.';
    349320?>
  • trunk/language/fr_FR.iso-8859-1/admin.lang.php

    r654 r655  
    7272$lang['remote_site_clean'] = 'clean';
    7373$lang['remote_site_clean_hint'] = 'remove remote listing.xml file';
    74 $lang['remote_site_delete'] = 'delete';
     74$lang['remote_site_delete'] = 'Détruire';
    7575$lang['remote_site_delete_hint'] = 'delete this site and all its attached elements';
    7676$lang['remote_site_file_not_found'] = 'file create_listing_file.php on remote site was not found';
    77 $lang['remote_site_error'] = 'an error happened';
     77$lang['remote_site_error'] = 'Une erreur est intervenue';
    7878$lang['remote_site_listing_not_found'] = 'remote listing file was not found';
    7979$lang['remote_site_removed'] = 'was removed on remote site';
    8080$lang['remote_site_removed_title'] = 'Removed elements';
    81 $lang['remote_site_created'] = 'created';
    82 $lang['remote_site_deleted'] = 'deleted';
     81$lang['remote_site_created'] = 'Créé';
     82$lang['remote_site_deleted'] = 'Détruit';
    8383$lang['remote_site_local_found'] = 'A local listing.xml file has been found for ';
    84 $lang['remote_site_local_new'] = '(new site)';
     84$lang['remote_site_local_new'] = '(nouveau site)';
    8585$lang['remote_site_local_update'] = 'read local listing.xml and update';
    8686
     
    230230$lang['storage_category'] = 'Repertoire de stockage';
    231231$lang['represents'] = 'Représente';
    232 $lang['doesnt_represent'] = 'doesn\'t represent';
     232$lang['doesnt_represent'] = 'Autres catégories';
     233$lang['cat_unknown_id'] = 'Cette catégorie n\'existe pas dans la base de données';
    233234
    234235// Thumbnails
     
    292293$lang['stats_month_title'] = 'Historique mois par mois';
    293294$lang['stats_pages_seen'] = 'Pages vues';
    294 $lang['stats_empty'] = 'vider l\'historique';
    295295$lang['stats_global_graph_title'] = 'Nombre de pages vues par mois';
    296296$lang['stats_visitors_graph_title'] = 'Nombre de visiteurs par jour';
    297297
    298298// Users
     299$lang['title_user_modify'] = 'Modifier un utilisateur';
     300$lang['title_user_perm'] = 'Modifier les permissions pour l\'utilisateur';
    299301$lang['user_err_modify'] = 'Cet utilisateur ne peut pas être modifé ou supprimé';
    300302$lang['user_err_unknown'] = 'Cet utilisateur n\'existe pas dans la base de données';
     
    305307$lang['user_delete'] = 'Supprimer l\'utilisateur';
    306308$lang['user_delete_hint'] = 'Cliquez ici pour supprimer définitivement l\'utilisateur. Attention cette opération ne pourra être rétablie.';
     309$lang['permuser_info'] = 'Seules les catégories déclarées en privée sont affichées. Cliquez ici pour y accéder : ';
     310$lang['permuser_info_link'] = 'Sécurité des catégories';
     311$lang['permuser_only_private'] = 'Seules les catégories privées sont représentées';
    307312
    308313// Groups
     
    317322
    318323
    319 // To be done
    320 
    321 
    322 $lang['permuser_info_message'] = 'Permissions enregistrées';
    323 $lang['permuser_title'] = 'Restrictions pour l\'utilisateur';
    324 $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';
    325 $lang['permuser_parent_forbidden'] = 'catégorie parente interdite';
    326 
    327 
    328 
    329 
    330 $lang['title_add'] = 'Ajouter un utilisateur';
    331 $lang['title_modify'] = 'Modifier un utilisateur';
    332 
    333 $lang['title_user_perm'] = 'Modifier les permissions pour l\'utilisateur';
     324
    334325$lang['title_cat_perm'] = 'Modifier les permissions pour la catégorie';
    335326$lang['title_group_perm'] = 'Modifier les permissions pour le groupe';
    336327$lang['title_picmod'] = 'Modifier les informations d\'une image';
    337328$lang['waiting_update'] = 'Les images validées ne seront visibles qu\'après mise à jour de la base d\'images.';
    338 $lang['permuser_only_private'] = 'Seules les catégories privées sont représentées';
    339 
    340 $lang['comments_last_title'] = 'Derniers commentaires';
    341 $lang['comments_non_validated_title'] = 'Commentaires non validés';
    342 $lang['cat_unknown_id'] = 'Cette catégorie n\'existe pas dans la base de données';
    343 $lang['conf_remote_site_delete_info'] = 'Supprimer un site revient à supprimer toutes les images et les catégories en relation avec ce site.';
    344329?>
  • trunk/template/default/admin.tpl

    r620 r655  
    6262<div class="menu">
    6363<ul class="menu">
    64   <li><a class="adminMenu" href="{U_AUTH}">{L_AUTH}</a></li>
    6564  <li><a class="adminMenu" href="{U_USERS_AUTH}">{L_USERS}</a></li>
    6665  <li><a class="adminMenu" href="{U_GROUPS_AUTH}">{L_GROUPS}</a></li>
     66  <li><a class="adminMenu" href="{U_CAT_AUTH}">{L_CATEGORIES}</a></li
    6767</ul>
    6868</div>
  • trunk/template/default/admin/cat_options.tpl

    r622 r655  
    2525</div>
    2626<div style="clear:both;"></div>
     27<input type="hidden" name="{HIDDEN_NAME}" value="{HIDDEN_VALUE}" />
    2728<input type="reset" name="reset" value="{L_RESET}" class="bouton" />
    2829</form>
  • trunk/template/default/admin/user_perm.tpl

    r614 r655  
    1 <!-- BEGIN search -->
    21<div class="admin">{L_SELECT_USERNAME}</div>
    32<form method="post" name="post" action="{F_SEARCH_USER_ACTION}">
    43  <input type="text" name="username" maxlength="50" size="20" />
    5   <input type="hidden" name="mode" value="edit" />{S_HIDDEN_FIELDS}
    64  <input type="submit" name="submituser" value="{L_LOOKUP_USER}" class="bouton" />
    75  <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;" />
    86</form>
    9 <!-- END search -->
    10 <!-- BEGIN permission -->
    11 <div class="admin">{L_AUTH_USER} {USERNAME}</div>
    12 <form action="{F_AUTH_ACTION}" method="POST">
    13   <ul class="menu">
    14     <!-- BEGIN category -->
    15         <li>
    16         <input type="radio" name="{permission.category.CAT_ID}" value="0" {permission.category.AUTH_YES}/>{L_AUTHORIZED}
    17         <input type="radio" name="{permission.category.CAT_ID}" value="1" {permission.category.AUTH_NO}/>{L_FORBIDDEN}
    18         :
    19          <a href="{permission.category.CAT_URL}">{permission.category.CAT_NAME}</a>
    20         <!-- BEGIN parent_forbidden -->
    21         {L_PARENT_FORBIDDEN}&nbsp;-&nbsp;
    22         <!-- END parent_forbidden -->
    23                 </li>
    24     <!-- END category -->
    25         </ul>
    26         <input type="submit" name="submit" class="bouton" value="{L_SUBMIT}"/>
    27 </form>
    28 <!-- END permission -->
Note: See TracChangeset for help on using the changeset viewer.