Parse error: syntax error, unexpected T_ELSE

Ok, the file /public_html/inc/design.inc.php I add this extra line (highlighted) of code a long time ago to turn of the promo when a member was logged in.

function getPromoCode() {
    global $site;

    $sSiteUrl = BX_DOL_URL_ROOT;
        if(!isMember())
    if( getParam( 'enable_flash_promo' ) != 'on' )

It seemed to work fine then I added a template and notice the opposite effect, promo was working "when" you were logged in.

So today I decided to remove that one line and now when you go to the site the only thing that comes up is

Parse error: syntax error, unexpected T_ELSE in /home/mysite/public_html/inc/design.inc.php on line 283

I did nothing to that line. So I tried adding back if(!isMember()) to undo the problem and I still get the error at themedilounge.com

What the heck is going on here?

Here is the block of code that is giving me a headache.

function getPromoCode() {
    global $site;

    $sSiteUrl = BX_DOL_URL_ROOT;
       
    if( getParam( 'enable_flash_promo' ) != 'on' )
        $sCode = '<div class="promo_code_wrapper">' . getParam( 'custom_promo_code' ) . '</div>';
    else {
        $aImages = getPromoImagesArray();
        $iImages = count($aImages);
       
        $sImagesEls = '';
        foreach ($aImages as $sImg)
            $sImagesEls .= '<img src="'.$site['imagesPromo'].$sImg.'" />';

        $sPromoLink = $sSiteUrl;
        $sPromoRelocationVisitor = getParam('promo_relocation_link_visitor');
        $sPromoRelocationMember = getParam('promo_relocation_link_member');

        $sWelcomeElement = '';
         {
            $sWelcomeC = _t('_Welcome_to_the_community');
            $sWelcomeElement = '<div class="sys_title">' . $sWelcomeC . '</div>';

            $sPromoLink .= ($sPromoRelocationVisitor!='') ? $sPromoRelocationVisitor : 'join.php';
               
            $sLoginSection = '<div class="sys_promo"><div class="subMenuOvr">';
            $sLoginSection .= $GLOBALS['oSysTemplate']->parseHtmlByName('login_join.html', array());
            $sLoginSection .= '</div></div>';
        }
        else       
        {   
            $sLoginSection = '';
            $aInfo = getProfileInfo();
            $sWelcomeElement = '<div class="label_thumbnail">' . get_member_thumbnail($aInfo['ID'], "left", false) . '</div><div class="label_thumb">' . _t('_Hello member', $aInfo['NickName']) . '</div><div class="clear_both"></div>';
        }

        $sCode = '';
        if($iImages > 1) {
            $GLOBALS['oSysTemplate']->addJs('jquery.dolPromo.js');
            $sCode .= <<<EOF
                <script type="text/javascript">
                    $(document).ready( function() {
                        $('#indexPhoto').dolPromo(8000, 1500);
                    } );
                </script>
EOF;
        }

        $sCode .= <<<EOF
            <div id="indexPhotoBorder">
                <div id="indexPhotoLabel">
                    {$sWelcomeElement}
                    {$sLoginSection}
                </div>
                <div id="indexPhoto" onclick="location='{$sPromoLink}'">
                    {$sImagesEls}
                </div>
            </div>
EOF;
    }

    return $sCode;
}

I found the issue, the template code already had $sWelcomeElement = ''; if(!isMember()) in place so I had that same line twice. I put it where it is suppose to go and the site came back online, but the promo still doesn't load.
         {

Quote · 6 Oct 2011

What is your line 283 ?

----
Quote · 6 Oct 2011

else

Quote · 6 Oct 2011
 
 
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.