-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinsert.php
More file actions
87 lines (73 loc) · 2.33 KB
/
insert.php
File metadata and controls
87 lines (73 loc) · 2.33 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?php
include("config.php");
session_start();
if ($_SERVER["REQUEST_METHOD"] == "POST"){
$myusername = mysqli_real_escape_string($db, $_POST['username']);
$mypassword = mysqli_real_escape_string($db, $_POST['password']);
$sql = "SELECT id FROM admin WHERE username = '$myusername' AND passcode ='$mypassword'";
$result = mysqli_query($db, $sql);
$row = mysqli_fetch_array($result, MYSQLI_ASSOC);
$active = $row['active'];
$count = mysqli_num_rows($result);
if ($count == 1){
session_register("myusername");
$_SESSION['login_user'] = $myusername;
header("location: welcome.php");
}
else{
$error = "Your login name or password is invalid.";
}
}
?>
<!DOCTYPE html>
<html>
<head>
<title>VPS Control Panel</title>
<link rel="stylesheet" href="css/bootstrap.min.css">
</head>
<body>
<div style="width: 100%; margin: 20px auto 20px auto; max-width: 420px;">
<h3 class="display-4">Add Account</h3>
<hr />
<form>
<div class="form-group row">
<label for="inputHorizontalSuccess" class="col-sm-4 col-form-label">IP Address</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="ip">
</div>
</div>
<div class="form-group row">
<label for="inputHorizontalSuccess" class="col-sm-4 col-form-label">Password</label>
<div class="col-sm-8">
<input type="password" class="form-control" id="pw">
</div>
</div>
<div class="form-group row">
<label for="inputHorizontalSuccess" class="col-sm-4 col-form-label">API Key</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="key">
</div>
</div>
<div class="form-group row">
<label for="inputHorizontalSuccess" class="col-sm-4 col-form-label">Hash</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="hash">
</div>
</div>
<div class="form-group row">
<label for="inputHorizontalSuccess" class="col-sm-4 col-form-label">Master URL</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="masterurl">
</div>
</div>
<div class="form-group row">
<div class="col-sm-4"></div>
<div class="col-sm-8">
<button class="btn btn-secondary" type="submit">Add Account</button>
<a href="linear.li" style="padding-left:10px;">Help!</a>
</div>
</div>
</form>
</div>
</body>
</html>