Exemple #1
0
          <!-- Tabella di utenti -->
          <div class="table-responsive"> 
            <table class="table table-striped table-bordered table-hover table-responsive">
              <thead>
                <tr>
                  <th>Email</th>
                  <th>Nome</th>
                  <th>Cognome</th>
                  <th>Data di iscrizione</th>
                  <th>Newsletter</th>
                </tr>
              </thead>
              <tbody>
                <?php 
require_once '../Utility/databaseZalando.php';
$db = new DatabaseZalando();
$db->connetti();
try {
    $result = $db->exec('select email, nome, cognome, data_iscrizione, newsletter from Utente where 1;');
    if ($result !== true) {
        while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
            echo '<tr><td>' . $row['email'] . '</td><td>' . $row["nome"] . '</td><td>' . $row["cognome"] . '</td><td>' . $row["data_iscrizione"] . '</td><td>' . $row["newsletter"] . '</td></tr>';
        }
    }
    $result = null;
} catch (DatabaseException $e) {
    echo 'Impossibile connettersi al Database';
}
$db->disconnetti();
?>
                </tbody>
Exemple #2
0
    switch ($_GET["sesso"]) {
        case 'uomo':
            return 'm';
            break;
        case 'donna':
            return 'f';
            break;
        case 'bambino':
            return 'bo';
            break;
        default:
            return 'ba';
            break;
    }
}
$db = new DatabaseZalando();
$db->connetti();
try {
    $result = $db->exec('select nome, tipolv1, tipolv2, prezzo, sconto, disponibilita from Abito where sesso = "' . sessoToFlag() . '";');
    if ($result !== true) {
        while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
            echo '<tr><td>' . $row['nome'] . '</td><td>' . $row["tipolv1"] . ", " . $row["tipolv2"] . '</td><td>' . $row["prezzo"] . '</td><td>' . $row["sconto"] . '</td><td>' . $row["disponibilita"] . '</td></tr>';
        }
    }
    $result = null;
} catch (DatabaseException $e) {
    echo 'Impossibile connettersi al Database';
}
$db->disconnetti();
?>
                </tbody>
Exemple #3
0
<?php

require_once 'AdminLTE-2.3.0/custom/Utility/databaseZalando.php';
$db = new DatabaseZalando();
$db->connetti();
$res = $dbz->exec('select * 
				   from (abito
				   left join valutare 
				   on valutare.abito = abito.codice)
				   right join utente
				   on valutare.utente = utente.email
				   where valutare.statuscommento = {$_GET["filter"]};');
$assoc = mysql_fetch_assoc($res);
$res = "<tr>";
while ($row = mysql_fetch_assoc($result)) {
    $res = $res . '<th><span class="autore">{$row["nomeutente"]}</span><span class="email">{$row["utente"]}</span>
    	<span class="datapubblicazione">{$row["data"]}</span></th>
		<th><span class="statuscommento">{$row["statuscommento"]}</span><hr><span class="commento">{$row["commento"]}</span></th>
		<th><a href="#" class="linkabito">{$row["descrizioneabito"]}</a> - <span class="idabito">{$row["abito"]}</span></th>';
}
mysql_free_result($res);
$dbz->disconnetti();
return $res . '</tr>';