4 There are THREE components that make up the functionality of users.php.
8 - has an iframe for adding/editing users
9 - include statements for groups.php and nonusers.php
11 - the contents of the iframe (i.e. a form for adding/editing users)
12 3. edit_user_handler.php
13 - handles form submittal from edit_user.php
14 - provides user with confirmation of successful operation
15 - refreshes the parent frame (users.php)
17 This structure is mirrored for groups & nonusers
20 include_once $gfplugins.'webcalendar/www/includes/init.php';
22 if ( empty ( $login) || $login == "__public__" ) {
23 // do not allow public access
24 do_redirect ( empty ( $STARTVIEW ) ? "month.php" : "$STARTVIEW" );
28 $INC = array('js/users.php','js/visible.php');
31 //if ( ! $is_admin ) {
32 //echo "<h2>" . translate("Error") . "</h2>\n" .
33 // translate("You are not authorized") . ".\n";
34 // echo "</body>\n</html>";
38 <a title="<?php etranslate("Admin") ?>" class="nav" href="adminhome.php">« <?php etranslate("Admin") ?></a><br /><br />
42 <span class="tabfor" id="tab_users"><a href="#tabusers" onclick="return showTab('users')"><?php
44 echo translate("Users");
46 echo translate("Account");
49 <?php if ($groups_enabled == "Y" && $is_admin) { ?>
50 <span class="tabbak" id="tab_groups"><a href="#tabgroups" onclick="return showTab('groups')"><?php etranslate("Groups")?></a></span>
52 if ($nonuser_enabled == 'Y' && $is_admin) { ?>
53 <span class="tabbak" id="tab_nonusers"><a href="#tabnonusers" onclick="return showTab('nonusers')"><?php etranslate("NonUser Calendars")?></a></span>
58 <div id="tabscontent">
60 <a name="tabusers"></a>
61 <div id="tabscontent_users">
62 <?php if ( $is_admin ) { ?>
64 if ( $admin_can_add_user )
66 translate("Add New User") . "\" href=\"edit_user.php\" target=\"useriframe\" onclick=\"javascript:show('useriframe');\">" .
67 translate("Add New User") . "</a><br />\n";
71 $userlist = user_get_users ();
72 for ( $i = 0; $i < count ( $userlist ); $i++ ) {
73 if ( $userlist[$i]['cal_login'] != '__public__' ) {
74 echo "<li><a title=\"" .
75 $userlist[$i]['cal_fullname'] . "\" href=\"edit_user.php?user=" .
76 $userlist[$i]["cal_login"] . "\" target=\"useriframe\" onclick=\"javascript:show('useriframe');\">";
77 echo $userlist[$i]['cal_fullname'];
79 if ( $userlist[$i]["cal_is_admin"] == 'Y' )
80 echo " <abbr title=\"" . translate("denotes administrative user") . "\">*</abbr>";
86 * <?php etranslate("denotes administrative user")?><br />
90 " name=\"useriframe\" id=\"useriframe\" style=\"width:90%;border-width:0px; height:280px;\"></iframe>";
93 <iframe src="edit_user.php" name="accountiframe" id="accountiframe" style="width:90%;border-width:0px; height:210px;\"></iframe>
98 if ($groups_enabled == "Y" && $is_admin) {
99 include_once $gfplugins.'webcalendar/www/groups.php';
101 if ($nonuser_enabled == 'Y' && $is_admin) {
102 include_once $gfplugins.'webcalendar/www/nonusers.php';
107 <?php print_trailer(); ?>