<?php if(!defined('PARENT')) { exit; }
$params = $SOCIAL->params();
?>

    <div class="row">
      <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
        <ul class="nav nav-tabs">
          <li class="active"><a href="#two" data-toggle="tab"><i class="fa fa-link fa-fw"></i> <span class="hidden-xs"><?php echo $msw_adm_social3; ?></span></a></li>
          <li><a href="#three" data-toggle="tab"><i class="fa fa-cog"></i> <span class="hidden-xs"><?php echo $msw_adm_social4; ?></span></a></li>
        </ul>
      </div>
    </div>

    <form method="post" action="?p=<?php echo $cmd; ?>">
    <div class="row formarea">
      <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
        <div class="tab-content">
          <div class="tab-pane active in" id="two">
            <div class="panel panel-default">
              <div class="panel-body">
                <div class="bxs">
                  <?php
                  if (!empty($params['links'])) {
                  foreach ($params['links'] AS $lK => $lV) {
                    $protocol = 'http';
                    if (substr($lV, 0, 5) == 'http:') {
                      $lV = substr($lV, 7);  
                    }
                    if (substr($lV, 0, 6) == 'https:') {
                      $protocol = 'https';
                      $lV = substr($lV, 8);
                    }
                    ?>
                    <div class="form-group">
                      <div class="form-group input-group">
                        <span class="input-group-addon"><i class="fa fa-<?php echo $lK; ?> fa-fw"></i></span>
                        <div class="input-group-btn bs-dropdown-to-select-group ">
                          <button type="button" style="border-radius:0" class="btn btn-default dropdown-toggle as-is bs-dropdown-to-select" data-toggle="dropdown">
                            <span><?php echo $msw_11_admin[8]; ?> (<span class="btn_protocol_<?php echo $lK; ?>"><?php echo $protocol; ?></span>)</span>
                            <span class="caret"></span>
                          </button>
                          <ul class="dropdown-menu protarea<?php echo $lK; ?>" role="menu">
                            <li<?php echo ($protocol == 'http' ? ' class="active"' : ''); ?>><a href="#" onclick="mswSetLinkProtocol('http','<?php echo $lK; ?>');return false">http://</a></li>
                            <li<?php echo ($protocol == 'https' ? ' class="active"' : ''); ?>><a href="#" onclick="mswSetLinkProtocol('https','<?php echo $lK; ?>');return false">https://</a></li>
                          </ul>
                        </div>
                        <input type="hidden" name="fm[protocol][<?php echo $lK; ?>]" value="<?php echo ($protocol == 'http' ? 'http' : 'https'); ?>">
                        <input type="text" class="form-control" name="fm[links][<?php echo $lK; ?>]" value="<?php echo mswSH($lV); ?>">
                      </div>
                    </div>
                    <?php
                    }
                  } else {
                    echo '<p class="mswitalic"><i class="fa fa-warning fa-fw"></i> ' . $msw_adm_social19 . '</p>';
                  }
                  ?>
                </div>
                <hr>
                <div class="row">
                  <div class="col-lg-4 col-md-4">
                    <div class="form-group input-group">
                      <span class="input-group-addon"><a href="https://fontawesome.com/v4.7.0/icons/" onclick="window.open(this);return false"><i class="fa fa-font-awesome fa-fw"></i></a></span>
                      <input type="text" class="form-control" name="fawe" value="" placeholder="<?php echo mswSH($msw_adm_social17); ?>">
                   </div>
                  </div>
                  <div class="col-lg-8 col-md-8">
                    <div class="input-group">
                       <input type="text" class="form-control" name="flink" value="" placeholder="<?php echo mswSH($msw_adm_social18); ?>">
                       <span class="input-group-btn">
                         <button class="btn btn-info" type="button" onclick="mswLnk(this)"><i class="fa fa-plus fa-fw"></i></button>
                       </span>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="tab-pane fade" id="three">
            <div class="panel panel-default">
              <div class="panel-body">
                <div class="form-group">
                  <label><?php echo $msw_adm_social14; ?></label>
                  <div class="radio">
                    <label><input type="radio" name="fm[struct][fb]" value="yes"<?php echo (isset($params['struct']['fb']) && $params['struct']['fb'] == 'yes' ? ' checked="checked"' : (!isset($params['struct']['fb']) ? ' checked="checked"' : '')); ?>> <?php echo $msw_common; ?></label>
                  </div>
                  <div class="radio">
                   <label><input type="radio" name="fm[struct][fb]" value="no"<?php echo (isset($params['struct']['fb']) && $params['struct']['fb'] == 'no' ? ' checked="checked"' : ''); ?>> <?php echo $msw_common2; ?></label>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="act-button">
      <button type="button" class="btn btn-success" onclick="mswAction('<?php echo  $cmd; ?>')"><i class="fa fa-check fa-fw"></i> <span class="hidden-xs"><?php echo $msw_common5; ?></span></button>
    </div>
    </form>
