function sed_plugin_auto_install($event, $step) { global $txpcfg, $prefs; require_privs('sed_plugin_auto_install'); include_once $txpcfg['txpath'] . '/include/txp_plugin.php'; $debug = false; if ($debug) { echo br, "Loading: Auto Install Plugin."; } # # Build a list of all files in the special plugins dir... # $files = array(); $path = $prefs['file_base_path'] . DS . 'sed_autoinst' . DS . 'plugins'; if ($debug) { echo br, "Auto Install Plugins... Accessing dir({$path}) ..."; } $dir = @dir($path); if ($dir === false) { if ($debug) { echo " failed!"; } return; } while ($file = $dir->read()) { if ($file !== '.' && $file !== '..') { if ($debug) { echo br, "... found ({$file})"; } $fileaddr = $path . DS . $file; if (!is_dir($fileaddr)) { $files[] = $file; if ($debug) { echo " : accepting as plugin."; } } } } $dir->close(); # # Exit if there is nothing to do... # if (empty($files)) { if ($debug) { echo " no plugins found: exiting."; } return; } # # Process each file... # foreach ($files as $file) { if ($debug) { echo br, "Processing {$file} : "; } # # Load the file into the $_POST['plugin64'] entry and try installing it... # $plugin = join('', file($path . DS . $file)); $_POST['plugin64'] = $plugin; if ($debug) { echo "installing,"; } include_once $txpcfg['txpath'] . '/lib/txplib_head.php'; plugin_install(); # # Drop the file extension to leave only the name... # $bits = explode('.', $file); array_pop($bits); $file = join('.', $bits); # # Try enabling it now (guesses at plugin name from file name)... # $plugin_name = strtr($file, array('-' => '_')); $_POST['name'] = $plugin_name; $_POST['status'] = '0'; if ($debug) { echo " attempting to activate {$plugin_name}."; } switch_status(); } if (!$debug) { # # Remove ourself from the plugin installation now (nice idea Ruud!)... # safe_delete('txp_plugin', "name = 'sed_auto_inst'"); while (@ob_end_clean()) { } header('Location: ' . hu . 'textpattern/index.php?event=plugin'); header('Connection: close'); header('Content-Length: 0'); exit(0); } }
include_once 'ressources/class.mysql.shorewall.inc'; include_once 'ressources/class.tcpip.inc'; $usersmenus = new usersMenus(); if (!$usersmenus->AsArticaAdministrator) { die; } if (isset($_GET["switch-tab"])) { switch_tab(); exit; } if (isset($_GET["switch-status-section"])) { main_switch_status(); exit; } if (isset($_GET["switch-status"])) { switch_status(); exit; } if (isset($_GET["MainParams-js"])) { MainParams_js(); exit; } if (isset($_GET["MainParams-tab"])) { MainParams_tab(); exit; } if (isset($_GET["MainParams-popup"])) { MainParams_popup(); exit; } if (isset($_GET["port-js"])) {
include_once('ressources/class.templates.inc'); include_once('ressources/class.ldap.inc'); include_once('ressources/class.users.menus.inc'); include_once('ressources/class.system.network.inc'); include_once('ressources/class.system.nics.inc'); include_once('ressources/class.maincf.multi.inc'); include_once('ressources/class.mysql.shorewall.inc'); include_once('ressources/class.tcpip.inc'); $usersmenus=new usersMenus(); if(!$usersmenus->AsArticaAdministrator){die();} if(isset($_GET["switch-tab"])){switch_tab();exit;} if(isset($_GET["switch-status-section"])){main_switch_status();exit;} if(isset($_GET["switch-status"])){switch_status();exit;} if(isset($_GET["MainParams-js"])){MainParams_js();exit;} if(isset($_GET["MainParams-tab"])){MainParams_tab();exit;} if(isset($_GET["MainParams-popup"])){MainParams_popup();exit;} if(isset($_GET["port-js"])){port_js();exit;} if(isset($_GET["port-tab"])){port_tab();exit;} if(isset($_GET["port-popup"])){port_popup();exit;} if(isset($_GET["delete-virtual-js"])){delete_virtual_js();exit;} if(isset($_POST["delete-virtual-perform"])){delete_virtual_perform();exit;} if(isset($_GET["ports-list"])){main_switch_ports();exit;}