本文整理汇总了PHP中login_check函数的典型用法代码示例。如果您正苦于以下问题:PHP login_check函数的具体用法?PHP login_check怎么用?PHP login_check使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了login_check函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: login_receive
function login_receive()
{
login_check();
if (isset($_GET['lostpassword'])) {
login_password_recovery_receive();
}
if (isset($_GET['reg']) && isset($_POST['upsign'])) {
user_register();
}
}
示例2: mw1
function mw1()
{
$app = \Slim\Slim::getInstance();
$db = getConnection();
if (login_check($db) == true) {
return true;
} else {
$app->halt(401, 'Token Requerido');
}
}
示例3: __construct
public function __construct()
{
parent::__construct();
/* Load the libraries and helpers */
$this->load->model('admin/user_model');
$this->load->library('upload');
$this->load->library('pagination');
date_default_timezone_set('Asia/Kolkata');
$this->load->helper('login');
$this->load->library('encrypt');
login_check();
user_func_check();
}
示例4: already_login
function already_login()
{
if ($_SESSION['user']) {
// print $_SESSION['user'];
// header('Location: index.php');
// exit;
return True;
}
return login_check();
// header('Location: login.php');
// exit;
// return False;
}
示例5: login_new
function login_new($auth_user, $auth_pass)
{
if (check_password($auth_user, $auth_pass)) {
$user = login_check();
setcookie("aid", $auth_user, 60 * 60 * 10);
//クッキー名、保存内容、時間を指定
redirect("/dev/top.php");
//print "ログイン成功";
//redirect("02-01.php3?" . SID);
} else {
$error_msg = array();
$error_msg[] = "パスワードが違います。";
return $error_msg;
}
}
示例6: and
<meta charset="UTF-8">
<title>Secure Login: Admin</title>
<link rel="stylesheet" media="screen and (min-device-width: 668px)" type="text/css" href="css/style.css" />
<link rel="stylesheet" media="screen and (max-device-width: 667px)" type="text/css" href="css/mobile.css" />
<meta name="keywords" content="Arlen Education Tutoring" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=9" />
<meta name="viewport" content="user-scalable=no"/>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300,400' rel='stylesheet' type='text/css'>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/menu.js"></script>
<link rel="shortcut icon" href="images/favicon.ico">
</head>
<body>
<?php
if (login_check($mysql) == 1) {
?>
<!--Open the page-->
<div id="main">
<div id="header">
<div id="title">
<a href = "index.php"><img src="images/logo.png"/></a>
</div>
<div id="menubar">
<ul id="menu">
<li class="logout"><a href="includes/logout.php">LOG OUT</a></li>
</ul>
</div>
<div id = "menubutton">
<img src="images/menuwhite.png" onmouseover="this.src='images/menublue.png'" onmouseout="this.src='images/menuwhite.png'"/>
示例7: sec_session_start
include_once 'inc/functions.php';
sec_session_start();
if (login_check($conexion) == true) {
$logged = 'in';
} else {
$logged = 'out';
}
if (isset($_GET['error'])) {
echo '<p class="error">Error Logging In!</p>';
}
?>
<br/>
<form action="inc/process_login.php" method="post" name="login_form">
Usuario: <input type="text" name="usuario" /><br/>
Password: <input type="password"
name="password"
id="password"/>
<input type="button"
value="Login"
onclick="formhash(this.form, this.form.password);" />
</form>
<?php
if (login_check($conexion) == true) {
echo '<p>Currently logged ' . $logged . ' as ' . htmlentities($_SESSION['usuario']) . '.</p>';
echo '<p>Do you want to change user? <a href="inc/logout.php">Log out</a>.</p>';
} else {
echo '<p>Currently logged ' . $logged . '.</p>';
echo "<p>If you don't have a login, please <a href='register.php'>register</a></p>";
}
示例8: sec_session_start
<?php
include 'conexion.php';
include_once 'inc/functions.php';
sec_session_start();
$usuario = filter_input(INPUT_POST, 'usuario', $filter = FILTER_SANITIZE_STRING);
$password = filter_input(INPUT_POST, 'psha', $filter = FILTER_SANITIZE_STRING);
// The hashed password.
if (!login_check($conexion)) {
//no estas autorizado
if (isset($usuario, $password)) {
if (login($usuario, $password, $conexion) == true) {
// Éxito
$accion = "lista";
//acción por defecto
echo "<div class=\"logout\"> <a href=\"index.php?accion=logout\"> logout {$_SESSION['usuario']} </a></div>";
} else {
// Login error: no coinciden usuario y password
$accion = "login";
}
} else {
//significa que aún no has valores para usuario y password
$accion = "login";
}
} else {
//estás autorizado
$accion = basename(filter_input(INPUT_GET, 'accion', $filter = FILTER_SANITIZE_STRING));
switch ($accion) {
case 'login':
$accion = $default_action;
break;
示例9: sec_session_start
include_once 'includes/register.inc.php';
include_once 'includes/functions.php';
sec_session_start();
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Registrera lärare</title>
<link rel="stylesheet" type="text/css" href="css/style_register.css">
<script type="text/JavaScript" src="js/sha512.js"></script>
<script type="text/JavaScript" src="js/forms.js"></script>
</head>
<body>
<?php
if (login_check($mysqli) == true && htmlentities($_SESSION['rank']) == 1) {
// Kolla om man gjort något de senaste 40 min. Om inte, logga ut.
if (isset($_SESSION['LAST_ACTIVITY']) && time() - $_SESSION['LAST_ACTIVITY'] > 2400) {
session_unset();
// unset $_SESSION variable for the run-time
header('Location: includes/logout.php');
}
$_SESSION['LAST_ACTIVITY'] = time();
// updatera senaste aktivitet
?>
<h1>Registrera ny lärare</h1>
<hr>
<?php
if (!empty($error_msg)) {
echo $error_msg;
示例10: Header
$destination = INDEX_URL;
// Remember search query across login
if (!empty($_POST['searchQuery'])) {
$destination .= '?' . $_POST['searchQuery'];
}
Header("Location: " . $destination);
// Redirect authenticated member
exit;
} else {
print "Error:{$error}";
}
} elseif (defined('CERTAUTH_ENABLE') && CERTAUTH_ENABLE == TRUE) {
$_POST['username'] = $_SERVER['SSL_CLIENT_S_DN'];
$_POST['password'] = "nothing";
$_POST['authtype'] = "cert";
$error = login_check($_POST);
if (trim($error) == "") {
$_SESSION["member_id"] = login($_POST);
if (stristr($_SESSION["member_id"], "Invalid") == TRUE || stristr($_SESSION["member_id"], "Sorry") == TRUE) {
die($_SESSION["member_id"] . "<br><a href=" . INDEX_URL . ">Return</a>");
}
// Cdukes: 3/20/08: Carry post variables through login
// Ref: http://code.google.com/p/php-syslog-ng/issues/detail?id=35
// Header("Location: " .INDEX_URL); // Redirect authenticated member
$destination = INDEX_URL;
// Remember search query across login
if (!empty($_POST['searchQuery'])) {
$destination .= '?' . $_POST['searchQuery'];
}
Header("Location: " . $destination);
// Redirect authenticated member
示例11: error_reporting
<?php
require_once 'rl_init.php';
if ($options['auto_upload_disable']) {
require_once 'deny.php';
exit;
}
error_reporting(0);
ignore_user_abort(true);
login_check();
$id = 1;
require_once HOST_DIR . 'download/hosts.php';
require_once CLASS_DIR . 'http.php';
include TEMPLATE_DIR . 'header.php';
?>
<br />
<center>
<?php
// If the user submit to upload, go into upload page
if ($_GET['action'] == 'upload') {
// Define another constant
if (!defined('CRLF')) {
define('CRLF', "\r\n");
}
// The new line variable
$nn = "\r\n";
// Initialize some variables here
$uploads = array();
$total = 0;
$hostss = array();
// Get number of windows to be opened
示例12: sec_session_start
<?php
include_once 'includes/register.inc.php';
include_once 'includes/db_connect_functions.php';
sec_session_start();
if (login_check($mysqli) == false) {
header('Location: signin.php');
}
?>
<!doctype html>
<html class="signup no-js" lang="">
<!-- Mirrored from sublime.nyasha.me/admin/signup.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 26 Aug 2014 15:26:35 GMT -->
<head>
<!-- meta -->
<meta charset="utf-8">
<meta name="description" content="Flat, Clean, Responsive, application admin template built with bootstrap 3">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
<!-- /meta -->
<title>Sign Up</title>
<!-- page level plugin styles -->
<!-- /page level plugin styles -->
<!-- core styles -->
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="css/font-awesome.css">
<link rel="stylesheet" href="css/themify-icons.css">
示例13: date_default_timezone_set
<?php
$pageTitle = "Twitter";
date_default_timezone_set('UTC');
include_once 'includes/session.php';
// TODO, verify what happens if we post over the tweet length limit
// TODO, verify what happens if our tweet exceeds length limit yet contains a URL that will be shortened
// TODO, verify CURL doesn’t have issues (apparently it will)
// are we logged in? no → leave
if (!login_check()) {
header("Location: /");
exit;
} else {
$me = $_SESSION['u'];
}
// are we admin? no → leave
if (in_array($me, getAdmins())) {
} else {
header("Location: /");
exit;
}
include_once 'includes/functions_events.php';
include_once 'includes/functions_cast.php';
include_once 'includes/functions_twitter.php';
$action = "Failure";
$body = "";
$style = " panel-success";
$nextGameEvent = getNextEvent(false, 3600);
$nextCastEvent = getNextEvent(true, 3600);
$latestCast = getLatestCast();
$recentTweets = getRecentTweets();
示例14: sec_session_start
<?php
include 'db_connect.php';
include 'functions.php';
sec_session_start();
//custom way of starting session, code inside functions.php
// Login Check to guarantee user is logged in
// --------------------------------------------------------------------------------------------------------------------------------------
if (!login_check($link)) {
//Destroy session
session_destroy();
header('Location: index.php');
}
// --------------------------------------------------------------------------------------------------------------------------------------
//Query to get usertypename
$query = "SELECT UPPER(ut.userType) AS userType FROM users u, usertype ut\n\t\t\t\tWHERE u.id = ?\n\t\t\t\tAND u.userTypeId = ut.userTypeId ";
if ($stmt = $link->prepare($query)) {
mysqli_stmt_bind_param($stmt, 'i', $_SESSION['user_id']);
mysqli_stmt_execute($stmt);
$usertype_results = mysqli_stmt_get_result($stmt);
if ($usertype_results_rows = mysqli_fetch_assoc($usertype_results)) {
$usertype = $usertype_results_rows["userType"];
}
}
if (!($usertype == 'ADMINISTRATOR' || $usertype == 'OPERATOR')) {
// Destroy session
session_destroy();
header('Location: index.php');
}
// --------------------------------------------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------------------------
示例15: sec_session_start
<link rel="stylesheet" href="../includes/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="../includes/bootstrap/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="../includes/jquery-ui-1.11.4/jquery-ui.min.css">
<script type="text/javascript" src="../includes/jquery-ui-1.11.4/jquery-ui.min.js"></script>
<script type="text/javascript" src="../includes/jquery-2.1.4.min.js"></script>
<script src="../../bootstrap/js/bootstrap.min.js"></script>
</head>
<body>
<?php
include_once '../includes/functions.php';
include_once '../includes/connect.php';
sec_session_start();
if (!login_check($sql)) {
?>
<div class="row">
<div class="col-xs-12 col-sm-offset-1 col-sm-10 col-md-offset-2 col-md-8">
<h1 style="text-align:center" class="page-header">Login</h1>
<div class="row">
<div class="col-xs-offset-3 col-xs-6 col-sm-offset-4 col-sm-4 col-md-offset-4 col-md-4">
<?php
if (isset($_GET['fehler'])) {
echo "<div class='alert alert-danger' role='alert'><b>Oh nein!</b> Nutzername oder Passwort falsch. Bitte überprüfe deine Angaben!</div>";
}
if (isset($_GET['anm'])) {
echo "<div class='alert alert-danger' role='alert'><b>STOP!</b> Sie müssen sich zuerst anmelden!</div>";
}