5d5a8211f210fd4c9edd99746421efc025ef539b
[plewww.git] / planetlab / pub / sites.php
1 <?php
2 //
3 // Site list
4 //
5 // Mark Huang <mlhuang@cs.princeton.edu>
6 // Copyright (C) 2006 The Trustees of Princeton University
7 //
8 // $Id$ $
9 //
10
11 // Get API handle
12 require_once 'plc_session.php';
13 global $adm;
14
15 // Print header
16 require_once 'plc_drupal.php';
17 drupal_set_title('Sites');
18 include 'plc_header.php';
19
20 ?>
21
22 <p>The following sites currently host or plan to host <?php echo PLC_NAME; ?> nodes:</p>
23
24 <ul>
25
26 <?php
27
28 // All defined sites
29 $sites = $adm->GetSites(array('is_public' => TRUE), array('name', 'url'));
30
31 foreach ($sites as $site) {
32   $name = htmlspecialchars($site['name']);
33   $url = $site['url'];
34   print "<li>";
35   if ($url) {
36     print "<a href=\"$url\">$name</a>";
37   } else {
38     print "$name";
39   }
40   print "</li>";
41 }
42
43 ?>
44
45 </ul>
46
47 <?php
48
49 include 'plc_footer.php';
50
51 ?>