source: subversion/sites/other/tilesAtHome/lib/gui.inc @ 3655

Last change on this file since 3655 was 2272, checked in by ojw, 13 years ago

tiles at home website

File size: 1.0 KB
Line 
1<?php
2
3  function navHeader($Title, $Root = "./",$Sidebar=1){
4    print("<html><head><title>$Title</title>");
5    print("<link rel=\"stylesheet\" href=\"$Root/styles.css\">");
6    print("</head>\n<body>");
7   
8    if($Sidebar)
9      sidebar();
10   
11    $Logo = "<a href=\"${Root}\"><img src=\"${Root}TilesAtHome.png\" width=\"60\" height=\"28\" border=\"0\" alt=\"logo\"></a>";
12    print("<h1>$Logo $Title</h1>\n");
13    print "<div id=\"main\">\n";
14   
15  }
16  function navFooter(){
17    print "</div><!-- main -->\n</body></html>\n";
18  }
19 
20  function sidebar(){
21    $ImgSize = 256;
22    printf("<div style=\"float:right; width:%dpx\"><table border=\"0\" cellpadding=\"3\" cellspacing=\"0\">\n",
23      $ImgSize+10);
24    for($dy = 0; $dy < 3; $dy++){
25      $X = 32684;
26      $Y = 21834+$dy;
27      $Z=16;
28     
29     
30      $Image = sprintf("/~ojw/Tiles/tile.php/%d/%d/%d.png", $Z,$X,$Y);
31      printf("<tr><td><img style=\"border:5px solid #888;\" src=\"%s\" width=\"%d\" height=\"%d\"></td></tr>\n", $Image, $ImgSize, $ImgSize);
32    }
33    print "</table></div>";
34  }
35?>
Note: See TracBrowser for help on using the repository browser.