-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathadicionarUser.php
82 lines (80 loc) · 4.1 KB
/
adicionarUser.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
80
81
82
<?php
include ('session.php');
if($user_rank == 'C'){
header('Location: menu.php');
}
?>
<section class="wrapper">
<h3><i class="fa fa-angle-right"></i> Adicionar Utilizador</h3>
<div class="row mt">
<div class="col-lg-12">
<div class="form-panel">
<form class="form-horizontal style-form" method="post" name="adduserForm" action="userReg.php" onsubmit="return checkForm(this);">
<div class="form-group">
<label class="col-sm-2 col-sm-2 control-label">Estatuto</label>
<div class="radio">
<?php if($user_rank == 'A'){ ?>
<label>    
<input type="radio" name="estatuto" value="A">
Administrador  
</label>
<label>
<input type="radio" name="estatuto" value="F">
Funcionario  
</label>
<?php } ?>
<label>
<input type="radio" name="estatuto" value="C">
Condómino  
</label>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 col-sm-2 control-label">Username</label>
<div class="col-sm-10">
<input name="userName" type="text" class="form-control" required
value="<?php if(isset($_POST['userName'])) echo $_POST['userName']; ?>">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 col-sm-2 control-label">Nome</label>
<div class="col-sm-10">
<input name="nome" type="text" class="form-control" required
value="<?php if(isset($_POST['firstName'])) echo $_POST['firstName']; ?>">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 col-sm-2 control-label">Morada</label>
<div class="col-sm-10">
<input name="morada" type="text" class="form-control" required
value="<?php if(isset($_POST['morada'])) echo $_POST['morada']; ?>">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 col-sm-2 control-label">Nº Identificação Fiscal</label>
<div class="col-sm-10">
<input name="nif" type="text" pattern="[0-9]{9}" title="NIF tem de conter 9 dígitos" class="form-control" required
value="<?php if(isset($_POST['nif'])) echo $_POST['nif']; ?>">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 col-sm-2 control-label">Email</label>
<div class="col-sm-10">
<input name="userEmail" type="email" class="form-control" required
value="<?php if(isset($_POST['userEmail'])) echo $_POST['userEmail']; ?>">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 col-sm-2 control-label">Contacto</label>
<div class="col-sm-10">
<input name="phone" type="text" pattern="[0-9]{9}" title="Contacto tem de conter 9 dígitos" class="form-control" required
value="<?php if(isset($_POST['phone'])) echo $_POST['phone']; ?>">
</div>
</div>
<button type="submit" name="submit" class="btn btn-theme">Adicionar</button>
<button type="reset" name="limpar" class="btn btn-theme">Reset</button>
</form>
</div>
</div>
</div>
</section>