/
home
/
u839856410
/
domains
/
frajuuconnect.online
/
public_html
/
Upload File
HOME
<?php //TRACK VISITORS OF THE WEBSITE FOR ADMIN STAFF DASHBOARD include 'db_connection.php'; // Get IP and user agent $ip = $_SERVER['REMOTE_ADDR']; $agent = $_SERVER['HTTP_USER_AGENT']; // Insert visitor $stmt = $conn->prepare("INSERT INTO visitors (ip_address, user_agent) VALUES (?, ?)"); $stmt->bind_param("ss", $ip, $agent); $stmt->execute(); $stmt->close(); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- Title & Basic SEO --> <title>FRAJUU CONNECT | Find Houses, Apartments & Plots in Tanzania</title> <meta name="description" content="Discover houses for sale, apartments for rent, plots, and rooms across Tanzania. FRAJUU CONNECT helps you find your dream property with trusted agents and real estate listings."> <meta name="keywords" content="real estate Tanzania, houses for sale, apartments for rent, plots, rooms, agents, property listings, FRAJUU CONNECT"> <meta name="author" content="FRAJUU CONNECT"> <!-- Canonical URL --> <link rel="canonical" href="https://www.frajuuconnect.online/"> <!-- Open Graph (Facebook & WhatsApp Preview) --> <meta property="og:type" content="website"> <meta property="og:url" content="https://www.frajuuconnect.online/"> <meta property="og:title" content="FRAJUU CONNECT | Find Houses, Apartments & Plots in Tanzania"> <meta property="og:description" content="Easily search and connect with agents for houses, apartments, rooms, and plots across Tanzania. FRAJUU CONNECT is your trusted real estate platform."> <meta property="og:image" content="https://www.frajuuconnect.online/images/FrajuuConnect-logo.png"> <!-- logo/preview image --> <!-- Twitter Card --> <meta name="twitter:card" content="summary_large_image"> <meta name="twitter:url" content="https://www.frajuuconnect.online/"> <meta name="twitter:title" content="FRAJUU CONNECT | Find Houses, Apartments & Plots in Tanzania"> <meta name="twitter:description" content="Search houses, apartments, and plots for sale or rent in Tanzania. Trusted agents and updated listings on FRAJUU CONNECT."> <meta name="twitter:image" content="https://www.frajuuconnect.online/images/hero-bg.jpg"> <!-- Replace with your image --> <!-- Favicon --> <link rel="icon" href="https://www.frajuuconnect.online/images/favicon.png" type="image/png"> <!-- CSS Libraries --> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"> <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css" rel="stylesheet"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css"> <link href="css/style.css" rel="stylesheet"> <!-- Custom Inline Style --> <style> .fixed-agent-cta { position: fixed; right: 0; top: 40%; transform: translateY(-50%); background: #00d412ff; padding: 10px 15px; border-radius: 8px 0 0 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.2); z-index: 9999; transition: transform 0.3s ease, background 0.3s ease; } .fixed-agent-cta:hover { transform: translateY(-50%) translateX(-10px); background: #212121; } .fixed-agent-cta .icon { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; } .fixed-agent-cta .text { font-size: 14px; line-height: 1.2; } @media(max-width: 992px) { .fixed-agent-cta { display: none; } } </style> </head> <body> <!-- ✅ Navigation Bar --> <nav class="navbar navbar-expand-lg navbar-dark bg-primary shadow-sm"> <div class="container"> <a class="navbar-brand fw-bold" href="index.php"><img src="images/Frajuu-connect-logo.png" alt="Frajuu Logo" srcset=""></a> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="navbarNav"> <ul class="navbar-nav ms-auto mb-2 mb-lg-0"> <li class="nav-item"><a class="nav-link active" href="index.php">Home</a></li> <li class="nav-item"><a class="nav-link" href="house-for-sale-listing.php">Buy</a></li> <li class="nav-item"><a class="nav-link" href="houses-for-rent-listing.php">Rent</a></li> <li class="nav-item"><a class="nav-link" href="plots-for-sale-listing.php">Plots</a></li> <li class="nav-item"><a class="nav-link" href="rooms-for-rent-listing.php">Rooms</a></li> <li class="nav-item"><a class="nav-link" href="contact.php">Contact</a></li> <!-- Sera Zetu --> <li class="nav-item dropdown"> <a class="nav-link dropdown-toggle" href="#rentals" id="rent-link" role="button" data-bs-toggle="dropdown"> Msaada/Sera </a> <ul class="dropdown-menu"> <li><a class="dropdown-item" href="jinsi-tunavyofanya-kazi.html" id="houses-rent-link">Jinsi Tunavyofanya kazi</a></li> <li><a class="dropdown-item" href="terms-and-conditions.html" id="apartments-rent-link">Masharti ya Matumizi</a></li> <li><a class="dropdown-item" href="privacy-policy.html" id="short-term-link">Sera ya Faragha</a></li> </ul> </li> <li class="nav-item"><a class="nav-link text-danger" href="admin-dashboard.php"><i class="fa fa-user me-2"></i>Login</a></li> <li class="nav-item"><a class="nav-link text-danger" href="admin_login.php"><i class="fa fa-office me-2"></i>Staff</a></li> <li class="nav-item"> <form class="row g-1 justify-content-center" action="search-results.php" method="get"> <div class="col-md-6"> <input type="text" class="form-control" placeholder="Enter Keyword" name="location"> </div> <div class="col-md-4"> <button class="btn btn-danger w-100">Search</button> </div> </form> </li> </ul> </div> </div> </nav> <!-- ✅ Hero Section --> <section class="hero"> <div class="hero-content container"> <h1 class="display-4 fw-bold">Find Your Dream Property</h1> <p class="lead">Search houses, plots, and rooms for sale or rent with trusted agents.</p> <form class="row g-2 justify-content-center mt-4" action="search-results.php" method="get"> <div class="col-md-4"> <input type="text" class="form-control" placeholder="Enter region or district" name="location"> </div> <div class="col-md-2"> <button class="btn btn-danger w-100">Search</button> </div> </form> </div> </section> <!-- ✅ Newest Listings --> <section class="py-5 bg-light"> <div class="container"> <h2 class="text-center fw-bold mb-4">Newest Listings</h2> <div class="row g-4"> <?php include 'db_connection.php'; // Fetch newest 6 listings (latest first) $newest = $conn->query(" SELECT id, title, region, district, location, price, images, 'houses_for_sale' AS type, agent_id FROM houses_for_sale UNION ALL SELECT id, title, region, district, location, rent AS price, images, 'houses_for_rent', agent_id FROM houses_for_rent UNION ALL SELECT id, name AS title, region, district, location, rent AS price, images, 'rooms_for_rent', agent_id FROM rooms_for_rent UNION ALL SELECT id, title, region, district, location, price, images, 'plots_for_sale', agent_id FROM plots_for_sale ORDER BY id DESC LIMIT 6 "); if($newest && $newest->num_rows > 0): while($property = $newest->fetch_assoc()): $images = json_decode($property['images'], true); $imgCount = count($images); $firstImg = (!empty($images) && file_exists($images[0])) ? $images[0] : 'uploads/default.png'; ?> <div class="col-md-4"> <div class="card shadow-sm h-100 overflow-hidden position-relative"> <!-- Carousel --> <?php if($imgCount > 0): ?> <div id="carousel-<?php echo $property['id']; ?>" class="carousel slide" data-bs-ride="carousel"> <div class="carousel-inner"> <?php foreach($images as $index => $img): if(!file_exists($img)) continue; ?> <div class="carousel-item <?php echo $index === 0 ? 'active' : ''; ?>"> <img src="<?php echo htmlspecialchars($img); ?>" class="d-block w-100" style="height:250px; object-fit:cover;"> </div> <?php endforeach; ?> </div> <?php if($imgCount > 1): ?> <button class="carousel-control-prev" type="button" data-bs-target="#carousel-<?php echo $property['id']; ?>" data-bs-slide="prev"> <span class="carousel-control-prev-icon"></span> </button> <button class="carousel-control-next" type="button" data-bs-target="#carousel-<?php echo $property['id']; ?>" data-bs-slide="next"> <span class="carousel-control-next-icon"></span> </button> <?php endif; ?> </div> <?php else: ?> <img src="uploads/default.png" class="card-img-top" style="height:250px; object-fit:cover;"> <?php endif; ?> <!-- Hover overlay --> <div class="card-img-overlay d-flex flex-column justify-content-end p-3 overlay-gradient text-white" style="opacity:0; transition: opacity 0.3s;"> <h5 class="card-title"><?php echo htmlspecialchars($property['title']); ?></h5> <p class="card-text mb-0"> <?php echo htmlspecialchars($property['location'] . ', ' . $property['district'] . ', ' . $property['region']); ?><br> TZS <?php echo number_format($property['price']); ?><br> <?php echo ucfirst(str_replace('_',' ', $property['type'])); ?> </p> <a href="contact-agent.php?agent_id=<?php echo $property['agent_id']; ?>&property_id=<?php echo $property['id']; ?>" class="btn btn-danger mt-2 w-100">Contact Agent</a> </div> </div> </div> <style> /* Hover effect to show overlay */ .card:hover .card-img-overlay { opacity: 1 !important; } .overlay-gradient { background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.3)); border-radius: 0.25rem; } </style> <?php endwhile; else: echo '<p class="alert alert-info text-center">No listings available at the moment.</p>'; endif; ?> </div> </div> </section> <!-- ✅ Categories --> <section class="bg-light py-5"> <div class="container"> <h2 class="text-center fw-bold mb-4" style="color: #0b9b2c;">Explore by Category</h2> <div class="row g-4 text-center"> <div class="col-md-3"> <div class="card category-card p-4 shadow-sm"> <h5>Houses for Sale</h5> <a href="house-for-sale-listing.php" class="stretched-link"></a> </div> </div> <div class="col-md-3"> <div class="card category-card p-4 shadow-sm"> <h5>Houses for Rent</h5> <a href="houses-for-rent-listing.php" class="stretched-link"></a> </div> </div> <div class="col-md-3"> <div class="card category-card p-4 shadow-sm"> <h5>Plots for Sale</h5> <a href="plots-for-sale-listing.php" class="stretched-link"></a> </div> </div> <div class="col-md-3"> <div class="card category-card p-4 shadow-sm"> <h5>Rooms for Rent</h5> <a href="rooms-for-rent-listing.php" class="stretched-link"></a> </div> </div> </div> </div> </section> <!-- ✅ Why Choose Us --> <section class="py-5" style="background: #9fe9ff;"> <div class="container text-center"> <h2 class="fw-bold mb-4" style="color: #0b9b2c;">Why Choose FRAJUU CONNECT?</h2> <div class="row g-4"> <div class="col-md-4"> <i class="bi bi-shield-check display-5 text-primary"></i> <h5 class="mt-2">Trusted Agents</h5> <p>All our agents are verified and professional.</p> </div> <div class="col-md-4"> <i class="bi bi-house-door display-5 text-primary"></i> <h5 class="mt-2">Wide Selection</h5> <p>Find houses, plots, and rentals across Tanzania.</p> </div> <div class="col-md-4"> <i class="bi bi-cash-stack display-5 text-primary"></i> <h5 class="mt-2">Affordable Deals</h5> <p>Get the best prices with no hidden costs.</p> </div> </div> </div> </section> <!-- ✅ Testimonials --> <section class="bg-light py-5"> <div class="container"> <h2 class="text-center fw-bold mb-4" style="color: #0b9b2c;">What Our Clients Say</h2> <div id="testimonialCarousel" class="carousel slide" data-bs-ride="carousel"> <div class="carousel-inner text-center"> <div class="carousel-item active testimonial"> <img src="images/user1.jpeg" alt="Client" class="rounded-circle mx-auto d-block" style="width:100px; height:100px; object-fit:cover;"> <p class="mt-3">“I found my dream home in just a week using FRAJUU CONNECT!”</p> <small class="text-muted">- Sarah, Dar es Salaam</small> </div> <div class="carousel-item testimonial"> <img src="images/user2.jpeg" alt="Client" class="rounded-circle mx-auto d-block" style="width:100px; height:100px; object-fit:cover;"> <p class="mt-3">“The agents were very professional and helpful.”</p> <small class="text-muted">- John, Arusha</small> </div> </div> <!-- Controls --> <button class="carousel-control-prev" type="button" data-bs-target="#testimonialCarousel" data-bs-slide="prev"> <span class="carousel-control-prev-icon"></span> <span class="visually-hidden">Previous</span> </button> <button class="carousel-control-next" type="button" data-bs-target="#testimonialCarousel" data-bs-slide="next"> <span class="carousel-control-next-icon"></span> <span class="visually-hidden">Next</span> </button> </div> </div> </section> <!-- ✅ Call to Action --> <section class="py-5 text-center text-white" style="background:#0b9b2c;"> <div class="container"> <h2 class="fw-bold">Are you an agent?</h2> <p>Join now and list your properties to reach thousands of buyers and tenants.</p> <a href="register.php" class="btn btn-light btn-lg">List Your Property</a> </div> </section> <!-- ✅ Fixed Hanging CTA for Agent Registration --> <a href="register.php" class="fixed-agent-cta d-flex align-items-center text-decoration-none"> <div class="icon bg-primary text-white d-flex justify-content-center align-items-center"> <i class="bi bi-person-plus-fill" style="font-size:24px;"></i> </div> <div class="text ms-2 text-white"> <strong>Are you an agent?</strong><br> Join us today! </div> </a> <!-- ✅ Footer --> <footer class="bg-dark text-white py-4"> <div class="container text-center"> <!-- Contact Info --> <div class="col-md-4 col-lg-4 col-xl-4 mx-auto mt-3"> <h5 class="text-uppercase mb-4 font-weight-bold" style="color: #0b9b2c;">CONTACT US</h5> <p><i class="fas fa-envelope me-3"></i> info@frajuuconnect.online</p> <p><i class="fas fa-phone me-3"></i> +255 675 621 343</p> </div> <p>Follow us: <a href="#" class="text-white ms-2">Facebook</a> | <a href="#" class="text-white ms-2">Tiktok</a> | <a href="#" class="text-white ms-2">Instagram</a> </p> </div> <!-- Copyright --> <div class="row text-center mt-4"> <div class="col"> <!-- Privacy Policy Link --> <a href="privacy-policy.html" class="btn btn-sm btn-outline-light mt-2">Sera ya Faragha</a> <a href="jinsi-tunavyofanya-kazi.html" class="btn btn-sm btn-outline-light mt-2">Jinsi Tunavyofanya kazi</a> <a href="terms-and-conditions.html" class="btn btn-sm btn-outline-light mt-2">Masharti na Matumizi</a> <a href="COMMERCE WEBSITE/index.html" class="btn btn-sm btn-outline-light mt-2">Ecommerce</a> <br> <br> <p>© <?php echo date("Y"); ?> FRAJUU CONNECT. All rights reserved.</p> </div> </div> </footer> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script> </body> </html>