diff --git a/system/sync/stp/check_prestudentrolle.php b/system/sync/stp/check_prestudentrolle.php new file mode 100644 index 000000000..03ad6b293 --- /dev/null +++ b/system/sync/stp/check_prestudentrolle.php @@ -0,0 +1,69 @@ +, + * Andreas Oesterreicher and + * Rudolf Hangl . + */ + +//* +//* Synchronisiert Personendatensaetze von FAS DB in PORTAL DB +//* +//* +//* setzt voraus: sync von sync.stp_person, sync.stp_staat +//* benoetigt: tbl_syncperson + +require_once('sync_config.inc.php'); + +$starttime=time(); +$conn=pg_connect(CONN_STRING) + or die("Connection zur FH-Complete Datenbank fehlgeschlagen"); + +function myaddslashes($var) +{ + return ($var!=''?"'".addslashes($var)."'":'null'); +} + +$error_log=''; +$ausgabe=""; +$text = ''; +$error = ''; +$cont=''; +$anzahl_quelle=0; +$eingefuegt=0; +$fehler=0; +$update=0; +$plausi=''; +$start=''; +$stg=''; +$Kalender=''; +$rolle=''; +$iu=''; +$log_qry_ins=''; + +/************************* + * StP-PORTAL - Synchronisation + */ +?> + + +Check - StPoelten - Prestudentrollen (Lückenfüller) + + + + + + + \ No newline at end of file diff --git a/system/sync/stp/sync_stp_vilesci_person.php b/system/sync/stp/sync_stp_vilesci_person.php index daccf2f7c..85c427dfd 100644 --- a/system/sync/stp/sync_stp_vilesci_person.php +++ b/system/sync/stp/sync_stp_vilesci_person.php @@ -125,7 +125,7 @@ if($result = pg_query($conn, $qry)) $cont=true; $error=true; } - if($row->_staatsbuerger==NULL) + /*if($row->_staatsbuerger==NULL) { $error_log1.="\nKeine Staatsbürgerschaft eingetragen"; $cont=true; @@ -136,7 +136,7 @@ if($result = pg_query($conn, $qry)) $error_log1.="\nKein Geburtsland eingetragen"; $cont=true; $error=true; - } + }*/ if($row->dagebdat=='' || $row->dagebdat==NULL) { $error_log1.="\nKein Geburtsdatum eingetragen"; @@ -184,10 +184,10 @@ if($result = pg_query($conn, $qry)) familienstand,geschlecht,anzahlkinder,aktiv,insertamum,insertvon,updateamum,updatevon, ext_id) VALUES - (".myaddslashes($staat[$row->_staatsbuerger]).", ". - myaddslashes($staat[$row->_gebland]).", ". + (".($row->_staatsbuerger!=''?myaddslashes($staat[$row->_staatsbuerger]):'null').", ". + ($row->_gebland!=''?myaddslashes($staat[$row->_gebland]):'null').", ". "NULL, ". - myaddslashes($row->briefanrede).", ". + myaddslashes(substr($row->briefanrede,0,16)).", ". myaddslashes(trim($row->chtitel)).", ". "NULL, ". myaddslashes(trim($row->chnachname)).", ". @@ -299,7 +299,7 @@ if($result = pg_query($conn, $qry)) if ($row->chnachname!=$row->nachname) $sql.=" nachname='$row->chnachname',"; if ($row->anrede!=$row->briefanrede) - $sql.=" anrede='$row->briefanrede',"; + $sql.=" anrede=".myaddslashes(substr($row->briefanrede,0,16)).","; if ($row->titelpre!=$row->chtitel) $sql.=" titelpre='$row->chtitel',"; if ($row->vorname!=$row->chvorname)