X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fbriskin5%2FObj%2Fplacing.phh;h=4358b6efaddc6f89b4016671fe08c78ad1ff1b3a;hb=a9f32c550c0e551b796f82a36d89d99dcbb1aebf;hp=69e2758dd6b8af6dbd0ca2ed9011106db603c0f1;hpb=7f31c2b3b37621dfce4652b0822a6656b0c8c2c2;p=brisk.git diff --git a/web/briskin5/Obj/placing.phh b/web/briskin5/Obj/placing.phh index 69e2758..4358b6e 100644 --- a/web/briskin5/Obj/placing.phh +++ b/web/briskin5/Obj/placing.phh @@ -24,7 +24,7 @@ * */ - +define(TOP_NUM, 10); define(TRI_LIMIT, (90 * 24 * 60 * 60)); define(TRI_FEW_GAMES, 60); @@ -63,7 +63,7 @@ class Ptsgam { function snormpts() { - $ret = sprintf ("%.3f", $this->normpts()); + $ret = sprintf ("%.3f", $this->normpts() * 100.0); if (strchr($ret, ".")) { $ret = rtrim(rtrim($ret, "0"), "."); } @@ -130,12 +130,12 @@ function placing_show(&$user, $suff) if ($pg->username == "") continue; - if ($i < 5) { + if ($i < TOP_NUM) { $ret .= sprintf("%d%s%s%s%s(%d/%d)", $i+1, ($pg->username == $user->name ? "" : ""), $pg->username, ($pg->username == $user->name ? "" : ""), $pg->snormpts(), $pg->pts, $pg->gam); } if ($user != FALSE) { - if ($pg->username == $user->name && $i >= 5) { + if (strcasecmp($pg->username, $user->name) == 0 && $i >= TOP_NUM) { $tail = sprintf(" . . . . . . . . . . "); $tail .= sprintf("%d%s%s%s%s(%d/%d)", $i+1, ($pg->username == $user->name ? "" : ""), $pg->username, ($pg->username == $user->name ? "" : ""), $pg->snormpts(), $pg->pts, $pg->gam); @@ -151,4 +151,4 @@ function placing_show(&$user, $suff) fclose($fp); return ($ret); -} \ No newline at end of file +}