1
I have this code
<table class="table table-hover table-bordered table-condensed lista-clientes table table-striped table-bordered table-condensed">
<thead>
<tr>
<th>
<center>IP Address</center>
</th>
<th>
<center>Banned By</center>
</th>
<th>
<center>Reason</center>
</th>
<th>
<center>Banned On</center>
</th>
<th>
<center>Banned Until</center>
</th>
</tr>
</thead>
<tbody>
<?php
date_default_timezone_set('UTC');
while($row = $retval->fetch_assoc()) {
if($row['banner'] == null) {
$row['banner'] = 'Console';
}
// <<-----------------Ban Date Converter------------>> //
$timeEpoch = $row['time'];
$timeConvert = $timeEpoch / 1000;
$timeResult = date('F j, Y, g:i a', $timeConvert);
// <<-----------------Expiration Time Converter------------>> //
$expiresEpoch = $row['expires'];
$expiresConvert = $expiresEpoch / 1000;
$expiresResult = date('F j, Y, g:i a', $expiresConvert);
?>
<tr>
<td>
<?php
$ip = $row['ip'];
$array = explode(".", $ip);
$numbers = $array[0] . "." . $array[1] . "." . $array[2];
$numbers .= ".";
for($i = 0; $i < strlen($array[3]); $i++) {
$numbers .= "*";
}
echo $numbers;
?>
</td>
<td><?php echo $row['banner'];?></td>
<td style="width: 30%;"><?php echo $row['reason'];?></td>
<td><?php echo $timeResult;?></td>
<td><?php if($row['expires'] == 0) {
echo 'ETERNO';
} else {
echo $expiresResult; }?></td>
</tr>
<?php }
$conn->close();
echo "</tbody></table>";
?>
However I want to leave the date, schedules etc... In Portuguese however I’m not getting... It’s just getting into English. Could someone help me ?
Possible duplicate of How to make the date() function format a date in English?, Date in English (en)
– NoobSaibot
@wmsouza, I’ve visualized it but I’m not getting it !!! If I asked here and why I don’t even know it!
– zlDeath
View documentation, Date/Time functions.
– NoobSaibot
@wmsouza also failed to implement in my code !! Could you help me fix it ? To stay en/br
– zlDeath
What is the value of the column
time
in the database ?– NoobSaibot
Error trying to convert Portuguese date into datetime, but questions about date on PHP see this one research ... So where does it come from
$row['time']
??– NoobSaibot
@wmsouza Has no time column
– zlDeath
Take a look ! I edited with the full code. http://prntscr.com/ih5kpy
– zlDeath