X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fbriskin5%2Fstatadm.php;h=db3cf9b055c27e02738059a58b6102a8f5a07802;hb=824c4a7ccf6a33ff10c38cea2252cffd95e7f2db;hp=07b847e9f284073254c742c900d68bafa51aa28a;hpb=9cbf3bfaad0cad7feaf6413eb53df0a1475c6303;p=brisk.git diff --git a/web/briskin5/statadm.php b/web/briskin5/statadm.php index 07b847e..db3cf9b 100644 --- a/web/briskin5/statadm.php +++ b/web/briskin5/statadm.php @@ -2,7 +2,7 @@ /* * brisk - statadm.php * - * 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 @@ -33,6 +33,7 @@ $G_base = "../"; ini_set("max_execution_time", "240"); require_once("../Obj/brisk.phh"); +require_once("../Obj/user.phh"); require_once("../Obj/auth.phh"); require_once("../Obj/dbase_${G_dbasetype}.phh"); require_once("Obj/briskin5.phh"); @@ -100,12 +101,12 @@ function main_file($curtime) continue; } - // echo $p++." ".BRISKIN5_PLAYERS_N."
"; + // echo $p++." ".BIN5_PLAYERS_N."
"; $found = FALSE; $mult = 1; - for ($i = 0 ; $i < BRISKIN5_PLAYERS_N ; $i++) { - for ($e = $i + 1 ; $e < BRISKIN5_PLAYERS_N ; $e++) { + for ($i = 0 ; $i < BIN5_PLAYERS_N ; $i++) { + for ($e = $i + 1 ; $e < BIN5_PLAYERS_N ; $e++) { if ($ar[10+($i*2)] == $ar[10+($e*2)]) { $mult = abs($ar[10+($i*2)]); $found = TRUE; @@ -117,7 +118,7 @@ function main_file($curtime) if ($mult == 0) continue; - for ($i = 0 ; $i < BRISKIN5_PLAYERS_N ; $i++) { + for ($i = 0 ; $i < BIN5_PLAYERS_N ; $i++) { // echo $p." i) ".$i."
"; $username = $ar[9+($i*2)]; if (($item = $bdb->getitem_bylogin($username, &$id)) == FALSE) { @@ -233,7 +234,6 @@ function main_pgsql($curtime) FROM %sbin5_matches as m, %sbin5_games as g WHERE g.mcode = m.code GROUP BY m.code, m.ttok", $G_dbpfx, $G_dbpfx, $G_dbpfx); - // error_log($mtc_sql, 0); if (pg_query($bdb->dbconn->db(), $mtc_sql) == FALSE) { log_crit("statadm: temporary matches table creation [$mtc_sql] failed"); break; @@ -241,7 +241,6 @@ function main_pgsql($curtime) $tmt_sql = sprintf("SELECT * FROM %sbin5_temp_matches WHERE tstamp < to_timestamp(%d)", $G_dbpfx, $curtime - TRI_LIMIT); - // error_log($tmt_sql, 0); // if deletable old matches exists then ... if (($tmt_pg = pg_query($bdb->dbconn->db(), $tmt_sql)) != FALSE) { @@ -262,7 +261,6 @@ function main_pgsql($curtime) $mtc_sql = sprintf("SELECT * from %sbin5_matches WHERE code = %d", $G_dbpfx, $tmt_obj->code); - error_log($mtc_sql, 0); if (($mtc_pg = pg_query($bdb->dbconn->db(), $mtc_sql)) == FALSE || pg_numrows($mtc_pg) != 1) { log_crit("statadm: matches row select failed"); break; @@ -413,10 +411,10 @@ function main() GLOBAL $G_dbasetype, $G_alarm_passwd, $pazz; echo "Inizio.
"; - flush(); + mop_flush(); if ($pazz != $G_alarm_passwd) { echo "Wrong password
"; - flush(); + mop_flush(); exit; } @@ -431,7 +429,7 @@ function main() echo "Failed.
\n"; echo "Fine.\n"; - flush(); + mop_flush(); } main();