<?php
require ('../core/sys.php');
$day = abs(intval($_POST['LMI_PAYMENT_AMOUNT']));
if(!isset($day)){
header('Location: /');
exit;
}
$time = $day*86400+time();
$url = htmlspecialchars($_POST['url']);
$sql = $db->prepare('INSERT INTO `platform` (`url`,`time`,`status`) VALUES (?,?,?)');
$sql -> execute([$url,$time,'on']);
$_SESSION['message'] = 'Площадка успешно добавлена';
header('Location: /');
exit;
?>