$op = isset($_GET['op']) ? $_GET['op'] : null; $msgid = isset($_GET['msgid']) ? $_GET['msgid'] : null; getServer($id); @set_time_limit(120); $pop3 = new POP3($server, $username, $password, $port, $apop); if (!$pop3->Open()) { echo "<center>Not Connectable! Please check your POP3 settings.</center><br />"; } if ($op == "delete") { if (!is_array($msgid)) { $msgid = array($msgid); } foreach ($msgid as $mid) { $mid = intval($mid); if ($mid) { $pop3->DeleteMessage($mid); --$start; } } $pop3->Close(); $qs = ''; if ($start > 0) { $qs = '&start=' . $start; } ob_end_clean(); redirect_header(XOOPS_URL . '/modules/WebMail/inbox.php?id=' . $id . $qs, 1, _MD_WEBMAIL_MSG_DELETED); exit; } include XOOPS_ROOT_PATH . "/header.php"; ob_end_flush(); $query = "select account from " . $xoopsDB->prefix('webmail_popsettings') . " where id='{$id}' AND uid='{$userid}'";