######## pagaai.cadtech.com.br ######## FILES: . , .. , .env , .git , .gitignore , .next , .well-known , AGENTS.md , CLAUDE.md , README.md , check_users.ts , eslint.config.mjs , fix_sessions.ts , next-env.d.ts , next.config.ts , node_modules , package-lock.json , package.json , prisma , public , seed.ts , src , test.js , test_jwt.ts , test_prisma.js , tsconfig.json , upgrade_to_saas.ts ---- .env ---- DATABASE_URL="file:./dev.db" # Insira suas credenciais abaixo: MP_ACCESS_TOKEN="APP_USR-6684249455818074-102420-2bafe6fb494c5282bdc5712d93aa29aa-1933348384" EVOLUTION_API_URL="http://75.119.156.103:8080" EVOLUTION_API_KEY="PQVZ3A4F779NXHNNH7770BI447DRI7C0" # Defina a URL base pública do seu site quando hospedar para o webhook funcionar NEXT_PUBLIC_BASE_URL="https://pagaai.cadtech.com.br" ---- tsconfig.json ---- { "compilerOptions": { "target": "ES2017", "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "strict": true, "noEmit": true, "esModuleInterop": true, "module": "esnext", "moduleResolution": "bundler", "resolveJsonModule": true, "isolatedModules": true, "jsx": "react-jsx", "incremental": true, "plugins": [ { "name": "next" } ], "paths": { "@/*": ["./src/*"] } }, "include": [ "next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", ".next/dev/types/**/*.ts", "**/*.mts" ], "exclude": ["node_modules"] } SUBDIR src/lib: . , .. , prisma.ts , session.ts , whatsapp.ts ######## pagaairs.cadtech.com.br ######## FILES: . , .. , .env , .gitignore , .next , .user.ini , AGENTS.md , CLAUDE.md , MainWrapper.tsx , README.md , ServiceWorkerRegister.tsx , Sidebar.tsx , SidebarContext.tsx , check_users.js , check_users.ts , clean_page.js , ecosystem.config.cjs , eslint.config.mjs , fix_sessions.ts , globals.css , iniciar_projeto.bat , layout.tsx , manifest.ts , middleware.ts , next-env.d.ts , next.config.ts , node_modules , package-lock.json , package.json , page.module.css , page.tsx , prisma , prisma.ts , public , route.ts , seed.ts , session.ts , src , test.js , test_jwt.ts , test_prisma.js , tsconfig.json , tsconfig.tsbuildinfo , upgrade_to_saas.ts , whatsapp.ts ---- .env ---- DATABASE_URL="file:./dev.db" # Insira suas credenciais abaixo: MP_ACCESS_TOKEN="APP_USR-6684249455818074-102420-2bafe6fb494c5282bdc5712d93aa29aa-1933348384" EVOLUTION_API_URL="http://75.119.156.103:8080" EVOLUTION_API_KEY="PQVZ3A4F779NXHNNH7770BI447DRI7C0" # Defina a URL base pública do seu site quando hospedar para o webhook funcionar NEXT_PUBLIC_BASE_URL="https://pagaai.cadtech.com.br" ---- clean_page.js ---- const fs = require('fs'); const file = 'src/app/group/[id]/page.tsx'; let content = fs.readFileSync(file, 'utf8'); content = content.replace(/const \[newPlayerPosition, setNewPlayerPosition\] = useState\(''\);\n?/g, ''); content = content.replace(/const \[editPlayerPosition, setEditPlayerPosition\] = useState\(''\);\n?/g, ''); content = content.replace(/stars:\s*3,\s*position:\s*newPlayerPosition,?\n?/g, ''); content = content.replace(/setNewPlayerPosition\(''\);\n?/g, ''); content = content.replace(/setEditPlayerPosition\(player\.position \|\| ''\);\n?/g, ''); content = content.replace(/stars:\s*3,\s*position:\s*editPlayerPosition,?\n?/g, ''); content = content.replace(/
[\s\S]*?<\/div>/g, (match) => { if (match.includes('Posição')) return ''; return match; }); content = content.replace(/\{player\.position && ]*>\{player\.position\}<\/span>\}/g, ''); fs.writeFileSync(file, content); console.log('Done cleaning page.tsx'); ---- tsconfig.json ---- { "compilerOptions": { "target": "ES2017", "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "strict": true, "noEmit": true, "esModuleInterop": true, "module": "esnext", "moduleResolution": "bundler", "resolveJsonModule": true, "isolatedModules": true, "jsx": "react-jsx", "incremental": true, "plugins": [ { "name": "next" } ], "paths": { "@/*": ["./src/*"] } }, "include": [ "next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", ".next/dev/types/**/*.ts", "**/*.mts" ], "exclude": ["node_modules"] } SUBDIR src/lib: . , .. , prisma.ts , session.ts , whatsapp.ts ######## admhibrido.cadtech.com.br ######## FILES: . , .. , .git , .gitignore , .htaccess , .well-known , 1central_radios.php , Autoads , Manualads , admins.php , admplay_bg.php , admplay_logo.php , admplay_m3u.php , admplay_music.php , admplay_salvar_texto.php , admplay_texto.php , admplay_whatsapp.php , ads.php , ads2.php , ads3.php , all_users.php , api , apppremium , assets , banners , base64.php , bg.php , central_radios.php , clientes_vencidos.json , contato.php , cron_cobrancas_inteligentes.php , cron_cobrancas_log.json , dns.php , edit_usuario.php , enviar_cobrancas.php , estatisticas.php , gerar_vencidos.php , get.php , hub_apps.php , hub_whatsapp.php , img , img_custom , includes , index.php , init_play.php , logo.php , mRTXAdsSetting.php , mensagem.txt , mercado_pago_gold.php , migrar_dns.php , music_manifest.json , music_sw.js , note.php , player_api.php , playlists.php , qrcode.php , rtx , sair.php , stream.php , tema.php , test_db.php , test_insert.php , teste.php , tmdb_api.php , users.php , users_create.php , users_teste.php , users_teste_update.php , users_update.php , usuario.php , usuarios.php , usuarios_massa.php , vencimento.php , vendor , verificar_id.php , webtv , whats.json , whatsapp_api.php , whatsapp_api1.php , xmltv.php , zerar_banco.php ---- enviar_cobrancas.php ---- &$cliente) { // Pula se já enviou hoje $hoje = date('Y-m-d'); if(isset($cliente['enviado_em']) && strpos($cliente['enviado_em'], $hoje) === 0) { continue; } $resposta = enviarMensagemWasender($cliente['numero'], $cliente['mensagem']); if(!isset($resposta['error'])) { $cliente['enviado_em'] = date('Y-m-d H:i'); echo "✅ Mensagem enviada para {$mac}\n"; } else { echo "⚠️ Erro ao enviar para {$mac}: {$resposta['error']}\n"; } // Espera aleatoriamente entre 4 e 8 segundos antes de enviar a próxima (evitar banimento do WhatsApp) sleep(rand(4, 8)); } // Salva JSON atualizado file_put_contents($arquivo, json_encode($clientes, JSON_PRETTY_PRINT)); echo "🚀 Envio automático concluído: " . date('Y-m-d H:i'); ?> ---- mercado_pago_gold.php ---- uniqid(), 'nome' => trim($_POST['nome_pacote']), 'valor' => floatval($_POST['valor_pacote']), 'dias' => intval($_POST['dias_pacote']) ]; $config['pacotes'][] = $novo_pacote; file_put_contents($config_file, json_encode($config, JSON_PRETTY_PRINT)); $msg = "Pacote adicionado com sucesso!"; } if (isset($_POST['delete_pacote'])) { $id_delete = $_POST['id_pacote']; foreach ($config['pacotes'] as $k => $pacote) { if ($pacote['id'] === $id_delete) { unset($config['pacotes'][$k]); } } $config['pacotes'] = array_values($config['pacotes']); file_put_contents($config_file, json_encode($config, JSON_PRETTY_PRINT)); $msg = "Pacote excluído!"; } if (isset($_POST['add_cupom'])) { if (!isset($config['cupons'])) { $config['cupons'] = []; } $novo_cupom = [ 'id' => uniqid(), 'codigo' => strtoupper(trim($_POST['codigo_cupom'])), 'desconto' => floatval($_POST['desconto_cupom']) ]; $config['cupons'][] = $novo_cupom; file_put_contents($config_file, json_encode($config, JSON_PRETTY_PRINT)); $msg = "Cupom adicionado com sucesso!"; } if (isset($_POST['delete_cupom'])) { $id_delete = $_POST['id_cupom']; foreach ($config['cupons'] as $k => $cupom) { if ($cupom['id'] === $id_delete) { unset($config['cupons'][$k]); } } $config['cupons'] = array_values($config['cupons']); file_put_contents($config_file, json_encode($config, JSON_PRETTY_PRINT)); $msg = "Cupom excluído!"; } if (isset($_POST['add_multimac'])) { if (!isset($config['multi_macs'])) { $config['multi_macs'] = []; } $novo_multimac = [ 'id' => uniqid(), 'codigo' => strtoupper(trim($_POST['codigo_multimac'])), 'valor' => floatval($_POST['valor_multimac']), 'dias' => intval($_POST['dias_multimac']), 'macs' => trim($_POST['macs_multimac']) ]; $config['multi_macs'][] = $novo_multimac; file_put_contents($config_file, json_encode($config, JSON_PRETTY_PRINT)); $msg = "Pacote Multi MACs adicionado com sucesso!"; } if (isset($_POST['delete_multimac'... ---- player_api.php ---- ---- test_db.php ---- query("PRAGMA table_info(ibo);"); while ($row = $res->fetchArray()) { echo $row["name"] . "\n"; } ?> ---- tmdb_api.php ---- exec("CREATE TABLE IF NOT EXISTS " . $table_name . " (id INTEGER PRIMARY KEY, key TEXT)"); $rows = $db->query("SELECT COUNT(*) as count FROM " . $table_name); $row = $rows->fetchArray(); $numRows = $row["count"]; if ($numRows == 0) { $db->exec("INSERT INTO " . $table_name . "(key) VALUES('')"); } if ($_SERVER["REQUEST_METHOD"] === "POST") { if (isset($_POST["submit"])) { $newKey = $_POST["key"]; $stmt = $db->prepare("UPDATE " . $table_name . " SET key = :newKey WHERE id = 1"); $stmt->bindValue(":newKey", $newKey, SQLITE3_TEXT); $stmt->execute(); header("Location: tmdb_api.php"); exit; } if (isset($_POST["deleteCache"])) { $cacheFilePath = "./api/cache/combined_cache.json"; if (file_exists($cacheFilePath)) { unlink($cacheFilePath); } header("Location: tmdb_api.php"); exit; } } $res = $db->query("SELECT * FROM " . $table_name . " WHERE id = 1"); $rowU = $res->fetchArray(); if (empty($rowU["key"])) { echo "
\n You must add your tMDB API key before using the app. Follow the instructions below to add your API key.\n
"; } echo "\n
\n
\n \n
\n
\n
\n \n
\n Manual Ads \n \n tMDB Ads \n
\n
\n
Advert Type Selector
\n
\n
\n
\n \n

\n ... ---- whatsapp_api.php ---- 'Instância do WhatsApp não configurada. Conecte pelo painel.']; } // Tratamento de número com DDI 55 $numero = preg_replace('/[^0-9]/', '', (string)$numero); $numero = ltrim($numero, '0'); if (strlen($numero) <= 11) { $numero = '55' . $numero; } // Endpoint de envio de mensagem de texto na Evolution API v2 $url = $baseUrl . '/message/sendText/' . urlencode($instanceName); $ch = curl_init($url); // Payload no formato esperado pela Evolution API v2 $payload = json_encode([ 'number' => $numero, 'options' => [ 'delay' => 1200, 'presence' => 'composing', 'linkPreview' => false ], 'text' => $mensagem ]); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'apikey: ' . $apiKey, 'Content-Type: application/json' ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 8); curl_setopt($ch, CURLOPT_TIMEOUT, 15); // Ignorar verificação de SSL caso mude para HTTPS sem certificado válido curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); $response = curl_exec($ch); $error = curl_error($ch); curl_close($ch); if ($error) return ['error' => $error]; return json_decode($response, true); } ?> ---- whatsapp_api1.php ---- $numero, 'text' => $mensagem ]); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer ' . $apiKey, 'Content-Type: application/json' ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); $response = curl_exec($ch); $error = curl_error($ch); curl_close($ch); if ($error) return ['error' => $error]; return json_decode($response, true); } ?> SUBDIR api: . , .. , .adb.db , .bet_tmdb.db , .db.db , .db_ads.db , .db_bg.db , .db_logo.db , .htaccess , .qr.db , 1msg.php , add.php , ads.php , ads2.php , ads3.php , allads.php , allads1.php , allads2.php , arquivos originais , ativar.php , auth.php , backdrop.php , betstyle.css , bg.php , bloqueado.m3u , cache , cf.php , connection_log.json , contato.php , db , device_keys.json , dump.php , dump.py , edit_texto.php , esporte.php , evolution_api.php , evolution_config.json , getappuser.php , hub_db.php , hub_receiver.php , hub_worker.php , index.php , integracao , key.php , logo.php , m3u_padrao.json , m3u_proxy.php , main_movies.php , manual_ads.php , mercado_pago_gold , message.php , movies.php , movies_script.js , msg.php , music_manifest.json , pagamento.php , pagamento1.php , payment , play_msg.php , playlist.php , qr , qr.php , qrcode.php , renovar , salvar_mensagem.php , setting.php , sport.php , sportjr.php , test_exec.php , theme_change , tmdb.php , tmdb.php00 , update.php , vencido.php , video-ads.php , webview.php , webview2.php , webview3 (1).php , webview3.php , xc_proxy.php ---- api/connection_log.json ---- [ { "mac_address": "0F:EE:F7:F6:55:C4", "date": "2026-08-03 23:51:20", "url_accessed": "https:\/\/admhibrido.cadtech.com.br\/api\/m3u_proxy.php?mac=0F%3AEE%3AF7%3AF6%3A55%3AC4&username=151415&password=495667" }, { "mac_address": "0F:EE:F7:F6:55:C4", "date": "2026-08-03 23:51:20", "url_accessed": "https:\/\/admhibrido.cadtech.com.br\/api\/m3u_proxy.php?mac=0F%3AEE%3AF7%3AF6%3A55%3AC4&username=151415&password=495667" }, { "mac_address": "0F:EE:F7:F6:55:C4", "date": "2026-08-04 21:38:22", "url_accessed": "https:\/\/admhibrido.cadtech.com.br\/api\/m3u_proxy.php?mac=0F%3AEE%3AF7%3AF6%3A55%3AC4&username=6484650&password=2449974" }, { "mac_address": "0F:EE:F7:F6:55:C4", "date": "2026-08-04 21:38:22", "url_accessed": "https:\/\/admhibrido.cadtech.com.br\/api\/m3u_proxy.php?mac=0F%3AEE%3AF7%3AF6%3A55%3AC4&username=151415&password=495667" }, { "mac_address": "0F:EE:F7:F6:55:C4", "date": "2026-08-04 21:38:22", "url_accessed": "https:\/\/admhibrido.cadtech.com.br\/api\/m3u_proxy.php?mac=0F%3AEE%3AF7%3AF6%3A55%3AC4&username=151415&password=495667" }, { "mac_address": "89:DD:F9:48:ED:E8", "date": "2026-08-05 09:49:10", "url_accessed": "https:\/\/admhibrido.cadtech.com.br\/api\/m3u_proxy.php?mac=89%3ADD%3AF9%3A48%3AED%3AE8&username=6484650&password=2449974" }, { "mac_address": "89:DD:F9:48:ED:E8", "date": "2026-08-05 09:49:10", "url_accessed": "https:\/\/admhibrido.cadtech.com.br\/api\/m3u_proxy.php?mac=89%3ADD%3AF9%3A48%3AED%3AE8&username=356365&password=265033" }, { "mac_address": "89:DD:F9:48:ED:E8", "date": "2026-08-05 09:49:10", "url_accessed": "https:\/\/admhibrido.cadtech.com.br\/api\/m3u_proxy.php?mac=89%3ADD%3AF9%3A48%3AED%3AE8&username=356365&password=265033" }, { "mac_address": "89:DD:F9:48:ED:E8", ... ---- api/device_keys.json ---- { "": "d41d8cd9", "C4:AA:19:66:60:0C": "ebfd4cfa", "89:DD:F9:48:ED:E8": "0566b915", "0F:EE:F7:F6:55:C4": "21d841fc", "32:90:49:85:B6:F8": "fe79ac40", "89:AC:DF:5F:B0:A7": "acd9b5f5", "77:C1:81:4B:A0:BF": "cda6b70c", "58:D8:28:3D:33:44": "b7fcb93d" } ---- api/evolution_api.php ---- busyTimeout(5000); // Tabela de Tokens (Projetos permitidos) $db->exec("CREATE TABLE IF NOT EXISTS hub_tokens ( id INTEGER PRIMARY KEY AUTOINCREMENT, project_name TEXT NOT NULL, token TEXT NOT NULL UNIQUE, created_at DATETIME DEFAULT CURRENT_TIMESTAMP )"); // Tabela de Fila de Mensagens $db->exec("CREATE TABLE IF NOT EXISTS hub_queue ( id INTEGER PRIMARY KEY AUTOINCREMENT, token_id INTEGER, phone_number TEXT NOT NULL, message TEXT NOT NULL, status TEXT DEFAULT 'pending', -- pending, processing, sent, failed response TEXT, retries INTEGER DEFAULT 0, created_at DATETIME DEFAULT CURRENT_TIMESTAMP, updated_at DATETIME DEFAULT CURRENT_TIMESTAMP, FOREIGN KEY (token_id) REFERENCES hub_tokens(id) )"); // Garante coluna retries em bancos antigos @$db->exec("ALTER TABLE hub_queue ADD COLUMN retries INTEGER DEFAULT 0"); // Destrava mensagens presas em 'processing' há mais de 3 minutos @$db->exec("UPDATE hub_queue SET status = 'pending', updated_at = CURRENT_TIMESTAMP WHERE status = 'processing' AND datetime(updated_at) <= datetime('now', '-3 minutes')"); // Reenfileira automaticamente mensagens das últimas 24h que falharam apenas por timeout/queda de socket (até 3 tentativas) @$db->exec("UPDATE hub_queue SET status = 'pending', retries = COALESCE(retries, 0) + 1, updated_at = CURRENT_TIMESTAMP WHERE status = 'failed' AND (response LIKE '%cURL Error%' OR response LIKE '%Connection Closed%' OR response LIKE '%timed out%') AND COALESCE(retries, 0) < 3 AND datetime(created_at) >= datetime('now', '-24 hours')"); return $db; } ?> ---- api/key.php ---- ---- api/pagamento.php ---- ADS3

\n\n \n\n\n"; ?> SUBDIR includes: . , .. , .db.db , footer.php , functions.php , header.php , index.php ######## admplay.cadtech.com.br ######## FILES: . , .. , .well-known , 0000 ######## admpremium.cadtech.com.br ######## FILES: . , .. , .git , .gitignore , .htaccess , .user.ini , .well-known , APK , admins.php , all_users.php , api , api.rar , assets , backup_restore , backup_temp.zip , banners , banners_manager.php , bg.php , clientes_vencidos.json , completar_cadastro.php , contato.php , cron_config.json , cron_guard.php , cron_notificacoes.php , dns.php , dump_bot.php , edit_usuario.php , enviar_cobrancas.php , estatisticas.php , evolution_config.json , gerar_vencidos.php , get.php , getappuser_original.php , img_custom , importar_usuarios.php , includes , index.php , logo.php , mercado_pago.php , migrar_dns.php , modelo_importacao.csv , note.php , notificacoes.php , notificacoes_api.php , pagamento_maos.php , player_api.php , proxy_stream.php , qrcode.php , sair.php , sec_logins.json , tema.php , teste.php , users.php , users_create.php , users_teste.php , users_teste_update.php , users_update.php , usuario.php , usuarios.php , vencimento.php , vendor , webtv , whats - copy.json , whats.json , whatsapp_api.php , whatsapp_api1.php , whatsapp_api_status.php , whatsapp_config.php ---- cron_config.json ---- { "token": "e1e15f56db37c3c53021bf3ee9ee5d8f", "domain": "admpremium.cadtech.com.br" } ---- enviar_cobrancas.php ---- busyTimeout(5000); $dbNotif = new SQLite3(__DIR__ . "/api/db/studiolivecode_notificacoes.db"); $dbNotif->busyTimeout(5000); $dbNotif->exec("CREATE TABLE IF NOT EXISTS notificacoes_log (id INTEGER PRIMARY KEY AUTOINCREMENT, mac TEXT, notificacao_id TEXT, data_envio TEXT)"); $whatsFile = __DIR__ . '/whats.json'; $whatsData = file_exists($whatsFile) ? json_decode(file_get_contents($whatsFile), true) : []; if (!is_array($whatsData)) $whatsData = []; $hoje = date('Y-m-d'); $res = $db->query("SELECT * FROM ibo WHERE expire_date < date('now') AND active = 1"); $enviados = 0; $ignorados = 0; while ($row = $res->fetchArray(SQLITE3_ASSOC)) { $mac = $row['mac_address']; if (!isset($whatsData[$mac]) || empty($whatsData[$mac]['whatsapp'])) continue; $numero = preg_replace('/[^0-9]/', '', $whatsData[$mac]['whatsapp']); if (strlen($numero) < 10) continue; if (strlen($numero) <= 11) $numero = '55' . $numero; // Não cobra o mesmo cliente duas vezes no mesmo dia $chk = $dbNotif->prepare("SELECT COUNT(*) FROM notificacoes_log WHERE mac = :mac AND notificacao_id = 'cobranca_manual' AND data_envio = :hoje"); $chk->bindValue(':mac', $mac, SQLITE3_TEXT); $chk->bindValue(':hoje', $hoje, SQLITE3_TEXT); if ((int)$chk->execute()->fetchArray()[0] > 0) { $ignorados++; continue; } $nome = !empty($row['title']) ? $row['title'] : $row['username']; $mensagem = "Olá " . $nome . ",\nSua assinatura venceu. Por favor, renove para continuar usando nosso serviço."; $ret = sendWhatsAppMessage($numero, $mensagem); if ($ret && isset($ret['status']) && $ret['status'] === 'success') { $enviados++; $ins = $dbNotif->prepare("INSERT INTO notificacoes_log (mac, notificacao_id, data_envio) VALUES (:mac, 'cobranca_manual', :hoje)"); $ins->bindValue(':mac', $mac, SQLITE3_TEXT); $ins->bindValue(':hoje', $hoje, SQLITE3_TEXT); $ins->execute(); // Previne banimento variando o tempo entre 4 a 8 segundos sleep(rand(4, 8)); } } $db->close(); $dbNotif->close(); header('Content-Type: application/json'); echo json_encode(['status' => 'success', 'enviados' => $enviados, 'ignorados_ja_cobrados_hoje' => $ignorados]); ?> ---- evolution_config.json ---- { "evolution_url": "https:\/\/admhibrido.cadtech.com.br", "global_apikey": "HUB_6A60FC9971FF61d9cabab", "instance_name": "HUB Hibrido" } ---- mercado_pago.php ----
Mercado Pago Gold Avançado
Configuração Mercado Pago Gold
Gerenciar Cupons
... ---- notificacoes_api.php ---- 'error', 'message' => 'Não autorizado.']); exit; } $dbFile = __DIR__ . "/api/db/studiolivecode_notificacoes.db"; // Inicializa banco e tabela se não existir $db = new SQLite3($dbFile); $db->exec("CREATE TABLE IF NOT EXISTS notificacoes ( id TEXT PRIMARY KEY, nome TEXT, tipo TEXT, horario TEXT, dias INTEGER, mensagem TEXT, ativo INTEGER )"); $db->exec("CREATE TABLE IF NOT EXISTS notificacoes_log ( id INTEGER PRIMARY KEY AUTOINCREMENT, mac TEXT, notificacao_id TEXT, data_envio TEXT )"); // Popula dados padrão se tabela estiver vazia $res = $db->querySingle("SELECT COUNT(*) as count FROM notificacoes"); if ($res == 0) { $defaults = [ ['boas_vindas', 'Boas-Vindas', 'imediato', '', 0, "🎉 *SEJA BEM-VINDO(A)!*\n\nOlá *#NOME#*, seu cadastro foi ativado com sucesso! 🚀\n\n📱 *Seu MAC:* `#MAC#`\n\n⚡ Para renovar depois, acesse:\n#LINK_RENOVACAO#\n\nBom entretenimento! ✨", 1], ['comprovante', 'Confirmação de Pagamento', 'imediato', '', 0, "Olá *#NOME#*! 🥳\n\nSeu pagamento foi confirmado com sucesso!\nSua assinatura foi renovada até *#VENCIMENTO#*.\n\nSeu MAC: *#MAC#*", 1], ['aviso_5_dias', 'Lembrete (5 Dias Antes)', 'agendado', '10:00', 5, "Olá *#NOME#*! ⚠️\n\nPassando para lembrar que sua assinatura vence em *5 dias* (#VENCIMENTO#).\n\nPara não ficar sem acesso, renove via PIX no link:\n#LINK_RENOVACAO#", 0], ['aviso_3_dias', 'Lembrete (3 Dias Antes)', 'agendado', '10:00', 3, "Olá *#NOME#*! ⚠️\n\nPassando para lembrar que sua assinatura vence em *3 dias* (#VENCIMENTO#).\n\nRenove via PIX no link:\n#LINK_RENOVACAO#", 0], ['vencimento_hoje', 'Vencimento Hoje', 'agendado', '09:00', 0, "Bom dia, *#NOME#*! 🚨\n\nSua assinatura vence *HOJE* (#VENCIMENTO#)!\n\nGaranta que você não perca acesso ao seu conteúdo renovando agora mesmo via PIX automático:\n\n#LINK_RENOVACAO#", 1], ['bloqueio', 'Aviso de Bloqueio', 'agendado', '11:00', -1, "Olá *#NOME#* 🛑\n\nInformamos que o seu acesso foi suspenso por falta de pagamento (venceu em #VENCIMENTO#).\n\nMas não se preocupe! Você pode reativar instantaneamente pagando via PIX no link abaixo:\n\n#LINK_RENOVACAO#", 0] ]; $stmt = $db->prepare("INSERT INTO notificacoes (id, nome, tipo, horario, dias, mensagem, ativo) VALUES (:id, :nome, :tipo, :horario, :dias, :mensagem, :ativo)"); foreach ($defaults as $d) { $stmt->bindValue(':id', $d[0], SQLITE3_TEXT); $stmt->bindValue(':nome', $d[1], SQLITE3_TEXT); $stmt->bindValue(':tipo', $d[2], SQLITE3_TEXT); $stmt->bindValue(':horario', $d[3], SQLITE3_TEXT); $stmt->bindValue(':dias', $d[4], SQLITE3_INTEGER); $stmt->bindValue(':mensagem', $d[5], SQLITE3_TEXT); $stmt->bindValue(':ativo', $d[6], SQLITE3_INTEGER); $stmt->execute(); } ... ---- pagamento_maos.php ---- ]+/i', $link_colado, $urlMatch)) { $url_to_parse = $urlMatch[0]; } if (!empty($url_to_parse)) { $query = parse_url($url_to_parse, PHP_URL_QUERY); parse_str((string)$query, $params); $mac_address = $params['mac'] ?? ''; $telefone = $params['telefone'] ?? ''; $input_val = !empty($telefone) ? $telefone : $mac_address; } else { $input_val = $link_colado; } $input_val = strtoupper(trim($input_val)); if (empty($input_val)) { $msg_erro = 'Entrada inválida. Não foi possível extrair MAC ou telefone.'; } else { $configPath = __DIR__ . '/api/renovar/config.json'; $config = file_exists($configPath) ? json_decode(file_get_contents($configPath), true) : []; $whatsFile = __DIR__ . '/whats.json'; $whatsData = file_exists($whatsFile) ? json_decode(file_get_contents($whatsFile), true) : []; if (!is_array($whatsData)) $whatsData = []; $clean_input = preg_replace('/[^0-9]/', '', $input_val); $input_phone_core = normalizePhoneCore($input_val); // Prepara variações de MAC caso tenha digitado sem dois-pontos $mac_variations = [$input_val]; $clean_mac = preg_replace('/[^A-Z0-9]/', '', $input_val); if (strlen($clean_mac) === 12 && preg_match('/^[A-F0-9]{12}$/', $clean_mac)) { $mac_variations[] = implode(':', str_split($clean_mac, 2)); } $is_multimac = false; $multimac_m = null; if (isset($config['multimacs']) && is_array($config['multimacs'])) { foreach ($config['multimacs'] as $m) { $match = false; // 1. Verifica se bate com o código (WhatsApp do revendedor/pacote) com ou sem o 9º dígito / +55 $codigo_m = strtoupper(trim((string)($m['codigo'] ?? ''))); if ($codigo_m !== '' && ($codigo_m === $input_val || phonesMatch($codigo_m, $input_val))) { $match = true; } // 2. Verifica se o input bate com algum MAC dentro do pacote (ou com o WhatsApp de algum MAC do pacote) if (!$match && isset($m['macs']) && is_array($m['macs'])) { foreach ($m['macs'] as $pacote_mac) { $pacote_mac_upper = strtoupper(trim($pacote_mac)); foreach ($mac_variations as $m_try) { if ($pacote_mac_upper === $m_try) {... ---- player_api.php ---- $cred) { if ($cred['username'] === $user && $cred['password'] === $pass) { $userId = $id; break; } } if (!$userId) { echo json_encode(['user_info' => ['auth' => 0]]); exit; } $db = new SQLite3(__DIR__ . "/api/db/studiolivecode_clientes.db"); $db->busyTimeout(5000); $stmt = $db->prepare("SELECT * FROM ibo WHERE id = :id AND active = 1"); $stmt->bindValue(':id', $userId, SQLITE3_INTEGER); $res = $stmt->execute(); $cliente = $res->fetchArray(SQLITE3_ASSOC); if ($cliente) { $now = date('Y-m-d H:i:s'); @$db->exec("UPDATE ibo SET last_login = '$now' WHERE id = " . $cliente['id']); } $db->close(); if (!$cliente) { echo json_encode(['user_info' => ['auth' => 0, 'status' => 'Expired']]); exit; } // Verifica vencimento $hoje = date('Y-m-d'); if ($cliente['expire_date'] < $hoje) { echo json_encode(['user_info' => ['auth' => 0, 'status' => 'Expired']]); exit; } // Dados originais $origDns = rtrim($cliente['dns'], '/'); $origUser = $cliente['username']; $origPass = $cliente['password']; // Prepara requisição para o servidor original $url = $origDns . "/player_api.php?username=" . urlencode($origUser) . "&password=" . urlencode($origPass); // Repassa todos os outros parametros GET foreach ($_GET as $k => $v) { if (!in_array($k, ['username', 'password'])) { $url .= "&" . urlencode($k) . "=" . urlencode($v); } } $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); // Desabilita verificação SSL para servidores iptv não seguros curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); $response = curl_exec($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); // Aqui precisamos substituir as URLs do servidor original pelo NOSSO DNS se houver base_url ou server_info if ($action === '' || empty($action)) { // Autenticação (retorna server_info) $json = json_decode($response, true); if ($json && isset($json['server_info'])) { $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? "https://" : "http://"; $host = $_SERVER['HTTP_HOST']; $myUrl = $protocol . $host; $json['server_info']['url'] = $host; $json['server_info']['port'] = $_SERVER['SERVER_PORT']; $json['server_info']['https_port'] = "443"; $json['server_info']['server_protocol'] = $protocol === 'https://' ? 'https' :... ---- whatsapp_api.php ---- "5581005918" * Ex: "55981005918" -> "5581005918" * Ex: "5555981005918" -> "5581005918" */ function normalizePhoneCore($raw) { $d = ltrim(preg_replace('/[^0-9]/', '', (string)$raw), '0'); if (strlen($d) < 8) { return ''; } // Se tem 12 ou 13 dígitos e começa com DDI 55 (Brasil), remove o DDI 55 if ((strlen($d) === 12 || strlen($d) === 13) && substr($d, 0, 2) === '55') { $d = substr($d, 2); } // Se ficou com 11 dígitos (DDD + 9 + 8 dígitos), remove o 9º dígito para unificar a comparação if (strlen($d) === 11 && $d[2] === '9') { return substr($d, 0, 2) . substr($d, 3); } if (strlen($d) === 10) { return $d; } if (strlen($d) > 10) { return substr($d, 0, 2) . substr($d, -8); } return $d; } /** * Retorna todas as variações possíveis de um telefone (10, 11, 12 e 13 dígitos) */ function getPhoneVariations($raw) { $core = normalizePhoneCore($raw); if (strlen($core) !== 10) { $clean = ltrim(preg_replace('/[^0-9]/', '', (string)$raw), '0'); return $clean !== '' ? [$clean] : []; } $ddd = substr($core, 0, 2); $num8 = substr($core, 2); $sem9 = $ddd . $num8; // 10 dígitos: 5581005918 $com9 = $ddd . '9' . $num8; // 11 dígitos: 55981005918 return [ $sem9, $com9, '55' . $sem9, // 12 dígitos: 555581005918 '55' . $com9 // 13 dígitos: 5555981005918 ]; } /** * Compara dois telefones ignorando formatação, DDI +55 e presença/ausência do 9º dígito. */ function phonesMatch($phoneA, $phoneB) { $coreA = normalizePhoneCore($phoneA); $coreB = normalizePhoneCore($phoneB); if (strlen($coreA) < 10 || strlen($coreB) < 10) { return false; } return $coreA === $coreB; } /** * Localiza todos os telefones associados a um MAC (ou código MultiMAC), * buscando no whats.json, no config.json (multimacs) e usando fallback se fornecido. */ function findPhonesForMac($mac, $fallbackPhone = '') { $macUpper = strtoupper(trim((string)$mac)); $whatsFile = __DIR__ . '/whats.json'; $configFile = __DIR__ . '/api/renovar/config.json'; $whatsData = file_exists($whatsFile) ? json_decode(file_get_contents($whats... ---- whatsapp_api1.php ---- $numero, 'text' => $mensagem ]); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer ' . $apiKey, 'Content-Type: application/json' ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); $response = curl_exec($ch); $error = curl_error($ch); curl_close($ch); if ($error) return ['error' => $error]; return json_decode($response, true); } ?> ---- whatsapp_api_status.php ---- 'error', 'message' => 'Configuração não encontrada']); exit; } $config = json_decode(file_get_contents($configFile), true); $url = rtrim($config['evolution_url'], '/'); if (strpos($url, 'hub_receiver.php') === false) { $url .= '/api/hub_receiver.php'; } $apikey = trim($config['global_apikey']); if (empty($url) || empty($apikey)) { echo json_encode(['status' => 'error', 'message' => 'Credenciais incompletas']); exit; } if ($action === 'status') { $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(['action' => 'test'])); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Content-Type: application/json', 'Authorization: Bearer ' . $apikey ]); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); $res = curl_exec($ch); $code = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); $body = json_decode($res, true); if ($code >= 200 && $code < 300 && isset($body['success'])) { echo json_encode(['status' => 'success', 'state' => 'open']); // Fake open state pro frontend } else { echo json_encode(['status' => 'error', 'message' => 'Falha ao conectar no HUB.', 'raw' => $body]); } exit; } echo json_encode(['status' => 'error', 'message' => 'Ação não suportada via Hub.']); exit; ?> ---- whatsapp_config.php ---- '', 'global_apikey' => '', 'instance_name' => '' ]; } if (isset($_POST["submit"])) { $config['evolution_url'] = rtrim(trim($_POST["evolution_url"]), '/'); $config['global_apikey'] = trim($_POST["global_apikey"]); $config['instance_name'] = trim($_POST["instance_name"]); file_put_contents($jsonFile, json_encode($config, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)); $msg = "Configurações do WhatsApp salvas com sucesso!"; } ?> Configurações WhatsApp

Integração WhatsApp API

$msg
"; ?> Ativar / Renovar

✅Renove AGORA!

QR Code
SUBDIR includes: . , .. , footer.php , header.php , index.php ######## admsky.cadtech.com.br ######## FILES: . , .. , .user.ini , .well-known , all_users.php , announcement.php , api , app.php , appads.php , css , error_log , img , includes , index.php , interface.php , intro.php , js , language.php , logo.php , logout.php , maintenance.php , message.php , parental_reset.php , player.php , sports.php , theme.php , tmdb.php , tmdb_api.php , update.php , user_update.php , vpn.php ---- tmdb.php ---- exec("CREATE TABLE IF NOT EXISTS " . $table_name . " (id INTEGER PRIMARY KEY, key TEXT)"); $rows = $db->query("SELECT COUNT(*) as count FROM " . $table_name); $row = $rows->fetchArray(); $numRows = $row["count"]; if ($numRows == 0) { $db->exec("INSERT INTO " . $table_name . "(key) VALUES('')"); } if ($_SERVER["REQUEST_METHOD"] === "POST") { if (isset($_POST["submit"])) { $newKey = $_POST["key"]; // No validation/sanitization here for demonstration purposes // Use prepared statements to prevent SQL injection $stmt = $db->prepare("UPDATE " . $table_name . " SET key = :newKey WHERE id = 1"); $stmt->bindValue(':newKey', $newKey, SQLITE3_TEXT); $stmt->execute(); } elseif (isset($_POST["deleteCache"])) { // Specify the path to your JSON cache file $cacheFilePath = "./api/cache/combined_cache.json"; // Check if the cache file exists and delete it if (file_exists($cacheFilePath)) { unlink($cacheFilePath); // Delete the cache file } } } $res = $db->query("SELECT * FROM " . $table_name . " WHERE id = 1"); $rowU = $res->fetchArray(); if (empty($rowU['key'])) { echo ''; } ?>

Get Your TMDB API Key

To use this application, you need to have a TMDB API key. Follow these steps to obtain your API key:

  1. Visit the TMDB website at https://www.themoviedb.org/
  2. Sign in or create an account if you don't have one.
  3. To register for an API key, click... ---- tmdb_api.php ---- exec("CREATE TABLE IF NOT EXISTS " . $table_name . " (id INTEGER PRIMARY KEY, key TEXT, language TEXT)"); $rows = $db->query("SELECT COUNT(*) as count FROM " . $table_name); $row = $rows->fetchArray(); $numRows = $row["count"]; if ($numRows == 0) { $db->exec("INSERT INTO " . $table_name . "(key, language) VALUES('', 'en-US')"); } if ($_SERVER["REQUEST_METHOD"] === "POST") { echo "Form submitted"; // Add this line to confirm form submission if (isset($_POST["submit"])) { $newKey = $_POST["key"]; // No validation/sanitization here for demonstration purposes $language = $_POST["language"]; // Use prepared statements to prevent SQL injection $stmt = $db->prepare("UPDATE " . $table_name . " SET key = :newKey, language = :language WHERE id = 1"); $stmt->bindValue(':newKey', $newKey, SQLITE3_TEXT); $stmt->bindValue(':language', $language, SQLITE3_TEXT); $stmt->execute(); header("Location: tmdb_api.php"); exit(); } elseif (isset($_POST["deleteCache"])) { // Specify the path to your JSON cache file $cacheFilePath = "./api/cache/combined_cache.json"; // Check if the cache file exists and delete it if (file_exists($cacheFilePath)) { unlink($cacheFilePath); // Delete the cache file } // Redirect and exit header("Location: tmdb_api.php"); exit(); } } $res = $db->query("SELECT * FROM " . $table_name . " WHERE id = 1"); $rowU = $res->fetchArray(); if (empty($rowU['key'])) { echo ''; } ?>

    Get Your tMDB API Key

    To use this application, you need to have a tMDB API key. Follow these steps to obtain your API key:

    1. Visit the tMDB website at https://www.themoviedb.org/
    2. Sign in or create an account if you don't h... SUBDIR api: . , .. , .bet_tmdb.db , .db.db , ApiIPTV.php , CloudBackup.php , backdrop.php , backdropFilmes .php , betstyle.css , cache , connv2.json , error_log , index.php , main.json , movies.php , movies_script.js , sports.db , sports.php , user_logs.db , user_message.db ---- api/ApiIPTV.php ---- exec("CREATE TABLE IF NOT EXISTS BACKUP(id INTEGER PRIMARY KEY ,user TEXT, pass TEXT, resetcode TEXT, backup TEXT)"); $backedup = '{ "tag":"CloudBackup", "success":"1", "api_ver":"1.0v", "version":"1.0", "msg":"Your backup has been completed successfully" }'; $badpass = '{ "tag":"CloudBackup", "success":"0", "api_ver":"1.0v", "version":"1.0", "msg":"Backup Password is incorrect. Please check your password and try again. Code: BPE" }'; $nouser = '{"tag":"CloudBackup","success":"0","api_ver":"1.0v","version":"1.0","msg":"Your Cloud Backup has been failed. Please try again or contact support. Code: JE"}'; $bupres = $bupdb->query("SELECT * FROM BACKUP WHERE user='".$UserID."'"); while($buprow=$bupres->fetchArray()) { $dbuser = $buprow['user']; $dbpass = $buprow['pass']; $dbresetcode = $buprow['resetcode']; $dbbackup = $buprow['backup']; } if(isset($resetcode)) { if(@$dbuser !== $UserID) { $bupdb->exec("INSERT INTO BACKUP (user, pass, resetcode, backup) VALUES('".$UserID."', '".$Pass."', '".$resetcode."', '".$backup."') "); echo $backedup; }else if (@$dbuser == $UserID) { $bupdb->exec("UPDATE BACKUP SET backup='".$backup."' WHERE user='".$UserID."'"); echo $backedup; }else { echo $nouser; } } if($resetcode == '') { if ($Pass == @$dbpass) { echo ' { "tag":"CloudBackup", "success":"1", "api_ver":"1.0v", "backup":"'.@$dbbackup.'", "msg":"Backup has been downloaded successfully" }'; }else{ echo $badpass; } } else { echo $nouser; } ---- api/connv2.json ---- { "tag": "connv2", "success": "0", "api_ver": "1.0v", "message": "Example Message", "msgid": "1646", "msg_status": "ACTIVE", "msg_expire": "2024-10-17 01:00:59", "announcement": "Example Announcement", "ann_status": "INACTIVE", "ann_expire": "2024-04-30 14:55:59", "ann_interval": "2", "ann_disappear": "1" } SUBDIR includes: . , .. , ad_type.json , footer.php , function.php , header.php , index.php ######## only.cadtech.com.br ######## FILES: . , .. , .user.ini , .well-known , APK , all_users.php , announcement.php , api , app.php , appads.php , css , error_log , img , includes , index.php , interface.php , intro.php , js , language.php , logo.php , logout.php , maintenance.php , message.php , only.cadtech.com.br , parental_reset.php , player.php , sports.php , theme.php , tmdb.php , tmdb_api.php , update.php , user_update.php , vpn.php ---- tmdb.php ---- exec("CREATE TABLE IF NOT EXISTS " . $table_name . " (id INTEGER PRIMARY KEY, key TEXT)"); $rows = $db->query("SELECT COUNT(*) as count FROM " . $table_name); $row = $rows->fetchArray(); $numRows = $row["count"]; if ($numRows == 0) { $db->exec("INSERT INTO " . $table_name . "(key) VALUES('')"); } if ($_SERVER["REQUEST_METHOD"] === "POST") { if (isset($_POST["submit"])) { $newKey = $_POST["key"]; // No validation/sanitization here for demonstration purposes // Use prepared statements to prevent SQL injection $stmt = $db->prepare("UPDATE " . $table_name . " SET key = :newKey WHERE id = 1"); $stmt->bindValue(':newKey', $newKey, SQLITE3_TEXT); $stmt->execute(); } elseif (isset($_POST["deleteCache"])) { // Specify the path to your JSON cache file $cacheFilePath = "./api/cache/combined_cache.json"; // Check if the cache file exists and delete it if (file_exists($cacheFilePath)) { unlink($cacheFilePath); // Delete the cache file } } } $res = $db->query("SELECT * FROM " . $table_name . " WHERE id = 1"); $rowU = $res->fetchArray(); if (empty($rowU['key'])) { echo ''; } ?>

      Get Your TMDB API Key

      To use this application, you need to have a TMDB API key. Follow these steps to obtain your API key:

      1. Visit the TMDB website at https://www.themoviedb.org/
      2. Sign in or create an account if you don't have one.
      3. To register for an API key, click... ---- tmdb_api.php ---- exec("CREATE TABLE IF NOT EXISTS " . $table_name . " (id INTEGER PRIMARY KEY, key TEXT, language TEXT)"); $rows = $db->query("SELECT COUNT(*) as count FROM " . $table_name); $row = $rows->fetchArray(); $numRows = $row["count"]; if ($numRows == 0) { $db->exec("INSERT INTO " . $table_name . "(key, language) VALUES('', 'en-US')"); } if ($_SERVER["REQUEST_METHOD"] === "POST") { echo "Form submitted"; // Add this line to confirm form submission if (isset($_POST["submit"])) { $newKey = $_POST["key"]; // No validation/sanitization here for demonstration purposes $language = $_POST["language"]; // Use prepared statements to prevent SQL injection $stmt = $db->prepare("UPDATE " . $table_name . " SET key = :newKey, language = :language WHERE id = 1"); $stmt->bindValue(':newKey', $newKey, SQLITE3_TEXT); $stmt->bindValue(':language', $language, SQLITE3_TEXT); $stmt->execute(); header("Location: tmdb_api.php"); exit(); } elseif (isset($_POST["deleteCache"])) { // Specify the path to your JSON cache file $cacheFilePath = "./api/cache/combined_cache.json"; // Check if the cache file exists and delete it if (file_exists($cacheFilePath)) { unlink($cacheFilePath); // Delete the cache file } // Redirect and exit header("Location: tmdb_api.php"); exit(); } } $res = $db->query("SELECT * FROM " . $table_name . " WHERE id = 1"); $rowU = $res->fetchArray(); if (empty($rowU['key'])) { echo ''; } ?>

        Get Your tMDB API Key

        To use this application, you need to have a tMDB API key. Follow these steps to obtain your API key:

        1. Visit the tMDB website at https://www.themoviedb.org/
        2. Sign in or create an account if you don't h... SUBDIR api: . , .. , .bet_tmdb.db , .db.db , ApiIPTV.php , CloudBackup.php , backdrop.php , betstyle.css , cache , connv2.json , error_log , index.php , logo.png , main.json , sports.db , sports.php , user_logs.db , user_message.db ---- api/ApiIPTV.php ---- exec("CREATE TABLE IF NOT EXISTS BACKUP(id INTEGER PRIMARY KEY ,user TEXT, pass TEXT, resetcode TEXT, backup TEXT)"); $backedup = '{ "tag":"CloudBackup", "success":"1", "api_ver":"1.0v", "version":"1.0", "msg":"Your backup has been completed successfully" }'; $badpass = '{ "tag":"CloudBackup", "success":"0", "api_ver":"1.0v", "version":"1.0", "msg":"Backup Password is incorrect. Please check your password and try again. Code: BPE" }'; $nouser = '{"tag":"CloudBackup","success":"0","api_ver":"1.0v","version":"1.0","msg":"Your Cloud Backup has been failed. Please try again or contact support. Code: JE"}'; $bupres = $bupdb->query("SELECT * FROM BACKUP WHERE user='".$UserID."'"); while($buprow=$bupres->fetchArray()) { $dbuser = $buprow['user']; $dbpass = $buprow['pass']; $dbresetcode = $buprow['resetcode']; $dbbackup = $buprow['backup']; } if(isset($resetcode)) { if(@$dbuser !== $UserID) { $bupdb->exec("INSERT INTO BACKUP (user, pass, resetcode, backup) VALUES('".$UserID."', '".$Pass."', '".$resetcode."', '".$backup."') "); echo $backedup; }else if (@$dbuser == $UserID) { $bupdb->exec("UPDATE BACKUP SET backup='".$backup."' WHERE user='".$UserID."'"); echo $backedup; }else { echo $nouser; } } if($resetcode == '') { if ($Pass == @$dbpass) { echo ' { "tag":"CloudBackup", "success":"1", "api_ver":"1.0v", "backup":"'.@$dbbackup.'", "msg":"Backup has been downloaded successfully" }'; }else{ echo $badpass; } } else { echo $nouser; } ---- api/connv2.json ---- { "tag": "connv2", "success": "0", "api_ver": "1.0v", "message": "Example Message", "msgid": "1646", "msg_status": "ACTIVE", "msg_expire": "2024-10-17 01:00:59", "announcement": "Example Announcement", "ann_status": "INACTIVE", "ann_expire": "2024-04-30 14:55:59", "ann_interval": "2", "ann_disappear": "1" } SUBDIR includes: . , .. , ad_type.json , footer.php , function.php , header.php , index.php ######## you.cadtech.com.br ######## FILES: . , .. , .db.db , .user.ini , .well-known , APK , api , clients.php , clients1.php , config.ini , control.json , control.php , css , dns_settings.php , img , includes , index.php , index1.php , instrução.txt , js , main.php , main1.php , main2.php , main3.php , resellers.php , settings.php , testes.php , trial , user.php ---- config.ini ---- [Show] debug = true [titles] panel_name = "ADMPro" brand_name = "ADMPro" contact = "https://flix-play.com/apks" ---- dns_settings.php ---- select($table_name, '*', '', ''); // Actualizar DNS @$resU = $db->select($table_name, '*', 'id = :id', '', [':id' => $_GET['update']]); if (isset($_POST['submitU'])) { unset($_POST['submitU']); $updateData = $_POST; $db->update($table_name, $updateData, 'id = :id', [':id' => $_GET['update']]); echo ""; } // Crear nuevo DNS if (isset($_POST['submit'])) { unset($_POST['submit']); $db->insert($table_name, $_POST); $db->close(); echo ""; } // Eliminar DNS if (isset($_GET['delete'])) { $db->delete($table_name, 'id = :id', [':id' => $_GET['delete']]); echo ""; } ?>

          Adicionar Novo DNS

          Voltar
          alert('Configuração salva com sucesso'); window.location.href='" . $page . "'"; } // Recargar valores después de guardar $panel_name = getPanelConfig($db, 'panel_name', 'Painel Criador de Contas'); $panel_contact = getPanelConfig($db, 'panel_contact', 'Contate o administrador'); $panel_logo = getPanelConfig($db, 'panel_logo', './img/login_logo.png'); $app_link = getPanelConfig($db, 'app_link', ''); $downloader_code = getPanelConfig($db, 'downloader_code', ''); ?>

          Configuração do Painel

          ... SUBDIR api: . , .. , .db.db , .htaccess , a.php , dns.php , player_api.php , qr.php , renovar_2 , renovar_2.rar , renovar_revenda , test.php , test_users.php , venc_rev.json ---- api/player_api.php ---- select('menualuser', '*', 'username = :username', '', [':username' => $_GET['username']]); // Check user authentication status and generate response if (paneluser($ret)) { // Check device control (fingerprint verification) $deviceCheck = checkDeviceControl($_GET['username'], $_GET['password']); if ($deviceCheck === true) { outecho(1); // User authenticated and device allowed } else { outecho(3, $deviceCheck); // Device blocked with message } } else { outecho(2); // Authentication failed } function paneluser($dbdata) { // Check if user data exists if (!$dbdata || empty($dbdata)) { return false; // User not found } // Extract user information $expired = null; $id = $dbdata[0]['id']; $title = $dbdata[0]['title']; $username = $dbdata[0]['username']; $password = $dbdata[0]['password']; $expired = $dbdata[0]['expire_date']; // Corrige formato dd/mm/yyyy para d-m-Y para o strtotime entender corretamente $expired_time = strtotime(str_replace('/', '-', @$expired)); $expiredT = (time() > $expired_time); if ($expiredT) { $expired = 0; } else { $expired = 1; } // Check username, password, and expiration date if (isset($_GET['password']) && $_GET['username'] == $username && $_GET['password'] == $password && $expired >= 1) { return true; // User authenticated successfully }... SUBDIR includes: . , .. , db.php , footer.php , functions.php , header.php , index.php , table.php ---- includes/db.php ---- config = json_decode(file_get_contents('config.json'), true); // Se o usuário já estiver logado, recupera o DNS que funcionou para ele if (isset($_SESSION['dns'])) { $this->dns = $_SESSION['dns']; } $this->creds = $_SESSION['credentials'] ?? []; } /** * Sistema de Login Inteligente (Multi-DNS) * Tenta logar em cada DNS cadastrado sequencialmente. */ public function login($user, $pass) { // Monta lista de servidores disponíveis $servers = []; if (!empty($this->config['dns_1'])) $servers[] = rtrim($this->config['dns_1'], '/'); if (!empty($this->config['dns_2'])) $servers[] = rtrim($this->config['dns_2'], '/'); if (!empty($this->config['dns_3'])) $servers[] = rtrim($this->config['dns_3'], '/'); // Fallback para versões antigas (caso use 'dns_url') if (!empty($this->config['dns_url']) && empty($servers)) { $servers[] = rtrim($this->config['dns_url'], '/'); } // Loop para testar cada servidor foreach ($servers as $server) { $url = "{$server}/player_api.php?username={$user}&password={$pass}"; // Usa timeout curto (3s) para não travar se um servidor estiver offline $response = $this->request($url, true); if (isset($response['user_info']['auth']) && $response['user_info']['auth'] == 1) { // SUCESSO! Encontramos o servidor correto $_SESSION['user_data'] = $response; $_SESSION['credentials'] = ['username' => $user, 'password' => $pass]; $_SESSION['dns'] = $server; // Salva QUAL servidor funcionou $this->dns = $server; // Define na classe atual return true; } } // Se o loop terminar e não retornar true, falhou em todos return false; } // Pega EPG Curto (Programa Atual) public function getShortEpg($stream_id) { // limit=1 pega apenas o programa atual return $this->get('get_short_epg', ['stream_id' => $stream_id, 'limit' => 1]); } // --- MÉTODOS DE CONTEÚDO --- // Pega detalhes de um Filme public function getVodInfo($vod_id) { return $this->get('get_vod_info', ['vod_id' => $vod_id]); } // --- LIVE TV --- public function getLiveCategories() { return $this->get('get_live_categories'); } public function getLiveStreams($cat_id = null) { return $this->get('get_live_streams', ['category_id' => $cat_id]); } // --- FILMES (VOD) --- public function getVodCategories() { return $this->get('get_vod_categories'); } public functio... ---- config.json ---- {"dns_1":"https:\/\/admpremium.cadtech.com.br","dns_2":"http:\/\/sky.tech6202.shop","dns_3":"http:\/\/ded11.com"} ######## onix.tech6202.shop ######## FILES: . , .. , .htaccess , .user.ini , .well-known , api , backup.php , backups , canais.php , categorias.php , categories , clientes.php , config_pix.php , css , dashboard.php , filmes.php , get.php , img , index.php , index1.php , js , menu.php , menu1.php , panel_api.php , planos.php , player_api.php , processar-tmdb.php , public , redirecionar-live.php , redirecionar-series.php , redirecionar-vod.php , renova_mp , revendedores.php , separar_categorias.php , serie.php , setup_db.php , ssiptv.php , testes-auto.php , testes.php , trial , uploud.php , xmltv , xmltv.php ---- config_pix.php ---- '', 'planos' => [] ]; if (file_exists($configFile)) { $config = json_decode(file_get_contents($configFile), true); } // Processa salvamento do Token (ANTES de qualquer output) if (isset($_POST['save_token'])) { $config['access_token'] = $_POST['access_token']; file_put_contents($configFile, json_encode($config, JSON_PRETTY_PRINT)); header("Location: " . $_SERVER['REQUEST_URI'] . (strpos($_SERVER['REQUEST_URI'], '?') === false ? '?' : '&') . "msg=" . urlencode("Token salvo com sucesso!")); exit; } // Processa adição de Plano (ANTES de qualquer output) if (isset($_POST['add_plan'])) { $novo_plano = [ 'id' => uniqid(), 'nome' => $_POST['nome'], 'valor' => (float) $_POST['valor'], 'dias' => (int) $_POST['dias'] ]; $config['planos'][] = $novo_plano; file_put_contents($configFile, json_encode($config, JSON_PRETTY_PRINT)); header("Location: " . strtok($_SERVER['REQUEST_URI'], '?') . "?msg=" . urlencode("Plano adicionado com sucesso!")); exit; } // Processa exclusão de Plano (ANTES de qualquer output) if (isset($_GET['del'])) { $id_del = $_GET['del']; $config['planos'] = array_values(array_filter($config['planos'], function ($p) use ($id_del) { return $p['id'] !== $id_del; })); file_put_contents($configFile, json_encode($config, JSON_PRETTY_PRINT)); header("Location: " . strtok($_SERVER['REQUEST_URI'], '?') . "?msg=" . urlencode("Plano removido com sucesso!")); exit; } $msg = $_GET['msg'] ?? null; // URL do portal do cliente $protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http"; $universal_url = $protocol . "://" . $_SERVER['HTTP_HOST'] . "/renova_mp/consulta_user.php"; // Inclui o menu do projeto (já contém session_start, autenticação, etc.) require_once('menu.php'); ?>
          1. Credenciais da API

          ... ---- config_whatsapp_mensagens.php ---- window.location.href = 'index.php';"; exit; } ?>
CódigoDescontoAção
Tipo Dias Hora Envio Automático Mensagem Ações