if (isset($_REQUEST["tarif"]))
{
$tarif = $_REQUEST["tarif"];
switch ($tarif) {
case "3":
$text = "Добрый день<br/><br/>XXX<br/>";
break;
case "2":
$text = "Добрый день<br/><br/>XXX<br/>";
break;
case "1":
$text = "Добрый день<br/<br/>XXX<br/>";
break;
}
if ($text)
{
echo "<script>window.close();</script>";
data_update(271, array('f21180'=>''.$text.''), '`id`=', $ID);
send_template(1890, "id=$ID");
data_insert(640, EVENTS_ENABLE, array('f11810'=>''.$ID.'', 'f11850'=>'Отправлено письмо:<br/><br/>'.$text.'<br/>Ждём ответ.'));
data_update(271, array('f21180'=>''), '`id`=', $ID);
$line['Перезвонить'] = date("Y-m-d 00:00:00", time() + 60*60*24*1);
echo "<script>location.reload();</script>";
}
}
echo "<p style='text-align:center'><big>Запрос на уточнение касательно:</big><p>";
echo "<form method='get'>";
echo "<div style='margin:0 auto; text-align:center'>";
echo "<input type='hidden' name='id' value='$button_id'>";
echo "<input type='hidden' name='line_id' value=$ID>";
echo "<input type='hidden' name='tarif' value='1'>";
echo "<input style='width:180px' type='submit' value='3'>";
echo "</div>";
echo "</form>";
echo "<form method='get'>";
echo "<div style='margin:0 auto; text-align:center'>";
echo "<input type='hidden' name='id' value='$button_id'>";
echo "<input type='hidden' name='line_id' value=$ID>";
echo "<input type='hidden' name='tarif' value='2'>";
echo "<input style='width:180px' type='submit' value='2'>";
echo "</div>";
echo "</form>";
echo "<form method='get'>";
echo "<div style='margin:0 auto; text-align:center'>";
echo "<input type='hidden' name='id' value='$button_id'>";
echo "<input type='hidden' name='line_id' value=$ID>";
echo "<input type='hidden' name='tarif' value='3'>";
echo "<input style='width:180px' type='submit' value='1'>";
echo "</div>";
echo "</form>";
echo "<script>location.reload();</script>"; не срабатывает, что не так ? Спасибо за ответы













