{"id":13,"date":"2016-08-29T15:50:27","date_gmt":"2016-08-29T15:50:27","guid":{"rendered":"http:\/\/bouwcentrumrotterdam.nl\/?page_id=13"},"modified":"2017-01-20T10:26:33","modified_gmt":"2017-01-20T10:26:33","slug":"de-organisaties","status":"publish","type":"page","link":"https:\/\/bouwcentrumrotterdam.nl\/?page_id=13","title":{"rendered":"Organisatie-onderdelen"},"content":{"rendered":"<p>[insert_php]<br \/>\n\/\/ STARTEN SESSION<br \/>\nsession_start();<br \/>\n\/\/ VERBINDEN MET DATABASE<br \/>\n$link=mysqli_connect(&#8216;rdbms.strato.de&#8217;, &#8216;U2684683&#8217;, &#8216;guin6591&#8217;, &#8216;DB2684683&#8217;);<br \/>\nif ($link==false)<br \/>\n\t{<br \/>\n\tprintf(&#8220;Er kan geen verbinding worden gemaakt met de database. Foutmelding: %s\\n&#8221;, mysqli_connect_error());<br \/>\n\t}<\/p>\n<p>\/\/ QUERY VOOR AFDELINGSLIJST<br \/>\n$result = mysqli_query($link, &#8221;<br \/>\nSELECT<br \/>\n\te.id AS afd_id,<br \/>\n\te.cluster_id,<br \/>\n\te.naam AS afd_naam,<br \/>\n\te.startjaar,<br \/>\n\te.eindjaar,<br \/>\n\te.beschrijving,<br \/>\n\te.manager2,<br \/>\n\te.huisvesting,<br \/>\n\te.afloop,<br \/>\n\tc.id AS groepid,<br \/>\n\tc.naam AS groepsnaam,<br \/>\n\tc.volgorde<br \/>\nFROM<br \/>\n\tentity AS e<br \/>\nINNER JOIN<br \/>\n\tcluster AS c  ON  e.cluster_id = c.id<br \/>\nORDER BY<br \/>\n\tvolgorde, startjaar, afd_naam<br \/>\n&#8220;);<\/p>\n<p>\/\/ RESULTATEN NAAR ARRAY $DATA<br \/>\n$data = array();<br \/>\n$i = 0;<br \/>\nwhile ($lijst = mysqli_fetch_array($result,MYSQL_ASSOC))<br \/>\n\t{<br \/>\n\tforeach ($lijst as $sleutel => $waarde)<br \/>\n\t\t{<br \/>\n\t\t$data[$i][$sleutel] = $waarde;<br \/>\n\t\t}<br \/>\n\t$i++;<br \/>\n\t}<\/p>\n<p>mysqli_free_result($result);<br \/>\nmysqli_close($link);<\/p>\n<p>\/\/ IS ER POST<br \/>\nif (isset($_POST[&#8216;AFD&#8217;]))<br \/>\n\t{<br \/>\n\t$nr=$_POST[&#8216;AFD&#8217;];  \/\/ IS DE TABEL-ID<br \/>\n\t$cnt = count($data);<br \/>\n\tfor($no = 0; $no < $cnt; ++$no)\n\t\t{\n\t\t$var = $data[$no];\n\t\t$nummer[$no] = $var['afd_id'];\n\t\tif ($nr==$nummer[$no])\n\t\t\t{\n\t\t\techo('\n\n<table style=\"width:100%; background-color: #d3dfdf;\">&#8216;);<br \/>\n\t\t\techo(&#8216;<\/p>\n<tr>\n<td style=\"width:60%;font-size:17pt; background-color: #f8bba6;\"><b>&#8216;);<br \/>\n\t\t\techo $var[&#8216;afd_naam&#8217;];<br \/>\n\t\t\techo(&#8216;<\/b><\/td>\n<td style=\"width:40%; text-align:center; background-color: #adc5c5;\">&#8216;);<br \/>\n\t\t\techo $var[&#8216;groepsnaam&#8217;];<br \/>\n\t\t\techo(&#8216;<\/td>\n<\/tr>\n<p>&#8216;);<br \/>\n\t\t\techo(&#8216;<\/p>\n<tr>\n<td>&#8216;);<br \/>\n\t\t\techo(&#8216;<\/td>\n<td>Actief van &#8216;);<br \/>\n\t\t\techo $var[&#8216;startjaar&#8217;] . &#8216; tot &#8216; . $var[&#8216;eindjaar&#8217;];<br \/>\n\t\t\techo(&#8216;<\/td>\n<\/tr>\n<p>&#8216;);<br \/>\n\t\t\techo(&#8216;<\/p>\n<tr>\n<td colspan=\"2\"><b>Beschrijving\/doelstelling<\/b><br \/>&#8216;);<br \/>\n\t\t\techo $var[&#8216;beschrijving&#8217;];<br \/>\n\t\t\techo(&#8216;<\/td>\n<\/tr>\n<p>&#8216;);<\/p>\n<p>\t\t\tif (($var[&#8216;manager2&#8217;])<>&#8220;Selecteer persoon uit deze lijst:&#8221;)<br \/>\n\t\t\t\t{<br \/>\n\t\t\t\techo(&#8216;<\/p>\n<tr>\n<td colspan=\"2\"><b>Directie\/leiding\/initiatiefnemer<\/b><br \/>&#8216;);<br \/>\n\t\t\t\t$pid=$var[&#8216;manager2&#8217;];<br \/>\n\t\t\t\t$link=mysqli_connect(&#8216;rdbms.strato.de&#8217;, &#8216;U2684683&#8217;, &#8216;guin6591&#8217;, &#8216;DB2684683&#8242;);<br \/>\n\t\t\t\t$result = mysqli_query($link, &#8220;SELECT * FROM person WHERE id=&#8217;$pid&#8217; &#8220;);<br \/>\n\t\t\t\t$pers = mysqli_fetch_array($result);<br \/>\n\t\t\t\techo $pers[&#8216;prenom&#8217;] . &#8216; &#8216; . $pers[&#8216;prefix&#8217;] . &#8216; &#8216; . $pers[&#8216;name&#8217;];<br \/>\n\t\t\t\techo(&#8216;<\/td>\n<\/tr>\n<p>&#8216;);<br \/>\n\t\t\t\t}<\/p>\n<p>\t\t\tif (($var[&#8216;huisvesting&#8217;])<>&#8220;&#8221;)<br \/>\n\t\t\t\t{<br \/>\n\t\t\t\techo(&#8216;<\/p>\n<tr>\n<td colspan=\"2\"><b>Huisvesting<\/b><br \/>&#8216;);<br \/>\n\t\t\t\techo $var[&#8216;huisvesting&#8217;];<br \/>\n\t\t\t\techo(&#8216;<\/td>\n<\/tr>\n<p>&#8216;);<br \/>\n\t\t\t\t}<\/p>\n<p>\t\t\tif (($var[&#8216;afloop&#8217;])<>&#8220;&#8221;)<br \/>\n\t\t\t\t{<br \/>\n\t\t\t\techo(&#8216;<\/p>\n<tr>\n<td colspan=\"2\"><b>Wat is ermee gebeurd?<\/b><br \/>&#8216;);<br \/>\n\t\t\t\techo $var[&#8216;afloop&#8217;];<br \/>\n\t\t\t\techo(&#8216;<\/td>\n<\/tr>\n<p>&#8216;);<br \/>\n\t\t\t\t}<\/p>\n<p>\t\t\techo(&#8216;<\/table>\n<p>&#8216;);<br \/>\n\t\t\t}<br \/>\n\t\t}<br \/>\n\t}<\/p>\n<p>\/\/ NAAR FORMULIER\/TABEL<br \/>\necho(&#8216;<\/p>\n<form action=\"\" method=\"POST\">&#8216;);<br \/>\necho(&#8216;<\/p>\n<table style=\"border-style: none; width:100%\">&#8216;);<\/p>\n<p>$_SESSION[&#8216;$volgorde&#8217;]=&#8217;0&#8242;;<br \/>\n$cnt = count($data);<\/p>\n<p>for($i = 0; $i < $cnt; ++$i)\n\t{\n\t$var = $data[$i];\n\t$nummer[$i] = $var['afd_id'];\n\t$volgorde=$var['cluster_id'];\n\tif ($volgorde<>$_SESSION[&#8216;$volgorde&#8217;])<br \/>\n\t\t{<br \/>\n\t\techo(&#8216;<\/p>\n<tr>\n<td style=\"\n\t\t\theight:25px;\n\t\t\ttext-align:center;\n\t\t\tcolor:black;\n\t\t\tbackground-color: #adc5c5;\"\n\t\t\tfont-size:18px;\n\t\t\t\" colspan=\"3\">&#8216;);<br \/>\n\t\techo $var[&#8216;groepsnaam&#8217;];<br \/>\n\t\techo(&#8216;<\/td>\n<\/tr>\n<p>&#8216;);<br \/>\n\t\t}<br \/>\n\techo(&#8216;<\/p>\n<tr>\n<td style=\"background-color: #f8bba6;\">&#8216;);<br \/>\n\tif (($var[&#8216;beschrijving&#8217;])<>&#8220;&#8221;)<br \/>\n\t\t{<br \/>\n\t\techo(&#8216;<button type=\"submit\" style=\"font-size: 18px; height: 30px;\" name=\"AFD\" value=\"'); \n\t\techo $nummer[$i]; \n\t\techo('\">&#8216;);<br \/>\n\t\techo $var[&#8216;afd_naam&#8217;];<br \/>\n\t\techo(&#8216;<\/button>&#8216;);<br \/>\n\t\t}<br \/>\n\telse<br \/>\n\t\t{<br \/>\n\t\techo $var[&#8216;afd_naam&#8217;];<br \/>\n\t\t}<br \/>\n\techo(&#8216;<\/td>\n<td style=\"text-align:center; width: 7%;background-color: #f8bba6;\">&#8216;);<br \/>\n\tif (($var[&#8216;startjaar&#8217;])<>&#8220;0&#8221;)<br \/>\n\t\t{<br \/>\n\t\techo $var[&#8216;startjaar&#8217;];<br \/>\n\t\t}<br \/>\n\techo(&#8216;<\/td>\n<td style=\"text-align:center; width: 10%;background-color: #f8bba6;\">&#8216;);<br \/>\n\tif (($var[&#8216;eindjaar&#8217;])<>&#8220;0&#8221;)<br \/>\n\t\t{<br \/>\n\t\techo &#8217;tot &#8216;  . &#8216; &#8216; . $var[&#8216;eindjaar&#8217;];<br \/>\n\t\t}<br \/>\n\techo(&#8216;<\/td>\n<\/tr>\n<p>&#8216;);<br \/>\n\t$_SESSION[&#8216;$volgorde&#8217;]=$volgorde;<br \/>\n\t}<\/p>\n<p>echo(&#8216;<\/table>\n<p>&#8216;);<br \/>\necho(&#8216;<\/p><\/form>\n<p>&#8216;);<\/p>\n<p>[\/insert_php]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[insert_php] \/\/ STARTEN SESSION session_start(); \/\/ VERBINDEN MET DATABASE $link=mysqli_connect(&#8216;rdbms.strato.de&#8217;, &#8216;U2684683&#8217;, &#8216;guin6591&#8217;, &#8216;DB2684683&#8217;); if ($link==false) { printf(&#8220;Er kan geen verbinding worden gemaakt met de database. Foutmelding: %s\\n&#8221;, mysqli_connect_error()); } \/\/ QUERY VOOR AFDELINGSLIJST $result = mysqli_query($link, &#8221; SELECT e.id AS afd_id, e.cluster_id, e.naam AS afd_naam, e.startjaar, e.eindjaar, e.beschrijving, e.manager2, e.huisvesting, e.afloop, c.id AS groepid, c.naam &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/bouwcentrumrotterdam.nl\/?page_id=13\" class=\"more-link\">Lees verder <span class=\"screen-reader-text\">&#8220;Organisatie-onderdelen&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":3,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-13","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/bouwcentrumrotterdam.nl\/index.php?rest_route=\/wp\/v2\/pages\/13","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bouwcentrumrotterdam.nl\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/bouwcentrumrotterdam.nl\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/bouwcentrumrotterdam.nl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bouwcentrumrotterdam.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=13"}],"version-history":[{"count":285,"href":"https:\/\/bouwcentrumrotterdam.nl\/index.php?rest_route=\/wp\/v2\/pages\/13\/revisions"}],"predecessor-version":[{"id":1181,"href":"https:\/\/bouwcentrumrotterdam.nl\/index.php?rest_route=\/wp\/v2\/pages\/13\/revisions\/1181"}],"wp:attachment":[{"href":"https:\/\/bouwcentrumrotterdam.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=13"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}