| 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 |
<div class="wrap qcld-main-wrapper"> |
| 15 |
<div class="qcld-wp-chatbot-wrap-header-aisection"> |
| 16 |
<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> |
| 21 |
<ul class="qcld-wp-chatbot-wrap-version-wrapper"> |
| 22 |
<li> |
| 23 |
<a class="wpchatbot-Upgrade" href="https://www.wpbot.pro/" target="_blank">Upgrade To Pro</a> |
| 24 |
|
| 25 |
</li> |
| 26 |
</ul> |
| 27 |
</div> |
| 28 |
</div> |
| 29 |
</div> |
| 30 |
|
| 31 |
<div class="qcl-openai"> |
| 32 |
<div class="row gx-0"> |
| 33 |
|
| 34 |
<div class="card admin-maxwith qcld-openai-main-box"> |
| 35 |
<div class="card-header bg-dark text-white py-sm-4 border-0"> |
| 36 |
<div class="row"> |
| 37 |
|
| 38 |
<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> |
| 41 |
|
| 42 |
<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> |
| 47 |
</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 |
</div> |
| 58 |
|
| 59 |
|
| 60 |
</div> |
| 61 |
</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: none;"' :'style="display: none;"';?> > |
| 73 |
<?php require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/integration/openai/admin/admin_ui2.php'); ?> |
| 74 |
</div> |
| 75 |
<div id="openrouter-settings" class="ai-settings-provider" <?php echo (get_option( 'qcld_openrouter_enabled') == 1) ? 'style="display: none;"' :'style="display: none;"';?> > |
| 76 |
<?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 |
</div> |
| 81 |
<div id="grok-settings" class="ai-settings-provider" <?php echo (get_option( 'qcld_grok_enabled') == 1) ? 'style="display: none;"' :'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 |
<div class="card-footer bg-dark text-white py-sm-4 border-0"></div> |
| 91 |
</div> |
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
</div> |
| 96 |
</div> |
| 97 |
</div> |
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
<style> |
| 103 |
|
| 104 |
div#promotion-wpchatbot { |
| 105 |
margin: 0; |
| 106 |
padding: 0; |
| 107 |
border: none; |
| 108 |
max-width: initial !important; |
| 109 |
padding: 0 !important; |
| 110 |
margin: 20px 20px 20px 0 !important; |
| 111 |
padding: 15px 15px 15px 0 !important; |
| 112 |
border: none !important; |
| 113 |
border-radius: 6px !important; |
| 114 |
box-shadow: 0px 4px 6px 1px #ebebeb !important; |
| 115 |
} |
| 116 |
|
| 117 |
|
| 118 |
.qc-review-notice{ |
| 119 |
max-width: initial !important; |
| 120 |
padding: 0 !important; |
| 121 |
margin: 20px 20px 20px 0 !important; |
| 122 |
padding: 15px 15px 15px 0 !important; |
| 123 |
border: none !important; |
| 124 |
border-radius: 6px !important; |
| 125 |
box-shadow: 0px 4px 6px 1px #ebebeb !important; |
| 126 |
background: #fff; |
| 127 |
color: #000; |
| 128 |
} |
| 129 |
|
| 130 |
.qc-review-text h3 { |
| 131 |
color: #000000; |
| 132 |
} |
| 133 |
.qc-review-text p { |
| 134 |
color: #000000; |
| 135 |
} |
| 136 |
</style> |
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
|