Use POST for optin-once

This commit is contained in:
Markus Koch 2018-06-03 18:46:24 +02:00
parent ff07893501
commit a1be4e8e66
2 changed files with 3 additions and 3 deletions

View File

@ -21,8 +21,8 @@
}
$optin = "";
if (isset($_GET['optin-once'])) {
$_COOKIE['opt-in'] = $_GET['optin-once'];
if (isset($_POST['optin-once'])) {
$_COOKIE['opt-in'] = $_POST['optin-once'];
}
if (isset($_COOKIE['opt-in'])) {
$opt = $_COOKIE['opt-in'];

View File

@ -132,7 +132,7 @@
if (opted_in('y')) {
echo '<iframe width="100%" height="100%" src="' . $url . '" frameborder="0" allowfullscreen></iframe>';
} else {
echo "<table border=0 style='height:100%;width:100%'><tr><td style='text-align:center;'>Embedded content has been disabled to protect your privacy.<br><br><br><strong><a href='" . append_param("optin-once=y") . "'>Click here to load the videos on this site once,</a></strong><br><br><strong><a href='/?p=privacy-controls'>or click here to allow them permanently,</a><br><br><a href=\"" . $youtube['link'] . "\">" . "or click here to watch the video on YouTube:<br>" . $youtube['link'] . "</a></strong><br><br><br>Please note that by enabling this video, data is transferred <br>to YouTube LLC, and is subject to their privacy policy.</td></tr></table>";
echo "<table border=0 style='height:100%;width:100%'><tr><td style='text-align:center;'>Embedded content has been disabled to protect your privacy.<br><br><br><strong><form action='' method='post'><input type='hidden' name='optin-once' value='y' /><input type='submit' value='Click here to load the videos on this site once,'/></form></strong><br><br><strong><a href='/?p=privacy-controls'>or click here to allow them permanently,</a><br><br><a href=\"" . $youtube['link'] . "\">" . "or click here to watch the video on YouTube:<br>" . $youtube['link'] . "</a></strong><br><br><br>Please note that by enabling this video, data is transferred <br>to YouTube LLC, and is subject to their privacy policy.</td></tr></table>";
}
} else {
// TODO: HTML5 video