phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/inc/custom synkroniser_med_boei.php


From: Sigurd Nes
Subject: [Phpgroupware-cvs] property/inc/custom synkroniser_med_boei.php
Date: Wed, 08 Mar 2006 10:29:14 +0000

CVSROOT:        /sources/phpgroupware
Module name:    property
Branch:         
Changes by:     Sigurd Nes <address@hidden>     06/03/08 10:29:14

Modified files:
        inc/custom     : synkroniser_med_boei.php 

Log message:
        

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/custom/synkroniser_med_boei.php.diff?tr1=1.1&tr2=1.2&r1=text&r2=text

Patches:
Index: property/inc/custom/synkroniser_med_boei.php
diff -u property/inc/custom/synkroniser_med_boei.php:1.1 
property/inc/custom/synkroniser_med_boei.php:1.2
--- property/inc/custom/synkroniser_med_boei.php:1.1    Thu Feb  9 11:48:02 2006
+++ property/inc/custom/synkroniser_med_boei.php        Wed Mar  8 10:29:14 2006
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage custom
-       * @version $Id: synkroniser_med_boei.php,v 1.1 2006/02/09 11:48:02 
sigurdne Exp $
+       * @version $Id: synkroniser_med_boei.php,v 1.2 2006/03/08 10:29:14 
sigurdne Exp $
        */
 
        /**
@@ -24,13 +24,13 @@
                {
                        $this->currentapp               = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
                        $this->bocommon                 = 
CreateObject($this->currentapp.'.bocommon');
-                       $this->db                       = 
$this->bocommon->new_db();
+                       $this->db                               = 
$this->bocommon->new_db();
 
-                       $this->join                     = $this->bocommon->join;
+                       $this->join                             = 
$this->bocommon->join;
                        $this->left_join                = 
$this->bocommon->left_join;
-                       $this->like                     = $this->bocommon->like;
+                       $this->like                             = 
$this->bocommon->like;
 
-                       $this->db_boei                  = 
CreateObject($this->currentapp.'.db_mssql');
+                       $this->db_boei                  = 
CreateObject($this->currentapp.'.db_mssql');
                        $this->db_boei->Host            = 
$GLOBALS['external_db']['boei']['db_host'];
                        $this->db_boei->Type            = 
$GLOBALS['external_db']['boei']['db_type'];
                        $this->db_boei->Database        = 
$GLOBALS['external_db']['boei']['db_name'];
@@ -38,13 +38,13 @@
                        $this->db_boei->Password        = 
$GLOBALS['external_db']['boei']['db_pass'];
                        $this->db_boei->Halt_On_Error   = 'yes';
 
-                       $this->db_boei2                 = 
CreateObject($this->currentapp.'.db_mssql');
+                       $this->db_boei2                 = 
CreateObject($this->currentapp.'.db_mssql');
                        $this->db_boei2->Host           = 
$GLOBALS['external_db']['boei']['db_host'];
                        $this->db_boei2->Type           = 
$GLOBALS['external_db']['boei']['db_type'];
                        $this->db_boei2->Database       = 
$GLOBALS['external_db']['boei']['db_name'];
                        $this->db_boei2->User           = 
$GLOBALS['external_db']['boei']['db_user'];
                        $this->db_boei2->Password       = 
$GLOBALS['external_db']['boei']['db_pass'];
-                       $this->db_boei2->Halt_On_Error  = 'yes';
+                       $this->db_boei2->Halt_On_Error  = 'yes';
                }
 
                function pre_run($data='')
@@ -117,8 +117,8 @@
 
                function execute($cron='')
                {
-       //              $receipt = $this->legg_til_gateadresse_phpgw();
-       //              $this->cron_log($receipt,$cron);
+                       $receipt = $this->legg_til_gateadresse_phpgw();
+                       $this->cron_log($receipt,$cron);
                        $receipt = $this->legg_til_objekt_phpgw();
                        $this->cron_log($receipt,$cron);
                        $receipt = $this->legg_til_bygg_phpgw();
@@ -167,12 +167,9 @@
 
                function legg_til_gateadresse_phpgw()
                {
-/*                     $sql = "SELECT v_Gateadresse.gateadresse_id, 
v_Gateadresse.gatenavn FROM  fm_streetaddress RIGHT OUTER JOIN "
+                       $sql = "SELECT v_Gateadresse.gateadresse_id, 
v_Gateadresse.gatenavn FROM  fm_streetaddress RIGHT OUTER JOIN "
                                . " v_Gateadresse ON fm_streetaddress.id = 
v_Gateadresse.gateadresse_id"
                                        . " WHERE (fm_streetaddress.id IS 
NULL)";
-*/
-                       $sql = "SELECT distinct v_Gateadresse.gateadresse_id, 
v_Gateadresse.gatenavn FROM  v_Gateadresse where gateadresse_id not in (0,693)";
-
 
                        $this->db_boei->query($sql,__LINE__,__FILE__);
                        while ($this->db_boei->next_record())
@@ -189,10 +186,9 @@
 
                                $sql2 = "INSERT INTO fm_streetaddress 
(id,descr)"
                                        . " VALUES (" . $gate[$i]['id'] . ", 
'". $gate[$i]['descr']. "')";
-//                                     . " VALUES (" . 
$this->bocommon->validate_db_insert($gate[$i]) . ")";
-
+
                                $this->db->query($sql2,__LINE__,__FILE__);
-//                             $this->db_boei->query($sql2,__LINE__,__FILE__);
+                               $this->db_boei->query($sql2,__LINE__,__FILE__);
 
                                $gate_msg[]=$gate[$i]['descr'];
                        }
@@ -211,11 +207,10 @@
                                        . " FROM fm_location1 RIGHT OUTER JOIN "
                                . " v_Objekt ON fm_location1.loc1 = 
v_Objekt.objekt_id"
                                        . " WHERE fm_location1.loc1 IS NULL";
-
+
                        $this->db_boei->query($sql,__LINE__,__FILE__);
                        while ($this->db_boei->next_record())
                        {
-
                                $objekt[]= array (
                                 'location_code'        => 
$this->db_boei->f('objekt_id'),
                                 'loc1'                         => 
$this->db_boei->f('objekt_id'),
@@ -412,7 +407,7 @@
                                 'status_drift'         => 
$this->db_boei->f('namssakstatusdrift_id')
                                 );
                        }
-
+
                        for ($i=0; $i<count($leietaker); $i++)
                        {
 
@@ -436,7 +431,7 @@
                function oppdater_leieobjekt()
                {
 
-                       $sql = " SELECT TOP 100 PERCENT 
objekt_id,leie_id,leietaker_id, boareal, formaal_id, gateadresse_id, gatenr, 
etasje"
+                       $sql = " SELECT TOP 100 PERCENT 
objekt_id,leie_id,leietaker_id, boareal, formaal_id, gateadresse_id, gatenr, 
etasje,driftsstatus_id"
                                . " FROM  v_Leieobjekt"; // WHERE 
v_Leieobjekt.formaal_id NOT IN (99)";
 
                        $this->db_boei->query($sql,__LINE__,__FILE__);
@@ -449,10 +444,11 @@
                                . " category = '" . 
$this->db_boei->f('formaal_id') . "',"
                                . " etasje = '" . $this->db_boei->f('etasje') . 
"',"
                                . " street_id = '" . 
$this->db_boei->f('gateadresse_id') . "',"
-                               . " street_number = '" . 
$this->db_boei->f('gatenr') . "',"
+                               . " street_number = '" . 
$this->db_boei->f('gatenr') . "',"
+                               . " driftsstatus_id = '" . 
$this->db_boei->f('driftsstatus_id') . "',"
                                . " boareal = '" . $this->db_boei->f('boareal') 
. "'"
                                . " WHERE  loc1 = '" . 
$this->db_boei->f('objekt_id') . "'  AND  loc4= '" . 
$this->db_boei->f('leie_id') . "'";
-
+
                                $this->db->query($sql2,__LINE__,__FILE__);
                                $this->db_boei2->query($sql2,__LINE__,__FILE__);
                                $i++;
@@ -520,8 +516,6 @@
                                . " ant_leieobjekt = '" . 
$this->db_boei->f('ant_leieobjekt') . "'"
                                . " WHERE  loc1 = '" . 
$this->db_boei->f('objekt_id') . "'  AND  loc2= '" . 
$this->db_boei->f('bygg_id') . "'";
 
-
-//_debug_array($sql2);
                                $this->db->query($sql2,__LINE__,__FILE__);
                                $this->db_boei2->query($sql2,__LINE__,__FILE__);
                                $i++;
@@ -530,7 +524,6 @@
                        $msg = $i . ' Bygg er oppdatert';
                        $this->receipt['message'][]=array('msg'=> $msg);
                        return $msg;
-
                }
 
                function oppdater_boa_del()




reply via email to

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