X-Git-Url: http://git.datanom.net/qtadmin.git/blobdiff_plain/6ead258e1dd52b40f292e8bc8f3d7fe901cfafdc..cdd7c88aefbc8b76b73397292800a0beaa8667b0:/lib/utils.inc.php?ds=sidebyside diff --git a/lib/utils.inc.php b/lib/utils.inc.php index c4a99b5..eec51cd 100644 --- a/lib/utils.inc.php +++ b/lib/utils.inc.php @@ -19,11 +19,13 @@ class Utils { + __TITLE__ -'; - private $footer = ''; +
'; + private $footer = '
'; private $heading = '

Session timeout:

__TITLE__

'; @@ -312,6 +314,19 @@ class Utils { return $user; } + public function authorized($recipient) { + $authorized = false; + + $this->log("authorized '$recipient'", 3); + + if ($this->isAdmin() || $this->getUser() == $recipient) { + $authorized = true; + } + $this->log("authorized '".$this->getUser()."'", 3); + + return $authorized; + } + public function getHeader() { $this->log("getHeader", 4);