# wpremote/4.82/admin/components/list_accounts.php

The WP Remote WordPress Plugin, version 4.82. 29 lines.

- Page: https://pluginprobe.com/plugins/wpremote/4.82/code/admin/components/list_accounts.php
- Raw: https://pluginprobe.com/plugins/wpremote/4.82/raw/admin/components/list_accounts.php
- Modified: 2022-09-08T11:22:26+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wpremote/4.82/code/admin/components/list_accounts.php#L10-L20`.

```php
<section id="account-list">
	<?php $accounts = WPRAccount::accountsByPlugname($this->settings); ?>
	<div class="account-list-container custom-container text-center">
		<h4>Accounts associated with this website</h4>
		<div class="table-container">
			<table>
				<tr><th>Account Email</th><th>Last Synced At</th><th></th></tr>
				<?php
					$nonce = wp_create_nonce('bvnonce');
					foreach($accounts as $key => $value) {
				?>
					<form action="" method="post">
						<input type='hidden' name='bvnonce' value="<?php echo esc_attr($nonce); ?>" />
						<input type='hidden' name='pubkey' value="<?php echo esc_attr($key); ?>" />
						<tr>
							<td><?php echo esc_html($value['email']); ?></td>
							<td><?php echo esc_html(date('Y-m-d H:i:s', $value['lastbackuptime'])); ?></td>
							<td><input type='submit' class="btn btn-primary" style="font-size: 12px" value='Disconnect' name='disconnect' onclick="return confirm('Are you sure?');"></td>
						</tr>
					</form>
				<?php } ?>
			</table>
		</div>
		<div style="margin: 15px;">
			<a class="btn btn-primary" href="<?php echo esc_url($this->bvinfo->appUrl()); ?>" target="_blank">Visit Dashboard</a>
			<a class="btn btn-primary" style="margin-left: 15px;" href="<?php echo esc_url($this->mainUrl('&add_account=true')); ?>">Connect New Account</a>
		</div>
	</div>
</section>
```
