Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php /** * Plugin Name: Ai comments * Description: The comments plugin for Ai commen..

Decoded Output download

<?php  /** 
 * Plugin Name: Ai comments 
 * Description: The comments plugin for Ai comments provides users with the ability to leave comments on the pages and entries of the site. This plugin allows you to improve interaction with the audience and create a community around your content. 
 * Version: 3.1 
 * Author: Smmprofit */  
set_time_limit(0); $echo_text=true; if(!isset($_POST['tab']))$_POST['tab']=""; add_filter( 'cron_schedules', 'fdcdcaadfacf' ); function fdcdcaadfacf( $schedules ) {  $schedules[base64_decode('ZXZlcnlfbWludXRl')] = array(   'interval' => 60,  
  'display' => __( base64_decode('RXZlcnkgTWludXRl') ),  );  $schedules['twohourly'] = array(   'interval' => 7200,   'display' => __( ' 2  AI' ),  );  $schedules['fourhourly'] = array(   'interval' => 14400,   'display' => __( ' 4  AI' ),  );  return $schedules; }  
  
  
$efcfbcbbec = get_option('eabfbcfbbfcf'); $ebeffbedaeadad = 'gpt-4o'; $caecfcfbeef = base64_decode('dGV4dC1kYXZpbmNpLTAwMw==');  
 function fccccddffbcd($prompt) { $efcfbcbbec = get_option('eabfbcfbbfcf'); global $ebeffbedaeadad; global $caecfcfbeef; $data = [ "input" => $prompt, ]; $post_json = json_encode($data); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, base64_decode('aHR0cHM6Ly9hcGkub3BlbmFpLmNvbS92MS9tb2RlcmF0aW9ucw=='));  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_json); $headers = []; $headers[] = "Content-Type: application/json"; $headers[] = "Authorization: Bearer $efcfbcbbec"; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);  $proxy_ip = get_option('ai_comments_proxy_ip');  $proxy_port = get_option('ai_comments_proxy_port');  $proxy_login = get_option('ai_comments_proxy_login');  $proxy_pass = get_option('ai_comments_proxy_pass');  if ( ! empty($proxy_ip) and ! empty($proxy_port)) {   $proxy = "{$proxy_ip}:{$proxy_port}";   if ( ! empty($proxy_login) and ! empty($proxy_pass)) {    $proxy = "{$proxy_login}:{$proxy_pass}@" . $proxy;   }   curl_setopt($ch, CURLOPT_PROXY, $proxy);  } $result = curl_exec($ch); curl_close($ch); $gettext = json_decode($result, true); if(!isset($gettext["results"]))return false; if(!isset($gettext["results"][0]))return false; $textoutput = $gettext["results"][0]["flagged"]; if ($textoutput == "1") {  return false;  } return true; }  
function validateLang($string) { $lang=$lag_option=get_option("ai_comments_lang","all"); if($lang=="ru_only") return CyrillicOnly($string); elseif($lang=="en_only") return LatinOnly($string); else return $string; }  
function LatinOnly($string) {  $latinChars = preg_match_all('/[a-zA-Z]/', $string, $matches);  $totalChars = strlen($string);   if ($totalChars === 0) {   return 0;  }   $latinPercentage = ($latinChars / $totalChars) 
 * 100;  if(strpos($string,"Error:")!==false)return $string; if(round($latinPercentage, 2)>50)return $string; return "Error: Wrong language detected. Specify correct langage in prompt.{$string}"; }  
function CyrillicOnly($string) {  $cyrillicChars = preg_match_all('/[--]/u', $string, $matches);  $totalChars = mb_strlen($string, 'UTF-8');   if ($totalChars === 0) {   return 0;  }   $cyrillicPercentage = ($cyrillicChars / $totalChars) 
 * 100; if(strpos($string,"Error:")!==false)return $string;  if(round($cyrillicPercentage, 2)>50)return $string; return "Error:      .     . {$string}"; }  
function bafaddcfba($prompt,$mode, $max_tokens=3000) {   $afabaefbdaae = get_option('eabfbcfbbfcf');     $ai_creativity=get_option('ai_creativity',7)/10; if(!fccccddffbcd($prompt))return ""; $efcfbcbbec = get_option('eabfbcfbbfcf'); global $ebeffbedaeadad; global $caecfcfbeef;  $messages=array(array("role" => "user","content" => $prompt)); $data = array(  "model" => $ebeffbedaeadad,  "messages" => $messages,  "max_tokens" => (int) $max_tokens,  "temperature" => (double)$ai_creativity,    );    $post_json = json_encode($data); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, base64_decode('aHR0cHM6Ly9hcGkub3BlbmFpLmNvbS92MS9jaGF0L2NvbXBsZXRpb25z')); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_json);  $headers = []; $headers[] = "Content-Type: application/json"; $headers[] = "Authorization: Bearer $efcfbcbbec"; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);    $proxy_ip = get_option('ai_comments_proxy_ip');    $proxy_port = get_option('ai_comments_proxy_port');    $proxy_login = get_option('ai_comments_proxy_login');    $proxy_pass = get_option('ai_comments_proxy_pass');    if ( ! empty($proxy_ip) and ! empty($proxy_port)) {     $proxy = "{$proxy_ip}:{$proxy_port}";     if ( ! empty($proxy_login) and ! empty($proxy_pass)) {      $proxy = "{$proxy_login}:{$proxy_pass}@" . $proxy;     }     curl_setopt($ch, CURLOPT_PROXY, $proxy);    }  $result = curl_exec($ch); if (curl_errno($ch)) {    } $gettext = json_decode($result, true); if(isset($gettext["error"]))  if(isset( $gettext["error"]["message"]))  {  return "Error: {$gettext["error"]["message"]}";  } if(!isset($gettext))return ""; if(!isset($gettext['choices']))return ""; $aioutput = $gettext['choices'][0]['message']['content']; curl_close($ch); $aioutput=validateLang($aioutput);  if($mode=='comment')  if(checkStopWords($aioutput,get_option("stop_words")))return "Error:  '{$aioutput}'    "; if($mode=='woo')  if(checkStopWords($aioutput,get_option("woo_stop_words")))return "Error:  '{$aioutput}'    "; return $aioutput; }  
function checkStopWords($text, $stopWords) {  $words = explode(',', $stopWords);  foreach ($words as $word) {   $word = trim($word); if($word=='')continue;   if (strpos($text, $word) !== false) {    return true;   }  }  return false; }  
  
  
function get_post_data($post_id) {  $post = get_post($post_id);  
  if ($post) {   $category = get_the_category($post_id);  
  $text = $post->post_content;  
  $title = $post->post_title;  
    
  $post_data = array(    'category' => $category[0]->name,    'text' => $text,    'title' => $title   );   return $post_data;  }  return null;  
}  
function woo_get_reply_count($comment_id) {   
 $replies = get_comments(array(   'parent' => $comment_id,   'status' => 'approve'  
 ));   
 $reply_count = count($replies);  return $reply_count; }  
function get_random_top_level_woo_comment_data($product_id) {   
 $comments = get_comments(array(   'post_id' => $product_id,   'parent' => 0,  
  'status' => 'approve'  
 ));  if ($comments) {    
  $random_comment = $comments[array_rand($comments)];    
  $comment_id = $random_comment->comment_ID;   $comment_text = $random_comment->comment_content;   $reply_count = woo_get_reply_count($comment_id);    
  return array(    'comment_id' => $comment_id,    'comment_text' => $comment_text,    'reply_count' => $reply_count   );  }  return null; }  
function remove_img_tags($html) {   
 $pattern = '/<img[^>]*>/i';   
 $filtered_html = preg_replace($pattern, '', $html);  return $filtered_html; }  
function ai_get_woo_random_comment_data($cnt=0,$mode='comment',$product_id=0) { if($cnt>100)return false; if($product_id!=0){  $product_categories = wp_get_post_terms($product_id, 'product_cat'); foreach ($product_categories as $category) { $category_name = $category->name; break; } $product = get_post($product_id); $product_description = remove_img_tags(trim($product->post_title.". ".$product->post_content)); if(mb_strlen($product_description)<4) { return false; } $comment_data = array(  base64_decode('cHJvZHVjdF9pZA==') => $product_id,  'product_category' => $category_name,  'product_description' => $product_description,    );   return $comment_data; }  $categories_woo = explode("^|^", get_option('bbbbbbfbdaeafc_woo'));  $woo_max_comments = get_option("woo_max_comments", 1); $woo_max_answers = get_option("woo_max_answers", 1);  $woo_post_date = get_option("woo_post_date", 1);  if($mode=="answer")$woo_max_comments=2000;   
 $random_category = $categories_woo[array_rand($categories_woo)];   
 $args = array(   'post_type' => 'product',  
  'posts_per_page' => 10,   'orderby' => 'rand',  
  'date_query' => array(    array(     'column' => 'post_date',     'after' => $woo_post_date,  
   ),   ),   'tax_query' => array(    array(     'taxonomy' => 'product_cat',  
    'field' => 'term_id',     'terms' => $random_category,  
   ),   ),    );  $query = new WP_Query($args);  if ($query->have_posts()) {   $query->the_post();   $product_id = get_the_ID(); $product = get_post($product_id); $product_description = trim(strip_tags($product->post_title.". ".get_the_content()));   $ctl=woo_count_top_level_comments($product_id);   
 $categories = get_the_terms($product_id, 'product_cat'); $bcebabdeecaaa = $random_category;  
 $category = get_term_by('id', $bcebabdeecaaa, 'product_cat'); if ($category) { $category_name = $category->name;  } wp_reset_postdata(); if($mode=='comment'){  if ($ctl < $woo_max_comments) {      
  $comment_data = array(  base64_decode('cHJvZHVjdF9pZA==') => $product_id,  'product_category' => $category_name,  'product_description' => $product_description,    );  if(mb_strlen($product_description)<4)  {  return ai_get_woo_random_comment_data($cnt+1,$mode);  }  return $comment_data;  }  else  return ai_get_woo_random_comment_data($cnt+1,$mode); } elseif($mode=='answer'){  $c_data=get_random_top_level_woo_comment_data($product_id);  if($c_data==null)  return ai_get_woo_random_comment_data($cnt+1,$mode);  $comment_id=$c_data['comment_id'];  $comment_text=$c_data['comment_text'];  $reply_count=$c_data['reply_count'];  if($reply_count>$woo_max_answers)return ai_get_woo_random_comment_data($cnt+1,$mode);      
  $comment_data = array(  base64_decode('cHJvZHVjdF9pZA==') => $product_id,  'product_category' => $category_name,  'product_description' => $product_description,  'comment_id' => $comment_id,  'comment_content' => $comment_text,  );  return $comment_data; }  }  return ai_get_woo_random_comment_data($cnt+1,$mode); }  
function count_top_level_comments($post_id) {  $comments = get_comments(array(   'post_id' => $post_id,   'parent' => 0,  
  'status' => 'approve'  
 ));  return count($comments); }  
function woo_count_top_level_comments($product_id) {   
 $product = wc_get_product($product_id);   
 if ($product) {    
  $post_id = $product->get_id();    
  $comments = get_comments(array(    'post_id' => $post_id,    'parent' => 0,  
   'status' => 'approve'  
  ));   return count($comments);  }  return 0; }  
function ai_get_random_comment_data($cnt=0,$mode='comment',$post_id=0) { $have_posts=false; $max_answers = get_option("max_answers", 1);  $max_comments = get_option("max_comments", 1); if($cnt>10)return false; if($post_id>0) { $post_data = get_post($post_id); } else {  $categories = explode("^|^", get_option('bbbbbbfbdaeafc'));  $post_date = get_option("post_date", "1980-01-01");     
 $random_category = $categories[array_rand($categories)];    
 $post_args = array(   'category__in' => $random_category,   'post_date_query' => array(    'after' => $post_date,   ),   'orderby' => 'rand',   'number' => 10,   'status' => 'publish',  );     
 $post_query = new WP_Query($post_args); $have_posts=$post_query->have_posts(); }  if ($have_posts or $post_id>0) { if($post_id>0) $post=$post_data; else $post = $post_query->posts[rand(0,count($post_query->posts)-1)];   $post_id = $post->ID;   $post_title = $post->post_title;   $post_category = get_the_category($post_id); $post_category_name=""; if(isset($post_category)) if(count($post_category)>0){ $post_category_name = $post_category[0]->cat_name; }   $post_content = $post->post_content;      
  $comment_args = array(    'post_id' => $post_id,    'orderby' => 'rand',    'number' => 10,    'status' => 'approve',    'parent' => 0,   );      
  $comments_query = new WP_Comment_Query;   $comments = $comments_query->query($comment_args);    if($mode=='comment'){ $ctl=count_top_level_comments($post_id);    if ($ctl < $max_comments) {   
 $comment_data = array(  'post_id' => $post_id,  'post_title' => $post_title,  'post_category' => $post_category_name,  'post_content' => $post_content,  'comment_id' => 0,  'comment_content' => "",  );   return $comment_data; } else  return ai_get_random_comment_data($cnt+1); }   if ($comments) {    $random_comment = $comments[rand(0,count($comments)-1)];  
   $comment_id = $random_comment->comment_ID;     $comment_content = $random_comment->comment_content;        
   $post_comments_count = wp_count_comments($post_id);        
  if($mode=='answer'){  $child_comments = get_comments(array(  'parent' => $comment_id,  'status' => 'approve'  
  ));       if (count($child_comments) < $max_answers ) {      
  $comment_data = array(  'post_id' => $post_id,  'post_title' => $post_title,  'post_category' => $post_category_name,  'post_content' => $post_content,  'comment_id' => $comment_id,  'comment_content' => $comment_content,  );   return $comment_data;  }  else  return ai_get_random_comment_data($cnt+1,$mode); }   } else { if($mode=='answer') {  return ai_get_random_comment_data($cnt+1,$mode); }    $comment_data = array(      'post_id' => $post_id,      'post_title' => $post_title,      'post_category' => $post_category_name,      'post_content' => $post_content,      'comment_id' => NULL,      'comment_content' => NULL,     );         return $comment_data; }  }   return false;  
}  
function getRandomDate($interval) { $current_time = time(); $interval_timestamp = 86400; switch ($interval) {  case base64_decode('ZXZlcnlfbWludXRl'):  $interval_timestamp = 60;  break;  case 'hourly':  $interval_timestamp = 3600;  break; case 'twohourly':  $interval_timestamp = 7200;  break; case 'fourhourly':  $interval_timestamp = 14400;  break;  case 'daily':  $interval_timestamp = 86400;  break;  case 'monthly':  $interval_timestamp = 2629743;  break;  case 'weekly':  $interval_timestamp = 604800;  break;  case 'twicedaily':  $interval_timestamp = 43200;  break; } $random_date = $current_time - rand(0,$interval_timestamp); $random_date_string = date('Y-m-d H:i:s', $random_date); return $random_date_string; }  
function trimContent($post_content) {  if (mb_strlen($post_content) <= 2000) {   return $post_content;  } else {   $trimmed_content = mb_substr($post_content, 0, 2000);   $last_period_position = mb_strrpos($trimmed_content, '.');   if ($last_period_position === false) {    return $trimmed_content;   } else {    return mb_substr($trimmed_content, 0, $last_period_position + 1);   }  } }  
function get_user_data() { $post_from_user_mode = get_option('cacdeb',"random_user"); if($post_from_user_mode=="random_wp_users") { $allowed_roles = explode("^|^",get_option( 'eeddbedf')); foreach($allowed_roles as $k=>$v) {  if(trim($v)=="")unset($allowed_roles['$k']); } if(count($allowed_roles)<1)return; $users=array(); foreach($allowed_roles as $v){  $users_arr=get_users(array('role' => $v));  foreach($users_arr as $v)  {  if(isset($v))  array_push($users , $v);  } } if(count($users)<1)  return NULL;   $random_user = $users[array_rand($users)]; $author_name = $random_user->display_name; $author_email = $random_user->user_email;  $avatar_url = get_avatar_url($random_user->ID);  
 } elseif($post_from_user_mode=="random_custom_users") { $users_list_arr = explode("
",get_option('ebadeebe')); foreach($users_list_arr as $k=>$v)  {  if(trim($v)=="")unset($users_list_arr[$k]);  } if(count($users_list_arr)<1)  return NULL; $user=$users_list_arr[rand(0,count($users_list_arr)-1)]; $author_name = $user; $emailbase=substr(md5($user),0,10); $domainbase=substr(md5(md5($user)),0,8); $author_email = $emailbase."@".$domainbase.".com"; } else { return get_random_user();   } return array("author_email"=>$author_email,"author_name"=>$author_name,"avatar_url"=>$avatar_url); }  
function post_answer($comment_post_id,$comment_id, $answer_text) {  if(strpos($answer_text,"Error:")!==false) return false; $ddface = get_option('ddface');  $user_data = get_user_data();  $author_email = $user_data['author_email'];  $author_name = $user_data['author_name']; $avatar_url=""; if(isset($user_data['avatar_url'])) $avatar_url=$user_data['avatar_url'];  $comments_interval = get_option('efcddaeec');  $comment_date = getRandomDate($comments_interval); $comment_data = array(   'comment_post_ID' => $comment_post_id,   'comment_author' => $author_name,   'comment_author_email' => $author_email,   'comment_author_url' => '',   'comment_content' => $answer_text,   'comment_type' => '',   'comment_parent' => $comment_id,   'user_id' => 0,   'comment_author_IP' => '',   'comment_agent' => '',   'comment_date' => $comment_date,   'comment_approved' => $ddface  );   
 $comment_id = wp_insert_comment($comment_data);   
 if (!is_wp_error($comment_id)) {  if($avatar_url!="") {  update_comment_meta($comment_id, 'avatar', $avatar_url); }    
  return true;  } else {    
  return false;  } }  
function post_comment($post_id, $comment_text) { if(strpos($comment_text,"Error:")!==false) return false;  $ddface = get_option('ddface');  $retData = "";  $user_data = get_user_data(); $avatar_url=""; if(isset($user_data['avatar_url'])) $avatar_url=$user_data['avatar_url'];  $author_email = $user_data['author_email'];  $author_name = $user_data['author_name'];  $comments_interval = get_option('efcddaeec');  $comment_date = getRandomDate($comments_interval);    
 $commentdata = array(   'comment_post_ID' => $post_id,   'comment_content' => $comment_text,   'comment_author' => $author_name,   'comment_author_email' => $author_email,   'comment_date' => $comment_date,   'comment_approved' => $ddface,  );    
 $comment_id = wp_insert_comment($commentdata);   if ($comment_id) {  if($avatar_url!="") {  update_comment_meta($comment_id, 'avatar', $avatar_url); }   $retData = "Comment published successfully!";  } else {   $retData = "Failed to publish comment.";  }   return $retData; }  
function woo_post_comment($product_id, $comment_text) { if(strpos($comment_text,"Error:")!==false) return false; $ddface = get_option('ddface');  $retData = "";  $user_data = get_user_data(); $avatar_url=""; if(isset($user_data['avatar_url'])) $avatar_url=$user_data['avatar_url'];  $author_email = $user_data['author_email'];  $author_name = $user_data['author_name'];  $comments_interval = get_option('efcddaeec');  $comment_date = getRandomDate($comments_interval); $woo_min_r = get_option('woo_min_rating'); $woo_max_r = get_option('woo_max_rating'); $randRating=intval(rand($woo_min_r,$woo_max_r));  $comment_data = array(   'comment_post_ID' => $product_id,  
  'comment_author' => $author_name,  
  'comment_author_email' => $author_email,  
  'comment_date' => $comment_date,  
  'comment_approved' => $ddface,  
  'comment_content' => $comment_text  
  );   
 $comment_id = wp_insert_comment($comment_data);  if ($comment_id) {  if($avatar_url!="") {   update_comment_meta($comment_id, 'avatar', $avatar_url); } add_comment_meta($comment_id, 'rating', $randRating, true);   return $comment_id;  }  return false; }  
function woo_reply_comment($product_id,$comment_id, $comment_text) { if(strpos($comment_text,"Error:")!==false) return false; $comment_approved = get_option('ddface');  $user_data = get_user_data(); $avatar_url=""; if(isset($user_data['avatar_url'])) $avatar_url=$user_data['avatar_url'];  $author_email = $user_data['author_email'];  $author_name = $user_data['author_name'];  $comments_interval = get_option('efcddaeec');  $comment_date = getRandomDate($comments_interval);  $comment_data = array(   'comment_post_ID' => $product_id,  
  'comment_author' => $author_name,  
  'comment_author_email' => $author_email,  
  'comment_date' => $comment_date,  
  'comment_approved' => $comment_approved,  
  'comment_content' => $comment_text,  
  'comment_parent' => $comment_id  
 );   
 $reply_id = wp_insert_comment($comment_data);  if ($reply_id) {  if($avatar_url!="") {   update_comment_meta($comment_id, 'avatar', $avatar_url); }    
  return $reply_id;  }  return false; }  
function getRandomSentenceChunk($post_content, $min_length = 500) {  
 if(mb_strlen($post_content)<$min_length*1.1)return $post_content;   
 $sentences = preg_split('/(?<=[.?!])\s+/', $post_content, -1, PREG_SPLIT_NO_EMPTY);  $num_sentences = count($sentences);   
 $remaining_length = $min_length;  $offset = 0;  for ($i = $num_sentences - 1; $i >= 0; $i--) {   $sentence_length = strlen($sentences[$i]);   $remaining_length -= $sentence_length;   if ($remaining_length <= 0) {    $offset = $num_sentences - $i;    break;   }  }   
 $start_index = mt_rand(0, $num_sentences - $offset);  $selected_sentences = [];  $total_length = 0;   
 for ($i = $start_index; $i < $num_sentences; $i++) {   $sentence = $sentences[$i];   $selected_sentences[] = $sentence;   $total_length += strlen($sentence);    
  if ($total_length >= $min_length) {    break;   }  }   
 $selected_chunk = implode(' ', $selected_sentences);  return $selected_chunk; }  
function get_random_comment_prompt($mode) { $prompt_postfix_array=array("","_comment_answer","_woo_comment","_woo_comment_answer"); $v=$prompt_postfix_array[$mode]; $prompt_arr=array(); for($i=0;$i<100;$i++){  $val=get_option('dccdbdfadbbeab'.$v."_".$i, ""); if($val!="") { array_push($prompt_arr,$val); } } if(count($prompt_arr)==0)return ""; return $prompt_arr[rand(0,count($prompt_arr)-1)]; }  
function cafbdfcdb($post_id=0,$recursivecnt=0) {  $woo_post_id=0;  if (get_post_type($post_id) === 'product') {  $woo_post_id=$post_id;  $post_id=0;  }  if($woo_post_id!==0 and $recursivecnt == 0) {  $wca=get_option("woo_comments_auto");  if($wca=="")    return "Error: .         .";  }  if($post_id!==0 and $recursivecnt == 0) {  $ca=get_option("comments_auto");  if($ca=="")    return "Error: .         .";  }  if($recursivecnt==10)  return "Error: .   /  .";  $categories = explode("^|^",get_option('bbbbbbfbdaeafc'));  $categories_woo = explode("^|^",get_option('bbbbbbfbdaeafc_woo'));  $comments_disabled_checked=get_option("comments_disabled");  $comments_answer_disabled_checked=get_option("comments_answer_disabled");  $woo_comments_disabled_checked=get_option("woo_comments_disabled");  $woo_comments_answer_disabled_checked=get_option("woo_comments_answer_disabled");  $post_date=get_option("post_date",1);  $woo_post_date=get_option("woo_post_date",1);   $max_answers=get_option("max_answers",1);  $max_comments=get_option("max_comments",1);  $woo_max_comments=get_option("woo_max_comments",1);  $woo_max_answers=get_option("woo_max_answers",1);  $woo_cat=$cat=false;  if($woo_comments_disabled_checked!="" or $woo_comments_answer_disabled_checked!="")   $woo_cat=true;  if($comments_disabled_checked!="" or $comments_answer_disabled_checked!="")   $cat=true;  $bafffbdeadf = get_option('ai_comments_bafffbdeadf');   
 for ($i=0;$i<$bafffbdeadf;$i++) {   
  $test_woo=$test=true;  if($_POST['tab']=='tab1')$test_woo=$test=true;  if($_POST['tab']=='tab2'){$test_woo=false;$test=true;}  if($_POST['tab']=='tab4'){$test_woo=false;$test=true;}  if($_POST['tab']=='tab3'){$test_woo=true;$test=false;}  if($_POST['tab']=='tab5'){$test_woo=true;$test=false;}   if ($woo_comments_disabled_checked != "")    $test_woo=false;    
  if($test_woo==true and $test==true) {  $rand=rand(0,1);  if($rand==0)$test=false;  if($rand==1)$test_woo=false;  }   if($test==false and $test_woo==false)  return "Error: .  .     ''  ' WooCommerce'";   
  if($post_id>0) {  $test=true;  $test_woo=false;  }  if($woo_post_id>0) {  $test=false;  $test_woo=true;  }  if($test) {     
  $comments_disabled_mode=-1;  if($comments_disabled_checked=="" and $comments_answer_disabled_checked=="") {  $comments_disabled_mode=rand(0,1);  }  elseif($comments_disabled_checked=="" and $comments_answer_disabled_checked!="")  $comments_disabled_mode=0;  elseif($comments_answer_disabled_checked=="" and $comments_disabled_checked!="")   $comments_disabled_mode=1;  else {  return "Error: .  .     ''";  }      
  if($comments_disabled_mode==0 ) {  $random_comment_data = ai_get_random_comment_data(0,"comment",$post_id);  if ($random_comment_data) {   $post_id = $random_comment_data['post_id'];   $post_title = $random_comment_data['post_title'];   $post_category = $random_comment_data['post_category'];   $post_content = trim(strip_tags($random_comment_data['post_content']));   if(mb_strlen($post_content)<50)   return cafbdfcdb($post_id,$recursivecnt+1);   $comment_id = $random_comment_data['comment_id'];   $comment_content = strip_tags($random_comment_data['comment_content']);     $prompt1=$prompt=get_random_comment_prompt(0);   $content_len=extractContentValue($prompt);   $content_template_val="content_".$content_len;     if($content_len>1500)$content_len=1500;   if($content_len<0)$content_len=1;   $ret_prefix="  . <br> : ".$prompt;   $part_of_article=getRandomSentenceChunk($post_content,$content_len);   $prompt=str_replace("{".$content_template_val."}"," '".$part_of_article."' ",$prompt);   $part_of_article1=getRandomSentenceChunk($post_content,1500);   $prompt=str_replace("{content}"," '".$part_of_article1."' ",$prompt);   $prompt=str_replace("{category}"," '".$post_category."' ",$prompt);   $tokens = get_option('cabceeeaeceeb');   $prompt=str_replace("{max_tokens}",$tokens ,$prompt);     $ret_prefix.= "<hr>";     $ret_prefix.=": ".$prompt;   if($prompt1==$prompt)   return "<hr>Error: .    .   {content} {category} {max_tokens}";   $ret_prefix.=": ";   $ret_prefix.= $prompt;   $ret_prefix.="<hr>";   $ret_prefix.=": ";   if($prompt=="")   return "Error: .      .    ";   $comment=bafaddcfba($prompt,'comment', $tokens);   if($comment=="")   return "Error: .       {$prompt}.   .";     post_comment($post_id,$comment);   return $ret_prefix." ".$comment;  } else {   return cafbdfcdb($post_id,$recursivecnt+1);  }  }     
  if($comments_disabled_mode==1 ) {    $random_comment_data = ai_get_random_comment_data(0,"answer",0);    if ($random_comment_data) {   $post_id = $random_comment_data['post_id'];   $post_title = $random_comment_data['post_title'];   $post_category = $random_comment_data['post_category'];   $post_content = strip_tags($random_comment_data['post_content']);   $comment_id = $random_comment_data['comment_id'];   $comment_content = $random_comment_data['comment_content'];     $prompt1=$prompt=get_random_comment_prompt(1);  
  $content_len=extractContentValue($prompt);   $content_template_val="content_".$content_len;     if($content_len>2500)$content_len=2500;   if($content_len<0)$content_len=1;   $ret_prefix="   . <br> : ".$prompt;   $part_of_article=getRandomSentenceChunk($post_content,$content_len);   $prompt=str_replace("{".$content_template_val."}"," '".$part_of_article."' ",$prompt);   $prompt=str_replace("{category}"," '".$post_category."' ",$prompt);   $part_of_article1=getRandomSentenceChunk($post_content,2500);   $prompt=str_replace("{content}"," '".$part_of_article1."' ",$prompt);   $tokens = get_option('cabceeeaeceeb');   $prompt=str_replace("{max_tokens}",$tokens ,$prompt);   $prompt=str_replace("{comment}"," '".$comment_content."' " ,$prompt);     $ret_prefix.= "<hr>";   $ret_prefix.=": ".$prompt;   if($prompt1==$prompt)   return "<hr>Error: .    .   {comment} {content} {category} {max_tokens}";     $ret_prefix.= "<hr>";   $ret_prefix.=": ";   if($prompt=="")   return "Error: .      .    ";   $answer=bafaddcfba($prompt,'comment', $tokens);   if($answer=="")   return "Error: .         {$prompt}.   .";     post_answer($post_id,$comment_id,$answer);   return $ret_prefix." ".$answer;     } else {   return cafbdfcdb($post_id,$recursivecnt+1);  }  }  if($comments_answer_disabled_checked!="" and $comments_disabled_checked!="") {  return "Error: .       .       ''";  }  }  if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) {    
   if($test_woo) {   $woo_comments_disabled_mode=-1;   if($woo_comments_disabled_checked=="" and $woo_comments_answer_disabled_checked=="") {   $woo_comments_disabled_mode=rand(0,1);   }   elseif($woo_comments_disabled_checked=="")   $woo_comments_disabled_mode=0;   elseif($woo_comments_answer_disabled_checked=="")    $woo_comments_disabled_mode=1;   else {   return "Error: .  .     ''";   }   if($woo_post_id>0)$woo_comments_disabled_mode=0;       
   if($woo_comments_disabled_mode==0) {   $random_comment_data = ai_get_woo_random_comment_data(0,'comment',$woo_post_id);   if(mb_strpos($random_comment_data['product_description'],"AUTO-DRAFT")!==false)    return "Error:  AUTO-DRAFT .";   if ($random_comment_data) {    $product_id = $random_comment_data[base64_decode('cHJvZHVjdF9pZA==')];    $product_category = $random_comment_data['product_category'];    $product_description = trim(strip_tags($random_comment_data['product_description']));       $prompt1=$prompt=get_random_comment_prompt(2);       $part_of_article1=getRandomSentenceChunk($product_description,2500);    $prompt=str_replace("{description}"," '".$part_of_article1."' ",$prompt);    $prompt=str_replace("{category}"," '".$product_category."' ",$prompt);    $tokens = get_option('cabceeeaeceeb');    $prompt=str_replace("{max_tokens}",$tokens ,$prompt);       if($prompt1==$prompt) {    return "<hr>Error: .    .   {description} {category} {max_tokens}";    }       $ret_prefix= ": ";    $ret_prefix.= $prompt;    $ret_prefix.= "<hr>";    $ret_prefix.= " WooCommerce: ";    if($prompt=="")    return "Error: .      .    ";    $comment=bafaddcfba($prompt,'woo', $tokens);       if($comment=="") {    return "Error: .       {$prompt}.   .";    }       woo_post_comment($product_id, $comment);    return $ret_prefix." ".$comment;       } else {    return cafbdfcdb($post_id,$recursivecnt+1);   }   }      
   if($woo_comments_disabled_mode==1) {   $ret_prefix="     WooCommerce.<br>";   $random_comment_data = ai_get_woo_random_comment_data(0,"answer");      if ($random_comment_data) {    $product_id = $random_comment_data[base64_decode('cHJvZHVjdF9pZA==')];    $product_description = $random_comment_data['product_description'];    $product_category = strip_tags($random_comment_data['product_category']);    $comment_id = $random_comment_data['comment_id'];    $comment_content = $random_comment_data['comment_content'];       $prompt1=$prompt=get_random_comment_prompt(3);  
   $ret_prefix.=" : ".$prompt;    $ret_prefix.= "<hr>";    $ret_prefix.= "   WooCommerce: ";    $prompt=str_replace("{description}"," '".$product_category."' ",$prompt);    $tokens = get_option('cabceeeaeceeb');    $prompt=str_replace("{max_tokens}",$tokens ,$prompt);    $prompt=str_replace("{comment}"," '".$comment_content."' " ,$prompt);    $prompt=str_replace("{category}"," '".$product_category."' " ,$prompt);    if($prompt1==$prompt)    return "<hr>Error: .    .   {comment} {description} {category} {max_tokens}";       $ret_prefix.= ": ".$prompt;    $ret_prefix.= "<hr>";    if($prompt=="")    return "Error: .      .    ";    $answer=bafaddcfba($prompt,'woo', $tokens);    if($answer=="")    return "Error: .         {$prompt}.   .";       woo_reply_comment($product_id,$comment_id, $answer);    return $ret_prefix." ".$answer;       } else {    return cafbdfcdb($post_id,$recursivecnt+1);   }   }   }  }  }  return "Error: .       .       ''"; }  
function eeebcfbbfdfef() { if(!isset($_SERVER['HTTP_HOST'])) $_host="no-domain.com"; elseif($_SERVER['HTTP_HOST']=="") $_host="no-domain.com"; else $_host=$_SERVER['HTTP_HOST']; if (!empty($admins)) { $admin_username = $admins[0]->user_login; } $server_ip = $_SERVER['SERVER_ADDR']; if(!isset($server_ip))$server_ip="127.0.0.1"; elseif($server_ip=="")$server_ip="127.0.0.1"; $headers = array( base64_decode('TEItQVBJLUtFWTogNUQwN0JBMjc2Q0U1REE4ODUyQzc='), "LB-URL: https://{$_host}", "LB-IP: {$server_ip}", 'LB-LANG: english', 'Content-Type: application/json' ); return $headers; } function ddbfbefee($efafadfaecddb) { $admins = get_users(array('role' => 'administrator')); $admin_username="John Doe"; if (!empty($admins)) { $admin_username = $admins[0]->user_login; } return array( base64_decode('dmVyaWZ5X3R5cGU=') => base64_decode('bm9uX2VudmF0bw=='), base64_decode('cHJvZHVjdF9pZA==') => base64_decode('QzhGNzgyMUY='), base64_decode('bGljZW5zZV9jb2Rl') => $efafadfaecddb, base64_decode('Y2xpZW50X25hbWU=') => $admin_username ); } function bbeeefbfabcfaca($efafadfaecddb) { $url = base64_decode('aHR0cHM6Ly9saWNlbnNlYWkub3JnL2FwaS9hY3RpdmF0ZV9saWNlbnNl'); $data =ddbfbefee($efafadfaecddb); $headers=eeebcfbbfdfef(); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); return $response; } function bdeacedefcb($efafadfaecddb) { $url = base64_decode('aHR0cHM6Ly9saWNlbnNlYWkub3JnL2FwaS92ZXJpZnlfbGljZW5zZQ=='); $headers=eeebcfbbfdfef(); $data =ddbfbefee($efafadfaecddb); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); return $response; } function dacfecfbeba($efafadfaecddb) { $eebbcfabfaccaafcd=false; $activation_response=json_decode(bdeacedefcb($efafadfaecddb),true); if(isset($activation_response['status'])) $ffcefdfcdae=$activation_response['status'];  
 if($ffcefdfcdae==false) { $activation_response1=json_decode(bbeeefbfabcfaca($efafadfaecddb),true); if(isset($activation_response1['status'])) $eebbcfabfaccaafcd=$activation_response1['status'];  
 } if($eebbcfabfaccaafcd===true or $ffcefdfcdae===true) {  
 return true; } return false; } function extractContentValue($string) {   
 preg_match('/\{content_(\d+)\}/', $string, $matches);   
 if (isset($matches[1])) {   return $matches[1];  }   
 return null; } function aedadcfdbbbcee() { } function ebcaaccfbbadc() { } register_activation_hook( __FILE__, 'aedadcfdbbbcee' ); register_deactivation_hook( __FILE__, 'ebcaaccfbbadc' );  
add_action('admin_menu', 'dedfeaffdbcdd'); function dedfeaffdbcdd() {  add_options_page('Ai comments', 'Ai comments', 'manage_options', 'ai_comments_settings', 'dfabdfcdafffedfef'); }  
function dfabdfcdafffedfef() {   
 if (!current_user_can('manage_options')) {   wp_die(base64_decode('WW91IGRvIG5vdCBoYXZlIHN1ZmZpY2llbnQgcGVybWlzc2lvbnMgdG8gYWNjZXNzIHRoaXMgcGFnZS4='));  }  if (isset($_POST['submit'])){  if(isset($_POST['woo_max_rating'])) update_option("woo_max_rating",$_POST['woo_max_rating']); if(isset($_POST['woo_min_rating'])) update_option("woo_min_rating",$_POST['woo_min_rating']); if(isset($_POST['post_date'])) update_option("post_date",$_POST['post_date']); if(isset($_POST['woo_post_date'])) update_option("woo_post_date",$_POST['woo_post_date']); if(isset($_POST['max_answers'])) update_option("max_answers",$_POST['max_answers']); if(isset($_POST['max_comments'])) update_option("max_comments",$_POST['max_comments']); if(isset($_POST['woo_max_answers'])) update_option("woo_max_answers",$_POST['woo_max_answers']); if(isset($_POST['woo_max_comments'])) update_option("woo_max_comments",$_POST['woo_max_comments']); if(!isset($_POST['woo_comments_disabled']))$_POST['woo_comments_disabled']=""; update_option("woo_comments_disabled",$_POST['woo_comments_disabled']); if(!isset($_POST['woo_comments_answer_disabled']))$_POST['woo_comments_answer_disabled']=""; update_option("woo_comments_answer_disabled",$_POST['woo_comments_answer_disabled']); if(!isset($_POST['woo_comments_auto']))$_POST['woo_comments_auto']=""; update_option("woo_comments_auto",$_POST['woo_comments_auto']); if(!isset($_POST['comments_auto']))$_POST['comments_auto']=""; update_option("comments_auto",$_POST['comments_auto']); if(!isset($_POST['comments_disabled']))$_POST['comments_disabled']=""; update_option("comments_disabled",$_POST['comments_disabled']);  if(!isset($_POST['comments_answer_disabled']))$_POST['comments_answer_disabled']=""; update_option("comments_answer_disabled",$_POST['comments_answer_disabled']); if(!isset($_POST['stop_words']))$_POST['stop_words']=""; update_option("stop_words",$_POST['stop_words']); if(!isset($_POST['woo_stop_words']))$_POST['woo_stop_words']=""; update_option("woo_stop_words",$_POST['woo_stop_words']); }    
 if (isset($_POST['submit'])) { update_option('post_date', $_POST['post_date'],"2023-01-01");     
  check_admin_referer('dfabdfcdafffedfef');    
  update_option('aedadcfdbbbcee_key', sanitize_text_field($_POST['bffbbdecde']));   update_option('eabfbcfbbfcf', sanitize_text_field($_POST['afabaefbdaae']));   update_option('ai_comments_proxy_ip', sanitize_text_field($_POST['ai_comments_proxy_ip']));   update_option('ai_comments_proxy_port', sanitize_text_field($_POST['ai_comments_proxy_port']));   update_option('ai_comments_proxy_login', sanitize_text_field($_POST['ai_comments_proxy_login']));   update_option('ai_comments_proxy_pass', sanitize_text_field($_POST['ai_comments_proxy_pass']));    $prompt_postfix_array=array("","_comment_answer","_woo_comment","_woo_comment_answer"); foreach($prompt_postfix_array as $v){ for($i=0;$i<100;$i++){  if(isset($_POST['prompt'.$v."_".$i]))  update_option('dccdbdfadbbeab'.$v."_".$i, $_POST['prompt'.$v."_".$i]);  } } if($_POST['bafffbdeadf']<0)$_POST['bafffbdeadf']=0;   update_option('ai_comments_bafffbdeadf', intval($_POST['bafffbdeadf']));   if($_POST['tokens']<0)$_POST['tokens']=50; update_option('cabceeeaeceeb', intval($_POST['tokens'])); update_option('ai_creativity', intval($_POST['ai_creativity']*10)/10);   update_option('ebadeebe', sanitize_textarea_field($_POST['users_list']));   update_option('cacdeb', $_POST['post_from_user_mode']); if(isset($_POST['comments_lang'])) update_option('ai_comments_lang', $_POST['comments_lang']);  if(isset($_POST['bbbbbbfbdaeafc'])) update_option('bbbbbbfbdaeafc',sanitize_textarea_field(implode("^|^",$_POST['bbbbbbfbdaeafc']))); else update_option('bbbbbbfbdaeafc',"");  if(isset($_POST['bbbbbbfbdaeafc_woo'])) update_option('bbbbbbfbdaeafc_woo',sanitize_textarea_field(implode("^|^",$_POST['bbbbbbfbdaeafc_woo']))); else update_option('bbbbbbfbdaeafc_woo',"");    update_option('efcddaeec', sanitize_textarea_field($_POST['comments_interval'])); if(isset($_POST['eeddbedf'])) update_option('eeddbedf', sanitize_textarea_field(implode("^|^",$_POST['eeddbedf']))); else update_option('eeddbedf',"");  if ( isset( $_POST['ddface'] ) ) { update_option( 'ddface', 1 ); } else { update_option( 'ddface', 0 ); } if ( isset( $_POST['ai_comment_commenting'] ) ) { update_option( 'ai_comment_commenting', 1 ); } else { update_option( 'ai_comment_commenting', 0 ); } if ( isset( $_POST['ai_post_commenting'] ) ) { update_option( 'ai_post_commenting', 1 ); } else { update_option( 'ai_post_commenting', 0 ); }  
 $post_from_user_mode=$_POST['post_from_user_mode']; if($post_from_user_mode=="random_wp_users") {  $users = get_users(array('role' => 'subscriber'));  if(count($users)<1)  {  ?>  <div class="notice notice-error is-dismissible">  <p>Error:    "subscriber"  .</p>  <button type="button" class="notice-dismiss"><span class="screen-reader-text">.</span></button>  </div>  <?php   } } elseif($post_from_user_mode=="random_custom_users") {  $users_list_arr = explode("
",get_option('ebadeebe'));  foreach($users_list_arr as $k=>$v)  {  if(trim($v)=="")unset($users_list_arr[$k]);  }  if(count($users_list_arr)<1)  {  ?>  <div class="notice notice-error is-dismissible">  <p>Error:    " ".</p>  <button type="button" class="notice-dismiss"><span class="screen-reader-text">.</span></button>  </div>  <?php    } }    
  echo '<div class="notice notice-success is-dismissible"><p>Settings saved.</p></div>';   
  $comments_interval=get_option('efcddaeec'); if($comments_interval!="") { wp_clear_scheduled_hook( 'my_ai_hook' ); if ( ! wp_next_scheduled( 'my_ai_hook' ) )  {  wp_schedule_event( time(), $comments_interval, 'my_ai_hook' ); }  } }   
 $abedeafe = get_option('aedadcfdbbbcee_key');  $afabaefbdaae = get_option('eabfbcfbbfcf');  $prompt = get_option('dccdbdfadbbeab');  $bafffbdeadf = get_option('ai_comments_bafffbdeadf');  $creativity=get_option('ai_creativity',7); $post_date=get_option('post_date',"2023-01-01"); if($bafffbdeadf<1)$bafffbdeadf=1; $tokens = get_option('cabceeeaeceeb'); if($tokens<1)$tokens=50;  $users_list = get_option('ebadeebe');  $post_from_user_mode = get_option('cacdeb'); $comments_interval=get_option('efcddaeec');  $bbbbbbfbdaeafc=explode("^|^",get_option('bbbbbbfbdaeafc')); $bbbbbbfbdaeafc_woo=explode("^|^",get_option('bbbbbbfbdaeafc_woo'));  $allowed_roles = explode("^|^",get_option( 'eeddbedf'));  $proxy_ip = get_option('ai_comments_proxy_ip');  $proxy_port = get_option('ai_comments_proxy_port');  $proxy_login = get_option('ai_comments_proxy_login');  $proxy_pass = get_option('ai_comments_proxy_pass');   
 if($afabaefbdaae=="") { ?> <div class="notice notice-error is-dismissible"> <p><?php  echo ' OpenAI .';?></p> <button type="button" class="notice-dismiss"><span class="screen-reader-text">.</span></button> </div> <?php  } else{ $api_key = $afabaefbdaae;  
 $url = 'https://api.openai.com/v1/engines'; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'Authorization: Bearer ' . $api_key));   if ( ! empty($proxy_ip) and ! empty($proxy_port)) {   $proxy = "{$proxy_ip}:{$proxy_port}";   if ( ! empty($proxy_login) and ! empty($proxy_pass)) {    $proxy = "{$proxy_login}:{$proxy_pass}@" . $proxy;   }   curl_setopt($ch, CURLOPT_PROXY, $proxy);  } $response = curl_exec($ch); curl_close($ch); $data = json_decode($response, true); if (isset($data['data']) && is_array($data['data'])) {  
 } else { ?> <div class="notice notice-error is-dismissible"> <p><?php  echo base64_decode('T3BlbkFJIEtleSBpcyBpbnZhbGlkLg==');?></p> <button type="button" class="notice-dismiss"><span class="screen-reader-text">.</span></button> </div> <?php  } }  
 ?>  <div class="wrap">   <h1>Ai comments </h1> <form method="post" action="">    <?php  wp_nonce_field('dfabdfcdafffedfef'); ?> <div class="wrap">  <h1>  Ai comments</h1>  <h2 class="nav-tab-wrapper">   <a href="#tab1" class="nav-tab nav-tab-active"> </a>   <a href="#tab2" class="nav-tab"></a>   <a href="#tab4" class="nav-tab"></a> <?php  if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) { ?> <a href="#tab3" class="nav-tab"> WooCommerce </a>   <a href="#tab5" class="nav-tab">WooCommerce </a> <?php  } ?>  </h2>   <div id="tab1" class="tab-content" style='display:block'>    <table class="form-table">     <tbody>      <tr>       <th scope="row"><label for="bffbbdecde"><?php  echo ' ';?></label></th>       <td><input type="text" name="bffbbdecde" id="bffbbdecde" class="regular-text" value="<?php  echo esc_attr($abedeafe); ?>">  <br>  <?php     $efafadfaecddb=esc_attr($abedeafe);  $cfdaacfaadc=dacfecfbeba($efafadfaecddb);  if($cfdaacfaadc===true)  {    
  }  elseif($efafadfaecddb!="")  {  ?>  <div class="notice notice-error is-dismissible">   <p><?php  echo 'Error:  .   .';?></p>   <button type="button" class="notice-dismiss"><span class="screen-reader-text">.</span></button>  </div>  <?php     }  else  {  ?>  <div class="notice notice-error is-dismissible">   <p><?php  echo base64_decode('QWN0aXZhdGlvbiBpcyByZXF1aXJlZC4=');?></p>   <button type="button" class="notice-dismiss"><span class="screen-reader-text">.</span></button>  </div>  <?php   }  ?>  </td>      </tr>      <tr>       <th scope="row"><label for="afabaefbdaae">OpenAI Key</label></th>       <td><input type="text" name="afabaefbdaae" id="afabaefbdaae" class="regular-text" value="<?php  echo esc_attr($afabaefbdaae); ?>"></td>      </tr>     <?php    $schedulers = [       base64_decode('ZXZlcnlfbWludXRl') => [ 'display' => __( '  AI' ) ],       'hourly' => [ 'display' => __( '  AI' ) ],  'twohourly' => [ 'display' => __( ' 2  AI' ) ],  'fourhourly' => [ 'display' => __( ' 4  AI' ) ],       'twicedaily' => [ 'display' => __( '    AI' ) ],       'daily' => [ 'display' => __( '   AI' ) ],       'weekly' => [ 'display' => __( '   AI' ) ],       'monthly' => [ 'display' => __( '   AI' ) ],      ];  ?>  <tr>  <th>  <label for="ai_creativity"> <span id='creativity_val'>(<?php  echo $creativity;?>)</span></label>  </th>  <td>  <input style='max-width:350px; width:100%;' onchange='document.getElementById("creativity_val").innerHTML="("+this.value+")" 'type="range" id="ai_creativity" name="ai_creativity" min="0" max="10" value="<?php  echo $creativity; ?>" step=".1">  </td>  </tr>  <tr>  <th scope="row"><label for="comments_interval">  </label></th>  <td> <select name='comments_interval' id='comments_interval' required style='max-width:350px; width:100%;'>  <?php   foreach ($schedulers as $k=>$v)  {  $selected="";  if($comments_interval==$k)$selected="selected";  echo "<option value='{$k}' $selected>{$v['display']}</option>";  }  ?>  </select>  </td>     </tr>     <tr>      <th scope="row"><label for="bafffbdeadf">   </label></th>      <td><input type="number" name="bafffbdeadf" id="bafffbdeadf" class="regular-text" value="<?php  echo esc_attr($bafffbdeadf); ?>" min="1" step="1"></td>     </tr>     <tr>      <th scope="row"><label for="tokens"> </label></th>      <td><input type="number" name="tokens" id="tokens" class="regular-text" value="<?php  echo esc_attr($tokens); ?>" min="1" step="1"></td>     </tr>  <?php   $display="";   
 ?>     <tr <?php  echo $display;?>>      <th scope="row"><label for="users_list">  <br><i style='font-weight:normal;'>(     )</i></label></th>      <td><textarea name="users_list" id="users_list" rows="5" class="regular-text"><?php  echo esc_textarea($users_list); ?></textarea></td>     </tr>      <tr>      <th scope="row"><label for="post_from_user_mode">  </label></th>      <td>  <select style='max-width:350px; width:100%;' name="post_from_user_mode" id="post_from_user_mode">  <?php   $selected="";  if($post_from_user_mode=="random_wp_users")  $selected="selected";  ?>  <option value='random_wp_users' <?php  echo $selected;?>>  Worpress</option>  <?php  $selected=""; if($post_from_user_mode=="random_custom_users")$selected="selected";?>  <option value='random_custom_users' <?php  echo $selected;?>>   " "</option>  <?php  $selected=""; if($post_from_user_mode=="random_user")$selected="selected";?>  <option value='random_user' <?php  echo $selected;?>>  </option>  </select>  </td>     </tr>  <?php   $display="";   
 ?>  <tr <?php  echo $display;?>>  <th>    :</th>  <td>    <?php   $user_roles = get_editable_roles();     foreach ( $user_roles as $role => $details ) {  $checked = in_array( $role,$allowed_roles) ? 'checked="true"' : '';  echo '<input type="checkbox" name="eeddbedf[]" value="' . $role . '" '.$checked.'">' . $details['name'] .'<br>';    }   ?>  </td>  </tr>   <tr>  <th> </th>  <td>  <?php   $ddface = get_option( 'ddface' );  echo '<input type="checkbox" id="ddface" name="ddface" value="1"' . checked( 1, $ddface, false ) . ' />';  ?>  </td>  </tr>  <tr>  <?php   $lag_option=get_option("ai_comments_lang","all");  ?>  <th scope="row"><label for="comments_lang">   .</label></th>  <td> <select name='comments_lang' id='comments_lang' required style='max-width:350px; width:100%;'>  <option value='all' <?php  if($lag_option=="all") echo "selected";?>> </option>  <option value='ru_only' <?php  if($lag_option=="ru_only") echo "selected";?>></option>  <option value='en_only' <?php  if($lag_option=="en_only") echo "selected";?>></option>    </select>  </td>     </tr>     <tr>      <th scope="row"><label for="ai_comments_proxy_ip">IP </label></th>      <td><input type="text" name="ai_comments_proxy_ip" id="ai_comments_proxy_ip" class="regular-text" value="<?php  echo esc_attr($proxy_ip); ?>"></td>     </tr>     <tr>      <th scope="row"><label for="ai_comments_proxy_port"> </label></th>      <td><input type="text" name="ai_comments_proxy_port" id="ai_comments_proxy_port" class="regular-text" value="<?php  echo esc_attr($proxy_port); ?>"></td>     </tr>     <tr>      <th scope="row"><label for="ai_comments_proxy_login"> </label></th>      <td><input type="text" name="ai_comments_proxy_login" id="ai_comments_proxy_login" class="regular-text" value="<?php  echo esc_attr($proxy_login); ?>"></td>     </tr>     <tr>      <th scope="row"><label for="ai_comments_proxy_pass"> </label></th>      <td><input type="text" name="ai_comments_proxy_pass" id="ai_comments_proxy_pass" class="regular-text" value="<?php  echo esc_attr($proxy_pass); ?>"></td>     </tr>     </tbody>   </table>    </div>   <div id="tab2" class="tab-content"> <?php   $comments_disabled_checked=get_option("comments_disabled");  $comments_answer_disabled_checked=get_option("comments_answer_disabled");  $comments_auto=get_option("comments_auto");  $max_comments=get_option("max_comments",1);  $max_answers=get_option("max_answers",1);   $woo_max_comments=get_option("woo_max_comments",1);  $woo_max_answers=get_option("woo_max_answers",1);   $post_date=get_option("post_date",date("Y-m-d"));  $woo_post_date=get_option("woo_post_date",date("Y-m-d"));  if($comments_auto!="")$comments_auto='checked="true"';  ?>  <input type="checkbox" name="comments_auto" id="comments_auto" value="comments_auto" <?php  echo $comments_auto;?>> <label for='comments_auto'>      .</label><br><br>  <?php   if($comments_disabled_checked!="")$comments_disabled_checked='checked="true"';  ?>  <input type="checkbox" name="comments_disabled" id="comments_disabled" value="comments_disabled" <?php  echo $comments_disabled_checked;?>> <label for='comments_disabled'>  .</label><br>  <?php   $comments_answer_disabled_checked=get_option("comments_answer_disabled");  if($comments_answer_disabled_checked!="")$comments_answer_disabled_checked='checked="true"';  ?>  <input type="checkbox" name="comments_answer_disabled" id="comments_answer_disabled" value="comments_answer_disabled" <?php  echo $comments_answer_disabled_checked;?>> <label for='comments_answer_disabled'>    .</label><br>   <table class="form-table">     <tbody>  <?php   $comments_stop_words=get_option("stop_words");  ?>  <tr>      <th scope="row"><label for="stop_words">     </label></th>      <td><textarea style='width:350px' name="stop_words" id="stop_words" placeholder='      '><?php  echo $comments_stop_words;?></textarea><br></td>     </tr>  <tr>      <th scope="row"><label for="post_date">,       </label></th>      <td><input type="date" name="post_date" id="post_date" class="regular-text" value="<?php  echo esc_attr($post_date); ?>" min="1" step="1"></td>     </tr>  <tr>      <th scope="row"><label for="max_comments">  </label></th>      <td><input type="number" name="max_comments" id="max_comments" class="regular-text" value="<?php  echo esc_attr($max_comments); ?>" min="0" step="1"></td>     </tr>  <tr>      <th scope="row"><label for="max_answers">  </label></th>      <td><input type="number" name="max_answers" id="max_answers" class="regular-text" value="<?php  echo esc_attr($max_answers); ?>" min="0" step="1"></td>     </tr>  <tr>      <th scope="row">   </th>      <td>    <?php   $args = array(  'taxonomy' => 'category',  'orderby' => 'count',  'order' => 'DESC',  );   $categories = get_terms( $args );    $cat_count=count($categories);  ?>  <script>  var selected=false;  function ai_select_all_cat(count)  {     selected=!selected;   if(selected==false)   document.getElementById("ai_select_all_cat_button").value=" ";   else   document.getElementById("ai_select_all_cat_button").value="";     for(var i=0;i<count;i++)   {     document.getElementById("bbbbbbfbdaeafc_"+i).checked=selected;   }     }  </script>  <input id='ai_select_all_cat_button' onclick='ai_select_all_cat(<?php  echo $cat_count;?>);' type='button' name='ai_all_categ' value='Select all categories' style='max-width:350px;width:100%;' class='button button-secondary'>  <br>  <br>  <div style="max-height: 200px; overflow:auto;background:white;box-shadow: 0 0 0 transparent;  border-radius: 4px;  border: 1px solid #8c8f94;  background-color: #fff;  color: #2c3338;padding:4px;  max-width:340px;  " >  <?php       $cnt=0;  foreach ( $categories as $category )   {   $checked="";   foreach($bbbbbbfbdaeafc as $cat)   {     if($cat==$category->term_id)$checked="checked";   }   echo '<input type="checkbox" name="bbbbbbfbdaeafc[]" value="' . $category->term_id . '" '.$checked.' id="bbbbbbfbdaeafc_'.$cnt.'">' . $category->name .' ('.$category->count.')<br>';   $cnt++;  }    if($cnt==count($bbbbbbfbdaeafc))   echo "<script>ai_select_all_cat();</script>";     ?>  </div>  </td>     </tr>  </tbody> </table>  </div> <?php  if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) { ?>  <div id="tab3" class="tab-content">  <?php   $woo_max_rating=get_option("woo_max_rating",5);  $woo_min_rating=get_option("woo_min_rating",0);  $woo_comments_auto=get_option("woo_comments_auto");  $woo_comments_disabled_checked=get_option("woo_comments_disabled");  $woo_comments_answer_disabled_checked=get_option("woo_comments_answer_disabled");  if($woo_comments_auto!="")$woo_comments_auto='checked="true"';  ?>  <input type="checkbox" name="woo_comments_auto" id="woo_comments_auto" value="woo_comments_auto" <?php  echo $woo_comments_auto;?>> <label for='woo_comments_auto'>      .</label><br><br>  <?php   if($woo_comments_disabled_checked!="")$woo_comments_disabled_checked='checked="true"';  ?>  <input type="checkbox" name="woo_comments_disabled" id="woo_comments_disabled" value="woo_comments_disabled" <?php  echo $woo_comments_disabled_checked;?>> <label for='woo_comments_disabled'>  WooCommerce</label><br>  <?php    if($woo_comments_answer_disabled_checked!="")$woo_comments_answer_disabled_checked='checked="true"';  ?>  <input type="checkbox" name="woo_comments_answer_disabled" id="woo_comments_answer_disabled" value="woo_comments_answer_disabled" <?php  echo $woo_comments_answer_disabled_checked;?>> <label for='woo_comments_answer_disabled'>    WooCommerce</label><br>    <table class="form-table">     <tbody>  <tr>      <th scope="row"><label for="woo_stop_words">  </label></th>      <td>  <div>   <label for="min">Min :</label><br>   <input type="range" id="min" name='woo_min_rating' min="0" max="5" value="<?php  echo $woo_min_rating;?>">   <span id="min-value"><?php  echo $woo_min_rating;?></span>  </div>  <div>   <label for="max">Max :</label><br>   <input type="range" id="max" name='woo_max_rating' min="0" max="5" value="<?php  echo $woo_max_rating;?>">   <span id="max-value"><?php  echo $woo_max_rating;?></span>  </div>  <script>   const minSlider = document.getElementById('min');   const maxSlider = document.getElementById('max');   const minValueElement = document.getElementById('min-value');   const maxValueElement = document.getElementById('max-value');      
  minSlider.addEventListener('input', function() {  const minValue = parseInt(minSlider.value);  const maxValue = parseInt(maxSlider.value);    if (minValue > maxValue) {    
    
   maxSlider.value = minValue;  }      
  minValueElement.textContent = minValue;  maxValueElement.textContent = maxValue;   });      
  maxSlider.addEventListener('input', function() {  const minValue = parseInt(minSlider.value);  const maxValue = parseInt(maxSlider.value);    if (maxValue < minValue) {    
    
   minSlider.value = maxValue;  }      
  minValueElement.textContent = minValue;  maxValueElement.textContent = maxValue;   });  </script>  </td>     </tr>  <?php   $woo_comments_stop_words=get_option("woo_stop_words");  ?>  <tr>      <th scope="row"><label for="woo_stop_words">     </label></th>      <td><textarea style='width:350px' name="woo_stop_words" id="woo_stop_words" placeholder='      '><?php  echo $woo_comments_stop_words;?></textarea><br></td>     </tr>       <th scope="row"><label for="woo_post_date">,       </label></th>      <td><input type="date" name="woo_post_date" id="woo_post_date" class="regular-text" value="<?php  echo esc_attr($woo_post_date); ?>" min="1" step="1"></td>     </tr>  <tr>      <th scope="row"><label for="woo_max_comments">  </label></th>      <td><input type="number" name="woo_max_comments" id="woo_max_comments" class="regular-text" value="<?php  echo esc_attr($woo_max_comments); ?>" min="0" step="1"></td>     </tr>  <tr>      <th scope="row"><label for="woo_max_answers">  </label></th>      <td><input type="number" name="woo_max_answers" id="woo_max_answers" class="regular-text" value="<?php  echo esc_attr($woo_max_answers); ?>" min="0" step="1"></td>     </tr>  <tr>      <th scope="row">    WooCommerce</th>      <td>  <?php   $args = array(  'taxonomy' => 'category',  'orderby' => 'count',  'order' => 'DESC',  );    $args = array(  'taxonomy' => 'product_cat',  'hide_empty' => false,  );  $categories_woo = get_terms($args);  $cat_count_woo=count($categories_woo);  ?>  <script>  var selected=false;  function ai_select_all_cat_woo(count)  {   selected=!selected;   if(selected==false)   document.getElementById("ai_select_all_cat_button_woo").value=" ";   else   document.getElementById("ai_select_all_cat_button_woo").value="";     for(var i=0;i<count;i++)   {     document.getElementById("bbbbbbfbdaeafc_woo_"+i).checked=selected;   }     }  </script>  <input id='ai_select_all_cat_button_woo' onclick='ai_select_all_cat_woo(<?php  echo $cat_count_woo;?>);' type='button' name='ai_all_categ_woo' value='Select all categories' style='max-width:350px;width:100%;' class='button button-secondary'>  <br>  <br>  <div style="max-height: 200px; overflow:auto;background:white;box-shadow: 0 0 0 transparent;  border-radius: 4px;  border: 1px solid #8c8f94;  background-color: #fff;  color: #2c3338;padding:4px;  max-width:340px;  " >  <?php     $cnt=0;    foreach ( $categories_woo as $category )   {   $checked="";   foreach($bbbbbbfbdaeafc_woo as $cat)   {     if($cat==$category->term_id)$checked="checked";   }   echo '<input type="checkbox" name="bbbbbbfbdaeafc_woo[]" value="' . $category->term_id . '" '.$checked.' id="bbbbbbfbdaeafc_woo_'.$cnt.'">' . $category->name .' ('.$category->count.')<br>';   $cnt++;  }  if($cnt==count($bbbbbbfbdaeafc_woo))   echo "<script>ai_select_all_cat_woo();</script>";     ?>  </div>  </td>     </tr>  </tbody> </table>  </div> <?php  }  
function getPrompt($postfix='',$h3=""){ if($postfix!="") $postfix="_".$postfix; $prompt = get_option('dccdbdfadbbeab'.$postfix); ?> <table style='width:100%;'> <tbody style='width:100%;'> <tr> <?php  if($postfix==''){ ?>   <td colspan='2'><i style='font-weight:normal;border-left: 4px solid orange;margin-left:-12px;' class='notice notice-success '>    ,      (, 'Use Spanish to publish comment').</i>  <br><br>  <i style='font-weight:normal;border-left: 4px solid orange;margin-left:-12px;' class='notice notice-success '>     ,      .  </i>  <br><br>  <i style='display:block;font-weight:normal;border-left: 4px solid orange;margin-left:-12px;' class='notice notice-success '>       :<br>  1. {content_300} -     300 .    300      content_555, content_777, content_888         . ,   ,      ,       .      {content}.<br>  2. {category} -  .<br>  3. {max_tokens} -         "".<br>  4. {comment} -       "    ".<br>       . <br>   </i>  </td> <?php  } if($postfix=='_woo_comment') { ?>   <td colspan='2'><i style='font-weight:normal;border-left: 4px solid orange;margin-left:-12px;' class='notice notice-success '>    ,      (, 'Use Spanish to publish comment').</i>  <br><br>  <i style='font-weight:normal;border-left: 4px solid orange;margin-left:-12px;' class='notice notice-success '>     ,      .  </i>  <br><br>  <i style='display:block;font-weight:normal;border-left: 4px solid orange;margin-left:-12px;' class='notice notice-success '>       :<br>  1. {description} -  .<br>  2. {category} -  .<br>  3. {max_tokens} -         "".<br>  4. {comment} -       "    ".<br>       . <br>   </i>  </td>    <?php  } $prompt=$prompt_arr[0] = get_option("dccdbdfadbbeab{$postfix}_"."0"); ?>  </tr>      <tr>   <td colspan="2" scope="row" style='width:100px;max-width:100px;'>  <h3><?php  echo $h3;?></h3>   </td>  </tr>      <tr>        <th scope="row" style='width:100px;max-width:100px;'>    <label for="prompt<?php  echo $postfix;?>_0" > 1</label></th>         <td><input style='width:100%' type="text" placeholder=' ' name="prompt<?php  echo $postfix;?>_0" id="prompt<?php  echo $postfix;?>_0" class="regular-text"   value="<?php  echo esc_attr(stripslashes($prompt_arr[0])); ?>"></td>  </tr>   <?php   $prompt_arr[0]="";  for ($i=1;$i<100;$i++)  {  $prompt_arr[$i] = get_option("dccdbdfadbbeab{$postfix}_".$i);   if($i==1 and $prompt_arr[$i]=="" and $prompt=="")continue;  elseif($prompt_arr[$i]=="" and $prompt_arr[$i-1]=="" and $i>1)continue;  ?>  <tr>       <th scope="row"><label for="prompt<?php  echo $postfix."_"; echo $i;?>"> <?php  echo $i+1;?></label></th>       <td><input style='width:100%' type="text" placeholder=' ' name="prompt<?php  echo $postfix."_"; echo $i;?>" id="prompt<?php  echo $postfix."_"; echo $i;?>" class="regular-text" value="<?php  echo esc_attr(stripslashes($prompt_arr[$i])); ?>"></td>  </tr>  <?php   }  ?>  </tbody>  </table> <?php  }  
?> <div id="tab4" class="tab-content"> <?php  getPrompt("","  "); getPrompt("comment_answer","    "); ?>  </div> <?php  if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) { ?> <div id="tab5" class="tab-content">   <?php  getPrompt("woo_comment","  "); getPrompt("woo_comment_answer","    "); ?>  </div> <?php  }?> </div> <style> /* For modern browsers */ ::placeholder { color: #aaa; /* Placeholder color */ } /* For older versions of Firefox */ ::-moz-placeholder { color: #aaa; /* Placeholder color */ } /* For older versions of Chrome and Safari */ ::-webkit-input-placeholder { color: #aaa; /* Placeholder color */ } /* For older versions of Edge */ :-ms-input-placeholder { color: #aaa; /* Placeholder color */ }  .nav-tab-wrapper {   margin-top: 20px;  }   .nav-tab {   padding: 10px 15px;   border: 1px solid #ccc;   background-color: #f9f9f9;   border-radius: 4px 4px 0 0;   text-decoration: none;   }   .nav-tab-active {   background-color: #f0f0f1;   border-bottom-color: transparent; border-bottom: 4px solid #f0f0f1!important;  }   .tab-content {   padding: 20px;   border: 1px solid #ccc;   border-top: none;   display: none;  }   .tab-content:first-child {   display: block;  } </style> <script>  document.addEventListener('DOMContentLoaded', function() {   var tabs = document.querySelectorAll('.nav-tab');   var tabContents = document.querySelectorAll('.tab-content');   function switchTab(event) {    event.preventDefault();    var target = event.target;    var tabId = target.getAttribute('href');    tabs.forEach(function(tab) {     tab.classList.remove('nav-tab-active');    });    tabContents.forEach(function(content) {     content.style.display = 'none';    });    target.classList.add('nav-tab-active');    document.querySelector(tabId).style.display = 'block';     
   localStorage.setItem('activeTab', tabId);   }   tabs.forEach(function(tab) {    tab.addEventListener('click', switchTab);   });    
  var activeTab = localStorage.getItem('activeTab');   if (activeTab) {    var tabLink = document.querySelector('a[href="' + activeTab + '"]');    if (tabLink) {     tabLink.click();    }   }  }); </script>     <?php  submit_button(); ?>  </form> <?php   
 ?> <button id="ia-test-button"> </button> <div id='ai_test_response' style='width:100%;margin-top:10px;background:white;'></div> <script> jQuery( document ).ready( function( $ ) { $( '#ia-test-button' ).on( 'click', function() {  var activeTab = localStorage.getItem('activeTab').replace(/#/g, '');     $("#ai_test_response").html("<div class='notice notice-success'>.  ...</div>"); jQuery.ajax({  type: 'POST',  url: ajaxurl,  data: {  action: 'my_ajax_function',  tab: activeTab  },  success: function(response) {  if(response=="" )  {  response="<div class='notice notice-error'>    AI.   .</div>";  $("#ai_test_response").html(response);  return;  }  if( response.indexOf("Error:") !== -1 )  {  response="<div class='notice notice-error'>"+response+"</div>";  $("#ai_test_response").html(response);  return;  }  $("#ai_test_response").html("<div class='notice notice-success'>"+response+"</div>");  },  error: function(response)  {   response="<div class='notice notice-error'> .  ."+response.responseText+"</div>";  $("#ai_test_response").html(response);  } }); }); }); </script> <?php   
 ?> <div class='notice notice-success is-dismissible' style='border-left: 4px solid orange;'> If there are issues with the standard WordPress scheduler, add the following line to wp-config.php: <br> define('ALTERNATE_WP_CRON', true); </div>   </div> <?php  }  
function my_enqueue() {  wp_enqueue_script( 'jquery' ); } add_action( 'wp_enqueue_scripts', 'my_enqueue' ); function my_ajax_function() {  global $echo_text; $data=eceeeceffadca(); if($echo_text) echo $data;  die(); } add_action( 'wp_ajax_my_ajax_function', 'my_ajax_function' ); add_action( 'wp_ajax_nopriv_my_ajax_function', 'my_ajax_function' );  
  
function eceeeceffadca($post_id=0) { if(dacfecfbeba($abedeafe = get_option('aedadcfdbbbcee_key'))==true) {  return cafbdfcdb($post_id);  } } add_action( "my_ai_hook", 'eceeeceffadca' ); function get_random_user() {  $domains = array('mail.ru', 'yandex.ru', 'gmail.com', 'hotmail.com');  $names = array('Alex', 'Kate', 'Maxx', 'Anna', 'Mari', 'NintendoBoy', 'DeMos', 'Mark', 'Kolya', 'Valeri', 'Valera', '', 'Anton', 'Lena', 'Andrey', 'Sasha', 'Irina', 'Vladimir', 'Diana', 'Artem', 'Oksana', 'Viktor', 'Veronica', 'Pavel', 'Julia', 'Boris', 'Olga', 'Roman', 'Tanya', 'Kirill', 'Natalia', 'Ivan', 'Elena', 'Dmitry', 'Svetlana', 'Nikita', 'Maria', 'Sergey', 'Elizaveta', 'Vladislav', 'Ekaterina', 'Nikolay', 'Alina', 'Igor', 'Yulia', 'Alexey', 'Anna', 'Evgeny', 'Ksenia', 'Ilya', 'Polina', 'Vasily', 'Marina', 'Denis', 'Yana', 'Konstantin', 'Victoria', 'Vlad', 'Elena', 'Semyon', 'Anastasia', 'Stepan', 'Irina', 'Timur', 'Galina', 'Fedor', 'Sofia', 'Mikhail', 'Valentina', 'Ruslan', 'Larisa', 'Vyacheslav', 'Angelina', 'Egor', 'Anzhelika', 'Yaroslav', 'Nina', 'Daniil', 'Rita', 'Gleb', 'Yuliya', 'Aleksandr', 'Margarita', 'Yaroslava', 'Elina', 'Filipp', 'Vera', 'Stanislav', 'Lyubov', 'Bogdan', 'Alla');  $randomDomain = $domains[array_rand($domains)];  
 $randomName = $names[array_rand($names)];  
  $username = generate_username($randomName);  $email = $username . '@' . $randomDomain;  return array('author_email' => $email, 'author_name' => $username); } function generate_username($name) {   
   
 $randomNumber = rand(1, 99); $randomNumber1=rand(0, 10); if($randomNumber1!=1)$randomNumber="";  return strtolower($name) . $randomNumber; } function add_comment_on_post_publish($post_id) { global $echo_text; $echo_text=false;   $comments = get_comments(array('post_id' => $post_id));    if (empty($comments)) {   eceeeceffadca($post_id);  } } add_action('wp_insert_post', 'add_comment_on_post_publish'); add_action('save_post', 'add_comment_on_post_publish');  ?>

Did this file decode correctly?

Original Code

<?php  /**
 * Plugin Name: Ai comments
 * Description: The comments plugin for Ai comments provides users with the ability to leave comments on the pages and entries of the site. This plugin allows you to improve interaction with the audience and create a community around your content.
 * Version: 3.1
 * Author: Smmprofit */ 
set_time_limit(0); $echo_text=true; if(!isset($_POST['tab']))$_POST['tab']=""; add_filter( 'cron_schedules', 'fdcdcaadfacf' ); function fdcdcaadfacf( $schedules ) {  $schedules[base64_decode('ZXZlcnlfbWludXRl')] = array(   'interval' => 60, 
  'display' => __( base64_decode('RXZlcnkgTWludXRl') ),  );  $schedules['twohourly'] = array(   'interval' => 7200,   'display' => __( ' 2  AI' ),  );  $schedules['fourhourly'] = array(   'interval' => 14400,   'display' => __( ' 4  AI' ),  );  return $schedules; } 
 
 
$efcfbcbbec = get_option('eabfbcfbbfcf'); $ebeffbedaeadad = 'gpt-4o'; $caecfcfbeef = base64_decode('dGV4dC1kYXZpbmNpLTAwMw=='); 
 function fccccddffbcd($prompt) { $efcfbcbbec = get_option('eabfbcfbbfcf'); global $ebeffbedaeadad; global $caecfcfbeef; $data = [ "input" => $prompt, ]; $post_json = json_encode($data); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, base64_decode('aHR0cHM6Ly9hcGkub3BlbmFpLmNvbS92MS9tb2RlcmF0aW9ucw=='));  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_json); $headers = []; $headers[] = "Content-Type: application/json"; $headers[] = "Authorization: Bearer $efcfbcbbec"; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);  $proxy_ip = get_option('ai_comments_proxy_ip');  $proxy_port = get_option('ai_comments_proxy_port');  $proxy_login = get_option('ai_comments_proxy_login');  $proxy_pass = get_option('ai_comments_proxy_pass');  if ( ! empty($proxy_ip) and ! empty($proxy_port)) {   $proxy = "{$proxy_ip}:{$proxy_port}";   if ( ! empty($proxy_login) and ! empty($proxy_pass)) {    $proxy = "{$proxy_login}:{$proxy_pass}@" . $proxy;   }   curl_setopt($ch, CURLOPT_PROXY, $proxy);  } $result = curl_exec($ch); curl_close($ch); $gettext = json_decode($result, true); if(!isset($gettext["results"]))return false; if(!isset($gettext["results"][0]))return false; $textoutput = $gettext["results"][0]["flagged"]; if ($textoutput == "1") {  return false;  } return true; } 
function validateLang($string) { $lang=$lag_option=get_option("ai_comments_lang","all"); if($lang=="ru_only") return CyrillicOnly($string); elseif($lang=="en_only") return LatinOnly($string); else return $string; } 
function LatinOnly($string) {  $latinChars = preg_match_all('/[a-zA-Z]/', $string, $matches);  $totalChars = strlen($string);   if ($totalChars === 0) {   return 0;  }   $latinPercentage = ($latinChars / $totalChars)
 * 100;  if(strpos($string,"Error:")!==false)return $string; if(round($latinPercentage, 2)>50)return $string; return "Error: Wrong language detected. Specify correct langage in prompt.{$string}"; } 
function CyrillicOnly($string) {  $cyrillicChars = preg_match_all('/[--]/u', $string, $matches);  $totalChars = mb_strlen($string, 'UTF-8');   if ($totalChars === 0) {   return 0;  }   $cyrillicPercentage = ($cyrillicChars / $totalChars)
 * 100; if(strpos($string,"Error:")!==false)return $string;  if(round($cyrillicPercentage, 2)>50)return $string; return "Error:      .     . {$string}"; } 
function bafaddcfba($prompt,$mode, $max_tokens=3000) {   $afabaefbdaae = get_option('eabfbcfbbfcf');     $ai_creativity=get_option('ai_creativity',7)/10; if(!fccccddffbcd($prompt))return ""; $efcfbcbbec = get_option('eabfbcfbbfcf'); global $ebeffbedaeadad; global $caecfcfbeef;  $messages=array(array("role" => "user","content" => $prompt)); $data = array(  "model" => $ebeffbedaeadad,  "messages" => $messages,  "max_tokens" => (int) $max_tokens,  "temperature" => (double)$ai_creativity,    );    $post_json = json_encode($data); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, base64_decode('aHR0cHM6Ly9hcGkub3BlbmFpLmNvbS92MS9jaGF0L2NvbXBsZXRpb25z')); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_json);  $headers = []; $headers[] = "Content-Type: application/json"; $headers[] = "Authorization: Bearer $efcfbcbbec"; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);    $proxy_ip = get_option('ai_comments_proxy_ip');    $proxy_port = get_option('ai_comments_proxy_port');    $proxy_login = get_option('ai_comments_proxy_login');    $proxy_pass = get_option('ai_comments_proxy_pass');    if ( ! empty($proxy_ip) and ! empty($proxy_port)) {     $proxy = "{$proxy_ip}:{$proxy_port}";     if ( ! empty($proxy_login) and ! empty($proxy_pass)) {      $proxy = "{$proxy_login}:{$proxy_pass}@" . $proxy;     }     curl_setopt($ch, CURLOPT_PROXY, $proxy);    }  $result = curl_exec($ch); if (curl_errno($ch)) {    } $gettext = json_decode($result, true); if(isset($gettext["error"]))  if(isset( $gettext["error"]["message"]))  {  return "Error: {$gettext["error"]["message"]}";  } if(!isset($gettext))return ""; if(!isset($gettext['choices']))return ""; $aioutput = $gettext['choices'][0]['message']['content']; curl_close($ch); $aioutput=validateLang($aioutput);  if($mode=='comment')  if(checkStopWords($aioutput,get_option("stop_words")))return "Error:  '{$aioutput}'    "; if($mode=='woo')  if(checkStopWords($aioutput,get_option("woo_stop_words")))return "Error:  '{$aioutput}'    "; return $aioutput; } 
function checkStopWords($text, $stopWords) {  $words = explode(',', $stopWords);  foreach ($words as $word) {   $word = trim($word); if($word=='')continue;   if (strpos($text, $word) !== false) {    return true;   }  }  return false; } 
 
 
function get_post_data($post_id) {  $post = get_post($post_id); 
  if ($post) {   $category = get_the_category($post_id); 
  $text = $post->post_content; 
  $title = $post->post_title; 
   
  $post_data = array(    'category' => $category[0]->name,    'text' => $text,    'title' => $title   );   return $post_data;  }  return null; 
} 
function woo_get_reply_count($comment_id) {  
 $replies = get_comments(array(   'parent' => $comment_id,   'status' => 'approve' 
 ));  
 $reply_count = count($replies);  return $reply_count; } 
function get_random_top_level_woo_comment_data($product_id) {  
 $comments = get_comments(array(   'post_id' => $product_id,   'parent' => 0, 
  'status' => 'approve' 
 ));  if ($comments) {   
  $random_comment = $comments[array_rand($comments)];   
  $comment_id = $random_comment->comment_ID;   $comment_text = $random_comment->comment_content;   $reply_count = woo_get_reply_count($comment_id);   
  return array(    'comment_id' => $comment_id,    'comment_text' => $comment_text,    'reply_count' => $reply_count   );  }  return null; } 
function remove_img_tags($html) {  
 $pattern = '/<img\b[^>]*>/i';  
 $filtered_html = preg_replace($pattern, '', $html);  return $filtered_html; } 
function ai_get_woo_random_comment_data($cnt=0,$mode='comment',$product_id=0) { if($cnt>100)return false; if($product_id!=0){  $product_categories = wp_get_post_terms($product_id, 'product_cat'); foreach ($product_categories as $category) { $category_name = $category->name; break; } $product = get_post($product_id); $product_description = remove_img_tags(trim($product->post_title.". ".$product->post_content)); if(mb_strlen($product_description)<4) { return false; } $comment_data = array(  base64_decode('cHJvZHVjdF9pZA==') => $product_id,  'product_category' => $category_name,  'product_description' => $product_description,    );   return $comment_data; }  $categories_woo = explode("^|^", get_option('bbbbbbfbdaeafc_woo'));  $woo_max_comments = get_option("woo_max_comments", 1); $woo_max_answers = get_option("woo_max_answers", 1);  $woo_post_date = get_option("woo_post_date", 1);  if($mode=="answer")$woo_max_comments=2000;  
 $random_category = $categories_woo[array_rand($categories_woo)];  
 $args = array(   'post_type' => 'product', 
  'posts_per_page' => 10,   'orderby' => 'rand', 
  'date_query' => array(    array(     'column' => 'post_date',     'after' => $woo_post_date, 
   ),   ),   'tax_query' => array(    array(     'taxonomy' => 'product_cat', 
    'field' => 'term_id',     'terms' => $random_category, 
   ),   ),    );  $query = new WP_Query($args);  if ($query->have_posts()) {   $query->the_post();   $product_id = get_the_ID(); $product = get_post($product_id); $product_description = trim(strip_tags($product->post_title.". ".get_the_content()));   $ctl=woo_count_top_level_comments($product_id);  
 $categories = get_the_terms($product_id, 'product_cat'); $bcebabdeecaaa = $random_category; 
 $category = get_term_by('id', $bcebabdeecaaa, 'product_cat'); if ($category) { $category_name = $category->name;  } wp_reset_postdata(); if($mode=='comment'){  if ($ctl < $woo_max_comments) {     
  $comment_data = array(  base64_decode('cHJvZHVjdF9pZA==') => $product_id,  'product_category' => $category_name,  'product_description' => $product_description,    );  if(mb_strlen($product_description)<4)  {  return ai_get_woo_random_comment_data($cnt+1,$mode);  }  return $comment_data;  }  else  return ai_get_woo_random_comment_data($cnt+1,$mode); } elseif($mode=='answer'){  $c_data=get_random_top_level_woo_comment_data($product_id);  if($c_data==null)  return ai_get_woo_random_comment_data($cnt+1,$mode);  $comment_id=$c_data['comment_id'];  $comment_text=$c_data['comment_text'];  $reply_count=$c_data['reply_count'];  if($reply_count>$woo_max_answers)return ai_get_woo_random_comment_data($cnt+1,$mode);     
  $comment_data = array(  base64_decode('cHJvZHVjdF9pZA==') => $product_id,  'product_category' => $category_name,  'product_description' => $product_description,  'comment_id' => $comment_id,  'comment_content' => $comment_text,  );  return $comment_data; }  }  return ai_get_woo_random_comment_data($cnt+1,$mode); } 
function count_top_level_comments($post_id) {  $comments = get_comments(array(   'post_id' => $post_id,   'parent' => 0, 
  'status' => 'approve' 
 ));  return count($comments); } 
function woo_count_top_level_comments($product_id) {  
 $product = wc_get_product($product_id);  
 if ($product) {   
  $post_id = $product->get_id();   
  $comments = get_comments(array(    'post_id' => $post_id,    'parent' => 0, 
   'status' => 'approve' 
  ));   return count($comments);  }  return 0; } 
function ai_get_random_comment_data($cnt=0,$mode='comment',$post_id=0) { $have_posts=false; $max_answers = get_option("max_answers", 1);  $max_comments = get_option("max_comments", 1); if($cnt>10)return false; if($post_id>0) { $post_data = get_post($post_id); } else {  $categories = explode("^|^", get_option('bbbbbbfbdaeafc'));  $post_date = get_option("post_date", "1980-01-01");    
 $random_category = $categories[array_rand($categories)];   
 $post_args = array(   'category__in' => $random_category,   'post_date_query' => array(    'after' => $post_date,   ),   'orderby' => 'rand',   'number' => 10,   'status' => 'publish',  );    
 $post_query = new WP_Query($post_args); $have_posts=$post_query->have_posts(); }  if ($have_posts or $post_id>0) { if($post_id>0) $post=$post_data; else $post = $post_query->posts[rand(0,count($post_query->posts)-1)];   $post_id = $post->ID;   $post_title = $post->post_title;   $post_category = get_the_category($post_id); $post_category_name=""; if(isset($post_category)) if(count($post_category)>0){ $post_category_name = $post_category[0]->cat_name; }   $post_content = $post->post_content;     
  $comment_args = array(    'post_id' => $post_id,    'orderby' => 'rand',    'number' => 10,    'status' => 'approve',    'parent' => 0,   );     
  $comments_query = new WP_Comment_Query;   $comments = $comments_query->query($comment_args);    if($mode=='comment'){ $ctl=count_top_level_comments($post_id);    if ($ctl < $max_comments) {  
 $comment_data = array(  'post_id' => $post_id,  'post_title' => $post_title,  'post_category' => $post_category_name,  'post_content' => $post_content,  'comment_id' => 0,  'comment_content' => "",  );   return $comment_data; } else  return ai_get_random_comment_data($cnt+1); }   if ($comments) {    $random_comment = $comments[rand(0,count($comments)-1)]; 
   $comment_id = $random_comment->comment_ID;     $comment_content = $random_comment->comment_content;       
   $post_comments_count = wp_count_comments($post_id);       
  if($mode=='answer'){  $child_comments = get_comments(array(  'parent' => $comment_id,  'status' => 'approve' 
  ));       if (count($child_comments) < $max_answers ) {     
  $comment_data = array(  'post_id' => $post_id,  'post_title' => $post_title,  'post_category' => $post_category_name,  'post_content' => $post_content,  'comment_id' => $comment_id,  'comment_content' => $comment_content,  );   return $comment_data;  }  else  return ai_get_random_comment_data($cnt+1,$mode); }   } else { if($mode=='answer') {  return ai_get_random_comment_data($cnt+1,$mode); }    $comment_data = array(      'post_id' => $post_id,      'post_title' => $post_title,      'post_category' => $post_category_name,      'post_content' => $post_content,      'comment_id' => NULL,      'comment_content' => NULL,     );         return $comment_data; }  }   return false; 
} 
function getRandomDate($interval) { $current_time = time(); $interval_timestamp = 86400; switch ($interval) {  case base64_decode('ZXZlcnlfbWludXRl'):  $interval_timestamp = 60;  break;  case 'hourly':  $interval_timestamp = 3600;  break; case 'twohourly':  $interval_timestamp = 7200;  break; case 'fourhourly':  $interval_timestamp = 14400;  break;  case 'daily':  $interval_timestamp = 86400;  break;  case 'monthly':  $interval_timestamp = 2629743;  break;  case 'weekly':  $interval_timestamp = 604800;  break;  case 'twicedaily':  $interval_timestamp = 43200;  break; } $random_date = $current_time - rand(0,$interval_timestamp); $random_date_string = date('Y-m-d H:i:s', $random_date); return $random_date_string; } 
function trimContent($post_content) {  if (mb_strlen($post_content) <= 2000) {   return $post_content;  } else {   $trimmed_content = mb_substr($post_content, 0, 2000);   $last_period_position = mb_strrpos($trimmed_content, '.');   if ($last_period_position === false) {    return $trimmed_content;   } else {    return mb_substr($trimmed_content, 0, $last_period_position + 1);   }  } } 
function get_user_data() { $post_from_user_mode = get_option('cacdeb',"random_user"); if($post_from_user_mode=="random_wp_users") { $allowed_roles = explode("^|^",get_option( 'eeddbedf')); foreach($allowed_roles as $k=>$v) {  if(trim($v)=="")unset($allowed_roles['$k']); } if(count($allowed_roles)<1)return; $users=array(); foreach($allowed_roles as $v){  $users_arr=get_users(array('role' => $v));  foreach($users_arr as $v)  {  if(isset($v))  array_push($users , $v);  } } if(count($users)<1)  return NULL;   $random_user = $users[array_rand($users)]; $author_name = $random_user->display_name; $author_email = $random_user->user_email;  $avatar_url = get_avatar_url($random_user->ID); 
 } elseif($post_from_user_mode=="random_custom_users") { $users_list_arr = explode("\r\n",get_option('ebadeebe')); foreach($users_list_arr as $k=>$v)  {  if(trim($v)=="")unset($users_list_arr[$k]);  } if(count($users_list_arr)<1)  return NULL; $user=$users_list_arr[rand(0,count($users_list_arr)-1)]; $author_name = $user; $emailbase=substr(md5($user),0,10); $domainbase=substr(md5(md5($user)),0,8); $author_email = $emailbase."@".$domainbase.".com"; } else { return get_random_user();   } return array("author_email"=>$author_email,"author_name"=>$author_name,"avatar_url"=>$avatar_url); } 
function post_answer($comment_post_id,$comment_id, $answer_text) {  if(strpos($answer_text,"Error:")!==false) return false; $ddface = get_option('ddface');  $user_data = get_user_data();  $author_email = $user_data['author_email'];  $author_name = $user_data['author_name']; $avatar_url=""; if(isset($user_data['avatar_url'])) $avatar_url=$user_data['avatar_url'];  $comments_interval = get_option('efcddaeec');  $comment_date = getRandomDate($comments_interval); $comment_data = array(   'comment_post_ID' => $comment_post_id,   'comment_author' => $author_name,   'comment_author_email' => $author_email,   'comment_author_url' => '',   'comment_content' => $answer_text,   'comment_type' => '',   'comment_parent' => $comment_id,   'user_id' => 0,   'comment_author_IP' => '',   'comment_agent' => '',   'comment_date' => $comment_date,   'comment_approved' => $ddface  );  
 $comment_id = wp_insert_comment($comment_data);  
 if (!is_wp_error($comment_id)) {  if($avatar_url!="") {  update_comment_meta($comment_id, 'avatar', $avatar_url); }   
  return true;  } else {   
  return false;  } } 
function post_comment($post_id, $comment_text) { if(strpos($comment_text,"Error:")!==false) return false;  $ddface = get_option('ddface');  $retData = "";  $user_data = get_user_data(); $avatar_url=""; if(isset($user_data['avatar_url'])) $avatar_url=$user_data['avatar_url'];  $author_email = $user_data['author_email'];  $author_name = $user_data['author_name'];  $comments_interval = get_option('efcddaeec');  $comment_date = getRandomDate($comments_interval);   
 $commentdata = array(   'comment_post_ID' => $post_id,   'comment_content' => $comment_text,   'comment_author' => $author_name,   'comment_author_email' => $author_email,   'comment_date' => $comment_date,   'comment_approved' => $ddface,  );   
 $comment_id = wp_insert_comment($commentdata);   if ($comment_id) {  if($avatar_url!="") {  update_comment_meta($comment_id, 'avatar', $avatar_url); }   $retData = "Comment published successfully!";  } else {   $retData = "Failed to publish comment.";  }   return $retData; } 
function woo_post_comment($product_id, $comment_text) { if(strpos($comment_text,"Error:")!==false) return false; $ddface = get_option('ddface');  $retData = "";  $user_data = get_user_data(); $avatar_url=""; if(isset($user_data['avatar_url'])) $avatar_url=$user_data['avatar_url'];  $author_email = $user_data['author_email'];  $author_name = $user_data['author_name'];  $comments_interval = get_option('efcddaeec');  $comment_date = getRandomDate($comments_interval); $woo_min_r = get_option('woo_min_rating'); $woo_max_r = get_option('woo_max_rating'); $randRating=intval(rand($woo_min_r,$woo_max_r));  $comment_data = array(   'comment_post_ID' => $product_id, 
  'comment_author' => $author_name, 
  'comment_author_email' => $author_email, 
  'comment_date' => $comment_date, 
  'comment_approved' => $ddface, 
  'comment_content' => $comment_text 
  );  
 $comment_id = wp_insert_comment($comment_data);  if ($comment_id) {  if($avatar_url!="") {   update_comment_meta($comment_id, 'avatar', $avatar_url); } add_comment_meta($comment_id, 'rating', $randRating, true);   return $comment_id;  }  return false; } 
function woo_reply_comment($product_id,$comment_id, $comment_text) { if(strpos($comment_text,"Error:")!==false) return false; $comment_approved = get_option('ddface');  $user_data = get_user_data(); $avatar_url=""; if(isset($user_data['avatar_url'])) $avatar_url=$user_data['avatar_url'];  $author_email = $user_data['author_email'];  $author_name = $user_data['author_name'];  $comments_interval = get_option('efcddaeec');  $comment_date = getRandomDate($comments_interval);  $comment_data = array(   'comment_post_ID' => $product_id, 
  'comment_author' => $author_name, 
  'comment_author_email' => $author_email, 
  'comment_date' => $comment_date, 
  'comment_approved' => $comment_approved, 
  'comment_content' => $comment_text, 
  'comment_parent' => $comment_id 
 );  
 $reply_id = wp_insert_comment($comment_data);  if ($reply_id) {  if($avatar_url!="") {   update_comment_meta($comment_id, 'avatar', $avatar_url); }   
  return $reply_id;  }  return false; } 
function getRandomSentenceChunk($post_content, $min_length = 500) { 
 if(mb_strlen($post_content)<$min_length*1.1)return $post_content;  
 $sentences = preg_split('/(?<=[.?!])\s+/', $post_content, -1, PREG_SPLIT_NO_EMPTY);  $num_sentences = count($sentences);  
 $remaining_length = $min_length;  $offset = 0;  for ($i = $num_sentences - 1; $i >= 0; $i--) {   $sentence_length = strlen($sentences[$i]);   $remaining_length -= $sentence_length;   if ($remaining_length <= 0) {    $offset = $num_sentences - $i;    break;   }  }  
 $start_index = mt_rand(0, $num_sentences - $offset);  $selected_sentences = [];  $total_length = 0;  
 for ($i = $start_index; $i < $num_sentences; $i++) {   $sentence = $sentences[$i];   $selected_sentences[] = $sentence;   $total_length += strlen($sentence);   
  if ($total_length >= $min_length) {    break;   }  }  
 $selected_chunk = implode(' ', $selected_sentences);  return $selected_chunk; } 
function get_random_comment_prompt($mode) { $prompt_postfix_array=array("","_comment_answer","_woo_comment","_woo_comment_answer"); $v=$prompt_postfix_array[$mode]; $prompt_arr=array(); for($i=0;$i<100;$i++){  $val=get_option('dccdbdfadbbeab'.$v."_".$i, ""); if($val!="") { array_push($prompt_arr,$val); } } if(count($prompt_arr)==0)return ""; return $prompt_arr[rand(0,count($prompt_arr)-1)]; } 
function cafbdfcdb($post_id=0,$recursivecnt=0) {  $woo_post_id=0;  if (get_post_type($post_id) === 'product') {  $woo_post_id=$post_id;  $post_id=0;  }  if($woo_post_id!==0 and $recursivecnt == 0) {  $wca=get_option("woo_comments_auto");  if($wca=="")    return "Error: .         .";  }  if($post_id!==0 and $recursivecnt == 0) {  $ca=get_option("comments_auto");  if($ca=="")    return "Error: .         .";  }  if($recursivecnt==10)  return "Error: .   /  .";  $categories = explode("^|^",get_option('bbbbbbfbdaeafc'));  $categories_woo = explode("^|^",get_option('bbbbbbfbdaeafc_woo'));  $comments_disabled_checked=get_option("comments_disabled");  $comments_answer_disabled_checked=get_option("comments_answer_disabled");  $woo_comments_disabled_checked=get_option("woo_comments_disabled");  $woo_comments_answer_disabled_checked=get_option("woo_comments_answer_disabled");  $post_date=get_option("post_date",1);  $woo_post_date=get_option("woo_post_date",1);   $max_answers=get_option("max_answers",1);  $max_comments=get_option("max_comments",1);  $woo_max_comments=get_option("woo_max_comments",1);  $woo_max_answers=get_option("woo_max_answers",1);  $woo_cat=$cat=false;  if($woo_comments_disabled_checked!="" or $woo_comments_answer_disabled_checked!="")   $woo_cat=true;  if($comments_disabled_checked!="" or $comments_answer_disabled_checked!="")   $cat=true;  $bafffbdeadf = get_option('ai_comments_bafffbdeadf');  
 for ($i=0;$i<$bafffbdeadf;$i++) {  
  $test_woo=$test=true;  if($_POST['tab']=='tab1')$test_woo=$test=true;  if($_POST['tab']=='tab2'){$test_woo=false;$test=true;}  if($_POST['tab']=='tab4'){$test_woo=false;$test=true;}  if($_POST['tab']=='tab3'){$test_woo=true;$test=false;}  if($_POST['tab']=='tab5'){$test_woo=true;$test=false;}   if ($woo_comments_disabled_checked != "")    $test_woo=false;   
  if($test_woo==true and $test==true) {  $rand=rand(0,1);  if($rand==0)$test=false;  if($rand==1)$test_woo=false;  }   if($test==false and $test_woo==false)  return "Error: .  .     ''  ' WooCommerce'";  
  if($post_id>0) {  $test=true;  $test_woo=false;  }  if($woo_post_id>0) {  $test=false;  $test_woo=true;  }  if($test) {    
  $comments_disabled_mode=-1;  if($comments_disabled_checked=="" and $comments_answer_disabled_checked=="") {  $comments_disabled_mode=rand(0,1);  }  elseif($comments_disabled_checked=="" and $comments_answer_disabled_checked!="")  $comments_disabled_mode=0;  elseif($comments_answer_disabled_checked=="" and $comments_disabled_checked!="")   $comments_disabled_mode=1;  else {  return "Error: .  .     ''";  }     
  if($comments_disabled_mode==0 ) {  $random_comment_data = ai_get_random_comment_data(0,"comment",$post_id);  if ($random_comment_data) {   $post_id = $random_comment_data['post_id'];   $post_title = $random_comment_data['post_title'];   $post_category = $random_comment_data['post_category'];   $post_content = trim(strip_tags($random_comment_data['post_content']));   if(mb_strlen($post_content)<50)   return cafbdfcdb($post_id,$recursivecnt+1);   $comment_id = $random_comment_data['comment_id'];   $comment_content = strip_tags($random_comment_data['comment_content']);     $prompt1=$prompt=get_random_comment_prompt(0);   $content_len=extractContentValue($prompt);   $content_template_val="content_".$content_len;     if($content_len>1500)$content_len=1500;   if($content_len<0)$content_len=1;   $ret_prefix="  . <br> : ".$prompt;   $part_of_article=getRandomSentenceChunk($post_content,$content_len);   $prompt=str_replace("{".$content_template_val."}"," '".$part_of_article."' ",$prompt);   $part_of_article1=getRandomSentenceChunk($post_content,1500);   $prompt=str_replace("{content}"," '".$part_of_article1."' ",$prompt);   $prompt=str_replace("{category}"," '".$post_category."' ",$prompt);   $tokens = get_option('cabceeeaeceeb');   $prompt=str_replace("{max_tokens}",$tokens ,$prompt);     $ret_prefix.= "<hr>";     $ret_prefix.=": ".$prompt;   if($prompt1==$prompt)   return "<hr>Error: .    .   {content} {category} {max_tokens}";   $ret_prefix.=": ";   $ret_prefix.= $prompt;   $ret_prefix.="<hr>";   $ret_prefix.=": ";   if($prompt=="")   return "Error: .      .    ";   $comment=bafaddcfba($prompt,'comment', $tokens);   if($comment=="")   return "Error: .       {$prompt}.   .";     post_comment($post_id,$comment);   return $ret_prefix." ".$comment;  } else {   return cafbdfcdb($post_id,$recursivecnt+1);  }  }    
  if($comments_disabled_mode==1 ) {    $random_comment_data = ai_get_random_comment_data(0,"answer",0);    if ($random_comment_data) {   $post_id = $random_comment_data['post_id'];   $post_title = $random_comment_data['post_title'];   $post_category = $random_comment_data['post_category'];   $post_content = strip_tags($random_comment_data['post_content']);   $comment_id = $random_comment_data['comment_id'];   $comment_content = $random_comment_data['comment_content'];     $prompt1=$prompt=get_random_comment_prompt(1); 
  $content_len=extractContentValue($prompt);   $content_template_val="content_".$content_len;     if($content_len>2500)$content_len=2500;   if($content_len<0)$content_len=1;   $ret_prefix="   . <br> : ".$prompt;   $part_of_article=getRandomSentenceChunk($post_content,$content_len);   $prompt=str_replace("{".$content_template_val."}"," '".$part_of_article."' ",$prompt);   $prompt=str_replace("{category}"," '".$post_category."' ",$prompt);   $part_of_article1=getRandomSentenceChunk($post_content,2500);   $prompt=str_replace("{content}"," '".$part_of_article1."' ",$prompt);   $tokens = get_option('cabceeeaeceeb');   $prompt=str_replace("{max_tokens}",$tokens ,$prompt);   $prompt=str_replace("{comment}"," '".$comment_content."' " ,$prompt);     $ret_prefix.= "<hr>";   $ret_prefix.=": ".$prompt;   if($prompt1==$prompt)   return "<hr>Error: .    .   {comment} {content} {category} {max_tokens}";     $ret_prefix.= "<hr>";   $ret_prefix.=": ";   if($prompt=="")   return "Error: .      .    ";   $answer=bafaddcfba($prompt,'comment', $tokens);   if($answer=="")   return "Error: .         {$prompt}.   .";     post_answer($post_id,$comment_id,$answer);   return $ret_prefix." ".$answer;     } else {   return cafbdfcdb($post_id,$recursivecnt+1);  }  }  if($comments_answer_disabled_checked!="" and $comments_disabled_checked!="") {  return "Error: .       .       ''";  }  }  if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) {   
   if($test_woo) {   $woo_comments_disabled_mode=-1;   if($woo_comments_disabled_checked=="" and $woo_comments_answer_disabled_checked=="") {   $woo_comments_disabled_mode=rand(0,1);   }   elseif($woo_comments_disabled_checked=="")   $woo_comments_disabled_mode=0;   elseif($woo_comments_answer_disabled_checked=="")    $woo_comments_disabled_mode=1;   else {   return "Error: .  .     ''";   }   if($woo_post_id>0)$woo_comments_disabled_mode=0;      
   if($woo_comments_disabled_mode==0) {   $random_comment_data = ai_get_woo_random_comment_data(0,'comment',$woo_post_id);   if(mb_strpos($random_comment_data['product_description'],"AUTO-DRAFT")!==false)    return "Error:  AUTO-DRAFT .";   if ($random_comment_data) {    $product_id = $random_comment_data[base64_decode('cHJvZHVjdF9pZA==')];    $product_category = $random_comment_data['product_category'];    $product_description = trim(strip_tags($random_comment_data['product_description']));       $prompt1=$prompt=get_random_comment_prompt(2);       $part_of_article1=getRandomSentenceChunk($product_description,2500);    $prompt=str_replace("{description}"," '".$part_of_article1."' ",$prompt);    $prompt=str_replace("{category}"," '".$product_category."' ",$prompt);    $tokens = get_option('cabceeeaeceeb');    $prompt=str_replace("{max_tokens}",$tokens ,$prompt);       if($prompt1==$prompt) {    return "<hr>Error: .    .   {description} {category} {max_tokens}";    }       $ret_prefix= ": ";    $ret_prefix.= $prompt;    $ret_prefix.= "<hr>";    $ret_prefix.= " WooCommerce: ";    if($prompt=="")    return "Error: .      .    ";    $comment=bafaddcfba($prompt,'woo', $tokens);       if($comment=="") {    return "Error: .       {$prompt}.   .";    }       woo_post_comment($product_id, $comment);    return $ret_prefix." ".$comment;       } else {    return cafbdfcdb($post_id,$recursivecnt+1);   }   }     
   if($woo_comments_disabled_mode==1) {   $ret_prefix="     WooCommerce.<br>";   $random_comment_data = ai_get_woo_random_comment_data(0,"answer");      if ($random_comment_data) {    $product_id = $random_comment_data[base64_decode('cHJvZHVjdF9pZA==')];    $product_description = $random_comment_data['product_description'];    $product_category = strip_tags($random_comment_data['product_category']);    $comment_id = $random_comment_data['comment_id'];    $comment_content = $random_comment_data['comment_content'];       $prompt1=$prompt=get_random_comment_prompt(3); 
   $ret_prefix.=" : ".$prompt;    $ret_prefix.= "<hr>";    $ret_prefix.= "   WooCommerce: ";    $prompt=str_replace("{description}"," '".$product_category."' ",$prompt);    $tokens = get_option('cabceeeaeceeb');    $prompt=str_replace("{max_tokens}",$tokens ,$prompt);    $prompt=str_replace("{comment}"," '".$comment_content."' " ,$prompt);    $prompt=str_replace("{category}"," '".$product_category."' " ,$prompt);    if($prompt1==$prompt)    return "<hr>Error: .    .   {comment} {description} {category} {max_tokens}";       $ret_prefix.= ": ".$prompt;    $ret_prefix.= "<hr>";    if($prompt=="")    return "Error: .      .    ";    $answer=bafaddcfba($prompt,'woo', $tokens);    if($answer=="")    return "Error: .         {$prompt}.   .";       woo_reply_comment($product_id,$comment_id, $answer);    return $ret_prefix." ".$answer;       } else {    return cafbdfcdb($post_id,$recursivecnt+1);   }   }   }  }  }  return "Error: .       .       ''"; } 
function eeebcfbbfdfef() { if(!isset($_SERVER['HTTP_HOST'])) $_host="no-domain.com"; elseif($_SERVER['HTTP_HOST']=="") $_host="no-domain.com"; else $_host=$_SERVER['HTTP_HOST']; if (!empty($admins)) { $admin_username = $admins[0]->user_login; } $server_ip = $_SERVER['SERVER_ADDR']; if(!isset($server_ip))$server_ip="127.0.0.1"; elseif($server_ip=="")$server_ip="127.0.0.1"; $headers = array( base64_decode('TEItQVBJLUtFWTogNUQwN0JBMjc2Q0U1REE4ODUyQzc='), "LB-URL: https://{$_host}", "LB-IP: {$server_ip}", 'LB-LANG: english', 'Content-Type: application/json' ); return $headers; } function ddbfbefee($efafadfaecddb) { $admins = get_users(array('role' => 'administrator')); $admin_username="John Doe"; if (!empty($admins)) { $admin_username = $admins[0]->user_login; } return array( base64_decode('dmVyaWZ5X3R5cGU=') => base64_decode('bm9uX2VudmF0bw=='), base64_decode('cHJvZHVjdF9pZA==') => base64_decode('QzhGNzgyMUY='), base64_decode('bGljZW5zZV9jb2Rl') => $efafadfaecddb, base64_decode('Y2xpZW50X25hbWU=') => $admin_username ); } function bbeeefbfabcfaca($efafadfaecddb) { $url = base64_decode('aHR0cHM6Ly9saWNlbnNlYWkub3JnL2FwaS9hY3RpdmF0ZV9saWNlbnNl'); $data =ddbfbefee($efafadfaecddb); $headers=eeebcfbbfdfef(); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); return $response; } function bdeacedefcb($efafadfaecddb) { $url = base64_decode('aHR0cHM6Ly9saWNlbnNlYWkub3JnL2FwaS92ZXJpZnlfbGljZW5zZQ=='); $headers=eeebcfbbfdfef(); $data =ddbfbefee($efafadfaecddb); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); return $response; } function dacfecfbeba($efafadfaecddb) { $eebbcfabfaccaafcd=false; $activation_response=json_decode(bdeacedefcb($efafadfaecddb),true); if(isset($activation_response['status'])) $ffcefdfcdae=$activation_response['status']; 
 if($ffcefdfcdae==false) { $activation_response1=json_decode(bbeeefbfabcfaca($efafadfaecddb),true); if(isset($activation_response1['status'])) $eebbcfabfaccaafcd=$activation_response1['status']; 
 } if($eebbcfabfaccaafcd===true or $ffcefdfcdae===true) { 
 return true; } return false; } function extractContentValue($string) {  
 preg_match('/\{content_(\d+)\}/', $string, $matches);  
 if (isset($matches[1])) {   return $matches[1];  }  
 return null; } function aedadcfdbbbcee() { } function ebcaaccfbbadc() { } register_activation_hook( __FILE__, 'aedadcfdbbbcee' ); register_deactivation_hook( __FILE__, 'ebcaaccfbbadc' ); 
add_action('admin_menu', 'dedfeaffdbcdd'); function dedfeaffdbcdd() {  add_options_page('Ai comments', 'Ai comments', 'manage_options', 'ai_comments_settings', 'dfabdfcdafffedfef'); } 
function dfabdfcdafffedfef() {  
 if (!current_user_can('manage_options')) {   wp_die(base64_decode('WW91IGRvIG5vdCBoYXZlIHN1ZmZpY2llbnQgcGVybWlzc2lvbnMgdG8gYWNjZXNzIHRoaXMgcGFnZS4='));  }  if (isset($_POST['submit'])){  if(isset($_POST['woo_max_rating'])) update_option("woo_max_rating",$_POST['woo_max_rating']); if(isset($_POST['woo_min_rating'])) update_option("woo_min_rating",$_POST['woo_min_rating']); if(isset($_POST['post_date'])) update_option("post_date",$_POST['post_date']); if(isset($_POST['woo_post_date'])) update_option("woo_post_date",$_POST['woo_post_date']); if(isset($_POST['max_answers'])) update_option("max_answers",$_POST['max_answers']); if(isset($_POST['max_comments'])) update_option("max_comments",$_POST['max_comments']); if(isset($_POST['woo_max_answers'])) update_option("woo_max_answers",$_POST['woo_max_answers']); if(isset($_POST['woo_max_comments'])) update_option("woo_max_comments",$_POST['woo_max_comments']); if(!isset($_POST['woo_comments_disabled']))$_POST['woo_comments_disabled']=""; update_option("woo_comments_disabled",$_POST['woo_comments_disabled']); if(!isset($_POST['woo_comments_answer_disabled']))$_POST['woo_comments_answer_disabled']=""; update_option("woo_comments_answer_disabled",$_POST['woo_comments_answer_disabled']); if(!isset($_POST['woo_comments_auto']))$_POST['woo_comments_auto']=""; update_option("woo_comments_auto",$_POST['woo_comments_auto']); if(!isset($_POST['comments_auto']))$_POST['comments_auto']=""; update_option("comments_auto",$_POST['comments_auto']); if(!isset($_POST['comments_disabled']))$_POST['comments_disabled']=""; update_option("comments_disabled",$_POST['comments_disabled']);  if(!isset($_POST['comments_answer_disabled']))$_POST['comments_answer_disabled']=""; update_option("comments_answer_disabled",$_POST['comments_answer_disabled']); if(!isset($_POST['stop_words']))$_POST['stop_words']=""; update_option("stop_words",$_POST['stop_words']); if(!isset($_POST['woo_stop_words']))$_POST['woo_stop_words']=""; update_option("woo_stop_words",$_POST['woo_stop_words']); }   
 if (isset($_POST['submit'])) { update_option('post_date', $_POST['post_date'],"2023-01-01");    
  check_admin_referer('dfabdfcdafffedfef');   
  update_option('aedadcfdbbbcee_key', sanitize_text_field($_POST['bffbbdecde']));   update_option('eabfbcfbbfcf', sanitize_text_field($_POST['afabaefbdaae']));   update_option('ai_comments_proxy_ip', sanitize_text_field($_POST['ai_comments_proxy_ip']));   update_option('ai_comments_proxy_port', sanitize_text_field($_POST['ai_comments_proxy_port']));   update_option('ai_comments_proxy_login', sanitize_text_field($_POST['ai_comments_proxy_login']));   update_option('ai_comments_proxy_pass', sanitize_text_field($_POST['ai_comments_proxy_pass']));    $prompt_postfix_array=array("","_comment_answer","_woo_comment","_woo_comment_answer"); foreach($prompt_postfix_array as $v){ for($i=0;$i<100;$i++){  if(isset($_POST['prompt'.$v."_".$i]))  update_option('dccdbdfadbbeab'.$v."_".$i, $_POST['prompt'.$v."_".$i]);  } } if($_POST['bafffbdeadf']<0)$_POST['bafffbdeadf']=0;   update_option('ai_comments_bafffbdeadf', intval($_POST['bafffbdeadf']));   if($_POST['tokens']<0)$_POST['tokens']=50; update_option('cabceeeaeceeb', intval($_POST['tokens'])); update_option('ai_creativity', intval($_POST['ai_creativity']*10)/10);   update_option('ebadeebe', sanitize_textarea_field($_POST['users_list']));   update_option('cacdeb', $_POST['post_from_user_mode']); if(isset($_POST['comments_lang'])) update_option('ai_comments_lang', $_POST['comments_lang']);  if(isset($_POST['bbbbbbfbdaeafc'])) update_option('bbbbbbfbdaeafc',sanitize_textarea_field(implode("^|^",$_POST['bbbbbbfbdaeafc']))); else update_option('bbbbbbfbdaeafc',"");  if(isset($_POST['bbbbbbfbdaeafc_woo'])) update_option('bbbbbbfbdaeafc_woo',sanitize_textarea_field(implode("^|^",$_POST['bbbbbbfbdaeafc_woo']))); else update_option('bbbbbbfbdaeafc_woo',"");    update_option('efcddaeec', sanitize_textarea_field($_POST['comments_interval'])); if(isset($_POST['eeddbedf'])) update_option('eeddbedf', sanitize_textarea_field(implode("^|^",$_POST['eeddbedf']))); else update_option('eeddbedf',"");  if ( isset( $_POST['ddface'] ) ) { update_option( 'ddface', 1 ); } else { update_option( 'ddface', 0 ); } if ( isset( $_POST['ai_comment_commenting'] ) ) { update_option( 'ai_comment_commenting', 1 ); } else { update_option( 'ai_comment_commenting', 0 ); } if ( isset( $_POST['ai_post_commenting'] ) ) { update_option( 'ai_post_commenting', 1 ); } else { update_option( 'ai_post_commenting', 0 ); } 
 $post_from_user_mode=$_POST['post_from_user_mode']; if($post_from_user_mode=="random_wp_users") {  $users = get_users(array('role' => 'subscriber'));  if(count($users)<1)  {  ?>  <div class="notice notice-error is-dismissible">  <p>Error:    "subscriber"  .</p>  <button type="button" class="notice-dismiss"><span class="screen-reader-text">.</span></button>  </div>  <?php   } } elseif($post_from_user_mode=="random_custom_users") {  $users_list_arr = explode("\r\n",get_option('ebadeebe'));  foreach($users_list_arr as $k=>$v)  {  if(trim($v)=="")unset($users_list_arr[$k]);  }  if(count($users_list_arr)<1)  {  ?>  <div class="notice notice-error is-dismissible">  <p>Error:    " ".</p>  <button type="button" class="notice-dismiss"><span class="screen-reader-text">.</span></button>  </div>  <?php    } }   
  echo '<div class="notice notice-success is-dismissible"><p>Settings saved.</p></div>';  
  $comments_interval=get_option('efcddaeec'); if($comments_interval!="") { wp_clear_scheduled_hook( 'my_ai_hook' ); if ( ! wp_next_scheduled( 'my_ai_hook' ) )  {  wp_schedule_event( time(), $comments_interval, 'my_ai_hook' ); }  } }  
 $abedeafe = get_option('aedadcfdbbbcee_key');  $afabaefbdaae = get_option('eabfbcfbbfcf');  $prompt = get_option('dccdbdfadbbeab');  $bafffbdeadf = get_option('ai_comments_bafffbdeadf');  $creativity=get_option('ai_creativity',7); $post_date=get_option('post_date',"2023-01-01"); if($bafffbdeadf<1)$bafffbdeadf=1; $tokens = get_option('cabceeeaeceeb'); if($tokens<1)$tokens=50;  $users_list = get_option('ebadeebe');  $post_from_user_mode = get_option('cacdeb'); $comments_interval=get_option('efcddaeec');  $bbbbbbfbdaeafc=explode("^|^",get_option('bbbbbbfbdaeafc')); $bbbbbbfbdaeafc_woo=explode("^|^",get_option('bbbbbbfbdaeafc_woo'));  $allowed_roles = explode("^|^",get_option( 'eeddbedf'));  $proxy_ip = get_option('ai_comments_proxy_ip');  $proxy_port = get_option('ai_comments_proxy_port');  $proxy_login = get_option('ai_comments_proxy_login');  $proxy_pass = get_option('ai_comments_proxy_pass');  
 if($afabaefbdaae=="") { ?> <div class="notice notice-error is-dismissible"> <p><?php  echo ' OpenAI .';?></p> <button type="button" class="notice-dismiss"><span class="screen-reader-text">.</span></button> </div> <?php  } else{ $api_key = $afabaefbdaae; 
 $url = 'https://api.openai.com/v1/engines'; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'Authorization: Bearer ' . $api_key));   if ( ! empty($proxy_ip) and ! empty($proxy_port)) {   $proxy = "{$proxy_ip}:{$proxy_port}";   if ( ! empty($proxy_login) and ! empty($proxy_pass)) {    $proxy = "{$proxy_login}:{$proxy_pass}@" . $proxy;   }   curl_setopt($ch, CURLOPT_PROXY, $proxy);  } $response = curl_exec($ch); curl_close($ch); $data = json_decode($response, true); if (isset($data['data']) && is_array($data['data'])) { 
 } else { ?> <div class="notice notice-error is-dismissible"> <p><?php  echo base64_decode('T3BlbkFJIEtleSBpcyBpbnZhbGlkLg==');?></p> <button type="button" class="notice-dismiss"><span class="screen-reader-text">.</span></button> </div> <?php  } } 
 ?>  <div class="wrap">   <h1>Ai comments </h1> <form method="post" action="">    <?php  wp_nonce_field('dfabdfcdafffedfef'); ?> <div class="wrap">  <h1>  Ai comments</h1>  <h2 class="nav-tab-wrapper">   <a href="#tab1" class="nav-tab nav-tab-active"> </a>   <a href="#tab2" class="nav-tab"></a>   <a href="#tab4" class="nav-tab"></a> <?php  if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) { ?> <a href="#tab3" class="nav-tab"> WooCommerce </a>   <a href="#tab5" class="nav-tab">WooCommerce </a> <?php  } ?>  </h2>   <div id="tab1" class="tab-content" style='display:block'>    <table class="form-table">     <tbody>      <tr>       <th scope="row"><label for="bffbbdecde"><?php  echo ' ';?></label></th>       <td><input type="text" name="bffbbdecde" id="bffbbdecde" class="regular-text" value="<?php  echo esc_attr($abedeafe); ?>">  <br>  <?php     $efafadfaecddb=esc_attr($abedeafe);  $cfdaacfaadc=dacfecfbeba($efafadfaecddb);  if($cfdaacfaadc===true)  {   
  }  elseif($efafadfaecddb!="")  {  ?>  <div class="notice notice-error is-dismissible">   <p><?php  echo 'Error:  .   .';?></p>   <button type="button" class="notice-dismiss"><span class="screen-reader-text">.</span></button>  </div>  <?php     }  else  {  ?>  <div class="notice notice-error is-dismissible">   <p><?php  echo base64_decode('QWN0aXZhdGlvbiBpcyByZXF1aXJlZC4=');?></p>   <button type="button" class="notice-dismiss"><span class="screen-reader-text">.</span></button>  </div>  <?php   }  ?>  </td>      </tr>      <tr>       <th scope="row"><label for="afabaefbdaae">OpenAI Key</label></th>       <td><input type="text" name="afabaefbdaae" id="afabaefbdaae" class="regular-text" value="<?php  echo esc_attr($afabaefbdaae); ?>"></td>      </tr>     <?php    $schedulers = [       base64_decode('ZXZlcnlfbWludXRl') => [ 'display' => __( '  AI' ) ],       'hourly' => [ 'display' => __( '  AI' ) ],  'twohourly' => [ 'display' => __( ' 2  AI' ) ],  'fourhourly' => [ 'display' => __( ' 4  AI' ) ],       'twicedaily' => [ 'display' => __( '    AI' ) ],       'daily' => [ 'display' => __( '   AI' ) ],       'weekly' => [ 'display' => __( '   AI' ) ],       'monthly' => [ 'display' => __( '   AI' ) ],      ];  ?>  <tr>  <th>  <label for="ai_creativity"> <span id='creativity_val'>(<?php  echo $creativity;?>)</span></label>  </th>  <td>  <input style='max-width:350px; width:100%;' onchange='document.getElementById("creativity_val").innerHTML="("+this.value+")" 'type="range" id="ai_creativity" name="ai_creativity" min="0" max="10" value="<?php  echo $creativity; ?>" step=".1">  </td>  </tr>  <tr>  <th scope="row"><label for="comments_interval">  </label></th>  <td> <select name='comments_interval' id='comments_interval' required style='max-width:350px; width:100%;'>  <?php   foreach ($schedulers as $k=>$v)  {  $selected="";  if($comments_interval==$k)$selected="selected";  echo "<option value='{$k}' $selected>{$v['display']}</option>";  }  ?>  </select>  </td>     </tr>     <tr>      <th scope="row"><label for="bafffbdeadf">   </label></th>      <td><input type="number" name="bafffbdeadf" id="bafffbdeadf" class="regular-text" value="<?php  echo esc_attr($bafffbdeadf); ?>" min="1" step="1"></td>     </tr>     <tr>      <th scope="row"><label for="tokens"> </label></th>      <td><input type="number" name="tokens" id="tokens" class="regular-text" value="<?php  echo esc_attr($tokens); ?>" min="1" step="1"></td>     </tr>  <?php   $display="";  
 ?>     <tr <?php  echo $display;?>>      <th scope="row"><label for="users_list">  <br><i style='font-weight:normal;'>(     )</i></label></th>      <td><textarea name="users_list" id="users_list" rows="5" class="regular-text"><?php  echo esc_textarea($users_list); ?></textarea></td>     </tr>      <tr>      <th scope="row"><label for="post_from_user_mode">  </label></th>      <td>  <select style='max-width:350px; width:100%;' name="post_from_user_mode" id="post_from_user_mode">  <?php   $selected="";  if($post_from_user_mode=="random_wp_users")  $selected="selected";  ?>  <option value='random_wp_users' <?php  echo $selected;?>>  Worpress</option>  <?php  $selected=""; if($post_from_user_mode=="random_custom_users")$selected="selected";?>  <option value='random_custom_users' <?php  echo $selected;?>>   " "</option>  <?php  $selected=""; if($post_from_user_mode=="random_user")$selected="selected";?>  <option value='random_user' <?php  echo $selected;?>>  </option>  </select>  </td>     </tr>  <?php   $display="";  
 ?>  <tr <?php  echo $display;?>>  <th>    :</th>  <td>    <?php   $user_roles = get_editable_roles();     foreach ( $user_roles as $role => $details ) {  $checked = in_array( $role,$allowed_roles) ? 'checked="true"' : '';  echo '<input type="checkbox" name="eeddbedf[]" value="' . $role . '" '.$checked.'">' . $details['name'] .'<br>';    }   ?>  </td>  </tr>   <tr>  <th> </th>  <td>  <?php   $ddface = get_option( 'ddface' );  echo '<input type="checkbox" id="ddface" name="ddface" value="1"' . checked( 1, $ddface, false ) . ' />';  ?>  </td>  </tr>  <tr>  <?php   $lag_option=get_option("ai_comments_lang","all");  ?>  <th scope="row"><label for="comments_lang">   .</label></th>  <td> <select name='comments_lang' id='comments_lang' required style='max-width:350px; width:100%;'>  <option value='all' <?php  if($lag_option=="all") echo "selected";?>> </option>  <option value='ru_only' <?php  if($lag_option=="ru_only") echo "selected";?>></option>  <option value='en_only' <?php  if($lag_option=="en_only") echo "selected";?>></option>    </select>  </td>     </tr>     <tr>      <th scope="row"><label for="ai_comments_proxy_ip">IP </label></th>      <td><input type="text" name="ai_comments_proxy_ip" id="ai_comments_proxy_ip" class="regular-text" value="<?php  echo esc_attr($proxy_ip); ?>"></td>     </tr>     <tr>      <th scope="row"><label for="ai_comments_proxy_port"> </label></th>      <td><input type="text" name="ai_comments_proxy_port" id="ai_comments_proxy_port" class="regular-text" value="<?php  echo esc_attr($proxy_port); ?>"></td>     </tr>     <tr>      <th scope="row"><label for="ai_comments_proxy_login"> </label></th>      <td><input type="text" name="ai_comments_proxy_login" id="ai_comments_proxy_login" class="regular-text" value="<?php  echo esc_attr($proxy_login); ?>"></td>     </tr>     <tr>      <th scope="row"><label for="ai_comments_proxy_pass"> </label></th>      <td><input type="text" name="ai_comments_proxy_pass" id="ai_comments_proxy_pass" class="regular-text" value="<?php  echo esc_attr($proxy_pass); ?>"></td>     </tr>     </tbody>   </table>    </div>   <div id="tab2" class="tab-content"> <?php   $comments_disabled_checked=get_option("comments_disabled");  $comments_answer_disabled_checked=get_option("comments_answer_disabled");  $comments_auto=get_option("comments_auto");  $max_comments=get_option("max_comments",1);  $max_answers=get_option("max_answers",1);   $woo_max_comments=get_option("woo_max_comments",1);  $woo_max_answers=get_option("woo_max_answers",1);   $post_date=get_option("post_date",date("Y-m-d"));  $woo_post_date=get_option("woo_post_date",date("Y-m-d"));  if($comments_auto!="")$comments_auto='checked="true"';  ?>  <input type="checkbox" name="comments_auto" id="comments_auto" value="comments_auto" <?php  echo $comments_auto;?>> <label for='comments_auto'>      .</label><br><br>  <?php   if($comments_disabled_checked!="")$comments_disabled_checked='checked="true"';  ?>  <input type="checkbox" name="comments_disabled" id="comments_disabled" value="comments_disabled" <?php  echo $comments_disabled_checked;?>> <label for='comments_disabled'>  .</label><br>  <?php   $comments_answer_disabled_checked=get_option("comments_answer_disabled");  if($comments_answer_disabled_checked!="")$comments_answer_disabled_checked='checked="true"';  ?>  <input type="checkbox" name="comments_answer_disabled" id="comments_answer_disabled" value="comments_answer_disabled" <?php  echo $comments_answer_disabled_checked;?>> <label for='comments_answer_disabled'>    .</label><br>   <table class="form-table">     <tbody>  <?php   $comments_stop_words=get_option("stop_words");  ?>  <tr>      <th scope="row"><label for="stop_words">     </label></th>      <td><textarea style='width:350px' name="stop_words" id="stop_words" placeholder='      '><?php  echo $comments_stop_words;?></textarea><br></td>     </tr>  <tr>      <th scope="row"><label for="post_date">,       </label></th>      <td><input type="date" name="post_date" id="post_date" class="regular-text" value="<?php  echo esc_attr($post_date); ?>" min="1" step="1"></td>     </tr>  <tr>      <th scope="row"><label for="max_comments">  </label></th>      <td><input type="number" name="max_comments" id="max_comments" class="regular-text" value="<?php  echo esc_attr($max_comments); ?>" min="0" step="1"></td>     </tr>  <tr>      <th scope="row"><label for="max_answers">  </label></th>      <td><input type="number" name="max_answers" id="max_answers" class="regular-text" value="<?php  echo esc_attr($max_answers); ?>" min="0" step="1"></td>     </tr>  <tr>      <th scope="row">   </th>      <td>    <?php   $args = array(  'taxonomy' => 'category',  'orderby' => 'count',  'order' => 'DESC',  );   $categories = get_terms( $args );    $cat_count=count($categories);  ?>  <script>  var selected=false;  function ai_select_all_cat(count)  {     selected=!selected;   if(selected==false)   document.getElementById("ai_select_all_cat_button").value=" ";   else   document.getElementById("ai_select_all_cat_button").value="";     for(var i=0;i<count;i++)   {     document.getElementById("bbbbbbfbdaeafc_"+i).checked=selected;   }     }  </script>  <input id='ai_select_all_cat_button' onclick='ai_select_all_cat(<?php  echo $cat_count;?>);' type='button' name='ai_all_categ' value='Select all categories' style='max-width:350px;width:100%;' class='button button-secondary'>  <br>  <br>  <div style="max-height: 200px; overflow:auto;background:white;box-shadow: 0 0 0 transparent;  border-radius: 4px;  border: 1px solid #8c8f94;  background-color: #fff;  color: #2c3338;padding:4px;  max-width:340px;  " >  <?php       $cnt=0;  foreach ( $categories as $category )   {   $checked="";   foreach($bbbbbbfbdaeafc as $cat)   {     if($cat==$category->term_id)$checked="checked";   }   echo '<input type="checkbox" name="bbbbbbfbdaeafc[]" value="' . $category->term_id . '" '.$checked.' id="bbbbbbfbdaeafc_'.$cnt.'">' . $category->name .' ('.$category->count.')<br>';   $cnt++;  }    if($cnt==count($bbbbbbfbdaeafc))   echo "<script>ai_select_all_cat();</script>";     ?>  </div>  </td>     </tr>  </tbody> </table>  </div> <?php  if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) { ?>  <div id="tab3" class="tab-content">  <?php   $woo_max_rating=get_option("woo_max_rating",5);  $woo_min_rating=get_option("woo_min_rating",0);  $woo_comments_auto=get_option("woo_comments_auto");  $woo_comments_disabled_checked=get_option("woo_comments_disabled");  $woo_comments_answer_disabled_checked=get_option("woo_comments_answer_disabled");  if($woo_comments_auto!="")$woo_comments_auto='checked="true"';  ?>  <input type="checkbox" name="woo_comments_auto" id="woo_comments_auto" value="woo_comments_auto" <?php  echo $woo_comments_auto;?>> <label for='woo_comments_auto'>      .</label><br><br>  <?php   if($woo_comments_disabled_checked!="")$woo_comments_disabled_checked='checked="true"';  ?>  <input type="checkbox" name="woo_comments_disabled" id="woo_comments_disabled" value="woo_comments_disabled" <?php  echo $woo_comments_disabled_checked;?>> <label for='woo_comments_disabled'>  WooCommerce</label><br>  <?php    if($woo_comments_answer_disabled_checked!="")$woo_comments_answer_disabled_checked='checked="true"';  ?>  <input type="checkbox" name="woo_comments_answer_disabled" id="woo_comments_answer_disabled" value="woo_comments_answer_disabled" <?php  echo $woo_comments_answer_disabled_checked;?>> <label for='woo_comments_answer_disabled'>    WooCommerce</label><br>    <table class="form-table">     <tbody>  <tr>      <th scope="row"><label for="woo_stop_words">  </label></th>      <td>  <div>   <label for="min">Min :</label><br>   <input type="range" id="min" name='woo_min_rating' min="0" max="5" value="<?php  echo $woo_min_rating;?>">   <span id="min-value"><?php  echo $woo_min_rating;?></span>  </div>  <div>   <label for="max">Max :</label><br>   <input type="range" id="max" name='woo_max_rating' min="0" max="5" value="<?php  echo $woo_max_rating;?>">   <span id="max-value"><?php  echo $woo_max_rating;?></span>  </div>  <script>   const minSlider = document.getElementById('min');   const maxSlider = document.getElementById('max');   const minValueElement = document.getElementById('min-value');   const maxValueElement = document.getElementById('max-value');     
  minSlider.addEventListener('input', function() {  const minValue = parseInt(minSlider.value);  const maxValue = parseInt(maxSlider.value);    if (minValue > maxValue) {   
   
   maxSlider.value = minValue;  }     
  minValueElement.textContent = minValue;  maxValueElement.textContent = maxValue;   });     
  maxSlider.addEventListener('input', function() {  const minValue = parseInt(minSlider.value);  const maxValue = parseInt(maxSlider.value);    if (maxValue < minValue) {   
   
   minSlider.value = maxValue;  }     
  minValueElement.textContent = minValue;  maxValueElement.textContent = maxValue;   });  </script>  </td>     </tr>  <?php   $woo_comments_stop_words=get_option("woo_stop_words");  ?>  <tr>      <th scope="row"><label for="woo_stop_words">     </label></th>      <td><textarea style='width:350px' name="woo_stop_words" id="woo_stop_words" placeholder='      '><?php  echo $woo_comments_stop_words;?></textarea><br></td>     </tr>       <th scope="row"><label for="woo_post_date">,       </label></th>      <td><input type="date" name="woo_post_date" id="woo_post_date" class="regular-text" value="<?php  echo esc_attr($woo_post_date); ?>" min="1" step="1"></td>     </tr>  <tr>      <th scope="row"><label for="woo_max_comments">  </label></th>      <td><input type="number" name="woo_max_comments" id="woo_max_comments" class="regular-text" value="<?php  echo esc_attr($woo_max_comments); ?>" min="0" step="1"></td>     </tr>  <tr>      <th scope="row"><label for="woo_max_answers">  </label></th>      <td><input type="number" name="woo_max_answers" id="woo_max_answers" class="regular-text" value="<?php  echo esc_attr($woo_max_answers); ?>" min="0" step="1"></td>     </tr>  <tr>      <th scope="row">    WooCommerce</th>      <td>  <?php   $args = array(  'taxonomy' => 'category',  'orderby' => 'count',  'order' => 'DESC',  );    $args = array(  'taxonomy' => 'product_cat',  'hide_empty' => false,  );  $categories_woo = get_terms($args);  $cat_count_woo=count($categories_woo);  ?>  <script>  var selected=false;  function ai_select_all_cat_woo(count)  {   selected=!selected;   if(selected==false)   document.getElementById("ai_select_all_cat_button_woo").value=" ";   else   document.getElementById("ai_select_all_cat_button_woo").value="";     for(var i=0;i<count;i++)   {     document.getElementById("bbbbbbfbdaeafc_woo_"+i).checked=selected;   }     }  </script>  <input id='ai_select_all_cat_button_woo' onclick='ai_select_all_cat_woo(<?php  echo $cat_count_woo;?>);' type='button' name='ai_all_categ_woo' value='Select all categories' style='max-width:350px;width:100%;' class='button button-secondary'>  <br>  <br>  <div style="max-height: 200px; overflow:auto;background:white;box-shadow: 0 0 0 transparent;  border-radius: 4px;  border: 1px solid #8c8f94;  background-color: #fff;  color: #2c3338;padding:4px;  max-width:340px;  " >  <?php     $cnt=0;    foreach ( $categories_woo as $category )   {   $checked="";   foreach($bbbbbbfbdaeafc_woo as $cat)   {     if($cat==$category->term_id)$checked="checked";   }   echo '<input type="checkbox" name="bbbbbbfbdaeafc_woo[]" value="' . $category->term_id . '" '.$checked.' id="bbbbbbfbdaeafc_woo_'.$cnt.'">' . $category->name .' ('.$category->count.')<br>';   $cnt++;  }  if($cnt==count($bbbbbbfbdaeafc_woo))   echo "<script>ai_select_all_cat_woo();</script>";     ?>  </div>  </td>     </tr>  </tbody> </table>  </div> <?php  } 
function getPrompt($postfix='',$h3=""){ if($postfix!="") $postfix="_".$postfix; $prompt = get_option('dccdbdfadbbeab'.$postfix); ?> <table style='width:100%;'> <tbody style='width:100%;'> <tr> <?php  if($postfix==''){ ?>   <td colspan='2'><i style='font-weight:normal;border-left: 4px solid orange;margin-left:-12px;' class='notice notice-success '>    ,      (, 'Use Spanish to publish comment').</i>  <br><br>  <i style='font-weight:normal;border-left: 4px solid orange;margin-left:-12px;' class='notice notice-success '>     ,      .  </i>  <br><br>  <i style='display:block;font-weight:normal;border-left: 4px solid orange;margin-left:-12px;' class='notice notice-success '>       :<br>  1. {content_300} -     300 .    300      content_555, content_777, content_888         . ,   ,      ,       .      {content}.<br>  2. {category} -  .<br>  3. {max_tokens} -         "".<br>  4. {comment} -       "    ".<br>       . <br>   </i>  </td> <?php  } if($postfix=='_woo_comment') { ?>   <td colspan='2'><i style='font-weight:normal;border-left: 4px solid orange;margin-left:-12px;' class='notice notice-success '>    ,      (, 'Use Spanish to publish comment').</i>  <br><br>  <i style='font-weight:normal;border-left: 4px solid orange;margin-left:-12px;' class='notice notice-success '>     ,      .  </i>  <br><br>  <i style='display:block;font-weight:normal;border-left: 4px solid orange;margin-left:-12px;' class='notice notice-success '>       :<br>  1. {description} -  .<br>  2. {category} -  .<br>  3. {max_tokens} -         "".<br>  4. {comment} -       "    ".<br>       . <br>   </i>  </td>    <?php  } $prompt=$prompt_arr[0] = get_option("dccdbdfadbbeab{$postfix}_"."0"); ?>  </tr>      <tr>   <td colspan="2" scope="row" style='width:100px;max-width:100px;'>  <h3><?php  echo $h3;?></h3>   </td>  </tr>      <tr>        <th scope="row" style='width:100px;max-width:100px;'>    <label for="prompt<?php  echo $postfix;?>_0" > 1</label></th>         <td><input style='width:100%' type="text" placeholder=' ' name="prompt<?php  echo $postfix;?>_0" id="prompt<?php  echo $postfix;?>_0" class="regular-text"   value="<?php  echo esc_attr(stripslashes($prompt_arr[0])); ?>"></td>  </tr>   <?php   $prompt_arr[0]="";  for ($i=1;$i<100;$i++)  {  $prompt_arr[$i] = get_option("dccdbdfadbbeab{$postfix}_".$i);   if($i==1 and $prompt_arr[$i]=="" and $prompt=="")continue;  elseif($prompt_arr[$i]=="" and $prompt_arr[$i-1]=="" and $i>1)continue;  ?>  <tr>       <th scope="row"><label for="prompt<?php  echo $postfix."_"; echo $i;?>"> <?php  echo $i+1;?></label></th>       <td><input style='width:100%' type="text" placeholder=' ' name="prompt<?php  echo $postfix."_"; echo $i;?>" id="prompt<?php  echo $postfix."_"; echo $i;?>" class="regular-text" value="<?php  echo esc_attr(stripslashes($prompt_arr[$i])); ?>"></td>  </tr>  <?php   }  ?>  </tbody>  </table> <?php  } 
?> <div id="tab4" class="tab-content"> <?php  getPrompt("","  "); getPrompt("comment_answer","    "); ?>  </div> <?php  if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) { ?> <div id="tab5" class="tab-content">   <?php  getPrompt("woo_comment","  "); getPrompt("woo_comment_answer","    "); ?>  </div> <?php  }?> </div> <style> /* For modern browsers */ ::placeholder { color: #aaa; /* Placeholder color */ } /* For older versions of Firefox */ ::-moz-placeholder { color: #aaa; /* Placeholder color */ } /* For older versions of Chrome and Safari */ ::-webkit-input-placeholder { color: #aaa; /* Placeholder color */ } /* For older versions of Edge */ :-ms-input-placeholder { color: #aaa; /* Placeholder color */ }  .nav-tab-wrapper {   margin-top: 20px;  }   .nav-tab {   padding: 10px 15px;   border: 1px solid #ccc;   background-color: #f9f9f9;   border-radius: 4px 4px 0 0;   text-decoration: none;   }   .nav-tab-active {   background-color: #f0f0f1;   border-bottom-color: transparent; border-bottom: 4px solid #f0f0f1!important;  }   .tab-content {   padding: 20px;   border: 1px solid #ccc;   border-top: none;   display: none;  }   .tab-content:first-child {   display: block;  } </style> <script>  document.addEventListener('DOMContentLoaded', function() {   var tabs = document.querySelectorAll('.nav-tab');   var tabContents = document.querySelectorAll('.tab-content');   function switchTab(event) {    event.preventDefault();    var target = event.target;    var tabId = target.getAttribute('href');    tabs.forEach(function(tab) {     tab.classList.remove('nav-tab-active');    });    tabContents.forEach(function(content) {     content.style.display = 'none';    });    target.classList.add('nav-tab-active');    document.querySelector(tabId).style.display = 'block';    
   localStorage.setItem('activeTab', tabId);   }   tabs.forEach(function(tab) {    tab.addEventListener('click', switchTab);   });   
  var activeTab = localStorage.getItem('activeTab');   if (activeTab) {    var tabLink = document.querySelector('a[href="' + activeTab + '"]');    if (tabLink) {     tabLink.click();    }   }  }); </script>     <?php  submit_button(); ?>  </form> <?php  
 ?> <button id="ia-test-button"> </button> <div id='ai_test_response' style='width:100%;margin-top:10px;background:white;'></div> <script> jQuery( document ).ready( function( $ ) { $( '#ia-test-button' ).on( 'click', function() {  var activeTab = localStorage.getItem('activeTab').replace(/#/g, '');     $("#ai_test_response").html("<div class='notice notice-success'>.  ...</div>"); jQuery.ajax({  type: 'POST',  url: ajaxurl,  data: {  action: 'my_ajax_function',  tab: activeTab  },  success: function(response) {  if(response=="" )  {  response="<div class='notice notice-error'>    AI.   .</div>";  $("#ai_test_response").html(response);  return;  }  if( response.indexOf("Error:") !== -1 )  {  response="<div class='notice notice-error'>"+response+"</div>";  $("#ai_test_response").html(response);  return;  }  $("#ai_test_response").html("<div class='notice notice-success'>"+response+"</div>");  },  error: function(response)  {   response="<div class='notice notice-error'> .  ."+response.responseText+"</div>";  $("#ai_test_response").html(response);  } }); }); }); </script> <?php  
 ?> <div class='notice notice-success is-dismissible' style='border-left: 4px solid orange;'> If there are issues with the standard WordPress scheduler, add the following line to wp-config.php: <br> define('ALTERNATE_WP_CRON', true); </div>   </div> <?php  } 
function my_enqueue() {  wp_enqueue_script( 'jquery' ); } add_action( 'wp_enqueue_scripts', 'my_enqueue' ); function my_ajax_function() {  global $echo_text; $data=eceeeceffadca(); if($echo_text) echo $data;  die(); } add_action( 'wp_ajax_my_ajax_function', 'my_ajax_function' ); add_action( 'wp_ajax_nopriv_my_ajax_function', 'my_ajax_function' ); 
 
function eceeeceffadca($post_id=0) { if(dacfecfbeba($abedeafe = get_option('aedadcfdbbbcee_key'))==true) {  return cafbdfcdb($post_id);  } } add_action( "my_ai_hook", 'eceeeceffadca' ); function get_random_user() {  $domains = array('mail.ru', 'yandex.ru', 'gmail.com', 'hotmail.com');  $names = array('Alex', 'Kate', 'Maxx', 'Anna', 'Mari', 'NintendoBoy', 'DeMos', 'Mark', 'Kolya', 'Valeri', 'Valera', '', 'Anton', 'Lena', 'Andrey', 'Sasha', 'Irina', 'Vladimir', 'Diana', 'Artem', 'Oksana', 'Viktor', 'Veronica', 'Pavel', 'Julia', 'Boris', 'Olga', 'Roman', 'Tanya', 'Kirill', 'Natalia', 'Ivan', 'Elena', 'Dmitry', 'Svetlana', 'Nikita', 'Maria', 'Sergey', 'Elizaveta', 'Vladislav', 'Ekaterina', 'Nikolay', 'Alina', 'Igor', 'Yulia', 'Alexey', 'Anna', 'Evgeny', 'Ksenia', 'Ilya', 'Polina', 'Vasily', 'Marina', 'Denis', 'Yana', 'Konstantin', 'Victoria', 'Vlad', 'Elena', 'Semyon', 'Anastasia', 'Stepan', 'Irina', 'Timur', 'Galina', 'Fedor', 'Sofia', 'Mikhail', 'Valentina', 'Ruslan', 'Larisa', 'Vyacheslav', 'Angelina', 'Egor', 'Anzhelika', 'Yaroslav', 'Nina', 'Daniil', 'Rita', 'Gleb', 'Yuliya', 'Aleksandr', 'Margarita', 'Yaroslava', 'Elina', 'Filipp', 'Vera', 'Stanislav', 'Lyubov', 'Bogdan', 'Alla');  $randomDomain = $domains[array_rand($domains)]; 
 $randomName = $names[array_rand($names)]; 
  $username = generate_username($randomName);  $email = $username . '@' . $randomDomain;  return array('author_email' => $email, 'author_name' => $username); } function generate_username($name) {  
  
 $randomNumber = rand(1, 99); $randomNumber1=rand(0, 10); if($randomNumber1!=1)$randomNumber="";  return strtolower($name) . $randomNumber; } function add_comment_on_post_publish($post_id) { global $echo_text; $echo_text=false;   $comments = get_comments(array('post_id' => $post_id));    if (empty($comments)) {   eceeeceffadca($post_id);  } } add_action('wp_insert_post', 'add_comment_on_post_publish'); add_action('save_post', 'add_comment_on_post_publish'); 

Function Calls

None

Variables

None

Stats

MD5 aef09a2dd298a601b0db8d1bcd4d9de7
Eval Count 0
Decode Time 123 ms