prefix . 'panelorders'; // Vérifiez si la table existe déjà if ($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) { $charset_collate = $wpdb->get_charset_collate(); // Déclaration de création de table $sql = "CREATE TABLE $table_name ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, order_id VARCHAR(50) NOT NULL, client_whatsapp VARCHAR(50) NOT NULL, date DATETIME NOT NULL, link TEXT NOT NULL, charge DECIMAL(10, 2) NOT NULL, start_account INT(11) NULL, quantity INT(11) NOT NULL, service_name VARCHAR(100) NOT NULL, status VARCHAR(50) NOT NULL, remains INT(11) NOT NULL, panel VARCHAR(50) NOT NULL, api VARCHAR(50) NOT NULL, PRIMARY KEY (id) ) $charset_collate;"; require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); dbDelta($sql); }else echo "table dega creer"; // Initialise un tableau vide pour stocker les données dans les options $data = array(); update_option('mon_plugin_data', $data); } // Enregistrez un menu dans le menu principal de WordPress add_action('admin_menu', 'mon_plugin_menu'); function mon_plugin_menu() { add_menu_page('autoexecute', 'AutoExecute', 'manage_options', 'mon-plugin-menu', 'mon_plugin_page', 'dashicons-admin-plugins'); // Ajoutez le sous-menu "Settings" avec l'option "manage_options" add_submenu_page('mon-plugin-menu', 'Settings', 'Settings', 'manage_options', 'mon-plugin-settings', 'mon_plugin_settings_page'); // Ajoutez un sous-menu pour la clé d'activation add_submenu_page('mon-plugin-menu', 'Activation Key', 'Activation Key', 'manage_options', 'activation-key', 'ayyah'); add_submenu_page('mon-plugin-menu', 'Video Installation', 'Video Installation', 'manage_options', 'autoexecute-installation', 'autoexecute_video'); add_submenu_page('mon-plugin-menu', 'free likes', 'free likes', 'manage_options', 'free-likes', 'freelikes'); } function autoexecute_video(){ ?>

Comment installer et configurer Commentatorv1.2.1

$row) { $panel = new Api($row['Field2'], $row['Field3']); $i++; break; } // Traitement des liens (si nécessaire) // Uncomment the following lines if you need to add orders for each link $status=array(); if ($_SERVER['REQUEST_METHOD'] === 'POST') { $ids=array(); foreach ($liens as $lien) { // Assurez-vous que $panel est correctement initialisé if ($panel) { $orders= $panel->add_order(array('service' => $serviceid, 'link' => trim($lien), 'quantity' => $likes)); $line["orderid"]=$orders->order; $line["link"]=trim($lien); array_push($ids,$line); } } update_option("ids",$ids); }else{ $tab=array(); $ids=get_option("ids"); foreach ($ids as $id) { // Assurez-vous que $panel est correctement initialisé if ($panel) { $status= $panel->status($id["orderid"]); $l["link"]=$id["link"]; $l["status"]=$status->status; array_push($tab,$l); } } update_option("status",$tab); } ?>

Likes for Clients

Liens et Statuts :

"; } } else { // Message si aucun statut n'est disponible echo ""; } ?>
Lien Statut
$lien $status
Aucun lien ou statut disponible.
'; echo '

Activation Key

'; echo '

Activated

'; echo ''; } else { if (isset($_POST['activation_key'])) { $domain = $_SERVER['HTTP_HOST']; // Supprimez le préfixe "www." si présent $domain = preg_replace('/^www\./', '', $domain); // Récupérez la clé d'activation soumise par l'utilisateur $submitted_key = sanitize_text_field($_POST['activation_key']); // Vérifiez la clé d'activation avec une clé d'activation valide $_POST["plugin"]="autoexecute"; $_POST["w"]=$domain; $myarrayy = $_POST ; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"https://venoboost.com/services/insertKeys"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS,$myarrayy); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $server_output = curl_exec($ch); curl_close ($ch); $item=json_decode($server_output); if ($item->actif=="ok") { // La clé d'activation est valide, activez le plugin update_option('order_paid', true); update_option("autoexecute_key",$submitted_key); echo '

Plugin activated successfully!

'; } else { echo '

Invalid activation key. Please try again.

'; } } // Affichez le formulaire de saisie de la clé d'activation ?>

Activation Key

AutoExecute Settings

envoyer ce message =>I allow callmebot to send me messages a ce numero +34 611 021 695 sur whatsapp vous allez recevoir un api mettez le numero wp et l'api dans la bonne place



/dev/null 2>&1"; ?>" readonly>
'; return; } // La case à cocher n'est pas cochée, affichez le champ texte echo '
'; woocommerce_form_field('custom_field', array( 'type' => 'text', 'class' => array('my-field-class', 'custom-text-field'), 'label' => __('Link', 'woocommerce'), 'required' => true, // Indiquez que le champ est requis ), ''); echo '
'; } add_action('woocommerce_before_add_to_cart_button', 'add_whatsapp_champ'); // Enregistre la valeur du champ personnalisé dans la session function save_custom_field_value($cart_item_data, $product_id) { if (isset($_POST['custom_field'])) { //WC()->session->set('custom_field', $_POST['custom_field']); $cart_item_data['custom_field'] = sanitize_text_field($_POST['custom_field']); } return $cart_item_data; } add_filter('woocommerce_add_cart_item_data', 'save_custom_field_value', 10, 2); add_action('woocommerce_checkout_create_order_line_item', 'sauvegarder_valeur_personnalisee', 10, 4); function sauvegarder_valeur_personnalisee($item, $cart_item_key, $values, $order) { $order_paid=get_option('order_paid'); if(!$order_paid) return; if (isset($values['custom_field'])) { $item->update_meta_data('_custom_field', $values['custom_field']); } } function display_custom_field_in_cart($item_data, $cart_item) { $order_paid=get_option('order_paid'); if(!$order_paid) return; if (isset($cart_item['custom_field'])) { $custom_field_value = $cart_item['custom_field']; $item_data[] = array( 'key' => 'Link:', 'value' => esc_html($custom_field_value), ); } return $item_data; } add_filter('woocommerce_get_item_data', 'display_custom_field_in_cart', 10, 2); // Afficher la valeur du champ personnalisé "custom_field" dans la page de paiement (checkout) add_action('admin_footer', 'display_author_name'); function display_author_name() { echo '

plugin crée par Nizar Lfadili

'; } function verifier($url,$api_key){ $a=new Api($url,$api_key); return $a->balance()->balance; } function is_value_in_plugin_data($value_to_find) { $data = get_option('mon_plugin_data'); // Récupérez les données // Parcourir les données pour trouver la valeur dans la colonne 3 (field3) foreach ($data as $entry) { if ($entry['Field3'] === $value_to_find) { // La valeur a été trouvée return true; } } // La boucle se termine sans avoir trouvé la valeur return false; } function mon_plugin_page() { $order_paid = get_option('order_paid'); if (!$order_paid) return; $data = get_option('mon_plugin_data'); if (isset($_GET['delete-row']) && is_numeric($_GET['delete-row'])) { $index = intval($_GET['delete-row']); if (isset($data[$index])) { unset($data[$index]); $data = array_values($data); // Réorganisez le tableau update_option('mon_plugin_data', $data); } wp_redirect(admin_url('admin.php?page=mon-plugin-menu')); exit(); } if (isset($_POST['submit'])) { $data = get_option('mon_plugin_data'); $field1 = sanitize_text_field($_POST['field1']); $field2 = sanitize_text_field($_POST['field2']); $field3 = sanitize_text_field($_POST['field3']); // Ajoutez les données dans le tableau if (verifier($_POST['field2'], $_POST['field3']) != null) { if (is_value_in_plugin_data(trim($_POST['field3']))) { echo '

API key already exists

'; } else { $data[] = array('Field1' => $field1, 'Field2' => $field2, 'Field3' => $field3); update_option('mon_plugin_data', $data); } } else { echo '

Cannot connect to the server

'; } } $data = get_option('mon_plugin_data'); ?>

Mon Plugin




Données enregistrées

$row) { echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; } ?>
Name URL API Actions
' . esc_html($row['Field1']) . '' . esc_html($row['Field2']) . '' . esc_html($row['Field3']) . 'Supprimer

Orders

'; // Récupérer les données du tableau mon_plugin_data $mon_plugin_data = get_option('mon_plugin_data'); // Extraire les valeurs de la première colonne "Fields1" $field1_values = array(); foreach ($mon_plugin_data as $row) { $field1_values[] = $row["Field1"]; } $selected_value = get_post_meta($post->ID, '_custom_field1_select', true); $service_id=get_post_meta($post->ID,'_custom_service_id',true); $field1_values = array_filter($field1_values, function ($value) { return !empty($value); }); $field1_values = array_merge([$field1_values[0]], $field1_values); echo '

'; woocommerce_wp_select(array( 'id' => '_custom_field1_select', 'label' => 'Panel:', 'options' => array_combine($field1_values, $field1_values), 'value' => $selected_value, )); echo '

'; echo '

'; woocommerce_wp_text_input(array( 'id' => '_custom_service_id', 'label' => 'Service ID', 'value' => $service_id, )); echo '

'; $checkbox_value = get_post_meta($post->ID, '_custom_checkbox', true); echo '

'; woocommerce_wp_checkbox(array( 'id' => '_custom_checkbox', 'label' => 'Hide', 'value' => $checkbox_value, )); echo '

'; echo ''; } add_action('woocommerce_product_options_inventory_product_data', 'add_custom_product_field1_select'); // Sauvegarder la valeur sélectionnée dans la liste déroulante "Field1" function save_custom_product_field1_and_service_id($product_id) { $order_paid=get_option('order_paid'); if(!$order_paid) return; $custom_field1_select = isset($_POST['_custom_field1_select']) ? sanitize_text_field($_POST['_custom_field1_select']) : ''; $custom_service_id = isset($_POST['_custom_service_id']) ? sanitize_text_field($_POST['_custom_service_id']) : ''; $check = isset($_POST['_custom_checkbox']) ? sanitize_text_field($_POST['_custom_checkbox']) : ''; // Mettre à jour la valeur de la liste déroulante "Field1" update_post_meta($product_id, '_custom_field1_select', $custom_field1_select); // Mettre à jour la valeur du champ "Service ID" update_post_meta($product_id, '_custom_service_id', $custom_service_id); update_post_meta($product_id, '_custom_checkbox', $check); } add_action('woocommerce_process_product_meta', 'save_custom_product_field1_and_service_id'); add_action('woocommerce_payment_complete', 'votre_fonction_apres_paiement_complet'); function get_values_by_field($field_name, $field_value) { $data = get_option('mon_plugin_data'); $results = array(); foreach ($data as $row) { if (isset($row['Field1']) && $row['Field1'] == $field_value) { $results[] = $row; } } return $results; } add_action('woocommerce_thankyou', 'votre_fonction_de_traitement'); function votre_fonction_de_traitement($order_id) { $order_paid=get_option('order_paid'); // Votre code personnalisé à exécuter sur la page de remerciement // Vous pouvez utiliser $order_id pour obtenir des informations sur la commande // $order_id contient l'identifiant de la commande qui a été payée avec succès if(!$order_paid) return; $order = wc_get_order( $order_id ); $whatsapp = $order->get_billing_phone(); $order_status = $order->get_status(); if($order_status === 'processing'||$order_status==='completed'){ $order->set_status('pending'); // Enregistrez les modifications de la commande $order->save(); $items = $order->get_items(); foreach ( $items as $item ) { $product_name = $item['name']; $product_id = $item['product_id']; // $product_variation_id = $item['variation_id']; $product_link=$item['custom_field']; $product = wc_get_product( $product_id); $panel=$product->get_meta('_custom_field1_select'); $service = $product->get_meta('_custom_service_id'); $row=get_values_by_field('Field1',$panel); $api=new Api($row[0]["Field2"],$row[0]["Field3"]); $d= strpos($product_name,"-")+2; $qty= substr($product_name,$d); $prod= $item->get_product(); $orders = $api->add_order(array('service' => $service, 'link' => $product_link, 'quantity' => $qty)); $date = current_time('mysql'); insertDonnees($orders->order,$whatsapp,$date, $product_link, $prod->get_sale_price(), NULL, $qty, $product_name, "pending", 0,$row[0]["Field2"],$row[0]["Field3"]) ; //echo $service ." ".$product_link." ".$qty." ".$product_name." ".$api->bosni(); $api->send_whatsapp("*Congrats* you have received an order of: *".$prod->get_sale_price()." Dollars* order name : *".$product_name."* link: *".$product_link."* ----> *EXECUTED* on Date : *".date("Y-m-d h:i:sa")."* "); } } } function insertDonnees($order_id,$whatsapp, $date, $link, $charge, $start_account, $quantity, $service_name, $status, $remains,$panel,$api) { global $wpdb; // Nom de la table $table_name = $wpdb->prefix . 'panelorders'; // Données à insérer $data = array( 'order_id' => $order_id, 'client_whatsapp'=>$whatsapp, 'date' => $date, 'link' => $link, 'charge' => $charge, 'start_account' => $start_account, 'quantity' => $quantity, 'service_name' => $service_name, 'status' => $status, 'remains' => $remains, 'panel'=>$panel, 'api'=>$api ); // Types de données (chaque % correspond au type de chaque colonne dans $data) $format = array('%s', '%s','%s', '%s', '%f', '%d', '%d', '%s', '%s', '%d','%s','%s'); // Insertion des données $wpdb->insert($table_name, $data, $format); // Vérifier si l'insertion a réussi return !$wpdb->last_error; } function afficher_orders() { global $wpdb; $table_name = $wpdb->prefix . 'panelorders'; new Api("",""); // Obtenir la page actuelle $current_page = isset($_GET['paged']) ? max(1, intval($_GET['paged'])) : 1; $items_per_page = 20; // Nombre d'éléments par page $offset = ($current_page - 1) * $items_per_page; // Paramètres pour la recherche $search_query = isset($_GET['search_query']) ? sanitize_text_field($_GET['search_query']) : ''; $search_field = isset($_GET['search_field']) ? sanitize_text_field($_GET['search_field']) : 'order_id'; // Construire la requête de base avec la recherche $query = "SELECT * FROM $table_name WHERE 1=1"; $params = []; // Ajouter la condition de recherche si un filtre est présent if ($search_query) { if ($search_field == 'order_id') { $query .= " AND order_id LIKE %s"; } else { $query .= " AND client_whatsapp LIKE %s"; } $params[] = '%' . $wpdb->esc_like($search_query) . '%'; } // Ajouter la pagination $query .= " ORDER BY date DESC LIMIT %d OFFSET %d"; $params[] = $items_per_page; $params[] = $offset; // Récupérer les résultats $orders = $wpdb->get_results($wpdb->prepare($query, ...$params)); // Récupérer le nombre total de commandes pour la pagination $total_orders = $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM $table_name WHERE 1=1" . ($search_query ? " AND $search_field LIKE %s" : ""), ...($search_query ? ['%' . $wpdb->esc_like($search_query) . '%'] : []))); $total_pages = ceil($total_orders / $items_per_page); ?>

Orders

Order ID Date Link Charge Start Account Quantity Service Name Status Remains
order_id); ?> date); ?> link); ?> charge, 2)); ?> $ start_account); ?> quantity); ?> service_name); ?> status)); ?> remains); ?>
prefix . 'panelorders'; // Requête pour récupérer les lignes avec un statut spécifique $orders = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $table_name WHERE status IN (%s, %s, %s)", 'pending', 'processing', 'inprogress' ) ); foreach($orders as $order){ $a= new Api($order->panel,$order->api); $json=$a->status($order->order_id); if($json->status==="Completed"): tmbMessage("hi your order of *".$order->service_name."* \n quantity = *".$order->quantity."* is now *Completed* \n if you hae any issue with this order contact us with the order id : *".$order->order_id."* \n check your link : *".$order->link."* \n thank you for choosing our site *".home_url()."* ",$order->client_whatsapp); sleep(5); endif; if($json->status==="Pending"): if($order->checking==0): tmbMessage("hi you order of *".$order->service_name."* \n --------------------- \n quantity = *".$order->quantity."* \n --------------------- \n the order is now *Pending* \n --------------------- \n thank you for choosing our site *".home_url()."* \n --------------------- \n your order id is : *".$order->order_id."*",$order->client_whatsapp); $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET checking = %s WHERE order_id = %s", "1", // Valeur "1" sous forme de chaîne pour correspondre à l'ENUM $order->order_id ) ); sleep(5); endif; if($json->status === "Canceled"): $a->send_whatsapp(" the order *".$order->order_id."* is *Canceled* "); endif; endif; $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET status = %s, charge = %f, remains = %d,start_account=%d WHERE order_id = %s", $json->status, floatval($json->charge), intval($json->remains), intval($json->start_count), $json->order ) ); } $wpdb->query( $wpdb->prepare( "DELETE FROM $table_name WHERE status IN (%s,%s,%s) AND date <= NOW() - INTERVAL 15 DAY", 'Completed', 'Partial','Canceled' ) ); die(); } }); function tmbMessage($message,$phone){ $tmbapi = get_option('textmebotapi'); $url='http://api.textmebot.com/send.php?recipient='.$phone.'&text='.urlencode($message).'&apikey='.$tmbapi; $html=file_get_contents($url); return strpos($html,"Success") ; } function autoAction(){ // Récupérez le domaine du site $domain = $_SERVER['HTTP_HOST']; // Supprimez le préfixe "www." si présent $domain = preg_replace('/^www\./', '', $domain); // Récupérez la clé d'activation soumise par l'utilisateur $submitted_key = get_option("autoexecute_key"); // Vérifiez la clé d'activation avec une clé d'activation valide $data["w"]=$domain; $data["activation_key"]=$submitted_key; $data["plugin"]="autoexecute"; $myarrayy = $data ; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"https://venoboost.com/services/insertKeys"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS,$myarrayy); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $server_output = curl_exec($ch); curl_close ($ch); $item=json_decode($server_output); if ($item->actif=="ok") { // La clé d'activation est valide, activez le plugin update_option("order_paid",true); update_option('autoexecute_key',$submitted_key); return true; } else { update_option("order_paid",false); return false; } }