2020-04-27 23:27:39 +02:00
< ? php
2020-05-02 12:06:45 +02:00
include_once ( " ../../core.php " );
2020-04-27 23:27:39 +02:00
init_class ();
2020-05-20 22:49:36 +02:00
$utente -> requirelogin ();
2020-04-27 23:27:39 +02:00
2020-05-20 23:16:45 +02:00
$risultato = $database -> esegui ( " SELECT * FROM `%PREFIX%_users` ORDER BY avaible DESC, caposquadra DESC, interventi ASC, minuti_dispo ASC, nome ASC " , true );
2020-04-27 23:27:39 +02:00
$whitelist = $utente -> whitelist ();
?>
< link href = " https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css " rel = " stylesheet " integrity = " sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN " crossorigin = " anonymous " >
< style >
th , td {
border : 1 px solid grey ;
border - collapse : collapse ;
padding : 5 px ;
}
#href {
outline : none ;
cursor : pointer ;
text - align : center ;
text - decoration : none ;
font : bold 12 px Arial , Helvetica , sans - serif ;
color : #fff;
padding : 10 px 20 px ;
border : solid 1 px #0076a3;
background : #0095cd;
}
table {
box - shadow : 2 px 2 px 25 px rgba ( 0 , 0 , 0 , 0.5 );
border - radius : 15 px ;
margin : auto ;
}
</ style >
< div style = " overflow-x:auto; " >
< table style = " width: 90%; text-align:center; " >
< tr >
< th > Nome </ th >
2020-05-20 23:16:45 +02:00
< th > avaible </ th >
2020-04-27 23:27:39 +02:00
< th > Autista </ th >
< th > Chiama </ th >
< th > Scrivi </ th >
< th > Interventi </ th >
< th > Minuti Disponibilità </ th >
< th > Altro </ th >
< ? php
foreach ( $risultato as $row ){
if ( ! in_array ( $row [ 'nome' ], $whitelist ) OR in_array ( $utente -> nome (), $whitelist )){
echo " <tr>
< td > " ;
$nome = $row [ " nome " ];
2020-05-20 23:16:45 +02:00
$avaible = $row [ " avaible " ];
if ( $row [ 'caposquadra' ] == 1 ) { echo " <a onclick='AttivoAdmin( \" $nome\ " , \ " $avaible\ " ); '><img src=' ./ risorse / images / cascoRosso . png ' width=' 20 px '> ";} else{echo "<a onclick=' AttivoAdmin ( \ " $nome\ " , \ " $avaible\ " ); '><img src=' ./ risorse / images / cascoNero . png ' width=' 20 px ' > " ;}
2020-04-27 23:27:39 +02:00
if ( $row [ 'online' ] == 1 ){
2020-05-20 23:16:45 +02:00
echo " <u> " . $row [ " nome " ] . " </u></a></td><td><a onclick='AttivoAdmin( \" $nome\ " , \ " $avaible\ " ); ' > " ;
2020-04-27 23:27:39 +02:00
} else {
2020-05-20 23:16:45 +02:00
echo $row [ " nome " ] . " </a></td><td><a onclick='AttivoAdmin( \" $nome\ " , \ " $avaible\ " ); ' > " ;
2020-04-27 23:27:39 +02:00
}
2020-05-20 23:16:45 +02:00
if ( $row [ 'avaible' ] == 1 ) { echo " <i class='fa fa-check' style='color:green'></i> " ;} else { echo " <i class='fa fa-times' style='color:red'></i> " ;};
2020-04-27 23:27:39 +02:00
echo " </a></td>
< td > " ;
if ( $row [ 'autista' ] == 1 ) { echo " <img src='./risorse/images/volante.png' width='20px'> " ;} else { echo " " ;};
echo " </td>
< td >< a href = 'tel:+" . $row[' telefono '] . "' >< i class = 'fa fa-phone' ></ i ></ a ></ td >< td > " ;
2020-05-20 23:16:45 +02:00
if ( $row [ 'avaible' ] == 1 ) { echo " <a href='https://api.whatsapp.com/send?phone= " . $row [ 'telefono' ] . " &text=ALLERTA IN CORSO.%20Mettiti%20in%20contatto%20con%20Fulvio'><i class='fa fa-whatsapp' style='color:green'></i></td> " ;} else { echo " " ;};
2020-04-27 23:27:39 +02:00
$interventi = $row [ 'interventi' ];
$minuti = $row [ 'minuti_dispo' ];
$u = 'anagrafica.php?utente=' . str_replace ( ' ' , '_' , urldecode ( strtolower ( $row [ " id " ])));
echo " <td> $interventi </td><td> $minuti </td><td><a href=' $u '><p>Altri dettagli</p></a></td></tr> " ;
}
}
?>
</ table >
</ div >