Files
erv-ticket-dev/database_old.php
Fedor 2c516362df feat: Secure SMS verification with Redis (Predis)
- Added Predis library for Redis connection (no PHP extension required)
- Server-side SMS code generation and storage in Redis
- Rate limiting and brute-force protection
- Integration with n8n webhook for SMS sending
- Environment variables moved to .env file
- Fixed policy verification endpoint
- Added file-based fallback if Redis unavailable
2026-01-15 15:40:13 +03:00

59 lines
1.2 KiB
PHP
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
// Имя ДБ: turistpr_erv
// Пользователь: turistpr_erv
// Пароль: c7vOXbmG
// Адрес хоста: 141.8.194.131
// таблица lexrpiority
if(isset($_POST['action']) && !empty($_POST['action'])) {
$action = $_POST['action'];
switch($action) {
case 'user_verify' : user_verify(); break;
}
}
function user_verify() {
$finded_row['success']="false";
//$link = mysqli_connect("141.8.194.131", "turistpr_erv", "c7vOXbmG");
$link = mysqli_connect("localhost", "ci20465_erv", "c7vOXbmG");
if ($link == false){
}
else {
}
$birthday = $_POST['birthday'];
$inn = $_POST['inn'];
//$sql = "SELECT * FROM turistpr_erv.lexrpiority";
$sql = "SELECT * FROM ci20465_erv.lexrpiority";
$result = mysqli_query($link, $sql);
$finded_row=array("success"=>"false","message"=>"Полис не найден", "result" => "");
if($inn) {
while ($row = mysqli_fetch_assoc($result)) {
if($inn==$row['voucher']) {
$finded_row['success']="true";
$finded_row['message']="Полис найден";
$finded_row['result']=$row;
}
}
}
echo json_encode($finded_row);
}
?>