You should have received a copy of the GNU General Public License along with additionalalerts. If not, see <http://www.gnu.org/licenses/>. -------------------------------------------------------------------------- */ include '../../../inc/includes.php'; $type = new PluginAdditionalalertsNotificationType(); $infocom = new PluginAdditionalalertsInfocomAlert(); if (isset($_POST["add"])) { if ($infocom->canCreate()) { $newID = $infocom->add($_POST); } Html::back(); } else { if (isset($_POST["update"])) { if ($infocom->canCreate()) { $infocom->update($_POST); } Html::back(); } else { if (isset($_POST["add_type"])) { if ($infocom->canCreate()) { $newID = $type->add($_POST); } Html::back(); } else { if (isset($_POST["delete_type"])) { if ($infocom->canCreate()) { $type->getFromDB($_POST["id"], -1); foreach ($_POST["item"] as $key => $val) { if ($val == 1) { $type->delete(array('id' => $key));