X-Git-Url: http://mop.ddnsfree.com/gitweb/?p=brisk.git;a=blobdiff_plain;f=web%2FObj%2Fdbase_pgsql.phh;h=80273774967eb31aa85250213c4fe06614568996;hp=48ca78e0c10a17c92614cbff2035ce8f97723c60;hb=4d039a689e6a9a735608bffba118bfbab1fafb10;hpb=5e4b519b81ef7a2699f3870e5262163ba2e7acd9 diff --git a/web/Obj/dbase_pgsql.phh b/web/Obj/dbase_pgsql.phh index 48ca78e..8027377 100644 --- a/web/Obj/dbase_pgsql.phh +++ b/web/Obj/dbase_pgsql.phh @@ -942,6 +942,27 @@ INSERT INTO %smails (code, ucode, type, tstamp, subj, body_txt, body_htm, hash) return ($narrowskill); } + function usersnet_partyskill($owner, $target) + { + GLOBAL $G_dbpfx; + + $partyskill = "non disponibile"; + + $pskl_sql = sprintf("SELECT * FROM %susersnet_party WHERE owner = %d AND target = %d;", + $G_dbpfx, $owner, $target); + if (($pskl_pg = $this->query($pskl_sql)) == FALSE) { + return ($partyskill); + } + + if (pg_numrows($pskl_pg) > 0) { + $pskl_obj = pg_fetch_object($pskl_pg, 0); + // TODO: UNCOMMENT IF THE NETWORK WORKS VERY WELL + // if ($wskl_obj->count >= 3) + $partyskill = sprintf("%3.2f", $pskl_obj->skill); + } + return ($partyskill); + } + function usersnet_bycode($owner, $target, $widefriend, $narrowfriend) { GLOBAL $G_dbpfx;