I am in this sphere new and I do not understand much.
please if anyone can help me only with the addition of the first boss because I do not quite understand php
as I said I'm new and I'm not with you in the php language thank you in advance
$boss1 = date_format($date_create($detail['ActionTime']),"H:i:s", strtotime("+43200"));
please if anyone can help me only with the addition of the first boss because I do not quite understand php
as I said I'm new and I'm not with you in the php language thank you in advance
$boss1 = date_format($date_create($detail['ActionTime']),"H:i:s", strtotime("+43200"));
PHP Code:
<?php
function mssql_escape_string($data) {
if(!isset($data) or empty($data)) return '';
if(is_numeric($data)) return $data;
$non_displayables = array(
'/%0[0-8bcef]/', // url encoded 00-08, 11, 12, 14, 15
'/%1[0-9a-f]/', // url encoded 16-31
'/[\x00-\x08]/', // 00-08
'/\x0b/', // 11
'/\x0c/', // 12
'/[\x0e-\x1f]/' // 14-31
);
foreach($non_displayables as $regex)
$data = preg_replace($regex,'',$data);
$data = str_replace("'","''",$data);
return $data;
}
$host = '127.0.0.1';
$dbuser = 'Shaiya'; // put here your DB login
$dbpass = 'Shaiya123'; // put here your password DB
$database = 'PS_GameLog';
$conn = [MENTION=311501]ODB[/MENTION]c_connect("Driver={SQL Server};Server=$host;Database=$database", $dbuser, $dbpass) or die("Database Connection Error!");
$boss1 = odbc_exec($conn, "SELECT [ActionTime] FROM [dbo].[Boss_Death_Log] WHERE [MobID]='901'order by ActionTime desc");
$detail=odbc_fetch_array($boss1);
//Here need to add an if where you see if the time i expired or not! in case is not expired show the countdown else need to return something like "UP NOW".
$boss1 = date_format($date_create($detail['ActionTime']),"H:i:s", strtotime("+43200"));
echo "
<table cellspacing=1 cellpadding=4 border=1 style=\"border-style:hidden;\">
<tr>
<th>Boss Name</th>
<th>Kill Zeit</th>
<th>Respawn</th>
</tr>";
echo "<tr>";
echo "<td>Asiris</td><td>". substr($s['ActionTime'],0, 19) ."</td><td>". $boss1 ."</td>";