コード例 #1
0
function index()
{
    require_once '../../Model/UserClass.php';
    global $connection;
    global $navegador;
    global $navegadorAdmin;
    $titulo = 'Titulo';
    $description = 'description';
    $palabrasClaves = 'palabrasClaves';
    // Obtener type user
    $user = new UserClass($connection);
    $user->fetch($_SESSION['idRow']);
    $userType = $user->roll;
    //    $userType = 'user';
    if ($userType == '0') {
        require_once '../../View/Back/home.php';
    } elseif ($userType == '1') {
        $navegador = $navegadorAdmin;
        require_once '../../View/Back/homeAdmin.php';
    }
}
コード例 #2
0
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
require_once '../../app/config.php';
session_start();
// puedo crear un usuario que pueda leer y crear una cuenta
require_once '../../app/connection/Connexion.php';
$connection = new Connexion($dbName, $host, $user, $pass);
//$connection= new Connexion($dataBaseName, $host, $user, $pass);
$user = '';
$navegador = array(array('string' => 'Products ', 'url' => 'controller.php?f=products'), array('string' => 'Cart', 'url' => 'controller.php?f=cart'), array('string' => 'Login ', 'url' => 'controller.php?f=login'), array('string' => 'Register ', 'url' => 'controller.php?f=myProfil'));
if (isset($_SESSION['idRow'])) {
    require_once '../../Model/UserClass.php';
    $user = new UserClass($connection);
    $user->fetch($_SESSION['idRow']);
    $navegador = array(array('string' => 'Products ', 'url' => 'controller.php?f=products'), array('string' => 'Cart', 'url' => 'controller.php?f=cart'), array('string' => 'My profile ', 'url' => 'controller.php?f=myProfil'), array('string' => 'Logout', 'url' => '../Back/controller.php?f=logout'));
}
function index()
{
    require_once '../../Model/functions.php';
    require_once '../../Model/ProductClass.php';
    global $navegador;
    global $user;
    global $connection;
    $titulo = 'David\'s SHOP';
    $description = 'description';
    $palabrasClaves = 'palabrasClaves';
    $slide = array();
    $productsSlide = productsSlide($connection);
    foreach ($productsSlide as $key => $idProduct) {