<div class="tab-container">
   <form class="form-horizontal setting-privacy-form" method="post">
      <fieldset>
         <legend> <i class="fa fa-lock"></i> <?php echo $wo['lang']['privacy_setting']; ?>  <?php if(Wo_IsAdmin($wo['user']['user_id']) === true) { ?><small><a href="<?php echo Wo_SeoLink('index.php?tab1=timeline&u=' . $wo['setting']['username']);?>">(<?php echo $wo['setting']['name'];?>)</a></small><?php } ?></legend>
         <div class="setting-privacy-alert setting-update-alert"></div>
         <!-- Select Basic -->
         <?php if ($wo['config']['connectivitySystem'] == 0) { ?>
         <div class="form-group">
            <label class="col-md-5" for="follow_privacy"> <?php echo $wo['lang']['follow_privacy_label']; ?></label>
            <div class="col-md-5">
               <select id="follow_privacy" name="follow_privacy" class="form-control">
                  <?php 
                  $selected_followp_everyone   = ($wo['setting']['follow_privacy'] == 0)   ? ' selected' : '';
                  $selected_followp_following  = ($wo['setting']['follow_privacy'] == 1)   ? ' selected' : '';
                  ?>
                  <option value="0" <?php echo $selected_followp_everyone; ?>><?php echo $wo['lang']['everyone']; ?></option>
                  <option value="1" <?php echo $selected_followp_following; ?>>
                     <?php  echo $wo['lang']['people_i_follow']; ?>
                  </option>
               </select>
            </div>
         </div>
         <?php } ?>
         <!-- Select Basic -->
         <div class="form-group">
            <label class="col-md-5" for="message_privacy"><?php echo $wo['lang']['message_privacy_label']; ?></label>
            <div class="col-md-5">
               <select id="message_privacy" name="message_privacy" class="form-control">
                  <?php 
                  $selected_meesageP_everyone   = ($wo['setting']['message_privacy'] == 0)   ? ' selected' : '';
                  $selected_meesageP_following  = ($wo['setting']['message_privacy'] == 1)   ? ' selected' : '';
                  ?>
                  <option value="0" <?php echo $selected_meesageP_everyone; ?> ><?php echo $wo['lang']['everyone']; ?></option>
                  <option value="1" <?php echo $selected_meesageP_following; ?> >
                     <?php 
                     if ($wo['config']['connectivitySystem'] == 1) {
                        echo $wo['lang']['my_friends'];
                      } else {
                        echo $wo['lang']['people_i_follow'];
                      }
                      ?>
                  </option>
               </select>
            </div>
         </div>
         <!-- Select Basic -->
         <div class="form-group">
            <label class="col-md-5" for="post_privacy"><?php echo $wo['lang']['timeline_post_privacy_label']; ?></label>
            <div class="col-md-5">
               <select id="post_privacy" name="post_privacy" class="form-control">
                  <?php 
                  $selected_postp_everyone   = ($wo['setting']['post_privacy'] == "everyone")   ? ' selected' : '';
                  $selected_postp_following  = ($wo['setting']['post_privacy'] == "ifollow")     ? ' selected' : '';
                  $selected_postp_none       = ($wo['setting']['post_privacy'] == "nobody")      ? ' selected'  : '';
                  ?>
                  <option value="everyone" <?php echo $selected_postp_everyone; ?>><?php echo $wo['lang']['everyone']; ?></option>
                  <option value="ifollow" <?php echo $selected_postp_following; ?>>
                     <?php 
                      if ($wo['config']['connectivitySystem'] == 1) {
                        echo $wo['lang']['my_friends'];
                      } else {
                        echo $wo['lang']['people_i_follow'];
                      }
                      ?>
                  </option>
                  <option value="nobody" <?php echo $selected_postp_none; ?>><?php echo $wo['lang']['no_body']; ?></option>
               </select>
            </div>
         </div>
         <?php if($wo['config']['connectivitySystem'] == 0) { ?>
         <div class="form-group">
            <label class="col-md-5" for="confirm_followers"> <?php echo $wo['lang']['confirm_request_privacy_label']; ?> </label>
            <div class="col-md-5">
               <select id="confirm_followers" name="confirm_followers" class="form-control">
                  <?php 
                  $selected_confirm_followers_no   = ($wo['setting']['confirm_followers'] == 0)   ? ' selected' : '';
                  $selected_confirm_followers_yes  = ($wo['setting']['confirm_followers'] == 1)   ? ' selected' : '';
                  ?>
                  <option value="0" <?php echo $selected_confirm_followers_no; ?>>
                     <?php echo $wo['lang']['no']; ?>
                  </option>
                  <option value="1" <?php echo $selected_confirm_followers_yes; ?>>
                     <?php echo $wo['lang']['yes']; ?>
                  </option>
               </select>
            </div>
         </div>
         <?php } ?>
         
         <!-- Multiple Radios (inline) -->
         <div class="form-group">
            <label class="col-md-5" for="show_activities_privacy"><?php echo $wo['lang']['activities_privacy_label']; ?>  </label>
            <div class="col-md-5"> 
               <?php 
               $selected_activities_yes   = ($wo['setting']['show_activities_privacy'] == 1)   ? ' checked' : '';
               $selected_activities_no    = ($wo['setting']['show_activities_privacy'] == 0)   ? ' checked' : '';
               ?>
               <label class="radio-inline" for="show_activities_privacy-0">
               <input type="radio" name="show_activities_privacy" id="show_activities_privacy-0" value="1" <?php echo $selected_activities_yes;?> >
               <?php echo $wo['lang']['show']; ?>
               </label> 
               <label class="radio-inline" for="show_activities_privacy-1">
               <input type="radio" name="show_activities_privacy" id="show_activities_privacy-1" value="0" <?php echo $selected_activities_no;?>>
               <?php echo $wo['lang']['hide']; ?>
               </label>
            </div>
         </div>
         <?php if ($wo['config']['user_lastseen'] == 1) { ?>
         <!-- Multiple Radios (inline) -->
         <div class="form-group">
            <label class="col-md-5" for="showlastseen"><?php echo $wo['lang']['lastseen_privacy_label']; ?> </label>
            <div class="col-md-5"> 
               <?php 
                $selected_lastseen_yes   = ($wo['setting']['showlastseen'] == 1)   ? ' checked' : '';
                $selected_lastseen_no    = ($wo['setting']['showlastseen'] == 0)   ? ' checked' : '';
                ?>
               <label class="radio-inline" for="showlastseen-0">
               <input type="radio" name="showlastseen" id="showlastseen-0" value="1" <?php echo $selected_lastseen_yes;?> >
               <?php echo $wo['lang']['show']; ?>
               </label> 
               <label class="radio-inline" for="showlastseen-1">
               <input type="radio" name="showlastseen" id="showlastseen-1" value="0" <?php echo $selected_lastseen_no;?>>
               <?php echo $wo['lang']['hide']; ?>
               </label>
            </div>
         </div>
         <?php } ?>
           <div class="form-group">
            <label class="col-md-5" for="chat_status"><?php echo $wo['lang']['status'];?></label>
            <div class="col-md-5"> 
               <?php 
                $selected_chat_status_yes   = ($wo['setting']['status'] == 0)   ? ' checked' : '';
                $selected_chat_status_no    = ($wo['setting']['status'] == 1)   ? ' checked' : '';
                ?>
               <label class="radio-inline" for="chat_status-0">
               <input type="radio" name="chat_status" id="chat_status-0" value="0" <?php echo $selected_chat_status_yes;?> >
               <?php echo $wo['lang']['online']; ?>
               </label> 
               <label class="radio-inline" for="chat_status-1">
               <input type="radio" name="chat_status" id="chat_status-1" value="1" <?php echo $selected_chat_status_no;?>>
               <?php echo $wo['lang']['offline']; ?>
               </label>
            </div>
         </div>
         <div class="form-group">
            <label class="col-md-5" for="country"></label>
            <div class="col-sm-4 text-left">
               <button type="submit" name="save_setting" id="save-setting" tabindex="4" value="Save" class="form-control btn-main-color btn-main">
               <i class="fa fa-floppy-o progress-icon" data-icon="floppy-o"></i> <?php echo $wo['lang']['save']; ?></button>
            </div>
         </div>
         <input type="hidden" name="user_id" value="<?php echo $wo['setting']['user_id'];?>">
      </fieldset>
   </form>
</div>
<script type="text/javascript">
$(function() {
  $('form.setting-privacy-form').ajaxForm({
    url: Wo_Ajax_Requests_File() + '?f=update_privacy_settings',
    beforeSend: function() {
      Wo_progressIconLoader($('form.setting-privacy-form').find('button'));
    },
    success: function(data) {
      scrollToTop();
      if (data.status == 200) {
        $('.setting-privacy-alert').html('<div class="alert alert-success">' + data.message + '</div>');
        $('.alert-success').fadeIn('fast', function() {
          $(this).delay(2500).slideUp(500, function() {
            $(this).remove();
          });
        });
      } 
      Wo_progressIconLoader($('form.setting-privacy-form').find('button'));
    }
  });
});
</script>