summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_captiveportal_mac_edit.php
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2012-12-30 15:25:48 -0800
committerChris Buechler <cmb@pfsense.org>2012-12-30 15:25:48 -0800
commit2e4c921fcc177cd4f5213af57e1d7e8ce9e57e62 (patch)
tree59666d5659428a67f4b47be09117d36bd4322322 /usr/local/www/services_captiveportal_mac_edit.php
parente9189747de49402762b2d176a8871ed38ff4e782 (diff)
parent112800ad1c665dda68b8468c77be81e330559d48 (diff)
downloadpfsense-2e4c921fcc177cd4f5213af57e1d7e8ce9e57e62.zip
pfsense-2e4c921fcc177cd4f5213af57e1d7e8ce9e57e62.tar.gz
Merge pull request #270 from CarpeNoctem/CarpeNoctem
Added 'Copy my MAC address' to captive portal Pass-through MAC form, as ...
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 1ab89c1..7e31f42 100755
--- a/usr/local/www/services_captiveportal_mac_edit.php
+++ b/usr/local/www/services_captiveportal_mac_edit.php
@@ -180,6 +180,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