<?php
// live edit variables
// include this in the <head> tag of the header file

$liveEditBodyMargin = '';
$liveEditHeader = '';
?>
<?php 
if($isLoggedIn) {
    $liveEditBodyMargin = 'style="margin-top:36px;';
    $liveEditHeader = '
    <div id="saveResult"></div>
    <div class="liveEditUserHeader">
        Welcome, '.$user->username.'&nbsp;&nbsp;
        <div style="float: right; padding-right: 10px;"><a href="'. pageLink('dashboard.php').'">Switch to Backoffice</a>&nbsp;|&nbsp;<a href="'. pageLink('logout.php').'">Logout</a></div>
    </div>
    ';
    
    ?>
    <!--    LIVE EDIT      !-->
    <script type="text/javascript" src="<?php echo ADMIN_PATH_HTML;?>/js/jqueryui.js"></script>
    <script type="text/javascript" src="<?php echo PUBLIC_HTML_SITE.DS; ?>js/liveedit/liveEditScripts.js"></script>
    <script type="text/javascript" src="<?php echo ADMIN_PATH_HTML;?>/js/validator/jquery.bvalidator-yc.js"></script>

    <link rel="stylesheet" href="<?php echo PUBLIC_HTML_SITE.DS; ?>css/liveEditStyles.css" type="text/css" >
    <link rel="stylesheet" href="<?php echo ADMIN_PATH_HTML;?>/css/jquery.Jcrop.css" type="text/css" />
    <link rel="stylesheet" href="<?php echo ADMIN_PATH_HTML;?>/css/redmond/j.css" media="all" type="text/css" />
    <link href="<?php echo ADMIN_PATH_HTML;?>/js/validator/bvalidator.css" rel="stylesheet" type="text/css" />       
    <!--    END LIVE EDIT      !-->
    <?php } ?>
