Beispiel #1
0
     $tp = $toPro && $toNotPro ? NULL : (bool) $toPro;
     foreach ($selectedProfs as $prof) {
         if (!$prof || $prof == 'NULL' || $prof == 'empty') {
             $aProfs = NULL;
             break;
         }
         $is_group = 0;
         if (substr($prof, 0, 2) == '::') {
             $id = substr($prof, 2);
             $is_group = 1;
         } else {
             $id = intval($prof);
         }
         $aProfs[] = array('id' => $id, 'is_group' => $is_group, 'to_pro' => $tp);
     }
     $message_id = $messages->masssendToFreelancers(stripslashes($msg), $tp, $aProfs, $toEmail, $files);
 } else {
     if ($toWrk) {
         if (!($message_id = $messages->masssendToEmployers(stripslashes($msg), NULL, $toEmail, $files))) {
             $error = "¬нутренн¤¤ ошибка";
         }
     } else {
         if ($toLogins) {
             $recipients = array_map('trim', explode(',', $_POST['logins']));
             if (!($message_id = $messages->masssendTo(stripslashes($msg), $recipients, $toEmail, $files))) {
                 $error = "¬нутренн¤¤ ошибка";
             }
         } else {
             if (!($message_id = $messages->masssendToAll(stripslashes($msg), NULL, $toEmail, $files))) {
                 $error = "¬нутренн¤¤ ошибка";
             }