- Geschlecht kann jetzt auch unbekannt sein

- Preinteressent: schule kann jetzt nach schultypen gefiltert werden
- Abbrecher und Absolventen sind jetzt automatisch deaktiviert nach dem statuswechsel
This commit is contained in:
Andreas Österreicher
2008-08-14 14:36:02 +00:00
parent eb846236c0
commit 778a33026b
13 changed files with 340 additions and 54 deletions
+70
View File
@@ -314,5 +314,75 @@ class firma
return false;
}
}
// *******************************************
// * Liefert alle vorhandenen Firmentypen
// * @return true wenn ok, false im Fehlerfall
// *******************************************
function getFirmenTypen()
{
$qry = "SELECT * FROM public.tbl_firmentyp ORDER BY firmentyp_kurzbz";
if($result = pg_query($this->conn, $qry))
{
while($row = pg_fetch_object($result))
{
$fa = new firma($this->conn, null, null);
$fa->firmentyp_kurzbz = $row->firmentyp_kurzbz;
$fa->beschreibung = $row->beschreibung;
$this->result[] = $fa;
}
return true;
}
else
{
$this->errormsg = 'Fehler beim Auslesen der Firmentypen';
return false;
}
}
// *********************************************
// * Laedt alle Firmen eines bestimmen Firmentyps
// * @return true wenn ok, false im Fehlerfall
// *********************************************
function getFirmen($firmentyp_kurzbz='')
{
$qry = "SElECT * FROM public.tbl_firma";
if($firmentyp_kurzbz!='')
$qry.=" WHERE firmentyp_kurzbz='".addslashes($firmentyp_kurzbz)."'";
$qry.=" ORDER BY name";
if($result = pg_query($this->conn, $qry))
{
while($row = pg_fetch_object($result))
{
$fa = new firma($this->conn, null, null);
$fa->firma_id = $row->firma_id;
$fa->name = $row->name;
$fa->adresse = $row->adresse;
$fa->email = $row->email;
$fa->telefon = $row->telefon;
$fa->fax = $row->fax;
$fa->anmerkung = $row->anmerkung;
$fa->firmentyp_kurzbz = $row->firmentyp_kurzbz;
$fa->updateamum = $row->updateamum;
$fa->updatevon = $row->updatevon;
$fa->insertamum = $row->insertamum;
$fa->insertvon = $row->insertvon;
$fa->ext_id = $row->ext_id;
$fa->schule = ($row->schule=='t'?true:false);
$this->result[] = $fa;
}
return true;
}
else
{
$this->errormsg = 'Fehler beim Laden des Datensatzes';
return false;
}
}
}
?>