NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

<!DOCTYPE html>
<html lang="it">
<head>
<meta charset="utf-8">
<title>Database Auto</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!-- Loading Bootstrap -->
<link href="bootstrap/css/bootstrap.css" rel="stylesheet">

<!-- Loading Flat UI -->

<link href="css/flat-ui.css" rel="stylesheet">
<link href="css/animate.css" rel="stylesheet">

<link rel="shortcut icon" href="images/favicon.ico">

<!-- jQuery: required (tablesorter works with jQuery 1.2.3+) -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

<!-- Pick a theme, load the plugin & initialize plugin -->
<link href="tablesorter/theme.ice.css" rel="stylesheet">
<script src="tablesorter/jquery.tablesorter.min.js"></script>
<script src="tablesorter/jquery.tablesorter.widgets.min.js"></script>
<?php
$con = mysql_connect("localhost", "matteo1234", "") or die("Errore: " . mysql_error());
mysql_select_db("my_matteo1234");
?>
<script>
function reset() {
document.getElementById("li1").classList.remove("active");
document.getElementById("li2").classList.remove("active");
document.getElementById("li3").classList.remove("active");
document.getElementById("li4").classList.remove("active");
$(".divVisualizza").hide();
$(".divInserisciAuto").hide();
$(".divInserisciProprietario").hide();
$(".divModificaAuto").hide();
$(".divModificaProprietario").hide();
$(".divRimuoviAuto").hide();
$(".divRimuoviProprietario").hide();
}

function clickVisualizza() {
reset();
$(".divVisualizza").show();
document.getElementById("li1").classList.add("active");
}

function clickInserisciAuto() {
reset();
$(".divInserisciAuto").show();
document.getElementById("li2").classList.add("active");
}

function clickInserisciProprietario() {
reset();
$(".divInserisciProprietario").show();
document.getElementById("li2").classList.add("active");
}

function clickModificaAuto() {
reset();
$(".divModificaAuto").show();
document.getElementById("li3").classList.add("active");
}

function clickModificaProprietario() {
reset();
$(".divModificaProprietario").show();
document.getElementById("li3").classList.add("active");
}

function clickRimuoviAuto() {
reset();
$(".divRimuoviAuto").show();
document.getElementById("li4").classList.add("active");
}

function clickRimuoviProprietario() {
reset();
$(".divRimuoviProprietario").show();
document.getElementById("li4").classList.add("active");
}


window.onload = function() {
clickVisualizza();
};

$(document).ready(function(){
$('.box').hide();
$('#dropdownAuto').change(function() {
$('.box').hide();
$('#info' + $(this).val()).show();
});
$('#dropdownProprietario').change(function() {
$('.box').hide();
$('#info' + $(this).val()).show();
});
});

</script>


<!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
<!--[if lt IE 9]>
<script src="js/html5shiv.js"></script>
<script src="js/respond.min.js"></script>
<![endif] href="javascript:clickBtn2()" -->
</head>
<body>
<?php

$user = '123456';
$pass = '123456';

if (!((isset($_COOKIE['username-matteo1234-altervista-org'])) && (isset($_COOKIE['password-matteo1234-altervista-org'])))) {

if (isset($_POST['id']) && isset($_POST['passwd'])) {

if (($_POST['id'] == $user) && ($_POST['passwd'] == $pass)) {

if ($_POST['login-toggle' == 'on']) {
setcookie('username-matteo1234-altervista-org', hash('sha256', $_POST['id']), time() + 3600);
setcookie('password-matteo1234-altervista-org', hash('sha256', $_POST['passwd']));

} else {
setcookie('username-matteo1234-altervista-org', hash('sha256', $_POST['id']), false);
setcookie('password-matteo1234-altervista-org', hash('sha256', $_POST['passwd']), false);
}

} else {
header('Location: index.php');
}

} else {
header('Location: index.php');
}

} elseif (!(($_COOKIE['username-matteo1234-altervista-org'] == hash('sha256', $_POST['id'])) && ($_COOKIE['password-matteo1234-altervista-org'] == hash('sha256', $_POST['passwd'])))) {
setcookie('username-matteo1234-altervista-org', hash('sha256', $_POST['id']), false);
setcookie('password-matteo1234-altervista-org', hash('sha256', $_POST['passwd']), false);
header('Location: index.php');
}
?>
<div class="container">
<nav class="navbar navbar-inverse" role="navigation" style="top: 15px">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-01">
<span class="sr-only">Toggle navigation</span>
</button>
<a class="navbar-brand">Database Auto</a>
</div>
<div class="navbar-collapse" id="navbar-collapse-01">
<ul class="nav navbar-nav">
<li id='li1'>
<a href="javascript:clickVisualizza()">Visualizza</a>
</li>
<li id="li2" class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown"> Inserisci <b class="caret"></b></a>
<span class="dropdown-arrow"></span>
<ul class="dropdown-menu">
<li>
<a href="javascript:clickInserisciAuto();">Automobile</a>
</li>
<li>
<a href="javascript:clickInserisciProprietario();">Proprietario</a>
</li>
</ul>
</li>
<li id="li3" class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"> Modifica <b class="caret"></b></a>
<span class="dropdown-arrow"></span>
<ul class="dropdown-menu">
<li>
<a href="javascript:clickModificaAuto();">Automobile</a>
</li>
<li>
<a href="javascript:clickModificaProprietario();">Proprietario</a>
</li>
</ul>
</li>
<li id="li4" class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"> Rimuovi <b class="caret"></b></a>
<span class="dropdown-arrow"></span>
<ul class="dropdown-menu">
<li>
<a href="javascript:clickRimuoviAuto();">Automobile</a>
</li>
<li>
<a href="javascript:clickRimuoviProprietario();">Proprietario</a>
</li>
</ul>
</li>
</ul>
<div class="navbar-right">
<button class="btn navbar-btn btn-sm btn-block" onclick=location.href='logout.php' type="button">
Log Out
</button>
</div>
</div><!-- /.navbar-collapse -->
</nav>
<div class="divVisualizza animated fadeInUp">
<?php
echo "<h3>Tabella automobili:</h3>";
$result = mysql_query("select * from Automobile");
echo '<table class="tablesorter tablesorter-ice">';
echo "<thead><tr><th>Targa</th><th>Marca</th><th>Modello</th><th>Anno</th><th>Cilindrata</th><th>Numero Telaio</th><th>CF Proprietario</th></tr></thead><tbody>";
while ($row = mysql_fetch_array($result)) {
echo "<tr><td>" . $row['targa'] . "</td><td>" . $row['marca'] . "</td><td>" . $row['modello'] . "</td><td>" . $row['anno'] . "</td><td>" . $row['cilindrata'] . "</td><td>" . $row['numero_telaio'] . "</td><td>" . $row['cf_proprietario'] . "</td></tr>";
}
echo "</tbody></table>";
echo "<h3>Tabella proprietari:</h3>";
$result = mysql_query("select * from Proprietario");
echo '<table class="tablesorter tablesorter-ice">';
echo "<thead><tr><th>Codice Fiscale</th><th>Nome</th><th>Cognome</th><th>Data di nascita</th><th>Sesso</th><th>Indirizzo</th><th>Telefono</th></tr></thead><tbody>";
while ($row = mysql_fetch_array($result)) {
echo "<tr><td>" . $row['cf'] . "</td><td>" . $row['nome'] . "</td><td>" . $row['cognome'] . "</td><td>" . $row['data_nascita'] . "</td><td>" . $row['sesso'] . "</td><td>" . $row['indirizzo'] . "</td><td>" . $row['telefono'] . "</td></tr>";
}
echo "</tbody></table>";
echo "<h3>Tabella incrociata:</h3>";
$result = mysql_query("select * from Proprietario INNER JOIN Automobile ON Proprietario.cf = Automobile.cf_proprietario");
echo '<table class="tablesorter tablesorter-ice">';
echo "<thead><tr><th>Nome</th><th>Cognome</th><th>Data di nascita</th><th>Marca Automobile</th><th>Modello</th><th>Targa</th><th>Cilindrata</th></tr></thead><tbody>";
while ($row = mysql_fetch_assoc($result)) {
echo "<tr><td>" . $row['nome'] . "</td><td>" . $row['cognome'] . "</td><td>" . $row['data_nascita'] . "</td><td>" . $row['marca'] . "</td><td>" . $row['modello'] . "</td><td>" . $row['targa'] . "</td><td>" . $row['cilindrata'] . "</td></tr>";
}
echo "</tbody></table>";
?>
<script>
$(function() {
$('table').tablesorter();
});
</script>
</div>
<div class="divInserisciAuto animated fadeInUp">
<form method="post" action="inserisciAuto.php">
<h6>Inserisci Targa:</h6>
<input name="targa" type="text" class="form-control" placeholder="Targa" />
<h6>Inserisci Marca:</h6>
<input name="marca" type="text" class="form-control" placeholder="Marca" />
<h6>Inserisci Modello:</h6>
<input name="modello" type="text" class="form-control" placeholder="Modello" />
<h6>Inserisci Anno:</h6>
<input name="anno" type="text" class="form-control" placeholder="Anno" />
<h6>Inserisci Cilindrata:</h6>
<input name="cilindrata" type="text" class="form-control" placeholder="Cilindrata" />
<h6>Inserisci Numero Telaio:</h6>
<input name="telaio" type="text" class="form-control" placeholder="Telaio" />
<h6>Inserisci Codice Fiscale Proprietario:</h6>
<input name="cf" type="text" class="form-control" placeholder="Codice Fiscale Proprietario" />
<br/>
<button class="btn btn-primary btn-wide" type="submit">
Salva
</button>
</form>
</div>
<div class="divInserisciProprietario animated fadeInUp">
<form method="post" action="inserisciProprietario.php">
<h6>Inserisci Codice Fiscale:</h6>
<input name="cf" type="text" class="form-control" placeholder="Codice Fiscale" />
<h6>Inserisci Nome:</h6>
<input name="nome" type="text" class="form-control" placeholder="Nome" />
<h6>Inserisci Cognome:</h6>
<input name="cognome" type="text" class="form-control" placeholder="Cognome" />
<h6>Inserisci Data di Nascita:</h6>
<input name="data" type="text" class="form-control" placeholder="Data di Nascita" />
<h6>Inserisci Sesso:</h6>
<input name="sesso" type="text" class="form-control" placeholder="Sesso" />
<h6>Inserisci Indirizzo:</h6>
<input name="indirizzo" type="text" class="form-control" placeholder="Indirizzo" />
<h6>Inserisci Telefono:</h6>
<input name="telefono" type="text" class="form-control" placeholder="Telefono" />
<br/>
<button class="btn btn-primary btn-wide" type="submit">
Salva
</button>
</form>
</div>
<div class="divModificaAuto animated fadeInUp">
<?php
$result = mysql_query("select * from Automobile");
echo '<select name="huge" class="select-block mbl" id="dropdownAuto">';
echo '<option selected disabled>Seleziona auto</option>';
while ($row = mysql_fetch_assoc($result)) {
$strAuto = "<option value="" . $row['targa'] . "">" . $row['marca'] . " " . $row['modello'] . " - " . $row['targa'] . "</option>";
echo stripslashes($strAuto);
}
echo "</select>";
?>
<div class="row">
<div class="col-md-6">
<?php
$result = mysql_query("select * from Automobile");
while ($row = mysql_fetch_assoc($result)) {
$strAuto1 = "<div id="info" . $row['targa'] . "" class="panel panel-default box"><div class="panel-body"><dl class="dl-horizontal"><dt>Targa: </dt><dd>" . $row['targa'] . "</dd><dt>Marca: </dt><dd>" . $row['marca'] . "</dd><dt>Modello: </dt><dd>" . $row['modello'] . "</dd><dt>Anno: </dt><dd>" . $row['anno'] . "</dd><dt>Cilindrata: </dt><dd>" . $row['cilindrata']."</dd><dt>Numero Telaio: </dt><dd>" . $row['numero_telaio'] . "</dd><dt>CF Proprietario: </dt><dd>" . $row['cf_proprietario'] . "</dd></dl></div></div>";
echo stripslashes($strAuto1);
}
?>
</div>
<div class="col-md-6">
<form method="post" action="">
<dl class="dl-horizontal">
<dt>Modifica Targa:</dt>
<dd><input name="targa" type="text" class="form-control input-sm" placeholder="<?$row['targa']?>" /></dd>
<dt>Modifica Marca:</dt>
<dd><input name="marca" type="text" class="form-control input-sm" placeholder="Marca" /></dd>
<dt>Modifica Modello:</dt>
<dd><input name="modello" type="text" class="form-control input-sm" placeholder="Modello" /></dd>
<dt>Modifica Anno:</dt>
<dd><input name="anno" type="text" class="form-control input-sm" placeholder="Anno" /></dd>
<dt>Modifica Cilindrata:</dt>
<dd><input name="cilindrata" type="text" class="form-control input-sm" placeholder="Cilindrata" /></dd>
<dt>Modifica N. Telaio:</dt>
<dd><input name="telaio" type="text" class="form-control input-sm" placeholder="Telaio" /></dd>
<dt>Modifica CF Proprietario:</dt>
<dd><input name="cf" type="text" class="form-control input-sm" placeholder="Codice Fiscale Proprietario" /></dd>
<br/>
<button class="btn btn-primary btn-wide" type="submit">
Modifica
</button>
</dl>
</form>
</div>
</div>
</div>
<div class="divModificaProprietario animated fadeInUp">
<?php
$result = mysql_query("select * from Proprietario");
echo '<select name="huge" class="select-block mbl" id="dropdownProprietario">';
echo '<option selected disabled>Seleziona proprietario</option>';
while ($row = mysql_fetch_assoc($result)) {
$strProp = "<option value="" . $row['cf'] . "">" . $row['nome'] . " " . $row['cognome'] . " - " . $row['cf'] . "</option>";
echo stripslashes($strProp);
}
echo "</select>";
?>
<div class="row">
<div class="col-md-6 content">
<?php
$result = mysql_query("select * from Proprietario");
while ($row = mysql_fetch_assoc($result)) {
$strProprietario1 = "<div id="info" . $row['cf'] . "" class="panel panel-default box"><div class="panel-body"><dl class="dl-horizontal"><dt>Codice Fiscale: </dt><dd>" . $row['cf'] . "</dd><dt>Nome: </dt><dd>" . $row['nome'] . "</dd><dt>Cognome: </dt><dd>" . $row['cognome'] . "</dd><dt>Data di Nascita: </dt><dd>" . $row['data_nascita'] . "</dd><dt>Sesso: </dt><dd>" . $row['sesso']."</dd><dt>Indirizzo: </dt><dd>" . $row['indirizzo'] . "</dd><dt>Telefono: </dt><dd>" . $row['telefono'] . "</dd></dl></div></div>";
echo stripslashes($strProprietario1);
}
?>
</div>
<div class="col-md-6">
dfgdgdgdgdsg
</div>
</div>
</div>
<div class="divRimuoviAuto animated fadeInUp">
<?php
$result = mysql_query("select * from Automobile");
echo '<table class="tablesorter tablesorter-ice">';
echo "<thead><tr><th>Elimina?</th><th>Targa</th><th>Marca</th><th>Modello</th><th>Anno</th><th>Cilindrata</th><th>Numero Telaio</th><th>CF Proprietario</th></tr></thead><tbody>";
while ($row = mysql_fetch_assoc($result)) {
$strTab1="<tr><td><label class="checkbox" for="" . $row['targa'] . ""><input type="checkbox" value="" id="" . $row['targa'] . "" data-toggle="checkbox"></label></td>" . $row['targa'] . "<td>" . $row['targa'] . "</td><td>" . $row['marca'] . "</td><td>" . $row['modello'] . "</td><td>" . $row['anno'] . "</td><td>" . $row['cilindrata'] . "</td><td>" . $row['numero_telaio'] . "</td><td>" . $row['cf_proprietario'] . "</td></tr>";
echo stripslashes($strTab1);
}
echo "</tbody></table>";
?>
<button class="btn btn-primary btn-wide" type="submit">
Elimina
</button>
</div>
<div class="divRimuoviProprietario animated fadeInUp">
<?php
$result = mysql_query("select * from Proprietario");
echo '<table class="tablesorter tablesorter-ice">';
echo "<thead><tr><th>Elimina?</th><th>Codice Fiscale</th><th>Nome</th><th>Cognome</th><th>Data di nascita</th><th>Sesso</th><th>Indirizzo</th><th>Telefono</th></tr></thead><tbody>";
while ($row = mysql_fetch_assoc($result)) {
$strTab2="<tr><td><label class="checkbox" for="" . $row['cf'] . ""><input type="checkbox" value="" id="" . $row['cf'] . "" data-toggle="checkbox"></label></td><td>" . $row['cf'] . "</td><td>" . $row['nome'] . "</td><td>" . $row['cognome'] . "</td><td>" . $row['data_nascita'] . "</td><td>" . $row['sesso'] . "</td><td>" . $row['indirizzo'] . "</td><td>" . $row['telefono'] . "</td></tr>";
echo stripslashes($strTab2);
}
echo "</tbody></table>";
?>
<button class="btn btn-primary btn-wide" type="submit">
Elimina
</button>
</div>
<script>


<?php


/*$result = mysql_query("select * from Automobile INNER JOIN Proprietario ON Automobile.cf_proprietario = Proprietario.cf");
echo "function resetInfo(){";
while ($row = mysql_fetch_assoc($result)) {
$strHide="$(".info" . $row['targa'] . "").hide();
$(".info" . $row['cf'] . "").hide();
";
echo stripslashes($strHide);
}
echo "}
";


$result = mysql_query("select * from Automobile");
while ($row = mysql_fetch_assoc($result)) {
echo "function dropdown".$row['targa']."(){
";
echo "resetInfo();
";
$dropdownAutoInfo="$(".info" . $row['targa'] . "").show();
";
echo stripslashes($dropdownAutoInfo);
echo "}
";
}


$result = mysql_query("select * from Proprietario");
while ($row = mysql_fetch_assoc($result)) {
echo "function dropdown".$row['cf']."(){
";
echo "resetInfo();
";
$dropdownProprietarioInfo="$(".info" . $row['cf'] . "").show();
";
echo stripslashes($dropdownProprietarioInfo);
echo "}
";
}
*/
?>

</script>
</div>
<!-- /.container -->

<!-- Load JS here for greater good =============================-->
<script src="js/jquery-ui-1.10.3.custom.min.js"></script>
<script src="js/jquery.ui.touch-punch.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/bootstrap-select.js"></script>
<script src="js/bootstrap-switch.js"></script>
<script src="js/flatui-checkbox.js"></script>
<script src="js/flatui-radio.js"></script>
<script src="js/jquery.tagsinput.js"></script>
<script src="js/jquery.placeholder.js"></script>
<script src="js/jquery.stacktable.js"></script>
<script src="http://vjs.zencdn.net/4.3/video.js"></script>
<script src="js/application.js"></script>
</body>
</html>
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.