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