<?php
/* 
* Theme: PREMIUMPRESS CORE FRAMEWORK FILE
* Url: www.premiumpress.com
* Author: Mark Fail
*
* THIS FILE WILL BE UPDATED WITH EVERY UPDATE
* IF YOU WANT TO MODIFY THIS FILE, CREATE A CHILD THEME
*
* http://codex.wordpress.org/Child_Themes
*/
if (!defined('THEME_VERSION')) {	header('HTTP/1.0 403 Forbidden'); exit; }

global $CORE, $settings, $post;

?>
<div class="widget" id="widget-contactform" data-title="<?php echo __("Contact Form","premiumpress") ?>">
 <form role="form" method="post" action="" onsubmit="return CheckFormData();" class="mb-3" id="contactusform">
                
               <input type="hidden" name="action" value="contactform" />
               <input type="hidden" name="pid" value="<?php echo $post->ID; ?>" />                
               <div id="html_element"></div>
               
   <?php 
   
   // WIDGET OPTION
   // SHOW TITLE
   if(!isset($settings['showtitle']) || ( isset($settings['showtitle']) && $settings['showtitle'] != 0) ){ ?>
<div class="widget-title">
<h6><i class="fa fa-briefcase float-right mt-1"></i>  <?php echo __("Contact Business","premiumpress") ?></h6>
</div><?php } ?>
             
               <div class="row">
                  <div class="col-6">
                     <label><?php echo __("Full Name","premiumpress") ?>  <span class="required">*</span></label>
                     <div class="controls mb-3"> 
                        <input type="text" class="form-control form-control-sm" name="contact_n1" id="name" tabindex="1" value="<?php if(isset($GLOBALS['error_message']) && $GLOBALS['error_type'] == "error"){ echo esc_html($_POST['contact_n1']); } ?>">
                     </div>
                  </div>
                  <div class="col-6">
                      <label><?php echo __("Telephone","premiumpress") ?> </label>
                     <div class="controls mb-3">
                        <input type="text" class="form-control form-control-sm" id="phone" name="contact_p1" tabindex="3" value="<?php if(isset($GLOBALS['error_message']) && $GLOBALS['error_type'] == "error"){ echo esc_html($_POST['contact_p1']); } ?>" >
                     </div>
                  </div>
                  <div class="col-12">
                    <label><?php echo __("Email","premiumpress") ?> <span class="required">*</span></label>
                     <div class="controls mb-3"> 
                        <input type="text" class="form-control form-control-sm" id="email1" name="contact_e1" tabindex="2" value="<?php if(isset($GLOBALS['error_message']) && $GLOBALS['error_type'] == "error"){ echo esc_html($_POST['contact_e1']); } ?>">
                     </div>
                  </div>
                   
               </div>
               <div class="form-group ">
                  <label><?php echo __("Message","premiumpress") ?> <span class="required">*</span> </label>
                  <div class="controls mb-3">
                     <textarea name="contact_m1" class="form-control form-control-sm" id="message" tabindex="5" style="height:110px; width:100%;"><?php if(isset($GLOBALS['error_message']) && $GLOBALS['error_type'] == "error"){ echo esc_html($_POST['contact_m1']); } ?></textarea>
                  </div>                  
                <?php if(_ppt('comment_captcha') == 1){ ?>
                 <div class="g-recaptcha mt-2" data-sitekey="<?php echo stripslashes(_ppt('google_recap_sitekey')); ?>"></div>
                 <?php } ?>
                  
               </div>
               <div class="clearfix"></div>
               <hr />
                <button type="submit" id="mybtn" class="btn btn-block btn-primary rounded-0"><?php echo __("Send Message","premiumpress") ?></button>
              
            </form>
</div>  