Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/01/2009, 14:19
cesanago
 
Fecha de Ingreso: enero-2009
Mensajes: 4
Antigüedad: 17 años, 10 meses
Puntos: 0
Parse error: syntax error, unexpected $end in

Hola a todos tengo unos errores en este codigo si alguien me pudiera ayudar me da este error Parse error: syntax error, unexpected $end in /home2/domainsc/public_html/core/products-admin.php on line 1
el codigo es el siguiente aunque pone en linea 1 es que donde lo tengo todo el codigo es solo una linea muchisimas gracias
Código PHP:
<?php 
if( !function_exists( 'saveProduct' ) ){   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], 
changeTxt( ereg_replace( '\'', '', $sValue ) )
, 
$aForm['aFilesType'][$iKey], $aForm['aFilesPositionChange']
[
$iKey] ), 1 );        }       }      $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;
        }      }     }    
addFiles( $aForm, $aForm['iProduct'], PRODUCTS_PHOTO_SIZE, 1 );
    
dbAddProductExtensions( Array( $aForm['iProduct'], $aForm['sDescriptionFull'] ) ); 
   
dbSaveProduct( $aForm, $bExist );  } // end function saveProduct}
if( !function_exists( 'delProduct' ) ){  function delProduct( $iProduct ){
    
delFiles( $iProduct, 1 );    dbDelProduct( $iProduct );  } // end function delProduct}?>

Última edición por cesanago; 24/01/2009 a las 16:05