<div class="page-margin">
  <div class="search-box">
    <div class="container">
      <div class="row">
        <div class="col-md-4 col-md-offset-3 pull-right">
          <form action="<?php echo Wo_Link('search');?>/" method="get" class="search-form">
            <div class="form-group has-feedback">
              <input type="text" class="form-control" name="query" id="search" placeholder="Search" />
              <span class="glyphicon fa fa-search form-control-feedback"></span>
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>
  <div class="texts">
        <div class="typing t-1 <?php echo Wo_RightToLeft('text-left'); ?>">
          <h3><i class="fa fa-exclamation-circle"></i> <?php echo $wo['lang']['welcome_wonder'];?></h3>
          <span class="element" id="element-1"></span>
        </div>
        <div class="typing t-2 <?php echo Wo_RightToLeft('text-left'); ?>">
          <h3><i class="fa fa-globe"></i> <?php echo $wo['lang']['welcome_connect'];?></h3> 
          <span class="element" id="element-2"></span>
        </div>
        <div class="typing t-3 <?php echo Wo_RightToLeft('text-left'); ?>">
          <h3><i class="fa fa-share-square-o"></i> <?php echo $wo['lang']['welcome_share'];?></h3>
          <span class="element" id="element-3"></span>
        </div> 
        <div class="typing t-4 <?php echo Wo_RightToLeft('text-left'); ?>">
          <h3><i class="fa fa-desktop"></i> <?php echo $wo['lang']['welcome_discover'];?></h3>
          <span class="element" id="element-4"></span>
        </div>
        <div class="typing t-5 <?php echo Wo_RightToLeft('text-left'); ?>">
          <h3><i class="fa fa-search"></i> <?php echo $wo['lang']['welcome_find_more'];?></h3>
          <span class="element" id="element-5"></span>
        </div>
        <div class="typing t-6 <?php echo Wo_RightToLeft('text-left'); ?>">
          <h3><i class="fa fa-mobile fa-lg"></i> <?php echo $wo['lang']['welcome_mobile'];?></h3>
          <span class="element" id="element-6"></span>
        </div>
        </div>
  <div class="container welcome-container">
    <div class="row">
      <div class="col-md-4 col-md-offset-4">
        <div class="logo"><img src="<?php echo $wo['config']['theme_url'];?>/img/logo.png" alt=""> </div>
        <?php if(isset($_GET['tab2'])) { if($_GET['tab2'] == 'password_reset') { ?>
        <div class="panel panel-login welcome-form">
          <?php if(isset($_GET['user_id'])) { if (Wo_isValidPasswordResetToken($_GET['user_id']) === true) { ?>
          <div class="panel-heading">
            <div class="row">
              <div class="center">
                <h4><?php echo $wo['lang']['reset_new_password_label'];?></h4>
              </div>
            </div>
            <hr>
          </div>
          <div class="panel-body">
            <div class="row">
              <div class="col-lg-12">
                <form id="reset-password-form" action="#" method="post" role="form" style="display: block;">
                  <div id="reset-alerts"></div>
                  <div id="recovered">
                    <div class="form-group inner-addon  <?php echo Wo_RightToLeft('left-addon');?> ">
                      <i class="glyphicon fa fa-unlock-alt"></i>
                      <input type="password" name="password" class="form-control" placeholder="<?php echo $wo['lang']['new_password'];?>" />
                    </div>
                    <input type="hidden" name="id" value="<?php echo $_GET['user_id'];?>" />
                    <div class="form-group">
                      <div class="row">
                        <div class="col-sm-6 col-sm-offset-3">
                          <button type="submit" name="reset_password_submit" id="reset-password-submit" class="form-control btn btn-login">
                          <i class="fa fa-sign-in progress-icon" data-icon="sign-in"></i> <?php echo $wo['lang']['reset_password'];?> </button>
                        </div>
                      </div>
                    </div>
                  </div>
                </form>
                <?php } else { ?>
                <div class="panel-heading">
                  <div class="row">
                    <div class="center">
                      <h4><?php echo $wo['lang']['invalid_token'];?></h4>
                    </div>
                  </div>
                </div>
                <?php }}} } else { ?>
                <div class="panel panel-login welcome-form">
                  <div class="panel-heading">
                    <div class="row">
                      <div class="col-xs-6"><a href="#" class="active" id="login-form-link"><?php echo $wo['lang']['login'];?></a>
                      </div>
                      <div class="col-xs-6"><a href="#" id="register-form-link"><?php echo $wo['lang']['register'];?></a>
                      </div>
                    </div>
                    <hr>
                  </div>
                  <div class="panel-body">
                    <div class="row">
                      <div class="col-lg-12">
                        <form id="login-form" action="#" method="post" role="form" style="display: block;">
                          <div id="login-alerts"></div>
                          <div class="form-group inner-addon  <?php echo Wo_RightToLeft('left-addon');?>  ">
                            <i class="glyphicon fa fa-user"></i>
                            <input type="text" name="username"  class="form-control" placeholder="<?php echo $wo['lang']['username'];?>" value="" />
                          </div>
                          <div class="form-group inner-addon  <?php echo Wo_RightToLeft('left-addon');?> ">
                            <i class="glyphicon fa fa-unlock-alt"></i>
                            <input type="password" name="password"  class="form-control" placeholder="<?php echo $wo['lang']['password'];?>" />
                          </div>
                          <div class="form-group text-center">
                            <div class="form-group">
                              <input type="checkbox" class="rem" name="rem" id="fancy-checkbox-danger" />
                              <div class="btn-group">
                                <label for="fancy-checkbox-danger" class="btn btn-login">
                                <span class="fa fa-check-square"></span>
                                <span> </span>
                                </label>
                                <label for="fancy-checkbox-danger" class="btn btn-default active">
                                <?php echo $wo['lang']['remember_me'];?>
                                </label>
                              </div>
                            </div>
                          </div>
                          <div class="form-group">
                            <div class="row">
                              <div class="col-sm-6 col-sm-offset-3">
                                <button type="submit" name="login_submit" id="login-submit"  class="form-control btn btn-login">
                                <i class="fa fa-sign-in progress-icon" data-icon="sign-in"></i> <?php echo $wo['lang']['login'];?> </button>
                              </div>
                            </div>
                          </div>
                          <?php if(!empty($_GET['last_url'])){?>
                          <div class="form-group">
                            <input type="hidden" name="last_url" value="<?php echo urldecode($_GET['last_url']);?>">
                          </div>
                          <?php } ?>
                          <?php if(!empty($_GET['post_id'])){?>
                          <div class="form-group">
                            <input type="hidden" name="post_id" value="<?php echo $_GET['post_id'];?>">
                          </div>
                          <?php } ?>
                          <?php if($wo['config']['AllLogin'] != 0): ?>
                          <div class="form-group">
                            <div class="row">
                              <div class="col-lg-12">
                                <div class="text-center">
                                  <h5>
                                    <?php echo $wo['lang']['or_login_with'];?>
                                  </h5>
                                  <hr>
                                  <?php if($wo['config']['facebookLogin'] != 0): ?>
                                  <a href="<?php echo $wo['facebookLoginUrl']?>" class="btn btn-social-icon btn-facebook">
                                  <i class="fa fa-facebook"></i>
                                  </a>
                                  <?php endif; ?>
                                  <?php if($wo['config']['googleLogin'] != 0): ?>
                                  <a href="<?php echo $wo['googleLoginUrl']?>" class="btn btn-social-icon btn-google">
                                  <i class="fa fa-google"></i>
                                  </a>
                                  <?php endif; ?>
                                  <?php if($wo['config']['twitterLogin'] != 0): ?>
                                  <a href="<?php echo $wo['twitterLoginUrl']?>" class="btn btn-social-icon btn-twitter">
                                  <i class="fa fa-twitter"></i>
                                  </a>
                                  <?php endif; ?>
                                  <?php if($wo['config']['linkedinLogin'] != 0): ?>
                                  <a href="<?php echo $wo['linkedInLoginUrl']?>" class="btn btn-social-icon btn-linkedin">
                                  <i class="fa fa-linkedin"></i>
                                  </a>
                                  <?php endif; ?>
                                  <?php if($wo['config']['VkontakteLogin'] != 0): ?>
                                  <a href="<?php echo $wo['VkontakteLoginUrl']?>" class="btn btn-social-icon btn-vk">
                                  <i class="fa fa-vk"></i>
                                  </a>
                                  <?php endif; ?>
                                </div>
                              </div>
                            </div>
                          </div>
                          <?php endif;?>
                          <div class="form-group">
                            <div class="row">
                              <div class="col-lg-12">
                                <div class="text-center"><a href="javascript:void(0);" id="forget-form-link" tabindex="5" class="forgot-password"><?php echo $wo['lang']['forget_password'];?></a>
                                </div>
                              </div>
                            </div>
                          </div>
                        </form>
                        <form id="register-form" action="#" method="post" role="form" style="display: none;">
                          <div id="register-alerts"></div>
                          <div class="form-group inner-addon  <?php echo Wo_RightToLeft('left-addon');?> ">
                            <i class="glyphicon fa fa-user"></i>
                            <input type="text" name="username"  class="form-control" placeholder="<?php echo $wo['lang']['username'];?>" />
                          </div>
                          <div class="form-group inner-addon  <?php echo Wo_RightToLeft('left-addon');?> ">
                            <i class="glyphicon fa fa-envelope-o"></i>
                            <input type="email" name="email"  class="form-control" placeholder="<?php echo $wo['lang']['email_address'];?>" />
                          </div>
                          <div class="form-group inner-addon  <?php echo Wo_RightToLeft('left-addon');?> ">
                            <i class="glyphicon fa fa-unlock-alt"></i>
                            <input type="password" name="password"  class="form-control" placeholder="<?php echo $wo['lang']['password'];?>" />
                          </div>
                          <div class="form-group inner-addon  <?php echo Wo_RightToLeft('left-addon');?> ">
                            <i class="glyphicon fa fa-unlock-alt"></i>
                            <input type="password" name="confirm_password"  class="form-control" placeholder="<?php echo $wo['lang']['confirm_password'];?>" />
                          </div>
                          <div class="form-group">
                            <select name="gender" id="gender" class="form-control">
                              <option value="male"><?php echo $wo['lang']['male'];?></option>
                              <option value="female"><?php echo $wo['lang']['female'];?></option>
                            </select>
                          </div>
                          <?php if($wo['config']['reCaptcha'] == 1):?>
                          <div class="form-group">
                            <div class="g-recaptcha" data-sitekey="<?php echo $wo['config']['reCaptchaKey']?>"></div>
                          </div>
                          <?php endif; ?>
                          <?php if(!empty( $_GET['last_url'])){?>
                          <div class="form-group">
                            <input type="hidden" name="last_url" value="<?php echo urldecode($_GET['last_url']);?>">
                          </div>
                          <?php } ?>
                          <div class="form-group">
                            <div class="row">
                              <div class="col-sm-6 col-sm-offset-3">
                                <button type="submit" name="register_submit" id="register-submit"  value=" Let's Go!" class="form-control btn btn-register">
                                <i class="fa fa-sign-in progress-icon" data-icon="sign-in"></i> <?php echo $wo['lang']['lets_go'];?></button>
                              </div>
                            </div>
                          </div>
                        </form>
                        <form id="forget-form" action="#" method="post" role="form" style="display: none;">
                          <div id="forget-alerts"></div>
                          <div class="form-group inner-addon  <?php echo Wo_RightToLeft('left-addon');?> ">
                            <i class="glyphicon fa fa-envelope-o"></i>
                            <input type="text" name="recoveremail"  class="form-control" placeholder="<?php echo $wo['lang']['email'];?>" />
                          </div>
                          <div class="form-group">
                            <div class="row">
                              <div class="col-sm-6 col-sm-offset-3">
                                <button type="submit" name="recover-submit" id="recover-submit"  class="form-control btn btn-register" value="Recover">
                                <i class="fa fa-repeat progress-icon" data-icon="repeat"></i> <?php echo $wo['lang']['recover_password'];?></button>
                              </div>
                            </div>
                          </div>
                        </form>
                      </div>
                    </div>
                  </div>
                </div>
                <?php } ?>
              </div>
            </div>
          </div>
        </div>
        
        
<?php 
$users = Wo_WelcomeUsers(12,'welcome');
?>
        <div class="welcome-users">
        <ul class="list-inline">

   <?php 
   foreach ($users as $wo['user']) {
     echo Wo_LoadPage('welcome/user-list');
   }
   ?>
</ul>
</div>

      </div>

    </div>
   
  </div>

</div>

<script type="text/javascript">
  $(function(){
      $("#element-1").typed({
        strings: ["<?php echo $wo['lang']['welcome_wonder_text'];?>"],
        typeSpeed: -500
      });
      $("#element-2").typed({
        strings: ["<?php echo $wo['lang']['welcome_connect_text'];?>"],
        typeSpeed: -500
      });
      $("#element-3").typed({
        strings: ["<?php echo $wo['lang']['welcome_share_text'];?>"],
        typeSpeed: -500
      });
      $("#element-4").typed({
        strings: ["<?php echo $wo['lang']['welcome_discover_text'];?>"],
        typeSpeed: -500
      });
      $("#element-5").typed({
        strings: ["<?php echo $wo['lang']['welcome_find_more_text'];?>"],
        typeSpeed: -500
      });
      $("#element-6").typed({
        strings: ["<?php echo $wo['lang']['welcome_mobile_text'];?>"],
        typeSpeed: -500
      });
  });
function Wo_GetNewUsers() {
  $.get(Wo_Ajax_Requests_File(), {f: 'get_welcome_users'}, function (data) {
    if (data.status == 200) {
      $('.welcome-users').hide().html(data.html).fadeIn(400);
    }
  });
}

$(function() {
  $('[data-toggle="tooltip"]').tooltip();
});

$('#search-box').submit(function() {
  query = $('#search').val();
      window.location = '<?php echo Wo_SeoLink("index.php?tab1=search&query=")?>' + query;
});
  
</script>

