home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Freeware / Programare / groupoffice-com-2.01 / modules / projects / index.php < prev    next >
Encoding:
PHP Script  |  2004-03-08  |  2.5 KB  |  90 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.  
  15.  
  16. $GO_SECURITY->authenticate();
  17. $GO_MODULES->authenticate('projects');
  18. require($GO_LANGUAGE->get_language_file('projects'));
  19.  
  20. $page_title=$menu_projects;
  21. require($GO_CONFIG->class_path."projects.class.inc");
  22. $projects = new projects();
  23.  
  24. $post_action = isset($_REQUEST['post_action']) ? $_REQUEST['post_action'] : '';
  25. $task = isset($_REQUEST['task']) ? $_REQUEST['task'] : '';
  26. $link_back = (isset($_REQUEST['link_back']) && $_REQUEST['link_back'] != '') ? $_REQUEST['link_back'] : $_SERVER['REQUEST_URI'];
  27.  
  28. $time = get_time();
  29. $day = date("j", $time);
  30. $year = date("Y", $time);
  31. $month = date("m", $time);
  32.  
  33. $date = date($_SESSION['GO_SESSION']['date_format'], $time);
  34.  
  35. $tabtable = new tabtable('projects_tab', $lang_modules['projects'], '800', '400');
  36. $tabtable->add_tab('projects.inc', $lang_modules['projects']);
  37. $tabtable->add_tab('load.inc', $pm_load);
  38. $tabtable->add_tab('fees.inc', $pm_fees);
  39.  
  40.  
  41. //remember sorting of the list in a cookie
  42. if (isset($_REQUEST['new_sort_field']))
  43. {
  44.     SetCookie("pm_sort_field",$_REQUEST['new_sort_field'],time()+3600*24*365,"/","",0);
  45.     $_COOKIE['pm_sort_field'] = $_REQUEST['new_sort_field'];
  46. }
  47.  
  48. if (isset($_REQUEST['new_sort_direction']))
  49. {
  50.     SetCookie("pm_sort_direction",$_REQUEST['new_sort_direction'],time()+3600*24*365,"/","",0);
  51.     $_COOKIE['pm_sort_direction'] = $_REQUEST['new_sort_direction'];
  52. }
  53.  
  54. if (isset($_REQUEST['filter']))
  55. {
  56.     SetCookie("pm_filter",$_REQUEST['filter'],time()+3600*24*365,"/","",0);
  57. }
  58.  
  59. switch($post_action)
  60. {
  61.     case 'projects':
  62.         $tabtable->set_active_tab(0);
  63.     break;
  64.  
  65.     case 'fees':
  66.         $tabtable->set_active_tab(2);
  67.     break;
  68. }
  69.  
  70.  
  71. if ($tabtable->get_active_tab_id() == 'load.inc')
  72. {
  73.     $datepicker = new date_picker();
  74.     $GO_HEADER['head'] = $datepicker->get_header();
  75. }
  76.  
  77. require($GO_THEME->theme_path."header.inc");
  78.  
  79. echo '<form name="projects_form" method="get" action="'.$_SERVER['PHP_SELF'].'">';
  80.  
  81. echo '<input type="hidden" name="task" />';
  82.  
  83. $tabtable->print_head();
  84. echo '<br />';
  85.  
  86. if (isset($feedback)) echo $feedback;
  87. require($tabtable->get_active_tab_id());
  88. $tabtable->print_foot();
  89. echo '</form>';
  90. require($GO_THEME->theme_path."footer.inc");
  91. ?>
  92.