mirror of https://github.com/ThunixdotNet/www.git
Print href only for updated contents
This commit is contained in:
parent
2ffb79088f
commit
860d816031
|
@ -1,13 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
|
$html_skel='/etc/skel/public_html/index.html';
|
||||||
print "<!-- Begin autogen userdir list -->";
|
print "<!-- Begin autogen userdir list -->";
|
||||||
print "<ul style='list-style: none; margin-left: -40px;'>";
|
print "<ul style='list-style: none; margin-left: -40px;'>";
|
||||||
foreach (glob("/home/*") as $user):
|
foreach (glob("/home/*") as $userpath):
|
||||||
if (is_dir($user . "/public_html"))
|
if (is_dir("$userpath/public_html"))
|
||||||
if (!file_exists($user . "/public_html/coming_soon"))
|
if (count(scandir("$userpath/public_html")) != 2)
|
||||||
if (count(scandir($user."/public_html")) != 2)
|
|
||||||
{
|
{
|
||||||
$user = basename($user);
|
$user = basename($userpath);
|
||||||
print"<li><a href='$site_root/~$user/'>~$user</a></li>";
|
if(sha1_file($html_skel) == sha1_file("$userpath/public_html/index.html"))
|
||||||
|
print"<li>~$user</li>\n";
|
||||||
|
else
|
||||||
|
print"<li><a href='$site_root/~$user/'>~$user</a></li>\n";
|
||||||
}
|
}
|
||||||
endforeach;
|
endforeach;
|
||||||
print "</ul></div>
|
print "</ul></div>
|
||||||
|
|
Loading…
Reference in New Issue