Hi again!
I have a problem with death list on Znote AAC, website shows:
Death list in characterprofile.php:
286 line:
I have a problem with death list on Znote AAC, website shows:
Code:
Notice: Undefined index: is_player in /home/ot/www/public_html/characterprofile.php on line 286
[13 December 2016 (19:29)] Killed at level 193 by monster: Szatan.
Death list in characterprofile.php:
286 line:
PHP:
if ($value['is_player'] == 1)
PHP:
<!-- DEATH LIST -->
<li>
<b>Death List:</b><br>
<?php
if ($config['TFSVersion'] == 'TFS_02')
{
$array = user_fetch_deathlist($user_id);
if ($array)
{
?>
<ul>
<?php
// Design and present the list
foreach ($array as $value)
{ ?>
<li>
<?php
$value['time'] = getClock($value['time'], true);
if ($value['is_player'] == 1)
{
$value['killed_by'] = 'player: <a href="characterprofile.php?name='. $value['killed_by'] .'">'. $value['killed_by'] .'</a>';
}
else
{
$value['killed_by'] = 'monster: '. $value['killed_by'] .'.';
}
echo '['. $value['time'] .'] Killed at level '. $value['level'] .' by '. $value['killed_by']; ?>
</li>
<?php
}
?>
</ul>
<?php
}
else
{
echo '<b><font color="green">This player has never died.</font></b>';
}
}
else if ($config['TFSVersion'] == 'TFS_10')
{
$deaths = mysql_select_multi("SELECT
`player_id`, `time`, `level`, `killed_by`, `is_player`,
`mostdamage_by`, `mostdamage_is_player`, `unjustified`, `mostdamage_unjustified`
FROM `player_deaths`
WHERE `player_id`=$user_id ORDER BY `time` DESC LIMIT 10;");
if ($deaths)
{
foreach ($deaths as $d)
{
?>
<li>
<?php echo "<b>".getClock($d['time'], true, true)."</b>";
$lasthit = ($d['is_player']) ? "<a href='characterprofile.php?name=".$d['killed_by']."'>".$d['killed_by']."</a>" : $d['killed_by'];
echo ": Killed at level ".$d['level']." by $lasthit";
if ($d['unjustified'])
{echo " <font color='red' style='font-style: italic;'>(unjustified)</font>";}
$mostdmg = ($d['mostdamage_by'] !== $d['killed_by']) ? true : false;
if ($mostdmg)
{
$mostdmg = ($d['mostdamage_is_player']) ? "<a href='characterprofile.php?name=".$d['mostdamage_by']."'>".$d['mostdamage_by']."</a>" : $d['mostdamage_by'];
echo "<br>and by $mostdmg.";
if ($d['mostdamage_unjustified'])
{ echo " <font color='red' style='font-style: italic;'>(unjustified)</font>"; }
}
else
{ echo " <b>(soloed)</b>"; }
?>
</li>
<?php
}
}
else
{
echo '<b><font color="green">This player has never died.</font></b>';
}
}
else if ($config['TFSVersion'] == 'TFS_03')
{
//mysql_select_single("SELECT * FROM players WHERE name='TEST DEBUG';");
$array = user_fetch_deathlist03($user_id);
if ($array)
{?>
<ul>
<?php
// Design and present the list
foreach ($array as $value)
{ ?>
<li>
<?php
$value[3] = user_get_killer_id(user_get_kid($value['id']));
if ($value[3] !== false && $value[3] >= 1)
{
$namedata = user_character_data((int)$value[3], 'name');
if ($namedata !== false)
{
$value[3] = $namedata['name'];
$value[3] = 'player: <a href="characterprofile.php?name='. $value[3] .'">'. $value[3] .'</a>';
}
else
{
$value[3] = 'deleted player.';
}
}
else
{
$value[3] = user_get_killer_m_name(user_get_kid($value['id']));
if ($value[3] === false)
{ $value[3] = 'deleted player.'; }
}
echo '['. getClock($value['date'], true) .'] Killed at level '. $value['level'] .' by '. $value[3];
echo '</li>';
}
?>
</ul>
<?php
}
else { echo '<b><font color="green">This player has never died.</font></b>'; }
}
?>
</li>
<!-- END DEATH LIST -->