phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] projects incclass.boprojecthours.inc.php inccla... [o


From: Bettina Gille
Subject: [Phpgroupware-cvs] projects incclass.boprojecthours.inc.php inccla... [old_0_9_17_HEAD]
Date: Wed, 21 Jun 2006 13:58:20 +0000

CVSROOT:        /sources/phpgroupware
Module name:    projects
Branch:         old_0_9_17_HEAD
Changes by:     Bettina Gille <ceb>     06/06/21 13:58:20

Modified files:
        inc            : class.boprojecthours.inc.php 
                         class.boprojects.inc.php class.soconfig.inc.php 
                         class.soprojects.inc.php class.uiconfig.inc.php 
                         class.uiprojecthours.inc.php 
                         class.uiprojects.inc.php 
        templates/default: form.tpl 

Log message:
        update

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/projects/inc/class.boprojecthours.inc.php?cvsroot=phpgroupware&only_with_tag=old_0_9_17_HEAD&r1=1.34&r2=1.34.2.1
http://cvs.savannah.gnu.org/viewcvs/projects/inc/class.boprojects.inc.php?cvsroot=phpgroupware&only_with_tag=old_0_9_17_HEAD&r1=1.150.2.1&r2=1.150.2.2
http://cvs.savannah.gnu.org/viewcvs/projects/inc/class.soconfig.inc.php?cvsroot=phpgroupware&only_with_tag=old_0_9_17_HEAD&r1=1.17&r2=1.17.2.1
http://cvs.savannah.gnu.org/viewcvs/projects/inc/class.soprojects.inc.php?cvsroot=phpgroupware&only_with_tag=old_0_9_17_HEAD&r1=1.106.2.1&r2=1.106.2.2
http://cvs.savannah.gnu.org/viewcvs/projects/inc/class.uiconfig.inc.php?cvsroot=phpgroupware&only_with_tag=old_0_9_17_HEAD&r1=1.29&r2=1.29.2.1
http://cvs.savannah.gnu.org/viewcvs/projects/inc/class.uiprojecthours.inc.php?cvsroot=phpgroupware&only_with_tag=old_0_9_17_HEAD&r1=1.81.2.1&r2=1.81.2.2
http://cvs.savannah.gnu.org/viewcvs/projects/inc/class.uiprojects.inc.php?cvsroot=phpgroupware&only_with_tag=old_0_9_17_HEAD&r1=1.152.2.2&r2=1.152.2.3
http://cvs.savannah.gnu.org/viewcvs/projects/templates/default/form.tpl?cvsroot=phpgroupware&only_with_tag=old_0_9_17_HEAD&r1=1.66&r2=1.66.2.1

Patches:
Index: inc/class.boprojecthours.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.boprojecthours.inc.php,v
retrieving revision 1.34
retrieving revision 1.34.2.1
diff -u -b -r1.34 -r1.34.2.1
--- inc/class.boprojecthours.inc.php    27 Jun 2004 20:06:28 -0000      1.34
+++ inc/class.boprojecthours.inc.php    21 Jun 2006 13:58:20 -0000      1.34.2.1
@@ -23,7 +23,7 @@
        * along with this program; if not, write to the Free Software       *
        * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.         *
        \*******************************************************************/
-       /* $Id: class.boprojecthours.inc.php,v 1.34 2004/06/27 20:06:28 ceb Exp 
$ */
+       /* $Id: class.boprojecthours.inc.php,v 1.34.2.1 2006/06/21 13:58:20 ceb 
Exp $ */
        // $Source: 
/sources/phpgroupware/projects/inc/class.boprojecthours.inc.php,v $
 
        class boprojecthours
@@ -50,6 +50,7 @@
                        $action = get_var('action',array('GET'));
 
                        $this->boprojects       = 
CreateObject('projects.boprojects',True,$action);
+                       $this->boconfig         = 
CreateObject('projects.boconfig');
                        $this->sohours          = $this->boprojects->sohours;
                        $this->account          = $this->boprojects->account;
                        $this->grants           = $this->boprojects->grants;
@@ -309,7 +310,7 @@
 
                        if($this->siteconfig['accounting'] == 'activity')
                        {
-                               $activity = 
$this->boprojects->read_single_activity($values['activity_id']);
+                               $activity = 
$this->boconfig->read_single_activity($values['activity_id']);
 
                                if (! is_array($activity))              
                                {

Index: inc/class.boprojects.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.boprojects.inc.php,v
retrieving revision 1.150.2.1
retrieving revision 1.150.2.2
diff -u -b -r1.150.2.1 -r1.150.2.2
--- inc/class.boprojects.inc.php        17 May 2005 13:23:58 -0000      
1.150.2.1
+++ inc/class.boprojects.inc.php        21 Jun 2006 13:58:20 -0000      
1.150.2.2
@@ -23,7 +23,7 @@
        * along with this program; if not, write to the Free Software       *
        * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.         *
        \*******************************************************************/
-       /* $Id: class.boprojects.inc.php,v 1.150.2.1 2005/05/17 13:23:58 ceb 
Exp $ */
+       /* $Id: class.boprojects.inc.php,v 1.150.2.2 2006/06/21 13:58:20 ceb 
Exp $ */
        // $Source: 
/sources/phpgroupware/projects/inc/class.boprojects.inc.php,v $
 
        class boprojects
@@ -1601,7 +1601,12 @@
 
                function select_project_list($values)
                {
-                       return $this->soprojects->select_project_list($values);
+                       //_debug_array($values);
+                       $pro = $this->soprojects->select_project_list($values);
+                       //_debug_array($pro);
+                       //exit;
+                       return $pro;
+
                }
 
                function delete_project($pa_id, $subs, $action = 'pro')

Index: inc/class.soconfig.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.soconfig.inc.php,v
retrieving revision 1.17
retrieving revision 1.17.2.1
diff -u -b -r1.17 -r1.17.2.1
--- inc/class.soconfig.inc.php  19 Jun 2004 22:47:31 -0000      1.17
+++ inc/class.soconfig.inc.php  21 Jun 2006 13:58:20 -0000      1.17.2.1
@@ -23,7 +23,7 @@
        * along with this program; if not, write to the Free Software       *
        * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.         *
        \*******************************************************************/
-       /* $Id: class.soconfig.inc.php,v 1.17 2004/06/19 22:47:31 ceb Exp $ */
+       /* $Id: class.soconfig.inc.php,v 1.17.2.1 2006/06/21 13:58:20 ceb Exp $ 
*/
        // $Source: /sources/phpgroupware/projects/inc/class.soconfig.inc.php,v 
$
 
        class soconfig
@@ -200,6 +200,8 @@
                                }
                                $hours_act .= '</option>' . "\n";
                        }
+
+                       //echo 'hours_act: ' . _debug_array($hours_act);
                        return $hours_act;
                }
 

Index: inc/class.soprojects.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.soprojects.inc.php,v
retrieving revision 1.106.2.1
retrieving revision 1.106.2.2
diff -u -b -r1.106.2.1 -r1.106.2.2
--- inc/class.soprojects.inc.php        21 Aug 2005 23:22:15 -0000      
1.106.2.1
+++ inc/class.soprojects.inc.php        21 Jun 2006 13:58:20 -0000      
1.106.2.2
@@ -23,7 +23,7 @@
        * along with this program; if not, write to the Free Software       *
        * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.         *
        \*******************************************************************/
-       /* $Id: class.soprojects.inc.php,v 1.106.2.1 2005/08/21 23:22:15 ceb 
Exp $ */
+       /* $Id: class.soprojects.inc.php,v 1.106.2.2 2006/06/21 13:58:20 ceb 
Exp $ */
        // $Source: 
/sources/phpgroupware/projects/inc/class.soprojects.inc.php,v $
 
        class soprojects
@@ -34,8 +34,7 @@
 
                function soprojects()
                {
-                       $this->db                       = $GLOBALS['phpgw']->db;
-                       $this->db2                      = $this->db;
+                       $this->db2                      = $GLOBALS['phpgw']->db;
                        $this->grants           = 
$GLOBALS['phpgw']->acl->get_grants('projects');
                        $this->account          = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        $this->currency         = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['currency'];
@@ -60,14 +59,14 @@
                function db2projects($column = False)
                {
                        $i = 0;
-                       while ($this->db->next_record())
+                       while ($GLOBALS['phpgw']->db->next_record())
                        {
                                if($column)
                                {
                                        $projects[$i] = array();
                                        
for($k=0;$k<count($this->column_array);$k++)
                                        {
-                                               
$projects[$i][$this->column_array[$k]] = $this->db->f($this->column_array[$k]);
+                                               
$projects[$i][$this->column_array[$k]] = 
$GLOBALS['phpgw']->db->f($this->column_array[$k]);
                                        }
                                        $i++;
                                }
@@ -75,45 +74,45 @@
                                {
                                        $projects[] = array
                                        (
-                                               'project_id'                    
                => $this->db->f('project_id'),
-                                               'parent'                        
                        => $this->db->f('parent'),
-                                               'number'                        
                        => $this->db->f('p_number'),
-                                               'access'                        
                        => $this->db->f('access'),
-                                               'cat'                           
                        => $this->db->f('category'),
-                                               'sdate'                         
                        => $this->db->f('start_date'),
-                                               'edate'                         
                        => $this->db->f('end_date'),
-                                               'coordinator'                   
                => $this->db->f('coordinator'),
-                                               'customer'                      
                        => $this->db->f('customer'),
-                                               'status'                        
                        => $this->db->f('status'),
-                                               'descr'                         
                        => $this->db->f('descr'),
-                                               'title'                         
                        => $this->db->f('title'),
-                                               'budget'                        
                        => $this->db->f('budget'),
-                                               'e_budget'                      
                        => $this->db->f('e_budget'),
-                                               'ptime'                         
                        => $this->db->f('time_planned'),
-                                               'owner'                         
                        => $this->db->f('owner'),
-                                               'cdate'                         
                        => $this->db->f('date_created'),
-                                               'processor'                     
                        => $this->db->f('processor'),
-                                               'udate'                         
                        => $this->db->f('entry_date'),
-                                               'investment_nr'                 
                => $this->db->f('investment_nr'),
-                                               'main'                          
                        => $this->db->f('main'),
-                                               'level'                         
                        => $this->db->f('level'),
-                                               'previous'                      
                        => $this->db->f('previous'),
-                                               'customer_nr'                   
                => $this->db->f('customer_nr'),
-                                               'url'                           
                        => $this->db->f('url'),
-                                               'reference'                     
                        => $this->db->f('reference'),
-                                               'result'                        
                        => $this->db->f('result'),
-                                               'test'                          
                        => $this->db->f('test'),
-                                               'quality'                       
                        => $this->db->f('quality'),
-                                               'accounting'                    
                => $this->db->f('accounting'),
-                                               'project_accounting_factor'     
        => $this->db->f('acc_factor'),
-                                               'project_accounting_factor_d'   
=> $this->db->f('acc_factor_d'),
-                                               'billable'                      
                        => $this->db->f('billable'),
-                                               'psdate'                        
                        => $this->db->f('psdate'),
-                                               'pedate'                        
                        => $this->db->f('pedate'),
-                                               'priority'                      
                        => $this->db->f('priority'),
-                                               'discount'                      
                        => $this->db->f('discount'),
-                                               'discount_type'                 
                => $this->db->f('discount_type'),
-                                               'inv_method'                    
                => $this->db->f('inv_method')
+                                               'project_id'                    
                => $GLOBALS['phpgw']->db->f('project_id'),
+                                               'parent'                        
                        => $GLOBALS['phpgw']->db->f('parent'),
+                                               'number'                        
                        => $GLOBALS['phpgw']->db->f('p_number'),
+                                               'access'                        
                        => $GLOBALS['phpgw']->db->f('access'),
+                                               'cat'                           
                        => $GLOBALS['phpgw']->db->f('category'),
+                                               'sdate'                         
                        => $GLOBALS['phpgw']->db->f('start_date'),
+                                               'edate'                         
                        => $GLOBALS['phpgw']->db->f('end_date'),
+                                               'coordinator'                   
                => $GLOBALS['phpgw']->db->f('coordinator'),
+                                               'customer'                      
                        => $GLOBALS['phpgw']->db->f('customer'),
+                                               'status'                        
                        => $GLOBALS['phpgw']->db->f('status'),
+                                               'descr'                         
                        => $GLOBALS['phpgw']->db->f('descr'),
+                                               'title'                         
                        => $GLOBALS['phpgw']->db->f('title'),
+                                               'budget'                        
                        => $GLOBALS['phpgw']->db->f('budget'),
+                                               'e_budget'                      
                        => $GLOBALS['phpgw']->db->f('e_budget'),
+                                               'ptime'                         
                        => $GLOBALS['phpgw']->db->f('time_planned'),
+                                               'owner'                         
                        => $GLOBALS['phpgw']->db->f('owner'),
+                                               'cdate'                         
                        => $GLOBALS['phpgw']->db->f('date_created'),
+                                               'processor'                     
                        => $GLOBALS['phpgw']->db->f('processor'),
+                                               'udate'                         
                        => $GLOBALS['phpgw']->db->f('entry_date'),
+                                               'investment_nr'                 
                => $GLOBALS['phpgw']->db->f('investment_nr'),
+                                               'main'                          
                        => $GLOBALS['phpgw']->db->f('main'),
+                                               'level'                         
                        => $GLOBALS['phpgw']->db->f('level'),
+                                               'previous'                      
                        => $GLOBALS['phpgw']->db->f('previous'),
+                                               'customer_nr'                   
                => $GLOBALS['phpgw']->db->f('customer_nr'),
+                                               'url'                           
                        => $GLOBALS['phpgw']->db->f('url'),
+                                               'reference'                     
                        => $GLOBALS['phpgw']->db->f('reference'),
+                                               'result'                        
                        => $GLOBALS['phpgw']->db->f('result'),
+                                               'test'                          
                        => $GLOBALS['phpgw']->db->f('test'),
+                                               'quality'                       
                        => $GLOBALS['phpgw']->db->f('quality'),
+                                               'accounting'                    
                => $GLOBALS['phpgw']->db->f('accounting'),
+                                               'project_accounting_factor'     
        => $GLOBALS['phpgw']->db->f('acc_factor'),
+                                               'project_accounting_factor_d'   
=> $GLOBALS['phpgw']->db->f('acc_factor_d'),
+                                               'billable'                      
                        => $GLOBALS['phpgw']->db->f('billable'),
+                                               'psdate'                        
                        => $GLOBALS['phpgw']->db->f('psdate'),
+                                               'pedate'                        
                        => $GLOBALS['phpgw']->db->f('pedate'),
+                                               'priority'                      
                        => $GLOBALS['phpgw']->db->f('priority'),
+                                               'discount'                      
                        => $GLOBALS['phpgw']->db->f('discount'),
+                                               'discount_type'                 
                => $GLOBALS['phpgw']->db->f('discount_type'),
+                                               'inv_method'                    
                => $GLOBALS['phpgw']->db->f('inv_method')
                                        );
                                }
                        }
@@ -136,7 +135,7 @@
                        $project_id     = intval($values['project_id']);
                        $column         = 
(isset($values['column'])?$values['column']:False);
 
-                       $query  = $this->db->db_addslashes($values['query']);
+                       $query  = 
$GLOBALS['phpgw']->db->db_addslashes($values['query']);
 
                        if ($status)
                        {
@@ -221,12 +220,14 @@
 
                                $total = $this->db2->num_rows();
 
-                               $this->db->limit_query($sql . $parent_select . 
$ordermethod,$start,__LINE__,__FILE__);
+                               $GLOBALS['phpgw']->db->limit_query($sql . 
$parent_select . $ordermethod,$start,__LINE__,__FILE__);
                        }
                        else
                        {
-                               $this->db->query($sql . $parent_select . 
$ordermethod,__LINE__,__FILE__);
-                               $total = $this->db->num_rows();
+                               //echo 'query main: ' . $sql . $parent_select;
+
+                               $GLOBALS['phpgw']->db->query($sql . 
$parent_select . $ordermethod,__LINE__,__FILE__);
+                               $total = $GLOBALS['phpgw']->db->num_rows();
                        }
 
                        $pro = $this->db2projects($column);
@@ -238,8 +239,8 @@
                                {
                                        $sub_select = ' AND parent=' . 
$pro[$i]['project_id'] . ' AND level=' . ($pro[$i]['level']+1);
 
-                                       $this->db->query($sql . $sub_select . 
$ordermethod,__LINE__,__FILE__);
-                                       $total += $this->db->num_rows();
+                                       $GLOBALS['phpgw']->db->query($sql . 
$sub_select . $ordermethod,__LINE__,__FILE__);
+                                       $total += 
$GLOBALS['phpgw']->db->num_rows();
                                        $subpro = $this->db2projects($column);
 
                                        $num_subpro = count($subpro);
@@ -300,7 +301,7 @@
 
                        $sql = 'SELECT * from phpgw_p_projects WHERE ';
 
-                       $this->db->query($sql . $main_select . 
$ordermethod,__LINE__,__FILE__);
+                       $GLOBALS['phpgw']->db->query($sql . $main_select . 
$ordermethod,__LINE__,__FILE__);
 
                        $pro = $this->db2projects();
 
@@ -312,7 +313,7 @@
                                        
if(in_array($pro[$i]['project_id'],$parent_array))
                                        {
                                                $sub_select = 'parent=' . 
$pro[$i]['project_id'] . ' AND level=' . ($pro[$i]['level']+1);
-                                               $this->db->query($sql . 
$sub_select . $ordermethod,__LINE__,__FILE__);
+                                               
$GLOBALS['phpgw']->db->query($sql . $sub_select . 
$ordermethod,__LINE__,__FILE__);
                                                $subpro = $this->db2projects();
        
                                                $num_subpro = count($subpro);
@@ -342,7 +343,7 @@
 
                function read_single_project($project_id)
                {
-                       $this->db->query('SELECT * from phpgw_p_projects WHERE 
project_id=' . intval($project_id),__LINE__,__FILE__);
+                       $GLOBALS['phpgw']->db->query('SELECT * from 
phpgw_p_projects WHERE project_id=' . intval($project_id),__LINE__,__FILE__);
        
                        list($project) = $this->db2projects();
                        return $project;
@@ -362,6 +363,8 @@
                                                        'column'        => 
'project_id,p_number,level,title'
                                                ));
 
+                       //_debug_array($pro);
+
                        if($values['self'])
                        {
                                for ($i=0;$i<count($pro);$i++)
@@ -399,17 +402,17 @@
 
                function add_project($values)
                {                       
-                       $values['descr']                        = 
$this->db->db_addslashes($values['descr']);
-                       $values['title']                        = 
$this->db->db_addslashes($values['title']);
-                       $values['number']                       = 
$this->db->db_addslashes($values['number']);
-                       $values['investment_nr']        = 
$this->db->db_addslashes($values['investment_nr']);
-                       $values['customer_nr']          = 
$this->db->db_addslashes($values['customer_nr']);
-                       $values['result']                       = 
$this->db->db_addslashes($values['result']);
-                       $values['test']                         = 
$this->db->db_addslashes($values['test']);
-                       $values['quality']                      = 
$this->db->db_addslashes($values['quality']);
-                       $values['inv_method']           = 
$this->db->db_addslashes($values['inv_method']);
-                       $values['url']                          = 
$this->db->db_addslashes($values['url']);
-                       $values['reference']            = 
$this->db->db_addslashes($values['reference']);
+                       $values['descr']                        = 
$GLOBALS['phpgw']->db->db_addslashes($values['descr']);
+                       $values['title']                        = 
$GLOBALS['phpgw']->db->db_addslashes($values['title']);
+                       $values['number']                       = 
$GLOBALS['phpgw']->db->db_addslashes($values['number']);
+                       $values['investment_nr']        = 
$GLOBALS['phpgw']->db->db_addslashes($values['investment_nr']);
+                       $values['customer_nr']          = 
$GLOBALS['phpgw']->db->db_addslashes($values['customer_nr']);
+                       $values['result']                       = 
$GLOBALS['phpgw']->db->db_addslashes($values['result']);
+                       $values['test']                         = 
$GLOBALS['phpgw']->db->db_addslashes($values['test']);
+                       $values['quality']                      = 
$GLOBALS['phpgw']->db->db_addslashes($values['quality']);
+                       $values['inv_method']           = 
$GLOBALS['phpgw']->db->db_addslashes($values['inv_method']);
+                       $values['url']                          = 
$GLOBALS['phpgw']->db->db_addslashes($values['url']);
+                       $values['reference']            = 
$GLOBALS['phpgw']->db->db_addslashes($values['reference']);
 
                        $values['budget']                       = 
$values['budget'] + 0.0;
                        $values['e_budget']                     = 
$values['e_budget'] + 0.0;
@@ -424,10 +427,7 @@
                                $values['level']        = 
intval($this->id2item(array('item_id' => $values['parent'],'item' => 
'level'))+1);
                        }
 
-                       $table = 'phpgw_p_projects';
-                       $this->db->lock($table);
-
-                       $this->db->query('INSERT into phpgw_p_projects 
(owner,access,category,entry_date,start_date,end_date,coordinator,customer,status,'
+                       $sql = 'INSERT into phpgw_p_projects 
(owner,access,category,entry_date,start_date,end_date,coordinator,customer,status,'
                                                        . 
'descr,title,budget,p_number,parent,time_planned,date_created,processor,investment_nr,main,level,previous,'
                                                        . 
'customer_nr,url,reference,result,test,quality,accounting,acc_factor,acc_factor_d,billable,inv_method,psdate,pedate,priority,e_budget,
                                                        discount,discount_type) 
VALUES ('
@@ -440,23 +440,26 @@
                                                        . $values['test'] . 
"','" . $values['quality'] . "','" . $values['accounting'] . "'," . 
$values['project_accounting_factor']
                                                        . ',' . 
$values['project_accounting_factor_d'] . ",'". ($values['billable']?'N':'Y') . 
"','" . $values['inv_method'] . "',"
                                                        . 
intval($values['psdate']) . ',' . intval($values['pedate']) . ',' . 
intval($values['priority']) . ',' . $values['e_budget'] . ','
-                                                       . $values['discount'] . 
",'" . $values['discount_type'] . "')",__LINE__,__FILE__);
+                                                       . $values['discount'] . 
",'" . $values['discount_type'] . "')";
+
+                       $GLOBALS['phpgw']->db->query($sql,__LINE__,__FILE__);
+
+                       $p_id = 
$GLOBALS['phpgw']->db->get_last_insert_id('phpgw_p_projects','project_id');
 
-                       $p_id = 
$this->db->get_last_insert_id($table,'project_id');
-                       $this->db->unlock();
+                       //echo 'pid: ' . $p_id;
 
                        if ($p_id && ($p_id != 0))
                        {
                                if ($values['parent'] == 0)
                                {
-                                       $this->db->query('UPDATE 
phpgw_p_projects SET main=' . $p_id . ' WHERE project_id=' . 
$p_id,__LINE__,__FILE__);
+                                       $GLOBALS['phpgw']->db->query('UPDATE 
phpgw_p_projects SET main=' . $p_id . ' WHERE project_id=' . 
$p_id,__LINE__,__FILE__);
                                }
 
                                if (is_array($values['book_activities']))
                                {
                                        
while($activ=each($values['book_activities']))
                                        {
-                                               $this->db->query('insert into 
phpgw_p_projectactivities (project_id,activity_id,billable) values (' . $p_id . 
','
+                                               
$GLOBALS['phpgw']->db->query('insert into phpgw_p_projectactivities 
(project_id,activity_id,billable) values (' . $p_id . ','
                                                                                
. $activ[1] . ",'N')",__LINE__,__FILE__);
                                        }
                                }
@@ -465,7 +468,7 @@
                                {
                                        
while($activ=each($values['bill_activities']))
                                        {
-                                               $this->db->query('insert into 
phpgw_p_projectactivities (project_id,activity_id,billable) values (' . $p_id . 
','
+                                               
$GLOBALS['phpgw']->db->query('insert into phpgw_p_projectactivities 
(project_id,activity_id,billable) values (' . $p_id . ','
                                                                                
. $activ[1] . ",'Y')",__LINE__,__FILE__);
                                        }
                                }
@@ -478,7 +481,7 @@
                {
                        if (!is_array($main))
                        {
-                               $this->db->query('SELECT * from 
phpgw_p_projects WHERE main=' . $main,__LINE__,__FILE__);
+                               $GLOBALS['phpgw']->db->query('SELECT * from 
phpgw_p_projects WHERE main=' . $main,__LINE__,__FILE__);
                                $main = $this->db2projects();
                                //echo "main: "; _debug_array($main);
                        }
@@ -549,7 +552,7 @@
 
                                while($activ=each($values['book_activities']))
                                {
-                                       $this->db->query('insert into 
phpgw_p_projectactivities (project_id, activity_id, billable) values (' . 
$values['project_id']
+                                       $GLOBALS['phpgw']->db->query('insert 
into phpgw_p_projectactivities (project_id, activity_id, billable) values (' . 
$values['project_id']
                                                                        . ',' . 
$activ[1] . ",'N')",__LINE__,__FILE__);
                                }
                        }
@@ -561,22 +564,22 @@
 
                                while($activ=each($values['bill_activities']))
                                {
-                                       $this->db->query('insert into 
phpgw_p_projectactivities (project_id, activity_id, billable) values (' . 
$values['project_id']
+                                       $GLOBALS['phpgw']->db->query('insert 
into phpgw_p_projectactivities (project_id, activity_id, billable) values (' . 
$values['project_id']
                                                                        . ',' . 
$activ[1] . ",'Y')",__LINE__,__FILE__);
                                }
                        }
 
-                       $values['descr']                        = 
$this->db->db_addslashes($values['descr']);
-                       $values['title']                        = 
$this->db->db_addslashes($values['title']);
-                       $values['number']                       = 
$this->db->db_addslashes($values['number']);
-                       $values['investment_nr']        = 
$this->db->db_addslashes($values['investment_nr']);
-                       $values['customer_nr']          = 
$this->db->db_addslashes($values['customer_nr']);
-                       $values['result']                       = 
$this->db->db_addslashes($values['result']);
-                       $values['test']                         = 
$this->db->db_addslashes($values['test']);
-                       $values['quality']                      = 
$this->db->db_addslashes($values['quality']);
-                       $values['url']                          = 
$this->db->db_addslashes($values['url']);
-                       $values['reference']            = 
$this->db->db_addslashes($values['reference']);
-                       $values['inv_method']           = 
$this->db->db_addslashes($values['inv_method']);
+                       $values['descr']                        = 
$GLOBALS['phpgw']->db->db_addslashes($values['descr']);
+                       $values['title']                        = 
$GLOBALS['phpgw']->db->db_addslashes($values['title']);
+                       $values['number']                       = 
$GLOBALS['phpgw']->db->db_addslashes($values['number']);
+                       $values['investment_nr']        = 
$GLOBALS['phpgw']->db->db_addslashes($values['investment_nr']);
+                       $values['customer_nr']          = 
$GLOBALS['phpgw']->db->db_addslashes($values['customer_nr']);
+                       $values['result']                       = 
$GLOBALS['phpgw']->db->db_addslashes($values['result']);
+                       $values['test']                         = 
$GLOBALS['phpgw']->db->db_addslashes($values['test']);
+                       $values['quality']                      = 
$GLOBALS['phpgw']->db->db_addslashes($values['quality']);
+                       $values['url']                          = 
$GLOBALS['phpgw']->db->db_addslashes($values['url']);
+                       $values['reference']            = 
$GLOBALS['phpgw']->db->db_addslashes($values['reference']);
+                       $values['inv_method']           = 
$GLOBALS['phpgw']->db->db_addslashes($values['inv_method']);
                        $values['parent']                       = 
intval($values['parent']);
                        $values['edate']                        = 
intval($values['edate']);
 
@@ -603,7 +606,7 @@
                                }
                        }
 
-                       $this->db->query("UPDATE phpgw_p_projects set access='" 
. (isset($values['access'])?$values['access']:'public') . "', category=" . 
intval($values['cat']) . ", entry_date="
+                       $GLOBALS['phpgw']->db->query("UPDATE phpgw_p_projects 
set access='" . (isset($values['access'])?$values['access']:'public') . "', 
category=" . intval($values['cat']) . ", entry_date="
                                                        . time() . ", 
start_date=" . intval($values['sdate']) . ", end_date=" . $values['edate'] . ", 
coordinator="
                                                        . 
intval($values['coordinator']) . ", customer=" . intval($values['customer']) . 
", status='" . $values['status'] . "', descr='"
                                                        . $values['descr'] . 
"', title='" . $values['title'] . "', budget=" . $values['budget'] . ", 
p_number='"
@@ -619,28 +622,28 @@
 
                        if ($values['status'] == 'archive')
                        {
-                               $this->db->query("Update phpgw_p_projects set 
status='archive' WHERE parent=" . $values['project_id'],__LINE__,__FILE__);
+                               $GLOBALS['phpgw']->db->query("Update 
phpgw_p_projects set status='archive' WHERE parent=" . 
$values['project_id'],__LINE__,__FILE__);
                        }
                        
                        if($values['oldstatus'] && $values['oldstatus'] == 
'archive' && $values['status'] != 'archive')
                        {
-                               $this->db->query("Update phpgw_p_projects set 
status='" . $values['status'] . "' WHERE parent=" . 
$values['project_id'],__LINE__,__FILE__);
+                               $GLOBALS['phpgw']->db->query("Update 
phpgw_p_projects set status='" . $values['status'] . "' WHERE parent=" . 
$values['project_id'],__LINE__,__FILE__);
                        }
 
                        $values['old_edate'] = intval($values['old_edate']);
                        if ($values['old_edate'] > 0 && $values['edate'] > 0 && 
$values['old_edate'] != $values['edate'])
                        {
-                               $this->db->query('SELECT 
project_id,title,p_number,start_date,end_date from phpgw_p_projects where 
previous=' . $values['project_id'],__LINE__,__FILE__);
+                               $GLOBALS['phpgw']->db->query('SELECT 
project_id,title,p_number,start_date,end_date from phpgw_p_projects where 
previous=' . $values['project_id'],__LINE__,__FILE__);
 
-                               while($this->db->next_record())
+                               while($GLOBALS['phpgw']->db->next_record())
                                {
                                        $following[] = array
                                        (
-                                               'project_id'    => 
$this->db->f('project_id'),
-                                               'title'                 => 
$this->db->f('title'),
-                                               'number'                => 
$this->db->f('p_number'),
-                                               'sdate'                 => 
$this->db->f('start_date'),
-                                               'edate'                 => 
$this->db->f('end_date')
+                                               'project_id'    => 
$GLOBALS['phpgw']->db->f('project_id'),
+                                               'title'                 => 
$GLOBALS['phpgw']->db->f('title'),
+                                               'number'                => 
$GLOBALS['phpgw']->db->f('p_number'),
+                                               'sdate'                 => 
$GLOBALS['phpgw']->db->f('start_date'),
+                                               'edate'                 => 
$GLOBALS['phpgw']->db->f('end_date')
                                        );
                                };
 
@@ -670,21 +673,21 @@
                                                        //$npsdate = 
intval($fol['psdate'])>0?($op=='add'?$fol['psdate']+$diff:$fol['psdate']-$diff):0;
                                                        //$npedate = 
intval($fol['pedate'])>0?($op=='add'?$fol['pedate']+$diff:$fol['pedate']-$diff):0;
 
-                                                       
$this->db->query('UPDATE phpgw_p_projects set start_date=' . intval($nsdate) . 
', end_date=' . intval($nedate) . ', entry_date=' . time()
+                                                       
$GLOBALS['phpgw']->db->query('UPDATE phpgw_p_projects set start_date=' . 
intval($nsdate) . ', end_date=' . intval($nedate) . ', entry_date=' . time()
                                                                                
. ', processor=' . $this->account . ' WHERE project_id=' . 
$fol['project_id'],__LINE__,__FILE__);
 
                                                        
$following[$key]['nsdate'] = $nsdate;
                                                        
$following[$key]['nedate'] = $nedate;
                                                }
-                                               $this->db->query('SELECT 
s_id,edate,title from phpgw_p_mstones WHERE project_id=' . 
intval($fol['project_id']),__LINE__,__FILE__);
+                                               
$GLOBALS['phpgw']->db->query('SELECT s_id,edate,title from phpgw_p_mstones 
WHERE project_id=' . intval($fol['project_id']),__LINE__,__FILE__);
 
-                                               while($this->db->next_record())
+                                               
while($GLOBALS['phpgw']->db->next_record())
                                                {
                                                        $stones[] = array
                                                        (
-                                                               's_id'  => 
$this->db->f('s_id'),
-                                                               'edate' => 
$this->db->f('edate'),
-                                                               'title' => 
$this->db->f('title')
+                                                               's_id'  => 
$GLOBALS['phpgw']->db->f('s_id'),
+                                                               'edate' => 
$GLOBALS['phpgw']->db->f('edate'),
+                                                               'title' => 
$GLOBALS['phpgw']->db->f('title')
                                                        );
                                                };
                                                $following[$key]['mstones'] = 
$stones;
@@ -695,7 +698,7 @@
                                                        {
                                                                $snedate = 
$op=='add'?$stone['edate']+$diff:$stone['edate']-$diff;
 
-                                                               
$this->db->query('UPDATE phpgw_p_mstones set edate=' . intval($snedate) . ' 
WHERE s_id=' . intval($stone['s_id']),__LINE__,__FILE__);
+                                                               
$GLOBALS['phpgw']->db->query('UPDATE phpgw_p_mstones set edate=' . 
intval($snedate) . ' WHERE s_id=' . intval($stone['s_id']),__LINE__,__FILE__);
                                                                
$stones[$skey]['snedate'] = $snedate;
                                                        }
                                                }
@@ -712,28 +715,28 @@
                        $account_id     = intval($account_id);
                        if ($action == 'act')
                        {                       
-                               $this->db->query('SELECT a_number,descr from 
phpgw_p_activities where id=' . $pro_id,__LINE__,__FILE__);
-                               if ($this->db->next_record())
+                               $GLOBALS['phpgw']->db->query('SELECT 
a_number,descr from phpgw_p_activities where id=' . $pro_id,__LINE__,__FILE__);
+                               if ($GLOBALS['phpgw']->db->next_record())
                                {
-                                       $bla = 
$GLOBALS['phpgw']->strip_html($this->db->f('descr')) . ' [' . 
$GLOBALS['phpgw']->strip_html($this->db->f('a_number')) . ']';
+                                       $bla = 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('descr')) . ' [' . 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('a_number')) . ']';
                                }
                        }
                        else if($action == 'role')
                        {
-                               $this->db->query('SELECT role_id from 
phpgw_p_projectmembers where project_id=' . $pro_id . ' and account_id=' . 
$account_id
+                               $GLOBALS['phpgw']->db->query('SELECT role_id 
from phpgw_p_projectmembers where project_id=' . $pro_id . ' and account_id=' . 
$account_id
                                                                . " and 
type='role'",__LINE__,__FILE__);
-                               if($this->db->next_record())
+                               if($GLOBALS['phpgw']->db->next_record())
                                {
-                                       $bla = $this->id2item(array('action' => 
'role','item' => 'role_name', 'item_id' => $this->db->f('role_id')));
+                                       $bla = $this->id2item(array('action' => 
'role','item' => 'role_name', 'item_id' => 
$GLOBALS['phpgw']->db->f('role_id')));
 
                                }
                        }
                        else if($action == 'charge')
                        {
-                               $this->db->query('SELECT charge_percent from 
phpgw_p_surcharges where charge_id=' . $pro_id,__LINE__,__FILE__);
-                               if($this->db->next_record())
+                               $GLOBALS['phpgw']->db->query('SELECT 
charge_percent from phpgw_p_surcharges where charge_id=' . 
$pro_id,__LINE__,__FILE__);
+                               if($GLOBALS['phpgw']->db->next_record())
                                {
-                                       $bla = $this->db->f('charge_percent');
+                                       $bla = 
$GLOBALS['phpgw']->db->f('charge_percent');
                                }
                        }
                        else
@@ -758,20 +761,20 @@
                                        case 'billable':        $column = 
'billable'; break;
                                }
 
-                               $this->db->query('SELECT ' . $column . ' from 
phpgw_p_projects where project_id=' . $pro_id,__LINE__,__FILE__);
-                               if ($this->db->next_record())
+                               $GLOBALS['phpgw']->db->query('SELECT ' . 
$column . ' from phpgw_p_projects where project_id=' . 
$pro_id,__LINE__,__FILE__);
+                               if ($GLOBALS['phpgw']->db->next_record())
                                {
                                        switch($action)
                                        {
                                                case 'pro':
-                                                       $bla = 
$GLOBALS['phpgw']->strip_html($this->db->f('title')) . ' ['
-                                                                       . 
$GLOBALS['phpgw']->strip_html($this->db->f('p_number')) . ']';
+                                                       $bla = 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('title')) . ' ['
+                                                                       . 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('p_number')) . ']';
                                                        break;
                                                case 'phours':
-                                                       $bla = 
$this->db->f('time_planned')/60;
+                                                       $bla = 
$GLOBALS['phpgw']->db->f('time_planned')/60;
                                                        break;
                                                default:
-                                                       $bla = 
$GLOBALS['phpgw']->strip_html($this->db->f($column));
+                                                       $bla = 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f($column));
                                        }
                                }
                        }
@@ -797,10 +800,10 @@
                                        $num    = $project_id;
                                        break;
                        }
-                       $this->db->query("select count(*) from $p_table where 
$column='$num'" . $editexists,__LINE__,__FILE__);
-                       $this->db->next_record();
+                       $GLOBALS['phpgw']->db->query("select count(*) from 
$p_table where $column='$num'" . $editexists,__LINE__,__FILE__);
+                       $GLOBALS['phpgw']->db->next_record();
 
-                       if ($this->db->f(0))
+                       if ($GLOBALS['phpgw']->db->f(0))
                        {
                                return True;
                        }
@@ -845,9 +848,9 @@
                {
                        $prefix = 'P-' . $this->year . '-';
 
-                       $this->db->query("select max(p_number) from 
phpgw_p_projects where p_number like ('$prefix%') and parent=0");
-                       $this->db->next_record();
-                       $max = 
$this->add_leading_zero(substr($this->db->f(0),-4));
+                       $GLOBALS['phpgw']->db->query("select max(p_number) from 
phpgw_p_projects where p_number like ('$prefix%') and parent=0");
+                       $GLOBALS['phpgw']->db->next_record();
+                       $max = 
$this->add_leading_zero(substr($GLOBALS['phpgw']->db->f(0),-4));
 
                        return $prefix . $max;
                }
@@ -861,13 +864,13 @@
                                default:        $add = ''; break;
                        }*/
 
-                       $this->db->query('select p_number from phpgw_p_projects 
where project_id=' . $pro_parent);
-                       $this->db->next_record();
-                       $prefix = $this->db->f('p_number') . '/';
-
-                       $this->db->query("select max(p_number) from 
phpgw_p_projects where p_number like ('$prefix%')");
-                       $this->db->next_record();
-                       $max = 
$this->add_leading_zero(substr($this->db->f(0),-4));
+                       $GLOBALS['phpgw']->db->query('select p_number from 
phpgw_p_projects where project_id=' . $pro_parent);
+                       $GLOBALS['phpgw']->db->next_record();
+                       $prefix = $GLOBALS['phpgw']->db->f('p_number') . '/';
+
+                       $GLOBALS['phpgw']->db->query("select max(p_number) from 
phpgw_p_projects where p_number like ('$prefix%')");
+                       $GLOBALS['phpgw']->db->next_record();
+                       $max = 
$this->add_leading_zero(substr($GLOBALS['phpgw']->db->f(0),-4));
 
                        return $prefix . $max;
                }
@@ -876,9 +879,9 @@
                {
                        $prefix = 'A-' . $this->year . '-';
 
-                       $this->db->query("select max(a_number) from 
phpgw_p_activities where a_number like ('$prefix%')");
-                       $this->db->next_record();
-                       $max = 
$this->add_leading_zero(substr($this->db->f(0),-4));
+                       $GLOBALS['phpgw']->db->query("select max(a_number) from 
phpgw_p_activities where a_number like ('$prefix%')");
+                       $GLOBALS['phpgw']->db->next_record();
+                       $max = 
$this->add_leading_zero(substr($GLOBALS['phpgw']->db->f(0),-4));
 
                        return $prefix . $max;
                }
@@ -886,9 +889,9 @@
                function create_deliveryid()
                {
                        $prefix = 'D-' . $this->year . '-';
-                       $this->db->query("select max(d_number) from 
phpgw_p_delivery where d_number like ('$prefix%')");
-                       $this->db->next_record();
-                       $max = 
$this->add_leading_zero(substr($this->db->f(0),-4));
+                       $GLOBALS['phpgw']->db->query("select max(d_number) from 
phpgw_p_delivery where d_number like ('$prefix%')");
+                       $GLOBALS['phpgw']->db->next_record();
+                       $max = 
$this->add_leading_zero(substr($GLOBALS['phpgw']->db->f(0),-4));
 
                        return $prefix . $max;
                }
@@ -896,9 +899,9 @@
                function create_invoiceid()
                {
                        $prefix = 'I-' . $this->year . '-';
-                       $this->db->query("select max(i_number) from 
phpgw_p_invoice where i_number like ('$prefix%')");
-                       $this->db->next_record();
-                       $max = 
$this->add_leading_zero(substr($this->db->f(0),-4));
+                       $GLOBALS['phpgw']->db->query("select max(i_number) from 
phpgw_p_invoice where i_number like ('$prefix%')");
+                       $GLOBALS['phpgw']->db->next_record();
+                       $max = 
$this->add_leading_zero(substr($GLOBALS['phpgw']->db->f(0),-4));
 
                        return $prefix . $max;
                }
@@ -928,21 +931,21 @@
                                }
                        }
 
-                       $this->db->query("DELETE from phpgw_acl where 
acl_appname='projects' and acl_rights=7 and (acl_location=" . $project_id . 
$sub_acl_delete
+                       $GLOBALS['phpgw']->db->query("DELETE from phpgw_acl 
where acl_appname='projects' and acl_rights=7 and (acl_location=" . $project_id 
. $sub_acl_delete
                                                        . 
')',__LINE__,__FILE__);
 
-                       $this->db->query('DELETE from phpgw_p_projects where 
project_id=' . $project_id . $sub_pro_delete,__LINE__,__FILE__);
+                       $GLOBALS['phpgw']->db->query('DELETE from 
phpgw_p_projects where project_id=' . $project_id . 
$sub_pro_delete,__LINE__,__FILE__);
 
-                       $this->db->query('DELETE from phpgw_p_hours where 
project_id=' . $project_id . $sub_pro_delete,__LINE__,__FILE__); 
+                       $GLOBALS['phpgw']->db->query('DELETE from phpgw_p_hours 
where project_id=' . $project_id . $sub_pro_delete,__LINE__,__FILE__); 
 
 
-                       $this->db->query('SELECT id from phpgw_p_delivery where 
project_id=' . $project_id . $sub_pro_delete,__LINE__,__FILE__);
+                       $GLOBALS['phpgw']->db->query('SELECT id from 
phpgw_p_delivery where project_id=' . $project_id . 
$sub_pro_delete,__LINE__,__FILE__);
 
-                       while ($this->db->next_record())
+                       while ($GLOBALS['phpgw']->db->next_record())
                        {
                                $del[] = array
                                (
-                                       'id' => $this->db->f('id')
+                                       'id' => $GLOBALS['phpgw']->db->f('id')
                                );
                        }
 
@@ -950,18 +953,18 @@
                        {
                                for ($i=0;$i<=count($del);$i++)
                                {
-                                       $this->db->query('Delete from 
phpgw_p_deliverypos where delivery_id=' . 
intval($del[$i]['id']),__LINE__,__FILE__);
+                                       $GLOBALS['phpgw']->db->query('Delete 
from phpgw_p_deliverypos where delivery_id=' . 
intval($del[$i]['id']),__LINE__,__FILE__);
                                }
-                               $this->db->query('DELETE from phpgw_p_delivery 
where project_id=' . $project_id . $sub_pro_delete,__LINE__,__FILE__);
+                               $GLOBALS['phpgw']->db->query('DELETE from 
phpgw_p_delivery where project_id=' . $project_id . 
$sub_pro_delete,__LINE__,__FILE__);
                        }
 
-                       $this->db->query('SELECT id from phpgw_p_invoice where 
project_id=' . $project_id . $sub_pro_delete,__LINE__,__FILE__);
+                       $GLOBALS['phpgw']->db->query('SELECT id from 
phpgw_p_invoice where project_id=' . $project_id . 
$sub_pro_delete,__LINE__,__FILE__);
 
-                       while ($this->db->next_record())
+                       while ($GLOBALS['phpgw']->db->next_record())
                        {
                                $inv[] = array
                                (
-                                       'id' => $this->db->f('id')
+                                       'id' => $GLOBALS['phpgw']->db->f('id')
                                );
                        }
 
@@ -969,9 +972,9 @@
                        {
                                for ($i=0;$i<=count($inv);$i++)
                                {
-                                       $this->db->query('Delete from 
phpgw_p_invoicepos where invoice_id=' . 
intval($inv[$i]['id']),__LINE__,__FILE__);
+                                       $GLOBALS['phpgw']->db->query('Delete 
from phpgw_p_invoicepos where invoice_id=' . 
intval($inv[$i]['id']),__LINE__,__FILE__);
                                }
-                               $this->db->query('DELETE from phpgw_p_invoice 
where project_id=' . $project_id . $sub_pro_delete,__LINE__,__FILE__);
+                               $GLOBALS['phpgw']->db->query('DELETE from 
phpgw_p_invoice where project_id=' . $project_id . 
$sub_pro_delete,__LINE__,__FILE__);
                        }
                }
 
@@ -980,13 +983,13 @@
                        $account_id = intval($account_id);
                        if ($account_id > 0)
                        {
-                               $this->db->query('delete from phpgw_categories 
where cat_owner=' . $account_id . " AND 
cat_appname='projects'",__LINE__,__FILE__);
-                               $this->db->query('delete from phpgw_p_hours 
where employee=' . $account_id,__LINE__,__FILE__);
-                               $this->db->query('select project_id from 
phpgw_p_projects where coordinator=' . $account_id,__LINE__,__FILE__);
+                               $GLOBALS['phpgw']->db->query('delete from 
phpgw_categories where cat_owner=' . $account_id . " AND 
cat_appname='projects'",__LINE__,__FILE__);
+                               $GLOBALS['phpgw']->db->query('delete from 
phpgw_p_hours where employee=' . $account_id,__LINE__,__FILE__);
+                               $GLOBALS['phpgw']->db->query('select project_id 
from phpgw_p_projects where coordinator=' . $account_id,__LINE__,__FILE__);
 
-                               while ($this->db->next_record())
+                               while ($GLOBALS['phpgw']->db->next_record())
                                {
-                                       $drop_list[] = 
$this->db->f('project_id');
+                                       $drop_list[] = 
$GLOBALS['phpgw']->db->f('project_id');
                                }
 
                                if (is_array($drop_list))
@@ -997,16 +1000,16 @@
 
                                        $subdelete = ' OR parent in (' . 
implode(',',$drop_list) . ')';
 
-                                       $this->db->query('DELETE from 
phpgw_p_projects where project_id project_in (' . implode(',',$drop_list) . ')'
+                                       $GLOBALS['phpgw']->db->query('DELETE 
from phpgw_p_projects where project_id project_in (' . implode(',',$drop_list) 
. ')'
                                                                        . 
$subdelete,__LINE__,__FILE__);
 
-                                       $this->db->query('select id from 
phpgw_p_delivery where project_id in (' . implode(',',$drop_list) . 
')',__LINE__,__FILE__);
+                                       $GLOBALS['phpgw']->db->query('select id 
from phpgw_p_delivery where project_id in (' . implode(',',$drop_list) . 
')',__LINE__,__FILE__);
 
-                                       while ($this->db->next_record())
+                                       while 
($GLOBALS['phpgw']->db->next_record())
                                        {
                                                $del[] = array
                                                (
-                                                       'id'    => 
$this->db->f('id')
+                                                       'id'    => 
$GLOBALS['phpgw']->db->f('id')
                                                );
                                        }
 
@@ -1014,20 +1017,20 @@
                                        {
                                                for ($i=0;$i<=count($del);$i++)
                                                {
-                                                       
$this->db->query('Delete from phpgw_p_deliverypos where delivery_id=' . 
intval($del[$i]['id']),__LINE__,__FILE__);
+                                                       
$GLOBALS['phpgw']->db->query('Delete from phpgw_p_deliverypos where 
delivery_id=' . intval($del[$i]['id']),__LINE__,__FILE__);
                                                }
 
-                                               $this->db->query('DELETE from 
phpgw_p_delivery where project_id in (' . implode(',',$drop_list) . 
')',__LINE__,__FILE__);
+                                               
$GLOBALS['phpgw']->db->query('DELETE from phpgw_p_delivery where project_id in 
(' . implode(',',$drop_list) . ')',__LINE__,__FILE__);
                                        }
 
 
-                                       $this->db->query('select id from 
phpgw_p_invoice where project_id in (' . implode(',',$drop_list) . 
')',__LINE__,__FILE__);
+                                       $GLOBALS['phpgw']->db->query('select id 
from phpgw_p_invoice where project_id in (' . implode(',',$drop_list) . 
')',__LINE__,__FILE__);
 
-                                       while ($this->db->next_record())
+                                       while 
($GLOBALS['phpgw']->db->next_record())
                                        {
                                                $inv[] = array
                                                (
-                                                       'id'    => 
$this->db->f('id')
+                                                       'id'    => 
$GLOBALS['phpgw']->db->f('id')
                                                );
                                        }
 
@@ -1035,10 +1038,10 @@
                                        {
                                                for ($i=0;$i<=count($inv);$i++)
                                                {
-                                                       
$this->db->query('Delete from phpgw_p_invoicepos where invoice_id=' . 
intval($inv[$i]['id']),__LINE__,__FILE__);
+                                                       
$GLOBALS['phpgw']->db->query('Delete from phpgw_p_invoicepos where invoice_id=' 
. intval($inv[$i]['id']),__LINE__,__FILE__);
                                                }
 
-                                               $this->db->query('DELETE from 
phpgw_p_invoice where project_id in (' . implode(',',$drop_list) . 
')',__LINE__,__FILE__);
+                                               
$GLOBALS['phpgw']->db->query('DELETE from phpgw_p_invoice where project_id in 
(' . implode(',',$drop_list) . ')',__LINE__,__FILE__);
                                        }
                                }
                        }
@@ -1049,12 +1052,12 @@
                        $old = intval($old);
                        $new = intval($new);
 
-                       $this->db->query('UPDATE phpgw_p_projects set 
coordinator=' . $new . ' where coordinator=' . $old,__LINE__,__FILE__);
-                       $this->db->query('UPDATE phpgw_p_hours set employee=' . 
$new . ' where employee=' . $old,__LINE__,__FILE__);
-                       $this->db->query('UPDATE phpgw_p_projectmembers set 
account_id=' . $new . ' where (account_id=' . $old . " AND 
type='aa')",__LINE__,__FILE__);
-                       $this->db->query('UPDATE phpgw_p_invoice set owner=' . 
$new . ' where owner=' . $old,__LINE__,__FILE__);
-                       $this->db->query('UPDATE phpgw_p_delivery set owner=' . 
$new . ' where owner=' . $old,__LINE__,__FILE__);
-                       $this->db->query('UPDATE phpgw_categories set 
cat_owner=' . $new . ' where cat_owner=' . $old . " AND 
cat_appname='projects'",__LINE__,__FILE__);
+                       $GLOBALS['phpgw']->db->query('UPDATE phpgw_p_projects 
set coordinator=' . $new . ' where coordinator=' . $old,__LINE__,__FILE__);
+                       $GLOBALS['phpgw']->db->query('UPDATE phpgw_p_hours set 
employee=' . $new . ' where employee=' . $old,__LINE__,__FILE__);
+                       $GLOBALS['phpgw']->db->query('UPDATE 
phpgw_p_projectmembers set account_id=' . $new . ' where (account_id=' . $old . 
" AND type='aa')",__LINE__,__FILE__);
+                       $GLOBALS['phpgw']->db->query('UPDATE phpgw_p_invoice 
set owner=' . $new . ' where owner=' . $old,__LINE__,__FILE__);
+                       $GLOBALS['phpgw']->db->query('UPDATE phpgw_p_delivery 
set owner=' . $new . ' where owner=' . $old,__LINE__,__FILE__);
+                       $GLOBALS['phpgw']->db->query('UPDATE phpgw_categories 
set cat_owner=' . $new . ' where cat_owner=' . $old . " AND 
cat_appname='projects'",__LINE__,__FILE__);
                }
 
 
@@ -1084,10 +1087,10 @@
                        }
 
                        $sql = 'SELECT SUM(' . $bcolumn . ') as sumvalue from 
phpgw_p_projects where project_id in(' . implode(',',$pro) . ')';
-                       $this->db->query($sql,__LINE__,__FILE__);
-                       if ($this->db->next_record())
+                       $GLOBALS['phpgw']->db->query($sql,__LINE__,__FILE__);
+                       if ($GLOBALS['phpgw']->db->next_record())
                        {
-                               return $this->db->f('sumvalue');
+                               return $GLOBALS['phpgw']->db->f('sumvalue');
                        }
                }
 
@@ -1123,10 +1126,10 @@
                                $editfilter = ' and project_id !=' . 
$project_id;
                        }
 
-                       $this->db->query('SELECT SUM(' . $column . ') as 
sumvalue from phpgw_p_projects where (' . $filter . $editfilter . 
')',__LINE__,__FILE__);
-                       if ($this->db->next_record())
+                       $GLOBALS['phpgw']->db->query('SELECT SUM(' . $column . 
') as sumvalue from phpgw_p_projects where (' . $filter . $editfilter . 
')',__LINE__,__FILE__);
+                       if ($GLOBALS['phpgw']->db->next_record())
                        {
-                               return $this->db->f('sumvalue');
+                               return $GLOBALS['phpgw']->db->f('sumvalue');
                        }
                }
 
@@ -1141,12 +1144,12 @@
                                case 'event':   $table = 'phpgw_p_events'; 
$column = 'event_name'; break;
                        }
 
-                       $this->db->query("SELECT $item_id FROM $table WHERE 
$column='" . $item . "'",__LINE__,__FILE__);
-                       $this->db->next_record();
+                       $GLOBALS['phpgw']->db->query("SELECT $item_id FROM 
$table WHERE $column='" . $item . "'",__LINE__,__FILE__);
+                       $GLOBALS['phpgw']->db->next_record();
 
-                       if ($this->db->f($item_id))
+                       if ($GLOBALS['phpgw']->db->f($item_id))
                        {
-                               return $this->db->f(0);
+                               return $GLOBALS['phpgw']->db->f(0);
                        }
                }
 
@@ -1166,24 +1169,24 @@
                                default:                $table = 
'phpgw_p_projects'; $column = 'project_id'; break;
                        }
 
-                       $this->db->query("SELECT $item FROM $table WHERE 
$column=" . $item_id,__LINE__,__FILE__);
-                       if ($this->db->next_record())
+                       $GLOBALS['phpgw']->db->query("SELECT $item FROM $table 
WHERE $column=" . $item_id,__LINE__,__FILE__);
+                       if ($GLOBALS['phpgw']->db->next_record())
                        {
-                               return $this->db->f(0);
+                               return $GLOBALS['phpgw']->db->f(0);
                        }
                }
 
                function get_mstones($project_id = '')
                {
-                       $this->db->query("SELECT * FROM phpgw_p_mstones WHERE 
project_id=" . intval($project_id),__LINE__,__FILE__);
+                       $GLOBALS['phpgw']->db->query("SELECT * FROM 
phpgw_p_mstones WHERE project_id=" . intval($project_id),__LINE__,__FILE__);
 
-                       while($this->db->next_record())
+                       while($GLOBALS['phpgw']->db->next_record())
                        {
                                $stones[] = array
                                (
-                                       's_id'  => $this->db->f('s_id'),
-                                       'title' => $this->db->f('title'),
-                                       'edate' => $this->db->f('edate')
+                                       's_id'  => 
$GLOBALS['phpgw']->db->f('s_id'),
+                                       'title' => 
$GLOBALS['phpgw']->db->f('title'),
+                                       'edate' => 
$GLOBALS['phpgw']->db->f('edate')
                                );
                        }
                        return $stones;
@@ -1191,15 +1194,15 @@
 
                function get_single_mstone($s_id = '')
                {
-                       $this->db->query("SELECT * FROM phpgw_p_mstones WHERE 
s_id=" . intval($s_id),__LINE__,__FILE__);
+                       $GLOBALS['phpgw']->db->query("SELECT * FROM 
phpgw_p_mstones WHERE s_id=" . intval($s_id),__LINE__,__FILE__);
 
-                       if($this->db->next_record())
+                       if($GLOBALS['phpgw']->db->next_record())
                        {
                                $stone = array
                                (
-                                       's_id'  => $this->db->f('s_id'),
-                                       'title' => $this->db->f('title'),
-                                       'edate' => $this->db->f('edate')
+                                       's_id'  => 
$GLOBALS['phpgw']->db->f('s_id'),
+                                       'title' => 
$GLOBALS['phpgw']->db->f('title'),
+                                       'edate' => 
$GLOBALS['phpgw']->db->f('edate')
                                );
                        }
                        return $stone;
@@ -1207,36 +1210,36 @@
 
                function add_mstone($values)
                {
-                       $this->db->query('INSERT into phpgw_p_mstones 
(project_id,title,edate) VALUES (' . intval($values['project_id']) . ",'"
-                                                       . 
$this->db->db_addslashes($values['title']) . "'," . intval($values['edate']) . 
')',__LINE__,__FILE__);
-                       return 
$this->db->get_last_insert_id('phpgw_p_mstones','s_id');
+                       $GLOBALS['phpgw']->db->query('INSERT into 
phpgw_p_mstones (project_id,title,edate) VALUES (' . 
intval($values['project_id']) . ",'"
+                                                       . 
$GLOBALS['phpgw']->db->db_addslashes($values['title']) . "'," . 
intval($values['edate']) . ')',__LINE__,__FILE__);
+                       return 
$GLOBALS['phpgw']->db->get_last_insert_id('phpgw_p_mstones','s_id');
                }
 
                function edit_mstone($values)
                {
-                       $this->db->query('UPDATE phpgw_p_mstones set edate=' . 
intval($values['edate']) . ", title='" . 
$this->db->db_addslashes($values['title']) . "' "
+                       $GLOBALS['phpgw']->db->query('UPDATE phpgw_p_mstones 
set edate=' . intval($values['edate']) . ", title='" . 
$GLOBALS['phpgw']->db->db_addslashes($values['title']) . "' "
                                                        . 'WHERE s_id=' . 
intval($values['s_id']),__LINE__,__FILE__);
                }
 
                function delete_mstone($s_id = '')
                {
-                       $this->db->query('DELETE from phpgw_p_mstones where 
s_id=' . intval($s_id),__LINE__,__FILE__);
+                       $GLOBALS['phpgw']->db->query('DELETE from 
phpgw_p_mstones where s_id=' . intval($s_id),__LINE__,__FILE__);
                }
 
                function delete_acl($project_id)
                {
-                       $this->db->query("DELETE from phpgw_acl where 
acl_appname='projects' AND acl_location=" . $project_id
+                       $GLOBALS['phpgw']->db->query("DELETE from phpgw_acl 
where acl_appname='projects' AND acl_location=" . $project_id
                                                        . ' AND 
acl_rights=7',__LINE__,__FILE__);
                }
 
                function get_acl_projects()
                {
-                       $this->db->query("SELECT acl_location from phpgw_acl 
where acl_appname = 'projects' and acl_rights=7 and acl_account="
+                       $GLOBALS['phpgw']->db->query("SELECT acl_location from 
phpgw_acl where acl_appname = 'projects' and acl_rights=7 and acl_account="
                                                                . 
$this->account,__LINE__,__FILE__);
 
-                       while($this->db->next_record())
+                       while($GLOBALS['phpgw']->db->next_record())
                        {
-                               $projects[] = $this->db->f(0);
+                               $projects[] = $GLOBALS['phpgw']->db->f(0);
                        }
                        return $projects;
                }
@@ -1289,12 +1292,12 @@
 
                function member($project_id)
                {
-                       $this->db->query("SELECT acl_account from phpgw_acl 
where acl_appname = 'projects' and acl_rights=7 and acl_location="
+                       $GLOBALS['phpgw']->db->query("SELECT acl_account from 
phpgw_acl where acl_appname = 'projects' and acl_rights=7 and acl_location="
                                                                . 
intval($project_id),__LINE__,__FILE__);
 
-                       while($this->db->next_record())
+                       while($GLOBALS['phpgw']->db->next_record())
                        {
-                               $members[] = $this->db->f(0);
+                               $members[] = $GLOBALS['phpgw']->db->f(0);
                        }
 
                        if (is_array($members) && 
in_array($this->account,$members))
@@ -1319,22 +1322,22 @@
                                $emp_select = ' and account_id=' . $account_id;
                        }
 
-                       $this->db->query('SELECT * from phpgw_p_projectmembers 
where project_id=' . $project_id . " and type='role'" . 
$emp_select,__LINE__,__FILE__);
+                       $GLOBALS['phpgw']->db->query('SELECT * from 
phpgw_p_projectmembers where project_id=' . $project_id . " and type='role'" . 
$emp_select,__LINE__,__FILE__);
 
-                       while($this->db->next_record())
+                       while($GLOBALS['phpgw']->db->next_record())
                        {
                                if($column != '*')
                                {
-                                       $roles = $this->db->f($column);
+                                       $roles = 
$GLOBALS['phpgw']->db->f($column);
                                }
                                else
                                {
                                        $roles[] = array
                                        (
-                                               'r_id'                  => 
$this->db->f('id'),
-                                               'account_id'    => 
$this->db->f('account_id'),
-                                               'role_id'               => 
$this->db->f('role_id'),
-                                               'events'                => 
explode(',',$this->db->f('events'))
+                                               'r_id'                  => 
$GLOBALS['phpgw']->db->f('id'),
+                                               'account_id'    => 
$GLOBALS['phpgw']->db->f('account_id'),
+                                               'role_id'               => 
$GLOBALS['phpgw']->db->f('role_id'),
+                                               'events'                => 
explode(',',$GLOBALS['phpgw']->db->f('events'))
                                        );
                                }
                        }
@@ -1378,13 +1381,13 @@
                {
                        if(!$edit)
                        {
-                               $this->db->query('INSERT into 
phpgw_p_projectmembers (project_id,account_id,type,role_id,events) values(' . 
intval($values['project_id']) . ','
+                               $GLOBALS['phpgw']->db->query('INSERT into 
phpgw_p_projectmembers (project_id,account_id,type,role_id,events) values(' . 
intval($values['project_id']) . ','
                                                        . 
intval($values['account_id']) . ",'role'," . intval($values['role_id']) . ",'"
                                                        . 
(is_array($values['events'])?implode(',',$values['events']):'') . 
"')",__LINE__,__FILE__);
                        }
                        else
                        {
-                               $this->db->query('UPDATE phpgw_p_projectmembers 
set role_id=' . intval($values['role_id']) . ",events='" . 
(is_array($values['events'])?implode(',',$values['events']):'')
+                               $GLOBALS['phpgw']->db->query('UPDATE 
phpgw_p_projectmembers set role_id=' . intval($values['role_id']) . ",events='" 
. (is_array($values['events'])?implode(',',$values['events']):'')
                                                                . "' where 
type='role' and project_id=" . intval($values['project_id']) . ' and 
account_id=' . intval($values['account_id']) . ' and id='
                                                                . 
intval($values['r_id']),__LINE__,__FILE__);
 
@@ -1397,10 +1400,10 @@
                        $action         = 
isset($data['action'])?$data['action']:'hours';
                        $extra          = intval($data['extra']);
 
-                       $this->db->query('INSERT into phpgw_p_alarm 
(project_id,alarm_type,alarm_extra,alarm_send) values(' . $project_id . ",'" . 
$action . "',"
+                       $GLOBALS['phpgw']->db->query('INSERT into phpgw_p_alarm 
(project_id,alarm_type,alarm_extra,alarm_send) values(' . $project_id . ",'" . 
$action . "',"
                                                        . $extra . 
',1)',__LINE__,__FILE__);
 
-                       return 
$this->db->get_last_insert_id('phpgw_p_alarm','alarm_id');
+                       return 
$GLOBALS['phpgw']->db->get_last_insert_id('phpgw_p_alarm','alarm_id');
                }
 
                function update_alarm($data)
@@ -1409,19 +1412,19 @@
                        $extra          = intval($data['extra']);
                        $send           = 
isset($data['send'])?$data['send']:'1';
 
-                       $this->db->query('UPDATE phpgw_p_alarm set 
alarm_extra=' . $extra . ", alarm_send='" . $send . "' where alarm_id=" . 
$alarm_id,__LINE__,__FILE__);
+                       $GLOBALS['phpgw']->db->query('UPDATE phpgw_p_alarm set 
alarm_extra=' . $extra . ", alarm_send='" . $send . "' where alarm_id=" . 
$alarm_id,__LINE__,__FILE__);
                }
 
                function drop_alarm($project_id = 0,$action = 'edit')
                {
-                       $this->db->query('DELETE from phpgw_p_alarm where 
project_id=' . intval($project_id) . " and alarm_type='" . $action . 
"'",__LINE__,__FILE__);
+                       $GLOBALS['phpgw']->db->query('DELETE from phpgw_p_alarm 
where project_id=' . intval($project_id) . " and alarm_type='" . $action . 
"'",__LINE__,__FILE__);
                }
 
                function check_alarm($project_id = 0,$action = 'hours')
                {
-                       $this->db->query('SELECT * from phpgw_p_alarm where 
project_id=' . intval($project_id) . " and alarm_send='1' and alarm_type='" . 
$action . "'",__LINE__,__FILE__);
+                       $GLOBALS['phpgw']->db->query('SELECT * from 
phpgw_p_alarm where project_id=' . intval($project_id) . " and alarm_send='1' 
and alarm_type='" . $action . "'",__LINE__,__FILE__);
 
-                       if($this->db->next_record())
+                       if($GLOBALS['phpgw']->db->next_record())
                        {
                                return True;
                        }
@@ -1433,14 +1436,14 @@
                        $project_id = intval($data['project_id']);
                        $action         = 
isset($data['action'])?$data['action']:'hours';
 
-                       $this->db->query('SELECT * from phpgw_p_alarm where 
project_id=' . intval($project_id) . " and alarm_type='" . $action . 
"'",__LINE__,__FILE__);
+                       $GLOBALS['phpgw']->db->query('SELECT * from 
phpgw_p_alarm where project_id=' . intval($project_id) . " and alarm_type='" . 
$action . "'",__LINE__,__FILE__);
 
-                       if($this->db->next_record())
+                       if($GLOBALS['phpgw']->db->next_record())
                        {
                                $alarm = array
                                (
-                                       'alarm_id'      => 
$this->db->f('alarm_id'),
-                                       'extra'         => 
$this->db->f('alarm_extra')
+                                       'alarm_id'      => 
$GLOBALS['phpgw']->db->f('alarm_id'),
+                                       'extra'         => 
$GLOBALS['phpgw']->db->f('alarm_extra')
                                );
                                return $alarm;
                        }

Index: inc/class.uiconfig.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.uiconfig.inc.php,v
retrieving revision 1.29
retrieving revision 1.29.2.1
diff -u -b -r1.29 -r1.29.2.1
--- inc/class.uiconfig.inc.php  19 Jun 2004 22:47:31 -0000      1.29
+++ inc/class.uiconfig.inc.php  21 Jun 2006 13:58:20 -0000      1.29.2.1
@@ -23,7 +23,7 @@
        * along with this program; if not, write to the Free Software       *
        * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.         *
        \*******************************************************************/
-       /* $Id: class.uiconfig.inc.php,v 1.29 2004/06/19 22:47:31 ceb Exp $ */
+       /* $Id: class.uiconfig.inc.php,v 1.29.2.1 2006/06/21 13:58:20 ceb Exp $ 
*/
        // $Source: /sources/phpgroupware/projects/inc/class.uiconfig.inc.php,v 
$
 
        class uiconfig
@@ -675,7 +675,8 @@
                        
$GLOBALS['phpgw']->template->set_var('billperae',$values['billperae']);
 
                        $link_data['menuaction']        = 
'projects.uiconfig.delete_pa';
-                       $link_data['pa_id']     = $values[$i]['activity_id'];
+                       $link_data['pa_id']                     = 
$values['activity_id'];
+
                        
$GLOBALS['phpgw']->template->set_var('deleteurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
                        
$GLOBALS['phpgw']->template->set_var('lang_delete',lang('Delete'));
 

Index: inc/class.uiprojecthours.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.uiprojecthours.inc.php,v
retrieving revision 1.81.2.1
retrieving revision 1.81.2.2
diff -u -b -r1.81.2.1 -r1.81.2.2
--- inc/class.uiprojecthours.inc.php    17 May 2005 13:23:58 -0000      1.81.2.1
+++ inc/class.uiprojecthours.inc.php    21 Jun 2006 13:58:20 -0000      1.81.2.2
@@ -23,7 +23,7 @@
        * along with this program; if not, write to the Free Software       *
        * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.         *
        \*******************************************************************/
-       /* $Id: class.uiprojecthours.inc.php,v 1.81.2.1 2005/05/17 13:23:58 ceb 
Exp $ */
+       /* $Id: class.uiprojecthours.inc.php,v 1.81.2.2 2006/06/21 13:58:20 ceb 
Exp $ */
        // $Source: 
/sources/phpgroupware/projects/inc/class.uiprojecthours.inc.php,v $
 
        class uiprojecthours
@@ -176,6 +176,7 @@
                        
$GLOBALS['phpgw']->template->set_var('lang_distance',lang('distance'));
                        
$GLOBALS['phpgw']->template->set_var('lang_surcharge',lang('surcharge'));
                        
$GLOBALS['phpgw']->template->set_var('lang_select_surcharge',lang('select 
surcharge'));
+                       
$GLOBALS['phpgw']->template->set_var('lang_select_activity',lang('select 
activity'));
                }
 
                function display_app_header()
@@ -371,7 +372,10 @@
 // --------------- template declaration for Add Form --------------------------
 
                        $this->project_id = $pro_main;
-                       if ($this->bohours->add_perms(array('main' => 
$pro_main,'main_co' => $main['coordinator'])) && $pro_main > 0)
+
+                       $add_perms = $this->bohours->add_perms(array('main' => 
$pro_main,'main_co' => $main['coordinator']));
+
+                       if ($add_perms && $pro_main > 0)
                        {
                                $link_data['menuaction']        = 
'projects.uiprojecthours.edit_hours';
                                $link_data['project_id']        = $pro_main;

Index: inc/class.uiprojects.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.uiprojects.inc.php,v
retrieving revision 1.152.2.2
retrieving revision 1.152.2.3
diff -u -b -r1.152.2.2 -r1.152.2.3
--- inc/class.uiprojects.inc.php        17 May 2005 15:45:45 -0000      
1.152.2.2
+++ inc/class.uiprojects.inc.php        21 Jun 2006 13:58:20 -0000      
1.152.2.3
@@ -23,7 +23,7 @@
        * along with this program; if not, write to the Free Software       *
        * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.         *
        \*******************************************************************/
-       /* $Id: class.uiprojects.inc.php,v 1.152.2.2 2005/05/17 15:45:45 ceb 
Exp $ */
+       /* $Id: class.uiprojects.inc.php,v 1.152.2.3 2006/06/21 13:58:20 ceb 
Exp $ */
        // $Source: 
/sources/phpgroupware/projects/inc/class.uiprojects.inc.php,v $
 
        class uiprojects
@@ -982,6 +982,13 @@
                        }
                        elseif($action == 'subs')
                        {
+                               $parent_select = 
$this->boprojects->select_project_list(array('action' => 'mainandsubs','status' 
=> $values['status'],'self' => $project_id,
+                                                                               
                                                                                
'selected' => $values['parent'],'main' => $pro_main));
+
+                               echo 'parent_select:' . $parent_select;
+
+                               
$GLOBALS['phpgw']->template->set_var('parent_select','<select 
name="values[parent]">' . $parent_select . '</select>');
+
                                
$GLOBALS['phpgw']->template->set_var('pro_main',$main['title'] . ' [' . 
$main['number'] . ']');
                                
$GLOBALS['phpgw']->template->set_var('main_url',$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojects.view_project&action=mains&project_id='
                                                                                
                                                                                
                . $pro_main));
@@ -996,6 +1003,8 @@
                                
$GLOBALS['phpgw']->template->set_var('pbudget_jobs',sprintf("%01.2f",$main['pbudget_jobs']));
                                
$GLOBALS['phpgw']->template->set_var('apbudget',sprintf("%01.2f",$main['ap_budget_jobs']));
 
+
+
                                
$GLOBALS['phpgw']->template->fp('mainhandle','main',True);
 
                                $values['coordinator']          = 
isset($values['coordinator'])?$values['coordinator']:$parent['coordinator'];
@@ -1020,12 +1029,6 @@
                                $values['billable']                             
                = 
isset($values['billable'])?$values['billable']:$parent['billable'];
                                $values['inv_method']                           
        = 
isset($values['inv_method'])?$values['inv_method']:$parent['inv_method'];
 
-                               
$GLOBALS['phpgw']->template->set_var('parent_select','<select 
name="values[parent]">' . $this->boprojects->select_project_list(array('action' 
=> 'mainandsubs',
-                                                                               
                                                                                
                                                                                
                                                'status' => $values['status'],
-                                                                               
                                                                                
                                                                                
                                                'self' => $project_id,
-                                                                               
                                                                                
                                                                                
                                                'selected' => $values['parent'],
-                                                                               
                                                                                
                                                                                
                                                'main' => $pro_main)) . 
'</select>');
-
                                
$GLOBALS['phpgw']->template->set_var('lang_choose',($project_id?'':lang('generate
 job id')));
                                
$GLOBALS['phpgw']->template->set_var('cat',$this->boprojects->cats->id2name($main['cat']));
                                $this->cat_id = $main['cat'];

Index: templates/default/form.tpl
===================================================================
RCS file: /sources/phpgroupware/projects/templates/default/Attic/form.tpl,v
retrieving revision 1.66
retrieving revision 1.66.2.1
diff -u -b -r1.66 -r1.66.2.1
--- templates/default/form.tpl  9 Jun 2004 23:25:39 -0000       1.66
+++ templates/default/form.tpl  21 Jun 2006 13:58:20 -0000      1.66.2.1
@@ -1,4 +1,4 @@
-<!-- $Id: form.tpl,v 1.66 2004/06/09 23:25:39 ceb Exp $ -->
+<!-- $Id: form.tpl,v 1.66.2.1 2006/06/21 13:58:20 ceb Exp $ -->
 <script language="JavaScript">
        self.name="first_Window";
        function abook()
@@ -52,6 +52,7 @@
                <td>{atime}</td>
        </tr>
 </table>
+
 <table width="100%" border="0" cellspacing="2" cellpadding="2">
        <tr bgcolor="{row_on}">
                <td>{lang_parent}:</td>




reply via email to

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