LK 1+2 1. Klassen 2. Klassen LK = Leistungsklasse (Burgenland)
Ligen Österreich
|
Bundesliga Grunddurchgang |
Erste Liga |
|
/** Liga Manager Online 4
*
* http://lmo.sourceforge.net/
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* REMOVING OR CHANGING THE COPYRIGHT NOTICES IS NOT ALLOWED!
*
*/
$mylmo = '/var/www/vhosts/sport4u.at/lmo.sport4u.at';
require($mylmo.'/lmo/init.php');
require(PATH_TO_ADDONDIR."/classlib/ini.php");
//4-stufiges Fallback für diese Variablen
//1.GET-Parameter(IFRAME)->2.Variable vorhanden(include)->3.Configwert->4. Standardwert
$m_template = !empty($_GET['mini_template'])? str_replace('..','',$_GET['mini_template'])
:(isset($mini_template)? str_replace('..','',$mini_template):$cfgarray['mini']['tabelle_standardTemplate'] );
if (!is_readable(PATH_TO_TEMPLATEDIR."/mini/$m_template.tpl.php") ) $m_template = "standard";
$m_liga = !empty($_GET['mini_liga'])? urldecode($_GET['mini_liga'])
:(isset($mini_liga)? $mini_liga
:(isset($mini_standardLiga)? $cfgarray['mini']['standardLiga']: '') );
$m_ueber= !empty($_GET['mini_ueber'])? urldecode($_GET['mini_ueber'])
:(isset($mini_ueber)? $mini_ueber
:(isset($cfgarray['mini']['standardAnzahlueber'])?$cfgarray['mini']['standardAnzahlueber']: 2) );
$m_unter= !empty($_GET['mini_unter'])? urldecode($_GET['mini_unter'])
:(isset($mini_unter) ? $mini_unter
:(isset($cfgarray['mini']['standardAnzahlunter'])? $cfgarray['mini']['standardAnzahlunter']: 2) );
$m_platz= !empty($_GET['mini_platz'])? urldecode($_GET['mini_platz'])
:(isset($mini_platz)? $mini_platz
: (!empty($cfgarray['mini']['standardTabellenPlatz'])? $cfgarray['mini']['standardTabellenPlatz']: NULL) );
//$m_striped= empty($_GET['mini_striped'])? urldecode($_GET['mini_striped']): 1;
//$m_striped= isset($striped)? $striped: $m_striped;
$m_striped = !empty($_GET['striped'])? urldecode($_GET['striped'])
:(isset($striped)? $striped:$cfgarray['mini']['striped'] );
//Falls IFRAME - komplettes HTML-Dokument
if (basename($_SERVER['PHP_SELF'])=="lmo-minitab.php") : ?>
Minitab
endif;
$CacheOutput = '';
$TableCacheFile = PATH_TO_LMO.'/'.$diroutput.basename($m_liga).".cache";
// Wenn Cache File vorhanden und auf Aktuellen Stand, gib dies aus.
if (is_readable($TableCacheFile) && $cfgarray['mini']['CacheTable'] == 1) {
$CacheFile= file ($TableCacheFile);
if (trim(array_shift($CacheFile)) == (filemtime(PATH_TO_LMO.'/'.$dirliga.$m_liga)."|$m_ueber|$m_unter|$m_platz") ) {
// echo "Cache Ausgabe: ";
$CacheOutput= print implode("",$CacheFile);
}
}
if (!$CacheOutput) {
// echo "Direkte Ausgabe: ";
$liga = new liga();
//$value = '';
if (is_readable(PATH_TO_LMO.'/'.$dirliga.$m_liga) && $m_liga && $liga->loadFile(PATH_TO_LMO.'/'.$dirliga.$m_liga) ) {
$template = new HTML_Template_IT( PATH_TO_TEMPLATEDIR.'/mini' );
$template->loadTemplatefile($m_template.".tpl.php");
$AnzahlTeams = $liga->teamCount();
$LigaTabelle = $liga->calcTable($liga->options->keyValues['Rounds']);
$LastGameDay = $liga->calcTable($liga->options->keyValues['Actual']-1);
$Runde= $liga->aktSpTag;
//$stripedColor = explode(",",trim($cfgarray['mini']['stripedTable']) );
//$strip= urldecode($_GET['mini_striped']);
//echo "Liga: ".$mini_liga." ";
//echo $m_striped." ";
//echo "Einbindung: ".$striped;
//echo $stripedColor[0];
$viewPosition = "";
$Favorit = $liga->teamForNumber($liga->options->keyValues['favTeam']);
if (is_null($m_platz) || $m_platz <= 0 || $m_platz > $AnzahlTeams ) {
foreach ($LigaTabelle as $value)
if ($Favorit == $value['team']->nr ) $viewPosition = $value['pos'];
} else $viewPosition = $m_platz;
$beginTabellenPlatz = (int)$viewPosition - (int)$m_unter;
$endTabellenPlatz = (int)$viewPosition + (int)$m_ueber;
if ($beginTabellenPlatz<=0) {
$beginTabellenPlatz = 1;
$endTabellenPlatz = $m_unter+1+$m_ueber<$AnzahlTeams? $m_unter+1+$m_ueber:$AnzahlTeams;
}
if ($endTabellenPlatz>$AnzahlTeams ) {
$endTabellenPlatz = $AnzahlTeams;
$beginTabellenPlatz = $AnzahlTeams-$m_unter-1-$m_ueber>0? $AnzahlTeams-$m_unter-1-$m_ueber:1 ;
}
for ($j=0; $j<$AnzahlTeams ; $j++)
if ($LigaTabelle[$j]['pos'] >= $beginTabellenPlatz && $LigaTabelle[$j]['pos'] <= $endTabellenPlatz ) {
$template->setCurrentBlock("Inhalt");
$template->setVariable(array("Platz"=>"".$LigaTabelle[$j]['pos'].""));
$template->setVariable(array("TeamBild"=>HTML_smallTeamIcon($m_liga,$LigaTabelle[$j]['team']," alt=''")));
$template->setVariable(array("TeamLang"=>$LigaTabelle[$j]['team']->name));
$template->setVariable(array("TeamMittel"=>(isset($LigaTabelle[$j]['team']->mittel)?$LigaTabelle[$j]['team']->mittel:'')));
$template->setVariable(array("Team"=>$LigaTabelle[$j]['team']->kurz));
if ($liga->options->keyValues['MinusPoints'] == 1 ) $template->setVariable(array("Punkte"=>$LigaTabelle[$j]['pPkt']));
else $template->setVariable(array("Punkte"=>$LigaTabelle[$j]['pPkt'].':'.$LigaTabelle[$j]['mPkt']));
$template->setVariable(array("PlusTore"=>$LigaTabelle[$j]['pTor']));
$template->setVariable(array("MinusTore"=>$LigaTabelle[$j]['mTor']));
$template->setVariable(array("Tordifferenz"=>$LigaTabelle[$j]['dTor']));
// Dart Liga
// $template->setVariable(array("PlusSaetze"=>$LigaTabelle[$j][12]));
// $template->setVariable(array("MinusSaetze"=>$LigaTabelle[$j][13]));
// if (( $satzDiff = $LigaTabelle[$j][12]-$LigaTabelle[$j][13]) > 0 ) $satzDiff = "+".$satzDiff;
// $template->setVariable(array("SatzDifferenz"=>$satzDiff));
// Dart Liga
$template->setVariable(array("Spiele"=>$LigaTabelle[$j]['spiele']));
$template->setVariable(array("Siege"=>$LigaTabelle[$j]['s']));
$template->setVariable(array("Unentschieden"=>$LigaTabelle[$j]['u']));
$template->setVariable(array("Niederlagen"=>$LigaTabelle[$j]['n']));
foreach ($LastGameDay as $LetzterSpieltag) {
if ($LigaTabelle[$j]['team']->nr == $LetzterSpieltag['team']->nr) {
$Tendenz = $LetzterSpieltag['pos']-$LigaTabelle[$j]['pos'];
$template->setVariable(array("Tendenz"=>($Tendenz>0?'+'.$Tendenz:$Tendenz) ));
break;
}
}
$TendenzImgFile = $Tendenz>0? $cfgarray['mini']['TendenzPfeilUpImg']: ( $Tendenz<0? $cfgarray['mini']['TendenzPfeilDownImg']:$cfgarray['mini']['TendenzPunktImg']);
$template->setVariable(array("TendenzIMG"=> HTML_image(PATH_TO_IMGDIR."/".$TendenzImgFile,"border='0' title='$Tendenz'") ));
// Style Classes anhand der liga Options errechnen -- um Alte Templates zu nutzen wird auch style mit ausgegeben
$style= "";$css_class= "";
if ($LigaTabelle[$j]['pos'] <= $liga->options->keyValues['Champ']) {
// Meister
$css_class = $cfgarray['mini']['tabelle_classMeister'];
$style="background: ".$cfgarray['lmo_tabelle_background1']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color1'])?'':"color: ".$cfgarray['lmo_tabelle_color1'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']) ) {
// Champions League
$css_class = $cfgarray['mini']['tabelle_classCLAufsteiger'];
$style="background: ".$cfgarray['lmo_tabelle_background2']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color2'])?'':"color: ".$cfgarray['lmo_tabelle_color2'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']+$liga->options->keyValues['CK']) ) {
// CL Qualifikation
$css_class = $cfgarray['mini']['tabelle_classCLQuali'];
$style="background: ".$cfgarray['lmo_tabelle_background3']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color3'])?'':"color: ".$cfgarray['lmo_tabelle_color3'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']+$liga->options->keyValues['CK']+$liga->options->keyValues['UC']) ) {
// UEFA Cup
$css_class = $cfgarray['mini']['tabelle_classUEFA'];
$style="background: ".$cfgarray['lmo_tabelle_background4']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color4'])?'':"color: ".$cfgarray['lmo_tabelle_color4'].";";
} elseif ($LigaTabelle[$j]['pos'] > ($AnzahlTeams-$liga->options->keyValues['AB']) ) {
// Abstiegs Relegation
$css_class = $cfgarray['mini']['tabelle_classAbsteiger'];
$style="background: ".$cfgarray['lmo_tabelle_background6']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color6'])?'':"color: ".$cfgarray['lmo_tabelle_color6'].";";
} elseif ($LigaTabelle[$j]['pos'] > ($AnzahlTeams-$liga->options->keyValues['AB']-$liga->options->keyValues['AR']) ) {
// Abstiegsplaetze
$css_class = $cfgarray['mini']['tabelle_classAbstiegsRelegation'];
$style="background: ".$cfgarray['lmo_tabelle_background5']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color5'])?'':"color: ".$cfgarray['lmo_tabelle_color5'].";";
} else $css_class = ""; // "Normale Tabellenplaetze
// Striche nach Meister / CL /CL Quali ....
if ($j && $LastClass != $css_class && $cfgarray['mini']['StyleStripLine'])
$style.= "border-top: ".$cfgarray['mini']['StyleStripLine'].";";
$LastClass= $css_class;
//FavTeam
if ($LigaTabelle[$j]['team']->nr == $Favorit ){
$style.="font-weight:bolder;";
$css_class.= $cfgarray['mini']['classFavorit'];
}
// Style fuer "Gestreifte" Tabelle
if ($m_striped != 0) {
$stripedColor = explode(",",trim($cfgarray['mini']['stripedTable']) );
if ($j%2==0) {
$style.="background-color: ".$stripedColor[0].";\n";
//$template->setVariable(array("Style"=>$style));
}
else {
$style.="background-color: ".$stripedColor[1].";\n";
//$template->setVariable(array("Style"=>$style));
}
}
$template->setVariable(array("Style"=>$style,"Class"=>$css_class));
$template->parseCurrentBlock();
}
$template->setVariable("LigaName", $liga->name);
$template->setVariable("Runde", $Runde);
$template->setVariable("ligaDatum",$text['mini'][14].": ".$liga->ligaDatumAsString("%x"));
$template->setVariable("Link", URL_TO_LMO.'/?action=table&file='.$m_liga);
$template->setVariable("URL_TO_LMO", URL_TO_LMO);
$template->setVariable("URL_TO_TEMPLATEDIR", URL_TO_TEMPLATEDIR."/mini/");
// cache File schreiben
if ( is_writable(dirname($TableCacheFile)) && $cfgarray['mini']['CacheTable'] == 1 ) {
$CacheOutput = filemtime(PATH_TO_LMO.'/'.$dirliga.$m_liga)."|$m_ueber|$m_unter|$m_platz\n".$template->get();
if ($fileHandle = @fopen($TableCacheFile,"wb") ) {
fwrite($fileHandle,$CacheOutput);
fclose($fileHandle);
}
}
$template->show();
} else {
echo getMessage($text['mini'][5]." ".$mini_liga,TRUE);
}
}
//Falls IFRAME - komplettes HTML-Dokument
if (basename($_SERVER['PHP_SELF'])=="lmo-minitab.php") : ?>
endif; ?> |
/** Liga Manager Online 4
*
* http://lmo.sourceforge.net/
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* REMOVING OR CHANGING THE COPYRIGHT NOTICES IS NOT ALLOWED!
*
*/
$mylmo = '/var/www/vhosts/sport4u.at/lmo.sport4u.at';
require($mylmo.'/lmo/init.php');
require(PATH_TO_ADDONDIR."/classlib/ini.php");
//4-stufiges Fallback für diese Variablen
//1.GET-Parameter(IFRAME)->2.Variable vorhanden(include)->3.Configwert->4. Standardwert
$m_template = !empty($_GET['mini_template'])? str_replace('..','',$_GET['mini_template'])
:(isset($mini_template)? str_replace('..','',$mini_template):$cfgarray['mini']['tabelle_standardTemplate'] );
if (!is_readable(PATH_TO_TEMPLATEDIR."/mini/$m_template.tpl.php") ) $m_template = "standard";
$m_liga = !empty($_GET['mini_liga'])? urldecode($_GET['mini_liga'])
:(isset($mini_liga)? $mini_liga
:(isset($mini_standardLiga)? $cfgarray['mini']['standardLiga']: '') );
$m_ueber= !empty($_GET['mini_ueber'])? urldecode($_GET['mini_ueber'])
:(isset($mini_ueber)? $mini_ueber
:(isset($cfgarray['mini']['standardAnzahlueber'])?$cfgarray['mini']['standardAnzahlueber']: 2) );
$m_unter= !empty($_GET['mini_unter'])? urldecode($_GET['mini_unter'])
:(isset($mini_unter) ? $mini_unter
:(isset($cfgarray['mini']['standardAnzahlunter'])? $cfgarray['mini']['standardAnzahlunter']: 2) );
$m_platz= !empty($_GET['mini_platz'])? urldecode($_GET['mini_platz'])
:(isset($mini_platz)? $mini_platz
: (!empty($cfgarray['mini']['standardTabellenPlatz'])? $cfgarray['mini']['standardTabellenPlatz']: NULL) );
//$m_striped= empty($_GET['mini_striped'])? urldecode($_GET['mini_striped']): 1;
//$m_striped= isset($striped)? $striped: $m_striped;
$m_striped = !empty($_GET['striped'])? urldecode($_GET['striped'])
:(isset($striped)? $striped:$cfgarray['mini']['striped'] );
//Falls IFRAME - komplettes HTML-Dokument
if (basename($_SERVER['PHP_SELF'])=="lmo-minitab.php") : ?>
Minitab
endif;
$CacheOutput = '';
$TableCacheFile = PATH_TO_LMO.'/'.$diroutput.basename($m_liga).".cache";
// Wenn Cache File vorhanden und auf Aktuellen Stand, gib dies aus.
if (is_readable($TableCacheFile) && $cfgarray['mini']['CacheTable'] == 1) {
$CacheFile= file ($TableCacheFile);
if (trim(array_shift($CacheFile)) == (filemtime(PATH_TO_LMO.'/'.$dirliga.$m_liga)."|$m_ueber|$m_unter|$m_platz") ) {
// echo "Cache Ausgabe: ";
$CacheOutput= print implode("",$CacheFile);
}
}
if (!$CacheOutput) {
// echo "Direkte Ausgabe: ";
$liga = new liga();
//$value = '';
if (is_readable(PATH_TO_LMO.'/'.$dirliga.$m_liga) && $m_liga && $liga->loadFile(PATH_TO_LMO.'/'.$dirliga.$m_liga) ) {
$template = new HTML_Template_IT( PATH_TO_TEMPLATEDIR.'/mini' );
$template->loadTemplatefile($m_template.".tpl.php");
$AnzahlTeams = $liga->teamCount();
$LigaTabelle = $liga->calcTable($liga->options->keyValues['Rounds']);
$LastGameDay = $liga->calcTable($liga->options->keyValues['Actual']-1);
$Runde= $liga->aktSpTag;
//$stripedColor = explode(",",trim($cfgarray['mini']['stripedTable']) );
//$strip= urldecode($_GET['mini_striped']);
//echo "Liga: ".$mini_liga." ";
//echo $m_striped." ";
//echo "Einbindung: ".$striped;
//echo $stripedColor[0];
$viewPosition = "";
$Favorit = $liga->teamForNumber($liga->options->keyValues['favTeam']);
if (is_null($m_platz) || $m_platz <= 0 || $m_platz > $AnzahlTeams ) {
foreach ($LigaTabelle as $value)
if ($Favorit == $value['team']->nr ) $viewPosition = $value['pos'];
} else $viewPosition = $m_platz;
$beginTabellenPlatz = (int)$viewPosition - (int)$m_unter;
$endTabellenPlatz = (int)$viewPosition + (int)$m_ueber;
if ($beginTabellenPlatz<=0) {
$beginTabellenPlatz = 1;
$endTabellenPlatz = $m_unter+1+$m_ueber<$AnzahlTeams? $m_unter+1+$m_ueber:$AnzahlTeams;
}
if ($endTabellenPlatz>$AnzahlTeams ) {
$endTabellenPlatz = $AnzahlTeams;
$beginTabellenPlatz = $AnzahlTeams-$m_unter-1-$m_ueber>0? $AnzahlTeams-$m_unter-1-$m_ueber:1 ;
}
for ($j=0; $j<$AnzahlTeams ; $j++)
if ($LigaTabelle[$j]['pos'] >= $beginTabellenPlatz && $LigaTabelle[$j]['pos'] <= $endTabellenPlatz ) {
$template->setCurrentBlock("Inhalt");
$template->setVariable(array("Platz"=>"".$LigaTabelle[$j]['pos'].""));
$template->setVariable(array("TeamBild"=>HTML_smallTeamIcon($m_liga,$LigaTabelle[$j]['team']," alt=''")));
$template->setVariable(array("TeamLang"=>$LigaTabelle[$j]['team']->name));
$template->setVariable(array("TeamMittel"=>(isset($LigaTabelle[$j]['team']->mittel)?$LigaTabelle[$j]['team']->mittel:'')));
$template->setVariable(array("Team"=>$LigaTabelle[$j]['team']->kurz));
if ($liga->options->keyValues['MinusPoints'] == 1 ) $template->setVariable(array("Punkte"=>$LigaTabelle[$j]['pPkt']));
else $template->setVariable(array("Punkte"=>$LigaTabelle[$j]['pPkt'].':'.$LigaTabelle[$j]['mPkt']));
$template->setVariable(array("PlusTore"=>$LigaTabelle[$j]['pTor']));
$template->setVariable(array("MinusTore"=>$LigaTabelle[$j]['mTor']));
$template->setVariable(array("Tordifferenz"=>$LigaTabelle[$j]['dTor']));
// Dart Liga
// $template->setVariable(array("PlusSaetze"=>$LigaTabelle[$j][12]));
// $template->setVariable(array("MinusSaetze"=>$LigaTabelle[$j][13]));
// if (( $satzDiff = $LigaTabelle[$j][12]-$LigaTabelle[$j][13]) > 0 ) $satzDiff = "+".$satzDiff;
// $template->setVariable(array("SatzDifferenz"=>$satzDiff));
// Dart Liga
$template->setVariable(array("Spiele"=>$LigaTabelle[$j]['spiele']));
$template->setVariable(array("Siege"=>$LigaTabelle[$j]['s']));
$template->setVariable(array("Unentschieden"=>$LigaTabelle[$j]['u']));
$template->setVariable(array("Niederlagen"=>$LigaTabelle[$j]['n']));
foreach ($LastGameDay as $LetzterSpieltag) {
if ($LigaTabelle[$j]['team']->nr == $LetzterSpieltag['team']->nr) {
$Tendenz = $LetzterSpieltag['pos']-$LigaTabelle[$j]['pos'];
$template->setVariable(array("Tendenz"=>($Tendenz>0?'+'.$Tendenz:$Tendenz) ));
break;
}
}
$TendenzImgFile = $Tendenz>0? $cfgarray['mini']['TendenzPfeilUpImg']: ( $Tendenz<0? $cfgarray['mini']['TendenzPfeilDownImg']:$cfgarray['mini']['TendenzPunktImg']);
$template->setVariable(array("TendenzIMG"=> HTML_image(PATH_TO_IMGDIR."/".$TendenzImgFile,"border='0' title='$Tendenz'") ));
// Style Classes anhand der liga Options errechnen -- um Alte Templates zu nutzen wird auch style mit ausgegeben
$style= "";$css_class= "";
if ($LigaTabelle[$j]['pos'] <= $liga->options->keyValues['Champ']) {
// Meister
$css_class = $cfgarray['mini']['tabelle_classMeister'];
$style="background: ".$cfgarray['lmo_tabelle_background1']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color1'])?'':"color: ".$cfgarray['lmo_tabelle_color1'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']) ) {
// Champions League
$css_class = $cfgarray['mini']['tabelle_classCLAufsteiger'];
$style="background: ".$cfgarray['lmo_tabelle_background2']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color2'])?'':"color: ".$cfgarray['lmo_tabelle_color2'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']+$liga->options->keyValues['CK']) ) {
// CL Qualifikation
$css_class = $cfgarray['mini']['tabelle_classCLQuali'];
$style="background: ".$cfgarray['lmo_tabelle_background3']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color3'])?'':"color: ".$cfgarray['lmo_tabelle_color3'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']+$liga->options->keyValues['CK']+$liga->options->keyValues['UC']) ) {
// UEFA Cup
$css_class = $cfgarray['mini']['tabelle_classUEFA'];
$style="background: ".$cfgarray['lmo_tabelle_background4']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color4'])?'':"color: ".$cfgarray['lmo_tabelle_color4'].";";
} elseif ($LigaTabelle[$j]['pos'] > ($AnzahlTeams-$liga->options->keyValues['AB']) ) {
// Abstiegs Relegation
$css_class = $cfgarray['mini']['tabelle_classAbsteiger'];
$style="background: ".$cfgarray['lmo_tabelle_background6']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color6'])?'':"color: ".$cfgarray['lmo_tabelle_color6'].";";
} elseif ($LigaTabelle[$j]['pos'] > ($AnzahlTeams-$liga->options->keyValues['AB']-$liga->options->keyValues['AR']) ) {
// Abstiegsplaetze
$css_class = $cfgarray['mini']['tabelle_classAbstiegsRelegation'];
$style="background: ".$cfgarray['lmo_tabelle_background5']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color5'])?'':"color: ".$cfgarray['lmo_tabelle_color5'].";";
} else $css_class = ""; // "Normale Tabellenplaetze
// Striche nach Meister / CL /CL Quali ....
if ($j && $LastClass != $css_class && $cfgarray['mini']['StyleStripLine'])
$style.= "border-top: ".$cfgarray['mini']['StyleStripLine'].";";
$LastClass= $css_class;
//FavTeam
if ($LigaTabelle[$j]['team']->nr == $Favorit ){
$style.="font-weight:bolder;";
$css_class.= $cfgarray['mini']['classFavorit'];
}
// Style fuer "Gestreifte" Tabelle
if ($m_striped != 0) {
$stripedColor = explode(",",trim($cfgarray['mini']['stripedTable']) );
if ($j%2==0) {
$style.="background-color: ".$stripedColor[0].";\n";
//$template->setVariable(array("Style"=>$style));
}
else {
$style.="background-color: ".$stripedColor[1].";\n";
//$template->setVariable(array("Style"=>$style));
}
}
$template->setVariable(array("Style"=>$style,"Class"=>$css_class));
$template->parseCurrentBlock();
}
$template->setVariable("LigaName", $liga->name);
$template->setVariable("Runde", $Runde);
$template->setVariable("ligaDatum",$text['mini'][14].": ".$liga->ligaDatumAsString("%x"));
$template->setVariable("Link", URL_TO_LMO.'/?action=table&file='.$m_liga);
$template->setVariable("URL_TO_LMO", URL_TO_LMO);
$template->setVariable("URL_TO_TEMPLATEDIR", URL_TO_TEMPLATEDIR."/mini/");
// cache File schreiben
if ( is_writable(dirname($TableCacheFile)) && $cfgarray['mini']['CacheTable'] == 1 ) {
$CacheOutput = filemtime(PATH_TO_LMO.'/'.$dirliga.$m_liga)."|$m_ueber|$m_unter|$m_platz\n".$template->get();
if ($fileHandle = @fopen($TableCacheFile,"wb") ) {
fwrite($fileHandle,$CacheOutput);
fclose($fileHandle);
}
}
$template->show();
} else {
echo getMessage($text['mini'][5]." ".$mini_liga,TRUE);
}
}
//Falls IFRAME - komplettes HTML-Dokument
if (basename($_SERVER['PHP_SELF'])=="lmo-minitab.php") : ?>
endif; ?> |
Ligen Österreich
|
Regionalliga Mitte |
Regionalliga Ost |
/** Liga Manager Online 4
*
* http://lmo.sourceforge.net/
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* REMOVING OR CHANGING THE COPYRIGHT NOTICES IS NOT ALLOWED!
*
*/
$mylmo = '/var/www/vhosts/sport4u.at/lmo.sport4u.at';
require($mylmo.'/lmo/init.php');
require(PATH_TO_ADDONDIR."/classlib/ini.php");
//4-stufiges Fallback für diese Variablen
//1.GET-Parameter(IFRAME)->2.Variable vorhanden(include)->3.Configwert->4. Standardwert
$m_template = !empty($_GET['mini_template'])? str_replace('..','',$_GET['mini_template'])
:(isset($mini_template)? str_replace('..','',$mini_template):$cfgarray['mini']['tabelle_standardTemplate'] );
if (!is_readable(PATH_TO_TEMPLATEDIR."/mini/$m_template.tpl.php") ) $m_template = "standard";
$m_liga = !empty($_GET['mini_liga'])? urldecode($_GET['mini_liga'])
:(isset($mini_liga)? $mini_liga
:(isset($mini_standardLiga)? $cfgarray['mini']['standardLiga']: '') );
$m_ueber= !empty($_GET['mini_ueber'])? urldecode($_GET['mini_ueber'])
:(isset($mini_ueber)? $mini_ueber
:(isset($cfgarray['mini']['standardAnzahlueber'])?$cfgarray['mini']['standardAnzahlueber']: 2) );
$m_unter= !empty($_GET['mini_unter'])? urldecode($_GET['mini_unter'])
:(isset($mini_unter) ? $mini_unter
:(isset($cfgarray['mini']['standardAnzahlunter'])? $cfgarray['mini']['standardAnzahlunter']: 2) );
$m_platz= !empty($_GET['mini_platz'])? urldecode($_GET['mini_platz'])
:(isset($mini_platz)? $mini_platz
: (!empty($cfgarray['mini']['standardTabellenPlatz'])? $cfgarray['mini']['standardTabellenPlatz']: NULL) );
//$m_striped= empty($_GET['mini_striped'])? urldecode($_GET['mini_striped']): 1;
//$m_striped= isset($striped)? $striped: $m_striped;
$m_striped = !empty($_GET['striped'])? urldecode($_GET['striped'])
:(isset($striped)? $striped:$cfgarray['mini']['striped'] );
//Falls IFRAME - komplettes HTML-Dokument
if (basename($_SERVER['PHP_SELF'])=="lmo-minitab.php") : ?>
Minitab
endif;
$CacheOutput = '';
$TableCacheFile = PATH_TO_LMO.'/'.$diroutput.basename($m_liga).".cache";
// Wenn Cache File vorhanden und auf Aktuellen Stand, gib dies aus.
if (is_readable($TableCacheFile) && $cfgarray['mini']['CacheTable'] == 1) {
$CacheFile= file ($TableCacheFile);
if (trim(array_shift($CacheFile)) == (filemtime(PATH_TO_LMO.'/'.$dirliga.$m_liga)."|$m_ueber|$m_unter|$m_platz") ) {
// echo "Cache Ausgabe: ";
$CacheOutput= print implode("",$CacheFile);
}
}
if (!$CacheOutput) {
// echo "Direkte Ausgabe: ";
$liga = new liga();
//$value = '';
if (is_readable(PATH_TO_LMO.'/'.$dirliga.$m_liga) && $m_liga && $liga->loadFile(PATH_TO_LMO.'/'.$dirliga.$m_liga) ) {
$template = new HTML_Template_IT( PATH_TO_TEMPLATEDIR.'/mini' );
$template->loadTemplatefile($m_template.".tpl.php");
$AnzahlTeams = $liga->teamCount();
$LigaTabelle = $liga->calcTable($liga->options->keyValues['Rounds']);
$LastGameDay = $liga->calcTable($liga->options->keyValues['Actual']-1);
$Runde= $liga->aktSpTag;
//$stripedColor = explode(",",trim($cfgarray['mini']['stripedTable']) );
//$strip= urldecode($_GET['mini_striped']);
//echo "Liga: ".$mini_liga." ";
//echo $m_striped." ";
//echo "Einbindung: ".$striped;
//echo $stripedColor[0];
$viewPosition = "";
$Favorit = $liga->teamForNumber($liga->options->keyValues['favTeam']);
if (is_null($m_platz) || $m_platz <= 0 || $m_platz > $AnzahlTeams ) {
foreach ($LigaTabelle as $value)
if ($Favorit == $value['team']->nr ) $viewPosition = $value['pos'];
} else $viewPosition = $m_platz;
$beginTabellenPlatz = (int)$viewPosition - (int)$m_unter;
$endTabellenPlatz = (int)$viewPosition + (int)$m_ueber;
if ($beginTabellenPlatz<=0) {
$beginTabellenPlatz = 1;
$endTabellenPlatz = $m_unter+1+$m_ueber<$AnzahlTeams? $m_unter+1+$m_ueber:$AnzahlTeams;
}
if ($endTabellenPlatz>$AnzahlTeams ) {
$endTabellenPlatz = $AnzahlTeams;
$beginTabellenPlatz = $AnzahlTeams-$m_unter-1-$m_ueber>0? $AnzahlTeams-$m_unter-1-$m_ueber:1 ;
}
for ($j=0; $j<$AnzahlTeams ; $j++)
if ($LigaTabelle[$j]['pos'] >= $beginTabellenPlatz && $LigaTabelle[$j]['pos'] <= $endTabellenPlatz ) {
$template->setCurrentBlock("Inhalt");
$template->setVariable(array("Platz"=>"".$LigaTabelle[$j]['pos'].""));
$template->setVariable(array("TeamBild"=>HTML_smallTeamIcon($m_liga,$LigaTabelle[$j]['team']," alt=''")));
$template->setVariable(array("TeamLang"=>$LigaTabelle[$j]['team']->name));
$template->setVariable(array("TeamMittel"=>(isset($LigaTabelle[$j]['team']->mittel)?$LigaTabelle[$j]['team']->mittel:'')));
$template->setVariable(array("Team"=>$LigaTabelle[$j]['team']->kurz));
if ($liga->options->keyValues['MinusPoints'] == 1 ) $template->setVariable(array("Punkte"=>$LigaTabelle[$j]['pPkt']));
else $template->setVariable(array("Punkte"=>$LigaTabelle[$j]['pPkt'].':'.$LigaTabelle[$j]['mPkt']));
$template->setVariable(array("PlusTore"=>$LigaTabelle[$j]['pTor']));
$template->setVariable(array("MinusTore"=>$LigaTabelle[$j]['mTor']));
$template->setVariable(array("Tordifferenz"=>$LigaTabelle[$j]['dTor']));
// Dart Liga
// $template->setVariable(array("PlusSaetze"=>$LigaTabelle[$j][12]));
// $template->setVariable(array("MinusSaetze"=>$LigaTabelle[$j][13]));
// if (( $satzDiff = $LigaTabelle[$j][12]-$LigaTabelle[$j][13]) > 0 ) $satzDiff = "+".$satzDiff;
// $template->setVariable(array("SatzDifferenz"=>$satzDiff));
// Dart Liga
$template->setVariable(array("Spiele"=>$LigaTabelle[$j]['spiele']));
$template->setVariable(array("Siege"=>$LigaTabelle[$j]['s']));
$template->setVariable(array("Unentschieden"=>$LigaTabelle[$j]['u']));
$template->setVariable(array("Niederlagen"=>$LigaTabelle[$j]['n']));
foreach ($LastGameDay as $LetzterSpieltag) {
if ($LigaTabelle[$j]['team']->nr == $LetzterSpieltag['team']->nr) {
$Tendenz = $LetzterSpieltag['pos']-$LigaTabelle[$j]['pos'];
$template->setVariable(array("Tendenz"=>($Tendenz>0?'+'.$Tendenz:$Tendenz) ));
break;
}
}
$TendenzImgFile = $Tendenz>0? $cfgarray['mini']['TendenzPfeilUpImg']: ( $Tendenz<0? $cfgarray['mini']['TendenzPfeilDownImg']:$cfgarray['mini']['TendenzPunktImg']);
$template->setVariable(array("TendenzIMG"=> HTML_image(PATH_TO_IMGDIR."/".$TendenzImgFile,"border='0' title='$Tendenz'") ));
// Style Classes anhand der liga Options errechnen -- um Alte Templates zu nutzen wird auch style mit ausgegeben
$style= "";$css_class= "";
if ($LigaTabelle[$j]['pos'] <= $liga->options->keyValues['Champ']) {
// Meister
$css_class = $cfgarray['mini']['tabelle_classMeister'];
$style="background: ".$cfgarray['lmo_tabelle_background1']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color1'])?'':"color: ".$cfgarray['lmo_tabelle_color1'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']) ) {
// Champions League
$css_class = $cfgarray['mini']['tabelle_classCLAufsteiger'];
$style="background: ".$cfgarray['lmo_tabelle_background2']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color2'])?'':"color: ".$cfgarray['lmo_tabelle_color2'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']+$liga->options->keyValues['CK']) ) {
// CL Qualifikation
$css_class = $cfgarray['mini']['tabelle_classCLQuali'];
$style="background: ".$cfgarray['lmo_tabelle_background3']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color3'])?'':"color: ".$cfgarray['lmo_tabelle_color3'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']+$liga->options->keyValues['CK']+$liga->options->keyValues['UC']) ) {
// UEFA Cup
$css_class = $cfgarray['mini']['tabelle_classUEFA'];
$style="background: ".$cfgarray['lmo_tabelle_background4']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color4'])?'':"color: ".$cfgarray['lmo_tabelle_color4'].";";
} elseif ($LigaTabelle[$j]['pos'] > ($AnzahlTeams-$liga->options->keyValues['AB']) ) {
// Abstiegs Relegation
$css_class = $cfgarray['mini']['tabelle_classAbsteiger'];
$style="background: ".$cfgarray['lmo_tabelle_background6']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color6'])?'':"color: ".$cfgarray['lmo_tabelle_color6'].";";
} elseif ($LigaTabelle[$j]['pos'] > ($AnzahlTeams-$liga->options->keyValues['AB']-$liga->options->keyValues['AR']) ) {
// Abstiegsplaetze
$css_class = $cfgarray['mini']['tabelle_classAbstiegsRelegation'];
$style="background: ".$cfgarray['lmo_tabelle_background5']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color5'])?'':"color: ".$cfgarray['lmo_tabelle_color5'].";";
} else $css_class = ""; // "Normale Tabellenplaetze
// Striche nach Meister / CL /CL Quali ....
if ($j && $LastClass != $css_class && $cfgarray['mini']['StyleStripLine'])
$style.= "border-top: ".$cfgarray['mini']['StyleStripLine'].";";
$LastClass= $css_class;
//FavTeam
if ($LigaTabelle[$j]['team']->nr == $Favorit ){
$style.="font-weight:bolder;";
$css_class.= $cfgarray['mini']['classFavorit'];
}
// Style fuer "Gestreifte" Tabelle
if ($m_striped != 0) {
$stripedColor = explode(",",trim($cfgarray['mini']['stripedTable']) );
if ($j%2==0) {
$style.="background-color: ".$stripedColor[0].";\n";
//$template->setVariable(array("Style"=>$style));
}
else {
$style.="background-color: ".$stripedColor[1].";\n";
//$template->setVariable(array("Style"=>$style));
}
}
$template->setVariable(array("Style"=>$style,"Class"=>$css_class));
$template->parseCurrentBlock();
}
$template->setVariable("LigaName", $liga->name);
$template->setVariable("Runde", $Runde);
$template->setVariable("ligaDatum",$text['mini'][14].": ".$liga->ligaDatumAsString("%x"));
$template->setVariable("Link", URL_TO_LMO.'/?action=table&file='.$m_liga);
$template->setVariable("URL_TO_LMO", URL_TO_LMO);
$template->setVariable("URL_TO_TEMPLATEDIR", URL_TO_TEMPLATEDIR."/mini/");
// cache File schreiben
if ( is_writable(dirname($TableCacheFile)) && $cfgarray['mini']['CacheTable'] == 1 ) {
$CacheOutput = filemtime(PATH_TO_LMO.'/'.$dirliga.$m_liga)."|$m_ueber|$m_unter|$m_platz\n".$template->get();
if ($fileHandle = @fopen($TableCacheFile,"wb") ) {
fwrite($fileHandle,$CacheOutput);
fclose($fileHandle);
}
}
$template->show();
} else {
echo getMessage($text['mini'][5]." ".$mini_liga,TRUE);
}
}
//Falls IFRAME - komplettes HTML-Dokument
if (basename($_SERVER['PHP_SELF'])=="lmo-minitab.php") : ?>
endif; ?> |
/** Liga Manager Online 4
*
* http://lmo.sourceforge.net/
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* REMOVING OR CHANGING THE COPYRIGHT NOTICES IS NOT ALLOWED!
*
*/
$mylmo = '/var/www/vhosts/sport4u.at/lmo.sport4u.at';
require($mylmo.'/lmo/init.php');
require(PATH_TO_ADDONDIR."/classlib/ini.php");
//4-stufiges Fallback für diese Variablen
//1.GET-Parameter(IFRAME)->2.Variable vorhanden(include)->3.Configwert->4. Standardwert
$m_template = !empty($_GET['mini_template'])? str_replace('..','',$_GET['mini_template'])
:(isset($mini_template)? str_replace('..','',$mini_template):$cfgarray['mini']['tabelle_standardTemplate'] );
if (!is_readable(PATH_TO_TEMPLATEDIR."/mini/$m_template.tpl.php") ) $m_template = "standard";
$m_liga = !empty($_GET['mini_liga'])? urldecode($_GET['mini_liga'])
:(isset($mini_liga)? $mini_liga
:(isset($mini_standardLiga)? $cfgarray['mini']['standardLiga']: '') );
$m_ueber= !empty($_GET['mini_ueber'])? urldecode($_GET['mini_ueber'])
:(isset($mini_ueber)? $mini_ueber
:(isset($cfgarray['mini']['standardAnzahlueber'])?$cfgarray['mini']['standardAnzahlueber']: 2) );
$m_unter= !empty($_GET['mini_unter'])? urldecode($_GET['mini_unter'])
:(isset($mini_unter) ? $mini_unter
:(isset($cfgarray['mini']['standardAnzahlunter'])? $cfgarray['mini']['standardAnzahlunter']: 2) );
$m_platz= !empty($_GET['mini_platz'])? urldecode($_GET['mini_platz'])
:(isset($mini_platz)? $mini_platz
: (!empty($cfgarray['mini']['standardTabellenPlatz'])? $cfgarray['mini']['standardTabellenPlatz']: NULL) );
//$m_striped= empty($_GET['mini_striped'])? urldecode($_GET['mini_striped']): 1;
//$m_striped= isset($striped)? $striped: $m_striped;
$m_striped = !empty($_GET['striped'])? urldecode($_GET['striped'])
:(isset($striped)? $striped:$cfgarray['mini']['striped'] );
//Falls IFRAME - komplettes HTML-Dokument
if (basename($_SERVER['PHP_SELF'])=="lmo-minitab.php") : ?>
Minitab
endif;
$CacheOutput = '';
$TableCacheFile = PATH_TO_LMO.'/'.$diroutput.basename($m_liga).".cache";
// Wenn Cache File vorhanden und auf Aktuellen Stand, gib dies aus.
if (is_readable($TableCacheFile) && $cfgarray['mini']['CacheTable'] == 1) {
$CacheFile= file ($TableCacheFile);
if (trim(array_shift($CacheFile)) == (filemtime(PATH_TO_LMO.'/'.$dirliga.$m_liga)."|$m_ueber|$m_unter|$m_platz") ) {
// echo "Cache Ausgabe: ";
$CacheOutput= print implode("",$CacheFile);
}
}
if (!$CacheOutput) {
// echo "Direkte Ausgabe: ";
$liga = new liga();
//$value = '';
if (is_readable(PATH_TO_LMO.'/'.$dirliga.$m_liga) && $m_liga && $liga->loadFile(PATH_TO_LMO.'/'.$dirliga.$m_liga) ) {
$template = new HTML_Template_IT( PATH_TO_TEMPLATEDIR.'/mini' );
$template->loadTemplatefile($m_template.".tpl.php");
$AnzahlTeams = $liga->teamCount();
$LigaTabelle = $liga->calcTable($liga->options->keyValues['Rounds']);
$LastGameDay = $liga->calcTable($liga->options->keyValues['Actual']-1);
$Runde= $liga->aktSpTag;
//$stripedColor = explode(",",trim($cfgarray['mini']['stripedTable']) );
//$strip= urldecode($_GET['mini_striped']);
//echo "Liga: ".$mini_liga." ";
//echo $m_striped." ";
//echo "Einbindung: ".$striped;
//echo $stripedColor[0];
$viewPosition = "";
$Favorit = $liga->teamForNumber($liga->options->keyValues['favTeam']);
if (is_null($m_platz) || $m_platz <= 0 || $m_platz > $AnzahlTeams ) {
foreach ($LigaTabelle as $value)
if ($Favorit == $value['team']->nr ) $viewPosition = $value['pos'];
} else $viewPosition = $m_platz;
$beginTabellenPlatz = (int)$viewPosition - (int)$m_unter;
$endTabellenPlatz = (int)$viewPosition + (int)$m_ueber;
if ($beginTabellenPlatz<=0) {
$beginTabellenPlatz = 1;
$endTabellenPlatz = $m_unter+1+$m_ueber<$AnzahlTeams? $m_unter+1+$m_ueber:$AnzahlTeams;
}
if ($endTabellenPlatz>$AnzahlTeams ) {
$endTabellenPlatz = $AnzahlTeams;
$beginTabellenPlatz = $AnzahlTeams-$m_unter-1-$m_ueber>0? $AnzahlTeams-$m_unter-1-$m_ueber:1 ;
}
for ($j=0; $j<$AnzahlTeams ; $j++)
if ($LigaTabelle[$j]['pos'] >= $beginTabellenPlatz && $LigaTabelle[$j]['pos'] <= $endTabellenPlatz ) {
$template->setCurrentBlock("Inhalt");
$template->setVariable(array("Platz"=>"".$LigaTabelle[$j]['pos'].""));
$template->setVariable(array("TeamBild"=>HTML_smallTeamIcon($m_liga,$LigaTabelle[$j]['team']," alt=''")));
$template->setVariable(array("TeamLang"=>$LigaTabelle[$j]['team']->name));
$template->setVariable(array("TeamMittel"=>(isset($LigaTabelle[$j]['team']->mittel)?$LigaTabelle[$j]['team']->mittel:'')));
$template->setVariable(array("Team"=>$LigaTabelle[$j]['team']->kurz));
if ($liga->options->keyValues['MinusPoints'] == 1 ) $template->setVariable(array("Punkte"=>$LigaTabelle[$j]['pPkt']));
else $template->setVariable(array("Punkte"=>$LigaTabelle[$j]['pPkt'].':'.$LigaTabelle[$j]['mPkt']));
$template->setVariable(array("PlusTore"=>$LigaTabelle[$j]['pTor']));
$template->setVariable(array("MinusTore"=>$LigaTabelle[$j]['mTor']));
$template->setVariable(array("Tordifferenz"=>$LigaTabelle[$j]['dTor']));
// Dart Liga
// $template->setVariable(array("PlusSaetze"=>$LigaTabelle[$j][12]));
// $template->setVariable(array("MinusSaetze"=>$LigaTabelle[$j][13]));
// if (( $satzDiff = $LigaTabelle[$j][12]-$LigaTabelle[$j][13]) > 0 ) $satzDiff = "+".$satzDiff;
// $template->setVariable(array("SatzDifferenz"=>$satzDiff));
// Dart Liga
$template->setVariable(array("Spiele"=>$LigaTabelle[$j]['spiele']));
$template->setVariable(array("Siege"=>$LigaTabelle[$j]['s']));
$template->setVariable(array("Unentschieden"=>$LigaTabelle[$j]['u']));
$template->setVariable(array("Niederlagen"=>$LigaTabelle[$j]['n']));
foreach ($LastGameDay as $LetzterSpieltag) {
if ($LigaTabelle[$j]['team']->nr == $LetzterSpieltag['team']->nr) {
$Tendenz = $LetzterSpieltag['pos']-$LigaTabelle[$j]['pos'];
$template->setVariable(array("Tendenz"=>($Tendenz>0?'+'.$Tendenz:$Tendenz) ));
break;
}
}
$TendenzImgFile = $Tendenz>0? $cfgarray['mini']['TendenzPfeilUpImg']: ( $Tendenz<0? $cfgarray['mini']['TendenzPfeilDownImg']:$cfgarray['mini']['TendenzPunktImg']);
$template->setVariable(array("TendenzIMG"=> HTML_image(PATH_TO_IMGDIR."/".$TendenzImgFile,"border='0' title='$Tendenz'") ));
// Style Classes anhand der liga Options errechnen -- um Alte Templates zu nutzen wird auch style mit ausgegeben
$style= "";$css_class= "";
if ($LigaTabelle[$j]['pos'] <= $liga->options->keyValues['Champ']) {
// Meister
$css_class = $cfgarray['mini']['tabelle_classMeister'];
$style="background: ".$cfgarray['lmo_tabelle_background1']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color1'])?'':"color: ".$cfgarray['lmo_tabelle_color1'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']) ) {
// Champions League
$css_class = $cfgarray['mini']['tabelle_classCLAufsteiger'];
$style="background: ".$cfgarray['lmo_tabelle_background2']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color2'])?'':"color: ".$cfgarray['lmo_tabelle_color2'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']+$liga->options->keyValues['CK']) ) {
// CL Qualifikation
$css_class = $cfgarray['mini']['tabelle_classCLQuali'];
$style="background: ".$cfgarray['lmo_tabelle_background3']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color3'])?'':"color: ".$cfgarray['lmo_tabelle_color3'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']+$liga->options->keyValues['CK']+$liga->options->keyValues['UC']) ) {
// UEFA Cup
$css_class = $cfgarray['mini']['tabelle_classUEFA'];
$style="background: ".$cfgarray['lmo_tabelle_background4']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color4'])?'':"color: ".$cfgarray['lmo_tabelle_color4'].";";
} elseif ($LigaTabelle[$j]['pos'] > ($AnzahlTeams-$liga->options->keyValues['AB']) ) {
// Abstiegs Relegation
$css_class = $cfgarray['mini']['tabelle_classAbsteiger'];
$style="background: ".$cfgarray['lmo_tabelle_background6']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color6'])?'':"color: ".$cfgarray['lmo_tabelle_color6'].";";
} elseif ($LigaTabelle[$j]['pos'] > ($AnzahlTeams-$liga->options->keyValues['AB']-$liga->options->keyValues['AR']) ) {
// Abstiegsplaetze
$css_class = $cfgarray['mini']['tabelle_classAbstiegsRelegation'];
$style="background: ".$cfgarray['lmo_tabelle_background5']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color5'])?'':"color: ".$cfgarray['lmo_tabelle_color5'].";";
} else $css_class = ""; // "Normale Tabellenplaetze
// Striche nach Meister / CL /CL Quali ....
if ($j && $LastClass != $css_class && $cfgarray['mini']['StyleStripLine'])
$style.= "border-top: ".$cfgarray['mini']['StyleStripLine'].";";
$LastClass= $css_class;
//FavTeam
if ($LigaTabelle[$j]['team']->nr == $Favorit ){
$style.="font-weight:bolder;";
$css_class.= $cfgarray['mini']['classFavorit'];
}
// Style fuer "Gestreifte" Tabelle
if ($m_striped != 0) {
$stripedColor = explode(",",trim($cfgarray['mini']['stripedTable']) );
if ($j%2==0) {
$style.="background-color: ".$stripedColor[0].";\n";
//$template->setVariable(array("Style"=>$style));
}
else {
$style.="background-color: ".$stripedColor[1].";\n";
//$template->setVariable(array("Style"=>$style));
}
}
$template->setVariable(array("Style"=>$style,"Class"=>$css_class));
$template->parseCurrentBlock();
}
$template->setVariable("LigaName", $liga->name);
$template->setVariable("Runde", $Runde);
$template->setVariable("ligaDatum",$text['mini'][14].": ".$liga->ligaDatumAsString("%x"));
$template->setVariable("Link", URL_TO_LMO.'/?action=table&file='.$m_liga);
$template->setVariable("URL_TO_LMO", URL_TO_LMO);
$template->setVariable("URL_TO_TEMPLATEDIR", URL_TO_TEMPLATEDIR."/mini/");
// cache File schreiben
if ( is_writable(dirname($TableCacheFile)) && $cfgarray['mini']['CacheTable'] == 1 ) {
$CacheOutput = filemtime(PATH_TO_LMO.'/'.$dirliga.$m_liga)."|$m_ueber|$m_unter|$m_platz\n".$template->get();
if ($fileHandle = @fopen($TableCacheFile,"wb") ) {
fwrite($fileHandle,$CacheOutput);
fclose($fileHandle);
}
}
$template->show();
} else {
echo getMessage($text['mini'][5]." ".$mini_liga,TRUE);
}
}
//Falls IFRAME - komplettes HTML-Dokument
if (basename($_SERVER['PHP_SELF'])=="lmo-minitab.php") : ?>
endif; ?> |

Burgenländische Ligen - LK 1 + 2
|
Burgenlandliga |
II. Liga Mitte |
/** Liga Manager Online 4
*
* http://lmo.sourceforge.net/
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* REMOVING OR CHANGING THE COPYRIGHT NOTICES IS NOT ALLOWED!
*
*/
$mylmo = '/var/www/vhosts/sport4u.at/lmo.sport4u.at';
require($mylmo.'/lmo/init.php');
require(PATH_TO_ADDONDIR."/classlib/ini.php");
//4-stufiges Fallback für diese Variablen
//1.GET-Parameter(IFRAME)->2.Variable vorhanden(include)->3.Configwert->4. Standardwert
$m_template = !empty($_GET['mini_template'])? str_replace('..','',$_GET['mini_template'])
:(isset($mini_template)? str_replace('..','',$mini_template):$cfgarray['mini']['tabelle_standardTemplate'] );
if (!is_readable(PATH_TO_TEMPLATEDIR."/mini/$m_template.tpl.php") ) $m_template = "standard";
$m_liga = !empty($_GET['mini_liga'])? urldecode($_GET['mini_liga'])
:(isset($mini_liga)? $mini_liga
:(isset($mini_standardLiga)? $cfgarray['mini']['standardLiga']: '') );
$m_ueber= !empty($_GET['mini_ueber'])? urldecode($_GET['mini_ueber'])
:(isset($mini_ueber)? $mini_ueber
:(isset($cfgarray['mini']['standardAnzahlueber'])?$cfgarray['mini']['standardAnzahlueber']: 2) );
$m_unter= !empty($_GET['mini_unter'])? urldecode($_GET['mini_unter'])
:(isset($mini_unter) ? $mini_unter
:(isset($cfgarray['mini']['standardAnzahlunter'])? $cfgarray['mini']['standardAnzahlunter']: 2) );
$m_platz= !empty($_GET['mini_platz'])? urldecode($_GET['mini_platz'])
:(isset($mini_platz)? $mini_platz
: (!empty($cfgarray['mini']['standardTabellenPlatz'])? $cfgarray['mini']['standardTabellenPlatz']: NULL) );
//$m_striped= empty($_GET['mini_striped'])? urldecode($_GET['mini_striped']): 1;
//$m_striped= isset($striped)? $striped: $m_striped;
$m_striped = !empty($_GET['striped'])? urldecode($_GET['striped'])
:(isset($striped)? $striped:$cfgarray['mini']['striped'] );
//Falls IFRAME - komplettes HTML-Dokument
if (basename($_SERVER['PHP_SELF'])=="lmo-minitab.php") : ?>
Minitab
endif;
$CacheOutput = '';
$TableCacheFile = PATH_TO_LMO.'/'.$diroutput.basename($m_liga).".cache";
// Wenn Cache File vorhanden und auf Aktuellen Stand, gib dies aus.
if (is_readable($TableCacheFile) && $cfgarray['mini']['CacheTable'] == 1) {
$CacheFile= file ($TableCacheFile);
if (trim(array_shift($CacheFile)) == (filemtime(PATH_TO_LMO.'/'.$dirliga.$m_liga)."|$m_ueber|$m_unter|$m_platz") ) {
// echo "Cache Ausgabe: ";
$CacheOutput= print implode("",$CacheFile);
}
}
if (!$CacheOutput) {
// echo "Direkte Ausgabe: ";
$liga = new liga();
//$value = '';
if (is_readable(PATH_TO_LMO.'/'.$dirliga.$m_liga) && $m_liga && $liga->loadFile(PATH_TO_LMO.'/'.$dirliga.$m_liga) ) {
$template = new HTML_Template_IT( PATH_TO_TEMPLATEDIR.'/mini' );
$template->loadTemplatefile($m_template.".tpl.php");
$AnzahlTeams = $liga->teamCount();
$LigaTabelle = $liga->calcTable($liga->options->keyValues['Rounds']);
$LastGameDay = $liga->calcTable($liga->options->keyValues['Actual']-1);
$Runde= $liga->aktSpTag;
//$stripedColor = explode(",",trim($cfgarray['mini']['stripedTable']) );
//$strip= urldecode($_GET['mini_striped']);
//echo "Liga: ".$mini_liga." ";
//echo $m_striped." ";
//echo "Einbindung: ".$striped;
//echo $stripedColor[0];
$viewPosition = "";
$Favorit = $liga->teamForNumber($liga->options->keyValues['favTeam']);
if (is_null($m_platz) || $m_platz <= 0 || $m_platz > $AnzahlTeams ) {
foreach ($LigaTabelle as $value)
if ($Favorit == $value['team']->nr ) $viewPosition = $value['pos'];
} else $viewPosition = $m_platz;
$beginTabellenPlatz = (int)$viewPosition - (int)$m_unter;
$endTabellenPlatz = (int)$viewPosition + (int)$m_ueber;
if ($beginTabellenPlatz<=0) {
$beginTabellenPlatz = 1;
$endTabellenPlatz = $m_unter+1+$m_ueber<$AnzahlTeams? $m_unter+1+$m_ueber:$AnzahlTeams;
}
if ($endTabellenPlatz>$AnzahlTeams ) {
$endTabellenPlatz = $AnzahlTeams;
$beginTabellenPlatz = $AnzahlTeams-$m_unter-1-$m_ueber>0? $AnzahlTeams-$m_unter-1-$m_ueber:1 ;
}
for ($j=0; $j<$AnzahlTeams ; $j++)
if ($LigaTabelle[$j]['pos'] >= $beginTabellenPlatz && $LigaTabelle[$j]['pos'] <= $endTabellenPlatz ) {
$template->setCurrentBlock("Inhalt");
$template->setVariable(array("Platz"=>"".$LigaTabelle[$j]['pos'].""));
$template->setVariable(array("TeamBild"=>HTML_smallTeamIcon($m_liga,$LigaTabelle[$j]['team']," alt=''")));
$template->setVariable(array("TeamLang"=>$LigaTabelle[$j]['team']->name));
$template->setVariable(array("TeamMittel"=>(isset($LigaTabelle[$j]['team']->mittel)?$LigaTabelle[$j]['team']->mittel:'')));
$template->setVariable(array("Team"=>$LigaTabelle[$j]['team']->kurz));
if ($liga->options->keyValues['MinusPoints'] == 1 ) $template->setVariable(array("Punkte"=>$LigaTabelle[$j]['pPkt']));
else $template->setVariable(array("Punkte"=>$LigaTabelle[$j]['pPkt'].':'.$LigaTabelle[$j]['mPkt']));
$template->setVariable(array("PlusTore"=>$LigaTabelle[$j]['pTor']));
$template->setVariable(array("MinusTore"=>$LigaTabelle[$j]['mTor']));
$template->setVariable(array("Tordifferenz"=>$LigaTabelle[$j]['dTor']));
// Dart Liga
// $template->setVariable(array("PlusSaetze"=>$LigaTabelle[$j][12]));
// $template->setVariable(array("MinusSaetze"=>$LigaTabelle[$j][13]));
// if (( $satzDiff = $LigaTabelle[$j][12]-$LigaTabelle[$j][13]) > 0 ) $satzDiff = "+".$satzDiff;
// $template->setVariable(array("SatzDifferenz"=>$satzDiff));
// Dart Liga
$template->setVariable(array("Spiele"=>$LigaTabelle[$j]['spiele']));
$template->setVariable(array("Siege"=>$LigaTabelle[$j]['s']));
$template->setVariable(array("Unentschieden"=>$LigaTabelle[$j]['u']));
$template->setVariable(array("Niederlagen"=>$LigaTabelle[$j]['n']));
foreach ($LastGameDay as $LetzterSpieltag) {
if ($LigaTabelle[$j]['team']->nr == $LetzterSpieltag['team']->nr) {
$Tendenz = $LetzterSpieltag['pos']-$LigaTabelle[$j]['pos'];
$template->setVariable(array("Tendenz"=>($Tendenz>0?'+'.$Tendenz:$Tendenz) ));
break;
}
}
$TendenzImgFile = $Tendenz>0? $cfgarray['mini']['TendenzPfeilUpImg']: ( $Tendenz<0? $cfgarray['mini']['TendenzPfeilDownImg']:$cfgarray['mini']['TendenzPunktImg']);
$template->setVariable(array("TendenzIMG"=> HTML_image(PATH_TO_IMGDIR."/".$TendenzImgFile,"border='0' title='$Tendenz'") ));
// Style Classes anhand der liga Options errechnen -- um Alte Templates zu nutzen wird auch style mit ausgegeben
$style= "";$css_class= "";
if ($LigaTabelle[$j]['pos'] <= $liga->options->keyValues['Champ']) {
// Meister
$css_class = $cfgarray['mini']['tabelle_classMeister'];
$style="background: ".$cfgarray['lmo_tabelle_background1']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color1'])?'':"color: ".$cfgarray['lmo_tabelle_color1'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']) ) {
// Champions League
$css_class = $cfgarray['mini']['tabelle_classCLAufsteiger'];
$style="background: ".$cfgarray['lmo_tabelle_background2']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color2'])?'':"color: ".$cfgarray['lmo_tabelle_color2'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']+$liga->options->keyValues['CK']) ) {
// CL Qualifikation
$css_class = $cfgarray['mini']['tabelle_classCLQuali'];
$style="background: ".$cfgarray['lmo_tabelle_background3']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color3'])?'':"color: ".$cfgarray['lmo_tabelle_color3'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']+$liga->options->keyValues['CK']+$liga->options->keyValues['UC']) ) {
// UEFA Cup
$css_class = $cfgarray['mini']['tabelle_classUEFA'];
$style="background: ".$cfgarray['lmo_tabelle_background4']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color4'])?'':"color: ".$cfgarray['lmo_tabelle_color4'].";";
} elseif ($LigaTabelle[$j]['pos'] > ($AnzahlTeams-$liga->options->keyValues['AB']) ) {
// Abstiegs Relegation
$css_class = $cfgarray['mini']['tabelle_classAbsteiger'];
$style="background: ".$cfgarray['lmo_tabelle_background6']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color6'])?'':"color: ".$cfgarray['lmo_tabelle_color6'].";";
} elseif ($LigaTabelle[$j]['pos'] > ($AnzahlTeams-$liga->options->keyValues['AB']-$liga->options->keyValues['AR']) ) {
// Abstiegsplaetze
$css_class = $cfgarray['mini']['tabelle_classAbstiegsRelegation'];
$style="background: ".$cfgarray['lmo_tabelle_background5']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color5'])?'':"color: ".$cfgarray['lmo_tabelle_color5'].";";
} else $css_class = ""; // "Normale Tabellenplaetze
// Striche nach Meister / CL /CL Quali ....
if ($j && $LastClass != $css_class && $cfgarray['mini']['StyleStripLine'])
$style.= "border-top: ".$cfgarray['mini']['StyleStripLine'].";";
$LastClass= $css_class;
//FavTeam
if ($LigaTabelle[$j]['team']->nr == $Favorit ){
$style.="font-weight:bolder;";
$css_class.= $cfgarray['mini']['classFavorit'];
}
// Style fuer "Gestreifte" Tabelle
if ($m_striped != 0) {
$stripedColor = explode(",",trim($cfgarray['mini']['stripedTable']) );
if ($j%2==0) {
$style.="background-color: ".$stripedColor[0].";\n";
//$template->setVariable(array("Style"=>$style));
}
else {
$style.="background-color: ".$stripedColor[1].";\n";
//$template->setVariable(array("Style"=>$style));
}
}
$template->setVariable(array("Style"=>$style,"Class"=>$css_class));
$template->parseCurrentBlock();
}
$template->setVariable("LigaName", $liga->name);
$template->setVariable("Runde", $Runde);
$template->setVariable("ligaDatum",$text['mini'][14].": ".$liga->ligaDatumAsString("%x"));
$template->setVariable("Link", URL_TO_LMO.'/?action=table&file='.$m_liga);
$template->setVariable("URL_TO_LMO", URL_TO_LMO);
$template->setVariable("URL_TO_TEMPLATEDIR", URL_TO_TEMPLATEDIR."/mini/");
// cache File schreiben
if ( is_writable(dirname($TableCacheFile)) && $cfgarray['mini']['CacheTable'] == 1 ) {
$CacheOutput = filemtime(PATH_TO_LMO.'/'.$dirliga.$m_liga)."|$m_ueber|$m_unter|$m_platz\n".$template->get();
if ($fileHandle = @fopen($TableCacheFile,"wb") ) {
fwrite($fileHandle,$CacheOutput);
fclose($fileHandle);
}
}
$template->show();
} else {
echo getMessage($text['mini'][5]." ".$mini_liga,TRUE);
}
}
//Falls IFRAME - komplettes HTML-Dokument
if (basename($_SERVER['PHP_SELF'])=="lmo-minitab.php") : ?>
endif; ?> |
/** Liga Manager Online 4
*
* http://lmo.sourceforge.net/
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* REMOVING OR CHANGING THE COPYRIGHT NOTICES IS NOT ALLOWED!
*
*/
$mylmo = '/var/www/vhosts/sport4u.at/lmo.sport4u.at';
require($mylmo.'/lmo/init.php');
require(PATH_TO_ADDONDIR."/classlib/ini.php");
//4-stufiges Fallback für diese Variablen
//1.GET-Parameter(IFRAME)->2.Variable vorhanden(include)->3.Configwert->4. Standardwert
$m_template = !empty($_GET['mini_template'])? str_replace('..','',$_GET['mini_template'])
:(isset($mini_template)? str_replace('..','',$mini_template):$cfgarray['mini']['tabelle_standardTemplate'] );
if (!is_readable(PATH_TO_TEMPLATEDIR."/mini/$m_template.tpl.php") ) $m_template = "standard";
$m_liga = !empty($_GET['mini_liga'])? urldecode($_GET['mini_liga'])
:(isset($mini_liga)? $mini_liga
:(isset($mini_standardLiga)? $cfgarray['mini']['standardLiga']: '') );
$m_ueber= !empty($_GET['mini_ueber'])? urldecode($_GET['mini_ueber'])
:(isset($mini_ueber)? $mini_ueber
:(isset($cfgarray['mini']['standardAnzahlueber'])?$cfgarray['mini']['standardAnzahlueber']: 2) );
$m_unter= !empty($_GET['mini_unter'])? urldecode($_GET['mini_unter'])
:(isset($mini_unter) ? $mini_unter
:(isset($cfgarray['mini']['standardAnzahlunter'])? $cfgarray['mini']['standardAnzahlunter']: 2) );
$m_platz= !empty($_GET['mini_platz'])? urldecode($_GET['mini_platz'])
:(isset($mini_platz)? $mini_platz
: (!empty($cfgarray['mini']['standardTabellenPlatz'])? $cfgarray['mini']['standardTabellenPlatz']: NULL) );
//$m_striped= empty($_GET['mini_striped'])? urldecode($_GET['mini_striped']): 1;
//$m_striped= isset($striped)? $striped: $m_striped;
$m_striped = !empty($_GET['striped'])? urldecode($_GET['striped'])
:(isset($striped)? $striped:$cfgarray['mini']['striped'] );
//Falls IFRAME - komplettes HTML-Dokument
if (basename($_SERVER['PHP_SELF'])=="lmo-minitab.php") : ?>
Minitab
endif;
$CacheOutput = '';
$TableCacheFile = PATH_TO_LMO.'/'.$diroutput.basename($m_liga).".cache";
// Wenn Cache File vorhanden und auf Aktuellen Stand, gib dies aus.
if (is_readable($TableCacheFile) && $cfgarray['mini']['CacheTable'] == 1) {
$CacheFile= file ($TableCacheFile);
if (trim(array_shift($CacheFile)) == (filemtime(PATH_TO_LMO.'/'.$dirliga.$m_liga)."|$m_ueber|$m_unter|$m_platz") ) {
// echo "Cache Ausgabe: ";
$CacheOutput= print implode("",$CacheFile);
}
}
if (!$CacheOutput) {
// echo "Direkte Ausgabe: ";
$liga = new liga();
//$value = '';
if (is_readable(PATH_TO_LMO.'/'.$dirliga.$m_liga) && $m_liga && $liga->loadFile(PATH_TO_LMO.'/'.$dirliga.$m_liga) ) {
$template = new HTML_Template_IT( PATH_TO_TEMPLATEDIR.'/mini' );
$template->loadTemplatefile($m_template.".tpl.php");
$AnzahlTeams = $liga->teamCount();
$LigaTabelle = $liga->calcTable($liga->options->keyValues['Rounds']);
$LastGameDay = $liga->calcTable($liga->options->keyValues['Actual']-1);
$Runde= $liga->aktSpTag;
//$stripedColor = explode(",",trim($cfgarray['mini']['stripedTable']) );
//$strip= urldecode($_GET['mini_striped']);
//echo "Liga: ".$mini_liga." ";
//echo $m_striped." ";
//echo "Einbindung: ".$striped;
//echo $stripedColor[0];
$viewPosition = "";
$Favorit = $liga->teamForNumber($liga->options->keyValues['favTeam']);
if (is_null($m_platz) || $m_platz <= 0 || $m_platz > $AnzahlTeams ) {
foreach ($LigaTabelle as $value)
if ($Favorit == $value['team']->nr ) $viewPosition = $value['pos'];
} else $viewPosition = $m_platz;
$beginTabellenPlatz = (int)$viewPosition - (int)$m_unter;
$endTabellenPlatz = (int)$viewPosition + (int)$m_ueber;
if ($beginTabellenPlatz<=0) {
$beginTabellenPlatz = 1;
$endTabellenPlatz = $m_unter+1+$m_ueber<$AnzahlTeams? $m_unter+1+$m_ueber:$AnzahlTeams;
}
if ($endTabellenPlatz>$AnzahlTeams ) {
$endTabellenPlatz = $AnzahlTeams;
$beginTabellenPlatz = $AnzahlTeams-$m_unter-1-$m_ueber>0? $AnzahlTeams-$m_unter-1-$m_ueber:1 ;
}
for ($j=0; $j<$AnzahlTeams ; $j++)
if ($LigaTabelle[$j]['pos'] >= $beginTabellenPlatz && $LigaTabelle[$j]['pos'] <= $endTabellenPlatz ) {
$template->setCurrentBlock("Inhalt");
$template->setVariable(array("Platz"=>"".$LigaTabelle[$j]['pos'].""));
$template->setVariable(array("TeamBild"=>HTML_smallTeamIcon($m_liga,$LigaTabelle[$j]['team']," alt=''")));
$template->setVariable(array("TeamLang"=>$LigaTabelle[$j]['team']->name));
$template->setVariable(array("TeamMittel"=>(isset($LigaTabelle[$j]['team']->mittel)?$LigaTabelle[$j]['team']->mittel:'')));
$template->setVariable(array("Team"=>$LigaTabelle[$j]['team']->kurz));
if ($liga->options->keyValues['MinusPoints'] == 1 ) $template->setVariable(array("Punkte"=>$LigaTabelle[$j]['pPkt']));
else $template->setVariable(array("Punkte"=>$LigaTabelle[$j]['pPkt'].':'.$LigaTabelle[$j]['mPkt']));
$template->setVariable(array("PlusTore"=>$LigaTabelle[$j]['pTor']));
$template->setVariable(array("MinusTore"=>$LigaTabelle[$j]['mTor']));
$template->setVariable(array("Tordifferenz"=>$LigaTabelle[$j]['dTor']));
// Dart Liga
// $template->setVariable(array("PlusSaetze"=>$LigaTabelle[$j][12]));
// $template->setVariable(array("MinusSaetze"=>$LigaTabelle[$j][13]));
// if (( $satzDiff = $LigaTabelle[$j][12]-$LigaTabelle[$j][13]) > 0 ) $satzDiff = "+".$satzDiff;
// $template->setVariable(array("SatzDifferenz"=>$satzDiff));
// Dart Liga
$template->setVariable(array("Spiele"=>$LigaTabelle[$j]['spiele']));
$template->setVariable(array("Siege"=>$LigaTabelle[$j]['s']));
$template->setVariable(array("Unentschieden"=>$LigaTabelle[$j]['u']));
$template->setVariable(array("Niederlagen"=>$LigaTabelle[$j]['n']));
foreach ($LastGameDay as $LetzterSpieltag) {
if ($LigaTabelle[$j]['team']->nr == $LetzterSpieltag['team']->nr) {
$Tendenz = $LetzterSpieltag['pos']-$LigaTabelle[$j]['pos'];
$template->setVariable(array("Tendenz"=>($Tendenz>0?'+'.$Tendenz:$Tendenz) ));
break;
}
}
$TendenzImgFile = $Tendenz>0? $cfgarray['mini']['TendenzPfeilUpImg']: ( $Tendenz<0? $cfgarray['mini']['TendenzPfeilDownImg']:$cfgarray['mini']['TendenzPunktImg']);
$template->setVariable(array("TendenzIMG"=> HTML_image(PATH_TO_IMGDIR."/".$TendenzImgFile,"border='0' title='$Tendenz'") ));
// Style Classes anhand der liga Options errechnen -- um Alte Templates zu nutzen wird auch style mit ausgegeben
$style= "";$css_class= "";
if ($LigaTabelle[$j]['pos'] <= $liga->options->keyValues['Champ']) {
// Meister
$css_class = $cfgarray['mini']['tabelle_classMeister'];
$style="background: ".$cfgarray['lmo_tabelle_background1']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color1'])?'':"color: ".$cfgarray['lmo_tabelle_color1'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']) ) {
// Champions League
$css_class = $cfgarray['mini']['tabelle_classCLAufsteiger'];
$style="background: ".$cfgarray['lmo_tabelle_background2']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color2'])?'':"color: ".$cfgarray['lmo_tabelle_color2'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']+$liga->options->keyValues['CK']) ) {
// CL Qualifikation
$css_class = $cfgarray['mini']['tabelle_classCLQuali'];
$style="background: ".$cfgarray['lmo_tabelle_background3']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color3'])?'':"color: ".$cfgarray['lmo_tabelle_color3'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']+$liga->options->keyValues['CK']+$liga->options->keyValues['UC']) ) {
// UEFA Cup
$css_class = $cfgarray['mini']['tabelle_classUEFA'];
$style="background: ".$cfgarray['lmo_tabelle_background4']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color4'])?'':"color: ".$cfgarray['lmo_tabelle_color4'].";";
} elseif ($LigaTabelle[$j]['pos'] > ($AnzahlTeams-$liga->options->keyValues['AB']) ) {
// Abstiegs Relegation
$css_class = $cfgarray['mini']['tabelle_classAbsteiger'];
$style="background: ".$cfgarray['lmo_tabelle_background6']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color6'])?'':"color: ".$cfgarray['lmo_tabelle_color6'].";";
} elseif ($LigaTabelle[$j]['pos'] > ($AnzahlTeams-$liga->options->keyValues['AB']-$liga->options->keyValues['AR']) ) {
// Abstiegsplaetze
$css_class = $cfgarray['mini']['tabelle_classAbstiegsRelegation'];
$style="background: ".$cfgarray['lmo_tabelle_background5']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color5'])?'':"color: ".$cfgarray['lmo_tabelle_color5'].";";
} else $css_class = ""; // "Normale Tabellenplaetze
// Striche nach Meister / CL /CL Quali ....
if ($j && $LastClass != $css_class && $cfgarray['mini']['StyleStripLine'])
$style.= "border-top: ".$cfgarray['mini']['StyleStripLine'].";";
$LastClass= $css_class;
//FavTeam
if ($LigaTabelle[$j]['team']->nr == $Favorit ){
$style.="font-weight:bolder;";
$css_class.= $cfgarray['mini']['classFavorit'];
}
// Style fuer "Gestreifte" Tabelle
if ($m_striped != 0) {
$stripedColor = explode(",",trim($cfgarray['mini']['stripedTable']) );
if ($j%2==0) {
$style.="background-color: ".$stripedColor[0].";\n";
//$template->setVariable(array("Style"=>$style));
}
else {
$style.="background-color: ".$stripedColor[1].";\n";
//$template->setVariable(array("Style"=>$style));
}
}
$template->setVariable(array("Style"=>$style,"Class"=>$css_class));
$template->parseCurrentBlock();
}
$template->setVariable("LigaName", $liga->name);
$template->setVariable("Runde", $Runde);
$template->setVariable("ligaDatum",$text['mini'][14].": ".$liga->ligaDatumAsString("%x"));
$template->setVariable("Link", URL_TO_LMO.'/?action=table&file='.$m_liga);
$template->setVariable("URL_TO_LMO", URL_TO_LMO);
$template->setVariable("URL_TO_TEMPLATEDIR", URL_TO_TEMPLATEDIR."/mini/");
// cache File schreiben
if ( is_writable(dirname($TableCacheFile)) && $cfgarray['mini']['CacheTable'] == 1 ) {
$CacheOutput = filemtime(PATH_TO_LMO.'/'.$dirliga.$m_liga)."|$m_ueber|$m_unter|$m_platz\n".$template->get();
if ($fileHandle = @fopen($TableCacheFile,"wb") ) {
fwrite($fileHandle,$CacheOutput);
fclose($fileHandle);
}
}
$template->show();
} else {
echo getMessage($text['mini'][5]." ".$mini_liga,TRUE);
}
}
//Falls IFRAME - komplettes HTML-Dokument
if (basename($_SERVER['PHP_SELF'])=="lmo-minitab.php") : ?>
endif; ?> |
Burgenländische Ligen - LK 2
|
II. Liga Nord |
II. Liga Süd |
/** Liga Manager Online 4
*
* http://lmo.sourceforge.net/
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* REMOVING OR CHANGING THE COPYRIGHT NOTICES IS NOT ALLOWED!
*
*/
$mylmo = '/var/www/vhosts/sport4u.at/lmo.sport4u.at';
require($mylmo.'/lmo/init.php');
require(PATH_TO_ADDONDIR."/classlib/ini.php");
//4-stufiges Fallback für diese Variablen
//1.GET-Parameter(IFRAME)->2.Variable vorhanden(include)->3.Configwert->4. Standardwert
$m_template = !empty($_GET['mini_template'])? str_replace('..','',$_GET['mini_template'])
:(isset($mini_template)? str_replace('..','',$mini_template):$cfgarray['mini']['tabelle_standardTemplate'] );
if (!is_readable(PATH_TO_TEMPLATEDIR."/mini/$m_template.tpl.php") ) $m_template = "standard";
$m_liga = !empty($_GET['mini_liga'])? urldecode($_GET['mini_liga'])
:(isset($mini_liga)? $mini_liga
:(isset($mini_standardLiga)? $cfgarray['mini']['standardLiga']: '') );
$m_ueber= !empty($_GET['mini_ueber'])? urldecode($_GET['mini_ueber'])
:(isset($mini_ueber)? $mini_ueber
:(isset($cfgarray['mini']['standardAnzahlueber'])?$cfgarray['mini']['standardAnzahlueber']: 2) );
$m_unter= !empty($_GET['mini_unter'])? urldecode($_GET['mini_unter'])
:(isset($mini_unter) ? $mini_unter
:(isset($cfgarray['mini']['standardAnzahlunter'])? $cfgarray['mini']['standardAnzahlunter']: 2) );
$m_platz= !empty($_GET['mini_platz'])? urldecode($_GET['mini_platz'])
:(isset($mini_platz)? $mini_platz
: (!empty($cfgarray['mini']['standardTabellenPlatz'])? $cfgarray['mini']['standardTabellenPlatz']: NULL) );
//$m_striped= empty($_GET['mini_striped'])? urldecode($_GET['mini_striped']): 1;
//$m_striped= isset($striped)? $striped: $m_striped;
$m_striped = !empty($_GET['striped'])? urldecode($_GET['striped'])
:(isset($striped)? $striped:$cfgarray['mini']['striped'] );
//Falls IFRAME - komplettes HTML-Dokument
if (basename($_SERVER['PHP_SELF'])=="lmo-minitab.php") : ?>
Minitab
endif;
$CacheOutput = '';
$TableCacheFile = PATH_TO_LMO.'/'.$diroutput.basename($m_liga).".cache";
// Wenn Cache File vorhanden und auf Aktuellen Stand, gib dies aus.
if (is_readable($TableCacheFile) && $cfgarray['mini']['CacheTable'] == 1) {
$CacheFile= file ($TableCacheFile);
if (trim(array_shift($CacheFile)) == (filemtime(PATH_TO_LMO.'/'.$dirliga.$m_liga)."|$m_ueber|$m_unter|$m_platz") ) {
// echo "Cache Ausgabe: ";
$CacheOutput= print implode("",$CacheFile);
}
}
if (!$CacheOutput) {
// echo "Direkte Ausgabe: ";
$liga = new liga();
//$value = '';
if (is_readable(PATH_TO_LMO.'/'.$dirliga.$m_liga) && $m_liga && $liga->loadFile(PATH_TO_LMO.'/'.$dirliga.$m_liga) ) {
$template = new HTML_Template_IT( PATH_TO_TEMPLATEDIR.'/mini' );
$template->loadTemplatefile($m_template.".tpl.php");
$AnzahlTeams = $liga->teamCount();
$LigaTabelle = $liga->calcTable($liga->options->keyValues['Rounds']);
$LastGameDay = $liga->calcTable($liga->options->keyValues['Actual']-1);
$Runde= $liga->aktSpTag;
//$stripedColor = explode(",",trim($cfgarray['mini']['stripedTable']) );
//$strip= urldecode($_GET['mini_striped']);
//echo "Liga: ".$mini_liga." ";
//echo $m_striped." ";
//echo "Einbindung: ".$striped;
//echo $stripedColor[0];
$viewPosition = "";
$Favorit = $liga->teamForNumber($liga->options->keyValues['favTeam']);
if (is_null($m_platz) || $m_platz <= 0 || $m_platz > $AnzahlTeams ) {
foreach ($LigaTabelle as $value)
if ($Favorit == $value['team']->nr ) $viewPosition = $value['pos'];
} else $viewPosition = $m_platz;
$beginTabellenPlatz = (int)$viewPosition - (int)$m_unter;
$endTabellenPlatz = (int)$viewPosition + (int)$m_ueber;
if ($beginTabellenPlatz<=0) {
$beginTabellenPlatz = 1;
$endTabellenPlatz = $m_unter+1+$m_ueber<$AnzahlTeams? $m_unter+1+$m_ueber:$AnzahlTeams;
}
if ($endTabellenPlatz>$AnzahlTeams ) {
$endTabellenPlatz = $AnzahlTeams;
$beginTabellenPlatz = $AnzahlTeams-$m_unter-1-$m_ueber>0? $AnzahlTeams-$m_unter-1-$m_ueber:1 ;
}
for ($j=0; $j<$AnzahlTeams ; $j++)
if ($LigaTabelle[$j]['pos'] >= $beginTabellenPlatz && $LigaTabelle[$j]['pos'] <= $endTabellenPlatz ) {
$template->setCurrentBlock("Inhalt");
$template->setVariable(array("Platz"=>"".$LigaTabelle[$j]['pos'].""));
$template->setVariable(array("TeamBild"=>HTML_smallTeamIcon($m_liga,$LigaTabelle[$j]['team']," alt=''")));
$template->setVariable(array("TeamLang"=>$LigaTabelle[$j]['team']->name));
$template->setVariable(array("TeamMittel"=>(isset($LigaTabelle[$j]['team']->mittel)?$LigaTabelle[$j]['team']->mittel:'')));
$template->setVariable(array("Team"=>$LigaTabelle[$j]['team']->kurz));
if ($liga->options->keyValues['MinusPoints'] == 1 ) $template->setVariable(array("Punkte"=>$LigaTabelle[$j]['pPkt']));
else $template->setVariable(array("Punkte"=>$LigaTabelle[$j]['pPkt'].':'.$LigaTabelle[$j]['mPkt']));
$template->setVariable(array("PlusTore"=>$LigaTabelle[$j]['pTor']));
$template->setVariable(array("MinusTore"=>$LigaTabelle[$j]['mTor']));
$template->setVariable(array("Tordifferenz"=>$LigaTabelle[$j]['dTor']));
// Dart Liga
// $template->setVariable(array("PlusSaetze"=>$LigaTabelle[$j][12]));
// $template->setVariable(array("MinusSaetze"=>$LigaTabelle[$j][13]));
// if (( $satzDiff = $LigaTabelle[$j][12]-$LigaTabelle[$j][13]) > 0 ) $satzDiff = "+".$satzDiff;
// $template->setVariable(array("SatzDifferenz"=>$satzDiff));
// Dart Liga
$template->setVariable(array("Spiele"=>$LigaTabelle[$j]['spiele']));
$template->setVariable(array("Siege"=>$LigaTabelle[$j]['s']));
$template->setVariable(array("Unentschieden"=>$LigaTabelle[$j]['u']));
$template->setVariable(array("Niederlagen"=>$LigaTabelle[$j]['n']));
foreach ($LastGameDay as $LetzterSpieltag) {
if ($LigaTabelle[$j]['team']->nr == $LetzterSpieltag['team']->nr) {
$Tendenz = $LetzterSpieltag['pos']-$LigaTabelle[$j]['pos'];
$template->setVariable(array("Tendenz"=>($Tendenz>0?'+'.$Tendenz:$Tendenz) ));
break;
}
}
$TendenzImgFile = $Tendenz>0? $cfgarray['mini']['TendenzPfeilUpImg']: ( $Tendenz<0? $cfgarray['mini']['TendenzPfeilDownImg']:$cfgarray['mini']['TendenzPunktImg']);
$template->setVariable(array("TendenzIMG"=> HTML_image(PATH_TO_IMGDIR."/".$TendenzImgFile,"border='0' title='$Tendenz'") ));
// Style Classes anhand der liga Options errechnen -- um Alte Templates zu nutzen wird auch style mit ausgegeben
$style= "";$css_class= "";
if ($LigaTabelle[$j]['pos'] <= $liga->options->keyValues['Champ']) {
// Meister
$css_class = $cfgarray['mini']['tabelle_classMeister'];
$style="background: ".$cfgarray['lmo_tabelle_background1']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color1'])?'':"color: ".$cfgarray['lmo_tabelle_color1'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']) ) {
// Champions League
$css_class = $cfgarray['mini']['tabelle_classCLAufsteiger'];
$style="background: ".$cfgarray['lmo_tabelle_background2']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color2'])?'':"color: ".$cfgarray['lmo_tabelle_color2'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']+$liga->options->keyValues['CK']) ) {
// CL Qualifikation
$css_class = $cfgarray['mini']['tabelle_classCLQuali'];
$style="background: ".$cfgarray['lmo_tabelle_background3']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color3'])?'':"color: ".$cfgarray['lmo_tabelle_color3'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']+$liga->options->keyValues['CK']+$liga->options->keyValues['UC']) ) {
// UEFA Cup
$css_class = $cfgarray['mini']['tabelle_classUEFA'];
$style="background: ".$cfgarray['lmo_tabelle_background4']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color4'])?'':"color: ".$cfgarray['lmo_tabelle_color4'].";";
} elseif ($LigaTabelle[$j]['pos'] > ($AnzahlTeams-$liga->options->keyValues['AB']) ) {
// Abstiegs Relegation
$css_class = $cfgarray['mini']['tabelle_classAbsteiger'];
$style="background: ".$cfgarray['lmo_tabelle_background6']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color6'])?'':"color: ".$cfgarray['lmo_tabelle_color6'].";";
} elseif ($LigaTabelle[$j]['pos'] > ($AnzahlTeams-$liga->options->keyValues['AB']-$liga->options->keyValues['AR']) ) {
// Abstiegsplaetze
$css_class = $cfgarray['mini']['tabelle_classAbstiegsRelegation'];
$style="background: ".$cfgarray['lmo_tabelle_background5']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color5'])?'':"color: ".$cfgarray['lmo_tabelle_color5'].";";
} else $css_class = ""; // "Normale Tabellenplaetze
// Striche nach Meister / CL /CL Quali ....
if ($j && $LastClass != $css_class && $cfgarray['mini']['StyleStripLine'])
$style.= "border-top: ".$cfgarray['mini']['StyleStripLine'].";";
$LastClass= $css_class;
//FavTeam
if ($LigaTabelle[$j]['team']->nr == $Favorit ){
$style.="font-weight:bolder;";
$css_class.= $cfgarray['mini']['classFavorit'];
}
// Style fuer "Gestreifte" Tabelle
if ($m_striped != 0) {
$stripedColor = explode(",",trim($cfgarray['mini']['stripedTable']) );
if ($j%2==0) {
$style.="background-color: ".$stripedColor[0].";\n";
//$template->setVariable(array("Style"=>$style));
}
else {
$style.="background-color: ".$stripedColor[1].";\n";
//$template->setVariable(array("Style"=>$style));
}
}
$template->setVariable(array("Style"=>$style,"Class"=>$css_class));
$template->parseCurrentBlock();
}
$template->setVariable("LigaName", $liga->name);
$template->setVariable("Runde", $Runde);
$template->setVariable("ligaDatum",$text['mini'][14].": ".$liga->ligaDatumAsString("%x"));
$template->setVariable("Link", URL_TO_LMO.'/?action=table&file='.$m_liga);
$template->setVariable("URL_TO_LMO", URL_TO_LMO);
$template->setVariable("URL_TO_TEMPLATEDIR", URL_TO_TEMPLATEDIR."/mini/");
// cache File schreiben
if ( is_writable(dirname($TableCacheFile)) && $cfgarray['mini']['CacheTable'] == 1 ) {
$CacheOutput = filemtime(PATH_TO_LMO.'/'.$dirliga.$m_liga)."|$m_ueber|$m_unter|$m_platz\n".$template->get();
if ($fileHandle = @fopen($TableCacheFile,"wb") ) {
fwrite($fileHandle,$CacheOutput);
fclose($fileHandle);
}
}
$template->show();
} else {
echo getMessage($text['mini'][5]." ".$mini_liga,TRUE);
}
}
//Falls IFRAME - komplettes HTML-Dokument
if (basename($_SERVER['PHP_SELF'])=="lmo-minitab.php") : ?>
endif; ?> |
/** Liga Manager Online 4
*
* http://lmo.sourceforge.net/
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* REMOVING OR CHANGING THE COPYRIGHT NOTICES IS NOT ALLOWED!
*
*/
$mylmo = '/var/www/vhosts/sport4u.at/lmo.sport4u.at';
require($mylmo.'/lmo/init.php');
require(PATH_TO_ADDONDIR."/classlib/ini.php");
//4-stufiges Fallback für diese Variablen
//1.GET-Parameter(IFRAME)->2.Variable vorhanden(include)->3.Configwert->4. Standardwert
$m_template = !empty($_GET['mini_template'])? str_replace('..','',$_GET['mini_template'])
:(isset($mini_template)? str_replace('..','',$mini_template):$cfgarray['mini']['tabelle_standardTemplate'] );
if (!is_readable(PATH_TO_TEMPLATEDIR."/mini/$m_template.tpl.php") ) $m_template = "standard";
$m_liga = !empty($_GET['mini_liga'])? urldecode($_GET['mini_liga'])
:(isset($mini_liga)? $mini_liga
:(isset($mini_standardLiga)? $cfgarray['mini']['standardLiga']: '') );
$m_ueber= !empty($_GET['mini_ueber'])? urldecode($_GET['mini_ueber'])
:(isset($mini_ueber)? $mini_ueber
:(isset($cfgarray['mini']['standardAnzahlueber'])?$cfgarray['mini']['standardAnzahlueber']: 2) );
$m_unter= !empty($_GET['mini_unter'])? urldecode($_GET['mini_unter'])
:(isset($mini_unter) ? $mini_unter
:(isset($cfgarray['mini']['standardAnzahlunter'])? $cfgarray['mini']['standardAnzahlunter']: 2) );
$m_platz= !empty($_GET['mini_platz'])? urldecode($_GET['mini_platz'])
:(isset($mini_platz)? $mini_platz
: (!empty($cfgarray['mini']['standardTabellenPlatz'])? $cfgarray['mini']['standardTabellenPlatz']: NULL) );
//$m_striped= empty($_GET['mini_striped'])? urldecode($_GET['mini_striped']): 1;
//$m_striped= isset($striped)? $striped: $m_striped;
$m_striped = !empty($_GET['striped'])? urldecode($_GET['striped'])
:(isset($striped)? $striped:$cfgarray['mini']['striped'] );
//Falls IFRAME - komplettes HTML-Dokument
if (basename($_SERVER['PHP_SELF'])=="lmo-minitab.php") : ?>
Minitab
endif;
$CacheOutput = '';
$TableCacheFile = PATH_TO_LMO.'/'.$diroutput.basename($m_liga).".cache";
// Wenn Cache File vorhanden und auf Aktuellen Stand, gib dies aus.
if (is_readable($TableCacheFile) && $cfgarray['mini']['CacheTable'] == 1) {
$CacheFile= file ($TableCacheFile);
if (trim(array_shift($CacheFile)) == (filemtime(PATH_TO_LMO.'/'.$dirliga.$m_liga)."|$m_ueber|$m_unter|$m_platz") ) {
// echo "Cache Ausgabe: ";
$CacheOutput= print implode("",$CacheFile);
}
}
if (!$CacheOutput) {
// echo "Direkte Ausgabe: ";
$liga = new liga();
//$value = '';
if (is_readable(PATH_TO_LMO.'/'.$dirliga.$m_liga) && $m_liga && $liga->loadFile(PATH_TO_LMO.'/'.$dirliga.$m_liga) ) {
$template = new HTML_Template_IT( PATH_TO_TEMPLATEDIR.'/mini' );
$template->loadTemplatefile($m_template.".tpl.php");
$AnzahlTeams = $liga->teamCount();
$LigaTabelle = $liga->calcTable($liga->options->keyValues['Rounds']);
$LastGameDay = $liga->calcTable($liga->options->keyValues['Actual']-1);
$Runde= $liga->aktSpTag;
//$stripedColor = explode(",",trim($cfgarray['mini']['stripedTable']) );
//$strip= urldecode($_GET['mini_striped']);
//echo "Liga: ".$mini_liga." ";
//echo $m_striped." ";
//echo "Einbindung: ".$striped;
//echo $stripedColor[0];
$viewPosition = "";
$Favorit = $liga->teamForNumber($liga->options->keyValues['favTeam']);
if (is_null($m_platz) || $m_platz <= 0 || $m_platz > $AnzahlTeams ) {
foreach ($LigaTabelle as $value)
if ($Favorit == $value['team']->nr ) $viewPosition = $value['pos'];
} else $viewPosition = $m_platz;
$beginTabellenPlatz = (int)$viewPosition - (int)$m_unter;
$endTabellenPlatz = (int)$viewPosition + (int)$m_ueber;
if ($beginTabellenPlatz<=0) {
$beginTabellenPlatz = 1;
$endTabellenPlatz = $m_unter+1+$m_ueber<$AnzahlTeams? $m_unter+1+$m_ueber:$AnzahlTeams;
}
if ($endTabellenPlatz>$AnzahlTeams ) {
$endTabellenPlatz = $AnzahlTeams;
$beginTabellenPlatz = $AnzahlTeams-$m_unter-1-$m_ueber>0? $AnzahlTeams-$m_unter-1-$m_ueber:1 ;
}
for ($j=0; $j<$AnzahlTeams ; $j++)
if ($LigaTabelle[$j]['pos'] >= $beginTabellenPlatz && $LigaTabelle[$j]['pos'] <= $endTabellenPlatz ) {
$template->setCurrentBlock("Inhalt");
$template->setVariable(array("Platz"=>"".$LigaTabelle[$j]['pos'].""));
$template->setVariable(array("TeamBild"=>HTML_smallTeamIcon($m_liga,$LigaTabelle[$j]['team']," alt=''")));
$template->setVariable(array("TeamLang"=>$LigaTabelle[$j]['team']->name));
$template->setVariable(array("TeamMittel"=>(isset($LigaTabelle[$j]['team']->mittel)?$LigaTabelle[$j]['team']->mittel:'')));
$template->setVariable(array("Team"=>$LigaTabelle[$j]['team']->kurz));
if ($liga->options->keyValues['MinusPoints'] == 1 ) $template->setVariable(array("Punkte"=>$LigaTabelle[$j]['pPkt']));
else $template->setVariable(array("Punkte"=>$LigaTabelle[$j]['pPkt'].':'.$LigaTabelle[$j]['mPkt']));
$template->setVariable(array("PlusTore"=>$LigaTabelle[$j]['pTor']));
$template->setVariable(array("MinusTore"=>$LigaTabelle[$j]['mTor']));
$template->setVariable(array("Tordifferenz"=>$LigaTabelle[$j]['dTor']));
// Dart Liga
// $template->setVariable(array("PlusSaetze"=>$LigaTabelle[$j][12]));
// $template->setVariable(array("MinusSaetze"=>$LigaTabelle[$j][13]));
// if (( $satzDiff = $LigaTabelle[$j][12]-$LigaTabelle[$j][13]) > 0 ) $satzDiff = "+".$satzDiff;
// $template->setVariable(array("SatzDifferenz"=>$satzDiff));
// Dart Liga
$template->setVariable(array("Spiele"=>$LigaTabelle[$j]['spiele']));
$template->setVariable(array("Siege"=>$LigaTabelle[$j]['s']));
$template->setVariable(array("Unentschieden"=>$LigaTabelle[$j]['u']));
$template->setVariable(array("Niederlagen"=>$LigaTabelle[$j]['n']));
foreach ($LastGameDay as $LetzterSpieltag) {
if ($LigaTabelle[$j]['team']->nr == $LetzterSpieltag['team']->nr) {
$Tendenz = $LetzterSpieltag['pos']-$LigaTabelle[$j]['pos'];
$template->setVariable(array("Tendenz"=>($Tendenz>0?'+'.$Tendenz:$Tendenz) ));
break;
}
}
$TendenzImgFile = $Tendenz>0? $cfgarray['mini']['TendenzPfeilUpImg']: ( $Tendenz<0? $cfgarray['mini']['TendenzPfeilDownImg']:$cfgarray['mini']['TendenzPunktImg']);
$template->setVariable(array("TendenzIMG"=> HTML_image(PATH_TO_IMGDIR."/".$TendenzImgFile,"border='0' title='$Tendenz'") ));
// Style Classes anhand der liga Options errechnen -- um Alte Templates zu nutzen wird auch style mit ausgegeben
$style= "";$css_class= "";
if ($LigaTabelle[$j]['pos'] <= $liga->options->keyValues['Champ']) {
// Meister
$css_class = $cfgarray['mini']['tabelle_classMeister'];
$style="background: ".$cfgarray['lmo_tabelle_background1']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color1'])?'':"color: ".$cfgarray['lmo_tabelle_color1'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']) ) {
// Champions League
$css_class = $cfgarray['mini']['tabelle_classCLAufsteiger'];
$style="background: ".$cfgarray['lmo_tabelle_background2']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color2'])?'':"color: ".$cfgarray['lmo_tabelle_color2'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']+$liga->options->keyValues['CK']) ) {
// CL Qualifikation
$css_class = $cfgarray['mini']['tabelle_classCLQuali'];
$style="background: ".$cfgarray['lmo_tabelle_background3']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color3'])?'':"color: ".$cfgarray['lmo_tabelle_color3'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']+$liga->options->keyValues['CK']+$liga->options->keyValues['UC']) ) {
// UEFA Cup
$css_class = $cfgarray['mini']['tabelle_classUEFA'];
$style="background: ".$cfgarray['lmo_tabelle_background4']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color4'])?'':"color: ".$cfgarray['lmo_tabelle_color4'].";";
} elseif ($LigaTabelle[$j]['pos'] > ($AnzahlTeams-$liga->options->keyValues['AB']) ) {
// Abstiegs Relegation
$css_class = $cfgarray['mini']['tabelle_classAbsteiger'];
$style="background: ".$cfgarray['lmo_tabelle_background6']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color6'])?'':"color: ".$cfgarray['lmo_tabelle_color6'].";";
} elseif ($LigaTabelle[$j]['pos'] > ($AnzahlTeams-$liga->options->keyValues['AB']-$liga->options->keyValues['AR']) ) {
// Abstiegsplaetze
$css_class = $cfgarray['mini']['tabelle_classAbstiegsRelegation'];
$style="background: ".$cfgarray['lmo_tabelle_background5']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color5'])?'':"color: ".$cfgarray['lmo_tabelle_color5'].";";
} else $css_class = ""; // "Normale Tabellenplaetze
// Striche nach Meister / CL /CL Quali ....
if ($j && $LastClass != $css_class && $cfgarray['mini']['StyleStripLine'])
$style.= "border-top: ".$cfgarray['mini']['StyleStripLine'].";";
$LastClass= $css_class;
//FavTeam
if ($LigaTabelle[$j]['team']->nr == $Favorit ){
$style.="font-weight:bolder;";
$css_class.= $cfgarray['mini']['classFavorit'];
}
// Style fuer "Gestreifte" Tabelle
if ($m_striped != 0) {
$stripedColor = explode(",",trim($cfgarray['mini']['stripedTable']) );
if ($j%2==0) {
$style.="background-color: ".$stripedColor[0].";\n";
//$template->setVariable(array("Style"=>$style));
}
else {
$style.="background-color: ".$stripedColor[1].";\n";
//$template->setVariable(array("Style"=>$style));
}
}
$template->setVariable(array("Style"=>$style,"Class"=>$css_class));
$template->parseCurrentBlock();
}
$template->setVariable("LigaName", $liga->name);
$template->setVariable("Runde", $Runde);
$template->setVariable("ligaDatum",$text['mini'][14].": ".$liga->ligaDatumAsString("%x"));
$template->setVariable("Link", URL_TO_LMO.'/?action=table&file='.$m_liga);
$template->setVariable("URL_TO_LMO", URL_TO_LMO);
$template->setVariable("URL_TO_TEMPLATEDIR", URL_TO_TEMPLATEDIR."/mini/");
// cache File schreiben
if ( is_writable(dirname($TableCacheFile)) && $cfgarray['mini']['CacheTable'] == 1 ) {
$CacheOutput = filemtime(PATH_TO_LMO.'/'.$dirliga.$m_liga)."|$m_ueber|$m_unter|$m_platz\n".$template->get();
if ($fileHandle = @fopen($TableCacheFile,"wb") ) {
fwrite($fileHandle,$CacheOutput);
fclose($fileHandle);
}
}
$template->show();
} else {
echo getMessage($text['mini'][5]." ".$mini_liga,TRUE);
}
}
//Falls IFRAME - komplettes HTML-Dokument
if (basename($_SERVER['PHP_SELF'])=="lmo-minitab.php") : ?>
endif; ?> |

Burgenländische Ligen - LK 3
|
1. Klasse Mitte |
1. Klasse Nord |
/** Liga Manager Online 4
*
* http://lmo.sourceforge.net/
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* REMOVING OR CHANGING THE COPYRIGHT NOTICES IS NOT ALLOWED!
*
*/
$mylmo = '/var/www/vhosts/sport4u.at/lmo.sport4u.at';
require($mylmo.'/lmo/init.php');
require(PATH_TO_ADDONDIR."/classlib/ini.php");
//4-stufiges Fallback für diese Variablen
//1.GET-Parameter(IFRAME)->2.Variable vorhanden(include)->3.Configwert->4. Standardwert
$m_template = !empty($_GET['mini_template'])? str_replace('..','',$_GET['mini_template'])
:(isset($mini_template)? str_replace('..','',$mini_template):$cfgarray['mini']['tabelle_standardTemplate'] );
if (!is_readable(PATH_TO_TEMPLATEDIR."/mini/$m_template.tpl.php") ) $m_template = "standard";
$m_liga = !empty($_GET['mini_liga'])? urldecode($_GET['mini_liga'])
:(isset($mini_liga)? $mini_liga
:(isset($mini_standardLiga)? $cfgarray['mini']['standardLiga']: '') );
$m_ueber= !empty($_GET['mini_ueber'])? urldecode($_GET['mini_ueber'])
:(isset($mini_ueber)? $mini_ueber
:(isset($cfgarray['mini']['standardAnzahlueber'])?$cfgarray['mini']['standardAnzahlueber']: 2) );
$m_unter= !empty($_GET['mini_unter'])? urldecode($_GET['mini_unter'])
:(isset($mini_unter) ? $mini_unter
:(isset($cfgarray['mini']['standardAnzahlunter'])? $cfgarray['mini']['standardAnzahlunter']: 2) );
$m_platz= !empty($_GET['mini_platz'])? urldecode($_GET['mini_platz'])
:(isset($mini_platz)? $mini_platz
: (!empty($cfgarray['mini']['standardTabellenPlatz'])? $cfgarray['mini']['standardTabellenPlatz']: NULL) );
//$m_striped= empty($_GET['mini_striped'])? urldecode($_GET['mini_striped']): 1;
//$m_striped= isset($striped)? $striped: $m_striped;
$m_striped = !empty($_GET['striped'])? urldecode($_GET['striped'])
:(isset($striped)? $striped:$cfgarray['mini']['striped'] );
//Falls IFRAME - komplettes HTML-Dokument
if (basename($_SERVER['PHP_SELF'])=="lmo-minitab.php") : ?>
Minitab
endif;
$CacheOutput = '';
$TableCacheFile = PATH_TO_LMO.'/'.$diroutput.basename($m_liga).".cache";
// Wenn Cache File vorhanden und auf Aktuellen Stand, gib dies aus.
if (is_readable($TableCacheFile) && $cfgarray['mini']['CacheTable'] == 1) {
$CacheFile= file ($TableCacheFile);
if (trim(array_shift($CacheFile)) == (filemtime(PATH_TO_LMO.'/'.$dirliga.$m_liga)."|$m_ueber|$m_unter|$m_platz") ) {
// echo "Cache Ausgabe: ";
$CacheOutput= print implode("",$CacheFile);
}
}
if (!$CacheOutput) {
// echo "Direkte Ausgabe: ";
$liga = new liga();
//$value = '';
if (is_readable(PATH_TO_LMO.'/'.$dirliga.$m_liga) && $m_liga && $liga->loadFile(PATH_TO_LMO.'/'.$dirliga.$m_liga) ) {
$template = new HTML_Template_IT( PATH_TO_TEMPLATEDIR.'/mini' );
$template->loadTemplatefile($m_template.".tpl.php");
$AnzahlTeams = $liga->teamCount();
$LigaTabelle = $liga->calcTable($liga->options->keyValues['Rounds']);
$LastGameDay = $liga->calcTable($liga->options->keyValues['Actual']-1);
$Runde= $liga->aktSpTag;
//$stripedColor = explode(",",trim($cfgarray['mini']['stripedTable']) );
//$strip= urldecode($_GET['mini_striped']);
//echo "Liga: ".$mini_liga." ";
//echo $m_striped." ";
//echo "Einbindung: ".$striped;
//echo $stripedColor[0];
$viewPosition = "";
$Favorit = $liga->teamForNumber($liga->options->keyValues['favTeam']);
if (is_null($m_platz) || $m_platz <= 0 || $m_platz > $AnzahlTeams ) {
foreach ($LigaTabelle as $value)
if ($Favorit == $value['team']->nr ) $viewPosition = $value['pos'];
} else $viewPosition = $m_platz;
$beginTabellenPlatz = (int)$viewPosition - (int)$m_unter;
$endTabellenPlatz = (int)$viewPosition + (int)$m_ueber;
if ($beginTabellenPlatz<=0) {
$beginTabellenPlatz = 1;
$endTabellenPlatz = $m_unter+1+$m_ueber<$AnzahlTeams? $m_unter+1+$m_ueber:$AnzahlTeams;
}
if ($endTabellenPlatz>$AnzahlTeams ) {
$endTabellenPlatz = $AnzahlTeams;
$beginTabellenPlatz = $AnzahlTeams-$m_unter-1-$m_ueber>0? $AnzahlTeams-$m_unter-1-$m_ueber:1 ;
}
for ($j=0; $j<$AnzahlTeams ; $j++)
if ($LigaTabelle[$j]['pos'] >= $beginTabellenPlatz && $LigaTabelle[$j]['pos'] <= $endTabellenPlatz ) {
$template->setCurrentBlock("Inhalt");
$template->setVariable(array("Platz"=>"".$LigaTabelle[$j]['pos'].""));
$template->setVariable(array("TeamBild"=>HTML_smallTeamIcon($m_liga,$LigaTabelle[$j]['team']," alt=''")));
$template->setVariable(array("TeamLang"=>$LigaTabelle[$j]['team']->name));
$template->setVariable(array("TeamMittel"=>(isset($LigaTabelle[$j]['team']->mittel)?$LigaTabelle[$j]['team']->mittel:'')));
$template->setVariable(array("Team"=>$LigaTabelle[$j]['team']->kurz));
if ($liga->options->keyValues['MinusPoints'] == 1 ) $template->setVariable(array("Punkte"=>$LigaTabelle[$j]['pPkt']));
else $template->setVariable(array("Punkte"=>$LigaTabelle[$j]['pPkt'].':'.$LigaTabelle[$j]['mPkt']));
$template->setVariable(array("PlusTore"=>$LigaTabelle[$j]['pTor']));
$template->setVariable(array("MinusTore"=>$LigaTabelle[$j]['mTor']));
$template->setVariable(array("Tordifferenz"=>$LigaTabelle[$j]['dTor']));
// Dart Liga
// $template->setVariable(array("PlusSaetze"=>$LigaTabelle[$j][12]));
// $template->setVariable(array("MinusSaetze"=>$LigaTabelle[$j][13]));
// if (( $satzDiff = $LigaTabelle[$j][12]-$LigaTabelle[$j][13]) > 0 ) $satzDiff = "+".$satzDiff;
// $template->setVariable(array("SatzDifferenz"=>$satzDiff));
// Dart Liga
$template->setVariable(array("Spiele"=>$LigaTabelle[$j]['spiele']));
$template->setVariable(array("Siege"=>$LigaTabelle[$j]['s']));
$template->setVariable(array("Unentschieden"=>$LigaTabelle[$j]['u']));
$template->setVariable(array("Niederlagen"=>$LigaTabelle[$j]['n']));
foreach ($LastGameDay as $LetzterSpieltag) {
if ($LigaTabelle[$j]['team']->nr == $LetzterSpieltag['team']->nr) {
$Tendenz = $LetzterSpieltag['pos']-$LigaTabelle[$j]['pos'];
$template->setVariable(array("Tendenz"=>($Tendenz>0?'+'.$Tendenz:$Tendenz) ));
break;
}
}
$TendenzImgFile = $Tendenz>0? $cfgarray['mini']['TendenzPfeilUpImg']: ( $Tendenz<0? $cfgarray['mini']['TendenzPfeilDownImg']:$cfgarray['mini']['TendenzPunktImg']);
$template->setVariable(array("TendenzIMG"=> HTML_image(PATH_TO_IMGDIR."/".$TendenzImgFile,"border='0' title='$Tendenz'") ));
// Style Classes anhand der liga Options errechnen -- um Alte Templates zu nutzen wird auch style mit ausgegeben
$style= "";$css_class= "";
if ($LigaTabelle[$j]['pos'] <= $liga->options->keyValues['Champ']) {
// Meister
$css_class = $cfgarray['mini']['tabelle_classMeister'];
$style="background: ".$cfgarray['lmo_tabelle_background1']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color1'])?'':"color: ".$cfgarray['lmo_tabelle_color1'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']) ) {
// Champions League
$css_class = $cfgarray['mini']['tabelle_classCLAufsteiger'];
$style="background: ".$cfgarray['lmo_tabelle_background2']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color2'])?'':"color: ".$cfgarray['lmo_tabelle_color2'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']+$liga->options->keyValues['CK']) ) {
// CL Qualifikation
$css_class = $cfgarray['mini']['tabelle_classCLQuali'];
$style="background: ".$cfgarray['lmo_tabelle_background3']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color3'])?'':"color: ".$cfgarray['lmo_tabelle_color3'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']+$liga->options->keyValues['CK']+$liga->options->keyValues['UC']) ) {
// UEFA Cup
$css_class = $cfgarray['mini']['tabelle_classUEFA'];
$style="background: ".$cfgarray['lmo_tabelle_background4']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color4'])?'':"color: ".$cfgarray['lmo_tabelle_color4'].";";
} elseif ($LigaTabelle[$j]['pos'] > ($AnzahlTeams-$liga->options->keyValues['AB']) ) {
// Abstiegs Relegation
$css_class = $cfgarray['mini']['tabelle_classAbsteiger'];
$style="background: ".$cfgarray['lmo_tabelle_background6']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color6'])?'':"color: ".$cfgarray['lmo_tabelle_color6'].";";
} elseif ($LigaTabelle[$j]['pos'] > ($AnzahlTeams-$liga->options->keyValues['AB']-$liga->options->keyValues['AR']) ) {
// Abstiegsplaetze
$css_class = $cfgarray['mini']['tabelle_classAbstiegsRelegation'];
$style="background: ".$cfgarray['lmo_tabelle_background5']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color5'])?'':"color: ".$cfgarray['lmo_tabelle_color5'].";";
} else $css_class = ""; // "Normale Tabellenplaetze
// Striche nach Meister / CL /CL Quali ....
if ($j && $LastClass != $css_class && $cfgarray['mini']['StyleStripLine'])
$style.= "border-top: ".$cfgarray['mini']['StyleStripLine'].";";
$LastClass= $css_class;
//FavTeam
if ($LigaTabelle[$j]['team']->nr == $Favorit ){
$style.="font-weight:bolder;";
$css_class.= $cfgarray['mini']['classFavorit'];
}
// Style fuer "Gestreifte" Tabelle
if ($m_striped != 0) {
$stripedColor = explode(",",trim($cfgarray['mini']['stripedTable']) );
if ($j%2==0) {
$style.="background-color: ".$stripedColor[0].";\n";
//$template->setVariable(array("Style"=>$style));
}
else {
$style.="background-color: ".$stripedColor[1].";\n";
//$template->setVariable(array("Style"=>$style));
}
}
$template->setVariable(array("Style"=>$style,"Class"=>$css_class));
$template->parseCurrentBlock();
}
$template->setVariable("LigaName", $liga->name);
$template->setVariable("Runde", $Runde);
$template->setVariable("ligaDatum",$text['mini'][14].": ".$liga->ligaDatumAsString("%x"));
$template->setVariable("Link", URL_TO_LMO.'/?action=table&file='.$m_liga);
$template->setVariable("URL_TO_LMO", URL_TO_LMO);
$template->setVariable("URL_TO_TEMPLATEDIR", URL_TO_TEMPLATEDIR."/mini/");
// cache File schreiben
if ( is_writable(dirname($TableCacheFile)) && $cfgarray['mini']['CacheTable'] == 1 ) {
$CacheOutput = filemtime(PATH_TO_LMO.'/'.$dirliga.$m_liga)."|$m_ueber|$m_unter|$m_platz\n".$template->get();
if ($fileHandle = @fopen($TableCacheFile,"wb") ) {
fwrite($fileHandle,$CacheOutput);
fclose($fileHandle);
}
}
$template->show();
} else {
echo getMessage($text['mini'][5]." ".$mini_liga,TRUE);
}
}
//Falls IFRAME - komplettes HTML-Dokument
if (basename($_SERVER['PHP_SELF'])=="lmo-minitab.php") : ?>
endif; ?> |
/** Liga Manager Online 4
*
* http://lmo.sourceforge.net/
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* REMOVING OR CHANGING THE COPYRIGHT NOTICES IS NOT ALLOWED!
*
*/
$mylmo = '/var/www/vhosts/sport4u.at/lmo.sport4u.at';
require($mylmo.'/lmo/init.php');
require(PATH_TO_ADDONDIR."/classlib/ini.php");
//4-stufiges Fallback für diese Variablen
//1.GET-Parameter(IFRAME)->2.Variable vorhanden(include)->3.Configwert->4. Standardwert
$m_template = !empty($_GET['mini_template'])? str_replace('..','',$_GET['mini_template'])
:(isset($mini_template)? str_replace('..','',$mini_template):$cfgarray['mini']['tabelle_standardTemplate'] );
if (!is_readable(PATH_TO_TEMPLATEDIR."/mini/$m_template.tpl.php") ) $m_template = "standard";
$m_liga = !empty($_GET['mini_liga'])? urldecode($_GET['mini_liga'])
:(isset($mini_liga)? $mini_liga
:(isset($mini_standardLiga)? $cfgarray['mini']['standardLiga']: '') );
$m_ueber= !empty($_GET['mini_ueber'])? urldecode($_GET['mini_ueber'])
:(isset($mini_ueber)? $mini_ueber
:(isset($cfgarray['mini']['standardAnzahlueber'])?$cfgarray['mini']['standardAnzahlueber']: 2) );
$m_unter= !empty($_GET['mini_unter'])? urldecode($_GET['mini_unter'])
:(isset($mini_unter) ? $mini_unter
:(isset($cfgarray['mini']['standardAnzahlunter'])? $cfgarray['mini']['standardAnzahlunter']: 2) );
$m_platz= !empty($_GET['mini_platz'])? urldecode($_GET['mini_platz'])
:(isset($mini_platz)? $mini_platz
: (!empty($cfgarray['mini']['standardTabellenPlatz'])? $cfgarray['mini']['standardTabellenPlatz']: NULL) );
//$m_striped= empty($_GET['mini_striped'])? urldecode($_GET['mini_striped']): 1;
//$m_striped= isset($striped)? $striped: $m_striped;
$m_striped = !empty($_GET['striped'])? urldecode($_GET['striped'])
:(isset($striped)? $striped:$cfgarray['mini']['striped'] );
//Falls IFRAME - komplettes HTML-Dokument
if (basename($_SERVER['PHP_SELF'])=="lmo-minitab.php") : ?>
Minitab
endif;
$CacheOutput = '';
$TableCacheFile = PATH_TO_LMO.'/'.$diroutput.basename($m_liga).".cache";
// Wenn Cache File vorhanden und auf Aktuellen Stand, gib dies aus.
if (is_readable($TableCacheFile) && $cfgarray['mini']['CacheTable'] == 1) {
$CacheFile= file ($TableCacheFile);
if (trim(array_shift($CacheFile)) == (filemtime(PATH_TO_LMO.'/'.$dirliga.$m_liga)."|$m_ueber|$m_unter|$m_platz") ) {
// echo "Cache Ausgabe: ";
$CacheOutput= print implode("",$CacheFile);
}
}
if (!$CacheOutput) {
// echo "Direkte Ausgabe: ";
$liga = new liga();
//$value = '';
if (is_readable(PATH_TO_LMO.'/'.$dirliga.$m_liga) && $m_liga && $liga->loadFile(PATH_TO_LMO.'/'.$dirliga.$m_liga) ) {
$template = new HTML_Template_IT( PATH_TO_TEMPLATEDIR.'/mini' );
$template->loadTemplatefile($m_template.".tpl.php");
$AnzahlTeams = $liga->teamCount();
$LigaTabelle = $liga->calcTable($liga->options->keyValues['Rounds']);
$LastGameDay = $liga->calcTable($liga->options->keyValues['Actual']-1);
$Runde= $liga->aktSpTag;
//$stripedColor = explode(",",trim($cfgarray['mini']['stripedTable']) );
//$strip= urldecode($_GET['mini_striped']);
//echo "Liga: ".$mini_liga." ";
//echo $m_striped." ";
//echo "Einbindung: ".$striped;
//echo $stripedColor[0];
$viewPosition = "";
$Favorit = $liga->teamForNumber($liga->options->keyValues['favTeam']);
if (is_null($m_platz) || $m_platz <= 0 || $m_platz > $AnzahlTeams ) {
foreach ($LigaTabelle as $value)
if ($Favorit == $value['team']->nr ) $viewPosition = $value['pos'];
} else $viewPosition = $m_platz;
$beginTabellenPlatz = (int)$viewPosition - (int)$m_unter;
$endTabellenPlatz = (int)$viewPosition + (int)$m_ueber;
if ($beginTabellenPlatz<=0) {
$beginTabellenPlatz = 1;
$endTabellenPlatz = $m_unter+1+$m_ueber<$AnzahlTeams? $m_unter+1+$m_ueber:$AnzahlTeams;
}
if ($endTabellenPlatz>$AnzahlTeams ) {
$endTabellenPlatz = $AnzahlTeams;
$beginTabellenPlatz = $AnzahlTeams-$m_unter-1-$m_ueber>0? $AnzahlTeams-$m_unter-1-$m_ueber:1 ;
}
for ($j=0; $j<$AnzahlTeams ; $j++)
if ($LigaTabelle[$j]['pos'] >= $beginTabellenPlatz && $LigaTabelle[$j]['pos'] <= $endTabellenPlatz ) {
$template->setCurrentBlock("Inhalt");
$template->setVariable(array("Platz"=>"".$LigaTabelle[$j]['pos'].""));
$template->setVariable(array("TeamBild"=>HTML_smallTeamIcon($m_liga,$LigaTabelle[$j]['team']," alt=''")));
$template->setVariable(array("TeamLang"=>$LigaTabelle[$j]['team']->name));
$template->setVariable(array("TeamMittel"=>(isset($LigaTabelle[$j]['team']->mittel)?$LigaTabelle[$j]['team']->mittel:'')));
$template->setVariable(array("Team"=>$LigaTabelle[$j]['team']->kurz));
if ($liga->options->keyValues['MinusPoints'] == 1 ) $template->setVariable(array("Punkte"=>$LigaTabelle[$j]['pPkt']));
else $template->setVariable(array("Punkte"=>$LigaTabelle[$j]['pPkt'].':'.$LigaTabelle[$j]['mPkt']));
$template->setVariable(array("PlusTore"=>$LigaTabelle[$j]['pTor']));
$template->setVariable(array("MinusTore"=>$LigaTabelle[$j]['mTor']));
$template->setVariable(array("Tordifferenz"=>$LigaTabelle[$j]['dTor']));
// Dart Liga
// $template->setVariable(array("PlusSaetze"=>$LigaTabelle[$j][12]));
// $template->setVariable(array("MinusSaetze"=>$LigaTabelle[$j][13]));
// if (( $satzDiff = $LigaTabelle[$j][12]-$LigaTabelle[$j][13]) > 0 ) $satzDiff = "+".$satzDiff;
// $template->setVariable(array("SatzDifferenz"=>$satzDiff));
// Dart Liga
$template->setVariable(array("Spiele"=>$LigaTabelle[$j]['spiele']));
$template->setVariable(array("Siege"=>$LigaTabelle[$j]['s']));
$template->setVariable(array("Unentschieden"=>$LigaTabelle[$j]['u']));
$template->setVariable(array("Niederlagen"=>$LigaTabelle[$j]['n']));
foreach ($LastGameDay as $LetzterSpieltag) {
if ($LigaTabelle[$j]['team']->nr == $LetzterSpieltag['team']->nr) {
$Tendenz = $LetzterSpieltag['pos']-$LigaTabelle[$j]['pos'];
$template->setVariable(array("Tendenz"=>($Tendenz>0?'+'.$Tendenz:$Tendenz) ));
break;
}
}
$TendenzImgFile = $Tendenz>0? $cfgarray['mini']['TendenzPfeilUpImg']: ( $Tendenz<0? $cfgarray['mini']['TendenzPfeilDownImg']:$cfgarray['mini']['TendenzPunktImg']);
$template->setVariable(array("TendenzIMG"=> HTML_image(PATH_TO_IMGDIR."/".$TendenzImgFile,"border='0' title='$Tendenz'") ));
// Style Classes anhand der liga Options errechnen -- um Alte Templates zu nutzen wird auch style mit ausgegeben
$style= "";$css_class= "";
if ($LigaTabelle[$j]['pos'] <= $liga->options->keyValues['Champ']) {
// Meister
$css_class = $cfgarray['mini']['tabelle_classMeister'];
$style="background: ".$cfgarray['lmo_tabelle_background1']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color1'])?'':"color: ".$cfgarray['lmo_tabelle_color1'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']) ) {
// Champions League
$css_class = $cfgarray['mini']['tabelle_classCLAufsteiger'];
$style="background: ".$cfgarray['lmo_tabelle_background2']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color2'])?'':"color: ".$cfgarray['lmo_tabelle_color2'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']+$liga->options->keyValues['CK']) ) {
// CL Qualifikation
$css_class = $cfgarray['mini']['tabelle_classCLQuali'];
$style="background: ".$cfgarray['lmo_tabelle_background3']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color3'])?'':"color: ".$cfgarray['lmo_tabelle_color3'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']+$liga->options->keyValues['CK']+$liga->options->keyValues['UC']) ) {
// UEFA Cup
$css_class = $cfgarray['mini']['tabelle_classUEFA'];
$style="background: ".$cfgarray['lmo_tabelle_background4']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color4'])?'':"color: ".$cfgarray['lmo_tabelle_color4'].";";
} elseif ($LigaTabelle[$j]['pos'] > ($AnzahlTeams-$liga->options->keyValues['AB']) ) {
// Abstiegs Relegation
$css_class = $cfgarray['mini']['tabelle_classAbsteiger'];
$style="background: ".$cfgarray['lmo_tabelle_background6']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color6'])?'':"color: ".$cfgarray['lmo_tabelle_color6'].";";
} elseif ($LigaTabelle[$j]['pos'] > ($AnzahlTeams-$liga->options->keyValues['AB']-$liga->options->keyValues['AR']) ) {
// Abstiegsplaetze
$css_class = $cfgarray['mini']['tabelle_classAbstiegsRelegation'];
$style="background: ".$cfgarray['lmo_tabelle_background5']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color5'])?'':"color: ".$cfgarray['lmo_tabelle_color5'].";";
} else $css_class = ""; // "Normale Tabellenplaetze
// Striche nach Meister / CL /CL Quali ....
if ($j && $LastClass != $css_class && $cfgarray['mini']['StyleStripLine'])
$style.= "border-top: ".$cfgarray['mini']['StyleStripLine'].";";
$LastClass= $css_class;
//FavTeam
if ($LigaTabelle[$j]['team']->nr == $Favorit ){
$style.="font-weight:bolder;";
$css_class.= $cfgarray['mini']['classFavorit'];
}
// Style fuer "Gestreifte" Tabelle
if ($m_striped != 0) {
$stripedColor = explode(",",trim($cfgarray['mini']['stripedTable']) );
if ($j%2==0) {
$style.="background-color: ".$stripedColor[0].";\n";
//$template->setVariable(array("Style"=>$style));
}
else {
$style.="background-color: ".$stripedColor[1].";\n";
//$template->setVariable(array("Style"=>$style));
}
}
$template->setVariable(array("Style"=>$style,"Class"=>$css_class));
$template->parseCurrentBlock();
}
$template->setVariable("LigaName", $liga->name);
$template->setVariable("Runde", $Runde);
$template->setVariable("ligaDatum",$text['mini'][14].": ".$liga->ligaDatumAsString("%x"));
$template->setVariable("Link", URL_TO_LMO.'/?action=table&file='.$m_liga);
$template->setVariable("URL_TO_LMO", URL_TO_LMO);
$template->setVariable("URL_TO_TEMPLATEDIR", URL_TO_TEMPLATEDIR."/mini/");
// cache File schreiben
if ( is_writable(dirname($TableCacheFile)) && $cfgarray['mini']['CacheTable'] == 1 ) {
$CacheOutput = filemtime(PATH_TO_LMO.'/'.$dirliga.$m_liga)."|$m_ueber|$m_unter|$m_platz\n".$template->get();
if ($fileHandle = @fopen($TableCacheFile,"wb") ) {
fwrite($fileHandle,$CacheOutput);
fclose($fileHandle);
}
}
$template->show();
} else {
echo getMessage($text['mini'][5]." ".$mini_liga,TRUE);
}
}
//Falls IFRAME - komplettes HTML-Dokument
if (basename($_SERVER['PHP_SELF'])=="lmo-minitab.php") : ?>
endif; ?> |
Burgenländische Ligen - LK 3 + 4
|
1. Klasse Süd |
2. Klasse Mitte |
/** Liga Manager Online 4
*
* http://lmo.sourceforge.net/
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* REMOVING OR CHANGING THE COPYRIGHT NOTICES IS NOT ALLOWED!
*
*/
$mylmo = '/var/www/vhosts/sport4u.at/lmo.sport4u.at';
require($mylmo.'/lmo/init.php');
require(PATH_TO_ADDONDIR."/classlib/ini.php");
//4-stufiges Fallback für diese Variablen
//1.GET-Parameter(IFRAME)->2.Variable vorhanden(include)->3.Configwert->4. Standardwert
$m_template = !empty($_GET['mini_template'])? str_replace('..','',$_GET['mini_template'])
:(isset($mini_template)? str_replace('..','',$mini_template):$cfgarray['mini']['tabelle_standardTemplate'] );
if (!is_readable(PATH_TO_TEMPLATEDIR."/mini/$m_template.tpl.php") ) $m_template = "standard";
$m_liga = !empty($_GET['mini_liga'])? urldecode($_GET['mini_liga'])
:(isset($mini_liga)? $mini_liga
:(isset($mini_standardLiga)? $cfgarray['mini']['standardLiga']: '') );
$m_ueber= !empty($_GET['mini_ueber'])? urldecode($_GET['mini_ueber'])
:(isset($mini_ueber)? $mini_ueber
:(isset($cfgarray['mini']['standardAnzahlueber'])?$cfgarray['mini']['standardAnzahlueber']: 2) );
$m_unter= !empty($_GET['mini_unter'])? urldecode($_GET['mini_unter'])
:(isset($mini_unter) ? $mini_unter
:(isset($cfgarray['mini']['standardAnzahlunter'])? $cfgarray['mini']['standardAnzahlunter']: 2) );
$m_platz= !empty($_GET['mini_platz'])? urldecode($_GET['mini_platz'])
:(isset($mini_platz)? $mini_platz
: (!empty($cfgarray['mini']['standardTabellenPlatz'])? $cfgarray['mini']['standardTabellenPlatz']: NULL) );
//$m_striped= empty($_GET['mini_striped'])? urldecode($_GET['mini_striped']): 1;
//$m_striped= isset($striped)? $striped: $m_striped;
$m_striped = !empty($_GET['striped'])? urldecode($_GET['striped'])
:(isset($striped)? $striped:$cfgarray['mini']['striped'] );
//Falls IFRAME - komplettes HTML-Dokument
if (basename($_SERVER['PHP_SELF'])=="lmo-minitab.php") : ?>
Minitab
endif;
$CacheOutput = '';
$TableCacheFile = PATH_TO_LMO.'/'.$diroutput.basename($m_liga).".cache";
// Wenn Cache File vorhanden und auf Aktuellen Stand, gib dies aus.
if (is_readable($TableCacheFile) && $cfgarray['mini']['CacheTable'] == 1) {
$CacheFile= file ($TableCacheFile);
if (trim(array_shift($CacheFile)) == (filemtime(PATH_TO_LMO.'/'.$dirliga.$m_liga)."|$m_ueber|$m_unter|$m_platz") ) {
// echo "Cache Ausgabe: ";
$CacheOutput= print implode("",$CacheFile);
}
}
if (!$CacheOutput) {
// echo "Direkte Ausgabe: ";
$liga = new liga();
//$value = '';
if (is_readable(PATH_TO_LMO.'/'.$dirliga.$m_liga) && $m_liga && $liga->loadFile(PATH_TO_LMO.'/'.$dirliga.$m_liga) ) {
$template = new HTML_Template_IT( PATH_TO_TEMPLATEDIR.'/mini' );
$template->loadTemplatefile($m_template.".tpl.php");
$AnzahlTeams = $liga->teamCount();
$LigaTabelle = $liga->calcTable($liga->options->keyValues['Rounds']);
$LastGameDay = $liga->calcTable($liga->options->keyValues['Actual']-1);
$Runde= $liga->aktSpTag;
//$stripedColor = explode(",",trim($cfgarray['mini']['stripedTable']) );
//$strip= urldecode($_GET['mini_striped']);
//echo "Liga: ".$mini_liga." ";
//echo $m_striped." ";
//echo "Einbindung: ".$striped;
//echo $stripedColor[0];
$viewPosition = "";
$Favorit = $liga->teamForNumber($liga->options->keyValues['favTeam']);
if (is_null($m_platz) || $m_platz <= 0 || $m_platz > $AnzahlTeams ) {
foreach ($LigaTabelle as $value)
if ($Favorit == $value['team']->nr ) $viewPosition = $value['pos'];
} else $viewPosition = $m_platz;
$beginTabellenPlatz = (int)$viewPosition - (int)$m_unter;
$endTabellenPlatz = (int)$viewPosition + (int)$m_ueber;
if ($beginTabellenPlatz<=0) {
$beginTabellenPlatz = 1;
$endTabellenPlatz = $m_unter+1+$m_ueber<$AnzahlTeams? $m_unter+1+$m_ueber:$AnzahlTeams;
}
if ($endTabellenPlatz>$AnzahlTeams ) {
$endTabellenPlatz = $AnzahlTeams;
$beginTabellenPlatz = $AnzahlTeams-$m_unter-1-$m_ueber>0? $AnzahlTeams-$m_unter-1-$m_ueber:1 ;
}
for ($j=0; $j<$AnzahlTeams ; $j++)
if ($LigaTabelle[$j]['pos'] >= $beginTabellenPlatz && $LigaTabelle[$j]['pos'] <= $endTabellenPlatz ) {
$template->setCurrentBlock("Inhalt");
$template->setVariable(array("Platz"=>"".$LigaTabelle[$j]['pos'].""));
$template->setVariable(array("TeamBild"=>HTML_smallTeamIcon($m_liga,$LigaTabelle[$j]['team']," alt=''")));
$template->setVariable(array("TeamLang"=>$LigaTabelle[$j]['team']->name));
$template->setVariable(array("TeamMittel"=>(isset($LigaTabelle[$j]['team']->mittel)?$LigaTabelle[$j]['team']->mittel:'')));
$template->setVariable(array("Team"=>$LigaTabelle[$j]['team']->kurz));
if ($liga->options->keyValues['MinusPoints'] == 1 ) $template->setVariable(array("Punkte"=>$LigaTabelle[$j]['pPkt']));
else $template->setVariable(array("Punkte"=>$LigaTabelle[$j]['pPkt'].':'.$LigaTabelle[$j]['mPkt']));
$template->setVariable(array("PlusTore"=>$LigaTabelle[$j]['pTor']));
$template->setVariable(array("MinusTore"=>$LigaTabelle[$j]['mTor']));
$template->setVariable(array("Tordifferenz"=>$LigaTabelle[$j]['dTor']));
// Dart Liga
// $template->setVariable(array("PlusSaetze"=>$LigaTabelle[$j][12]));
// $template->setVariable(array("MinusSaetze"=>$LigaTabelle[$j][13]));
// if (( $satzDiff = $LigaTabelle[$j][12]-$LigaTabelle[$j][13]) > 0 ) $satzDiff = "+".$satzDiff;
// $template->setVariable(array("SatzDifferenz"=>$satzDiff));
// Dart Liga
$template->setVariable(array("Spiele"=>$LigaTabelle[$j]['spiele']));
$template->setVariable(array("Siege"=>$LigaTabelle[$j]['s']));
$template->setVariable(array("Unentschieden"=>$LigaTabelle[$j]['u']));
$template->setVariable(array("Niederlagen"=>$LigaTabelle[$j]['n']));
foreach ($LastGameDay as $LetzterSpieltag) {
if ($LigaTabelle[$j]['team']->nr == $LetzterSpieltag['team']->nr) {
$Tendenz = $LetzterSpieltag['pos']-$LigaTabelle[$j]['pos'];
$template->setVariable(array("Tendenz"=>($Tendenz>0?'+'.$Tendenz:$Tendenz) ));
break;
}
}
$TendenzImgFile = $Tendenz>0? $cfgarray['mini']['TendenzPfeilUpImg']: ( $Tendenz<0? $cfgarray['mini']['TendenzPfeilDownImg']:$cfgarray['mini']['TendenzPunktImg']);
$template->setVariable(array("TendenzIMG"=> HTML_image(PATH_TO_IMGDIR."/".$TendenzImgFile,"border='0' title='$Tendenz'") ));
// Style Classes anhand der liga Options errechnen -- um Alte Templates zu nutzen wird auch style mit ausgegeben
$style= "";$css_class= "";
if ($LigaTabelle[$j]['pos'] <= $liga->options->keyValues['Champ']) {
// Meister
$css_class = $cfgarray['mini']['tabelle_classMeister'];
$style="background: ".$cfgarray['lmo_tabelle_background1']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color1'])?'':"color: ".$cfgarray['lmo_tabelle_color1'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']) ) {
// Champions League
$css_class = $cfgarray['mini']['tabelle_classCLAufsteiger'];
$style="background: ".$cfgarray['lmo_tabelle_background2']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color2'])?'':"color: ".$cfgarray['lmo_tabelle_color2'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']+$liga->options->keyValues['CK']) ) {
// CL Qualifikation
$css_class = $cfgarray['mini']['tabelle_classCLQuali'];
$style="background: ".$cfgarray['lmo_tabelle_background3']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color3'])?'':"color: ".$cfgarray['lmo_tabelle_color3'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']+$liga->options->keyValues['CK']+$liga->options->keyValues['UC']) ) {
// UEFA Cup
$css_class = $cfgarray['mini']['tabelle_classUEFA'];
$style="background: ".$cfgarray['lmo_tabelle_background4']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color4'])?'':"color: ".$cfgarray['lmo_tabelle_color4'].";";
} elseif ($LigaTabelle[$j]['pos'] > ($AnzahlTeams-$liga->options->keyValues['AB']) ) {
// Abstiegs Relegation
$css_class = $cfgarray['mini']['tabelle_classAbsteiger'];
$style="background: ".$cfgarray['lmo_tabelle_background6']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color6'])?'':"color: ".$cfgarray['lmo_tabelle_color6'].";";
} elseif ($LigaTabelle[$j]['pos'] > ($AnzahlTeams-$liga->options->keyValues['AB']-$liga->options->keyValues['AR']) ) {
// Abstiegsplaetze
$css_class = $cfgarray['mini']['tabelle_classAbstiegsRelegation'];
$style="background: ".$cfgarray['lmo_tabelle_background5']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color5'])?'':"color: ".$cfgarray['lmo_tabelle_color5'].";";
} else $css_class = ""; // "Normale Tabellenplaetze
// Striche nach Meister / CL /CL Quali ....
if ($j && $LastClass != $css_class && $cfgarray['mini']['StyleStripLine'])
$style.= "border-top: ".$cfgarray['mini']['StyleStripLine'].";";
$LastClass= $css_class;
//FavTeam
if ($LigaTabelle[$j]['team']->nr == $Favorit ){
$style.="font-weight:bolder;";
$css_class.= $cfgarray['mini']['classFavorit'];
}
// Style fuer "Gestreifte" Tabelle
if ($m_striped != 0) {
$stripedColor = explode(",",trim($cfgarray['mini']['stripedTable']) );
if ($j%2==0) {
$style.="background-color: ".$stripedColor[0].";\n";
//$template->setVariable(array("Style"=>$style));
}
else {
$style.="background-color: ".$stripedColor[1].";\n";
//$template->setVariable(array("Style"=>$style));
}
}
$template->setVariable(array("Style"=>$style,"Class"=>$css_class));
$template->parseCurrentBlock();
}
$template->setVariable("LigaName", $liga->name);
$template->setVariable("Runde", $Runde);
$template->setVariable("ligaDatum",$text['mini'][14].": ".$liga->ligaDatumAsString("%x"));
$template->setVariable("Link", URL_TO_LMO.'/?action=table&file='.$m_liga);
$template->setVariable("URL_TO_LMO", URL_TO_LMO);
$template->setVariable("URL_TO_TEMPLATEDIR", URL_TO_TEMPLATEDIR."/mini/");
// cache File schreiben
if ( is_writable(dirname($TableCacheFile)) && $cfgarray['mini']['CacheTable'] == 1 ) {
$CacheOutput = filemtime(PATH_TO_LMO.'/'.$dirliga.$m_liga)."|$m_ueber|$m_unter|$m_platz\n".$template->get();
if ($fileHandle = @fopen($TableCacheFile,"wb") ) {
fwrite($fileHandle,$CacheOutput);
fclose($fileHandle);
}
}
$template->show();
} else {
echo getMessage($text['mini'][5]." ".$mini_liga,TRUE);
}
}
//Falls IFRAME - komplettes HTML-Dokument
if (basename($_SERVER['PHP_SELF'])=="lmo-minitab.php") : ?>
endif; ?> |
|
Burgenländische Ligen - LK 4
|
2. Klasse Nord |
2. Klasse Süd A |
/** Liga Manager Online 4
*
* http://lmo.sourceforge.net/
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* REMOVING OR CHANGING THE COPYRIGHT NOTICES IS NOT ALLOWED!
*
*/
$mylmo = '/var/www/vhosts/sport4u.at/lmo.sport4u.at';
require($mylmo.'/lmo/init.php');
require(PATH_TO_ADDONDIR."/classlib/ini.php");
//4-stufiges Fallback für diese Variablen
//1.GET-Parameter(IFRAME)->2.Variable vorhanden(include)->3.Configwert->4. Standardwert
$m_template = !empty($_GET['mini_template'])? str_replace('..','',$_GET['mini_template'])
:(isset($mini_template)? str_replace('..','',$mini_template):$cfgarray['mini']['tabelle_standardTemplate'] );
if (!is_readable(PATH_TO_TEMPLATEDIR."/mini/$m_template.tpl.php") ) $m_template = "standard";
$m_liga = !empty($_GET['mini_liga'])? urldecode($_GET['mini_liga'])
:(isset($mini_liga)? $mini_liga
:(isset($mini_standardLiga)? $cfgarray['mini']['standardLiga']: '') );
$m_ueber= !empty($_GET['mini_ueber'])? urldecode($_GET['mini_ueber'])
:(isset($mini_ueber)? $mini_ueber
:(isset($cfgarray['mini']['standardAnzahlueber'])?$cfgarray['mini']['standardAnzahlueber']: 2) );
$m_unter= !empty($_GET['mini_unter'])? urldecode($_GET['mini_unter'])
:(isset($mini_unter) ? $mini_unter
:(isset($cfgarray['mini']['standardAnzahlunter'])? $cfgarray['mini']['standardAnzahlunter']: 2) );
$m_platz= !empty($_GET['mini_platz'])? urldecode($_GET['mini_platz'])
:(isset($mini_platz)? $mini_platz
: (!empty($cfgarray['mini']['standardTabellenPlatz'])? $cfgarray['mini']['standardTabellenPlatz']: NULL) );
//$m_striped= empty($_GET['mini_striped'])? urldecode($_GET['mini_striped']): 1;
//$m_striped= isset($striped)? $striped: $m_striped;
$m_striped = !empty($_GET['striped'])? urldecode($_GET['striped'])
:(isset($striped)? $striped:$cfgarray['mini']['striped'] );
//Falls IFRAME - komplettes HTML-Dokument
if (basename($_SERVER['PHP_SELF'])=="lmo-minitab.php") : ?>
Minitab
endif;
$CacheOutput = '';
$TableCacheFile = PATH_TO_LMO.'/'.$diroutput.basename($m_liga).".cache";
// Wenn Cache File vorhanden und auf Aktuellen Stand, gib dies aus.
if (is_readable($TableCacheFile) && $cfgarray['mini']['CacheTable'] == 1) {
$CacheFile= file ($TableCacheFile);
if (trim(array_shift($CacheFile)) == (filemtime(PATH_TO_LMO.'/'.$dirliga.$m_liga)."|$m_ueber|$m_unter|$m_platz") ) {
// echo "Cache Ausgabe: ";
$CacheOutput= print implode("",$CacheFile);
}
}
if (!$CacheOutput) {
// echo "Direkte Ausgabe: ";
$liga = new liga();
//$value = '';
if (is_readable(PATH_TO_LMO.'/'.$dirliga.$m_liga) && $m_liga && $liga->loadFile(PATH_TO_LMO.'/'.$dirliga.$m_liga) ) {
$template = new HTML_Template_IT( PATH_TO_TEMPLATEDIR.'/mini' );
$template->loadTemplatefile($m_template.".tpl.php");
$AnzahlTeams = $liga->teamCount();
$LigaTabelle = $liga->calcTable($liga->options->keyValues['Rounds']);
$LastGameDay = $liga->calcTable($liga->options->keyValues['Actual']-1);
$Runde= $liga->aktSpTag;
//$stripedColor = explode(",",trim($cfgarray['mini']['stripedTable']) );
//$strip= urldecode($_GET['mini_striped']);
//echo "Liga: ".$mini_liga." ";
//echo $m_striped." ";
//echo "Einbindung: ".$striped;
//echo $stripedColor[0];
$viewPosition = "";
$Favorit = $liga->teamForNumber($liga->options->keyValues['favTeam']);
if (is_null($m_platz) || $m_platz <= 0 || $m_platz > $AnzahlTeams ) {
foreach ($LigaTabelle as $value)
if ($Favorit == $value['team']->nr ) $viewPosition = $value['pos'];
} else $viewPosition = $m_platz;
$beginTabellenPlatz = (int)$viewPosition - (int)$m_unter;
$endTabellenPlatz = (int)$viewPosition + (int)$m_ueber;
if ($beginTabellenPlatz<=0) {
$beginTabellenPlatz = 1;
$endTabellenPlatz = $m_unter+1+$m_ueber<$AnzahlTeams? $m_unter+1+$m_ueber:$AnzahlTeams;
}
if ($endTabellenPlatz>$AnzahlTeams ) {
$endTabellenPlatz = $AnzahlTeams;
$beginTabellenPlatz = $AnzahlTeams-$m_unter-1-$m_ueber>0? $AnzahlTeams-$m_unter-1-$m_ueber:1 ;
}
for ($j=0; $j<$AnzahlTeams ; $j++)
if ($LigaTabelle[$j]['pos'] >= $beginTabellenPlatz && $LigaTabelle[$j]['pos'] <= $endTabellenPlatz ) {
$template->setCurrentBlock("Inhalt");
$template->setVariable(array("Platz"=>"".$LigaTabelle[$j]['pos'].""));
$template->setVariable(array("TeamBild"=>HTML_smallTeamIcon($m_liga,$LigaTabelle[$j]['team']," alt=''")));
$template->setVariable(array("TeamLang"=>$LigaTabelle[$j]['team']->name));
$template->setVariable(array("TeamMittel"=>(isset($LigaTabelle[$j]['team']->mittel)?$LigaTabelle[$j]['team']->mittel:'')));
$template->setVariable(array("Team"=>$LigaTabelle[$j]['team']->kurz));
if ($liga->options->keyValues['MinusPoints'] == 1 ) $template->setVariable(array("Punkte"=>$LigaTabelle[$j]['pPkt']));
else $template->setVariable(array("Punkte"=>$LigaTabelle[$j]['pPkt'].':'.$LigaTabelle[$j]['mPkt']));
$template->setVariable(array("PlusTore"=>$LigaTabelle[$j]['pTor']));
$template->setVariable(array("MinusTore"=>$LigaTabelle[$j]['mTor']));
$template->setVariable(array("Tordifferenz"=>$LigaTabelle[$j]['dTor']));
// Dart Liga
// $template->setVariable(array("PlusSaetze"=>$LigaTabelle[$j][12]));
// $template->setVariable(array("MinusSaetze"=>$LigaTabelle[$j][13]));
// if (( $satzDiff = $LigaTabelle[$j][12]-$LigaTabelle[$j][13]) > 0 ) $satzDiff = "+".$satzDiff;
// $template->setVariable(array("SatzDifferenz"=>$satzDiff));
// Dart Liga
$template->setVariable(array("Spiele"=>$LigaTabelle[$j]['spiele']));
$template->setVariable(array("Siege"=>$LigaTabelle[$j]['s']));
$template->setVariable(array("Unentschieden"=>$LigaTabelle[$j]['u']));
$template->setVariable(array("Niederlagen"=>$LigaTabelle[$j]['n']));
foreach ($LastGameDay as $LetzterSpieltag) {
if ($LigaTabelle[$j]['team']->nr == $LetzterSpieltag['team']->nr) {
$Tendenz = $LetzterSpieltag['pos']-$LigaTabelle[$j]['pos'];
$template->setVariable(array("Tendenz"=>($Tendenz>0?'+'.$Tendenz:$Tendenz) ));
break;
}
}
$TendenzImgFile = $Tendenz>0? $cfgarray['mini']['TendenzPfeilUpImg']: ( $Tendenz<0? $cfgarray['mini']['TendenzPfeilDownImg']:$cfgarray['mini']['TendenzPunktImg']);
$template->setVariable(array("TendenzIMG"=> HTML_image(PATH_TO_IMGDIR."/".$TendenzImgFile,"border='0' title='$Tendenz'") ));
// Style Classes anhand der liga Options errechnen -- um Alte Templates zu nutzen wird auch style mit ausgegeben
$style= "";$css_class= "";
if ($LigaTabelle[$j]['pos'] <= $liga->options->keyValues['Champ']) {
// Meister
$css_class = $cfgarray['mini']['tabelle_classMeister'];
$style="background: ".$cfgarray['lmo_tabelle_background1']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color1'])?'':"color: ".$cfgarray['lmo_tabelle_color1'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']) ) {
// Champions League
$css_class = $cfgarray['mini']['tabelle_classCLAufsteiger'];
$style="background: ".$cfgarray['lmo_tabelle_background2']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color2'])?'':"color: ".$cfgarray['lmo_tabelle_color2'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']+$liga->options->keyValues['CK']) ) {
// CL Qualifikation
$css_class = $cfgarray['mini']['tabelle_classCLQuali'];
$style="background: ".$cfgarray['lmo_tabelle_background3']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color3'])?'':"color: ".$cfgarray['lmo_tabelle_color3'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']+$liga->options->keyValues['CK']+$liga->options->keyValues['UC']) ) {
// UEFA Cup
$css_class = $cfgarray['mini']['tabelle_classUEFA'];
$style="background: ".$cfgarray['lmo_tabelle_background4']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color4'])?'':"color: ".$cfgarray['lmo_tabelle_color4'].";";
} elseif ($LigaTabelle[$j]['pos'] > ($AnzahlTeams-$liga->options->keyValues['AB']) ) {
// Abstiegs Relegation
$css_class = $cfgarray['mini']['tabelle_classAbsteiger'];
$style="background: ".$cfgarray['lmo_tabelle_background6']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color6'])?'':"color: ".$cfgarray['lmo_tabelle_color6'].";";
} elseif ($LigaTabelle[$j]['pos'] > ($AnzahlTeams-$liga->options->keyValues['AB']-$liga->options->keyValues['AR']) ) {
// Abstiegsplaetze
$css_class = $cfgarray['mini']['tabelle_classAbstiegsRelegation'];
$style="background: ".$cfgarray['lmo_tabelle_background5']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color5'])?'':"color: ".$cfgarray['lmo_tabelle_color5'].";";
} else $css_class = ""; // "Normale Tabellenplaetze
// Striche nach Meister / CL /CL Quali ....
if ($j && $LastClass != $css_class && $cfgarray['mini']['StyleStripLine'])
$style.= "border-top: ".$cfgarray['mini']['StyleStripLine'].";";
$LastClass= $css_class;
//FavTeam
if ($LigaTabelle[$j]['team']->nr == $Favorit ){
$style.="font-weight:bolder;";
$css_class.= $cfgarray['mini']['classFavorit'];
}
// Style fuer "Gestreifte" Tabelle
if ($m_striped != 0) {
$stripedColor = explode(",",trim($cfgarray['mini']['stripedTable']) );
if ($j%2==0) {
$style.="background-color: ".$stripedColor[0].";\n";
//$template->setVariable(array("Style"=>$style));
}
else {
$style.="background-color: ".$stripedColor[1].";\n";
//$template->setVariable(array("Style"=>$style));
}
}
$template->setVariable(array("Style"=>$style,"Class"=>$css_class));
$template->parseCurrentBlock();
}
$template->setVariable("LigaName", $liga->name);
$template->setVariable("Runde", $Runde);
$template->setVariable("ligaDatum",$text['mini'][14].": ".$liga->ligaDatumAsString("%x"));
$template->setVariable("Link", URL_TO_LMO.'/?action=table&file='.$m_liga);
$template->setVariable("URL_TO_LMO", URL_TO_LMO);
$template->setVariable("URL_TO_TEMPLATEDIR", URL_TO_TEMPLATEDIR."/mini/");
// cache File schreiben
if ( is_writable(dirname($TableCacheFile)) && $cfgarray['mini']['CacheTable'] == 1 ) {
$CacheOutput = filemtime(PATH_TO_LMO.'/'.$dirliga.$m_liga)."|$m_ueber|$m_unter|$m_platz\n".$template->get();
if ($fileHandle = @fopen($TableCacheFile,"wb") ) {
fwrite($fileHandle,$CacheOutput);
fclose($fileHandle);
}
}
$template->show();
} else {
echo getMessage($text['mini'][5]." ".$mini_liga,TRUE);
}
}
//Falls IFRAME - komplettes HTML-Dokument
if (basename($_SERVER['PHP_SELF'])=="lmo-minitab.php") : ?>
endif; ?> |
/** Liga Manager Online 4
*
* http://lmo.sourceforge.net/
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* REMOVING OR CHANGING THE COPYRIGHT NOTICES IS NOT ALLOWED!
*
*/
$mylmo = '/var/www/vhosts/sport4u.at/lmo.sport4u.at';
require($mylmo.'/lmo/init.php');
require(PATH_TO_ADDONDIR."/classlib/ini.php");
//4-stufiges Fallback für diese Variablen
//1.GET-Parameter(IFRAME)->2.Variable vorhanden(include)->3.Configwert->4. Standardwert
$m_template = !empty($_GET['mini_template'])? str_replace('..','',$_GET['mini_template'])
:(isset($mini_template)? str_replace('..','',$mini_template):$cfgarray['mini']['tabelle_standardTemplate'] );
if (!is_readable(PATH_TO_TEMPLATEDIR."/mini/$m_template.tpl.php") ) $m_template = "standard";
$m_liga = !empty($_GET['mini_liga'])? urldecode($_GET['mini_liga'])
:(isset($mini_liga)? $mini_liga
:(isset($mini_standardLiga)? $cfgarray['mini']['standardLiga']: '') );
$m_ueber= !empty($_GET['mini_ueber'])? urldecode($_GET['mini_ueber'])
:(isset($mini_ueber)? $mini_ueber
:(isset($cfgarray['mini']['standardAnzahlueber'])?$cfgarray['mini']['standardAnzahlueber']: 2) );
$m_unter= !empty($_GET['mini_unter'])? urldecode($_GET['mini_unter'])
:(isset($mini_unter) ? $mini_unter
:(isset($cfgarray['mini']['standardAnzahlunter'])? $cfgarray['mini']['standardAnzahlunter']: 2) );
$m_platz= !empty($_GET['mini_platz'])? urldecode($_GET['mini_platz'])
:(isset($mini_platz)? $mini_platz
: (!empty($cfgarray['mini']['standardTabellenPlatz'])? $cfgarray['mini']['standardTabellenPlatz']: NULL) );
//$m_striped= empty($_GET['mini_striped'])? urldecode($_GET['mini_striped']): 1;
//$m_striped= isset($striped)? $striped: $m_striped;
$m_striped = !empty($_GET['striped'])? urldecode($_GET['striped'])
:(isset($striped)? $striped:$cfgarray['mini']['striped'] );
//Falls IFRAME - komplettes HTML-Dokument
if (basename($_SERVER['PHP_SELF'])=="lmo-minitab.php") : ?>
Minitab
endif;
$CacheOutput = '';
$TableCacheFile = PATH_TO_LMO.'/'.$diroutput.basename($m_liga).".cache";
// Wenn Cache File vorhanden und auf Aktuellen Stand, gib dies aus.
if (is_readable($TableCacheFile) && $cfgarray['mini']['CacheTable'] == 1) {
$CacheFile= file ($TableCacheFile);
if (trim(array_shift($CacheFile)) == (filemtime(PATH_TO_LMO.'/'.$dirliga.$m_liga)."|$m_ueber|$m_unter|$m_platz") ) {
// echo "Cache Ausgabe: ";
$CacheOutput= print implode("",$CacheFile);
}
}
if (!$CacheOutput) {
// echo "Direkte Ausgabe: ";
$liga = new liga();
//$value = '';
if (is_readable(PATH_TO_LMO.'/'.$dirliga.$m_liga) && $m_liga && $liga->loadFile(PATH_TO_LMO.'/'.$dirliga.$m_liga) ) {
$template = new HTML_Template_IT( PATH_TO_TEMPLATEDIR.'/mini' );
$template->loadTemplatefile($m_template.".tpl.php");
$AnzahlTeams = $liga->teamCount();
$LigaTabelle = $liga->calcTable($liga->options->keyValues['Rounds']);
$LastGameDay = $liga->calcTable($liga->options->keyValues['Actual']-1);
$Runde= $liga->aktSpTag;
//$stripedColor = explode(",",trim($cfgarray['mini']['stripedTable']) );
//$strip= urldecode($_GET['mini_striped']);
//echo "Liga: ".$mini_liga." ";
//echo $m_striped." ";
//echo "Einbindung: ".$striped;
//echo $stripedColor[0];
$viewPosition = "";
$Favorit = $liga->teamForNumber($liga->options->keyValues['favTeam']);
if (is_null($m_platz) || $m_platz <= 0 || $m_platz > $AnzahlTeams ) {
foreach ($LigaTabelle as $value)
if ($Favorit == $value['team']->nr ) $viewPosition = $value['pos'];
} else $viewPosition = $m_platz;
$beginTabellenPlatz = (int)$viewPosition - (int)$m_unter;
$endTabellenPlatz = (int)$viewPosition + (int)$m_ueber;
if ($beginTabellenPlatz<=0) {
$beginTabellenPlatz = 1;
$endTabellenPlatz = $m_unter+1+$m_ueber<$AnzahlTeams? $m_unter+1+$m_ueber:$AnzahlTeams;
}
if ($endTabellenPlatz>$AnzahlTeams ) {
$endTabellenPlatz = $AnzahlTeams;
$beginTabellenPlatz = $AnzahlTeams-$m_unter-1-$m_ueber>0? $AnzahlTeams-$m_unter-1-$m_ueber:1 ;
}
for ($j=0; $j<$AnzahlTeams ; $j++)
if ($LigaTabelle[$j]['pos'] >= $beginTabellenPlatz && $LigaTabelle[$j]['pos'] <= $endTabellenPlatz ) {
$template->setCurrentBlock("Inhalt");
$template->setVariable(array("Platz"=>"".$LigaTabelle[$j]['pos'].""));
$template->setVariable(array("TeamBild"=>HTML_smallTeamIcon($m_liga,$LigaTabelle[$j]['team']," alt=''")));
$template->setVariable(array("TeamLang"=>$LigaTabelle[$j]['team']->name));
$template->setVariable(array("TeamMittel"=>(isset($LigaTabelle[$j]['team']->mittel)?$LigaTabelle[$j]['team']->mittel:'')));
$template->setVariable(array("Team"=>$LigaTabelle[$j]['team']->kurz));
if ($liga->options->keyValues['MinusPoints'] == 1 ) $template->setVariable(array("Punkte"=>$LigaTabelle[$j]['pPkt']));
else $template->setVariable(array("Punkte"=>$LigaTabelle[$j]['pPkt'].':'.$LigaTabelle[$j]['mPkt']));
$template->setVariable(array("PlusTore"=>$LigaTabelle[$j]['pTor']));
$template->setVariable(array("MinusTore"=>$LigaTabelle[$j]['mTor']));
$template->setVariable(array("Tordifferenz"=>$LigaTabelle[$j]['dTor']));
// Dart Liga
// $template->setVariable(array("PlusSaetze"=>$LigaTabelle[$j][12]));
// $template->setVariable(array("MinusSaetze"=>$LigaTabelle[$j][13]));
// if (( $satzDiff = $LigaTabelle[$j][12]-$LigaTabelle[$j][13]) > 0 ) $satzDiff = "+".$satzDiff;
// $template->setVariable(array("SatzDifferenz"=>$satzDiff));
// Dart Liga
$template->setVariable(array("Spiele"=>$LigaTabelle[$j]['spiele']));
$template->setVariable(array("Siege"=>$LigaTabelle[$j]['s']));
$template->setVariable(array("Unentschieden"=>$LigaTabelle[$j]['u']));
$template->setVariable(array("Niederlagen"=>$LigaTabelle[$j]['n']));
foreach ($LastGameDay as $LetzterSpieltag) {
if ($LigaTabelle[$j]['team']->nr == $LetzterSpieltag['team']->nr) {
$Tendenz = $LetzterSpieltag['pos']-$LigaTabelle[$j]['pos'];
$template->setVariable(array("Tendenz"=>($Tendenz>0?'+'.$Tendenz:$Tendenz) ));
break;
}
}
$TendenzImgFile = $Tendenz>0? $cfgarray['mini']['TendenzPfeilUpImg']: ( $Tendenz<0? $cfgarray['mini']['TendenzPfeilDownImg']:$cfgarray['mini']['TendenzPunktImg']);
$template->setVariable(array("TendenzIMG"=> HTML_image(PATH_TO_IMGDIR."/".$TendenzImgFile,"border='0' title='$Tendenz'") ));
// Style Classes anhand der liga Options errechnen -- um Alte Templates zu nutzen wird auch style mit ausgegeben
$style= "";$css_class= "";
if ($LigaTabelle[$j]['pos'] <= $liga->options->keyValues['Champ']) {
// Meister
$css_class = $cfgarray['mini']['tabelle_classMeister'];
$style="background: ".$cfgarray['lmo_tabelle_background1']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color1'])?'':"color: ".$cfgarray['lmo_tabelle_color1'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']) ) {
// Champions League
$css_class = $cfgarray['mini']['tabelle_classCLAufsteiger'];
$style="background: ".$cfgarray['lmo_tabelle_background2']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color2'])?'':"color: ".$cfgarray['lmo_tabelle_color2'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']+$liga->options->keyValues['CK']) ) {
// CL Qualifikation
$css_class = $cfgarray['mini']['tabelle_classCLQuali'];
$style="background: ".$cfgarray['lmo_tabelle_background3']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color3'])?'':"color: ".$cfgarray['lmo_tabelle_color3'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']+$liga->options->keyValues['CK']+$liga->options->keyValues['UC']) ) {
// UEFA Cup
$css_class = $cfgarray['mini']['tabelle_classUEFA'];
$style="background: ".$cfgarray['lmo_tabelle_background4']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color4'])?'':"color: ".$cfgarray['lmo_tabelle_color4'].";";
} elseif ($LigaTabelle[$j]['pos'] > ($AnzahlTeams-$liga->options->keyValues['AB']) ) {
// Abstiegs Relegation
$css_class = $cfgarray['mini']['tabelle_classAbsteiger'];
$style="background: ".$cfgarray['lmo_tabelle_background6']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color6'])?'':"color: ".$cfgarray['lmo_tabelle_color6'].";";
} elseif ($LigaTabelle[$j]['pos'] > ($AnzahlTeams-$liga->options->keyValues['AB']-$liga->options->keyValues['AR']) ) {
// Abstiegsplaetze
$css_class = $cfgarray['mini']['tabelle_classAbstiegsRelegation'];
$style="background: ".$cfgarray['lmo_tabelle_background5']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color5'])?'':"color: ".$cfgarray['lmo_tabelle_color5'].";";
} else $css_class = ""; // "Normale Tabellenplaetze
// Striche nach Meister / CL /CL Quali ....
if ($j && $LastClass != $css_class && $cfgarray['mini']['StyleStripLine'])
$style.= "border-top: ".$cfgarray['mini']['StyleStripLine'].";";
$LastClass= $css_class;
//FavTeam
if ($LigaTabelle[$j]['team']->nr == $Favorit ){
$style.="font-weight:bolder;";
$css_class.= $cfgarray['mini']['classFavorit'];
}
// Style fuer "Gestreifte" Tabelle
if ($m_striped != 0) {
$stripedColor = explode(",",trim($cfgarray['mini']['stripedTable']) );
if ($j%2==0) {
$style.="background-color: ".$stripedColor[0].";\n";
//$template->setVariable(array("Style"=>$style));
}
else {
$style.="background-color: ".$stripedColor[1].";\n";
//$template->setVariable(array("Style"=>$style));
}
}
$template->setVariable(array("Style"=>$style,"Class"=>$css_class));
$template->parseCurrentBlock();
}
$template->setVariable("LigaName", $liga->name);
$template->setVariable("Runde", $Runde);
$template->setVariable("ligaDatum",$text['mini'][14].": ".$liga->ligaDatumAsString("%x"));
$template->setVariable("Link", URL_TO_LMO.'/?action=table&file='.$m_liga);
$template->setVariable("URL_TO_LMO", URL_TO_LMO);
$template->setVariable("URL_TO_TEMPLATEDIR", URL_TO_TEMPLATEDIR."/mini/");
// cache File schreiben
if ( is_writable(dirname($TableCacheFile)) && $cfgarray['mini']['CacheTable'] == 1 ) {
$CacheOutput = filemtime(PATH_TO_LMO.'/'.$dirliga.$m_liga)."|$m_ueber|$m_unter|$m_platz\n".$template->get();
if ($fileHandle = @fopen($TableCacheFile,"wb") ) {
fwrite($fileHandle,$CacheOutput);
fclose($fileHandle);
}
}
$template->show();
} else {
echo getMessage($text['mini'][5]." ".$mini_liga,TRUE);
}
}
//Falls IFRAME - komplettes HTML-Dokument
if (basename($_SERVER['PHP_SELF'])=="lmo-minitab.php") : ?>
endif; ?> |
Burgenländische Ligen - LK 4
|
2. Klasse Süd B |
2. Klasse Süd C |
/** Liga Manager Online 4
*
* http://lmo.sourceforge.net/
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* REMOVING OR CHANGING THE COPYRIGHT NOTICES IS NOT ALLOWED!
*
*/
$mylmo = '/var/www/vhosts/sport4u.at/lmo.sport4u.at';
require($mylmo.'/lmo/init.php');
require(PATH_TO_ADDONDIR."/classlib/ini.php");
//4-stufiges Fallback für diese Variablen
//1.GET-Parameter(IFRAME)->2.Variable vorhanden(include)->3.Configwert->4. Standardwert
$m_template = !empty($_GET['mini_template'])? str_replace('..','',$_GET['mini_template'])
:(isset($mini_template)? str_replace('..','',$mini_template):$cfgarray['mini']['tabelle_standardTemplate'] );
if (!is_readable(PATH_TO_TEMPLATEDIR."/mini/$m_template.tpl.php") ) $m_template = "standard";
$m_liga = !empty($_GET['mini_liga'])? urldecode($_GET['mini_liga'])
:(isset($mini_liga)? $mini_liga
:(isset($mini_standardLiga)? $cfgarray['mini']['standardLiga']: '') );
$m_ueber= !empty($_GET['mini_ueber'])? urldecode($_GET['mini_ueber'])
:(isset($mini_ueber)? $mini_ueber
:(isset($cfgarray['mini']['standardAnzahlueber'])?$cfgarray['mini']['standardAnzahlueber']: 2) );
$m_unter= !empty($_GET['mini_unter'])? urldecode($_GET['mini_unter'])
:(isset($mini_unter) ? $mini_unter
:(isset($cfgarray['mini']['standardAnzahlunter'])? $cfgarray['mini']['standardAnzahlunter']: 2) );
$m_platz= !empty($_GET['mini_platz'])? urldecode($_GET['mini_platz'])
:(isset($mini_platz)? $mini_platz
: (!empty($cfgarray['mini']['standardTabellenPlatz'])? $cfgarray['mini']['standardTabellenPlatz']: NULL) );
//$m_striped= empty($_GET['mini_striped'])? urldecode($_GET['mini_striped']): 1;
//$m_striped= isset($striped)? $striped: $m_striped;
$m_striped = !empty($_GET['striped'])? urldecode($_GET['striped'])
:(isset($striped)? $striped:$cfgarray['mini']['striped'] );
//Falls IFRAME - komplettes HTML-Dokument
if (basename($_SERVER['PHP_SELF'])=="lmo-minitab.php") : ?>
Minitab
endif;
$CacheOutput = '';
$TableCacheFile = PATH_TO_LMO.'/'.$diroutput.basename($m_liga).".cache";
// Wenn Cache File vorhanden und auf Aktuellen Stand, gib dies aus.
if (is_readable($TableCacheFile) && $cfgarray['mini']['CacheTable'] == 1) {
$CacheFile= file ($TableCacheFile);
if (trim(array_shift($CacheFile)) == (filemtime(PATH_TO_LMO.'/'.$dirliga.$m_liga)."|$m_ueber|$m_unter|$m_platz") ) {
// echo "Cache Ausgabe: ";
$CacheOutput= print implode("",$CacheFile);
}
}
if (!$CacheOutput) {
// echo "Direkte Ausgabe: ";
$liga = new liga();
//$value = '';
if (is_readable(PATH_TO_LMO.'/'.$dirliga.$m_liga) && $m_liga && $liga->loadFile(PATH_TO_LMO.'/'.$dirliga.$m_liga) ) {
$template = new HTML_Template_IT( PATH_TO_TEMPLATEDIR.'/mini' );
$template->loadTemplatefile($m_template.".tpl.php");
$AnzahlTeams = $liga->teamCount();
$LigaTabelle = $liga->calcTable($liga->options->keyValues['Rounds']);
$LastGameDay = $liga->calcTable($liga->options->keyValues['Actual']-1);
$Runde= $liga->aktSpTag;
//$stripedColor = explode(",",trim($cfgarray['mini']['stripedTable']) );
//$strip= urldecode($_GET['mini_striped']);
//echo "Liga: ".$mini_liga." ";
//echo $m_striped." ";
//echo "Einbindung: ".$striped;
//echo $stripedColor[0];
$viewPosition = "";
$Favorit = $liga->teamForNumber($liga->options->keyValues['favTeam']);
if (is_null($m_platz) || $m_platz <= 0 || $m_platz > $AnzahlTeams ) {
foreach ($LigaTabelle as $value)
if ($Favorit == $value['team']->nr ) $viewPosition = $value['pos'];
} else $viewPosition = $m_platz;
$beginTabellenPlatz = (int)$viewPosition - (int)$m_unter;
$endTabellenPlatz = (int)$viewPosition + (int)$m_ueber;
if ($beginTabellenPlatz<=0) {
$beginTabellenPlatz = 1;
$endTabellenPlatz = $m_unter+1+$m_ueber<$AnzahlTeams? $m_unter+1+$m_ueber:$AnzahlTeams;
}
if ($endTabellenPlatz>$AnzahlTeams ) {
$endTabellenPlatz = $AnzahlTeams;
$beginTabellenPlatz = $AnzahlTeams-$m_unter-1-$m_ueber>0? $AnzahlTeams-$m_unter-1-$m_ueber:1 ;
}
for ($j=0; $j<$AnzahlTeams ; $j++)
if ($LigaTabelle[$j]['pos'] >= $beginTabellenPlatz && $LigaTabelle[$j]['pos'] <= $endTabellenPlatz ) {
$template->setCurrentBlock("Inhalt");
$template->setVariable(array("Platz"=>"".$LigaTabelle[$j]['pos'].""));
$template->setVariable(array("TeamBild"=>HTML_smallTeamIcon($m_liga,$LigaTabelle[$j]['team']," alt=''")));
$template->setVariable(array("TeamLang"=>$LigaTabelle[$j]['team']->name));
$template->setVariable(array("TeamMittel"=>(isset($LigaTabelle[$j]['team']->mittel)?$LigaTabelle[$j]['team']->mittel:'')));
$template->setVariable(array("Team"=>$LigaTabelle[$j]['team']->kurz));
if ($liga->options->keyValues['MinusPoints'] == 1 ) $template->setVariable(array("Punkte"=>$LigaTabelle[$j]['pPkt']));
else $template->setVariable(array("Punkte"=>$LigaTabelle[$j]['pPkt'].':'.$LigaTabelle[$j]['mPkt']));
$template->setVariable(array("PlusTore"=>$LigaTabelle[$j]['pTor']));
$template->setVariable(array("MinusTore"=>$LigaTabelle[$j]['mTor']));
$template->setVariable(array("Tordifferenz"=>$LigaTabelle[$j]['dTor']));
// Dart Liga
// $template->setVariable(array("PlusSaetze"=>$LigaTabelle[$j][12]));
// $template->setVariable(array("MinusSaetze"=>$LigaTabelle[$j][13]));
// if (( $satzDiff = $LigaTabelle[$j][12]-$LigaTabelle[$j][13]) > 0 ) $satzDiff = "+".$satzDiff;
// $template->setVariable(array("SatzDifferenz"=>$satzDiff));
// Dart Liga
$template->setVariable(array("Spiele"=>$LigaTabelle[$j]['spiele']));
$template->setVariable(array("Siege"=>$LigaTabelle[$j]['s']));
$template->setVariable(array("Unentschieden"=>$LigaTabelle[$j]['u']));
$template->setVariable(array("Niederlagen"=>$LigaTabelle[$j]['n']));
foreach ($LastGameDay as $LetzterSpieltag) {
if ($LigaTabelle[$j]['team']->nr == $LetzterSpieltag['team']->nr) {
$Tendenz = $LetzterSpieltag['pos']-$LigaTabelle[$j]['pos'];
$template->setVariable(array("Tendenz"=>($Tendenz>0?'+'.$Tendenz:$Tendenz) ));
break;
}
}
$TendenzImgFile = $Tendenz>0? $cfgarray['mini']['TendenzPfeilUpImg']: ( $Tendenz<0? $cfgarray['mini']['TendenzPfeilDownImg']:$cfgarray['mini']['TendenzPunktImg']);
$template->setVariable(array("TendenzIMG"=> HTML_image(PATH_TO_IMGDIR."/".$TendenzImgFile,"border='0' title='$Tendenz'") ));
// Style Classes anhand der liga Options errechnen -- um Alte Templates zu nutzen wird auch style mit ausgegeben
$style= "";$css_class= "";
if ($LigaTabelle[$j]['pos'] <= $liga->options->keyValues['Champ']) {
// Meister
$css_class = $cfgarray['mini']['tabelle_classMeister'];
$style="background: ".$cfgarray['lmo_tabelle_background1']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color1'])?'':"color: ".$cfgarray['lmo_tabelle_color1'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']) ) {
// Champions League
$css_class = $cfgarray['mini']['tabelle_classCLAufsteiger'];
$style="background: ".$cfgarray['lmo_tabelle_background2']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color2'])?'':"color: ".$cfgarray['lmo_tabelle_color2'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']+$liga->options->keyValues['CK']) ) {
// CL Qualifikation
$css_class = $cfgarray['mini']['tabelle_classCLQuali'];
$style="background: ".$cfgarray['lmo_tabelle_background3']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color3'])?'':"color: ".$cfgarray['lmo_tabelle_color3'].";";
} elseif ($LigaTabelle[$j]['pos'] <= ($liga->options->keyValues['Champ']+$liga->options->keyValues['CL']+$liga->options->keyValues['CK']+$liga->options->keyValues['UC']) ) {
// UEFA Cup
$css_class = $cfgarray['mini']['tabelle_classUEFA'];
$style="background: ".$cfgarray['lmo_tabelle_background4']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color4'])?'':"color: ".$cfgarray['lmo_tabelle_color4'].";";
} elseif ($LigaTabelle[$j]['pos'] > ($AnzahlTeams-$liga->options->keyValues['AB']) ) {
// Abstiegs Relegation
$css_class = $cfgarray['mini']['tabelle_classAbsteiger'];
$style="background: ".$cfgarray['lmo_tabelle_background6']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color6'])?'':"color: ".$cfgarray['lmo_tabelle_color6'].";";
} elseif ($LigaTabelle[$j]['pos'] > ($AnzahlTeams-$liga->options->keyValues['AB']-$liga->options->keyValues['AR']) ) {
// Abstiegsplaetze
$css_class = $cfgarray['mini']['tabelle_classAbstiegsRelegation'];
$style="background: ".$cfgarray['lmo_tabelle_background5']." repeat;";
$style.=empty($cfgarray['lmo_tabelle_color5'])?'':"color: ".$cfgarray['lmo_tabelle_color5'].";";
} else $css_class = ""; // "Normale Tabellenplaetze
// Striche nach Meister / CL /CL Quali ....
if ($j && $LastClass != $css_class && $cfgarray['mini']['StyleStripLine'])
$style.= "border-top: ".$cfgarray['mini']['StyleStripLine'].";";
$LastClass= $css_class;
//FavTeam
if ($LigaTabelle[$j]['team']->nr == $Favorit ){
$style.="font-weight:bolder;";
$css_class.= $cfgarray['mini']['classFavorit'];
}
// Style fuer "Gestreifte" Tabelle
if ($m_striped != 0) {
$stripedColor = explode(",",trim($cfgarray['mini']['stripedTable']) );
if ($j%2==0) {
$style.="background-color: ".$stripedColor[0].";\n";
//$template->setVariable(array("Style"=>$style));
}
else {
$style.="background-color: ".$stripedColor[1].";\n";
//$template->setVariable(array("Style"=>$style));
}
}
$template->setVariable(array("Style"=>$style,"Class"=>$css_class));
$template->parseCurrentBlock();
}
$template->setVariable("LigaName", $liga->name);
$template->setVariable("Runde", $Runde);
$template->setVariable("ligaDatum",$text['mini'][14].": ".$liga->ligaDatumAsString("%x"));
$template->setVariable("Link", URL_TO_LMO.'/?action=table&file='.$m_liga);
$template->setVariable("URL_TO_LMO", URL_TO_LMO);
$template->setVariable("URL_TO_TEMPLATEDIR", URL_TO_TEMPLATEDIR."/mini/");
// cache File schreiben
if ( is_writable(dirname($TableCacheFile)) && $cfgarray['mini']['CacheTable'] == 1 ) {
$CacheOutput = filemtime(PATH_TO_LMO.'/'.$dirliga.$m_liga)."|$m_ueber|$m_unter|$m_platz\n".$template->get();
if ($fileHandle = @fopen($TableCacheFile,"wb") ) {
fwrite($fileHandle,$CacheOutput);
fclose($fileHandle);
}
}
$template->show();
} else {
echo getMessage($text['mini'][5]." ".$mini_liga,TRUE);
}
}
//Falls IFRAME - komplettes HTML-Dokument
if (basename($_SERVER['PHP_SELF'])=="lmo-minitab.php") : ?>
endif; ?> |
|
|