X-Git-Url: http://git.datanom.net/qtadmin.git/blobdiff_plain/7ef22e2126b630156852e59acdb9d54283ab3462..9d35b77325b30611cc1fc29fadd177dca7f56acc:/lib/utils.inc.php diff --git a/lib/utils.inc.php b/lib/utils.inc.php index 7ad8969..5832d29 100644 --- a/lib/utils.inc.php +++ b/lib/utils.inc.php @@ -1,5 +1,5 @@ root .'config.php'; require_once $CFG->root . 'lib/session_handler.inc.php'; @@ -22,9 +22,10 @@ class Utils { __TITLE__ -'; - private $footer = ''; +
'; + private $footer = '
'; private $heading = '

Session timeout:

__TITLE__

'; @@ -313,6 +314,20 @@ class Utils { return $user; } + public function authorized($recipient) { + $authorized = false; + + $this->log("authorized '$recipient'", 3); + + if ($this->isAdmin() || $this->getUser() == $recipient) { + $authorized = true; + } + $msg = ($authorized) ? 'authorize' : 'not authorize'; + $this->log("$msg '".$this->getUser()."' rcpt '$recipient'", 3); + + return $authorized; + } + public function getHeader() { $this->log("getHeader", 4);