[Scummvm-cvs-logs] CVS: web screenshots.php,1.1.1.1,1.2

Max Horn fingolfin at users.sourceforge.net
Sat Jul 12 10:09:13 CEST 2003


Update of /cvsroot/scummvm/web
In directory sc8-pr-cvs1:/tmp/cvs-serv5517

Modified Files:
	screenshots.php 
Log Message:
fixed alt attributes; renamed x -> offset; slightly more secure handling of view; removed some whitespaces at line ends

Index: screenshots.php
===================================================================
RCS file: /cvsroot/scummvm/web/screenshots.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- screenshots.php	5 Mar 2002 21:39:37 -0000	1.1.1.1
+++ screenshots.php	12 Jul 2003 17:08:32 -0000	1.2
@@ -22,7 +22,7 @@
 	<p>
 	  <big><b>Screenshots</b></big><br>
 	  <? echo html_line(); ?>
-	</p>	
+	</p>
 
 <?
 
@@ -30,22 +30,30 @@
 // if in single view
 if ($view)
 {
-	echo html_frame_start("Screenshot Viewer","540",2,0,"color0"),
+	if (!is_numeric($view))
+	{
+		echo "<h1>Error: Unknown image ID</h1>";
+	}
+	else
+	{
+		echo
+		 html_frame_start("Screenshot Viewer","540",2,0,"color0"),
 	     html_frame_tr(
 	     		   html_frame_td(
-			   		 '<img src="'.$file_root.'/screenshots/'.$view.'.png" '.
+			   		 '<img src="'.$file_root.'/screenshots/big_scummvm_'.$view.'.png" '.
 				         'border=0 vspace=2 hspace=2 width=640 height=400 '.
-				         'alt="'.$view.'">',
+				         'alt="Screenshot '.$view.'">',
 					 'align=center class="color0"'
 					)
 	                  ),
 	     html_frame_tr(
 	     		   html_frame_td(
-			   		 html_ahref("  << Back",$PHP_SELF."?x=".$x,"class=menuItem"),
+			   		 html_ahref("  << Back",$PHP_SELF."?offset=".$offset,"class=menuItem"),
 					 'align=left class="color4"'
 			   		)
-	     		  ),		  
-	     html_frame_end();	
+	     		  ),
+	     html_frame_end();
+	}
 }
 else
 {
@@ -72,15 +80,15 @@
 	while (list($c,$image) = each($shots))
 	{
 		// do not show images less than current pos
-		if ($x > $c)
+		if ($offset > $c)
 		  continue;
 
 		// display image
 		echo html_frame_td(
-				   '<a href="'.$PHP_SELF."?view=big_scummvm_".$c.'&x='.$x.'">'.
+				   '<a href="'.$PHP_SELF."?view=".$c.'&offset='.$offset.'">'.
 				   '<img src="'.$file_root.'/screenshots/scummvm_'.$c.'.png" '.
 				   'border=0 vspace=10 hspace=10 width=256 height=160 '.
-				   'alt="'.$image.'"></a>',
+				   'alt="Screenshot '.$c.'"></a>',
 				   'align=center class="color0"'
 				  );
 
@@ -107,18 +115,18 @@
 	$nextLink = " ";
 
 	// display prev link
-	if ($x)
+	if ($offset)
 	{
-		$prev = $x - 4;
-		$prevLink = html_ahref("<< Prev 4 Images",$PHP_SELF."?x=".$prev,"class=menuItem");
+		$prev = $offset - 4;
+		$prevLink = html_ahref("<< Prev 4 Images",$PHP_SELF."?offset=".$prev,"class=menuItem");
 
 	}
 
 	// display next link
-	if (($x + 4) < $total)
+	if (($offset + 4) < $total)
 	{
 		$next = $where + 1;
-		$nextLink = html_ahref("Next 4 Images >>",$PHP_SELF."?x=".$next,"class=menuItem");
+		$nextLink = html_ahref("Next 4 Images >>",$PHP_SELF."?offset=".$next,"class=menuItem");
 	}
 
 	echo html_frame_tr(
@@ -127,12 +135,12 @@
 			    "color4"
 			  );
 	echo html_frame_end();
-	
+
 //end view
 }
 
 // close table
-echo html_p();		  
+echo html_p();
 echo html_round_frame_end(" ");
 
 // end of html





More information about the Scummvm-git-logs mailing list