summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_captiveportal_mac_edit.php
diff options
context:
space:
mode:
authorCarpeNoctem <aj2600@gmail.com>2012-11-29 04:20:02 -0700
committerCarpeNoctem <aj2600@gmail.com>2012-11-29 04:20:02 -0700
commit112800ad1c665dda68b8468c77be81e330559d48 (patch)
tree6904dcb49640de093f86013670822f3ccd8eb89a /usr/local/www/services_captiveportal_mac_edit.php
parent007161dc9f03a8eef92dc6e4ad3d54b317e98ee8 (diff)
downloadpfsense-112800ad1c665dda68b8468c77be81e330559d48.zip
pfsense-112800ad1c665dda68b8468c77be81e330559d48.tar.gz
Added 'Copy my MAC address' to captive portal Pass-through MAC form, as seen on services_dhcp_edit.php
Diffstat (limited to 'usr/local/www/services_captiveportal_mac_edit.php')
-rwxr-xr-xusr/local/www/services_captiveportal_mac_edit.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/usr/local/www/services_captiveportal_mac_edit.php b/usr/local/www/services_captiveportal_mac_edit.php
index e4bf5a4..a5d023f 100755
--- a/usr/local/www/services_captiveportal_mac_edit.php
+++ b/usr/local/www/services_captiveportal_mac_edit.php
@@ -173,6 +173,12 @@ include("head.inc");
<td width="22%" valign="top" class="vncellreq"><?=gettext("MAC address"); ?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="mac" type="text" class="formfld unknown" id="mac" size="17" value="<?=htmlspecialchars($pconfig['mac']);?>">
+ <?php
+ $ip = getenv('REMOTE_ADDR');
+ $mac = `/usr/sbin/arp -an | grep {$ip} | cut -d" " -f4`;
+ $mac = str_replace("\n","",$mac);
+ ?>
+ <a OnClick="document.forms[0].mac.value='<?=$mac?>';" href="#"><?=gettext("Copy my MAC address");?></a>
<br>
<span class="vexpl"><?=gettext("MAC address (6 hex octets separated by colons)"); ?></span></td>
</tr>
OpenPOWER on IntegriCloud