david_williams | 4a022dd | 2009-05-26 04:13:39 +0000 | [diff] [blame] | 1 | <html> |
| 2 | <head> |
| 3 | <?php |
| 4 | $parts = explode("/", getcwd()); |
| 5 | $parts2 = explode("-", $parts[count($parts) - 1]); |
| 6 | $buildName = $parts2[1]; |
| 7 | |
| 8 | echo "<title>Build Notes for $buildName </title>"; |
| 9 | ?> |
| 10 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
| 11 | <link rel="stylesheet" href="http://dev.eclipse.org/default_style.css" |
| 12 | type="text/css"> |
| 13 | </head> |
| 14 | <body> |
| 15 | |
| 16 | <p><b><font face="Verdana" size="+3">Build Notes</font></b></p> |
| 17 | |
| 18 | <table border=0 cellspacing=5 cellpadding=2 width="100%"> |
| 19 | <tr> |
| 20 | <td align=LEFT valign=TOP colspan="3" bgcolor="#0080C0"><b><font |
| 21 | color="#FFFFFF" face="Arial,Helvetica"> Build Notes for <?php echo "$buildName"; ?></font></b></td> |
| 22 | </tr> |
| 23 | </table> |
| 24 | <table border="0"> |
| 25 | |
| 26 | <?php |
| 27 | $hasNotes = false; |
| 28 | $aDirectory = dir("buildnotes"); |
| 29 | while ($anEntry = $aDirectory->read()) { |
| 30 | if ($anEntry != "." && $anEntry != "..") { |
| 31 | //print_r($anEntry); |
| 32 | //echo "<br />"; |
| 33 | |
| 34 | $subject = $anEntry; |
| 35 | $pattern = '/^buildnotes_(.*)/i'; |
| 36 | preg_match($pattern, $subject, $matches); |
| 37 | $subject = $matches[1]; |
| 38 | //print_r($subject); |
| 39 | //echo "<br />"; |
| 40 | $pattern = '/^(.*)\.html$/'; |
| 41 | preg_match($pattern, $subject, $matches); |
| 42 | //print_r($matches); |
| 43 | //echo "<br />"; |
| 44 | |
| 45 | $component = $matches[1]; |
| 46 | |
| 47 | $line = "<td>Component: <a href=\"buildnotes/$anEntry\">$component</a></td>"; |
| 48 | echo "<tr>"; |
| 49 | echo "$line"; |
| 50 | echo "</tr>"; |
| 51 | $hasNotes = true; |
| 52 | |
| 53 | } |
| 54 | } |
| 55 | $aDirectory.closedir(); |
| 56 | if (!$hasNotes) { |
| 57 | echo "<br>There are no build notes for this build."; |
| 58 | } |
| 59 | ?> |
| 60 | |
| 61 | </table> |
| 62 | </body> |
| 63 | </html> |