RANDOM IMAGE BLOCK ERROR

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   RANDOM IMAGE BLOCK ERROR
kidbravo
CZ Super Newbie
 Codezwiz Site Donator
kidbravo has been a member for over 20 year's 20 Year Member
usa.gif california.gif
Age: 47
Gender: Male
Status: Offline
Joined: Aug 29, 2004
0.01 posts per day
Posts: 62
Points: 3,988
   
hello, im trying to install this block and its not working out for me at all...i get this error.....


Parse error: parse error, unexpected T_STRING in /home/virtual/site75/fst/var/www/html/main/blocks/block-Random_Image.php on line 23


Here is exactley what my block looks like....

<?php
/********************************************************/
/* Random Image Block                                   */
/* Version 1.0.0         8-02-04                        */
/* By: Telli (telli@codezwiz.com)                       */
/* http://codezwiz.com/                                 */
/* Copyright © 2001-2004 by Codezwiz                    */
/********************************************************/
if( eregi( "block-Random_Image.php",$PHP_SELF ) ) {
   Header( "Location: index.php" );
   die();
}
function Seed() {
   list($usec, $sec) = explode(' ', microtime());
   return (float) $sec + ((float) $usec * 100000);
}

//Add your image in this format <img src= you can also use links>
function ImageShow($whichimage) {
   switch($whichimage)
   {   
      case 1:
         return "<img src='http://www.wtfvideos.com/main/photos/dive.gif' alt=" align'absmiddle' BORDER=0>";
      break;
      case 2:
         return

      break;
      case 3:
         return "<img src='http://www.wtfvideos.com/main/photos/dive.gif' alt=" align'absmiddle' BORDER=0>";
      break;
      case 4:
         return "<img src='http://www.wtfvideos.com/main/photos/dive.gif' alt=" align'absmiddle' BORDER=0>";
      break;
      case 5:
         return "<img src='http://www.wtfvideos.com/main/photos/dive.gif' alt=" align'absmiddle' BORDER=0>";
      break;
      case 6:
         return "<img src='http://www.wtfvideos.com/main/photos/dive.gif' alt=" align'absmiddle' BORDER=0>";
      break;
      case 7:
         return "<img src='http://www.wtfvideos.com/main/photos/dive.gif' alt=" align'absmiddle' BORDER=0>";
      break;
      case 8:
         return "<img src='http://www.wtfvideos.com/main/photos/dive.gif' alt=" align'absmiddle' BORDER=0>";
      break;
      case 9:
         return "<img src='http://www.wtfvideos.com/main/photos/dive.gif' alt=" align'absmiddle' BORDER=0>";
      break;
      case 10:
         return "<img src='http://www.wtfvideos.com/main/photos/dive.gif' alt=" align'absmiddle' BORDER=0>";
      break;
      case 11:
         return "<img src='http://www.wtfvideos.com/main/photos/dive.gif' alt=" align'absmiddle' BORDER=0>";
      break;
      case 12:
         return "<img src='http://www.wtfvideos.com/main/photos/dive.gif' alt=" align'absmiddle' BORDER=0>";
      break;
      case 13:
         return "<img src='http://www.wtfvideos.com/main/photos/dive.gif' alt=" align'absmiddle' BORDER=0>";
      break;
      case 14:
         return "<img src='http://www.wtfvideos.com/main/photos/dive.gif' alt=" align'absmiddle' BORDER=0>";
      break;
      case 15:
         return "<img src='http://www.wtfvideos.com/main/photos/dive.gif' alt=" align'absmiddle' BORDER=0>";
      break;
     
   }
}

srand(Seed());
$randimage = rand(1,15);

$show = "<table width=\"100%\">\n<tr>\n<td align=center>\n";
$show = $show . ImageShow($randimage);
$show = $show . "</td>\n</tr>\n</table>\n";
$content = $show;
?>


Any help would be great...thanks in advance.


Back to top Reply with quote
#2   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,475
   
Add a " "; for case 2 if your not using it.

Like so:


case 2:
return " ";
break;




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum