<?php if(!defined('PARENT') || !isset($RF->id)) { exit; } ?>

    <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="#one" data-toggle="tab"><i class="fa fa-globe fa-fw"></i> <span class="hidden-xs"><?php echo $msw_adm_aff_referral_edit3; ?></span></a></li>
        </ul>
      </div>
    </div>

    <form method="post" action="#">
    <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="one">
            <div class="panel panel-default">
              <div class="panel-body">
                <div class="form-group">
                  <label><?php echo $msw_adm_aff_referral8; ?></label>
                  <select name="fm[product]" class="form-control">
                  <option value="0">- - - - - -</option>
                  <?php
                  $Q = $DB->db_query("SELECT `id`,`name` FROM `" . DB_PREFIX . "products` WHERE `en` = 'yes' ORDER BY `name`");
                  while ($P = $DB->db_object($Q)) {
                  ?>
                  <option value="<?php echo $P->id; ?>"<?php echo (isset($RF->product) && $RF->product == $P->id ? ' selected="selected"' : ''); ?>><?php echo mswCD($P->name); ?></option>
                  <?php
                  }
                  ?>
                  </select>
                </div>
                <div class="form-group">
                  <label><?php echo $msw_adm_aff_referral_edit4; ?></label>
                  <input type="text" class="form-control" name="fm[referrer]" value="<?php echo (isset($RF->referrer) ? mswSH($RF->referrer) : ''); ?>">
                </div>
                <div class="form-group">
                  <label><?php echo $msw_adm_aff_referral_edit5; ?></label>
                  <input type="text" class="form-control" name="fm[count]" value="<?php echo (isset($RF->count) ? mswSH($RF->count) : ''); ?>">
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>

    <div class="act-button">
      <button type="button" class="btn btn-success" onclick="mswAction('<?php echo $cmd . (isset($RF->id) ? '-edit' : ''); ?>')"><i class="fa fa-<?php echo (isset($RF->id) ? 'check' : 'plus'); ?> fa-fw"></i> <span class="hidden-xs"><?php echo (isset($RF->id) ? $msw_common5 : $msw_adm_aff_referral_edit2); ?></span></button>
      <input type="hidden" name="fm[id]" value="<?php echo $RF->id; ?>">
      <input type="hidden" name="fm[aff]" value="<?php echo $RF->affid; ?>">
      <button type="button" class="btn btn-default left_20" onclick="mswWin('aff-referrals&amp;id=<?php echo $RF->affid; ?>')"><i class="fa fa-arrow-left fa-fw"></i> <span class="hidden-xs"><?php echo $msw_common6; ?></span></button>
    </div>
    </form>