> <?php 
echo gettext("Interface address");
?>
 </option>
                                <option data-other=true value="<?php 
echo $pconfig['targetip'];
?>
" <?php 
echo !empty($pconfig['target']) && !array_key_exists($pconfig['targetip'], formTranslateAddresses()) ? "selected=\"selected\"" : "";
?>
><?php 
echo gettext("Single host or Network");
?>
</option>
<?php 
foreach (formTranslateAddresses() as $optKey => $optValue) {
    ?>
                                    <option value="<?php 
    echo $optKey;
    ?>
" <?php 
    echo $pconfig['target'] == $optKey ? "selected=\"selected\"" : "";
    ?>
>
                                      <?php 
    echo $optValue;
    ?>
                                    </option>
<?php 
}
?>
Exemplo n.º 2
0
                </tr>
                <tr>
                    <td><a id="help_for_target" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?php 
echo gettext("Translation");
?>
</td>
                    <td>
                      <table class="table table-condensed">
                        <tr>
                          <td>
                            <select name="targetip" id="targetip" class="selectpicker" data-live-search="true" data-size="5" data-width="auto">
                                <option data-other=true value="<?php 
echo $pconfig['targetip'];
?>
" <?php 
echo !empty($pconfig['target']) && !array_key_exists($pconfig['targetip'], formTranslateAddresses()) ? "selected=\"selected\"" : "";
?>
><?php 
echo gettext("Single host or Network");
?>
</option>
<?                              foreach (formTranslateAddresses() as $optKey => $optValue):
?>
                                    <option value="<?php 
echo $optKey;
?>
" <?php 
echo $pconfig['target'] == $optKey ? "selected=\"selected\"" : "";
?>
>
                                      <?php