public function editImapAccount() { $_POST = mswMultiDimensionalArrayMap('mswSafeImportString', $_POST); // Defaults if not set.. $_POST['im_piping'] = isset($_POST['im_piping']) ? 'yes' : 'no'; $_POST['im_flags'] = isset($_POST['im_flags']) ? imap::filterImapFlag($_POST['im_flags']) : ''; $_POST['im_attach'] = isset($_POST['im_attach']) ? 'yes' : 'no'; $_POST['im_ssl'] = isset($_POST['im_ssl']) ? 'yes' : 'no'; $_POST['im_port'] = (int) $_POST['im_port']; $_POST['im_messages'] = (int) $_POST['im_messages']; $_POST['im_move'] = isset($_POST['im_move']) ? $_POST['im_move'] : ''; $_POST['im_spam'] = isset($_POST['im_spam']) ? 'yes' : 'no'; $_POST['im_spam_purge'] = isset($_POST['im_spam_purge']) ? 'yes' : 'no'; $_GET['edit'] = (int) $_GET['edit']; mysql_query("UPDATE `" . DB_PREFIX . "imap` SET\n `im_piping` = '{$_POST['im_piping']}',\n `im_protocol` = 'imap',\n `im_host` = '{$_POST['im_host']}',\n `im_user` = '{$_POST['im_user']}',\n `im_pass` = '{$_POST['im_pass']}',\n `im_port` = '{$_POST['im_port']}',\n `im_name` = '{$_POST['im_name']}',\n `im_flags` = '{$_POST['im_flags']}',\n `im_attach` = '{$_POST['im_attach']}',\n `im_move` = '{$_POST['im_move']}',\n `im_messages` = '{$_POST['im_messages']}',\n `im_ssl` = '{$_POST['im_ssl']}',\n `im_priority` = '{$_POST['im_priority']}',\n `im_dept` = '{$_POST['im_dept']}',\n `im_email` = '{$_POST['im_email']}',\n `im_spam` = '{$_POST['im_spam']}',\n `im_spam_purge` = '{$_POST['im_spam_purge']}',\n `im_score` = '{$_POST['im_score']}'\n WHERE `id` = '{$_GET['edit']}'\n ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__)); }