ossim_valid($name, OSS_SCORE, OSS_NULLABLE, OSS_ALPHA, OSS_SPACE, OSS_PUNC, 'illegal:' . _("name")); ossim_valid($sid, OSS_NULLABLE, OSS_DIGIT, 'illegal:' . _("sid")); ossim_valid($reliability, OSS_NULLABLE, OSS_DIGIT, 'illegal:' . _("reliability")); ossim_valid($priority, OSS_NULLABLE, OSS_DIGIT, 'illegal:' . _("priority")); ossim_valid($category, OSS_NULLABLE, OSS_ALPHA, 'illegal:' . _("category")); ossim_valid($subCategory, OSS_NULLABLE, OSS_ALPHA, 'illegal:' . _("subCategory")); if (ossim_error()) { die(ossim_error()); } $db = new ossim_db(); $conn = $db->connect(); // Category require_once 'classes/Category.inc'; $list_categories = Category::get_list($conn); if ($name != "" && $sid != "") { if (in_array($sid, Plugin_sid::get_sids_by_id($conn, $plugin))) { pluginsid_inputs_error("Event type {$sid} already exists"); } elseif ($sid < 1) { echo "<p align=\"center\"> " . gettext("Sid must be a valid number higher than 0") . " </p>"; echo "<p align=\"center\"><a href=\"pluginsid.php?id={$plugin}\"> " . gettext("Back") . " </a></p>"; exit; } else { // if ($category == 'NULL') { $category = NULL; $subCategory = NULL; } else { if ($subCategory == 'NULL') { $subCategory = NULL; } }