195 lines
12 KiB
PHP
195 lines
12 KiB
PHP
<?php
|
|
// --- Form Submission Logic ---
|
|
$is_submitted = false;
|
|
$data = [];
|
|
$fields = [
|
|
'DISTRICT', 'POLICE_STATION', 'FIR_NO', 'DATE_OF_FIR',
|
|
'SECTIONS_OF_LAW', 'DATE_OF_OCCURRENCE', 'TIME_OF_OCCURRENCE',
|
|
'PLACE_OF_OCCURRENCE', 'DATE_OF_INFO', 'TIME_OF_INFO',
|
|
'COMPLAINANT_NAME', 'COMPLAINANT_FATHER_NAME', 'COMPLAINANT_ADDRESS',
|
|
'ACCUSED_DETAILS', 'BRIEF_FACTS_OF_THE_CASE', 'INVESTIGATING_OFFICER_NAME',
|
|
'IO_RANK', 'OFFICER_IN_CHARGE_NAME', 'OFFICER_IN_CHARGE_RANK'
|
|
];
|
|
|
|
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|
$is_submitted = true;
|
|
foreach ($fields as $field) {
|
|
$data[$field] = isset($_POST[$field]) ? htmlspecialchars($_POST[$field], ENT_QUOTES, 'UTF-8') : '';
|
|
}
|
|
}
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>MAKDOC - AI Legal Assistant</title>
|
|
|
|
<!-- SEO and Meta Tags -->
|
|
<meta name="description" content="Built with Flatlogic. Generate official Indian legal documents like First Information Reports (FIR) with an easy-to-use form.">
|
|
<meta name="keywords" content="AI legal assistant, legal document generation, FIR generator, Indian law, police report, legal tech, document automation, CrPC section 154, criminal procedure code, legal forms, Built with Flatlogic Generator">
|
|
<meta property="og:title" content="MAKDOC - AI Legal Assistant">
|
|
<meta property="og:description" content="Built with Flatlogic. Generate official Indian legal documents like First Information Reports (FIR) with an easy-to-use form.">
|
|
<meta property="og:image" content="<?php echo htmlspecialchars($_SERVER['PROJECT_IMAGE_URL'] ?? '', ENT_QUOTES, 'UTF-8'); ?>">
|
|
<meta name="twitter:card" content="summary_large_image">
|
|
<meta name="twitter:image" content="<?php echo htmlspecialchars($_SERVER['PROJECT_IMAGE_URL'] ?? '', ENT_QUOTES, 'UTF-8'); ?>">
|
|
|
|
<!-- Styles and Fonts -->
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
|
|
<link href="assets/css/custom.css?v=<?php echo time(); ?>" rel="stylesheet">
|
|
</head>
|
|
<body class="bg-light">
|
|
|
|
<!-- Header -->
|
|
<nav class="navbar navbar-expand-lg navbar-light bg-white shadow-sm">
|
|
<div class="container">
|
|
<a class="navbar-brand" href="#">
|
|
<i class="fas fa-robot text-primary"></i> MAKDOC
|
|
</a>
|
|
</div>
|
|
</nav>
|
|
|
|
<!-- Main Content -->
|
|
<main class="container my-5">
|
|
<div class="glass-card">
|
|
<div class="text-center mb-4">
|
|
<h1 class="h2">First Information Report (FIR) Generator</h1>
|
|
<p class="text-muted">Fill in the details below to generate a draft FIR under Section 154 Cr.P.C.</p>
|
|
</div>
|
|
|
|
<form action="index.php" method="POST">
|
|
<!-- Section 1 & 2 -->
|
|
<h3 class="form-section-title">1. Case Details</h3>
|
|
<div class="row g-3 mb-4">
|
|
<div class="col-md-6"><label class="form-label">District</label><input type="text" class="form-control" name="DISTRICT" required></div>
|
|
<div class="col-md-6"><label class="form-label">Police Station</label><input type="text" class="form-control" name="POLICE_STATION" required></div>
|
|
<div class="col-md-6"><label class="form-label">FIR No.</label><input type="text" class="form-control" name="FIR_NO" required></div>
|
|
<div class="col-md-6"><label class="form-label">Date of FIR</label><input type="date" class="form-control" name="DATE_OF_FIR" required></div>
|
|
<div class="col-12"><label class="form-label">Act(s) and Section(s)</label><input type="text" class="form-control" name="SECTIONS_OF_LAW" placeholder="e.g., IPC Section 302" required></div>
|
|
</div>
|
|
|
|
<!-- Section 3 -->
|
|
<h3 class="form-section-title">2. Occurrence of Offence</h3>
|
|
<div class="row g-3 mb-4">
|
|
<div class="col-md-6"><label class="form-label">Date of Occurrence</label><input type="date" class="form-control" name="DATE_OF_OCCURRENCE" required></div>
|
|
<div class="col-md-6"><label class="form-label">Time of Occurrence</label><input type="time" class="form-control" name="TIME_OF_OCCURRENCE"></div>
|
|
<div class="col-12"><label class="form-label">Place of Occurrence</label><input type="text" class="form-control" name="PLACE_OF_OCCURRENCE" required></div>
|
|
<div class="col-md-6"><label class="form-label">Date Information Received at P.S.</label><input type="date" class="form-control" name="DATE_OF_INFO" required></div>
|
|
<div class="col-md-6"><label class="form-label">Time Information Received at P.S.</label><input type="time" class="form-control" name="TIME_OF_INFO" required></div>
|
|
</div>
|
|
|
|
<!-- Section 4 -->
|
|
<h3 class="form-section-title">3. Informant / Complainant</h3>
|
|
<div class="row g-3 mb-4">
|
|
<div class="col-md-6"><label class="form-label">Name</label><input type="text" class="form-control" name="COMPLAINANT_NAME" required></div>
|
|
<div class="col-md-6"><label class="form-label">Father's/Husband's Name</label><input type="text" class="form-control" name="COMPLAINANT_FATHER_NAME"></div>
|
|
<div class="col-12"><label class="form-label">Address</label><textarea class="form-control" name="COMPLAINANT_ADDRESS" rows="2" required></textarea></div>
|
|
</div>
|
|
|
|
<!-- Section 5, 6, 7 -->
|
|
<h3 class="form-section-title">4. Case Summary & Investigation</h3>
|
|
<div class="row g-3 mb-4">
|
|
<div class="col-12"><label class="form-label">Details of known/suspected/unknown accused</label><textarea class="form-control" name="ACCUSED_DETAILS" rows="3" required></textarea></div>
|
|
<div class="col-12"><label class="form-label">Brief facts of the case (Gist of information)</label><textarea class="form-control" name="BRIEF_FACTS_OF_THE_CASE" rows="5" required></textarea></div>
|
|
<div class="col-md-6"><label class="form-label">Investigating Officer (IO) Name</label><input type="text" class="form-control" name="INVESTIGATING_OFFICER_NAME" required></div>
|
|
<div class="col-md-6"><label class="form-label">IO Rank</label><input type="text" class="form-control" name="IO_RANK" required></div>
|
|
<div class="col-md-6"><label class="form-label">Officer-in-Charge Name</label><input type="text" class="form-control" name="OFFICER_IN_CHARGE_NAME" required></div>
|
|
<div class="col-md-6"><label class="form-label">Officer-in-Charge Rank</label><input type="text" class="form-control" name="OFFICER_IN_CHARGE_RANK" required></div>
|
|
</div>
|
|
|
|
<div class="text-center">
|
|
<button type="submit" class="btn btn-gradient">Generate FIR Preview</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<?php if ($is_submitted): ?>
|
|
<div class="fir-preview-container" id="fir-preview">
|
|
<div class="d-flex justify-content-between align-items-center mb-3">
|
|
<h2 class="m-0">Generated FIR Preview</h2>
|
|
<button class="btn btn-outline-secondary" onclick="window.print()"><i class="fas fa-print me-2"></i>Print</button>
|
|
</div>
|
|
<div class="fir-preview">
|
|
<h2>First Information Report (Under Section 154 Cr.P.C.)</h2>
|
|
|
|
<div class="section">
|
|
<div class="grid">
|
|
<div><strong>1. District:</strong> <?php echo $data['DISTRICT']; ?></div>
|
|
<div><strong>Police Station:</strong> <?php echo $data['POLICE_STATION']; ?></div>
|
|
<div><strong>FIR No.:</strong> <?php echo $data['FIR_NO']; ?></div>
|
|
<div><strong>Date:</strong> <?php echo $data['DATE_OF_FIR']; ?></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section">
|
|
<strong>2. Act(s) and Section(s):</strong>
|
|
<p><?php echo $data['SECTIONS_OF_LAW']; ?></p>
|
|
</div>
|
|
|
|
<div class="section">
|
|
<strong>3. Occurrence of Offence:</strong>
|
|
<div class="grid">
|
|
<div>a) <strong>Date/Time:</strong> From <?php echo $data['DATE_OF_OCCURRENCE']; ?> <?php echo $data['TIME_OF_OCCURRENCE']; ?></div>
|
|
<div class="full-width">b) <strong>Place of Occurrence:</strong> <?php echo $data['PLACE_OF_OCCURRENCE']; ?></div>
|
|
<div class="full-width">c) <strong>Information received at P.S.:</strong> Date: <?php echo $data['DATE_OF_INFO']; ?>, Time: <?php echo $data['TIME_OF_INFO']; ?></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section">
|
|
<strong>4. Informant / Complainant:</strong>
|
|
<div class="grid">
|
|
<div>a) <strong>Name:</strong> <?php echo $data['COMPLAINANT_NAME']; ?></div>
|
|
<div>b) <strong>Father's/Husband's Name:</strong> <?php echo $data['COMPLAINANT_FATHER_NAME']; ?></div>
|
|
<div class="full-width">c) <strong>Address:</strong> <?php echo $data['COMPLAINANT_ADDRESS']; ?></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section">
|
|
<strong>5. Details of known / suspected / unknown accused with full particulars:</strong>
|
|
<p><?php echo $data['ACCUSED_DETAILS']; ?></p>
|
|
</div>
|
|
|
|
<div class="section">
|
|
<strong>6. Brief facts of the case (Gist of information):</strong>
|
|
<p><?php echo $data['BRIEF_FACTS_OF_THE_CASE']; ?></p>
|
|
</div>
|
|
|
|
<div class="section">
|
|
<strong>7. Action Taken:</strong>
|
|
<p>Since the above report reveals commission of offence(s) u/s as mentioned at Item No. 2. Registered the case and took up the investigation.</p>
|
|
<div class="grid">
|
|
<div><strong>Investigating Officer (IO):</strong> <?php echo $data['INVESTIGATING_OFFICER_NAME']; ?></div>
|
|
<div><strong>Rank:</strong> <?php echo $data['IO_RANK']; ?></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section" style="margin-top: 4rem;">
|
|
<div class="grid">
|
|
<div style="text-align: center;">
|
|
_______________________<br>
|
|
<strong>Signature / Thumb impression of Complainant / Informant</strong>
|
|
</div>
|
|
<div style="text-align: center;">
|
|
_______________________<br>
|
|
<strong>Signature of Officer-in-Charge, Police Station</strong><br>
|
|
<strong>Name:</strong> <?php echo $data['OFFICER_IN_CHARGE_NAME']; ?><br>
|
|
<strong>Rank:</strong> <?php echo $data['OFFICER_IN_CHARGE_RANK']; ?><br>
|
|
<strong>PS:</strong> <?php echo $data['POLICE_STATION']; ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
</main>
|
|
|
|
<!-- Footer -->
|
|
<footer class="text-center py-4 text-muted border-top">
|
|
<p>Built with <a href="https://flatlogic.com" target="_blank">Flatlogic</a></p>
|
|
</footer>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
|
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
|
|
</body>
|
|
</html>
|