Parse error

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);
   
  }
?>

Quote · 31 Jul 2009

1.  Download and install Notepad++ on your computer.  It is free and you can get it here:

 

http://notepad-plus.sourceforge.net/uk/download.php

 

 

Please display for us the error and nothing else.  It's useless to list all this code if we have no idea what file or line # it is stating the error is on and let's say it's on line 81, do you think anyone is going to count all of that out? 

 

If you give us the error it will say the complete file path and the exact line # of the error.  Can we help you with this?  yes, but you have to give us what we need so we can steer your right. 

 

See you back here shortly.

Quote · 1 Aug 2009

Agreed. We need the entire error as it was shown to you. Don't chop it off.

Because this line. $_page['name_index'] = 81; Is perfect. There is nothing wrong with that line, so the error must be elsewhere. So unless you can see the line numbers, in a editor like Notepad++. Or EditPlus which i use, you really can't tell what line it actually is. You also left out all the code above that line, so we would not be able to get a count anyway.

https://www.deanbassett.com
Quote · 1 Aug 2009

I think our here Opie here has a small problem.  That code he listed starts on line 719 of a modified member.php file.  Note, Line Seven Hundred Nineteen.  That means he's missing 718 lines of code if that's his file. 

 

In addition, it's holding Anton's Access Managment system as part of it and the Ultimate Inviter mod as another item in those last 200 lines he's put up there.  Now, as far as errors go in that section, well we can look, but we need to know what the line # was of the error to make it more useful. 

 

Gotta love it if he lost over 700 lines of code modding the files.

Quote · 1 Aug 2009

Unfinished issue, just above the line he's posted he has a command/function that is not completed and the file is telling the server to go on to page_81.html when it's not ready to because the function before this wasn't closed out. 

 

Note:  unexpected T_VARIABLE, expecting T_Function 

 

Look above the code you've given us and error will reveal itself.

Quote · 1 Aug 2009
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.