-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
279 lines (234 loc) · 14.3 KB
/
index.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
<!doctype html>
<html lang="en" ng-app="appRtc">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Login - RTC (Reltrab Cliente) - WEB</title>
<!-- Bootstrap CSS -->
<script src="js/angular.min.js"></script>
<script src="js/rtc.js?5"></script>
<script src="js/filters.js?5"></script>
<script src="js/services.js?5"></script>
<script src="js/controllers.js?5"></script> <script src="assets/vendor/jquery/jquery-3.3.1.min.js"></script>
<link rel="stylesheet" href="assets/vendor/bootstrap/css/bootstrap.min.css">
<link href="assets/vendor/fonts/circular-std/style.css" rel="stylesheet">
<link rel="stylesheet" href="assets/libs/css/style.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
<style>
html,
body {
height: 100%;
}
body {
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
padding-top: 40px;
padding-bottom: 40px;
background-color: #414141;
background-position: center;
background-size: cover;
}
.splash-description {
margin-top: 25px;
padding-bottom: 0px;
}
a:hover {
color: #4aaf51;
text-decoration: none;
}
.splash-container {
max-width: 500px;
padding: 35px;
}
</style>
</head>
<body ng-controller="crtLogin">
<!-- ============================================================== -->
<!-- login page -->
<!-- ============================================================== -->
<div class="splash-container">
<div class="card ">
<div class="card-header text-center"><a href="index.html"><img class="logo-img" src="assets/images/logo.png" alt="logo"></a><span class="splash-description text-left">Bem vindo ao RTC.</span></div>
<div class="card-body">
<div class="form-group">
<div class="input-group">
<span class="input-group-prepend"><span class="input-group-text"><i class="fa fa-user"></i></span></span>
<input class="form-control form-control-lg" ng-model="usuario" ng-keyup="logar()" id="username" type="text" placeholder="Insira aqui seu número de usuário" autocomplete="off">
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-prepend"><span class="input-group-text"><i class="fa fa-lock"></i></span></span>
<input class="form-control form-control-lg" ng-model="senha" ng-keyup="logar()" id="password" type="password" placeholder="Insira aqui sua senha">
</div>
</div>
<div id="loading" class="alert alert-success" role="alert" style="display: block;">Digite seus dados</div>
</div>
<div class="card-footer bg-white p-0 text-center">
<div class="card-footer-item card-footer-item-bordered">
<a href="#" class="footer-link" href="#" data-toggle="modal" data-target="#senha" onclick="limpaCamposEsqueceuSenha();">Esqueceu a senha?</a>
</div>
<div class="card-footer-item card-footer-item-bordered">
<a href="#" class="footer-link" href="#" data-toggle="modal" data-target="#cadastrar">Cadastre-se</a>
</div>
</div>
</div>
</div>
<div class="modal fade" id="senha" tabindex="-1" role="dialog" aria-labelledby="cadastro" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="modalRecuperaLabel">Esqueceu sua senha?</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div>
<div class="modal-body"><br>
<div id="respostaCliente1" class="alert alert-danger" role="alert" style="display: none;">Email inválido.</div>
<p>Nós só precisamos do seu endereço de e-mail registrado para enviar sua senha redefinida.</p>
<div class="form-group row">
<label for="recipient-name" class="col-sm-2 form-control-label normal align-middle" style="margin-top: 10px; padding-left: 40px;">Email:</label>
<div class="col-sm-9">
<input type="text" ng-model="email" class="form-control form-control-lg" id="txtEmail" placeholder="Insira aqui seu e-mail" style="text-align:center">
</div>
</div>
<br>
</div>
<div class="modal-footer" style="text-align:center;">
<button type="button" class="btn btn-light" data-dismiss="modal">Cancelar</button>
<button id="btRecuperar" ng-click="recuperar()" class="btn btn-primary">Gerar nova senha, e enviar para o email</button>
</div>
</div>
</div>
</div>
</div>
<!-- Modal ESQUECEU SUA SENHA -->
<div class="modal fade" id="cadastrar" tabindex="-1" role="dialog" aria-labelledby="senha" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="modalRecuperaLabel">Cadastre-se</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">X</span>
</button>
</div>
<div>
<div class="modal-body"><br>
<div id="loading2" class="alert alert-success" role="alert" style="display: block;">Digite seus dados</div>
<div class="form-group row">
<div class="col-md-9">
<input type="text" ng-model="email_cliente" class="form-control form-control-lg" id="txtEmail" placeholder="Insira aqui seu e-mail" style="text-align:center">
</div>
<div class="col-md-3" style="padding:2px">
<button class="btn btn-success" ng-click="buscar()"><i class="fas fa-male"></i>  Verificar</button>
</div>
<div ng-if="cliente !== null" style="width:100%">
<hr>
<table class="table table-striped" style="margin-right: auto;margin-left:auto">
<tr>
<td>
CPF
</td>
<td>
<input type="text" ng-model="cliente.cpf.valor" class="form-control form-control-lg" placeholder="CPF" style="text-align:center">
</td>
</tr>
<tr>
<td>
Login
</td>
<td>
<input type="text" ng-model="cliente.login" class="form-control form-control-lg" placeholder="Login" style="text-align:center">
</td>
</tr>
<tr>
<td>
Senha
</td>
<td>
<input type="password" ng-model="cliente.senha" class="form-control form-control-lg" placeholder="Senha" style="text-align:center">
</td>
</tr>
<tr>
<td>
Conf. Senha
</td>
<td>
<input type="password" ng-model="cliente.confirmacao_senha" class="form-control form-control-lg" placeholder="Confirmacao de senha" style="text-align:center">
</td>
</tr>
<tr>
<td>
Cliente
</td>
<td>
<strong>{{cliente.razao_social}}</strong>
</td>
</tr>
<tr>
<td>
CNPJ
</td>
<td>
<input type="text" ng-model="cliente.cnpj.valor" class="form-control form-control-lg" placeholder="CNPJ" ng-disabled="true" style="text-align:center">
</td>
</tr>
<tr>
<td>
Email
</td>
<td>
<email entidade="Empresa" atributo="cliente.email" senha="true" alterar="true"></email>
</td>
</tr>
</table>
</div>
</div>
<br>
</div>
<div class="modal-footer" style="text-align:center;">
<button type="button" class="btn btn-light" data-dismiss="modal">Cancelar</button>
<button id="btRecuperar" ng-disabled="cliente === null" ng-click="cadastrar()" class="btn btn-primary"><i class="fas fa-check"></i> Cadastrar</button>
</div>
</div>
</div>
</div>
</div>
<!-- ============================================================== -->
<!-- end login page -->
<!-- ============================================================== -->
<!-- Optional JavaScript -->
<script src="assets/vendor/bootstrap/js/bootstrap.bundle.js"></script>
<script type="text/javascript">
$("input[type='text']").focus();
loading.show = function () {
$("#loading").html("Processando...");
$("#loading").removeClass("alert-success").removeClass("alert-danger").removeClass("alert-primary").addClass("alert-warning");
$("#loading2").html("Processando...");
$("#loading2").removeClass("alert-success").removeClass("alert-danger").removeClass("alert-primary").addClass("alert-warning");
}
loading.close = function () {
}
msg.erro = function (msg) {
$("#loading").removeClass("alert-warning").addClass("alert-danger");
$("#loading").html(msg);
$("#loading2").removeClass("alert-warning").addClass("alert-danger");
$("#loading2").html(msg);
}
msg.alerta = function (msg) {
$("#loading").removeClass("alert-warning").addClass("alert-primary");
$("#loading").html(msg);
$("#loading2").removeClass("alert-warning").addClass("alert-primary");
$("#loading2").html(msg);
}
function limpaCamposEsqueceuSenha() {
$("#txtEmail").val("");
$("#respostaCliente1").css('display', 'none');
}
</script>
</body>
</html>