[phpcvsview-cvs-updates] phpcvsview/Themes/Default theme.php,1.3,1.4
Status: Pre-Alpha
Brought to you by:
bcheesem
From: Sijis A. <si...@us...> - 2004-10-06 08:50:17
|
Update of /cvsroot/phpcvsview/phpcvsview/Themes/Default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25859/Themes/Default Modified Files: theme.php Log Message: - changed statements to handle enviroment data array - minor cosmetic changes Index: theme.php =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/Themes/Default/theme.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** theme.php 4 Oct 2004 11:40:17 -0000 1.3 --- theme.php 6 Oct 2004 08:49:58 -0000 1.4 *************** *** 11,15 **** * @copyright 2003-2004 Brian A Cheeseman **/ ! $FolderIcon = "Themes/Default/Images/folder.gif"; $FileIcon = "Themes/Default/Images/file.gif"; --- 11,15 ---- * @copyright 2003-2004 Brian A Cheeseman **/ ! $FolderIcon = "Themes/Default/Images/folder.gif"; $FileIcon = "Themes/Default/Images/file.gif"; *************** *** 25,33 **** $PageHead .= "<link href=\"Themes/Default/theme.css\" rel=\"stylesheet\" type=\"text/css\" />"; $PageHead .= "</head>"; ! } // End of if ($Title != "") $PageHead .= "<body>"; if ($Heading != "") { $PageHead .= "<div class=\"title\">$Heading</div>"; ! } // End of if ($Header != "") $PageHead .= "<p>Welcome to our CVS Repository viewer. This page has been dynamically"; $PageHead .= " created with '<a href=\"http://phpcvsview.sourceforge.net/\">phpCVS"; --- 25,35 ---- $PageHead .= "<link href=\"Themes/Default/theme.css\" rel=\"stylesheet\" type=\"text/css\" />"; $PageHead .= "</head>"; ! } ! $PageHead .= "<body>"; if ($Heading != "") { $PageHead .= "<div class=\"title\">$Heading</div>"; ! } ! $PageHead .= "<p>Welcome to our CVS Repository viewer. This page has been dynamically"; $PageHead .= " created with '<a href=\"http://phpcvsview.sourceforge.net/\">phpCVS"; *************** *** 35,39 **** $PageHead .= "\">Brian Cheeseman</a>.</p><p>Please feel free to browse our source code.</p>"; return $PageHead; ! } // End of function GetPageHeader($Title="", $Heading="") function GetPageFooter() { --- 37,41 ---- $PageHead .= "\">Brian Cheeseman</a>.</p><p>Please feel free to browse our source code.</p>"; return $PageHead; ! } function GetPageFooter() { *************** *** 46,56 **** $PageFoot .= "</body></html>"; return $PageFoot; ! } // End of function GetPageFooter() function GetQuickLinkBar($ModPath = "/", $Prefix = "Navigate to: ", $LinkLast = false, $LastIsFile = false, $Revision = "") { // Add the quick link navigation bar. $Dirs = explode("/", $ModPath); ! $QLOut = "<div class=\"quicknav\">$Prefix<a href=\"$ScriptName\">Root</a> "; $intCount = 1; $OffSet = 2; --- 48,60 ---- $PageFoot .= "</body></html>"; return $PageFoot; ! } function GetQuickLinkBar($ModPath = "/", $Prefix = "Navigate to: ", $LinkLast = false, $LastIsFile = false, $Revision = "") { + global $env; + // Add the quick link navigation bar. $Dirs = explode("/", $ModPath); ! $QLOut = "<div class=\"quicknav\">$Prefix<a href=\"".$env['script_name']."\">Root</a> "; $intCount = 1; $OffSet = 2; *************** *** 58,82 **** $OffSet = 1; } ! while($intCount < count($Dirs)-$OffSet){ if (($intCount != count($Dirs)-$OffSet)) { ! $QLOut .= "/ <a href=\"$ScriptName?mp=".ImplodeToPath($Dirs, "/", $intCount)."/\">".$Dirs[$intCount]."</a> "; ! } ! else ! { $QLOut .= "/ ".$Dirs[$intCount]." "; } $intCount++; ! } // while $QLOut .= "/ "; if ($LinkLast) { ! $QLOut .= "<a href=\"$ScriptName?mp=".ImplodeToPath($Dirs, "/", $intCount); if ($LastIsFile) { $QLOut .= "&fh#rd$Revision\">"; ! } ! else ! { $QLOut .= "/"; } } $QLOut .= $Dirs[$intCount]; if ($LinkLast) { --- 62,85 ---- $OffSet = 1; } ! ! while($intCount < count($Dirs)-$OffSet) { if (($intCount != count($Dirs)-$OffSet)) { ! $QLOut .= "/ <a href=\"".$env['script_name']."?mp=".ImplodeToPath($Dirs, "/", $intCount)."/\">".$Dirs[$intCount]."</a> "; ! } else { $QLOut .= "/ ".$Dirs[$intCount]." "; } $intCount++; ! } ! $QLOut .= "/ "; if ($LinkLast) { ! $QLOut .= "<a href=\"".$env['script_name']."?mp=".ImplodeToPath($Dirs, "/", $intCount); if ($LastIsFile) { $QLOut .= "&fh#rd$Revision\">"; ! } else { $QLOut .= "/"; } } + $QLOut .= $Dirs[$intCount]; if ($LinkLast) { *************** *** 104,111 **** function addParentDirectory($ModPath) { ! global $RowClass, $ParentIcon, $ScriptName, $ScriptPath; ! $HREF = str_replace("//", "/", "$ScriptName?mp=".substr($ModPath, 0, strrpos(substr($ModPath, 0, -1), "/"))."/"); echo " <tr class=\"$RowClass\">\n"; ! echo " <td align=\"center\"><a href=\"$HREF\"><img alt=\"parent\" src=\"$ScriptPath/$ParentIcon\" /></a></td>\n"; echo " <td><a href=\"$HREF\">Up one folder</a></td>\n"; echo " <td> </td>\n"; --- 107,114 ---- function addParentDirectory($ModPath) { ! global $RowClass, $ParentIcon, $env; ! $HREF = str_replace("//", "/", $env['script_name']."?mp=".substr($ModPath, 0, strrpos(substr($ModPath, 0, -1), "/"))."/"); echo " <tr class=\"$RowClass\">\n"; ! echo " <td align=\"center\"><a href=\"$HREF\"><img alt=\"parent\" src=\"".$env['script_path']."/$ParentIcon\" /></a></td>\n"; echo " <td><a href=\"$HREF\">Up one folder</a></td>\n"; echo " <td> </td>\n"; *************** *** 119,128 **** function addFolders($ModPath, $Folders) { ! global $RowClass, $FolderIcon, $ScriptName, $ScriptPath; ! foreach ($Folders as $Folder) ! { ! $HREF = str_replace("//", "/", "$ScriptName?mp=$ModPath/".$Folder["Name"]."/"); echo " <tr class=\"$RowClass\">\n"; ! echo " <td align=\"center\"><a href=\"$HREF\"><img alt=\"DIR\" src=\"$ScriptPath/$FolderIcon\" /></a></td>\n"; echo " <td><a href=\"$HREF\">".$Folder["Name"]."</a></td>\n"; echo " <td> </td>\n"; --- 122,130 ---- function addFolders($ModPath, $Folders) { ! global $RowClass, $FolderIcon, $env; ! foreach ($Folders as $Folder) { ! $HREF = str_replace("//", "/", $env['script_name']."?mp=$ModPath/".$Folder["Name"]."/"); echo " <tr class=\"$RowClass\">\n"; ! echo " <td align=\"center\"><a href=\"$HREF\"><img alt=\"DIR\" src=\"".$env['script_path']."/$FolderIcon\" /></a></td>\n"; echo " <td><a href=\"$HREF\">".$Folder["Name"]."</a></td>\n"; echo " <td> </td>\n"; *************** *** 133,139 **** if ($RowClass == "row1") { $RowClass = "row2"; ! } ! else ! { $RowClass = "row1"; } --- 135,139 ---- if ($RowClass == "row1") { $RowClass = "row2"; ! } else { $RowClass = "row1"; } *************** *** 143,154 **** function addFiles($ModPath, $Files) { ! global $RowClass, $FileIcon, $ScriptName, $ScriptPath; ! foreach ($Files as $File) ! { ! $HREF = str_replace("//", "/", "$ScriptName?mp=$ModPath/".$File["Name"]); $DateTime = strtotime($File["Revisions"][$File["Head"]]["date"]); $AGE = CalculateDateDiff($DateTime, strtotime(gmdate("M d Y H:i:s"))); echo " <tr class=\"$RowClass\" valign=\"top\">\n"; ! echo " <td align=\"center\"><a href=\"$HREF&fh\"><img alt=\"FILE\" src=\"$ScriptPath/$FileIcon\" /></a></td>\n"; echo " <td><a href=\"$HREF&fh\">".$File["Name"]."</a></td>\n"; echo " <td align=\"center\"><a href=\"$HREF&fv&dt=$DateTime\">".$File["Head"]."</a></td>\n"; --- 143,153 ---- function addFiles($ModPath, $Files) { ! global $RowClass, $FileIcon, $env; ! foreach ($Files as $File) { ! $HREF = str_replace("//", "/", $env['script_name']."?mp=$ModPath/".$File["Name"]); $DateTime = strtotime($File["Revisions"][$File["Head"]]["date"]); $AGE = CalculateDateDiff($DateTime, strtotime(gmdate("M d Y H:i:s"))); echo " <tr class=\"$RowClass\" valign=\"top\">\n"; ! echo " <td align=\"center\"><a href=\"$HREF&fh\"><img alt=\"FILE\" src=\"".$env['script_path']."/$FileIcon\" /></a></td>\n"; echo " <td><a href=\"$HREF&fh\">".$File["Name"]."</a></td>\n"; echo " <td align=\"center\"><a href=\"$HREF&fv&dt=$DateTime\">".$File["Head"]."</a></td>\n"; *************** *** 159,165 **** if ($RowClass == "row1") { $RowClass = "row2"; ! } ! else ! { $RowClass = "row1"; } --- 158,162 ---- if ($RowClass == "row1") { $RowClass = "row2"; ! } else { $RowClass = "row1"; } *************** *** 167,169 **** } ! ?> \ No newline at end of file --- 164,166 ---- } ! ?> |