'.__('There are no extensions defined').''; return; } } $enterprise = (bool) get_parameter('enterprise', 0); $delete = get_parameter('delete', ''); $enabled = get_parameter('enabled', ''); $disabled = get_parameter('disabled', ''); if ($delete != '') { if ($enterprise) { if (!file_exists($config['homedir'].'/enterprise/extensions/ext_backup')) { mkdir($config['homedir'].'/enterprise/extensions/ext_backup'); } } else { if (!file_exists($config['homedir'].'/extensions/ext_backup')) { mkdir($config['homedir'].'/extensions/ext_backup'); } } if ($enterprise) { $source = $config['homedir'].'/enterprise/extensions/'.$delete; $endFile = $config['homedir'].'/enterprise/extensions/ext_backup/'.$delete; } else { $source = $config['homedir'].'/extensions/'.$delete; $endFile = $config['homedir'].'/extensions/ext_backup/'.$delete; } rename($source, $endFile); ?> width = '98%'; $table->head = []; $table->head[] = __('File'); $table->head[] = __('Version'); $table->head[] = __('Enterprise'); $table->head[] = __('Godmode Function'); $table->head[] = __('Godmode Menu'); $table->head[] = __('Operation Menu'); $table->head[] = __('Operation Function'); $table->head[] = __('Login Function'); $table->head[] = __('Agent operation tab'); $table->head[] = __('Agent godmode tab'); $table->head[] = __('Operation'); $table->width = '100%'; $table->class = 'info_table'; $table->align = []; $table->align[] = 'left'; $table->align[] = 'center'; $table->align[] = 'center'; $table->align[] = 'center'; $table->align[] = 'center'; $table->align[] = 'center'; $table->align[] = 'center'; $table->align[] = 'center'; $table->align[] = 'center'; $table->align[] = 'center'; $table->align[] = 'center'; $table->data = []; foreach ($extensions as $file => $extension) { $data = []; $on = html_print_image('images/dot_green.png', true); $off = html_print_image('images/dot_red.png', true); if (!$extension['enabled']) { $on = html_print_image('images/dot_green.disabled.png', true); $off = html_print_image('images/dot_red.disabled.png', true); $data[] = ''.$file.''; // Get version of this extensions if ($config['extensions'][$file]['operation_menu']) { $data[] = $config['extensions'][$file]['operation_menu']['version']; } else if ($config['extensions'][$file]['godmode_menu']) { $data[] = $config['extensions'][$file]['godmode_menu']['version']; } else if ($config['extensions'][$file]['extension_ope_tab']) { $data[] = $config['extensions'][$file]['extension_ope_tab']['version']; } else if ($config['extensions'][$file]['extension_god_tab']) { $data[] = $config['extensions'][$file]['extension_god_tab']['version']; } else { $data[] = __('N/A'); } } else { $data[] = $file; // Get version of this extension if ($config['extensions'][$file]['operation_menu']) { $data[] = $config['extensions'][$file]['operation_menu']['version']; } else if ($config['extensions'][$file]['godmode_menu']) { $data[] = $config['extensions'][$file]['godmode_menu']['version']; } else if (isset($config['extensions'][$file]['extension_ope_tab'])) { $data[] = $config['extensions'][$file]['extension_ope_tab']['version']; } else if ($config['extensions'][$file]['extension_god_tab']) { $data[] = $config['extensions'][$file]['extension_god_tab']['version']; } else { $data[] = __('N/A'); } } if ($extension['enterprise']) { $data[] = $on; } else { $data[] = $off; } if ($extension['godmode_function']) { $data[] = $on; } else { $data[] = $off; } if ($extension['godmode_menu']) { $data[] = $on; } else { $data[] = $off; } if ($extension['operation_menu']) { $data[] = $on; } else { $data[] = $off; } if ($extension['operation_function']) { $data[] = $on; } else { $data[] = $off; } if ($extension['login_function']) { $data[] = $on; } else { $data[] = $off; } if ($extension['extension_ope_tab']) { $data[] = $on; } else { $data[] = $off; } if ($extension['extension_god_tab']) { $data[] = $on; } else { $data[] = $off; } // Avoid to delete or disabled update_manager if ($file != 'update_manager.php') { $table->cellclass[][10] = 'action_buttons'; if (!$extension['enabled']) { $data[] = ''.html_print_image('images/cross.disabled.png', true, ['class' => 'filter_none']).''.' '.html_print_image('images/lightbulb_off.png', true, ['class' => 'filter_none']).''; } else { $data[] = ''.html_print_image('images/cross.png', true, ['class' => 'invert_filter']).''.' '.html_print_image('images/lightbulb.png', true).''; } } else { $data[] = ''; } $table->data[] = $data; } html_print_table($table);