user_management -> lista
This commit is contained in:
parent
0894dd5f5e
commit
7e4ac19f59
|
@ -10,7 +10,7 @@ if($tools->validate_form_data('$post-mod', true, "add")) {
|
|||
$hidden = isset($_POST["visible"]) ? 0 : 1;
|
||||
$disabled = isset($_POST["enabled"]) ? 0 : 1;
|
||||
$user->add_user($_POST["mail"], $_POST["name"], $_POST["username"], $_POST["password"], $_POST["birthday"], $capo, $autista, $hidden, $disabled, $user->name());
|
||||
$tools->redirect("user_management.php");
|
||||
$tools->redirect("lista.php");
|
||||
} else {
|
||||
$tools->redirect("nonfareilfurbo.php");
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ if($tools->validate_form_data('$post-mod', true, "add")) {
|
|||
if($_POST["token"] == $_SESSION['token']){
|
||||
bdump("rimuovo user");
|
||||
$user->remove_user($_POST["id"]);
|
||||
$tools->redirect("user_management.php");
|
||||
$tools->redirect("lista.php");
|
||||
} else {
|
||||
$tools->redirect("nonfareilfurbo.php");
|
||||
}
|
||||
|
|
|
@ -63,6 +63,34 @@ $(document).ready(function() {
|
|||
}, 10000);
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
#add {
|
||||
outline: none;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
font: bold 12px Arial, Helvetica, sans-serif;
|
||||
color: #fff;
|
||||
padding: 10px 20px;
|
||||
border: solid 1px #0076a3;
|
||||
background: #0095cd;
|
||||
}
|
||||
|
||||
#href {
|
||||
outline: none;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
font: bold 12px Arial, Helvetica, sans-serif;
|
||||
color: #fff;
|
||||
padding: 10px 20px;
|
||||
border: solid 1px #0076a3;
|
||||
background: #0095cd;
|
||||
}
|
||||
</style>
|
||||
<p style="text-align: center;">
|
||||
<a id='add' href="modifica_user.php?add">add user</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
<script defer type="text/javascript" src="risorse/js/cache.js"></script>
|
||||
<br>
|
||||
|
|
|
@ -1,92 +0,0 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<br>
|
||||
<style>
|
||||
#add {
|
||||
outline: none;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
font: bold 12px Arial, Helvetica, sans-serif;
|
||||
color: #fff;
|
||||
padding: 10px 20px;
|
||||
border: solid 1px #0076a3;
|
||||
background: #0095cd;
|
||||
}
|
||||
|
||||
#href {
|
||||
outline: none;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
font: bold 12px Arial, Helvetica, sans-serif;
|
||||
color: #fff;
|
||||
padding: 10px 20px;
|
||||
border: solid 1px #0076a3;
|
||||
background: #0095cd;
|
||||
}
|
||||
</style>
|
||||
<p style="text-align: center;">
|
||||
<a id='add' href="modifica_user.php?add">add user</a>
|
||||
</p>
|
||||
<script defer>
|
||||
function Attivo(id){
|
||||
$.ajax({
|
||||
url: "risorse/ajax/ajax_aggiornadispo.php",
|
||||
method: "POST",
|
||||
data: {
|
||||
change_id: id,
|
||||
dispo: 1
|
||||
},
|
||||
success: function(data) {
|
||||
alert("Grazie, {{ user.name }}, hai dato la tua disponibilità in caso in allerta.");
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function NonAttivo(id){
|
||||
$.ajax({
|
||||
url: "risorse/ajax/ajax_aggiornadispo.php",
|
||||
method: "POST",
|
||||
data: {
|
||||
change_id: id,
|
||||
dispo: 0
|
||||
},
|
||||
success: function(data) {
|
||||
alert("Grazie {{ user.name }}, hai dato la tua disponibilità in caso in allerta.");
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<br>
|
||||
<br>
|
||||
<img alt="VVF" src="./risorse/images/owner.png" width="150" style="display: block; margin-left: auto; margin-right: auto;">
|
||||
<br>
|
||||
<br>
|
||||
<div id="lista"></div>
|
||||
{% if user.full_viewer == false %}
|
||||
<script>
|
||||
$( "#lista" ).load("risorse/ajax/ajax_lista.php");
|
||||
$(document).ready(function() {
|
||||
setInterval(function() {
|
||||
$( "#lista" ).load("risorse/ajax/ajax_lista.php");
|
||||
}, 10000);
|
||||
});
|
||||
</script>
|
||||
{% elseif user.full_viewer == true %}
|
||||
<script>
|
||||
$( "#lista" ).load("risorse/ajax/ajax_lista_admin.php");
|
||||
$(document).ready(function() {
|
||||
setInterval(function() {
|
||||
$( "#lista" ).load("risorse/ajax/ajax_lista_admin.php");
|
||||
}, 10000);
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
<script defer type="text/javascript" src="risorse/js/cache.js"></script>
|
||||
<br>
|
||||
<br>
|
||||
{% endblock %}
|
|
@ -1,4 +0,0 @@
|
|||
<?php
|
||||
require_once 'ui.php';
|
||||
loadtemplate('user_management.html', ['titolo' => 'Gestione Utenti']);
|
||||
bdump($_SESSION);
|
Loading…
Reference in New Issue