if ($_POST['value'] == '111'){
$arr = array(
'Телефон: ' => $_POST['phone'],
'Замовлені товари: ' => $products,
);
$txt = "";
foreach($arr as $key => $value) {
if (is_array($value)) {
$txt .= "<b>".htmlentities($key)."</b> ".htmlentities(implode(", ", $value))."%0A";
} else {
$txt .= "<b>".htmlentities($key)."</b> ".htmlentities($value)."%0A";
}
};
$sendToTelegram = fopen("https://api.telegram.org/bot{$token_xtz}/sendMessage?chat_id={$chat_id_xtz}&parse_mode=html&text={$txt}","r");
}
$groups = [
"power-group" => ["pump", "abs-bums", "super-strong", "fitball", "fit-cross", "body-sculpt", "lab", "hell-scretch", "witch-ball", "body-pump", "abs"],
"static-group" => ["mfr", "healthy-back", "pilates", "twine-school", "yoga", "open-day", "lfk-50", "yoga-in-gamake", "interval"],
"aerobics-group" => ["joint-gymnastics", "press-stretch", "abs-stretch", "joint-gymnastics-stretch", "abl", "make-body", "mobility", "stretch"],
"dance-group" => ["latina", "tabata", "aerobics", "fitness-dance", "latina-start", "latina-pro"]
];
$group = NULL;
foreach($groups as $key => $value)
{
for($i = 0; $i < count($value); $i++)
{
echo $value[$i] . " =? " . rawurlencode($trainings[1]) . '<br />';
if($value[$i] == $trainings[1])
{
$group = "sport";
break;
}
}
if (!is_null($group))
{
break;
}
}
wget -dSO- "https://api.telegram.org/bot1810527993:AAE_Fv-bdQpnjVOHo9q4_yOiWGKVC0Hr6uU/sendMessage?chat_id=437840601&text=Testing"