PluginProbe
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services / 8.8.0
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services v8.8.0
8.8.0 8.7.9 8.7.8 8.7.7 8.7.6 8.7.5 8.7.4 8.7.3 8.7.2 8.7.1 8.7.0 8.6.9 8.6.8 8.6.7 8.6.6 8.6.5 8.6.4 8.6.2 8.6.1 8.6.0 8.5.9 8.5.8 8.5.7 8.5.6 8.5.5 All 536 releases
chatbot / includes / chat-sessions / reports / view / partials / chatsession-table.php

chatsession-table.php in WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services 8.8.0, at includes/chat-sessions/reports/view/partials/chatsession-table.php

198 lines 6.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if ( ! defined( 'ABSPATH' ) ) { exit; } ?>
2 <div class="qcld-session-email-notice">
3 <label class="qcld-session-email-notice__label" for="is_enabled_session_email_notice">
4 <input class="form-check-input qcld-session-email-notice__input" type="checkbox" <?php echo ( get_option( 'session_email_notification_update' ) === 'checked' ) ? 'checked' : ''; ?> role="switch" value="" id="is_enabled_session_email_notice">
5 <span class="qcld-session-email-notice__switch" aria-hidden="true"></span>
6 <span class="qcld-session-email-notice__text"><?php esc_html_e( 'Enable Email Notification for New Chat Sessions', 'chatbot' ); ?></span>
7 </label>
8 </div>
9 <div class="chatsession_table_area">
10 <div class="container-fluid my-2">
11 <div class="row">
12 <div class="col-md-6 text-left">
13 <button class="btn btn-primary" id="wpbot_submit_session_delete" name="wpbot_session_delete"><?php echo esc_html( 'Delete' ); ?></button>
14
15 <a href="<?php echo esc_url( $deleteurl ); ?>" class="btn btn-primary" ><?php echo esc_html( 'Delete All Sessions' ); ?></a>
16
17 <button class="btn btn-primary" id="wpbot_submit_session_export" name="wpbot_session_export"><?php echo esc_html( 'Export' ); ?></button>
18
19 <button class="btn btn-primary" id="wpbot_submit_session_export_all" name="wpbot_session_export_all"><?php echo esc_html( 'Export All' ); ?></button>
20 </div>
21 <div class="col-md-6">
22 <div class="text-end">
23 Filter:
24 <a href="<?php echo esc_url( admin_url( 'admin.php?page=wbcs-botsessions-page&FilterDate=LastWeek' ) ); ?>" class="btn btn-success"><?php echo esc_html( 'Last Week' ); ?></a>
25 <a href="<?php echo esc_url( admin_url( 'admin.php?page=wbcs-botsessions-page&FilterDate=LastMonth' ) ); ?>" class="btn btn-success"><?php echo esc_html( 'Last Month' ); ?></a>
26 <a href="<?php echo esc_url( admin_url( 'admin.php?page=wbcs-botsessions-page&FilterDate=Last3Months ' ) ); ?>" class="btn btn-success"><?php echo esc_html( 'Last 3 Months' ); ?></a>
27 </div>
28 </div>
29 </div>
30 </div>
31
32 <table class="table table-striped align-middle" id="chatsession-table">
33 <thead>
34 <tr class="table-primary">
35 <th class="text-center" data-dt-order="disable">
36 <input type="checkbox" id="wpbot_checked_all" />
37 </th>
38 <th class="text-left">
39 <?php echo esc_html__( 'Date', 'chatbot' ); ?>
40 </th>
41 <th class="text-left" width="100px">
42 <?php echo esc_html__( 'Interaction Count', 'chatbot' ); ?>
43 </th>
44 <th class="text-left">
45 <?php echo esc_html__( 'Session ID', 'chatbot' ); ?>
46 </th>
47 <th class="text-left">
48 <?php echo esc_html__( 'Name', 'chatbot' ); ?>
49 </th>
50 <th class="text-left">
51 <?php echo esc_html__( 'Email', 'chatbot' ); ?>
52 </th>
53 <th class="text-left">
54 <?php echo esc_html__( 'Phone', 'chatbot' ); ?>
55 </th>
56 <th class="text-left" data-dt-order="disable">
57 <?php echo esc_html__( 'Action', 'chatbot' ); ?>
58 </th>
59 </tr>
60 </thead>
61 <tbody>
62
63 <!-- Table Body -->
64 <?php
65 foreach ( $result as $row ) {
66 $url = admin_url( 'admin.php?page=wbcs-botsessions-page&userid=' . $row->id );
67 $delurl = wp_nonce_url( admin_url( 'admin.php?page=wbcs-botsessions-page&userid=' . $row->id . '&act=delete' ), 'wpcs_delete_session_' . $row->id );
68 ?>
69 <tr>
70 <td class="text-center">
71 <input type="checkbox" name="sessions[]" class="wpbot_sessions_checkbox" value="<?php echo esc_html( $row->id ); ?>" />
72 </td>
73 <td class="text-left">
74 <a class="" data-id="<?php echo esc_attr( $row->id ); ?>" href="<?php echo esc_url( $url ); ?>"><?php echo esc_html( gmdate( 'M,d,Y h:i:s A', strtotime( $row->date ) ) ); ?></a>
75 </td>
76 <td class="text-left">
77 <?php echo esc_html( $row->interaction ); ?>
78 </td>
79 <td class="text-left">
80 <?php echo esc_html( $row->session_id ); ?>
81 </td>
82 <td class="text-left">
83 <?php echo esc_html( $row->name ); ?>
84 </td>
85 <td class="text-left">
86 <?php
87 echo esc_html( $row->email );
88 ?>
89 </td>
90 <td class="text-left">
91 <?php
92 echo esc_html( $row->phone );
93 ?>
94 </td>
95 <td class="text-left">
96 <a href="<?php echo esc_url( $delurl ); ?>" class="btn btn-danger" onclick="return confirm('Are you sure?')"><?php echo esc_html( 'Delete' ); ?></a>
97 <span class="btn btn-secondary forward_session" data-id="<?php echo esc_attr($row->session_id); ?>"><?php echo esc_html( 'Forward Session' ); ?></span>
98 <span class="btn btn-info show_details_click" data-id="<?php echo esc_attr( $row->id ); ?>"><?php echo esc_html( 'View Chat & Reply' ); ?></span>
99
100 </td>
101 </tr>
102 <?php
103
104 } //End of ForEach
105
106 ?>
107 <!-- Table Body Ends Here-->
108
109 </tbody>
110 </table>
111
112 </div>
113
114
115 <script>
116 document.addEventListener('DOMContentLoaded', function() {
117 if (typeof DataTable !== 'undefined') {
118 new DataTable('#chatsession-table', {
119 info: false,
120 });
121 }
122 });
123 </script>
124 <style>
125 .session_modal {
126 display: none;
127 position: fixed;
128 z-index: 100000;
129 left: 0;
130 top: 0;
131 width: 100%;
132 height: 100%;
133 overflow: auto;
134 background-color: rgba(0, 0, 0, 0.45);
135 }
136
137 #session_foward_modal .modal-content {
138 position: absolute;
139 top: 50%;
140 left: 50%;
141 transform: translate(-50%, -50%);
142 margin: 0;
143 padding: 28px 24px 24px;
144 width: calc(100% - 32px);
145 max-width: 480px;
146 height: auto;
147 max-height: none;
148 background-color: #fff;
149 border: 1px solid var(--woobot-primary-border);
150 border-radius: 12px;
151 box-shadow: 0 12px 40px rgba(var(--woobot-primary-rgb), 0.2);
152 box-sizing: border-box;
153 }
154
155 #session_foward_modal .forward_session_close {
156 position: absolute;
157 top: 10px;
158 right: 10px;
159 background: var(--woobot-primary);
160 color: #fff;
161 width: 28px;
162 height: 28px;
163 text-align: center;
164 line-height: 26px;
165 border-radius: 50%;
166 cursor: pointer;
167 font-size: 18px;
168 }
169
170 #session_foward_modal .forward_session_close:hover {
171 background: var(--woobot-primary-dark);
172 }
173 </style>
174 <div id="session_foward_modal" class="session_modal">
175 <div class="modal-content">
176 <p class="details_modal_body">
177 <div class="forward_session_close">&times;</div>
178 <input type="hidden" id="details_session_id">
179 <input type="email" id="details_session_email" class="form-control" placeholder="<?php esc_attr_e( 'Enter email to forward session details', 'chatbot' ); ?>">
180 <input type="text" id="details_session_subject" class="form-control mt-2" placeholder="<?php esc_attr_e( 'Enter email subject', 'chatbot' ); ?>">
181 <a class="btn btn-primary mt-2" id="qcld_details_forward_submit"><?php echo esc_html( 'Forward' ); ?></a>
182 </p>
183 </div>
184 </div>
185 <div id="session_details_modal" class="session_modal">
186 <div class="modal-content">
187 <div class="details_session_close">&times;</div>
188 <div class="details_modal_body">
189 <div class="loader-mask">
190 <div class="loader">
191 <div></div>
192 <div></div>
193 </div>
194 </div>
195 </div>
196 </div>
197 </div>
198