[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property/inc/class.sogab.inc.php, 1.3
From: |
nomail |
Subject: |
[Phpgroupware-cvs] property/inc/class.sogab.inc.php, 1.3 |
Date: |
Fri, 8 Oct 2004 15:43:44 +0200 |
Update of /property/inc
Modified Files:
Branch:
class.sogab.inc.php
date: 2004/10/08 13:43:44; author: sigurdne; state: Exp; lines: +28 -7
Log Message:
no message
=====================================================================
Index: property/inc/class.sogab.inc.php
diff -u property/inc/class.sogab.inc.php:1.2
property/inc/class.sogab.inc.php:1.3
--- property/inc/class.sogab.inc.php:1.2 Wed Jun 2 18:54:28 2004
+++ property/inc/class.sogab.inc.php Fri Oct 8 13:43:44 2004
@@ -107,7 +107,7 @@
$where = 'AND';
}
- $sql = "SELECT gab_id,count(gab_id) as hits, loc1_name
as address FROM fm_gab_location $this->join fm_location1 on
fm_gab_location.loc1=fm_location1.loc1 $filtermethod GROUP BY gab_id,loc1_name
";
+ $sql = "SELECT gab_id,count(gab_id) as hits, loc1_name
as address, fm_gab_location.owner as owner FROM fm_gab_location $this->join
fm_location1 on fm_gab_location.loc1=fm_location1.loc1 $filtermethod GROUP BY
gab_id,loc1_name,owner ";
$this->db2->query($sql,__LINE__,__FILE__);
$this->total_records = $this->db2->num_rows();
@@ -128,7 +128,8 @@
'gab_id' =>
$this->db->f('gab_id'),
'location_code' =>
$this->db->f('location_code'),
'address' =>
$this->db->f('address'),
- 'hits' =>
$this->db->f('hits')
+ 'hits' =>
$this->db->f('hits'),
+ 'owner' =>
$this->db->f('owner')
);
}
return $gab_list;
@@ -156,10 +157,13 @@
$entity_table = 'fm_gab_location';
- $cols .= $entity_table . '.location_code';
+ $cols .= $entity_table . '.location_code,';
+ $cols .= $entity_table . '.owner';
+
$cols_return[] = 'location_code';
$cols .= ',gab_id';
$cols_return[] = 'gab_id';
+ $cols_return[] = 'owner';
$sql =
$this->bocommon->generate_sql(array('entity_table'=>$entity_table,'cols'=>$cols,'cols_return'=>$cols_return,
@@ -238,6 +242,7 @@
{
$gab['location_code'] =
$location_code;
$gab['remark'] =
$this->db->f('remark');
+ $gab['owner'] =
$this->db->f('owner');
}
//_debug_array($gab);
@@ -273,6 +278,12 @@
$gab['remark'] =
$this->db->db_addslashes($gab['remark']);
+ if(!$gab['owner'])
+ {
+ $gab['owner']='no';
+ }
+
+
$gab_id= $gab['kommune_nr'] .
sprintf("%05s",$gab['gaards_nr']) . sprintf("%04s",$gab['bruks_nr']) .
sprintf("%04s",$gab['feste_nr']) . sprintf("%03s",$gab['seksjons_nr']);
if($gab['propagate'] && ($next_type <
($this->gab_insert_level+1)))
@@ -289,14 +300,16 @@
$gab_insert[] =
array('location_code' => $this->db->f('location_code'),
'gab_id' => $gab_id,
'location_name' => $this->db->f('location_name'),
-
'remark' => $gab['remark']);
+
'remark' => $gab['remark'],
+
'owner' => $gab['owner']);
}
else
{
$gab_update[] =
array('location_code' => $this->db->f('location_code'),
'gab_id' => $gab_id,
'location_name' => $this->db->f('location_name'),
-
'remark' => $gab['remark']);
+
'remark' => $gab['remark'],
+
'owner' => $gab['owner']);
}
}
}
@@ -309,7 +322,8 @@
'street_name' => $gab['street_name'],
'street_number' => $gab['street_number'],
'location_name' => $gab['location_name'],
-
'remark' => $gab['remark']);
+
'remark' => $gab['remark'],
+
'owner' => $gab['owner']);
}
}
@@ -372,11 +386,12 @@
$address =
$gab_insert[$i]['location_name'];
}
- $this->db->query("INSERT INTO fm_gab_location
(location_code,gab_id,remark,entry_date,user_id,address $cols) "
+ $this->db->query("INSERT INTO fm_gab_location
(location_code,gab_id,remark,owner,entry_date,user_id,address $cols) "
. "VALUES ('"
. $gab_insert[$i]['location_code'].
"','"
. $gab_insert[$i]['gab_id']. "','"
. $gab_insert[$i]['remark']. "','"
+ . $gab_insert[$i]['owner']. "','"
. time() . "','"
. $this->account. "','"
. $address . "' $vals
)",__LINE__,__FILE__);
@@ -413,11 +428,17 @@
//_debug_array($gab);
+ if(!$gab['owner'])
+ {
+ $gab['owner']='no';
+ }
+
if(count($location)==$this->gab_insert_level)
{
$this->db->query("UPDATE fm_gab_location set
remark ='" .
$gab['remark'] . "',
+ owner ='" .
$gab['owner'] . "',
entry_date ='" .
time() . "',
user_id ='" .
$this->account
. "' WHERE location_code= '" .
$gab['location_code'] ."' and gab_id= '" . $gab['gab_id']
."'",__LINE__,__FILE__);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property/inc/class.sogab.inc.php, 1.3,
nomail <=