The extros
New Member
- Joined
- Jun 28, 2010
- Messages
- 98
- Reaction score
- 1
Code:
A PHP Error was encountered
Severity: Notice
Message: Undefined index: dateFormat
Filename: frags/injection.php
Line Number: 16
I want to disable that info... always it happens... I read alot and the only answer I got was.. put this at index.php
Code:
<?php
error_reporting( E_ALL & ~E_NOTICE );
ini_set( 'display_errors', 0 );
session_start();
This is the script:
Code:
<?php
if(!defined('BASEPATH')) exit('No direct script access allowed');
$accountId = (!empty($_SESSION['account_id']) ? $_SESSION['account_id'] : false);
$player = $GLOBALS['player'];
$config = $GLOBALS['config'];
if($player->getAccount() == $accountId)
{
$SQL = POT::getInstance()->getDBHandle();
$frags = $SQL->query("SELECT `player_deaths`.*, `players`.`name`, `killers`.`unjustified` FROM `player_deaths` LEFT JOIN `killers` ON `killers`.`death_id` = `player_deaths`.`id` LEFT JOIN `player_killers` ON `player_killers`.`kill_id` = `killers`.`id` LEFT JOIN `players` ON `players`.`id` = `player_deaths`.`player_id` WHERE `player_killers`.`player_id` = {$player->getId()} ORDER BY `date` DESC LIMIT 0,10;");
if($frags->rowCount())
{
echo "<div class=\"bar\">Player Kills</div>";
foreach($frags as $frag)
echo "<table style=\"width: 100%;\"><tr class=\"highlight\"><td width=\"25%\">".date($config['dateFormat'], $frag['date'])."</td><td width=\"65%\">Killed <a href=\"".WEBSITE."/index.php/character/view/{$frag['name']}\">{$frag['name']}</a> at Level {$frag['level']}.</td><td width=\"10%\"><span style=\"color: ".($frag['unjustified'] ? "red;\">unjustified" : "green;\">ok")."</span></td></tr></table>";
}
}
?>