account_tab_key); if(isset($_POST['selfpushoptions']) && !empty($_POST['selfpushoptions'])){ if(! wp_verify_nonce( $_POST['_wpnonce'], 'selfpushoptions' )) { print 'Sorry, your nonce did not verify. Please try again.'; exit; } $postid = intval($_POST['selfpushoptions']); $disableBulkSend = $accountOptions[pw_mobile_app_settings::$disableBulkSend]; $disableNotificationCache = $accountOptions[pw_mobile_app_settings::$disableNotificationCache]; $wp_server_posts = new WP_JSON_Posts(new WP_JSON_Server()); $response = $wp_server_posts->get_post($postid, 'view'); if(isset($response) && isset($response->data)){ $wppost = $response->data; } $title = $wppost['title']; $excerpt = $wppost['pwapp_excerpt']; $postimage = $wppost['featuredimage']; if(empty($postimage)){ $postimage = $wppost['pwapp_post_image']; } $postlink = $wppost['link']; $cache = "yes"; $postType = "post"; if(isset($disableNotificationCache) && $disableNotificationCache == 'yes'){ $cache = "no"; } if(!empty($title)){ //echo "Bulk Send'".!($disableBulkSend == 1)."'"; if(isset($_POST['immediate']) && $_POST['immediate'] == '1'){ _e('Push notification Logs','androapp'); echo "
";
require_once PW_MOBILE_PATH.'gcm/send_message.php';
sendPushNotification(array("post_id" => $postid,
"title" => $title, "excerpt" =>$excerpt,
"postImage" => $postimage, "link" => $postlink, "cache" => $cache,
"postType" => $postType,
"notification_type" => "stack"),
$accountOptions[ANDROAPP_GCM_API_KEY], !($disableBulkSend == 1));
echo ""; print_r($result); echo ""; echo $last7days . $thismonth . $lastmonth.$alltime; if(empty($result)){ echo "".__('No Records found for the duration','androapp')." "; }else{ ?>
| * | $row->title | $row->created_at | $row->eligible | "; echo "$row->bulk_sent | $row->success | $row->notRegistered | $row->mismatchsenderid | $row->other | $row->status | "; } ?>
|---|