Update Voucher , Tiket , Dashboard
membuat perubahan dan update
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
session_start();
|
||||
|
||||
$requestUri = $_SERVER['REQUEST_URI'];
|
||||
@@ -12,7 +13,14 @@ if (strpos($requestUri, 'index.php') !== false) {
|
||||
$isLoggedIn = isset($_SESSION['user']) || isset($_SESSION['master']);
|
||||
|
||||
// Ambil URL path
|
||||
$path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
|
||||
// $path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
|
||||
$BaseUrl = "http://localhost/manjapro-project";
|
||||
|
||||
// Logika Path
|
||||
$basePath = parse_url($BaseUrl, PHP_URL_PATH);
|
||||
$requestPath = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
|
||||
$path = preg_replace('#^' . preg_quote($basePath, '#') . '#', '', $requestPath);
|
||||
$path = '/' . ltrim($path, '/');
|
||||
|
||||
// Cek apakah path cocok dengan pola /tracking/MP-xxxxxxxx-xxxxx
|
||||
if (preg_match('#^/tracking/MP-\d{10}-\d{5}$#', $path)) {
|
||||
|
||||
Reference in New Issue
Block a user