function createOldHeaderData() { global $gbl, $sgbl, $login, $ghtml; global $gdata; $homedesc = $login->getKeywordUc('home'); $deskdesc = $login->getKeywordUc('desktop'); $aboutdesc = $login->getKeywordUc('about'); $domaindesc = get_plural(get_description('domain')); $clientdesc = get_plural(get_description('client')); $slavedesc = get_description('pserver'); $ticketdesc = get_plural(get_description('ticket')); $ssessiondesc = get_description('ssession'); $systemdesc = $login->getKeywordUc('system'); $logoutdesc = $login->getKeywordUc('logout'); $helpdesc = $login->getKeywordUc('help'); $ffiledesc = get_plural(get_description("ffile")); $alldesc = $login->getKeywordUc('all'); if ($login->isAdmin()) { $doctype = "admin"; $domainclass = "domain"; } else { $doctype = "client"; $domainclass = "domain"; } if (check_if_many_server()) { $serverurl = $ghtml->getFullUrl('a=list&c=pserver'); $slavedesc = get_plural($slavedesc); } else { $serverurl = $ghtml->getFullUrl('k[class]=pserver&k[nname]=localhost&a=show'); } if ($login->is__table('client')) { $ffileurl = $ghtml->getFullUrl('k[class]=ffile&k[nname]=/&a=show'); } else { $ffileurl = $ghtml->getFullUrl('n=web&k[class]=ffile&k[nname]=/&a=show'); } $gob = $login->getObject('general')->generalmisc_b; if (isset($gob->ticket_url) && $gob->ticket_url) { $url = $gob->ticket_url; $url = add_http_if_not_exist($url); $ticket_url = "javascript:window.open('{$url}')"; } else { $ticket_url = "/display.php?frm_action=list&frm_o_cname=ticket"; } $helpurl = "http://wiki.lxcenter.org"; $gdata = array("desktop" => array($deskdesc, "/display.php?frm_action=desktop", "client_list.gif"), "home" => array($homedesc, "/display.php?frm_action=show", "client_list.gif"), "all" => array($alldesc, "/display.php?frm_action=list&frm_o_cname=all_domain", "client_list.gif"), "domain" => array($domaindesc, "/display.php?frm_action=list&frm_o_cname={$domainclass}", "domain_list.gif"), "system" => array($systemdesc, "/display.php?frm_action=show&frm_o_o[0][class]=pserver&frm_o_o[0][nname]=localhost", "pserver_list.gif"), "client" => array($clientdesc, "/display.php?frm_action=list&frm_o_cname=client", "client_list.gif"), "ffile" => array($ffiledesc, $ffileurl, "client_list.gif"), "pserver" => array($slavedesc, $serverurl, "pserver_list.gif"), "ticket" => array($ticketdesc, $ticket_url, "ticket_list.gif"), "ssession" => array($ssessiondesc, "/display.php?frm_action=list&frm_o_cname=ssessionlist", "ssession_list.gif"), "about" => array($aboutdesc, "/display.php?frm_action=about", "ssession_list.gif"), "help" => array($helpdesc, "javascript:window.open('{$helpurl}/')", "ssession_list.gif"), "logout" => array("<font color=red>{$logoutdesc}<font >", "javascript:top.mainframe.logOut();", "delete.gif")); }
function getTicketMessageUrl(&$alist) { $gob = $this->getObject('general')->generalmisc_b; //$this->getListActions($alist, 'ticket'); if (isset($gob->ticket_url) && $gob->ticket_url) { $url = $gob->ticket_url; $url = add_http_if_not_exist($url); $alist[] = create_simpleObject(array('url' => $url, 'purl' => 'a=list&c=ticket', 'target' => 'target=_blank')); } else { $alist[] = "a=list&c=ticket"; } $alist[] = "a=list&c=smessage"; }
function getDocumentRoot($subweb) { global $gbl, $sgbl, $login, $ghtml; $path = "{$this->main->getFullDocRoot()}/"; // Issue #656 - When adding a subdomain, the Document Root field is not being validated // Adding quotations so that we can work with directories with spaces // MR -- also for other lines $string = null; if ($this->main->isOn('status')) { $string .= "DocumentRoot \"{$path}\"\n\n"; } else { if ($this->main->__var_disable_url) { $url = add_http_if_not_exist($this->main->__var_disable_url); $string .= "\tRedirect / \"{$url}\"\n\n"; } else { $disableurl = "/home/kloxo/httpd/disable/"; $string .= "\tDocumentRoot \"{$disableurl}\"\n\n"; } } return $string; }
static function getCreateWebmail($list, $isdisabled = null) { global $gbl, $sgbl, $login, $ghtml; foreach ($list as $l) { $webdata = null; $rlflag = !isset($l['remotelocalflag']) ? 'local' : $l['remotelocalflag']; $prog = !isset($l['webmailprog']) || $l['webmailprog'] === '--system-default--' ? "" : $l['webmailprog']; if (!$prog && $rlflag !== 'remote' && !$isdisabled) { $webdata .= "### 'webmail.{$l['nname']}' handled by ../webmails/webmail.conf ###\n\n"; continue; } $webdata .= "\$HTTP[\"host\"] =~ \"^webmail.{$l['nname']}\" { \n\n"; if ($l['remotelocalflag'] === 'remote') { $l['webmail_url'] = add_http_if_not_exist($l['webmail_url']); $webdata .= "\turl.redirect = ( \"/\" => \"{$l['webmail_url']}\")\n\n"; } else { if ($isdisabled) { $webdata .= "\tserver.document-root = \"{$sgbl->__path_kloxo_httpd_root}/disable/\"\n"; } else { $prog = $l['webmailprog'] === '--chooser--' ? "" : $l['webmailprog']; if ($prog) { $webdata .= "\tserver.document-root = \"{$sgbl->__path_kloxo_httpd_root}/webmail/{$prog}/\"\n\n"; } else { $webdata .= "\tserver.document-root = \"{$sgbl->__path_kloxo_httpd_root}/webmail/\"\n\n"; } } $webdata .= "\tserver.errorlog = \"/home/kloxo/httpd/lighttpd/error.log\"\n"; $webdata .= "\tcgi.assign = ( \".php\" => \"/home/httpd/nobody.sh\" )\n\n"; } $webdata .= "}\n\n"; } return $webdata; }