-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Inserimento ruoli Op CO e Resp CO, creazione pagina di gestione volontari autorizzati
- Loading branch information
Federico
committed
Jun 26, 2020
1 parent
134d312
commit 1094711
Showing
10 changed files
with
247 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<div class="panel panel-default"> | ||
|
||
<div class="panel-heading"> | ||
<h3 class="panel-title"><strong><i class="fa fa-user-circle"></i> Volontari autorizzati:</strong></h3> | ||
</div> | ||
|
||
<div class="panel-body"> | ||
|
||
<?php /* | ||
if (isset($_GET['inserimento']) &&($_GET['inserimento'] == 'ok')) { | ||
?> | ||
<center><div class="alert alert-success"><i class="fa fa-check"></i> Visita inserita <b>correttamente!</b></div></center> | ||
<?php | ||
} */ | ||
|
||
if (isset($_GET['delete']) &&($_GET['delete'] == 'ok')) { | ||
?> | ||
<center><div class="alert alert-success"><i class="fa fa-trash"></i> Veicolo eliminato <b>correttamente!</b></div></center> | ||
<?php | ||
}/* | ||
if (isset($_GET['richiesta']) &&($_GET['richiesta'] == 'ok')) { | ||
?> | ||
<center><div class="alert alert-success"><i class="fa fa-check"></i> Richiesta di certificato medico inoltrata <b>correttamente!</b></div></center> | ||
<?php | ||
} | ||
*/?> | ||
|
||
<script type="text/javascript" src="livesearch-co-volontari.js" onLoad="showResult('','25')"></script> | ||
<form name="cercato" onSubmit="return false"> | ||
<div class="row"> | ||
<div class="col-sm-9"> | ||
<div class="input-group"> | ||
<div class="input-group-addon"><i class="fa fa-search"></i></div><input placeholder="digita la targa, la tipologia di veicolo o la selettiva radio" type="text" name="valore" class="form-control" onkeyup="showResult(this.value,numero.value)"> | ||
</div> | ||
</div> | ||
<div class="col-sm-3"> | ||
<div class="input-group"> | ||
<div class="input-group-addon"><i class="fa fa-list-ol"></i> N. Risultati:</div> | ||
<select class="form-control" name="numero" onChange="showResult(valore.value,this.value)"> | ||
<option value="25">25</option> | ||
<option value="50">50</option> | ||
<option value="100">100</option> | ||
<option value="200">200</option> | ||
<option value="300">300</option> | ||
</select> | ||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
<br> | ||
<div id="livesearch"> | ||
<!-- spazio riservato ai risultati live della ricerca --> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
<?php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
var xmlhttp; | ||
|
||
function showResult(str, num) { | ||
|
||
xmlhttp=GetXmlHttpObject() | ||
|
||
if (xmlhttp==null) { | ||
alert ("Your browser does not support XML HTTP Request"); | ||
return null; | ||
} | ||
|
||
var url="livesearch-co-volontari.php"; | ||
url=url+"?q="+str+"&num="+num; | ||
|
||
xmlhttp.onreadystatechange=stateChanged ; | ||
xmlhttp.open("GET",url,true); | ||
xmlhttp.send(null); | ||
} | ||
|
||
function stateChanged() { | ||
if (xmlhttp.readyState==4) { | ||
document.getElementById("livesearch").innerHTML=xmlhttp.responseText; | ||
document.getElementById("livesearch").style.border="0px solid #A5ACB2"; | ||
document.getElementById("livesearch").style.width="100%"; | ||
} | ||
} | ||
|
||
function GetXmlHttpObject() { | ||
if (window.XMLHttpRequest) { | ||
// code for IE7+, Firefox, Chrome, Opera, Safari | ||
return new XMLHttpRequest(); | ||
} | ||
|
||
if (window.ActiveXObject) { | ||
// code for IE6, IE5 | ||
return new ActiveXObject("Microsoft.XMLHTTP"); | ||
} | ||
|
||
return null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<?php | ||
session_start(); | ||
|
||
if ($_SESSION['auth'] < 1 ) { | ||
header("Location: index.php?s=1"); | ||
exit(); | ||
} | ||
|
||
include '../db-connessione-include.php'; | ||
include 'maledetti-apici-centro-include.php'; //ATTIVA O DISATTIVA IL MAGIC QUOTE PER GLI APICI | ||
|
||
function __autoload ($class_name) { //funzione predefinita che si occupa di caricare dinamicamente tutti gli oggetti esterni quando vengono richiamati | ||
require_once "class/" . $class_name.".obj.inc"; | ||
} | ||
|
||
$a = new Anagrafica(); | ||
$c = new Calendario(); | ||
|
||
$ogg = $_GET['q']; | ||
$num = $_GET['num']; | ||
|
||
$query = $connessione->query("SELECT * FROM anagrafica WHERE autorizzato IS TRUE AND nome LIKE '%$ogg%' OR cognome LIKE '%$ogg%' OR codicefiscale LIKE '%$ogg%' ORDER BY cognome DESC LIMIT $num"); | ||
?> | ||
|
||
<table class="table table-bordered"> | ||
<tr style="vertical-align: middle"> | ||
<td><b>Nome</b></td> | ||
<td><b>Cognome</b></td> | ||
<td><b>Codice Fiscale</b></td> | ||
<td align="center"><b>Opzioni</b></td> | ||
</tr> | ||
|
||
<?php | ||
$contatorelinee = 0; | ||
while ($risultati2 = $query->fetch()) { | ||
$risultati2 = array_map('stripslashes', $risultati2); | ||
if ( $contatorelinee % 2 == 1 ) { | ||
$colorelinee = $_SESSION['primocoloretabellarisultati'] ; | ||
} //primo colore | ||
else { | ||
$colorelinee = $_SESSION['secondocoloretabellarisultati'] ; | ||
} //secondo colore | ||
$contatorelinee = $contatorelinee + 1 ; | ||
?> | ||
<tr bgcolor=<?php echo $colorelinee; ?>> | ||
<td style="vertical-align: middle"><?php echo ucwords($risultati2['nome']);?></td> | ||
<td style="vertical-align: middle"><?php echo ucwords($risultati2['cognome']);?></td> | ||
<td style="vertical-align: middle"><?php echo ucwords($risultati2['codicefiscale']);?></td> | ||
<td style="vertical-align: middle" align="center"> | ||
<div class="btn-group btn-group-sm"> | ||
<a class="btn btn-info btn" data-toggle="tooltip" data-placement="left" title="Visualizza Libretto" href="login0.php?corpus=autoparco-show-libretto&id=<?php echo $risultati2['id']; //convertire in visualizzazione+download ?> " data-toggle="modal" data-target="#myModal"> | ||
<i class="fa fa-info-circle fa-fw"></i> | ||
</a> | ||
<a class="btn btn-warning" data-toggle="tooltip" data-placement="left" title="Modifica Veicolo" href="login0.php?corpus=autoparco-edit-veicoli&id=<?php echo $risultati2['id']; ?>"> | ||
<i class="fa fa-edit fa-fw"></i> | ||
</a> | ||
<?php /*<a class="btn btn-success" data-toggle="tooltip" data-placement="left" title="Aggiungi Visita" href="login0.php?corpus=cert-modale-add-access&id=<?php echo $risultati2['id']; ?>" data-toggle="modal" data-target="#myModal"> | ||
<i class="fa fa-medkit fa-fw"></i> | ||
</a> */ ?> | ||
<?php if($a->isAdmin($_SESSION['loginid'])) { | ||
?> | ||
<a class="btn btn-danger" data-toggle="tooltip" data-placement="left" title="Elimina Veicolo" onclick="return confirm('Sicuro di voler cancellare il veicolo?')" href="autoparco-delete-veicolo.php?id=<?php echo $risultati2['id']; ?>"> | ||
<i class="fa fa-trash-o fa-fw"></i> | ||
</a> | ||
<?php | ||
} | ||
?> | ||
</div> | ||
</td> | ||
</tr> | ||
<?php | ||
} | ||
?> | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters