コード例 #1
0
ファイル: SMS.php プロジェクト: ksecor/civicrm
 /**
  * process the form after the input has been submitted and validated
  *
  * @access public
  * @return None
  */
 public function postProcess()
 {
     $smsNumber = null;
     if ($this->_single) {
         $smsNumber = $this->controller->exportValue('SMS', 'to');
     }
     $message = $this->controller->exportValue('SMS', 'message');
     require_once 'CRM/SMS/BAO/History.php';
     list($total, $sent, $notSent) = CRM_SMS_BAO_History::send($this->_contactIds, $message, $smsNumber);
     $status = array('', ts('Total Selected Contact(s): %1', array(1 => $total)));
     if ($sent) {
         $status[] = ts('SMS sent to contact(s): %1', array(1 => $sent));
     }
     if ($notSent) {
         $status[] = ts('SMS not sent to contact(s): %1', array(1 => $notSent));
     }
     CRM_Core_Session::setStatus($status);
 }