This repository has been archived by the owner on Jun 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
profile_tambah.php
79 lines (69 loc) · 2.91 KB
/
profile_tambah.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
70
71
72
73
74
75
76
77
78
79
<?php
include 'view/header.php';
session_cek();
//Error Null
$error = null;
if(isset($_POST['submit'])){
$groupname = $_POST['groupname'];
$session = $_POST['session'];
$download = $_POST['download'];
$upload = $_POST['upload'];
$url= $_POST['url'];
$result = tambah_group($groupname,$session,$download,$upload,$url);
if($result){
header('Location: profile.php');
}else{
$error = " Tidak Dapat Menambahkan Profile";
}
}
?>
<div class="row">
<!--sidenav-->
<?php
include 'view/sidenav.php';
?>
<!--main content-->
<div class="col s12 m8">
<h4 style="margin-bottom: 70px;margin-top:50px;">Tambah Hotspot Profile</h4>
<div style="margin:40px;">
<blockquote> <?= $error ?> </blockquote>
</div>
<div class="row">
<form class="col s12" method="POST">
<div class="row">
<div class="input-field col s6">
<input id="groupname" placeholder="groupname" type="text" class="validate" name="groupname" required>
<label for="groupname" data-error="wrong" data-success="right">Group Name</label>
</div>
</div>
<div class="row">
<div class="input-field col s6">
<input id="session" placeholder="session" type="number" class="validate" name="session" required>
<label for="session" data-error="wrong" data-success="right">Session (Menit)</label>
</div>
</div>
<div class="row">
<div class="input-field col s6">
<input id="download" placeholder="download" type="number" class="validate" name="download" required>
<label for="download" data-error="wrong" data-success="right">Max Download (KBps)</label>
</div>
</div>
<div class="row">
<div class="input-field col s6">
<input id="upload" placeholder="upload" type="number" class="validate" name="upload" required>
<label for="upload" data-error="wrong" data-success="right">Max Upload (KBps)</label>
</div>
</div>
<div class="row">
<div class="input-field col s6">
<input id="url" placeholder="http://smknet.id" type="url" class="validate" name="url" required>
<label for="url" data-error="wrong" data-success="right">Redirect URL </label>
</div>
</div>
<button class="btn waves-effect waves-light" type="submit" name="submit"> Simpan </button>
</form>
</div>
</div>
<?php
include 'view/footer.php';
?>