/** 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! * */ require_once(dirname(__FILE__).'/../../init.php'); $file = isset($_GET['file'])? $_GET['file']: exit; //Konfiguration laden require(PATH_TO_ADDONDIR.'/spieler/lmo-statloadconfig.php'); $sort = isset($_GET['sort'])? $_GET['sort']: $spieler_standard_sortierung; if (isset($_GET['begin'])) { $begin = $_GET['begin']; $all=false; } else { $begin = 0; $all=true; } $direction = isset($_GET['direction'])? $_GET['direction']: $spieler_standard_richtung; $team = isset($_GET['team'])? urldecode($_GET['team']): ''; if ($filepointer = fopen($filename, "r+b")) { $spalten = array(); //Spaltenbezeichnung $data = array(); //Daten $typ = array(); //Spaltentyp (TRUE=String) $spalten = fgetcsv($filepointer, 10000, "§"); //Zeile mit Spaltenbezeichnern $formel = FALSE; for ($i = 0; $i < count($spalten); $i++) { if (strstr($spalten[$i], "*_*-*")) { $formel = TRUE; $spalten[$i] = substr($spalten[$i], 0, strlen($spalten[$i])-5); } if ($spalten[$i] == $text['spieler'][25]) { $vereinsspalte = $i; } } if ($formel) fgetcsv($filepointer, 10000, "§"); //Zeile mit Formeln $linkspalte = array_search($text['spieler'][32], $spalten); //Linkunterstützung aktiviert? $zeile = 0; while ($data[$zeile] = fgetcsv ($filepointer, 10000, "§")) { if ((isset($vereinsspalte) && isset($data[$zeile][$vereinsspalte]) && $spieler_vereinsweise_anzeigen == 1 && $team == $data[$zeile][$vereinsspalte]) || $team == '') { for($i = 0; $i < count($data[$zeile]); $i++) { if (!is_numeric($data[$zeile][$i])) $typ[$i] = TRUE; } $zeile++; } else { array_pop($data); } } array_pop($data); if ($spieler_nullwerte_anzeigen == 0 && !isset($typ[$sort])) $data = array_filter($data, 'filterNullwerte'); //Nullwerte ausfiltern if ($direction == 1) { if (!isset($typ[$sort])) usort($data, 'cmpInt'); else usort($data, 'cmpStr2'); } else { if (!isset($typ[$sort])) usort($data, 'cmpInt2'); else usort($data, 'cmpStr'); } $spaltenzahl = count($spalten); if ($begin+$spieler_anzeige_pro_seite > $zeile) $maxdisplay = $zeile-$begin; else $maxdisplay = $spieler_anzeige_pro_seite; if ($spieler_anzeige_pro_seite <= 0 || $all==true) { $maxdisplay = $zeile; $begin = 0; } ?>
for ($i=0;$i<$spaltenzahl;$i++) { if ($spalten[$i]!=$text['spieler'][32] && ($spalten[$i]!=$text['spieler'][25] || $team=='')){?> | } }?> | |
---|---|---|
if (!isset($data[$j1-1][$sort]) || $data[$j1][$sort] !== $data[$j1-1][$sort] && $j1!=$begin) echo ($j1+1).". "; if ($j1>0 && $j1==$begin) { for ($x=$begin-1; $x>=0; $x--){ if ($data[$x][$sort]!=$data[$j1][$sort]) { echo ($x+2).". "; break; } if ($x==0) echo "1. "; } }?> | //Spielerbild if (file_exists(PATH_TO_IMGDIR."/spieler/".$data[$j1][$j2].".jpg")) { $imgdata=getimagesize(PATH_TO_IMGDIR."/spieler/".$data[$j1][$j2].".jpg");?> |