saveConfig(); /**************************** Add New Monitored Box *****************************/ //perform this if the option to create new mail box has been checked if(isset($_REQUEST['wiz_new_mbox']) && ($_REQUEST['wiz_new_mbox']=='1')){ //Populate the Request variables that inboundemail expects $_REQUEST['mark_read'] = 1; $_REQUEST['only_since'] = 1; $_REQUEST['mailbox_type'] = 'bounce'; $_REQUEST['from_name'] = $_REQUEST['name']; $_REQUEST['group_id'] = 'new'; // $_REQUEST['from_addr'] = $_REQUEST['wiz_step1_notify_fromaddress']; //reuse save functionality for inbound email require_once('modules/InboundEmail/Save.php'); } if (!empty($_REQUEST['error'])){ //an error was found during inbound save. This means the save was allowed but the inbound box had problems, return user to wizard //and display error message header("Location: index.php?action=WizardEmailSetup&module=Campaigns&error=true"); }else{ //set navigation details header("Location: index.php?action=index&module=Campaigns"); } /* * This function will re-add the post variables that exist with the specified prefix. * It will add them minus the specified prefix. This is needed in order to reuse the save functionality, * which does not expect the prefix, and still use the generic create summary functionality in wizard, which * does expect the prefix. */ function clean_up_post($prefix){ foreach ($_REQUEST as $key => $val) { if((strstr($key, $prefix )) && (strpos($key, $prefix )== 0)){ $newkey =substr($key, strlen($prefix)) ; $_REQUEST[$newkey] = $val; } } foreach ($_POST as $key => $val) { if((strstr($key, $prefix )) && (strpos($key, $prefix )== 0)){ $newkey =substr($key, strlen($prefix)) ; $_POST[$newkey] = $val; } } } ?>