:: **Zploit** v1.0 | Current Path: **/home/kreativepixelz/public_html/kreative_crm/**
:: Editing File: vcard_view.php
<?php include "config/db.php"; /* =============================== VALIDATE ID =============================== */ if (!isset($_GET['id']) || !is_numeric($_GET['id'])) { header("Location: vcard_list.php?msg=Invalid Social Link ID"); exit; } /* =============================== VALIDATE VCARD ID =============================== */ if (!isset($_GET['id']) || !is_numeric($_GET['id'])) { die('Invalid VCard ID'); } $id = intval($_GET['id']); /* =============================== FETCH VCARD PROFILE (SINGLE) =============================== */ $profile_q = mysqli_query( $conn, "SELECT * FROM vcards WHERE id='$id' AND status=1 LIMIT 1" ); $profile = mysqli_fetch_assoc($profile_q); /* =============================== FETCH SERVICES (MULTIPLE) =============================== */ $services = []; $q = mysqli_query( $conn, "SELECT * FROM vcard_services WHERE status=1 AND vcard_id='$id' ORDER BY sort_order ASC" ); while ($row = mysqli_fetch_assoc($q)) { $services[] = $row; } /* =============================== FETCH PORTFOLIO (MULTIPLE) =============================== */ $portfolio = []; $q = mysqli_query( $conn, "SELECT * FROM vcard_portfolio WHERE status=1 AND vcard_id='$id' ORDER BY sort_order ASC" ); while ($row = mysqli_fetch_assoc($q)) { $portfolio[] = $row; } /* =============================== FETCH MEDIA (MULTIPLE) =============================== */ $media = []; $q = mysqli_query( $conn, "SELECT * FROM vcard_media WHERE status=1 AND vcard_id='$id' ORDER BY created_at DESC" ); while ($row = mysqli_fetch_assoc($q)) { $media[] = $row; } /* =============================== FETCH TESTIMONIALS (MULTIPLE) =============================== */ $testimonials = []; $q = mysqli_query( $conn, "SELECT * FROM vcard_testimonials WHERE status=1 AND vcard_id='$id'" ); while ($row = mysqli_fetch_assoc($q)) { $testimonials[] = $row; } /* =============================== FETCH SOCIAL LINKS (MULTIPLE) =============================== */ $socials = []; $q = mysqli_query( $conn, "SELECT * FROM vcard_social_links WHERE status=1 AND vcard_id='$id' ORDER BY sort_order ASC" ); while ($row = mysqli_fetch_assoc($q)) { $socials[] = $row; } /* =============================== DEBUG (REMOVE IN LIVE) =============================== */ echo "<pre>"; print_r($profile); print_r($services); print_r($portfolio); print_r($media); print_r($testimonials); print_r($socials); echo "</pre>"; exit; /* SAVE INQUIRY */ if(isset($_POST['send'])){ mysqli_query($conn,"INSERT INTO vcard_inquiries(name,phone,email,message) VALUES( '{$_POST['name']}', '{$_POST['phone']}', '{$_POST['email']}', '{$_POST['message']}' )"); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title><?= $profile['name']; ?> | Digital vCard</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta property="og:title" content="Kreative Pixelz | Business Card Portfolio | Kreative Pixelz - Your Digital Growth Partner" /> <meta property="og:description" content="We offer expert digital marketing, website development, graphic design, and software solutions to grow your business." /> <!--<link rel="icon" href="assets/images/favicon/icon.png"> --> <link rel="icon" type="image/png" href="logo/favi_logo.png"> <link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet"> <link rel="stylesheet" href="vcard/assets/css/all.min.css"> <link rel="stylesheet" href="vcard/assets/css/slick.css"> <link rel="stylesheet" href="vcard/assets/css/magnific-popup.css"> <link rel="stylesheet" href="vcard/assets/css/bootstrap.min.css"> <link rel="stylesheet" href="vcard/assets/css/cursor.css"> <link rel="stylesheet" href="vcard/assets/css/style.css"> <link rel="stylesheet" href="vcard/assets/css/media-query.css"> </head> <body> <!-- ================= PROFILE ================= --> <section class="profile-section"> <div class="container text-center"> <img src="upload/profile/<?= $profile['profile_image']; ?>" class="client-img"> <h1 class="client-name"><?= $profile['name']; ?></h1> <p class="client-title"><?= $profile['designation']; ?></p> </div> </section> <!-- ================= CONTACT ================= --> <section class="contact-section"> <div class="container"> <a href="tel:<?= $profile['phone']; ?>" class="contact-card"> <p><?= $profile['phone']; ?></p> </a> <a href="mailto:<?= $profile['email']; ?>" class="contact-card"> <p><?= $profile['email']; ?></p> </a> <div class="contact-card"> <p><?= $profile['address']; ?></p> </div> </div> </section> <!-- ================= SOCIAL ================= --> <section class="social-section"> <div class="container d-flex justify-content-center gap-3"> <?php while($s = mysqli_fetch_assoc($socials)){ ?> <a href="<?= $s['url']; ?>" target="_blank"> <img src="assets/images/social-icon/<?= $s['icon']; ?>" width="40"> </a> <?php } ?> </div> </section> <!-- ================= ABOUT ================= --> <section class="about-section"> <div class="container"> <h2><?= $profile['about_title']; ?></h2> <img src="upload/profile/<?= $profile['about_image']; ?>" class="img-fluid"> <p><?= $profile['about_text']; ?></p> </div> </section> <!-- ================= SERVICES ================= --> <section class="services-section"> <div class="container"> <h2>Services</h2> <?php while($s = mysqli_fetch_assoc($services)){ ?> <div class="service-card"> <img src="assets/images/services/<?= $s['icon']; ?>" width="50"> <h3><?= $s['title']; ?></h3> <p><?= $s['description']; ?></p> </div> <?php } ?> </div> </section> <!-- ================= GALLERY ================= --> <section class="gallery-section"> <div class="container"> <h2>Portfolio</h2> <div class="row"> <?php while($g = mysqli_fetch_assoc($gallery)){ ?> <div class="col-6 mb-3"> <a href="upload/gallery/<?= $g['image']; ?>"> <img src="upload/gallery/<?= $g['image']; ?>" class="img-fluid"> </a> </div> <?php } ?> </div> </div> </section> <!-- ================= VIDEO ================= --> <?php if($profile['video'] != ''){ ?> <section class="video-section"> <div class="container"> <video controls width="100%"> <source src="upload/video/<?= $profile['video']; ?>" type="video/mp4"> </video> </div> </section> <?php } ?> <!-- ================= TESTIMONIALS ================= --> <section class="testimonial-section"> <div class="container"> <h2>Testimonials</h2> <?php while($t = mysqli_fetch_assoc($testimonials)){ ?> <div class="testimonial-box"> <img src="upload/testimonials/<?= $t['image']; ?>" width="60"> <h4><?= $t['name']; ?></h4> <p><?= $t['message']; ?></p> </div> <?php } ?> </div> </section> <!-- ================= MAP ================= --> <section class="map-section"> <div class="container"> <?= $profile['map_embed']; ?> </div> </section> <!-- ================= INQUIRY ================= --> <section class="inquiry-section"> <div class="container"> <h2>Inquiry</h2> <form method="post"> <input type="text" name="name" placeholder="Your Name" required> <input type="text" name="phone" placeholder="Phone" required> <input type="email" name="email" placeholder="Email"> <textarea name="message" placeholder="Message"></textarea> <button type="submit" name="send">Send</button> </form> </div> </section> <!-- ================= FOOTER ================= --> <footer class="text-center p-3"> <p>© <?= date('Y'); ?> <?= $profile['name']; ?></p> </footer> </body> </html>