add gemini/gopher links to users.php

This commit is contained in:
Arya Kiran 2022-11-01 09:27:56 +05:30
parent 47a00ecba7
commit 9f69fa98e6
No known key found for this signature in database
GPG Key ID: 3A6EA2D0EE314EEF
1 changed files with 11 additions and 0 deletions

View File

@ -46,6 +46,17 @@
is_readable($ph_index . 'lua')) // There must be a better way to do this
$list .= "<a href='//$_SERVER[HTTP_HOST]/~$subdir/'>$subdir</a>";
else $list .= $subdir;
$ph_index = '/sshfs/home/' . $subdir . '/public_gemini/index.';
if (is_readable($ph_index . 'gmi') ||
is_readable($ph_index . 'cgi') ||
is_readable($ph_index . 'py') ||
is_readable($ph_index . 'sh') ||
is_readable($ph_index . 'pl') ||
is_readable($ph_index . 'lua')) // There must be a better way to do this
$list .= "<a href='//gp.vern.cc/gemini/vern.cc/~$subdir/'>(gemini)</a>";
$ph_index = '/sshfs/home/' . $subdir . '/public_gemini/gopher';
if (is_readable($ph_index . 'map')) // There must be a better way to do this
$list .= "<a href='//gp.vern.cc/gopher/vern.cc/1/~$subdir/'>(gopher)</a>";
$list .= "</li>\n";
$total++;
}