<?php
/*******************************************************************************
 *
 * LEIDEN OPEN VARIATION DATABASE (LOVD)
 *
 * Created     : 2006-01-27
 * Modified    : 2009-02-10
 * For LOVD    : 2.0-15
 *
 * Access      : Public
 * Purpose     : Provide bottom include file including footer.
 *
 * Copyright   : 2004-2009 Leiden University Medical Center; http://www.LUMC.nl/
 * Programmer  : Ing. Ivo F.A.C. Fokkema <I.F.A.C.Fokkema@LUMC.nl>
 * Last edited : Ing. Ivo F.A.C. Fokkema <I.F.A.C.Fokkema@LUMC.nl>
 *
 *
 * This file is part of LOVD.
 *
 * LOVD is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * LOVD is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with LOVD; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 *************/

// Don't allow direct access.
if (!defined('ROOT_PATH')) {
    exit;
}

// Special case for the documents section. Previous and Next link.
if (substr(lovd_getProjectFile(), 0, 6) == '/docs/' && !empty($_PAGES)) {
    // Yep, documentation section.
    list($aPrev, $aNext) = lovd_findPrevNext($_PAGES, lovd_cleanDirName(dirname($_SERVER['PHP_SELF']) . '/' . DOCS_PATH));

    if (is_array($aPrev)) {
        $sLinkPrev = '&laquo; <A href="' . $aPrev[0] . '">' . $aPrev[1] . '</A>';
    } else {
        $sLinkPrev = '&nbsp;';
    }
    if (is_array($aNext)) {
        $sLinkNext = '<A href="' . $aNext[0] . '">' . $aNext[1] . '</A> &raquo;';
    } else {
        $sLinkNext = '&nbsp;';
    }
    print('      <TABLE border="0" cellspacing="0" cellpadding="0" width="100%">' . "\n" .
          '        <TR>' . "\n" .
          '          <TD width="50%">' . $sLinkPrev . '</TD>' . "\n" .
          '          <TD width="50%" align="right">' . $sLinkNext . '</TD></TR></TABLE><BR>' . "\n");
}
?>








    </TD>
  </TR>
</TABLE>
</DIV>
<BR>

<TABLE border="0" cellpadding="0" cellspacing="0" width="100%" class="footer">
  <TR>
    <TD width="10%">
      &nbsp;
    </TD>
    <TD align="center">
<?php
if (substr(lovd_getProjectFile(), 0, 6) == '/docs/') {
    // In documents section.
    print('  For the latest version of the LOVD manual, <A href="http://www.LOVD.nl/2.0/docs/" target="_blank">check the online version</A>.<BR>' . "\n");
    
}
print('  Powered by <A href="' . $_SETT['upstream_URL'] . $_STAT['tree'] . '/" target="_blank">LOVD v.' . $_STAT['tree'] . '</A> Build ' . $_STAT['build'] . '<BR>' . "\n" .
      (isset($_MODULES) && count($_MODULES->getModuleList(true))? '  Enabled modules: ' . implode(', ', $_MODULES->getModuleList(true)) . '<BR>' . "\n" : '') .
      '  &copy;2004-2009 <A href="http://www.lumc.nl/" target="_blank">Leiden University Medical Center</A>' . "\n");
?>
    </TD>
    <TD width="10%" align="right">
<?php
// FIXME: Can't check on HAS_AUTH, because after log out this constant is still set.
if (!defined('_NOT_INSTALLED_')) {
    if (HAS_AUTH) {
        print('      <A href="#" onclick="lovd_openWindow(\'' . ROOT_PATH . 'check_update.php' . lovd_showSID() . '\', \'CheckUpdate\', 650, 175); return false;"><IMG src="' . ROOT_PATH . 'check_update.php?icon" alt="" width="32" height="32" border="0" style="margin-right : 5px;"></A>' . "\n");
    } else {
        print('      <IMG src="' . ROOT_PATH . 'check_update.php?icon" alt="" width="32" height="32" style="margin-right : 5px;">' . "\n");
    }
}
?>
    </TD>
  </TR>
</TABLE>

</TD></TR></TABLE>

</BODY>
</HTML>
