-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathlaunchdaemons_controller.php
More file actions
executable file
·48 lines (42 loc) · 1.02 KB
/
launchdaemons_controller.php
File metadata and controls
executable file
·48 lines (42 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
/**
* launchdaemons module class
*
* @package munkireport
* @author tuxudo
**/
class Launchdaemons_controller extends Module_controller
{
/*** Protect methods with auth! ****/
public function __construct()
{
// Store module path
$this->module_path = dirname(__FILE__);
}
/**
* Default method
*
* @author AvB
**/
public function index()
{
echo "You've loaded the launchdaemons module!";
}
/**
/**
* Retrieve data in json format
*
* @return void
* @author tuxudo
**/
public function get_tab_data($serial_number = '')
{
// Remove non-serial number characters
$serial_number = preg_replace("/[^A-Za-z0-9_\-]]/", '', $serial_number);
$sql = "SELECT *
FROM launchdaemons
WHERE serial_number = '$serial_number'";
$queryobj = new Launchdaemons_model;
jsonView($queryobj->query($sql));
}
} // END class Launchdaemon_controller