Parse error?
Posted: Sun Jul 23, 2006 4:04 pm
When I run my script, it gives me a parse error on line 24 but I'm not seeing it... help?
Parse error: syntax error, unexpected '}', expecting ',' or ';' in /home/gamerbio/public_html/admin/arcade/installgp1.php on line 24
Parse error: syntax error, unexpected '}', expecting ',' or ';' in /home/gamerbio/public_html/admin/arcade/installgp1.php on line 24
Code: Select all
<?php
include("../../inc/config/connect.inc");
include("header.php");
protect();
if (member_types2($VAR[4]) != '0') {
echo "<p>Sorry, but you must be logged in as an administrator to view this area.";
}
else {
$sql="SELECT * FROM `arcade_categories` WHERE catname = 'Retro' LIMIT 1";
$result=mysql_query($sql);
$existcheck = mysql_num_rows($result);
if($existcheck == 1){
$sql = "SELECT * FROM `arcade_games` WHERE `shortname` = 'breakout'";
$result = mysql_query($sql) or die(mysql_error());
$existcheck = mysql_num_rows($result);
if($existcheck >= 1){
echo "<p>Breakout is already entered. Moving on..."
}
else{
$sql = "INSERT INTO `arcade_games` (shortname, title, description, file, width, height, miniimage, stdimage, isreverse)
VALUES ('breakout', 'Breakout', 'Use a ball and paddle to smash your way through a series of regenerating blocks.', 'breakout.swf', '400', '400', 'breakout2.gif', 'breakout1.gif', '0')";
$result=mysql_query($sql) or die(mysql_error());
echo "<p>Congratulations, Breakout has been installed!";
}
$sql = "SELECT * FROM `arcade_games` WHERE `shortname` = 'asteroids'";
$result = mysql_query($sql) or die(mysql_error());
$existcheck = mysql_num_rows($result);
if($existcheck >= 1){
echo "<p>Asteroids is already entered. Moving on..."
}
else{
$sql = "INSERT INTO `arcade_games` (shortname, title, description, file, width, height, miniimage, stdimage, isreverse)
VALUES ('asteroids', 'Asteroids', 'Fly your spaceship and destroy the asteroid fields to gain points.', 'asteroids.swf', '400', '346', 'asteroids2.gif', 'asteroids1.gif', '0')";
$result=mysql_query($sql) or die(mysql_error());
echo "<p>Congratulations, Asteroids has been installed!";
}
$sql = "SELECT * FROM `arcade_games` WHERE `shortname` = 'tetris'";
$result = mysql_query($sql) or die(mysql_error());
$existcheck = mysql_num_rows($result);
if($existcheck >= 1){
echo "<p>Tetris is already entered. Moving on..."
}
else{
$sql = "INSERT INTO `arcade_games` (shortname, title, description, file, width, height, miniimage, stdimage, isreverse)
VALUES ('tetris', 'Tetris', 'Align the falloing bricks to form complete lines. A true classic.', 'tetris.swf', '400', '346', 'tetris2.gif', 'tetris1.gif', '0')";
$result=mysql_query($sql) or die(mysql_error());
echo "<p>Congratulations, Tetris has been installed!";
}
$sql = "SELECT * FROM `arcade_games` WHERE `shortname` = 'spaceinvaders'";
$result = mysql_query($sql) or die(mysql_error());
$existcheck = mysql_num_rows($result);
if($existcheck >= 1){
echo "<p>Space Invaders is already entered. Moving on..."
}
else{
$sql = "INSERT INTO `arcade_games` (shortname, title, description, file, width, height, miniimage, stdimage, isreverse)
VALUES ('spaceinvaders', 'Space Invaders', 'Destroy the invading aliens before you perish!', 'spaceinvaders.swf', '400', '346', 'spaceinvaders2.gif', 'spaceinvaders1.gif', '0')";
$result=mysql_query($sql) or die(mysql_error());
echo "<p>Congratulations, Space Invaders has been installed!";
}
$sql = "SELECT * FROM `arcade_games` WHERE `shortname` = 'snake'";
$result = mysql_query($sql) or die(mysql_error());
$existcheck = mysql_num_rows($result);
if($existcheck >= 1){
echo "<p>Snake is already entered. Moving on..."
}
else{
$sql = "INSERT INTO `arcade_games` (shortname, title, description, file, width, height, miniimage, stdimage, isreverse)
VALUES ('snake', 'Snake', 'Direct your snake to eat the apples. Don't eat yourself!', 'snake.swf', '400', '346', 'snake2.gif', 'snake1.gif', '0')";
$result=mysql_query($sql) or die(mysql_error());
echo "<p>Congratulations, Snake has been installed!";
}
$sql = "SELECT * FROM `arcade_games` WHERE `shortname` = 'simon'";
$result = mysql_query($sql) or die(mysql_error());
$existcheck = mysql_num_rows($result);
if($existcheck >= 1){
echo "<p>Simon is already entered. Moving on..."
}
else{
$sql = "INSERT INTO `arcade_games` (shortname, title, description, file, width, height, miniimage, stdimage, isreverse)
VALUES ('simon', 'Simon', 'A true test of mental agility. Follow the pattern of lights and sounds for as long as you can remember them!', 'simon.swf', '500', '400', 'simon2.gif', 'simon1.gif', '0')";
$result=mysql_query($sql) or die(mysql_error());
echo "<p>Congratulations, Simon has been installed!";
}
$sql = "SELECT * FROM `arcade_games` WHERE `shortname` = 'copter'";
$result = mysql_query($sql) or die(mysql_error());
$existcheck = mysql_num_rows($result);
if($existcheck >= 1){
echo "<p>Helicopter is already entered. Moving on..."
}
else{
$sql = "INSERT INTO `arcade_games` (shortname, title, description, file, width, height, miniimage, stdimage, isreverse)
VALUES ('copter', 'Helicopter', 'Navigate your helicopter around the obstacles and stay alive to gain points.', 'copter.swf', '400', '300', 'copter2.gif', 'copter1.gif', '0')";
$result=mysql_query($sql) or die(mysql_error());
echo "<p>Congratulations, Helicopter has been installed!";
}
echo "<p>Game Pack 1 installation complete. You should now delete this file.";
}
else{
echo "You must first add the category 'Retro' to your categories list before continuing. Add the category and reload this script.";
}
}
?>