<?php
?>
<br><br><br>

<div>
    <h1>Sync Campaigns</h1>
    <button id="btSendCronC" class="button button-primary">Sync now</button> <span style="line-height: 28px; margin-left: 15px;" id="cronMSGC"></span><br><br>
    <textarea id="campaign_print_debug_cronC" rows="10" style="width: 80%;"></textarea>
</div>

<script type="text/javascript">
    jQuery(function(){
        jQuery("#btSendCronC").click(function(e){
            jQuery("#cronMSGC").html("Waiting, sync in progress...");
            jQuery("#btSendCronC").attr("disabled","disabled");
            e.preventDefault();
            jQuery.get("<?php echo get_bloginfo('wpurl');?>/campaign_cron?t=c",{},function(data){
                jQuery("#campaign_print_debug_cronC").val(data).html(data);
                jQuery("#btSendCronC").removeAttr("disabled");
                jQuery("#cronMSGC").html("");
            });
        });
    });
</script>
