phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: projects/inc class.bodeliveries.inc.php,1.15,1.1


From: Bettina Gille <address@hidden>
Subject: [Phpgroupware-cvs] CVS: projects/inc class.bodeliveries.inc.php,1.15,1.16 class.boprojects.inc.php,1.49,1.50class.soprojecthours.inc.php,1.8,1.9 class.soprojects.inc.php,1.40,1.41class.uibilling.inc.php,1.28,1.29 class.uideliveries.inc.php,1.28,1.29class.uiprojecthours.inc.php,1.29,1.30 class.uiprojects.inc.php,1.61,1.62class.uistatistics.inc.php,1.16,1.17
Date: Fri, 25 Apr 2003 21:22:42 -0400

Update of /cvsroot/phpgroupware/projects/inc
In directory subversions:/tmp/cvs-serv30604/inc

Modified Files:
        class.bodeliveries.inc.php class.boprojects.inc.php 
        class.soprojecthours.inc.php class.soprojects.inc.php 
        class.uibilling.inc.php class.uideliveries.inc.php 
        class.uiprojecthours.inc.php class.uiprojects.inc.php 
        class.uistatistics.inc.php 
Log Message:
update app_header, globals, nextmatch calls  etc

Index: class.bodeliveries.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.bodeliveries.inc.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** class.bodeliveries.inc.php  5 Jan 2002 23:56:37 -0000       1.15
--- class.bodeliveries.inc.php  26 Apr 2003 01:22:39 -0000      1.16
***************
*** 65,71 ****
                }
  
!               function read_deliveries($query, $sort, $order, $limit, 
$project_id)
                {
!                       $del = $this->sodeliveries->read_deliveries($query, 
$sort, $order, $limit, $project_id);
                        $this->total_records = 
$this->sodeliveries->total_records;
                        return $del;
--- 65,71 ----
                }
  
!               function read_deliveries($start, $query, $sort, $order, $limit, 
$project_id)
                {
!                       $del = $this->sodeliveries->read_deliveries($start, 
$query, $sort, $order, $limit, $project_id);
                        $this->total_records = 
$this->sodeliveries->total_records;
                        return $del;

Index: class.boprojects.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.boprojects.inc.php,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -r1.49 -r1.50
*** class.boprojects.inc.php    18 Apr 2003 23:48:42 -0000      1.49
--- class.boprojects.inc.php    26 Apr 2003 01:22:39 -0000      1.50
***************
*** 79,89 ****
                        }
  
!                       $start  = $GLOBALS['HTTP_POST_VARS']['start'] ? 
$GLOBALS['HTTP_POST_VARS']['start'] : $GLOBALS['HTTP_GET_VARS']['start'];
!                       $query  = $GLOBALS['HTTP_POST_VARS']['query'] ? 
$GLOBALS['HTTP_POST_VARS']['query'] : $GLOBALS['HTTP_GET_VARS']['query'];
!                       $sort   = $GLOBALS['HTTP_POST_VARS']['sort'] ? 
$GLOBALS['HTTP_POST_VARS']['sort'] : $GLOBALS['HTTP_GET_VARS']['sort'];
!                       $order  = $GLOBALS['HTTP_POST_VARS']['order'] ? 
$GLOBALS['HTTP_POST_VARS']['order'] : $GLOBALS['HTTP_GET_VARS']['order'];
!                       $cat_id = $GLOBALS['HTTP_POST_VARS']['cat_id'] ? 
$GLOBALS['HTTP_POST_VARS']['cat_id'] : $GLOBALS['HTTP_GET_VARS']['cat_id'];
!                       $filter = $GLOBALS['HTTP_POST_VARS']['filter'] ? 
$GLOBALS['HTTP_POST_VARS']['filter'] : $GLOBALS['HTTP_GET_VARS']['filter'];
!                       $status = $GLOBALS['HTTP_POST_VARS']['status'] ? 
$GLOBALS['HTTP_POST_VARS']['status'] : $GLOBALS['HTTP_GET_VARS']['status'];
  
                        if(isset($start)) { $this->start = $start; }
--- 79,89 ----
                        }
  
!                       $start  = get_var('start',array('POST','GET'));
!                       $query  = get_var('query',array('POST','GET'));
!                       $sort   = get_var('sort',array('POST','GET'));
!                       $order  = get_var('order',array('POST','GET'));
!                       $cat_id = get_var('cat_id',array('POST','GET'));
!                       $filter = get_var('filter',array('POST','GET'));
!                       $status = get_var('status',array('POST','GET'));
  
                        if(isset($start)) { $this->start = $start; }
***************
*** 114,117 ****
--- 114,119 ----
                                case 'asubs'    : $column = 'projects_asubs'; 
break;
                                case 'ustat'    : $column = 'projects_ustat'; 
break;
+                               case 'bill'             : $column = 
'projects_bill'; break;
+                               case 'del'              : $column = 
'projects_del'; break;
                        }
                        return $column;

Index: class.soprojecthours.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.soprojecthours.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** class.soprojecthours.inc.php        9 Jan 2002 01:06:53 -0000       1.8
--- class.soprojecthours.inc.php        26 Apr 2003 01:22:39 -0000      1.9
***************
*** 7,11 ****
        * Written by Bettina Gille address@hidden                   *
        * -----------------------------------------------                   *
!       * Copyright (C) 2000,2001,2002 Bettina Gille                        *
        *                                                                   *
        * This program is free software; you can redistribute it and/or     *
--- 7,11 ----
        * Written by Bettina Gille address@hidden                   *
        * -----------------------------------------------                   *
!       * Copyright (C) 2000 - 2003 Bettina Gille                           *
        *                                                                   *
        * This program is free software; you can redistribute it and/or     *
***************
*** 37,41 ****
                }
  
!               function read_hours($start, $limit = True, $query = '', 
$filter, $sort = '', $order = '', $state, $project_id)
                {
                        if ($order)
--- 37,41 ----
                }
  
!               function read_hours($start, $limit = True, $query = '', $filter 
= '', $sort = '', $order = '', $state, $project_id)
                {
                        if ($order)
***************
*** 55,59 ****
                        }
  
!                       if ($filter == 'private')
                        {
                                $filtermethod .= " AND employee='" . 
$this->account . "'";
--- 55,59 ----
                        }
  
!                       if ($filter == 'yours')
                        {
                                $filtermethod .= " AND employee='" . 
$this->account . "'";

Index: class.soprojects.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.soprojects.inc.php,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -r1.40 -r1.41
*** class.soprojects.inc.php    18 Apr 2003 23:48:42 -0000      1.40
--- class.soprojects.inc.php    26 Apr 2003 01:22:39 -0000      1.41
***************
*** 496,502 ****
                        switch ($action)
                        {
-                               case 'mains': $p_table = ' phpgw_p_projects'; 
break;
-                               case 'subs'     : $p_table = ' 
phpgw_p_projects'; break;
                                case 'act'      : $p_table = ' 
phpgw_p_activities '; break;
                        }
  
--- 496,501 ----
                        switch ($action)
                        {
                                case 'act'      : $p_table = ' 
phpgw_p_activities '; break;
+                               default         : $p_table = ' 
phpgw_p_projects'; break;
                        }
  

Index: class.uibilling.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.uibilling.inc.php,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** class.uibilling.inc.php     25 Apr 2003 00:37:16 -0000      1.28
--- class.uibilling.inc.php     26 Apr 2003 01:22:39 -0000      1.29
***************
*** 184,187 ****
--- 184,189 ----
                        
$GLOBALS['phpgw']->template->set_block('projects_list_t','projects_list','list');
  
+                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('projects') . ': ' . ($pro_parent?lang('list jobs'):lang('list projects'));
+ 
                        if (!$action)
                        {
***************
*** 193,198 ****
                                'menuaction'    => 
'projects.uibilling.list_projects',
                                'pro_parent'    => $pro_parent,
!                               'action'                => $action,
!                               'cat_id'                => $this->cat_id
                        );
  
--- 195,199 ----
                                'menuaction'    => 
'projects.uibilling.list_projects',
                                'pro_parent'    => $pro_parent,
!                               'action'                => $action
                        );
  
***************
*** 202,205 ****
--- 203,211 ----
                        }
  
+                       if (!$action)
+                       {
+                               $action = 'mains';
+                       }
+ 
                        if (!$pro_parent)
                        {
***************
*** 225,229 ****
                                                        . '<select 
name="cat_id" onChange="this.form.submit();"><option value="">' . lang('None') 
. '</option>' . "\n"
                                                        . 
$this->cats->formatted_list('select','all',$this->cat_id,True) . '</select>';
-                               
$GLOBALS['phpgw']->template->set_var(lang_header,lang('Project list'));
                        }
                        else
--- 231,234 ----
***************
*** 232,236 ****
                                                        . '<select 
name="pro_parent" onChange="this.form.submit();"><option value="">' . 
lang('Select main project') . '</option>' . "\n"
                                                        . 
$this->boprojects->select_project_list('mains', $status, $pro_parent) . 
'</select>';
-                               
$GLOBALS['phpgw']->template->set_var('lang_header',lang('Job list'));
                        }
  
--- 237,240 ----
***************
*** 240,246 ****
                        
$GLOBALS['phpgw']->template->set_var('action_list',$action_list);
                        
$GLOBALS['phpgw']->template->set_var('filter_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('filter_list',$this->nextmatchs->filter(1,1));
                        
$GLOBALS['phpgw']->template->set_var('search_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('search_list',$this->nextmatchs->search(1));
  
  // ---------------- list header variable template-declarations 
--------------------------
--- 244,250 ----
                        
$GLOBALS['phpgw']->template->set_var('action_list',$action_list);
                        
$GLOBALS['phpgw']->template->set_var('filter_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('filter_list',$this->nextmatchs->new_filter($this->filter));
                        
$GLOBALS['phpgw']->template->set_var('search_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('search_list',$this->nextmatchs->search(array('query'
 => $this->query)));
  
  // ---------------- list header variable template-declarations 
--------------------------
***************
*** 340,344 ****
                                
$GLOBALS['phpgw']->template->set_var('lang_part',lang('Invoice'));
  
!                               $link_data['menuaction'] = 
'projects.uibilling.list_invoices';
                                
$GLOBALS['phpgw']->template->set_var('partlist',$GLOBALS['phpgw']->link('/index.php',$link_data));
                                
$GLOBALS['phpgw']->template->set_var('lang_partlist',lang('Invoice list'));
--- 344,349 ----
                                
$GLOBALS['phpgw']->template->set_var('lang_part',lang('Invoice'));
  
!                               $link_data['menuaction']        = 
'projects.uibilling.list_invoices';
!                               $link_data['action']            = 'bill';
                                
$GLOBALS['phpgw']->template->set_var('partlist',$GLOBALS['phpgw']->link('/index.php',$link_data));
                                
$GLOBALS['phpgw']->template->set_var('lang_partlist',lang('Invoice list'));
***************
*** 376,384 ****
                        $project_id     = 
get_var('project_id',array('POST','GET'));
  
-                       $start          = get_var('start',array('POST','GET'));
-                       $sort           = get_var('sort',array('POST','GET'));
-                       $order          = get_var('order',array('POST','GET'));
-                       $query          = get_var('query',array('POST','GET'));
- 
                        $this->display_app_header();
  
--- 381,384 ----
***************
*** 389,398 ****
                        (
                                'menuaction'    => 
'projects.uibilling.list_invoices',
!                               'action'                => $action,
!                               'project_id'    => $project_id,
!                               'start'                 => $start,
!                               'sort'                  => $sort,
!                               'order'                 => $order,
!                               'query'                 => $query
                        );
  
--- 389,393 ----
                        (
                                'menuaction'    => 
'projects.uibilling.list_invoices',
!                               'action'                => $action
                        );
  
***************
*** 412,422 ****
                        }
  
!                       
$GLOBALS['phpgw']->template->set_var('lang_action',lang('Invoice list'));
                        
$GLOBALS['phpgw']->template->set_var('search_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('search_list',$this->nextmatchs->search(1));
  
!                       if (! $start)
                        {
!                               $start = 0;
                        }
  
--- 407,418 ----
                        }
  
!                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('projects') . ': ' . lang('list invoices');
! 
                        
$GLOBALS['phpgw']->template->set_var('search_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('search_list',$this->nextmatchs->search(array('query'
 => $this->query)));
  
!                       if (! $this->start)
                        {
!                               $this->start = 0;
                        }
  
***************
*** 426,430 ****
                        }
  
!                       $bill = $this->bobilling->read_invoices($start, $query, 
$sort, $order, True, $project_id);
  
  // -------------------- nextmatch variable template-declarations 
-----------------------------
--- 422,426 ----
                        }
  
!                       $bill = $this->bobilling->read_invoices($this->start, 
$this->query, $this->sort, $this->order, True, $project_id);
  
  // -------------------- nextmatch variable template-declarations 
-----------------------------
***************
*** 510,517 ****
                        $referer        = get_var('referer',array('POST'));
  
- 
- 
-                       global $action, $Invoice, $project_id, $action, 
$invoice_id, $values, $select, $referer;
- 
                        if (! $Invoice)
                        {
--- 506,509 ----
***************
*** 572,580 ****
                                'action'                => $action,
                                'project_id'    => $project_id,
!                               'invoice_id'    => $invoice_id,
!                               'action'                => $action
                        );
  
!                       
$GLOBALS['phpgw']->template->set_var('lang_action',lang('Invoice'));
                        
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
                        
$GLOBALS['phpgw']->template->set_var('currency',$prefs['currency']);
--- 564,572 ----
                                'action'                => $action,
                                'project_id'    => $project_id,
!                               'invoice_id'    => $invoice_id
                        );
  
!                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('projects') . ': ' . lang('create invoice');
! 
                        
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
                        
$GLOBALS['phpgw']->template->set_var('currency',$prefs['currency']);

Index: class.uideliveries.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.uideliveries.inc.php,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** class.uideliveries.inc.php  25 Apr 2003 00:37:16 -0000      1.28
--- class.uideliveries.inc.php  26 Apr 2003 01:22:39 -0000      1.29
***************
*** 169,172 ****
--- 169,174 ----
                        
$GLOBALS['phpgw']->template->set_block('projects_list_t','projects_list','list');
  
+                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('projects') . ': ' . ($pro_parent?lang('list jobs'):lang('list projects'));
+ 
                        if (!$action)
                        {
***************
*** 225,231 ****
                        
$GLOBALS['phpgw']->template->set_var('action_list',$action_list);
                        
$GLOBALS['phpgw']->template->set_var('filter_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('filter_list',$this->nextmatchs->filter(1,1));
                        
$GLOBALS['phpgw']->template->set_var('search_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('search_list',$this->nextmatchs->search(1));
  
  // ---------------- list header variable template-declarations 
--------------------------
--- 227,233 ----
                        
$GLOBALS['phpgw']->template->set_var('action_list',$action_list);
                        
$GLOBALS['phpgw']->template->set_var('filter_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('filter_list',$this->nextmatchs->new_filter($this->filter));
                        
$GLOBALS['phpgw']->template->set_var('search_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('search_list',$this->nextmatchs->search(array('query'
 => $this->query)));
  
  // ---------------- list header variable template-declarations 
--------------------------
***************
*** 325,329 ****
                                
$GLOBALS['phpgw']->template->set_var('lang_part',lang('Delivery'));
  
!                               $link_data['menuaction'] = 
'projects.uideliveries.list_deliveries';
                                
$GLOBALS['phpgw']->template->set_var('partlist',$GLOBALS['phpgw']->link('/index.php',$link_data));
                                
$GLOBALS['phpgw']->template->set_var('lang_partlist',lang('Delivery list'));
--- 327,332 ----
                                
$GLOBALS['phpgw']->template->set_var('lang_part',lang('Delivery'));
  
!                               $link_data['menuaction']        = 
'projects.uideliveries.list_deliveries';
!                               $link_data['action']            = 'del';
                                
$GLOBALS['phpgw']->template->set_var('partlist',$GLOBALS['phpgw']->link('/index.php',$link_data));
                                
$GLOBALS['phpgw']->template->set_var('lang_partlist',lang('Delivery list'));
***************
*** 432,436 ****
                        
$GLOBALS['phpgw']->template->set_block('hours_list_t','hours_list','list');
  
!                       
$GLOBALS['phpgw']->template->set_var('lang_action',lang('Delivery'));
                        
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
  
--- 435,440 ----
                        
$GLOBALS['phpgw']->template->set_block('hours_list_t','hours_list','list');
  
!                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('projects') . ': ' . lang('create delivery');
! 
                        
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
  
***************
*** 665,673 ****
                        $project_id     = 
get_var('project_id',array('POST','GET'));
  
-                       $start          = get_var('start',array('POST','GET'));
-                       $sort           = get_var('sort',array('POST','GET'));
-                       $order          = get_var('order',array('POST','GET'));
-                       $query          = get_var('query',array('POST','GET'));
- 
                        $this->display_app_header();
  
--- 669,672 ----
***************
*** 679,696 ****
                                'menuaction'    => 
'projects.uideliveries.list_deliveries',
                                'action'                => $action,
!                               'project_id'    => $project_id,
!                               'start'                 => $start,
!                               'query'                 => $query,
!                               'sort'                  => $sort,
!                               'order'                 => $order
                        );
  
!                       
$GLOBALS['phpgw']->template->set_var('lang_action',lang('Delivery list'));
                        
$GLOBALS['phpgw']->template->set_var('search_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('search_list',$this->nextmatchs->search(1));
  
!                       if (! $start)
                        {
!                               $start = 0;
                        }
  
--- 678,692 ----
                                'menuaction'    => 
'projects.uideliveries.list_deliveries',
                                'action'                => $action,
!                               'project_id'    => $project_id
                        );
  
!                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('projects') . ': ' . lang('list deliveries');
! 
                        
$GLOBALS['phpgw']->template->set_var('search_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('search_list',$this->nextmatchs->search(array('query'
 => $this->query)));
  
!                       if (! $this->start)
                        {
!                               $this->start = 0;
                        }
  
***************
*** 700,713 ****
                        }
  
!                       $del = $this->bodeliveries->read_deliveries($query, 
$sort, $order, True, $project_id);
  
  // -------------------- nextmatch variable template-declarations 
-----------------------------
  
!                       $left = 
$this->nextmatchs->left('/index.php',$start,$this->bodeliveries->total_records,$link_data);
!                       $right = 
$this->nextmatchs->right('/index.php',$start,$this->bodeliveries->total_records,$link_data);
                        $GLOBALS['phpgw']->template->set_var('left',$left);
                        $GLOBALS['phpgw']->template->set_var('right',$right);
  
!                       
$GLOBALS['phpgw']->template->set_var('lang_showing',$this->nextmatchs->show_hits($this->bodeliveries->total_records,$start));
  
  // ------------------------ end nextmatch template 
-------------------------------------------
--- 696,709 ----
                        }
  
!                       $del = 
$this->bodeliveries->read_deliveries($this->start, $this->query, $this->sort, 
$this->order, True, $project_id);
  
  // -------------------- nextmatch variable template-declarations 
-----------------------------
  
!                       $left = 
$this->nextmatchs->left('/index.php',$this->start,$this->bodeliveries->total_records,$link_data);
!                       $right = 
$this->nextmatchs->right('/index.php',$this->start,$this->bodeliveries->total_records,$link_data);
                        $GLOBALS['phpgw']->template->set_var('left',$left);
                        $GLOBALS['phpgw']->template->set_var('right',$right);
  
!                       
$GLOBALS['phpgw']->template->set_var('lang_showing',$this->nextmatchs->show_hits($this->bodeliveries->total_records,$this->start));
  
  // ------------------------ end nextmatch template 
-------------------------------------------
***************
*** 715,722 ****
  // ---------------- list header variable template-declarations 
-------------------------------
  
!                       
$GLOBALS['phpgw']->template->set_var('sort_num',$this->nextmatchs->show_sort_order($sort,'num',$order,'/index.php',lang('Delivery
 ID'),$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('sort_customer',$this->nextmatchs->show_sort_order($sort,'customer',$order,'/index.php',lang('Customer'),$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('sort_title',$this->nextmatchs->show_sort_order($sort,'title',$order,'/index.php',lang('Title'),$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('sort_date',$this->nextmatchs->show_sort_order($sort,'date',$order,'/index.php',lang('Date'),$link_data));
                        $GLOBALS['phpgw']->template->set_var('sort_sum','');
                        
$GLOBALS['phpgw']->template->set_var('lang_data',lang('Delivery'));
--- 711,718 ----
  // ---------------- list header variable template-declarations 
-------------------------------
  
!                       
$GLOBALS['phpgw']->template->set_var('sort_num',$this->nextmatchs->show_sort_order($this->sort,'num',$this->order,'/index.php',lang('Delivery
 ID'),$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('sort_customer',$this->nextmatchs->show_sort_order($this->sort,'customer',$this->order,'/index.php',lang('Customer'),$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('sort_title',$this->nextmatchs->show_sort_order($this->sort,'title',$this->order,'/index.php',lang('Title'),$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('sort_date',$this->nextmatchs->show_sort_order($this->sort,'date',$this->order,'/index.php',lang('Date'),$link_data));
                        $GLOBALS['phpgw']->template->set_var('sort_sum','');
                        
$GLOBALS['phpgw']->template->set_var('lang_data',lang('Delivery'));
***************
*** 770,773 ****
--- 766,770 ----
                        }
                        
$GLOBALS['phpgw']->template->pfp('out','projects_list_t',True);
+                       $this->save_sessiondata('del');
                }
  

Index: class.uiprojecthours.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.uiprojecthours.inc.php,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -r1.29 -r1.30
*** class.uiprojecthours.inc.php        25 Apr 2003 00:37:16 -0000      1.29
--- class.uiprojecthours.inc.php        26 Apr 2003 01:22:39 -0000      1.30
***************
*** 37,41 ****
                (
                        'list_hours'    => True,
-                       'add_hours'             => True,
                        'edit_hours'    => True,
                        'delete_hours'  => True,
--- 37,40 ----
***************
*** 202,225 ****
                        );
  
-                       $GLOBALS['filter']      = $this->filter;
-                       $GLOBALS['query']       = $this->query;
- 
                        
$GLOBALS['phpgw']->template->set_var('project_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
                        
$GLOBALS['phpgw']->template->set_var('filter_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('filter_list',$this->nextmatchs->filter(1));
                        
$GLOBALS['phpgw']->template->set_var('search_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('search_list',$this->nextmatchs->search(1));
                        
$GLOBALS['phpgw']->template->set_var('state_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
  
!                       if ($action != 'asubs')
!                       {
!                               
$GLOBALS['phpgw']->template->set_var(lang_action,lang('Work hours list'));
!                               
$GLOBALS['phpgw']->template->set_var('project_list',$this->boprojects->select_project_list('all',$status,$project_id));
!                       }
!                       else
!                       {
!                               
$GLOBALS['phpgw']->template->set_var(lang_action,lang('Work hours archive'));
!                               
$GLOBALS['phpgw']->template->set_var('project_list',$this->boprojects->select_project_list('all','archive',$project_id));
!                       }
  
                        switch($this->state)
--- 201,213 ----
                        );
  
                        
$GLOBALS['phpgw']->template->set_var('project_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
                        
$GLOBALS['phpgw']->template->set_var('filter_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('filter_list',$this->nextmatchs->new_filter(array('format'
 => 'yours','filter' => $this->filter)));
                        
$GLOBALS['phpgw']->template->set_var('search_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('search_list',$this->nextmatchs->search(array('query'
 => $this->query)));
                        
$GLOBALS['phpgw']->template->set_var('state_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
  
!                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('projects') . ': ' . (($action == 'asubs')?lang('work hours 
archive'):lang('list work hours'));
!                       
$GLOBALS['phpgw']->template->set_var('project_list',$this->boprojects->select_project_list('all',(($action
 != 'asubs')?$status:'archive'),$project_id));
  
                        switch($this->state)
***************
*** 352,356 ****
                                if 
($this->boprojects->check_perms($this->grants[$coordinator],PHPGW_ACL_ADD) || 
$coordinator == $this->account)
                                {
!                                       $link_data['menuaction'] = 
'projects.uiprojecthours.add_hours';
                                        
$GLOBALS['phpgw']->template->set_var('action','<form method="POST" action="' . 
$GLOBALS['phpgw']->link('/index.php',$link_data)
                                                                                
                                                        . '"><input 
type="submit" value="' . lang('Add') . '"></form>');
--- 340,345 ----
                                if 
($this->boprojects->check_perms($this->grants[$coordinator],PHPGW_ACL_ADD) || 
$coordinator == $this->account)
                                {
!                                       $link_data['menuaction'] = 
'projects.uiprojecthours.edit_hours';
!                                       unset($link_data['hours_id']);
                                        
$GLOBALS['phpgw']->template->set_var('action','<form method="POST" action="' . 
$GLOBALS['phpgw']->link('/index.php',$link_data)
                                                                                
                                                        . '"><input 
type="submit" value="' . lang('Add') . '"></form>');
***************
*** 422,566 ****
                }
  
-               function add_hours()
-               {
-                       $project_id     = 
get_var('project_id',array('POST','GET'));
-                       $pro_parent     = 
get_var('pro_parent',array('POST','GET'));
-                       $values         = get_var('values',array('POST'));
-                       $submit         = get_var('submit',array('POST'));
- 
-                       $link_data = array
-                       (
-                               'menuaction'    => 
'projects.uiprojecthours.list_hours',
-                               'project_id'    => $project_id,
-                               'pro_parent'    => $pro_parent
-                       );
- 
-                       if ($submit)
-                       {
-                               $values['project_id'] = $project_id;
-                               $values['pro_parent'] = $pro_parent;
-                               $error = 
$this->boprojecthours->check_values($values);
-                               if (is_array($error))
-                               {
-                                       
$GLOBALS['phpgw']->template->set_var('message',$GLOBALS['phpgw']->common->error_list($error));
-                               }
-                               else
-                               {
-                                       
$this->boprojecthours->save_hours($values);
-                                       Header('Location: ' . 
$GLOBALS['phpgw']->link('/index.php',$link_data));
-                               }
-                       }
- 
-                       $this->display_app_header();
- 
-                       $GLOBALS['phpgw']->template->set_file(array('hours_add' 
=> 'hours_formhours.tpl'));
-                       
$GLOBALS['phpgw']->template->set_block('hours_add','add','addhandle');
-                       
$GLOBALS['phpgw']->template->set_block('hours_add','edit','edithandle');
- 
-                       
$GLOBALS['phpgw']->template->set_var('doneurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
- 
-                       $link_data['menuaction'] = 
'projects.uiprojecthours.add_hours';
-                       
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
-                       
$GLOBALS['phpgw']->template->set_var('lang_action',lang('Add work hours'));
- 
-                       
$GLOBALS['phpgw']->template->set_var('project_name',$this->boprojects->return_value('pro',$project_id));
- 
-                       if ($pro_parent)
-                       {
-                               
$GLOBALS['phpgw']->template->set_var('pro_parent',$GLOBALS['phpgw']->strip_html($this->boprojects->return_value('pro',$pro_parent)));
-                               
$GLOBALS['phpgw']->template->set_var('lang_pro_parent',lang('Main project:'));
-                       }
- 
-                       
$GLOBALS['phpgw']->template->set_var('activity_list',$this->boprojects->select_hours_activities($project_id,
 $values['activity_id']));
- 
-                       $sdate = $this->hdate_format($values['sdate']);
- 
-                       
$GLOBALS['phpgw']->template->set_var('start_date_select',$GLOBALS['phpgw']->common->dateformatorder($this->sbox->getYears('values[syear]',$sdate['year']),
-                                                                               
                                                                        
$this->sbox->getMonthText('values[smonth]',$sdate['month']),
-                                                                               
                                                                        
$this->sbox->getDays('values[sday]',$sdate['day'])));
- 
-                       $amsel = ' checked';
-                       $pmsel = '';
- 
-                       if 
($GLOBALS['phpgw_info']['user']['preferences']['common']['timeformat'] == '12')
-                       {
-                               if ($sdate['hour'] >= 12)
-                               {
-                                       $amsel = '';
-                                       $pmsel = ' checked'; 
-                                       if ($sdate['hour'] > 12)
-                                       {
-                                               $sdate['hour'] = $sdate['hour'] 
- 12;
-                                       }
-                               }
- 
-                               if ($sdate['hour'] == 0)
-                               {
-                                       $sdate['hour'] = 12;
-                               }
- 
-                               $sradio = '<input type="radio" 
name="values[sampm]" value="am"' . $amsel . '>am';
-                               $sradio .= '<input type="radio" 
name="values[sampm]" value="pm"' . $pmsel . '>pm';
-                               
$GLOBALS['phpgw']->template->set_var('sradio',$sradio);
-                       }
-                       else
-                       {
-                               
$GLOBALS['phpgw']->template->set_var('sradio','');
-                       }
- 
-                       
$GLOBALS['phpgw']->template->set_var('shour',$sdate['hour']);
-                       
$GLOBALS['phpgw']->template->set_var('smin',$sdate['min']);
- 
-                       $edate = $this->hdate_format($values['edate']);
- 
-                       
$GLOBALS['phpgw']->template->set_var('end_date_select',$GLOBALS['phpgw']->common->dateformatorder($this->sbox->getYears('values[eyear]',$edate['year']),
-                                                                               
                                                                
$this->sbox->getMonthText('values[emonth]',$edate['month']),
-                                                                               
                                                                
$this->sbox->getDays('values[eday]',$edate['day'])));
- 
-                       if 
($GLOBALS['phpgw_info']['user']['preferences']['common']['timeformat'] == '12')
-                       {
-                               if ($edate['hour'] >= 12)
-                               {
-                                       $amsel = '';
-                                       $pmsel = ' checked';
- 
-                                       if ($edate['hour'] > 12)
-                                       {
-                                               $edate['hour'] = $edate['hour'] 
- 12;
-                                       }
-                               }
-                               if ($edate['hour'] == 0)
-                               {
-                                       $edate['hour'] = 12;
-                               }
- 
-                               $eradio = '<input type="radio" 
name="values[eampm]" value="am"' . $amsel . '>am';
-                               $eradio .= '<input type="radio" 
name="values[eampm]" value="pm"' . $pmsel . '>pm';
-                               
$GLOBALS['phpgw']->template->set_var('eradio',$eradio);
-                       }
-                       else
-                       {
-                               
$GLOBALS['phpgw']->template->set_var('eradio','');
-                       }
- 
-                       
$GLOBALS['phpgw']->template->set_var('ehour',$edate['hour']);
-                       
$GLOBALS['phpgw']->template->set_var('emin',$edate['min']);
- 
-                       
$GLOBALS['phpgw']->template->set_var('remark',nl2br($values['remark']));
-                       
$GLOBALS['phpgw']->template->set_var('hours_descr',$values['hours_descr']);
- 
-                       
$GLOBALS['phpgw']->template->set_var('hours',$values['hours']);
-                       
$GLOBALS['phpgw']->template->set_var('minutes',$values['minutes']);
- 
-                       
$GLOBALS['phpgw']->template->set_var('status_list',$this->status_format($values['status']));
- 
-                       
$GLOBALS['phpgw']->template->set_var('employee_list',$this->employee_format($values['employee']));
- 
-                       $GLOBALS['phpgw']->template->set_var('edithandle','');
-                       $GLOBALS['phpgw']->template->set_var('addhandle','');
-                       $GLOBALS['phpgw']->template->pfp('out','hours_add');
-                       $GLOBALS['phpgw']->template->pfp('addhandle','add');
-               }
- 
                function edit_hours()
                {
--- 411,414 ----
***************
*** 570,587 ****
  
                        $values         = get_var('values',array('POST'));
-                       $submit         = get_var('submit',array('POST'));
                        $referer        = get_var('referer',array('POST'));
  
!                       if (! $submit)
                        {
                                $referer = 
$GLOBALS['HTTP_SERVER_VARS']['HTTP_REFERER'] ? 
$GLOBALS['HTTP_SERVER_VARS']['HTTP_REFERER'] : $GLOBALS['HTTP_REFERER'];
                        }
  
!                       if (!$hours_id)
!                       {
!                               Header('Location: ' . $referer);
!                       }
! 
!                       if ($submit)
                        {
                                $values['hours_id']             = $hours_id;
--- 418,429 ----
  
                        $values         = get_var('values',array('POST'));
                        $referer        = get_var('referer',array('POST'));
  
!                       if (! $values['submit'])
                        {
                                $referer = 
$GLOBALS['HTTP_SERVER_VARS']['HTTP_REFERER'] ? 
$GLOBALS['HTTP_SERVER_VARS']['HTTP_REFERER'] : $GLOBALS['HTTP_REFERER'];
                        }
  
!                       if ($values['submit'])
                        {
                                $values['hours_id']             = $hours_id;
***************
*** 610,616 ****
                        $this->display_app_header();
  
!                       
$GLOBALS['phpgw']->template->set_file(array('hours_edit' => 
'hours_formhours.tpl'));
!                       
$GLOBALS['phpgw']->template->set_block('hours_edit','add','addhandle');
!                       
$GLOBALS['phpgw']->template->set_block('hours_edit','edit','edithandle');
  
                        
$GLOBALS['phpgw']->template->set_var('hidden_vars','<input type="hidden" 
name="referer" value="' . $referer . '">');
--- 452,460 ----
                        $this->display_app_header();
  
!                       $form = ($hours_id?'edit':'add');
! 
!                       $GLOBALS['phpgw']->template->set_file(array('hours_' . 
$form => 'hours_formhours.tpl'));
!                       $GLOBALS['phpgw']->template->set_block('hours_' . 
$form,'add','addhandle');
!                       $GLOBALS['phpgw']->template->set_block('hours_' . 
$form,'edit','edithandle');
  
                        
$GLOBALS['phpgw']->template->set_var('hidden_vars','<input type="hidden" 
name="referer" value="' . $referer . '">');
***************
*** 619,626 ****
  
                        
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('lang_action',lang('Edit work hours'));
! 
!                       $values = 
$this->boprojecthours->read_single_hours($hours_id);
  
                        
$GLOBALS['phpgw']->template->set_var('status_list',$this->status_format($values['status']));
                        
$GLOBALS['phpgw']->template->set_var('employee_list',$this->employee_format($values['employee']));
--- 463,472 ----
  
                        
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('projects') . ': ' . ($hours_id?lang('edit work hours'):lang('add work 
hours'));
  
+                       if ($hours_id)
+                       {
+                               $values = 
$this->boprojecthours->read_single_hours($hours_id);
+                       }
                        
$GLOBALS['phpgw']->template->set_var('status_list',$this->status_format($values['status']));
                        
$GLOBALS['phpgw']->template->set_var('employee_list',$this->employee_format($values['employee']));
***************
*** 740,745 ****
                        $GLOBALS['phpgw']->template->set_var('edithandle','');
                        $GLOBALS['phpgw']->template->set_var('addhandle','');
!                       $GLOBALS['phpgw']->template->pfp('out','hours_edit');
!                       $GLOBALS['phpgw']->template->pfp('edithandle','edit');
                }
  
--- 586,592 ----
                        $GLOBALS['phpgw']->template->set_var('edithandle','');
                        $GLOBALS['phpgw']->template->set_var('addhandle','');
! 
!                       $GLOBALS['phpgw']->template->pfp('out','hours_' . 
$form);
!                       $GLOBALS['phpgw']->template->pfp($form . 
'handle',$form);
                }
  

Index: class.uiprojects.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.uiprojects.inc.php,v
retrieving revision 1.61
retrieving revision 1.62
diff -C2 -r1.61 -r1.62
*** class.uiprojects.inc.php    25 Apr 2003 00:37:16 -0000      1.61
--- class.uiprojects.inc.php    26 Apr 2003 01:22:39 -0000      1.62
***************
*** 39,48 ****
                (
                        'list_projects'         => True,
-                       'add_project'           => True,
                        'edit_project'          => True,
                        'delete_pa'                     => True,
                        'view_project'          => True,
                        'list_activities'       => True,
-                       'add_activity'          => True,
                        'edit_activity'         => True,
                        'list_admins'           => True,
--- 39,46 ----
***************
*** 169,180 ****
                }
  
!               function status_format()
                {
!                       if (! $this->status)
                        {
!                               $this->status = 'active';
                        }
  
!                       switch ($this->status)
                        {
                                case 'active':          $stat_sel[0]=' 
selected'; break;
--- 167,178 ----
                }
  
!               function status_format($status = '')
                {
!                       if (!$status)
                        {
!                               $status = $this->status = 'active';
                        }
  
!                       switch ($status)
                        {
                                case 'active':          $stat_sel[0]=' 
selected'; break;
***************
*** 199,202 ****
--- 197,202 ----
                        
$GLOBALS['phpgw']->template->set_block('projects_list_t','projects_list','list');
  
+                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('projects') . ': ' . ($pro_parent?lang('list jobs'):lang('list projects'));
+ 
                        if (!$action)
                        {
***************
*** 208,213 ****
                                'menuaction'    => 
'projects.uiprojects.list_projects',
                                'pro_parent'    => $pro_parent,
!                               'action'                => $action,
!                               'cat_id'                => $this->cat_id
                        );
  
--- 208,212 ----
                                'menuaction'    => 
'projects.uiprojects.list_projects',
                                'pro_parent'    => $pro_parent,
!                               'action'                => $action
                        );
  
***************
*** 259,267 ****
                        
$GLOBALS['phpgw']->template->set_var('action_list',$action_list);
                        
$GLOBALS['phpgw']->template->set_var('filter_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('filter_list',$this->nextmatchs->filter(1,array('yours'
 => 1,'filter' => $this->filter)));
                        
$GLOBALS['phpgw']->template->set_var('search_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('search_list',$this->nextmatchs->search(array('search_obj'
 => 1,'query' => $this->query)));
                        
$GLOBALS['phpgw']->template->set_var('status_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('status_list',$this->status_format());
  
  // ---------------- list header variable template-declarations 
--------------------------
--- 258,266 ----
                        
$GLOBALS['phpgw']->template->set_var('action_list',$action_list);
                        
$GLOBALS['phpgw']->template->set_var('filter_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('filter_list',$this->nextmatchs->new_filter($this->filter));
                        
$GLOBALS['phpgw']->template->set_var('search_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('search_list',$this->nextmatchs->search(array('query'
 => $this->query)));
                        
$GLOBALS['phpgw']->template->set_var('status_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('status_list',$this->status_format($this->status));
  
  // ---------------- list header variable template-declarations 
--------------------------
***************
*** 389,393 ****
  // --------------- template declaration for Add Form 
--------------------------
  
!                       $link_data['menuaction'] = 
'projects.uiprojects.add_project';
  
                        if ($action == 'mains')
--- 388,393 ----
  // --------------- template declaration for Add Form 
--------------------------
  
!                       $link_data['menuaction'] = 
'projects.uiprojects.edit_project';
!                       unset($link_data['project_id']);
  
                        if ($action == 'mains')
***************
*** 425,432 ****
                                                                                
        . '"><input type="submit" name="Add" value="' . lang('Add') 
.'"></form>');
                        }
-                       else
-                       {
-                               $GLOBALS['phpgw']->template->set_var('add','');
-                       }
  
  // ----------------------- end Add form declaration 
----------------------------
--- 425,428 ----
***************
*** 456,622 ****
                }
  
-               function add_project()
-               {
-                       $action                         = 
get_var('action',array('POST','GET'));
-                       $pro_parent             = 
get_var('pro_parent',array('POST','GET'));
- 
-                       $submit                         = 
get_var('submit',array('POST'));
-                       $cat_id                         = 
get_var('cat_id',array('POST','GET'));
- 
-                       $new_cat                        = 
get_var('new_cat',array('POST'));
-                       $abid                           = 
get_var('abid',array('POST'));
- 
-                       $book_activities        = 
get_var('book_activities',array('POST'));
-                       $bill_activities        = 
get_var('bill_activities',array('POST'));
- 
-                       $name                           = 
get_var('name',array('POST'));
-                       $values                         = 
get_var('values',array('POST'));
- 
-                       if ($new_cat)
-                       {
-                               $cat_id = $new_cat;
-                       }
- 
-                       $link_data = array
-                       (
-                               'menuaction'    => 
'projects.uiprojects.list_projects',
-                               'pro_parent'    => $pro_parent,
-                               'action'                => $action,
-                               'cat_id'                => $cat_id
-                       );
- 
-                       if ($submit)
-                       {
-                               $values['cat']          = $cat_id;
-                               $values['customer'] = $abid;
-                               $values['parent']       = $pro_parent;
- 
-                               $error = 
$this->boprojects->check_values($action, $values, $book_activities, 
$bill_activities);
-                               if (is_array($error))
-                               {
-                                       
$GLOBALS['phpgw']->template->set_var('message',$GLOBALS['phpgw']->common->error_list($error));
-                               }
-                               else
-                               {
-                                       
$this->boprojects->save_project($action, $values, $book_activities, 
$bill_activities);
-                                       Header('Location: ' . 
$GLOBALS['phpgw']->link('/index.php',$link_data));
-                               }
-                       }
- 
-                       $this->display_app_header();
- 
-                       
$GLOBALS['phpgw']->template->set_file(array('projects_add' => 'form.tpl'));
-                       
$GLOBALS['phpgw']->template->set_block('projects_add','add','addhandle');
-                       
$GLOBALS['phpgw']->template->set_block('projects_add','edit','edithandle');
- 
-                       $nopref = $this->boprojects->check_prefs();
-                       if (is_array($nopref))
-                       {
-                               
$GLOBALS['phpgw']->template->set_var('pref_message',$GLOBALS['phpgw']->common->error_list($nopref));
-                       }
-                       else
-                       {
-                               $prefs = $this->boprojects->get_prefs();
-                       }
- 
-                       
$GLOBALS['phpgw']->template->set_var('done_url',$GLOBALS['phpgw']->link('/index.php',$link_data));
- 
-                       $link_data['menuaction'] = 
'projects.uiprojects.add_project';
-                       
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
-                       
$GLOBALS['phpgw']->template->set_var('addressbook_link',$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojects.abook'));
- 
-                       $GLOBALS['phpgw']->template->set_var('choose','<input 
type="checkbox" name="values[choose]" value="True">');
- 
-                       
$GLOBALS['phpgw']->template->set_var('currency',$prefs['currency']);
-                       
$GLOBALS['phpgw']->template->set_var('number',$values['number']);
-                       
$GLOBALS['phpgw']->template->set_var('title',$values['title']);
-                       
$GLOBALS['phpgw']->template->set_var('descr',$values['descr']);
- 
-                       if (!$values['smonth'])
-                       {
-                               $values['smonth'] = date('m',time());
-                       }
- 
-                       if (!$values['sday'])
-                       {
-                               $values['sday'] = date('d',time());
-                       }
- 
-                       if (!$values['syear'])
-                       {
-                               $values['syear'] = date('Y',time());
-                       }
- 
-                       
$GLOBALS['phpgw']->template->set_var('start_date_select',$GLOBALS['phpgw']->common->dateformatorder($this->sbox->getYears('values[syear]',$values['syear']),
-                                                                               
                                                                                
$this->sbox->getMonthText('values[smonth]',$values['smonth']),
-                                                                               
                                                                                
$this->sbox->getDays('values[sday]',$values['sday'])));
-                       
$GLOBALS['phpgw']->template->set_var('end_date_select',$GLOBALS['phpgw']->common->dateformatorder($this->sbox->getYears('values[eyear]',$values['eyear']),
-                                                                               
                                                                                
$this->sbox->getMonthText('values[emonth]',$values['emonth']),
-                                                                               
                                                                                
$this->sbox->getDays('values[eday]',$values['eday'])));
- 
- 
-                       
$GLOBALS['phpgw']->template->set_var('status_list',$this->status_format($values['status']));
- 
-                       
$GLOBALS['phpgw']->template->set_var('coordinator_list',$this->coordinator_format($values['coordinator']));
- 
-                       
$GLOBALS['phpgw']->template->set_var('budget',$values['budget']);
- 
-                       $GLOBALS['phpgw']->template->set_var('access', '<input 
type="checkbox" name="values[access]" value="True"'
-                                                                               
. ($values['access'] == 'private'?' checked':'') . '>');
- 
-                       if ($action == 'mains')
-                       {
-                               
$GLOBALS['phpgw']->template->set_var('lang_action',lang('Add project'));
-                               $cat = '<select name="new_cat"><option 
value="">' . lang('None') . '</option>'
-                                               .       
$this->cats->formatted_list('select','all',$cat_id,True) . '</select>';
- 
-                               
$GLOBALS['phpgw']->template->set_var('cat',$cat);
-                               
$GLOBALS['phpgw']->template->set_var('lang_parent','');
-                               
$GLOBALS['phpgw']->template->set_var('pro_parent','');
-                               
$GLOBALS['phpgw']->template->set_var('lang_choose',lang('Generate Project ID 
?'));
-                               
$GLOBALS['phpgw']->template->set_var('lang_number',lang('Project ID'));
- 
- // ------------ activites bookable ----------------------
- 
-                               
$GLOBALS['phpgw']->template->set_var('book_activities_list',$this->boprojects->select_activities_list($project_id,
 False));
- 
- // -------------- activities billable ---------------------- 
- 
-                       
$GLOBALS['phpgw']->template->set_var('bill_activities_list',$this->boprojects->select_activities_list($project_id,
 True));
-                       }
-                       else
-                       {
-                               if ($pro_parent && $action == 'subs')
-                               {
-                                       $parent = 
$this->boprojects->read_single_project($pro_parent);
- 
-                                       
$GLOBALS['phpgw']->template->set_var('pro_parent',$GLOBALS['phpgw']->strip_html($parent['number'])
 . ' ' . $GLOBALS['phpgw']->strip_html($parent['title']));
-                                       
$GLOBALS['phpgw']->template->set_var('cat',$this->cats->id2name($parent['cat']));
-                                       $cat_id = $parent['cat'];
-                                       
$GLOBALS['phpgw']->template->set_var('book_activities_list',$this->boprojects->select_pro_activities($project_id
 = '', $pro_parent, False));                            
-                               
$GLOBALS['phpgw']->template->set_var('bill_activities_list',$this->boprojects->select_pro_activities($project_id
 = '', $pro_parent, True));
- 
-                                       $abid = $parent['customer'];
-                               }
- 
-                               
$GLOBALS['phpgw']->template->set_var('lang_parent',lang('Main project:'));
-                               
$GLOBALS['phpgw']->template->set_var('lang_action',lang('Add job'));
-                               
$GLOBALS['phpgw']->template->set_var('lang_choose',lang('Generate Job ID ?'));
-                               
$GLOBALS['phpgw']->template->set_var('lang_number',lang('Job ID'));
-                       }
- 
-                       $customer = 
$this->boprojects->read_single_contact($abid);
-             if ($customer[0]['org_name'] == '') { $name = 
$customer[0]['n_given'] . ' ' . $customer[0]['n_family']; }
-             else { $name = $customer[0]['org_name'] . ' [ ' . 
$customer[0]['n_given'] . ' ' . $customer[0]['n_family'] . ' ]'; }
- 
-                       $GLOBALS['phpgw']->template->set_var('name',$name);
-                       $GLOBALS['phpgw']->template->set_var('abid',$abid);
- 
-                       $GLOBALS['phpgw']->template->set_var('edithandle','');
-                       $GLOBALS['phpgw']->template->set_var('addhandle','');
-                       $GLOBALS['phpgw']->template->pfp('out','projects_add');
-                       $GLOBALS['phpgw']->template->pfp('addhandle','add');
-               }
- 
                function edit_project()
                {
--- 452,455 ----
***************
*** 624,631 ****
                        $pro_parent             = 
get_var('pro_parent',array('POST','GET'));
  
-                       $submit                         = 
get_var('submit',array('POST'));
-                       $cat_id                         = 
get_var('cat_id',array('POST','GET'));
- 
-                       $new_cat                        = 
get_var('new_cat',array('POST'));
                        $abid                           = 
get_var('abid',array('POST'));
  
--- 457,460 ----
***************
*** 637,645 ****
                        $values                         = 
get_var('values',array('POST'));
  
-                       if ($new_cat)
-                       {
-                               $cat_id = $new_cat;
-                       }
- 
                        $link_data = array
                        (
--- 466,469 ----
***************
*** 647,658 ****
                                'pro_parent'    => $pro_parent,
                                'action'                => $action,
!                               'project_id'    => $project_id,
!                               'cat_id'                => $cat_id
                        );
  
!                       if ($submit)
                        {
                                $values['project_id']   = $project_id;
!                               $values['cat']                  = $cat_id;
                                $values['customer']             = $abid;
                                $values['parent']               = $pro_parent;
--- 471,483 ----
                                'pro_parent'    => $pro_parent,
                                'action'                => $action,
!                               'project_id'    => $project_id
                        );
  
!                       if ($values['submit'])
                        {
+                               $this->cat_id = 
($values['new_cat']?$values['new_cat']:'');
+ 
                                $values['project_id']   = $project_id;
!                               $values['cat']                  = $this->cat_id;
                                $values['customer']             = $abid;
                                $values['parent']               = $pro_parent;
***************
*** 672,678 ****
                        $this->display_app_header();
  
!                       
$GLOBALS['phpgw']->template->set_file(array('projects_edit' => 'form.tpl'));
!                       
$GLOBALS['phpgw']->template->set_block('projects_edit','add','addhandle');
!                       
$GLOBALS['phpgw']->template->set_block('projects_edit','edit','edithandle');
  
                        $nopref = $this->boprojects->check_prefs();
--- 497,505 ----
                        $this->display_app_header();
  
!                       $form = ($project_id?'edit':'add');
! 
!                       $GLOBALS['phpgw']->template->set_file(array('projects_' 
. $form => 'form.tpl'));
!                       $GLOBALS['phpgw']->template->set_block('projects_' . 
$form,'add','addhandle');
!                       $GLOBALS['phpgw']->template->set_block('projects_' . 
$form,'edit','edithandle');
  
                        $nopref = $this->boprojects->check_prefs();
***************
*** 692,716 ****
                        
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
  
!                       $values = 
$this->boprojects->read_single_project($project_id);
! 
!                       $GLOBALS['phpgw']->template->set_var('lang_choose','');
!                       $GLOBALS['phpgw']->template->set_var('choose','');
! 
!                       
$GLOBALS['phpgw']->template->set_var('currency',$prefs['currency']);
!                       
$GLOBALS['phpgw']->template->set_var('number',$values['number']);
!                       
$GLOBALS['phpgw']->template->set_var('title',$values['title']);
!                       
$GLOBALS['phpgw']->template->set_var('descr',$values['descr']);
! 
!                       if ($values['sdate'] == 0)
                        {
!                               $values['sday'] = 0;
!                               $values['smonth'] = 0;
!                               $values['syear'] = 0;
                        }
                        else
                        {
!                               $values['sday'] = date('d',$values['sdate']);
!                               $values['smonth'] = date('m',$values['sdate']);
!                               $values['syear'] = date('Y',$values['sdate']);
                        }
  
--- 519,560 ----
                        
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
  
!                       if ($project_id)
                        {
!                               $values = 
$this->boprojects->read_single_project($project_id);
!                               
$GLOBALS['phpgw']->template->set_var('lang_choose','');
!                               
$GLOBALS['phpgw']->template->set_var('choose','');
!                               $this->cat_id = $values['cat'];
! 
!                               if ($values['sdate'] == 0)
!                               {
!                                       $values['sday'] = 0;
!                                       $values['smonth'] = 0;
!                                       $values['syear'] = 0;
!                               }
!                               else
!                               {
!                                       $values['sday'] = 
date('d',$values['sdate']);
!                                       $values['smonth'] = 
date('m',$values['sdate']);
!                                       $values['syear'] = 
date('Y',$values['sdate']);
!                               }
                        }
                        else
                        {
!                               
$GLOBALS['phpgw']->template->set_var('choose','<input type="checkbox" 
name="values[choose]" value="True">');
! 
!                               if (!$values['smonth'])
!                               {
!                                       $values['smonth'] = date('m',time());
!                               }
! 
!                               if (!$values['sday'])
!                               {
!                                       $values['sday'] = date('d',time());
!                               }
! 
!                               if (!$values['syear'])
!                               {
!                                       $values['syear'] = date('Y',time());
!                               }
                        }
  
***************
*** 735,738 ****
--- 579,587 ----
                                                                                
                                                                                
                        $this->sbox->getDays('values[eday]',$values['eday'])));
  
+                       
$GLOBALS['phpgw']->template->set_var('currency',$prefs['currency']);
+                       
$GLOBALS['phpgw']->template->set_var('number',$values['number']);
+                       
$GLOBALS['phpgw']->template->set_var('title',$values['title']);
+                       
$GLOBALS['phpgw']->template->set_var('descr',$values['descr']);
+ 
                        
$GLOBALS['phpgw']->template->set_var('status_list',$this->status_format($values['status']));
  
***************
*** 743,751 ****
                        $GLOBALS['phpgw']->template->set_var('access','<input 
type="checkbox" name="values[access]" value="True"' . ($values['access'] == 
'private'?' checked':'') . '>');
  
!                       if ($action == 'mains')
                        {
!                               
$GLOBALS['phpgw']->template->set_var('lang_action',lang('Edit project'));
                                $cat = '<select name="new_cat"><option 
value="">' . lang('None') . '</option>'
!                                               .       
$this->cats->formatted_list('select','all',$values['cat'],True) . '</select>';
  
                                
$GLOBALS['phpgw']->template->set_var('cat',$cat);
--- 592,601 ----
                        $GLOBALS['phpgw']->template->set_var('access','<input 
type="checkbox" name="values[access]" value="True"' . ($values['access'] == 
'private'?' checked':'') . '>');
  
!                       if ($action == 'mains' || $action == 'amains')
                        {
!                               $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('projects') . ': ' . ($project_id?lang('edit project'):lang('add 
project'));
! 
                                $cat = '<select name="new_cat"><option 
value="">' . lang('None') . '</option>'
!                                               .       
$this->cats->formatted_list('select','all',$this->cat_id,True) . '</select>';
  
                                
$GLOBALS['phpgw']->template->set_var('cat',$cat);
***************
*** 753,756 ****
--- 603,607 ----
                                
$GLOBALS['phpgw']->template->set_var('pro_parent','');
                                
$GLOBALS['phpgw']->template->set_var('lang_number',lang('Project ID'));
+                               
$GLOBALS['phpgw']->template->set_var('lang_choose',($project_id?'':lang('generate
 project id ?')));
  
  // ------------ activites bookable ----------------------
***************
*** 764,774 ****
                        else
                        {
!                               if ($pro_parent && $action == 'subs')
                                {
                                        $parent = 
$this->boprojects->read_single_project($pro_parent);
  
                                        
$GLOBALS['phpgw']->template->set_var('pro_parent',$GLOBALS['phpgw']->strip_html($parent['number'])
 . ' ' . $GLOBALS['phpgw']->strip_html($parent['title']));
                                        
$GLOBALS['phpgw']->template->set_var('cat',$this->cats->id2name($parent['cat']));
!                                       $cat_id = $parent['cat'];
                                        
$GLOBALS['phpgw']->template->set_var('book_activities_list',$this->boprojects->select_pro_activities($project_id,
 $pro_parent, False));                         
                                
$GLOBALS['phpgw']->template->set_var('bill_activities_list',$this->boprojects->select_pro_activities($project_id,
 $pro_parent, True));
--- 615,627 ----
                        else
                        {
!                               if ($pro_parent && ($action == 'subs' || 
$action == 'asubs'))
                                {
+                                       
$GLOBALS['phpgw_info']['flags']['app_header'] = lang('projects') . ': ' . 
($project_id?lang('edit job'):lang('add job'));
+                                       
$GLOBALS['phpgw']->template->set_var('lang_choose',($project_id?'':lang('generate
 job id ?')));
                                        $parent = 
$this->boprojects->read_single_project($pro_parent);
  
                                        
$GLOBALS['phpgw']->template->set_var('pro_parent',$GLOBALS['phpgw']->strip_html($parent['number'])
 . ' ' . $GLOBALS['phpgw']->strip_html($parent['title']));
                                        
$GLOBALS['phpgw']->template->set_var('cat',$this->cats->id2name($parent['cat']));
!                                       $this->cat_id = $parent['cat'];
                                        
$GLOBALS['phpgw']->template->set_var('book_activities_list',$this->boprojects->select_pro_activities($project_id,
 $pro_parent, False));                         
                                
$GLOBALS['phpgw']->template->set_var('bill_activities_list',$this->boprojects->select_pro_activities($project_id,
 $pro_parent, True));
***************
*** 802,809 ****
                        $GLOBALS['phpgw']->template->set_var('edithandle','');
                        $GLOBALS['phpgw']->template->set_var('addhandle','');
-                       $GLOBALS['phpgw']->template->pfp('out','projects_edit');
-                       $GLOBALS['phpgw']->template->pfp('edithandle','edit');
-               }
  
  
                function view_project()
--- 655,662 ----
                        $GLOBALS['phpgw']->template->set_var('edithandle','');
                        $GLOBALS['phpgw']->template->set_var('addhandle','');
  
+                       $GLOBALS['phpgw']->template->pfp('out','projects_' . 
$form);
+                       $GLOBALS['phpgw']->template->pfp($form . 
'handle',$form);
+               }
  
                function view_project()
***************
*** 825,828 ****
--- 678,683 ----
                        $GLOBALS['phpgw']->template->set_file(array('view' => 
'view.tpl'));
  
+                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('projects') . ': ' . ($pro_parent?lang('view job'):lang('view project'));
+ 
                        $nopref = $this->boprojects->check_prefs();
                        if (is_array($nopref))
***************
*** 868,872 ****
                        if ($action == 'mains')
                        {
-                               
$GLOBALS['phpgw']->template->set_var('lang_action',lang('View project'));
                                
$GLOBALS['phpgw']->template->set_var('lang_number',lang('Project ID'));
                                
$GLOBALS['phpgw']->template->set_var('lang_parent','');
--- 723,726 ----
***************
*** 882,886 ****
                                        
$GLOBALS['phpgw']->template->set_var('cat',$this->cats->id2name($parent['cat']));
                                }
-                               
$GLOBALS['phpgw']->template->set_var('lang_action',lang('View job'));
                                
$GLOBALS['phpgw']->template->set_var('lang_number',lang('Job ID'));
                                
$GLOBALS['phpgw']->template->set_var('lang_parent',lang('Main project:'));
--- 736,739 ----
***************
*** 894,898 ****
                        if (! $descr) $descr = '&nbsp;';
                        $GLOBALS['phpgw']->template->set_var('descr',$descr);
!                       
$GLOBALS['phpgw']->template->set_var('status',$values['status']);
                        
$GLOBALS['phpgw']->template->set_var('budget',$values['budget']);
                        
$GLOBALS['phpgw']->template->set_var('currency',$prefs['currency']);
--- 747,751 ----
                        if (! $descr) $descr = '&nbsp;';
                        $GLOBALS['phpgw']->template->set_var('descr',$descr);
!                       
$GLOBALS['phpgw']->template->set_var('status',lang($values['status']));
                        
$GLOBALS['phpgw']->template->set_var('budget',$values['budget']);
                        
$GLOBALS['phpgw']->template->set_var('currency',$prefs['currency']);
***************
*** 1039,1047 ****
                        (
                                'menuaction'    => 
'projects.uiprojects.list_activities',
!                               'action'                => 'act',
!                               'cat_id'                => $this->cat_id
                        );
  
!                       
$GLOBALS['phpgw']->template->set_var('lang_header',lang('Activities list'));
  
                        if (!$this->start)
--- 892,899 ----
                        (
                                'menuaction'    => 
'projects.uiprojects.list_activities',
!                               'action'                => 'act'
                        );
  
!                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('projects') . ': ' . lang('list activities');
  
                        if (!$this->start)
***************
*** 1066,1070 ****
                        
$GLOBALS['phpgw']->template->set_var('categories_list',$this->cats->formatted_list('select','all',$this->cat_id,'True'));
              
$GLOBALS['phpgw']->template->set_var('search_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!             
$GLOBALS['phpgw']->template->set_var('search_list',$this->nextmatchs->search(1));
  
                        switch($prefs['bill'])
--- 918,922 ----
                        
$GLOBALS['phpgw']->template->set_var('categories_list',$this->cats->formatted_list('select','all',$this->cat_id,'True'));
              
$GLOBALS['phpgw']->template->set_var('search_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!             
$GLOBALS['phpgw']->template->set_var('search_list',$this->nextmatchs->search(array('query'
 => $this->query)));
  
                        switch($prefs['bill'])
***************
*** 1126,1130 ****
  // ------------------------- template declaration for Add Form 
---------------------------
  
!                       $link_data['menuaction'] = 
'projects.uiprojects.add_activity';
                        
$GLOBALS['phpgw']->template->set_var('add_url',$GLOBALS['phpgw']->link('/index.php',$link_data));
  
--- 978,983 ----
  // ------------------------- template declaration for Add Form 
---------------------------
  
!                       $link_data['menuaction'] = 
'projects.uiprojects.edit_activity';
!                       unset($link_data['activity_id']);
                        
$GLOBALS['phpgw']->template->set_var('add_url',$GLOBALS['phpgw']->link('/index.php',$link_data));
  
***************
*** 1138,1251 ****
                }
  
-               function add_activity()
-               {
-                       $cat_id         = get_var('cat_id',array('POST','GET'));
-                       $submit         = get_var('submit',array('POST'));
-                       $new_cat        = get_var('new_cat',array('POST'));
-                       $values         = get_var('values',array('POST'));
- 
-                       if ($new_cat)
-                       {
-                               $cat_id = $new_cat;
-                       }
- 
-                       $link_data = array
-                       (
-                               'menuaction'    => 
'projects.uiprojects.list_activities',
-                               'action'                => 'act',
-                               'cat_id'                => $cat_id
-                       );
- 
-                       if ($submit)
-                       {
-                               $values['cat']  = $cat_id;
-                               $error = 
$this->boprojects->check_pa_values($values);
-                               if (is_array($error))
-                               {
-                                       
$GLOBALS['phpgw']->template->set_var('message',$GLOBALS['phpgw']->common->error_list($error));
-                               }
-                               else
-                               {
-                                       
$this->boprojects->save_activity($values);
-                                       Header('Location: ' . 
$GLOBALS['phpgw']->link('/index.php',$link_data));
-                               }
-                       }
- 
-                       $this->display_app_header();
- 
-                       
$GLOBALS['phpgw']->template->set_file(array('activity_add' => 
'formactivity.tpl'));
-                       
$GLOBALS['phpgw']->template->set_block('activity_add','add','addhandle');
-                       
$GLOBALS['phpgw']->template->set_block('activity_add','edit','edithandle');
- 
-                       
$GLOBALS['phpgw']->template->set_var('done_url',$GLOBALS['phpgw']->link('/index.php',$link_data));
-                       
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojects.add_activity'));
-                       
$GLOBALS['phpgw']->template->set_var('lang_action',lang('Add activity'));
-                       
$GLOBALS['phpgw']->template->set_var('cats_list',$this->cats->formatted_list('select','all',$cat_id,True));
- 
-                       $nopref = $this->boprojects->check_prefs();
-                       if (is_array($nopref))
-                       {
-                               
$GLOBALS['phpgw']->template->set_var('pref_message',$GLOBALS['phpgw']->common->error_list($nopref));
-                       }
-                       else
-                       {
-                               $prefs = $this->boprojects->get_prefs();
-                       }
- 
-                       
$GLOBALS['phpgw']->template->set_var('lang_choose',lang('Generate Activity ID 
?'));
-                       $GLOBALS['phpgw']->template->set_var('choose','<input 
type="checkbox" name="values[choose]" value="True">');
- 
-                       
$GLOBALS['phpgw']->template->set_var('number',$values['number']);
-                       
$GLOBALS['phpgw']->template->set_var('title',$values['title']);
-                       
$GLOBALS['phpgw']->template->set_var('descr',$values['descr']);
- 
-                       
$GLOBALS['phpgw']->template->set_var('lang_num',lang('Activity ID'));
-                       
$GLOBALS['phpgw']->template->set_var('num',$values['number']);
-                       
$GLOBALS['phpgw']->template->set_var('descr',$values['descr']);
-                       
$GLOBALS['phpgw']->template->set_var('currency',$prefs['currency']);
-               $GLOBALS['phpgw']->template->set_var('billperae',$billperae);
- 
-                       if ($prefs['bill'] == 'wu')
-                       {
-                       
$GLOBALS['phpgw']->template->set_var('lang_billperae',lang('Bill per 
workunit'));
-                               
$GLOBALS['phpgw']->template->set_var('lang_minperae',lang('Minutes per 
workunit'));
-                               
$GLOBALS['phpgw']->template->set_var('minperae','<input type="text" 
name="values[minperae]" value="' . $values['minperae'] . '">');
-                       }
-                       else
-                       {
-                       
$GLOBALS['phpgw']->template->set_var('lang_billperae',lang('Bill per hour'));
-                       }
- 
-                       
$GLOBALS['phpgw']->template->set_var('billperae',$values['billperae']);
- 
-                       if ($values['remarkreq'] == 'N'):
-                               $stat_sel[0]=' selected';
-                       elseif ($values['remarkreq'] == 'Y'):
-                               $stat_sel[1]=' selected';
-                       endif;
- 
-                       $remarkreq_list = '<option value="N"' . $stat_sel[0] . 
'>' . lang('No') . '</option>' . "\n"
-                                                       . '<option value="Y"' . 
$stat_sel[1] . '>' . lang('Yes') . '</option>' . "\n";
- 
-                       
$GLOBALS['phpgw']->template->set_var('remarkreq_list',$remarkreq_list);
- 
-                       $GLOBALS['phpgw']->template->set_var('edithandle','');
-                       $GLOBALS['phpgw']->template->set_var('addhandle','');
-                       $GLOBALS['phpgw']->template->pfp('out','activity_add');
-                       $GLOBALS['phpgw']->template->pfp('addhandle','add');
-               }
- 
- 
                function edit_activity()
                {
-                       $cat_id                 = 
get_var('cat_id',array('POST','GET'));
                        $activity_id    = 
get_var('activity_id',array('POST','GET'));
-                       $submit                 = 
get_var('submit',array('POST'));
-                       $new_cat                = 
get_var('new_cat',array('POST'));
                        $values                 = 
get_var('values',array('POST'));
  
!                       if ($new_cat)
                        {
!                               $cat_id = $new_cat;
                        }
  
--- 991,1002 ----
                }
  
                function edit_activity()
                {
                        $activity_id    = 
get_var('activity_id',array('POST','GET'));
                        $values                 = 
get_var('values',array('POST'));
  
!                       if ($values['new_cat'])
                        {
!                               $this->cat_id = $values['new_cat'];
                        }
  
***************
*** 1253,1264 ****
                        (
                                'menuaction'    => 
'projects.uiprojects.list_activities',
!                               'action'                => 'act',
!                               'cat_id'                => $cat_id
                        );
  
!                       if ($submit)
                        {
!                               $values['cat'] = $cat_id;
!                               $values['activity_id'] = $activity_id;
  
                                $error = 
$this->boprojects->check_pa_values($values);
--- 1004,1015 ----
                        (
                                'menuaction'    => 
'projects.uiprojects.list_activities',
!                               'action'                => 'act'
                        );
  
!                       if ($values['submit'])
                        {
!                               $this->cat_id                   = 
($values['new_cat']?$values['new_cat']:'');
!                               $values['cat']                  = $this->cat_id;
!                               $values['activity_id']  = $activity_id;
  
                                $error = 
$this->boprojects->check_pa_values($values);
***************
*** 1276,1286 ****
                        $this->display_app_header();
  
!                       
$GLOBALS['phpgw']->template->set_file(array('activity_edit' => 
'formactivity.tpl'));
!                       
$GLOBALS['phpgw']->template->set_block('activity_edit','add','addhandle');
!                       
$GLOBALS['phpgw']->template->set_block('activity_edit','edit','edithandle');
  
                        
$GLOBALS['phpgw']->template->set_var('done_url',$GLOBALS['phpgw']->link('/index.php',$link_data));
                        
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojects.edit_activity&activity_id='
 . $activity_id));
-                       
$GLOBALS['phpgw']->template->set_var('lang_action',lang('Edit activity'));
  
                        $nopref = $this->boprojects->check_prefs();
--- 1027,1039 ----
                        $this->display_app_header();
  
!                       $form = ($activity_id?'edit':'add');
! 
!                       $GLOBALS['phpgw']->template->set_file(array('activity_' 
. $form => 'formactivity.tpl'));
!                       $GLOBALS['phpgw']->template->set_block('activity_' . 
$form,'add','addhandle');
!                       $GLOBALS['phpgw']->template->set_block('activity_' . 
$form,'edit','edithandle');
  
+                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('projects') . ': ' . ($activity_id?lang('edit activity'):lang('add 
activity'));
                        
$GLOBALS['phpgw']->template->set_var('done_url',$GLOBALS['phpgw']->link('/index.php',$link_data));
                        
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojects.edit_activity&activity_id='
 . $activity_id));
  
                        $nopref = $this->boprojects->check_prefs();
***************
*** 1294,1304 ****
                        }
  
-                       $GLOBALS['phpgw']->template->set_var('lang_choose','');
-                       $GLOBALS['phpgw']->template->set_var('choose','');
                        
$GLOBALS['phpgw']->template->set_var('currency',$prefs['currency']);
  
!                       $values = 
$this->boprojects->read_single_activity($activity_id);
  
!                       
$GLOBALS['phpgw']->template->set_var('cats_list',$this->cats->formatted_list('select','all',$values['cat'],True));
                        
$GLOBALS['phpgw']->template->set_var('num',$GLOBALS['phpgw']->strip_html($values['number']));
                        $descr  = 
$GLOBALS['phpgw']->strip_html($values['descr']);
--- 1047,1066 ----
                        }
  
                        
$GLOBALS['phpgw']->template->set_var('currency',$prefs['currency']);
  
!                       if ($activity_id)
!                       {
!                               $values = 
$this->boprojects->read_single_activity($activity_id);
!                               $this->cat_id = $values['cat'];
!                               
$GLOBALS['phpgw']->template->set_var('lang_choose','');
!                               
$GLOBALS['phpgw']->template->set_var('choose','');
!                       }
!                       else
!                       {
!                               
$GLOBALS['phpgw']->template->set_var('lang_choose',lang('Generate Activity ID 
?'));
!                               
$GLOBALS['phpgw']->template->set_var('choose','<input type="checkbox" 
name="values[choose]" value="True">');
!                       }
  
!                       
$GLOBALS['phpgw']->template->set_var('cats_list',$this->cats->formatted_list('select','all',$this->cat_id,True));
                        
$GLOBALS['phpgw']->template->set_var('num',$GLOBALS['phpgw']->strip_html($values['number']));
                        $descr  = 
$GLOBALS['phpgw']->strip_html($values['descr']);
***************
*** 1337,1342 ****
                        $GLOBALS['phpgw']->template->set_var('edithandle','');
                        $GLOBALS['phpgw']->template->set_var('addhandle','');
!                       $GLOBALS['phpgw']->template->pfp('out','activity_edit');
!                       $GLOBALS['phpgw']->template->pfp('edithandle','edit');
                }
  
--- 1099,1105 ----
                        $GLOBALS['phpgw']->template->set_var('edithandle','');
                        $GLOBALS['phpgw']->template->set_var('addhandle','');
! 
!                       $GLOBALS['phpgw']->template->pfp('out','activity_' . 
$form);
!                       $GLOBALS['phpgw']->template->pfp($form . 
'handle',$form);
                }
  
***************
*** 1359,1375 ****
                        
$GLOBALS['phpgw']->template->set_block('admin_list_t','admin_list','list');
  
!                       
$GLOBALS['phpgw']->template->set_var('lang_action',lang('Projects'));
! 
!                       if ($action == 'pad')
!                       {
!                               
$GLOBALS['phpgw']->template->set_var('lang_admin',lang('administration'));
!                       }
!                       else
!                       {
!                               
$GLOBALS['phpgw']->template->set_var('lang_admin',lang('accountancy'));
!                       }
  
                        
$GLOBALS['phpgw']->template->set_var('search_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('search_list',$this->nextmatchs->search(1));
                        
$GLOBALS['phpgw']->template->set_var('doneurl',$GLOBALS['phpgw']->link('/admin/index.php'));
  
--- 1122,1129 ----
                        
$GLOBALS['phpgw']->template->set_block('admin_list_t','admin_list','list');
  
!                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('projects') . ': ' . (($action == 
'pad')?lang('administration'):lang('accountancy'));
  
                        
$GLOBALS['phpgw']->template->set_var('search_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('search_list',$this->nextmatchs->search(array('query'
 => $this->query)));
                        
$GLOBALS['phpgw']->template->set_var('doneurl',$GLOBALS['phpgw']->link('/admin/index.php'));
  
***************
*** 1458,1469 ****
                        $GLOBALS['phpgw']->template->set_file(array('admin_add' 
=> 'form_admin.tpl'));
  
!                       if ($action == 'pad')
!                       {
!                               
$GLOBALS['phpgw']->template->set_var('lang_action',lang('Edit project 
administrator list'));
!                       }
!                       else
!                       {
!                               
$GLOBALS['phpgw']->template->set_var('lang_action',lang('Edit project 
bookkeeper list'));
!                       }
  
                        
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
--- 1212,1216 ----
                        $GLOBALS['phpgw']->template->set_file(array('admin_add' 
=> 'form_admin.tpl'));
  
!                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('projects') . ': ' . (($action == 'pad')?lang('edit administrator 
list'):lang('edit bookkeeper list'));
  
                        
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
***************
*** 1486,1489 ****
--- 1233,1237 ----
                        $filter         = get_var('filter',array('POST'));
                        $qfilter        = get_var('qfilter',array('POST'));
+                       $query          = get_var('query',array('POST'));
  
                        
$GLOBALS['phpgw']->template->set_file(array('abook_list_t' => 
'addressbook.tpl'));
***************
*** 1506,1510 ****
                                'order'                 => $order,
                                'cat_id'                => $cat_id,
!                               'filter'                => $filter
                        );
  
--- 1254,1259 ----
                                'order'                 => $order,
                                'cat_id'                => $cat_id,
!                               'filter'                => $filter,
!                               'query'                 => $query
                        );
  
***************
*** 1543,1549 ****
                        
$GLOBALS['phpgw']->template->set_var('cats_list',$this->cats->formatted_list('select','all',$cat_id,True));
                        
$GLOBALS['phpgw']->template->set_var('filter_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('filter_list',$this->nextmatchs->filter(1,1));
                        
$GLOBALS['phpgw']->template->set_var('search_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('search_list',$this->nextmatchs->search(1));
  
  // ---------------- list header variable template-declarations 
--------------------------
--- 1292,1298 ----
                        
$GLOBALS['phpgw']->template->set_var('cats_list',$this->cats->formatted_list('select','all',$cat_id,True));
                        
$GLOBALS['phpgw']->template->set_var('filter_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('filter_list',$this->nextmatchs->new_filter($filter));
                        
$GLOBALS['phpgw']->template->set_var('search_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('search_list',$this->nextmatchs->search(array('query'
 => $query)));
  
  // ---------------- list header variable template-declarations 
--------------------------
***************
*** 1615,1619 ****
                                $this->set_app_langs();
  
!                               
$GLOBALS['phpgw']->template->set_var('lang_action',lang('Preferences for 
accountancy'));
  
                                if ($obill == True)
--- 1364,1368 ----
                                $this->set_app_langs();
  
!                               $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('projects') . ': ' . lang('preferences for accountancy');
  
                                if ($obill == True)
***************
*** 1786,1789 ****
--- 1535,1539 ----
  // ------------------------------ end nextmatch template 
------------------------------------
  
+                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('projects') . ': ' . (($action == 'amains')?lang('project 
archive'):lang('job archive'));
                        if ($action == 'amains')
                        {
***************
*** 1791,1796 ****
                                                        . '<select 
name="cat_id" onChange="this.form.submit();"><option value="">' . lang('None') 
. '</option>' . "\n"
                                                        . 
$this->cats->formatted_list('select','all',$this->cat_id,True) . '</select>';
!                               
$GLOBALS['phpgw']->template->set_var(lang_header,lang('Project archive'));
!                               
$GLOBALS['phpgw']->template->set_var(lang_action,lang('Jobs'));
                        }
                        else
--- 1541,1545 ----
                                                        . '<select 
name="cat_id" onChange="this.form.submit();"><option value="">' . lang('None') 
. '</option>' . "\n"
                                                        . 
$this->cats->formatted_list('select','all',$this->cat_id,True) . '</select>';
!                               
$GLOBALS['phpgw']->template->set_var('lang_action',lang('Jobs'));
                        }
                        else
***************
*** 1799,1803 ****
                                                        . '<select 
name="pro_parent" onChange="this.form.submit();"><option value="">' . 
lang('Select main project') . '</option>' . "\n"
                                                        . 
$this->boprojects->select_project_list('mains', 'archive', $pro_parent) . 
'</select>';
-                               
$GLOBALS['phpgw']->template->set_var('lang_header',lang('Job archive'));
                                
$GLOBALS['phpgw']->template->set_var('lang_action',lang('Work hours'));
                        }
--- 1548,1551 ----
***************
*** 1805,1811 ****
                        
$GLOBALS['phpgw']->template->set_var('action_list',$action_list);
                        
$GLOBALS['phpgw']->template->set_var('filter_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('filter_list',$this->nextmatchs->filter(1,1));
                        
$GLOBALS['phpgw']->template->set_var('search_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('search_list',$this->nextmatchs->search(1));
  
  // ---------------- list header variable template-declarations 
--------------------------
--- 1553,1559 ----
                        
$GLOBALS['phpgw']->template->set_var('action_list',$action_list);
                        
$GLOBALS['phpgw']->template->set_var('filter_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('filter_list',$this->nextmatchs->new_filter($this->filter));
                        
$GLOBALS['phpgw']->template->set_var('search_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('search_list',$this->nextmatchs->search(array('query'
 => $this->query)));
  
  // ---------------- list header variable template-declarations 
--------------------------

Index: class.uistatistics.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.uistatistics.inc.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** class.uistatistics.inc.php  25 Apr 2003 00:37:16 -0000      1.16
--- class.uistatistics.inc.php  26 Apr 2003 01:22:39 -0000      1.17
***************
*** 216,227 ****
                        }
  
-                       $GLOBALS['filter']      = $this->filter;
-                       $GLOBALS['query']       = $this->query;
- 
                        
$GLOBALS['phpgw']->template->set_var('action_list',$action_list);
                        
$GLOBALS['phpgw']->template->set_var('filter_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('filter_list',$this->nextmatchs->filter(1,1));
                        
$GLOBALS['phpgw']->template->set_var('search_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('search_list',$this->nextmatchs->search(1));
  
  // ---------------- list header variable template-declarations 
--------------------------
--- 216,224 ----
                        }
  
                        
$GLOBALS['phpgw']->template->set_var('action_list',$action_list);
                        
$GLOBALS['phpgw']->template->set_var('filter_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('filter_list',$this->nextmatchs->new_filter($this->filter));
                        
$GLOBALS['phpgw']->template->set_var('search_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('search_list',$this->nextmatchs->search(array('query'
 => $this->query)));
  
  // ---------------- list header variable template-declarations 
--------------------------





reply via email to

[Prev in Thread] Current Thread [Next in Thread]