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