$smartphone_detected = false;
if( isset( $_REQUEST['action'] ) and $_REQUEST['action'] == "mobiledisable" ) $_SESSION['mobile_disable'] = 1;
if( isset( $_REQUEST['action'] ) and $_REQUEST['action'] == "mobile" ) { $_SESSION['mobile_enable'] = 1; $_SESSION['mobile_disable'] = 0;}
if( !isset( $_SESSION['mobile_disable'] ) ) $_SESSION['mobile_disable'] = 0;
if( !isset( $_SESSION['mobile_enable'] ) ) $_SESSION['mobile_enable'] = 0;
if ( $config['allow_smartphone'] AND !$_SESSION['mobile_disable'] ) {
if ( check_smartphone() ) {
if ( @is_dir ( ROOT_DIR . '/templates/smartphone' ) ) {
$config['skin'] = "smartphone";
$smartphone_detected = true;
$config['allow_comments_wysiwyg'] = "no";
}
}
}