| 1 |
<section id="account-list"> |
| 2 |
<?php $accounts = WPRAccount::accountsByPlugname($this->settings); ?> |
| 3 |
<div class="account-list-container custom-container text-center"> |
| 4 |
<h4>Accounts associated with this website</h4> |
| 5 |
<div class="table-container"> |
| 6 |
<table> |
| 7 |
<tr><th>Account Email</th><th>Last Synced At</th><th></th></tr> |
| 8 |
<?php |
| 9 |
$nonce = wp_create_nonce('bvnonce'); |
| 10 |
foreach($accounts as $key => $value) { |
| 11 |
?> |
| 12 |
<form action="" method="post"> |
| 13 |
<input type='hidden' name='bvnonce' value="<?php echo esc_attr($nonce); ?>" /> |
| 14 |
<input type='hidden' name='pubkey' value="<?php echo esc_attr($key); ?>" /> |
| 15 |
<tr> |
| 16 |
<td><?php echo esc_html($value['email']); ?></td> |
| 17 |
<td><?php echo esc_html(date('Y-m-d H:i:s', $value['lastbackuptime'])); ?></td> |
| 18 |
<td><input type='submit' class="btn btn-primary" style="font-size: 12px" value='Disconnect' name='disconnect' onclick="return confirm('Are you sure?');"></td> |
| 19 |
</tr> |
| 20 |
</form> |
| 21 |
<?php } ?> |
| 22 |
</table> |
| 23 |
</div> |
| 24 |
<div style="margin: 15px;"> |
| 25 |
<a class="btn btn-primary" href="<?php echo esc_url($this->bvinfo->appUrl()); ?>" target="_blank">Visit Dashboard</a> |
| 26 |
<a class="btn btn-primary" style="margin-left: 15px;" href="<?php echo esc_url($this->mainUrl('&add_account=true')); ?>">Connect New Account</a> |
| 27 |
</div> |
| 28 |
</div> |
| 29 |
</section> |