<?php
$interNames['all ethernet'] = 'all ethernet';
$interNames['all ppp'] = 'all ppp';
$interNames['all vlan'] = 'all vlan';
$interNames['all wireless'] = 'all wireless';
//var_dump($packetMark);
?>
<label class="control-label" for="firewall-mangle">Chain</label>
<input type="text" class="form-control" name="Mangle[chain]" list="chain" value=<?php echo $model->chain ?>>
<datalist id="chain">

    <?php
    foreach ($chains as $value) {
        echo "<option value=$value>$value</option>";
    }
    ?>

</datalist>
<?= $form->field($model, 'src_address')->label('SRC. Address'); ?>
<?= $form->field($model, 'dst_address')->label('DST. Address'); ?>
<?= $form->field($model, 'protocol'); ?>
<?= $form->field($model, 'src_port')->label('SRC. Port'); ?>
<?= $form->field($model, 'dst_port')->label('DST. Port'); ?>
<?=
$form->field($model, 'p2p')->dropDownList(['' => '',
    'all-p2p' => 'all-p2p',
    'bit-torrent' => 'bit-torrent',
    'blubster' => 'blubster',
    'direct-connect' => 'direct-connect',
    'edonkey' => 'edonkey',
    'fasttrack' => 'fasttrack',
    'gnutella' => 'gnutella',
    'soulseek' => 'soulseek',
    'warez' => 'warez',
    'winmx' => 'winmx']);
?>
<?= $form->field($model, 'in_interface')->dropDownList($interNames); ?>
<?= $form->field($model, 'out_interface')->dropDownList($interNames); ?>
<label class="control-label" for="firewall-mangle">Packet Mark</label>
<input type="text" class="form-control" name="Mangle[packet_mark]" list="packet_mark" value=<?php echo $model->packet_mark ?>>
<datalist id="packet_mark">

    <option value="no-mark">no-mark</option>";
    <?php
    foreach ($packetMark['packet'] as $value) {
        echo "<option value=$value>$value</option>";
    }
    ?>

</datalist></br>
<label class="control-label" for="firewall-mangle">Connection Mark</label>
<input type="text" class="form-control" name="Mangle[connection_mark]" list="connection_mark" value=<?php echo $model->connection_mark ?>>
<datalist id="connection_mark">

    <option value="no-mark">no-mark</option>";
    <?php
    foreach ($packetMark['connection'] as $value) {
        echo "<option value=$value>$value</option>";
    }
    ?>


</datalist>
</br>
<label class="control-label" for="firewall-mangle">Routing Mark</label>
<input type="text" class="form-control" name="Mangle[routing_mark]" list="routing_mark" value=<?php echo $model->routing_mark ?>>
<datalist id="routing_mark">

    <option value="main">main</option>";
    <?php
    foreach ($packetMark['routing'] as $value) {
        echo "<option value=$value>$value</option>";
    }
    ?>


</datalist>
</br>

<?=
$form->field($model, 'connection_type')->dropDownlist(['' => '',
    'ftp' => 'ftp',
    'h323' => 'h323',
    'irc' => 'irc',
    'pptp' => 'pptp',
    'quake3' => 'quake3',
    'sip' => 'sip',
    'tftp' => 'tftp',
    '!ftp' => '!ftp',
    '!h323' => '!h323',
    '!irc' => '!irc',
    '!pptp' => '!pptp',
    '!quake3' => '!quake3',
    '!sip' => '!sip',
    '!tftp' => '!tftp']);
?>
<?= $form->field($model, 'connection_state')->label('Connection State'); ?>

<label class="control-label" for="firewall-mangle">Connection NAT State</label>
<input type="text" class="form-control" name="Mangle[connection_nat_state]" list="connection_nat_state" value=<?php echo $model->connection_nat_state ?>>
<datalist id="connection_nat_state">

    <option value="srcnat">srcnat</option>";
    <option value="dstnat">dstnat</option>";


</datalist>
</br>
