$atmail->end(); } // Load an array of msgs selected to be moved $msgs = $_REQUEST['id']; if (!is_array($msgs)) { settype($msgs, 'array'); } if (isset($_REQUEST['msgmove'])) { $msgmove = $_REQUEST['msgmove']; } $mail = new GetMail(array('Username' => $atmail->username, 'Pop3host' => $atmail->pop3host, 'Password' => $auth->password, 'Type' => $atmail->MailType, 'Mode' => $atmail->Mode)); $status = $mail->login(); // We have an error while logging in. Tell the user if ($status) { print $atmail->parse("html/{$atmail->Language}/auth_misc.html", array('status' => "Remote mail-server not responding - Check connection - {$status}")); $mail->quit(); $atmail->end(); } // Receive the list of mailbox folders $folders = GetMail::_sort_folders($mail->listfolders()); // Make sure the requested folder exists (help avoid XSS etc) if (!empty($var['folder']) && !in_array($var['folder'], $folders)) { die("requested folder does not exist"); } $fol = array(); // Create the select box for moving messages to another folder $var['folderbox'] = $mail->folder_select($var['folder'], $folders); $var['folderbox'] = $mail->folder_select_lang($var['folderbox'], $atmail->Language); // By default, we want to move to Trash $var['folderbox'] = str_replace("value=\"Trash\"", "value=\"Trash\" selected", $var['folderbox']); // If the user has set the messages to another flag; update the UIDL database.