require_once('lib/trait/Connection.class.php');
require_once('lib/trait/CryptLib.class.php');
require_once('lib/trait/Login.class.php');
+require_once('lib/trait/Network.class.php');
require_once('lib/trait/Phone.class.php');
require_once('lib/trait/System.class.php');
use Connection;
use CryptLib;
use Login;
+ use Network;
use Phone;
use System;
--- /dev/null
+<?php
+/**
+ * @author Jan Altensen (Stricted)
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @copyright 2015 Jan Altensen (Stricted)
+ */
+trait Network {
+ /**
+ * get all devices in network
+ *
+ * @return array
+ */
+ public function lanDeviceOverview () {
+ $data = $this->getData('LAN');
+ $data = $this->getValues($data);
+
+ if (isset($data['addmdevice'])) {
+ return $data['addmdevice'];
+ }
+ else {
+ return array();
+ }
+ }
+}
$this->checkLogin();
$path = 'data/PhoneBook.json';
- $fields = array(
- 'csrf_token' => $this->token,
+ $fields = array('csrf_token' => $this->token,
'id' => $id,
'search' => '',
'phonebook_name' => $name,
$this->checkLogin();
$path = 'data/PhoneBook.json';
- $fields = array(
- 'csrf_token' => $this->token,
+ $fields = array('csrf_token' => $this->token,
'id' => $id,
'deleteEntry' => 'delete'
);