Spelarstatistik



:

 


Välj säsong och matchtyp för att ändra vilka matcher som visas!

0)
{

//
//Järjestellään multisortin avulla
//
switch($sort)
{
case ’name’:
array_multisort($names, SORT_ASC, SORT_STRING, $idt, $numbers, $goals, $apps, $assists, $yellows, $reds, $ins, $minutes, $publish);
break;
case ’number’:
array_multisort($numbers, SORT_ASC, SORT_NUMERIC, $names, SORT_ASC, SORT_STRING, $idt, $goals, $apps, $assists, $yellows, $reds, $ins, $minutes, $publish);
break;
case ’minutes’:
array_multisort($minutes, SORT_DESC, SORT_NUMERIC, $apps, SORT_DESC, SORT_NUMERIC, $ins, SORT_DESC, SORT_NUMERIC, $names, SORT_ASC, SORT_STRING, $idt, $goals, $numbers, $assists, $yellows, $reds, $minutes, $publish);
break;
case ’apps’:
array_multisort($apps, SORT_DESC, SORT_NUMERIC, $ins, SORT_DESC, SORT_NUMERIC, $names, SORT_ASC, SORT_STRING, $idt, $goals, $assists, $numbers, $yellows, $reds, $minutes, $publish);
break;
case ’ins’:
array_multisort($ins, SORT_DESC, SORT_NUMERIC, $apps, SORT_DESC, SORT_NUMERIC, $names, SORT_ASC, SORT_STRING, $idt, $goals, $assists, $numbers, $yellows, $reds, $minutes, $publish);
break;
case ’goals’:
array_multisort($goals, SORT_DESC, SORT_NUMERIC, $names, SORT_ASC, SORT_STRING, $idt, $assists, $numbers, $apps, $yellows, $reds, $ins, $minutes, $publish);
break;
case ’assists’:
array_multisort($assists, SORT_DESC, SORT_NUMERIC, $names, SORT_ASC, SORT_STRING, $idt, $goals, $apps, $yellows, $numbers, $reds, $ins, $minutes, $publish);
break;
case ’yellows’:
array_multisort($yellows, SORT_DESC, SORT_NUMERIC, $names, SORT_ASC, SORT_STRING, $idt, $goals, $assists, $apps, $numbers, $reds, $ins, $minutes, $publish);
break;
case ’reds’:
array_multisort($reds, SORT_DESC, SORT_NUMERIC, $names, SORT_ASC, SORT_STRING, $idt, $goals, $assists, $apps, $yellows, $numbers, $ins, $minutes, $publish);
break;

}

$i=0;
$j=1;
while($i < $qty) { // //Tarkastetaan jakojäännöksellä, kumpi väreistä valitaan solun taustaksi // if($j % 2 == 0) $temp = BGCOLOR1; else $temp = BGCOLOR2; echo"

\n”;

$i++;
}

?>

”;
}
?>

”;

//
//Tehdään järjestysnumero siten, että tarkistetaan onko edellinen arvo sama kuin nykyinen
//ja tulostetaan jär.numero, jos ovat eri
//
switch($sort)
{

case ’apps’:
{
if($i > 0)
{
if($apps[$i] == $apps[$i-1])
{
echo’ ’;
$j++;
}
else
{
echo”$j.”;
$j++;
}
}
else
{
echo”$j.”;
$j++;
}
}
break;

case ’minutes’:
{
if($i > 0)
{
if($minutes[$i] == $minutes[$i-1])
{
echo’ ’;
$j++;
}
else
{
echo”$j.”;
$j++;
}
}
else
{
echo”$j.”;
$j++;
}
}
break;

case ’ins’:
{
if($i > 0)
{
if($ins[$i] == $ins[$i-1])
{
echo’ ’;
$j++;
}
else
{
echo”$j.”;
$j++;
}
}
else
{
echo”$j.”;
$j++;
}
}
break;

case ’goals’:
{
if($i > 0)
{
if($goals[$i] == $goals[$i-1])
{
echo’ ’;
$j++;
}
else
{
echo”$j.”;
$j++;
}
}
else
{
echo”$j.”;
$j++;
}
}
break;

case ’assists’:
{
if($i > 0)
{
if($assists[$i] == $assists[$i-1])
{
echo’ ’;
$j++;
}
else
{
echo”$j.”;
$j++;
}
}
else
{
echo”$j.”;
$j++;
}
}
break;

case ’yellows’:
{
if($i > 0)
{
if($yellows[$i] == $yellows[$i-1])
{
echo’ ’;
$j++;
}
else
{
echo”$j.”;
$j++;
}
}
else
{
echo”$j.”;
$j++;
}
}
break;

case ’reds’:
{
if($i > 0)
{
if($reds[$i] == $reds[$i-1])
{
echo’ ’;
$j++;
}
else
{
echo”$j.”;
$j++;
}
}
else
{
echo”$j.”;
$j++;
}
}
break;

case ’number’:
{
echo”#$numbers[$i]”;
$j++;
}
break;

case ’name’:
{
echo”$j.”;
$j++;
}
break;
}
echo”

”;

//
//Tarkistetaan, onko pelaaja julkaistu
//
if($publish[$i] == 1)
{
echo ”$names[$i]”;
}
else
{
echo ”$names[$i]”;
}

echo”

”;

//
//Vahvennetaan tilasto tietyn ominaisuuden kohdalta
//
if($sort == ’minutes’)
echo’’;

echo”$minutes[$i]”;

if($sort == ’minutes’)
echo’
’;

echo”

”;

//
//Vahvennetaan tilasto tietyn ominaisuuden kohdalta
//
if($sort == ’apps’)
echo’’;

echo”$apps[$i]”;

if($sort == ’apps’)
echo’
’;

echo”

”;
if($sort == ’ins’)
echo’’;

echo”$ins[$i]”;

if($sort == ’ins’)
echo’
’;

echo”

”;
if($sort == ’goals’)
echo’’;

echo”$goals[$i]”;

if($sort == ’goals’)
echo’
’;

echo”

”;
if($sort == ’assists’)
echo’’;

echo”$assists[$i]”;

if($sort == ’assists’)
echo’
’;

echo”

”;
if($sort == ’yellows’)
echo’’;

echo”$yellows[$i]”;

if($sort == ’yellows’)
echo’
’;

echo”

”;
if($sort == ’reds’)
echo’’;

echo”$reds[$i]”;

if($sort == ’reds’)
echo’
’;

echo”

|
|
|
|
|
|
|
|
$txt_no_players_added

0)
{

$temp_to_query = ’ AND (’;
$x = 1;
while($timedata = mysql_fetch_array($get_timeline))
{
$temp_to_query .= ”(M.MatchDateTime <= '$timedata[end] 00:00:00' AND M.MatchDateTime >= ’$timedata[start] 00:00:00’)”;

if($x != $y)
{
$temp_to_query .= ’ OR ’;
}

$x++;
}

}

mysql_free_result($get_timeline);

$temp_to_query .= ’) ’;

$get_matches = mysql_query(”
SELECT
M.MatchGoals AS goals,
M.MatchGoalsOpponent AS goals_o
FROM tplss_matches M
WHERE M.MatchSeasonID LIKE ’$tdefaultseasonid’ AND
M.MatchTypeID LIKE ’$tdefaultmatchtypeid’ $temp_to_query AND

M.MatchGoals IS NOT NULL AND
M.MatchGoalsOpponent IS NOT NULL
ORDER BY M.MatchDateTime
”, $connection)
or die(mysql_error());

$k=0;
while($data_m = mysql_fetch_array($get_matches))
{

if($data_m[’goals’] > $data_m[’goals_o’])
{
$wins = $wins + 1;
$streak++;
$streak2++;
$t = $k + 1;
$track = 1;
$track2 = 1;
}

if($data_m[’goals’] == $data_m[’goals_o’])
{
$draws = $draws + 1;
$streak=0;
$track = 0;
$track2 = 1;
$streak2++;
}

if($data_m[’goals’] < $data_m['goals_o']) { $loses = $loses + 1; $streak=0; $streak2=0; $track = 0; $track2 = 0; } if($k > 0)
{
if($track == 1)
{
if($streak >= $record)
{
$record = $streak;
}
}

if($track2 == 1)
{
if($streak2 >= $record2)
{
$record2 = $streak2;
}
}
}

$k = $k +1;
}

mysql_free_result($get_matches);

$all = $wins + $loses + $draws;

if($all == 0)
{
$win_pros = round(0, 2);
$draw_pros = round(0, 2);
$lose_pros = round(0, 2);
}
else
{
$win_pros = round(100*($wins/$all), 2);
$draw_pros = round(100*($draws/$all), 2);
$lose_pros = round(100*($loses/$all), 2);
}

?>

$data[firstname]”;
}
else
{
echo”$data[lastname], $data[firstname]”;
}

?>

”;
}

mysql_free_result($query);
?>

% % %
$txt_no_staff_added