Example #1
0
        <meta charset="utf-8">
        <title>Pagina</title>
        <link href="css/bootstrap.css" type="text/css" rel="stylesheet">
        <link href="css/estilo.css" type="text/css" rel="stylesheet">
        <script src="js/jquery-2.1.4.js" type="text/jscript"></script>
        <script src="js/bootstrap.js" type="text/javascript"></script>
        <script src="js/js.js" type="application/x-javascript"></script>
        
    </head>
    <body>
<?php 
session_start();
require_once "php/Session.php";
$_SESSION["id"] = 0;
$session = new Session("", "");
$session->validar("", "");
?>
    <div class="container">
    <!-- Inicio-->
            <div class="container inicio">
                <div class="subheader">
                    <div id="phone" class="pull-left">
                         <img src="images/email.png" alt="phone"/>
                            Siempre a tu servicio
                    </div>
                    <div id="email" class="pull-right p-container">
                        <?php 
echo $_SESSION["user"];
?>
                    </div>
                </div>
Example #2
0
<?php

session_start();
require_once "Session.php";
$session = new Session($_POST["nom"], $_POST["pass"]);
$user = $session->Iniciar();
foreach ($user as $row) {
    $_SESSION["id"] = $row['idusuario'];
    if ($row['clasificacion'] == 'administrador') {
        header('Location: ../indexa.php');
    } else {
        if ($row['clasificacion'] == 'cliente') {
            header('Location: ../indexu.php');
        }
    }
    $session->validar($row['imagen'], $row['nombre']);
}