Verfasst: 22.05.2008 19:53
hier mal ein link zu einer ZIP Datei mit den Home/Away Trikots
http://rapidshare.com/files/116826544/e ... s.zip.html
http://rapidshare.com/files/116826544/e ... s.zip.html
phpBB.de - Die deutsche phpBB-Community
https://www.phpbb.de/community/
Hi,Patch hat geschrieben:öffne die em_stats.phpsmithi hat geschrieben:@all
Das mit den Tendenzpfeilen interessiert mich auch brennend. Gibts hierfür schon Lösungsansätze?
ersetzte mit:Code: Alles auswählen
for ( $i = 0; $i < count($em_users_data); $i++ ) { // user position yesterday $int_userpos_yesterday = get_rank_of_yesterday($em_users_data[$i]['tipp_user']); $int_userposalt = $int_userpos; $int_userpos = ($int_userpkt != $em_users_data[$i]['user_points']) ? $int_userpos + 1 : $int_userpos; // compare the absolute positions if($int_userpos_yesterday < $int_userpos ) { $userpos_change = '<img src="./images/em/down.gif" alt="Down" border="0" />'; } else if ($int_userpos_yesterday == $int_userpos ) { $userpos_change = '<img src="./images/em/stay.gif" alt="Stay" border="0" />'; } else if ($int_userpos_yesterday > $int_userpos ) { $userpos_change = '<img src="./images/em/up.gif" alt="Up" border="0" />'; }
Also ich traue meinen Usern soviel Fussball-Kenntnis zu, daß sie in der Endrunde kein Unentschieden tippensmithi hat geschrieben:Oder gar sperren mit optischem Hinweis z.b. "Achtung, bitte Ergebnis nach evtl. Verlängerung/Elfer eintragen"
hast du ein testboard und schon ein paar ergebnisse eingetragen?smithi hat geschrieben:die grünen Tendenzpfeile funktionieren leider nach dieser Änderung immernoch nicht.![]()
Nun gut.. sowas sollte man aber trotzdem an die Tipper kommunizieren. Weil der ein oder andere denkt vielleicht an eine Tippabgabe nach 90min.buegelfalte hat geschrieben:Also ich traue meinen Usern soviel Fussball-Kenntnis zu, daß sie in der Endrunde kein Unentschieden tippensmithi hat geschrieben:Oder gar sperren mit optischem Hinweis z.b. "Achtung, bitte Ergebnis nach evtl. Verlängerung/Elfer eintragen"![]()
(wers trotzdem macht, ist selbst schuld)
Wir machen es so: es wird das Ergebnis nach der regulären Spielzeit bzw. nach Verlängerung eingetragen. Kommt es zum Elfmeterschießen, wird das vorige Unentschieden durch die Tordifferenz beim ES erweitert.
Heißt: steht es vorher 2:2, nach dem ES aber 7:6, trage ich 3:2 ein, steht es vorher 1:1, nachher 6:3, trage ich 4:1 ein.
Grund: man hat sonst kaum Chance, das korrekte Ergebnis zu tippen, getippt wird also auf das "korrigierte" (und nicht das "richtige") Endergebnis, in jedem Fall aber auf das Endergebnis.
(Bei einem Finalspiel Unentschieden einzutragen - weil man z.B. auf das Ergebnis der regulären Spielzeit tippen will - geht nicht, weil das Tippspiel einen Sieger braucht, um zu wissen, wer weitergekommen ist.)
Das versteht sich von selbst.smithi hat geschrieben:Nun gut.. sowas sollte man aber trotzdem an die Tipper kommunizieren.
so ich war jetzt mal mutig und hab bei mir in der heißen DB rumgespielt und bin auf fehlersuche gegangen.smithi hat geschrieben:Hi Patch,
ja ich hab ein Testboard und da einige Ergebnisse eingetragen auch die Spieltermine in die Vergangenheit gelegt. Dachte vielleicht das es daran scheitert. Aber mein Testprobant hat jemanden überholt und bekommt statt dem grünen Pfeil einen Punkt. Derjenige der runterrutscht bekommt den roten Pfeil.
Code: Alles auswählen
function get_timestamp_for_ranking_history(){
global $db;
$timestamp_now=time();
$month = strftime("%m",$timestamp_now);
$day = strftime("%d",$timestamp_now);
$year = strftime("%Y",$timestamp_now);
$timestamp_today_begin = mktime(0,0,0,$month,$day,$year);
$timestamp_today_end = mktime(23,59,0,$month,$day,$year);
$timestamp_first_game_of_today;
$timestamp_first_game_of_last_day_with_a_game;
$timestamp_last_game_of_last_day_with_a_game;
// get playing times of today
$sql = "SELECT game_time
FROM " . EM_FINALS_TABLE . "
WHERE game_time > ". $timestamp_today_begin ."
AND game_time < ". $timestamp_today_end ."
ORDER BY game_time ASC";
if( !($result_times = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not get playing times of today', '', __LINE__, __FILE__, $sql);
}
$row_times = $db->sql_fetchrow($result_times);
$timestamp_first_game_of_today = $row_times['game_time'];
if($timestamp_first_game_of_today < $timestamp_now){
// first game of today has started -> use all results before this game
return $timestamp_first_game_of_today;
}else{
// first game of today is not started
// saerch the first game of last playing day
$sql = "SELECT game_time
FROM " . EM_FINALS_TABLE . "
WHERE game_time < ". $timestamp_today_begin ."
ORDER BY game_time DESC";
if( !($result_times = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not get playing times of today', '', __LINE__, __FILE__, $sql);
}
$row_times = $db->sql_fetchrow($result_times);
$timestamp_last_game_of_last_day_with_a_game = $row_times['game_time'];
$month_last_day_with_a_game = strftime("%m",$timestamp_last_game_of_last_day_with_a_game);
$day_last_day_with_a_game = strftime("%d",$timestamp_last_game_of_last_day_with_a_game);
$year_last_day_with_a_game = strftime("%Y",$timestamp_last_game_of_last_day_with_a_game);
$timestamp_last_day_with_a_game_begin =
mktime(0,0,0,$month_last_day_with_a_game,$day_last_day_with_a_game,$year_last_day_with_a_game);
$timestamp_last_day_with_a_game_end =
mktime(23,59,0,$month_last_day_with_a_game,$day_last_day_with_a_game,$year_last_day_with_a_game);
$sql = "SELECT game_time
FROM " . EM_FINALS_TABLE . "
WHERE game_time > ". $timestamp_last_day_with_a_game_begin ."
AND game_time < ". $timestamp_last_day_with_a_game_end ."
ORDER BY game_time ASC";
if( !($result_times = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not get playing times of today', '', __LINE__, __FILE__, $sql);
}
$row_times = $db->sql_fetchrow($result_times);
$timestamp_first_game_of_last_day_with_a_game = $row_times['game_time'];
return $timestamp_first_game_of_last_day_with_a_game+1; // +1 becaouse of the < comparison
}
}
Code: Alles auswählen
function get_timestamp_for_ranking_history(){
global $db;
$timestamp_now=time();
$month = strftime("%m",$timestamp_now);
$day = strftime("%d",$timestamp_now);
$year = strftime("%Y",$timestamp_now);
$timestamp_today_begin = mktime(0,0,0,$month,$day,$year);
$timestamp_today_end = mktime(23,59,0,$month,$day,$year);
$timestamp_first_game_of_today;
$timestamp_first_game_of_last_day_with_a_game;
$timestamp_last_game_of_last_day_with_a_game;
// get playing times of today
$sql = "SELECT game_time
FROM " . EM_FINALS_TABLE . "
WHERE game_time > ". $timestamp_today_begin ."
AND game_time < ". $timestamp_today_end ."
union
SELECT game_time
FROM " . EM_GAMES_TABLE . "
WHERE game_time > ". $timestamp_today_begin ."
AND game_time < ". $timestamp_today_end ."
ORDER BY game_time ASC";
if( !($result_times = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not get playing times of today', '', __LINE__, __FILE__, $sql);
}
$row_times = $db->sql_fetchrow($result_times);
$timestamp_first_game_of_today = $row_times['game_time'];
if($timestamp_first_game_of_today < $timestamp_now){
// first game of today has started -> use all results before this game
return $timestamp_first_game_of_today;
}else{
// first game of today is not started
// saerch the first game of last playing day
$sql = "SELECT game_time
FROM " . EM_FINALS_TABLE . "
WHERE game_time < ". $timestamp_today_begin ."
union
SELECT game_time
FROM " . EM_GAMES_TABLE . "
WHERE game_time < ". $timestamp_today_begin ."
ORDER BY game_time DESC";
if( !($result_times = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not get playing times of today', '', __LINE__, __FILE__, $sql);
}
$row_times = $db->sql_fetchrow($result_times);
$timestamp_last_game_of_last_day_with_a_game = $row_times['game_time'];
$month_last_day_with_a_game = strftime("%m",$timestamp_last_game_of_last_day_with_a_game);
$day_last_day_with_a_game = strftime("%d",$timestamp_last_game_of_last_day_with_a_game);
$year_last_day_with_a_game = strftime("%Y",$timestamp_last_game_of_last_day_with_a_game);
$timestamp_last_day_with_a_game_begin =
mktime(0,0,0,$month_last_day_with_a_game,$day_last_day_with_a_game,$year_last_day_with_a_game);
$timestamp_last_day_with_a_game_end =
mktime(23,59,0,$month_last_day_with_a_game,$day_last_day_with_a_game,$year_last_day_with_a_game);
$sql = "SELECT game_time
FROM " . EM_FINALS_TABLE . "
WHERE game_time > ". $timestamp_last_day_with_a_game_begin ."
AND game_time < ". $timestamp_last_day_with_a_game_end ."
union
SELECT game_time
FROM " . EM_GAMES_TABLE . "
WHERE game_time > ". $timestamp_last_day_with_a_game_begin ."
AND game_time < ". $timestamp_last_day_with_a_game_end ."
ORDER BY game_time ASC";
if( !($result_times = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not get playing times of today', '', __LINE__, __FILE__, $sql);
}
$row_times = $db->sql_fetchrow($result_times);
$timestamp_first_game_of_last_day_with_a_game = $row_times['game_time'];
return $timestamp_first_game_of_last_day_with_a_game+1; // +1 becaouse of the < comparison
}
}