$columnCount = 3; $graphs_arr[$graph_count++] = array("protocol-daily", "graph_protocol_daily", 'Most Attacked Protocol (Daily)'); $graphs_arr[$graph_count++] = array("srcip-daily", "graph_srcip_daily", 'Most Attacked Source IP address (Daily)'); $graphs_arr[$graph_count++] = array("destip-daily", "graph_destip_daily", 'Most Attacked Destination IP address (Daily)'); $graphs_arr[$graph_count++] = array("destport-daily", "graph_destport_daily", 'Most Attacked Destination Port (Daily)'); $graphs_arr[$graph_count++] = array("service-daily", "graph_service_daily", 'Most Attacked Service IP address (Daily)'); $graphs_arr[$graph_count++] = array("protocol-hourly", "graph_protocol_hourly", 'Most Attacked Protocol (Hourly)'); $graphs_arr[$graph_count++] = array("srcip-hourly", "graph_srcip_hourly", 'Most Attacked Source IP address (Hourly)'); $graphs_arr[$graph_count++] = array("destip-hourly", "graph_destip_hourly", 'Most Attacked Destination IP address (Hourly)'); $graphs_arr[$graph_count++] = array("destport-hourly", "graph_destport_hourly", 'Most Attacked Destination Port (Hourly)'); $graphs_arr[$graph_count++] = array("service-hourly", "graph_service_hourly", 'Most Attacked Service IP address (Hourly)'); $files_orig = dirList($images); $files = array_reverse($files_orig); $selectBoxes = ""; for ($i = 0; $i < $graph_count; $i++) { $selectBoxes[$i] = createSelectBox($files, $graphs_arr[$i][0], $graphs_arr[$i][1]); } $html_code = '<html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9"/></head><title>KOVAN Stats</title><body>'; $html_code .= '<div class="title">KOVAN Stats</div>'; $html_code .= '<table BORDER=1>'; for ($i = 0; $i < $graph_count; $i++) { if ($i % $columnCount == 0) { $html_code .= '<tr>'; } $definition = $graphs_arr[$i][2]; $html_code .= "<td>{$definition} {$selectBoxes[$i]}</td>"; if ($i + 1 % $columnCount == 0) { $html_code .= '</tr>'; } } $html_code .= '</table>';
if ($catid == "0") { $checked = "checked=\"checked\" "; } else { $checked = ""; } $catformfields .= "<input type=\"checkbox\" name=\"adduser[category][]\" id=\"catbox{$catid}\" value=\"{$catid}\" {$checked}/>\n\t\t\t\t\t\t\t<label for=\"catbox{$catid}\">{$catinfo['name']}</label><br />"; } $main_content = ' <div id="manage_users_wrapper"> <form id="add_user_form" class="cpform" method="post"> <div class="div_normal"> <fieldset> <legend>' . i18n("users_add") . '</legend> <input type="hidden" name=" panel" value="users" /> <p><label for="add_user_name">' . i18n("login_Username") . '</label><br /><input class="inshort" type="text" id="add_user_name" name="adduser[name]" />'; $main_content .= createSelectBox(array("4" => i18n("level_admin"), "3" => i18n("level_editor"), "2" => i18n("level_journalist"), "1" => i18n("level_commenter")), "add_user_level", "adduser[level]", $Settings->co[general][defaultuserlevel]); $main_content .= ' <label for="add_user_level">' . i18n("generic_level") . '</label></p> <p><input class="inshort" type="text" id="add_user_nname" name="adduser[nickname]" /><label for="add_user_nname">' . i18n("generic_nickname") . '</label></p> <p><input class="inshort" type="text" id="add_user_password" name="adduser[password]" /><label for="add_user_password">' . i18n("login_Password") . '</label></p> <p><input class="inmedium" type="text" id="add_user_email" name="adduser[email]" /><label for="add_user_email">' . i18n("generic_email") . '</label></p> <p><input class="inmedium" type="text" id="add_user_url" name="adduser[url]" /><label for="add_user_url">' . i18n("generic_url") . '</label></p> <p><label for="add_user_profile">' . i18n("generic_profile") . '</label><br /><textarea class="tamedium" id="add_user_profile" name="adduser[profile]"></textarea></p> </fieldset> <p><input class="add" type="submit" value="' . i18n("generic_add") . '" /></p> </div> <div class="div_extended users_options"> <fieldset> <legend>' . i18n("users_restrict") . '</legend> <p>' . i18n("users_restrictdesc") . '</p> ' . $catformfields . ' </fieldset>