diff --git a/cgi-bin/searchapi.cgi b/cgi-bin/searchapi.cgi new file mode 100755 index 0000000..3f6fce7 --- /dev/null +++ b/cgi-bin/searchapi.cgi @@ -0,0 +1,119 @@ +#!/bin/bash + +# Configuration. +STORAGE_PREFIX="/storage/md0" +LOCATE_DB="/tmp/mirrors.db" +DEF_RESULTS=500 +MAX_RESULTS=3000 +MAX_CONCURRENT=10 +IGNORE_REGEXES=('^/\.sandbox.*' '^/\.lftp.*' '^/dead\.letter' '.*\.rsync-tmp.*') + +# Extglob is required. +shopt -s extglob + +# Output an error in processing. +die() { + # $1 = The error code to output. + # 0 = Success. + # 1 = Temporary error (eg, max concurrent). + # 2 = Perminant error. + # $2 = The error message to output (if any). + printf "%s: %s%b" "Status" "${1:-2}" "\0" + [[ -n "$2" ]] && printf "%s: %s%b" "Error" "$2" "\0" + exit 1 +} + +# Initial headers. +#printf "%s: %s\\n" "Content-type" "text/plain" +printf "%s: %s\\n" "Content-type" "application/octet-stream" +printf "%s: %s\\n" "Cache-Control" "no-cache, no-store, must-revalidate" +printf "%s: %s\\n" "Pragma" "no-cache" +printf "%s: %s\\n\\n" "Expires" "1" + +# Limit the number of concurrent searches to avoid DoS. +if (( $(lsof -t "$LOCATE_DB" | wc -l) > (MAX_CONCURRENT - 1) )); then + die "1" "Too many concurrent searches!" +else + # Lock the DB for the lsof count above. + # shellcheck disable=SC2015 + exec 9<"$LOCATE_DB" && flock -s -E 10 -w 2 9 || die "1" "Too many concurrent searches!" + + # shellcheck disable=SC2154 + while read -r -d '&' QUERY; do + # If the read returned an empty string, skip. + [[ -z "$QUERY" ]] && continue + + # Extract the key and value to temporary variables. + KEY="${QUERY%%=*}" + VALUE="${QUERY#*=}" + + # Check the key is valid as a variable name. + [[ ! "$KEY" =~ ^[[:digit:]_]*[[:alnum:]_]*$ ]] && die "2" "Invalid query - don't try to be clever :)" + + # Define the variable from the key name. + declare "QS_$KEY"="$VALUE" + done <<<"${QUERY_STRING,,}&" # The & at the end is required. + + # Remove spaces from beginning and end of query. + QS_q="${QS_q/##+(+)}" + QS_q="${QS_q/%%+(+)}" + + # Squash multiple +s in query. + QS_q="${QS_q//+(+)/+}" + + # Convert any +s in the path and query into spaces. + QS_p="${QS_p//+/ }" + QS_q="${QS_q//+/ }" + + # Don't allow /s in the query. + # [[ "$QS_q" == */* ]] || [[ "$QS_q" == *%2F* ]] && die "2" "Searches may not include the '/' character." + + # Convert path and query from %-encoded form. + QS_p="$(printf "%b" "${QS_p//%/\\x}")" + QS_q="$(printf "%b" "${QS_q//%/\\x}")" + + # Adjust 'QS_q' for the locate command by wrapping search elements in *. + QS_q="*${QS_q// /* *}*" + + # Adjust 'QS_l' to not go over maximum limit of results, or use default if not supplied. + [[ -z "$QS_l" ]] && QS_l="$DEF_RESULTS" + (( QS_l > MAX_RESULTS )) && QS_l="$MAX_RESULTS" + + # Give success status as checks have passed. + printf "%s: %s%b" "Status" "0" "\0" + + I=1 + # shellcheck disable=SC2154 + while read -r -d $'\0' ITEM; do + # Only show specified number of items. + (( I == (QS_l + 1) )) && break + + # Remove paths we don't want the user to see. + while read -r -d " " REGEX; do + [[ "${ITEM/$STORAGE_PREFIX}" =~ $REGEX ]] && continue 2 + done <<<"${IGNORE_REGEXES[@]}" + + # Don't list the path searched for. + [[ "${ITEM/$STORAGE_PREFIX}" == "$QS_p" ]] && continue + + # List the item. + if [[ -f "$ITEM" ]]; then + # File type. + printf "%s %s%b" "f" "${ITEM/$STORAGE_PREFIX}" "\0" + elif [[ -d "$ITEM" ]]; then + # Directory type. + printf "%s %s%b" "d" "${ITEM/$STORAGE_PREFIX}" "\0" + elif [[ -L "$ITEM" ]]; then + # Symbolic link type. + printf "%s %s%b" "l" "${ITEM/$STORAGE_PREFIX}" "\0" + elif [[ -e "$ITEM" ]]; then + # Other type. + printf "%s %s%b" "o" "${ITEM/$STORAGE_PREFIX}" "\0" + else + # Stale file in database. + printf "%s %s%b" "?" "${ITEM/$STORAGE_PREFIX}" "\0" + fi + + (( I++ )) + done < <(locate -0 -A -d "$LOCATE_DB" -i -l "$(( QS_l * 2 ))" "$STORAGE_PREFIX/${QS_p/#+(\/)}" $QS_q | sort) +fi diff --git a/html/dark.css b/html/dark.css index 3c2db57..03c5b25 100644 --- a/html/dark.css +++ b/html/dark.css @@ -14,110 +14,261 @@ a:hover { } body { - background-image: url("/html/circuit-dark.png"); background-color: #000000; + background-image: url("/html/circuit-dark.png"); color: #aeaeae; - margin-left: 15px; - margin-right: 15px; -} - -form { - margin-left: 0; - margin-right: 0; - margin-top: 0; - margin-bottom: 0; + padding-top: 15px; } hr { - height: 2px; - border-width: 0; - color: #888888; background-color: #888888; + border: 0; + color: #888888; + height: 2px; +} + +img { + border: 0; } pre { + font-size: 15px; +} + +pre img { + vertical-align: bottom; +} + +table { + margin-bottom: 5px; + margin-left: 5px; + margin-right: 5px; + margin-top: 5px; + width: 100%; +} + +table, td { + border: 1px solid; + border-collapse: collapse; + color: #888888; +} + +td { + padding-bottom: 5px; + padding-left: 5px; + padding-right: 5px; + padding-top: 5px; +} + +.bold { + font-weight: bold; +} + +.box { background: #060606; border: 2px solid #aaaaaa; - padding-left: 20; - padding-right: 20; box-shadow: 10px 10px 10px -5px rgba(128,128,128,0.5); } +.boxmargins { + margin-bottom: 10px; +} + +.boxpadding { + padding-left: 20px; + padding-right: 20px; +} + .heading { font-size: 200%; } +.motdcontent { +} + +.motdheader { + font-weight: bold; + text-decoration: underline; +} + +.notice { + display: block; + margin-left: auto; + margin-bottom: 25px; + margin-right: auto; + text-align: center; + width: 70%; +} + +.searchinput { + background-color: #060606; + border: 0; + color: #888888; + font-size: 15px; + height: 15px; + outline: 0; + margin-left: 25px; + margin-right: 5px; +} + +.searchresultsinput { + border: 1px; + border-color: #555555; + border-style: solid; + width: 500px; +} + +.sponsor { + margin-top: 15px; + margin-bottom: 15px; +} + .subheading { font-size: 125%; } -.breadcrumbs { - font-size: 150%; - background: #060606; - border: 2px solid #aaaaaa; - padding-left: 10; - padding-top: 2; - padding-right: 10; - padding-bottom: 2; - box-shadow: 10px 10px 10px -5px rgba(128,128,128,0.5); +.underline { + text-decoration: underline; } -.header { - background: #060606; - border: 2px solid #aaaaaa; - margin: 20; - padding-left: 10; - padding-top: 10; - padding-right: 10; - padding-bottom: 10; - box-shadow: 10px 10px 10px -5px rgba(128,128,128,0.5); + +#breadcrumbs { + align-self: end; + display: flex; + min-height: 25px; + margin-left: auto; + margin-right: auto; } -.navbar { - width: 100%; +#breadcrumbstext { + align-content: center; + font-size: 15px; + text-align: center; + margin-left: 5px; + margin-right: 5px; +} + +#bwbar { + display: block; + margin-left: auto; + margin-right: auto; + margin-top: 30px; text-align: center; } -.search { - background: #060606; - border: 2px solid #aaaaaa; - box-shadow: 10px 10px 10px -5px rgba(128,128,128,0.5); +#copyright { + font-size: 10px; + text-align: center; } -.searchinput { - border: none; - background: #060606; - outline: none; - color: #888888; - font-size: 11px; - box-sizing: border-box; - padding-left: 10; - padding-top: 2; - padding-right: 10; - padding-bottom: 2; +#donatebuttons { + display: grid; + column-gap: 10%; + grid-template-columns: auto auto; + justify-content: center; + margin-bottom: 10px; + margin-top: 20px; +} + +#headingbox { + margin-left: auto; + margin-right: auto; + width: fit-content; +} + +#headingtext { + text-align: center; + margin-bottom: 5px; + margin-left: 5px; + margin-right: 5px; + margin-top: 5px; +} + +#donorslistbox { + margin-left: auto; + margin-right: auto; + width: 70%; + text-align: center; +} + +#donorstable { +} + +#logo { + display: flex; + justify-content: center; + margin-bottom: 30px; +} + +#motd { + column-gap: 40px; + display: grid; + grid-template-columns: auto auto; + margin-left: 30px; + margin-right: 30px; + row-gap: 15px; + text-align: left; +} + +#page { + margin-left: auto; + margin-right: auto; + width: 90%; +} + +#search { + align-content: center; + align-self: end; background-color: #060606; background-image: url('/html/search-white.png'); - background-size: 15px 15px; - background-position: 2px 2px; + background-position: 5px 5px; background-repeat: no-repeat; - padding-left: 20px; + background-size: 15px 15px; + height: 25px; + margin-left: 0; + margin-right: auto; + max-height: 25px; } -.searchresults { - background: #060606; - border: 2px solid #aaaaaa; - padding-left: 20; - padding-right: 20; - box-shadow: 10px 10px 10px -5px rgba(128,128,128,0.5); +#searchbreadcrumbstheme { + display: grid; + column-gap: 50px; + grid-template-columns: auto auto auto; } -.sponsorslist { - background: #060606; - border: 2px solid #777; - margin: 20; - padding-left: 10; - padding-top: 10; - padding-right: 10; - padding-bottom: 10; - box-shadow: 10px 10px 10px -5px rgba(128,128,128,0.5); +#signature { + grid-column-start: 1; + grid-column-end: 3; + margin-bottom: 50px; + text-align: right; +} + +#sponsorship { + font-weight: bold; + margin-bottom: 20px; + text-align: center; +} + +#themetoggle { + align-self: end; + display: flex; + height: 25px; + margin-left: auto; + margin-right: 0; + max-height: 25px; + text-align: right; +} + +#themetoggleimg { + height: 15px; + margin-right: 5px; + vertical-align: middle; +} + +#themetoggletext { + align-content: center; + color: #888888; + font-size: 15px; + margin-left: 5px; + margin-right: 5px; } diff --git a/html/donors.php b/html/donors.php index 8c3c1cb..742106e 100644 --- a/html/donors.php +++ b/html/donors.php @@ -1,660 +1,308 @@ - - - - - -
- -
- - - - -
- Patronage & Donations
- If you use the Slackware UK services on a regular basis, and would like to contribute to running costs, make a continuing patronage (and receive special benefits), or make a one off PayPal payment, please use one of the following buttons: - -
-
- - - - -
- Project Supporters
- The following people have kindly donated to slackware.uk.
- Thank you very much for your support! :)
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 21st July 2022 - - David Woodfall -
- 18th July 2022 - - Luke Dedek -
- 14th July 2022 - - Jack Leong -
- 10th July 2022 - - Charles Coffee -
- 8th July 2022 - - Randall Robinson -
- 20th June 2022 - - Richard Hoyle -
- 7th June 2022 - - Richard Hanser -
- 7th June 2022 - - Abehinichi -
- 6th June 2022 - - Keith Burnett -
- 6th June 2022 - - David Ian Allen -
- 6th June 2022 - - Duncan Wood -
- 6th June 2022 - - Robert Bresaz -
- 4th June 2022 - - Barry Grundy -
- 4th June 2022 - - Antoine Dierstein -
- 4th June 2022 - - Karl Gunnar Hammarlund -
- 4th June 2022 - - Matthew Dinslage -
- 4th June 2022 - - David Hall -
- 27th April 2022 - - Matthew Dinslage -
- 4th April 2022 - - Edward Rosenberg -
- 2nd April 2022 - - Matthew Dinslage -
- 21th March 2022 - - Theodore Allen -
- 18th March 2022 - - George Nielsen -
- 18th March 2022 - - Ioannis Anagnostakis -
- 18th March 2022 - - Karl Gunnar Hammarlund -
- 18th March 2022 - - Brian Lawrence -
- 18th March 2022 - - Dane Jensen -
- 18th March 2022 - - Matthew Dinslage -
- 9th March 2022 - - David Trudgian -
- 7th March 2022 - - Robert Bresaz -
- 13th January 2022 - - Rod Ziemski -
- 21st December 2021 - - Eric Trimmer -
- 30th September 2021 - - Brian Lawrence -
- 17th August 2021 - - Christoph Willing -
- 14th July 2021 - - Brian Lawrence -
- 11th July 2021 - - Don Boots -
- 6th June 2021 - - Cleverson Casarin Uliana -
- 30th May 2021 - - Klaus Gretland -
- 25th May 2021 - - Matthew Dinslage -
- 25th May 2021 - - Karl Bruns -
- 18th May 2021 - - Karl Gunnar Hammarlund -
- 15th May 2021 - - Christoph Koernig -
- 20th April 2021 - - Anthony McKenzie -
- 18th April 2021 - - Marcin Wolcendorf -
- 10th April 2021 - - Christoph Kühne -
- 8th April 2021 - - Patrick Volkerding -
- 29th March 2021 - - Anthony McKenzie -
- 7th March 2021 - - James Scott -
- 2nd March 2021 - - Alain Detal -
- 15th February 2021 - - Diniz Fernando Bortolotto Ferreira -
- 22nd December 2020 - - Peter Christy -
- 22nd December 2020 - - Karl Gunnar Hammarlund -
- 15th December 2020 - - Karol Jurica -
- 14th December 2020 - - Stanley Garvey -
- 2nd October 2020 - - Corby Roberts -
- 24th August 2020 - - Weber Kai -
- 7th August 2020 - - Brian Lawrence -
- 6th August 2020 - - Marcin Słodkiewicz -
- 30th May 2020 - - Ahmed Abbas -
- 23rd May 2020 - - Adam Purkrt -
- 5th May 2020 - - Clemens Sauerzopf -
- 30th April 2020 - - Gerard Lally -
- 6th April 2020 - - Peter Christy -
- 3rd April 2020 - - Tom Kosir -
- 30th March 2020 - - jwc1936 -
- 13th March 2020 - - Gregory Guy Rozan -
- 6th March 2020 - - Brian Lawrence -
- 5th March 2020 - - Karl Gunnar Hammarlund -
- 5th March 2020 - - Pierre-Philipp Braun -
- 4th March 2020 - - Christoph Kühne -
- 22nd February 2020 - - Aaditya Bagga -
- 20th October 2019 - - Shuaidu Yang -
- 12th October 2019 - - Andrew Macks -
- 9th October 2019 - - Tapio Pätilä -
- 30th August 2019 - - Nora's Portal -
- 18th July 2019 - - Karl Gunnar Hammarlund -
- 21st May 2019 - - Brian Lawrence -
- 16th May 2019 - - Daniel Bowling -
- 27th April 2019 - - Antoniazzi Leonardo -
-
- - - + +
+
+ Project Supporters
+ + All those that make a monthly patronage via Patreon, and the following
+ people have kindly donated to Slackware UK.

+ Thank you all very much for your support! :) +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
25th July 2024M W Magee
3rd June 2024Karl Gunnar Hammarlund
15th May 2024Tomasz Szewczyk
27th March 2024Raul Nevarez Garay
3rd March 2024Richard Barnes
30th November 2023Eduardo Alberto Castillo
20th September 2023Daniel Pompey
25th August 2023Syed Sajjad Rizvi
21st July 2023Jude DaShiell
4th June 2023Gerald Morris
3rd May 2023Syed Sajjad Rizvi
20th March 2023Luna Jernberg
8th February 2023Sergej Tjart
21st December 2022Karl Gunnar Hammarlund
5th November 2022David Melik
27th September 2022Miguel Angel González Moreno
23rd September 2022Christoph Koernig
8th September 2022Leeung-Jen
21st July 2022David Woodfall
18th July 2022Luke Dedek
14th July 2022Jack Leong
10th July 2022Charles Coffee
8th July 2022Randall Robinson
20th June 2022Richard Hoyle
7th June 2022Richard Hanser
7th June 2022Abehinichi
6th June 2022Keith Burnett
6th June 2022David Ian Allen
6th June 2022Duncan Wood
6th June 2022Robert Bresaz
4th June 2022Barry Grundy
4th June 2022Antoine Dierstein
4th June 2022Karl Gunnar Hammarlund
4th June 2022Matthew Dinslage
4th June 2022David Hall
27th April 2022Matthew Dinslage
4th April 2022Edward Rosenberg
2nd April 2022Matthew Dinslage
21th March 2022Theodore Allen
18th March 2022George Nielsen
18th March 2022Ioannis Anagnostakis
18th March 2022Karl Gunnar Hammarlund
18th March 2022Brian Lawrence
18th March 2022Dane Jensen
18th March 2022Matthew Dinslage
9th March 2022David Trudgian
7th March 2022Robert Bresaz
13th January 2022Rod Ziemski
21st December 2021Eric Trimmer
30th September 2021Brian Lawrence
17th August 2021Christoph Willing
14th July 2021Brian Lawrence
11th July 2021Don Boots
6th June 2021Cleverson Casarin Uliana
30th May 2021Klaus Gretland
25th May 2021Matthew Dinslage
25th May 2021Karl Bruns
18th May 2021Karl Gunnar Hammarlund
15th May 2021Christoph Koernig
20th April 2021Anthony McKenzie
18th April 2021Marcin Wolcendorf
10th April 2021Christoph Kühne
8th April 2021Patrick Volkerding
29th March 2021Anthony McKenzie
7th March 2021James Scott
2nd March 2021Alain Detal
15th February 2021Diniz Fernando Bortolotto Ferreira
22nd December 2020Peter Christy
22nd December 2020Karl Gunnar Hammarlund
15th December 2020Karol Jurica
14th December 2020Stanley Garvey
2nd October 2020Corby Roberts
24th August 2020Weber Kai
7th August 2020Brian Lawrence
6th August 2020Marcin Słodkiewicz
30th May 2020Ahmed Abbas
23rd May 2020Adam Purkrt
5th May 2020Clemens Sauerzopf
30th April 2020Gerard Lally
6th April 2020Peter Christy
3rd April 2020Tom Kosir
30th March 2020jwc1936
13th March 2020Gregory Guy Rozan
6th March 2020Brian Lawrence
5th March 2020Karl Gunnar Hammarlund
5th March 2020Pierre-Philipp Braun
4th March 2020Christoph Kühne
22nd February 2020Aaditya Bagga
20th October 2019Shuaidu Yang
12th October 2019Andrew Macks
9th October 2019Tapio Pätilä
30th August 2019Nora's Portal
18th July 2019Karl Gunnar Hammarlund
21st May 2019Brian Lawrence
16th May 2019Daniel Bowling
27th April 2019Antoniazzi Leonardo
+ Plus anyone who has donated that may have been missed above! +
+ diff --git a/html/errordocs/400.php b/html/errordocs/400.php index 21623e1..811a6b8 100644 --- a/html/errordocs/400.php +++ b/html/errordocs/400.php @@ -1,32 +1,9 @@ - - - - - -
- -
-
- - - - -
- Patronage & Donations
- If you use the Slackware UK services on a regular basis, and would like to contribute to running costs, make a continuing patronage (and receive special benefits), or make a one off PayPal payment, please use one of the following buttons: - - All donations will be gratefully received - thank you! -
-
-
- - - - -
- 400 - Bad Request
- The server could not understand the request. -
-
- - + + +
+
+ 400 - Bad Request
+ The server could not understand the
request that your browser sent.
+
+
+ diff --git a/html/errordocs/401.php b/html/errordocs/401.php index 457b5d7..e312c0f 100644 --- a/html/errordocs/401.php +++ b/html/errordocs/401.php @@ -1,32 +1,9 @@ - - - - - -
- -
-
- - - - -
- Patronage & Donations
- If you use the Slackware UK services on a regular basis, and would like to contribute to running costs, make a continuing patronage (and receive special benefits), or make a one off PayPal payment, please use one of the following buttons: - - All donations will be gratefully received - thank you! -
-
-
- - - - -
- 401 - Unauthorised
- Authentication is required. -
-
- - + + +
+
+ 401 - Unauthorised
+ Authentication is required. +
+
+ diff --git a/html/errordocs/403.php b/html/errordocs/403.php index af30840..bf7a942 100644 --- a/html/errordocs/403.php +++ b/html/errordocs/403.php @@ -1,32 +1,9 @@ - - - - - -
- -
-
- - - - -
- Patronage & Donations
- If you use the Slackware UK services on a regular basis, and would like to contribute to running costs, make a continuing patronage (and receive special benefits), or make a one off PayPal payment, please use one of the following buttons: - - All donations will be gratefully received - thank you! -
-
-
- - - - -
- 403 - Forbidden
- You do not have permission to access this resource. -
-
- - + + +
+
+ 403 - Forbidden
+ You do not have permission to access this resource. +
+
+ diff --git a/html/errordocs/404.php b/html/errordocs/404.php index 3a026f5..0d42524 100644 --- a/html/errordocs/404.php +++ b/html/errordocs/404.php @@ -1,32 +1,9 @@ - - - - - -
- -
-
- - - - -
- Patronage & Donations
- If you use the Slackware UK services on a regular basis, and would like to contribute to running costs, make a continuing patronage (and receive special benefits), or make a one off PayPal payment, please use one of the following buttons: - - All donations will be gratefully received - thank you! -
-
-
- - - - -
- 404 - Not Found
- The requested page or file is not found. -
-
- - + + +
+
+ 404 - Not Found
+ The requested page or file is not found. +
+
+ diff --git a/html/errordocs/405.php b/html/errordocs/405.php index a728372..5c3ef8a 100644 --- a/html/errordocs/405.php +++ b/html/errordocs/405.php @@ -1,32 +1,9 @@ - - - - - -
- -
-
- - - - -
- Patronage & Donations
- If you use the Slackware UK services on a regular basis, and would like to contribute to running costs, make a continuing patronage (and receive special benefits), or make a one off PayPal payment, please use one of the following buttons: - - All donations will be gratefully received - thank you! -
-
-
- - - - -
- 405 - Method Forbidden
- Access method is not authorised. -
-
- - + + +
+
+ 405 - Method Forbidden
+ Access method is not authorised. +
+
+ diff --git a/html/footer.shtml b/html/footer.shtml index 518738b..018c4c8 100644 --- a/html/footer.shtml +++ b/html/footer.shtml @@ -1,7 +1,9 @@ - - - - - + + + + + diff --git a/html/header.php b/html/header.php index 5a905bd..2d2edae 100644 --- a/html/header.php +++ b/html/header.php @@ -1,4 +1,4 @@ - + - -
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Access: - - This service can be accessed via:
-       HTTP:  http://slackware.uk/
-       HTTPS:  https://slackware.uk/
-       FTP:  ftp://slackware.uk/
-       Rsync:  rsync://slackware.uk/ -
- Notice: - +
+ + +
+ +
+
+
+
+ Access +
+ +
+ Notice +
+
All connections and transfers are logged. By accessing this service you implicitly agree to our collecting your IP address for analytics purposes.
We do not collect or hold any user identifying data, but do set a cookie in your browser for your choice of theme.
Do not use multiple concurrent connections or "make your downloads faster" applications.
Access to this service is a privilege, not a right - abusive users will be firewalled without warning. -
- Mirroring requests: - - This service is primarily intended to provide a mirror service for Slackware Linux based projects. If you run a Slackware based project, or have a suggestion for a project which may benefit from being mirrored here, please message with full details. -
- Patronage & Donations: - + --> +
+ Speedtest +
+
+ Curious about the speed you might get downloading from Slackware UK? Try the new speedtest! +
+
+ Mirroring requests +
+
+ This service is primarily intended to provide a mirror service for Slackware Linux based projects. If you run a Slackware based project, or have a suggestion for a project which may benefit from being mirrored here, please message with full details. +
+
+ Patronage & Donations +
+
If you use the Slackware UK services on a regular basis, and would like to contribute to running costs, make a continuing patronage (and receive special benefits), or make a one off PayPal payment, please use one of the following buttons: -
- - -
- - All donations will be gratefully received - thank you! -
- Darren 'Tadgy' Austin
- Email: mirrors (at) slackware.uk
- IRC: On Libera.Chat, join #slackware.uk channel or PM 'Tadgy' -
-
-
- -
- -
-
- - - - - - - - + + +
+
+ A Faster Way to Download Slackware Linux ISOs
+ Slackware UK now offers a Bittorrent seeding service which may allow you to download the Slackware ISOs at a much faster speed (especially immediately following a new stable release) - all that is required is a Bittorrent client. +
+ +
-
- Patronage & Donations
+ +
+ --
+
Darren 'Tadgy' Austin
+ Email: mirrors (at) slackware.uk
+ IRC: On Libera.Chat, join #slackware.uk channel or PM 'Tadgy' +
+ + +
+
+ Patronage & Donations
If you use the Slackware UK services on a regular basis, and would like to contribute to running costs, make a continuing patronage (and receive special benefits), or make a one off PayPal payment, please use one of the following buttons: All donations will be gratefully received - thank you! -
-
- - A Faster Way to Download Slackware Linux ISOs
- Slackware UK now offers a Bittorrent seeding service which may allow you to download the Slackware ISOs at a much faster speed (especially immediately following a new stable release) - all that is required is a Bittorrent client. -
-

- - -
- - -
diff --git a/html/includes/bwbar.php b/html/includes/bwbar.php index c41b974..145569c 100644 --- a/html/includes/bwbar.php +++ b/html/includes/bwbar.php @@ -1,9 +1,8 @@ - -
- Mirror server bandwidth utilisation
- - Bandwidth graph measuring <!--#include virtual='/html/bwbar.txt' --> - - Bandwidth graph measuring <!--#include virtual='/html/bwbar.txt' --> - -
+
+ Mirror server bandwidth utilisation
+ + Bandwidth graph measuring <!--#include virtual='/html/bwbar.txt' --> + + Bandwidth graph measuring <!--#include virtual='/html/bwbar.txt' --> + +
diff --git a/html/includes/donate.php b/html/includes/donate.php index cdca34b..49b4b0a 100644 --- a/html/includes/donate.php +++ b/html/includes/donate.php @@ -1,22 +1,9 @@ - - - - - - - - - - - -
- Patreon Logo - - PayPal Logo - - Patreon Logo - - PayPal Logo -
+
+ + Patreon Logo + PayPal Logo + + Patreon Logo + PayPal Logo + +
diff --git a/html/includes/head.php b/html/includes/head.php index 967304b..99aa4e3 100644 --- a/html/includes/head.php +++ b/html/includes/head.php @@ -1,14 +1,14 @@ - - + + - + - - - - - - - - " . $titleprefix . $title . "" . "\n"); ?> - + + + + + + + + " . $titleprefix . $title . "" . "\n"); ?> + diff --git a/html/includes/logo.php b/html/includes/logo.php index 2484d28..8cf8db9 100644 --- a/html/includes/logo.php +++ b/html/includes/logo.php @@ -1,5 +1,5 @@ - -

Slackware UK Logo

- -

Slackware UK Logo

- + + Slackware UK Logo + + Slackware UK Logo + diff --git a/html/includes/search-breadcrumbs-theme.php b/html/includes/search-breadcrumbs-theme.php new file mode 100644 index 0000000..392261f --- /dev/null +++ b/html/includes/search-breadcrumbs-theme.php @@ -0,0 +1,25 @@ +
+ + + +
+ + + + +
+ +
+ Toggle theme:Toggle Theme Button +
+
diff --git a/html/includes/sponsors.php b/html/includes/sponsors.php index 822cbbf..1bec34a 100644 --- a/html/includes/sponsors.php +++ b/html/includes/sponsors.php @@ -1,13 +1,16 @@ -

- is kindly sponsored by: -

- UK Servers Logo - - UK2 Logo - - UK2 Logo - -
-
- Please take a moment to visit the sponsors using the links above! -

+is kindly sponsored by: + + +Please take a moment to visit the sponsor using the link above! diff --git a/html/includes/vars.php b/html/includes/vars.php index d5b4371..7c60d9d 100644 --- a/html/includes/vars.php +++ b/html/includes/vars.php @@ -4,7 +4,11 @@ $title = "Index"; $description = "UK Slackware Linux and Slackware based projects hosting & mirror service"; $keywords = "Slackware UK, Slackware64 UK, Slackware, Slackware64, Slackware Linux, Slackware mirror, Slackware mirrors, Slackware hosting"; - } elseif (preg_match (":^/s(earch)?$:", $_SERVER['REQUEST_URI'])) { + } elseif (preg_match (":^/s(earch)?(\?.*)?$:", $_SERVER['REQUEST_URI'])) { + $title = "Search Results"; + $description = "Search Results"; + $keywords = "Slackware Linux, Slackware mirror, Slackware mirrors, Slackware hosting, Slackware, Slackware64, Slackware UK, Slackware64 UK"; + } elseif (preg_match (":^/html/search\.shtml(\?.*)?$:", $_SERVER['REQUEST_URI'])) { $title = "Search Results"; $description = "Search Results"; $keywords = "Slackware Linux, Slackware mirror, Slackware mirrors, Slackware hosting, Slackware, Slackware64, Slackware UK, Slackware64 UK"; @@ -104,6 +108,10 @@ $title = "SlackBuilds.org Sources Archive"; $description = "An archive of sources required by SlackBuilds.org packages"; $keywords = "sbosrcarch, SlackBuilds.org, SBo, SlackBuilds source, SlackBuilds sources, SlackBuilds archive"; + } elseif (preg_match (":^/slackar/.*:", $_SERVER['REQUEST_URI'])) { + $title = "Slackware Argentina Project"; + $description = "Slackware Argentina Project"; + $keywords = "Slackware Argentina"; } elseif (preg_match (":^/slackbuilds.org/.*:", $_SERVER['REQUEST_URI'])) { $title = "SlackBuilds.org (SBo)"; $description = "The SlackBuilds.org (SBo) build scripts for Slackware"; diff --git a/html/light.css b/html/light.css index 2753152..6730829 100644 --- a/html/light.css +++ b/html/light.css @@ -8,115 +8,267 @@ a:visited { text-decoration: none; } + a:hover { text-decoration: underline; } body { - background-image: url("/html/circuit-light.png"); background-color: #ffffff; + background-image: url("/html/circuit-light.png"); color: #000000; - margin-left: 15px; - margin-right: 15px; -} - -form { - margin-left: 0; - margin-right: 0; - margin-top: 0; - margin-bottom: 0; + padding-top: 15px; } hr { - height: 2px; - border-width: 0; - color: #070707; background-color: #070707; + border: 0; + color: #070707; + height: 2px; +} + +img { + border: 0; } pre { + font-size: 15px; +} + +pre img { + vertical-align: bottom; +} + +table { + margin-bottom: 5px; + margin-left: 5px; + margin-right: 5px; + margin-top: 5px; + width: 100%; +} + +table, td { + border: 1px solid; + border-collapse: collapse; + color: #070707; +} + +td { + padding-bottom: 5px; + padding-left: 5px; + padding-right: 5px; + padding-top: 5px; +} + +.bold { + font-weight: bold; +} + +.box { background: #f0f0f0; border: 2px solid #070707; - padding-left: 20; - padding-right: 20; box-shadow: 10px 10px 10px -5px rgba(0,0,0,0.5); } +.boxmargins { + margin-bottom: 10px; +} + +.boxpadding { + padding-left: 20px; + padding-right: 20px; +} + .heading { font-size: 200%; } +.motdcontent { +} + +.motdheader { + font-weight: bold; + text-decoration: underline; +} + +.notice { + display: block; + margin-left: auto; + margin-bottom: 25px; + margin-right: auto; + text-align: center; + width: 70%; +} + +.searchinput { + background-color: #f0f0f0; + border: 0; + color: #000000; + font-size: 15px; + height: 15px; + outline: 0; + margin-left: 25px; + margin-right: 5px; +} + +.searchresultsinput { + border: 1px; + border-color: #000000; + border-style: solid; + width: 500px; +} + +.sponsor { + margin-top: 15px; + margin-bottom: 15px; +} + .subheading { font-size: 125%; } -.breadcrumbs { - font-size: 150%; - background: #f0f0f0; - border: 2px solid #070707; - padding-left: 10; - padding-top: 2; - padding-right: 10; - padding-bottom: 2; - box-shadow: 10px 10px 10px -5px rgba(0,0,0,0.5); +.underline { + text-decoration: underline; } -.header { - background: #F0F0F0; - border: 2px solid #777; - margin: 20; - padding-left: 10; - padding-top: 10; - padding-right: 10; - padding-bottom: 10; - box-shadow: 10px 10px 10px -5px rgba(0,0,0,0.5); + +#breadcrumbs { + align-self: end; + display: flex; + min-height: 25px; + margin-left: auto; + margin-right: auto; } -.navbar { - width: 100%; +#breadcrumbstext { + align-content: center; + font-size: 15px; + text-align: center; + margin-left: 5px; + margin-right: 5px; +} + +#bwbar { + display: block; + margin-left: auto; + margin-right: auto; + margin-top: 30px; text-align: center; } -.search { - background: #f0f0f0; - border: 2px solid #070707; - box-shadow: 10px 10px 10px -5px rgba(0,0,0,0.5); +#copyright { + font-size: 10px; + text-align: center; } -.searchinput { - border: none; - background: #f0f0f0; - outline: none; - color: #000000; - font-size: 11px; - box-sizing: border-box; - padding-left: 10; - padding-top: 2; - padding-right: 10; - padding-bottom: 2; +#donatebuttons { + display: grid; + column-gap: 10%; + grid-template-columns: auto auto; + justify-content: center; + margin-bottom: 10px; + margin-top: 20px; +} + +#headingbox { + margin-left: auto; + margin-right: auto; + width: fit-content; +} + +#headingtext { + text-align: center; + margin-bottom: 5px; + margin-left: 5px; + margin-right: 5px; + margin-top: 5px; +} + +#donorslistbox { + margin-left: auto; + margin-right: auto; + width: 70%; + text-align: center; +} + +#donorstable { +} + +#logo { + display: flex; + justify-content: center; + margin-bottom: 30px; +} + +#motd { + column-gap: 40px; + display: grid; + grid-template-columns: auto auto; + margin-left: 30px; + margin-right: 30px; + row-gap: 15px; + text-align: left; +} + +#page { + margin-left: auto; + margin-right: auto; + width: 90%; +} + +#search { + align-content: center; + align-self: end; background-color: #f0f0f0; background-image: url('/html/search-black.png'); - background-size: 15px 15px; - background-position: 2px 2px; + background-position: 5px 5px; background-repeat: no-repeat; - padding-left: 20px; + background-size: 15px 15px; + height: 25px; + margin-left: 0; + margin-right: auto; + max-height: 25px; } -.searchresults { - background: #f0f0f0; - border: 2px solid #070707; - padding-left: 20; - padding-right: 20; - box-shadow: 10px 10px 10px -5px rgba(0,0,0,0.5); +#searchbreadcrumbstheme { + display: grid; + column-gap: 50px; + grid-template-columns: auto auto auto; } -.sponsorslist { - background: #F0F0F0; - border: 2px solid #777; - margin: 20; - padding-left: 10; - padding-top: 10; - padding-right: 10; - padding-bottom: 10; - box-shadow: 10px 10px 10px -5px rgba(0,0,0,0.5); +#signature { + grid-column-start: 1; + grid-column-end: 3; + margin-bottom: 50px; + text-align: right; +} + +#sponsorship { + font-weight: bold; + margin-bottom: 20px; + text-align: center; +} + +#themetoggle { + align-self: end; + display: flex; + height: 25px; + margin-left: auto; + margin-right: 0; + max-height: 25px; + text-align: right; +} + +#themetoggleimg { + height: 15px; + margin-right: 5px; + vertical-align: middle; +} + +#themetoggletext { + align-content: center; + color: #000000; + font-size: 15px; + margin-left: 5px; + margin-right: 5px; } diff --git a/html/search.shtml b/html/search.shtml new file mode 100644 index 0000000..ef09ef4 --- /dev/null +++ b/html/search.shtml @@ -0,0 +1,126 @@ + +
+
+ Search Error

+ + +

Click " title="Retry search">here to retry your search. + +
+
+ +
+
+ Search Results
+
+ Searches may contain multiple terms, include globs (man 7 glob)
+ and descend down from the current directory.

+ Adjust search: +
+
+
+ Search path: + " autocomplete="on" required>
+ Search query: + " autocomplete="on" required> + +
+
+
+
+
+
+
+
+
+ +$entry
"); + $count++; + } elseif ($type == "d") { + print ("• $entry (Repeat search in this directory)
"); + $count++; + } + } + + /* Output a total */ + if ($count == 0) { + print ("No results - try to widen your search."); + } elseif ($count == 1) { + print ("1 result found."); + } else { + print ($count . " results found."); + } +?> +
+
+
+