Revision 1044
Added by Matthias over 15 years ago
index.php | ||
---|---|---|
31 | 31 |
$template = new Template(THEME_PATH.'/templates'); |
32 | 32 |
$template->set_file('page', 'users.htt'); |
33 | 33 |
$template->set_block('page', 'main_block', 'main'); |
34 |
$template->set_block("main_block", "manage_groups_block", "groups"); |
|
34 | 35 |
$template->set_var('ADMIN_URL', ADMIN_URL); |
35 | 36 |
|
36 | 37 |
// Get existing value from database |
... | ... | |
73 | 74 |
|
74 | 75 |
// Insert language headings |
75 | 76 |
$template->set_var(array( |
76 |
'HEADING_MODIFY_DELETE_USER' => $HEADING['MODIFY_DELETE_USER'],
|
|
77 |
'HEADING_ADD_USER' => $HEADING['ADD_USER']
|
|
78 |
)
|
|
79 |
);
|
|
77 |
'HEADING_MODIFY_DELETE_USER' => $HEADING['MODIFY_DELETE_USER'], |
|
78 |
'HEADING_ADD_USER' => $HEADING['ADD_USER'] |
|
79 |
) |
|
80 |
); |
|
80 | 81 |
// Insert language text and messages |
81 | 82 |
$template->set_var(array( |
82 |
'TEXT_MODIFY' => $TEXT['MODIFY'],
|
|
83 |
'TEXT_DELETE' => $TEXT['DELETE'],
|
|
84 |
'TEXT_MANAGE_GROUPS' => $TEXT['MANAGE_GROUPS'],
|
|
85 |
'CONFIRM_DELETE' => $MESSAGE['USERS']['CONFIRM_DELETE']
|
|
86 |
)
|
|
87 |
);
|
|
88 |
|
|
83 |
'TEXT_MODIFY' => $TEXT['MODIFY'], |
|
84 |
'TEXT_DELETE' => $TEXT['DELETE'], |
|
85 |
'TEXT_MANAGE_GROUPS' => ( $admin->get_permission('groups') == true ) ? $TEXT['MANAGE_GROUPS'] : "**",
|
|
86 |
'CONFIRM_DELETE' => $MESSAGE['USERS']['CONFIRM_DELETE'] |
|
87 |
) |
|
88 |
); |
|
89 |
if ( $admin->get_permission('groups') == true ) $template->parse("groups", "manage_groups_block", true); |
|
89 | 90 |
// Parse template object |
90 | 91 |
$template->parse('main', 'main_block', false); |
91 | 92 |
$template->pparse('output', 'page'); |
... | ... | |
165 | 166 |
|
166 | 167 |
// Insert language text and messages |
167 | 168 |
$template->set_var(array( |
168 |
'TEXT_RESET' => $TEXT['RESET'],
|
|
169 |
'TEXT_ACTIVE' => $TEXT['ACTIVE'],
|
|
170 |
'TEXT_DISABLED' => $TEXT['DISABLED'],
|
|
171 |
'TEXT_PLEASE_SELECT' => $TEXT['PLEASE_SELECT'],
|
|
172 |
'TEXT_USERNAME' => $TEXT['USERNAME'],
|
|
173 |
'TEXT_PASSWORD' => $TEXT['PASSWORD'],
|
|
174 |
'TEXT_RETYPE_PASSWORD' => $TEXT['RETYPE_PASSWORD'],
|
|
175 |
'TEXT_DISPLAY_NAME' => $TEXT['DISPLAY_NAME'],
|
|
176 |
'TEXT_EMAIL' => $TEXT['EMAIL'],
|
|
177 |
'TEXT_GROUP' => $TEXT['GROUP'],
|
|
178 |
'TEXT_NONE' => $TEXT['NONE'],
|
|
179 |
'TEXT_HOME_FOLDER' => $TEXT['HOME_FOLDER'],
|
|
180 |
'USERNAME_FIELDNAME' => $username_fieldname,
|
|
181 |
'CHANGING_PASSWORD' => $MESSAGE['USERS']['CHANGING_PASSWORD']
|
|
182 |
)
|
|
183 |
);
|
|
169 |
'TEXT_RESET' => $TEXT['RESET'], |
|
170 |
'TEXT_ACTIVE' => $TEXT['ACTIVE'], |
|
171 |
'TEXT_DISABLED' => $TEXT['DISABLED'], |
|
172 |
'TEXT_PLEASE_SELECT' => $TEXT['PLEASE_SELECT'], |
|
173 |
'TEXT_USERNAME' => $TEXT['USERNAME'], |
|
174 |
'TEXT_PASSWORD' => $TEXT['PASSWORD'], |
|
175 |
'TEXT_RETYPE_PASSWORD' => $TEXT['RETYPE_PASSWORD'], |
|
176 |
'TEXT_DISPLAY_NAME' => $TEXT['DISPLAY_NAME'], |
|
177 |
'TEXT_EMAIL' => $TEXT['EMAIL'], |
|
178 |
'TEXT_GROUP' => $TEXT['GROUP'], |
|
179 |
'TEXT_NONE' => $TEXT['NONE'], |
|
180 |
'TEXT_HOME_FOLDER' => $TEXT['HOME_FOLDER'], |
|
181 |
'USERNAME_FIELDNAME' => $username_fieldname, |
|
182 |
'CHANGING_PASSWORD' => $MESSAGE['USERS']['CHANGING_PASSWORD'] |
|
183 |
) |
|
184 |
); |
|
184 | 185 |
|
185 | 186 |
// Parse template for add user form |
186 | 187 |
$template->parse('main', 'main_block', false); |
Also available in: Unified diff
Codechanges using blocks to avoid to generate the "switch"-link right-top, if the user has no permission to edit the other one.