Beispiel #1
0
?>
</a></li>
							<li><a class="navbar-brand" href="http://www.mamp.info/en/mamp-pro/index.html" target="_blank"><?php 
printf(tr("%s Website"), appName());
?>
</a></li>
							<?php 
$myFavLink = '';
if ($myFavLink != '') {
    echo '<li><a class="navbar-brand" href="' . $myFavLink . '" target="_blank">' . tr('My favorite Link') . '</a></li>';
}
?>
						</ul><!-- end left -->
						<ul class="nav navbar-nav navbar-right">
						<?php 
if (1 != is_bought()) {
    ?>
							<li class="btn-buy"><a style="color:white;" href="<?php 
    echo buyLink();
    ?>
" target="_blank"><?php 
    echo tr("Buy MAMP PRO");
    ?>
</a></li>
						<?php 
} else {
    ?>
							<li><a style="margin-top:10px; margin-right:10px;padding:0;" href="http://www.appsolute.de" target="_blank"><img src="images/appsolute-logo-transparent.png" height="30" style="margin:0;padding:0;"/></a></li>
						<?php 
}
?>
function createItemsForCarouselFromFeedObject($feed)
{
    global $configObject;
    $items = array();
    if (isset($feed->carousel)) {
        foreach ($feed->carousel->all as $item) {
            $items[] = $item;
        }
        if (!is_bought()) {
            foreach ($feed->carousel->buy as $item) {
                $items[] = $item;
            }
        }
        $parts = explode(".", $feed->currentVersion);
        if (isset($parts[0])) {
            $majorversion = $parts[0];
            $currVer = $configObject->version;
            $parts = explode(".", $currVer);
            if (isset($parts[0])) {
                $majorversionCurrent = $parts[0];
                if (abs($majorversion) > abs($majorversionCurrent)) {
                    foreach ($feed->carousel->upgrade as $item) {
                        $items[] = $item;
                    }
                }
            }
        }
    }
    return $items;
}