X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Fdbase_base.phh;h=d7d806851fff39ec6c6df0f4492006ab4d7d9f17;hb=a98d543666ef272243bd167647e79073222b0a9d;hp=d2cebbc49d80d784fc70b88208c0fdd6045abdce;hpb=f7068bc71e92a6290b6efcd8c10771aab8bc3449;p=brisk.git diff --git a/web/Obj/dbase_base.phh b/web/Obj/dbase_base.phh index d2cebbc..d7d8068 100644 --- a/web/Obj/dbase_base.phh +++ b/web/Obj/dbase_base.phh @@ -110,13 +110,26 @@ class LoginDBItem { $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); + $ret_arr[$group_cur][$comp_id[$e]] = base_convert(substr($supp_comp, $i*6 + $e*2, 2), 16, 10); } } - return ($ret_arr); } + function supp_comp_set_array($supp_comp_in) + { + $group_id = array("fg", "bg"); + $comp_id = array("r", "g", "b"); + $supp_comp = ""; + + for ($i = 0 ; $i < 2 ; $i++) { + for ($e = 0 ; $e < 3 ; $e++) { + $supp_comp += sprintf("%02x", $supp_comp_in[$group_id[$i]][$comp_id[$e]]); + } + } + $this->supp_comp = $supp_comp; + } + function supp_comp_set($supp_comp) { $this->supp_comp = $supp_comp;