function plugins_popup() { $squid = new squidbee(); $users = new usersMenus(); $dans = Paragraphe_switch_disable('{enable_dansguardian}', '{feature_not_installed}', '{feature_not_installed}'); $cicap = Paragraphe_switch_disable('{enable_c_icap}', '{feature_not_installed}', '{feature_not_installed}'); $squidguard = Paragraphe_switch_disable('{enable_squidguard}', '{feature_not_installed}', '{feature_not_installed}'); //C_ICAP_INSTALLED if ($squid->isicap()) { $kav = Paragraphe_switch_img("{enable_kavproxy}", "{enable_kavproxy_text}", 'enable_kavproxy', $squid->enable_kavproxy, '{enable_disable}', 250); } else { $kav = Paragraphe_switch_disable('{enable_kavproxy}', "{feature_not_installed}<br><strong style='color:red'>{$squid->kav_accept_why}</strong>", '{feature_not_installed}'); } if ($users->C_ICAP_INSTALLED) { if ($users->SQUID_ICAP_ENABLED) { $cicap = Paragraphe_switch_img("{enable_c_icap}", "{enable_c_icap_text}", 'enable_c_icap', $squid->enable_cicap, '{enable_disable}', 250); } } if ($users->DANSGUARDIAN_INSTALLED) { $dans = Paragraphe_switch_img("{enable_dansguardian}", "{enable_dansguardian_text}", 'enable_dansguardian', $squid->enable_dansguardian, '{enable_disable}', 250); } if ($users->SQUIDGUARD_INSTALLED) { $squidguard = Paragraphe_switch_img("{enable_squidguard}", "{enable_squidguard_text}", 'enable_squidguard', $squid->enable_squidguard, '{enable_disable}', 250); } if ($users->KASPERSKY_WEB_APPLIANCE) { $dans = null; $cicap = null; } $form = "<div id='div-poubelle'></div>\n\t\t<table style='width:100%'>\n\t\t\t<tr>\n\t\t\t<td valign='top'>{$cicap}<br>{$kav}</td>\n\t\t\t<td valign='top'>{$squidguard}<br>{$dans}</td>\n\t\t\t\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t<td valign='top' colspan=2 align='right'><hr>" . button("{edit}", "save_plugins()") . "</td>\n\t\t</table>\t\t\t\n\t\t"; $html = "<H1>{activate_plugins}</H1>{$form}"; $tpl = new templates(); echo $tpl->_ENGINE_parse_body($html, 'squid.index.php'); }
function plugins_popup() { $squid = new squidbee(); $users = new usersMenus(); if ($users->KAV4PROXY_INSTALLED) { if ($squid->isicap()) { $kav = Paragraphe_switch_img("{enable_kavproxy}", "{enable_kavproxy_text}", 'enable_kavproxy', $squid->enable_kavproxy, '{enable_disable}', 250); } else { $kav = Paragraphe_switch_disable('{enable_kavproxy}', "{feature_not_installed}<br><strong style='color:#d32d2d'>{$squid->kav_accept_why}</strong>", '{feature_not_installed}'); } } if ($users->C_ICAP_INSTALLED) { if ($users->SQUID_ICAP_ENABLED) { $cicap = Paragraphe_switch_img("{enable_c_icap}", "{enable_c_icap_text}", 'enable_c_icap', $squid->enable_cicap, '{enable_disable}', 250); } } if ($users->DANSGUARDIAN_INSTALLED) { $dans = Paragraphe_switch_img("{enable_dansguardian}", "{enable_dansguardian_text}", 'enable_dansguardian', $squid->enable_dansguardian, '{enable_disable}', 250); } if ($users->SQUIDGUARD_INSTALLED) { $squidguard = Paragraphe_switch_img("{enable_squidguard}", "{enable_squidguard_text}", 'enable_squidguard', $squid->enable_squidguard, '{enable_disable}', 250); } if ($users->APP_UFDBGUARD_INSTALLED) { $ufdbguardd = Paragraphe_switch_img("{enable_ufdbguardd}", "{enable_ufdbguardd_text}", 'enable_ufdbguardd', $squid->enable_UfdbGuard, '{enable_disable}', 250); } if ($users->ADZAPPER_INSTALLED) { //$adzapper=Paragraphe_switch_img('{enable_adzapper}','{enable_adzapper_text}','enable_adzapper',$squid->enable_adzapper,'{enable_disable}',250); } if ($users->APP_SQUIDCLAMAV_INSTALLED) { $squidclamav = Paragraphe_switch_img('{enable_squidclamav}', '{enable_squidclamav_text}', 'enable_squidclamav', $squid->enable_squidclamav, '{enable_disable}', 250); } if ($users->C_ICAP_INSTALLED) { if ($users->SQUID_ICAP_ENABLED) { if ($users->APP_KHSE_INSTALLED) { $metascanner = Paragraphe_switch_img('{enable_metascanner}', '{enable_metascanner_text}', 'enable_metascanner', $squid->enable_metascanner, '{enable_disable}', 250); } } } if ($users->KASPERSKY_WEB_APPLIANCE) { $cicap = null; $squidclamav = null; $squidguard = null; $adzapper = null; } $tr[] = $squidclamav; $tr[] = $metascanner; $tr[] = $cicap; $tr[] = $kav; $tr[] = $adzapper; $tr[] = $squidguard; $tr[] = $ufdbguardd; $tr[] = $dans; $tables[] = "<table style='width:100%'><tr>"; $t = 0; while (list($key, $line) = each($tr)) { $line = trim($line); if ($line == null) { continue; } $t = $t + 1; $tables[] = "<td >{$line}</td>"; if ($t == 2) { $t = 0; $tables[] = "</tr><tr>"; } } if ($t < 2) { for ($i = 0; $i <= $t; $i++) { $tables[] = "<td > </td>"; } } $form = "<div id='div-poubelle'></div>\n\t\t " . implode("\n", $tables) . "\n\t\t</table> \t\n\t\t\t<div style='text-align:right'><hr>" . button("{apply}", "save_plugins()") . "</div>\n\t\t\t\t\t\n\t\t"; $html = "{$form}"; $tpl = new templates(); echo $tpl->_ENGINE_parse_body($html, 'squid.index.php'); }