Update generate voucher
This commit is contained in:
+10
-13
@@ -1,9 +1,3 @@
|
||||
<?php
|
||||
|
||||
ini_set('display_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
|
||||
?>
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="container-fluid">
|
||||
@@ -295,9 +289,10 @@ $List->set_list("setting_mikrotik", $SqlDataWHId);
|
||||
<select class="form-control" name="idmscript" id="idmscript">
|
||||
<?php foreach ($List->get_list() as $value):
|
||||
$radius_data = json_decode($value['radius_nas_data']);
|
||||
$nasgroupname = $radius_data->data->{'nasgroupname'} ?? '';
|
||||
$dataUrl = encrypt_url(json_encode([
|
||||
'board' => $value['board_id'],
|
||||
'nasgroupname' => $radius_data->data->{'nasgroupname'}
|
||||
'nasgroupname' => $nasgroupname
|
||||
]));
|
||||
?>
|
||||
<option value="<?= htmlspecialchars($dataUrl) ?>">
|
||||
@@ -321,8 +316,8 @@ $List->set_list("setting_mikrotik", $SqlDataWHId);
|
||||
<script>
|
||||
// Buat script HTML dengan escape karakter agar aman
|
||||
function generateScript(dataUrl) {
|
||||
return `<div id="voucher-container"></div>;
|
||||
<script src="http://localhost/manjapro-project/voucherpay/cl-style.js?i=${dataUrl}"></script>`;
|
||||
return `<div id="voucher-container"></div>
|
||||
<script src="https://manjapro.net/voucherpay/cl-style.js?i=${dataUrl}"></script>`;
|
||||
}
|
||||
|
||||
// Update script ketika pilihan berubah
|
||||
@@ -368,12 +363,13 @@ function copyToClipboard(preId) {
|
||||
<table id="voucherTable" class="table table-striped table-bordered" style="zoom: 90%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Waktu</th>
|
||||
<th>Server</th>
|
||||
<th>Voucher</th>
|
||||
<th>Harga</th>
|
||||
<th>Biaya</th>
|
||||
<th>Saldo</th>
|
||||
<th>Status</th>
|
||||
<th>Dibuat</th>
|
||||
<th>Aktif</th>
|
||||
<th>Expired</th>
|
||||
</tr>
|
||||
@@ -487,7 +483,7 @@ $(document).ready(function() {
|
||||
"responsive": true,
|
||||
"autoWidth": false,
|
||||
"ajax": {
|
||||
"url": "controller/voucher_auto.php",
|
||||
"url": "controller/voucher_auto.php?i=<?= $SvId; ?>",
|
||||
"type": "GET"
|
||||
},
|
||||
"pageLength": 25,
|
||||
@@ -498,8 +494,9 @@ $(document).ready(function() {
|
||||
{ "data": 3, "orderable": false }, // biaya (tidak bisa diurutkan)
|
||||
{ "data": 4, "orderable": false }, // saldo (tidak bisa diurutkan)
|
||||
{ "data": 5 }, // status_cek
|
||||
{ "data": 6 }, // active_time
|
||||
{ "data": 7 } // expaired_time
|
||||
{ "data": 6 },
|
||||
{ "data": 7 }, // active_time
|
||||
{ "data": 8 } // expaired_time
|
||||
],
|
||||
"order": [[0, "desc"]]
|
||||
});
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="card-header">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<h3 class="card-title">Setting Mikrotik <?=$SvId;?></h3>
|
||||
<h3 class="card-title">Setting Mikrotik</h3>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="float-sm-right mb-0">
|
||||
|
||||
@@ -62,9 +62,9 @@ while ($tiap = $ambil->fetch_assoc()) {
|
||||
<label>Level Gangguan</label>
|
||||
<select class="form-control" name="level" required>
|
||||
<option value="">Pilih Level</option>
|
||||
<option value="1">Tinggi</option>
|
||||
<option value="2">Sedang</option>
|
||||
<option value="3">Bawah</option>
|
||||
<option class="text-danger" value="1">Tinggi</option>
|
||||
<option class="text-warning" value="2">Sedang</option>
|
||||
<option class="text-info" value="3">Bawah</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user