<body> <?php if (!(GET('withoutmenu') == 1 || POST('withoutmenu') == 1)) { include "../hmenu.php"; } $ip = ""; $community = ""; $descr = ""; $ip = GET('ip') != "" ? GET('ip') : POST('ip'); ossim_valid($ip, OSS_IP_ADDR, OSS_NULLABLE, 'illegal:' . _("ip")); if (ossim_error()) { die(ossim_error()); } if (GET('ip') != "") { $devices = Device::get_list($conn, "where ip='" . Host::ip2ulong(GET('ip')) . "'"); foreach ($devices as $device) { $community = $device->get_community(); $descr = $device->get_descr(); } } else { $community = POST('community'); ossim_valid($community, OSS_ALPHA, OSS_SPACE, OSS_SCORE, OSS_PUNC, OSS_NULLABLE, 'illegal:' . _("name")); $descr = POST('descr'); ossim_valid($descr, OSS_ALPHA, OSS_NULLABLE, OSS_SPACE, OSS_PUNC, OSS_AT, 'illegal:' . _("Description")); if (ossim_error()) { die(ossim_error()); } } if ($community != "" && GET('ip') == "") { // only with POST
* * You should have received a copy of the GNU General Public License * along with this package; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * MA 02110-1301 USA * * * On Debian GNU/Linux systems, the complete text of the GNU General * Public License can be found in `/usr/share/common-licenses/GPL-2'. * * Otherwise you can read it here: http://www.gnu.org/licenses/gpl-2.0.txt ****************************************************************************/ require_once 'classes/Host.inc'; require_once 'classes/Util.inc'; if ($host != 'any') { $host_ip2ulong = Host::ip2ulong($host); if ($date_from != '' && $date_to != '') { $date_from = preg_match("/^\\d+\\-\\d+\\-\\d+\$/", $date_from) ? $date_from . " 00:00:00" : $date_from; $date_to = preg_match("/^\\d+\\-\\d+\\-\\d+\$/", $date_to) ? $date_to . " 23:59:59" : $date_to; $tzc = Util::get_tzc(); $date_filter = "AND (convert_tz(date,'+00:00','{$tzc}') BETWEEN '{$date_from}' AND '{$date_to}')"; } $where = "AND status='open' {$date_filter} ORDER BY date DESC"; $incident_list2 = Incident::get_list_filtered($conn, $host_ip2ulong, $where); $tick_num = count($incident_list2); } else { $where = "AND status='open' ORDER BY date DESC"; $incident_list2 = Incident::search($conn, array("status" => "Open"), "priority", "DESC", 1, 6); $tick_num = count($incident_list2); } $i_date = "-";