mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
This commit is contained in:
@@ -112,6 +112,11 @@ class studiengang
|
||||
$this->bescheidvom=$row->bescheidvom;
|
||||
$this->ext_id=$row->ext_id;
|
||||
$this->kuerzel = strtoupper($row->typ.$row->kurzbz);
|
||||
|
||||
$this->telefon=$row->telefon;
|
||||
$this->organisationsform=$row->organisationsform;
|
||||
$this->titelbescheidvom=$row->titelbescheidvom;
|
||||
$this->aktiv=$row->aktiv;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -129,8 +134,10 @@ class studiengang
|
||||
// *******************************************
|
||||
function getAll($order=null, $aktiv=true)
|
||||
{
|
||||
$qry = "SELECT * FROM public.tbl_studiengang WHERE aktiv=".($aktiv?'true':'false');
|
||||
|
||||
$qry = 'SELECT * FROM public.tbl_studiengang';
|
||||
if ($aktiv)
|
||||
$qry.=' WHERE aktiv';
|
||||
|
||||
if($order!=null)
|
||||
$qry .=" ORDER BY $order";
|
||||
|
||||
@@ -151,7 +158,7 @@ class studiengang
|
||||
$stg_obj->english=$row->english;
|
||||
$stg_obj->typ=$row->typ;
|
||||
$stg_obj->farbe=$row->farbe;
|
||||
$stg_obj->email=$row->email;
|
||||
$stg_obj->email=$row->email;
|
||||
$stg_obj->max_semester=$row->max_semester;
|
||||
$stg_obj->max_verband=$row->max_verband;
|
||||
$stg_obj->max_gruppe=$row->max_gruppe;
|
||||
@@ -163,6 +170,12 @@ class studiengang
|
||||
$stg_obj->bescheidvom=$row->bescheidvom;
|
||||
$stg_obj->ext_id=$row->ext_id;
|
||||
$stg_obj->kuerzel = strtoupper($row->typ.$row->kurzbz);
|
||||
|
||||
$stg_obj->telefon=$row->telefon;
|
||||
$stg_obj->organisationsform=$row->organisationsform;
|
||||
$stg_obj->titelbescheidvom=$row->titelbescheidvom;
|
||||
$stg_obj->aktiv=$row->aktiv;
|
||||
|
||||
|
||||
$this->result[] = $stg_obj;
|
||||
}
|
||||
@@ -241,8 +254,8 @@ class studiengang
|
||||
}
|
||||
//Neuen Datensatz anlegen
|
||||
$qry = 'INSERT INTO public.tbl_studiengang (studiengang_kz, kurzbz, kurzbzlang, bezeichnung, english,
|
||||
typ, farbe, email, max_verband, max_semester, max_gruppe, erhalter_kz, bescheid, bescheidbgbl1,
|
||||
bescheidbgbl2, bescheidgz, bescheidvom, organisationsform, titelbescheidvom, ext_id) VALUES ('.
|
||||
typ, farbe, email, telefon, max_verband, max_semester, max_gruppe, erhalter_kz, bescheid, bescheidbgbl1,
|
||||
bescheidbgbl2, bescheidgz, bescheidvom, organisationsform, titelbescheidvom, aktiv, ext_id) VALUES ('.
|
||||
$this->addslashes($this->studiengang_kz).', '.
|
||||
$this->addslashes($this->kurzbz).', '.
|
||||
$this->addslashes($this->kurzbzlang).', '.
|
||||
@@ -251,6 +264,7 @@ class studiengang
|
||||
$this->addslashes($this->typ).', '.
|
||||
$this->addslashes($this->farbe).', '.
|
||||
$this->addslashes($this->email).', '.
|
||||
$this->addslashes($this->telefon).', '.
|
||||
$this->addslashes($this->max_verband).', '.
|
||||
$this->addslashes($this->max_semester).', '.
|
||||
$this->addslashes($this->max_gruppe).', '.
|
||||
@@ -262,6 +276,7 @@ class studiengang
|
||||
$this->addslashes($this->bescheidvom).', '.
|
||||
$this->addslashes($this->organisationsform).', '.
|
||||
$this->addslashes($this->titelbescheidvom).', '.
|
||||
$this->addslashes($this->aktiv).', '.
|
||||
$this->addslashes($this->ext_id).');';
|
||||
}
|
||||
else
|
||||
@@ -283,6 +298,7 @@ class studiengang
|
||||
'english='.$this->addslashes($this->english).', '.
|
||||
'typ='.$this->addslashes($this->typ).', '.
|
||||
'farbe='.$this->addslashes($this->farbe).', '.
|
||||
'email='.$this->addslashes($this->email).', '.
|
||||
'max_verband='.$this->addslashes($this->max_verband).', '.
|
||||
'max_semester='.$this->addslashes($this->max_semester).', '.
|
||||
'max_gruppe='.$this->addslashes($this->max_gruppe).', '.
|
||||
@@ -294,7 +310,9 @@ class studiengang
|
||||
'bescheidvom='.$this->addslashes($this->bescheidvom).', '.
|
||||
'organisationsform='.$this->addslashes($this->organisationsform).', '.
|
||||
'titelbescheidvom='.$this->addslashes($this->titelbescheidvom).', '.
|
||||
'ext_id='.$this->addslashes($this->ext_id).' '.
|
||||
'ext_id='.$this->addslashes($this->ext_id).', '.
|
||||
'telefon='.$this->addslashes($this->telefon).', '.
|
||||
'aktiv='.$this->addslashes($this->aktiv).' '.
|
||||
'WHERE studiengang_kz='.$this->addslashes($this->studiengang_kz).';';
|
||||
}
|
||||
//echo $qry;
|
||||
@@ -325,5 +343,33 @@ class studiengang
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// *******************************************
|
||||
// * Setzt Studiengaenge aktiv/inaktiv
|
||||
// * benoetigt studiengang_kz und 'on'/'off'
|
||||
// * @return true wenn ok, false im Fehlerfall
|
||||
// *******************************************
|
||||
|
||||
function toggleAktiv($studiengang_kz)
|
||||
{
|
||||
if(!is_numeric($studiengang_kz))
|
||||
{
|
||||
$this->errormsg = 'Studiengang_kz muss eine gueltige Zahl sein';
|
||||
return false;
|
||||
}
|
||||
$qry = "UPDATE public.tbl_studiengang SET aktiv = NOT aktiv WHERE studiengang_kz='$studiengang_kz'";
|
||||
|
||||
if(pg_query($this->conn, $qry))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Speichern des Datensatzes';
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user