begin process at 2010 02 10 03:20:36
  Trouver un code source :
 
dans
 
Accueil > 

Code

 > 

Chaîne de caratère

 > IA DE TYPE QUESTION/REPONSE

IA DE TYPE QUESTION/REPONSE


 Description

Voici un ébauche d'intélligence artificiel de type question/reponses (chatbox)
j'ai a peine commencer a effleurer les fonctions évoluer que je veut développer sur cette IA

Il y a 3 table SQL présentement utulisé soit :

CREATE TABLE `s0019__allhist` (
  `id_allhist` int(25) NOT NULL auto_increment,
  `text_allhist` varchar(255) NOT NULL default '',
  `date_allhist` varchar(20) NOT NULL default '',
  `user_allhist` varchar(50) NOT NULL default '',
  `bot_allhist` varchar(10) NOT NULL default '',
  PRIMARY KEY  (`id_allhist`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1626 ;

-- -------------------------------------------------- ------

--
-- Structure de la table `s0019__homop`
--

CREATE TABLE `s0019__homop` (
  `id_homop` int(20) NOT NULL auto_increment,
  `autor_homop` varchar(50) NOT NULL default '',
  `h1_homop` varchar(255) NOT NULL default '',
  `h2_homop` varchar(255) NOT NULL default '',
  `h3_homop` varchar(255) NOT NULL default '',
  `h4_homop` varchar(255) NOT NULL default '',
  `h5_homop` varchar(255) NOT NULL default '',
  `h6_homop` varchar(255) NOT NULL default '',
  `h7_homop` varchar(255) NOT NULL default '',
  `h8_homop` varchar(255) NOT NULL default '',
  `h9_homop` varchar(255) NOT NULL default '',
  `h10_homop` varchar(255) NOT NULL default '',
  `h11_homop` varchar(255) NOT NULL default '',
  `h12_homop` varchar(255) NOT NULL default '',
  `h13_homop` varchar(255) NOT NULL default '',
  `h14_homop` varchar(255) NOT NULL default '',
  `h15_homop` varchar(255) NOT NULL default '',
  `h16_homop` varchar(255) NOT NULL default '',
  `h17_homop` varchar(255) NOT NULL default '',
  `h18_homop` varchar(255) NOT NULL default '',
  `h19_homop` varchar(255) NOT NULL default '',
  `h20_homop` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`id_homop`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=13 ;

-- -------------------------------------------------- ------

--
-- Structure de la table `s0019__reply`
--

CREATE TABLE `s0019__reply` (
  `id_reply` int(20) NOT NULL auto_increment,
  `text_reply` varchar(255) NOT NULL default '',
  `rep_reply` varchar(255) NOT NULL default '',
  `date_reply` varchar(20) NOT NULL default '',
  `autor_reply` varchar(50) NOT NULL default '',
  PRIMARY KEY  (`id_reply`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=488 ;

s0019__allhist => Table d'historique de conversation
s0019__homop   => Table de synonim de mots
s0019__reply   => Table de Question/Réponse

Source

  • <?
  • $time = time();
  • require('includes/config.php');
  • $robot_speak_color = '000000';
  • $robot_speak = 'Bonjour, bienvenue sur Tchat avec Moi !';
  • if($login == 'login')
  • {
  • $user = strtolower($user);
  • if($user == '')
  • {
  • $user_print = 'Invité';
  • $user = $time;
  • $print_usernam = 'no';
  • }
  • if($user != '')
  • {
  • $print_usernam = 'yes';
  • $user_print = $user;
  • $user = $user;
  • }
  • if($print_usernam == 'yes')
  • {
  • print '<center><table border="1" style="border-collapse: collapse">
  • <TR>
  • <TD align="right">Ton login : <b>' . $user_print . '</b> </TD>
  • </TR>';
  • }
  • if($print_usernam == 'no' || $print_usernam == '')
  • {
  • print '<center><table border="1" style="border-collapse: collapse">
  • <TR>
  • <TD align="right"></TD>
  • </TR>';
  • }
  • if($envo == 'envo' && $mess != "")
  • {
  • if (preg_match("#\\goodrep #", $mess))
  • {
  • $mess = str_replace("\\\goodrep ", "", $mess);
  • $goodrep_inser = '1';
  • }
  • if (preg_match("#\\inhomo #", $mess))
  • {
  • $mess = str_replace("\\\inhomo ", "", $mess);
  • $inhomo_inser = '1';
  • }
  • $mess = strtolower($mess); //met en minuscule
  • $mess = trim($mess); // suprime espace au debut de la chaine et a la fin
  • $mess = addslashes($mess); // met des \ devant caractére spécial
  • if($last_robotreply != '')
  • {
  • $select_reply_posible = 'SELECT * FROM s0019__reply WHERE ((autor_reply = "' . $user_print . '" || autor_reply = "team") && text_reply = "' . $last_robotreply . '")';
  • $result_reply_posible = mysql_query($select_reply_posible) or die ('Erreur 0001: '.mysql_error() );
  • $total_reply_posible = mysql_num_rows($result_reply_posible);
  • if($total_reply_posible)
  • {
  • // Aucune Intération l'intération existe déja !
  • }
  • else
  • {
  • $new_question = $last_robotreply;
  • $new_question = strtolower($new_question); //met en minuscule
  • $new_question = trim($new_question); // suprime espace au debut de la chaine et a la fin
  • $new_question = addslashes($new_question); // met des \ devant caractére spécial
  • $mess = $mess;
  • $mess = strtolower($mess); //met en minuscule
  • $mess = trim($mess); // suprime espace au debut de la chaine et a la fin
  • $mess = addslashes($mess); // met des \ devant caractére spécial
  • if (preg_match("#\?#", $new_question)) { $new_question = str_replace("?", "", $new_question); }
  • if (preg_match("#\!#", $new_question)) { $new_question = str_replace("!", "", $new_question); }
  • if (preg_match("#\(#", $new_question)) { $new_question = str_replace("(", "", $new_question); }
  • if (preg_match("#\)#", $new_question)) { $new_question = str_replace(")", "", $new_question); }
  • if (preg_match("#\.#", $new_question)) { $new_question = str_replace(".", "", $new_question); }
  • if (preg_match("#\.\.#", $new_question)) { $new_question = str_replace("..", "", $new_question); }
  • if (preg_match("#\.\.\.#", $new_question)) { $new_question = str_replace("...", "", $new_question); }
  • if (preg_match("#\.\.\.\.#", $new_question)) { $new_question = str_replace("....", "", $new_question); }
  • if (preg_match("#\.\.\.\.\.#", $new_question)) { $new_question = str_replace(".....", "", $new_question); }
  • if (preg_match("#\^#", $new_question)) { $new_question = str_replace("^", "", $new_question); }
  • if (preg_match("#\^\^#", $new_question)) { $new_question = str_replace("^^", "", $new_question); }
  • if (preg_match("#\<noscipt\>#", $new_question)) { $new_question = str_replace("<noscipt>", "", $new_question); }
  • if (preg_match("#é#", $new_question)) { $new_question = str_replace("é", "e", $new_question); }
  • if (preg_match("#ê#", $new_question)) { $new_question = str_replace("ê", "e", $new_question); }
  • if (preg_match("#è#", $new_question)) { $new_question = str_replace("è", "e", $new_question); }
  • if (preg_match("#ï#", $new_question)) { $new_question = str_replace("ï", "i", $new_question); }
  • if (preg_match("#û#", $new_question)) { $new_question = str_replace("û", "u", $new_question); }
  • if (preg_match("#ù#", $new_question)) { $new_question = str_replace("ù", "u", $new_question); }
  • if (preg_match("#ç#", $new_question)) { $new_question = str_replace("ç", "c", $new_question); }
  • if (preg_match("#à#", $new_question)) { $new_question = str_replace("à", "a", $new_question); }
  • if (preg_match("#â#", $new_question)) { $new_question = str_replace("â", "a", $new_question); }
  • if (preg_match("#,#", $new_question)) { $new_question = str_replace(",", "", $new_question); }
  • if (preg_match("#;#", $new_question)) { $new_question = str_replace(";", "", $new_question); }
  • $new_question = $new_question;
  • $new_question = strtolower($new_question); //met en minuscule
  • $new_question = trim($new_question); // suprime espace au debut de la chaine et a la fin
  • $new_question = addslashes($new_question); // met des \ devant caractére spécial
  • $mess = $mess;
  • $mess = strtolower($mess); //met en minuscule
  • $mess = trim($mess); // suprime espace au debut de la chaine et a la fin
  • $mess = addslashes($mess); // met des \ devant caractére spécial
  • $rq_goodrep = "INSERT INTO s0019__reply (id_reply, text_reply, rep_reply, date_reply, autor_reply) VALUES ('', '$new_question', '$mess', '$time', '$user_print')";
  • $resq_goodrep = mysql_query($rq_goodrep)
  • or die ("Probléme d'affichage 00-0002");
  • }
  • }
  • if ($goodrep_inser == '1')
  • {
  • if($new_question != '')
  • {
  • $new_question = $new_question;
  • $new_question = strtolower($new_question); //met en minuscule
  • $new_question = trim($new_question); // suprime espace au debut de la chaine et a la fin
  • $new_question = addslashes($new_question); // met des \ devant caractére spécial
  • $mess = $mess;
  • $mess = strtolower($mess); //met en minuscule
  • $mess = trim($mess); // suprime espace au debut de la chaine et a la fin
  • $mess = addslashes($mess); // met des \ devant caractére spécial
  • if (preg_match("#\?#", $new_question)) { $new_question = str_replace("?", "", $new_question); }
  • if (preg_match("#\!#", $new_question)) { $new_question = str_replace("!", "", $new_question); }
  • if (preg_match("#\(#", $new_question)) { $new_question = str_replace("(", "", $new_question); }
  • if (preg_match("#\)#", $new_question)) { $new_question = str_replace(")", "", $new_question); }
  • if (preg_match("#\.#", $new_question)) { $new_question = str_replace(".", "", $new_question); }
  • if (preg_match("#\.\.#", $new_question)) { $new_question = str_replace("..", "", $new_question); }
  • if (preg_match("#\.\.\.#", $new_question)) { $new_question = str_replace("...", "", $new_question); }
  • if (preg_match("#\.\.\.\.#", $new_question)) { $new_question = str_replace("....", "", $new_question); }
  • if (preg_match("#\.\.\.\.\.#", $new_question)) { $new_question = str_replace(".....", "", $new_question); }
  • if (preg_match("#\^#", $new_question)) { $new_question = str_replace("^", "", $new_question); }
  • if (preg_match("#\^\^#", $new_question)) { $new_question = str_replace("^^", "", $new_question); }
  • if (preg_match("#\<noscipt\>#", $new_question)) { $new_question = str_replace("<noscipt>", "", $new_question); }
  • if (preg_match("#é#", $new_question)) { $new_question = str_replace("é", "e", $new_question); }
  • if (preg_match("#ê#", $new_question)) { $new_question = str_replace("ê", "e", $new_question); }
  • if (preg_match("#è#", $new_question)) { $new_question = str_replace("è", "e", $new_question); }
  • if (preg_match("#ï#", $new_question)) { $new_question = str_replace("ï", "i", $new_question); }
  • if (preg_match("#û#", $new_question)) { $new_question = str_replace("û", "u", $new_question); }
  • if (preg_match("#ù#", $new_question)) { $new_question = str_replace("ù", "u", $new_question); }
  • if (preg_match("#ç#", $new_question)) { $new_question = str_replace("ç", "c", $new_question); }
  • if (preg_match("#à#", $new_question)) { $new_question = str_replace("à", "a", $new_question); }
  • if (preg_match("#â#", $new_question)) { $new_question = str_replace("â", "a", $new_question); }
  • if (preg_match("#,#", $new_question)) { $new_question = str_replace(",", "", $new_question); }
  • if (preg_match("#;#", $new_question)) { $new_question = str_replace(";", "", $new_question); }
  • $new_question = $new_question;
  • $new_question = strtolower($new_question); //met en minuscule
  • $new_question = trim($new_question); // suprime espace au debut de la chaine et a la fin
  • $new_question = addslashes($new_question); // met des \ devant caractére spécial
  • $mess = $mess;
  • $mess = strtolower($mess); //met en minuscule
  • $mess = trim($mess); // suprime espace au debut de la chaine et a la fin
  • $mess = addslashes($mess); // met des \ devant caractére spécial
  • $rq_goodrep = "INSERT INTO s0019__reply (id_reply, text_reply, rep_reply, date_reply, autor_reply) VALUES ('', '$new_question', '$mess', '$time', '$user_print')";
  • $resq_goodrep = mysql_query($rq_goodrep)
  • or die ("Probléme d'affichage 00-0003");
  • }
  • else
  • {
  • print 'Bizzard, cette erreur signifie que vous navez pas posser de question';
  • }
  • }
  • if ($inhomo_inser == '1')
  • {
  • if (preg_match("#\[(.+)\]#isU", $mess)) { $max = '1'; }
  • if (preg_match("#\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '2'; }
  • if (preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '3'; }
  • if (preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '4'; }
  • if (preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '5'; }
  • if (preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '6'; }
  • if (preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '7'; }
  • if (preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '8'; }
  • if (preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '9'; }
  • if (preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '10'; }
  • if (preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '11'; }
  • if (preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '12'; }
  • if ( preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '13'; }
  • if ( preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '14'; }
  • if ( preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '15'; }
  • if ( preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '16'; }
  • if ( preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '17'; }
  • if ( preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '18'; }
  • if ( preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '19'; }
  • if ( preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '20'; }
  • if (preg_match("#\[(.+)\]#isU", $mess))
  • {
  • if($max == '1') { $preg_homo = preg_replace('#\[(.+)\]#isU', '[(01)$1];', $mess); }
  • if($max == '2') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];', $mess); }
  • if($max == '3') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];', $mess); }
  • if($max == '4') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];', $mess); }
  • if($max == '5') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];[(05)$5];', $mess); }
  • if($max == '6') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];[(05)$5];[(06)$6];', $mess); }
  • if($max == '7') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];[(05)$5];[(06)$6];[(07)$7];', $mess); }
  • if($max == '8') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];[(05)$5];[(06)$6];[(07)$7];[(08)$8];', $mess); }
  • if($max == '9') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];[(05)$5];[(06)$6];[(07)$7];[(08)$8];[(09)$9];', $mess); }
  • if($max == '10') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];[(05)$5];[(06)$6];[(07)$7];[(08)$8];[(09)$9];[(10)$10];', $mess); }
  • if($max == '11') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];[(05)$5];[(06)$6];[(07)$7];[(08)$8];[(09)$9];[(10)$10];[(11)$11];', $mess); }
  • if($max == '12') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];[(05)$5];[(06)$6];[(07)$7];[(08)$8];[(09)$9];[(10)$10];[(11)$11];[(12)$12];', $mess); }
  • if($max == '13') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];[(05)$5];[(06)$6];[(07)$7];[(08)$8];[(09)$9];[(10)$10];[(11)$11];[(12)$12];[(13)$13];', $mess); }
  • if($max == '14') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];[(05)$5];[(06)$6];[(07)$7];[(08)$8];[(09)$9];[(10)$10];[(11)$11];[(12)$12];[(13)$13];[(14)$14];', $mess); }
  • if($max == '15') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];[(05)$5];[(06)$6];[(07)$7];[(08)$8];[(09)$9];[(10)$10];[(11)$11];[(12)$12];[(13)$13];[(14)$14];[(15)$15];', $mess); }
  • if($max == '16') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];[(05)$5];[(06)$6];[(07)$7];[(08)$8];[(09)$9];[(10)$10];[(11)$11];[(12)$12];[(13)$13];[(14)$14];[(15)$15];[(16)$16];', $mess); }
  • if($max == '17') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];[(05)$5];[(06)$6];[(07)$7];[(08)$8];[(09)$9];[(10)$10];[(11)$11];[(12)$12];[(13)$13];[(14)$14];[(15)$15];[(16)$16];[(17)$17];', $mess); }
  • if($max == '18') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];[(05)$5];[(06)$6];[(07)$7];[(08)$8];[(09)$9];[(10)$10];[(11)$11];[(12)$12];[(13)$13];[(14)$14];[(15)$15];[(16)$16];[(17)$17];[(18)$18];', $mess); }
  • if($max == '19') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];[(05)$5];[(06)$6];[(07)$7];[(08)$8];[(09)$9];[(10)$10];[(11)$11];[(12)$12];[(13)$13];[(14)$14];[(15)$15];[(16)$16];[(17)$17];[(18)$18];[(19)$19];', $mess); }
  • if($max == '20') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];[(05)$5];[(06)$6];[(07)$7];[(08)$8];[(09)$9];[(10)$10];[(11)$11];[(12)$12];[(13)$13];[(14)$14];[(15)$15];[(16)$16];[(17)$17];[(18)$18];[(19)$19];[(20)$20];', $mess); }
  • }
  • if($max <= '20')
  • {
  • $preg_homo = preg_replace('#\[\(01\)(.+)\];#isU', '$1', $preg_homo);
  • }
  • // MAX 1
  • if($max == '1')
  • {
  • $n1h = preg_replace('#([a-z0-9])#is', '$1', $preg_homo);
  • }
  • // MAX 2
  • if($max == '2')
  • {
  • $n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
  • $n2h = preg_replace('#(.+)\[\(02\)(.+)\];#is', '$2', $preg_homo);
  • }
  • // MAX 3
  • if($max == '3')
  • {
  • $n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
  • $n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];#is', '$2', $preg_homo);
  • $n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];#is', '$3', $preg_homo);
  • }
  • // MAX 4
  • if($max == '4')
  • {
  • $n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
  • $n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
  • $n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];#is', '$3', $preg_homo);
  • $n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];#is', '$4', $preg_homo);
  • }
  • // MAX 5
  • if($max == '5')
  • {
  • $n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
  • $n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
  • $n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];\[(.+)\];#is', '$3', $preg_homo);
  • $n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];\[(.+)\];#is', '$4', $preg_homo);
  • $n5h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[\(05\)(.+)\];#is', '$5', $preg_homo);
  • }
  • // MAX 6
  • if($max == '6')
  • {
  • $n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
  • $n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
  • $n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$3', $preg_homo);
  • $n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];\[(.+)\];\[(.+)\];#is', '$4', $preg_homo);
  • $n5h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[\(05\)(.+)\];\[(.+)\];#is', '$5', $preg_homo);
  • $n6h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(06\)(.+)\];#is', '$6', $preg_homo);
  • }
  • // MAX 7
  • if($max == '7')
  • {
  • $n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
  • $n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
  • $n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$3', $preg_homo);
  • $n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$4', $preg_homo);
  • $n5h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[\(05\)(.+)\];\[(.+)\];\[(.+)\];#is', '$5', $preg_homo);
  • $n6h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(06\)(.+)\];\[(.+)\];#is', '$6', $preg_homo);
  • $n7h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(07\)(.+)\];#is', '$7', $preg_homo);
  • }
  • // MAX 8
  • if($max == '8')
  • {
  • $n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
  • $n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
  • $n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$3', $preg_homo);
  • $n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$4', $preg_homo);
  • $n5h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[\(05\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$5', $preg_homo);
  • $n6h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(06\)(.+)\];\[(.+)\];\[(.+)\];#is', '$6', $preg_homo);
  • $n7h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(07\)(.+)\];\[(.+)\];#is', '$7', $preg_homo);
  • $n8h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(08\)(.+)\];#is', '$8', $preg_homo);
  • }
  • // MAX 9
  • if($max == '9')
  • {
  • $n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
  • $n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
  • $n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$3', $preg_homo);
  • $n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$4', $preg_homo);
  • $n5h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[\(05\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$5', $preg_homo);
  • $n6h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(06\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$6', $preg_homo);
  • $n7h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(07\)(.+)\];\[(.+)\];\[(.+)\];#is', '$7', $preg_homo);
  • $n8h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(08\)(.+)\];\[(.+)\];#is', '$8', $preg_homo);
  • $n9h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(09\)(.+)\];#is', '$9', $preg_homo);
  • }
  • // MAX 10
  • if($max == '10')
  • {
  • $n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
  • $n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
  • $n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$3', $preg_homo);
  • $n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$4', $preg_homo);
  • $n5h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[\(05\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$5', $preg_homo);
  • $n6h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(06\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$6', $preg_homo);
  • $n7h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(07\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$7', $preg_homo);
  • $n8h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(08\)(.+)\];\[(.+)\];\[(.+)\];#is', '$8', $preg_homo);
  • $n9h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(09\)(.+)\];\[(.+)\];#is', '$9', $preg_homo);
  • $n10h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(10\)(.+)\];#is', '$10', $preg_homo);
  • }
  • // MAX 11
  • if($max == '11')
  • {
  • $n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
  • $n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
  • $n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$3', $preg_homo);
  • $n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$4', $preg_homo);
  • $n5h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[\(05\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$5', $preg_homo);
  • $n6h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(06\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$6', $preg_homo);
  • $n7h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(07\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$7', $preg_homo);
  • $n8h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(08\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$8', $preg_homo);
  • $n9h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(09\)(.+)\];\[(.+)\];\[(.+)\];#is', '$9', $preg_homo);
  • $n10h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(10\)(.+)\];\[(.+)\];#is', '$10', $preg_homo);
  • $n11h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(11\)(.+)\];#is', '$11', $preg_homo);
  • }
  • // MAX 12
  • if($max == '12')
  • {
  • $n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
  • $n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
  • $n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$3', $preg_homo);
  • $n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$4', $preg_homo);
  • $n5h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[\(05\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$5', $preg_homo);
  • $n6h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(06\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$6', $preg_homo);
  • $n7h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(07\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$7', $preg_homo);
  • $n8h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(08\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$8', $preg_homo);
  • $n9h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(09\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$9', $preg_homo);
  • $n10h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(10\)(.+)\];\[(.+)\];\[(.+)\];#is', '$10', $preg_homo);
  • $n11h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(11\)(.+)\];\[(.+)\];#is', '$11', $preg_homo);
  • $n12h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(12\)(.+)\];#is', '$12', $preg_homo);
  • }
  • // MAX 13
  • if($max == '13')
  • {
  • $n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
  • $n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
  • $n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$3', $preg_homo);
  • $n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$4', $preg_homo);
  • $n5h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[\(05\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$5', $preg_homo);
  • $n6h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(06\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$6', $preg_homo);
  • $n7h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(07\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$7', $preg_homo);
  • $n8h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(08\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$8', $preg_homo);
  • $n9h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(09\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$9', $preg_homo);
  • $n10h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(10\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$10', $preg_homo);
  • $n11h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(11\)(.+)\];\[(.+)\];\[(.+)\];#is', '$11', $preg_homo);
  • $n12h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(12\)(.+)\];\[(.+)\];#is', '$12', $preg_homo);
  • $n13h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(13\)(.+)\];#is', '$13', $preg_homo);
  • }
  • // MAX 14
  • if($max == '14')
  • {
  • $n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
  • $n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
  • $n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$3', $preg_homo);
  • $n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$4', $preg_homo);
  • $n5h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[\(05\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$5', $preg_homo);
  • $n6h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(06\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$6', $preg_homo);
  • $n7h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(07\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$7', $preg_homo);
  • $n8h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(08\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$8', $preg_homo);
  • $n9h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(09\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$9', $preg_homo);
  • $n10h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(10\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$10', $preg_homo);
  • $n11h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(11\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$11', $preg_homo);
  • $n12h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(12\)(.+)\];\[(.+)\];\[(.+)\];#is', '$12', $preg_homo);
  • $n13h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(13\)(.+)\];\[(.+)\];#is', '$13', $preg_homo);
  • $n14h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(14\)(.+)\];#is', '$14', $preg_homo);
  • }
  • // MAX 15
  • if($max == '15')
  • {
  • $n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
  • $n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
  • $n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$3', $preg_homo);
  • $n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$4', $preg_homo);
  • $n5h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[\(05\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$5', $preg_homo);
  • $n6h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(06\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$6', $preg_homo);
  • $n7h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(07\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$7', $preg_homo);
  • $n8h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(08\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$8', $preg_homo);
  • $n9h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(09\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$9', $preg_homo);
  • $n10h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(10\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$10', $preg_homo);
  • $n11h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(11\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$11', $preg_homo);
  • $n12h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(12\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$12', $preg_homo);
  • $n13h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(13\)(.+)\];\[(.+)\];\[(.+)\];#is', '$13', $preg_homo);
  • $n14h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(14\)(.+)\];\[(.+)\];#is', '$14', $preg_homo);
  • $n15h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(15\)(.+)\];#is', '$15', $preg_homo);
  • }
  • // MAX 16
  • if($max == '16')
  • {
  • $n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
  • $n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
  • $n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$3', $preg_homo);
  • $n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$4', $preg_homo);
  • $n5h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[\(05\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$5', $preg_homo);
  • $n6h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(06\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$6', $preg_homo);
  • $n7h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(07\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$7', $preg_homo);
  • $n8h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(08\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$8', $preg_homo);
  • $n9h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(09\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$9', $preg_homo);
  • $n10h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(10\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$10', $preg_homo);
  • $n11h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(11\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$11', $preg_homo);
  • $n12h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(12\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$12', $preg_homo);
  • $n13h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(13\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$13', $preg_homo);
  • $n14h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(14\)(.+)\];\[(.+)\];\[(.+)\];#is', '$14', $preg_homo);
  • $n15h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(15\)(.+)\];\[(.+)\];#is', '$15', $preg_homo);
  • $n16h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(16\)(.+)\];#is', '$16', $preg_homo);
  • }
  • // MAX 17
  • if($max == '17')
  • {
  • $n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
  • $n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
  • $n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$3', $preg_homo);
  • $n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$4', $preg_homo);
  • $n5h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[\(05\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$5', $preg_homo);
  • $n6h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(06\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$6', $preg_homo);
  • $n7h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(07\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$7', $preg_homo);
  • $n8h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(08\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$8', $preg_homo);
  • $n9h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(09\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$9', $preg_homo);
  • $n10h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(10\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$10', $preg_homo);
  • $n11h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(11\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$11', $preg_homo);
  • $n12h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(12\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$12', $preg_homo);
  • $n13h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(13\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$13', $preg_homo);
  • $n14h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(14\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$14', $preg_homo);
  • $n15h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(15\)(.+)\];\[(.+)\];\[(.+)\];#is', '$15', $preg_homo);
  • $n16h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(16\)(.+)\];\[(.+)\];#is', '$16', $preg_homo);
  • $n17h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(17\)(.+)\];#is', '$17', $preg_homo);
  • }
  • // MAX 18
  • if($max == '18')
  • {
  • $n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
  • $n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
  • $n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$3', $preg_homo);
  • $n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$4', $preg_homo);
  • $n5h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[\(05\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$5', $preg_homo);
  • $n6h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(06\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$6', $preg_homo);
  • $n7h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(07\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$7', $preg_homo);
  • $n8h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(08\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$8', $preg_homo);
  • $n9h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(09\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$9', $preg_homo);
  • $n10h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(10\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$10', $preg_homo);
  • $n11h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(11\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$11', $preg_homo);
  • $n12h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(12\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$12', $preg_homo);
  • $n13h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(13\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$13', $preg_homo);
  • $n14h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(14\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$14', $preg_homo);
  • $n15h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(15\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$15', $preg_homo);
  • $n16h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(16\)(.+)\];\[(.+)\];\[(.+)\];#is', '$16', $preg_homo);
  • $n17h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(17\)(.+)\];\[(.+)\];#is', '$17', $preg_homo);
  • $n18h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(18\)(.+)\];#is', '$18', $preg_homo);
  • }
  • // MAX 19
  • if($max == '19')
  • {
  • $n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
  • $n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
  • $n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$3', $preg_homo);
  • $n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$4', $preg_homo);
  • $n5h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[\(05\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$5', $preg_homo);
  • $n6h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(06\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$6', $preg_homo);
  • $n7h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(07\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$7', $preg_homo);
  • $n8h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(08\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$8', $preg_homo);
  • $n9h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(09\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$9', $preg_homo);
  • $n10h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(10\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$10', $preg_homo);
  • $n11h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(11\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$11', $preg_homo);
  • $n12h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(12\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$12', $preg_homo);
  • $n13h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(13\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$13', $preg_homo);
  • $n14h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(14\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$14', $preg_homo);
  • $n15h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(15\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$15', $preg_homo);
  • $n16h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(16\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$16', $preg_homo);
  • $n17h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(17\)(.+)\];\[(.+)\];\[(.+)\];#is', '$17', $preg_homo);
  • $n18h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(18\)(.+)\];\[(.+)\];#is', '$18', $preg_homo);
  • $n19h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(19\)(.+)\];#is', '$19', $preg_homo);
  • }
  • // MAX 20
  • if($max == '20')
  • {
  • $n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
  • $n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
  • $n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$3', $preg_homo);
  • $n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$4', $preg_homo);
  • $n5h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[\(05\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$5', $preg_homo);
  • $n6h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(06\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$6', $preg_homo);
  • $n7h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(07\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$7', $preg_homo);
  • $n8h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(08\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$8', $preg_homo);
  • $n9h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(09\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$9', $preg_homo);
  • $n10h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(10\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$10', $preg_homo);
  • $n11h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(11\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$11', $preg_homo);
  • $n12h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(12\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$12', $preg_homo);
  • $n13h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(13\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$13', $preg_homo);
  • $n14h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(14\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$14', $preg_homo);
  • $n15h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(15\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$15', $preg_homo);
  • $n16h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(16\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$16', $preg_homo);
  • $n17h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(17\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$17', $preg_homo);
  • $n18h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(18\)(.+)\];\[(.+)\];\[(.+)\];#is', '$18', $preg_homo);
  • $n19h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(19\)(.+)\];\[(.+)\];#is', '$19', $preg_homo);
  • $n20h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(20\)(.+)\];#is', '$20', $preg_homo);
  • }
  • //REASSIGN VALUE FOR SURE
  • $n1_homo = $n1h;
  • $n2_homo = $n2h;
  • $n3_homo = $n3h;
  • $n4_homo = $n4h;
  • $n5_homo = $n5h;
  • $n6_homo = $n6h;
  • $n7_homo = $n7h;
  • $n8_homo = $n8h;
  • $n9_homo = $n9h;
  • $n10_homo = $n10h;
  • $n11_homo = $n11h;
  • $n12_homo = $n12h;
  • $n13_homo = $n13h;
  • $n14_homo = $n14h;
  • $n15_homo = $n15h;
  • $n16_homo = $n16h;
  • $n17_homo = $n17h;
  • $n18_homo = $n18h;
  • $n19_homo = $n19h;
  • $n20_homo = $n20h;
  • if($max == '1')
  • {
  • $SQL_INSERT_form_homo = ', h1_homop';
  • $SQL_INSERT_value_homo = ', \'' . $n1_homo . '\'';
  • }
  • if($max == '2')
  • {
  • $SQL_INSERT_form_homo = ', h1_homop, h2_homop';
  • $SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\'';
  • }
  • if($max == '3')
  • {
  • $SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop';
  • $SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\'';
  • }
  • if($max == '4')
  • {
  • $SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop';
  • $SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\'';
  • }
  • if($max == '5')
  • {
  • $SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop, h5_homop';
  • $SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\', \'' . $n5_homo . '\'';
  • }
  • if($max == '6')
  • {
  • $SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop, h5_homop, h6_homop';
  • $SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\', \'' . $n5_homo . '\', \'' . $n6_homo . '\'';
  • }
  • if($max == '7')
  • {
  • $SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop, h5_homop, h6_homop, h7_homop';
  • $SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\', \'' . $n5_homo . '\', \'' . $n6_homo . '\', \'' . $n7_homo . '\'';
  • }
  • if($max == '8')
  • {
  • $SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop, h5_homop, h6_homop, h7_homop, h8_homop';
  • $SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\', \'' . $n5_homo . '\', \'' . $n6_homo . '\', \'' . $n7_homo . '\', \'' . $n8_homo . '\'';
  • }
  • if($max == '9')
  • {
  • $SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop, h5_homop, h6_homop, h7_homop, h8_homop, h9_homop';
  • $SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\', \'' . $n5_homo . '\', \'' . $n6_homo . '\', \'' . $n7_homo . '\', \'' . $n8_homo . '\', \'' . $n9_homo . '\'';
  • }
  • if($max == '10')
  • {
  • $SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop, h5_homop, h6_homop, h7_homop, h78_homop, h9_homop, h10_homop';
  • $SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\', \'' . $n5_homo . '\', \'' . $n6_homo . '\', \'' . $n7_homo . '\', \'' . $n8_homo . '\', \'' . $n9_homo . '\', \'' . $n10_homo . '\'';
  • }
  • if($max == '11')
  • {
  • $SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop, h5_homop, h6_homop, h7_homop, h78_homop, h9_homop, h10_homop, h11_homop';
  • $SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\', \'' . $n5_homo . '\', \'' . $n6_homo . '\', \'' . $n7_homo . '\', \'' . $n8_homo . '\', \'' . $n9_homo . '\', \'' . $n10_homo . '\', \'' . $n11_homo . '\'';
  • }
  • if($max == '12')
  • {
  • $SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop, h5_homop, h6_homop, h7_homop, h78_homop, h9_homop, h10_homop, h11_homop, h12_homop';
  • $SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\', \'' . $n5_homo . '\', \'' . $n6_homo . '\', \'' . $n7_homo . '\', \'' . $n8_homo . '\', \'' . $n9_homo . '\', \'' . $n10_homo . '\', \'' . $n11_homo . '\', \'' . $n12_homo . '\'';
  • }
  • if($max == '13')
  • {
  • $SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop, h5_homop, h6_homop, h7_homop, h78_homop, h9_homop, h10_homop, h11_homop, h12_homop, h13_homop';
  • $SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\', \'' . $n5_homo . '\', \'' . $n6_homo . '\', \'' . $n7_homo . '\', \'' . $n8_homo . '\', \'' . $n9_homo . '\', \'' . $n10_homo . '\', \'' . $n11_homo . '\', \'' . $n12_homo . '\', \'' . $n13_homo . '\'';
  • }
  • if($max == '14')
  • {
  • $SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop, h5_homop, h6_homop, h7_homop, h78_homop, h9_homop, h10_homop, h11_homop, h12_homop, h13_homop, h14_homop';
  • $SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\', \'' . $n5_homo . '\', \'' . $n6_homo . '\', \'' . $n7_homo . '\', \'' . $n8_homo . '\', \'' . $n9_homo . '\', \'' . $n10_homo . '\', \'' . $n11_homo . '\', \'' . $n12_homo . '\', \'' . $n13_homo . '\', \'' . $n14_homo . '\'';
  • }
  • if($max == '15')
  • {
  • $SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop, h5_homop, h6_homop, h7_homop, h78_homop, h9_homop, h10_homop, h11_homop, h12_homop, h13_homop, h14_homop, h15_homop';
  • $SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\', \'' . $n5_homo . '\', \'' . $n6_homo . '\', \'' . $n7_homo . '\', \'' . $n8_homo . '\', \'' . $n9_homo . '\', \'' . $n10_homo . '\', \'' . $n11_homo . '\', \'' . $n12_homo . '\', \'' . $n13_homo . '\', \'' . $n14_homo . '\', \'' . $n15_homo . '\'';
  • }
  • if($max == '16')
  • {
  • $SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop, h5_homop, h6_homop, h7_homop, h78_homop, h9_homop, h10_homop, h11_homop, h12_homop, h13_homop, h14_homop, h15_homop, h16_homop';
  • $SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\', \'' . $n5_homo . '\', \'' . $n6_homo . '\', \'' . $n7_homo . '\', \'' . $n8_homo . '\', \'' . $n9_homo . '\', \'' . $n10_homo . '\', \'' . $n11_homo . '\', \'' . $n12_homo . '\', \'' . $n13_homo . '\', \'' . $n14_homo . '\', \'' . $n15_homo . '\', \'' . $n16_homo . '\'';
  • }
  • if($max == '17')
  • {
  • $SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop, h5_homop, h6_homop, h7_homop, h78_homop, h9_homop, h10_homop, h11_homop, h12_homop, h13_homop, h14_homop, h15_homop, h16_homop, h17_homop';
  • $SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\', \'' . $n5_homo . '\', \'' . $n6_homo . '\', \'' . $n7_homo . '\', \'' . $n8_homo . '\', \'' . $n9_homo . '\', \'' . $n10_homo . '\', \'' . $n11_homo . '\', \'' . $n12_homo . '\', \'' . $n13_homo . '\', \'' . $n14_homo . '\', \'' . $n15_homo . '\', \'' . $n16_homo . '\', \'' . $n17_homo . '\'';
  • }
  • if($max == '18')
  • {
  • $SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop, h5_homop, h6_homop, h7_homop, h78_homop, h9_homop, h10_homop, h11_homop, h12_homop, h13_homop, h14_homop, h15_homop, h16_homop, h17_homop, h18_homop';
  • $SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\', \'' . $n5_homo . '\', \'' . $n6_homo . '\', \'' . $n7_homo . '\', \'' . $n8_homo . '\', \'' . $n9_homo . '\', \'' . $n10_homo . '\', \'' . $n11_homo . '\', \'' . $n12_homo . '\', \'' . $n13_homo . '\', \'' . $n14_homo . '\', \'' . $n15_homo . '\', \'' . $n16_homo . '\', \'' . $n17_homo . '\', \'' . $n18_homo . '\'';
  • }
  • if($max == '19')
  • {
  • $SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop, h5_homop, h6_homop, h7_homop, h78_homop, h9_homop, h10_homop, h11_homop, h12_homop, h13_homop, h14_homop, h15_homop, h16_homop, h17_homop, h18_homop, h19_homop';
  • $SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\', \'' . $n5_homo . '\', \'' . $n6_homo . '\', \'' . $n7_homo . '\', \'' . $n8_homo . '\', \'' . $n9_homo . '\', \'' . $n10_homo . '\', \'' . $n11_homo . '\', \'' . $n12_homo . '\', \'' . $n13_homo . '\', \'' . $n14_homo . '\', \'' . $n15_homo . '\', \'' . $n16_homo . '\', \'' . $n17_homo . '\', \'' . $n18_homo . '\', \'' . $n19_homo . '\'';
  • }
  • if($max == '20')
  • {
  • $SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop, h5_homop, h6_homop, h7_homop, h78_homop, h9_homop, h10_homop, h11_homop, h12_homop, h13_homop, h14_homop, h15_homop, h16_homop, h17_homop, h18_homop, h19_homop, h20_homop';
  • $SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\', \'' . $n5_homo . '\', \'' . $n6_homo . '\', \'' . $n7_homo . '\', \'' . $n8_homo . '\', \'' . $n9_homo . '\', \'' . $n10_homo . '\', \'' . $n11_homo . '\', \'' . $n12_homo . '\', \'' . $n13_homo . '\', \'' . $n14_homo . '\', \'' . $n15_homo . '\', \'' . $n16_homo . '\', \'' . $n17_homo . '\', \'' . $n18_homo . '\', \'' . $n19_homo . '\', \'' . $n20_homo . '\'';
  • }
  • $mess = '\inhomo ' . $mess;
  • if($max != '20') // Bug en cours 20homophone sa bug ;)
  • {
  • $rq_homop_insert = "INSERT INTO s0019__homop (id_homop, autor_homop" . $SQL_INSERT_form_homo . ") VALUES ('', '$user_print'" . $SQL_INSERT_value_homo . ")";
  • $resq_homop_insert = mysql_query($rq_homop_insert)
  • or die ("Probléme d'affichage 00-0004");
  • }
  • }
  • print '
  • <TR>
  • <TD><h5>Historique de la conversation</h5></TD>
  • </TR>';
  • $rq1 = "INSERT INTO s0019__allhist (id_allhist, text_allhist, date_allhist, user_allhist, bot_allhist) VALUES ('', '$mess', '$time', '$user_print', '0')";
  • $res1 = mysql_query($rq1)
  • or die ("Probléme d'affichage 00-0005");
  • $select_hist_total = 'SELECT * FROM s0019__allhist WHERE user_allhist = "' . $user_print . '"';
  • $result_hist_total = mysql_query($select_hist_total) or die ('Erreur 0006: '.mysql_error() );
  • $total_hist_total = mysql_num_rows($result_hist_total);
  • if($total_hist_total < '10')
  • {
  • $total_hist_total = '0';
  • }
  • else
  • {
  • $total_hist_total = ($total_hist_total - '10');
  • }
  • $select_hist = 'SELECT * FROM s0019__allhist WHERE user_allhist = "' . $user_print . '" ORDER by date_allhist Asc LIMIT ' . $total_hist_total . ', 10';
  • $result_hist = mysql_query($select_hist) or die ('Erreur 0007: '.mysql_error() );
  • $total_hist = mysql_num_rows($result_hist);
  • if($total_hist)
  • {
  • while ($ligne_hist = mysql_fetch_array ($result_hist))
  • { extract ($ligne_hist);
  • $print_text_allhist = $text_allhist;
  • $print_text_allhist = stripslashes($print_text_allhist); // Suprime les \
  • $print_text_allhist = ucfirst($print_text_allhist); // Met la 1er lettres en maj
  • if($bot_allhist == '0')
  • {
  • $historybackgroundcolor = 'FFFFFF';
  • }
  • if($bot_allhist == '1')
  • {
  • $historybackgroundcolor = 'E6E6E6';
  • }
  • print '
  • <TR>
  • <TD bgcolor="#' . $historybackgroundcolor . '">' . $print_text_allhist . '</TD>
  • </TR>';
  • }
  • }
  • if (preg_match("#\?#", $mess)) { $mess = str_replace("?", "", $mess); }
  • if (preg_match("#\!#", $mess)) { $mess = str_replace("!", "", $mess); }
  • if (preg_match("#\(#", $mess)) { $mess = str_replace("(", "", $mess); }
  • if (preg_match("#\)#", $mess)) { $mess = str_replace(")", "", $mess); }
  • if (preg_match("#\.#", $mess)) { $mess = str_replace(".", "", $mess); }
  • if (preg_match("#\.\.#", $mess)) { $mess = str_replace("..", "", $mess); }
  • if (preg_match("#\.\.\.#", $mess)) { $mess = str_replace("...", "", $mess); }
  • if (preg_match("#\.\.\.\.#", $mess)) { $mess = str_replace("....", "", $mess); }
  • if (preg_match("#\.\.\.\.\.#", $mess)) { $mess = str_replace(".....", "", $mess); }
  • if (preg_match("#\^#", $mess)) { $mess = str_replace("^", "", $mess); }
  • if (preg_match("#\^\^#", $mess)) { $mess = str_replace("^^", "", $mess); }
  • if (preg_match("#\<noscipt\>#", $mess)) { $mess = str_replace("<noscipt>", "", $mess); }
  • if (preg_match("#é#", $mess)) { $mess = str_replace("é", "e", $mess); }
  • if (preg_match("#ê#", $mess)) { $mess = str_replace("ê", "e", $mess); }
  • if (preg_match("#è#", $mess)) { $mess = str_replace("è", "e", $mess); }
  • if (preg_match("#ï#", $mess)) { $mess = str_replace("ï", "i", $mess); }
  • if (preg_match("#û#", $mess)) { $mess = str_replace("û", "u", $mess); }
  • if (preg_match("#ù#", $mess)) { $mess = str_replace("ù", "u", $mess); }
  • if (preg_match("#ç#", $mess)) { $mess = str_replace("ç", "c", $mess); }
  • if (preg_match("#à#", $mess)) { $mess = str_replace("à", "a", $mess); }
  • if (preg_match("#â#", $mess)) { $mess = str_replace("â", "a", $mess); }
  • if (preg_match("#,#", $mess)) { $mess = str_replace(",", "", $mess); }
  • if (preg_match("#;#", $mess)) { $mess = str_replace(";", "", $mess); }
  • $select_reply_posible = 'SELECT * FROM s0019__reply WHERE ((autor_reply = "' . $user_print . '" || autor_reply = "team") && text_reply = "' . $mess . '")';
  • $result_reply_posible = mysql_query($select_reply_posible) or die ('Erreur 0008: '.mysql_error() );
  • $total_reply_posible = mysql_num_rows($result_reply_posible);
  • if($total_reply_posible)
  • {
  • $total_reply_posible = $total_reply_posible;
  • if($total_reply_posible > '1')
  • {
  • $num_reply_robot_shoot = rand(1, $total_reply_posible);
  • }
  • else
  • {
  • $num_reply_robot_shoot = '1';
  • }
  • }
  • $select_last_reply = 'SELECT * FROM s0019__reply WHERE ((autor_reply = "' . $user_print . '" || autor_reply = "team") && text_reply = "' . $mess . '")';
  • $result_last_reply = mysql_query($select_last_reply) or die ('Erreur 0009: '.mysql_error() );
  • $total_last_reply = mysql_num_rows($result_last_reply);
  • if($total_last_reply)
  • {
  • $num_reply = '1';
  • while ($ligne_last_reply = mysql_fetch_array ($result_last_reply))
  • { extract ($ligne_last_reply);
  • $id_reply_robot_shot_num[$num_reply] = $id_reply;
  • $num_reply++;
  • }
  • $id_reply_robot_shot = $id_reply_robot_shot_num[$num_reply_robot_shoot];
  • $select = 'SELECT * FROM s0019__reply WHERE ((autor_reply = "' . $user_print . '" || autor_reply = "team") && id_reply = "' . $id_reply_robot_shot . '") LIMIT 0, 1';
  • $result = mysql_query($select) or die ('Erreur 0010: '.mysql_error() );
  • $total = mysql_num_rows($result);
  • if($total)
  • {
  • while ($ligne = mysql_fetch_array ($result))
  • { extract ($ligne);
  • $print_text_reply = $rep_reply;
  • $print_text_reply = stripslashes($print_text_reply); // Suprime les \
  • $print_text_reply = ucfirst($print_text_reply);
  • $robot_speak_color = '000000';
  • $robot_speak = $print_text_reply;
  • $bot_speak = '1';
  • }
  • }
  • else
  • {
  • $WHERE_homophone_isonbd = '(h1_homop = "' . $mess . '" || h2_homop = "' . $mess . '" || h3_homop = "' . $mess . '" || h4_homop = "' . $mess . '" || h5_homop = "' . $mess . '" || h6_homop = "' . $mess . '" || h7_homop = "' . $mess . '" || h8_homop = "' . $mess . '" || h9_homop = "' . $mess . '" || h10_homop = "' . $mess . '" || h11_homop = "' . $mess . '" || h12_homop = "' . $mess . '" || h13_homop = "' . $mess . '" || h14_homop = "' . $mess . '" || h15_homop = "' . $mess . '" || h16_homop = "' . $mess . '" || h17_homop = "' . $mess . '" || h18_homop = "' . $mess . '" || h19_homop = "' . $mess . '" || h20_homop = "' . $mess . '")';
  • $select_homop = 'SELECT * FROM s0019__homop WHERE ((autor_homop = "' . $user_print . '" || autor_homop = "team") && ' . $WHERE_homophone_isonbd . ')';
  • $result_homop = mysql_query($select_homop) or die ('Erreur 0011: '.mysql_error() );
  • $total_homop = mysql_num_rows($result_last_reply);
  • if($total_homop)
  • {
  • if($total_homop > '1')
  • {
  • $num_homo_shoot = rand(1, $total_homop);
  • }
  • else
  • {
  • $num_homo_shoot = '1';
  • }
  • while ($ligne_homop = mysql_fetch_array ($result_homop))
  • { extract ($ligne_homop);
  • $WHERE_homohopneisareaydyreply = '(text_reply = "' . $h1_homop . '" || text_reply = "' . $h2_homop . '" || text_reply = "' . $h3_homop . '" || text_reply = "' . $h4_homop . '" || text_reply = "' . $h5_homop . '" || text_reply = "' . $h6_homop . '" || text_reply = "' . $h7_homop . '" || text_reply = "' . $h8_homop . '" || text_reply = "' . $h9_homop . '" || text_reply = "' . $h10_homop . '" || text_reply = "' . $h11_homop . '" || text_reply = "' . $h12_homop . '" || text_reply = "' . $h13_homop . '" || text_reply = "' . $h14_homop . '" || text_reply = "' . $h15_homop . '" || text_reply = "' . $h16_homop . '" || text_reply = "' . $h17_homop . '" || text_reply = "' . $h18_homop . '" || text_reply = "' . $h19_homop . '" || text_reply = "' . $h20_homop . '")';
  • $select_homohopneisareaydyreply = 'SELECT * FROM s0019__reply WHERE ((autor_reply = "' . $user_print . '" || autor_reply = "team") && ' . $WHERE_homohopneisareaydyreply . ') LIMIT 0, 1';
  • $result_homohopneisareaydyreply = mysql_query($select_homohopneisareaydyreply) or die ('Erreur 0012: '.mysql_error() );
  • $total_homohopneisareaydyreply = mysql_num_rows($result_homohopneisareaydyreply);
  • if($total_homohopneisareaydyreply)
  • {
  • $num_homo = '1';
  • while ($ligne_homohopneisareaydyreply = mysql_fetch_array ($result_homohopneisareaydyreply))
  • { extract ($ligne_homohopneisareaydyreply);
  • $reply_homo_shot_num[$num_homo] = $rep_reply;
  • $num_homo++;
  • }
  • $reply_robot_shot = $reply_homo_shot_num[$num_homo_shoot];
  • $print_text_reply = $reply_robot_shot;
  • $print_text_reply = stripslashes($print_text_reply); // Suprime les \
  • $print_text_reply = ucfirst($print_text_reply);
  • $robot_speak_color = '000000';
  • $robot_speak = $print_text_reply;
  • $bot_speak = '1';
  • }
  • }
  • }
  • else
  • {
  • $bot_speak = '';
  • }
  • }
  • }
  • else
  • {
  • $WHERE_homophone_isonbd = '(h1_homop = "' . $mess . '" || h2_homop = "' . $mess . '" || h3_homop = "' . $mess . '" || h4_homop = "' . $mess . '" || h5_homop = "' . $mess . '" || h6_homop = "' . $mess . '" || h7_homop = "' . $mess . '" || h8_homop = "' . $mess . '" || h9_homop = "' . $mess . '" || h10_homop = "' . $mess . '" || h11_homop = "' . $mess . '" || h12_homop = "' . $mess . '" || h13_homop = "' . $mess . '" || h14_homop = "' . $mess . '" || h15_homop = "' . $mess . '" || h16_homop = "' . $mess . '" || h17_homop = "' . $mess . '" || h18_homop = "' . $mess . '" || h19_homop = "' . $mess . '" || h20_homop = "' . $mess . '")';
  • $select_homop = 'SELECT * FROM s0019__homop WHERE ((autor_homop = "' . $user_print . '" || autor_homop = "team") && ' . $WHERE_homophone_isonbd . ')';
  • $result_homop = mysql_query($select_homop) or die ('Erreur 0013: '.mysql_error() );
  • $total_homop = mysql_num_rows($result_homop);
  • if($total_homop)
  • {
  • if($total_homop > '1')
  • {
  • $num_homo_shoot = rand(1, $total_homop);
  • }
  • else
  • {
  • $num_homo_shoot = '1';
  • }
  • while ($ligne_homop = mysql_fetch_array ($result_homop))
  • { extract ($ligne_homop);
  • $WHERE_homohopneisareaydyreply = '(text_reply = "' . $h1_homop . '" || text_reply = "' . $h2_homop . '" || text_reply = "' . $h3_homop . '" || text_reply = "' . $h4_homop . '" || text_reply = "' . $h5_homop . '" || text_reply = "' . $h6_homop . '" || text_reply = "' . $h7_homop . '" || text_reply = "' . $h8_homop . '" || text_reply = "' . $h9_homop . '" || text_reply = "' . $h10_homop . '" || text_reply = "' . $h11_homop . '" || text_reply = "' . $h12_homop . '" || text_reply = "' . $h13_homop . '" || text_reply = "' . $h14_homop . '" || text_reply = "' . $h15_homop . '" || text_reply = "' . $h16_homop . '" || text_reply = "' . $h17_homop . '" || text_reply = "' . $h18_homop . '" || text_reply = "' . $h19_homop . '" || text_reply = "' . $h20_homop . '")';
  • $select_homohopneisareaydyreply = 'SELECT * FROM s0019__reply WHERE ((autor_reply = "' . $user_print . '" || autor_reply = "team") && ' . $WHERE_homohopneisareaydyreply . ')';
  • $result_homohopneisareaydyreply = mysql_query($select_homohopneisareaydyreply) or die ('Erreur 0014: '.mysql_error() );
  • $total_homohopneisareaydyreply = mysql_num_rows($result_homohopneisareaydyreply);
  • if($total_homohopneisareaydyreply)
  • {
  • $num_homo = '1';
  • while ($ligne_homohopneisareaydyreply = mysql_fetch_array ($result_homohopneisareaydyreply))
  • { extract ($ligne_homohopneisareaydyreply);
  • $reply_homo_shot_num[$num_homo] = $rep_reply;
  • $num_homo++;
  • }
  • $reply_robot_shot = $reply_homo_shot_num[$num_homo_shoot];
  • $print_text_reply = $reply_robot_shot;
  • $print_text_reply = stripslashes($print_text_reply); // Suprime les \
  • $print_text_reply = ucfirst($print_text_reply);
  • $robot_speak_color = '000000';
  • $robot_speak = $print_text_reply;
  • $bot_speak = '1';
  • }
  • }
  • }
  • else
  • {
  • $bot_speak = '';
  • }
  • }
  • if($bot_speak == '')
  • {
  • $select_exithomohop = 'SELECT * FROM s0019__homop WHERE (autor_homop = "' . $user_print . '" || autor_homop = "team")';
  • $result_exithomohop = mysql_query($select_exithomohop) or die ('Erreur002 0015: '.mysql_error() );
  • $total_exithomohop = mysql_num_rows($result_exithomohop);
  • if($total_exithomohop)
  • {
  • while ($ligne_exithomohop = mysql_fetch_array ($result_exithomohop))
  • { extract ($ligne_exithomohop);
  • $h1_homop = addslashes($h1_homop);
  • $h2_homop = addslashes($h2_homop);
  • $h3_homop = addslashes($h3_homop);
  • $h4_homop = addslashes($h4_homop);
  • $h5_homop = addslashes($h5_homop);
  • $h6_homop = addslashes($h6_homop);
  • $h7_homop = addslashes($h7_homop);
  • $h8_homop = addslashes($h8_homop);
  • $h9_homop = addslashes($h9_homop);
  • $h10_homop = addslashes($h10_homop);
  • $h11_homop = addslashes($h11_homop);
  • $h12_homop = addslashes($h12_homop);
  • $h13_homop = addslashes($h13_homop);
  • $h14_homop = addslashes($h14_homop);
  • $h15_homop = addslashes($h15_homop);
  • $h16_homop = addslashes($h16_homop);
  • $h17_homop = addslashes($h17_homop);
  • $h18_homop = addslashes($h18_homop);
  • $h19_homop = addslashes($h19_homop);
  • $h20_homop = addslashes($h20_homop);
  • if (preg_match("#é#", $h1_homop)) { $h1_homop = str_replace("é", "e", $h1_homop); }
  • if (preg_match("#ê#", $h1_homop)) { $h1_homop = str_replace("ê", "e", $h1_homop); }
  • if (preg_match("#è#", $h1_homop)) { $h1_homop = str_replace("è", "e", $h1_homop); }
  • if (preg_match("#ï#", $h1_homop)) { $h1_homop = str_replace("ï", "i", $h1_homop); }
  • if (preg_match("#û#", $h1_homop)) { $h1_homop = str_replace("û", "u", $h1_homop); }
  • if (preg_match("#ù#", $h1_homop)) { $h1_homop = str_replace("ù", "u", $h1_homop); }
  • if (preg_match("#ç#", $h1_homop)) { $h1_homop = str_replace("ç", "c", $h1_homop); }
  • if (preg_match("#à#", $h1_homop)) { $h1_homop = str_replace("à", "a", $h1_homop); }
  • if (preg_match("#â#", $h1_homop)) { $h1_homop = str_replace("â", "a", $h1_homop); }
  • if (preg_match("#é#", $h2_homop)) { $h2_homop = str_replace("é", "e", $h2_homop); }
  • if (preg_match("#ê#", $h2_homop)) { $h2_homop = str_replace("ê", "e", $h2_homop); }
  • if (preg_match("#è#", $h2_homop)) { $h2_homop = str_replace("è", "e", $h2_homop); }
  • if (preg_match("#ï#", $h2_homop)) { $h2_homop = str_replace("ï", "i", $h2_homop); }
  • if (preg_match("#û#", $h2_homop)) { $h2_homop = str_replace("û", "u", $h2_homop); }
  • if (preg_match("#ù#", $h2_homop)) { $h2_homop = str_replace("ù", "u", $h2_homop); }
  • if (preg_match("#ç#", $h2_homop)) { $h2_homop = str_replace("ç", "c", $h2_homop); }
  • if (preg_match("#à#", $h2_homop)) { $h2_homop = str_replace("à", "a", $h2_homop); }
  • if (preg_match("#â#", $h2_homop)) { $h2_homop = str_replace("â", "a", $h2_homop); }
  • if (preg_match("#é#", $h3_homop)) { $h3_homop = str_replace("é", "e", $h3_homop); }
  • if (preg_match("#ê#", $h3_homop)) { $h3_homop = str_replace("ê", "e", $h3_homop); }
  • if (preg_match("#è#", $h3_homop)) { $h3_homop = str_replace("è", "e", $h3_homop); }
  • if (preg_match("#ï#", $h3_homop)) { $h3_homop = str_replace("ï", "i", $h3_homop); }
  • if (preg_match("#û#", $h3_homop)) { $h3_homop = str_replace("û", "u", $h3_homop); }
  • if (preg_match("#ù#", $h3_homop)) { $h3_homop = str_replace("ù", "u", $h3_homop); }
  • if (preg_match("#ç#", $h3_homop)) { $h3_homop = str_replace("ç", "c", $h3_homop); }
  • if (preg_match("#à#", $h3_homop)) { $h3_homop = str_replace("à", "a", $h3_homop); }
  • if (preg_match("#â#", $h3_homop)) { $h3_homop = str_replace("â", "a", $h3_homop); }
  • if (preg_match("#é#", $h4_homop)) { $h4_homop = str_replace("é", "e", $h4_homop); }
  • if (preg_match("#ê#", $h4_homop)) { $h4_homop = str_replace("ê", "e", $h4_homop); }
  • if (preg_match("#è#", $h4_homop)) { $h4_homop = str_replace("è", "e", $h4_homop); }
  • if (preg_match("#ï#", $h4_homop)) { $h4_homop = str_replace("ï", "i", $h4_homop); }
  • if (preg_match("#û#", $h4_homop)) { $h4_homop = str_replace("û", "u", $h4_homop); }
  • if (preg_match("#ù#", $h4_homop)) { $h4_homop = str_replace("ù", "u", $h4_homop); }
  • if (preg_match("#ç#", $h4_homop)) { $h4_homop = str_replace("ç", "c", $h4_homop); }
  • if (preg_match("#à#", $h4_homop)) { $h4_homop = str_replace("à", "a", $h4_homop); }
  • if (preg_match("#â#", $h4_homop)) { $h4_homop = str_replace("â", "a", $h4_homop); }
  • if (preg_match("#é#", $h5_homop)) { $h5_homop = str_replace("é", "e", $h5_homop); }
  • if (preg_match("#ê#", $h5_homop)) { $h5_homop = str_replace("ê", "e", $h5_homop); }
  • if (preg_match("#è#", $h5_homop)) { $h5_homop = str_replace("è", "e", $h5_homop); }
  • if (preg_match("#ï#", $h5_homop)) { $h5_homop = str_replace("ï", "i", $h5_homop); }
  • if (preg_match("#û#", $h5_homop)) { $h5_homop = str_replace("û", "u", $h5_homop); }
  • if (preg_match("#ù#", $h5_homop)) { $h5_homop = str_replace("ù", "u", $h5_homop); }
  • if (preg_match("#ç#", $h5_homop)) { $h5_homop = str_replace("ç", "c", $h5_homop); }
  • if (preg_match("#à#", $h5_homop)) { $h5_homop = str_replace("à", "a", $h5_homop); }
  • if (preg_match("#â#", $h5_homop)) { $h5_homop = str_replace("â", "a", $h5_homop); }
  • if (preg_match("#é#", $h6_homop)) { $h6_homop = str_replace("é", "e", $h6_homop); }
  • if (preg_match("#ê#", $h6_homop)) { $h6_homop = str_replace("ê", "e", $h6_homop); }
  • if (preg_match("#è#", $h6_homop)) { $h6_homop = str_replace("è", "e", $h6_homop); }
  • if (preg_match("#ï#", $h6_homop)) { $h6_homop = str_replace("ï", "i", $h6_homop); }
  • if (preg_match("#û#", $h6_homop)) { $h6_homop = str_replace("û", "u", $h6_homop); }
  • if (preg_match("#ù#", $h6_homop)) { $h6_homop = str_replace("ù", "u", $h6_homop); }
  • if (preg_match("#ç#", $h6_homop)) { $h6_homop = str_replace("ç", "c", $h6_homop); }
  • if (preg_match("#à#", $h6_homop)) { $h6_homop = str_replace("à", "a", $h6_homop); }
  • if (preg_match("#â#", $h6_homop)) { $h6_homop = str_replace("â", "a", $h6_homop); }
  • if (preg_match("#é#", $h7_homop)) { $h7_homop = str_replace("é", "e", $h7_homop); }
  • if (preg_match("#ê#", $h7_homop)) { $h7_homop = str_replace("ê", "e", $h7_homop); }
  • if (preg_match("#è#", $h7_homop)) { $h7_homop = str_replace("è", "e", $h7_homop); }
  • if (preg_match("#ï#", $h7_homop)) { $h7_homop = str_replace("ï", "i", $h7_homop); }
  • if (preg_match("#û#", $h7_homop)) { $h7_homop = str_replace("û", "u", $h7_homop); }
  • if (preg_match("#ù#", $h7_homop)) { $h7_homop = str_replace("ù", "u", $h7_homop); }
  • if (preg_match("#ç#", $h7_homop)) { $h7_homop = str_replace("ç", "c", $h7_homop); }
  • if (preg_match("#à#", $h7_homop)) { $h7_homop = str_replace("à", "a", $h7_homop); }
  • if (preg_match("#â#", $h7_homop)) { $h7_homop = str_replace("â", "a", $h7_homop); }
  • if (preg_match("#é#", $h8_homop)) { $h8_homop = str_replace("é", "e", $h8_homop); }
  • if (preg_match("#ê#", $h8_homop)) { $h8_homop = str_replace("ê", "e", $h8_homop); }
  • if (preg_match("#è#", $h8_homop)) { $h8_homop = str_replace("è", "e", $h8_homop); }
  • if (preg_match("#ï#", $h8_homop)) { $h8_homop = str_replace("ï", "i", $h8_homop); }
  • if (preg_match("#û#", $h8_homop)) { $h8_homop = str_replace("û", "u", $h8_homop); }
  • if (preg_match("#ù#", $h8_homop)) { $h8_homop = str_replace("ù", "u", $h8_homop); }
  • if (preg_match("#ç#", $h8_homop)) { $h8_homop = str_replace("ç", "c", $h8_homop); }
  • if (preg_match("#à#", $h8_homop)) { $h8_homop = str_replace("à", "a", $h8_homop); }
  • if (preg_match("#â#", $h8_homop)) { $h8_homop = str_replace("â", "a", $h8_homop); }
  • if (preg_match("#é#", $h9_homop)) { $h9_homop = str_replace("é", "e", $h9_homop); }
  • if (preg_match("#ê#", $h9_homop)) { $h9_homop = str_replace("ê", "e", $h9_homop); }
  • if (preg_match("#è#", $h9_homop)) { $h9_homop = str_replace("è", "e", $h9_homop); }
  • if (preg_match("#ï#", $h9_homop)) { $h9_homop = str_replace("ï", "i", $h9_homop); }
  • if (preg_match("#û#", $h9_homop)) { $h9_homop = str_replace("û", "u", $h9_homop); }
  • if (preg_match("#ù#", $h9_homop)) { $h9_homop = str_replace("ù", "u", $h9_homop); }
  • if (preg_match("#ç#", $h9_homop)) { $h9_homop = str_replace("ç", "c", $h9_homop); }
  • if (preg_match("#à#", $h9_homop)) { $h9_homop = str_replace("à", "a", $h9_homop); }
  • if (preg_match("#â#", $h9_homop)) { $h9_homop = str_replace("â", "a", $h9_homop); }
  • if (preg_match("#é#", $h10_homop)) { $h10_homop = str_replace("é", "e", $h10_homop); }
  • if (preg_match("#ê#", $h10_homop)) { $h10_homop = str_replace("ê", "e", $h10_homop); }
  • if (preg_match("#è#", $h10_homop)) { $h10_homop = str_replace("è", "e", $h10_homop); }
  • if (preg_match("#ï#", $h10_homop)) { $h10_homop = str_replace("ï", "i", $h10_homop); }
  • if (preg_match("#û#", $h10_homop)) { $h10_homop = str_replace("û", "u", $h10_homop); }
  • if (preg_match("#ù#", $h10_homop)) { $h10_homop = str_replace("ù", "u", $h10_homop); }
  • if (preg_match("#ç#", $h10_homop)) { $h10_homop = str_replace("ç", "c", $h10_homop); }
  • if (preg_match("#à#", $h10_homop)) { $h10_homop = str_replace("à", "a", $h10_homop); }
  • if (preg_match("#â#", $h10_homop)) { $h10_homop = str_replace("â", "a", $h10_homop); }
  • if (preg_match("#é#", $h11_homop)) { $h11_homop = str_replace("é", "e", $h11_homop); }
  • if (preg_match("#ê#", $h11_homop)) { $h11_homop = str_replace("ê", "e", $h11_homop); }
  • if (preg_match("#è#", $h11_homop)) { $h11_homop = str_replace("è", "e", $h11_homop); }
  • if (preg_match("#ï#", $h11_homop)) { $h11_homop = str_replace("ï", "i", $h11_homop); }
  • if (preg_match("#û#", $h11_homop)) { $h11_homop = str_replace("û", "u", $h11_homop); }
  • if (preg_match("#ù#", $h11_homop)) { $h11_homop = str_replace("ù", "u", $h11_homop); }
  • if (preg_match("#ç#", $h11_homop)) { $h11_homop = str_replace("ç", "c", $h11_homop); }
  • if (preg_match("#à#", $h11_homop)) { $h11_homop = str_replace("à", "a", $h11_homop); }
  • if (preg_match("#â#", $h11_homop)) { $h11_homop = str_replace("â", "a", $h11_homop); }
  • if (preg_match("#é#", $h12_homop)) { $h12_homop = str_replace("é", "e", $h12_homop); }
  • if (preg_match("#ê#", $h12_homop)) { $h12_homop = str_replace("ê", "e", $h12_homop); }
  • if (preg_match("#è#", $h12_homop)) { $h12_homop = str_replace("è", "e", $h12_homop); }
  • if (preg_match("#ï#", $h12_homop)) { $h12_homop = str_replace("ï", "i", $h12_homop); }
  • if (preg_match("#û#", $h12_homop)) { $h12_homop = str_replace("û", "u", $h12_homop); }
  • if (preg_match("#ù#", $h12_homop)) { $h12_homop = str_replace("ù", "u", $h12_homop); }
  • if (preg_match("#ç#", $h12_homop)) { $h12_homop = str_replace("ç", "c", $h12_homop); }
  • if (preg_match("#à#", $h12_homop)) { $h12_homop = str_replace("à", "a", $h12_homop); }
  • if (preg_match("#â#", $h12_homop)) { $h12_homop = str_replace("â", "a", $h12_homop); }
  • if (preg_match("#é#", $h13_homop)) { $h13_homop = str_replace("é", "e", $h13_homop); }
  • if (preg_match("#ê#", $h13_homop)) { $h13_homop = str_replace("ê", "e", $h13_homop); }
  • if (preg_match("#è#", $h13_homop)) { $h13_homop = str_replace("è", "e", $h13_homop); }
  • if (preg_match("#ï#", $h13_homop)) { $h13_homop = str_replace("ï", "i", $h13_homop); }
  • if (preg_match("#û#", $h13_homop)) { $h13_homop = str_replace("û", "u", $h13_homop); }
  • if (preg_match("#ù#", $h13_homop)) { $h13_homop = str_replace("ù", "u", $h13_homop); }
  • if (preg_match("#ç#", $h13_homop)) { $h13_homop = str_replace("ç", "c", $h13_homop); }
  • if (preg_match("#à#", $h13_homop)) { $h13_homop = str_replace("à", "a", $h13_homop); }
  • if (preg_match("#â#", $h13_homop)) { $h13_homop = str_replace("â", "a", $h13_homop); }
  • if (preg_match("#é#", $h14_homop)) { $h14_homop = str_replace("é", "e", $h14_homop); }
  • if (preg_match("#ê#", $h14_homop)) { $h14_homop = str_replace("ê", "e", $h14_homop); }
  • if (preg_match("#è#", $h14_homop)) { $h14_homop = str_replace("è", "e", $h14_homop); }
  • if (preg_match("#ï#", $h14_homop)) { $h14_homop = str_replace("ï", "i", $h14_homop); }
  • if (preg_match("#û#", $h14_homop)) { $h14_homop = str_replace("û", "u", $h14_homop); }
  • if (preg_match("#ù#", $h14_homop)) { $h14_homop = str_replace("ù", "u", $h14_homop); }
  • if (preg_match("#ç#", $h14_homop)) { $h14_homop = str_replace("ç", "c", $h14_homop); }
  • if (preg_match("#à#", $h14_homop)) { $h14_homop = str_replace("à", "a", $h14_homop); }
  • if (preg_match("#â#", $h14_homop)) { $h14_homop = str_replace("â", "a", $h14_homop); }
  • if (preg_match("#é#", $h15_homop)) { $h15_homop = str_replace("é", "e", $h15_homop); }
  • if (preg_match("#ê#", $h15_homop)) { $h15_homop = str_replace("ê", "e", $h15_homop); }
  • if (preg_match("#è#", $h15_homop)) { $h15_homop = str_replace("è", "e", $h15_homop); }
  • if (preg_match("#ï#", $h15_homop)) { $h15_homop = str_replace("ï", "i", $h15_homop); }
  • if (preg_match("#û#", $h15_homop)) { $h15_homop = str_replace("û", "u", $h15_homop); }
  • if (preg_match("#ù#", $h15_homop)) { $h15_homop = str_replace("ù", "u", $h15_homop); }
  • if (preg_match("#ç#", $h15_homop)) { $h15_homop = str_replace("ç", "c", $h15_homop); }
  • if (preg_match("#à#", $h15_homop)) { $h15_homop = str_replace("à", "a", $h15_homop); }
  • if (preg_match("#â#", $h15_homop)) { $h15_homop = str_replace("â", "a", $h15_homop); }
  • if (preg_match("#é#", $h16_homop)) { $h16_homop = str_replace("é", "e", $h16_homop); }
  • if (preg_match("#ê#", $h16_homop)) { $h16_homop = str_replace("ê", "e", $h16_homop); }
  • if (preg_match("#è#", $h16_homop)) { $h16_homop = str_replace("è", "e", $h16_homop); }
  • if (preg_match("#ï#", $h16_homop)) { $h16_homop = str_replace("ï", "i", $h16_homop); }
  • if (preg_match("#û#", $h16_homop)) { $h16_homop = str_replace("û", "u", $h16_homop); }
  • if (preg_match("#ù#", $h16_homop)) { $h16_homop = str_replace("ù", "u", $h16_homop); }
  • if (preg_match("#ç#", $h16_homop)) { $h16_homop = str_replace("ç", "c", $h16_homop); }
  • if (preg_match("#à#", $h16_homop)) { $h16_homop = str_replace("à", "a", $h16_homop); }
  • if (preg_match("#â#", $h16_homop)) { $h16_homop = str_replace("â", "a", $h16_homop); }
  • if (preg_match("#é#", $h17_homop)) { $h17_homop = str_replace("é", "e", $h17_homop); }
  • if (preg_match("#ê#", $h17_homop)) { $h17_homop = str_replace("ê", "e", $h17_homop); }
  • if (preg_match("#è#", $h17_homop)) { $h17_homop = str_replace("è", "e", $h17_homop); }
  • if (preg_match("#ï#", $h17_homop)) { $h17_homop = str_replace("ï", "i", $h17_homop); }
  • if (preg_match("#û#", $h17_homop)) { $h17_homop = str_replace("û", "u", $h17_homop); }
  • if (preg_match("#ù#", $h17_homop)) { $h17_homop = str_replace("ù", "u", $h17_homop); }
  • if (preg_match("#ç#", $h17_homop)) { $h17_homop = str_replace("ç", "c", $h17_homop); }
  • if (preg_match("#à#", $h17_homop)) { $h17_homop = str_replace("à", "a", $h17_homop); }
  • if (preg_match("#â#", $h17_homop)) { $h17_homop = str_replace("â", "a", $h17_homop); }
  • if (preg_match("#é#", $h18_homop)) { $h18_homop = str_replace("é", "e", $h18_homop); }
  • if (preg_match("#ê#", $h18_homop)) { $h18_homop = str_replace("ê", "e", $h18_homop); }
  • if (preg_match("#è#", $h18_homop)) { $h18_homop = str_replace("è", "e", $h18_homop); }
  • if (preg_match("#ï#", $h18_homop)) { $h18_homop = str_replace("ï", "i", $h18_homop); }
  • if (preg_match("#û#", $h18_homop)) { $h18_homop = str_replace("û", "u", $h18_homop); }
  • if (preg_match("#ù#", $h18_homop)) { $h18_homop = str_replace("ù", "u", $h18_homop); }
  • if (preg_match("#ç#", $h18_homop)) { $h18_homop = str_replace("ç", "c", $h18_homop); }
  • if (preg_match("#à#", $h18_homop)) { $h18_homop = str_replace("à", "a", $h18_homop); }
  • if (preg_match("#â#", $h18_homop)) { $h18_homop = str_replace("â", "a", $h18_homop); }
  • if (preg_match("#é#", $h19_homop)) { $h19_homop = str_replace("é", "e", $h19_homop); }
  • if (preg_match("#ê#", $h19_homop)) { $h19_homop = str_replace("ê", "e", $h19_homop); }
  • if (preg_match("#è#", $h19_homop)) { $h19_homop = str_replace("è", "e", $h19_homop); }
  • if (preg_match("#ï#", $h19_homop)) { $h19_homop = str_replace("ï", "i", $h19_homop); }
  • if (preg_match("#û#", $h19_homop)) { $h19_homop = str_replace("û", "u", $h19_homop); }
  • if (preg_match("#ù#", $h19_homop)) { $h19_homop = str_replace("ù", "u", $h19_homop); }
  • if (preg_match("#ç#", $h19_homop)) { $h19_homop = str_replace("ç", "c", $h19_homop); }
  • if (preg_match("#à#", $h19_homop)) { $h19_homop = str_replace("à", "a", $h19_homop); }
  • if (preg_match("#â#", $h19_homop)) { $h19_homop = str_replace("â", "a", $h19_homop); }
  • if (preg_match("#é#", $h20_homop)) { $h20_homop = str_replace("é", "e", $h20_homop); }
  • if (preg_match("#ê#", $h20_homop)) { $h20_homop = str_replace("ê", "e", $h20_homop); }
  • if (preg_match("#è#", $h20_homop)) { $h20_homop = str_replace("è", "e", $h20_homop); }
  • if (preg_match("#ï#", $h20_homop)) { $h20_homop = str_replace("ï", "i", $h20_homop); }
  • if (preg_match("#û#", $h20_homop)) { $h20_homop = str_replace("û", "u", $h20_homop); }
  • if (preg_match("#ù#", $h20_homop)) { $h20_homop = str_replace("ù", "u", $h20_homop); }
  • if (preg_match("#ç#", $h20_homop)) { $h20_homop = str_replace("ç", "c", $h20_homop); }
  • if (preg_match("#à#", $h20_homop)) { $h20_homop = str_replace("à", "a", $h20_homop); }
  • if (preg_match("#â#", $h20_homop)) { $h20_homop = str_replace("â", "a", $h20_homop); }
  • if($h1_homop != '')
  • {
  • if(preg_match('#' . $h1_homop . '#', $mess))
  • {
  • if($h1_homop != '') { $mess_1 = preg_replace('#' . $h1_homop . '#isU', $h1_homop, $mess); }
  • if($h2_homop != '') { $mess_2 = preg_replace('#' . $h1_homop . '#', $h2_homop, $mess); }
  • if($h3_homop != '') { $mess_3 = preg_replace('#' . $h1_homop . '#', $h3_homop, $mess); }
  • if($h4_homop != '') { $mess_4 = preg_replace('#' . $h1_homop . '#', $h4_homop, $mess); }
  • if($h5_homop != '') { $mess_5 = preg_replace('#' . $h1_homop . '#', $h5_homop, $mess); }
  • if($h6_homop != '') { $mess_6 = preg_replace('#' . $h1_homop . '#', $h6_homop, $mess); }
  • if($h7_homop != '') { $mess_7 = preg_replace('#' . $h1_homop . '#', $h7_homop, $mess); }
  • if($h8_homop != '') { $mess_8 = preg_replace('#' . $h1_homop . '#', $h8_homop, $mess); }
  • if($h9_homop != '') { $mess_9 = preg_replace('#' . $h1_homop . '#', $h9_homop, $mess); }
  • if($h10_homop != '') { $mess_10 = preg_replace('#' . $h1_homop . '#', $h10_homop, $mess); }
  • if($h11_homop != '') { $mess_11 = preg_replace('#' . $h1_homop . '#', $h11_homop, $mess); }
  • if($h12_homop != '') { $mess_12 = preg_replace('#' . $h1_homop . '#', $h12_homop, $mess); }
  • if($h13_homop != '') { $mess_13 = preg_replace('#' . $h1_homop . '#', $h13_homop, $mess); }
  • if($h14_homop != '') { $mess_14 = preg_replace('#' . $h1_homop . '#', $h14_homop, $mess); }
  • if($h15_homop != '') { $mess_15 = preg_replace('#' . $h1_homop . '#', $h15_homop, $mess); }
  • if($h16_homop != '') { $mess_16 = preg_replace('#' . $h1_homop . '#', $h16_homop, $mess); }
  • if($h17_homop != '') { $mess_17 = preg_replace('#' . $h1_homop . '#', $h17_homop, $mess); }
  • if($h18_homop != '') { $mess_18 = preg_replace('#' . $h1_homop . '#', $h18_homop, $mess); }
  • if($h19_homop != '') { $mess_19 = preg_replace('#' . $h1_homop . '#', $h19_homop, $mess); }
  • if($h20_homop != '') { $mess_20 = preg_replace('#' . $h1_homop . '#', $h20_homop, $mess); }
  • }
  • }
  • if($h2_homop != '')
  • {
  • if(preg_match('#' . $h2_homop . '#', $mess))
  • {
  • if($h1_homop != '') { $mess_1 = preg_replace('#' . $h2_homop . '#isU', $h1_homop, $mess); }
  • if($h2_homop != '') { $mess_2 = preg_replace('#' . $h2_homop . '#', $h2_homop, $mess); }
  • if($h3_homop != '') { $mess_3 = preg_replace('#' . $h2_homop . '#', $h3_homop, $mess); }
  • if($h4_homop != '') { $mess_4 = preg_replace('#' . $h2_homop . '#', $h4_homop, $mess); }
  • if($h5_homop != '') { $mess_5 = preg_replace('#' . $h2_homop . '#', $h5_homop, $mess); }
  • if($h6_homop != '') { $mess_6 = preg_replace('#' . $h2_homop . '#', $h6_homop, $mess); }
  • if($h7_homop != '') { $mess_7 = preg_replace('#' . $h2_homop . '#', $h7_homop, $mess); }
  • if($h8_homop != '') { $mess_8 = preg_replace('#' . $h2_homop . '#', $h8_homop, $mess); }
  • if($h9_homop != '') { $mess_9 = preg_replace('#' . $h2_homop . '#', $h9_homop, $mess); }
  • if($h10_homop != '') { $mess_10 = preg_replace('#' . $h2_homop . '#', $h10_homop, $mess); }
  • if($h11_homop != '') { $mess_11 = preg_replace('#' . $h2_homop . '#', $h11_homop, $mess); }
  • if($h12_homop != '') { $mess_12 = preg_replace('#' . $h2_homop . '#', $h12_homop, $mess); }
  • if($h13_homop != '') { $mess_13 = preg_replace('#' . $h2_homop . '#', $h13_homop, $mess); }
  • if($h14_homop != '') { $mess_14 = preg_replace('#' . $h2_homop . '#', $h14_homop, $mess); }
  • if($h15_homop != '') { $mess_15 = preg_replace('#' . $h2_homop . '#', $h15_homop, $mess); }
  • if($h16_homop != '') { $mess_16 = preg_replace('#' . $h2_homop . '#', $h16_homop, $mess); }
  • if($h17_homop != '') { $mess_17 = preg_replace('#' . $h2_homop . '#', $h17_homop, $mess); }
  • if($h18_homop != '') { $mess_18 = preg_replace('#' . $h2_homop . '#', $h18_homop, $mess); }
  • if($h19_homop != '') { $mess_19 = preg_replace('#' . $h2_homop . '#', $h19_homop, $mess); }
  • if($h20_homop != '') { $mess_20 = preg_replace('#' . $h2_homop . '#', $h20_homop, $mess); }
  • }
  • }
  • if($h3_homop != '')
  • {
  • if(preg_match('#' . $h3_homop . '#', $mess))
  • {
  • if($h1_homop != '') { $mess_1 = preg_replace('#' . $h3_homop . '#isU', $h1_homop, $mess); }
  • if($h2_homop != '') { $mess_2 = preg_replace('#' . $h3_homop . '#', $h2_homop, $mess); }
  • if($h3_homop != '') { $mess_3 = preg_replace('#' . $h3_homop . '#', $h3_homop, $mess); }
  • if($h4_homop != '') { $mess_4 = preg_replace('#' . $h3_homop . '#', $h4_homop, $mess); }
  • if($h5_homop != '') { $mess_5 = preg_replace('#' . $h3_homop . '#', $h5_homop, $mess); }
  • if($h6_homop != '') { $mess_6 = preg_replace('#' . $h3_homop . '#', $h6_homop, $mess); }
  • if($h7_homop != '') { $mess_7 = preg_replace('#' . $h3_homop . '#', $h7_homop, $mess); }
  • if($h8_homop != '') { $mess_8 = preg_replace('#' . $h3_homop . '#', $h8_homop, $mess); }
  • if($h9_homop != '') { $mess_9 = preg_replace('#' . $h3_homop . '#', $h9_homop, $mess); }
  • if($h10_homop != '') { $mess_10 = preg_replace('#' . $h3_homop . '#', $h10_homop, $mess); }
  • if($h11_homop != '') { $mess_11 = preg_replace('#' . $h3_homop . '#', $h11_homop, $mess); }
  • if($h12_homop != '') { $mess_12 = preg_replace('#' . $h3_homop . '#', $h12_homop, $mess); }
  • if($h13_homop != '') { $mess_13 = preg_replace('#' . $h3_homop . '#', $h13_homop, $mess); }
  • if($h14_homop != '') { $mess_14 = preg_replace('#' . $h3_homop . '#', $h14_homop, $mess); }
  • if($h15_homop != '') { $mess_15 = preg_replace('#' . $h3_homop . '#', $h15_homop, $mess); }
  • if($h16_homop != '') { $mess_16 = preg_replace('#' . $h3_homop . '#', $h16_homop, $mess); }
  • if($h17_homop != '') { $mess_17 = preg_replace('#' . $h3_homop . '#', $h17_homop, $mess); }
  • if($h18_homop != '') { $mess_18 = preg_replace('#' . $h3_homop . '#', $h18_homop, $mess); }
  • if($h19_homop != '') { $mess_19 = preg_replace('#' . $h3_homop . '#', $h19_homop, $mess); }
  • if($h20_homop != '') { $mess_20 = preg_replace('#' . $h3_homop . '#', $h20_homop, $mess); }
  • }
  • }
  • if($h4_homop != '')
  • {
  • if(preg_match('#' . $h4_homop . '#', $mess))
  • {
  • if($h1_homop != '') { $mess_1 = preg_replace('#' . $h4_homop . '#isU', $h1_homop, $mess); }
  • if($h2_homop != '') { $mess_2 = preg_replace('#' . $h4_homop . '#', $h2_homop, $mess); }
  • if($h3_homop != '') { $mess_3 = preg_replace('#' . $h4_homop . '#', $h3_homop, $mess); }
  • if($h4_homop != '') { $mess_4 = preg_replace('#' . $h4_homop . '#', $h4_homop, $mess); }
  • if($h5_homop != '') { $mess_5 = preg_replace('#' . $h4_homop . '#', $h5_homop, $mess); }
  • if($h6_homop != '') { $mess_6 = preg_replace('#' . $h4_homop . '#', $h6_homop, $mess); }
  • if($h7_homop != '') { $mess_7 = preg_replace('#' . $h4_homop . '#', $h7_homop, $mess); }
  • if($h8_homop != '') { $mess_8 = preg_replace('#' . $h4_homop . '#', $h8_homop, $mess); }
  • if($h9_homop != '') { $mess_9 = preg_replace('#' . $h4_homop . '#', $h9_homop, $mess); }
  • if($h10_homop != '') { $mess_10 = preg_replace('#' . $h4_homop . '#', $h10_homop, $mess); }
  • if($h11_homop != '') { $mess_11 = preg_replace('#' . $h4_homop . '#', $h11_homop, $mess); }
  • if($h12_homop != '') { $mess_12 = preg_replace('#' . $h4_homop . '#', $h12_homop, $mess); }
  • if($h13_homop != '') { $mess_13 = preg_replace('#' . $h4_homop . '#', $h13_homop, $mess); }
  • if($h14_homop != '') { $mess_14 = preg_replace('#' . $h4_homop . '#', $h14_homop, $mess); }
  • if($h15_homop != '') { $mess_15 = preg_replace('#' . $h4_homop . '#', $h15_homop, $mess); }
  • if($h16_homop != '') { $mess_16 = preg_replace('#' . $h4_homop . '#', $h16_homop, $mess); }
  • if($h17_homop != '') { $mess_17 = preg_replace('#' . $h4_homop . '#', $h17_homop, $mess); }
  • if($h18_homop != '') { $mess_18 = preg_replace('#' . $h4_homop . '#', $h18_homop, $mess); }
  • if($h19_homop != '') { $mess_19 = preg_replace('#' . $h4_homop . '#', $h19_homop, $mess); }
  • if($h20_homop != '') { $mess_20 = preg_replace('#' . $h4_homop . '#', $h20_homop, $mess); }
  • }
  • }
  • if($h5_homop != '')
  • {
  • if(preg_match('#' . $h5_homop . '#', $mess))
  • {
  • if($h1_homop != '') { $mess_1 = preg_replace('#' . $h5_homop . '#isU', $h1_homop, $mess); }
  • if($h2_homop != '') { $mess_2 = preg_replace('#' . $h5_homop . '#', $h2_homop, $mess); }
  • if($h3_homop != '') { $mess_3 = preg_replace('#' . $h5_homop . '#', $h3_homop, $mess); }
  • if($h4_homop != '') { $mess_4 = preg_replace('#' . $h5_homop . '#', $h4_homop, $mess); }
  • if($h5_homop != '') { $mess_5 = preg_replace('#' . $h5_homop . '#', $h5_homop, $mess); }
  • if($h6_homop != '') { $mess_6 = preg_replace('#' . $h5_homop . '#', $h6_homop, $mess); }
  • if($h7_homop != '') { $mess_7 = preg_replace('#' . $h5_homop . '#', $h7_homop, $mess); }
  • if($h8_homop != '') { $mess_8 = preg_replace('#' . $h5_homop . '#', $h8_homop, $mess); }
  • if($h9_homop != '') { $mess_9 = preg_replace('#' . $h5_homop . '#', $h9_homop, $mess); }
  • if($h10_homop != '') { $mess_10 = preg_replace('#' . $h5_homop . '#', $h10_homop, $mess); }
  • if($h11_homop != '') { $mess_11 = preg_replace('#' . $h5_homop . '#', $h11_homop, $mess); }
  • if($h12_homop != '') { $mess_12 = preg_replace('#' . $h5_homop . '#', $h12_homop, $mess); }
  • if($h13_homop != '') { $mess_13 = preg_replace('#' . $h5_homop . '#', $h13_homop, $mess); }
  • if($h14_homop != '') { $mess_14 = preg_replace('#' . $h5_homop . '#', $h14_homop, $mess); }
  • if($h15_homop != '') { $mess_15 = preg_replace('#' . $h5_homop . '#', $h15_homop, $mess); }
  • if($h16_homop != '') { $mess_16 = preg_replace('#' . $h5_homop . '#', $h16_homop, $mess); }
  • if($h17_homop != '') { $mess_17 = preg_replace('#' . $h5_homop . '#', $h17_homop, $mess); }
  • if($h18_homop != '') { $mess_18 = preg_replace('#' . $h5_homop . '#', $h18_homop, $mess); }
  • if($h19_homop != '') { $mess_19 = preg_replace('#' . $h5_homop . '#', $h19_homop, $mess); }
  • if($h20_homop != '') { $mess_20 = preg_replace('#' . $h5_homop . '#', $h20_homop, $mess); }
  • }
  • }
  • if($h6_homop != '')
  • {
  • if(preg_match('#' . $h6_homop . '#', $mess))
  • {
  • if($h1_homop != '') { $mess_1 = preg_replace('#' . $h6_homop . '#isU', $h1_homop, $mess); }
  • if($h2_homop != '') { $mess_2 = preg_replace('#' . $h6_homop . '#', $h2_homop, $mess); }
  • if($h3_homop != '') { $mess_3 = preg_replace('#' . $h6_homop . '#', $h3_homop, $mess); }
  • if($h4_homop != '') { $mess_4 = preg_replace('#' . $h6_homop . '#', $h4_homop, $mess); }
  • if($h5_homop != '') { $mess_5 = preg_replace('#' . $h6_homop . '#', $h5_homop, $mess); }
  • if($h6_homop != '') { $mess_6 = preg_replace('#' . $h6_homop . '#', $h6_homop, $mess); }
  • if($h7_homop != '') { $mess_7 = preg_replace('#' . $h6_homop . '#', $h7_homop, $mess); }
  • if($h8_homop != '') { $mess_8 = preg_replace('#' . $h6_homop . '#', $h8_homop, $mess); }
  • if($h9_homop != '') { $mess_9 = preg_replace('#' . $h6_homop . '#', $h9_homop, $mess); }
  • if($h10_homop != '') { $mess_10 = preg_replace('#' . $h6_homop . '#', $h10_homop, $mess); }
  • if($h11_homop != '') { $mess_11 = preg_replace('#' . $h6_homop . '#', $h11_homop, $mess); }
  • if($h12_homop != '') { $mess_12 = preg_replace('#' . $h6_homop . '#', $h12_homop, $mess); }
  • if($h13_homop != '') { $mess_13 = preg_replace('#' . $h6_homop . '#', $h13_homop, $mess); }
  • if($h14_homop != '') { $mess_14 = preg_replace('#' . $h6_homop . '#', $h14_homop, $mess); }
  • if($h15_homop != '') { $mess_15 = preg_replace('#' . $h6_homop . '#', $h15_homop, $mess); }
  • if($h16_homop != '') { $mess_16 = preg_replace('#' . $h6_homop . '#', $h16_homop, $mess); }
  • if($h17_homop != '') { $mess_17 = preg_replace('#' . $h6_homop . '#', $h17_homop, $mess); }
  • if($h18_homop != '') { $mess_18 = preg_replace('#' . $h6_homop . '#', $h18_homop, $mess); }
  • if($h19_homop != '') { $mess_19 = preg_replace('#' . $h6_homop . '#', $h19_homop, $mess); }
  • if($h20_homop != '') { $mess_20 = preg_replace('#' . $h6_homop . '#', $h20_homop, $mess); }
  • }
  • }
  • if($h7_homop != '')
  • {
  • if(preg_match('#' . $h7_homop . '#', $mess))
  • {
  • if($h1_homop != '') { $mess_1 = preg_replace('#' . $h7_homop . '#isU', $h1_homop, $mess); }
  • if($h2_homop != '') { $mess_2 = preg_replace('#' . $h7_homop . '#', $h2_homop, $mess); }
  • if($h3_homop != '') { $mess_3 = preg_replace('#' . $h7_homop . '#', $h3_homop, $mess); }
  • if($h4_homop != '') { $mess_4 = preg_replace('#' . $h7_homop . '#', $h4_homop, $mess); }
  • if($h5_homop != '') { $mess_5 = preg_replace('#' . $h7_homop . '#', $h5_homop, $mess); }
  • if($h6_homop != '') { $mess_6 = preg_replace('#' . $h7_homop . '#', $h6_homop, $mess); }
  • if($h7_homop != '') { $mess_7 = preg_replace('#' . $h7_homop . '#', $h7_homop, $mess); }
  • if($h8_homop != '') { $mess_8 = preg_replace('#' . $h7_homop . '#', $h8_homop, $mess); }
  • if($h9_homop != '') { $mess_9 = preg_replace('#' . $h7_homop . '#', $h9_homop, $mess); }
  • if($h10_homop != '') { $mess_10 = preg_replace('#' . $h7_homop . '#', $h10_homop, $mess); }
  • if($h11_homop != '') { $mess_11 = preg_replace('#' . $h7_homop . '#', $h11_homop, $mess); }
  • if($h12_homop != '') { $mess_12 = preg_replace('#' . $h7_homop . '#', $h12_homop, $mess); }
  • if($h13_homop != '') { $mess_13 = preg_replace('#' . $h7_homop . '#', $h13_homop, $mess); }
  • if($h14_homop != '') { $mess_14 = preg_replace('#' . $h7_homop . '#', $h14_homop, $mess); }
  • if($h15_homop != '') { $mess_15 = preg_replace('#' . $h7_homop . '#', $h15_homop, $mess); }
  • if($h16_homop != '') { $mess_16 = preg_replace('#' . $h7_homop . '#', $h16_homop, $mess); }
  • if($h17_homop != '') { $mess_17 = preg_replace('#' . $h7_homop . '#', $h17_homop, $mess); }
  • if($h18_homop != '') { $mess_18 = preg_replace('#' . $h7_homop . '#', $h18_homop, $mess); }
  • if($h19_homop != '') { $mess_19 = preg_replace('#' . $h7_homop . '#', $h19_homop, $mess); }
  • if($h20_homop != '') { $mess_20 = preg_replace('#' . $h7_homop . '#', $h20_homop, $mess); }
  • }
  • }
  • if($h8_homop != '')
  • {
  • if(preg_match('#' . $h8_homop . '#', $mess))
  • {
  • if($h1_homop != '') { $mess_1 = preg_replace('#' . $h8_homop . '#isU', $h1_homop, $mess); }
  • if($h2_homop != '') { $mess_2 = preg_replace('#' . $h8_homop . '#', $h2_homop, $mess); }
  • if($h3_homop != '') { $mess_3 = preg_replace('#' . $h8_homop . '#', $h3_homop, $mess); }
  • if($h4_homop != '') { $mess_4 = preg_replace('#' . $h8_homop . '#', $h4_homop, $mess); }
  • if($h5_homop != '') { $mess_5 = preg_replace('#' . $h8_homop . '#', $h5_homop, $mess); }
  • if($h6_homop != '') { $mess_6 = preg_replace('#' . $h8_homop . '#', $h6_homop, $mess); }
  • if($h7_homop != '') { $mess_7 = preg_replace('#' . $h8_homop . '#', $h7_homop, $mess); }
  • if($h8_homop != '') { $mess_8 = preg_replace('#' . $h8_homop . '#', $h8_homop, $mess); }
  • if($h9_homop != '') { $mess_9 = preg_replace('#' . $h8_homop . '#', $h9_homop, $mess); }
  • if($h10_homop != '') { $mess_10 = preg_replace('#' . $h8_homop . '#', $h10_homop, $mess); }
  • if($h11_homop != '') { $mess_11 = preg_replace('#' . $h8_homop . '#', $h11_homop, $mess); }
  • if($h12_homop != '') { $mess_12 = preg_replace('#' . $h8_homop . '#', $h12_homop, $mess); }
  • if($h13_homop != '') { $mess_13 = preg_replace('#' . $h8_homop . '#', $h13_homop, $mess); }
  • if($h14_homop != '') { $mess_14 = preg_replace('#' . $h8_homop . '#', $h14_homop, $mess); }
  • if($h15_homop != '') { $mess_15 = preg_replace('#' . $h8_homop . '#', $h15_homop, $mess); }
  • if($h16_homop != '') { $mess_16 = preg_replace('#' . $h8_homop . '#', $h16_homop, $mess); }
  • if($h17_homop != '') { $mess_17 = preg_replace('#' . $h8_homop . '#', $h17_homop, $mess); }
  • if($h18_homop != '') { $mess_18 = preg_replace('#' . $h8_homop . '#', $h18_homop, $mess); }
  • if($h19_homop != '') { $mess_19 = preg_replace('#' . $h8_homop . '#', $h19_homop, $mess); }
  • if($h20_homop != '') { $mess_20 = preg_replace('#' . $h8_homop . '#', $h20_homop, $mess); }
  • }
  • }
  • if($h9_homop != '')
  • {
  • if(preg_match('#' . $h9_homop . '#', $mess))
  • {
  • if($h1_homop != '') { $mess_1 = preg_replace('#' . $h9_homop . '#isU', $h1_homop, $mess); }
  • if($h2_homop != '') { $mess_2 = preg_replace('#' . $h9_homop . '#', $h2_homop, $mess); }
  • if($h3_homop != '') { $mess_3 = preg_replace('#' . $h9_homop . '#', $h3_homop, $mess); }
  • if($h4_homop != '') { $mess_4 = preg_replace('#' . $h9_homop . '#', $h4_homop, $mess); }
  • if($h5_homop != '') { $mess_5 = preg_replace('#' . $h9_homop . '#', $h5_homop, $mess); }
  • if($h6_homop != '') { $mess_6 = preg_replace('#' . $h9_homop . '#', $h6_homop, $mess); }
  • if($h7_homop != '') { $mess_7 = preg_replace('#' . $h9_homop . '#', $h7_homop, $mess); }
  • if($h8_homop != '') { $mess_8 = preg_replace('#' . $h9_homop . '#', $h8_homop, $mess); }
  • if($h9_homop != '') { $mess_9 = preg_replace('#' . $h9_homop . '#', $h9_homop, $mess); }
  • if($h10_homop != '') { $mess_10 = preg_replace('#' . $h9_homop . '#', $h10_homop, $mess); }
  • if($h11_homop != '') { $mess_11 = preg_replace('#' . $h9_homop . '#', $h11_homop, $mess); }
  • if($h12_homop != '') { $mess_12 = preg_replace('#' . $h9_homop . '#', $h12_homop, $mess); }
  • if($h13_homop != '') { $mess_13 = preg_replace('#' . $h9_homop . '#', $h13_homop, $mess); }
  • if($h14_homop != '') { $mess_14 = preg_replace('#' . $h9_homop . '#', $h14_homop, $mess); }
  • if($h15_homop != '') { $mess_15 = preg_replace('#' . $h9_homop . '#', $h15_homop, $mess); }
  • if($h16_homop != '') { $mess_16 = preg_replace('#' . $h9_homop . '#', $h16_homop, $mess); }
  • if($h17_homop != '') { $mess_17 = preg_replace('#' . $h9_homop . '#', $h17_homop, $mess); }
  • if($h18_homop != '') { $mess_18 = preg_replace('#' . $h9_homop . '#', $h18_homop, $mess); }
  • if($h19_homop != '') { $mess_19 = preg_replace('#' . $h9_homop . '#', $h19_homop, $mess); }
  • if($h20_homop != '') { $mess_20 = preg_replace('#' . $h9_homop . '#', $h20_homop, $mess); }
  • }
  • }
  • if($h10_homop != '')
  • {
  • if(preg_match('#' . $h10_homop . '#', $mess))
  • {
  • if($h1_homop != '') { $mess_1 = preg_replace('#' . $h10_homop . '#isU', $h1_homop, $mess); }
  • if($h2_homop != '') { $mess_2 = preg_replace('#' . $h10_homop . '#', $h2_homop, $mess); }
  • if($h3_homop != '') { $mess_3 = preg_replace('#' . $h10_homop . '#', $h3_homop, $mess); }
  • if($h4_homop != '') { $mess_4 = preg_replace('#' . $h10_homop . '#', $h4_homop, $mess); }
  • if($h5_homop != '') { $mess_5 = preg_replace('#' . $h10_homop . '#', $h5_homop, $mess); }
  • if($h6_homop != '') { $mess_6 = preg_replace('#' . $h10_homop . '#', $h6_homop, $mess); }
  • if($h7_homop != '') { $mess_7 = preg_replace('#' . $h10_homop . '#', $h7_homop, $mess); }
  • if($h8_homop != '') { $mess_8 = preg_replace('#' . $h10_homop . '#', $h8_homop, $mess); }
  • if($h9_homop != '') { $mess_9 = preg_replace('#' . $h10_homop . '#', $h9_homop, $mess); }
  • if($h10_homop != '') { $mess_10 = preg_replace('#' . $h10_homop . '#', $h10_homop, $mess); }
  • if($h11_homop != '') { $mess_11 = preg_replace('#' . $h10_homop . '#', $h11_homop, $mess); }
  • if($h12_homop != '') { $mess_12 = preg_replace('#' . $h10_homop . '#', $h12_homop, $mess); }
  • if($h13_homop != '') { $mess_13 = preg_replace('#' . $h10_homop . '#', $h13_homop, $mess); }
  • if($h14_homop != '') { $mess_14 = preg_replace('#' . $h10_homop . '#', $h14_homop, $mess); }
  • if($h15_homop != '') { $mess_15 = preg_replace('#' . $h10_homop . '#', $h15_homop, $mess); }
  • if($h16_homop != '') { $mess_16 = preg_replace('#' . $h10_homop . '#', $h16_homop, $mess); }
  • if($h17_homop != '') { $mess_17 = preg_replace('#' . $h10_homop . '#', $h17_homop, $mess); }
  • if($h18_homop != '') { $mess_18 = preg_replace('#' . $h10_homop . '#', $h18_homop, $mess); }
  • if($h19_homop != '') { $mess_19 = preg_replace('#' . $h10_homop . '#', $h19_homop, $mess); }
  • if($h20_homop != '') { $mess_20 = preg_replace('#' . $h10_homop . '#', $h20_homop, $mess); }
  • }
  • }
  • if($h11_homop != '')
  • {
  • if(preg_match('#' . $h11_homop . '#', $mess))
  • {
  • if($h1_homop != '') { $mess_1 = preg_replace('#' . $h11_homop . '#isU', $h1_homop, $mess); }
  • if($h2_homop != '') { $mess_2 = preg_replace('#' . $h11_homop . '#', $h2_homop, $mess); }
  • if($h3_homop != '') { $mess_3 = preg_replace('#' . $h11_homop . '#', $h3_homop, $mess); }
  • if($h4_homop != '') { $mess_4 = preg_replace('#' . $h11_homop . '#', $h4_homop, $mess); }
  • if($h5_homop != '') { $mess_5 = preg_replace('#' . $h11_homop . '#', $h5_homop, $mess); }
  • if($h6_homop != '') { $mess_6 = preg_replace('#' . $h11_homop . '#', $h6_homop, $mess); }
  • if($h7_homop != '') { $mess_7 = preg_replace('#' . $h11_homop . '#', $h7_homop, $mess); }
  • if($h8_homop != '') { $mess_8 = preg_replace('#' . $h11_homop . '#', $h8_homop, $mess); }
  • if($h9_homop != '') { $mess_9 = preg_replace('#' . $h11_homop . '#', $h9_homop, $mess); }
  • if($h10_homop != '') { $mess_10 = preg_replace('#' . $h11_homop . '#', $h10_homop, $mess); }
  • if($h11_homop != '') { $mess_11 = preg_replace('#' . $h11_homop . '#', $h11_homop, $mess); }
  • if($h12_homop != '') { $mess_12 = preg_replace('#' . $h11_homop . '#', $h12_homop, $mess); }
  • if($h13_homop != '') { $mess_13 = preg_replace('#' . $h11_homop . '#', $h13_homop, $mess); }
  • if($h14_homop != '') { $mess_14 = preg_replace('#' . $h11_homop . '#', $h14_homop, $mess); }
  • if($h15_homop != '') { $mess_15 = preg_replace('#' . $h11_homop . '#', $h15_homop, $mess); }
  • if($h16_homop != '') { $mess_16 = preg_replace('#' . $h11_homop . '#', $h16_homop, $mess); }
  • if($h17_homop != '') { $mess_17 = preg_replace('#' . $h11_homop . '#', $h17_homop, $mess); }
  • if($h18_homop != '') { $mess_18 = preg_replace('#' . $h11_homop . '#', $h18_homop, $mess); }
  • if($h19_homop != '') { $mess_19 = preg_replace('#' . $h11_homop . '#', $h19_homop, $mess); }
  • if($h20_homop != '') { $mess_20 = preg_replace('#' . $h11_homop . '#', $h20_homop, $mess); }
  • }
  • }
  • if($h12_homop != '')
  • {
  • if(preg_match('#' . $h12_homop . '#', $mess))
  • {
  • if($h1_homop != '') { $mess_1 = preg_replace('#' . $h12_homop . '#isU', $h1_homop, $mess); }
  • if($h2_homop != '') { $mess_2 = preg_replace('#' . $h12_homop . '#', $h2_homop, $mess); }
  • if($h3_homop != '') { $mess_3 = preg_replace('#' . $h12_homop . '#', $h3_homop, $mess); }
  • if($h4_homop != '') { $mess_4 = preg_replace('#' . $h12_homop . '#', $h4_homop, $mess); }
  • if($h5_homop != '') { $mess_5 = preg_replace('#' . $h12_homop . '#', $h5_homop, $mess); }
  • if($h6_homop != '') { $mess_6 = preg_replace('#' . $h12_homop . '#', $h6_homop, $mess); }
  • if($h7_homop != '') { $mess_7 = preg_replace('#' . $h12_homop . '#', $h7_homop, $mess); }
  • if($h8_homop != '') { $mess_8 = preg_replace('#' . $h12_homop . '#', $h8_homop, $mess); }
  • if($h9_homop != '') { $mess_9 = preg_replace('#' . $h12_homop . '#', $h9_homop, $mess); }
  • if($h10_homop != '') { $mess_10 = preg_replace('#' . $h12_homop . '#', $h10_homop, $mess); }
  • if($h11_homop != '') { $mess_11 = preg_replace('#' . $h12_homop . '#', $h11_homop, $mess); }
  • if($h12_homop != '') { $mess_12 = preg_replace('#' . $h12_homop . '#', $h12_homop, $mess); }
  • if($h13_homop != '') { $mess_13 = preg_replace('#' . $h12_homop . '#', $h13_homop, $mess); }
  • if($h14_homop != '') { $mess_14 = preg_replace('#' . $h12_homop . '#', $h14_homop, $mess); }
  • if($h15_homop != '') { $mess_15 = preg_replace('#' . $h12_homop . '#', $h15_homop, $mess); }
  • if($h16_homop != '') { $mess_16 = preg_replace('#' . $h12_homop . '#', $h16_homop, $mess); }
  • if($h17_homop != '') { $mess_17 = preg_replace('#' . $h12_homop . '#', $h17_homop, $mess); }
  • if($h18_homop != '') { $mess_18 = preg_replace('#' . $h12_homop . '#', $h18_homop, $mess); }
  • if($h19_homop != '') { $mess_19 = preg_replace('#' . $h12_homop . '#', $h19_homop, $mess); }
  • if($h20_homop != '') { $mess_20 = preg_replace('#' . $h12_homop . '#', $h20_homop, $mess); }
  • }
  • }
  • if($h13_homop != '')
  • {
  • if(preg_match('#' . $h13_homop . '#', $mess))
  • {
  • if($h1_homop != '') { $mess_1 = preg_replace('#' . $h13_homop . '#isU', $h1_homop, $mess); }
  • if($h2_homop != '') { $mess_2 = preg_replace('#' . $h13_homop . '#', $h2_homop, $mess); }
  • if($h3_homop != '') { $mess_3 = preg_replace('#' . $h13_homop . '#', $h3_homop, $mess); }
  • if($h4_homop != '') { $mess_4 = preg_replace('#' . $h13_homop . '#', $h4_homop, $mess); }
  • if($h5_homop != '') { $mess_5 = preg_replace('#' . $h13_homop . '#', $h5_homop, $mess); }
  • if($h6_homop != '') { $mess_6 = preg_replace('#' . $h13_homop . '#', $h6_homop, $mess); }
  • if($h7_homop != '') { $mess_7 = preg_replace('#' . $h13_homop . '#', $h7_homop, $mess); }
  • if($h8_homop != '') { $mess_8 = preg_replace('#' . $h13_homop . '#', $h8_homop, $mess); }
  • if($h9_homop != '') { $mess_9 = preg_replace('#' . $h13_homop . '#', $h9_homop, $mess); }
  • if($h10_homop != '') { $mess_10 = preg_replace('#' . $h13_homop . '#', $h10_homop, $mess); }
  • if($h11_homop != '') { $mess_11 = preg_replace('#' . $h13_homop . '#', $h11_homop, $mess); }
  • if($h12_homop != '') { $mess_12 = preg_replace('#' . $h13_homop . '#', $h12_homop, $mess); }
  • if($h13_homop != '') { $mess_13 = preg_replace('#' . $h13_homop . '#', $h13_homop, $mess); }
  • if($h14_homop != '') { $mess_14 = preg_replace('#' . $h13_homop . '#', $h14_homop, $mess); }
  • if($h15_homop != '') { $mess_15 = preg_replace('#' . $h13_homop . '#', $h15_homop, $mess); }
  • if($h16_homop != '') { $mess_16 = preg_replace('#' . $h13_homop . '#', $h16_homop, $mess); }
  • if($h17_homop != '') { $mess_17 = preg_replace('#' . $h13_homop . '#', $h17_homop, $mess); }
  • if($h18_homop != '') { $mess_18 = preg_replace('#' . $h13_homop . '#', $h18_homop, $mess); }
  • if($h19_homop != '') { $mess_19 = preg_replace('#' . $h13_homop . '#', $h19_homop, $mess); }
  • if($h20_homop != '') { $mess_20 = preg_replace('#' . $h13_homop . '#', $h20_homop, $mess); }
  • }
  • }
  • if($h14_homop != '')
  • {
  • if(preg_match('#' . $h14_homop . '#', $mess))
  • {
  • if($h1_homop != '') { $mess_1 = preg_replace('#' . $h14_homop . '#isU', $h1_homop, $mess); }
  • if($h2_homop != '') { $mess_2 = preg_replace('#' . $h14_homop . '#', $h2_homop, $mess); }
  • if($h3_homop != '') { $mess_3 = preg_replace('#' . $h14_homop . '#', $h3_homop, $mess); }
  • if($h4_homop != '') { $mess_4 = preg_replace('#' . $h14_homop . '#', $h4_homop, $mess); }
  • if($h5_homop != '') { $mess_5 = preg_replace('#' . $h14_homop . '#', $h5_homop, $mess); }
  • if($h6_homop != '') { $mess_6 = preg_replace('#' . $h14_homop . '#', $h6_homop, $mess); }
  • if($h7_homop != '') { $mess_7 = preg_replace('#' . $h14_homop . '#', $h7_homop, $mess); }
  • if($h8_homop != '') { $mess_8 = preg_replace('#' . $h14_homop . '#', $h8_homop, $mess); }
  • if($h9_homop != '') { $mess_9 = preg_replace('#' . $h14_homop . '#', $h9_homop, $mess); }
  • if($h10_homop != '') { $mess_10 = preg_replace('#' . $h14_homop . '#', $h10_homop, $mess); }
  • if($h11_homop != '') { $mess_11 = preg_replace('#' . $h14_homop . '#', $h11_homop, $mess); }
  • if($h12_homop != '') { $mess_12 = preg_replace('#' . $h14_homop . '#', $h12_homop, $mess); }
  • if($h13_homop != '') { $mess_13 = preg_replace('#' . $h14_homop . '#', $h13_homop, $mess); }
  • if($h14_homop != '') { $mess_14 = preg_replace('#' . $h14_homop . '#', $h14_homop, $mess); }
  • if($h15_homop != '') { $mess_15 = preg_replace('#' . $h14_homop . '#', $h15_homop, $mess); }
  • if($h16_homop != '') { $mess_16 = preg_replace('#' . $h14_homop . '#', $h16_homop, $mess); }
  • if($h17_homop != '') { $mess_17 = preg_replace('#' . $h14_homop . '#', $h17_homop, $mess); }
  • if($h18_homop != '') { $mess_18 = preg_replace('#' . $h14_homop . '#', $h18_homop, $mess); }
  • if($h19_homop != '') { $mess_19 = preg_replace('#' . $h14_homop . '#', $h19_homop, $mess); }
  • if($h20_homop != '') { $mess_20 = preg_replace('#' . $h14_homop . '#', $h20_homop, $mess); }
  • }
  • }
  • if($h15_homop != '')
  • {
  • if(preg_match('#' . $h15_homop . '#', $mess))
  • {
  • if($h1_homop != '') { $mess_1 = preg_replace('#' . $h15_homop . '#isU', $h1_homop, $mess); }
  • if($h2_homop != '') { $mess_2 = preg_replace('#' . $h15_homop . '#', $h2_homop, $mess); }
  • if($h3_homop != '') { $mess_3 = preg_replace('#' . $h15_homop . '#', $h3_homop, $mess); }
  • if($h4_homop != '') { $mess_4 = preg_replace('#' . $h15_homop . '#', $h4_homop, $mess); }
  • if($h5_homop != '') { $mess_5 = preg_replace('#' . $h15_homop . '#', $h5_homop, $mess); }
  • if($h6_homop != '') { $mess_6 = preg_replace('#' . $h15_homop . '#', $h6_homop, $mess); }
  • if($h7_homop != '') { $mess_7 = preg_replace('#' . $h15_homop . '#', $h7_homop, $mess); }
  • if($h8_homop != '') { $mess_8 = preg_replace('#' . $h15_homop . '#', $h8_homop, $mess); }
  • if($h9_homop != '') { $mess_9 = preg_replace('#' . $h15_homop . '#', $h9_homop, $mess); }
  • if($h10_homop != '') { $mess_10 = preg_replace('#' . $h15_homop . '#', $h10_homop, $mess); }
  • if($h11_homop != '') { $mess_11 = preg_replace('#' . $h15_homop . '#', $h11_homop, $mess); }
  • if($h12_homop != '') { $mess_12 = preg_replace('#' . $h15_homop . '#', $h12_homop, $mess); }
  • if($h13_homop != '') { $mess_13 = preg_replace('#' . $h15_homop . '#', $h13_homop, $mess); }
  • if($h14_homop != '') { $mess_14 = preg_replace('#' . $h15_homop . '#', $h14_homop, $mess); }
  • if($h15_homop != '') { $mess_15 = preg_replace('#' . $h15_homop . '#', $h15_homop, $mess); }
  • if($h16_homop != '') { $mess_16 = preg_replace('#' . $h15_homop . '#', $h16_homop, $mess); }
  • if($h17_homop != '') { $mess_17 = preg_replace('#' . $h15_homop . '#', $h17_homop, $mess); }
  • if($h18_homop != '') { $mess_18 = preg_replace('#' . $h15_homop . '#', $h18_homop, $mess); }
  • if($h19_homop != '') { $mess_19 = preg_replace('#' . $h15_homop . '#', $h19_homop, $mess); }
  • if($h20_homop != '') { $mess_20 = preg_replace('#' . $h15_homop . '#', $h20_homop, $mess); }
  • }
  • }
  • if($h16_homop != '')
  • {
  • if(preg_match('#' . $h16_homop . '#', $mess))
  • {
  • if($h1_homop != '') { $mess_1 = preg_replace('#' . $h16_homop . '#isU', $h1_homop, $mess); }
  • if($h2_homop != '') { $mess_2 = preg_replace('#' . $h16_homop . '#', $h2_homop, $mess); }
  • if($h3_homop != '') { $mess_3 = preg_replace('#' . $h16_homop . '#', $h3_homop, $mess); }
  • if($h4_homop != '') { $mess_4 = preg_replace('#' . $h16_homop . '#', $h4_homop, $mess); }
  • if($h5_homop != '') { $mess_5 = preg_replace('#' . $h16_homop . '#', $h5_homop, $mess); }
  • if($h6_homop != '') { $mess_6 = preg_replace('#' . $h16_homop . '#', $h6_homop, $mess); }
  • if($h7_homop != '') { $mess_7 = preg_replace('#' . $h16_homop . '#', $h7_homop, $mess); }
  • if($h8_homop != '') { $mess_8 = preg_replace('#' . $h16_homop . '#', $h8_homop, $mess); }
  • if($h9_homop != '') { $mess_9 = preg_replace('#' . $h16_homop . '#', $h9_homop, $mess); }
  • if($h10_homop != '') { $mess_10 = preg_replace('#' . $h16_homop . '#', $h10_homop, $mess); }
  • if($h11_homop != '') { $mess_11 = preg_replace('#' . $h16_homop . '#', $h11_homop, $mess); }
  • if($h12_homop != '') { $mess_12 = preg_replace('#' . $h16_homop . '#', $h12_homop, $mess); }
  • if($h13_homop != '') { $mess_13 = preg_replace('#' . $h16_homop . '#', $h13_homop, $mess); }
  • if($h14_homop != '') { $mess_14 = preg_replace('#' . $h16_homop . '#', $h14_homop, $mess); }
  • if($h15_homop != '') { $mess_15 = preg_replace('#' . $h16_homop . '#', $h15_homop, $mess); }
  • if($h16_homop != '') { $mess_16 = preg_replace('#' . $h16_homop . '#', $h16_homop, $mess); }
  • if($h17_homop != '') { $mess_17 = preg_replace('#' . $h16_homop . '#', $h17_homop, $mess); }
  • if($h18_homop != '') { $mess_18 = preg_replace('#' . $h16_homop . '#', $h18_homop, $mess); }
  • if($h19_homop != '') { $mess_19 = preg_replace('#' . $h16_homop . '#', $h19_homop, $mess); }
  • if($h20_homop != '') { $mess_20 = preg_replace('#' . $h16_homop . '#', $h20_homop, $mess); }
  • }
  • }
  • if($h17_homop != '')
  • {
  • if(preg_match('#' . $h17_homop . '#', $mess))
  • {
  • if($h1_homop != '') { $mess_1 = preg_replace('#' . $h17_homop . '#isU', $h1_homop, $mess); }
  • if($h2_homop != '') { $mess_2 = preg_replace('#' . $h17_homop . '#', $h2_homop, $mess); }
  • if($h3_homop != '') { $mess_3 = preg_replace('#' . $h17_homop . '#', $h3_homop, $mess); }
  • if($h4_homop != '') { $mess_4 = preg_replace('#' . $h17_homop . '#', $h4_homop, $mess); }
  • if($h5_homop != '') { $mess_5 = preg_replace('#' . $h17_homop . '#', $h5_homop, $mess); }
  • if($h6_homop != '') { $mess_6 = preg_replace('#' . $h17_homop . '#', $h6_homop, $mess); }
  • if($h7_homop != '') { $mess_7 = preg_replace('#' . $h17_homop . '#', $h7_homop, $mess); }
  • if($h8_homop != '') { $mess_8 = preg_replace('#' . $h17_homop . '#', $h8_homop, $mess); }
  • if($h9_homop != '') { $mess_9 = preg_replace('#' . $h17_homop . '#', $h9_homop, $mess); }
  • if($h10_homop != '') { $mess_10 = preg_replace('#' . $h17_homop . '#', $h10_homop, $mess); }
  • if($h11_homop != '') { $mess_11 = preg_replace('#' . $h17_homop . '#', $h11_homop, $mess); }
  • if($h12_homop != '') { $mess_12 = preg_replace('#' . $h17_homop . '#', $h12_homop, $mess); }
  • if($h13_homop != '') { $mess_13 = preg_replace('#' . $h17_homop . '#', $h13_homop, $mess); }
  • if($h14_homop != '') { $mess_14 = preg_replace('#' . $h17_homop . '#', $h14_homop, $mess); }
  • if($h15_homop != '') { $mess_15 = preg_replace('#' . $h17_homop . '#', $h15_homop, $mess); }
  • if($h16_homop != '') { $mess_16 = preg_replace('#' . $h17_homop . '#', $h16_homop, $mess); }
  • if($h17_homop != '') { $mess_17 = preg_replace('#' . $h17_homop . '#', $h17_homop, $mess); }
  • if($h18_homop != '') { $mess_18 = preg_replace('#' . $h17_homop . '#', $h18_homop, $mess); }
  • if($h19_homop != '') { $mess_19 = preg_replace('#' . $h17_homop . '#', $h19_homop, $mess); }
  • if($h20_homop != '') { $mess_20 = preg_replace('#' . $h17_homop . '#', $h20_homop, $mess); }
  • }
  • }
  • if($h18_homop != '')
  • {
  • if(preg_match('#' . $h18_homop . '#', $mess))
  • {
  • if($h1_homop != '') { $mess_1 = preg_replace('#' . $h18_homop . '#isU', $h1_homop, $mess); }
  • if($h2_homop != '') { $mess_2 = preg_replace('#' . $h18_homop . '#', $h2_homop, $mess); }
  • if($h3_homop != '') { $mess_3 = preg_replace('#' . $h18_homop . '#', $h3_homop, $mess); }
  • if($h4_homop != '') { $mess_4 = preg_replace('#' . $h18_homop . '#', $h4_homop, $mess); }
  • if($h5_homop != '') { $mess_5 = preg_replace('#' . $h18_homop . '#', $h5_homop, $mess); }
  • if($h6_homop != '') { $mess_6 = preg_replace('#' . $h18_homop . '#', $h6_homop, $mess); }
  • if($h7_homop != '') { $mess_7 = preg_replace('#' . $h18_homop . '#', $h7_homop, $mess); }
  • if($h8_homop != '') { $mess_8 = preg_replace('#' . $h18_homop . '#', $h8_homop, $mess); }
  • if($h9_homop != '') { $mess_9 = preg_replace('#' . $h18_homop . '#', $h9_homop, $mess); }
  • if($h10_homop != '') { $mess_10 = preg_replace('#' . $h18_homop . '#', $h10_homop, $mess); }
  • if($h11_homop != '') { $mess_11 = preg_replace('#' . $h18_homop . '#', $h11_homop, $mess); }
  • if($h12_homop != '') { $mess_12 = preg_replace('#' . $h18_homop . '#', $h12_homop, $mess); }
  • if($h13_homop != '') { $mess_13 = preg_replace('#' . $h18_homop . '#', $h13_homop, $mess); }
  • if($h14_homop != '') { $mess_14 = preg_replace('#' . $h18_homop . '#', $h14_homop, $mess); }
  • if($h15_homop != '') { $mess_15 = preg_replace('#' . $h18_homop . '#', $h15_homop, $mess); }
  • if($h16_homop != '') { $mess_16 = preg_replace('#' . $h18_homop . '#', $h16_homop, $mess); }
  • if($h17_homop != '') { $mess_17 = preg_replace('#' . $h18_homop . '#', $h17_homop, $mess); }
  • if($h18_homop != '') { $mess_18 = preg_replace('#' . $h18_homop . '#', $h18_homop, $mess); }
  • if($h19_homop != '') { $mess_19 = preg_replace('#' . $h18_homop . '#', $h19_homop, $mess); }
  • if($h20_homop != '') { $mess_20 = preg_replace('#' . $h18_homop . '#', $h20_homop, $mess); }
  • }
  • }
  • if($h19_homop != '')
  • {
  • if(preg_match('#' . $h19_homop . '#', $mess))
  • {
  • if($h1_homop != '') { $mess_1 = preg_replace('#' . $h19_homop . '#isU', $h1_homop, $mess); }
  • if($h2_homop != '') { $mess_2 = preg_replace('#' . $h19_homop . '#', $h2_homop, $mess); }
  • if($h3_homop != '') { $mess_3 = preg_replace('#' . $h19_homop . '#', $h3_homop, $mess); }
  • if($h4_homop != '') { $mess_4 = preg_replace('#' . $h19_homop . '#', $h4_homop, $mess); }
  • if($h5_homop != '') { $mess_5 = preg_replace('#' . $h19_homop . '#', $h5_homop, $mess); }
  • if($h6_homop != '') { $mess_6 = preg_replace('#' . $h19_homop . '#', $h6_homop, $mess); }
  • if($h7_homop != '') { $mess_7 = preg_replace('#' . $h19_homop . '#', $h7_homop, $mess); }
  • if($h8_homop != '') { $mess_8 = preg_replace('#' . $h19_homop . '#', $h8_homop, $mess); }
  • if($h9_homop != '') { $mess_9 = preg_replace('#' . $h19_homop . '#', $h9_homop, $mess); }
  • if($h10_homop != '') { $mess_10 = preg_replace('#' . $h19_homop . '#', $h10_homop, $mess); }
  • if($h11_homop != '') { $mess_11 = preg_replace('#' . $h19_homop . '#', $h11_homop, $mess); }
  • if($h12_homop != '') { $mess_12 = preg_replace('#' . $h19_homop . '#', $h12_homop, $mess); }
  • if($h13_homop != '') { $mess_13 = preg_replace('#' . $h19_homop . '#', $h13_homop, $mess); }
  • if($h14_homop != '') { $mess_14 = preg_replace('#' . $h19_homop . '#', $h14_homop, $mess); }
  • if($h15_homop != '') { $mess_15 = preg_replace('#' . $h19_homop . '#', $h15_homop, $mess); }
  • if($h16_homop != '') { $mess_16 = preg_replace('#' . $h19_homop . '#', $h16_homop, $mess); }
  • if($h17_homop != '') { $mess_17 = preg_replace('#' . $h19_homop . '#', $h17_homop, $mess); }
  • if($h18_homop != '') { $mess_18 = preg_replace('#' . $h19_homop . '#', $h18_homop, $mess); }
  • if($h19_homop != '') { $mess_19 = preg_replace('#' . $h19_homop . '#', $h19_homop, $mess); }
  • if($h20_homop != '') { $mess_20 = preg_replace('#' . $h19_homop . '#', $h20_homop, $mess); }
  • }
  • }
  • if($h20_homop != '')
  • {
  • if(preg_match('#' . $h20_homop . '#', $mess))
  • {
  • if($h1_homop != '') { $mess_1 = preg_replace('#' . $h20_homop . '#isU', $h1_homop, $mess); }
  • if($h2_homop != '') { $mess_2 = preg_replace('#' . $h20_homop . '#', $h2_homop, $mess); }
  • if($h3_homop != '') { $mess_3 = preg_replace('#' . $h20_homop . '#', $h3_homop, $mess); }
  • if($h4_homop != '') { $mess_4 = preg_replace('#' . $h20_homop . '#', $h4_homop, $mess); }
  • if($h5_homop != '') { $mess_5 = preg_replace('#' . $h20_homop . '#', $h5_homop, $mess); }
  • if($h6_homop != '') { $mess_6 = preg_replace('#' . $h20_homop . '#', $h6_homop, $mess); }
  • if($h7_homop != '') { $mess_7 = preg_replace('#' . $h20_homop . '#', $h7_homop, $mess); }
  • if($h8_homop != '') { $mess_8 = preg_replace('#' . $h20_homop . '#', $h8_homop, $mess); }
  • if($h9_homop != '') { $mess_9 = preg_replace('#' . $h20_homop . '#', $h9_homop, $mess); }
  • if($h10_homop != '') { $mess_10 = preg_replace('#' . $h20_homop . '#', $h10_homop, $mess); }
  • if($h11_homop != '') { $mess_11 = preg_replace('#' . $h20_homop . '#', $h11_homop, $mess); }
  • if($h12_homop != '') { $mess_12 = preg_replace('#' . $h20_homop . '#', $h12_homop, $mess); }
  • if($h13_homop != '') { $mess_13 = preg_replace('#' . $h20_homop . '#', $h13_homop, $mess); }
  • if($h14_homop != '') { $mess_14 = preg_replace('#' . $h20_homop . '#', $h14_homop, $mess); }
  • if($h15_homop != '') { $mess_15 = preg_replace('#' . $h20_homop . '#', $h15_homop, $mess); }
  • if($h16_homop != '') { $mess_16 = preg_replace('#' . $h20_homop . '#', $h16_homop, $mess); }
  • if($h17_homop != '') { $mess_17 = preg_replace('#' . $h20_homop . '#', $h17_homop, $mess); }
  • if($h18_homop != '') { $mess_18 = preg_replace('#' . $h20_homop . '#', $h18_homop, $mess); }
  • if($h19_homop != '') { $mess_19 = preg_replace('#' . $h20_homop . '#', $h19_homop, $mess); }
  • if($h20_homop != '') { $mess_20 = preg_replace('#' . $h20_homop . '#', $h20_homop, $mess); }
  • }
  • }
  • }
  • $WHERE_WHERE_mess1 = 'text_reply = "' . $mess_1 . '"';
  • $WHERE_WHERE_mess2 = 'text_reply = "' . $mess_2 . '"';
  • $WHERE_WHERE_mess3 = 'text_reply = "' . $mess_3 . '"';
  • $WHERE_WHERE_mess4 = 'text_reply = "' . $mess_4 . '"';
  • $WHERE_WHERE_mess5 = 'text_reply = "' . $mess_5 . '"';
  • $WHERE_WHERE_mess6 = 'text_reply = "' . $mess_6 . '"';
  • $WHERE_WHERE_mess7 = 'text_reply = "' . $mess_7 . '"';
  • $WHERE_WHERE_mess8 = 'text_reply = "' . $mess_8 . '"';
  • $WHERE_WHERE_mess9 = 'text_reply = "' . $mess_9 . '"';
  • $WHERE_WHERE_mess10 = 'text_reply = "' . $mess_10 . '"';
  • $WHERE_WHERE_mess11 = 'text_reply = "' . $mess_11 . '"';
  • $WHERE_WHERE_mess12 = 'text_reply = "' . $mess_12 . '"';
  • $WHERE_WHERE_mess13 = 'text_reply = "' . $mess_13 . '"';
  • $WHERE_WHERE_mess14 = 'text_reply = "' . $mess_14 . '"';
  • $WHERE_WHERE_mess15 = 'text_reply = "' . $mess_15 . '"';
  • $WHERE_WHERE_mess16 = 'text_reply = "' . $mess_16 . '"';
  • $WHERE_WHERE_mess17 = 'text_reply = "' . $mess_17 . '"';
  • $WHERE_WHERE_mess18 = 'text_reply = "' . $mess_18 . '"';
  • $WHERE_WHERE_mess19 = 'text_reply = "' . $mess_19 . '"';
  • $WHERE_WHERE_mess20 = 'text_reply = "' . $mess_20 . '"';
  • if(($mess_1 != ''))
  • {
  • $WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ')';
  • }
  • if(($mess_1 != '') && ($mess_2 != ''))
  • {
  • $WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ')';
  • }
  • if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != ''))
  • {
  • $WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ')';
  • }
  • if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != ''))
  • {
  • $WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ')';
  • }
  • if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != '') && ($mess_5 != ''))
  • {
  • $WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ' || ' . $WHERE_WHERE_mess5 . ')';
  • }
  • if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != '') && ($mess_5 != '') && ($mess_6 != ''))
  • {
  • $WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ' || ' . $WHERE_WHERE_mess5 . ' || ' . $WHERE_WHERE_mess6 . ')';
  • }
  • if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != '') && ($mess_5 != '') && ($mess_6 != '') && ($mess_7 != ''))
  • {
  • $WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ' || ' . $WHERE_WHERE_mess5 . ' || ' . $WHERE_WHERE_mess6 . ' || ' . $WHERE_WHERE_mess7 . ')';
  • }
  • if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != '') && ($mess_5 != '') && ($mess_6 != '') && ($mess_7 != '') && ($mess_8 != ''))
  • {
  • $WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ' || ' . $WHERE_WHERE_mess5 . ' || ' . $WHERE_WHERE_mess6 . ' || ' . $WHERE_WHERE_mess7 . ' || ' . $WHERE_WHERE_mess8 . ')';
  • }
  • if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != '') && ($mess_5 != '') && ($mess_6 != '') && ($mess_7 != '') && ($mess_8 != '') && ($mess_9 != ''))
  • {
  • $WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ' || ' . $WHERE_WHERE_mess5 . ' || ' . $WHERE_WHERE_mess6 . ' || ' . $WHERE_WHERE_mess7 . ' || ' . $WHERE_WHERE_mess8 . ' || ' . $WHERE_WHERE_mess9 . ')';
  • }
  • if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != '') && ($mess_5 != '') && ($mess_6 != '') && ($mess_7 != '') && ($mess_8 != '') && ($mess_9 != '') && ($mess_10 != ''))
  • {
  • $WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ' || ' . $WHERE_WHERE_mess5 . ' || ' . $WHERE_WHERE_mess6 . ' || ' . $WHERE_WHERE_mess7 . ' || ' . $WHERE_WHERE_mess8 . ' || ' . $WHERE_WHERE_mess9 . ' || ' . $WHERE_WHERE_mess10 . ')';
  • }
  • if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != '') && ($mess_5 != '') && ($mess_6 != '') && ($mess_7 != '') && ($mess_8 != '') && ($mess_9 != '') && ($mess_10 != '') && ($mess_11 != ''))
  • {
  • $WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ' || ' . $WHERE_WHERE_mess5 . ' || ' . $WHERE_WHERE_mess6 . ' || ' . $WHERE_WHERE_mess7 . ' || ' . $WHERE_WHERE_mess8 . ' || ' . $WHERE_WHERE_mess9 . ' || ' . $WHERE_WHERE_mess10 . ' || ' . $WHERE_WHERE_mess11 . ')';
  • }
  • if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != '') && ($mess_5 != '') && ($mess_6 != '') && ($mess_7 != '') && ($mess_8 != '') && ($mess_9 != '') && ($mess_10 != '') && ($mess_11 != '') && ($mess_12 != ''))
  • {
  • $WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ' || ' . $WHERE_WHERE_mess5 . ' || ' . $WHERE_WHERE_mess6 . ' || ' . $WHERE_WHERE_mess7 . ' || ' . $WHERE_WHERE_mess8 . ' || ' . $WHERE_WHERE_mess9 . ' || ' . $WHERE_WHERE_mess10 . ' || ' . $WHERE_WHERE_mess11 . ' || ' . $WHERE_WHERE_mess12 . ')';
  • }
  • if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != '') && ($mess_5 != '') && ($mess_6 != '') && ($mess_7 != '') && ($mess_8 != '') && ($mess_9 != '') && ($mess_10 != '') && ($mess_11 != '') && ($mess_12 != '') && ($mess_13 != ''))
  • {
  • $WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ' || ' . $WHERE_WHERE_mess5 . ' || ' . $WHERE_WHERE_mess6 . ' || ' . $WHERE_WHERE_mess7 . ' || ' . $WHERE_WHERE_mess8 . ' || ' . $WHERE_WHERE_mess9 . ' || ' . $WHERE_WHERE_mess10 . ' || ' . $WHERE_WHERE_mess11 . ' || ' . $WHERE_WHERE_mess12 . ' || ' . $WHERE_WHERE_mess13 . ')';
  • }
  • if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != '') && ($mess_5 != '') && ($mess_6 != '') && ($mess_7 != '') && ($mess_8 != '') && ($mess_9 != '') && ($mess_10 != '') && ($mess_11 != '') && ($mess_12 != '') && ($mess_13 != '') && ($mess_14 != ''))
  • {
  • $WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ' || ' . $WHERE_WHERE_mess5 . ' || ' . $WHERE_WHERE_mess6 . ' || ' . $WHERE_WHERE_mess7 . ' || ' . $WHERE_WHERE_mess8 . ' || ' . $WHERE_WHERE_mess9 . ' || ' . $WHERE_WHERE_mess10 . ' || ' . $WHERE_WHERE_mess11 . ' || ' . $WHERE_WHERE_mess12 . ' || ' . $WHERE_WHERE_mess13 . ' || ' . $WHERE_WHERE_mess14 . ')';
  • }
  • if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != '') && ($mess_5 != '') && ($mess_6 != '') && ($mess_7 != '') && ($mess_8 != '') && ($mess_9 != '') && ($mess_10 != '') && ($mess_11 != '') && ($mess_12 != '') && ($mess_13 != '') && ($mess_14 != '') && ($mess_15 != ''))
  • {
  • $WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ' || ' . $WHERE_WHERE_mess5 . ' || ' . $WHERE_WHERE_mess6 . ' || ' . $WHERE_WHERE_mess7 . ' || ' . $WHERE_WHERE_mess8 . ' || ' . $WHERE_WHERE_mess9 . ' || ' . $WHERE_WHERE_mess10 . ' || ' . $WHERE_WHERE_mess11 . ' || ' . $WHERE_WHERE_mess12 . ' || ' . $WHERE_WHERE_mess13 . ' || ' . $WHERE_WHERE_mess14 . ' || ' . $WHERE_WHERE_mess15 . ')';
  • }
  • if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != '') && ($mess_5 != '') && ($mess_6 != '') && ($mess_7 != '') && ($mess_8 != '') && ($mess_9 != '') && ($mess_10 != '') && ($mess_11 != '') && ($mess_12 != '') && ($mess_13 != '') && ($mess_14 != '') && ($mess_15 != '') && ($mess_16 != ''))
  • {
  • $WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ' || ' . $WHERE_WHERE_mess5 . ' || ' . $WHERE_WHERE_mess6 . ' || ' . $WHERE_WHERE_mess7 . ' || ' . $WHERE_WHERE_mess8 . ' || ' . $WHERE_WHERE_mess9 . ' || ' . $WHERE_WHERE_mess10 . ' || ' . $WHERE_WHERE_mess11 . ' || ' . $WHERE_WHERE_mess12 . ' || ' . $WHERE_WHERE_mess13 . ' || ' . $WHERE_WHERE_mess14 . ' || ' . $WHERE_WHERE_mess15 . ' || ' . $WHERE_WHERE_mess16 . ')';
  • }
  • if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != '') && ($mess_5 != '') && ($mess_6 != '') && ($mess_7 != '') && ($mess_8 != '') && ($mess_9 != '') && ($mess_10 != '') && ($mess_11 != '') && ($mess_12 != '') && ($mess_13 != '') && ($mess_14 != '') && ($mess_15 != '') && ($mess_16 != '') && ($mess_17 != ''))
  • {
  • $WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ' || ' . $WHERE_WHERE_mess5 . ' || ' . $WHERE_WHERE_mess6 . ' || ' . $WHERE_WHERE_mess7 . ' || ' . $WHERE_WHERE_mess8 . ' || ' . $WHERE_WHERE_mess9 . ' || ' . $WHERE_WHERE_mess10 . ' || ' . $WHERE_WHERE_mess11 . ' || ' . $WHERE_WHERE_mess12 . ' || ' . $WHERE_WHERE_mess13 . ' || ' . $WHERE_WHERE_mess14 . ' || ' . $WHERE_WHERE_mess15 . ' || ' . $WHERE_WHERE_mess16 . ' || ' . $WHERE_WHERE_mess17 . ')';
  • }
  • if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != '') && ($mess_5 != '') && ($mess_6 != '') && ($mess_7 != '') && ($mess_8 != '') && ($mess_9 != '') && ($mess_10 != '') && ($mess_11 != '') && ($mess_12 != '') && ($mess_13 != '') && ($mess_14 != '') && ($mess_15 != '') && ($mess_16 != '') && ($mess_17 != '') && ($mess_18 != ''))
  • {
  • $WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ' || ' . $WHERE_WHERE_mess5 . ' || ' . $WHERE_WHERE_mess6 . ' || ' . $WHERE_WHERE_mess7 . ' || ' . $WHERE_WHERE_mess8 . ' || ' . $WHERE_WHERE_mess9 . ' || ' . $WHERE_WHERE_mess10 . ' || ' . $WHERE_WHERE_mess11 . ' || ' . $WHERE_WHERE_mess12 . ' || ' . $WHERE_WHERE_mess13 . ' || ' . $WHERE_WHERE_mess14 . ' || ' . $WHERE_WHERE_mess15 . ' || ' . $WHERE_WHERE_mess16 . ' || ' . $WHERE_WHERE_mess17 . ' || ' . $WHERE_WHERE_mess18 . ')';
  • }
  • if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != '') && ($mess_5 != '') && ($mess_6 != '') && ($mess_7 != '') && ($mess_8 != '') && ($mess_9 != '') && ($mess_10 != '') && ($mess_11 != '') && ($mess_12 != '') && ($mess_13 != '') && ($mess_14 != '') && ($mess_15 != '') && ($mess_16 != '') && ($mess_17 != '') && ($mess_18 != '') && ($mess_19 != ''))
  • {
  • $WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ' || ' . $WHERE_WHERE_mess5 . ' || ' . $WHERE_WHERE_mess6 . ' || ' . $WHERE_WHERE_mess7 . ' || ' . $WHERE_WHERE_mess8 . ' || ' . $WHERE_WHERE_mess9 . ' || ' . $WHERE_WHERE_mess10 . ' || ' . $WHERE_WHERE_mess11 . ' || ' . $WHERE_WHERE_mess12 . ' || ' . $WHERE_WHERE_mess13 . ' || ' . $WHERE_WHERE_mess14 . ' || ' . $WHERE_WHERE_mess15 . ' || ' . $WHERE_WHERE_mess16 . ' || ' . $WHERE_WHERE_mess17 . ' || ' . $WHERE_WHERE_mess18 . ' || ' . $WHERE_WHERE_mess19 . ')';
  • }
  • if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != '') && ($mess_5 != '') && ($mess_6 != '') && ($mess_7 != '') && ($mess_8 != '') && ($mess_9 != '') && ($mess_10 != '') && ($mess_11 != '') && ($mess_12 != '') && ($mess_13 != '') && ($mess_14 != '') && ($mess_15 != '') && ($mess_16 != '') && ($mess_17 != '') && ($mess_18 != '') && ($mess_19 != '') && ($mess_20 != ''))
  • {
  • $WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ' || ' . $WHERE_WHERE_mess5 . ' || ' . $WHERE_WHERE_mess6 . ' || ' . $WHERE_WHERE_mess7 . ' || ' . $WHERE_WHERE_mess8 . ' || ' . $WHERE_WHERE_mess9 . ' || ' . $WHERE_WHERE_mess10 . ' || ' . $WHERE_WHERE_mess11 . ' || ' . $WHERE_WHERE_mess12 . ' || ' . $WHERE_WHERE_mess13 . ' || ' . $WHERE_WHERE_mess14 . ' || ' . $WHERE_WHERE_mess15 . ' || ' . $WHERE_WHERE_mess16 . ' || ' . $WHERE_WHERE_mess17 . ' || ' . $WHERE_WHERE_mess18 . ' || ' . $WHERE_WHERE_mess19 . ' || ' . $WHERE_WHERE_mess20 . ')';
  • }
  • if(($mess_1 != '') || ($mess_2 != '') || ($mess_3 != '') || ($mess_4 != '') || ($mess_5 != '') || ($mess_6 != '') || ($mess_7 != '') || ($mess_8 != '') || ($mess_9 != '') || ($mess_10 != '') || ($mess_11 != '') || ($mess_12 != '') || ($mess_13 != '') || ($mess_14 != '') || ($mess_15 != '') || ($mess_16 != '') || ($mess_17 != '') || ($mess_18 != '') || ($mess_19 != '') || ($mess_20 != ''))
  • {
  • $select_reply_po_afhomoph = 'SELECT * FROM s0019__reply WHERE ((autor_reply = "' . $user_print . '" || autor_reply = "team") && ' . $WHERE_WHERE_homoinmess . ')';
  • $result_reply_po_afhomoph = mysql_query($select_reply_po_afhomoph) or die ('Erreur 0016: '.mysql_error() );
  • $total_reply_po_afhomoph = mysql_num_rows($result_reply_po_afhomoph);
  • if($total_reply_po_afhomoph)
  • {
  • $total_reply_po_afhomoph = $total_reply_po_afhomoph;
  • if($total_reply_po_afhomoph > '1')
  • {
  • $num_reply_robot_shoot = rand(1, $total_reply_po_afhomoph);
  • }
  • else
  • {
  • $num_reply_robot_shoot = '1';
  • }
  • }
  • $select_last_reply_afhomoph = 'SELECT * FROM s0019__reply WHERE ((autor_reply = "' . $user_print . '" || autor_reply = "team") && ' . $WHERE_WHERE_homoinmess . ')';
  • $result_last_reply_afhomoph = mysql_query($select_last_reply_afhomoph) or die ('Erreur 0017: '.mysql_error() );
  • $total_last_reply_afhomoph = mysql_num_rows($result_last_reply_afhomoph);
  • if($total_last_reply_afhomoph)
  • {
  • $num_reply = '1';
  • while ($ligne_last_reply_afhomoph = mysql_fetch_array ($result_last_reply_afhomoph))
  • { extract ($ligne_last_reply_afhomoph);
  • $id_reply_robot_shot_num[$num_reply] = $id_reply;
  • $num_reply++;
  • }
  • $id_reply_robot_shot = $id_reply_robot_shot_num[$num_reply_robot_shoot];
  • $select_afhomoph = 'SELECT * FROM s0019__reply WHERE ((autor_reply = "' . $user_print . '" || autor_reply = "team") && id_reply = "' . $id_reply_robot_shot . '") LIMIT 0, 1';
  • $result_afhomoph = mysql_query($select_afhomoph) or die ('Erreur 0018: '.mysql_error() );
  • $total_afhomoph = mysql_num_rows($result_afhomoph);
  • if($total_afhomoph)
  • {
  • while ($ligne_afhomoph = mysql_fetch_array ($result_afhomoph))
  • { extract ($ligne_afhomoph);
  • $print_text_reply = $rep_reply;
  • $print_text_reply = stripslashes($print_text_reply); // Suprime les \
  • $print_text_reply = ucfirst($print_text_reply);
  • $robot_speak_color = '000000';
  • $robot_speak = $print_text_reply;
  • $bot_speak = '1';
  • }
  • }
  • }
  • }
  • }
  • }
  • if($bot_speak == '')
  • {
  • if (preg_match("#[0-9]{1,10}\+[0-9]{1,10}#", $mess))
  • {
  • $MAKE_001 = preg_replace('#([0-9]{1,10})\+([0-9]{1,10})#', '[$1][$2]', $mess);
  • $MAKE_002 = preg_replace('#\[([0-9]{1,10})\]\[([0-9]{1,10})\]#', '$1', $MAKE_001);
  • $MAKE_003 = preg_replace('#\[([0-9]{1,10})\]\[([0-9]{1,10})\]#', '$2', $MAKE_001);
  • $MAKE_add = ($MAKE_002 + $MAKE_003);
  • $speak = '1';
  • }
  • if (preg_match("#[0-9]{1,10}\-[0-9]{1,10}#", $mess))
  • {
  • $MAKE_001 = preg_replace('#([0-9]{1,10})\-([0-9]{1,10})#', '[$1][$2]', $mess);
  • $MAKE_002 = preg_replace('#\[([0-9]{1,10})\]\[([0-9]{1,10})\]#', '$1', $MAKE_001);
  • $MAKE_003 = preg_replace('#\[([0-9]{1,10})\]\[([0-9]{1,10})\]#', '$2', $MAKE_001);
  • $MAKE_add = ($MAKE_002 - $MAKE_003);
  • $speak = '1';
  • }
  • if (preg_match("#[0-9]{1,10}\*[0-9]{1,10}#", $mess))
  • {
  • $MAKE_001 = preg_replace('#([0-9]{1,10})\*([0-9]{1,10})#', '[$1][$2]', $mess);
  • $MAKE_002 = preg_replace('#\[([0-9]{1,10})\]\[([0-9]{1,10})\]#', '$1', $MAKE_001);
  • $MAKE_003 = preg_replace('#\[([0-9]{1,10})\]\[([0-9]{1,10})\]#', '$2', $MAKE_001);
  • $MAKE_add = ($MAKE_002 * $MAKE_003);
  • $speak = '1';
  • }
  • if (preg_match("#[0-9]{1,10}\/[0-9]{1,10}#", $mess))
  • {
  • $MAKE_001 = preg_replace('#([0-9]{1,10})\/([0-9]{1,10})#', '[$1][$2]', $mess);
  • $MAKE_002 = preg_replace('#\[([0-9]{1,10})\]\[([0-9]{1,10})\]#', '$1', $MAKE_001);
  • $MAKE_003 = preg_replace('#\[([0-9]{1,10})\]\[([0-9]{1,10})\]#', '$2', $MAKE_001);
  • if($MAKE_003 != '0')
  • {
  • $MAKE_add = ($MAKE_002 / $MAKE_003);
  • $speak = '1';
  • }
  • else
  • {
  • $robot_speak_color = '000000';
  • $robot_speak = 'division par zero impossible !';
  • $bot_speak = '1';
  • }
  • }
  • if($speak == '1')
  • {
  • $robot_speak_color = '000000';
  • $robot_speak = 'La reponse est ' . $MAKE_add;
  • $bot_speak = '1';
  • }
  • }
  • if($bot_speak == '1')
  • {
  • $rq1_reprobotonhist = 'INSERT INTO s0019__allhist (id_allhist, text_allhist, date_allhist, user_allhist, bot_allhist) VALUES ("", "' . $robot_speak . '", "' . $time . '", "' . $user_print . '", "1")';
  • $res1_reprobotonhist = mysql_query($rq1_reprobotonhist)
  • or die ("Probléme d'affichage 00-0019");
  • $last_robotreply = $robot_speak;
  • }
  • else
  • {
  • $new_question = $mess;
  • $goodmess_print = '\goodrep ';
  • $robot_speak_color = 'CC0000';
  • $robot_speak = 'Peut tu me dire quoi répondre à cette question ? (marque \goodrep et la reponse)';
  • }
  • }
  • print '
  • <TR>
  • <TD bgcolor="#' . $robot_speak_color . '"><font color="#FFFFFF">' . $robot_speak . '</font></TD>
  • </TR><tr>
  • <td><form METHOD = "POST">
  • Ton message: <input type="text" name="mess" size="100" value="' . $goodmess_print . '">
  • <INPUT type="hidden" name="envo" value="envo" size="10">
  • <INPUT type="hidden" name="login" value="login" size="10">
  • <INPUT type="hidden" name="new_question" value="' . $new_question . '" size="10">
  • <INPUT type="hidden" name="last_robotreply" value="' . $last_robotreply . '" size="10">
  • <INPUT type="hidden" name="user" value="' . $user . '" size="10">
  • <input type="submit" name="submit" value="Envoyé" name="envoyer">
  • </form>
  • <form METHOD = "POST">
  • <input type="submit" name="submit" value="Déconnection" name="envoyer"></td>
  • </form></td></tr></table></center>';
  • }
  • else
  • {
  • print '
  • <table width="100%">
  • <tr>
  • <td width="50%">
  • <form METHOD = "POST">
  • <INPUT type="hidden" name="login" value="login" size="10">
  • <input type="text" name="user" value="" size="20">
  • <input type="submit" name="submit" value="Commencer!" name="envoyer"><br />
  • </form>
  • </td>
  • <td width="50%">
  • <form METHOD = "POST">
  • <INPUT type="hidden" name="login" value="login" size="10">
  • <input type="hidden" name="user" value="" size="20">
  • <input type="submit" name="submit" value="Commencer sans username!" name="envoyer"><br />
  • </form>
  • </td>
  • </tr>
  • </table>';
  • }
  • ?>
<?
$time = time();
require('includes/config.php');

$robot_speak_color = '000000';
$robot_speak = 'Bonjour, bienvenue sur Tchat avec Moi !';
					
if($login == 'login')
{
	$user = strtolower($user);

	if($user == '')
	{
		$user_print = 'Invité';
		$user = $time;
		$print_usernam = 'no';
	}
	if($user != '')
	{
		$print_usernam = 'yes';
		$user_print = $user;
		$user = $user;
	}
	
	if($print_usernam == 'yes')
	{
		print '<center><table border="1" style="border-collapse: collapse">
	<TR>
		<TD align="right">Ton login : <b>' . $user_print . '</b> </TD>
	</TR>';
	}
	if($print_usernam == 'no' || $print_usernam == '')
	{
		print '<center><table border="1" style="border-collapse: collapse">
	<TR>
		<TD align="right"></TD>
	</TR>';
	}
	if($envo == 'envo' && $mess != "")
	{
		if (preg_match("#\\goodrep #", $mess))
		{
			$mess = str_replace("\\\goodrep ", "", $mess);
			
			$goodrep_inser = '1';
		}
		if (preg_match("#\\inhomo #", $mess))
		{
			$mess = str_replace("\\\inhomo ", "", $mess);
			
			$inhomo_inser = '1';
		}
		$mess = strtolower($mess); //met en minuscule
		$mess = trim($mess); // suprime espace au debut de la chaine et a la fin
		$mess = addslashes($mess); // met des \ devant caractére spécial
		
		if($last_robotreply != '')
		{
			$select_reply_posible = 'SELECT * FROM s0019__reply WHERE ((autor_reply = "' . $user_print . '" || autor_reply = "team") && text_reply = "' . $last_robotreply . '")';
			$result_reply_posible = mysql_query($select_reply_posible) or die ('Erreur 0001: '.mysql_error() );
			$total_reply_posible = mysql_num_rows($result_reply_posible);
			if($total_reply_posible)
			{
				// Aucune Intération l'intération existe déja !
			}
			else
			{
				$new_question = $last_robotreply;
				$new_question = strtolower($new_question); //met en minuscule
				$new_question = trim($new_question); // suprime espace au debut de la chaine et a la fin
				$new_question = addslashes($new_question); // met des \ devant caractére spécial
				$mess = $mess;
				$mess = strtolower($mess); //met en minuscule
				$mess = trim($mess); // suprime espace au debut de la chaine et a la fin
				$mess = addslashes($mess); // met des \ devant caractére spécial
				
				if (preg_match("#\?#", $new_question)) { $new_question = str_replace("?", "", $new_question); }
				if (preg_match("#\!#", $new_question)) { $new_question = str_replace("!", "", $new_question); }
				if (preg_match("#\(#", $new_question)) { $new_question = str_replace("(", "", $new_question); }
				if (preg_match("#\)#", $new_question)) { $new_question = str_replace(")", "", $new_question); }
				if (preg_match("#\.#", $new_question)) { $new_question = str_replace(".", "", $new_question); }
				if (preg_match("#\.\.#", $new_question)) { $new_question = str_replace("..", "", $new_question); }
				if (preg_match("#\.\.\.#", $new_question)) { $new_question = str_replace("...", "", $new_question); }
				if (preg_match("#\.\.\.\.#", $new_question)) { $new_question = str_replace("....", "", $new_question); }
				if (preg_match("#\.\.\.\.\.#", $new_question)) { $new_question = str_replace(".....", "", $new_question); }
				if (preg_match("#\^#", $new_question)) { $new_question = str_replace("^", "", $new_question); }
				if (preg_match("#\^\^#", $new_question)) { $new_question = str_replace("^^", "", $new_question); }
				if (preg_match("#\<noscipt\>#", $new_question)) { $new_question = str_replace("<noscipt>", "", $new_question); }
				if (preg_match("#é#", $new_question)) { $new_question = str_replace("é", "e", $new_question); }
				if (preg_match("#ê#", $new_question)) { $new_question = str_replace("ê", "e", $new_question); }
				if (preg_match("#è#", $new_question)) { $new_question = str_replace("è", "e", $new_question); }
				if (preg_match("#ï#", $new_question)) { $new_question = str_replace("ï", "i", $new_question); }
				if (preg_match("#û#", $new_question)) { $new_question = str_replace("û", "u", $new_question); }
				if (preg_match("#ù#", $new_question)) { $new_question = str_replace("ù", "u", $new_question); }
				if (preg_match("#ç#", $new_question)) { $new_question = str_replace("ç", "c", $new_question); }
				if (preg_match("#à#", $new_question)) { $new_question = str_replace("à", "a", $new_question); }
				if (preg_match("#â#", $new_question)) { $new_question = str_replace("â", "a", $new_question); }
				if (preg_match("#,#", $new_question)) { $new_question = str_replace(",", "", $new_question); }
				if (preg_match("#;#", $new_question)) { $new_question = str_replace(";", "", $new_question); }
				
				$new_question = $new_question;
				$new_question = strtolower($new_question); //met en minuscule
				$new_question = trim($new_question); // suprime espace au debut de la chaine et a la fin
				$new_question = addslashes($new_question); // met des \ devant caractére spécial
				$mess = $mess;
				$mess = strtolower($mess); //met en minuscule
				$mess = trim($mess); // suprime espace au debut de la chaine et a la fin
				$mess = addslashes($mess); // met des \ devant caractére spécial
				
				$rq_goodrep = "INSERT INTO s0019__reply (id_reply, text_reply, rep_reply, date_reply, autor_reply) VALUES  ('', '$new_question', '$mess', '$time', '$user_print')";
				$resq_goodrep = mysql_query($rq_goodrep)
				or die ("Probléme d'affichage 00-0002");
			}
		}
		if ($goodrep_inser == '1')
		{
			if($new_question != '')
			{
				$new_question = $new_question;
				$new_question = strtolower($new_question); //met en minuscule
				$new_question = trim($new_question); // suprime espace au debut de la chaine et a la fin
				$new_question = addslashes($new_question); // met des \ devant caractére spécial
				$mess = $mess;
				$mess = strtolower($mess); //met en minuscule
				$mess = trim($mess); // suprime espace au debut de la chaine et a la fin
				$mess = addslashes($mess); // met des \ devant caractére spécial
				
				if (preg_match("#\?#", $new_question)) { $new_question = str_replace("?", "", $new_question); }
				if (preg_match("#\!#", $new_question)) { $new_question = str_replace("!", "", $new_question); }
				if (preg_match("#\(#", $new_question)) { $new_question = str_replace("(", "", $new_question); }
				if (preg_match("#\)#", $new_question)) { $new_question = str_replace(")", "", $new_question); }
				if (preg_match("#\.#", $new_question)) { $new_question = str_replace(".", "", $new_question); }
				if (preg_match("#\.\.#", $new_question)) { $new_question = str_replace("..", "", $new_question); }
				if (preg_match("#\.\.\.#", $new_question)) { $new_question = str_replace("...", "", $new_question); }
				if (preg_match("#\.\.\.\.#", $new_question)) { $new_question = str_replace("....", "", $new_question); }
				if (preg_match("#\.\.\.\.\.#", $new_question)) { $new_question = str_replace(".....", "", $new_question); }
				if (preg_match("#\^#", $new_question)) { $new_question = str_replace("^", "", $new_question); }
				if (preg_match("#\^\^#", $new_question)) { $new_question = str_replace("^^", "", $new_question); }
				if (preg_match("#\<noscipt\>#", $new_question)) { $new_question = str_replace("<noscipt>", "", $new_question); }
				if (preg_match("#é#", $new_question)) { $new_question = str_replace("é", "e", $new_question); }
				if (preg_match("#ê#", $new_question)) { $new_question = str_replace("ê", "e", $new_question); }
				if (preg_match("#è#", $new_question)) { $new_question = str_replace("è", "e", $new_question); }
				if (preg_match("#ï#", $new_question)) { $new_question = str_replace("ï", "i", $new_question); }
				if (preg_match("#û#", $new_question)) { $new_question = str_replace("û", "u", $new_question); }
				if (preg_match("#ù#", $new_question)) { $new_question = str_replace("ù", "u", $new_question); }
				if (preg_match("#ç#", $new_question)) { $new_question = str_replace("ç", "c", $new_question); }
				if (preg_match("#à#", $new_question)) { $new_question = str_replace("à", "a", $new_question); }
				if (preg_match("#â#", $new_question)) { $new_question = str_replace("â", "a", $new_question); }
				if (preg_match("#,#", $new_question)) { $new_question = str_replace(",", "", $new_question); }
				if (preg_match("#;#", $new_question)) { $new_question = str_replace(";", "", $new_question); }
				
				$new_question = $new_question;
				$new_question = strtolower($new_question); //met en minuscule
				$new_question = trim($new_question); // suprime espace au debut de la chaine et a la fin
				$new_question = addslashes($new_question); // met des \ devant caractére spécial
				$mess = $mess;
				$mess = strtolower($mess); //met en minuscule
				$mess = trim($mess); // suprime espace au debut de la chaine et a la fin
				$mess = addslashes($mess); // met des \ devant caractére spécial
				
				$rq_goodrep = "INSERT INTO s0019__reply (id_reply, text_reply, rep_reply, date_reply, autor_reply) VALUES  ('', '$new_question', '$mess', '$time', '$user_print')";
				$resq_goodrep = mysql_query($rq_goodrep)
				or die ("Probléme d'affichage 00-0003");
			}
			else
			{
				
				print 'Bizzard, cette erreur signifie que vous navez pas posser de question';
			}
		}
		if ($inhomo_inser == '1')
		{
			if (preg_match("#\[(.+)\]#isU", $mess)) { $max = '1'; }
			if (preg_match("#\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '2'; }
			if (preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '3'; }
			if (preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '4'; }
			if (preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '5'; }
			if (preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '6'; }
			if (preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '7'; }
			if (preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '8'; }
			if (preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '9'; }
			if (preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '10'; }
			if (preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '11'; }
			if (preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '12'; }
			if ( preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '13'; }
			if ( preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '14'; }
			if ( preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '15'; }
			if ( preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '16'; }
			if ( preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '17'; }
			if ( preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '18'; }
			if ( preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '19'; }
			if ( preg_match("#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU", $mess)) { $max = '20'; }
			
			if (preg_match("#\[(.+)\]#isU", $mess))
			{
				if($max == '1') { $preg_homo = preg_replace('#\[(.+)\]#isU', '[(01)$1];', $mess); }
				if($max == '2') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];', $mess); }
				if($max == '3') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];', $mess); }
				if($max == '4') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];', $mess); }
				if($max == '5') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];[(05)$5];', $mess); }
				if($max == '6') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];[(05)$5];[(06)$6];', $mess); }
				if($max == '7') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];[(05)$5];[(06)$6];[(07)$7];', $mess); }
				if($max == '8') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];[(05)$5];[(06)$6];[(07)$7];[(08)$8];', $mess); }
				if($max == '9') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];[(05)$5];[(06)$6];[(07)$7];[(08)$8];[(09)$9];', $mess); }
				if($max == '10') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];[(05)$5];[(06)$6];[(07)$7];[(08)$8];[(09)$9];[(10)$10];', $mess); }
				if($max == '11') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];[(05)$5];[(06)$6];[(07)$7];[(08)$8];[(09)$9];[(10)$10];[(11)$11];', $mess); }
				if($max == '12') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];[(05)$5];[(06)$6];[(07)$7];[(08)$8];[(09)$9];[(10)$10];[(11)$11];[(12)$12];', $mess); }
				if($max == '13') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];[(05)$5];[(06)$6];[(07)$7];[(08)$8];[(09)$9];[(10)$10];[(11)$11];[(12)$12];[(13)$13];', $mess); }
				if($max == '14') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];[(05)$5];[(06)$6];[(07)$7];[(08)$8];[(09)$9];[(10)$10];[(11)$11];[(12)$12];[(13)$13];[(14)$14];', $mess); }
				if($max == '15') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];[(05)$5];[(06)$6];[(07)$7];[(08)$8];[(09)$9];[(10)$10];[(11)$11];[(12)$12];[(13)$13];[(14)$14];[(15)$15];', $mess); }
				if($max == '16') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];[(05)$5];[(06)$6];[(07)$7];[(08)$8];[(09)$9];[(10)$10];[(11)$11];[(12)$12];[(13)$13];[(14)$14];[(15)$15];[(16)$16];', $mess); }
				if($max == '17') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];[(05)$5];[(06)$6];[(07)$7];[(08)$8];[(09)$9];[(10)$10];[(11)$11];[(12)$12];[(13)$13];[(14)$14];[(15)$15];[(16)$16];[(17)$17];', $mess); }
				if($max == '18') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];[(05)$5];[(06)$6];[(07)$7];[(08)$8];[(09)$9];[(10)$10];[(11)$11];[(12)$12];[(13)$13];[(14)$14];[(15)$15];[(16)$16];[(17)$17];[(18)$18];', $mess); }
				if($max == '19') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];[(05)$5];[(06)$6];[(07)$7];[(08)$8];[(09)$9];[(10)$10];[(11)$11];[(12)$12];[(13)$13];[(14)$14];[(15)$15];[(16)$16];[(17)$17];[(18)$18];[(19)$19];', $mess); }
				if($max == '20') { $preg_homo = preg_replace('#\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]\[(.+)\]#isU', '[(01)$1];[(02)$2];[(03)$3];[(04)$4];[(05)$5];[(06)$6];[(07)$7];[(08)$8];[(09)$9];[(10)$10];[(11)$11];[(12)$12];[(13)$13];[(14)$14];[(15)$15];[(16)$16];[(17)$17];[(18)$18];[(19)$19];[(20)$20];', $mess); }
			}
			if($max <= '20')
			{
				$preg_homo = preg_replace('#\[\(01\)(.+)\];#isU', '$1', $preg_homo);
			}
			
			// MAX 1
			if($max == '1')
			{
				$n1h = preg_replace('#([a-z0-9])#is', '$1', $preg_homo);
			}
			// MAX 2
			if($max == '2')
			{
				$n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
				$n2h = preg_replace('#(.+)\[\(02\)(.+)\];#is', '$2', $preg_homo);
			}
			// MAX 3
			if($max == '3')
			{
				$n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
				$n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];#is', '$2', $preg_homo);
				$n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];#is', '$3', $preg_homo);
			}
			// MAX 4
			if($max == '4')
			{
				$n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
				$n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
				$n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];#is', '$3', $preg_homo);
				$n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];#is', '$4', $preg_homo);
			}
			// MAX 5
			if($max == '5')
			{ 
				$n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
				$n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
				$n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];\[(.+)\];#is', '$3', $preg_homo);
				$n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];\[(.+)\];#is', '$4', $preg_homo);
				$n5h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[\(05\)(.+)\];#is', '$5', $preg_homo);
			}
			// MAX 6
			if($max == '6')
			{
				$n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
				$n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
				$n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$3', $preg_homo);
				$n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];\[(.+)\];\[(.+)\];#is', '$4', $preg_homo);
				$n5h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[\(05\)(.+)\];\[(.+)\];#is', '$5', $preg_homo);
				$n6h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(06\)(.+)\];#is', '$6', $preg_homo);
			}
			// MAX 7
			if($max == '7')
			{
				$n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
				$n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
				$n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$3', $preg_homo);
				$n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$4', $preg_homo);
				$n5h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[\(05\)(.+)\];\[(.+)\];\[(.+)\];#is', '$5', $preg_homo);
				$n6h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(06\)(.+)\];\[(.+)\];#is', '$6', $preg_homo);
				$n7h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(07\)(.+)\];#is', '$7', $preg_homo);
			}
			// MAX 8
			if($max == '8')
			{
				$n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
				$n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
				$n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$3', $preg_homo);
				$n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$4', $preg_homo);
				$n5h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[\(05\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$5', $preg_homo);
				$n6h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(06\)(.+)\];\[(.+)\];\[(.+)\];#is', '$6', $preg_homo);
				$n7h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(07\)(.+)\];\[(.+)\];#is', '$7', $preg_homo);
				$n8h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(08\)(.+)\];#is', '$8', $preg_homo);
			}
			// MAX 9
			if($max == '9')
			{
				$n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
				$n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
				$n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$3', $preg_homo);
				$n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$4', $preg_homo);
				$n5h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[\(05\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$5', $preg_homo);
				$n6h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(06\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$6', $preg_homo);
				$n7h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(07\)(.+)\];\[(.+)\];\[(.+)\];#is', '$7', $preg_homo);
				$n8h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(08\)(.+)\];\[(.+)\];#is', '$8', $preg_homo);
				$n9h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(09\)(.+)\];#is', '$9', $preg_homo);
			}
			// MAX 10
			if($max == '10')
			{
				$n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
				$n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
				$n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$3', $preg_homo);
				$n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$4', $preg_homo);
				$n5h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[\(05\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$5', $preg_homo);
				$n6h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(06\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$6', $preg_homo);
				$n7h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(07\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$7', $preg_homo);
				$n8h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(08\)(.+)\];\[(.+)\];\[(.+)\];#is', '$8', $preg_homo);
				$n9h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(09\)(.+)\];\[(.+)\];#is', '$9', $preg_homo);
				$n10h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(10\)(.+)\];#is', '$10', $preg_homo);
			}
			// MAX 11
			if($max == '11')
			{
				$n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
				$n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
				$n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$3', $preg_homo);
				$n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$4', $preg_homo);
				$n5h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[\(05\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$5', $preg_homo);
				$n6h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(06\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$6', $preg_homo);
				$n7h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(07\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$7', $preg_homo);
				$n8h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(08\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$8', $preg_homo);
				$n9h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(09\)(.+)\];\[(.+)\];\[(.+)\];#is', '$9', $preg_homo);
				$n10h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(10\)(.+)\];\[(.+)\];#is', '$10', $preg_homo);
				$n11h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(11\)(.+)\];#is', '$11', $preg_homo);
			}
			// MAX 12
			if($max == '12')
			{
				$n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
				$n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
				$n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$3', $preg_homo);
				$n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$4', $preg_homo);
				$n5h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[\(05\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$5', $preg_homo);
				$n6h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(06\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$6', $preg_homo);
				$n7h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(07\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$7', $preg_homo);
				$n8h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(08\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$8', $preg_homo);
				$n9h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(09\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$9', $preg_homo);
				$n10h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(10\)(.+)\];\[(.+)\];\[(.+)\];#is', '$10', $preg_homo);
				$n11h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(11\)(.+)\];\[(.+)\];#is', '$11', $preg_homo);
				$n12h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(12\)(.+)\];#is', '$12', $preg_homo);
			}
			// MAX 13
			if($max == '13')
			{
				$n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
				$n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
				$n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$3', $preg_homo);
				$n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$4', $preg_homo);
				$n5h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[\(05\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$5', $preg_homo);
				$n6h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(06\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$6', $preg_homo);
				$n7h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(07\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$7', $preg_homo);
				$n8h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(08\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$8', $preg_homo);
				$n9h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(09\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$9', $preg_homo);
				$n10h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(10\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$10', $preg_homo);
				$n11h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(11\)(.+)\];\[(.+)\];\[(.+)\];#is', '$11', $preg_homo);
				$n12h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(12\)(.+)\];\[(.+)\];#is', '$12', $preg_homo);
				$n13h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(13\)(.+)\];#is', '$13', $preg_homo);
			}
			// MAX 14
			if($max == '14')
			{
				$n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
				$n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
				$n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$3', $preg_homo);
				$n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$4', $preg_homo);
				$n5h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[\(05\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$5', $preg_homo);
				$n6h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(06\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$6', $preg_homo);
				$n7h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(07\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$7', $preg_homo);
				$n8h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(08\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$8', $preg_homo);
				$n9h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(09\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$9', $preg_homo);
				$n10h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(10\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$10', $preg_homo);
				$n11h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(11\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$11', $preg_homo);
				$n12h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(12\)(.+)\];\[(.+)\];\[(.+)\];#is', '$12', $preg_homo);
				$n13h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(13\)(.+)\];\[(.+)\];#is', '$13', $preg_homo);
				$n14h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(14\)(.+)\];#is', '$14', $preg_homo);
			}
			// MAX 15
			if($max == '15')
			{
				$n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
				$n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
				$n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$3', $preg_homo);
				$n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$4', $preg_homo);
				$n5h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[\(05\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$5', $preg_homo);
				$n6h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(06\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$6', $preg_homo);
				$n7h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(07\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$7', $preg_homo);
				$n8h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(08\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$8', $preg_homo);
				$n9h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(09\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$9', $preg_homo);
				$n10h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(10\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$10', $preg_homo);
				$n11h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(11\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$11', $preg_homo);
				$n12h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(12\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$12', $preg_homo);
				$n13h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(13\)(.+)\];\[(.+)\];\[(.+)\];#is', '$13', $preg_homo);
				$n14h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(14\)(.+)\];\[(.+)\];#is', '$14', $preg_homo);
				$n15h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(15\)(.+)\];#is', '$15', $preg_homo);
			}
			// MAX 16
			if($max == '16')
			{
				$n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
				$n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
				$n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$3', $preg_homo);
				$n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$4', $preg_homo);
				$n5h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[\(05\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$5', $preg_homo);
				$n6h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(06\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$6', $preg_homo);
				$n7h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(07\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$7', $preg_homo);
				$n8h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(08\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$8', $preg_homo);
				$n9h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(09\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$9', $preg_homo);
				$n10h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(10\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$10', $preg_homo);
				$n11h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(11\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$11', $preg_homo);
				$n12h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(12\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$12', $preg_homo);
				$n13h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(13\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$13', $preg_homo);
				$n14h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(14\)(.+)\];\[(.+)\];\[(.+)\];#is', '$14', $preg_homo);
				$n15h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(15\)(.+)\];\[(.+)\];#is', '$15', $preg_homo);
				$n16h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(16\)(.+)\];#is', '$16', $preg_homo);
			}
			// MAX 17
			if($max == '17')
			{
				$n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
				$n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
				$n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$3', $preg_homo);
				$n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$4', $preg_homo);
				$n5h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[\(05\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$5', $preg_homo);
				$n6h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(06\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$6', $preg_homo);
				$n7h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(07\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$7', $preg_homo);
				$n8h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(08\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$8', $preg_homo);
				$n9h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(09\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$9', $preg_homo);
				$n10h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(10\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$10', $preg_homo);
				$n11h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(11\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$11', $preg_homo);
				$n12h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(12\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$12', $preg_homo);
				$n13h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(13\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$13', $preg_homo);
				$n14h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(14\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$14', $preg_homo);
				$n15h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(15\)(.+)\];\[(.+)\];\[(.+)\];#is', '$15', $preg_homo);
				$n16h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(16\)(.+)\];\[(.+)\];#is', '$16', $preg_homo);
				$n17h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(17\)(.+)\];#is', '$17', $preg_homo);
			}
			// MAX 18
			if($max == '18')
			{
				$n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
				$n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
				$n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$3', $preg_homo);
				$n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$4', $preg_homo);
				$n5h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[\(05\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$5', $preg_homo);
				$n6h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(06\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$6', $preg_homo);
				$n7h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(07\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$7', $preg_homo);
				$n8h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(08\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$8', $preg_homo);
				$n9h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(09\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$9', $preg_homo);
				$n10h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(10\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$10', $preg_homo);
				$n11h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(11\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$11', $preg_homo);
				$n12h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(12\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$12', $preg_homo);
				$n13h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(13\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$13', $preg_homo);
				$n14h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(14\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$14', $preg_homo);
				$n15h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(15\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$15', $preg_homo);
				$n16h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(16\)(.+)\];\[(.+)\];\[(.+)\];#is', '$16', $preg_homo);
				$n17h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(17\)(.+)\];\[(.+)\];#is', '$17', $preg_homo);
				$n18h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(18\)(.+)\];#is', '$18', $preg_homo);
			}
			// MAX 19
			if($max == '19')
			{
				$n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
				$n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
				$n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$3', $preg_homo);
				$n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$4', $preg_homo);
				$n5h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[\(05\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$5', $preg_homo);
				$n6h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(06\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$6', $preg_homo);
				$n7h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(07\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$7', $preg_homo);
				$n8h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(08\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$8', $preg_homo);
				$n9h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(09\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$9', $preg_homo);
				$n10h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(10\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$10', $preg_homo);
				$n11h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(11\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$11', $preg_homo);
				$n12h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(12\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$12', $preg_homo);
				$n13h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(13\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$13', $preg_homo);
				$n14h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(14\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$14', $preg_homo);
				$n15h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(15\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$15', $preg_homo);
				$n16h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(16\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$16', $preg_homo);
				$n17h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(17\)(.+)\];\[(.+)\];\[(.+)\];#is', '$17', $preg_homo);
				$n18h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(18\)(.+)\];\[(.+)\];#is', '$18', $preg_homo);
				$n19h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(19\)(.+)\];#is', '$19', $preg_homo);
			}
			// MAX 20
			if($max == '20')
			{
				$n1h = preg_replace('#([a-z0-9])\[(.+)];#is', '$1', $preg_homo);
				$n2h = preg_replace('#(.+)\[\(02\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$2', $preg_homo);
				$n3h = preg_replace('#(.+)\[(.+)\];\[\(03\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$3', $preg_homo);
				$n4h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[\(04\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$4', $preg_homo);
				$n5h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[\(05\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$5', $preg_homo);
				$n6h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(06\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$6', $preg_homo);
				$n7h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(07\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$7', $preg_homo);
				$n8h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(08\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$8', $preg_homo);
				$n9h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(09\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$9', $preg_homo);
				$n10h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(10\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$10', $preg_homo);
				$n11h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(11\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$11', $preg_homo);
				$n12h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(12\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$12', $preg_homo);
				$n13h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(13\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$13', $preg_homo);
				$n14h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(14\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$14', $preg_homo);
				$n15h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(15\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$15', $preg_homo);
				$n16h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(16\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$16', $preg_homo);
				$n17h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(17\)(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];#is', '$17', $preg_homo);
				$n18h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(18\)(.+)\];\[(.+)\];\[(.+)\];#is', '$18', $preg_homo);
				$n19h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(19\)(.+)\];\[(.+)\];#is', '$19', $preg_homo);
				$n20h = preg_replace('#(.+)\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[(.+)\];\[\(20\)(.+)\];#is', '$20', $preg_homo);
			}

			//REASSIGN VALUE FOR SURE
			$n1_homo = $n1h;
			$n2_homo = $n2h;
			$n3_homo = $n3h;
			$n4_homo = $n4h;
			$n5_homo = $n5h;
			$n6_homo = $n6h;
			$n7_homo = $n7h;
			$n8_homo = $n8h;
			$n9_homo = $n9h;
			$n10_homo = $n10h;
			$n11_homo = $n11h;
			$n12_homo = $n12h;
			$n13_homo = $n13h;
			$n14_homo = $n14h;
			$n15_homo = $n15h;
			$n16_homo = $n16h;
			$n17_homo = $n17h;
			$n18_homo = $n18h;
			$n19_homo = $n19h;
			$n20_homo = $n20h;
			
			if($max == '1')
			{
				$SQL_INSERT_form_homo = ', h1_homop';
				$SQL_INSERT_value_homo = ', \'' . $n1_homo . '\'';
			}
			if($max == '2')
			{
				$SQL_INSERT_form_homo = ', h1_homop, h2_homop';
				$SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\'';
			}
			if($max == '3')
			{
				$SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop';
				$SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\'';
			}
			if($max == '4')
			{
				$SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop';
				$SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\'';
			}
			if($max == '5')
			{
				$SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop, h5_homop';
				$SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\', \'' . $n5_homo . '\'';
			}
			if($max == '6')
			{
				$SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop, h5_homop, h6_homop';
				$SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\', \'' . $n5_homo . '\', \'' . $n6_homo . '\'';
			}
			if($max == '7')
			{
				$SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop, h5_homop, h6_homop, h7_homop';
				$SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\', \'' . $n5_homo . '\', \'' . $n6_homo . '\', \'' . $n7_homo . '\'';
			}
			if($max == '8')
			{
				$SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop, h5_homop, h6_homop, h7_homop, h8_homop';
				$SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\', \'' . $n5_homo . '\', \'' . $n6_homo . '\', \'' . $n7_homo . '\', \'' . $n8_homo . '\'';
			}
			if($max == '9')
			{
				$SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop, h5_homop, h6_homop, h7_homop, h8_homop, h9_homop';
				$SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\', \'' . $n5_homo . '\', \'' . $n6_homo . '\', \'' . $n7_homo . '\', \'' . $n8_homo . '\', \'' . $n9_homo . '\'';
			}
			if($max == '10')
			{
				$SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop, h5_homop, h6_homop, h7_homop, h78_homop, h9_homop, h10_homop';
				$SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\', \'' . $n5_homo . '\', \'' . $n6_homo . '\', \'' . $n7_homo . '\', \'' . $n8_homo . '\', \'' . $n9_homo . '\', \'' . $n10_homo . '\'';
			}
			if($max == '11')
			{
				$SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop, h5_homop, h6_homop, h7_homop, h78_homop, h9_homop, h10_homop, h11_homop';
				$SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\', \'' . $n5_homo . '\', \'' . $n6_homo . '\', \'' . $n7_homo . '\', \'' . $n8_homo . '\', \'' . $n9_homo . '\', \'' . $n10_homo . '\', \'' . $n11_homo . '\'';
			}
			if($max == '12')
			{
				$SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop, h5_homop, h6_homop, h7_homop, h78_homop, h9_homop, h10_homop, h11_homop, h12_homop';
				$SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\', \'' . $n5_homo . '\', \'' . $n6_homo . '\', \'' . $n7_homo . '\', \'' . $n8_homo . '\', \'' . $n9_homo . '\', \'' . $n10_homo . '\', \'' . $n11_homo . '\', \'' . $n12_homo . '\'';
			}
			if($max == '13')
			{
				$SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop, h5_homop, h6_homop, h7_homop, h78_homop, h9_homop, h10_homop, h11_homop, h12_homop, h13_homop';
				$SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\', \'' . $n5_homo . '\', \'' . $n6_homo . '\', \'' . $n7_homo . '\', \'' . $n8_homo . '\', \'' . $n9_homo . '\', \'' . $n10_homo . '\', \'' . $n11_homo . '\', \'' . $n12_homo . '\', \'' . $n13_homo . '\'';
			}
			if($max == '14')
			{
				$SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop, h5_homop, h6_homop, h7_homop, h78_homop, h9_homop, h10_homop, h11_homop, h12_homop, h13_homop, h14_homop';
				$SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\', \'' . $n5_homo . '\', \'' . $n6_homo . '\', \'' . $n7_homo . '\', \'' . $n8_homo . '\', \'' . $n9_homo . '\', \'' . $n10_homo . '\', \'' . $n11_homo . '\', \'' . $n12_homo . '\', \'' . $n13_homo . '\', \'' . $n14_homo . '\'';
			}
			if($max == '15')
			{
				$SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop, h5_homop, h6_homop, h7_homop, h78_homop, h9_homop, h10_homop, h11_homop, h12_homop, h13_homop, h14_homop, h15_homop';
				$SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\', \'' . $n5_homo . '\', \'' . $n6_homo . '\', \'' . $n7_homo . '\', \'' . $n8_homo . '\', \'' . $n9_homo . '\', \'' . $n10_homo . '\', \'' . $n11_homo . '\', \'' . $n12_homo . '\', \'' . $n13_homo . '\', \'' . $n14_homo . '\', \'' . $n15_homo . '\'';
			}
			if($max == '16')
			{
				$SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop, h5_homop, h6_homop, h7_homop, h78_homop, h9_homop, h10_homop, h11_homop, h12_homop, h13_homop, h14_homop, h15_homop, h16_homop';
				$SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\', \'' . $n5_homo . '\', \'' . $n6_homo . '\', \'' . $n7_homo . '\', \'' . $n8_homo . '\', \'' . $n9_homo . '\', \'' . $n10_homo . '\', \'' . $n11_homo . '\', \'' . $n12_homo . '\', \'' . $n13_homo . '\', \'' . $n14_homo . '\', \'' . $n15_homo . '\', \'' . $n16_homo . '\'';
			}
			if($max == '17')
			{
				$SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop, h5_homop, h6_homop, h7_homop, h78_homop, h9_homop, h10_homop, h11_homop, h12_homop, h13_homop, h14_homop, h15_homop, h16_homop, h17_homop';
				$SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\', \'' . $n5_homo . '\', \'' . $n6_homo . '\', \'' . $n7_homo . '\', \'' . $n8_homo . '\', \'' . $n9_homo . '\', \'' . $n10_homo . '\', \'' . $n11_homo . '\', \'' . $n12_homo . '\', \'' . $n13_homo . '\', \'' . $n14_homo . '\', \'' . $n15_homo . '\', \'' . $n16_homo . '\', \'' . $n17_homo . '\'';
			}
			if($max == '18')
			{
				$SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop, h5_homop, h6_homop, h7_homop, h78_homop, h9_homop, h10_homop, h11_homop, h12_homop, h13_homop, h14_homop, h15_homop, h16_homop, h17_homop, h18_homop';
				$SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\', \'' . $n5_homo . '\', \'' . $n6_homo . '\', \'' . $n7_homo . '\', \'' . $n8_homo . '\', \'' . $n9_homo . '\', \'' . $n10_homo . '\', \'' . $n11_homo . '\', \'' . $n12_homo . '\', \'' . $n13_homo . '\', \'' . $n14_homo . '\', \'' . $n15_homo . '\', \'' . $n16_homo . '\', \'' . $n17_homo . '\', \'' . $n18_homo . '\'';
			}
			if($max == '19')
			{
				$SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop, h5_homop, h6_homop, h7_homop, h78_homop, h9_homop, h10_homop, h11_homop, h12_homop, h13_homop, h14_homop, h15_homop, h16_homop, h17_homop, h18_homop, h19_homop';
				$SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\', \'' . $n5_homo . '\', \'' . $n6_homo . '\', \'' . $n7_homo . '\', \'' . $n8_homo . '\', \'' . $n9_homo . '\', \'' . $n10_homo . '\', \'' . $n11_homo . '\', \'' . $n12_homo . '\', \'' . $n13_homo . '\', \'' . $n14_homo . '\', \'' . $n15_homo . '\', \'' . $n16_homo . '\', \'' . $n17_homo . '\', \'' . $n18_homo . '\', \'' . $n19_homo . '\'';
			}
			if($max == '20')
			{
				$SQL_INSERT_form_homo = ', h1_homop, h2_homop, h3_homop, h4_homop, h5_homop, h6_homop, h7_homop, h78_homop, h9_homop, h10_homop, h11_homop, h12_homop, h13_homop, h14_homop, h15_homop, h16_homop, h17_homop, h18_homop, h19_homop, h20_homop';
				$SQL_INSERT_value_homo = ', \'' . $n1_homo . '\', \'' . $n2_homo . '\', \'' . $n3_homo . '\', \'' . $n4_homo . '\', \'' . $n5_homo . '\', \'' . $n6_homo . '\', \'' . $n7_homo . '\', \'' . $n8_homo . '\', \'' . $n9_homo . '\', \'' . $n10_homo . '\', \'' . $n11_homo . '\', \'' . $n12_homo . '\', \'' . $n13_homo . '\', \'' . $n14_homo . '\', \'' . $n15_homo . '\', \'' . $n16_homo . '\', \'' . $n17_homo . '\', \'' . $n18_homo . '\', \'' . $n19_homo . '\', \'' . $n20_homo . '\'';
			}
			
			$mess = '\inhomo ' . $mess;

			if($max != '20') // Bug en cours 20homophone sa bug ;)
			{
				$rq_homop_insert = "INSERT INTO s0019__homop (id_homop, autor_homop" . $SQL_INSERT_form_homo . ") VALUES  ('', '$user_print'" . $SQL_INSERT_value_homo . ")";
				$resq_homop_insert = mysql_query($rq_homop_insert)
				or die ("Probléme d'affichage 00-0004");
			}
		}
		print '
	<TR>
		<TD><h5>Historique de la conversation</h5></TD>
	</TR>';
		$rq1 = "INSERT INTO s0019__allhist (id_allhist, text_allhist, date_allhist, user_allhist, bot_allhist) VALUES  ('', '$mess', '$time', '$user_print', '0')";
		$res1 = mysql_query($rq1)
		or die ("Probléme d'affichage 00-0005");
		
		$select_hist_total = 'SELECT * FROM s0019__allhist WHERE user_allhist = "' . $user_print . '"';
		$result_hist_total = mysql_query($select_hist_total) or die ('Erreur 0006: '.mysql_error() );
		$total_hist_total = mysql_num_rows($result_hist_total);
		
		if($total_hist_total < '10')
		{
			$total_hist_total = '0';
		}
		else
		{
			$total_hist_total = ($total_hist_total - '10');
		}
		
		$select_hist = 'SELECT * FROM s0019__allhist WHERE user_allhist = "' . $user_print . '" ORDER by date_allhist Asc LIMIT ' . $total_hist_total . ', 10';
		$result_hist = mysql_query($select_hist) or die ('Erreur 0007: '.mysql_error() );
		$total_hist = mysql_num_rows($result_hist);
		if($total_hist)
		{
			while ($ligne_hist = mysql_fetch_array ($result_hist))
			{ extract ($ligne_hist);
			
				$print_text_allhist = $text_allhist;
				$print_text_allhist = stripslashes($print_text_allhist); // Suprime les \
				$print_text_allhist = ucfirst($print_text_allhist);  // Met la 1er lettres en maj
				
				if($bot_allhist == '0')
				{
					$historybackgroundcolor = 'FFFFFF';
				}
				if($bot_allhist == '1')
				{
					$historybackgroundcolor = 'E6E6E6';
				}
				print '
	<TR>
		<TD bgcolor="#' . $historybackgroundcolor . '">' . $print_text_allhist . '</TD>
	</TR>';
			}
		}
		
		if (preg_match("#\?#", $mess)) { $mess = str_replace("?", "", $mess); }
		if (preg_match("#\!#", $mess)) { $mess = str_replace("!", "", $mess); }
		if (preg_match("#\(#", $mess)) { $mess = str_replace("(", "", $mess); }
		if (preg_match("#\)#", $mess)) { $mess = str_replace(")", "", $mess); }
		if (preg_match("#\.#", $mess)) { $mess = str_replace(".", "", $mess); }
		if (preg_match("#\.\.#", $mess)) { $mess = str_replace("..", "", $mess); }
		if (preg_match("#\.\.\.#", $mess)) { $mess = str_replace("...", "", $mess); }
		if (preg_match("#\.\.\.\.#", $mess)) { $mess = str_replace("....", "", $mess); }
		if (preg_match("#\.\.\.\.\.#", $mess)) { $mess = str_replace(".....", "", $mess); }
		if (preg_match("#\^#", $mess)) { $mess = str_replace("^", "", $mess); }
		if (preg_match("#\^\^#", $mess)) { $mess = str_replace("^^", "", $mess); }
		if (preg_match("#\<noscipt\>#", $mess)) { $mess = str_replace("<noscipt>", "", $mess); }
		if (preg_match("#é#", $mess)) { $mess = str_replace("é", "e", $mess); }
		if (preg_match("#ê#", $mess)) { $mess = str_replace("ê", "e", $mess); }
		if (preg_match("#è#", $mess)) { $mess = str_replace("è", "e", $mess); }
		if (preg_match("#ï#", $mess)) { $mess = str_replace("ï", "i", $mess); }
		if (preg_match("#û#", $mess)) { $mess = str_replace("û", "u", $mess); }
		if (preg_match("#ù#", $mess)) { $mess = str_replace("ù", "u", $mess); }
		if (preg_match("#ç#", $mess)) { $mess = str_replace("ç", "c", $mess); }
		if (preg_match("#à#", $mess)) { $mess = str_replace("à", "a", $mess); }
		if (preg_match("#â#", $mess)) { $mess = str_replace("â", "a", $mess); }
		if (preg_match("#,#", $mess)) { $mess = str_replace(",", "", $mess); }
		if (preg_match("#;#", $mess)) { $mess = str_replace(";", "", $mess); }
		
		$select_reply_posible = 'SELECT * FROM s0019__reply WHERE ((autor_reply = "' . $user_print . '" || autor_reply = "team") && text_reply = "' . $mess . '")';
		$result_reply_posible = mysql_query($select_reply_posible) or die ('Erreur 0008: '.mysql_error() );
		$total_reply_posible = mysql_num_rows($result_reply_posible);
		if($total_reply_posible)
		{
			$total_reply_posible = $total_reply_posible;
			if($total_reply_posible > '1')
			{
				$num_reply_robot_shoot = rand(1, $total_reply_posible);
			}
			else
			{
				$num_reply_robot_shoot = '1';
			}
		}
		$select_last_reply = 'SELECT * FROM s0019__reply WHERE ((autor_reply = "' . $user_print . '" || autor_reply = "team") && text_reply = "' . $mess . '")';
		$result_last_reply = mysql_query($select_last_reply) or die ('Erreur 0009: '.mysql_error() );
		$total_last_reply = mysql_num_rows($result_last_reply);
		if($total_last_reply)
		{
			$num_reply = '1';
			while ($ligne_last_reply = mysql_fetch_array ($result_last_reply))
			{ extract ($ligne_last_reply);
				$id_reply_robot_shot_num[$num_reply] = $id_reply;
				$num_reply++;
			}
			$id_reply_robot_shot = $id_reply_robot_shot_num[$num_reply_robot_shoot];
			
			$select = 'SELECT * FROM s0019__reply WHERE ((autor_reply = "' . $user_print . '" || autor_reply = "team") && id_reply = "' . $id_reply_robot_shot . '") LIMIT 0, 1';
			$result = mysql_query($select) or die ('Erreur 0010: '.mysql_error() );
			$total = mysql_num_rows($result);
			if($total)
			{
				while ($ligne = mysql_fetch_array ($result))
				{ extract ($ligne);
					$print_text_reply = $rep_reply;
					$print_text_reply = stripslashes($print_text_reply); // Suprime les \
					$print_text_reply = ucfirst($print_text_reply);
					
					$robot_speak_color = '000000';
					$robot_speak = $print_text_reply;
					$bot_speak = '1';
		
				}
			}
			else
			{
				$WHERE_homophone_isonbd = '(h1_homop = "' . $mess . '" || h2_homop = "' . $mess . '" || h3_homop = "' . $mess . '" || h4_homop = "' . $mess . '" || h5_homop = "' . $mess . '" || h6_homop = "' . $mess . '" || h7_homop = "' . $mess . '" || h8_homop = "' . $mess . '" || h9_homop = "' . $mess . '" || h10_homop = "' . $mess . '" || h11_homop = "' . $mess . '" || h12_homop = "' . $mess . '" || h13_homop = "' . $mess . '" || h14_homop = "' . $mess . '" || h15_homop = "' . $mess . '" || h16_homop = "' . $mess . '" || h17_homop = "' . $mess . '" || h18_homop = "' . $mess . '" || h19_homop = "' . $mess . '" || h20_homop = "' . $mess . '")';
				
				$select_homop = 'SELECT * FROM s0019__homop WHERE ((autor_homop = "' . $user_print . '" || autor_homop = "team") && ' . $WHERE_homophone_isonbd . ')';
				$result_homop = mysql_query($select_homop) or die ('Erreur 0011: '.mysql_error() );
				$total_homop = mysql_num_rows($result_last_reply);
				if($total_homop)
				{
					if($total_homop > '1')
					{
						$num_homo_shoot = rand(1, $total_homop);
					}
					else
					{
						$num_homo_shoot = '1';
					}
					while ($ligne_homop = mysql_fetch_array ($result_homop))
					{ extract ($ligne_homop);
						
						$WHERE_homohopneisareaydyreply = '(text_reply = "' . $h1_homop . '" || text_reply = "' . $h2_homop . '" || text_reply = "' . $h3_homop . '" || text_reply = "' . $h4_homop . '" || text_reply = "' . $h5_homop . '" || text_reply = "' . $h6_homop . '" || text_reply = "' . $h7_homop . '" || text_reply = "' . $h8_homop . '" || text_reply = "' . $h9_homop . '" || text_reply = "' . $h10_homop . '" || text_reply = "' . $h11_homop . '" || text_reply = "' . $h12_homop . '" || text_reply = "' . $h13_homop . '" || text_reply = "' . $h14_homop . '" || text_reply = "' . $h15_homop . '" || text_reply = "' . $h16_homop . '" || text_reply = "' . $h17_homop . '" || text_reply = "' . $h18_homop . '" || text_reply = "' . $h19_homop . '" || text_reply = "' . $h20_homop . '")';
						
						$select_homohopneisareaydyreply = 'SELECT * FROM s0019__reply WHERE ((autor_reply = "' . $user_print . '" || autor_reply = "team") && ' . $WHERE_homohopneisareaydyreply . ') LIMIT 0, 1';
						$result_homohopneisareaydyreply = mysql_query($select_homohopneisareaydyreply) or die ('Erreur 0012: '.mysql_error() );
						$total_homohopneisareaydyreply = mysql_num_rows($result_homohopneisareaydyreply);
						if($total_homohopneisareaydyreply)
						{
							$num_homo = '1';
							while ($ligne_homohopneisareaydyreply = mysql_fetch_array ($result_homohopneisareaydyreply))
							{ extract ($ligne_homohopneisareaydyreply);
								$reply_homo_shot_num[$num_homo] = $rep_reply;
								
								
								$num_homo++;
							}
							$reply_robot_shot = $reply_homo_shot_num[$num_homo_shoot];
							
							$print_text_reply = $reply_robot_shot;
							$print_text_reply = stripslashes($print_text_reply); // Suprime les \
							$print_text_reply = ucfirst($print_text_reply);
							$robot_speak_color = '000000';
							$robot_speak = $print_text_reply;
							$bot_speak = '1';
						}
					}
				}
				else
				{
					$bot_speak = '';
				}
			}
		}
		else
		{
			$WHERE_homophone_isonbd = '(h1_homop = "' . $mess . '" || h2_homop = "' . $mess . '" || h3_homop = "' . $mess . '" || h4_homop = "' . $mess . '" || h5_homop = "' . $mess . '" || h6_homop = "' . $mess . '" || h7_homop = "' . $mess . '" || h8_homop = "' . $mess . '" || h9_homop = "' . $mess . '" || h10_homop = "' . $mess . '" || h11_homop = "' . $mess . '" || h12_homop = "' . $mess . '" || h13_homop = "' . $mess . '" || h14_homop = "' . $mess . '" || h15_homop = "' . $mess . '" || h16_homop = "' . $mess . '" || h17_homop = "' . $mess . '" || h18_homop = "' . $mess . '" || h19_homop = "' . $mess . '" || h20_homop = "' . $mess . '")';
				
			$select_homop = 'SELECT * FROM s0019__homop WHERE ((autor_homop = "' . $user_print . '" || autor_homop = "team") && ' . $WHERE_homophone_isonbd . ')';
			$result_homop = mysql_query($select_homop) or die ('Erreur 0013: '.mysql_error() );
			$total_homop = mysql_num_rows($result_homop);
			if($total_homop)
			{
				if($total_homop > '1')
				{
					$num_homo_shoot = rand(1, $total_homop);
				}
				else
				{
					$num_homo_shoot = '1';
				}
				while ($ligne_homop = mysql_fetch_array ($result_homop))
				{ extract ($ligne_homop);
						
					$WHERE_homohopneisareaydyreply = '(text_reply = "' . $h1_homop . '" || text_reply = "' . $h2_homop . '" || text_reply = "' . $h3_homop . '" || text_reply = "' . $h4_homop . '" || text_reply = "' . $h5_homop . '" || text_reply = "' . $h6_homop . '" || text_reply = "' . $h7_homop . '" || text_reply = "' . $h8_homop . '" || text_reply = "' . $h9_homop . '" || text_reply = "' . $h10_homop . '" || text_reply = "' . $h11_homop . '" || text_reply = "' . $h12_homop . '" || text_reply = "' . $h13_homop . '" || text_reply = "' . $h14_homop . '" || text_reply = "' . $h15_homop . '" || text_reply = "' . $h16_homop . '" || text_reply = "' . $h17_homop . '" || text_reply = "' . $h18_homop . '" || text_reply = "' . $h19_homop . '" || text_reply = "' . $h20_homop . '")';
						
					$select_homohopneisareaydyreply = 'SELECT * FROM s0019__reply WHERE ((autor_reply = "' . $user_print . '" || autor_reply = "team") && ' . $WHERE_homohopneisareaydyreply . ')';
					$result_homohopneisareaydyreply = mysql_query($select_homohopneisareaydyreply) or die ('Erreur 0014: '.mysql_error() );
					$total_homohopneisareaydyreply = mysql_num_rows($result_homohopneisareaydyreply);
					if($total_homohopneisareaydyreply)
						{
							$num_homo = '1';
							while ($ligne_homohopneisareaydyreply = mysql_fetch_array ($result_homohopneisareaydyreply))
							{ extract ($ligne_homohopneisareaydyreply);
								$reply_homo_shot_num[$num_homo] = $rep_reply;
								
								
								$num_homo++;
							}
							$reply_robot_shot = $reply_homo_shot_num[$num_homo_shoot];
							
							$print_text_reply = $reply_robot_shot;
							$print_text_reply = stripslashes($print_text_reply); // Suprime les \
							$print_text_reply = ucfirst($print_text_reply);
							$robot_speak_color = '000000';
							$robot_speak = $print_text_reply;
							$bot_speak = '1';
						}
				}
			}
			else
			{
				$bot_speak = '';
			}
		}
		if($bot_speak == '')
		{
			$select_exithomohop = 'SELECT * FROM s0019__homop WHERE (autor_homop = "' . $user_print . '" || autor_homop = "team")';
			$result_exithomohop = mysql_query($select_exithomohop) or die ('Erreur002 0015: '.mysql_error() );
			$total_exithomohop = mysql_num_rows($result_exithomohop);
			if($total_exithomohop)
			{
				while ($ligne_exithomohop = mysql_fetch_array ($result_exithomohop))
				{ extract ($ligne_exithomohop);
				
					$h1_homop = addslashes($h1_homop);
					$h2_homop = addslashes($h2_homop);
					$h3_homop = addslashes($h3_homop);
					$h4_homop = addslashes($h4_homop);
					$h5_homop = addslashes($h5_homop);
					$h6_homop = addslashes($h6_homop);
					$h7_homop = addslashes($h7_homop);
					$h8_homop = addslashes($h8_homop);
					$h9_homop = addslashes($h9_homop);
					$h10_homop = addslashes($h10_homop);
					$h11_homop = addslashes($h11_homop);
					$h12_homop = addslashes($h12_homop);
					$h13_homop = addslashes($h13_homop);
					$h14_homop = addslashes($h14_homop);
					$h15_homop = addslashes($h15_homop);
					$h16_homop = addslashes($h16_homop);
					$h17_homop = addslashes($h17_homop);
					$h18_homop = addslashes($h18_homop);
					$h19_homop = addslashes($h19_homop);
					$h20_homop = addslashes($h20_homop);
					
					if (preg_match("#é#", $h1_homop)) { $h1_homop = str_replace("é", "e", $h1_homop); }
					if (preg_match("#ê#", $h1_homop)) { $h1_homop = str_replace("ê", "e", $h1_homop); }
					if (preg_match("#è#", $h1_homop)) { $h1_homop = str_replace("è", "e", $h1_homop); }
					if (preg_match("#ï#", $h1_homop)) { $h1_homop = str_replace("ï", "i", $h1_homop); }
					if (preg_match("#û#", $h1_homop)) { $h1_homop = str_replace("û", "u", $h1_homop); }
					if (preg_match("#ù#", $h1_homop)) { $h1_homop = str_replace("ù", "u", $h1_homop); }
					if (preg_match("#ç#", $h1_homop)) { $h1_homop = str_replace("ç", "c", $h1_homop); }
					if (preg_match("#à#", $h1_homop)) { $h1_homop = str_replace("à", "a", $h1_homop); }
					if (preg_match("#â#", $h1_homop)) { $h1_homop = str_replace("â", "a", $h1_homop); }
					
					if (preg_match("#é#", $h2_homop)) { $h2_homop = str_replace("é", "e", $h2_homop); }
					if (preg_match("#ê#", $h2_homop)) { $h2_homop = str_replace("ê", "e", $h2_homop); }
					if (preg_match("#è#", $h2_homop)) { $h2_homop = str_replace("è", "e", $h2_homop); }
					if (preg_match("#ï#", $h2_homop)) { $h2_homop = str_replace("ï", "i", $h2_homop); }
					if (preg_match("#û#", $h2_homop)) { $h2_homop = str_replace("û", "u", $h2_homop); }
					if (preg_match("#ù#", $h2_homop)) { $h2_homop = str_replace("ù", "u", $h2_homop); }
					if (preg_match("#ç#", $h2_homop)) { $h2_homop = str_replace("ç", "c", $h2_homop); }
					if (preg_match("#à#", $h2_homop)) { $h2_homop = str_replace("à", "a", $h2_homop); }
					if (preg_match("#â#", $h2_homop)) { $h2_homop = str_replace("â", "a", $h2_homop); }
					
					if (preg_match("#é#", $h3_homop)) { $h3_homop = str_replace("é", "e", $h3_homop); }
					if (preg_match("#ê#", $h3_homop)) { $h3_homop = str_replace("ê", "e", $h3_homop); }
					if (preg_match("#è#", $h3_homop)) { $h3_homop = str_replace("è", "e", $h3_homop); }
					if (preg_match("#ï#", $h3_homop)) { $h3_homop = str_replace("ï", "i", $h3_homop); }
					if (preg_match("#û#", $h3_homop)) { $h3_homop = str_replace("û", "u", $h3_homop); }
					if (preg_match("#ù#", $h3_homop)) { $h3_homop = str_replace("ù", "u", $h3_homop); }
					if (preg_match("#ç#", $h3_homop)) { $h3_homop = str_replace("ç", "c", $h3_homop); }
					if (preg_match("#à#", $h3_homop)) { $h3_homop = str_replace("à", "a", $h3_homop); }
					if (preg_match("#â#", $h3_homop)) { $h3_homop = str_replace("â", "a", $h3_homop); }
				
					if (preg_match("#é#", $h4_homop)) { $h4_homop = str_replace("é", "e", $h4_homop); }
					if (preg_match("#ê#", $h4_homop)) { $h4_homop = str_replace("ê", "e", $h4_homop); }
					if (preg_match("#è#", $h4_homop)) { $h4_homop = str_replace("è", "e", $h4_homop); }
					if (preg_match("#ï#", $h4_homop)) { $h4_homop = str_replace("ï", "i", $h4_homop); }
					if (preg_match("#û#", $h4_homop)) { $h4_homop = str_replace("û", "u", $h4_homop); }
					if (preg_match("#ù#", $h4_homop)) { $h4_homop = str_replace("ù", "u", $h4_homop); }
					if (preg_match("#ç#", $h4_homop)) { $h4_homop = str_replace("ç", "c", $h4_homop); }
					if (preg_match("#à#", $h4_homop)) { $h4_homop = str_replace("à", "a", $h4_homop); }
					if (preg_match("#â#", $h4_homop)) { $h4_homop = str_replace("â", "a", $h4_homop); }
					
					if (preg_match("#é#", $h5_homop)) { $h5_homop = str_replace("é", "e", $h5_homop); }
					if (preg_match("#ê#", $h5_homop)) { $h5_homop = str_replace("ê", "e", $h5_homop); }
					if (preg_match("#è#", $h5_homop)) { $h5_homop = str_replace("è", "e", $h5_homop); }
					if (preg_match("#ï#", $h5_homop)) { $h5_homop = str_replace("ï", "i", $h5_homop); }
					if (preg_match("#û#", $h5_homop)) { $h5_homop = str_replace("û", "u", $h5_homop); }
					if (preg_match("#ù#", $h5_homop)) { $h5_homop = str_replace("ù", "u", $h5_homop); }
					if (preg_match("#ç#", $h5_homop)) { $h5_homop = str_replace("ç", "c", $h5_homop); }
					if (preg_match("#à#", $h5_homop)) { $h5_homop = str_replace("à", "a", $h5_homop); }
					if (preg_match("#â#", $h5_homop)) { $h5_homop = str_replace("â", "a", $h5_homop); }
					
					if (preg_match("#é#", $h6_homop)) { $h6_homop = str_replace("é", "e", $h6_homop); }
					if (preg_match("#ê#", $h6_homop)) { $h6_homop = str_replace("ê", "e", $h6_homop); }
					if (preg_match("#è#", $h6_homop)) { $h6_homop = str_replace("è", "e", $h6_homop); }
					if (preg_match("#ï#", $h6_homop)) { $h6_homop = str_replace("ï", "i", $h6_homop); }
					if (preg_match("#û#", $h6_homop)) { $h6_homop = str_replace("û", "u", $h6_homop); }
					if (preg_match("#ù#", $h6_homop)) { $h6_homop = str_replace("ù", "u", $h6_homop); }
					if (preg_match("#ç#", $h6_homop)) { $h6_homop = str_replace("ç", "c", $h6_homop); }
					if (preg_match("#à#", $h6_homop)) { $h6_homop = str_replace("à", "a", $h6_homop); }
					if (preg_match("#â#", $h6_homop)) { $h6_homop = str_replace("â", "a", $h6_homop); }
					
					if (preg_match("#é#", $h7_homop)) { $h7_homop = str_replace("é", "e", $h7_homop); }
					if (preg_match("#ê#", $h7_homop)) { $h7_homop = str_replace("ê", "e", $h7_homop); }
					if (preg_match("#è#", $h7_homop)) { $h7_homop = str_replace("è", "e", $h7_homop); }
					if (preg_match("#ï#", $h7_homop)) { $h7_homop = str_replace("ï", "i", $h7_homop); }
					if (preg_match("#û#", $h7_homop)) { $h7_homop = str_replace("û", "u", $h7_homop); }
					if (preg_match("#ù#", $h7_homop)) { $h7_homop = str_replace("ù", "u", $h7_homop); }
					if (preg_match("#ç#", $h7_homop)) { $h7_homop = str_replace("ç", "c", $h7_homop); }
					if (preg_match("#à#", $h7_homop)) { $h7_homop = str_replace("à", "a", $h7_homop); }
					if (preg_match("#â#", $h7_homop)) { $h7_homop = str_replace("â", "a", $h7_homop); }
					
					if (preg_match("#é#", $h8_homop)) { $h8_homop = str_replace("é", "e", $h8_homop); }
					if (preg_match("#ê#", $h8_homop)) { $h8_homop = str_replace("ê", "e", $h8_homop); }
					if (preg_match("#è#", $h8_homop)) { $h8_homop = str_replace("è", "e", $h8_homop); }
					if (preg_match("#ï#", $h8_homop)) { $h8_homop = str_replace("ï", "i", $h8_homop); }
					if (preg_match("#û#", $h8_homop)) { $h8_homop = str_replace("û", "u", $h8_homop); }
					if (preg_match("#ù#", $h8_homop)) { $h8_homop = str_replace("ù", "u", $h8_homop); }
					if (preg_match("#ç#", $h8_homop)) { $h8_homop = str_replace("ç", "c", $h8_homop); }
					if (preg_match("#à#", $h8_homop)) { $h8_homop = str_replace("à", "a", $h8_homop); }
					if (preg_match("#â#", $h8_homop)) { $h8_homop = str_replace("â", "a", $h8_homop); }
					
					if (preg_match("#é#", $h9_homop)) { $h9_homop = str_replace("é", "e", $h9_homop); }
					if (preg_match("#ê#", $h9_homop)) { $h9_homop = str_replace("ê", "e", $h9_homop); }
					if (preg_match("#è#", $h9_homop)) { $h9_homop = str_replace("è", "e", $h9_homop); }
					if (preg_match("#ï#", $h9_homop)) { $h9_homop = str_replace("ï", "i", $h9_homop); }
					if (preg_match("#û#", $h9_homop)) { $h9_homop = str_replace("û", "u", $h9_homop); }
					if (preg_match("#ù#", $h9_homop)) { $h9_homop = str_replace("ù", "u", $h9_homop); }
					if (preg_match("#ç#", $h9_homop)) { $h9_homop = str_replace("ç", "c", $h9_homop); }
					if (preg_match("#à#", $h9_homop)) { $h9_homop = str_replace("à", "a", $h9_homop); }
					if (preg_match("#â#", $h9_homop)) { $h9_homop = str_replace("â", "a", $h9_homop); }
					
					if (preg_match("#é#", $h10_homop)) { $h10_homop = str_replace("é", "e", $h10_homop); }
					if (preg_match("#ê#", $h10_homop)) { $h10_homop = str_replace("ê", "e", $h10_homop); }
					if (preg_match("#è#", $h10_homop)) { $h10_homop = str_replace("è", "e", $h10_homop); }
					if (preg_match("#ï#", $h10_homop)) { $h10_homop = str_replace("ï", "i", $h10_homop); }
					if (preg_match("#û#", $h10_homop)) { $h10_homop = str_replace("û", "u", $h10_homop); }
					if (preg_match("#ù#", $h10_homop)) { $h10_homop = str_replace("ù", "u", $h10_homop); }
					if (preg_match("#ç#", $h10_homop)) { $h10_homop = str_replace("ç", "c", $h10_homop); }
					if (preg_match("#à#", $h10_homop)) { $h10_homop = str_replace("à", "a", $h10_homop); }
					if (preg_match("#â#", $h10_homop)) { $h10_homop = str_replace("â", "a", $h10_homop); }
					
					if (preg_match("#é#", $h11_homop)) { $h11_homop = str_replace("é", "e", $h11_homop); }
					if (preg_match("#ê#", $h11_homop)) { $h11_homop = str_replace("ê", "e", $h11_homop); }
					if (preg_match("#è#", $h11_homop)) { $h11_homop = str_replace("è", "e", $h11_homop); }
					if (preg_match("#ï#", $h11_homop)) { $h11_homop = str_replace("ï", "i", $h11_homop); }
					if (preg_match("#û#", $h11_homop)) { $h11_homop = str_replace("û", "u", $h11_homop); }
					if (preg_match("#ù#", $h11_homop)) { $h11_homop = str_replace("ù", "u", $h11_homop); }
					if (preg_match("#ç#", $h11_homop)) { $h11_homop = str_replace("ç", "c", $h11_homop); }
					if (preg_match("#à#", $h11_homop)) { $h11_homop = str_replace("à", "a", $h11_homop); }
					if (preg_match("#â#", $h11_homop)) { $h11_homop = str_replace("â", "a", $h11_homop); }
					
					if (preg_match("#é#", $h12_homop)) { $h12_homop = str_replace("é", "e", $h12_homop); }
					if (preg_match("#ê#", $h12_homop)) { $h12_homop = str_replace("ê", "e", $h12_homop); }
					if (preg_match("#è#", $h12_homop)) { $h12_homop = str_replace("è", "e", $h12_homop); }
					if (preg_match("#ï#", $h12_homop)) { $h12_homop = str_replace("ï", "i", $h12_homop); }
					if (preg_match("#û#", $h12_homop)) { $h12_homop = str_replace("û", "u", $h12_homop); }
					if (preg_match("#ù#", $h12_homop)) { $h12_homop = str_replace("ù", "u", $h12_homop); }
					if (preg_match("#ç#", $h12_homop)) { $h12_homop = str_replace("ç", "c", $h12_homop); }
					if (preg_match("#à#", $h12_homop)) { $h12_homop = str_replace("à", "a", $h12_homop); }
					if (preg_match("#â#", $h12_homop)) { $h12_homop = str_replace("â", "a", $h12_homop); }
					
					if (preg_match("#é#", $h13_homop)) { $h13_homop = str_replace("é", "e", $h13_homop); }
					if (preg_match("#ê#", $h13_homop)) { $h13_homop = str_replace("ê", "e", $h13_homop); }
					if (preg_match("#è#", $h13_homop)) { $h13_homop = str_replace("è", "e", $h13_homop); }
					if (preg_match("#ï#", $h13_homop)) { $h13_homop = str_replace("ï", "i", $h13_homop); }
					if (preg_match("#û#", $h13_homop)) { $h13_homop = str_replace("û", "u", $h13_homop); }
					if (preg_match("#ù#", $h13_homop)) { $h13_homop = str_replace("ù", "u", $h13_homop); }
					if (preg_match("#ç#", $h13_homop)) { $h13_homop = str_replace("ç", "c", $h13_homop); }
					if (preg_match("#à#", $h13_homop)) { $h13_homop = str_replace("à", "a", $h13_homop); }
					if (preg_match("#â#", $h13_homop)) { $h13_homop = str_replace("â", "a", $h13_homop); }
					
					if (preg_match("#é#", $h14_homop)) { $h14_homop = str_replace("é", "e", $h14_homop); }
					if (preg_match("#ê#", $h14_homop)) { $h14_homop = str_replace("ê", "e", $h14_homop); }
					if (preg_match("#è#", $h14_homop)) { $h14_homop = str_replace("è", "e", $h14_homop); }
					if (preg_match("#ï#", $h14_homop)) { $h14_homop = str_replace("ï", "i", $h14_homop); }
					if (preg_match("#û#", $h14_homop)) { $h14_homop = str_replace("û", "u", $h14_homop); }
					if (preg_match("#ù#", $h14_homop)) { $h14_homop = str_replace("ù", "u", $h14_homop); }
					if (preg_match("#ç#", $h14_homop)) { $h14_homop = str_replace("ç", "c", $h14_homop); }
					if (preg_match("#à#", $h14_homop)) { $h14_homop = str_replace("à", "a", $h14_homop); }
					if (preg_match("#â#", $h14_homop)) { $h14_homop = str_replace("â", "a", $h14_homop); }
					
					if (preg_match("#é#", $h15_homop)) { $h15_homop = str_replace("é", "e", $h15_homop); }
					if (preg_match("#ê#", $h15_homop)) { $h15_homop = str_replace("ê", "e", $h15_homop); }
					if (preg_match("#è#", $h15_homop)) { $h15_homop = str_replace("è", "e", $h15_homop); }
					if (preg_match("#ï#", $h15_homop)) { $h15_homop = str_replace("ï", "i", $h15_homop); }
					if (preg_match("#û#", $h15_homop)) { $h15_homop = str_replace("û", "u", $h15_homop); }
					if (preg_match("#ù#", $h15_homop)) { $h15_homop = str_replace("ù", "u", $h15_homop); }
					if (preg_match("#ç#", $h15_homop)) { $h15_homop = str_replace("ç", "c", $h15_homop); }
					if (preg_match("#à#", $h15_homop)) { $h15_homop = str_replace("à", "a", $h15_homop); }
					if (preg_match("#â#", $h15_homop)) { $h15_homop = str_replace("â", "a", $h15_homop); }
					
					if (preg_match("#é#", $h16_homop)) { $h16_homop = str_replace("é", "e", $h16_homop); }
					if (preg_match("#ê#", $h16_homop)) { $h16_homop = str_replace("ê", "e", $h16_homop); }
					if (preg_match("#è#", $h16_homop)) { $h16_homop = str_replace("è", "e", $h16_homop); }
					if (preg_match("#ï#", $h16_homop)) { $h16_homop = str_replace("ï", "i", $h16_homop); }
					if (preg_match("#û#", $h16_homop)) { $h16_homop = str_replace("û", "u", $h16_homop); }
					if (preg_match("#ù#", $h16_homop)) { $h16_homop = str_replace("ù", "u", $h16_homop); }
					if (preg_match("#ç#", $h16_homop)) { $h16_homop = str_replace("ç", "c", $h16_homop); }
					if (preg_match("#à#", $h16_homop)) { $h16_homop = str_replace("à", "a", $h16_homop); }
					if (preg_match("#â#", $h16_homop)) { $h16_homop = str_replace("â", "a", $h16_homop); }
					
					if (preg_match("#é#", $h17_homop)) { $h17_homop = str_replace("é", "e", $h17_homop); }
					if (preg_match("#ê#", $h17_homop)) { $h17_homop = str_replace("ê", "e", $h17_homop); }
					if (preg_match("#è#", $h17_homop)) { $h17_homop = str_replace("è", "e", $h17_homop); }
					if (preg_match("#ï#", $h17_homop)) { $h17_homop = str_replace("ï", "i", $h17_homop); }
					if (preg_match("#û#", $h17_homop)) { $h17_homop = str_replace("û", "u", $h17_homop); }
					if (preg_match("#ù#", $h17_homop)) { $h17_homop = str_replace("ù", "u", $h17_homop); }
					if (preg_match("#ç#", $h17_homop)) { $h17_homop = str_replace("ç", "c", $h17_homop); }
					if (preg_match("#à#", $h17_homop)) { $h17_homop = str_replace("à", "a", $h17_homop); }
					if (preg_match("#â#", $h17_homop)) { $h17_homop = str_replace("â", "a", $h17_homop); }
					
					if (preg_match("#é#", $h18_homop)) { $h18_homop = str_replace("é", "e", $h18_homop); }
					if (preg_match("#ê#", $h18_homop)) { $h18_homop = str_replace("ê", "e", $h18_homop); }
					if (preg_match("#è#", $h18_homop)) { $h18_homop = str_replace("è", "e", $h18_homop); }
					if (preg_match("#ï#", $h18_homop)) { $h18_homop = str_replace("ï", "i", $h18_homop); }
					if (preg_match("#û#", $h18_homop)) { $h18_homop = str_replace("û", "u", $h18_homop); }
					if (preg_match("#ù#", $h18_homop)) { $h18_homop = str_replace("ù", "u", $h18_homop); }
					if (preg_match("#ç#", $h18_homop)) { $h18_homop = str_replace("ç", "c", $h18_homop); }
					if (preg_match("#à#", $h18_homop)) { $h18_homop = str_replace("à", "a", $h18_homop); }
					if (preg_match("#â#", $h18_homop)) { $h18_homop = str_replace("â", "a", $h18_homop); }
					
					if (preg_match("#é#", $h19_homop)) { $h19_homop = str_replace("é", "e", $h19_homop); }
					if (preg_match("#ê#", $h19_homop)) { $h19_homop = str_replace("ê", "e", $h19_homop); }
					if (preg_match("#è#", $h19_homop)) { $h19_homop = str_replace("è", "e", $h19_homop); }
					if (preg_match("#ï#", $h19_homop)) { $h19_homop = str_replace("ï", "i", $h19_homop); }
					if (preg_match("#û#", $h19_homop)) { $h19_homop = str_replace("û", "u", $h19_homop); }
					if (preg_match("#ù#", $h19_homop)) { $h19_homop = str_replace("ù", "u", $h19_homop); }
					if (preg_match("#ç#", $h19_homop)) { $h19_homop = str_replace("ç", "c", $h19_homop); }
					if (preg_match("#à#", $h19_homop)) { $h19_homop = str_replace("à", "a", $h19_homop); }
					if (preg_match("#â#", $h19_homop)) { $h19_homop = str_replace("â", "a", $h19_homop); }
					
					if (preg_match("#é#", $h20_homop)) { $h20_homop = str_replace("é", "e", $h20_homop); }
					if (preg_match("#ê#", $h20_homop)) { $h20_homop = str_replace("ê", "e", $h20_homop); }
					if (preg_match("#è#", $h20_homop)) { $h20_homop = str_replace("è", "e", $h20_homop); }
					if (preg_match("#ï#", $h20_homop)) { $h20_homop = str_replace("ï", "i", $h20_homop); }
					if (preg_match("#û#", $h20_homop)) { $h20_homop = str_replace("û", "u", $h20_homop); }
					if (preg_match("#ù#", $h20_homop)) { $h20_homop = str_replace("ù", "u", $h20_homop); }
					if (preg_match("#ç#", $h20_homop)) { $h20_homop = str_replace("ç", "c", $h20_homop); }
					if (preg_match("#à#", $h20_homop)) { $h20_homop = str_replace("à", "a", $h20_homop); }
					if (preg_match("#â#", $h20_homop)) { $h20_homop = str_replace("â", "a", $h20_homop); }
					
					if($h1_homop != '')
					{
						if(preg_match('#' . $h1_homop . '#', $mess))
						{
							if($h1_homop != '') { $mess_1 = preg_replace('#' . $h1_homop . '#isU', $h1_homop, $mess); }
							if($h2_homop != '') { $mess_2 = preg_replace('#' . $h1_homop . '#', $h2_homop, $mess); }
							if($h3_homop != '') { $mess_3 = preg_replace('#' . $h1_homop . '#', $h3_homop, $mess); }
							if($h4_homop != '') { $mess_4 = preg_replace('#' . $h1_homop . '#', $h4_homop, $mess); }
							if($h5_homop != '') { $mess_5 = preg_replace('#' . $h1_homop . '#', $h5_homop, $mess); }
							if($h6_homop != '') { $mess_6 = preg_replace('#' . $h1_homop . '#', $h6_homop, $mess); }
							if($h7_homop != '') { $mess_7 = preg_replace('#' . $h1_homop . '#', $h7_homop, $mess); }
							if($h8_homop != '') { $mess_8 = preg_replace('#' . $h1_homop . '#', $h8_homop, $mess); }
							if($h9_homop != '') { $mess_9 = preg_replace('#' . $h1_homop . '#', $h9_homop, $mess); }
							if($h10_homop != '') { $mess_10 = preg_replace('#' . $h1_homop . '#', $h10_homop, $mess); }
							if($h11_homop != '') { $mess_11 = preg_replace('#' . $h1_homop . '#', $h11_homop, $mess); }
							if($h12_homop != '') { $mess_12 = preg_replace('#' . $h1_homop . '#', $h12_homop, $mess); }
							if($h13_homop != '') { $mess_13 = preg_replace('#' . $h1_homop . '#', $h13_homop, $mess); }
							if($h14_homop != '') { $mess_14 = preg_replace('#' . $h1_homop . '#', $h14_homop, $mess); }
							if($h15_homop != '') { $mess_15 = preg_replace('#' . $h1_homop . '#', $h15_homop, $mess); }
							if($h16_homop != '') { $mess_16 = preg_replace('#' . $h1_homop . '#', $h16_homop, $mess); }
							if($h17_homop != '') { $mess_17 = preg_replace('#' . $h1_homop . '#', $h17_homop, $mess); }
							if($h18_homop != '') { $mess_18 = preg_replace('#' . $h1_homop . '#', $h18_homop, $mess); }
							if($h19_homop != '') { $mess_19 = preg_replace('#' . $h1_homop . '#', $h19_homop, $mess); }
							if($h20_homop != '') { $mess_20 = preg_replace('#' . $h1_homop . '#', $h20_homop, $mess); }
						}
					}
					if($h2_homop != '')
					{
						if(preg_match('#' . $h2_homop . '#', $mess))
						{
							if($h1_homop != '') { $mess_1 = preg_replace('#' . $h2_homop . '#isU', $h1_homop, $mess); }
							if($h2_homop != '') { $mess_2 = preg_replace('#' . $h2_homop . '#', $h2_homop, $mess); }
							if($h3_homop != '') { $mess_3 = preg_replace('#' . $h2_homop . '#', $h3_homop, $mess); }
							if($h4_homop != '') { $mess_4 = preg_replace('#' . $h2_homop . '#', $h4_homop, $mess); }
							if($h5_homop != '') { $mess_5 = preg_replace('#' . $h2_homop . '#', $h5_homop, $mess); }
							if($h6_homop != '') { $mess_6 = preg_replace('#' . $h2_homop . '#', $h6_homop, $mess); }
							if($h7_homop != '') { $mess_7 = preg_replace('#' . $h2_homop . '#', $h7_homop, $mess); }
							if($h8_homop != '') { $mess_8 = preg_replace('#' . $h2_homop . '#', $h8_homop, $mess); }
							if($h9_homop != '') { $mess_9 = preg_replace('#' . $h2_homop . '#', $h9_homop, $mess); }
							if($h10_homop != '') { $mess_10 = preg_replace('#' . $h2_homop . '#', $h10_homop, $mess); }
							if($h11_homop != '') { $mess_11 = preg_replace('#' . $h2_homop . '#', $h11_homop, $mess); }
							if($h12_homop != '') { $mess_12 = preg_replace('#' . $h2_homop . '#', $h12_homop, $mess); }
							if($h13_homop != '') { $mess_13 = preg_replace('#' . $h2_homop . '#', $h13_homop, $mess); }
							if($h14_homop != '') { $mess_14 = preg_replace('#' . $h2_homop . '#', $h14_homop, $mess); }
							if($h15_homop != '') { $mess_15 = preg_replace('#' . $h2_homop . '#', $h15_homop, $mess); }
							if($h16_homop != '') { $mess_16 = preg_replace('#' . $h2_homop . '#', $h16_homop, $mess); }
							if($h17_homop != '') { $mess_17 = preg_replace('#' . $h2_homop . '#', $h17_homop, $mess); }
							if($h18_homop != '') { $mess_18 = preg_replace('#' . $h2_homop . '#', $h18_homop, $mess); }
							if($h19_homop != '') { $mess_19 = preg_replace('#' . $h2_homop . '#', $h19_homop, $mess); }
							if($h20_homop != '') { $mess_20 = preg_replace('#' . $h2_homop . '#', $h20_homop, $mess); }
						}
					}
					if($h3_homop != '')
					{
						if(preg_match('#' . $h3_homop . '#', $mess))
						{
							if($h1_homop != '') { $mess_1 = preg_replace('#' . $h3_homop . '#isU', $h1_homop, $mess); }
							if($h2_homop != '') { $mess_2 = preg_replace('#' . $h3_homop . '#', $h2_homop, $mess); }
							if($h3_homop != '') { $mess_3 = preg_replace('#' . $h3_homop . '#', $h3_homop, $mess); }
							if($h4_homop != '') { $mess_4 = preg_replace('#' . $h3_homop . '#', $h4_homop, $mess); }
							if($h5_homop != '') { $mess_5 = preg_replace('#' . $h3_homop . '#', $h5_homop, $mess); }
							if($h6_homop != '') { $mess_6 = preg_replace('#' . $h3_homop . '#', $h6_homop, $mess); }
							if($h7_homop != '') { $mess_7 = preg_replace('#' . $h3_homop . '#', $h7_homop, $mess); }
							if($h8_homop != '') { $mess_8 = preg_replace('#' . $h3_homop . '#', $h8_homop, $mess); }
							if($h9_homop != '') { $mess_9 = preg_replace('#' . $h3_homop . '#', $h9_homop, $mess); }
							if($h10_homop != '') { $mess_10 = preg_replace('#' . $h3_homop . '#', $h10_homop, $mess); }
							if($h11_homop != '') { $mess_11 = preg_replace('#' . $h3_homop . '#', $h11_homop, $mess); }
							if($h12_homop != '') { $mess_12 = preg_replace('#' . $h3_homop . '#', $h12_homop, $mess); }
							if($h13_homop != '') { $mess_13 = preg_replace('#' . $h3_homop . '#', $h13_homop, $mess); }
							if($h14_homop != '') { $mess_14 = preg_replace('#' . $h3_homop . '#', $h14_homop, $mess); }
							if($h15_homop != '') { $mess_15 = preg_replace('#' . $h3_homop . '#', $h15_homop, $mess); }
							if($h16_homop != '') { $mess_16 = preg_replace('#' . $h3_homop . '#', $h16_homop, $mess); }
							if($h17_homop != '') { $mess_17 = preg_replace('#' . $h3_homop . '#', $h17_homop, $mess); }
							if($h18_homop != '') { $mess_18 = preg_replace('#' . $h3_homop . '#', $h18_homop, $mess); }
							if($h19_homop != '') { $mess_19 = preg_replace('#' . $h3_homop . '#', $h19_homop, $mess); }
							if($h20_homop != '') { $mess_20 = preg_replace('#' . $h3_homop . '#', $h20_homop, $mess); }
						}
					}
					if($h4_homop != '')
					{
						if(preg_match('#' . $h4_homop . '#', $mess))
						{
							if($h1_homop != '') { $mess_1 = preg_replace('#' . $h4_homop . '#isU', $h1_homop, $mess); }
							if($h2_homop != '') { $mess_2 = preg_replace('#' . $h4_homop . '#', $h2_homop, $mess); }
							if($h3_homop != '') { $mess_3 = preg_replace('#' . $h4_homop . '#', $h3_homop, $mess); }
							if($h4_homop != '') { $mess_4 = preg_replace('#' . $h4_homop . '#', $h4_homop, $mess); }
							if($h5_homop != '') { $mess_5 = preg_replace('#' . $h4_homop . '#', $h5_homop, $mess); }
							if($h6_homop != '') { $mess_6 = preg_replace('#' . $h4_homop . '#', $h6_homop, $mess); }
							if($h7_homop != '') { $mess_7 = preg_replace('#' . $h4_homop . '#', $h7_homop, $mess); }
							if($h8_homop != '') { $mess_8 = preg_replace('#' . $h4_homop . '#', $h8_homop, $mess); }
							if($h9_homop != '') { $mess_9 = preg_replace('#' . $h4_homop . '#', $h9_homop, $mess); }
							if($h10_homop != '') { $mess_10 = preg_replace('#' . $h4_homop . '#', $h10_homop, $mess); }
							if($h11_homop != '') { $mess_11 = preg_replace('#' . $h4_homop . '#', $h11_homop, $mess); }
							if($h12_homop != '') { $mess_12 = preg_replace('#' . $h4_homop . '#', $h12_homop, $mess); }
							if($h13_homop != '') { $mess_13 = preg_replace('#' . $h4_homop . '#', $h13_homop, $mess); }
							if($h14_homop != '') { $mess_14 = preg_replace('#' . $h4_homop . '#', $h14_homop, $mess); }
							if($h15_homop != '') { $mess_15 = preg_replace('#' . $h4_homop . '#', $h15_homop, $mess); }
							if($h16_homop != '') { $mess_16 = preg_replace('#' . $h4_homop . '#', $h16_homop, $mess); }
							if($h17_homop != '') { $mess_17 = preg_replace('#' . $h4_homop . '#', $h17_homop, $mess); }
							if($h18_homop != '') { $mess_18 = preg_replace('#' . $h4_homop . '#', $h18_homop, $mess); }
							if($h19_homop != '') { $mess_19 = preg_replace('#' . $h4_homop . '#', $h19_homop, $mess); }
							if($h20_homop != '') { $mess_20 = preg_replace('#' . $h4_homop . '#', $h20_homop, $mess); }
						}
					}
					if($h5_homop != '')
					{
						if(preg_match('#' . $h5_homop . '#', $mess))
						{
							if($h1_homop != '') { $mess_1 = preg_replace('#' . $h5_homop . '#isU', $h1_homop, $mess); }
							if($h2_homop != '') { $mess_2 = preg_replace('#' . $h5_homop . '#', $h2_homop, $mess); }
							if($h3_homop != '') { $mess_3 = preg_replace('#' . $h5_homop . '#', $h3_homop, $mess); }
							if($h4_homop != '') { $mess_4 = preg_replace('#' . $h5_homop . '#', $h4_homop, $mess); }
							if($h5_homop != '') { $mess_5 = preg_replace('#' . $h5_homop . '#', $h5_homop, $mess); }
							if($h6_homop != '') { $mess_6 = preg_replace('#' . $h5_homop . '#', $h6_homop, $mess); }
							if($h7_homop != '') { $mess_7 = preg_replace('#' . $h5_homop . '#', $h7_homop, $mess); }
							if($h8_homop != '') { $mess_8 = preg_replace('#' . $h5_homop . '#', $h8_homop, $mess); }
							if($h9_homop != '') { $mess_9 = preg_replace('#' . $h5_homop . '#', $h9_homop, $mess); }
							if($h10_homop != '') { $mess_10 = preg_replace('#' . $h5_homop . '#', $h10_homop, $mess); }
							if($h11_homop != '') { $mess_11 = preg_replace('#' . $h5_homop . '#', $h11_homop, $mess); }
							if($h12_homop != '') { $mess_12 = preg_replace('#' . $h5_homop . '#', $h12_homop, $mess); }
							if($h13_homop != '') { $mess_13 = preg_replace('#' . $h5_homop . '#', $h13_homop, $mess); }
							if($h14_homop != '') { $mess_14 = preg_replace('#' . $h5_homop . '#', $h14_homop, $mess); }
							if($h15_homop != '') { $mess_15 = preg_replace('#' . $h5_homop . '#', $h15_homop, $mess); }
							if($h16_homop != '') { $mess_16 = preg_replace('#' . $h5_homop . '#', $h16_homop, $mess); }
							if($h17_homop != '') { $mess_17 = preg_replace('#' . $h5_homop . '#', $h17_homop, $mess); }
							if($h18_homop != '') { $mess_18 = preg_replace('#' . $h5_homop . '#', $h18_homop, $mess); }
							if($h19_homop != '') { $mess_19 = preg_replace('#' . $h5_homop . '#', $h19_homop, $mess); }
							if($h20_homop != '') { $mess_20 = preg_replace('#' . $h5_homop . '#', $h20_homop, $mess); }
						}
					}
					if($h6_homop != '')
					{
						if(preg_match('#' . $h6_homop . '#', $mess))
						{
							if($h1_homop != '') { $mess_1 = preg_replace('#' . $h6_homop . '#isU', $h1_homop, $mess); }
							if($h2_homop != '') { $mess_2 = preg_replace('#' . $h6_homop . '#', $h2_homop, $mess); }
							if($h3_homop != '') { $mess_3 = preg_replace('#' . $h6_homop . '#', $h3_homop, $mess); }
							if($h4_homop != '') { $mess_4 = preg_replace('#' . $h6_homop . '#', $h4_homop, $mess); }
							if($h5_homop != '') { $mess_5 = preg_replace('#' . $h6_homop . '#', $h5_homop, $mess); }
							if($h6_homop != '') { $mess_6 = preg_replace('#' . $h6_homop . '#', $h6_homop, $mess); }
							if($h7_homop != '') { $mess_7 = preg_replace('#' . $h6_homop . '#', $h7_homop, $mess); }
							if($h8_homop != '') { $mess_8 = preg_replace('#' . $h6_homop . '#', $h8_homop, $mess); }
							if($h9_homop != '') { $mess_9 = preg_replace('#' . $h6_homop . '#', $h9_homop, $mess); }
							if($h10_homop != '') { $mess_10 = preg_replace('#' . $h6_homop . '#', $h10_homop, $mess); }
							if($h11_homop != '') { $mess_11 = preg_replace('#' . $h6_homop . '#', $h11_homop, $mess); }
							if($h12_homop != '') { $mess_12 = preg_replace('#' . $h6_homop . '#', $h12_homop, $mess); }
							if($h13_homop != '') { $mess_13 = preg_replace('#' . $h6_homop . '#', $h13_homop, $mess); }
							if($h14_homop != '') { $mess_14 = preg_replace('#' . $h6_homop . '#', $h14_homop, $mess); }
							if($h15_homop != '') { $mess_15 = preg_replace('#' . $h6_homop . '#', $h15_homop, $mess); }
							if($h16_homop != '') { $mess_16 = preg_replace('#' . $h6_homop . '#', $h16_homop, $mess); }
							if($h17_homop != '') { $mess_17 = preg_replace('#' . $h6_homop . '#', $h17_homop, $mess); }
							if($h18_homop != '') { $mess_18 = preg_replace('#' . $h6_homop . '#', $h18_homop, $mess); }
							if($h19_homop != '') { $mess_19 = preg_replace('#' . $h6_homop . '#', $h19_homop, $mess); }
							if($h20_homop != '') { $mess_20 = preg_replace('#' . $h6_homop . '#', $h20_homop, $mess); }
						}
					}
					if($h7_homop != '')
					{
						if(preg_match('#' . $h7_homop . '#', $mess))
						{
							if($h1_homop != '') { $mess_1 = preg_replace('#' . $h7_homop . '#isU', $h1_homop, $mess); }
							if($h2_homop != '') { $mess_2 = preg_replace('#' . $h7_homop . '#', $h2_homop, $mess); }
							if($h3_homop != '') { $mess_3 = preg_replace('#' . $h7_homop . '#', $h3_homop, $mess); }
							if($h4_homop != '') { $mess_4 = preg_replace('#' . $h7_homop . '#', $h4_homop, $mess); }
							if($h5_homop != '') { $mess_5 = preg_replace('#' . $h7_homop . '#', $h5_homop, $mess); }
							if($h6_homop != '') { $mess_6 = preg_replace('#' . $h7_homop . '#', $h6_homop, $mess); }
							if($h7_homop != '') { $mess_7 = preg_replace('#' . $h7_homop . '#', $h7_homop, $mess); }
							if($h8_homop != '') { $mess_8 = preg_replace('#' . $h7_homop . '#', $h8_homop, $mess); }
							if($h9_homop != '') { $mess_9 = preg_replace('#' . $h7_homop . '#', $h9_homop, $mess); }
							if($h10_homop != '') { $mess_10 = preg_replace('#' . $h7_homop . '#', $h10_homop, $mess); }
							if($h11_homop != '') { $mess_11 = preg_replace('#' . $h7_homop . '#', $h11_homop, $mess); }
							if($h12_homop != '') { $mess_12 = preg_replace('#' . $h7_homop . '#', $h12_homop, $mess); }
							if($h13_homop != '') { $mess_13 = preg_replace('#' . $h7_homop . '#', $h13_homop, $mess); }
							if($h14_homop != '') { $mess_14 = preg_replace('#' . $h7_homop . '#', $h14_homop, $mess); }
							if($h15_homop != '') { $mess_15 = preg_replace('#' . $h7_homop . '#', $h15_homop, $mess); }
							if($h16_homop != '') { $mess_16 = preg_replace('#' . $h7_homop . '#', $h16_homop, $mess); }
							if($h17_homop != '') { $mess_17 = preg_replace('#' . $h7_homop . '#', $h17_homop, $mess); }
							if($h18_homop != '') { $mess_18 = preg_replace('#' . $h7_homop . '#', $h18_homop, $mess); }
							if($h19_homop != '') { $mess_19 = preg_replace('#' . $h7_homop . '#', $h19_homop, $mess); }
							if($h20_homop != '') { $mess_20 = preg_replace('#' . $h7_homop . '#', $h20_homop, $mess); }
						}
					}
					if($h8_homop != '')
					{
						if(preg_match('#' . $h8_homop . '#', $mess))
						{
							if($h1_homop != '') { $mess_1 = preg_replace('#' . $h8_homop . '#isU', $h1_homop, $mess); }
							if($h2_homop != '') { $mess_2 = preg_replace('#' . $h8_homop . '#', $h2_homop, $mess); }
							if($h3_homop != '') { $mess_3 = preg_replace('#' . $h8_homop . '#', $h3_homop, $mess); }
							if($h4_homop != '') { $mess_4 = preg_replace('#' . $h8_homop . '#', $h4_homop, $mess); }
							if($h5_homop != '') { $mess_5 = preg_replace('#' . $h8_homop . '#', $h5_homop, $mess); }
							if($h6_homop != '') { $mess_6 = preg_replace('#' . $h8_homop . '#', $h6_homop, $mess); }
							if($h7_homop != '') { $mess_7 = preg_replace('#' . $h8_homop . '#', $h7_homop, $mess); }
							if($h8_homop != '') { $mess_8 = preg_replace('#' . $h8_homop . '#', $h8_homop, $mess); }
							if($h9_homop != '') { $mess_9 = preg_replace('#' . $h8_homop . '#', $h9_homop, $mess); }
							if($h10_homop != '') { $mess_10 = preg_replace('#' . $h8_homop . '#', $h10_homop, $mess); }
							if($h11_homop != '') { $mess_11 = preg_replace('#' . $h8_homop . '#', $h11_homop, $mess); }
							if($h12_homop != '') { $mess_12 = preg_replace('#' . $h8_homop . '#', $h12_homop, $mess); }
							if($h13_homop != '') { $mess_13 = preg_replace('#' . $h8_homop . '#', $h13_homop, $mess); }
							if($h14_homop != '') { $mess_14 = preg_replace('#' . $h8_homop . '#', $h14_homop, $mess); }
							if($h15_homop != '') { $mess_15 = preg_replace('#' . $h8_homop . '#', $h15_homop, $mess); }
							if($h16_homop != '') { $mess_16 = preg_replace('#' . $h8_homop . '#', $h16_homop, $mess); }
							if($h17_homop != '') { $mess_17 = preg_replace('#' . $h8_homop . '#', $h17_homop, $mess); }
							if($h18_homop != '') { $mess_18 = preg_replace('#' . $h8_homop . '#', $h18_homop, $mess); }
							if($h19_homop != '') { $mess_19 = preg_replace('#' . $h8_homop . '#', $h19_homop, $mess); }
							if($h20_homop != '') { $mess_20 = preg_replace('#' . $h8_homop . '#', $h20_homop, $mess); }
						}
					}
					if($h9_homop != '')
					{
						if(preg_match('#' . $h9_homop . '#', $mess))
						{
							if($h1_homop != '') { $mess_1 = preg_replace('#' . $h9_homop . '#isU', $h1_homop, $mess); }
							if($h2_homop != '') { $mess_2 = preg_replace('#' . $h9_homop . '#', $h2_homop, $mess); }
							if($h3_homop != '') { $mess_3 = preg_replace('#' . $h9_homop . '#', $h3_homop, $mess); }
							if($h4_homop != '') { $mess_4 = preg_replace('#' . $h9_homop . '#', $h4_homop, $mess); }
							if($h5_homop != '') { $mess_5 = preg_replace('#' . $h9_homop . '#', $h5_homop, $mess); }
							if($h6_homop != '') { $mess_6 = preg_replace('#' . $h9_homop . '#', $h6_homop, $mess); }
							if($h7_homop != '') { $mess_7 = preg_replace('#' . $h9_homop . '#', $h7_homop, $mess); }
							if($h8_homop != '') { $mess_8 = preg_replace('#' . $h9_homop . '#', $h8_homop, $mess); }
							if($h9_homop != '') { $mess_9 = preg_replace('#' . $h9_homop . '#', $h9_homop, $mess); }
							if($h10_homop != '') { $mess_10 = preg_replace('#' . $h9_homop . '#', $h10_homop, $mess); }
							if($h11_homop != '') { $mess_11 = preg_replace('#' . $h9_homop . '#', $h11_homop, $mess); }
							if($h12_homop != '') { $mess_12 = preg_replace('#' . $h9_homop . '#', $h12_homop, $mess); }
							if($h13_homop != '') { $mess_13 = preg_replace('#' . $h9_homop . '#', $h13_homop, $mess); }
							if($h14_homop != '') { $mess_14 = preg_replace('#' . $h9_homop . '#', $h14_homop, $mess); }
							if($h15_homop != '') { $mess_15 = preg_replace('#' . $h9_homop . '#', $h15_homop, $mess); }
							if($h16_homop != '') { $mess_16 = preg_replace('#' . $h9_homop . '#', $h16_homop, $mess); }
							if($h17_homop != '') { $mess_17 = preg_replace('#' . $h9_homop . '#', $h17_homop, $mess); }
							if($h18_homop != '') { $mess_18 = preg_replace('#' . $h9_homop . '#', $h18_homop, $mess); }
							if($h19_homop != '') { $mess_19 = preg_replace('#' . $h9_homop . '#', $h19_homop, $mess); }
							if($h20_homop != '') { $mess_20 = preg_replace('#' . $h9_homop . '#', $h20_homop, $mess); }
						}
					}
					if($h10_homop != '')
					{
						if(preg_match('#' . $h10_homop . '#', $mess))
						{
							if($h1_homop != '') { $mess_1 = preg_replace('#' . $h10_homop . '#isU', $h1_homop, $mess); }
							if($h2_homop != '') { $mess_2 = preg_replace('#' . $h10_homop . '#', $h2_homop, $mess); }
							if($h3_homop != '') { $mess_3 = preg_replace('#' . $h10_homop . '#', $h3_homop, $mess); }
							if($h4_homop != '') { $mess_4 = preg_replace('#' . $h10_homop . '#', $h4_homop, $mess); }
							if($h5_homop != '') { $mess_5 = preg_replace('#' . $h10_homop . '#', $h5_homop, $mess); }
							if($h6_homop != '') { $mess_6 = preg_replace('#' . $h10_homop . '#', $h6_homop, $mess); }
							if($h7_homop != '') { $mess_7 = preg_replace('#' . $h10_homop . '#', $h7_homop, $mess); }
							if($h8_homop != '') { $mess_8 = preg_replace('#' . $h10_homop . '#', $h8_homop, $mess); }
							if($h9_homop != '') { $mess_9 = preg_replace('#' . $h10_homop . '#', $h9_homop, $mess); }
							if($h10_homop != '') { $mess_10 = preg_replace('#' . $h10_homop . '#', $h10_homop, $mess); }
							if($h11_homop != '') { $mess_11 = preg_replace('#' . $h10_homop . '#', $h11_homop, $mess); }
							if($h12_homop != '') { $mess_12 = preg_replace('#' . $h10_homop . '#', $h12_homop, $mess); }
							if($h13_homop != '') { $mess_13 = preg_replace('#' . $h10_homop . '#', $h13_homop, $mess); }
							if($h14_homop != '') { $mess_14 = preg_replace('#' . $h10_homop . '#', $h14_homop, $mess); }
							if($h15_homop != '') { $mess_15 = preg_replace('#' . $h10_homop . '#', $h15_homop, $mess); }
							if($h16_homop != '') { $mess_16 = preg_replace('#' . $h10_homop . '#', $h16_homop, $mess); }
							if($h17_homop != '') { $mess_17 = preg_replace('#' . $h10_homop . '#', $h17_homop, $mess); }
							if($h18_homop != '') { $mess_18 = preg_replace('#' . $h10_homop . '#', $h18_homop, $mess); }
							if($h19_homop != '') { $mess_19 = preg_replace('#' . $h10_homop . '#', $h19_homop, $mess); }
							if($h20_homop != '') { $mess_20 = preg_replace('#' . $h10_homop . '#', $h20_homop, $mess); }
						}
					}
					if($h11_homop != '')
					{
						if(preg_match('#' . $h11_homop . '#', $mess))
						{
							if($h1_homop != '') { $mess_1 = preg_replace('#' . $h11_homop . '#isU', $h1_homop, $mess); }
							if($h2_homop != '') { $mess_2 = preg_replace('#' . $h11_homop . '#', $h2_homop, $mess); }
							if($h3_homop != '') { $mess_3 = preg_replace('#' . $h11_homop . '#', $h3_homop, $mess); }
							if($h4_homop != '') { $mess_4 = preg_replace('#' . $h11_homop . '#', $h4_homop, $mess); }
							if($h5_homop != '') { $mess_5 = preg_replace('#' . $h11_homop . '#', $h5_homop, $mess); }
							if($h6_homop != '') { $mess_6 = preg_replace('#' . $h11_homop . '#', $h6_homop, $mess); }
							if($h7_homop != '') { $mess_7 = preg_replace('#' . $h11_homop . '#', $h7_homop, $mess); }
							if($h8_homop != '') { $mess_8 = preg_replace('#' . $h11_homop . '#', $h8_homop, $mess); }
							if($h9_homop != '') { $mess_9 = preg_replace('#' . $h11_homop . '#', $h9_homop, $mess); }
							if($h10_homop != '') { $mess_10 = preg_replace('#' . $h11_homop . '#', $h10_homop, $mess); }
							if($h11_homop != '') { $mess_11 = preg_replace('#' . $h11_homop . '#', $h11_homop, $mess); }
							if($h12_homop != '') { $mess_12 = preg_replace('#' . $h11_homop . '#', $h12_homop, $mess); }
							if($h13_homop != '') { $mess_13 = preg_replace('#' . $h11_homop . '#', $h13_homop, $mess); }
							if($h14_homop != '') { $mess_14 = preg_replace('#' . $h11_homop . '#', $h14_homop, $mess); }
							if($h15_homop != '') { $mess_15 = preg_replace('#' . $h11_homop . '#', $h15_homop, $mess); }
							if($h16_homop != '') { $mess_16 = preg_replace('#' . $h11_homop . '#', $h16_homop, $mess); }
							if($h17_homop != '') { $mess_17 = preg_replace('#' . $h11_homop . '#', $h17_homop, $mess); }
							if($h18_homop != '') { $mess_18 = preg_replace('#' . $h11_homop . '#', $h18_homop, $mess); }
							if($h19_homop != '') { $mess_19 = preg_replace('#' . $h11_homop . '#', $h19_homop, $mess); }
							if($h20_homop != '') { $mess_20 = preg_replace('#' . $h11_homop . '#', $h20_homop, $mess); }
						}
					}
					if($h12_homop != '')
					{
						if(preg_match('#' . $h12_homop . '#', $mess))
						{
							if($h1_homop != '') { $mess_1 = preg_replace('#' . $h12_homop . '#isU', $h1_homop, $mess); }
							if($h2_homop != '') { $mess_2 = preg_replace('#' . $h12_homop . '#', $h2_homop, $mess); }
							if($h3_homop != '') { $mess_3 = preg_replace('#' . $h12_homop . '#', $h3_homop, $mess); }
							if($h4_homop != '') { $mess_4 = preg_replace('#' . $h12_homop . '#', $h4_homop, $mess); }
							if($h5_homop != '') { $mess_5 = preg_replace('#' . $h12_homop . '#', $h5_homop, $mess); }
							if($h6_homop != '') { $mess_6 = preg_replace('#' . $h12_homop . '#', $h6_homop, $mess); }
							if($h7_homop != '') { $mess_7 = preg_replace('#' . $h12_homop . '#', $h7_homop, $mess); }
							if($h8_homop != '') { $mess_8 = preg_replace('#' . $h12_homop . '#', $h8_homop, $mess); }
							if($h9_homop != '') { $mess_9 = preg_replace('#' . $h12_homop . '#', $h9_homop, $mess); }
							if($h10_homop != '') { $mess_10 = preg_replace('#' . $h12_homop . '#', $h10_homop, $mess); }
							if($h11_homop != '') { $mess_11 = preg_replace('#' . $h12_homop . '#', $h11_homop, $mess); }
							if($h12_homop != '') { $mess_12 = preg_replace('#' . $h12_homop . '#', $h12_homop, $mess); }
							if($h13_homop != '') { $mess_13 = preg_replace('#' . $h12_homop . '#', $h13_homop, $mess); }
							if($h14_homop != '') { $mess_14 = preg_replace('#' . $h12_homop . '#', $h14_homop, $mess); }
							if($h15_homop != '') { $mess_15 = preg_replace('#' . $h12_homop . '#', $h15_homop, $mess); }
							if($h16_homop != '') { $mess_16 = preg_replace('#' . $h12_homop . '#', $h16_homop, $mess); }
							if($h17_homop != '') { $mess_17 = preg_replace('#' . $h12_homop . '#', $h17_homop, $mess); }
							if($h18_homop != '') { $mess_18 = preg_replace('#' . $h12_homop . '#', $h18_homop, $mess); }
							if($h19_homop != '') { $mess_19 = preg_replace('#' . $h12_homop . '#', $h19_homop, $mess); }
							if($h20_homop != '') { $mess_20 = preg_replace('#' . $h12_homop . '#', $h20_homop, $mess); }
						}
					}
					if($h13_homop != '')
					{
						if(preg_match('#' . $h13_homop . '#', $mess))
						{
							if($h1_homop != '') { $mess_1 = preg_replace('#' . $h13_homop . '#isU', $h1_homop, $mess); }
							if($h2_homop != '') { $mess_2 = preg_replace('#' . $h13_homop . '#', $h2_homop, $mess); }
							if($h3_homop != '') { $mess_3 = preg_replace('#' . $h13_homop . '#', $h3_homop, $mess); }
							if($h4_homop != '') { $mess_4 = preg_replace('#' . $h13_homop . '#', $h4_homop, $mess); }
							if($h5_homop != '') { $mess_5 = preg_replace('#' . $h13_homop . '#', $h5_homop, $mess); }
							if($h6_homop != '') { $mess_6 = preg_replace('#' . $h13_homop . '#', $h6_homop, $mess); }
							if($h7_homop != '') { $mess_7 = preg_replace('#' . $h13_homop . '#', $h7_homop, $mess); }
							if($h8_homop != '') { $mess_8 = preg_replace('#' . $h13_homop . '#', $h8_homop, $mess); }
							if($h9_homop != '') { $mess_9 = preg_replace('#' . $h13_homop . '#', $h9_homop, $mess); }
							if($h10_homop != '') { $mess_10 = preg_replace('#' . $h13_homop . '#', $h10_homop, $mess); }
							if($h11_homop != '') { $mess_11 = preg_replace('#' . $h13_homop . '#', $h11_homop, $mess); }
							if($h12_homop != '') { $mess_12 = preg_replace('#' . $h13_homop . '#', $h12_homop, $mess); }
							if($h13_homop != '') { $mess_13 = preg_replace('#' . $h13_homop . '#', $h13_homop, $mess); }
							if($h14_homop != '') { $mess_14 = preg_replace('#' . $h13_homop . '#', $h14_homop, $mess); }
							if($h15_homop != '') { $mess_15 = preg_replace('#' . $h13_homop . '#', $h15_homop, $mess); }
							if($h16_homop != '') { $mess_16 = preg_replace('#' . $h13_homop . '#', $h16_homop, $mess); }
							if($h17_homop != '') { $mess_17 = preg_replace('#' . $h13_homop . '#', $h17_homop, $mess); }
							if($h18_homop != '') { $mess_18 = preg_replace('#' . $h13_homop . '#', $h18_homop, $mess); }
							if($h19_homop != '') { $mess_19 = preg_replace('#' . $h13_homop . '#', $h19_homop, $mess); }
							if($h20_homop != '') { $mess_20 = preg_replace('#' . $h13_homop . '#', $h20_homop, $mess); }
						}
					}
					if($h14_homop != '')
					{
						if(preg_match('#' . $h14_homop . '#', $mess))
						{
							if($h1_homop != '') { $mess_1 = preg_replace('#' . $h14_homop . '#isU', $h1_homop, $mess); }
							if($h2_homop != '') { $mess_2 = preg_replace('#' . $h14_homop . '#', $h2_homop, $mess); }
							if($h3_homop != '') { $mess_3 = preg_replace('#' . $h14_homop . '#', $h3_homop, $mess); }
							if($h4_homop != '') { $mess_4 = preg_replace('#' . $h14_homop . '#', $h4_homop, $mess); }
							if($h5_homop != '') { $mess_5 = preg_replace('#' . $h14_homop . '#', $h5_homop, $mess); }
							if($h6_homop != '') { $mess_6 = preg_replace('#' . $h14_homop . '#', $h6_homop, $mess); }
							if($h7_homop != '') { $mess_7 = preg_replace('#' . $h14_homop . '#', $h7_homop, $mess); }
							if($h8_homop != '') { $mess_8 = preg_replace('#' . $h14_homop . '#', $h8_homop, $mess); }
							if($h9_homop != '') { $mess_9 = preg_replace('#' . $h14_homop . '#', $h9_homop, $mess); }
							if($h10_homop != '') { $mess_10 = preg_replace('#' . $h14_homop . '#', $h10_homop, $mess); }
							if($h11_homop != '') { $mess_11 = preg_replace('#' . $h14_homop . '#', $h11_homop, $mess); }
							if($h12_homop != '') { $mess_12 = preg_replace('#' . $h14_homop . '#', $h12_homop, $mess); }
							if($h13_homop != '') { $mess_13 = preg_replace('#' . $h14_homop . '#', $h13_homop, $mess); }
							if($h14_homop != '') { $mess_14 = preg_replace('#' . $h14_homop . '#', $h14_homop, $mess); }
							if($h15_homop != '') { $mess_15 = preg_replace('#' . $h14_homop . '#', $h15_homop, $mess); }
							if($h16_homop != '') { $mess_16 = preg_replace('#' . $h14_homop . '#', $h16_homop, $mess); }
							if($h17_homop != '') { $mess_17 = preg_replace('#' . $h14_homop . '#', $h17_homop, $mess); }
							if($h18_homop != '') { $mess_18 = preg_replace('#' . $h14_homop . '#', $h18_homop, $mess); }
							if($h19_homop != '') { $mess_19 = preg_replace('#' . $h14_homop . '#', $h19_homop, $mess); }
							if($h20_homop != '') { $mess_20 = preg_replace('#' . $h14_homop . '#', $h20_homop, $mess); }
						}
					}
					if($h15_homop != '')
					{
						if(preg_match('#' . $h15_homop . '#', $mess))
						{
							if($h1_homop != '') { $mess_1 = preg_replace('#' . $h15_homop . '#isU', $h1_homop, $mess); }
							if($h2_homop != '') { $mess_2 = preg_replace('#' . $h15_homop . '#', $h2_homop, $mess); }
							if($h3_homop != '') { $mess_3 = preg_replace('#' . $h15_homop . '#', $h3_homop, $mess); }
							if($h4_homop != '') { $mess_4 = preg_replace('#' . $h15_homop . '#', $h4_homop, $mess); }
							if($h5_homop != '') { $mess_5 = preg_replace('#' . $h15_homop . '#', $h5_homop, $mess); }
							if($h6_homop != '') { $mess_6 = preg_replace('#' . $h15_homop . '#', $h6_homop, $mess); }
							if($h7_homop != '') { $mess_7 = preg_replace('#' . $h15_homop . '#', $h7_homop, $mess); }
							if($h8_homop != '') { $mess_8 = preg_replace('#' . $h15_homop . '#', $h8_homop, $mess); }
							if($h9_homop != '') { $mess_9 = preg_replace('#' . $h15_homop . '#', $h9_homop, $mess); }
							if($h10_homop != '') { $mess_10 = preg_replace('#' . $h15_homop . '#', $h10_homop, $mess); }
							if($h11_homop != '') { $mess_11 = preg_replace('#' . $h15_homop . '#', $h11_homop, $mess); }
							if($h12_homop != '') { $mess_12 = preg_replace('#' . $h15_homop . '#', $h12_homop, $mess); }
							if($h13_homop != '') { $mess_13 = preg_replace('#' . $h15_homop . '#', $h13_homop, $mess); }
							if($h14_homop != '') { $mess_14 = preg_replace('#' . $h15_homop . '#', $h14_homop, $mess); }
							if($h15_homop != '') { $mess_15 = preg_replace('#' . $h15_homop . '#', $h15_homop, $mess); }
							if($h16_homop != '') { $mess_16 = preg_replace('#' . $h15_homop . '#', $h16_homop, $mess); }
							if($h17_homop != '') { $mess_17 = preg_replace('#' . $h15_homop . '#', $h17_homop, $mess); }
							if($h18_homop != '') { $mess_18 = preg_replace('#' . $h15_homop . '#', $h18_homop, $mess); }
							if($h19_homop != '') { $mess_19 = preg_replace('#' . $h15_homop . '#', $h19_homop, $mess); }
							if($h20_homop != '') { $mess_20 = preg_replace('#' . $h15_homop . '#', $h20_homop, $mess); }
						}
					}
					if($h16_homop != '')
					{
						if(preg_match('#' . $h16_homop . '#', $mess))
						{
							if($h1_homop != '') { $mess_1 = preg_replace('#' . $h16_homop . '#isU', $h1_homop, $mess); }
							if($h2_homop != '') { $mess_2 = preg_replace('#' . $h16_homop . '#', $h2_homop, $mess); }
							if($h3_homop != '') { $mess_3 = preg_replace('#' . $h16_homop . '#', $h3_homop, $mess); }
							if($h4_homop != '') { $mess_4 = preg_replace('#' . $h16_homop . '#', $h4_homop, $mess); }
							if($h5_homop != '') { $mess_5 = preg_replace('#' . $h16_homop . '#', $h5_homop, $mess); }
							if($h6_homop != '') { $mess_6 = preg_replace('#' . $h16_homop . '#', $h6_homop, $mess); }
							if($h7_homop != '') { $mess_7 = preg_replace('#' . $h16_homop . '#', $h7_homop, $mess); }
							if($h8_homop != '') { $mess_8 = preg_replace('#' . $h16_homop . '#', $h8_homop, $mess); }
							if($h9_homop != '') { $mess_9 = preg_replace('#' . $h16_homop . '#', $h9_homop, $mess); }
							if($h10_homop != '') { $mess_10 = preg_replace('#' . $h16_homop . '#', $h10_homop, $mess); }
							if($h11_homop != '') { $mess_11 = preg_replace('#' . $h16_homop . '#', $h11_homop, $mess); }
							if($h12_homop != '') { $mess_12 = preg_replace('#' . $h16_homop . '#', $h12_homop, $mess); }
							if($h13_homop != '') { $mess_13 = preg_replace('#' . $h16_homop . '#', $h13_homop, $mess); }
							if($h14_homop != '') { $mess_14 = preg_replace('#' . $h16_homop . '#', $h14_homop, $mess); }
							if($h15_homop != '') { $mess_15 = preg_replace('#' . $h16_homop . '#', $h15_homop, $mess); }
							if($h16_homop != '') { $mess_16 = preg_replace('#' . $h16_homop . '#', $h16_homop, $mess); }
							if($h17_homop != '') { $mess_17 = preg_replace('#' . $h16_homop . '#', $h17_homop, $mess); }
							if($h18_homop != '') { $mess_18 = preg_replace('#' . $h16_homop . '#', $h18_homop, $mess); }
							if($h19_homop != '') { $mess_19 = preg_replace('#' . $h16_homop . '#', $h19_homop, $mess); }
							if($h20_homop != '') { $mess_20 = preg_replace('#' . $h16_homop . '#', $h20_homop, $mess); }
						}
					}
					if($h17_homop != '')
					{
						if(preg_match('#' . $h17_homop . '#', $mess))
						{
							if($h1_homop != '') { $mess_1 = preg_replace('#' . $h17_homop . '#isU', $h1_homop, $mess); }
							if($h2_homop != '') { $mess_2 = preg_replace('#' . $h17_homop . '#', $h2_homop, $mess); }
							if($h3_homop != '') { $mess_3 = preg_replace('#' . $h17_homop . '#', $h3_homop, $mess); }
							if($h4_homop != '') { $mess_4 = preg_replace('#' . $h17_homop . '#', $h4_homop, $mess); }
							if($h5_homop != '') { $mess_5 = preg_replace('#' . $h17_homop . '#', $h5_homop, $mess); }
							if($h6_homop != '') { $mess_6 = preg_replace('#' . $h17_homop . '#', $h6_homop, $mess); }
							if($h7_homop != '') { $mess_7 = preg_replace('#' . $h17_homop . '#', $h7_homop, $mess); }
							if($h8_homop != '') { $mess_8 = preg_replace('#' . $h17_homop . '#', $h8_homop, $mess); }
							if($h9_homop != '') { $mess_9 = preg_replace('#' . $h17_homop . '#', $h9_homop, $mess); }
							if($h10_homop != '') { $mess_10 = preg_replace('#' . $h17_homop . '#', $h10_homop, $mess); }
							if($h11_homop != '') { $mess_11 = preg_replace('#' . $h17_homop . '#', $h11_homop, $mess); }
							if($h12_homop != '') { $mess_12 = preg_replace('#' . $h17_homop . '#', $h12_homop, $mess); }
							if($h13_homop != '') { $mess_13 = preg_replace('#' . $h17_homop . '#', $h13_homop, $mess); }
							if($h14_homop != '') { $mess_14 = preg_replace('#' . $h17_homop . '#', $h14_homop, $mess); }
							if($h15_homop != '') { $mess_15 = preg_replace('#' . $h17_homop . '#', $h15_homop, $mess); }
							if($h16_homop != '') { $mess_16 = preg_replace('#' . $h17_homop . '#', $h16_homop, $mess); }
							if($h17_homop != '') { $mess_17 = preg_replace('#' . $h17_homop . '#', $h17_homop, $mess); }
							if($h18_homop != '') { $mess_18 = preg_replace('#' . $h17_homop . '#', $h18_homop, $mess); }
							if($h19_homop != '') { $mess_19 = preg_replace('#' . $h17_homop . '#', $h19_homop, $mess); }
							if($h20_homop != '') { $mess_20 = preg_replace('#' . $h17_homop . '#', $h20_homop, $mess); }
						}
					}
					if($h18_homop != '')
					{
						if(preg_match('#' . $h18_homop . '#', $mess))
						{
							if($h1_homop != '') { $mess_1 = preg_replace('#' . $h18_homop . '#isU', $h1_homop, $mess); }
							if($h2_homop != '') { $mess_2 = preg_replace('#' . $h18_homop . '#', $h2_homop, $mess); }
							if($h3_homop != '') { $mess_3 = preg_replace('#' . $h18_homop . '#', $h3_homop, $mess); }
							if($h4_homop != '') { $mess_4 = preg_replace('#' . $h18_homop . '#', $h4_homop, $mess); }
							if($h5_homop != '') { $mess_5 = preg_replace('#' . $h18_homop . '#', $h5_homop, $mess); }
							if($h6_homop != '') { $mess_6 = preg_replace('#' . $h18_homop . '#', $h6_homop, $mess); }
							if($h7_homop != '') { $mess_7 = preg_replace('#' . $h18_homop . '#', $h7_homop, $mess); }
							if($h8_homop != '') { $mess_8 = preg_replace('#' . $h18_homop . '#', $h8_homop, $mess); }
							if($h9_homop != '') { $mess_9 = preg_replace('#' . $h18_homop . '#', $h9_homop, $mess); }
							if($h10_homop != '') { $mess_10 = preg_replace('#' . $h18_homop . '#', $h10_homop, $mess); }
							if($h11_homop != '') { $mess_11 = preg_replace('#' . $h18_homop . '#', $h11_homop, $mess); }
							if($h12_homop != '') { $mess_12 = preg_replace('#' . $h18_homop . '#', $h12_homop, $mess); }
							if($h13_homop != '') { $mess_13 = preg_replace('#' . $h18_homop . '#', $h13_homop, $mess); }
							if($h14_homop != '') { $mess_14 = preg_replace('#' . $h18_homop . '#', $h14_homop, $mess); }
							if($h15_homop != '') { $mess_15 = preg_replace('#' . $h18_homop . '#', $h15_homop, $mess); }
							if($h16_homop != '') { $mess_16 = preg_replace('#' . $h18_homop . '#', $h16_homop, $mess); }
							if($h17_homop != '') { $mess_17 = preg_replace('#' . $h18_homop . '#', $h17_homop, $mess); }
							if($h18_homop != '') { $mess_18 = preg_replace('#' . $h18_homop . '#', $h18_homop, $mess); }
							if($h19_homop != '') { $mess_19 = preg_replace('#' . $h18_homop . '#', $h19_homop, $mess); }
							if($h20_homop != '') { $mess_20 = preg_replace('#' . $h18_homop . '#', $h20_homop, $mess); }
						}
					}
					if($h19_homop != '')
					{
						if(preg_match('#' . $h19_homop . '#', $mess))
						{
							if($h1_homop != '') { $mess_1 = preg_replace('#' . $h19_homop . '#isU', $h1_homop, $mess); }
							if($h2_homop != '') { $mess_2 = preg_replace('#' . $h19_homop . '#', $h2_homop, $mess); }
							if($h3_homop != '') { $mess_3 = preg_replace('#' . $h19_homop . '#', $h3_homop, $mess); }
							if($h4_homop != '') { $mess_4 = preg_replace('#' . $h19_homop . '#', $h4_homop, $mess); }
							if($h5_homop != '') { $mess_5 = preg_replace('#' . $h19_homop . '#', $h5_homop, $mess); }
							if($h6_homop != '') { $mess_6 = preg_replace('#' . $h19_homop . '#', $h6_homop, $mess); }
							if($h7_homop != '') { $mess_7 = preg_replace('#' . $h19_homop . '#', $h7_homop, $mess); }
							if($h8_homop != '') { $mess_8 = preg_replace('#' . $h19_homop . '#', $h8_homop, $mess); }
							if($h9_homop != '') { $mess_9 = preg_replace('#' . $h19_homop . '#', $h9_homop, $mess); }
							if($h10_homop != '') { $mess_10 = preg_replace('#' . $h19_homop . '#', $h10_homop, $mess); }
							if($h11_homop != '') { $mess_11 = preg_replace('#' . $h19_homop . '#', $h11_homop, $mess); }
							if($h12_homop != '') { $mess_12 = preg_replace('#' . $h19_homop . '#', $h12_homop, $mess); }
							if($h13_homop != '') { $mess_13 = preg_replace('#' . $h19_homop . '#', $h13_homop, $mess); }
							if($h14_homop != '') { $mess_14 = preg_replace('#' . $h19_homop . '#', $h14_homop, $mess); }
							if($h15_homop != '') { $mess_15 = preg_replace('#' . $h19_homop . '#', $h15_homop, $mess); }
							if($h16_homop != '') { $mess_16 = preg_replace('#' . $h19_homop . '#', $h16_homop, $mess); }
							if($h17_homop != '') { $mess_17 = preg_replace('#' . $h19_homop . '#', $h17_homop, $mess); }
							if($h18_homop != '') { $mess_18 = preg_replace('#' . $h19_homop . '#', $h18_homop, $mess); }
							if($h19_homop != '') { $mess_19 = preg_replace('#' . $h19_homop . '#', $h19_homop, $mess); }
							if($h20_homop != '') { $mess_20 = preg_replace('#' . $h19_homop . '#', $h20_homop, $mess); }
						}
					}
					if($h20_homop != '')
					{
						if(preg_match('#' . $h20_homop . '#', $mess))
						{
							if($h1_homop != '') { $mess_1 = preg_replace('#' . $h20_homop . '#isU', $h1_homop, $mess); }
							if($h2_homop != '') { $mess_2 = preg_replace('#' . $h20_homop . '#', $h2_homop, $mess); }
							if($h3_homop != '') { $mess_3 = preg_replace('#' . $h20_homop . '#', $h3_homop, $mess); }
							if($h4_homop != '') { $mess_4 = preg_replace('#' . $h20_homop . '#', $h4_homop, $mess); }
							if($h5_homop != '') { $mess_5 = preg_replace('#' . $h20_homop . '#', $h5_homop, $mess); }
							if($h6_homop != '') { $mess_6 = preg_replace('#' . $h20_homop . '#', $h6_homop, $mess); }
							if($h7_homop != '') { $mess_7 = preg_replace('#' . $h20_homop . '#', $h7_homop, $mess); }
							if($h8_homop != '') { $mess_8 = preg_replace('#' . $h20_homop . '#', $h8_homop, $mess); }
							if($h9_homop != '') { $mess_9 = preg_replace('#' . $h20_homop . '#', $h9_homop, $mess); }
							if($h10_homop != '') { $mess_10 = preg_replace('#' . $h20_homop . '#', $h10_homop, $mess); }
							if($h11_homop != '') { $mess_11 = preg_replace('#' . $h20_homop . '#', $h11_homop, $mess); }
							if($h12_homop != '') { $mess_12 = preg_replace('#' . $h20_homop . '#', $h12_homop, $mess); }
							if($h13_homop != '') { $mess_13 = preg_replace('#' . $h20_homop . '#', $h13_homop, $mess); }
							if($h14_homop != '') { $mess_14 = preg_replace('#' . $h20_homop . '#', $h14_homop, $mess); }
							if($h15_homop != '') { $mess_15 = preg_replace('#' . $h20_homop . '#', $h15_homop, $mess); }
							if($h16_homop != '') { $mess_16 = preg_replace('#' . $h20_homop . '#', $h16_homop, $mess); }
							if($h17_homop != '') { $mess_17 = preg_replace('#' . $h20_homop . '#', $h17_homop, $mess); }
							if($h18_homop != '') { $mess_18 = preg_replace('#' . $h20_homop . '#', $h18_homop, $mess); }
							if($h19_homop != '') { $mess_19 = preg_replace('#' . $h20_homop . '#', $h19_homop, $mess); }
							if($h20_homop != '') { $mess_20 = preg_replace('#' . $h20_homop . '#', $h20_homop, $mess); }
						}
					}
				}
				$WHERE_WHERE_mess1 = 'text_reply = "' . $mess_1 . '"';
				$WHERE_WHERE_mess2 = 'text_reply = "' . $mess_2 . '"';
				$WHERE_WHERE_mess3 = 'text_reply = "' . $mess_3 . '"';
				$WHERE_WHERE_mess4 = 'text_reply = "' . $mess_4 . '"';
				$WHERE_WHERE_mess5 = 'text_reply = "' . $mess_5 . '"';
				$WHERE_WHERE_mess6 = 'text_reply = "' . $mess_6 . '"';
				$WHERE_WHERE_mess7 = 'text_reply = "' . $mess_7 . '"';
				$WHERE_WHERE_mess8 = 'text_reply = "' . $mess_8 . '"';
				$WHERE_WHERE_mess9 = 'text_reply = "' . $mess_9 . '"';
				$WHERE_WHERE_mess10 = 'text_reply = "' . $mess_10 . '"';
				$WHERE_WHERE_mess11 = 'text_reply = "' . $mess_11 . '"';
				$WHERE_WHERE_mess12 = 'text_reply = "' . $mess_12 . '"';
				$WHERE_WHERE_mess13 = 'text_reply = "' . $mess_13 . '"';
				$WHERE_WHERE_mess14 = 'text_reply = "' . $mess_14 . '"';
				$WHERE_WHERE_mess15 = 'text_reply = "' . $mess_15 . '"';
				$WHERE_WHERE_mess16 = 'text_reply = "' . $mess_16 . '"';
				$WHERE_WHERE_mess17 = 'text_reply = "' . $mess_17 . '"';
				$WHERE_WHERE_mess18 = 'text_reply = "' . $mess_18 . '"';
				$WHERE_WHERE_mess19 = 'text_reply = "' . $mess_19 . '"';
				$WHERE_WHERE_mess20 = 'text_reply = "' . $mess_20 . '"';
				
				if(($mess_1 != ''))
				{
					$WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ')';
				}
				
				if(($mess_1 != '') && ($mess_2 != ''))
				{
					$WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ')';
				}
				
				if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != ''))
				{
					$WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ')';
				}
				
				if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != ''))
				{
					$WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ')';
				}
				
				if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != '') && ($mess_5 != ''))
				{
					$WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ' || ' . $WHERE_WHERE_mess5 . ')';
				}
				
				if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != '') && ($mess_5 != '') && ($mess_6 != ''))
				{
					$WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ' || ' . $WHERE_WHERE_mess5 . ' || ' . $WHERE_WHERE_mess6 . ')';
				}
				
				if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != '') && ($mess_5 != '') && ($mess_6 != '') && ($mess_7 != ''))
				{
					$WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ' || ' . $WHERE_WHERE_mess5 . ' || ' . $WHERE_WHERE_mess6 . ' || ' . $WHERE_WHERE_mess7 . ')';
				}
				
				if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != '') && ($mess_5 != '') && ($mess_6 != '') && ($mess_7 != '') && ($mess_8 != ''))
				{
					$WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ' || ' . $WHERE_WHERE_mess5 . ' || ' . $WHERE_WHERE_mess6 . ' || ' . $WHERE_WHERE_mess7 . ' || ' . $WHERE_WHERE_mess8 . ')';
				}
				
				if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != '') && ($mess_5 != '') && ($mess_6 != '') && ($mess_7 != '') && ($mess_8 != '') && ($mess_9 != ''))
				{
					$WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ' || ' . $WHERE_WHERE_mess5 . ' || ' . $WHERE_WHERE_mess6 . ' || ' . $WHERE_WHERE_mess7 . ' || ' . $WHERE_WHERE_mess8 . ' || ' . $WHERE_WHERE_mess9 . ')';
				}
				
				if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != '') && ($mess_5 != '') && ($mess_6 != '') && ($mess_7 != '') && ($mess_8 != '') && ($mess_9 != '') && ($mess_10 != ''))
				{
					$WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ' || ' . $WHERE_WHERE_mess5 . ' || ' . $WHERE_WHERE_mess6 . ' || ' . $WHERE_WHERE_mess7 . ' || ' . $WHERE_WHERE_mess8 . ' || ' . $WHERE_WHERE_mess9 . ' || ' . $WHERE_WHERE_mess10 . ')';
				}
				
				if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != '') && ($mess_5 != '') && ($mess_6 != '') && ($mess_7 != '') && ($mess_8 != '') && ($mess_9 != '') && ($mess_10 != '') && ($mess_11 != ''))
				{
					$WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ' || ' . $WHERE_WHERE_mess5 . ' || ' . $WHERE_WHERE_mess6 . ' || ' . $WHERE_WHERE_mess7 . ' || ' . $WHERE_WHERE_mess8 . ' || ' . $WHERE_WHERE_mess9 . ' || ' . $WHERE_WHERE_mess10 . ' || ' . $WHERE_WHERE_mess11 . ')';
				}
				
				if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != '') && ($mess_5 != '') && ($mess_6 != '') && ($mess_7 != '') && ($mess_8 != '') && ($mess_9 != '') && ($mess_10 != '') && ($mess_11 != '') && ($mess_12 != ''))
				{
					$WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ' || ' . $WHERE_WHERE_mess5 . ' || ' . $WHERE_WHERE_mess6 . ' || ' . $WHERE_WHERE_mess7 . ' || ' . $WHERE_WHERE_mess8 . ' || ' . $WHERE_WHERE_mess9 . ' || ' . $WHERE_WHERE_mess10 . ' || ' . $WHERE_WHERE_mess11 . ' || ' . $WHERE_WHERE_mess12 . ')';
				}
				
				if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != '') && ($mess_5 != '') && ($mess_6 != '') && ($mess_7 != '') && ($mess_8 != '') && ($mess_9 != '') && ($mess_10 != '') && ($mess_11 != '') && ($mess_12 != '') && ($mess_13 != ''))
				{
					$WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ' || ' . $WHERE_WHERE_mess5 . ' || ' . $WHERE_WHERE_mess6 . ' || ' . $WHERE_WHERE_mess7 . ' || ' . $WHERE_WHERE_mess8 . ' || ' . $WHERE_WHERE_mess9 . ' || ' . $WHERE_WHERE_mess10 . ' || ' . $WHERE_WHERE_mess11 . ' || ' . $WHERE_WHERE_mess12 . ' || ' . $WHERE_WHERE_mess13 . ')';
				}
				
				if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != '') && ($mess_5 != '') && ($mess_6 != '') && ($mess_7 != '') && ($mess_8 != '') && ($mess_9 != '') && ($mess_10 != '') && ($mess_11 != '') && ($mess_12 != '') && ($mess_13 != '') && ($mess_14 != ''))
				{
					$WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ' || ' . $WHERE_WHERE_mess5 . ' || ' . $WHERE_WHERE_mess6 . ' || ' . $WHERE_WHERE_mess7 . ' || ' . $WHERE_WHERE_mess8 . ' || ' . $WHERE_WHERE_mess9 . ' || ' . $WHERE_WHERE_mess10 . ' || ' . $WHERE_WHERE_mess11 . ' || ' . $WHERE_WHERE_mess12 . ' || ' . $WHERE_WHERE_mess13 . ' || ' . $WHERE_WHERE_mess14 . ')';
				}
				
				if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != '') && ($mess_5 != '') && ($mess_6 != '') && ($mess_7 != '') && ($mess_8 != '') && ($mess_9 != '') && ($mess_10 != '') && ($mess_11 != '') && ($mess_12 != '') && ($mess_13 != '') && ($mess_14 != '') && ($mess_15 != ''))
				{
					$WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ' || ' . $WHERE_WHERE_mess5 . ' || ' . $WHERE_WHERE_mess6 . ' || ' . $WHERE_WHERE_mess7 . ' || ' . $WHERE_WHERE_mess8 . ' || ' . $WHERE_WHERE_mess9 . ' || ' . $WHERE_WHERE_mess10 . ' || ' . $WHERE_WHERE_mess11 . ' || ' . $WHERE_WHERE_mess12 . ' || ' . $WHERE_WHERE_mess13 . ' || ' . $WHERE_WHERE_mess14 . ' || ' . $WHERE_WHERE_mess15 . ')';
				}
				
				if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != '') && ($mess_5 != '') && ($mess_6 != '') && ($mess_7 != '') && ($mess_8 != '') && ($mess_9 != '') && ($mess_10 != '') && ($mess_11 != '') && ($mess_12 != '') && ($mess_13 != '') && ($mess_14 != '') && ($mess_15 != '') && ($mess_16 != ''))
				{
					$WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ' || ' . $WHERE_WHERE_mess5 . ' || ' . $WHERE_WHERE_mess6 . ' || ' . $WHERE_WHERE_mess7 . ' || ' . $WHERE_WHERE_mess8 . ' || ' . $WHERE_WHERE_mess9 . ' || ' . $WHERE_WHERE_mess10 . ' || ' . $WHERE_WHERE_mess11 . ' || ' . $WHERE_WHERE_mess12 . ' || ' . $WHERE_WHERE_mess13 . ' || ' . $WHERE_WHERE_mess14 . ' || ' . $WHERE_WHERE_mess15 . ' || ' . $WHERE_WHERE_mess16 . ')';
				}
				
				if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != '') && ($mess_5 != '') && ($mess_6 != '') && ($mess_7 != '') && ($mess_8 != '') && ($mess_9 != '') && ($mess_10 != '') && ($mess_11 != '') && ($mess_12 != '') && ($mess_13 != '') && ($mess_14 != '') && ($mess_15 != '') && ($mess_16 != '') && ($mess_17 != ''))
				{
					$WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ' || ' . $WHERE_WHERE_mess5 . ' || ' . $WHERE_WHERE_mess6 . ' || ' . $WHERE_WHERE_mess7 . ' || ' . $WHERE_WHERE_mess8 . ' || ' . $WHERE_WHERE_mess9 . ' || ' . $WHERE_WHERE_mess10 . ' || ' . $WHERE_WHERE_mess11 . ' || ' . $WHERE_WHERE_mess12 . ' || ' . $WHERE_WHERE_mess13 . ' || ' . $WHERE_WHERE_mess14 . ' || ' . $WHERE_WHERE_mess15 . ' || ' . $WHERE_WHERE_mess16 . ' || ' . $WHERE_WHERE_mess17 . ')';
				}
				
				if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != '') && ($mess_5 != '') && ($mess_6 != '') && ($mess_7 != '') && ($mess_8 != '') && ($mess_9 != '') && ($mess_10 != '') && ($mess_11 != '') && ($mess_12 != '') && ($mess_13 != '') && ($mess_14 != '') && ($mess_15 != '') && ($mess_16 != '') && ($mess_17 != '') && ($mess_18 != ''))
				{
					$WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ' || ' . $WHERE_WHERE_mess5 . ' || ' . $WHERE_WHERE_mess6 . ' || ' . $WHERE_WHERE_mess7 . ' || ' . $WHERE_WHERE_mess8 . ' || ' . $WHERE_WHERE_mess9 . ' || ' . $WHERE_WHERE_mess10 . ' || ' . $WHERE_WHERE_mess11 . ' || ' . $WHERE_WHERE_mess12 . ' || ' . $WHERE_WHERE_mess13 . ' || ' . $WHERE_WHERE_mess14 . ' || ' . $WHERE_WHERE_mess15 . ' || ' . $WHERE_WHERE_mess16 . ' || ' . $WHERE_WHERE_mess17 . ' || ' . $WHERE_WHERE_mess18 . ')';
				}
				
				if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != '') && ($mess_5 != '') && ($mess_6 != '') && ($mess_7 != '') && ($mess_8 != '') && ($mess_9 != '') && ($mess_10 != '') && ($mess_11 != '') && ($mess_12 != '') && ($mess_13 != '') && ($mess_14 != '') && ($mess_15 != '') && ($mess_16 != '') && ($mess_17 != '') && ($mess_18 != '') && ($mess_19 != ''))
				{
					$WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ' || ' . $WHERE_WHERE_mess5 . ' || ' . $WHERE_WHERE_mess6 . ' || ' . $WHERE_WHERE_mess7 . ' || ' . $WHERE_WHERE_mess8 . ' || ' . $WHERE_WHERE_mess9 . ' || ' . $WHERE_WHERE_mess10 . ' || ' . $WHERE_WHERE_mess11 . ' || ' . $WHERE_WHERE_mess12 . ' || ' . $WHERE_WHERE_mess13 . ' || ' . $WHERE_WHERE_mess14 . ' || ' . $WHERE_WHERE_mess15 . ' || ' . $WHERE_WHERE_mess16 . ' || ' . $WHERE_WHERE_mess17 . ' || ' . $WHERE_WHERE_mess18 . ' || ' . $WHERE_WHERE_mess19 . ')';
				}
				
				if(($mess_1 != '') && ($mess_2 != '') && ($mess_3 != '') && ($mess_4 != '') && ($mess_5 != '') && ($mess_6 != '') && ($mess_7 != '') && ($mess_8 != '') && ($mess_9 != '') && ($mess_10 != '') && ($mess_11 != '') && ($mess_12 != '') && ($mess_13 != '') && ($mess_14 != '') && ($mess_15 != '') && ($mess_16 != '') && ($mess_17 != '') && ($mess_18 != '') && ($mess_19 != '') && ($mess_20 != ''))
				{
					$WHERE_WHERE_homoinmess = '(' . $WHERE_WHERE_mess1 . ' || ' . $WHERE_WHERE_mess2 . ' || ' . $WHERE_WHERE_mess3 . ' || ' . $WHERE_WHERE_mess4 . ' || ' . $WHERE_WHERE_mess5 . ' || ' . $WHERE_WHERE_mess6 . ' || ' . $WHERE_WHERE_mess7 . ' || ' . $WHERE_WHERE_mess8 . ' || ' . $WHERE_WHERE_mess9 . ' || ' . $WHERE_WHERE_mess10 . ' || ' . $WHERE_WHERE_mess11 . ' || ' . $WHERE_WHERE_mess12 . ' || ' . $WHERE_WHERE_mess13 . ' || ' . $WHERE_WHERE_mess14 . ' || ' . $WHERE_WHERE_mess15 . ' || ' . $WHERE_WHERE_mess16 . ' || ' . $WHERE_WHERE_mess17 . ' || ' . $WHERE_WHERE_mess18 . ' || ' . $WHERE_WHERE_mess19 . ' || ' . $WHERE_WHERE_mess20 . ')';
				}
				
				if(($mess_1 != '') || ($mess_2 != '') || ($mess_3 != '') || ($mess_4 != '') || ($mess_5 != '') || ($mess_6 != '') || ($mess_7 != '') || ($mess_8 != '') || ($mess_9 != '') || ($mess_10 != '') || ($mess_11 != '') || ($mess_12 != '') || ($mess_13 != '') || ($mess_14 != '') || ($mess_15 != '') || ($mess_16 != '') || ($mess_17 != '') || ($mess_18 != '') || ($mess_19 != '') || ($mess_20 != ''))
				{
					$select_reply_po_afhomoph = 'SELECT * FROM s0019__reply WHERE ((autor_reply = "' . $user_print . '" || autor_reply = "team") && ' . $WHERE_WHERE_homoinmess . ')';
					$result_reply_po_afhomoph = mysql_query($select_reply_po_afhomoph) or die ('Erreur 0016: '.mysql_error() );
					$total_reply_po_afhomoph = mysql_num_rows($result_reply_po_afhomoph);
					if($total_reply_po_afhomoph)
					{
						$total_reply_po_afhomoph = $total_reply_po_afhomoph;
						if($total_reply_po_afhomoph > '1')
						{
							$num_reply_robot_shoot = rand(1, $total_reply_po_afhomoph);
						}
						else
						{
							$num_reply_robot_shoot = '1';
						}
					}
					$select_last_reply_afhomoph = 'SELECT * FROM s0019__reply WHERE ((autor_reply = "' . $user_print . '" || autor_reply = "team") && ' . $WHERE_WHERE_homoinmess . ')';
					$result_last_reply_afhomoph = mysql_query($select_last_reply_afhomoph) or die ('Erreur 0017: '.mysql_error() );
					$total_last_reply_afhomoph = mysql_num_rows($result_last_reply_afhomoph);
					if($total_last_reply_afhomoph)
					{
						$num_reply = '1';
						while ($ligne_last_reply_afhomoph = mysql_fetch_array ($result_last_reply_afhomoph))
						{ extract ($ligne_last_reply_afhomoph);
							$id_reply_robot_shot_num[$num_reply] = $id_reply;
							$num_reply++;
						}
						$id_reply_robot_shot = $id_reply_robot_shot_num[$num_reply_robot_shoot];
						
						$select_afhomoph = 'SELECT * FROM s0019__reply WHERE ((autor_reply = "' . $user_print . '" || autor_reply = "team") && id_reply = "' . $id_reply_robot_shot . '") LIMIT 0, 1';
						$result_afhomoph = mysql_query($select_afhomoph) or die ('Erreur 0018: '.mysql_error() );
						$total_afhomoph = mysql_num_rows($result_afhomoph);
						if($total_afhomoph)
						{
							while ($ligne_afhomoph = mysql_fetch_array ($result_afhomoph))
							{ extract ($ligne_afhomoph);
								$print_text_reply = $rep_reply;
								$print_text_reply = stripslashes($print_text_reply); // Suprime les \
								$print_text_reply = ucfirst($print_text_reply);
								
								$robot_speak_color = '000000';
								$robot_speak = $print_text_reply;
								$bot_speak = '1';
					
							}
						}
					}
				}
			}
		}
		if($bot_speak == '')
		{
			if (preg_match("#[0-9]{1,10}\+[0-9]{1,10}#", $mess))
			{
				$MAKE_001 = preg_replace('#([0-9]{1,10})\+([0-9]{1,10})#', '[$1][$2]', $mess);
				$MAKE_002 = preg_replace('#\[([0-9]{1,10})\]\[([0-9]{1,10})\]#', '$1', $MAKE_001);
				$MAKE_003 = preg_replace('#\[([0-9]{1,10})\]\[([0-9]{1,10})\]#', '$2', $MAKE_001);
				$MAKE_add = ($MAKE_002 + $MAKE_003);
				$speak = '1';
			}
			if (preg_match("#[0-9]{1,10}\-[0-9]{1,10}#", $mess))
			{
				$MAKE_001 = preg_replace('#([0-9]{1,10})\-([0-9]{1,10})#', '[$1][$2]', $mess);
				$MAKE_002 = preg_replace('#\[([0-9]{1,10})\]\[([0-9]{1,10})\]#', '$1', $MAKE_001);
				$MAKE_003 = preg_replace('#\[([0-9]{1,10})\]\[([0-9]{1,10})\]#', '$2', $MAKE_001);
				$MAKE_add = ($MAKE_002 - $MAKE_003);
				$speak = '1';
			}
			if (preg_match("#[0-9]{1,10}\*[0-9]{1,10}#", $mess))
			{
				$MAKE_001 = preg_replace('#([0-9]{1,10})\*([0-9]{1,10})#', '[$1][$2]', $mess);
				$MAKE_002 = preg_replace('#\[([0-9]{1,10})\]\[([0-9]{1,10})\]#', '$1', $MAKE_001);
				$MAKE_003 = preg_replace('#\[([0-9]{1,10})\]\[([0-9]{1,10})\]#', '$2', $MAKE_001);
				$MAKE_add = ($MAKE_002 * $MAKE_003);
				$speak = '1';
			}
			if (preg_match("#[0-9]{1,10}\/[0-9]{1,10}#", $mess))
			{
				$MAKE_001 = preg_replace('#([0-9]{1,10})\/([0-9]{1,10})#', '[$1][$2]', $mess);
				$MAKE_002 = preg_replace('#\[([0-9]{1,10})\]\[([0-9]{1,10})\]#', '$1', $MAKE_001);
				$MAKE_003 = preg_replace('#\[([0-9]{1,10})\]\[([0-9]{1,10})\]#', '$2', $MAKE_001);
				if($MAKE_003 != '0')
				{
					$MAKE_add = ($MAKE_002 / $MAKE_003);
					$speak = '1';
				}
				else
				{
					$robot_speak_color = '000000';
					$robot_speak = 'division par zero impossible !';
					$bot_speak = '1';
				}

			}
			
			if($speak == '1')
			{
				$robot_speak_color = '000000';
				$robot_speak = 'La reponse est ' . $MAKE_add;
				$bot_speak = '1';
								
			}
		}
		if($bot_speak == '1')
		{
			$rq1_reprobotonhist = 'INSERT INTO s0019__allhist (id_allhist, text_allhist, date_allhist, user_allhist, bot_allhist) VALUES  ("", "' . $robot_speak . '", "' . $time . '", "' . $user_print . '", "1")';
			$res1_reprobotonhist = mysql_query($rq1_reprobotonhist)
			or die ("Probléme d'affichage 00-0019");
			$last_robotreply = $robot_speak;
		}
		else
		{
			$new_question = $mess;
			$goodmess_print = '\goodrep ';
			$robot_speak_color = 'CC0000';
			$robot_speak = 'Peut tu me dire quoi répondre à cette question ? (marque \goodrep et la reponse)';
		}
	}
	print '
			<TR>
				<TD bgcolor="#' . $robot_speak_color . '"><font color="#FFFFFF">' . $robot_speak . '</font></TD>
			</TR><tr>
		<td><form METHOD = "POST"> 
	Ton message: <input type="text" name="mess" size="100" value="' . $goodmess_print . '">
	<INPUT type="hidden" name="envo" value="envo" size="10">
	<INPUT type="hidden" name="login" value="login" size="10">
	<INPUT type="hidden" name="new_question" value="' . $new_question . '" size="10">
	<INPUT type="hidden" name="last_robotreply" value="' . $last_robotreply . '" size="10">
	<INPUT type="hidden" name="user" value="' . $user . '" size="10">
	<input type="submit" name="submit" value="Envoyé" name="envoyer">
	</form>
	<form METHOD = "POST">
	<input type="submit" name="submit" value="Déconnection" name="envoyer"></td> 
	</form></td></tr></table></center>';
}
else
{
print '
<table width="100%">
	<tr>
		<td width="50%">
			<form METHOD = "POST"> 
			<INPUT type="hidden" name="login" value="login" size="10">
			<input type="text" name="user" value="" size="20">
			<input type="submit" name="submit" value="Commencer!" name="envoyer"><br />
			</form>
		</td>
		<td width="50%">
			<form METHOD = "POST"> 
			<INPUT type="hidden" name="login" value="login" size="10">
			<input type="hidden" name="user" value="" size="20">
			<input type="submit" name="submit" value="Commencer sans username!" name="envoyer"><br />
			</form>
		</td>
	</tr>
</table>';
}
?>

 Conclusion

Le script vous demande sur la 1er page un username, si vous nen choisiser pas le site va vous attribuer un username au hasard, le username est utile pour reprendre une conversation où vous l'avez laissé (grace à l'historique) et de plus vous pouvez apprendre au robot quoi répondre a une question qui le laise sans reponse et cette nouvelle apprentisage est visible que par vous sauf si un admin change la valeur "autor_reply" par "team" ;)

Le script peut répondre au question/reponse qui sont mots pour mots dans sa bdd;
au question avec caractére spéciaux (il supprime tout caractére spéciaux pour maximiser les reponses);
un systeme de synonim simple fait que si vous meter dans les table de synonime des mots synonim et que vous inscriver se mots il va vous sortir un synomime;
un systeme de synonime dans les phrase, le systeme remplace les mots d'une phrase qui sont dans les table de synonime par les synonime référant et test si toutes les phrase modifier sont présente sur la bdd pour maximiser les réponse ;)
le script répond a des opération matématique simple (1+2 , 8*9 , 78-98 , 899/34)


Si vous inscriver "\inhomo [1ersynonime][2e][3e][4e]"(vous pouvez en mettre jusqua 20 ^^) sa va ajouter les synonime automatiquement à la bdd ;) (qq bug signaler sur cette fonction !)

Ce script a pret de 1900 lignes je suis concient que cela fait beaucoup je vais TRÈS bientôt le partionner en fonction ^^


 Sources de la même categorie

Source avec Zip GÉNÉRER UN MOT DE PASS ALÉATOIRE par narkos2
UNICODE TO HTML ENTITIES par CrazyShooter
Source avec Zip DÉBUTANT : FONCTION POUR TRANSFORMER UN TEMPS EN SECONDES EN... par MonkeyIsBack
FONCTION QUI GÉNÈRE UN CODE GRÂCE À L'ORTOGRAPHE ET LA PRONO... par foofymany
Source avec Zip TRADUCTION DE FICHIERS DE LANGUE AVEC GOOGLE GTRANSLATE par madislak

 Sources en rapport avec celle ci

Source avec Zip JEU DU MORPION INTELLIGENT: HUMAIN VERSUS PHP par grandvizir
Source avec Zip Source avec une capture INTELLIGENCE ARTIFICIELLE ? NON, TOUT SIMPLEMENT UN PROGRAMM... par bultez
Source avec Zip Source avec une capture JEU DU MORPION AVEC INTELLIGENCE ARTIFICIELLE DÉVELOPPÉE : P... par matthieuaubry

Commentaires et avis

Commentaire de Flachy Joe le 24/05/2008 11:14:17

Ne serrait il pas possible d'utiliser des tableaux et les opérations sur les tableaux (array_map par exemple) plutôt que des variables numérotées ?

Commentaire de salasfinwe le 24/05/2008 16:05:22

Oui cella aurais ?t? fessable... mais je n'est pas vrm commencer l'optimisation du script :P Mais je vais surement utulis? cette fonction ? plusieurs place dans un futur proche ;)
Pour l'instant je m'?fforce plus d'am?liorer la compr?hension des phrases et autres fonctions que j'ai en t?te. niveau optimisation... c clair qu'il y a ?norm?ment a faire ! ya plus de 800 lignes qui sont utile juste pour la fonction d'ajout de synonime, donc c clair que sa sa peut all? direct dans une fonction au lien d'?tre sur le script normale :P

Pour tester l'IA en opp?ration vous pouvez all? sur le site www.tchatavecmoi.com
Si vous avez des id?es ou des commentaires a faire n'?siter pas !

Commentaire de yoman64 le 25/05/2008 11:09:13

Salut,

Tout d'abord je trouve l'idée très intéressante, bien que tu n'utilises pas de vrai intelligence artificielle, plutot une simple question-réponse. En fesant une corrélation entre les mots et le contexte tu pourrais faire un robot qui sait construire lui même ses phrases/réponses et qui apprends comme un grand sans parler que les réponses ne seraient plus "statique" mais bien généré par une intelligence artificielle, bref qui apprend à parler. Mais je pense pas que ce soit le but de ta source :-P


Il y a énormément de code inutile et redondant, ça mérite un gros ménage tout ça.
Par exemple : #  if (preg_match("#é#", $h13_homop)) { $h13_homop = str_replace("é", "e", $h13_homop); }
# if (preg_match("#ê#", $h13_homop)) { $h13_homop = str_replace("ê", "e", $h13_homop); }
# if (preg_match("#è#", $h13_homop)) { $h13_homop = str_replace("è", "e", $h13_homop); }
# if (preg_match("#ï#", $h13_homop)) { $h13_homop = str_replace("ï", "i", $h13_homop); }
# if (preg_match("#û#", $h13_homop)) { $h13_homop = str_replace("û", "u", $h13_homop); }
...............

Pourrait être remplacer en quelques lignes (une en fait) au lieu de centaines.

De plus l'utilisation d'array et de boucle serait très judicieuse et pourrait réduire le script encore d'un bon 200 lignes au moin.

A vrai dire tout le script pourrait passer en quelques lignes lol, fauderait que tu revois sérieusement ton script !

Bonne continuation.

Commentaire de Flachy Joe le 25/05/2008 11:31:50

D'ailleurs pourquoi tester la présence du caractère accentué avant de lancer le remplacement ?

$h13_homop = str_replace(array('é','è','ê',....),array('e','e','e',....), $h13_homop);

Commentaire de salasfinwe le 25/05/2008 13:24:32

cot? optimisation c clair qui a du travail ? faire, mais comme dit plus haut c pas ma priorit? ! Jai pas bc de temps pour travailler sur se script c plus un petit projet perso que je trouve bien, et pour l'instant je preffere mettre en application mes id?es avant de pass? 1h a optimiser mon script et qu'au final le script ne soit pas meilleur (au niveau du rendue) mais d'ici la fin de la semaine je vais le faire ;)

Et c clair que pour l'instant il n'y a pas une grande IA pr?sent sur le script, mais elle sera d?velopper dans un futur proche ! Il fauts commencer par les basses, mon objectif premier ?tait de construire une basse de question r?ponse viable !

Et oui le but de mon robot est d'apprendre a parl? mais j'ai mal comprit ton ton truc de cor?lation... si tu veut peut-?tre mieux me l'expliquer voila mon msn moi'a~t'mbesner'.'com

Commentaire de Oziris le 26/05/2008 10:55:34

salut j'aimerer bien tester pour voir ceux que ca donne mais j'ai l'impression qu'il manque un ou plusieur fichier je me trompe ??

Commentaire de salasfinwe le 26/05/2008 13:16:13

il manque aucun fichier toute le script est sur ce fichier qui est inclut dans le corp dun desing

pour tester voila le script www.tchatavecmoi.com/

Commentaire de Oziris le 26/05/2008 14:07:57

et le fichier config.php c'est a nous a le fabriquer ?

Commentaire de salasfinwe le 26/05/2008 17:41:39

bah c un fichier de connection sql ! Je vous est mit plus haut la structure de la bd !

Commentaire de Oziris le 26/05/2008 19:06:55

une copie du fichier aurai etais plus simple moi j'aime bien tester mais je suis asser nul en prog !!
voila c plus de la decouverte avant un aprentissage !

Commentaire de will3264 le 05/10/2009 01:28:46

pouvez vous m'envoyer les fichiers zipés svp, tout complet, afin d'essayer ce code.
Sur quelle version de php cela doit il tourner ?
Merci pour vos réponses.

 Ajouter un commentaire


Discussions en rapport avec ce code source dans le forum

Récupérer les champs d'un formulaire inclus dans une boucle [ par nougitch ] Bonjour,Je g&#233;n&#232;re un tableau contenant les 3 donn&#233;es d'une de mes tables.&nbsp;- Horizontalement j'ai mon produit ("ia") ;&nbsp;- Verti


Nos sponsors


Sondage...

Comparez les prix

CalendriCode

Février 2010
LMMJVSD
1234567
891011121314
15161718192021
22232425262728

Consulter la suite du CalendriCode

 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,593 sec (3)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales