if(preg_match("/on (.*) inet proto (.*) from any to any port = (.*) keep state label \"(.*)\" rtable [0-9] -> (.*) port (.*)/",$rdr_entry,$matches))
$rdr_proto=$matches[2];
$rdr_port=$matches[3];
$rdr_label=$matches[4];
$rdr_ip=$matches[5];
$rdr_iport=$matches[6];
?>
<tr>
<tdclass="listlr">
<?phpprint$rdr_port;?>
</td>
<tdclass="listlr">
<?phpprint$rdr_proto;?>
</td>
<tdclass="listlr">
<?phpprint$rdr_ip;?>
</td>
<tdclass="listlr">
<?phpprint$rdr_iport;?>
</td>
<tdclass="listlr">
<?phpprint$rdr_label;?>
</td>
</tr>
<?php$i++;}?>
</table>
</div>
<formaction="status_upnp.php"method="post">
<buttontype="submit"name="clear"id="clear"class="btn btn-primary"value="Clear"><?=gettext("Clear");?></button><?=gettext("all currently connected sessions");?>.
<h3><?phpechogettext("UPnP is currently disabled.");?></h3>
</header>
<?php
else:?>
<divclass="table-responsive">
<tableclass="table table-striped">
<thead>
<tr>
<td><?=gettext("Port");?></td>
<td><?=gettext("Protocol");?></td>
<td><?=gettext("Internal IP");?></td>
<td><?=gettext("Int. Port");?></td>
<td><?=gettext("Description");?></td>
</tr>
</thead>
<tbody>
<?php
foreach($rdr_entriesas$rdr_entry):
if(!preg_match("/on (.*) inet proto (.*) from (.*) to (.*) port = (.*) keep state label \"(.*)\" rtable [0-9] -> (.*) port (.*)/",$rdr_entry,$matches)){