phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: property add_documentation.php,1.1.2.1,1.1.2.2 d


From: Sigurd Nes <address@hidden>
Subject: [Phpgroupware-cvs] CVS: property add_documentation.php,1.1.2.1,1.1.2.2 documentation_detail.php,1.1.2.1,1.1.2.2 edit_documentation.php,1.1.2.2,1.1.2.3 list_documentation.php,1.1.2.1,1.1.2.2 add_equipment_attribute.php,1.2,1.2.2.1 add_property_attribute.php,1.1.1.1,1.1.1.1.2.1
Date: Wed, 20 Nov 2002 13:39:33 -0500

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

Modified Files:
      Tag: Version-0_9_14-branch
        add_documentation.php documentation_detail.php 
        edit_documentation.php list_documentation.php 
        add_equipment_attribute.php add_property_attribute.php 
Log Message:
no message

Index: add_documentation.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/add_documentation.php,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -r1.1.2.1 -r1.1.2.2
*** add_documentation.php       18 Nov 2002 19:12:38 -0000      1.1.2.1
--- add_documentation.php       20 Nov 2002 18:39:29 -0000      1.1.2.2
***************
*** 130,134 ****
                        }
                }
! 
                if (! $error)
                {
--- 130,139 ----
                        }
                }
! /*
!               if (!$cat_id)
!               {
!                       $error[$errorcount++] = lang('Please choose a Type!');
!               }
! */
                if (! $error)
                {
***************
*** 227,233 ****
        $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_documentation';
!       
$t->set_var('category_list',$c->formated_list('select','all',$cat_id,'True'));
  
  //    $t->set_var('lang_popup_calendar',lang('Popup Calendar'));
--- 232,253 ----
        $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_documentation';
! //    
$t->set_var('category_list',$c->formated_list('select','all',$cat_id,'True'));
! 
!       //----------------------- equipment_type
!       $GLOBALS['phpgw']->db->query("SELECT id,name, type_descr FROM 
fm_equipment_type order by name asc");
!               while ($GLOBALS['phpgw']->db->next_record())
!               {
!                       $equipment_type_list .= '<option value="' . 
$GLOBALS['phpgw']->db->f('id') . '"';
!                               if ($GLOBALS['phpgw']->db->f('id') == $cat_id)
!                               $equipment_type_list .= ' selected';
!                               $equipment_type_list  .= '>'
!                               . 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('name')). '</option>';
! 
!               }
! 
!               $t->set_var('equipment_type_list',$equipment_type_list);
!       //----------------------- end equipment_type
  
  //    $t->set_var('lang_popup_calendar',lang('Popup Calendar'));

Index: documentation_detail.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/documentation_detail.php,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -r1.1.2.1 -r1.1.2.2
*** documentation_detail.php    18 Nov 2002 19:12:38 -0000      1.1.2.1
--- documentation_detail.php    20 Nov 2002 18:39:29 -0000      1.1.2.2
***************
*** 22,25 ****
--- 22,30 ----
        $c->app_name = 'p_documentation';
  
+       if(!$referer)
+       {
+               $referer = $GLOBALS['HTTP_SERVER_VARS']['HTTP_REFERER'] ? 
$GLOBALS['HTTP_SERVER_VARS']['HTTP_REFERER'] : $GLOBALS['HTTP_REFERER'];
+       }
+ 
        $config = CreateObject('phpgwapi.config','property');
        $config->read_repository();
***************
*** 59,63 ****
        
$t->set_var('search_action',$GLOBALS['phpgw']->link('/property/documentation_detail.php','equipment_id='.$equipment_id.'&location_code='.$location_code));
        
$t->set_var('action_url',$GLOBALS['phpgw']->link('/property/add_documentation.php'));
!       
$t->set_var('done_url',$GLOBALS['phpgw']->link('/property/list_documentation.php'));
        $t->set_var('lang_category',lang('Category'));
        $t->set_var('lang_all',lang('All'));
--- 64,69 ----
        
$t->set_var('search_action',$GLOBALS['phpgw']->link('/property/documentation_detail.php','equipment_id='.$equipment_id.'&location_code='.$location_code));
        
$t->set_var('action_url',$GLOBALS['phpgw']->link('/property/add_documentation.php'));
!       $t->set_var('done_url',$referer);
! //    
$t->set_var('done_url',$GLOBALS['phpgw']->link('/property/list_documentation.php'));
        $t->set_var('lang_category',lang('Category'));
        $t->set_var('lang_all',lang('All'));
***************
*** 95,104 ****
  
  
!       if ($location_code)
        {
                $filtermethod = " where location_code = '$location_code'";
        }
  
!       if ($equipment_id)
        {
                $filtermethod =  " where equipment_id = '$equipment_id'";
--- 101,113 ----
  
  
!       if ($location_code && !$equipment_id)
        {
                $filtermethod = " where location_code = '$location_code'";
        }
  
! //echo 'location_code :' .$location_code;
! //echo 'equipment_id :' .$equipment_id;
! 
!       if ($equipment_id && !$location_code)
        {
                $filtermethod =  " where equipment_id = '$equipment_id'";

Index: edit_documentation.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/edit_documentation.php,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -r1.1.2.2 -r1.1.2.3
*** edit_documentation.php      18 Nov 2002 19:12:38 -0000      1.1.2.2
--- edit_documentation.php      20 Nov 2002 18:39:29 -0000      1.1.2.3
***************
*** 140,143 ****
--- 140,149 ----
                }
  
+ /*            if (!$cat_id)
+               {
+                       $error[$errorcount++] = lang('Please choose a Type!');
+               }
+ 
+ */
                if (! $error)
                {
***************
*** 247,253 ****
        $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_documentation';
!       
$t->set_var('category_list',$c->formated_list('select','all',$cat_id,'True'));
  
  //    $t->set_var('lang_popup_calendar',lang('Popup Calendar'));
--- 253,275 ----
        $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_documentation';
! //    
$t->set_var('category_list',$c->formated_list('select','all',$cat_id,'True'));
! 
!       //----------------------- equipment_type
!       $GLOBALS['phpgw']->db->query("SELECT id,name, type_descr FROM 
fm_equipment_type order by name asc");
!               while ($GLOBALS['phpgw']->db->next_record())
!               {
!                       $equipment_type_list .= '<option value="' . 
$GLOBALS['phpgw']->db->f('id') . '"';
!                               if ($GLOBALS['phpgw']->db->f('id') == $cat_id)
!                               $equipment_type_list .= ' selected';
!                               $equipment_type_list  .= '>'
!                               . 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('name')). '</option>';
! 
!               }
! 
!               $t->set_var('equipment_type_list',$equipment_type_list);
!       //----------------------- end equipment_type
! 
  
  //    $t->set_var('lang_popup_calendar',lang('Popup Calendar'));

Index: list_documentation.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/list_documentation.php,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -r1.1.2.1 -r1.1.2.2
*** list_documentation.php      18 Nov 2002 19:12:38 -0000      1.1.2.1
--- list_documentation.php      20 Nov 2002 18:39:29 -0000      1.1.2.2
***************
*** 19,25 ****
        $t->set_block('documentation_list_t','documentation_list','list');
  
!       $c = CreateObject('phpgwapi.categories');
!       $c->app_name = 'p_documentation';
!       
$t->set_var('cats_list',$c->formated_list('select','all',$cat_id,'True'));
  
        $config = CreateObject('phpgwapi.config','property');
--- 19,25 ----
        $t->set_block('documentation_list_t','documentation_list','list');
  
! //    $c = CreateObject('phpgwapi.categories');
! //    $c->app_name = 'p_documentation';
! //    
$t->set_var('cats_list',$c->formated_list('select','all',$cat_id,'True'));
  
        $config = CreateObject('phpgwapi.config','property');
***************
*** 47,51 ****
        
$t->set_var('search_action',$GLOBALS['phpgw']->link('/property/list_documentation.php','cat_id='.$cat_id));
        $t->set_var('lang_category',lang('Category'));
!       $t->set_var('lang_all',lang('All'));
  
        
$t->set_var('add_url',$GLOBALS['phpgw']->link('/property/add_documentation.php'));
--- 47,51 ----
        
$t->set_var('search_action',$GLOBALS['phpgw']->link('/property/list_documentation.php','cat_id='.$cat_id));
        $t->set_var('lang_category',lang('Category'));
!       $t->set_var('lang_property',lang('Property'));
  
        
$t->set_var('add_url',$GLOBALS['phpgw']->link('/property/add_documentation.php'));
***************
*** 53,56 ****
--- 53,73 ----
        $t->set_var('hidden_vars',$hidden_vars);
  
+ 
+       //----------------------- equipment_type
+       $GLOBALS['phpgw']->db->query("SELECT id,name, type_descr FROM 
fm_equipment_type order by name asc");
+               while ($GLOBALS['phpgw']->db->next_record())
+               {
+                       $equipment_type_list .= '<option value="' . 
$GLOBALS['phpgw']->db->f('id') . '"';
+                               if ($GLOBALS['phpgw']->db->f('id') == $cat_id)
+                               $equipment_type_list .= ' selected';
+                               $equipment_type_list  .= '>'
+                               . 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('name')) . '</option>';
+ 
+               }
+ 
+               $t->set_var('equipment_type_list',$equipment_type_list);
+       //----------------------- end equipment_type
+ 
+ 
        if (! $start)
        {
***************
*** 64,68 ****
        else
        {
!               $ordermethod = " order by objekt_id asc";
        }
  
--- 81,85 ----
        else
        {
!               $ordermethod = " order by fm_documentation.objekt_id asc";
        }
  
***************
*** 87,91 ****
        endif;
  
-       $groupmethod= " group by 
location_code,objekt_id,bygg_id,seksjons_id,etasje_id,leie_id,equipment_id ";
  
        if (!$location_code)
--- 104,107 ----
***************
*** 94,121 ****
        { $location= ("$where location_code like " . "'%$location_code%'");}
  
! 
!       if ($query)
        {
!               $querymethod = " where (location_code LIKE '%$query%' or 
equipment_id LIKE '%$query%')";
!               $where_1='and';
        }
        else
        {
!               $querymethod = '';
!               $where_1='where';
        }
  
!       if (! $cat_id)
        {
!               $filtermethod  = '';
        }
        else
        {
!               $filtermethod = " $where_1 cat_id = $cat_id";
!       }
  
!       $db2 = $GLOBALS['phpgw']->db;
! 
!       $sql = "SELECT 
location_code,objekt_id,bygg_id,seksjons_id,etasje_id,leie_id,equipment_id from 
fm_documentation $querymethod $filtermethod $groupmethod";
  
        $db2->query($sql,__LINE__,__FILE__);
--- 110,170 ----
        { $location= ("$where location_code like " . "'%$location_code%'");}
  
!       if ($cat_id)
        {
!               $groupmethod= " group by 
fm_equipment_type.name,fm_documentation.location_code,fm_documentation.objekt_id,fm_documentation.bygg_id,fm_documentation.seksjons_id,fm_documentation.etasje_id,fm_documentation.leie_id,fm_documentation.equipment_id
 ";
! 
!               if ($query)
!               {
!                       $querymethod = " where (location_code LIKE '%$query%' 
or equipment_id LIKE '%$query%')";
!                       $where_1='and';
!               }
!               else
!               {
!                       $querymethod = '';
!                       $where_1='and';
!               }
! 
!               if (! $cat_id)
!               {
!                       $filtermethod  = '';
!               }
!               else
!               {
!                       $filtermethod = " $where_1 
fm_equipment.equipment_type_id = $cat_id";
!               }
! 
        }
        else
        {
!               $groupmethod= " group by 
fm_documentation.location_code,fm_documentation.objekt_id,fm_documentation.bygg_id,fm_documentation.seksjons_id,fm_documentation.etasje_id,fm_documentation.leie_id
 ";
! 
!               if ($query)
!               {
!                       $querymethod = " where (location_code LIKE '%$query%')";
!                       $where_1='and';
!               }
!               else
!               {
!                       $querymethod = '';
!                       $where_1='and';
!               }
! 
!               $filtermethod  = '';
! 
        }
  
!       $db2 = $GLOBALS['phpgw']->db;
! 
!       if ($cat_id)
        {
!               $sql = "SELECT 
fm_documentation.location_code,fm_documentation.objekt_id,fm_documentation.bygg_id,fm_documentation.seksjons_id,fm_documentation.etasje_id,fm_documentation.leie_id,fm_documentation.equipment_id,fm_equipment_type.name
 as type from fm_documentation, "
!               . " fm_equipment $join fm_equipment_type on 
fm_equipment.equipment_type_id=fm_equipment_type.id  where  
fm_documentation.equipment_id = fm_equipment.equipment_id $querymethod 
$filtermethod $groupmethod";
        }
        else
        {
!               $sql = "SELECT 
fm_documentation.location_code,fm_documentation.objekt_id,fm_documentation.bygg_id,fm_documentation.seksjons_id,fm_documentation.etasje_id,fm_documentation.leie_id
 from fm_documentation "
!               . "  $querymethod $filtermethod $groupmethod";
  
!       }
  
        $db2->query($sql,__LINE__,__FILE__);
***************
*** 142,151 ****
  
        $t->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
!       
$t->set_var('sort_property',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'objekt_id',$order,'/property/list_documentation.php',lang('Property')));
!       
$t->set_var('sort_building',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'bygg_id',$order,'/property/list_documentation.php',lang('Building')));
!       
$t->set_var('sort_entrance',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'seksjons_id',$order,'/property/list_documentation.php',lang('Entrance')));
!       
$t->set_var('sort_documentation',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'tegningsfil',$order,'/property/list_documentation.php',lang('Tegningsfil')));
!       
$t->set_var('sort_equipment',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'equipment_id',$order,'/property/list_documentation.php',lang('Equipment')));
!       
$t->set_var('sort_floor',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'etasje_id',$order,'/property/list_documentation.php',lang('Floor')));
        $t->set_var('lang_street_number',lang('Street number'));
        $t->set_var('lang_select',lang('Select'));
--- 191,200 ----
  
        $t->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
!       
$t->set_var('sort_type',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'fm_equipment_type.name',$order,'/property/list_documentation.php',lang('Type')));
!       
$t->set_var('sort_property',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'fm_documentation.objekt_id',$order,'/property/list_documentation.php',lang('Property')));
!       
$t->set_var('sort_building',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'fm_documentation.bygg_id',$order,'/property/list_documentation.php',lang('Building')));
!       
$t->set_var('sort_entrance',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'fm_documentation.seksjons_id',$order,'/property/list_documentation.php',lang('Entrance')));
!       
$t->set_var('sort_equipment',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'fm_documentation.equipment_id',$order,'/property/list_documentation.php',lang('Equipment')));
!       
$t->set_var('sort_floor',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'fm_documentation.etasje_id',$order,'/property/list_documentation.php',lang('Floor')));
        $t->set_var('lang_street_number',lang('Street number'));
        $t->set_var('lang_select',lang('Select'));
***************
*** 154,161 ****
        $t->set_var('lang_equipment',lang('Equipment'));
        $t->set_var('lang_details',lang('Details'));
! 
!       $property_table= boei_leieobjekt;
!       $t->set_var('property_table',$property_table);
! 
  
  // ------------------------- end header declaration 
--------------------------------
--- 203,207 ----
        $t->set_var('lang_equipment',lang('Equipment'));
        $t->set_var('lang_details',lang('Details'));
!       $t->set_var('lang_apartment',lang('Apartment'));
  
  // ------------------------- end header declaration 
--------------------------------
***************
*** 167,170 ****
--- 213,219 ----
                $t->set_var('tr_color',$tr_color);
  
+               $type = $GLOBALS['phpgw']->db->f('type');
+               if (! $type)  $type  = '&nbsp;';
+ 
                $objekt_id = 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('objekt_id'));
                if (! $objekt_id)  $objekt_id  = '&nbsp;';
***************
*** 179,186 ****
                if (! $etasje)  $etasje  = '&nbsp;';
                $equipment_id = 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('equipment_id'));
!               if (! $equipment_id)  $equipment_id  = '&nbsp;';
  
!               $drawing = 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('tegningsfil')) . ".dwg";
!               if (! $tegningsfil)  $tegningsfil  = '&nbsp;';
  
                $property_type_id = 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('property_type_id'));
--- 228,235 ----
                if (! $etasje)  $etasje  = '&nbsp;';
                $equipment_id = 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('equipment_id'));
!               if (! $equipment_id)  $equipment_id  = '';
  
!               $leie_id = $GLOBALS['phpgw']->db->f('leie_id');
!               if (! $leie_id)  $leie_id  = '&nbsp;';
  
                $property_type_id = 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('property_type_id'));
***************
*** 193,201 ****
  // ---------------- template declaration for list records 
--------------------------
  
!               $t->set_var(array(              'objekt_id'     => $objekt_id,
                                                'bygg_id'       => $bygg_id,
                                                'seksjons_id'   => $seksjons_id,
                                                'etasje'        => $etasje,
!                                               'details'       => $details,
                                                'equipment_id'  => $equipment_id
                                                ));
--- 242,252 ----
  // ---------------- template declaration for list records 
--------------------------
  
!               $t->set_var(array(
!                                               'type'  => $type,
!                                               'objekt_id'     => $objekt_id,
                                                'bygg_id'       => $bygg_id,
                                                'seksjons_id'   => $seksjons_id,
                                                'etasje'        => $etasje,
!                                               'leie_id'       => $leie_id,
                                                'equipment_id'  => $equipment_id
                                                ));

Index: add_equipment_attribute.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/add_equipment_attribute.php,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -r1.2 -r1.2.2.1
*** add_equipment_attribute.php 3 Sep 2002 22:15:38 -0000       1.2
--- add_equipment_attribute.php 20 Nov 2002 18:39:29 -0000      1.2.2.1
***************
*** 137,140 ****
--- 137,141 ----
        $t->set_var('lang_floor',lang('floor'));
        $t->set_var('lang_street',lang('street'));
+       $t->set_var('lang_extra_info',lang('Extra Info'));
        $t->set_var('property',$property);
        $t->set_var('entrance',$entrance);
***************
*** 147,150 ****
--- 148,152 ----
        $GLOBALS['phpgw']->db->next_record();
  
+       $location_code  = $GLOBALS['phpgw']->db->f('location_code');
        $objekt_id  = 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('objekt_id'));
        $t->set_var('objekt_id',$objekt_id);
***************
*** 180,183 ****
--- 182,186 ----
        $t->set_var('equipment_id',$equipment_id);
  
+       
$t->set_var('extra_info',$GLOBALS['phpgw']->link('/property/documentation_detail.php','equipment_id='
 . $equipment_id . "&location_code=" . $location_code . 
"&cat_id=$equipment_type_id&order=$order&query=$query&start=$start&filter=$filter"));
  
  
***************
*** 286,293 ****
                                        'value'                 => $value));
  
  
!               
$t->set_var('edit',$GLOBALS['phpgw']->link('/property/edit_equipment_type_attribute.php','attrib_id='
 . $attrib_id . "&equipment_type_id=" . $equipment_type_id . 
"&sort=$sort&order=$order&query=$query&start=$start&filter=$filter"));
! 
!               $t->set_var('lang_edit',lang('Edit'));
  
                $t->parse('list','equipment_attribute_list',True);
--- 289,295 ----
                                        'value'                 => $value));
  
+ //            
$t->set_var('edit',$GLOBALS['phpgw']->link('/property/edit_equipment_type_attribute.php','attrib_id='
 . $attrib_id . "&equipment_type_id=" . $equipment_type_id . 
"&sort=$sort&order=$order&query=$query&start=$start&filter=$filter"));
  
! //            $t->set_var('lang_edit',lang('Edit'));
  
                $t->parse('list','equipment_attribute_list',True);

Index: add_property_attribute.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/add_property_attribute.php,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.2.1
diff -C2 -r1.1.1.1 -r1.1.1.1.2.1
*** add_property_attribute.php  28 Aug 2002 16:43:05 -0000      1.1.1.1
--- add_property_attribute.php  20 Nov 2002 18:39:29 -0000      1.1.1.1.2.1
***************
*** 146,149 ****
--- 146,150 ----
        $t->set_var('property',$property);
        $t->set_var('entrance',$entrance);
+       $t->set_var('lang_extra_info',lang('Extra Info'));
        $t->set_var('lang_localization',lang('Localization'));
  
***************
*** 188,191 ****
--- 189,193 ----
        $t->set_var('location_code',$location_code);
  
+       
$t->set_var('extra_info',$GLOBALS['phpgw']->link('/property/documentation_detail.php','&location_code='
 . $location_code . 
"&property_table=$property_table&query=$query&start=$start&filter=$filter"));
  
  





reply via email to

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