2017-08-04 16:28:16 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
include_once __DIR__.'/core.php';
|
|
|
|
|
2018-02-03 16:29:53 +01:00
|
|
|
if (!isset($resource)) {
|
2018-02-03 15:03:48 +01:00
|
|
|
$op = empty($op) ? filter('op') : $op;
|
2019-02-22 10:37:37 +01:00
|
|
|
$search = filter('search');
|
|
|
|
$page = filter('page') ?: 0;
|
|
|
|
$length = filter('length') ?: 100;
|
2017-08-04 16:28:16 +02:00
|
|
|
|
2018-02-03 15:03:48 +01:00
|
|
|
if (!isset($elements)) {
|
|
|
|
$elements = [];
|
2017-08-04 16:28:16 +02:00
|
|
|
}
|
2018-02-03 15:03:48 +01:00
|
|
|
$elements = (!is_array($elements)) ? explode(',', $elements) : $elements;
|
2017-08-04 16:28:16 +02:00
|
|
|
|
2019-02-22 10:37:37 +01:00
|
|
|
$results = AJAX::select($op, $elements, $search, $page, $length);
|
2019-06-29 11:01:26 +02:00
|
|
|
|
2018-02-03 15:03:48 +01:00
|
|
|
echo json_encode($results);
|
2018-02-03 16:29:53 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// Casi particolari
|
|
|
|
else {
|
2017-08-04 16:28:16 +02:00
|
|
|
}
|