<?php
  $getPostAsk->execute(array(
    'seo_url'    => $_GET["seo_url"],
    'post_type'  => 'post_projects'
  ));
  $projectDataCheck=$getPostAsk->fetch(PDO::FETCH_ASSOC);

  $projectDetailAsk=$db->prepare("SELECT * FROM projects WHERE project_post_id={$projectDataCheck['post_id']}");
  $projectDetailAsk->execute();
  $projectDetailCheck=$projectDetailAsk->fetch(PDO::FETCH_ASSOC);
?>
   <div class="tp-page-title-area pt-180 pb-185 position-relative fix" data-background="<?php echo $projectDataCheck['banner']; ?>">
            <div class="tp-custom-container">
                <div class="row">
                    <div class="col-12">
                        <div class="tp-page-title z-index">
                            <h2 class="breadcrumb-title"><?php echo $projectDataCheck['title']; ?></h2>
                            <div class="breadcrumb-menu">
                                <nav class="breadcrumb-trail breadcrumbs">
                                    <ul class="trail-items">
                                      <li><a href="<?php echo $generalSettingCheck['site_url']; ?>"><?php echo $langArray['LINK_HOME']; ?></a></li>
        <?php if ($projectDataCheck['post_type'] == 'post_projects') { ?>
           <li class="trail-item trail-begin"><a href="<?php echo $generalSettingCheck['site_url'] . $langArray['LINK_PROJECT_LINK']; ?>"><?php echo $langArray['LINK_PROJECT']; ?></a></li>
           <?php } ?>
           <?php
             if ($projectDataCheck['categories'] > 0) {
               $topCategoriesAsk=$db->prepare("SELECT * FROM categories WHERE categories_id=:categories_id");
               $topCategoriesAsk->execute(array(
                 'categories_id' => $projectDataCheck['categories']
               ));
               $topCategoriesCheck=$topCategoriesAsk->fetch(PDO::FETCH_ASSOC);
           ?>
           <li class="trail-item trail-begin"><a href="<?php echo $topCategoriesCheck['seo_url']; ?>"><?php echo $topCategoriesCheck['title']; ?></a></li>
           <?php } ?>
                                        
                                        <li class="trail-item trail-end"><span><?php echo $projectDataCheck['title']; ?></span></li>
                                    </ul>
                                </nav>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    
        <section class="tp-services-details-area pt-120 pb-115">
            <div class="container">
                <div class="row">
                    <div class="col-xl-3 col-lg-4">
                        <div class="tp-faqs-left">
                            <div class="tp-faqs-left-sidebar mb-30">
                                <h4 class="tp-faqs-left-sidebar-title"><?php echo $langArray['ABOUT_THE_PROJECT']; ?></h4>
                                <ul><?php if ($projectDetailCheck['start_date']){?>
                                    <li><?php echo $langArray['STARTING_DATE']; ?> : <span><?php echo $projectDetailCheck['start_date']; ?></span></li><?php } ?>
                                     <?php if ($projectDetailCheck['end_date']){?>
                                    <li><?php echo $langArray['DUE_DATE']; ?> : <span><?php echo $projectDetailCheck['end_date']; ?>1</span></li><?php } ?>
                                     <?php if ($projectDetailCheck['website']){?>
                                    <li><?php echo $langArray['PROJECT_WEBSITE']; ?> : <span> <a target="_blank" rel="nofollow" href="http://<?php echo $projectDetailCheck['website']; ?>"><?php echo $projectDetailCheck['website']; ?></a></span></li><?php } ?>
                                    <li><?php echo $langArray['PROJECT_TAG']; ?> : <span><?php echo $projectDataCheck['seo_keywords']; ?></span></li>
                                </ul>
                            </div>
                           
                        </div>
                    </div>
                    <div class="col-xl-9 col-lg-8">
                        <div class="tp-service-details">
                            <h2 class="tp-section-title heading-color-black translate-y--10 mb-10"><?php echo $projectDataCheck['title']; ?></h2>
                            <p class="mb-30"><?php echo $projectDataCheck['content']; ?></p>
                            <div class="tp-service-details-img mb-30 position-relative">
                                <img src="<?php echo $projectDataCheck['banner']; ?>" alt="<?php echo $projectDataCheck['title']; ?>">
                            </div>
                                 <div class="tp-prjects-area pt-120 pb-120">
            <div class="container">
         
                <div class="row">
                    <div class="col-12">
                        <div class="tp-prjects-tab-content">
                            <div class="tab-content" id="myTabContent">
                                <div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">
                                    <div class="row">
                                       <h3><?php echo $langArray['LINK_GALLERY']; ?></h3>
                                   <?php
            $typeandid = 'project_gallery-'.$projectDataCheck['post_id'];
            $allMediaAsk->execute(array(
              'gallery_type_id'        => $typeandid
            ));
            while ($allTypeCheck=$allMediaAsk->fetch(PDO::FETCH_ASSOC)){
          ?>
                                        <div class="col-lg-6 col-md-6">
                                            <div class="tp-project z-index mb-30">
                                                <div class="tp-project-img">
                                                    <a href="<?php echo $allTypeCheck['media_large']; ?>" data-fancybox="gallery" data-caption="Caption #1">
                                                    <img src="<?php echo $allTypeCheck['media_large']; ?>" alt="" />
                                                            </a>
                                                </div>
                                                <div class="tp-project-text">
                                                    
                                                    <div class="tp-project-text-icon">
                                                        <a href="<?php echo $allTypeCheck['media_large']; ?>" data-fancybox="gallery" data-caption="Caption #1"><i class="fal fa-search"></i></a>
                                                    </div>
                                                </div>
                                            </div>
                                        </div> <?php } ?>
                                    </div>
                                </div>
                            
                                                   
                              </div>
                        </div>
                    </div>
                </div>
            
            </div>
        </div>
                             <?php if ($projectDetailCheck['video']){?>
                            <h3 class="tp-service-details-subtitle mb-20"><?php echo $langArray['PROJECT_VIDEO']; ?></h3>
                         
                             
                            <div class="tp-service-details-img mb-30 position-relative">
                                <img src="<?php echo $projectDataCheck['banner']; ?>" alt="img not found">
                                <div class="tp-service-details-img-overlay">
                                    <div class="tp-service-details-img-overlay-icon">
                                        <a class="venobox" data-autoplay="true" data-vbtype="video" href="https://youtu.be/<?php echo $projectDetailCheck['video']; ?>"><i class="fas fa-play"></i></a>
                                    </div>
                                </div>
                            </div> <?php } ?>
                           <?php if ($projectDetailCheck['maps']){?>
                            <div class="row">
<h3><?php echo $langArray['PROJECT_MAPS']; ?></h3>
                                <div class="col-sm-12">
                                    <div class="tp-service-details-img mb-30">
                                          <iframe src="<?php echo $projectDetailCheck['maps']; ?>" width="100%" height="400" style="border:0;" allowfullscreen="" loading="lazy"></iframe>
                                    </div>
                                </div>
                              
                            </div><?php } ?>
                           
                        </div>
                    </div>
                </div>
            </div>
        </section>
