📡

System Online

Marub Connect is ready.

Status: The server is working perfectly.

Please scan a generated QR code to start.

'; exit(); } /* 2. DECODE DATA */ $raw_data = str_replace(' ', '+', $_GET['d']); $json = base64_decode($raw_data); $data = json_decode($json, true); if (!$data) { die("Error: Invalid QR Code Data."); } /* 3. EXTRACT VARIABLES */ $name = htmlspecialchars($data['n'] ?? 'Valued Vendor'); $whatsapp = htmlspecialchars($data['wa'] ?? ''); $desc = htmlspecialchars($data['desc'] ?? 'Welcome to my digital profile.'); $link1 = htmlspecialchars($data['l1'] ?? '#'); $label1 = htmlspecialchars($data['lb1'] ?? 'View Catalog'); $color = $data['c'] ?? 'black'; /* 4. VCARD DOWNLOAD LOGIC */ if (isset($_GET['action']) && $_GET['action'] == 'vcf') { $filename = preg_replace('/[^a-zA-Z0-9]/', '', $name) . ".vcf"; $cleanPhone = preg_replace('/[^0-9]/', '', $whatsapp); $vcard = "BEGIN:VCARD\r\n"; $vcard .= "VERSION:3.0\r\n"; $vcard .= "FN:" . $data['n'] . "\r\n"; $vcard .= "ORG:Marub Creations Client\r\n"; $vcard .= "TEL;TYPE=CELL:" . $cleanPhone . "\r\n"; if($link1 != '#') { $vcard .= "URL:" . $data['l1'] . "\r\n"; } $vcard .= "NOTE:" . $data['desc'] . "\r\n"; $vcard .= "END:VCARD\r\n"; header('Content-Type: text/x-vcard'); header('Content-Disposition: attachment; filename="' . $filename . '"'); header('Content-Length: ' . strlen($vcard)); echo $vcard; exit(); } /* 5. DETERMINE COLORS */ $bgClass = 'bg-gray-100'; $btnColor = 'bg-gray-600'; if ($color == 'orange') { $bgClass = 'bg-orange-50'; $btnColor = 'bg-orange-600'; } if ($color == 'blue') { $bgClass = 'bg-blue-50'; $btnColor = 'bg-blue-600'; } if ($color == 'red') { $bgClass = 'bg-red-50'; $btnColor = 'bg-red-600'; } /* 6. DISPLAY PROFILE HTML */ echo ' ' . $name . '
' . substr($name, 0, 1) . '

' . $name . '

' . $desc . '

Save Contact '; if($whatsapp) { echo ' WhatsApp Me '; } if($link1 && $link1 != '#') { echo ' ' . $label1 . ' '; } echo '

DIGITAL BUSINESS CARD BY

MARUB CREATIONS

'; ?>