Dodanie nowej strony admina co pozwala dodawać pane kontaktowe

This commit is contained in:
Roman Pyrih
2026-01-27 15:34:07 +01:00
parent ff58ac80ef
commit 92248df9d1
11 changed files with 692 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
<?
namespace front\controls;
class ContactsMapsApi
{
static public function index()
{
// JSON header
header('Content-Type: application/json; charset=utf-8');
$only_active = true;
if (\S::get('all') == 1) $only_active = false; // przykład ?all=1
$data = \front\factory\ContactsMaps::api_list($only_active);
echo json_encode([
'status' => 'ok',
'count' => count($data),
'data' => $data,
], JSON_UNESCAPED_UNICODE);
exit;
}
}