Ejemplo n.º 1
0
                        <ul class="list-group">
                            <li class="list-group-item active">' . taglia($i) . '</li>';
    for ($j = 1; $j <= 10; $j++) {
        echo '
                            <li class="list-group-item"><strong>' . colore($j) . ': </strong>' . $dati['database']->count("felpe", array("AND" => array("taglia" => $i, "colore" => $j))) . '</li>';
    }
    echo '
                        </ul>
                    </div>';
}
echo '
                </div>
                <hr>
                <div class="row">';
for ($i = 1; $i <= 10; $i++) {
    echo '
                    <div class="col-xs-12 col-md-6">
                        <ul class="list-group">
                            <li class="list-group-item active">' . colore($i) . '</li>';
    for ($j = 1; $j <= 6; $j++) {
        echo '
                            <li class="list-group-item"><strong>' . taglia($j) . ': </strong>' . $dati['database']->count("felpe", array("AND" => array("taglia" => $j, "colore" => $i))) . '</li>';
    }
    echo '
                        </ul>
                    </div>';
}
echo '
                </div>
            </div>';
require_once 'templates/shared/footer.php';
Ejemplo n.º 2
0
// $identif=$_GET['a'];
$link = mysql_connect("mysql6.000webhost.com", "a5996766_hab", "blazing12");
mysql_select_db("a5996766_bib", $link);
// echo "<p>$identif</p>";
// echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Libros del profesor:&nbsp;&nbsp;"."<strong>".$_SESSION['k_username2']."</strong>";
echo "<br><br><br>";
include "libchart/classes/libchart.php";
//	$chart2 = new VerticalBarChart(800,300);
$chart2 = new HorizontalBarChart(800, 300);
//	$chart2 = new PieChart(800,300);
$chart2->getConfig()->setUseMultipleColor(true);
function colore()
{
    return new Color(rand(0, 215), rand(0, 215), rand(0, 215));
}
$chart2->getPlot()->getPalette()->setBarColor(array(colore(), colore(), colore(), colore(), colore(), colore(), colore(), colore(), colore(), colore(), colore(), colore(), colore(), colore(), colore()));
//$chart2->getPlot()->getPalette()->setBarColor(array(
//new Color(255, 0, 0),
//		new Color(255, 255, 255),
//			new Color(255, 125, 50),
//						new Color(255, 125, 0),
//	));
//$chart2 = new PieChart(800,300);
//$chart2 = new LineChart(800,300);
$dataset = new XYDataSet();
$profe = $_SESSION['k_username2'];
$result = mysql_query("select * from profesores", $link);
$cantLibros = 0;
// echo "<table border=1>";
// echo "<tr style='font-weight:bold; color:blue;'><td>ID Libro</td><td>Titulo</td><td>Autor</td><td>Año</td><td>Editorial</td><td>Genero</td><td>Num Paginas</td><td>Existentes</td></tr>";
while ($row = mysql_fetch_array($result)) {
Ejemplo n.º 3
0
    require_once 'pdf.php';
    $pdf = new PDF();
    $persone = $dati['database']->select("persone", "*", array("ORDER" => "id"));
    $studenti = $dati['database']->select("studenti", "*", array("id" => $dati['database']->max("studenti", "id")));
    $felpe = $dati['database']->select("felpe", "*");
    $datas = $dati['database']->select("classi", "*");
    if ($datas != null) {
        foreach ($datas as $data) {
            $text = "";
            $cont = 0;
            foreach ($studenti as $key => $studente) {
                if ($studente["classe"] == $data["id"]) {
                    $persona = ricerca($persone, $studente["persona"]);
                    $felpa = ricerca($felpe, $persone[$persona]["id"]);
                    if ($persona != -1 && $felpa != -1) {
                        if ($cont != 0) {
                            $text .= "</brnewline>";
                        }
                        $cont++;
                        $text .= $persone[$persona]["nome"] . "<br>Colore: " . colore($felpe[$felpa]["colore"]) . "<br>Taglia: " . taglia($felpe[$felpa]["taglia"]);
                    }
                    unset($studenti[$key]);
                }
            }
            if ($cont != 0) {
                $pdf->Chapter("Ordini della classe " . $data["nome"], $text);
            }
        }
    }
    $pdf->Output();
}
Ejemplo n.º 4
0
             </div>
         </div>
         <hr>
         <div class="container">';
     $totale = 0;
     $results = $dati['database']->select("felpe", "*", array("persona" => $dati["user"]));
     if ($results != null) {
         foreach ($results as $result) {
             $totale += 20;
             echo '
             <div class="row">
                 <div class="col-xs-12 col-md-2">
                     <img class="img-thumbnail img-responsive" src="' . $dati['info']['path'] . 'images/felpa' . $result["colore"] . '.jpg">
                 </div>
                 <div class="col-xs-12 col-md-10">
                     <p><strong>Colore: </strong>' . colore($result["colore"]) . '</p>
                     <p><strong>Taglia: </strong>' . taglia($result["taglia"]) . '</p>
                     <p><strong>Nota: </strong>' . $result["nota"] . '</p>
                     <p><strong>Costo: </strong> 20 &euro;</p>
                     <a class="btn btn-danger" href="' . $dati['info']['root'] . 'elimina/felpa/' . $result["id"] . '"><i class="fa fa-chain-broken "></i> Elimina ordine</a>
                     <a class="btn btn-info pull-right" href="' . $dati['info']['root'] . 'modifica/felpa/' . $result["id"] . '"><i class="fa fa-pencil"></i> Modifica ordine</a>
                 </div>
             </div>
             <hr>';
         }
     }
     echo '
             <h3 class="text-center"><strong>Totale: </strong>' . $totale . ' &euro;</h3>
         </div>';
     require_once 'shared/footer.php';
 }