X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Fuser.phh;h=fde4a579a7eaffbd04e9d926f8645a78e01b4380;hb=dc35e3289fd4266bb12ed7c6ec5beab02c1a48de;hp=3ca1f97d6f7aad42a62dcff89cfc44c0dc2036c8;hpb=7f526939ded24298104cacd02b5f364bcc7bfa56;p=brisk.git diff --git a/web/Obj/user.phh b/web/Obj/user.phh index 3ca1f97..fde4a57 100644 --- a/web/Obj/user.phh +++ b/web/Obj/user.phh @@ -345,6 +345,11 @@ class User { return ($thiz); } + function is_appr() + { + return ($this->flags & USER_FLAG_TY_APPR); + } + function is_auth() { return ($this->flags & USER_FLAG_AUTH); @@ -918,5 +923,33 @@ function chunked_fini() } // end class User +if (!isset($__usersnet_friend_map)) { + $__usersnet_friend_map = array("black", "unknown", "test", "friend", "bff"); +} +function usersnet_friend_getlabel($id) +{ + GLOBAL $__usersnet_friend_map; + + $id_i = intval($id); + + if ($id_i < 1 || $id_i > count($__usersnet_friend_map)) { + return FALSE; + } + return ($__usersnet_friend_map[$id_i - 1]); +} + +/* return index + 1 of friend label */ +function usersnet_friend_getid($label_in) +{ + GLOBAL $__usersnet_friend_map; + + foreach ($__usersnet_friend_map as $id => $label) { + if ($label == $label_in) { + return ($id + 1); + } + } + + return FALSE; +} ?>