$docent_afkorting = filter_var(trim($_POST['afkorting']), FILTER_SANITIZE_STRING); $emailadres = filter_var(trim($_POST['emailadres']), FILTER_VALIDATE_EMAIL); if (!$emailadres) { $_SESSION['message'] = 'Voer een geldig e-mailadres in.'; } else { $role = 2; // is leraar $account_activated = 0; //account is nog niet geactiveerd, dit wordt pas gedaan als gebruiker eerste keer inlogt. $generated_password = generate_random_password(); $wachtwoord = password_hash($generated_password, PASSWORD_BCRYPT); $email_code = md5($voornaam + microtime()); //returned $generated_password $gegevens = ["gebruiker_id" => $gebruiker_id, "voornaam" => $voornaam, "tussenvoegsel" => $tussenvoegsel, "achternaam" => $achternaam, "emailadres" => $emailadres, "docent_afkorting" => $docent_afkorting]; //gegevens updaten: updateTeacher($gegevens["gebruiker_id"], $gegevens["voornaam"], $gegevens["tussenvoegsel"], $gegevens["achternaam"], $gegevens["emailadres"], $gegevens["docent_afkorting"]); } } } include ROOT_PATH . "includes/templates/header.php"; ?> <div class="wrapper"> <?php include ROOT_PATH . "includes/templates/sidebar-admin.php"; ?> <div class="page-wrapper"> <div class="container-fluid"> <div class="row"> <div class="col-sm-12"> <div class="panel panel-default"> <div class="panel-heading">
$status = trim($_GET["status"]); updateTransactionStatus($conn, $transactionId, $status); } else { if ($dataType == "updateComment") { $transactionId = trim($_GET["transactionId"]); $comment = trim($_GET["comment"]); updateComment($conn, $transactionId, $comment); } else { if ($dataType == "findTeacherByMobile") { $mobile = trim($_GET["mobile"]); findTeacherByMobile($conn, $mobile); } else { if ($dataType == "updateTeacher") { $transactionId = trim($_GET["transactionId"]); $openId = trim($_GET["openId"]); updateTeacher($conn, $transactionId, $openId); } else { if ($dataType == "updateTrialTime") { $transactionId = trim($_GET["transactionId"]); $trialTime = trim($_GET["trialTime"]); updateTrialTime($conn, $transactionId, $trialTime); } else { if ($dataType == "updateFixedTime") { $transactionId = trim($_GET["transactionId"]); $fixedTime = trim($_GET["fixedTime"]); updateFixedTime($conn, $transactionId, $fixedTime); } else { if ($dataType == "updateFee") { $transactionId = trim($_GET["transactionId"]); $fee = trim($_GET["fee"]); updateFee($conn, $transactionId, $fee);