function DefaultRule() { $t = $_GET["t"]; $webfilter = new webfilter_rules(); $boot = new boostrap_form(); $styleTD = "style='font-size:16px;font-weight:bold'"; $styleTDCenter = "style='font-size:16px;font-weight:bold;text-align:center !important'"; $js = "DansGuardianEditRule('0','default')"; $jsblack = "<a href=\"javascript:blur();\"\n\t\tOnClick=\"javascript:document.getElementById('anim-img-0').innerHTML='<img src=img/wait.gif>';\"\n\t\tstyle='text-decoration:underline;font-weight:bold'>"; $delete = " "; $duplicate = imgsimple("duplicate-24.png", null, "Loadjs('dansguardian2.duplicate.php?default-rule=yes&t={$t}')"); $sock = new sockets(); $ligne = unserialize(base64_decode($sock->GET_INFO("DansGuardianDefaultMainRule"))); $TimeSpace = $webfilter->rule_time_list_explain($ligne["TimeSpace"], 0, $t); $link = $boot->trswitch($js); $link_blacklist = $boot->trswitch("Loadjs('dansguardian2.edit.php?js-blacklist-list=yes&RULEID=0&modeblk=0&group=&TimeID=&t={$t}');"); $link_whitelist = $boot->trswitch("Loadjs('dansguardian2.edit.php?js-blacklist-list=yes&RULEID=0&modeblk=1&group=&TimeID=&t={$t}');"); $templatejs = $boot->trswitch("Loadjs('dansguardian.template.php?js=yes&ID=0')"); return "\n\t<tr id='0'>\n\t<td {$styleTD} {$link} width=99%><span id='anim-img-0'>Default</span> {$TimeSpace} " . $webfilter->rules_dans_time_rule(0) . "</td>\n\t<td {$styleTDCenter} {$link} width=1% align=center >*</td>\n\t<td {$styleTDCenter} {$link_blacklist} width=1% align=center>" . $webfilter->COUNTDEGBLKS(0) . "</td>\n\t<td {$styleTDCenter} {$link_whitelist} width=1% align=center>" . $webfilter->COUNTDEGBWLS(0) . "</td>\n\t<td> </td>\n\t<td {$styleTDCenter} {$templatejs} width=35px align=center nowrap><img src='img/banned-template-32.png'></td>\n\t<td width=35px align=center {$styleTDCenter}>{$duplicate}</td>\n\t<td> </td>\n\t</tr>"; }
function DefaultRule() { $t = $_GET["t"]; $sock = new sockets(); $webfilter = new webfilter_rules(); $tpl = new templates(); $tmplate = $tpl->_ENGINE_parse_body("{template}"); $color = "black"; $ligne = unserialize(base64_decode($sock->GET_INFO("DansGuardianDefaultMainRule"))); $EnableGoogleSafeSearch = $sock->GET_INFO("EnableGoogleSafeSearch"); if (!is_numeric($EnableGoogleSafeSearch)) { $EnableGoogleSafeSearch = 1; } if (!is_numeric($ligne["groupmode"])) { $ligne["groupmode"] = 1; } $endofrule_TEXTS["any"] = "<i style='color:#000000;margin-top:8px;font-weight:bold;font-size:16px'>" . $tpl->_ENGINE_parse_body("{ufdb_explain_any}") . "</i>"; $endofrule_TEXTS["none"] = "<i style='color:#d32d2d;margin-top:8px;font-weight:bold;font-size:16px'>" . $tpl->_ENGINE_parse_body("{ufdb_explain_none}") . "</i>"; if ($ligne["endofrule"] == null) { $ligne["endofrule"] = "any"; } $endofrule_text = null; $CountDeBlack = intval($webfilter->COUNTDEGBLKS(0)); $CountDewhite = intval($webfilter->COUNTDEGBWLS(0)); $CountDeAll = intval($CountDeBlack + $CountDewhite); if ($CountDeAll == 0) { $color = "#d32d2d"; $MAINTR[] = $tpl->_ENGINE_parse_body("<i style='color:#d32d2d;margin-top:8px;font-weight:bold;font-size:16px'>{no_category_has_been_added}</i>"); } $MAINTR[] = "<i style='color:{$color};margin-top:8px;font-weight:bold;font-size:16px'>{ufdb_explain_default_rule}</i>"; if ($EnableGoogleSafeSearch == 0) { if ($ligne["GoogleSafeSearch"] == 1) { $EnableGoogleSafeSearch_text = $tpl->javascript_parse_text("<i style='color:#00A940;margin-top:8px;font-weight:bold;font-size:16px'>{EnableGoogleSafeSearch}</i>"); } } if ($ligne["groupmode"] == 0) { $MAINTR[] = "<i style='color:#d32d2d;margin-top:8px;font-weight:bold;font-size:16px'>{all_websites_are_banned}</span>"; } if ($ligne["groupmode"] == 2) { $MAINTR[] = "<i style='color:#46a346;margin-top:8px;font-weight:bold;font-size:16px'>{everything_is_allowed}</span>"; } $js = "DansGuardianEditRule('0','default')"; $jsblack = "<a href=\"javascript:blur();\"\n\tOnClick=\"javascript:document.getElementById('anim-img-0').innerHTML='<img src=img/wait.gif>';Loadjs('dansguardian2.edit.php?js-blacklist-list=yes&RULEID=0&modeblk=0&group=&TimeID=&t={$t}');\"\n\tstyle='text-decoration:underline;font-weight:bold;color:{$color}'>"; $jswhite = "<a href=\"javascript:blur();\"\n\tOnClick=\"javascript:document.getElementById('anim-img-0').innerHTML='<img src=img/wait.gif>';Loadjs('dansguardian2.edit.php?js-blacklist-list=yes&RULEID=0&modeblk=1&group=&TimeID=&t={$t}');\"\n\tstyle='text-decoration:underline;font-weight:bold;color:{$color}'>"; $delete = " "; $duplicate = imgsimple("duplicate-32.png", null, "Loadjs('dansguardian2.duplicate.php?default-rule=yes&t={$t}')"); $ligne = unserialize(base64_decode($sock->GET_INFO("DansGuardianDefaultMainRule"))); if ($GLOBALS["VERBOSE"]) { echo "<HR>webfilter->rule_time_list_from_ruleid(0)<HR><br>\n"; } $TimeSpace = $webfilter->rule_time_list_explain($ligne["TimeSpace"], 0, $t); $TimeSpace = str_replace('\\n\\n', "<br>", $TimeSpace); if ($GLOBALS["VERBOSE"]) { echo "<HR>{$TimeSpace}<HR><br>\n"; } $MAINTR[] = $endofrule_TEXTS[$ligne["endofrule"]]; if ($EnableGoogleSafeSearch_text != null) { $MAINTR[] = $EnableGoogleSafeSearch_text; } if ($TimeSpace != null) { $MAINTR[] = $TimeSpace; } $MAINTRTEXT = $tpl->_ENGINE_parse_body(@implode("<br>", $MAINTR)); return array('id' => 0, 'cell' => array("<span id='anim-img-0'></span><a href=\"javascript:blur();\" OnClick=\"javascript:{$js}\"\n\t\t\t\t\t\tstyle='font-size:22px;text-decoration:underline;color:{$color}'>Default</a>\n\t\t\t\t\t\t<br>{$MAINTRTEXT}\n\t\n\t\t\t\t\t\t", "<center style='font-size:22px;color:{$color}'>*</center>", "<span style='font-size:22px;color:{$color}'>« {$jsblack}{$CountDeBlack}</a> »</span>", "<span style='font-size:22px';color:{$color}>« {$jswhite}{$CountDewhite}</a> »</span>", "", "<center>{$duplicate}</center>", "<center>{$delete}</center>")); }
function DefaultRule() { $t = $_GET["t"]; $sock = new sockets(); $webfilter = new webfilter_rules(); $tpl = new templates(); $tmplate = $tpl->_ENGINE_parse_body("{template}"); $color = "black"; $ligne = unserialize(base64_decode($sock->GET_INFO("DansGuardianDefaultMainRule"))); $EnableGoogleSafeSearch = $sock->GET_INFO("EnableGoogleSafeSearch"); if (!is_numeric($EnableGoogleSafeSearch)) { $EnableGoogleSafeSearch = 1; } $endofrule_text = null; //$color="#E91212"; if ($EnableGoogleSafeSearch == 0) { if ($ligne["GoogleSafeSearch"] == 1) { $EnableGoogleSafeSearch_text = $tpl->javascript_parse_text("<br><i style='color:#00A940;margin-top:8px;font-weight:bold'>{EnableGoogleSafeSearch}</i>"); } } if ($ligne["groupmode"] == 0) { $color = "#E91212"; $warn = "<div style='float:right'><img src='img/stop-24.png'></div>"; } $js = "DansGuardianEditRule('0','default')"; $jsblack = "<a href=\"javascript:blur();\"\n\tOnClick=\"javascript:document.getElementById('anim-img-0').innerHTML='<img src=img/wait.gif>';Loadjs('dansguardian2.edit.php?js-blacklist-list=yes&RULEID=0&modeblk=0&group=&TimeID=&t={$t}');\"\n\tstyle='text-decoration:underline;font-weight:bold;color:{$color}'>"; $jswhite = "<a href=\"javascript:blur();\"\n\tOnClick=\"javascript:document.getElementById('anim-img-0').innerHTML='<img src=img/wait.gif>';Loadjs('dansguardian2.edit.php?js-blacklist-list=yes&RULEID=0&modeblk=1&group=&TimeID=&t={$t}');\"\n\tstyle='text-decoration:underline;font-weight:bold;color:{$color}'>"; $delete = " "; $duplicate = imgsimple("duplicate-32.png", null, "Loadjs('dansguardian2.duplicate.php?default-rule=yes&t={$t}')"); $ligne = unserialize(base64_decode($sock->GET_INFO("DansGuardianDefaultMainRule"))); if ($GLOBALS["VERBOSE"]) { echo "<HR>webfilter->rule_time_list_from_ruleid(0)<HR><br>\n"; } $TimeSpace = $webfilter->rule_time_list_explain($ligne["TimeSpace"], 0, $t); $TimeSpace = str_replace('\\n\\n', "<br>", $TimeSpace); if ($GLOBALS["VERBOSE"]) { echo "<HR>{$TimeSpace}<HR><br>\n"; } $endofrule = $ligne["endofrule"]; if ($endofrule == "none") { $endofrule_text = "<br><i style='color:#DB0000;margin-top:8px;font-weight:bold'>{block_unknown_websites}</i>"; } return array('id' => 0, 'cell' => array("<span id='anim-img-0'></span><a href=\"javascript:blur();\" OnClick=\"javascript:{$js}\"\n\t\t\t\t\t\tstyle='font-size:22px;text-decoration:underline;color:{$color}'>Default</a>\n\t\t\t\t\t\t{$TimeSpace}{$endofrule_text}{$EnableGoogleSafeSearch_text}\n\t\n\t\t\t\t\t\t", "<span style='font-size:22px;color:{$color}'>*</span>", "<span style='font-size:22px;color:{$color}'>« {$jsblack}" . $webfilter->COUNTDEGBLKS(0) . "</a> »</span>", "<span style='font-size:22px';color:{$color}>« {$jswhite}" . $webfilter->COUNTDEGBWLS(0) . "</a> »</span>", "", "{$duplicate}", $delete)); }