Exemple #1
0
}
// Add Menu Extra if defined.
if (!empty($menuExtras[7])) {
    $menuScript .= parse_menu_extras($menuExtras[7]);
}
$menuScript .= '];
//]]> -->
    </script>' . "\n";
$loginStr = translate('Login');
$logoutStr = translate('Logout');
$menuHtml .= '
      <table width="100%" class="ThemeMenubar" cellspacing="0" cellpadding="0" summary="">
        <tr>
          <td class="ThemeMenubackgr"><div id="myMenuID"></div></td>' . ($MENU_DATE_TOP == 'Y' && $menuConfig['MENU_DATE_TOP'] ? '
          <td class="ThemeMenubackgr ThemeMenu" align="right">
            ' . print_menu_dates(true) . '
          </td>' : '') . '
          <td class="ThemeMenubackgr ThemeMenu" align="right">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
        </tr>
      </table>';
// Add function to onload string as needed.
$BodyX = (empty($BodyX) ? 'onload="' : substr($BodyX, 0, -1)) . "cmDraw( 'myMenuID', myMenu, 'hbr', cmTheme, 'Theme' );\"";
/* This function allows admins to add static content to their menu.
 */
function parse_menu_extras($menuA)
{
    $ret = '';
    if ($menuA[0] == 'menu') {
        $ret .= jscMenu_menu($menuA[1], $menuA[2], false);
        if (is_array($menuA[3])) {
function print_trailer($include_nav_links = true, $closeDb = true, $disableCustom = false)
{
    global $ALLOW_VIEW_OTHER, $c, $cat_id, $CATEGORIES_ENABLED, $CUSTOM_TRAILER, $DATE_FORMAT_MD, $DATE_FORMAT_MY, $DEMO_MODE, $DISPLAY_TASKS, $friendly, $DISPLAY_TASKS_IN_GRID, $fullname, $GROUPS_ENABLED, $has_boss, $is_admin, $is_nonuser, $is_nonuser_admin, $LAYER_STATUS, $login, $login_return_path, $MENU_DATE_TOP, $MENU_ENABLED, $NONUSER_ENABLED, $PUBLIC_ACCESS, $PUBLIC_ACCESS_CAN_ADD, $PUBLIC_ACCESS_FULLNAME, $PUBLIC_ACCESS_OTHERS, $readonly, $REPORTS_ENABLED, $REQUIRE_APPROVALS, $single_user, $STARTVIEW, $thisday, $thismonth, $thisyear, $use_http_auth, $user, $views, $WEEK_START;
    $ret = '';
    if ($include_nav_links && !$friendly) {
        if ($MENU_ENABLED == 'N' || $MENU_DATE_TOP == 'N') {
            $ret .= '<div id="dateselector">' . print_menu_dates() . '</div>';
        }
        if ($MENU_ENABLED == 'N') {
            include_once 'includes/trailer.php';
        }
    }
    $ret .= (empty($tret) ? '' : $tret) . ($CUSTOM_TRAILER == 'Y' && !$disableCustom && isset($c) ? load_template($login, 'T') : '');
    if ($closeDb) {
        if (isset($c)) {
            dbi_close($c);
        }
        unset($c);
    }
    // Only include version info if user is admin.  No need to publicize
    // version to would-be hackers.
    return $ret . ($is_admin ? "<!-- " . $GLOBALS['PROGRAM_NAME'] . "     " . $GLOBALS['PROGRAM_URL'] . " -->\n" : '') . ($DEMO_MODE == 'Y' ? '
    <p><a href="http://validator.w3.org/check?uri=referer">' . '<img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" ' . 'class="valid" /></a></p>' : '') . '
  </body>
</html>
';
}