[phpcvsview-cvs-updates] phpcvsview func_DirListing.php,1.3,1.4 func_FileAnnotation.php,1.3,1.4 func
Status: Pre-Alpha
Brought to you by:
bcheesem
From: Brian C. <bch...@us...> - 2004-10-03 14:09:15
|
Update of /cvsroot/phpcvsview/phpcvsview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31668 Modified Files: func_DirListing.php func_FileAnnotation.php func_FileHistory.php func_FileView.php Log Message: Changed HTML output to be compliant with XHTML 1.1 spec. Improved theme support. Index: func_FileView.php =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/func_FileView.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** func_FileView.php 3 Oct 2004 06:30:13 -0000 1.2 --- func_FileView.php 3 Oct 2004 14:03:04 -0000 1.3 *************** *** 48,57 **** // Start the output for the file. $Dirs = explode("/", $ModPath); ! echo "Navigate to: <a href=\"$ScriptName\">Root</a> "; $intCount = 1; while($intCount < count($Dirs)){ echo "/ <a href=\"$ScriptName?mp=".ImplodeToPath($Dirs, "/", $intCount); if ($intCount == (count($Dirs) - 1)) { ! echo "&fh#$Revision"; } else --- 48,57 ---- // Start the output for the file. $Dirs = explode("/", $ModPath); ! echo "<div class=\"quicknav\">Navigate to: <a href=\"$ScriptName\">Root</a> "; $intCount = 1; while($intCount < count($Dirs)){ echo "/ <a href=\"$ScriptName?mp=".ImplodeToPath($Dirs, "/", $intCount); if ($intCount == (count($Dirs) - 1)) { ! echo "&fh#rd$Revision"; } else *************** *** 62,70 **** $intCount++; } // while ! echo "<br>\n"; // Display the file contents. ! echo "<hr>\n"; if (strpos($File, ".php")) { $search = array('\t'); --- 62,70 ---- $intCount++; } // while ! echo "</div>\n"; // Display the file contents. ! echo "<hr />\n"; if (strpos($File, ".php")) { $search = array('\t'); *************** *** 89,92 **** --- 89,93 ---- echo "ERROR: Could not connect to the PServer.<br>\n"; } + echo GetPageFooter(); } Index: func_FileAnnotation.php =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/func_FileAnnotation.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** func_FileAnnotation.php 2 Oct 2004 05:32:56 -0000 1.3 --- func_FileAnnotation.php 3 Oct 2004 14:03:04 -0000 1.4 *************** *** 44,50 **** // Start the output for the table. ! echo "<hr>\n"; echo "<table border=\"0\" cellpadding=\"2\" cellspacing=\"0\" width=\"100%\">\n"; ! $BGColor = $HTMLTblCell1; $search = array('<', '>', '\n'); --- 44,50 ---- // Start the output for the table. ! echo "<hr />\n"; echo "<table border=\"0\" cellpadding=\"2\" cellspacing=\"0\" width=\"100%\">\n"; ! $RowClass = "row1"; $search = array('<', '>', '\n'); *************** *** 52,66 **** foreach ($CVSServer->ANNOTATION as $Annotation) { ! echo "<tr bgcolor=\"$BGColor\"><td nowrap><pre>".$Annotation["Revision"]."</pre></td><td nowrap><pre>".$Annotation["Author"]; ! echo "</pre></td><td nowrap><pre>".$Annotation["Date"]."</pre></td><td nowrap><pre>".str_replace($search, $replace, $Annotation["Line"])."</pre></td></tr>\n"; ! if ($BGColor == $HTMLTblCell1) { ! $BGColor = $HTMLTblCell2; } else { ! $BGColor = $HTMLTblCell1; } } ! echo "</table>\n"; // Close the connection. --- 52,66 ---- foreach ($CVSServer->ANNOTATION as $Annotation) { ! echo "<tr class=\"$RowClass\"><td><pre>".$Annotation["Revision"]."</pre></td><td><pre>".$Annotation["Author"]; ! echo "</pre></td><td><pre>".$Annotation["Date"]."</pre></td><td><pre>".str_replace($search, $replace, $Annotation["Line"])."</pre></td></tr>\n"; ! if ($RowClass == "row1") { ! $RowClass = "row2"; } else { ! $RowClass = "row1"; } } ! echo "</table><hr />\n"; // Close the connection. *************** *** 69,74 **** else { ! echo "ERROR: Could not connect to the PServer.<br>\n"; } } --- 69,75 ---- else { ! echo "ERROR: Could not connect to the PServer.<br />\n"; } + echo GetPageFooter(); } Index: func_DirListing.php =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/func_DirListing.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** func_DirListing.php 2 Oct 2004 04:52:10 -0000 1.3 --- func_DirListing.php 3 Oct 2004 14:03:04 -0000 1.4 *************** *** 42,46 **** // Add the quick link navigation bar. $Dirs = explode("/", $ModPath); ! echo "Navigate to: <a href=\"$ScriptName\">Root</a> "; $intCount = 1; while($intCount < count($Dirs)-2){ --- 42,46 ---- // Add the quick link navigation bar. $Dirs = explode("/", $ModPath); ! echo "<div class=\"quicknav\">Navigate to: <a href=\"$ScriptName\">Root</a> "; $intCount = 1; while($intCount < count($Dirs)-2){ *************** *** 48,64 **** $intCount++; } // while ! echo "/ ".$Dirs[$intCount]."<br>\n"; // Start the output for the table. ! echo "<hr>\n"; ! echo "<table border=\"0\" cellpadding=\"2\" cellspacing=\"1\" width=\"100%\">\n"; ! echo " <tr bgcolor=\"$HTMLTblHdBg\">\n <th width=\"30\"> </th>\n <th>File</th>\n <th>Rev.</th>\n <th>Age</th>\n <th>Author</th>\n <th>Last Log Entry</th>\n </tr>\n"; ! $BGColor = $HTMLTblCell1; // Do we need the "Back" operation. if (strlen($ModPath) > 1) { $HREF = str_replace("//", "/", "$ScriptName?mp=".substr($ModPath, 0, strrpos(substr($ModPath, 0, -1), "/"))."/"); ! echo " <tr bgcolor=\"$BGColor\">\n"; ! echo " <td align=\"center\" valign=\"center\"><a href=\"$HREF\"><img border=\"0\" src=\"$ScriptPath/images/parent.png\"></a></td>\n"; echo " <td><a href=\"$HREF\">Previous Level</a></td>\n"; echo " <td> </td>\n"; --- 48,64 ---- $intCount++; } // while ! echo "/ ".$Dirs[$intCount]."</div>\n"; // Start the output for the table. ! echo "<hr />\n"; ! echo "<table>\n"; ! echo " <tr class=\"head\">\n <th> </th>\n <th>File</th>\n <th>Rev.</th>\n <th>Age</th>\n <th>Author</th>\n <th>Last Log Entry</th>\n </tr>\n"; ! $RowClass = "row1"; // Do we need the "Back" operation. if (strlen($ModPath) > 1) { $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/images/parent.png\" /></a></td>\n"; echo " <td><a href=\"$HREF\">Previous Level</a></td>\n"; echo " <td> </td>\n"; *************** *** 67,71 **** echo " <td> </td>\n"; echo " </tr>\n"; ! $BGColor = $HTMLTblCell2; } --- 67,71 ---- echo " <td> </td>\n"; echo " </tr>\n"; ! $RowClass = "row2"; } *************** *** 74,79 **** { $HREF = str_replace("//", "/", "$ScriptName?mp=$ModPath/".$Folder["Name"]."/"); ! echo " <tr bgcolor=\"$BGColor\">\n"; ! echo " <td align=\"center\" valign=\"center\"><a href=\"$HREF\"><img border=\"0\" src=\"$ScriptPath/images/folder.png\"></a></td>\n"; echo " <td><a href=\"$HREF\">".$Folder["Name"]."</a></td>\n"; echo " <td> </td>\n"; --- 74,79 ---- { $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/images/folder.png\" /></a></td>\n"; echo " <td><a href=\"$HREF\">".$Folder["Name"]."</a></td>\n"; echo " <td> </td>\n"; *************** *** 82,91 **** echo " <td> </td>\n"; echo " </tr>\n"; ! if ($BGColor == $HTMLTblCell1) { ! $BGColor = $HTMLTblCell2; } else { ! $BGColor = $HTMLTblCell1; } } --- 82,91 ---- echo " <td> </td>\n"; echo " </tr>\n"; ! if ($RowClass == "row1") { ! $RowClass = "row2"; } else { ! $RowClass = "row1"; } } *************** *** 96,113 **** $DateTime = strtotime($File["Revisions"][$File["Head"]]["date"]); $AGE = CalculateDateDiff($DateTime, strtotime(gmdate("M d Y H:i:s"))); ! echo " <tr bgcolor=\"$BGColor\" valign=\"top\">\n"; ! echo " <td align=\"center\" valign=\"center\"><a href=\"$HREF&fh\"><img border=\"0\" src=\"$ScriptPath/images/file.png\"></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"]."</td>\n"; echo " <td align=\"center\">".$AGE." ago</td>\n"; echo " <td align=\"center\">".$File["Revisions"][$File["Head"]]["author"]."</td>\n"; ! echo " <td>".str_replace("\n", "<br>", $File["Revisions"][$File["Head"]]["LogMessage"])."</td>\n"; echo " </tr>\n"; ! if ($BGColor == $HTMLTblCell1) { ! $BGColor = $HTMLTblCell2; } else { ! $BGColor = $HTMLTblCell1; } } --- 96,113 ---- $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/images/file.png\" /></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"; echo " <td align=\"center\">".$AGE." ago</td>\n"; echo " <td align=\"center\">".$File["Revisions"][$File["Head"]]["author"]."</td>\n"; ! echo " <td>".str_replace("\n", "<br />", $File["Revisions"][$File["Head"]]["LogMessage"])."</td>\n"; echo " </tr>\n"; ! if ($RowClass == "row1") { ! $RowClass = "row2"; } else { ! $RowClass = "row1"; } } *************** *** 117,121 **** // Close off our HTML table. echo " </table>\n"; ! echo "<hr>"; } else { // Else of if ($Response !== true) --- 117,121 ---- // Close off our HTML table. echo " </table>\n"; ! echo "<hr />"; } else { // Else of if ($Response !== true) Index: func_FileHistory.php =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/func_FileHistory.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** func_FileHistory.php 2 Oct 2004 04:52:10 -0000 1.2 --- func_FileHistory.php 3 Oct 2004 14:03:04 -0000 1.3 *************** *** 48,71 **** $HREF = str_replace("//", "/", "$ScriptName?mp=$ModPath"); $DateTime = strtotime($Revision["date"]); ! echo "<a name=\"$DateTime\"><hr>\n"; echo "<b>Revision</b> ".$Revision["Revision"]." -"; ! echo " (<a href=\"$HREF&fv&dt=$DateTime\">view</a>)"; ! echo " (<a href=\"$HREF&fd&dt=$DateTime\">download</a>)"; ! echo " (<a href=\"$HREF&df&r1=".strtotime($Revision["date"])."&r2="; echo strtotime($CVSServer->FILES[0]["Revisions"][$Revision["PrevRevision"]]["date"])."\">diff to previous</a>)"; ! echo " (<a href=\"$HREF&fa=".$Revision["Revision"]."\">annotate</a>)<br>\n"; ! echo "<b>Last Checkin:</b> ".strftime("%A %d %b %Y %T -0000", strtotime($Revision["date"]))." (".CalculateDateDiff(strtotime($Revision["date"]), strtotime(gmdate("M d Y H:i:s")))." ago)<br>\n"; ! echo "<b>Branch:</b> ".$Revision["Branches"]."<br>\n"; ! echo "<b>Date:</b> ".strftime("%B %d, %Y", $DateTime)."<br>\n"; ! echo "<b>Time:</b> ".strftime("%H:%M:%S", $DateTime)."<br>\n"; ! echo "<b>Author:</b> ".$Revision["author"]."<br>\n"; ! echo "<b>State:</b> ".$Revision["state"]."<br>\n"; if ($Revision["PrevRevision"] != "") { ! echo "<b>Changes since ".$Revision["PrevRevision"].":</b> ".$Revision["lines"]."<br>"; } ! echo "<b>Log Message:</b><pre>".$Revision["LogMessage"]."</pre>\n"; } ! echo "<hr>\n"; $CVSServer->Disconnect(); --- 48,71 ---- $HREF = str_replace("//", "/", "$ScriptName?mp=$ModPath"); $DateTime = strtotime($Revision["date"]); ! echo "<hr /><p><a id=\"rd$DateTime\" />\n"; echo "<b>Revision</b> ".$Revision["Revision"]." -"; ! echo " (<a href=\"$HREF&fv&dt=$DateTime\">view</a>)"; ! echo " (<a href=\"$HREF&fd&dt=$DateTime\">download</a>)"; ! echo " (<a href=\"$HREF&df&r1=".strtotime($Revision["date"])."&r2="; echo strtotime($CVSServer->FILES[0]["Revisions"][$Revision["PrevRevision"]]["date"])."\">diff to previous</a>)"; ! echo " (<a href=\"$HREF&fa=".$Revision["Revision"]."\">annotate</a>)<br />\n"; ! echo "<b>Last Checkin:</b> ".strftime("%A %d %b %Y %T -0000", strtotime($Revision["date"]))." (".CalculateDateDiff(strtotime($Revision["date"]), strtotime(gmdate("M d Y H:i:s")))." ago)<br />\n"; ! echo "<b>Branch:</b> ".$Revision["Branches"]."<br />\n"; ! echo "<b>Date:</b> ".strftime("%B %d, %Y", $DateTime)."<br />\n"; ! echo "<b>Time:</b> ".strftime("%H:%M:%S", $DateTime)."<br />\n"; ! echo "<b>Author:</b> ".$Revision["author"]."<br />\n"; ! echo "<b>State:</b> ".$Revision["state"]."<br />\n"; if ($Revision["PrevRevision"] != "") { ! echo "<b>Changes since ".$Revision["PrevRevision"].":</b> ".$Revision["lines"]."<br />"; } ! echo "<b>Log Message:</b></p><pre>".$Revision["LogMessage"]."</pre>\n"; } ! echo "<hr />\n"; $CVSServer->Disconnect(); |