$data = parse_ini_file('plugins/' . $name . '/plugin.ini'); if (!isset($data['install'])) { $view->info($lang['noinst']); //Unpack & Play } elseif ($_POST) { define('DB_TYPE', $db_db); define('AUTONUM', $db_db == 'mysql' ? 'INT NOT NULL auto_increment PRIMARY KEY' : 'INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL'); require './lib/config.php'; require './plugins/' . $name . '/setup.php'; try { #Setup transaction $db->beginTransaction(); #Delete addon if (isset($setup[$name])) { unset($setup[$name]); Uninstall(); if (isset($data['link'])) { $db->exec('DELETE FROM ' . PRE . 'mitems WHERE url="' . $name . '"'); include './lib/mcache.php'; RenderMenu(); } } else { $setup[$name] = (double) $data['version']; Install(); if (isset($_POST['m'])) { $q = $db->prepare('INSERT INTO ' . PRE . 'mitems (menu,text,url,seq) VALUES (?,?,?,?)'); for ($i = 0, $num = count($_POST['mt']); $i < $num; ++$i) { if (!empty($_POST['mt'][$i])) { $q->execute(array($_POST['mid'][$i], $_POST['mt'][$i], $name, $_POST['mp'][$i])); } }
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;} if(isset($_GET["switch-ports-table"])){main_switch();exit;} if(isset($_POST["ipaddr"])){port_save();exit;} if(isset($_POST["Uninstall"])){Uninstall();exit;} if(isset($_POST["VirtualSwitchEnabled"])){VirtualSwitchEnabled();exit;} tabs(); function main_switch_status(){ $switch=$_GET["eth"]; $tpl=new templates(); $sock=new sockets(); $datas=$sock->getFrameWork("vde.php?switch-main-status=$switch"); $ini=new Bs_IniHandler(); $ini->loadString($datas); $f[]=DAEMON_STATUS_ROUND("VDE_$switch",$ini,null,0);