<?php
    $pid   = isset($_GET['id']) ? $_GET['id'] : '';
    $pbook = isset($_GET['image']) ? $_GET['image'] : '';
if(isset($_POST['submit']))
{
    $subject  = $_POST['subject'];
    $name     = $_POST['name'];
    $email    = $_POST['email'];
    $phone    = $_POST['phone'];
    $location = $_POST['location'];
    $comments = $_POST['comments'];

    $admin_email = "infobhavik4@gmail.com";

    $logo = "https://kitret.com/industrial-enterprise/assets/img/logo.png";

    $message = '
    <html>
    <body style="font-family:Arial;background:#f5f5f5;padding:20px;">

    <table width="700" align="center" cellpadding="0" cellspacing="0" style="background:#ffffff;border-radius:10px;overflow:hidden;">

        <tr>
            <td style="background:#003366;padding:25px;text-align:center;">
                <img src="'.$logo.'" style="max-height:70px;">
                <h2 style="color:#ffffff;margin-top:10px;">
                    New Enquiry Received
                </h2>
            </td>
        </tr>

        <tr>
            <td style="padding:30px;">

                <table width="100%" border="1" cellpadding="10" cellspacing="0" style="border-collapse:collapse;">

                    <tr>
                        <td><strong>Subject</strong></td>
                        <td>'.$subject.'</td>
                    </tr>

                    <tr>
                        <td><strong>Name</strong></td>
                        <td>'.$name.'</td>
                    </tr>

                    <tr>
                        <td><strong>Email</strong></td>
                        <td>'.$email.'</td>
                    </tr>

                    <tr>
                        <td><strong>Phone</strong></td>
                        <td>'.$phone.'</td>
                    </tr>

                    <tr>
                        <td><strong>Location</strong></td>
                        <td>'.$location.'</td>
                    </tr>

                    <tr>
                        <td><strong>Requirement</strong></td>
                        <td>'.$comments.'</td>
                    </tr>

                </table>

            </td>
        </tr>

        <tr>
            <td style="background:#f1f1f1;padding:15px;text-align:center;">
                Industrial Enterprises Website Enquiry
            </td>
        </tr>

    </table>

    </body>
    </html>
    ';

    $headers  = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type:text/html;charset=UTF-8\r\n";
    $headers .= "From: Website Enquiry <Industrial Enterprise>\r\n";
    $headers .= "Reply-To: ".$email."\r\n";

    if(mail($admin_email, "New Website Enquiry - ".$subject, $message, $headers))
    {
        echo "<script>alert('Thank you! Your enquiry has been submitted successfully.');</script>";
    }
    else
    {
        echo "<script>alert('Sorry! Email sending failed.');</script>";
    }
}
?>
<!DOCTYPE html>
<html lang="en">

<head>
    <!-- ========== Meta Tags ========== -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- ========== Page Title ========== -->
    <title>Trusted Engineering & Automation Partner Since 1991 | Industrial Enterprises</title>

    <!-- ========== Favicon Icon ========== -->
    <link rel="shortcut icon" href="assets/img/favicon.png" type="image/x-icon">

    <!-- ========== Start Stylesheet ========== -->
    <link href="assets/css/bootstrap.min.css" rel="stylesheet" />
    <link href="assets/css/font-awesome.min.css" rel="stylesheet" />
    <link href="assets/css/icofont.min.css" rel="stylesheet" />
    <link href="assets/css/themify-icons.css" rel="stylesheet" />
    <link href="assets/css/flaticon-set.css" rel="stylesheet" />
    <link href="assets/css/magnific-popup.css" rel="stylesheet" />
    <link href="assets/css/owl.carousel.min.css" rel="stylesheet" />
    <link href="assets/css/owl.theme.default.min.css" rel="stylesheet" />
    <link href="assets/css/animate.css" rel="stylesheet" />
    <link href="assets/css/bootsnav.css" rel="stylesheet" />
    <link href="style.css" rel="stylesheet">
    <link href="assets/css/responsive.css" rel="stylesheet" />
    <!-- ========== End Stylesheet ========== -->




</head>

<body>

    <!-- Start Header Top
    ============================================= -->
    <div class="top-bar-area bg-dark text-light">
        <div class="container">
            <div class="row align-center">
                <div class="col-lg-3 shape">
                    <ul class="social">
                        <li class="facebook">
                            <a href="#"><i class="fab fa-facebook-f"></i></a>
                        </li>
                        <li class="instagram">
                            <a href="#"><i class="fab fa-instagram"></i></a>
                        </li>
                        <li class="linkedin">
                            <a href="#"><i class="fab fa-linkedin-in"></i></a>
                        </li>
                    </ul>
                </div>
                <div class="col-lg-9 info float-right text-right">
                    <div class="info box">
                        <ul class="list">
                            <li>
                                <i class="fas fa-shield-alt"></i>
                                <b>ISO 9001:2015 | CMFRI CERTIFIED</b>
                            </li>
                            <li>
                                <i class="fas fa-phone"></i>
                               +91 98240 67931
                            </li>
                             <li>
                                <i class="fas fa-envelope-open"></i>
                                sales@industrial-enterprises.com
                            </li>

                        </ul>

                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- End Header Top -->

    <!-- Header
    ============================================= -->
    <header id="home">

        <!-- Start Navigation -->
        <nav class="navbar navbar-default navbar-sticky bootsnav">

            <!-- Start Top Search -->
                <div class="top-search">
                <div class="container">
                <!-- Remove method/get and use onsubmit to handle everything in JS -->
                <form onsubmit="return handleSearch(event)">
                <div class="input-group">
                <span class="input-group-addon"><i class="fa fa-search"></i></span>
                <input type="text" class="form-control" id="searchInput" placeholder="Search">
                <span class="input-group-addon close-search"><i class="fa fa-times"></i></span>
                </div>
                </form>
                </div>
                </div>
            <!-- End Top Search -->

            <div class="container">

                <!-- Start Atribute Navigation -->
                <!-- <div class="attr-nav">
                    <ul>
                        <li class="search"><a href="#"><i class="fa fa-search"></i></a></li>
                    </ul>
                </div> -->
                <!-- End Atribute Navigation -->

                <!-- Start Header Navigation -->
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-menu">
                        <i class="fa fa-bars"></i>
                    </button>
                    <a class="navbar-brand" href="index.html">
                        <img src="assets/img/logo.png" class="logo" alt="Logo">
                    </a>
                </div>
                <!-- End Header Navigation -->

                <!-- Collect the nav links, forms, and other content for toggling -->
               <div class="collapse navbar-collapse" id="navbar-menu">
                    <ul class="nav navbar-nav navbar-right" data-in="#" data-out="#">
                        <li><a href="index.html" class="dropdown-toggle active">Home</a></li>
                        <li><a href="about-us.html" class="dropdown-toggle smooth-menu">About Us</a></li>
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle smooth-menu" data-toggle="dropdown" >Products</a>
                            <ul class="dropdown-menu">
                                <li><a href="robuschi.html" class="dropdown-toggle" data-toggle="dropdown" >Robuschi</a></li>
                                <li><a href="everest.html" class="dropdown-toggle" data-toggle="dropdown" >Everest</a></li>
                                <!-- <li><a href="alfapumps.html" class="dropdown-toggle" data-toggle="dropdown" >Alfa Pumps</a></li> -->
                                <li><a href="nash.html" class="dropdown-toggle" data-toggle="dropdown" >Nash</a></li>
                                 <li><a href="intervalve.html" class="dropdown-toggle" data-toggle="dropdown" >Intervalve</a></li>
                                <li><a href="wilo.html" class="dropdown-toggle" data-toggle="dropdown" >Wilo</a></li>
                            </ul>
                        </li>
                        <li><a href="clients.html" class="dropdown-toggle">CLIENTELE</a></li>
                        <li><a href="download_catalog.html" class="dropdown-toggle">Download Catalogue</a></li>
                        <li>
                            <a href="contact.html">Contact Us</a>
                        </li>
                    </ul>
                </div><!-- /.navbar-collapse -->
            </div>

        </nav>
        <!-- End Navigation -->

    </header>
    <!-- End Header -->

    <!-- Start Breadcrumb
    ============================================= -->
    <div class="breadcrumb-area gradient-bg bg-cover shadow dark text-light text-center" style="background-image: url(assets/img/product-banner.png);">
        <div class="container">
            <div class="row">
                <div class="col-lg-8 offset-lg-2">
                    <h1>Enquiry</h1>
                    <ul class="breadcrumb">
                        <li><a href="index.html"><i class="fas fa-home"></i> Home</a></li>
                        <li class="active">Enquiry</li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <!-- End Breadcrumb -->

    <!-- Start Contact Area
    ============================================= -->
    <div class="contact-area default-padding-erate">
        <div class="container">
            <div class="contact-items">
                <div class="row">

                    <div class="col-lg-8 left-item">
                        <div class="content">
                            <h2>Send a message</h2>
                            <form method="POST">
                                    <div class="row">
                                        <div class="col-lg-12">
                                            <div class="form-group">
                                                <input
                                                    class="form-control"
                                                    id="subject"
                                                    name="subject"
                                                    placeholder="Subject"
                                                    type="text"
                                                    value="<?php echo isset($_GET['id']) ? htmlspecialchars(str_replace('-', ' ', $_GET['id'])) : ''; ?>" required>
                                                <span class="alert-error"></span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                    <div class="col-lg-12">
                                        <div class="form-group">
                                            <input class="form-control" id="name" name="name" placeholder="Name" type="text" required>
                                            <span class="alert-error"></span>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-lg-6">
                                        <div class="form-group">
                                            <input class="form-control" id="email" name="email" placeholder="Email*" type="email" required>
                                            <span class="alert-error"></span>
                                        </div>
                                    </div>
                                    <div class="col-lg-6">
                                        <div class="form-group">
                                            <input class="form-control" id="phone" name="phone" placeholder="Phone" type="text" pattern="[0-9]{10}" required>
                                            <span class="alert-error"></span>
                                        </div>
                                    </div>
                                </div>
<div class="row">
  <div class="col-lg-12">
    <div class="form-group">
      <input class="form-control" id="location" name="location" placeholder="Location" type="text" required>

    </div>
  </div>
</div>
                                <div class="row">
                                    <div class="col-lg-12">
                                        <div class="form-group comments">
                                            <textarea class="form-control" id="comments" name="comments" placeholder="Describe Your Requirement *" required></textarea>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-lg-12">
                                        <button type="submit" name="submit" id="submit" class="erabtn">
                                            Send Message <i class="fa fa-paper-plane"></i>
                                        </button>
                                    </div>
                                </div>
                                <!-- Alert Message -->
                                <div class="col-lg-12 alert-notification">
                                    <div id="message" class="alert-msg"></div>
                                </div>
                            </form>
                        </div>
                    </div>
                    <div class="col-lg-4 left-item">
                        <?php if ($pbook): ?>
                        <img src="<?php echo htmlspecialchars($pbook); ?>" alt="" style="margin-top: 35px;border-radius: 25px;">
                        <?php endif; ?>
                    </div>

                </div>
            </div>
        </div>
    </div>
    <!-- End Contact -->
       <!-- Jumper button -->
  <button class="jumper bouncy" id="jumper" aria-label="Jump to top" title="Jump to top">
    <!-- simple upward arrow SVG -->
    <svg viewBox="0 0 24 24" aria-hidden="true" focusable="false">
      <path fill="currentColor" d="M12 4.5l-7 7 1.4 1.4L11 8.3V20h2V8.3l4.6 4.6L19 11.5z"/>
    </svg>
  </button>
    <!-- Start Footer
    ============================================= -->
    <footer class="bg-dark-era text-light">
        <div class="container">
            <div class="f-items default-padding">
                <div class="row">
                                        <!-- Single Item -->
                    <div class="col-lg-4 col-md-6 single-item">
                        <div class="f-item opening-hours">
                            <img src="assets/img/footer-logo.png" alt="logo" width="200px" height="68px" style="border-radius: 5px;"><br><br>
                            <p>Industrial Enterprises is a growing name delivering high-quality Pumps, Pumping Systems, and FireFighting System.
Known for innovation and reliability, we ensure superior products and trusted customer satisfaction.</p>
                        </div>
                    </div>
                    <!-- End Single Item -->
                    <!-- Single Item -->
                    <div class="col-lg-2 col-md-6 single-item">
                        <div class="f-item link">
                            <h4 class="widget-title">Products</h4>
                            <ul>
                                <li>
                                    <a href="robuschi.html">Robuschi</a>
                                </li>
                                <li>
                                    <a href="wilo.html">Wilo</a>
                                </li>
                                <li>
                                    <a href="nash.html">Nash</a>
                                </li>
                                <li>
                                    <a href="everest.html">Everest</a>
                                </li>

                            </ul>
                        </div>
                    </div>
                    <!-- End Single Item -->
                    <!-- Single Item -->
                    <div class="col-lg-2 col-md-6 single-item">
                        <div class="f-item link">
                            <h4 class="widget-title">Useful Links</h4>
                            <ul>
                                <li>
                                    <a href="about-us.html">About Us</a>
                                </li>
                                <li>
                                    <a href="clients.html">Clientele</a>
                                </li>
                                <li>
                                    <a href="download_catalog.html" target="_blank">Download Catalogue</a>
                                </li>
                                <li>
                                    <a href="contact.html">Contact Us</a>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <!-- End Single Item -->

                    <!-- Single Item -->
                    <div class="col-lg-4 col-md-6 single-item">
                        <div class="f-item contact">
                            <h4 class="widget-title">Contact Us</h4>
                            <p>

                            </p>
                            <ul>
                                <li>
                                    <i class="fas fa-map-marker-alt"></i>
                                    Industrial Enterprises <br>Plot - 96, Phase 1, GIDC Narmada Nagar, Bharuch , Gujarat , India, 392015
                                </li>
                                <li>
                                    <i class="fas fa-envelope-open"></i>
                                    industrialenterprise@gmail.com
                                </li>
                            </ul>
                        </div>
                    </div>
                    <!-- End Single Item -->

                </div>
            </div>
        </div>
        <!-- Fixed Shape -->

        <div class="footer-bottom">
            <div class="container">
                <div class="row">
                    <div class="col-lg-12">
                        <center><p>© Copyright <script type="text/javascript">var d=new Date(); document.write(d.getFullYear())</script>. All Rights Reserved <a target="_blank" href="index.html">Industrial Enterprises</a></p>
                    </div>
                </div>
            </div>
        </div>
        <!-- Start Footer Bottom -->

        <div class="fixed-shape">
            <img src="assets/img/shape/footer-shape.png" alt="Shape">
        </div>
        <!-- End Fixed Shape -->
    </footer>
    <!-- End Footer -->

    <!-- jQuery Frameworks
    ============================================= -->
    <script src="functionality.js"></script>
    <script src="assets/js/jquery.min.js"></script>
<script src="assets/js/popper.min.js"></script>
    <script src="assets/js/bootstrap.min.js"></script>
    <script src="assets/js/jquery.appear.js"></script>
    <script src="assets/js/jquery.easing.min.js"></script>
    <script src="assets/js/jquery.magnific-popup.min.js"></script>
    <script src="assets/js/modernizr.custom.13711.js"></script>
    <script src="assets/js/owl.carousel.min.js"></script>
    <script src="assets/js/wow.min.js"></script>
    <script src="assets/js/progress-bar.min.js"></script>
    <script src="assets/js/isotope.pkgd.min.js"></script>
    <script src="assets/js/imagesloaded.pkgd.min.js"></script>
    <script src="assets/js/count-to.js"></script>
    <script src="assets/js/bootsnav.js"></script>
    <script src="assets/js/main.js"></script>

</body>
</html>