<?php
// Template placeholder. BotService replaces this file for every generated bot.
require_once __DIR__ . '/tenant_db.php';
$dbname = '{database_name}';
$usernamedb = '{username_db}';
$passworddb = '{password_db}';
$dbhost = '{database_host}';
$dbport = (int)'{database_port}';
$tenant_table_prefix = '{table_prefix}';
$GLOBALS['tenant_table_prefix'] = $tenant_table_prefix;
mysqli_report(MYSQLI_REPORT_OFF);
$connect = new TenantMysqli($dbhost, $usernamedb, $passworddb, $dbname, $dbport, null, $tenant_table_prefix);
if ($connect->connect_errno) { die('database error'); }
$connect->set_charset('utf8mb4');
$options = [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, PDO::ATTR_EMULATE_PREPARES => false];
$dsn = "mysql:host={$dbhost};port={$dbport};dbname={$dbname};charset=utf8mb4";
$pdo = new TenantPDO($dsn, $usernamedb, $passworddb, $options, $tenant_table_prefix);
$APIKEY = '{API_KEY}';
$adminnumber = '{admin_number}';
$domainhosts = '{domain_name}';
$usernamebot = '{username_bot}';
$new_marzban = true;
