HEX
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.30
System: Linux iZj6c1151k3ad370bosnmsZ 3.10.0-1160.76.1.el7.x86_64 #1 SMP Wed Aug 10 16:21:17 UTC 2022 x86_64
User: root (0)
PHP: 7.4.30
Disabled: NONE
Upload Files
File: /var/www/html/www.winghung.com/demo/index.php
<?php
    error_reporting(E_ALL);
    ini_set('display_errors', 1);
    require_once('../wp-load.php'); 
    session_start();
    date_default_timezone_set("Asia/Hong_Kong"); 
    global $wpdb, $sitepress;
?>
<!doctype html>
<html lang="en" id="mainHTML">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
    <style>
        .container {
            margin-top:20px;
        }
        .card {
            background-color: rgba(0, 0, 0, 0.01);
            margin-bottom: 30px;
            border: none;
        }
        .card-header {
            background-color: #0067b1;
            color: #ffffff;
        }   
        .col-form-label {
            font-size: 14px;
        }
        .imageSection img{
            width:100%;
        }
        .btn.disabled {
            pointer-events: none;
            cursor: not-allowed;
            opacity: 0.2;
        }
    </style>
    <title>Wing Hung Printing Solution</title>

  </head>
  <body>
  <div style="font-size:1cm; text-align: center;">
      <h2 face="verdana" style="margin: 0px auto; font-weight: 700; padding: 20px">Wing Hung Printing Solution <img src='asset/logo.png' height='60'></h2>
      
  </div>      
    <div class="container">

        <div class="row mt-3">
            <?php
                $categoryResult = $wpdb->get_results("SELECT * FROM `custom_product_category` WHERE status = '1'");
                foreach($categoryResult as $categoryObj) {
            ?>
            <div class="col-md-4 col-sm-12 col-xs-12">
                <div class="card" style="width: 100%;">
                    <div class="card-header text-center"><h4 class="card-title"><?php echo $categoryObj->name;?></h5></div>
                    <div class="card-body">
                        <div class='imageSection'>
                            <a href='product.php?cat=<?php echo $categoryObj->id;?>' class="<?php echo $categoryObj->published==0?"btn disabled":"";?>"><img src="asset/<?php echo $categoryObj->image;?>"></a>
                        </div>
                    </div>
                </div>
            </div>
            <?php } ?>
        </div>        
    </div>
    
    <!--
    <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#staticBackdrop">
        Launch static backdrop modal
    </button>
    -->

    <!-- Modal -->
    <div class="modal fade" id="noticeModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="staticBackdropLabel">Notice</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
                The latest version of demo has been moved to <a href='http://test.winghung.com/demo_v7'>http://test.winghung.com/demo_v7</a>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
                <!--<button type="button" class="btn btn-primary">Understood</button>-->
            </div>
            </div>
        </div>
    </div>


    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
    <script src="https://code.jquery.com/jquery-3.6.1.js" integrity="sha256-3zlB5s2uwoUzrXK3BT7AX3FyvojsraNFxCc2vC/7pNI=" crossorigin="anonymous"></script>
    <script>
        $(document).ready(function() {
            $('#noticeModal').modal('show');
        });
    </script>

  </body>
</html>