settings( $cfg_db ); $db->connect(); # device detection #require_once 'classes/detection//Mobile_Detect.php'; #$detect = new Mobile_Detect; include ( "pages.php" ); # select site # if( $_SERVER['HTTP_X_REQUESTED_WITH'] ) echo $main_content; # else { # if( preg_match( "#^(m(obile)?\.)#", $_SERVER["SERVER_NAME"] ) || $detect->isMobile() ) # include ( "view_mobile.php" ); # else include ( "view_desktop.php" ); # } ?>