Пример #1
0
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 = "&nbsp;";
    $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>&nbsp;</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>&nbsp;</td>\n\t</tr>";
}