Actualizar 'index.php'

This commit is contained in:
Luqaska 2021-12-18 22:52:11 +00:00
parent 3a34e3141d
commit 78bfb74475
1 changed files with 31 additions and 4 deletions

View File

@ -28,6 +28,7 @@
background:black;
border-radius:0 0 10px 10px;
}
img.av{width:70px;height:70px;}
a{color:#00FF08;}
footer{margin:5% 0 0 0;}
</style>
@ -35,6 +36,28 @@
<body>
<div class="inside">
<h1>Luqaska's S**te</h1>
<?php
if(isset($_GET["book"])){
echo "\t<p>To be here, create a file at <code>~/.lucas</code>. The content of that file will be displayed down your name.</p>\n\t<p>Inspired by <a href=\"https://tilde.team/~mwt/\">~mwt</a>'s one.</p>";
foreach(glob("/home/*") as $user){
echo "\t<table>";
if(file_exists($user."/.lucas")){ $nick=str_replace("/home/","",$user);?>
<tr>
<td><?php if(file_exists($user."/public_html/avatar.png")){
echo '<img class="av" src="https://ttm.sh/~'.$nick.'/avatar.png">';
}else{
echo '<img class="av" src="https://ttm.sh/ege.png" style="image-rendering:pixelated">';
} ?></td>
<td>
<h2><a href="https://tilde.team/<?= $nick ?>/">~<?= $nick ?></a></h2>
<p><?= htmlentities(file_get_contents($user."/.lucas")) ?></p>
</td>
<?php }
echo "\t</table>";
}
}else{
?>
<div id="tools">
<h2>/t/ools</h2>
<?php show_dir("t") ?>
@ -52,6 +75,7 @@
<h2>Linkz</h2>
<ul>
<li><a href="gemini://tilde.team/~lucas/">Gemini version</a></li>
<li><a href="gopher://tilde.team/1/~lucas/">Gopher hole</a></li>
<li><a href="https://tilde.team">~team</a></li>
<li><a href="https://tilde.team/~lucas/twtxt/">TWTXT</a></li>
<li><a href="https://tildegit.org/luqaska">~git</a></li>
@ -66,11 +90,14 @@
[<a href="https://tilde.team/ring/?action=next&me=lucas">next</a>]
<br><a href="https://tilde.team/ring/">how to join this webring</a>
</div>
<div id="counter">
<p><a href="https://tilde.club/~harper/counter.html">
<img width="50px" height="auto" style="padding:3px;background:white" src="https://tilde-counter.firebaseapp.com/counter/">
</a></p>
<div id="extras">
<h2>Extras</h2>
<li>Visits: <a href="https://tilde.club/~harper/counter.html">
<img width="50px" height="auto" style="background:white" src="https://tilde-counter.firebaseapp.com/counter/">
</a></li>
<li><a href="?book">Sign book</a></li>
</div>
<?php } ?>
<footer><p style="text-align:left">
&copy;2021 Luqaska
<a style="float:right;text-decoration:none" href="https://tildegit.org/luqaska/website">Code</a>