From cea2f48bd502f5bbf47d17d1498cac6a881a086b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Mon, 8 Apr 2013 12:46:33 +0000 Subject: [PATCH] =?UTF-8?q?ContentID=20beim=20Raum=20hinzugef=C3=BCgt=20f?= =?UTF-8?q?=C3=BCr=20Raumbeschreibungen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/ort.class.php | 21 ++- system/FH-Complete.txp | 213 ++++++++++++++++++++++++---- system/checksystem.php | 18 ++- vilesci/stammdaten/raum_details.php | 8 +- 4 files changed, 220 insertions(+), 40 deletions(-) diff --git a/include/ort.class.php b/include/ort.class.php index 4983b1330..9c6420f84 100644 --- a/include/ort.class.php +++ b/include/ort.class.php @@ -49,6 +49,7 @@ class ort extends basis_db public $updatevon; // varchar(32) public $insertamum; // timestamp without timezone public $insertvon; // varchar(32) + public $content_id; /** * Konstruktor @@ -104,8 +105,9 @@ class ort extends basis_db $ort_obj->reservieren = $this->db_parse_bool($row->reservieren); $ort_obj->ausstattung = $row->ausstattung; $ort_obj->stockwerk = $row->stockwerk; - $ort_obj->standort_id = $row->standort_id; + $ort_obj->standort_id = $row->standort_id; $ort_obj->telefonklappe = $row->telefonklappe; + $ort_obj->content_id = $row->content_id; $this->result[] = $ort_obj; } @@ -147,8 +149,9 @@ class ort extends basis_db $this->reservieren = $this->db_parse_bool($row->reservieren); $this->ausstattung = $row->ausstattung; $this->stockwerk = $row->stockwerk; - $this->standort_id = $row->standort_id; + $this->standort_id = $row->standort_id; $this->telefonklappe = $row->telefonklappe; + $this->content_id = $row->content_id; } else { @@ -204,7 +207,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) VALUES ('. + dislozierung, kosten, stockwerk, standort_id, telefonklappe, insertamum, insertvon, updateamum, updatevon, content_id) VALUES ('. $this->db_add_param($this->ort_kurzbz).', '. $this->db_add_param($this->bezeichnung).', '. $this->db_add_param($this->planbezeichnung).', '. @@ -221,7 +224,8 @@ class ort extends basis_db $this->db_add_param($this->insertamum).','. $this->db_add_param($this->insertvon).','. $this->db_add_param($this->updateamum).','. - $this->db_add_param($this->updatevon).');'; + $this->db_add_param($this->updatevon).','. + $this->db_add_param($this->content_id).');'; } else { @@ -241,7 +245,8 @@ class ort extends basis_db 'telefonklappe='.$this->db_add_param($this->telefonklappe).', '. 'stockwerk='.$this->db_add_param($this->stockwerk).', '. 'updateamum='.$this->db_add_param($this->updateamum).', '. - 'updatevon='.$this->db_add_param($this->updatevon).' '. + 'updatevon='.$this->db_add_param($this->updatevon).', '. + 'content_id='.$this->db_add_param($this->content_id).' '. 'WHERE ort_kurzbz = '.$this->db_add_param($this->ort_kurzbz).';'; } @@ -352,8 +357,9 @@ class ort extends basis_db $ort_obj->reservieren = $this->db_parse_bool($row->reservieren); $ort_obj->ausstattung = $row->ausstattung; $ort_obj->stockwerk = $row->stockwerk; - $ort_obj->standort_id = $row->standort_id; + $ort_obj->standort_id = $row->standort_id; $ort_obj->telefonklappe = $row->telefonklappe; + $ort_obj->content_id = $row->content_id; $this->result[] = $ort_obj; } @@ -404,8 +410,9 @@ class ort extends basis_db $ort_obj->reservieren = $this->db_parse_bool($row->reservieren); $ort_obj->ausstattung = $row->ausstattung; $ort_obj->stockwerk = $row->stockwerk; - $ort_obj->standort_id = $row->standort_id; + $ort_obj->standort_id = $row->standort_id; $ort_obj->telefonklappe = $row->telefonklappe; + $ort_obj->content_id = $row->content_id; $this->result[] = $ort_obj; } diff --git a/system/FH-Complete.txp b/system/FH-Complete.txp index 5fb826ced..942ffda63 100644 --- a/system/FH-Complete.txp +++ b/system/FH-Complete.txp @@ -4304,6 +4304,7 @@ {ABF0E34A-C77C-4045-95A9-87B9416CCB41} {AD7903A5-1112-4E34-A2C9-4F0631EE719B} {D0D2FE0F-A345-4C16-A922-E076474AECC7} + {E07F2B23-9AA1-43B2-BFD1-C3970AB809C8} 0 0 @@ -7831,6 +7832,7 @@ {2F1DC4A2-54B9-4A82-B564-7B643FD5C211} {AF128E84-AE9A-472B-882D-B282A42F603E} {A3526B44-1CC2-414A-9E99-B46710F4A1F4} + {E07F2B23-9AA1-43B2-BFD1-C3970AB809C8} 0 0 @@ -15585,15 +15587,15 @@ {2A9923DB-E256-4D6E-B571-DF1E915D3735} - 6328 + 6324 1760 - 6446 + 6438 1530 - 6446 + 6438 1561 @@ -15628,15 +15630,15 @@ {17DB1D27-0F21-4D7B-A158-178FA5E29009} - 6653 + 6641 1980 - 6549 + 6524 1530 - 6549 + 6524 1561 @@ -15671,15 +15673,15 @@ {0B7088D0-4EEA-4F94-A04A-6E25DE34CF05} - 6585 + 6577 2200 - 6498 + 6481 1530 - 6498 + 6481 1561 @@ -15714,15 +15716,15 @@ {99E6EE34-0D29-449F-8DB9-641BFE1C039F} - 6627 + 6631 1605 - 6601 + 6609 1530 - 6601 + 6609 1561 @@ -27620,6 +27622,49 @@ + + {E07F2B23-9AA1-43B2-BFD1-C3970AB809C8} + Relationship15 + 0 + {CB6FE8AE-09EC-42A8-853D-108915CCF143} + 0 + {A884D03E-BAB0-4FB7-9893-C3BA7C196082} + 1 + 0 + 15780518 + 238 + 0 + Arial + 0 + 0 + -28 + + {623301F1-461B-4500-B1CF-4588AD8C3A4E} + + + {8D6F100B-1ACE-40C8-91D8-D968D1844E87} + + 6915 + 2169 + + + 7464 + 2928 + + + 7464 + 2897 + + + 6566 + 1561 + + + 6566 + 1530 + + + @@ -28456,7 +28501,7 @@ 6504 0 672 - 785 + 824 0 1 1 @@ -31239,7 +31284,7 @@ {63847D90-6226-4AC8-83C0-7353C08AC81C} 4482 - 2131 + 2144 2553 @@ -31251,11 +31296,11 @@ 6473 - 585 + 611 6504 - 585 + 611 @@ -31841,15 +31886,15 @@ {1A08083C-F187-4B45-BE87-E0B5CFE7CBAF} 6684 - 828 + 847 6728 - 847 + 886 6728 - 878 + 917 6812 @@ -31884,15 +31929,15 @@ {FA3E842D-7CEE-48AD-9C05-77476CFE354A} 6178 - 233 + 239 6504 - 324 + 337 6473 - 324 + 337 4843 @@ -31927,15 +31972,15 @@ {0C663600-4D6D-4A2E-800A-153F59399066} 7105 - 1010 + 1029 6952 - 847 + 886 6952 - 878 + 917 7430 @@ -45358,7 +45403,7 @@ 1069 0 672 - 785 + 824 0 1 1 @@ -46584,15 +46629,15 @@ {AC7E9335-6EDA-449D-AAED-066D0C76A911} 1252 - 751 + 771 1405 - 805 + 844 1405 - 836 + 875 1599 @@ -50882,8 +50927,8 @@ Systementwicklung Technikum Wien 2.0 - 2009-04-17T10:15:21.000+01:00 - 2013-03-13T14:20:49.634+01:00 + 2009-04-17T11:15:21.000+02:00 + 2013-04-08T13:57:02.859+02:00 FH-Complete 2.0 <?xml-stylesheet type="text/xsl" href="FHCompleteTDM3PG83.xsl"?> @@ -104112,6 +104157,7 @@ ALTER TABLE tbl_mitarbeiter ALTER COLUMN personalnummer DROP NOT NULL;{6339FAD2-8775-4FED-85A7-8058CC95A4D3} {CFCFB0A9-CF7B-4E5A-B6A0-909B2FAFB267} {62BFCF57-8025-4182-8001-0D73ABC7270E} + {A884D03E-BAB0-4FB7-9893-C3BA7C196082} @@ -104908,6 +104954,49 @@ ALTER TABLE tbl_mitarbeiter ALTER COLUMN personalnummer DROP NOT NULL; 0 + + {209F3A09-3AC2-4874-BB5C-4046012DC0E9} + content_id + 0 + {CE2A7C0B-95A4-42C2-A1A4-70CD0A9630AD} + 0 + 0 + 0 + 0 + 1 + + + + + + + 0 + + 0 + 1 + content_id + 0 + + + + + + + {1D7C9887-797A-4745-9016-58B3EEF5BB61} + + + + + {361EF147-269D-4247-8F7C-5A3876A3999A} + + + + + + + + 0 + @@ -137605,6 +137694,7 @@ Wenn FALSE haengt die Anzahl der Fragen pro Level von der Gesamtzahl pro Level a {B4C7BB72-037F-4798-A016-A9DF9CB8CCD4} {90F7DB7B-862E-443D-9009-C177BF29A113} {1CD3A3AC-4796-4B95-B24A-BD1EDB2B158B} + {A884D03E-BAB0-4FB7-9893-C3BA7C196082} @@ -137644,6 +137734,7 @@ Wenn FALSE haengt die Anzahl der Fragen pro Level von der Gesamtzahl pro Level a {473DF39D-2A1C-4DE6-829D-BE486CA52832} {DF045219-1F40-478B-B8A4-4136577E5687} {944AA6C9-9543-4AA5-AF16-678DCF9B56AC} + {1D7C9887-797A-4745-9016-58B3EEF5BB61} @@ -138074,6 +138165,7 @@ Wenn FALSE haengt die Anzahl der Fragen pro Level von der Gesamtzahl pro Level a {473DF39D-2A1C-4DE6-829D-BE486CA52832} {DF045219-1F40-478B-B8A4-4136577E5687} {944AA6C9-9543-4AA5-AF16-678DCF9B56AC} + {1D7C9887-797A-4745-9016-58B3EEF5BB61} @@ -138086,6 +138178,7 @@ Wenn FALSE haengt die Anzahl der Fragen pro Level von der Gesamtzahl pro Level a {B4C7BB72-037F-4798-A016-A9DF9CB8CCD4} {90F7DB7B-862E-443D-9009-C177BF29A113} {1CD3A3AC-4796-4B95-B24A-BD1EDB2B158B} + {A884D03E-BAB0-4FB7-9893-C3BA7C196082} @@ -181085,6 +181178,64 @@ Wenn FALSE haengt die Anzahl der Fragen pro Level von der Gesamtzahl pro Level a SIMPLE 1 + + {A884D03E-BAB0-4FB7-9893-C3BA7C196082} + Relationship15 + 0 + {60385A29-902F-41C9-8E7C-5735ED8B31DD} + 0 + + {57CF0E77-D04F-44B8-93B2-66C2651DD4F8} + + + {04908758-A69E-4567-9BCA-69420A749BE3} + + 1 + + + 0 + 0 + 0 + -1 + + Relationship15 + + 0 + 0 + 0 + 0 + + {3C543344-D5D2-429A-A2D4-CD8D872D1CA0} + + + + {1D7C9887-797A-4745-9016-58B3EEF5BB61} + FK content_id - content_id + 0 + {567EFDB0-3059-4EF3-A8D0-420CBE1931EE} + 0 + 1 + + + + + + {E4E659C7-39CF-4EFC-B7FD-EB3BB8D3F089} + + + {209F3A09-3AC2-4874-BB5C-4046012DC0E9} + + + {1207D5F4-B063-4B0A-B826-306478756915} + + + + + 0 + 0 + SIMPLE + 1 + diff --git a/system/checksystem.php b/system/checksystem.php index dd9bc1d78..b221befc6 100644 --- a/system/checksystem.php +++ b/system/checksystem.php @@ -4030,6 +4030,22 @@ if(!@$db->db_query("SELECT * FROM lehre.tbl_moodle_version LIMIT 1")) else echo 'Tabelle lehre.tbl_moodle_version hinzugefuegt; Spalte moodle_version zu Tabelle tbl_moodle hinzugefuegt
'; } + +// Ort FK zu Content fuer Rauminformation +if(!@$db->db_query("SELECT content_id FROM public.tbl_ort LIMIT 1")) +{ + $qry =" + ALTER TABLE public.tbl_ort ADD COLUMN content_id integer; + ALTER TABLE public.tbl_ort ADD CONSTRAINT fk_ort_content FOREIGN KEY(content_id) REFERENCES campus.tbl_content(content_id) ON DELETE RESTRICT ON UPDATE CASCADE; + "; + + if(!$db->db_query($qry)) + echo 'public.tbl_ort: '.$db->db_last_error().'
'; + else + echo 'Spalte ContentID zu public.tbl_ort hinzugefuegt
'; +} + + echo '
'; $tabellen=array( @@ -4173,7 +4189,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"), "public.tbl_notiz" => array("notiz_id","titel","text","verfasser_uid","bearbeiter_uid","start","ende","erledigt","insertamum","insertvon","updateamum","updatevon"), "public.tbl_notizzuordnung" => array("notizzuordnung_id","notiz_id","projekt_kurzbz","projektphase_id","projekttask_id","uid","person_id","prestudent_id","bestellung_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"), + "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_ortraumtyp" => array("ort_kurzbz","hierarchie","raumtyp_kurzbz"), "public.tbl_organisationseinheit" => array("oe_kurzbz", "oe_parent_kurzbz", "bezeichnung","organisationseinheittyp_kurzbz", "aktiv","mailverteiler","freigabegrenze","kurzzeichen"), "public.tbl_organisationseinheittyp" => array("organisationseinheittyp_kurzbz", "bezeichnung", "beschreibung"), diff --git a/vilesci/stammdaten/raum_details.php b/vilesci/stammdaten/raum_details.php index 5dfe38303..3313f3b1c 100644 --- a/vilesci/stammdaten/raum_details.php +++ b/vilesci/stammdaten/raum_details.php @@ -58,6 +58,7 @@ $stockwerk = ''; $standort_id = ''; $telefonklappe = ''; + $content_id=''; $neu = "true"; @@ -77,6 +78,7 @@ $stockwerk = $_POST["stockwerk"]; $standort_id = $_POST["standort_id"]; $telefonklappe = $_POST["telefonklappe"]; + $content_id = $_POST['content_id']; $sg_update = new ort(); @@ -94,6 +96,7 @@ $sg_update->stockwerk = $stockwerk; $sg_update->telefonklappe = $telefonklappe; $sg_update->standort_id = $standort_id; + $sg_update->content_id = $content_id; if ($_POST["neu"] == "true") @@ -130,6 +133,7 @@ $stockwerk = $sg->stockwerk; $standort_id = $sg->standort_id; $telefonklappe = $sg->telefonklappe; + $content_id = $sg->content_id; $neu = "false"; } @@ -229,7 +233,9 @@ $htmlstr .= " \n"; //$htmlstr .= " \n\n\n\n"; $htmlstr .= " Ausstattung\n"; - $htmlstr .= " \n"; + $htmlstr .= " \n"; + $htmlstr .= " ContentID\n"; + $htmlstr .= " \n"; $htmlstr .= " \n"; $htmlstr .= "\n"; $htmlstr .= "
\n";