- New API layer: ApiRouter, OrdersApiController, DictionariesApiController - Orders API: list (with filters/pagination/updated_since), details, change status, set paid/unpaid - Dictionaries API: order statuses, transport methods, payment methods - X-Api-Key authentication via pp_settings.api_key - OrderRepository: listForApi(), findForApi(), touchUpdatedAt() - updated_at column on pp_shop_orders for polling support - api.php: skip session for API requests, route to ApiRouter - SettingsController: api_key field in system tab - 30 new tests (666 total, 1930 assertions) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
50 lines
1.4 KiB
PHP
50 lines
1.4 KiB
PHP
<?
|
|
$current_ver = 296;
|
|
|
|
for ($i = 1; $i <= $current_ver; $i++)
|
|
{
|
|
$dir = substr(number_format($i / 1000, 3), 0, strlen(number_format($i / 1000, 3)) - 2) . '0';
|
|
$version_new = number_format($i / 1000, 3);
|
|
|
|
if (file_exists('../updates/' . $dir . '/ver_' . $version_new . '.zip'))
|
|
$versions[] = $version_new;
|
|
}
|
|
|
|
$license['fffa683eaec156dd04cb037fe4832d69']['domain'] = 'marianek.pl';
|
|
$license['fffa683eaec156dd04cb037fe4832d69']['valid_to_date'] = '';
|
|
$license['fffa683eaec156dd04cb037fe4832d69']['valid_to_version'] = '';
|
|
|
|
$license['b11ad35d84d7eb2cc65cbc2528522dd1']['domain'] = 'cossmacznego.pl';
|
|
$license['b11ad35d84d7eb2cc65cbc2528522dd1']['valid_to_date'] = '';
|
|
$license['b11ad35d84d7eb2cc65cbc2528522dd1']['valid_to_version'] = '';
|
|
|
|
$license['e3b6c13dc0dcb9b83a04dfb0916d7d3b']['domain'] = 'shoppro.pro24.com.pl';
|
|
$license['e3b6c13dc0dcb9b83a04dfb0916d7d3b']['valid_to_date'] = '';
|
|
$license['e3b6c13dc0dcb9b83a04dfb0916d7d3b']['valid_to_version'] = '';
|
|
|
|
$update_key = $_GET['key'];
|
|
if (!isset($license[$_GET['key']]))
|
|
die();
|
|
|
|
$valid_to_date = $license[$_GET['key']]['valid_to'];
|
|
if ($valid_to && $valid_to < date('Y-m-d'))
|
|
die();
|
|
|
|
$versions = array_unique($versions);
|
|
|
|
$valid_to_version = $license[$_GET['key']]['valid_to_version'];
|
|
if ($valid_to_version)
|
|
{
|
|
foreach ($versions as $ver)
|
|
if ($ver <= $valid_to_version)
|
|
echo $ver . PHP_EOL;
|
|
}
|
|
else
|
|
{
|
|
foreach ($versions as $ver)
|
|
echo $ver . PHP_EOL;
|
|
}
|
|
|
|
|
|
|