This commit is contained in:
salam committed 2026-01-28 10:12:21 +01:00
1 parent 320079c2a1
commit 99b657eb3a
12 files changed
+137 -187

No files matched your search

@@ -54,7 +54,7 @@ class Fixtures
if (now()->between(today(), today()->addHour())) {
Nuh::$options['days_to'] = 2;
} else {
Nuh::$options['days_to'] = 2;
Nuh::$options['days_to'] = 1;
}
} elseif ($week) {
Nuh::$options['days_from'] = 0;
+3 -3
View File
@@ -7,7 +7,7 @@ use App\Console\Commands\Services\Tasks\DBMapper;
use App\Console\Commands\Services\Tasks\GenerateAlarms;
use App\Console\Commands\Services\Tasks\GenerateSetting;
use App\Console\Commands\Services\Tasks\MarketsList;
use App\Console\Commands\Services\Tasks\MarketsState;
use App\Console\Commands\Services\Tasks\TxoddsFlags;
class Services
{
@@ -17,8 +17,8 @@ class Services
case 'Txodds Markets':
MarketsList::call();
break;
case 'Txodds Offerstatus':
MarketsState::call();
case 'Txodds Flags':
TxoddsFlags::call();
break;
case 'DB Mapper':
DBMapper::run();
@@ -8,8 +8,11 @@ class AlarmLoadOdds
{
public static function get($event_id, $table, $oddnames)
{
$res = DB::table($table)->where('flags', 1)->where('event_id', $event_id)->get();
if (in_array($table, ['odds_points', 'odds_points_ht', 'odds_points_q1', 'odds_totals', 'odds_totals_ht', 'odds_totals_q1'])) {
$res = DB::table($table)->where('active_spread', 1)->where('flags', 1)->where('event_id', $event_id)->get();
} else {
$res = DB::table($table)->where('flags', 1)->where('event_id', $event_id)->get();
}
$arr = [];
@@ -1,112 +0,0 @@
<?php
namespace App\Console\Commands\Services\Tasks;
use App\Console\Commands\Nuh;
use App\Console\Commands\Xml;
use App\Models\Supervisor;
use App\Utilities\Notice;
class MarketsState
{
public static function call()
{
$debug = Nuh::$options['d'] ?? 0;
if ($debug) {
Notice::note('Txodds Markets Status', 'b');
}
foreach (['betaid1', 'betaid2'] as $kontos) {
$url = 'https://xml2.txodds.com/feed/boid_states.php?ident='.$kontos.'&passwd=Dy59vpRC&last='.Nuh::$options['lastcall'];
$data = Xml::load($url);
// odds_2ways
// odds_2ways_s1
// odds_3ways
// odds_3ways_ht
// odds_dc
// odds_dnb
// odds_ggng
// odds_points
// odds_points_ht
// odds_points_q1
// odds_totals
// odds_totals_ht
// odds_totals_q1
// odds_tq
foreach ($data as $row) {
}
}
Supervisor::where('id', Nuh::$options['supervisor_id'])->update(['lastcall' => time()]);
// if (Txodds::$_config['soccer-others'] == 'soccer') {
// $lc_file = '/var/www/NuhOdds/src/Txodds/Lastcalls/flags_soccer.txt';
// $lastcall = file_get_contents($lc_file);
// $url = "https://xml2.txodds.com/feed/boid_states.php?ident=betaid1&passwd=Dy59vpRC&last=$lastcall";
// } elseif (Txodds::$_config['soccer-others'] == 'others') {
// $lc_file = '/var/www/NuhOdds/src/Txodds/Lastcalls/flags_other.txt';
// $lastcall = file_get_contents($lc_file);
// $url = "https://xml2.txodds.com/feed/boid_states.php?ident=betaid2&passwd=Dy59vpRC&last=$lastcall";
// }
// if ($lastcall < time() + 60) {
// $lastcall = time() - 60;
// }
// if (Database::$debug == 1) {
// echo Utilities::note($url);
// }
// $xml = Loader::xmlLoader($url);
// file_put_contents($lc_file, (int) $xml['timestamp']);
// $_status = [];
// foreach ($xml->boid as $_boid) {
// $offerid = (int) $_boid['id'];
// $flags = (int) $_boid['flags'];
// $_status[$offerid] = $flags;
// }
// $_tables = ['bai_3way', 'bai_2way', 'bai_totals', 'bai_totals_ht', 'bai_totals_qt', 'bai_points', 'bai_points_ht', 'bai_points_qt'];
// foreach ($_tables as $key => $table) {
// if (Txodds::$_config['soccer-others'] == 'soccer') {
// $tmp = DbFunction::select($table, ['offerid', 'flags'], ['AND' => ['orig' => 0, 'sportid' => 1]]);
// } elseif (Txodds::$_config['soccer-others'] == 'others') {
// $tmp = DbFunction::select($table, ['offerid', 'flags'], ['AND' => ['orig' => 0, 'sportid[!]' => 1]]);
// }
// // foreach ($tmp as $key => $value) {
// // $offerid = $value["offerid"];
// // $flags = $value["flags"];
// // if (isset($_status[$offerid])) {
// // DbFunction::secureUpdate($table, ["flags"=>$flags], ["offerid"=>$offerid]);
// // }
// // }
// foreach ($tmp as $key => $value) {
// $offerid = $value['offerid'];
// $old_flags = $value['flags'];
// if (isset($_status[$offerid])) {
// if ($_status[$offerid] == 1) {
// if ($old_flags == 0) {
// DbFunction::secureUpdate($table, ['flags' => 1], ['offerid' => $offerid]);
// }
// } else {
// if ($old_flags == 1) {
// DbFunction::secureUpdate($table, ['flags' => 0], ['offerid' => $offerid]);
// }
// }
// }
// }
// }
}
}
@@ -0,0 +1,54 @@
<?php
namespace App\Console\Commands\Services\Tasks;
use App\Console\Commands\Nuh;
use App\Console\Commands\Xml;
use App\Models\OddsTable;
use App\Models\Supervisor;
use App\Utilities\Notice;
use Illuminate\Support\Facades\DB;
class TxoddsFlags
{
public static function call()
{
$debug = Nuh::$options['d'] ?? 0;
if ($debug) {
Notice::note('Txodds Markets Status', 'b');
}
/**
* SOCCER
*/
$tables = OddsTable::where('soccer', 1)->pluck('name');
$url = 'https://xml2.txodds.com/feed/boid_states.php?ident=betaid1&passwd=Dy59vpRC&last='.Nuh::$options['lastcall'];
$data = Xml::load($url);
foreach ($data as $row) {
foreach ($tables as $table) {
DB::table($table)->where('offer_id', (int) $row['id'])->update(['last_updated' => $row['last_updated'], 'flags' => $row['flags']]);
}
}
/**
* OTHER
*/
$tables = OddsTable::where('other', 1)->pluck('name');
$url = 'https://xml2.txodds.com/feed/boid_states.php?ident=betaid2&passwd=Dy59vpRC&last='.Nuh::$options['lastcall'];
$data = Xml::load($url);
foreach ($data as $row) {
foreach ($tables as $table) {
DB::table($table)->where('offer_id', (int) $row['id'])->update(['last_updated' => $row['last_updated'], 'flags' => $row['flags']]);
}
}
Supervisor::where('id', Nuh::$options['supervisor_id'])->update(['lastcall' => time()]);
}
}
@@ -44,7 +44,7 @@ class SupervisorsTable
}),
Stack::make([
SelectColumn::make('name')
->disablePlaceholderSelection()
->selectablePlaceholder(false)
->hidden(function (ListSupervisors $livewire) {
return $livewire->tableFilters['provider_id']['value'] == 8;
})
@@ -74,7 +74,7 @@ class SupervisorsTable
*/
return [
'Txodds Markets' => 'Txodds Markets',
'Txodds Offerstatus' => 'Txodds Offerstatus',
'Txodds Flags' => 'Txodds Flags',
'DB Mapper' => 'DB Mapper',
'Generate Setting' => 'Generate Setting',
'Generate Alarms' => 'Generate Alarms',
+1 -1
View File
@@ -25,7 +25,7 @@ class KontoSwitcher extends Component
$bookmaker_id = array_shift($bookmakers);
User::where('id', auth()->user()->id)->update(['provider_id' => $provider_id, 'bookmaker_id' => $bookmaker_id, 'client_id' => $client_id]);
User::where('id', auth()->user()->id)->update(['sport_id' => 1, 'provider_id' => $provider_id, 'bookmaker_id' => $bookmaker_id, 'client_id' => $client_id]);
$this->js('window.location.reload()');
}
Generated
+52 -52
View File
@@ -2731,16 +2731,16 @@
},
{
"name": "laravel/framework",
"version": "v12.48.1",
"version": "v12.49.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "0f0974a9769378ccd9c9935c09b9927f3a606830"
"reference": "4bde4530545111d8bdd1de6f545fa8824039fcb5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/0f0974a9769378ccd9c9935c09b9927f3a606830",
"reference": "0f0974a9769378ccd9c9935c09b9927f3a606830",
"url": "https://api.github.com/repos/laravel/framework/zipball/4bde4530545111d8bdd1de6f545fa8824039fcb5",
"reference": "4bde4530545111d8bdd1de6f545fa8824039fcb5",
"shasum": ""
},
"require": {
@@ -2949,20 +2949,20 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2026-01-20T16:12:36+00:00"
"time": "2026-01-28T03:40:49+00:00"
},
{
"name": "laravel/prompts",
"version": "v0.3.10",
"version": "v0.3.11",
"source": {
"type": "git",
"url": "https://github.com/laravel/prompts.git",
"reference": "360ba095ef9f51017473505191fbd4ab73e1cab3"
"reference": "dd2a2ed95acacbcccd32fd98dee4c946ae7a7217"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/prompts/zipball/360ba095ef9f51017473505191fbd4ab73e1cab3",
"reference": "360ba095ef9f51017473505191fbd4ab73e1cab3",
"url": "https://api.github.com/repos/laravel/prompts/zipball/dd2a2ed95acacbcccd32fd98dee4c946ae7a7217",
"reference": "dd2a2ed95acacbcccd32fd98dee4c946ae7a7217",
"shasum": ""
},
"require": {
@@ -3006,9 +3006,9 @@
"description": "Add beautiful and user-friendly forms to your command-line applications.",
"support": {
"issues": "https://github.com/laravel/prompts/issues",
"source": "https://github.com/laravel/prompts/tree/v0.3.10"
"source": "https://github.com/laravel/prompts/tree/v0.3.11"
},
"time": "2026-01-13T20:29:29+00:00"
"time": "2026-01-27T02:55:06+00:00"
},
{
"name": "laravel/serializable-closure",
@@ -9214,16 +9214,16 @@
},
{
"name": "brianium/paratest",
"version": "v7.8.4",
"version": "v7.8.5",
"source": {
"type": "git",
"url": "https://github.com/paratestphp/paratest.git",
"reference": "130a9bf0e269ee5f5b320108f794ad03e275cad4"
"reference": "9b324c8fc319cf9728b581c7a90e1c8f6361c5e5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/paratestphp/paratest/zipball/130a9bf0e269ee5f5b320108f794ad03e275cad4",
"reference": "130a9bf0e269ee5f5b320108f794ad03e275cad4",
"url": "https://api.github.com/repos/paratestphp/paratest/zipball/9b324c8fc319cf9728b581c7a90e1c8f6361c5e5",
"reference": "9b324c8fc319cf9728b581c7a90e1c8f6361c5e5",
"shasum": ""
},
"require": {
@@ -9231,27 +9231,27 @@
"ext-pcre": "*",
"ext-reflection": "*",
"ext-simplexml": "*",
"fidry/cpu-core-counter": "^1.2.0",
"fidry/cpu-core-counter": "^1.3.0",
"jean85/pretty-package-versions": "^2.1.1",
"php": "~8.2.0 || ~8.3.0 || ~8.4.0",
"phpunit/php-code-coverage": "^11.0.10",
"php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0",
"phpunit/php-code-coverage": "^11.0.12",
"phpunit/php-file-iterator": "^5.1.0",
"phpunit/php-timer": "^7.0.1",
"phpunit/phpunit": "^11.5.24",
"phpunit/phpunit": "^11.5.46",
"sebastian/environment": "^7.2.1",
"symfony/console": "^6.4.22 || ^7.3.0",
"symfony/process": "^6.4.20 || ^7.3.0"
"symfony/console": "^6.4.22 || ^7.3.4 || ^8.0.3",
"symfony/process": "^6.4.20 || ^7.3.4 || ^8.0.3"
},
"require-dev": {
"doctrine/coding-standard": "^12.0.0",
"ext-pcov": "*",
"ext-posix": "*",
"phpstan/phpstan": "^2.1.17",
"phpstan/phpstan": "^2.1.33",
"phpstan/phpstan-deprecation-rules": "^2.0.3",
"phpstan/phpstan-phpunit": "^2.0.6",
"phpstan/phpstan-strict-rules": "^2.0.4",
"squizlabs/php_codesniffer": "^3.13.2",
"symfony/filesystem": "^6.4.13 || ^7.3.0"
"phpstan/phpstan-phpunit": "^2.0.11",
"phpstan/phpstan-strict-rules": "^2.0.7",
"squizlabs/php_codesniffer": "^3.13.5",
"symfony/filesystem": "^6.4.13 || ^7.3.2 || ^8.0.1"
},
"bin": [
"bin/paratest",
@@ -9291,7 +9291,7 @@
],
"support": {
"issues": "https://github.com/paratestphp/paratest/issues",
"source": "https://github.com/paratestphp/paratest/tree/v7.8.4"
"source": "https://github.com/paratestphp/paratest/tree/v7.8.5"
},
"funding": [
{
@@ -9303,7 +9303,7 @@
"type": "paypal"
}
],
"time": "2025-06-23T06:07:21+00:00"
"time": "2026-01-08T08:02:38+00:00"
},
{
"name": "doctrine/deprecations",
@@ -10159,38 +10159,38 @@
},
{
"name": "pestphp/pest",
"version": "v3.8.4",
"version": "v3.8.5",
"source": {
"type": "git",
"url": "https://github.com/pestphp/pest.git",
"reference": "72cf695554420e21858cda831d5db193db102574"
"reference": "7796630eafcfd1c02660cecdde3bc6984fbf01f4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/pestphp/pest/zipball/72cf695554420e21858cda831d5db193db102574",
"reference": "72cf695554420e21858cda831d5db193db102574",
"url": "https://api.github.com/repos/pestphp/pest/zipball/7796630eafcfd1c02660cecdde3bc6984fbf01f4",
"reference": "7796630eafcfd1c02660cecdde3bc6984fbf01f4",
"shasum": ""
},
"require": {
"brianium/paratest": "^7.8.4",
"nunomaduro/collision": "^8.8.2",
"nunomaduro/termwind": "^2.3.1",
"brianium/paratest": "^7.8.5",
"nunomaduro/collision": "^8.8.3",
"nunomaduro/termwind": "^2.3.3",
"pestphp/pest-plugin": "^3.0.0",
"pestphp/pest-plugin-arch": "^3.1.1",
"pestphp/pest-plugin-mutate": "^3.0.5",
"php": "^8.2.0",
"phpunit/phpunit": "^11.5.33"
"phpunit/phpunit": "^11.5.50"
},
"conflict": {
"filp/whoops": "<2.16.0",
"phpunit/phpunit": ">11.5.33",
"phpunit/phpunit": ">11.5.50",
"sebastian/exporter": "<6.0.0",
"webmozart/assert": "<1.11.0"
},
"require-dev": {
"pestphp/pest-dev-tools": "^3.4.0",
"pestphp/pest-plugin-type-coverage": "^3.6.1",
"symfony/process": "^7.3.0"
"symfony/process": "^7.4.4"
},
"bin": [
"bin/pest"
@@ -10255,7 +10255,7 @@
],
"support": {
"issues": "https://github.com/pestphp/pest/issues",
"source": "https://github.com/pestphp/pest/tree/v3.8.4"
"source": "https://github.com/pestphp/pest/tree/v3.8.5"
},
"funding": [
{
@@ -10267,7 +10267,7 @@
"type": "github"
}
],
"time": "2025-08-20T19:12:42+00:00"
"time": "2026-01-28T01:33:45+00:00"
},
{
"name": "pestphp/pest-plugin",
@@ -11359,16 +11359,16 @@
},
{
"name": "phpunit/phpunit",
"version": "11.5.33",
"version": "11.5.50",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "5965e9ff57546cb9137c0ff6aa78cb7442b05cf6"
"reference": "fdfc727f0fcacfeb8fcb30c7e5da173125b58be3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/5965e9ff57546cb9137c0ff6aa78cb7442b05cf6",
"reference": "5965e9ff57546cb9137c0ff6aa78cb7442b05cf6",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/fdfc727f0fcacfeb8fcb30c7e5da173125b58be3",
"reference": "fdfc727f0fcacfeb8fcb30c7e5da173125b58be3",
"shasum": ""
},
"require": {
@@ -11382,17 +11382,17 @@
"phar-io/manifest": "^2.0.4",
"phar-io/version": "^3.2.1",
"php": ">=8.2",
"phpunit/php-code-coverage": "^11.0.10",
"phpunit/php-code-coverage": "^11.0.12",
"phpunit/php-file-iterator": "^5.1.0",
"phpunit/php-invoker": "^5.0.1",
"phpunit/php-text-template": "^4.0.1",
"phpunit/php-timer": "^7.0.1",
"sebastian/cli-parser": "^3.0.2",
"sebastian/code-unit": "^3.0.3",
"sebastian/comparator": "^6.3.2",
"sebastian/comparator": "^6.3.3",
"sebastian/diff": "^6.0.2",
"sebastian/environment": "^7.2.1",
"sebastian/exporter": "^6.3.0",
"sebastian/exporter": "^6.3.2",
"sebastian/global-state": "^7.0.2",
"sebastian/object-enumerator": "^6.0.1",
"sebastian/type": "^5.1.3",
@@ -11440,7 +11440,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
"source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.33"
"source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.50"
},
"funding": [
{
@@ -11464,7 +11464,7 @@
"type": "tidelift"
}
],
"time": "2025-08-16T05:19:02+00:00"
"time": "2026-01-27T05:59:18+00:00"
},
{
"name": "rector/rector",
@@ -12814,12 +12814,12 @@
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": true,
"prefer-lowest": false,
"platform": {
"php": "^8.3"
},
"platform-dev": [],
"plugin-api-version": "2.6.0"
"platform-dev": {},
"plugin-api-version": "2.9.0"
}
+1 -1
View File
@@ -68,7 +68,7 @@ class SupervisorSeeder extends Seeder
(52, '', 10, 0, NULL, 30, 0, NULL, NULL, 30, 0, 0, 0, 0, 10, 10, '2026-01-16 12:05:14', '2026-01-16 12:05:14'),
(53, 'Generate Setting', 7, 0, NULL, 30, 0, '0.02', NULL, 30, 0, 0, 0, 0, 10, 10, '2026-01-16 12:05:14', '2026-01-27 13:39:46'),
(54, 'Generate Alarms', 7, 1, NULL, 30, 0, '0', NULL, 30, 0, 0, 0, 0, 10, 10, '2026-01-16 12:05:14', '2026-01-27 13:42:39'),
(55, 'Txodds Offerstatus', 7, NULL, NULL, 30, 0, NULL, NULL, 30, 0, 0, 0, 0, 10, 10, '2026-01-27 11:25:56', '2026-01-27 11:26:05');
(55, 'Txodds Flags', 7, NULL, NULL, 30, 0, NULL, NULL, 30, 0, 0, 0, 0, 10, 10, '2026-01-27 11:25:56', '2026-01-27 11:26:05');
";
DB::unprepared($sql);
}
@@ -1,4 +1,4 @@
<div
class="text-primary-600 dark:text-primary-400 border border-primary-300 dark:border-primary-600 bg-primary-50 dark:bg-primary-100/10 rounded">
class="text-primary-600 dark:text-primary-500 border border-primary-300 dark:border-primary-500/30 bg-primary-50 dark:bg-primary-800/20 rounded">
{{ $slot }}
</div>
@@ -1,21 +1,22 @@
<div class="grid grid-cols-2 gap-1 p-1 border border-gray-800 rounded-xl bg-gray-900 text-center" style="font-size: 10.5px;">
<div class="grid grid-cols-2 gap-1 py-2 px-3 border rounded-xl border-zinc-200 dark:border-zinc-800 bg-gray-100 dark:bg-gray-900 text-center shadow"
style="font-size: 10.5px;">
<div class="row-span-3 text-lg text-gray-500 pt-3">{{ $title }}</div>
@if($red)
<div class="cursor-pointer"><x-alarm-red>{{ $red }}</x-alarm-red></div>
@if ($red)
<div class="cursor-pointer"><x-alarm-red>{{ $red }}</x-alarm-red></div>
@else
<x-alarm-neutral>0</x-alarm-neutral>
<x-alarm-neutral>0</x-alarm-neutral>
@endif
@if($yellow)
<div class="cursor-pointer"><x-alarm-yellow>{{ $yellow }}</x-alarm-yellow></div>
@if ($yellow)
<div class="cursor-pointer"><x-alarm-yellow>{{ $yellow }}</x-alarm-yellow></div>
@else
<x-alarm-neutral>0</x-alarm-neutral>
<x-alarm-neutral>0</x-alarm-neutral>
@endif
@if($green)
<div class="cursor-pointer"><x-alarm-green>{{ $green }}</x-alarm-green></div>
@if ($green)
<div class="cursor-pointer"><x-alarm-green>{{ $green }}</x-alarm-green></div>
@else
<x-alarm-neutral>0</x-alarm-neutral>
<x-alarm-neutral>0</x-alarm-neutral>
@endif
</div>
+5 -1
View File
@@ -67,7 +67,11 @@ case "$1" in
php artisan nuh --d --f 19
;;
"10")
echo ""
echo ""
echo "!! WITH PROXY !!"
echo ""
echo ""
php artisan nuh --d --t --f 1
php artisan nuh --d --t --f 2
# php artisan nuh --d --t --f 20
@@ -85,7 +89,7 @@ case "$1" in
# php artisan nuh --d --f --p 13
# php artisan nuh --d --f --p 14
# php artisan nuh --d --f --p 15
php artisan nuh --d --f --p 16
# php artisan nuh --d --f --p 16
# php artisan nuh --d --f --p 17
# php artisan nuh --d --f --p 18
# php artisan nuh --d --f --p 19