[ PHPXref.com ] [ Generated: Sun Jul 20 19:53:39 2008 ] [ PHProjekt 5.0.1 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/projects/ -> projects_view.php (source)

   1  <?php
   2  
   3  // projects_view.php - PHProjekt Version 5.0

   4  // copyright  ©  2000-2005 Albrecht Guenther  ag@phprojekt.com

   5  // www.phprojekt.com

   6  // Author: Albrecht Guenther, $Author: fgraf $

   7  // $Id: projects_view.php,v 1.43.2.2 2005/09/12 12:14:31 fgraf Exp $

   8  
   9  // check whether the lib has been included - authentication!

  10  if (!defined("lib_included")) die("Please use index.php!");
  11  
  12  // include library to sort the projects

  13  include_once  "./projects_sort.php";
  14  
  15  // check role

  16  if (check_role('projects') < 1) die("You are not allowed to do this!");
  17  
  18  //diropen_mode($element_mode,$element_ID);

  19  filter_mode($filter_ID);
  20  sort_mode('name');
  21  if ($toggle_read_flag == 1)        read_mode($module);
  22  if ($toggle_html_editor_flag == 1) html_editor_mode($module);
  23  if ($toggle_archive_flag == 1)     archive_mode($module);
  24  if ($set_archiv_flag > 0)          set_archiv_flag($ID_s,$module);
  25  if ($set_read_flag > 0)            set_read_flag($ID_s,$module);
  26  if ($save_tdwidth)                 store_column_width($module);
  27  
  28  
  29  
  30  // ************

  31  // context menu

  32  
  33  // entries for right mouse menu - action for single record

  34  $listentries_single = array(
  35      '0'=>array('doLink',$path_pre."index.php?module=todo&amp;mode=forms&amp;justform=1&amp;projekt_ID=",'_blank','','Neues Todo'),
  36      '1'=>array('doLink',$path_pre."index.php?module=notes&amp;mode=forms&amp;justform=1&amp;projekt_ID=",'_blank','','Neue Notiz')
  37  );
  38  
  39    // entries for right mouse menu - action for selected records

  40  $listentries_selected = array(
  41      '0'=>array('proc_marked',$path_pre."$module/$module.php?mode=data&amp;up=$up&amp;sort=$sort&amp;perpage=$perpage&amp;tree_mode=$tree_mode&amp;delete_c=1&amp;ID_s=",'',__('Are you sure?'),__('Delete')),
  42      '1'=>array('proc_marked',$path_pre."lib/set_links.inc.php?module=$module&amp;ID_s=",'_blank','',__('Add to link list')),
  43      '2'=>array('proc_marked',$path_pre.$module."/".$module.".php?set_archiv_flag=1&amp;ID_s=",'','',__('Move to archive')),
  44      '3'=>array('proc_marked',$path_pre.$module."/".$module.".php?set_read_flag=1&amp;ID_s=",'','',__('Mark as read')),
  45      '4'=>array('proc_marked',$path_pre."misc/export.php?file=$module&amp;medium=csv&amp;ID_s=",'_blank','','csv Export')
  46  );
  47  
  48  // context menu

  49  include_once ($path_pre.'lib/contextmenu.inc.php');
  50  $menu3 = new contextmenu();
  51  echo $menu3->menu_page($module);
  52  
  53  // end context menu

  54  // ****************

  55  
  56  //anfang navi

  57  
  58  // define filter

  59  // call the main filter routine

  60  //$where = main_filter($filter,$rule,$keyword,$filter_ID,'projects');

  61  // define category

  62  // call the main filter routine

  63  $where = main_filter($filter, $rule, $keyword, $filter_ID, 'projects');
  64  
  65  // define category

  66  if ($category) $where .= " AND kategorie = $category";
  67  
  68  $result = db_query("SELECT ID
  69                      FROM ".DB_PREFIX."projekte
  70                      ".sql_filter_flags($module, array('archive', 'read'))."
  71                      WHERE (acc LIKE 'system' OR ((von = '$user_ID' OR acc LIKE 'group' OR acc LIKE '%\"$user_kurz\"%') AND $sql_user_group AND parent = ''))
  72                      $where ".sql_filter_flags($module, array('archive', 'read'), false)) or db_die();
  73  
  74  $liste= make_list($result);
  75  
  76  
  77  //tabs

  78  $tabs = array();
  79  $exp = get_export_link_data('projects');
  80  $tabs[] = array('href' => $exp['href'], 'active' => $exp['active'], 'id' => 'export', 'target' => '_self', 'text' => $exp['text'], 'position' => 'right');
  81  unset($exp);
  82  $output .= get_tabs_area($tabs);
  83  
  84  
  85  // button bar

  86  $buttons = array();
  87  $buttons[] = array('type' => 'link', 'href' => $_SERVER['PHP_SELF'].'?mode=forms&amp;action=new'.$sid, 'text' => __('New'), 'active' => false);
  88  $buttons[] = array('type' => 'link', 'href' => $_SERVER['PHP_SELF'].'?mode=options'.$sid, 'text' => __('Options'), 'active' => false);
  89  $buttons[] = array('type' => 'link', 'href' => $_SERVER['PHP_SELF'].'?mode=stat'.$sid, 'text' => __('Statistics'), 'active' => false);
  90  $buttons[] = array('type' => 'link', 'href' => $_SERVER['PHP_SELF'].'?mode=stat&amp;mode2=mystat'.$sid, 'text' => __('My Statistic'), 'active' => false);
  91  $buttons[] = array('type' => 'link', 'href' => $_SERVER['PHP_SELF'].'?mode=gantt'.$sid, 'text' => __('Gantt'), 'active' => false);
  92  $output .= get_buttons_area($buttons, 'oncontextmenu="startMenu(\''.$menu3->menusysID.'\',\''.$field_name.'\',this)"');
  93  
  94  $output .= '<div class="hline"></div>';
  95  
  96  // get all filter bars

  97  $where = " WHERE (acc LIKE 'system' OR ((von = '$user_ID' OR acc LIKE 'group' OR acc LIKE '%\"$user_kurz\"%') AND $sql_user_group))
  98           $where
  99           ".sql_filter_flags($module, array('archive', 'read'), false)."
 100           ".sort_string();
 101  $result_rows = '<a name="content"></a>'.build_table(array('ID','von','acc','parent'), 'projects', $where, $page, $perpage);
 102  $output .= get_all_filter_bars('projects', $result_rows);
 103  echo $output;
 104  $_SESSION['arrproj'] =& $arrproj;
 105  
 106  ?>


[ Powered by PHPXref - Served by Debian GNU/Linux ]