function JB_show_sub_menu_item($item) { if ($item['condition1'] != '' && defined($item['condition1'])) { eval("\$def1 = " . $item['condition1'] . ";"); } if ($item['condition2'] != '' && defined($item['condition2'])) { eval("\$def2 = " . $item['condition2'] . ";"); } if ($item['cond'] == 'OR') { if ($def1 == 'YES' || $def2 == 'YES') { } else { return false; } } if ($item['cond'] == 'AND') { if ($def1 == 'YES' && $def2 == 'YES') { } else { return false; } } $MM =& get_JBMenuMarkup_object(); $MM->sub_menu_item($item); return true; }
function head_open() { /* Older templates do not call $JBMarkup->head_open(); Therefore, $this->head_opened is used to track if the template called head_open() */ $this->head_opened = true; // for compatibility with older templates. echo '<head>' . "\n"; if ($this->menu_switch) { // this section resided at the top of employers-header.php prior to 3.6 if (JB_EMPLOYER_MENU_TYPE == 'JS' || JB_CANDIDATE_MENU_TYPE == 'JS') { $MM =& get_JBMenuMarkup_object(); $MM->header(); } } if ($this->overlib_switch) { // This used for the resume list to pop-up a thumnail over the list // Resided in employers-header.php and candidates-header.php prior to 3.6 ?> <script type="text/javascript" src="<?php echo jb_get_overlib_js_src(); ?> "><!-- overLIB (c) Erik Bosrup --></script> <?php } if ($this->wz_dragdrop_switch && JB_MAP_DISABLED != 'YES') { // This used for dragging a pin layer over a map ?> <script type="text/javascript" src="<?php echo jb_get_WZ_dragdrop_js_src(true); ?> "></script> <?php } if ($this->jquery_switch) { ?> <script type="text/javascript" src="<?php echo jb_get_JQuery_src(); ?> "></script> <?php } if ($this->application_switch) { // script for the 'apply' button on the post ?> <script type="text/javascript"> function showDIV(obj, source, bool) { obj.setAttribute("style", "display: none", 0); if (bool == false) { document.getElementById (source).innerHTML=document.getElementById('app_form').innerHTML; document.getElementById ('app_form').innerHTML=document.getElementById('app_form_blank').innerHTML; } else { obj.innerHTML = document.getElementById(source).innerHTML; obj.setAttribute("style", "display: block", 0); } return bool; } </script> <?php } if ($this->colorbox_switch) { ?> <script type="text/javascript" src="<?php echo JB_BASE_HTTP_PATH; ?> include/lib/colorbox/jquery.colorbox-min.js"></script> <?php } ?> <script type="text/javascript" src="<?php echo JB_get_common_js_url(); ?> "></script> <?php JBPLUG_do_callback('extra_header', $this); // plugins can include their own javascript in to the header here echo $this->trigger_handler('header'); if ($on_load = $this->trigger_handler('onload_function')) { ?> <script type="text/javascript"> function init_onload() { <?php echo $on_load; ?> } </script> <?php } }
function JB_tabbed_show_sub_menu_item($item) { $MM =& get_JBMenuMarkup_object('TABBED'); if (!JB_tabbed_test_menu_item_condition($item)) { return false; } if (isset($_REQUEST['file']) && $_REQUEST['file']) { $file = $_REQUEST['file']; } else { $file = basename($_SERVER['PHP_SELF']); } if ($_REQUEST['type'] == 'premium') { // special case when posting a premium post $file = "post.php?type=premium"; } if ($_REQUEST['post_id'] != '') { $_REQUEST['post_id'] = (int) $_REQUEST['post_id']; $file = 'post.php?post_id=' . $_REQUEST['post_id']; } // These function can be used to display // from a plugin (InfoPages) or from employers/ & candidates/ // - when display from a plugin, a $_REQUEST['file'] parameter would be available if ($item['link'] == $file || $item['file_name'] == $file) { $MM->sub_menu_item($item, true); } else { // inactive $MM->sub_menu_item($item, false); } return true; }