Пример #1
0
function external_storage_usb_list()
{
    $sock = new sockets();
    $datas = $sock->getfile('smb_scan');
    $finalHash = computer_list();
    $list = "\n\t\n\t<table style='width:100%'><tr>";
    $tb = explode("\n", $datas);
    if (is_array($tb)) {
        $count = 0;
        while (list($uid, $line) = each($tb)) {
            if (preg_match("#^([0-9\\.]+)\\s+(.+?)\\s+.+?\\[(.+?)\\]#", $line, $re)) {
                $finalHash[strtolower($re[2])] = $re[1];
            }
        }
    }
    if (is_array($finalHash)) {
        while (list($uid, $line) = each($finalHash)) {
            if ($count == 3) {
                $list = $list . "</tr><tr>";
                $count = 0;
            }
            $list = $list . "<td>" . Paragraphe32("noacco:{$uid}", $line, "Loadjs('ComputerBrowse.php?&computer={$uid}&field={$_GET["set-field"]}&format-artica=yes');", "32-network-server.png", 150) . "</td>";
            $count = $count + 1;
        }
    }
    $list = $list . "</tr>\t</table>";
    $html = $list;
    $tpl = new templates();
    return $tpl->_ENGINE_parse_body($html, "dar.index.php");
}
Пример #2
0
function amavis_popup()
{
    $t = time();
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new sockets();
    $enable_amavisdeamon_ask = $tpl->javascript_parse_text("{enable_amavisdeamon_ask}");
    $disable_amavisdeamon_ask = $tpl->javascript_parse_text("{disable_amavisdeamon_ask}");
    $EnableAmavisDaemon = intval(trim($sock->GET_INFO("EnableAmavisDaemon", true)));
    $EnableAmavisInMasterCF = intval(trim($sock->GET_INFO("EnableAmavisInMasterCF")));
    if ($EnableAmavisDaemon == 0) {
        $EnableAmavisDaemonP = "{amavis_is_currently_disabled_text}";
    } else {
        $EnableAmavisDaemonP = "{amavis_is_currently_enabled_text}";
    }
    $prepost = Paragraphe("folder-equerre-64.png", '{postfix_hooking}', '{postfix_hooking_text}', "javascript:Loadjs('{$page}?hooking-js=yes')", 'postfix_hooking_text', 210, 100);
    $tr[] = $EnableAmavisDaemonP;
    $tr[] = Paragraphe32("watchdog", "watchdog_amavis_text", "Loadjs('amavis.daemon.watchdog.php')", "watchdog-32.png");
    $tr[] = Paragraphe32("postfix_hooking", "postfix_hooking_text", "Loadjs('amavis.index.php?hooking-js=yes')", "folder-equerre-32.png");
    $tr[] = Paragraphe32("amavis_wizard_rule_per_user", "amavis_wizard_rule_per_user_text", "Loadjs('amavis.wizard.users.php')", "32-wizard.png");
    $tr[] = Paragraphe32("reload_service", "reload_service_text", "AmavisCompileRules()", "service-restart-32.png");
    $EnableAmavisInMasterCFT = "{postfix_afterqueue}";
    $EnableAmavisInMasterCFE = "{postfix_afterqueue_text}";
    //https://192.168.1.213:9000/amavis.daemon.watchdog.php?_=1345459954124
    if ($EnableAmavisInMasterCF == 0) {
        $EnableAmavisInMasterCFT = "{postfix_beforequeue}";
        $EnableAmavisInMasterCFE = "{postfix_beforequeue_text}";
    }
    $html = "<table style='width:100%'>\n\t<tr>\n\t\t<td width=1% valign='top'>\n\t\t\t<div id='status-{$t}'></div>\n\t\t</td>\n\t\t<td valign='top' style='padding-left:20px'>\n\t\t\t<div style='font-size:32px;margin:bottom:10px;text-align:right'>{APP_AMAVIS}</div>\n\t\t\t" . Paragraphe_switch_img("{EnableAmavisDaemon}", "{AMAVIS_DEF}<br>{$EnableAmavisDaemonP}", "EnableAmavisDaemon", $EnableAmavisDaemon, null, 700) . "\n\t\t\t" . Paragraphe_switch_img("{postfix_afterqueue}", "{postfix_afterqueue_text}", "EnableAmavisInMasterCF", $EnableAmavisInMasterCF, null, 700) . "\n\t\t\t<p class=text-info style='font-size:14px'><strong style='font-size:16px'>{currently}:{$EnableAmavisInMasterCFT}</strong><br>{$EnableAmavisInMasterCFE}</p>\n\t\t\t<hr>\n\t\t\t<div style='width:100%;text-align:right'>" . button("{apply}", "SaveEnablePopupAmavis()", 26) . "</div>\n\t\t</td>\n\t</tr>\n\t</table>\n\t<script>\n\t\n\tvar x_EnablePopupAmavis= function (obj) {\n\t\tvar tempvalue=obj.responseText;\n\t\tif(tempvalue.length>3){alert(tempvalue);}\t\n\t\tRefreshTab('main_config_amavis');\n\t}\t\n\t\n\t\tfunction EnablePopupAmavis(){\n\t\t\tif(confirm('{$enable_amavisdeamon_ask}')){\n\t\t\t\tvar XHR = new XHRConnection();\n\t\t\t\tXHR.appendData('enable-amavis','yes');\n\t\t\t\tAnimateDiv('explain-{$t}');\n\t\t\t\tXHR.sendAndLoad('amavis.daemon.status.php', 'POST',x_EnablePopupAmavis);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfunction SaveEnablePopupAmavis(){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('EnableAmavisDaemon',document.getElementById('EnableAmavisDaemon').value);\n\t\t\tXHR.appendData('EnableAmavisInMasterCF',document.getElementById('EnableAmavisInMasterCF').value);\n\t\t\tXHR.sendAndLoad('amavis.daemon.status.php', 'POST',x_EnablePopupAmavis);\n\t\t}\n\t\n\t\n\t\n\t\tLoadAjax('status-{$t}','{$page}?status=yes&t={$t}');\n\t\t\n\t\t\n\t</script>\n\t\n\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
Пример #3
0
function external_storage_usb()
{
    $list = external_storage_usb_list();
    $page = CurrentPageName();
    $tpl = new templates();
    $html = "\n\t<H1>{use_usb_storage}</H1>\n\t<table style='width:99%'>\n\t<tr>\n\t<td valign='top' with=70%>\n\t<p class=caption>{use_usb_storage_text}</p>\n\t<strong style='font-size:12px'>{use_usb_storage_explain}</strong>\n\t</td>\n\t<td valign='top' align='center' width=30%>\n\t" . Paragraphe32("refresh", "refresh_text_usb", "LoadAjax('usblistp','{$page}?external-storage-usb-list=yes')", "64-usb-refresh.png") . "\n\t</td>\n\t</tr>\n\t</table>\n\t<hr>\n\t<div style='width:100%;height:300px;overflow:auto;padding:3px;' id='usblistp'>\n\t\t{$list}\n\t</div>\n\t";
    echo $tpl->_ENGINE_parse_body($html, "dar.index.php");
}
Пример #4
0
function squid_infra(){
	$page=CurrentPageName();
	$tpl=new templates();
	$squid_all_ports=squid_all_ports();
	
	$help=Paragraphe32("my_browsers", "how_to_connect_browsers", "Loadjs('$page?mybrowsers-js=yes')", "info-24.png");
	
	$html="
	<div class=form style='width:93%'>		
	$squid_all_ports
	</div>
	<br>$help";
	
	echo $tpl->_ENGINE_parse_body($html);
	
	//
}
Пример #5
0
function add_task()
{
    //$list=software_list();
    $add = Paragraphe("software-task-64.png", "{ADD_NEW_DEPLOY_TASK}", "{ADD_NEW_DEPLOY_TASK_TEXT}", "javascript:AddRemoteTask()");
    $refresh = Paragraphe("64-refresh.png", "{refresh}", "{resfresh_tasks_list}", "javascript:RefreshSoftwaresList()");
    if (!isset($_GET["taskid"])) {
        $_GET["taskid"] = 0;
    }
    if ($_GET["taskid"] == 0) {
        $comp = new computers($_GET["uid"]);
        $ini = new Bs_IniHandler();
        $ini->loadString($comp->ComputerCryptedInfos);
        $username = $ini->_params["ACCOUNT"]["USERNAME"];
        $password = $ini->_params["ACCOUNT"]["PASSWORD"];
        $title = "{ADD_NEW_DEPLOY_TASK}:: {$_GET["uid"]}";
    } else {
        $sql = "SELECT * FROM deploy_tasks WHERE ID='{$_GET["taskid"]}'";
        $q = new mysql();
        $ligne = @mysql_fetch_array($q->QUERY_SQL($sql, 'artica_backup'));
        $username = $ligne["username"];
        $password = $ligne["password"];
        $commandline = $ligne["commandline"];
        $debug_mode = $ligne["debug_mode"];
        $files_id = $ligne["files_id"];
        $title = "{task}:: {$_GET["taskid"]}";
        $results = $ligne["results"];
        $executed = $ligne["executed"];
        if ($executed > 0) {
            $change_status = Paragraphe32("restart_task", "restart_task_text", "RestartTask({$_GET['taskid']})", "32-redo.png", 190);
        }
    }
    $tbl = explode("\n", $results);
    if (is_array($tbl)) {
        while (list($num, $line) = each($tbl)) {
            $logs = $logs . "<code style='font-size:10px'>{$line}</code>";
        }
    }
    $list = task_dropdown($files_id);
    if ($files_id > 0) {
        $sql = "SELECT commandline,description FROM files_storage WHERE id_files={$files_id}";
        $ligne2 = @mysql_fetch_array($q->QUERY_SQL($sql, 'artica_backup'));
        $default_commandline = $ligne2["commandline"];
        $description = htmlspecialchars(utf8_decode($ligne2["description"]));
    }
    $form = "\n\t<div id='taskdiv'>\n\t<table style='width:99%' class=form>\n\t<tr>\n\t<td valign='top' class=legend>{package}:</td>\n\t<td>{$list} p.{$files_id}</td>\n\t<tr>\n\t<td valign='top' class=legend></td>\n\t\t<td ><p class=caption>{$description}</p></td>\n\t</tr>\n\t<tr>\n\t<td valign='top' class=legend nowrap>{commandline}:</td>\n\t<td>" . Field_text("commandline", $commandline) . "</td>\n\t</tr>\n\t<tr>\n\t<td valign='top' class=legend nowrap>{default}:</td>\n\t<td><span id='default_commandline'><code>{$default_commandline}</code></span></td>\n\t</tr>\t\n\t<tr>\n\t<td valign='top' class=legend nowrap>{runas}:</td>\n\t<td>" . Field_text("username", $username) . "</td>\n\t</tr>\n\t<tr>\n\t<td valign='top' class=legend nowrap>{password}:</td>\n\t<td>" . Field_password("password", $password) . "</td>\n\t</tr>\n\t<tr>\n\t<td valign='top' class=legend nowrap>{debug_mode}:</td>\n\t<td>" . Field_checkbox("debug_mode", 1, $debug_mode) . "</td>\n\t</tr>\t\t\n\t<tr>\n\t\n\t\n\t\n\t\t<td colspan=2 align='right'><input type='button' OnClick=\"javascript:SaveTask('{$_GET["taskid"]}');\" value=\"{apply}&nbsp;&raquo;\"></td>\n\t</tr>\t\t\n\t</table>\t\n\t</div>\n\t";
    $html = "<H1>{$title}</H1>\n\t<table style='width:99%'>\n\t<tr>\n\t<td valign='top'>\n\t\t\n\t\t<table style='width:99%'>\n\t\t\t<tr><td valign='top' width=99%><p class=caption>{ADD_NEW_DEPLOY_TASK_TEXT}</p><p class=caption>{remote_install_text}</p></td>\n\t\t\t<td valign='top'>{$change_status}</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t" . RoundedLightWhite("<div id='ri_list' style='width:100%;'>{$form}</div>") . "\n\t\t<hr>\n\t\t" . RoundedLightWhite("<div id='ri_logs' style='width:100%;height:250px;overflow:auto'>{$logs}</div>") . "\n\t</td>\n\t</tr>\n\t</table>";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html, 'storage.center.php');
}
Пример #6
0
function page()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $blackbox = new blackboxes($_GET["nodeid"]);
    $squid = new squidbee();
    $hostid = $_GET["hostid"];
    $t = time();
    $tpl = new templates();
    $t = time();
    $tr = array();
    $ini = new Bs_IniHandler();
    $ini->loadString($blackbox->SquidSMPStatus);
    while (list($index, $line) = each($ini->_params)) {
        if ($GLOBALS["VERBOSE"]) {
            echo __FUNCTION__ . "::" . __LINE__ . "::{$index} -> DAEMON_STATUS_ROUND<br>\n";
        }
        $tr[] = DAEMON_STATUS_ROUND($index, $ini, null, 1);
    }
    if (count($tr) > 0) {
        $tr[] = squid_booster_smp($blackbox->BoosterSMPStatus);
        $smpstatus = CompileTr3($tr);
    }
    $actions[] = Paragraphe32("reload_proxy_service", "reload_proxy_service_text", "SquidNodeReload{$t}()", "reload-32.png");
    $actions[] = Paragraphe32("restart_proxy_service", "restart_proxy_service_text", "SquidNodeRestart{$t}()", "service-restart-32.png");
    $actions[] = Paragraphe32("reconfigure_proxy_service", "reconfigure_proxy_service_text", "SquidNodeReconf{$t}()", "reconfigure-32.png");
    $actions[] = Paragraphe32("configuration_file", "display_generated_configuration_file", "Loadjs('nodes.squid.conf.php?nodeid={$_GET["nodeid"]}')", "script-32.png");
    $action = CompileTr3($actions);
    $nodes_names = $squid->visible_hostname;
    if (isset($squid->nodes_names[$hostid])) {
        $nodes_names = $squid->nodes_names[$hostid];
    }
    $html = "\n\t<div id='{$t}'></div>\n\t<table style='width:99%' class=form>\n\t\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:14px'>{ipaddr}:</td>\n\t\t\t\t<td><strong style='font-size:14px'><strong style='font-size:14px'>{$blackbox->ipaddress}:{$blackbox->port}</td>\n\t\t\t</tr>\t\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:14px'>{APP_SQUID}:</td>\n\t\t\t\t<td><strong style='font-size:14px'><strong style='font-size:14px'>{$blackbox->squid_version}</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:14px'>{visible_hostname}:</td>\n\t\t\t\t<td><strong style='font-size:14px'><strong style='font-size:14px'>\n\t\t\t\t\t<a href=\"javascript:Loadjs('{$page}?visible-hostname-js=yes&hostid={$hostid}&nodeid={$_GET["nodeid"]}');\"\n\t\t\t\t\t style='font-size:14px;text-decoration:underline;font-weight:bold'>{$nodes_names}</a>\n\t\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:14px'>{last_status}:</td>\n\t\t\t\t<td><strong style='font-size:14px'>{$blackbox->laststatus}</td>\n\t\t\t</tr>\t\t\n\t\t\t</table>\n\t\t\n\t\t\n\t\t\n\t{$smpstatus}\n\t{$action}\n\t\n\t<script>\n\tvar x_SquidNodeReload{$t}= function (obj) {\n\t\tvar res=obj.responseText;\n\t\tif (res.length>3){alert(res);}\n\t\tdocument.getElementById('{$t}').innerHTML='';\n\t\tif(document.getElementById('main_squid_quicklinks_tabs{$_GET["nodeid"]}')){\n\t\t\tRefreshTab('main_squid_quicklinks_tabs{$_GET["nodeid"]}');\n\t\t}\n\t}\t\n\n\n\tfunction SquidNodeReload{$t}(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('reconfigure-squid','{$hostid}');\n\t\tAnimateDiv('{$t}');\n\t\tXHR.sendAndLoad('{$page}', 'POST',x_SquidNodeReload{$t});\n\t}\n\t\n\tfunction SquidNodeRestart{$t}(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('restart-squid','{$hostid}');\n\t\tAnimateDiv('{$t}');\n\t\tXHR.sendAndLoad('{$page}', 'POST',x_SquidNodeReload{$t});\n\t}\n\n\tfunction SquidNodeReconf{$t}(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('reconf-squid','{$hostid}');\n\t\tAnimateDiv('{$t}');\n\t\tXHR.sendAndLoad('{$page}', 'POST',x_SquidNodeReload{$t});\t\n\t\n\t}\n\t\n\tLoadAjax('{$t}-filters','{$page}?filters-specific=yes&hostid={$hostid}');\n\t\n\t</script>\n\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
Пример #7
0
function main_disks_discover()
{
    $users = new usersMenus();
    $Disks = $users->disks_size;
    $page = CurrentPageName();
    $sock = new sockets();
    $dd = new harddrive();
    $ArticaDBPath = $sock->GET_INFO("ArticaDBPath");
    if ($ArticaDBPath == null) {
        $ArticaDBPath = "/opt/articatech";
    }
    $arrayDisks = $dd->getDiskList();
    $html = "<tr>";
    if (is_array($arrayDisks)) {
        $count = 0;
        $tr = null;
        while (list($disk, $ARRAY_FINAL) = each($arrayDisks)) {
            $content = null;
            $path = $ARRAY_FINAL["MOUNTED"];
            if ($path == "/boot") {
                continue;
            }
            if ($path == "{$ArticaDBPath}") {
                continue;
            }
            if ($path == "/usr/share/artica-postfix") {
                continue;
            }
            if (isset($already[$path])) {
                continue;
            }
            if ($path == null) {
                continue;
            }
            $already[$path] = true;
            $size = $ARRAY_FINAL["SIZE"];
            $label = $ARRAY_FINAL["LABEL"];
            if ($size == null) {
                continue;
            }
            $pourc = $ARRAY_FINAL["POURC"];
            $js = "Loadjs('SambaBrowse.php?jdisk={$disk}&mounted={$path}&t={$_GET["t"]}&homeDirectory={$_GET["homeDirectory"]}&no-shares={$_GET["no-shares"]}&field={$_GET["field"]}&protocol={$_GET["protocol"]}&no-hidden={$_GET["no-hidden"]}&functionAfter={$_GET["functionAfter"]}')";
            $disk_name = $disk;
            if (preg_match("#mapper\\/.+?\\-(.+)#", $disk_name, $re)) {
                $disk_name = $re[1];
            }
            if (preg_match("#([0-9]+)\\s+MB#", $size, $re)) {
                $size = $size * 1000;
                $size = FormatBytes($size);
                $size = str_replace(" ", "&nbsp;", $size);
            }
            $dirname = basename($path);
            $bandwith_color = "#5DD13D";
            if ($pourc > 70) {
                $bandwith_color = "#F59C44";
            }
            if ($pourc > 95) {
                $bandwith_color = "#D32D2D";
            }
            $count = $count + 1;
            if ($count == 2) {
                $tr = "</tr><tr>";
                $count = 0;
            } else {
                $tr = null;
            }
            $content = "({$size} - {$pourc}% {used})<br><strong>{$path}</strong><br><strong>{$label}</strong>\n\t\t\t\t\t<br><div style='margin-top:-10px'>" . pourcentage_basic($pourc, $bandwith_color, $size) . "</div>";
            $FINALDISKS[] = Paragraphe32("noacco:{$disk_name}", "{$content}", $js, "48-hd.png");
        }
    }
    if (is_array($added_disks_array)) {
        while (list($disk, $path) = each($added_disks_array)) {
            $js = "Loadjs('SambaBrowse.php?jdisk={$disk}&mounted={$path}&t={$_GET["t"]}&homeDirectory={$_GET["homeDirectory"]}&no-shares={$_GET["no-shares"]}&field={$_GET["field"]}&protocol={$_GET["protocol"]}&no-hidden={&functionAfter={$_GET["functionAfter"]}}')";
            $delete = imgtootltip("ed_delete.gif", "{delete} {$disk}...", "DeleteHiddenDisk('{$disk}')");
            $FINALDISKS[] = Paragraphe32("noacco:{$disk}", "{$disk}<br>", $js, "48-hd.png", 220);
        }
    }
    if ($_GET["field"] != null) {
        $js = "Loadjs('autofs.wizard.php?field={$_GET["field"]}')";
        $FINALDISKS[] = Paragraphe32("remote_connection", "remote_connection_wizard_text", $js, "folder-granted-properties-48.png", 220);
    }
    $finalfinal = CompileTr3($FINALDISKS);
    $add_disk = Paragraphe("64-hd-plus.png", "{invisible_disk}", "{add_invisible_disk_text}", "javascript:Loadjs('{$page}?hidden-add=yes')");
    $html = "\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td style='width:100%'><div style='font-size:18px'>{select_disk}</div></td>\n\t\t<td>\n\t<table style='width:5%'>\n\t<tr>\n\t\t<td width=1%>" . imgtootltip("32-hd-plus.png", "{add_invisible_disk_text}", "Loadjs('{$page}?hidden-add=yes')") . "</td>\n\t\t<td width=99% nowrap><a href=\"javascript:blur();\" OnClick=\"javascript:Loadjs('{$page}?hidden-add=yes')\" style='font-size:14px;text-decoration:underline'>{invisible_disk}</a></td>\n\t</tr>\n\t</table>\n\t</td>\n\t</tr>\n\t</table>\n{$finalfinal}\n\t\n\t\n\t";
    $tpl = new templates();
    return $tpl->_ENGINE_parse_body($html, 'fileshares.index.php');
}
Пример #8
0
function kerbchkconf()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $users = new usersMenus();
    if (!$users->MSKTUTIL_INSTALLED) {
        echo $tpl->_ENGINE_parse_body(Paragraphe32("APP_MSKTUTIL", "APP_MSKTUTIL_NOT_INSTALLED", "Loadjs('setup.index.php?js=yes');", "error-24.png"));
        return;
    }
    $sock = new sockets();
    $array = unserialize(base64_decode($sock->GET_INFO("KerbAuthInfos")));
    if ($users->SAMBA_INSTALLED) {
        if ($array["ADNETBIOSDOMAIN"] == null) {
            echo $tpl->_ENGINE_parse_body(Paragraphe32("MISSING_PARAMETER", "ADNETBIOSDOMAIN", null, "error-24.png"));
            return;
        }
    }
    if ($array["WINDOWS_DNS_SUFFIX"] == null) {
        echo $tpl->_ENGINE_parse_body(Paragraphe32("MISSING_PARAMETER", "WINDOWS_DNS_SUFFIX", null, "error-24.png"));
        return;
    }
    if ($array["WINDOWS_SERVER_NETBIOSNAME"] == null) {
        echo $tpl->_ENGINE_parse_body(Paragraphe32("MISSING_PARAMETER", "WINDOWS_SERVER_NETBIOSNAME", null, "error-24.png"));
        return;
    }
    if ($array["WINDOWS_SERVER_TYPE"] == null) {
        echo $tpl->_ENGINE_parse_body(Paragraphe32("MISSING_PARAMETER", "WINDOWS_SERVER_TYPE", null, "error-24.png"));
        return;
    }
    if ($array["WINDOWS_SERVER_ADMIN"] == null) {
        echo $tpl->_ENGINE_parse_body(Paragraphe32("MISSING_PARAMETER", "administrator", null, "error-24.png"));
        return;
    }
    if ($array["WINDOWS_SERVER_PASS"] == null) {
        echo $tpl->_ENGINE_parse_body(Paragraphe32("MISSING_PARAMETER", "password", null, "error-24.png"));
        return;
    }
    $hostname = strtolower(trim($array["WINDOWS_SERVER_NETBIOSNAME"])) . "." . strtolower(trim($array["WINDOWS_DNS_SUFFIX"]));
    $ip = gethostbyname($hostname);
    if ($ip == $hostname) {
        echo $tpl->_ENGINE_parse_body(Paragraphe32("WINDOWS_NAME_SERVICE_NOT_KNOWN", "noacco:<strong style='font-size:12px'>{$hostname}</strong>", null, "error-24.png"));
        return;
    }
}
Пример #9
0
function LDAP_CONFIG_NET()
{
    $sock = new sockets();
    $ldap = new clladp();
    $page = CurrentPageName();
    $nets[null] = "{loopback}";
    $nets["all"] = "{all}";
    $return = Paragraphe32("troubleshoot", "troubleshoot_explain", "Loadjs('index.troubleshoot.php');", "48-troubleshoots.png", 180);
    $superuser = Paragraphe32("account", "accounts_text", "Loadjs('artica.settings.php?js=yes&func-AccountsInterface=yes')", "superuser-48.png", 180);
    $loglevel_hash = array(0 => "{none}", 256 => "{basic}", 512 => "stats log entries sent", 1024 => "Communications", 16384 => "{synchronization}", 2048 => "{debug}");
    $CACHE_AGES[0] = "{never}";
    $CACHE_AGES[30] = "30 {minutes}";
    $CACHE_AGES[60] = "1 {hour}";
    $CACHE_AGES[120] = "2 {hours}";
    $CACHE_AGES[360] = "6 {hours}";
    $CACHE_AGES[720] = "12 {hours}";
    $CACHE_AGES[1440] = "1 {day}";
    $CACHE_AGES[2880] = "2 {days}";
    $CACHE_AGES[4320] = "3 {days}";
    $CACHE_AGES[10080] = "1 {week}";
    $CACHE_AGES[20160] = "2 {weeks}";
    $CACHE_AGES[43200] = "1 {month}";
    $RestartLDAPEach = $sock->GET_INFO("RestartLDAPEach");
    if (!is_numeric($RestartLDAPEach)) {
        $RestartLDAPEach = 4320;
    }
    $LockLdapConfig = $sock->GET_INFO("LockLdapConfig");
    $OpenLDAPLogLevel = $sock->GET_INFO("OpenLDAPLogLevel");
    if (!is_numeric($OpenLDAPLogLevel)) {
        $OpenLDAPLogLevel = 256;
    }
    if (!is_numeric($LockLdapConfig)) {
        $LockLdapConfig = 0;
    }
    $loglevel_field = Field_array_Hash($loglevel_hash, "OpenLDAPLogLevel", $OpenLDAPLogLevel, "style:font-size:13px;padding:3px");
    $restart_field = Field_array_Hash($CACHE_AGES, "RestartLDAPEach", $RestartLDAPEach, "style:font-size:13px;padding:3px");
    $form_network = "\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'>\n\t\t\t<img src='img/ldap-performances-128.png'><hr>{$return}{$superuser}</td>\n\t\t<td valign='top'>\n\t<div style='font-size:16px;margin-bottom:10px'>{ldap_suffix}: <a href=\"javascript:blur();\" OnClick=\"javascript:Loadjs('openldap.changesuffix.php');\"\n\tstyle='font-size:16px;text-decoration:underline;font-weight:bold'>{$ldap->suffix}</a></div>\n\t<div id='ParseFormLDAPNET'>\n\t\t\t<table style='width:99%' class=form>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=legend nowrap>{LockLdapConfig}:</td>\n\t\t\t\t\t<td><strong style='font-size:11px' nowrap>" . Field_checkbox("LockLdapConfig", 1, $LockLdapConfig, "LockLdapConfigCheck()") . "</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=legend nowrap>{allowanonymouslogin}:</td>\n\t\t\t\t\t<td><strong style='font-size:11px' nowrap>" . Field_checkbox("LdapAllowAnonymous", 1, $sock->GET_INFO('LdapAllowAnonymous')) . "</td>\n\t\t\t\t</tr>\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=legend nowrap>{remote_addressbook_text}:</td>\n\t\t\t\t\t<td><strong style='font-size:11px' nowrap>" . Field_checkbox("EnableRemoteAddressBook", 1, $sock->GET_INFO('EnableRemoteAddressBook')) . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=legend nowrap>{log_level}:</td>\n\t\t\t\t\t<td><strong style='font-size:11px' nowrap>{$loglevel_field}</td>\n\t\t\t\t</tr>\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=legend nowrap>{restart_service_each}:</td>\n\t\t\t\t\t<td><strong style='font-size:11px' nowrap>{$restart_field}</td>\n\t\t\t\t</tr>\t\t\t\t\t\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=2 align='right'><hr>\n\t\t\t\t\t" . button("{apply}", "ParseFormLDAPNET()", "14px") . "\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\t\n\t\t\t</table>\n\t\t<div id='ldap_networks'></div>\n\t\t<table style='width:99%' class=form>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=legend nowrap style='font-size:14px'>{other_network_card}:</td>\n\t\t\t\t\t<td>" . field_ipv4("other_network_card", null, "font-size:14px") . "</td>\n\t\t\t\t\t<td>" . button("{add}", "other_network_card_add()", "14px") . "\n\t\t\t\t</tr>\t\n\t\t</table>\n\t\t\n\t</div>\n\t</td>\n\t</tr>\n\t</table>\n\t<br>\n\t\n\t\n\t<script>\n\t\tfunction LoadLdapNets(){\n\t\t\tLoadAjax('ldap_networks','{$page}?ldap-networks-list=yes');\n\t\t}\n\t\t\n\tvar x_other_network_card_add= function (obj) {\n\t\tLoadLdapNets();\n\t\t}\t\t\n\t\n\tfunction other_network_card_add(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('ldap_other_network_card',document.getElementById('other_network_card').value);\n\t\tAnimateDiv('ldap_networks');\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_other_network_card_add);\n\t\n\t}\t\n\n\tfunction ParseFormLDAPNET(){\n\t\tvar LdapAllowAnonymous;\n\t\tvar EnableRemoteAddressBook;\n\t\tvar LockLdapConfig=0;\n\t\tif(document.getElementById('LockLdapConfig').checked){LockLdapConfig=1;}\n\t\tif(document.getElementById('LdapAllowAnonymous').checked){LdapAllowAnonymous=1;}else{LdapAllowAnonymous=0;}\n\t\tif(document.getElementById('EnableRemoteAddressBook').checked){EnableRemoteAddressBook=1;}else{EnableRemoteAddressBook=0;}\t\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('LdapAllowAnonymous',LdapAllowAnonymous);\n\t\tXHR.appendData('EnableRemoteAddressBook',EnableRemoteAddressBook);\n\t\tXHR.appendData('LockLdapConfig',LockLdapConfig);\n\t\tXHR.appendData('OpenLDAPLogLevel',document.getElementById('OpenLDAPLogLevel').value);\n\t\tXHR.appendData('RestartLDAPEach',document.getElementById('RestartLDAPEach').value);\n\t\t\n\t\t\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_ParseFormLDAP);\n\t\t}\n\n\tfunction LockLdapConfigCheck(){\n\t\tdocument.getElementById('LdapAllowAnonymous').disabled=true;\n\t\tdocument.getElementById('EnableRemoteAddressBook').disabled=true;\n\t\tdocument.getElementById('OpenLDAPLogLevel').disabled=true;\n\t\tif(document.getElementById('LdapListenIPAddr')){document.getElementById('LdapListenIPAddr').disabled=true;}\n\t\n\t\tif(!document.getElementById('LockLdapConfig').checked){\n\t\t\tdocument.getElementById('LdapAllowAnonymous').disabled=false;\n\t\t\tdocument.getElementById('EnableRemoteAddressBook').disabled=false;\n\t\t\tdocument.getElementById('OpenLDAPLogLevel').disabled=false;\n\t\t\tif(document.getElementById('LdapListenIPAddr')){document.getElementById('LdapListenIPAddr').disabled=false;}\t\t\n\t\t}\n\t}\n\t\t\n\tLoadLdapNets();\n\tLockLdapConfigCheck();\n\t</script>\n\t\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($form_network);
}
Пример #10
0
function ZARAFA_MAILBOX($uid)
{
    $u = new user($uid);
    $page = CurrentPageName();
    $sock = new sockets();
    $status = unserialize(base64_decode($sock->getFrameWork("cmd.php?zarafa-user-details={$uid}")));
    $languages = unserialize(base64_decode($sock->getFrameWork("zarafa.php?locales=yes")));
    while (list($index, $data) = each($languages)) {
        $langbox[$data] = $data;
    }
    $langbox[null] = "{select}";
    $zarafa_version = $sock->getFrameWork("zarafa.php?getversion=yes");
    preg_match("#^([0-9]+)\\.#", $zarafa_version, $re);
    $major_version = $re[1];
    if (!is_numeric($major_version)) {
        $major_version = 6;
    }
    $mailbox_language = Field_array_Hash($langbox, "zarafaMbxLang", $u->zarafaMbxLang, "style:font-size:13px;padding:3px");
    $mailboxsize = $status["Current store size"];
    if (preg_match("#([0-9]+)\\s+KB#", $mailboxsize, $re)) {
        $mailboxsize = FormatBytes($mailboxsize);
    }
    if (preg_match("#([0-9]+)\\/([0-9]+)\\/([0-9]+)\\s+(.+)#", $status["Last logon"], $re)) {
        $status["Last logon"] = date("D M", mktime(0, 0, 0, $re[1], $re[2], "20{$re[3]}")) . " {$re[4]}";
    }
    if (preg_match("#([0-9]+)\\/([0-9]+)\\/([0-9]+)\\s+(.+)#", $status["Last logoff"], $re)) {
        $status["Last logoff"] = date("D M", mktime(0, 0, 0, $re[1], $re[2], "20{$re[3]}")) . " {$re[4]}";
    }
    $mailboxinfos = Paragraphe32("mailbox_infos", "mailbox_zarafa_infos_text", "Loadjs('{$page}?ZARAFA_MAILBOX_INFOS=yes&uid={$uid}&userid={$uid}')", "32-infos.png");
    $ZarafaFeatures = $u->AnalyzeZarafaFeatures();
    $html = "<table style='width:100%'>\n\t<tr>\n\t\t<td width=1% valign='top'><img src='img/mailbox-zarafa-128.png' id='zfmbximg'><p>&nbsp;</p>{$mailboxinfos}</td>\n\t\t<td valign='top'><span style='font-size:18px'>{$u->DisplayName} {mailbox}</span>\n\t\t\t\t<table style='width:100%'>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=legend style='font-size:13px'>{mailbox_size}:</td>\n\t\t\t\t\t\t<td style='font-size:13px'><strong>{$mailboxsize}</strong></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=legend style='font-size:13px'>{last_logon}:</td>\n\t\t\t\t\t\t<td style='font-size:13px'><strong>{$status["Last logon"]}</strong></td>\n\t\t\t\t\t</tr>\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=legend style='font-size:13px'>{last_logoff}:</td>\n\t\t\t\t\t\t<td style='font-size:13px'><strong>{$status["Last logoff"]}</strong></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=legend style='font-size:13px'>{zarafaAdmin}:</td>\n\t\t\t\t\t\t<td style='font-size:13px'>" . Field_checkbox("zarafaAdmin", 1, $u->zarafaAdmin) . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=legend style='font-size:13px'>{zarafaSharedStoreOnly}:</td>\n\t\t\t\t\t\t<td style='font-size:13px'>" . Field_checkbox("zarafaSharedStoreOnly", 1, $u->zarafaSharedStoreOnly, "zarafaSharedStoreOnlyCheck()") . "</td>\n\t\t\t\t\t</tr>\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=legend style='font-size:13px'>{enable_imap}:</td>\n\t\t\t\t\t\t<td style='font-size:13px'>" . Field_checkbox("user_zarafa_enable_imap", 1, $ZarafaFeatures["imap"], "UserZarafaFeatures()") . "</td>\n\t\t\t\t\t</tr>\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=legend style='font-size:13px'>{enable_pop3}:</td>\n\t\t\t\t\t\t<td style='font-size:13px'>" . Field_checkbox("user_zarafa_enable_pop3", 1, $ZarafaFeatures["pop3"], "UserZarafaFeatures()") . "</td>\n\t\t\t\t\t</tr>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=legend style='font-size:13px'>{zarafaMbxLang}:</td>\n\t\t\t\t\t\t<td style='font-size:13px'>{$mailbox_language}</td>\n\t\t\t\t\t</tr>\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td colspan=2><span style='font-size:16px'>{zarfa_quota_title}</span>\n\t\t\t\t\t\t<div class='explain'>{zarfa_quota_title_explain}</div></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=legend style='font-size:13px'>{zarafaQuotaWarn}:</td>\n\t\t\t\t\t\t<td style='font-size:13px'>" . Field_text("zarafaQuotaWarn", $u->zarafaQuotaWarn, "font-size:13px;padding:3px;width:60px") . "&nbsp;MB</strong></td>\n\t\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=legend style='font-size:13px'>{zarafaQuotaSoft}:</td>\n\t\t\t\t\t\t<td style='font-size:13px'>" . Field_text("zarafaQuotaSoft", $u->zarafaQuotaSoft, "font-size:13px;padding:3px;width:60px") . "&nbsp;MB</strong></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=legend style='font-size:13px'>{zarafaQuotaHard}:</td>\n\t\t\t\t\t\t<td style='font-size:13px'>" . Field_text("zarafaQuotaHard", $u->zarafaQuotaHard, "font-size:13px;padding:3px;width:60px") . "&nbsp;MB</strong></td>\n\t\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t\t<td colspan=2 align='right'><hr>\n\t\t\t\t\t\t\t" . button("{apply}", "Loadjs('{$page}?zarafa-mailbox-edit=" . base64_encode($uid) . "')") . "</td>\n\t\t\t\t</tR>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t</table>\n\t\t</td>\n\t</tr>\n\t</table>\n\t\n\t<script>\n\t\tfunction CheckFields(){\n\t\t\tvar major_version={$major_version};\n\t\t\tdocument.getElementById('user_zarafa_enable_imap').disabled=true;\n\t\t\tdocument.getElementById('user_zarafa_enable_pop3').disabled=true;\n\t\t\t\n\t\t\t\n\t\t\tif(document.getElementById('zarafaSharedStoreOnly').checked){\n\t\t\t\tdocument.getElementById('zarafaAdmin').disabled=true;\n\t\t\t\tdocument.getElementById('zarafaQuotaWarn').disabled=true;\n\t\t\t\tdocument.getElementById('zarafaQuotaSoft').disabled=true;\n\t\t\t\tdocument.getElementById('zarafaQuotaHard').disabled=true;\n\t\t\t\treturn;\n\t\t\t}else{\n\t\t\t\tdocument.getElementById('zarafaAdmin').disabled=false;\n\t\t\t\tdocument.getElementById('zarafaQuotaWarn').disabled=false;\n\t\t\t\tdocument.getElementById('zarafaQuotaSoft').disabled=false;\n\t\t\t\tdocument.getElementById('zarafaQuotaHard').disabled=false;\t\t\t\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif(major_version>6){\n\t\t\t\tdocument.getElementById('user_zarafa_enable_imap').disabled=false;\n\t\t\t\tdocument.getElementById('user_zarafa_enable_pop3').disabled=false;\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tvar X_UserZarafaFeatures= function (obj) {\n\t\t\tvar results=obj.responseText;\n\t\t\tif(results.length>3){alert(results);retutn;}\n\t\t\tCheckFields();\n\t\t}\t\t\t\n\t\n\tfunction UserZarafaFeatures(){\n\t\tvar XHR = new XHRConnection();\n\t\tif(document.getElementById('user_zarafa_enable_imap').checked){XHR.appendData('user_zarafa_enable_imap','1');}else{XHR.appendData('user_zarafa_enable_imap','0');}\n\t\tif(document.getElementById('user_zarafa_enable_pop3').checked){XHR.appendData('user_zarafa_enable_pop3','1');}else{XHR.appendData('user_zarafa_enable_pop3','0');}\t\t\n\t\tXHR.appendData('uid','{$uid}');\n\t\tXHR.sendAndLoad('{$page}', 'POST',X_UserZarafaFeatures);\t\t\n\t\n\t}\n\t\n\tfunction zarafaSharedStoreOnlyCheck(){\n\t\tvar XHR = new XHRConnection();\n\t\tif(document.getElementById('zarafaSharedStoreOnly').checked){XHR.appendData('zarafaSharedStoreOnly','1');}else{XHR.appendData('zarafaSharedStoreOnly','0');}\n\t\tXHR.appendData('uid','{$uid}');\n\t\tXHR.sendAndLoad('{$page}', 'POST',X_UserZarafaFeatures);\t\n\t\t\n\t}\n\t\n\t\n\tCheckFields();\n\t</script>";
    $tpl = new templates();
    return $tpl->_ENGINE_parse_body($html);
}
Пример #11
0
function rule_edit()
{
    $ID = $_GET["rule"];
    $tpl = new templates();
    $users = new usersMenus();
    $page = CurrentPageName();
    $q = new mysql_squid_builder();
    $t = time();
    $DISABLE_DANS_FIELDS = 0;
    $groupmode[0] = "{banned}";
    $groupmode[1] = "{filtered}";
    $groupmode[2] = "{exception}";
    $button_name = "{apply}";
    $t = $_GET["t"];
    if ($ID < 0) {
        $button_name = "{add}";
    }
    $sock = new sockets();
    $EnableGoogleSafeSearch = $sock->GET_INFO("EnableGoogleSafeSearch");
    if (!is_numeric($EnableGoogleSafeSearch)) {
        $EnableGoogleSafeSearch = 1;
    }
    $ENDOFRULES[null] = "{select}";
    $ENDOFRULES["any"] = "{ufdb_any}";
    $ENDOFRULES["none"] = "{ufdb_none}";
    if ($ID > -1) {
        if (!$q->FIELD_EXISTS("webfilter_rules", "UseSecurity")) {
            $q->QUERY_SQL("ALTER TABLE `webfilter_rules` ADD `UseSecurity` smallint(1),ADD INDEX ( `UseSecurity` )");
        }
        $sql = "SELECT * FROM webfilter_rules WHERE ID={$ID}";
        $ligne = mysql_fetch_array($q->QUERY_SQL($sql));
    } else {
        if (!isset($ligne["endofrule"])) {
            $ligne["endofrule"] = "any";
        }
    }
    $users = new usersMenus();
    if ($users->DANSGUARDIAN_INSTALLED) {
        $squid = new squidbee();
        if ($users->enable_dansguardian == 0) {
            $users->DANSGUARDIAN_INSTALLED = false;
        }
    }
    if (!$users->DANSGUARDIAN_INSTALLED) {
        $DISABLE_DANS_FIELDS = 1;
    }
    $AsDefaultRule = false;
    if ($ID == 0) {
        $sock = new sockets();
        $ligne = unserialize(base64_decode($sock->GET_INFO("DansGuardianDefaultMainRule")));
        $ligne["groupname"] = "default";
        $DefaultPosition = $ligne["defaultPosition"];
        if (!is_numeric($DefaultPosition)) {
            $DefaultPosition = 0;
        }
        $AsDefaultRule = true;
    }
    if (!is_numeric($ligne["enabled"])) {
        $ligne["enabled"] = 1;
    }
    if (!is_numeric($ligne["searchtermlimit"])) {
        $ligne["searchtermlimit"] = 30;
    }
    if (!is_numeric($ligne["bypass"])) {
        $ligne["bypass"] = 0;
    }
    if (!is_numeric($ligne["groupmode"])) {
        $ligne["groupmode"] = 1;
    }
    if (!is_numeric($ligne["naughtynesslimit"])) {
        $ligne["naughtynesslimit"] = 50;
    }
    if (!is_numeric($ligne["embeddedurlweight"])) {
        $ligne["embeddedurlweight"] = 0;
    }
    if (!is_numeric($ligne["GoogleSafeSearch"])) {
        $ligne["GoogleSafeSearch"] = 0;
    }
    if (!is_numeric($ligne["UseExternalWebPage"])) {
        $ligne["UseExternalWebPage"] = 0;
    }
    if (!is_numeric($ligne["UseSecurity"])) {
        $ligne["UseSecurity"] = 0;
    }
    if (!isset($ligne["zOrder"])) {
        $ligne["zOrder"] = 0;
    }
    if (!isset($ligne["AllSystems"])) {
        $ligne["AllSystems"] = 0;
    }
    if (!isset($ligne["freeweb"])) {
        $ligne["freeweb"] = null;
    }
    if ($ligne["AllSystems"] == 1) {
        $explainAllSystems = "<div class=explain style='font-size:18px'>{AllSystemsDansExpl}</div>";
    }
    if ($EnableGoogleSafeSearch == 0) {
        $EnableGoogleSafeSearchField = "\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:18px'>{EnableGoogleSafeSearch}:</td>\n\t\t\t<td>" . Field_checkbox_design("EnableGoogleSafeSearch-{$t}", 1, $ligne["GoogleSafeSearch"]) . "</td>\n\t\t\t<td width=1%>&nbsp;</td>\n\t\t</tr>";
    }
    $bypass = Paragraphe32("bypass", "bypass_minitext", "Loadjs('dansguardian2.bypass.php?ID={$ID}')", "folder-32-routing-secure.png", 450);
    if ($ligne["groupmode"] == 0) {
        $stop = Paragraphe32("navigation_banned", "navigation_banned_text", "", "warn-red-48.png", 450);
    }
    if (!$users->DANSGUARDIAN_INSTALLED) {
        $bypass = null;
    }
    if ($ID < 0) {
        $bypass = null;
    }
    $HTTP_CODE[0] = "{default}";
    $HTTP_CODE["301"] = "{Moved_Permanently} (301)";
    $HTTP_CODE["302"] = "{Moved_Temporarily} (302)";
    $HTTP_CODE["303"] = "{http_code_see_other} (303)";
    /*
    * 		<td class=legend>{sslmitm}:</td>
    		<td>". Field_checkbox("sslmitm",1,$ligne["sslmitm"])."</td>
    		<td>&nbsp;</td>
    	</tr>
    	<tr>
    		<td class=legend>{sslcertcheck}:</td>
    		<td>". Field_checkbox("sslcertcheck",1,$ligne["sslcertcheck"])."</td>
    		<td>&nbsp;</td>
    	</tr>	
    */
    $specificDansguardian = "<tr>\n\t\t<td class=legend>{blockdownloads}:</td>\n\t\t<td>" . Field_checkbox_design("blockdownloads", 1, $ligne["blockdownloads"]) . "</td>\n\t\t<td>" . help_icon("{blockdownloads_text}") . "</td>\n\t</tr>\t\t\t\n\t<tr>\n\t\t<td class=legend>{deepurlanalysis}:</td>\n\t\t<td>" . Field_checkbox_design("deepurlanalysis", 1, $ligne["deepurlanalysis"]) . "</td>\n\t\t<td>" . help_icon("{deepurlanalysis_text}") . "</td>\n\t</tr>\n\t<tr>\n\t\t\n\t<tr>\n\t\t<td class=legend>{naughtynesslimit}:</td>\n\t\t<td>" . Field_text("naughtynesslimit", $ligne["naughtynesslimit"], "font-size:14px;width:60px") . "</td>\n\t\t<td width=1%>" . help_icon("{naughtynesslimit_text}") . "</td>\n\t</tr>\t\t\n\t<tr>\n\t\t<td class=legend>{searchtermlimit2}:</td>\n\t\t<td>" . Field_text("searchtermlimit", $ligne["searchtermlimit"], "font-size:14px;width:60px") . "</td>\n\t\t<td width=1%>" . help_icon("{searchtermlimit_explain2}") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend>{embeddedurlweight}:</td>\n\t\t<td>" . Field_text("embeddedurlweight", $ligne["embeddedurlweight"], "font-size:14px;width:60px") . "</td>\n\t\t<td>" . help_icon("{embeddedurlweight_text}") . "</td>\n\t</tr>";
    $DefaultRulePostition = null;
    if ($AsDefaultRule) {
        $arrayPos[0] = "{at_the_top_rules}";
        $arrayPos[1] = "{at_the_end_of_rules}";
        $DefaultRulePostition = "\t\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{position}:</td>\n\t\t<td style='font-size:18px'>" . Field_array_Hash($arrayPos, "defaultPosition-{$t}", $DefaultPosition, null, null, 0, "font-size:16px;") . "</td>\n\t\t<td style='font-size:18px'>&nbsp;</td>\n\t</tr>";
    }
    $html = "{$explainAllSystems}\n\t<div id='dansguardinMainRuleDiv'>\n\t<input type='hidden' id='bypass' value='{$ligne["bypass"]}'>\n\t<table style='width:100%'>\n\t<tbody>\n\t<tr>\n\t\t<td>{$bypass}</td>\n\t\t<td>{$stop}</td>\n\t</tr>\n\t</tbody>\n\t</table>\n\t<div style='width:98%' class=form>\n\t<table style='width:100%'>\n\t<tbody>\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{$ID})&nbsp;{rule_name}:</td>\n\t\t<td style='font-size:16px'>" . Field_text("groupname", $ligne["groupname"], "font-size:18px;") . "</td>\n\t\t<td style='font-size:16px'>&nbsp;</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{enabled}:</td>\n\t\t<td style='font-size:18px'>" . Field_checkbox_design("enabled", 1, $ligne["enabled"]) . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\n\t{$DefaultRulePostition}\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{AllSystems}:</td>\n\t\t<td style='font-size:16px'>" . Field_checkbox_design("AllSystems-{$t}", 1, $ligne["AllSystems"]) . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{check_SSL_protocol}:</td>\n\t\t<td style='font-size:16px'>" . Field_checkbox_design("UseSecurity-{$t}", 1, $ligne["UseSecurity"]) . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\n\t{$EnableGoogleSafeSearchField}\t\t\t\n\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{groupmode}:</td>\n\t\t<td style='font-size:16px'>" . Field_array_Hash($groupmode, "groupmode", $ligne["groupmode"], "style:font-size:18px;") . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{finish_rule_by}:</td>\n\t\t<td style='font-size:16px'>" . Field_array_Hash($ENDOFRULES, "endofrule", $ligne["endofrule"], "style:font-size:18px;") . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{order}:</td>\n\t\t<td style='font-size:16px'>" . Field_text("zOrder-{$t}", $ligne["zOrder"], "font-size:18px;width:90px") . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{redirect_behavior}:</td>\n\t\t<td style='font-size:18px'>" . Field_array_Hash($HTTP_CODE, "http_code-{$t}", $ligne["http_code"], "style:font-size:18px;") . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\t\t\t\t\t\t\t\n\t<tr>\n\t<td colspan=3><hr></td>\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{external_uri}:</td>\n\t\t<td>" . Field_checkbox_design("UseExternalWebPage", 1, $ligne["UseExternalWebPage"], "UseExternalWebPageCheck()") . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{redirect_url}:</td>\n\t\t<td style='font-size:18px'>" . Field_text("ExternalWebPage", $ligne["ExternalWebPage"], "font-size:16px;width:98%") . "</td>\n\t\t<td style='font-size:18px'>&nbsp;</td>\n\t</tr>\t\n\t\n\n\t\n\t<tr>\n\t\t<td colspan=3 align='right'><hr>" . button($button_name, "SaveDansGUardianMainRule()", 26) . "</td>\n\t</tr>\n\t</tbody>\n\t</table>\n\t</div>\n\t</div>\n\t<script>\n\t\n\tvar x_SaveDansGUardianMainRule= function (obj) {\n\t\tvar res=obj.responseText;\n\t\tvar ID='{$ID}';\n\t\tif (res.length>3){alert(res);}\n\t\tif(ID<0){YahooWin3Hide();}else{RefreshTab('main_filter_rule_edit');}\n\t\t\$('#flexRT{$t}').flexReload(); \n\t\tExecuteByClassName('SearchFunction');\n\t\t\n\t}\n\t\n\tfunction UseExternalWebPageCheck(){\n\t\tdocument.getElementById('ExternalWebPage').disabled=true;\n\t\tif(document.getElementById('UseExternalWebPage').checked){\n\t\t\tdocument.getElementById('ExternalWebPage').disabled=false;\n\t\t}\n\t}\n\t\nfunction SaveDansGUardianMainRule(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('groupname', document.getElementById('groupname').value);\n\tXHR.appendData('http_code', document.getElementById('http_code-{$t}').value);\n\t\t      \n\t\t      \n\t\t      \n\t\t      if(document.getElementById('naughtynesslimit')){ XHR.appendData('naughtynesslimit', document.getElementById('naughtynesslimit').value);}\n\t\t      if(document.getElementById('searchtermlimit')){ XHR.appendData('searchtermlimit', document.getElementById('searchtermlimit').value);}\n\t\t      if(document.getElementById('endofrule')){ XHR.appendData('endofrule', document.getElementById('endofrule').value);}\n\t\t      if(document.getElementById('ExternalWebPage')){ XHR.appendData('ExternalWebPage', document.getElementById('ExternalWebPage').value);}\n\t\t      \n\t\t      if(document.getElementById('zOrder-{$t}')){ XHR.appendData('zOrder', document.getElementById('zOrder-{$t}').value);}\n\t\t      \n\t\t      \n\t\t      if(document.getElementById('embeddedurlweight')){ XHR.appendData('embeddedurlweight', document.getElementById('embeddedurlweight').value);}\n\t\t\t  if(document.getElementById('bypass')){ XHR.appendData('bypass', document.getElementById('bypass').value);}\n\t\t\t  if(document.getElementById('groupmode')){ XHR.appendData('groupmode', document.getElementById('groupmode').value);}\n\t\t      if(document.getElementById('enabled')){ if(document.getElementById('enabled').checked){ XHR.appendData('enabled',1);}else{ XHR.appendData('enabled',0);}}\n\t\t      if(document.getElementById('blockdownloads')){ if(document.getElementById('blockdownloads').checked){ XHR.appendData('blockdownloads',1);}else{ XHR.appendData('blockdownloads',0);}}\n\t\t      if(document.getElementById('deepurlanalysis')){ if(document.getElementById('deepurlanalysis').checked){ XHR.appendData('deepurlanalysis',1);}else{ XHR.appendData('deepurlanalysis',0);}}\n\t\t      if(document.getElementById('AllSystems-{$t}')){ if(document.getElementById('AllSystems-{$t}').checked){ XHR.appendData('AllSystems',1);}else{ XHR.appendData('AllSystems',0);}}\n\t\t      if(document.getElementById('UseSecurity-{$t}')){ if(document.getElementById('UseSecurity-{$t}').checked){ XHR.appendData('UseSecurity',1);}else{ XHR.appendData('UseSecurity',0);}}\n\t\t     \n\t\t      \n\t\t      \n\t\t      \n\t\t      \n  \t\t\t  if(document.getElementById('EnableGoogleSafeSearch-{$t}')){\n  \t\t\t  \tif(document.getElementById('EnableGoogleSafeSearch-{$t}').checked){XHR.appendData('GoogleSafeSearch',1);}else{XHR.appendData('GoogleSafeSearch',0);}\n  \t\t\t  }\n   \t\t\t  if(document.getElementById('UseExternalWebPage')){\n  \t\t\t  \tif(document.getElementById('UseExternalWebPage').checked){XHR.appendData('UseExternalWebPage',1);}else{XHR.appendData('UseExternalWebPage',0);}\n  \t\t\t  } \t\t\t  \n   \t\t\t  if(document.getElementById('defaultPosition-{$t}')){\n   \t\t\t  \tXHR.appendData('defaultPosition', document.getElementById('defaultPosition-{$t}').value);\n  \t\t\t  }   \t\t\t  \n\t\t      \n\t\t      \n\t\t      \n\t\t      XHR.appendData('ID','{$ID}');\n\t\t      AnimateDiv('dansguardinMainRuleDiv');\n\t\t      XHR.sendAndLoad('{$page}', 'POST',x_SaveDansGUardianMainRule);  \t\t\n\t\t}\n\t\t\n\t\tfunction CheckFields(){\n\t\t\tvar DISABLE_DANS_FIELDS={$DISABLE_DANS_FIELDS};\n\t\t\tvar ID={$ID};\n\t\t\tif(document.getElementById('naughtynesslimit')){document.getElementById('naughtynesslimit').disabled=true;}\n\t\t\tif(document.getElementById('searchtermlimit')){document.getElementById('searchtermlimit').disabled=true;}\n\t\t\tif(document.getElementById('bypass')){document.getElementById('bypass').disabled=true;;}\n\t\t\tif(document.getElementById('blockdownloads')){document.getElementById('blockdownloads').disabled=true;}\n\t\t\tif(document.getElementById('deepurlanalysis')){\n\t\t\t\tdocument.getElementById('deepurlanalysis').disabled=true\n\t\t\t\tdocument.getElementById('embeddedurlweight').disabled=true;\t\n\t\t\t}\n\t\t\t\n\t\t\tif(DISABLE_DANS_FIELDS==0){\n\t\t\t\tif(document.getElementById('naughtynesslimit')){document.getElementById('naughtynesslimit').disabled=false;}\n\t\t\t\tif(document.getElementById('searchtermlimit')){document.getElementById('searchtermlimit').disabled=false;}\n\t\t\t\tif(document.getElementById('bypass')){document.getElementById('bypass').disabled=false;}\n\t\t\t\tif(document.getElementById('blockdownloads')){document.getElementById('blockdownloads').disabled=false;}\n\t\t\t\tif(document.getElementById('deepurlanalysis')){document.getElementById('deepurlanalysis').disabled=false;}\n\t\t\t\tdocument.getElementById('groupmode').disabled=false;\n\t\t\t\tdocument.getElementById('embeddedurlweight').disabled=false;\t\t\n\t\t\t\t\t\t\n\t\t\t\n\t\t\t}\n\t\t\tif(ID==0){\n\t\t\t\tdocument.getElementById('enabled').disabled=true;\n\t\t\t\tdocument.getElementById('groupname').disabled=true;\n\t\t\t\tif(document.getElementById('AllSystems-{$t}')){document.getElementById('AllSystems-{$t}').disabled=true;}\n\t\t\t\tif(document.getElementById('zOrder-{$t}')){document.getElementById('zOrder-{$t}').disabled=true;}\n\t\t\t}\n\n\t\t}\n\tCheckFields();\n\tUseExternalWebPageCheck();\n\t</script>\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
Пример #12
0
function sender_host(){
	$uid=$_GET["uid"];
	$user=new user($uid);
	$SenderParams=$user->SenderCanonicalSMTPRelay();
	
	

	
	
	$host=$SenderParams["HOST"];
	$auth=$SenderParams["AUTH"];
	
	$users=new usersMenus();
	$page=CurrentPageName();
	if($host<>null){
		$dom=new DomainsTools();
		$arr=$dom->transport_maps_explode($host);
	}	
	if($arr[2]==null){$arr[2]=25;}
	
$form="
<div style='font-size:14px;font-weight:bolder;color:#005447'>{user_transport}</div>
<table style='width:100%' class=form>
	<td align='right' nowrap class=legend>{relay_address}:</strong></td>
	<td>" . Field_text('relay_address',$arr[1],'width:150px;font-size:15px;padding:3px') . "</td>	
	<tr>
		<td align='right' nowrap class=legend>{smtp_port}:</strong></td>
		<td>" . Field_text('relay_port',$arr[2],'width:60px;font-size:15px;padding:3px') . "</td>	
	</tr>	
	<tr>
		<td align='right' nowrap>" . Field_yesno_checkbox_img('MX_lookups',$arr[3],'{MX_lookups_text}')."</td>
		<td>{MX_lookups}</td>	
	</tr>	
	</table>";



	
	if(preg_match("#(.+?):(.+)#",$auth,$re)){
		$username=$re[1];
		$password=$re[2];
	}

	
$form2="
<div style='font-size:14px;font-weight:bolder;color:#005447' >{AUTH_SETTINGS}</div>
<table style='width:100%' class=form>
<tr>
<td colspan=2 align=right style='font-size:13px;font-weight:bolder'>$user->SenderCanonical</td></tr>
	<tr>
		<td valign='top' class=legend nowrap>{username}:</td>
		<td valign='top'>".Field_text('sasl_username',$username,'width:130px;font-size:15px;padding:3px')."</td>
	</tr>
	<tr>
		<td valign='top' class=legend nowrap>{password}:</td>
		<td valign='top'>".Field_password('sasl_password',$password,'width:90px;font-size:15px;padding:3px')."</td>
	</tr>	
	</table>";

$delete=imgtootltip("ed_delete.gif","{delete}","DeleteUserSenderTransport()");
$button="<div style='width:100%;text-align:right'>
". button("{edit}","SaveUserSenderTransport();")."
</div>";

if(!$users->AllowSenderCanonical){$form2=null;$button=null;$delete=null;}
if($arr[1]==null){$delete=null;}

	if($user->SenderCanonical==null){
		$js_disable="DisableSenderForm()";
		$button=null;
		$explain_a="<div class=explain>{SMTP_SENDER_FILL_SENDER_CANONICAL_FIRST}</div>";
	}

$html="

<div id='sasltransport'>
<table style='width:100%'>
<tr>
	<td valign='top'>
		<img src='img/user-server-128.png'>
	</td>
	<td valign='top'>$explain_a
		<table style='width:100%'>
		<tr>
			<td valign='top'>
				$form
				<br>
				$form2
				<hr>
			</td>
			<td valign='top' width=1%>$delete</td>
		</tr>
		</table>
$button
	</td>
</tr>
</table>
</div>

<script>
  function DisableSenderForm(){
  	document.getElementById('sasl_username').disabled=true;
  	document.getElementById('sasl_password').disabled=true;
  	document.getElementById('relay_address').disabled=true;
  	document.getElementById('relay_port').disabled=true;
	}
	
	$js_disable;
</script>




";




	$tpl=new templates();
	echo $tpl->_ENGINE_parse_body($html);
	return false;

$dusbin="
	<form name='FFMrelayhost'>
<input type='hidden' name='uid' value='$uid'>
	<table style='width:100%'>
	<td align='right' nowrap class=legend>{relay_address}:</strong></td>
	<td>" . Field_text('relay_address',$relayT[1]) . "</td>	
	</tr>
	</tr>
	<td align='right' nowrap class=legend>{smtp_port}:</strong></td>
	<td>" . Field_text('relay_port',$relayT[2]) . "</td>	
	</tr>	
	<tr>
	<td align='right' nowrap>" . Field_yesno_checkbox_img('MX_lookups',$relayT[3],'{enable_disable}')."</td>
	<td>{MX_lookups}</td>	
	</tr>
	<tr>
	<td align='right' colspan=2 align='right'><input type='button' value='{edit}&nbsp;&raquo;' OnClick=\"javascript:SaveUserTransport();\"></td>
	</tr>		
	<tr>
	<td align='left' colspan=2><hr><p class=caption>{MX_lookups}<br>{MX_lookups_text}</p></td>
	</tr>					
	</form>";

	if($user->AlternateSmtpRelay<>null){
		$dom=new DomainsTools();
		$arr=$dom->transport_maps_explode($user->AlternateSmtpRelay);
		$p1=Paragraphe32('AUTH_SETTINGS','AUTH_SETTINGS_TEXT',"Loadjs('$page?smtp-sasl=$user->AlternateSmtpRelay&uid=$uid')","inboux-out-32.png");
		$p2=Paragraphe32('sender_canonical','sender_canonical_text',"Loadjs('$page?sender-email-js=yes&uid=$uid')","32-email-out.png");
		$form="
		<center>
		<table style='width:100%'><tr><td>$p1</td><td>$p2</td></tr></table>
		</center>
			<table style='width:100%' class=table_form>
			<tr>
			<td align='right' nowrap class=legend>{relay_address}:</td>
			<td style='font-size:12px;color:red;font-weight:bold'>$user->AlternateSmtpRelay</td>
			<td width=1%>". imgtootltip('ed_delete.gif','{delete}',"DeleteAlternateSmtpRelay();")."</td>
			</tr>
			
			</table>
		
		";
	}

	
	$html="
	<H1>{user_transport}</H1>
	<p class=caption>{user_transport_text}</p>
	$form
	
	
	";
	$tpl=new templates();
	echo $tpl->_ENGINE_parse_body($html);
	
}
Пример #13
0
function keywords()
{
    $tpl = new templates();
    $page = CurrentPageName();
    $title = $tpl->_ENGINE_parse_body("{add}&raquo;{add_keywords}");
    $html = "\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top'><div class=explain>{block_keywords_explain}</div>\n\t<td valign='top'>" . Paragraphe32("add_keywords", "add_keywords_smtp_check", "add_keywords_smtp()", "32-plus.png") . "</td>\n\t</tr>\t\n\t</table>\n\t<table>\n\t\t<tr>\n\t\t<td class=legend>{search}:</td>\n\t\t<td>" . Field_text("spamass_keywords_search", null, "font-size:14px;padding:3px;width:450px", "script:spamass_keywords_searchEnter(event)") . "</td>\n\t</tr>\n\t</table>\n\t<div id='spamass_keywords'></div>\n\t\n\t<script>\n\t\tfunction add_keywords_smtp(){\n\t\t\tYahooWin4('550','{$page}?keywords-popup=yes','{$title}');\n\t\t\n\t\t}\n\t\t\n\t\tfunction spamass_keywords_searchEnter(e){\n\t\t\tif(checkEnter(e)){spamass_keywords_refresh();}\n\t\t}\n\t\t\n\t\tfunction spamass_keywords_refresh(){\n\t\t\tvar lists=escape(document.getElementById('spamass_keywords_search').value);\n\t\t\tLoadAjax('spamass_keywords','{$page}?keywords-list='+lists);\n\t\t}\n\t\n\tspamass_keywords_refresh();\n\t</script>\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
Пример #14
0
function search_websites()
{
    $tpl = new templates();
    $q = new mysql_squid_builder();
    $page = CurrentPageName();
    $query = url_decode_special_tool(trim($_GET["pattern"]));
    $query = str_replace("*", "%", $query);
    $sql = "SELECT SUM(size) as size, SUM(hits) as hits, familysite\n\tFROM visited_sites_days GROUP BY familysite HAVING familysite LIKE '{$query}' ORDER BY size DESC LIMIT 0,20";
    $results = $q->QUERY_SQL($sql);
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        $site = $ligne["familysite"];
        $size = FormatBytes($ligne["size"] / 1024);
        if (strlen($site) > 27) {
            $site = substr($site, 0, 27) . "...";
        }
        $text = $tpl->_ENGINE_parse_body("<div style='margin-top:10px;font-size:14px'><strong>{size}:{$size}<br>" . FormatNumber($ligne["hits"]) . " {hits}</div>");
        $len = strlen($site);
        $js = "Loadjs('squid.website-zoom.php?&sitename=" . urlencode($site) . "&js=yes')";
        $f[] = Paragraphe32("noacco:{$site}", $text, $js, "website-32.png");
    }
    if (count($f) > 0) {
        echo $tpl->_ENGINE_parse_body(CompileTr4($f));
    }
}
Пример #15
0
function LDAP_CONFIG_NET()
{
    $sock = new sockets();
    $page = CurrentPageName();
    $nets[null] = "{loopback}";
    $nets["all"] = "{all}";
    $return = Paragraphe32("troubleshoot", "troubleshoot_explain", "Loadjs('index.troubleshoot.php');", "48-troubleshoots.png", 180);
    $form_network = "\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'><img src='img/ldap-performances-128.png'><hr>{$return}</td>\n\t\t<td valign='top'>\n\t<div id='ParseFormLDAPNET'>\n\t<table style='width:100%' class=table_form>\n\t\t\n\t\t<tr>\n\t\t\t<td class=legend nowrap>{allowanonymouslogin}:</td>\n\t\t\t<td><strong style='font-size:11px' nowrap>" . Field_checkbox("LdapAllowAnonymous", 1, $sock->GET_INFO('LdapAllowAnonymous')) . "</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t<td class=legend nowrap>{remote_addressbook_text}:</td>\n\t\t\t<td><strong style='font-size:11px' nowrap>" . Field_checkbox("EnableRemoteAddressBook", 1, $sock->GET_INFO('EnableRemoteAddressBook')) . "</td>\n\t\t</tr>\t\t\n\t\t<tr>\n\t\t\t<td colspan=2 align='right'><hr>\n\t\t\t" . button("{edit}", "ParseFormLDAPNET()") . "\n\t\t\t</td>\n\t\t</tr>\t\n\t</table>\n\t<div id='ldap_networks'></div>\n\t</div>\n\t</td>\n\t</tr>\n\t</table>\n\t<br>\n\t\n\t\n\t<script>\n\t\tfunction LoadLdapNets(){\n\t\t\tLoadAjax('ldap_networks','{$page}?ldap-networks-list=yes');\n\t\t}\n\tLoadLdapNets();\n\t</script>\n\t\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($form_network);
}
Пример #16
0
function status(){
	$page=CurrentPageName();
	$sock=new sockets();
	$tpl=new templates();
	$q=new mysql();
	$APP_SARG=$tpl->_ENGINE_parse_body("{APP_SARG}");
	$EnableSargGenerator=intval($sock->GET_INFO("EnableSargGenerator"));
	$EnableSargWeb=intval($sock->GET_INFO("EnableSargWeb"));
	$SargWebPort=intval($sock->GET_INFO("SargWebPort"));
	if($SargWebPort==0){$SargWebPort=rand(55600,59000);$sock->SET_INFO("SargWebPort", $SargWebPort);}
	$t=time();
	
	
	
	$disabled=$tpl->_ENGINE_parse_body("{disabled}");
	if($EnableSargGenerator==0){
		$version=Paragraphe32("noacco:$APP_SARG", "$disabled", "blur()", "warning-panneau-32.png");
		
	}else{
		$version=$sock->getFrameWork("sarg.php?version=yes");
		$status=unserialize($sock->GET_INFO("SargDirStatus"));
		$ff[]="version: $version";
		$ff[]="{size}: ".FormatBytes($status["SIZE"]);
		$ff[]="{files}: ".FormatNumber($status["FILES"])." {free}: ".FormatNumber($array["F_FREE"]);
		$ff[]="{free}: {$status["FREE"]}M";
		
		
		$version=Paragraphe32("noacco:$APP_SARG", "noacco:<div style='font-size:12px'>".$tpl->_ENGINE_parse_body(@implode("<br>", $ff))."</div>", "blur()", "ok32.png");
	}
	
	$sql="SELECT COUNT(*) as tcount FROM freeweb WHERE `groupware`='SARG'";
	$ligne=@mysql_fetch_array($q->QUERY_SQL($sql,"artica_backup"));
	if(!$q->ok){echo $q->mysql_error_html();}
	$count=$ligne["tcount"];
	if($count==0){
		$tr[]=Paragraphe32("no_website", "no_freeweb_service_explain", "Loadjs('freeweb.edit.php?hostname=&force-groupware=SARG');", "warning-panneau-32.png");
		
	}
	
	$tr[]=Paragraphe32("build_index_page", "build_index_page_sarg",
			"Loadjs('$page?index-run-js=yes');", "48-run.png");
	
	$tr[]=Paragraphe32("weekly_reports", "weekly_reports_execute", 
			"Loadjs('$page?weekly-run-js=yes');", "48-run.png");
	
	$tr[]=Paragraphe32("monthly_reports", "monthly_reports_execute",
			"Loadjs('$page?monthly-run-js=yes');", "48-run.png");	
	
	
	$tr[]=$version;
	
	
	$tableau=CompileTr3($tr,true);
	
	$html="
	<table style='width:100%'>
	<tr>
		<td style='width:340px;vertical-align:top'><div id='status-sarg'></div></td>
		<td style='width:98%'>
	<div style='width:98%' class=form>
	". Paragraphe_switch_img("{enable_sarg_service}", 
		"{APP_SARG_TXT}<br>{enable_sarg_service_text}",
		"EnableSargGenerator-$t",$EnableSargGenerator,null,780)
	. Paragraphe_switch_img("{enable_sarg_webservice}", 
			"{enable_sarg_webservice_text}","EnableSargWeb-$t"
			,$EnableSargWeb,null,780).
	"			
	<table style='width:100%'>
	<tr>
	 <td class=legend style='font-size:22px'>{listen_port}</td>
	 <td>". Field_text("SargWebPort-$t",$SargWebPort,"font-size:22px;width:120px")."</td>
	</tR>	
	<tr>
	 	<td colspan=2 align='right' style='font-size:18px'>
	 			<a href=\"http://{$_SERVER["SERVER_NAME"]}:$SargWebPort\" style='text-decoration:underline' _target=_new>http://{$_SERVER["SERVER_NAME"]}:$SargWebPort</a></td>
	 </tr>
	 </table>
	<p><hr></p>
	<div style='text-align:right'>". button("{apply}","Save$t()",26)."</div>
	</div>
	</td>
	</tr>
	</table>
	$tableau
	<script>
	var xSave$t= function (obj) {
			var tempvalue=obj.responseText;
			if(tempvalue.length>3){alert(tempvalue)};
			Loadjs('squid.restart.php?ApplyConfToo=yes&ask=yes');
		}
				
		function Save$t(){
			var XHR = new XHRConnection();
			XHR.appendData('EnableSargGenerator',document.getElementById('EnableSargGenerator-$t').value);
			XHR.appendData('EnableSargWeb',document.getElementById('EnableSargWeb-$t').value);
			XHR.appendData('SargWebPort',document.getElementById('SargWebPort-$t').value);
			XHR.sendAndLoad('$page', 'POST',xSave$t);	
		}

	LoadAjax('status-sarg','$page?status-sarg=yes')	
	</script>
		
	";
	
	echo $tpl->_ENGINE_parse_body($html);
}
Пример #17
0
function ipconfig_tools(){
	$nic=$_GET["netconfig"];
	if(strlen($_GET["nic"])>3){$nic=$_GET["nic"];}
	$tpl=new templates();
	$sock=new sockets();
	$page=CurrentPageName();
	$tr[]=Paragraphe32("flush_arp_cache", "flush_arp_cache_all_explain","Loadjs('$page?flush-arp-cache-js=yes&nic=$nic')","cache-refresh-32.png");
	// 
	$users=new usersMenus();
	if($users->dnsmasq_installed){
		$tr[]=Paragraphe32("APP_DHCP", "DNSMASQ_DHCP_INSTALL_TEXT",
				"Loadjs('dnsmasq.dhcp.service.php?install-js=yes&nic=$nic')","32-dhcp.png");
	}
	
	
	$table=CompileTr2($tr,true);
	echo $tpl->_ENGINE_parse_body($table);
	
}
Пример #18
0
function LDAP_CONFIG()
{
    $sock = new sockets();
    $ldap = new clladp();
    $page = CurrentPageName();
    $t = time();
    $nets[null] = "{loopback}";
    $nets["all"] = "{all}";
    $return = Paragraphe32("troubleshoot", "troubleshoot_explain", "Loadjs('index.troubleshoot.php');", "48-troubleshoots.png", 180);
    $superuser = Paragraphe32("account", "accounts_text", "Loadjs('artica.settings.php?js=yes&func-AccountsInterface=yes')", "superuser-48.png", 180);
    $loglevel_hash = array(0 => "{none}", 256 => "{basic}", 512 => "stats log entries sent", 1024 => "Communications", 16384 => "{synchronization}", 2048 => "{debug}");
    $CACHE_AGES[0] = "{never}";
    $CACHE_AGES[30] = "30 {minutes}";
    $CACHE_AGES[60] = "1 {hour}";
    $CACHE_AGES[120] = "2 {hours}";
    $CACHE_AGES[360] = "6 {hours}";
    $CACHE_AGES[720] = "12 {hours}";
    $CACHE_AGES[1440] = "1 {day}";
    $CACHE_AGES[2880] = "2 {days}";
    $CACHE_AGES[4320] = "3 {days}";
    $CACHE_AGES[10080] = "1 {week}";
    $CACHE_AGES[20160] = "2 {weeks}";
    $CACHE_AGES[43200] = "1 {month}";
    $RestartLDAPEach = $sock->GET_INFO("RestartLDAPEach");
    if (!is_numeric($RestartLDAPEach)) {
        $RestartLDAPEach = 4320;
    }
    $LockLdapConfig = $sock->GET_INFO("LockLdapConfig");
    $OpenLDAPLogLevel = $sock->GET_INFO("OpenLDAPLogLevel");
    if (!is_numeric($OpenLDAPLogLevel)) {
        $OpenLDAPLogLevel = 256;
    }
    if (!is_numeric($LockLdapConfig)) {
        $LockLdapConfig = 0;
    }
    $loglevel_field = Field_array_Hash($loglevel_hash, "OpenLDAPLogLevel", $OpenLDAPLogLevel, "style:font-size:22px;padding:3px");
    $restart_field = Field_array_Hash($CACHE_AGES, "RestartLDAPEach", $RestartLDAPEach, "style:font-size:22px;padding:3px");
    $LockLdapConfig = Paragraphe_switch_img("{LockLdapConfig}", "{LockLdapConfig_explain}", "LockLdapConfig", $LockLdapConfig, null, 790);
    $allowanonymouslogin = Paragraphe_switch_img("{allowanonymouslogin}", "{allowanonymouslogin_explain}", "LdapAllowAnonymous", $sock->GET_INFO('LdapAllowAnonymous'), null, 790);
    $EnableRemoteAddressBook = Paragraphe_switch_img("{remote_addressbook_text}", "{remote_addressbook_text_explain}", "EnableRemoteAddressBook", $sock->GET_INFO('EnableRemoteAddressBook'), null, 790);
    $LdapdbSize = $sock->getFrameWork('cmd.php?LdapdbSize=yes');
    if (preg_match('#(.+?)\\s+#', $LdapdbSize, $re)) {
        $LdapdbSize = $re[1];
    }
    $LdapDBSetCachesize = $sock->GET_INFO("LdapDBSetCachesize");
    $LdapDBSCachesize = $sock->GET_INFO("LdapDBCachesize");
    if ($LdapDBSetCachesize == null) {
        $LdapDBSetCachesize = 5120000;
    }
    if ($LdapDBSCachesize == null) {
        $LdapDBSCachesize = 1000;
    }
    $LdapDBSetCachesizeMo = $LdapDBSetCachesize / 1024 / 1000;
    $form_network = "\n\t\n\n\t\t<div style='font-size:22px;margin-bottom:10px;text-align:right'>{ldap_suffix}: <a href=\"javascript:blur();\" OnClick=\"javascript:Loadjs('openldap.changesuffix.php');\"\n\t\tstyle='font-size:22px;text-decoration:underline;font-weight:bold'>{$ldap->suffix}</a></div>\n\t\t<div id='ParseFormLDAPNET'>\n\t\t<table style='width:99%'>\n\t\t<tr>\n\t\t\t<td colspan=2>{$LockLdapConfig}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=2>{$allowanonymouslogin}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=2>{$EnableRemoteAddressBook}</td>\n\t\t</tr>\t\t\t\t\t\t\t\n\t\t<tr>\n\t\t\t<td class=legend nowrap style='font-size:22px'>{log_level}:</td>\n\t\t\t<td><strong style='font-size:11px' nowrap>{$loglevel_field}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend nowrap style='font-size:22px'>{restart_service_each}:</td>\n\t\t\t<td><strong style='font-size:22px' nowrap>{$restart_field}</td>\n\t\t</tr>\n\t\t\n\t\t\n\t<tr>\n\t\t\t<td colspan=2><div style='font-size:32px;margin-top:30px'>{ldap_configure_bdbd}</div>\n\t</tr>\n\t<tr>\n\t\t\t<td class=legend style='font-size:22px'>{set_cachesize}:</td>\n\t\t\t<td style='font-size:22px'>" . Field_text('set_cachesize', $LdapDBSetCachesizeMo, 'width:90px;font-size:22px') . "M&nbsp;</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{ldap_cache_size}:</td>\n\t\t<td style='font-size:22px'>" . Field_text('cachesize', $LdapDBSCachesize, 'width:90px;font-size:22px') . "&nbsp;{entries}</td>\n\t</tr>\t\t\t\n\t\t\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>" . button("{apply}", "Save{$t}()", "26") . "\n\t</td>\n\t</tr>\n</table>\n<script>\nvar xSave{$t}= function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>3){\n\t\talert(results);\n\t\treturn;\n\t}\n\tLoadjs('system.ldap.progress.php');\n\tRefreshTab('main_config_ldap');\n\t\n}\n\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('EnableRemoteAddressBook',document.getElementById('EnableRemoteAddressBook').value);\n\tXHR.appendData('LdapAllowAnonymous',document.getElementById('LdapAllowAnonymous').value);\n\tXHR.appendData('LockLdapConfig',document.getElementById('LockLdapConfig').value);\n\tXHR.appendData('OpenLDAPLogLevel',document.getElementById('OpenLDAPLogLevel').value);\n\tXHR.appendData('RestartLDAPEach',document.getElementById('RestartLDAPEach').value);\n\tXHR.appendData('set_cachesize',document.getElementById('set_cachesize').value);\n\tXHR.appendData('cachesize',document.getElementById('cachesize').value);\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n}\n</script>";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($form_network);
}
Пример #19
0
function services_toolbox()
{
    $sock = new sockets();
    $tpl = new templates();
    $ini = new Bs_IniHandler();
    $page = CurrentPageName();
    $EnableKlms = $sock->GET_INFO("EnableKlms");
    if (!is_numeric($EnableKlms)) {
        $EnableKlms = 1;
    }
    $TOTAL_MEMORY_MB = $sock->getFrameWork("system.php?TOTAL_MEMORY_MB=yes");
    if ($TOTAL_MEMORY_MB < 1500) {
        $EnableKlms = 0;
        $p = FATAL_ERROR_SHOW_128("{NO_ENOUGH_MEMORY_FOR_THIS_SECTION}<br><strong style='font-size:18px'>{require}:1500MB</strong>", false, true);
    } else {
        $p = Paragraphe_switch_img("{activate_klms}", "{activate_klms_explain}", "EnableKlms", $EnableKlms, null, 550);
    }
    $tr[] = Paragraphe32("watchdog", "watchdog_klms8_text", "Loadjs('klms8.watchdog.php')", "watchdog-32.png");
    $tr[] = Paragraphe32("tasks", "tasks_klms8_text", "Loadjs('klms.tasks.php')", "folder-tasks-32.png");
    $tr[] = Paragraphe32("license_info", "license_info_text", "Loadjs('klms.license.php')", "kl-license-32.png");
    $tr[] = Paragraphe32("mta_link", "mta_link_text", "Loadjs('klms.mta.php')", "comut-32.png");
    $tr[] = Paragraphe32("apply_config", "apply_klms_config_text", "ApplyConfigKLMS()", "32-settings-refresh.png");
    $tr[] = Paragraphe32("reset_admin_password", "reset_admin_password_text", "Loadjs('klms.password.php')", "32-key.png");
    $table = CompileTr2($tr, "form");
    $html = "\n\t{$p}<hr>\n\t{$table}\n\t<script>\n\t\tvar X_applycf= function (obj) {\n \t\t\tvar tempvalue=obj.responseText;\n\t      \tif(tempvalue.length>3){alert(tempvalue);}\n\t\t}\n\t\t\t\n\t\tfunction ApplyConfigKLMS(){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('apply-config','yes');\n\t\t\tXHR.sendAndLoad('{$page}', 'POST',X_applycf);\t\n\t\t}\t\t\n\t\n\t</script>\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
Пример #20
0
function rbls(){
	$tpl=new templates();
	$page=CurrentPageName();
	
	$title=$tpl->_ENGINE_parse_body("{add}&raquo;{add_keywords}");
	
	$html="
	<table style='width:100%'>
	<tr>
	<td valign='top'><div class=explain>{rbl_check_artica_text}</div>
	<td valign='top'>". Paragraphe32("add","addrbl_server_text","add_RblCheck()", "32-plus.png")."</td>
	</tr>	
	</table>
	<table>
		<tr>
		<td class=legend>{search}:</td>
		<td>". Field_text("RblCheck_refresh_search",null,"font-size:14px;padding:3px;width:450px","script:RblCheck_refresh_enter(event)")."</td>
	</tr>
	</table>
	<div id='rbls_list'></div>
	
	<script>
		function add_RblCheck(){
			YahooWin4('550','$page?rbl-popup=yes','$title');
		
		}
		
		function RblCheck_refresh_enter(e){
			if(checkEnter(e)){RblCheck_refresh();}
		}
		
		function RblCheck_refresh(){
			var lists=escape(document.getElementById('RblCheck_refresh_search').value);
			LoadAjax('rbls_list','$page?rbl-list='+lists);
		}
	
	RblCheck_refresh();
	</script>
	";
	echo $tpl->_ENGINE_parse_body($html);
	
}
Пример #21
0
function members(){
	$page=CurrentPageName();
	$tpl=new templates();
	
	$add=Paragraphe32("add_members","add_vip_members_text","YahooWin2('550','$page?members-add-popup=yes','{add_members}')","vipadd-32.png");
	
	$html="
	$add
	<div id='vip-list' style='width:100%;height:450px;overflow:auto'></div>
	
	<script>
		function VipTrackMembersRefresh(){
			LoadAjax('vip-list','$page?members-list=yes');
		}
		
		VipTrackMembersRefresh();
	</script>
	
	";
	echo $tpl->_ENGINE_parse_body($html);
}
Пример #22
0
function disks_add_form(){
	$page=CurrentPageName();
	$tpl=new templates();
	$sock=new sockets();
	$LVM_CONVERT_DEV_WARN=$tpl->javascript_parse_text("{LVM_CONVERT_DEV_WARN}");
	$disks1=unserialize(base64_decode($sock->getFrameWork("lvm.php?lvmdisk-free")));	
	while (list ($dev, $size) = each ($disks1) ){	
		$serv[]=Paragraphe32("noacco:$dev","<div style='font-size:14px;font-weight:bold'>$size</div>","LVM_CONVERT_DEV('$dev')","hd-toolbar-add-32.png");
		
	}
	
$tables[]="<table style='width:100%'><tr>";
$t=0;
while (list ($key, $line) = each ($serv) ){
		$line=trim($line);
		if($line==null){continue;}
		$t=$t+1;
		$tables[]="<td valign='top'>$line</td>";
		if($t==2){$t=0;$tables[]="</tr><tr>";}
		}

if($t<2){
	for($i=0;$i<=$t;$i++){
		$tables[]="<td valign='top'>&nbsp;</td>";				
	}
}
				
	$tables[]="</table>";	
	$html_tables=@implode("\n",$tables);
	
	$html="
	<div class=text-info>{LVM_CONVERT_DEV_EXPLAIN}</div>
	<hr>
	$html_tables
	
	<script>
	var x_LVM_CONVERT_DEV= function (obj) {
				var results=obj.responseText;
				if(results.length>0){alert(results);}
				refreshLVMList();
				YahooWin2Hide();
			}	
	
	
		function LVM_CONVERT_DEV(dev){
			if(confirm('$LVM_CONVERT_DEV_WARN')){
				var XHR = new XHRConnection();
				XHR.appendData('LVM_CONVERT_DEV',dev);
				XHR.appendData('dev',dev);
				document.getElementById('lvm-disks-list').innerHTML='<center><img src=\"img/wait_verybig.gif\"></center>';
				XHR.sendAndLoad('$page', 'GET',x_LVM_CONVERT_DEV);
			}
		}
		
	</script>
	";
		echo $tpl->_ENGINE_parse_body($html);

}
Пример #23
0
function status()
{
    $tpl = new templates();
    $sock = new sockets();
    $RemoteUfdbCat = intval($sock->GET_INFO("RemoteUfdbCat"));
    $page = CurrentPageName();
    $EnableLocalUfdbCatService = intval($sock->GET_INFO("EnableLocalUfdbCatService"));
    $AsCategoriesAppliance = intval($sock->GET_INFO("AsCategoriesAppliance"));
    if ($AsCategoriesAppliance == 1) {
        $RemoteUfdbCat = 0;
        $EnableLocalUfdbCatService = 1;
    }
    $catz = new mysql_catz();
    if ($catz->UfdbCatEnabled == 0) {
        echo $tpl->_ENGINE_parse_body(Paragraphe32("{service_disabled}", "noacco:\n\t\t\t\t<span style='font-size:12px'>&nbsp;</span>\n\t\t\t\t<br>{$catz->FinalUsedServer}", null, "ok48-grey.png"));
        return;
    }
    $categories = $catz->ufdbcat("google.com");
    if ($catz->ok) {
        $table = "<table style='width:99%'>\n\t\t<tr>\n\t\t\t<td width=48px style='vertical-align:top'><img src='/img/ok48.png'></td>\n\t\t\t<td style='vertical-align:top'>\n\t\t\t<td><span style='font-size:12px'><strong>google.com:</strong><br>{category}:<strong>;{$categories}</strong>\n\t\t\t<br>{execution_time} {$catz->TimeExec}s</span>\t\n\t\t\t<br><strong style='font-size:12px'>{$catz->FinalUsedServer}</strong>\t\n\t\t\t<div style='width:100%;text-align:right'>" . imgtootltip("refresh-32.png", "{refresh}", "LoadAjax('UFDBCAT_STATUS','{$page}?status=yes')") . "</duv>\n\t\t</td>\n\t\t</tr>\n\t\t</table>\n\t\t";
        echo $tpl->_ENGINE_parse_body($table);
    } else {
        $table = "<table style='width:99%'>\n\t\t<tr>\n\t\t<td width=48px style='vertical-align:top'><img src='/img/error-48.png'></td>\n\t\t<td style='vertical-align:top'>\n\t\t<td><span style='font-size:12px;color:#d32d2d'><strong>{connection_error}:</strong>\n\t\t<br>{error}:<strong>;{$catz->mysql_error}</strong>\n\t\t<br><strong style='font-size:12px'>{$catz->FinalUsedServer}</strong>\n\t\t<div style='width:100%;text-align:right'>" . imgtootltip("refresh-32.png", "{refresh}", "LoadAjax('UFDBCAT_STATUS','{$page}?status=yes')") . "</duv>\n\t\t\t\t</td>\n\t\t</tr>\n\t\t</table>\n\t\t";
        echo $tpl->_ENGINE_parse_body($table);
    }
    echo "<p>&nbsp;</p>";
    echo "<center>" . $tpl->_ENGINE_parse_body(button("{update_now}", "Loadjs('dansguardian2.articadb-progress.php')", 26)) . "</center>";
    $data = $sock->getFrameWork('cmd.php?ufdbcat-ini-status=yes');
    $ini = new Bs_IniHandler();
    $ini->loadString(base64_decode($data));
    $APP_UFDBCAT = DAEMON_STATUS_ROUND("APP_UFDBCAT", $ini, null, 1);
    echo "<p>&nbsp;</p>";
    echo $tpl->_ENGINE_parse_body($APP_UFDBCAT);
    $ufdbCatInterface = $sock->GET_INFO("ufdbCatInterface");
    $ufdbCatPort = intval($sock->GET_INFO("ufdbCatPort"));
    $UfdbCatThreads = intval($sock->GET_INFO("UfdbCatThreads"));
    if ($ufdbCatInterface == null) {
        $ufdbCatInterface = "127.0.0.1";
    }
    if ($ufdbCatInterface == "all") {
        $ufdbCatInterface = "127.0.0.1";
    }
    echo "<div style='text-align:right'>" . imgtootltip("refresh-32.png", "{refresh}", "LoadAjax('UFDBCAT_STATUS','{$page}?status=yes');") . "\n\t</div>";
}
Пример #24
0
function ZARAFA_MAILBOX($uid) {
	
	$u = new user ( $uid );
	$page = CurrentPageName ();
	$sock = new sockets ( );
	$status = unserialize ( base64_decode ( $sock->getFrameWork ( "cmd.php?zarafa-user-details=$uid" ) ) );
	$languages=unserialize(base64_decode($sock->getFrameWork("zarafa.php?locales=yes")));
	while (list ($index, $data) = each ($languages) ){$langbox[$data]=$data;}
	$langbox[null]="{select}";
	
	
	$mailbox_language=Field_array_Hash($langbox,"zarafaMbxLang",$u->zarafaMbxLang,"style:font-size:13px;padding:3px");
	
	$mailboxsize = $status ["Current store size"];
	if (preg_match ( "#([0-9]+)\s+KB#", $mailboxsize, $re )) {$mailboxsize = FormatBytes ( $mailboxsize );}
	
	if (preg_match ( "#([0-9]+)\/([0-9]+)\/([0-9]+)\s+(.+)#", $status ["Last logon"], $re )) {
		$status ["Last logon"] = date ( "D M", mktime ( 0, 0, 0, $re [1], $re [2], "20{$re[3]}" ) ) . " {$re[4]}";
	}
	if (preg_match ( "#([0-9]+)\/([0-9]+)\/([0-9]+)\s+(.+)#", $status ["Last logoff"], $re )) {
		$status ["Last logoff"] = date ( "D M", mktime ( 0, 0, 0, $re [1], $re [2], "20{$re[3]}" ) ) . " {$re[4]}";
	}
	
	$mailboxinfos=Paragraphe32("mailbox_infos","mailbox_zarafa_infos_text","Loadjs('$page?ZARAFA_MAILBOX_INFOS=yes&uid=$uid&userid=$uid')","32-infos.png");

	
	
	$html = "<table style='width:100%'>
	<tr>
		<td width=1% valign='top'><img src='img/mailbox-zarafa-128.png' id='zfmbximg'><p>&nbsp;</p>$mailboxinfos</td>
		<td valign='top'><span style='font-size:18px'>$u->DisplayName {mailbox}</span>
				<table style='width:100%'>
					<tr>
						<td class=legend style='font-size:13px'>{mailbox_size}:</td>
						<td style='font-size:13px'><strong>$mailboxsize</strong></td>
					</tr>
					<tr>
						<td class=legend style='font-size:13px'>{last_logon}:</td>
						<td style='font-size:13px'><strong>{$status["Last logon"]}</strong></td>
					</tr>		
					<tr>
						<td class=legend style='font-size:13px'>{last_logoff}:</td>
						<td style='font-size:13px'><strong>{$status["Last logoff"]}</strong></td>
					</tr>
					<tr>
						<td class=legend style='font-size:13px'>{zarafaAdmin}:</td>
						<td style='font-size:13px'>" . Field_checkbox ( "zarafaAdmin", 1, $u->zarafaAdmin ) . "</td>
					</tr>					
					<tr>
						<td class=legend style='font-size:13px'>{zarafaMbxLang}:</td>
						<td style='font-size:13px'>$mailbox_language</td>
					</tr>						
					
					<tr>
						<td colspan=2><span style='font-size:16px'>{zarfa_quota_title}</span>
						<div class='explain'>{zarfa_quota_title_explain}</div></td>
					</tr>
					<tr>
						<td class=legend style='font-size:13px'>{zarafaQuotaWarn}:</td>
						<td style='font-size:13px'>" . Field_text ( "zarafaQuotaWarn", $u->zarafaQuotaWarn, "font-size:13px;padding:3px;width:60px" ) . "&nbsp;MB</strong></td>
					</tr>
				<tr>
						<td class=legend style='font-size:13px'>{zarafaQuotaSoft}:</td>
						<td style='font-size:13px'>" . Field_text ( "zarafaQuotaSoft", $u->zarafaQuotaSoft, "font-size:13px;padding:3px;width:60px" ) . "&nbsp;MB</strong></td>
					</tr>
					<tr>
						<td class=legend style='font-size:13px'>{zarafaQuotaHard}:</td>
						<td style='font-size:13px'>" . Field_text ( "zarafaQuotaHard", $u->zarafaQuotaHard, "font-size:13px;padding:3px;width:60px" ) . "&nbsp;MB</strong></td>
					</tr>
				<tr>
						<td colspan=2 align='right'><hr>
							" . button ( "{apply}", "Loadjs('$page?zarafa-mailbox-edit=" . base64_encode ( $uid ) . "')" ) . "</td>
				</tR>														
																		
				</table>
		</td>
	</tr>
	</table>";
	
	$tpl = new templates ( );
	return $tpl->_ENGINE_parse_body ( $html );

}
Пример #25
0
function LDAP_CONFIG_NET()
{
    $sock = new sockets();
    $page = CurrentPageName();
    $nets[null] = "{loopback}";
    $nets["all"] = "{all}";
    $return = Paragraphe32("troubleshoot", "troubleshoot_explain", "Loadjs('index.troubleshoot.php');", "48-troubleshoots.png", 180);
    $loglevel_hash = array(0 => "{none}", 256 => "{basic}", 512 => "stats log entries sent", 1024 => "Communications", 16384 => "{synchronization}", 2048 => "{debug}");
    $OpenLDAPLogLevel = $sock->GET_INFO("OpenLDAPLogLevel");
    if (!is_numeric($OpenLDAPLogLevel)) {
        $OpenLDAPLogLevel = 256;
    }
    $loglevel_field = Field_array_Hash($loglevel_hash, "OpenLDAPLogLevel", $OpenLDAPLogLevel, "style:font-size:13px;padding:3px");
    $form_network = "\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'><img src='img/ldap-performances-128.png'><hr>{$return}</td>\n\t\t<td valign='top'>\n\t<div id='ParseFormLDAPNET'>\n\t\t\t<table style='width:100%'>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=legend nowrap>{allowanonymouslogin}:</td>\n\t\t\t\t\t<td><strong style='font-size:11px' nowrap>" . Field_checkbox("LdapAllowAnonymous", 1, $sock->GET_INFO('LdapAllowAnonymous')) . "</td>\n\t\t\t\t</tr>\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=legend nowrap>{remote_addressbook_text}:</td>\n\t\t\t\t\t<td><strong style='font-size:11px' nowrap>" . Field_checkbox("EnableRemoteAddressBook", 1, $sock->GET_INFO('EnableRemoteAddressBook')) . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=legend nowrap>{log_level}:</td>\n\t\t\t\t\t<td><strong style='font-size:11px' nowrap>{$loglevel_field}</td>\n\t\t\t\t</tr>\t\t\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=2 align='right'><hr>\n\t\t\t\t\t" . button("{edit}", "ParseFormLDAPNET()") . "\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\t\n\t\t\t</table>\n\t\t<div id='ldap_networks'></div>\n\t\t<table style='width:100%'>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=legend nowrap>{other_network_card}:</td>\n\t\t\t\t\t<td>" . Field_text("other_network_card", null, "font-size:13px;padding:3px") . "</td>\n\t\t\t\t\t<td>" . button("{add}", "other_network_card_add()") . "\n\t\t\t\t</tr>\t\n\t\t</table>\n\t\t\n\t</div>\n\t</td>\n\t</tr>\n\t</table>\n\t<br>\n\t\n\t\n\t<script>\n\t\tfunction LoadLdapNets(){\n\t\t\tLoadAjax('ldap_networks','{$page}?ldap-networks-list=yes');\n\t\t}\n\t\t\n\tvar x_other_network_card_add= function (obj) {\n\t\tLoadLdapNets();\n\t\t}\t\t\n\t\n\tfunction other_network_card_add(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('ldap_other_network_card',document.getElementById('other_network_card').value);\n\t\tdocument.getElementById('ldap_networks').innerHTML='<center><img src=\"img/wait_verybig.gif\"></center>';\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_other_network_card_add);\n\t\n\t}\t\n\n\tfunction ParseFormLDAPNET(){\n\t\tvar LdapAllowAnonymous;\n\t\tvar EnableRemoteAddressBook;\n\t\tif(document.getElementById('LdapAllowAnonymous').checked){LdapAllowAnonymous=1;}else{LdapAllowAnonymous=0;}\n\t\tif(document.getElementById('EnableRemoteAddressBook').checked){EnableRemoteAddressBook=1;}else{EnableRemoteAddressBook=0;}\t\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('LdapAllowAnonymous',LdapAllowAnonymous);\n\t\tXHR.appendData('EnableRemoteAddressBook',EnableRemoteAddressBook);\n\t\tXHR.appendData('OpenLDAPLogLevel',document.getElementById('OpenLDAPLogLevel').value);\n\t\tdocument.getElementById('ParseFormLDAPNET').innerHTML='<center><img src=\"img/wait_verybig.gif\"></center>';\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_ParseFormLDAP);\n\t\t}\t\n\t\t\n\tLoadLdapNets();\n\t</script>\n\t\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($form_network);
}
Пример #26
0
function popup()
{
    $t = time();
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new sockets();
    $enable_amavisdeamon_ask = $tpl->javascript_parse_text("{enable_mimedefang_ask}");
    $disable_amavisdeamon_ask = $tpl->javascript_parse_text("{disable_mimedefang_ask}");
    $MimeDefangEnabled = trim($sock->GET_INFO("MimeDefangEnabled", true));
    if (!is_numeric($MimeDefangEnabled)) {
        $MimeDefangEnabled = 0;
    }
    if ($MimeDefangEnabled == 0) {
        $EnableDaemonP = Paragraphe32("disabled", "mimedefang_is_currently_disabled_text", "EnablePopupMimeDefang()", "warning32.png");
    } else {
        $EnableDaemonP = Paragraphe32("enabled", "mimedefang_is_currently_enabled_text", "DisablePopupMimeDefang()", "ok32.png");
    }
    $TOTAL_MEMORY_MB = $sock->getFrameWork("system.php?TOTAL_MEMORY_MB=yes");
    if ($TOTAL_MEMORY_MB < 1500) {
        $p = FATAL_ERROR_SHOW_128("{NO_ENOUGH_MEMORY_FOR_THIS_SECTION}<br><strong style='font-size:18px'>{require}:1500MB</strong>", false, true);
        $EnableDaemonP = null;
    }
    $tr[] = $EnableDaemonP;
    $tr[] = Paragraphe32("service_options", "service_options_text", "Loadjs('mimedefang.service.php')", "32-parameters.png");
    $tr[] = Paragraphe32("reload_service", "reload_service_text", "MimeDefangCompileRules()", "service-restart-32.png");
    $tr[] = Paragraphe32("online_help", "online_help", "s_PopUpFull('http://www.mail-appliance.org/index.php?cID=305','1024','900');", "help_bg32.png");
    http:
    //www.mail-appliance.org/index.php?cID=305&
    $table = CompileTr2($tr, "form");
    $html = "<table style='width:100%'>\n\t<tr>\n\t\t<td width=1% valign='top'>\n\t\t\t<div id='status-{$t}'></div>\n\t\t</td>\n\t\t<td valign='top'>\n\t\t\t<div style='font-size:18px;margin:bottom:10px;text-align:right'>{APP_MIMEDEFANG}</div>\n\t\t\t<div style='font-size:13px' class=explain>{MIMEDEFANG_DEF}</div>\n\t\t\t{$p}\n\t\t\t<div id='explain-{$t}'>{$table}</div>\n\t\t</td>\n\t</tr>\n\t</table>\n\t<script>\n\t\n\tvar x_Enablemimedefang= function (obj) {\n\t\tvar tempvalue=obj.responseText;\n\t\tif(tempvalue.length>3){alert(tempvalue);}\t\n\t\tRefreshTab('main_config_mimedefang');\n\t}\t\n\t\n\t\tfunction EnablePopupMimeDefang(){\n\t\t\tif(confirm('{$enable_amavisdeamon_ask}')){\n\t\t\t\tvar XHR = new XHRConnection();\n\t\t\t\tXHR.appendData('enable-mimedefang','yes');\n\t\t\t\tAnimateDiv('explain-{$t}');\n\t\t\t\tXHR.sendAndLoad('{$page}', 'POST',x_Enablemimedefang);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfunction DisablePopupMimeDefang(){\n\t\t\tif(confirm('{$disable_amavisdeamon_ask}')){\n\t\t\t\tvar XHR = new XHRConnection();\n\t\t\t\tXHR.appendData('disable-mimedefang','yes');\n\t\t\t\tAnimateDiv('explain-{$t}');\n\t\t\t\tXHR.sendAndLoad('{$page}', 'POST',x_Enablemimedefang);\n\t\t\t}\n\t\t}\n\t\n\t\n\t\n\t\tLoadAjax('status-{$t}','{$page}?status=yes&t={$t}');\n\t\t\n\t\t\n\t</script>\n\t\n\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
Пример #27
0
function main_disks_discover()
{
    $users = new usersMenus();
    $Disks = $users->disks_size;
    $page = CurrentPageName();
    $sock = new sockets();
    $dd = new harddrive();
    $arrayDisks = $dd->getDiskList();
    $html = "<tr>";
    if (is_array($arrayDisks)) {
        $count = 0;
        $tr = null;
        while (list($disk, $ARRAY_FINAL) = each($arrayDisks)) {
            $path = $ARRAY_FINAL["MOUNTED"];
            if (isset($already[$path])) {
                continue;
            }
            if ($path == null) {
                continue;
            }
            $already[$path] = true;
            $size = $ARRAY_FINAL["SIZE"];
            if ($size == null) {
                continue;
            }
            $pourc = $ARRAY_FINAL["POURC"];
            $js = "Loadjs('SambaBrowse.php?jdisk={$disk}&mounted={$path}&t={$_GET["t"]}&homeDirectory={$_GET["homeDirectory"]}&no-shares={$_GET["no-shares"]}&field={$_GET["field"]}&protocol={$_GET["protocol"]}&no-hidden={$_GET["no-hidden"]}')";
            $disk_name = $disk;
            if (preg_match("#mapper\\/.+?\\-(.+)#", $disk_name, $re)) {
                $disk_name = $re[1];
            }
            $count = $count + 1;
            if ($count == 2) {
                $tr = "</tr><tr>";
                $count = 0;
            } else {
                $tr = null;
            }
            $html = $html . "\n\t\t\t\t\t{$tr}\n\t\t\t\t\t<td width=50% valign='top'>" . Paragraphe32("noacco:{$disk_name}", "({$size} - {$pourc}% {used})", $js, "48-hd.png") . "</td>\n\t\t\t\t\t";
        }
    }
    if (is_array($added_disks_array)) {
        while (list($disk, $path) = each($added_disks_array)) {
            $js = "Loadjs('SambaBrowse.php?jdisk={$disk}&mounted={$path}&t={$_GET["t"]}&homeDirectory={$_GET["homeDirectory"]}&no-shares={$_GET["no-shares"]}&field={$_GET["field"]}&protocol={$_GET["protocol"]}&no-hidden={$_GET["no-hidden"]}')";
            $delete = imgtootltip("ed_delete.gif", "{delete} {$disk}...", "DeleteHiddenDisk('{$disk}')");
            $count = $count + 1;
            if ($count == 2) {
                $tr = "</tr><tr>";
                $count = 0;
            } else {
                $tr = null;
            }
            $html = $html . "\n\t\t\t\t\t{$tr}\n\t\t\t\t\t<td width=50% valign='top'>\n\t\t\t\t\t\t<table style='width:150px'>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td align='right' valign='top' width=1%>{$delete}</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . Paragraphe32("noacco:{$disk}", "{$disk}<br>", $js, "48-hd.png", 150) . "</td>\n\t\t\t\t\t\t\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t</td>";
        }
    }
    $add_disk = Paragraphe("64-hd-plus.png", "{invisible_disk}", "{add_invisible_disk_text}", "javascript:Loadjs('{$page}?hidden-add=yes')");
    $html = "<div style='font-size:15px'>{select_disk}</div><br>\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top'>\n\t\t<table style='width:100%'>\n\t\t\t\t{$html}\n\t\t\t</tr>\n\t\t</table>\n\t</td>\n\t<td valign='top'>{$add_disk}\n\t</td>\n\t</tr>\n\t</table>\n\t\n\t";
    $tpl = new templates();
    return $tpl->_ENGINE_parse_body($html, 'fileshares.index.php');
}
function table_heures_enretard(){
	
	$tpl=new templates();
	$page=CurrentPageName();
	$q=new mysql_squid_builder();
	$CurrentHourTable="squidhour_".date("YmdH");
	if($GLOBALS["VERBOSE"]){echo "Find hours tables...\n";}
	$tables=$q->LIST_TABLES_HOURS_TEMP();
	$c=0;
	$t=time();
	$CountDeTable=0;
	while (list ($table, $none) = each ($tables) ){
		if($table==$CurrentHourTable){if($GLOBALS["VERBOSE"]){echo "SKIP `$table`\n";}continue;}
		if(!preg_match("#squidhour_([0-9]+)#",$table,$re)){continue;}
		$hour=$re[1];
		$year=substr($hour,0,4);
		$month=substr($hour,4,2);
		$day=substr($hour,6,2);
		$tt[$table]=true;
	}
	if(!is_array($tt)){return null;}
	$CountDeTable=count($tt);
	if($CountDeTable>0){
		$sock=new sockets();
		$time=$sock->getFrameWork("squid.php?squidhour-repair-exec=yes");
		if(is_numeric($time)){
			$title=$tpl->javascript_parse_text("{squidhour_not_scanned} {running} {$time}Mn");
			$title=str_replace("%s", $CountDeTable, $title);
			$title=str_replace("%", $CountDeTable, $title);
			return Paragraphe32("noacco:$title ",'launch_squidhour_explain'
					,"blur()","wait-clock.gif");			
		}
		$launch_squidhour_explain=$tpl->_ENGINE_parse_body("{launch_squidhour_explain}");
		$title=$tpl->javascript_parse_text("{squidhour_not_scanned}");
		$title=str_replace("%s", $CountDeTable, $title);
		$title=str_replace("%", $CountDeTable, $title);
		return Paragraphe32("noacco:$title","$launch_squidhour_explain"
				,"Loadjs('$page?squidhour-js=yes')","Database32-red.png");
	}
	
}
Пример #29
0
function status(){
	$tpl=new templates();
	$sock=new sockets();
	$RemoteUfdbCat=intval($sock->GET_INFO("RemoteUfdbCat"));
	$page=CurrentPageName();
	$EnableLocalUfdbCatService=intval($sock->GET_INFO("EnableLocalUfdbCatService"));
	$AsCategoriesAppliance=intval($sock->GET_INFO("AsCategoriesAppliance"));
	if($AsCategoriesAppliance==1){$RemoteUfdbCat=0;$EnableLocalUfdbCatService=1;}
	
	if($RemoteUfdbCat==1){
		$catz=new mysql_catz();
		$categories=$catz->ufdbcat("google.com");
		if($catz->ok){
			echo $tpl->_ENGINE_parse_body(Paragraphe32("{available}", "noacco:
		<span style='font-size:12px'><strong>google.com:</strong><br>{category} <strong>$categories</strong><br>{execution_time} {$catz->TimeExec}s</span>",null,
		"ok48.png","LoadAjax('UFDBCAT_STATUS','$page?status=yes')"));
		echo"<div style='text-align:right'>".imgtootltip("refresh-32.png","{refresh}","LoadAjax('UFDBCAT_STATUS','$page?status=yes');")."</div>";
		return;
		}
		
		
		echo $tpl->_ENGINE_parse_body(Paragraphe32("{connection_error}", "noacco:
		<span style='font-size:12px'>{error} &laquo;$catz->mysql_error&raquo;</span>",null,
		"error-48.png"));
		echo"<div style='text-align:right'>".imgtootltip("refresh-32.png","{refresh}","LoadAjax('UFDBCAT_STATUS','$page?status=yes');")."</div>";
		return;
		
	}
	
	
	
	$data=$sock->getFrameWork('cmd.php?ufdbcat-ini-status=yes');
	$ini=new Bs_IniHandler();
	$ini->loadString(base64_decode($data));
	$APP_UFDBCAT=DAEMON_STATUS_ROUND("APP_UFDBCAT",$ini,null,1);
	echo $tpl->_ENGINE_parse_body($APP_UFDBCAT);
	
	$ufdbCatInterface=$sock->GET_INFO("ufdbCatInterface");
	$ufdbCatPort=intval($sock->GET_INFO("ufdbCatPort"));
	$UfdbCatThreads=intval($sock->GET_INFO("UfdbCatThreads"));
	if($ufdbCatInterface==null){$ufdbCatInterface="127.0.0.1";}
	if($ufdbCatInterface=="all"){$ufdbCatInterface="127.0.0.1";}
	
	
	
	if($EnableLocalUfdbCatService==0){
		$html="<div style='text-align:right'>".imgtootltip("refresh-32.png","{refresh}","LoadAjax('UFDBCAT_STATUS','$page?status=yes');")."</div>";
		echo $tpl->_ENGINE_parse_body($html);
		return;
	}
	
	
	
	$catz=new mysql_catz();
	$categories=$catz->ufdbcat("google.com");
	if($catz->ok){
		echo $tpl->_ENGINE_parse_body(Paragraphe32("{available}", "noacco:
				<span style='font-size:12px'><strong>google.com:</strong><br>{category} <strong>$categories</strong><br>{execution_time} {$catz->TimeExec}s</span>",null,
				"ok48.png","LoadAjax('UFDBCAT_STATUS','$page?status=yes')"));
		echo $tpl->_ENGINE_parse_body("<div style='text-align:right'>".imgtootltip("refresh-32.png","{refresh}","LoadAjax('UFDBCAT_STATUS','$page?status=yes');")."</div>");
		return;
	}
	
	
	echo $tpl->_ENGINE_parse_body(Paragraphe32("{connection_error}", "noacco:
			<span style='font-size:12px'>{error} &laquo;$catz->mysql_error&raquo;</span>",null,
			"error-48.png"));
	echo $tpl->_ENGINE_parse_body("<div style='text-align:right'>".imgtootltip("refresh-32.png","{refresh}","LoadAjax('UFDBCAT_STATUS','$page?status=yes');")."</div>");
	
	
	
	
	
}
Пример #30
0
function kerbchkconf(){
	$page=CurrentPageName();
	$tpl=new templates();
	$sock=new sockets();	
	$users=new usersMenus();
	if($users->SAMBA_INSTALLED){
		$samba_version=$sock->getFrameWork("samba.php?fullversion=yes");
		echo $tpl->_ENGINE_parse_body("<center><div style='font-size:18px'>{APP_SAMBA}:$samba_version</div></center>");
	}else{
		echo $tpl->_ENGINE_parse_body("<center><div style='font-size:18px'>{APP_SAMBA}: {NOT_INSTALLED}</div></center>");
	}
	
	
	if(!$users->MSKTUTIL_INSTALLED){echo $tpl->_ENGINE_parse_body(Paragraphe32("APP_MSKTUTIL", "APP_MSKTUTIL_NOT_INSTALLED", "Loadjs('setup.index.php?js=yes');", "error-24.png"));return;}
	
	$sock=new sockets();
	$array=unserialize(base64_decode($sock->GET_INFO("KerbAuthInfos")));
	
	if($users->SAMBA_INSTALLED){if($array["ADNETBIOSDOMAIN"]==null){echo $tpl->_ENGINE_parse_body(Paragraphe32("MISSING_PARAMETER", "ADNETBIOSDOMAIN", null, "error-24.png"));return;}}
	
	
	if($array["WINDOWS_DNS_SUFFIX"]==null){echo $tpl->_ENGINE_parse_body(Paragraphe32("MISSING_PARAMETER", "WINDOWS_DNS_SUFFIX", null, "error-24.png"));return;}
	if($array["WINDOWS_SERVER_NETBIOSNAME"]==null){echo $tpl->_ENGINE_parse_body(Paragraphe32("MISSING_PARAMETER", "WINDOWS_SERVER_NETBIOSNAME", null, "error-24.png"));return;}
	if($array["WINDOWS_SERVER_TYPE"]==null){echo $tpl->_ENGINE_parse_body(Paragraphe32("MISSING_PARAMETER", "WINDOWS_SERVER_TYPE", null, "error-24.png"));return;}
	if($array["WINDOWS_SERVER_ADMIN"]==null){echo $tpl->_ENGINE_parse_body(Paragraphe32("MISSING_PARAMETER", "administrator", null, "error-24.png"));return;}
	if($array["WINDOWS_SERVER_PASS"]==null){echo $tpl->_ENGINE_parse_body(Paragraphe32("MISSING_PARAMETER", "password", null, "error-24.png"));return;}
	
	$hostname=strtolower(trim($array["WINDOWS_SERVER_NETBIOSNAME"])).".".strtolower(trim($array["WINDOWS_DNS_SUFFIX"]));
	$ip=gethostbyname($hostname);
	if($ip==$hostname){echo $tpl->_ENGINE_parse_body(Paragraphe32("WINDOWS_NAME_SERVICE_NOT_KNOWN", "noacco:<strong style='font-size:18px'>$hostname</strong>", null, "error-24.png"));return;}
	
	$EnableKerbAuth=$sock->GET_INFO("EnableKerbAuth");
	if($EnableKerbAuth==1){
		$page=CurrentPageName();
		echo $tpl->_ENGINE_parse_body("<center style='margin:5px'>".button("{restart_connection}",
		 "Loadjs('squid.ad.progress.php')","22px")."</center>");
	}
	
	
}