[ Index ] |
|
Code source de b2evolution 2.1.0-beta |
1 <?php 2 /** 3 * This file implements the UI view for the user group properties. 4 * 5 * Called by {@link b2users.php} 6 * 7 * This file is part of the evoCore framework - {@link http://evocore.net/} 8 * See also {@link http://sourceforge.net/projects/evocms/}. 9 * 10 * @copyright (c)2003-2007 by Francois PLANQUE - {@link http://fplanque.net/} 11 * Parts of this file are copyright (c)2004-2006 by Daniel HAHLER - {@link http://thequod.de/contact}. 12 * 13 * {@internal License choice 14 * - If you have received this file as part of a package, please find the license.txt file in 15 * the same folder or the closest folder above for complete license terms. 16 * - If you have received this file individually (e-g: from http://evocms.cvs.sourceforge.net/) 17 * then you must choose one of the following licenses before using the file: 18 * - GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php 19 * - Mozilla Public License 1.1 (MPL) - http://www.opensource.org/licenses/mozilla1.1.php 20 * }} 21 * 22 * {@internal Open Source relicensing agreement: 23 * Daniel HAHLER grants Francois PLANQUE the right to license 24 * Daniel HAHLER's contributions to this file and the b2evolution project 25 * under any OSI approved OSS license (http://www.opensource.org/licenses/). 26 * }} 27 * 28 * @package admin 29 * 30 * {@internal Below is a list of authors who have contributed to design/coding of this file: }} 31 * @author fplanque: Francois PLANQUE 32 * @author blueyed: Daniel HAHLER 33 * 34 * @version $Id: _group.form.php,v 1.1 2007/06/25 11:01:50 fplanque Exp $ 35 */ 36 if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' ); 37 38 39 /** 40 * @var Group 41 */ 42 global $edited_Group; 43 44 global $action; 45 46 // Begin payload block: 47 $this->disp_payload_begin(); 48 49 50 $Form = & new Form( NULL, 'group_checkchanges' ); 51 52 $Form->global_icon( T_('Cancel editing!'), 'close', regenerate_url( 'grp_ID,action' ) ); 53 54 if( $edited_Group->ID == 0 ) 55 { 56 $Form->begin_form( 'fform', T_('Creating new group') ); 57 } 58 else 59 { 60 $title = ( $action == 'edit_user' ? T_('Editing group:') : T_('Viewing group:') ) 61 .' '. 62 ( isset($edited_grp_oldname) ? $edited_grp_oldname : $edited_Group->dget('name') ) 63 .' ('.T_('ID').' '.$edited_Group->ID.')'; 64 $Form->begin_form( 'fform', $title ); 65 } 66 67 $Form->hidden_ctrl(); 68 $Form->hidden( 'action', 'groupupdate' ); 69 $Form->hidden( 'grp_ID', $edited_Group->ID ); 70 71 $Form->begin_fieldset( T_('General') ); 72 $Form->text( 'edited_grp_name', $edited_Group->name, 50, T_('Name'), '', 50, 'large' ); 73 $Form->end_fieldset(); 74 75 $perm_none_option = array( 'none', '<acronym title="'.T_('No Access').'">'.T_('None').'</acronym>' ); 76 $perm_list_option = array( 'list', '<acronym title="'.T_('View list only').'">'.T_('List').'</acronym>' ); 77 $perm_view_option = array( 'view', '<acronym title="'.T_('View details').'">'.T_('View').'</acronym>' ); 78 $perm_add_option = array( 'add', '<acronym title="'.T_('Add & edit/delete self created').'">'.T_('Add').'</acronym>' ); 79 $perm_edit_option = array( 'edit', '<acronym title="'.T_('Edit/delete all').'">'.T_('Edit').'</acronym>' ); 80 $standard_perm_options = array( 81 $perm_none_option, 82 $perm_list_option, 83 $perm_view_option, 84 $perm_add_option, 85 $perm_edit_option 86 ); 87 88 $Form->begin_fieldset( T_('Permissions for members of this group') ); 89 90 if( $edited_Group->ID != 1 ) 91 { // Groups others than #1 can be prevented from editing users 92 $Form->radio( 'edited_grp_perm_admin', $edited_Group->get('perm_admin'), 93 array( array( 'none', T_('No Access') ), 94 array( 'hidden', T_('Hidden') ), 95 array( 'visible', T_('Visible link') ) 96 ), T_('Access to Admin area') ); 97 } 98 else 99 { // Group #1 always has user management right: 100 $Form->info( T_('Access to Admin area'), T_('Visible link') ); 101 } 102 103 $Form->radio( 'edited_grp_perm_blogs', $edited_Group->get('perm_blogs'), 104 array( array( 'user', T_('User permissions') ), 105 array( 'viewall', T_('View all') ), 106 array( 'editall', T_('Full Access') ) 107 ), T_('Blogs') ); 108 109 $Form->radio( 'edited_grp_perm_stats', $edited_Group->get('perm_stats'), 110 array( $perm_none_option, 111 array( 'user', T_('User blogs') ), // fp> dirty hack, I'll tie this to blog edit perm for now 112 array( 'view', T_('View all') ), 113 array( 'edit', T_('Full Access') ) 114 ), T_('Stats') ); 115 116 $Form->radio( 'edited_grp_perm_spamblacklist', $edited_Group->get('perm_spamblacklist'), 117 array( $perm_none_option, 118 array( 'view', T_('View only') ), 119 array( 'edit', T_('Full Access') ) 120 ), T_('Antispam') ); 121 122 // fp> todo perm check 123 $filetypes_linkstart = '<a href="?ctrl=filetypes" title="'.T_('Edit locked file types...').'">'; 124 $filetypes_linkend = '</a>'; 125 $Form->radio( 'edited_grp_perm_files', $edited_Group->get('perm_files'), 126 array( $perm_none_option, 127 $perm_view_option, 128 array( 'add', T_('Add/Upload') ), 129 array( 'edit', sprintf( T_('Edit %s'), $filetypes_linkstart.get_icon('file_allowed').$filetypes_linkend ) ), 130 array( 'all', sprintf( T_('Edit all, including %s'), $filetypes_linkstart.get_icon('file_not_allowed').$filetypes_linkend ) ), 131 ), T_('Files'), false, T_('This setting will further restrict any media file permissions on specific blogs.') ); 132 133 $Form->checkbox( 'edited_grp_perm_templates', $edited_Group->get('perm_templates'), T_('Skins'), T_('Check to allow access to skin files.') ); 134 135 if( $edited_Group->ID != 1 ) 136 { // Groups others than #1 can be prevented from editing users 137 $Form->radio( 'edited_grp_perm_users', $edited_Group->get('perm_users'), 138 array( $perm_none_option, 139 $perm_view_option, 140 $perm_edit_option 141 ), T_('Users & Groups') ); 142 } 143 else 144 { // Group #1 always has user management right: 145 $Form->info( T_('Users & Groups'), T_('Full Access') ); 146 } 147 $Form->radio( 'edited_grp_perm_options', $edited_Group->get('perm_options'), 148 array( $perm_none_option, 149 $perm_view_option, 150 $perm_edit_option 151 ), T_('Settings') ); 152 153 $Form->end_fieldset(); 154 155 if( $action != 'view_group' ) 156 { 157 $Form->buttons( array( 158 array( '', '', T_('Save !'), 'SaveButton' ), 159 array( 'reset', '', T_('Reset'), 'ResetButton' ) ) ); 160 } 161 162 $Form->end_form(); 163 164 // End payload block: 165 $this->disp_payload_end(); 166 167 /* 168 * $Log: _group.form.php,v $ 169 * Revision 1.1 2007/06/25 11:01:50 fplanque 170 * MODULES (refactored MVC) 171 * 172 * Revision 1.11 2007/04/26 00:11:13 fplanque 173 * (c) 2007 174 * 175 * Revision 1.10 2007/03/20 09:53:26 fplanque 176 * Letting boggers view their own stats. 177 * + Letthing admins view the aggregate by default. 178 * 179 * Revision 1.9 2007/01/23 04:20:31 fplanque 180 * wording 181 * 182 * Revision 1.8 2006/12/17 23:42:39 fplanque 183 * Removed special behavior of blog #1. Any blog can now aggregate any other combination of blogs. 184 * Look into Advanced Settings for the aggregating blog. 185 * There may be side effects and new bugs created by this. Please report them :] 186 * 187 * Revision 1.7 2006/12/07 16:06:24 fplanque 188 * prepared new file editing permission 189 * 190 * Revision 1.6 2006/11/24 18:27:26 blueyed 191 * Fixed link to b2evo CVS browsing interface in file docblocks 192 */ 193 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Thu Nov 29 23:58:50 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |