} } $SUCCESS++; $SUCCESSSTR[] = "You have successfully removed <strong>" . $total_deleted . " member" . ($total_deleted != 1 ? "s" : "") . "</strong> from the <strong>" . html_encode($community_details["community_title"]) . "</strong> community.<br /><br />You will now be redirected back to the Manage Members page; this will happen <strong>automatically</strong> in 5 seconds or <a href=\"" . ENTRADA_URL . "/" . $MODULE . "?section=members&community=" . $COMMUNITY_ID . "\" style=\"font-weight: bold\">click here</a> to continue."; } else { $ERROR++; $ERRORSTR[] = "There was a problem removing these community members from the system; the MEdTech Unit has been informed of this error, please try again later."; application_log("error", "Unable to remove members from community_id [" . $COMMUNITY_ID . "]. Database said: " . $db->ErrorMsg()); } break; case "deactivate": if ($db->AutoExecute("community_members", array("member_active" => 0), "UPDATE", "`community_id` = " . $db->qstr($COMMUNITY_ID) . " AND `proxy_id` IN ('" . implode("', '", $PROXY_IDS) . "') AND `member_active` = '1' AND `member_acl` = '0'") && ($total_updated = $db->Affected_Rows())) { if ($MAILING_LISTS["active"]) { $mail_list = new MailingList($COMMUNITY_ID); foreach ($PROXY_IDS as $proxy_id) { $mail_list->deactivate_member($proxy_id); } } $SUCCESS++; $SUCCESSSTR[] = "You have successfully deactivated <strong>" . $total_updated . " member" . ($total_updated != 1 ? "s" : "") . "</strong> in the <strong>" . html_encode($community_details["community_title"]) . "</strong> community.<br /><br />You will now be redirected back to the Manage Members page; this will happen <strong>automatically</strong> in 5 seconds or <a href=\"" . ENTRADA_URL . "/" . $MODULE . "?section=members&community=" . $COMMUNITY_ID . "\" style=\"font-weight: bold\">click here</a> to continue."; } else { $ERROR++; $ERRORSTR[] = "There was a problem deactivating these community members in the system; the MEdTech Unit has been informed of this error, please try again later."; application_log("error", "Unable to deactivate members from community_id [" . $COMMUNITY_ID . "]. Database said: " . $db->ErrorMsg()); } break; case "promote": if ($db->AutoExecute("community_members", array("member_acl" => 1), "UPDATE", "`community_id` = " . $db->qstr($COMMUNITY_ID) . " AND `proxy_id` IN ('" . implode("', '", $PROXY_IDS) . "') AND `member_active` = '1' AND `member_acl` = '0'") && ($total_updated = $db->Affected_Rows())) { if ($MAILING_LISTS["active"]) { $mail_list = new MailingList($COMMUNITY_ID); if ($mail_list) {