Skip to content

Commit

Permalink
Added username and hostname modules
Browse files Browse the repository at this point in the history
  • Loading branch information
noccy80 committed Dec 16, 2016
1 parent b8d5002 commit c59e36a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
13 changes: 13 additions & 0 deletions modules/hostname.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

define("HOSTNAME_CLASS", "class");

function _hostname(array $opts) {
$attr = [
'class' => $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");
13 changes: 13 additions & 0 deletions modules/username.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

define("USERNAME_CLASS", "class");

function _username(array $opts) {
$attr = [
'class' => $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");

0 comments on commit c59e36a

Please sign in to comment.