// $RCSfile: dvp.php,v $ // $Revision: 1.1 $ // $Name: $ // $Date: 2008/09/04 16:00:45 $ // $Author: agibert $ /* * DvpBrowse - Development Project Browser * Copyright (C) 2008 Arnaud G. Gibert * mailto:arnaud@rx3.net * http://www.rx3.org/dvp/dvpbrowse * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ function microtime_float() { list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec); } $time_start = microtime_float(); include "/var/httpd/www.rx3.org/html/dvp/dvp_config.inc"; $dvp_myname="DvpBrowse"; $dvp_tag_tab=explode( " ", "$Name: $"); $dvp_tag_tab=explode( "-", $dvp_tag_tab[1]); $dvp_myver=strtr( "$dvp_tag_tab[1]-$dvp_tag_tab[2]", "_", "."); /*--------------------------------------------------------------------------------------------------------------------*/ /* */ /*--------------------------------------------------------------------------------------------------------------------*/ function dvp_get_section( $dvp_id_lookup) { global $dvp_tab; foreach( $dvp_tab as $section_id => $value) { $dvp=$dvp_tab[$section_id]["dvp"]; foreach( $dvp as $dvp_id => $value) { if( $dvp_id == $dvp_id_lookup) { return $section_id; } } } return ""; } /*--------------------------------------------------------------------------------------------------------------------*/ /* */ /*--------------------------------------------------------------------------------------------------------------------*/ function dvp_get_name( $dvp_id_lookup) { global $dvp_tab; foreach( $dvp_tab as $section_id => $value) { $dvp=$dvp_tab[$section_id]["dvp"]; foreach( $dvp as $dvp_id => $value) { if( $dvp_id == $dvp_id_lookup) { return $dvp[$dvp_id]["name"]; } } } return ""; } /*--------------------------------------------------------------------------------------------------------------------*/ /* */ /*--------------------------------------------------------------------------------------------------------------------*/ function dvp_get_reqby( $dvp_id_lookup) { global $dvp_tab; foreach( $dvp_tab as $section_id => $value) { $dvp=$dvp_tab[$section_id]["dvp"]; foreach( $dvp as $dvp_id => $value) { $depend=$dvp[$dvp_id]["depend"]; if( $depend != "") { foreach( $depend as $depend_id) { if( $depend_id == $dvp_id_lookup) { $reqby[]=$dvp_id; } } } } } return $reqby; } /*--------------------------------------------------------------------------------------------------------------------*/ /* */ /*--------------------------------------------------------------------------------------------------------------------*/ function dvp_main_header( $name) { $page_name="$name"; $page_title="$page_name !"; global $dvp_tab; global $dvp_header; global $dvp_keywords; $keywords="$dvp_keywords"; foreach( $dvp_tab as $section_id => $value) { foreach( $dvp_tab[$section_id]["dvp"] as $dvp_id => $value) { $keywords="$keywords,$dvp_id"; } } include "$dvp_header"; echo "
$description
";
if( $depend != "")
{
echo "
";
foreach( $depend as $dep_id)
{
$dep_name=dvp_get_name( $dep_id);
echo "$dep_name ";
}
}
$reqby=dvp_get_reqby( $id);
if( $reqby != "")
{
echo "
"; foreach( $reqby as $dep_id) { $dep_name=dvp_get_name( $dep_id); echo "$dep_name "; } } echo "
"; if( $curver != "") { $cmd="tar xOzf download/$id/$id-$curver.src.tgz $id-$curver/ReleaseNotes.txt|awk 'BEGIN {go=0; skip=0;} /---------/ {go+=1; skip=1} /^$/ {if(go > 0) go+=1;} {if( ( skip != 1) && ( go > 0) && ( go < 4)) { print $0;} else skip=0;}'"; exec( $cmd, $rn_tab); echo "
"; for( $i = 1; $i < count($rn_tab); $i++) { echo "$rn_tab[$i]\n"; } echo ""; } echo"