Sindbad~EG File Manager

Current Path : /home/copmadinaarea/public_html/wp-content__80fcb17/plugins/mozable/
Upload File :
Current File : /home/copmadinaarea/public_html/wp-content__80fcb17/plugins/mozable/push.php

<?php
defined('ABSPATH') or die("Cannot access pages directly.");

global $wpdb;
$table_name = $wpdb->prefix . "moz_push";

$push_sent = $wpdb->get_results("SELECT * FROM $table_name ORDER BY time DESC LIMIT 100", ARRAY_A);

?>

<script>
    var url_form_ajax = '<?php echo plugins_url('ajax.php', __FILE__); ?>?type=save_push';
</script>


<div class="row" style="margin-top:30px;">
    <div class="col-md-4">

        <h4>Send a new push notiication</h4>
        <form id="push_form">


            <div class="form-group">
                <label for="app_name">Server API KEY <span class="description">*</span></label>
                <?php if (isset($push_sent[0])): ?>
                    <input class="form-control" type="text" id="apiKey" name="api_key"value="<?php echo $push_sent[0]['api_key']; ?>"/>
                <?php else: ?>
                    <input class="form-control" type="text" id="apiKey" name="api_key" />
                <?php endif; ?>
                <small><a href="https://www.youtube.com/watch?v=Wp9tELVDgjA&feature=youtu.be" target="_blank">How to get it?</a></small>
            </div>

            <div class="form-group">
                <label for="title">Title <span class="description">*</span></label>
                <input class="form-control" type="text" id="title" name="title" />
            </div>

            <div class="form-group">
                <label for="body">Message <span class="description">*</span></label>
                <input class="form-control" type="text" id="body" name="message" />
            </div>

            <button id="sendButton" class="btn btn-primary" >
                <span id="sendButtonText">Send Push</span>
            </button>
        </form>

    </div>

    <div class="col-md-8">

        <h4>Push sent</h4>

        <table class="table">
            <tr>
                <th>Title</th>
                <th>Message</th>
                <th>Time</th>
            </tr>
            <?php if ($push_sent): ?>
                <?php foreach ($push_sent as $push): ?>
                    <tr>
                        <td><?php echo $push['title']; ?></td>
                        <td><?php echo $push['message']; ?></td>
                        <td><?php echo $push['time']; ?></td>
                    </tr>
                <?php endforeach; ?>
            <?php endif; ?>
        </table>

    </div>
</div>

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists