function Patterns() { $clam = new clamav(); $array = $clam->LoadDatabasesStatus(); if (!is_array($array)) { return null; } $html = "<table>\n\t<tr>\n\t<th>{date}</th>\t\n\t<th>{pattern}</th>\n\t</tr>\n\t\t\n\t"; while (list($file, $date) = each($array)) { $html = $html . "\n\t\t<tr>\n\t\t\t<td style='font-size:12px;font-weight:bold' nowrap>{$date[1]}</td>\n\t\t\t<td style='font-size:11px'>{$date[0]}</td>\n\t\t</tr>\n\t\t"; } $html = $html . "</table>"; return $html; }
function ClamAVPatterns() { $tpl = new templates(); $users = new usersMenus(); if (!$users->CLAMD_INSTALLED) { return null; } if ($users->KASPERSKY_SMTP_APPLIANCE) { return; } $clam = new clamav(); $array = $clam->LoadDatabasesStatus(); if (!is_array($array)) { return null; } $html = "\n<table cellspacing='0' cellpadding='0' border='0' class='tableView' style='width:100%'>\n<thead class='thead'>\n\t<tr><th colspan=3>{APP_CLAMAV}</th></tr>\n\t<tr>\n\t\t<th> </th>\n\t\t<th>{date}</th>\n\t\t<th>{pattern}</th>\n\t</tr>\n</thead>\n<tbody class='tbody'>"; $icon = "datasource-32.png"; while (list($file, $date) = each($array)) { if ($classtr == "oddRow") { $classtr = null; } else { $classtr = "oddRow"; } $html = $html . "\n\t\t<tr class={$classtr}>\n\t\t\t<td width=1%><img src='img/{$icon}'></td>\n\t\t\t<td style='font-size:14px;font-weight:bold' nowrap>{$date[1]}</td>\n\t\t\t<td style='font-size:14px'>{$date[0]}</td>\n\t\t</tr>\n\t\t"; } $html = $html . "</table>"; echo $tpl->_ENGINE_parse_body($html); }