X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fbriskin5%2FObj%2Fplacing.phh;h=ad69d50b8a8646ba8d4d4d76377c557a94c06f96;hb=7332bf2e21e419c2f5af5f7e955367b59c9da135;hp=81a441774df8dcae72677fee5da347d3dac38042;hpb=d9f1de409fac8d9bff593813fec3db1f0c08cdc7;p=brisk.git diff --git a/web/briskin5/Obj/placing.phh b/web/briskin5/Obj/placing.phh index 81a4417..ad69d50 100644 --- a/web/briskin5/Obj/placing.phh +++ b/web/briskin5/Obj/placing.phh @@ -2,7 +2,7 @@ /* * brisk - placing.phh * - * Copyright (C) 2009-2011 Matteo Nastasi + * Copyright (C) 2009-2012 Matteo Nastasi * mailto: nastasi@alternativeoutput.it * matteo.nastasi@milug.org * web: http://www.alternativeoutput.it @@ -23,18 +23,27 @@ */ -define(TOP_NUM, 10); -define(TRI_LIMIT, (90 * 24 * 60 * 60)); -define(TRI_MIN_GAMES, 70); -define(TRI_MAX_GAMES, 140); +define('TOP_NUM', 10); +define('TRI_LIMIT', (90 * 24 * 60 * 60)); +if (BIN5_PLAYERS_N != 5) + define('TRI_MIN_GAMES', 0); +else + define('TRI_MIN_GAMES', 70); +define('TRI_MAX_GAMES', 140); -define(MON_LIMIT, (30 * 24 * 60 * 60)); -define(MON_MIN_GAMES, 35); -define(MON_MAX_GAMES, 70); +define('MON_LIMIT', (30 * 24 * 60 * 60)); +if (BIN5_PLAYERS_N != 5) + define('MON_MIN_GAMES', 0); +else + define('MON_MIN_GAMES', 35); +define('MON_MAX_GAMES', 70); -define(WEE_LIMIT, (7 * 24 * 60 * 60)); -define(WEE_MIN_GAMES, 10); -define(WEE_MAX_GAMES, 35); +define('WEE_LIMIT', (7 * 24 * 60 * 60)); +if (BIN5_PLAYERS_N != 5) + define('WEE_MIN_GAMES', 0); +else + define('WEE_MIN_GAMES', 10); +define('WEE_MAX_GAMES', 35); class Ptsgam { @@ -49,7 +58,7 @@ class Ptsgam { $this->gam = $gam; } - function &myclone() + function myclone() { $ret = new Ptsgam($this->username, $this->pts, $this->gam); @@ -96,16 +105,16 @@ function ptsgam_cmp($a, $b) } /* types of placing based on delta time */ -define(TY_DTIME_TRI, 0); -define(TY_DTIME_MON, 1); -define(TY_DTIME_WEE, 2); +define('TY_DTIME_TRI', 0); +define('TY_DTIME_MON', 1); +define('TY_DTIME_WEE', 2); /* subtypes of placing based on number of played games */ -define(SUBTY_FREQ_LO, 0); -define(SUBTY_FREQ_HI, 1); +define('SUBTY_FREQ_LO', 0); +define('SUBTY_FREQ_HI', 1); -function placings_show(&$user) +function placings_show($user) { $mtime = placing_time(); $tm = placing_date($mtime); @@ -177,7 +186,7 @@ function placing_date($mtime) } -function placing_show_file(&$user, $ty, $subty) +function placing_show_file($user, $ty, $subty) { $tail = FALSE; @@ -251,7 +260,7 @@ function placing_show_file(&$user, $ty, $subty) // // -function placing_show_pgsql(&$user, $ty, $subty) +function placing_show_pgsql($user, $ty, $subty) { GLOBAL $G_dbpfx; @@ -304,7 +313,7 @@ function placing_show_pgsql(&$user, $ty, $subty) return ($ret); } -function placing_show(&$user, $ty, $subty) +function placing_show($user, $ty, $subty) { GLOBAL $G_dbasetype;