$fileTimeStamp ) $fileTimeStamp = $stamp; $file = fopen( $logName, "rt" ); if ( $file == null ) return; if ( feof( $file ) ) return; $buildName = array( ); $buildDir = array( ); $buildDate = array( ); $i = 0; while ( ! feof( $file ) ) { $line = trim( fgets( $file ) ); if ( preg_match( "/\"?([^\",]*)\"?\s*,\"?([^\",]*)\"?\s*,\s*\"([^\"]*)\"/", $line, $match ) ) { $buildDir[ $i ] = $match[1]; $buildName[ $i ] = $match[2]; $buildDate[ $i ] = $match[3]; $i++; } } fclose( $file ); $build = array( ); $build[ BUILD_NAME ]= $buildName; $build[ BUILD_DIR ] = $buildDir; $build[ BUILD_DATE ] = $buildDate; $builds[ $type ] = $build; } function latestBuild( $type ) { global $builds; global $birtHome; $buildTypeName = "BIRT"; $rtn =""; switch ( $type ) { case RELEASE_BUILD: $buildTypeName = "Release"; break; case MILESTONE_BUILD: $buildTypeName = "Milestone"; break; case STABLE_BUILD: $buildTypeName = "Stable"; break; case NIGHTLY_BUILD: $buildTypeName = "Nightly"; break; } $rtn = $rtn . "" . $buildTypeName . "Build"; if ( $builds[ $type ] == null ) $rtn = $rtn . "None"; else { $count = count( $builds[ $type ][ BUILD_NAME ] ); $buildName = $builds[ $type ][ BUILD_NAME ][ $count - 1 ]; $buildDir = $builds[ $type ][ BUILD_DIR ][ $count - 1 ]; $buildDate = $builds[ $type ][ BUILD_DATE ][ $count - 1 ]; $rtn = $rtn . "$buildName $buildDate"; } $rtn = $rtn . ""; return($rtn); } function readLogs( $publicOnly = false ) { global $dropDir; readBuildLog( RELEASE_BUILD, "$dropDir/release.log" ); readBuildLog( MILESTONE_BUILD, "$dropDir/milestone.log" ); readBuildLog( STABLE_BUILD, "$dropDir/stable.log" ); if ( ! $publicOnly ) readBuildLog( NIGHTLY_BUILD, "$dropDir/nightly.log" ); } function pageHeader( $head, $title, $subtitle ) { global $birtHome; echo << $head END; showPageTitle( $title, $subtitle ); } function addJump( $text, $target = null ) { global $jumpName; global $jumpTarget; if ( $target == null || $target == "" ) { $n = count( $jumpName ) + 1; $target = "jump_" . $n; } $jumpName[ count( $jumpName ) ] = $text; $jumpTarget[ count( $jumpTarget ) ] = $target; } function showPageTitle( $title, $subtitle ) { global $jumpName; global $jumpTarget; global $birtHome; $rtn = ""; $rtn = $rtn . ""; // TOC is a jump bar for smaller documents. $rtn = $rtn . showJumps( ); $rtn = $rtn . "
$title" ; if ( $subtitle ) { $rtn = $rtn . "
$subtitle"; } $rtn = $rtn . "
0 ) $rtn = $rtn . "rowspan=2"; $rtn = $rtn . ">
"; $rtn = $rtn . showTOC( ); return( $rtn ); } function showJumps( ) { global $jumpName; global $jumpTarget; $rtn = ""; $count = count( $jumpName ); if ( $count > 1 && $count <= 5 ) { $rtn = $rtn . ""; for ($i = 0; $i < $count; $i++) { jumpItem( $jumpName[ $i ], $jumpTarget[ $i ] ); if ( $i + 1 < $count ) $rtn = $rtn . "    "; } $rtn = $rtn . ""; } return( $rtn ); } function showTOC( ) { global $jumpName; global $jumpTarget; $rtn = ""; $count = count( $jumpName ); if ( $count <= 5 ) return($rtn); $rtn = $rtn . "Contents
"; for ($i = 0; $i < $count; $i++) { $dest = $jumpTarget[ $i ]; $name = $jumpName[ $i ]; $rtn = $rtn . "$name
"; } $rtn = $rtn . "
"; return( $rtn ); } define( "MENU_BGND_COLOR", "#6699CC" ); define( "SIMPLE_ARROW_LIST", 0 ); define( "BREAK_ARROW_LIST", 1 ); define( "DATE_ARROW_LIST", 2 ); define( "BOLD_ARROW_LIST", 3 ); define( "PLAIN_ARROW_LIST", 4 ); function bulletList( $type = SIMPLE_ARROW_LIST ) { global $bulletType; $bulletType = $type; $rtn = ""; $rtn = $rtn . ""; return( $rtn ); } function startBullet( ) { global $bulletType; global $birtHome; $rtn = ""; $rtn = $rtn . ""; return($rtn); } function endList( ) { $rtn = ""; $rtn = $rtn . "
"; if ( $bulletType == DATE_ARROW_LIST || $bulletType == BOLD_ARROW_LIST ) $rtn = $rtn . ""; return( $rtn ); } function bullet( $text, $link = null, $target = null ) { $rtn = ""; $rtn = $rtn . startBullet( ); if ( $link == null ) { $rtn = $rtn . $text; } else { $rtn = $rtn . "$text"; } $rtn = $rtn . endBulletHead( ); return( $rtn ); } function endBulletHead( ) { global $bulletType; $rtn = ""; if ( $bulletType == DATE_ARROW_LIST || $bulletType == BOLD_ARROW_LIST ) $rtn = $rtn . ""; if ( $bulletType == BREAK_ARROW_LIST || $bulletType == BOLD_ARROW_LIST ) $rtn = $rtn . "
"; else if ( $bulletType != PLAIN_ARROW_LIST ) $rtn = $rtn . " –"; return( $rtn ); } function endBullet( ) { $rtn = ""; $rtn = $rtn . "
"; return( $rtn ); } ?>