From: Matteo Nastasi (mop) Date: Sun, 19 Jan 2014 16:35:25 +0000 (+0100) Subject: add fixes from dirty site patches X-Git-Tag: v4.12.3~1 X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=commitdiff_plain;h=11db89bea184692bb92f825fee4de9d96dd47a5b;p=brisk.git add fixes from dirty site patches --- diff --git a/web/brisk.css b/web/brisk.css index 62ebeda..6f375ab 100644 --- a/web/brisk.css +++ b/web/brisk.css @@ -36,7 +36,7 @@ input::-moz-focus-inner { } body { - background-image: url('img/snowy.jpg'); + background-image: url('img/happysunbg.png'); background-color: #fafafa; background-repeat: no-repeat; background-position: center center; diff --git a/web/briskin5/stat-day.php b/web/briskin5/stat-day.php index caf3e0a..c8af36d 100644 --- a/web/briskin5/stat-day.php +++ b/web/briskin5/stat-day.php @@ -427,7 +427,8 @@ function main_pgsql($from, $to) fprintf($fpexp, ""); for ($u = 0 ; $u < BIN5_PLAYERS_N ; $u++) { $tot_sql = sprintf(" -SELECT SUM(p.pts) AS pts FROM %sbin5_matches AS m, %sbin5_games AS g, %sbin5_points AS p, %susers AS u WHERE m.code = g.mcode AND g.code = p.gcode AND u.code = p.ucode AND m.code = %d AND u.code = %d", $G_dbpfx, $G_dbpfx, $G_dbpfx, $G_dbpfx, +SELECT SUM(p.pts) AS pts FROM %sbin5_matches AS m, %sbin5_games AS g, %sbin5_points AS p, %susers AS u +WHERE m.code = g.mcode AND g.code = p.gcode AND u.code = p.ucode AND ( (u.type & (CAST (X'00ff0000' as integer))) <> (CAST (X'00800000' as integer)) ) AND m.code = %d AND u.code = %d", $G_dbpfx, $G_dbpfx, $G_dbpfx, $G_dbpfx, $tmt_obj->code, $users[$u]['code']); if (($tot_pg = pg_query($bdb->dbconn->db(), $tot_sql)) == FALSE ) { break; diff --git a/web/briskin5/statadm.php b/web/briskin5/statadm.php index f6d40b3..f1c7bfc 100644 --- a/web/briskin5/statadm.php +++ b/web/briskin5/statadm.php @@ -339,6 +339,7 @@ function main_pgsql($curtime) $pla_sql = sprintf("SELECT (float4(sum(p.pts)) * 100.0 ) / float4(count(p.pts)) as score, sum(p.pts) as points, count(p.pts) as games, u.code as ucode, u.login as login FROM %sbin5_points as p, %sbin5_games as g, %sbin5_matches as m, %susers as u WHERE m.tcode = %d AND m.code = g.mcode AND + ( (u.type & (CAST (X'ff0000' as integer))) <> (CAST (X'800000' as integer)) ) AND g.tstamp > to_timestamp(%d) AND g.tstamp <= to_timestamp(%d) AND p.ucode = u.code AND p.gcode = g.code GROUP BY u.code, u.login