thiswebshoprules

git clone https://git.tarina.org/thiswebshoprules
Log | Files | Refs

commit 235f0b60c217597c0e4fe328b28ac2d237e5d984
parent 643de1f21d0acfee4b6c47157f46ce8c336d9532
Author: rob <rob@tarina.org>
Date:   Mon,  4 Mar 2024 15:46:55 +0200

soon out of beta

Diffstat:
Apublic_html/static/robstyle.css | 634+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic_html/static/splash.css | 641+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apublic_html/templates/almost.html | 74++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mpublic_html/templates/base.html | 4++--
Mpublic_html/templates/index.html | 7+++++--
Mpublic_html/templates/op.html | 2+-
Mpublic_html/templates/paybtc.html | 87+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------
Mpublic_html/templates/payln.html | 50++++++++++++++++++++++++++++++++++++++++++++++----
Mpublic_html/templates/pending.html | 2+-
Apublic_html/templates/propaganda.html | 36++++++++++++++++++++++++++++++++++++
Apublic_html/templates/splash.html | 15+++++++++++++++
Mserver.py | 160+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
12 files changed, 1688 insertions(+), 24 deletions(-)

diff --git a/public_html/static/robstyle.css b/public_html/static/robstyle.css @@ -0,0 +1,634 @@ +@font-face{ + font-family: "Latin-Mono-Regular"; + src: url('fonts/lmmono10-regular.otf'), + url('fonts/lmmono10-regular.otf'); /* IE */ + } + +@font-face{ + font-family: "Latin-Mono-Italic"; + src: url('fonts/lmmono10-italic.otf'), + url('fonts/lmmono10-italic.otf'); /* IE */ + } + +@font-face{ + font-family: "Roberta"; + src: url('fonts/roberta.ttf'), + url('fonts/roberta.ttf'); /* IE */ + } + +@font-face{ + font-family: "Digital"; + src: url('fonts/digital_counter_7.ttf'), + url('fonts/digital_counter_7.ttf'); /* IE */ + } +@font-face{ + font-family: "Retro"; + src: url('fonts/retro.ttf'), + url('fonts/retro.ttf'); /* IE */ + } +@font-face{ + font-family: "Cyber"; + src: url('fonts/cyber.ttf'), + url('fonts/cyber.ttf'); /* IE */ + } + +body +{ + margin:0 auto; + border:0px; + text-align: center; + background-color:#242021; + font-family: 'Latin-Mono-Regular', sans-serif; + font-weight: normal; + color: #f4f4f4; + font-size: 10pt; +} + +a +{ + color:#FFBA00; + text-decoration: none; +} + +a:hover +{ + color: #fcdd09; + padding: 2px; +} + +h1 +{ + padding: 0px; + margin: 0px; + font-size: 71pt; + color:#f8f9fa; + font-family: 'Roberta', sans-serif; + line-height: 75px; + font-weight: normal; +} + +h2 +{ + padding: 0px; + margin: 0px; + font-size: 20pt; + font-family: 'Latin-Mono-Italic', sans-serif; + font-weight: normal; +} + + +h3 +{ + padding: 0px; + margin: 0px; + font-size: 50pt; + line-height: 45px; + color:#f8f9fa; + text-transform:uppercase; + font-family: 'Roberta', sans-serif; + font-weight: normal; +} + +h4 +{ + padding: 0px; + margin: 0px; + font-size: 21pt; + font-family: 'Cyber', sans-serif; + font-weight: normal; +} + +h5 +{ + padding: 0px; + margin: 20px; + color:#f8f9fa; + font-size: 17pt; + line-height: 0px; + font-family: 'Retro', sans-serif; + font-weight: normal; +} + +h6 +{ + padding: 0px; + margin: 0px; + font-size: 12pt; + font-family: 'Digital', sans-serif; + font-weight: normal; +} + + +table +{ + padding: 0px; + margin: 0px auto; + width: 80%; + font-style: normal; + font-weight: normal; + +} + +td { + display: block; + clear:both; + } + +th { + display: block; + clear:both; + } + +video +{ + width: 100%; +} + +input +{ + width: 70%; + height: 30px; + border: 0px solid; + color: #fff; + padding-left: 5px; + padding-right: 5px; + background-color:#555; + border-radius: 3px; +} + +button +{ + color: #fff; + border-radius: 3px; + font-size: 14pt; + background-color: #444; + border: 0px; + padding: 5px; + height: 30px; + width: 20%; +} + +button:hover +{ + + background-color: #ff0000; +} + +img +{ + border-radius: 3px; + width: 90%; + max-width: 900px; +} + +#container +{ + margin: 0px auto; + height: auto; + max-width: 500px; + text-align: center; +} + +#propaganda-container +{ + margin: 0px auto; + height: auto; + max-width: 1500px; + text-align: center; +} + +.promopic { + position: relative; + color: white; +} + +.promotext { + position: absolute; + text-align: right; + top: 10%; + left: 10%; + transform: translate(-10%, -10%); + width: 400px; +} + +.bild +{ + + background-color: #29252b; + border-radius: 5px; +} +.bild p +{ + font-size: 14px; + margin:0px; +} +.bild h4 +{ + padding:5px; +} + +#album +{ + margin: 0px auto; + height: auto; + width: 90%; + max-width: 900px; +} + +#default +{ + margin: 0 auto; + padding-top: 5px; + width: 95%; + max-width: 400px; + height: auto; +} + +#logo +{ + padding-top: 5px; + width: 95%; + padding-bottom: 6px; +} + +#tools +{ + font-family: 'Roberta', sans-serif; + font-size:25pt; + padding-bottom: 10px; +} + +#shoutbox +{ + text-align: left; + padding-left: 5%; + padding-top: 10px; + padding-bottom: 20px; +} + +#shoutbox p +{ + margin: 2px; +} + +#matrix-shoutbox +{ + margin-top: 10px; +} + +#matrix-shoutbox img +{ + width: 90%; +} + +#time +{ + font-size: 8pt; + color: #98ffff; +} + +#msg +{ + font-size: 11pt; + color: #98ffff; +} + +#top +{ + margin: 0 auto; + text-align: center; + height: 60vh; + width: 50%; +} + +#robin +{ + background-color:#3B6861; + padding-bottom: 100px; + margin: 0px auto; + font-weight: normal; + font-size: 16px; + text-align: center; +} + +#footer +{ + position: fixed; + margin: 0 auto; + background-color:#231f20; + font-weight: normal; + font-size: 17px; + bottom:0px; + padding-top:10px; + height:30px; + width: 100%; +} + +#onair +{ + font-size: 30px; + color: #DB232C; + opacity: 0.2; +} + +#tipjar img +{ + max-width: 350px; + padding:2px; + background-color:#fff; + width: 35%; + border-radius: 2px; +} +#onair.neon {opacity: 1} +#onair.neonoff {opacity: 0.2} + +#onairvideo +{ + font-family: "Digital"; + font-size: 14px; + color: #032604; + opacity: 0.5; + text-align: center; + padding-top: 5px; + padding-bottom: 5px; +} + +#onairvideo.neongreen {opacity: 1} +#onairvideo.neongreenoff {opacity: 0.2} + +#song { + font-family: "Digital"; + font-size: 15px; + color: #fcdd09; + opacity: 0.5; + text-align: center; + padding-top: 10px; +} + +#lyssnare { + font-family: "Digital"; + font-size: 15px; + color: #7CFC00; + opacity: 0.5; + text-align: center; + padding-top: 10px; +} + +#bag +{ + margin: 0px auto; + position:fixed; + color:#fff; + top:0; + width:100%; + background:#0A5200; +} + +#insidebag +{ + margin: 10px auto; + font-size: 14px; + width:100%; +} + +table, tbody, tr, td +{ + width: 100%; +} + +input, select +{ + padding: 4px; + color: #fff; + background-color: #555; + font-size: 16px; + border: 0px; +} + +textarea +{ + padding: 4px; + color: #fff; + background-color: #555; + font-size: 16px; + border: 0px; + width: 70%; + height: 20px; +} + +button +{ + margin:10px; + padding: 4px; + font-size: 18px; + color: #fff; + background-color: #333; + width: 90%; +} + +pre +{ + white-space: pre-wrap; /* Since CSS 2.1 */ + white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + word-wrap: break-word; /* Internet Explorer 5.5+ */ +} + +.logo +{ + width: 80%; + height:auto; +} + +.logo2 +{ + width: 70%; + height:auto; +} + +.intro +{ + margin: 10px auto; + scroll-margin-top: 10rem; + padding: 10px; + border-radius:5px; + padding-bottom: 20px; +} + +.product +{ + margin: 10px auto; + scroll-margin-top: 10rem; + width: 80%; + padding: 10px; + border-radius:5px; + background-color:#333; + padding-bottom: 20px; +} + +.editproduct +{ + margin: 1px; + display:inline-block; + border-radius:5px; + background-color:#333; +} + +.orders +{ + margin:0 auto; + background-color:#333; + font-weight: normal; + font-style: normal; + font-size: 15px; + padding-top: 5px; + padding-left: 20px; + padding-right: 20px; + text-align: left; + height: auto; + width: 90%; + padding-bottom: 20px; + border-radius:5px; +} + +.imgprod +{ + border-radius:5px; +} + +#payid +{ + margin: 0px auto; + color: #888; + text-decoration: normal; + background-color: #111; + border: 0px; + width: 100%; + font-size: 10px; + text-align: center; + white-space: pre-wrap; /* CSS3 */ + white-space: -moz-pre-wrap; /* Firefox */ + white-space: -pre-wrap; /* Opera <7 */ + white-space: -o-pre-wrap; /* Opera 7 */ + word-wrap: break-word; /* IE */ +} + +#payreq +{ + margin: 0px auto; + color: #888; + background-color: #111; + border: 0px; + width: 100%; + height: 55px; + font-size: 10px; + text-align: center; + white-space: pre-wrap; /* CSS3 */ + white-space: -moz-pre-wrap; /* Firefox */ + white-space: -pre-wrap; /* Opera <7 */ + white-space: -o-pre-wrap; /* Opera 7 */ + word-wrap: break-word; /* IE */ +} + +#copybutton +{ + color: #fff; + text-decoration: bold; + background-color: #111; + border: 0px; + padding: 5px; + width: auto; +} + +#backbutton +{ + color: #fff; + text-decoration: bold; + background-color: #111; + border: 0px; + padding: 5px; + width: auto; +} + +#description +{ + height:300px; +} + +#description2 +{ + height:300px; +} + +.neonoff { + font-family: "Latin-Mono-Regular"; + color: #DB232C; + text-transform: uppercase; + text-align: center; + opacity: 0.2; + } + +.neon { + font-family: "Roberta"; + color: #DB232C; + text-align: center; + opacity: 1; + } + +.neon { + animation: neon 20.9s infinite alternate; + -moz-animation: neon 20.9s infinite alternate; + -webkit-animation: neon 20.9s infinite alternate; +} + +.neongreenoff { + font-family: "Digital"; + color: #23db29; + text-transform: uppercase; + text-align: center; + opacity: 0.2; + } + +.neongreen { + font-family: "Digital"; + color: #D2974E; + text-transform: uppercase; + text-align: center; + opacity: 1; + } + +.neongreen { + animation: neongreen 20.9s infinite alternate; + -moz-animation: neongreen 20.9s infinite alternate; + -webkit-animation: neongreen 20.9s infinite alternate; +} + +@keyframes neon { + 0%, 19%, 21%, 23%, 25%, 14%, 6%, 10% { + text-shadow: 0 0 1vw #FA1C16, 0 0 3vw #FA1C16, 0 0 10vw #FA1C16, 0 0 10vw #FA1C16; + color: #DB232C; + } + 50% { + text-shadow: 0 0 .5vw #800E0B, 0 0 1.5vw #800E0B, 0 0 5vw #800E0B, 0 0 5vw #800E0B; + } + 20%, 24%, 55% { + text-shadow: none; + box-shadow: none; + } + } + +@keyframes neongreen { + 0%, 19%, 21%, 23%, 25%, 14%, 26%, 10% { + text-shadow: 0 0 1vw #16fa1e, 0 0 3vw #16fa1e, 0 0 10vw #16fa1e, 0 0 10vw #16fa1e; + color: #26db23; + } + 50% { + text-shadow: 0 0 .5vw #0d7f0b, 0 0 1.5vw #0d7f0b, 0 0 5vw #0d7f0b, 0 0 5vw #0d7f0b; + } + 2%, 14%, 5% { + text-shadow: none; + box-shadow: none; + } + } + diff --git a/public_html/static/splash.css b/public_html/static/splash.css @@ -0,0 +1,641 @@ +@font-face{ + font-family: "Latin-Mono-Regular"; + src: url('fonts/lmmono10-regular.otf'), + url('fonts/lmmono10-regular.otf'); /* IE */ + } + +@font-face{ + font-family: "Latin-Mono-Italic"; + src: url('fonts/lmmono10-italic.otf'), + url('fonts/lmmono10-italic.otf'); /* IE */ + } + +@font-face{ + font-family: "Roberta"; + src: url('fonts/roberta.ttf'), + url('fonts/roberta.ttf'); /* IE */ + } + +@font-face{ + font-family: "Digital"; + src: url('fonts/digital_counter_7.ttf'), + url('fonts/digital_counter_7.ttf'); /* IE */ + } +@font-face{ + font-family: "Retro"; + src: url('fonts/retro.ttf'), + url('fonts/retro.ttf'); /* IE */ + } +@font-face{ + font-family: "Cyber"; + src: url('fonts/cyber.ttf'), + url('fonts/cyber.ttf'); /* IE */ + } + +body +{ + margin:0 auto; + border:0px; + text-align: center; + background-color:#242021; + font-family: 'Latin-Mono-Regular', sans-serif; + font-weight: normal; + color: #f4f4f4; + font-size: 12pt; +} + +a +{ + color:#FFBA00; + text-decoration: none; +} + +a:hover +{ + color: #fcdd09; + padding: 2px; +} + +h1 +{ + padding: 0px; + margin: 0px; + font-size: 100px; + color:#f8f9fa; + font-family: 'Roberta', sans-serif; + line-height: 75px; + font-weight: normal; +} + +h2 +{ + padding: 0px; + margin: 0px; + font-size: 50pt; + line-height: 55px; + font-family: 'Latin-Mono-Italic', sans-serif; + font-weight: normal; +} + + +h3 +{ + padding: 0px; + margin: 0px; + font-size: 50pt; + line-height: 45px; + color:#f8f9fa; + text-transform:uppercase; + font-family: 'Roberta', sans-serif; + font-weight: normal; +} + +h4 +{ + padding: 0px; + margin: 0px; + font-size: 35pt; + line-height: 40px; + font-family: 'Cyber', sans-serif; + font-weight: normal; +} + +h5 +{ + padding: 0px; + margin: 30px; + color:#f8f9fa; + font-size: 35pt; + line-height: 40px; + font-family: 'Retro', sans-serif; + font-weight: normal; +} + +h6 +{ + padding: 0px; + margin: 0px; + font-size: 30pt; + font-family: 'Digital', sans-serif; + font-weight: normal; +} + + +table +{ + padding: 0px; + margin: 0px auto; + width: 80%; + font-style: normal; + font-weight: normal; + +} + +td { + display: block; + clear:both; + } + +th { + display: block; + clear:both; + } + +video +{ + width: 100%; +} + +input +{ + width: 70%; + height: 30px; + border: 0px solid; + color: #fff; + padding-left: 5px; + padding-right: 5px; + background-color:#555; + border-radius: 3px; +} + +button +{ + color: #fff; + border-radius: 3px; + font-size: 14pt; + font-family: 'Roberta', sans-serif; + background-color: #444; + border: 0px; + padding: 5px; + height: 30px; + width: 20%; +} + +button:hover +{ + + background-color: #ff0000; +} + +img +{ + border-radius: 30px; + width: 100%; + max-width: 900px; +} + +#container +{ + margin: 0px auto; + height: auto; + max-width: 500px; + text-align: center; +} + +#propaganda-container +{ + margin: 0px auto; + height: auto; + width: 90%; + text-align: center; +} + +.introtext +{ + margin: 0px auto; + width: 80%; + height: auto; + text-align: center; + max-width: 500px; +} + +.promotext +{ + margin: 0px auto; + width: 50%; + height: auto; + text-align: center; + max-width: 400px; +} + +.bild +{ + + background-color: #29252b; + border-radius: 5px; +} +.bild p +{ + font-size: 14px; + margin:0px; +} +.bild h4 +{ + padding:5px; +} + +#album +{ + margin: 0px auto; + height: auto; + width: 90%; + max-width: 900px; +} + +#default +{ + margin: 0 auto; + padding-top: 5px; + width: 95%; + max-width: 400px; + height: auto; +} + +#logo +{ + padding-top: 5px; + width: 95%; + padding-bottom: 6px; +} + +#tools +{ + font-family: 'Roberta', sans-serif; + font-size:25pt; + padding-bottom: 10px; +} + +#shoutbox +{ + text-align: left; + padding-left: 5%; + padding-top: 10px; + padding-bottom: 20px; +} + +#shoutbox p +{ + margin: 2px; +} + +#matrix-shoutbox +{ + margin-top: 10px; +} + +#matrix-shoutbox img +{ + width: 90%; +} + +#time +{ + font-size: 8pt; + color: #98ffff; +} + +#msg +{ + font-size: 11pt; + color: #98ffff; +} + +#top +{ + margin: 0 auto; + text-align: center; + height: 60vh; + width: 50%; +} + +#robin +{ + background-color:#3B6861; + padding-bottom: 100px; + margin: 0px auto; + font-weight: normal; + font-size: 16px; + text-align: center; +} + +#footer +{ + position: fixed; + margin: 0 auto; + background-color:#231f20; + font-weight: normal; + font-size: 17px; + bottom:0px; + padding-top:10px; + height:30px; + width: 100%; +} + +#onair +{ + font-size: 30px; + color: #DB232C; + opacity: 0.2; +} + +#tipjar img +{ + max-width: 350px; + padding:2px; + background-color:#fff; + width: 35%; + border-radius: 2px; +} +#onair.neon {opacity: 1} +#onair.neonoff {opacity: 0.2} + +#onairvideo +{ + font-family: "Digital"; + font-size: 14px; + color: #032604; + opacity: 0.5; + text-align: center; + padding-top: 5px; + padding-bottom: 5px; +} + +#onairvideo.neongreen {opacity: 1} +#onairvideo.neongreenoff {opacity: 0.2} + +#song { + font-family: "Digital"; + font-size: 15px; + color: #fcdd09; + opacity: 0.5; + text-align: center; + padding-top: 10px; +} + +#lyssnare { + font-family: "Digital"; + font-size: 15px; + color: #7CFC00; + opacity: 0.5; + text-align: center; + padding-top: 10px; +} + +#bag +{ + margin: 0px auto; + position:fixed; + color:#fff; + top:0; + width:100%; + background:#0A5200; +} + +#insidebag +{ + margin: 10px auto; + font-size: 14px; + width:100%; +} + +table, tbody, tr, td +{ + width: 100%; +} + +input, select +{ + padding: 4px; + color: #fff; + background-color: #555; + font-size: 16px; + border: 0px; +} + +textarea +{ + padding: 4px; + color: #fff; + background-color: #555; + font-size: 16px; + border: 0px; + width: 100%; + height: 20px; +} + +button +{ + margin:10px; + padding: 4px; + font-size: 18px; + color: #fff; + background-color: #333; + width: 90%; +} + +pre +{ + white-space: pre-wrap; /* Since CSS 2.1 */ + white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + word-wrap: break-word; /* Internet Explorer 5.5+ */ +} + +.logo +{ + width: 80%; + height:auto; +} + +.logo2 +{ + width: 70%; + height:auto; +} + +.intro +{ + margin: 10px auto; + scroll-margin-top: 10rem; + padding: 10px; + border-radius:5px; + padding-bottom: 20px; +} + +.product +{ + margin: 10px auto; + scroll-margin-top: 10rem; + width: 80%; + padding: 10px; + border-radius:5px; + background-color:#333; + padding-bottom: 20px; +} + +.editproduct +{ + margin: 1px; + display:inline-block; + border-radius:5px; + background-color:#333; +} + +.orders +{ + margin:0 auto; + background-color:#333; + font-weight: normal; + font-style: normal; + font-size: 15px; + padding-top: 5px; + padding-left: 20px; + padding-right: 20px; + text-align: left; + height: auto; + width: 90%; + padding-bottom: 20px; + border-radius:5px; +} + +.imgprod +{ + border-radius:5px; +} + +#payid +{ + margin: 0px auto; + color: #888; + text-decoration: normal; + background-color: #111; + border: 0px; + width: 100%; + font-size: 10px; + text-align: center; + white-space: pre-wrap; /* CSS3 */ + white-space: -moz-pre-wrap; /* Firefox */ + white-space: -pre-wrap; /* Opera <7 */ + white-space: -o-pre-wrap; /* Opera 7 */ + word-wrap: break-word; /* IE */ +} + +#payreq +{ + margin: 0px auto; + color: #888; + background-color: #111; + border: 0px; + width: 100%; + height: 55px; + font-size: 10px; + text-align: center; + white-space: pre-wrap; /* CSS3 */ + white-space: -moz-pre-wrap; /* Firefox */ + white-space: -pre-wrap; /* Opera <7 */ + white-space: -o-pre-wrap; /* Opera 7 */ + word-wrap: break-word; /* IE */ +} + +#copybutton +{ + color: #333; + text-decoration: bold; + background-color: #111; + border: 0px; + padding: 5px; + width: auto; +} + +#backbutton +{ + color: #333; + text-decoration: bold; + background-color: #111; + border: 0px; + padding: 5px; + width: auto; +} + +#description +{ + height:300px; +} + +#description2 +{ + height:300px; +} + +.neonoff { + font-family: "Latin-Mono-Regular"; + color: #DB232C; + text-transform: uppercase; + text-align: center; + opacity: 0.2; + } + +.neon { + font-family: "Roberta"; + color: #DB232C; + text-align: center; + opacity: 1; + } + +.neon { + animation: neon 20.9s infinite alternate; + -moz-animation: neon 20.9s infinite alternate; + -webkit-animation: neon 20.9s infinite alternate; +} + +.neongreenoff { + font-family: "Digital"; + color: #23db29; + text-transform: uppercase; + text-align: center; + opacity: 0.2; + } + +.neongreen { + font-family: "Digital"; + color: #D2974E; + text-transform: uppercase; + text-align: center; + opacity: 1; + } + +.neongreen { + animation: neongreen 20.9s infinite alternate; + -moz-animation: neongreen 20.9s infinite alternate; + -webkit-animation: neongreen 20.9s infinite alternate; +} + +@keyframes neon { + 0%, 19%, 21%, 23%, 25%, 14%, 6%, 10% { + text-shadow: 0 0 1vw #FA1C16, 0 0 3vw #FA1C16, 0 0 10vw #FA1C16, 0 0 10vw #FA1C16; + color: #DB232C; + } + 50% { + text-shadow: 0 0 .5vw #800E0B, 0 0 1.5vw #800E0B, 0 0 5vw #800E0B, 0 0 5vw #800E0B; + } + 20%, 24%, 55% { + text-shadow: none; + box-shadow: none; + } + } + +@keyframes neongreen { + 0%, 19%, 21%, 23%, 25%, 14%, 26%, 10% { + text-shadow: 0 0 1vw #16fa1e, 0 0 3vw #16fa1e, 0 0 10vw #16fa1e, 0 0 10vw #16fa1e; + color: #26db23; + } + 50% { + text-shadow: 0 0 .5vw #0d7f0b, 0 0 1.5vw #0d7f0b, 0 0 5vw #0d7f0b, 0 0 5vw #0d7f0b; + } + 2%, 14%, 5% { + text-shadow: none; + box-shadow: none; + } + } + diff --git a/public_html/templates/almost.html b/public_html/templates/almost.html @@ -0,0 +1,74 @@ +$def with (products,bag,sessionkey,productname,inbag,db,getprice,getrate,category,markdown) +$ totsats = 0 +$ toteuro = 0 +$ x = 0 +$if sessionkey != 'empty': + <div id="bag"> + <div id="insidebag"> + in your cart:<br> + $for i in bag: + $code: + price = getprice(i.product) + quantity = i.quantity + p_totsats=i.quantity*price[0] + p_toteuro=i.quantity*price[1] + $i.quantity x $productname(i.product) + $p_totsats $p_toteuro&euro; <a href="/dropitem/$i.product">remove</a><br> + $code: + totsats += p_totsats + toteuro += p_toteuro + $if totsats > 0: + total: $totsats Satoshi or $toteuro &euro; + <br> + <a href="/checkout">CHECKOUT --></a> + <br> + <code>~*~</code> + </div> + </div> + +$ siteconfig = db.select('propaganda', what='id, name, description, description2')[0] + +<div class="introtext"> +<br> +<code>~*~</code> +<br> +<br> +<h1>$siteconfig.name</h1> +$:markdown.markdown(siteconfig.description) +$:markdown.markdown(siteconfig.description2) +<code>~</code> +<br> +<br> +</div> + +$ goodies = db.query("SELECT * FROM propagandapics;") +$for g in goodies: + $if g.soundname[-5:] == '.jpeg' or g.soundname[-4:] == '.png': + <div class="promopic"> + <img src="/static/img/web/$g.soundname"> + <br> + <br> + <code>~*~</code> + <br> + <br> + <div class="promotext"> + $:markdown.markdown(g.name) + $:markdown.markdown(g.description) + $:markdown.markdown(g.description2) + <br> + <code>~</code> + <br> + </div> + </div> +<br> +<br> +<br> + +</div> +<br> +<br> +<br> +<br> +<br> +<br> +<br> diff --git a/public_html/templates/base.html b/public_html/templates/base.html @@ -2,8 +2,8 @@ $def with (content) <!doctype html> <HEAD> <meta charset="utf-8"> - <title>Gonzo Pi shop | a retake on filmmaking</title> - <link rel="stylesheet" href="/static/robstyle.css?v=95" type="text/css" rel="stylesheet"/> + <title>Gonzo Pi | a retake on filmmaking</title> + <link rel="stylesheet" href="/static/robstyle.css?v=127" type="text/css" rel="stylesheet"/> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta http-equiv="cache-control" content="no-cache"> </HEAD> diff --git a/public_html/templates/index.html b/public_html/templates/index.html @@ -32,7 +32,10 @@ $ categories = db.select('categories', what='id, category') <div id="container"> <div class="intro"> -<img src="/static/img/thumb/logo.png"> +$#<img src="/static/img/thumb/logo.png"> +<br> +<code>~*~</code> +<br> <br> <h1>$siteconfig.name</h1> $:markdown.markdown(siteconfig.description) @@ -58,7 +61,7 @@ $for i in products: $ goodies = db.query("SELECT * FROM soundlink WHERE id='" +i.id+"';") $for g in goodies: $if g.soundname[-5:] == '.jpeg' or g.soundname[-4:] == '.png': - <a href="/bigpic/$g.id"><img class="imgprod" src="/static/img/web/$g.soundname"></a> + <a href="/bigpic/$g.id"><img class="imgprod" src="/static/img/thumb/$g.soundname"></a> <br> <br> $code: diff --git a/public_html/templates/op.html b/public_html/templates/op.html @@ -8,7 +8,7 @@ $def with (content) <meta http-equiv="cache-control" content="no-cache"> </HEAD> <BODY> - <a href="/config">Config</a> | <a href="/categories">Categories</a> | <a href="/products/">Products</a> | <a href="/shipping/">Shipping</a> | <a href="/orders">Orders</a> | <a href="/logout">Logout</a> + <a href="/propaganda">Propaganda</a> | <a href="/config">Config</a> | <a href="/categories">Categories</a> | <a href="/products/">Products</a> | <a href="/shipping/">Shipping</a> | <a href="/orders">Orders</a> | <a href="/logout">Logout</a> <div id="container"> $:content </div> diff --git a/public_html/templates/paybtc.html b/public_html/templates/paybtc.html @@ -1,4 +1,4 @@ -$def with (invoice, btcaddress, btcuri, showpayment) +$def with (invoice, btcaddress, btcuri, showpayment, bag, productname, db, getprice, getrate, ordertype, pendinginfo, eur_to_sat) $ qr = '/static/qr/' + btcaddress + '.png' <script> function copy() { @@ -8,25 +8,78 @@ function copy() { } </script> <meta http-equiv="refresh" content="60" /> + +<div id="container"> <br> -<h3>$invoice.products</h3> -<h3>$float(invoice.amount/100)&euro;</h3> -<h3>$invoice.totsats Satoshi</h3> +<a href="/checkout">Go back!</a> + +<br> +in your order:<br> +$ totsats=0 +$ toteuro=0 +$for i in bag: + $ goodies = db.query("SELECT * FROM soundlink WHERE id='" +i.product+"';") + $code: + price = getprice(i.product) + quantity = i.quantity + p_totsats=i.quantity*price[0] + p_toteuro=i.quantity*price[1] + $i.quantity x $productname(i.product) + $p_totsats $p_toteuro&euro;<br> + $for g in goodies: + $if g.soundname[-5:] == '.jpeg' or g.soundname[-4:] == '.png': + <img src="/static/img/thumb/$g.soundname" style="width:120px"> + <br> + $code: + totsats += p_totsats + toteuro += p_toteuro +$if totsats > 0: + <br> + +$if ordertype() == 'digital': + <h2>Digital goods will be shipped to your email once invoice paid..</h2> +$else: + $ shippinginfo = db.select('shipping', where="country='" + pendinginfo.country + "'", what='price, days')[0] + Shipping cost to $pendinginfo.country is <br>$eur_to_sat(shippinginfo.price) Satoshi or ~ $(shippinginfo.price/100)&euro; <br> + Shipping estimate is $shippinginfo.days days<br> + $code: + totsats += eur_to_sat(shippinginfo.price) + toteuro += shippinginfo.price/100 + <pre> + First Name: $pendinginfo.firstname + Last Name: $pendinginfo.lastname + Country: $pendinginfo.country + Address: $pendinginfo.address + Town: $pendinginfo.town + Postalcode: $pendinginfo.postalcode + Email: $pendinginfo.email + </pre> + +<br> +$if totsats > 0: + total: $totsats Satoshi ~ $(toteuro)&euro; + with rate: $getrate()&euro;/₿ + +<br> +Order is only reserved once paid. +<br> +<br> + $if showpayment == []: - <h3>Status: not paid</h3> + <h5>Status: not paid</h5> $else: $for i in showpayment: - <h4>Status:</h4> - <h4>txid: $i['txids']</h4> - <h4>confirmations: $i['confirmations']</h4> + <h2>Status:</h2> + <h2>txid: $i['txids']</h2> + <h2>confirmations: $i['confirmations']</h2> <br> -<img src="$qr"> +<img style="width:220px" src="$qr"> <div id='hash'> -<h4>bitcoin address:</h4> +<h2>bitcoin address:</h2> <textarea id='payid'> $btcaddress </textarea> -<h4>pay uri:</h4> +<h2>pay uri:</h2> <textarea id='payreq'> $btcuri </textarea> @@ -34,3 +87,15 @@ $btcuri <button id="copybutton" onclick="copy()">Copy</button> <button id="backbutton" autofocus onclick="parent.location='/payln/$invoice.invoice_key'">Pay with Lightning</button> </div> + +<br> +<br> + +<a href="/checkout">Go back!</a> + +<br> +</div> +<br> +<br> +<br> +<br> diff --git a/public_html/templates/payln.html b/public_html/templates/payln.html @@ -1,4 +1,4 @@ -$def with (lninvoice,invoice,bag,productname,digitalkey,db,getprice,getrate) +$def with (lninvoice,invoice,bag,productname,digitalkey,db,getprice,getrate,ordertype,pendinginfo,eur_to_sat) $ qr = '/static/qr/' + invoice['invoice_key'] + '.png' <script> function copy() { @@ -9,6 +9,8 @@ function copy() { </script> <div id="container"> +<br> +<br> $if lninvoice['status'] != 'paid': <meta http-equiv="refresh" content="30" /> <a href="/checkout">Go back!</a> @@ -40,6 +42,36 @@ $for i in bag: $code: totsats += p_totsats toteuro += p_toteuro + +$if ordertype() == 'digital': + <h2>Digital goods will be shipped to your email once invoice paid..</h2> +$else: + $ shippinginfo = db.select('shipping', where="country='" + pendinginfo.country + "'", what='price, days')[0] + Shipping cost to $pendinginfo.country is <br>$eur_to_sat(shippinginfo.price) Satoshi or ~ $(shippinginfo.price/100)&euro; <br> + Shipping estimate is $shippinginfo.days days<br> + $code: + totsats += eur_to_sat(shippinginfo.price) + toteuro += shippinginfo.price/100 + <pre> + First Name: $pendinginfo.firstname + Last Name: $pendinginfo.lastname + Country: $pendinginfo.country + Address: $pendinginfo.address + Town: $pendinginfo.town + Postalcode: $pendinginfo.postalcode + Email: $pendinginfo.email + </pre> + +<br> +$if totsats > 0: + total: $totsats Satoshi $(toteuro)&euro; + with rate: $getrate()&euro;/₿ + +<br> +Order is only reserved once paid. +<br> +<br> + $if totsats > 0: <br> total: $totsats Satoshi or $toteuro &euro;<br> @@ -48,11 +80,11 @@ $if totsats > 0: <br> <a href="lightning:$lninvoice['bolt11']"><img src="$qr"></a> <div id='hash'> -<h4>id:</h4> +<h2>id:</h2> <textarea id='payid'> $lninvoice['label'] </textarea> -<h4>bolt11:</h4> +<h2>bolt11:</h2> <textarea id='payreq'> $lninvoice['bolt11'] </textarea> @@ -60,5 +92,15 @@ $lninvoice['bolt11'] <button id="copybutton" onclick="copy()">Copy</button> <button id="backbutton" autofocus onclick="parent.location='/paybtc/$invoice.invoice_key'">Pay with Bitcoin on-chain</button> </div> -</div> +<br> +<br> + +<a href="/checkout">Go back!</a> + +<br> +</div> +<br> +<br> +<br> +<br> diff --git a/public_html/templates/pending.html b/public_html/templates/pending.html @@ -52,7 +52,7 @@ $else: <br> <p> $if totsats > 0: - total: $totsats Satosi $(toteuro)&euro; + total: $totsats Satoshi $(toteuro)&euro; <p> <br> <a href="/checkout">Go back!</a> diff --git a/public_html/templates/propaganda.html b/public_html/templates/propaganda.html @@ -0,0 +1,36 @@ +$def with (configform, picform, goodies, nocache) +<div id="container"> +<div id="default"> +<br> +<form method="POST"> +$:configform.render() +</form> +<br> +<b>upload images</b> +<br> +$if goodies != None: + $for i in goodies: + $if i.soundname[-5:] == '.jpeg' or i.soundname[-4:] == '.png': + <img src="/static/img/thumb/$i.soundname?nocache=$nocache"> + $else: + <p>$i.soundname</p> + <br> + <a href='/propaganda?cmd=flipleft&soundname=$i.soundname'>flip to left</a> | + <a href='/propaganda?cmd=remove&soundname=$i.soundname'>remove</a> | + <a href='/propaganda?cmd=flipright&soundname=$i.soundname'>flip to right</a> + <br> + $picform.fill(name=i.name, description=i.description, description2=i.description2, id=i.soundlink) + <form method="POST"> + $:picform.render() + </form> + <hr> +<form method="POST" enctype="multipart/form-data" action=""> +<input type="file" name="imgfile"/> <br> +<br/> +<input name="upload", type="submit" value="upload" /> +</form> +</div> + +</div> +</div> +</div> diff --git a/public_html/templates/splash.html b/public_html/templates/splash.html @@ -0,0 +1,15 @@ +$def with (content) +<!doctype html> +<HEAD> + <meta charset="utf-8"> + <title>Gonzo Pi | a retake on filmmaking</title> + <link rel="stylesheet" href="/static/splash.css?v=98" type="text/css" rel="stylesheet"/> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta http-equiv="cache-control" content="no-cache"> +</HEAD> + +<BODY> + +$:content + +</BODY> diff --git a/server.py b/server.py @@ -24,6 +24,7 @@ from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException urls = ( '/?', 'index', + '/almost?', 'almost', '/putinbag/(.*)', 'putinbag', '/dropitem/(.*)?', 'dropitem', '/payln/(.*)', 'payln', @@ -43,6 +44,7 @@ urls = ( '/op', 'op', '/bitcoin', 'bitcoin', '/shipping/(.*)', 'shipping', + '/propaganda?', 'propaganda', '/config', 'config', '/payments?', 'payments') @@ -64,6 +66,7 @@ app = web.application(urls, globals()) store = web.session.DiskStore(basedir + 'sessions') render = web.template.render(templatedir, base="base") renderop = web.template.render(templatedir, base="op") +rendersplash = web.template.render(templatedir, base="splash") db = web.database(dbn='sqlite', db=basedir + "db/cyberpunkcafe.db") session = web.session.Session(app,store,initializer={'login':0, 'privilege':0, 'bag':[], 'sessionkey':'empty'}) @@ -311,6 +314,35 @@ class index(): session.sessionkey = 'empty' return render.index(products,bag,session.sessionkey,productname,inbag,db,getprice,getrate,i.category, markdown) +class almost(): + def GET(self): + checkforoldbags() + i = web.input(dropitem=None, putinbag=None,error=None,prod=None,category=None) + if session.sessionkey == 'empty': + session.sessionkey = hashlib.sha256(str(random.getrandbits(256)).encode('utf-8')).hexdigest()[15:35] + if i.dropitem != None: + session.bag = dropitems(i.dropitem) + print(session.bag) + if i.putinbag != None: + addtobag(i.putinbag) + return web.seeother('/#' + i.putinbag) + print('Cyberpunk cafe') + #print(session.bag) + products = db.query("SELECT * FROM products ORDER BY priority DESC") + try: + bag = db.query("SELECT * FROM customerbag WHERE sessionkey='" + session.sessionkey +"';") + except: + bag = None + try: + inbag = db.query("SELECT COUNT(*) AS inbag FROM customerbag where sessionkey='" + session.sessionkey +"';")[0] + inbag = int(inbag.inbag) + except: + inbag = None + if inbag < 1: + session.sessionkey = 'empty' + return rendersplash.almost(products,bag,session.sessionkey,productname,inbag,db,getprice,getrate,i.category, markdown) + + class putinbag: def GET(self, p): addtobag(p) @@ -488,7 +520,8 @@ class payln: digitalkey = db.select('digitalkey', where="invoice_key='"+invoice_key+"'")[0] if lninvoice['status'] != 'paid': bag = db.query("SELECT * FROM customerbag WHERE sessionkey='"+invoice_key+"';") - return render.payln(lninvoice,invoice,bag,productname,digitalkey,db,getprice,getrate) + pendinginfo = getpendinginfo() + return render.payln(lninvoice,invoice,bag,productname,digitalkey,db,getprice,getrate,ordertype,pendinginfo,eur_to_sat) class goodies(): def GET(self, digitalkey): @@ -512,11 +545,13 @@ class paybtc: confirmations = int(i['confirmations']) print(str(confirmations)) if invoice.datepaid == None and confirmations > 6: - msg = 'Tarina Shop order update! someone sent you Bitcoin! ' + baseurl + '/paybtc/' + invoice.invoice_key + msg = 'Gonzo Pi shop order update! someone sent you Bitcoin! ' + baseurl + '/paybtc/' + invoice.invoice_key print(msg) sendmail(webmaster, 'Tarina Shop', msg) db.update('invoices', where="invoice_key='" + invoice.invoice_key + "'", status='paid', datepaid=time.strftime('%Y-%m-%d %H:%M:%S')) - return render.paybtc(invoice, btcaddress, btcuri, showpayment) + pendinginfo = getpendinginfo() + bag = db.query("SELECT * FROM customerbag WHERE sessionkey='"+invoice_key+"';") + return render.paybtc(invoice, btcaddress, btcuri, showpayment, bag, productname, db, getprice, getrate, ordertype, pendinginfo, eur_to_sat) class orders(): def GET(self): @@ -630,6 +665,125 @@ class op: else: raise web.seeother('/login') +class propaganda: + form = web.form.Form( + web.form.Textbox('name', web.form.notnull, description="Site name:"), + web.form.Textarea('description', web.form.notnull, description="Slogan:"), + web.form.Textarea('description2', web.form.notnull, description="Description:"), + web.form.Button('Save')) + picform = web.form.Form( + web.form.Textbox('name', web.form.notnull, description="Picture header:"), + web.form.Textarea('description', web.form.notnull, description="Description:"), + web.form.Textarea('description2', web.form.notnull, description="More:"), + web.form.Textarea('id', web.form.notnull, description="id:"), + web.form.Button('Save')) + def GET(self): + if logged(): + i = web.input(cmd=None,soundname=None) + nocache = hashlib.sha256(str(random.getrandbits(256)).encode('utf-8')).hexdigest()[11:15] + if i.cmd == 'remove' and i.soundname != None: + try: + os.remove(staticdir+'/img/thumb/'+i.soundname) + os.remove(staticdir+'/img/web/'+i.soundname) + except: + print('notin to delete') + goodies = db.query("DELETE FROM propagandapics WHERE soundname='"+i.soundname+"';") + raise web.seeother('/propaganda') + if i.cmd == 'flipright' and i.soundname != None: + original_thumb = Image.open(staticdir+'/img/thumb/'+i.soundname) + original_web = Image.open(staticdir+'/img/web/'+i.soundname) + o_thumb=original_thumb.rotate(270) + o_web=original_web.rotate(270) + o_thumb.save(staticdir+'/img/thumb/'+i.soundname) + o_web.save(staticdir+'/img/web/'+i.soundname) + raise web.seeother('/propaganda') + if i.cmd == 'flipleft' and i.soundname != None: + original_thumb = Image.open(staticdir+'/img/thumb/'+i.soundname) + original_web = Image.open(staticdir+'/img/web/'+i.soundname) + o_thumb=original_thumb.rotate(90) + o_web=original_web.rotate(90) + o_thumb.save(staticdir+'/img/thumb/'+i.soundname) + o_web.save(staticdir+'/img/web/'+i.soundname) + raise web.seeother('/propaganda') + configsite = self.form() + picturetext = self.picform() + try: + oldsiteconfig = db.select('propaganda', what='id, name, description, description2')[0] + configsite.fill(name=oldsiteconfig.name, description=oldsiteconfig.description, description2=oldsiteconfig.description2) + except: + print('no non no') + goodies = db.query("SELECT * FROM propagandapics;") + return renderop.propaganda(configsite, picturetext, goodies, nocache) + else: + raise web.seeother('/login') + def POST(self): + addcategory = self.form() + i = web.input(imgfile={}, name=None, id=None) + if i.id != None: + db.update('propagandapics', where='soundlink="'+i.id+'"', name=i.name, description=i.description, description2=i.description2 ) + raise web.seeother('/propaganda') + if i.name != None: + #db.insert('propaganda', name=i.name, description=i.description, description2=i.description2 ) + db.update('propaganda', where='id=1', name=i.name, description=i.description, description2=i.description2 ) + if i.imgfile != {}: + if i.imgfile.filename == '': + print('hmmm... no image to upload') + raise web.seeother('/config/') + print('YEAH, Upload image!') + ##---------- UPLOAD IMAGE ---------- + filepath=i.imgfile.filename.replace('\\','/') # replaces the windows-style slashes with linux ones. + #split and only take the filename with extension + #soundpath=filepath.split('/')[-1] + #if soundpath == '': + # return render.nope("strange, no filename found!") + #get filetype, last three + imgname=filepath.split('/')[-1] # splits the and chooses the last part (the filename with extension) + filetype = imgname.split('.')[-1].lower() + if filetype == 'jpg': + filetype = 'jpeg' + soundname = imgname.split('.')[0] + #lets remove unwanted characters yes please! + sound = '' + for p in soundname.lower(): + if p in allowedchar: + sound = sound + p + if sound == '': + raise web.seeother('/upload?fail=wierdname') + soundname = sound + '_Gonzo_Pi.' + filetype + print(soundname) + print("filename is " + imgname + " filetype is " + filetype + " soundname is " + soundname + " trying to upload file from: " + filepath) + #if filetype != 'wav' or 'ogg' or 'flac' or 'jpeg' or 'jpg' or 'mp3': + # web.seeother('/upload?fail=notsupported') + #imghash = hashlib.md5(str(random.getrandbits(256)).encode('utf-8')).hexdigest() + #imgname = imghash + #imgname = str(len(os.listdir(imgdir))).zfill(3) + '.jpeg' + soundlink = hashlib.sha256(str(random.getrandbits(256)).encode('utf-8')).hexdigest()[9:36] + imgdir = staticdir+'upload/'+soundlink+'/' + os.system('mkdir -p ' + imgdir) + fout = open(imgdir + soundname,'wb') # creates the file where the uploaded file should be stored + fout.write(i.imgfile.file.read()) # writes the uploaded file to the newly created file. + fout.close() # closes the file, upload complete. + db.insert('propagandapics', soundlink=soundlink, soundname=soundname, timeadded=datetime.datetime.now()) + if filetype == 'jpeg' or filetype == 'png': + ##---------- OPEN FILE & CHEKC IF JPEG -------- + image = Image.open(imgdir + soundname) + #if image.format != 'JPEG': + # os.remove(imgdir +'/'+ soundname) + # raise web.seeother('/products/' + idvalue) + + ##---------- RESIZE IMAGE SAVE TO PRODUCT----------- + imgdir=staticdir+'img' + try: + os.makedirs(imgdir + '/web/', exist_ok=True) + os.makedirs(imgdir + '/thumb/', exist_ok=True) + except: + print('Folders is') + image.thumbnail((1500,1500), Image.ANTIALIAS) + image.save(imgdir + '/web/'+soundname) + image.thumbnail((500,500), Image.ANTIALIAS) + image.save(imgdir + '/thumb/'+soundname) + raise web.seeother('/propaganda') + class config: form = web.form.Form( web.form.Textbox('name', web.form.notnull, description="Site name:"),