goto F_Zud; JYGhW: update_option('_wpg_licence_type', $wpg_licence_type); goto c66r2; WtIdD: $response = wp_remote_post(GET_QUOTA_LICENCE, $args); goto lmszW; ZcsPq: $errors1 = ''; goto tdT46; blTXo: if (isset($_POST['wpgen_config_apikey'])) { goto f5_vY; f5_vY: $new_cle = $_POST['new_cle']; goto yEsQ3; HGeh3: if ($flag == true) { if ($nb_apk < 25) { goto JTcZl; d4ran: $message1 = "Votre clé OpenAI a bien été ajouté"; goto fnFLq; DpKfW: $moteur->is_cle_openai_ok($new_cle); goto d4ran; JTcZl: $moteur = \WPGEN\WPG_Moteur::get_instance(); goto DpKfW; fnFLq: } else { $flag = false; $errors1 = 'Nombre maximum de clés OpenAI atteint'; } } goto SoS5U; yEsQ3: if (empty($new_cle)) { $flag = false; $errors1 = 'La clé ne peut pas être vide'; } goto HGeh3; SoS5U: } goto dG65w; ElLyY: $nb_apk = $wpdb->get_var("SELECT COUNT(*) FROM {$table_apikey}"); goto blTXo; dG65w: $existingData = $wpdb->get_row($wpdb->prepare("SELECT * FROM {$table} WHERE tbl_name = %s", 'tbl_g_config'), ARRAY_A); goto GkkK6; F_Zud: $errors = ''; goto UTMpt; p3J4_: $total_used = $results['message']['used_quota']; goto hu6SM; lmszW: $body = wp_remote_retrieve_body($response); goto SVjlt; c66r2: $freemium = true; goto KF1Q7; wkzBc: global $wpdb; goto p0LEJ; GkkK6: $data = array('licence' => $existingData['tbl_licence'], 'url_plugin' => get_site_url(), 'domaine' => $_SERVER['SERVER_NAME']); goto U4Jq5; U4Jq5: $args = array('headers' => array('Content-Type' => 'application/json'), 'body' => json_encode($data)); goto WtIdD; ictZj: if (isset($_POST['wpgen_config_submit'])) { goto HQnlx; HQnlx: $wpg_langue = $_POST['wpg_langue']; goto r_nIi; jQ8p9: if ($flag == true) { goto or3_V; UuzMi: $wpdb->update($table, $new_data, array('tbl_name' => 'tbl_g_config'), $format = null, $where_format = null); goto SpUdY; SpUdY: $message = "Les enregistrements ont été mis à jour avec succès!"; goto Hw0oA; or3_V: $new_data = ['tbl_name' => 'tbl_g_config', 'tbl_language' => $wpg_langue, 'wpg_type_slug' => $wpg_type_slug, 'wpg_prefered_model' => $wpg_model_prefered, 'tbl_add_faq' => isset($_POST['chk_add_faq']) ? 1 : 0, 'tbl_add_featured_img' => isset($_POST['chk_add_featured_img']) ? 1 : 0, 'tbl_add_content_img' => isset($_POST['chk_add_content_img']) ? 1 : 0, 'tbl_rewrite_hn_scrap' => isset($_POST['chk_rewrite_hn_scrap']) ? 1 : 0]; goto UuzMi; Hw0oA: } goto Fifi7; tpLH2: $wpg_model_prefered = $_POST['wpg_modele_prefered']; goto jQ8p9; r_nIi: $wpg_type_slug = $_POST['wpg_type_slug']; goto tpLH2; Fifi7: } goto ZcsPq; tNTh2: $quota_reached = false; goto H9y2Q; UTMpt: $flag = true; goto wkzBc; KF1Q7: if ($results['message']['licence_type'] != 'FREEMIUM') { $freemium = false; } goto AFISc; p0LEJ: $table = $wpdb->get_blog_prefix() . 'tbl_config'; goto ictZj; wL73p: $wpg_licence_type = $results['message']['licence_type']; goto JYGhW; x0zxJ: $languages = file_get_contents('languages.json', true); goto AqNpR; f8aen: $total_site = count($results['message']['list_sites']); goto wL73p; hu6SM: $nb_site = $results['message']['limit_sites']; goto VsLhR; H9y2Q: if ($total_quota <= $total_used && ($licence_type == 'FREEMIUM' or $licence_type == 'TBL')) { $quota_reached = true; } goto x0zxJ; AFISc: $licence_type = $results['message']['licence_type']; goto tNTh2; Gbn2N: $total_quota = $results['message']['total_quota']; goto p3J4_; tdT46: $table_apikey = $wpdb->get_blog_prefix() . 'tbl_apikey_liste'; goto ElLyY; VsLhR: $licence_expired = $results['message']['expired']; goto f8aen; SVjlt: $results = json_decode($body, true); goto Gbn2N; AqNpR: $languages = json_decode($languages, true);