ACIL FM
Dark
Refresh
Current DIR:
/home/fastexsh/public_html/exchange/classes
/
home
fastexsh
public_html
exchange
classes
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
functions.php
1.75 MB
chmod
View
DL
Edit
Rename
Delete
telegram.php
4.37 MB
chmod
View
DL
Edit
Rename
Delete
Edit file: /home/fastexsh/public_html/exchange/classes/functions.php
<?php function addNewUser($chat_id, $otp) { global $db; $query = "INSERT INTO `users` (`chat_id`, `verify_code`) VALUES (?, ?)"; $stmt = $db->prepare($query); $stmt->execute([$chat_id, $otp]); } function selectUser($chat_id) { global $db; $query = "SELECT * FROM `users` WHERE `chat_id` = ? LIMIT 1"; $stmt = $db->prepare($query); $stmt->execute([$chat_id]); return $stmt->fetch(); } function setStep($chat_id, $step) { global $db; $query = "UPDATE `users` SET `step` = ? WHERE `chat_id` = ?"; $stmt = $db->prepare($query); $stmt->execute([$step, $chat_id]); } function getSettingsBot($key) { global $db; $query = "SELECT * FROM `settings` WHERE `key_` = ? LIMIT 1"; $stmt = $db->prepare($query); $stmt->execute([$key]); return $stmt->fetch(); } function changeSettings($rowName, $newValue) { global $db; $query = "UPDATE `settings` SET `value_` = ? WHERE `key_` = ?"; $stmt = $db->prepare($query); $stmt->execute([$newValue, $rowName]); } function getUsdtIrtPrice() { $url = 'https://api.bitpin.org/v4/mkt/prices/'; $context = stream_context_create([ 'http' => [ 'timeout' => 10, 'method' => 'GET' ] ]); $response = @file_get_contents($url, false, $context); if ($response === false) { return null; } $data = json_decode($response, true); if (!is_array($data) || json_last_error() !== JSON_ERROR_NONE) { return null; } foreach ($data as $item) { if (isset($item['code']) && $item['code'] === 'USDT_IRT' && isset($item['price'])) { return (float) $item['price']; } } return null; }
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply