-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
647 lines (580 loc) · 30.2 KB
/
index.html
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
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
<!doctype html>
<!--[if lt IE 7]><html lang="en" class="no-js ie6"><![endif]-->
<!--[if IE 7]><html lang="en" class="no-js ie7"><![endif]-->
<!--[if IE 8]><html lang="en" class="no-js ie8"><![endif]-->
<!--[if gt IE 8]><!-->
<html lang="pt-BR" class="no-js">
<!--<![endif]-->
<head>
<meta charset="UTF-8">
<title>Conciliamento</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<link rel="shortcut icon" href="favicon.png">
<!-- Bootstrap 3.3.2 -->
<link rel="stylesheet" href="assets/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/css/animate.css">
<link rel="stylesheet" href="assets/css/font-awesome.min.css">
<link rel="stylesheet" href="assets/css/slick.css">
<link rel="stylesheet" href="assets/js/rs-plugin/css/settings.css">
<link rel="stylesheet" href="assets/css/styles.css">
<script type="text/javascript" src="assets/js/modernizr.custom.32033.js"></script>
<script src="js/jsencrypt.min.js"></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="pre-loader">
<div class="load-con">
<img src="assets/img/freeze/logo.png" class="animated fadeInDown" alt="">
<div class="spinner">
<div class="bounce1"></div>
<div class="bounce2"></div>
<div class="bounce3"></div>
</div>
</div>
</div>
<header>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="fa fa-bars fa-lg"></span>
</button>
<a class="navbar-brand" href="index.html">
<img src="assets/img/freeze/logo.png" alt="" class="logo">
</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li><a class="getApp" href="#getApp">Iniciar</a></li>
<li><a href="#support">Passo 1</a></li>
<li><a href="#support2">Passo 2</a></li>
<li><a href="#support3">Passo 3</a></li>
<li><a href="#about">Sobre</a></li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container-->
</nav>
<!--RevSlider-->
<div class="tp-banner-container">
<div class="tp-banner" >
<ul>
<!-- SLIDE -->
<li data-transition="fade" data-slotamount="7" data-masterspeed="1500" >
<!-- MAIN IMAGE -->
<img src="assets/img/transparent.png" alt="slidebg1" data-bgfit="cover" data-bgposition="left top" data-bgrepeat="no-repeat">
<!-- LAYERS -->
<!-- LAYER NR. 1 -->
<div class="tp-caption lfl fadeout hidden-xs"
data-x="left"
data-y="bottom"
data-hoffset="30"
data-voffset="0"
data-speed="500"
data-start="700"
data-easing="Power4.easeOut">
<img src="assets/img/freeze/Slides/hand-freeze.png" alt="">
</div>
<div class="tp-caption lfl fadeout visible-xs"
data-x="left"
data-y="center"
data-hoffset="700"
data-voffset="0"
data-speed="500"
data-start="700"
data-easing="Power4.easeOut">
<img src="assets/img/freeze/iphone-freeze.png" alt="">
</div>
<div class="tp-caption large_white_bold sft" data-x="550" data-y="100" data-hoffset="0" data-voffset="-80" data-speed="500" data-start="1200" data-easing="Power4.easeOut">
Conciliação
</div>
<div class="tp-caption large_white_light sfr" data-x="700" data-y="150" data-hoffset="0" data-voffset="-80" data-speed="500" data-start="1400" data-easing="Power4.easeOut">
Aplicativo
</div>
<div class="tp-caption large_white_light sfb" data-x="550" data-y="200" data-hoffset="0" data-voffset="0" data-speed="1000" data-start="1500" data-easing="Power4.easeOut">
LGPD
</div>
<div class="tp-caption sfb hidden-xs" data-x="550" data-y="center" data-hoffset="0" data-voffset="85" data-speed="1000" data-start="1700" data-easing="Power4.easeOut">
<a href="#about" class="btn btn-primary inverse btn-lg">Saiba Mais...</a>
</div>
<div class="tp-caption sfr hidden-xs" data-x="730" data-y="center" data-hoffset="0" data-voffset="85" data-speed="1500" data-start="1900" data-easing="Power4.easeOut">
<a href="#getApp" class="btn btn-default btn-lg">Baixe os nossos Apps</a>
</div>
</li>
<!-- SLIDE 2 -->
<li data-transition="zoomout" data-slotamount="7" data-masterspeed="1000" >
<!-- MAIN IMAGE -->
<img src="assets/img/transparent.png" alt="slidebg1" data-bgfit="cover" data-bgposition="left top" data-bgrepeat="no-repeat">
<!-- LAYERS -->
<!-- LAYER NR. 1 -->
<div class="tp-caption lfb fadeout hidden-xs"
data-x="center"
data-y="bottom"
data-hoffset="0"
data-voffset="0"
data-speed="1000"
data-start="700"
data-easing="Power4.easeOut">
<img src="assets/img/freeze/Slides/freeze-slide2.png" alt="">
</div>
<div class="tp-caption large_white_light sft" data-x="center" data-y="250" data-hoffset="0" data-voffset="0" data-speed="1000" data-start="1400" data-easing="Power4.easeOut">
Nós <i class="fa fa-heart"></i> Cada byte
</div>
</li>
<!-- SLIDE 3 -->
<li data-transition="zoomout" data-slotamount="7" data-masterspeed="1000" >
<!-- MAIN IMAGE -->
<img src="assets/img/transparent.png" alt="slidebg1" data-bgfit="cover" data-bgposition="left top" data-bgrepeat="no-repeat">
<!-- LAYERS -->
<!-- LAYER NR. 1 -->
<div class="tp-caption customin customout hidden-xs"
data-x="right"
data-y="center"
data-hoffset="0"
data-customin="x:50;y:150;z:0;rotationX:0;rotationY:0;rotationZ:0;scaleX:0.5;scaleY:0.5;skewX:0;skewY:0;opacity:0;transformPerspective:0;transformOrigin:50% 50%;"
data-customout="x:0;y:0;z:0;rotationX:0;rotationY:0;rotationZ:0;scaleX:0.75;scaleY:0.75;skewX:0;skewY:0;opacity:0;transformPerspective:600;transformOrigin:50% 50%;"
data-voffset="50"
data-speed="1000"
data-start="700"
data-easing="Power4.easeOut">
<img src="assets/img/freeze/Slides/family-freeze.png" alt="">
</div>
<div class="tp-caption customin customout visible-xs"
data-x="center"
data-y="center"
data-hoffset="0"
data-customin="x:50;y:150;z:0;rotationX:0;rotationY:0;rotationZ:0;scaleX:0.5;scaleY:0.5;skewX:0;skewY:0;opacity:0;transformPerspective:0;transformOrigin:50% 50%;"
data-customout="x:0;y:0;z:0;rotationX:0;rotationY:0;rotationZ:0;scaleX:0.75;scaleY:0.75;skewX:0;skewY:0;opacity:0;transformPerspective:600;transformOrigin:50% 50%;"
data-voffset="0"
data-speed="1000"
data-start="700"
data-easing="Power4.easeOut">
<img src="assets/img/freeze/Slides/family-freeze.png" alt="">
</div>
<div class="tp-caption lfb visible-xs" data-x="center" data-y="center" data-hoffset="0" data-voffset="400" data-speed="1000" data-start="1200" data-easing="Power4.easeOut">
<a href="#" class="btn btn-primary inverse btn-lg">Contrate-nos!</a>
</div>
<div class="tp-caption mediumlarge_light_white sfl hidden-xs" data-x="left" data-y="center" data-hoffset="0" data-voffset="-50" data-speed="1000" data-start="1000" data-easing="Power4.easeOut">
Integração para todo tipo de dados
</div>
<div class="tp-caption mediumlarge_light_white sft hidden-xs" data-x="left" data-y="center" data-hoffset="0" data-voffset="0" data-speed="1000" data-start="1200" data-easing="Power4.easeOut">
Integração via Web Service
</div>
<div class="tp-caption small_light_white sfb hidden-xs" data-x="left" data-y="center" data-hoffset="0" data-voffset="80" data-speed="1000" data-start="1600" data-easing="Power4.easeOut">
<p>Proteja os seus dados com você e você saberá toda vez que alguém tentar usá-lo. </p>
</div>
<div class="tp-caption lfl hidden-xs" data-x="left" data-y="center" data-hoffset="0" data-voffset="160" data-speed="1000" data-start="1800" data-easing="Power4.easeOut">
<a href="#" class="btn btn-primary inverse btn-lg">Purchase</a>
</div>
</li>
</ul>
</div>
</div>
</header>
<div class="wrapper">
<section id="getApp">
<div class="container-fluid">
<div class="section-heading inverse scrollpoint sp-effect3">
<h1>Vamos iniciar o processo para obter credencial!</h1>
<div class="divider"></div>
<p>Siga o passo-a-passo</p>
</div>
<div class="row">
<div class="col-md-12">
<div class="hanging-phone scrollpoint sp-effect2 hidden-xs">
<img src="assets/img/freeze/freeze-angled3.png" alt="">
</div>
<div class="platforms">
<a href="#support" class="btn btn-primary inverse scrollpoint sp-effect1">
<i class="fa fa-key fa-3x pull-left"></i>
<span>1 - Criar par de chaves</span><br>
<b>RSA 1024 bits</b>
</a>
<a href="#support2" class="btn btn-primary inverse scrollpoint sp-effect2">
<i class="fa fa-unlock fa-3x pull-left"></i>
<span>2 - Cadastrar Chave</span><br>
<b>Apenas Chave Pública</b>
</a><br>
<a href="#support3" class="btn btn-primary inverse scrollpoint sp-effect3">
<i class="fa fa-desktop fa-3x pull-left"></i>
<span>3 - Salvar Credencial</span><br>
<b>Salve a credencial</b>
</a>
</div>
</div>
</div>
</div>
</section>
<section id="support" class="doublediagonal">
<div class="container">
<div class="section-heading scrollpoint sp-effect3">
<h1>Passo 1 - Criar Chaves RSA-1024 Bits</h1>
<div class="divider"></div>
<p>A parte privada desta chave ninguém mais terá acesso!</p>
<p>Portanto, guarde-a em local seguro!</p>
</div>
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-8 col-sm-8 scrollpoint sp-effect1">
<button id="genkey" name="genkey" class="btn btn-primary btn-lg">Gerar Chaves</button><br>
<form role="form">
<div class="form-group">
<textarea id="publickey" name="publickey" cols="30" rows="5" class="form-control" placeholder="Chave Pública"></textarea>
</div>
<div class="form-group">
<textarea id="privatekey" name="privatekey" cols="30" rows="10" class="form-control" placeholder="Chave Privada"></textarea>
</div>
</form>
</div>
<!-- Coluna da Direita -->
<div class="col-md-4 col-sm-4 contact-details scrollpoint sp-effect2">
<div class="media">
<a class="pull-left" href="#" >
<i class="fa fa-gear fa-2x"></i>
</a>
<div class="media-body">
<h4 class="media-heading" id="time-report" name="time-report"> </h4>
</div>
</div>
</div>
<!-- Fim da coluna da direita -->
</div>
</div>
</div>
</div>
</section>
<section id="support2" class="doublediagonal">
<div class="container">
<div class="section-heading scrollpoint sp-effect3">
<h1>2 - Cadastrar chave pública no servidor</h1>
<div class="divider"></div>
<p>A parte pública da chave mais os dados de identificação serão enviados ao servidor.</p>
<p>Uma senha gerada pelo servidor (credencial) associada a sua chave publica será gerada!</p>
</div>
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-4 col-sm-4 contact-details scrollpoint sp-effect2">
<div class="media">
<a class="pull-left" href="#" >
<i class="fa fa-flag fa-2x"></i>
</a>
<div class="media-body">
<h4 class="media-heading">Campos marcados com * são obrigatórios</h4>
</div>
</div>
<div class="media">
<a class="pull-left" href="#" >
<i class="fa fa-map-marker fa-2x"></i>
</a>
<div class="media-body">
<h4 class="media-heading">Salve esta CHAVE GERADA!</h4>
</div>
</div>
</div>
<div class="col-md-8 col-sm-8 scrollpoint sp-effect1">
<form role="form">
<div class="form-group">
<label for="inputEmail" >* E-mail:</label>
<input type="email" id="inputEmail" name="inputEmail" class="form-control" placeholder="email@empresa.com">
</div>
<div class="form-group">
<label for="cnesID" >* CNES:</label>
<input type="text" id="cnesID" name="cnesID" class="form-control" placeholder="0000000">
</div>
<div class="form-group">
<label for="cpfID" >* CPF:</label>
<input type="text" id="cpfID" name="cpfID" class="form-control" placeholder="000.000.000-00">
</div>
<div class="form-group">
<label for="cnsID" >* CNS cadastrado do CNES</label>
<input type="text" id="cnsID" name="cnsID" class="form-control" placeholder="000 0000 0000 0000">
</div>
<div class="form-group">
<label for="cleartext" >Senha gerada para uso com a API</label>
<input type="text" id="cleartext" name="cleartext" class="form-control" placeholder="Chave gerada">
</div>
<div class="form-group">
<textarea id="endata-get" name="endata-get" class="form-control"></textarea>
</div>
</form>
<button id="get" name="get" class="btn btn-primary btn-lg">Enviar</button>
</div>
</div>
</div>
</div>
</div>
</section>
<section id="support3" class="doublediagonal">
<div class="container">
<div class="section-heading scrollpoint sp-effect3">
<h1>3 - Salvar os dados gerados num arquivo criptografado</h1>
<div class="divider"></div>
<p>A parte <b><i>Privada</i></b> da chave + <b><i>Credencial</i></b> gerada no servidor</p>
<p>serão guardados em um arquivo PDF, que deverá ser salvo fora do seu dispositivo!</p>
<p>Opcionalmente, você poderá criptografar este PDF, antes de salvá-lo!</p>
</div>
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-4 col-sm-4 contact-details scrollpoint sp-effect2">
<div class="media">
<a class="pull-left" href="#" >
<i class="fa fa-flag fa-2x"></i>
</a>
<div class="media-body">
<h4 class="media-heading">Campos marcados com * são obrigatórios</h4>
</div>
</div>
<div class="media">
<a class="pull-left" href="#" >
<i class="fa fa-map-marker fa-2x"></i>
</a>
<div class="media-body">
<h4 class="media-heading">Salve esta CHAVE GERADA!</h4>
</div>
</div>
</div>
<div class="col-md-8 col-sm-8 scrollpoint sp-effect1">
<form role="form">
</form>
<button id="print" name="print" class="btn btn-primary btn-lg">Imprimir</button>
</div>
</div>
</div>
</div>
</div>
</section>
<section id="about">
<div class="container">
<div class="section-heading scrollpoint sp-effect3">
<h1>Sobre nós</h1>
<div class="divider"></div>
<p>Solução inteligente para conciliação de dados de origens distintas</p>
</div>
<div class="row">
<div class="col-md-3 col-sm-3 col-xs-6">
<div class="about-item scrollpoint sp-effect2">
<i class="fa fa-download fa-2x"></i>
<h3>Configuração simples</h3>
<p>Use uma de nossas APIs e integre a sua solução a nossa. Deixe que juntemos os dados pra você, não importa a origem deles.</p>
</div>
</div>
<div class="col-md-3 col-sm-3 col-xs-6" >
<div class="about-item scrollpoint sp-effect5">
<i class="fa fa-mobile fa-2x"></i>
<h3>Monitore o fluxo</h3>
<p>Do seu aparelho de celular os gestores da informação ficam sabendo tudo sobre o fluxo da conciliação, da captura à entrega dos dados juntos.</p>
</div>
</div>
<div class="col-md-3 col-sm-3 col-xs-6" >
<div class="about-item scrollpoint sp-effect5">
<i class="fa fa-users fa-2x"></i>
<h3>Integre-se com vários Parceiros</h3>
<p>Não importa o sistema de origem, o protocolo de comunicação, a quantidade de dados e/ou o esforço de rransformação e junção dos seus dados.</p>
</div>
</div>
<div class="col-md-3 col-sm-3 col-xs-6" >
<div class="about-item scrollpoint sp-effect1">
<i class="fa fa-sliders fa-2x"></i>
<h3>Soluções sob medida</h3>
<p>Cada negócio tem suas próprias necessidades de Extração, Transformação e Conciliação de dados.
E nós fazemos isso do seu jeito</p>
</div>
</div>
</div>
</div>
</section>
<footer>
<div class="container">
<a href="#" class="scrollpoint sp-effect3">
<img src="assets/img/freeze/logo.png" alt="" class="logo">
</a>
<div class="social">
<a href="#" class="scrollpoint sp-effect3"><i class="fa fa-twitter fa-lg"></i></a>
<a href="#" class="scrollpoint sp-effect3"><i class="fa fa-google-plus fa-lg"></i></a>
<a href="#" class="scrollpoint sp-effect3"><i class="fa fa-facebook fa-lg"></i></a>
</div>
<div class="rights">
<p>Copyright © 2021</p>
<p>Base on Templates from <a href="http://www.scoopthemes.com" target="_blank">ScoopThemes</a></p>
</div>
</div>
</footer>
</div>
<script src="assets/js/jquery-1.11.1.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/slick.min.js"></script>
<script src="assets/js/placeholdem.min.js"></script>
<script src="assets/js/rs-plugin/js/jquery.themepunch.plugins.min.js"></script>
<script src="assets/js/rs-plugin/js/jquery.themepunch.revolution.min.js"></script>
<script src="assets/js/waypoints.min.js"></script>
<script src="assets/js/scripts.js"></script>
<script>
$(function () {
//Change the key size value for new keys
$(".change-key-size").each(function (index, value) {
var el = $(value);
var keySize = el.attr('data-value');
el.click(function (e) {
var button = $('#key-size');
button.attr('data-value', keySize);
button.html(keySize + ' bits <span class="caret"></span>');
e.preventDefault();
});
});
// Execute when they click the button.
$('#execute').click(function () {
// Create the encryption object.
var crypt = new JSEncrypt();
// Set the private.
crypt.setPrivateKey($('#privatekey').val());
//return;
// If no public key is set then set it here...
var pubkey = $('#publickey').val();
if (!pubkey) {
$('#publickey').val(crypt.getPublicKey());
}
// Get the input and crypted values.
var input = $('#input').val();
var crypted = $('#crypted').val();
// Alternate the values.
if (input) {
$('#crypted').val(crypt.encrypt(input));
$('#input').val('');
}
else if (crypted) {
var decrypted = crypt.decrypt(crypted);
if (!decrypted)
decrypted = 'This is a test!';
$('#input').val(decrypted);
$('#crypted').val('');
}
});
var generateKeys = function () {
// var sKeySize = $('#key-size').attr('data-value');
var sKeySize = "1024";
var keySize = parseInt(sKeySize);
var crypt = new JSEncrypt({ default_key_size: keySize });
var dt = new Date();
var time = -(dt.getTime());
// Arma o alarme que atualiza o progresso
$('#time-report').text(' Gerando: .');
var load = setInterval(function () {
var text = $('#time-report').text();
$('#time-report').text(text + '.');
}, 500);
crypt.getKey(function () {
clearInterval(load);
dt = new Date();
time += (dt.getTime());
$('#time-report').text('Gerado em: ' + time + ' ms');
$('#privatekey').val(crypt.getPrivateKey());
$('#publickey').val(crypt.getPublicKey());
});
crypt.getKey();
$("#genkey").prop("disabled",true);
};
// If they wish to generate new keys.
$('#generate').click(generateKeys);
// var keySize = 1024;
var ajax_url = "https://iloca.com.br/cadastro/ajax-server-c.php";
var print_url = "imprimir.html";
$("#genkey").on("click", function (r) {
generateKeys();
});
$("#justGet").on("click", function (r) {
$.post(ajax_url, { action:"get", cpfID:$("#cpfID").val()}, function (endata) {
$("#endata-get").val(endata);
var obj = new JSEncrypt();
obj.setPrivateKey($("#privatekey").val());
var cleartext = obj.decrypt(endata);
$("#cleartext").val(cleartext);
}, "html");
});
$("#get").on("click", function (r) {
// alert( "Action: pubkey" + " - cnesID:" + '"' + $("#cnesID").val() + '"' + " - publickey:" + '"' + $("#publickey").val() + '"' );
$.post( ajax_url,
{
action: "pubkey",
email: $("#inputEmail").val(),
cpfID: $("#cpfID").val(),
cnesID: $("#cnesID").val(),
cnsID: $("#cnsID").val(),
publickey: $("#publickey").val()
},
function (r) {
alert(r);
$.post( ajax_url,
{
action:"get",
cpfID:$("#cpfID").val()
},
function (endata) {
$("#endata-get").val(endata);
var obj = new JSEncrypt();
obj.setPrivateKey($("#privatekey").val());
var cleartext = obj.decrypt(endata);
$("#cleartext").val(cleartext);
$("#get").prop("disabled",true);
$("#cleartext").prop("disabled",true);
$("#endata-get").prop("disabled",true);
},
"html");
},
"html"
);
});
$("#print").on("click", function (r) {
$.post( ajax_url, { action:"print", cpfID:$("#cpfID").val()}, function( data ) {
// CRIA UM OBJETO WINDOW
var win = window.open('', '_blank', 'toolbar=0,location=0,menubar=0,height=700,width=700');
var dtatual = new Date();
var dia = String(dtatual.getDate()).padStart(2, '0');
var mes = String(dtatual.getMonth() + 1).padStart(2, '0');
var ano = dtatual.getFullYear();
var dataAtual = dia + '/' + mes + '/' + ano;
var email = $("#inputEmail").val();
var cpfID = $("#cpfID").val();
var cnesID = $("#cnesID").val();
var cnsID = $("#cnsID").val();
var publickey = $("#publickey").val();
var priv = $("#privatekey").val();
var pwd = $("#cleartext").val();
var repl = "$1" + priv + "$3";
var repl2 = "$1" + pwd + "$3";
var repl3 = "$1" + cpfID + "$3";
var repl4 = "$1" + dataAtual + "$3";
var dados = data.replace(/(.*)(@@privatekey@@)(.*)/, repl);
var dados2 = dados.replace(/(.*)(@@pwd@@)(.*)/, repl2);
dados = dados2.replace(/(.*)(@@cpf@@)(.*)/, repl3);
dados2 = dados.replace(/(.*)(@@data@@)(.*)/, repl4);
win.document.write(dados2);
win.document.body.style.cursor = 'wait';
win.document.close(); // FECHA A JANELA
win.focus();
setTimeout(function(){
win.print(); // IMPRIME O CONTEUDO
}, 2000); //wait 3 seconds
win.document.body.style.cursor = 'default';
}, "html" );
});
// Não queremos que já inicie gerando....
// generateKeys();
});
</script>
<script>
$(document).ready(function() {
appMaster.preLoader();
});
</script>
</body>
</html>