include('config.php'); $res = mysql_query("SELECT * FROM fellepesek"); $sordb = mysql_num_rows($res); $oldalszam = $sordb / $darabszam; $oldalszam = ceil($oldalszam); $oldal = 1; session_start(); if($_SESSION['device'] == 'phone') header('Location:http://www.hotx.hu/2014/mobil/'); if(!@isset($_SESSION['device'])){ require_once 'Mobile_Detect.php'; $detect = new Mobile_Detect; $deviceType = ($detect->isMobile() ? ($detect->isTablet() ? 'tablet' : 'phone') : 'computer'); $scriptVersion = $detect->getScriptVersion(); if($deviceType == 'computer'){ header($link); $_SESSION['device'] = 'computer'; } elseif($deviceType == 'tablet'){header('Location:http://www.hotx.hu/2014/mobil/'); $_SESSION['device'] = 'tablet'; } elseif($deviceType == 'phone'){ header('Location:http://www.hotx.hu/2014/mobil/'); $_SESSION['device'] = 'phone'; } else { header($link); $_SESSION['device'] = 'else'; } } ?>