From dfbd51b6b840eb8346c877a43bf507de0cff035f Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Sun, 20 Dec 2015 18:46:57 +0100 Subject: Fulfillment URL. --- src/frontend/fulfillment.php | 86 +++++++++++++++++++++++++++++++++++++++++++ src/frontend/fullfillment.php | 86 ------------------------------------------- src/frontend/pay.php | 4 +- src/frontend/style.css | 58 +++++++++++++++++++++++++++++ 4 files changed, 147 insertions(+), 87 deletions(-) create mode 100644 src/frontend/fulfillment.php delete mode 100644 src/frontend/fullfillment.php diff --git a/src/frontend/fulfillment.php b/src/frontend/fulfillment.php new file mode 100644 index 00000000..f22fd1d8 --- /dev/null +++ b/src/frontend/fulfillment.php @@ -0,0 +1,86 @@ + + + + Taler's "Demo" Shop + + + + +
+ + +

Toy Store - Payment succeeded

+
+ + + +
+
+ + +*/ + +$cli_debug = false; +$backend_test = true; + +function generate_msg ($link){ + $msg = "

Thanks for donating to " . $_SESSION['receiver'] . ".

"; + if (false != $link) + $msg .= "

Check our latest news!

"; + return $msg; +} + +if ($_GET['cli_debug'] == 'yes') + $cli_debug = true; + +if ($_GET['backend_test'] == 'no') +{ + $cli_debug = true; + $backend_test = false; +} + +session_start(); + +if (! isset ($_SESSION['payment_ok'])) + echo "

Please land here after a successful payment!

"; +else{ + $news = false; + switch ($_SESSION['receiver']){ + case "Taler": + $news = "https://taler.net/news"; + break; + case "GNUnet": + $news = "https://gnunet.org/"; + break; + case "Tor": + $news = "https://www.torproject.org/press/press.html.en"; + break; + } + echo generate_msg ($news); +} + +?> +
+
+ + diff --git a/src/frontend/fullfillment.php b/src/frontend/fullfillment.php deleted file mode 100644 index f22fd1d8..00000000 --- a/src/frontend/fullfillment.php +++ /dev/null @@ -1,86 +0,0 @@ - - - - Taler's "Demo" Shop - - - - -
- - -

Toy Store - Payment succeeded

-
- - - -
-
- - -*/ - -$cli_debug = false; -$backend_test = true; - -function generate_msg ($link){ - $msg = "

Thanks for donating to " . $_SESSION['receiver'] . ".

"; - if (false != $link) - $msg .= "

Check our latest news!

"; - return $msg; -} - -if ($_GET['cli_debug'] == 'yes') - $cli_debug = true; - -if ($_GET['backend_test'] == 'no') -{ - $cli_debug = true; - $backend_test = false; -} - -session_start(); - -if (! isset ($_SESSION['payment_ok'])) - echo "

Please land here after a successful payment!

"; -else{ - $news = false; - switch ($_SESSION['receiver']){ - case "Taler": - $news = "https://taler.net/news"; - break; - case "GNUnet": - $news = "https://gnunet.org/"; - break; - case "Tor": - $news = "https://www.torproject.org/press/press.html.en"; - break; - } - echo generate_msg ($news); -} - -?> -
-
- - diff --git a/src/frontend/pay.php b/src/frontend/pay.php index e200b382..0ec87cf5 100644 --- a/src/frontend/pay.php +++ b/src/frontend/pay.php @@ -118,7 +118,9 @@ else { $_SESSION['payment_ok'] = true; http_response_code (301); - header("Location: http://" . $_SERVER["SERVER_NAME"] . "/fullfillment"); + $url = (new http\URL("http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]")) + ->mod(array ("path" => "fulfillment.php"), http\Url::JOIN_PATH); + header("Location: $url"); die(); } diff --git a/src/frontend/style.css b/src/frontend/style.css index 4346b0d0..c2cc51ee 100644 --- a/src/frontend/style.css +++ b/src/frontend/style.css @@ -63,3 +63,61 @@ h3 { h4, h5, h6 { font-size: 100%; } + +.loader { + font-size: 10px; + margin: 50px auto; + text-indent: -9999em; + width: 11em; + height: 11em; + border-radius: 50%; + background: #ffffff; + background: -moz-linear-gradient(left, #000 10%, rgba(255, 255, 255, 0) 42%); + background: -webkit-linear-gradient(left, #000 10%, rgba(255, 255, 255, 0) 42%); + background: -o-linear-gradient(left, #000 10%, rgba(255, 255, 255, 0) 42%); + background: -ms-linear-gradient(left, #000 10%, rgba(255, 255, 255, 0) 42%); + position: relative; + -webkit-animation: load3 1.4s infinite linear; + animation: load3 1.4s infinite linear; + -webkit-transform: translateZ(0); + -ms-transform: translateZ(0); + transform: translateZ(0); +} + +.loader:after { + background: #fff; + width: 75%; + height: 75%; + border-radius: 50%; + content: ''; + margin: auto; + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; +} + +@-webkit-keyframes load3 { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} + +@keyframes load3 { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} + + -- cgit v1.2.3