From c59e36a2f596ef4d9313ba3758490e4ce31ce199 Mon Sep 17 00:00:00 2001 From: Christopher Vagnetoft Date: Fri, 16 Dec 2016 01:05:13 +0100 Subject: [PATCH] Added username and hostname modules --- modules/hostname.php | 13 +++++++++++++ modules/username.php | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 modules/hostname.php create mode 100644 modules/username.php diff --git a/modules/hostname.php b/modules/hostname.php new file mode 100644 index 0000000..daadf21 --- /dev/null +++ b/modules/hostname.php @@ -0,0 +1,13 @@ + $opts[HOSTNAME_CLASS] + ]; + $host = trim(exec("whoami")); + return panel($host, $attr, 'hostname'); +} +module("hostname", "Hostname"); +option("class", HOSTNAME_CLASS, "string", "The class to use", "system"); \ No newline at end of file diff --git a/modules/username.php b/modules/username.php new file mode 100644 index 0000000..a222f7c --- /dev/null +++ b/modules/username.php @@ -0,0 +1,13 @@ + $opts[USERNAME_CLASS] + ]; + $user = trim(exec("whoami")); + return panel($user, $attr, 'username'); +} +module("username", "Username"); +option("class", USERNAME_CLASS, "string", "The class to use", "user"); \ No newline at end of file