<?php

require_once 'iosPushUniversal.php';
$obj = new iosPushUniversal();
$registatoin_ids = array('68141f71cbae1c493318f17b132215223655c27a2670a580dee074c4cdf96028');
$msg = "Hello testing 123";
$obj->sendIosPush($registatoin_ids, $msg);
Esempio n. 2
0
if ($result) {
    if ($row_get_gcm_id['mobile_os_type'] == 'Android') {
        $logger->write("INFO :", "inside android" . $row_get_gcm_id['gcm_regid']);
        $registatoin_ids = array($row_get_gcm_id['gcm_regid']);
        $message = array("msg" => "A patient of yours has been edited", "flag_push" => "Message");
        $logger->write("INFO :", "Message*****" . $message);
        //$result1 = $this->gcm->send_notification($registatoin_ids, $message);
        $result = $gcm->send_notification($registatoin_ids, $message);
        $logger->write("INFO :", "result*****" . $result);
    } else {
        if ($row_get_gcm_id['mobile_os_type'] == 'IOS') {
            $logger->write("INFO :", "inside IOS" . $row_get_gcm_id['gcm_regid']);
            $registatoin_ids = array($row_get_gcm_id['gcm_regid']);
            $message = "A patient of yours has been edited";
            $extra = array("msg" => "A patient of yours has been edited", "flag_push" => "Message");
            $result_ios = $ios_push->sendIosPush($registatoin_ids, $message, $extra);
            $this->logger->write("INFO :", "inside IOS result" . $result_ios);
        }
    }
    send_msg($reg_mob_number, $sms_msg_referring_doc);
    send_msg($ref_mob_number, $sms_msg_referred_doc);
    if ($reg_email != '') {
        $email_sender->send_email($reg_email, $sms_msg_referring_doc);
    }
    if ($ref_email != '') {
        $email_sender->send_email($ref_email, $sms_msg_referred_doc);
    }
    $success = array('status' => "Success", "msg" => "Patient information updated successfully");
    echo json_encode($success);
} else {
    $success = array('status' => "Failure", "msg" => "Patient information could not be updated.Please try again later");