<?php
include_once("include/main.inc.php");
$homepage=mysqli_query($dbconn,"select * from static_pages where pageID='1'");
$home_res=mysqli_fetch_array($homepage);
@extract($_REQUEST);
$admin_detail=mysqli_query($dbconn,"select * from admin_details");
$admin_res=mysqli_fetch_array($admin_detail);
$pg= "home";
$ca_nam1=$_REQUEST['cid'];
$ca_nam1=ucwords(str_replace("-"," ",$cid));
$loc_sql = mysqli_query($dbconn,"SELECT * FROM location_tbl where locationName='$ca_nam1'");
$location = mysqli_fetch_array($loc_sql);
$location_id = $location['parentID']; 
$home_sub_specific=mysqli_query($dbconn,"select * from location_content_tbl where category_id='0' AND location_id='0'");
$home_sub_general=mysqli_query($dbconn,"select * from location_content_tbl where category_id='0' AND location_id='0'");
$content_count = mysqli_num_rows($home_sub_specific);
if($content_count>0){
$homesubdomain=mysqli_fetch_array($home_sub_specific);
$page_metatitle = str_replace('hotkeyword1',$homesubdomain[keyword1],str_replace('hotkeyword2', $homesubdomain[keyword2], str_replace('{location}', $ca_nam1, $homesubdomain['meta_title'])));

$page_metakey = str_replace('hotkeyword1',$homesubdomain[keyword1],str_replace('hotkeyword2', $homesubdomain[keyword2], str_replace('{location}', $ca_nam1, $homesubdomain['meta_keyword'])));

$page_metadesc = str_replace('hotkeyword1',$homesubdomain[keyword1],str_replace('hotkeyword2', $homesubdomain[keyword2],str_replace('companyname', $admin_res[companyName], str_replace('phone', $admin_res[phone], str_replace('{location}', $ca_nam1, $homesubdomain['meta_description'])))));
//    content
$page_contentdesc=$homesubdomain['description'];
$page_short_desc=$homesubdomain['short_description'];
$h1 = explode(',',$page_metatitle);
//    specific location content
}else{
$homesubdomain=mysql_fetch_array($home_sub_general);
$page_metatitle=$homesubdomain['meta_title'];
$page_metakey=$homesubdomain['meta_keyword'];
$page_metadesc=$homesubdomain['meta_description'];
$page_contentdesc=$homesubdomain['description'];
$page_short_desc=$homesubdomain['short_description'];
//    general content
}
$page_desc = str_replace('{location}',$ca_nam1, $page_contentdesc);
$page_short_desc = str_replace('{location}',$ca_nam1, $page_short_desc);
if(mysqli_num_rows($loc_sql) > 0)
{
}else 
    {
	header("Location: https://www.sunshinefertility.com");
exit;
}
?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <?php if($page_metatitle){ ?>
    <title><?php echo $page_metatitle; ?></title>
    <meta name="description" content="<?php echo $page_metadesc; ?>" >
    <meta name="keywords" content="<?php echo $page_metakey; ?>" >
    
    <?php } else{
    ?>
    <title>Welcome Sunshine Fertility</title>
    <meta name="description" content="Welcome Sunshine Fertility" >
    <meta name="keywords" content="Welcome Sunshine Fertility" >
  
    <?php
} ?>
    <?php include "app_top.php"; ?>
</head>

<body>
    <?php include "app_header_sub.php"; ?>

    <div class="home_slider">
        <div id="slider" class="owl-carousel">
            <?php $sql_banner=mysqli_query($dbconn,"Select * from banner_tbl where status='Y' ORDER BY bannerorder");
        while($result_banner=mysqli_fetch_array($sql_banner)){
            $link =  $result_banner['bannerUrl']!=null ? $result_banner['bannerUrl'] : "javascript:void(0);" ;
            ?>
            <div class="slide"><a href="<?=$link;?>" title="<?=$result_banner['personName'];?> in <?=$ca_nam1?>"><img src="<?=site_url();?>/uploaded-files/banner-image/<?=$result_banner['bannerImage'];?>" alt="<?=$result_banner['personName'];?> in <?=$ca_nam1?>" title="<?=$result_banner['personName'];?> in <?=$ca_nam1?>"></a></div>
            <?php  } ?>
        </div>
    </div>




    <!-- Features -->
    <section class="w-p-s-home-feture">
        <div class="container">
            <div class="row">
                <div class="col-xxl-12 col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                    <div id="offers" class="offers owl-carousel">

                        <div class="item">
                            <h1 class="offerhead"><?=$h1[0]?></h1>
                            <a href="javascript:void(0);" data-bs-toggle="modal" data-bs-target="#myModal" class="viewbt">Book an Appointment</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <?php $services = mysqli_query($dbconn,"select * from category_tbl where parentID='1' and status='Y' order by catOrder limit 3" ); 
    if(mysqli_num_rows($services)){?>
    <!-- Home Collection -->
    <section class="home_featured">
        <div class="container">
            <h2 class="title_2">IVF TREATMENT SERVICES IN <?=$ca_nam1?> </h2>
            <div class="clearfix"></div>
            <div class="row">
                <div class="col-xxl-12 col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                    <div id="featuredProducts" class="wps_featured owl-carousel">
                        <?php  while($services_res=mysqli_fetch_array($services)) { 
        $services_image =  getImage($services_res['catImage'], 276, 276, $services_res['catName'],"/uploaded-files/category/images/");
         $id = $services_res['catID'];
        if($content_count > 0)
        {
            $home_service_specific = mysqli_query($dbconn,"select * from location_content_tbl where category_id='$id' AND location_id='0'");
            $services_cat =mysqli_fetch_array($home_service_specific);
            $shortcontent = str_replace('{location}',$ca_nam1, $services_cat['short_description']);
        }
            
    ?>
                        <div class="feature_item wow fadeInDown" data-wow-delay=".2s">
                            <div class="item">
                                <a href="<?=site_url;?>/<?=getValidFileName($ca_nam1);?>/<?=getValidFileName($services_res['catName']);?>.htm" title="<?=$services_res['catName']?> in <?=$ca_nam1?>">
                                    <div class="feature_image">
                                        <div class="image">
                                            <img src="<?=$services_image?>" alt="<?=$services_res['catName']?> in <?=$ca_nam1?>" title="<?=$services_res['catName']?> in <?=$ca_nam1?>">
                                        </div>
                                    </div>
                                </a>
                                <div class="feature_sec">
                                    <h2> <a href="<?=site_url;?>/<?=getValidFileName($ca_nam1);?>/<?=getValidFileName($services_res['catName']);?>.htm" title="<?=$services_res['catName']?> in <?=$ca_nam1?>"><?=$services_res['catName']?></a></h2>
                                      <p><?php echo html_entity_decode(substr($shortcontent,0,150));?></p>
                                    <a class="read_more" href="<?=site_url;?>/<?=getValidFileName($ca_nam1);?>/<?=getValidFileName($services_res['catName']);?>.htm" title="Read More">Read More</a>
                                </div>
                            </div>
                        </div>
                        <?php } ?>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <?php } ?>
    <section class="counterSection">
        <div class="container">
        <div class="row">
            <div class="col-xxl-3 col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12" >
                <div class="counterWrapper" id="counter-box">
                    <div class="counterIconBox">
                        <img src="<?=theme_url?>images/experience.png" alt="Years Of Experience" title="Years Of Experience">
                    </div>
                    <p><span  class="counter" data-number="35"></span>+</p>
                    <p>Years Of Experience</p>
                </div>
            </div>
            <div class="col-xxl-3 col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12" >
                <div class="counterWrapper" id="counter-box">
                    <div class="counterIconBox">
                        <img src="<?=theme_url?>images/baby-born.png" alt="Baby Born" title="Baby Born">
                    </div>
                    <p><span  class="counter" data-number="1500"></span>+</p>
                    <p>Baby Born</p>
                </div>
            </div>
            <div class="col-xxl-3 col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12" >
                <div class="counterWrapper" id="counter-box">
                    <div class="counterIconBox">
                        <img src="<?=theme_url?>images/sucess-rate.png" alt="Success Rate" title="Success Rate">
                    </div>
                    <p><span  class="counter" data-number="35"></span>%</p>
                    <p>Success Rate</p>
                </div>
            </div>
            <div class="col-xxl-3 col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12" >
                <div class="counterWrapper" id="counter-box">
                    <div class="counterIconBox">
                        <img src="<?=theme_url?>images/happy-client.png" alt="Happy Couples" title="Happy Couples">
                    </div>
                    <p><span  class="counter" data-number="35"></span>+</p>
                    <p>Happy Couples</p>
                </div>Delhi
            </div>
        </div>
        </div>
    </section>
    <section class="visit_expert">
        <div class="container">
            <h3 class="title_2">Meet Our Expert</h3>
            <div class="clearfix"></div>
            <div class="row">
                <div class="col-xxl-4 col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
                    <div class="expertImageBox">
                        <img src="<?=theme_url?>images/dramitiagarwal.jpg" alt="Dr. Amiti Agrawal" title="Dr. Amiti Agrawal">
                    </div>
                </div>
                <div class="col-xxl-8 col-xl-8 col-lg-8 col-md-8 col-sm-12 col-12">
                    <div class="expertdicription">
                        <h3>Dr. Amiti Agrawal <span>Medical Director & IVF Consultant, Endoscopic Surgeon & Gynaecologist</span></h3>
                        <span>M.S(OBG), F.M.I.S., F.R.M., M.R.M.(LONDON)</span>
                        <p>The most significant decision in couples life is to take the big step forward & embark upon the journey of parenthood.</p>
                        <p>Not everyone has an easy journey to attain parenthood but with the advancement in technology and a crystal clear roadmap of treatment every couple can now fulfill their dream of completing a family. it is a dream to see your heart strolling outside your body. and we at SUNSHINE FERTILITY pledge to walk you step by step through that journey to make your dream a reality.</p>
                        <a class="read_more" href="<?=site_url?>/dr-amiti-agarwal.htm" title="Read More Service">Know More</a>

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

    <section class="whychooseus_Section">
        <div class="container">            
            <h3 class="title_2">Make a Smart Choice For IVF Treatment with us</h3>
            <div class="clearfix"></div>
        <div class="row">
            <div class="col-xxl-3 col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12" >
                <div class="chooseUsWrapper">
                    <img src="<?=theme_url?>images/Advanced-Pregnancy-Tests.png" alt="quality" title="quality">
                    <p>Advanced Pregnancy Tests</p>
                    <span>We ensure to bring rapid and easy convenient pregnancy results within a few minutes.</span>
                </div>
            </div>
            <div class="col-xxl-3 col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12" >
                <div class="chooseUsWrapper">
                    <img src="<?=theme_url?>images/Best-Fertility-Counselling.png" alt="quality" title="quality">
                    <p>Best Fertility Counselling</p>
                    <span>Our clinic provides personalized sessions for every couple to help them build a holistic approach toward life.</span>
                </div>
            </div>
            <div class="col-xxl-3 col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12" >
                <div class="chooseUsWrapper">
                    <img src="<?=theme_url?>images/Latest-infrastructure.png" alt="quality" title="quality">
                    <p>Latest infrastructure</p>
                    <span>Our laboratories are fully equipped with a modern and advanced set of technology that helps to assure a high-quality success rate.</span>
                </div>
            </div>
            <div class="col-xxl-3 col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12" >
                <div class="chooseUsWrapper">
                    <img src="<?=theme_url?>images/Committed-to-excellence.png" alt="quality" title="quality">
                    <p>Committed to excellence</p>
                    <span>Our commitment toward excellence is to ensure the path of innovation to drive the required result of conceiving a baby.</span>
                </div>
            </div>
        </div>
        </div>
    </section>
    <section class="work-exp-area pb-130 gray-bg">
        <div class="container">
            <div class="row">
                <div class="col-xxl-12 col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                    <div class="work-content">
                        <div class="work-item wow fadeInLeft" data-wow-delay=".3s">

                            <h3 class="title_3">Most Trusted Fertility Clinic in <?=$ca_nam1?></h3>
                            <div class="home_right">
                                <img src="<?=theme_url?>images/sunshine.jpg" alt="Sunshine Fertility and IVF Center" title="Sunshine Fertility and IVF Center">
                            </div>
                            <?=$page_desc;?>
                            <a class="read_more" href="<?=site_url?>/about-us.htm" title="Read More">Read More</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <section class="wps_why_us">
        <div class="container">
            <h3 class="title_2">Why Choose Us</h3>
            <div class="clearfix"></div>
            <div class="row">
                <div class="col-xxl-3 col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12 wow fadeInLeft" data-wow-delay=".6s">
                    <div class="ctpbox">
                        <div class="ctpcount">
                            <img src="<?=theme_url?>images/quality.png" alt="Advanced Pregnancy Tests" title="Advanced Pregnancy Tests">
                        </div>
                        <div class="texti">
                        Advanced Pregnancy Tests
                        </div>
                        <div class="clear"></div>
                    </div>
                </div>
                <!-- close -->

                <div class="col-xxl-3 col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12 wow fadeInLeft" data-wow-delay=".5s">
                    <div class="ctpbox">
                        <div class="ctpcount">
                            <img src="<?=theme_url?>images/satisfied.png" alt="Doctors with Certification" title="Doctors with Certification">
                        </div>
                        <div class="texti">
                        Doctors with Certification
                        </div>
                        <div class="clear"></div>
                    </div>
                </div>
                <!-- close -->


                <div class="col-xxl-3 col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12 wow fadeInLeft" data-wow-delay=".4s">
                    <div class="ctpbox">
                        <div class="ctpcount">
                            <img src="<?=theme_url?>images/affordable.png" alt="Latest Infrastructure" title="Latest Infrastructure">
                        </div>
                        <div class="texti">
                        Latest Infrastructure
                        </div>
                        <div class="clear"></div>
                    </div>
                </div>
                <!-- close -->

                <div class="col-xxl-3 col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12 wow fadeInLeft" data-wow-delay=".3s">
                    <div class="ctpbox">
                        <div class="ctpcount">
                            <img src="<?=theme_url?>images/specialist.png" alt="Committed to Excellence" title="Committed to Excellence">
                        </div>
                        <div class="texti">
                        Committed to Excellence
                        </div>
                        <div class="clear"></div>
                    </div>
                </div>
                <!-- close -->

            </div>
        </div>
    </section>
     <?php $tservices = mysqli_query($dbconn,"select * from category_tbl where parentID='1' and status='Y' order by catOrder limit 3,8" ); 
    if(mysqli_num_rows($tservices)){?>
    <!-- Home Featured -->
    <section class="webpulse_home_product">
        <div class="container">

            <h3 class="title_2">Best Treatment Service</h3>
            <div class="clearfix"></div>
            <div class="row">
                <?php  while($tservices_res=mysqli_fetch_array($tservices)) { 
        $tservices_image =  getImage($tservices_res['catImage'], 276, 276, $tservices_res['catName'],"/uploaded-files/category/images/")
    ?>
                <div class="col-xxl-3 col-xl-3 col-lg-3 col-md-4 col-sm-6 col-12">
                    <div class="feature_item_1">
                        <a href="<?=site_url;?>/<?=getValidFileName($ca_nam1);?>/<?=getValidFileName($tservices_res['catName']);?>.htm" title="<?=$tservices_res['catName']?> in <?=$ca_nam1?>">
                            <div class="feature_image">
                                <div class="image">
                                    <img src="<?=$tservices_image?>" alt="<?=$tservices_res['catName']?> in <?=$ca_nam1?>" title="<?=$tservices_res['catName']?> in <?=$ca_nam1?>">
                                </div>
                            </div>
                        </a>
                        <div class="feature_sec">
                            <h3><a href="<?=site_url;?>/<?=getValidFileName($ca_nam1);?>/<?=getValidFileName($tservices_res['catName']);?>.htm" title="<?=$tservices_res['catName']?> in <?=$ca_nam1?>"><?=$tservices_res['catName']?></a></h3>
                            <a class="read_more" href="<?=site_url;?>/<?=getValidFileName($ca_nam1);?>/<?=getValidFileName($tservices_res['catName']);?>.htm" title="Read More">Read More</a>
                        </div>
                    </div>
                </div>
                <?php }?>
            </div>
            <div class="text-center">
                <a class="read_more bg_1" href="<?=site_url?>/<?=getValidFileName($ca_nam1);?>/our-services.htm" title="View All Services">View All Services</a>
            </div>
        </div>
    </section>

    <?php  } ?>

    <?php 
$sql_blog=mysqli_query($dbconn,"select * from blog_tbl limit 2"); 
if(mysqli_num_rows($sql_blog)>0)   {                 
    ?>
    <!-- Home Blog -->
    <section class="webpulse-home_blog">
        <div class="container">
            <div class="row">
                <div class="col-xxl-8 col-xl-8 col-lg-8 col-md-8 col-sm-8 col-12">
                    <h3 class="wow fadeInDown" data-wow-delay=".1s">Latest <span>News</span></h3>
                    <div class="clearfix"></div>
                    <div id="blogs" class="h_blog owl-carousel">
                        <?php 
            while($res_blog=mysqli_fetch_array($sql_blog)) { 
    $blogimg = getImage($res_blog['catImage'], 358, 237, $res_blog['catName'],"/uploaded-files/blog/images/")
    ?>
                        <div class="item wow fadeInDown" data-wow-delay=".2s">
                            <div class="blog_b">
                                <div class="blogdate">
                                    <?=date('M',strtotime($res_blog['blogDate']))?> <?=date('d',strtotime($res_blog['blogDate']))?><br><span><?=date('Y',strtotime($res_blog['blogDate']))?></span>
                                </div>
                                <div class="blogbox">
                                    <img src="<?=$blogimg?>" alt="<?=$res_blog['blogDname']?>" title="<?=$res_blog['blogDname']?>">
                                </div>
                                <div class="bloghead"><a href="<?=site_url;?>/blog/<?=getValidFileName($res_blog['catName']);?>.htm" title="<?=$res_blog['catName']?>"><?=$res_blog['blogDname']?></a></div>
                                <p><?=substr($res_blog['pageshortDescription'],0,100)?> ...</p>
                            </div>
                        </div>
                        <?php  } ?>
                    </div>
                </div>
                <div class="col-xxl-4 col-xl-4 col-lg-4 col-md-8 col-sm-4 col-12 wow fadeInRight" data-wow-delay=".2s">
                    <div class="video_section">
                        <h3 class="wow fadeInDown" data-wow-delay=".1s">Our Corporate <span>Video</span></h3>

                        <iframe src="https://www.youtube.com/embed/<?=$admin_res['company_video']?>?controls=0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

                    </div>
                </div>

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

    <?php  }?>

    <?php include "app_testimonials_faq.php";?>
    <?php include "app_footer_sub.php";?>
    <?php include "app_bottom.php"; ?>
</body>

</html>
