$msg, 'type' => $msg_type); IEM::sessionSet('FlashMessages', $flash_messages); if ($url !== null) { /** * If the url doesn't start with http (or https), put the full url at the start of it. * If it does start with http (or https), don't touch it. */ if (substr($url, 0, 4) !== 'http') { $url = SENDSTUDIO_APPLICATION_URL . '/admin/' . $url; } if (!headers_sent()) { header('Location: ' . $url); exit; } ?> ParseTemplate('successmsg', true); break; case SS_FLASH_MSG_ERROR: $GLOBALS['Error'] = $msg['message']; $print_msg .= $template_system->ParseTemplate('errormsg', true); break; case SS_FLASH_MSG_INFO: $GLOBALS['Message'] = $msg['message']; $print_msg .= $template_system->ParseTemplate('infomsg', true); break; case SS_FLASH_MSG_WARNING: $GLOBALS['Warning'] = $msg['message']; $print_msg .= $template_system->ParseTemplate('warningmsg', true); break; } } IEM::sessionRemove('FlashMessages'); return $print_msg; }