phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: property list_request.php,1.2,1.3 add_request.ph


From: Sigurd Nes <address@hidden>
Subject: [Phpgroupware-cvs] CVS: property list_request.php,1.2,1.3 add_request.php,1.1.1.1,1.2 add_request_attribute.php,1.1.1.1,1.2 delete_request.php,1.1.1.1,1.2 edit_request.php,1.1.1.1,1.2 list_wrkorder_request.php,1.1.1.1,1.2
Date: Fri, 06 Sep 2002 16:33:38 -0400

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

Modified Files:
        list_request.php add_request.php add_request_attribute.php 
        delete_request.php edit_request.php list_wrkorder_request.php 
Log Message:
no message

Index: list_request.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/list_request.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** list_request.php    1 Sep 2002 22:50:13 -0000       1.2
--- list_request.php    6 Sep 2002 20:33:35 -0000       1.3
***************
*** 62,66 ****
        else
        {
!               $ordermethod = " order by request_id asc";
        }
  
--- 62,66 ----
        else
        {
!               $ordermethod = " order by id asc";
        }
  
***************
*** 78,82 ****
        if ($query)
        {
!               $querymethod = " where (descr like '%$query%' or request_id 
like '%$query%' or type_descr like '%$query%' or objekt_id like '%$query%')";
        }
  
--- 78,82 ----
        if ($query)
        {
!               $querymethod = " where (descr like '%$query%' or id like 
'%$query%' or type_descr like '%$query%' or objekt_id like '%$query%')";
        }
  
***************
*** 108,112 ****
        $db2 = $GLOBALS['phpgw']->db;
  
!       $sql = "select 
request_id,descr,type_descr,objekt_id,bygg_id,fm_request.request_type_id,status,date,account_lid"
                . " FROM fm_request "
                . " $join  phpgw_accounts ON fm_request.owner = 
phpgw_accounts.account_id "
--- 108,112 ----
        $db2 = $GLOBALS['phpgw']->db;
  
!       $sql = "select 
id,descr,type_descr,objekt_id,bygg_id,fm_request.request_type_id,status,date,account_lid"
                . " FROM fm_request "
                . " $join  phpgw_accounts ON fm_request.owner = 
phpgw_accounts.account_id "
***************
*** 153,157 ****
        $t->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
        $t->set_var('currency',$currency);
!       
$t->set_var('sort_request_id',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'request_id',$order,'/property/list_request.php',lang('request
 ID')));
        
$t->set_var('sort_descr',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'descr',$order,'/property/list_request.php',lang('Description')));
        
$t->set_var('sort_type_descr',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'type_descr',$order,'/property/list_request.php',lang('Type
 description')));
--- 153,157 ----
        $t->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
        $t->set_var('currency',$currency);
!       
$t->set_var('sort_request_id',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'id',$order,'/property/list_request.php',lang('request
 ID')));
        
$t->set_var('sort_descr',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'descr',$order,'/property/list_request.php',lang('Description')));
        
$t->set_var('sort_type_descr',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'type_descr',$order,'/property/list_request.php',lang('Type
 description')));
***************
*** 172,176 ****
        {
                $tr_color = 
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
!               $request_id = 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('request_id'));
                if (! $request_id)  $request_id  = '&nbsp;';
  
--- 172,176 ----
        {
                $tr_color = 
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
!               $request_id = 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('id'));
                if (! $request_id)  $request_id  = '&nbsp;';
  
***************
*** 227,233 ****
  
  
!               
$t->set_var('edit',$GLOBALS['phpgw']->link('/property/edit_request.php','request_id='
 . $GLOBALS['phpgw']->db->f('request_id') . "&request_type_edit=" . 
$request_type_edit . 
"&sort=$sort&order=$order&query=$query&start=$start&filter=$filter"));
                
$t->set_var('attribute',$GLOBALS['phpgw']->link('/property/add_request_attribute.php','request_type_id='
 . $GLOBALS['phpgw']->db->f('request_type_id') . "&request_id=" . $request_id . 
"&sort=$sort&order=$order&query=$query&start=$start&filter=$filter"));
!               
$t->set_var('delete',$GLOBALS['phpgw']->link('/property/delete_request.php','request_id='
 . $GLOBALS['phpgw']->db->f('request_id') . 
"&sort=$sort&order=$order&query=$query&start=$start&filter=$filter"));
  
                $t->parse('list','request_list',True);
--- 227,233 ----
  
  
!               
$t->set_var('edit',$GLOBALS['phpgw']->link('/property/edit_request.php','request_id='
 . $GLOBALS['phpgw']->db->f('id') . "&request_type_edit=" . $request_type_edit 
. "&sort=$sort&order=$order&query=$query&start=$start&filter=$filter"));
                
$t->set_var('attribute',$GLOBALS['phpgw']->link('/property/add_request_attribute.php','request_type_id='
 . $GLOBALS['phpgw']->db->f('request_type_id') . "&request_id=" . $request_id . 
"&sort=$sort&order=$order&query=$query&start=$start&filter=$filter"));
!               
$t->set_var('delete',$GLOBALS['phpgw']->link('/property/delete_request.php','request_id='
 . $GLOBALS['phpgw']->db->f('id') . 
"&sort=$sort&order=$order&query=$query&start=$start&filter=$filter"));
  
                $t->parse('list','request_list',True);

Index: add_request.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/add_request.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** add_request.php     28 Aug 2002 16:43:05 -0000      1.1.1.1
--- add_request.php     6 Sep 2002 20:33:35 -0000       1.2
***************
*** 20,39 ****
        if ($submit)
      {
!               if ($choose)
                {
!                       $request_id = create_requestid($year);
                }
!               else
                {
!                       $request_id = addslashes($request_id);
                }
  
!               $errorcount = 0;
!               if (!$request_id)
                {
!                       $error[$errorcount++] = lang('Please enter an ID for 
that request !');
                }
  
!               $GLOBALS['phpgw']->db->query("select count(*) from fm_request 
where request_id='$request_id'");
                $GLOBALS['phpgw']->db->next_record();
                if ($GLOBALS['phpgw']->db->f(0) != 0)
--- 20,44 ----
        if ($submit)
      {
! 
!               $id=next_id(fm_request);
! 
!               $errorcount = 0;
! 
!               if ($already_submitted)
                {
!                       $error[$errorcount++] = lang('Hmmm... duplicate ?');
                }
! 
!               if (!$cost)
                {
!                       $error[$errorcount++] = lang('Please enter a stipulated 
cost !');
                }
  
!               if ($authorities_demands)
                {
!                       $authorities_demands=1;
                }
  
!               $GLOBALS['phpgw']->db->query("select count(*) from fm_request 
where id='$id'");
                $GLOBALS['phpgw']->db->next_record();
                if ($GLOBALS['phpgw']->db->f(0) != 0)
***************
*** 58,74 ****
                if (! $error)
                {
!                       $location_code=$objekt_id . $bygg_id . $seksjons_id . 
$leie_id;
                        $descr = addslashes($descr);
!                       $GLOBALS['phpgw']->db->query("insert into fm_request 
(request_id,owner,request_type_id,descr,location_code,objekt_id,"
!                               . 
"property_name,bygg_id,building_name,seksjons_id,etasje,leie_id,street,tenant_id,tenant_name,contact_phone,date,cost,status)
 "
!                               . "values 
('$request_id','$owner','$request_type_id','$descr','$location_code','$objekt_id','$property_name',"
                                . 
"'$bygg_id','$building_name','$seksjons_id','$etasje','$leie_id','$street',"
!                               . 
"'$tenant_id','$tenant_name','$contact_phone','$sdate','$cost','$status')");
                        $GLOBALS['phpgw']->db->query("update boei_leietaker set 
contact_phone='$contact_phone' where leietaker_id='$tenant_id'");
  
                }
        }
        if ($errorcount) { 
$t->set_var('message',$GLOBALS['phpgw']->common->error_list($error)); }
!       if (($submit) && (! $error) && (! $errorcount)) { 
$t->set_var('message',lang('request x has been added !',$num)); }
        if ((! $submit) && (! $error) && (! $errorcount)) { 
$t->set_var('message',''); }
  
--- 63,106 ----
                if (! $error)
                {
! 
!                       $location_code=$objekt_id;
! 
!                       if($bygg_id)
!                       {
!                               $location_code.= "-".$bygg_id;
!                       }
!                       if($seksjons_id)
!                       {
!                               $location_code.= "-".$seksjons_id;
!                       }
!                       if($leie_id)
!                       {
!                               $location_code.= "-".$leie_id;
!                       }
! 
! 
                        $descr = addslashes($descr);
!                       $GLOBALS['phpgw']->db->query("insert into fm_request 
(id,owner,request_type_id,descr,location_code,objekt_id,"
!                               . 
"property_name,bygg_id,building_name,seksjons_id,etasje,leie_id,street,tenant_id,tenant_name,contact_phone,date,cost,status,"
!                               . 
"d_safety,d_aesthetics,d_indoor_climate,d_consequential_damage,d_user_gratification,d_residential_environment,"
!                               . 
"c_safety,c_aesthetics,c_indoor_climate,c_consequential_damage,c_user_gratification,c_residential_environment,"
!                               . 
"p_safety,p_aesthetics,p_indoor_climate,p_consequential_damage,p_user_gratification,p_residential_environment,authorities_demands)
 "
!                               . "values 
('$id','$owner','$request_type_id','$descr','$location_code','$objekt_id','$property_name',"
                                . 
"'$bygg_id','$building_name','$seksjons_id','$etasje','$leie_id','$street',"
!                               . 
"'$tenant_id','$tenant_name','$contact_phone','$sdate','$cost','$status',"
!                               . " 
'$d_safety','$d_aesthetics','$d_indoor_climate','$d_consequential_damage','$d_user_gratification','$d_residential_environment',"
!                               . " 
'$c_safety','$c_aesthetics','$c_indoor_climate','$c_consequential_damage','$c_user_gratification','$c_residential_environment',"
!                               . " 
'$p_safety','$p_aesthetics','$p_indoor_climate','$p_consequential_damage','$p_user_gratification','$p_residential_environment','$authorities_demands')");
! 
                        $GLOBALS['phpgw']->db->query("update boei_leietaker set 
contact_phone='$contact_phone' where leietaker_id='$tenant_id'");
  
+                       $already_submitted=1;
+                       $t->set_var('already_submitted','<input type="hidden" 
name="already_submitted" value="' .$already_submitted .'">');
                }
+                       $t->set_var('already_submitted','');
+ 
        }
        if ($errorcount) { 
$t->set_var('message',$GLOBALS['phpgw']->common->error_list($error)); }
!       if (($submit) && (! $error) && (! $errorcount)) { 
$t->set_var('message',lang('request x has been added !',$id)); }
        if ((! $submit) && (! $error) && (! $errorcount)) { 
$t->set_var('message',''); }
  
***************
*** 91,96 ****
  
        $t->set_var('hidden_vars',$hidden_vars);
!       $t->set_var('lang_request_id',lang('request ID'));
!       $t->set_var('request_id',$request_id);
  
  
--- 123,128 ----
  
        $t->set_var('hidden_vars',$hidden_vars);
!       $t->set_var('lang_request_id','');
!       $t->set_var('request_id',$id);
  
  
***************
*** 111,127 ****
        //----------------------- end request_type
  
! 
! 
!       if (!$submit)
        {
!               $t->set_var('lang_choose',lang('Generate request ID ?'));
!               $t->set_var('choose','<input type="checkbox" name="choose" 
value="True" checked>');
!       }
!       else
!       {
!               $t->set_var('lang_choose','');
!               $t->set_var('choose','');
        }
  
        $t->set_var('lang_descr',lang('Description'));
        $t->set_var('descr',$descr);
--- 143,155 ----
        //----------------------- end request_type
  
!       if (!$submit || !$already_submitted)
        {
!               $t->set_var('already_submitted','');
        }
  
+       $t->set_var('lang_choose','');
+       $t->set_var('choose','');
+ 
+       $t->set_var('request_id_display','');
        $t->set_var('lang_descr',lang('Description'));
        $t->set_var('descr',$descr);
***************
*** 173,202 ****
  // -------------- Status ----------------------
  
!       
$t->set_var('status_list',$fm_wrkorder->select_request_status_list($request_id));
  
  // ---------------  status -------------------
  
        $t->set_var('lang_status',lang('Status'));
- /*            if ($status == 'request'):
-       $stat_sel[0]=' selected';
-       elseif ($status == 'requirement'):
-       $stat_sel[1]=' selected';
-       elseif ($status == 'rejected'):
-       $stat_sel[2]=' selected';
-       elseif ($status == 'ordered'):
-       $stat_sel[3]=' selected';
-       endif;
- 
- 
-       $status_list = '<option value="request"' . $stat_sel[0] . '>' . 
lang('Request') . '</option>' . "\n"
-               . '<option value="requirement"' . $stat_sel[1] . '>' . 
lang('Requirement') . '</option>' . "\n"
-               . '<option value="rejected"' . $stat_sel[2] . '>' . 
lang('Rejected') . '</option>' . "\n"
-               . '<option value="ordered"' . $stat_sel[3] . '>' . 
lang('Ordered') . '</option>' . "\n";
  
-       $t->set_var('status_list',$status_list);
- */
  // --------------- end status-------------------
  
  
  
  
--- 201,262 ----
  // -------------- Status ----------------------
  
!       
$t->set_var('status_list',$fm_wrkorder->select_request_status_list($id));
  
  // ---------------  status -------------------
  
        $t->set_var('lang_status',lang('Status'));
  
  // --------------- end status-------------------
  
+ // ---------------  degree -------------------
+ 
+       $t->set_var('lang_importance',lang('Importance'));
+       $t->set_var('lang_condition',lang('Condition Degree'));
+ 
+       $t->set_var('lang_worsening_probability',lang('Worsening Probability'));
+ 
+       $t->set_var('lang_consequence',lang('Consequence'));
+ 
+       
$t->set_var('degree_list_safety',select_degree_list($d_safety,'default_safety'));
+       
$t->set_var('degree_list_aesthetics',select_degree_list($d_aesthetics,'default_aesthetics'));
+       
$t->set_var('degree_list_indoor_climate',select_degree_list($d_indoor_climate,'default_climate'));
+       
$t->set_var('degree_list_consequential_damage',select_degree_list($d_consequential_damage,'default_consequential_damage'));
+       
$t->set_var('degree_list_user_gratification',select_degree_list($d_user_gratification,'default_gratification'));
+       
$t->set_var('degree_list_residential_environment',select_degree_list($d_residential_environment,'default_environment'));
+ 
+ 
+       
$t->set_var('probability_list_safety',select_probability_list($p_safety));
+       
$t->set_var('probability_list_aesthetics',select_probability_list($p_aesthetics));
+       
$t->set_var('probability_list_indoor_climate',select_probability_list($p_indoor_climate));
+       
$t->set_var('probability_list_consequential_damage',select_probability_list($p_consequential_damage));
+       
$t->set_var('probability_list_user_gratification',select_probability_list($p_user_gratification));
+       
$t->set_var('probability_list_residential_environment',select_probability_list($p_residential_environment));
+ 
+       
$t->set_var('consequence_list_safety',select_consequence_list($c_safety));
+       
$t->set_var('consequence_list_aesthetics',select_consequence_list($c_aesthetics));
+       
$t->set_var('consequence_list_indoor_climate',select_consequence_list($c_indoor_climate));
+       
$t->set_var('consequence_list_consequential_damage',select_consequence_list($c_consequential_damage));
+       
$t->set_var('consequence_list_user_gratification',select_consequence_list($c_user_gratification));
+       
$t->set_var('consequence_list_residential_environment',select_consequence_list($c_residential_environment));
+ 
+ 
+       if($authorities_demands)
+       {
+               $authorities_demands_check='checked';
+       }
+ 
+       $t->set_var('authorities_demands','<input type="checkbox" 
name="authorities_demands" ' .$authorities_demands_check .'>');
+ 
+       $t->set_var('lang_degree_safety',lang('Safety'));
+       $t->set_var('lang_degree_aesthetics',lang('Aesthetics'));
+       $t->set_var('lang_degree_indoor_climate',lang('Indoor climate'));
+       $t->set_var('lang_degree_consequential_damage',lang('Consequential 
damage'));
+       $t->set_var('lang_degree_user_gratification',lang('User 
gratification'));
+       $t->set_var('lang_degree_residential_environment',lang('Residential 
environment'));
+       $t->set_var('lang_degree_authorities_demands',lang('Authorities 
Demands'));
+ 
+ 
  
+ // --------------- end degree -------------------
  
  
***************
*** 228,234 ****
        $t->set_var('lang_make_fm_wrkorder',$lang_make_fm_wrkorder);
  
!       if ($request_id)
        {
!               
$t->set_var('details',$GLOBALS['phpgw']->link('/property/add_request_attribute.php','request_type_id='
 . $request_type_id . "&request_id=" . $request_id));
                $t->set_var('lang_details',lang('Details'));
                $make_wrkorder ='<input type="button" value="' . 
$lang_make_fm_wrkorder . '" onClick="make_wrkorder();">';
--- 288,294 ----
        $t->set_var('lang_make_fm_wrkorder',$lang_make_fm_wrkorder);
  
!       if ($id)
        {
!               
$t->set_var('details',$GLOBALS['phpgw']->link('/property/add_request_attribute.php','request_type_id='
 . $request_type_id . "&request_id=" . $id));
                $t->set_var('lang_details',lang('Details'));
                $make_wrkorder ='<input type="button" value="' . 
$lang_make_fm_wrkorder . '" onClick="make_wrkorder();">';

Index: add_request_attribute.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/add_request_attribute.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** add_request_attribute.php   28 Aug 2002 16:43:05 -0000      1.1.1.1
--- add_request_attribute.php   6 Sep 2002 20:33:35 -0000       1.2
***************
*** 276,280 ****
  
  //------From fm-request---------
!       $GLOBALS['phpgw']->db->query("SELECT * FROM fm_request WHERE request_id 
 ='$request_id' ");
        $GLOBALS['phpgw']->db->next_record();
  
--- 276,280 ----
  
  //------From fm-request---------
!       $GLOBALS['phpgw']->db->query("SELECT * FROM fm_request WHERE id  
='$request_id' ");
        $GLOBALS['phpgw']->db->next_record();
  

Index: delete_request.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/delete_request.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** delete_request.php  28 Aug 2002 16:43:08 -0000      1.1.1.1
--- delete_request.php  6 Sep 2002 20:33:35 -0000       1.2
***************
*** 26,30 ****
        {
                $GLOBALS['phpgw']->db->query("delete from fm_request_attrib 
where request_id='$request_id'");
!               $GLOBALS['phpgw']->db->query("delete from fm_request where 
request_id='$request_id'");
  
                Header('Location: ' . 
$GLOBALS['phpgw']->link('/property/list_request.php','sort=' . $sort . 
'&order=' . $order . '&query=' . $query . '&start=' . $start
--- 26,30 ----
        {
                $GLOBALS['phpgw']->db->query("delete from fm_request_attrib 
where request_id='$request_id'");
!               $GLOBALS['phpgw']->db->query("delete from fm_request where 
id='$request_id'");
  
                Header('Location: ' . 
$GLOBALS['phpgw']->link('/property/list_request.php','sort=' . $sort . 
'&order=' . $order . '&query=' . $query . '&start=' . $start

Index: edit_request.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/edit_request.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** edit_request.php    28 Aug 2002 16:43:09 -0000      1.1.1.1
--- edit_request.php    6 Sep 2002 20:33:35 -0000       1.2
***************
*** 25,28 ****
--- 25,29 ----
                . '<input type="hidden" name="filter" value="' . $filter . '">' 
. "\n";
  
+       $t->set_var('hidden_vars',$hidden_vars);
  
        if 
(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['currency']))
***************
*** 36,40 ****
        }
  
- 
        if ($GLOBALS['phpgw_info']['server']['db_type']=='pgsql')
        {
--- 37,40 ----
***************
*** 46,70 ****
        }
  
- 
- 
- 
        if ( $submit)
        {
-               if ($choose)
-               {
-                       $request_id = create_requestid($year);
-               }
-               else
-               {
-                       $request_id = addslashes($request_id);
-               }
  
                $errorcount = 0;
!               if (!$request_id)
                {
!                       $error[$errorcount++] = lang('Please enter an ID for 
that request !');
                }
  
- 
                if (checkdate($smonth,$sday,$syear))
                {
--- 46,59 ----
        }
  
        if ( $submit)
        {
  
                $errorcount = 0;
! 
!               if ($authorities_demands)
                {
!                       $authorities_demands=1;
                }
  
                if (checkdate($smonth,$sday,$syear))
                {
***************
*** 82,91 ****
                {
  
!                       $location_code=$objekt_id . '-' . $bygg_id . '-' . 
$seksjons_id . '-' . $leie_id;
                        $descr = addslashes($descr);
                        $GLOBALS['phpgw']->db->query("update  fm_request set 
request_type_id='$request_type_id',descr='$descr',location_code='$location_code',objekt_id='$objekt_id',"
!                               . 
"property_name='$property_name',bygg_id='$bygg_id',building_name='$building_name',seksjons_id='$seksjons_id',"
!                               . 
"etasje='$etasje',leie_id='$leie_id',street='$street',tenant_id='$tenant_id',tenant_name='$tenant_name',contact_phone='$contact_phone',cost='$cost',status='$status'
 "
!                               . "where request_id='$request_id'");
  
                        $GLOBALS['phpgw']->db->query("update boei_leietaker set 
contact_phone='$contact_phone' where leietaker_id='$tenant_id'");
--- 71,97 ----
                {
  
!                       $location_code=$objekt_id;
! 
!                       if($bygg_id)
!                       {
!                               $location_code.= "-".$bygg_id;
!                       }
!                       if($seksjons_id)
!                       {
!                               $location_code.= "-".$seksjons_id;
!                       }
!                       if($leie_id)
!                       {
!                               $location_code.= "-".$leie_id;
!                       }
! 
                        $descr = addslashes($descr);
                        $GLOBALS['phpgw']->db->query("update  fm_request set 
request_type_id='$request_type_id',descr='$descr',location_code='$location_code',objekt_id='$objekt_id',"
!                               . " 
property_name='$property_name',bygg_id='$bygg_id',building_name='$building_name',seksjons_id='$seksjons_id',"
!                               . " 
etasje='$etasje',leie_id='$leie_id',street='$street',tenant_id='$tenant_id',tenant_name='$tenant_name',contact_phone='$contact_phone',cost='$cost',status='$status',
 "
!                               . " 
d_safety='$d_safety',d_aesthetics='$d_aesthetics',d_indoor_climate='$d_indoor_climate',d_consequential_damage='$d_consequential_damage',d_user_gratification='$d_user_gratification',d_residential_environment='$d_residential_environment',
 "
!                               . " 
c_safety='$c_safety',c_aesthetics='$c_aesthetics',c_indoor_climate='$c_indoor_climate',c_consequential_damage='$c_consequential_damage',c_user_gratification='$c_user_gratification',c_residential_environment='$c_residential_environment',
 "
!                               . " 
p_safety='$p_safety',p_aesthetics='$p_aesthetics',p_indoor_climate='$p_indoor_climate',p_consequential_damage='$p_consequential_damage',p_user_gratification='$p_user_gratification',p_residential_environment='$p_residential_environment',authorities_demands='$authorities_demands'
 "
!                               . " where id='$request_id'");
  
                        $GLOBALS['phpgw']->db->query("update boei_leietaker set 
contact_phone='$contact_phone' where leietaker_id='$tenant_id'");
***************
*** 113,164 ****
  
        $t->set_var('lang_action',lang('Add request'));
- 
-       $t->set_var('hidden_vars',$hidden_vars);
        $t->set_var('lang_request_id',lang('request ID'));
-       $t->set_var('request_id',$request_id);
- 
  
  
  
  
        $t->set_var('lang_choose','');
        $t->set_var('choose','');
  
  
!       $GLOBALS['phpgw']->db->query("SELECT 
objekt_id,property_name,bygg_id,building_name,seksjons_id,etasje,leie_id,street,"
!               . " request_type_id, descr,cost, tenant_id 
,tenant_name,contact_phone, e.status as status, e.date as date from fm_request 
as e where request_id='$request_id'");
        $GLOBALS['phpgw']->db->next_record();
  
  
  
  
-       $t->set_var('lang_property',lang('Property'));
-       $objekt_id = $GLOBALS['phpgw']->db->f("objekt_id");
        $t->set_var('objekt_id',$objekt_id);
-       $property_name = $GLOBALS['phpgw']->db->f("property_name");
        $t->set_var('property_name',$property_name);
-       $bygg_id = $GLOBALS['phpgw']->db->f("bygg_id");
        $t->set_var('bygg_id',$bygg_id);
-       $building_name = $GLOBALS['phpgw']->db->f("building_name");
        $t->set_var('building_name',$building_name);
-       $seksjons_id = $GLOBALS['phpgw']->db->f("seksjons_id");
        $t->set_var('seksjons_id',$seksjons_id);
-       $etasje = $GLOBALS['phpgw']->db->f("etasje");
        $t->set_var('etasje',$etasje);
-       $leie_id = $GLOBALS['phpgw']->db->f("leie_id");
        $t->set_var('leie_id',$leie_id);
-       $street = $GLOBALS['phpgw']->db->f("street");
        $t->set_var('street',$street);
-       $tenant_name = $GLOBALS['phpgw']->db->f("tenant_name");
        $t->set_var('tenant_name',$tenant_name);
-       $contact_phone = $GLOBALS['phpgw']->db->f("contact_phone");
        $t->set_var('contact_phone',$contact_phone);
-       $tenant_id = $GLOBALS['phpgw']->db->f("tenant_id");
        $t->set_var('tenant_id',$tenant_id);
-       $descr = $GLOBALS['phpgw']->db->f("descr");
        $t->set_var('descr',$descr);
-       $cost = $GLOBALS['phpgw']->db->f("cost");
        $t->set_var('cost',$cost);
  
        $t->set_var('currency',$currency);
  
--- 119,202 ----
  
        $t->set_var('lang_action',lang('Add request'));
        $t->set_var('lang_request_id',lang('request ID'));
  
+       $t->set_var('request_id','<input type="hidden" name="request_id" 
value="' .$request_id .'">');
  
+       $t->set_var('request_id_display',$request_id);
  
+       $t->set_var('already_submitted','');
  
        $t->set_var('lang_choose','');
        $t->set_var('choose','');
  
+       if(!$submit)
+       {
+       /*      $GLOBALS['phpgw']->db->query("SELECT 
objekt_id,property_name,bygg_id,building_name,seksjons_id,etasje,leie_id,street,"
+               . " request_type_id, descr,cost, tenant_id 
,tenant_name,contact_phone, e.status as status, e.date as date,"
+               . " 
safety,aesthetics,indoor_climate,consequential_damage,user_gratification,residential_environment,authorities_demands
 "
+               . " from fm_request as e where id='$request_id'");
+       */
  
!       $GLOBALS['phpgw']->db->query("SELECT * from fm_request where 
id='$request_id'");
        $GLOBALS['phpgw']->db->next_record();
  
  
+               $objekt_id = $GLOBALS['phpgw']->db->f("objekt_id");
+               $property_name = $GLOBALS['phpgw']->db->f("property_name");
+               $bygg_id = $GLOBALS['phpgw']->db->f("bygg_id");
+               $building_name = $GLOBALS['phpgw']->db->f("building_name");
+               $seksjons_id = $GLOBALS['phpgw']->db->f("seksjons_id");
+               $etasje = $GLOBALS['phpgw']->db->f("etasje");
+               $leie_id = $GLOBALS['phpgw']->db->f("leie_id");
+               $street = $GLOBALS['phpgw']->db->f("street");
+               $tenant_id = $GLOBALS['phpgw']->db->f("tenant_id");
+               $tenant_name = $GLOBALS['phpgw']->db->f("tenant_name");
+               $contact_phone = $GLOBALS['phpgw']->db->f("contact_phone");
+               $descr = $GLOBALS['phpgw']->db->f("descr");
+               $cost = $GLOBALS['phpgw']->db->f("cost");
+               $d_safety = $GLOBALS['phpgw']->db->f("d_safety");
+               $d_aesthetics = $GLOBALS['phpgw']->db->f("d_aesthetics");
+               $d_indoor_climate = 
$GLOBALS['phpgw']->db->f("d_indoor_climate");
+               $d_consequential_damage = 
$GLOBALS['phpgw']->db->f("d_consequential_damage");
+               $d_user_gratification = 
$GLOBALS['phpgw']->db->f("d_user_gratification");
+               $d_residential_environment = 
$GLOBALS['phpgw']->db->f("d_residential_environment");
+               $p_safety = $GLOBALS['phpgw']->db->f("p_safety");
+               $p_aesthetics = $GLOBALS['phpgw']->db->f("p_aesthetics");
+               $p_indoor_climate = 
$GLOBALS['phpgw']->db->f("p_indoor_climate");
+               $p_consequential_damage = 
$GLOBALS['phpgw']->db->f("p_consequential_damage");
+               $p_user_gratification = 
$GLOBALS['phpgw']->db->f("p_user_gratification");
+               $p_residential_environment = 
$GLOBALS['phpgw']->db->f("p_residential_environment");
+               $c_safety = $GLOBALS['phpgw']->db->f("c_safety");
+               $c_aesthetics = $GLOBALS['phpgw']->db->f("c_aesthetics");
+               $c_indoor_climate = 
$GLOBALS['phpgw']->db->f("c_indoor_climate");
+               $c_consequential_damage = 
$GLOBALS['phpgw']->db->f("c_consequential_damage");
+               $c_user_gratification = 
$GLOBALS['phpgw']->db->f("c_user_gratification");
+               $c_residential_environment = 
$GLOBALS['phpgw']->db->f("c_residential_environment");
+               $authorities_demands = 
$GLOBALS['phpgw']->db->f("authorities_demands");
+       }
  
  
        $t->set_var('objekt_id',$objekt_id);
        $t->set_var('property_name',$property_name);
        $t->set_var('bygg_id',$bygg_id);
        $t->set_var('building_name',$building_name);
        $t->set_var('seksjons_id',$seksjons_id);
        $t->set_var('etasje',$etasje);
        $t->set_var('leie_id',$leie_id);
        $t->set_var('street',$street);
        $t->set_var('tenant_name',$tenant_name);
        $t->set_var('contact_phone',$contact_phone);
        $t->set_var('tenant_id',$tenant_id);
        $t->set_var('descr',$descr);
        $t->set_var('cost',$cost);
+       $t->set_var('safety',$safety);
+       $t->set_var('aesthetics',$aesthetics);
+       $t->set_var('indoor_climate',$indoor_climate);
+       $t->set_var('consequential_damage',$consequential_damage);
+       $t->set_var('user_gratification',$user_gratification);
+       $t->set_var('residential_environment',$residential_environment);
+       $t->set_var('authorities_demands',$authorities_demands);
  
+       $t->set_var('lang_property',lang('Property'));
        $t->set_var('currency',$currency);
  
***************
*** 206,210 ****
  
  //----------------------- start date
!       $GLOBALS['phpgw']->db->query("select date from fm_request where 
request_id='$request_id'");
        $GLOBALS['phpgw']->db->next_record();
  
--- 244,248 ----
  
  //----------------------- start date
!       $GLOBALS['phpgw']->db->query("select date from fm_request where 
id='$request_id'");
        $GLOBALS['phpgw']->db->next_record();
  
***************
*** 231,235 ****
  //----------------------- request_type
  
!       $GLOBALS['phpgw']->db->query("select request_type_id from fm_request 
where request_id='$request_id'");
        $GLOBALS['phpgw']->db->next_record();
  
--- 269,273 ----
  //----------------------- request_type
  
!       $GLOBALS['phpgw']->db->query("select request_type_id from fm_request 
where id='$request_id'");
        $GLOBALS['phpgw']->db->next_record();
  
***************
*** 258,261 ****
--- 296,346 ----
  
  //----------------------- end status
+ // ---------------  degree -------------------
+ 
+       $t->set_var('lang_importance',lang('Importance'));
+       $t->set_var('lang_condition',lang('Condition Degree'));
+ 
+       $t->set_var('lang_worsening_probability',lang('Worsening Probability'));
+ 
+       
$t->set_var('degree_list_safety',select_degree_list($d_safety,'default_safety'));
+       
$t->set_var('degree_list_aesthetics',select_degree_list($d_aesthetics,'default_aesthetics'));
+       
$t->set_var('degree_list_indoor_climate',select_degree_list($d_indoor_climate,'default_climate'));
+       
$t->set_var('degree_list_consequential_damage',select_degree_list($d_consequential_damage,'default_consequential_damage'));
+       
$t->set_var('degree_list_user_gratification',select_degree_list($d_user_gratification,'default_gratification'));
+       
$t->set_var('degree_list_residential_environment',select_degree_list($d_residential_environment,'default_environment'));
+ 
+ 
+       
$t->set_var('probability_list_safety',select_probability_list($p_safety));
+       
$t->set_var('probability_list_aesthetics',select_probability_list($p_aesthetics));
+       
$t->set_var('probability_list_indoor_climate',select_probability_list($p_indoor_climate));
+       
$t->set_var('probability_list_consequential_damage',select_probability_list($p_consequential_damage));
+       
$t->set_var('probability_list_user_gratification',select_probability_list($p_user_gratification));
+       
$t->set_var('probability_list_residential_environment',select_probability_list($p_residential_environment));
+ 
+       
$t->set_var('consequence_list_safety',select_consequence_list($c_safety));
+       
$t->set_var('consequence_list_aesthetics',select_consequence_list($c_aesthetics));
+       
$t->set_var('consequence_list_indoor_climate',select_consequence_list($c_indoor_climate));
+       
$t->set_var('consequence_list_consequential_damage',select_consequence_list($c_consequential_damage));
+       
$t->set_var('consequence_list_user_gratification',select_consequence_list($c_user_gratification));
+       
$t->set_var('consequence_list_residential_environment',select_consequence_list($c_residential_environment));
+ 
+       if($authorities_demands)
+       {
+               $authorities_demands_check='checked';
+       }
+ 
+       $t->set_var('authorities_demands','<input type="checkbox" 
name="authorities_demands" ' .$authorities_demands_check .'>');
+ 
+       $t->set_var('lang_degree_safety',lang('Safety'));
+       $t->set_var('lang_degree_aesthetics',lang('Aesthetics'));
+       $t->set_var('lang_degree_indoor_climate',lang('Indoor climate'));
+       $t->set_var('lang_degree_consequential_damage',lang('Consequential 
damage'));
+       $t->set_var('lang_degree_user_gratification',lang('User 
gratification'));
+       $t->set_var('lang_degree_residential_environment',lang('Residential 
environment'));
+       $t->set_var('lang_degree_authorities_demands',lang('Authorities 
Demands'));
+ 
+ // --------------- end degree -------------------
+ 
+ 
        $lang_make_fm_wrkorder=lang('Make fm_wrkorder');
        $t->set_var('lang_make_fm_wrkorder',$lang_make_fm_wrkorder);

Index: list_wrkorder_request.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/list_wrkorder_request.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** list_wrkorder_request.php   28 Aug 2002 16:43:13 -0000      1.1.1.1
--- list_wrkorder_request.php   6 Sep 2002 20:33:35 -0000       1.2
***************
*** 53,57 ****
                                $n=$entry[0];
  
!                                       $GLOBALS['phpgw']->db->query("update  
fm_request set status='$status' where request_id='$request_id_h[$n]' ");
  
                        }
--- 53,57 ----
                                $n=$entry[0];
  
!                                       $GLOBALS['phpgw']->db->query("update  
fm_request set status='$status' where id='$request_id_h[$n]' ");
  
                        }
***************
*** 80,84 ****
        else
        {
!               $ordermethod = " order by request_id asc";
        }
  
--- 80,84 ----
        else
        {
!               $ordermethod = " order by id asc";
        }
  
***************
*** 96,100 ****
        if ($query)
        {
!               $querymethod = " where (descr like '%$query%' or request_id 
like '%$query%' or type_descr like '%$query%' or objekt_id like '%$query%')";
        }
  
--- 96,100 ----
        if ($query)
        {
!               $querymethod = " where (descr like '%$query%' or id like 
'%$query%' or type_descr like '%$query%' or objekt_id like '%$query%')";
        }
  
***************
*** 167,171 ****
        $t->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
        $t->set_var('currency',$currency);
!       
$t->set_var('sort_request_id',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'request_id',$order,'/property/list_wrkorder_request.php',lang('request
 ID')));
        
$t->set_var('sort_descr',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'descr',$order,'/property/list_wrkorder_request.php',lang('Description')));
        
$t->set_var('sort_type_descr',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'type_descr',$order,'/property/list_wrkorder_request.php',lang('Type
 description')));
--- 167,171 ----
        $t->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
        $t->set_var('currency',$currency);
!       
$t->set_var('sort_request_id',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'id',$order,'/property/list_wrkorder_request.php',lang('request
 ID')));
        
$t->set_var('sort_descr',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'descr',$order,'/property/list_wrkorder_request.php',lang('Description')));
        
$t->set_var('sort_type_descr',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'type_descr',$order,'/property/list_wrkorder_request.php',lang('Type
 description')));
***************
*** 196,200 ****
                $select = '<input type="checkbox" name="select[' . $j . ']" 
value="'. $j . '">';
                $tr_color = 
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
!               $request_id = 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('request_id'));
                if (! $request_id)  $request_id  = '&nbsp;';
  
--- 196,200 ----
                $select = '<input type="checkbox" name="select[' . $j . ']" 
value="'. $j . '">';
                $tr_color = 
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
!               $request_id = 
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('id'));
                if (! $request_id)  $request_id  = '&nbsp;';
  





reply via email to

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