本文整理汇总了PHP中Mobile::setIsMobile方法的典型用法代码示例。如果您正苦于以下问题:PHP Mobile::setIsMobile方法的具体用法?PHP Mobile::setIsMobile怎么用?PHP Mobile::setIsMobile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mobile
的用法示例。
在下文中一共展示了Mobile::setIsMobile方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: stripslashes
if (get_magic_quotes_gpc()) {
$_POST['coach'] = stripslashes($_POST['coach']);
$_POST['passwd'] = stripslashes($_POST['passwd']);
}
if (!Coach::login($_POST['coach'], $_POST['passwd'], isset($_POST['remember']))) {
$_GET['section'] = 'login';
}
}
$isMobile = isset($_GET['mobile']) ? $_GET['mobile'] == '1' : false;
// Logout?
if ($_VISSTATE['POST_OUT'] = isset($_GET['logout'])) {
$_GET['section'] = 'main';
# Redirect logged out users to the main page.
Coach::logout();
}
Mobile::setIsMobile($isMobile);
if ($isMobile && !Coach::isLoggedIn()) {
// Redirect logged out mobile users to login
$_GET['section'] = 'login';
}
if ($_VISSTATE['COOCKIE'] || $_VISSTATE['POST_IN'] || $_VISSTATE['POST_OUT']) {
setupGlobalVars(T_SETUP_GLOBAL_VARS__POST_COACH_LOGINOUT);
}
if (Mobile::isMobile()) {
HTMLOUT::mobile_frame_begin(isset($_SESSION['logged_in']) ? $coach->settings['theme'] : $settings['stylesheet']);
# Make page frame, banner and menu.
MTS('Header loaded, login auth, html frame generated');
// Check if a menu-link was picked, and execute section code from sections.php accordingly.
switch ($_GET['section']) {
case 'login':
sec_login();