Live voetbal streams'; $description = ''; } else{ $cat2 = ucfirst($url); $title = "Voetbal op $cat2"; // datum vaststellen $today = date("w"); $day = array('zondag' => 0, 'maandag' => 1, 'dinsdag' => 2, 'woensdag' => 3, 'donderdag' => 4, 'vrijdag' => 5, 'zaterdag' => 6); $weekday = $day[strtolower($cat2)]; if($today <= $weekday){ $i = ($weekday - $today); } else{ $i = 7 + ($weekday - $today); } $datum = ucfirst(strftime("%A %e %B", strtotime("+" . $i . " day"))); // - $description = ""; if($url == 'vrijdag' || $url == 'zaterdag' || $url == 'zondag'){ $meta = ''; } else{ $meta = ''; } } echo $title, $description, $meta; ?>
Live voetbal streams"; for($i = 0; $i <= 13; $i++){ $date = date("Y-m-d", strtotime("+" . $i . " day")); $dayname = strftime("%A", strtotime("+" . $i . " day")); $monthnr = strftime("%e", strtotime("+" . $i . " day")); $monthname = strftime("%B", strtotime("+" . $i . " day")); $datum = ucfirst($dayname) . " $monthnr $monthname"; echo "

$datum

"; if($date == date("Y-m-d")){ $dayname = "vandaag"; $insert = "(meer)"; } elseif($date == date("Y-m-d", strtotime("+1 day"))){ $dayname = "morgen"; $insert = false; } $nr = false; $query_comp = "SELECT * FROM competities WHERE url != 'wk2006' && url != 'ek2008' && url != 'wk2010' ORDER BY id ASC"; $result_comp = mysql_query($query_comp); while(list($compid, $compurl, $compname, $comptable, $comptype) = mysql_fetch_row($result_comp)){ if($nr == true){ $query .= " UNION "; $query .= "SELECT id, competition, stage, date, DATE_FORMAT(datetime, '%W %e %M') AS datum, TIME_FORMAT(datetime, '%H:%i') AS tijd, datetime, home, away, played, homescore, awayscore, extratimehome, extratimeaway, penaltieshome, penaltiesaway FROM $comptable WHERE date = '$date' AND datetime > (NOW() - INTERVAL 2 HOUR)"; } else{ $query = "SELECT id, competition, stage, date, DATE_FORMAT(datetime, '%W %e %M') AS datum, TIME_FORMAT(datetime, '%H:%i') AS tijd, datetime, home, away, played, homescore, awayscore, extratimehome, extratimeaway, penaltieshome, penaltiesaway FROM $comptable WHERE date = '$date' AND datetime > (NOW() - INTERVAL 2 HOUR)"; } $nr = true; } $query .= " ORDER BY datetime ASC, id ASC"; $result = mysql_query($query); if(mysql_num_rows($result) == 0){ echo "
Er staan voor $dayname geen voetbal wedstrijden $insert op het programma.
"; } else{ while(list($id, $competition, $stage, $date, $datum, $time, $datetime, $home, $away, $played, $homescore, $awayscore, $extratimehome, $extratimeaway, $penaltieshome, $penaltiesaway) = mysql_fetch_row($result)){ // clubnamen omzetten $query_h = "SELECT * FROM clubs WHERE short = '$home'"; $result_h = mysql_query($query_h); list($homeid, $homeshort, $homename, $homeurl, $homecode, $hometable) = mysql_fetch_array($result_h); $query_a = "SELECT * FROM clubs WHERE short = '$away'"; $result_a = mysql_query($query_a); list($awayid, $awayshort, $awayname, $awayurl, $awaycode, $awaytable) = mysql_fetch_array($result_a); // - // flag $flag = "/img/icons/competities/$competition" . "24.gif"; if(file_exists($_SERVER{'DOCUMENT_ROOT'} . $flag)){ $flag = "\"$compname\""; } else{ $flag = ""; } // // homeflag $homeflag = "/img/icons/clubs/$homeurl" . "24.gif"; if(file_exists($_SERVER{'DOCUMENT_ROOT'} . $homeflag)){ $homeflag = "\"$homename\""; } else{ $homeflag = $flag; } // // awayflag $awayflag = "/img/icons/clubs/$awayurl" . "24.gif"; if(file_exists($_SERVER{'DOCUMENT_ROOT'} . $awayflag)){ $awayflag = "\"$awayname\""; } else{ $awayflag = $flag; } // // vs if(date('Y-m-d') == $date){ $vs = "\"LIVE\""; } else{ $vs = "info"; $vs = "–"; } // echo " "; if($class != "b"){ $class = "b"; } else{ $class = ""; } } } echo "
"; echo ""; } } else{ echo "

Live wedstrijden

"; // navigatie echo " "; // - // datum vaststellen $today = date("w"); $day = array('zondag' => 0, 'maandag' => 1, 'dinsdag' => 2, 'woensdag' => 3, 'donderdag' => 4, 'vrijdag' => 5, 'zaterdag' => 6); $weekday = $day[strtolower($cat2)]; if($today <= $weekday){ $i = ($weekday - $today); } else{ $i = 7 + ($weekday - $today); } $datum = ucfirst(strftime("%A %e %B", strtotime("+" . $i . " day"))); echo "

$datum

"; $dayname = strftime("%A", strtotime("+" . $i . " day")); if($dayname == strftime("%A", strtotime("now"))){ $dayname = "vandaag"; $insert = "meer"; } elseif($dayname == strftime("%A", strtotime("+1 day"))){ $dayname = "morgen"; $insert = false; } $date = date("Y-m-d", strtotime("+" . $i . " day")); // - $nr = false; $query_comp = "SELECT * FROM competities WHERE type != 'championship' ORDER BY id ASC"; $result_comp = mysql_query($query_comp); while(list($compid, $compurl, $compname, $comptable, $comptype) = mysql_fetch_row($result_comp)){ if($nr == true){ $query .= " UNION "; $query .= "SELECT id, competition, stage, date, DATE_FORMAT(datetime, '%W %e %M') AS datum, TIME_FORMAT(datetime, '%H:%i') AS tijd, home, away, played, homescore, awayscore, extratimehome, extratimeaway, penaltieshome, penaltiesaway FROM $comptable WHERE date = '$date' AND datetime > (NOW() - INTERVAL 2 HOUR)"; } else{ $query = "SELECT id, competition, stage, date, DATE_FORMAT(datetime, '%W %e %M') AS datum, TIME_FORMAT(datetime, '%H:%i') AS tijd, home, away, played, homescore, awayscore, extratimehome, extratimeaway, penaltieshome, penaltiesaway FROM $comptable WHERE date = '$date' AND datetime > (NOW() - INTERVAL 2 HOUR)"; } $nr = true; } $query .= " ORDER BY date ASC, tijd ASC, id ASC"; $result = mysql_query($query); if(mysql_num_rows($result) == 0){ echo "
Er staan voor $dayname geen voetbal wedstrijden $insert op het programma.
"; } else{ while(list($id, $competition, $stage, $date, $datum, $time, $home, $away, $played, $homescore, $awayscore, $extratimehome, $extratimeaway, $penaltieshome, $penaltiesaway) = mysql_fetch_row($result)){ // clubnamen omzetten $query_h = "SELECT * FROM clubs WHERE short = '$home'"; $result_h = mysql_query($query_h); list($homeid, $homeshort, $homename, $homeurl, $homecode, $hometable) = mysql_fetch_array($result_h); $query_a = "SELECT * FROM clubs WHERE short = '$away'"; $result_a = mysql_query($query_a); list($awayid, $awayshort, $awayname, $awayurl, $awaycode, $awaytable) = mysql_fetch_array($result_a); // - // flag $flag = "/img/icons/competities/$competition" . "24.gif"; if(file_exists($_SERVER{'DOCUMENT_ROOT'} . $flag)){ $flag = "\"$compname\""; } else{ $flag = ""; } // // homeflag $homeflag = "/img/icons/clubs/$homeurl" . "24.gif"; if(file_exists($_SERVER{'DOCUMENT_ROOT'} . $homeflag)){ $homeflag = "\"$homename\""; } else{ $homeflag = $flag; } // // awayflag $awayflag = "/img/icons/clubs/$awayurl" . "24.gif"; if(file_exists($_SERVER{'DOCUMENT_ROOT'} . $awayflag)){ $awayflag = "\"$awayname\""; } else{ $awayflag = $flag; } // // vs if(date('Y-m-d') == $date){ $vs = "\"LIVE\""; } else{ $vs = "info"; $vs = "–"; } // echo " "; if($class != "b"){ $class = "b"; } else{ $class = ""; } } } echo "
"; echo ""; } ?>