[phpcvsview-cvs-updates] phpcvsview/Themes/Blue theme.php,1.1,1.2
Status: Pre-Alpha
Brought to you by:
bcheesem
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"; |