home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Freeware / Programare / groupoffice-com-2.01 / administrator / settings / module_permissions.php < prev    next >
PHP Script  |  2004-03-08  |  3KB  |  92 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(true);
  15. require($GO_LANGUAGE->get_language_file('settings'));
  16. $post_action = isset($_REQUEST['post_action']) ? $_REQUEST['post_action'] : 'read';
  17. $module = $GO_MODULES->get_module($_REQUEST['module_id']);
  18.  
  19. if ($post_action == 'read')
  20. {
  21.     $title = $strReadRights;
  22.     $read_tab = true;
  23.     $acl_id = $module["acl_read"];
  24. }else
  25. {
  26.     $title = $strWriteRights;
  27.     $write_tab = true;
  28.     $acl_id = $module["acl_write"];
  29. }
  30.  
  31. $page_title=$module['id'];
  32.  
  33. require($GO_THEME->theme_path."header.inc");
  34. ?>
  35. <form method="post" name="permissions" action="<?php echo $_SERVER['PHP_SELF']; ?>">
  36. <input type="hidden" name="close" value="false" />
  37. <input type="hidden" name="module_id" value="<?php echo $_REQUEST['module_id']; ?>" />
  38. <input type="hidden" name="post_action" value="<?php echo $post_action; ?>" />
  39.  
  40. <table border="0" cellpadding="10" cellspacing="0">
  41. <tr>
  42.     <td>
  43.     <table border="0" cellpadding="2" cellspacing="0">
  44.     <tr>
  45.         <td valign="top">
  46.         <table border="0" cellpadding="0" cellspacing="0" class="TableBorder" width="400">
  47.         <tr>
  48.             <td valign="top">
  49.             <table border="0" cellpadding="1" cellspacing="1" width="100%">
  50.             <tr>
  51.                 <td colspan="99" class="TableHead"><?php echo $module['id']; ?></td>
  52.             </tr>
  53.             <tr>
  54.                 <td class="<?php if(isset($read_tab)) echo 'ActiveTab'; else echo 'Tab'; ?>" align="center" width="100"><a href="<?php echo $_SERVER['PHP_SELF']; ?>?post_action=read&module_id=<?php echo $_REQUEST['module_id']; ?>" class="<?php if(isset($read_tab)) echo 'ActiveTab'; else echo 'Tab'; ?>"><?php echo $strReadRights; ?></a></td>
  55.                 <td class="<?php if(isset($write_tab)) echo 'ActiveTab'; else echo 'Tab'; ?>" align="center" width="100"><a href="<?php echo $_SERVER['PHP_SELF']; ?>?post_action=write&module_id=<?php echo $_REQUEST['module_id']; ?>" class="<?php if(isset($write_tab)) echo 'ActiveTab'; else echo 'Tab'; ?>"><?php echo $strWriteRights; ?></a></td>
  56.                 <td class="Tab" width="200"> </td>
  57.             </tr>
  58.             <tr>
  59.                 <td class="TableInside" height="300" valign="top" colspan="5">
  60.                 <table border="0" cellpadding="10">
  61.                 <tr>
  62.                     <td>
  63.                     <?php
  64.                     print_acl($acl_id, false);
  65.                     ?>
  66.                     </td>
  67.                 </tr>
  68.                 <tr>
  69.                     <td class="cmd">
  70.                     <?php
  71.                         $button = new button($cmdClose, 'javascript:window.close()');
  72.                     ?>
  73.                     </td>
  74.                 </tr>
  75.                 </table>
  76.                 </td>
  77.             </tr>
  78.             </table>
  79.             </td>
  80.         </tr>
  81.         </table>
  82.         </td>
  83.     </tr>
  84.     </table>
  85.     </td>
  86. </tr>
  87. </table>
  88. </form>
  89.  
  90. <?php
  91. require($GO_THEME->theme_path."footer.inc");
  92. ?>