:: **Zploit** v1.0 | Current Path: **/home/kreativepixelz/soulmeetvivah.com/member/php/**
:: Editing File: matches.php
<?php include('header.php'); ?> <div style="height: 100px;"></div> <!-- ==========Matches Section Start Here========== --> <div class="page-content"> <div class="container"> <!-- Matches Header --> <div class="block-box user-about mb-4"> <div class="widget-heading" style="background: linear-gradient(135deg, #cd4252 0%, #b83847 100%); padding: 25px; border-radius: 15px 15px 0 0;"> <h3 style="color: #fff; margin: 0; font-size: 28px; font-weight: 600;"> <i class="icofont-heart" style="margin-right: 10px;"></i>Your Matches </h3> <p style="color: rgba(255,255,255,0.9); margin: 10px 0 0 0; font-size: 16px;">Discover profiles that match your preferences</p> </div> </div> <!-- Search Bar --> <div class="block-box user-about mb-4"> <div class="matches-search-container"> <form id="matchesSearchForm" action="javascript:void(0);"> <div class="search-input-wrapper"> <i class="icofont-search-2 search-icon"></i> <input type="text" id="matchesSearchInput" class="matches-search-input" placeholder="Search by Name or SV ID..." autocomplete="off"> <button type="submit" class="matches-search-btn"> <i class="icofont-search-2"></i> Search </button> </div> </form> </div> </div> <!-- Matches Container --> <div class="matches-wrapper"> <div class="row g-4" id="fetchMatches"> <!-- Matches will be loaded here --> </div> </div> <!-- Empty State --> <div id="matchesEmpty" class="text-center py-5" style="display: none;"> <div class="block-box user-about"> <div class="widget-heading text-center py-5"> <i class="icofont-heart-alt" style="font-size: 80px; color: #ddd; margin-bottom: 20px;"></i> <h4 style="color: #999; font-weight: 400;">No matches found</h4> <p style="color: #bbb; margin-top: 10px;">Try adjusting your search or check back later</p> </div> </div> </div> </div> </div> <!-- ==========Matches Section End Here========== --> <style type="text/css"> body { background-color: #f5f5f5; } /* Search Container */ .matches-search-container { background: #fff; padding: 25px; border-radius: 15px; box-shadow: 0 3px 15px rgba(0,0,0,0.08); } .search-input-wrapper { display: flex; align-items: center; gap: 15px; position: relative; } .search-icon { position: absolute; left: 20px; color: #cd4252; font-size: 20px; z-index: 1; } .matches-search-input { flex: 1; padding: 15px 15px 15px 50px; border: 2px solid #e0e0e0; border-radius: 10px; font-size: 15px; transition: all 0.3s ease; background: #fff; } .matches-search-input:focus { border-color: #cd4252; box-shadow: 0 0 0 0.2rem rgba(205, 66, 82, 0.15); outline: none; } .matches-search-btn { background: linear-gradient(135deg, #cd4252 0%, #b83847 100%); color: #fff; border: none; padding: 15px 30px; border-radius: 10px; font-weight: 600; font-size: 15px; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(205, 66, 82, 0.3); white-space: nowrap; } .matches-search-btn:hover { background: linear-gradient(135deg, #b83847 0%, #a83242 100%); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(205, 66, 82, 0.4); } .matches-search-btn i { margin-right: 5px; } /* Match Card Styles */ .match-card { background: #fff; border-radius: 15px; box-shadow: 0 3px 15px rgba(0,0,0,0.08); transition: all 0.3s ease; overflow: hidden; border: 2px solid transparent; height: 100%; } .match-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(205, 66, 82, 0.15); border-color: #cd4252; } .match-card-content { padding: 25px; display: flex; gap: 20px; align-items: flex-start; } .match-avatar { flex-shrink: 0; } .match-avatar img { width: 120px; height: 120px; object-fit: cover; border-radius: 15px; border: 3px solid #cd4252; box-shadow: 0 3px 10px rgba(205, 66, 82, 0.2); } .match-info { flex: 1; min-width: 0; } .match-name { color: #333; font-size: 22px; font-weight: 600; margin: 0 0 15px 0; } .match-details { margin-bottom: 15px; } .match-item { color: #666; font-size: 14px; margin: 8px 0; display: flex; align-items: center; } .match-item strong { color: #333; margin-right: 8px; min-width: 120px; } .match-item i { color: #cd4252; margin-right: 8px; width: 20px; text-align: center; } .match-view-btn { background: linear-gradient(135deg, #cd4252 0%, #b83847 100%); color: #fff; padding: 12px 30px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 14px; display: inline-block; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(205, 66, 82, 0.3); margin-top: 10px; } .match-view-btn:hover { background: linear-gradient(135deg, #b83847 0%, #a83242 100%); color: #fff; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(205, 66, 82, 0.4); } /* Loading Spinner */ .lds-spinner, .lds-spinner div, .lds-spinner div:after { box-sizing: border-box; } .lds-spinner { color: #cd4252; display: inline-block; position: relative; width: 80px; height: 80px; } .lds-spinner div { transform-origin: 40px 40px; animation: lds-spinner 1.2s linear infinite; } .lds-spinner div:after { content: " "; display: block; position: absolute; top: 3.2px; left: 36.8px; width: 6.4px; height: 17.6px; border-radius: 20%; background: currentColor; } .lds-spinner div:nth-child(1) { transform: rotate(0deg); animation-delay: -1.1s; } .lds-spinner div:nth-child(2) { transform: rotate(30deg); animation-delay: -1s; } .lds-spinner div:nth-child(3) { transform: rotate(60deg); animation-delay: -0.9s; } .lds-spinner div:nth-child(4) { transform: rotate(90deg); animation-delay: -0.8s; } .lds-spinner div:nth-child(5) { transform: rotate(120deg); animation-delay: -0.7s; } .lds-spinner div:nth-child(6) { transform: rotate(150deg); animation-delay: -0.6s; } .lds-spinner div:nth-child(7) { transform: rotate(180deg); animation-delay: -0.5s; } .lds-spinner div:nth-child(8) { transform: rotate(210deg); animation-delay: -0.4s; } .lds-spinner div:nth-child(9) { transform: rotate(240deg); animation-delay: -0.3s; } .lds-spinner div:nth-child(10) { transform: rotate(270deg); animation-delay: -0.2s; } .lds-spinner div:nth-child(11) { transform: rotate(300deg); animation-delay: -0.1s; } .lds-spinner div:nth-child(12) { transform: rotate(330deg); animation-delay: 0s; } @keyframes lds-spinner { 0% { opacity: 1; } 100% { opacity: 0; } } #loading { text-align: center; margin: 30px 0; padding: 30px; } #loading p { margin-top: 15px; color: #cd4252; font-weight: 600; } /* Responsive */ @media (max-width: 768px) { .search-input-wrapper { flex-direction: column; } .matches-search-input { width: 100%; padding-left: 50px; } .matches-search-btn { width: 100%; } .match-card-content { flex-direction: column; text-align: center; } .match-avatar { margin: 0 auto; } .match-avatar img { width: 100px; height: 100px; } .match-name { text-align: center; } .match-item { justify-content: center; } .match-item strong { min-width: auto; } } </style> <div id="loading" style="display:none;text-align:center;margin:20px;"> <div class="lds-spinner"><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div></div> <p>Loading matches...</p> </div> <?php include('footer.php'); ?> <!-- <script type="text/javascript"> fetchMyMatches(); function fetchMyMatches(){ $.ajax({ url:'php/fetch_matches.php', method:'POST', data:{}, success:function(data){ $('#fetchMatches').html(data); } }) } </script> --> <script type="text/javascript"> let offset = 0; const limit = 20; let loading = false; let endReached = false; let searchQuery = ''; // Fetch matches function function fetchMembers() { if (loading || endReached) return; loading = true; $('#loading').show(); $('#matchesEmpty').hide(); $.ajax({ url: 'php/fetch_matches.php', method: 'POST', data: { offset: offset, limit: limit, search: searchQuery }, success: function (res) { if (res.trim() === '') { if (offset === 0) { $('#matchesEmpty').show(); } endReached = true; $('#loading').hide(); loading = false; return; } $('#fetchMatches').append(res); offset += limit; loading = false; $('#loading').hide(); // Hide empty state if we have results if ($('#fetchMatches').children().length > 0) { $('#matchesEmpty').hide(); } }, error: function(xhr, status, error) { console.error('Error fetching matches:', error); $('#loading').hide(); loading = false; if (offset === 0) { $('#matchesEmpty').show(); } } }); } // Search form handler $('#matchesSearchForm').on('submit', function(e) { e.preventDefault(); searchQuery = $('#matchesSearchInput').val().trim(); offset = 0; endReached = false; $('#fetchMatches').html(''); fetchMembers(); }); // Clear search on input change (optional - can be removed if you want to keep search) $('#matchesSearchInput').on('input', function() { if ($(this).val().trim() === '') { searchQuery = ''; offset = 0; endReached = false; $('#fetchMatches').html(''); fetchMembers(); } }); // Scroll detection for infinite scroll $(window).scroll(function () { if ($(window).scrollTop() + $(window).height() >= $(document).height() - 100) { fetchMembers(); } }); // Initial load fetchMembers(); </script>