コード例 #1
0
ファイル: clamav.index.php プロジェクト: brucewu16899/artica
function freshclam_page()
{
    $clam = new clamav();
    $page = CurrentPageName();
    $tpl = new templates();
    while (list($index, $array) = each($clam->freshclam_mirrors)) {
        $countries[$index] = $index;
    }
    $countries[null] = "{select}";
    $contry = Field_array_Hash($countries, 'fresh_country', null, "FreshClamCounty()");
    $mirrors = freshclam_mirrors();
    $html = "<H1>{APP_FRESHCLAM}</H1>\n\t<table style='width:100%' class=table_form>\n\t<tr>\n\t\t<td colspan=3 align='left'><H2 style='margin:3px;text-transform:capitalize'>{settings}</H2></td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend>{MaxAttempts}:</td>\n\t\t<td>" . Field_text('MaxAttempts', $clam->freshclam_array["MaxAttempts"], 'width:90px') . "</td>\n\t\t<td>" . help_icon('{MaxAttempts_text}') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend>{Checks}:</td>\n\t\t<td>" . Field_text('Checks', $clam->freshclam_array["Checks"], 'width:90px') . "</td>\n\t\t<td>" . help_icon('{Checks_text}') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td colspan=3 align='right'><hr><input type='button' OnClick=\"FreshClamSaveSettings();\" value='{edit}&nbsp;&raquo;'></td>\n\t</tr>\n\t\t\n\t</table>\n\t<br>\n\t<table style='width:100%' class=table_form>\n\t<tr>\n\t\t<td align='left'><H2 style='margin:3px;text-transform:capitalize'>{mirrors}</H2></td>\n\t</tr>\t\n\t<td>{$contry}</td>\n\t<td><span id='mirrors-selected'></span></td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=2><div style='width:100%;height:150px;padding:5px;overflow:auto' id='mirrors_lists'>{$mirrors}</div></td>\n\t</tr>\n\t</table>\n\t\n\t\n\t\n\t\n\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
コード例 #2
0
ファイル: clamav.index.php プロジェクト: BillTheBest/1.6.x
function freshclam_page()
{
    $clam = new clamav();
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new sockets();
    $EnableFreshClam = $sock->GET_INFO("EnableFreshClam");
    if (!is_numeric($EnableFreshClam)) {
        $EnableFreshClam = 1;
    }
    while (list($index, $array) = each($clam->freshclam_mirrors)) {
        $countries[$index] = $index;
    }
    $countries[null] = "{select}";
    $contry = Field_array_Hash($countries, 'fresh_country', null, "FreshClamCounty()");
    $mirrors = freshclam_mirrors();
    $html = "\n\t<table style='width:99%' class=form>\n\t\n\t\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{enable_service}:</td>\n\t\t<td>" . Field_checkbox("EnableFreshClam", 1, $EnableFreshClam, "EnableFreshClamCheck()") . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{MaxAttempts}:</td>\n\t\t<td>" . Field_text('MaxAttempts', $clam->freshclam_array["MaxAttempts"], 'width:150px;font-size:18px') . "</td>\n\t\t<td>" . help_icon('{MaxAttempts_text}') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:14px'>{Checks}:</td>\n\t\t<td>" . Field_text('Checks', $clam->freshclam_array["Checks"], 'width:90px;font-size:14px') . "</td>\n\t\t<td>" . help_icon('{Checks_text}') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td colspan=3 align='right'><hr>" . button("{apply}", "FreshClamSaveSettings();", 16) . "</td>\n\t</tr>\n\t\t\n\t</table>\n\t<br>\n\t<table style='width:99%' class=form>\n\t<tr>\n\t\t<td align='left'><div style='margin:3px;text-transform:capitalize;font-size:16px'>{mirrors}</div></td>\n\t</tr>\t\n\t<td>{$contry}</td>\n\t<td><span id='mirrors-selected'></span></td>\n\t</tr>\n\t</table>\n\t<div style='width:100%;height:150px;padding:5px;overflow:auto' id='mirrors_lists'>{$mirrors}</div>\n\t\n\t<script>\n\t\n\n\t\n\t\tfunction EnableFreshClamCheck(){\n\t\t\tdocument.getElementById('Checks').disabled=true;\n\t\t\tdocument.getElementById('MaxAttempts').disabled=true;\n\t\t\tif(document.getElementById('EnableFreshClam').checked){\n\t\t\t\tdocument.getElementById('Checks').disabled=false;\n\t\t\t\tdocument.getElementById('MaxAttempts').disabled=false;\t\t\n\t\t\t}\n\t\t}\n\t\n\tEnableFreshClamCheck();\n\t</script>\n\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}