mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-22 09:22:22 +00:00
Quadratmeter, Gebaeudeteil und Organisationseinheit zu Ort hinzugefügt
This commit is contained in:
+18
-4
@@ -50,6 +50,9 @@ class ort extends basis_db
|
||||
public $insertamum; // timestamp without timezone
|
||||
public $insertvon; // varchar(32)
|
||||
public $content_id; // integer
|
||||
public $oe_kurzbz; // varchar(32)
|
||||
public $m2; // numeric(8,2)
|
||||
public $gebteil; // varchar(32)
|
||||
|
||||
public $ort_kurzbz_old; // string
|
||||
|
||||
@@ -109,7 +112,9 @@ class ort extends basis_db
|
||||
$ort_obj->standort_id = $row->standort_id;
|
||||
$ort_obj->telefonklappe = $row->telefonklappe;
|
||||
$ort_obj->content_id = $row->content_id;
|
||||
|
||||
$ort_obj->m2 = $row->m2;
|
||||
$ort_obj->oe_kurzbz = $row->oe_kurzbz;
|
||||
$ort_obj->gebteil = $row->gebteil;
|
||||
$this->result[] = $ort_obj;
|
||||
}
|
||||
return true;
|
||||
@@ -153,6 +158,9 @@ class ort extends basis_db
|
||||
$this->standort_id = $row->standort_id;
|
||||
$this->telefonklappe = $row->telefonklappe;
|
||||
$this->content_id = $row->content_id;
|
||||
$this->gebteil = $row->gebteil;
|
||||
$this->oe_kurzbz = $row->oe_kurzbz;
|
||||
$this->m2 = $row->m2;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -208,7 +216,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,ausstattung) VALUES ('.
|
||||
dislozierung, kosten, stockwerk, standort_id, telefonklappe, insertamum, insertvon, updateamum, updatevon, content_id,ausstattung,m2,gebteil,oe_kurzbz) VALUES ('.
|
||||
$this->db_add_param($this->ort_kurzbz).', '.
|
||||
$this->db_add_param($this->bezeichnung).', '.
|
||||
$this->db_add_param($this->planbezeichnung).', '.
|
||||
@@ -227,7 +235,10 @@ class ort extends basis_db
|
||||
$this->db_add_param($this->updateamum).','.
|
||||
$this->db_add_param($this->updatevon).','.
|
||||
$this->db_add_param($this->content_id).','.
|
||||
$this->db_add_param($this->ausstattung).');';
|
||||
$this->db_add_param($this->ausstattung).','.
|
||||
$this->db_add_param($this->m2).','.
|
||||
$this->db_add_param($this->gebteil).','.
|
||||
$this->db_add_param($this->oe_kurzbz).');';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -250,7 +261,10 @@ class ort extends basis_db
|
||||
'stockwerk='.$this->db_add_param($this->stockwerk).', '.
|
||||
'updateamum='.$this->db_add_param($this->updateamum).', '.
|
||||
'updatevon='.$this->db_add_param($this->updatevon).', '.
|
||||
'content_id='.$this->db_add_param($this->content_id).' '.
|
||||
'content_id='.$this->db_add_param($this->content_id).', '.
|
||||
'm2='.$this->db_add_param($this->m2).', '.
|
||||
'gebteil='.$this->db_add_param($this->gebteil).', '.
|
||||
'oe_kurzbz='.$this->db_add_param($this->oe_kurzbz).' '.
|
||||
'WHERE ort_kurzbz = '.$this->db_add_param(($this->ort_kurzbz_old!='')?$this->ort_kurzbz_old:$this->ort_kurzbz).';';
|
||||
}
|
||||
|
||||
|
||||
+1678
-995
File diff suppressed because it is too large
Load Diff
+19
-1
@@ -2539,6 +2539,24 @@ if(!$result = @$db->db_query("SELECT ext_id FROM campus.tbl_lvgesamtnote LIMIT 1
|
||||
echo ' campus.tbl_lvgesamtnote: Spalte ext_id hinzugefuegt!<br>';
|
||||
}
|
||||
|
||||
// Spalte oe_kurzbz, m2, gebteil in public.tbl_ort
|
||||
if(!$result = @$db->db_query("SELECT oe_kurzbz FROM public.tbl_ort LIMIT 1;"))
|
||||
{
|
||||
$qry = "ALTER TABLE public.tbl_ort ADD COLUMN m2 numeric(8,2);
|
||||
ALTER TABLE public.tbl_ort ADD COLUMN gebteil varchar(32);
|
||||
ALTER TABLE public.tbl_ort ADD COLUMN oe_kurzbz varchar(32);
|
||||
|
||||
COMMENT ON COLUMN public.tbl_ort.m2 IS 'Quadratmeter';
|
||||
COMMENT ON COLUMN public.tbl_ort.m2 IS 'Gebaeudeteil';
|
||||
ALTER TABLE public.tbl_ort ADD CONSTRAINT fk_ort_organisationseinheit FOREIGN KEY (oe_kurzbz) REFERENCES public.tbl_organisationseinheit(oe_kurzbz) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_ort: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo ' public.tbl_ort: Spalte m2, gebteil, oe_kurzbz hinzugefuegt!<br>';
|
||||
}
|
||||
|
||||
echo '<br><br><br>';
|
||||
|
||||
$tabellen=array(
|
||||
@@ -2714,7 +2732,7 @@ $tabellen=array(
|
||||
"public.tbl_mitarbeiter" => array("mitarbeiter_uid","personalnummer","telefonklappe","kurzbz","lektor","fixangestellt","bismelden","stundensatz","ausbildungcode","ort_kurzbz","standort_id","anmerkung","insertamum","insertvon","updateamum","updatevon","ext_id","kleriker"),
|
||||
"public.tbl_notiz" => array("notiz_id","titel","text","verfasser_uid","bearbeiter_uid","start","ende","erledigt","insertamum","insertvon","updateamum","updatevon","ext_id"),
|
||||
"public.tbl_notizzuordnung" => array("notizzuordnung_id","notiz_id","projekt_kurzbz","projektphase_id","projekttask_id","uid","person_id","prestudent_id","bestellung_id","lehreinheit_id","ext_id"),
|
||||
"public.tbl_ort" => array("ort_kurzbz","bezeichnung","planbezeichnung","max_person","lehre","reservieren","aktiv","lageplan","dislozierung","kosten","ausstattung","updateamum","updatevon","insertamum","insertvon","ext_id","stockwerk","standort_id","telefonklappe","content_id"),
|
||||
"public.tbl_ort" => array("ort_kurzbz","bezeichnung","planbezeichnung","max_person","lehre","reservieren","aktiv","lageplan","dislozierung","kosten","ausstattung","updateamum","updatevon","insertamum","insertvon","ext_id","stockwerk","standort_id","telefonklappe","content_id","m2","gebteil","oe_kurzbz"),
|
||||
"public.tbl_ortraumtyp" => array("ort_kurzbz","hierarchie","raumtyp_kurzbz"),
|
||||
"public.tbl_organisationseinheit" => array("oe_kurzbz", "oe_parent_kurzbz", "bezeichnung","organisationseinheittyp_kurzbz", "aktiv","mailverteiler","freigabegrenze","kurzzeichen","lehre"),
|
||||
"public.tbl_organisationseinheittyp" => array("organisationseinheittyp_kurzbz", "bezeichnung", "beschreibung"),
|
||||
|
||||
@@ -85,6 +85,9 @@
|
||||
$content_id = $_POST['content_id'];
|
||||
$ort_kurzbz_old = $_POST["ort_kurzbz_old"];
|
||||
|
||||
$m2 = str_replace(',','.',$_POST["m2"]);
|
||||
$oe_kurzbz = $_POST["oe_kurzbz"];
|
||||
$gebteil = $_POST["gebteil"];
|
||||
|
||||
$sg_update = new ort();
|
||||
$sg_update->ort_kurzbz = $ort_kurzbz;
|
||||
@@ -103,7 +106,9 @@
|
||||
$sg_update->standort_id = $standort_id;
|
||||
$sg_update->content_id = $content_id;
|
||||
$sg_update->ort_kurzbz_old = $ort_kurzbz_old;
|
||||
|
||||
$sg_update->m2 = $m2;
|
||||
$sg_update->gebteil = $gebteil;
|
||||
$sg_update->oe_kurzbz = $oe_kurzbz;
|
||||
|
||||
if ($_POST["neu"] == "true")
|
||||
$sg_update->new = 1;
|
||||
@@ -140,6 +145,9 @@
|
||||
$standort_id = $sg->standort_id;
|
||||
$telefonklappe = $sg->telefonklappe;
|
||||
$content_id = $sg->content_id;
|
||||
$gebteil = $sg->gebteil;
|
||||
$m2 = $sg->m2;
|
||||
$oe_kurzbz = $sg->oe_kurzbz;
|
||||
$neu = "false";
|
||||
}
|
||||
|
||||
@@ -301,8 +309,8 @@
|
||||
$htmlstr .= '
|
||||
</SELECT>
|
||||
</td>
|
||||
<td>Telefonklappe</td>
|
||||
<td><input class="detail" type="text" name="telefonklappe" size="3" maxlength="8" value="'.$telefonklappe.'" onchange="submitable()"></td>
|
||||
<td>Gebäudeteil</td>
|
||||
<td><input class="detail" type="text" name="gebteil" size="5" maxlength="32" value="'.$gebteil.'" onchange="submitable()"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">Lehre</td>
|
||||
@@ -339,6 +347,31 @@
|
||||
}
|
||||
$htmlstr .= '<input type="checkbox" name="aktiv" value="t"'.$chk3.' onchange="submitable()"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Quadratmeter</td>
|
||||
<td><input class="detail" type="text" name="m2" size="6" maxlength="9" value="'.$m2.'" onchange="submitable()"></td>
|
||||
<td>Organisationseinheit</td>
|
||||
<td colspan="3">';
|
||||
$oe=new organisationseinheit();
|
||||
$oe->getAll();
|
||||
$htmlstr.='<select name="oe_kurzbz">';
|
||||
$htmlstr.='<option value="">-- keine Auswahl --</option>';
|
||||
foreach($oe->result as $row_oe)
|
||||
{
|
||||
if($row_oe->oe_kurzbz==$oe_kurzbz)
|
||||
$selected='selected';
|
||||
else
|
||||
$selected='';
|
||||
$htmlstr.='<option value="'.$row_oe->oe_kurzbz.'" '.$selected.'>'.$row_oe->organisationseinheittyp_kurzbz.' '.$row_oe->bezeichnung.'</option>';
|
||||
}
|
||||
$htmlstr.='</select>';
|
||||
$htmlstr.='
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Telefonklappe</td>
|
||||
<td><input class="detail" type="text" name="telefonklappe" size="3" maxlength="8" value="'.$telefonklappe.'" onchange="submitable()"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">Lageplan</td>
|
||||
<td><textarea name="lageplan" cols="37" rows="5" onchange="submitable()">'.$lageplan.'</textarea></td>
|
||||
|
||||
Reference in New Issue
Block a user