if (posix_getuid() == 0) { die; } $user = new usersMenus(); if ($user->AsVirtualBoxManager == false) { $tpl = new templates(); echo "alert('" . $tpl->javascript_parse_text("{ERROR_NO_PRIVS}") . "');"; die; exit; } if (isset($_GET["popup"])) { popup(); exit; } if (isset($_GET["clonehd-source"])) { clonehd(); exit; } js(); function js() { $page = CurrentPageName(); $tpl = new templates(); $sock = new sockets(); $infos = $sock->getFrameWork("cmd.php?virtualbox-showvminfo=yes&uuid=" . base64_encode($_GET["uuid"])); $array = unserialize(base64_decode($infos)); $title = $tpl->_ENGINE_parse_body("{CLONE_HD}: {$array["NAME"]}"); $html = "\n\t\tfunction VirtualBoxCloneHDLoad(){\n\t\t\tYahooWin3('550','{$page}?popup=yes&uuid={$_GET["uuid"]}','{$title}');\n\t\t}\n\n\t\tVirtualBoxCloneHDLoad()"; echo $html; } function clonehd()
include_once('ressources/class.templates.inc'); include_once('ressources/class.ldap.inc'); include_once('ressources/class.users.menus.inc'); if(posix_getuid()==0){die();} $user=new usersMenus(); if($user->AsVirtualBoxManager==false){ $tpl=new templates(); echo "alert('". $tpl->javascript_parse_text("{ERROR_NO_PRIVS}")."');"; die();exit(); } if(isset($_GET["popup"])){popup();exit;} if(isset($_GET["clonehd-source"])){clonehd();exit;} js(); function js(){ $page=CurrentPageName(); $tpl=new templates(); $sock=new sockets(); $infos=$sock->getFrameWork("cmd.php?virtualbox-showvminfo=yes&uuid=".base64_encode($_GET["uuid"])); $array=unserialize(base64_decode($infos)); $title=$tpl->_ENGINE_parse_body("{CLONE_HD}: {$array["NAME"]}"); $html=" function VirtualBoxCloneHDLoad(){