90 lines
4.5 KiB
PHP
90 lines
4.5 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="en" data-theme="light">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Credit Card Fraud Detection</title>
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
|
<link href="assets/css/custom.css?v=<?php echo time(); ?>" rel="stylesheet">
|
|
</head>
|
|
<body>
|
|
|
|
<nav class="navbar navbar-expand-lg navbar-dark">
|
|
<div class="container">
|
|
<a class="navbar-brand" href="#">Fraud Detection</a>
|
|
<div class="theme-switcher ms-auto">
|
|
<div class="form-check form-switch">
|
|
<input class="form-check-input" type="checkbox" id="theme-switch">
|
|
<label class="form-check-label" for="theme-switch"><i class="fas fa-moon theme-icon"></i></label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<div class="container mt-4">
|
|
<div class="hero animated">
|
|
<h1 class="animated" style="animation-delay: 0.3s;">Real-Time Transaction Analysis</h1>
|
|
<p class="lead animated" style="animation-delay: 0.5s;">Enter transaction details below to get a fraud probability score.</p>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-md-8 mx-auto">
|
|
<div class="card shadow-sm animated">
|
|
<div class="card-header">
|
|
<h5 class="mb-0">New Transaction</h5>
|
|
</div>
|
|
<div class="card-body">
|
|
<form id="prediction-form">
|
|
<p class="text-muted small">NOTE: For this demo, only a few of the 28 anonymized features are shown.</p>
|
|
<div class="row g-3">
|
|
<div class="col-md-6">
|
|
<label for="time" class="form-label">Time (seconds since first transaction)</label>
|
|
<input type="number" class="form-control" id="time" value="3600" required>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label for="amount" class="form-label">Amount</label>
|
|
<input type="number" step="0.01" class="form-control" id="amount" value="129.99" required>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label for="v1" class="form-label">V1</label>
|
|
<input type="number" step="any" class="form-control" id="v1" value="-1.35">
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label for="v2" class="form-label">V2</label>
|
|
<input type="number" step="any" class="form-control" id="v2" value="-0.03">
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label for="v3" class="form-label">V3</label>
|
|
<input type="number" step="any" class="form-control" id="v3" value="2.53">
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label for="v4" class="form-label">V4</label>
|
|
<input type="number" step="any" class="form-control" id="v4" value="1.37">
|
|
</div>
|
|
</div>
|
|
<div class="text-center mt-4">
|
|
<button type="submit" class="btn btn-primary btn-lg">Predict Fraud</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card shadow-sm mt-4" id="result-card" style="display: none; opacity: 0;">
|
|
<div class="card-body text-center">
|
|
<h5 id="result-message"></h5>
|
|
<p class="result-value" id="result-value"></p>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<footer class="text-center text-muted py-4 mt-5">
|
|
<p>© <?php echo date("Y"); ?> Fraud Detection Service</p>
|
|
</footer>
|
|
|
|
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
|
|
</body>
|
|
</html>
|