3 * @author Jan Altensen (Stricted)
4 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
5 * @copyright 2015 Jan Altensen (Stricted)
9 * change dsl connection status
11 * @param string $status
14 public function changeDSLStatus ($status) {
17 $path = 'data/Connect.json';
19 if ($status == 'online' ||
$status == 'offline') {
20 $fields = array('csrf_token' => 'nulltoken', 'showpw' => 0, 'password' => $this->hash
, 'req_connect' => $status);
21 $data = $this->sentRequest($path, $fields, true);
22 $data = $this->getValues($data['body']);
24 if ($data['status'] == 'ok') {
32 throw new RouterException('unknown status');
37 * change lte connection status
39 * @param string $status
42 public function changeLTEStatus ($status) {
43 throw new Exception('unstable funtion');
44 $path = 'data/Modules.json';
46 if ($status == '0' ||
$status == '1' ||
$status == 'yes' ||
$status == 'no') {
47 if ($status == 'yes') $status = '1';
48 else if ($status == 'no') $status = '0';
50 $fields = array('csrf_token' => $this->token
, 'use_lte' => $status);
51 $data = $this->sentEncryptedRequest($path, $fields, true);
57 throw new RouterException('unknown status');
66 public function reconnectLte () {
69 $path = 'data/modules.json';
70 $fields = array('csrf_token' => $this->token
, 'lte_reconn' => '1');
71 $data = $this->sentEncryptedRequest($path, $fields, true);