$parameters = array(); $parameters["plugins"]["chatroom"]["location"] = $_POST['location']; $parameters["plugins"]["chatroom"]["autoclose"] = $_POST['autoclose']; if (isset($_POST['offset'])) { $parameters["plugins"]["chatroom"]["offset"] = $_POST['offset']; $parameters["plugins"]["chatroom"]["label_offset"] = $_POST['label_offset']; } $parameters["plugins"]["chatroom"]['override_positions'] = $_POST['override_positions']; $parameters["plugins"]["chatroom"]["chatroom_expiry"] = $_POST["chatroom_expiry"]; return $parameters; } } $success = false; $param = new param(); if (isset($_POST['location']) == true) { $configs = $param->create_config(); $param->update_config($configs); $success = true; } $param->build_vars(); ?> <script type="text/javascript"> $(window).load(function() { if (<?php echo $success; ?> ) { var noty = $.noty({text: 'Your changes were saved successfully'});