--- /dev/null
+<?php
+/**
+ * Gaslight Media Server Bandwidth - Stand Alone
+ * Server Bandwidth Support Abstract
+ *
+ * PHP version 5.5
+ *
+ * @category glmWordPressPlugin
+ * @package glmServerStats
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release serverBandwidthSupport.php,v 1.0 2014/10/31 19:31:47 cscott Exp $
+ * @link http://dev.gaslightmedia.com/
+ */
+
+/*
+ * This class provides support for the reporting of server bandwidth stats
+ * for simple day and month values as well as detailed lists of values for
+ * a day (by 10 min intervals), month (by days), or 2 years (by months).
+ *
+ */
+class glmInfoNotifications
+{
+ public function model()
+ {
+ $messages = false;
+ $url = 'http://develop.localhost/wp-admin/admin-ajax.php?action=glm_members_admin_ajax&glm_action=relay';
+
+ // Get the messages from the main plugin.
+ $fetchData = wp_remote_get( $url );
+ $messageData = wp_remote_retrieve_body( $fetchData );
+ $status = wp_remote_retrieve_response_code( $fetchData);
+
+ if ( $status == 200 ) {
+ $messages = json_decode( $messageData, true );
+ }
+
+ // If there's no message id then only get the first one.
+ $messages = array_slice( $messages, 0, 1 );
+
+ // Compile template data
+ $templateData = array(
+ 'messages' => $messages,
+ 'status' => $status,
+ );
+
+ // Return status, suggested view, and data to controller
+ return array(
+ 'view' => 'glmInfoNotifications',
+ 'data' => $templateData
+ );
+ }
+}