<?php include_once("include/main.inc.php");
$admin_res=getAdminDetails();
@extract($_REQUEST);
if (preg_match('webpulse\.co$/', $_SERVER['HTTP_HOST'], $match)) {
    $match1=$match[1];
    $vanity_url='http://'.$_SERVER['HTTP_HOST'];
}
$pg= "category";
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$ee=explode('/',$actual_link);
$mm=$ee[3];
$ss=explode('.',$mm);
$cc=$ss[0];
$cat=str_replace("-", " ", $cc);
$cats=ucwords($cat);
$cat_s="select * from category_tbl where catName='$cats'";
$cat_q=mysqli_query($dbconn,$cat_s);
$num=mysqli_num_rows($cat_q);
$cat_r=mysqli_fetch_array($cat_q);
$category_id=$cat_r['catID'];
$catn=$cat_r['catName'];

$cat_sql="select * from category_tbl where parentID='$category_id' and status='Y'";


$cat_qry=mysqli_query($dbconn,$cat_sql);

$cccnum=mysqli_num_rows($cat_qry);

$cat_sql1="select * from category_tbl where catID='$category_id'";

$cat_qry1=mysqli_query($dbconn,$cat_sql1);

$cat_res=mysqli_fetch_array($cat_qry1);

$page_metatitle=str_replace('hotkeyword1',$cat_res[keyword1],str_replace('hotkeyword2', $cat_res[keyword2], str_replace('city', $admin_res[city], str_replace('state', $admin_res[state], str_replace('country', $admin_res[country], $cat_res['pageTitle'])))));

$page_metakey = str_replace('hotkeyword1',$cat_res[keyword1],str_replace('hotkeyword2', $cat_res[keyword2], str_replace('city', $admin_res[city], str_replace('hotkeyword3', $admin_res[keyword3], str_replace('country', $admin_res[country], $cat_res['pageKeywords'])))));

$page_metadesc= str_replace('hotkeyword1',$cat_res[keyword1],str_replace('hotkeyword2', $cat_res[keyword2],str_replace('companyname', $admin_res[companyName], str_replace('phone', $admin_res[phone], str_replace('city', $admin_res[city], str_replace('hotkeyword3', $cat_res[keyword3], str_replace('country', $admin_res[country], $cat_res['pageDescription'])))))));
$pageTitles=$cat_res['displayName'];

$disTitles=$cat_res['displayName']; 
$pdes=$cat_res['catDesc'];

$pdes1=$cat_res['catDesc1'];

$parent=$cat_res['parentID'];

$cat_sql2="select * from category_tbl where catID='$parent'";

$cat_qry2=mysqli_query($dbconn,$cat_sql2);

$num2=mysqli_num_rows($cat_qry2);

$cat_res2=mysqli_fetch_array($cat_qry2);

$mparent=$cat_res2['parentID'];

$cat_sql3="select * from category_tbl where catID='$mparent'";

$cat_qry3=mysqli_query($dbconn,$cat_sql3);

$num3=mysqli_num_rows($cat_qry3);

$cat_res3=mysqli_fetch_array($cat_qry3);

$mmparent=$cat_res3['parentID'];

$cat_sql4="select * from category_tbl where catID='$mmparent'";

$cat_qry4=mysqli_query($dbconn,$cat_sql4);

$num4=mysqli_num_rows($cat_qry4);

$cat_res4=mysqli_fetch_array($cat_qry4);
$numsss=mysqli_num_rows($cat_q);
 if($numsss > 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><?=$page_metatitle?></title>
    <meta name="description" content="<?=$page_metadesc?>">
    <meta name="keywords" content="<?=$page_metakey?>">

    <?php
}
?>
    <?php include "app_top.php"; ?>
</head>

<body>

    <?php include "app_header.php"; ?>


    <!-- Heading Banner-->
    <section class="heading_banner" style="background-image: url(<?=theme_url?>images/service-banner.jpg)">
        <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 text-center">
                    <h1 class="cat_title">
                        <?php if($cat_res['parentID'] == '0'){ echo $cat_res[keyword1];}else{ echo $pageTitles;}?></h1>
                    <div class="clearfix"></div>

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

    <!-- Breadcrumb-->
    <div class="inner_breadcrumb hidden_xs">
        <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">
                    <ul class="breadcrumb">
                        <li><a href="<?=site_url;?>" title="Home">Home</a></li>
                        <?php if($num4 > 0) {?>
                        <li><a href="<?=site_url;?>/<?=getValidFileName($cat_res4['catName']);?>.htm"
                                title="<?php echo $cat_res4['catName']; ?> "><?php echo $cat_res4['catName']; ?></a>
                        </li>
                        <?php } ?>
                        <?php if($num3 > 0) {?>
                        <li><a href="<?=site_url;?>/<?=getValidFileName($cat_res3['catName']);?>.htm"
                                title="<?php echo $cat_res3['catName']; ?>"><?php echo $cat_res3['catName']; ?></a></li>
                        <?php } ?>
                        <?php if($num2 > 0) {?>
                        <li><a href="<?=site_url;?>/<?=getValidFileName($cat_res2['catName']);?>.htm"
                                title="<?php echo $cat_res2['catName']; ?>"><?php echo $cat_res2['catName']; ?></a></li>
                        <?php } ?>
                        <li class="active"><?php echo $cat_res['catName'];?></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <?php
if($cat_res['parentID'] == '0')
{?>
    <!-- Home About-->
    <section class="category_page">
        <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="right_side">
                        <h2 class="title_22"><?php echo $cat_res[keyword1]; ?> in Mumbai</h2>
                        <div class="wps_right">
                            <div class="product_right_image">
                                <a href="javascript:void(0);" data-bs-toggle="modal" data-bs-target="#productID"
                                    onclick="$('#catID').val('<?php echo $cat_res['catID']; ?>');
                                 $('#catName').val('<?php echo $cat_res['catName']; ?>');
                                 $('.catName').html('<?php echo $cat_res['catName']; ?>');  $('.catImg').attr('src','<?=site_url;?>/uploaded-files/category/images/<?php echo ($cat_res['catImage']);?>');">

                                    <div class="detail_image">
                                        <img src="<?=site_url;?>/uploaded-files/category/images/<?php echo ($cat_res['catImage']);?>"
                                            alt="<?php echo $cat_res['catName']; ?> in Mumbai"
                                            title="<?php echo $cat_res['catName']; ?> in Mumbai">
                                    </div>
                                    <span class="read_more">Book Consultation</span>
                                </a>
                            </div>
                            <?=html_entity_decode($cat_res['catDesc1']);?>
                            <?php 
$related_s = "select * from category_tbl where parentID='$cat_res[catID]' and status='Y' order by catOrder";
$related_q = mysqli_query($dbconn,$related_s);
if(mysqli_num_rows($related_q)>0){ 
 ?>
                            <div class="you_may">You May Also Like:</div>
                            <?php    
    while($related_res=mysqli_fetch_array($related_q)) {
         $img = getImage($related_res[catImage], 276, 276, $related_res[catName],"/uploaded-files/category/images/");
                ?>
                            <div class="product_listing">
                                <div class="row">
                                    <div class="col-xxl-4 col-xl-4 col-lg-4 col-md-4 col-sm-4 col-12">
                                        <div class="product">
                                            <a href="<?=site_url;?>/<?=getValidFileName($related_res['catName']);?>.htm"
                                                title="<?=$related_res[catName]?> in Mumbai">
                                                <div class="image1">
                                                    <img src="<?=$img?>" alt="<?=$related_res[catName]?> in Mumbai"
                                                        title="<?=$related_res[catName]?> in Mumbai">
                                                </div>
                                            </a>
                                        </div>
                                    </div>
                                    <div class="col-xxl-8 col-xl-8 col-lg-8 col-md-8 col-sm-8 col-12">
                                        <div class="right-content">
                                            <h3><a href="<?=site_url;?>/<?=getValidFileName($related_res['catName']);?>.htm"
                                                    title="<?=$related_res[catName]?> in Mumbai"><?=$related_res[catName]?></a>
                                            </h3>
                                            <div class="blue-line1"></div>
                                            <?=html_entity_decode($related_res['catDesc']);?>
                                            <div class="clearfix"></div>
                                            <a href="<?=site_url;?>/<?=getValidFileName($related_res['catName']);?>.htm"
                                                class="read_more" title="Read More">Read More</a>
                                            <a class="read_more" href="javascript:void(0);" data-bs-toggle="modal"
                                                data-bs-target="#productID" title="Book Consultation"
                                                onclick="$('#catID').val('<?php echo $related_res['catID']; ?>');
                                 $('#catName').val('<?php echo $related_res['catName']; ?>');
                                 $('.catName').html('<?php echo $related_res['catName']; ?>');  $('.catImg').attr('src','<?=site_url;?>/uploaded-files/category/images/<?php echo ($related_res['catImage']);?>');"><i
                                                    class="fa fa-envelope"></i> Book Consultation</a>

                                        </div>
                                    </div>
                                </div>
                            </div>
                            <?php  } } ?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <?php } else { ?>

    <!-- Home About-->
    <section class="category_page">
        <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="right_side">
                        <h2 class="title_22"><?php echo $cat_res['catName']; ?> in Mumbai</h2>
                        <div class="wps_right">
                            <div class="product_right_image">
                                <a href="javascript:void(0);" data-bs-toggle="modal" data-bs-target="#productID"
                                    onclick="$('#catID').val('<?php echo $cat_res['catID']; ?>');
                                 $('#catName').val('<?php echo $cat_res['catName']; ?>');
                                 $('.catName').html('<?php echo $cat_res['catName']; ?>');  $('.catImg').attr('src','<?=site_url;?>/uploaded-files/category/images/<?php echo ($cat_res['catImage']);?>');">

                                    <div class="detail_image">
                                        <img src="<?=site_url;?>/uploaded-files/category/images/<?php echo ($cat_res['catImage']);?>"
                                            alt="<?php echo $cat_res['catName']; ?> in Mumbai"
                                            title="<?php echo $cat_res['catName']; ?> in Mumbai">
                                    </div>
                                    <span class="read_more">Book Consultation</span>
                                </a>
                            </div>
                            <?=html_entity_decode($cat_res['catDesc1']);?>

                            <div class="you_may">You May Also Like:</div>
                            <?php    
$related_sql = "select * from category_tbl where parentID='$cat_res[parentID]' and catID!='$cat_res[catID]' and status='Y' order by catOrder";
$related_sub_q = mysqli_query($dbconn,$related_sql);
 while($related_ress=mysqli_fetch_array($related_sub_q)) {
$img = getImage($related_ress[catImage], 276, 276, $related_ress[catName],"/uploaded-files/category/images/");
                ?>
                            <div class="product_listing">
                                <div class="row">
                                    <div class="col-xxl-4 col-xl-4 col-lg-4 col-md-4 col-sm-4 col-12">
                                        <div class="product">
                                            <a href="<?=site_url;?>/<?=getValidFileName($related_ress['catName']);?>.htm"
                                                title="<?=$related_ress['catName']?> in Mumbai">
                                                <div class="image1">
                                                    <img src="<?=$img?>" alt="<?=$related_ress[catName]?> in Mumbai"
                                                        title="<?=$related_ress[catName]?> in Mumbai">
                                                </div>
                                            </a>
                                        </div>
                                    </div>
                                    <div class="col-xxl-8 col-xl-8 col-lg-8 col-md-8 col-sm-8 col-12">
                                        <div class="right-content">
                                            <h3><a href="<?=site_url;?>/<?=getValidFileName($related_ress['catName']);?>.htm"
                                                    title="<?=$related_ress['catName']?> in Mumbai"><?=$related_ress['catName']?></a>
                                            </h3>
                                            <div class="blue-line1"></div>
                                            <?=html_entity_decode($related_ress['catDesc']);?>
                                            <div class="clearfix"></div>
                                            <a href="<?=site_url;?>/<?=getValidFileName($related_ress['catName']);?>.htm"
                                                class="read_more" title="Read More">Read More</a>
                                            <a class="read_more" href="javascript:void(0);" data-bs-toggle="modal"
                                                data-bs-target="#productID" title="Book Consultation"
                                                onclick="$('#catID').val('<?php echo $related_ress['catID']; ?>');
                                 $('#catName').val('<?php echo $related_ress['catName']; ?>');
                                 $('.catName').html('<?php echo $related_ress['catName']; ?>');  $('.catImg').attr('src','<?=site_url;?>/uploaded-files/category/images/<?php echo ($related_ress['catImage']);?>');"><i
                                                    class="fa fa-envelope"></i> Book Consultation</a>

                                        </div>
                                    </div>
                                </div>
                            </div>
                            <?php  } ?>
                        </div>
                    </div>
                </div>


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


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

</html>