mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-22 01:12:17 +00:00
Verwaltung für Raumtypen hinzugefügt
This commit is contained in:
+17
-16
@@ -32,29 +32,28 @@ class ort extends basis_db
|
||||
|
||||
//Tabellenspalten
|
||||
public $ort_kurzbz; // string
|
||||
public $bezeichnung; // string
|
||||
public $planbezeichnung; // string
|
||||
public $bezeichnung; // string
|
||||
public $planbezeichnung;// string
|
||||
public $max_person; // integer
|
||||
public $lehre; // boolean
|
||||
public $reservieren; // boolean
|
||||
public $aktiv; // boolean
|
||||
public $lageplan; // oid
|
||||
public $dislozierung; // smallint
|
||||
public $lehre; // boolean
|
||||
public $reservieren; // boolean
|
||||
public $aktiv; // boolean
|
||||
public $lageplan; // text
|
||||
public $dislozierung; // smallint
|
||||
public $kosten; // numeric(8,2)
|
||||
public $ausstattung;
|
||||
public $stockwerk; // integer
|
||||
public $ausstattung; // text
|
||||
public $stockwerk; // integer
|
||||
public $standort_id; // varchar(16)
|
||||
public $telefonklappe; // varchar(8)
|
||||
public $telefonklappe; // varchar(8)
|
||||
public $updateamum; // timestamp without timezone
|
||||
public $updatevon; // varchar(32)
|
||||
public $insertamum; // timestamp without timezone
|
||||
public $insertvon; // varchar(32)
|
||||
public $content_id;
|
||||
public $content_id; // integer
|
||||
|
||||
/**
|
||||
* Konstruktor
|
||||
* @param $conn Connection zur DB
|
||||
* $ort_kurzbz Kurzbz des zu ladenden Ortes
|
||||
* @param $ort_kurzbz Kurzbz des zu ladenden Ortes
|
||||
*/
|
||||
public function __construct($ort_kurzbz=null)
|
||||
{
|
||||
@@ -207,7 +206,7 @@ class ort extends basis_db
|
||||
{
|
||||
//Neuen Datensatz anlegen
|
||||
$qry = 'INSERT INTO public.tbl_ort (ort_kurzbz, bezeichnung, planbezeichnung, max_person, aktiv, lehre, reservieren, lageplan,
|
||||
dislozierung, kosten, stockwerk, standort_id, telefonklappe, insertamum, insertvon, updateamum, updatevon, content_id) VALUES ('.
|
||||
dislozierung, kosten, stockwerk, standort_id, telefonklappe, insertamum, insertvon, updateamum, updatevon, content_id,ausstattung) VALUES ('.
|
||||
$this->db_add_param($this->ort_kurzbz).', '.
|
||||
$this->db_add_param($this->bezeichnung).', '.
|
||||
$this->db_add_param($this->planbezeichnung).', '.
|
||||
@@ -225,7 +224,8 @@ class ort extends basis_db
|
||||
$this->db_add_param($this->insertvon).','.
|
||||
$this->db_add_param($this->updateamum).','.
|
||||
$this->db_add_param($this->updatevon).','.
|
||||
$this->db_add_param($this->content_id).');';
|
||||
$this->db_add_param($this->content_id).','.
|
||||
$this->db_add_param($this->ausstattung).');';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -235,6 +235,7 @@ class ort extends basis_db
|
||||
'bezeichnung='.$this->db_add_param($this->bezeichnung).', '.
|
||||
'planbezeichnung='.$this->db_add_param($this->planbezeichnung).', '.
|
||||
'max_person='.$this->db_add_param($this->max_person).', '.
|
||||
'ausstattung='.$this->db_add_param($this->ausstattung).','.
|
||||
'aktiv='.$this->db_add_param($this->aktiv, FHC_BOOLEAN) .', '.
|
||||
'lehre='.$this->db_add_param($this->lehre, FHC_BOOLEAN) .', '.
|
||||
'reservieren='.$this->db_add_param($this->reservieren, FHC_BOOLEAN) .', '.
|
||||
@@ -426,4 +427,4 @@ class ort extends basis_db
|
||||
return true;
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -27,8 +27,8 @@ require_once(dirname(__FILE__).'/basis_db.class.php');
|
||||
|
||||
class ortraumtyp extends basis_db
|
||||
{
|
||||
public $new; // boolean
|
||||
public $result = array(); // fachbereich Objekt
|
||||
public $new; // boolean
|
||||
public $result = array();
|
||||
|
||||
//Tabellenspalten
|
||||
public $ort_kurzbz; // string
|
||||
@@ -37,8 +37,8 @@ class ortraumtyp extends basis_db
|
||||
|
||||
/**
|
||||
* Konstruktor
|
||||
* @param $conn Connection zur DB
|
||||
* $ort_kurzbz und hierarchie ID des zu ladenden OrtRaumtyps
|
||||
* @param $ort_kurzbz
|
||||
* @param $hierarchie
|
||||
*/
|
||||
public function __construct($ort_kurzbz=null, $hierarchie=0)
|
||||
{
|
||||
@@ -77,7 +77,8 @@ class ortraumtyp extends basis_db
|
||||
|
||||
/**
|
||||
* Laedt einen OrtRaumtyp
|
||||
* @param $ortraumtyp, hierarchie ID des zu ladenden OrtRaumtyps
|
||||
* @param $ortraumtyp
|
||||
* @param $hierarchie
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function load($ort_kurzbz, $hierarchie)
|
||||
@@ -88,7 +89,13 @@ class ortraumtyp extends basis_db
|
||||
return false;
|
||||
}
|
||||
|
||||
$qry = "SELECT * FROM public.tbl_ortraumtyp WHERE ort_kurzbz = '".addslashes($ort_kurzbz)."' AND hierarchie = '".addslashes($hierarchie)."';";
|
||||
$qry = "SELECT
|
||||
*
|
||||
FROM
|
||||
public.tbl_ortraumtyp
|
||||
WHERE
|
||||
ort_kurzbz = ".$this->db_add_param($ort_kurzbz)."
|
||||
AND hierarchie = ".$this->db_add_param($hierarchie).";";
|
||||
|
||||
if(!$this->db_query($qry))
|
||||
{
|
||||
@@ -152,9 +159,9 @@ class ortraumtyp extends basis_db
|
||||
}
|
||||
//Neuen Datensatz anlegen
|
||||
$qry = 'INSERT INTO public.tbl_ortraumtyp (ort_kurzbz, hierarchie, raumtyp_kurzbz) VALUES ('.
|
||||
$this->addslashes($this->ort_kurzbz).', '.
|
||||
$this->addslashes($this->hierarchie).', '.
|
||||
$this->addslashes($this->raumtyp_kurzbz).');';
|
||||
$this->db_add_param($this->ort_kurzbz).', '.
|
||||
$this->db_add_param($this->hierarchie).', '.
|
||||
$this->db_add_param($this->raumtyp_kurzbz).');';
|
||||
|
||||
}
|
||||
else
|
||||
@@ -169,8 +176,8 @@ class ortraumtyp extends basis_db
|
||||
}
|
||||
|
||||
$qry = 'UPDATE public.tbl_ortraumtyp SET '.
|
||||
'raumtyp_kurzbz='.$this->addslashes($this->raumtyp_kurzbz).' '.
|
||||
'WHERE ort_kurzbz = '.$this->addslashes($this->ort_kurzbz).' AND hierarchie = '.$this->addslashes($this->hierarchie).';';
|
||||
'raumtyp_kurzbz='.$this->db_add_param($this->raumtyp_kurzbz).' '.
|
||||
'WHERE ort_kurzbz = '.$this->db_add_param($this->ort_kurzbz).' AND hierarchie = '.$this->db_add_param($this->hierarchie).';';
|
||||
}
|
||||
|
||||
if($this->db_query($qry))
|
||||
@@ -229,5 +236,26 @@ class ortraumtyp extends basis_db
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Loescht eine Zuordnung
|
||||
* @param $ort_kurzbz
|
||||
* @param $raumtyp_kurzbz
|
||||
*/
|
||||
public function delete($ort_kurzbz, $raumtyp_kurzbz)
|
||||
{
|
||||
$qry = "DELETE FROM public.tbl_ortraumtyp
|
||||
WHERE ort_kurzbz=".$this->db_add_param($ort_kurzbz)."
|
||||
AND raumtyp_kurzbz=".$this->db_add_param($raumtyp_kurzbz).";";
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Löschen';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -28,7 +28,7 @@ require_once(dirname(__FILE__).'/basis_db.class.php');
|
||||
class raumtyp extends basis_db
|
||||
{
|
||||
public $new; // boolean
|
||||
public $result = array(); // fachbereich Objekt
|
||||
public $result = array(); // raumtyp Objekt
|
||||
|
||||
//Tabellenspalten
|
||||
public $beschreibung; // string
|
||||
@@ -37,7 +37,7 @@ class raumtyp extends basis_db
|
||||
|
||||
/**
|
||||
* Konstruktor
|
||||
* @param $ort_kurzbz und hierarchie ID des zu ladenden Raumtyps
|
||||
* @param $raumtyp_kurzbz des zu ladenden Raumtyps
|
||||
*/
|
||||
public function __construct($raumtyp_kurzbz=null)
|
||||
{
|
||||
@@ -87,7 +87,7 @@ class raumtyp extends basis_db
|
||||
return false;
|
||||
}
|
||||
|
||||
$qry = "SELECT * FROM public.tbl_raumtyp WHERE raumtyp_kurzbz = '".addslashes($raumtyp_kurzbz)."';";
|
||||
$qry = "SELECT * FROM public.tbl_raumtyp WHERE raumtyp_kurzbz=".$this->db_add_param($raumtyp_kurzbz).";";
|
||||
|
||||
if(!$this->db_query($qry))
|
||||
{
|
||||
@@ -156,16 +156,16 @@ class raumtyp extends basis_db
|
||||
}
|
||||
//Neuen Datensatz anlegen
|
||||
$qry = 'INSERT INTO public.tbl_raumtyp (beschreibung, raumtyp_kurzbz) VALUES ('.
|
||||
$this->addslashes($this->beschreibung).', '.
|
||||
$this->addslashes($this->raumtyp_kurzbz).');';
|
||||
$this->db_add_param($this->beschreibung).', '.
|
||||
$this->db_add_param($this->raumtyp_kurzbz).');';
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
//bestehenden Datensatz akualisieren
|
||||
$qry = 'UPDATE public.tbl_raumtyp SET '.
|
||||
'beschreibung='.$this->addslashes($this->beschreibung).' '.
|
||||
'WHERE raumtyp_kurzbz = '.$this->addslashes($this->ort_kurzbz).';';
|
||||
'beschreibung='.$this->db_add_param($this->beschreibung).' '.
|
||||
'WHERE raumtyp_kurzbz = '.$this->db_add_param($this->ort_kurzbz).';';
|
||||
}
|
||||
|
||||
if($this->db_query($qry))
|
||||
@@ -179,4 +179,4 @@ class raumtyp extends basis_db
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user