Created
November 7, 2018 15:17
-
-
Save cmb69/5eb5d59ed73b77b40edd4b7a1d3ac2ff to your computer and use it in GitHub Desktop.
MHZ Weiterleitung
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/**=================================== | |
* Checkbox und danach anklickbarer Button | |
*====================================*/ | |
function checkbox() | |
{ | |
if (isset($_POST['checkbox_submit'], $_POST['checkbox_agree'])) { | |
$_SESSION['checkbox_agreed'] = true; | |
} | |
if (isset($_SESSION['checkbox_agreed'])) { | |
echo newsbox('VERSTECKTE_SEITE'); | |
} else { | |
return '<form id="checkbox" name="checkbox" action="" method="POST">' | |
. 'Ich habe diese Informationen zur Kenntnis genommen' | |
. '<input type="checkbox" id="checkbox_agree" name="checkbox_agree">' | |
. '<label for="checkbox_agree">und werde mich daran halten.</label>' | |
. '<button type="submit" class="submit" name="checkbox_submit">' | |
. 'Ich bin Lehrer/in und arbeite in Klassen mit Inklusion.<br>' | |
. '<strong> Ich halte mich daran, dass ich diese Materialien <br>' | |
. 'nur für unterrichtliche Zwecke der HHS nutze.</strong>' | |
. '</button>' | |
. '</form>'; | |
} | |
} | |
function checkbox_agreed() | |
{ | |
if (isset($_SESSION['checkbox_agreed'])) { | |
return; | |
} | |
header('Location:' . CMSIMPLE_URL . '?IB-Materialien'); | |
exit; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment