slitaz-forge diff people/index.php @ rev 42

people: improve main page and add profile.php info
author Christophe Lincoln <pankso@slitaz.org>
date Wed Mar 30 22:33:58 2011 +0200 (2011-03-30)
parents b770976fff5d
children e2cd0a468c21
line diff
     1.1 --- a/people/index.php	Mon Mar 28 15:12:12 2011 +0200
     1.2 +++ b/people/index.php	Wed Mar 30 22:33:58 2011 +0200
     1.3 @@ -51,7 +51,7 @@
     1.4  			code name <a href="http://tank.slitaz.org/">Tank</a>, can 
     1.5  			have a public directory to put personal stuff related to SliTaz.
     1.6  			This Public directory can be reached with URLs in the form of: 
     1.7 -			http://people.slitaz.org/~contributors/. More information on 
     1.8 +			http://people.slitaz.org/~name/. More information on 
     1.9  			<a href="http://www.slitaz.org/">SliTaz Website</a> and
    1.10  			<a href="http://labs.slitaz.org/">SliTaz Labs</a>.
    1.11  		</p>
    1.12 @@ -63,16 +63,48 @@
    1.13  
    1.14  <h2>SliTaz people</h2>
    1.15  
    1.16 +<style type="text/css">
    1.17 +ul span { 
    1.18 +	color: #666; 
    1.19 +	font-size: 11px; 
    1.20 +	font-weight: normal;
    1.21 +	display: block;
    1.22 +	padding: 2px 0;
    1.23 +}
    1.24 +ul { list-style-type: square; }
    1.25 +ul span a { color: #666; }
    1.26 +</style>
    1.27 +
    1.28  <ul>
    1.29  <?php
    1.30  if ($handle = opendir('/home')) {
    1.31 +	$scn_url = 'http://scn.slitaz.org/members';
    1.32  	while (false !== ($dir = readdir($handle))) {
    1.33  		if ($dir != "." && $dir != "..") {
    1.34  			$pub = "/home/$dir/Public";
    1.35  			$user = "$dir";
    1.36  			if (file_exists($pub)) {
    1.37 -			echo "	<li><a href=\"/~$user/\">$user</a></li>\n";
    1.38 +				echo "	<li><a href=\"/~$user/\">$user</a>\n";
    1.39 +				if (file_exists("$pub/profile.php")) {
    1.40 +					require_once("$pub/profile.php");
    1.41 +					echo "<span>Name: $name";
    1.42 +					if (! empty($location)) { 
    1.43 +						echo " | Location: $location"; 
    1.44 +					}
    1.45 +					if (! empty($scn_user)) { 
    1.46 +						echo " | <a href=\"$scn_url/$scn_user/\">SCN activity</a>"; 
    1.47 +					}
    1.48 +					if (! empty($skills)) { 
    1.49 +						echo " | Skills: $skills"; 
    1.50 +					}
    1.51 +					echo "</span>";
    1.52 +					if (! empty($wall)) { 
    1.53 +						echo "<span>$wall</span>";
    1.54 +					}
    1.55 +				}
    1.56 +				echo "</li>";
    1.57  			}
    1.58 +			
    1.59  		}
    1.60  	}
    1.61  	closedir($handle);