home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Freeware / Programare / groupoffice-com-2.01 / controls / group.php < prev    next >
PHP Script  |  2004-03-08  |  2KB  |  56 lines

  1. <?php
  2. /*
  3. Copyright Intermesh 2003
  4. Author: Merijn Schering <mschering@intermesh.nl>
  5. Version: 1.0 Release date: 08 July 2003
  6.  
  7. This program is free software; you can redistribute it and/or modify it
  8. under the terms of the GNU General Public License as published by the
  9. Free Software Foundation; either version 2 of the License, or (at your
  10. option) any later version.
  11. */
  12.  
  13. require("../Group-Office.php");
  14. $GO_SECURITY->authenticate();
  15. require($GO_LANGUAGE->get_language_file('groups'));
  16.  
  17. //load user management class
  18. require($GO_CONFIG->class_path."groups.class.inc");
  19. $groups = new groups;
  20.  
  21.  
  22.  
  23. $count = $groups->get_users_in_group($group_id);
  24. $page_title= $count.' '.$groups_users_in1.' '.$name;
  25. require($GO_THEME->theme_path."header.inc");
  26. echo '<table border="0" cellpadding="10"><tr><td>';
  27. echo '<table border="0" cellpadding="0" cellspacing="1">';
  28. echo '<tr><td><h1>'.$page_title.'</h1></td></tr>';
  29.  
  30. if ($count>0)
  31. {
  32.         while ($groups->next_record())
  33.         {
  34.         echo "<tr height=\"18\">\n";
  35.         if ( $groups->f('name') ) {
  36.             echo "<td>".show_profile($groups->f("id"),$groups->f("name"))." </a></td>\n";
  37.         } else {
  38.             require_once($GO_CONFIG->class_path.'profiles.class.inc');
  39.             $profiles = new profiles();
  40.             if ($profile = $profiles->get_profile($groups->f('user_id'))) {
  41.                 echo "<td>".show_profile($groups->f('user_id'),$profile["name"])." </a></td>\n";
  42.             }
  43.         }
  44.         echo "</tr>\n";
  45.     }
  46. }else
  47. {
  48.         echo "<tr><td colspan=\"99\">".$groups_no_users."</td></tr>";
  49. }
  50. echo '<tr><td><br />';
  51. $button = new button($cmdClose, 'javascript:window.close()');
  52. echo '</td></tr>';
  53. echo "</table></td></tr></table>";
  54. require($GO_THEME->theme_path."footer.inc");
  55. ?>
  56.