home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Freeware / Programare / groupoffice-com-2.01 / administrator / settings / modules.inc < prev   
Text File  |  2004-03-08  |  2KB  |  87 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.  
  14. $selected_modules = array();
  15. $selected_count = 0;
  16. echo '<br />';
  17. if (isset($feedback))
  18. {
  19.     echo $feedback;
  20. }
  21.  
  22. echo $admin_modules_text.'<br /><br /><table border="0" cellpadding="4" cellspacing="0">';
  23.  
  24. $column_count = 0;
  25. $columns=3;
  26. $module_count = count($modules);
  27. while($module = array_shift($modules))
  28. {
  29.     if ($column_count == 0)
  30.     {
  31.         echo '<tr>';
  32.         $column_count++;
  33.     }
  34.     if ($module['name'] != 'CVS')
  35.     {
  36.         $lang_var = isset($lang_modules[$module['name']]) ? $lang_modules[$module['name']] : $module['name'];
  37.         if ($GO_MODULES->is_registered_module($module['path']))
  38.         {
  39.             $display = "<a href=\"javascript:popup('module_permissions.php?module_id=".urlencode($module['name'])."','450','450')\" class=\"normal\">".$lang_var."</a>";
  40.             $selected_count++;
  41.             $check = 'checked';
  42.         }else
  43.         {
  44.             $display = $lang_var;
  45.             $check = '';
  46.         }
  47.         echo '<td><table border="0" cellpadding="0" cellspacing="0"><tr><td><input type="checkbox" name="selected_modules[]" value="'.$module['path'].'" '.$check.' /></td><td>'.$display.'</td></tr></table></td>';
  48.     }else
  49.     {
  50.         $column_count--;
  51.     }
  52.     if($column_count==$columns)
  53.     {
  54.         $column_count=0;
  55.         echo '</tr>';
  56.     }else
  57.     {
  58.         $column_count++;
  59.     }
  60. }
  61.  
  62. if ($column_count != 0)
  63. {
  64.     for ($i=$column_count;$i<=$columns;$i++)
  65.     {
  66.         echo '<td> </td>';
  67.     }
  68.     echo '</tr>';
  69. }
  70.  
  71. echo '<tr><td colspan="3"><i>'.$selected_count.' / '.$module_count.' '.$admin_modules.'</i></td></tr>';
  72. echo '</table>';
  73.  
  74. $button = new button($cmdOk, "javascript:_save('save_modules', 'true')");
  75. echo '  ';
  76. $button = new button($cmdApply, "javascript:_save('save_modules', 'false')");
  77. echo '  ';
  78. $button = new button($cmdClose, "javascript:document.location='".$return_to ."'");
  79. ?>
  80. <script type="text/javascript">
  81. function _save(task, close)
  82. {
  83.     document.forms[0].task.value = task;
  84.     document.forms[0].close.value = close;
  85.     document.forms[0].submit();
  86. }
  87. </script>