} else { echo '<body>'; } // Determine type of web browser. $browser_type = detect_browser_type(); if ($browser_type == 'mobile' || $browser_type == 'tablet') { $_SESSION['touch'] = 'yes'; } if ($vars['touch'] == "yes") { $_SESSION['touch'] = 'yes'; } if ($vars['touch'] == "no") { unset($_SESSION['touch'], $vars['touch']); } if ($_SESSION['authenticated']) { $allow_mobile = in_array(detect_browser_type(), array('mobile', 'tablet')) ? $config['web_mouseover_mobile'] : TRUE; if ($config['web_mouseover'] && $allow_mobile) { // Enable qTip tooltips register_html_resource('js', 'jquery.qtip.min.js'); } // Do various queries which we use in multiple places include $config['html_dir'] . "/includes/cache-data.inc.php"; // Include navbar if ($vars['bare'] != "yes") { include $config['html_dir'] . "/includes/navbar.inc.php"; } } ?> <div class="container">
function overlib_link($url, $text, $contents, $class = NULL, $escape = FALSE) { global $config, $link_iter; $link_iter++; $href = strlen($url) ? 'href="' . $url . '"' : ''; if ($escape) { $text = escape_html($text); } // Allow the Grinch to disable popups and destroy Christmas. $allow_mobile = in_array(detect_browser_type(), array('mobile', 'tablet')) ? $config['web_mouseover_mobile'] : TRUE; if ($config['web_mouseover'] && strlen($contents) && $allow_mobile) { $output = '<a ' . $href . ' class="tooltip-from-data ' . $class . '" style="cursor: pointer;" data-tooltip="' . escape_html($contents) . '">' . $text . '</a>'; } else { $output = '<a ' . $href . ' class="' . $class . '">' . $text . '</a>'; } return $output; }
$(function() { $(\'form#searchform\').each(function() { $(this).find(\'input\').keypress(function(e) { if (e.which==10 || e.which==13) { //console.log($(\'div#suggestions > li > a\').first().prop(\'href\')); $(\'form#searchform\').prop(\'action\', $(\'div#suggestions > li > a\').first().prop(\'href\')); // Only submit if we actually have a suggestion to link to if ($(\'div#suggestions > li > a\').length > 0) { this.form.submit(); } } }); }); }); '); $ua = array('browser' => detect_browser_type()); if ($_SESSION['touch'] == "yes") { $ua['url'] = generate_url($vars, array('touch' => 'no')); } else { $ua['url'] = generate_url($vars, array('touch' => 'yes')); } if ($vars['touch'] == 'yes') { $ua['icon'] = 'glyphicon glyphicon-hand-up'; } elseif ($ua['browser'] == 'mobile') { $ua['icon'] = 'glyphicon glyphicon-phone'; } elseif ($ua['browser'] == 'tablet') { $ua['icon'] = 'icon-tablet'; } else { $ua['icon'] = 'icon-laptop'; } $ua['content'] = 'Your current IP: ' . $_SERVER['REMOTE_ADDR'] . '<br />';