<!DOCTYPE html>
<html lang="en">

<head>
    <?php include("include/meta.php");?>
    <?php include("include/css.php");?>
</head>

<body>
    <?php include("include/preloader.php");?>
    <?php include("include/header.php");?>


    <!-- Banner Carousel Start -->
    <div class="container-fluid p-0">
        <div class="owl-carousel header-carousel position-relative">
            <div class="owl-carousel-item position-relative">
                <img class="img-fluid" src="images/hw.jpg" alt="">
                <div class="position-absolute top-0 start-0 w-100 h-100 d-flex align-items-center"
                    style="background: rgba(53, 53, 53, .7);">
                    <div class="container">
                        <div class="row justify-content-center">
                            <div class="col-12 col-lg-8 text-center">
                                <h5 class="text-white text-uppercase mb-3 animated slideInDown">Welcome To Ayush LPO
                                </h5>
                                <h1 class="display-3 text-white animated slideInDown mb-4">Best Financial Advisory</h1>
                                <p class="fs-5 fw-medium text-white mb-4 pb-2">Ipsum dolor
                                    at sed stet sit diam no. Kasd rebum ipsum et diam justo clita et kasd rebum sea
                                    elitr.</p>
                                <a href="about.php"
                                    class="btn btn-primary py-md-3 px-md-5 me-3 animated slideInLeft">Read
                                    More</a>
                                <a href="contact.php" class="btn btn-light py-md-3 px-md-5 animated slideInRight">Free
                                    Quote</a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="owl-carousel-item position-relative">
                <img class="img-fluid" src="images/hw.jpg" alt="">
                <div class="position-absolute top-0 start-0 w-100 h-100 d-flex align-items-center"
                    style="background: rgba(53, 53, 53, .7);">
                    <div class="container">
                        <div class="row justify-content-center">
                            <div class="col-12 col-lg-8 text-center">
                                <h5 class="text-white text-uppercase mb-3 animated slideInDown">Welcome To Ayush LPO
                                </h5>
                                <h1 class="display-3 text-white animated slideInDown mb-4">Compliance & Filing Services
                                </h1>
                                <p class="fs-5 fw-medium text-white mb-4 pb-2">Ipsum dolor
                                    at sed stet sit diam no. Kasd rebum ipsum et diam justo clita et kasd rebum sea
                                    elitr.</p>
                                <a href="about.php"
                                    class="btn btn-primary py-md-3 px-md-5 me-3 animated slideInLeft">Read
                                    More</a>
                                <a href="contact.php" class="btn btn-light py-md-3 px-md-5 animated slideInRight">Free
                                    Quote</a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="owl-carousel-item position-relative">
                <img class="img-fluid" src="images/hw.jpg" alt="">
                <div class="position-absolute top-0 start-0 w-100 h-100 d-flex align-items-center"
                    style="background: rgba(53, 53, 53, .7);">
                    <div class="container">
                        <div class="row justify-content-center">
                            <div class="col-12 col-lg-8 text-center">
                                <h5 class="text-white text-uppercase mb-3 animated slideInDown">Welcome To Ayush LPO
                                </h5>
                                <h1 class="display-3 text-white animated slideInDown mb-4">Personalized Tax Planning
                                </h1>
                                <p class="fs-5 fw-medium text-white mb-4 pb-2">Ipsum dolor
                                    at sed stet sit diam no. Kasd rebum ipsum et diam justo clita et kasd rebum sea
                                    elitr.</p>
                                <a href="about.php"
                                    class="btn btn-primary py-md-3 px-md-5 me-3 animated slideInLeft">Read
                                    More</a>
                                <a href="contact.php" class="btn btn-light py-md-3 px-md-5 animated slideInRight">Free
                                    Quote</a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- Banner Carousel End -->

    <!-- About Start -->
    <div class="container-fluid overflow-hidden px-lg-0 py-5">
        <div class="container about px-lg-0">
            <div class="row g-0 mx-lg-0">
                <div class="col-lg-7 about-text wow fadeIn" data-wow-delay="0.5s">
                    <div class="p-lg-5 pe-lg-0">
                        <div class="section-title text-start">
                            <h1 class="display-5 mb-4">Welcome to <span style="color:#0184bc;"> AYUSH LPO</span></h1>
                        </div>
                        <p class="mb-4 pb-2" align="justify"> We, at Ayush LPO, an unit of ATFCPL led consortium, have
                            been dedicated to
                            provide services to
                            its clients in various sectors including financial as well as legal aspects which is
                            primarily
                            required for smooth running of the Small and Medium Enterprises as well as other business
                            entity
                            including corporate houses.
                            <br> <br>
                            Our company is managed by professionals like Chartered Accountants, Cost Accountants,
                            Company
                            Secretaries, IT Professionals and Lawyers. It is Professionally Committed to provide
                            dedicated
                            service in a cost effective manner without diluting the quality. Our aim is to establish a
                            personal and long term relationship with each client with a view to tailoring our services
                            to
                            their individual needs. We pride ourselves on our ability to deal in a professional manner
                            and
                            also on a qualitative and timely basis with any assignments we undertake. the glass of some
                            proven parameters we call FRAME.
                        </p>
                        <a href="about.php" class="btn btn-primary py-3 px-5">Read More</a>
                    </div>
                </div>

                <div class="col-lg-5 py-5 ps-lg-0 wow fadeIn" data-wow-delay="0.7s">
                    <div class="notice">
                        <div class="section-title text-center">
                            <h2 class="display-5 text-white pt-2">Latest Notices</h2>
                        </div>
                        <div class="owl-carousel notice-carousel">
                            <?php
                                $notice_sql = "SELECT * FROM blog WHERE bby = '$x' AND bcat = '26' ORDER BY bid DESC ";
                                $notice_run = mysqli_query($con, $notice_sql);
                                while ( $notice_rows = mysqli_fetch_assoc($notice_run) ) {
                                    $bPath = substr($notice_rows['bimage'], 3);
                                    $bPath = "./login/".$bPath;
                            ?>
                            <div class="notice-item p-4 text-center">
                                <img src="<?php echo $bPath;?>" alt="">
                                <a href="notice_total.php?notice_title=<?php echo $notice_rows['bid']; ?>">
                                    <h5 class="mb-0 mt-3 text-white">
                                        <?php echo mb_strimwidth($notice_rows['btitle'], 0, 40, '...'); ?>
                                    </h5>
                                </a>
                            </div>
                            <?php }?>
                        </div>
                        <div class="index-notice-ancor">
                            <a href="notice.php" title="All Notice"><i class="fa fa-arrow-circle-right"></i></a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- About End -->


    <!-- Service Start -->
    <?php
        $cat_run = mysqli_query($con, "SELECT cname, cid FROM category where catby=$x ORDER BY cpositon ASC limit 1");
        while ( $cat_rows = mysqli_fetch_assoc($cat_run) ) {
    ?>
    <div class="container-xxl bg-light py-5">
        <div class="container">
            <div class="section-title text-center">
                <h1 class="display-5 mb-5">Our <span style="color:#0184bc;"> Services</span></h1>
            </div>
            <div class="row g-4">
                <?php
                    $service_sql = "SELECT * FROM blog WHERE bcat = '$cat_rows[cid]' ORDER BY bid ASC LIMIT 6";
                    $service_run = mysqli_query($con, $service_sql);
                    while ( $service_rows = mysqli_fetch_assoc($service_run) ) {
                    $servicePath = substr($service_rows['bimage'], 3);
                    $servicePath = "login/".$servicePath;
                    $serviceTitle = mb_strimwidth($service_rows['btitle'], 0, 80, "...");
                ?>
                <div class="col-md-6 col-lg-4 wow fadeInUp" data-wow-delay="0.1s">
                    <div class="service-item">
                        <div class="overflow-hidden">
                            <img class="img-fluid" src="<?php echo $servicePath;?>" alt="">
                        </div>
                        <div class="p-4 text-center">
                            <h4 class="mb-3"><?php echo $serviceTitle?></h4>
                            <p>
                                <?php
                                $fullBlog = $service_rows["blog"];

                                // Use regex to extract the first <p> block
                                if (preg_match('/<p>(.*?)<\/p>/is', $fullBlog, $matches)) {
                                    $firstParagraph = strip_tags($matches[1]); 

                                    // Limit to 200 characters
                                    $shortText = mb_strimwidth($firstParagraph, 0, 70, '...');
                                    echo $shortText;
                                } else {
                                    // Fallback if no <p> found
                                    echo mb_strimwidth(strip_tags($fullBlog), 0, 70, '...');
                                }
                                ?>
                            </p>
                            <a class="fw-medium"
                                href="article.php?id=<?php echo $service_rows["bid"].$service_rows["btag"];?>/"
                                title='<?php echo $service_rows["btitle"]?>'>Read More<i
                                    class="fa fa-arrow-right ms-2"></i></a>
                        </div>
                    </div>
                </div>
                <?php }?>
                <div class="col-12 text-center wow fadeInUp" data-wow-delay="0.1s">
                    <a href="service.php" class="btn btn-primary py-3 px-5">View All Services <i
                            class="fa fa-arrow-right ms-2"></i></a>
                </div>
            </div>
        </div>
    </div>
    <?php }?>
    <!-- Service End -->

    <!-- Quote Start -->
    <div class="container-fluid overflow-hidden px-lg-0 pt-5">
        <div class="container quote px-lg-0">
            <div class="section-title text-center">
                <h1 class="display-5 mb-4">For More Information Contact</h1>
            </div>
            <div class="row align-items-center pt-5">
                <div class="col-lg-6 ps-lg-0 pb-5">
                    <div class="" style="position: relative;">
                        <div class="contact_info_sec">
                            <h4>Contact Info</h4>
                            <div class="d-flex info_single align-items-center">
                                <a href="tel:<?php echo $h_row['uothcontact']; ?>">
                                    <i class="fas fa-phone-alt"></i>
                                    <span><?php echo $h_row['uothcontact']; ?></span></a>
                            </div>
                            <div class="d-flex info_single align-items-center">
                                <a href="https://api.whatsapp.com/send?phone=91<?php echo $h_row['uwhatsapp']; ?>"><i
                                        class="fab fa-whatsapp"></i><?php echo $h_row['uwhatsapp']; ?></a>
                            </div>
                            <div class="d-flex info_single align-items-center">
                                <a class="" href="mailto:<?php echo $h_row["umail"]; ?>"><i
                                        class="fas fa-envelope-open-text"></i>
                                    <span><?php echo $h_row["umail"]; ?></span></a>
                            </div>
                            <div class="d-flex info_single align-items-center">
                                <i class="fas fa-map-marked-alt"></i>
                                <span><?php echo $h_row['uaddress1']; ?></span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-lg-6 pb-5 quote-text wow fadeIn" data-wow-delay="0.5s">
                    <div class="p-lg-5 me-lg-0 p-3 pt-4" style="border: 2px solid #0184bc;border-radius: 7px;">
                        <h4 class="text-center mb-3" style="color:#0184bc">Contact Us</h4>
                        <form method="POST" action="">
                            <div class="row g-3">
                                <div class="col-12 col-sm-12">
                                    <input type="text" class="form-control form-inp-css" name="name"
                                        placeholder="Your Name">
                                </div>
                                <div class="col-12 col-sm-12">
                                    <input type="email" class="form-control form-inp-css" name="email"
                                        placeholder="Your Email">
                                </div>
                                <div class="col-12 col-sm-12">
                                    <input type="text" class="form-control form-inp-css" name="phone"
                                        placeholder="Your Mobile">
                                </div>
                                <div class="col-12 col-sm-12">
                                    <input type="text" class="form-control form-inp-css" name="subject"
                                        placeholder="Subject">
                                </div>
                                <div class="col-12">
                                    <textarea class="form-control form-inp-css" name="message" placeholder="Message"
                                        style="height: 65px;"></textarea>
                                </div>
                                <div class="col-12">
                                    <div class="row">
                                        <div class="col-8">
                                            <input type="text" name="otp_input" maxlength="4"
                                                class="form-control form-inp-css" placeholder="Enter OTP shown">
                                        </div>
                                        <div class="col-4">
                                            <!-- OTP Row -->
                                            <?php $capcha_code = rand(1000, 9999);?>
                                            <input type="text" class="form-control text-center text-success fw-bold"
                                                name="capcha_code" value="<?php echo $capcha_code; ?>" readonly>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-12">
                                    <button class="btn btn-primary w-100 py-3" name="submit"
                                        type="submit">Submit</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- Quote End -->

    <!-- Client Logos Start -->
    <div class="container-xxl bg-light py-5 wow fadeInUp" data-wow-delay="0.1s">
        <div class="container">
            <div class="section-title text-center">
                <h1 class="display-5 mb-5">Our Clients</h1>
            </div>
            <div class="owl-carousel client-logo-carousel">
                <div class="client-logo-item text-center">
                    <img src="images/placements/agri.jpg" class="img-fluid" alt="Client">
                </div>
                <div class="client-logo-item text-center">
                    <img src="images/placements/BANK.jpg" class="img-fluid" alt="Client">
                </div>
                <div class="client-logo-item text-center">
                    <img src="images/placements/CONSTR.jpg" class="img-fluid" alt="Client">
                </div>
                <div class="client-logo-item text-center">
                    <img src="images/placements/dairy.jpg" class="img-fluid" alt="Client">
                </div>
                <div class="client-logo-item text-center">
                    <img src="images/placements/MANU.jpg" class="img-fluid" alt="Client">
                </div>
                <div class="client-logo-item text-center">
                    <img src="images/placements/FMCG.jpg" class="img-fluid" alt="Client">
                </div>
            </div>
        </div>
    </div>
    <!-- Client Logos End -->


    <?php include("include/footer.php");?>
    <?php include("include/js.php");?>

</body>

</html>

<?php
if (isset($_POST['submit'])) {
	$name = $_POST["name"];
	$email = $_POST["email"];
	$phone = $_POST["phone"];
	$subject = $_POST["subject"]; 
	$userMessage = $_POST["message"];

	$otp_input = $_POST["otp_input"];
	$capcha_code = $_POST["capcha_code"];

    if ($otp_input != $capcha_code) {
    ?>
<script>
alert("Code Mismatch. Please enter the correct code.");
window.location = "<?php echo $_SERVER['PHP_SELF']; ?>";
</script>
<?php
    exit;
}
						
                          
    $conref = $x;
    $concreatedon = date("j F, Y, g:i a");

    $ins_sql = "INSERT INTO contact (conname, conno, consubject, conemail, conmessage, conref, concreatedon) VALUES ( '$name', '$phone', '$subject', '$email', '$userMessage', '$conref', '$concreatedon')";

    // echo "<pre>";print_r($ins_sql);exit();
    if( mysqli_query($con, $ins_sql) ){
	?>
<script>
alert("Details Sent Successfully");
window.location = "<?php echo $_SERVER['PHP_SELF']; ?>";
</script>
<?php
	} else {
	?>
<script>
alert("Something's Wrong");
window.location = "<?php echo $_SERVER['PHP_SELF']; ?>";
</script>
<?php
	}
}
?>