/
home
/
u897542709
/
domains
/
zcardin.com
/
public_html
/
Upload File
HOME
<?php require 'config.php'; $public_id = $_GET['public_id'] ?? ''; if (empty($public_id)) { die("Missing public_id"); } // جلب بيانات المستخدم $stmt = $pdo->prepare("SELECT * FROM AutoUsers WHERE public_id = ?"); $stmt->execute([$public_id]); $user = $stmt->fetch(); if (!$user) { die("User not found"); } // استخدم صورة افتراضية إذا لم تكن موجودة $image_url = !empty($user['profile_image']) ? $user['profile_image'] : 'default-profile.png'; // الحصول على IP وبيانات الجهاز والمتصفح $ip = $_SERVER['REMOTE_ADDR']; $user_agent = $_SERVER['HTTP_USER_AGENT']; $device_info = php_uname(); $referrer = $_SERVER['HTTP_REFERER'] ?? 'Direct'; // API للحصول على الدولة والمدينة من الـ IP $city = 'Unknown'; $country = 'Unknown'; $geoData = @file_get_contents("http://ip-api.com/json/{$ip}?fields=status,country,city"); if ($geoData) { $geo = json_decode($geoData, true); if ($geo['status'] === 'success') { $country = $geo['country'] ?? 'Unknown'; $city = $geo['city'] ?? 'Unknown'; } } // تسجيل البيانات كاملة في قاعدة البيانات $stmtLog = $pdo->prepare(" INSERT INTO CardUsageLogs (user_id, full_name, company_name, public_id, ip_address, country, city, device_info, user_agent, referrer) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) "); $stmtLog->execute([ $user['id'], $user['full_name'], $user['company_name'], $public_id, $ip, $country, $city, $device_info, $user_agent, $referrer ]); // أكمل عرض صفحة البروفايل HTML هنا... ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> <meta name="apple-mobile-web-app-capable" content="yes"> <?php // تأكد إن المتغير $user موجود من قاعدة البيانات $publicId = isset($user['public_id']) ? $user['public_id'] : 'unknown'; $pagePath = "/profile_view.php?public_id=" . $publicId; ?> <!-- Google tag (gtag.js) --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-S7C1LEQ8BM"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); // تتبع كل بروفايل بشكل منفصل gtag('config', 'G-S7C1LEQ8BM', { page_path: '<?= $pagePath ?>', user_id: '<?= $publicId ?>' }); </script> <link rel="stylesheet" href="clear.css" /> <script src="https://developers.kakao.com/sdk/js/kakao.js"></script> <title>ZCardIn</title> </head> <body> <div class="container"> <div class="main"> <div class="top"> <div class="pic"> <div class="InPic"> <div> <img class="Profilepic" src="<?php echo htmlspecialchars($image_url); ?>" alt="Profile Picture"> </div> </div> </div> </div> <div class="Uppermiddle"> <div class="name"> <h4><?= htmlspecialchars($user['full_name']) ?><br> <?= htmlspecialchars($user['job_title']) ?></h4> <div class="info"> <p> <?= htmlspecialchars($user['company_name']) ?></p> </div> </div> </div> <div class="Lowermiddle"> <a onclick="share2(); audio.play();" class="SaveBTN" href="download_vcf.php?public_id=<?= urlencode($user['public_id']) ?>"> Save </a> </div> <div class="bottom"> <a href="tel:<?= htmlspecialchars($user['phone']) ?>"><div class="IconBTN"><img src="icons/phone.svg" class="callIcon"></div></a> <a href="https://api.whatsapp.com/send?phone=<?= '971' . substr(preg_replace('/\D/', '', $user['phone']), -9) ?>"> <div class="IconBTN"> <img src="icons/whatsapp.svg" class="WhatsIcon"> </div> </a> <a href="mailto:<?= htmlspecialchars($user['email']) ?>"> <div class="IconBTN"> <img src="icons/email.svg" class="EmailIcon"> </div> </a> <a href="login.php"> <div class="IconBTN"> <img src="icons/settings.svg" class="EmailIcon"> </div> </a> </div> </div> </div> <div class="website"> </div> </div> </div> </body> </html>