MMCT TEAM
Server IP : 103.53.40.154  /  Your IP : 3.149.24.143
Web Server : Apache
System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : ppcad7no ( 715)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0750) :  /home2/ppcad7no/ginyardpetroleum.in/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home2/ppcad7no/ginyardpetroleum.in/services.php
<?php
include_once('admin/config.php');

if ($_SERVER["REQUEST_METHOD"] === "POST") {
    if (isset($_POST['submit_btn'])) {
        $name = $_POST['name'];
        $phone = $_POST['phone'];
        $email = $_POST['email'];
        $message = $_POST['message'];
        // $subject = $_POST['subject'];
        if (empty($name)) {
            $errors[] = "Name field is required.";
        } elseif (!ctype_alpha(str_replace(' ', '', $name))) {
            $errors[] = "Name can only contain alphabets.";
        }

        if (empty($email)) {
            $errors[] = "Email field is required.";
        }

        if (empty($phone)) {
            $errors[] = "Phone field is required.";
        } elseif (!preg_match('/^\d{10}$/', $phone)) {
            $errors[] = "Phone number should have exactly 10 digits.";
        }
        if (!empty($message)) {
            $message = htmlspecialchars($message); // Sanitize the message input
        }

        if (empty($errors)) {
            $query = "INSERT INTO `tbl_queries` (`name`, `phone`, `email`, `message`) VALUES (?, ?, ?, ?)";
            $stmt = mysqli_prepare($db, $query);
            mysqli_stmt_bind_param($stmt, "ssss", $name, $phone, $email, $message);
            $result = mysqli_stmt_execute($stmt);
            mysqli_stmt_close($stmt);

            if ($result) {
                echo "<script>
                    window.alert('Successfully Sent! We will contact you soon');
                    window.location.href = '$wspath';
                </script>";
            } else {
                echo "Error";
            }
        }
    }
}
?>
<?php
    // include_once('admin/config.php');
    $slug_name = $_GET['slug_url'];
    if(isset($_SERVER['PATH_INFO'])){
    $slug_name=$_SERVER['PATH_INFO'];
    $querydt="SELECT * FROM `tbl_services` WHERE `slug_url`='$slug_name'";
    $rundt = mysqli_query($db,$querydt) or die("Query Not run");
    $datadt = mysqli_fetch_assoc($rundt);
 }
?>
<!DOCTYPE html>
<html dir="ltr" lang="en">

<head>

  <!-- Meta Tags -->
  <meta name="viewport" content="width=device-width,initial-scale=1.0" />
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
  <meta name="description" content="Industrypress - Factory & Industrial Business Template" />

  <title>
    <?php
if (isset($datadt['meta_title']) && !empty($datadt['meta_title'])) {
    echo $datadt["meta_desc"];
} else {
    echo $datadt["meta_desc"];
}
?>
    </title>
    <meta name="description" content="<?php echo $datadt["meta_desc"];?>">

  <?php include 'top-link.php';?>
</head>

<body class="">
<div id="wrapper" class="clearfix">
    
<?php include 'header.php';?>

<section class="inner-header divider parallax layer-overlay overlay-dark-5" data-bg-img="<?php echo $wspath?>images/sl3.jpg">
      <div class="container pt-100 pb-50">
        <!-- Section Content -->
        <div class="section-content pt-100">
          <div class="row"> 
            <div class="col-md-12">
              <h3 class="title text-white"><?php echo $datadt["name"];?></h3>
              <ul class="breadcrumb white">
                <li><a href="<?php echo $wspath?>">Home</a><a> / <?php echo $datadt["m_id"];?></a></li>
                <li class="active"><?php echo $datadt["name"];?></li>
              </ul>
            </div>
          </div>
        </div>
      </div>
    </section>
    
     <!-- Gallery Grid 4 -->
     <section>
      <div class="container">
        <div class="section-content">
          <div class="row">
            <section>
      <div class="container mt-30 mb-30 pt-30 pb-30">
        <div class="row">
          <div class="col-md-8 blog-pull-right">
            <div class="single-service">
              <img style="height: 300px;width: 100%;" class="img-fluid" src="<?php echo $wspath?>admin/images/property-image/<?php echo $datadt["image"];?>" alt="<?php echo $datadt["name"];?>">
              <h4 class="line-bottom text-uppercase mt-30 mb-20">Services Details</h4>
              <!--<p>Crude oil is a naturally occurring, unrefined petroleum product composed of hydrocarbon deposits and other organic materials. A type of fossil fuel, crude oil can be refined to produce usable products such as gasoline, diesel and various forms of petrochemicals.</p>-->
            <?php echo $datadt["desc"];?>
            </div>
            <!--<div class="sub-service">-->
            <!--    <div class="row">-->
            <!--        <div class="col-12">-->
            <!--            <h4 class="line-bottom text-uppercase mt-30 mb-20">Light Crude Oil</h4>-->
                            
            <!--               <p>Light crude oils have  high API gravity >35, they will produce More of the value products such as gasoline, kerosene and diesel.</p>-->
            <!--        </div>-->
            <!--         <div class="col-12">-->
            <!--            <h4 class="line-bottom text-uppercase mt-30 mb-20">Medium Crude Oil</h4>-->
                            
            <!--               <p>Medium crude oils API around 26 to 35 will produce less of the value products.</p>-->
            <!--        </div>-->
            <!--         <div class="col-12">-->
            <!--            <h4 class="line-bottom text-uppercase mt-30 mb-20">Heavy  Crude Oil</h4>-->
                            
            <!--               <p>Heavy crude oils API < 26 produce more  Residual fuel which is Low value compared to gasoline, kerosene and diesel.</p>-->
            <!--        </div>-->
            <!--    </div>-->
            <!--</div>-->
            
             <div style="margin-top:65px !important" class="widget ">
                <h4 class="widget-title line-bottom"> Specifications</h4>
                <div class="brochured">
                  <ul class="list">
                    
                    <li target="_blank" style="background: #170e52;"><a href="<?php echo $wspath?>admin/images/property-image/<?php echo $datadt['pdf'];?>"><i class="fa fa-file-pdf-o"></i>View Pdf</a></li>
                  </ul>
                </div>
              </div>
          </div>
          <div class="col-sm-12 col-md-4">
            <div class="sidebar sidebar-left mt-sm-30 ml-30 ml-sm-0">
              <div class="widget">
                <div class="services-list">
                  <ul class="list mt-0">
                    <?php
                        $mid=$datadt["m_id"];
                        $sql = "SELECT * FROM `tbl_services` WHERE m_id='$mid'";
                        $run = mysqli_query($db,$sql) or die("Query Not run");
                        while($data = mysqli_fetch_assoc($run)){
                    ?>
                       
                    <li ><a href="<?php echo $wspath?>services<?php echo $data['slug_url']?>.php"><?php echo $data['name']?></a></li>
                     <?php } ?>
                    <!--<li><a href="services.php">Liquefied natural gas (LNG)</a></li>-->
                    <!--<li><a href="services.php">Liquefied Petroleum Gas (LPG)</a></li>-->
                    <!--<li><a href="services.php">Jet Fue A1</a></li>-->
                    <!--<li><a href="services.php">Jet Fuel Aviation Colonial Grade JP 54</a></li>-->
                    <!--<li><a href="services.php">All types of Diesel Fuel EN-590 (ULSD) </a></li>-->
                    <!--<li><a href="services.php">Diesel D2 Gost 305-82  </a></li>-->
                    <!--<li><a href="services.php">Mazut 100 Gost 10585-75/99Mazut 100 Gost 10585-75/99 </a></li>-->
                    <!--<li><a href="services.php">Gasoline/Gas Oil </a></li>-->
                    <!--<li><a href="services.php">Napththa </a></li>-->
                    <!--<li><a href="services.php">Furnace Oil </a></li>-->
                    <!--<li><a href="services.php">Fuel Oil  CST-180/280/380 </a></li>-->
                    <!--<li><a href="services.php">Base Oil </a></li>-->
                    <!--<li><a href="services.php">Petroleum Coke (Petcoke) </a></li>-->
                    <!-- <li><a href="services.php">Bitumen 40/50,  60/70,  85/100,  100/120 </a></li>-->
                    <!--  <li><a href="services.php">Wood </a></li>-->
                  </ul>
                </div>
              </div>
             
              <div class="widget">
                <h4 class="widget-title line-bottom">Quick Contact</h4>
                   <form action="<?php $_PHP_SELF?>" method="POST">
                     <div class="form-group">
                    <input name="name" class="form-control" type="text" placeholder="Enter Name" required="" aria-required="true">
                    <?php if (isset($errors) && in_array("Name field is required.", $errors)) { ?>
                        <p class="error">Name field is required.</p>
                    <?php } elseif (isset($errors) && in_array("Name can only contain alphabets.", $errors)) { ?>
                        <p class="error">Name can only contain alphabets.</p>
                    <?php } ?>
                  </div>
                    <div class="form-group">
                    <input name="phone" class="form-control" type="text" placeholder="Enter Phone" minlength="10" maxlength="10" onkeypress="return isNumberKey(event)" pattern=".{10,10}" class="form-control" onpaste="return false;" required>
                    <?php if (isset($errors) && in_array("Phone field is required.", $errors)) { ?>
                        <p class="error">Phone field is required.</p>
                    <?php } elseif (isset($errors) && in_array("Phone number should have exactly 10 digits.", $errors)) { ?>
                        <p class="error">Phone number should have exactly 10 digits.</p>
                    <?php } ?>
                  </div>
                  <div class="form-group">
                    <input name="email" class="form-control" type="text" required="" placeholder="Enter Email">
                    <?php if (isset($errors) && in_array("Email field is required.", $errors)) { ?>
                        <p class="error">Email field is required.</p>
                    <?php } ?>
                  </div>
                  <div class="form-group">
                    <textarea name="message" class="form-control" required="" placeholder="Enter Message" rows="3"></textarea>
                  </div>
                  <div class="form-group">
                    <button type="submit" name="submit_btn" class="btn btn-default btn-flat btn-xs btn-quick-contact text-gray pt-5 pb-5" data-loading-text="Please wait...">Send Message</button>
                  </div>
                </form>
              </div>
            </div>
          </div>
        </div>
      </div>
    </section>
          </div>
        </div>
      </div>
    </section>
    <!-- Contact Form Validation-->
            <script type="text/javascript">
              $("#contact_form").validate({
                submitHandler: function(form) {
                  var form_btn = $(form).find('button[type="submit"]');
                  var form_result_div = '#form-result';
                  $(form_result_div).remove();
                  form_btn.before('<div id="form-result" class="alert alert-success" role="alert" style="display: none;"></div>');
                  var form_btn_old_msg = form_btn.html();
                  form_btn.html(form_btn.prop('disabled', true).data("loading-text"));
                  $(form).ajaxSubmit({
                    dataType:  'json',
                    success: function(data) {
                      if( data.status == 'true' ) {
                        $(form).find('.form-control').val('');
                      }
                      form_btn.prop('disabled', false).html(form_btn_old_msg);
                      $(form_result_div).html(data.message).fadeIn('slow');
                      setTimeout(function(){ $(form_result_div).fadeOut('slow') }, 6000);
                    }
                  });
                }
              });
            </script>

<?php include 'footer.php';?>
</div>
</body>
</html>

MMCT - 2023