本文整理汇总了PHP中USER::is_loggedin方法的典型用法代码示例。如果您正苦于以下问题:PHP USER::is_loggedin方法的具体用法?PHP USER::is_loggedin怎么用?PHP USER::is_loggedin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类USER
的用法示例。
在下文中一共展示了USER::is_loggedin方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: USER
<?php
session_start();
require_once 'class.user.php';
$session = new USER();
// if user session is not active(not loggedin) this page will help 'home.php and profile.php' to redirect to login page
// put this file within secured pages that users (users can't access without login)
if (!$session->is_loggedin()) {
// session no set redirects to login page
$session->redirect('../pages/login.php');
}
示例2: USER
<?php
session_start();
require_once '../config/class.user.php';
$user = new USER();
if ($user->is_loggedin()) {
$user->redirect('../home/index.php');
}
?>
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<!-- <meta name="viewport" content="width=device-width, initial-scale=1"> -->
<meta name="description" content="Control Parental, Internet por fin segura">
<meta name="keywords" content="Parental control,Control parental,parental,control, seguridad, internet, niños, seguros, navegación, filtros, antivirus, internet segura, firewall, cortafuego, analisis, paginas, seguras">
<meta name="author" content="admin@wadisa.com">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<!--<meta name="viewport" content="width=device-width, initial-scale=1.0">-->
<link rel="apple-touch-icon" href="../imagenes/touch-icon-iphone.png">
<link rel="apple-touch-icon" sizes="76x76" href="../imagenes/touch-icon-ipad.png">
<link rel="apple-touch-icon" sizes="120x120" href="../imagenes/touch-icon-iphone-retina.png">
<link rel="apple-touch-icon" sizes="152x152" href="../imagenes/touch-icon-ipad-retina.png">
<link href="../imagenes/buhonet.png" rel="apple-touch-startup-image" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta content="true" name="HandheldFriendly" />
示例3: USER
<?php
session_start();
require_once "../php-assets/class.user.php";
$login = new USER();
if ($login->is_loggedin() != "") {
$login->redirect('advert-overview.php');
}
if (isset($_POST['login-button'])) {
$user_email = strip_tags($_POST['user-email']);
$user_password = strip_tags($_POST['user-password']);
if ($login->doLogin($user_email, $user_password)) {
$login->redirect('advert-overview.php');
} else {
$error[] = "Je inloggegevens zijn niet correct.";
}
}
?>
<!doctype html>
<html class="no-js" lang="nl">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Aanmelden</title>
<link rel="stylesheet" href="../css/minimum-viable-product.min.css">
</head>
<body>
<div class="full-width full-width-login">
<div class="half-height-gradient"></div>
<div class="row">
<div class="large-4 medium-6 small-12 small-centered columns login-input-panel">
示例4: USER
<?php
session_start();
require_once '../php-assets/class.user.php';
$user = new USER();
if ($user->is_loggedin() != "") {
$user->redirect('advert-overview.php');
}
if (isset($_POST['register-button'])) {
$user_first_name = strip_tags(htmlentities($_POST['user-first-name'], ENT_COMPAT, 'UTF-8'));
$user_last_name = strip_tags(htmlentities($_POST['user-last-name'], ENT_COMPAT, 'UTF-8'));
$user_email = strip_tags($_POST['user-email']);
$user_password = strip_tags($_POST['user-password']);
try {
$stmt = $user->runQuery("SELECT user_firstname, user_email FROM tbl_user WHERE user_firstname=:user_first_name OR user_email=:user_email");
$stmt->execute(array(':user_first_name' => $user_first_name, ':user_email' => $user_email));
$row = $stmt->fetch(PDO::FETCH_ASSOC);
if ($row['user_email'] == $user_email) {
$error[] = "Er is al een account aangemaakt met dit e-mail adres.";
} else {
if ($user->register($user_first_name, $user_last_name, $user_email, $user_password)) {
$user->doLogin($user_email, $user_password);
$user->redirect('advert-overview.php');
}
}
} catch (PDOException $e) {
echo $e->getMessage();
}
}
?>
<!doctype html>
示例5: USER
<?php
require_once "../config/session.php";
require_once "../config/class.user.php";
$auth_user = new USER();
$user_id = $_SESSION['user_session'];
if (!$auth_user->is_loggedin()) {
$auth_user->redirect('../login/index.php');
}
$stmt = $auth_user->runQuery("SELECT * FROM users WHERE user_id=:user_id");
$stmt->execute(array(":user_id" => $user_id));
$userRow = $stmt->fetch(PDO::FETCH_ASSOC);
?>
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<!-- <meta name="viewport" content="width=device-width, initial-scale=1"> -->
<meta name="description" content="Control Parental, Internet por fin segura">
<meta name="keywords" content="Parental control,Control parental,parental,control, seguridad, internet, niños, seguros, navegación, filtros, antivirus, internet segura, firewall, cortafuego, analisis, paginas, seguras">
<meta name="author" content="admin@wadisa.com">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<!--<meta name="viewport" content="width=device-width, initial-scale=1.0">-->
<link rel="apple-touch-icon" href="../imagenes/touch-icon-iphone.png">
<link rel="apple-touch-icon" sizes="76x76" href="../imagenes/touch-icon-ipad.png">
<link rel="apple-touch-icon" sizes="120x120" href="../imagenes/touch-icon-iphone-retina.png">
示例6: USER
<?php
require_once 'session.php';
require_once 'class.user.php';
$user_logout = new USER();
if ($user_logout->is_loggedin() != "") {
$user_logout->redirect('../home/index.php');
}
if (isset($_GET['logout']) && $_GET['logout'] == "true") {
$user_logout->doLogout();
$user_logout->redirect('../login/index.php');
}
示例7: USER
<?php
session_start();
require_once "../config/class.user.php";
$login = new USER();
if ($login->is_loggedin()) {
$login->redirect('../home/index.php');
}
?>
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<!-- <meta name="viewport" content="width=device-width, initial-scale=1"> -->
<meta name="description" content="Control Parental, Internet por fin segura">
<meta name="keywords" content="Parental control,Control parental,parental,control, seguridad, internet, niños, seguros, navegación, filtros, antivirus, internet segura, firewall, cortafuego, analisis, paginas, seguras">
<meta name="author" content="admin@buhonet.es">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<!--<meta name="viewport" content="width=device-width, initial-scale=1.0">-->
<link rel="apple-touch-icon" href="../imagenes/touch-icon-iphone.png">
<link rel="apple-touch-icon" sizes="76x76" href="../imagenes/touch-icon-ipad.png">
<link rel="apple-touch-icon" sizes="120x120" href="../imagenes/touch-icon-iphone-retina.png">
<link rel="apple-touch-icon" sizes="152x152" href="../imagenes/touch-icon-ipad-retina.png">
<link href="../imagenes/buhonet.png" rel="apple-touch-startup-image" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta content="true" name="HandheldFriendly" />
<title><?php