Code translation
This commit is contained in:
parent
ad6de1a02c
commit
0f144307e9
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
require_once 'ui.php';
|
||||
loadtemplate('accessdenied.html', ['titolo' => 'Access Denied']);
|
||||
loadtemplate('accessdenied.html', ['title' => 'Access Denied']);
|
||||
?>
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
require_once 'ui.php';
|
||||
loadtemplate('anagrafica.html', ['titolo' => t("Personal data",false), 'dacontrollare' => ucwords(str_replace('_', ' ', urldecode($_GET['user'])))]);
|
||||
loadtemplate('anagrafica.html', ['title' => t("Personal data",false), 'dacontrollare' => ucwords(str_replace('_', ' ', urldecode($_GET['user'])))]);
|
||||
?>
|
||||
|
|
|
@ -44,10 +44,10 @@ if($start){
|
|||
if(count($profiles) > 0){
|
||||
$list = [];
|
||||
foreach($profiles as $profile){
|
||||
$list[] = [$profile["id"] => $profile["minuti_dispo"]];
|
||||
$list[] = [$profile["id"] => $profile["availability_minutes"]];
|
||||
}
|
||||
$database->exec("INSERT INTO `%PREFIX%_minuti` (`id`, `mese`, `anno`, `list`) VALUES (NULL, :month, :year, :list)",false,[":month" => $execDateTime->month,":year" => $execDateTime->year,":list"=>json_encode($list)]);
|
||||
$database->exec("UPDATE %PREFIX%_profiles SET minuti_dispo = 0");
|
||||
$database->exec("INSERT INTO `%PREFIX%_minutes` (`id`, `month`, `year`, `list`) VALUES (NULL, :month, :year, :list)",false,[":month" => $execDateTime->month,":year" => $execDateTime->year,":list"=>json_encode($list)]);
|
||||
$database->exec("UPDATE %PREFIX%_profiles SET availability_minutes = 0");
|
||||
}
|
||||
}
|
||||
$action .= "update";
|
||||
|
@ -60,10 +60,10 @@ if($start){
|
|||
$output_status = "ok";
|
||||
$queries = [];
|
||||
foreach ($profiles as $row) {
|
||||
$value = (int)$row["minuti_dispo"]+5;
|
||||
$value = (int)$row["availability_minutes"]+5;
|
||||
$id = $row["id"];
|
||||
$increment[$id] = $value;
|
||||
$database->exec("UPDATE %PREFIX%_profiles SET minuti_dispo = :value WHERE id = :id", true, [":value" => $value, ":id" => $id]);
|
||||
$database->exec("UPDATE %PREFIX%_profiles SET availability_minutes = :value WHERE id = :id", true, [":value" => $value, ":id" => $id]);
|
||||
$tmp = $id . " - " . $value . " ";
|
||||
$tmp .= count($database->stmt->rowCount()) == 1 ? "success" : "fail";
|
||||
$queries[] = $tmp;
|
||||
|
|
|
@ -7,7 +7,7 @@ if($tools->validate_form_data('$post-mod', true, "add")) {
|
|||
$database->add_service($_POST["data"], $_POST["codice"], $_POST["uscita"], $_POST["rientro"], $_POST["capo"], $tools->extract_unique($_POST["autisti"]), $tools->extract_unique($_POST["personale"]), $_POST["luogo"], $_POST["note"], $_POST["tipo"], $tools->extract_unique([$_POST["capo"],$_POST["autisti"],$_POST["personale"]]), $user->name());
|
||||
$tools->redirect("services.php");
|
||||
} else {
|
||||
$tools->redirect("nonfareilfurbo.php");
|
||||
$tools->redirect("accessdenied.php");
|
||||
}
|
||||
}
|
||||
} elseif($tools->validate_form_data('$post-mod', true, "edit")) {
|
||||
|
@ -18,7 +18,7 @@ if($tools->validate_form_data('$post-mod', true, "add")) {
|
|||
$database->change_service($_POST["id"], $_POST["data"], $_POST["codice"], $_POST["uscita"], $_POST["rientro"], $_POST["capo"], $tools->extract_unique($_POST["autisti"]), $tools->extract_unique($_POST["personale"]), $_POST["luogo"], $_POST["note"], $_POST["tipo"], $tools->extract_unique([$_POST["capo"],$_POST["autisti"],$_POST["personale"]]), $user->name());
|
||||
$tools->redirect("services.php");
|
||||
} else {
|
||||
$tools->redirect("nonfareilfurbo.php");
|
||||
$tools->redirect("accessdenied.php");
|
||||
}
|
||||
}
|
||||
} elseif($tools->validate_form_data('$post-mod', true, "delete")) {
|
||||
|
@ -29,7 +29,7 @@ if($tools->validate_form_data('$post-mod', true, "add")) {
|
|||
$database->remove_service($_POST["id"], $_POST["incrementa"]);
|
||||
$tools->redirect("services.php");
|
||||
} else {
|
||||
$tools->redirect("nonfareilfurbo.php");
|
||||
$tools->redirect("accessdenied.php");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -58,12 +58,12 @@ if($tools->validate_form_data('$post-mod', true, "add")) {
|
|||
}
|
||||
if($modalità=="edit" || $modalità=="delete"){
|
||||
if(empty($id)){
|
||||
$tools->redirect("nonfareilfurbo.php");
|
||||
$tools->redirect("accessdenied.php");
|
||||
} elseif (!$database->exists("services", $id)){
|
||||
$tools->redirect("nonfareilfurbo.php");
|
||||
$tools->redirect("accessdenied.php");
|
||||
}
|
||||
}
|
||||
loadtemplate('edit_service.html', ['service' => ['id' => $id, 'token' => $_SESSION['token'], 'modalità' => $modalità, 'personale' => $personale, 'tipologie' => $tipologie], 'values' => $values, 'incrementa' => $incrementa, 'titolo' => ucfirst($modalità) . ' '.ucfirst(t("service",false))]);
|
||||
loadtemplate('edit_service.html', ['service' => ['id' => $id, 'token' => $_SESSION['token'], 'modalità' => $modalità, 'personale' => $personale, 'tipologie' => $tipologie], 'values' => $values, 'incrementa' => $incrementa, 'title' => ucfirst($modalità) . ' '.ucfirst(t("service",false))]);
|
||||
bdump($_SESSION['token'], "token");
|
||||
}
|
||||
?>
|
|
@ -7,7 +7,7 @@ if($tools->validate_form_data('$post-mod', true, "add")) {
|
|||
$database->add_training($_POST["data"], $_POST["name"], $_POST["start_time"], $_POST["end_time"], $_POST["capo"], $tools->extract_unique($_POST["personale"]), $_POST["luogo"], $_POST["note"], $tools->extract_unique([$_POST["capo"],$_POST["personale"]]), $user->name());
|
||||
$tools->redirect("trainings.php");
|
||||
} else {
|
||||
$tools->redirect("nonfareilfurbo.php");
|
||||
$tools->redirect("accessdenied.php");
|
||||
}
|
||||
}
|
||||
} elseif($tools->validate_form_data('$post-mod', true, "edit")) {
|
||||
|
@ -18,7 +18,7 @@ if($tools->validate_form_data('$post-mod', true, "add")) {
|
|||
$database->change_training($_POST["id"], $_POST["data"], $_POST["name"], $_POST["start_time"], $_POST["end_time"], $_POST["capo"], $tools->extract_unique($_POST["personale"]), $_POST["luogo"], $_POST["note"], $tools->extract_unique([$_POST["capo"],$_POST["personale"]]), $user->name());
|
||||
$tools->redirect("trainings.php");
|
||||
} else {
|
||||
$tools->redirect("nonfareilfurbo.php");
|
||||
$tools->redirect("accessdenied.php");
|
||||
}
|
||||
}
|
||||
} elseif($tools->validate_form_data('$post-mod', true, "delete")) {
|
||||
|
@ -29,7 +29,7 @@ if($tools->validate_form_data('$post-mod', true, "add")) {
|
|||
$database->remove_training($_POST["id"], $_POST["incrementa"]);
|
||||
$tools->redirect("trainings.php");
|
||||
} else {
|
||||
$tools->redirect("nonfareilfurbo.php");
|
||||
$tools->redirect("accessdenied.php");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -56,12 +56,12 @@ if($tools->validate_form_data('$post-mod', true, "add")) {
|
|||
}
|
||||
if($modalità=="edit" || $modalità=="delete"){
|
||||
if(empty($id)){
|
||||
$tools->redirect("nonfareilfurbo.php");
|
||||
$tools->redirect("accessdenied.php");
|
||||
} elseif (!$database->exists("trainings", $id)){
|
||||
//$tools->redirect("nonfareilfurbo.php");
|
||||
//$tools->redirect("accessdenied.php");
|
||||
}
|
||||
}
|
||||
loadtemplate('edit_training.html', ['training' => ['id' => $id, 'token' => $_SESSION['token'], 'modalità' => $modalità, 'personale' => $personale], 'values' => $values, 'incrementa' => $incrementa, 'titolo' => ucfirst($modalità) . ' '.ucfirst(t("training",false))]);
|
||||
loadtemplate('edit_training.html', ['training' => ['id' => $id, 'token' => $_SESSION['token'], 'modalità' => $modalità, 'personale' => $personale], 'values' => $values, 'incrementa' => $incrementa, 'title' => ucfirst($modalità) . ' '.ucfirst(t("training",false))]);
|
||||
bdump($_SESSION['token'], "token");
|
||||
}
|
||||
?>
|
|
@ -10,9 +10,9 @@ 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("lista.php");
|
||||
$tools->redirect("list.php");
|
||||
} else {
|
||||
$tools->redirect("nonfareilfurbo.php");
|
||||
$tools->redirect("accessdenied.php");
|
||||
}
|
||||
}
|
||||
/*} elseif($tools->validate_form_data('$post-mod', true, "edit")) {
|
||||
|
@ -23,7 +23,7 @@ if($tools->validate_form_data('$post-mod', true, "add")) {
|
|||
$database->change_service($_POST["id"], $_POST["data"], $_POST["codice"], $_POST["uscita"], $_POST["rientro"], $_POST["capo"], $tools->extract_unique($_POST["autisti"]), $tools->extract_unique($_POST["personale"]), $_POST["luogo"], $_POST["note"], $_POST["tipo"], $tools->extract_unique([$_POST["capo"],$_POST["autisti"],$_POST["personale"]]), $user->name());
|
||||
$tools->redirect("services.php");
|
||||
} else {
|
||||
$tools->redirect("nonfareilfurbo.php");
|
||||
$tools->redirect("accessdenied.php");
|
||||
}
|
||||
}
|
||||
*/} elseif($tools->validate_form_data('$post-mod', true, "delete")) {
|
||||
|
@ -32,9 +32,9 @@ if($tools->validate_form_data('$post-mod', true, "add")) {
|
|||
if($_POST["token"] == $_SESSION['token']){
|
||||
bdump("removing user");
|
||||
$user->remove_user($_POST["id"]);
|
||||
$tools->redirect("lista.php");
|
||||
$tools->redirect("list.php");
|
||||
} else {
|
||||
$tools->redirect("nonfareilfurbo.php");
|
||||
$tools->redirect("accessdenied.php");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -54,12 +54,12 @@ if($tools->validate_form_data('$post-mod', true, "add")) {
|
|||
}
|
||||
if($modalità=="edit" || $modalità=="delete"){
|
||||
if(empty($id)){
|
||||
$tools->redirect("nonfareilfurbo.php");
|
||||
$tools->redirect("accessdenied.php");
|
||||
} elseif (!$database->exists("profiles", $id)){
|
||||
$tools->redirect("nonfareilfurbo.php");
|
||||
$tools->redirect("accessdenied.php");
|
||||
}
|
||||
}
|
||||
loadtemplate('edit_user.html', ['id' => $id, 'token' => $_SESSION["token"], 'modalità' => $modalità, 'values' => $values, 'titolo' => ucfirst($modalità) . ' '.ucfirst(t("user",false))]);
|
||||
loadtemplate('edit_user.html', ['id' => $id, 'token' => $_SESSION["token"], 'modalità' => $modalità, 'values' => $values, 'title' => ucfirst($modalità) . ' '.ucfirst(t("user",false))]);
|
||||
bdump($_SESSION['token'], "token");
|
||||
}
|
||||
?>
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
require_once 'ui.php';
|
||||
loadtemplate('grafici.html', ['titolo' => 'Grafici']);
|
||||
loadtemplate('grafici.html', ['title' => 'Grafici']);
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<?php
|
||||
require_once 'ui.php';
|
||||
if($user->authenticated()){
|
||||
$tools->redirect("lista.php");
|
||||
$tools->redirect("list.php");
|
||||
}
|
||||
$errore = false;
|
||||
$error = false;
|
||||
if(isset($_POST['name']) & isset($_POST['password'])){
|
||||
$login = $user->login($_POST['name'], $_POST['password']);
|
||||
if($login===true){
|
||||
$tools->redirect("lista.php");
|
||||
$tools->redirect("list.php");
|
||||
} else {
|
||||
$errore = $login;
|
||||
bdump($errore);
|
||||
$error = $login;
|
||||
bdump($error);
|
||||
}
|
||||
}
|
||||
loadtemplate('index.html', ['errore' => $errore, 'titolo' => t('Login',false)], false);
|
||||
loadtemplate('index.html', ['error' => $error, 'title' => t('Login',false)], false);
|
|
@ -73,11 +73,11 @@ function checkConnection($host, $user, $password, $database, $return=false){
|
|||
if($connectionOk){
|
||||
try{
|
||||
try{
|
||||
$connection->exec("CREATE DATABASE IF NOT EXISTS " . /*preg_replace('/[^a-zA-Z0-9]/', '', */trim($database)/*)*/);
|
||||
$connection->exec("CREATE DATABASE IF NOT EXISTS " . trim($database));
|
||||
} catch(Exception $e) {
|
||||
//nothing
|
||||
}
|
||||
$connection->exec("use " . /*preg_replace('/[^a-zA-Z0-9]/', '', */trim($database)/*)*/);
|
||||
$connection->exec("use " . trim($database));
|
||||
} catch (PDOException $e){
|
||||
if($return){
|
||||
return false;
|
||||
|
@ -229,10 +229,10 @@ CREATE TABLE IF NOT EXISTS `".$prefix."_log` (
|
|||
`time` varchar(100) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
CREATE TABLE IF NOT EXISTS `".$prefix."_minuti` (
|
||||
CREATE TABLE IF NOT EXISTS `".$prefix."_minutes` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`mese` int(2) NOT NULL,
|
||||
`anno` int(2) NOT NULL,
|
||||
`month` int(2) NOT NULL,
|
||||
`year` int(2) NOT NULL,
|
||||
`list` mediumtext NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
@ -270,7 +270,7 @@ CREATE TABLE IF NOT EXISTS `".$prefix."_profiles` (
|
|||
`services` int(11) NOT NULL DEFAULT 0,
|
||||
`trainings` int(11) NOT NULL DEFAULT 0,
|
||||
`online_time` int(11) NOT NULL DEFAULT 0,
|
||||
`minuti_dispo` int(11) NOT NULL DEFAULT 0,
|
||||
`availability_minutes` int(11) NOT NULL DEFAULT 0,
|
||||
`immagine` varchar(1000) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `Id` (`id`)
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
<?php
|
||||
require_once 'ui.php';
|
||||
loadtemplate('list.html', ['title' => t("Availability List",false)]);
|
||||
bdump($_SESSION);
|
|
@ -1,4 +0,0 @@
|
|||
<?php
|
||||
require_once 'ui.php';
|
||||
loadtemplate('lista.html', ['titolo' => t("Availability List",false)]);
|
||||
bdump($_SESSION);
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
require_once 'ui.php';
|
||||
loadtemplate('log.html', ['titolo' => t('Logs',false)]);
|
||||
loadtemplate('log.html', ['title' => t('Logs',false)]);
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
require_once 'ui.php';
|
||||
loadtemplate('profilo.html', ['titolo' => t("Profile page")]);
|
||||
loadtemplate('profilo.html', ['title' => t("Profile page")]);
|
|
@ -3,7 +3,7 @@ include_once("../../core.php");
|
|||
init_class();
|
||||
$user->requirelogin();
|
||||
|
||||
$risultato = $database->exec("SELECT * FROM `%PREFIX%_profiles` ORDER BY available DESC, caposquadra DESC, services ASC, minuti_dispo ASC, name ASC;", true);
|
||||
$risultato = $database->exec("SELECT * FROM `%PREFIX%_profiles` ORDER BY available DESC, caposquadra DESC, services ASC, availability_minutes ASC, name ASC;", true);
|
||||
|
||||
$hidden = $user->hidden();
|
||||
?>
|
||||
|
@ -78,18 +78,14 @@ th, td {
|
|||
};
|
||||
echo "</td>
|
||||
<td><a href='tel:+" . $row['telefono'] . "'><i class='fa fa-phone'></i></a></td><td>";
|
||||
|
||||
//if ($row['available'] == 1) {
|
||||
$nome_url = urlencode($row['name']);
|
||||
echo " <a href='https://api.whatsapp.com/send?phone=" . $row['telefono'] . "&text=ALLERTA IN CORSO.%20Mettiti%20in%20contatto%20con%20$nome_url'><i class='fa fa-whatsapp' style='color:green'></i></td>";
|
||||
/*} else{
|
||||
echo "";
|
||||
};*/
|
||||
|
||||
|
||||
$nome_url = urlencode($row['name']);
|
||||
echo " <a href='https://api.whatsapp.com/send?phone=" . $row['telefono'] . "&text=ALLERTA IN CORSO.%20Mettiti%20in%20contatto%20con%20$nome_url'><i class='fa fa-whatsapp' style='color:green'></i></td>";
|
||||
|
||||
$services = $row['services'];
|
||||
$minuti = $row['minuti_dispo'];
|
||||
$minutes = $row['availability_minutes'];
|
||||
$u = 'anagrafica.php?user=' . str_replace(' ', '_', urldecode(strtolower($row["id"])));
|
||||
echo "<td>$services</td><td>$minuti</td><td><a href='$u'><p>".t("Others infos",false)."</p></a></td></tr>";
|
||||
echo "<td>$services</td><td>$minutes</td><td><a href='$u'><p>".t("Others infos",false)."</p></a></td></tr>";
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -326,7 +326,7 @@ echo("<p>".t("Available",false).": <b>{$disp}</b></p><br>");
|
|||
echo("<p>".t("Foreman",false).": <b>{$caposquadra}</b></p><br>");
|
||||
echo("<p>".t("Driver",false).": <b>{$autista}</b></p><br>");
|
||||
echo("<p>".t("Phone number",false)." <i class='fa fa-phone' style='color:green' width='22px'></i>: <b><a href='tel:{$row['telefono']}'>{$row['telefono']}</a></b></p><br>");
|
||||
echo("<p>".t("Availability Minutes",false)." <br>(".t("This month",false).") <i class='demo-icon icon-hourglass'></i>: <b>{$row['minuti_dispo']} minuti</b></p><br>");
|
||||
echo("<p>".t("Availability Minutes",false)." <br>(".t("This month",false).") <i class='demo-icon icon-hourglass'></i>: <b>{$row['availability_minutes']} minutes</b></p><br>");
|
||||
echo("<p>".t("Services",false).": <b>{$row['services']}</b></p><br>");
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -3,7 +3,7 @@ include_once("../../core.php");
|
|||
init_class();
|
||||
$user->requirelogin();
|
||||
|
||||
$users_sql = "SELECT `id`, `name`, `available`, `caposquadra`, `autista`, `telefono`, `services`, `trainings`, `online`, `minuti_dispo`, `immagine` FROM `%PREFIX%_profiles` LIMIT 0 , 30";
|
||||
$users_sql = "SELECT `id`, `name`, `available`, `caposquadra`, `autista`, `telefono`, `services`, `trainings`, `online`, `availability_minutes`, `immagine` FROM `%PREFIX%_profiles` LIMIT 0 , 30";
|
||||
$users = $database->exec($users_sql, true);
|
||||
|
||||
$services_sql="SELECT * FROM `%PREFIX%_services` ORDER BY `services`.`id` DESC LIMIT 0 , 30";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
$start = true;
|
||||
$minuti = 5;
|
||||
$minutes = 5;
|
||||
include_once "../../core.php";
|
||||
init_class();
|
||||
$user->requirelogin();
|
||||
|
@ -9,11 +9,11 @@ function arraynum(){
|
|||
global $database;
|
||||
$risultato = $database->exec("SELECT * FROM `%PREFIX%_profiles` ORDER BY available DESC, caposquadra DESC, services ASC, name ASC", true);
|
||||
$incremento = array();
|
||||
$minuti_dispo_old = array();
|
||||
$availability_minutes_old = array();
|
||||
foreach($risultato as $row){
|
||||
if($row['available'] == "1"){
|
||||
$incremento[] = $row['name'];
|
||||
$minuti_dispo_old[] = $row['minuti_dispo'];
|
||||
$availability_minutes_old[] = $row['availability_minutes'];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ include_once("../../core.php");
|
|||
init_class();
|
||||
$user->requirelogin();
|
||||
|
||||
$risultato = $database->exec("SELECT * FROM `%PREFIX%_profiles` ORDER BY available DESC, caposquadra DESC, services ASC, minuti_dispo ASC, name ASC;", true);
|
||||
$risultato = $database->exec("SELECT * FROM `%PREFIX%_profiles` ORDER BY available DESC, caposquadra DESC, services ASC, availability_minutes ASC, name ASC;", true);
|
||||
|
||||
$hidden = $user->hidden();
|
||||
?>
|
|
@ -12,7 +12,7 @@ $(document).ready(function(){
|
|||
console.log("cleaned");
|
||||
}
|
||||
db.version(1).stores({
|
||||
users: '++id,name,available,caposquadra,autista,telefono,services,trainings,online,minuti_dispo,immagine',
|
||||
users: '++id,name,available,caposquadra,autista,telefono,services,trainings,online,availability_minutes,immagine',
|
||||
services: '++id,data,codice,uscita,rientro,capo,autisti,personale,luogo,note,tipo,incrementa,inseritoda'
|
||||
});
|
||||
$.each( data.users, function( key, val ) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
require_once 'ui.php';
|
||||
loadtemplate('services.html', ['titolo' => t('Services',false)]);
|
||||
loadtemplate('services.html', ['title' => t('Services',false)]);
|
||||
?>
|
||||
|
|
|
@ -18,5 +18,5 @@ sound.play();
|
|||
Possibile attività di hacking del software rilevata
|
||||
<img src='{{ urlsoftware }}/risorse/images/{{ error_image }}'></img>
|
||||
</div>
|
||||
<h1>Abbiamo rilevato un' attività sospetta provenire dal tuo dispositivo o dalla tua rete.<br>Se non stavi facendo niente di brutto, e ritieni che questo sia un errore, la<br>preghiamo di contattare l'assistenza.</h1>
|
||||
<h1>Abbiamo rilevato un' attività sospetta provenire dal tuo dispositivo o dalla tua rete.<br>Se non stavi facendo niente di brutto, e ritieni che questo sia un error, la<br>preghiamo di contattare l'assistenza.</h1>
|
||||
</body>
|
|
@ -2,14 +2,14 @@
|
|||
|
||||
{% block content %}
|
||||
<br>
|
||||
<div id='lista'>
|
||||
<div id='list'>
|
||||
</div>
|
||||
<script>
|
||||
$("#lista").load("risorse/ajax/ajax_anagrafica.php?user={{ dacontrollare }}");
|
||||
$("#list").load("risorse/ajax/ajax_anagrafica.php?user={{ dacontrollare }}");
|
||||
$(document).ready(function() {
|
||||
|
||||
setInterval(function() {
|
||||
$("#lista").load("risorse/ajax/ajax_anagrafica.php?user={{ dacontrollare }}");
|
||||
$("#list").load("risorse/ajax/ajax_anagrafica.php?user={{ dacontrollare }}");
|
||||
}, 10000);
|
||||
|
||||
});
|
||||
|
@ -32,7 +32,7 @@ check();
|
|||
data: {nameuser: nameuser, dispo:dispo},
|
||||
success: function (data) {
|
||||
alert("Hai editto la disponibilità di " + nameuser + " in caso in allerta.");
|
||||
$("#lista").load("risorse/ajax/ajax_anagrafica.php?user={{ dacontrollare }}");
|
||||
$("#list").load("risorse/ajax/ajax_anagrafica.php?user={{ dacontrollare }}");
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="it">
|
||||
<head>
|
||||
{% block head %}
|
||||
<title>{{ titolo }} - ALLERTA sistema gestionale {{ owner }}</title>
|
||||
<title>{{ title }} - ALLERTA sistema gestionale {{ owner }}</title>
|
||||
<link href="{{ urlsoftware }}/risorse/images/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon">
|
||||
<meta name="viewport" content="user-scalable=no, initial-scale=1">
|
||||
<style>
|
||||
|
@ -322,7 +322,7 @@
|
|||
{% block menu %}
|
||||
<!-- Menu -->
|
||||
<div class="topnav" id="myTopnav">
|
||||
<a href="{{ urlsoftware }}lista.php" class="active">{{ 'Availability List'|t }}</a>
|
||||
<a href="{{ urlsoftware }}list.php" class="active">{{ 'Availability List'|t }}</a>
|
||||
<a href="{{ urlsoftware }}services.php">{{ 'Services'|t }}</a>
|
||||
<a href="{{ urlsoftware }}trainings.php">{{ 'Trainings'|t }}</a>
|
||||
<a href="{{ urlsoftware }}log.php">{{ 'Logs'|t }}</a>
|
||||
|
|
|
@ -4,18 +4,18 @@
|
|||
<br>
|
||||
<img alt="VVF" src="./risorse/images/owner.png" width="150" style="display: block; margin-left: auto; margin-right: auto;">
|
||||
<br>
|
||||
<div id="lista" hidden></div>
|
||||
<div id="list" hidden></div>
|
||||
<b>TODO</b>
|
||||
<script>
|
||||
$.get( "risorse/ajax/ajax_log.php", function( data ) {
|
||||
$( "#lista" ).html( data );
|
||||
console.log( "Caricato lista." );
|
||||
$( "#list" ).html( data );
|
||||
console.log( "Loaded list." );
|
||||
});
|
||||
$(document).ready(function() {
|
||||
|
||||
setInterval(function() {
|
||||
$.get( "risorse/ajax/ajax_log.php", function( data ) {
|
||||
$( "#lista" ).html( data );
|
||||
$( "#list" ).html( data );
|
||||
});
|
||||
}, 10000);
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if errore %}
|
||||
{% if error %}
|
||||
<div class='text-center' id="err">
|
||||
<script>
|
||||
var sound = new Howl({
|
||||
|
@ -17,7 +17,7 @@ sound.play();
|
|||
<script>
|
||||
$("#err").delay(5000).fadeOut(300);
|
||||
</script>
|
||||
{{ errore.text }}
|
||||
{{ error.text }}
|
||||
<img src='{{ urlsoftware }}/risorse/images/{{ error_image }}'></img>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
|
@ -44,22 +44,22 @@
|
|||
<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>
|
||||
<div id="list"></div>
|
||||
{% if user.full_viewer == false %}
|
||||
<script>
|
||||
$( "#lista" ).load("risorse/ajax/ajax_lista.php");
|
||||
$( "#list" ).load("risorse/ajax/ajax_list.php");
|
||||
$(document).ready(function() {
|
||||
setInterval(function() {
|
||||
$( "#lista" ).load("risorse/ajax/ajax_lista.php");
|
||||
$( "#list" ).load("risorse/ajax/ajax_list.php");
|
||||
}, 10000);
|
||||
});
|
||||
</script>
|
||||
{% elseif user.full_viewer == true %}
|
||||
<script>
|
||||
$( "#lista" ).load("risorse/ajax/ajax_lista_admin.php");
|
||||
$( "#list" ).load("risorse/ajax/ajax_admin_list.php");
|
||||
$(document).ready(function() {
|
||||
setInterval(function() {
|
||||
$( "#lista" ).load("risorse/ajax/ajax_lista_admin.php");
|
||||
$( "#list" ).load("risorse/ajax/ajax_admin_list.php");
|
||||
}, 10000);
|
||||
});
|
||||
</script>
|
||||
|
@ -75,7 +75,7 @@ $(document).ready(function() {
|
|||
border: solid 1px #0076a3;
|
||||
background: #0095cd;
|
||||
}
|
||||
|
||||
|
||||
#href {
|
||||
outline: none;
|
||||
cursor: pointer;
|
|
@ -4,17 +4,17 @@
|
|||
<br>
|
||||
<img alt="VVF" src="./risorse/images/owner.png" width="150" style="display: block; margin-left: auto; margin-right: auto;">
|
||||
<br>
|
||||
<div id="lista"></div>
|
||||
<div id="list"></div>
|
||||
<script>
|
||||
$.get( "risorse/ajax/ajax_log.php", function( data ) {
|
||||
$( "#lista" ).html( data );
|
||||
console.log( "Caricato lista." );
|
||||
$( "#list" ).html( data );
|
||||
console.log( "Loaded list." );
|
||||
});
|
||||
$(document).ready(function() {
|
||||
|
||||
setInterval(function() {
|
||||
$.get( "risorse/ajax/ajax_log.php", function( data ) {
|
||||
$( "#lista" ).html( data );
|
||||
$( "#list" ).html( data );
|
||||
});
|
||||
}, 10000);
|
||||
|
||||
|
|
|
@ -8,20 +8,18 @@
|
|||
<a id='add' href="edit_service.php?add">{{ 'Add service'|t }}</a>
|
||||
</p>
|
||||
<br>
|
||||
<div id="lista"></div>
|
||||
<div id="list"></div>
|
||||
<script>
|
||||
$.get( "risorse/ajax/ajax_services.php", function( data ) {
|
||||
$( "#lista" ).html( data );
|
||||
$( "#list" ).html( data );
|
||||
console.log( "List loaded." );
|
||||
});
|
||||
$(document).ready(function() {
|
||||
|
||||
setInterval(function() {
|
||||
$.get( "risorse/ajax/ajax_services.php", function( data ) {
|
||||
$( "#lista" ).html( data );
|
||||
$( "#list" ).html( data );
|
||||
});
|
||||
}, 10000);
|
||||
|
||||
});
|
||||
</script>
|
||||
<br>
|
||||
|
|
|
@ -8,31 +8,19 @@
|
|||
<a id='add' href="edit_training.php?add">{{ 'Add training'|t }}</a>
|
||||
</p>
|
||||
<br>
|
||||
<div id="lista"></div>
|
||||
<div id="list"></div>
|
||||
<script>
|
||||
$.get( "risorse/ajax/ajax_trainings.php", function( data ) {
|
||||
$( "#lista" ).html( data );
|
||||
console.log( "Caricato lista." );
|
||||
$( "#list" ).html( data );
|
||||
console.log( "Loaded list." );
|
||||
});
|
||||
$(document).ready(function() {
|
||||
|
||||
setInterval(function() {
|
||||
$.get( "risorse/ajax/ajax_trainings.php", function( data ) {
|
||||
$( "#lista" ).html( data );
|
||||
$( "#list" ).html( data );
|
||||
});
|
||||
}, 10000);
|
||||
|
||||
});
|
||||
/*
|
||||
check();
|
||||
$(document).ready(function() {
|
||||
|
||||
setInterval(function() {
|
||||
check();
|
||||
}, 10000);
|
||||
|
||||
});
|
||||
*/
|
||||
</script>
|
||||
<br>
|
||||
<br>
|
||||
|
|
|
@ -25,22 +25,22 @@ class FirstCest
|
|||
$I->fillField('name', 'admin_user');
|
||||
$I->fillField('password', 'password');
|
||||
$I->click('login');
|
||||
$I->seeCurrentURLEquals('/lista.php');
|
||||
$I->seeCurrentURLEquals('/list.php');
|
||||
$I->see('admin_user');
|
||||
}
|
||||
|
||||
public function logsWorks(AcceptanceTester $I)
|
||||
{
|
||||
//$I->amOnPage('/lista.php'); TODO: Fix github action
|
||||
//$I->amOnPage('/list.php'); TODO: Fix github action
|
||||
//$I->click('Attivo');
|
||||
//$I->click('Log');
|
||||
/*$I->seeCurrentURLEquals('/log.php');
|
||||
$I->see('Attivazione disponibilita\'');
|
||||
|
||||
$I->click('Lista Disponibilità');
|
||||
$I->seeCurrentURLEquals('/lista.php');
|
||||
$I->seeCurrentURLEquals('/list.php');
|
||||
$I->click('Non Attivo');
|
||||
$I->seeCurrentURLEquals('/lista.php');
|
||||
$I->seeCurrentURLEquals('/list.php');
|
||||
$I->click('Log');
|
||||
$I->seeCurrentURLEquals('/log.php');
|
||||
$I->see('Rimozione disponibilita\'');*/
|
||||
|
@ -54,7 +54,7 @@ class FirstCest
|
|||
/* TODO: Add more users
|
||||
$faker = \Faker\Factory::create();
|
||||
|
||||
$I->amOnPage('/lista.php');
|
||||
$I->amOnPage('/list.php');
|
||||
$I->click('Services');
|
||||
$I->seeCurrentURLEquals('/services.php');
|
||||
$I->click('add service');
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
require_once 'ui.php';
|
||||
loadtemplate('trainings.html', ['titolo' => t('Trainings',false)]);
|
||||
loadtemplate('trainings.html', ['title' => t('Trainings',false)]);
|
||||
|
|
Loading…
Reference in New Issue