| 1 |
<?php if ( ! defined( 'ABSPATH' ) ) { exit; } ?> |
| 2 |
|
| 3 |
<?php |
| 4 |
if ( ! empty( $result ) ) : |
| 5 |
$deleteurl = admin_url( 'admin.php?page=wbcs-botsessions-notansweredpage&action=deleteall' ); |
| 6 |
?> |
| 7 |
|
| 8 |
<br> |
| 9 |
|
| 10 |
<a href="<?php echo esc_url( $deleteurl ); ?>" class="btn btn-primary" > |
| 11 |
<i class="bi bi-trash me-1"></i> <?php echo esc_html( 'Delete All Records' ); ?> |
| 12 |
</a> |
| 13 |
|
| 14 |
<a href="<?php echo esc_url( admin_url( 'admin.php?page=wbcs-botsessions-page' ) ); ?>" class="btn btn-secondary"> |
| 15 |
<i class="bi bi-gear-wide-connected me-1"></i> Conversation List |
| 16 |
</a> |
| 17 |
|
| 18 |
<div class="qchero_slider_table_area qcld-session-yes-record-found"> |
| 19 |
|
| 20 |
<table class="table table-bordered"> |
| 21 |
<thead> |
| 22 |
<tr class="table-primary"> |
| 23 |
<th class="text-center"> |
| 24 |
<?php echo esc_html__( 'User\'s Query', 'chatbot' ); ?> |
| 25 |
</th> |
| 26 |
<th class="text-center"> |
| 27 |
<?php echo esc_html__( 'Count', 'chatbot' ); ?> |
| 28 |
</th> |
| 29 |
<th class="text-center"> |
| 30 |
<?php echo esc_html__( 'Action', 'chatbot' ); ?> |
| 31 |
</th> |
| 32 |
</tr> |
| 33 |
</thead> |
| 34 |
<tbody> |
| 35 |
|
| 36 |
<?php |
| 37 |
foreach ( $result as $row ) : |
| 38 |
|
| 39 |
$delurl = wp_nonce_url( admin_url( 'admin.php?page=wbcs-botsessions-notansweredpage&id=' . $row->id . '&act=delete' ), 'wpcs_delete_session_' . $row->id ); |
| 40 |
?> |
| 41 |
|
| 42 |
<tr> |
| 43 |
<td class="text-left"><?php echo esc_html( $row->query ); ?></td> |
| 44 |
<td class="text-center"><?php echo esc_html( $row->count ); ?></td> |
| 45 |
<td class="text-center"> |
| 46 |
<a href="<?php echo esc_html( $delurl ); ?>" class="btn btn-danger" onclick="return confirm('are you sure?')"> |
| 47 |
<i class="bi bi-trash me-1"></i> <?php echo esc_html( 'Delete' ); ?> |
| 48 |
</a> |
| 49 |
</td> |
| 50 |
</tr> |
| 51 |
|
| 52 |
<?php endforeach; ?> |
| 53 |
|
| 54 |
</tbody> |
| 55 |
</table> |
| 56 |
|
| 57 |
</div> |
| 58 |
|
| 59 |
<?php else : ?> |
| 60 |
<div class="qcld-session-no-record-found" style="text-align: center;background: #fff;margin-top: 10px;padding: 20px;font-size: 20px;">No record Found!</div> |
| 61 |
<?php endif; ?> |