2019-11-20 10:24:56 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
include_once __DIR__.'/../../../core.php';
|
|
|
|
|
|
|
|
switch ($resource) {
|
|
|
|
case 'zone':
|
2019-11-22 16:28:03 +01:00
|
|
|
|
2019-11-20 10:24:56 +01:00
|
|
|
$query = 'SELECT `id`, CONCAT(`nome`, \' - \', `descrizione`) AS `descrizione` FROM an_zone |where| ORDER BY descrizione ASC';
|
|
|
|
|
|
|
|
foreach ($elements as $element) {
|
|
|
|
$filter[] = 'id='.prepare($element);
|
|
|
|
}
|
|
|
|
if (!empty($search)) {
|
|
|
|
$search_fields[] = 'nome LIKE '.prepare('%'.$search.'%');
|
|
|
|
$search_fields[] = 'descrizione LIKE '.prepare('%'.$search.'%');
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|