Some minor updates to the site and search API.
This commit is contained in:
parent
43d97e41e1
commit
1428652b84
5 changed files with 86 additions and 4 deletions
|
@ -89,7 +89,22 @@ else
|
||||||
[[ "${ITEM/$STORAGE_PREFIX}" == "$QS_p" ]] && continue
|
[[ "${ITEM/$STORAGE_PREFIX}" == "$QS_p" ]] && continue
|
||||||
|
|
||||||
# List the item.
|
# List the item.
|
||||||
printf "%s\\n" "${ITEM/$STORAGE_PREFIX}"
|
if [[ -f "$ITEM" ]]; then
|
||||||
|
# File type.
|
||||||
|
printf "%s %s\\n" "f" "${ITEM/$STORAGE_PREFIX}"
|
||||||
|
elif [[ -d "$ITEM" ]]; then
|
||||||
|
# Directory type.
|
||||||
|
printf "%s %s\\n" "d" "${ITEM/$STORAGE_PREFIX}"
|
||||||
|
elif [[ -L "$ITEM" ]]; then
|
||||||
|
# Symbolic link type.
|
||||||
|
printf "%s %s\\n" "l" "${ITEM/$STORAGE_PREFIX}"
|
||||||
|
elif [[ -e "$ITEM" ]]; then
|
||||||
|
# Other type.
|
||||||
|
printf "%s %s\\n" "o" "${ITEM/$STORAGE_PREFIX}"
|
||||||
|
else
|
||||||
|
# Stale file in database.
|
||||||
|
printf "%s %s\\n" "?" "${ITEM/$STORAGE_PREFIX}"
|
||||||
|
fi
|
||||||
|
|
||||||
(( I++ ))
|
(( I++ ))
|
||||||
done < <(locate -A -d "$LOCATE_DB" -i -l "$(( QS_l * 2 ))" "$STORAGE_PREFIX/${QS_p##/}" $QS_q | sort)
|
done < <(locate -A -d "$LOCATE_DB" -i -l "$(( QS_l * 2 ))" "$STORAGE_PREFIX/${QS_p##/}" $QS_q | sort)
|
||||||
|
|
|
@ -29,6 +29,54 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<table class="sponsorslist" width="60%" border="1" cellspacing="0" cellpadding="2" align="center">
|
<table class="sponsorslist" width="60%" border="1" cellspacing="0" cellpadding="2" align="center">
|
||||||
|
<tr>
|
||||||
|
<td width="25%" align="left">
|
||||||
|
25th July 2024
|
||||||
|
</td>
|
||||||
|
<td align="left">
|
||||||
|
M W Magee
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="25%" align="left">
|
||||||
|
3rd June 2024
|
||||||
|
</td>
|
||||||
|
<td align="left">
|
||||||
|
Karl Gunnar Hammarlund
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="25%" align="left">
|
||||||
|
15th May 2024
|
||||||
|
</td>
|
||||||
|
<td align="left">
|
||||||
|
Tomasz Szewczyk
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="25%" align="left">
|
||||||
|
27th March 2024
|
||||||
|
</td>
|
||||||
|
<td align="left">
|
||||||
|
Raul Nevarez Garay
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="25%" align="left">
|
||||||
|
3rd March 2024
|
||||||
|
</td>
|
||||||
|
<td align="left">
|
||||||
|
Richard Barnes
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="25%" align="left">
|
||||||
|
30th November 2023
|
||||||
|
</td>
|
||||||
|
<td align="left">
|
||||||
|
Eduardo Alberto Castillo
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="25%" align="left">
|
<td width="25%" align="left">
|
||||||
20th September 2023
|
20th September 2023
|
||||||
|
|
|
@ -51,6 +51,14 @@
|
||||||
This service is primarily intended to provide a mirror service for <a href="http://www.slackware.com/" title="Slackware Linux" alt="Slackware Linux">Slackware Linux</a> 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.
|
This service is primarily intended to provide a mirror service for <a href="http://www.slackware.com/" title="Slackware Linux" alt="Slackware Linux">Slackware Linux</a> 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.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left" valign="top" width="15%">
|
||||||
|
<b>Speedtest:</b>
|
||||||
|
</td>
|
||||||
|
<td align="left" valign="top">
|
||||||
|
Curious about the speed you might get downloading from Slackware UK? Try the new <a href="//speedtest.slackware.uk/" title="Slackware UK Speedtest" alt="Slackware UK Speedtest">speedtest</a>!
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left" valign="top" width="15%">
|
<td align="left" valign="top" width="15%">
|
||||||
<b>Patronage & Donations:</b>
|
<b>Patronage & Donations:</b>
|
||||||
|
|
|
@ -4,7 +4,11 @@
|
||||||
$title = "Index";
|
$title = "Index";
|
||||||
$description = "UK Slackware Linux and Slackware based projects hosting & mirror service";
|
$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";
|
$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";
|
$title = "Search Results";
|
||||||
$description = "Search Results";
|
$description = "Search Results";
|
||||||
$keywords = "Slackware Linux, Slackware mirror, Slackware mirrors, Slackware hosting, Slackware, Slackware64, Slackware UK, Slackware64 UK";
|
$keywords = "Slackware Linux, Slackware mirror, Slackware mirrors, Slackware hosting, Slackware, Slackware64, Slackware UK, Slackware64 UK";
|
||||||
|
|
|
@ -76,8 +76,15 @@
|
||||||
/* Read the results and turn into urls */
|
/* Read the results and turn into urls */
|
||||||
$count = 0;
|
$count = 0;
|
||||||
while ($result_line = stream_get_line ($fh, 0, "\n")) {
|
while ($result_line = stream_get_line ($fh, 0, "\n")) {
|
||||||
print ("• <a href=\"https://slackware.uk$result_line\" title=\"$result_line\">$result_line</a><br>");
|
$type = strtok ($result_line, " ");
|
||||||
$count++;
|
$entry = strtok ("\n");
|
||||||
|
if ($type == "f" || $type == "l" || $type == "o") {
|
||||||
|
print ("• <a href=\"$entry\" title=\"View $entry\">$entry</a><br>");
|
||||||
|
$count++;
|
||||||
|
} elseif ($type == "d") {
|
||||||
|
print ("• <a href=\"$entry\" title=\"Directory $entry\">$entry</a> (<a href=\"/search?l=$_GET[l]&p=$entry&q=" . str_replace (" ", "+", $_GET[q]) . "\" title=\"Repeat search in this directory\">Repeat search in this directory</a>)<br>");
|
||||||
|
$count++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* Output a total */
|
/* Output a total */
|
||||||
if ($count == 0) {
|
if ($count == 0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue