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; }
<?php include "../include.php"; echo drawTop(); echo drawNavigation(); $result = db_query("SELECT\n\t\t\t\t\t\tu.id,\n\t\t\t\t\t\tu.lastname last,\n\t\t\t\t\t\tISNULL(u.nickname, u.firstname) first,\n\t\t\t\t\t\tu.title,\n\t\t\t\t\t\tu.homephone, \n\t\t\t\t\t\tu.homecell \n\t\t\t\t\tFROM users u\n\t\t\t\t\tWHERE u.rankid < 8 AND u.is_active = 1\n\t\t\t\t\tORDER BY u.lastname, ISNULL(u.nickname, u.firstname)"); ?> <table class="left"> <?php echo drawHeaderRow("Management Contact Numbers", 4); ?> <tr bgcolor="#F6F6F6" class="small"> <th align="left">Name</th> <th align="left">Title</th> <th align="left">Home #</th> <th align="left">Cell #</th> </tr> <?php while ($r = db_fetch($result)) { ?> <tr> <td><a href="view.php?id=<?php echo $r["user_id"]; ?> "><?php echo $r["first"]; ?> <?php echo $r["last"]; ?> </a></td>
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"); }
<?php include 'include.php'; echo drawTop(); if (db_grab('SELECT COUNT(*) FROM users WHERE is_active = 1') > 70) { if (!isset($_GET['id'])) { $_josh['request']['path_query'] .= '?id=1'; $_GET['id'] = 1; } echo drawNavigation(array('/staff/?id=1' => 'A - E', '/staff/?id=2' => 'F - J', '/staff/?id=3' => 'K - O', '/staff/?id=4' => 'P - T', '/staff/?id=5' => 'U - Z')); if ($_GET['id'] == 1) { $letters = ' AND (u.lastname LIKE "a%" OR u.lastname LIKE "b%" OR u.lastname LIKE "c%" OR u.lastname LIKE "d%" OR u.lastname LIKE "e%")'; } elseif ($_GET['id'] == 2) { $letters = ' AND (u.lastname LIKE "f%" OR u.lastname LIKE "g%" OR u.lastname LIKE "h%" OR u.lastname LIKE "i%" OR u.lastname LIKE "j%")'; } elseif ($_GET['id'] == 3) { $letters = ' AND (u.lastname LIKE "k%" OR u.lastname LIKE "l%" OR u.lastname LIKE "m%" OR u.lastname LIKE "n%" OR u.lastname LIKE "o%")'; } elseif ($_GET['id'] == 4) { $letters = ' AND (u.lastname LIKE "p%" OR u.lastname LIKE "q%" OR u.lastname LIKE "r%" OR u.lastname LIKE "s%" OR u.lastname LIKE "t%")'; } elseif ($_GET['id'] == 5) { $letters = ' AND (u.lastname LIKE "u%" OR u.lastname LIKE "v%" OR u.lastname LIKE "w%" OR u.lastname LIKE "x%" OR u.lastname LIKE "y%" OR u.lastname LIKE "z%")'; } } echo drawJumpToStaff(); echo drawStaffList('u.is_active = 1' . @$letters, getString('staff_empty'), $page['is_admin'] ? array('add_edit.php' => getString('add_new')) : false); echo drawBottom();
<?php include "../include.php"; drawTop(); drawNavigation(); $result = db_query("SELECT\n\t\t\t\t\t\tu.userID,\n\t\t\t\t\t\tu.lastname last,\n\t\t\t\t\t\tISNULL(u.nickname, u.firstname) first,\n\t\t\t\t\t\tu.title,\n\t\t\t\t\t\tu.homephone, \n\t\t\t\t\t\tu.homecell \n\t\t\t\t\tFROM intranet_users u\n\t\t\t\t\tWHERE u.rankid < 8 AND u.isactive = 1\n\t\t\t\t\tORDER BY u.lastname, ISNULL(u.nickname, u.firstname)"); ?> <table class="left"> <?php echo drawHeaderRow("Management Contact Numbers", 4); ?> <tr bgcolor="#F6F6F6" class="small"> <th align="left">Name</th> <th align="left">Title</th> <th align="left">Home #</th> <th align="left">Cell #</th> </tr> <?php while ($r = db_fetch($result)) { ?> <tr> <td><a href="view.php?id=<?php echo $r["userID"]; ?> "><?php echo $r["first"]; ?> <?php echo $r["last"]; ?> </a></td>
include 'include.php'; echo drawTop(); if (!isset($_GET['office_id'])) { $_GET['office_id'] = 1; $_josh['request']['path_query'] = '/staff/locations.php?office_id=1'; } $locations = db_query('SELECT o.id, o.name' . langExt() . ' FROM offices o WHERE o.is_active = 1 AND (SELECT COUNT(*) FROM users u WHERE u.is_active = 1 AND u.officeID = o.id) > 0 ORDER BY o.precedence'); if (db_found($locations)) { $pages = array(); $counter = 1; while ($l = db_fetch($locations)) { if ($counter < 6) { $pages['/staff/locations.php?office_id=' . $l['id']] = $l['name']; } else { if ($counter == 6) { $pages['/staff/locations.php?office_id=other'] = 'Other'; $others = array(); } $others[] = $l['id']; } $counter++; } echo drawNavigation($pages, 'path_query'); } if ($_GET['office_id'] == 'other') { echo drawStaffList('u.is_active = 1 AND u.officeID IN (' . implode(',', $others) . ')'); } else { echo drawStaffList('u.is_active = 1 and u.officeID = ' . $_GET['office_id']); } echo drawBottom();