Add contacts array to provisioning.
This commit is contained in:
parent
fdad0b28a1
commit
edb7163f08
|
|
@ -382,6 +382,22 @@ include "root.php";
|
|||
//create a mac address with back slashes for backwards compatability
|
||||
$mac_dash = substr($mac, 0,2).'-'.substr($mac, 2,2).'-'.substr($mac, 4,2).'-'.substr($mac, 6,2).'-'.substr($mac, 8,2).'-'.substr($mac, 10,2);
|
||||
|
||||
//get the contacts array and add to the template engine
|
||||
if (strlen($device_uuid) > 0 and strlen($domain_uuid) > 0) {
|
||||
//get contacts from the database
|
||||
$sql = "select * ";
|
||||
$sql .= "from v_contacts ";
|
||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||
$sql .= "order by contact_organization desc, contact_name_given asc, contact_name_family asc ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$contacts = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
unset ($prep_statement, $sql);
|
||||
|
||||
//assign the contacts array
|
||||
$view->assign("contacts", $contacts);
|
||||
}
|
||||
|
||||
//get the provisioning information from device lines table
|
||||
if (strlen($device_uuid) > 0) {
|
||||
//get the device lines array
|
||||
|
|
|
|||
Loading…
Reference in New Issue