$val) { // Se il valore esiste lo tolgo if ($val == $value) { $found = true; if ((int) $inversed == 1) { unset($_SESSION[$array[0]][$array[1]][$idx]); } } } if (!$found) { array_push($_SESSION[$array[0]][$array[1]], $value); } // print_r($_SESSION[$array[0]][$array[1]]); break; // Imposta un valore ad una sessione case 'session_set': $array = explode(',', get('session')); $value = get('value'); $clear = get('clear'); if ($clear == 1 || $value == '') { unset($_SESSION[$array[0]][$array[1]]); } else { $_SESSION[$array[0]][$array[1]] = $value; } break; case 'list_attachments': $id_module = get('id_module'); $id_record = get('id_record'); $id_plugin = get('id_plugin'); echo '{( "name": "filelist_and_upload", "id_module": "'.$id_module.'", "id_record": "'.$id_record.'", "id_plugin": "'.$id_plugin.'", "ajax": "true" )}'; break; }