function mysqliCheck(){ global $mysqli; if(is_resource($mysqli) && get_resource_type($mysqli)==='mysql link') return true; else return false; } ?> $mysqli = new mysqli($config['slab_dbhost'],$config['slab_dbuser'],$config['slab_dbpw'],$config['slab_dbname']) or die($mysqli->connect_error); $page = preg_replace('/[^a-z0-9\-]/','',$page); $pagetitle = preg_replace('/[^a-z0-9\-]/','%',$page); if($page == 'contact' && $config['v'] < '2.3.4') $page = 'contactus'; if(!in_array($page, $config['all_modules'])){ $sql = "select id from $multitable where title like '%$pagetitle%' or custom_url like '$page' order by id desc limit 0,1"; $result = $mysqli->query($sql); $total = $mysqli->affected_rows; if($total == 1){ $row = $result->fetch_array(MYSQLI_ASSOC); $foundpage = find_this_page($row['id']); slab_refresh($foundpage); } else { slab_whack_hack($page,$table_prefix); } } $subpages = array('downloads','gigs'); $newpage = array('resources','calendar'); if(isset($config['slab_seo']) && $config['v'] < '2.3.4') include $common_path.'/seo/meta.php'; // keep this here! 2009-09-09 /* if($config['slab500_tracking']){ // only by demand - too huge. $userid = intval($_SESSION['SLAB500_userid']); if(empty($_SESSION['SLAB500_visitor'])){ session_register('SLAB500_visitor'); $_SESSION['SLAB500_visitor'] = session_id(); } // if there is no unique session for this visitor, create one. $session = $_SESSION['SLAB500_visitor']; $query = preg_replace('/[^a-z0-9\-\?=&\.%;]/i','',$_SERVER['QUERY_STRING']); $sql = "insert into zz_tracking set prefix = '$table_prefix', type = 'page view', session = '$session', userid = $userid, query = '$query', updated = now()"; if($session) $trackit = $mysqli->query($sql) or die(mysql_error()); } */ // quick display DEPRICATED? /* if(!$_GET['page'] && !$_GET['family'] && !$_GET['category'] && !$_GET['display'] && ($_GET['d'] || $_GET['c'])){ if(is_numeric($_GET['d'])) $getquickresult = mysql_query("select id from $multitable where id = ".intval($_GET['d'])." limit 0,1 ") or die('could not quick select'); elseif(!is_numeric($_GET['c'])) $getquickresult = mysql_query("select id from $multitable where category like '%".clean_it($_GET['c'])."' limit 0,1 ") or die('could not quick select'); $row = mysql_fetch_row($getquickresult); $foundpage = find_this_page($row[0]); if($_GET['page'] != '404') slab_refresh($foundpage); else echo 'not found'; } // if quick display */ //for custom_url //if($_GET['p']) // $page = 'p'; $mysqli->close(); ?>
index_headers('light',true,true); ?>