本文整理汇总了PHP中Paragraphe32函数的典型用法代码示例。如果您正苦于以下问题:PHP Paragraphe32函数的具体用法?PHP Paragraphe32怎么用?PHP Paragraphe32使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Paragraphe32函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: external_storage_usb_list
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: amavis_popup
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: external_storage_usb
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: squid_infra
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: add_task
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} »\"></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: page
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: main_disks_discover
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(" ", " ", $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: LDAP_CONFIG_NET
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);
}
示例9: rule_edit
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%> </td>\n\t\t</tr>";
}
$bypass = Paragraphe32("bypass", "bypass_minitext", "Loadjs('dansguardian2.bypass.php?ID={$ID}')", "folder-32-routing-secure.png", 450);
//.........这里部分代码省略.........
示例10: sender_host
//.........这里部分代码省略.........
<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} »' 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);
}
示例11: keywords
function keywords()
{
$tpl = new templates();
$page = CurrentPageName();
$title = $tpl->_ENGINE_parse_body("{add}»{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);
}
示例12: search_websites
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));
}
}
示例13: LDAP_CONFIG_NET
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);
}
示例14: status
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')
//.........这里部分代码省略.........
示例15: ipconfig_tools
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);
}