phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: property invoice_detail.php,1.2,1.3 invoice_deta


From: Sigurd Nes <address@hidden>
Subject: [Phpgroupware-cvs] CVS: property invoice_detail.php,1.2,1.3 invoice_detail_paid.php,1.2,1.3 invoice_paid.php,1.2,1.3 list_invoice.php,1.2,1.3 list_property.php,1.2,1.3 add_admin.php,1.1.1.1,1.2 add_workorder.php,1.1.1.1,1.2 edit_workorder.php,1.1.1.1,1.2 index.php,1.1.1.1,1.2 list_activity.php,1.1.1.1,1.2 list_agreement.php,1.1.1.1,1.2 list_apartment.php,1.1.1.1,1.2 list_building.php,1.1.1.1,1.2 list_drawing.php,1.1.1.1,1.2 list_entrance.php,1.1.1.1,1.2 list_equipment.php,1.1.1.1,1.2 list_equipment_type.php,1.1.1.1,1.2 list_equipment_type_attribute.php,1.1.1.1,1.2 list_gabnr.php,1.1.1.1,1.2 list_power_meter.php,1.1.1.1,1.2 list_ticket.php,1.1.1.1,1.2 list_vendors_activities.php,1.1.1.1,1.2 list_workorder.php,1.1.1.1,1.2 newticket.php,1.1.1.1,1.2 viewticket_details.php,1.1.1.1,1.2 workorder_admin.php,1.1.1.1,1.2 workorder_archive.php,1.1.1.1,1.2
Date: Sun, 01 Sep 2002 15:43:52 -0400

Update of /cvsroot/phpgroupware/property
In directory subversions:/tmp/cvs-serv6157

Modified Files:
        invoice_detail.php invoice_detail_paid.php invoice_paid.php 
        list_invoice.php list_property.php add_admin.php 
        add_workorder.php edit_workorder.php index.php 
        list_activity.php list_agreement.php list_apartment.php 
        list_building.php list_drawing.php list_entrance.php 
        list_equipment.php list_equipment_type.php 
        list_equipment_type_attribute.php list_gabnr.php 
        list_power_meter.php list_ticket.php 
        list_vendors_activities.php list_workorder.php newticket.php 
        viewticket_details.php workorder_admin.php 
        workorder_archive.php 
Log Message:
no message

Index: invoice_detail.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/invoice_detail.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** invoice_detail.php  29 Aug 2002 20:28:05 -0000      1.2
--- invoice_detail.php  1 Sep 2002 19:43:49 -0000       1.3
***************
*** 19,23 ****
        $t->set_block('invoice_list_t','invoice_list','list');
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','invoice');
  
        $c = CreateObject('phpgwapi.categories');
--- 19,23 ----
        $t->set_block('invoice_list_t','invoice_list','list');
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','p_invoice');
  
        $c = CreateObject('phpgwapi.categories');

Index: invoice_detail_paid.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/invoice_detail_paid.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** invoice_detail_paid.php     29 Aug 2002 20:28:05 -0000      1.2
--- invoice_detail_paid.php     1 Sep 2002 19:43:49 -0000       1.3
***************
*** 19,23 ****
        $t->set_block('invoice_list_t','invoice_list','list');
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','invoice');
  
        $c = CreateObject('phpgwapi.categories');
--- 19,23 ----
        $t->set_block('invoice_list_t','invoice_list','list');
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','p_invoice');
  
        $c = CreateObject('phpgwapi.categories');

Index: invoice_paid.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/invoice_paid.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** invoice_paid.php    29 Aug 2002 20:28:05 -0000      1.2
--- invoice_paid.php    1 Sep 2002 19:43:49 -0000       1.3
***************
*** 19,23 ****
        $t->set_block('invoice_list_t','invoice_list','list');
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','invoice');
  
  //    $c = CreateObject('phpgwapi.categories');
--- 19,23 ----
        $t->set_block('invoice_list_t','invoice_list','list');
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','p_invoice');
  
  //    $c = CreateObject('phpgwapi.categories');
***************
*** 35,49 ****
        }
  
  
        $user_id=$GLOBALS['phpgw_info']['user']['account_id'];
  
        $user_firstname = $GLOBALS['phpgw_info']['user']['firstname'];
- 
        $user_lastname  =$GLOBALS['phpgw_info']['user']['lastname'];
- 
        $user_fullname  =$GLOBALS['phpgw_info']['user']['fullname'];
- 
        $user_lid       
=strtoupper($GLOBALS['phpgw_info']['user']['account_lid']);
        $t->set_var('user_lid',$user_lid);
  /*    if (!$coordinator_lid)
        {
--- 35,58 ----
        }
  
+       
$t->set_var('addressbook_link',$GLOBALS['phpgw']->link('/property/addressbook.php','query='));
+       
$t->set_var('property_link',$GLOBALS['phpgw']->link('/property/search_property.php','query='));
  
+       $t->set_var('lang_property',lang('Property'));
+       $t->set_var('lang_vendor',lang('Vendor'));
+       $t->set_var('lang_coordinator',lang('Person'));
        $user_id=$GLOBALS['phpgw_info']['user']['account_id'];
  
        $user_firstname = $GLOBALS['phpgw_info']['user']['firstname'];
        $user_lastname  =$GLOBALS['phpgw_info']['user']['lastname'];
        $user_fullname  =$GLOBALS['phpgw_info']['user']['fullname'];
        $user_lid       
=strtoupper($GLOBALS['phpgw_info']['user']['account_lid']);
        $t->set_var('user_lid',$user_lid);
+ 
+       if ($abid)
+       {
+               $ab_id=$abid;
+       }
+       $t->set_var('ab_id',$ab_id);
+       $t->set_var('objekt_id',$objekt_id);
  /*    if (!$coordinator_lid)
        {
***************
*** 54,60 ****
        
$t->set_var('coordinator_list',select_coordinator_list($coordinator_lid));
        $t->set_var('lang_action',lang('Paid'));
!       
$t->set_var('coordinator_url',$GLOBALS['phpgw']->link('/property/invoice_paid.php',"sort=$sort&order=$order&filter=$filter&start=$start&query=$query&cat_id=$cat_id"));
        $t->set_var('category_list',select_invoice_type_list($cat_id));
!       
$t->set_var('cat_url',$GLOBALS['phpgw']->link('/property/invoice_paid.php',"sort=$sort&order=$order&filter=$filter&start=$start&query=$query&cat_id=$cat_id"));
  
        $t->set_var('title',$GLOBALS['phpgw_info']['site_title']);
--- 63,69 ----
        
$t->set_var('coordinator_list',select_coordinator_list($coordinator_lid));
        $t->set_var('lang_action',lang('Paid'));
!       
$t->set_var('coordinator_url',$GLOBALS['phpgw']->link('/property/invoice_paid.php',"sort=$sort&order=$order&filter=$filter&start=$start&ab_id=$ab_id&cat_id=$cat_id"));
        $t->set_var('category_list',select_invoice_type_list($cat_id));
!       
$t->set_var('cat_url',$GLOBALS['phpgw']->link('/property/invoice_paid.php',"sort=$sort&order=$order&filter=$filter&start=$start&ab_id=$ab_id&cat_id=$cat_id"));
  
        $t->set_var('title',$GLOBALS['phpgw_info']['site_title']);
***************
*** 132,139 ****
        }
  
!       $filter="&start_date=$start_date&end_date=$end_date";
  
  
!       if ($query)
        {
  //    echo 'start_date: '.$start_date .'<BR>';
--- 141,148 ----
        }
  
!       
$filter="&start_date=$start_date&end_date=$end_date&objekt_id=$objekt_id&abid=$abid&coordinator_lid=$coordinator_lid";
  
  
!       if ($start_date)
        {
  //    echo 'start_date: '.$start_date .'<BR>';
***************
*** 177,200 ****
  
  
!       if ($query)
        {
!               $querymethod = " where (spvend_code like '%$query%' or bilagsnr 
like '%$query%')";
                $where_1='and';
        }
        else
        {
                $where_1='where';
        }
  
!       if ($coordinator_lid)
        {
!               $GLOBALS['phpgw']->common->appsession($coordinator_lid);
        }
        else
        {
!               $coordinator_lid =$GLOBALS['phpgw']->common->appsession();
        }
  
! 
  
        if ($coordinator_lid=='all')
--- 186,226 ----
  
  
!       if ($ab_id)
        {
!               $querymethod = " where (spvend_code ='$ab_id')";
!               if($objekt_id)
!               {
!                       $querymethod .=" and (dima like '%$objekt_id%')";
!               }
                $where_1='and';
        }
        else
        {
+               if($objekt_id)
+               {
+                       $querymethod =" where (dima like '%$objekt_id%')";
+                       $where_1='and';
+               }
+ 
                $where_1='where';
        }
  
! 
! 
! 
! /*    if ($coordinator_lid)
        {
! //            $GLOBALS['phpgw']->common->appsession($coordinator_lid);
!               
$GLOBALS['phpgw']->session->appsession('coordinator_lid','property',$coordinator_lid);
! 
        }
        else
        {
! //            $coordinator_lid =$GLOBALS['phpgw']->common->appsession();
!               $coordinator_lid 
=$GLOBALS['phpgw']->session->appsession('coordinator_lid','property');
!               echo 'coordinator_lid: '.$coordinator_lid .'<BR>';
        }
  
! */
  
        if ($coordinator_lid=='all')
***************
*** 204,208 ****
        else
        {
!               $coordinator= (" $where_1 (oppsynsmannid like " . 
"'%$coordinator_lid%'"." or saksbehandlerid like " . "'%$coordinator_lid%'" . " 
or budsjettansvarligid like " . "'%$coordinator_lid%')");
        }
  
--- 230,235 ----
        else
        {
! //            $coordinator= (" $where_1 (oppsynsmannid like " . 
"'%$coordinator_lid%'"." or saksbehandlerid like " . "'%$coordinator_lid%'" . " 
or budsjettansvarligid like " . "'%$coordinator_lid%')");
!               $coordinator= (" $where_1 (oppsynsmannid=" . 
"'$coordinator_lid'"." or saksbehandlerid = " . "'$coordinator_lid'" . " or 
budsjettansvarligid = " . "'$coordinator_lid')");
        }
  
***************
*** 221,225 ****
        }
  
!       $GLOBALS['phpgw']->db->query(" SELECT * from fm_invoice_role  where 
account_id = $user_id");
        $GLOBALS['phpgw']->db->next_record();
        $is_janitor = $GLOBALS['phpgw']->db->f('janitor');
--- 248,252 ----
        }
  
!       $GLOBALS['phpgw']->db->query(" SELECT * from fm_admin  where account_id 
= $user_id");
        $GLOBALS['phpgw']->db->next_record();
        $is_janitor = $GLOBALS['phpgw']->db->f('janitor');
***************
*** 233,237 ****
  //    echo 'query: '.$query .'<BR>';
  
!       if ($coordinator_lid && $query)
        {
  /*            $sql = "SELECT DATEDIFF(day, fakturadato, utbetalingsigndato) 
AS no_of_days, 
bilagsnr,spvend_code,oppsynsmannid,saksbehandlerid,budsjettansvarligid,"
--- 260,264 ----
  //    echo 'query: '.$query .'<BR>';
  
!       if ($coordinator_lid || $ab_id || $objekt_id)
        {
  /*            $sql = "SELECT DATEDIFF(day, fakturadato, utbetalingsigndato) 
AS no_of_days, 
bilagsnr,spvend_code,oppsynsmannid,saksbehandlerid,budsjettansvarligid,"
***************
*** 302,306 ****
  
  /*
!       if ($query)
        {
                if ($total_records == 1)
--- 329,333 ----
  
  /*
!       if ($ab_id)
        {
                if ($total_records == 1)
***************
*** 337,342 ****
  
  // ---------------- nextmatch variable template-declarations 
------------------------------
!       $left = 
$GLOBALS['phpgw']->nextmatchs->left('/property/invoice_paid.php',$start,$total_records,"&cat_id=$cat_id&location_code=$location_code&coordinator_lid=$coordinator_lid&start_date=$start_date&end_date=$end_date");
!       $right = 
$GLOBALS['phpgw']->nextmatchs->right('/property/invoice_paid.php',$start,$total_records,"&cat_id=$cat_id&location_code=$location_code&coordinator_lid=$coordinator_lid&start_date=$start_date&end_date=$end_date");
        $t->set_var('left',$left);
        $t->set_var('right',$right);
--- 364,369 ----
  
  // ---------------- nextmatch variable template-declarations 
------------------------------
!       $left = 
$GLOBALS['phpgw']->nextmatchs->left('/property/invoice_paid.php',$start,$total_records,"&cat_id=$cat_id&location_code=$location_code&coordinator_lid=$coordinator_lid&start_date=$start_date&end_date=$end_date&abid=$abid");
!       $right = 
$GLOBALS['phpgw']->nextmatchs->right('/property/invoice_paid.php',$start,$total_records,"&cat_id=$cat_id&location_code=$location_code&coordinator_lid=$coordinator_lid&start_date=$start_date&end_date=$end_date&abid=$abid");
        $t->set_var('left',$left);
        $t->set_var('right',$right);
***************
*** 375,379 ****
        $t->set_var('lang_no_of_days',lang('Days'));
        $t->set_var('lang_select',lang('Select'));
!       
$t->set_var('cats_action',$GLOBALS['phpgw']->link('/property/invoice_paid.php',"sort=$sort&order=$order&filter=$filter&start=$start&query=$query&cat_id=$cat_id"));
  //    
$t->set_var('cats_list',$c->formated_list('select','all',$cat_id,'True'));
  
--- 402,406 ----
        $t->set_var('lang_no_of_days',lang('Days'));
        $t->set_var('lang_select',lang('Select'));
!       
$t->set_var('cats_action',$GLOBALS['phpgw']->link('/property/invoice_paid.php',"sort=$sort&order=$order&filter=$filter&start=$start&ab_id=$ab_id&cat_id=$cat_id"));
  //    
$t->set_var('cats_list',$c->formated_list('select','all',$cat_id,'True'));
  
***************
*** 796,804 ****
        //      
$t->set_var('event',$GLOBALS['phpgw']->link('/invoice_paid.php','menuaction=calendar.uicalendar.search&from=calendar.uicalendar.search&keywords='
 . $objekt_id ));
  
!               
$t->set_var('link_bilagsnr',$GLOBALS['phpgw']->link('/property/invoice_detail_paid.php','bilagsnr='
 . $bilagsnr . '&coordinator_lid=' . $coordinator_lid. '&query=' . $query));
                
$t->set_var('link_no_of_days',$GLOBALS['phpgw']->link('/property/invoice_days.php','bilagsnr='
 . $bilagsnr . '&no_of_days=' . $no_of_days));
  
  
!               
$t->set_var('view',$GLOBALS['phpgw']->link('/property/view_workorder.php','id=' 
. $objekt_id . '&sort=' . $sort . '&order=' . $order . '&query=' . $query
                                                                                
. '&start=' . $start . '&filter=' . $filter . '&cat_id=' . $cat_id));
  
--- 823,831 ----
        //      
$t->set_var('event',$GLOBALS['phpgw']->link('/invoice_paid.php','menuaction=calendar.uicalendar.search&from=calendar.uicalendar.search&keywords='
 . $objekt_id ));
  
!               
$t->set_var('link_bilagsnr',$GLOBALS['phpgw']->link('/property/invoice_detail_paid.php','bilagsnr='
 . $bilagsnr . '&coordinator_lid=' . $coordinator_lid. '&ab_id=' . $ab_id));
                
$t->set_var('link_no_of_days',$GLOBALS['phpgw']->link('/property/invoice_days.php','bilagsnr='
 . $bilagsnr . '&no_of_days=' . $no_of_days));
  
  
!               
$t->set_var('view',$GLOBALS['phpgw']->link('/property/view_workorder.php','id=' 
. $objekt_id . '&sort=' . $sort . '&order=' . $order . '&ab_id=' . $ab_id
                                                                                
. '&start=' . $start . '&filter=' . $filter . '&cat_id=' . $cat_id));
  
***************
*** 814,818 ****
        $hidden_vars = '<input type="hidden" name="sort" value="' . $sort . 
'">' . "\n"
                                . '<input type="hidden" name="order" value="' . 
$order . '">' . "\n"
!                               . '<input type="hidden" name="query" value="' . 
$query . '">' . "\n"
                                . '<input type="hidden" name="start" value="' . 
$start . '">' . "\n"
                                . '<input type="hidden" name="sub" value="' . 
$sub . '">' . "\n"
--- 841,845 ----
        $hidden_vars = '<input type="hidden" name="sort" value="' . $sort . 
'">' . "\n"
                                . '<input type="hidden" name="order" value="' . 
$order . '">' . "\n"
!                       //      . '<input type="hidden" name="ab_id" value="' . 
$ab_id . '">' . "\n"
                                . '<input type="hidden" name="start" value="' . 
$start . '">' . "\n"
                                . '<input type="hidden" name="sub" value="' . 
$sub . '">' . "\n"

Index: list_invoice.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/list_invoice.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** list_invoice.php    29 Aug 2002 20:28:05 -0000      1.2
--- list_invoice.php    1 Sep 2002 19:43:49 -0000       1.3
***************
*** 19,23 ****
        $t->set_block('invoice_list_t','invoice_list','list');
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','invoice');
  //    $c = CreateObject('phpgwapi.categories');
  //    $c->app_name = 'property';
--- 19,23 ----
        $t->set_block('invoice_list_t','invoice_list','list');
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','p_invoice');
  //    $c = CreateObject('phpgwapi.categories');
  //    $c->app_name = 'property';
***************
*** 356,360 ****
        }
  
!       $GLOBALS['phpgw']->db->query(" SELECT * from fm_invoice_role  where 
account_id = $user_id");
        $GLOBALS['phpgw']->db->next_record();
        $is_janitor = $GLOBALS['phpgw']->db->f('janitor');
--- 356,360 ----
        }
  
!       $GLOBALS['phpgw']->db->query(" SELECT * from fm_admin  where account_id 
= $user_id");
        $GLOBALS['phpgw']->db->next_record();
        $is_janitor = $GLOBALS['phpgw']->db->f('janitor');

Index: list_property.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/list_property.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** list_property.php   29 Aug 2002 20:28:06 -0000      1.2
--- list_property.php   1 Sep 2002 19:43:49 -0000       1.3
***************
*** 19,27 ****
        $t->set_block('property_list_t','property_list','list');
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','property');
  
        $c = CreateObject('phpgwapi.categories');
! //    $c->app_name = 'property';
!       
$t->set_var('category_list',$GLOBALS['phpgw']->categories->formated_list('select','all',$cat_id,'True'));
  
        if 
(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['currency']))
--- 19,27 ----
        $t->set_block('property_list_t','property_list','list');
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','p_property');
  
        $c = CreateObject('phpgwapi.categories');
!       $c->app_name = 'p_property';
!       
$t->set_var('category_list',$c->formated_list('select','all',$cat_id,'True'));
  
        if 
(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['currency']))

Index: add_admin.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/add_admin.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** add_admin.php       28 Aug 2002 16:43:04 -0000      1.1.1.1
--- add_admin.php       1 Sep 2002 19:43:49 -0000       1.2
***************
*** 21,26 ****
        if($submit)
        {
- //            $GLOBALS['phpgw']->db->query("DELETE from fm_wo_admin WHERE 
type='u' OR type='g'",__LINE__,__FILE__);
  
                if (count($users) != 0)
                {
--- 21,26 ----
        if($submit)
        {
  
+               $GLOBALS['phpgw']->db->query("update fm_admin set update_right 
= NULL ",__LINE__,__FILE__);
                if (count($users) != 0)
                {
***************
*** 28,43 ****
                        {
  
!                               $GLOBALS['phpgw']->db->query("SELECT count(*) 
from fm_wo_admin WHERE type='u' and $choose_rights='1' and account_id 
='$activ[1]' and sub_module='workorder'",__LINE__,__FILE__);
!                               //sjekk kvar enkelt verdi...
! 
                                $GLOBALS['phpgw']->db->next_record();
!                               if ($GLOBALS['phpgw']->db->f(0) != 0)
                                {
!                                               
$GLOBALS['phpgw']->db->query("update fm_wo_admin set $choose_rights ='1' where 
account_id='$activ[1]'",__LINE__,__FILE__);
                                }
                                else
                                {
!                                       $GLOBALS['phpgw']->db->query("DELETE 
from fm_wo_admin WHERE account_id ='$activ[1]' and 
sub_module='workorder'",__LINE__,__FILE__);
!                                       $GLOBALS['phpgw']->db->query("insert 
into fm_wo_admin (account_id,type, sub_module, $choose_rights) values 
('$activ[1]','u','workorder','1' )",__LINE__,__FILE__);
                                }
  
--- 28,42 ----
                        {
  
!                               $GLOBALS['phpgw']->db->query("SELECT count(*) 
from fm_admin WHERE type='u' and account_id ='$activ[1]' and 
sub_module='$sub_module'",__LINE__,__FILE__);
                                $GLOBALS['phpgw']->db->next_record();
!                               if ($GLOBALS['phpgw']->db->f(0) == 0)
                                {
!                                       $GLOBALS['phpgw']->db->query("insert 
into fm_admin (account_id,type, sub_module,update_right,$choose_rights) values 
('$activ[1]','u','$sub_module','$choose_rights','1' )",__LINE__,__FILE__);
                                }
                                else
                                {
! 
!                                       $GLOBALS['phpgw']->db->query("update 
fm_admin set update_right ='$choose_rights', $choose_rights='1' where 
account_id='$activ[1]' and sub_module='$sub_module'",__LINE__,__FILE__);
! 
                                }
  
***************
*** 45,56 ****
                }
  
                if (count($groups) != 0)
                {
                        while($activ=each($groups))
                        {
!                               $GLOBALS['phpgw']->db->query("insert into 
fm_wo_admin (account_id,type, sub_module, $choose_rights) values 
('$activ[1]','g','workorder','1' )",__LINE__,__FILE__);
                        }
                }
  
                Header('Location: ' 
.$GLOBALS['phpgw']->link('/property/workorder_admin.php'));
  
--- 44,115 ----
                }
  
+ 
                if (count($groups) != 0)
                {
                        while($activ=each($groups))
                        {
!                               $GLOBALS['phpgw']->db->query("SELECT count(*) 
from fm_admin WHERE type='g' and account_id ='$activ[1]' and 
sub_module='$sub_module'",__LINE__,__FILE__);
!                               $GLOBALS['phpgw']->db->next_record();
!                               if ($GLOBALS['phpgw']->db->f(0) == 0)
!                               {
!                                       $GLOBALS['phpgw']->db->query("insert 
into fm_admin (account_id,type, sub_module,update_right, $choose_rights) values 
('$activ[1]','g','$sub_module','$choose_rights','1' )",__LINE__,__FILE__);
!                               }
!                               else
!                               {
!                                       $GLOBALS['phpgw']->db->query("update 
fm_admin set update_right ='$choose_rights', $choose_rights='1' where 
account_id='$activ[1]'",__LINE__,__FILE__);
!                               }
                        }
                }
  
+               $db2 = $GLOBALS['phpgw']->db;
+               $db2->query("SELECT * from fm_admin WHERE update_right is NULL 
and sub_module='$sub_module'",__LINE__,__FILE__);
+               while ($db2->next_record())
+               {
+ //                    echo 'choose_rights: '.$choose_rights .'<BR>';
+                       if($db2->f($choose_rights))
+                       {
+                               $to_update[] = array('account_id' => 
$db2->f('account_id'));
+                       }
+               }
+ 
+ //            print_r($to_update);
+               if ($to_update)
+               {
+                       $i = 0;
+                       while(each($to_update))
+                       {
+                               $account_id=$to_update[$i]['account_id'];
+ //                            echo 'account_id: '.$account_id .'<BR>';
+                               $db2->query("update fm_admin set $choose_rights 
= NULL WHERE account_id = '$account_id' and 
sub_module='$sub_module'",__LINE__,__FILE__);
+                               $i++;
+                       }
+               }
+ 
+               $db2 = $GLOBALS['phpgw']->db;
+               $db2->query("SELECT * from fm_admin WHERE update_right is NULL 
and sub_module='$sub_module'",__LINE__,__FILE__);
+               while ($db2->next_record())
+               {
+ 
+                       if(!$db2->f('can_read') && !$db2->f('can_add') && 
!$db2->f('can_edit') && !$db2->f('can_delete') && !$db2->f('janitor') && 
!$db2->f('supervisor') && !$db2->f('budget_responsible') && 
!$db2->f('transfer'))
+                       {
+                               $to_delete[] = array('account_id' => 
$db2->f('account_id'));
+                       }
+               }
+ 
+ //            print_r($to_delete);
+ 
+               if ($to_delete)
+               {
+                       $i = 0;
+                       while(each($to_delete))
+                       {
+                               $account_id=$to_delete[$i]['account_id'];
+ //                            echo 'account_id: '.$account_id .'<BR>';
+                               $db2->query("DELETE from fm_admin WHERE 
account_id = '$account_id' and sub_module='$sub_module'",__LINE__,__FILE__);
+                               $i++;
+                       }
+ 
+               }
+ 
                Header('Location: ' 
.$GLOBALS['phpgw']->link('/property/workorder_admin.php'));
  
***************
*** 61,64 ****
--- 120,127 ----
        $t->set_file(array('admin_add' => 'form_admin.tpl'));
  
+ 
+ 
+ 
+ 
        $t->set_var('right',$right);
        $hidden_vars = '<input type="hidden" name="sort" value="' . $sort . 
'">' . "\n"
***************
*** 67,82 ****
                                . '<input type="hidden" name="choose_rights" 
value="' . $choose_rights . '">' . "\n"
                                . '<input type="hidden" name="start" value="' . 
$start . '">' . "\n"
!                               . '<input type="hidden" name="filter" value="' 
. $filter . '">' . "\n";
  
        $t->set_var('hidden_vars',$hidden_vars);
  
  
!       $t->set_var('lang_action',lang('Edit fm_wrkorder administrator list'));
        
$t->set_var('actionurl',$GLOBALS['phpgw']->link('/property/add_admin.php'));
        $t->set_var('lang_edit',lang('Edit'));
        $t->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
  
        $db2 = $GLOBALS['phpgw']->db;
!       $db2->query("SELECT account_id from fm_wo_admin WHERE type='u' and 
$choose_rights='1'",__LINE__,__FILE__);
        $i = 0;
        while ($db2->next_record())
--- 130,171 ----
                                . '<input type="hidden" name="choose_rights" 
value="' . $choose_rights . '">' . "\n"
                                . '<input type="hidden" name="start" value="' . 
$start . '">' . "\n"
!                               . '<input type="hidden" name="sub_module" 
value="' . $sub_module . '">' . "\n";
  
        $t->set_var('hidden_vars',$hidden_vars);
  
  
!       $t->set_var('lang_action',lang($sub_module));
        
$t->set_var('actionurl',$GLOBALS['phpgw']->link('/property/add_admin.php'));
        $t->set_var('lang_edit',lang('Edit'));
        $t->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
  
+ 
+       $errorcount = 0;
+       if (!$choose_rights)
+       {
+               $error[$errorcount++] = lang('Please choose which right ro 
update !');
+       }
+ 
+       if (!$sub_module)
+       {
+               $error[$errorcount++] = lang('Please choose which sub-module ro 
update !');
+       }
+ 
+       if ($errorcount)
+       {
+               
$t->set_var('actionurl',$GLOBALS['phpgw']->link('/property/workorder_admin.php'));
+               $t->set_var('lang_edit',lang('Go Back'));
+ 
+               
$t->set_var('message',$GLOBALS['phpgw']->common->error_list($error));
+       }
+       else
+       {
+               $t->set_var('message','');
+ 
+       }
+       if (!$errorcount)
+       {
        $db2 = $GLOBALS['phpgw']->db;
!       $db2->query("SELECT account_id from fm_admin WHERE type='u' and 
sub_module ='$sub_module' and $choose_rights='1'",__LINE__,__FILE__);
        $i = 0;
        while ($db2->next_record())
***************
*** 102,106 ****
        $t->set_var('users_list',$users_list);
  
!       $db2->query("SELECT account_id from fm_wo_admin WHERE type='g' and 
$choose_rights='1' ",__LINE__,__FILE__);
        while ($db2->next_record())
        {
--- 191,195 ----
        $t->set_var('users_list',$users_list);
  
!       $db2->query("SELECT account_id from fm_admin WHERE type='g' and 
sub_module ='$sub_module' and $choose_rights='1' ",__LINE__,__FILE__);
        while ($db2->next_record())
        {
***************
*** 122,126 ****
                . $ad_group['account_lid'] . '</option>';
        }
! 
        $t->set_var('groups_list',$groups_list);
        $t->set_var('lang_users_list',lang('Select users'));
--- 211,215 ----
                . $ad_group['account_lid'] . '</option>';
        }
!       }
        $t->set_var('groups_list',$groups_list);
        $t->set_var('lang_users_list',lang('Select users'));

Index: add_workorder.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/add_workorder.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** add_workorder.php   28 Aug 2002 16:43:06 -0000      1.1.1.1
--- add_workorder.php   1 Sep 2002 19:43:49 -0000       1.2
***************
*** 229,233 ****
                        $location_code.= "-".$seksjons_id;
                        $el_meter_table="boei_seksjon";
!                       $el_meter_condition= "objekt_id= ".$objekt_id . " and " 
. "bygg_id= " . $bygg_id . " and " . "seksjons_id= " . $seksjons_id;
                        }
                        if($leie_id)
--- 229,233 ----
                        $location_code.= "-".$seksjons_id;
                        $el_meter_table="boei_seksjon";
!                       $el_meter_condition= "objekt_id= ". "'$objekt_id'" . " 
and " . "bygg_id= " . "'$bygg_id'" . " and " . "seksjons_id= " . 
"'$seksjons_id'";
                        }
                        if($leie_id)
***************
*** 235,239 ****
                        $location_code.= "-".$leie_id;
                        $el_meter_table="boei_leieobjekt";
!                       $el_meter_condition= "objekt_id= ".$objekt_id . " and " 
. "leie_id= " . $leie_id;
                        }
  
--- 235,239 ----
                        $location_code.= "-".$leie_id;
                        $el_meter_table="boei_leieobjekt";
!                       $el_meter_condition= "objekt_id= ". "'$objekt_id'" . " 
and " . "leie_id= " . "'$leie_id'";
                        }
  
***************
*** 485,489 ****
        $t->set_var('lang_select_location',lang('Select location'));
        $t->set_var('lang_select_responsible',lang('Select Responsible'));
!       
$t->set_var('category_list',$GLOBALS['phpgw']->categories->formated_list('select','all',$cat_id,'True'));
  
        $t->set_var('lang_popup_calendar',lang('Popup Calendar'));
--- 485,491 ----
        $t->set_var('lang_select_location',lang('Select location'));
        $t->set_var('lang_select_responsible',lang('Select Responsible'));
!       $c = CreateObject('phpgwapi.categories');
!       $c->app_name = 'p_workorder';
!       
$t->set_var('category_list',$c->formated_list('select','all',$cat_id,'True'));
  
        $t->set_var('lang_popup_calendar',lang('Popup Calendar'));

Index: edit_workorder.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/edit_workorder.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** edit_workorder.php  28 Aug 2002 16:43:09 -0000      1.1.1.1
--- edit_workorder.php  1 Sep 2002 19:43:49 -0000       1.2
***************
*** 210,214 ****
                        $location_code.= "-".$seksjons_id;
                        $el_meter_table="boei_seksjon";
!                       $el_meter_condition= "objekt_id= ".$objekt_id . " and " 
. "bygg_id= " . $bygg_id . " and " . "seksjons_id= " . $seksjons_id;
                }
                if($leie_id)
--- 210,214 ----
                        $location_code.= "-".$seksjons_id;
                        $el_meter_table="boei_seksjon";
!                       $el_meter_condition= "objekt_id= ". "'$objekt_id'" . " 
and " . "bygg_id= " . "'$bygg_id'" . " and " . "seksjons_id= " . 
"'$seksjons_id'";
                }
                if($leie_id)
***************
*** 216,220 ****
                        $location_code.= "-".$leie_id;
                        $el_meter_table="boei_leieobjekt";
!                       $el_meter_condition= "objekt_id= ".$objekt_id . " and " 
. "leie_id= " . $leie_id;
                }
  
--- 216,220 ----
                        $location_code.= "-".$leie_id;
                        $el_meter_table="boei_leieobjekt";
!                       $el_meter_condition= "objekt_id= ". "'$objekt_id'" . " 
and " . "leie_id= " . "'$leie_id'";
                }
  
***************
*** 675,679 ****
        $t->set_var('lang_select_cat',lang('Select category'));
        $t->set_var('lang_select_location',lang('Select location'));
!       
$t->set_var('category_list',$GLOBALS['phpgw']->categories->formated_list('select','all',$cat_id,'True'));
        $t->set_var('lang_popup_calendar',lang('Popup Calendar'));
        $t->set_var('lang_total',lang('Total'));
--- 675,681 ----
        $t->set_var('lang_select_cat',lang('Select category'));
        $t->set_var('lang_select_location',lang('Select location'));
!       $c = CreateObject('phpgwapi.categories');
!       $c->app_name = 'p_workorder';
!       
$t->set_var('category_list',$c->formated_list('select','all',$cat_id,'True'));
        $t->set_var('lang_popup_calendar',lang('Popup Calendar'));
        $t->set_var('lang_total',lang('Total'));

Index: index.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/index.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** index.php   28 Aug 2002 16:43:10 -0000      1.1.1.1
--- index.php   1 Sep 2002 19:43:49 -0000       1.2
***************
*** 19,23 ****
  
        
$start_page=$GLOBALS['phpgw_info']['user']['preferences']['property']['default_start_page'];
!       $sub=$start_page;
  
  //    $GLOBALS['phpgw']->preferences->read_repository();
--- 19,23 ----
  
        
$start_page=$GLOBALS['phpgw_info']['user']['preferences']['property']['default_start_page'];
!       $sub='p_' . $start_page;
  
  //    $GLOBALS['phpgw']->preferences->read_repository();
***************
*** 30,34 ****
        {
                $start_page='list_workorder.php';
!               $sub='workorder';
        }
  
--- 30,34 ----
        {
                $start_page='list_workorder.php';
!               $sub='p_workorder';
        }
  

Index: list_activity.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/list_activity.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** list_activity.php   28 Aug 2002 16:43:11 -0000      1.1.1.1
--- list_activity.php   1 Sep 2002 19:43:49 -0000       1.2
***************
*** 17,21 ****
        $t->set_block('activities_list_t','activities_list','list');
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','activity');
  
        if ($GLOBALS['phpgw_info']['server']['db_type']=='pgsql')
--- 17,21 ----
        $t->set_block('activities_list_t','activities_list','list');
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','p_activity');
  
        if ($GLOBALS['phpgw_info']['server']['db_type']=='pgsql')

Index: list_agreement.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/list_agreement.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** list_agreement.php  28 Aug 2002 16:43:11 -0000      1.1.1.1
--- list_agreement.php  1 Sep 2002 19:43:49 -0000       1.2
***************
*** 17,21 ****
        $t->set_block('agreement_list_t','agreement_list','list');
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','activity');
  
        if ($GLOBALS['phpgw_info']['server']['db_type']=='pgsql')
--- 17,21 ----
        $t->set_block('agreement_list_t','agreement_list','list');
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','p_activity');
  
        if ($GLOBALS['phpgw_info']['server']['db_type']=='pgsql')

Index: list_apartment.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/list_apartment.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** list_apartment.php  28 Aug 2002 16:43:11 -0000      1.1.1.1
--- list_apartment.php  1 Sep 2002 19:43:49 -0000       1.2
***************
*** 21,25 ****
        $c = CreateObject('phpgwapi.categories');
        $c->app_name = 'property';
!       $GLOBALS['phpgw']->session->appsession('sub','property','property');
  
  
--- 21,25 ----
        $c = CreateObject('phpgwapi.categories');
        $c->app_name = 'property';
!       $GLOBALS['phpgw']->session->appsession('sub','property','p_property');
  
  

Index: list_building.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/list_building.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** list_building.php   28 Aug 2002 16:43:11 -0000      1.1.1.1
--- list_building.php   1 Sep 2002 19:43:49 -0000       1.2
***************
*** 22,26 ****
        $c->app_name = 'property';
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','property');
  
        if 
(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['currency']))
--- 22,26 ----
        $c->app_name = 'property';
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','p_property');
  
        if 
(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['currency']))

Index: list_drawing.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/list_drawing.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** list_drawing.php    28 Aug 2002 16:43:11 -0000      1.1.1.1
--- list_drawing.php    1 Sep 2002 19:43:49 -0000       1.2
***************
*** 22,26 ****
        $c->app_name = 'property';
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','property');
  
        if 
(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['currency']))
--- 22,26 ----
        $c->app_name = 'property';
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','p_property');
  
        if 
(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['currency']))

Index: list_entrance.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/list_entrance.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** list_entrance.php   28 Aug 2002 16:43:11 -0000      1.1.1.1
--- list_entrance.php   1 Sep 2002 19:43:49 -0000       1.2
***************
*** 19,23 ****
        $t->set_block('entrance_list_t','entrance_list','list');
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','property');
  
        $c = CreateObject('phpgwapi.categories');
--- 19,23 ----
        $t->set_block('entrance_list_t','entrance_list','list');
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','p_property');
  
        $c = CreateObject('phpgwapi.categories');

Index: list_equipment.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/list_equipment.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** list_equipment.php  28 Aug 2002 16:43:11 -0000      1.1.1.1
--- list_equipment.php  1 Sep 2002 19:43:49 -0000       1.2
***************
*** 17,21 ****
        $t->set_block('equipment_list_t','equipment_list','list');
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','equipment');
  
        if 
(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['currency']))
--- 17,21 ----
        $t->set_block('equipment_list_t','equipment_list','list');
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','p_equipment');
  
        if 
(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['currency']))

Index: list_equipment_type.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/list_equipment_type.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** list_equipment_type.php     28 Aug 2002 16:43:11 -0000      1.1.1.1
--- list_equipment_type.php     1 Sep 2002 19:43:49 -0000       1.2
***************
*** 19,23 ****
        $t->set_block('equipment_type_list_t','equipment_type_list','list');
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','equipment');
        if 
(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['currency']))
        {
--- 19,23 ----
        $t->set_block('equipment_type_list_t','equipment_type_list','list');
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','p_equipment');
        if 
(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['currency']))
        {

Index: list_equipment_type_attribute.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/list_equipment_type_attribute.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** list_equipment_type_attribute.php   28 Aug 2002 16:43:11 -0000      1.1.1.1
--- list_equipment_type_attribute.php   1 Sep 2002 19:43:49 -0000       1.2
***************
*** 19,23 ****
        
$t->set_block('equipment_type_attribute_list_t','equipment_type_attribute_list','list');
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','equipment');
  
        if 
(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['currency']))
--- 19,23 ----
        
$t->set_block('equipment_type_attribute_list_t','equipment_type_attribute_list','list');
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','p_equipment');
  
        if 
(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['currency']))

Index: list_gabnr.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/list_gabnr.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** list_gabnr.php      28 Aug 2002 16:43:11 -0000      1.1.1.1
--- list_gabnr.php      1 Sep 2002 19:43:49 -0000       1.2
***************
*** 19,23 ****
        $t->set_block('gabnr_list_t','gabnr_list','list');
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','property');
        if 
(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['currency']))
        {
--- 19,23 ----
        $t->set_block('gabnr_list_t','gabnr_list','list');
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','p_property');
        if 
(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['currency']))
        {

Index: list_power_meter.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/list_power_meter.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** list_power_meter.php        28 Aug 2002 16:43:12 -0000      1.1.1.1
--- list_power_meter.php        1 Sep 2002 19:43:49 -0000       1.2
***************
*** 17,21 ****
        $t->set_block('power_meter_list_t','power_meter_list','list');
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','invoice');
  
        if 
(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['currency']))
--- 17,21 ----
        $t->set_block('power_meter_list_t','power_meter_list','list');
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','p_invoice');
  
        if 
(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['currency']))

Index: list_ticket.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/list_ticket.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** list_ticket.php     28 Aug 2002 16:43:12 -0000      1.1.1.1
--- list_ticket.php     1 Sep 2002 19:43:49 -0000       1.2
***************
*** 55,59 ****
        $GLOBALS['phpgw']->template->set_var('hidden_vars', $hidden_vars);
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','ticket');
  
        if($query)
--- 55,59 ----
        $GLOBALS['phpgw']->template->set_var('hidden_vars', $hidden_vars);
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','p_ticket');
  
        if($query)

Index: list_vendors_activities.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/list_vendors_activities.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** list_vendors_activities.php 28 Aug 2002 16:43:13 -0000      1.1.1.1
--- list_vendors_activities.php 1 Sep 2002 19:43:49 -0000       1.2
***************
*** 18,22 ****
        
$t->set_var('vendor_url',$GLOBALS['phpgw']->link('/property/list_vendors_activities.php',"sort=$sort&order=$order&filter=$filter&start=$start&query=$query&cat_id=$cat_id&coordinator_id=$coordinator_id"));
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','activity');
  
        if ($GLOBALS['phpgw_info']['server']['db_type']=='pgsql')
--- 18,22 ----
        
$t->set_var('vendor_url',$GLOBALS['phpgw']->link('/property/list_vendors_activities.php',"sort=$sort&order=$order&filter=$filter&start=$start&query=$query&cat_id=$cat_id&coordinator_id=$coordinator_id"));
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','p_activity');
  
        if ($GLOBALS['phpgw_info']['server']['db_type']=='pgsql')

Index: list_workorder.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/list_workorder.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** list_workorder.php  28 Aug 2002 16:43:13 -0000      1.1.1.1
--- list_workorder.php  1 Sep 2002 19:43:49 -0000       1.2
***************
*** 22,26 ****
        $fm_wrkorder = CreateObject('property.fm_wrkorder');
        $grants = $GLOBALS['phpgw']->acl->get_grants('property');
!       $GLOBALS['phpgw']->session->appsession('sub','property','workorder');
  
        $t->set_var('lang_action',lang('Workorders list'));
--- 22,26 ----
        $fm_wrkorder = CreateObject('property.fm_wrkorder');
        $grants = $GLOBALS['phpgw']->acl->get_grants('property');
!       $GLOBALS['phpgw']->session->appsession('sub','property','p_workorder');
  
        $t->set_var('lang_action',lang('Workorders list'));
***************
*** 28,32 ****
        
$t->set_var('search_url',$GLOBALS['phpgw']->link('/property/list_workorder.php'));
        
$t->set_var('cat_url',$GLOBALS['phpgw']->link('/property/list_workorder.php',"sort=$sort&order=$order&filter=$filter&start=$start&query=$query&cat_id=$cat_id&coordinator_id=$coordinator_id"));
!       
$t->set_var('category_list',$GLOBALS['phpgw']->categories->formated_list('select','all',$cat_id,'True'));
        
$t->set_var('coordinator_list',$fm_wrkorder->select_coordinator_list($coordinator_id));
        $t->set_var('lang_all',lang('All'));
--- 28,36 ----
        
$t->set_var('search_url',$GLOBALS['phpgw']->link('/property/list_workorder.php'));
        
$t->set_var('cat_url',$GLOBALS['phpgw']->link('/property/list_workorder.php',"sort=$sort&order=$order&filter=$filter&start=$start&query=$query&cat_id=$cat_id&coordinator_id=$coordinator_id"));
! 
!       $c = CreateObject('phpgwapi.categories');
!       $c->app_name = 'p_workorder';
!       
$t->set_var('category_list',$c->formated_list('select','all',$cat_id,'True'));
! 
        
$t->set_var('coordinator_list',$fm_wrkorder->select_coordinator_list($coordinator_id));
        $t->set_var('lang_all',lang('All'));

Index: newticket.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/newticket.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** newticket.php       28 Aug 2002 16:43:13 -0000      1.1.1.1
--- newticket.php       1 Sep 2002 19:43:49 -0000       1.2
***************
*** 28,32 ****
        $GLOBALS['phpgw']->template->set_var('hidden_vars', $hidden_vars);
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','ticket');
  
        if ($cancel)
--- 28,32 ----
        $GLOBALS['phpgw']->template->set_var('hidden_vars', $hidden_vars);
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','p_ticket');
  
        if ($cancel)
***************
*** 253,257 ****
                $GLOBALS['phpgw']->template->set_var('value_group','<select 
name="ticket[group]">' . $s . '</select>');
  
!               $s = '<select name="ticket[category]">' . 
$GLOBALS['phpgw']->categories->formated_list('select','',$group,True) . 
'</select>';
                $GLOBALS['phpgw']->template->set_var('value_category',$s);
  
--- 253,260 ----
                $GLOBALS['phpgw']->template->set_var('value_group','<select 
name="ticket[group]">' . $s . '</select>');
  
!               $c = CreateObject('phpgwapi.categories');
!               $c->app_name = 'p_ticket';
! 
!               $s = '<select name="ticket[category]">' . 
$c->formated_list('select','',$group,'True') . '</select>';
                $GLOBALS['phpgw']->template->set_var('value_category',$s);
  

Index: viewticket_details.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/viewticket_details.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** viewticket_details.php      28 Aug 2002 16:43:14 -0000      1.1.1.1
--- viewticket_details.php      1 Sep 2002 19:43:49 -0000       1.2
***************
*** 25,29 ****
        include('../header.inc.php');
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','ticket');
  
        $GLOBALS['phpgw']->historylog = 
createobject('phpgwapi.historylog','property');
--- 25,29 ----
        include('../header.inc.php');
  
!       $GLOBALS['phpgw']->session->appsession('sub','property','p_ticket');
  
        $GLOBALS['phpgw']->historylog = 
createobject('phpgwapi.historylog','property');
***************
*** 223,227 ****
                }
  */
!               
$GLOBALS['phpgw']->template->set_var('options_category',$GLOBALS['phpgw']->categories->formated_list('select','',$ticket['category'],True));
  
                $ticket_status[$ticket['status']] = 'selected';
--- 223,229 ----
                }
  */
!               $c = CreateObject('phpgwapi.categories');
!               $c->app_name = 'p_ticket';
!               
$GLOBALS['phpgw']->template->set_var('options_category',$c->formated_list('select','',$ticket['category'],True));
  
                $ticket_status[$ticket['status']] = 'selected';

Index: workorder_admin.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/workorder_admin.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** workorder_admin.php 28 Aug 2002 16:43:15 -0000      1.1.1.1
--- workorder_admin.php 1 Sep 2002 19:43:49 -0000       1.2
***************
*** 25,43 ****
        
$t->set_var('actionurl',$GLOBALS['phpgw']->link('/property/workorder_admin.php'));
        $t->set_var('lang_done',lang('Done'));
        $t->set_var('doneurl',$GLOBALS['phpgw']->link('/admin/index.php'));
  
        if (!$sort) { $sort = "ASC";  }
!       if ($order) { $ordermethod = "order by $order $sort"; }
!       //else { $ordermethod = "order by account_lid asc "; }
  
!       $radio_read= '<input type="radio" name="choose_rights" 
value="can_read"' . $checked_read . '>';
!       $radio_add= '<input type="radio" name="choose_rights" value="can_add"' 
. $checked_add . '>';
!       $radio_edit= '<input type="radio" name="choose_rights" 
value="can_edit"' . $checked_edit . '>';
!       $radio_delete= '<input type="radio" name="choose_rights" 
value="can_delete"' . $checked_delete . '>';
! 
!       $t->set_var('radio_read',$radio_read);
!       $t->set_var('radio_add',$radio_add);
!       $t->set_var('radio_edit',$radio_edit);
!       $t->set_var('radio_delete',$radio_delete);
  
        $t->set_var('lang_select_update',lang('Select Right to Update'));
--- 25,92 ----
        
$t->set_var('actionurl',$GLOBALS['phpgw']->link('/property/workorder_admin.php'));
        $t->set_var('lang_done',lang('Done'));
+       $t->set_var('lang_roles',lang('Roles'));
        $t->set_var('doneurl',$GLOBALS['phpgw']->link('/admin/index.php'));
+       
$t->set_var('sub_module_url',$GLOBALS['phpgw']->link('/property/workorder_admin.php'));
+ 
+ 
+       $t->set_var('lang_select_sub_module',lang('Select sub-module'));
  
        if (!$sort) { $sort = "ASC";  }
!       if ($order) { $ordermethod = " order by $order $sort"; }
!       //else { $ordermethod = " order by account_lid asc "; }
! 
! 
!       $rights_list = '<option value="can_read">' . lang('Read') . '</option>' 
. "\n"
!                       . '<option value="can_add">' . lang('Add') . 
'</option>' . "\n"
!                       . '<option value="can_edit">' . lang('Edit') . 
'</option>' . "\n"
!                       . '<option value="can_delete">' . lang('Delete') . 
'</option>' . "\n";
! 
! 
!       if ($sub_module=='invoice')
!       {
!               $rights_list .='<option value="janitor">' . lang('Janitor') . 
'</option>' . "\n"
!                       . '<option value="supervisor">' . lang('Supervisor') . 
'</option>' . "\n"
!                       . '<option value="budget_responsible">' . lang('Budget 
Responsible') . '</option>' . "\n"
!                       . '<option value="transfer">' . lang('Transfer') . 
'</option>' . "\n";
!       }
! 
!       $t->set_var('rights_list',$rights_list);
! 
!       $hidden_vars = '<input type="hidden" name="sub_module" value="' . 
$sub_module . '">' . "\n";
! 
!       $t->set_var('hidden_vars',$hidden_vars);
! 
! 
!       if ($sub_module=='property'):
!               $sub_module_sel[0]=' selected';
! 
!       elseif ($sub_module=='workorder'):
!               $sub_module_sel[1]=' selected';
! 
!       elseif ($sub_module=='equipment'):
!               $sub_module_sel[2]=' selected';
! 
!       elseif ($sub_module=='fm_tts'):
!               $sub_module_sel[3]=' selected';
! 
!       elseif ($sub_module=='activitiy'):
!               $sub_module_sel[4]=' selected';
! 
!       elseif ($sub_module=='invoice'):
!               $sub_module_sel[5]=' selected';
! 
!       endif;
  
! 
!       $sub_module_list = '<option value="property"' . $sub_module_sel[0] . 
'>' . lang('Property') . '</option>' . "\n"
!                       . '<option value="workorder"' . $sub_module_sel[1] . 
'>' . lang('Workorder') . '</option>' . "\n"
!                       . '<option value="equipment"' . $sub_module_sel[2] . 
'>' . lang('Equipment') . '</option>' . "\n"
!                       . '<option value="fm_tts"' . $sub_module_sel[3] . '>' . 
lang('fm_tts') . '</option>' . "\n"
!                       . '<option value="activitiy"' . $sub_module_sel[4] . 
'>' . lang('Activitiy') . '</option>' . "\n"
!                       . '<option value="invoice"' . $sub_module_sel[5] . '>' 
. lang('Invoice') . '</option>' . "\n";
! 
!       $t->set_var('sub_module_list',$sub_module_list);
! 
!       $filter='&sub_module='.$sub_module;
  
        $t->set_var('lang_select_update',lang('Select Right to Update'));
***************
*** 46,49 ****
--- 95,101 ----
        $t->set_var('lang_edit',lang('Edit'));
        $t->set_var('lang_delete',lang('Delete'));
+       $t->set_var('lang_rights',lang('Rights'));
+ 
+ 
  
        if ($GLOBALS['phpgw_info']['server']['db_type']=='pgsql')
***************
*** 68,100 ****
        if ($query)
        {
!               $querymethod = " AND account_lid like '%$query%' OR 
account_lastname like '%$query%' OR account_firstname like '%$query%'";
        }
  
        $db2 = $GLOBALS['phpgw']->db;
  
!       $sql = "SELECT 
acl_account,account_lid,account_firstname,account_lastname, account_type, 
can_read,can_add,can_edit,can_delete from phpgw_acl "
!               . " $join phpgw_accounts on 
phpgw_acl.acl_account=phpgw_accounts.account_id left join fm_wo_admin on 
fm_wo_admin.account_id=phpgw_acl.acl_account WHERE acl_appname='property' and 
sub_module='workorder' $querymethod $ordermethod";
  
!       $db2->query($sql,__LINE__,__FILE__);
!       $total_records = $db2->num_rows();
  
!       $GLOBALS['phpgw']->db->limit_query($sql . 
$ordermethod,$start,__LINE__,__FILE__);
!       while ($GLOBALS['phpgw']->db->next_record())
!       {
!               $admins[] = array('id' => 
$GLOBALS['phpgw']->db->f('acl_account'),
                                                'lid' => 
$GLOBALS['phpgw']->db->f('account_lid'),
!                                       'firstname' => 
$GLOBALS['phpgw']->db->f('account_firstname'),
!                                       'lastname' => 
$GLOBALS['phpgw']->db->f('account_lastname'),
!                                       'read' => 
$GLOBALS['phpgw']->db->f('can_read'),
!                                       'add' => 
$GLOBALS['phpgw']->db->f('can_add'),
!                                       'edit' => 
$GLOBALS['phpgw']->db->f('can_edit'),
!                                       'delete' => 
$GLOBALS['phpgw']->db->f('can_delete'),
                                                'account_type' => 
$GLOBALS['phpgw']->db->f('account_type'));
        }
- 
  //--------------------------------- nextmatch 
--------------------------------------------
  
!       $left = 
$GLOBALS['phpgw']->nextmatchs->left('/property/workorder_admin.php',$start,$total_records);
!       $right = 
$GLOBALS['phpgw']->nextmatchs->right('/property/workorder_admin.php',$start,$total_records);
        $t->set_var('left',$left);
        $t->set_var('right',$right);
--- 120,158 ----
        if ($query)
        {
!               $querymethod = " AND (account_lid like '%$query%' OR 
account_lastname like '%$query%' OR account_firstname like '%$query%')";
        }
  
        $db2 = $GLOBALS['phpgw']->db;
  
!       if ($sub_module)
!       {
!               $sql = "SELECT 
janitor,supervisor,budget_responsible,transfer,fm_admin.account_id,account_lid,account_firstname,account_lastname,
 account_type, can_read,can_add,can_edit,can_delete from fm_admin "
!                       . " $join phpgw_accounts on 
fm_admin.account_id=phpgw_accounts.account_id  WHERE sub_module='$sub_module' 
$querymethod ";
  
!               $db2->query($sql,__LINE__,__FILE__);
!               $total_records = $db2->num_rows();
  
!               $GLOBALS['phpgw']->db->limit_query($sql . 
$ordermethod,$start,__LINE__,__FILE__);
!               while ($GLOBALS['phpgw']->db->next_record())
!               {
!                       $admins[] = array('id' => 
$GLOBALS['phpgw']->db->f('account_id'),
                                                'lid' => 
$GLOBALS['phpgw']->db->f('account_lid'),
!                                               'firstname' => 
$GLOBALS['phpgw']->db->f('account_firstname'),
!                                               'lastname' => 
$GLOBALS['phpgw']->db->f('account_lastname'),
!                                               'read' => 
$GLOBALS['phpgw']->db->f('can_read'),
!                                               'add' => 
$GLOBALS['phpgw']->db->f('can_add'),
!                                               'edit' => 
$GLOBALS['phpgw']->db->f('can_edit'),
!                                               'delete' => 
$GLOBALS['phpgw']->db->f('can_delete'),
!                                               'janitor' => 
$GLOBALS['phpgw']->db->f('janitor'),
!                                               'supervisor' => 
$GLOBALS['phpgw']->db->f('supervisor'),
!                                               'budget_responsible' => 
$GLOBALS['phpgw']->db->f('budget_responsible'),
!                                               'transfer' => 
$GLOBALS['phpgw']->db->f('transfer'),
                                                'account_type' => 
$GLOBALS['phpgw']->db->f('account_type'));
+               }
        }
  //--------------------------------- nextmatch 
--------------------------------------------
  
!       $left = 
$GLOBALS['phpgw']->nextmatchs->left('/property/workorder_admin.php',$start,$total_records,"&sub_module=$sub_module");
!       $right = 
$GLOBALS['phpgw']->nextmatchs->right('/property/workorder_admin.php',$start,$total_records,"&sub_module=$sub_module");
        $t->set_var('left',$left);
        $t->set_var('right',$right);
***************
*** 129,133 ****
                if ($admins[$i]['read'])
                {
!                       $rights .= lang(read) .', ';
                }
  
--- 187,191 ----
                if ($admins[$i]['read'])
                {
!                       $rights .= lang('read') .', ';
                }
  
***************
*** 139,143 ****
                if ($admins[$i]['edit'])
                {
!                       $rights .=lang(edit) .', ';
                }
  
--- 197,201 ----
                if ($admins[$i]['edit'])
                {
!                       $rights .=lang('edit') .', ';
                }
  
***************
*** 147,150 ****
--- 205,226 ----
                }
  
+               $roles = '&nbsp;';
+               if ($admins[$i]['janitor'])
+               {
+                       $roles .= lang('Janitor') .', ';
+               }
+               if ($admins[$i]['supervisor'])
+               {
+                       $roles .=lang('Supervisor') .', ';
+               }
+               if ($admins[$i]['budget_responsible'])
+               {
+                       $roles .=lang('Budget Responsible') .', ';
+               }
+               if ($admins[$i]['transfer'])
+               {
+                       $roles .=lang(Transfer) .', ';
+               }
+ 
                if ($admins[$i]['account_type']=='u')
                {
***************
*** 162,165 ****
--- 238,242 ----
                $t->set_var(array('lid' => $lid,
                                        'rights' => $rights,
+                                       'roles' => $roles,
                                        'firstname' => $firstname,
                                        'lastname' => $lastname));

Index: workorder_archive.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/workorder_archive.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** workorder_archive.php       28 Aug 2002 16:43:15 -0000      1.1.1.1
--- workorder_archive.php       1 Sep 2002 19:43:49 -0000       1.2
***************
*** 37,41 ****
        
$t->set_var('cat_url',$GLOBALS['phpgw']->link('/property/workorder_archive.php',"sort=$sort&order=$order&filter=$filter&start=$start&query=$query&cat_id=$cat_id&coordinator_id=$coordinator_id"));
        $t->set_var('hidden_vars',$hidden_vars);
!       
$t->set_var('category_list',$GLOBALS['phpgw']->categories->formated_list('select','all',$cat_id,'True'));
        
$t->set_var('coordinator_list',$fm_wrkorder->select_coordinator_list($coordinator_id));
        $t->set_var('lang_all',lang('All'));
--- 37,43 ----
        
$t->set_var('cat_url',$GLOBALS['phpgw']->link('/property/workorder_archive.php',"sort=$sort&order=$order&filter=$filter&start=$start&query=$query&cat_id=$cat_id&coordinator_id=$coordinator_id"));
        $t->set_var('hidden_vars',$hidden_vars);
!       $c = CreateObject('phpgwapi.categories');
!       $c->app_name = 'p_workorder';
!       
$t->set_var('category_list',$c->formated_list('select','all',$cat_id,'True'));
        
$t->set_var('coordinator_list',$fm_wrkorder->select_coordinator_list($coordinator_id));
        $t->set_var('lang_all',lang('All'));





reply via email to

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