[phpcvsview-cvs-updates] phpcvsview/Themes/Default theme.php,1.14,1.15
Status: Pre-Alpha
Brought to you by:
bcheesem
From: Sijis A. <si...@us...> - 2005-02-04 09:57:23
|
Update of /cvsroot/phpcvsview/phpcvsview/Themes/Default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12902/Themes/Default Modified Files: theme.php Log Message: - removed reference to $env['mod_path'] in function calls - minor cosmetic fixes Index: theme.php =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/Themes/Default/theme.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** theme.php 4 Feb 2005 04:51:09 -0000 1.14 --- theme.php 4 Feb 2005 09:57:12 -0000 1.15 *************** *** 11,15 **** * @copyright 2003-2005 Brian A Cheeseman **/ ! $FolderIcon = "Themes/".$config['theme']."/Images/folder.png"; $FileIcon = "Themes/".$config['theme']."/Images/file.png"; --- 11,15 ---- * @copyright 2003-2005 Brian A Cheeseman **/ ! $FolderIcon = "Themes/".$config['theme']."/Images/folder.png"; $FileIcon = "Themes/".$config['theme']."/Images/file.png"; *************** *** 21,40 **** global $StartTime, $config, $env, $lang; $StartTime = microtime(); ! $PageHead = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">"; ! $PageHead .= "<html><head>"; if ($Title != "") { ! $PageHead .= "<title>$Title</title>"; } ! $PageHead .= "<link href=\"Themes/".$config['theme']."/theme.css\" rel=\"stylesheet\" type=\"text/css\" />"; // Add JavaScript to postback the change in theme selection. ! $PageHead .= "<script src=\"./phpcvsview.js\"></script>"; ! $PageHead .= "</head>"; ! $PageHead .= "<body>"; if ($Heading != "") { ! $PageHead .= "<div class=\"title\">$Heading</div>"; } $PageHead .= $lang['message']; ! $PageHead .= "<form class=\"themechanger\">"; ! $PageHead .= ' '.$lang['change_cvsroot'].' <select name="reposSelect" class="reposchanger" onchange="postBackReposChange(this.form)">'; foreach($config['cvs'] as $key => $value){ --- 21,39 ---- global $StartTime, $config, $env, $lang; $StartTime = microtime(); ! $PageHead = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'; ! $PageHead .= '<html><head>'; if ($Title != "") { ! $PageHead .= '<title>'.$Title.'</title>'; } ! $PageHead .= '<link href="Themes/'.$config['theme'].'/theme.css" rel="stylesheet" type="text/css" />'; // Add JavaScript to postback the change in theme selection. ! $PageHead .= '<script src="./phpcvsview.js"></script>'; ! $PageHead .= '</head>'; ! $PageHead .= '<body>'; if ($Heading != "") { ! $PageHead .= '<div class="title">'.$Heading.'</div>'; } $PageHead .= $lang['message']; ! $PageHead .= '<form class="themechanger">'; $PageHead .= ' '.$lang['change_cvsroot'].' <select name="reposSelect" class="reposchanger" onchange="postBackReposChange(this.form)">'; foreach($config['cvs'] as $key => $value){ *************** *** 90,109 **** global $StartTime, $lang; $EndTime = microtime(); ! $PageFoot = "<div class=\"footer\">".$lang['generated']." ".number_format(microtime_diff($StartTime, $EndTime), 3)." ".$lang['seconds']."<br />"; $PageFoot .= $lang['created_by']; ! $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>"; return $PageFoot; } ! function GetQuickLinkBar($ModPath = "/", $Prefix = "", $LinkLast = false, $LastIsFile = false, $Revision = "") { global $env, $lang; // Add the quick link navigation bar. ! $Dirs = explode("/", $ModPath); ! $QLOut = "<div class=\"quicknav\">".$lang['navigate_to']."<a href=\"".$env['script_name']."\">".$lang['root']."</a> "; $intCount = 1; $OffSet = 2; --- 89,109 ---- global $StartTime, $lang; $EndTime = microtime(); ! $PageFoot = '<div class="footer">'.$lang['generated'].' '.number_format(microtime_diff($StartTime, $EndTime), 3).' '.$lang['seconds'].'<br />'; $PageFoot .= $lang['created_by']; ! $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>'; return $PageFoot; } ! function GetQuickLinkBar($Prefix = "", $LinkLast = false, $LastIsFile = false, $Revision = "") { global $env, $lang; + if(empty($Prefix)){ $Prefix = $lang['navigate_to'];} // Add the quick link navigation bar. ! $Dirs = explode("/", $env['mod_path']); ! $QLOut = '<div class="quicknav">'.$Prefix.'<a href="'.$env['script_name'].'">'.$lang['root'].'</a> '; $intCount = 1; $OffSet = 2; *************** *** 114,131 **** 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 .= "/"; } } --- 114,131 ---- 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 .= '/'; } } *************** *** 133,139 **** $QLOut .= $Dirs[$intCount]; if ($LinkLast) { ! $QLOut .= "</a>"; } ! $QLOut .= "</div>"; return $QLOut; } --- 133,139 ---- $QLOut .= $Dirs[$intCount]; if ($LinkLast) { ! $QLOut .= '</a>'; } ! $QLOut .= '</div>'; return $QLOut; } *************** *** 142,148 **** { global $RowClass, $lang; ! echo "<hr />"; ! echo "<table>"; ! echo "<tr class=\"head\"><th> </th><th> </th><th>".$lang['file']."</th><th>".$lang['rev']."</th><th>".$lang['age']."</th><th>".$lang['author']."</th><th>".$lang['last_log']."</th></tr>"; $RowClass = "row1"; } --- 142,148 ---- { global $RowClass, $lang; ! echo '<hr />'; ! echo '<table>'; ! echo '<tr class="head"><th> </th><th> </th><th>'.$lang['file'].'</th><th>'.$lang['rev'].'</th><th>'.$lang['age'].'</th><th>'.$lang['author'].'</th><th>'.$lang['last_log'].'</th></tr>'; $RowClass = "row1"; } *************** *** 150,191 **** function endDirList() { ! echo "</table>"; ! echo "<hr />"; } ! function addParentDirectory($ModPath) { global $RowClass, $ParentIcon, $env, $lang; ! $HREF = str_replace("//", "/", $env['script_name']."?mp=".substr($ModPath, 0, strrpos(substr($ModPath, 0, -1), "/"))."/"); ! echo "<tr class=\"$RowClass\">"; ! echo "<td class=\"min\"> </td>"; ! echo "<td class=\"min\"><a href=\"$HREF\"><img alt=\"parent\" src=\"".$env['script_path']."/$ParentIcon\" /></a></td>"; ! echo "<td class=\"min\"><a href=\"$HREF\">".$lang['up_folder']."</a></td>"; ! echo "<td> </td>"; ! echo "<td> </td>"; ! echo "<td> </td>"; ! echo "<td> </td>"; ! echo "</tr>"; $RowClass = "row2"; } ! function addFolders($ModPath, $Folders) { global $RowClass, $DownloadIcon, $FolderIcon, $env; foreach ($Folders as $Folder) { ! $HREF = str_replace("//", "/", $env['script_name']."?mp=$ModPath/".$Folder["Name"]."/"); ! echo "<tr class=\"$RowClass\">"; if ($Folder["Name"] != "CVSROOT" && $Folder["Name"] != "Attic") { ! echo "<td class=\"min\"><a href=\"$HREF&dp\"><img alt=\"D/L\" src=\"".$env['script_path']."/$DownloadIcon\" /></a></td>"; } else { ! echo "<td class=\"min\"> </td>"; } ! echo "<td class=\"min\"><a href=\"$HREF\"><img alt=\"DIR\" src=\"".$env['script_path']."/$FolderIcon\" /></a></td>"; ! echo "<td class=\"min\"><a href=\"$HREF\">".$Folder["Name"]."</a></td>"; ! echo "<td> </td>"; ! echo "<td> </td>"; ! echo "<td> </td>"; ! echo "<td> </td>"; ! echo "</tr>"; if ($RowClass == "row1") { $RowClass = "row2"; --- 150,192 ---- function endDirList() { ! echo '</table>'; ! echo '<hr />'; } ! function addParentDirectory() { global $RowClass, $ParentIcon, $env, $lang; ! ! $HREF = str_replace("//", "/", $env['script_name']."?mp=".substr($env['mod_path'], 0, strrpos(substr($env['mod_path'], 0, -1), "/"))."/"); ! echo '<tr class="'.$RowClass.'">'; ! echo '<td class="min"> </td>'; ! echo '<td class="min"><a href="'.$HREF.'"><img alt="parent" src="'.$env['script_path'].'/'.$ParentIcon.'" /></a></td>'; ! echo '<td class="min"><a href="'.$HREF.'">'.$lang['up_folder'].'</a></td>'; ! echo '<td> </td>'; ! echo '<td> </td>'; ! echo '<td> </td>'; ! echo '<td> </td>'; ! echo '</tr>'; $RowClass = "row2"; } ! function addFolders($Folders) { global $RowClass, $DownloadIcon, $FolderIcon, $env; foreach ($Folders as $Folder) { ! $HREF = str_replace("//", "/", $env['script_name']."?mp=".$env['mod_path']."/".$Folder["Name"]."/"); ! echo '<tr class="'.$RowClass.'">'; if ($Folder["Name"] != "CVSROOT" && $Folder["Name"] != "Attic") { ! echo '<td class="min"><a href="'.$HREF.'&dp"><img alt="D/L" src="'.$env['script_path'].'/'.$DownloadIcon.'" /></a></td>'; } else { ! echo '<td class="min"> </td>'; } ! echo '<td class="min"><a href="'.$HREF.'"><img alt="DIR" src="'.$env['script_path'].'/'.$FolderIcon.'" /></a></td>'; ! echo '<td class="min"><a href="'.$HREF.'">'.$Folder["Name"].'</a></td>'; ! echo '<td> </td>'; ! echo '<td> </td>'; ! echo '<td> </td>'; ! echo '<td> </td>'; ! echo '</tr>'; if ($RowClass == "row1") { $RowClass = "row2"; *************** *** 196,218 **** } ! function addModules($ModPath, $Modules) { global $RowClass, $DownloadIcon, $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\">"; if ($Val != "CVSROOT" && $Val != "Attic") { ! echo "<td class=\"min\"><a href=\"$HREF&dp\"><img alt=\"D/L\" src=\"".$env['script_path']."/$DownloadIcon\" /></a></td>"; } else { ! echo "<td class=\"min\"> </td>"; } ! echo "<td class=\"min\"><a href=\"$HREF\"><img alt=\"MOD\" src=\"".$env['script_path']."/$ModuleIcon\" /></a></td>"; ! echo "<td class=\"min\"><a href=\"$HREF\">".$Key."</a></td>"; ! echo "<td> </td>"; ! echo "<td> </td>"; ! echo "<td> </td>"; ! echo "<td> </td>"; ! echo "</tr>"; if ($RowClass == "row1") { $RowClass = "row2"; --- 197,220 ---- } ! function addModules($Modules) { global $RowClass, $DownloadIcon, $ModuleIcon, $env; + foreach ($Modules as $Key => $Val) { // Add the row data here. ! $HREF = str_replace("//", "/", $env['script_name']."?mp=".$env['mod_path'].$Val."/"); ! echo '<tr class="'.$RowClass.'">'; if ($Val != "CVSROOT" && $Val != "Attic") { ! echo '<td class="min"><a href="'.$HREF.'&dp"><img alt="D/L" src="'.$env['script_path'].'/'.$DownloadIcon.'" /></a></td>'; } else { ! echo '<td class="min"> </td>'; } ! echo '<td class="min"><a href="'.$HREF.'"><img alt="MOD" src="'.$env['script_path'].'/'.$ModuleIcon.'" /></a></td>'; ! echo '<td class="min"><a href="'.$HREF.'">'.$Key.'</a></td>'; ! echo '<td> </td>'; ! echo '<td> </td>'; ! echo '<td> </td>'; ! echo '<td> </td>'; ! echo '</tr>'; if ($RowClass == "row1") { $RowClass = "row2"; *************** *** 223,242 **** } ! function addFiles($ModPath, $Files) { global $RowClass, $FileIcon, $env, $lang; 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\">"; ! echo "<td class=\"min\"> </td>"; ! echo "<td align=\"center\"><a href=\"$HREF&fh\"><img alt=\"FILE\" src=\"".$env['script_path']."/$FileIcon\" /></a></td>"; ! echo "<td><a href=\"$HREF&fh\">".$File["Name"]."</a></td>"; ! echo "<td align=\"center\"><a href=\"$HREF&fv&dt=$DateTime\">".$File["Head"]."</a></td>"; ! echo "<td align=\"center\">".str_replace(" ", " ", $AGE)." ".$lang['ago']."</td>"; ! echo "<td align=\"center\">".$File["Revisions"][$File["Head"]]["author"]."</td>"; ! echo "<td>".str_replace(array("\n", " "), array("<br />", " "), $File["Revisions"][$File["Head"]]["LogMessage"])."</td>"; ! echo "</tr>"; if ($RowClass == "row1") { $RowClass = "row2"; --- 225,245 ---- } ! function addFiles($Files) { global $RowClass, $FileIcon, $env, $lang; + foreach ($Files as $File) { ! $HREF = str_replace("//", "/", $env['script_name']."?mp=".$env['mod_path'].$File["Name"]); $DateTime = strtotime($File["Revisions"][$File["Head"]]["date"]); $AGE = CalculateDateDiff($DateTime, strtotime(gmdate("M d Y H:i:s"))); ! echo '<tr class="'.$RowClass.'">'; ! echo '<td class="min"> </td>'; ! echo '<td align="center"><a href="'.$HREF.'&fh"><img alt="FILE" src="'.$env['script_path'].'/'.$FileIcon.'" /></a></td>'; ! echo '<td><a href="'.$HREF.'&fh">'.$File["Name"].'</a></td>'; ! echo '<td align="center"><a href="'.$HREF.'&fv&dt='.$DateTime.'">'.$File["Head"].'</a></td>'; ! echo '<td align="center">'.str_replace(" ", " ", $AGE).' '.$lang['ago'].'</td>'; ! echo '<td align="center">'.$File["Revisions"][$File["Head"]]["author"].'</td>'; ! echo '<td>'.str_replace(array("\n", " "), array("<br />", " "), $File["Revisions"][$File["Head"]]["LogMessage"]).'</td>'; ! echo '</tr>'; if ($RowClass == "row1") { $RowClass = "row2"; *************** *** 250,269 **** { global $CVSServer, $env; $HREF = str_replace("//", "/", $env['script_name']."?mp=".$env['mod_path']); ! $DiffForm = "<form class=\"diffform\">"; ! $DiffForm .= "Diff between: <select name=\"DiffRev1\" class=\"diffform\">"; foreach ($CVSServer->FILES[0]["Revisions"] as $Revision) { ! $DiffForm .= "<option value=\"".$Revision["Revision"]."\">".$Revision["Revision"]."</option>"; } ! $DiffForm .= "</select> and <select name=\"DiffRev2\" class=\"diffform\">"; foreach ($CVSServer->FILES[0]["Revisions"] as $Revision) { ! $DiffForm .= "<option value=\"".$Revision["Revision"]."\">".$Revision["Revision"]."</option>"; } ! $DiffForm .= "</select><input type=\"hidden\" name=\"URLDiffReq\" value=\"".$HREF."\">"; ! $DiffForm .= "<input type=\"button\" value=\"Get Diff\" onclick=\"postBackDiffRequest(this.form)\">"; ! $DiffForm .= "</form>"; return $DiffForm; --- 253,273 ---- { global $CVSServer, $env; + $HREF = str_replace("//", "/", $env['script_name']."?mp=".$env['mod_path']); ! $DiffForm = '<form class="diffform">'; ! $DiffForm .= 'Diff between: <select name="DiffRev1" class="diffform">'; foreach ($CVSServer->FILES[0]["Revisions"] as $Revision) { ! $DiffForm .= '<option value="'.$Revision["Revision"].'">'.$Revision["Revision"].'</option>'; } ! $DiffForm .= '</select> and <select name="DiffRev2" class="diffform">'; foreach ($CVSServer->FILES[0]["Revisions"] as $Revision) { ! $DiffForm .= '<option value="'.$Revision["Revision"].'">'.$Revision["Revision"].'</option>'; } ! $DiffForm .= '</select><input type="hidden" name="URLDiffReq" value="'.$HREF.'">'; ! $DiffForm .= '<input type="button" value="Get Diff" onclick="postBackDiffRequest(this.form);">'; ! $DiffForm .= '</form>'; return $DiffForm; |