summaryrefslogtreecommitdiffstats
path: root/modules-available/usblockoff/page.inc.php
diff options
context:
space:
mode:
authorJannik Schönartz2017-12-28 18:01:28 +0100
committerJannik Schönartz2017-12-28 18:01:28 +0100
commitddb431fa8b017790ba86e2ee86475468c848ea81 (patch)
treea1b75e89672afc8f52f292d6dd1e3b11e68b8b20 /modules-available/usblockoff/page.inc.php
parent[usb-lock-off] API device delete function now works with the new db struct. (diff)
downloadslx-admin-ddb431fa8b017790ba86e2ee86475468c848ea81.tar.gz
slx-admin-ddb431fa8b017790ba86e2ee86475468c848ea81.tar.xz
slx-admin-ddb431fa8b017790ba86e2ee86475468c848ea81.zip
[usb-lock-off] Code cleanup and removed code for the old db struct.
Diffstat (limited to 'modules-available/usblockoff/page.inc.php')
-rw-r--r--modules-available/usblockoff/page.inc.php39
1 files changed, 0 insertions, 39 deletions
diff --git a/modules-available/usblockoff/page.inc.php b/modules-available/usblockoff/page.inc.php
index fc805fe0..f582cf92 100644
--- a/modules-available/usblockoff/page.inc.php
+++ b/modules-available/usblockoff/page.inc.php
@@ -19,16 +19,12 @@ class Page_usblockoff extends Page
}
$this->action = Request::post('action');
- error_log($this->action);
if ($this->action === 'updateConfig') {
$this->updateConfig();
} elseif ($this->action === 'deleteConfig') {
$this->deleteConfig();
}
- // elseif ($this->action === 'addDevices') {
- // $this->addDevices();
- //}
}
/**
@@ -39,7 +35,6 @@ class Page_usblockoff extends Page
$this->loadConfigChooser();
}
-
protected function loadConfigChooser()
{
$dbquery = Database::simpleQuery("SELECT configid, configname FROM `usb_configs`");
@@ -187,32 +182,7 @@ class Page_usblockoff extends Page
private function ajaxDeviceList()
{
-
- //$usbdevices = array();
$usbdevices = $this->getUsbDeviceList();
-/*
- $dbquery = Database::simpleQuery("SELECT * FROM `usb_devices`");
- while ($entry = $dbquery->fetch(PDO::FETCH_ASSOC)) {
- $locationquery = Database::queryFirst("SELECT l.locationname AS 'name', m.clientip AS 'ip' FROM machine AS m JOIN location AS l ON l.locationid=m.locationid
- WHERE m.machineuuid=:machineuuid", array('machineuuid' => $entry['machineuuid']));
-
- $device['uid'] = $entry['uid'];
- $device['id'] = $entry['id'];
- $device['name'] = $entry['name'];
- $device['serial'] = $entry['serial'];
- $device['machineuuid'] = $entry['machineuuid'];
- $device['user'] = $entry['user'];
- $device['clientip'] = $locationquery['ip'];
- $device['date'] = date('d.m.Y', $entry['time']);
- $device['time'] = date('G:i', $entry['time']);
- $device['location'] = $locationquery['name'];
- $ruleInformation = json_decode($entry['ruleInformation'], true);
- $device['hash'] = $ruleInformation['hash'];
- $device['parent-hash'] = $ruleInformation['parent-hash'];
- $device['via-port'] = $ruleInformation['via-port'];
- $device['with-interface'] = $ruleInformation['with-interface'];
- $usbdevices[] = $device;
- }*/
$settings = array();
$setting = array();
@@ -292,19 +262,10 @@ class Page_usblockoff extends Page
$device['location'] = $locationquery['name'];
}
- //$device['uid'] = $entry['uid'];
$device['id'] = $device['vendorid'] . ":" . $device['productid'];
- //$device['name'] = $entry['name'];
$device['serial'] = $entry['serial'];
- //$device['machineuuid'] = $entry['machineuuid'];
- //$device['user'] = $entry['user'];
$device['date'] = date('d.m.Y', $device['lastseen']);
$device['time'] = date('G:i', $device['lastseen']);
- //$ruleInformation = json_decode($entry['ruleInformation'], true);
- //$device['hash'] = $ruleInformation['hash'];
- //$device['parent-hash'] = $ruleInformation['parent-hash'];
- //$device['via-port'] = $ruleInformation['via-port'];
- //$device['with-interface'] = $ruleInformation['with-interface'];
$usbdevices[] = $device;
}