$cmid = 0;
     }
     if ($type != "imap" && $type != "pop3" && $type != "nntp") {
         $type = "pop3";
     }
     $query = "UPDATE " . $infresppop3 . "\n\t\t\tSET ThisPOP_Enabled = '{$enabled}',\n\t\t\tConfirm_Join = '{$confirmjoin}',\n\t\t\thost = '{$host}',\n\t\t\tport = '{$port}',\n\t\t\tusername = '******',\n\t\t\tpassword = '******',\n\t\t\tmailbox = '{$Mbox}',\n\t\t\tHTML_YN = '{$HandleHTML}',\n\t\t\tDelete_After_Download = '{$deletemsgs}',\n\t\t\tSpam_Header = '{$spam}',\n\t\t\tConcat_Middle = '{$cmid}',\n\t\t\tMail_Type = '{$type}'\n\t\t\tWHERE Attached_Responder = '{$Responder_ID}'";
     $DB_result = mysql_query($query) or die("Invalid query: " . mysql_error());
     inf_resp_message_box("POP3 Changes Saved.");
     $action = "list";
     # Done!
     // print "<H3 style=\"color : #003300\">POP3 changes saved!</H3> \n";
     // print "<font size=4 color=\"#666666\">Return to Responder.</font> <br>\n";
     # Print back button
     // $return_action = "update";
     // include('templates/back_button.responders.php');
 } elseif (($action == "pause" || $action == "activate") && ResponderExists($Responder_ID)) {
     # MOD New pause/activate toggle via Enabled value
     $query = "SELECT * FROM " . $infresponders . " WHERE ResponderID = '{$Responder_ID}'";
     $result = mysql_query($query) or die("Invalid query: " . mysql_error());
     if (mysql_num_rows($result) > 0) {
         $this_row = mysql_fetch_assoc($result);
         if ($this_row['Enabled'] == "1" && $action == "pause") {
             $msg = "Responder paused.";
             $toggle_query = "UPDATE " . $infresponders . " SET Enabled = '0' WHERE ResponderID = '{$Responder_ID}'";
         } elseif ($this_row['Enabled'] == "0" && $action == "activate") {
             $msg = "Reponder re-activated.";
             $toggle_query = "UPDATE " . $infresponders . " SET Enabled = '1' WHERE ResponderID = '{$Responder_ID}'";
         }
         $tog_result = mysql_query($toggle_query) or die("Invalid query: " . mysql_error());
         inf_resp_message_box($msg);
         $action = 'list';
     $pos = strpos($subject, $DB_SpamHeader);
     if ($pos === false) {
         $spam_filtered = 0;
     } else {
         $spam_filtered = 1;
     }
 }
 if (!UserIsSubscribed($Responder_ID, $Email_Address) && !isInBlacklist($Email_Address) && $spam_filtered == 0 && isEmail($Email_Address)) {
     if ($DB_HTML_YN == 1) {
         $Set_HTML = 1;
     } else {
         $Set_HTML = 0;
     }
     # Get responder info
     # MOD for updated GetResponder function
     if (!ResponderExists($Responder_ID)) {
         admin_redirect();
     }
     $ResponderInfo = GetResponderInfo($Responder_ID);
     // $DB_OptMethod = $ResponderInfo['OptinMethod'];
     // if ($DB_OptMethod == "Double") {$DB_Confirm_Join = '1'}
     // else {$DB_Confirm_Join = '0';}
     # Setup the data
     $DB_ResponderID = $Responder_ID;
     $DB_SentMsgs = '';
     $DB_EmailAddress = $Email_Address;
     $DB_TimeJoined = time();
     $DB_Real_TimeJoined = time();
     $CanReceiveHTML = $Set_HTML;
     $DB_LastActivity = time();
     $DB_FirstName = $FirstName;
function Run_UserQuery($query)
{
    global $DB_ResponderID, $DB_ResponderName, $DB_OwnerEmail;
    global $DB_OwnerName, $DB_ReplyToEmail, $DB_MsgList, $DB_LastActivity;
    global $DB_result, $DB_LinkID, $DB_ResponderDesc, $DB_RespEnabled;
    global $Responder_ID, $action, $SearchCount;
    global $Search_EmailAddress, $Subscriber_ID, $SubsPerPage;
    global $DB_FirstName, $DB_LastName, $DB_IPaddy, $DB_Real_TimeJoined;
    if ($SubsPerPage != 0) {
        $Limitedquery = $query . " LIMIT {$SearchCount}, {$SubsPerPage}";
    } else {
        $Limitedquery = $query;
    }
    $DB_MaxList_result = mysql_query($query) or die("Invalid query: " . mysql_error());
    $DB_search_result = mysql_query($Limitedquery) or die("Invalid query: " . mysql_error());
    $Max_Results_Count = mysql_num_rows($DB_MaxList_result) - 1;
    # MOD display message if any
    if ($_SESSION['inf_resp'] != '') {
        inf_resp_message_box($_SESSION['inf_resp']);
        unset($_SESSION['inf_resp']);
    }
    if (mysql_num_rows($DB_search_result) > 0) {
        # User top template
        $alt = FALSE;
        include 'templates/listuser_top.admin.php';
        # Display the rows
        while ($search_query_result = mysql_fetch_assoc($DB_search_result)) {
            $DB_SubscriberID = $search_query_result['SubscriberID'];
            $DB_ResponderID = $search_query_result['ResponderID'];
            $DB_SentMsgs = $search_query_result['SentMsgs'];
            $DB_EmailAddress = $search_query_result['EmailAddress'];
            $DB_TimeJoined = $search_query_result['TimeJoined'];
            $DB_Real_TimeJoined = $search_query_result['Real_TimeJoined'];
            $CanReceiveHTML = $search_query_result['CanReceiveHTML'];
            $DB_LastActivity = $search_query_result['LastActivity'];
            $DB_FirstName = $search_query_result['FirstName'];
            $DB_LastName = $search_query_result['LastName'];
            $DB_IPaddy = $search_query_result['IP_Addy'];
            $DB_ReferralSource = $search_query_result['ReferralSource'];
            $DB_UniqueCode = $search_query_result['UniqueCode'];
            $DB_Confirmed = $search_query_result['Confirmed'];
            $Responder_ID = $DB_ResponderID;
            if (!ResponderExists($Responder_ID)) {
                admin_redirect();
            }
            $ResponderInfo = GetResponderInfo($Responder_ID);
            # User row template
            $alt = !$alt;
            include 'templates/listuser_row.admin.php';
        }
        # List bottom template
        include 'templates/listuser_bottom.admin.php';
        if ($SubsPerPage != 0) {
            $Search_Count_BackStr = $SearchCount - $SubsPerPage;
            $Search_Count_ForwardStr = $SearchCount + $SubsPerPage;
            if ($Search_Count_BackStr < 0) {
                $Search_Count_BackStr = 0;
            }
            if ($Search_Count_ForwardStr > $Max_Results_Count) {
                $Search_Count_ForwardStr = $Max_Results_Count;
            }
            # Back and forward buttons
            include 'templates/back_forward.admin.php';
        }
        # Add new user button
        include 'templates/addnew_button.admin.php';
    } else {
        if (!ResponderExists($Responder_ID)) {
            admin_redirect();
        }
        $ResponderInfo = GetResponderInfo($Responder_ID);
        $DB_ResponderName = $ResponderInfo['Name'];
        print "<br><center><font size=\"3\" color=\"#330000\">No subscriber(s) found for Responder '" . $DB_ResponderName . "'.</font></center><br>\n";
        print "<br>\n";
        # Add new user button
        include 'templates/addnew_button.admin.php';
    }
    # Back button
    // print "<br> \n";
    // print "<font size=\"4\" color=\"#666666\">Back to Main:</font><br>\n";
    $return_action = "list";
    include 'templates/back_button.admin.php';
}