phpcvsview-cvs-updates Mailing List for PHP CVS Repository Viewer (Page 6)
Status: Pre-Alpha
Brought to you by:
bcheesem
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
(1) |
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(7) |
Oct
(43) |
Nov
|
Dec
(19) |
2005 |
Jan
(28) |
Feb
(85) |
Mar
|
Apr
(16) |
May
(2) |
Jun
|
Jul
|
Aug
(3) |
Sep
(14) |
Oct
|
Nov
(16) |
Dec
|
2006 |
Jan
(9) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Brian C. <bch...@us...> - 2005-02-02 06:12:38
|
Update of /cvsroot/phpcvsview/phpcvsview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3149 Modified Files: cvsview.php Log Message: Commit after merging language changes with DIFF changes. Index: cvsview.php =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/cvsview.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** cvsview.php 1 Feb 2005 15:11:00 -0000 1.20 --- cvsview.php 2 Feb 2005 06:12:29 -0000 1.21 *************** *** 53,56 **** --- 53,57 ---- require_once 'func_FileView.php'; require_once 'func_FileDownload.php'; + require_once 'func_DiffFile.php'; *************** *** 69,77 **** } else { if (isset($_GET["fd"])) { ! DownloadFile($env['mod_path'], $_GET["dt"]); ! } ! else ! { ! DisplayDirListing(); } } --- 70,80 ---- } else { if (isset($_GET["fd"])) { ! DownloadFile($env['mod_path'], $_GET["dt"]); ! } else { ! if (isset($_GET["df"])) { ! DisplayFileDiff($_GET["r1"], $_GET["r2"]); ! } else { ! DisplayDirListing(); ! } } } |
From: Sijis A. <si...@us...> - 2005-02-01 15:20:08
|
Update of /cvsroot/phpcvsview/phpcvsview/languages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26540/languages Added Files: en.php Log Message: - initial commit - English language file supporting i18n initiative --- NEW FILE: en.php --- <?php /** * This source code is distributed under the terms as layed out in the * GNU General Public License. * * Purpose: English translation file. * * @author Sijis Aviles <si...@us...> * @version $Id: en.php,v 1.1 2005/02/01 15:19:57 sijis Exp $ * @copyright 2003-2005 Brian A Cheeseman **/ $lang['encoding'] = 'iso-8859-1'; // listing options $lang['file'] = 'File'; $lang['rev'] = 'Rev.'; $lang['age'] = 'Age'; $lang['author'] = 'Author'; $lang['last_log'] = 'Last Lost Entry'; // customization options $lang['language'] = 'English'; $lang['theme'] = 'Change Theme:'; // quick link bar listing $lang['change_theme'] = 'Change Theme:'; $lang['change_lang'] = 'Language:'; $lang['up_folder'] = 'Up one folder'; $lang['rev_history'] = 'Revision history for: '; $lang['code_view'] = 'Code view for: '; $lang['navigate_to'] = 'Navigate to: '; $lang['file_ext'] = 'File Extension:'; $lang['mime_type'] = 'Mime Type is:'; // time and date related $lang['year'] = 'Year'; $lang['years'] = 'Years'; $lang['week'] = 'Week'; $lang['weeks'] = 'Weeks'; $lang['day'] = 'Day'; $lang['days'] = 'Days'; $lang['hour'] = 'Hour'; $lang['hours'] = 'Hours'; $lang['minute'] = 'Minute'; $lang['minutes'] = 'Minutes'; $lang['second'] = 'Second'; $lang['seconds'] = 'Seconds'; $lang['ago'] = 'ago'; // navigation path $lang['root'] = 'Root'; // top message $lang['message'] = '<p>Welcome to the CVS Repository viewing system for the phpCVSView project hosted at SourceForge.net</p><p>The goal of this project is simply to build a php application/class to provide access to a CVS based source control repository over the various connectivity mechanisms available for CVS in general. There are also some extensions to this goal planned for future releases such as a full web-based CVS client utilising the core of this project.</p><p>So please feel free to look at our code, suggest features, test the code in your own environment, submit bugs, and most of all support the commitment of the open source developers by using the many wonderful products available.</p><p>Kindest Regards,<br />Brian Cheeseman. <br />phpCVSView Project Leader.</p>'; // bottom messages $lang['generated'] = 'This page was generated by <a href="http://phpcvsview.sourceforge.net/">phpCVSView</a> in '; $lang['created_by'] = 'phpCVSView created by <a href="mailto:bch...@us...">Brian Cheeseman</a> and <a href="mailto:si...@us...">Sijis Aviles</a>.'; // file options $lang['view'] = 'view'; $lang['download'] = 'download'; $lang['diff'] = 'diff to previous'; $lang['annotate'] = 'annotate'; // file details $lang['revision'] = 'Revision'; $lang['last_checkin'] = 'Last Checkin:'; $lang['notice'] = 'Notice:'; $lang['branch'] = 'Branch:'; $lang['date'] = 'Date:'; $lang['time'] = 'Time:'; $lang['state'] = 'State:'; $lang['changes'] = 'Changes since '; $lang['log_message'] = 'Log Message:'; // error messages $lang['err_connect'] = '<h2>ERROR: Could not connect to the PServer.</h2>'."\n"; ?> |
From: Sijis A. <si...@us...> - 2005-02-01 15:16:40
|
Update of /cvsroot/phpcvsview/phpcvsview/languages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25749/languages Log Message: Directory /cvsroot/phpcvsview/phpcvsview/languages added to the repository |
From: Sijis A. <si...@us...> - 2005-02-01 15:14:38
|
Update of /cvsroot/phpcvsview/phpcvsview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25291 Modified Files: utils.php Log Message: - added function for internationalization (i18n) support - updated copyright year - minor code cleanup Index: utils.php =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/utils.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** utils.php 22 Jan 2005 13:58:20 -0000 1.3 --- utils.php 1 Feb 2005 15:14:28 -0000 1.4 *************** *** 9,91 **** * @author Brian A Cheeseman <bch...@us...> * @version $Id$ ! * @copyright 2003-2004 Brian A Cheeseman **/ ! function microtime_diff($a, $b) { ! list($a_dec, $a_sec) = explode(" ", $a); ! list($b_dec, $b_sec) = explode(" ", $b); ! return $b_sec - $a_sec + $b_dec - $a_dec; ! } // End of function microtime_diff($a, $b) function CalculateDateDiff($DateEarlier, $DateLater) { ! $DateDiff = $DateLater - $DateEarlier; ! $Seconds = $DateDiff; ! $Minutes = floor($Seconds/60); ! $Hours = floor($Minutes/60); ! $Days = floor($Hours/24); ! $Weeks = floor($Days/7); ! $Years = floor($Days/365); ! if ($Seconds > 0) { ! $Result = "$Seconds Second"; ! if ($DateDiff > 1) { ! $Result .= "s"; ! } } ! if ($Minutes > 0) { ! $Result = "$Minutes Minute"; ! if ($Minutes > 1) { ! $Result .= "s"; ! } } ! if ($Hours > 0) { ! $Result = "$Hours Hour"; ! if ($Hours > 1) { ! $Result .= "s"; ! } ! $Minutes = $Minutes % 60; ! if ($Minutes > 0) { ! $Result .= ", $Minutes Minute"; ! if ($Minutes > 1) { ! $Result .= "s"; ! } } } ! if ($Days > 0) { ! $Result = $Days . " Day"; ! if ($Days > 1) { ! $Result .= "s"; ! } ! $Hours = $Hours % 24; ! if ($Hours > 0) { ! $Result .= ", $Hours Hour"; ! if ($Hours > 1) { ! $Result .= "s"; ! } } } ! if ($Weeks > 0) { ! $Result = $Weeks . " Week"; ! if ($Days > 1) { ! $Result .= "s"; ! } ! $Days = $Days % 7; ! if ($Days > 0) { ! $Result .= ", $Days Day"; ! if ($Days > 1) { ! $Result .= "s"; ! } } } ! if ($Years > 0) { ! $Result = $Years . " Year"; ! if ($Years > 1) { ! $Result .= "s"; ! } ! $Weeks = $Weeks % 52; ! if ($Weeks > 0) { ! $Result .= ", $Weeks Week"; ! if ($Weeks > 1) { $Result .= "s"; } --- 9,88 ---- * @author Brian A Cheeseman <bch...@us...> * @version $Id$ ! * @copyright 2003-2005 Brian A Cheeseman **/ ! function microtime_diff($a, $b) ! { ! list($a_dec, $a_sec) = explode(" ", $a); ! list($b_dec, $b_sec) = explode(" ", $b); ! return $b_sec - $a_sec + $b_dec - $a_dec; ! } function CalculateDateDiff($DateEarlier, $DateLater) { ! global $lang; ! $date['date_diff'] = $DateLater - $DateEarlier; ! $date['seconds'] = $date['date_diff']; ! $date['minutes'] = floor($date['seconds']/60); ! $date['hours'] = floor($date['minutes']/60); ! $date['days'] = floor($date['hours']/24); ! $date['weeks'] = floor($date['days']/7); ! $date['years'] = floor($date['days']/365); ! ! // displays seconds ! if ($date['seconds'] > 0) { ! $Result = $date['seconds'] .' '; ! $Result .= ($date['date_diff'] > 1)? $lang['seconds'] : $lang['second']; } ! ! // displays minutes ! if ($date['minutes'] > 0) { ! $Result = $date['minutes'].' '; ! $Result .= ($date['minutes'] > 1)? $lang['minutes'] : $lang['minute']; } ! ! // displays hours, then minutes ! if ($date['hours'] > 0) { ! $Result = $date['hours'].' '; ! $Result .= ($date['hours'] > 1)? $lang['hours'] : $lang['hour']; ! $date['minutes'] = $date['minutes'] % 60; ! if ($date['minutes'] > 0) { ! $Result .= ', '.$date['minutes'].' '; ! $Result .= ($date['minutes'] > 1)? $lang['minutes'] : $lang['minute']; } } ! ! // displays days, then hours ! if ($date['days'] > 0) { ! $Result = $date['days'] . ' '; ! $Result .= ($date['days'] > 1)? $lang['days'] : $lang['day']; ! $date['hours'] = $date['hours'] % 24; ! if ($date['hours'] > 0) { ! $Result .= ', '.$date['hours'].' '; ! $Result .= ($date['hours'] > 1)? $lang['hours'] : $lang['hour']; } } ! ! // displays weeks, then days ! if ($date['weeks'] > 0) { ! $Result = $date['weeks'] . ' '; ! $Result .= ($date['weeks'] > 1)? $lang['weeks'] : $lang['week']; ! $date['days'] = $date['days'] % 7; ! if ($date['days'] > 0) { ! $Result .= ', '.$date['days'].' '; ! $Result .= ($date['days'] > 1)? $lang['days'] : $lang['day']; } } ! ! // displays years, then weeks ! if ($date['years'] > 0) { ! $Result = $date['years'] . ' '; ! $Result .= ($date['years'] > 1)? $lang['years'] : $lang['year']; ! $date['weeks'] = $date['weeks'] % 52; ! if ($date['weeks'] > 0) { ! $Result .= ', '.$date['weeks'].' '; ! $Result .= ($date['weeks'] > 1)? $lang['weeks'] : $lang['week']; ! if ($date['weeks'] > 1) { $Result .= "s"; } *************** *** 101,105 **** { if ($Dirs[$Counter] != "") { ! $RetVal .= $Seperator . $Dirs[$Counter]; } } --- 98,102 ---- { if ($Dirs[$Counter] != "") { ! $RetVal .= $Seperator . $Dirs[$Counter]; } } *************** *** 109,129 **** function GetThemeList() { ! $DirHandle = opendir('Themes'); ! $ThemeList = Array(); ! $ThemeCount = 0; ! while ($Dir = readdir($DirHandle)) ! { ! if ((!ereg("[.]",$Dir))) ! { ! if($Dir != "CVS") ! { ! $ThemeList[$ThemeCount++] = $Dir; } } } ! closedir($DirHandle); ! sort($ThemeList, SORT_STRING); ! return $ThemeList; } ! ?> \ No newline at end of file --- 106,149 ---- function GetThemeList() { ! global $env; ! $theme = array(); ! ! // open theme directory ! if ($handle = opendir($env['theme_path'])) { ! ! // list all directories ! while (false !== ($file = readdir($handle))) { ! // do not list . and .. ! if ($file != "." && $file != "..") { ! // add directory to an array ! array_push($theme, $file); } } + closedir($handle); } ! sort($theme, SORT_STRING); ! return $theme; } ! function GetLanguagesList() ! { ! global $env; ! $lang = array(); ! ! // open language directory ! if ($handle = opendir($env['language_path'])) { ! ! // list all directory files ! while (false !== ($file = readdir($handle))) { ! // do not list . and .. ! if ($file != "." && $file != "..") { ! // strip filename and add to an array ! array_push($lang, rtrim($file, '.php')); ! } ! } ! closedir($handle); ! } ! return $lang; ! } ! ! ?> |
From: Sijis A. <si...@us...> - 2005-02-01 15:13:23
|
Update of /cvsroot/phpcvsview/phpcvsview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24971 Modified Files: config.php Log Message: - added $config option for internationalization (i18n) support - added $config option for default theme - updated copyright year Index: config.php =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/config.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** config.php 23 Jan 2005 01:47:56 -0000 1.10 --- config.php 1 Feb 2005 15:13:00 -0000 1.11 *************** *** 9,13 **** * @author Brian A Cheeseman <bch...@us...> * @version $Id$ ! * @copyright 2003-2004 Brian A Cheeseman **/ --- 9,13 ---- * @author Brian A Cheeseman <bch...@us...> * @version $Id$ ! * @copyright 2003-2005 Brian A Cheeseman **/ *************** *** 30,33 **** --- 30,36 ---- $config['html_header'] = "phpCVSView Source Code Library"; + // The default theme + $config['theme'] = "Default"; + // Setup whether to use GeSHi project code for syntax highlighting or not. $config['GeSHi']['Enable'] = true; *************** *** 35,37 **** $config['GeSHi']['HighlightersPath'] = "geshi/geshi"; ! ?> \ No newline at end of file --- 38,43 ---- $config['GeSHi']['HighlightersPath'] = "geshi/geshi"; ! // The default language ! $config['language'] = "en"; ! ! ?> |
Update of /cvsroot/phpcvsview/phpcvsview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24387 Modified Files: cvsview.php func_DirListing.php func_FileAnnotation.php func_FileDownload.php func_FileHistory.php func_FileView.php phpcvsmime.php Log Message: - added internationalization (i18n) support - updated copyright year - minor code cleanup Index: func_FileDownload.php =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/func_FileDownload.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** func_FileDownload.php 19 Dec 2004 10:27:04 -0000 1.1 --- func_FileDownload.php 1 Feb 2005 15:11:01 -0000 1.2 *************** *** 9,26 **** * @author Brian A Cheeseman <bch...@us...> * @version $Id ! * @copyright 2003-2004 Brian A Cheeseman **/ - include_once("phpcvsmime.php"); - function DownloadFile($File, $Revision = "") { ! global $config, $env, $MIME_TYPES; // Calculate the path from the $env['script_name'] variable. ! $env['script_path'] = substr($env['script_name'], 0, strrpos($env['script_name'], "/")); ! if ($env['script_path'] == ""){ ! $env['script_path'] = "/"; ! } // Create our CVS connection object and set the required properties. --- 9,22 ---- * @author Brian A Cheeseman <bch...@us...> * @version $Id ! * @copyright 2003-2005 Brian A Cheeseman **/ function DownloadFile($File, $Revision = "") { ! global $config, $env, $lang, $MIME_TYPES; // Calculate the path from the $env['script_name'] variable. ! $env['script_path'] = substr($env['script_name'], 0, strrpos($env['script_name'], '/')); ! $env['script_path'] = (empty($env['script_path']))? '/' : $env['script_path']; // Create our CVS connection object and set the required properties. *************** *** 42,62 **** $Response = $CVSServer->ExportFile($File, $Revision); if ($Response !== true) { ! return; } // Get the mime type for the file. ! $FileExt = substr($File, strrpos($File, ".")+1); $MimeType = $MIME_TYPES[$FileExt]; ! if ($MimeType == "") { ! $MimeType = "text/plain"; } // Send the appropriate http header. ! header("Content-Type: $MimeType"); // Send the file contents. echo $CVSServer->FILECONTENTS; ! echo "<br />File Extension: $FileExt<br />"; ! echo "MIME TYPE IS: $MimeType"; // Close the connection. --- 38,58 ---- $Response = $CVSServer->ExportFile($File, $Revision); if ($Response !== true) { ! return; } // Get the mime type for the file. ! $FileExt = substr($File, strrpos($File, '.')+1); $MimeType = $MIME_TYPES[$FileExt]; ! if ($MimeType == '') { ! $MimeType = 'text/plain'; } // Send the appropriate http header. ! header('Content-Type: '.$MimeType); // Send the file contents. echo $CVSServer->FILECONTENTS; ! echo '<br />'.$lang['file_ext'].' '.$FileExt; ! echo '<br />'.$lang['mime_type'].' '. $MimeType; // Close the connection. Index: phpcvsmime.php =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/phpcvsmime.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** phpcvsmime.php 2 Oct 2004 01:47:17 -0000 1.5 --- phpcvsmime.php 1 Feb 2005 15:11:01 -0000 1.6 *************** *** 9,13 **** * @author Brian A Cheeseman <bch...@us...> * @version $Id$ ! * @copyright 2003-2004 Brian A Cheeseman **/ --- 9,13 ---- * @author Brian A Cheeseman <bch...@us...> * @version $Id$ ! * @copyright 2003-2005 Brian A Cheeseman **/ Index: func_DirListing.php =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/func_DirListing.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** func_DirListing.php 19 Dec 2004 04:51:37 -0000 1.8 --- func_DirListing.php 1 Feb 2005 15:11:01 -0000 1.9 *************** *** 9,18 **** * @author Brian A Cheeseman <bch...@us...> * @version $Id$ ! * @copyright 2003-2004 Brian A Cheeseman **/ function DisplayDirListing() { ! global $config, $env; // Create our CVS connection object and set the required properties. --- 9,18 ---- * @author Brian A Cheeseman <bch...@us...> * @version $Id$ ! * @copyright 2003-2005 Brian A Cheeseman **/ function DisplayDirListing() { ! global $config, $env, $lang; // Create our CVS connection object and set the required properties. *************** *** 36,40 **** // If we are in the Root of the CVS Repository then lets get the Module list. if (strlen($env['mod_path']) < 2) { ! $Modules = $CVSServer->getModuleList(); } else --- 36,40 ---- // If we are in the Root of the CVS Repository then lets get the Module list. if (strlen($env['mod_path']) < 2) { ! $Modules = $CVSServer->getModuleList(); } else *************** *** 59,63 **** // Display the Modules if we have them. if ($Modules !== false) { ! addModules($env['mod_path'], $Modules); } --- 59,63 ---- // Display the Modules if we have them. if ($Modules !== false) { ! addModules($env['mod_path'], $Modules); } *************** *** 70,74 **** $CVSServer->Disconnect(); } else { ! echo "Connection Failed."; } echo GetPageFooter(); --- 70,74 ---- $CVSServer->Disconnect(); } else { ! echo $lang['err_connect']; } echo GetPageFooter(); Index: func_FileHistory.php =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/func_FileHistory.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** func_FileHistory.php 1 Feb 2005 07:20:52 -0000 1.7 --- func_FileHistory.php 1 Feb 2005 15:11:01 -0000 1.8 *************** *** 9,24 **** * @author Brian A Cheeseman <bch...@us...> * @version $Id$ ! * @copyright 2003-2004 Brian A Cheeseman **/ function DisplayFileHistory() { ! global $config, $env, $CVSServer; // Calculate the path from the $env['script_name'] variable. ! $env['script_path'] = substr($env['script_name'], 0, strrpos($env['script_name'], "/")); ! if ($env['script_path'] == "") { ! $env['script_path'] = "/"; ! } // Create our CVS connection object and set the required properties. --- 9,22 ---- * @author Brian A Cheeseman <bch...@us...> * @version $Id$ ! * @copyright 2003-2005 Brian A Cheeseman **/ function DisplayFileHistory() { ! global $config, $env, $lang; // Calculate the path from the $env['script_name'] variable. ! $env['script_path'] = substr($env['script_name'], 0, strrpos($env['script_name'], '/')); ! $env['script_path'] = (empty($env['script_path']))? '/' : $env['script_path']; // Create our CVS connection object and set the required properties. *************** *** 43,77 **** // Add the quick link navigation bar. ! echo GetQuickLinkBar($env['mod_path'], "Revision History for: ", false, true, ""); foreach ($CVSServer->FILES[0]["Revisions"] as $Revision) { ! $HREF = str_replace("//", "/", $env['script_name']."?mp=".$env['mod_path']); $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>)"; ! if ($Revision["PrevRevision"] != "") { ! echo " (<a href=\"$HREF&df&r1=".$Revision["Revision"]."&r2="; ! echo $Revision["PrevRevision"]."\">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(); } else { ! echo "Connection Failed."; } echo GetDiffForm(); --- 41,75 ---- // Add the quick link navigation bar. ! echo GetQuickLinkBar($env['mod_path'], $lang['rev_history'], false, true, ""); foreach ($CVSServer->FILES[0]["Revisions"] as $Revision) { ! $HREF = str_replace('//', '/', $env['script_name'].'?mp='.$env['mod_path']); $DateTime = strtotime($Revision["date"]); ! echo '<hr /><p><a id="rd'.$DateTime.'" />'."\n"; ! echo '<b>'.$lang['revision'].'</b> '.$Revision["Revision"].' -'; ! echo ' (<a href="'.$HREF.'&fv&dt='.$DateTime.'">'.$lang['view'].'</a>)'; ! echo ' (<a href="'.$HREF.'&fd&dt='.$DateTime.'">'.$lang['download'].'</a>)'; ! if ($Revision["PrevRevision"] != '') { ! echo ' (<a href="'.$HREF.'&df&r1='.$Revision["Revision"].'&r2='; ! echo $Revision["PrevRevision"].'">'.$lang['diff'].'</a>)'; } ! echo ' (<a href="'.$HREF.'&fa='.$Revision["Revision"].'">'.$lang['annotate'].'</a>)<br />'."\n"; ! echo '<b>'.$lang['last_checkin'].'</b> '.strftime("%A %d %b %Y %T -0000", $DateTime).' ('.CalculateDateDiff($DateTime, strtotime(gmdate("M d Y H:i:s"))).' '.$lang['ago'].')<br />'."\n"; ! echo '<b>'.$lang['branch'].'</b> '.$Revision["Branches"].'<br />'."\n"; ! echo '<b>'.$lang['date'].'</b> '.strftime("%B %d, %Y", $DateTime).'<br />'."\n"; ! echo '<b>'.$lang['time'].'</b> '.strftime("%H:%M:%S", $DateTime).'<br />'."\n"; ! echo '<b>'.$lang['author'].'</b> '.$Revision["author"].'<br />'."\n"; ! echo '<b>'.$lang['state'].'</b> '.$Revision["state"].'<br />'."\n"; ! if ($Revision["PrevRevision"] != '') { ! echo '<b>'.$lang['changes'].$Revision["PrevRevision"].':</b> '.$Revision["lines"].'<br />'."\n"; } ! echo '<b>'.$lang['log_message'].'</b></p><pre>'.$Revision["LogMessage"].'</pre>'."\n"; } ! echo '<hr />'."\n"; $CVSServer->Disconnect(); } else { ! echo $lang['err_connect']; } echo GetDiffForm(); Index: func_FileView.php =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/func_FileView.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** func_FileView.php 23 Jan 2005 04:35:24 -0000 1.12 --- func_FileView.php 1 Feb 2005 15:11:01 -0000 1.13 *************** *** 9,28 **** * @author Brian A Cheeseman <bch...@us...> * @version $Id$ ! * @copyright 2003-2004 Brian A Cheeseman **/ if ($config['GeSHi']['Enable']) { ! include_once($config['GeSHi']['Path'].'/geshi.php'); } function DisplayFileContents($File, $Revision = "") { ! global $config, $env; // Calculate the path from the $env['script_name'] variable. ! $env['script_path'] = substr($env['script_name'], 0, strrpos($env['script_name'], "/")); ! if ($env['script_path'] == ""){ ! $env['script_path'] = "/"; ! } // Create our CVS connection object and set the required properties. --- 9,26 ---- * @author Brian A Cheeseman <bch...@us...> * @version $Id$ ! * @copyright 2003-2005 Brian A Cheeseman **/ if ($config['GeSHi']['Enable']) { ! include_once($config['GeSHi']['Path'].'/geshi.php'); } function DisplayFileContents($File, $Revision = "") { ! global $config, $env, $lang; // Calculate the path from the $env['script_name'] variable. ! $env['script_path'] = substr($env['script_name'], 0, strrpos($env['script_name'], '/')); ! $env['script_path'] = (empty($env['script_path']))? '/' : $env['script_path']; // Create our CVS connection object and set the required properties. *************** *** 47,65 **** $Response = $CVSServer->ExportFile($File, $Revision); if ($Response !== true) { ! return; } // Add the quick link navigation bar. ! echo GetQuickLinkBar($env['mod_path'], "Code view for: ", true, true, $Revision); echo "<hr />\n"; if ($config['GeSHi']['Enable']) { ! // Create the GeSHi instance and parse the output. // TODO: setup code to auto identify the highlighting class to use for current file. ! $FileExt = substr($File, strrpos($File, ".")+1); $Language = guess_highlighter($FileExt); if (is_array($Language)) { ! $Language = $Language[0]; } --- 45,63 ---- $Response = $CVSServer->ExportFile($File, $Revision); if ($Response !== true) { ! return; } // Add the quick link navigation bar. ! echo GetQuickLinkBar($env['mod_path'], $lang['code_view'], true, true, $Revision); echo "<hr />\n"; if ($config['GeSHi']['Enable']) { ! // Create the GeSHi instance and parse the output. // TODO: setup code to auto identify the highlighting class to use for current file. ! $FileExt = substr($File, strrpos($File, '.')+1); $Language = guess_highlighter($FileExt); if (is_array($Language)) { ! $Language = $Language[0]; } *************** *** 71,84 **** // Display the file contents. ! echo "<table class=\"source\"><tr><td>"; echo $hlcontent; ! echo "</td></tr></table>"; } else { $search = array('<', '>', '\n', '\t'); ! $replace = array("<", ">", "", " "); $content = str_replace($search, $replace, $CVSServer->FILECONTENTS); ! $source = explode("\n", $content); $soure_size = sizeof($source); --- 69,82 ---- // Display the file contents. ! echo '<table class="source"><tr><td>'; echo $hlcontent; ! echo '</td></tr></table>'; } else { $search = array('<', '>', '\n', '\t'); ! $replace = array('<', '>', '', ' '); $content = str_replace($search, $replace, $CVSServer->FILECONTENTS); ! $source = explode('\n', $content); $soure_size = sizeof($source); *************** *** 94,98 **** $CVSServer->Disconnect(); } else { ! echo "ERROR: Could not connect to the PServer.<br>\n"; } echo GetPageFooter(); --- 92,96 ---- $CVSServer->Disconnect(); } else { ! echo $lang['err_connect']; } echo GetPageFooter(); Index: cvsview.php =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/cvsview.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** cvsview.php 23 Jan 2005 01:47:56 -0000 1.19 --- cvsview.php 1 Feb 2005 15:11:00 -0000 1.20 *************** *** 9,47 **** * @author Brian A Cheeseman <bch...@us...> * @version $Id$ ! * @copyright 2003-2004 Brian A Cheeseman **/ require_once 'config.php'; ! global $config, $env, $ThemeName; $REPOS = ""; $env['script_name'] = $_SERVER['PHP_SELF']; $env['script_path'] = substr($env['script_name'], 0, strrpos($env['script_name'], "/")); ! if ($env['script_path'] == "") { ! $env['script_path'] = "/"; ! } if (isset($_GET["tm"])) { ! $ThemeName = $_GET["tm"]; ! } else { ! if (isset($_COOKIE["theme"])) { ! $ThemeName = $_COOKIE["theme"]; ! } ! else ! { ! $ThemeName = "Default"; ! } } ! // Re-Set our cookie with the theme name in it. This cookie is set to expire 1 Year from today. ! // This was done as there is no way to stop a cookie expiring. ! setcookie("theme", $ThemeName, time()+31536000, "/"); ! require_once "Themes/$ThemeName/theme.php"; require_once 'phpcvs.php'; require_once 'phpcvsmime.php'; - require_once 'utils.php'; require_once 'func_DirListing.php'; require_once 'func_FileHistory.php'; --- 9,51 ---- * @author Brian A Cheeseman <bch...@us...> * @version $Id$ ! * @copyright 2003-2005 Brian A Cheeseman **/ require_once 'config.php'; + require_once 'utils.php'; ! global $config, $env; $REPOS = ""; $env['script_name'] = $_SERVER['PHP_SELF']; $env['script_path'] = substr($env['script_name'], 0, strrpos($env['script_name'], "/")); + $env['script_path'] = (empty($env['script_path']))? '/' : $env['script_path']; + $env['language_path'] = 'languages/'; + $env['theme_path'] = 'Themes/'; ! // check if cookie exist, if so use cookie, otherwise use config value ! // then verify that config value is a valid entry ! $config['language'] = (empty($_COOKIE['config']['lang'])) ? $config['language'] : $_COOKIE['config']['lang']; ! $config['language'] = (in_array($config['language'], GetLanguagesList(), false)) ? $config['language'] : 'en'; ! ! $config['theme'] = (empty($_COOKIE['config']['theme'])) ? $config['theme'] : $_COOKIE['config']['theme']; ! $config['theme'] = (in_array($config['theme'], GetThemeList(), false)) ? $config['theme'] : 'Default'; if (isset($_GET["tm"])) { ! $config['theme'] = $_GET["tm"]; ! // Set cookie with theme info. This cookie is set to expire 1 year from today. ! setcookie("config[theme]", $config['theme'], time()+31536000, "/"); } ! if(isset($_GET["lg"])){ ! $config['language'] = $_GET["lg"]; ! // Set cookie with language info. This cookie is set to expire 1 year from today. ! setcookie('config[lang]', $config['language'], time()+31536000, "/"); ! } ! require_once $env['theme_path'] . $config['theme']."/theme.php"; ! require_once $env['language_path'] . $config['language'] .'.php'; require_once 'phpcvs.php'; require_once 'phpcvsmime.php'; require_once 'func_DirListing.php'; require_once 'func_FileHistory.php'; *************** *** 52,74 **** // Check for a module path ! if (isset($_GET["mp"])) { ! $env['mod_path'] = $_GET["mp"]; ! } else { ! $env['mod_path'] = "/"; ! } ! $env['mod_path'] = str_replace("//", "/", $env['mod_path']); if (isset($_GET["fh"])) { ! DisplayFileHistory(); } else { if (isset($_GET["fa"])) { ! DisplayFileAnnotation($env['mod_path'], $_GET["fa"]); } else { if (isset($_GET["fv"])) { ! DisplayFileContents($env['mod_path'], $_GET["dt"]); } else { if (isset($_GET["fd"])) { ! DownloadFile($env['mod_path'], $_GET["dt"]); } else --- 56,73 ---- // Check for a module path ! $env['mod_path'] = (isset($_GET["mp"])) ? $_GET["mp"] : "/"; $env['mod_path'] = str_replace("//", "/", $env['mod_path']); if (isset($_GET["fh"])) { ! DisplayFileHistory(); } else { if (isset($_GET["fa"])) { ! DisplayFileAnnotation($env['mod_path'], $_GET["fa"]); } else { if (isset($_GET["fv"])) { ! DisplayFileContents($env['mod_path'], $_GET["dt"]); } else { if (isset($_GET["fd"])) { ! DownloadFile($env['mod_path'], $_GET["dt"]); } else Index: func_FileAnnotation.php =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/func_FileAnnotation.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** func_FileAnnotation.php 6 Oct 2004 08:40:29 -0000 1.7 --- func_FileAnnotation.php 1 Feb 2005 15:11:01 -0000 1.8 *************** *** 9,24 **** * @author Brian A Cheeseman <bch...@us...> * @version $Id$ ! * @copyright 2003-2004 Brian A Cheeseman **/ function DisplayFileAnnotation($File, $Revision = "") { ! global $config, $env; // Calculate the path from the $env['script_name'] variable. ! $env['script_path'] = substr($env['script_name'], 0, strrpos($env['script_name'], "/")); ! if ($env['script_path'] == "") { ! $env['script_path'] = "/"; ! } // Create our CVS connection object and set the required properties. --- 9,22 ---- * @author Brian A Cheeseman <bch...@us...> * @version $Id$ ! * @copyright 2003-2005 Brian A Cheeseman **/ function DisplayFileAnnotation($File, $Revision = "") { ! global $config, $env, $lang; // Calculate the path from the $env['script_name'] variable. ! $env['script_path'] = substr($env['script_name'], 0, strrpos($env['script_name'], '/')); ! $env['script_path'] = (empty($env['script_path']))? '/' : $env['script_path']; // Create our CVS connection object and set the required properties. *************** *** 40,53 **** $Response = $CVSServer->Annotate($File, $Revision); if ($Response !== true) { ! return; } // 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'); ! $replace = array("<", ">", ""); $PrevRev = ""; $FirstLine = true; --- 38,51 ---- $Response = $CVSServer->Annotate($File, $Revision); if ($Response !== true) { ! return; } // 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'); ! $replace = array('<', '>', ''); $PrevRev = ""; $FirstLine = true; *************** *** 55,68 **** if (strcmp($PrevRev, $Annotation["Revision"]) != 0) { if (!$FirstLine) { ! "</pre></td></tr>\n"; } else { $FirstLine = false; } ! echo "<tr class=\"$RowClass\"><td>".$Annotation["Revision"]."</td><td>".$Annotation["Author"]; ! echo "</td><td>".$Annotation["Date"]."</td><td><pre>".str_replace($search, $replace, $Annotation["Line"]); ! if ($RowClass == "row1") { ! $RowClass = "row2"; } else { ! $RowClass = "row1"; } } else{ --- 53,66 ---- if (strcmp($PrevRev, $Annotation["Revision"]) != 0) { if (!$FirstLine) { ! echo "</pre></td></tr>\n"; } else { $FirstLine = false; } ! echo '<tr class="'.$RowClass.'"><td>'.$Annotation["Revision"].'</td><td>'.$Annotation["Author"]; ! echo '</td><td>'.$Annotation["Date"].'</td><td><pre>'.str_replace($search, $replace, $Annotation["Line"]); ! if ($RowClass == 'row1') { ! $RowClass = 'row2'; } else { ! $RowClass = 'row1'; } } else{ *************** *** 71,80 **** $PrevRev = $Annotation["Revision"]; } ! echo "</table><hr />\n"; // Close the connection. $CVSServer->Disconnect(); } else{ ! echo "ERROR: Could not connect to the PServer.<br />\n"; } echo GetPageFooter(); --- 69,78 ---- $PrevRev = $Annotation["Revision"]; } ! echo '</table><hr />'."\n"; // Close the connection. $CVSServer->Disconnect(); } else{ ! echo $lang['err_connect']; } echo GetPageFooter(); |
From: Sijis A. <si...@us...> - 2005-02-01 15:06:56
|
Update of /cvsroot/phpcvsview/phpcvsview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23158 Modified Files: phpcvsview.js Log Message: - added function for language dropdown redirect Index: phpcvsview.js =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/phpcvsview.js,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** phpcvsview.js 1 Feb 2005 07:16:21 -0000 1.3 --- phpcvsview.js 1 Feb 2005 15:06:46 -0000 1.4 *************** *** 14,17 **** --- 14,32 ---- } + function postBackLangChange(form) + { + var ddLang=form.langSelect.value; + var hfRequest=form.URLRequest.value; + if (hfRequest.indexOf("?") == -1) + { + newlocation=hfRequest+'?lg='+ddLang; + } + else + { + newlocation=hfRequest+'&lg='+ddLang; + } + location=newlocation; + } + function postBackDiffRequest(form) { |
From: Sijis A. <si...@us...> - 2005-02-01 15:05:08
|
Update of /cvsroot/phpcvsview/phpcvsview/Themes/Default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22536/Themes/Default Modified Files: theme.css Log Message: - added class for language dropdown Index: theme.css =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/Themes/Default/theme.css,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** theme.css 23 Jan 2005 01:29:38 -0000 1.9 --- theme.css 1 Feb 2005 15:04:23 -0000 1.10 *************** *** 55,58 **** --- 55,65 ---- margin: 0px; } + .langchanger + { + font-size: 8pt; + text-align: left; + padding: 0px; + margin: 0px; + } .title { |
From: Sijis A. <si...@us...> - 2005-02-01 15:05:08
|
Update of /cvsroot/phpcvsview/phpcvsview/Themes/Yellow In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22536/Themes/Yellow Modified Files: theme.css Log Message: - added class for language dropdown Index: theme.css =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/Themes/Yellow/theme.css,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** theme.css 23 Jan 2005 04:18:58 -0000 1.1 --- theme.css 1 Feb 2005 15:04:27 -0000 1.2 *************** *** 55,58 **** --- 55,65 ---- margin: 0px; } + .langchanger + { + font-size: 8pt; + text-align: left; + padding: 0px; + margin: 0px; + } .title { |
From: Sijis A. <si...@us...> - 2005-02-01 15:05:08
|
Update of /cvsroot/phpcvsview/phpcvsview/Themes/Green In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22536/Themes/Green Modified Files: theme.css Log Message: - added class for language dropdown Index: theme.css =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/Themes/Green/theme.css,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** theme.css 23 Jan 2005 04:18:57 -0000 1.1 --- theme.css 1 Feb 2005 15:04:24 -0000 1.2 *************** *** 55,58 **** --- 55,65 ---- margin: 0px; } + .langchanger + { + font-size: 8pt; + text-align: left; + padding: 0px; + margin: 0px; + } .title { |
From: Sijis A. <si...@us...> - 2005-02-01 15:05:07
|
Update of /cvsroot/phpcvsview/phpcvsview/Themes/Blue In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22536/Themes/Blue Modified Files: theme.css Log Message: - added class for language dropdown Index: theme.css =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/Themes/Blue/theme.css,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** theme.css 23 Jan 2005 04:18:57 -0000 1.1 --- theme.css 1 Feb 2005 15:04:22 -0000 1.2 *************** *** 55,58 **** --- 55,65 ---- margin: 0px; } + .langchanger + { + font-size: 8pt; + text-align: left; + padding: 0px; + margin: 0px; + } .title { |
From: Sijis A. <si...@us...> - 2005-02-01 15:04:39
|
Update of /cvsroot/phpcvsview/phpcvsview/Themes/Red In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22536/Themes/Red Modified Files: theme.css Log Message: - added class for language dropdown Index: theme.css =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/Themes/Red/theme.css,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** theme.css 23 Jan 2005 01:32:38 -0000 1.1 --- theme.css 1 Feb 2005 15:04:26 -0000 1.2 *************** *** 55,58 **** --- 55,65 ---- margin: 0px; } + .langchanger + { + font-size: 8pt; + text-align: left; + padding: 0px; + margin: 0px; + } .title { |
From: Sijis A. <si...@us...> - 2005-02-01 15:03:31
|
Update of /cvsroot/phpcvsview/phpcvsview/Themes/Green In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21841/Themes/Green Modified Files: theme.php Log Message: - added language dropdown for internationalization (i18n) support Index: theme.php =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/Themes/Green/theme.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** theme.php 23 Jan 2005 04:18:57 -0000 1.1 --- theme.php 1 Feb 2005 15:02:48 -0000 1.2 *************** *** 9,31 **** * @author Brian A Cheeseman <bch...@us...> * @version $Id$ ! * @copyright 2003-2004 Brian A Cheeseman **/ ! //global $ThemeName; ! ! $FolderIcon = "Themes/".$ThemeName."/Images/folder.png"; ! $FileIcon = "Themes/".$ThemeName."/Images/file.png"; ! $ParentIcon = "Themes/".$ThemeName."/Images/parent.png"; ! $ModuleIcon = "Themes/".$ThemeName."/Images/module.png"; function GetPageHeader($Title="", $Heading="") { ! global $StartTime, $ThemeName, $env; $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/".$ThemeName."/theme.css\" rel=\"stylesheet\" type=\"text/css\" />"; // Add JavaScript to postback the change in theme selection. $PageHead .= "<script src=\"./phpcvsview.js\"></script>"; --- 9,29 ---- * @author Brian A Cheeseman <bch...@us...> * @version $Id$ ! * @copyright 2003-2005 Brian A Cheeseman **/ ! $FolderIcon = "Themes/".$config['theme']."/Images/folder.png"; ! $FileIcon = "Themes/".$config['theme']."/Images/file.png"; ! $ParentIcon = "Themes/".$config['theme']."/Images/parent.png"; ! $ModuleIcon = "Themes/".$config['theme']."/Images/module.png"; function GetPageHeader($Title="", $Heading="") { ! 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>"; *************** *** 33,60 **** $PageHead .= "<body>"; if ($Heading != "") { ! $PageHead .= "<div class=\"title\">$Heading</div>"; } ! $PageHead .= "<p>Welcome to the CVS Repository viewing system for the phpCVSView project "; ! $PageHead .= "hosted at SourceForge.net</p><p>The goal of this project is simply to "; ! $PageHead .= "build a php application/class to provide access to a CVS based source "; ! $PageHead .= "control repository over the various connectivity mechanisms available for "; ! $PageHead .= "CVS in general. There are also some extensions to this goal planned for "; ! $PageHead .= "future releases such as a full web-based CVS client utilising the core of "; ! $PageHead .= "this project.</p><p>So please feel free to look at our code, suggest "; ! $PageHead .= "features, test the code in your own environment, submit bugs, and most of "; ! $PageHead .= "all support the commitment of the open source developers by using the many "; ! $PageHead .= "wonderful products available.</p><p>Kindest Regards,<br />Brian Cheeseman."; ! $PageHead .= "<br />phpCVSView Project Leader.</p>"; ! $PageHead .= "<form class=\"themechanger\">Change Theme: <select name=\"ThemeSelect\" class=\"themechanger\" onchange=\"postBackThemeChange(this.form)\">"; foreach (GetThemeList() as $key=>$value) { ! $PageHead .= "<option value=\"$value\""; ! if ($value == $ThemeName) { ! $PageHead .= " selected"; } ! $PageHead .= ">$value</option>"; } ! $PageHead .= "</select>"; ! $PageHead .= "<input type=\"hidden\" name=\"URLRequest\" value=\"".$env['script_name'].""; $first = true; foreach ($_GET as $key=>$value) --- 31,59 ---- $PageHead .= "<body>"; if ($Heading != "") { ! $PageHead .= "<div class=\"title\">$Heading</div>"; } ! $PageHead .= $lang['message']; ! $PageHead .= "<form class=\"themechanger\">"; ! $PageHead .= $lang['change_theme'].' <select name="ThemeSelect" class="themechanger" onchange="postBackThemeChange(this.form)">'; foreach (GetThemeList() as $key=>$value) { ! $PageHead .= '<option value="'.$value.'"'; ! if ($value == $config['theme']) { ! $PageHead .= ' selected="selected"'; } ! $PageHead .= '>'.$value.'</option>'; } ! $PageHead .= '</select>'; ! $PageHead .= ' '.$lang['change_lang'].' <select name="langSelect" class="langchanger" onchange="postBackLangChange(this.form)">'; ! foreach(getLanguagesList() as $key => $value){ ! $PageHead .= '<option value="'.$value.'"'; ! if ($value == $config['language']) { ! $PageHead .= ' selected="selected"'; ! } ! $PageHead .= '>'.$value.'</option>'; ! } ! $PageHead .= '</select>'; ! ! $PageHead .= '<input type="hidden" name="URLRequest" value="'.$env['script_name'].'"'; $first = true; foreach ($_GET as $key=>$value) *************** *** 68,86 **** $PageHead .= "?"; } ! $first = false; $PageHead .= $key."=".$value; } } ! $PageHead .= "\"></form>"; return $PageHead; } function GetPageFooter() { ! global $StartTime; $EndTime = microtime(); ! $PageFoot = "<div class=\"footer\">This page was generated by <a href=\"http://phpcvsview.sourceforge.net/\">phpCVSView</a> in ".number_format(microtime_diff($StartTime, $EndTime), 3)." seconds.<br />"; ! $PageFoot .= "phpCVSView created by <a href=\"mailto:bch...@us..."; ! $PageFoot .= "\">Brian Cheeseman</a> and <a href=\"mailto:si...@us...\">"; ! $PageFoot .= "Sijis Aviles</a>."; $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>"; --- 67,83 ---- $PageHead .= "?"; } ! $first = false; $PageHead .= $key."=".$value; } } ! $PageHead .= '"></form>'; return $PageHead; } function GetPageFooter() { ! 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>"; *************** *** 90,104 **** } ! 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; if ($LastIsFile) { ! $OffSet = 1; } --- 87,101 ---- } ! 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; if ($LastIsFile) { ! $OffSet = 1; } *************** *** 114,120 **** $QLOut .= "/ "; if ($LinkLast) { ! $QLOut .= "<a href=\"".$env['script_name']."?mp=".ImplodeToPath($Dirs, "/", $intCount); if ($LastIsFile) { ! $QLOut .= "&fh#rd$Revision\">"; } else { $QLOut .= "/"; --- 111,117 ---- $QLOut .= "/ "; if ($LinkLast) { ! $QLOut .= "<a href=\"".$env['script_name']."?mp=".ImplodeToPath($Dirs, "/", $intCount); if ($LastIsFile) { ! $QLOut .= "&fh#rd$Revision\">"; } else { $QLOut .= "/"; *************** *** 124,128 **** $QLOut .= $Dirs[$intCount]; if ($LinkLast) { ! $QLOut .= "</a>"; } $QLOut .= "</div>"; --- 121,125 ---- $QLOut .= $Dirs[$intCount]; if ($LinkLast) { ! $QLOut .= "</a>"; } $QLOut .= "</div>"; *************** *** 132,139 **** function startDirList() { ! global $RowClass; echo "<hr />"; echo "<table>"; ! echo "<tr class=\"head\"><th> </th><th>File</th><th>Rev.</th><th>Age</th><th>Author</th><th>Last Log Entry</th></tr>"; $RowClass = "row1"; } --- 129,136 ---- function startDirList() { ! global $RowClass, $lang; echo "<hr />"; echo "<table>"; ! echo "<tr class=\"head\"><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"; } *************** *** 147,155 **** 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\">"; echo "<td class=\"min\"><a href=\"$HREF\"><img alt=\"parent\" src=\"".$env['script_path']."/$ParentIcon\" /></a></td>"; ! echo "<td class=\"min\"><a href=\"$HREF\">Up one folder</a></td>"; echo "<td> </td>"; echo "<td> </td>"; --- 144,152 ---- 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\"><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>"; *************** *** 174,178 **** echo "</tr>"; if ($RowClass == "row1") { ! $RowClass = "row2"; } else { $RowClass = "row1"; --- 171,175 ---- echo "</tr>"; if ($RowClass == "row1") { ! $RowClass = "row2"; } else { $RowClass = "row1"; *************** *** 196,200 **** echo "</tr>"; if ($RowClass == "row1") { ! $RowClass = "row2"; } else { $RowClass = "row1"; --- 193,197 ---- echo "</tr>"; if ($RowClass == "row1") { ! $RowClass = "row2"; } else { $RowClass = "row1"; *************** *** 205,209 **** function addFiles($ModPath, $Files) { ! global $RowClass, $FileIcon, $env; foreach ($Files as $File) { $HREF = str_replace("//", "/", $env['script_name']."?mp=$ModPath/".$File["Name"]); --- 202,206 ---- function addFiles($ModPath, $Files) { ! global $RowClass, $FileIcon, $env, $lang; foreach ($Files as $File) { $HREF = str_replace("//", "/", $env['script_name']."?mp=$ModPath/".$File["Name"]); *************** *** 214,223 **** 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)." 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"; } else { $RowClass = "row1"; --- 211,220 ---- 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"; } else { $RowClass = "row1"; |
From: Sijis A. <si...@us...> - 2005-02-01 15:03:31
|
Update of /cvsroot/phpcvsview/phpcvsview/Themes/Red In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21841/Themes/Red Modified Files: theme.php Log Message: - added language dropdown for internationalization (i18n) support Index: theme.php =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/Themes/Red/theme.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** theme.php 23 Jan 2005 01:32:38 -0000 1.1 --- theme.php 1 Feb 2005 15:02:48 -0000 1.2 *************** *** 9,31 **** * @author Brian A Cheeseman <bch...@us...> * @version $Id$ ! * @copyright 2003-2004 Brian A Cheeseman **/ ! //global $ThemeName; ! ! $FolderIcon = "Themes/".$ThemeName."/Images/folder.png"; ! $FileIcon = "Themes/".$ThemeName."/Images/file.png"; ! $ParentIcon = "Themes/".$ThemeName."/Images/parent.png"; ! $ModuleIcon = "Themes/".$ThemeName."/Images/module.png"; function GetPageHeader($Title="", $Heading="") { ! global $StartTime, $ThemeName, $env; $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/".$ThemeName."/theme.css\" rel=\"stylesheet\" type=\"text/css\" />"; // Add JavaScript to postback the change in theme selection. $PageHead .= "<script src=\"./phpcvsview.js\"></script>"; --- 9,29 ---- * @author Brian A Cheeseman <bch...@us...> * @version $Id$ ! * @copyright 2003-2005 Brian A Cheeseman **/ ! $FolderIcon = "Themes/".$config['theme']."/Images/folder.png"; ! $FileIcon = "Themes/".$config['theme']."/Images/file.png"; ! $ParentIcon = "Themes/".$config['theme']."/Images/parent.png"; ! $ModuleIcon = "Themes/".$config['theme']."/Images/module.png"; function GetPageHeader($Title="", $Heading="") { ! 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>"; *************** *** 33,60 **** $PageHead .= "<body>"; if ($Heading != "") { ! $PageHead .= "<div class=\"title\">$Heading</div>"; } ! $PageHead .= "<p>Welcome to the CVS Repository viewing system for the phpCVSView project "; ! $PageHead .= "hosted at SourceForge.net</p><p>The goal of this project is simply to "; ! $PageHead .= "build a php application/class to provide access to a CVS based source "; ! $PageHead .= "control repository over the various connectivity mechanisms available for "; ! $PageHead .= "CVS in general. There are also some extensions to this goal planned for "; ! $PageHead .= "future releases such as a full web-based CVS client utilising the core of "; ! $PageHead .= "this project.</p><p>So please feel free to look at our code, suggest "; ! $PageHead .= "features, test the code in your own environment, submit bugs, and most of "; ! $PageHead .= "all support the commitment of the open source developers by using the many "; ! $PageHead .= "wonderful products available.</p><p>Kindest Regards,<br />Brian Cheeseman."; ! $PageHead .= "<br />phpCVSView Project Leader.</p>"; ! $PageHead .= "<form class=\"themechanger\">Change Theme: <select name=\"ThemeSelect\" class=\"themechanger\" onchange=\"postBackThemeChange(this.form)\">"; foreach (GetThemeList() as $key=>$value) { ! $PageHead .= "<option value=\"$value\""; ! if ($value == $ThemeName) { ! $PageHead .= " selected"; } ! $PageHead .= ">$value</option>"; } ! $PageHead .= "</select>"; ! $PageHead .= "<input type=\"hidden\" name=\"URLRequest\" value=\"".$env['script_name'].""; $first = true; foreach ($_GET as $key=>$value) --- 31,59 ---- $PageHead .= "<body>"; if ($Heading != "") { ! $PageHead .= "<div class=\"title\">$Heading</div>"; } ! $PageHead .= $lang['message']; ! $PageHead .= "<form class=\"themechanger\">"; ! $PageHead .= $lang['change_theme'].' <select name="ThemeSelect" class="themechanger" onchange="postBackThemeChange(this.form)">'; foreach (GetThemeList() as $key=>$value) { ! $PageHead .= '<option value="'.$value.'"'; ! if ($value == $config['theme']) { ! $PageHead .= ' selected="selected"'; } ! $PageHead .= '>'.$value.'</option>'; } ! $PageHead .= '</select>'; ! $PageHead .= ' '.$lang['change_lang'].' <select name="langSelect" class="langchanger" onchange="postBackLangChange(this.form)">'; ! foreach(getLanguagesList() as $key => $value){ ! $PageHead .= '<option value="'.$value.'"'; ! if ($value == $config['language']) { ! $PageHead .= ' selected="selected"'; ! } ! $PageHead .= '>'.$value.'</option>'; ! } ! $PageHead .= '</select>'; ! ! $PageHead .= '<input type="hidden" name="URLRequest" value="'.$env['script_name'].'"'; $first = true; foreach ($_GET as $key=>$value) *************** *** 68,86 **** $PageHead .= "?"; } ! $first = false; $PageHead .= $key."=".$value; } } ! $PageHead .= "\"></form>"; return $PageHead; } function GetPageFooter() { ! global $StartTime; $EndTime = microtime(); ! $PageFoot = "<div class=\"footer\">This page was generated by <a href=\"http://phpcvsview.sourceforge.net/\">phpCVSView</a> in ".number_format(microtime_diff($StartTime, $EndTime), 3)." seconds.<br />"; ! $PageFoot .= "phpCVSView created by <a href=\"mailto:bch...@us..."; ! $PageFoot .= "\">Brian Cheeseman</a> and <a href=\"mailto:si...@us...\">"; ! $PageFoot .= "Sijis Aviles</a>."; $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>"; --- 67,83 ---- $PageHead .= "?"; } ! $first = false; $PageHead .= $key."=".$value; } } ! $PageHead .= '"></form>'; return $PageHead; } function GetPageFooter() { ! 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>"; *************** *** 90,104 **** } ! 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; if ($LastIsFile) { ! $OffSet = 1; } --- 87,101 ---- } ! 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; if ($LastIsFile) { ! $OffSet = 1; } *************** *** 114,120 **** $QLOut .= "/ "; if ($LinkLast) { ! $QLOut .= "<a href=\"".$env['script_name']."?mp=".ImplodeToPath($Dirs, "/", $intCount); if ($LastIsFile) { ! $QLOut .= "&fh#rd$Revision\">"; } else { $QLOut .= "/"; --- 111,117 ---- $QLOut .= "/ "; if ($LinkLast) { ! $QLOut .= "<a href=\"".$env['script_name']."?mp=".ImplodeToPath($Dirs, "/", $intCount); if ($LastIsFile) { ! $QLOut .= "&fh#rd$Revision\">"; } else { $QLOut .= "/"; *************** *** 124,128 **** $QLOut .= $Dirs[$intCount]; if ($LinkLast) { ! $QLOut .= "</a>"; } $QLOut .= "</div>"; --- 121,125 ---- $QLOut .= $Dirs[$intCount]; if ($LinkLast) { ! $QLOut .= "</a>"; } $QLOut .= "</div>"; *************** *** 132,139 **** function startDirList() { ! global $RowClass; echo "<hr />"; echo "<table>"; ! echo "<tr class=\"head\"><th> </th><th>File</th><th>Rev.</th><th>Age</th><th>Author</th><th>Last Log Entry</th></tr>"; $RowClass = "row1"; } --- 129,136 ---- function startDirList() { ! global $RowClass, $lang; echo "<hr />"; echo "<table>"; ! echo "<tr class=\"head\"><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"; } *************** *** 147,155 **** 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\">"; echo "<td class=\"min\"><a href=\"$HREF\"><img alt=\"parent\" src=\"".$env['script_path']."/$ParentIcon\" /></a></td>"; ! echo "<td class=\"min\"><a href=\"$HREF\">Up one folder</a></td>"; echo "<td> </td>"; echo "<td> </td>"; --- 144,152 ---- 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\"><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>"; *************** *** 174,178 **** echo "</tr>"; if ($RowClass == "row1") { ! $RowClass = "row2"; } else { $RowClass = "row1"; --- 171,175 ---- echo "</tr>"; if ($RowClass == "row1") { ! $RowClass = "row2"; } else { $RowClass = "row1"; *************** *** 196,200 **** echo "</tr>"; if ($RowClass == "row1") { ! $RowClass = "row2"; } else { $RowClass = "row1"; --- 193,197 ---- echo "</tr>"; if ($RowClass == "row1") { ! $RowClass = "row2"; } else { $RowClass = "row1"; *************** *** 205,209 **** function addFiles($ModPath, $Files) { ! global $RowClass, $FileIcon, $env; foreach ($Files as $File) { $HREF = str_replace("//", "/", $env['script_name']."?mp=$ModPath/".$File["Name"]); --- 202,206 ---- function addFiles($ModPath, $Files) { ! global $RowClass, $FileIcon, $env, $lang; foreach ($Files as $File) { $HREF = str_replace("//", "/", $env['script_name']."?mp=$ModPath/".$File["Name"]); *************** *** 214,223 **** 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)." 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"; } else { $RowClass = "row1"; --- 211,220 ---- 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"; } else { $RowClass = "row1"; |
From: Sijis A. <si...@us...> - 2005-02-01 15:03:00
|
Update of /cvsroot/phpcvsview/phpcvsview/Themes/Yellow In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21841/Themes/Yellow Modified Files: theme.php Log Message: - added language dropdown for internationalization (i18n) support Index: theme.php =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/Themes/Yellow/theme.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** theme.php 23 Jan 2005 04:18:58 -0000 1.1 --- theme.php 1 Feb 2005 15:02:49 -0000 1.2 *************** *** 9,31 **** * @author Brian A Cheeseman <bch...@us...> * @version $Id$ ! * @copyright 2003-2004 Brian A Cheeseman **/ ! //global $ThemeName; ! ! $FolderIcon = "Themes/".$ThemeName."/Images/folder.png"; ! $FileIcon = "Themes/".$ThemeName."/Images/file.png"; ! $ParentIcon = "Themes/".$ThemeName."/Images/parent.png"; ! $ModuleIcon = "Themes/".$ThemeName."/Images/module.png"; function GetPageHeader($Title="", $Heading="") { ! global $StartTime, $ThemeName, $env; $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/".$ThemeName."/theme.css\" rel=\"stylesheet\" type=\"text/css\" />"; // Add JavaScript to postback the change in theme selection. $PageHead .= "<script src=\"./phpcvsview.js\"></script>"; --- 9,29 ---- * @author Brian A Cheeseman <bch...@us...> * @version $Id$ ! * @copyright 2003-2005 Brian A Cheeseman **/ ! $FolderIcon = "Themes/".$config['theme']."/Images/folder.png"; ! $FileIcon = "Themes/".$config['theme']."/Images/file.png"; ! $ParentIcon = "Themes/".$config['theme']."/Images/parent.png"; ! $ModuleIcon = "Themes/".$config['theme']."/Images/module.png"; function GetPageHeader($Title="", $Heading="") { ! 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>"; *************** *** 33,60 **** $PageHead .= "<body>"; if ($Heading != "") { ! $PageHead .= "<div class=\"title\">$Heading</div>"; } ! $PageHead .= "<p>Welcome to the CVS Repository viewing system for the phpCVSView project "; ! $PageHead .= "hosted at SourceForge.net</p><p>The goal of this project is simply to "; ! $PageHead .= "build a php application/class to provide access to a CVS based source "; ! $PageHead .= "control repository over the various connectivity mechanisms available for "; ! $PageHead .= "CVS in general. There are also some extensions to this goal planned for "; ! $PageHead .= "future releases such as a full web-based CVS client utilising the core of "; ! $PageHead .= "this project.</p><p>So please feel free to look at our code, suggest "; ! $PageHead .= "features, test the code in your own environment, submit bugs, and most of "; ! $PageHead .= "all support the commitment of the open source developers by using the many "; ! $PageHead .= "wonderful products available.</p><p>Kindest Regards,<br />Brian Cheeseman."; ! $PageHead .= "<br />phpCVSView Project Leader.</p>"; ! $PageHead .= "<form class=\"themechanger\">Change Theme: <select name=\"ThemeSelect\" class=\"themechanger\" onchange=\"postBackThemeChange(this.form)\">"; foreach (GetThemeList() as $key=>$value) { ! $PageHead .= "<option value=\"$value\""; ! if ($value == $ThemeName) { ! $PageHead .= " selected"; } ! $PageHead .= ">$value</option>"; } ! $PageHead .= "</select>"; ! $PageHead .= "<input type=\"hidden\" name=\"URLRequest\" value=\"".$env['script_name'].""; $first = true; foreach ($_GET as $key=>$value) --- 31,59 ---- $PageHead .= "<body>"; if ($Heading != "") { ! $PageHead .= "<div class=\"title\">$Heading</div>"; } ! $PageHead .= $lang['message']; ! $PageHead .= "<form class=\"themechanger\">"; ! $PageHead .= $lang['change_theme'].' <select name="ThemeSelect" class="themechanger" onchange="postBackThemeChange(this.form)">'; foreach (GetThemeList() as $key=>$value) { ! $PageHead .= '<option value="'.$value.'"'; ! if ($value == $config['theme']) { ! $PageHead .= ' selected="selected"'; } ! $PageHead .= '>'.$value.'</option>'; } ! $PageHead .= '</select>'; ! $PageHead .= ' '.$lang['change_lang'].' <select name="langSelect" class="langchanger" onchange="postBackLangChange(this.form)">'; ! foreach(getLanguagesList() as $key => $value){ ! $PageHead .= '<option value="'.$value.'"'; ! if ($value == $config['language']) { ! $PageHead .= ' selected="selected"'; ! } ! $PageHead .= '>'.$value.'</option>'; ! } ! $PageHead .= '</select>'; ! ! $PageHead .= '<input type="hidden" name="URLRequest" value="'.$env['script_name'].'"'; $first = true; foreach ($_GET as $key=>$value) *************** *** 68,86 **** $PageHead .= "?"; } ! $first = false; $PageHead .= $key."=".$value; } } ! $PageHead .= "\"></form>"; return $PageHead; } function GetPageFooter() { ! global $StartTime; $EndTime = microtime(); ! $PageFoot = "<div class=\"footer\">This page was generated by <a href=\"http://phpcvsview.sourceforge.net/\">phpCVSView</a> in ".number_format(microtime_diff($StartTime, $EndTime), 3)." seconds.<br />"; ! $PageFoot .= "phpCVSView created by <a href=\"mailto:bch...@us..."; ! $PageFoot .= "\">Brian Cheeseman</a> and <a href=\"mailto:si...@us...\">"; ! $PageFoot .= "Sijis Aviles</a>."; $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>"; --- 67,83 ---- $PageHead .= "?"; } ! $first = false; $PageHead .= $key."=".$value; } } ! $PageHead .= '"></form>'; return $PageHead; } function GetPageFooter() { ! 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>"; *************** *** 90,104 **** } ! 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; if ($LastIsFile) { ! $OffSet = 1; } --- 87,101 ---- } ! 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; if ($LastIsFile) { ! $OffSet = 1; } *************** *** 114,120 **** $QLOut .= "/ "; if ($LinkLast) { ! $QLOut .= "<a href=\"".$env['script_name']."?mp=".ImplodeToPath($Dirs, "/", $intCount); if ($LastIsFile) { ! $QLOut .= "&fh#rd$Revision\">"; } else { $QLOut .= "/"; --- 111,117 ---- $QLOut .= "/ "; if ($LinkLast) { ! $QLOut .= "<a href=\"".$env['script_name']."?mp=".ImplodeToPath($Dirs, "/", $intCount); if ($LastIsFile) { ! $QLOut .= "&fh#rd$Revision\">"; } else { $QLOut .= "/"; *************** *** 124,128 **** $QLOut .= $Dirs[$intCount]; if ($LinkLast) { ! $QLOut .= "</a>"; } $QLOut .= "</div>"; --- 121,125 ---- $QLOut .= $Dirs[$intCount]; if ($LinkLast) { ! $QLOut .= "</a>"; } $QLOut .= "</div>"; *************** *** 132,139 **** function startDirList() { ! global $RowClass; echo "<hr />"; echo "<table>"; ! echo "<tr class=\"head\"><th> </th><th>File</th><th>Rev.</th><th>Age</th><th>Author</th><th>Last Log Entry</th></tr>"; $RowClass = "row1"; } --- 129,136 ---- function startDirList() { ! global $RowClass, $lang; echo "<hr />"; echo "<table>"; ! echo "<tr class=\"head\"><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"; } *************** *** 147,155 **** 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\">"; echo "<td class=\"min\"><a href=\"$HREF\"><img alt=\"parent\" src=\"".$env['script_path']."/$ParentIcon\" /></a></td>"; ! echo "<td class=\"min\"><a href=\"$HREF\">Up one folder</a></td>"; echo "<td> </td>"; echo "<td> </td>"; --- 144,152 ---- 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\"><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>"; *************** *** 174,178 **** echo "</tr>"; if ($RowClass == "row1") { ! $RowClass = "row2"; } else { $RowClass = "row1"; --- 171,175 ---- echo "</tr>"; if ($RowClass == "row1") { ! $RowClass = "row2"; } else { $RowClass = "row1"; *************** *** 196,200 **** echo "</tr>"; if ($RowClass == "row1") { ! $RowClass = "row2"; } else { $RowClass = "row1"; --- 193,197 ---- echo "</tr>"; if ($RowClass == "row1") { ! $RowClass = "row2"; } else { $RowClass = "row1"; *************** *** 205,209 **** function addFiles($ModPath, $Files) { ! global $RowClass, $FileIcon, $env; foreach ($Files as $File) { $HREF = str_replace("//", "/", $env['script_name']."?mp=$ModPath/".$File["Name"]); --- 202,206 ---- function addFiles($ModPath, $Files) { ! global $RowClass, $FileIcon, $env, $lang; foreach ($Files as $File) { $HREF = str_replace("//", "/", $env['script_name']."?mp=$ModPath/".$File["Name"]); *************** *** 214,223 **** 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)." 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"; } else { $RowClass = "row1"; --- 211,220 ---- 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"; } else { $RowClass = "row1"; |
From: Sijis A. <si...@us...> - 2005-02-01 15:03:00
|
Update of /cvsroot/phpcvsview/phpcvsview/Themes/Blue In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21841/Themes/Blue Modified Files: theme.php Log Message: - added language dropdown for internationalization (i18n) support Index: theme.php =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/Themes/Blue/theme.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** theme.php 23 Jan 2005 04:18:57 -0000 1.1 --- theme.php 1 Feb 2005 15:02:44 -0000 1.2 *************** *** 9,31 **** * @author Brian A Cheeseman <bch...@us...> * @version $Id$ ! * @copyright 2003-2004 Brian A Cheeseman **/ ! //global $ThemeName; ! ! $FolderIcon = "Themes/".$ThemeName."/Images/folder.png"; ! $FileIcon = "Themes/".$ThemeName."/Images/file.png"; ! $ParentIcon = "Themes/".$ThemeName."/Images/parent.png"; ! $ModuleIcon = "Themes/".$ThemeName."/Images/module.png"; function GetPageHeader($Title="", $Heading="") { ! global $StartTime, $ThemeName, $env; $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/".$ThemeName."/theme.css\" rel=\"stylesheet\" type=\"text/css\" />"; // Add JavaScript to postback the change in theme selection. $PageHead .= "<script src=\"./phpcvsview.js\"></script>"; --- 9,29 ---- * @author Brian A Cheeseman <bch...@us...> * @version $Id$ ! * @copyright 2003-2005 Brian A Cheeseman **/ ! $FolderIcon = "Themes/".$config['theme']."/Images/folder.png"; ! $FileIcon = "Themes/".$config['theme']."/Images/file.png"; ! $ParentIcon = "Themes/".$config['theme']."/Images/parent.png"; ! $ModuleIcon = "Themes/".$config['theme']."/Images/module.png"; function GetPageHeader($Title="", $Heading="") { ! 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>"; *************** *** 33,60 **** $PageHead .= "<body>"; if ($Heading != "") { ! $PageHead .= "<div class=\"title\">$Heading</div>"; } ! $PageHead .= "<p>Welcome to the CVS Repository viewing system for the phpCVSView project "; ! $PageHead .= "hosted at SourceForge.net</p><p>The goal of this project is simply to "; ! $PageHead .= "build a php application/class to provide access to a CVS based source "; ! $PageHead .= "control repository over the various connectivity mechanisms available for "; ! $PageHead .= "CVS in general. There are also some extensions to this goal planned for "; ! $PageHead .= "future releases such as a full web-based CVS client utilising the core of "; ! $PageHead .= "this project.</p><p>So please feel free to look at our code, suggest "; ! $PageHead .= "features, test the code in your own environment, submit bugs, and most of "; ! $PageHead .= "all support the commitment of the open source developers by using the many "; ! $PageHead .= "wonderful products available.</p><p>Kindest Regards,<br />Brian Cheeseman."; ! $PageHead .= "<br />phpCVSView Project Leader.</p>"; ! $PageHead .= "<form class=\"themechanger\">Change Theme: <select name=\"ThemeSelect\" class=\"themechanger\" onchange=\"postBackThemeChange(this.form)\">"; foreach (GetThemeList() as $key=>$value) { ! $PageHead .= "<option value=\"$value\""; ! if ($value == $ThemeName) { ! $PageHead .= " selected"; } ! $PageHead .= ">$value</option>"; } ! $PageHead .= "</select>"; ! $PageHead .= "<input type=\"hidden\" name=\"URLRequest\" value=\"".$env['script_name'].""; $first = true; foreach ($_GET as $key=>$value) --- 31,59 ---- $PageHead .= "<body>"; if ($Heading != "") { ! $PageHead .= "<div class=\"title\">$Heading</div>"; } ! $PageHead .= $lang['message']; ! $PageHead .= "<form class=\"themechanger\">"; ! $PageHead .= $lang['change_theme'].' <select name="ThemeSelect" class="themechanger" onchange="postBackThemeChange(this.form)">'; foreach (GetThemeList() as $key=>$value) { ! $PageHead .= '<option value="'.$value.'"'; ! if ($value == $config['theme']) { ! $PageHead .= ' selected="selected"'; } ! $PageHead .= '>'.$value.'</option>'; } ! $PageHead .= '</select>'; ! $PageHead .= ' '.$lang['change_lang'].' <select name="langSelect" class="langchanger" onchange="postBackLangChange(this.form)">'; ! foreach(getLanguagesList() as $key => $value){ ! $PageHead .= '<option value="'.$value.'"'; ! if ($value == $config['language']) { ! $PageHead .= ' selected="selected"'; ! } ! $PageHead .= '>'.$value.'</option>'; ! } ! $PageHead .= '</select>'; ! ! $PageHead .= '<input type="hidden" name="URLRequest" value="'.$env['script_name'].'"'; $first = true; foreach ($_GET as $key=>$value) *************** *** 68,86 **** $PageHead .= "?"; } ! $first = false; $PageHead .= $key."=".$value; } } ! $PageHead .= "\"></form>"; return $PageHead; } function GetPageFooter() { ! global $StartTime; $EndTime = microtime(); ! $PageFoot = "<div class=\"footer\">This page was generated by <a href=\"http://phpcvsview.sourceforge.net/\">phpCVSView</a> in ".number_format(microtime_diff($StartTime, $EndTime), 3)." seconds.<br />"; ! $PageFoot .= "phpCVSView created by <a href=\"mailto:bch...@us..."; ! $PageFoot .= "\">Brian Cheeseman</a> and <a href=\"mailto:si...@us...\">"; ! $PageFoot .= "Sijis Aviles</a>."; $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>"; --- 67,83 ---- $PageHead .= "?"; } ! $first = false; $PageHead .= $key."=".$value; } } ! $PageHead .= '"></form>'; return $PageHead; } function GetPageFooter() { ! 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>"; *************** *** 90,104 **** } ! 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; if ($LastIsFile) { ! $OffSet = 1; } --- 87,101 ---- } ! 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; if ($LastIsFile) { ! $OffSet = 1; } *************** *** 114,120 **** $QLOut .= "/ "; if ($LinkLast) { ! $QLOut .= "<a href=\"".$env['script_name']."?mp=".ImplodeToPath($Dirs, "/", $intCount); if ($LastIsFile) { ! $QLOut .= "&fh#rd$Revision\">"; } else { $QLOut .= "/"; --- 111,117 ---- $QLOut .= "/ "; if ($LinkLast) { ! $QLOut .= "<a href=\"".$env['script_name']."?mp=".ImplodeToPath($Dirs, "/", $intCount); if ($LastIsFile) { ! $QLOut .= "&fh#rd$Revision\">"; } else { $QLOut .= "/"; *************** *** 124,128 **** $QLOut .= $Dirs[$intCount]; if ($LinkLast) { ! $QLOut .= "</a>"; } $QLOut .= "</div>"; --- 121,125 ---- $QLOut .= $Dirs[$intCount]; if ($LinkLast) { ! $QLOut .= "</a>"; } $QLOut .= "</div>"; *************** *** 132,139 **** function startDirList() { ! global $RowClass; echo "<hr />"; echo "<table>"; ! echo "<tr class=\"head\"><th> </th><th>File</th><th>Rev.</th><th>Age</th><th>Author</th><th>Last Log Entry</th></tr>"; $RowClass = "row1"; } --- 129,136 ---- function startDirList() { ! global $RowClass, $lang; echo "<hr />"; echo "<table>"; ! echo "<tr class=\"head\"><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"; } *************** *** 147,155 **** 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\">"; echo "<td class=\"min\"><a href=\"$HREF\"><img alt=\"parent\" src=\"".$env['script_path']."/$ParentIcon\" /></a></td>"; ! echo "<td class=\"min\"><a href=\"$HREF\">Up one folder</a></td>"; echo "<td> </td>"; echo "<td> </td>"; --- 144,152 ---- 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\"><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>"; *************** *** 174,178 **** echo "</tr>"; if ($RowClass == "row1") { ! $RowClass = "row2"; } else { $RowClass = "row1"; --- 171,175 ---- echo "</tr>"; if ($RowClass == "row1") { ! $RowClass = "row2"; } else { $RowClass = "row1"; *************** *** 196,200 **** echo "</tr>"; if ($RowClass == "row1") { ! $RowClass = "row2"; } else { $RowClass = "row1"; --- 193,197 ---- echo "</tr>"; if ($RowClass == "row1") { ! $RowClass = "row2"; } else { $RowClass = "row1"; *************** *** 205,209 **** function addFiles($ModPath, $Files) { ! global $RowClass, $FileIcon, $env; foreach ($Files as $File) { $HREF = str_replace("//", "/", $env['script_name']."?mp=$ModPath/".$File["Name"]); --- 202,206 ---- function addFiles($ModPath, $Files) { ! global $RowClass, $FileIcon, $env, $lang; foreach ($Files as $File) { $HREF = str_replace("//", "/", $env['script_name']."?mp=$ModPath/".$File["Name"]); *************** *** 214,223 **** 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)." 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"; } else { $RowClass = "row1"; --- 211,220 ---- 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"; } else { $RowClass = "row1"; |
From: Sijis A. <si...@us...> - 2005-02-01 15:02:59
|
Update of /cvsroot/phpcvsview/phpcvsview/Themes/Default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21841/Themes/Default Modified Files: theme.php Log Message: - added language dropdown for internationalization (i18n) support Index: theme.php =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/Themes/Default/theme.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** theme.php 23 Jan 2005 01:29:38 -0000 1.9 --- theme.php 1 Feb 2005 15:02:46 -0000 1.10 *************** *** 9,31 **** * @author Brian A Cheeseman <bch...@us...> * @version $Id$ ! * @copyright 2003-2004 Brian A Cheeseman **/ ! //global $ThemeName; ! ! $FolderIcon = "Themes/".$ThemeName."/Images/folder.png"; ! $FileIcon = "Themes/".$ThemeName."/Images/file.png"; ! $ParentIcon = "Themes/".$ThemeName."/Images/parent.png"; ! $ModuleIcon = "Themes/".$ThemeName."/Images/module.png"; function GetPageHeader($Title="", $Heading="") { ! global $StartTime, $ThemeName, $env; $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/".$ThemeName."/theme.css\" rel=\"stylesheet\" type=\"text/css\" />"; // Add JavaScript to postback the change in theme selection. $PageHead .= "<script src=\"./phpcvsview.js\"></script>"; --- 9,29 ---- * @author Brian A Cheeseman <bch...@us...> * @version $Id$ ! * @copyright 2003-2005 Brian A Cheeseman **/ ! $FolderIcon = "Themes/".$config['theme']."/Images/folder.png"; ! $FileIcon = "Themes/".$config['theme']."/Images/file.png"; ! $ParentIcon = "Themes/".$config['theme']."/Images/parent.png"; ! $ModuleIcon = "Themes/".$config['theme']."/Images/module.png"; function GetPageHeader($Title="", $Heading="") { ! 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>"; *************** *** 33,60 **** $PageHead .= "<body>"; if ($Heading != "") { ! $PageHead .= "<div class=\"title\">$Heading</div>"; } ! $PageHead .= "<p>Welcome to the CVS Repository viewing system for the phpCVSView project "; ! $PageHead .= "hosted at SourceForge.net</p><p>The goal of this project is simply to "; ! $PageHead .= "build a php application/class to provide access to a CVS based source "; ! $PageHead .= "control repository over the various connectivity mechanisms available for "; ! $PageHead .= "CVS in general. There are also some extensions to this goal planned for "; ! $PageHead .= "future releases such as a full web-based CVS client utilising the core of "; ! $PageHead .= "this project.</p><p>So please feel free to look at our code, suggest "; ! $PageHead .= "features, test the code in your own environment, submit bugs, and most of "; ! $PageHead .= "all support the commitment of the open source developers by using the many "; ! $PageHead .= "wonderful products available.</p><p>Kindest Regards,<br />Brian Cheeseman."; ! $PageHead .= "<br />phpCVSView Project Leader.</p>"; ! $PageHead .= "<form class=\"themechanger\">Change Theme: <select name=\"ThemeSelect\" class=\"themechanger\" onchange=\"postBackThemeChange(this.form)\">"; foreach (GetThemeList() as $key=>$value) { ! $PageHead .= "<option value=\"$value\""; ! if ($value == $ThemeName) { ! $PageHead .= " selected"; } ! $PageHead .= ">$value</option>"; } ! $PageHead .= "</select>"; ! $PageHead .= "<input type=\"hidden\" name=\"URLRequest\" value=\"".$env['script_name'].""; $first = true; foreach ($_GET as $key=>$value) --- 31,59 ---- $PageHead .= "<body>"; if ($Heading != "") { ! $PageHead .= "<div class=\"title\">$Heading</div>"; } ! $PageHead .= $lang['message']; ! $PageHead .= "<form class=\"themechanger\">"; ! $PageHead .= $lang['change_theme'].' <select name="ThemeSelect" class="themechanger" onchange="postBackThemeChange(this.form)">'; foreach (GetThemeList() as $key=>$value) { ! $PageHead .= '<option value="'.$value.'"'; ! if ($value == $config['theme']) { ! $PageHead .= ' selected="selected"'; } ! $PageHead .= '>'.$value.'</option>'; } ! $PageHead .= '</select>'; ! $PageHead .= ' '.$lang['change_lang'].' <select name="langSelect" class="langchanger" onchange="postBackLangChange(this.form)">'; ! foreach(getLanguagesList() as $key => $value){ ! $PageHead .= '<option value="'.$value.'"'; ! if ($value == $config['language']) { ! $PageHead .= ' selected="selected"'; ! } ! $PageHead .= '>'.$value.'</option>'; ! } ! $PageHead .= '</select>'; ! ! $PageHead .= '<input type="hidden" name="URLRequest" value="'.$env['script_name'].'"'; $first = true; foreach ($_GET as $key=>$value) *************** *** 68,86 **** $PageHead .= "?"; } ! $first = false; $PageHead .= $key."=".$value; } } ! $PageHead .= "\"></form>"; return $PageHead; } function GetPageFooter() { ! global $StartTime; $EndTime = microtime(); ! $PageFoot = "<div class=\"footer\">This page was generated by <a href=\"http://phpcvsview.sourceforge.net/\">phpCVSView</a> in ".number_format(microtime_diff($StartTime, $EndTime), 3)." seconds.<br />"; ! $PageFoot .= "phpCVSView created by <a href=\"mailto:bch...@us..."; ! $PageFoot .= "\">Brian Cheeseman</a> and <a href=\"mailto:si...@us...\">"; ! $PageFoot .= "Sijis Aviles</a>."; $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>"; --- 67,83 ---- $PageHead .= "?"; } ! $first = false; $PageHead .= $key."=".$value; } } ! $PageHead .= '"></form>'; return $PageHead; } function GetPageFooter() { ! 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>"; *************** *** 90,104 **** } ! 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; if ($LastIsFile) { ! $OffSet = 1; } --- 87,101 ---- } ! 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; if ($LastIsFile) { ! $OffSet = 1; } *************** *** 114,120 **** $QLOut .= "/ "; if ($LinkLast) { ! $QLOut .= "<a href=\"".$env['script_name']."?mp=".ImplodeToPath($Dirs, "/", $intCount); if ($LastIsFile) { ! $QLOut .= "&fh#rd$Revision\">"; } else { $QLOut .= "/"; --- 111,117 ---- $QLOut .= "/ "; if ($LinkLast) { ! $QLOut .= "<a href=\"".$env['script_name']."?mp=".ImplodeToPath($Dirs, "/", $intCount); if ($LastIsFile) { ! $QLOut .= "&fh#rd$Revision\">"; } else { $QLOut .= "/"; *************** *** 124,128 **** $QLOut .= $Dirs[$intCount]; if ($LinkLast) { ! $QLOut .= "</a>"; } $QLOut .= "</div>"; --- 121,125 ---- $QLOut .= $Dirs[$intCount]; if ($LinkLast) { ! $QLOut .= "</a>"; } $QLOut .= "</div>"; *************** *** 132,139 **** function startDirList() { ! global $RowClass; echo "<hr />"; echo "<table>"; ! echo "<tr class=\"head\"><th> </th><th>File</th><th>Rev.</th><th>Age</th><th>Author</th><th>Last Log Entry</th></tr>"; $RowClass = "row1"; } --- 129,136 ---- function startDirList() { ! global $RowClass, $lang; echo "<hr />"; echo "<table>"; ! echo "<tr class=\"head\"><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"; } *************** *** 147,155 **** 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\">"; echo "<td class=\"min\"><a href=\"$HREF\"><img alt=\"parent\" src=\"".$env['script_path']."/$ParentIcon\" /></a></td>"; ! echo "<td class=\"min\"><a href=\"$HREF\">Up one folder</a></td>"; echo "<td> </td>"; echo "<td> </td>"; --- 144,152 ---- 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\"><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>"; *************** *** 174,178 **** echo "</tr>"; if ($RowClass == "row1") { ! $RowClass = "row2"; } else { $RowClass = "row1"; --- 171,175 ---- echo "</tr>"; if ($RowClass == "row1") { ! $RowClass = "row2"; } else { $RowClass = "row1"; *************** *** 196,200 **** echo "</tr>"; if ($RowClass == "row1") { ! $RowClass = "row2"; } else { $RowClass = "row1"; --- 193,197 ---- echo "</tr>"; if ($RowClass == "row1") { ! $RowClass = "row2"; } else { $RowClass = "row1"; *************** *** 205,209 **** function addFiles($ModPath, $Files) { ! global $RowClass, $FileIcon, $env; foreach ($Files as $File) { $HREF = str_replace("//", "/", $env['script_name']."?mp=$ModPath/".$File["Name"]); --- 202,206 ---- function addFiles($ModPath, $Files) { ! global $RowClass, $FileIcon, $env, $lang; foreach ($Files as $File) { $HREF = str_replace("//", "/", $env['script_name']."?mp=$ModPath/".$File["Name"]); *************** *** 214,223 **** 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)." 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"; } else { $RowClass = "row1"; --- 211,220 ---- 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"; } else { $RowClass = "row1"; |
From: Brian C. <bch...@us...> - 2005-02-01 07:22:55
|
Update of /cvsroot/phpcvsview/phpcvsview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12024 Modified Files: phpcvs.php Log Message: Added DIFF support to the core phpcvs class. Index: phpcvs.php =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/phpcvs.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** phpcvs.php 23 Jan 2005 00:55:22 -0000 1.20 --- phpcvs.php 1 Feb 2005 07:22:30 -0000 1.21 *************** *** 449,452 **** --- 449,466 ---- // *************************************************************************** + // Function: sendCASE() + // Author: Brian A Cheeseman. + // Parameters: None. + // Return Value: boolean - Successfully sent. + // *************************************************************************** + function sendCASE() + { + if ($this->SOCKET->write("Case\n") != true) { + return false; + } + return true; + } + + // *************************************************************************** // Function: sendValidResponses() // Author: Brian A Cheeseman. *************** *** 1092,1095 **** --- 1106,1180 ---- // *************************************************************************** + // Function: getFileDiff() + // Author: Brian Cheeseman. + // Parameters: string - Name of file to diff. + // int - Revision 1. + // int - Revision 2. + // Return Value: void - none. + // *************************************************************************** + function getFileDiff($FileName, $Revision1, $Revision2) + { + if (!($this->INITIALISED)) { + $this->sendValidResponses(); + $this->sendValidRequests(); + $this->INITIALISED = true; + } + + if (!$this->sendUseUnchanged()) { + return false; + } + + if (!$this->sendCVSROOT()) { + return false; + } + + if (!$this->sendArgument("-r")) { + return false; + } + + if (!$this->sendArgument($Revision1)) { + return false; + } + + if (!$this->sendArgument("-r")) { + return false; + } + + if (!$this->sendArgument($Revision2)) { + return false; + } + + if (!$this->sendArgument("--")) { + return false; + } + + $dir = substr($FileName, 0, strrpos($FileName, "/")); + $file = substr($FileName, strrpos($FileName, "/")+1); + if (!$this->sendDirectory($dir)) { + return false; + } + + if (!$this->sendEntry($file, $Revision2, "", "", "")) { + return false; + } + + if (!$this->sendUnchanged($file)) { + return false; + } + + if (!$this->sendArgument($file)) { + return false; + } + + if ($this->SOCKET->write("diff\n") != true) { + return false; + } + + $this->processResponse(); + + return $this->MESSAGE_CONTENT; + } + + // *************************************************************************** // Function: debug() // Author: Sijis Aviles. |
From: Brian C. <bch...@us...> - 2005-02-01 07:21:05
|
Update of /cvsroot/phpcvsview/phpcvsview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11778 Modified Files: func_FileHistory.php Log Message: Updated support for DIFFs by changing the revision identifier from the date to the actual revision number Index: func_FileHistory.php =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/func_FileHistory.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** func_FileHistory.php 6 Oct 2004 08:40:29 -0000 1.6 --- func_FileHistory.php 1 Feb 2005 07:20:52 -0000 1.7 *************** *** 14,18 **** function DisplayFileHistory() { ! global $config, $env; // Calculate the path from the $env['script_name'] variable. --- 14,18 ---- function DisplayFileHistory() { ! global $config, $env, $CVSServer; // Calculate the path from the $env['script_name'] variable. *************** *** 52,57 **** 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"; --- 52,59 ---- echo " (<a href=\"$HREF&fv&dt=$DateTime\">view</a>)"; echo " (<a href=\"$HREF&fd&dt=$DateTime\">download</a>)"; ! if ($Revision["PrevRevision"] != "") { ! echo " (<a href=\"$HREF&df&r1=".$Revision["Revision"]."&r2="; ! echo $Revision["PrevRevision"]."\">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"; *************** *** 73,76 **** --- 75,79 ---- echo "Connection Failed."; } + echo GetDiffForm(); echo GetPageFooter(); } |
From: Brian C. <bch...@us...> - 2005-02-01 07:16:31
|
Update of /cvsroot/phpcvsview/phpcvsview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10878 Modified Files: phpcvsview.js Log Message: Updated the javascript checking for the revisions to get them in the correct order for presenting to the CVS server. Index: phpcvsview.js =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/phpcvsview.js,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** phpcvsview.js 23 Jan 2005 04:56:09 -0000 1.2 --- phpcvsview.js 1 Feb 2005 07:16:21 -0000 1.3 *************** *** 18,22 **** var ddRev1=form.DiffRev1.value; var ddRev2=form.DiffRev2.value; ! if (ddRev1 > ddRev2) { // Swap the values. --- 18,22 ---- var ddRev1=form.DiffRev1.value; var ddRev2=form.DiffRev2.value; ! if (form.DiffRev1.selectedIndex < form.DiffRev2.selectedIndex) { // Swap the values. *************** *** 32,35 **** --- 32,36 ---- { var dfDiffReq=form.URLDiffReq.value; + alert('Redirecting to: '+dfDiffReq+'&r1='+ddRev1+'&r2='+ddRev2+'&df'); location=dfDiffReq+'&r1='+ddRev1+'&r2='+ddRev2+'&df'; } |
From: Brian C. <bch...@us...> - 2005-01-23 04:56:18
|
Update of /cvsroot/phpcvsview/phpcvsview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv717 Modified Files: phpcvsview.js Log Message: Added javascript function for posting back the File Diff request. Index: phpcvsview.js =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/phpcvsview.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** phpcvsview.js 22 Jan 2005 14:01:39 -0000 1.1 --- phpcvsview.js 23 Jan 2005 04:56:09 -0000 1.2 *************** *** 13,14 **** --- 13,36 ---- location=newlocation; } + + function postBackDiffRequest(form) + { + var ddRev1=form.DiffRev1.value; + var ddRev2=form.DiffRev2.value; + if (ddRev1 > ddRev2) + { + // Swap the values. + var ddTemp = ddRev1; + ddRev1 = ddRev2; + ddRev2 = ddTemp; + } + if (ddRev1 == ddRev2) + { + alert('Cannot generate a diff of a revision to itself!') + } + else + { + var dfDiffReq=form.URLDiffReq.value; + location=dfDiffReq+'&r1='+ddRev1+'&r2='+ddRev2+'&df'; + } + } |
From: Brian C. <bch...@us...> - 2005-01-23 04:35:33
|
Update of /cvsroot/phpcvsview/phpcvsview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28833 Modified Files: func_FileView.php Log Message: Minor Code Cleanup. Index: func_FileView.php =================================================================== RCS file: /cvsroot/phpcvsview/phpcvsview/func_FileView.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** func_FileView.php 22 Jan 2005 13:58:20 -0000 1.11 --- func_FileView.php 23 Jan 2005 04:35:24 -0000 1.12 *************** *** 68,73 **** $geshi->set_line_style('background: #fcfcfc;'); $geshi->set_tab_width(4); - // $geshi->enable_classes(); - // $geshi->set_overall_class('geshi2'); $hlcontent = $geshi->parse_code(); --- 68,71 ---- |
From: Brian C. <bch...@us...> - 2005-01-23 04:19:08
|
Update of /cvsroot/phpcvsview/phpcvsview/Themes/Green In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25101/Themes/Green Added Files: theme.css theme.php Log Message: Added Blue, Green, and Yellow Themes. --- NEW FILE: theme.php --- <?php /** * This source code is distributed under the terms as layed out in the * GNU General Public License. * * Purpose: To provide the HTML page header code * * @author Brian A Cheeseman <bch...@us...> * @version $Id: theme.php,v 1.1 2005/01/23 04:18:57 bcheesem Exp $ * @copyright 2003-2004 Brian A Cheeseman **/ //global $ThemeName; $FolderIcon = "Themes/".$ThemeName."/Images/folder.png"; $FileIcon = "Themes/".$ThemeName."/Images/file.png"; $ParentIcon = "Themes/".$ThemeName."/Images/parent.png"; $ModuleIcon = "Themes/".$ThemeName."/Images/module.png"; function GetPageHeader($Title="", $Heading="") { global $StartTime, $ThemeName, $env; $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/".$ThemeName."/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 .= "<p>Welcome to the CVS Repository viewing system for the phpCVSView project "; $PageHead .= "hosted at SourceForge.net</p><p>The goal of this project is simply to "; $PageHead .= "build a php application/class to provide access to a CVS based source "; $PageHead .= "control repository over the various connectivity mechanisms available for "; $PageHead .= "CVS in general. There are also some extensions to this goal planned for "; $PageHead .= "future releases such as a full web-based CVS client utilising the core of "; $PageHead .= "this project.</p><p>So please feel free to look at our code, suggest "; $PageHead .= "features, test the code in your own environment, submit bugs, and most of "; $PageHead .= "all support the commitment of the open source developers by using the many "; $PageHead .= "wonderful products available.</p><p>Kindest Regards,<br />Brian Cheeseman."; $PageHead .= "<br />phpCVSView Project Leader.</p>"; $PageHead .= "<form class=\"themechanger\">Change Theme: <select name=\"ThemeSelect\" class=\"themechanger\" onchange=\"postBackThemeChange(this.form)\">"; foreach (GetThemeList() as $key=>$value) { $PageHead .= "<option value=\"$value\""; if ($value == $ThemeName) { $PageHead .= " selected"; } $PageHead .= ">$value</option>"; } $PageHead .= "</select>"; $PageHead .= "<input type=\"hidden\" name=\"URLRequest\" value=\"".$env['script_name'].""; $first = true; foreach ($_GET as $key=>$value) { if ($key != "tm") { if ($first != true) { $PageHead .= "&"; } else { $PageHead .= "?"; } $first = false; $PageHead .= $key."=".$value; } } $PageHead .= "\"></form>"; return $PageHead; } function GetPageFooter() { global $StartTime; $EndTime = microtime(); $PageFoot = "<div class=\"footer\">This page was generated by <a href=\"http://phpcvsview.sourceforge.net/\">phpCVSView</a> in ".number_format(microtime_diff($StartTime, $EndTime), 3)." seconds.<br />"; $PageFoot .= "phpCVSView created by <a href=\"mailto:bch...@us..."; $PageFoot .= "\">Brian Cheeseman</a> and <a href=\"mailto:si...@us...\">"; $PageFoot .= "Sijis Aviles</a>."; $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 = "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; if ($LastIsFile) { $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) { $QLOut .= "</a>"; } $QLOut .= "</div>"; return $QLOut; } function startDirList() { global $RowClass; echo "<hr />"; echo "<table>"; echo "<tr class=\"head\"><th> </th><th>File</th><th>Rev.</th><th>Age</th><th>Author</th><th>Last Log Entry</th></tr>"; $RowClass = "row1"; } function endDirList() { echo "</table>"; echo "<hr />"; } 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\">"; echo "<td class=\"min\"><a href=\"$HREF\"><img alt=\"parent\" src=\"".$env['script_path']."/$ParentIcon\" /></a></td>"; echo "<td class=\"min\"><a href=\"$HREF\">Up one 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, $FolderIcon, $env; foreach ($Folders as $Folder) { $HREF = str_replace("//", "/", $env['script_name']."?mp=$ModPath/".$Folder["Name"]."/"); echo "<tr class=\"$RowClass\">"; 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"; } else { $RowClass = "row1"; } } } 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\">"; 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"; } else { $RowClass = "row1"; } } } 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\">"; 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)." 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"; } else { $RowClass = "row1"; } } } ?> --- NEW FILE: theme.css --- body { margin-top: 3px; margin-bottom: 3px; margin-left: 3px; margin-right: 3px; padding:0px; font-family: Tahoma, arial, sans-serif; font-size: 10pt; background-color: #ffffff; color: #000000; } img { border: none; } a:link,a:active,a:visited { color: #009900; text-decoration: none; } a:hover { color: #009900; text-decoration: underline; } .head { background-color: #bbffbb; } .row1 { background-color: #eeffee; } .row2 { background-color: #ddffdd; } .footer { font-size: 8pt; text-align: center; } .quicknav { font-size: 8pt; text-align: left; font-weight: bold; } .themechanger { font-size: 8pt; text-align: left; padding: 0px; margin: 0px; } .title { text-align: center; font-size: 18pt; font-weight: bold; font-style: italic; color: black; } table { font-size: 8pt; border: 0px none; width: 100%; border-spacing: 0px 0px; border-collapse: collapse; } table.source { border: 0px none; width: 100%; border-spacing: 0px 0px; border-collapse: collapse; } td { padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px; } td.min { width: 1px; } li { font-family: 'Courier New', Courier, monospace; font-size: 12px; font-weight: normal; } |
From: Brian C. <bch...@us...> - 2005-01-23 04:19:07
|
Update of /cvsroot/phpcvsview/phpcvsview/Themes/Blue In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25101/Themes/Blue Added Files: theme.css theme.php Log Message: Added Blue, Green, and Yellow Themes. --- NEW FILE: theme.php --- <?php /** * This source code is distributed under the terms as layed out in the * GNU General Public License. * * Purpose: To provide the HTML page header code * * @author Brian A Cheeseman <bch...@us...> * @version $Id: theme.php,v 1.1 2005/01/23 04:18:57 bcheesem Exp $ * @copyright 2003-2004 Brian A Cheeseman **/ //global $ThemeName; $FolderIcon = "Themes/".$ThemeName."/Images/folder.png"; $FileIcon = "Themes/".$ThemeName."/Images/file.png"; $ParentIcon = "Themes/".$ThemeName."/Images/parent.png"; $ModuleIcon = "Themes/".$ThemeName."/Images/module.png"; function GetPageHeader($Title="", $Heading="") { global $StartTime, $ThemeName, $env; $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/".$ThemeName."/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 .= "<p>Welcome to the CVS Repository viewing system for the phpCVSView project "; $PageHead .= "hosted at SourceForge.net</p><p>The goal of this project is simply to "; $PageHead .= "build a php application/class to provide access to a CVS based source "; $PageHead .= "control repository over the various connectivity mechanisms available for "; $PageHead .= "CVS in general. There are also some extensions to this goal planned for "; $PageHead .= "future releases such as a full web-based CVS client utilising the core of "; $PageHead .= "this project.</p><p>So please feel free to look at our code, suggest "; $PageHead .= "features, test the code in your own environment, submit bugs, and most of "; $PageHead .= "all support the commitment of the open source developers by using the many "; $PageHead .= "wonderful products available.</p><p>Kindest Regards,<br />Brian Cheeseman."; $PageHead .= "<br />phpCVSView Project Leader.</p>"; $PageHead .= "<form class=\"themechanger\">Change Theme: <select name=\"ThemeSelect\" class=\"themechanger\" onchange=\"postBackThemeChange(this.form)\">"; foreach (GetThemeList() as $key=>$value) { $PageHead .= "<option value=\"$value\""; if ($value == $ThemeName) { $PageHead .= " selected"; } $PageHead .= ">$value</option>"; } $PageHead .= "</select>"; $PageHead .= "<input type=\"hidden\" name=\"URLRequest\" value=\"".$env['script_name'].""; $first = true; foreach ($_GET as $key=>$value) { if ($key != "tm") { if ($first != true) { $PageHead .= "&"; } else { $PageHead .= "?"; } $first = false; $PageHead .= $key."=".$value; } } $PageHead .= "\"></form>"; return $PageHead; } function GetPageFooter() { global $StartTime; $EndTime = microtime(); $PageFoot = "<div class=\"footer\">This page was generated by <a href=\"http://phpcvsview.sourceforge.net/\">phpCVSView</a> in ".number_format(microtime_diff($StartTime, $EndTime), 3)." seconds.<br />"; $PageFoot .= "phpCVSView created by <a href=\"mailto:bch...@us..."; $PageFoot .= "\">Brian Cheeseman</a> and <a href=\"mailto:si...@us...\">"; $PageFoot .= "Sijis Aviles</a>."; $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 = "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; if ($LastIsFile) { $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) { $QLOut .= "</a>"; } $QLOut .= "</div>"; return $QLOut; } function startDirList() { global $RowClass; echo "<hr />"; echo "<table>"; echo "<tr class=\"head\"><th> </th><th>File</th><th>Rev.</th><th>Age</th><th>Author</th><th>Last Log Entry</th></tr>"; $RowClass = "row1"; } function endDirList() { echo "</table>"; echo "<hr />"; } 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\">"; echo "<td class=\"min\"><a href=\"$HREF\"><img alt=\"parent\" src=\"".$env['script_path']."/$ParentIcon\" /></a></td>"; echo "<td class=\"min\"><a href=\"$HREF\">Up one 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, $FolderIcon, $env; foreach ($Folders as $Folder) { $HREF = str_replace("//", "/", $env['script_name']."?mp=$ModPath/".$Folder["Name"]."/"); echo "<tr class=\"$RowClass\">"; 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"; } else { $RowClass = "row1"; } } } 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\">"; 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"; } else { $RowClass = "row1"; } } } 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\">"; 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)." 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"; } else { $RowClass = "row1"; } } } ?> --- NEW FILE: theme.css --- body { margin-top: 3px; margin-bottom: 3px; margin-left: 3px; margin-right: 3px; padding:0px; font-family: Tahoma, arial, sans-serif; font-size: 10pt; background-color: #ffffff; color: #000000; } img { border: none; } a:link,a:active,a:visited { color: #000099; text-decoration: none; } a:hover { color: #000099; text-decoration: underline; } .head { background-color: #bbbbff; } .row1 { background-color: #eeeeff; } .row2 { background-color: #ddddff; } .footer { font-size: 8pt; text-align: center; } .quicknav { font-size: 8pt; text-align: left; font-weight: bold; } .themechanger { font-size: 8pt; text-align: left; padding: 0px; margin: 0px; } .title { text-align: center; font-size: 18pt; font-weight: bold; font-style: italic; color: black; } table { font-size: 8pt; border: 0px none; width: 100%; border-spacing: 0px 0px; border-collapse: collapse; } table.source { border: 0px none; width: 100%; border-spacing: 0px 0px; border-collapse: collapse; } td { padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px; } td.min { width: 1px; } li { font-family: 'Courier New', Courier, monospace; font-size: 12px; font-weight: normal; } |
From: Brian C. <bch...@us...> - 2005-01-23 04:19:07
|
Update of /cvsroot/phpcvsview/phpcvsview/Themes/Yellow In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25101/Themes/Yellow Added Files: theme.css theme.php Log Message: Added Blue, Green, and Yellow Themes. --- NEW FILE: theme.php --- <?php /** * This source code is distributed under the terms as layed out in the * GNU General Public License. * * Purpose: To provide the HTML page header code * * @author Brian A Cheeseman <bch...@us...> * @version $Id: theme.php,v 1.1 2005/01/23 04:18:58 bcheesem Exp $ * @copyright 2003-2004 Brian A Cheeseman **/ //global $ThemeName; $FolderIcon = "Themes/".$ThemeName."/Images/folder.png"; $FileIcon = "Themes/".$ThemeName."/Images/file.png"; $ParentIcon = "Themes/".$ThemeName."/Images/parent.png"; $ModuleIcon = "Themes/".$ThemeName."/Images/module.png"; function GetPageHeader($Title="", $Heading="") { global $StartTime, $ThemeName, $env; $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/".$ThemeName."/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 .= "<p>Welcome to the CVS Repository viewing system for the phpCVSView project "; $PageHead .= "hosted at SourceForge.net</p><p>The goal of this project is simply to "; $PageHead .= "build a php application/class to provide access to a CVS based source "; $PageHead .= "control repository over the various connectivity mechanisms available for "; $PageHead .= "CVS in general. There are also some extensions to this goal planned for "; $PageHead .= "future releases such as a full web-based CVS client utilising the core of "; $PageHead .= "this project.</p><p>So please feel free to look at our code, suggest "; $PageHead .= "features, test the code in your own environment, submit bugs, and most of "; $PageHead .= "all support the commitment of the open source developers by using the many "; $PageHead .= "wonderful products available.</p><p>Kindest Regards,<br />Brian Cheeseman."; $PageHead .= "<br />phpCVSView Project Leader.</p>"; $PageHead .= "<form class=\"themechanger\">Change Theme: <select name=\"ThemeSelect\" class=\"themechanger\" onchange=\"postBackThemeChange(this.form)\">"; foreach (GetThemeList() as $key=>$value) { $PageHead .= "<option value=\"$value\""; if ($value == $ThemeName) { $PageHead .= " selected"; } $PageHead .= ">$value</option>"; } $PageHead .= "</select>"; $PageHead .= "<input type=\"hidden\" name=\"URLRequest\" value=\"".$env['script_name'].""; $first = true; foreach ($_GET as $key=>$value) { if ($key != "tm") { if ($first != true) { $PageHead .= "&"; } else { $PageHead .= "?"; } $first = false; $PageHead .= $key."=".$value; } } $PageHead .= "\"></form>"; return $PageHead; } function GetPageFooter() { global $StartTime; $EndTime = microtime(); $PageFoot = "<div class=\"footer\">This page was generated by <a href=\"http://phpcvsview.sourceforge.net/\">phpCVSView</a> in ".number_format(microtime_diff($StartTime, $EndTime), 3)." seconds.<br />"; $PageFoot .= "phpCVSView created by <a href=\"mailto:bch...@us..."; $PageFoot .= "\">Brian Cheeseman</a> and <a href=\"mailto:si...@us...\">"; $PageFoot .= "Sijis Aviles</a>."; $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 = "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; if ($LastIsFile) { $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) { $QLOut .= "</a>"; } $QLOut .= "</div>"; return $QLOut; } function startDirList() { global $RowClass; echo "<hr />"; echo "<table>"; echo "<tr class=\"head\"><th> </th><th>File</th><th>Rev.</th><th>Age</th><th>Author</th><th>Last Log Entry</th></tr>"; $RowClass = "row1"; } function endDirList() { echo "</table>"; echo "<hr />"; } 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\">"; echo "<td class=\"min\"><a href=\"$HREF\"><img alt=\"parent\" src=\"".$env['script_path']."/$ParentIcon\" /></a></td>"; echo "<td class=\"min\"><a href=\"$HREF\">Up one 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, $FolderIcon, $env; foreach ($Folders as $Folder) { $HREF = str_replace("//", "/", $env['script_name']."?mp=$ModPath/".$Folder["Name"]."/"); echo "<tr class=\"$RowClass\">"; 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"; } else { $RowClass = "row1"; } } } 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\">"; 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"; } else { $RowClass = "row1"; } } } 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\">"; 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)." 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"; } else { $RowClass = "row1"; } } } ?> --- NEW FILE: theme.css --- body { margin-top: 3px; margin-bottom: 3px; margin-left: 3px; margin-right: 3px; padding:0px; font-family: Tahoma, arial, sans-serif; font-size: 10pt; background-color: #ffffff; color: #000000; } img { border: none; } a:link,a:active,a:visited { color: #999900; text-decoration: none; } a:hover { color: #999900; text-decoration: underline; } .head { background-color: #ffffbb; } .row1 { background-color: #ffffee; } .row2 { background-color: #ffffdd; } .footer { font-size: 8pt; text-align: center; } .quicknav { font-size: 8pt; text-align: left; font-weight: bold; } .themechanger { font-size: 8pt; text-align: left; padding: 0px; margin: 0px; } .title { text-align: center; font-size: 18pt; font-weight: bold; font-style: italic; color: black; } table { font-size: 8pt; border: 0px none; width: 100%; border-spacing: 0px 0px; border-collapse: collapse; } table.source { border: 0px none; width: 100%; border-spacing: 0px 0px; border-collapse: collapse; } td { padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px; } td.min { width: 1px; } li { font-family: 'Courier New', Courier, monospace; font-size: 12px; font-weight: normal; } |