the full error looks like this:
Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in
anyone know how to fix this? $_page['name_index'] = 81; (this is where the error is) The code Im using looks like this:
//-------------------------------------------------------------------------------------------------------//
// --------------- page variables and login
$_page['name_index'] = 81;
$_page['css_name'] = 'member_panel.css';
$_page['extra_js'] = '<script type="text/javascript">urlIconLoading = "'.getTemplateIcon('loading.gif').'";</script>';
$_page['extra_js'] .= "<script type='text/javascript' src='inc/js/avatar_prototype.js'></script>";
$_page['extra_css'] .= "<link rel='stylesheet' type='text/css' href='templates/tmpl_{$tmpl}/css/avatar.css' />";
$_page['extra_css'] .= "<link href='templates/tmpl_{$tmpl}/css/friendsuggest.css' rel='stylesheet' type='text/css' />";
$_page['header'] = _t( "_My Account" );
// --------------- GET/POST actions
$member['ID'] = $_POST['ID'];
$member['Password'] = md5( process_pass_data( $_POST['Password'] ) );
//ultimate inviter mod
if( "on" == getParam("show_invitation_after_login") )
{
if(($_GET['entry']=="nodirect") && ((int)$_GET['skip']))
db_res("UPDATE `Profiles` SET `ShowInvite`=0 WHERE `ID`='{$_COOKIE['memberID']}'");
}
$bAjxMode = ( isset( $_SERVER['HTTP_X_REQUESTED_WITH'] ) and $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest' ) ? true : false;
if ( !( $_POST['ID'] && $_POST['Password'] ) && ( $_COOKIE['memberID'] && $_COOKIE['memberPassword'] ) )
{
if ( !( $logged['member'] = member_auth( 0, false ) ) )
login_form( _t( "_LOGIN_OBSOLETE" ), 0, $bAjxMode );
}
else
{
if ( !$_POST['ID'] && !$_POST['Password'] )
{
// this is dynamic page - send headers to do not cache this page
send_headers_page_changed();
$bAjxMode = ( isset( $_SERVER['HTTP_X_REQUESTED_WITH'] ) and $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest' ) ? true : false;
login_form('', 0, $bAjxMode);
} else {
$member['ID'] = getID( $member['ID'] );
if (isLoggedBanned($member['ID'])) {
$_page['name_index'] = 55;
$_page['css_name'] = '';
$_ni = $_page['name_index'];
$_page_cont[$_ni]['page_main_code'] = MsgBox(_t('_member_banned'));
PageCode();
exit;
}
// Check if ID and Password are correct (addslashes already inside)
if ( check_login( $member['ID'], $member['Password'] ) )
{
$iCookieTime = 0;
if (isset($_POST['rememberMe']) && $_POST['rememberMe'])
$iCookieTime = time() + 24*60*60*30;
assignPoints((int)$member['ID'], POINTS_LOGIN ); //points mod
setcookie( "memberID", $_COOKIE['memberID'], time() - 24*60*60, '/' );
setcookie( "memberPassword", $_COOKIE['memberPassword'], time() - 24*60*60, '/' );
setcookie( "memberID", $member['ID'], $iCookieTime, '/' );
setcookie( "memberPassword", $member['Password'], $iCookieTime, '/' );
// ALV Access Managment System --- //
setIPForMember($member['ID']);
// ALV Access Managment System --- //
//setcookie( 'userArray', 'aUser' . $member['ID'] );
$update_res = db_res( "UPDATE `Profiles` SET `DateLastLogin` = NOW() WHERE `ID` = {$member['ID']}" );
createUserDataFile( $member['ID'] );
$p_arr = getProfileInfo( $member['ID'] );
if( !$sUrlRelocate = $_REQUEST['relocate'] or basename( $_REQUEST['relocate'] ) == 'index.php' or basename( $_REQUEST['relocate'] ) == 'join.php' )
$sUrlRelocate = $_SERVER['PHP_SELF'];
//ultimate inviter mod
if( "on" == getParam("show_invitation_after_login") )
{
if($_GET['entry']=="redirect")
$sUrlRelocate = "importer.php?entry=redirect";
}
$_page['name_index'] = 150;
$_page['css_name'] = '';
$_ni = $_page['name_index'];
$_page_cont[$_ni]['page_main_code'] = MsgBox( _t( '_Please Wait' ) );
$_page_cont[$_ni]['url_relocate'] = htmlspecialchars( $sUrlRelocate );
PageCode();
}
exit;
}
}
$member['ID'] = (int)$_COOKIE['memberID'];
$member['Password'] = $_COOKIE['memberPassword'];
//superpoke mod
if( $_GET['show_block'] )
{
switch( $_GET['show_block'] )
{
case 'poke':
$oNew = new BxDolMember($member['ID'], $site, $dir);
//begin - avatar mod
if( (int)$_POST['settype'] )
{
$oNew->setThumbType($member['ID']);
}else{
$sPicOption = $_POST['profile_pic_option'];
if($sPicOption == 'upload')
{
if( $oNew->checkPhoto() ){
require_once( BX_DIRECTORY_PATH_ROOT . 'uploadPhoto.php' );
$oPhoto = new UploadPhoto( $member['ID'] );
$oPhoto -> uploadMedia();
$sUploadMessage = _t("_Avatar photo upload success");
}else{
$sUploadMessage = _t("_Avatar photo upload failed");
}
}
elseif($sPicOption == 'avatar_img')
{
if( $oNew->uploadAvatar($member['ID']))
{
$sUploadMessage = _t("_Avatar upload success");
}else{
$sUploadMessage = _t("_Avatar upload failed");
}
}
}
//end - avatar mod
$oPoke = new BxDolPokes();
echo $oPoke -> updatePoke();
echo $oNew -> getPokeFeed();
break;
}
exit;
}
//end superpoke mod
//begin- friend suggestion mod
if( $_GET['show_suggest'] )
{
switch( $_GET['show_suggest'] )
{
case 'suggest':
$oNew = new BxDolMember($member['ID'], $site, $dir);
$oNew -> hideSuggestion();
echo $oNew -> getSuggestions();
break;
}
exit;
}
//end- friend suggestion mod
$_ni = $_page['name_index'];
// --------------- [END] page components
// this is dynamic page - send headers to do not cache this page
// --------------- page components functions
send_headers_page_changed();
$oNew = new BxDolMember($member['ID'], $site, $dir);
/*
$sPhotoBlock = '<div style="width:49%;">'.DesignBoxContent ( _t( '_My Photos' ), $oNew->showMyPhotos(1), 1).'</div>';
if (strlen($oNew->showMyPhotos(2)) > 0)
$sPhotoBlock .= '<div style="width:49%; border:=1px solid red;">'.DesignBoxContent ( _t( '_My Photos' ), $oNew->showMyPhotos(2), 1).'</div>';*/
$_page_cont[$_ni]['page_main_code'] = $oNew->getCode();
PageCode();
function setIPForMember($ID)
{
if ($ID == "") return;
$query = "SELECT * FROM `Profiles` WHERE `ID` = '$ID'";
$res = db_res($query);
$num = mysql_num_rows($res);
$ip = ip2long($_SERVER['REMOTE_ADDR']);
if (($ip == -1 || $ip === FALSE)) return;
$query = "UPDATE `Profiles` SET `alvIPMem` = '".sprintf("%u", $ip)."' WHERE `ID` = '$ID'";
db_res($query);
}
?>