function drawTop($headcontent = false) { global $_josh, $page, $user; ob_start('browser_output'); error_debug('starting top', __FILE__, __LINE__); if ($_josh['db']['language'] == 'mysql') { url_header_utf8(); } if (empty($page['helptext'])) { $page['helptext'] = getString('help_empty'); } $return = draw_doctype() . draw_container('head', ($_josh['db']['language'] == 'mysql' ? draw_meta_utf8() : '') . draw_container('title', $page['title']) . draw_favicon(DIRECTORY_WRITE . '/favicon.png') . draw_css_src('/css/global.css', 'screen') . draw_css_src('/css/print.css', 'print') . draw_css_src('/css/ie.css', 'ie') . draw_css_src(DIRECTORY_WRITE . '/screen.css', 'screen') . lib_get('jquery') . draw_javascript_src() . draw_javascript_src('/js/global.js') . draw_css(' #left table.left td.head, #left div.display div.title { background-color:#' . $page['color'] . '; } #left table.table th.table_title, #left form fieldset legend span, #left table.navigation { background-color:#' . $page['color'] . '; } #left table.navigation tr, #left form fieldset div.admin, #left table td.hilite { background-color:#' . $page['hilite'] . '; } ') . draw_javascript(' function confirmDelete(id) { if (confirm("' . getString('are_you_sure') . '")) { var newloc = "' . url_query_add(array('action' => 'delete', 'delete_id' => 'replaceme'), false) . '"; location.href = newloc.replace("replaceme", id); } } function changeDept(id, user_id) { location.href="' . $_josh['request']['path_query'] . '&newDeptID=" + id + "&contactID=" + user_id; } ') . drawSyndicateLink('bb') . $headcontent); $return .= draw_body_open() . ' <div id="container"> ' . draw_div('banner', draw_img(DIRECTORY_WRITE . '/banner' . langExt() . '.png', $_SESSION['homepage'])) . ' <div id="left"> <div id="help"> <div id="help_buttons">' . draw_link($_SESSION['homepage'], getString('home'), false, 'left') . draw_link('javascript:helpShow(' . user() . ')', getString('help_show'), false, array('class' => 'right' . ($user['help'] ? ' hidden' : false), 'id' => 'show_help_btn')) . draw_link('javascript:helpHide(' . user() . ')', getString('help_hide'), false, array('class' => 'right' . (!$user['help'] ? ' hidden' : false), 'id' => 'hide_help_btn')); if ($_SESSION['is_admin']) { if ($page['id']) { $return .= draw_link('/a/admin/page.php?id=' . $page['id'], getString('page_edit_info'), false, 'right'); } else { $return .= draw_link('/a/admin/page.php?module_id=' . $page['module_id'] . '&modulette_id=' . $page['modulette_id'] . '&url=' . urlencode($_josh['request']['page']), 'Create Page Here', false, 'right'); } } $return .= '</div><div id="help_text"'; if (!$user['help']) { $return .= ' class="hidden"'; } $return .= '>' . $page['helptext'] . '</div></div>'; if ($_josh['request']['folder'] == 'helpdesk') { $return .= drawNavigationHelpdesk(); } $return .= drawNavigation(); $_josh['drawn']['top'] = true; error_debug('finished drawing top', __FILE__, __LINE__); return $return; }
function drawTop() { global $user, $_josh, $page, $isAdmin, $printing, $locale; error_debug("starting top"); $title = $page["module"] . " > " . $page["name"]; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title><?php echo $title; ?> </title> <link rel="stylesheet" type="text/css" href="/assets/vendor/bootstrap/dist/css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="/assets/css/style.css"> <!--[if IE]> <link rel="stylesheet" type="text/css" href="<?php echo $locale; ?> style-ie.css" /> <![endif]--> </head> <body> <?php if (!$printing) { ?> <div class="container"> <div class="row banner"> <div class="col-md-4"> <a href="/bb/"><img src="/assets/img/logo-cc.png" width="240" height="86" class="img-responsive"></a> </div> <div class="col-md-4"> <a href="/bb/"><img src="/assets/img/logo-hla.png" width="330" height="64" class="img-responsive"></a> </div> <div class="col-md-4"> <a href="/bb/"><img src="/assets/img/logo-hcfa.png" width="186" height="102" class="img-responsive"></a> </div> </div> <div class="row"> <div id="left" class="col-md-8"> <div id="help"> <a class="button left" href="/bb/"> <i class="glyphicon glyphicon-home"></i> Home </a> <a class="button right" href="<?php echo url_query_add(array("toggleMenuPref" => "isOpenHelp"), false); ?> "> <i class="glyphicon glyphicon-info-sign"></i> <?php if ($user["isOpenHelp"]) { ?> Hide<?php } else { ?> Show<?php } ?> Help </a> <?php if ($user["isOpenHelp"]) { if ($user["isAdmin"]) { ?> <a class="button right" href="/admin/edit-help.php?id=<?php echo $page["id"]; ?> &returnTo=<?php echo urlencode($_josh["request"]["path_query"]); ?> "> <i class="glyphicon glyphicon-edit"></i> Edit Page Info </a> <?php } ?> <div class="text"> <?php echo $page["helpText"] ? $page["helpText"] : "No help is available for this page."; ?> </div> <?php } ?> </div> <?php } if ($_josh["request"]["folder"] == "helpdesk") { echo drawNavigationHelpdesk(); } echo drawNavigation(); $_josh["drawn"]["top"] = true; error_debug("finished drawing top"); }