-
Notifications
You must be signed in to change notification settings - Fork 82
/
add_credential.php
73 lines (72 loc) · 2.57 KB
/
add_credential.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
<?php
/*
KVM-VDI
Tadas Ustinavičius
Vilnius,Lithuania.
2017-06-05
*/
include ('functions/config.php');
require_once('functions/functions.php');
if (!check_session()){
header ("Location: $serviceurl/?error=1");
exit;
}
slash_vars();
set_lang();
if(isset ($_GET['credential_type']))
$credential_type=$_GET['credential_type'];
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<script src="inc/js/kvm-vdi.js"></script>
</head>
<body>
<form id="CredentialsForm">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title"><?php
if ($credential_type=='user')
echo _("Add new administrator");
else
echo _("Add new client");?>
</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8">
<input type="text" class="form-control col-md-1" placeholder="<?php echo _("Username");?>" name="username" id="username" required>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8">
<div class="input-group">
<input type="text" class="form-control col-md-1" placeholder="<?php echo _("Password");?>" name="password" id="password" required>
<span class="input-group-btn">
<button class="btn btn-secondary" type="button" id="PWGen"><?php echo _("Generate password");?></button>
</span>
</div>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8"></div>
<div class="col-md-2"></div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal"><?php echo _("Close");?></button>
<button type="button" class="btn btn-primary" id="UpdateCredentialsButton"><?php echo _("Save changes");?></button>
<input type="submit" class="hide">
<input type="hidden" id="credential_type" value="<?php echo $credential_type;?>">
</div>
</div>
<form>
</body>
</html>