Advertisement
ktryber

Untitled

Apr 11th, 2013
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 8.08 KB | None | 0 0
  1.     <!DOCTYPE html>
  2.     <html>
  3.     <head>
  4.         <meta charset="utf-8">
  5.         <title><?php echo $pageTitle; ?></title>
  6.         <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7.         <link href="assets/css/bootstrap-responsive.css" rel="stylesheet">
  8.         <link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
  9.         <link href="css/bootstrap-responsive.css" rel="stylesheet" media="screen">
  10.  
  11.  
  12.         <link href="css/style.css" rel="stylesheet" media="screen">
  13.         <!--[if lt IE 7]-->
  14.         <link rel="stylesheet" type="text/css" href="css/ie6.css">
  15.         <!--[endif]-->
  16.         <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
  17.  
  18.        
  19.  
  20.        
  21.         <script src="js/jquery.fittext.js"></script>
  22.         <script src="js/bootstrap.min.js"></script>
  23.  
  24.     <!-- bjqs.css contains the *essential* css needed for the slider to work -->
  25.     <link rel="stylesheet" href="css/bjqs.css">
  26.  
  27.     <!-- some pretty fonts for this demo page - not required for the slider -->
  28.     <link href='http://fonts.googleapis.com/css?family=Source+Code+Pro|Open+Sans:300' rel='stylesheet' type='text/css'>
  29.  
  30.     <!-- demo.css contains additional styles used to set up this demo page - not required for the slider -->
  31.     <link rel="stylesheet" href="css/demo.css">
  32.  
  33.     <!-- load jQuery and the plugin -->
  34.     <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
  35.     <script src="js/bjqs-1.3.min.js"></script>
  36.  
  37.  
  38.  
  39.         <script>
  40.               (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  41.               (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  42.               m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  43.               })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  44.  
  45.               ga('create', 'UA-39599649-1', 'poweronlytransit.com');
  46.               ga('send', 'pageview');
  47.  
  48.         </script>
  49.  
  50.    
  51.  
  52.  
  53.  
  54.  
  55. </head>
  56. <body>
  57.  
  58. <div class="container">
  59.  
  60.     <div class="row-fluid">
  61.         <div class="nav">
  62.  
  63.             <div class="span3">
  64.                 <div id="navLogo">
  65.                     <object data="images/logo.svg" type="image/svg+xml" class="chart">
  66.                         <a href="../index.html"></a>
  67.                             <!--|if lte IE 8 |-->
  68.                             <img src="images/logo.png" alt="Power Only Transit"/>
  69.                             <!--|endif|-->
  70.                     </object>
  71.                 </div>
  72.             </div>     
  73.  
  74.             <div class="span6">
  75.                 <div class="navbar">
  76.                     <ul>
  77.                         <li><a href="index.php">Home</a></li>
  78.                         <li><a href="get-a-quote.php">Get a Quote</a></li>
  79.                         <li><a href="towawayService.php">Tow Away Service</a></li>
  80.                        
  81.                        
  82.                     </ul>
  83.                 </div>
  84.             </div> 
  85.  
  86.  
  87.             <div class="span3">
  88.                 <p>Call Us: 888-206-5830</p>
  89.                     <script type="text/javascript">
  90.                       <!--
  91.                       // Array of day names
  92.                       var dayNames = new Array("Sunday","Monday","Tuesday","Wednesday",
  93.                                     "Thursday","Friday","Saturday");
  94.                       var now = new Date();
  95.                       document.write("Happy " + dayNames[now.getDay()] + ".");
  96.                       // -->
  97.                      </script>  
  98.             </div> 
  99.                        
  100.         </div><!--end nav-->   
  101.     </div><!--end row-fluid-->     
  102.            
  103.  
  104. <?php
  105.  
  106.  
  107.  
  108.  
  109. if ($_SERVER["REQUEST_METHOD"] == "POST") {
  110.  
  111.     $name = ($_POST['name']);
  112.     $email = ($_POST['email']);
  113.     $phone = ($_POST['phone']);
  114.     $shipment = ($_POST['shipment']);
  115.  
  116.  
  117.  
  118.     if ($name == "" OR $phone == "" OR $shipment == "") {
  119.         $error_message = "<div class='alert alert-error'>
  120.         <p style='text-align:center'>Please fill in every field in the form,
  121.         It helps us get you the best quote!</p>
  122.         </div>";
  123.        
  124.     }
  125.  
  126.  
  127.     if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
  128.         //invalid emailAddress
  129.         $error_message = "<div class='alert alert-error'>
  130.         <p style='text-align:center'>The email you entered doesn't seem to be valid</p>
  131.         </div>";
  132.     }
  133.  
  134.     require_once("inc/phpmailer/class.phpmailer.php");
  135.     $mail = new PHPMailer();
  136.  
  137.  
  138.     if (!isset($error_message)) {
  139.  
  140.  
  141.         $email_body = "";
  142.         $email_body = $email_body . "Name: " . $name . "<br>";
  143.         $email_body = $email_body . "Email: " . $email . "<br>";
  144.         $email_body = $email_body . "Phone: " . $phone . "<br>";
  145.         $email_body = $email_body . "Shipment: " . $shipment . "<br>";
  146.  
  147.         $mail->SetFrom($email);
  148.         $address = "[email protected]";
  149.         $mail->AddAddress($address, "Power Only Transit");
  150.         $mail->Subject  = "Quote Request | " . $name;
  151.         $mail->MsgHTML($email_body);
  152.  
  153.         if($mail->Send()) {
  154.             header("Location: get-a-quote.php?status=thanks");
  155.             exit;
  156.  
  157.         } else{
  158.             echo $error_message . $mail->ErrorInfo;
  159.         }  
  160.     }      
  161. }
  162.  
  163.  
  164. ?>
  165.  
  166. <?php
  167. $pageTitle = "Power Only Transit - Get a Quote";
  168. ?>
  169.  
  170.  
  171. <div class="row-fluid">
  172.     <div class="span12">
  173.         <div class="page-content"> 
  174.        
  175.             <div class="row-fluid">
  176.                 <div class="span6">    
  177.                     <div class="quote-left">       
  178.  
  179.                         <h1>No truck, No problem!</h1>
  180.                         <p>To request a quote please fill out this form.</p>
  181.                         <p>We always strive to have a quote back to you as soon as possible.</p>
  182.  
  183.                         <img src="images/photo-13.jpg" style="border-radius: 5px;
  184.                         box-shadow:0px 0px 10px black">
  185.  
  186.                     </div><!--end quote-left-->
  187.                 </div><!--end span6-->
  188.                        
  189.  
  190.  
  191.  
  192.                 <div class="span6">    
  193.                     <div class="contact-form">
  194.                        
  195.                         <?php if (isset($_GET["status"]) AND $_GET["status"] == "thanks") { ?>
  196.                         <div class="alert alert-success">
  197.                             <p>Thank you for contacting us, we will have a quote to you as soon as possible.</p>
  198.                         </div> 
  199.                         <?php } else { ?>
  200.  
  201.                        
  202.  
  203.                         <?php
  204.                         if (!isset($error_message)) {
  205.  
  206.                         } else {  
  207.                             echo '<p class="message">' . $error_message . '</p>';
  208.                         }
  209.                         ?>    
  210.  
  211.                        
  212.                        
  213.                        
  214.                        
  215.                        
  216.                
  217.                
  218.                        
  219.                         <form action="get-a-quote.php" method="post">
  220.                             <fieldset>
  221.  
  222.                                 <label for="name">Name</label>
  223.                                 <input type="text" name="name" placeholder="first and last name" value="<?php if (isset($name)) { echo htmlspecialchars($name); } ?>">
  224.  
  225.                                 <label for="email">Email</label>
  226.                                 <input type="text" name="email" placeholder="[email protected]" value="<?php if (isset($email)) { echo htmlspecialchars($email); } ?>">
  227.  
  228.                                 <label for="phone">Phone Number</label>
  229.                                 <input type="text" name="phone" placeholder="555-555-5555" maxlength="12" value="<?php if (isset($phone)) { echo htmlspecialchars($phone); } ?>">
  230.  
  231.                                 <label for="shipment">Please describe your shipment to <br>help us get you the best possible price</label>
  232.                                 <textarea rows="6" name="shipment" class="span12"><?php if (isset($shipment)) { echo htmlspecialchars($shipment); } ?></textarea><br>
  233.  
  234.                                
  235.                                 <button class="btn btn-large  btn-success" type="submit" style="margin-top:40px;">Request a Quote</a></button>
  236.                             </fieldset>
  237.                         </form>
  238.                         <?php } ?>
  239.                     </div><!--end contact-form-->
  240.                 </div><!--end span6-->
  241.             </div><!--end row-fluid--> 
  242.  
  243.         </div><!--end page-content-->                  
  244.     </div><!--end span12-->
  245. </div><!--end row-fluid-->
  246.  
  247. <div class="row-fluid">
  248.     <div class="span12">
  249.         <div class="navfooter">
  250.  
  251.             <div class="row-fluid">
  252.                 <div class="span3">
  253.                     <p style="font-size: 1em;">Copyright &copy; <?php echo date("Y") ?>  <br>Power Only Transit LLC. </P>
  254.                 </div>
  255.                
  256.                 <div class="span6">
  257.                     <div class="navfooter">    
  258.                         <ul>
  259.                             <li><a href="index.php">Home</a></li>
  260.                             <li><a href="get-a-quote.php">Get a Quote</a></li>
  261.                             <li><a href="towawayService.php">Tow Away Service</a></li>
  262.                             <li><a href="contactUs.php">Contact Us</a></li>
  263.                         </ul>
  264.                     </div>
  265.                 </div>
  266.        
  267.                
  268.                 <div class="span3">
  269.                     <p>Call Us: 888-206-5830</p>
  270.                 </div>
  271.             </div><!--end row-fluid-->
  272.  
  273.  
  274.         </div><!--end navfooter-->
  275.     </div><!--end span12-->
  276. </div><!--end row-fluid-->
  277.  
  278.            
  279.  
  280. </div> <!--end container-->
  281.  
  282.  
  283.  
  284. <script src="http://code.jquery.com/jquery.js"></script>
  285.     <script src="js/bootstrap.min.js"></script>
  286. <script>
  287. jQuery("#responsive_headline").fitText();
  288. jQuery("#responsive_nav").fitText();
  289.  
  290. jQuery(document).ready(function($) {
  291.     $('#banner-fade').bjqs({
  292.         'height' : 320,
  293.         'width' : 620,
  294.         'responsive' : true
  295.     });
  296. });
  297.  
  298. </script>
  299.                
  300.  
  301.  
  302.  
  303.  
  304.  
  305. </body>
  306. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement