-
Notifications
You must be signed in to change notification settings - Fork 0
/
editproject.php
47 lines (47 loc) · 1.22 KB
/
editproject.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
<?php
session_start();
require_once("./includes/config_session.inc.php");
require_once("./edit/edit_view.php");
require_once("./includes/login_view.inc.php");
if(!isset($_SESSION["user_id"]) || $_SESSION["user_id"] != $_SESSION["tmpP"]["uid"] || !isset($_GET["id"]))
{
header("Location: ./");
}
$pid = $_GET["id"];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./css/styles.css">
<title>Edit Project</title>
</head>
<body>
<div class="header">
<h3>
<?= serveUsername() ?>
</h3>
<?php
if(isset($_SESSION["user_id"])) { ?>
<form action="./includes/logout.inc.php">
<button id="logout">Logout</button>
</form>
<?php } ?>
</div>
<hr class="create-hr">
<div class="edit-form">
<h1>Edit an existing Project</h1>
<?php
checkEditErrors();
?>
<form action="./edit/editform.php?id=<?php echo $pid ?>" method="POST" class="edit">
<?= serveInputs() ?>
<input type="submit">
</form>
<form action="./" class="back-button">
<button>Back</button>
</form>
</div>
</body>
</html>