Oczywiście, w planie było przedstawienie fragmentu pliku ale zmuszony do opuszczenia biurka celem udania się na posiedzenie egzekutywy ...... nie dodałem (IMG:
style_emoticons/default/smile.gif)
pod koniec listingu znajduje się linia w której wywala błąd.
To oczywiście tylko przykład bo po rozwiązaniu tego problemu pojawiają się kolejne, np unexpected end of line itp.
Sugestia, że to może być wersja PHP .... właśnie wją sprawdzam (IMG:
style_emoticons/default/smile.gif)
oto on:
....
<?php
include '../classes/front.end.layout.inc.php';
include_once('../classes/front.productcatalog.php');
$oPC = new productcatalog($conn);
include_once('../classes/pageText.php');
$oPT = new pageText($conn);
include_once('../classes/productCarousel.php');
$oCA = new carousel($conn);
include_once('../classes/featurePage.php');
$oFA = new featurePage($conn);
$idBestSeller = $oCA->checkCarouselId('bestSeller', 1);
$aBestSeller = $oCA->getCarouselProducts($idBestSeller);
//echo '<pre>'.print_r($aBestSeller,true).'</pre>';
//foreach($aBestSeller as $key=>$value) {echo "$key : {$value['name']}</br />"; }
$idWeLove = $oCA->checkCarouselId('weLove', 1);
$aWeLove = $oCA->getCarouselProducts($idWeLove);
$idPage=1;
$aImages = $oFA->getPageImages($idPage);
$aPage = $oFA->getFeaturePageById($idPage);
$strThisPageTitle = '';
$strThisPageDesc = $strPageDesc;
$strThisKeywords = $strPageKeywords;
foreach($aPage as $rPage){
$strThisKeywords = $rPage['strKeywords'];
$strThisPageDesc = $rPage['strPageDesc'];
$strThisPageTitle = $rPage['strPageTitle'];
}
//NOTE: the $arrJavascript array allows linking to javascript plugins applicable on a particular page. Please use it and add links directly to the head of document ONLY when they will be used by all (or majority of) pages. This will reduce plugin conflicts, hopefully.
#"/library/js/exampleScript1.js",
#"/library/js/exampleScript2.js"
);
#"/application/public/css/example1.css",
#"/application/public/css/example2.css",
);
build_document_head($conn, $strPageTitle.' '.$strThisPageTitle, $strThisPageDesc, $strThisKeywords, $strRobots, $arrJavascript, $arrStylesheet, $arrGlobalVar);
build_page_header($conn, $arrGlobalVar, $variant=1);
build_menu($conn, $arrGlobalVar);
build_global_banner($conn, $arrGlobalVar, 'idPage', $idPage);
?>
<!-- MAIN BODY-->
<div id="layout">
<?if(!empty($aBestSeller)){ ?> <!-- Best Sellers Carousel -->
<div class="flex-header">Best Sellers</div>
<div class="carousel">
<ul id="bestSellers
<?php echo (count($aBestSeller)<4?
'X':'')?>">
<?php foreach($aBestSeller as $product){
if($product['canonical'] != '')
{
//remove multiple starting slashes as they mess up the link
$productLink = ltrim($product['canonical'],'/'); $productLink = '/'.$productLink;
}
else
$productLink = $product['catTwo'].'/'.$product['rewrite_name'];
$productLink = rtrim($productLink,'/');
?>
<li>
<!-- <a href="/product-detail.php?p=<?=$product['rewrite_name']?>"> -->
<a href="<?=$productLink?>/">
<figure>
<?php if($product['productimage'] == '' || file_exists('../images/product/medium/'.$product['productimage']) === FALSE){ $proimg = 'noimage.png';} else {$proimg = $product['productimage'];} ?> <img src="/application/public/images/product/medium/<?=$proimg?>" height="173" width="230" alt="<?=$product['name']?> title="<?=$product['name']?>">
<?php if ($product['promoMedium'] != '') { ?>
<img src="/application/public/images/offer/medium/<?= $product['promoMedium']; ?>" alt="promo icon" class="imgOffer" width="60" />
<?php } ?>
<?php if ($product['intNextDayDel'] == 1) { ?>
<img src="/application/public/images/common/nextDayDelivery.png" alt="next day delivery" title="next day delivery" class="imgDelivery" />
<div class="productDelivery desktopHide"><span>FREE NEXT DAY DELIVERY</span></div>
<?php } else { ?>
<div class="productDelivery productDeliveryEmpty desktopHide"> </div>
<?php } ?>
<p class="sellerDescription"><?=$product['name']?></p>
<?php
if($product['reductions_price'] > 0 && $product['was_price'] > $product['reductions_price']) { ?>
<p class="sellerPrice">
<?php if($product['maxprice'] > $product['minprice']) { echo"<span class='priceFrom'>From</span>";}?> £
<?=$product['reductions_price']?></p>
<p class="sellerWas">WAS £<?=$product['was_price']?></p>
<?php } elseif($product['maxprice'] == $product['minprice']){ ?>
<p class="sellerPrice">£<?=$product['minprice']?></p>
<?php } else { ?>
<p class="sellerPrice"><span class="priceFrom">From</span> £<?=$product['minprice']?></p>
<?php } // END ELSE if($product['maxprice'] == $product['minprice']) ?>
<?php if (isset($product['wasminprice']) && $product['reductions_price'] == 0){ ?> <p class="sellerWas">WAS £<?=$product['wasminprice']?></p>
<?php } ?>
<figcaption><p class="viewDetailsButton">View Details</p></figcaption>
</figure>
</a>
</li>
<?php } // END foreach() ?>
</ul>
</div>
<?php } // END if(!empty($aProducts)) ?> //w tej linii wywala błąd
......