X-Git-Url: http://git.datanom.net/qtadmin.git/blobdiff_plain/6b3d5ba966ffd150d635a618593295958233baef..181e3b1fd8edb3f279d1a6ebb6190dfc59a918b0:/lib/utils.inc.php?ds=sidebyside diff --git a/lib/utils.inc.php b/lib/utils.inc.php index 89f226d..5832d29 100644 --- a/lib/utils.inc.php +++ b/lib/utils.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);