[ Index ]
 

Code source de WebCalendar 1.0.5

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables | Statistiques

title

Body

[fermer]

/ -> users.php (source)

   1  <?php
   2  /*
   3      NOTE:
   4      There are THREE components that make up the functionality of users.php.
   5      1. users.php
   6          - contains the tabs
   7          - lists users
   8          - has an iframe for adding/editing users
   9          - include statements for groups.php and nonusers.php
  10      2. edit_user.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)
  16  
  17      This structure is mirrored for groups & nonusers
  18  */
  19  
  20  /* $Id $ */
  21  
  22  include_once  'includes/init.php';
  23  
  24  if ( empty ( $login) || $login == "__public__" ) {
  25    // do not allow public access
  26    do_redirect ( empty ( $STARTVIEW ) ? "month.php" : "$STARTVIEW" );
  27    exit;
  28  }
  29  
  30  $INC = array('js/users.php','js/visible.php');
  31  print_header($INC);
  32  
  33  //if ( ! $is_admin ) {
  34  //echo "<h2>" . translate("Error") . "</h2>\n" . 
  35  //  translate("You are not authorized") . ".\n";
  36  //  echo "</body>\n</html>";
  37  //  exit;
  38  //}
  39  ?>
  40  <a title="<?php etranslate("Admin") ?>" class="nav" href="adminhome.php">&laquo;&nbsp;<?php etranslate("Admin") ?></a><br /><br />
  41  
  42  <!-- TABS -->
  43  <div id="tabs">
  44      <span class="tabfor" id="tab_users"><a href="#tabusers" onclick="return showTab('users')"><?php 
  45          if ($is_admin) {
  46              echo translate("Users");
  47          } else {
  48              echo translate("Account");
  49          }
  50      ?></a></span>
  51      <?php if ($groups_enabled == "Y" && $is_admin) { ?>
  52          <span class="tabbak" id="tab_groups"><a href="#tabgroups" onclick="return showTab('groups')"><?php etranslate("Groups")?></a></span>
  53      <?php } 
  54      if ($nonuser_enabled == 'Y' && $is_admin) { ?>
  55          <span class="tabbak" id="tab_nonusers"><a href="#tabnonusers" onclick="return showTab('nonusers')"><?php etranslate("NonUser Calendars")?></a></span>
  56      <?php } ?>
  57  </div>
  58  
  59  <!-- TABS BODY -->
  60  <div id="tabscontent">
  61      <!-- USERS -->
  62      <a name="tabusers"></a>
  63      <div id="tabscontent_users">
  64      <?php if ( $is_admin ) { ?>
  65          <?php
  66              if ( $admin_can_add_user )
  67                  echo "<a title=\"" . 
  68                      translate("Add New User") . "\" href=\"edit_user.php\" target=\"useriframe\" onclick=\"javascript:show('useriframe');\">" . 
  69                      translate("Add New User") . "</a><br />\n";
  70          ?>
  71          <ul>
  72              <?php
  73                  $userlist = user_get_users ();
  74                  for ( $i = 0; $i < count ( $userlist ); $i++ ) {
  75                      if ( $userlist[$i]['cal_login'] != '__public__' ) {
  76                          echo "<li><a title=\"" . 
  77                              $userlist[$i]['cal_fullname'] . "\" href=\"edit_user.php?user=" . 
  78                              $userlist[$i]["cal_login"] . "\" target=\"useriframe\" onclick=\"javascript:show('useriframe');\">";
  79                          echo $userlist[$i]['cal_fullname'];
  80                          echo "</a>";
  81                          if (  $userlist[$i]["cal_is_admin"] == 'Y' )
  82                              echo "&nbsp;<abbr title=\"" . translate("denotes administrative user") . "\">*</abbr>";
  83                          echo "</li>\n";
  84                      }
  85                  }
  86              ?>
  87          </ul>
  88      *&nbsp;<?php etranslate("denotes administrative user")?><br />
  89  
  90          <?php 
  91              echo "<iframe " .
  92                  " name=\"useriframe\" id=\"useriframe\" style=\"width:90%;border-width:0px; height:280px;\"></iframe>";
  93          ?>
  94  <?php } else { ?>
  95  <iframe src="edit_user.php" name="accountiframe" id="accountiframe" style="width:90%;border-width:0px; height:210px;\"></iframe>
  96  <?php } ?>
  97  </div>
  98  
  99  <?php 
 100      if ($groups_enabled == "Y" && $is_admin) { 
 101          include_once  'groups.php';
 102      } 
 103      if ($nonuser_enabled == 'Y' && $is_admin) {
 104          include_once  'nonusers.php';
 105      }
 106  ?>
 107  </div>
 108  
 109  <?php print_trailer(); ?>
 110  </body>
 111  </html>


Généré le : Fri Nov 30 19:09:19 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics