File Manager
Editing: index.php
<?php // ISAIAH 60 “Arise, shine, for your light has come,and the glory of the Lord rises upon you.See, darkness covers the earth and thick darkness is over the peoples,but the Lord rises upon you and his glory appears over you.Nations will come to your light,and kings to the brightness of your dawn.“Lift up your eyes and look about you:All assemble and come to you;your sons come from afar,and your daughters are carried on the hip.Then you will look and be radiant,your heart will throb and swell with joy;the wealth on the seas will be brought to you,to you the riches of the nations will come.Herds of camels will cover your land,young camels of Midian and Ephah.And all from Sheba will come,bearing gold and incense and proclaiming the praise of the Lord.All Kedar’s flocks will be gathered to you,the rams of Nebaioth will serve you;they will be accepted as offerings on my altar, and I will adorn my glorious temple.“Who are these that fly along like clouds,like doves to their nests? Surely the islands look to me;in the lead are the ships of Tarshish,bringing your children from afar,with their silver and gold,to the honor of the Lord your God,the Holy One of Israel,for he has endowed you with splendor.“Foreigners will rebuild your walls,and their kings will serve you.Though in anger I struck you,in favor I will show you compassion.Your gates will always stand open,they will never be shut, day or night,so that people may bring you the wealth of the nations—their kings led in triumphal procession.For the nation or kingdom that will not serve you will perish;it will be utterly ruined.“The glory of Lebanon will come to you,the juniper, the fir and the cypress together,to adorn my sanctuary;and I will glorify the place for my feet.The children of your oppressors will come bowing before you;all who despise you will bow down at your feet and will call you the City of the Lord,Zion of the Holy One of Israel.“Although you have been forsaken and hated,with no one traveling through,I will make you the everlasting pride and the joy of all generations.You will drink the milk of nations and be nursed at royal breasts.Then you will know that I, the Lord, am your Savior,your Redeemer, the Mighty One of Jacob. Instead of bronze I will bring you gold,and silver in place of iron.Instead of wood I will bring you bronze,and iron in place of stones.I will make peace your governor and well-being your ruler.No longer will violence be heard in your land, nor ruin or destruction within your borders,but you will call your walls Salvation and your gates Praise.The sun will no more be your light by day,nor will the brightness of the moon shine on you,for the Lord will be your everlasting light,and your God will be your glory. Your sun will never set again,and your moon will wane no more;the Lord will be your everlasting light,and your days of sorrow will end.Then all your people will be righteous and they will possess the land forever.They are the shoot I have planted,the work of my hands,for the display of my splendor. The least of you will become a thousand,the smallest a mighty nation.I am the Lord;in its time I will do this swiftly.” require_once 'security.php'; ?> <?php // Include the shared functions file require_once 'functions.php'; // Establish connection to MySQL database $servername = "127.0.0.1:3306"; // Change if your MySQL server is hosted elsewhere $username = "u404542307_dacotywebsites"; // Your MySQL username $password = "daCotywebs1te5"; // Your MySQL password $database = "u404542307_eizon"; // Your MySQL database name $conn = new mysqli($servername, $username, $password, $database); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } // Fetch random products $products_query = "SELECT * FROM cards ORDER BY created_at DESC LIMIT 8"; $all_cards = $conn->query($products_query); if (!$all_cards) { die("Error fetching products: " . $conn->error); } $top_accounts_query = " SELECT u.id, p.username AS profile_username, u.username AS user_username, p.profile_image, p.description, COUNT(cc.user_id) AS customer_count FROM users u LEFT JOIN customer_count cc ON u.id = cc.user_id LEFT JOIN profiles p ON u.id = p.user_id GROUP BY u.id, p.username, u.username, p.profile_image, p.description ORDER BY COUNT(cc.user_id) DESC LIMIT 8 "; $top_accounts = $conn->query($top_accounts_query); if (!$top_accounts) { die("Error fetching top accounts: " . $conn->error); } ?> <!DOCTYPE html> <html lang="en"> <head> <script async defer src="https://www.googletagmanager.com/gtag/js?id=G-Z6RR2PMZW4"></script> <script defer> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-Z6RR2PMZW4'); </script> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>eizon | The Marketplace You Can Trust!</title> <meta name="description" content="Welcome to eizon!: Your ultimate platform for buying and selling products in your region. Explore a wide range of items, connect with sellers directly, and enjoy a seamless online marketplace experience."> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" media="print" onload="this.media='all'"> <link rel="stylesheet" href="e-commerce.css"> <link rel="icon" href="/favicon.ico" type="image/x-icon"> <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"> <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"> <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"> <link rel="manifest" href="/site.webmanifest"> <link rel="manifest" href="/manifest.json"> <style> .top-accounts-container{display:flex;overflow-x:auto;gap:10px;padding:20px;background:#f9f9f9} .top-accounts-container::-webkit-scrollbar{display:none} .top-accounts-container{-ms-overflow-style:none;scrollbar-width:none} .top-accounts-container a{text-decoration:none} .top-account-card{flex:0 0 auto;width:150px;text-align:center;background:#fff;border:1px solid #ddd;border-radius:10px;padding:10px;box-shadow:0 2px 5px rgba(0,0,0,0.1);cursor:pointer} .top-account-card:hover{transform:scale(1.05)} .top-account-card img{width:100px;height:100px;border-radius:50%;object-fit:cover} .top-account-card h4{font-size:16px;margin:10px 0 5px;color:#007BFF} .top-account-card p{font-size:14px;color:#555} .top-account-card a{text-decoration:none;color:#007BFF;font-weight:bold} .account-description,.namekit,.username,.locationkit{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal} .account-description,.namekit{-webkit-line-clamp:1} .username,.locationkit{-webkit-line-clamp:1} .see-more-card{flex:0 0 auto;width:150px;text-align:center;background:#f1f1f1;border:1px solid #ddd;border-radius:10px;padding:10px;box-shadow:0 2px 5px rgba(0,0,0,0.1);display:flex;align-items:center;justify-content:center;cursor:pointer} .see-more-card h4{font-size:16px;margin:0;color:#007BFF;font-weight:bold} .see-more-card:hover{background-color:#e9e9e9;transform:scale(1.05)} .banner{position:relative;margin-top:10%;width:100%;height:300px;overflow:hidden;display:flex;align-items:center;justify-content:center;text-align:center} .banner-image{position:absolute;top:0;left:0;width:100%;height:120%;background-image:url("images/banner1.jpg");background-size:cover;background-position:center;transform:translateY(0);transition:transform 0.1s linear} .banner-text{position:relative;z-index:1;background:rgba(0,0,0,0.6);color:white;padding:15px;border-radius:8px;max-width:80%;font-size:20px;text-align:center} .cta-button{display:inline-block;margin-top:10px;padding:10px 20px;background:#28a745;color:white;text-decoration:none;border-radius:5px;font-size:18px;font-weight:700;transition:background 0.3s ease-in-out,transform 0.3s ease-in-out} .cta-button:hover{background:#218838;transform:scale(1.05)} .overlay-content a{display:flex;gap:10px;padding:7px 5px} .overlay-content i{font-size:20px} </style> </head> <body style="background-color:white;"> <div class="top"> <div class="title">e!zon</div> <input type="text" id="search" placeholder="Search anything..."> <div class="nav"> <span class="open-btn" onclick="openNav()">☰</span> </div> <div id="myNav" class="overlay"> <a href="javascript:void(0)" class="close-btn" onclick="closeNav()">×</a> <div class="overlay-content"> <!-- My Account --> <a href="dashboard.php"> <i class="fas fa-user"></i> My Account </a> <!-- Home --> <a href="#"> <i class="fas fa-home"></i> Home </a> <!-- Categories --> <div class="categs"> <h4> Categories</h4> <a href="allproducts.php?"> <i class="fas fa-list"></i></i> All Categories </a> <a href="allproducts.php?category=Electronics"> <i class="fas fa-laptop"></i> Electronics </a> <a href="allproducts.php?category=Fashion-and-Beauty"> <i class="fas fa-tshirt"></i> Fashion & Beauty </a> <a href="allproducts.php?category=Home-Accessories"> <i class="fas fa-couch"></i> Home Accessories </a> <a href="allproducts.php?category=Decorations"> <i class="fas fa-palette"></i> Decorations </a> <a href="allproducts.php?category=Food-and-Nutrition"> <i class="fas fa-utensils"></i> Food & Nutrition </a> <a href="allproducts.php?category=Services"> <i class="fas fa-tools"></i> Services </a> <a href="allproducts.php?category=transport"> <i class="fas fa-truck"></i> Transport </a> <a href="allproducts.php?category=Other"> <i class="fas fa-ellipsis-h"></i> Other </a> </div> <!-- Request a Product --> <a href="/add_request"> <i class="fas fa-plus-circle"></i> Request a Product </a> <!-- Login --> <a href="/dashboard.php"> <i class="fas fa-sign-in-alt"></i> LOGIN </a> <!-- Sell on EIZON --> <button style="background-color: orange;border: none;border-radius: 5px;padding: 9px 4px;"> <a href="/sell"> +ADD PRODUCT </a> </button> </div> </div> </div> <div style="height:1svh;"><div id="result" class="search-result" style="z-index:2;"></div></div> <div class="banner"> <div class="banner-image"></div> <!-- This holds the background image --> <div class="banner-text"> <h2 id="banner-message">Soko limehamia huku!</h2> <a id="banner-button" href="/sell" class="cta-button">Start Selling</a> </div> </div> <div class="products"> <?php while ($row = $all_cards->fetch_assoc()) { ?> <?php // Combine country_code and contacts $countryCode = $row['country_code']; // Fetch country code from the database $phoneNumber = $row['contacts']; // Fetch phone number from the database // Format the full phone number $fullPhoneNumber = $countryCode . $phoneNumber; ?> <div class="generalcard"> <div class="card"> <div class="card-inner"> <div class="card-front"> <div class="slideshow"> <img src="<?php echo htmlspecialchars($row['image1']); ?>" loading="lazy" alt="Image 1"> <img src="<?php echo htmlspecialchars($row['image2']); ?>" loading="lazy" alt="Image 2"> <img src="<?php echo htmlspecialchars($row['image3']); ?>" loading="lazy" alt="Image 3"> </div> </div> <div class="card-back"> <h4 class="namekit"><?php echo htmlspecialchars($row['name']); ?></h4> <p class="over"><?php echo htmlspecialchars($row['description']); ?></p> <p class="locationkit"><?= htmlspecialchars($row['region']) ?></p> <p><?= htmlspecialchars($row['state']) ?></p> <button onclick="window.location.href='https://wa.me/<?= htmlspecialchars($fullPhoneNumber) ?>?text=Habari!%20I%20am%20interested%20in%20your%20product%20<?= urlencode($row['name']) ?>%20on%20eizon%20:%20<?= urlencode('https://www.eizononline.com/product.php?card_id=' . $row['card_id']) ?>';"> Contact Seller </button> <p> <a href="allproducts.php?category=<?= str_replace(' ', '-', htmlspecialchars($row['category'])) ?>">See Related</a> </p> </div> </div> </div> <div class="pricetag"> <p><?= htmlspecialchars(number_format($row['price'], 2)) ?> Tsh</p> </div> </div> <?php } ?> </div> <div class="cta"> <button class="seeall"> <a href="/allproducts">Explore all products</a> </button> <button style="background-color: orange;border: none;border-radius: 5px;padding: 9px 4px;"> <a href="/sell" style="text-decoration:none;color:white;font-weight:900;">SELL ON EIZON NOW !</a> </button> </div> <h2 style="text-align:center;">-TOP ACCOUNTS-</h2> <div class="top-accounts-container"> <?php while ($account = $top_accounts->fetch_assoc()) { ?> <a href="/profile.php?user=<?= htmlspecialchars($account['profile_username'] ?: $account['user_username']); ?>"> <div class="top-account-card"> <img src="<?= htmlspecialchars($account['profile_image'] ?: 'images/profile_avatar.jpg'); ?>" alt="Profile Image of <?= htmlspecialchars($account['profile_username'] ?: $account['user_username']); ?>"> <h4 class="username"> <?= htmlspecialchars($account['profile_username'] ?: $account['user_username']); ?> </h4> <p class="account-description"><?= htmlspecialchars($account['description'] ?: 'No description added'); ?></p> </div> </a> <?php } ?> <div class="top-account-card see-more-card"> <a href="all_accounts.php" class="card-link"> <h4>See More Accounts</h4> </a> </div> </div> <!-- <div id="notification-prompt" style="display: none;">--> <!-- <div class="modal-content">--> <!-- <p>Welcome to eizon.</p>--> <!-- <p>The Marketplace You Can Trust</p>--> <!-- <div class="modal-buttons">--> <!-- <button id="enable-notifications" class="btn-primary">Continue!</button>--> <!-- <button id="not-now" class="btn-secondary">Not Now</button>--> <!-- </div>--> <!-- </div>--> <!--</div>--> <div style="padding:0;" class="about"> <h2>from eiDevs</h2> <button style="background-color: orange;border: none;border-radius: 5px;padding: 15px 15px;"> <a href="https://wa.me/255746024949?text=Hi%2C+I+need+a+website+%F0%9F%91%8B" style="text-decoration:none;color:white;font-weight:900;font-size:20px;">GET YOUR WEBSITE TODAY!</a> </button> <p> 2026 Vuka Mipaka Yako! </p> </div> <?php include 'footer.php'; ?> <script defer> function openNav() { document.getElementById("myNav").style.width = "260px"; } function closeNav() { document.getElementById("myNav").style.width = "0"; } // Close the navigation menu when clicking outside of it document.addEventListener("click", function (event) { const nav = document.getElementById("myNav"); const openButton = document.querySelector(".open-btn"); // Assuming you have a button to open the nav // Check if the click is outside the nav and not on the open button if (!nav.contains(event.target) && !openButton.contains(event.target)) { closeNav(); } }); </script> <script> const images=["images/skate.webp","images/tshirt.webp","images/may3.webp","images/noty2.webp","images/may6.webp"],messages=["Get Your Website Now, 30% off.","The Marketplace You Can Trust!","Your Business, Your rules, Your Space!","Increase your Customer-Count!","Unahitaji nini Tajiri?"],buttons=[{text:"GET WEBSITE TODAY!",link:"https://wa.me/255746024949?text=Hi%2C+I+need+a+website+%F0%9F%91%8B"},{text:"START SHOPING",link:"/allproducts"},{text:"CREATE YOUR ACCOUNT",link:"/register"},{text:"SHARE on WhatsApp!",link:"/dashboard.php"},{text:"REQUEST ANYTHING",link:"/add_request"}];let currentImageIndex=0,lastScrollPosition=0,bannerImageElement=document.querySelector(".banner-image"),messageElement=document.querySelector("#banner-message"),buttonElement=document.querySelector("#banner-button");function changeBannerContent(){bannerImageElement.style.backgroundImage=`url(${images[currentImageIndex]})`,messageElement.textContent=messages[currentImageIndex],buttonElement.textContent=buttons[currentImageIndex].text,buttonElement.href=buttons[currentImageIndex].link,currentImageIndex=(currentImageIndex+1)%images.length}setInterval(changeBannerContent,5e3),window.addEventListener("scroll",function(){let e=window.scrollY,t=document.querySelector(".banner-text"),n=document.querySelector(".cta-button");e<lastScrollPosition?(t.style.backgroundColor="rgba(0, 0, 0, 0.5)",n.style.backgroundColor="#28a745"):(t.style.backgroundColor="#28a745",n.style.backgroundColor="#fd7e14"),lastScrollPosition=e,bannerImageElement.style.transform=`translateY(${e}px)`}); </script> <script src="e-commerce.js" defer></script> </body> </html>
💾 Save
⬅ Back