forked from niecoola/Perusnia-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontact_input.php
More file actions
70 lines (59 loc) · 2.76 KB
/
Copy pathcontact_input.php
File metadata and controls
70 lines (59 loc) · 2.76 KB
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
70
<?php
session_start();
if ($_SESSION["userdata"]["id_level"] != 1) {
header('Location:404.php');
}
$active = "about_website.php";
require './layout/headerBookCenter.php';
require_once './controller/ContactController.php';
$contact = new ContactController();
if (isset($_POST["submit"])) {
$contact = new ContactController();
if ($contact->updateContact($_POST) > 0) {
echo '<div class="alert alert-success alert-dismissible fade show" role="alert">
Data berhasil di update
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>';
} else {
echo '<div class="alert alert-success alert-dismissible fade show" role="alert">
Data berhasil di update
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>';
}
}
$data = $contact->index();
?>
<h4 class="my-4">Input Contact</h4>
<form action="" method="post">
<!-- rows -->
<div class="mb-3">
<div class="form-group">
<label for="exampleFormControlTextarea1" class="form-label">Alamat</label>
<textarea class="form-control" name="alamat" id="exampleFormControlTextarea1" rows="3" required><?= $data['alamat'] ?></textarea>
</div>
</div>
<div class="mb-3">
<label for="exampleFormControlInput1" class="form-label">Nomor Telepon</label>
<input type="text" name="nomor" class="form-control" id="exampleFormControlInput1" value="<?= $data['telepon'] ?>" placeholder="628132xxxxx" required>
</div>
<div class="mb-3">
<label for="exampleFormControlInput1" class="form-label">Hari Buka</label>
<input type="text" name="hari" class="form-control" id="exampleFormControlInput1" value="<?= $data['hari_buka'] ?>" required>
</div>
<div class="mb-3">
<label for="exampleFormControlInput1" class="form-label">Jam Buka</label>
<input type="time" name="buka" class="form-control" id="exampleFormControlInput1" value="<?= $data['jam_buka'] ?>" required>
</div>
<div class="mb-3">
<label for="exampleFormControlInput1" class="form-label">Jam Tutup</label>
<input type="time" name="tutup" class="form-control" id="exampleFormControlInput1" value="<?= $data['jam_tutup'] ?>" required>
</div>
<!--<div class="mb-3">
<label for="exampleFormControlTextarea1" class="form-label">Kordinat</label>
<textarea class="form-control" name="kordinat" id="exampleFormControlTextarea1" rows="3" required> </textarea>
</div>-->
<div class="mb-3">
<button type="submit" name="submit" class="btn btn-success">Simpan</button>
</div>
</form>
<?php require './layout/footerBookCenter.php' ?>