I get this error im trying to setup my PTC site :S
Parse error: syntax error, unexpected T_CASE in /home/a9378945/public_html/index.php on line 72

<?php

# CHECK SESSEION COOKIE
if($_SERVER["SERVER_NAME"] != 'localhost'){
	
	if($_SERVER["REQUEST_METHOD"] == 'GET'){
		
		if(strpos($_SERVER["HTTP_REFERER"], 'google') !== false){
			if( isset($_COOKIE['r']) || isset($_GET['r']) ){
				setcookie('r', '', time()-3600);
				header("HTTP/1.1 301 Moved Permanently");
				header("Location: http://{$_SERVER['SERVER_NAME']}/");
				exit;
		}
		
	}

}

# FUNCTIONS
	require_once($_SERVER["DOCUMENT_ROOT"].'/includes/php/funkcje.inc.php');
	
# DOWN FUNCTION
	register_shutdown_function('_SHUTDOWN');
	
# PHP SETTINGS (MOVE TO PHP.INI)	
	ini_set('session.name', "xAA");
	//ini_set('session.gc_probability', 0);
	//ini_set('session.gc_maxlifetime', 604800);
	//ini_set('session.use_only_cookies', 1);
	//ini_set('session.cookie_lifetime', 604800);
	//ini_set('session.hash_function', 1);
	//ini_set('session.hash_bits_per_character', 6);
	ini_set('display_errors', 0);

# SESSION START
	session_start();

# GZIP CONTENT
	ob_start("ob_gzhandler");
	ob_start("_GENERATE_HTML");

# STALE	& ZMIENNE
	define('CORE', _OP_PROCESS_CHECK());

# ZMIENNE
	$config = array();
	$config['url'] = "http://{$_SERVER['SERVER_NAME']}/";
	$config['furl'] = "http://{$_SERVER['SERVER_NAME']}/forum/";
	$config['site'] = SITE_INFO_NAME;
    $config['site_slogan'] = SITE_INFO_SLOGAN;
    $config['site_mail'] = SITE_MAIL_SUPPORT;
    $config['admin'] = (_OP_PROCESS_ID == 1 || _OP_PROCESS_ID == 2) ? true:false;
	
# CONNECT TO DB
	_DB_CONNECT();	
	_OP_USERS_ONLINE();
    
	if(CORE){
		# $xUS[]
			$xUS_SQL = mysql_query("SELECT * FROM `xeon_users` WHERE `xeon_users`.`id` = 

"._OP_PROCESS_ID." LIMIT 1;") or die( _OP_ERROR(mysql_error(), __FILE__ ,__LINE__) );
		    $xUS = mysql_fetch_assoc($xUS_SQL);
		
		# $xACCOUNT[0]: ACCOUNT TYPE - 0 STANDARD, 0 EXTENDED, 1 PREMIUM
		# $xACCOUNT[1]: PREMIUM ACCOUNT EXPIRES: TIME_STAMP
			$xACCOUNT_NAMES = explode('|', config('account_names'));
			$xACCOUNT = explode(":", $xUS['e_account']);
		
		# Zmienne
			$xConfig = array();
            switch ($xACCOUNT[0] { 
            	case 0 : $xConfig['clicks_minimum'] = MINIMUM_CLICKS_TOGETCREDIT_0; break;
                case 1 : $xConfig['clicks_minimum'] = MINIMUM_CLICKS_TOGETCREDIT_1; break;
                case 2 : $xConfig['clicks_minimum'] = MINIMUM_CLICKS_TOGETCREDIT_2; break;
                case 3 : $xConfig['clicks_minimum'] = MINIMUM_CLICKS_TOGETCREDIT_3; break;
                case 4 : $xConfig['clicks_minimum'] = MINIMUM_CLICKS_TOGETCREDIT_4; break;
            	default: $xConfig['clicks_minimum'] = MINIMUM_CLICKS_TOGETCREDIT_0;
            }
		
		# PRICES LIST
			$ceny = _OP_PRICE_LIST($xACCOUNT[0], $xUS['s_referals_rented']);
		
		# REDIRECT IF ACCOUNT SUSPENDED
			_OP_USER_CHECK($xUS['x_status']);
	
	}
	
# DELETE REFERER COOKIE
	if(isset($_GET['r'])){ setcookie('r', $_GET['r']); }
# GENERATE COME FROM COOKIE
	if($_COOKIE['xHT'] == '' && !CORE){	_OP_COME_FROM() }	
# INCLUDES TREE
	if( isset($_GET['v']) ){

		switch ($_GET['v']){ 
			/* HOME     */ case 'p'  : LAY_HEAD(); 

require_once($_SERVER["DOCUMENT_ROOT"].'/sites/inc.home.php'); LAY_FOOTER() break;
			/* TOS      */ case 't'  : LAY_HEAD();

Closing parenthesis is missing.

Can someone help me please :) ?
I can give ftp access to someone who can help me to make it working :S im in PHP world foe 3 months so i don't know many about this :/

Member Avatar

diafol

If so, this isn't your code I take it.
You don't show your full code, so looking where you've left off a brace is difficult. Count the '{' and the '}' to see that you have the same number of each. Indenting properly should show any obvious mismatches.

Addition to my previous post, see line 73. Sorry, thought that was obvious.

Member Avatar

diafol

Sorry P - my bad - not a brace after all - it's a missing ')' before the brace. Must have skimmed the '72'.