[phpcvsview-cvs-updates] phpcvsview/Themes/Default theme.php,1.4,1.5
Status: Pre-Alpha
Brought to you by:
bcheesem
From: Brian C. <bch...@us...> - 2004-12-19 04:51:47
|
Update of /cvsroot/phpcvsview/phpcvsview/Themes/Default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21992/Themes/Default Modified Files: theme.php Log Message: - Added basic support for CVS modules. This code exports the /CVSROOT/modules fiel, parses it and then displays them in the top most folder. Index: theme.php =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/Themes/Default/theme.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** theme.php 6 Oct 2004 08:49:58 -0000 1.4 --- theme.php 19 Dec 2004 04:51:37 -0000 1.5 *************** *** 15,18 **** --- 15,19 ---- $FileIcon = "Themes/Default/Images/file.gif"; $ParentIcon = "Themes/Default/Images/parent.gif"; + $ModuleIcon = "Themes/Default/Images/module.gif"; function GetPageHeader($Title="", $Heading="") { *************** *** 44,48 **** $PageFoot = "<div class=\"footer\">This page was created by <a href=\"http://phpcvsview.sourceforge.net/\">phpCVSView</a> in ".number_format(microtime_diff($StartTime, $EndTime), 3)." seconds."; $PageFoot .= "<p><a href=\"http://validator.w3.org/check?uri=referer\"><img src=\"http://www.w3.org/Icons/valid-xhtml11\" alt=\"Valid XHTML 1.1!\" height=\"31\" width=\"88\" /></a> "; ! $PageFoot .= "<a href=\"http://jigsaw.w3.org/css-validator/check/referer\"><img style=\"border:0;width:88px;height:31px\" src=\"http://jigsaw.w3.org/css-validator/images/vcss\" alt=\"Valid CSS!\" /></a></p>"; $PageFoot .= "</div>"; $PageFoot .= "</body></html>"; --- 45,49 ---- $PageFoot = "<div class=\"footer\">This page was created by <a href=\"http://phpcvsview.sourceforge.net/\">phpCVSView</a> in ".number_format(microtime_diff($StartTime, $EndTime), 3)." seconds."; $PageFoot .= "<p><a href=\"http://validator.w3.org/check?uri=referer\"><img src=\"http://www.w3.org/Icons/valid-xhtml11\" alt=\"Valid XHTML 1.1!\" height=\"31\" width=\"88\" /></a> "; ! $PageFoot .= "<a href=\"http://jigsaw.w3.org/css-validator/check/referer\"><img style=\"border:0;width:88px;height:31px\" src=\"http://www.w3c.org/Icons/valid-css\" alt=\"Valid CSS!\" /></a></p>"; $PageFoot .= "</div>"; $PageFoot .= "</body></html>"; *************** *** 141,144 **** --- 142,167 ---- } + function addModules($ModPath, $Modules) + { + global $RowClass, $ModuleIcon, $env; + foreach ($Modules as $Key => $Val) { + // Add the row data here. + $HREF = str_replace("//", "/", $env['script_name']."?mp=$ModPath/".$Val."/"); + echo " <tr class=\"$RowClass\">\n"; + echo " <td align=\"center\"><a href=\"$HREF\"><img alt=\"MOD\" src=\"".$env['script_path']."/$ModuleIcon\" /></a></td>\n"; + echo " <td><a href=\"$HREF\">".$Key."</a></td>\n"; + echo " <td> </td>\n"; + echo " <td> </td>\n"; + echo " <td> </td>\n"; + echo " <td> </td>\n"; + echo " </tr>\n"; + if ($RowClass == "row1") { + $RowClass = "row2"; + } else { + $RowClass = "row1"; + } + } + } + function addFiles($ModPath, $Files) { |