Пример #1
0
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    // End if session not set
    // Categorize Tablets as desktops
    if ($catergorize_tablets_as_desktops && $_SESSION[$category] == "tablet") {
        $_SESSION[$category] = "desktop";
    }
    // Categorize TVs as desktops
    if ($catergorize_tvs_as_desktops && $_SESSION[$category] == "tv") {
        $_SESSION[$category] = "desktop";
    }
    // Sets $device = to what category UA falls into
    return $_SESSION[$category];
    // Redirect
    /*if ($device == 'mobile') {
    	// direct user to below URL
    	header("location: http://www.mobile-site.com");
    }*/
}
// End categorizr redirect function
$device = categorizr_redirect();
Пример #2
0
if (is_dir($application_folder)) {
    define('APPPATH', $application_folder . '/');
} else {
    if (!is_dir(BASEPATH . $application_folder . '/')) {
        exit("Your application folder path does not appear to be set correctly. Please open the following file and correct this: " . SELF);
    }
    define('APPPATH', BASEPATH . $application_folder . '/');
}
define("PATH_HOST", $_SERVER['HTTP_HOST']);
define("PATH_URI", "/");
/*
 * --------------------------------------------------------------------
 * LOAD THE BOOTSTRAP FILE
 * --------------------------------------------------------------------
 *
 * And away we go...
 *
 */
require_once BASEPATH . 'core/CodeIgniter' . EXT;
/* End of file index.php */
/* Location: ./index.php */
include_once 'inc/mobile_device.php';
$device = isset($_GET['mobile']) ? "mobile" : categorizr_redirect();
/*Device detection */
if (PATH_URI == $_SERVER['REQUEST_URI'] || "/?mobile" == $_SERVER['REQUEST_URI'] || "/?desktop" == $_SERVER['REQUEST_URI']) {
    if ("desktop" == $device) {
        require_once "newwelcome/index.php";
    } else {
        require_once "newwelcome/mobile.php";
    }
}
Пример #3
0
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    // End if session not set
    // Categorize Tablets as desktops
    if ($catergorize_tablets_as_desktops && $_SESSION[$category] == "tablet") {
        $_SESSION[$category] = "desktop";
    }
    // Categorize TVs as desktops
    if ($catergorize_tvs_as_desktops && $_SESSION[$category] == "tv") {
        $_SESSION[$category] = "desktop";
    }
    // Sets $device = to what category UA falls into
    $device = $_SESSION[$category];
    // Redirect
    if ($device == 'mobile') {
        // direct user to below URL
        header("location: http://www.mobile-site.com");
    }
}
// End categorizr redirect function
categorizr_redirect();