X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fbriskin5%2Fstat-day.php;h=a9fcdee1fca69c689606c4d67357427fafe26db2;hb=649907a529ae4bee21990c05f196a144dab8624b;hp=a895d7c00cf6914d53762b1e0dbf7655f143e977;hpb=bef452514e4c78f5f13ad096b6643cd6d7d081f5;p=brisk.git diff --git a/web/briskin5/stat-day.php b/web/briskin5/stat-day.php index a895d7c..a9fcdee 100644 --- a/web/briskin5/stat-day.php +++ b/web/briskin5/stat-day.php @@ -40,8 +40,14 @@ curl -d "pazz=$BRISK_PASS" "http://$BRISK_SITE/briskin5/stat-day.php?from=$(date $G_base = "../"; -$mlang_stat_day = array( 'normal match'=> array( 'it' => 'Partite normali', - 'en' => 'Normal matches' ), +// SYNC WITH bin5_tournaments table +$mlang_stat_day = array( + 'old rules: with draw'=> array( 'it' => 'Partite vecchie (con il pareggio)', + 'en' => 'Old matches (with draw)' ), + + 'new rules: without draw' => array( 'it' => 'Partite nuove (senza pareggio)', + 'en' => 'New matches (without draw)'), + 'special match' => array( 'it' => 'Partite speciali', 'en' => 'Special matches'), @@ -252,10 +258,10 @@ function main_pgsql($from, $to) break; } - if (pg_query($bdb->dbconn->db(), "BEGIN") == FALSE) { - log_crit("stat-day: begin failed"); - break; - } + //if ($bdb->transaction("BEGIN") == FALSE) { + // log_crit("stat-day: begin failed"); + // break; + //} // retrieve list of active tournaments $trn_sql = sprintf("SELECT * FROM %sbin5_tournaments WHERE active = 1;", $G_dbpfx); @@ -337,7 +343,7 @@ SELECT g.* FROM %sbin5_tournaments AS t, %sbin5_matches AS m, %sbin5_games AS g SELECT p.pts AS pts FROM %sbin5_games AS g, %sbin5_points AS p WHERE g.code = p.gcode AND g.mcode = %d AND p.ucode = %d - ORDER BY g.code", + ORDER BY g.tstamp", $G_dbpfx, $G_dbpfx, $tmt_obj->code, $users[$u]['code']); @@ -422,19 +428,22 @@ SELECT p.pts AS pts fprintf($fpexp, "<%s class='%s'>%d%s>", ($tmt_obj->minus_one_is_old == -1 ? "td" : "th"), - $cla_nam, pow(2,$gam_obj->mult) * $pts, + $cla_nam, + pow(2,$gam_obj->mult) * $pts, ($tmt_obj->minus_one_is_old == -1 ? "td" : "th")); } if ($tmt_obj->minus_one_is_old != -1) { + // FIXME + $rules_name = "Rules_old_rules"; fprintf($fpexp, "