echo "<p>Er is iets misgegaan.</p>"; exit; } if ($id > 0) { // bestaande inschrijving: haal de var'en op t.b.v. show_availability $query = "SELECT * FROM " . $opzoektabel . " WHERE Volgnummer='{$id}';"; $result = mysql_query($query); if ($result) { $rows_aff = mysql_affected_rows($bisdblink); if ($rows_aff > 0) { $row = mysql_fetch_assoc($result); if (isset($_POST['date'])) { $date = $_POST['date']; } else { $date_db = $row['Datum']; $date = DBdateToDate($date_db); } if (isset($_POST['start_time_hrs']) && isset($_POST['start_time_mins'])) { $start_time = $_POST['start_time_hrs'] . ":" . $_POST['start_time_mins']; } else { $start_time = $row['Begintijd']; } if (isset($_POST['end_time_hrs']) && isset($_POST['end_time_mins'])) { $end_time = $_POST['end_time_hrs'] . ":" . $_POST['end_time_mins']; } else { $end_time = $row['Eindtijd']; } if (isset($_POST['boat_id'])) { $boat_id = $_POST['boat_id']; } else { $boat_id = $row['Boot_ID'];
} else { $opzoektabel_tmp = $opzoektabel; if (strtotime($date_to_show_db) - strtotime($today_db) < 0) { $opzoektabel_tmp .= "_oud"; } $query = "SELECT * FROM " . $opzoektabel_tmp . " WHERE Verwijderd=0 AND Datum='{$date_to_show_db}' AND Eindtijd>'{$start_time_to_show}' AND Boot_ID='{$boat_ids_array[$boatnr]}' ORDER BY Begintijd;"; $result = mysql_query($query); if (!$result) { die("Ophalen van inschrijvingen mislukt." . mysql_error()); } else { $rows_aff = mysql_affected_rows($link); if ($rows_aff > 0) { while ($row = mysql_fetch_assoc($result)) { $db_id = $row['Volgnummer']; $db_date = $row['Datum']; $date = DBdateToDate($db_date); $db_start_time = $row['Begintijd']; $db_end_time = $row['Eindtijd']; $db_pname = $row['Pnaam']; $db_name = $row['Ploegnaam']; $db_email = $row['Email']; $db_mpb = $row['MPB']; $db_spits = $row['Spits']; $db_blok = $row['Wedstrijdblok']; $db_start_time_blocks = TimeToBlocks($db_start_time); if ($db_start_time_blocks < $start_block) { $db_start_time_blocks = $start_block; } $db_end_time_blocks = TimeToBlocks($db_end_time); $fields = explode(":", $db_end_time, 3); $available_ins = 1;
} if (!$fail) { $query = "INSERT INTO `cursus_inschrijvingen` (Naam, Demand, Ex_ID, Email, TelNr) VALUES ('{$name}', '{$demand}', '{$id}', '{$email}', '{$telph}');"; $result = mysql_query($query); if (!$result) { die("Inschrijven voor cursus mislukt." . mysql_error()); } else { $intro = "Beste cursist,<br><br>Bedankt voor uw aanmelding. Wij hebben onderstaande gegevens ontvangen en nemen z.s.m. per email contact met u op. U ontvangt dan nadere informatie omtrent de cursus.<br><br>Met vriendelijke groet,<br>De Instructiecommissie<br><br>KGR De Hunze<br>Praediniussingel 32<br>9711 AG Groningen<br><br>www.hunze.nl<br><br>"; $message = "Naam: " . $name . "<br>"; $query2 = "SELECT Startdatum, Type FROM `cursussen` WHERE ID='{$id}';"; $result2 = mysql_query($query2); $row2 = mysql_fetch_assoc($result2); $startdate_db = $row2['Startdatum']; $type = $row2['Type']; $message .= "Cursus: " . $type . "<br>"; $message .= "Beginnend op: " . DBdateToDate($startdate_db) . "<br>"; if ($demand) { $message .= "Tegenprestatie: " . $demand . "<br>"; } if ($telph) { $message .= "Telefoonnummer: " . $telph . "<br>"; } if ($email) { $message .= "E-mailadres: " . $email . "<br>"; } // Verstuur naar cursist zelf if ($email) { SendEmail($email, "Bevestiging cursusaanmelding", $intro . $message); } // Verstuur naar organisatie if ($org_email != "*****@*****.**") {
$startdate = DBdateToDate($startdate); $start_time = $row['Begintijd']; $start_time_fields = explode(":", $start_time); $start_time_hrs = $start_time_fields[0]; $start_time_mins = $start_time_fields[1]; $end_time = $row['Eindtijd']; $end_time_fields = explode(":", $end_time); $end_time_hrs = $end_time_fields[0]; $end_time_mins = $end_time_fields[1]; $boat = $row['Bootnaam']; $pname = $row['Pnaam']; $enddate = $row['Datum']; while ($row = mysql_fetch_assoc($result)) { $enddate = $row['Datum']; } $enddate = DBdateToDate($enddate); } if (isset($_POST['cancel'])) { header('Location: admin_blokken.php'); } if (isset($_POST['submit'])) { // bestuurslid $mpb = $_POST['mpb']; if (!$mpb) { $fail_msg_mpb = "U dient uw functie te selecteren."; } // startdatum $startdate = $_POST['startdate']; if (CheckTheDate($startdate)) { $startdate_db = DateToDBdate($startdate); if (strtotime($startdate_db) - strtotime($today_db) < 0) {
$fail = true; } if (!isset($fail) || $fail == false) { $hash = 0; while ($hash == 0) { $hash = generateHash(); } $query = "INSERT INTO `examen_inschrijvingen` (Naam, Graad, Leeftijd, Ex_ID, Email, TelNr, UniekeHash) VALUES ('{$name}', '{$grade}', '{$age}', '{$id}', '{$email}', '{$telph}', '{$hash}');"; $result = mysql_query($query); if (!$result) { die("Inschrijven voor examen mislukt." . mysql_error()); } else { $query2 = "SELECT Datum FROM `examens` WHERE ID='{$id}';"; $result2 = mysql_query($query2); $row2 = mysql_fetch_assoc($result2); $date_db = DBdateToDate($row2['Datum']); // Mail kandidaat, met uitschrijflink if ($email) { $message = 'U bent aangemeld voor het examen op ' . $date_db . '<br>' . 'Mocht u zich willen uitschrijven, klik dan <a href="http://bis.hunze.nl/examens/examen_inschr.php?delId=' . $hash . '">hier</a>'; SendEmail($email, "Bevestiging examenaanmelding", $message); } // Mail hotemetoten $message = "Naam: " . $name . "<br>"; $message .= "Leeftijd: " . $age . "<br>"; $message .= "Te behalen graad: " . $grade . "<br>"; $message .= "Op: " . $date_db . "<br>"; $message .= "Telefoonnummer: " . $telph . "<br>"; $message .= "E-mailadres: " . $email . "<br>"; SendEmail("*****@*****.**", "Nieuwe examenaanmelding", $message); //SendEmail("*****@*****.**", "Nieuwe examenaanmelding", $message); //21-4-2014 uitgezet op verzoek van Dagmar echo "<h1>Hartelijk dank voor uw aanmelding!</h1><br>Deze is doorgegeven aan de Examencommissie.<br>";
$date_gew_sh = DBdateToDate($date_gew); if ($date_gew_sh == "00-00-0000") { $date_gew_sh = "-"; } $name = $row['Meldernaam']; $boat_id = $row['Boot_ID']; $boat = $row['Bootnaam']; if ($boat == "") { $boat = "algemeen"; } $note = $row['Oms_lang']; $action = $row['Actiehouder']; $prio = $row['Prio']; $real = $row['Realisatie']; $date_ready = $row['Datum_gereed']; $date_ready_sh = DBdateToDate($date_ready); if ($date_ready_sh == "00-00-0000") { $date_ready_sh = "-"; } echo "<tr>"; echo "<td><div>{$date_sh}</div></td>"; echo "<td><div>{$date_gew_sh}</div></td>"; echo "<td><div>{$name}</div></td>"; echo "<td><div>{$boat}</div></td>"; echo "<td><div>{$note}</div></td>"; echo "<td><div>{$action}</div></td>"; echo "<td><div>{$prio}</div></td>"; echo "<td><div>{$real}</div></td>"; echo "<td><div>{$date_ready_sh}</div></td>"; if (!isset($mode)) { echo "<td><div><a href='admin_schade_edit.php?id={$id}' class='btn btn-default'>Bekijk/bewerk</a></div></td>";
// wijzigen bestaande cursus if ($id && ($id < 0 || !is_numeric($id))) { // check op ID echo "Er is iets misgegaan."; exit; } $query = "SELECT * FROM `cursussen` WHERE ID='{$id}';"; $result = mysql_query($query); if ($result) { $rows_aff = mysql_affected_rows($link); if ($rows_aff > 0) { $row = mysql_fetch_assoc($result); $startdate_db = $row['Startdatum']; $startdate = DBdateToDate($startdate_db); $enddate_db = $row['Einddatum']; $enddate = DBdateToDate($enddate_db); $quotum = $row['Quotum']; $description = $row['Omschrijving']; $email = $row['Mailadres']; $type = $row['Type']; } else { $email = "*****@*****.**"; // default } } else { $email = "*****@*****.**"; // default } // init if (!$_POST['cancel'] && !$_POST['insert']) { $fail = FALSE;
<a href='admin_examen_toev.php' class="btn btn-primary">Examen toevoegen</a> </h1> <?php $query = "SELECT * FROM examens ORDER BY Datum DESC"; $result = mysql_query($query); if (!$result) { die("Ophalen van examens mislukt: " . mysql_error()); } echo "<br><table class=\"table\">"; echo "<tr><th><div>Datum</div></th><th><div>Omschrijving</div></th><th><div>Graden</div></th><th><div>Quotum</div></th><th><div>Open voor inschrijving</div></th><th colspan=4></th></tr>"; $c = 0; while ($row = mysql_fetch_assoc($result)) { $id = $row['ID']; $date = $row['Datum']; $date_sh = DBdateToDate($date); $description = $row['Omschrijving']; $grades_db = $row['Graden']; $quotum = $row['Quotum']; $show = $row['ToonOpSite']; echo "<tr>"; echo "<td><div>{$date_sh}</div></td>"; echo "<td><div>{$description}</div></td>"; echo "<td><div>{$grades_db}</div></td>"; echo "<td><div>{$quotum}</div></td>"; if ($show) { echo "<td><div>ja"; } else { echo "<td><div>nee"; } echo " [<a href='admin_examens.php?mode=c&curval={$show}&id={$id}'>Wijzig</a>]</div></td>";
<?php setlocale(LC_TIME, 'nl_NL'); $query = "SELECT * FROM cursussen ORDER BY Startdatum DESC"; $result = mysql_query($query); if (!$result) { die('Ophalen van cursussen mislukt: ' . mysql_error()); } echo "<br><table class=\"table\">"; echo "<tr><th><div>Startdatum</div></th><th><div>Einddatum</div></th><th><div>Type</div></th><th><div>Omschrijving</div></th><th><div>Mailadres</div></th><th><div>Quotum</div></th><th><div>Toon op site?</div></th><th colspan=4></th></tr>"; $c = 0; while ($row = mysql_fetch_assoc($result)) { $id = $row['ID']; $startdate = $row['Startdatum']; $startdate_sh = DBdateToDate($startdate); $enddate = $row['Einddatum']; $enddate_sh = DBdateToDate($enddate); $type = $row['Type']; $description = $row['Omschrijving']; $email = $row['Mailadres']; $quotum = $row['Quotum']; $show = $row['ToonOpSite']; echo "<tr>"; echo "<td><div>{$startdate_sh}</div></td>"; echo "<td><div>{$enddate_sh}</div></td>"; echo "<td><div>{$type}</div></td>"; echo "<td><div>{$description}</div></td>"; echo "<td><div>{$email}</div></td>"; echo "<td><div>{$quotum}</div></td>"; if ($show) { echo "<td><div>ja"; } else {
</div> <div class="col-md-3 boardmessages"> <?php $query = "SELECT * FROM mededelingen ORDER BY Datum DESC LIMIT 1;"; // alleen recentste $result = mysql_query($query); if (!$result) { echo "Ophalen van bestuursmededelingen mislukt."; } else { $rows_aff = mysql_affected_rows($bisdblink); if ($rows_aff > 0) { $row = mysql_fetch_assoc($result); $note_datum = DBdateToDate($row['Datum']); $bestuurslid = $row['Bestuurslid']; $summary = $row['Betreft']; $note = $row['Mededeling']; echo "<strong>" . $summary . "</strong><br>{$note}<br><span class='text-muted'>" . $note_datum . ", {$bestuurslid}</span>"; } else { echo "Op dit moment zijn er geen mededelingen."; } } ?> </div> <div class="col-md-2 weather-panel"> <?php if ($toonweer) {