Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php //Template Name: Contact Page-One
- get_header();
- get_template_part('index', 'banner');
- $wl_theme_options = get_option('weblizar_options_pro'); ?>
- <div class="content-wrapper hide-until-loading">
- <!-- Contact Map -->
- <?php if($wl_theme_options['google_map_on_contact']=="on") { ?>
- <div class="row">
- <div class="col-md-12 col-sm-12">
- <?php if($wl_theme_options['google_maps'] !='') { ?>
- <iframe src="<?php echo $wl_theme_options['google_maps']; ?>" width="100%" scrolling="no" height="500" frameborder="0" marginheight="0" marginwidth="0"></iframe>
- <?php } ?>
- </div>
- </div>
- <?php } ?>
- <!-- Contact Map -->
- <div class="body-wrapper">
- <div class="container">
- <div class="row">
- <div class="col-md-9 col-sm-9">
- <?php the_post(); ?>
- <div class="body_paragraph contact-paragraph">
- <?php the_content( __( 'Read More' , 'weblizar' ) ); ?>
- </div>
- <div id="weblizar_form">
- <form class="form-wrapper" method="POST" action="#">
- <div class="form-group clearfix">
- <label class="control-label" for="name"><?php esc_attr_e('Name','weblizar'); ?> *</label>
- <div class="col-md-10">
- <input type="text" id="user_name" name="user_name" class="form-control" required/>
- </div>
- <span id="contact_name_error" style="display:none;"><?php esc_attr_e('Fill your name','weblizar'); ?></span>
- </div>
- <div class="form-group clearfix">
- <label class="control-label" for="user-email"><?php esc_attr_e('E-mail','weblizar'); ?> *</label>
- <div class="col-md-10">
- <input type="text" name="user_email" id="user_email" class="form-control" required />
- </div>
- <span id="contact_email_error" style="display:none;"><?php esc_attr_e('Fill your Email','weblizar'); ?></span>
- </div>
- <div class="form-group clearfix">
- <label class="control-label" for="message"> <?php esc_attr_e('Message','weblizar'); ?> *</label>
- <div class="col-md-10">
- <textarea name="user_message" id="user_message" class="form-control" required></textarea>
- </div>
- <span id="contact_user_massage_error" style="display:none;"><?php esc_attr_e('Fill your Text massage','weblizar'); ?></span>
- </div>
- <div class="form-group clearfix">
- <label class="control-label" for="message"> <?php esc_attr_e('data protection and privacy policy.','weblizar'); ?> *</label>
- <div class="col-md-10">
- <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>
- <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>
- </div>
- <span id="data_protection_error" style="display:none;"><?php esc_attr_e('Please select privacy policy','weblizar'); ?></span>
- </div>
- <div class="form-group clearfix">
- <label class="control-label"></label>
- <div class="col-md-3">
- <input type="submit" name="query_submit" id="query_submit" value="Send" class="btn btn-primary btn-full-width"/>
- </div>
- </div>
- </form>
- </div>
- <div id="enquiry_send_massage" style="display:none;">
- <div class="callout-box callout-box2 clearfix">
- <div class="callout-content">
- <h2><?php _e('Contact Query successfully submit','weblizar'); ?></h2>
- </div>
- </div>
- </div>
- <?php
- if(isset($_POST['query_submit']))
- { if($_POST['user_name']==''){
- echo "<script>jQuery('#contact_name_error').show();</script>";
- } else
- if($_POST['data_protection']=='' || $_POST['privacy_policy']=='') {
- echo "<script>jQuery('#data_protection_error').show();</script>";
- }
- else
- if($_POST['user_email']=='') {
- echo "<script>jQuery('#contact_email_error').show();</script>";
- } else
- if(!preg_match("/^[_\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\.)+[a-zA-Z]{2,6}$/i", $_POST['user_email'])) {
- echo "<script>jQuery('#contact_email_error').show();</script>";
- } else
- if($_POST['user_message'] ==''){
- echo "<script>jQuery('#contact_user_massage_error').show();</script>";
- }
- else
- { $email = get_option('admin_email');
- $subject = "You have new enquiry form".get_option("blogname");
- $massage = stripslashes(trim($_POST['user_message']))."<br>Message sent from <br> Name:" . trim($_POST['user_name']). "<br>Email :". trim($_POST['user_email']);
- $headers = "From: ".trim($_POST['user_name'])." <".trim($_POST['user_email']).">\r\nReply-To:".trim($_POST['user_email']);
- $enquerysend =wp_mail( $email, $subject, $massage, $headers);
- echo "<script>alert('Contact Query successfully submit');</script>";
- echo "<script>jQuery('#weblizar_form').hide();</script>";
- echo "<script>jQuery('#enquiry_send_massage').show();</script>";
- }
- }
- ?>
- </div>
- <div class="col-md-3 col-sm-3">
- <div class="sidebar-block">
- <?php
- if($wl_theme_options['contact_us_text'] !="") { ?>
- <h3 class="h3-sidebar-title">
- <?php echo $wl_theme_options['contact_us_text']; ?>
- </h3>
- <?php }
- if($wl_theme_options['contact_phone'] !="") { ?>
- <div class="sidebar-icon-item">
- <i class="icon-phone"></i> <?php echo $wl_theme_options['contact_phone']; ?>
- </div>
- <?php }
- if($wl_theme_options['contact_email'] !="") { ?>
- <div class="sidebar-icon-item">
- <i class="icon-envelope-alt"></i> <?php echo $wl_theme_options['contact_email']; ?>
- </div>
- <?php }
- if($wl_theme_options['contact_address'] !="") { ?>
- <div class="sidebar-icon-item">
- <i class="icon-home"></i> <?php echo $wl_theme_options['contact_address']; ?>
- </div>
- <?php } ?>
- </div>
- <div class="sidebar-block">
- <?php
- if($wl_theme_options['contact_us_text_2']!="") { ?>
- <h3 class="h3-sidebar-title">
- <?php echo $wl_theme_options['contact_us_text_2']; ?>
- </h3>
- <?php } ?>
- <p>
- <?php if($wl_theme_options['contact_address_2'] !="") { ?>
- <strong><?php _e('Address:','weblizar'); ?> </strong><?php echo $wl_theme_options['contact_address_2']; ?>
- <br />
- <?php }
- if($wl_theme_options['contact_phone_2'] !="") { ?>
- <strong><?php _e('Phone:','weblizar'); ?></strong> <?php echo $wl_theme_options['contact_phone_2']; ?>
- <br />
- <?php }
- if($wl_theme_options['contact_email_2'] !="") { ?>
- <strong><?php _e('Email:','weblizar'); ?> </strong><?php echo $wl_theme_options['contact_email_2']; ?>
- <?php } ?>
- </p>
- </div>
- <?php if($wl_theme_options['social_media_on_contact'] =="on") { ?>
- <div class="sidebar-block">
- <?php if($wl_theme_options['social_media_text'] !="") { ?>
- <h3 class="h3-sidebar-title"><?php echo $wl_theme_options['social_media_text']; ?></h3>
- <?php } ?>
- <div class="social-icons">
- <ul>
- <?php if($wl_theme_options['social_media_facebook_link']) { ?>
- <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>
- <?php }
- if($wl_theme_options['social_media_twitter_link']) { ?>
- <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>
- <?php }
- if($wl_theme_options['social_media_google_plus']) { ?>
- <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>
- <?php }
- if($wl_theme_options['social_media_linkedin_link']) { ?>
- <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>
- <?php } ?>
- </ul>
- </div>
- </div>
- <?php } ?>
- </div>
- </div>
- </div>
- </div>
- </div><!--.content-wrapper end -->
- <div class="space-sep40"></div>
- <?php get_template_part('index','footer-call-out-area');
- get_footer(); ?>
Add Comment
Please, Sign In to add comment