.
*/
use Models\Plugin;
include_once __DIR__.'/core.php';
if (!empty($id_record) && !empty($id_module)) {
redirect(base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record);
} elseif (empty($id_module)) {
redirect(base_path().'/index.php');
}
include_once App::filepath('include|custom|', 'top.php');
// Inclusione gli elementi fondamentali
include_once base_dir().'/actions.php';
// Widget in alto
echo '{( "name": "widgets", "id_module": "'.$id_module.'", "position": "top", "place": "controller" )}';
$segmenti = $dbo->FetchArray('SELECT `id` FROM `zz_segments` WHERE `id_module` = '.prepare($id_module));
if ($segmenti) {
$segmenti = Modules::getSegments($id_module);
if (empty($segmenti)) {
echo '
';
include base_dir().'/include/manager.php';
echo '
';
// Plugins
$plugins = Plugin::where('idmodule_to', $id_module)->where('position', 'tab_main')->where('enabled', 1)->get();
$module_record = $record;
foreach ($plugins as $plugin) {
$record = $module_record;
echo '
';
$id_plugin = $plugin->id;
include base_dir().'/include/manager.php';
echo '
';
}
$record = $module_record;
redirectOperation($id_module, !empty($id_parent) ? $id_parent : $id_record);
// Interfaccia per la modifica dell'ordine e della visibilità delle colonne (Amministratore)
if ($user->is_admin && string_contains($module['option'], '|select|')) {
echo '
';
}
echo '
';
// Widget in basso
echo '{( "name": "widgets", "id_module": "'.$id_module.'", "position": "right", "place": "controller" )}';
include_once App::filepath('include|custom|', 'bottom.php');