$sql = "SELECT * FROM `wait_help` WHERE 1";
$res=mysqli_query($conn, $sql);
while($arr = mysqli_fetch_array($res)){
$ts = strtotime($arr['time_begin']);
$ts = $ts - 60*60;
$hours = date("G",$ts);
$min = date("i",$ts);
$ts = strtotime($arr['time_add']);
$ts = $ts - 60*30;
$hours_end = date("G",$ts);
$min_end = date("i",$ts);
if ($arr['storona'] == "Коренной") {
$storona_img = "";
$fraction="fraction koren";
} else {
$storona_img = "
";
$fraction="fraction ponaex";
}
echo("". $storona_img." ".$arr['nick']." [".$arr['level']."] , планирует начать бой в ".$hours.":".$min.". Последний срок начала боя ".$hours_end.":".$min_end." ");
echo("
");
}
?>
$sql = "SELECT * FROM `curent_fight` WHERE `rezerv` = 1"; $res=mysqli_query($conn, $sql); while($arr = mysqli_fetch_array($res)){ if ($arr['storona'] == "Коренной") { $storona_img = "


"); } ?>
"); echo($day_end.".".$month_end.".".$year_end." ".$hours_end.":".$min_end." ".$arr['text']." "); echo("
"); } ?>