unexpected $end in /core/products-admin.php

i can kick your ass

No avatar

2007-07-18 01:17

Fresh installation.. I get "Parse error: syntax error, unexpected $end in /home/jamie/public_html/clients/608.fm-rims/core/products-admin.php on line 1"

"/home/jamie/public_html/clients/608.fm-rims/core/products-admin.php" Consists of:

<?php
if( !function_exists'saveProduct' ) ){
  
/**
  * Save product
  * @return void
  * @param array  $aForm
  */
  
function saveProduct$aForm ){
  
    if( 
is_numeric$aForm['iProduct'] ) ){
      if( isset( 
$aForm['aFilesDescriptionChange'] ) && is_array$aForm['aFilesDescriptionChange'] ) ){
        foreach( 
$aForm['aFilesDescriptionChange'] as $iKey => $sValue ){
          
dbChangeFileData( Array( $iKey$aForm['iProduct'], $aForm['aFilesNameChange'][$iKey], changeTxtereg_replace'\'', '', $sValue ) ), $aForm['aFilesType'][$iKey], $aForm['aFilesPositionChange'][$iKey] ), 1 );
        } // end foreach
      }
      $bExist = true;
    }
    else{
      $bExist = null;
      $aForm['
iProduct'] = throwLastId( ) + 1;
    }

    if( !isset( $aForm['
iPosition'] ) || !is_numeric( $aForm['iPosition'] ) || $aForm['iPosition'] < -99 || $aForm['iPosition'] > 999 )
      $aForm['
iPosition'] = 0;

    $aForm['
sDescriptionShort'] = changeTxt( $aForm['sDescriptionShort'], 'Nds' );
    $aForm['
sDescriptionFull']  = changeTxt( $aForm['sDescriptionFull'], 'Nds' );

    $aForm['
sName']  = changeTxt( $aForm['sName'] );
    $aForm['
fPrice'] = tPrice( $aForm['fPrice'] );

    if( isset( $aForm['
aDelFiles'] ) && is_array( $aForm['aDelFiles'] ) ){
      $iCount = count( $aForm['
aDelFiles'] );
      for( $i = 0; $i < $iCount; $i++ )
        delFile( $aForm['
aDelFiles'][$i], 1 );
    }

    if( isset( $aForm['
aCategories'] ) && is_array( $aForm['aCategories'] ) ){
      $bErase = true;
      $iCount = count( $aForm['
aCategories'] );
      for( $i = 0; $i < $iCount; $i++ ){
        if( is_numeric( $aForm['
aCategories'][$i] ) ){
          dbAddCategoriesProduct( $aForm['
aCategories'][$i], $aForm['iProduct'], $bErase );
          $bErase = null;
        }
      } // end for
    }

    addFiles( $aForm, $aForm['
iProduct'], PRODUCTS_PHOTO_SIZE, 1 );
    dbAddProductExtensions( Array( $aForm['
iProduct'], $aForm['sDescriptionFull'] ) );
    dbSaveProduct( $aForm, $bExist );
  } // end function saveProduct
}

if( !function_exists( '
delProduct ) ){
  
/**
  * Delete product
  * @return void
  * @param int  $iProduct
  */
  
function delProduct$iProduct ){
    
delFiles$iProduct);
    
dbDelProduct$iProduct );
  } 
// end function delProduct
}
?>

» Quick.Cart v2.x

--Jamie at RadioactiveRussian.com

i can kick your ass

No avatar

2007-07-18 01:25

using vi and nano shows all text on a single line.. i opened it with webuilder in windows, saved it, re-uploaded it and it seemed to work, not change to code...

--Jamie at RadioactiveRussian.com

merci

No avatar

2007-07-18 08:35

you should upload files in binary mode on your server

Back to top
about us | contact