[Scummvm-cvs-logs] CVS: web/include html.php,1.25,1.26 menu.php,1.9,1.10 scr-categories.php,1.3,1.4

Eugene Sandulenko sev at users.sourceforge.net
Wed Nov 30 17:31:30 CET 2005


Update of /cvsroot/scummvm/web/include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2858/include

Modified Files:
	html.php menu.php scr-categories.php 
Log Message:
o Made all pages really movable, i.e. added $file_root everywhere
o Unified navigation items for code simplicity
o Transferred "The inComplete SCUMM Reference Guide" to new layout


Index: html.php
===================================================================
RCS file: /cvsroot/scummvm/web/include/html.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- html.php	26 Nov 2005 19:52:45 -0000	1.25
+++ html.php	1 Dec 2005 01:30:38 -0000	1.26
@@ -8,7 +8,8 @@
 <html lang="en">
 	<head>
 		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-		<link rel="stylesheet" href="./style.css" type="text/css">
+		<link rel="stylesheet" href="<?=$file_root?>/style.css" type="text/css">
+
 <?php
   foreach ($extra_css as $css_file) {
     echo '<link rel="stylesheet" href="./' . $css_file . '" type="text/css">'."\n";
@@ -25,8 +26,9 @@
 	<table class="main-container" width="90%" cellspacing="0" cellpadding="0" align="center">
 		<tr>
 			<td colspan="2"><table cellspacing="0" cellpadding="0" style="width:100%;">
-					<tr><td rowspan="2" width="287"><img alt="ScummVM logo" src="images/scummvm_logo.jpg" width="287" height="118" border="0" /></td>
-					<td rowspan="2" style="background:url('images/bg-upper.gif')"> </td>
+	    <tr><td rowspan="2" width="287"><img alt="ScummVM logo" src="<?=$file_root?>/images/scummvm_logo.jpg" width="287" height="118" border="0" /></td>
+	    <td rowspan="2" style="background:url('<?=$file_root?>/images/bg-upper.gif')"> </td>
+
 					<td width="483">
 
 <?php
@@ -35,12 +37,12 @@
 
 $randImg = rand(0, count($heroes) - 1);
 
-echo '<img alt="Game characters" src="images/'.$heroes[$randImg].'" height="89" />';
+echo '<img alt="Game characters" src="'.$file_root.'/images/'.$heroes[$randImg].'" height="89" />';
 
 ?>
 </td>
 					</tr>
-					<tr><td width="483"><img alt="Script creation utility for Maniac Mansion Virtual Machine" src="images/scummvm-caption.png" height="29" /></td>
+    <tr><td width="483"><img alt="Script creation utility for Maniac Mansion Virtual Machine" src="<?=$file_root?>/images/scummvm-caption.png" height="29" /></td>
 					<td width="24"> </td></tr>
 				</table>
 			</td>
@@ -59,15 +61,15 @@
 <tr><td style="padding-left:8px;padding-right:8px;">
 	<table width="100%" cellspacing="0" cellpadding="0">
 		<tr>
-		<td width="8" style="background:url('images/header-left-corner.gif');height:28px;"> </td>
-		<td style="background:url('images/header-background.gif')"><h2 style="margin:0px;color:#356a02;font-weigth:bold;padding-left:1em;
+    <td width="8" style="background:url('<?=$file_root?>/images/header-left-corner.gif');height:28px;"> </td>
+    <td style="background:url('<?=$file_root?>/images/header-background.gif')"><h2 style="margin:0px;color:#356a02;font-weigth:bold;padding-left:1em;
 			font-family:Trebuchet MS,Verdana,Tahoma;font-size:18px;color:#821d06">
 <?php
 shadowed_text($title, '#821d06', '#ffffff');
 ?>
 
 </h2></td>
-		<td width="8" style="background:url('images/header-right-corner.gif');height:28px;"> </td>
+  <td width="8" style="background:url('<?=$file_root?>/images/header-right-corner.gif');height:28px;"> </td>
 	</tr></table>
 </td></tr>
 <tr><td style="padding-left:8px;padding-right:8px;"><table width="100%" cellspacing="0"><tr><td style="border-left:1px solid #ebb716;border-right:1px solid #ebb716;padding:12px;background:#fff;">
@@ -79,9 +81,9 @@
 	</td></tr></table></td>
 <tr>
 	<td style="padding-left:8px;padding-right:8px;"><table width="100%" cellspacing="0" cellpadding="0"><tr>
-	<td width="8" style="height:28px;background:url('images/left-low-corner.gif')"> </td>
+	<td width="8" style="height:28px;background:url('<?=$file_root?>/images/left-low-corner.gif')"> </td>
 	<td style="border-bottom:1px solid #ebb716;text-align:right;background:#fff;"> </td>
-	<td width="8" style="background:url('images/right-low-corner.gif')"> </td>
+	<td width="8" style="background:url('<?=$file_root?>/images/right-low-corner.gif')"> </td>
 	</tr></table></td>
 </tr>
 </table>
@@ -101,7 +103,7 @@
 
 
 		</tr><tr><td class="menus" style="vertical-align:bottom;" >
-		<img src="images/tentacle1.gif" style="vertical-align:bottom;" alt="Tentacle" />
+		<img src="<?=$file_root?>/images/tentacle1.gif" style="vertical-align:bottom;" alt="Tentacle" />
 		</td>
 		</tr>
 
@@ -130,13 +132,13 @@
 	</tr>
 <!-- </td></tr> -->
 	</table>
-</td><td class="menus" style="width:163px;vertical-align:top;border:0px;" rowspan="2"><img src="images/tentacle2.gif" style="margin:0px;border:0px;
+</td><td class="menus" style="width:163px;vertical-align:top;border:0px;" rowspan="2"><img src="<?=$file_root?>/images/tentacle2.gif" style="margin:0px;border:0px;
 	vertical-align:bottom" alt="" /></td>
 </tr><tr>
 <td colspan="2">
 <table width="100%" cellspacing="0" style="padding:0px;">
 <tr>
-<td width="12" style="height:5px;line-height:5px;width:12px;"><img alt="" src="images/content-left-bottom.gif" height="12" width="12"></td>
+<td width="12" style="height:5px;line-height:5px;width:12px;"><img alt="" src="<?=$file_root?>/images/content-left-bottom.gif" height="12" width="12"></td>
    <td style="background:#fbf1ce;line-height:2px;">  </td>
 </tr></table>
 </tr>
@@ -150,7 +152,7 @@
 					things are registered trademarks of <a href="http://www.lucasarts.com/">LucasArts, Inc.</a>. 
 					All other trademarks and registered trademarks are owned by their respective companies. ScummVM is 
 					not affiliated in any way with LucasArts, Inc.</td>
-					<td width="110"><img src="images/tentacle3.gif" alt="" /></td>
+					<td width="110"><img src="<?=$file_root?>/images/tentacle3.gif" alt="" /></td>
 					<td width="29"> </td> 
 				</tr>
 			</table>
@@ -271,4 +273,10 @@
 <?php
 }
 
+function html_nav_item($href, $text) {
+  global $file_root;
+
+  echo "  <tr><td class='nav-bullet'><img src='$file_root/images/bullet-section.gif' alt='*' /></td><td class='nav-item'><a href='$href'>$text</a></td></tr>\n";
+}
+
 ?>

Index: menu.php
===================================================================
RCS file: /cvsroot/scummvm/web/include/menu.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- menu.php	13 Nov 2005 02:01:52 -0000	1.9
+++ menu.php	1 Dec 2005 01:30:38 -0000	1.10
@@ -2,11 +2,12 @@
 class htmlmenu {
 
   function htmlmenu($name, $style, $extra = "") {
+    global $file_root;
     echo '<table class="menu" cellspacing="0">';
 ?>
   <tfoot>
     <tr>
-      <td><img src="images/menu-bottom.gif" alt="" /></td>
+      <td><img src="<?=$file_root?>/images/menu-bottom.gif" alt="" /></td>
     </tr>
 
 <?php

Index: scr-categories.php
===================================================================
RCS file: /cvsroot/scummvm/web/include/scr-categories.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- scr-categories.php	13 Nov 2005 14:58:53 -0000	1.3
+++ scr-categories.php	1 Dec 2005 01:30:38 -0000	1.4
@@ -4,11 +4,11 @@
 
 function display_categories_list() {
   global $categories;
+  global $file_root;
 
   echo "<table border=0>\n";
   foreach ($categories as $cat) {
-    echo "<tr><td class='nav-bullet'><img src='images/bullet-section.gif' alt='*' /></td><td class='nav-item'><a href=\"#cat".
-	$cat->_catnum.'">'.$cat->_name."</a></td></tr>\n";
+    html_nav_item("#cat".$cat->_catnum, $cat->_name);
   }
   echo "</table>\n";
 }
@@ -50,10 +50,11 @@
 
   function display() {
     global $scrcatnums;
+    global $file_root;
 
     echo "<table border=0>\n";
     foreach($this->_list as $cat) {
-      echo "<tr><td class='cat-bullet'><img src='images/".$cat['filename'].
+      echo "<tr><td class='cat-bullet'><img src='$file_root/images/".$cat['filename'].
       	"' alt=\"\" /></td><td class='cat-link'><a href=\"?cat1=".$this->_catnum."&cat2=".$cat['catnum']."&view=-1\">".
       	"<b>{$cat['description'][0]}</b>".substr($cat['description'], 1).
       	"</a> <font class='cat-count'>(".$scrcatnums[$this->_catnum][$cat['catnum']]." shots)</font></td></tr>\n";





More information about the Scummvm-git-logs mailing list