|
Witam serdecznie. Szukałem po tematach lecz nie mogłem nic znaleźć podobnego do mojego problemu. Chodzi o to że po wybraniu w polu kolejki i kliknieciu na "pokaż", wtyczka pokazuje to co chce lecz nad tabelą wyskakuje taki o to błąd:
Notice: Undefined index: comm in /home/spaik/domains/testowa3.vdl.pl/public_html/infusions/wir_sind_tippspiel/sh_tipps.php on line 44
Oto linia opisana w błędzie:
$md = (isset($_POST['st_list']) && isNum($_POST
A to cały plik sh_tipps.php:
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright © 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: sh_tipps.php
| Author: ChSchuetz
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at http://www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }
$result_c = dbquery("select * from ".$db_prefix."wst_config where league_id=$lid");
$data_c = dbarray($result_c);
if (isset($_POST['st_wahl']) && $_POST['st_wahl'] == TRUE) {$comm_id = (isset($_POST['comm']) && isNum($_POST['comm'])) ? $_POST['comm'] : 0; $rowstart=0;}
else $comm_id = (isset($_GET['com']) && isNum($_GET['com'])) ? $_GET['com'] : 0;
if (iMEMBER) {
$result_uc = dbquery("select * from ".$db_prefix."wst_usercomm where user_id=$uid and league_id=$lid");
$data_uc = dbarray($result_uc);
$comm_id = $data_uc['comm_id'];
}
if ((isset($_POST['st_wahl']) && $_POST['st_wahl'] == TRUE) || isset($matchdid)) {
$md = (isset($_GET['md']) && isNum($_GET['md'])) ? $_GET['md'] : 1;
if (isset($_POST['st_wahl']) && $_POST['st_wahl'] == TRUE) {
$md = (isset($_POST['st_list']) && isNum($_POST['st_list'])) ? $_POST['st_list'] : 0;
} else
if (isset($md) && !isset($st_wahl))
$md=$md;
else
if (isset($matchdid) && !$st_wahl)
$md=$matchdid;
if (isset($_POST['st_wahl']) && $_POST['st_wahl'] == TRUE)
$comm_id = $_POST['comm'];
$conf = dbarray(dbquery("select * from ".$db_prefix."wst_config where league_id=$lid"));
opentable($locale['wst112']." ".$md.". ".$locale['wst116']);
$result = dbquery("select * from ".$db_prefix."wst_matchdays as a where a.league_id=$lid and a.matchday_id=$md order by matchday_datestamp");
echo '<table width="100%" align="center" cellpadding="4" cellspacing="1" border="0" class="tbl-border"><tr class="tbl2"><td align="center">'.$locale['wst127'];
if (iADMIN)
echo '<br><a href="admin/league_admin.php?act=entertipps&lid='.$lid.'&md='.$md.'" title="'.$locale['wst346'].'">'.$locale['wst147'].'</a>';
echo '</td>';
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 '<td align="center">';
if ($conf['config_logo'] == 0) {
if (isset($team1_details['team_id']))
echo '<a href="league.php?act=sh_td&lid='.$lid.'&tid='.$t1.'" title="'.$data1['team_name'].'">'.$data1['team_short'].'</a>';
else
echo '<a href="'.$data1['team_website'].'" title="'.$data1['team_name'].'" target="_blank" title="'.$data1['team_name'].'">'.$data1['team_short'].'</a>';
} else {
if ($data1['team_logo']!="") {
if (file_exists("img/teams/".$data1['team_logo']))
if ($data1['team_website'] != "")
echo '<a href="'.$data1['team_website'].'" title="'.$data1['team_name'].'" target="_blank"><img height="15" src="img/teams/'.$data1['team_logo'].'" border="0"></a>';
else
echo '<img height="15" src="img/teams/'.$data1['team_logo'].'" title="'.$data1['team_name'].'">';
else
echo '<img height="15" src="img/nologo.gif" title="'.$data1['team_name'].'">';
} else echo '<img height="15" src="img/nologo.gif" title="'.$data1['team_name'].'">';
}
$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 '<br><a href="league.php?act=sh_td&lid='.$lid.'&tid='.$t1.'" title="'.$data1['team_name'].'">'.$data1['team_short'].'</a>';
else
echo '<br><a href="'.$data1['team_website'].'" title="'.$data1['team_name'].'" target="_blank" title="'.$data1['team_name'].'">'.$data1['team_short'].'</a>';
} else {
if ($data1['team_logo']!="") {
if (file_exists("img/teams/".$data1['team_logo']))
if ($data1['team_website'] != "")
echo '<a href="'.$data1['team_website'].'" title="'.$data1['team_name'].'" target="_blank"><img height="15" src="img/teams/'.$data1['team_logo'].'" border="0"></a>';
else
echo '<img height="15" src="img/teams/'.$data1['team_logo'].'" title="'.$data1['team_name'].'">';
else
echo '<img height="15" src="img/nologo.gif" title="'.$data1['team_name'].'">';
} else echo '<img height="15" src="img/nologo.gif" title="'.$data1['team_name'].'">';
}
$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 '<br><font color="red">'.$data_res['toto'].'</font>';
else {
if (isset($chk['id']))
echo '<br><font color="red"><a href="'.$det_url.'" title="'.$locale['wst261'].'">>'.$data_res['team1'].':'.$data_res['team2'].'<</a></font>';
else
echo '<br><font color="red">'.$data_res['team1'].':'.$data_res['team2'].'</font>';
}
echo '</td>';
}
echo '<td align="center" bgcolor="#cccfff">'.$locale['wst201'].'</td>';
echo '</tr>';
$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 '<tr class="'.$tox_class.'">';
$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 '<td align="center"><a href="'.$profurl.'" title="'.$locale['wst254'].'">'.$data_usr['user_name'].'</a></td>';
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 '<td align="center" bgcolor="#ccccff"><b>'.$data1['toto_tipp'].'</b></td>';
else
echo '<td align="center">'.$data1['toto_tipp'].'</td>';
} else {
// V1.1
if ($dtapoints['points1'] == 1 && $dtapoints['pointsd'] == 0)
if ($data1['isbonus'] == 1)
echo '<td align="center" bgcolor="'.$data_global_config['config_bg_1'].'"><b><u>'.$data1['team1_tipp'].':'.$data1['team2_tipp'].'</u></b><font color="red"><small><sub>'.$dtap['points'].'</sub></small></font></td>';
else
echo '<td align="center" bgcolor="'.$data_global_config['config_bg_1'].'"><b>'.$data1['team1_tipp'].':'.$data1['team2_tipp'].'</b><font color="red"><small><sub>'.$dtap['points'].'</sub></small></font></td>';
if ($dtapoints['points3'] == 1)
if ($data1['isbonus'] == 1)
echo '<td align="center" bgcolor="'.$data_global_config['config_bg_3'].'"><b><u>'.$data1['team1_tipp'].':'.$data1['team2_tipp'].'</u></b><font color="red"><small><sub>'.$dtap['points'].'</sub></small></font></td>';
else
echo '<td align="center" bgcolor="'.$data_global_config['config_bg_3'].'"><b>'.$data1['team1_tipp'].':'.$data1['team2_tipp'].'</b><font color="red"><small><sub>'.$dtap['points'].'</sub></small></font></td>';
if ($dtapoints['points5'] == 1)
if ($data1['isbonus'] == 1)
echo '<td align="center" bgcolor="'.$data_global_config['config_bg_5'].'"><b><u>'.$data1['team1_tipp'].':'.$data1['team2_tipp'].'</u></b><font color="red"><small><sub>'.$dtap['points'].'</sub></small></font></td>';
else
echo '<td align="center" bgcolor="'.$data_global_config['config_bg_5'].'"><b>'.$data1['team1_tipp'].':'.$data1['team2_tipp'].'</b><font color="red"><small><sub>'.$dtap['points'].'</sub></small></font></td>';
if ($dtapoints['pointsd'] == 1 && $dtapoints['points1'] == 1)
if ($data1['isbonus'] == 1)
echo '<td align="center" bgcolor="'.$data_global_config['config_bg_1d'].'"><b><u>'.$data1['team1_tipp'].':'.$data1['team2_tipp'].'</u></b><font color="red"><small><sub>'.$dtap['points'].'</sub></small></font></td>';
else
echo '<td align="center" bgcolor="'.$data_global_config['config_bg_1d'].'"><b>'.$data1['team1_tipp'].':'.$data1['team2_tipp'].'</b><font color="red"><small><sub>'.$dtap['points'].'</sub></small></font></td>';
if ($dtapoints['points1'] == 0 && $dtapoints['points3'] == 0 && $dtapoints['points5'] == 0 && $dtapoints['pointsd'] == 0)
if ($data1['isbonus'] == 1)
echo '<td align="center"><b><u>'.$data1['team1_tipp'].':'.$data1['team2_tipp'].'</u></b><font color="red"><small><sub>'.$dtap['points'].'</sub></small></td>';
else
echo '<td align="center"><b>'.$data1['team1_tipp'].':'.$data1['team2_tipp'].'</b><font color="red"><small><sub>'.$dtap['points'].'</sub></small></td>';
// V1.1
}
} else echo '<td align="center">-:-</td>';
$tab++;
}
echo '<td align="center" bgcolor="#cccfff"><font color="red">'.$datap['sum'].'</font></td>';
echo '</tr>';
$z+=1;
}
echo '<tr><td align="center" bgcolor="#cccfff"><font color="red">SUMME (ALLE)</font></td>';
for ($k=0; $k < sizeof($ar_pps); $k++) {
echo '<td align="center" bgcolor="#cccfff"><font color="red">'.$ar_pps[$k].'</font></td>';
}
echo '<td align="center" bgcolor="#cccfff"><font color="red">'.$pall['sump'].'</font></td></tr>';
echo '</table>';
if ($AzTi != 0) {
if ($z < $AzTi) $z=$AzTi;
if ($z >= $AzTi) echo "<div align='center' style='margin-top:5px;'>".makePageNav($rowstart,$AzTi,$rows,0,FUSION_SELF."?act=show_tipps&md=".$md."&lid=".$lid."&com=".$comm_id."&")."\n</div>\n";
}
// V1.1
echo '<table align="center" width="100%"><tr valign="top"><td align="left">
<table align="left" cellpadding="4" cellspacing="1" border="0" class="tbl-border"><tr><td><b>'.$locale['wst358'].'</b></td></tr>
<tr class="tbl1"><td bgcolor="'.$data_global_config['config_bg_1'].'">'.$locale['wst353'].'</td></tr>
<tr class="tbl1"><td bgcolor="'.$data_global_config['config_bg_3'].'">'.$locale['wst354'].'</td></tr>
<tr class="tbl1"><td bgcolor="'.$data_global_config['config_bg_5'].'">'.$locale['wst355'].'</td></tr>
<tr class="tbl1"><td bgcolor="'.$data_global_config['config_bg_1d'].'">'.$locale['wst356'].'</td></tr>
<tr class="tbl1"><td><b><u>1:0</u></b> = '.$locale['wst357'].'</td></tr>
</table>';
// V1.1
echo '</td><td>';
$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 = '<img src='.IMAGES."avatars/".$ava.' border="0" height="50">'; else $avaurl = '<img src="img/nologo.gif" border="0" height="50">';
$profurl = BASEDIR."profile.php?lookup=".$res_max['user_id'];
echo '<table align="right" cellpadding="4" cellspacing="1" border="0" class="tbl-border">';
echo '<tr class="tbl2"><td align="center" class="tbl_border"><b>TopTipper</b></td></tr>
<tr><td align="center" class="tbl1"><a href="'.$profurl.'">'.$avaurl.'</a></td></tr>
<tr><td align="center" class="tbl1"><a href="'.$profurl.'"><b>'.$res_max['user_name'].'</b><br><font color="red"><b>('.$res_max['mmax'].' Punkte)</b></font></a></td></tr>
</table>';
}
echo '</td><td>';
$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 '<table align="right" cellpadding="4" cellspacing="1" border="0" class="tbl-border">
<tr class="tbl2">
<td align="left"><b>'.$locale['wst218'].'</b></td><td align="center"><b>'.$locale['wst116'].'</b></td></tr>';
$data = dbarray($result);
echo '<tr class="tbl1"><td align="left">'.$locale['wst221'].'</td><td align="center">'.$data['points1'].'</td></tr>';
echo '<tr class="tbl1"><td align="left">'.$locale['wst222'].'</td><td align="center">'.$data['points3'].'</td></tr>';
echo '<tr class="tbl1"><td align="left">'.$locale['wst223'].'</td><td align="center">'.$data['points5'].'</td></tr>';
if ($data_c['config_diff_active'] == 1)
echo '<tr class="tbl1"><td align="left">'.$locale['wst224'].'</td><td align="center">'.$data['pointsd'].'</td></tr>';
if ($data_c['config_bonus_active'] == 1)
echo '<tr class="tbl1"><td align="left">'.$locale['wst225'].'</td><td align="center">'.$data['points_wob'].'</td></tr>';
echo '<tr class="tbl1"><td align="left">'.$locale['wst126'].'</td><td align="center">'.$data['points'].'</td></tr>';
echo '<tr class="tbl1"><td align="left">'.$locale['wst228'].'</td><td align="center">'.$data['maxpoints'].'</td></tr>';
echo '</tr></table>';
echo '</td></tr></table>';
// Ende Ausgabe Angebote
closetable();
}
?>
Z góry dziękuje za pomoc.
Poniżej naprawiona wersja wtyczki. |