<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <?php
            $this->load->view('user/common_style');
        ?>
        <link rel="stylesheet" href="<?php echo base_url();?>styles/fonts/Socialico/stylesheet.css">
        <link rel="stylesheet" href="<?php echo base_url();?>styles/css/set1.css">
        <script src="<?php echo base_url();?>styles/js/modernizr.js"></script>
        <style>
            .contact_one .contact_left_content form input[type="text"]{border:0px;}
           
            .prfledit select {
                margin: 0;
            }
            .help-block {
                color: #eb5055;
                margin: 0em 0em 0em !important;
            }
    textarea{
      max-width: 100%;
      max-height: 190px;
      min-height: 100px;
      height: 250px;
       border: 1px solid #ededed;
      padding: 10px;
      font-size: 14px;
      font-style: normal;
      line-height: 24px;
      overflow: auto;
      color: #444;
      font-weight: 600;
      width:100%;
      margin:0 auto;margin-top:20px ;margin-bottom:20px ; text-align:center
    }
    .single_service_img_content_left img {
        border-top: 8px solid #fff;
    }
            
      </style>
    </head>
    <body>
        <div id="preloader">
            <div class="preloader_spinner"> </div>
        </div>

        <section class="body_wrapper home_one">
         
           <?php
                $this->load->view('user/header');
                $this->load->view('user/login_header');
            ?>
  
            <section class="dmain">
                <div class="container">

                    <form class="tellfriend" method="post" action="<?php echo base_url();?>tellafriend">
                        <div class="row">
                            <div class="col-lg-9"> 
                                <div class="gry">
                                    <div class="profilesub clearfix profilesub2">
                                        <h3><?php echo $this->lang->line('tellafrnd_title'); ?> </h3>

                                            <?php if($this->session->flashdata('success_message')) {?>

                                                <div class="row">
                                                    <div class="col-lg-12 ">
                                                        <p class="frgtpwd frgtpwd1">
                                                            <i class="fa fa-thumbs-up"></i><?php echo $this->session->flashdata('success_message');?>
                                                        </p>
                                                    </div>
                                                </div>

                                            <?php } elseif ($this->session->flashdata('error_message')) { ?>

                                                <div class="row">
                                                    <div class="col-lg-12">
                                                        <p class="frgtpwd frgtpwd1 frgtpwdred">
                                                            <i class="fa fa-thumbs-down"></i><?php echo $this->session->flashdata('error_message');?>
                                                        </p>
                                                    </div>
                                                </div>

                                            <?php } ?>

                                            <ul class="prfledit">
                                                <div class="col-lg-12">

                                                    <li class="form-group <?php if(form_error('youremail')) echo "has-error";?>">
                                                        
                                                        <p class="control-label col-lg-4 text-semibold"><?php echo $this->lang->line('tellafrnd_email'); ?> <label class="text-danger">*</label></p>
                                                        <div class="col-lg-2"><p>:</p></div>
                                                        <div class="col-lg-6">
                                                            <div class="">
                                                                <input type="text" name="youremail" value="<?php echo set_value('youremail');?>">
                                                            </div>
                                                            <div class="messageContainer"></div>
                                                            <?php echo form_error('youremail', '<span class="help-block">', '</span>'); ?>
                                                        </div>
                                                        
                                                    </li>
                                                   
                                                     <li class="form-group <?php if(form_error('frndemail')) echo "has-error";?>">
                                                            <p class="control-label col-lg-4 text-semibold"><?php echo $this->lang->line('tellafrnd_frndsemail'); ?> <label class="text-danger">*</label></p>
                                                            <div class="col-lg-2"><p>:</p></div>
                                                            <div class="col-lg-6">
                                                             <div class="">
                                                                <input type="text" name="frndemail" value="<?php echo set_value('frndemail');?>">
                                                                                                                        <span style="color:#f5ab35;font-weight:600;"><?php echo $this->lang->line('tellafrnd_emailseperate'); ?></span>
                                                            </div>
                                                        <div class="messageContainer"></div>

                                                         <?php echo form_error('frndemail', '<span class="help-block">', '</span>'); ?>
                                                    </div>
                                                    </li>
                                                     <li class="form-group <?php if(form_error('subject')) echo "has-error";?>">
                                                         <p class="control-label col-lg-4 text-semibold"><?php echo $this->lang->line('lbl_mail_subject'); ?> <label class="text-danger">*</label></p>
                                                        <div class="col-lg-2"><p>:</p></div>
                                                        <div class="col-lg-6">
                                                            <div class="">
                                                                <input type="text" name="subject" value="<?php echo set_value('subject');?>">
                                                            </div>
                                                            <div class="messageContainer"></div>
                                                            <?php echo form_error('subject', '<span class="help-block">', '</span>'); ?>
                                                        </div>
                                                    </li>

                                                     <li class="form-group <?php if(form_error('message')) echo "has-error";?>">
                                                         <p class="control-label col-lg-4 text-semibold"><?php echo $this->lang->line('lbl_mail_message'); ?> <label class="text-danger">*</label></p>
                                                        <div class="col-lg-2"><p>:</p></div>
                                                        <div class="col-lg-6">
                                                            <div class="">
                                                             <textarea name="message"><?php echo $referral_url; ?></textarea>
                                                            </div>
                                                            <div class="messageContainer"></div>
                                                            <?php echo form_error('message', '<span class="help-block">', '</span>'); ?>
                                                        </div>
                                                    </li>

                                                </div>
                                            </ul>
                                    </div>
                                </div>
                                <div class="col-lg-12">
                                    <div class="col-lg-5 col-lg-offset-4 ">
                                        <div class="cmmn">
                                            <div class="contact_page_btn">
                                                <button type="submit"><?php echo $this->lang->line('bonus_button'); ?></button>
                                            </div>
                                            <div style="clear:both;"><br></div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <?php
                                $this->load->view('user/shortlinks');
                            ?>
                        </div>
                    </form>
                    
                </div>

            </section>
  
              <section class="dmain">
              </section>
            <?php
                $this->load->view('user/footer');
            ?>

        </section>

            <?php
                $this->load->view('user/common_script');
            ?>

        

        <!-- Bootsrap form validation JS files -->
        <script type="text/javascript" src="<?php echo base_url();?>assets/js/formValidation.js"></script>
        <script type="text/javascript" src="<?php echo base_url();?>assets/js/bootstrap.js"></script>

        <script type="text/javascript">

        jQuery.noConflict();
        (function( $ ) {

            $(function() {

                $(document).ready(function() {

                    $('.tellfriend').formValidation({
                        framework: 'bootstrap',
                        excluded: [':disabled'],

                        err: {
                            container: function($field, validator) {
                                return $field.parent().next('.messageContainer');
                            }
                        },
                        row: {
                            valid: 'has-success1',
                            invalid: 'has-error1'
                        },
                        fields: {
                            youremail: {
                                validators: {
                                    notEmpty: {
                                        message: '<?php echo $this->lang->line("tellafrnd_youremail_required");?>'
                                    },
                                    regexp: {
                                        regexp: /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/,
                                        message: '<?php echo $this->lang->line("user_emailid_invalid"); ?>'
                                    }
                                }
                            },
                            subject: {
                                validators: {
                                    notEmpty: {
                                        message: '<?php echo $this->lang->line("required_mail_subject");?>'
                                    },
                                    regexp: {
                                        regexp: /^[A-Za-z ]+$/,
                                        message: '<?php echo $this->lang->line("contact_subject_alpha");?>'
                                    }

                                }
                            },
                            message: {
                                validators: {
                                    notEmpty: {
                                        message: '<?php echo $this->lang->line("message_content_required");?>'
                                    }

                                }
                            },
                            frndemail: {
                                validators: {
                                    notEmpty: {
                                        message: '<?php echo $this->lang->line("tellafrnd_email_required");?>'
                                    },
                                     remote: {
                                        url: function(validator, $field, value) {
                                            
                                            return '<?php echo base_url();?>user/tellafriend/checkemail';
                                        },
                                        type: 'POST',
                                        delay: 1000,
                                        message: '<?php echo $this->lang->line("user_emailid_invalid"); ?>'
                                    }
                                }
                            }
                           
                           
                        }
                    })

                    jQuery("#owl-example").owlCarousel({   
                        nav:true,
                        items : 8, 
                        itemsCustom : false,
                        itemsDesktop : [1199,8],
                        itemsDesktopSmall : [980,5],
                        itemsTablet: [768,5],
                        itemsTabletSmall: [768,4],
                        itemsMobile : [479,2],
                        singleItem : false,
                        itemsScaleUp : true,
                        navigation : true,
                        navigationText : ["",""],
                        rewindNav : true,
                        scrollPerPage : true,
                    });
                })
                
            })
        })(jQuery);
        </script>
        
    </body>
</html>
