. * * Version 0.1 * Author: Octavio Benedi Sanchez */ if (!empty($_GET)) { // Check for section or plugin that must be shown. // Strip non allowed characters. $section=preg_replace("/[^a-zA-Z0-9_]/", "", $_GET['section']); if (!empty($section)) { $base_section=$base_dir.'plugins/'.$section.'/'; $plugin=preg_replace("/[^a-zA-Z0-9_]/", "", $_GET['plugin']); if (!empty($plugin)) // Plugin is defined { // Check if the plugin exists and if so, show it. $base_plugin=$base_section.$plugin.'/'; $url_plugin='plugins/'.$section.'/'.$plugin.'/'; $API_core='core/API/'; } } } elseif (!empty($_POST)) { // Check for section or plugin that must be shown. // Strip non allowed characters. $section=preg_replace("/[^a-zA-Z0-9_]/", "", $_POST['section']); if (!empty($section)) { $base_section=$base_dir.'plugins/'.$section.'/'; $plugin=preg_replace("/[^a-zA-Z0-9_]/", "", $_POST['plugin']); if (!empty($plugin)) // Plugin is defined { // Check if the plugin exists and if so, show it. $base_plugin=$base_section.$plugin.'/'; $url_plugin='plugins/'.$section.'/'.$plugin.'/'; $API_core='core/API/'; } } } else { // This should load index page. $initial_index_page=true; } ?>