'.$locale['wst127']; if (iADMIN) echo '
'.$locale['wst147'].''; echo ''; while ($data = dbarray($result)) { $l=$data['league_id']; $mad=$data['matchday_id']; $ma=$data['match_id']; $result_res = dbquery("select * from ".$db_prefix."wst_results where league_id=$l and matchday_id=$mad and match_id=$ma"); $data_res = dbarray($result_res); $t1 = $data['team1']; $result1 = dbquery("select * from ".$db_prefix."wst_teams where team_id=$t1"); $data1 = dbarray($result1); $team1_details = dbarray(dbquery("select * from ".$db_prefix."wst_teaminfo where team_id=$t1")); echo ''; if ($conf['config_logo'] == 0) { if (isset($team1_details['team_id'])) echo ''.$data1['team_short'].''; else echo ''.$data1['team_short'].''; } else { if ($data1['team_logo']!="") { if (file_exists("img/teams/".$data1['team_logo'])) if ($data1['team_website'] != "") echo ''; else echo ''; else echo ''; } else echo ''; } $t1 = $data['team2']; $result1 = dbquery("select * from ".$db_prefix."wst_teams where team_id=$t1"); $data1 = dbarray($result1); $team2_details = dbarray(dbquery("select * from ".$db_prefix."wst_teaminfo where team_id=$t1")); if ($conf['config_logo'] == 0) { if (isset($team2_details['team_id'])) echo '
'.$data1['team_short'].''; else echo '
'.$data1['team_short'].''; } else { if ($data1['team_logo']!="") { if (file_exists("img/teams/".$data1['team_logo'])) if ($data1['team_website'] != "") echo ''; else echo ''; else echo ''; } else echo ''; } $chk = dbarray(dbquery("select * from ".$db_prefix."wst_ticker where league_id=$l and matchday_id=$mad and match_id=$ma")); $det_url = INFUSIONS.'wir_sind_tippspiel/league.php?act=sh_details&lid='.$l.'&md='.$mad.'&mid='.$ma; $result_l = dbquery("select * from ".$db_prefix."wst_leagues where league_id=$lid"); $data_l = dbarray($result_l); if ($data_l['istoto'] == 1) echo '
'.$data_res['toto'].''; else { if (isset($chk['id'])) echo '
>'.$data_res['team1'].':'.$data_res['team2'].'<'; else echo '
'.$data_res['team1'].':'.$data_res['team2'].''; } echo ''; } echo ''.$locale['wst201'].''; echo ''; $data_global_config = dbarray(dbquery("select * from ".$db_prefix."wst_global_config")); $AzTi = $data_global_config['config_AzTi']; $result = dbquery("select * from ".$db_prefix."wst_matchdays as a where a.league_id=$lid and a.matchday_id=$md order by matchday_datestamp"); while ($data = dbarray($result)) { $m_id[] = $data['match_id']; } for ($j=0; $j < sizeof($m_id); $j++) { $mm_id = $m_id[$j]; $pps = dbarray(dbquery("select sum(points) as sump from ".$db_prefix."wst_userpoints where league_id=$lid and matchday_id=$md and match_id=$mm_id")); if ($pps['sump'] != 0) $ar_pps[] = $pps['sump']; else $ar_pps[] = 0; } $pall = dbarray(dbquery("select sum(points) as sump from ".$db_prefix."wst_userpoints where league_id=$lid and matchday_id=$md")); if (!isset($comm_id) || $comm_id == 0 || !iMEMBER) $result2 = dbquery("select a.user_id, b.user_name from ".$db_prefix."wst_usertipps as a left join ".$db_prefix."users as b on a.user_id=b.user_id where a.league_id=$lid and a.matchday_id=$md group by b.user_name order by b.user_name"); // Community Tipps else $result2 = dbquery("select a.user_id from ".$db_prefix."wst_usertipps as a left join ".$db_prefix."wst_usercomm as b on a.user_id=b.user_id left join ".$db_prefix."users as c on a.user_id=c.user_id where a.league_id=$lid and a.matchday_id=$md and b.comm_id=$comm_id group by c.user_name order by c.user_name"); $rows = dbrows($result2); if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0; if ($rows != 0) $z=1; if ($AzTi == 0) { if (!isset($comm_id) || $comm_id == 0 || !iMEMBER) $result2 = dbquery("select a.user_id, b.user_name from ".$db_prefix."wst_usertipps as a left join ".$db_prefix."users as b on a.user_id=b.user_id where a.league_id=$lid and a.matchday_id=$md group by b.user_name order by b.user_name"); // Community Tipps else $result2 = dbquery("select a.user_id, c.user_name from ".$db_prefix."wst_usertipps as a left join ".$db_prefix."wst_usercomm as b on a.user_id=b.user_id left join ".$db_prefix."users as c on a.user_id=c.user_id where a.league_id=$lid and a.matchday_id=$md and b.comm_id=$comm_id group by c.user_name order by c.user_name"); } else { if (!isset($comm_id) || $comm_id == 0 || !iMEMBER) $result2 = dbquery("select a.user_id, b.user_name from ".$db_prefix."wst_usertipps as a left join ".$db_prefix."users as b on a.user_id=b.user_id where a.league_id=$lid and a.matchday_id=$md group by b.user_name order by b.user_name limit $rowstart, $AzTi"); // Community Tipps else $result2 = dbquery("select a.user_id, c.user_name from ".$db_prefix."wst_usertipps as a left join ".$db_prefix."wst_usercomm as b on a.user_id=b.user_id left join ".$db_prefix."users as c on a.user_id=c.user_id where a.league_id=$lid and a.matchday_id=$md and b.comm_id=$comm_id group by c.user_name order by c.user_name limit $rowstart, $AzTi"); } if (dbrows($result2) > 0) { while ($data2 = dbarray($result2)) { $usr_a[] = $data2['user_id']; } } else $usr_a = array(); $tab=1; $z = 1; for ($i=0; $i < sizeof($usr_a); $i++) { $user = $usr_a[$i]; if ($tab%2 == 0) {$tox_class = 'tbl2';} else {$tox_class = 'tbl1';} echo ''; $result_usr = dbquery("select user_name, user_id from ".$db_prefix."users where user_id=$user"); $data_usr = dbarray($result_usr); $profurl = BASEDIR."profile.php?lookup=".$data_usr['user_id']; echo ''.$data_usr['user_name'].''; for ($j=0; $j < sizeof($m_id); $j++) { $mm_id = $m_id[$j]; $result1 = dbquery("select * from ".$db_prefix."wst_usertipps where league_id=$lid and matchday_id=$md and match_id=$mm_id and user_id=$user"); $data1 = dbarray($result1); $usrpoints = dbquery("select * from ".$db_prefix."wst_userpoints where league_id=$lid and matchday_id=$md and match_id=$mm_id and user_id=$user"); $dtapoints = dbarray($usrpoints); $resultp = dbquery("select sum(points) as sum from ".$db_prefix."wst_userpoints where league_id=$lid and matchday_id=$md and user_id=$user"); $datap = dbarray($resultp); $ppp = dbquery("select points from ".$db_prefix."wst_userpoints where league_id=$lid and matchday_id=$md and match_id=$mm_id and user_id=$user"); $dtap = dbarray($ppp); $mmmm=$md; $ctime = time(); $data_m = dbarray(dbquery("select * from ".$db_prefix."wst_matchdays where league_id=$lid and matchday_id=$md and match_id=$mm_id")); $mtime = $data_m['matchday_datestamp']; if ($ctime >= ($mtime - ($data_c['config_tippzeit']*60)) || $data1['user_id'] == $userdata['user_id']) $a=1; else $a=0; if ($a==1) { if ($data_l['istoto'] == 1) { if ($data1['isbonus'] == 1) echo ''.$data1['toto_tipp'].''; else echo ''.$data1['toto_tipp'].''; } else { // V1.1 if ($dtapoints['points1'] == 1 && $dtapoints['pointsd'] == 0) if ($data1['isbonus'] == 1) echo ''.$data1['team1_tipp'].':'.$data1['team2_tipp'].''.$dtap['points'].''; else echo ''.$data1['team1_tipp'].':'.$data1['team2_tipp'].''.$dtap['points'].''; if ($dtapoints['points3'] == 1) if ($data1['isbonus'] == 1) echo ''.$data1['team1_tipp'].':'.$data1['team2_tipp'].''.$dtap['points'].''; else echo ''.$data1['team1_tipp'].':'.$data1['team2_tipp'].''.$dtap['points'].''; if ($dtapoints['points5'] == 1) if ($data1['isbonus'] == 1) echo ''.$data1['team1_tipp'].':'.$data1['team2_tipp'].''.$dtap['points'].''; else echo ''.$data1['team1_tipp'].':'.$data1['team2_tipp'].''.$dtap['points'].''; if ($dtapoints['pointsd'] == 1 && $dtapoints['points1'] == 1) if ($data1['isbonus'] == 1) echo ''.$data1['team1_tipp'].':'.$data1['team2_tipp'].''.$dtap['points'].''; else echo ''.$data1['team1_tipp'].':'.$data1['team2_tipp'].''.$dtap['points'].''; if ($dtapoints['points1'] == 0 && $dtapoints['points3'] == 0 && $dtapoints['points5'] == 0 && $dtapoints['pointsd'] == 0) if ($data1['isbonus'] == 1) echo ''.$data1['team1_tipp'].':'.$data1['team2_tipp'].''.$dtap['points'].''; else echo ''.$data1['team1_tipp'].':'.$data1['team2_tipp'].''.$dtap['points'].''; // V1.1 } } else echo '-:-'; $tab++; } echo ''.$datap['sum'].''; echo ''; $z+=1; } echo 'SUMME (ALLE)'; for ($k=0; $k < sizeof($ar_pps); $k++) { echo ''.$ar_pps[$k].''; } echo ''.$pall['sump'].''; echo ''; if ($AzTi != 0) { if ($z < $AzTi) $z=$AzTi; if ($z >= $AzTi) echo "
".makePageNav($rowstart,$AzTi,$rows,0,FUSION_SELF."?act=show_tipps&md=".$md."&lid=".$lid."&com=".$comm_id."&")."\n
\n"; } // V1.1 echo '
'.$locale['wst358'].'
'.$locale['wst353'].'
'.$locale['wst354'].'
'.$locale['wst355'].'
'.$locale['wst356'].'
1:0 = '.$locale['wst357'].'
'; // V1.1 echo '
'; $res_max = dbarray(dbquery("select sum(points) as mmax, a.user_id, b.user_name, b.user_avatar from ".$db_prefix."wst_userpoints as a left join ".$db_prefix."users as b on a.user_id=b.user_id where a.league_id=$lid and a.matchday_id=$md group by a.user_id order by mmax desc, b.user_name limit 1")); if (isset($res_max['user_id'])) { $ava = $res_max['user_avatar']; if (file_exists(IMAGES."/avatars/".$ava) && $ava != "") $avaurl = ''; else $avaurl = ''; $profurl = BASEDIR."profile.php?lookup=".$res_max['user_id']; echo ''; echo '
TopTipper
'.$avaurl.'
'.$res_max['user_name'].'
('.$res_max['mmax'].' Punkte)
'; } echo '
'; $result = dbquery("select sum(points_wob) as points_wob, count(*) as matches, max(points) as maxpoints, min(points) as minpoints, sum(points) as points, sum(points1) as points1, sum(points3) as points3, sum(points5) as points5, sum(pointsd) as pointsd from ".$db_prefix."wst_userpoints as A where A.league_id=$lid and matchday_id=$md"); echo ''; $data = dbarray($result); echo ''; echo ''; echo ''; if ($data_c['config_diff_active'] == 1) echo ''; if ($data_c['config_bonus_active'] == 1) echo ''; echo ''; echo ''; echo '
'.$locale['wst218'].''.$locale['wst116'].'
'.$locale['wst221'].''.$data['points1'].'
'.$locale['wst222'].''.$data['points3'].'
'.$locale['wst223'].''.$data['points5'].'
'.$locale['wst224'].''.$data['pointsd'].'
'.$locale['wst225'].''.$data['points_wob'].'
'.$locale['wst126'].''.$data['points'].'
'.$locale['wst228'].''.$data['maxpoints'].'
'; echo '
'; // Ende Ausgabe Angebote closetable(); } ?>