first commit

This commit is contained in:
2025-08-02 16:30:27 +02:00
commit 23646bfcee
14851 changed files with 1750626 additions and 0 deletions

41
web/ajax.php Normal file
View File

@@ -0,0 +1,41 @@
<?php
$type = !empty($_GET['type']) ? $_GET['type'] : null;
header('Content-type: application/json');
switch ($_GET['type']) {
case 'email':
if (!($email = getVal('email'))) {
exit;
}
$emailCheck = \KupShop\KupShopBundle\Util\Compat\ServiceContainer::getService(\KupShop\KupShopBundle\Util\Mail\EmailCheck::class);
$result = returnSQLResult('SELECT id FROM users WHERE email=:email AND figure = \'Y\'', ['email' => $email]);
echo json_encode(['found' => (bool) $result, 'validDomain' => $emailCheck->isEmailDomainValid($email)]);
exit;
case 'urgent_cargus_cities':
if (!($county = getVal('county'))) {
exit;
}
$urgentCargus = Delivery::getClass('UrgentCargus');
echo json_encode($urgentCargus->getCities($county));
exit;
case 'fan_courier_cities':
if (!($county = getVal('county'))) {
exit;
}
$fanCourier = Delivery::getClass('FANCourier');
echo json_encode($fanCourier->getCities($county));
exit;
default:
header('HTTP/1.0 404 Not Found');
exit;
}