[Scummvm-cvs-logs] CVS: web/include html.php,1.18,1.19 incl.php,1.1.1.1,1.2 menu.php,1.6,1.7 screenshots.php,1.1,1.2 sidebar.php,1.27,1.28 util.php,1.1.1.1,1.2 config.php,1.1.1.1,NONE

Eugene Sandulenko sev at users.sourceforge.net
Sat Nov 12 16:31:03 CET 2005


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

Modified Files:
	html.php incl.php menu.php screenshots.php sidebar.php 
	util.php 
Removed Files:
	config.php 
Log Message:
New website design.


Index: html.php
===================================================================
RCS file: /cvsroot/scummvm/web/include/html.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- html.php	29 Oct 2005 20:11:06 -0000	1.18
+++ html.php	13 Nov 2005 00:29:58 -0000	1.19
@@ -1,23 +1,167 @@
 <?php
 
-/*
- * HTML lib for ScummVM
- * by Jeremy Newman <jnewman at dracowulf.com>
- *
- */
- 
-$_trcolor = 0;
+function html_page_header($title, $extra = "") {
+  global $file_root;
 
-// Set the current Indent Level
-function do_indent ($str, $v = 0)
-{
-	return $str;
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
+	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="en">
+	<head>
+		<link rel="stylesheet" href="./style.css" type="text/css">
+<?php
+  echo '<link rel="SHORTCUT ICON" HREF="'.$file_root.'/favicon.ico" />';
+  echo '<link rel="ICON" HREF="'.$file_root.'/favicon.ico" />';
+  echo "<title>$title</title>\n";
+  echo "$extra\n";
+?>
+	</head>
+	<body>
+
+        <!-- HTML/CSS coding by Jaroslaw Fedevich jaroslaw at nospam.kiev.ua -->
+
+	<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.png" width="287" height="118" border="0" /></td>
+					<td rowspan="2" style="background:url('images/bg-upper.gif')"> </td>
+					<td width="483">
+
+<?php
+
+$heroes = get_files($file_root."/images", null, "(heroes.+\\.png)");
+
+$randImg = rand(0, count($heroes) - 1);
+
+echo '<img alt="Game characters" src="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>
+					<td width="24"> </td></tr>
+				</table>
+			</td>
+		</tr>
+		<tr>
+			<td class="content" valign="top" rowspan="2" style="padding-right:1px;">
+
+<?php
+    }
+
+
+function html_content_begin($title) {
+?>
+
+<table style="margin:0px;margin-top:0px;width:100%;" cellspacing="0" cellpadding="0">
+<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;
+			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>
+	</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;">
+<?php
+}
+
+function html_content_end() {
+?>
+	</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 style="border-bottom:1px solid #ebb716;text-align:right;background:#fff;"> </td>
+	<td width="8" style="background:url('images/right-low-corner.gif')"> </td>
+	</tr></table></td>
+</tr>
+</table>
+
+<?php
+}
+
+function html_page_footer() {
+  global $file_root;
+
+?>
+			</td>
+<?php
+  sidebar_start();
+  sidebar_end();
+?>
+
+
+		</tr><tr><td class="menus" style="vertical-align:bottom;" >
+		<img src="images/tentacle1.gif" style="vertical-align:bottom;" />
+		</td>
+		</tr>
+
+<tr><td colspan="2">
+<table width="100%" cellspacing="0" cellpadding="0" ><!-- class="main-container" -->
+<tr><td style="background:#fbf1ce;height:51px;" colspan=2>
+    <table style="border-spacing:0px;margin:0px;width:80%;margin-left:auto;margin-right:auto;" align="center" cellspacing="0"><!-- width="80%" -->
+	<tr>
+		<td>
+		<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="margin:0px;"><div>
+		<input type="hidden" name="cmd" value="_xclick">
+		<input type="hidden" name="business" value="paypal at enderboi.com">
+		<input type="hidden" name="item_name" value="ScummVM donation">
+		<input type="image" src="<?=$file_root?>/images/ppdonate.gif" name="submit" alt="Donate to ScummVM with PayPal!">
+		</div></form>	
+		</td>
+		<td>
+			<a href="http://sourceforge.net/"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=37116" width="88" height="31" alt="SourceForge"></a>
+		</td>
+		<td>
+			<a href="http://validator.w3.org/check/referer"><img src="http://www.w3.org/Icons/valid-html401" width="88" height="31" alt="Valid HTML 4.01!"></a>
+		</td>
+		<td>
+			<a href="http://jigsaw.w3.org/css-validator/"><img src="http://jigsaw.w3.org/css-validator/images/vcss" width="88" height="31" alt="Valid CSS!" ></a>
+		</td>
+	</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;
+	vertical-align:bottom" /></td>
+</tr><tr>
+<td colspan="2">
+<table width="100%" cellspacing="0" style="padding:0px;">
+<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 style="background:#fbf1ce;line-height:2px;">  </td>
+</tr></table>
+</tr>
+</table>
+</td>
+</tr>
+		    <tr><td colspan="2">
+			<table width="100%" cellspacing="0">
+				<tr>
+					<td class="legal">LucasArts, Monkey Island, Maniac Mansion, Full Throttle, The Dig, LOOM, and probably lots of other 
+					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" /></td>
+					<td width="29"> </td> 
+				</tr>
+			</table>
+		</td></tr>
+		</table>
+	</body>
+</html>
+
+<?php
 }
 
-// HTML BR
 function html_br ($count = 1)
 {
-	return do_indent(str_repeat("<br>\n", $count));
+	return str_repeat("<br>\n", $count);
 }
 
 // HTML A HREF
@@ -28,53 +172,33 @@
 	{	
 		if (ereg("@",$url))
 		{
-			return do_indent(" <a href=\"mailto:$url\" $extra>$url</a> ");
+			return " <a href=\"mailto:$url\" $extra>$url</a> ";
 		}
 		else
 		{
-			return do_indent(" <a href=\"$url\" $extra>$url</a> ");
+			return " <a href=\"$url\" $extra>$url</a> ";
 		}
 	}
 	else if (!$label)
 	{
-		return do_indent("   ");
+		return "   ";
 	}
 	else
 	{
-		return do_indent(" <a href=\"$url\" $extra>$label</a> ");
+		return " <a href=\"$url\" $extra>$label</a> ";
 	}
 }
 
-// HTML echo a string
-function html_echo ($str)
-{
-	return do_indent($str);
-}
-
-// HTML B (bold)
-function html_b ($str)
-{
-	return do_indent("<b>$str</b>");
-}
-
-// HTML SMALL (small text)
-function html_small ($str)
-{
-	return do_indent("<small>$str</small>");
-}
-
 // HTML P
 function html_p ($str = " ", $extra = null)
 {
-	return do_indent("<p $extra>$str</p>");
+	return "<p $extra>$str</p>";
 }
 
-// HTML blockquote
 function html_blockquote ($str = " ")
 {
-	return do_indent('<div style="margin-left: 3em;">'.$str.'</div>');
+	return '<div style="margin-left: 3em;">'.$str.'</div>';
 }
-
 // Draw a Colored Pixel Line
 function html_line ($width = "100%", $height = 1, $color = "grey")
 {
@@ -112,63 +236,16 @@
 	return $str;
 }
 
-function html_round_frame_start ($title = "", $extra = "")
-{
-	global $file_root;
-
-	$str = "<div class='frame'>\n";
-	
-	if ($title) {
-		$str .= '<div class="frameTop"><div class="cornerLeft"><div class="cornerRight">';
-		$str .= '<span class="frameTitle">'.$title.'</span>';
-		$str .= '</div></div></div>'."\n";
-	}
-	
-	$str .= "<div class='frameBody' style='background-color: #ffffff'>\n";
-//	$str .= '<table width="100%" border="0" cellpadding='.$innerPad.' cellspacing=1 '.$extra.'><tr><td class="color2">'."\n";
-
-	return $str;
-}
-
-function html_round_frame_end ($text = " ")
-{
-	global $file_root;
-	$str = "</div>\n";
-//	$str .= '</td></tr></table>'."\n";
-	if ($text) {
-		$str .= '<div class="frameBottom"><div class="cornerLeft"><div class="cornerRight">';
-		$str .= '<span class="frameTitle">'.$text.'</span>';
-		$str .= '</div></div></div>'."\n";
-	}
-	$str .= "</div>\n\n";
-	return $str;
-}
-
-function html_frame_row_color ($text = " ")
-{
-    global $_trcolor;
-    if ($_trcolor % 2 == 1) { $trcolor = 'color2'; } else { $trcolor = 'color1'; }
-    $str = '<tr class="'.$trcolor.'"><td>'.$text.'</td></tr>'."\n";
-    $_trcolor++;
-    return $str;
-}
-
-function html_frame_row ($text = " ", $extra = null)
-{
-    $str = '<tr class=color2 '.$extra.'><td>'.$text.'</td></tr>'."\n";
-    return $str;
-}
-
 function html_frame_tr ($td = "<td> </td>", $color = "color2", $extra = null)
 {
     $str = '<tr valign="top" class="'.$color.'" '.$extra.'>'."\n".$td.'</tr>'."\n";
-    return do_indent($str);
+    return $str;
 }
 
 function html_frame_td ($txt = " ", $extra = null)
 {
     $str = '<td '.$extra.'>'.$txt.'</td>'."\n";
-    return do_indent($str);
+    return $str;
 }
 
 function html_back_link ($howmany = 1, $url = "")
@@ -180,154 +257,15 @@
 	return '<p>   <a href="'.$url.'"><< Back</a></p>'."\n";
 }
 
-function html_form_start ($script, $name, $method = "post")
-{
-	$str = '<form name="'.$name.'" action="'.$script.'" method="'.$method.'">'."\n";
-	return $str;
-}
-
-function html_form_end ()
-{
-	return '</form>'."\n";
-}
-
-function html_form_input_text ($name, $size = 20, $value = "")
-{
-	$str = '<input type=text name="'.$name.'" size="'.$size.'" value="'.$value.'">'."\n";
-	return $str;
-}
-
-function html_form_input_password ($name, $size = 20, $value = "")
-{
-	$str = '<input type=password name="'.$name.'" size="'.$size.'" value="'.$value.'">'."\n";
-	return $str;
-}
-
-function html_form_input_hidden ($name, $value = "")
-{
-	$str = '<input type=hidden name="'.$name.'" value="'.$value.'">'."\n";
-	return $str;
-}
-
-function html_form_input_textarea ($name, $cols = 20, $rows = 5, $value = "")
-{
-	$str = '<textarea name="'.$name.'" cols="'.$cols.'" rows="'.$rows.'">'.$value.'</textarea>'."\n";
-	return $str;
-}
-
-function html_form_input_select ($name, $options, $selected = "")
-{
-	$str = '<select name="'.$name.'">'."\n";
-	while(list($key, $val) = each($options))
-	{	
-		if ($key == $selected)
-		{
-			$str .= '<option value="'.$key.'" selected>'.$val.'</option>'."\n";
-		} else {
-			$str .= '<option value="'.$key.'">'.$val.'</option>'."\n";		
-		}
-	}
-	$str .= '</select>'."\n";
-	return $str;
-}
-
-function html_form_input_checkbox ($name, $checked = null)
-{
-	if ($checked == 1)
-		$str = '<input type="checkbox" name="'.$name.'" checked>'."\n";
-	else
-		$str = '<input type="checkbox" name="'.$name.'">'."\n";
-	return $str;	
-}
-
-function html_form_submit ($value = "")
-{
-	$str = '<input type=submit name="submit" value="'.$value.'">'."\n";
-	return $str;
-}
-
-function html_form_js_button ($url = null)
-{
-	global $PHP_SELF;
-	if (!$url) { $url = $PHP_SELF; }
-	$str = '<input type=button value=" << Back " name="jsback" onClick="javascript:self.location=\''.$url.'\';">'."\n";
-	return $str;
-}
-
-function html_add_br ($text = "")
-{
-	$text = ereg_replace("\n","<br>\n",$text);
-	return $text;
-}
-
-// url-ify urls
-function html_urlify ($text)
-{
-	$text = htmlspecialchars($text);
-
-	$urlreg = "([a-zA-Z]+://([^\t\r\n ]+))";
-	if (ereg($urlreg,$text))
-	{
-		$text = ereg_replace($urlreg, "<a href=\"\\1\"> \\2 </a>", $text);
-	}
-	
-	$emailreg = "([a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+)";
-	if (ereg($emailreg,$text))
-	{
-		$text = ereg_replace($emailreg, "<a href='mailto:\\1'>\\1</a>", $text);
-	}
-
-	return $text;
-}
-
-// simple httpd header redirect 
-function redirect ($url = ".")
-{
-	header("Location: ".$url);
-}
-
-
-function html_header ($title, $extra = "")
-{
-	global $file_root;
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-
-<head>
-	<title><?=$title?></title>
-	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-	<meta name="author" content="Jeremy Newman <jnewman at dracowulf.com>">
-	<link rel="stylesheet" href="<?=$file_root?>/styles.css" type="text/css">
-	<?=$extra?>
-</head>
-
-<body>
-
-<div style="width: 100%; height: 111px; background-image:url(<?=$file_root?>/images/scummvm_top_tile.png)">
-	<img src="<?=$file_root?>/images/scummvm_logo.png"  width="407" height="111" alt="ScummVM" style="float: left">
-	<img src="<?=$file_root?>/images/scummvm_chars.png" width="193" height="111" alt="-" style="float: right">
-</div>
-<?
-}
-
-function html_footer ()
-{
+function html_subhead_start($subhead) {
 ?>
-
-<div id="copyright">
-LucasArts, Monkey Island, Maniac Mansion, Full Throttle,
-The Dig, LOOM, and probably lots of other 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.
-</div>
-
-</body>
-</html>
-<?
-
+    <div class="par-subhead">
+    <?php echo $subhead; ?>
+    </div>
+    <div class="par-subhead-dots">
+	 
+    </div>
+<?php
 }
 
 ?>

Index: incl.php
===================================================================
RCS file: /cvsroot/scummvm/web/include/incl.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- incl.php	5 Mar 2002 21:40:09 -0000	1.1.1.1
+++ incl.php	13 Nov 2005 00:29:58 -0000	1.2
@@ -1,19 +1,12 @@
 <?
-
-/*
- * Main lib for ScummVM
- * by Jeremy Newman <jnewman at dracowulf.com>
- *
- */
-
 //set global path
 global $file_root;
 
 //get modules
-require($file_root."/include/"."config.php");
 require($file_root."/include/"."html.php");
 require($file_root."/include/"."menu.php");
 require($file_root."/include/"."sidebar.php");
 require($file_root."/include/"."util.php");
+require($file_root."/include/"."screenshots.php");
 
 ?>

Index: menu.php
===================================================================
RCS file: /cvsroot/scummvm/web/include/menu.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- menu.php	14 Oct 2003 11:01:45 -0000	1.6
+++ menu.php	13 Nov 2005 00:29:58 -0000	1.7
@@ -1,36 +1,51 @@
 <?
-
-/*
- * Menu class for ScummVM
- * by Jeremy Newman <jnewman at dracowulf.com>
- *
- */
- 
 class htmlmenu {
 
-    function htmlmenu($name)
-    {
-		echo "<div class='sideMenu'>";
-		echo "<div class='header'><div class='headerRight'>".$name."</div></div>";
-    }
+  function htmlmenu($name, $style) {
+    echo '<table class="menu" cellspacing="0">';
+    echo '<tr class="'.$style.'">';
+    echo "  <th>$name</th>";
+?>
 
-    /* add a table row */
-    function add($name, $url = null)
-    {
-		echo '<div class="item">';
-		if($url) {
-			echo "<a href='$url'>$name</a>";
-		} else {
-			echo "$name";
-		}
-		echo "</div>\n";
-    }
+  </tr>
+  <tbody>
+    <tr>
+      <td>
+        <ul>
+<?php
+ }
 
-    function done($extra = "")
-    {
-		echo "<div class='footer'><div class='footerRight'> </div></div></div>\n";
-		echo $extra;
-		echo "<br>\n";
-    }
+ /* add a table row */
+ function add($name, $url = null) {
+   if($url) {
+     echo "          <li><a href='$url'><b>{$name[0]}</b>".substr($name, 1)."</a></li>";
+   } else {
+     echo "          <li><b>{$name[0]}</b>".substr($name, 1)."</li>";
+   }
+ }
+
+ function done($extra = "") {
+?>
+        </ul>
+      </td>
+    </tr>
+  </tbody>
+  <tfoot>
+    <tr>
+      <td><img src="images/menu-bottom.gif" /></td>
+    </tr>
+
+<?php
+     if ($extra) {
+       echo "<tr><td>$extra</td></tr>\n";
+     }
+?>
+
+
+  </tfoot>
+</table>
+
+<?php
+ }
 }
 ?>

Index: screenshots.php
===================================================================
RCS file: /cvsroot/scummvm/web/include/screenshots.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- screenshots.php	26 Jun 2005 11:19:44 -0000	1.1
+++ screenshots.php	13 Nov 2005 00:29:58 -0000	1.2
@@ -1,35 +1,84 @@
 <?php
 
-function screenshot_path ($id)
-{
-	global $file_root;
-	return $file_root . "/screenshots/big_scummvm_" . $id . ".png";
+function screenshot_path ($id) {
+  global $file_root;
+  return $file_root . "/screenshots/big_scummvm_" . $id . ".png";
 }
 
-function screenshot_thumb_path ($id)
-{
-	global $file_root;
-	return $file_root . "/screenshots/scummvm_" . $id . ".jpg";
+function screenshot_thumb_path ($id) {
+  global $file_root;
+  return $file_root . "/screenshots/scummvm_" . $id . ".jpg";
 }
 
-function screenshot_caption ($id)
-{
-	global $file_root;
-	return implode("", file($file_root."/screenshots/scummvm_".$id.".txt"));
+function screenshot_thumb_from_full ($fname) {
+  $t = explode("scummvm_", $fname);
+  $t1 = explode(".", $t[1]);
+
+  return screenshot_thumb_path($t1[0]);
+}
+
+function getScr($n) {
+  global $categories;
+  global $scrcatnums;
+  $scr_cats = array();
+  $cat0 = 0;
+  $cat1 = 0;
+  $cat2 = 0;
+  $curnum = 0;
+  $idx = 0;
+
+  foreach ($categories as $i) {
+    foreach ($i->_list as $j)
+      array_push($scr_cats, $scrcatnums[$i->_catnum][$j['catnum']]);
+    array_push($scr_cats, 0);
+  }
+
+
+  while ($curnum < $n) {
+    if ($scr_cats[$idx] == 0) {
+      $idx++;
+    }
+
+    if ($curnum + $scr_cats[$idx] <= $n) {
+      $curnum += $scr_cats[$idx];
+      $cat1++;
+      $idx++;
+    } else {
+      $cat2 = $n - $curnum;
+      $curnum = $n;
+    }
+    if ($cat1 >= count($categories[$cat0]->_list)) {
+      $cat1 = 0;
+      $cat0++;
+    }
+  }
+
+  return "scummvm_{$categories[$cat0]->_catnum}_{$categories[$cat0]->_list[$cat1]['catnum']}_{$cat2}.jpg";
+}
+
+function screenshot_caption ($id) {
+  global $file_root;
+  return implode("", file($file_root."/screenshots/scummvm_".$id.".txt"));
 }
 
 
 // Grab list of images from screenshot dir
 // and loop through them and add to $screenshots array
 $screenshots = array();
-$tmp = get_files($file_root."/screenshots","jpg");
-while (list($key,$image) = each($tmp))
-{
-	array_push($screenshots,$image);
+$scrcatnums = array();
+$tmp = get_files($file_root."/screenshots","png");
+foreach ($tmp as $image) {
+  array_push($screenshots,$image);
+  $cats = explode("_", $image);
+  $n = count($cats);
+  $t = explode(".", $cats[$n - 1]);
+  $num = $t[0];
+  if ($scrcatnums[$cats[$n - 3]][$cats[$n - 2]] < $num + 1)
+    $scrcatnums[$cats[$n - 3]][$cats[$n - 2]] = $num + 1;
 }
 $screenshots_count = count($screenshots);
 
 $thumb_w = 256;
 $thumb_h = 192;
 
-?>
\ No newline at end of file
+?>

Index: sidebar.php
===================================================================
RCS file: /cvsroot/scummvm/web/include/sidebar.php,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- sidebar.php	30 Oct 2005 15:43:12 -0000	1.27
+++ sidebar.php	13 Nov 2005 00:29:58 -0000	1.28
@@ -1,107 +1,56 @@
 <?
 
-/*
- * SideBar lib for ScummVM
- * by Jeremy Newman <jnewman at dracowulf.com>
- *
- */
-  
-function sidebar_start ($specs_mode = false)
-{
+function sidebar_start () {
   
     global $file_root;
 
-// It would be nice to use a plain simple <div> here, for maximum layout 
-// flexibility. Sadly, due to a bug in Internet Explorer 6, we can't do this
-// (at least not as long as we want the page to render correctly in IE 6).
-// So we resort to using a table with two columns and one row.
-
 ?>
-
-<table border=0 cellpadding=0 cellspacing=0><tr><td id=sideBar>
-
+<td class="menus">
 <?
 
-	if ($specs_mode) {
-		$g = new htmlmenu("Contents");
-		$g->add("Introduction", $file_root."/docs/specs/"."introduction.php");
-		$g->add("CHAR", $file_root."/docs/specs/"."char.php");
-		$g->add("AARY", $file_root."/docs/specs/"."aary.php");
-		$g->add("SCRP", $file_root."/docs/specs/"."scrp.php");
-		$g->add("V5 opcode list", $file_root."/docs/specs/"."scrp-v5.php");
-		$g->add("V6 opcode list", $file_root."/docs/specs/"."scrp-v6.php");
-		$g->add("Glossary", $file_root."/docs/specs/"."glossary.php");
-	
-		$g->done();
-	}
-
-
-	$g = new htmlmenu("Main Menu");
-
-	$g->add("Home", $file_root);
-	$g->add("ScreenShots", $file_root."/screenshots.php");
-	$g->add("Forums", "http://forums.scummvm.org/");
-	$g->add("Downloads", $file_root."/downloads.php");
-
-	$g->done();
-
-	$g = new htmlmenu("Documentation");
-	$g->add("FAQ", $file_root."/faq.php");
-	$g->add("Documentation", $file_root."/documentation.php");
-	$g->add("Compatibility", $file_root."/compatibility.php");
-	$g->add("Wiki", "http://wiki.scummvm.org/");
-	$g->add("Credits", $file_root."/credits.php");
-
-	$g->done();
-
-	$g = new htmlmenu("SourceForge Menu");
-
-	$g->add("Project Home", "http://sourceforge.net/projects/scummvm/");
-	$g->add("Bug Tracking", "http://sourceforge.net/tracker/?group_id=37116&atid=418820");
-	$g->add("Daily Snapshots", "/daily/");
-	$g->add("CVS Tree", "http://cvs.sourceforge.net/viewcvs.py/scummvm/scummvm/");
+   $g = new htmlmenu("Main Menu", "menu-main");
+    
+    $g->add("Home", $file_root);
+    $g->add("ScreenShots", $file_root."/screenshots.php");
+    $g->add("Forums", "http://forums.scummvm.org/");
+    $g->add("Downloads", $file_root."/downloads.php");
 
-	$g->done();      
+    $g->done();
 
-	$g = new htmlmenu("Misc. Menu");
+    $g = new htmlmenu("Documentation", "menu-docs");
+    $g->add("FAQ", $file_root."/faq.php");
+    $g->add("Documentation", $file_root."/documentation.php");
+    $g->add("Compatibility", $file_root."/compatibility.php");
+    $g->add("Wiki", "http://wiki.scummvm.org/");
+    $g->add("Credits", $file_root."/credits.php");
+    
+    $g->done();
 
-	$g->add("Subprojects", $file_root."/subprojects.php");
-	$g->add("Demos", $file_root."/demos.php");
-	$g->add("Press Coverage", $file_root."/press.php");
-	$g->add("Contact", $file_root."/contact.php");
-	$g->add("Links", $file_root."/links.php");
+    $g = new htmlmenu("SourceForge Menu", "menu-sf");
 
-	$g->done('<img src="'.$file_root.'/images/hangmonk.gif" alt="monkey">');
- 
-?>
+    $g->add("Project Home", "http://sourceforge.net/projects/scummvm/");
+    $g->add("Bug Tracking", "http://sourceforge.net/tracker/?group_id=37116&atid=418820");
+    $g->add("Daily Snapshots", "/daily/");
+    $g->add("CVS Tree", "http://cvs.sourceforge.net/viewcvs.py/scummvm/scummvm/");
 
-	<form action="https://www.paypal.com/cgi-bin/webscr" method="post"><div>
-	<input type="hidden" name="cmd" value="_xclick">
-	<input type="hidden" name="business" value="paypal at enderboi.com">
-	<input type="hidden" name="item_name" value="ScummVM donation">
-	<input type="image" src="<?=$file_root?>/images/ppdonate.gif" name="submit" alt="Donate to ScummVM with PayPal!">
-	</div></form>	
-	
-	<p>
-		<a href="http://sourceforge.net/"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=37116" width="88" height="31" alt="SourceForge"></a>
-	</p>
+    $g->done();      
 
-	<p>
-		<a href="http://validator.w3.org/check/referer"><img src="http://www.w3.org/Icons/valid-html401" width="88" height="31" alt="Valid HTML 4.01!"></a>
-	</p> 
+    $g = new htmlmenu("Misc. Menu", "menu-misc");
 
-	<p>
-		<a href="http://jigsaw.w3.org/css-validator/"><img src="http://jigsaw.w3.org/css-validator/images/vcss" width="88" height="31" alt="Valid CSS!" ></a>
-	</p>
-</td><td id="main">
-<?
+    $g->add("Subprojects", $file_root."/subprojects.php");
+    $g->add("Demos", $file_root."/demos.php");
+    $g->add("Press Coverage", $file_root."/press.php");
+    $g->add("Contact", $file_root."/contact.php");
+    $g->add("Links", $file_root."/links.php");
+    
+    $g->done('<img src="'.$file_root.'/images/hangmonk.gif" alt="monkey" align="right">');
 }
 
 function sidebar_end ()
 {
 ?>
 
-</td></tr></table>
+</td>
 
 <?
 }

Index: util.php
===================================================================
RCS file: /cvsroot/scummvm/web/include/util.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- util.php	5 Mar 2002 21:40:09 -0000	1.1.1.1
+++ util.php	13 Nov 2005 00:29:58 -0000	1.2
@@ -62,26 +62,47 @@
 }
 
 // get a list of files in a directory
-function get_files ($dir, $filter = null)
-{
-    // read dir
-    $files = array();
-    $d = opendir($dir);
-    while($entry = readdir($d))
-    {
-    	if ($filter)
-	{
-	    if(!eregi("(.+)\\.".$filter, $entry))
-	        continue;
-	}
-    	array_push($files, $entry);
+function get_files ($dir, $filter = null, $filter2 = null) {
+  $flt = null;
+  if ($filter2)
+    $flt = $filter2;
+  else if ($filter)
+    $flt = "(.+)\\.".$filter;
+
+  // read dir
+  $files = array();
+  $d = opendir($dir);
+  while($entry = readdir($d)) {
+    if ($flt) {
+      if(!eregi($flt, $entry))
+	continue;
     }
-    closedir($d);
+    array_push($files, $entry);
+  }
+  closedir($d);
     
-    //sort dir
-    sort($files);
+  //sort dir
+  sort($files);
     
-    return $files;
+  return $files;
+}
+
+$isOpera = strstr($_SERVER['HTTP_USER_AGENT'], 'Opera');
+$isKHTML = strstr($_SERVER['HTTP_USER_AGENT'], 'KHTML');
+
+function shadowed_text ($text, $textcolor, $shadowcolor, $textclass = 'shadow-text') {
+  global $isKHTML;
+
+  if ($isKHTML) {
+    // Use the CSS3 text-shadow property for Safari and Konqueror
+    echo '<span class="shadow-container"><font color="' . $textcolor .
+         '" style="text-shadow: 0.1em 0.1em ' . $shadowcolor . '">'.
+         $text.'</font></span>';
+    return;
+  }
+
+  echo '<font color="'.$shadowcolor.'"><span class="shadow-container">'.$text.
+    '<font color="'.$textcolor.'" class="'.$textclass.'">'. $text . '</font></span></font>';
 }
 
 ?>

--- config.php DELETED ---





More information about the Scummvm-git-logs mailing list