当前位置: 首页>>代码示例>>PHP>>正文


PHP USER::is_loggedin方法代码示例

本文整理汇总了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');
}
开发者ID:kangube,项目名称:kangu-product,代码行数:11,代码来源:class.session.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" />
开发者ID:walterleonardo,项目名称:Php,代码行数:31,代码来源:registrarme.php

示例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">
开发者ID:kangube,项目名称:kangu-product,代码行数:31,代码来源:login.php

示例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>
开发者ID:kangube,项目名称:kangu-product,代码行数:31,代码来源:register.php

示例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">
开发者ID:walterleonardo,项目名称:Php,代码行数:31,代码来源:cambiarclave.php

示例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');
}
开发者ID:walterleonardo,项目名称:Php,代码行数:12,代码来源:logout.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 
开发者ID:walterleonardo,项目名称:Php,代码行数:31,代码来源:password.php


注:本文中的USER::is_loggedin方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。