Guest User

Untitled

a guest
May 14th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.85 KB | None | 0 0
  1. <?php //Template Name: Contact Page-One
  2. get_header();
  3. get_template_part('index', 'banner');
  4. $wl_theme_options = get_option('weblizar_options_pro'); ?>
  5. <div class="content-wrapper hide-until-loading">
  6. <!-- Contact Map -->
  7. <?php if($wl_theme_options['google_map_on_contact']=="on") { ?>
  8. <div class="row">
  9. <div class="col-md-12 col-sm-12">
  10. <?php if($wl_theme_options['google_maps'] !='') { ?>
  11. <iframe src="<?php echo $wl_theme_options['google_maps']; ?>" width="100%" scrolling="no" height="500" frameborder="0" marginheight="0" marginwidth="0"></iframe>
  12. <?php } ?>
  13. </div>
  14. </div>
  15. <?php } ?>
  16. <!-- Contact Map -->
  17. <div class="body-wrapper">
  18. <div class="container">
  19. <div class="row">
  20. <div class="col-md-9 col-sm-9">
  21. <?php the_post(); ?>
  22. <div class="body_paragraph contact-paragraph">
  23. <?php the_content( __( 'Read More' , 'weblizar' ) ); ?>
  24. </div>
  25. <div id="weblizar_form">
  26. <form class="form-wrapper" method="POST" action="#">
  27. <div class="form-group clearfix">
  28. <label class="control-label" for="name"><?php esc_attr_e('Name','weblizar'); ?> *</label>
  29. <div class="col-md-10">
  30. <input type="text" id="user_name" name="user_name" class="form-control" required/>
  31. </div>
  32. <span id="contact_name_error" style="display:none;"><?php esc_attr_e('Fill your name','weblizar'); ?></span>
  33. </div>
  34. <div class="form-group clearfix">
  35. <label class="control-label" for="user-email"><?php esc_attr_e('E-mail','weblizar'); ?> *</label>
  36. <div class="col-md-10">
  37. <input type="text" name="user_email" id="user_email" class="form-control" required />
  38. </div>
  39. <span id="contact_email_error" style="display:none;"><?php esc_attr_e('Fill your Email','weblizar'); ?></span>
  40. </div>
  41. <div class="form-group clearfix">
  42. <label class="control-label" for="message"> <?php esc_attr_e('Message','weblizar'); ?> *</label>
  43. <div class="col-md-10">
  44. <textarea name="user_message" id="user_message" class="form-control" required></textarea>
  45. </div>
  46. <span id="contact_user_massage_error" style="display:none;"><?php esc_attr_e('Fill your Text massage','weblizar'); ?></span>
  47. </div>
  48. <div class="form-group clearfix">
  49. <label class="control-label" for="message"> <?php esc_attr_e('data protection and privacy policy.','weblizar'); ?> *</label>
  50. <div class="col-md-10">
  51. <input type="checkbox" name="data_protection" value="data_protection" required>I have read and accepted the privacy policy (check to activate) <a href="http://www.garanteprivacy.it/regolamentoue" target="_blank"> Read Rules </a><br>
  52. <input type="checkbox" name="privacy_policy" value="privacy_policy" required>I authorize the processing of data on this form to receive information on the services provided by this website. <a href="http://194.242.234.211/documents/10160/5184810/Guida+al+nuovo+Regolamento+europeo+in+materia+di+protezione+dati" target="_blank"> Read Rules </a>
  53. </div>
  54. <span id="data_protection_error" style="display:none;"><?php esc_attr_e('Please select privacy policy','weblizar'); ?></span>
  55. </div>
  56. <div class="form-group clearfix">
  57. <label class="control-label"></label>
  58. <div class="col-md-3">
  59. <input type="submit" name="query_submit" id="query_submit" value="Send" class="btn btn-primary btn-full-width"/>
  60. </div>
  61. </div>
  62. </form>
  63. </div>
  64. <div id="enquiry_send_massage" style="display:none;">
  65. <div class="callout-box callout-box2 clearfix">
  66. <div class="callout-content">
  67. <h2><?php _e('Contact Query successfully submit','weblizar'); ?></h2>
  68. </div>
  69. </div>
  70. </div>
  71. <?php
  72. if(isset($_POST['query_submit']))
  73. { if($_POST['user_name']==''){
  74. echo "<script>jQuery('#contact_name_error').show();</script>";
  75. } else
  76. if($_POST['data_protection']=='' || $_POST['privacy_policy']=='') {
  77. echo "<script>jQuery('#data_protection_error').show();</script>";
  78. }
  79. else
  80. if($_POST['user_email']=='') {
  81. echo "<script>jQuery('#contact_email_error').show();</script>";
  82. } else
  83. if(!preg_match("/^[_\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\.)+[a-zA-Z]{2,6}$/i", $_POST['user_email'])) {
  84. echo "<script>jQuery('#contact_email_error').show();</script>";
  85. } else
  86. if($_POST['user_message'] ==''){
  87. echo "<script>jQuery('#contact_user_massage_error').show();</script>";
  88. }
  89. else
  90. { $email = get_option('admin_email');
  91. $subject = "You have new enquiry form".get_option("blogname");
  92. $massage = stripslashes(trim($_POST['user_message']))."<br>Message sent from <br> Name:" . trim($_POST['user_name']). "<br>Email :". trim($_POST['user_email']);
  93. $headers = "From: ".trim($_POST['user_name'])." <".trim($_POST['user_email']).">\r\nReply-To:".trim($_POST['user_email']);
  94. $enquerysend =wp_mail( $email, $subject, $massage, $headers);
  95. echo "<script>alert('Contact Query successfully submit');</script>";
  96. echo "<script>jQuery('#weblizar_form').hide();</script>";
  97. echo "<script>jQuery('#enquiry_send_massage').show();</script>";
  98. }
  99. }
  100. ?>
  101. </div>
  102. <div class="col-md-3 col-sm-3">
  103. <div class="sidebar-block">
  104. <?php
  105. if($wl_theme_options['contact_us_text'] !="") { ?>
  106. <h3 class="h3-sidebar-title">
  107. <?php echo $wl_theme_options['contact_us_text']; ?>
  108. </h3>
  109. <?php }
  110. if($wl_theme_options['contact_phone'] !="") { ?>
  111. <div class="sidebar-icon-item">
  112. <i class="icon-phone"></i> <?php echo $wl_theme_options['contact_phone']; ?>
  113. </div>
  114. <?php }
  115. if($wl_theme_options['contact_email'] !="") { ?>
  116. <div class="sidebar-icon-item">
  117. <i class="icon-envelope-alt"></i> <?php echo $wl_theme_options['contact_email']; ?>
  118. </div>
  119. <?php }
  120. if($wl_theme_options['contact_address'] !="") { ?>
  121. <div class="sidebar-icon-item">
  122. <i class="icon-home"></i> <?php echo $wl_theme_options['contact_address']; ?>
  123. </div>
  124. <?php } ?>
  125. </div>
  126. <div class="sidebar-block">
  127. <?php
  128. if($wl_theme_options['contact_us_text_2']!="") { ?>
  129. <h3 class="h3-sidebar-title">
  130. <?php echo $wl_theme_options['contact_us_text_2']; ?>
  131. </h3>
  132. <?php } ?>
  133. <p>
  134. <?php if($wl_theme_options['contact_address_2'] !="") { ?>
  135. <strong><?php _e('Address:','weblizar'); ?> </strong><?php echo $wl_theme_options['contact_address_2']; ?>
  136. <br />
  137. <?php }
  138. if($wl_theme_options['contact_phone_2'] !="") { ?>
  139. <strong><?php _e('Phone:','weblizar'); ?></strong> <?php echo $wl_theme_options['contact_phone_2']; ?>
  140. <br />
  141. <?php }
  142. if($wl_theme_options['contact_email_2'] !="") { ?>
  143. <strong><?php _e('Email:','weblizar'); ?> </strong><?php echo $wl_theme_options['contact_email_2']; ?>
  144. <?php } ?>
  145. </p>
  146. </div>
  147. <?php if($wl_theme_options['social_media_on_contact'] =="on") { ?>
  148. <div class="sidebar-block">
  149. <?php if($wl_theme_options['social_media_text'] !="") { ?>
  150. <h3 class="h3-sidebar-title"><?php echo $wl_theme_options['social_media_text']; ?></h3>
  151. <?php } ?>
  152. <div class="social-icons">
  153. <ul>
  154. <?php if($wl_theme_options['social_media_facebook_link']) { ?>
  155. <li><a href="<?php echo ($wl_theme_options['social_media_facebook_link']); ?>" title="facebook" target="_blank" class="social-media-icon facebook-icon"><?php _e('facebbok','weblizar'); ?></a></li>
  156. <?php }
  157. if($wl_theme_options['social_media_twitter_link']) { ?>
  158. <li><a href="<?php echo ($wl_theme_options['social_media_twitter_link']); ?>" title="twitter" target="_blank" class="social-media-icon twitter-icon"><?php _e('twitter','weblizar'); ?></a></li>
  159. <?php }
  160. if($wl_theme_options['social_media_google_plus']) { ?>
  161. <li><a href="<?php echo ($wl_theme_options['social_media_google_plus']); ?>" title="googleplus" target="_blank" class="social-media-icon googleplus-icon"><?php _e('googleplus','weblizar'); ?></a></li>
  162. <?php }
  163. if($wl_theme_options['social_media_linkedin_link']) { ?>
  164. <li><a href="<?php echo ($wl_theme_options['social_media_linkedin_link']); ?>" title="linkedin" target="_blank" class="social-media-icon linkedin-icon"><?php _e('linkedin','weblizar'); ?></a></li>
  165. <?php } ?>
  166. </ul>
  167. </div>
  168. </div>
  169. <?php } ?>
  170. </div>
  171. </div>
  172. </div>
  173. </div>
  174. </div><!--.content-wrapper end -->
  175. <div class="space-sep40"></div>
  176. <?php get_template_part('index','footer-call-out-area');
  177. get_footer(); ?>
Add Comment
Please, Sign In to add comment