示例#1
0
         }
         $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) {
                 foreach ($PROXY_IDS as $proxy_id) {
                     $mail_list->promote_administrator($proxy_id);
                 }
             }
         }
         $SUCCESS++;
         $SUCCESSSTR[] = "You have successfully promoted <strong>" . $total_updated . " member" . ($total_updated != 1 ? "s" : "") . "</strong> in the <strong>" . html_encode($community_details["community_title"]) . "</strong> community to community administrators. They will now be able to perform all of the same actions as you in this 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 promoting these community members; the MEdTech Unit has been informed of this error, please try again later.";
         application_log("error", "Unable to promote members from community_id [" . $COMMUNITY_ID . "]. Database said: " . $db->ErrorMsg());
     }
     break;
 default:
     /**
      * This should never happen, as I'm checking the member_action above.
      */