| @@ -1,24 +1,9 @@ | ||
| 1 | -<?php | |
| 2 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly | |
| 3 | -$no_ai_active = ( | |
| 4 | - get_option( 'ai_enabled' ) != 1 && | |
| 5 | - get_option( 'qcld_openrouter_enabled' ) != 1 && | |
| 6 | - get_option( 'qcld_gemini_enabled' ) != 1 && | |
| 7 | - get_option( 'qcld_grok_enabled' ) != 1 | |
| 8 | -); | |
| 9 | -$wizard_done = ( get_option( 'wpbot_ai_setup_wizard_done' ) == 1 ); | |
| 10 | - | |
| 11 | -$show_wizard_automatically = $no_ai_active; | |
| 12 | -require_once QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/admin/templates/wizard-popup.php'; | |
| 13 | -?> | |
| 14 | 1 | <div class="wrap qcld-main-wrapper"> |
| 15 | - <div class="qcld-wp-chatbot-wrap-header-aisection"> | |
| 2 | +<div class="qcld-wp-chatbot-wrap-header-aisection"> | |
| 16 | 3 | <div class="qcld-wp-chatbot-wrap-header"> |
| 17 | - | |
| 18 | - <div class="qcld-wp-chatbot-wrap-header-logo"><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> | |
| 19 | - <p><strong>Core Version:</strong> v<?php echo esc_html( QCLD_wpCHATBOT_VERSION ); ?></p> | |
| 20 | - </div> | |
| 4 | + <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> | |
| 5 | + <p><strong>Core Version:</strong> v<?php echo QCLD_wpCHATBOT_VERSION; ?></p> | |
| 21 | 6 | <ul class="qcld-wp-chatbot-wrap-version-wrapper"> |
| 22 | 7 | <li> |
| 23 | 8 | <a class="wpchatbot-Upgrade" href="https://www.wpbot.pro/" target="_blank">Upgrade To Pro</a> |
| 24 | 9 | |
| @@ -24,9 +9,9 @@ | ||
| 24 | 9 | |
| 25 | 10 | </li> |
| 26 | 11 | </ul> |
| 27 | 12 | </div> |
| 28 | - </div> | |
| 13 | + | |
| 29 | 14 | </div> |
| 30 | 15 | |
| 31 | 16 | <div class="qcl-openai"> |
| 32 | 17 | <div class="row gx-0"> |
| @@ -35,59 +20,25 @@ | ||
| 35 | 20 | <div class="card-header bg-dark text-white py-sm-4 border-0"> |
| 36 | 21 | <div class="row"> |
| 37 | 22 | |
| 38 | 23 | <div class="col-auto me-auto ai-settings-title-container"> |
| 39 | - | |
| 40 | - <a href="<?php echo esc_url( admin_url( 'admin.php?page=wpbot_openAi' ) ); ?>"><h4><?php esc_html_e( 'AI Settings','chatbot');?></h4></a> | |
| 24 | + | |
| 25 | + <h4><?php esc_html_e( 'AI Settings','openai_addon');?></h4> | |
| 41 | 26 | |
| 42 | 27 | <select id="ai-provider-selector" class="form-select ai-settings-selector"> |
| 43 | - <option value="openai" <?php echo (get_option( 'ai_enabled') == 1) ? esc_attr( 'selected') :'';?> ><?php echo esc_html__( 'OpenAI','chatbot')?></option> | |
| 44 | - <option value="openrouter" <?php echo (get_option( 'qcld_openrouter_enabled') == 1) ? esc_attr( 'selected') :'';?> ><?php echo esc_html__( 'OpenRouter','chatbot')?></option> | |
| 45 | - <option value="gemini" <?php echo (get_option( 'qcld_gemini_enabled') == 1) ? esc_attr( 'selected') :'';?> ><?php echo esc_html__( 'Gemini','chatbot')?></option> | |
| 46 | - <option value="grok" <?php echo (get_option( 'qcld_grok_enabled') == 1) ? esc_attr( 'selected') :'';?> ><?php echo esc_html__( 'Grok','chatbot')?></option> | |
| 28 | + <option value="openai" <?php echo (get_option( 'ai_enabled') == 1) ? esc_attr( 'selected','wpchatbot') :'';?> ><?php echo esc_html__( 'OpenAI','wpchatbot')?></option> | |
| 29 | + <option value="openrouter" <?php echo (get_option( 'qcld_openrouter_enabled') == 1) ? esc_attr( 'selected','wpchatbot') :'';?> ><?php echo esc_html__( 'OpenRouter','wpchatbot')?></option> | |
| 47 | 30 | </select> |
| 48 | - <div class="col-auto ai-settings-title-container"> | |
| 49 | - <button id="wpbot-trigger-wizard" class="qcld-btn-primary"><?php esc_html_e( 'AI Wizard', 'chatbot' ); ?></button> | |
| 50 | - </div> | |
| 51 | - <div class="col-auto ai-settings-title-container"> | |
| 52 | - <button id="ai-knowledge-base-tab" class="qcld-btn-primary" link="page=wpbot_openAi#ai-knowledge-base-tab"><?php esc_html_e( 'Knowledge Base (RAG)', 'chatbot' ); ?></button> | |
| 53 | - </div> | |
| 54 | - <div class="col-auto ai-settings-title-container"> | |
| 55 | - <button id="qcld-common-ai-settings" class="qcld-btn-primary" link="page=wpbot_openAi#common-ai-settings-tab"><?php esc_html_e( 'Common AI Settings', 'chatbot' ); ?></button> | |
| 56 | - </div> | |
| 57 | 31 | </div> |
| 58 | - | |
| 59 | 32 | |
| 60 | 33 | </div> |
| 61 | 34 | </div> |
| 62 | - <?php | |
| 63 | - if ( get_option( 'ai_enabled' ) != 1 && get_option( 'qcld_openrouter_enabled' ) != 1 && get_option( 'qcld_gemini_enabled' ) != 1 && get_option( 'qcld_grok_enabled' ) != 1 ) { | |
| 64 | - ?> | |
| 65 | - <div id="openai-settings" class="ai-settings-provider"> | |
| 66 | - <?php require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/integration/openai/admin/admin_ui2.php'); ?> | |
| 67 | - </div> | |
| 68 | - | |
| 69 | - <?php | |
| 70 | - } | |
| 71 | - ?> | |
| 72 | - <div id="openai-settings" class="ai-settings-provider" <?php echo (get_option( 'ai_enabled') == 1) ? 'style="display: block;"' :'style="display: none;"';?> > | |
| 35 | + <div id="openai-settings" class="ai-settings-provider" <?php echo (get_option( 'ai_enabled') == 1) || (get_option( 'qcld_openrouter_enabled') == 0) ? 'style="display: block;"' :'style="display: none;"';?> > | |
| 73 | 36 | <?php require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/integration/openai/admin/admin_ui2.php'); ?> |
| 74 | 37 | </div> |
| 75 | 38 | <div id="openrouter-settings" class="ai-settings-provider" <?php echo (get_option( 'qcld_openrouter_enabled') == 1) ? 'style="display: block;"' :'style="display: none;"';?> > |
| 76 | 39 | <?php require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/integration/openrouter/admin/settings.php'); ?> |
| 77 | - </div> | |
| 78 | - <div id="gemini-settings" class="ai-settings-provider" <?php echo (get_option( 'qcld_gemini_enabled') == 1) ? 'style="display: block;"' :'style="display: none;"';?> > | |
| 79 | - <?php require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/integration/gemini/admin/settings.php'); ?> | |
| 80 | 40 | </div> |
| 81 | - <div id="grok-settings" class="ai-settings-provider" <?php echo (get_option( 'qcld_grok_enabled') == 1) ? 'style="display: block;"' :'style="display: none;"';?> > | |
| 82 | - <?php require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/integration/grok/admin/settings.php'); ?> | |
| 83 | - </div> | |
| 84 | - <div id="rag-settings" class="ai-settings-provider" style="display: none;"> | |
| 85 | - <?php require_once QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/admin/templates/rag.php'; ?> | |
| 86 | - </div> | |
| 87 | - <div id="common-ai-settings" class="ai-settings-provider" style="display: none;"> | |
| 88 | - <?php require_once QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/admin/templates/common-ai-settings.php'; ?> | |
| 89 | - </div> | |
| 90 | 41 | <div class="card-footer bg-dark text-white py-sm-4 border-0"></div> |
| 91 | 42 | </div> |
| 92 | 43 | |
| 93 | 44 | |
| @@ -93,13 +44,9 @@ | ||
| 93 | 44 | |
| 94 | 45 | |
| 95 | 46 | </div> |
| 96 | 47 | </div> |
| 97 | -</div> | |
| 98 | - | |
| 99 | - | |
| 100 | - | |
| 101 | - | |
| 48 | +</div> | |
| 102 | 49 | <style> |
| 103 | 50 | |
| 104 | 51 | div#promotion-wpchatbot { |
| 105 | 52 | margin: 0; |