Cytat
Parse error: syntax error, unexpected '=' in D:\xampp\htdocs\accmaker\layouts\metin\layout.php on line 124
błąd przypada na linijke: <table border=\"1\" style=\"width:80%;\" class=\"barabara\"><tr>
Cytat
<?PHP
$limit = 1;
function coloured_value($valuein)
{
$value2 = $valuein;
while(strlen($value2) > 3)
{
$value .= '.'.substr($value2, -3, 3);
$value2 = substr($value2, 0, strlen($value2)-3);
}
$value = $value2.$value;
if($valuein > 0)
return '<font color="green">+'.$value.'</font>';
elseif($valuein < 0)
return '<font color="red">-'.$value.'</font>';
else
return ''.$value.'';
}
if(empty($type))
$players = $SQL->query(' SELECT * FROM players ORDER BY `players`.`experience`-`players`.`exphist_lastexp` DESC LIMIT '.$limit)->fetchAll();
foreach($players as $player)
{
print"
<table border=\"1\" style=\"width:80%;\" class=\"barabara\"><tr>
<td><a href="?subtopic=characters&name='.urlencode($player['name']).'"><font color="red" size="1"><b>'.$player['name'].'</font></b></a><br /><font color="#CCFF99"
size="1">'.$player['level'].' '.$config_vocations[$player['vocation']].'</font></td>
<td align="right"><font color="#CCFF99" size="1">'.coloured_value($player['experience'] - $player['exphist_lastexp']).'</font></tr></td>
</td></table>
";
}
?>
$limit = 1;
function coloured_value($valuein)
{
$value2 = $valuein;
while(strlen($value2) > 3)
{
$value .= '.'.substr($value2, -3, 3);
$value2 = substr($value2, 0, strlen($value2)-3);
}
$value = $value2.$value;
if($valuein > 0)
return '<font color="green">+'.$value.'</font>';
elseif($valuein < 0)
return '<font color="red">-'.$value.'</font>';
else
return ''.$value.'';
}
if(empty($type))
$players = $SQL->query(' SELECT * FROM players ORDER BY `players`.`experience`-`players`.`exphist_lastexp` DESC LIMIT '.$limit)->fetchAll();
foreach($players as $player)
{
print"
<table border=\"1\" style=\"width:80%;\" class=\"barabara\"><tr>
<td><a href="?subtopic=characters&name='.urlencode($player['name']).'"><font color="red" size="1"><b>'.$player['name'].'</font></b></a><br /><font color="#CCFF99"
size="1">'.$player['level'].' '.$config_vocations[$player['vocation']].'</font></td>
<td align="right"><font color="#CCFF99" size="1">'.coloured_value($player['experience'] - $player['exphist_lastexp']).'</font></tr></td>
</td></table>
";
}
?>