function saveApplets_Admin($module_name) { global $smarty; global $arrLang; $arrIDs_DAU = null; if (is_array($_POST) & count($_POST) > 0) { foreach ($_POST as $key => $value) { if (substr($key, 0, 7) == "chkdau_") { $arrIDs_DAU[] = substr($key, 7); } } } $pAppletAdmin = new paloSantoAppletAdmin(); if (count($arrIDs_DAU) == 0) { $smarty->assign("mb_title", $arrLang["ERROR"]); $smarty->assign("mb_message", $arrLang["You must have at least one applet activated"]); } else { $ok = $pAppletAdmin->setApplets_User($arrIDs_DAU, $_SESSION["elastix_user"]); if (!$ok) { $smarty->assign("mb_title", $arrLang["Validation Error"]); $smarty->assign("mb_message", $pAppletAdmin->errMsg); } } return showApplets_Admin($module_name); }