Example #1
0
function popup()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new sockets();
    $tcp = new networking();
    $EnableDNSLinker = $sock->GET_INFO("EnableDNSLinker");
    $EnableDNSLinkerCreds = unserialize(base64_decode($sock->GET_INFO("EnableDNSLinkerCreds")));
    if (preg_match("#^(.+?):#", $EnableDNSLinkerCreds["CREDS"], $re)) {
        $SuperAdmin = $re[1];
    }
    $hostname = $EnableDNSLinkerCreds["hostname"];
    $listen_port = $EnableDNSLinkerCreds["listen_port"];
    $listen_ip = $EnableDNSLinkerCreds["listen_addr"];
    $send_listen_ip = $EnableDNSLinkerCreds["send_listen_ip"];
    if (!is_numeric($EnableDNSLinker)) {
        $EnableDNSLinker = 0;
    }
    if (!is_numeric($listen_port)) {
        $listen_port = 9000;
    }
    $t = time();
    $p = Paragraphe_switch_img("{activate_dns_linker}", "{activate_dns_linker_text}", "EnableDNSLinker", $EnableDNSLinker, null, 500);
    $ips = $tcp->ALL_IPS_GET_ARRAY();
    $html = "<table style='width:100%' class=form>\n\t<tr>\n\t\t<td colspan=2>{$p}</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{hostname}:</td>\n\t\t<td>" . Field_text("hostname-{$t}", $hostname, "font-size:16px;width:99%") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{listen_port}:</td>\n\t\t<td>" . Field_text("listen_port-{$t}", $listen_port, "font-size:16px;width:90px") . "</td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{SuperAdmin}:</td>\n\t\t<td>" . Field_text("SuperAdmin", $SuperAdmin, "font-size:16px;width:99%") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{password}:</td>\n\t\t<td>" . Field_password("SuperAdminPass", null, "font-size:16px;width:70%") . "</td>\n\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:16px'>{listen_ip}:</td>\n\t\t\t<td>" . Field_array_Hash($ips, "listen_addr-{$t}", $listen_ip, "style:font-size:16px;padding:3px") . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:16px'>{send_listen_ip}:</td>\n\t\t\t<td>" . Field_array_Hash($ips, "send_listen_ip-{$t}", $send_listen_ip, "style:font-size:16px;padding:3px") . "</td>\n\t\t</tr>\t\t\t\t\t\t\t\t\t\t\t\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>" . button("{apply}", "Save{$t}()", "18") . "</td>\n\t</tr>\t\t\t\t\t\t\t\t\n\t</table>\t\t\n\t<script>\n\t\n\tvar x_Save{$t}= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>3){alert(results);}\n\t\tYahooWin3Hide();\n\t}\t\n\t\t\n\t\tfunction Save{$t}(){\n\t\t\tvar SuperAdminPass=document.getElementById('SuperAdminPass').value;\n\t\t\tif(SuperAdminPass.length==0){\n\t\t\t\talert('Please, define the password...\\n');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar pp=encodeURIComponent(document.getElementById('SuperAdminPass').value);\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('EnableDNSLinker',document.getElementById('EnableDNSLinker').value);\n\t\t\tXHR.appendData('SuperAdmin',document.getElementById('SuperAdmin').value);\n\t\t\tXHR.appendData('hostname',document.getElementById('hostname-{$t}').value);\n\t\t\tXHR.appendData('listen_port',document.getElementById('listen_port-{$t}').value);\n\t\t\tXHR.appendData('listen_addr',document.getElementById('listen_addr-{$t}').value);\n\t\t\tXHR.appendData('send_listen_ip',document.getElementById('send_listen_ip-{$t}').value);\n\t\t\tXHR.appendData('SuperAdminPass',pp);\n\t\t\tAnimateDiv('EnableDNSLinker_img');\n\t\t\tXHR.sendAndLoad('{$page}', 'POST',x_Save{$t});\t\t\t\n\t\t\n\t\t}\n\t</script>\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
function popup()
{
    $tpl = new templates();
    $page = CurrentPageName();
    $t = time();
    $taskid = $_GET["taskid"];
    $index = $_GET["index"];
    $buttonname = "{add}";
    if (!is_numeric($index)) {
        $index = -1;
    }
    if ($index > -1) {
        $buttonname = "{apply}";
        $sql = "SELECT datasbackup FROM backup_schedules WHERE ID='{$taskid}'";
        $q = new mysql();
        $ligne = @mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
        $ressources = unserialize(base64_decode($ligne["datasbackup"]));
        preg_match("#WEBGET:(.*)#", $ressources[$index], $re);
        $ligne = unserialize(base64_decode($re[1]));
        $copy = imgtootltip("img/copy-16.png", "{copy}", "CopyWebGetSite('{$re[1]}')");
    }
    if ($_GET["CopyFrom"] != null) {
        $ligne = unserialize(base64_decode($_GET["CopyFrom"]));
        unset($ligne["RemoteArticaSite"]);
    }
    if (!is_numeric($ligne["RemoteArticaPort"])) {
        $ligne["RemoteArticaPort"] = 9000;
    }
    $html = "\n\t<div id='{$t}'>\n\t<div style='float:right;margin-bottom:10px'>{$copy}</div>\n\t</div>\n\t<table style='width:99%' class=form>\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{remote_artica_server}:</td>\n\t\t<td>" . Field_text("RemoteArticaServer-{$t}", $ligne["RemoteArticaServer"], "font-size:14px;width:220px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{remote_artica_port}:</td>\n\t\t<td>" . Field_text("RemoteArticaPort-{$t}", $ligne["RemoteArticaPort"], "font-size:14px;width:90px") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{username}:</td>\n\t\t<td>" . Field_text("RemoteArticaUser-{$t}", $ligne["RemoteArticaUser"], "font-size:14px;width:220px") . "</td>\n\t</tr>\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{password}:</td>\n\t\t<td>" . Field_password("RemoteArticaPassword-{$t}", $ligne["RemoteArticaPassword"], "font-size:14px;width:220px") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{sitename}:</td>\n\t\t<td>" . Field_text("RemoteArticaSite-{$t}", $ligne["RemoteArticaSite"], "font-size:14px;width:220px") . "</td>\n\t</tr>\n\t\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{auto-restore}:</td>\n\t\t<td>" . Field_checkbox("AutoRestore-{$t}", 1, $ligne["AutoRestore"], "DefaultCheck{$t}()") . "</td>\n\t</tr>\t\n\t\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{mysql_instance}:</td>\n\t\t<td><span id='freeweb-mysql-instances-{$t}'></span></td>\n\t</tr>\t\n\t\n\t\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{sitename}:</td>\n\t\t<td>" . Field_text("AutoRestoreSiteName-{$t}", $ligne["AutoRestoreSiteName"], "font-size:14px;width:99%") . "</td>\n\t</tr>\t\n\t\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>" . button($buttonname, "SaveConfig{$t}()", 16) . "</td>\n\t</tr>\n\t</table>\n<script>\n\tvar x_SaveConfig{$t}= function (obj) {\n\t\t\tvar index={$index};\n\t\t\tdocument.getElementById('{$t}').innerHTML='';\n\t\t\tvar tempvalue=obj.responseText;\n\t\t\tif(tempvalue.length>3){alert(tempvalue);return;};\n\t\t\tif(document.getElementById('backup-sources-table-list')){ \$('#backup-sources-table-list').flexReload(); }\n\t\t\tif(document.getElementById('table-backup-tasks')){ \$('#table-backup-tasks').flexReload(); }\n\t\t\tif(index<0){ YahooWin4Hide(); }\n\t\t\t\n\t\t }\t\n\n\tfunction SaveConfig{$t}(){\n\t\t\tif(!document.getElementById('AutoRestoreSqlInstance-{$t}')){alert('AutoRestoreSqlInstance-{$t} no such id');return;}\n\t\t\tvar tt=document.getElementById('RemoteArticaSite-{$t}').value;\n\t\t\tif(tt.length<3){return;}\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('taskid',{$taskid});\n\t\t\tXHR.appendData('index','{$index}');\n\t\t\tXHR.appendData('RemoteArticaServer',document.getElementById('RemoteArticaServer-{$t}').value);\n\t\t\tXHR.appendData('RemoteArticaPort',document.getElementById('RemoteArticaPort-{$t}').value);\n\t\t\tXHR.appendData('RemoteArticaUser',document.getElementById('RemoteArticaUser-{$t}').value);\n\t\t\tXHR.appendData('RemoteArticaSite',document.getElementById('RemoteArticaSite-{$t}').value);\n\t\t\tvar pp=encodeURIComponent(document.getElementById('RemoteArticaPassword-{$t}').value);\n\t\t\tif(document.getElementById('AutoRestore-{$t}').checked){XHR.appendData('AutoRestore',1);}else{XHR.appendData('AutoRestore',0);}\n\t\t\tXHR.appendData('AutoRestoreSiteName',document.getElementById('AutoRestoreSiteName-{$t}').value);\n\t\t\tXHR.appendData('AutoRestoreSqlInstance',document.getElementById('AutoRestoreSqlInstance-{$t}').value);\n\t\t\tXHR.appendData('RemoteArticaPassword',pp);\n\t\t\tXHR.sendAndLoad('{$page}', 'POST',x_SaveConfig{$t});\n\t\t\tAnimateDiv('{$t}');\n\t\n\t}\n\n\tfunction CopyWebGetSite(hash){\n\t\tLoadjs('{$page}?CopyFrom='+hash+'&taskid={$taskid}');\n\t}\n\n\tfunction freeweb_mysql_instances{$t}(){\n\t\tLoadAjaxTiny('freeweb-mysql-instances-{$t}','freeweb.edit.php?freeweb-mysql-instances-field=yes&servername=&t={$t}&default-value={$ligne["AutoRestoreSqlInstance"]}&field-name=AutoRestoreSqlInstance-{$t}');\n\t}\n\t\n\tfunction DefaultCheck{$t}(){\n\t\tdocument.getElementById('AutoRestoreSiteName-{$t}').disabled=true;\n\t\tif(document.getElementById('AutoRestoreSqlInstance-{$t}')){document.getElementById('AutoRestoreSqlInstance-{$t}').disabled=true;}\n\t\t\n\t\tif(document.getElementById('AutoRestore-{$t}').checked){\n\t\t\tdocument.getElementById('AutoRestoreSiteName-{$t}').disabled=false;\n\t\t\tif(document.getElementById('AutoRestoreSqlInstance-{$t}')){document.getElementById('AutoRestoreSqlInstance-{$t}').disabled=false;}\n\t\t}\n\t\t\n\t}\n\tfunction mysql_instance_id_check(){}\n\t\n\tfreeweb_mysql_instances{$t}();\n\tDefaultCheck{$t}();\n\n\n\n</script>\t\n\t\n\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
Example #3
0
function popup()
{
    $user = new user($_SESSION["uid"]);
    $SenderParams = $user->SenderCanonicalSMTPRelay();
    $host = $SenderParams["HOST"];
    $auth = $SenderParams["AUTH"];
    $edit_b = button("{edit}", "SaveUserSenderTransport()");
    $delete_b = button("{edit}", "DeleteUserSenderSettings()");
    $users = new usersMenus();
    if (!$user->AllowSenderCanonical) {
        $edit_b = button_hidden();
        $delete_b = null;
    }
    if ($host != null) {
        $dom = new DomainsTools();
        $arr = $dom->transport_maps_explode($user->AlternateSmtpRelay);
    }
    if ($arr[2] == null) {
        $arr[2] = 25;
    }
    $server = $arr[1];
    $port = $arr[2];
    if (preg_match("#(.+?):(.+)#", $auth, $re)) {
        $username = $re[1];
        $password = $re[2];
    }
    $t = ParagrapheTXT("{sender_user_explain}");
    $html = "\n\t\n\t{$t}\n\t<div id='sasltransport'>\n\t<table class=table_form>\n\t<tr>\n\t\t<td class=legend nowrap>{sender_canonical}:</td>\n\t\t<td>" . Field_text("sender_canonical", $user->SenderCanonical) . "</td>\n\t</tr>\n\t\t<tr>\n\t\t<td colspan=2 align=right><br>{$edit_b}</td>\n\t</tr>\n\t</table\t>\n\t\n\t<H3>{smtp_internet_relay_option}</H3>\n\t<table class=table_form>\n\t<tr>\n\t\t<td class=legendl nowrap align='left'>{relay_address}:</td>\n\t\t<td class=legendl nowrap align='left'>{listen_port}:</td>\n\t</tr>\n\t<tr>\n\t\t<td>" . Field_text("relay_address", $server) . "</td>\n\t\t<td>" . Field_text("relay_port", $port, "width:40px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=2>&nbsp;</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legendl nowrap align='left'>{username}:</td>\n\t\t<td class=legendl nowrap align='left'>{password}:</td>\n\t</tr>\t\n\n\t<tr>\n\t\t<td>" . Field_text("sasl_username", $username) . "</td>\n\t\t<td>" . Field_password("sasl_password", $password, "") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td><br>{$delete_b}</td>\n\t\t<td><br>{$edit_b}</td>\n\t</tr>\n\t</table>\n\t</div>\n\t\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
function popup()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $q = new mysql_squid_builder();
    $ID = $_GET["ID"];
    $sql = "SELECT * FROM webfilter_rules WHERE ID={$ID}";
    $ligne = mysql_fetch_array($q->QUERY_SQL($sql));
    $more8chars = $tpl->javascript_parse_text("{more8chars}");
    if ($ID == 0) {
        $sock = new sockets();
        $ligne = unserialize(base64_decode($sock->GET_INFO("DansGuardianDefaultMainRule")));
    }
    if ($ligne["BypassSecretKey"] == null) {
        $ligne["BypassSecretKey"] = md5(time());
    }
    $TIMES[0] = "{none}";
    $TIMES[300] = "5 {minutes}";
    $TIMES[900] = "15 {minutes}";
    $TIMES[1800] = "30 {minutes}";
    $TIMES[3600] = "1 {hour}";
    $TIMES[7200] = "2 {hours}";
    $TIMES[14400] = "4 {hours}";
    $t = time();
    $html = "\n\t<div id='{$t}'>\n\t<div class=text-info style='font-size:14px'>{TemporaryDeniedPageBypassExplain}<br>{BypassSecretKeyExplain}</div>\n\t<table style='width:99%' class=form>\n\t<tbody>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:16px'>{bypassFor}:</td>\n\t\t\t<td>" . Field_array_Hash($TIMES, "bypass{$t}", $ligne["bypass"], "style:font-size:16px") . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:16px'>{BypassSecretKey}:</td>\n\t\t\t<td>" . Field_password("BypassSecretKey{$t}", $ligne["BypassSecretKey"], "font-size:16px;width:220px") . "</td>\n\t\t</tr>\t\t\n\t\t<tr>\n\t\t\t<td colspan=2 align='right'><hr>" . button("{apply}", "bypassForSave()") . "</td>\n\t\t</tr>\n\t\t\n\t</tbody>\n\t</table>\n\t</div>\n\t<script>\n\tvar x_bypassForSave= function (obj) {\n\t\tvar res=obj.responseText;\n\t\tvar ID='{$ID}';\n\t\tif (res.length>3){alert(res);}\n\t\tYahooWin4Hide();\n\t}\n\t\n\t\tfunction bypassForSave(){\n\t\t      var XHR = new XHRConnection();\n\t\t      \n\t\t      var bypass=document.getElementById('bypass{$t}').value;\n\t\t      if(bypass.length<8){alert('{$more8chars}');return;}\n\t\t      XHR.appendData('bypass', document.getElementById('bypass{$t}').value);\n\t\t      XHR.appendData('BypassSecretKey', document.getElementById('BypassSecretKey{$t}').value);\n\t\t      XHR.appendData('ID','{$ID}');\n\t\t      AnimateDiv('{$t}');\n\t\t      XHR.sendAndLoad('{$page}', 'POST',x_bypassForSave);  \t\t\n\t\t}\n\t</script>\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
Example #5
0
function page()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new sockets();
    $users = new usersMenus();
    $ZarafaMySQLServiceType = $sock->GET_INFO("ZarafaMySQLServiceType");
    if (!is_numeric($ZarafaMySQLServiceType)) {
        $ZarafaMySQLServiceType = 1;
    }
    $ZarafaDedicateMySQLServer = $sock->GET_INFO("ZarafaDedicateMySQLServer");
    if (!is_numeric($ZarafaDedicateMySQLServer)) {
        $ZarafaDedicateMySQLServer = 0;
    }
    $arraySRV[1] = "{main_mysql_server_1}";
    $arraySRV[2] = "{main_mysql_server_2}";
    if ($ZarafaDedicateMySQLServer == 1) {
        $arraySRV[3] = "{main_mysql_server_3}";
    }
    $arraySRV[4] = "{main_mysql_server_4}";
    $t = time();
    $ZarafaRemoteMySQLServer = $sock->GET_INFO("ZarafaRemoteMySQLServer");
    $ZarafaRemoteMySQLServerPort = $sock->GET_INFO("ZarafaRemoteMySQLServerPort");
    $ZarafaRemoteMySQLServerAdmin = $sock->GET_INFO("ZarafaRemoteMySQLServerAdmin");
    $ZarafaRemoteMySQLServerPassword = $sock->GET_INFO("ZarafaRemoteMySQLServerPassword");
    if (!is_numeric($ZarafaRemoteMySQLServerPort)) {
        $ZarafaRemoteMySQLServerPort = 3306;
    }
    $DropDownF = Field_array_Hash($arraySRV, "ZarafaMySQLServiceType", $ZarafaMySQLServiceType, "ZarafaMySQLServiceTypeForm()", null, 0, "font-size:18px");
    $html = "\n\t<div id='{$t}'></div>\n\t<div class=explain id='zarafa_mysql_tuning_text' style='font-size:16px'>{zarafa_mysql_params_text}</div>\n\t\n\t<table style='width:99%' class=form>\n\t<tR>\n\t\t<td class=legend style='font-size:16px'>{mysql_server}:</td>\n\t\t<td>{$DropDownF}</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{remote_mysql_server}:</td>\n\t\t<td style='font-size:18px'>" . Field_text("ZarafaRemoteMySQLServer", $ZarafaRemoteMySQLServer, "font-size:18px;width:190px") . "</td>\n\t\t<td width=1%></td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{mysql_server_port}:</td>\n\t\t<td style='font-size:18px'>" . Field_text("ZarafaRemoteMySQLServerPort", $ZarafaRemoteMySQLServerPort, "font-size:18px;width:90px") . "</td>\n\t\t<td width=1%></td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{mysql_admin}:</td>\n\t\t<td style='font-size:18px'>" . Field_text("ZarafaRemoteMySQLServerAdmin", $ZarafaRemoteMySQLServerAdmin, "font-size:18px;width:190px") . "</td>\n\t\t<td width=1%></td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{password}:</td>\n\t\t<td style='font-size:18px'>" . Field_password("ZarafaRemoteMySQLServerPassword", $ZarafaRemoteMySQLServerPassword, "font-size:18px;width:190px") . "</td>\n\t\t<td width=1%></td>\n\t</tr>\t\t\t\t\t\n\t<tr>\n\t\t<td colspan=3 align=right><hr>" . button("{apply}", "ZarafaSave{$t}()", 24) . "</td>\n\t</tr>\t\n</table>\n<script>\n\tfunction ZarafaMySQLServiceTypeForm(){\n\t\tdocument.getElementById('ZarafaRemoteMySQLServer').disabled=true;\n\t\tdocument.getElementById('ZarafaRemoteMySQLServerPort').disabled=true;\n\t\tdocument.getElementById('ZarafaRemoteMySQLServerAdmin').disabled=true;\n\t\tdocument.getElementById('ZarafaRemoteMySQLServerPassword').disabled=true;\n\t\tif(document.getElementById('ZarafaMySQLServiceType').value==4){\n\t\t\tdocument.getElementById('ZarafaRemoteMySQLServer').disabled=false;\n\t\t\tdocument.getElementById('ZarafaRemoteMySQLServerPort').disabled=false;\n\t\t\tdocument.getElementById('ZarafaRemoteMySQLServerAdmin').disabled=false;\n\t\t\tdocument.getElementById('ZarafaRemoteMySQLServerPassword').disabled=false;\n\t\t}\n\t\n\t}\n\tvar x_ZarafaSave{$t}= function (obj) {\n\t\tvar tempvalue=obj.responseText;\n\t\tdocument.getElementById('{$t}').innerHTML='';\n\t\tif(tempvalue.length>3){alert(tempvalue);}\n\t\t\n\t\t}\t\n\t\n\tfunction ZarafaSave{$t}(){\n\t\tvar XHR = new XHRConnection();\n\t\tvar pp=encodeURIComponent(document.getElementById('ZarafaRemoteMySQLServerPassword').value);\n\t\tXHR.appendData('ZarafaMySQLServiceType',document.getElementById('ZarafaMySQLServiceType').value);\n\t\tXHR.appendData('ZarafaRemoteMySQLServer',document.getElementById('ZarafaRemoteMySQLServer').value);\n\t\tXHR.appendData('ZarafaRemoteMySQLServerPort',document.getElementById('ZarafaRemoteMySQLServerPort').value);\n\t\tXHR.appendData('ZarafaRemoteMySQLServerAdmin',document.getElementById('ZarafaRemoteMySQLServerAdmin').value);\n\t\tXHR.appendData('ZarafaRemoteMySQLServerPassword',pp);\n\t\tAnimateDiv('{$t}');\n\t\tXHR.sendAndLoad('{$page}', 'POST',x_ZarafaSave{$t});\n\t\n\t}\n\t\nZarafaMySQLServiceTypeForm();\n</script>\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
Example #6
0
function Page()
{
    $ruleid = $_GET["ID"];
    $t = time();
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new wifidog_settings($ruleid);
    $wifidog_templates = new wifidog_templates($_GET["ruleid"]);
    $ArticaHotSpotNowPassword = intval($sock->GET_INFO("ArticaHotSpotNowPassword"));
    $ENABLED_REDIRECT_LOGIN = intval($sock->GET_INFO("ENABLED_REDIRECT_LOGIN"));
    $USE_TERMS = intval($sock->GET_INFO("USE_TERMS"));
    $REGISTER_MAX_TIME = $sock->GET_INFO("REGISTER_MAX_TIME");
    $smtp_server_port = intval(trim($sock->GET_INFO("smtp_server_port")));
    if ($smtp_server_port == 0) {
        $smtp_server_port = 25;
    }
    if ($REGISTER_MAX_TIME < 5) {
        $REGISTER_MAX_TIME = 5;
    }
    $Timez[5] = "5 {minutes}";
    $Timez[10] = "10 {minutes}";
    $Timez[15] = "15 {minutes}";
    $Timez[30] = "30 {minutes}";
    $Timez[60] = "1 {hour}";
    $html = "\n\t<div style='width:100%;font-size:30px;margin-bottom:20px'>{self_register} SMTP</div>\t\t\n\t<div style='width:98%' class=form>\n\t\t\t\n" . Paragraphe_switch_img("{enable_hotspot_smtp}", "{enable_hotspot_smtp_explain}", "ENABLED_SMTP-{$t}", intval($sock->GET_INFO("ENABLED_SMTP")), null, 1090) . "\t\t\t\n\t\t\t\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend style='font-size:22px' style='width:600px'>{max_time_register}:</td>\n\t\t<td>" . Field_array_Hash($Timez, "REGISTER_MAX_TIME-{$t}", $REGISTER_MAX_TIME, "style:font-size:22px") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{smtp_register_message}:</td>\n\t\t<td><textarea \n\t\t\tstyle='width:100%;height:150px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\t\tCourier,monospace;background-color:white;color:black' id='REGISTER_MESSAGE-{$t}'>{$wifidog_templates->REGISTER_MESSAGE}</textarea>\n\t\t</td>\n\t</tr>\t\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{smtp_register_subject}:</td>\n\t\t<td style='width:860px'><textarea \n\t\t\tstyle='width:100%;height:40px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\t\tCourier,monospace;background-color:white;color:black' id='REGISTER_SUBJECT-{$t}'>{$wifidog_templates->REGISTER_SUBJECT}</textarea>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{smtp_confirm}:</td>\n\t\t<td style='width:860px'><textarea \n\t\t\tstyle='width:100%;height:40px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\t\tCourier,monospace;background-color:white;color:black' id='CONFIRM_MESSAGE-{$t}'>{$wifidog_templates->CONFIRM_MESSAGE}</textarea>\n\t\t</td>\n\t</tr>\n\t\n\t\n\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{lost_password_text}:</td>\n\t\t<td style='width:860px'><textarea \n\t\t\tstyle='width:100%;height:40px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\t\tCourier,monospace;background-color:white;color:black' id='LostPasswordLink-{$t}'>{$wifidog_templates->LostPasswordLink}</textarea>\n\t\t</td>\n\t</tr>\n\t\n\t\n\t\t\t\t\t\n\t\t<tr>\n\t\t<td nowrap class=legend style='font-size:22px'>{smtp_server_name}:</strong></td>\n\t\t<td>" . Field_text("smtp_server_name-{$t}", trim($sock->GET_INFO("smtp_server_name")), 'font-size:22px;padding:3px;width:450px') . "</td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:22px'>{smtp_server_port}:</strong></td>\n\t\t<td>" . Field_text("smtp_server_port-{$t}", $smtp_server_port, 'font-size:22px;padding:3px;width:110px') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:22px'>{smtp_sender}:</strong></td>\n\t\t<td>" . Field_text("smtp_sender-{$t}", trim($sock->GET_INFO("smtp_sender")), 'font-size:22px;padding:3px;width:450px') . "</td>\n\t</tr>\n\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:22px'>{smtp_auth_user}:</strong></td>\n\t\t<td>" . Field_text("smtp_auth_user-{$t}", trim($sock->GET_INFO("smtp_auth_user")), 'font-size:22px;padding:3px;width:450px') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:22px'>{smtp_auth_passwd}:</strong></td>\n\t\t<td>" . Field_password("smtp_auth_passwd-{$t}", trim($sock->GET_INFO("smtp_auth_passwd")), 'font-size:22px;padding:3px;width:450px') . "</td>\n\t\t\t\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:22px'>{tls_enabled}:</strong></td>\n\t\t<td>" . Field_checkbox_design("tls_enabled-{$t}", 1, $sock->GET_INFO("tls_enabled")) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td align='right' colspan=2>\n\t\t\t\t" . button('{test}', "TestSMTP{$t}();", 32) . "&nbsp;" . button('{apply}', "Save{$t}();", 32) . "</td>\n\t</tr>\n\t</table>\n\t<script>\n\t\n\tvar xSave{$t}= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>3){alert(results);}\n\t\t\$('#HOSTPOT_RULES').flexReload();\n\t}\t\n\t\n\tfunction TestSMTP{$t}(){\n\t\tSave{$t}();\n\t\tLoadjs('{$page}?test-smtp-js=yes&ruleid={$ruleid}');\n\t}\n\t\n\tfunction Save{$t}(){\n\t\tvar pp=encodeURIComponent(document.getElementById('smtp_auth_passwd-{$t}').value);\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('ruleid',{$ruleid});\n\t\tXHR.appendData('ENABLED_SMTP',encodeURIComponent(document.getElementById('ENABLED_SMTP-{$t}').value));\n\t\tXHR.appendData('REGISTER_SUBJECT',encodeURIComponent(document.getElementById('REGISTER_SUBJECT-{$t}').value));\n\t\tXHR.appendData('REGISTER_MESSAGE',encodeURIComponent(document.getElementById('REGISTER_MESSAGE-{$t}').value));\n\t\tXHR.appendData('LostPasswordLink',encodeURIComponent(document.getElementById('LostPasswordLink-{$t}').value));\n\t\tXHR.appendData('REGISTER_MAX_TIME',encodeURIComponent(document.getElementById('REGISTER_MAX_TIME-{$t}').value));\n\t\tXHR.appendData('CONFIRM_MESSAGE',encodeURIComponent(document.getElementById('CONFIRM_MESSAGE-{$t}').value));\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tif(document.getElementById('tls_enabled-{$t}').checked){XHR.appendData('tls_enabled',1);}else{XHR.appendData('tls_enabled',0); }\n\t\tXHR.appendData('smtp_server_name',encodeURIComponent(document.getElementById('smtp_server_name-{$t}').value));\n\t\tXHR.appendData('smtp_server_port',encodeURIComponent(document.getElementById('smtp_server_port-{$t}').value));\n\t\tXHR.appendData('smtp_sender',encodeURIComponent(document.getElementById('smtp_sender-{$t}').value));\n\t\tXHR.appendData('smtp_auth_user',encodeURIComponent(document.getElementById('smtp_auth_user-{$t}').value));\n\t\tXHR.appendData('smtp_auth_passwd',pp);\n\t\tXHR.appendData('smtp_notifications-{$t}','yes');\n\t\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n\t\t\n\t}\n</script>";
    echo $tpl->_ENGINE_parse_body($html);
}
Example #7
0
function settings()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $users = new usersMenus();
    $severtype["WIN_2003"] = "Windows 2003";
    $severtype["WIN_2008AES"] = "Windows 2008 with AES";
    $intro = "{APP_SQUIDKERAUTH_TEXT}<br>{APP_SQUIDKERAUTH_TEXT_REF}";
    if ($_GET["switch-template"] == "samba") {
        $intro = "{APP_SAMBAKERAUTH_TEXT}<br>{APP_SAMBAKERAUTH_TEXT_REF}";
    }
    $sock = new sockets();
    $array = unserialize(base64_decode($sock->GET_INFO("KerbAuthInfos")));
    $configADSamba = unserialize(base64_decode($sock->GET_INFO("SambaAdInfos")));
    $EnableKerbAuth = $sock->GET_INFO("EnableKerbAuth");
    if (!is_numeric("{$EnableKerbAuth}")) {
        $EnableKerbAuth = 0;
    }
    $samba_installed = 1;
    if (!$users->SAMBA_INSTALLED) {
        $samba_installed = 0;
    }
    $html = "\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top' width=1%><span id='kerbchkconf'></span>\n\t\t<div style='text-align:right'>" . imgtootltip("refresh-24.png", "{refresh}", "RefreshAll()") . "</div></td>\n\t<td valign='top' width=99%'>\n\t\t<div class=explain>{$intro}</div>\n\t</td>\n\t</table>\n\t\n\t<table style='width:100%' class=form>\n\t<tr>\n\t\t<td class=legend>{EnableWindowsAuthentication}:</td>\n\t\t<td>" . Field_checkbox("EnableKerbAuth", 1, "{$EnableKerbAuth}", "EnableKerbAuthCheck()") . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend>{WINDOWS_DNS_SUFFIX}:</td>\n\t\t<td>" . Field_text("WINDOWS_DNS_SUFFIX", $array["WINDOWS_DNS_SUFFIX"], "font-size:14px;padding:3px;width:190px") . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend>{WINDOWS_SERVER_NETBIOSNAME}:</td>\n\t\t<td>" . Field_text("WINDOWS_SERVER_NETBIOSNAME", $array["WINDOWS_SERVER_NETBIOSNAME"], "font-size:14px;padding:3px;width:190px") . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:12px'>{ADNETBIOSDOMAIN}:</td>\n\t\t<td>" . Field_text("ADNETBIOSDOMAIN", $array["ADNETBIOSDOMAIN"], "font-size:14px;padding:3px;width:165px") . "</td>\n\t\t<td>" . help_icon("{howto_ADNETBIOSDOMAIN}") . "</td>\n\t</tr>\t\t\n\t<tr>\n\t\t<td class=legend>{WINDOWS_SERVER_TYPE}:</td>\n\t\t<td>" . Field_array_Hash($severtype, "WINDOWS_SERVER_TYPE", $array["WINDOWS_SERVER_TYPE"], "style:font-size:14px;padding:3px") . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend>{administrator}:</td>\n\t\t<td>" . Field_text("WINDOWS_SERVER_ADMIN", $array["WINDOWS_SERVER_ADMIN"], "font-size:14px;padding:3px;width:190px") . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\t\t\n\t<tr>\n\t\t<td class=legend>{password}:</td>\n\t\t<td>" . Field_password("WINDOWS_SERVER_PASS", $array["WINDOWS_SERVER_PASS"], "font-size:14px;padding:3px;width:190px") . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\t\n\t\n\t<tr>\n\t<td colspan=2 align='right'><hr>" . button("{apply}", "SaveKERBProxy()") . "</td>\n\t</tr>\n\t</table>\n\t\n\t<script>\n\t\tfunction EnableKerbAuthCheck(){\n\t\t\tvar samba_installed={$samba_installed};\n\t\t\tdocument.getElementById('WINDOWS_DNS_SUFFIX').disabled=true;\n\t\t\tdocument.getElementById('WINDOWS_SERVER_NETBIOSNAME').disabled=true;\n\t\t\tdocument.getElementById('WINDOWS_SERVER_TYPE').disabled=true;\n\t\t\tdocument.getElementById('WINDOWS_SERVER_ADMIN').disabled=true;\n\t\t\tdocument.getElementById('WINDOWS_SERVER_PASS').disabled=true;\n\t\t\tdocument.getElementById('ADNETBIOSDOMAIN').disabled=true;\n\t\t\t\n\t\t\tif(document.getElementById('EnableKerbAuth').checked){\n\t\t\t\tdocument.getElementById('WINDOWS_DNS_SUFFIX').disabled=false;\n\t\t\t\tdocument.getElementById('WINDOWS_SERVER_NETBIOSNAME').disabled=false;\n\t\t\t\tdocument.getElementById('WINDOWS_SERVER_TYPE').disabled=false;\n\t\t\t\tdocument.getElementById('WINDOWS_SERVER_ADMIN').disabled=false;\n\t\t\t\tdocument.getElementById('WINDOWS_SERVER_PASS').disabled=false;\t\t\t\t\t\t\t\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(samba_installed==1){\n\t\t\t\tdocument.getElementById('ADNETBIOSDOMAIN').disabled=false;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t}\n\t\t\n\t\tfunction RefreshAll(){\n\t\t\tRefreshServerKerb();\n\t\t}\n\t\t\n\tvar x_SaveKERBProxy= function (obj) {\n\t\tRefreshServerKerb();\n\t}\t\t\n\t\n\t\tfunction SaveKERBProxy(){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tif(document.getElementById('EnableKerbAuth').checked){XHR.appendData('EnableKerbAuth',1);}else{XHR.appendData('EnableKerbAuth',0);}\n\t\t\tXHR.appendData('WINDOWS_DNS_SUFFIX',document.getElementById('WINDOWS_DNS_SUFFIX').value);\n\t\t\tXHR.appendData('WINDOWS_SERVER_NETBIOSNAME',document.getElementById('WINDOWS_SERVER_NETBIOSNAME').value);\n\t\t\tXHR.appendData('WINDOWS_SERVER_TYPE',document.getElementById('WINDOWS_SERVER_TYPE').value);\n\t\t\tXHR.appendData('WINDOWS_SERVER_ADMIN',document.getElementById('WINDOWS_SERVER_ADMIN').value);\n\t\t\tXHR.appendData('WINDOWS_SERVER_PASS',document.getElementById('WINDOWS_SERVER_PASS').value);\n\t\t\tXHR.appendData('ADNETBIOSDOMAIN',document.getElementById('ADNETBIOSDOMAIN').value);\n\t\t\tAnimateDiv('serverkerb-popup');\n\t\t\tXHR.sendAndLoad('{$page}', 'POST',x_SaveKERBProxy);\n\t\t\n\t\t}\n\t\t\n\t\t\n\tEnableKerbAuthCheck();\n\tLoadAjax('kerbchkconf','{$page}?kerbchkconf=yes');\n\t</script>\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
Example #8
0
function formulaire()
{
    $users = new usersMenus();
    $ldap = new clladp();
    $tpl = new templates();
    $page = CurrentPageName();
    if ($users->AsAnAdministratorGeneric) {
        $hash = $ldap->hash_get_ou(false);
    } else {
        $hash = $ldap->Hash_Get_ou_from_users($_SESSION["uid"], 1);
    }
    if (count($hash) == 1) {
        $org = $hash[0];
        $hash_groups = $ldap->hash_groups($org, 1);
        $hash_domains = $ldap->hash_get_domains_ou($org);
        $groups = Field_array_Hash($hash_groups, 'groupid', null, null, null, 0, "font-size:14px;padding:3px");
        $domains = Field_array_Hash($hash_domains, 'domain', null, null, null, 0, "font-size:14px;padding:3px");
    }
    $artica = new artica_general();
    $EnableVirtualDomainsInMailBoxes = $artica->EnableVirtualDomainsInMailBoxes;
    while (list($num, $ligne) = each($hash)) {
        $ous[$ligne] = $ligne;
    }
    $ou = Field_array_Hash($ous, 'organization', null, "ChangeFormValues()", null, 0, "font-size:14px;padding:3px");
    $form = "\n\t\n\t<input type='hidden' id='EnableVirtualDomainsInMailBoxes' value='{$EnableVirtualDomainsInMailBoxes}'>\n\t<table style='width:100%' class=form>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:14px'>{organization}:</td>\n\t\t\t<td>{$ou}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:14px'>{group}:</td>\n\t\t\t<td><span id='select_groups'>{$groups}</span>\n\t\t</tr>\n\t\t<tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:14px'>{firstname}:</td>\n\t\t\t<td>" . Field_text('firstname', null, 'width:120px;font-size:14px;padding:3px', null, 'ChangeFormValues()') . "</td>\n\t\t</tr>\t\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:14px'>{lastname}:</td>\n\t\t\t<td>" . Field_text('lastname', null, 'width:120px;font-size:14px;padding:3px', null, "ChangeFormValues()") . "</td>\n\t\t</tr>\t\t\n\t\t\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:14px'>{email}:</td>\n\t\t\t<td>" . Field_text('email', null, 'width:120px;font-size:14px;padding:3px', null, "ChangeFormValues()") . "@<span id='select_domain'>{$domains}</span></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:14px'>{uid}:</td>\n\t\t\t<td>" . Field_text('login', null, 'width:120px;font-size:14px;padding:3px') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:14px'>{password}:</td>\n\t\t\t<td>" . Field_password('password', null, "font-size:14px;padding:3px") . "</td>\n\t\t</tr>\t\n\t\t<tr><td colspan=2>&nbsp;</td></tr>\n\t\t<tr>\n\t\t\t<td colspan=2 align='right'><hr>" . button("{add}", "SaveAddUser()") . "\n\t\t\t\t\n\t\t\t</td>\n\t\t</tr>\n\t\t\n\t\t</table>\n\t";
    $html = "\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top' width=1%><div id='ffform'><img src='img/identity-add-96.png'></div></td>\n\t\t<td valign='top' width=99%><div>{$form}</div></td>\n\t</tr>\n\t</table>\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
function popup()
{
    $tpl = new templates();
    $page = CurrentPageName();
    $sock = new sockets();
    $ArticaMetaAddNewServ = unserialize($sock->GET_INFO("ArticaMetaAddNewServ"));
    $ArticaMetaHost = $ArticaMetaAddNewServ["ArticaMetaHost"];
    $ArticaMetaPort = $ArticaMetaAddNewServ["ArticaMetaPort"];
    $ArticaMetaUsername = $ArticaMetaAddNewServ["ArticaMetaUsername"];
    $ArticaMetaPassword = $ArticaMetaAddNewServ["ArticaMetaPassword"];
    $ArticaMetaServHost = $ArticaMetaAddNewServ["ArticaMetaServHost"];
    $ArticaMetaServPort = $ArticaMetaAddNewServ["ArticaMetaServPort"];
    $change_uuid = $ArticaMetaAddNewServ["change_uuid"];
    $t = time();
    if (!is_numeric($ArticaMetaPort)) {
        $ArticaMetaPort = 9000;
    }
    if (!is_numeric($ArticaMetaServPort)) {
        $ArticaMetaServPort = 9000;
    }
    if ($ArticaMetaServHost == null) {
        $ArticaMetaServHost = $_SERVER["SERVER_NAME"];
    }
    if ($ArticaMetaUsername == null) {
        $ArticaMetaUsername = "******";
    }
    $html = "\t<div style='width:98%' class=form>\n\t\t<table style='width:100%'>\n\t\t\t\t\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:18px'>{hostname} (client):</td>\n\t\t\t<td style='font-size:18px'>" . Field_text("ArticaMetaHost-{$t}", $ArticaMetaHost, "font-size:18px;width:240px") . "</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:18px'>{change_uuid}:</td>\n\t\t\t<td style='font-size:18px'>" . Field_checkbox("change_uuid-{$t}", 1, $change_uuid) . "</td>\n\t\t</tr>\t\t\t\t\t\t\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:18px'>{port}:</td>\n\t\t\t<td style='font-size:18px'>" . Field_text("ArticaMetaPort-{$t}", $ArticaMetaPort, "font-size:18px;width:110px") . "</td>\n\t\t</tr>\t\t\t\t\n\t\t\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:18px'>{username}:</td>\n\t\t\t<td style='font-size:18px'>" . Field_text("username-{$t}", $ArticaMetaUsername, "font-size:18px;width:240px") . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:18px'>{password}:</td>\n\t\t\t<td style='font-size:18px'>" . Field_password("password-{$t}", $ArticaMetaPassword, "font-size:18px;width:240px") . "</td>\n\t\t</tr>\n\t\t<tr><td colspan=2><hr></td></tR>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:18px'>{hostname} ({server_mode}):</td>\n\t\t\t<td style='font-size:18px'>" . Field_text("ArticaMetaServHost-{$t}", $ArticaMetaServHost, "font-size:18px;width:240px") . "</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:18px'>{port} ({server_mode}):</td>\n\t\t\t<td style='font-size:18px'>" . Field_text("ArticaMetaServPort-{$t}", $ArticaMetaServPort, "font-size:18px;width:110px") . "</td>\n\t\t</tr>\t\t\n\t\t\n\n\t\t<tr>\n\t\t\t<td colspan=2 align='right'><hr>" . button("{add}", "Save{$t}()", 24) . "</td>\n\t\t</tr>\n\t\t</table>\n\t\t\t\t<script>\n\t\n\tvar xSave{$t}= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>0){alert(results);return;}\n\t\tLoadjs('artica-meta.NewServ.progress.php');\n\t}\n\t\n\t\n\tfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tchange_uuid=0;\n\tif(document.getElementById('change_uuid-{$t}').checked){change_uuid=1;}\n\tXHR.appendData('ArticaMetaHost',document.getElementById('ArticaMetaHost-{$t}').value);\n\tXHR.appendData('ArticaMetaPort',document.getElementById('ArticaMetaPort-{$t}').value);\n\tXHR.appendData('ArticaMetaServHost',document.getElementById('ArticaMetaServHost-{$t}').value);\n\tXHR.appendData('ArticaMetaServPort',document.getElementById('ArticaMetaServPort-{$t}').value);\n\t\n\tXHR.appendData('change_uuid',change_uuid);\n\t\n\tXHR.appendData('ArticaMetaUsername',document.getElementById('username-{$t}').value);\n\tXHR.appendData('ArticaMetaPassword',encodeURIComponent(document.getElementById('password-{$t}').value));\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n\t}\n\t\n\t</script>\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
Example #10
0
function popup()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new sockets();
    $cache_mgr_user = $sock->GET_INFO("cache_mgr_user");
    $cachemgr_passwd = $sock->GET_INFO("cachemgr_passwd");
    $cachemgr_left_menu = $sock->GET_INFO("cachemgr_left_menu");
    $sql = "SELECT servername,useSSL FROM freeweb WHERE `groupware`='cachemgr' LIMIT 0,1";
    $q = new mysql();
    $ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
    if ($ligne["servername"] != null) {
        $FreeWebListenPort = $sock->GET_INFO("FreeWebListenPort");
        $FreeWebListenSSLPort = $sock->GET_INFO("FreeWebListenSSLPort");
        if (!is_numeric($FreeWebListenPort)) {
            $FreeWebListenPort = 80;
        }
        if (!is_numeric($FreeWebListenSSLPort)) {
            $FreeWebListenSSLPort = 443;
        }
        $prefix = "http";
        if ($ligne["useSSL"] == 1) {
            $FreeWebListenPort = $FreeWebListenSSLPort;
            $prefix = "https";
        }
        $link = "{$prefix}://{$ligne["servername"]}:{$FreeWebListenPort}";
        $linkjs = "javascript:s_PopUpFull('{$link}',800,800,'Squid Cache Manager')";
        $link = "<a href=\"javascript:blur();\" OnClick=\"{$linkjs}\" style='font-size:14px;text-decoration:underline'>{$link}</a>";
        $edit_www = "<a href=\"javascript:blur();\" OnClick=\"Loadjs('freeweb.edit.php?hostname={$ligne["servername"]}');\" style='font-size:14px;text-decoration:underline'>{edit}</a>";
    }
    $html = "\n\t<div class=explain>{cachemgr_text}</div><div style='text-align:right;margin-bottom:5px'><i>{$link}</i></div>\n\t<div id='cachemgr-div'>\n\t<div style='font-size:16px'>{cachemgr}:: {authentication}</div>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend>{add_to_left_menu}:</td>\n\t\t<td>" . Field_checkbox("cachemgr_left_menu", 1, $cachemgr_left_menu, "cachemgr_left_menu_save();") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend>{username}:</td>\n\t\t<td>" . Field_text("cache_mgr_user", "{$cache_mgr_user}", "font-size:14px;padding:3px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend>{password}:</td>\n\t\t<td>" . Field_password("cachemgr_passwd", "{$cachemgr_passwd}", "font-size:14px;padding:3px") . "</td>\n\t</tr>\t\n\t</table>\n\t<br>\n\t\n\t<div style='font-size:16px'>{cachemgr}:: {website_name}</div>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend>{website}:</td>\n\t\t<td>" . Field_text("website", $ligne["servername"], "font-size:14px;padding:3px;width:220px") . "&nbsp;{$edit_www}</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=2 align='right'>\n\t\t<hr>" . button("{apply}", "SaveCacheManagerParams()") . "</td>\n\t</tr>\n\t</table>\n\t<br>\t\n\t</div>\n\t<script>\n\n\tvar x_SaveCacheManagerParams= function (obj) {\n\t\tvar tempvalue=obj.responseText;\n\t\tif(tempvalue.length>3){alert(tempvalue);}\t\n\t\t\n\t}\n\n\tvar x_cachemgr_left_menu_save= function (obj) {\n\t\tvar tempvalue=obj.responseText;\n\t\tif(tempvalue.length>3){alert(tempvalue);}\t\n\t\tCacheOff();\n\t}\t\n\t\n\tfunction cachemgr_left_menu_save(){\n\t\tvar XHR = new XHRConnection();\n\t\tif(document.getElementById('cachemgr_left_menu').checked){\n\t\t\tXHR.appendData('cachemgr_left_menu',1)\n\t\t}else{\n\t\t\tXHR.appendData('cachemgr_left_menu',0)\n\t\t}\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_cachemgr_left_menu_save);\n\t\t\n\t}\n\t\n\t\n\tfunction SaveCacheManagerParams(key){\n\t\tvar XHR = new XHRConnection();\n\t\tvar a=document.getElementById('cache_mgr_user').value;\n\t\tif(a.length<3){return;}\n\t\ta=document.getElementById('cachemgr_passwd').value;\n\t\tif(a.length<3){return;}\t\t\n\t\ta=document.getElementById('website').value;\n\t\tif(a.length<3){return;}\t\t\t\n\t\t\n\t\tXHR.appendData('cache_mgr_user',document.getElementById('cache_mgr_user').value);\t\n\t\tXHR.appendData('cachemgr_passwd',document.getElementById('cachemgr_passwd').value);\n\t\tXHR.appendData('website',document.getElementById('website').value);\n\t\tdocument.getElementById('cachemgr-div').innerHTML='<center style=\"width:100%\"><img src=img/wait_verybig.gif></center>';\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_SaveCacheManagerParams);\n\t\t}\t\n\n\t</script>\t\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
Example #11
0
function Page()
{
    $ruleid = $_GET["ID"];
    $t = time();
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new wifidog_settings($ruleid);
    $wifidog_templates = new wifidog_templates($ruleid);
    $ArticaHotSpotNowPassword = intval($sock->GET_INFO("ArticaHotSpotNowPassword"));
    $ENABLED_REDIRECT_LOGIN = intval($sock->GET_INFO("ENABLED_REDIRECT_LOGIN"));
    $USE_TERMS = intval($sock->GET_INFO("USE_TERMS"));
    $REGISTER_MAX_TIME = $sock->GET_INFO("REGISTER_MAX_TIME");
    $smtp_server_port = intval(trim($sock->GET_INFO("smtp_server_port")));
    if ($smtp_server_port == 0) {
        $smtp_server_port = 25;
    }
    if ($REGISTER_MAX_TIME < 5) {
        $REGISTER_MAX_TIME = 5;
    }
    $Timez[5] = "5 {minutes}";
    $Timez[10] = "10 {minutes}";
    $Timez[15] = "15 {minutes}";
    $Timez[30] = "30 {minutes}";
    $Timez[60] = "1 {hour}";
    $html = "\n\t<div style='width:100%;font-size:30px;margin-bottom:20px'>{self_register} SMS {rule}:{$ruleid}</div>\t\t\n\t<div style='font-size:18px' class=explain>{hotspot_sms_mailexp}</div>\n\t\n\t<div style='width:98%' class=form>\n\t<table style='width:100%'>\n\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{form_message}:</td>\n\t\t<td style='width:860px'><textarea \n\t\t\tstyle='width:100%;height:140px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\t\tCourier,monospace;background-color:white;color:black' id='SMS_INTRO-{$t}'>" . $wifidog_templates->SMS_INTRO . "</textarea>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:22px'>{font_size}:</strong></td>\n\t\t<td>" . Field_text("SMS_FONT_SIZE-{$t}", $wifidog_templates->SMS_FONT_SIZE, 'font-size:22px;padding:3px;width:120px') . "</td>\n\t</tr>\t\t\t\t\t\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:22px'>{field_label}:</strong></td>\n\t\t<td>" . Field_text("SMS_FIELD-{$t}", $wifidog_templates->SMS_FIELD, 'font-size:22px;padding:3px;width:450px') . "</td>\n\t</tr>\t\t\t\t\t\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:22px'>{button_label}:</strong></td>\n\t\t<td>" . Field_text("SMS_BUTTON-{$t}", $wifidog_templates->SMS_BUTTON, 'font-size:22px;padding:3px;width:450px') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{wrong_code_message}:</td>\n\t\t<td><textarea \n\t\t\tstyle='width:100%;height:90px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\t\tCourier,monospace;background-color:white;color:black' id='SMS_CODE_ERROR-{$t}'>" . $wifidog_templates->SMS_CODE_ERROR . "</textarea>\n\t\t</td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{smtp_register_subject}:</td>\n\t\t<td style='width:860px'><textarea \n\t\t\tstyle='width:100%;height:40px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\t\tCourier,monospace;background-color:white;color:black' id='SMS_SMTP_SUBJECT-{$t}'>" . $wifidog_templates->SMS_SMTP_SUBJECT . "</textarea>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{message}:</td>\n\t\t<td><textarea \n\t\t\tstyle='width:100%;height:150px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\t\tCourier,monospace;background-color:white;color:black' id='SMS_SMTP_BODY-{$t}'>" . $wifidog_templates->SMS_SMTP_BODY . "</textarea>\n\t\t</td>\n\t</tr>\t\n\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{smtp_confirm}:</td>\n\t\t<td style='width:860px'><textarea \n\t\t\tstyle='width:100%;height:140px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\t\tCourier,monospace;background-color:white;color:black' id='SMS_CONFIRM_MESSAGE-{$t}'>" . $wifidog_templates->SMS_CONFIRM_MESSAGE . "</textarea>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:22px'>{smtp_server_name}:</strong></td>\n\t\t<td>" . Field_text("sms_smtp_server_name-{$t}", trim($sock->GET_INFO("sms_smtp_server_name")), 'font-size:22px;padding:3px;width:450px') . "</td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:22px'>{smtp_server_port}:</strong></td>\n\t\t<td>" . Field_text("sms_smtp_server_port-{$t}", trim($sock->GET_INFO("sms_smtp_server_port")), 'font-size:22px;padding:3px;width:110px') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:22px'>{smtp_sender}:</strong></td>\n\t\t<td>" . Field_text("sms_smtp_sender-{$t}", trim($sock->GET_INFO("sms_smtp_sender")), 'font-size:22px;padding:3px;width:450px') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:22px'>{recipient}:</strong></td>\n\t\t<td>" . Field_text("sms_smtp_recipient-{$t}", trim($sock->GET_INFO("sms_smtp_recipient")), 'font-size:22px;padding:3px;width:450px') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:22px'>{smtp_auth_user}:</strong></td>\n\t\t<td>" . Field_text("sms_smtp_auth_user-{$t}", trim($sock->GET_INFO("sms_smtp_auth_user")), 'font-size:22px;padding:3px;width:450px') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:22px'>{smtp_auth_passwd}:</strong></td>\n\t\t<td>" . Field_password("sms_smtp_auth_passwd-{$t}", trim($sock->GET_INFO("sms_smtp_auth_passwd")), 'font-size:22px;padding:3px;width:450px') . "</td>\n\t\t\t\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:22px'>{tls_enabled}:</strong></td>\n\t\t<td>" . Field_checkbox_design("sms_tls_enabled-{$t}", 1, $sock->GET_INFO("sms_tls_enabled")) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td align='right' colspan=2>\n\t\t\t\t" . button('{test}', "TestSMTP{$t}();", 32) . "&nbsp;" . button('{apply}', "Save{$t}();", 32) . "</td>\n\t</tr>\n\t</table>\n\t<script>\n\t\n\tvar xSave{$t}= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>3){alert(results);}\n\t\t\$('#HOSTPOT_RULES').flexReload();\n\t}\t\n\t\n\tfunction TestSMTP{$t}(){\n\t\tSave{$t}();\n\t\tLoadjs('{$page}?test-smtp-js=yes&ruleid={$ruleid}');\n\t}\n\t\n\tfunction Save{$t}(){\n\t\tvar pp=encodeURIComponent(document.getElementById('sms_smtp_auth_passwd-{$t}').value);\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('ruleid',{$ruleid});\n\t\tXHR.appendData('SMS_SMTP_BODY',encodeURIComponent(document.getElementById('SMS_SMTP_BODY-{$t}').value));\n\t\tXHR.appendData('SMS_SMTP_SUBJECT',encodeURIComponent(document.getElementById('SMS_SMTP_SUBJECT-{$t}').value));\n\t\tXHR.appendData('SMS_INTRO',encodeURIComponent(document.getElementById('SMS_INTRO-{$t}').value));\n\t\tXHR.appendData('SMS_BUTTON',encodeURIComponent(document.getElementById('SMS_BUTTON-{$t}').value));\n\t\tXHR.appendData('SMS_FIELD',encodeURIComponent(document.getElementById('SMS_FIELD-{$t}').value));\n\t\tXHR.appendData('SMS_CONFIRM_MESSAGE',encodeURIComponent(document.getElementById('SMS_CONFIRM_MESSAGE-{$t}').value));\n\n\t\tXHR.appendData('SMS_FONT_SIZE',encodeURIComponent(document.getElementById('SMS_FONT_SIZE-{$t}').value));\n\t\tXHR.appendData('SMS_CODE_ERROR',encodeURIComponent(document.getElementById('SMS_CODE_ERROR-{$t}').value));\n\t\tif(document.getElementById('sms_tls_enabled-{$t}').checked){XHR.appendData('sms_tls_enabled',1);}else{XHR.appendData('sms_tls_enabled',0); }\n\t\tXHR.appendData('sms_smtp_server_name',encodeURIComponent(document.getElementById('sms_smtp_server_name-{$t}').value));\n\t\tXHR.appendData('sms_smtp_server_port',encodeURIComponent(document.getElementById('sms_smtp_server_port-{$t}').value));\n\t\tXHR.appendData('sms_smtp_sender',encodeURIComponent(document.getElementById('sms_smtp_sender-{$t}').value));\n\t\tXHR.appendData('sms_smtp_recipient',encodeURIComponent(document.getElementById('sms_smtp_recipient-{$t}').value));\n\t\tXHR.appendData('sms_smtp_auth_user',encodeURIComponent(document.getElementById('sms_smtp_auth_user-{$t}').value));\n\t\tXHR.appendData('sms_smtp_auth_passwd',pp);\n\t\tXHR.appendData('smtp_notifications-{$t}','yes');\n\t\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n\t\t\n\t}\n</script>";
    echo $tpl->_ENGINE_parse_body($html);
}
Example #12
0
function auth_popup()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $html = "\n\t<span id='postresults'></span>\n\t<form id='authform'>\n\t<table style='width:100%' >\n\t<tr>\n\t\t<td class=legend>{username}:</td>\n\t\t<td>" . Field_text("username-logon", null, "font-size:16px;padding:5px", "script:SuBmitAuthCheck(event)") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend>{password}:</td>\n\t\t<td>" . Field_password("username-password", null, "font-size:16px;padding:5px", "script:SuBmitAuthCheck(event)") . "</td>\n\t</tr>\t\n\t<tr>\n\t<td colspan=2 align='right' style='font-size:16px;padding:5px'>" . button("{submit}", "SuBmitAuth()") . "</td>\n\t</tr>\n\t</table>\n\t</form>\n\t\n\t<script>\n\t\tfunction SuBmitAuthCheck(e){\n\t\t\tif(checkEnter(e)){SuBmitAuth();}\n\t\t}\n\t\n\t\n\t\tvar x_DeleteAllArticaEvents= function (obj) {\n\t\t\tvar results=obj.responseText;\n\t\t\tif(results.length>0){alert(results);}\n\t\t\tLoadAjax('articaevents','{$page}?events-table=yes&LockBycontext={$_GET["LockBycontext"]}');\n\t\t\t\t\n\t\t}\t\t\t\n\t\t\n\t\tfunction SuBmitAuth(){\n\t\t\tAnimateDiv('postresults');\n\t\t\t\$.post('{$page}',  \$('#authform').serialize(),\n\t\t\t\tfunction(data) {\n  \t\t\t\t\t\$('#postresults').html(data);\n\t\t\t\t}\n\t\t\t);\n\t\t\n\t\t}\t\n\tdocument.title='Artica {$_SERVER["SERVER_NAME"]}'; \n\t\n\t</script>\n\t\n\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
Example #13
0
function popup()
{
    $ldap = new clladp();
    $cyruspass = $ldap->CyrusPassword();
    $html = "<H1>{cyrus password}</H1>\n\t<div id='change_cyrus_password'>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top' width=1%><img src='img/cyrus-password-120.png'></td>\n\t\t<td valign='top'><p class=caption>{change_cyrus_password}</p>\n\t\t<br>" . RoundedLightWhite("\n\t\t\t<table style='width:99%'>\n\t\t\t<tr>\n\t\t\t\t<td class=legend>{password}:</td>\n\t\t\t\t<td>" . Field_password('cyruspassword', $cyruspass) . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td colspan=2 align='right'><hr><input type='button' Onclick=\"javascript:SaveCyrusPassword();\" value='{edit}&nbsp;'></td>\n\t\t\t</tr>\n\t\t</table>") . "\n\t\t</td>\n\t\t</tr>\n\t\t</table></div>";
    $tp = new templates();
    echo $tp->_ENGINE_parse_body($html, 'cyrus.index.php');
}
Example #14
0
function popup()
{
    $tpl = new templates();
    $page = CurrentPageName();
    $root_error_pass = $tpl->javascript_parse_text("{root_error_pass}");
    $html = "\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top' width=1%><div id='animate-root'><img src='img/cop-lock-128.png' ></div></td>\n\t\t<td valign='top'><div class=explain>{root_password_not_changed_text}</div><p>&nbsp;</p>\n\t\t<table style='width:95%' class=form>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:16px'>{password}:</td>\n\t\t\t<td>" . Field_password("root-pass1", null, "font-size:16px;padding:3px;width:120px", null, null, null, false, "CHRootPwdCheck(event)") . "</td>\n\t\t</tr>\n\t\t\t<td>&nbsp;</td>\n\t\t\t<td>" . Field_password("root-pass2", null, "font-size:16px;padding:3px;width:120px", null, null, null, false, "CHRootPwdCheck(event)") . "</td>\n\t\t<tr>\n\t\t<tr>\n\t\t\t<td colspan=2 align='right'><hr>" . button("{apply}", "CHRootPwd()") . "</td>\n\t\t</tr>\n\t\t</table>\n\t\t\n\t\t\n\t\t<script>\n\t\t\tfunction CHRootPwdCheck(e){\n\t\t\t\tif(checkEnter(e)){CHRootPwd();return;}\n\t\t\t}\n\t\t\t\n\t\tvar X_CHRootPwd= function (obj) {\n\t\t\tvar tempvalue=obj.responseText;\n\t\t\tdocument.getElementById('animate-root').innerHTML='<img src=img/cop-lock-128.png>';\n\t\t\tif(tempvalue.length>3){alert(tempvalue);return;}\n\t\t\tYahooWin5Hide();\n\t\t\t}\t\t\t\n\t\t\n\t\tfunction CHRootPwd(){\n\t\t\tvar pass=document.getElementById('root-pass1').value;\n\t\t\tif(pass.length<3){alert('{$root_error_pass}');return;}\n\t\t\tif(document.getElementById('root-pass1').value!==document.getElementById('root-pass2').value){alert('{$root_error_pass}');return;}\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('change_password',document.getElementById('root-pass1').value);\n\t\t\tAnimateDiv('animate-root');\n\t\t\tXHR.sendAndLoad('{$page}', 'POST',X_CHRootPwd);\n\t\t}\n\t</script>\n\t\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
function popup_add()
{
    $t = $_GET["t"];
    $page = CurrentPageName();
    $html = "\n\t<p style='font-size:13px'>{smtp_sync_artica_add_text}</p>\n\t<div id='smtpsyncid'>\n\t<table style='width:99%' class=form>\n\t<tr>\n\t\t<td valign='top' class=legend style='font-size:14px'>{hostname}:</td>\n\t\t<td valign='top'>" . Field_text("servername", null, 'width:120px;font-size:14px') . "</td>\n\t<tr>\n\t<tr>\n\t\t<td valign='top' class=legend style='font-size:14px'>{port} (SSL):</td>\n\t\t<td valign='top'>" . Field_text("port", "9000", 'width:90px;font-size:14px') . "</td>\n\t<tr>\t\n\t<tr>\n\t\t<td valign='top' class=legend style='font-size:14px'>{username}:</td>\n\t\t<td valign='top'>" . Field_text("username", "admin", 'width:120px;font-size:14px') . "</td>\n\t<tr>\t\n\t<tr>\n\t\t<td valign='top' class=legend style='font-size:14px'>{password}:</td>\n\t\t<td valign='top'>" . Field_password("password", "", 'width:120px;font-size:14px') . "</td>\n\t<tr>\t\n\t</table>\n\t<div style='width:100%;text-align:right'><hr>" . button("{add}", "SaveServerSyncArticaSMTP();", 16) . "</div>\n\t</div>\n<script>\nvar X_SaveServerSyncArticaSMTP= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif (results.length>0){alert(results);}\n\t\tYahooWin3Hide();\n\t\t\$('#flexRT{$t}').flexReload();\n\t}\t\t\nfunction SaveServerSyncArticaSMTP(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('servername',document.getElementById('servername').value);\n\t\tXHR.appendData('port',document.getElementById('port').value);\n\t\tXHR.appendData('username',document.getElementById('username').value);\n\t\tXHR.appendData('password',document.getElementById('password').value);\n\t\tAnimateDiv('smtpsyncid');\n\t\tXHR.sendAndLoad('{$page}', 'GET',X_SaveServerSyncArticaSMTP);\n\t\t\n\t}\n</script>\t\n\t\n\t\n\t\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
Example #16
0
function popup()
{
    $ldap = new clladp();
    $cyruspass = $ldap->CyrusPassword();
    $html = "\n\t<div id='change_cyrus_password' style='width:98%' class=form>\n\t<div class=text-info style='font-size:16px'>{change_cyrus_password}</div>\n\t<table style='width:99%'>\n\t<tr>\n\t<td class=legend style='font-size:16px'>{password}:</td>\n\t<td>" . Field_password('cyruspassword', $cyruspass, "font-size:16px") . "</td>\n\t</tr>\n\t<tr>\n\t<td colspan=2 align='right'><hr>\n\t\t" . button("{apply}", "SaveCyrusPassword()", "22px") . "</td>\n\t</tr>\n\t</table>\n\t</div>";
    $tp = new templates();
    echo $tp->_ENGINE_parse_body($html, 'cyrus.index.php');
}
Example #17
0
function popup()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new sockets();
    $t = time();
    $html = "\n\t<center id='anim-{$t}'></center>\n\t<div class=text-info style='font-size:14px'>{reset_admin_password_explain}</div>\n\t<table style='width:99%' class=form>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{username}</td>\n\t\t<td style='font-size:16px;font-weight:bold'>Administrator</td>\n\t</tr>\n\t\t\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{password}</td>\n\t\t<td>" . Field_password("PASSWORD-{$t}", null, "font-size:16px;width:70%;font-weight:bold", null, null, null, false, "CheckPass{$t}(event)") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td align='right' colspan=2><hr>" . button("{apply}", "EnablePostfixKLMSSave{$t}()", "16px") . "</td>\n\t</tr>\n\t</table>\n\t<script>\n\t\tvar x_EnablePostfixKLMSSave{$t}=function(obj){\n\t      var tempvalue=obj.responseText;\n\t      if(tempvalue.length>3){alert(tempvalue);}\n\t      document.getElementById('anim-{$t}').innerHTML='';\n\t      YahooWin3Hide();\n\t      }\t\t\n\t\t\n\t\tfunction EnablePostfixKLMSSave{$t}(){\n\t\t\t\tvar XHR = new XHRConnection();\n\t\t\t\tvar pp=encodeURIComponent(document.getElementById('PASSWORD-{$t}').value);\n\t\t\t\tAnimateDiv('anim-{$t}');\n\t\t\t\tXHR.appendData('PASSWORD',pp);\n\t\t\t\tXHR.sendAndLoad('{$page}', 'POST',x_EnablePostfixKLMSSave{$t});\t\n\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\tfunction CheckPass{$t}(e){\n\t\t\t\tif(checkEnter(e)){EnablePostfixKLMSSave{$t}();}\n\t\t\t\t\n\t\t}\n\t</script>\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
Example #18
0
function popup(){
	$tpl=new templates();
	$page=CurrentPageName();
	$root_error_pass=$tpl->javascript_parse_text("{root_error_pass}");
	$sock=new sockets();
	$PAMLdapPrio=$sock->GET_INFO("PAMLdapPrio");
	if(!is_numeric($PAMLdapPrio)){$PAMLdapPrio=1;}
	$html="
	<div style='width:98%' class=form>
		<div style='font-size:32px;margin-bottom:20px'>{root_password_not_changed}</div>
		<div class=text-info style='margin-top:10px;font-size:18px'>{root_password_not_changed_text}</div>
		<table style='width:98%' >
		<tr>
			<td class=legend style='font-size:32px'>{LDAP_PRIORITY}:</td>
			<td>". Field_checkbox("PAMLdapPrio",1,$PAMLdapPrio)."</td>
		</tr>		
		
		<tr>
			<td class=legend style='font-size:32px'>{password}:</td>
			<td>". Field_password("root-pass1",null,"font-size:32px;padding:20px;width:70%",null,null,null,false,"CHRootPwdCheck(event)")."</td>
		</tr>
			<td>&nbsp;</td>
			<td>". Field_password("root-pass2",null,"font-size:32px;padding:20px;width:70%",null,null,null,false,"CHRootPwdCheck(event)")."</td>
		<tr>
		<tr>
			<td colspan=2 align='right'><hr>". button("{apply}","CHRootPwd()",42)."</td>
		</tr>
		</table>
	</div>
		
		<script>
			function CHRootPwdCheck(e){
				if(checkEnter(e)){CHRootPwd();return;}
			}
			
		var X_CHRootPwd= function (obj) {
			var tempvalue=obj.responseText;
			if(tempvalue.length>3){alert(tempvalue);return;}
			YahooWin5Hide();
			}			
		
		function CHRootPwd(){
			var pass=document.getElementById('root-pass1').value;
			if(pass.length<3){alert('$root_error_pass');return;}
			if(document.getElementById('root-pass1').value!==document.getElementById('root-pass2').value){alert('$root_error_pass');return;}
			var XHR = new XHRConnection();
			var pp=encodeURIComponent(document.getElementById('root-pass1').value);
			XHR.appendData('change_password',document.getElementById('root-pass1').value);
			if(document.getElementById('PAMLdapPrio').checked){XHR.appendData('PAMLdapPrio',1);}else{XHR.appendData('PAMLdapPrio',0);}
			XHR.sendAndLoad('$page', 'POST',X_CHRootPwd);
		}
	</script>
		
	";
	
	echo $tpl->_ENGINE_parse_body($html);
}
Example #19
0
function popup()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $error = base64_decode($_GET["error"]);
    $q = new mysql();
    $html = "<div class=explain>\n\t\t{mysql_error_popup_credential_text}\n\t\t<br><code style='font-size:13px'>{$error}</div>\n\t<center>\n\t\t\t<table style='width:80%' class=form>\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top' class=legend nowrap>{username}:</td>\n\t\t\t\t\t<td valign='top'>" . Field_text('username', $q->mysql_admin, "font-size:14px;padding:3px") . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top' class=legend>{password}:</td>\n\t\t\t\t\t<td valign='top'>" . Field_password('password', $q->mysql_password, "font-size:14px;padding:3px;width:120px") . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=2 align='right'>\n\t\t\t\t\t\t<hr>" . button("{change}", "UploadMysqlPassword()") . "\n\t\t\t\t\t\t\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\t\n\t\t</center>\n\t\t<div id='mysqldivForLogs'></div>\n\t<script>\n\t\n\tvar x_UploadMysqlPassword= function (obj) {\n\t\tLoadAjax('mysqldivForLogs','{$page}?events=yes');\n\t}\t\n\t\n\tfunction UploadMysqlPassword(){\n\t\n\t\tvar username=document.getElementById('username').value;\n\t\tvar password=document.getElementById('password').value;\n\t\tvar XHR = new XHRConnection();\t\n\t\tXHR.appendData('username',username);\n\t\tXHR.appendData('password',password);\n\t\tAnimateDiv('mysqldivForLogs');\n\t\tXHR.sendAndLoad('{$page}', 'POST',x_UploadMysqlPassword);\t\t\t\n\t\n\t}\n</script>\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
Example #20
0
function popup()
{
    $tpl = new templates();
    $page = CurrentPageName();
    $root_error_pass = $tpl->javascript_parse_text("{root_error_pass}");
    $sock = new sockets();
    $nsswitchEnableLdap = intval($sock->GET_INFO("nsswitchEnableLdap"));
    $html = "\n\t<div style='width:98%' class=form>\n\t\t<div style='font-size:32px;margin-bottom:30px'>{root_password_not_changed}</div>\n\t\t<div class=explain style='margin-top:10px;font-size:20px'>{root_password_not_changed_text}</div>\n\t\t<table style='width:98%' >\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:32px'>{password}:</td>\n\t\t\t<td>" . Field_password("root-pass1", null, "font-size:32px;padding:20px;width:70%", null, null, null, false, "CHRootPwdCheck(event)") . "</td>\n\t\t</tr>\n\t\t\t<td>&nbsp;</td>\n\t\t\t<td>" . Field_password("root-pass2", null, "font-size:32px;padding:20px;width:70%", null, null, null, false, "CHRootPwdCheck(event)") . "</td>\n\t\t<tr>\n\t\t<tr>\n\t\t\t<td colspan=2 align='right'><hr>" . button("{apply}", "CHRootPwd()", 42) . "</td>\n\t\t</tr>\n\t\t</table>\n\t</div>\n\t\t\n\t\t<script>\n\t\t\tfunction CHRootPwdCheck(e){\n\t\t\t\tif(checkEnter(e)){CHRootPwd();return;}\n\t\t\t}\n\t\t\t\n\t\tvar X_CHRootPwd= function (obj) {\n\t\t\tvar tempvalue=obj.responseText;\n\t\t\tif(tempvalue.length>3){alert(tempvalue);return;}\n\t\t\tYahooWin5Hide();\n\t\t\tCacheOff();\n\t\t\t}\t\t\t\n\t\t\n\t\tfunction CHRootPwd(){\n\t\t\tvar pass=document.getElementById('root-pass1').value;\n\t\t\tif(pass.length<3){alert('{$root_error_pass}');return;}\n\t\t\tif(document.getElementById('root-pass1').value!==document.getElementById('root-pass2').value){alert('{$root_error_pass}');return;}\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tvar pp=encodeURIComponent(document.getElementById('root-pass1').value);\n\t\t\tXHR.appendData('change_password',document.getElementById('root-pass1').value);\n\t\t\tXHR.sendAndLoad('{$page}', 'POST',X_CHRootPwd);\n\t\t}\n\t</script>\n\t\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
function popup_wget()
{
    $regions = array("am", "ar", "at", "az", "be", "bg", "br", "by", "ca", "cl", "cn", "cs", "cz", "de", "ee", "es", "fr", "gb", "ge", "gr", "hk", "hu", "it", "jp", "kg", "kr", "kz", "lt", "lv", "md", "mx", "nl", "pl", "ro", "ru", "th", "tj", "tm", "tr", "tw", "ua", "uk", "us", "uz");
    while (list($num, $ligne) = each($regions)) {
        $hash_regions[$ligne] = $ligne;
    }
    $RetranslatorRegionSettings = Field_array_Hash($hash_regions, 'w_RetranslatorRegionSettings', $_SESSION["WIZARD_RETRANS"]["RetranslatorRegionSettings"], null, null, 0, "font-size:14px;padding:5px;");
    $html = "\n\t<table style='width:100%'> \n\t<tr>\n\t\t<td valign='top'><img src='img/96-wizard.png'>{$intro}</td>\n\t\t<td valign='top'>\n\t<H1>{WIZARD_CONFIGURE_DOWNLOAD_ENGINE}</H1>\n\t<p style='font-size:14px'>{WIZARD_WGET_EXPLAIN}</p>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td style='font-size:14px' align=right>{RetranslatorRegionSettings}:</td>\n\t\t<td>{$RetranslatorRegionSettings}</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=2><hr><H3 style='color:#005447;font-size:16px'>{RetranslatorProxyAddress}</H3></td>\n\t</tr>\n\t<tr>\n\t\t<td style='font-size:13px' align='right'>{servername}:</td>\n\t\t<td>" . Field_text("PROXY_NAME", $_SESSION["WIZARD_RETRANS"]["PROXY_NAME"], "font-size:13px;padding:5px") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td style='font-size:13px' align='right'>{listen_port}:</td>\n\t\t<td>" . Field_text("PROXY_PORT", $_SESSION["WIZARD_RETRANS"]["PROXY_PORT"], "font-size:13px;padding:5px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td style='font-size:13px' align='right'>{username}:</td>\n\t\t<td>" . Field_text("PROXY_USR", $_SESSION["WIZARD_RETRANS"]["PROXY_USR"], "font-size:13px;padding:5px") . "</td>\n\t</tr>\t\t\n\t<tr>\n\t\t<td style='font-size:13px' align='right'>{password}:</td>\n\t\t<td>" . Field_password("PROXY_PASS", $_SESSION["WIZARD"]["PROXY_PASS"], "font-size:13px;padding:5px") . "</td>\n\t</tr>\t\n\t</table>\n\t\t<hr>\n\t<table style='width:100%'>\n\t\t<tr>\n\t\t\t<td width=50%>" . button("{back}", "WizardRetransLoad()") . "</td>\n\t\t\t<td width=50% align='right'>" . button("{next}", "WizardHTTPEngineSave()") . "</td>\n\t\t</tr>\n\t</table>\n\t</td></tr></table>\t\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
function popup()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new sockets();
    $SquidGuardWebAllowUnblockSinglePass = $sock->GET_INFO("SquidGuardWebAllowUnblockSinglePass");
    $SquidGuardWebAllowUnblockSinglePassContent = $sock->GET_INFO("SquidGuardWebAllowUnblockSinglePassContent");
    $SquidGuardWebUseLocalDatabase = $sock->GET_INFO("SquidGuardWebUseLocalDatabase");
    $html = "\n<div style='width:98%' class=form>\n<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{UseAglobalPassword}:</td>\n\t\t<td>" . Field_checkbox("SquidGuardWebAllowUnblockSinglePass", 1, $SquidGuardWebAllowUnblockSinglePass, "EnableSquidGuardWebAllowUnblockSinglePass()") . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{single_password}:</td>\n\t\t<td>" . Field_password("SquidGuardWebAllowUnblockSinglePassContent", $SquidGuardWebAllowUnblockSinglePassContent, "font-size:14px;padding:3px;width:160px", null, null, null, false, "") . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{UseLocalDatabase}:</td>\n\t\t<td>" . Field_checkbox("SquidGuardWebUseLocalDatabase", 1, $SquidGuardWebUseLocalDatabase, "SquidGuardWebUseLocalDatabaseCheck()") . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\t\n\t<tr>\n\t\t<td colspan=3 align='right'><hr>" . button("{apply}", "SaveSquidGuardPassService()", 16) . "</td>\n\t</tr>\t\n\t</table>\n</div>\n\t<script>\n\t\tfunction EnableSquidGuardWebAllowUnblockSinglePass(){\n\t\t\t document.getElementById('SquidGuardWebAllowUnblockSinglePassContent').disabled=true;\n\t\t\t\t\n\t\t\t if(document.getElementById('SquidGuardWebAllowUnblockSinglePass').checked){\n\t\t\t \tdocument.getElementById('SquidGuardWebAllowUnblockSinglePassContent').disabled=false;\n\t\t\t \tdocument.getElementById('servername_squidguard').disabled=false;\n\t\t\t \t}\n\t\t}\n\t\t\n\tvar X_SaveSquidGuardPassService= function (obj) {\n\t\tvar tempvalue=obj.responseText;\n\t\tif(tempvalue.length>3){alert(tempvalue);}\n\t\tRefreshTab('unblock_parameters_tabs');\n\t\t}\t\t\n\t\t\n\tfunction SaveSquidGuardPassService(){\n\t\tvar password=encodeURIComponent(document.getElementById('SquidGuardWebAllowUnblockSinglePassContent').value);\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('SquidGuardWebAllowUnblockSinglePassContent',password);\n\t\tif(document.getElementById('SquidGuardWebAllowUnblockSinglePass').checked){XHR.appendData('SquidGuardWebAllowUnblockSinglePass',1);}else{XHR.appendData('SquidGuardWebAllowUnblockSinglePass',0);}\n\t\tif(document.getElementById('SquidGuardWebUseLocalDatabase').checked){XHR.appendData('SquidGuardWebUseLocalDatabase',1);}else{XHR.appendData('SquidGuardWebUseLocalDatabase',0);}\n\t\tXHR.sendAndLoad('{$page}', 'POST',X_SaveSquidGuardPassService);     \t\t\n\t}\n\t\n\tfunction SquidGuardWebUseLocalDatabaseCheck(){\n\t\t document.getElementById('SquidGuardWebAllowUnblockSinglePassContent').disabled=true;\n\t\t document.getElementById('SquidGuardWebAllowUnblockSinglePass').disabled=true;\n\t\t if(document.getElementById('SquidGuardWebUseLocalDatabase').checked){\n\t\t \t document.getElementById('SquidGuardWebAllowUnblockSinglePass').checked=false;\n\t\t \t \n\t\t }else{\n\t\t \tdocument.getElementById('SquidGuardWebAllowUnblockSinglePassContent').disabled=false;\n\t\t \tdocument.getElementById('SquidGuardWebAllowUnblockSinglePass').disabled=false;\t\t \n\t\t }\n\t}\n\n\tEnableSquidGuardWebAllowUnblockSinglePass();\n\tSquidGuardWebUseLocalDatabaseCheck();\n\t</script>\n\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
Example #23
0
function popup()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $t = $_GET["t"];
    if (!is_numeric($t)) {
        $t = time();
    }
    $html = "<table style='width:99%' class=form>\n\t<tr>\n\t\t<td class=legend style='font-size:16px'>{username2}:</td>\n\t\t<td style='font-size:16px'>" . Field_text("email-{$t}", $_SESSION["email"], "font-size:16px;padding:3px;width:220px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:16px;text-align:right'>{password}:</td>\n\t\t<td>" . Field_password("register-password", null, "font-size:18px;width:250px") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:16px;text-align:right'>{password_confirm}:</td>\n\t\t<td>" . Field_password("register-password2", null, "font-size:18px;width:250px") . "</td>\n\t</tr>\t\n\t<tr>\t\n\t<td colspan=2 align='right'><hr>" . button("{apply}", "SaveMyAccount()", 18) . "</td>\n\t</tr>\n\t</table>\n\t<div id='privs-{$t}'></div>\n\t<script>\n\t\n\tvar X_SaveMyAccount=function(obj){\n\t\tvar results=obj.responseText;\n\t\tif(results.length>3){alert(results);return;}\n\t}  \n\n\tfunction SaveMyAccount(userid,md,email){\n\t\tvar XHR = new XHRConnection();\n\t\t var p1=document.getElementById('register-password').value;\n\t\t var p2=document.getElementById('register-password2').value;\n\t\t if(p1!==p2){alert('password mismatch!');return;}\n\t\tXHR.appendData('email',document.getElementById('email-{$t}').value);\n\t    XHR.appendData('new-password',MD5(trim(document.getElementById('register-password').value)));\n\t\tXHR.sendAndLoad('{$page}', 'POST',X_SaveMyAccount);    \t\t\n\t}\n\n\tLoadAjax('privs-{$t}','{$page}?privs=yes');\n\t</script>\n\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
Example #24
0
function popup_settings()
{
    $t = $_GET["t"];
    $sock = new sockets();
    $Key = md5("SMTPTESTS-{$_GET["servername"]}&ou={$_GET["ou"]}");
    $datas = unserialize(base64_decode($sock->GET_INFO($Key)));
    $page = CurrentPageName();
    $tpl = new templates();
    $html = "\n\t<div id='params-{$t}' style='text-align:right'><strong>Key:{$Key}</strong></div>\n\t<table style='width:99%' class=form>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:18px'>{smtp_sender}:</strong></td>\n\t\t<td>" . Field_text("smtp_sender-{$t}", trim($datas["smtp_sender"]), 'font-size:18px;padding:3px;width:100%') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:18px'>{recipient}:</strong></td>\n\t\t<td>" . Field_text("smtp_dest-{$t}", trim($datas["smtp_dest"]), 'font-size:18px;padding:3px;width:100%') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:18px'>{use_local_service}:</strong></td>\n\t\t<td>" . Field_checkbox_design("smtp_local-{$t}", 1, $datas["smtp_local"], "smtp_localcheck()") . "</td>\n\t</tr>\t\n\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:18px'>{relay}:</strong></td>\n\t\t<td>" . Field_text("relay-{$t}", trim($datas["relay"]), 'font-size:18px;padding:3px;width:100%') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:18px'>{authenticate}:</strong></td>\n\t\t<td>" . Field_checkbox_design("smtp_auth-{$t}", 1, $datas["smtp_auth"], "smtp_authCheck()") . "</td>\n\t</tr>\t\t\t\t\t\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:18px'>{smtp_auth_user}:</strong></td>\n\t\t<td>" . Field_text("smtp_auth_user-{$t}", trim($datas["smtp_auth_user"]), 'font-size:18px;padding:3px;width:150px') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:18px'>{smtp_auth_passwd}:</strong></td>\n\t\t<td>" . Field_password("smtp_auth_passwd-{$t}", trim($datas["smtp_auth_passwd"]), 'font-size:18px;padding:3px;width:150px') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>" . button("{save_and_send}", "SaveTestSend()", 35) . "</td>\n\t</tr>\n\t</table>\n\t<script>\n\tvar x_SaveTestSend= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tdocument.getElementById('params-{$t}').innerHTML='';\n\t\tif(results.length>0){alert(results);return;}\n\t\t\$('#flexRT{$t}').flexReload();\n\t\tYahooWin3Hide();\n\t}\n\t\n\tfunction smtp_localcheck(){\n\t\tdocument.getElementById('relay-{$t}').disabled=false;\n\t\tif(document.getElementById('smtp_local-{$t}').checked){\n\t\t\tdocument.getElementById('relay-{$t}').disabled=true;\n\t\t\t}\n\t}\n\t\n\tfunction smtp_authCheck(){\n\t\tdocument.getElementById('smtp_auth_user-{$t}').disabled=true;\n\t\tdocument.getElementById('smtp_auth_passwd-{$t}').disabled=true;\n\t\t\n\t\t\n\t\tif(document.getElementById('smtp_auth-{$t}').checked){\n\t\t\tdocument.getElementById('smtp_auth_user-{$t}').disabled=false;\n\t\t\tdocument.getElementById('smtp_auth_passwd-{$t}').disabled=false;\t\t\n\t\t}\n\t}\n\n\tfunction SaveTestSend(){\n\t\tvar XHR = new XHRConnection();\n\t\tif(document.getElementById('smtp_auth-{$t}').checked){XHR.appendData('smtp_auth',1);}else {XHR.appendData('smtp_auth',0);}\n\t\tif(document.getElementById('smtp_local-{$t}').checked){XHR.appendData('smtp_local',1);}else {XHR.appendData('smtp_local',0);}\n\t\tvar pp=encodeURIComponent(document.getElementById('smtp_auth_passwd-{$t}').value);\n\t\tXHR.appendData('relay',document.getElementById('relay-{$t}').value);\n\t\tXHR.appendData('smtp_sender',document.getElementById('smtp_sender-{$t}').value);\n\t\tXHR.appendData('smtp_dest',document.getElementById('smtp_dest-{$t}').value);\n\t\tXHR.appendData('smtp_sender',document.getElementById('smtp_sender-{$t}').value);\n\t\tXHR.appendData('smtp_auth_user',document.getElementById('smtp_auth_user-{$t}').value);\n\t\tXHR.appendData('servername','{$_GET["servername"]}');\n\t\tXHR.appendData('ou','{$_GET["ou"]}');\n\t\tXHR.appendData('smtp_auth_passwd',pp);\n\t\tAnimateDiv('params-{$t}');\n\t\tXHR.sendAndLoad('{$page}', 'POST',x_SaveTestSend);\n\t}\n\tsmtp_authCheck();\n\tsmtp_localcheck();\n</script>\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
Example #25
0
function popup()
{
    if (GET_CACHED(__FILE__, __FUNCTION__)) {
        return;
    }
    $html = "\n\t\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'>\n\t\t\t<img src='img/change-mysql-128.png'>\n\t\t</td>\n\t\t<td valign='top'><div class=explain>{MYSQL_PASSWORD_USER_TEXT}</div>\n\t\t\t<table style='width:99.5%' class=form>\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top' class=legend nowrap>{username}:</td>\n\t\t\t\t\t<td valign='top'>" . Field_text('username', null, "font-size:14px;padding:3px") . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top' class=legend>{password}:</td>\n\t\t\t\t\t<td valign='top'>" . Field_password('password', null, "font-size:14px;padding:3px;width:120px") . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=2 align='right'>\n\t\t\t\t\t\t<hr>" . button("{change}", "ChangeMysqlPassword()") . "\n\t\t\t\t\t\t\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\t\t\n\t\t</td>\n\t</tr>\n\t</table><hr>\n\t<div id='mysqldivForLogs' style='height:250px;overflow:auto'></div>\n\t";
    $tpl = new templates();
    $html = $tpl->_ENGINE_parse_body($html, "mysql.index.php");
    SET_CACHED(__FILE__, __FUNCTION__, null, $html);
    echo $html;
}
Example #26
0
function popup()
{
    $user = new user($_SESSION["uid"]);
    $users = new usersMenus();
    $formpassword = "******" . Field_password("password", $user->password) . "</td>\n\t</tr>\n\t\n\t";
    if (!$users->AllowChangeUserPassword) {
        $formpassword = null;
    }
    $html = "\n\t\n\t<div id='user-form'>\n\t<table class=table_form>\n\t<tr>\n\t\t<td class=legend nowrap>{displayname}:</td>\n\t\t<td>" . Field_text("DisplayName", $user->DisplayName) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend nowrap>{sn}:</td>\n\t\t<td>" . Field_text("sn", $user->sn) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend nowrap>{givenname}:</td>\n\t\t<td>" . Field_text("givenName", $user->givenName) . "</td>\n\t</tr>\t\n\t{$formpassword}\t\t\n\t</table>\n\t<br>\n<table class=table_form>\n\t<tr>\n\t\t<td class=legend nowrap>{phone}:</td>\n\t\t<td>" . Field_text("telephoneNumber", $user->telephoneNumber) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend nowrap>{mobile}:</td>\n\t\t<td>" . Field_text("mobile", $user->mobile) . "</td>\n\t</tr>\t\t\n\t</table>\t\n<div style='text-align:right'>" . button("{save}", "EditProfile()") . "</div>\t\n</div>\t\n\t\n\t\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
function page()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new sockets();
    $ldap = new clladp();
    $t = time();
    $ImportAdSettings = unserialize($sock->GET_INFO("ZarafaImportADSettings"));
    $OUS = $ldap->hash_get_ou(true);
    $html = "\n\t<div style='font-size:30px;margin-bottom:20px'>{active_directory_importation}</div>\n\t<div style='font-size:22px' class=explain>{active_directory_importation_contacts_explain}</div>\n\t\n\t\n\t\n\t<div style='width:98%' class=form>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{organization}:</td>\n\t\t<td>" . Field_array_Hash($OUS, "ADOU", $ImportAdSettings["ADOU"], "style:font-size:22px;") . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{activedirectory_server}:</td>\n\t\t<td>" . Field_text("ADSERVERNAME", $ImportAdSettings["ADSERVERNAME"], "font-size:22px;padding:3px;width:250px") . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{suffix}:</td>\n\t\t<td>" . Field_text("LDAP_SUFFIX", $ImportAdSettings["LDAP_SUFFIX"], "font-size:22px;padding:3px;width:580px") . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{username}:</td>\n\t\t<td>" . Field_text("WINDOWS_SERVER_ADMIN", $ImportAdSettings["WINDOWS_SERVER_ADMIN"], "font-size:22px;padding:3px;width:390px") . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{password}:</td>\n\t\t<td>" . Field_password("WINDOWS_SERVER_PASS", $ImportAdSettings["WINDOWS_SERVER_PASS"], "font-size:22px;padding:3px;width:390px") . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\t\n\t\n\t<tr style='height:70px'>\n\t\t<td colspan=3 align='right'>" . button("{import_contacts}", "Save{$t}()", 30) . "</td>\n\t</tR>\n\t\n\t</table>\n\t</div>\n\t<script>\n\t\t\n\t\t\n\nvar xSave{$t}=function(obj){\n\tvar tempvalue=obj.responseText;\n    if(tempvalue.length>5){alert(tempvalue);}\n    Loadjs('zarafa.import-ad-contacts.progress.php');\n}\t\n\t\t\nfunction Save{$t}(){\n\tvar pp=encodeURIComponent(document.getElementById('WINDOWS_SERVER_PASS').value);\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('ADOU',document.getElementById('ADOU').value);\n\tXHR.appendData('ADSERVERNAME',document.getElementById('ADSERVERNAME').value);\n\tXHR.appendData('WINDOWS_SERVER_ADMIN',document.getElementById('WINDOWS_SERVER_ADMIN').value);\n\tXHR.appendData('LDAP_SUFFIX',encodeURIComponent(document.getElementById('LDAP_SUFFIX').value));\n\t\n\tXHR.appendData('WINDOWS_SERVER_PASS',pp);\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n}\n</script>\n";
    echo $tpl->_ENGINE_parse_body($html);
}
Example #28
0
function page()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new sockets();
    $EnableSambaRemoteLDAP = $sock->GET_INFO("EnableSambaRemoteLDAP");
    if ($EnableSambaRemoteLDAP == null) {
        $EnableSambaRemoteLDAP = 0;
    }
    $SambaRemoteLDAPInfos = unserialize(base64_decode($sock->GET_INFO("SambaRemoteLDAPInfos")));
    $html = "\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valing='top' width=1%>\n\t\t\t<img src='img/databases-search-net-128.png'>\n\t\t</td>\n\t\t<td valign='top'>\n\t\t\n\t\t\t<div class=explain>{SAMBA_LDAP_EXTERN_TEXT}</div>\n\t\t\t<div id='MainSambaLDAPConfigDiv'>\n\t\t\t<table style='width:100%'>\n\t\t\t<tr>\n\t\t\t\t<td class=legend>{enable}:</td>\n\t\t\t\t<td>" . Field_checkbox("EnableSambaRemoteLDAP", 1, $EnableSambaRemoteLDAP, "CheckDisbaled()") . "</td>\n\t\t\t</tr>\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td class=legend>{server_host}:</td>\n\t\t\t\t<td>" . Field_text("server_host", $SambaRemoteLDAPInfos["server_host"], "font-size:13px;padding:3px") . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class=legend>{listen_port}:</td>\n\t\t\t\t<td>" . Field_text("server_port", $SambaRemoteLDAPInfos["server_port"], "font-size:13px;padding:3px") . "</td>\n\t\t\t</tr>\t\n\t\t\t<tr>\n\t\t\t\t<td class=legend>{ldap_suffix}:</td>\n\t\t\t\t<td>" . Field_text("suffix", $SambaRemoteLDAPInfos["suffix"], "font-size:13px;padding:3px") . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class=legend>{ldap_suffix} {group}:</td>\n\t\t\t\t<td>" . Field_text("ldap_group_suffix", $SambaRemoteLDAPInfos["ldap_group_suffix"], "font-size:13px;padding:3px") . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class=legend>{ldap_suffix} {users}:</td>\n\t\t\t\t<td>" . Field_text("ldap_user_suffix", $SambaRemoteLDAPInfos["ldap_user_suffix"], "font-size:13px;padding:3px") . "</td>\n\t\t\t</tr>\t\n\t\t\t<tr>\n\t\t\t\t<td class=legend>{ldap_suffix} {computers}:</td>\n\t\t\t\t<td>" . Field_text("ldap_machine_suffix", $SambaRemoteLDAPInfos["ldap_machine_suffix"], "font-size:13px;padding:3px") . "</td>\n\t\t\t</tr>\t\t\t\t\t\t\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td class=legend>{ldap admin}:</td>\n\t\t\t\t<td>" . Field_text("user_dn", $SambaRemoteLDAPInfos["user_dn"], "font-size:13px;padding:3px") . "</td>\n\t\t\t</tr>\t\n\t\t\t<tr>\n\t\t\t\t<td class=legend>{password}:</td>\n\t\t\t\t<td>" . Field_password("user_dn_password", $SambaRemoteLDAPInfos["user_dn_password"], "font-size:13px;padding:3px") . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class=legend>{ssl}:</td>\n\t\t\t\t<td>" . Field_checkbox("ssl", 1, $SambaRemoteLDAPInfos["ssl"]) . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td colspan=2 align='right'>" . button("{apply}", "SaveSambaLDAP()") . "</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t</div>\t\n\t</td>\n</tr>\n</table>\t\t\n\n<script>\n\n\tfunction CheckDisbaled(){\n\t\tdocument.getElementById('server_host').disabled=true;\n\t\tdocument.getElementById('server_port').disabled=true;\n\t\tdocument.getElementById('suffix').disabled=true;\n\t\tdocument.getElementById('ldap_group_suffix').disabled=true;\n\t\tdocument.getElementById('ldap_user_suffix').disabled=true;\n\t\tdocument.getElementById('ldap_machine_suffix').disabled=true;\n\t\tdocument.getElementById('user_dn').disabled=true;\n\t\tdocument.getElementById('user_dn_password').disabled=true;\n\t\tdocument.getElementById('ssl').disabled=true;\n\t\t\n\t\tif(document.getElementById('EnableSambaRemoteLDAP').checked){\n\t\t\tdocument.getElementById('server_host').disabled=false;\n\t\t\tdocument.getElementById('server_port').disabled=false;\n\t\t\tdocument.getElementById('suffix').disabled=false;\n\t\t\tdocument.getElementById('ldap_group_suffix').disabled=false;\n\t\t\tdocument.getElementById('ldap_user_suffix').disabled=false;\n\t\t\tdocument.getElementById('ldap_machine_suffix').disabled=false;\n\t\t\tdocument.getElementById('user_dn').disabled=false;\n\t\t\tdocument.getElementById('user_dn_password').disabled=false;\n\t\t\tdocument.getElementById('ssl').disabled=false;\t\n\t\t}\t\n\t\t\n\t\t\n\t}\n\t\n\tfunction x_SaveSambaLDAP(obj) {\n\t\tvar tempvalue=obj.responseText;\n\t\tif(tempvalue.length>3){alert(tempvalue);}\t\n\t\tif(document.getElementById('main_config_samba')){RefreshTab('main_config_samba');}else{Loadjs('{$page}?js=yes');}\n\t}\t\t\t\n\t\n\t\n\tfunction SaveSambaLDAP(){\n\t\tvar XHR = new XHRConnection();\n\t\tif(document.getElementById('EnableSambaRemoteLDAP').checked){XHR.appendData('EnableSambaRemoteLDAP',1)}else{XHR.appendData('EnableSambaRemoteLDAP',0);}\n\t\tif(document.getElementById('ssl').checked){XHR.appendData('ssl',1)}else{XHR.appendData('ssl',0);}\n\t\tXHR.appendData('server_host',document.getElementById('server_host').value);\n\t\tXHR.appendData('server_port',document.getElementById('server_port').value);\n\t\tXHR.appendData('suffix',document.getElementById('suffix').value);\n\t\tXHR.appendData('ldap_group_suffix',document.getElementById('ldap_group_suffix').value);\n\t\tXHR.appendData('ldap_user_suffix',document.getElementById('ldap_user_suffix').value);\n\t\tXHR.appendData('ldap_machine_suffix',document.getElementById('ldap_machine_suffix').value);\n\t\tXHR.appendData('user_dn',document.getElementById('user_dn').value);\n\t\tXHR.appendData('user_dn_password',document.getElementById('user_dn_password').value);\n\t\t\n\t\tdocument.getElementById('MainSambaLDAPConfigDiv').innerHTML='<center><img src=\"img/wait_verybig.gif\"></center>';\t\t\t\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_SaveSambaLDAP);\t\t\n\t\t}\n\t\n\tCheckDisbaled();\n</script>\n";
    echo $tpl->_ENGINE_parse_body($html);
}
function popup()
{
    $uid = $_GET["popup"];
    $ct = new user($uid);
    if ($ct->CryptedHome == "TRUE") {
        $CryptedHome = 1;
    } else {
        $CryptedHome = 0;
    }
    $enable = Paragraphe_switch_img("{ENABLE_COFFREFORT}", "{ENABLE_COFFREFORT_TEXT}", "CryptedHome", $CryptedHome, null, 450);
    $html = "\n\t<h1>{coffrefort} {$ct->CryptedHome}</H1>\n\t<div id='coffrefortdiv'>\n\t<table style='width:100%'>\n\t\t<tr>\n\t\t\t<td valign='top'><img src='img/safe-box-128.png'></td>\n\t\t\t<td valign='top'>{$enable}\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>{DepositBoxSize}:</td>\n\t\t\t\t\t\t<td>" . Field_text("CryptedHomeSize", $ct->CryptedHomeSize, 'width:90px;font-size:13px') . "&nbsp;G</td>\n\t\t\t\t\t</tr>\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=legend>{password}:</td>\n\t\t\t\t\t\t<td>" . Field_password("CryptedHomePassword", $ct->CryptedHomePassword, "width:90px;font-size:13px") . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t\t<div style='text-align:right'><hr>\n\t\t\t\t\t" . button("{save}", "EnableCoffreSave()") . "\n\t\t\t\t</div>\n\t\t\t\n\t\t\t</td>\n\t\t</tr>\n\t</table>\n\t</div>\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
Example #30
0
function backup_index()
{
    $ini = new Bs_IniHandler();
    $computer = new computers($_GET["popup-index"] . '$');
    $ini->loadString($computer->ComputerCryptedInfos);
    $text = "<div><code>{$computer->ComputerIP}</code></div>\n\t<div><code>{$computer->ComputerMacAddress}</code></div>\n\t<div><code>{$computer->ComputerOS}</code></div>\n\t<div><code>{$computer->ComputerMachineType}</code></div>";
    $computer_icon = Paragraphe("64-computer.png", "{$computer->DisplayName}", $text);
    $schedule_icon = Paragraphe("64-planning.png", '{SET_SCHEDULE}', '{SET_SCHEDULE_TEXT}', "javascript:Loadjs('cron.php?function=SaveSchedule&field=schedule')");
    $enable_backup = Paragraphe_switch_img_32('{enable_backup}', '{enable_backup_text}', 'EnableBackupAccount', $computer->EnableBackupAccount, "{enable_disable}", 300);
    $browse = button_browse_computer($_GET["popup-index"], "share_folder");
    $html = "\n<H1>{BACKUP}::&nbsp;{$computer->DisplayName}</H1>\n<input type='hidden' id='schedule' value='{$ini->_params["SCHEDULE"]["cron"]}'>\n<table style='width:100%'>\n<tr>\n\t<td valign='top'>\n\t\t{$computer_icon}\n\t\t{$schedule_icon}\n\t\t\n\t\t<div id='shareslist' style='width:100%;height:120px;overflow:auto'></div>\t\n\t</td>\n\t<td valign='top'>\n\t<div id='backupcomputerform'>\n\t\t{$enable_backup}\n\t\t\n<table style='width:99%' class=form>\n\t\t<tr>\n\t\t\t<tr>\n\t\t\t<td class=legend>{add_share}:</td>\n\t\t\t<td>" . Field_text("share_folder", null, "width:120px") . "&nbsp;{$browse}</td>\n\t\t\t<td><input type='button' OnClick=\"addComputerShareFolder();\" value='{add}&nbsp;&raquo;'></td>\n\t\t</tr>\t\t\n\t\t</table>\t\n\t\t\n\t\t\n\t\t\n\t\t<table style='width:99%' class=form>\n\t\t<tr>\n\t\t\t<td colspan=2><h3>{remote_smb_share}</h3></td>\t\t\t\n\t\t</tr>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend>{enable}:</td>\n\t\t\t<td>" . Field_checkbox("enable_smb", 1, $ini->_params["BACKUP_PROTO"]["enable_smb"]) . "</td>\n\t\t</tr>\t\t\n\t\t<tr>\n\t\t\t<td class=legend>{username}:</td>\n\t\t\t<td>" . Field_text("username", $ini->_params["ACCOUNT"]["USERNAME"], "width:120px") . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend>{password}:</td>\n\t\t\t<td>" . Field_password("password", $ini->_params["ACCOUNT"]["PASSWORD"], "width:120px") . "</td>\n\t\t</tr>\t\t\n\t\t</table>\n\t\t\n\t<hr>\n\t<div style='width:100%;text-align:right'><input type='button' value='{apply}&nbsp;&raquo;' OnClick=\"javascript:SaveComputerBackupInfo();\"></div>\n\t</div>\n\t</td>\n</tr>\n</table>\n\n";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}