Add option to get the mac address from &name=SEPxxxxx

This commit is contained in:
markjcrane
2015-11-28 19:48:45 -07:00
parent d1931ffc15
commit ce709c6617
2 changed files with 12 additions and 3 deletions

View File

@@ -42,6 +42,15 @@ openlog("fusion-provisioning", LOG_PID | LOG_PERROR, LOG_LOCAL0);
// $device_template = check_str($_REQUEST['template']);
//}
//get the mac address for Cisco 79xx in the URL as &name=SEP000000000000
if (empty($mac)){
$name = check_str($_REQUEST['name']);
if (substr($name, 0, 3) == "SEP") {
$mac = substr($name, 3, 12);
unset($name);
}
}
//check alternate MAC source
if (empty($mac)){
//set the http user agent

View File

@@ -4,16 +4,16 @@
<!--
<MenuItem>
<Name>Personal</Name>
<URL>http://{$domain_name}/app/provision?mac={$mac}&amp;file=directory-personal.xml</URL>
<URL>http://{$domain_name}/app/provision?file=directory-personal.xml</URL>
</MenuItem>
-->
<MenuItem>
<Name>Enterprise</Name>
<URL>http://{$domain_name}/app/provision?mac={$mac}&amp;file=directory-enterprise.xml</URL>
<URL>http://{$domain_name}/app/provision?file=directory-enterprise.xml</URL>
</MenuItem>
<MenuItem>
<Name>Speed Dial</Name>
<URL>http://{$domain_name}/app/provision/?mac={$mac}&amp;file=directory-speed_dial.xml</URL>
<URL>http://{$domain_name}/app/provision/?file=directory-speed_dial.xml</URL>
</MenuItem>
<SoftKeyItem>
<Name>Select</Name>