Update Voucher , Tiket , Dashboard

membuat perubahan dan update
This commit is contained in:
YanDrs
2025-07-15 00:30:19 +07:00
parent 84c697516e
commit 0f32cf00ad
23 changed files with 2086 additions and 513 deletions
+26 -4
View File
@@ -1,12 +1,34 @@
<?php
include "/www/wwwroot/bilspro/config/connect.php";
include "/www/wwwroot/bilspro/payment/paydisini/api_control.php";
// include "/www/wwwroot/bilspro/config/connect.php";
// include "/www/wwwroot/bilspro/payment/paydisini/api_control.php";
if (!isset($_GET['id']) || empty($_GET['id'])) {
include "../config/connect.php";
include "../payment/paydisini/api_control.php";
if (!isset($_GET['i']) || empty($_GET['i'])) {
die("ID tidak valid");
}
$board_id = $_GET['id'];
// encrypt url
define('ENCRYPTION_KEY', hex2bin('9a307dfcf16ac2e4406b1a59a31c1d096eafe37e40c60ddee4bb827b6a947079'));
define('ENCRYPTION_METHOD', 'AES-256-CBC');
function decrypt_url($data) {
$decoded = base64_decode($data);
if ($decoded === false) return false;
$parts = explode('::', $decoded);
if (count($parts) !== 2) return false;
$iv = hex2bin($parts[0]);
$encrypted_data = base64_decode($parts[1]);
return openssl_decrypt($encrypted_data, ENCRYPTION_METHOD, ENCRYPTION_KEY, OPENSSL_RAW_DATA, $iv);
}
$param = decrypt_url($_GET['i']);
$params = json_decode($param);
$board_id = $params->{'board'};
$radius_id = $params->nasgroupname;
$stmt = $pdo->prepare("SELECT * FROM setting_mikrotik WHERE board_id = :board_id");
$stmt->bindParam(':board_id', $board_id, PDO::PARAM_STR);