From 8016bd8b1b23e771bdb5a3d8b993ca488a270d4a Mon Sep 17 00:00:00 2001 From: will Date: Wed, 7 Aug 2024 01:46:10 +0100 Subject: [PATCH] See last commit --- auth/index.php | 248 +++++++++++++++++++++++++++++++++++-------------- data.json | 2 +- index.html | 168 +++++++++++++++++---------------- items.json | 0 sigil.json | 0 text.json | 0 6 files changed, 263 insertions(+), 155 deletions(-) mode change 100644 => 100755 data.json mode change 100644 => 100755 items.json mode change 100644 => 100755 sigil.json mode change 100644 => 100755 text.json diff --git a/auth/index.php b/auth/index.php index bb2091c..b492c6a 100644 --- a/auth/index.php +++ b/auth/index.php @@ -12,6 +12,11 @@ $text = fread($file, filesize("../text.json")); fclose($file); $text = json_decode($text, true); +$file = fopen("../clock.json", "r") or die("unable to open file!"); +$data = fread($file, filesize("../clock.json")); +fclose($file); +$clock = json_decode($data, true); + $file = fopen("../data.json", "r") or die("unable to open file!"); $data = fread($file, filesize("../data.json")); fclose($file); @@ -66,6 +71,13 @@ if (!empty($_POST['update'])) { $file = fopen("../data.json", "w"); fwrite($file, $json); fclose($file); + + $clock['currentPosition'] = (int)$_POST["doomsday"]; + + $json = json_encode($clock); + $file = fopen("../clock.json", "w"); + fwrite($file, $json); + fclose($file); } ?> @@ -80,11 +92,43 @@ h1 { margin: 10px; vertical-align: top; } +.entry { + width: 50%; + margin: 0; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} fieldtext > .split { width: 50%; margin: 0; } -@media screen and (max-width: 800px) { +.clock { + position: relative; + width: 100%; + aspect-ratio: 1; +} +.clock > div { + position: absolute; + top: 25%; + left: 25%; + width: 50%; + height: 50%; + overflow: scroll; +} +.clockButton { + position: absolute; + margin: 0; +} + +@media screen and (max-width: 1130px) { .split { width: calc(100% - 20px); } @@ -92,14 +136,22 @@ fieldtext > .split { - +
-

Interface

- +
+

XMDV Interface

+
+

+ XMDV Shopping is created by William Greenwood
+ GFX Overlay - Autocue - Source repository +

+
+
+ Products +
Products"; for ($i = 0; $i < count($items); $i++) { - $description = $items[$i]["description"]; + $subtext = $items[$i]["subtext"]; $checked = ""; if ($data['itemId'] == $i) { @@ -107,19 +159,24 @@ for ($i = 0; $i < count($items); $i++) { } echo ""; - echo "
"; + echo "
"; } - $checked = ""; if ($data['showingExtra'] == "true") { - $checked = " checked='checked' "; + $checked = " checked='checked' "; } -echo ""; -echo ""; -echo "
"; +?> +
+ > + +
+ -echo "
Pricing"; +
+ Pricing +
+"; -echo ""; -echo "
"; - -echo ""; -echo ""; -echo "
"; - -$discount = $data['discount']; -echo ""; -echo "
"; - -$change = $data['priceChange']; -echo ""; -echo "
"; $checked = ""; if ($data['round'] == "true") { - $checked = " checked='checked' "; + $checked = " checked='checked' "; } -echo ""; -echo ""; +?> -echo "
"; + > + +
+ + > + +
+ +
+ + '> +
-echo "
Info text"; -echo "
"; + '> +
+ + > + +
+
+ +
+ Top text +"; - echo "
"; + echo "
"; + echo "
"; } -echo "
"; -echo "
"; +echo "
"; +echo "
Bottom text"; for ($i = 0; $i < count($text['bottomText']); $i++) { $line = $text['bottomText'][$i]; $checked = ""; if (in_array($line, $data['bottomText'])) { $checked = " checked='checked' "; } - echo ""; - echo "
"; + echo "
"; + echo "
"; } - -echo ""; +echo "
"; +echo "
Banner text"; for ($i = 0; $i < count($text['bannerText']); $i++) { $line = $text['bannerText'][$i]; $checked = ""; if ($data['bannerText'] == $line) { $checked = " checked='checked' "; } - echo ""; - echo "
"; + echo "
"; + echo "
"; } $checked = ""; if ($data['showingBanner'] == "true") { $checked = " checked='checked' "; } -echo ""; -echo ""; -echo "
"; +?> + > + + -echo "
Sigil display"; -echo "
"; +
+ Sigil display +
+"; -echo "
"; -echo "
"; -echo "
"; - -echo "
Timer"; -echo ""; -echo "
"; -echo ""; -echo "
"; -echo ""; -echo "
"; -echo ""; -echo "
"; -echo ""; -echo "
"; -echo ""; -echo "
"; +?> + > +
+
+
+
+ Timer +
+
+
+
+
+
+
+
+
+
+
+
+"; echo ""; echo "
"; ?> -
-
-

Current data

-

+Doomsday clock"; +echo "

"; +echo ""; +for ($i = 0; $i < 360; $i += 10) { + $checked = ""; + if ($clock['currentPosition'] == $i) { + $checked = " checked='checked' "; + } + echo ""; +} +?> +
+
+ Movement + +
+ +
+ +
+ + +
+
+ Lighting + +
+ +
+ + +
+
+
+ +
+ +
+ Current data " . var_export($data, true) . "" ?> -

+" . var_export($clock, true) . "" ?> +
+ diff --git a/data.json b/data.json old mode 100644 new mode 100755 index 31af23d..0d0c88c --- a/data.json +++ b/data.json @@ -1 +1 @@ -{"topText":["It's here!"],"bottomText":["It's here!"],"bannerText":"Buy XMDV!","itemId":0,"currency":{"prefix":"\u00a3","postfix":" hairs"},"discount":0,"prefix":"true","round":"true","priceChange":50,"showingExtra":"true","showingTimer":"true","showingBanner":"true","showingSigil":["true","true","false","false"],"timerEnd":1722808645,"timerOffset":-500} \ No newline at end of file +{"topText":["It's here!"],"bottomText":["It's here!"],"bannerText":"Buy XMDV!","itemId":1,"currency":{"prefix":"$","postfix":" hairs"},"discount":0,"prefix":"true","round":"true","priceChange":50,"showingExtra":"false","showingTimer":"true","showingBanner":"true","showingSigil":["true","true","false","false"],"timerEnd":1722808645,"timerOffset":-500} \ No newline at end of file diff --git a/index.html b/index.html index 7de0b10..8ddd25d 100644 --- a/index.html +++ b/index.html @@ -191,18 +191,32 @@ circle { } - + + +

@@ -411,14 +445,13 @@ setInterval(draw, 1000)

5000000000% OFF

-

-
+

@@ -426,23 +459,18 @@ setInterval(draw, 1000)

+ +
- - - - - - - - - - - - + + @@ -450,59 +478,35 @@ setInterval(draw, 1000)
- - - - - - - - - - - - - - - + + + +
- - - - - - - - - - - - - - - + + + +
- - - - - - - - - - - - - - - + + + +
diff --git a/items.json b/items.json old mode 100644 new mode 100755 diff --git a/sigil.json b/sigil.json old mode 100644 new mode 100755 diff --git a/text.json b/text.json old mode 100644 new mode 100755 -- 2.39.2