| @@ -17,13 +17,13 @@ | ||
| 17 | 17 | elseif(isset($_GET['page']) && $_GET['page']=='simple-text-response' && isset($_GET['action']) && $_GET['action']=='import'): |
| 18 | 18 | |
| 19 | 19 | do_action('qcld_str_import'); |
| 20 | 20 | |
| 21 | - elseif(isset($_GET['action']) && wp_unslash($_GET['action'])=='manage-categories'): | |
| 21 | + elseif(isset($_GET['action']) && $_GET['action']=='manage-categories'): | |
| 22 | 22 | |
| 23 | 23 | include_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH.'/includes/templates/manage-categories.php'); |
| 24 | 24 | |
| 25 | - elseif(isset($_GET['action']) && wp_unslash($_GET['action'])=='edit'): | |
| 25 | + elseif(isset($_GET['action']) && $_GET['action']=='edit'): | |
| 26 | 26 | |
| 27 | 27 | if(class_exists('Qcld_str_pro')): |
| 28 | 28 | do_action('qcld_str_pro_stredit'); |
| 29 | 29 | else: |
| @@ -28,20 +28,19 @@ | ||
| 28 | 28 | do_action('qcld_str_pro_stredit'); |
| 29 | 29 | else: |
| 30 | 30 | |
| 31 | 31 | $hasEdit = false; |
| 32 | - if(isset($_GET['query']) && wp_unslash($_GET['query'])!=''){ | |
| 32 | + if(isset($_GET['query']) && $_GET['query']!=''){ | |
| 33 | 33 | $hasEdit = true; |
| 34 | - $id = sanitize_text_field(wp_unslash($_GET['query'])); | |
| 34 | + $id = sanitize_text_field($_GET['query']); | |
| 35 | 35 | $table = $wpdb->prefix.'wpbot_response'; |
| 36 | - $data = $wpdb->get_row($wpdb->prepare("select * from {$table} where id = %d", $id)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, PluginCheck.Security.DirectDB.UnescapedDBParameter | |
| 36 | + $data = $wpdb->get_row($wpdb->prepare("select * from $table where id = %d", $id)); //DB Call OK, No Caching OK | |
| 37 | 37 | } |
| 38 | 38 | ?> |
| 39 | 39 | <div class="qcld-wp-chatbot-wrap-header"> |
| 40 | 40 | |
| 41 | - <div class="qcld-wp-chatbot-wrap-header-logo"><a href="#" class="qcld-wp-chatbot-wrap-site__logo"><img src="<?php echo esc_url( QCLD_wpCHATBOT_IMG_URL . '/chatbot.png' ); ?>" alt="Dialogflow CX"> WPBot Control Panel </a> | |
| 42 | - <p><strong>Core Version:</strong> v<?php echo esc_html( QCLD_wpCHATBOT_VERSION ); ?></p> | |
| 43 | - </div> | |
| 41 | + <a href="#" class="qcld-wp-chatbot-wrap-site__logo"><img style="width:100%" src="<?php echo esc_url( QCLD_wpCHATBOT_IMG_URL . '/chatbot.png' ); ?>" alt="Dialogflow CX"> WPBot Control Panel </a> | |
| 42 | + <p><strong>Core Version:</strong> v<?php echo QCLD_wpCHATBOT_VERSION; ?></p> | |
| 44 | 43 | <ul class="qcld-wp-chatbot-wrap-version-wrapper"> |
| 45 | 44 | <li> |
| 46 | 45 | <a class="wpchatbot-Upgrade" href="https://www.wpbot.pro/" target="_blank">Upgrade To Pro</a> |
| 47 | 46 | |
| @@ -124,10 +123,10 @@ | ||
| 124 | 123 | <?php else: ?> |
| 125 | 124 | |
| 126 | 125 | <div class="qcld-wp-chatbot-wrap-header"> |
| 127 | 126 | |
| 128 | - <a href="#" class="qcld-wp-chatbot-wrap-site__logo"><img src="<?php echo esc_url( QCLD_wpCHATBOT_IMG_URL . '/chatbot.png' ); ?>" alt="Dialogflow CX"> WPBot Control Panel </a> | |
| 129 | - <p><strong>Core Version:</strong> v<?php echo esc_html( QCLD_wpCHATBOT_VERSION ); ?></p> | |
| 127 | + <a href="#" class="qcld-wp-chatbot-wrap-site__logo"><img style="width:100%" src="<?php echo esc_url( QCLD_wpCHATBOT_IMG_URL . '/chatbot.png' ); ?>" alt="Dialogflow CX"> WPBot Control Panel </a> | |
| 128 | + <p><strong>Core Version:</strong> v<?php echo QCLD_wpCHATBOT_VERSION; ?></p> | |
| 130 | 129 | <ul class="qcld-wp-chatbot-wrap-version-wrapper"> |
| 131 | 130 | <li> |
| 132 | 131 | <a class="wpchatbot-Upgrade" href="https://www.wpbot.pro/" target="_blank">Upgrade To Pro</a> |
| 133 | 132 | |
| @@ -185,21 +184,9 @@ | ||
| 185 | 184 | <input id="qc_bot_str_field_response" type="checkbox" name="qc_bot_str_fields[]" value="response" <?php echo (!$fields?'checked="checked"':''); ?> <?php echo ($fields && in_array('response', $fields)?'checked="checked"':''); ?> /> |
| 186 | 185 | <br><i><?php esc_html_e('Please check/uncheck to allow/disallow searching in that fields', 'chatbot'); ?></i> |
| 187 | 186 | </td> |
| 188 | 187 | </tr> |
| 189 | - <?php | |
| 190 | - $current_user = wp_get_current_user(); | |
| 191 | - if ( in_array( 'administrator', $current_user->roles )) { | |
| 192 | - ?> | |
| 193 | - <tr valign="top"> | |
| 194 | - <th scope="row"><?php echo esc_html( 'Allow Author & Editor to edit STR' ); ?></th> | |
| 195 | - <td> | |
| 196 | - <input id="qc_bot_str_allow_author_editor" type="checkbox" name="qc_bot_str_allow_author_editor" value="1" <?php echo ( get_option( 'qc_bot_str_allow_author_editor' ) && get_option( 'qc_bot_str_allow_author_editor' ) == 1 ? 'checked="checked"' : '' ); ?> /> | |
| 197 | - <label for="qc_bot_str_allow_author_editor"><?php echo esc_html( 'Allow Author & Editor to edit STR' ); ?></label> | |
| 198 | - <br><i><?php echo esc_html( 'Please enable to allow Author & Editor to edit STR.' ); ?></i> | |
| 199 | - </td> | |
| 200 | - </tr> | |
| 201 | - <?php } ?> | |
| 188 | + | |
| 202 | 189 | <tr valign="top"> |
| 203 | 190 | <th scope="row"></th> |
| 204 | 191 | <td> |
| 205 | 192 | <input type="submit" class="button button-primary" name="submit" id="submit" value="Save Settings"> |
| @@ -226,9 +213,9 @@ | ||
| 226 | 213 | |
| 227 | 214 | |
| 228 | 215 | |
| 229 | 216 | </div> |
| 230 | - <div class="qcld-show-more-show-more"><div class="Expandmore">Expand for More Options<span>+</span></div></div> | |
| 217 | + <div class="qcld-show-more-show-more"><i class="fa fa-plus-circle" aria-hidden="true"></i></div> | |
| 231 | 218 | </div> |
| 232 | 219 | |
| 233 | 220 | <div id="poststuff"> |
| 234 | 221 | <div id="post-body" class="metabox-holder"> |
| @@ -250,9 +237,56 @@ | ||
| 250 | 237 | </div> |
| 251 | 238 | <?php endif; ?> |
| 252 | 239 | |
| 253 | 240 | |
| 241 | +<div id="qcld-quick-flyout" > | |
| 242 | + <div class="qcld-quick-flyout-items"> | |
| 243 | + <a href="https://wpbot.pro/docs/knowledgebase/getting-started-with-chatbot/" target="_blank" class="qcld-quick-flyout-button qcld-quick-flyout-item qcld-quick-flyout-premium" rel="noopener noreferrer" target="_blank" style="transition-delay: 0ms;"> | |
| 244 | + <div class="qcld-quick-flyout-label"> | |
| 245 | + <div>Getting Started</div> | |
| 246 | + </div> | |
| 247 | + <i class="dashicons dashicons-admin-home"></i> | |
| 248 | + </a> | |
| 249 | + <a href="https://wpbot.pro/docs/kb-sections/chatbot-faqs/" target="_blank" class="qcld-quick-flyout-button qcld-quick-flyout-item" rel="noopener noreferrer" target="_blank" style="transition-delay: 60ms;"> | |
| 250 | + <div class="qcld-quick-flyout-label"> | |
| 251 | + <div>FAQ</div> | |
| 252 | + </div> | |
| 253 | + <i class="dashicons dashicons-flag"></i> | |
| 254 | + </a> | |
| 255 | + <a href="https://wpbot.pro/docs/" target="_blank" class="qcld-quick-flyout-button qcld-quick-flyout-item" style="transition-delay: 90ms;"> | |
| 256 | + <div class="qcld-quick-flyout-label"> | |
| 257 | + <div>Read the Documentation</div> | |
| 258 | + </div> | |
| 259 | + <i class="dashicons dashicons-sos"></i> | |
| 260 | + </a> | |
| 261 | + <a href="https://www.wpbot.pro/free-support/" target="_blank" class="qcld-quick-flyout-button qcld-quick-flyout-item" rel="noopener noreferrer" target="_blank" style="transition-delay: 120ms;"> | |
| 262 | + <div class="qcld-quick-flyout-label"> | |
| 263 | + <div>Ask for Help</div> | |
| 264 | + </div> | |
| 265 | + <i class="dashicons dashicons-email"></i> | |
| 266 | + </a> | |
| 267 | + <a href="https://www.wpbot.pro/" target="_blank" class="qcld-quick-flyout-button qcld-quick-flyout-item" style="transition-delay: 30ms;"> | |
| 268 | + <div class="qcld-quick-flyout-label"> | |
| 269 | + <div>Check out the WPBot Demo</div> | |
| 270 | + </div> | |
| 271 | + <i class="dashicons dashicons-welcome-view-site"></i> | |
| 272 | + </a> | |
| 273 | + <a href="https://www.wpbot.pro/pricing/" target="_blank" class="qcld-quick-flyout-button qcld-quick-flyout-item qcld-quick-flyout-premium" rel="noopener noreferrer" target="_blank" style="transition-delay: 0ms;"> | |
| 274 | + <div class="qcld-quick-flyout-label"> | |
| 275 | + <div>Upgrade to Premium</div> | |
| 276 | + </div> | |
| 277 | + <i class="dashicons dashicons-star-filled"></i> | |
| 278 | + </a> | |
| 279 | + </div> | |
| 280 | + <a href="javascript:void(0);" class="qcld-quick-flyout-button qcld-quick-flyout-mascot"> | |
| 281 | + <div class="qcld-quick-flyout-label"> | |
| 282 | + <div>Start Here</div> | |
| 283 | + </div> | |
| 284 | + <img style="width:100%" src="<?php echo esc_url( QCLD_wpCHATBOT_IMG_URL . '/agent-01.png' ); ?>" alt="Dialogflow CX"> | |
| 285 | + </a> | |
| 286 | +</div> | |
| 254 | 287 | |
| 288 | + | |
| 255 | 289 | <style> |
| 256 | 290 | body { |
| 257 | 291 | background-color: #F5F7FD; |
| 258 | 292 | font-family: "DM Sans", sans-serif !important; |
| @@ -528,95 +562,184 @@ | ||
| 528 | 562 | background: #5B4E96; |
| 529 | 563 | color: #fff; |
| 530 | 564 | border: 2px solid #5B4E96; |
| 531 | 565 | } |
| 532 | -.TextResponsesouter table.widefat { | |
| 533 | - border: 1px solid #ebebeb; | |
| 566 | + | |
| 567 | +#qcld-quick-flyout { | |
| 568 | + align-items: center; | |
| 569 | + bottom: 40px; | |
| 570 | + display: flex; | |
| 571 | + flex-direction: column; | |
| 572 | + opacity: 1; | |
| 573 | + position: fixed; | |
| 574 | + right: 40px; | |
| 575 | + row-gap: 10px; | |
| 576 | + transition: opacity .2s ease-in-out; | |
| 577 | + z-index: 99999 | |
| 534 | 578 | } |
| 535 | -.TextResponsesouter .tablenav { | |
| 536 | - padding: 8px; | |
| 537 | - background: #5B4E96; | |
| 579 | + | |
| 580 | +#qcld-quick-flyout:not(.is-open) { | |
| 581 | + pointer-events: none | |
| 538 | 582 | } |
| 539 | -.TextResponsesouter span.displaying-num { | |
| 583 | + | |
| 584 | +@media (max-width:959px) { | |
| 585 | + #qcld-quick-flyout { | |
| 586 | + display: none | |
| 587 | + } | |
| 588 | +} | |
| 589 | + | |
| 590 | +#qcld-quick-flyout .qcld-quick-flyout-mascot { | |
| 591 | + align-items: center; | |
| 592 | + display: flex; | |
| 593 | + pointer-events: auto; | |
| 594 | + position: relative | |
| 595 | +} | |
| 596 | + | |
| 597 | +#qcld-quick-flyout .qcld-quick-flyout-mascot:after { | |
| 598 | + background-color: #fff; | |
| 599 | + border-radius: 50%; | |
| 600 | + bottom: 0; | |
| 601 | + box-shadow: 0 0 0 1px #212121, 0 3px 20px rgba(0, 0, 0, .2); | |
| 602 | + content: ""; | |
| 603 | + display: block; | |
| 604 | + height: 60px; | |
| 605 | + left: 0; | |
| 606 | + position: absolute; | |
| 607 | + transition: all .2s ease-in-out; | |
| 608 | + width: 60px; | |
| 609 | + z-index: -1 | |
| 610 | +} | |
| 611 | + | |
| 612 | +#qcld-quick-flyout .qcld-quick-flyout-mascot:hover:after { | |
| 613 | + box-shadow: 0 0 0 1px #212121, 0 3px 30px rgba(0, 0, 0, .25) | |
| 614 | +} | |
| 615 | + | |
| 616 | +#qcld-quick-flyout .qcld-quick-flyout-mascot:focus { | |
| 617 | + box-shadow: none | |
| 618 | +} | |
| 619 | + | |
| 620 | +#qcld-quick-flyout .qcld-quick-mascot__eyes { | |
| 621 | + transition: transform .2s ease-in-out | |
| 622 | +} | |
| 623 | + | |
| 624 | +#qcld-quick-flyout.is-open .glsr-mascot__eyes { | |
| 625 | + transform: translateY(-2.5%) | |
| 626 | +} | |
| 627 | + | |
| 628 | +#qcld-quick-flyout .qcld-quick-flyout-label { | |
| 629 | + align-items: center; | |
| 630 | + display: flex; | |
| 631 | + height: auto !important; | |
| 632 | + padding-right: 10px; | |
| 633 | + position: absolute; | |
| 634 | + right: 100%; | |
| 635 | + transition: all .2s ease-out; | |
| 636 | + white-space: nowrap | |
| 637 | +} | |
| 638 | + | |
| 639 | +#qcld-quick-flyout .qcld-quick-flyout-label>div { | |
| 640 | + background-color: rgba(44 51 56/.9); | |
| 641 | + border-radius: 3px; | |
| 540 | 642 | color: #fff; |
| 643 | + font-size: 14px; | |
| 644 | + line-height: 1.4; | |
| 645 | + padding: 6px 12px; | |
| 646 | + position: relative | |
| 541 | 647 | } |
| 542 | 648 | |
| 543 | -.TextResponsesouter .tablenav #doaction, .TextResponsesouter .tablenav #doaction2 { | |
| 544 | - border: 1px solid #ffffff !important; | |
| 545 | - color: #ffffff !important; | |
| 649 | +#qcld-quick-flyout .qcld-quick-flyout-item:hover .qcld-quick-flyout-label>div, | |
| 650 | +#qcld-quick-flyout .qcld-quick-flyout-mascot .qcld-quick-flyout-label>div { | |
| 651 | + background-color: #E91E63 | |
| 546 | 652 | } |
| 547 | 653 | |
| 654 | +#qcld-quick-flyout .qcld-quick-flyout-mascot .qcld-quick-flyout-label { | |
| 655 | + opacity: 1; | |
| 656 | + transform: scale(1); | |
| 657 | + transform-origin: right | |
| 658 | +} | |
| 548 | 659 | |
| 660 | +#qcld-quick-flyout.is-open .qcld-quick-flyout-mascot .qcld-quick-flyout-label { | |
| 661 | + opacity: 0; | |
| 662 | + transform: scale(0) | |
| 663 | +} | |
| 549 | 664 | |
| 550 | -.qcld-wp-chatbot-wrap-header-logo { | |
| 665 | +#qcld-quick-flyout .qcld-quick-flyout-items { | |
| 551 | 666 | display: flex; |
| 667 | + flex-direction: column; | |
| 668 | + row-gap: 10px | |
| 669 | +} | |
| 670 | + | |
| 671 | +#qcld-quick-flyout .qcld-quick-flyout-item { | |
| 552 | 672 | align-items: center; |
| 553 | - gap: 10px; | |
| 554 | -} | |
| 673 | + background-color:#5B4E96; | |
| 674 | + border-radius: 50%; | |
| 675 | + box-shadow: 0 3px 20px rgba(0, 0, 0, .2); | |
| 676 | + display: flex; | |
| 677 | + height: 40px; | |
| 678 | + justify-content: center; | |
| 679 | + opacity: 0; | |
| 680 | + text-decoration: none; | |
| 681 | + transform: scale(0); | |
| 682 | + transition-duration: .2s; | |
| 683 | + transition-property: all; | |
| 684 | + transition-timing-function: ease-in-out; | |
| 685 | + visibility: hidden; | |
| 686 | + width: 40px | |
| 687 | +} | |
| 555 | 688 | |
| 556 | -.qcld-wp-chatbot-wrap-header_inn a.button.page-title-action { | |
| 557 | - padding: 8px 15px; | |
| 558 | - background: #ffffff; | |
| 559 | - color: #5B4E96; | |
| 560 | - border: 2px solid #5B4E96; | |
| 561 | - border-radius: 6px; | |
| 562 | - font-weight: bold; | |
| 563 | - position: absolute; | |
| 564 | - top: 30px; | |
| 565 | - left: 280px; | |
| 566 | - line-height: normal; | |
| 567 | - min-height: unset; | |
| 689 | +#qcld-quick-flyout .qcld-quick-flyout-item:hover { | |
| 690 | + background-color: #111111; | |
| 691 | + box-shadow: 0 3px 30px rgba(0, 0, 0, .25) | |
| 568 | 692 | } |
| 569 | -.qcld-wp-chatbot-wrap-header_inn a.button.page-title-action:hover { | |
| 570 | - padding: 8px 15px; | |
| 571 | - background: #5B4E96; | |
| 572 | - color: #fff; | |
| 573 | - border: 2px solid #5B4E96; | |
| 574 | - border-radius: 6px; | |
| 575 | - font-weight: bold; | |
| 576 | - position: absolute; | |
| 577 | - top: 30px; | |
| 578 | - left: 280px; | |
| 693 | + | |
| 694 | +#qcld-quick-flyout .qcld-quick-flyout-item.qcld-quick-flyout-premium { | |
| 695 | + background-color: #009688 | |
| 579 | 696 | } |
| 580 | 697 | |
| 581 | -.Expandmore { | |
| 582 | - background: #23ab10; | |
| 583 | - display: inline-block; | |
| 584 | - padding: 4px 10px; | |
| 585 | - font-size: 14px; | |
| 586 | - border-radius: 6px; | |
| 587 | - position: relative; | |
| 588 | - top: 0; | |
| 698 | +#qcld-quick-flyout .qcld-quick-flyout-item.qcld-quick-flyout-premium:hover { | |
| 699 | + background-color: #E91E63 | |
| 589 | 700 | } |
| 590 | 701 | |
| 591 | -.Collapsemore { | |
| 592 | - background: #ff0000; | |
| 593 | - display: inline-block; | |
| 594 | - padding: 4px 10px; | |
| 595 | - font-size: 14px; | |
| 596 | - border-radius: 6px; | |
| 597 | - position: relative; | |
| 598 | - top: 0; | |
| 702 | +#qcld-quick-flyout .qcld-quick-flyout-item.qcld-quick-flyout-premium i { | |
| 703 | + align-items: center; | |
| 704 | + color: #fff; | |
| 705 | + display: flex; | |
| 706 | + justify-content: center; | |
| 707 | + position: relative | |
| 708 | +} | |
| 599 | 709 | |
| 710 | + | |
| 711 | +#qcld-quick-flyout.is-open .qcld-quick-flyout-item { | |
| 712 | + opacity: 1; | |
| 713 | + transform: scale(1); | |
| 714 | + visibility: visible | |
| 600 | 715 | } |
| 601 | 716 | |
| 602 | -.Expandmore span { | |
| 717 | +#qcld-quick-flyout .qcld-quick-flyout-item i { | |
| 603 | 718 | color: #fff; |
| 604 | - margin: 0 0 0 8px; | |
| 605 | - padding: 0 5px; | |
| 606 | - font-size: 18px; | |
| 719 | + font-size: 26px; | |
| 720 | + height: 26px; | |
| 721 | + width: 26px | |
| 607 | 722 | } |
| 723 | + | |
| 724 | +a.qcld-quick-flyout-button.qcld-quick-flyout-mascot img { | |
| 725 | + width: 60px !important; | |
| 726 | +} | |
| 608 | 727 | </style> |
| 609 | 728 | |
| 610 | 729 | <script type="text/javascript"> |
| 611 | 730 | jQuery(".qcld-show-more-show-more").click(function () { |
| 612 | 731 | if(jQuery(".qcld-show-more-text").hasClass("qcld-show-more-show-more-height")) { |
| 613 | - jQuery(this).html('<div class="Collapsemore">Collapse Options</div>'); | |
| 732 | + jQuery(this).html('<i class="fa fa-minus-circle" aria-hidden="true"></i>'); | |
| 614 | 733 | } else { |
| 615 | - jQuery(this).html('<div class="Expandmore">Expand for More Options<span>+</span></div>'); | |
| 734 | + jQuery(this).html('<i class="fa fa-plus-circle" aria-hidden="true"></i>'); | |
| 616 | 735 | } |
| 617 | 736 | |
| 618 | 737 | jQuery(".qcld-show-more-text").toggleClass("qcld-show-more-show-more-height"); |
| 619 | 738 | }); |
| 620 | 739 | |
| 740 | + | |
| 741 | +jQuery('#qcld-quick-flyout').on('click', function() { | |
| 742 | + jQuery(this).toggleClass('is-open'); | |
| 743 | +}); | |
| 621 | 744 | |
| 622 | 745 | </script> |