-
Notifications
You must be signed in to change notification settings - Fork 0
/
report_page.php
69 lines (56 loc) · 2.7 KB
/
report_page.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
require_once "../includes/db_handler.inc.php";
require_once "../includes/config_session.inc.php";
require_once "../views/reports.inc.php";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Quirx - Report Page</title>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css" integrity="sha512-jnSuA4Ss2PkkikSOLtYs8BlYIeeIK1h99ty4YfvRPAlzr377vr3CXDb7sb7eEEBYjDtcYj+AjBH3FLv5uSJuXg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="../css/global.css">
<link rel="stylesheet" href="../css/navbar.css" />
<link rel="stylesheet" href="../css/report_page.css" />
</head>
<body>
<?php include_once('../includes/components/navbar.inc.php') ?>
<?php
// check is user is not logged in
if (!isset($_SESSION['user_id']) || !isset($_SESSION['user_role'])) {
// if not, redirect to home page
header('Location: ../index.php');
exit();
}
$video_id = $_GET['video_id'];
check_and_print_report_errors();
?>
<main class="container">
<h1 class="mt-5 mb-5 heading">Submit a report</h1>
<form action="../includes/submit_report.inc.php" method="post">
<div class="form-check">
<input class="form-check-input" type="radio" name="report_type" id="videoReport" value="video" checked>
<label class="form-check-label" for="videoReport">
Report the video
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="report_type" id="userReport" value="user">
<label class="form-check-label" for="userReport">
Report the user who uploaded the video
</label>
</div>
<div class="form-group mt-3">
<label for="reason">Reason</label>
<textarea class="form-control" id="reason" name="reason" rows="2" placeholder="describe your issue here.." required></textarea>
</div>
<input type="hidden" name="video_id" value="<?php echo $video_id; ?>">
<button type="submit" class="btn btn-danger mt-3">Report</button>
</form>
</main>
<script src="../js/close_modal.js"></script>
</body>
</html>