123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- <?php require_once "../utilities/index.php" ?>
- <?php
- $title = "Settings";
- ?>
- <?php require_once "../elements/header.php" ?>
- <?php
- foreach ($_GET as $name => $value) {
- if (is_array($value))
- $value = json_encode($value);
- setcookie($name, $value);
- };
- if (count($_GET)) {
- header("Location: " . strtok($_SERVER["REQUEST_URI"], "?"));
- exit();
- };
- ?>
- <h1>Settings</h1>
- <form>
- <div>
- <p><b>Theme</b></p>
- <p>Whether to adapt to the system theme or always use a light or dark interface.</p>
- <p>
- <select name="theme">
- <?php
- foreach ([
- "system" => "System",
- "light" => "Light",
- "dark" => "Dark"
- ] as $name => $value) {
- echo "<option value=\"" . $name . "\"";
- if (isset($_COOKIE["theme"]) && $_COOKIE["theme"] === $name) echo " selected";
- echo ">" . $value . "</option>";
- };
- ?>
- </select>
- </p>
- </div>
- <div>
- <p><b>Design</b></p>
- <p>Whether to, if available, use artist-defined colors on artist and release pages.</p>
- <input name="design" type="hidden" value="off">
- <input id="design" name="design" type="checkbox" <?php if (isset($_COOKIE["design"]) && $_COOKIE["design"] === "on") echo "checked" ?>>
- <label for="design">Enabled</label>
- </div>
- <div>
- <p><b>Details</b></p>
- <p>Which of the collapsible details the release page is made up of to expand by default.</p>
- <p>
- <select name="details[]" multiple size="7">
- <?php
- foreach ([
- "tracklist" => "Tracklist",
- "videos" => "Videos",
- "lyrics" => "Lyrics",
- "credits" => "Credits",
- "license" => "License",
- "tags" => "Tags",
- "recommendations" => "Recommendations"
- ] as $name => $value) {
- echo "<option value=\"" . $name . "\"";
- if (
- (isset($_COOKIE["details"]) && in_array($name, json_decode($_COOKIE["details"]))) ||
- (!isset($_COOKIE["details"]) && $name === "tracklist")
- )
- echo " selected";
- echo ">" . $value . "</option>";
- };
- ?>
- </select>
- </p>
- </div>
- <div>
- <p><b>Images</b></p>
- <p>If disabled, speeds up loading and saves data by not loading any images.</p>
- <p>
- <select name="images">
- <?php
- foreach ([
- "system" => "System",
- "enabled" => "Enabled",
- "disabled" => "Disabled"
- ] as $name => $value) {
- echo "<option value=\"" . $name . "\"";
- if (isset($_COOKIE["images"]) && $_COOKIE["images"] === $name) echo " selected";
- echo ">" . $value . "</option>";
- };
- ?>
- </select>
- </p>
- </div>
- <div>
- <p><b>Overflow</b></p>
- <p>Whether to allow scrolling each column of the desktop layout independently.</p>
- <input name="overflow" type="hidden" value="off">
- <input id="overflow" name="overflow" type="checkbox" <?php if (isset($_COOKIE["overflow"]) && $_COOKIE["overflow"] === "on") echo "checked" ?>>
- <label for="overflow">Enabled</label>
- </div>
- <input type="submit" value="Save">
- </form>
- <?php require_once "../elements/footer.php" ?>
|