-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetting.php
More file actions
89 lines (88 loc) · 4.06 KB
/
Copy pathsetting.php
File metadata and controls
89 lines (88 loc) · 4.06 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
88
89
<?php
@session_start();
$notification = (@$_SESSION['WXpKc2RHTnVUVDA9__notification'] == '') ? null : $_SESSION['WXpKc2RHTnVUVDA9__notification'];
$leveldir = '';
include $leveldir.'config/connection.config.php';
include $leveldir.'config/function.php';
$setting = "SELECT * FROM master_setting_layar_penyinaran";
$dtSetting = sqlsrv_fetch_object(sqlsrv_query($connection, $setting));
?>
<div class="col-md-6 mx-auto">
<div class="card card-primary">
<div class="card-header">
<h3 class="card-title">Setting Viewer Penyinaran</h3>
</div>
<form id="formSetting" method="post" autocomplete="off">
<div class="card-body">
<!-- <div class="form-group">
<label>Kode Ruangan</label>
<input type="number" class="form-control" name="kd_ruangan" placeholder="Kode Ruangan" value="<?php echo $dtSetting->kd_ruangan ?>">
</div> -->
<div class="form-group">
<label>Tinggi Tabel</label>
<input type="number" class="form-control" name="tinggi_tabel" placeholder="Tinggi Tabel" value="<?php echo $dtSetting->tinggi_tabel ?>">
</div>
<div class="form-group">
<label>Tinggi Row Tambahan Atas</label>
<input type="number" class="form-control" name="tinggi_row_atas" placeholder="Tinggi Row Tambahan untuk scrolling" value="<?php echo $dtSetting->tinggi_row_atas ?>">
</div>
<div class="form-group">
<label>Tinggi Row Tambahan Bawah</label>
<input type="number" class="form-control" name="tinggi_row_bawah" placeholder="Tinggi Row Tambahan untuk scrolling" value="<?php echo $dtSetting->tinggi_row_bawah ?>">
</div>
<div class="form-group">
<label>Maksimal Pasien</label>
<input type="number" class="form-control" name="maksimal_pasien" placeholder="Jumlah pasien tampil tanpa rolling" value="<?php echo $dtSetting->maksimal_pasien ?>">
</div>
</div>
<div class="card-footer">
<a id="batal" role="button" class="btn btn-danger">Batal</a>
<button type="submit" class="btn btn-primary float-right">Simpan</button>
</div>
</form>
</div>
</div>
<script>
$("#batal").click(function() {
loadAwal()
})
$("#formSetting").submit(function(e) {
e.preventDefault();
let data = $("#formSetting").serialize()
$.ajax({
type: "POST",
url: "simpanSetting.php",
data: data,
dataType: "json",
beforeSend: function () {
Swal.fire({
icon: 'info',
title: 'LOADING',
text: 'Silahkan menunggu!',
footer: '<div class="d-flex justify-content-center"><div class="line-wobble"></div></div>',
showConfirmButton: false,
allowOutsideClick: false,
allowEscapeKey: false,
});
},
success: function(response) {
Swal.close();
Swal.fire({
icon: 'success',
title: '<strong>Status Penyimpanan</strong>' + '<br><p style="font-size: 50% !important;"><i class="fa fa-square text-success"></i> Tersimpan</p>',
html: '<span class="badge badge-success">'+response.status+'</span>',
showConfirmButton: true,
showCloseButton: false,
allowOutsideClick: true,
timer: 2500,
timerProgressBar: true,
didOpen: (toast) => {
toast.addEventListener('mouseenter', Swal.stopTimer)
toast.addEventListener('mouseleave', Swal.resumeTimer)
}
});
loadAwal();
},
});
});
</script>