本文整理汇总了PHP中texttooltip函数的典型用法代码示例。如果您正苦于以下问题:PHP texttooltip函数的具体用法?PHP texttooltip怎么用?PHP texttooltip使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了texttooltip函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Page
function Page()
{
$ruleid = $_GET["ID"];
$t = time();
$page = CurrentPageName();
$tpl = new templates();
$this_feature_is_disabled_corp_license = $tpl->javascript_parse_text("{this_feature_is_disabled_corp_license}");
$CORP = 0;
if ($users->CORP_LICENSE) {
$CORP = 1;
}
$sock = new wifidog_settings($ruleid);
$wifidog_templates = new wifidog_templates($ruleid);
$users = new usersMenus();
$CORP = 0;
if ($users->CORP_LICENSE) {
$CORP = 1;
}
$BACK_REPEAT["no-repeat"] = "no-repeat";
$BACK_REPEAT["repeat-y"] = "repeat-y";
$BACK_REPEAT["repeat-x"] = "repeat-x";
$BACK_REPEAT["repeat"] = "repeat";
$html = "<div style='width:98%' class=form>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td style='width:500px;'>\n\t\t<div style='width:500px;height:500px;border-radius:5px 5px 5px 5px;\n-moz-border-radius:5px;\n\t\t-webkit-border-radius:5px;background-repeat: {$wifidog_templates->BackgroundRepeat};background-position: {$wifidog_templates->BackgroundTOP}% {$wifidog_templates->BackgroundBottom}%;\n\t\tbackground-image:url(\"{$wifidog_templates->BackgroundPicturePath}\");background-color:#{$wifidog_templates->backgroundColor}'> </div>\n\t\t</td>\n\t\t<td valign='top'>\n\t\t\t<table style='width:100%'>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=legend style='font-size:22px'>{picture}:</td>\n\t\t\t\t\t<td style='font-size:16px'>" . button("{upload}", "Loadjs('webauth.rules.picture.upload.php?ruleid={$ruleid}')", 26) . "</td>\n\t\t\t\t</tr>\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=legend style='font-size:22px'>{top_position}:</td>\n\t\t\t\t\t<td style='font-size:22px'>" . Field_text("BackgroundTOP-{$t}", $wifidog_templates->BackgroundTOP, "font-size:22px;width:100px") . "%</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=legend style='font-size:22px'>{bottom_position}:</td>\n\t\t\t\t\t<td style='font-size:22px'>" . Field_text("BackgroundBottom-{$t}", $wifidog_templates->BackgroundBottom, "font-size:22px;width:100px") . "%</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=legend style='font-size:22px;text-transform:capitalize'>" . texttooltip("{repeat}", null) . ":</td>\n\t\t\t\t\t<td style='font-size:22px'>" . Field_array_Hash($BACK_REPEAT, "BackgroundRepeat-{$t}", $wifidog_templates->BackgroundRepeat, null, null, 0, "font-size:22px") . "</td>\n\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td colspan=2 align='right'><hr>" . button("{apply}", "Save{$t}()", "42px") . "</td>\n\t\t\t\t\t</tr>\t\t\t\t\t\t\t\n\t\t\t</table>\n\t\t</td>\n\t</tr>\n\t</table>\n\t</td>\n\t</table>\n\t</div>\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\tRefreshTab('HOTSPOT_TAB');\n\t}\t\n\t\n\tfunction Save{$t}(){\n\t\tvar CORP={$CORP};\n\t\tif(CORP==0){alert('{$this_feature_is_disabled_corp_license}');return;}\t\t\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('ruleid',{$ruleid});\n\t\tXHR.appendData('BackgroundTOP',encodeURIComponent(document.getElementById('BackgroundTOP-{$t}').value));\n\t\tXHR.appendData('BackgroundBottom',encodeURIComponent(document.getElementById('BackgroundBottom-{$t}').value));\n\t\tXHR.appendData('BackgroundRepeat',encodeURIComponent(document.getElementById('BackgroundRepeat-{$t}').value));\t\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n\t\t\n\t}\n</script>";
echo $tpl->_ENGINE_parse_body($html);
}
示例2: license_info
function license_info()
{
$sock = new sockets();
$datas = base64_decode($sock->getFrameWork('kav4proxy.php?license-infos&type=' . $_GET["license-type"]));
$tp = explode("\n", $datas);
$html = "<center style='width:97%' class=form><table style='width:100%' >\n\t<tbody>";
while (list($num, $val) = each($tp)) {
if (trim($val) == null) {
continue;
}
$val = htmlspecialchars($val);
if (strlen($val) > 89) {
$val = texttooltip(substr($val, 0, 86) . '...', $val, null, null, 1);
}
if (preg_match("#Error checking#", $val)) {
$val = "<strong style='color:red'>{$val}</strong>";
}
if (preg_match("#Expiration date#", $val)) {
$val = "<strong style='color:blue'>{$val}</strong>";
}
if (preg_match("#Count:#", $val)) {
$val = "<strong style='color:blue'>{$val}</strong>";
}
if (preg_match("#Lifespan:#", $val)) {
$val = "<strong style='color:blue'>{$val}</strong>";
}
if (preg_match("#Objs:#", $val)) {
$val = "<strong style='color:blue'>{$val}</strong>";
}
$html = $html . "\n\t\t\t<tr>\n\t\t\t\t<td style='font-size:12px'>\n\t\t\t\t\t<code>{$val}</code>\n\t\t\t\t</td>\n\t\t\t</tr>";
}
$html = $html . "</tbody>\n\t</table></center>";
echo $html;
}
示例3: page
function page()
{
$t = time();
$page = CurrentPageName();
$tpl = new templates();
$sock = new sockets();
$DirectoriesMonitorH = intval($sock->GET_INFO("DirectoriesMonitorH"));
$DirectoriesMonitorM = intval($sock->GET_INFO("DirectoriesMonitorM"));
$DisksBenchs = intval($sock->GET_INFO("DisksBenchs"));
$t = time();
for ($i = 0; $i < 24; $i++) {
$H = $i;
if ($i < 10) {
$H = "0{$i}";
}
$Hours[$i] = $H;
}
for ($i = 0; $i < 60; $i++) {
$M = $i;
if ($i < 10) {
$M = "0{$i}";
}
$Mins[$i] = $M;
}
$EACH[0] = "{never}";
$EACH[3] = "{each}: 3 {hours}";
$EACH[4] = "{each}: 4 {hours}";
$EACH[5] = "{each}: 5 {hours}";
$EACH[6] = "{each}: 6 {hours}";
$EACH[12] = "{each}: 12 {hours}";
$EACH[24] = "{each}: 1 {day}";
$html = "\n\t<div style='width:98%' class=form>\n\t<table style='width:100%'>\n\t<tr style='height:90px'>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{disks_benchmarks}", "{disks_benchmarks_explain}") . "</td>\n\t\t<td>" . Field_array_Hash($EACH, "DisksBenchs", $DisksBenchs, "style:font-size:22px") . "</td>\n\t</tr>\n\n\t<tr style='height:90px'>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{scan_filesystem_size}", "{scan_filesystem_size_explain}") . "</td>\n\t\t<td style='font-size:22px' colspan=2>\n\t\t\t\t<table style='width:135px'>\n\t\t\t\t<tr>\n\t\t\t\t\t<td style='font-size:22px'>" . Field_array_Hash($Hours, "DirectoriesMonitorH", $DirectoriesMonitorH, "style:font-size:22px;padding:10px") . "</td>\n\t\t\t\t\t<td style='font-size:22px'>:</td>\n\t\t\t\t\t<td style='font-size:22px'>" . Field_array_Hash($Mins, "DirectoriesMonitorM", $DirectoriesMonitorM, "style:font-size:22px;padding:10px") . "</td>\n\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>" . button("{apply}", "Save{$t}();", 30) . "</td>\n\t</tr>\n\t</table>\n\t</div>\n<script>\nvar xSave{$t}=function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>0){alert(results);return;}\t\n\tRefreshTab('btrfs-tabs');\n}\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('DisksBenchs',document.getElementById('DisksBenchs').value);\n\tXHR.appendData('DirectoriesMonitorH',document.getElementById('DirectoriesMonitorH').value);\n\tXHR.appendData('DirectoriesMonitorM',document.getElementById('DirectoriesMonitorM').value);\n XHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n}\n</script>\t\t\t\t\n\t";
echo $tpl->_ENGINE_parse_body($html);
}
示例4: page
function page()
{
$usersmenus = new usersMenus();
$kas = new kas_filter();
$pattern_date = $kas->GetPatternDate();
$linkPattern = texttooltip('{ave_pattern_date}', '{time_date_com_text_moscow}', 'http://www.timeanddate.com/worldclock/city.html?n=166');
if ($usersmenus->AsPostfixAdministrator == true or $usersmenus->AllowChangeKas == true or $usersmenus->AllowChangeAntiSpamSettings == true) {
} else {
header('location:users.index.php');
exit;
}
$html = "\n<div class='caption'><strong>{$linkPattern}: {$pattern_date}</div>\n<table style='width:600px' align=center>\n<tr>\n<td width=1% valign='top'><img src='img/caterpillarkas.jpg'>\n</td>\n<td valign='top'>\n\t<table>";
if ($usersmenus->AsPostfixAdministrator == true) {
$html = $html . "<tr><td valign='top'> " . Paragraphe('folder-caterpillar.jpg', '{antispam_engine}', '{antispam_engine_text}', 'kas.engine.settings.php') . "</td></tr>\n\t\t<tr><td valign='top' >" . Paragraphe('folder-lego.jpg', '{product_update_settings}', '{product_update_settings_text}', 'kas.keepupd2date.settings.php') . "</td></tr>\n\t\t<tr><td valign='top' >" . Paragraphe('folder-licence.jpg', '{product_licence}', '{product_licence_text}', 'kas.licence.settings.php') . "</td></tr>";
}
if ($usersmenus->AllowChangeKas == true) {
$artica = new artica_general();
if ($artica->EnableGroups == 'yes') {
$html = $html . "<tr><td valign='top'> " . Paragraphe('folder-groupe.jpg', '{antispam_rules_group}', '{antispam_rules_group_text}', 'kas.group.rules.php') . "</td></tr>";
} else {
$html = $html . "<tr><td valign='top'> " . Paragraphe('folder-rules-64.jpg', '{antispam_rules}', '{antispam_rules_text}', 'kas.group.rules.php') . "</td></tr>";
}
}
if ($usersmenus->AllowChangeAntiSpamSettings == true) {
$html = $html . "<tr><td valign='top'> " . Paragraphe('folder-userrules-64.jpg', '{antispam_user_rules}', '{antispam_user_rules_text}', 'kas.user.rules.php') . "</td></tr>";
}
$html = $html . "</table>\n</td>\n</tr>\n</table>\n";
$tpl = new template_users('Kaspersky Anti-spam', $html);
echo $tpl->web_page;
}
示例5: popup
function popup()
{
$tpl = new templates();
$t = $_GET["t"];
$page = CurrentPageName();
$ldap = new clladp();
if (!isset($_GET["ou"])) {
$_GET["ou"] = null;
}
if ($_GET["ou"] == null) {
$title = "OpenLDAP";
$ous = $ldap->hash_get_ou(true);
} else {
$title = $_GET["ou"];
$ous[$title] = true;
}
$style = " OnMouseOver=\";this.style.cursor='pointer';\" OnMouseOut=\";this.style.cursor='default';\"";
$organization = $tpl->_ENGINE_parse_body("{organization}");
$f[] = "<ul id='root-{$t}' class='jqueryFileTree'>";
$f[] = "<li class=root>Root: {$title}";
$f[] = "<ul id='mytree-{$t}' class='jqueryFileTree'>";
while (list($ou, $ligne) = each($ous)) {
$CLASS = "directory";
$id = md5($ou);
$js = texttooltip("{$organization} {$ou}", $ou, "TreeOuExpand{$t}('{$id}','{$ou}');");
$f[] = "<li class={$CLASS} collapsed id='{$id}' {$style}>{$js}</li>";
}
$f[] = "</ul>";
$f[] = "</li>";
$f[] = "</ul>";
$f[] = "<script>\nvar mem_id{$t}='';\nvar mem_path{$t}='';\n\nvar xTreeOuExpand{$t}= function (obj) {\n\tvar results=obj.responseText;\n\t\$('#'+mem_id{$t}).removeClass('collapsed');\n\tif(\$('#'+mem_id{$t}).hasClass('directorys')){\$('#'+mem_id{$t}).addClass('expandeds');}\n\tif(\$('#'+mem_id{$t}).hasClass('directory')){\$('#'+mem_id{$t}).addClass('expanded');}\n\t\$('#'+mem_id{$t}).append(results);\n}\n\n\tfunction TreeOuExpand{$t}(id,ou){\n\t\tmem_id{$t}=id;\n\t\tmem_path{$t}=ou;\n\t\tvar expanded=false;\n\t\tif(\$('#'+mem_id{$t}).hasClass('expanded')){expanded=true;}\n\t\tif(!expanded){if(\$('#'+mem_id{$t}).hasClass('expandeds')){expanded=true;}}\n\t\t\t\n\t\tif(!expanded){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('browse-ou',ou);\n\t\t\tXHR.appendData('function','{$_GET["function"]}');\n\t\t\tXHR.sendAndLoad('{$page}', 'GET',xTreeOuExpand{$t});\n\t\t}else{\n\t\t\t\$('#'+mem_id{$t}).children('ul').empty();\n\t\t\tif(\$('#'+mem_id{$t}).hasClass('expanded')){\$('#'+mem_id{$t}).removeClass('expanded');}\n\t\t\tif(\$('#'+mem_id{$t}).hasClass('expandeds')){\$('#'+mem_id{$t}).removeClass('expandeds');}\n\t\t\t\$('#'+mem_id{$t}).addClass('collapsed');\n\t\n\t\t}\n\t}\n\t\n\t\t\n</script>";
echo @implode("\n", $f);
}
示例6: tabs
function tabs()
{
$page = CurrentPageName();
$tpl = new templates();
if (!is_file("/usr/lib/ecap_adapter_gzip.so")) {
echo FATAL_ERROR_SHOW_128("<div style='font-size:26px'>{ERROR_MISSING_MODULE_UPDATE_PROXY}</div>\n\t\t\t\t<center style='font-size:22px;margin:30px;font-weight:bold'>3.5.8-20150910-r13912 {or_above}</div>\n\t\t\t\t<p style='font-size:42px;text-align:right;margin-top:30px'>" . texttooltip("{update_proxy_engine}", "position:top:{proxy_engine_available_explain}", "javascript:LoadProxyUpdate();") . "</p>");
die;
}
$tpl = new templates();
$array["status"] = '{status}';
$fontsize = "22";
while (list($num, $ligne) = each($array)) {
if ($num == "exclude") {
$html[] = $tpl->_ENGINE_parse_body("<li>\n\t\t\t\t\t<a href=\"squid.hosts.blks.php?popup=yes&blk=6\" style='font-size:{$fontsize}'>\n\t\t\t\t\t<span>{$ligne}</span></a></li>\n");
continue;
}
if ($num == "exclude-www") {
$html[] = $tpl->_ENGINE_parse_body("<li><a href=\"c-icap.wwwex.php\" style='font-size:{$fontsize}'>\n\t\t\t\t\t\t\t<span style='font-size:{$fontsize}'>{$ligne}</span></a></li>\n");
continue;
}
$html[] = $tpl->_ENGINE_parse_body("<li><a href=\"{$page}?{$num}=yes\" style='font-size:{$fontsize}px;'>\n\t\t\t\t<span style='font-size:{$fontsize}px;'>{$ligne}</span></a></li>\n");
}
$html = build_artica_tabs($html, 'main_ecapGzip_tabs', 1490) . "<script>LeftDesign('webfiltering-white-256-opac20.png');</script>";
echo $html;
}
示例7: homebind_list
function homebind_list($userid)
{
$user = new user($userid);
if (!is_array($user->homeDirectoryBinded)) {
return null;
}
$html = "<table style='width:100%'>\n\t<tr>\n\t\t\n\t\t<th colspan=2>{source}</th>\n\t\t<th colspan=3>{target}</th>\n\t</tr>";
$sock = new sockets();
while (list($num, $val) = each($user->homeDirectoryBinded)) {
if ($val == null) {
return null;
}
if (strlen($val) > 39) {
$dir = texttooltip(substr($val, 0, 36) . "...", $val);
} else {
$dir = $val;
}
$tt = $user->homeDirectory . "/" . basename($val);
if (strlen($tt) > 39) {
$dir = texttooltip(substr($tt, 0, 36) . "...", $tt);
}
$mnt = trim($sock->getfile("ismounted:{$val};{$tt}"));
if ($mnt == "FALSE") {
$img = imgtootltip("status_critical.png", '{error_not_mounted},{click_to_mount}', "homebindMount({$num})");
} else {
$img = imgtootltip("status_ok.png", '{mounted},{click_to_dismount}', "homebindUMount({$num})");
}
$html = $html . "\n\t\t<tr " . CellRollOver() . ">\n\t\t\t<td width=1% valign='middle'>{$img}</td>\n\t\t\t<td width=50% valign='middle'>{$dir}</td>\n\t\t\t<td width=1% valign='middle'><img src='img/fw_bold.gif'></td>\n\t\t\t<td width=50% valign='middle'>{$tt}</strong></td>\n\t\t\t<td width=1% valign='middle'>" . imgtootltip("ed_delete.gif", "{delete}", "homebindDMount({$num})") . "</td>\n\t\t</tr>\n\t\t\n\t\t";
}
$html = $html . "</table>";
$tpl = new templates();
return $tpl->_ENGINE_parse_body($html);
}
示例8: page
function page()
{
$sock = new sockets();
$ArticaTechNetSquidRepo = unserialize(base64_decode($sock->GET_INFO("ArticaTechNetSquidRepo")));
$tpl = new templates();
$realsquidversion = $sock->getFrameWork("squid.php?full-version=yes");
$many = texttooltip("{manual_update}", "position:left:{manual_update_proxy_explain}", "Loadjs('squid.compilation.status.php')", null, 0, "font-size:30px;");
$html = "\n\t\t\t\n\t<div style='font-size:30px;margin-bottom:30px'>{available_versions} | {current}: {$realsquidversion} | {$many}</div>\n\t<table style='width:100%'>\n\t<tr>\n\t<th style='font-size:22px'>{version}</th>\t\t\n\t<th style='font-size:22px'>{filename}</th>\n\t<th style='font-size:22px'>{filesize}</th>\n\t<th style='font-size:22px'> </tf>\n\t</tr>\t\t\t\t\n\t";
while (list($key, $array) = each($ArticaTechNetSquidRepo)) {
$URL = $array["URL"];
$VERSION = $array["VERSION"];
$FILESIZE = $array["FILESIZE"];
$FILENAME = $array["FILENAME"];
$FILESIZE = FormatBytes($FILESIZE / 1024);
$button = button("{update2}", "Loadjs('squid.update.progress.php?key={$key}&filename={$FILENAME}');", 22);
if ($realsquidversion == $VERSION) {
$button = "{current}";
}
if ($color == null) {
$color = "#F2F0F1";
} else {
$color = null;
}
$html = $html . "\n\t\t<tr style='background-color:{$color};height:80px'>\n\t\t\t<td style='font-size:22px;padding-left:10px'>{$VERSION}</td>\n\t\t\t<td style='font-size:22px;padding-left:10px'><a href=\"{$URL}\" target=_new style='text-decoration:underline'>{$FILENAME}</a></td>\t\n\t\t\t<td style='font-size:22px;padding-left:10px'>{$FILESIZE}</td>\t\n\t\t\t<td style='font-size:22px;padding-left:10px'><center>{$button}</center></td>\t\n\t\t</tr>\n\t\t";
}
$html = $html . "</table>";
echo $tpl->_ENGINE_parse_body($html);
}
示例9: popup_list
function popup_list()
{
$tpl = new templates();
$sock = new sockets();
$array = unserialize(base64_decode($sock->getFrameWork("cmd.php?samba-events-list=yes")));
if (!is_array($array)) {
echo $tpl->_ENGINE_parse_body("<H2>{error_no_datas}</H2>");
exit;
}
$html = "\n\t<table style='width:100%'>\n\t<tr>\n\t\t<th> </th>\n\t\t<th>{filename}</th>\n\t\t<th>{size}</th>\n\t\t<th> </th>\n\t</tr>\n\t";
while (list($filename, $size) = each($array)) {
$img = "30-computer.png";
if (preg_match("#log\\.(.+)\$#", $filename, $re)) {
$hostname = $re[1];
}
$text_addon = null;
if (preg_match("#winbindd#", $filename)) {
$img = "30-logs.png";
$text_addon = " ({APP_SAMBA_WINBIND})";
}
if (preg_match("#nmbd#", $filename)) {
$img = "30-logs.png";
$text_addon = " ({APP_SAMBA_NMBD})";
}
if (preg_match("#smbd#", $filename)) {
$img = "30-logs.png";
$text_addon = " ({APP_SAMBA_SMBD})";
}
$html = $html . "\n\t\t<tr " . CellRollOver() . ">\n\t\t\t<td width=1%>" . imgtootltip($img, "{download}", "SambaDownloadEvent('{$filename}')") . "</td>\n\t\t\t<td><strong style='font-size:13px'>" . texttooltip("{$hostname}{$text_addon}", "{download}", "SambaDownloadEvent('{$filename}')", null, 0, "font-size:13px") . "</td>\n\t\t\t<td><strong style='font-size:13px'>" . FormatBytes($size) . "</td>\n\t\t\t<td width=1%>" . imgtootltip("delete-30.png", "{delete}", "SambaDeleteEvent('{$filename}')") . "</td>\n\t\t</tr>\n\t\t";
}
$html = $html . "</table>";
echo $tpl->_ENGINE_parse_body($html);
}
示例10: popup
function popup()
{
$page = CurrentPageName();
$tpl = new templates();
$sock = new sockets();
$Param = unserialize(base64_decode($sock->GET_INFO("MimeDefangServiceOptions")));
$t = time();
if (!is_numeric($Param["DEBUG"])) {
$Param["DEBUG"] = 0;
}
if (!is_numeric($Param["MX_REQUESTS"])) {
$Param["MX_REQUESTS"] = 200;
}
if (!is_numeric($Param["MX_MINIMUM"])) {
$Param["MX_MINIMUM"] = 2;
}
if (!is_numeric($Param["MX_MAXIMUM"])) {
$Param["MX_MAXIMUM"] = 10;
}
if (!is_numeric($Param["MX_MAX_RSS"])) {
$Param["MX_MAX_RSS"] = 30000;
}
if (!is_numeric($Param["MX_MAX_AS"])) {
$Param["MX_MAX_AS"] = 90000;
}
if (!is_numeric($Param["MX_TMPFS"])) {
$Param["MX_TMPFS"] = 0;
}
$MimeDefangVersion = $sock->GET_INFO("MimeDefangVersion");
$html = "\n\t<div style='font-size:40px;margin:bottom:40px;text-align:right'>{APP_MIMEDEFANG} v{$MimeDefangVersion} <span style='font-size:18px'>(" . texttooltip("{reload_service}", "{reload_service_text}", "MimeDefangCompileRules()") . ")</span></div>\n\t<table style='width:100%' class=form>\n\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{debug}:</td>\n\t\t<td>" . Field_checkbox_design("DEBUG-{$t}", 1, $Param["DEBUG"]) . "</td>\n\t\t\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{workingdir_in_memory}", "{workingdir_in_memory_text}") . ":</td>\n\t\t<td style='font-size:22px'>" . Field_text("MX_TMPFS-{$t}", $Param["MX_TMPFS"], "font-size:22px;width:90px") . " M</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{max_requests}", "{MX_REQUESTS_TEXT}") . ":</td>\n\t\t<td>" . Field_text("MX_REQUESTS-{$t}", $Param["MX_REQUESTS"], "font-size:22px;width:90px") . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{MX_MINIMUM}", "{MX_MINIMUM_TEXT}") . ":</td>\n\t\t<td>" . Field_text("MX_MINIMUM-{$t}", $Param["MX_MINIMUM"], "font-size:22px;width:90px") . "</td>\n\t</tr>\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{MX_MAXIMUM}", "{MX_MAXIMUM}") . ":</td>\n\t\t<td>" . Field_text("MX_MAXIMUM-{$t}", $Param["MX_MAXIMUM"], "font-size:22px;width:90px") . "</td>\n\t</tr>\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{MX_MAX_RSS}", "{MX_MAX_RSS_TEXT}") . ":</td>\n\t\t<td style='font-size:22px'>" . Field_text("MX_MAX_RSS-{$t}", $Param["MX_MAX_RSS_TEXT"], "font-size:22px;width:110px") . " KB</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{MX_MAX_AS}", "{MX_MAX_AS_TEXT}") . ":</td>\n\t\t<td style='font-size:22px'>" . Field_text("MX_MAX_AS-{$t}", $Param["MX_MAX_AS"], "font-size:22px;width:110px") . " KB</td>\n\t</tr>\t\n\t<tr>\n\t\t<td colspan=3 align='right'><hr>" . button("{apply}", "SaveMimeService{$t}()", "40") . "</td>\n\t</tr>\t\n\t</table>\n\n\t<script>\n\t\tfunction MimeDefangCompileRules(){\n\t\tLoadjs('mimedefang.compile.php');\n\t}\n\t\n\t\n\t\tvar x_SaveMimeService{$t}= function (obj) {\n\t\t\tvar tempvalue=obj.responseText;\n\t\t\tif(tempvalue.length>3){alert(tempvalue)};\n\t\t\tLoadjs('mimedefang.compile.php');\n\t\t}\t\t\n\t\n\t\tfunction SaveMimeService{$t}(){\n\t\tvar XHR = new XHRConnection(); \n\t\t var DEBUG=0;\n\t\t if(document.getElementById('DEBUG-{$t}').checked){DEBUG=1;}\n\t XHR.appendData('MX_MAX_AS',document.getElementById('MX_MAX_AS-{$t}').value);\n\t XHR.appendData('MX_MAX_RSS',document.getElementById('MX_MAX_RSS-{$t}').value);\n\t XHR.appendData('MX_MAXIMUM',document.getElementById('MX_MAXIMUM-{$t}').value);\n\t XHR.appendData('MX_MINIMUM',document.getElementById('MX_MINIMUM-{$t}').value);\n\t XHR.appendData('MX_REQUESTS',document.getElementById('MX_REQUESTS-{$t}').value);\n\t XHR.appendData('MX_TMPFS',document.getElementById('MX_TMPFS-{$t}').value);\n\t XHR.appendData('DEBUG',DEBUG);\n\t XHR.sendAndLoad('{$page}', 'POST',x_SaveMimeService{$t});\n\t\t}\n\t</script>\t\n\t";
echo $tpl->_ENGINE_parse_body($html);
}
示例11: Page
function Page()
{
$ruleid = $_GET["ID"];
$t = time();
$page = CurrentPageName();
$tpl = new templates();
$sock = new wifidog_settings($ruleid);
$ArticaHotSpotNowPassword = intval($sock->GET_INFO("ArticaHotSpotNowPassword"));
$ENABLED_REDIRECT_LOGIN = intval($sock->GET_INFO("ENABLED_REDIRECT_LOGIN"));
$ArticaSplashHotSpotEndTime = intval($sock->GET_INFO("ArticaSplashHotSpotEndTime"));
$ENABLED_META_LOGIN = intval($sock->GET_INFO("ENABLED_META_LOGIN"));
$USE_TERMS = intval($sock->GET_INFO("USE_TERMS"));
$ArticaSplashHotSpotCacheAuth = intval($sock->GET_INFO("ArticaSplashHotSpotCacheAuth"));
$USE_MYSQL = intval($sock->GET_INFO("USE_MYSQL"));
$USE_ACTIVEDIRECTORY = intval($sock->GET_INFO("USE_ACTIVEDIRECTORY"));
$Timez[0] = "{unlimited}";
$Timez[30] = "30 {minutes}";
$Timez[60] = "1 {hour}";
$Timez[120] = "2 {hours}";
$Timez[180] = "3 {hours}";
$Timez[360] = "6 {hours}";
$Timez[720] = "12 {hours}";
$Timez[1440] = "1 {day}";
$Timez[2880] = "2 {days}";
$Timez[10080] = "1 {week}";
$Timez[20160] = "2 {weeks}";
$Timez[40320] = "1 {month}";
$ENABLED_AUTO_LOGIN = intval($sock->GET_INFO("ENABLED_AUTO_LOGIN"));
$USE_ACTIVEDIRECTORY = intval($sock->GET_INFO("USE_ACTIVEDIRECTORY"));
$ALLOW_RECOVER_PASS = intval($sock->GET_INFO("ALLOW_RECOVER_PASS"));
$DO_NOT_AUTENTICATE = intval($sock->GET_INFO("DO_NOT_AUTENTICATE"));
$LIMIT_BY_SIZE = intval($sock->GET_INFO("LIMIT_BY_SIZE"));
$LANDING_PAGE = $sock->GET_INFO("LANDING_PAGE");
$LOST_LANDING_PAGE = $sock->GET_INFO("LOST_LANDING_PAGE");
$MACWHITE = intval($sock->GET_INFO("MACWHITE"));
$SMS_REGISTER = intval($sock->GET_INFO("SMS_REGISTER"));
$BOUNCE_AUTH = intval($sock->GET_INFO("BOUNCE_AUTH"));
$TOS_VALUE = intval($sock->GET_INFO("TOS_VALUE"));
if ($LOST_LANDING_PAGE == null) {
$LOST_LANDING_PAGE = "http://articatech.net";
}
$ArticaSplashHotSpotRemoveAccount = intval($sock->GET_INFO("ArticaSplashHotSpotRemoveAccount"));
if ($ENABLED_AUTO_LOGIN == 1) {
$ENABLED_SMTP = intval($sock->GET_INFO("ENABLED_SMTP"));
if ($ENABLED_SMTP == 0) {
echo $tpl->_ENGINE_parse_body("<p class=text-error>{HOTSPOT_ENABLED_AUTO_LOGIN_SMTP_DISABLED}</p>");
} else {
$smtp_server_name = trim($sock->GET_INFO("smtp_server_name"));
$smtp_server_port = intval(trim($sock->GET_INFO("smtp_server_port")));
$smtp_sender = trim($sock->GET_INFO("smtp_sender"));
if ($smtp_server_name == null or $smtp_sender == null) {
echo $tpl->_ENGINE_parse_body("<p class=text-error>{HOTSPOT_ENABLED_AUTO_LOGIN_SMTP_SETTINGS}</p>");
}
}
}
$ayDscp = array(0 => '{default}', 8 => '0x20', 10 => '0x28', 12 => '0x30', 14 => '0x38', 16 => '0x40', 18 => '0x48', 20 => '0x50', 22 => '0x58', 24 => '0x60', 26 => '0x68', 28 => '0x70', 30 => '0x78', 32 => '0x80', 34 => '0x88', 36 => '0x90', 38 => '0x98', 40 => '0xA0', 46 => '0xB8', 48 => '0xC0', 56 => '0xE0');
$html = "<div style='width:98%' class=form>\n\t<table style='width:100%'>\n\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{use_terme_of_use}:</td>\n\t\t<td>" . Field_checkbox_design("USE_TERMS-{$t}", 1, $USE_TERMS) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{send_accounts_to_meta_server}", "{send_accounts_to_meta_server_explain}") . ":</td>\n\t\t<td>" . Field_checkbox_design("ENABLED_META_LOGIN-{$t}", 1, $ENABLED_META_LOGIN) . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{allow_recover_password}", "{allow_recover_password_explain_hotspot}") . ":</td>\n\t\t<td>" . Field_checkbox_design("ALLOW_RECOVER_PASS-{$t}", 1, $ALLOW_RECOVER_PASS) . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{lost_landing_page}", "{lost_landing_page_explain}") . ":</td>\n\t\t<td>" . Field_text("LOST_LANDING_PAGE-{$t}", $LOST_LANDING_PAGE, "font-size:22px;width:350px") . "</td>\n\t</tr>\t\n\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{landing_page}", "{landing_page_hotspot_explain}") . ":</td>\n\t\t<td>" . Field_text("LANDING_PAGE-{$t}", $LANDING_PAGE, "font-size:22px;width:350px") . "</td>\n\t</tr>\t\n\t\t\t\t\n\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px;text-transform:capitalize'>{re_authenticate_each} ({default}):</td>\n\t\t<td style='font-size:18px'>" . Field_array_Hash($Timez, "ArticaSplashHotSpotCacheAuth-{$t}", $ArticaSplashHotSpotCacheAuth, null, null, 0, "font-size:22px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px;text-transform:capitalize'>" . texttooltip("{re_authenticate_each}", "{re_authenticate_each_hotspot_size}") . ":</td>\n\t\t<td style='font-size:18px'>" . Field_text("LIMIT_BY_SIZE-{$t}", $LIMIT_BY_SIZE, "font-size:22px;width:120px") . " MB</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>" . texttooltip("{tcp_outgoing_tos}", "{HOTSPOT_TOS_VALUE_EXPLAIN}") . ":</td>\n\t\t<td>" . Field_array_Hash($ayDscp, "TOS_VALUE-{$t}", $TOS_VALUE, 'style:font-size:22px;') . "</td>\n\t</tr>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px;text-transform:capitalize'>" . texttooltip("{disable_account_in} ({default})", "{ArticaSplashHotSpotEndTime_explain}") . ":</td>\n\t\t<td style='font-size:18px'>" . Field_array_Hash($Timez, "ArticaSplashHotSpotEndTime-{$t}", $ArticaSplashHotSpotEndTime, null, null, 0, "font-size:22px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px;text-transform:capitalize'>" . texttooltip("{remove_account_in} ({default})", "{ArticaSplashHotSpotRemoveAccount_explain}") . ":</td>\n\t\t<td style='font-size:18px'>" . Field_array_Hash($Timez, "ArticaSplashHotSpotRemoveAccount-{$t}", $ArticaSplashHotSpotRemoveAccount, null, null, 0, "font-size:22px") . "</td>\n\t</tr>\n\n\t<tr>\n\t\t<td class=legend style='font-size:22px;text-transform:capitalize'>" . texttooltip("{bounce_if_already_authenticated}", "{bounce_if_already_authenticated_hotspot}") . ":</td>\n\t\t<td>" . Field_checkbox_design("BOUNCE_AUTH-{$t}", 1, $BOUNCE_AUTH) . "</td>\n\t</tr>\t\t\t\t\n\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px;text-transform:capitalize'>" . texttooltip("{save_computer_in_whitelist}", "{save_computer_in_whitelist_hotspot}") . ":</td>\n\t\t<td>" . Field_checkbox_design("MACWHITE-{$t}", 1, $MACWHITE) . "</td>\n\t</tr>\t\t\t\t\t\n\t\t\t\t\n\n\t<tr><td colspan=2 style='font-size:30px'>{authentication}</td></tr>\t\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{DO_NOT_AUTENTICATE}", "{DO_NOT_AUTENTICATE_HOTSPOT_EXPLAIN}") . ":</td>\n\t\t<td>" . Field_checkbox_design("DO_NOT_AUTENTICATE-{$t}", 1, $DO_NOT_AUTENTICATE) . "</td>\n\t</tr>\t\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{use_local_database}", "{hotspot_use_local_database}") . ":</td>\n\t\t<td>" . Field_checkbox_design("USE_MYSQL-{$t}", 1, $USE_MYSQL) . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>" . texttooltip("{use_active_directory}", "{hotspot_use_active_directory}") . ":</td>\n\t\t<td>" . Field_checkbox_design("USE_ACTIVEDIRECTORY-{$t}", 1, $USE_ACTIVEDIRECTORY) . "</td>\n\t</tr>\t\t\t\t\n\t\t\t\t\n\t<tr><td colspan=2 style='font-size:30px'>{self_register}</td></tr>\t\t\t\n\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px;text-transform:capitalize'>" . texttooltip("{enable_hotspot_autologin}", "{enable_hotspot_autologin_explain}") . ":</td>\n\t\t<td>" . Field_checkbox_design("ENABLED_AUTO_LOGIN-{$t}", 1, intval($sock->GET_INFO("ENABLED_AUTO_LOGIN"))) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px;text-transform:capitalize'>" . texttooltip("{enable_hotspot_sms}", "{enable_hotspot_sms_explain}") . ":</td>\n\t\t<td>" . Field_checkbox_design("SMS_REGISTER-{$t}", 1, $SMS_REGISTER) . "</td>\n\t</tr>\n\t\t\t\t\n\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px;text-transform:capitalize'>" . texttooltip("{enable_confirmation_establish_session}", "{enable_confirmation_establish_session_explain}") . ":</td>\n\t\t<td>" . Field_checkbox_design("ENABLED_REDIRECT_LOGIN-{$t}", 1, $ENABLED_REDIRECT_LOGIN) . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px;text-transform:capitalize'>{remove_password_field}:</td>\n\t\t<td>" . Field_checkbox_design("ArticaHotSpotNowPassword-{$t}", 1, $ArticaHotSpotNowPassword) . "</td>\n\t</tr>\t\t\t\t\n\n\t\t\t\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>" . button("{apply}", "Save{$t}()", "42px") . "</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\tRefreshTab('HOTSPOT_TAB');\n\t\t\n\t}\t\n\t\n\tfunction Save{$t}(){\n\t\t\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('ruleid',{$ruleid});\n\t\t\n\t\t\n\t\tif(document.getElementById('ArticaHotSpotNowPassword-{$t}').checked){XHR.appendData('ArticaHotSpotNowPassword',1);}else{XHR.appendData('ArticaHotSpotNowPassword',0); }\n\t\tif(document.getElementById('USE_TERMS-{$t}').checked){XHR.appendData('USE_TERMS',1); }else{ XHR.appendData('USE_TERMS',0); }\t\t\n\t\tif(document.getElementById('ENABLED_REDIRECT_LOGIN-{$t}').checked){XHR.appendData('ENABLED_REDIRECT_LOGIN',1); }else{ XHR.appendData('ENABLED_REDIRECT_LOGIN',0); }\n\t\tif(document.getElementById('ENABLED_AUTO_LOGIN-{$t}').checked){XHR.appendData('ENABLED_AUTO_LOGIN',1); }else{ XHR.appendData('ENABLED_AUTO_LOGIN',0); }\n\t\tif(document.getElementById('ENABLED_META_LOGIN-{$t}').checked){XHR.appendData('ENABLED_META_LOGIN',1); }else{ XHR.appendData('ENABLED_META_LOGIN',0); }\n\t\tif(document.getElementById('ALLOW_RECOVER_PASS-{$t}').checked){XHR.appendData('ALLOW_RECOVER_PASS',1); }else{ XHR.appendData('ALLOW_RECOVER_PASS',0); }\n\t\tif(document.getElementById('DO_NOT_AUTENTICATE-{$t}').checked){XHR.appendData('DO_NOT_AUTENTICATE',1); }else{ XHR.appendData('DO_NOT_AUTENTICATE',0); }\n\t\tif(document.getElementById('USE_MYSQL-{$t}').checked){XHR.appendData('USE_MYSQL',1); }else{ XHR.appendData('USE_MYSQL',0); }\n\t\tif(document.getElementById('USE_ACTIVEDIRECTORY-{$t}').checked){XHR.appendData('USE_ACTIVEDIRECTORY',1); }else{ XHR.appendData('USE_ACTIVEDIRECTORY',0); }\n\t\tif(document.getElementById('SMS_REGISTER-{$t}').checked){XHR.appendData('SMS_REGISTER',1); }else{ XHR.appendData('SMS_REGISTER',0); }\n\t\tif(document.getElementById('MACWHITE-{$t}').checked){XHR.appendData('MACWHITE',1); }else{ XHR.appendData('MACWHITE',0); }\n\t\tif(document.getElementById('BOUNCE_AUTH-{$t}').checked){XHR.appendData('BOUNCE_AUTH',1); }else{ XHR.appendData('BOUNCE_AUTH',0); }\n\t\tXHR.appendData('TOS_VALUE',document.getElementById('TOS_VALUE-{$t}').value);\n\t\tXHR.appendData('ArticaSplashHotSpotCacheAuth',document.getElementById('ArticaSplashHotSpotCacheAuth-{$t}').value);\n\t\tXHR.appendData('ArticaSplashHotSpotEndTime',document.getElementById('ArticaSplashHotSpotEndTime-{$t}').value);\n\t\tXHR.appendData('ArticaSplashHotSpotRemoveAccount',document.getElementById('ArticaSplashHotSpotRemoveAccount-{$t}').value);\n\t\tXHR.appendData('LIMIT_BY_SIZE',document.getElementById('LIMIT_BY_SIZE-{$t}').value);\n\t\t\n\t\tXHR.appendData('LOST_LANDING_PAGE',document.getElementById('LOST_LANDING_PAGE-{$t}').value);\n\t\tXHR.appendData('LANDING_PAGE',document.getElementById('LANDING_PAGE-{$t}').value);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n\t\t\n\t}\n</script>";
echo $tpl->_ENGINE_parse_body($html);
}
示例12: popup
function popup()
{
$page = CurrentPageName();
$tpl = new templates();
$t = time();
$html = "<div style='font-size:18px' class=explain>{mysql_hotspot_members_import_explain}</div>\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'>" . texttooltip("{delete_old_items}", "{delete_old_items_table_explain}") . ":</td>\n\t\t<td>" . Field_checkbox_design("DeleteOld-{$t}", 1, 0) . "</td>\n\t</tr>\n\t<tr>\n\t\t\n\t\t\n\t\t<td colspan=2><textarea \n\t\t\tstyle='width:100%;height:350px;font-size:18px !important;border:4px solid #CCCCCC;font-family:\"Courier New\",\n\t\t\tCourier,monospace;background-color:white;color:black' id='IMPORT-{$t}'></textarea>\n\t\t</td>\n\t</tr>\t\n\t<tr>\n\t\t<td align='right' colspan=2>" . button('{import}', "Save{$t}();", 32) . "</td>\n\t</tr>\n\t</table>\n\t</div>\t\t\n<script>\nvar xSave{$t}= function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>3){alert(results);return;}\n\t\$('#flexRT{$_GET["t"]}').flexReload();\n\tYahooWin3Hide();\n}\n\nfunction Save{$t}(){\t\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('IMPORT',document.getElementById('IMPORT-{$t}').value);\n\tif(document.getElementById('DeleteOld-{$t}').checked){XHR.appendData('DeleteOld',1);}else {XHR.appendData('DeleteOld',0);}\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n}\t\n</script>\t\t\t\n";
echo $tpl->_ENGINE_parse_body($html);
}
示例13: help
function help()
{
$tpl = new templates();
$page = CurrentPageName();
$downloadvinvin = Paragraphe("setup-icon-64.png", "{DOWNLOAD_OPENVPN_CLIENT}", "{DOWNLOAD_OPENVPN_CLIENT_TEXT}", "javascript:s_PopUp('http://www.articatech.net/download/openvpn-2.1.4-install.exe')", "{DOWNLOAD_OPENVPN_CLIENT_TEXT}");
$downloadapple = Paragraphe("apple-logo-64.png", "{DOWNLOAD_OPENVPN_CLIENT_APPLE}", "{DOWNLOAD_OPENVPN_CLIENT_TEXT}", "javascript:s_PopUp('http://www.articatech.net/download/Tunnelblick_3.1.7.dmg')", "{DOWNLOAD_OPENVPN_CLIENT_TEXT}");
$html = "\n\t<div class=explain>{OPENVPN_ADMIN_HELP_TEXT}</div>\n\t<div style='width:98%' class=form>\n\t<table style='width:99%'>\n\t<tbody>\n\t<tr style='height:40px'>\n\t\t<td width=1% nowrap><strong style='font-size:18px'>v2.1.4</td>\n\t\t<td width=95% style='font-size:18px'>" . texttooltip("{DOWNLOAD_OPENVPN_CLIENT} XP 32bits", "{DOWNLOAD_OPENVPN_CLIENT_TEXT}", "s_PopUp('http://www.articatech.net/download/openvpn-2.1.4-install.exe')") . "</td>\n\t\t<td width=1% nowrap><strong style='font-size:18px'>1.6MB</td>\t\n\t</tr>\t\t\t\n\t<tr style='height:40px'>\n\t\t<td width=1% nowrap><strong style='font-size:18px'>v2.3.9</td>\n\t\t<td width=95% style='font-size:18px'>" . texttooltip("{DOWNLOAD_OPENVPN_CLIENT} XP 32bits", "{DOWNLOAD_OPENVPN_CLIENT_TEXT}", "s_PopUp('http://www.articatech.net/download/openvpn-install-2.3.9-I001-i686.exe')") . "</td>\n\t\t<td width=1% nowrap><strong style='font-size:18px'>1.7MB</td>\t\n\t</tr>\t\t\t\t\t\t\n\t<tr style='height:40px'>\n\t\t<td width=1% nowrap><strong style='font-size:18px'>v2.3.9</td>\n\t\t<td width=95% style='font-size:18px'>" . texttooltip("{DOWNLOAD_OPENVPN_CLIENT} XP 64bits", "{DOWNLOAD_OPENVPN_CLIENT_TEXT}", "s_PopUp('http://www.articatech.net/download/openvpn-install-2.3.9-I001-x86_64.exe')") . "</td>\n\t\t<td width=1% nowrap><strong style='font-size:18px'>1.8MB</td>\t\n\t</tr>\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t<tr style='height:40px'>\n\t\t<td width=1% nowrap><strong style='font-size:18px'>v2.3.9</td>\n\t\t<td width=95% style='font-size:18px'>" . texttooltip("{DOWNLOAD_OPENVPN_CLIENT} 7/10 64Bits", "{DOWNLOAD_OPENVPN_CLIENT_TEXT}", "s_PopUp('http://www.articatech.net/download/openvpn-install-2.3.9-I601-x86_64.exe')") . "</td>\n\t\t<td width=1% nowrap><strong style='font-size:18px'>1.8MB</td>\t\n\t</tr >\n\t<tr style='height:40px'>\n\t\t<td width=1% nowrap><strong style='font-size:18px'>v2.3.9</td>\n\t\t<td width=95% style='font-size:18px'>" . texttooltip("{DOWNLOAD_OPENVPN_CLIENT} 7 32Bits", "{DOWNLOAD_OPENVPN_CLIENT_TEXT}", "s_PopUp('http://www.articatech.net/download/openvpn-install-2.3.9-I601-i686.exe')") . "</td>\n\t\t<td width=1% nowrap><strong style='font-size:18px'>1.7MB</td>\t\n\t</tr>\t\n\t</tboy>\n\t</table>\n\t\n\t";
echo $tpl->_ENGINE_parse_body($html);
}
示例14: popup_squidguard
function popup_squidguard()
{
$sock = new sockets();
$datas = unserialize(base64_decode($sock->getFrameWork("cmd.php?squidguard-db-status=yes")));
$tpl = new templates();
$html = "\n\t<div style='font-size:14px;'>{DANSGUARDIAN_DB_STATUS_EXPLAIN}</div>\n\t<div style='width:100%;height:350px;overflow:auto'>\n\t<table style='width:100%'>\n\t\t<tr>\n\t\t<th style='font-size:14px' nowrap>{category}</th>\n\t\t<th style='font-size:14px' nowrap>{domains}</th>\n\t\t<th style='font-size:14px' nowrap>{urls}</th>\n\t\t<th style='font-size:14px' nowrap>Regex</th>\n\t\t<th style='font-size:14px' nowrap>{date}</th>\n\t\t<th style='font-size:14px' nowrap>{squidguard_database_size}</th>\n\t</tr>";
if (!is_array($datas)) {
echo $tpl->_ENGINE_parse_body("<H2>{error_no_datas}</H2>");
return;
}
while (list($path, $array) = each($datas)) {
// if($path==null){continue;}
$category = squidguard_extract_category($path);
$Narray[$category][$array["type"]]["linesn"] = $array["linesn"];
$Narray[$category][$array["type"]]["size"] = $array["size"];
$Narray[$category][$array["type"]]["date"] = $array["date"];
}
while (list($category, $array2) = each($Narray)) {
if ($array2["expressionlist"]["linesn"] == null) {
$array2["expressionlist"]["linesn"] = 0;
}
if ($array2["domainlist"]["linesn"] == null) {
$array2["expressionlist"]["linesn"] = 0;
}
if ($array2["urllist"]["linesn"] == null) {
$array2["expressionlist"]["linesn"] = 0;
}
if (is_array($array2["domainlist"])) {
if ($array2["domainlist"]["size"] == null) {
$not_compiled = texttooltip("{not_compiled}", "{compile_squidguard_databases}<hr><i>{compile_squidguard_databases_text}</i>", "Loadjs('squidguard.status.php?compile=yes')", 0, "color:#d32d2d;font-size:14px;font-weight:bold");
$array2["domainlist"]["size"] = "<span style='color:#d32d2d'>{$not_compiled}</span>";
} else {
$array2["domainlist"]["size"] = FormatBytes($array2["domainlist"]["size"] / 1024);
}
} else {
$array2["domainlist"]["size"] = "-";
}
if ($array2["domainlist"]["date"] == null) {
$array2["domainlist"]["date"] = $array2["expressionlist"]["date"];
}
$date = date('d M y h:i', $array2["domainlist"]["date"]);
if (preg_match("#personal-categories\\/(.+)#", $category, $re)) {
$category = "{personal}: {$re[1]}";
}
if (preg_match("#web-filter-plus\\/BL\\/(.+)#", $category, $re)) {
$category = "{professional}: {$re[1]}";
}
if (preg_match("#blacklist-artica\\/(.+)#", $category, $re)) {
$category = "{artica_community}: {$re[1]}";
}
$html = $html . "\n\t\t<tr " . CellRollOver() . ">\n\t\t\t<td style='font-size:14px' nowrap><strong>{$category}</strong></td>\n\t\t\t<td style='font-size:14px' align='right' width=1%><strong>{$array2["domainlist"]["linesn"]}</strong></td>\n\t\t\t<td style='font-size:14px' align='right' width=1%>{$array2["urllist"]["linesn"]}</td>\n\t\t\t<td style='font-size:14px' align='right' width=1%>{$array2["expressionlist"]["linesn"]}</td>\n\t\t\t<td style='font-size:14px' align='right' width=1% nowrap>{$date}</td>\n\t\t\t<td style='font-size:14px' align='right' width=1%>{$array2["domainlist"]["size"]}</td>\n\t\t</TR>\n\t\t\n\t\t";
}
$html = $html . "</table></div>";
echo $tpl->_ENGINE_parse_body($html, 'squid.index.php');
}
示例15: popup
function popup()
{
$tpl = new templates();
$page = CurrentPageName();
$q = new postgres_sql();
$ligne = pg_fetch_assoc($q->QUERY_SQL("SELECT * FROM suricata_sig WHERE signature='{$_GET["sig"]}'"));
$ligne2 = pg_fetch_assoc($q->QUERY_SQL("SELECT SUM(xcount) as tcount FROM suricata_events WHERE signature='{$_GET["sig"]}'"));
$sum = FormatNumber($ligne2["tcount"]);
$t = time();
$html = "<div style='font-size:30px;margin-bottom:8px;'>{signature} {ID} <strong>{$_GET["sig"]}</strong></div>\n\t<div style='font-size:18px;margin-bottom:30px;border-top:1px solid #CCCCCC;padding-top:8px'><i>{$ligne["description"]}</i></div>\n\t<div style='width:98%' class=form>\n\t\n\t<table style='width:100%'>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:22px'>{events}:</td>\n\t\t\t<td style='font-size:22px'>{$sum}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:22px'>{enabled}:</td>\n\t\t\t<td>" . Field_checkbox_design("enabled-{$t}", 1, $ligne["enabled"]) . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:22px'>" . texttooltip("{firewall}", "{suricata_firewall}") . ":</td>\n\t\t\t<td>" . Field_checkbox_design("firewall-{$t}", 1, $ligne["firewall"]) . "</td>\n\t\t</tr>\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t<tr>\n\t\t\t<td colspan=2 align='right'><hr>" . button("{apply}", "Save{$t}()", 30) . "</td>\n\t</table>\n\t</div>\t\t\t\n\t<script>\n\tvar xSave{$t}=function (obj) {\n\t\tvar tempvalue=obj.responseText;\n\t\tif(tempvalue.length>3){alert(tempvalue);return;}\n\t\t\$('#TABLE_SURICATA_EVENTS').flexReload();\n\t\tYahooWinHide();\n\t\tLoadjs('suricata.progress.php');\n\t}\t\n\t\n\tfunction Save{$t}(){\n\t\tvar XHR = new XHRConnection();\n\t\tvar enabled=0;\n\t\tvar firewall=0;\n\t\tif(document.getElementById('enabled-{$t}').checked){enabled=1;}\n\t\tif(document.getElementById('firewall-{$t}').checked){firewall=1;}\n\t\tXHR.appendData('enabled',enabled);\n\t\tXHR.appendData('firewall',firewall);\n\t\tXHR.appendData('sig','{$_GET["sig"]}');\n\t\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\t\n\t}\t\n\n\t</script>\t\t\t\n\t";
echo $tpl->_ENGINE_parse_body($html);
}