<?php

// include 'xs_login.php';
// include 'xs_template.php';
include 'xs_config.php';
include 'xs_db.php';

$debug_mode = 1; // 1 shows verbose output

  if(isset($_GET['q']) && !empty($_GET['q']))
      $search = $_GET['q'];
  else
      $search = 'Cholesterol';
  // echo $search;
  // die;
  global $dbhost, $dbuser, $dbpass, $dbname;
  
   
  $conn  =  new mysqli($dbhost, $dbuser, $dbpass, $dbname);

  $testquery =  "SELECT * from `ptests` where 1 ORDER BY ReferenceID ASC";
    
  $testresult = mysqli_query($conn,"$testquery;")
    or die(mysqli_error());

  if(isset($_GET['s']) && !empty($_GET['s'])){
    $search = $_GET['s']; 
    $query =  "SELECT * from `ptests` where ReferenceID LIKE '%$search%'";
    
  }else{
    $query =  "SELECT * from `ptests` where ReferenceID='".$search."'";
  }
    $result = mysqli_query($conn,"$query;")
    or die(mysqli_error());
    $data = [];
    while ($row = mysqli_fetch_array($result,MYSQLI_ASSOC)) {
        $data = $row;
    }

?>
<html>
<head>
<title>The Pathology Test - <?= ucfirst($data['ReferenceID']) ?> </title>
<link rel="icon" href="images/favicon.ico" type="image/x-icon">
</head>
<style>
  .accordion-body td {
    padding:22px;
  }
  .pb-0  {
    padding-bottom:0 !important;
    margin-bottom: 12px !important;
  }
  .pt-0  {
    padding-top:0 !important;
  }
  p,
   span,
    li,
    h1,
    h2,
    h3,
    h4,
    div {
      font-family: "Montserrat", sans-serif;
    
    }
    p,
   span,
    li,
    div {
      font-size:16px;
      line-height:24px;
      letter-spacing:.8px;
    }
    @media print {
      body button {
    color: #000000 !important;
margin: 22px 0 !important;
background: #f5f5f5 !important;
border: none;
padding: 10px 4px;
font-size: 16px;
border-radius: 8px;
font-weight: bold;
  }
      }
  body button {
    color: #000000 !important;
margin: 22px 0 !important;
background: #f5f5f5 !important;
border: none;
padding: 10px 4px;
font-size: 16px;
border-radius: 8px;
font-weight: bold;
  }
  .input-box {
    display: flex;
justify-content: flex-start;
white-space: nowrap;
align-items: center;
  }
  .input-box p {
    white-space: nowrap;
margin-right: 22px;
  }
  .container {
    max-width: 1366px;
    margin: auto;
    padding: 42px;
  }
  .summary-image img {
    width:100%;
  }
  </style>
<body onload="window.print()">
<section class="second-test sec-pad">
        <div class="container pb-0">
        <img src="./images/logo/logo.png" alt="logo" style="max-width:300px;margin-bottom: 32px;
margin-left: -15px;">
            <div class="tests-section">
           
                <h2><?= ucfirst($data['ReferenceID']) ?></h2>

                <?php $relateds = explode(', ', $data['Related']); ?>

            </div>
        </div>
    </section>


    <!-- bread crumb end -->

    <!-- faq sectione -->
    <section class="faq-section">
        <div class="container pt-0">
          <?php if(!empty($data['PageImage'])){ ?>
          <div class="summary-image">
            <img src="./content/summaryimages/<?= $data['PageImage'] ?>" alt="">
          </div>
          <?php } ?>
            <div class="row">
                <div class="col-md-11 col-sm-10 col-xs-12 faq-colmun">
                    <div class="faq-content">


                        <div class="accordion" id="accordionPanelsStayOpenExample">

                            <?php if(!empty($data['PageName']) || !empty($data['PageSummary'])) { ?>
                            <div class="accordion-item" style="margin-bottom: 0px;">
                              <h2 class="accordion-header" id="panelsStayOpen-headingOne">
                                <button class="" style="color:#0166ff; margin-left:20px; background:#fff;" type="button" data-bs-toggle="collapse" data-bs-target="#" aria-expanded="true" aria-controls="">
                                  <?= $data['PageName']; ?>
                                </button>
                              </h2>
                              <div id="" class="accordion-collapse collapse show" aria-labelledby="panelsStayOpen-headingOne">
                                <div class="accordion-body">
                                 
                                    <p><?= $data['PageSummary']; ?></p>
                                </div>
                              </div>
                            </div>
                            <?php } ?>

                            <?php if(!empty($data['SectionTitle1']) && !empty($data['SectionText1'])) { ?>
                            <div class="accordion-item" style="margin-bottom: 0px;" style="margin-bottom: 0px;">
                              <h2 class="accordion-header" id="panelsStayOpen-headingTwo">
                                <button class="accordion-button  <?php if($data['SectionVisible1']=='Closed') echo 'collapsed' ?>" type="button" data-bs-toggle="collapse" data-bs-target="#<?= substr($data['SectionTitle1'],0,3) ?>" aria-expanded="true" aria-controls="<?= substr($data['SectionTitle1'],0,3) ?>">
                                    <?= $data['SectionTitle1']; ?>
                                </button>
                              </h2>
                              <div id="<?= substr($data['SectionTitle1'],0,3) ?>" class="accordion-collapse collapse <?php if($data['SectionVisible1']=='Open') echo 'show' ?>" aria-labelledby="panelsStayOpen-headingTwo">
                                <div class="accordion-body">
                                <?php 
                                
                                $pattern = '/[video]/';
                                if(preg_match($pattern, $data['SectionText1'], $matches)){
                                  $regex = "#[\s*?video\b[^\]]*](.*?)[/video\b[^\]]*]#s";
                                  $code = preg_match($regex, $data['SectionText1'], $matches1);
                                  $matches1 = substr($matches1[1], strpos($matches1[1],'v')+2);
                                 $str = str_replace(array('[video]', '[/video]'), array('<iframe width="820" height="515" src=https://www.youtube.com/embed/'."$matches1".' title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>', '</iframe>'), $data['SectionText1']);
                                  }  ?>
                                    <p><?= $str; ?></p>                                
                                </div>
                              </div>
                            </div>
                            <?php } ?>



                           





                            <?php if(!empty($data['SectionTitle2']) && !empty($data['SectionText2'])) { ?>
                            <div class="accordion-item" style="margin-bottom: 0px;">
                              <h2 class="accordion-header" id="panelsStayOpen-headingTwo">
                                <button class="accordion-button <?php if($data['SectionVisible2']=='Closed') echo 'collapsed' ?>" type="button" data-bs-toggle="collapse" data-bs-target="#<?= substr($data['SectionTitle2'],0,3) ?>" aria-expanded="true" aria-controls="<?= substr($data['SectionTitle2'],0,3) ?>">
                                    <?= $data['SectionTitle2']; ?>
                                </button>
                              </h2>
                              <div id="<?= substr($data['SectionTitle2'],0,3) ?>" class="accordion-collapse collapse <?php if($data['SectionVisible2']=='Open') echo 'show' ?>"" aria-labelledby="panelsStayOpen-headingTwo">
                                <div class="accordion-body">
                                <?php 
                                
                                $pattern = '/[video]/';
                                if(preg_match($pattern, $data['SectionText2'], $matches)){
                                  $regex = "#[\s*?video\b[^\]]*](.*?)[/video\b[^\]]*]#s";
                                  $code = preg_match($regex, $data['SectionText2'], $matches2);
                                  $matches2 = substr($matches2[1], strpos($matches2[1],'v')+2);
                                 $str2 = str_replace(array('[video]', '[/video]'), array('<iframe width="820" height="515" src=https://www.youtube.com/embed/'."$matches2".' title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>', '</iframe>'), $data['SectionText2']);
                                  }  ?>
                                    <p><?= $str2; ?></p>                                
                                </div>
                              </div>
                            </div>
                            <?php } ?>

                            
                            <?php if(!empty($data['SectionTitle3']) && !empty($data['SectionText3'])) { ?>
                            <div class="accordion-item" style="margin-bottom: 0px;">
                              <h2 class="accordion-header" id="panelsStayOpen-headingTwo">
                                <button class="accordion-button <?php if($data['SectionVisible3']=='Closed') echo 'collapsed' ?>" type="button" data-bs-toggle="collapse" data-bs-target="#<?= substr($data['SectionTitle3'],0,3) ?>" aria-expanded="true" aria-controls="<?= substr($data['SectionTitle3'],0,3) ?>">
                                    <?= $data['SectionTitle3']; ?>
                                </button>
                              </h2>
                              <div id="<?= substr($data['SectionTitle3'],0,3) ?>" class="accordion-collapse collapse <?php if($data['SectionVisible3']=='Open') echo 'show' ?>"" aria-labelledby="panelsStayOpen-headingTwo">
                                <div class="accordion-body">
                                <?php 
                                
                                $pattern = '/[video]/';
                                if(preg_match($pattern, $data['SectionText3'], $matches)){
                                  $regex = "#[\s*?video\b[^\]]*](.*?)[/video\b[^\]]*]#s";
                                  $code = preg_match($regex, $data['SectionText3'], $matches3);
                                  $matches3 = substr($matches3[1], strpos($matches3[1],'v')+2);
                                 $str3 = str_replace(array('[video]', '[/video]'), array('<iframe width="820" height="515" src=https://www.youtube.com/embed/'."$matches3".' title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>', '</iframe>'), $data['SectionText3']);
                                  }  ?>
                                    <p><?= $str3; ?></p>                                
                                </div>
                              </div>
                            </div>
                            <?php } ?>

                            <?php if(!empty($data['SectionTitle4']) && !empty($data['SectionText4'])) { ?>
                            <div class="accordion-item" style="margin-bottom: 0px;">
                              <h2 class="accordion-header" id="panelsStayOpen-headingTwo">
                                <button class="accordion-button <?php if($data['SectionVisible4']=='Closed') echo 'collapsed' ?>" type="button" data-bs-toggle="collapse" data-bs-target="#<?= substr($data['SectionTitle4'],0,3) ?>" aria-expanded="true" aria-controls="<?= substr($data['SectionTitle4'],0,3) ?>">
                                    <?= $data['SectionTitle4']; ?>
                                </button>
                              </h2>
                              <div id="<?= substr($data['SectionTitle4'],0,3) ?>" class="accordion-collapse collapse <?php if($data['SectionVisible4']=='Open') echo 'show' ?>"" aria-labelledby="panelsStayOpen-headingTwo">
                                <div class="accordion-body">
                                <?php 
                                
                                $pattern = '/[video]/';
                                if(preg_match($pattern, $data['SectionText4'], $matches)){
                                  $regex = "#[\s*?video\b[^\]]*](.*?)[/video\b[^\]]*]#s";
                                  $code = preg_match($regex, $data['SectionText4'], $matches4);
                                  $matches4 = substr($matches4[1], strpos($matches4[1],'v')+2);
                                 $str4 = str_replace(array('[video]', '[/video]'), array('<iframe width="820" height="515" src=https://www.youtube.com/embed/'."$matches4".' title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>', '</iframe>'), $data['SectionText4']);
                                  }  ?>
                                    <p><?= $str4; ?></p>                                
                                </div>
                              </div>
                            </div>
                            <?php } ?>

                            <?php if(!empty($data['SectionTitle5']) && !empty($data['SectionText5'])) { ?>
                            <div class="accordion-item" style="margin-bottom: 0px;">
                              <h2 class="accordion-header" id="panelsStayOpen-headingTwo">
                                <button class="accordion-button <?php if($data['SectionVisible5']=='Closed') echo 'collapsed' ?>" type="button" data-bs-toggle="collapse" data-bs-target="#<?= substr($data['SectionTitle5'],0,3) ?>" aria-expanded="true" aria-controls="<?= substr($data['SectionTitle5'],0,3) ?>">
                                    <?= $data['SectionTitle5']; ?>
                                </button>
                              </h2>
                              <div id="<?= substr($data['SectionTitle5'],0,3) ?>" class="accordion-collapse collapse <?php if($data['SectionVisible5']=='Open') echo 'show' ?>"" aria-labelledby="panelsStayOpen-headingTwo">
                                <div class="accordion-body">
                                <?php 
                                
                                $pattern = '/[video]/';
                                if(preg_match($pattern, $data['SectionText5'], $matches)){
                                  $regex = "#[\s*?video\b[^\]]*](.*?)[/video\b[^\]]*]#s";
                                  $code = preg_match($regex, $data['SectionText5'], $matches5);
                                  $matches5 = substr($matches5[1], strpos($matches5[1],'v')+2);
                                 $str5 = str_replace(array('[video]', '[/video]'), array('<iframe width="820" height="515" src=https://www.youtube.com/embed/'."$matches5".' title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>', '</iframe>'), $data['SectionText5']);
                                  }  ?>
                                    <p><?= $str5; ?></p>                                
                                </div>
                              </div>
                            </div>
                            <?php } ?>

                            <?php if(!empty($data['SectionTitle6']) && !empty($data['SectionText6'])) { ?>
                            <div class="accordion-item" style="margin-bottom: 0px;">
                              <h2 class="accordion-header" id="panelsStayOpen-headingTwo">
                                <button class="accordion-button <?php if($data['SectionVisible6']=='Closed') echo 'collapsed' ?>" type="button" data-bs-toggle="collapse" data-bs-target="#<?= substr($data['SectionTitle6'],0,3) ?>" aria-expanded="true" aria-controls="<?= substr($data['SectionTitle6'],0,3) ?>">
                                    <?= $data['SectionTitle6']; ?>
                                </button>
                              </h2>
                              <div id="<?= substr($data['SectionTitle6'],0,3) ?>" class="accordion-collapse collapse <?php if($data['SectionVisible6']=='Open') echo 'show' ?>"" aria-labelledby="panelsStayOpen-headingTwo">
                                <div class="accordion-body">
                                <?php 
                                
                                $pattern = '/[video]/';
                                if(preg_match($pattern, $data['SectionText6'], $matches)){
                                  $regex = "#[\s*?video\b[^\]]*](.*?)[/video\b[^\]]*]#s";
                                  $code = preg_match($regex, $data['SectionText6'], $matches6);
                                  $matches6 = substr($matches6[1], strpos($matches6[1],'v')+2);
                                 $str6 = str_replace(array('[video]', '[/video]'), array('<iframe width="820" height="515" src=https://www.youtube.com/embed/'."$matches6".' title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>', '</iframe>'), $data['SectionText6']);
                                  }  ?>
                                    <p><?= $str6; ?></p>                                
                                </div>
                              </div>
                            </div>
                            <?php } ?>

                            <?php if(!empty($data['SectionTitle7']) && !empty($data['SectionText7'])) { ?>
                            <div class="accordion-item" style="margin-bottom: 0px;">
                              <h2 class="accordion-header" id="panelsStayOpen-headingTwo">
                                <button class="accordion-button <?php if($data['SectionVisible7']=='Closed') echo 'collapsed' ?>" type="button" data-bs-toggle="collapse" data-bs-target="#<?= substr($data['SectionTitle7'],0,3) ?>" aria-expanded="true" aria-controls="<?= substr($data['SectionTitle7'],0,3) ?>">
                                    <?= $data['SectionTitle7']; ?>
                                </button>
                              </h2>
                              <div id="<?= substr($data['SectionTitle7'],0,3) ?>" class="accordion-collapse collapse <?php if($data['SectionVisible7']=='Open') echo 'show' ?>" aria-labelledby="panelsStayOpen-headingTwo">
                                <div class="accordion-body">
                                <?php 
                                
                                $pattern = '/[video]/';
                                if(preg_match($pattern, $data['SectionText7'], $matches)){
                                  $regex = "#[\s*?video\b[^\]]*](.*?)[/video\b[^\]]*]#s";
                                  $code = preg_match($regex, $data['SectionText7'], $matches7);
                                  $matches7 = substr($matches7[1], strpos($matches7[1],'v')+2);
                                 $str7 = str_replace(array('[video]', '[/video]'), array('<iframe width="820" height="515" src=https://www.youtube.com/embed/'."$matches7".' title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>', '</iframe>'), $data['SectionText7']);
                                  }  ?>

                                    <p><?= $str7; ?></p>                                
                                </div>
                              </div>
                            </div>
                            <?php } ?>

                            <?php if(!empty($data['SectionTitle8']) && !empty($data['SectionText8'])) { ?>
                            <div class="accordion-item" style="margin-bottom: 0px;">
                              <h2 class="accordion-header" id="panelsStayOpen-headingTwo">
                                <button class="accordion-button <?php if($data['SectionVisible8']=='Closed') echo 'collapsed' ?>" type="button" data-bs-toggle="collapse" data-bs-target="#<?= substr($data['SectionTitle8'],0,3) ?>" aria-expanded="true" aria-controls="<?= substr($data['SectionTitle8'],0,3) ?>">
                                    <?= $data['SectionTitle8']; ?>
                                </button>
                              </h2>
                              <div id="<?= substr($data['SectionTitle8'],0,3) ?>" class="accordion-collapse collapse <?php if($data['SectionVisible8']=='Open') echo 'show' ?>" aria-labelledby="panelsStayOpen-headingTwo">
                                <div class="accordion-body">
                                <?php 
                                
                                $pattern = '/[video]/';
                                if(preg_match($pattern, $data['SectionText8'], $matches)){
                                  $regex = "#[\s*?video\b[^\]]*](.*?)[/video\b[^\]]*]#s";
                                  $code = preg_match($regex, $data['SectionText8'], $matches8);
                                  $matches8 = substr($matches8[1], strpos($matches8[1],'v')+2);
                                 $str8 = str_replace(array('[video]', '[/video]'), array('<iframe width="820" height="515" src=https://www.youtube.com/embed/'."$matches8".' title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>', '</iframe>'), $data['SectionText8']);
                                  }  ?>
                                    <p><?= $str8; ?></p>                                
                                </div>
                              </div>
                            </div>
                            <?php } ?>

                            <?php if(!empty($data['SectionTitle9']) && !empty($data['SectionText9'])) { ?>
                            <div class="accordion-item" style="margin-bottom: 0px;">
                              <h2 class="accordion-header" id="panelsStayOpen-headingTwo">
                                <button class="accordion-button <?php if($data['SectionVisible9']=='Closed') echo 'collapsed' ?>" type="button" data-bs-toggle="collapse" data-bs-target="#<?= substr($data['SectionTitle9'],0,3) ?>" aria-expanded="true" aria-controls="<?= substr($data['SectionTitle9'],0,3) ?>">
                                    <?= $data['SectionTitle9']; ?>
                                </button>
                              </h2>
                              <div id="<?= substr($data['SectionTitle9'],0,3) ?>" class="accordion-collapse collapse <?php if($data['SectionVisible9']=='Open') echo 'show' ?>" aria-labelledby="panelsStayOpen-headingTwo">
                                <div class="accordion-body">
                                <?php 
                                
                                $pattern = '/[video]/';
                                if(preg_match($pattern, $data['SectionText9'], $matches)){
                                  $regex = "#[\s*?video\b[^\]]*](.*?)[/video\b[^\]]*]#s";
                                  $code = preg_match($regex, $data['SectionText9'], $matches9);
                                  $matches9 = substr($matches9[1], strpos($matches9[1],'v')+2);
                                 $str9 = str_replace(array('[video]', '[/video]'), array('<iframe width="820" height="515" src=https://www.youtube.com/embed/'."$matches9".' title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>', '</iframe>'), $data['SectionText9']);
                                  }  ?>
                                    <p><?= $str9; ?></p>                                
                                </div>
                              </div>
                            </div>
                            <?php } ?>

                            <?php if(!empty($data['SectionTitle10']) && !empty($data['SectionText10'])) { ?>
                            <div class="accordion-item" style="margin-bottom: 0px;">
                              <h2 class="accordion-header" id="panelsStayOpen-headingTwo">
                                <button class="accordion-button <?php if($data['SectionVisible10']=='Closed') echo 'collapsed' ?>" type="button" data-bs-toggle="collapse" data-bs-target="#<?= substr($data['SectionTitle10'],0,3) ?>" aria-expanded="true" aria-controls="<?= substr($data['SectionTitle10'],0,3) ?>">
                                    <?= $data['SectionTitle10']; ?>
                                </button>
                              </h2>
                              <div id="<?= substr($data['SectionTitle10'],0,3) ?>" class="accordion-collapse collapse <?php if($data['SectionVisible10']=='Open') echo 'show' ?>" aria-labelledby="panelsStayOpen-headingTwo">
                                <div class="accordion-body">
                                <?php 
                                
                                $pattern = '/[video]/';
                                if(preg_match($pattern, $data['SectionText10'], $matches)){
                                  $regex = "#[\s*?video\b[^\]]*](.*?)[/video\b[^\]]*]#s";
                                  $code = preg_match($regex, $data['SectionText10'], $matches10);
                                  $matches10 = substr($matches10[1], strpos($matches10[1],'v')+2);
                                 $str10 = str_replace(array('[video]', '[/video]'), array('<iframe width="820" height="515" src=https://www.youtube.com/embed/'."$matches10".' title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>', '</iframe>'), $data['SectionText10']);
                                  }  ?>
                                    <p><?= $stsr10; ?></p>                                
                                </div>
                              </div>
                            </div>
                            <?php } ?>

                            <?php if(!empty($data['SectionTitle11']) && !empty($data['SectionText11'])) { ?>
                            <div class="accordion-item" style="margin-bottom: 0px;">
                              <h2 class="accordion-header" id="panelsStayOpen-headingTwo">
                                <button class="accordion-button <?php if($data['SectionVisible11']=='Closed') echo 'collapsed' ?>" type="button" data-bs-toggle="collapse" data-bs-target="#<?= substr($data['SectionTitle11'],0,3) ?>" aria-expanded="true" aria-controls="<?= substr($data['SectionTitle11'],0,3) ?>">
                                    <?= $data['SectionTitle11']; ?>
                                </button>
                              </h2>
                              <div id="<?= substr($data['SectionTitle11'],0,3) ?>" class="accordion-collapse collapse <?php if($data['SectionVisible11']=='Open') echo 'show' ?>" aria-labelledby="panelsStayOpen-headingTwo">
                                <div class="accordion-body">
                                <?php 
                                
                                $pattern = '/[video]/';
                                if(preg_match($pattern, $data['SectionText11'], $matches)){
                                  $regex = "#[\s*?video\b[^\]]*](.*?)[/video\b[^\]]*]#s";
                                  $code = preg_match($regex, $data['SectionText11'], $matches11);
                                  $matches11 = substr($matches11[1], strpos($matches11[1],'v')+2);
                                 $str11 = str_replace(array('[video]', '[/video]'), array('<iframe width="820" height="515" src=https://www.youtube.com/embed/'."$matches11".' title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>', '</iframe>'), $data['SectionText11']);
                                  }  ?>
                                    <p><?= $str11; ?></p>                                
                                </div>
                              </div>
                            </div>
                            <?php } ?>

                            <?php if(!empty($data['SectionTitle12']) && !empty($data['SectionText12'])) { ?>
                            <div class="accordion-item" style="margin-bottom: 0px;">
                              <h2 class="accordion-header" id="panelsStayOpen-headingTwo">
                                <button class="accordion-button <?php if($data['SectionVisible12']=='Closed') echo 'collapsed' ?>" type="button" data-bs-toggle="collapse" data-bs-target="#<?= substr($data['SectionTitle12'],0,3) ?>" aria-expanded="true" aria-controls="<?= substr($data['SectionTitle12'],0,3) ?>">
                                    <?= $data['SectionTitle12']; ?>
                                </button>
                              </h2>
                              <div id="<?= substr($data['SectionTitle12'],0,3) ?>" class="accordion-collapse collapse <?php if($data['SectionVisible12']=='Open') echo 'show' ?>" aria-labelledby="panelsStayOpen-headingTwo">
                                <div class="accordion-body">
                                <?php 
                                
                                $pattern = '/[video]/';
                                if(preg_match($pattern, $data['SectionText12'], $matches)){
                                  $regex = "#[\s*?video\b[^\]]*](.*?)[/video\b[^\]]*]#s";
                                  $code = preg_match($regex, $data['SectionText12'], $matches12);
                                  $matches12 = substr($matches12[1], strpos($matches12[1],'v')+2);
                                 $str12 = str_replace(array('[video]', '[/video]'), array('<iframe width="820" height="515" src=https://www.youtube.com/embed/'."$matches12".' title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>', '</iframe>'), $data['SectionText12']);
                                  }  ?>
                                    <p><?= $str12; ?></p>                                
                                </div>
                              </div>
                            </div>
                            <?php } ?>

                            <?php if(!empty($data['SectionTitle13']) && !empty($data['SectionText13'])) { ?>
                            <div class="accordion-item" style="margin-bottom: 0px;">
                              <h2 class="accordion-header" id="panelsStayOpen-headingTwo">
                                <button class="accordion-button <?php if($data['SectionVisible13']=='Closed') echo 'collapsed' ?>" type="button" data-bs-toggle="collapse" data-bs-target="#<?= substr($data['SectionTitle13'],0,3) ?>" aria-expanded="true" aria-controls="<?= substr($data['SectionTitle13'],0,3) ?>">
                                    <?= $data['SectionTitle13']; ?>
                                </button>
                              </h2>
                              <div id="<?= substr($data['SectionTitle13'],0,3) ?>" class="accordion-collapse collapse <?php if($data['SectionVisible13']=='Open') echo 'show' ?>" aria-labelledby="panelsStayOpen-headingTwo">
                                <div class="accordion-body">
                                <?php 
                                
                                $pattern = '/[video]/';
                                if(preg_match($pattern, $data['SectionText13'], $matches)){
                                  $regex = "#[\s*?video\b[^\]]*](.*?)[/video\b[^\]]*]#s";
                                  $code = preg_match($regex, $data['SectionText13'], $matches13);
                                  $matches13 = substr($matches13[1], strpos($matches13[1],'v')+2);
                                 $str13 = str_replace(array('[video]', '[/video]'), array('<iframe width="820" height="515" src=https://www.youtube.com/embed/'."$matches13".' title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>', '</iframe>'), $data['SectionText13']);
                                  }  ?>
                                    <p><?= $str13; ?></p>                                
                                </div>
                              </div>
                            </div>
                            <?php } ?>

                            <?php if(!empty($data['SectionTitle14']) && !empty($data['SectionText14'])) { ?>
                            <div class="accordion-item" style="margin-bottom: 0px;">
                              <h2 class="accordion-header" id="panelsStayOpen-headingTwo">
                                <button class="accordion-button <?php if($data['SectionVisible14']=='Closed') echo 'collapsed' ?>" type="button" data-bs-toggle="collapse" data-bs-target="#<?= substr($data['SectionTitle14'],0,3) ?>" aria-expanded="true" aria-controls="<?= substr($data['SectionTitle14'],0,3) ?>">
                                    <?= $data['SectionTitle14']; ?>
                                </button>
                              </h2>
                              <div id="<?= substr($data['SectionTitle14'],0,3) ?>" class="accordion-collapse collapse <?php if($data['SectionVisible14']=='Open') echo 'show' ?>" aria-labelledby="panelsStayOpen-headingTwo">
                                <div class="accordion-body">
                                <?php 
                                
                                $pattern = '/[video]/';
                                if(preg_match($pattern, $data['SectionText14'], $matches)){
                                  $regex = "#[\s*?video\b[^\]]*](.*?)[/video\b[^\]]*]#s";
                                  $code = preg_match($regex, $data['SectionText14'], $matches14);
                                  $matches14 = substr($matches14[1], strpos($matches14[1],'v')+2);
                                 $str14 = str_replace(array('[video]', '[/video]'), array('<iframe width="820" height="515" src=https://www.youtube.com/embed/'."$matches14".' title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>', '</iframe>'), $data['SectionText14']);
                                  }  ?>
                                    <p><?= $str14; ?></p>                                
                                </div>
                              </div>
                            </div>
                            <?php } ?>

                            <?php if(!empty($data['SectionTitle15']) && !empty($data['SectionText15'])) { ?>
                            <div class="accordion-item" style="margin-bottom: 0px;">
                              <h2 class="accordion-header" id="panelsStayOpen-headingTwo">
                                <button class="accordion-button <?php if($data['SectionVisible15']=='Closed') echo 'collapsed' ?>" type="button" data-bs-toggle="collapse" data-bs-target="#<?= substr($data['SectionTitle15'],0,3) ?>" aria-expanded="true" aria-controls="<?= substr($data['SectionTitle15'],0,3) ?>">
                                    <?= $data['SectionTitle15']; ?>
                                </button>
                              </h2>
                              <div id="<?= substr($data['SectionTitle15'],0,3) ?>" class="accordion-collapse collapse <?php if($data['SectionVisible15']=='Open') echo 'show' ?>" aria-labelledby="panelsStayOpen-headingTwo">
                                <div class="accordion-body">
                                <?php 
                                
                                $pattern = '/[video]/';
                                if(preg_match($pattern, $data['SectionText15'], $matches)){
                                  $regex = "#[\s*?video\b[^\]]*](.*?)[/video\b[^\]]*]#s";
                                  $code = preg_match($regex, $data['SectionText15'], $matches15);
                                  $matches15 = substr($matches15[1], strpos($matches15[1],'v')+2);
                                 $str15 = str_replace(array('[video]', '[/video]'), array('<iframe width="820" height="515" src=https://www.youtube.com/embed/'."$matches15".' title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>', '</iframe>'), $data['SectionText15']);
                                  }  ?>
                                    <p><?= $str15; ?></p>                              
                                </div>
                              </div>
                            </div>
                            <?php } ?>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </section>
    <!-- faq sectione -->

</body>
</html>
    



