window.location.href = '404';"; exit(); } // Fetch data from database if exists $added_by = isset($_SESSION['user_id']) ? $_SESSION['user_id'] : null; $query = "SELECT * FROM products_cms LIMIT 1"; $result = mysqli_query($conn, $query); if (!$result) { echo ""; exit(); } $data = mysqli_fetch_assoc($result); // Check if data is available $small_heading_EN = isset($data['small_heading_EN']) ? $data['small_heading_EN'] : ''; $small_heading_CN = isset($data['small_heading_CN']) ? $data['small_heading_CN'] : ''; $large_heading_EN = isset($data['large_heading_EN']) ? $data['large_heading_EN'] : ''; $large_heading_CN = isset($data['large_heading_CN']) ? $data['large_heading_CN'] : ''; $long_description_EN = isset($data['long_description_EN']) ? $data['long_description_EN'] : ''; $long_description_CN = isset($data['long_description_CN']) ? $data['long_description_CN'] : ''; ?>

我们已经收录了 0 款优质的 AI 工具智能产品,助力您实现更高效的工作和生活方式!

请从下方开始寻找合适的工具
    全部"; // Query to fetch up to 6 categories from the database $query = "SELECT * FROM categories LIMIT 6"; $result = mysqli_query($conn, $query); if ($result) { while ($row = mysqli_fetch_assoc($result)) { // Check if the current category matches the filter from the URL $active_class = ($filter === $row['c_name']) ? " class='cat_active'" : ""; echo "" . htmlspecialchars($row['cn_name']) . ""; } } ?>
    window.location.href = '404';"; exit(); } // Calculate the offset for the SQL query $offset = ($current_page - 1) * $products_per_page; // Fetch total number of products based on the filter if ($filter === 'all' || empty($filter)) { // If filter is 'all' or not provided, count all products $total_products_query = "SELECT COUNT(*) as total FROM products"; } else { // If filter is set to a specific category, count only the products in that category $total_products_query = " SELECT COUNT(*) as total FROM products p JOIN categories c ON p.category_id = c.id WHERE c.c_name = '" . mysqli_real_escape_string($conn, $filter) . "'"; } $total_products_result = mysqli_query($conn, $total_products_query); if (!$total_products_result) { echo ""; exit(); } $total_products_row = mysqli_fetch_assoc($total_products_result); $total_products = intval($total_products_row['total']); // Fetch the products for the current page based on the filter if ($filter === 'all' || empty($filter)) { // If filter is 'all' or not provided, fetch all products $products_query = "SELECT * FROM products ORDER BY id DESC LIMIT $offset, $products_per_page"; } else { // If filter is set to a specific category, fetch products from that category $products_query = " SELECT p.* FROM products p JOIN categories c ON p.category_id = c.id WHERE c.c_name = '" . mysqli_real_escape_string($conn, $filter) . "' ORDER BY p.id DESC LIMIT $offset, $products_per_page"; } $products_result = mysqli_query($conn, $products_query); if (!$products_result) { echo ""; exit(); } if (mysqli_num_rows($products_result) > 0) { while ($product = mysqli_fetch_assoc($products_result)) { ?> 没有可用的产品。

    "; } ?>
      1): ?>
    • 5): ?>
    • ...
    • ...