本文整理汇总了PHP中dao::logeUsu方法的典型用法代码示例。如果您正苦于以下问题:PHP dao::logeUsu方法的具体用法?PHP dao::logeUsu怎么用?PHP dao::logeUsu使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dao
的用法示例。
在下文中一共展示了dao::logeUsu方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: unset
break;
case 4:
unset($_SESSION['especi']);
$objDAO = new dao();
$especi = $objDAO->listespeci();
$_SESSION['especi'] = $especi;
header('Location: ../view/especiales.php');
break;
case 5:
unset($_SESSION['logeusu']);
$objDAO = new dao();
$email = $_REQUEST['txtemail'];
$pass = $_REQUEST['txtpass'];
$_SESSION['email'] = $email;
$_SESSION['pass'] = $pass;
$logeusu = $objDAO->logeUsu($email, $pass);
foreach ($logeusu as $raw) {
$nomusu = $raw[1];
$codusu = $raw[0];
$rol = $raw[4];
}
if ($logeusu != null) {
$_SESSION['nomusu'] = $nomusu;
$_SESSION['codusu'] = $codusu;
$_SESSION['rol'] = $rol;
$_SESSION['acceso'] = true;
header("Location: ../view/index.php");
} else {
$_SESSION['msg'] = 'User Error';
header("Location: ../view/login.php");
}
示例2: unset
<?php
session_start();
include '../dao/dao.php';
$op = $_REQUEST['op'];
switch ($op) {
case 1:
unset($_SESSION['logeusu']);
$objDAO = new dao();
$usu = $_REQUEST['username'];
$pass = $_REQUEST['password'];
$_SESSION['usu'] = $usu;
$_SESSION['pass'] = $pass;
$logeusu = $objDAO->logeUsu($usu, $pass);
foreach ($logeusu as $raw) {
$nomusu = $raw[1];
$codusu = $raw[0];
$rol = $raw[2];
}
if ($logeusu != null) {
$_SESSION['nomusu'] = $nomusu;
$_SESSION['codusu'] = $codusu;
$_SESSION['rol'] = $rol;
$_SESSION['acceso'] = true;
header("Location: ../vista/index.php");
} else {
$_SESSION['msg'] = 'Error de Usuario';
header("Location: ../vista/login.php");
}
break;
case 2: