diff --git a/support/tool/CRAFT/admin_contacten/bewerken.php b/support/tool/CRAFT/admin_contacten/bewerken.php index 95e3c3a3211775ca5dee1c7a1a415ec1667d0dee..549cd3267c7123f0767a002c686176053be84d9e 100644 --- a/support/tool/CRAFT/admin_contacten/bewerken.php +++ b/support/tool/CRAFT/admin_contacten/bewerken.php @@ -86,7 +86,7 @@ } if(Validatie_Opslaan()) { - $query = "UPDATE contact SET Contact_Naam = '". htmlentities($_POST['Contact_Naam'], ENT_QUOTES) ."', Contact_Adres1 = '". htmlentities($_POST['Contact_Adres1'], ENT_QUOTES) ."', Contact_Adres2='". htmlentities($_POST['Contact_Adres2'], ENTQUOTES) ."'"; + $query = "UPDATE contact SET Contact_Naam = '". htmlentities($_POST['Contact_Naam'], ENT_QUOTES) ."', Contact_Adres1 = '". htmlentities($_POST['Contact_Adres1'], ENT_QUOTES) ."', Contact_Adres2='". htmlentities($_POST['Contact_Adres2'], ENT_QUOTES) ."'"; $query = $query . ", Contact_Postcode='". htmlentities($_POST['Contact_Postcode'], ENT_QUOTES) ."', Contact_Woonplaats = '". htmlentities($_POST['Contact_Woonplaats'], ENT_QUOTES) ."', Contact_Telefoon_Vast='". htmlentities($_POST['Contact_Telefoon_Vast'], ENT_QUOTES) ."'"; $query = $query . ", Contact_Telefoon_Mobiel = '". htmlentities($_POST['Contact_Telefoon_Mobiel'], ENT_QUOTES) ."', Contact_Email='". htmlentities($_POST['Contact_Email'], ENT_QUOTES) ."', Contact_Fax = '". htmlentities($_POST['Contact_Telefoon_Fax'], ENT_QUOTES) ."'"; $query = $query . ", Contact_Parent = '". $_POST['Contact_Parent'] ."', Contact_Functie='". $_POST['Contact_Functie'] ."', Contact_Parent_Gegevens="; diff --git a/support/tool/CRAFT/algemene_functionaliteit/comp_toevoegen.php b/support/tool/CRAFT/algemene_functionaliteit/comp_toevoegen.php index 8f83cd8cdc6410b1cfd3fa33f962e0a27348be50..21eed1ec1af1a07424ad8208fc4372e9cc60b6f1 100644 --- a/support/tool/CRAFT/algemene_functionaliteit/comp_toevoegen.php +++ b/support/tool/CRAFT/algemene_functionaliteit/comp_toevoegen.php @@ -358,7 +358,7 @@ $levertijd = $_POST['hidden_fabricagetijd']; else $levertijd = date('H:i'); ?> - <td><iframe id="frame_fabricant" name="frame_fabricant" align="middle" marginwidth="0" marginheight="0" src="<?php echo($_SESSION['pagina']); ?>algemene_functionaliteit/comp_toevoegen_fabricant.php?c=<?php echo($selected ."&d=".$leverdatum . "&t=". $levertijd . $selectie); ?>" width="350" height="26" ALLOWTRANSPARENCY frameborder="0" scrolling="auto"></iframe> + <td><iframe id="frame_fabricant" name="frame_fabricant" align="middle" marginwidth="0" marginheight="0" src="<?php echo($_SESSION['pagina']); ?>algemene_functionaliteit/comp_toevoegen_fabricant.php?c=<?php echo($selected ."&d=".$leverdatum . "&t=". $levertijd . $selectie); ?>" width="375" height="26" ALLOWTRANSPARENCY frameborder="0" scrolling="auto"></iframe> <?php if(isset($_POST['hidden_fabricagedatum']) && (!Valideer_Datum($_POST['hidden_fabricagedatum']) || !Valideer_Tijd($_POST['hidden_fabricagetijd']))) echo('<b>* Onjuiste datum/tijd samenstelling!</b>'); ?></td> </td> </tr> @@ -383,7 +383,7 @@ $fabricagetijd = $_POST['hidden_levertijd']; else $fabricagetijd = date('H:i'); ?> - <td><iframe id="frame_leverancier" name="frame_leverancier" align="middle" marginwidth="0" marginheight="0" src="<?php echo($_SESSION['pagina']); ?>algemene_functionaliteit/comp_toevoegen_leverancier.php?c=<?php echo($selected ."&d=".$fabricagedatum . "&t=". $fabricagetijd . $selectie); ?>" width="350" height="26" ALLOWTRANSPARENCY frameborder="0" scrolling="auto"></iframe> + <td><iframe id="frame_leverancier" name="frame_leverancier" align="middle" marginwidth="0" marginheight="0" src="<?php echo($_SESSION['pagina']); ?>algemene_functionaliteit/comp_toevoegen_leverancier.php?c=<?php echo($selected ."&d=".$fabricagedatum . "&t=". $fabricagetijd . $selectie); ?>" width="375" height="26" ALLOWTRANSPARENCY frameborder="0" scrolling="auto"></iframe> <?php if(isset($_POST['hidden_leverdatum']) && (!Valideer_Datum($_POST['hidden_leverdatum']) || !Valideer_Tijd($_POST['hidden_levertijd']))) echo('<b>* Onjuiste datum/tijd samenstelling!</b>'); ?></td> </td> </tr> diff --git a/support/tool/CRAFT/algemene_functionaliteit/comp_toevoegen_parent.php b/support/tool/CRAFT/algemene_functionaliteit/comp_toevoegen_parent.php index 4e94af0482639954ab327c75c564a7bc34fd40c1..5024a6bc87168d7af990d36a9e1e6218f0b84533 100644 --- a/support/tool/CRAFT/algemene_functionaliteit/comp_toevoegen_parent.php +++ b/support/tool/CRAFT/algemene_functionaliteit/comp_toevoegen_parent.php @@ -7,25 +7,31 @@ if (isset($_GET['c']) && $_GET['c'] != 0) { $query = "SELECT Comp_Lijst_ID, Comp_Naam FROM comp_lijst WHERE Comp_Type_ID in (SELECT Type_Parent FROM comp_type WHERE Comp_Type = '".$_GET['c']."')"; - $resultaat = mysql_query($query); - echo("<form name=\"fTest\">\r\n"); - if (isset($_GET['n']) && $_GET['n'] > 0) - $selectie = $_GET['n']; - else - $selectie = 'SELECTED'; - - echo("<select id=\"sComp_Parent\" name=\"sComp_Parent\">\r\n"); - while ($data = mysql_fetch_array($resultaat)) { - echo("<option value=\"". $data['Comp_Lijst_ID'] ."\""); - if ($data['Comp_Lijst_ID'] == $selectie || $selectie == 'SELECTED') { - echo(' SELECTED'); - $selectie = -1; + + $num_rows = mysql_num_rows(mysql_query($query)); + if ($num_rows == 0) + echo("No parent components available"); + else { + $resultaat = mysql_query($query); + + echo("<form name=\"fTest\">\r\n"); + if (isset($_GET['n']) && $_GET['n'] > 0) + $selectie = $_GET['n']; + else + $selectie = 'SELECTED'; + + echo("<select id=\"sComp_Parent\" name=\"sComp_Parent\">\r\n"); + while ($data = mysql_fetch_array($resultaat)) { + echo("<option value=\"". $data['Comp_Lijst_ID'] ."\""); + if ($data['Comp_Lijst_ID'] == $selectie || $selectie == 'SELECTED') { + echo(' SELECTED'); + $selectie = -1; + } + echo(">". $data['Comp_Naam'] ."</option>\r\n"); } - echo(">". $data['Comp_Naam'] ."</option>\r\n"); + echo("</select></form>"); } - echo("</select></form>"); } - ?> </body> </html> \ No newline at end of file diff --git a/support/tool/CRAFT/documentatie/Handleiding_Craft.doc b/support/tool/CRAFT/documentatie/Handleiding_Craft.doc index bdffb28e51c357f4fe2741bd52e57b92988c6ab2..35b4bde6a9b4f35d14d9fde7dba7c8ce94b6a907 100644 Binary files a/support/tool/CRAFT/documentatie/Handleiding_Craft.doc and b/support/tool/CRAFT/documentatie/Handleiding_Craft.doc differ diff --git a/support/tool/CRAFT/includes/functies.php b/support/tool/CRAFT/includes/functies.php index c296bee93181c6c3fc5414d68afd02190d08eca0..97494c1d8fe512dfd0847ce49b2e2794de8de1fc 100644 --- a/support/tool/CRAFT/includes/functies.php +++ b/support/tool/CRAFT/includes/functies.php @@ -54,12 +54,12 @@ document.getElementById('suboptie5').innerHTML="Melding zoeken"; } else if (optie ==4) { - document.getElementById('suboptie1').innerHTML="Algemeen"; - document.getElementById('suboptie2').innerHTML="Type componenten"; - document.getElementById('suboptie3').innerHTML="Componenten"; - document.getElementById('suboptie4').innerHTML="Type meldingen"; - document.getElementById('suboptie5').innerHTML="Meldingen"; - document.getElementById('suboptie6').innerHTML="Historie"; +// document.getElementById('suboptie1').innerHTML="Algemeen"; + document.getElementById('suboptie1').innerHTML="Type componenten"; + document.getElementById('suboptie2').innerHTML="Componenten"; + document.getElementById('suboptie3').innerHTML="Type meldingen"; + document.getElementById('suboptie4').innerHTML="Meldingen"; + document.getElementById('suboptie5').innerHTML="Historie"; } else if (optie ==5) { } @@ -109,13 +109,13 @@ document.getElementById('suboptie1').innerHTML="Gebruikersgroep toevoegen"; document.getElementById('suboptie2').innerHTML="Gebruikersgroep bewerken"; document.getElementById('suboptie3').innerHTML="Gebruikersgroep verwijderen"; - document.getElementById('suboptie4').innerHTML="Groepmail versturen"; + //document.getElementById('suboptie4').innerHTML="Groepmail versturen"; } else if (optie ==7) { document.getElementById('suboptie1').innerHTML="Gebruikers toevoegen"; document.getElementById('suboptie2').innerHTML="Gebruikers bewerken"; document.getElementById('suboptie3').innerHTML="Gebruikers verwijderen"; - document.getElementById('suboptie4').innerHTML="Gebruikers mailen"; + //document.getElementById('suboptie4').innerHTML="Gebruikers mailen"; } else if (optie ==8) { document.getElementById('suboptie1').innerHTML="Contacten toevoegen"; diff --git a/support/tool/CRAFT/main.php b/support/tool/CRAFT/main.php index 08e3f6739620958e23e9d44c41254b6ab9872d4e..92af4497323948d26665ffd514a05515708446f7 100644 --- a/support/tool/CRAFT/main.php +++ b/support/tool/CRAFT/main.php @@ -83,24 +83,21 @@ } //statistieken else if ($pagina == 4) { - //Type Componenten - if ($start == 2) - include($_SESSION['pagina'] . 'main_statistieken/type_componenten.php'); //componenten - else if ($start == 3) + if ($start == 2) include($_SESSION['pagina'] . 'main_statistieken/componenten.php'); //Type Meldingen - else if ($start == 4) + else if ($start == 3) include($_SESSION['pagina'] . 'main_statistieken/type_meldingen.php'); //meldingen - else if ($start == 5) + else if ($start == 4) include($_SESSION['pagina'] . 'main_statistieken/meldingen.php'); //historie - else if ($start == 6) + else if ($start == 5) include($_SESSION['pagina'] . 'main_statistieken/historie.php'); - //algemene statistieken + //Type Componenten else - include($_SESSION['pagina'] . 'main_statistieken/algemeen.php'); + include($_SESSION['pagina'] . 'main_statistieken/type_componenten.php'); } else if ($pagina == 5) include ($_SESSION['pagina'] .'main/instellingen.php'); ?> diff --git a/support/tool/CRAFT/main/instellingen.php b/support/tool/CRAFT/main/instellingen.php index 51b6cbac79dbe363542b9e1a0cf28e020f39971e..4560bbd4f799dfbf9a599285996dab8c617343aa 100644 --- a/support/tool/CRAFT/main/instellingen.php +++ b/support/tool/CRAFT/main/instellingen.php @@ -19,6 +19,12 @@ if (isset($_POST['wachtwoord']) && $_POST['wachtwoord'] == '') return false; + + if (isset($_POST['wachtwoord2']) && $_POST['wachtwoord2'] == '') + return false; + + if ($_POST['wachtwoord'] != $_POST['wachtwoord2']) + return false; if (isset($_POST['email']) && ($_POST['email'] == '' || strpos($_POST['email'], '@') == -1 )) return false; @@ -30,13 +36,13 @@ if(Validatie_Opslaan()) { //opslaan $query = "UPDATE gebruiker SET inlognaam= '". $_POST['naam'] . "', Wachtwoord= '". md5($_POST['wachtwoord']) ."' - , Emailadres='". $_POST['email'] ."', Start_Alg='". $_POST['start'] ."', Start_Comp='". $_POST['Start_Comp'] ."' + , Emailadres='". $_POST['email'] ."', Start_Alg='". $_POST['start'] ."', Start_Comp='". $_POST['Start_Comp'] ."', Gebruiker_Taal='".$_POST['taal']."' , Start_Melding='". $_POST['Start_Melding'] ."', Start_Stats='". $_POST['Start_Stats'] ."' WHERE Werknem_ID = '" .$_SESSION['gebr_id']. "'"; //de "nieuwe" gegevens in de sessievariabelen zetten, zodat deze meteen geladen/bruikbaar zijn $_SESSION['gebr_naam'] = $_POST['naam']; $_SESSION['gebr_email'] = $_POST['email']; -// $_SESSION['taal'] = $_POST['']; + $_SESSION['taal'] = $_POST['taal']; $_SESSION['start_tabblad'] = $_POST['start']; $_SESSION['start_comp'] = $_POST['Start_Comp']; $_SESSION['start_melding'] = $_POST['Start_Melding']; @@ -65,7 +71,21 @@ </tr> <tr> <td>Wachtwoord:</td> - <td><input name="wachtwoord" value="" type="password"><?php if(isset($_POST['wachtwoord']) && $_POST['wachtwoord'] == '') echo('<b id="type_wachtwoord">* Er is geen wachtwoord ingevoerd!</b>'); ?></td> + <td><input name="wachtwoord" value="" type="password"> + <?php + if(isset($_POST['wachtwoord']) && $_POST['wachtwoord'] == '') echo('<b id="type_wachtwoord">* Er is geen wachtwoord ingevoerd!</b>'); + if(isset($_POST['wachtwoord']) && $_POST['wachtwoord'] != '' && isset($_POST['wachtwoord2']) && $_POST['wachtwoord2'] != '') echo('<b id="type_wachtwoord">* Beide wachtwoorden komen niet overeen!</b>'); + ?> + </td> + </tr> + <tr> + <td>Nogmaals het wachtwoord:</td> + <td><input name="wachtwoord2" value="" type="password"> + <?php + if(isset($_POST['wachtwoord2']) && $_POST['wachtwoord2'] == '') echo('<b id="type_wachtwoord">* Er is geen wachtwoord ingevoerd!</b>'); + if(isset($_POST['wachtwoord']) && $_POST['wachtwoord'] != '' && isset($_POST['wachtwoord2']) && $_POST['wachtwoord2'] != '') echo('<b id="type_wachtwoord">* Beide wachtwoorden komen niet overeen!</b>'); + ?> + </td> </tr> <tr> <td>E-mail adres:</td> @@ -76,7 +96,11 @@ </tr> <tr> <td>Ingestelde taal:</td> - <td><select></select></td> + <td> + <select name="taal"> + <option value="1">Nederlands</option> + </select> + </td> </tr> <tr> <td>Algemene startpagina:</td> diff --git a/support/tool/CRAFT/main_meldingen/verwijderen.php b/support/tool/CRAFT/main_meldingen/verwijderen.php index d1fffa895d431d26fca2d25b6e0dd3db88e6d56e..4f5e46dd1d20095a88422393e2f26dec75579f07 100644 --- a/support/tool/CRAFT/main_meldingen/verwijderen.php +++ b/support/tool/CRAFT/main_meldingen/verwijderen.php @@ -61,7 +61,6 @@ $query = "SELECT * FROM comp_lijst WHERE Comp_Lijst_ID = '". $data['Comp_Lijst_ID'] ."'"; $resultaat = mysql_query($query); $row = mysql_fetch_array($resultaat); - echo("<br>Om deze melding te verwijderen dient u contact op te nemen met de administrator van uw groep<br>"); echo("Ook kunt u contact opnemen met de algemene administrators<br>"); diff --git a/support/tool/CRAFT/main_statistieken/componenten.php b/support/tool/CRAFT/main_statistieken/componenten.php index b713b678f705f31b18204060f44a31fcab8ec602..c2a68788773a2960c49abc8abb966f99b52cb96b 100644 --- a/support/tool/CRAFT/main_statistieken/componenten.php +++ b/support/tool/CRAFT/main_statistieken/componenten.php @@ -1,7 +1,7 @@ <?php if(isset($_SESSION['main_deel'])){ $_SESSION['main_deel'] = 4; - $_SESSION['huidige_pagina'] = $_SESSION['pagina'] . 'main.php?p='.$_SESSION['main_deel'].'&s=3'; + $_SESSION['huidige_pagina'] = $_SESSION['pagina'] . 'main.php?p='.$_SESSION['main_deel'].'&s=2'; $_SESSION['type_overzicht'] = 2; require_once($_SESSION['pagina'] . 'includes/login_funcs.php'); diff --git a/support/tool/CRAFT/main_statistieken/historie.php b/support/tool/CRAFT/main_statistieken/historie.php index 4d0d61071ce9e90fa5bd2cea1345c3de2087e9d6..a0e0dd00da0180c9c280de7e7c665a77a5122f5e 100644 --- a/support/tool/CRAFT/main_statistieken/historie.php +++ b/support/tool/CRAFT/main_statistieken/historie.php @@ -1,7 +1,7 @@ <?php if(isset($_SESSION['main_deel'])){ $_SESSION['main_deel'] = 4; - $_SESSION['huidige_pagina'] = $_SESSION['pagina'] . 'main.php?p='.$_SESSION['main_deel'].'&s=6'; + $_SESSION['huidige_pagina'] = $_SESSION['pagina'] . 'main.php?p='.$_SESSION['main_deel'].'&s=5'; require_once($_SESSION['pagina'] . 'includes/login_funcs.php'); include_once($_SESSION['pagina'] . 'includes/datum_tijd_functies.php'); diff --git a/support/tool/CRAFT/main_statistieken/meldingen.php b/support/tool/CRAFT/main_statistieken/meldingen.php index 797de4b38d11a2dc3b06fb745144c9d8887fc77f..df57208dbc6da8f0c97d7b4cf04604d26a43e806 100644 --- a/support/tool/CRAFT/main_statistieken/meldingen.php +++ b/support/tool/CRAFT/main_statistieken/meldingen.php @@ -25,8 +25,17 @@ <div id="rechterdeel"> <h2>Meldingen</h2> + <?php + $query = "SELECT count(Meld_Lijst_ID), count(distinct(Comp_Lijst_ID)) FROM melding_lijst"; + $res = mysql_query($query); + $row = mysql_fetch_array($res); + echo("Momenteel zijn er " . $row[0] . " meldingen in het systeem opgeslagen.<br>"); + echo("Deze meldingen zijn verdeeld over " . $row[1] . " componenten (gemiddeld " . ($row[0] / $row[1]) . " meldingen per component)<br>"); +//<br><br> +//Meest actieve persoon qua meldingen inbrengen +//Datum / Tijd waarin de meeste meldingen gemeld worden. - + ?> </div> <?php } diff --git a/support/tool/CRAFT/main_statistieken/type_componenten.php b/support/tool/CRAFT/main_statistieken/type_componenten.php index 7aa3f10679b92fc407f6b49205a3a9d115be09bc..f9efacae74d1b76b378c963131722b20159f6338 100644 --- a/support/tool/CRAFT/main_statistieken/type_componenten.php +++ b/support/tool/CRAFT/main_statistieken/type_componenten.php @@ -4,9 +4,21 @@ $_SESSION['huidige_pagina'] = $_SESSION['pagina'] . 'main.php?p='.$_SESSION['main_deel'].'&s=1'; require_once($_SESSION['pagina'] . 'includes/login_funcs.php'); + $_SESSION['type_overzicht'] = 1; //controleren of er iemand ingelogd is... if ($LOGGED_IN = user_isloggedin()) { + + function zet_datum_om($datum_tijd) { + //splitten op de spatie (formaat is als volgt: 2007-08-26 12:01:56) + $gedeeldveld=split(" ",$datum_tijd); + //datum veld opdelen zodat de jaar, maand en dagvelden makkelijk te benaderen zijn + $datum = split("-",$gedeeldveld[0]); + //tijd veld opdelen zodat de uren, minuten en secondevelden makkelijk te benaderen zijn + $tijd = split(":",$gedeeldveld[1]); + $test = $datum[2] ."-". $datum[1] ."-". $datum[0] ." ". $tijd[0] .":". $tijd[1]; + return $test; + } ?> <div id="linkerdeel"> @@ -23,29 +35,39 @@ </div> <div id="rechterdeel"> - <h2>Type componenten</h2> - <table> - <tr> - <td>Aantal faciliteiten:</td><td></td> - </tr> - <tr> - <td>Gemiddeld aantal componenten per faciliteit:</td><td></td> - </tr> - <tr> - <td>Gemiddeld aantal niveaus per faciliteit:</td><td></td> - </tr> - <tr> - <td></td><td></td> - </tr> - </table> - Aantal componenten per faciliteit<br> - Hoeveel niveaus per faciliteit<br> - Faciliteit met de meeste type componenten<br> - Faciliteit met de minste type componenten<br> - Aantal meldingen - + <?php + if (isset($_GET['c'])) { + $query = "SELECT Type_Naam, Aanmaak_Datum FROM comp_type WHERE Comp_Type = '".$_GET['c']."'"; + $res = mysql_query($query); + $data = mysql_fetch_array($res); + echo("U heeft \"". $data[0] ."\" geselecteerd. Dit compontent is aangemaakt op ". zet_datum_om($data[1])); + + $query = "SELECT Count(Comp_Type_ID) FROM comp_lijst"; + $res = mysql_query($query); + $data = mysql_fetch_array($res); + + $query = "SELECT Count(Comp_Type_ID) FROM comp_lijst WHERE Comp_Type_ID = '".$_GET['c']."'"; + $res = mysql_query($query); + $row = mysql_fetch_array($res); + echo("<table>"); + echo("<tr><td>Aantal componenten van dit type:</td><td>". $row[0] . "</td><td>(Totale aantal componenten: ". $data[0] .")</td></tr>"); + + $query = "SELECT Count(Meld_Lijst_ID) FROM melding_lijst WHERE Comp_Lijst_ID IN (SELECT Comp_Lijst_ID FROM comp_lijst WHERE Comp_Type_ID IN (SELECT comp_type FROM comp_type c WHERE comp_type = '".$_GET['c']."'))"; + $res = mysql_query($query); + $row = mysql_fetch_array($res); + + $query = "SELECT Count(Meld_Lijst_ID) FROM melding_lijst"; + $rest = mysql_query($query); + $data = mysql_fetch_array($rest); + echo("<tr><td>Aantal meldingen bij dit type:</td><td>". $row[0] . "</td><td>(Totale aantal meldingen: ". $data[0] .")</td></tr>"); + + + echo("</table>"); + } + else { echo("Er is geen type component geselecteerd!<br>Selecteer een type component!");} + ?> </div> <?php } diff --git a/support/tool/CRAFT/main_statistieken/type_meldingen.php b/support/tool/CRAFT/main_statistieken/type_meldingen.php index 4ce30b97e76d0f42581a99558320f5a2b4202540..0fa93c7898dd03a41661f16a07a126fb21e650dc 100644 --- a/support/tool/CRAFT/main_statistieken/type_meldingen.php +++ b/support/tool/CRAFT/main_statistieken/type_meldingen.php @@ -1,7 +1,7 @@ <?php if(isset($_SESSION['main_deel'])){ $_SESSION['main_deel'] = 4; - $_SESSION['huidige_pagina'] = $_SESSION['pagina'] . 'main.php?p='.$_SESSION['main_deel'].'&s=4'; + $_SESSION['huidige_pagina'] = $_SESSION['pagina'] . 'main.php?p='.$_SESSION['main_deel'].'&s=3'; $_SESSION['type_overzicht'] = 3; require_once($_SESSION['pagina'] . 'includes/login_funcs.php');