include_once('ressources/class.ldap.inc'); include_once('ressources/class.users.menus.inc'); include_once('ressources/class.artica.inc'); include_once('ressources/class.ini.inc'); include_once('ressources/class.samba.inc'); include_once('ressources/class.user.inc'); include_once('ressources/class.kav4samba.inc'); $usersmenus=new usersMenus(); if(!$usersmenus->AsSambaAdministrator){ $tpl=new templates(); echo $tpl->javascript_parse_text('{ERROR_NO_PRIVS}'); exit; } if(isset($_GET["SambaEnabled"])){SambaEnabled();exit;} if(isset($_GET["popup"])){popup();exit;} js(); function js(){ $page=CurrentPageName(); $tpl=new templates(); $prefix=str_replace(".","_",$page); $title=$tpl->_ENGINE_parse_body("{enable_disable_samba}"); $html="
include_once 'ressources/class.templates.inc'; include_once 'ressources/class.ldap.inc'; include_once 'ressources/class.users.menus.inc'; include_once 'ressources/class.artica.inc'; include_once 'ressources/class.ini.inc'; include_once 'ressources/class.samba.inc'; include_once 'ressources/class.user.inc'; include_once 'ressources/class.kav4samba.inc'; $usersmenus = new usersMenus(); if (!$usersmenus->AsSambaAdministrator) { $tpl = new templates(); echo $tpl->javascript_parse_text('{ERROR_NO_PRIVS}'); exit; } if (isset($_GET["SambaEnabled"])) { SambaEnabled(); exit; } if (isset($_GET["popup"])) { popup(); exit; } js(); function js() { $page = CurrentPageName(); $tpl = new templates(); $prefix = str_replace(".", "_", $page); $title = $tpl->_ENGINE_parse_body("{enable_disable_samba}"); $html = "\n\nfunction {$prefix}StartPage(){\n\tYahooWin2(550,'{$page}?popup=yes','{$title}');\n}\n\n\tfunction x_SaveSambaEnabled(obj) {\n\t\tvar tempvalue=obj.responseText;\n\t\tif(tempvalue.length>3){alert(tempvalue);}\t\n\t\t{$prefix}StartPage();\n\t\tif(document.getElementById('main_smb_config')){\n\t\t\tjavascript:LoadAjax('main_smb_config','samba.index.php?main=yes');\n\t\t}\n\t\t\n\t\tif(document.getElementById('main_samba_config')){\n\t\t\tjavascript:LoadAjax('main_samba_config','fileshares.index.php?main=net_share');\n\t\t}\t\t\n\t\tCacheOff();\n\t\t\n\t\t\n\t\tYahooWin2Hide();\n\t}\t\t\n\t\n\tfunction SaveSambaEnabled(){\n\t\tvar SambaEnabled=document.getElementById('SambaEnabled').value;\n\t\tdocument.getElementById('SambaEnabledDiv').innerHTML='<center><img src=\"img/wait_verybig.gif\"></center>';\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('SambaEnabled',SambaEnabled);\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_SaveSambaEnabled);\t\t\t\t\n\t}\n\t\n\n{$prefix}StartPage();\n\n"; echo $html;