Dodanie nowej strony admina co pozwala dodawać pane kontaktowe
This commit is contained in:
24
autoload/front/controls/class.ContactsMapsApi.php
Normal file
24
autoload/front/controls/class.ContactsMapsApi.php
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user