X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Fdbase_base.phh;h=d2cebbc49d80d784fc70b88208c0fdd6045abdce;hb=97a6d096a5e248061cbc7d1769f2ad866a7b9bcd;hp=85d9315c172077d02f55a16c995e0a0ecf4816ae;hpb=b45d86b1a08e04f516bca2887126fcedeb2abc24;p=brisk.git diff --git a/web/Obj/dbase_base.phh b/web/Obj/dbase_base.phh index 85d9315..d2cebbc 100644 --- a/web/Obj/dbase_base.phh +++ b/web/Obj/dbase_base.phh @@ -98,6 +98,25 @@ class LoginDBItem { { return $this->supp_comp; } + function supp_comp_get_array() + { + $ret = array(); + $group_id = array("fg", "bg"); + $comp_id = array("r", "g", "b"); + $ret_arr = array(); + $supp_comp = $this->supp_comp; + + for ($i = 0 ; $i < 2 ; $i++) { + $group_cur = $group_id[$i]; + $ret_arr[$group_cur] = array(); + for ($e = 0 ; $e < 3 ; $e++) { + $ret_arr[$group_cur][$comp_id[$e]] = base_convert(substr($supp_comp, $i*3 + $e, 2), 16, 10); + } + } + + return ($ret_arr); + } + function supp_comp_set($supp_comp) { $this->supp_comp = $supp_comp; @@ -182,9 +201,10 @@ class MailDBItem { } } -define('USERSNET_FRIEND', 1); -define('USERSNET_SKILL', 1); -define('USERSNET_TRUST', 2); +define('USERSNET_DEF_FRIEND', 2); +define('USERSNET_DEF_SKILL', 2); +define('USERSNET_DEF_TRUST', 2); + class UsersNetItem { var $owner; var $target; @@ -219,8 +239,8 @@ class UsersNetItem { static function UsersNetItemDefaults($owner, $target, $widefriend, $narrowfriend) { - $ret = new UsersNetItem($owner, $target, USERSNET_FRIEND, - USERSNET_SKILL, USERSNET_TRUST, + $ret = new UsersNetItem($owner, $target, USERSNET_DEF_FRIEND, + USERSNET_DEF_SKILL, USERSNET_DEF_TRUST, $widefriend, $narrowfriend, FALSE); return ($ret);