public static function pusher4PopUp($ids) { // IMBAuth::checkOAuth(); // pr($_POST); if ($ids == "") { die("Please insert Customer ID"); } // if($camp_id == "")die("Please insert Campaign ID"); $ps = new PushNotPopUp(); // $arrPS = $ps->getWhere("camp_app_popup = 1 AND camp_active = 1 ORDER BY camp_id DESC LIMIT 0,1"); //berdasarkan request 27 Jan 2016, skrg bisa multiple send push not $arrPS = $ps->getWhere("camp_app_popup = 1 AND camp_active = 1 ORDER BY camp_id DESC"); if (count($arrPS) > 0) { foreach ($arrPS as $ps) { // $ps = $arrPS[0]; // $exp = explode(",", $ids); // $arrAcc = array(); // foreach ($exp as $ac) { // $arrAcc[] = trim(rtrim($ac)); // } //dijadikan singular... $arrAcc = array(); $arrAcc[] = $ids; $_POST['no_echo'] = 1; //from acc get device ID Pusher::sendUsingAccountArray($arrAcc, $ps, 0); //1 for testing } } }