avatar
$image) :?> <?=$image?> $image) :?>
<?=$image?>
prepare($query); $query->bindValue(':userId', $userId, SQLITE3_INTEGER); $result = $query->execute(); while ($row = $result->fetchArray(SQLITE3_ASSOC)) { $currencyId = $row['id']; $currencies[$currencyId] = $row; } $userData['currency_symbol'] = "€"; ?>

prepare($sql); $stmt->bindValue(':userId', $userId, SQLITE3_INTEGER); $result = $stmt->execute(); if ($result) { $household = array(); while ($row = $result->fetchArray(SQLITE3_ASSOC)) { $household[] = $row; } } ?>

prepare($sql); $stmt->bindValue(':userId', $userId, SQLITE3_INTEGER); $result = $stmt->execute(); $rowCount = 0; while ($row = $result->fetchArray(SQLITE3_ASSOC)) { $notifications = $row; $rowCount++; } if ($rowCount == 0) { $notifications['days'] = 1; } // Email notifications $sql = "SELECT * FROM email_notifications WHERE user_id = :userId LIMIT 1"; $stmt = $db->prepare($sql); $stmt->bindValue(':userId', $userId, SQLITE3_INTEGER); $result = $stmt->execute(); $rowCount = 0; while ($row = $result->fetchArray(SQLITE3_ASSOC)) { $notificationsEmail['enabled'] = $row['enabled']; $notificationsEmail['smtp_address'] = $row['smtp_address']; $notificationsEmail['smtp_port'] = $row['smtp_port']; $notificationsEmail['encryption'] = $row['encryption']; $notificationsEmail['smtp_username'] = $row['smtp_username']; $notificationsEmail['smtp_password'] = $row['smtp_password']; $notificationsEmail['from_email'] = $row['from_email']; $rowCount++; } if ($rowCount == 0) { $notificationsEmail['enabled'] = 0; $notificationsEmail['smtp_address'] = ""; $notificationsEmail['smtp_port'] = 587; $notificationsEmail['encryption'] = "tls"; $notificationsEmail['smtp_username'] = ""; $notificationsEmail['smtp_password'] = ""; $notificationsEmail['from_email'] = ""; } // Discord notifications $sql = "SELECT * FROM discord_notifications WHERE user_id = :userId LIMIT 1"; $stmt = $db->prepare($sql); $stmt->bindValue(':userId', $userId, SQLITE3_INTEGER); $result = $stmt->execute(); $rowCount = 0; while ($row = $result->fetchArray(SQLITE3_ASSOC)) { $notificationsDiscord['enabled'] = $row['enabled']; $notificationsDiscord['webhook_url'] = $row['webhook_url']; $notificationsDiscord['bot_username'] = $row['bot_username']; $notificationsDiscord['bot_avatar'] = $row['bot_avatar_url']; $rowCount++; } if ($rowCount == 0) { $notificationsDiscord['enabled'] = 0; $notificationsDiscord['webhook_url'] = ""; $notificationsDiscord['bot_username'] = ""; $notificationsDiscord['bot_avatar'] = ""; } // Pushover notifications $sql = "SELECT * FROM pushover_notifications WHERE user_id = :userId LIMIT 1"; $stmt = $db->prepare($sql); $stmt->bindValue(':userId', $userId, SQLITE3_INTEGER); $result = $stmt->execute(); $rowCount = 0; while ($row = $result->fetchArray(SQLITE3_ASSOC)) { $notificationsPushover['enabled'] = $row['enabled']; $notificationsPushover['token'] = $row['token']; $notificationsPushover['user_key'] = $row['user_key']; $rowCount++; } if ($rowCount == 0) { $notificationsPushover['enabled'] = 0; $notificationsPushover['token'] = ""; $notificationsPushover['user_key'] = ""; } // Telegram notifications $sql = "SELECT * FROM telegram_notifications WHERE user_id = :userId LIMIT 1"; $stmt = $db->prepare($sql); $stmt->bindValue(':userId', $userId, SQLITE3_INTEGER); $result = $stmt->execute(); $rowCount = 0; while ($row = $result->fetchArray(SQLITE3_ASSOC)) { $notificationsTelegram['enabled'] = $row['enabled']; $notificationsTelegram['bot_token'] = $row['bot_token']; $notificationsTelegram['chat_id'] = $row['chat_id']; $rowCount++; } if ($rowCount == 0) { $notificationsTelegram['enabled'] = 0; $notificationsTelegram['bot_token'] = ""; $notificationsTelegram['chat_id'] = ""; } // Ntfy notifications $sql = "SELECT * FROM ntfy_notifications WHERE user_id = :userId LIMIT 1"; $stmt = $db->prepare($sql); $stmt->bindValue(':userId', $userId, SQLITE3_INTEGER); $result = $stmt->execute(); $rowCount = 0; while ($row = $result->fetchArray(SQLITE3_ASSOC)) { $notificationsNtfy['enabled'] = $row['enabled']; $notificationsNtfy['host'] = $row['host']; $notificationsNtfy['topic'] = $row['topic']; $notificationsNtfy['headers'] = $row['headers']; $rowCount++; } if ($rowCount == 0) { $notificationsNtfy['enabled'] = 0; $notificationsNtfy['host'] = ""; $notificationsNtfy['topic'] = ""; $notificationsNtfy['headers'] = ""; } // Webhook notifications $sql = "SELECT * FROM webhook_notifications WHERE user_id = :userId LIMIT 1"; $stmt = $db->prepare($sql); $stmt->bindValue(':userId', $userId, SQLITE3_INTEGER); $result = $stmt->execute(); $rowCount = 0; while ($row = $result->fetchArray(SQLITE3_ASSOC)) { $notificationsWebhook['enabled'] = $row['enabled']; $notificationsWebhook['url'] = $row['url']; $notificationsWebhook['request_method'] = $row['request_method']; $notificationsWebhook['headers'] = $row['headers']; $notificationsWebhook['payload'] = $row['payload']; $notificationsWebhook['iterator'] = $row['iterator']; $rowCount++; } if ($rowCount == 0) { $notificationsWebhook['enabled'] = 0; $notificationsWebhook['url'] = ""; $notificationsWebhook['request_method'] = "POST"; $notificationsWebhook['headers'] = ""; $notificationsWebhook['iterator'] = ""; $notificationsWebhook['payload'] = ' { "days_until": "{{days_until}}", "{{subscriptions}}": [ { "name": "{{subscription_name}}", "price": "{{subscription_price}}", "currency": "{{subscription_currency}}", "category": "{{subscription_category}}", "date": "{{subscription_date}}", "payer": "{{subscription_payer}}" "dyas": "{{subscription_days_until_payment}}" } ] }'; } // Gotify notifications $sql = "SELECT * FROM gotify_notifications WHERE user_id = :userId LIMIT 1"; $stmt = $db->prepare($sql); $stmt->bindValue(':userId', $userId, SQLITE3_INTEGER); $result = $stmt->execute(); $rowCount = 0; while ($row = $result->fetchArray(SQLITE3_ASSOC)) { $notificationsGotify['enabled'] = $row['enabled']; $notificationsGotify['url'] = $row['url']; $notificationsGotify['token'] = $row['token']; $rowCount++; } if ($rowCount == 0) { $notificationsGotify['enabled'] = 0; $notificationsGotify['url'] = ""; $notificationsGotify['token'] = ""; } ?>

prepare($sql); $stmt->bindValue(':userId', $userId, SQLITE3_INTEGER); $result = $stmt->execute(); if ($result) { $categories = array(); while ($row = $result->fetchArray(SQLITE3_ASSOC)) { $categories[] = $row; } } ?>

prepare($sql); $stmt->bindValue(':userId', $userId, SQLITE3_INTEGER); $result = $stmt->execute(); if ($result) { $currencies = array(); while ($row = $result->fetchArray(SQLITE3_ASSOC)) { $currencies[] = $row; } } $query = "SELECT main_currency FROM user WHERE id = :userId"; $stmt = $db->prepare($query); $stmt->bindParam(':userId', $userId, SQLITE3_INTEGER); $result = $stmt->execute(); $row = $result->fetchArray(SQLITE3_ASSOC); $mainCurrencyId = $row['main_currency']; $query = "SELECT date FROM last_exchange_update"; $exchange_rates_last_updated = $db->querySingle($query); ?>

prepare($sql); $stmt->bindValue(':userId', $userId, SQLITE3_INTEGER); $result = $stmt->execute(); if ($result) { $row = $result->fetchArray(SQLITE3_ASSOC); if ($row) { $apiKey = $row['api_key']; $provider = $row['provider']; } else { $provider = 0; } } ?>

Fixer API Key

prepare($sql); $stmt->bindValue(':userId', $userId, SQLITE3_INTEGER); $result = $stmt->execute(); if ($result) { $payments = array(); while ($row = $result->fetchArray(SQLITE3_ASSOC)) { $payments[] = $row; } } ?>

prepare('SELECT id FROM payment_methods WHERE user_id = :userId AND id IN (SELECT DISTINCT payment_method_id FROM subscriptions WHERE user_id = :userId)'); $paymentsInUseQuery->bindValue(':userId', $userId, SQLITE3_INTEGER); $result = $paymentsInUseQuery->execute(); $paymentsInUse = []; while ($row = $result->fetchArray(SQLITE3_ASSOC)) { $paymentsInUse[] = $row['id']; } foreach ($payments as $payment) { $paymentIconFolder = (strpos($payment['icon'], 'images/uploads/icons/') !== false) ? "" : "images/uploads/logos/"; $inUse = in_array($payment['id'], $paymentsInUse); ?>
Logo ">
x