function build($reconfiguremode = false) { echo "Starting......: " . date("H:i:s") . " ejabberd daemon creating /etc/ejabberd/ejabberd.cfg\n"; $ejb = new ejabberd(); $conf = $ejb->BuildMasterConf(); @file_put_contents("/etc/ejabberd/ejabberd.cfg", $conf); $unix = new unix(); $ejabberdctl = $unix->find_program("ejabberdctl"); if (!is_file($ejabberdctl)) { return; } ZarafaPlugin(); if (!$reconfiguremode) { $cmd = "{$ejabberdctl} load_config /etc/ejabberd/ejabberd.cfg"; if ($GLOBALS["VERBOSE"]) { echo $cmd . "\n"; } shell_exec($cmd); } echo "Starting......: " . date("H:i:s") . " ejabberd daemon configure success\n"; }
function enable_host() { $jb = new ejabberd($_POST["hostname"]); $jb->enabled = $_POST["enable_host"]; $jb->SaveHostname(); }
function DeleteInternetDomain() { $usr = new usersMenus(); $tpl = new templates(); if ($usr->AllowChangeDomains == false) { echo $tpl->_ENGINE_parse_body('{no_privileges}'); exit; } $domain = $_GET["DeleteInternetDomain"]; $ou = $_GET["ou"]; $tpl = new templates(); $artica = new artica_general(); $ldap = new clladp(); if ($artica->RelayType == "single") { $ldap->delete_VirtualDomainsMapsMTA($ou, $domain); } $ldap->DeleteLocadDomain($domain, $ou); $sql = "DELETE FROM postfix_duplicate_maps WHERE pattern='{$domain}'"; $q = new mysql(); $q->QUERY_SQL($sql, "artica_backup"); $q->QUERY_SQL("DELETE FROM domains`name`='{$domain}'", "powerdns"); $jb = new ejabberd($domain); $jb->Delete(); }
} function googlesearch(){ form = document.getElementById("cse-search-box"); form.action="https://www.google.com/cse"; form.target= add_newtab( '' , "Google"); form.submit(); form.action="javascript:googlesearch()"; } </script> <?php $onload .= "initiate_tabview();"; if (CHAT_SYSTEM == "ejabberd") { require_once "class/class.ejabberd.php"; $chat = new ejabberd(); $chat->get_login($page->auth->Get_user_name()); $onload .= "iJab.loginWithStatus( '" . $chat->username . "' , '" . $chat->password . "');"; $arr = $chat->get_chats_by_contact("11079"); } ?> <style> html, body { height:100%; } #container, #container.yui-navset, #container.yui-content { top: 75px; bottom: 0px;
function localdomain_remove() { include_once dirname(__FILE__) . "/ressources/class.ejabberd.inc"; include_once dirname(__FILE__) . "/ressources/class.artica.inc"; $usr = new usersMenus(); $tpl = new templates(); if ($usr->AllowChangeDomains == false) { echo $tpl->_ENGINE_parse_body('{no_privileges}'); exit; } $domain = $_POST["localdomain-remove"]; $ou = $_POST["ou"]; $tpl = new templates(); $artica = new artica_general(); $ldap = new clladp(); if ($artica->RelayType == "single") { $ldap->delete_VirtualDomainsMapsMTA($ou, $domain); } $ldap->DeleteLocadDomain($domain, $ou); $sql = "DELETE FROM postfix_duplicate_maps WHERE pattern='{$domain}'"; $q = new mysql(); $q->QUERY_SQL($sql, "artica_backup"); $jb = new ejabberd($domain); $jb->Delete(); ChockServices(); }
function hostname_save() { $jb = new ejabberd($_POST["hostname"]); if (!$jb->SaveHostname()) { return; } }