"; echo " "; echo " "; echo ""; } function erg($sais, $rd, $art) { $dat = date("Y-m-d H:i"); include ("inc/db.php"); $link = mysqli_connect($db_server, $db_username, $db_passwort, "kobergonlinecomdb1"); $query = 'select runden from '.$GLOBALS["db_ligen"].' where saison='.$sais.' and art="'.$art.'";'; $result = mysqli_query($link, $query); $row = mysqli_fetch_array($result); $maxrd = $row['runden']; if ($rd == "" || $rd == "=" || $rd == "+") { $query = 'select runde from '.$GLOBALS["db_spieltag"].' order by abs(datum2-'.time().') limit 1;'; $result = mysqli_query($link, $query); $rows = mysqli_num_rows($result); if ($rows > 0) { $row = mysqli_fetch_row($result); $rd = $row[0]; } else $rd = 1; } if ($rd != "+" && $rd != "=" ) { $query = 'select * from '.$GLOBALS["db_spiele"].' where art="'.$art.'" and saison='.$sais.' and runde='.$rd.' order by least(htid, atid);'; $result = mysqli_query($link, $query); $rows = mysqli_num_rows($result); } if ($rows > 0) { $i = 0; echo "
"; echo ""; echo ""; while ($row = mysqli_fetch_array($result)) { // while ($i < $rows) { // $row = mysqli_fetch_row($result); // $htid = mysql_result($result, $i, "htid"); // $atid = mysql_result($result, $i, "atid"); // $ht = mysql_result($result, $i, "htore"); // $at = mysql_result($result, $i, "atore"); $spielid = $row['spielid']; $htid = $row['htid']; $atid = $row['atid']; $ht = $row['htore']; $at = $row['atore']; if ($ht == "") $ht = "-"; if ($at == "") $at = "-"; echo ""; $i++; } echo ""; echo "
"; echo "
"; if ($rd > 1) echo ""; echo "$rd. Runde"; if ($rd < $maxrd) echo ""; echo "
".$GLOBALS["team_k"][$htid]." - ".$GLOBALS["team_k"][$atid]."$ht:$at"; if ($htid == 1 || $atid == 1) echo ""; echo "
"; echo "
"; } } function tab($saison, $art, $tabart) { include ("inc/db.php"); $link = mysqli_connect($db_server, $db_username, $db_passwort, "kobergonlinecomdb1"); $saisl = substr($saison, 2, 2)."/".substr(($saison+1), 2, 2); $query = 'select teamid, sp, p from '.$GLOBALS["db_tabdaten"].' where art="'.$art.'" and saison='.$saison.' and tabart="'.$tabart.'" order by p desc, tv desc, tp desc, s desc, teamid;'; $result = mysqli_query($link, $query); $rows = mysqli_num_rows($result); $i = 0; echo "
"; echo ""; echo ""; while ($row = mysqli_fetch_array($result)) { $tid = $row['teamid']; $sp = $row['sp']; $p = $row['p']; $i++; echo ""; if ($tabart == "g") { $tquery = 'select verlauf from '.$GLOBALS['db_teamliga'].' where saison='.$saison.' and teamid='.$tid.';'; $tresult = mysqli_query($link, $tquery); $trow = mysqli_fetch_row($tresult); echo ""; } echo ""; } echo ""; echo "
".$GLOBALS["tabbez"][$tabart]." $saisl
$i."; $verl = str_replace("@", "", $trow[0]); if (substr($verl, -1) > substr($verl, -2, 1)) echo ""; elseif (substr($verl, -1) < substr($verl, -2, 1)) echo ""; echo ""; if ($tid == 1) echo $GLOBALS["team_k"][$tid]; else echo "".$GLOBALS["team_k"][$tid].""; echo "$sp$p
"; echo "
"; } function toptor($saison) { include ("inc/db.php"); $link = mysqli_connect($db_server, $db_username, $db_passwort, "kobergonlinecomdb1"); $saisl = substr($saison, 2, 2)."/".substr(($saison+1), 2, 2); $query = 'select t.spielerid, nachname, tore from '.$GLOBALS["db_spieler"].' as s inner join '.$GLOBALS["db_spielerstat"].' as t on t.spielerid=s.spielerid where saison='.$saison.' order by tore desc limit 0, 10;'; $result = mysqli_query($link, $query); $rows = mysqli_num_rows($result); echo "
"; echo ""; echo ""; $i = 0; if ($rows > 0) $row = mysqli_fetch_array($result); $torealt = $row[0] + 1; while ($row = mysqli_fetch_array($result)) { $spid = $row["spielerid"]; $nn = $row["nachname"]; $tore = $row["tore"]; if ($tore < $torealt) { $pos = ($i + 1)."."; $torealt = $tore; } else $pos = ""; echo ""; $i++; } echo ""; echo "
LASK-Scorer $saisl
$pos$nn$tore
"; echo "
"; } function toplist($saison, $bez, $select, $sort, $anz) { $saisl = substr($saison, 2, 2)."/".substr(($saison+1), 2, 2); $query = 'select t.spielerid, nachname, '.$select.' as "'.$sort.'" from '.$GLOBALS["db_spieler"].' as s inner join '.$GLOBALS["db_spielerstat"].' as t on t.spielerid=s.spielerid where saison='.$saison.' order by '.$sort.' desc limit 0, '.$anz.';'; list($result, $rows) = dbquery($query); $i = 0; echo "
"; echo ""; echo ""; $anzalt = mysql_result($result, $i, $sort) + 1; while ($i < $rows) { $spid = mysql_result($result, $i, "spielerid"); $nn = mysql_result($result, $i, "nachname"); $anz = mysql_result($result, $i, $sort); if ($anz < $anzalt) { $pos = ($i + 1)."."; $anzalt = $anz; } else $pos = ""; echo ""; $i++; } echo ""; echo "
LASK-$bez $saisl
$pos$nn$anz
"; echo "
"; } function tippbox() { include ("inc/db.php"); $link = mysqli_connect($db_server, $db_username, $db_passwort, "kobergonlinecomdb1"); $dat = date("Y-m-d H:i"); if (isset($_POST['action']) && $_POST['action'] == "Tipp abgeben") { $query = 'select user_id, user_password from '.$GLOBALS['db_user'].' where username = "'.$_POST['tuser'].'";'; $result = mysqli_query($link, $query); $rows = mysqli_num_rows($result); if ($rows == 0) $msg = "Der User ".$_POST['tuser']." ist leider nicht bekannt!"; else { $uid = mysql_result($result, 0, "user_id"); $pwd = mysql_result($result, 0, "user_password"); if ($pwd != md5($_POST['tpwd'])) $msg = "Das Passwort ist leider falsch!"; else { $query = 'select userid from '.$GLOBALS['db_tipps'].' where userid='.$uid.' and spielid='.$_POST['spielid'].';'; mysql_query($query); if (mysql_affected_rows() == 1) $msg = "Du hast für diese Runde bereits einen Tipp abgegeben!"; else { $query = 'insert into '.$GLOBALS['db_tipps'].' values('.$uid.', '.$_POST['spielid'].', '.$_POST['runde'].', '.$_POST['saison'].', '.$_POST['tippht'].','.$_POST['tippat'].', 0);'; mysql_query($query); $msg = "Dein Tipp wurde erfolgreich gespeichert!"; } } } } $query = 'select * from '.$GLOBALS['db_spieltag'].' AS t inner join '.$GLOBALS['db_spiele'].' AS s ON t.spielid=s.spielid where t.datum>"'.$dat.'" and t.art="'.$GLOBALS['akt_art'].'" and (htid=1 or atid=1) order by t.datum asc limit 1;'; $result = mysqli_query($link, $query); $rows = mysqli_num_rows($result); if ($rows > 0) { $row = mysqli_fetch_row($result); $spielid = $row["spielid"]; $sais = $row["saison"]; $rd = $row["runde"]; $htid = $row["htid"]; $atid = $row["atid"]; $datum = $row["datum"]; echo "
"; echo "
"; echo ""; $aktday = date("j", strtotime($datum)); $aktmon = date("n", strtotime($datum)); $aktyr = date("Y", strtotime($datum)); if ($msg != "") echo ""; echo ""; //echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
LASK-Toto
$msg
$aktday. ".$GLOBALS['mon_l'][$aktmon]." $aktyr
          
".$GLOBALS['team_k'][$htid]." - ".$GLOBALS['team_k'][$atid]."
 : 
Login:
Passwort:
Noch nicht registriert?
Passwort vergessen?
"; echo "
"; } else { echo "
"; echo ""; echo ""; echo "
LASK-Toto
Die neue TOTO-Saison beginnt sobald der Spielplan für die kommende Saison online ist!
"; echo "
"; } } function favplbox() { include ("inc/db.php"); $chk_favpl = "N"; $msg = ""; $link = mysqli_connect($db_server, $db_username, $db_passwort, "kobergonlinecomdb1"); $zeit = time(); if (isset($_POST['action']) && $_POST['action'] == "Stimme abgeben" && $_POST['favsp'] > 0) { $ip = get_ip(); $oldtime = time() - 3600; $query = 'select * from '.$GLOBALS['db_liebling'].' where ip="'.$ip.'" and zeit>'.$oldtime.';'; mysqli_query($link, $query); if (mysqli_affected_rows($link) == 0 && $_POST['favsp'] > 0) { $query = 'insert into '.$GLOBALS['db_liebling'].' values ('.$zeit.', '.$_POST['favsp'].', "'.$ip.'");'; mysqli_query($link, $query); $query = 'select vorname, nachname from '.$GLOBALS['db_spieler'].' where spielerid='.$_POST['favsp'].';'; $result = mysqli_query($link, $query); $row = mysqli_fetch_row($result); $vn = $row["vorname"]; $nn = $row["nachname"]; $msg = "Du hast soeben für $vn $nn gestimmt!"; } else $msg = "Du kannst nur jede Stunde eine Stimme abgeben! Bitte probier es später noch einmal!"; } $lastweek = time() - 604800; $query = 'select l.spielerid, vorname, nachname, sum(zeit-'.$lastweek.') "punkte" from '.$GLOBALS['db_liebling'].' as l inner join '.$GLOBALS['db_spieler'].' as s on s.spielerid=l.spielerid where zeit>'.$lastweek.' group by l.spielerid order by punkte desc limit 1;'; $result = mysqli_query($link, $query); $rows = mysqli_num_rows($result); if ($rows > 0) { $chk_favpl = "Y"; $row = mysqli_fetch_row($result); $spid = $row[0]; $vn = $row[1]; $nn = $row[2]; } echo "
"; echo ""; $path = "pics/sp-na.jpg"; if ($chk_favpl == "Y") { if (file_exists("pics/sp-$spid.jpg")) $path = "pics/sp-$spid.jpg"; echo ""; } else { echo ""; } if ($msg != "") { echo ""; } else { echo ""; $query = 'select * from '.$GLOBALS["db_spieler"].' where rnr>0 order by nachname, vorname;'; $result = mysqli_query($link, $query); $rows = mysqli_num_rows($result); $i = 0; echo ""; echo ""; } echo ""; echo "
Liebling der Woche
$vn $nn
N/A
$msg
"; echo "
"; } function spielplan($sais, $tid = 1) { $saisl = $sais."/".substr(($sais+1), 2, 2); if ($tid == 1) $query = 'select * from '.$GLOBALS["db_spiele"].' as s inner join '.$GLOBALS["db_spieltag"].' as t on s.spielid=t.spielid where t.saison='.$sais.' and (htid=1 or atid=1) order by t.art, t.runde;'; else $query = 'select * from '.$GLOBALS["db_spiele"].' where saison='.$sais.' and (htid='.$tid.' or atid='.$tid.') order by art, runde;'; list($result, $rows) = dbquery($query); $i = 0; echo "
"; echo ""; echo ""; while ($i < $rows) { $spielid = mysql_result($result, $i, "spielid"); $htid = mysql_result($result, $i, "htid"); $atid = mysql_result($result, $i, "atid"); if ($htid == $tid) $gtid = $atid; else $gtid = $htid; $t[$htid] = mysql_result($result, $i, "htore"); $t[$atid] = mysql_result($result, $i, "atore"); $rd = mysql_result($result, $i, "runde"); $datum = mysql_result($result, $i, "datum"); if ($t[$tid] == "" && $t[$gtid] == "") $text = date("j", strtotime($datum)).".".date("n", strtotime($datum)); else { if ($t[$tid]>$t[$gtid]) $col = "#336633"; elseif ($t[$tid]<$t[$gtid]) $col = "#993333"; else $col = "#996600"; $text = "".$t[$tid].":".$t[$gtid].""; } if ($htid == $tid) $ort = "H"; else $ort = "A"; echo ""; $i++; } echo "
Saison $saisl
$rd$ort"; if ($gtid > 1) echo "".$GLOBALS["team_k"][$gtid].""; else echo "LASK"; echo "$text"; if ($tid == 1 || $gtid == 1) echo ""; echo "
"; echo "
"; } function kaderbox() { include ("inc/db.php"); $link = mysqli_connect($db_server, $db_username, $db_passwort, "kobergonlinecomdb1"); $query = 'select * from '.$GLOBALS["db_spieler"].' where rnr>0 order by position, rnr;'; $result = mysqli_query($link, $query); $row = mysqli_fetch_array($result); $i = 0; $opos = 0; echo "
"; echo ""; echo ""; echo ""; while ($row = mysqli_fetch_array($result)) { $rnr = $row['rnr']; if ($rnr == 99) $rnr = 'N/A'; echo ""; $i++; } echo ""; echo "
Aktueller Kader
NrName
$rnr".$row['vorname']." ".$row['nachname']."
"; } function tab_update($saison, $art, $tabart, $teamid) { $s = 0; $u = 0; $n = 0; $tp = 0; $tm = 0; $query = 'select abzug from '.$GLOBALS['db_teamliga'].' where teamid='.$teamid.' and saison='.$saison.' and art="'.$art.'";'; list($result, $rows) = dbquery($query); $abz = mysql_result($result, 0, "abzug"); $query = 'select runden, durchgaenge, siegpunkte from '.$GLOBALS['db_ligen'].' where art="'.$art.'" and saison='.$saison.';'; list($result, $rows) = dbquery($query); $anzrd = mysql_result($result, 0, "runden"); $rdvon = 1; $rdbis = $anzrd; $durchg = mysql_result($result, 0, "durchgaenge"); $siegpk = mysql_result($result, 0, "siegpunkte"); if ($tabart >= "11" && $tabart <= "99") { $rdbis = $anzrd / substr($tabart, 0, 1) * substr($tabart, 1, 1); $rdvon = $rdbis - $anzrd / substr($tabart, 0, 1) + 1; } if ($art =="U" || $art == "O") { $rdvon += 22; $rdbis += 22; } if ($tabart != 'a') { $query = 'select sum(htore) "tp", sum(atore) "tm", (htore-atore)/abs(htore-atore) "erg", count(*) "anz" from '.$GLOBALS['db_spiele'].' where htid='.$teamid.' and saison='.$saison.' and art="'.$art.'" and runde between '.$rdvon.' and '.$rdbis.' and htore is not null and atore is not null group by erg;'; list ($result, $rows) = dbquery($query); $i = 0; while ($i < $rows) { $tp += mysql_result($result, $i, "tp"); $tm += mysql_result($result, $i, "tm"); $erg = round(mysql_result($result, $i, "erg")); $anz = mysql_result($result, $i, "anz"); if ($erg == 1) $s += $anz; elseif ($erg == 0) $u += $anz; else $n += $anz; $i++; } } if ($tabart != 'h') { $query = 'select sum(atore) "tp", sum(htore) "tm", (atore-htore)/abs(atore-htore) "erg", count(*) "anz" from '.$GLOBALS['db_spiele'].' where atid='.$teamid.' and saison='.$saison.' and art="'.$art.'" and runde between '.$rdvon.' and '.$rdbis.' and htore is not null and atore is not null group by erg;'; list ($result, $rows) = dbquery($query); $i = 0; while ($i < $rows) { $tp += mysql_result($result, $i, "tp"); $tm += mysql_result($result, $i, "tm"); $erg = round(mysql_result($result, $i, "erg")); $anz = mysql_result($result, $i, "anz"); if ($erg == 1) $s += $anz; elseif ($erg == 0) $u += $anz; else $n += $anz; $i++; } } $p = $siegpk * $s + $u - $abz; if (($art == "O" || $art == "U") && $tabart == "g") { if ($art == "O") $query ='select * from '.$GLOBALS['db_tabdaten'].' where art="1" and saison='.$saison.' and tabart="'.$tabart.'" and teamid='.$teamid.';'; elseif ($art == "U") $query ='select * from '.$GLOBALS['db_tabdaten'].' where art="2" and saison='.$saison.' and tabart="'.$tabart.'" and teamid='.$teamid.';'; $result = mysql_query($query); $row = mysql_fetch_array($result); $p += ceil(($siegpk * $row['s'] + $row['u'])/2); $tp += $row['tp']; $tm += $row['tm']; $s += $row['s']; $u += $row['u']; $n += $row['n']; } $sp = $s + $u + $n; $tv = $tp - $tm; $query = 'select * from '.$GLOBALS['db_tabdaten'].' where art="'.$art.'" and saison='.$saison.' and tabart="'.$tabart.'" and teamid='.$teamid.';'; mysql_query($query); if (mysql_affected_rows() == 1) { $query = 'update '.$GLOBALS['db_tabdaten'].' set sp='.$sp.', s='.$s.', u='.$u.', n='.$n.', tp='.$tp.', tm='.$tm.', tv='.$tv.', p='.$p; $query .= ' where art="'.$art.'" and saison='.$saison.' and tabart="'.$tabart.'" and teamid='.$teamid.';'; } else { $query = 'insert into '.$GLOBALS['db_tabdaten'].' values ("'.$art.'", '.$saison.', "'.$tabart.'", '.$teamid.', '.$sp.', '.$s.', '.$u.', '.$n.', '.$tp.', '.$tm.', '.$tv.', '.$p.');'; } mysql_query($query); } function tab_abfrage($saison, $art, $rdvon, $rdbis, $ort) { $siegp = 3; if ($art == "L" || $art == "A") { if ($saison == 0) $saison = "saison"; $query = 'select distinct htid "teamid", 0 "abzug" from '.$GLOBALS['db_spiele'].' where atid=1 and saison='.$saison.';'; if ($art == "L") { $praefh = '1 and atid='; $praefa = '1 and htid='; } elseif ($art == "A") { $suffh = ' and atid=1'; $suffa = ' and htid=1'; } } else { $query = 'select siegpunkte from '.$GLOBALS['db_ligen'].' where art="'.$art.'" and saison='.$saison.';'; $result = mysql_query($query); $siegp = mysql_result($result, 0); $query = 'select teamid, abzug from '.$GLOBALS['db_teamliga'].' where art="'.$art.'" and saison='.$saison.';'; } list($tresult, $trows) = dbquery($query); while ($trows > $i) { if ($saison == 0) $saison = "saison"; $teamid = mysql_result($tresult, $i, "teamid"); $abz = mysql_result($tresult, $i, "abzug"); $s = 0; $u = 0; $n = 0; $tp = 0; $tm = 0; if ($ort != 'a') { $equery = 'select sum(htore) "tp", sum(atore) "tm", (htore-atore)/abs(htore-atore) "erg", count(*) "anz" from '.$GLOBALS['db_spiele'].' where htid='.$praefh.$teamid.$suffh.' and saison='.$saison.' and runde between '.$rdvon.' and '.$rdbis.' and art="'.$art.'" and htore is not null and atore is not null group by erg;'; list ($eresult, $erows) = dbquery($equery); $j = 0; while ($j < $erows) { $tp += mysql_result($eresult, $j, "tp"); $tm += mysql_result($eresult, $j, "tm"); $erg = round(mysql_result($eresult, $j, "erg")); $anz = mysql_result($eresult, $j, "anz"); if ($erg == 1) $s += $anz; elseif ($erg == 0) $u += $anz; else $n += $anz; $j++; } } if ($ort != 'h') { $equery = 'select sum(atore) "tp", sum(htore) "tm", (atore-htore)/abs(atore-htore) "erg", count(*) "anz" from '.$GLOBALS['db_spiele'].' where atid='.$praefa.$teamid.$suffa.' and saison='.$saison.' and runde between '.$rdvon.' and '.$rdbis.' and art="'.$art.'" and htore is not null and atore is not null group by erg;'; list ($eresult, $erows) = dbquery($equery); $j = 0; while ($j < $erows) { $tp += mysql_result($eresult, $j, "tp"); $tm += mysql_result($eresult, $j, "tm"); $erg = round(mysql_result($eresult, $j, "erg")); $anz = mysql_result($eresult, $j, "anz"); if ($erg == 1) $s += $anz; elseif ($erg == 0) $u += $anz; else $n += $anz; $j++; } } $sp = $s + $u + $n; $p = $siegp * $s + $u; $tv = $tp - $tm; if ($saison == "saison") $saison = 0; if ($saison > 0 && $rdvon == 1 && $ort == "g") $p -= $abz; $query = 'insert into '.$GLOBALS['db_temptab'].' values ("'.$art.'", '.$saison.', "'.$ort.'", '.$rdvon.', '.$rdbis.', '.$teamid.', '.$sp.', '.$s.', '.$u.', '.$n.', '.$tp.', '.$tm.', '.$tv.', '.$p.');'; mysql_query($query); $i++; } } function spnews($spid, $anz) { include ("inc/db.php"); $link = mysqli_connect($db_server, $db_username, $db_passwort, "kobergonlinecomdb1"); $query = 'select vorname, nachname from '.$GLOBALS["db_spieler"].' where spielerid='.$spid.';'; $result = mysqli_query($link, $query); $row = mysqli_fetch_array($result); $vn = $row["vorname"]; $nn = $row["nachname"];; $query = 'select newsid, datum, titel from '.$GLOBALS["db_news"].' where spielerids LIKE "%;'.$spid.';%" or spielerids like "'.$spid.';%" order by datum desc limit 0, '.$anz.';'; $result = mysqli_query($link, $query); $row = mysqli_fetch_array($result); if (mysqli_num_rows($result) > 0) { echo "
"; echo ""; echo ""; while ($row = mysqli_fetch_array($result)) { $nid =$row["newsid"]; $dat = $row["datum"]; $dat = intval(substr($dat, 8, 2)).".".intval(substr($dat, 5, 2))."."; echo ""; echo ""; } echo ""; echo "
News zu $vn $nn
$dat".$row['titel']."
"; echo "
"; } } function teamlist() { echo "
"; echo ""; echo ""; $query = 'select distinct htid from '.$GLOBALS["db_spiele"].' inner join '.$GLOBALS["db_teams"].' on htid=teamid where atid=1 order by teamname;'; $result = mysql_query($query); while ($row = mysql_fetch_array($result)) { echo ""; } echo "
Teams
".$GLOBALS["team_l"][$row['htid']]."
"; echo "
"; } function lastcomm() { echo "
"; echo ""; echo ""; $query = 'select * from '.$GLOBALS["db_comm"].' order by datum desc limit 3;'; list ($result, $rows) = dbquery($query); $i = 0; while ($i < $rows) { $spid = mysql_result($result, $i, "spielid"); $nid = mysql_result($result, $i, "newsid"); $name = mysql_result($result, $i, "name"); $email = mysql_result($result, $i, "email"); $datum = mysql_result($result, $i, "datum"); $datum = date("j. n. Y H:i", strtotime($datum)); $text = mysql_result($result, $i, "eintrag"); $titel = mysql_result($result, $i, "titel"); if ($spid > 0) { $query = 'select htid, atid from '.$GLOBALS['db_spiele'].' where spielid='.$spid.';'; $sresult = mysql_query($query); $htid = mysql_result($sresult, 0, "htid"); $atid = mysql_result($sresult, 0, "atid"); echo ""; } elseif ($nid > 0) { $query = 'select titel from '.$GLOBALS['db_news'].' where newsid='.$nid.';'; $nresult = mysql_query($query); $titel = mysql_result($nresult, 0, "titel"); echo ""; } echo ""; echo ""; if ($spid > 0) echo ""; elseif ($nid > 0) echo ""; $i++; } echo "
Letzte Worte
Worte zu ".$GLOBALS["team_k"][$htid]." - ".$GLOBALS["team_k"][$atid]."
Worte zu \"$titel\"
"; if ($email != "") echo ""; echo "$name"; if ($email != "") echo ""; echo " | ".$datum; echo "
$titel
".nl2br($text)."
"; echo "
"; } function gallery($galid) { $query = 'select * from '.$GLOBALS["db_galpics"].' where galid='.$galid.' order by number;'; list($result, $rows) = dbquery($query); $i = 0; $opos = 0; echo "
"; echo ""; while ($i < $rows) { $filename = mysql_result($result, $i, "filename"); $number = mysql_result($result, $i, "number"); $comment = mysql_result($result, $i, "comment"); echo ""; $i++; } echo "
"; } function calendar($offset, $day) { setlocale(LC_TIME, "de_DE"); $montxt = strftime("%B %Y", mktime(0, 0, 0, date("n")+$offset, 1, date("Y"))); $start = strftime("%u", mktime(0, 0, 0, date("n")+$offset, 1, date("Y"))); $mo = date("m", mktime(0, 0, 0, date("n")+$offset, 1, date("Y"))); $yr = date("Y", mktime(0, 0, 0, date("n")+$offset, 1, date("Y"))); $days = date("t", mktime(0, 0, 0, date("n")+$offset, 1, date("Y"))); $query = 'select distinct substring(datum, -2) "dat" from '.$GLOBALS['db_news'].' where datum like "'.$yr.'-'.$mo.'%" order by dat;'; $result = mysql_query($query); while ($row = mysql_fetch_array($result)) { $entry[($row['dat']*1)] = "".($row['dat']*1).""; } $query = 'select distinct substring(gebdat, -2) "dat" from '.$GLOBALS['db_spieler'].' where gebdat like "%-'.$mo.'-%" and lask="X" order by dat;'; $result = mysql_query($query); while ($row = mysql_fetch_array($result)) { $entry[($row['dat']*1)] = "".($row['dat']*1).""; } $query = 'select distinct substring(datum, 9, 2) "dat" from '.$GLOBALS['db_spieltag'].' where datum like "'.$yr.'-'.$mo.'-%" order by dat;'; $result = mysql_query($query); while ($row = mysql_fetch_array($result)) { $entry[($row['dat']*1)] = "".($row['dat']*1).""; } $entry[(substr($day, -2)*1)] = "".$entry[(substr($day, -2)*1)].""; echo "
"; echo ""; echo ""; echo ""; echo ""; echo ""; $day = 1; while ($start > $day) { echo ""; $day++; } for ($i = 1; $i <= $days; $i++) { if ($entry[$i] == "") $entry[$i] = $i; echo ""; if ($day == 7) { echo ""; $day = 0; } $day++; } echo "
$montxt
 ".$entry[$i]."
"; } function banner($name, $link, $target) { echo "
"; echo ""; echo ""; if ($name == "img/klein.gif") { echo ""; echo ""; } echo "
"; if ($link != "") { echo ""; } echo ""; if ($link != "") echo ""; echo "
Flyer Allgemein
Flyer Cheeese
"; } function select($name, $sql, $selval, $key_eq_name, $submit, $extra = "") { include ("inc/db.php"); echo ""; } ?>