| 1 |
<?php |
| 2 |
$connected = sendwp_client_connected(); |
| 3 |
$forwarding = sendwp_forwarding_enabled(); |
| 4 |
?> |
| 5 |
|
| 6 |
<div class="sendwp-page"> |
| 7 |
|
| 8 |
<img src="<?php echo \SendWP\Assets::image_url('logo-render.png'); ?>" alt="SendWP" class="logo" /> |
| 9 |
|
| 10 |
<?php if(!$connected) { ?> |
| 11 |
<div id="sendwp-connect"> |
| 12 |
<p><?php _e('Your site is currently not connected to sendwp.com.', 'sendwp'); ?></p> |
| 13 |
<form method="POST" action="<?php echo sendwp_get_server_url(); ?>_/signup"> |
| 14 |
<input type="hidden" name="client_name" value="<?php echo sendwp_get_client_name(); ?>"> |
| 15 |
<input type="hidden" name="client_url" value="<?php echo sendwp_get_client_url(); ?>"> |
| 16 |
<input type="hidden" name="client_redirect" value="<?php echo sendwp_get_client_redirect(); ?>"> |
| 17 |
<input type="hidden" name="client_secret" value="<?php echo sendwp_get_client_secret(); ?>"> |
| 18 |
<button type="submit" class="button button-primary"> |
| 19 |
<?php _e('Connect to SendWP', 'sendwp'); ?> |
| 20 |
</button> |
| 21 |
</form> |
| 22 |
</div> |
| 23 |
<?php } else { ?> |
| 24 |
<div id="sendwp-enabled"> |
| 25 |
<label class="switch" id="sendwp-enabled-button"> |
| 26 |
<input type="checkbox" id="sendwp-enabled-checkbox" <?php print $forwarding ? 'checked' : ''; ?>/> |
| 27 |
<span class="slider round"></span> |
| 28 |
</label> |
| 29 |
<span id="sendwp-enabled-status"><?php print $forwarding ? $vars['enabled'] : $vars['disabled']; ?></span> |
| 30 |
</div> |
| 31 |
<?php } ?> |
| 32 |
<hr /> |
| 33 |
|
| 34 |
<p> |
| 35 |
<strong>Questions?</strong> Get help at <a href="https://sendwp.com/account/get-help">https://sendwp.com/account/get-help</a> |
| 36 |
</p> |
| 37 |
|
| 38 |
<!-- spoiler --> |
| 39 |
<div id="spoiler-block"> |
| 40 |
<span id="spoiler-title">Debug Info<span id="spoiler-arrow" class="down"></span></span> |
| 41 |
<div id="spoiler-content" class="closed"> |
| 42 |
<ul> |
| 43 |
<li>Server URL: <?php echo sendwp_get_server_url(); ?></li> |
| 44 |
<li>Client Name: <?php echo sendwp_get_client_name(); ?></li> |
| 45 |
<li>Client URL: <?php echo sendwp_get_client_url(); ?></li> |
| 46 |
<li>Client Redirect: <?php echo sendwp_get_client_redirect(); ?></li> |
| 47 |
<li>Client Secret: <?php echo sendwp_get_client_secret(); ?></li> |
| 48 |
<li>Authorization Hash: <?php echo sendwp_generate_hash() ?> </li> |
| 49 |
<li>Connection Status: <?php print $connected ? 'Connected' : 'Not Connected'; ?></li> |
| 50 |
<li>Forwarding Status: <?php print $forwarding ? 'Enabled' : 'Disabled'; ?></li> |
| 51 |
<li>Last Check In: <?php echo sendwp_last_pulse(); ?></li> |
| 52 |
<li>Last Result: <?php echo sendwp_last_pulse_result(); ?></li> |
| 53 |
</ul> |
| 54 |
</div> |
| 55 |
</div> |
| 56 |
|
| 57 |
</div> |
| 58 |
<!-- end of main content --> |